{"version":3,"sources":["src/app/pages/auth/sign-in/sign-in.component.ts","src/app/pages/auth/sign-in/sign-in.component.html","src/app/pages/auth/sign-up/sign-up.component.ts","src/app/pages/auth/sign-up/sign-up.component.html","node_modules/@angular/cdk/fesm2022/stepper.mjs","node_modules/@angular/material/fesm2022/stepper.mjs","node_modules/ngx-mask/fesm2022/ngx-mask.mjs","src/app/pages/auth/trial-creation/trial-creation.component.ts","src/app/pages/auth/trial-creation/trial-creation.component.html","src/app/app.routes.ts","node_modules/@angular/service-worker/fesm2022/service-worker.mjs","src/app/core/guards/auth_guard.ts","src/app/core/interceptors/jwt.interceptor.ts","src/app/core/interceptors/server-error.interceptor.ts","node_modules/@angular/animations/fesm2022/browser.mjs","node_modules/@angular/platform-browser/fesm2022/animations.mjs","src/app/shared/routes/full.routes.ts","src/app/shared/routes/routes.ts","src/app/pages/contracts/user-agreement/user-agreement.component.ts","src/app/pages/contracts/user-agreement/user-agreement.component.html","src/app/app-routing.module.ts","node_modules/@angular/common/locales/tr.mjs","src/app/app.config.ts","src/app/app.component.ts","src/app/app.component.html","src/main.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\r\nimport { Component, OnInit } from '@angular/core';\r\nimport {\r\n FormGroup,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n UntypedFormBuilder,\r\n Validators,\r\n} from '@angular/forms';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { ActivatedRoute, Router, RouterModule } from '@angular/router';\r\nimport { Roles } from 'src/app/core/constants';\r\nimport { SignInDto } from 'src/app/core/dtos/auth';\r\nimport { AuthService } from 'src/app/core/services/auth';\r\nimport { ROUTER_UTILS } from 'src/app/core/utils';\r\nimport { MANAGEMENT_ROUTER_UTILS } from 'src/app/core/utils/management-router.util';\r\n\r\n@Component({\r\n selector: 'app-sign-in',\r\n templateUrl: './sign-in.component.html',\r\n styleUrls: ['./sign-in.component.scss'],\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n RouterModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatIconModule,\r\n ],\r\n})\r\nexport class SignInComponent implements OnInit {\r\n routerUtils = ROUTER_UTILS;\r\n loginForm!: FormGroup;\r\n returnUrl: string;\r\n show = false;\r\n\r\n constructor(\r\n private activatedRoute: ActivatedRoute,\r\n private authService: AuthService,\r\n private formBuilder: UntypedFormBuilder,\r\n private router: Router\r\n ) {\r\n if (this.authService.isLoggedIn) {\r\n if (this.authService.userRoleValue == Roles.superAdmin) {\r\n this.router.navigateByUrl(\r\n `/${MANAGEMENT_ROUTER_UTILS.config.version.root}/${MANAGEMENT_ROUTER_UTILS.config.version.versions}`\r\n );\r\n } else {\r\n this.router.navigateByUrl(\r\n `/${ROUTER_UTILS.config.home.root}/${ROUTER_UTILS.config.home.versions}`\r\n );\r\n }\r\n }\r\n\r\n this.returnUrl =\r\n this.activatedRoute.snapshot.queryParamMap.get('returnUrl') ||\r\n `/${ROUTER_UTILS.config.home.root}/${ROUTER_UTILS.config.home.versions}`;\r\n\r\n this.loginForm = this.formBuilder.group({\r\n email: [null, [Validators.required, Validators.email]],\r\n password: [null, Validators.required],\r\n });\r\n }\r\n\r\n ngOnInit(): void {}\r\n\r\n onClickSignIn(data: SignInDto): void {\r\n this.authService.signIn(data, this.returnUrl);\r\n }\r\n showPassword(): void {\r\n this.show = !this.show;\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

Oturum Açın

\r\n

Giriş yapmak için e-posta adresinizi ve şifrenizi girin

\r\n
\r\n
\r\n \r\n Email\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n Şifre\r\n \r\n \r\n {{ show ? \"visibility_off\" : \"visibility\" }}\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n Şifrenimi unuttun?\r\n \r\n Giriş Yap\r\n \r\n
\r\n

\r\n Bir Hesabın Yok Mu?\r\n Deneme Hesap Oluştur\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\n\r\n@Component({\r\n selector: 'app-sign-up',\r\n templateUrl: './sign-up.component.html',\r\n styleUrls: ['./sign-up.component.scss']\r\n})\r\nexport class SignUpComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","

sign-up works!

\r\n","import { FocusKeyManager } from '@angular/cdk/a11y';\nimport * as i1 from '@angular/cdk/bidi';\nimport { BidiModule } from '@angular/cdk/bidi';\nimport { hasModifierKey, SPACE, ENTER } from '@angular/cdk/keycodes';\nimport * as i0 from '@angular/core';\nimport { Directive, InjectionToken, EventEmitter, forwardRef, booleanAttribute, TemplateRef, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, Optional, ContentChild, ViewChild, Input, Output, QueryList, numberAttribute, ContentChildren, NgModule } from '@angular/core';\nimport { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';\nimport { Subject, of } from 'rxjs';\nimport { startWith, takeUntil } from 'rxjs/operators';\nconst _c0 = [\"*\"];\nfunction CdkStep_ng_template_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojection(0);\n }\n}\nlet CdkStepHeader = /*#__PURE__*/(() => {\n class CdkStepHeader {\n constructor(_elementRef) {\n this._elementRef = _elementRef;\n }\n /** Focuses the step header. */\n focus() {\n this._elementRef.nativeElement.focus();\n }\n static {\n this.ɵfac = function CdkStepHeader_Factory(ɵt) {\n return new (ɵt || CdkStepHeader)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkStepHeader,\n selectors: [[\"\", \"cdkStepHeader\", \"\"]],\n hostAttrs: [\"role\", \"tab\"],\n standalone: true\n });\n }\n }\n return CdkStepHeader;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet CdkStepLabel = /*#__PURE__*/(() => {\n class CdkStepLabel {\n constructor( /** @docs-private */template) {\n this.template = template;\n }\n static {\n this.ɵfac = function CdkStepLabel_Factory(ɵt) {\n return new (ɵt || CdkStepLabel)(i0.ɵɵdirectiveInject(i0.TemplateRef));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkStepLabel,\n selectors: [[\"\", \"cdkStepLabel\", \"\"]],\n standalone: true\n });\n }\n }\n return CdkStepLabel;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Used to generate unique ID for each stepper component. */\nlet nextId = 0;\n/** Change event emitted on selection changes. */\nclass StepperSelectionEvent {}\n/** Enum to represent the different states of the steps. */\nconst STEP_STATE = {\n NUMBER: 'number',\n EDIT: 'edit',\n DONE: 'done',\n ERROR: 'error'\n};\n/** InjectionToken that can be used to specify the global stepper options. */\nconst STEPPER_GLOBAL_OPTIONS = /*#__PURE__*/new InjectionToken('STEPPER_GLOBAL_OPTIONS');\nlet CdkStep = /*#__PURE__*/(() => {\n class CdkStep {\n /** Whether step is marked as completed. */\n get completed() {\n return this._completedOverride == null ? this._getDefaultCompleted() : this._completedOverride;\n }\n set completed(value) {\n this._completedOverride = value;\n }\n _getDefaultCompleted() {\n return this.stepControl ? this.stepControl.valid && this.interacted : this.interacted;\n }\n /** Whether step has an error. */\n get hasError() {\n return this._customError == null ? this._getDefaultError() : this._customError;\n }\n set hasError(value) {\n this._customError = value;\n }\n _getDefaultError() {\n return this.stepControl && this.stepControl.invalid && this.interacted;\n }\n constructor(_stepper, stepperOptions) {\n this._stepper = _stepper;\n /** Whether user has attempted to move away from the step. */\n this.interacted = false;\n /** Emits when the user has attempted to move away from the step. */\n this.interactedStream = new EventEmitter();\n /** Whether the user can return to this step once it has been marked as completed. */\n this.editable = true;\n /** Whether the completion of step is optional. */\n this.optional = false;\n this._completedOverride = null;\n this._customError = null;\n this._stepperOptions = stepperOptions ? stepperOptions : {};\n this._displayDefaultIndicatorType = this._stepperOptions.displayDefaultIndicatorType !== false;\n }\n /** Selects this step component. */\n select() {\n this._stepper.selected = this;\n }\n /** Resets the step to its initial state. Note that this includes resetting form data. */\n reset() {\n this.interacted = false;\n if (this._completedOverride != null) {\n this._completedOverride = false;\n }\n if (this._customError != null) {\n this._customError = false;\n }\n if (this.stepControl) {\n this.stepControl.reset();\n }\n }\n ngOnChanges() {\n // Since basically all inputs of the MatStep get proxied through the view down to the\n // underlying MatStepHeader, we have to make sure that change detection runs correctly.\n this._stepper._stateChanged();\n }\n _markAsInteracted() {\n if (!this.interacted) {\n this.interacted = true;\n this.interactedStream.emit(this);\n }\n }\n /** Determines whether the error state can be shown. */\n _showError() {\n // We want to show the error state either if the user opted into/out of it using the\n // global options, or if they've explicitly set it through the `hasError` input.\n return this._stepperOptions.showError ?? this._customError != null;\n }\n static {\n this.ɵfac = function CdkStep_Factory(ɵt) {\n return new (ɵt || CdkStep)(i0.ɵɵdirectiveInject(forwardRef(() => CdkStepper)), i0.ɵɵdirectiveInject(STEPPER_GLOBAL_OPTIONS, 8));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: CdkStep,\n selectors: [[\"cdk-step\"]],\n contentQueries: function CdkStep_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, CdkStepLabel, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.stepLabel = _t.first);\n }\n },\n viewQuery: function CdkStep_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(TemplateRef, 7);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.content = _t.first);\n }\n },\n inputs: {\n stepControl: \"stepControl\",\n label: \"label\",\n errorMessage: \"errorMessage\",\n ariaLabel: [0, \"aria-label\", \"ariaLabel\"],\n ariaLabelledby: [0, \"aria-labelledby\", \"ariaLabelledby\"],\n state: \"state\",\n editable: [2, \"editable\", \"editable\", booleanAttribute],\n optional: [2, \"optional\", \"optional\", booleanAttribute],\n completed: [2, \"completed\", \"completed\", booleanAttribute],\n hasError: [2, \"hasError\", \"hasError\", booleanAttribute]\n },\n outputs: {\n interactedStream: \"interacted\"\n },\n exportAs: [\"cdkStep\"],\n standalone: true,\n features: [i0.ɵɵInputTransformsFeature, i0.ɵɵNgOnChangesFeature, i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c0,\n decls: 1,\n vars: 0,\n template: function CdkStep_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵtemplate(0, CdkStep_ng_template_0_Template, 1, 0, \"ng-template\");\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return CdkStep;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet CdkStepper = /*#__PURE__*/(() => {\n class CdkStepper {\n /** The index of the selected step. */\n get selectedIndex() {\n return this._selectedIndex;\n }\n set selectedIndex(index) {\n if (this.steps && this._steps) {\n // Ensure that the index can't be out of bounds.\n if (!this._isValidIndex(index) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('cdkStepper: Cannot assign out-of-bounds value to `selectedIndex`.');\n }\n this.selected?._markAsInteracted();\n if (this._selectedIndex !== index && !this._anyControlsInvalidOrPending(index) && (index >= this._selectedIndex || this.steps.toArray()[index].editable)) {\n this._updateSelectedItemIndex(index);\n }\n } else {\n this._selectedIndex = index;\n }\n }\n /** The step that is selected. */\n get selected() {\n return this.steps ? this.steps.toArray()[this.selectedIndex] : undefined;\n }\n set selected(step) {\n this.selectedIndex = step && this.steps ? this.steps.toArray().indexOf(step) : -1;\n }\n /** Orientation of the stepper. */\n get orientation() {\n return this._orientation;\n }\n set orientation(value) {\n // This is a protected method so that `MatStepper` can hook into it.\n this._orientation = value;\n if (this._keyManager) {\n this._keyManager.withVerticalOrientation(value === 'vertical');\n }\n }\n constructor(_dir, _changeDetectorRef, _elementRef) {\n this._dir = _dir;\n this._changeDetectorRef = _changeDetectorRef;\n this._elementRef = _elementRef;\n /** Emits when the component is destroyed. */\n this._destroyed = new Subject();\n /** Steps that belong to the current stepper, excluding ones from nested steppers. */\n this.steps = new QueryList();\n /** List of step headers sorted based on their DOM order. */\n this._sortedHeaders = new QueryList();\n /** Whether the validity of previous steps should be checked or not. */\n this.linear = false;\n this._selectedIndex = 0;\n /** Event emitted when the selected step has changed. */\n this.selectionChange = new EventEmitter();\n /** Output to support two-way binding on `[(selectedIndex)]` */\n this.selectedIndexChange = new EventEmitter();\n this._orientation = 'horizontal';\n this._groupId = nextId++;\n }\n ngAfterContentInit() {\n this._steps.changes.pipe(startWith(this._steps), takeUntil(this._destroyed)).subscribe(steps => {\n this.steps.reset(steps.filter(step => step._stepper === this));\n this.steps.notifyOnChanges();\n });\n }\n ngAfterViewInit() {\n // If the step headers are defined outside of the `ngFor` that renders the steps, like in the\n // Material stepper, they won't appear in the `QueryList` in the same order as they're\n // rendered in the DOM which will lead to incorrect keyboard navigation. We need to sort\n // them manually to ensure that they're correct. Alternatively, we can change the Material\n // template to inline the headers in the `ngFor`, but that'll result in a lot of\n // code duplication. See #23539.\n this._stepHeader.changes.pipe(startWith(this._stepHeader), takeUntil(this._destroyed)).subscribe(headers => {\n this._sortedHeaders.reset(headers.toArray().sort((a, b) => {\n const documentPosition = a._elementRef.nativeElement.compareDocumentPosition(b._elementRef.nativeElement);\n // `compareDocumentPosition` returns a bitmask so we have to use a bitwise operator.\n // https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition\n // tslint:disable-next-line:no-bitwise\n return documentPosition & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;\n }));\n this._sortedHeaders.notifyOnChanges();\n });\n // Note that while the step headers are content children by default, any components that\n // extend this one might have them as view children. We initialize the keyboard handling in\n // AfterViewInit so we're guaranteed for both view and content children to be defined.\n this._keyManager = new FocusKeyManager(this._sortedHeaders).withWrap().withHomeAndEnd().withVerticalOrientation(this._orientation === 'vertical');\n (this._dir ? this._dir.change : of()).pipe(startWith(this._layoutDirection()), takeUntil(this._destroyed)).subscribe(direction => this._keyManager.withHorizontalOrientation(direction));\n this._keyManager.updateActiveItem(this._selectedIndex);\n // No need to `takeUntil` here, because we're the ones destroying `steps`.\n this.steps.changes.subscribe(() => {\n if (!this.selected) {\n this._selectedIndex = Math.max(this._selectedIndex - 1, 0);\n }\n });\n // The logic which asserts that the selected index is within bounds doesn't run before the\n // steps are initialized, because we don't how many steps there are yet so we may have an\n // invalid index on init. If that's the case, auto-correct to the default so we don't throw.\n if (!this._isValidIndex(this._selectedIndex)) {\n this._selectedIndex = 0;\n }\n }\n ngOnDestroy() {\n this._keyManager?.destroy();\n this.steps.destroy();\n this._sortedHeaders.destroy();\n this._destroyed.next();\n this._destroyed.complete();\n }\n /** Selects and focuses the next step in list. */\n next() {\n this.selectedIndex = Math.min(this._selectedIndex + 1, this.steps.length - 1);\n }\n /** Selects and focuses the previous step in list. */\n previous() {\n this.selectedIndex = Math.max(this._selectedIndex - 1, 0);\n }\n /** Resets the stepper to its initial state. Note that this includes clearing form data. */\n reset() {\n this._updateSelectedItemIndex(0);\n this.steps.forEach(step => step.reset());\n this._stateChanged();\n }\n /** Returns a unique id for each step label element. */\n _getStepLabelId(i) {\n return `cdk-step-label-${this._groupId}-${i}`;\n }\n /** Returns unique id for each step content element. */\n _getStepContentId(i) {\n return `cdk-step-content-${this._groupId}-${i}`;\n }\n /** Marks the component to be change detected. */\n _stateChanged() {\n this._changeDetectorRef.markForCheck();\n }\n /** Returns position state of the step with the given index. */\n _getAnimationDirection(index) {\n const position = index - this._selectedIndex;\n if (position < 0) {\n return this._layoutDirection() === 'rtl' ? 'next' : 'previous';\n } else if (position > 0) {\n return this._layoutDirection() === 'rtl' ? 'previous' : 'next';\n }\n return 'current';\n }\n /** Returns the type of icon to be displayed. */\n _getIndicatorType(index, state = STEP_STATE.NUMBER) {\n const step = this.steps.toArray()[index];\n const isCurrentStep = this._isCurrentStep(index);\n return step._displayDefaultIndicatorType ? this._getDefaultIndicatorLogic(step, isCurrentStep) : this._getGuidelineLogic(step, isCurrentStep, state);\n }\n _getDefaultIndicatorLogic(step, isCurrentStep) {\n if (step._showError() && step.hasError && !isCurrentStep) {\n return STEP_STATE.ERROR;\n } else if (!step.completed || isCurrentStep) {\n return STEP_STATE.NUMBER;\n } else {\n return step.editable ? STEP_STATE.EDIT : STEP_STATE.DONE;\n }\n }\n _getGuidelineLogic(step, isCurrentStep, state = STEP_STATE.NUMBER) {\n if (step._showError() && step.hasError && !isCurrentStep) {\n return STEP_STATE.ERROR;\n } else if (step.completed && !isCurrentStep) {\n return STEP_STATE.DONE;\n } else if (step.completed && isCurrentStep) {\n return state;\n } else if (step.editable && isCurrentStep) {\n return STEP_STATE.EDIT;\n } else {\n return state;\n }\n }\n _isCurrentStep(index) {\n return this._selectedIndex === index;\n }\n /** Returns the index of the currently-focused step header. */\n _getFocusIndex() {\n return this._keyManager ? this._keyManager.activeItemIndex : this._selectedIndex;\n }\n _updateSelectedItemIndex(newIndex) {\n const stepsArray = this.steps.toArray();\n this.selectionChange.emit({\n selectedIndex: newIndex,\n previouslySelectedIndex: this._selectedIndex,\n selectedStep: stepsArray[newIndex],\n previouslySelectedStep: stepsArray[this._selectedIndex]\n });\n // If focus is inside the stepper, move it to the next header, otherwise it may become\n // lost when the active step content is hidden. We can't be more granular with the check\n // (e.g. checking whether focus is inside the active step), because we don't have a\n // reference to the elements that are rendering out the content.\n this._containsFocus() ? this._keyManager.setActiveItem(newIndex) : this._keyManager.updateActiveItem(newIndex);\n this._selectedIndex = newIndex;\n this.selectedIndexChange.emit(this._selectedIndex);\n this._stateChanged();\n }\n _onKeydown(event) {\n const hasModifier = hasModifierKey(event);\n const keyCode = event.keyCode;\n const manager = this._keyManager;\n if (manager.activeItemIndex != null && !hasModifier && (keyCode === SPACE || keyCode === ENTER)) {\n this.selectedIndex = manager.activeItemIndex;\n event.preventDefault();\n } else {\n manager.setFocusOrigin('keyboard').onKeydown(event);\n }\n }\n _anyControlsInvalidOrPending(index) {\n if (this.linear && index >= 0) {\n return this.steps.toArray().slice(0, index).some(step => {\n const control = step.stepControl;\n const isIncomplete = control ? control.invalid || control.pending || !step.interacted : !step.completed;\n return isIncomplete && !step.optional && !step._completedOverride;\n });\n }\n return false;\n }\n _layoutDirection() {\n return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n }\n /** Checks whether the stepper contains the focused element. */\n _containsFocus() {\n const stepperElement = this._elementRef.nativeElement;\n const focusedElement = _getFocusedElementPierceShadowDom();\n return stepperElement === focusedElement || stepperElement.contains(focusedElement);\n }\n /** Checks whether the passed-in index is a valid step index. */\n _isValidIndex(index) {\n return index > -1 && (!this.steps || index < this.steps.length);\n }\n static {\n this.ɵfac = function CdkStepper_Factory(ɵt) {\n return new (ɵt || CdkStepper)(i0.ɵɵdirectiveInject(i1.Directionality, 8), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkStepper,\n selectors: [[\"\", \"cdkStepper\", \"\"]],\n contentQueries: function CdkStepper_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, CdkStep, 5);\n i0.ɵɵcontentQuery(dirIndex, CdkStepHeader, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._steps = _t);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._stepHeader = _t);\n }\n },\n inputs: {\n linear: [2, \"linear\", \"linear\", booleanAttribute],\n selectedIndex: [2, \"selectedIndex\", \"selectedIndex\", numberAttribute],\n selected: \"selected\",\n orientation: \"orientation\"\n },\n outputs: {\n selectionChange: \"selectionChange\",\n selectedIndexChange: \"selectedIndexChange\"\n },\n exportAs: [\"cdkStepper\"],\n standalone: true,\n features: [i0.ɵɵInputTransformsFeature]\n });\n }\n }\n return CdkStepper;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Button that moves to the next step in a stepper workflow. */\nlet CdkStepperNext = /*#__PURE__*/(() => {\n class CdkStepperNext {\n constructor(_stepper) {\n this._stepper = _stepper;\n /** Type of the next button. Defaults to \"submit\" if not specified. */\n this.type = 'submit';\n }\n static {\n this.ɵfac = function CdkStepperNext_Factory(ɵt) {\n return new (ɵt || CdkStepperNext)(i0.ɵɵdirectiveInject(CdkStepper));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkStepperNext,\n selectors: [[\"button\", \"cdkStepperNext\", \"\"]],\n hostVars: 1,\n hostBindings: function CdkStepperNext_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"click\", function CdkStepperNext_click_HostBindingHandler() {\n return ctx._stepper.next();\n });\n }\n if (rf & 2) {\n i0.ɵɵhostProperty(\"type\", ctx.type);\n }\n },\n inputs: {\n type: \"type\"\n },\n standalone: true\n });\n }\n }\n return CdkStepperNext;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/** Button that moves to the previous step in a stepper workflow. */\nlet CdkStepperPrevious = /*#__PURE__*/(() => {\n class CdkStepperPrevious {\n constructor(_stepper) {\n this._stepper = _stepper;\n /** Type of the previous button. Defaults to \"button\" if not specified. */\n this.type = 'button';\n }\n static {\n this.ɵfac = function CdkStepperPrevious_Factory(ɵt) {\n return new (ɵt || CdkStepperPrevious)(i0.ɵɵdirectiveInject(CdkStepper));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkStepperPrevious,\n selectors: [[\"button\", \"cdkStepperPrevious\", \"\"]],\n hostVars: 1,\n hostBindings: function CdkStepperPrevious_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"click\", function CdkStepperPrevious_click_HostBindingHandler() {\n return ctx._stepper.previous();\n });\n }\n if (rf & 2) {\n i0.ɵɵhostProperty(\"type\", ctx.type);\n }\n },\n inputs: {\n type: \"type\"\n },\n standalone: true\n });\n }\n }\n return CdkStepperPrevious;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet CdkStepperModule = /*#__PURE__*/(() => {\n class CdkStepperModule {\n static {\n this.ɵfac = function CdkStepperModule_Factory(ɵt) {\n return new (ɵt || CdkStepperModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: CdkStepperModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [BidiModule]\n });\n }\n }\n return CdkStepperModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { CdkStep, CdkStepHeader, CdkStepLabel, CdkStepper, CdkStepperModule, CdkStepperNext, CdkStepperPrevious, STEPPER_GLOBAL_OPTIONS, STEP_STATE, StepperSelectionEvent };\n","import { TemplatePortal, CdkPortalOutlet, PortalModule } from '@angular/cdk/portal';\nimport { CdkStepLabel, CdkStepHeader, CdkStep, STEPPER_GLOBAL_OPTIONS, CdkStepper, CdkStepperNext, CdkStepperPrevious, CdkStepperModule } from '@angular/cdk/stepper';\nimport { NgTemplateOutlet, CommonModule } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { Directive, Injectable, Optional, SkipSelf, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, forwardRef, Inject, ContentChild, QueryList, EventEmitter, inject, ViewChildren, ContentChildren, Output, NgModule } from '@angular/core';\nimport * as i1 from '@angular/material/core';\nimport { MatRipple, ErrorStateMatcher, MatCommonModule, MatRippleModule } from '@angular/material/core';\nimport { MatIcon, MatIconModule } from '@angular/material/icon';\nimport * as i2 from '@angular/cdk/a11y';\nimport { Subject, Subscription } from 'rxjs';\nimport * as i2$1 from '@angular/cdk/bidi';\nimport { switchMap, map, startWith, takeUntil, distinctUntilChanged } from 'rxjs/operators';\nimport { trigger, state, style, transition, group, animate, query, animateChild } from '@angular/animations';\nimport { Platform } from '@angular/cdk/platform';\nfunction MatStepHeader_Conditional_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0, 2);\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r0.iconOverrides[ctx_r0.state])(\"ngTemplateOutletContext\", ctx_r0._getIconContext());\n }\n}\nfunction MatStepHeader_Conditional_4_Case_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 7);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate(ctx_r0._getDefaultTextForState(ctx_r0.state));\n }\n}\nfunction MatStepHeader_Conditional_4_Case_1_Conditional_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 8);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext(3);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate(ctx_r0._intl.completedLabel);\n }\n}\nfunction MatStepHeader_Conditional_4_Case_1_Conditional_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 8);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext(3);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate(ctx_r0._intl.editableLabel);\n }\n}\nfunction MatStepHeader_Conditional_4_Case_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, MatStepHeader_Conditional_4_Case_1_Conditional_0_Template, 2, 1, \"span\", 8)(1, MatStepHeader_Conditional_4_Case_1_Conditional_1_Template, 2, 1, \"span\", 8);\n i0.ɵɵelementStart(2, \"mat-icon\", 7);\n i0.ɵɵtext(3);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext(2);\n i0.ɵɵconditional(ctx_r0.state === \"done\" ? 0 : ctx_r0.state === \"edit\" ? 1 : -1);\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate(ctx_r0._getDefaultTextForState(ctx_r0.state));\n }\n}\nfunction MatStepHeader_Conditional_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, MatStepHeader_Conditional_4_Case_0_Template, 2, 1, \"span\", 7)(1, MatStepHeader_Conditional_4_Case_1_Template, 4, 2, \"mat-icon\", 7);\n }\n if (rf & 2) {\n let tmp_1_0;\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵconditional((tmp_1_0 = ctx_r0.state) === \"number\" ? 0 : 1);\n }\n}\nfunction MatStepHeader_Conditional_6_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 4);\n i0.ɵɵelementContainer(1, 9);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngTemplateOutlet\", ctx.template);\n }\n}\nfunction MatStepHeader_Conditional_7_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 4);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate(ctx_r0.label);\n }\n}\nfunction MatStepHeader_Conditional_8_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 5);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate(ctx_r0._intl.optionalLabel);\n }\n}\nfunction MatStepHeader_Conditional_9_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 6);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate(ctx_r0.errorMessage);\n }\n}\nconst _c0 = [\"*\"];\nfunction MatStep_ng_template_0_ng_template_1_Template(rf, ctx) {}\nfunction MatStep_ng_template_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojection(0);\n i0.ɵɵtemplate(1, MatStep_ng_template_0_ng_template_1_Template, 0, 0, \"ng-template\", 0);\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"cdkPortalOutlet\", ctx_r0._portal);\n }\n}\nconst _c1 = (a0, a1) => ({\n step: a0,\n i: a1\n});\nconst _c2 = a0 => ({\n \"animationDuration\": a0\n});\nconst _c3 = (a0, a1) => ({\n \"value\": a0,\n \"params\": a1\n});\nfunction MatStepper_Conditional_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojection(0);\n }\n}\nfunction MatStepper_Case_1_For_3_Conditional_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 6);\n }\n}\nfunction MatStepper_Case_1_For_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0, 5);\n i0.ɵɵtemplate(1, MatStepper_Case_1_For_3_Conditional_1_Template, 1, 0, \"div\", 6);\n }\n if (rf & 2) {\n const step_r1 = ctx.$implicit;\n const ɵ$index_8_r2 = ctx.$index;\n const ɵ$count_8_r3 = ctx.$count;\n i0.ɵɵnextContext(2);\n const stepTemplate_r4 = i0.ɵɵreference(4);\n i0.ɵɵproperty(\"ngTemplateOutlet\", stepTemplate_r4)(\"ngTemplateOutletContext\", i0.ɵɵpureFunction2(3, _c1, step_r1, ɵ$index_8_r2));\n i0.ɵɵadvance();\n i0.ɵɵconditional(!(ɵ$index_8_r2 === ɵ$count_8_r3 - 1) ? 1 : -1);\n }\n}\nfunction MatStepper_Case_1_For_6_Template(rf, ctx) {\n if (rf & 1) {\n const _r5 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 7);\n i0.ɵɵlistener(\"@horizontalStepTransition.done\", function MatStepper_Case_1_For_6_Template_div_animation_horizontalStepTransition_done_0_listener($event) {\n i0.ɵɵrestoreView(_r5);\n const ctx_r5 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r5._animationDone.next($event));\n });\n i0.ɵɵelementContainer(1, 8);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const step_r7 = ctx.$implicit;\n const ɵ$index_16_r8 = ctx.$index;\n const ctx_r5 = i0.ɵɵnextContext(2);\n i0.ɵɵclassProp(\"mat-horizontal-stepper-content-inactive\", ctx_r5.selectedIndex !== ɵ$index_16_r8);\n i0.ɵɵproperty(\"@horizontalStepTransition\", i0.ɵɵpureFunction2(8, _c3, ctx_r5._getAnimationDirection(ɵ$index_16_r8), i0.ɵɵpureFunction1(6, _c2, ctx_r5._getAnimationDuration())))(\"id\", ctx_r5._getStepContentId(ɵ$index_16_r8));\n i0.ɵɵattribute(\"aria-labelledby\", ctx_r5._getStepLabelId(ɵ$index_16_r8));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngTemplateOutlet\", step_r7.content);\n }\n}\nfunction MatStepper_Case_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 1)(1, \"div\", 2);\n i0.ɵɵrepeaterCreate(2, MatStepper_Case_1_For_3_Template, 2, 6, null, null, i0.ɵɵrepeaterTrackByIdentity);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"div\", 3);\n i0.ɵɵrepeaterCreate(5, MatStepper_Case_1_For_6_Template, 2, 11, \"div\", 4, i0.ɵɵrepeaterTrackByIdentity);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const ctx_r5 = i0.ɵɵnextContext();\n i0.ɵɵadvance(2);\n i0.ɵɵrepeater(ctx_r5.steps);\n i0.ɵɵadvance(3);\n i0.ɵɵrepeater(ctx_r5.steps);\n }\n}\nfunction MatStepper_Case_2_For_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r9 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 9);\n i0.ɵɵelementContainer(1, 5);\n i0.ɵɵelementStart(2, \"div\", 10)(3, \"div\", 11);\n i0.ɵɵlistener(\"@verticalStepTransition.done\", function MatStepper_Case_2_For_1_Template_div_animation_verticalStepTransition_done_3_listener($event) {\n i0.ɵɵrestoreView(_r9);\n const ctx_r5 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r5._animationDone.next($event));\n });\n i0.ɵɵelementStart(4, \"div\", 12);\n i0.ɵɵelementContainer(5, 8);\n i0.ɵɵelementEnd()()()();\n }\n if (rf & 2) {\n const step_r10 = ctx.$implicit;\n const ɵ$index_22_r11 = ctx.$index;\n const ɵ$count_22_r12 = ctx.$count;\n const ctx_r5 = i0.ɵɵnextContext(2);\n const stepTemplate_r4 = i0.ɵɵreference(4);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngTemplateOutlet\", stepTemplate_r4)(\"ngTemplateOutletContext\", i0.ɵɵpureFunction2(10, _c1, step_r10, ɵ$index_22_r11));\n i0.ɵɵadvance();\n i0.ɵɵclassProp(\"mat-stepper-vertical-line\", !(ɵ$index_22_r11 === ɵ$count_22_r12 - 1));\n i0.ɵɵadvance();\n i0.ɵɵclassProp(\"mat-vertical-stepper-content-inactive\", ctx_r5.selectedIndex !== ɵ$index_22_r11);\n i0.ɵɵproperty(\"@verticalStepTransition\", i0.ɵɵpureFunction2(15, _c3, ctx_r5._getAnimationDirection(ɵ$index_22_r11), i0.ɵɵpureFunction1(13, _c2, ctx_r5._getAnimationDuration())))(\"id\", ctx_r5._getStepContentId(ɵ$index_22_r11));\n i0.ɵɵattribute(\"aria-labelledby\", ctx_r5._getStepLabelId(ɵ$index_22_r11));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngTemplateOutlet\", step_r10.content);\n }\n}\nfunction MatStepper_Case_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵrepeaterCreate(0, MatStepper_Case_2_For_1_Template, 6, 18, \"div\", 9, i0.ɵɵrepeaterTrackByIdentity);\n }\n if (rf & 2) {\n const ctx_r5 = i0.ɵɵnextContext();\n i0.ɵɵrepeater(ctx_r5.steps);\n }\n}\nfunction MatStepper_ng_template_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r13 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"mat-step-header\", 13);\n i0.ɵɵlistener(\"click\", function MatStepper_ng_template_3_Template_mat_step_header_click_0_listener() {\n const step_r14 = i0.ɵɵrestoreView(_r13).step;\n return i0.ɵɵresetView(step_r14.select());\n })(\"keydown\", function MatStepper_ng_template_3_Template_mat_step_header_keydown_0_listener($event) {\n i0.ɵɵrestoreView(_r13);\n const ctx_r5 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r5._onKeydown($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const step_r14 = ctx.step;\n const i_r15 = ctx.i;\n const ctx_r5 = i0.ɵɵnextContext();\n i0.ɵɵclassProp(\"mat-horizontal-stepper-header\", ctx_r5.orientation === \"horizontal\")(\"mat-vertical-stepper-header\", ctx_r5.orientation === \"vertical\");\n i0.ɵɵproperty(\"tabIndex\", ctx_r5._getFocusIndex() === i_r15 ? 0 : -1)(\"id\", ctx_r5._getStepLabelId(i_r15))(\"index\", i_r15)(\"state\", ctx_r5._getIndicatorType(i_r15, step_r14.state))(\"label\", step_r14.stepLabel || step_r14.label)(\"selected\", ctx_r5.selectedIndex === i_r15)(\"active\", ctx_r5._stepIsNavigable(i_r15, step_r14))(\"optional\", step_r14.optional)(\"errorMessage\", step_r14.errorMessage)(\"iconOverrides\", ctx_r5._iconOverrides)(\"disableRipple\", ctx_r5.disableRipple || !ctx_r5._stepIsNavigable(i_r15, step_r14))(\"color\", step_r14.color || ctx_r5.color);\n i0.ɵɵattribute(\"aria-posinset\", i_r15 + 1)(\"aria-setsize\", ctx_r5.steps.length)(\"aria-controls\", ctx_r5._getStepContentId(i_r15))(\"aria-selected\", ctx_r5.selectedIndex == i_r15)(\"aria-label\", step_r14.ariaLabel || null)(\"aria-labelledby\", !step_r14.ariaLabel && step_r14.ariaLabelledby ? step_r14.ariaLabelledby : null)(\"aria-disabled\", ctx_r5._stepIsNavigable(i_r15, step_r14) ? null : true);\n }\n}\nlet MatStepLabel = /*#__PURE__*/(() => {\n class MatStepLabel extends CdkStepLabel {\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵMatStepLabel_BaseFactory;\n return function MatStepLabel_Factory(ɵt) {\n return (ɵMatStepLabel_BaseFactory || (ɵMatStepLabel_BaseFactory = i0.ɵɵgetInheritedFactory(MatStepLabel)))(ɵt || MatStepLabel);\n };\n })();\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatStepLabel,\n selectors: [[\"\", \"matStepLabel\", \"\"]],\n standalone: true,\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n }\n return MatStepLabel;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Stepper data that is required for internationalization. */\nlet MatStepperIntl = /*#__PURE__*/(() => {\n class MatStepperIntl {\n constructor() {\n /**\n * Stream that emits whenever the labels here are changed. Use this to notify\n * components if the labels have changed after initialization.\n */\n this.changes = new Subject();\n /** Label that is rendered below optional steps. */\n this.optionalLabel = 'Optional';\n /** Label that is used to indicate step as completed to screen readers. */\n this.completedLabel = 'Completed';\n /** Label that is used to indicate step as editable to screen readers. */\n this.editableLabel = 'Editable';\n }\n static {\n this.ɵfac = function MatStepperIntl_Factory(ɵt) {\n return new (ɵt || MatStepperIntl)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: MatStepperIntl,\n factory: MatStepperIntl.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return MatStepperIntl;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/** @docs-private */\nfunction MAT_STEPPER_INTL_PROVIDER_FACTORY(parentIntl) {\n return parentIntl || new MatStepperIntl();\n}\n/** @docs-private */\nconst MAT_STEPPER_INTL_PROVIDER = {\n provide: MatStepperIntl,\n deps: [[/*#__PURE__*/new Optional(), /*#__PURE__*/new SkipSelf(), MatStepperIntl]],\n useFactory: MAT_STEPPER_INTL_PROVIDER_FACTORY\n};\nlet MatStepHeader = /*#__PURE__*/(() => {\n class MatStepHeader extends CdkStepHeader {\n constructor(_intl, _focusMonitor, _elementRef, changeDetectorRef) {\n super(_elementRef);\n this._intl = _intl;\n this._focusMonitor = _focusMonitor;\n this._intlSubscription = _intl.changes.subscribe(() => changeDetectorRef.markForCheck());\n }\n ngAfterViewInit() {\n this._focusMonitor.monitor(this._elementRef, true);\n }\n ngOnDestroy() {\n this._intlSubscription.unsubscribe();\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n /** Focuses the step header. */\n focus(origin, options) {\n if (origin) {\n this._focusMonitor.focusVia(this._elementRef, origin, options);\n } else {\n this._elementRef.nativeElement.focus(options);\n }\n }\n /** Returns string label of given step if it is a text label. */\n _stringLabel() {\n return this.label instanceof MatStepLabel ? null : this.label;\n }\n /** Returns MatStepLabel if the label of given step is a template label. */\n _templateLabel() {\n return this.label instanceof MatStepLabel ? this.label : null;\n }\n /** Returns the host HTML element. */\n _getHostElement() {\n return this._elementRef.nativeElement;\n }\n /** Template context variables that are exposed to the `matStepperIcon` instances. */\n _getIconContext() {\n return {\n index: this.index,\n active: this.active,\n optional: this.optional\n };\n }\n _getDefaultTextForState(state) {\n if (state == 'number') {\n return `${this.index + 1}`;\n }\n if (state == 'edit') {\n return 'create';\n }\n if (state == 'error') {\n return 'warning';\n }\n return state;\n }\n static {\n this.ɵfac = function MatStepHeader_Factory(ɵt) {\n return new (ɵt || MatStepHeader)(i0.ɵɵdirectiveInject(MatStepperIntl), i0.ɵɵdirectiveInject(i2.FocusMonitor), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatStepHeader,\n selectors: [[\"mat-step-header\"]],\n hostAttrs: [\"role\", \"tab\", 1, \"mat-step-header\"],\n hostVars: 2,\n hostBindings: function MatStepHeader_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassMap(\"mat-\" + (ctx.color || \"primary\"));\n }\n },\n inputs: {\n state: \"state\",\n label: \"label\",\n errorMessage: \"errorMessage\",\n iconOverrides: \"iconOverrides\",\n index: \"index\",\n selected: \"selected\",\n active: \"active\",\n optional: \"optional\",\n disableRipple: \"disableRipple\",\n color: \"color\"\n },\n standalone: true,\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature],\n decls: 10,\n vars: 17,\n consts: [[\"matRipple\", \"\", 1, \"mat-step-header-ripple\", \"mat-focus-indicator\", 3, \"matRippleTrigger\", \"matRippleDisabled\"], [1, \"mat-step-icon-content\"], [3, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"], [1, \"mat-step-label\"], [1, \"mat-step-text-label\"], [1, \"mat-step-optional\"], [1, \"mat-step-sub-label-error\"], [\"aria-hidden\", \"true\"], [1, \"cdk-visually-hidden\"], [3, \"ngTemplateOutlet\"]],\n template: function MatStepHeader_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 0);\n i0.ɵɵelementStart(1, \"div\")(2, \"div\", 1);\n i0.ɵɵtemplate(3, MatStepHeader_Conditional_3_Template, 1, 2, \"ng-container\", 2)(4, MatStepHeader_Conditional_4_Template, 2, 1);\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(5, \"div\", 3);\n i0.ɵɵtemplate(6, MatStepHeader_Conditional_6_Template, 2, 1, \"div\", 4)(7, MatStepHeader_Conditional_7_Template, 2, 1, \"div\", 4)(8, MatStepHeader_Conditional_8_Template, 2, 1, \"div\", 5)(9, MatStepHeader_Conditional_9_Template, 2, 1, \"div\", 6);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n let tmp_8_0;\n i0.ɵɵproperty(\"matRippleTrigger\", ctx._getHostElement())(\"matRippleDisabled\", ctx.disableRipple);\n i0.ɵɵadvance();\n i0.ɵɵclassMapInterpolate1(\"mat-step-icon-state-\", ctx.state, \" mat-step-icon\");\n i0.ɵɵclassProp(\"mat-step-icon-selected\", ctx.selected);\n i0.ɵɵadvance(2);\n i0.ɵɵconditional(ctx.iconOverrides && ctx.iconOverrides[ctx.state] ? 3 : 4);\n i0.ɵɵadvance(2);\n i0.ɵɵclassProp(\"mat-step-label-active\", ctx.active)(\"mat-step-label-selected\", ctx.selected)(\"mat-step-label-error\", ctx.state == \"error\");\n i0.ɵɵadvance();\n i0.ɵɵconditional((tmp_8_0 = ctx._templateLabel()) ? 6 : ctx._stringLabel() ? 7 : -1, tmp_8_0);\n i0.ɵɵadvance(2);\n i0.ɵɵconditional(ctx.optional && ctx.state != \"error\" ? 8 : -1);\n i0.ɵɵadvance();\n i0.ɵɵconditional(ctx.state === \"error\" ? 9 : -1);\n }\n },\n dependencies: [MatRipple, NgTemplateOutlet, MatIcon],\n styles: [\".mat-step-header{overflow:hidden;outline:none;cursor:pointer;position:relative;box-sizing:content-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-step-header:focus .mat-focus-indicator::before{content:\\\"\\\"}.mat-step-header:hover[aria-disabled=true]{cursor:default}.mat-step-header:hover:not([aria-disabled]),.mat-step-header:hover[aria-disabled=false]{background-color:var(--mat-stepper-header-hover-state-layer-color);border-radius:var(--mat-stepper-header-hover-state-layer-shape)}.mat-step-header.cdk-keyboard-focused,.mat-step-header.cdk-program-focused{background-color:var(--mat-stepper-header-focus-state-layer-color);border-radius:var(--mat-stepper-header-focus-state-layer-shape)}@media(hover: none){.mat-step-header:hover{background:none}}.cdk-high-contrast-active .mat-step-header{outline:solid 1px}.cdk-high-contrast-active .mat-step-header[aria-selected=true] .mat-step-label{text-decoration:underline}.cdk-high-contrast-active .mat-step-header[aria-disabled=true]{outline-color:GrayText}.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-label,.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-icon,.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-optional{color:GrayText}.mat-step-optional{font-size:12px;color:var(--mat-stepper-header-optional-label-text-color)}.mat-step-sub-label-error{font-size:12px;font-weight:normal}.mat-step-icon{border-radius:50%;height:24px;width:24px;flex-shrink:0;position:relative;color:var(--mat-stepper-header-icon-foreground-color);background-color:var(--mat-stepper-header-icon-background-color)}.mat-step-icon-content{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex}.mat-step-icon .mat-icon{font-size:16px;height:16px;width:16px}.mat-step-icon-state-error{background-color:var(--mat-stepper-header-error-state-icon-background-color);color:var(--mat-stepper-header-error-state-icon-foreground-color)}.mat-step-icon-state-error .mat-icon{font-size:24px;height:24px;width:24px}.mat-step-label{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:50px;vertical-align:middle;font-family:var(--mat-stepper-header-label-text-font);font-size:var(--mat-stepper-header-label-text-size);font-weight:var(--mat-stepper-header-label-text-weight);color:var(--mat-stepper-header-label-text-color)}.mat-step-label.mat-step-label-active{color:var(--mat-stepper-header-selected-state-label-text-color)}.mat-step-label.mat-step-label-error{color:var(--mat-stepper-header-error-state-label-text-color);font-size:var(--mat-stepper-header-error-state-label-text-size)}.mat-step-label.mat-step-label-selected{font-size:var(--mat-stepper-header-selected-state-label-text-size);font-weight:var(--mat-stepper-header-selected-state-label-text-weight)}.mat-step-text-label{text-overflow:ellipsis;overflow:hidden}.mat-step-header .mat-step-header-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-step-icon-selected{background-color:var(--mat-stepper-header-selected-state-icon-background-color);color:var(--mat-stepper-header-selected-state-icon-foreground-color)}.mat-step-icon-state-done{background-color:var(--mat-stepper-header-done-state-icon-background-color);color:var(--mat-stepper-header-done-state-icon-foreground-color)}.mat-step-icon-state-edit{background-color:var(--mat-stepper-header-edit-state-icon-background-color);color:var(--mat-stepper-header-edit-state-icon-foreground-color)}\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return MatStepHeader;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst DEFAULT_HORIZONTAL_ANIMATION_DURATION = '500ms';\nconst DEFAULT_VERTICAL_ANIMATION_DURATION = '225ms';\n/**\n * Animations used by the Material steppers.\n * @docs-private\n */\nconst matStepperAnimations = {\n /** Animation that transitions the step along the X axis in a horizontal stepper. */\n horizontalStepTransition: /*#__PURE__*/trigger('horizontalStepTransition', [/*#__PURE__*/state('previous', /*#__PURE__*/style({\n transform: 'translate3d(-100%, 0, 0)',\n visibility: 'hidden'\n })),\n /*#__PURE__*/\n // Transition to `inherit`, rather than `visible`,\n // because visibility on a child element the one from the parent,\n // making this element focusable inside of a `hidden` element.\n state('current', /*#__PURE__*/style({\n transform: 'none',\n visibility: 'inherit'\n })), /*#__PURE__*/state('next', /*#__PURE__*/style({\n transform: 'translate3d(100%, 0, 0)',\n visibility: 'hidden'\n })), /*#__PURE__*/transition('* => *', /*#__PURE__*/group([/*#__PURE__*/animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)'), /*#__PURE__*/query('@*', /*#__PURE__*/animateChild(), {\n optional: true\n })]), {\n params: {\n 'animationDuration': DEFAULT_HORIZONTAL_ANIMATION_DURATION\n }\n })]),\n /** Animation that transitions the step along the Y axis in a vertical stepper. */\n verticalStepTransition: /*#__PURE__*/trigger('verticalStepTransition', [/*#__PURE__*/state('previous', /*#__PURE__*/style({\n height: '0px',\n visibility: 'hidden'\n })), /*#__PURE__*/state('next', /*#__PURE__*/style({\n height: '0px',\n visibility: 'hidden'\n })),\n /*#__PURE__*/\n // Transition to `inherit`, rather than `visible`,\n // because visibility on a child element the one from the parent,\n // making this element focusable inside of a `hidden` element.\n state('current', /*#__PURE__*/style({\n height: '*',\n visibility: 'inherit'\n })), /*#__PURE__*/transition('* <=> current', /*#__PURE__*/group([/*#__PURE__*/animate('{{animationDuration}} cubic-bezier(0.4, 0.0, 0.2, 1)'), /*#__PURE__*/query('@*', /*#__PURE__*/animateChild(), {\n optional: true\n })]), {\n params: {\n 'animationDuration': DEFAULT_VERTICAL_ANIMATION_DURATION\n }\n })])\n};\n\n/**\n * Template to be used to override the icons inside the step header.\n */\nlet MatStepperIcon = /*#__PURE__*/(() => {\n class MatStepperIcon {\n constructor(templateRef) {\n this.templateRef = templateRef;\n }\n static {\n this.ɵfac = function MatStepperIcon_Factory(ɵt) {\n return new (ɵt || MatStepperIcon)(i0.ɵɵdirectiveInject(i0.TemplateRef));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatStepperIcon,\n selectors: [[\"ng-template\", \"matStepperIcon\", \"\"]],\n inputs: {\n name: [0, \"matStepperIcon\", \"name\"]\n },\n standalone: true\n });\n }\n }\n return MatStepperIcon;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Content for a `mat-step` that will be rendered lazily.\n */\nlet MatStepContent = /*#__PURE__*/(() => {\n class MatStepContent {\n constructor(_template) {\n this._template = _template;\n }\n static {\n this.ɵfac = function MatStepContent_Factory(ɵt) {\n return new (ɵt || MatStepContent)(i0.ɵɵdirectiveInject(i0.TemplateRef));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatStepContent,\n selectors: [[\"ng-template\", \"matStepContent\", \"\"]],\n standalone: true\n });\n }\n }\n return MatStepContent;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatStep = /*#__PURE__*/(() => {\n class MatStep extends CdkStep {\n constructor(stepper, _errorStateMatcher, _viewContainerRef, stepperOptions) {\n super(stepper, stepperOptions);\n this._errorStateMatcher = _errorStateMatcher;\n this._viewContainerRef = _viewContainerRef;\n this._isSelected = Subscription.EMPTY;\n /** Content for step label given by ``. */\n // We need an initializer here to avoid a TS error.\n this.stepLabel = undefined;\n }\n ngAfterContentInit() {\n this._isSelected = this._stepper.steps.changes.pipe(switchMap(() => {\n return this._stepper.selectionChange.pipe(map(event => event.selectedStep === this), startWith(this._stepper.selected === this));\n })).subscribe(isSelected => {\n if (isSelected && this._lazyContent && !this._portal) {\n this._portal = new TemplatePortal(this._lazyContent._template, this._viewContainerRef);\n }\n });\n }\n ngOnDestroy() {\n this._isSelected.unsubscribe();\n }\n /** Custom error state matcher that additionally checks for validity of interacted form. */\n isErrorState(control, form) {\n const originalErrorState = this._errorStateMatcher.isErrorState(control, form);\n // Custom error state checks for the validity of form that is not submitted or touched\n // since user can trigger a form change by calling for another step without directly\n // interacting with the current form.\n const customErrorState = !!(control && control.invalid && this.interacted);\n return originalErrorState || customErrorState;\n }\n static {\n this.ɵfac = function MatStep_Factory(ɵt) {\n return new (ɵt || MatStep)(i0.ɵɵdirectiveInject(forwardRef(() => MatStepper)), i0.ɵɵdirectiveInject(i1.ErrorStateMatcher, 4), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(STEPPER_GLOBAL_OPTIONS, 8));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatStep,\n selectors: [[\"mat-step\"]],\n contentQueries: function MatStep_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, MatStepLabel, 5);\n i0.ɵɵcontentQuery(dirIndex, MatStepContent, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.stepLabel = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._lazyContent = _t.first);\n }\n },\n hostAttrs: [\"hidden\", \"\"],\n inputs: {\n color: \"color\"\n },\n exportAs: [\"matStep\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: ErrorStateMatcher,\n useExisting: MatStep\n }, {\n provide: CdkStep,\n useExisting: MatStep\n }]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c0,\n decls: 1,\n vars: 0,\n consts: [[3, \"cdkPortalOutlet\"]],\n template: function MatStep_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵtemplate(0, MatStep_ng_template_0_Template, 2, 1, \"ng-template\");\n }\n },\n dependencies: [CdkPortalOutlet],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return MatStep;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatStepper = /*#__PURE__*/(() => {\n class MatStepper extends CdkStepper {\n /** Duration for the animation. Will be normalized to milliseconds if no units are set. */\n get animationDuration() {\n return this._animationDuration;\n }\n set animationDuration(value) {\n this._animationDuration = /^\\d+$/.test(value) ? value + 'ms' : value;\n }\n constructor(dir, changeDetectorRef, elementRef) {\n super(dir, changeDetectorRef, elementRef);\n /** The list of step headers of the steps in the stepper. */\n // We need an initializer here to avoid a TS error.\n this._stepHeader = undefined;\n /** Full list of steps inside the stepper, including inside nested steppers. */\n // We need an initializer here to avoid a TS error.\n this._steps = undefined;\n /** Steps that belong to the current stepper, excluding ones from nested steppers. */\n this.steps = new QueryList();\n /** Event emitted when the current step is done transitioning in. */\n this.animationDone = new EventEmitter();\n /**\n * Whether the label should display in bottom or end position.\n * Only applies in the `horizontal` orientation.\n */\n this.labelPosition = 'end';\n /**\n * Position of the stepper's header.\n * Only applies in the `horizontal` orientation.\n */\n this.headerPosition = 'top';\n /** Consumer-specified template-refs to be used to override the header icons. */\n this._iconOverrides = {};\n /** Stream of animation `done` events when the body expands/collapses. */\n this._animationDone = new Subject();\n this._animationDuration = '';\n /** Whether the stepper is rendering on the server. */\n this._isServer = !inject(Platform).isBrowser;\n const nodeName = elementRef.nativeElement.nodeName.toLowerCase();\n this.orientation = nodeName === 'mat-vertical-stepper' ? 'vertical' : 'horizontal';\n }\n ngAfterContentInit() {\n super.ngAfterContentInit();\n this._icons.forEach(({\n name,\n templateRef\n }) => this._iconOverrides[name] = templateRef);\n // Mark the component for change detection whenever the content children query changes\n this.steps.changes.pipe(takeUntil(this._destroyed)).subscribe(() => {\n this._stateChanged();\n });\n this._animationDone.pipe(\n // This needs a `distinctUntilChanged` in order to avoid emitting the same event twice due\n // to a bug in animations where the `.done` callback gets invoked twice on some browsers.\n // See https://github.com/angular/angular/issues/24084\n distinctUntilChanged((x, y) => x.fromState === y.fromState && x.toState === y.toState), takeUntil(this._destroyed)).subscribe(event => {\n if (event.toState === 'current') {\n this.animationDone.emit();\n }\n });\n }\n _stepIsNavigable(index, step) {\n return step.completed || this.selectedIndex === index || !this.linear;\n }\n _getAnimationDuration() {\n if (this.animationDuration) {\n return this.animationDuration;\n }\n return this.orientation === 'horizontal' ? DEFAULT_HORIZONTAL_ANIMATION_DURATION : DEFAULT_VERTICAL_ANIMATION_DURATION;\n }\n static {\n this.ɵfac = function MatStepper_Factory(ɵt) {\n return new (ɵt || MatStepper)(i0.ɵɵdirectiveInject(i2$1.Directionality, 8), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatStepper,\n selectors: [[\"mat-stepper\"], [\"mat-vertical-stepper\"], [\"mat-horizontal-stepper\"], [\"\", \"matStepper\", \"\"]],\n contentQueries: function MatStepper_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, MatStep, 5);\n i0.ɵɵcontentQuery(dirIndex, MatStepperIcon, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._steps = _t);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._icons = _t);\n }\n },\n viewQuery: function MatStepper_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(MatStepHeader, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._stepHeader = _t);\n }\n },\n hostAttrs: [\"role\", \"tablist\"],\n hostVars: 11,\n hostBindings: function MatStepper_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"aria-orientation\", ctx.orientation);\n i0.ɵɵclassProp(\"mat-stepper-horizontal\", ctx.orientation === \"horizontal\")(\"mat-stepper-vertical\", ctx.orientation === \"vertical\")(\"mat-stepper-label-position-end\", ctx.orientation === \"horizontal\" && ctx.labelPosition == \"end\")(\"mat-stepper-label-position-bottom\", ctx.orientation === \"horizontal\" && ctx.labelPosition == \"bottom\")(\"mat-stepper-header-position-bottom\", ctx.headerPosition === \"bottom\");\n }\n },\n inputs: {\n disableRipple: \"disableRipple\",\n color: \"color\",\n labelPosition: \"labelPosition\",\n headerPosition: \"headerPosition\",\n animationDuration: \"animationDuration\"\n },\n outputs: {\n animationDone: \"animationDone\"\n },\n exportAs: [\"matStepper\", \"matVerticalStepper\", \"matHorizontalStepper\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: CdkStepper,\n useExisting: MatStepper\n }]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c0,\n decls: 5,\n vars: 2,\n consts: [[\"stepTemplate\", \"\"], [1, \"mat-horizontal-stepper-wrapper\"], [1, \"mat-horizontal-stepper-header-container\"], [1, \"mat-horizontal-content-container\"], [\"role\", \"tabpanel\", 1, \"mat-horizontal-stepper-content\", 3, \"id\", \"mat-horizontal-stepper-content-inactive\"], [3, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"], [1, \"mat-stepper-horizontal-line\"], [\"role\", \"tabpanel\", 1, \"mat-horizontal-stepper-content\", 3, \"id\"], [3, \"ngTemplateOutlet\"], [1, \"mat-step\"], [1, \"mat-vertical-content-container\"], [\"role\", \"tabpanel\", 1, \"mat-vertical-stepper-content\", 3, \"id\"], [1, \"mat-vertical-content\"], [3, \"click\", \"keydown\", \"tabIndex\", \"id\", \"index\", \"state\", \"label\", \"selected\", \"active\", \"optional\", \"errorMessage\", \"iconOverrides\", \"disableRipple\", \"color\"]],\n template: function MatStepper_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵtemplate(0, MatStepper_Conditional_0_Template, 1, 0)(1, MatStepper_Case_1_Template, 7, 0, \"div\", 1)(2, MatStepper_Case_2_Template, 2, 0)(3, MatStepper_ng_template_3_Template, 1, 23, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor);\n }\n if (rf & 2) {\n let tmp_2_0;\n i0.ɵɵconditional(ctx._isServer ? 0 : -1);\n i0.ɵɵadvance();\n i0.ɵɵconditional((tmp_2_0 = ctx.orientation) === \"horizontal\" ? 1 : tmp_2_0 === \"vertical\" ? 2 : -1);\n }\n },\n dependencies: [NgTemplateOutlet, MatStepHeader],\n styles: [\".mat-stepper-vertical,.mat-stepper-horizontal{display:block;font-family:var(--mat-stepper-container-text-font);background:var(--mat-stepper-container-color)}.mat-horizontal-stepper-header-container{white-space:nowrap;display:flex;align-items:center}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header-container{align-items:flex-start}.mat-stepper-header-position-bottom .mat-horizontal-stepper-header-container{order:1}.mat-stepper-horizontal-line{border-top-width:1px;border-top-style:solid;flex:auto;height:0;margin:0 -16px;min-width:32px;border-top-color:var(--mat-stepper-line-color)}.mat-stepper-label-position-bottom .mat-stepper-horizontal-line{margin:0;min-width:0;position:relative;top:calc(calc((var(--mat-stepper-header-height) - 24px) / 2) + 12px)}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{border-top-width:1px;border-top-style:solid;content:\\\"\\\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px)}.mat-horizontal-stepper-header{display:flex;height:72px;overflow:hidden;align-items:center;padding:0 24px;height:var(--mat-stepper-header-height)}.mat-horizontal-stepper-header .mat-step-icon{margin-right:8px;flex:none}[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:8px}.mat-horizontal-stepper-header::before,.mat-horizontal-stepper-header::after{border-top-color:var(--mat-stepper-line-color)}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{padding:calc((var(--mat-stepper-header-height) - 24px) / 2) 24px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header::after{top:calc(calc((var(--mat-stepper-header-height) - 24px) / 2) + 12px)}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{box-sizing:border-box;flex-direction:column;height:auto}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{right:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before{left:0}[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:last-child::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:first-child::after{display:none}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-label{padding:16px 0 0 0;text-align:center;width:100%}.mat-vertical-stepper-header{display:flex;align-items:center;height:24px;padding:calc((var(--mat-stepper-header-height) - 24px) / 2) 24px}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}[dir=rtl] .mat-vertical-stepper-header .mat-step-icon{margin-right:0;margin-left:12px}.mat-horizontal-stepper-wrapper{display:flex;flex-direction:column}.mat-horizontal-stepper-content{outline:0}.mat-horizontal-stepper-content.mat-horizontal-stepper-content-inactive{height:0;overflow:hidden}.mat-horizontal-stepper-content:not(.mat-horizontal-stepper-content-inactive){visibility:inherit !important}.mat-horizontal-content-container{overflow:hidden;padding:0 24px 24px 24px}.cdk-high-contrast-active .mat-horizontal-content-container{outline:solid 1px}.mat-stepper-header-position-bottom .mat-horizontal-content-container{padding:24px 24px 0 24px}.mat-vertical-content-container{margin-left:36px;border:0;position:relative}.cdk-high-contrast-active .mat-vertical-content-container{outline:solid 1px}[dir=rtl] .mat-vertical-content-container{margin-left:0;margin-right:36px}.mat-stepper-vertical-line::before{content:\\\"\\\";position:absolute;left:0;border-left-width:1px;border-left-style:solid;border-left-color:var(--mat-stepper-line-color);top:calc(8px - calc((var(--mat-stepper-header-height) - 24px) / 2));bottom:calc(8px - calc((var(--mat-stepper-header-height) - 24px) / 2))}[dir=rtl] .mat-stepper-vertical-line::before{left:auto;right:0}.mat-vertical-stepper-content{overflow:hidden;outline:0}.mat-vertical-stepper-content:not(.mat-vertical-stepper-content-inactive){visibility:inherit !important}.mat-vertical-content{padding:0 24px 24px 24px}.mat-step:last-child .mat-vertical-content-container{border:none}\"],\n encapsulation: 2,\n data: {\n animation: [matStepperAnimations.horizontalStepTransition, matStepperAnimations.verticalStepTransition]\n },\n changeDetection: 0\n });\n }\n }\n return MatStepper;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Button that moves to the next step in a stepper workflow. */\nlet MatStepperNext = /*#__PURE__*/(() => {\n class MatStepperNext extends CdkStepperNext {\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵMatStepperNext_BaseFactory;\n return function MatStepperNext_Factory(ɵt) {\n return (ɵMatStepperNext_BaseFactory || (ɵMatStepperNext_BaseFactory = i0.ɵɵgetInheritedFactory(MatStepperNext)))(ɵt || MatStepperNext);\n };\n })();\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatStepperNext,\n selectors: [[\"button\", \"matStepperNext\", \"\"]],\n hostAttrs: [1, \"mat-stepper-next\"],\n hostVars: 1,\n hostBindings: function MatStepperNext_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵhostProperty(\"type\", ctx.type);\n }\n },\n standalone: true,\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n }\n return MatStepperNext;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/** Button that moves to the previous step in a stepper workflow. */\nlet MatStepperPrevious = /*#__PURE__*/(() => {\n class MatStepperPrevious extends CdkStepperPrevious {\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵMatStepperPrevious_BaseFactory;\n return function MatStepperPrevious_Factory(ɵt) {\n return (ɵMatStepperPrevious_BaseFactory || (ɵMatStepperPrevious_BaseFactory = i0.ɵɵgetInheritedFactory(MatStepperPrevious)))(ɵt || MatStepperPrevious);\n };\n })();\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatStepperPrevious,\n selectors: [[\"button\", \"matStepperPrevious\", \"\"]],\n hostAttrs: [1, \"mat-stepper-previous\"],\n hostVars: 1,\n hostBindings: function MatStepperPrevious_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵhostProperty(\"type\", ctx.type);\n }\n },\n standalone: true,\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n }\n return MatStepperPrevious;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatStepperModule = /*#__PURE__*/(() => {\n class MatStepperModule {\n static {\n this.ɵfac = function MatStepperModule_Factory(ɵt) {\n return new (ɵt || MatStepperModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: MatStepperModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [MAT_STEPPER_INTL_PROVIDER, ErrorStateMatcher],\n imports: [MatCommonModule, CommonModule, PortalModule, CdkStepperModule, MatIconModule, MatRippleModule, MatStepper, MatStepHeader, MatCommonModule]\n });\n }\n }\n return MatStepperModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_STEPPER_INTL_PROVIDER, MAT_STEPPER_INTL_PROVIDER_FACTORY, MatStep, MatStepContent, MatStepHeader, MatStepLabel, MatStepper, MatStepperIcon, MatStepperIntl, MatStepperModule, MatStepperNext, MatStepperPrevious, matStepperAnimations };\n","import * as i0 from '@angular/core';\nimport { InjectionToken, EventEmitter, inject, Injectable, ElementRef, Renderer2, makeEnvironmentProviders, Directive, Input, Output, HostListener, Pipe } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';\nconst NGX_MASK_CONFIG = new InjectionToken('ngx-mask config');\nconst NEW_CONFIG = new InjectionToken('new ngx-mask config');\nconst INITIAL_CONFIG = new InjectionToken('initial ngx-mask config');\nconst initialConfig = {\n suffix: '',\n prefix: '',\n thousandSeparator: ' ',\n decimalMarker: ['.', ','],\n clearIfNotMatch: false,\n showTemplate: false,\n showMaskTyped: false,\n placeHolderCharacter: '_',\n dropSpecialCharacters: true,\n hiddenInput: undefined,\n shownMaskExpression: '',\n separatorLimit: '',\n allowNegativeNumbers: false,\n validation: true,\n specialCharacters: ['-', '/', '(', ')', '.', ':', ' ', '+', ',', '@', '[', ']', '\"', \"'\"],\n leadZeroDateTime: false,\n apm: false,\n leadZero: false,\n keepCharacterPositions: false,\n triggerOnMaskChange: false,\n inputTransformFn: value => value,\n outputTransformFn: value => value,\n maskFilled: new EventEmitter(),\n patterns: {\n '0': {\n pattern: new RegExp('\\\\d')\n },\n '9': {\n pattern: new RegExp('\\\\d'),\n optional: true\n },\n X: {\n pattern: new RegExp('\\\\d'),\n symbol: '*'\n },\n A: {\n pattern: new RegExp('[a-zA-Z0-9]')\n },\n S: {\n pattern: new RegExp('[a-zA-Z]')\n },\n U: {\n pattern: new RegExp('[A-Z]')\n },\n L: {\n pattern: new RegExp('[a-z]')\n },\n d: {\n pattern: new RegExp('\\\\d')\n },\n m: {\n pattern: new RegExp('\\\\d')\n },\n M: {\n pattern: new RegExp('\\\\d')\n },\n H: {\n pattern: new RegExp('\\\\d')\n },\n h: {\n pattern: new RegExp('\\\\d')\n },\n s: {\n pattern: new RegExp('\\\\d')\n }\n }\n};\nconst timeMasks = [\"Hh:m0:s0\" /* MaskExpression.HOURS_MINUTES_SECONDS */, \"Hh:m0\" /* MaskExpression.HOURS_MINUTES */, \"m0:s0\" /* MaskExpression.MINUTES_SECONDS */];\nconst withoutValidation = [\"percent\" /* MaskExpression.PERCENT */, \"Hh\" /* MaskExpression.HOURS_HOUR */, \"s0\" /* MaskExpression.SECONDS */, \"m0\" /* MaskExpression.MINUTES */, \"separator\" /* MaskExpression.SEPARATOR */, \"d0/M0/0000\" /* MaskExpression.DAYS_MONTHS_YEARS */, \"d0/M0\" /* MaskExpression.DAYS_MONTHS */, \"d0\" /* MaskExpression.DAYS */, \"M0\" /* MaskExpression.MONTHS */];\nlet NgxMaskApplierService = /*#__PURE__*/(() => {\n class NgxMaskApplierService {\n constructor() {\n this._config = inject(NGX_MASK_CONFIG);\n this.dropSpecialCharacters = this._config.dropSpecialCharacters;\n this.hiddenInput = this._config.hiddenInput;\n this.clearIfNotMatch = this._config.clearIfNotMatch;\n this.specialCharacters = this._config.specialCharacters;\n this.patterns = this._config.patterns;\n this.prefix = this._config.prefix;\n this.suffix = this._config.suffix;\n this.thousandSeparator = this._config.thousandSeparator;\n this.decimalMarker = this._config.decimalMarker;\n this.showMaskTyped = this._config.showMaskTyped;\n this.placeHolderCharacter = this._config.placeHolderCharacter;\n this.validation = this._config.validation;\n this.separatorLimit = this._config.separatorLimit;\n this.allowNegativeNumbers = this._config.allowNegativeNumbers;\n this.leadZeroDateTime = this._config.leadZeroDateTime;\n this.leadZero = this._config.leadZero;\n this.apm = this._config.apm;\n this.inputTransformFn = this._config.inputTransformFn;\n this.outputTransformFn = this._config.outputTransformFn;\n this.keepCharacterPositions = this._config.keepCharacterPositions;\n this._shift = new Set();\n this.plusOnePosition = false;\n this.maskExpression = '';\n this.actualValue = '';\n this.showKeepCharacterExp = '';\n this.shownMaskExpression = '';\n this.deletedSpecialCharacter = false;\n this._formatWithSeparators = (str, thousandSeparatorChar, decimalChars, precision) => {\n let x = [];\n let decimalChar = '';\n if (Array.isArray(decimalChars)) {\n const regExp = new RegExp(decimalChars.map(v => '[\\\\^$.|?*+()'.indexOf(v) >= 0 ? `\\\\${v}` : v).join('|'));\n x = str.split(regExp);\n decimalChar = str.match(regExp)?.[0] ?? \"\" /* MaskExpression.EMPTY_STRING */;\n } else {\n x = str.split(decimalChars);\n decimalChar = decimalChars;\n }\n const decimals = x.length > 1 ? `${decimalChar}${x[1]}` : \"\" /* MaskExpression.EMPTY_STRING */;\n let res = x[0] ?? \"\" /* MaskExpression.EMPTY_STRING */;\n const separatorLimit = this.separatorLimit.replace(/\\s/g, \"\" /* MaskExpression.EMPTY_STRING */);\n if (separatorLimit && +separatorLimit) {\n if (res[0] === \"-\" /* MaskExpression.MINUS */) {\n res = `-${res.slice(1, res.length).slice(0, separatorLimit.length)}`;\n } else {\n res = res.slice(0, separatorLimit.length);\n }\n }\n const rgx = /(\\d+)(\\d{3})/;\n while (thousandSeparatorChar && rgx.test(res)) {\n res = res.replace(rgx, '$1' + thousandSeparatorChar + '$2');\n }\n if (precision === undefined) {\n return res + decimals;\n } else if (precision === 0) {\n return res;\n }\n return res + decimals.substring(0, precision + 1);\n };\n this.percentage = str => {\n const sanitizedStr = str.replace(',', '.');\n const value = Number(this.allowNegativeNumbers && str.includes(\"-\" /* MaskExpression.MINUS */) ? sanitizedStr.slice(1, str.length) : sanitizedStr);\n return !isNaN(value) && value >= 0 && value <= 100;\n };\n this.getPrecision = maskExpression => {\n const x = maskExpression.split(\".\" /* MaskExpression.DOT */);\n if (x.length > 1) {\n return Number(x[x.length - 1]);\n }\n return Infinity;\n };\n this.checkAndRemoveSuffix = inputValue => {\n for (let i = this.suffix?.length - 1; i >= 0; i--) {\n const substr = this.suffix.substring(i, this.suffix?.length);\n if (inputValue.includes(substr) && i !== this.suffix?.length - 1 && (i - 1 < 0 || !inputValue.includes(this.suffix.substring(i - 1, this.suffix?.length)))) {\n return inputValue.replace(substr, \"\" /* MaskExpression.EMPTY_STRING */);\n }\n }\n return inputValue;\n };\n this.checkInputPrecision = (inputValue, precision, decimalMarker) => {\n if (precision < Infinity) {\n // TODO need think about decimalMarker\n if (Array.isArray(decimalMarker)) {\n const marker = decimalMarker.find(dm => dm !== this.thousandSeparator);\n decimalMarker = marker ? marker : decimalMarker[0];\n }\n const precisionRegEx = new RegExp(this._charToRegExpExpression(decimalMarker) + `\\\\d{${precision}}.*$`);\n const precisionMatch = inputValue.match(precisionRegEx);\n const precisionMatchLength = (precisionMatch && precisionMatch[0]?.length) ?? 0;\n if (precisionMatchLength - 1 > precision) {\n const diff = precisionMatchLength - 1 - precision;\n inputValue = inputValue.substring(0, inputValue.length - diff);\n }\n if (precision === 0 && this._compareOrIncludes(inputValue[inputValue.length - 1], decimalMarker, this.thousandSeparator)) {\n inputValue = inputValue.substring(0, inputValue.length - 1);\n }\n }\n return inputValue;\n };\n }\n applyMaskWithPattern(inputValue, maskAndPattern) {\n const [mask, customPattern] = maskAndPattern;\n this.customPattern = customPattern;\n return this.applyMask(inputValue, mask);\n }\n applyMask(inputValue, maskExpression, position = 0, justPasted = false, backspaced = false,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n cb = () => {}) {\n if (!maskExpression || typeof inputValue !== 'string') {\n return \"\" /* MaskExpression.EMPTY_STRING */;\n }\n let cursor = 0;\n let result = '';\n let multi = false;\n let backspaceShift = false;\n let shift = 1;\n let stepBack = false;\n if (inputValue.slice(0, this.prefix.length) === this.prefix) {\n inputValue = inputValue.slice(this.prefix.length, inputValue.length);\n }\n if (!!this.suffix && inputValue?.length > 0) {\n inputValue = this.checkAndRemoveSuffix(inputValue);\n }\n if (inputValue === '(' && this.prefix) {\n inputValue = '';\n }\n const inputArray = inputValue.toString().split(\"\" /* MaskExpression.EMPTY_STRING */);\n if (this.allowNegativeNumbers && inputValue.slice(cursor, cursor + 1) === \"-\" /* MaskExpression.MINUS */) {\n result += inputValue.slice(cursor, cursor + 1);\n }\n if (maskExpression === \"IP\" /* MaskExpression.IP */) {\n const valuesIP = inputValue.split(\".\" /* MaskExpression.DOT */);\n this.ipError = this._validIP(valuesIP);\n maskExpression = '099.099.099.099';\n }\n const arr = [];\n for (let i = 0; i < inputValue.length; i++) {\n if (inputValue[i]?.match('\\\\d')) {\n arr.push(inputValue[i] ?? \"\" /* MaskExpression.EMPTY_STRING */);\n }\n }\n if (maskExpression === \"CPF_CNPJ\" /* MaskExpression.CPF_CNPJ */) {\n this.cpfCnpjError = arr.length !== 11 && arr.length !== 14;\n if (arr.length > 11) {\n maskExpression = '00.000.000/0000-00';\n } else {\n maskExpression = '000.000.000-00';\n }\n }\n if (maskExpression.startsWith(\"percent\" /* MaskExpression.PERCENT */)) {\n if (inputValue.match('[a-z]|[A-Z]') ||\n // eslint-disable-next-line no-useless-escape\n inputValue.match(/[-!$%^&*()_+|~=`{}\\[\\]:\";'<>?,\\/.]/) && !backspaced) {\n inputValue = this._stripToDecimal(inputValue);\n const precision = this.getPrecision(maskExpression);\n inputValue = this.checkInputPrecision(inputValue, precision, this.decimalMarker);\n }\n const decimalMarker = typeof this.decimalMarker === 'string' ? this.decimalMarker : \".\" /* MaskExpression.DOT */;\n if (inputValue.indexOf(decimalMarker) > 0 && !this.percentage(inputValue.substring(0, inputValue.indexOf(decimalMarker)))) {\n let base = inputValue.substring(0, inputValue.indexOf(decimalMarker) - 1);\n if (this.allowNegativeNumbers && inputValue.slice(cursor, cursor + 1) === \"-\" /* MaskExpression.MINUS */ && !backspaced) {\n base = inputValue.substring(0, inputValue.indexOf(decimalMarker));\n }\n inputValue = `${base}${inputValue.substring(inputValue.indexOf(decimalMarker), inputValue.length)}`;\n }\n let value = '';\n this.allowNegativeNumbers && inputValue.slice(cursor, cursor + 1) === \"-\" /* MaskExpression.MINUS */ ? value = `${\"-\" /* MaskExpression.MINUS */}${inputValue.slice(cursor + 1, cursor + inputValue.length)}` : value = inputValue;\n if (this.percentage(value)) {\n result = this._splitPercentZero(inputValue);\n } else {\n result = this._splitPercentZero(inputValue.substring(0, inputValue.length - 1));\n }\n } else if (maskExpression.startsWith(\"separator\" /* MaskExpression.SEPARATOR */)) {\n if (inputValue.match('[wа-яА-Я]') || inputValue.match('[ЁёА-я]') || inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-@#!$%\\\\^&*()_£¬'+|~=`{}\\]:\";<>.?/]/) || inputValue.match('[^A-Za-z0-9,]')) {\n inputValue = this._stripToDecimal(inputValue);\n }\n const precision = this.getPrecision(maskExpression);\n const decimalMarker = Array.isArray(this.decimalMarker) ? \".\" /* MaskExpression.DOT */ : this.decimalMarker;\n if (precision === 0) {\n inputValue = this.allowNegativeNumbers ? inputValue.length > 2 && inputValue[0] === \"-\" /* MaskExpression.MINUS */ && inputValue[1] === \"0\" /* MaskExpression.NUMBER_ZERO */ && inputValue[2] !== this.thousandSeparator && inputValue[2] !== \",\" /* MaskExpression.COMMA */ && inputValue[2] !== \".\" /* MaskExpression.DOT */ ? '-' + inputValue.slice(2, inputValue.length) : inputValue[0] === \"0\" /* MaskExpression.NUMBER_ZERO */ && inputValue.length > 1 && inputValue[1] !== this.thousandSeparator && inputValue[1] !== \",\" /* MaskExpression.COMMA */ && inputValue[1] !== \".\" /* MaskExpression.DOT */ ? inputValue.slice(1, inputValue.length) : inputValue : inputValue.length > 1 && inputValue[0] === \"0\" /* MaskExpression.NUMBER_ZERO */ && inputValue[1] !== this.thousandSeparator && inputValue[1] !== \",\" /* MaskExpression.COMMA */ && inputValue[1] !== \".\" /* MaskExpression.DOT */ ? inputValue.slice(1, inputValue.length) : inputValue;\n } else {\n if (inputValue[0] === decimalMarker && inputValue.length > 1) {\n inputValue = \"0\" /* MaskExpression.NUMBER_ZERO */ + inputValue.slice(0, inputValue.length + 1);\n this.plusOnePosition = true;\n }\n if (inputValue[0] === \"0\" /* MaskExpression.NUMBER_ZERO */ && inputValue[1] !== decimalMarker && inputValue[1] !== this.thousandSeparator) {\n inputValue = inputValue.length > 1 ? inputValue.slice(0, 1) + decimalMarker + inputValue.slice(1, inputValue.length + 1) : inputValue;\n this.plusOnePosition = true;\n }\n if (this.allowNegativeNumbers && inputValue[0] === \"-\" /* MaskExpression.MINUS */ && (inputValue[1] === decimalMarker || inputValue[1] === \"0\" /* MaskExpression.NUMBER_ZERO */)) {\n inputValue = inputValue[1] === decimalMarker && inputValue.length > 2 ? inputValue.slice(0, 1) + \"0\" /* MaskExpression.NUMBER_ZERO */ + inputValue.slice(1, inputValue.length) : inputValue[1] === \"0\" /* MaskExpression.NUMBER_ZERO */ && inputValue.length > 2 && inputValue[2] !== decimalMarker ? inputValue.slice(0, 2) + decimalMarker + inputValue.slice(2, inputValue.length) : inputValue;\n this.plusOnePosition = true;\n }\n }\n if (backspaced) {\n const inputValueAfterZero = inputValue.slice(this._findFirstNonZeroDigitIndex(inputValue), inputValue.length);\n const positionOfZeroOrDecimalMarker = inputValue[position] === \"0\" /* MaskExpression.NUMBER_ZERO */ || inputValue[position] === decimalMarker;\n const zeroIndexNumberZero = inputValue[0] === \"0\" /* MaskExpression.NUMBER_ZERO */;\n const zeroIndexMinus = inputValue[0] === \"-\" /* MaskExpression.MINUS */;\n const zeroIndexThousand = inputValue[0] === this.thousandSeparator;\n const firstIndexDecimalMarker = inputValue[1] === decimalMarker;\n const firstIndexNumberZero = inputValue[1] === \"0\" /* MaskExpression.NUMBER_ZERO */;\n const secondIndexDecimalMarker = inputValue[2] === decimalMarker;\n if (zeroIndexNumberZero && firstIndexDecimalMarker && positionOfZeroOrDecimalMarker && position < 2) {\n inputValue = inputValueAfterZero;\n }\n if (zeroIndexMinus && firstIndexNumberZero && secondIndexDecimalMarker && positionOfZeroOrDecimalMarker && position < 3) {\n inputValue = \"-\" /* MaskExpression.MINUS */ + inputValueAfterZero;\n }\n if (inputValueAfterZero !== \"-\" /* MaskExpression.MINUS */ && (position === 0 && (zeroIndexNumberZero || zeroIndexThousand) || this.allowNegativeNumbers && position === 1 && zeroIndexMinus && !firstIndexNumberZero)) {\n inputValue = zeroIndexMinus ? \"-\" /* MaskExpression.MINUS */ + inputValueAfterZero : inputValueAfterZero;\n }\n }\n // TODO: we had different rexexps here for the different cases... but tests dont seam to bother - check this\n // separator: no COMMA, dot-sep: no SPACE, COMMA OK, comma-sep: no SPACE, COMMA OK\n const thousandSeparatorCharEscaped = this._charToRegExpExpression(this.thousandSeparator);\n let invalidChars = '@#!$%^&*()_+|~=`{}\\\\[\\\\]:\\\\s,\\\\.\";<>?\\\\/'.replace(thousandSeparatorCharEscaped, '');\n //.replace(decimalMarkerEscaped, '');\n if (Array.isArray(this.decimalMarker)) {\n for (const marker of this.decimalMarker) {\n invalidChars = invalidChars.replace(this._charToRegExpExpression(marker), \"\" /* MaskExpression.EMPTY_STRING */);\n }\n } else {\n invalidChars = invalidChars.replace(this._charToRegExpExpression(this.decimalMarker), '');\n }\n const invalidCharRegexp = new RegExp('[' + invalidChars + ']');\n if (inputValue.match(invalidCharRegexp)) {\n inputValue = inputValue.substring(0, inputValue.length - 1);\n }\n inputValue = this.checkInputPrecision(inputValue, precision, this.decimalMarker);\n const strForSep = inputValue.replace(new RegExp(thousandSeparatorCharEscaped, 'g'), '');\n result = this._formatWithSeparators(strForSep, this.thousandSeparator, this.decimalMarker, precision);\n const commaShift = result.indexOf(\",\" /* MaskExpression.COMMA */) - inputValue.indexOf(\",\" /* MaskExpression.COMMA */);\n const shiftStep = result.length - inputValue.length;\n if (result[position - 1] === this.thousandSeparator && this.prefix && backspaced) {\n position = position - 1;\n } else if (shiftStep > 0 && result[position] !== this.thousandSeparator) {\n backspaceShift = true;\n let _shift = 0;\n do {\n this._shift.add(position + _shift);\n _shift++;\n } while (_shift < shiftStep);\n } else if (result[position - 1] === this.decimalMarker || shiftStep === -4 || shiftStep === -3 || result[position] === this.thousandSeparator) {\n this._shift.clear();\n this._shift.add(position - 1);\n } else if (commaShift !== 0 && position > 0 && !(result.indexOf(\",\" /* MaskExpression.COMMA */) >= position && position > 3) || !(result.indexOf(\".\" /* MaskExpression.DOT */) >= position && position > 3) && shiftStep <= 0) {\n this._shift.clear();\n backspaceShift = true;\n shift = shiftStep;\n position += shiftStep;\n this._shift.add(position);\n } else {\n this._shift.clear();\n }\n } else {\n for (let i = 0, inputSymbol = inputArray[0]; i < inputArray.length; i++, inputSymbol = inputArray[i] ?? \"\" /* MaskExpression.EMPTY_STRING */) {\n if (cursor === maskExpression.length) {\n break;\n }\n const symbolStarInPattern = (\"*\" /* MaskExpression.SYMBOL_STAR */ in this.patterns);\n if (this._checkSymbolMask(inputSymbol, maskExpression[cursor] ?? \"\" /* MaskExpression.EMPTY_STRING */) && maskExpression[cursor + 1] === \"?\" /* MaskExpression.SYMBOL_QUESTION */) {\n result += inputSymbol;\n cursor += 2;\n } else if (maskExpression[cursor + 1] === \"*\" /* MaskExpression.SYMBOL_STAR */ && multi && this._checkSymbolMask(inputSymbol, maskExpression[cursor + 2] ?? \"\" /* MaskExpression.EMPTY_STRING */)) {\n result += inputSymbol;\n cursor += 3;\n multi = false;\n } else if (this._checkSymbolMask(inputSymbol, maskExpression[cursor] ?? \"\" /* MaskExpression.EMPTY_STRING */) && maskExpression[cursor + 1] === \"*\" /* MaskExpression.SYMBOL_STAR */ && !symbolStarInPattern) {\n result += inputSymbol;\n multi = true;\n } else if (maskExpression[cursor + 1] === \"?\" /* MaskExpression.SYMBOL_QUESTION */ && this._checkSymbolMask(inputSymbol, maskExpression[cursor + 2] ?? \"\" /* MaskExpression.EMPTY_STRING */)) {\n result += inputSymbol;\n cursor += 3;\n } else if (this._checkSymbolMask(inputSymbol, maskExpression[cursor] ?? \"\" /* MaskExpression.EMPTY_STRING */)) {\n if (maskExpression[cursor] === \"H\" /* MaskExpression.HOURS */) {\n if (this.apm ? Number(inputSymbol) > 9 : Number(inputSymbol) > 2) {\n position = !this.leadZeroDateTime ? position + 1 : position;\n cursor += 1;\n this._shiftStep(maskExpression, cursor, inputArray.length);\n i--;\n if (this.leadZeroDateTime) {\n result += '0';\n }\n continue;\n }\n }\n if (maskExpression[cursor] === \"h\" /* MaskExpression.HOUR */) {\n if (this.apm ? result.length === 1 && Number(result) > 1 || result === '1' && Number(inputSymbol) > 2 || inputValue.slice(cursor - 1, cursor).length === 1 && Number(inputValue.slice(cursor - 1, cursor)) > 2 || inputValue.slice(cursor - 1, cursor) === '1' && Number(inputSymbol) > 2 : result === '2' && Number(inputSymbol) > 3 || (result.slice(cursor - 2, cursor) === '2' || result.slice(cursor - 3, cursor) === '2' || result.slice(cursor - 4, cursor) === '2' || result.slice(cursor - 1, cursor) === '2') && Number(inputSymbol) > 3 && cursor > 10) {\n position = position + 1;\n cursor += 1;\n i--;\n continue;\n }\n }\n if (maskExpression[cursor] === \"m\" /* MaskExpression.MINUTE */ || maskExpression[cursor] === \"s\" /* MaskExpression.SECOND */) {\n if (Number(inputSymbol) > 5) {\n position = !this.leadZeroDateTime ? position + 1 : position;\n cursor += 1;\n this._shiftStep(maskExpression, cursor, inputArray.length);\n i--;\n if (this.leadZeroDateTime) {\n result += '0';\n }\n continue;\n }\n }\n const daysCount = 31;\n const inputValueCursor = inputValue[cursor];\n const inputValueCursorPlusOne = inputValue[cursor + 1];\n const inputValueCursorPlusTwo = inputValue[cursor + 2];\n const inputValueCursorMinusOne = inputValue[cursor - 1];\n const inputValueCursorMinusTwo = inputValue[cursor - 2];\n const inputValueSliceMinusThreeMinusOne = inputValue.slice(cursor - 3, cursor - 1);\n const inputValueSliceMinusOnePlusOne = inputValue.slice(cursor - 1, cursor + 1);\n const inputValueSliceCursorPlusTwo = inputValue.slice(cursor, cursor + 2);\n const inputValueSliceMinusTwoCursor = inputValue.slice(cursor - 2, cursor);\n if (maskExpression[cursor] === \"d\" /* MaskExpression.DAY */) {\n const maskStartWithMonth = maskExpression.slice(0, 2) === \"M0\" /* MaskExpression.MONTHS */;\n const startWithMonthInput = maskExpression.slice(0, 2) === \"M0\" /* MaskExpression.MONTHS */ && this.specialCharacters.includes(inputValueCursorMinusTwo);\n if (Number(inputSymbol) > 3 && this.leadZeroDateTime || !maskStartWithMonth && (Number(inputValueSliceCursorPlusTwo) > daysCount || Number(inputValueSliceMinusOnePlusOne) > daysCount || this.specialCharacters.includes(inputValueCursorPlusOne)) || (startWithMonthInput ? Number(inputValueSliceMinusOnePlusOne) > daysCount || !this.specialCharacters.includes(inputValueCursor) && this.specialCharacters.includes(inputValueCursorPlusTwo) || this.specialCharacters.includes(inputValueCursor) : Number(inputValueSliceCursorPlusTwo) > daysCount || this.specialCharacters.includes(inputValueCursorPlusOne))) {\n position = !this.leadZeroDateTime ? position + 1 : position;\n cursor += 1;\n this._shiftStep(maskExpression, cursor, inputArray.length);\n i--;\n if (this.leadZeroDateTime) {\n result += '0';\n }\n continue;\n }\n }\n if (maskExpression[cursor] === \"M\" /* MaskExpression.MONTH */) {\n const monthsCount = 12;\n // mask without day\n const withoutDays = cursor === 0 && (Number(inputSymbol) > 2 || Number(inputValueSliceCursorPlusTwo) > monthsCount || this.specialCharacters.includes(inputValueCursorPlusOne) && !backspaced);\n // day<10 && month<12 for input\n const specialChart = maskExpression.slice(cursor + 2, cursor + 3);\n const day1monthInput = inputValueSliceMinusThreeMinusOne.includes(specialChart) && maskExpression.includes('d0') && (this.specialCharacters.includes(inputValueCursorMinusTwo) && Number(inputValueSliceMinusOnePlusOne) > monthsCount && !this.specialCharacters.includes(inputValueCursor) || this.specialCharacters.includes(inputValueCursor));\n // month<12 && day<10 for input\n const day2monthInput = Number(inputValueSliceMinusThreeMinusOne) <= daysCount && !this.specialCharacters.includes(inputValueSliceMinusThreeMinusOne) && this.specialCharacters.includes(inputValueCursorMinusOne) && (Number(inputValueSliceCursorPlusTwo) > monthsCount || this.specialCharacters.includes(inputValueCursorPlusOne));\n // cursor === 5 && without days\n const day2monthInputDot = Number(inputValueSliceCursorPlusTwo) > monthsCount && cursor === 5 || this.specialCharacters.includes(inputValueCursorPlusOne) && cursor === 5;\n // // day<10 && month<12 for paste whole data\n const day1monthPaste = Number(inputValueSliceMinusThreeMinusOne) > daysCount && !this.specialCharacters.includes(inputValueSliceMinusThreeMinusOne) && !this.specialCharacters.includes(inputValueSliceMinusTwoCursor) && Number(inputValueSliceMinusTwoCursor) > monthsCount && maskExpression.includes('d0');\n // 10 monthsCount;\n if (Number(inputSymbol) > 1 && this.leadZeroDateTime || withoutDays || day1monthInput || day2monthPaste || day1monthPaste || day2monthInput || day2monthInputDot && !this.leadZeroDateTime) {\n position = !this.leadZeroDateTime ? position + 1 : position;\n cursor += 1;\n this._shiftStep(maskExpression, cursor, inputArray.length);\n i--;\n if (this.leadZeroDateTime) {\n result += '0';\n }\n continue;\n }\n }\n result += inputSymbol;\n cursor++;\n } else if (this.specialCharacters.includes(inputSymbol) && maskExpression[cursor] === inputSymbol) {\n result += inputSymbol;\n cursor++;\n } else if (this.specialCharacters.indexOf(maskExpression[cursor] ?? \"\" /* MaskExpression.EMPTY_STRING */) !== -1) {\n result += maskExpression[cursor];\n cursor++;\n this._shiftStep(maskExpression, cursor, inputArray.length);\n i--;\n } else if (maskExpression[cursor] === \"9\" /* MaskExpression.NUMBER_NINE */ && this.showMaskTyped) {\n this._shiftStep(maskExpression, cursor, inputArray.length);\n } else if (this.patterns[maskExpression[cursor] ?? \"\" /* MaskExpression.EMPTY_STRING */] && this.patterns[maskExpression[cursor] ?? \"\" /* MaskExpression.EMPTY_STRING */]?.optional) {\n if (!!inputArray[cursor] && maskExpression !== '099.099.099.099' && maskExpression !== '000.000.000-00' && maskExpression !== '00.000.000/0000-00' && !maskExpression.match(/^9+\\.0+$/) && !this.patterns[maskExpression[cursor] ?? \"\" /* MaskExpression.EMPTY_STRING */]?.optional) {\n result += inputArray[cursor];\n }\n if (maskExpression.includes(\"9\" /* MaskExpression.NUMBER_NINE */ + \"*\" /* MaskExpression.SYMBOL_STAR */) && maskExpression.includes(\"0\" /* MaskExpression.NUMBER_ZERO */ + \"*\" /* MaskExpression.SYMBOL_STAR */)) {\n cursor++;\n }\n cursor++;\n i--;\n } else if (this.maskExpression[cursor + 1] === \"*\" /* MaskExpression.SYMBOL_STAR */ && this._findSpecialChar(this.maskExpression[cursor + 2] ?? \"\" /* MaskExpression.EMPTY_STRING */) && this._findSpecialChar(inputSymbol) === this.maskExpression[cursor + 2] && multi) {\n cursor += 3;\n result += inputSymbol;\n } else if (this.maskExpression[cursor + 1] === \"?\" /* MaskExpression.SYMBOL_QUESTION */ && this._findSpecialChar(this.maskExpression[cursor + 2] ?? \"\" /* MaskExpression.EMPTY_STRING */) && this._findSpecialChar(inputSymbol) === this.maskExpression[cursor + 2] && multi) {\n cursor += 3;\n result += inputSymbol;\n } else if (this.showMaskTyped && this.specialCharacters.indexOf(inputSymbol) < 0 && inputSymbol !== this.placeHolderCharacter && this.placeHolderCharacter.length === 1) {\n stepBack = true;\n }\n }\n }\n if (result.length + 1 === maskExpression.length && this.specialCharacters.indexOf(maskExpression[maskExpression.length - 1] ?? \"\" /* MaskExpression.EMPTY_STRING */) !== -1) {\n result += maskExpression[maskExpression.length - 1];\n }\n let newPosition = position + 1;\n while (this._shift.has(newPosition)) {\n shift++;\n newPosition++;\n }\n let actualShift = justPasted && !maskExpression.startsWith(\"separator\" /* MaskExpression.SEPARATOR */) ? cursor : this._shift.has(position) ? shift : 0;\n if (stepBack) {\n actualShift--;\n }\n cb(actualShift, backspaceShift);\n if (shift < 0) {\n this._shift.clear();\n }\n let onlySpecial = false;\n if (backspaced) {\n onlySpecial = inputArray.every(char => this.specialCharacters.includes(char));\n }\n let res = `${this.prefix}${onlySpecial ? \"\" /* MaskExpression.EMPTY_STRING */ : result}${this.showMaskTyped ? '' : this.suffix}`;\n if (result.length === 0) {\n res = !this.dropSpecialCharacters ? `${this.prefix}${result}` : `${result}`;\n }\n const isSpecialCharacterMaskFirstSymbol = inputValue.length === 1 && this.specialCharacters.includes(maskExpression[0]) && inputValue !== maskExpression[0];\n if (!this._checkSymbolMask(inputValue, maskExpression[1]) && isSpecialCharacterMaskFirstSymbol) {\n return '';\n }\n if (result.includes(\"-\" /* MaskExpression.MINUS */) && this.prefix && this.allowNegativeNumbers) {\n if (backspaced && result === \"-\" /* MaskExpression.MINUS */) {\n return '';\n }\n res = `${\"-\" /* MaskExpression.MINUS */}${this.prefix}${result.split(\"-\" /* MaskExpression.MINUS */).join(\"\" /* MaskExpression.EMPTY_STRING */)}${this.suffix}`;\n }\n return res;\n }\n _findDropSpecialChar(inputSymbol) {\n if (Array.isArray(this.dropSpecialCharacters)) {\n return this.dropSpecialCharacters.find(val => val === inputSymbol);\n }\n return this._findSpecialChar(inputSymbol);\n }\n _findSpecialChar(inputSymbol) {\n return this.specialCharacters.find(val => val === inputSymbol);\n }\n _checkSymbolMask(inputSymbol, maskSymbol) {\n this.patterns = this.customPattern ? this.customPattern : this.patterns;\n return (this.patterns[maskSymbol]?.pattern && this.patterns[maskSymbol]?.pattern.test(inputSymbol)) ?? false;\n }\n _stripToDecimal(str) {\n return str.split(\"\" /* MaskExpression.EMPTY_STRING */).filter((i, idx) => {\n const isDecimalMarker = typeof this.decimalMarker === 'string' ? i === this.decimalMarker :\n // TODO (inepipenko) use utility type\n this.decimalMarker.includes(i);\n return i.match('^-?\\\\d') || i === this.thousandSeparator || isDecimalMarker || i === \"-\" /* MaskExpression.MINUS */ && idx === 0 && this.allowNegativeNumbers;\n }).join(\"\" /* MaskExpression.EMPTY_STRING */);\n }\n _charToRegExpExpression(char) {\n // if (Array.isArray(char)) {\n // \treturn char.map((v) => ('[\\\\^$.|?*+()'.indexOf(v) >= 0 ? `\\\\${v}` : v)).join('|');\n // }\n if (char) {\n const charsToEscape = '[\\\\^$.|?*+()';\n return char === ' ' ? '\\\\s' : charsToEscape.indexOf(char) >= 0 ? `\\\\${char}` : char;\n }\n return char;\n }\n _shiftStep(maskExpression, cursor, inputLength) {\n const shiftStep = /[*?]/g.test(maskExpression.slice(0, cursor)) ? inputLength : cursor;\n this._shift.add(shiftStep + this.prefix.length || 0);\n }\n _compareOrIncludes(value, comparedValue, excludedValue) {\n return Array.isArray(comparedValue) ? comparedValue.filter(v => v !== excludedValue).includes(value) : value === comparedValue;\n }\n _validIP(valuesIP) {\n return !(valuesIP.length === 4 && !valuesIP.some((value, index) => {\n if (valuesIP.length !== index + 1) {\n return value === \"\" /* MaskExpression.EMPTY_STRING */ || Number(value) > 255;\n }\n return value === \"\" /* MaskExpression.EMPTY_STRING */ || Number(value.substring(0, 3)) > 255;\n }));\n }\n _splitPercentZero(value) {\n if (value === \"-\" /* MaskExpression.MINUS */ && this.allowNegativeNumbers) {\n return value;\n }\n const decimalIndex = typeof this.decimalMarker === 'string' ? value.indexOf(this.decimalMarker) : value.indexOf(\".\" /* MaskExpression.DOT */);\n const emptyOrMinus = this.allowNegativeNumbers && value.includes(\"-\" /* MaskExpression.MINUS */) ? '-' : '';\n if (decimalIndex === -1) {\n const parsedValue = parseInt(emptyOrMinus ? value.slice(1, value.length) : value, 10);\n return isNaN(parsedValue) ? \"\" /* MaskExpression.EMPTY_STRING */ : `${emptyOrMinus}${parsedValue}`;\n } else {\n const integerPart = parseInt(value.replace('-', '').substring(0, decimalIndex), 10);\n const decimalPart = value.substring(decimalIndex + 1);\n const integerString = isNaN(integerPart) ? '' : integerPart.toString();\n const decimal = typeof this.decimalMarker === 'string' ? this.decimalMarker : \".\" /* MaskExpression.DOT */;\n return integerString === \"\" /* MaskExpression.EMPTY_STRING */ ? \"\" /* MaskExpression.EMPTY_STRING */ : `${emptyOrMinus}${integerString}${decimal}${decimalPart}`;\n }\n }\n _findFirstNonZeroDigitIndex(inputString) {\n for (let i = 0; i < inputString.length; i++) {\n const char = inputString[i];\n if (char && char >= '1' && char <= '9') {\n return i;\n }\n }\n return -1;\n }\n static {\n this.ɵfac = function NgxMaskApplierService_Factory(ɵt) {\n return new (ɵt || NgxMaskApplierService)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: NgxMaskApplierService,\n factory: NgxMaskApplierService.ɵfac\n });\n }\n }\n return NgxMaskApplierService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet NgxMaskService = /*#__PURE__*/(() => {\n class NgxMaskService extends NgxMaskApplierService {\n constructor() {\n super(...arguments);\n this.isNumberValue = false;\n this.maskIsShown = '';\n this.selStart = null;\n this.selEnd = null;\n /**\n * Whether we are currently in writeValue function, in this case when applying the mask we don't want to trigger onChange function,\n * since writeValue should be a one way only process of writing the DOM value based on the Angular model value.\n */\n this.writingValue = false;\n this.maskChanged = false;\n this._maskExpressionArray = [];\n this.triggerOnMaskChange = false;\n this._previousValue = '';\n this._currentValue = '';\n this._emitValue = false;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.onChange = _ => {};\n this._elementRef = inject(ElementRef, {\n optional: true\n });\n this.document = inject(DOCUMENT);\n this._config = inject(NGX_MASK_CONFIG);\n this._renderer = inject(Renderer2, {\n optional: true\n });\n }\n applyMask(inputValue, maskExpression, position = 0, justPasted = false, backspaced = false,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n cb = () => {}) {\n if (!maskExpression) {\n return inputValue !== this.actualValue ? this.actualValue : inputValue;\n }\n this.maskIsShown = this.showMaskTyped ? this.showMaskInInput() : \"\" /* MaskExpression.EMPTY_STRING */;\n if (this.maskExpression === \"IP\" /* MaskExpression.IP */ && this.showMaskTyped) {\n this.maskIsShown = this.showMaskInInput(inputValue || \"#\" /* MaskExpression.HASH */);\n }\n if (this.maskExpression === \"CPF_CNPJ\" /* MaskExpression.CPF_CNPJ */ && this.showMaskTyped) {\n this.maskIsShown = this.showMaskInInput(inputValue || \"#\" /* MaskExpression.HASH */);\n }\n if (!inputValue && this.showMaskTyped) {\n this.formControlResult(this.prefix);\n return `${this.prefix}${this.maskIsShown}${this.suffix}`;\n }\n const getSymbol = !!inputValue && typeof this.selStart === 'number' ? inputValue[this.selStart] ?? \"\" /* MaskExpression.EMPTY_STRING */ : \"\" /* MaskExpression.EMPTY_STRING */;\n let newInputValue = '';\n if (this.hiddenInput !== undefined && !this.writingValue) {\n let actualResult = inputValue && inputValue.length === 1 ? inputValue.split(\"\" /* MaskExpression.EMPTY_STRING */) : this.actualValue.split(\"\" /* MaskExpression.EMPTY_STRING */);\n // eslint-disable @typescript-eslint/no-unused-expressions\n if (typeof this.selStart === 'object' && typeof this.selEnd === 'object') {\n this.selStart = Number(this.selStart);\n this.selEnd = Number(this.selEnd);\n } else {\n inputValue !== \"\" /* MaskExpression.EMPTY_STRING */ && actualResult.length ? typeof this.selStart === 'number' && typeof this.selEnd === 'number' ? inputValue.length > actualResult.length ? actualResult.splice(this.selStart, 0, getSymbol) : inputValue.length < actualResult.length ? actualResult.length - inputValue.length === 1 ? backspaced ? actualResult.splice(this.selStart - 1, 1) : actualResult.splice(inputValue.length - 1, 1) : actualResult.splice(this.selStart, this.selEnd - this.selStart) : null : null : actualResult = [];\n }\n if (this.showMaskTyped) {\n if (!this.hiddenInput) {\n inputValue = this.removeMask(inputValue);\n }\n }\n // eslint-enable @typescript-eslint/no-unused-expressions\n newInputValue = this.actualValue.length && actualResult.length <= inputValue.length ? this.shiftTypedSymbols(actualResult.join(\"\" /* MaskExpression.EMPTY_STRING */)) : inputValue;\n }\n if (justPasted && (this.hiddenInput || !this.hiddenInput)) {\n newInputValue = inputValue;\n }\n if (backspaced && this.specialCharacters.indexOf(this.maskExpression[position] ?? \"\" /* MaskExpression.EMPTY_STRING */) !== -1 && this.showMaskTyped && !this.prefix) {\n newInputValue = this._currentValue;\n }\n if (this.deletedSpecialCharacter && position) {\n if (this.specialCharacters.includes(this.actualValue.slice(position, position + 1))) {\n position = position + 1;\n } else if (maskExpression.slice(position - 1, position + 1) !== \"M0\" /* MaskExpression.MONTHS */) {\n position = position - 2;\n }\n this.deletedSpecialCharacter = false;\n }\n if (this.showMaskTyped && this.placeHolderCharacter.length === 1 && !this.leadZeroDateTime) {\n inputValue = this.removeMask(inputValue);\n }\n if (this.maskChanged) {\n newInputValue = inputValue;\n } else {\n newInputValue = Boolean(newInputValue) && newInputValue.length ? newInputValue : inputValue;\n }\n if (this.showMaskTyped && this.keepCharacterPositions && this.actualValue && !justPasted && !this.writingValue) {\n const value = this.dropSpecialCharacters ? this.removeMask(this.actualValue) : this.actualValue;\n this.formControlResult(value);\n return this.actualValue ? this.actualValue : `${this.prefix}${this.maskIsShown}${this.suffix}`;\n }\n const result = super.applyMask(newInputValue, maskExpression, position, justPasted, backspaced, cb);\n this.actualValue = this.getActualValue(result);\n // handle some separator implications:\n // a.) adjust decimalMarker default (. -> ,) if thousandSeparator is a dot\n if (this.thousandSeparator === \".\" /* MaskExpression.DOT */ && this.decimalMarker === \".\" /* MaskExpression.DOT */) {\n this.decimalMarker = \",\" /* MaskExpression.COMMA */;\n }\n // b) remove decimal marker from list of special characters to mask\n if (this.maskExpression.startsWith(\"separator\" /* MaskExpression.SEPARATOR */) && this.dropSpecialCharacters === true) {\n this.specialCharacters = this.specialCharacters.filter(item => !this._compareOrIncludes(item, this.decimalMarker, this.thousandSeparator) //item !== this.decimalMarker, // !\n );\n }\n if (result || result === '') {\n this._previousValue = this._currentValue;\n this._currentValue = result;\n this._emitValue = this._previousValue !== this._currentValue || this.maskChanged || this._previousValue === this._currentValue && justPasted;\n }\n this._emitValue ? this.writingValue && this.triggerOnMaskChange ? requestAnimationFrame(() => this.formControlResult(result)) : this.formControlResult(result) : '';\n if (!this.showMaskTyped || this.showMaskTyped && this.hiddenInput) {\n if (this.hiddenInput) {\n if (backspaced) {\n return this.hideInput(result, this.maskExpression);\n }\n return `${this.hideInput(result, this.maskExpression)}${this.maskIsShown.slice(result.length)}`;\n }\n return result;\n }\n const resLen = result.length;\n const prefNmask = `${this.prefix}${this.maskIsShown}${this.suffix}`;\n if (this.maskExpression.includes(\"H\" /* MaskExpression.HOURS */)) {\n const countSkipedSymbol = this._numberSkipedSymbols(result);\n return `${result}${prefNmask.slice(resLen + countSkipedSymbol)}`;\n } else if (this.maskExpression === \"IP\" /* MaskExpression.IP */ || this.maskExpression === \"CPF_CNPJ\" /* MaskExpression.CPF_CNPJ */) {\n return `${result}${prefNmask}`;\n }\n return `${result}${prefNmask.slice(resLen)}`;\n }\n // get the number of characters that were shifted\n _numberSkipedSymbols(value) {\n const regex = /(^|\\D)(\\d\\D)/g;\n let match = regex.exec(value);\n let countSkipedSymbol = 0;\n while (match != null) {\n countSkipedSymbol += 1;\n match = regex.exec(value);\n }\n return countSkipedSymbol;\n }\n applyValueChanges(position, justPasted, backspaced,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n cb = () => {}) {\n const formElement = this._elementRef?.nativeElement;\n if (!formElement) {\n return;\n }\n formElement.value = this.applyMask(formElement.value, this.maskExpression, position, justPasted, backspaced, cb);\n if (formElement === this._getActiveElement()) {\n return;\n }\n this.clearIfNotMatchFn();\n }\n hideInput(inputValue, maskExpression) {\n return inputValue.split(\"\" /* MaskExpression.EMPTY_STRING */).map((curr, index) => {\n if (this.patterns && this.patterns[maskExpression[index] ?? \"\" /* MaskExpression.EMPTY_STRING */] && this.patterns[maskExpression[index] ?? \"\" /* MaskExpression.EMPTY_STRING */]?.symbol) {\n return this.patterns[maskExpression[index] ?? \"\" /* MaskExpression.EMPTY_STRING */]?.symbol;\n }\n return curr;\n }).join(\"\" /* MaskExpression.EMPTY_STRING */);\n }\n // this function is not necessary, it checks result against maskExpression\n getActualValue(res) {\n const compare = res.split(\"\" /* MaskExpression.EMPTY_STRING */).filter((symbol, i) => {\n const maskChar = this.maskExpression[i] ?? \"\" /* MaskExpression.EMPTY_STRING */;\n return this._checkSymbolMask(symbol, maskChar) || this.specialCharacters.includes(maskChar) && symbol === maskChar;\n });\n if (compare.join(\"\" /* MaskExpression.EMPTY_STRING */) === res) {\n return compare.join(\"\" /* MaskExpression.EMPTY_STRING */);\n }\n return res;\n }\n shiftTypedSymbols(inputValue) {\n let symbolToReplace = '';\n const newInputValue = inputValue && inputValue.split(\"\" /* MaskExpression.EMPTY_STRING */).map((currSymbol, index) => {\n if (this.specialCharacters.includes(inputValue[index + 1] ?? \"\" /* MaskExpression.EMPTY_STRING */) && inputValue[index + 1] !== this.maskExpression[index + 1]) {\n symbolToReplace = currSymbol;\n return inputValue[index + 1];\n }\n if (symbolToReplace.length) {\n const replaceSymbol = symbolToReplace;\n symbolToReplace = \"\" /* MaskExpression.EMPTY_STRING */;\n return replaceSymbol;\n }\n return currSymbol;\n }) || [];\n return newInputValue.join(\"\" /* MaskExpression.EMPTY_STRING */);\n }\n /**\n * Convert number value to string\n * 3.1415 -> '3.1415'\n * 1e-7 -> '0.0000001'\n */\n numberToString(value) {\n if (!value && value !== 0 || this.maskExpression.startsWith(\"separator\" /* MaskExpression.SEPARATOR */) && (this.leadZero || !this.dropSpecialCharacters) || this.maskExpression.startsWith(\"separator\" /* MaskExpression.SEPARATOR */) && this.separatorLimit.length > 14 && String(value).length > 14) {\n return String(value);\n }\n return Number(value).toLocaleString('fullwide', {\n useGrouping: false,\n maximumFractionDigits: 20\n }).replace(`/${\"-\" /* MaskExpression.MINUS */}/`, \"-\" /* MaskExpression.MINUS */);\n }\n showMaskInInput(inputVal) {\n if (this.showMaskTyped && !!this.shownMaskExpression) {\n if (this.maskExpression.length !== this.shownMaskExpression.length) {\n throw new Error('Mask expression must match mask placeholder length');\n } else {\n return this.shownMaskExpression;\n }\n } else if (this.showMaskTyped) {\n if (inputVal) {\n if (this.maskExpression === \"IP\" /* MaskExpression.IP */) {\n return this._checkForIp(inputVal);\n }\n if (this.maskExpression === \"CPF_CNPJ\" /* MaskExpression.CPF_CNPJ */) {\n return this._checkForCpfCnpj(inputVal);\n }\n }\n if (this.placeHolderCharacter.length === this.maskExpression.length) {\n return this.placeHolderCharacter;\n }\n return this.maskExpression.replace(/\\w/g, this.placeHolderCharacter);\n }\n return '';\n }\n clearIfNotMatchFn() {\n const formElement = this._elementRef?.nativeElement;\n if (!formElement) {\n return;\n }\n if (this.clearIfNotMatch && this.prefix.length + this.maskExpression.length + this.suffix.length !== formElement.value.replace(this.placeHolderCharacter, \"\" /* MaskExpression.EMPTY_STRING */).length) {\n this.formElementProperty = ['value', \"\" /* MaskExpression.EMPTY_STRING */];\n this.applyMask('', this.maskExpression);\n }\n }\n set formElementProperty([name, value]) {\n if (!this._renderer || !this._elementRef) {\n return;\n }\n //[TODO]: andriikamaldinov1 find better solution\n Promise.resolve().then(() => this._renderer?.setProperty(this._elementRef?.nativeElement, name, value));\n }\n checkDropSpecialCharAmount(mask) {\n const chars = mask.split(\"\" /* MaskExpression.EMPTY_STRING */).filter(item => this._findDropSpecialChar(item));\n return chars.length;\n }\n removeMask(inputValue) {\n return this._removeMask(this._removeSuffix(this._removePrefix(inputValue)), this.specialCharacters.concat('_').concat(this.placeHolderCharacter));\n }\n _checkForIp(inputVal) {\n if (inputVal === \"#\" /* MaskExpression.HASH */) {\n return `${this.placeHolderCharacter}.${this.placeHolderCharacter}.${this.placeHolderCharacter}.${this.placeHolderCharacter}`;\n }\n const arr = [];\n for (let i = 0; i < inputVal.length; i++) {\n const value = inputVal[i] ?? \"\" /* MaskExpression.EMPTY_STRING */;\n if (!value) {\n continue;\n }\n if (value.match('\\\\d')) {\n arr.push(value);\n }\n }\n if (arr.length <= 3) {\n return `${this.placeHolderCharacter}.${this.placeHolderCharacter}.${this.placeHolderCharacter}`;\n }\n if (arr.length > 3 && arr.length <= 6) {\n return `${this.placeHolderCharacter}.${this.placeHolderCharacter}`;\n }\n if (arr.length > 6 && arr.length <= 9) {\n return this.placeHolderCharacter;\n }\n if (arr.length > 9 && arr.length <= 12) {\n return '';\n }\n return '';\n }\n _checkForCpfCnpj(inputVal) {\n const cpf = `${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` + `.${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` + `.${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` + `-${this.placeHolderCharacter}${this.placeHolderCharacter}`;\n const cnpj = `${this.placeHolderCharacter}${this.placeHolderCharacter}` + `.${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` + `.${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` + `/${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}${this.placeHolderCharacter}` + `-${this.placeHolderCharacter}${this.placeHolderCharacter}`;\n if (inputVal === \"#\" /* MaskExpression.HASH */) {\n return cpf;\n }\n const arr = [];\n for (let i = 0; i < inputVal.length; i++) {\n const value = inputVal[i] ?? \"\" /* MaskExpression.EMPTY_STRING */;\n if (!value) {\n continue;\n }\n if (value.match('\\\\d')) {\n arr.push(value);\n }\n }\n if (arr.length <= 3) {\n return cpf.slice(arr.length, cpf.length);\n }\n if (arr.length > 3 && arr.length <= 6) {\n return cpf.slice(arr.length + 1, cpf.length);\n }\n if (arr.length > 6 && arr.length <= 9) {\n return cpf.slice(arr.length + 2, cpf.length);\n }\n if (arr.length > 9 && arr.length < 11) {\n return cpf.slice(arr.length + 3, cpf.length);\n }\n if (arr.length === 11) {\n return '';\n }\n if (arr.length === 12) {\n if (inputVal.length === 17) {\n return cnpj.slice(16, cnpj.length);\n }\n return cnpj.slice(15, cnpj.length);\n }\n if (arr.length > 12 && arr.length <= 14) {\n return cnpj.slice(arr.length + 4, cnpj.length);\n }\n return '';\n }\n /**\n * Recursively determine the current active element by navigating the Shadow DOM until the Active Element is found.\n */\n _getActiveElement(document = this.document) {\n const shadowRootEl = document?.activeElement?.shadowRoot;\n if (!shadowRootEl?.activeElement) {\n return document.activeElement;\n } else {\n return this._getActiveElement(shadowRootEl);\n }\n }\n /**\n * Propogates the input value back to the Angular model by triggering the onChange function. It won't do this if writingValue\n * is true. If that is true it means we are currently in the writeValue function, which is supposed to only update the actual\n * DOM element based on the Angular model value. It should be a one way process, i.e. writeValue should not be modifying the Angular\n * model value too. Therefore, we don't trigger onChange in this scenario.\n * @param inputValue the current form input value\n */\n formControlResult(inputValue) {\n if (this.writingValue || !this.triggerOnMaskChange && this.maskChanged) {\n this.triggerOnMaskChange && this.maskChanged ? this.onChange(this.outputTransformFn(this._toNumber(this._checkSymbols(this._removeSuffix(this._removePrefix(inputValue)))))) : '';\n this.maskChanged = false;\n return;\n }\n if (Array.isArray(this.dropSpecialCharacters)) {\n this.onChange(this.outputTransformFn(this._toNumber(this._checkSymbols(this._removeMask(this._removeSuffix(this._removePrefix(inputValue)), this.dropSpecialCharacters)))));\n } else if (this.dropSpecialCharacters || !this.dropSpecialCharacters && this.prefix === inputValue) {\n this.onChange(this.outputTransformFn(this._toNumber(this._checkSymbols(this._removeSuffix(this._removePrefix(inputValue))))));\n } else {\n this.onChange(this.outputTransformFn(this._toNumber(inputValue)));\n }\n }\n _toNumber(value) {\n if (!this.isNumberValue || value === \"\" /* MaskExpression.EMPTY_STRING */) {\n return value;\n }\n if (this.maskExpression.startsWith(\"separator\" /* MaskExpression.SEPARATOR */) && (this.leadZero || !this.dropSpecialCharacters)) {\n return value;\n }\n if (String(value).length > 16 && this.separatorLimit.length > 14) {\n return String(value);\n }\n const num = Number(value);\n if (this.maskExpression.startsWith(\"separator\" /* MaskExpression.SEPARATOR */) && Number.isNaN(num)) {\n const val = String(value).replace(',', '.');\n return Number(val);\n }\n return Number.isNaN(num) ? value : num;\n }\n _removeMask(value, specialCharactersForRemove) {\n if (this.maskExpression.startsWith(\"percent\" /* MaskExpression.PERCENT */) && value.includes(\".\" /* MaskExpression.DOT */)) {\n return value;\n }\n return value ? value.replace(this._regExpForRemove(specialCharactersForRemove), \"\" /* MaskExpression.EMPTY_STRING */) : value;\n }\n _removePrefix(value) {\n if (!this.prefix) {\n return value;\n }\n return value ? value.replace(this.prefix, \"\" /* MaskExpression.EMPTY_STRING */) : value;\n }\n _removeSuffix(value) {\n if (!this.suffix) {\n return value;\n }\n return value ? value.replace(this.suffix, \"\" /* MaskExpression.EMPTY_STRING */) : value;\n }\n _retrieveSeparatorValue(result) {\n let specialCharacters = Array.isArray(this.dropSpecialCharacters) ? this.specialCharacters.filter(v => {\n return this.dropSpecialCharacters.includes(v);\n }) : this.specialCharacters;\n if (!this.deletedSpecialCharacter && this._checkPatternForSpace() && result.includes(\" \" /* MaskExpression.WHITE_SPACE */) && this.maskExpression.includes(\"*\" /* MaskExpression.SYMBOL_STAR */)) {\n specialCharacters = specialCharacters.filter(char => char !== \" \" /* MaskExpression.WHITE_SPACE */);\n }\n return this._removeMask(result, specialCharacters);\n }\n _regExpForRemove(specialCharactersForRemove) {\n return new RegExp(specialCharactersForRemove.map(item => `\\\\${item}`).join('|'), 'gi');\n }\n _replaceDecimalMarkerToDot(value) {\n const markers = Array.isArray(this.decimalMarker) ? this.decimalMarker : [this.decimalMarker];\n return value.replace(this._regExpForRemove(markers), \".\" /* MaskExpression.DOT */);\n }\n _checkSymbols(result) {\n if (result === \"\" /* MaskExpression.EMPTY_STRING */) {\n return result;\n }\n if (this.maskExpression.startsWith(\"percent\" /* MaskExpression.PERCENT */) && this.decimalMarker === \",\" /* MaskExpression.COMMA */) {\n result = result.replace(\",\" /* MaskExpression.COMMA */, \".\" /* MaskExpression.DOT */);\n }\n const separatorPrecision = this._retrieveSeparatorPrecision(this.maskExpression);\n const separatorValue = this._replaceDecimalMarkerToDot(this._retrieveSeparatorValue(result));\n if (!this.isNumberValue) {\n return separatorValue;\n }\n if (separatorPrecision) {\n if (result === this.decimalMarker) {\n return null;\n }\n if (this.separatorLimit.length > 14) {\n return String(separatorValue);\n }\n return this._checkPrecision(this.maskExpression, separatorValue);\n } else {\n return separatorValue;\n }\n }\n _checkPatternForSpace() {\n for (const key in this.patterns) {\n // eslint-disable-next-line no-prototype-builtins\n if (this.patterns[key] && this.patterns[key]?.hasOwnProperty('pattern')) {\n const patternString = this.patterns[key]?.pattern.toString();\n const pattern = this.patterns[key]?.pattern;\n if (patternString?.includes(\" \" /* MaskExpression.WHITE_SPACE */) && pattern?.test(this.maskExpression)) {\n return true;\n }\n }\n }\n return false;\n }\n // TODO should think about helpers or separting decimal precision to own property\n _retrieveSeparatorPrecision(maskExpretion) {\n const matcher = maskExpretion.match(new RegExp(`^separator\\\\.([^d]*)`));\n return matcher ? Number(matcher[1]) : null;\n }\n _checkPrecision(separatorExpression, separatorValue) {\n const separatorPrecision = separatorExpression.slice(10, 11);\n if (separatorExpression.indexOf('2') > 0 || this.leadZero && Number(separatorPrecision) > 0) {\n if (this.decimalMarker === \",\" /* MaskExpression.COMMA */ && this.leadZero) {\n separatorValue = separatorValue.replace(',', '.');\n }\n return this.leadZero ? Number(separatorValue).toFixed(Number(separatorPrecision)) : Number(separatorValue).toFixed(2);\n }\n return this.numberToString(separatorValue);\n }\n _repeatPatternSymbols(maskExp) {\n return maskExp.match(/{[0-9]+}/) && maskExp.split(\"\" /* MaskExpression.EMPTY_STRING */).reduce((accum, currVal, index) => {\n this._start = currVal === \"{\" /* MaskExpression.CURLY_BRACKETS_LEFT */ ? index : this._start;\n if (currVal !== \"}\" /* MaskExpression.CURLY_BRACKETS_RIGHT */) {\n return this._findSpecialChar(currVal) ? accum + currVal : accum;\n }\n this._end = index;\n const repeatNumber = Number(maskExp.slice(this._start + 1, this._end));\n const replaceWith = new Array(repeatNumber + 1).join(maskExp[this._start - 1]);\n if (maskExp.slice(0, this._start).length > 1 && maskExp.includes(\"S\" /* MaskExpression.LETTER_S */)) {\n const symbols = maskExp.slice(0, this._start - 1);\n return symbols.includes(\"{\" /* MaskExpression.CURLY_BRACKETS_LEFT */) ? accum + replaceWith : symbols + accum + replaceWith;\n } else {\n return accum + replaceWith;\n }\n }, '') || maskExp;\n }\n currentLocaleDecimalMarker() {\n return 1.1.toLocaleString().substring(1, 2);\n }\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵNgxMaskService_BaseFactory;\n return function NgxMaskService_Factory(ɵt) {\n return (ɵNgxMaskService_BaseFactory || (ɵNgxMaskService_BaseFactory = i0.ɵɵgetInheritedFactory(NgxMaskService)))(ɵt || NgxMaskService);\n };\n })();\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: NgxMaskService,\n factory: NgxMaskService.ɵfac\n });\n }\n }\n return NgxMaskService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @internal\n */\nfunction _configFactory() {\n const initConfig = inject(INITIAL_CONFIG);\n const configValue = inject(NEW_CONFIG);\n return configValue instanceof Function ? {\n ...initConfig,\n ...configValue()\n } : {\n ...initConfig,\n ...configValue\n };\n}\nfunction provideNgxMask(configValue) {\n return [{\n provide: NEW_CONFIG,\n useValue: configValue\n }, {\n provide: INITIAL_CONFIG,\n useValue: initialConfig\n }, {\n provide: NGX_MASK_CONFIG,\n useFactory: _configFactory\n }, NgxMaskService];\n}\nfunction provideEnvironmentNgxMask(configValue) {\n return makeEnvironmentProviders(provideNgxMask(configValue));\n}\nlet NgxMaskDirective = /*#__PURE__*/(() => {\n class NgxMaskDirective {\n constructor() {\n this.maskExpression = '';\n this.specialCharacters = [];\n this.patterns = {};\n this.prefix = '';\n this.suffix = '';\n this.thousandSeparator = ' ';\n this.decimalMarker = '.';\n this.dropSpecialCharacters = null;\n this.hiddenInput = null;\n this.showMaskTyped = null;\n this.placeHolderCharacter = null;\n this.shownMaskExpression = null;\n this.showTemplate = null;\n this.clearIfNotMatch = null;\n this.validation = null;\n this.separatorLimit = null;\n this.allowNegativeNumbers = null;\n this.leadZeroDateTime = null;\n this.leadZero = null;\n this.triggerOnMaskChange = null;\n this.apm = null;\n this.inputTransformFn = null;\n this.outputTransformFn = null;\n this.keepCharacterPositions = null;\n this.maskFilled = new EventEmitter();\n this._maskValue = '';\n this._position = null;\n this._maskExpressionArray = [];\n this._allowFewMaskChangeMask = false;\n this._justPasted = false;\n this._isFocused = false;\n /**For IME composition event */\n this._isComposing = false;\n this.document = inject(DOCUMENT);\n this._maskService = inject(NgxMaskService, {\n self: true\n });\n this._config = inject(NGX_MASK_CONFIG);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.onChange = _ => {};\n this.onTouch = () => {};\n }\n ngOnChanges(changes) {\n const {\n maskExpression,\n specialCharacters,\n patterns,\n prefix,\n suffix,\n thousandSeparator,\n decimalMarker,\n dropSpecialCharacters,\n hiddenInput,\n showMaskTyped,\n placeHolderCharacter,\n shownMaskExpression,\n showTemplate,\n clearIfNotMatch,\n validation,\n separatorLimit,\n allowNegativeNumbers,\n leadZeroDateTime,\n leadZero,\n triggerOnMaskChange,\n apm,\n inputTransformFn,\n outputTransformFn,\n keepCharacterPositions\n } = changes;\n if (maskExpression) {\n if (maskExpression.currentValue !== maskExpression.previousValue && !maskExpression.firstChange) {\n this._maskService.maskChanged = true;\n }\n if (maskExpression.currentValue && maskExpression.currentValue.split(\"||\" /* MaskExpression.OR */).length > 1) {\n this._maskExpressionArray = maskExpression.currentValue.split(\"||\" /* MaskExpression.OR */).sort((a, b) => {\n return a.length - b.length;\n });\n this._setMask();\n } else {\n this._maskExpressionArray = [];\n this._maskValue = maskExpression.currentValue || \"\" /* MaskExpression.EMPTY_STRING */;\n this._maskService.maskExpression = this._maskValue;\n }\n }\n if (specialCharacters) {\n if (!specialCharacters.currentValue || !Array.isArray(specialCharacters.currentValue)) {\n return;\n } else {\n this._maskService.specialCharacters = specialCharacters.currentValue || [];\n }\n }\n if (allowNegativeNumbers) {\n this._maskService.allowNegativeNumbers = allowNegativeNumbers.currentValue;\n if (this._maskService.allowNegativeNumbers) {\n this._maskService.specialCharacters = this._maskService.specialCharacters.filter(c => c !== \"-\" /* MaskExpression.MINUS */);\n }\n }\n // Only overwrite the mask available patterns if a pattern has actually been passed in\n if (patterns && patterns.currentValue) {\n this._maskService.patterns = patterns.currentValue;\n }\n if (apm && apm.currentValue) {\n this._maskService.apm = apm.currentValue;\n }\n if (prefix) {\n this._maskService.prefix = prefix.currentValue;\n }\n if (suffix) {\n this._maskService.suffix = suffix.currentValue;\n }\n if (thousandSeparator) {\n this._maskService.thousandSeparator = thousandSeparator.currentValue;\n }\n if (decimalMarker) {\n this._maskService.decimalMarker = decimalMarker.currentValue;\n }\n if (dropSpecialCharacters) {\n this._maskService.dropSpecialCharacters = dropSpecialCharacters.currentValue;\n }\n if (hiddenInput) {\n this._maskService.hiddenInput = hiddenInput.currentValue;\n }\n if (showMaskTyped) {\n this._maskService.showMaskTyped = showMaskTyped.currentValue;\n if (showMaskTyped.previousValue === false && showMaskTyped.currentValue === true && this._isFocused) {\n requestAnimationFrame(() => {\n this._maskService._elementRef?.nativeElement.click();\n });\n }\n }\n if (placeHolderCharacter) {\n this._maskService.placeHolderCharacter = placeHolderCharacter.currentValue;\n }\n if (shownMaskExpression) {\n this._maskService.shownMaskExpression = shownMaskExpression.currentValue;\n }\n if (showTemplate) {\n this._maskService.showTemplate = showTemplate.currentValue;\n }\n if (clearIfNotMatch) {\n this._maskService.clearIfNotMatch = clearIfNotMatch.currentValue;\n }\n if (validation) {\n this._maskService.validation = validation.currentValue;\n }\n if (separatorLimit) {\n this._maskService.separatorLimit = separatorLimit.currentValue;\n }\n if (leadZeroDateTime) {\n this._maskService.leadZeroDateTime = leadZeroDateTime.currentValue;\n }\n if (leadZero) {\n this._maskService.leadZero = leadZero.currentValue;\n }\n if (triggerOnMaskChange) {\n this._maskService.triggerOnMaskChange = triggerOnMaskChange.currentValue;\n }\n if (inputTransformFn) {\n this._maskService.inputTransformFn = inputTransformFn.currentValue;\n }\n if (outputTransformFn) {\n this._maskService.outputTransformFn = outputTransformFn.currentValue;\n }\n if (keepCharacterPositions) {\n this._maskService.keepCharacterPositions = keepCharacterPositions.currentValue;\n }\n this._applyMask();\n }\n validate({\n value\n }) {\n if (!this._maskService.validation || !this._maskValue) {\n return null;\n }\n if (this._maskService.ipError) {\n return this._createValidationError(value);\n }\n if (this._maskService.cpfCnpjError) {\n return this._createValidationError(value);\n }\n if (this._maskValue.startsWith(\"separator\" /* MaskExpression.SEPARATOR */)) {\n return null;\n }\n if (withoutValidation.includes(this._maskValue)) {\n return null;\n }\n if (this._maskService.clearIfNotMatch) {\n return null;\n }\n if (timeMasks.includes(this._maskValue)) {\n return this._validateTime(value);\n }\n if (value && value.toString().length >= 1) {\n let counterOfOpt = 0;\n if (this._maskValue.includes(\"{\" /* MaskExpression.CURLY_BRACKETS_LEFT */) && this._maskValue.includes(\"}\" /* MaskExpression.CURLY_BRACKETS_RIGHT */)) {\n const lengthInsideCurlyBrackets = this._maskValue.slice(this._maskValue.indexOf(\"{\" /* MaskExpression.CURLY_BRACKETS_LEFT */) + 1, this._maskValue.indexOf(\"}\" /* MaskExpression.CURLY_BRACKETS_RIGHT */));\n return lengthInsideCurlyBrackets === String(value.length) ? null : this._createValidationError(value);\n }\n if (this._maskValue.startsWith(\"percent\" /* MaskExpression.PERCENT */)) {\n return null;\n }\n for (const key in this._maskService.patterns) {\n if (this._maskService.patterns[key]?.optional) {\n if (this._maskValue.indexOf(key) !== this._maskValue.lastIndexOf(key)) {\n const opt = this._maskValue.split(\"\" /* MaskExpression.EMPTY_STRING */).filter(i => i === key).join(\"\" /* MaskExpression.EMPTY_STRING */);\n counterOfOpt += opt.length;\n } else if (this._maskValue.indexOf(key) !== -1) {\n counterOfOpt++;\n }\n if (this._maskValue.indexOf(key) !== -1 && value.toString().length >= this._maskValue.indexOf(key)) {\n return null;\n }\n if (counterOfOpt === this._maskValue.length) {\n return null;\n }\n }\n }\n if (this._maskValue.indexOf(\"*\" /* MaskExpression.SYMBOL_STAR */) > 1 && value.toString().length < this._maskValue.indexOf(\"*\" /* MaskExpression.SYMBOL_STAR */) || this._maskValue.indexOf(\"?\" /* MaskExpression.SYMBOL_QUESTION */) > 1 && value.toString().length < this._maskValue.indexOf(\"?\" /* MaskExpression.SYMBOL_QUESTION */)) {\n return this._createValidationError(value);\n }\n if (this._maskValue.indexOf(\"*\" /* MaskExpression.SYMBOL_STAR */) === -1 || this._maskValue.indexOf(\"?\" /* MaskExpression.SYMBOL_QUESTION */) === -1) {\n value = typeof value === 'number' ? String(value) : value;\n const array = this._maskValue.split('*');\n const length = this._maskService.dropSpecialCharacters ? this._maskValue.length - this._maskService.checkDropSpecialCharAmount(this._maskValue) - counterOfOpt : this.prefix ? this._maskValue.length + this.prefix.length - counterOfOpt : this._maskValue.length - counterOfOpt;\n if (array.length === 1) {\n if (value.toString().length < length) {\n return this._createValidationError(value);\n }\n }\n if (array.length > 1) {\n const lastIndexArray = array[array.length - 1];\n if (lastIndexArray && this._maskService.specialCharacters.includes(lastIndexArray[0]) && String(value).includes(lastIndexArray[0] ?? '') && !this.dropSpecialCharacters) {\n const special = value.split(lastIndexArray[0]);\n return special[special.length - 1].length === lastIndexArray.length - 1 ? null : this._createValidationError(value);\n } else if ((lastIndexArray && !this._maskService.specialCharacters.includes(lastIndexArray[0]) || !lastIndexArray || this._maskService.dropSpecialCharacters) && value.length >= length - 1) {\n return null;\n } else {\n return this._createValidationError(value);\n }\n }\n }\n if (this._maskValue.indexOf(\"*\" /* MaskExpression.SYMBOL_STAR */) === 1 || this._maskValue.indexOf(\"?\" /* MaskExpression.SYMBOL_QUESTION */) === 1) {\n return null;\n }\n }\n if (value) {\n this.maskFilled.emit();\n return null;\n }\n return null;\n }\n onPaste() {\n this._justPasted = true;\n }\n onFocus() {\n this._isFocused = true;\n }\n onModelChange(value) {\n // on form reset we need to update the actualValue\n if ((value === \"\" /* MaskExpression.EMPTY_STRING */ || value === null || value === undefined) && this._maskService.actualValue) {\n this._maskService.actualValue = this._maskService.getActualValue(\"\" /* MaskExpression.EMPTY_STRING */);\n }\n }\n onInput(e) {\n // If IME is composing text, we wait for the composed text.\n if (this._isComposing) return;\n const el = e.target;\n const transformedValue = this._maskService.inputTransformFn(el.value);\n if (el.type !== 'number') {\n if (typeof transformedValue === 'string' || typeof transformedValue === 'number') {\n el.value = transformedValue.toString();\n this._inputValue = el.value;\n this._setMask();\n if (!this._maskValue) {\n this.onChange(el.value);\n return;\n }\n let position = el.selectionStart === 1 ? el.selectionStart + this._maskService.prefix.length : el.selectionStart;\n if (this.showMaskTyped && this.keepCharacterPositions && this._maskService.placeHolderCharacter.length === 1) {\n const inputSymbol = el.value.slice(position - 1, position);\n const prefixLength = this.prefix.length;\n const checkSymbols = this._maskService._checkSymbolMask(inputSymbol, this._maskService.maskExpression[position - 1 - prefixLength] ?? \"\" /* MaskExpression.EMPTY_STRING */);\n const checkSpecialCharacter = this._maskService._checkSymbolMask(inputSymbol, this._maskService.maskExpression[position + 1 - prefixLength] ?? \"\" /* MaskExpression.EMPTY_STRING */);\n const selectRangeBackspace = this._maskService.selStart === this._maskService.selEnd;\n const selStart = Number(this._maskService.selStart) - prefixLength;\n const selEnd = Number(this._maskService.selEnd) - prefixLength;\n if (this._code === \"Backspace\" /* MaskExpression.BACKSPACE */) {\n if (!selectRangeBackspace) {\n if (this._maskService.selStart === prefixLength) {\n this._maskService.actualValue = `${this.prefix}${this._maskService.maskIsShown.slice(0, selEnd)}${this._inputValue.split(this.prefix).join('')}`;\n } else if (this._maskService.selStart === this._maskService.maskIsShown.length + prefixLength) {\n this._maskService.actualValue = `${this._inputValue}${this._maskService.maskIsShown.slice(selStart, selEnd)}`;\n } else {\n this._maskService.actualValue = `${this.prefix}${this._inputValue.split(this.prefix).join('').slice(0, selStart)}${this._maskService.maskIsShown.slice(selStart, selEnd)}${this._maskService.actualValue.slice(selEnd + prefixLength, this._maskService.maskIsShown.length + prefixLength)}${this.suffix}`;\n }\n } else if (!this._maskService.specialCharacters.includes(this._maskService.maskExpression.slice(position - this.prefix.length, position + 1 - this.prefix.length)) && selectRangeBackspace) {\n if (selStart === 1 && this.prefix) {\n this._maskService.actualValue = `${this.prefix}${this._maskService.placeHolderCharacter}${el.value.split(this.prefix).join('').split(this.suffix).join('')}${this.suffix}`;\n position = position - 1;\n } else {\n const part1 = el.value.substring(0, position);\n const part2 = el.value.substring(position);\n this._maskService.actualValue = `${part1}${this._maskService.placeHolderCharacter}${part2}`;\n }\n }\n }\n if (this._code !== \"Backspace\" /* MaskExpression.BACKSPACE */) {\n if (!checkSymbols && !checkSpecialCharacter && selectRangeBackspace) {\n position = Number(el.selectionStart) - 1;\n } else if (this._maskService.specialCharacters.includes(el.value.slice(position, position + 1)) && checkSpecialCharacter && !this._maskService.specialCharacters.includes(el.value.slice(position + 1, position + 2))) {\n this._maskService.actualValue = `${el.value.slice(0, position - 1)}${el.value.slice(position, position + 1)}${inputSymbol}${el.value.slice(position + 2)}`;\n position = position + 1;\n } else if (checkSymbols) {\n if (el.value.length === 1 && position === 1) {\n this._maskService.actualValue = `${this.prefix}${inputSymbol}${this._maskService.maskIsShown.slice(1, this._maskService.maskIsShown.length)}${this.suffix}`;\n } else {\n this._maskService.actualValue = `${el.value.slice(0, position - 1)}${inputSymbol}${el.value.slice(position + 1).split(this.suffix).join('')}${this.suffix}`;\n }\n } else if (this.prefix && el.value.length === 1 && position - prefixLength === 1 && this._maskService._checkSymbolMask(el.value, this._maskService.maskExpression[position - 1 - prefixLength] ?? \"\" /* MaskExpression.EMPTY_STRING */)) {\n this._maskService.actualValue = `${this.prefix}${el.value}${this._maskService.maskIsShown.slice(1, this._maskService.maskIsShown.length)}${this.suffix}`;\n }\n }\n }\n let caretShift = 0;\n let backspaceShift = false;\n if (this._code === \"Delete\" /* MaskExpression.DELETE */ && \"separator\" /* MaskExpression.SEPARATOR */) {\n this._maskService.deletedSpecialCharacter = true;\n }\n if (this._inputValue.length >= this._maskService.maskExpression.length - 1 && this._code !== \"Backspace\" /* MaskExpression.BACKSPACE */ && this._maskService.maskExpression === \"d0/M0/0000\" /* MaskExpression.DAYS_MONTHS_YEARS */ && position < 10) {\n const inputSymbol = this._inputValue.slice(position - 1, position);\n el.value = this._inputValue.slice(0, position - 1) + inputSymbol + this._inputValue.slice(position + 1);\n }\n if (this._maskService.maskExpression === \"d0/M0/0000\" /* MaskExpression.DAYS_MONTHS_YEARS */ && this.leadZeroDateTime) {\n if (position < 3 && Number(el.value) > 31 && Number(el.value) < 40 || position === 5 && Number(el.value.slice(3, 5)) > 12) {\n position = position + 2;\n }\n }\n if (this._maskService.maskExpression === \"Hh:m0:s0\" /* MaskExpression.HOURS_MINUTES_SECONDS */ && this.apm) {\n if (this._justPasted && el.value.slice(0, 2) === \"00\" /* MaskExpression.DOUBLE_ZERO */) {\n el.value = el.value.slice(1, 2) + el.value.slice(2, el.value.length);\n }\n el.value = el.value === \"00\" /* MaskExpression.DOUBLE_ZERO */ ? \"0\" /* MaskExpression.NUMBER_ZERO */ : el.value;\n }\n this._maskService.applyValueChanges(position, this._justPasted, this._code === \"Backspace\" /* MaskExpression.BACKSPACE */ || this._code === \"Delete\" /* MaskExpression.DELETE */, (shift, _backspaceShift) => {\n this._justPasted = false;\n caretShift = shift;\n backspaceShift = _backspaceShift;\n });\n // only set the selection if the element is active\n if (this._getActiveElement() !== el) {\n return;\n }\n if (this._maskService.plusOnePosition) {\n position = position + 1;\n this._maskService.plusOnePosition = false;\n }\n // update position after applyValueChanges to prevent cursor on wrong position when it has an array of maskExpression\n if (this._maskExpressionArray.length) {\n if (this._code === \"Backspace\" /* MaskExpression.BACKSPACE */) {\n const specialChartMinusOne = this.specialCharacters.includes(this._maskService.actualValue.slice(position - 1, position));\n const specialChartPlusOne = this.specialCharacters.includes(this._maskService.actualValue.slice(position, position + 1));\n if (this._allowFewMaskChangeMask && !specialChartPlusOne) {\n position = el.selectionStart + 1;\n this._allowFewMaskChangeMask = false;\n } else {\n position = specialChartMinusOne ? position - 1 : position;\n }\n } else {\n position = el.selectionStart === 1 ? el.selectionStart + this._maskService.prefix.length : el.selectionStart;\n }\n }\n this._position = this._position === 1 && this._inputValue.length === 1 ? null : this._position;\n let positionToApply = this._position ? this._inputValue.length + position + caretShift : position + (this._code === \"Backspace\" /* MaskExpression.BACKSPACE */ && !backspaceShift ? 0 : caretShift);\n if (positionToApply > this._getActualInputLength()) {\n positionToApply = el.value === this._maskService.decimalMarker && el.value.length === 1 ? this._getActualInputLength() + 1 : this._getActualInputLength();\n }\n if (positionToApply < 0) {\n positionToApply = 0;\n }\n el.setSelectionRange(positionToApply, positionToApply);\n this._position = null;\n } else {\n console.warn('Ngx-mask writeValue work with string | number, your current value:', typeof transformedValue);\n }\n } else {\n if (!this._maskValue) {\n this.onChange(el.value);\n return;\n }\n this._maskService.applyValueChanges(el.value.length, this._justPasted, this._code === \"Backspace\" /* MaskExpression.BACKSPACE */ || this._code === \"Delete\" /* MaskExpression.DELETE */);\n }\n }\n // IME starts\n onCompositionStart() {\n this._isComposing = true;\n }\n // IME completes\n onCompositionEnd(e) {\n this._isComposing = false;\n this._justPasted = true;\n this.onInput(e);\n }\n onBlur(e) {\n if (this._maskValue) {\n const el = e.target;\n if (this.leadZero && el.value.length > 0 && typeof this.decimalMarker === 'string') {\n const maskExpression = this._maskService.maskExpression;\n const precision = Number(this._maskService.maskExpression.slice(maskExpression.length - 1, maskExpression.length));\n if (precision > 0) {\n el.value = this.suffix ? el.value.split(this.suffix).join('') : el.value;\n const decimalPart = el.value.split(this.decimalMarker)[1];\n el.value = el.value.includes(this.decimalMarker) ? el.value + \"0\" /* MaskExpression.NUMBER_ZERO */.repeat(precision - decimalPart.length) + this.suffix : el.value + this.decimalMarker + \"0\" /* MaskExpression.NUMBER_ZERO */.repeat(precision) + this.suffix;\n this._maskService.actualValue = el.value;\n }\n }\n this._maskService.clearIfNotMatchFn();\n }\n this._isFocused = false;\n this.onTouch();\n }\n onClick(e) {\n if (!this._maskValue) {\n return;\n }\n const el = e.target;\n const posStart = 0;\n const posEnd = 0;\n if (el !== null && el.selectionStart !== null && el.selectionStart === el.selectionEnd && el.selectionStart > this._maskService.prefix.length &&\n // eslint-disable-next-line\n e.keyCode !== 38) {\n if (this._maskService.showMaskTyped && !this.keepCharacterPositions) {\n // We are showing the mask in the input\n this._maskService.maskIsShown = this._maskService.showMaskInInput();\n if (el.setSelectionRange && this._maskService.prefix + this._maskService.maskIsShown === el.value) {\n // the input ONLY contains the mask, so position the cursor at the start\n el.focus();\n el.setSelectionRange(posStart, posEnd);\n } else {\n // the input contains some characters already\n if (el.selectionStart > this._maskService.actualValue.length) {\n // if the user clicked beyond our value's length, position the cursor at the end of our value\n el.setSelectionRange(this._maskService.actualValue.length, this._maskService.actualValue.length);\n }\n }\n }\n }\n const nextValue = el && (el.value === this._maskService.prefix ? this._maskService.prefix + this._maskService.maskIsShown : el.value);\n /** Fix of cursor position jumping to end in most browsers no matter where cursor is inserted onFocus */\n if (el && el.value !== nextValue) {\n el.value = nextValue;\n }\n /** fix of cursor position with prefix when mouse click occur */\n if (el && el.type !== 'number' && (el.selectionStart || el.selectionEnd) <= this._maskService.prefix.length) {\n el.selectionStart = this._maskService.prefix.length;\n return;\n }\n /** select only inserted text */\n if (el && el.selectionEnd > this._getActualInputLength()) {\n el.selectionEnd = this._getActualInputLength();\n }\n }\n onKeyDown(e) {\n if (!this._maskValue) {\n return;\n }\n if (this._isComposing) {\n // User finalize their choice from IME composition, so trigger onInput() for the composed text.\n if (e.key === 'Enter') this.onCompositionEnd(e);\n return;\n }\n this._code = e.code ? e.code : e.key;\n const el = e.target;\n this._inputValue = el.value;\n this._setMask();\n if (el.type !== 'number') {\n if (e.key === \"ArrowUp\" /* MaskExpression.ARROW_UP */) {\n e.preventDefault();\n }\n if (e.key === \"ArrowLeft\" /* MaskExpression.ARROW_LEFT */ || e.key === \"Backspace\" /* MaskExpression.BACKSPACE */ || e.key === \"Delete\" /* MaskExpression.DELETE */) {\n if (e.key === \"Backspace\" /* MaskExpression.BACKSPACE */ && el.value.length === 0) {\n el.selectionStart = el.selectionEnd;\n }\n if (e.key === \"Backspace\" /* MaskExpression.BACKSPACE */ && el.selectionStart !== 0) {\n // If specialChars is false, (shouldn't ever happen) then set to the defaults\n this.specialCharacters = this.specialCharacters?.length ? this.specialCharacters : this._config.specialCharacters;\n if (this.prefix.length > 1 && el.selectionStart <= this.prefix.length) {\n el.setSelectionRange(this.prefix.length, el.selectionEnd);\n } else {\n if (this._inputValue.length !== el.selectionStart && el.selectionStart !== 1) {\n while (this.specialCharacters.includes((this._inputValue[el.selectionStart - 1] ?? \"\" /* MaskExpression.EMPTY_STRING */).toString()) && (this.prefix.length >= 1 && el.selectionStart > this.prefix.length || this.prefix.length === 0)) {\n el.setSelectionRange(el.selectionStart - 1, el.selectionEnd);\n }\n }\n }\n }\n this.checkSelectionOnDeletion(el);\n if (this._maskService.prefix.length && el.selectionStart <= this._maskService.prefix.length && el.selectionEnd <= this._maskService.prefix.length) {\n e.preventDefault();\n }\n const cursorStart = el.selectionStart;\n if (e.key === \"Backspace\" /* MaskExpression.BACKSPACE */ && !el.readOnly && cursorStart === 0 && el.selectionEnd === el.value.length && el.value.length !== 0) {\n this._position = this._maskService.prefix ? this._maskService.prefix.length : 0;\n this._maskService.applyMask(this._maskService.prefix, this._maskService.maskExpression, this._position);\n }\n }\n if (!!this.suffix && this.suffix.length > 1 && this._inputValue.length - this.suffix.length < el.selectionStart) {\n el.setSelectionRange(this._inputValue.length - this.suffix.length, this._inputValue.length);\n } else if (e.code === 'KeyA' && e.ctrlKey || e.code === 'KeyA' && e.metaKey // Cmd + A (Mac)\n ) {\n el.setSelectionRange(0, this._getActualInputLength());\n e.preventDefault();\n }\n this._maskService.selStart = el.selectionStart;\n this._maskService.selEnd = el.selectionEnd;\n }\n }\n /** It writes the value in the input */\n async writeValue(controlValue) {\n if (typeof controlValue === 'object' && controlValue !== null && 'value' in controlValue) {\n if ('disable' in controlValue) {\n this.setDisabledState(Boolean(controlValue.disable));\n }\n controlValue = controlValue.value;\n }\n if (controlValue !== null) {\n controlValue = this.inputTransformFn ? this.inputTransformFn(controlValue) : controlValue;\n }\n if (typeof controlValue === 'string' || typeof controlValue === 'number' || controlValue === null || controlValue === undefined) {\n if (controlValue === null || controlValue === undefined || controlValue === '') {\n this._maskService._currentValue = '';\n this._maskService._previousValue = '';\n }\n let inputValue = controlValue;\n if (typeof inputValue === 'number' || this._maskValue.startsWith(\"separator\" /* MaskExpression.SEPARATOR */)) {\n inputValue = String(inputValue);\n const localeDecimalMarker = this._maskService.currentLocaleDecimalMarker();\n if (!Array.isArray(this._maskService.decimalMarker)) {\n inputValue = this._maskService.decimalMarker !== localeDecimalMarker ? inputValue.replace(localeDecimalMarker, this._maskService.decimalMarker) : inputValue;\n }\n if (this._maskService.leadZero && inputValue && this.maskExpression && this.dropSpecialCharacters !== false) {\n inputValue = this._maskService._checkPrecision(this._maskService.maskExpression, inputValue);\n }\n if (this.decimalMarker === \",\" /* MaskExpression.COMMA */ || Array.isArray(this._maskService.decimalMarker) && this.thousandSeparator === \".\" /* MaskExpression.DOT */) {\n inputValue = inputValue.toString().replace(\".\" /* MaskExpression.DOT */, \",\" /* MaskExpression.COMMA */);\n }\n if (this.maskExpression?.startsWith(\"separator\" /* MaskExpression.SEPARATOR */) && this.leadZero) {\n requestAnimationFrame(() => {\n this._maskService.applyMask(inputValue?.toString() ?? '', this._maskService.maskExpression);\n });\n }\n this._maskService.isNumberValue = true;\n }\n if (typeof inputValue !== 'string') {\n inputValue = '';\n }\n this._inputValue = inputValue;\n this._setMask();\n if (inputValue && this._maskService.maskExpression || this._maskService.maskExpression && (this._maskService.prefix || this._maskService.showMaskTyped)) {\n // Let the service we know we are writing value so that triggering onChange function won't happen during applyMask\n typeof this.inputTransformFn !== 'function' ? this._maskService.writingValue = true : '';\n this._maskService.formElementProperty = ['value', this._maskService.applyMask(inputValue, this._maskService.maskExpression)];\n // Let the service know we've finished writing value\n typeof this.inputTransformFn !== 'function' ? this._maskService.writingValue = false : '';\n } else {\n this._maskService.formElementProperty = ['value', inputValue];\n }\n this._inputValue = inputValue;\n } else {\n console.warn('Ngx-mask writeValue work with string | number, your current value:', typeof controlValue);\n }\n }\n registerOnChange(fn) {\n this._maskService.onChange = this.onChange = fn;\n }\n registerOnTouched(fn) {\n this.onTouch = fn;\n }\n _getActiveElement(document = this.document) {\n const shadowRootEl = document?.activeElement?.shadowRoot;\n if (!shadowRootEl?.activeElement) {\n return document.activeElement;\n } else {\n return this._getActiveElement(shadowRootEl);\n }\n }\n checkSelectionOnDeletion(el) {\n el.selectionStart = Math.min(Math.max(this.prefix.length, el.selectionStart), this._inputValue.length - this.suffix.length);\n el.selectionEnd = Math.min(Math.max(this.prefix.length, el.selectionEnd), this._inputValue.length - this.suffix.length);\n }\n /** It disables the input element */\n setDisabledState(isDisabled) {\n this._maskService.formElementProperty = ['disabled', isDisabled];\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _applyMask() {\n this._maskService.maskExpression = this._maskService._repeatPatternSymbols(this._maskValue || '');\n this._maskService.formElementProperty = ['value', this._maskService.applyMask(this._inputValue, this._maskService.maskExpression)];\n }\n _validateTime(value) {\n const rowMaskLen = this._maskValue.split(\"\" /* MaskExpression.EMPTY_STRING */).filter(s => s !== ':').length;\n if (!value) {\n return null; // Don't validate empty values to allow for optional form control\n }\n if (+(value[value.length - 1] ?? -1) === 0 && value.length < rowMaskLen || value.length <= rowMaskLen - 2) {\n return this._createValidationError(value);\n }\n return null;\n }\n _getActualInputLength() {\n return this._maskService.actualValue.length || this._maskService.actualValue.length + this._maskService.prefix.length;\n }\n _createValidationError(actualValue) {\n return {\n mask: {\n requiredMask: this._maskValue,\n actualValue\n }\n };\n }\n _setMask() {\n this._maskExpressionArray.some(mask => {\n const specialChart = mask.split(\"\" /* MaskExpression.EMPTY_STRING */).some(char => this._maskService.specialCharacters.includes(char));\n if (specialChart && this._inputValue && this._areAllCharactersInEachStringSame(this._maskExpressionArray) || mask.includes(\"{\" /* MaskExpression.CURLY_BRACKETS_LEFT */)) {\n const test = this._maskService.removeMask(this._inputValue)?.length <= this._maskService.removeMask(mask)?.length;\n if (test) {\n this._maskValue = this.maskExpression = this._maskService.maskExpression = mask.includes(\"{\" /* MaskExpression.CURLY_BRACKETS_LEFT */) ? this._maskService._repeatPatternSymbols(mask) : mask;\n return test;\n } else {\n if (this._code === \"Backspace\" /* MaskExpression.BACKSPACE */) {\n this._allowFewMaskChangeMask = true;\n }\n const expression = this._maskExpressionArray[this._maskExpressionArray.length - 1] ?? \"\" /* MaskExpression.EMPTY_STRING */;\n this._maskValue = this.maskExpression = this._maskService.maskExpression = expression.includes(\"{\" /* MaskExpression.CURLY_BRACKETS_LEFT */) ? this._maskService._repeatPatternSymbols(expression) : expression;\n }\n } else {\n const check = this._maskService.removeMask(this._inputValue)?.split(\"\" /* MaskExpression.EMPTY_STRING */).every((character, index) => {\n const indexMask = mask.charAt(index);\n return this._maskService._checkSymbolMask(character, indexMask);\n });\n if (check || this._justPasted) {\n this._maskValue = this.maskExpression = this._maskService.maskExpression = mask;\n return check;\n }\n }\n });\n }\n _areAllCharactersInEachStringSame(array) {\n const specialCharacters = this._maskService.specialCharacters;\n function removeSpecialCharacters(str) {\n const regex = new RegExp(`[${specialCharacters.map(ch => `\\\\${ch}`).join('')}]`, 'g');\n return str.replace(regex, '');\n }\n const processedArr = array.map(removeSpecialCharacters);\n return processedArr.every(str => {\n const uniqueCharacters = new Set(str);\n return uniqueCharacters.size === 1;\n });\n }\n static {\n this.ɵfac = function NgxMaskDirective_Factory(ɵt) {\n return new (ɵt || NgxMaskDirective)();\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: NgxMaskDirective,\n selectors: [[\"input\", \"mask\", \"\"], [\"textarea\", \"mask\", \"\"]],\n hostBindings: function NgxMaskDirective_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"paste\", function NgxMaskDirective_paste_HostBindingHandler() {\n return ctx.onPaste();\n })(\"focus\", function NgxMaskDirective_focus_HostBindingHandler($event) {\n return ctx.onFocus($event);\n })(\"ngModelChange\", function NgxMaskDirective_ngModelChange_HostBindingHandler($event) {\n return ctx.onModelChange($event);\n })(\"input\", function NgxMaskDirective_input_HostBindingHandler($event) {\n return ctx.onInput($event);\n })(\"compositionstart\", function NgxMaskDirective_compositionstart_HostBindingHandler($event) {\n return ctx.onCompositionStart($event);\n })(\"compositionend\", function NgxMaskDirective_compositionend_HostBindingHandler($event) {\n return ctx.onCompositionEnd($event);\n })(\"blur\", function NgxMaskDirective_blur_HostBindingHandler($event) {\n return ctx.onBlur($event);\n })(\"click\", function NgxMaskDirective_click_HostBindingHandler($event) {\n return ctx.onClick($event);\n })(\"keydown\", function NgxMaskDirective_keydown_HostBindingHandler($event) {\n return ctx.onKeyDown($event);\n });\n }\n },\n inputs: {\n maskExpression: [0, \"mask\", \"maskExpression\"],\n specialCharacters: \"specialCharacters\",\n patterns: \"patterns\",\n prefix: \"prefix\",\n suffix: \"suffix\",\n thousandSeparator: \"thousandSeparator\",\n decimalMarker: \"decimalMarker\",\n dropSpecialCharacters: \"dropSpecialCharacters\",\n hiddenInput: \"hiddenInput\",\n showMaskTyped: \"showMaskTyped\",\n placeHolderCharacter: \"placeHolderCharacter\",\n shownMaskExpression: \"shownMaskExpression\",\n showTemplate: \"showTemplate\",\n clearIfNotMatch: \"clearIfNotMatch\",\n validation: \"validation\",\n separatorLimit: \"separatorLimit\",\n allowNegativeNumbers: \"allowNegativeNumbers\",\n leadZeroDateTime: \"leadZeroDateTime\",\n leadZero: \"leadZero\",\n triggerOnMaskChange: \"triggerOnMaskChange\",\n apm: \"apm\",\n inputTransformFn: \"inputTransformFn\",\n outputTransformFn: \"outputTransformFn\",\n keepCharacterPositions: \"keepCharacterPositions\"\n },\n outputs: {\n maskFilled: \"maskFilled\"\n },\n exportAs: [\"mask\", \"ngxMask\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: NG_VALUE_ACCESSOR,\n useExisting: NgxMaskDirective,\n multi: true\n }, {\n provide: NG_VALIDATORS,\n useExisting: NgxMaskDirective,\n multi: true\n }, NgxMaskService]), i0.ɵɵNgOnChangesFeature]\n });\n }\n }\n return NgxMaskDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet NgxMaskPipe = /*#__PURE__*/(() => {\n class NgxMaskPipe {\n constructor() {\n this.defaultOptions = inject(NGX_MASK_CONFIG);\n this._maskService = inject(NgxMaskService);\n this._maskExpressionArray = [];\n this.mask = '';\n }\n transform(value, mask, {\n patterns,\n ...config\n } = {}) {\n const currentConfig = {\n maskExpression: mask,\n ...this.defaultOptions,\n ...config,\n patterns: {\n ...this._maskService.patterns,\n ...patterns\n }\n };\n Object.entries(currentConfig).forEach(([key, value]) => {\n //eslint-disable-next-line @typescript-eslint/no-explicit-any\n this._maskService[key] = value;\n });\n if (mask.includes('||')) {\n if (mask.split('||').length > 1) {\n this._maskExpressionArray = mask.split('||').sort((a, b) => {\n return a.length - b.length;\n });\n this._setMask(value);\n return this._maskService.applyMask(`${value}`, this.mask);\n } else {\n this._maskExpressionArray = [];\n return this._maskService.applyMask(`${value}`, this.mask);\n }\n }\n if (mask.includes(\"{\" /* MaskExpression.CURLY_BRACKETS_LEFT */)) {\n return this._maskService.applyMask(`${value}`, this._maskService._repeatPatternSymbols(mask));\n }\n if (mask.startsWith(\"separator\" /* MaskExpression.SEPARATOR */)) {\n if (config.decimalMarker) {\n this._maskService.decimalMarker = config.decimalMarker;\n }\n if (config.thousandSeparator) {\n this._maskService.thousandSeparator = config.thousandSeparator;\n }\n if (config.leadZero) {\n this._maskService.leadZero = config.leadZero;\n }\n value = String(value);\n const localeDecimalMarker = this._maskService.currentLocaleDecimalMarker();\n if (!Array.isArray(this._maskService.decimalMarker)) {\n value = this._maskService.decimalMarker !== localeDecimalMarker ? value.replace(localeDecimalMarker, this._maskService.decimalMarker) : value;\n }\n if (this._maskService.leadZero && value && this._maskService.dropSpecialCharacters !== false) {\n value = this._maskService._checkPrecision(mask, value);\n }\n if (this._maskService.decimalMarker === \",\" /* MaskExpression.COMMA */) {\n value = value.toString().replace(\".\" /* MaskExpression.DOT */, \",\" /* MaskExpression.COMMA */);\n }\n this._maskService.isNumberValue = true;\n }\n if (value === null || value === undefined) {\n return this._maskService.applyMask('', mask);\n }\n return this._maskService.applyMask(`${value}`, mask);\n }\n _setMask(value) {\n if (this._maskExpressionArray.length > 0) {\n this._maskExpressionArray.some(mask => {\n const test = this._maskService.removeMask(value)?.length <= this._maskService.removeMask(mask)?.length;\n if (value && test) {\n this.mask = mask;\n return test;\n } else {\n const expression = this._maskExpressionArray[this._maskExpressionArray.length - 1] ?? \"\" /* MaskExpression.EMPTY_STRING */;\n this.mask = expression;\n }\n });\n }\n }\n static {\n this.ɵfac = function NgxMaskPipe_Factory(ɵt) {\n return new (ɵt || NgxMaskPipe)();\n };\n }\n static {\n this.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"mask\",\n type: NgxMaskPipe,\n pure: true,\n standalone: true\n });\n }\n }\n return NgxMaskPipe;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { INITIAL_CONFIG, NEW_CONFIG, NGX_MASK_CONFIG, NgxMaskDirective, NgxMaskPipe, NgxMaskService, initialConfig, provideEnvironmentNgxMask, provideNgxMask, timeMasks, withoutValidation };\n","import { CommonModule } from '@angular/common';\nimport { Component, TemplateRef, ViewChild, type OnInit } from '@angular/core';\nimport {\n AbstractControl,\n FormsModule,\n ReactiveFormsModule,\n UntypedFormBuilder,\n UntypedFormGroup,\n ValidationErrors,\n ValidatorFn,\n Validators,\n} from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatStepper, MatStepperModule } from '@angular/material/stepper';\nimport { ActivatedRoute, Router, RouterModule } from '@angular/router';\nimport {\n TrialCreationFirstDto,\n TrialCreationFirstResultDto,\n TrialCreationSecondDto,\n} from 'src/app/core/dtos/auth';\nimport { AuthService } from 'src/app/core/services/auth';\nimport { httpErrorResponseUtil, ROUTER_UTILS } from 'src/app/core/utils';\nimport { NgxMaskDirective, NgxMaskPipe } from 'ngx-mask';\nimport { markFormGroupTouched } from 'src/app/core/utils/forms/mark_form_group_touched.util';\nimport { ResultDto } from 'src/app/core/dtos/api';\nimport { HttpErrorResponse } from '@angular/common/http';\nimport { MessageService } from 'src/app/core/services/message';\nimport { SharedModule } from 'src/app/shared/shared.module';\nimport { GeneralUserAgreementDialogComponent } from 'src/app/shared/components/general-user-agreement-dialog/general-user-agreement-dialog.component';\nimport { MatDialog } from '@angular/material/dialog';\n\n@Component({\n selector: 'app-trial-creation',\n templateUrl: './trial-creation.component.html',\n styleUrls: ['./trial-creation.component.scss'],\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n RouterModule,\n MatFormFieldModule,\n MatInputModule,\n MatIconModule,\n NgxMaskDirective,\n NgxMaskPipe,\n MatStepperModule,\n SharedModule,\n ],\n})\nexport class TrialCreationComponent implements OnInit {\n routerUtils = ROUTER_UTILS;\n creationFirstFormGroup!: UntypedFormGroup;\n creationSecondFormGroup!: UntypedFormGroup;\n\n returnUrl: string;\n show = false;\n\n @ViewChild('stepper') private myStepper: MatStepper;\n\n trialCreationFirstResult: TrialCreationFirstResultDto;\n\n constructor(\n private activatedRoute: ActivatedRoute,\n private authService: AuthService,\n private formBuilder: UntypedFormBuilder,\n private messageService: MessageService,\n private router: Router,\n private dialog: MatDialog\n ) {\n this.returnUrl =\n this.activatedRoute.snapshot.queryParamMap.get('returnUrl') ||\n `/${ROUTER_UTILS.config.home.root}/${ROUTER_UTILS.config.home.versions}`;\n\n this.creationFirstFormGroup = this.formBuilder.group(\n {\n firstName: [null, [Validators.required]],\n lastName: [null, [Validators.required]],\n email: [null, [Validators.required, Validators.email]],\n phoneNumber: [null, Validators.required],\n password: [null, Validators.required],\n confirmPassword: [null, Validators.required],\n userName: [null, Validators.required],\n },\n { validators: this.checkPasswords }\n );\n\n this.creationSecondFormGroup = this.formBuilder.group({\n code: [null, [Validators.required]],\n });\n }\n\n ngOnInit(): void {}\n\n onClickTrialCreationFirst(data: TrialCreationFirstDto): void {\n markFormGroupTouched(this.creationFirstFormGroup);\n if (this.creationFirstFormGroup.invalid) {\n return;\n }\n\n this.authService.trialCreationFirst(data).subscribe(\n (data: ResultDto) => {\n if (data.success) {\n this.trialCreationFirstResult = data.data;\n\n this.goToStep(1);\n } else {\n for (let index = 0; index < data.errors.length; index++) {\n this.messageService.error(data.errors[index]);\n }\n }\n },\n (error: HttpErrorResponse) => {\n var errorText = httpErrorResponseUtil(error);\n this.messageService.error(errorText);\n }\n );\n }\n\n onClickTrialCreationSecond(data: TrialCreationSecondDto) {\n markFormGroupTouched(this.creationFirstFormGroup);\n if (this.creationFirstFormGroup.invalid) {\n return;\n }\n\n data.uniqueId = this.trialCreationFirstResult.uniqueId;\n\n this.authService.trialCreationSecond(data).subscribe(\n (data: ResultDto) => {\n if (data.success) {\n this.messageService.success(data.message);\n\n this.router.navigateByUrl(\n `/${ROUTER_UTILS.config.auth.root}/${ROUTER_UTILS.config.auth.signIn}`\n );\n } else {\n for (let index = 0; index < data.errors.length; index++) {\n this.messageService.error(data.errors[index]);\n }\n }\n },\n (error: HttpErrorResponse) => {\n var errorText = httpErrorResponseUtil(error);\n this.messageService.error(errorText);\n }\n );\n }\n\n showPassword(): void {\n this.show = !this.show;\n }\n\n checkPasswords: ValidatorFn = (\n group: AbstractControl\n ): ValidationErrors | null => {\n let pass = group.get('password').value;\n let confirmPass = group.get('confirmPassword').value;\n\n if (pass === confirmPass) {\n group.get('confirmPassword').setErrors(null);\n return null;\n } else {\n group.get('confirmPassword').setErrors({ notSame: true });\n return { notSame: true };\n }\n };\n\n goToStep(index: number) {\n this.myStepper.selectedIndex = index;\n }\n\n openUserAgreementDialog(): void {\n this.dialog.open(GeneralUserAgreementDialogComponent, {\n maxHeight: '80vh',\n width: '800px',\n });\n }\n}\n","
\n
\n
\n
\n
\n \n
\n \n \n Kullanıcı Bilgileri\n
\n

Deneme hesabı oluşturun

\n

Aşağıdaki formu eksiksiz bir şekilde doldurun

\n
\n
\n \n Adınız\n \n \n
\n
\n \n Soyadınız\n \n \n
\n
\n
\n
\n \n Email\n \n \n
\n
\n
\n
\n \n Telefon\n \n \n
\n
\n
\n
\n \n Kullanıcı Adı\n \n \n
\n
\n
\n
\n \n Şifre\n \n \n {{ show ? \"visibility_off\" : \"visibility\" }}\n \n \n
\n
\n \n Şifre Tekrar\n \n \n Şifreler uyuşmuyor\n \n \n {{ show ? \"visibility_off\" : \"visibility\" }}\n \n \n
\n
\n

\n Deneme hesabını oluşturduğunuz takdirde\n kullanıcı sözleşmesini\n kabul etmiş sayılırsınız!!!\n

\n
\n \n Deneme Hesabını Oluştur\n \n
\n

\n Bir Hesabın Var Mı?\n Giriş Yap\n

\n
\n
\n \n
\n Onay Kodu\n

Telefonuza gelen onay kodunu giriniz.

\n
\n
\n \n Onay Kodu\n \n \n
\n
\n
\n \n Gönder\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n","import { Routes } from '@angular/router';\r\nimport { SignInComponent } from './pages/auth/sign-in/sign-in.component';\r\nimport { SignUpComponent } from './pages/auth/sign-up/sign-up.component';\r\nimport { TrialCreationComponent } from './pages/auth/trial-creation/trial-creation.component';\r\nimport { SiteBaseComponent } from './pages/site/site-base/site-base.component';\r\n\r\nexport const routes: Routes = [\r\n { path: '', component: SiteBaseComponent },\r\n { path: 'sign-in', component: SignInComponent },\r\n { path: 'sign-up', component: SignUpComponent },\r\n { path: 'trial-creation', component: TrialCreationComponent },\r\n];\r\n","/**\n * @license Angular v18.1.3\n * (c) 2010-2024 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { Injectable, InjectionToken, NgZone, ApplicationRef, makeEnvironmentProviders, PLATFORM_ID, APP_INITIALIZER, Injector, NgModule } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { defer, throwError, fromEvent, of, concat, Subject, NEVER, merge } from 'rxjs';\nimport { map, filter, switchMap, publish, take, tap, delay } from 'rxjs/operators';\nconst ERR_SW_NOT_SUPPORTED = 'Service workers are disabled or not supported by this browser';\nfunction errorObservable(message) {\n return defer(() => throwError(new Error(message)));\n}\n/**\n * @publicApi\n */\nclass NgswCommChannel {\n constructor(serviceWorker) {\n this.serviceWorker = serviceWorker;\n if (!serviceWorker) {\n this.worker = this.events = this.registration = errorObservable(ERR_SW_NOT_SUPPORTED);\n } else {\n const controllerChangeEvents = fromEvent(serviceWorker, 'controllerchange');\n const controllerChanges = controllerChangeEvents.pipe(map(() => serviceWorker.controller));\n const currentController = defer(() => of(serviceWorker.controller));\n const controllerWithChanges = concat(currentController, controllerChanges);\n this.worker = controllerWithChanges.pipe(filter(c => !!c));\n this.registration = this.worker.pipe(switchMap(() => serviceWorker.getRegistration()));\n const rawEvents = fromEvent(serviceWorker, 'message');\n const rawEventPayload = rawEvents.pipe(map(event => event.data));\n const eventsUnconnected = rawEventPayload.pipe(filter(event => event && event.type));\n const events = eventsUnconnected.pipe(publish());\n events.connect();\n this.events = events;\n }\n }\n postMessage(action, payload) {\n return this.worker.pipe(take(1), tap(sw => {\n sw.postMessage({\n action,\n ...payload\n });\n })).toPromise().then(() => undefined);\n }\n postMessageWithOperation(type, payload, operationNonce) {\n const waitForOperationCompleted = this.waitForOperationCompleted(operationNonce);\n const postMessage = this.postMessage(type, payload);\n return Promise.all([postMessage, waitForOperationCompleted]).then(([, result]) => result);\n }\n generateNonce() {\n return Math.round(Math.random() * 10000000);\n }\n eventsOfType(type) {\n let filterFn;\n if (typeof type === 'string') {\n filterFn = event => event.type === type;\n } else {\n filterFn = event => type.includes(event.type);\n }\n return this.events.pipe(filter(filterFn));\n }\n nextEventOfType(type) {\n return this.eventsOfType(type).pipe(take(1));\n }\n waitForOperationCompleted(nonce) {\n return this.eventsOfType('OPERATION_COMPLETED').pipe(filter(event => event.nonce === nonce), take(1), map(event => {\n if (event.result !== undefined) {\n return event.result;\n }\n throw new Error(event.error);\n })).toPromise();\n }\n get isEnabled() {\n return !!this.serviceWorker;\n }\n}\n\n/**\n * Subscribe and listen to\n * [Web Push\n * Notifications](https://developer.mozilla.org/en-US/docs/Web/API/Push_API/Best_Practices) through\n * Angular Service Worker.\n *\n * @usageNotes\n *\n * You can inject a `SwPush` instance into any component or service\n * as a dependency.\n *\n * \n *\n * To subscribe, call `SwPush.requestSubscription()`, which asks the user for permission.\n * The call returns a `Promise` with a new\n * [`PushSubscription`](https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription)\n * instance.\n *\n * \n *\n * A request is rejected if the user denies permission, or if the browser\n * blocks or does not support the Push API or ServiceWorkers.\n * Check `SwPush.isEnabled` to confirm status.\n *\n * Invoke Push Notifications by pushing a message with the following payload.\n *\n * ```ts\n * {\n * \"notification\": {\n * \"actions\": NotificationAction[],\n * \"badge\": USVString,\n * \"body\": DOMString,\n * \"data\": any,\n * \"dir\": \"auto\"|\"ltr\"|\"rtl\",\n * \"icon\": USVString,\n * \"image\": USVString,\n * \"lang\": DOMString,\n * \"renotify\": boolean,\n * \"requireInteraction\": boolean,\n * \"silent\": boolean,\n * \"tag\": DOMString,\n * \"timestamp\": DOMTimeStamp,\n * \"title\": DOMString,\n * \"vibrate\": number[]\n * }\n * }\n * ```\n *\n * Only `title` is required. See `Notification`\n * [instance\n * properties](https://developer.mozilla.org/en-US/docs/Web/API/Notification#Instance_properties).\n *\n * While the subscription is active, Service Worker listens for\n * [PushEvent](https://developer.mozilla.org/en-US/docs/Web/API/PushEvent)\n * occurrences and creates\n * [Notification](https://developer.mozilla.org/en-US/docs/Web/API/Notification)\n * instances in response.\n *\n * Unsubscribe using `SwPush.unsubscribe()`.\n *\n * An application can subscribe to `SwPush.notificationClicks` observable to be notified when a user\n * clicks on a notification. For example:\n *\n * \n *\n * You can read more on handling notification clicks in the [Service worker notifications\n * guide](ecosystem/service-workers/push-notifications).\n *\n * @see [Push Notifications](https://developers.google.com/web/fundamentals/codelabs/push-notifications/)\n * @see [Angular Push Notifications](https://blog.angular-university.io/angular-push-notifications/)\n * @see [MDN: Push API](https://developer.mozilla.org/en-US/docs/Web/API/Push_API)\n * @see [MDN: Notifications API](https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API)\n * @see [MDN: Web Push API Notifications best practices](https://developer.mozilla.org/en-US/docs/Web/API/Push_API/Best_Practices)\n *\n * @publicApi\n */\nlet SwPush = /*#__PURE__*/(() => {\n class SwPush {\n /**\n * True if the Service Worker is enabled (supported by the browser and enabled via\n * `ServiceWorkerModule`).\n */\n get isEnabled() {\n return this.sw.isEnabled;\n }\n constructor(sw) {\n this.sw = sw;\n this.pushManager = null;\n this.subscriptionChanges = new Subject();\n if (!sw.isEnabled) {\n this.messages = NEVER;\n this.notificationClicks = NEVER;\n this.subscription = NEVER;\n return;\n }\n this.messages = this.sw.eventsOfType('PUSH').pipe(map(message => message.data));\n this.notificationClicks = this.sw.eventsOfType('NOTIFICATION_CLICK').pipe(map(message => message.data));\n this.pushManager = this.sw.registration.pipe(map(registration => registration.pushManager));\n const workerDrivenSubscriptions = this.pushManager.pipe(switchMap(pm => pm.getSubscription()));\n this.subscription = merge(workerDrivenSubscriptions, this.subscriptionChanges);\n }\n /**\n * Subscribes to Web Push Notifications,\n * after requesting and receiving user permission.\n *\n * @param options An object containing the `serverPublicKey` string.\n * @returns A Promise that resolves to the new subscription object.\n */\n requestSubscription(options) {\n if (!this.sw.isEnabled || this.pushManager === null) {\n return Promise.reject(new Error(ERR_SW_NOT_SUPPORTED));\n }\n const pushOptions = {\n userVisibleOnly: true\n };\n let key = this.decodeBase64(options.serverPublicKey.replace(/_/g, '/').replace(/-/g, '+'));\n let applicationServerKey = new Uint8Array(new ArrayBuffer(key.length));\n for (let i = 0; i < key.length; i++) {\n applicationServerKey[i] = key.charCodeAt(i);\n }\n pushOptions.applicationServerKey = applicationServerKey;\n return this.pushManager.pipe(switchMap(pm => pm.subscribe(pushOptions)), take(1)).toPromise().then(sub => {\n this.subscriptionChanges.next(sub);\n return sub;\n });\n }\n /**\n * Unsubscribes from Service Worker push notifications.\n *\n * @returns A Promise that is resolved when the operation succeeds, or is rejected if there is no\n * active subscription or the unsubscribe operation fails.\n */\n unsubscribe() {\n if (!this.sw.isEnabled) {\n return Promise.reject(new Error(ERR_SW_NOT_SUPPORTED));\n }\n const doUnsubscribe = sub => {\n if (sub === null) {\n throw new Error('Not subscribed to push notifications.');\n }\n return sub.unsubscribe().then(success => {\n if (!success) {\n throw new Error('Unsubscribe failed!');\n }\n this.subscriptionChanges.next(null);\n });\n };\n return this.subscription.pipe(take(1), switchMap(doUnsubscribe)).toPromise();\n }\n decodeBase64(input) {\n return atob(input);\n }\n static {\n this.ɵfac = function SwPush_Factory(ɵt) {\n return new (ɵt || SwPush)(i0.ɵɵinject(NgswCommChannel));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: SwPush,\n factory: SwPush.ɵfac\n });\n }\n }\n return SwPush;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Subscribe to update notifications from the Service Worker, trigger update\n * checks, and forcibly activate updates.\n *\n * @see {@link ecosystem/service-workers/communications Service worker communication guide}\n *\n * @publicApi\n */\nlet SwUpdate = /*#__PURE__*/(() => {\n class SwUpdate {\n /**\n * True if the Service Worker is enabled (supported by the browser and enabled via\n * `ServiceWorkerModule`).\n */\n get isEnabled() {\n return this.sw.isEnabled;\n }\n constructor(sw) {\n this.sw = sw;\n if (!sw.isEnabled) {\n this.versionUpdates = NEVER;\n this.unrecoverable = NEVER;\n return;\n }\n this.versionUpdates = this.sw.eventsOfType(['VERSION_DETECTED', 'VERSION_INSTALLATION_FAILED', 'VERSION_READY', 'NO_NEW_VERSION_DETECTED']);\n this.unrecoverable = this.sw.eventsOfType('UNRECOVERABLE_STATE');\n }\n /**\n * Checks for an update and waits until the new version is downloaded from the server and ready\n * for activation.\n *\n * @returns a promise that\n * - resolves to `true` if a new version was found and is ready to be activated.\n * - resolves to `false` if no new version was found\n * - rejects if any error occurs\n */\n checkForUpdate() {\n if (!this.sw.isEnabled) {\n return Promise.reject(new Error(ERR_SW_NOT_SUPPORTED));\n }\n const nonce = this.sw.generateNonce();\n return this.sw.postMessageWithOperation('CHECK_FOR_UPDATES', {\n nonce\n }, nonce);\n }\n /**\n * Updates the current client (i.e. browser tab) to the latest version that is ready for\n * activation.\n *\n * In most cases, you should not use this method and instead should update a client by reloading\n * the page.\n *\n *
\n *\n * Updating a client without reloading can easily result in a broken application due to a version\n * mismatch between the application shell and other page resources,\n * such as lazy-loaded chunks, whose filenames may change between\n * versions.\n *\n * Only use this method, if you are certain it is safe for your specific use case.\n *\n *
\n *\n * @returns a promise that\n * - resolves to `true` if an update was activated successfully\n * - resolves to `false` if no update was available (for example, the client was already on the\n * latest version).\n * - rejects if any error occurs\n */\n activateUpdate() {\n if (!this.sw.isEnabled) {\n return Promise.reject(new Error(ERR_SW_NOT_SUPPORTED));\n }\n const nonce = this.sw.generateNonce();\n return this.sw.postMessageWithOperation('ACTIVATE_UPDATE', {\n nonce\n }, nonce);\n }\n static {\n this.ɵfac = function SwUpdate_Factory(ɵt) {\n return new (ɵt || SwUpdate)(i0.ɵɵinject(NgswCommChannel));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: SwUpdate,\n factory: SwUpdate.ɵfac\n });\n }\n }\n return SwUpdate;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/*!\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst SCRIPT = /*#__PURE__*/new InjectionToken(ngDevMode ? 'NGSW_REGISTER_SCRIPT' : '');\nfunction ngswAppInitializer(injector, script, options, platformId) {\n return () => {\n if (!(isPlatformBrowser(platformId) && 'serviceWorker' in navigator && options.enabled !== false)) {\n return;\n }\n const ngZone = injector.get(NgZone);\n const appRef = injector.get(ApplicationRef);\n // Set up the `controllerchange` event listener outside of\n // the Angular zone to avoid unnecessary change detections,\n // as this event has no impact on view updates.\n ngZone.runOutsideAngular(() => {\n // Wait for service worker controller changes, and fire an INITIALIZE action when a new SW\n // becomes active. This allows the SW to initialize itself even if there is no application\n // traffic.\n const sw = navigator.serviceWorker;\n const onControllerChange = () => sw.controller?.postMessage({\n action: 'INITIALIZE'\n });\n sw.addEventListener('controllerchange', onControllerChange);\n appRef.onDestroy(() => {\n sw.removeEventListener('controllerchange', onControllerChange);\n });\n });\n let readyToRegister$;\n if (typeof options.registrationStrategy === 'function') {\n readyToRegister$ = options.registrationStrategy();\n } else {\n const [strategy, ...args] = (options.registrationStrategy || 'registerWhenStable:30000').split(':');\n switch (strategy) {\n case 'registerImmediately':\n readyToRegister$ = of(null);\n break;\n case 'registerWithDelay':\n readyToRegister$ = delayWithTimeout(+args[0] || 0);\n break;\n case 'registerWhenStable':\n readyToRegister$ = !args[0] ? whenStable(injector) : merge(whenStable(injector), delayWithTimeout(+args[0]));\n break;\n default:\n // Unknown strategy.\n throw new Error(`Unknown ServiceWorker registration strategy: ${options.registrationStrategy}`);\n }\n }\n // Don't return anything to avoid blocking the application until the SW is registered.\n // Also, run outside the Angular zone to avoid preventing the app from stabilizing (especially\n // given that some registration strategies wait for the app to stabilize).\n // Catch and log the error if SW registration fails to avoid uncaught rejection warning.\n ngZone.runOutsideAngular(() => readyToRegister$.pipe(take(1)).subscribe(() => navigator.serviceWorker.register(script, {\n scope: options.scope\n }).catch(err => console.error('Service worker registration failed with:', err))));\n };\n}\nfunction delayWithTimeout(timeout) {\n return of(null).pipe(delay(timeout));\n}\nfunction whenStable(injector) {\n const appRef = injector.get(ApplicationRef);\n return appRef.isStable.pipe(filter(stable => stable));\n}\nfunction ngswCommChannelFactory(opts, platformId) {\n return new NgswCommChannel(isPlatformBrowser(platformId) && opts.enabled !== false ? navigator.serviceWorker : undefined);\n}\n/**\n * Token that can be used to provide options for `ServiceWorkerModule` outside of\n * `ServiceWorkerModule.register()`.\n *\n * You can use this token to define a provider that generates the registration options at runtime,\n * for example via a function call:\n *\n * {@example service-worker/registration-options/module.ts region=\"registration-options\"\n * header=\"app.module.ts\"}\n *\n * @publicApi\n */\nclass SwRegistrationOptions {}\n/**\n * @publicApi\n *\n * Sets up providers to register the given Angular Service Worker script.\n *\n * If `enabled` is set to `false` in the given options, the module will behave as if service\n * workers are not supported by the browser, and the service worker will not be registered.\n *\n * Example usage:\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideServiceWorker('ngsw-worker.js')\n * ],\n * });\n * ```\n */\nfunction provideServiceWorker(script, options = {}) {\n return makeEnvironmentProviders([SwPush, SwUpdate, {\n provide: SCRIPT,\n useValue: script\n }, {\n provide: SwRegistrationOptions,\n useValue: options\n }, {\n provide: NgswCommChannel,\n useFactory: ngswCommChannelFactory,\n deps: [SwRegistrationOptions, PLATFORM_ID]\n }, {\n provide: APP_INITIALIZER,\n useFactory: ngswAppInitializer,\n deps: [Injector, SCRIPT, SwRegistrationOptions, PLATFORM_ID],\n multi: true\n }]);\n}\n\n/**\n * @publicApi\n */\nlet ServiceWorkerModule = /*#__PURE__*/(() => {\n class ServiceWorkerModule {\n /**\n * Register the given Angular Service Worker script.\n *\n * If `enabled` is set to `false` in the given options, the module will behave as if service\n * workers are not supported by the browser, and the service worker will not be registered.\n */\n static register(script, options = {}) {\n return {\n ngModule: ServiceWorkerModule,\n providers: [provideServiceWorker(script, options)]\n };\n }\n static {\n this.ɵfac = function ServiceWorkerModule_Factory(ɵt) {\n return new (ɵt || ServiceWorkerModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: ServiceWorkerModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [SwPush, SwUpdate]\n });\n }\n }\n return ServiceWorkerModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ServiceWorkerModule, SwPush, SwRegistrationOptions, SwUpdate, provideServiceWorker };\n","import { Injectable } from '@angular/core';\r\nimport {\r\n ActivatedRouteSnapshot,\r\n CanActivate,\r\n Router,\r\n RouterStateSnapshot,\r\n} from '@angular/router';\r\nimport { Observable } from 'rxjs/internal/Observable';\r\nimport { AuthService } from '../services/auth';\r\nimport { ROUTER_UTILS } from '../utils';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class AuthGuard implements CanActivate {\r\n constructor(public authService: AuthService, public router: Router) {}\r\n\r\n canActivate(\r\n next: ActivatedRouteSnapshot,\r\n state: RouterStateSnapshot\r\n ): Observable | Promise | boolean {\r\n const isLoggedIn = this.authService.isLoggedIn;\r\n\r\n if (isLoggedIn) {\r\n return true;\r\n } else {\r\n this.router.navigateByUrl(\r\n `/${ROUTER_UTILS.config.auth.root}/${ROUTER_UTILS.config.auth.signIn}`\r\n );\r\n return false;\r\n }\r\n }\r\n}\r\n","import {\r\n HttpEvent,\r\n HttpHandler,\r\n HttpInterceptor,\r\n HttpRequest,\r\n} from \"@angular/common/http\";\r\nimport { Injectable } from \"@angular/core\";\r\nimport { environment } from \"../../../environments/environment\";\r\nimport { Observable } from \"rxjs\";\r\nimport { AuthService } from \"../services/auth/auth.service\";\r\nimport { getItem } from \"../utils\";\r\nimport { StorageItem } from \"../enums\";\r\n\r\n@Injectable()\r\nexport class JwtInterceptor implements HttpInterceptor {\r\n constructor(private authService: AuthService) {}\r\n intercept(\r\n request: HttpRequest,\r\n next: HttpHandler\r\n ): Observable> {\r\n const isLoggedIn = this.authService.isLoggedIn;\r\n const token = getItem(StorageItem.Auth);\r\n const isApiUrl = request.url.startsWith(environment.apiUrl);\r\n\r\n if (!isLoggedIn) {\r\n this.authService.signOut();\r\n } else {\r\n if (isApiUrl) {\r\n request = request.clone({\r\n setHeaders: {\r\n Authorization: `Bearer ${token}`,\r\n },\r\n });\r\n } else {\r\n request = request.clone({\r\n setHeaders: {\r\n \"Content-Type\": \"application/json\",\r\n Accept: \"application/json\",\r\n \"Access-Control-Allow-Origin\": \"*\",\r\n \"Access-Control-Allow-Methods\": \"POST,GET,PUT,DELETE\",\r\n },\r\n });\r\n }\r\n }\r\n\r\n return next.handle(request);\r\n }\r\n}\r\n","import {\r\n HttpErrorResponse,\r\n HttpEvent,\r\n HttpHandler,\r\n HttpInterceptor,\r\n HttpRequest,\r\n} from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { Observable, throwError } from 'rxjs';\r\nimport { tap } from 'rxjs/operators';\r\nimport { AuthService } from '../services/auth/auth.service';\r\nimport { ROUTER_UTILS } from '../utils';\r\n\r\n@Injectable()\r\nexport class ServerErrorInterceptor implements HttpInterceptor {\r\n constructor(private authService: AuthService, private router: Router) {}\r\n\r\n intercept(\r\n request: HttpRequest,\r\n next: HttpHandler\r\n ): Observable> {\r\n return next.handle(request).pipe(\r\n tap({\r\n error: (error: HttpErrorResponse) => {\r\n if ([401, 403].includes(error.status)) {\r\n this.authService.signOut();\r\n this.router.navigateByUrl(\r\n `/${ROUTER_UTILS.config.auth.root}/${ROUTER_UTILS.config.auth.signIn}`\r\n );\r\n } else {\r\n throwError(()=>error);\r\n\r\n }\r\n },\r\n })\r\n );\r\n }\r\n}\r\n","/**\n * @license Angular v18.1.3\n * (c) 2010-2024 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { ɵAnimationGroupPlayer, NoopAnimationPlayer, AUTO_STYLE, ɵPRE_STYLE, sequence, AnimationMetadataType, style } from '@angular/animations';\nimport * as i0 from '@angular/core';\nimport { ɵRuntimeError, Injectable } from '@angular/core';\nconst LINE_START = '\\n - ';\nfunction invalidTimingValue(exp) {\n return new ɵRuntimeError(3000 /* RuntimeErrorCode.INVALID_TIMING_VALUE */, ngDevMode && `The provided timing value \"${exp}\" is invalid.`);\n}\nfunction negativeStepValue() {\n return new ɵRuntimeError(3100 /* RuntimeErrorCode.NEGATIVE_STEP_VALUE */, ngDevMode && 'Duration values below 0 are not allowed for this animation step.');\n}\nfunction negativeDelayValue() {\n return new ɵRuntimeError(3101 /* RuntimeErrorCode.NEGATIVE_DELAY_VALUE */, ngDevMode && 'Delay values below 0 are not allowed for this animation step.');\n}\nfunction invalidStyleParams(varName) {\n return new ɵRuntimeError(3001 /* RuntimeErrorCode.INVALID_STYLE_PARAMS */, ngDevMode && `Unable to resolve the local animation param ${varName} in the given list of values`);\n}\nfunction invalidParamValue(varName) {\n return new ɵRuntimeError(3003 /* RuntimeErrorCode.INVALID_PARAM_VALUE */, ngDevMode && `Please provide a value for the animation param ${varName}`);\n}\nfunction invalidNodeType(nodeType) {\n return new ɵRuntimeError(3004 /* RuntimeErrorCode.INVALID_NODE_TYPE */, ngDevMode && `Unable to resolve animation metadata node #${nodeType}`);\n}\nfunction invalidCssUnitValue(userProvidedProperty, value) {\n return new ɵRuntimeError(3005 /* RuntimeErrorCode.INVALID_CSS_UNIT_VALUE */, ngDevMode && `Please provide a CSS unit value for ${userProvidedProperty}:${value}`);\n}\nfunction invalidTrigger() {\n return new ɵRuntimeError(3006 /* RuntimeErrorCode.INVALID_TRIGGER */, ngDevMode && \"animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))\");\n}\nfunction invalidDefinition() {\n return new ɵRuntimeError(3007 /* RuntimeErrorCode.INVALID_DEFINITION */, ngDevMode && 'only state() and transition() definitions can sit inside of a trigger()');\n}\nfunction invalidState(metadataName, missingSubs) {\n return new ɵRuntimeError(3008 /* RuntimeErrorCode.INVALID_STATE */, ngDevMode && `state(\"${metadataName}\", ...) must define default values for all the following style substitutions: ${missingSubs.join(', ')}`);\n}\nfunction invalidStyleValue(value) {\n return new ɵRuntimeError(3002 /* RuntimeErrorCode.INVALID_STYLE_VALUE */, ngDevMode && `The provided style string value ${value} is not allowed.`);\n}\nfunction invalidProperty(prop) {\n return new ɵRuntimeError(3009 /* RuntimeErrorCode.INVALID_PROPERTY */, ngDevMode && `The provided animation property \"${prop}\" is not a supported CSS property for animations`);\n}\nfunction invalidParallelAnimation(prop, firstStart, firstEnd, secondStart, secondEnd) {\n return new ɵRuntimeError(3010 /* RuntimeErrorCode.INVALID_PARALLEL_ANIMATION */, ngDevMode && `The CSS property \"${prop}\" that exists between the times of \"${firstStart}ms\" and \"${firstEnd}ms\" is also being animated in a parallel animation between the times of \"${secondStart}ms\" and \"${secondEnd}ms\"`);\n}\nfunction invalidKeyframes() {\n return new ɵRuntimeError(3011 /* RuntimeErrorCode.INVALID_KEYFRAMES */, ngDevMode && `keyframes() must be placed inside of a call to animate()`);\n}\nfunction invalidOffset() {\n return new ɵRuntimeError(3012 /* RuntimeErrorCode.INVALID_OFFSET */, ngDevMode && `Please ensure that all keyframe offsets are between 0 and 1`);\n}\nfunction keyframeOffsetsOutOfOrder() {\n return new ɵRuntimeError(3200 /* RuntimeErrorCode.KEYFRAME_OFFSETS_OUT_OF_ORDER */, ngDevMode && `Please ensure that all keyframe offsets are in order`);\n}\nfunction keyframesMissingOffsets() {\n return new ɵRuntimeError(3202 /* RuntimeErrorCode.KEYFRAMES_MISSING_OFFSETS */, ngDevMode && `Not all style() steps within the declared keyframes() contain offsets`);\n}\nfunction invalidStagger() {\n return new ɵRuntimeError(3013 /* RuntimeErrorCode.INVALID_STAGGER */, ngDevMode && `stagger() can only be used inside of query()`);\n}\nfunction invalidQuery(selector) {\n return new ɵRuntimeError(3014 /* RuntimeErrorCode.INVALID_QUERY */, ngDevMode && `\\`query(\"${selector}\")\\` returned zero elements. (Use \\`query(\"${selector}\", { optional: true })\\` if you wish to allow this.)`);\n}\nfunction invalidExpression(expr) {\n return new ɵRuntimeError(3015 /* RuntimeErrorCode.INVALID_EXPRESSION */, ngDevMode && `The provided transition expression \"${expr}\" is not supported`);\n}\nfunction invalidTransitionAlias(alias) {\n return new ɵRuntimeError(3016 /* RuntimeErrorCode.INVALID_TRANSITION_ALIAS */, ngDevMode && `The transition alias value \"${alias}\" is not supported`);\n}\nfunction validationFailed(errors) {\n return new ɵRuntimeError(3500 /* RuntimeErrorCode.VALIDATION_FAILED */, ngDevMode && `animation validation failed:\\n${errors.map(err => err.message).join('\\n')}`);\n}\nfunction buildingFailed(errors) {\n return new ɵRuntimeError(3501 /* RuntimeErrorCode.BUILDING_FAILED */, ngDevMode && `animation building failed:\\n${errors.map(err => err.message).join('\\n')}`);\n}\nfunction triggerBuildFailed(name, errors) {\n return new ɵRuntimeError(3404 /* RuntimeErrorCode.TRIGGER_BUILD_FAILED */, ngDevMode && `The animation trigger \"${name}\" has failed to build due to the following errors:\\n - ${errors.map(err => err.message).join('\\n - ')}`);\n}\nfunction animationFailed(errors) {\n return new ɵRuntimeError(3502 /* RuntimeErrorCode.ANIMATION_FAILED */, ngDevMode && `Unable to animate due to the following errors:${LINE_START}${errors.map(err => err.message).join(LINE_START)}`);\n}\nfunction registerFailed(errors) {\n return new ɵRuntimeError(3503 /* RuntimeErrorCode.REGISTRATION_FAILED */, ngDevMode && `Unable to build the animation due to the following errors: ${errors.map(err => err.message).join('\\n')}`);\n}\nfunction missingOrDestroyedAnimation() {\n return new ɵRuntimeError(3300 /* RuntimeErrorCode.MISSING_OR_DESTROYED_ANIMATION */, ngDevMode && \"The requested animation doesn't exist or has already been destroyed\");\n}\nfunction createAnimationFailed(errors) {\n return new ɵRuntimeError(3504 /* RuntimeErrorCode.CREATE_ANIMATION_FAILED */, ngDevMode && `Unable to create the animation due to the following errors:${errors.map(err => err.message).join('\\n')}`);\n}\nfunction missingPlayer(id) {\n return new ɵRuntimeError(3301 /* RuntimeErrorCode.MISSING_PLAYER */, ngDevMode && `Unable to find the timeline player referenced by ${id}`);\n}\nfunction missingTrigger(phase, name) {\n return new ɵRuntimeError(3302 /* RuntimeErrorCode.MISSING_TRIGGER */, ngDevMode && `Unable to listen on the animation trigger event \"${phase}\" because the animation trigger \"${name}\" doesn\\'t exist!`);\n}\nfunction missingEvent(name) {\n return new ɵRuntimeError(3303 /* RuntimeErrorCode.MISSING_EVENT */, ngDevMode && `Unable to listen on the animation trigger \"${name}\" because the provided event is undefined!`);\n}\nfunction unsupportedTriggerEvent(phase, name) {\n return new ɵRuntimeError(3400 /* RuntimeErrorCode.UNSUPPORTED_TRIGGER_EVENT */, ngDevMode && `The provided animation trigger event \"${phase}\" for the animation trigger \"${name}\" is not supported!`);\n}\nfunction unregisteredTrigger(name) {\n return new ɵRuntimeError(3401 /* RuntimeErrorCode.UNREGISTERED_TRIGGER */, ngDevMode && `The provided animation trigger \"${name}\" has not been registered!`);\n}\nfunction triggerTransitionsFailed(errors) {\n return new ɵRuntimeError(3402 /* RuntimeErrorCode.TRIGGER_TRANSITIONS_FAILED */, ngDevMode && `Unable to process animations due to the following failed trigger transitions\\n ${errors.map(err => err.message).join('\\n')}`);\n}\nfunction triggerParsingFailed(name, errors) {\n return new ɵRuntimeError(3403 /* RuntimeErrorCode.TRIGGER_PARSING_FAILED */, ngDevMode && `Animation parsing for the ${name} trigger have failed:${LINE_START}${errors.map(err => err.message).join(LINE_START)}`);\n}\nfunction transitionFailed(name, errors) {\n return new ɵRuntimeError(3505 /* RuntimeErrorCode.TRANSITION_FAILED */, ngDevMode && `@${name} has failed due to:\\n ${errors.map(err => err.message).join('\\n- ')}`);\n}\n\n/**\n * Set of all animatable CSS properties\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties\n */\nconst ANIMATABLE_PROP_SET = /*#__PURE__*/new Set(['-moz-outline-radius', '-moz-outline-radius-bottomleft', '-moz-outline-radius-bottomright', '-moz-outline-radius-topleft', '-moz-outline-radius-topright', '-ms-grid-columns', '-ms-grid-rows', '-webkit-line-clamp', '-webkit-text-fill-color', '-webkit-text-stroke', '-webkit-text-stroke-color', 'accent-color', 'all', 'backdrop-filter', 'background', 'background-color', 'background-position', 'background-size', 'block-size', 'border', 'border-block-end', 'border-block-end-color', 'border-block-end-width', 'border-block-start', 'border-block-start-color', 'border-block-start-width', 'border-bottom', 'border-bottom-color', 'border-bottom-left-radius', 'border-bottom-right-radius', 'border-bottom-width', 'border-color', 'border-end-end-radius', 'border-end-start-radius', 'border-image-outset', 'border-image-slice', 'border-image-width', 'border-inline-end', 'border-inline-end-color', 'border-inline-end-width', 'border-inline-start', 'border-inline-start-color', 'border-inline-start-width', 'border-left', 'border-left-color', 'border-left-width', 'border-radius', 'border-right', 'border-right-color', 'border-right-width', 'border-start-end-radius', 'border-start-start-radius', 'border-top', 'border-top-color', 'border-top-left-radius', 'border-top-right-radius', 'border-top-width', 'border-width', 'bottom', 'box-shadow', 'caret-color', 'clip', 'clip-path', 'color', 'column-count', 'column-gap', 'column-rule', 'column-rule-color', 'column-rule-width', 'column-width', 'columns', 'filter', 'flex', 'flex-basis', 'flex-grow', 'flex-shrink', 'font', 'font-size', 'font-size-adjust', 'font-stretch', 'font-variation-settings', 'font-weight', 'gap', 'grid-column-gap', 'grid-gap', 'grid-row-gap', 'grid-template-columns', 'grid-template-rows', 'height', 'inline-size', 'input-security', 'inset', 'inset-block', 'inset-block-end', 'inset-block-start', 'inset-inline', 'inset-inline-end', 'inset-inline-start', 'left', 'letter-spacing', 'line-clamp', 'line-height', 'margin', 'margin-block-end', 'margin-block-start', 'margin-bottom', 'margin-inline-end', 'margin-inline-start', 'margin-left', 'margin-right', 'margin-top', 'mask', 'mask-border', 'mask-position', 'mask-size', 'max-block-size', 'max-height', 'max-inline-size', 'max-lines', 'max-width', 'min-block-size', 'min-height', 'min-inline-size', 'min-width', 'object-position', 'offset', 'offset-anchor', 'offset-distance', 'offset-path', 'offset-position', 'offset-rotate', 'opacity', 'order', 'outline', 'outline-color', 'outline-offset', 'outline-width', 'padding', 'padding-block-end', 'padding-block-start', 'padding-bottom', 'padding-inline-end', 'padding-inline-start', 'padding-left', 'padding-right', 'padding-top', 'perspective', 'perspective-origin', 'right', 'rotate', 'row-gap', 'scale', 'scroll-margin', 'scroll-margin-block', 'scroll-margin-block-end', 'scroll-margin-block-start', 'scroll-margin-bottom', 'scroll-margin-inline', 'scroll-margin-inline-end', 'scroll-margin-inline-start', 'scroll-margin-left', 'scroll-margin-right', 'scroll-margin-top', 'scroll-padding', 'scroll-padding-block', 'scroll-padding-block-end', 'scroll-padding-block-start', 'scroll-padding-bottom', 'scroll-padding-inline', 'scroll-padding-inline-end', 'scroll-padding-inline-start', 'scroll-padding-left', 'scroll-padding-right', 'scroll-padding-top', 'scroll-snap-coordinate', 'scroll-snap-destination', 'scrollbar-color', 'shape-image-threshold', 'shape-margin', 'shape-outside', 'tab-size', 'text-decoration', 'text-decoration-color', 'text-decoration-thickness', 'text-emphasis', 'text-emphasis-color', 'text-indent', 'text-shadow', 'text-underline-offset', 'top', 'transform', 'transform-origin', 'translate', 'vertical-align', 'visibility', 'width', 'word-spacing', 'z-index', 'zoom']);\nfunction optimizeGroupPlayer(players) {\n switch (players.length) {\n case 0:\n return new NoopAnimationPlayer();\n case 1:\n return players[0];\n default:\n return new ɵAnimationGroupPlayer(players);\n }\n}\nfunction normalizeKeyframes$1(normalizer, keyframes, preStyles = new Map(), postStyles = new Map()) {\n const errors = [];\n const normalizedKeyframes = [];\n let previousOffset = -1;\n let previousKeyframe = null;\n keyframes.forEach(kf => {\n const offset = kf.get('offset');\n const isSameOffset = offset == previousOffset;\n const normalizedKeyframe = isSameOffset && previousKeyframe || new Map();\n kf.forEach((val, prop) => {\n let normalizedProp = prop;\n let normalizedValue = val;\n if (prop !== 'offset') {\n normalizedProp = normalizer.normalizePropertyName(normalizedProp, errors);\n switch (normalizedValue) {\n case ɵPRE_STYLE:\n normalizedValue = preStyles.get(prop);\n break;\n case AUTO_STYLE:\n normalizedValue = postStyles.get(prop);\n break;\n default:\n normalizedValue = normalizer.normalizeStyleValue(prop, normalizedProp, normalizedValue, errors);\n break;\n }\n }\n normalizedKeyframe.set(normalizedProp, normalizedValue);\n });\n if (!isSameOffset) {\n normalizedKeyframes.push(normalizedKeyframe);\n }\n previousKeyframe = normalizedKeyframe;\n previousOffset = offset;\n });\n if (errors.length) {\n throw animationFailed(errors);\n }\n return normalizedKeyframes;\n}\nfunction listenOnPlayer(player, eventName, event, callback) {\n switch (eventName) {\n case 'start':\n player.onStart(() => callback(event && copyAnimationEvent(event, 'start', player)));\n break;\n case 'done':\n player.onDone(() => callback(event && copyAnimationEvent(event, 'done', player)));\n break;\n case 'destroy':\n player.onDestroy(() => callback(event && copyAnimationEvent(event, 'destroy', player)));\n break;\n }\n}\nfunction copyAnimationEvent(e, phaseName, player) {\n const totalTime = player.totalTime;\n const disabled = player.disabled ? true : false;\n const event = makeAnimationEvent(e.element, e.triggerName, e.fromState, e.toState, phaseName || e.phaseName, totalTime == undefined ? e.totalTime : totalTime, disabled);\n const data = e['_data'];\n if (data != null) {\n event['_data'] = data;\n }\n return event;\n}\nfunction makeAnimationEvent(element, triggerName, fromState, toState, phaseName = '', totalTime = 0, disabled) {\n return {\n element,\n triggerName,\n fromState,\n toState,\n phaseName,\n totalTime,\n disabled: !!disabled\n };\n}\nfunction getOrSetDefaultValue(map, key, defaultValue) {\n let value = map.get(key);\n if (!value) {\n map.set(key, value = defaultValue);\n }\n return value;\n}\nfunction parseTimelineCommand(command) {\n const separatorPos = command.indexOf(':');\n const id = command.substring(1, separatorPos);\n const action = command.slice(separatorPos + 1);\n return [id, action];\n}\nconst documentElement = /* @__PURE__ */(() => typeof document === 'undefined' ? null : document.documentElement)();\nfunction getParentElement(element) {\n const parent = element.parentNode || element.host || null; // consider host to support shadow DOM\n if (parent === documentElement) {\n return null;\n }\n return parent;\n}\nfunction containsVendorPrefix(prop) {\n // Webkit is the only real popular vendor prefix nowadays\n // cc: http://shouldiprefix.com/\n return prop.substring(1, 6) == 'ebkit'; // webkit or Webkit\n}\nlet _CACHED_BODY = null;\nlet _IS_WEBKIT = false;\nfunction validateStyleProperty(prop) {\n if (!_CACHED_BODY) {\n _CACHED_BODY = getBodyNode() || {};\n _IS_WEBKIT = _CACHED_BODY.style ? 'WebkitAppearance' in _CACHED_BODY.style : false;\n }\n let result = true;\n if (_CACHED_BODY.style && !containsVendorPrefix(prop)) {\n result = prop in _CACHED_BODY.style;\n if (!result && _IS_WEBKIT) {\n const camelProp = 'Webkit' + prop.charAt(0).toUpperCase() + prop.slice(1);\n result = camelProp in _CACHED_BODY.style;\n }\n }\n return result;\n}\nfunction validateWebAnimatableStyleProperty(prop) {\n return ANIMATABLE_PROP_SET.has(prop);\n}\nfunction getBodyNode() {\n if (typeof document != 'undefined') {\n return document.body;\n }\n return null;\n}\nfunction containsElement(elm1, elm2) {\n while (elm2) {\n if (elm2 === elm1) {\n return true;\n }\n elm2 = getParentElement(elm2);\n }\n return false;\n}\nfunction invokeQuery(element, selector, multi) {\n if (multi) {\n return Array.from(element.querySelectorAll(selector));\n }\n const elem = element.querySelector(selector);\n return elem ? [elem] : [];\n}\nfunction hypenatePropsKeys(original) {\n const newMap = new Map();\n original.forEach((val, prop) => {\n const newProp = prop.replace(/([a-z])([A-Z])/g, '$1-$2');\n newMap.set(newProp, val);\n });\n return newMap;\n}\n\n/**\n * @publicApi\n *\n * `AnimationDriver` implentation for Noop animations\n */\nlet NoopAnimationDriver = /*#__PURE__*/(() => {\n class NoopAnimationDriver {\n /**\n * @returns Whether `prop` is a valid CSS property\n */\n validateStyleProperty(prop) {\n return validateStyleProperty(prop);\n }\n /**\n *\n * @returns Whether elm1 contains elm2.\n */\n containsElement(elm1, elm2) {\n return containsElement(elm1, elm2);\n }\n /**\n * @returns Rhe parent of the given element or `null` if the element is the `document`\n */\n getParentElement(element) {\n return getParentElement(element);\n }\n /**\n * @returns The result of the query selector on the element. The array will contain up to 1 item\n * if `multi` is `false`.\n */\n query(element, selector, multi) {\n return invokeQuery(element, selector, multi);\n }\n /**\n * @returns The `defaultValue` or empty string\n */\n computeStyle(element, prop, defaultValue) {\n return defaultValue || '';\n }\n /**\n * @returns An `NoopAnimationPlayer`\n */\n animate(element, keyframes, duration, delay, easing, previousPlayers = [], scrubberAccessRequested) {\n return new NoopAnimationPlayer(duration, delay);\n }\n static {\n this.ɵfac = function NoopAnimationDriver_Factory(ɵt) {\n return new (ɵt || NoopAnimationDriver)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: NoopAnimationDriver,\n factory: NoopAnimationDriver.ɵfac\n });\n }\n }\n return NoopAnimationDriver;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @publicApi\n */\nclass AnimationDriver {\n /**\n * @deprecated Use the NoopAnimationDriver class.\n */\n static {\n this.NOOP = /*#__PURE__*/new NoopAnimationDriver();\n }\n}\nclass AnimationStyleNormalizer {}\nclass NoopAnimationStyleNormalizer {\n normalizePropertyName(propertyName, errors) {\n return propertyName;\n }\n normalizeStyleValue(userProvidedProperty, normalizedProperty, value, errors) {\n return value;\n }\n}\nconst ONE_SECOND = 1000;\nconst SUBSTITUTION_EXPR_START = '{{';\nconst SUBSTITUTION_EXPR_END = '}}';\nconst ENTER_CLASSNAME = 'ng-enter';\nconst LEAVE_CLASSNAME = 'ng-leave';\nconst NG_TRIGGER_CLASSNAME = 'ng-trigger';\nconst NG_TRIGGER_SELECTOR = '.ng-trigger';\nconst NG_ANIMATING_CLASSNAME = 'ng-animating';\nconst NG_ANIMATING_SELECTOR = '.ng-animating';\nfunction resolveTimingValue(value) {\n if (typeof value == 'number') return value;\n const matches = value.match(/^(-?[\\.\\d]+)(m?s)/);\n if (!matches || matches.length < 2) return 0;\n return _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n}\nfunction _convertTimeValueToMS(value, unit) {\n switch (unit) {\n case 's':\n return value * ONE_SECOND;\n default:\n // ms or something else\n return value;\n }\n}\nfunction resolveTiming(timings, errors, allowNegativeValues) {\n return timings.hasOwnProperty('duration') ? timings : parseTimeExpression(timings, errors, allowNegativeValues);\n}\nfunction parseTimeExpression(exp, errors, allowNegativeValues) {\n const regex = /^(-?[\\.\\d]+)(m?s)(?:\\s+(-?[\\.\\d]+)(m?s))?(?:\\s+([-a-z]+(?:\\(.+?\\))?))?$/i;\n let duration;\n let delay = 0;\n let easing = '';\n if (typeof exp === 'string') {\n const matches = exp.match(regex);\n if (matches === null) {\n errors.push(invalidTimingValue(exp));\n return {\n duration: 0,\n delay: 0,\n easing: ''\n };\n }\n duration = _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n const delayMatch = matches[3];\n if (delayMatch != null) {\n delay = _convertTimeValueToMS(parseFloat(delayMatch), matches[4]);\n }\n const easingVal = matches[5];\n if (easingVal) {\n easing = easingVal;\n }\n } else {\n duration = exp;\n }\n if (!allowNegativeValues) {\n let containsErrors = false;\n let startIndex = errors.length;\n if (duration < 0) {\n errors.push(negativeStepValue());\n containsErrors = true;\n }\n if (delay < 0) {\n errors.push(negativeDelayValue());\n containsErrors = true;\n }\n if (containsErrors) {\n errors.splice(startIndex, 0, invalidTimingValue(exp));\n }\n }\n return {\n duration,\n delay,\n easing\n };\n}\nfunction normalizeKeyframes(keyframes) {\n if (!keyframes.length) {\n return [];\n }\n if (keyframes[0] instanceof Map) {\n return keyframes;\n }\n return keyframes.map(kf => new Map(Object.entries(kf)));\n}\nfunction normalizeStyles(styles) {\n return Array.isArray(styles) ? new Map(...styles) : new Map(styles);\n}\nfunction setStyles(element, styles, formerStyles) {\n styles.forEach((val, prop) => {\n const camelProp = dashCaseToCamelCase(prop);\n if (formerStyles && !formerStyles.has(prop)) {\n formerStyles.set(prop, element.style[camelProp]);\n }\n element.style[camelProp] = val;\n });\n}\nfunction eraseStyles(element, styles) {\n styles.forEach((_, prop) => {\n const camelProp = dashCaseToCamelCase(prop);\n element.style[camelProp] = '';\n });\n}\nfunction normalizeAnimationEntry(steps) {\n if (Array.isArray(steps)) {\n if (steps.length == 1) return steps[0];\n return sequence(steps);\n }\n return steps;\n}\nfunction validateStyleParams(value, options, errors) {\n const params = options.params || {};\n const matches = extractStyleParams(value);\n if (matches.length) {\n matches.forEach(varName => {\n if (!params.hasOwnProperty(varName)) {\n errors.push(invalidStyleParams(varName));\n }\n });\n }\n}\nconst PARAM_REGEX = /*#__PURE__*/new RegExp(`${SUBSTITUTION_EXPR_START}\\\\s*(.+?)\\\\s*${SUBSTITUTION_EXPR_END}`, 'g');\nfunction extractStyleParams(value) {\n let params = [];\n if (typeof value === 'string') {\n let match;\n while (match = PARAM_REGEX.exec(value)) {\n params.push(match[1]);\n }\n PARAM_REGEX.lastIndex = 0;\n }\n return params;\n}\nfunction interpolateParams(value, params, errors) {\n const original = `${value}`;\n const str = original.replace(PARAM_REGEX, (_, varName) => {\n let localVal = params[varName];\n // this means that the value was never overridden by the data passed in by the user\n if (localVal == null) {\n errors.push(invalidParamValue(varName));\n localVal = '';\n }\n return localVal.toString();\n });\n // we do this to assert that numeric values stay as they are\n return str == original ? value : str;\n}\nconst DASH_CASE_REGEXP = /-+([a-z0-9])/g;\nfunction dashCaseToCamelCase(input) {\n return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());\n}\nfunction camelCaseToDashCase(input) {\n return input.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\nfunction allowPreviousPlayerStylesMerge(duration, delay) {\n return duration === 0 || delay === 0;\n}\nfunction balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles) {\n if (previousStyles.size && keyframes.length) {\n let startingKeyframe = keyframes[0];\n let missingStyleProps = [];\n previousStyles.forEach((val, prop) => {\n if (!startingKeyframe.has(prop)) {\n missingStyleProps.push(prop);\n }\n startingKeyframe.set(prop, val);\n });\n if (missingStyleProps.length) {\n for (let i = 1; i < keyframes.length; i++) {\n let kf = keyframes[i];\n missingStyleProps.forEach(prop => kf.set(prop, computeStyle(element, prop)));\n }\n }\n }\n return keyframes;\n}\nfunction visitDslNode(visitor, node, context) {\n switch (node.type) {\n case AnimationMetadataType.Trigger:\n return visitor.visitTrigger(node, context);\n case AnimationMetadataType.State:\n return visitor.visitState(node, context);\n case AnimationMetadataType.Transition:\n return visitor.visitTransition(node, context);\n case AnimationMetadataType.Sequence:\n return visitor.visitSequence(node, context);\n case AnimationMetadataType.Group:\n return visitor.visitGroup(node, context);\n case AnimationMetadataType.Animate:\n return visitor.visitAnimate(node, context);\n case AnimationMetadataType.Keyframes:\n return visitor.visitKeyframes(node, context);\n case AnimationMetadataType.Style:\n return visitor.visitStyle(node, context);\n case AnimationMetadataType.Reference:\n return visitor.visitReference(node, context);\n case AnimationMetadataType.AnimateChild:\n return visitor.visitAnimateChild(node, context);\n case AnimationMetadataType.AnimateRef:\n return visitor.visitAnimateRef(node, context);\n case AnimationMetadataType.Query:\n return visitor.visitQuery(node, context);\n case AnimationMetadataType.Stagger:\n return visitor.visitStagger(node, context);\n default:\n throw invalidNodeType(node.type);\n }\n}\nfunction computeStyle(element, prop) {\n return window.getComputedStyle(element)[prop];\n}\nconst DIMENSIONAL_PROP_SET = /*#__PURE__*/new Set(['width', 'height', 'minWidth', 'minHeight', 'maxWidth', 'maxHeight', 'left', 'top', 'bottom', 'right', 'fontSize', 'outlineWidth', 'outlineOffset', 'paddingTop', 'paddingLeft', 'paddingBottom', 'paddingRight', 'marginTop', 'marginLeft', 'marginBottom', 'marginRight', 'borderRadius', 'borderWidth', 'borderTopWidth', 'borderLeftWidth', 'borderRightWidth', 'borderBottomWidth', 'textIndent', 'perspective']);\nclass WebAnimationsStyleNormalizer extends AnimationStyleNormalizer {\n normalizePropertyName(propertyName, errors) {\n return dashCaseToCamelCase(propertyName);\n }\n normalizeStyleValue(userProvidedProperty, normalizedProperty, value, errors) {\n let unit = '';\n const strVal = value.toString().trim();\n if (DIMENSIONAL_PROP_SET.has(normalizedProperty) && value !== 0 && value !== '0') {\n if (typeof value === 'number') {\n unit = 'px';\n } else {\n const valAndSuffixMatch = value.match(/^[+-]?[\\d\\.]+([a-z]*)$/);\n if (valAndSuffixMatch && valAndSuffixMatch[1].length == 0) {\n errors.push(invalidCssUnitValue(userProvidedProperty, value));\n }\n }\n }\n return strVal + unit;\n }\n}\nfunction createListOfWarnings(warnings) {\n const LINE_START = '\\n - ';\n return `${LINE_START}${warnings.filter(Boolean).map(warning => warning).join(LINE_START)}`;\n}\nfunction warnValidation(warnings) {\n (typeof ngDevMode === 'undefined' || ngDevMode) && console.warn(`animation validation warnings:${createListOfWarnings(warnings)}`);\n}\nfunction warnTriggerBuild(name, warnings) {\n (typeof ngDevMode === 'undefined' || ngDevMode) && console.warn(`The animation trigger \"${name}\" has built with the following warnings:${createListOfWarnings(warnings)}`);\n}\nfunction warnRegister(warnings) {\n (typeof ngDevMode === 'undefined' || ngDevMode) && console.warn(`Animation built with the following warnings:${createListOfWarnings(warnings)}`);\n}\nfunction triggerParsingWarnings(name, warnings) {\n (typeof ngDevMode === 'undefined' || ngDevMode) && console.warn(`Animation parsing for the ${name} trigger presents the following warnings:${createListOfWarnings(warnings)}`);\n}\nfunction pushUnrecognizedPropertiesWarning(warnings, props) {\n if (props.length) {\n warnings.push(`The following provided properties are not recognized: ${props.join(', ')}`);\n }\n}\nconst ANY_STATE = '*';\nfunction parseTransitionExpr(transitionValue, errors) {\n const expressions = [];\n if (typeof transitionValue == 'string') {\n transitionValue.split(/\\s*,\\s*/).forEach(str => parseInnerTransitionStr(str, expressions, errors));\n } else {\n expressions.push(transitionValue);\n }\n return expressions;\n}\nfunction parseInnerTransitionStr(eventStr, expressions, errors) {\n if (eventStr[0] == ':') {\n const result = parseAnimationAlias(eventStr, errors);\n if (typeof result == 'function') {\n expressions.push(result);\n return;\n }\n eventStr = result;\n }\n const match = eventStr.match(/^(\\*|[-\\w]+)\\s*()\\s*(\\*|[-\\w]+)$/);\n if (match == null || match.length < 4) {\n errors.push(invalidExpression(eventStr));\n return expressions;\n }\n const fromState = match[1];\n const separator = match[2];\n const toState = match[3];\n expressions.push(makeLambdaFromStates(fromState, toState));\n const isFullAnyStateExpr = fromState == ANY_STATE && toState == ANY_STATE;\n if (separator[0] == '<' && !isFullAnyStateExpr) {\n expressions.push(makeLambdaFromStates(toState, fromState));\n }\n return;\n}\nfunction parseAnimationAlias(alias, errors) {\n switch (alias) {\n case ':enter':\n return 'void => *';\n case ':leave':\n return '* => void';\n case ':increment':\n return (fromState, toState) => parseFloat(toState) > parseFloat(fromState);\n case ':decrement':\n return (fromState, toState) => parseFloat(toState) < parseFloat(fromState);\n default:\n errors.push(invalidTransitionAlias(alias));\n return '* => *';\n }\n}\n// DO NOT REFACTOR ... keep the follow set instantiations\n// with the values intact (closure compiler for some reason\n// removes follow-up lines that add the values outside of\n// the constructor...\nconst TRUE_BOOLEAN_VALUES = /*#__PURE__*/new Set(['true', '1']);\nconst FALSE_BOOLEAN_VALUES = /*#__PURE__*/new Set(['false', '0']);\nfunction makeLambdaFromStates(lhs, rhs) {\n const LHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(lhs) || FALSE_BOOLEAN_VALUES.has(lhs);\n const RHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(rhs) || FALSE_BOOLEAN_VALUES.has(rhs);\n return (fromState, toState) => {\n let lhsMatch = lhs == ANY_STATE || lhs == fromState;\n let rhsMatch = rhs == ANY_STATE || rhs == toState;\n if (!lhsMatch && LHS_MATCH_BOOLEAN && typeof fromState === 'boolean') {\n lhsMatch = fromState ? TRUE_BOOLEAN_VALUES.has(lhs) : FALSE_BOOLEAN_VALUES.has(lhs);\n }\n if (!rhsMatch && RHS_MATCH_BOOLEAN && typeof toState === 'boolean') {\n rhsMatch = toState ? TRUE_BOOLEAN_VALUES.has(rhs) : FALSE_BOOLEAN_VALUES.has(rhs);\n }\n return lhsMatch && rhsMatch;\n };\n}\nconst SELF_TOKEN = ':self';\nconst SELF_TOKEN_REGEX = /*#__PURE__*/new RegExp(`s*${SELF_TOKEN}s*,?`, 'g');\n/*\n * [Validation]\n * The visitor code below will traverse the animation AST generated by the animation verb functions\n * (the output is a tree of objects) and attempt to perform a series of validations on the data. The\n * following corner-cases will be validated:\n *\n * 1. Overlap of animations\n * Given that a CSS property cannot be animated in more than one place at the same time, it's\n * important that this behavior is detected and validated. The way in which this occurs is that\n * each time a style property is examined, a string-map containing the property will be updated with\n * the start and end times for when the property is used within an animation step.\n *\n * If there are two or more parallel animations that are currently running (these are invoked by the\n * group()) on the same element then the validator will throw an error. Since the start/end timing\n * values are collected for each property then if the current animation step is animating the same\n * property and its timing values fall anywhere into the window of time that the property is\n * currently being animated within then this is what causes an error.\n *\n * 2. Timing values\n * The validator will validate to see if a timing value of `duration delay easing` or\n * `durationNumber` is valid or not.\n *\n * (note that upon validation the code below will replace the timing data with an object containing\n * {duration,delay,easing}.\n *\n * 3. Offset Validation\n * Each of the style() calls are allowed to have an offset value when placed inside of keyframes().\n * Offsets within keyframes() are considered valid when:\n *\n * - No offsets are used at all\n * - Each style() entry contains an offset value\n * - Each offset is between 0 and 1\n * - Each offset is greater to or equal than the previous one\n *\n * Otherwise an error will be thrown.\n */\nfunction buildAnimationAst(driver, metadata, errors, warnings) {\n return new AnimationAstBuilderVisitor(driver).build(metadata, errors, warnings);\n}\nconst ROOT_SELECTOR = '';\nclass AnimationAstBuilderVisitor {\n constructor(_driver) {\n this._driver = _driver;\n }\n build(metadata, errors, warnings) {\n const context = new AnimationAstBuilderContext(errors);\n this._resetContextStyleTimingState(context);\n const ast = visitDslNode(this, normalizeAnimationEntry(metadata), context);\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (context.unsupportedCSSPropertiesFound.size) {\n pushUnrecognizedPropertiesWarning(warnings, [...context.unsupportedCSSPropertiesFound.keys()]);\n }\n }\n return ast;\n }\n _resetContextStyleTimingState(context) {\n context.currentQuerySelector = ROOT_SELECTOR;\n context.collectedStyles = new Map();\n context.collectedStyles.set(ROOT_SELECTOR, new Map());\n context.currentTime = 0;\n }\n visitTrigger(metadata, context) {\n let queryCount = context.queryCount = 0;\n let depCount = context.depCount = 0;\n const states = [];\n const transitions = [];\n if (metadata.name.charAt(0) == '@') {\n context.errors.push(invalidTrigger());\n }\n metadata.definitions.forEach(def => {\n this._resetContextStyleTimingState(context);\n if (def.type == AnimationMetadataType.State) {\n const stateDef = def;\n const name = stateDef.name;\n name.toString().split(/\\s*,\\s*/).forEach(n => {\n stateDef.name = n;\n states.push(this.visitState(stateDef, context));\n });\n stateDef.name = name;\n } else if (def.type == AnimationMetadataType.Transition) {\n const transition = this.visitTransition(def, context);\n queryCount += transition.queryCount;\n depCount += transition.depCount;\n transitions.push(transition);\n } else {\n context.errors.push(invalidDefinition());\n }\n });\n return {\n type: AnimationMetadataType.Trigger,\n name: metadata.name,\n states,\n transitions,\n queryCount,\n depCount,\n options: null\n };\n }\n visitState(metadata, context) {\n const styleAst = this.visitStyle(metadata.styles, context);\n const astParams = metadata.options && metadata.options.params || null;\n if (styleAst.containsDynamicStyles) {\n const missingSubs = new Set();\n const params = astParams || {};\n styleAst.styles.forEach(style => {\n if (style instanceof Map) {\n style.forEach(value => {\n extractStyleParams(value).forEach(sub => {\n if (!params.hasOwnProperty(sub)) {\n missingSubs.add(sub);\n }\n });\n });\n }\n });\n if (missingSubs.size) {\n context.errors.push(invalidState(metadata.name, [...missingSubs.values()]));\n }\n }\n return {\n type: AnimationMetadataType.State,\n name: metadata.name,\n style: styleAst,\n options: astParams ? {\n params: astParams\n } : null\n };\n }\n visitTransition(metadata, context) {\n context.queryCount = 0;\n context.depCount = 0;\n const animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);\n const matchers = parseTransitionExpr(metadata.expr, context.errors);\n return {\n type: AnimationMetadataType.Transition,\n matchers,\n animation,\n queryCount: context.queryCount,\n depCount: context.depCount,\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitSequence(metadata, context) {\n return {\n type: AnimationMetadataType.Sequence,\n steps: metadata.steps.map(s => visitDslNode(this, s, context)),\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitGroup(metadata, context) {\n const currentTime = context.currentTime;\n let furthestTime = 0;\n const steps = metadata.steps.map(step => {\n context.currentTime = currentTime;\n const innerAst = visitDslNode(this, step, context);\n furthestTime = Math.max(furthestTime, context.currentTime);\n return innerAst;\n });\n context.currentTime = furthestTime;\n return {\n type: AnimationMetadataType.Group,\n steps,\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitAnimate(metadata, context) {\n const timingAst = constructTimingAst(metadata.timings, context.errors);\n context.currentAnimateTimings = timingAst;\n let styleAst;\n let styleMetadata = metadata.styles ? metadata.styles : style({});\n if (styleMetadata.type == AnimationMetadataType.Keyframes) {\n styleAst = this.visitKeyframes(styleMetadata, context);\n } else {\n let styleMetadata = metadata.styles;\n let isEmpty = false;\n if (!styleMetadata) {\n isEmpty = true;\n const newStyleData = {};\n if (timingAst.easing) {\n newStyleData['easing'] = timingAst.easing;\n }\n styleMetadata = style(newStyleData);\n }\n context.currentTime += timingAst.duration + timingAst.delay;\n const _styleAst = this.visitStyle(styleMetadata, context);\n _styleAst.isEmptyStep = isEmpty;\n styleAst = _styleAst;\n }\n context.currentAnimateTimings = null;\n return {\n type: AnimationMetadataType.Animate,\n timings: timingAst,\n style: styleAst,\n options: null\n };\n }\n visitStyle(metadata, context) {\n const ast = this._makeStyleAst(metadata, context);\n this._validateStyleAst(ast, context);\n return ast;\n }\n _makeStyleAst(metadata, context) {\n const styles = [];\n const metadataStyles = Array.isArray(metadata.styles) ? metadata.styles : [metadata.styles];\n for (let styleTuple of metadataStyles) {\n if (typeof styleTuple === 'string') {\n if (styleTuple === AUTO_STYLE) {\n styles.push(styleTuple);\n } else {\n context.errors.push(invalidStyleValue(styleTuple));\n }\n } else {\n styles.push(new Map(Object.entries(styleTuple)));\n }\n }\n let containsDynamicStyles = false;\n let collectedEasing = null;\n styles.forEach(styleData => {\n if (styleData instanceof Map) {\n if (styleData.has('easing')) {\n collectedEasing = styleData.get('easing');\n styleData.delete('easing');\n }\n if (!containsDynamicStyles) {\n for (let value of styleData.values()) {\n if (value.toString().indexOf(SUBSTITUTION_EXPR_START) >= 0) {\n containsDynamicStyles = true;\n break;\n }\n }\n }\n }\n });\n return {\n type: AnimationMetadataType.Style,\n styles,\n easing: collectedEasing,\n offset: metadata.offset,\n containsDynamicStyles,\n options: null\n };\n }\n _validateStyleAst(ast, context) {\n const timings = context.currentAnimateTimings;\n let endTime = context.currentTime;\n let startTime = context.currentTime;\n if (timings && startTime > 0) {\n startTime -= timings.duration + timings.delay;\n }\n ast.styles.forEach(tuple => {\n if (typeof tuple === 'string') return;\n tuple.forEach((value, prop) => {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!this._driver.validateStyleProperty(prop)) {\n tuple.delete(prop);\n context.unsupportedCSSPropertiesFound.add(prop);\n return;\n }\n }\n // This is guaranteed to have a defined Map at this querySelector location making it\n // safe to add the assertion here. It is set as a default empty map in prior methods.\n const collectedStyles = context.collectedStyles.get(context.currentQuerySelector);\n const collectedEntry = collectedStyles.get(prop);\n let updateCollectedStyle = true;\n if (collectedEntry) {\n if (startTime != endTime && startTime >= collectedEntry.startTime && endTime <= collectedEntry.endTime) {\n context.errors.push(invalidParallelAnimation(prop, collectedEntry.startTime, collectedEntry.endTime, startTime, endTime));\n updateCollectedStyle = false;\n }\n // we always choose the smaller start time value since we\n // want to have a record of the entire animation window where\n // the style property is being animated in between\n startTime = collectedEntry.startTime;\n }\n if (updateCollectedStyle) {\n collectedStyles.set(prop, {\n startTime,\n endTime\n });\n }\n if (context.options) {\n validateStyleParams(value, context.options, context.errors);\n }\n });\n });\n }\n visitKeyframes(metadata, context) {\n const ast = {\n type: AnimationMetadataType.Keyframes,\n styles: [],\n options: null\n };\n if (!context.currentAnimateTimings) {\n context.errors.push(invalidKeyframes());\n return ast;\n }\n const MAX_KEYFRAME_OFFSET = 1;\n let totalKeyframesWithOffsets = 0;\n const offsets = [];\n let offsetsOutOfOrder = false;\n let keyframesOutOfRange = false;\n let previousOffset = 0;\n const keyframes = metadata.steps.map(styles => {\n const style = this._makeStyleAst(styles, context);\n let offsetVal = style.offset != null ? style.offset : consumeOffset(style.styles);\n let offset = 0;\n if (offsetVal != null) {\n totalKeyframesWithOffsets++;\n offset = style.offset = offsetVal;\n }\n keyframesOutOfRange = keyframesOutOfRange || offset < 0 || offset > 1;\n offsetsOutOfOrder = offsetsOutOfOrder || offset < previousOffset;\n previousOffset = offset;\n offsets.push(offset);\n return style;\n });\n if (keyframesOutOfRange) {\n context.errors.push(invalidOffset());\n }\n if (offsetsOutOfOrder) {\n context.errors.push(keyframeOffsetsOutOfOrder());\n }\n const length = metadata.steps.length;\n let generatedOffset = 0;\n if (totalKeyframesWithOffsets > 0 && totalKeyframesWithOffsets < length) {\n context.errors.push(keyframesMissingOffsets());\n } else if (totalKeyframesWithOffsets == 0) {\n generatedOffset = MAX_KEYFRAME_OFFSET / (length - 1);\n }\n const limit = length - 1;\n const currentTime = context.currentTime;\n const currentAnimateTimings = context.currentAnimateTimings;\n const animateDuration = currentAnimateTimings.duration;\n keyframes.forEach((kf, i) => {\n const offset = generatedOffset > 0 ? i == limit ? 1 : generatedOffset * i : offsets[i];\n const durationUpToThisFrame = offset * animateDuration;\n context.currentTime = currentTime + currentAnimateTimings.delay + durationUpToThisFrame;\n currentAnimateTimings.duration = durationUpToThisFrame;\n this._validateStyleAst(kf, context);\n kf.offset = offset;\n ast.styles.push(kf);\n });\n return ast;\n }\n visitReference(metadata, context) {\n return {\n type: AnimationMetadataType.Reference,\n animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitAnimateChild(metadata, context) {\n context.depCount++;\n return {\n type: AnimationMetadataType.AnimateChild,\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitAnimateRef(metadata, context) {\n return {\n type: AnimationMetadataType.AnimateRef,\n animation: this.visitReference(metadata.animation, context),\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitQuery(metadata, context) {\n const parentSelector = context.currentQuerySelector;\n const options = metadata.options || {};\n context.queryCount++;\n context.currentQuery = metadata;\n const [selector, includeSelf] = normalizeSelector(metadata.selector);\n context.currentQuerySelector = parentSelector.length ? parentSelector + ' ' + selector : selector;\n getOrSetDefaultValue(context.collectedStyles, context.currentQuerySelector, new Map());\n const animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);\n context.currentQuery = null;\n context.currentQuerySelector = parentSelector;\n return {\n type: AnimationMetadataType.Query,\n selector,\n limit: options.limit || 0,\n optional: !!options.optional,\n includeSelf,\n animation,\n originalSelector: metadata.selector,\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitStagger(metadata, context) {\n if (!context.currentQuery) {\n context.errors.push(invalidStagger());\n }\n const timings = metadata.timings === 'full' ? {\n duration: 0,\n delay: 0,\n easing: 'full'\n } : resolveTiming(metadata.timings, context.errors, true);\n return {\n type: AnimationMetadataType.Stagger,\n animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),\n timings,\n options: null\n };\n }\n}\nfunction normalizeSelector(selector) {\n const hasAmpersand = selector.split(/\\s*,\\s*/).find(token => token == SELF_TOKEN) ? true : false;\n if (hasAmpersand) {\n selector = selector.replace(SELF_TOKEN_REGEX, '');\n }\n // Note: the :enter and :leave aren't normalized here since those\n // selectors are filled in at runtime during timeline building\n selector = selector.replace(/@\\*/g, NG_TRIGGER_SELECTOR).replace(/@\\w+/g, match => NG_TRIGGER_SELECTOR + '-' + match.slice(1)).replace(/:animating/g, NG_ANIMATING_SELECTOR);\n return [selector, hasAmpersand];\n}\nfunction normalizeParams(obj) {\n return obj ? {\n ...obj\n } : null;\n}\nclass AnimationAstBuilderContext {\n constructor(errors) {\n this.errors = errors;\n this.queryCount = 0;\n this.depCount = 0;\n this.currentTransition = null;\n this.currentQuery = null;\n this.currentQuerySelector = null;\n this.currentAnimateTimings = null;\n this.currentTime = 0;\n this.collectedStyles = new Map();\n this.options = null;\n this.unsupportedCSSPropertiesFound = new Set();\n }\n}\nfunction consumeOffset(styles) {\n if (typeof styles == 'string') return null;\n let offset = null;\n if (Array.isArray(styles)) {\n styles.forEach(styleTuple => {\n if (styleTuple instanceof Map && styleTuple.has('offset')) {\n const obj = styleTuple;\n offset = parseFloat(obj.get('offset'));\n obj.delete('offset');\n }\n });\n } else if (styles instanceof Map && styles.has('offset')) {\n const obj = styles;\n offset = parseFloat(obj.get('offset'));\n obj.delete('offset');\n }\n return offset;\n}\nfunction constructTimingAst(value, errors) {\n if (value.hasOwnProperty('duration')) {\n return value;\n }\n if (typeof value == 'number') {\n const duration = resolveTiming(value, errors).duration;\n return makeTimingAst(duration, 0, '');\n }\n const strValue = value;\n const isDynamic = strValue.split(/\\s+/).some(v => v.charAt(0) == '{' && v.charAt(1) == '{');\n if (isDynamic) {\n const ast = makeTimingAst(0, 0, '');\n ast.dynamic = true;\n ast.strValue = strValue;\n return ast;\n }\n const timings = resolveTiming(strValue, errors);\n return makeTimingAst(timings.duration, timings.delay, timings.easing);\n}\nfunction normalizeAnimationOptions(options) {\n if (options) {\n options = {\n ...options\n };\n if (options['params']) {\n options['params'] = normalizeParams(options['params']);\n }\n } else {\n options = {};\n }\n return options;\n}\nfunction makeTimingAst(duration, delay, easing) {\n return {\n duration,\n delay,\n easing\n };\n}\nfunction createTimelineInstruction(element, keyframes, preStyleProps, postStyleProps, duration, delay, easing = null, subTimeline = false) {\n return {\n type: 1 /* AnimationTransitionInstructionType.TimelineAnimation */,\n element,\n keyframes,\n preStyleProps,\n postStyleProps,\n duration,\n delay,\n totalTime: duration + delay,\n easing,\n subTimeline\n };\n}\nclass ElementInstructionMap {\n constructor() {\n this._map = new Map();\n }\n get(element) {\n return this._map.get(element) || [];\n }\n append(element, instructions) {\n let existingInstructions = this._map.get(element);\n if (!existingInstructions) {\n this._map.set(element, existingInstructions = []);\n }\n existingInstructions.push(...instructions);\n }\n has(element) {\n return this._map.has(element);\n }\n clear() {\n this._map.clear();\n }\n}\nconst ONE_FRAME_IN_MILLISECONDS = 1;\nconst ENTER_TOKEN = ':enter';\nconst ENTER_TOKEN_REGEX = /*#__PURE__*/new RegExp(ENTER_TOKEN, 'g');\nconst LEAVE_TOKEN = ':leave';\nconst LEAVE_TOKEN_REGEX = /*#__PURE__*/new RegExp(LEAVE_TOKEN, 'g');\n/*\n * The code within this file aims to generate web-animations-compatible keyframes from Angular's\n * animation DSL code.\n *\n * The code below will be converted from:\n *\n * ```\n * sequence([\n * style({ opacity: 0 }),\n * animate(1000, style({ opacity: 0 }))\n * ])\n * ```\n *\n * To:\n * ```\n * keyframes = [{ opacity: 0, offset: 0 }, { opacity: 1, offset: 1 }]\n * duration = 1000\n * delay = 0\n * easing = ''\n * ```\n *\n * For this operation to cover the combination of animation verbs (style, animate, group, etc...) a\n * combination of AST traversal and merge-sort-like algorithms are used.\n *\n * [AST Traversal]\n * Each of the animation verbs, when executed, will return an string-map object representing what\n * type of action it is (style, animate, group, etc...) and the data associated with it. This means\n * that when functional composition mix of these functions is evaluated (like in the example above)\n * then it will end up producing a tree of objects representing the animation itself.\n *\n * When this animation object tree is processed by the visitor code below it will visit each of the\n * verb statements within the visitor. And during each visit it will build the context of the\n * animation keyframes by interacting with the `TimelineBuilder`.\n *\n * [TimelineBuilder]\n * This class is responsible for tracking the styles and building a series of keyframe objects for a\n * timeline between a start and end time. The builder starts off with an initial timeline and each\n * time the AST comes across a `group()`, `keyframes()` or a combination of the two within a\n * `sequence()` then it will generate a sub timeline for each step as well as a new one after\n * they are complete.\n *\n * As the AST is traversed, the timing state on each of the timelines will be incremented. If a sub\n * timeline was created (based on one of the cases above) then the parent timeline will attempt to\n * merge the styles used within the sub timelines into itself (only with group() this will happen).\n * This happens with a merge operation (much like how the merge works in mergeSort) and it will only\n * copy the most recently used styles from the sub timelines into the parent timeline. This ensures\n * that if the styles are used later on in another phase of the animation then they will be the most\n * up-to-date values.\n *\n * [How Missing Styles Are Updated]\n * Each timeline has a `backFill` property which is responsible for filling in new styles into\n * already processed keyframes if a new style shows up later within the animation sequence.\n *\n * ```\n * sequence([\n * style({ width: 0 }),\n * animate(1000, style({ width: 100 })),\n * animate(1000, style({ width: 200 })),\n * animate(1000, style({ width: 300 }))\n * animate(1000, style({ width: 400, height: 400 })) // notice how `height` doesn't exist anywhere\n * else\n * ])\n * ```\n *\n * What is happening here is that the `height` value is added later in the sequence, but is missing\n * from all previous animation steps. Therefore when a keyframe is created it would also be missing\n * from all previous keyframes up until where it is first used. For the timeline keyframe generation\n * to properly fill in the style it will place the previous value (the value from the parent\n * timeline) or a default value of `*` into the backFill map.\n *\n * When a sub-timeline is created it will have its own backFill property. This is done so that\n * styles present within the sub-timeline do not accidentally seep into the previous/future timeline\n * keyframes\n *\n * [Validation]\n * The code in this file is not responsible for validation. That functionality happens with within\n * the `AnimationValidatorVisitor` code.\n */\nfunction buildAnimationTimelines(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles = new Map(), finalStyles = new Map(), options, subInstructions, errors = []) {\n return new AnimationTimelineBuilderVisitor().buildKeyframes(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors);\n}\nclass AnimationTimelineBuilderVisitor {\n buildKeyframes(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors = []) {\n subInstructions = subInstructions || new ElementInstructionMap();\n const context = new AnimationTimelineContext(driver, rootElement, subInstructions, enterClassName, leaveClassName, errors, []);\n context.options = options;\n const delay = options.delay ? resolveTimingValue(options.delay) : 0;\n context.currentTimeline.delayNextStep(delay);\n context.currentTimeline.setStyles([startingStyles], null, context.errors, options);\n visitDslNode(this, ast, context);\n // this checks to see if an actual animation happened\n const timelines = context.timelines.filter(timeline => timeline.containsAnimation());\n // note: we just want to apply the final styles for the rootElement, so we do not\n // just apply the styles to the last timeline but the last timeline which\n // element is the root one (basically `*`-styles are replaced with the actual\n // state style values only for the root element)\n if (timelines.length && finalStyles.size) {\n let lastRootTimeline;\n for (let i = timelines.length - 1; i >= 0; i--) {\n const timeline = timelines[i];\n if (timeline.element === rootElement) {\n lastRootTimeline = timeline;\n break;\n }\n }\n if (lastRootTimeline && !lastRootTimeline.allowOnlyTimelineStyles()) {\n lastRootTimeline.setStyles([finalStyles], null, context.errors, options);\n }\n }\n return timelines.length ? timelines.map(timeline => timeline.buildKeyframes()) : [createTimelineInstruction(rootElement, [], [], [], 0, delay, '', false)];\n }\n visitTrigger(ast, context) {\n // these values are not visited in this AST\n }\n visitState(ast, context) {\n // these values are not visited in this AST\n }\n visitTransition(ast, context) {\n // these values are not visited in this AST\n }\n visitAnimateChild(ast, context) {\n const elementInstructions = context.subInstructions.get(context.element);\n if (elementInstructions) {\n const innerContext = context.createSubContext(ast.options);\n const startTime = context.currentTimeline.currentTime;\n const endTime = this._visitSubInstructions(elementInstructions, innerContext, innerContext.options);\n if (startTime != endTime) {\n // we do this on the upper context because we created a sub context for\n // the sub child animations\n context.transformIntoNewTimeline(endTime);\n }\n }\n context.previousNode = ast;\n }\n visitAnimateRef(ast, context) {\n const innerContext = context.createSubContext(ast.options);\n innerContext.transformIntoNewTimeline();\n this._applyAnimationRefDelays([ast.options, ast.animation.options], context, innerContext);\n this.visitReference(ast.animation, innerContext);\n context.transformIntoNewTimeline(innerContext.currentTimeline.currentTime);\n context.previousNode = ast;\n }\n _applyAnimationRefDelays(animationsRefsOptions, context, innerContext) {\n for (const animationRefOptions of animationsRefsOptions) {\n const animationDelay = animationRefOptions?.delay;\n if (animationDelay) {\n const animationDelayValue = typeof animationDelay === 'number' ? animationDelay : resolveTimingValue(interpolateParams(animationDelay, animationRefOptions?.params ?? {}, context.errors));\n innerContext.delayNextStep(animationDelayValue);\n }\n }\n }\n _visitSubInstructions(instructions, context, options) {\n const startTime = context.currentTimeline.currentTime;\n let furthestTime = startTime;\n // this is a special-case for when a user wants to skip a sub\n // animation from being fired entirely.\n const duration = options.duration != null ? resolveTimingValue(options.duration) : null;\n const delay = options.delay != null ? resolveTimingValue(options.delay) : null;\n if (duration !== 0) {\n instructions.forEach(instruction => {\n const instructionTimings = context.appendInstructionToTimeline(instruction, duration, delay);\n furthestTime = Math.max(furthestTime, instructionTimings.duration + instructionTimings.delay);\n });\n }\n return furthestTime;\n }\n visitReference(ast, context) {\n context.updateOptions(ast.options, true);\n visitDslNode(this, ast.animation, context);\n context.previousNode = ast;\n }\n visitSequence(ast, context) {\n const subContextCount = context.subContextCount;\n let ctx = context;\n const options = ast.options;\n if (options && (options.params || options.delay)) {\n ctx = context.createSubContext(options);\n ctx.transformIntoNewTimeline();\n if (options.delay != null) {\n if (ctx.previousNode.type == AnimationMetadataType.Style) {\n ctx.currentTimeline.snapshotCurrentStyles();\n ctx.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n }\n const delay = resolveTimingValue(options.delay);\n ctx.delayNextStep(delay);\n }\n }\n if (ast.steps.length) {\n ast.steps.forEach(s => visitDslNode(this, s, ctx));\n // this is here just in case the inner steps only contain or end with a style() call\n ctx.currentTimeline.applyStylesToKeyframe();\n // this means that some animation function within the sequence\n // ended up creating a sub timeline (which means the current\n // timeline cannot overlap with the contents of the sequence)\n if (ctx.subContextCount > subContextCount) {\n ctx.transformIntoNewTimeline();\n }\n }\n context.previousNode = ast;\n }\n visitGroup(ast, context) {\n const innerTimelines = [];\n let furthestTime = context.currentTimeline.currentTime;\n const delay = ast.options && ast.options.delay ? resolveTimingValue(ast.options.delay) : 0;\n ast.steps.forEach(s => {\n const innerContext = context.createSubContext(ast.options);\n if (delay) {\n innerContext.delayNextStep(delay);\n }\n visitDslNode(this, s, innerContext);\n furthestTime = Math.max(furthestTime, innerContext.currentTimeline.currentTime);\n innerTimelines.push(innerContext.currentTimeline);\n });\n // this operation is run after the AST loop because otherwise\n // if the parent timeline's collected styles were updated then\n // it would pass in invalid data into the new-to-be forked items\n innerTimelines.forEach(timeline => context.currentTimeline.mergeTimelineCollectedStyles(timeline));\n context.transformIntoNewTimeline(furthestTime);\n context.previousNode = ast;\n }\n _visitTiming(ast, context) {\n if (ast.dynamic) {\n const strValue = ast.strValue;\n const timingValue = context.params ? interpolateParams(strValue, context.params, context.errors) : strValue;\n return resolveTiming(timingValue, context.errors);\n } else {\n return {\n duration: ast.duration,\n delay: ast.delay,\n easing: ast.easing\n };\n }\n }\n visitAnimate(ast, context) {\n const timings = context.currentAnimateTimings = this._visitTiming(ast.timings, context);\n const timeline = context.currentTimeline;\n if (timings.delay) {\n context.incrementTime(timings.delay);\n timeline.snapshotCurrentStyles();\n }\n const style = ast.style;\n if (style.type == AnimationMetadataType.Keyframes) {\n this.visitKeyframes(style, context);\n } else {\n context.incrementTime(timings.duration);\n this.visitStyle(style, context);\n timeline.applyStylesToKeyframe();\n }\n context.currentAnimateTimings = null;\n context.previousNode = ast;\n }\n visitStyle(ast, context) {\n const timeline = context.currentTimeline;\n const timings = context.currentAnimateTimings;\n // this is a special case for when a style() call\n // directly follows an animate() call (but not inside of an animate() call)\n if (!timings && timeline.hasCurrentStyleProperties()) {\n timeline.forwardFrame();\n }\n const easing = timings && timings.easing || ast.easing;\n if (ast.isEmptyStep) {\n timeline.applyEmptyStep(easing);\n } else {\n timeline.setStyles(ast.styles, easing, context.errors, context.options);\n }\n context.previousNode = ast;\n }\n visitKeyframes(ast, context) {\n const currentAnimateTimings = context.currentAnimateTimings;\n const startTime = context.currentTimeline.duration;\n const duration = currentAnimateTimings.duration;\n const innerContext = context.createSubContext();\n const innerTimeline = innerContext.currentTimeline;\n innerTimeline.easing = currentAnimateTimings.easing;\n ast.styles.forEach(step => {\n const offset = step.offset || 0;\n innerTimeline.forwardTime(offset * duration);\n innerTimeline.setStyles(step.styles, step.easing, context.errors, context.options);\n innerTimeline.applyStylesToKeyframe();\n });\n // this will ensure that the parent timeline gets all the styles from\n // the child even if the new timeline below is not used\n context.currentTimeline.mergeTimelineCollectedStyles(innerTimeline);\n // we do this because the window between this timeline and the sub timeline\n // should ensure that the styles within are exactly the same as they were before\n context.transformIntoNewTimeline(startTime + duration);\n context.previousNode = ast;\n }\n visitQuery(ast, context) {\n // in the event that the first step before this is a style step we need\n // to ensure the styles are applied before the children are animated\n const startTime = context.currentTimeline.currentTime;\n const options = ast.options || {};\n const delay = options.delay ? resolveTimingValue(options.delay) : 0;\n if (delay && (context.previousNode.type === AnimationMetadataType.Style || startTime == 0 && context.currentTimeline.hasCurrentStyleProperties())) {\n context.currentTimeline.snapshotCurrentStyles();\n context.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n }\n let furthestTime = startTime;\n const elms = context.invokeQuery(ast.selector, ast.originalSelector, ast.limit, ast.includeSelf, options.optional ? true : false, context.errors);\n context.currentQueryTotal = elms.length;\n let sameElementTimeline = null;\n elms.forEach((element, i) => {\n context.currentQueryIndex = i;\n const innerContext = context.createSubContext(ast.options, element);\n if (delay) {\n innerContext.delayNextStep(delay);\n }\n if (element === context.element) {\n sameElementTimeline = innerContext.currentTimeline;\n }\n visitDslNode(this, ast.animation, innerContext);\n // this is here just incase the inner steps only contain or end\n // with a style() call (which is here to signal that this is a preparatory\n // call to style an element before it is animated again)\n innerContext.currentTimeline.applyStylesToKeyframe();\n const endTime = innerContext.currentTimeline.currentTime;\n furthestTime = Math.max(furthestTime, endTime);\n });\n context.currentQueryIndex = 0;\n context.currentQueryTotal = 0;\n context.transformIntoNewTimeline(furthestTime);\n if (sameElementTimeline) {\n context.currentTimeline.mergeTimelineCollectedStyles(sameElementTimeline);\n context.currentTimeline.snapshotCurrentStyles();\n }\n context.previousNode = ast;\n }\n visitStagger(ast, context) {\n const parentContext = context.parentContext;\n const tl = context.currentTimeline;\n const timings = ast.timings;\n const duration = Math.abs(timings.duration);\n const maxTime = duration * (context.currentQueryTotal - 1);\n let delay = duration * context.currentQueryIndex;\n let staggerTransformer = timings.duration < 0 ? 'reverse' : timings.easing;\n switch (staggerTransformer) {\n case 'reverse':\n delay = maxTime - delay;\n break;\n case 'full':\n delay = parentContext.currentStaggerTime;\n break;\n }\n const timeline = context.currentTimeline;\n if (delay) {\n timeline.delayNextStep(delay);\n }\n const startingTime = timeline.currentTime;\n visitDslNode(this, ast.animation, context);\n context.previousNode = ast;\n // time = duration + delay\n // the reason why this computation is so complex is because\n // the inner timeline may either have a delay value or a stretched\n // keyframe depending on if a subtimeline is not used or is used.\n parentContext.currentStaggerTime = tl.currentTime - startingTime + (tl.startTime - parentContext.currentTimeline.startTime);\n }\n}\nconst DEFAULT_NOOP_PREVIOUS_NODE = {};\nclass AnimationTimelineContext {\n constructor(_driver, element, subInstructions, _enterClassName, _leaveClassName, errors, timelines, initialTimeline) {\n this._driver = _driver;\n this.element = element;\n this.subInstructions = subInstructions;\n this._enterClassName = _enterClassName;\n this._leaveClassName = _leaveClassName;\n this.errors = errors;\n this.timelines = timelines;\n this.parentContext = null;\n this.currentAnimateTimings = null;\n this.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n this.subContextCount = 0;\n this.options = {};\n this.currentQueryIndex = 0;\n this.currentQueryTotal = 0;\n this.currentStaggerTime = 0;\n this.currentTimeline = initialTimeline || new TimelineBuilder(this._driver, element, 0);\n timelines.push(this.currentTimeline);\n }\n get params() {\n return this.options.params;\n }\n updateOptions(options, skipIfExists) {\n if (!options) return;\n const newOptions = options;\n let optionsToUpdate = this.options;\n // NOTE: this will get patched up when other animation methods support duration overrides\n if (newOptions.duration != null) {\n optionsToUpdate.duration = resolveTimingValue(newOptions.duration);\n }\n if (newOptions.delay != null) {\n optionsToUpdate.delay = resolveTimingValue(newOptions.delay);\n }\n const newParams = newOptions.params;\n if (newParams) {\n let paramsToUpdate = optionsToUpdate.params;\n if (!paramsToUpdate) {\n paramsToUpdate = this.options.params = {};\n }\n Object.keys(newParams).forEach(name => {\n if (!skipIfExists || !paramsToUpdate.hasOwnProperty(name)) {\n paramsToUpdate[name] = interpolateParams(newParams[name], paramsToUpdate, this.errors);\n }\n });\n }\n }\n _copyOptions() {\n const options = {};\n if (this.options) {\n const oldParams = this.options.params;\n if (oldParams) {\n const params = options['params'] = {};\n Object.keys(oldParams).forEach(name => {\n params[name] = oldParams[name];\n });\n }\n }\n return options;\n }\n createSubContext(options = null, element, newTime) {\n const target = element || this.element;\n const context = new AnimationTimelineContext(this._driver, target, this.subInstructions, this._enterClassName, this._leaveClassName, this.errors, this.timelines, this.currentTimeline.fork(target, newTime || 0));\n context.previousNode = this.previousNode;\n context.currentAnimateTimings = this.currentAnimateTimings;\n context.options = this._copyOptions();\n context.updateOptions(options);\n context.currentQueryIndex = this.currentQueryIndex;\n context.currentQueryTotal = this.currentQueryTotal;\n context.parentContext = this;\n this.subContextCount++;\n return context;\n }\n transformIntoNewTimeline(newTime) {\n this.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n this.currentTimeline = this.currentTimeline.fork(this.element, newTime);\n this.timelines.push(this.currentTimeline);\n return this.currentTimeline;\n }\n appendInstructionToTimeline(instruction, duration, delay) {\n const updatedTimings = {\n duration: duration != null ? duration : instruction.duration,\n delay: this.currentTimeline.currentTime + (delay != null ? delay : 0) + instruction.delay,\n easing: ''\n };\n const builder = new SubTimelineBuilder(this._driver, instruction.element, instruction.keyframes, instruction.preStyleProps, instruction.postStyleProps, updatedTimings, instruction.stretchStartingKeyframe);\n this.timelines.push(builder);\n return updatedTimings;\n }\n incrementTime(time) {\n this.currentTimeline.forwardTime(this.currentTimeline.duration + time);\n }\n delayNextStep(delay) {\n // negative delays are not yet supported\n if (delay > 0) {\n this.currentTimeline.delayNextStep(delay);\n }\n }\n invokeQuery(selector, originalSelector, limit, includeSelf, optional, errors) {\n let results = [];\n if (includeSelf) {\n results.push(this.element);\n }\n if (selector.length > 0) {\n // only if :self is used then the selector can be empty\n selector = selector.replace(ENTER_TOKEN_REGEX, '.' + this._enterClassName);\n selector = selector.replace(LEAVE_TOKEN_REGEX, '.' + this._leaveClassName);\n const multi = limit != 1;\n let elements = this._driver.query(this.element, selector, multi);\n if (limit !== 0) {\n elements = limit < 0 ? elements.slice(elements.length + limit, elements.length) : elements.slice(0, limit);\n }\n results.push(...elements);\n }\n if (!optional && results.length == 0) {\n errors.push(invalidQuery(originalSelector));\n }\n return results;\n }\n}\nclass TimelineBuilder {\n constructor(_driver, element, startTime, _elementTimelineStylesLookup) {\n this._driver = _driver;\n this.element = element;\n this.startTime = startTime;\n this._elementTimelineStylesLookup = _elementTimelineStylesLookup;\n this.duration = 0;\n this.easing = null;\n this._previousKeyframe = new Map();\n this._currentKeyframe = new Map();\n this._keyframes = new Map();\n this._styleSummary = new Map();\n this._localTimelineStyles = new Map();\n this._pendingStyles = new Map();\n this._backFill = new Map();\n this._currentEmptyStepKeyframe = null;\n if (!this._elementTimelineStylesLookup) {\n this._elementTimelineStylesLookup = new Map();\n }\n this._globalTimelineStyles = this._elementTimelineStylesLookup.get(element);\n if (!this._globalTimelineStyles) {\n this._globalTimelineStyles = this._localTimelineStyles;\n this._elementTimelineStylesLookup.set(element, this._localTimelineStyles);\n }\n this._loadKeyframe();\n }\n containsAnimation() {\n switch (this._keyframes.size) {\n case 0:\n return false;\n case 1:\n return this.hasCurrentStyleProperties();\n default:\n return true;\n }\n }\n hasCurrentStyleProperties() {\n return this._currentKeyframe.size > 0;\n }\n get currentTime() {\n return this.startTime + this.duration;\n }\n delayNextStep(delay) {\n // in the event that a style() step is placed right before a stagger()\n // and that style() step is the very first style() value in the animation\n // then we need to make a copy of the keyframe [0, copy, 1] so that the delay\n // properly applies the style() values to work with the stagger...\n const hasPreStyleStep = this._keyframes.size === 1 && this._pendingStyles.size;\n if (this.duration || hasPreStyleStep) {\n this.forwardTime(this.currentTime + delay);\n if (hasPreStyleStep) {\n this.snapshotCurrentStyles();\n }\n } else {\n this.startTime += delay;\n }\n }\n fork(element, currentTime) {\n this.applyStylesToKeyframe();\n return new TimelineBuilder(this._driver, element, currentTime || this.currentTime, this._elementTimelineStylesLookup);\n }\n _loadKeyframe() {\n if (this._currentKeyframe) {\n this._previousKeyframe = this._currentKeyframe;\n }\n this._currentKeyframe = this._keyframes.get(this.duration);\n if (!this._currentKeyframe) {\n this._currentKeyframe = new Map();\n this._keyframes.set(this.duration, this._currentKeyframe);\n }\n }\n forwardFrame() {\n this.duration += ONE_FRAME_IN_MILLISECONDS;\n this._loadKeyframe();\n }\n forwardTime(time) {\n this.applyStylesToKeyframe();\n this.duration = time;\n this._loadKeyframe();\n }\n _updateStyle(prop, value) {\n this._localTimelineStyles.set(prop, value);\n this._globalTimelineStyles.set(prop, value);\n this._styleSummary.set(prop, {\n time: this.currentTime,\n value\n });\n }\n allowOnlyTimelineStyles() {\n return this._currentEmptyStepKeyframe !== this._currentKeyframe;\n }\n applyEmptyStep(easing) {\n if (easing) {\n this._previousKeyframe.set('easing', easing);\n }\n // special case for animate(duration):\n // all missing styles are filled with a `*` value then\n // if any destination styles are filled in later on the same\n // keyframe then they will override the overridden styles\n // We use `_globalTimelineStyles` here because there may be\n // styles in previous keyframes that are not present in this timeline\n for (let [prop, value] of this._globalTimelineStyles) {\n this._backFill.set(prop, value || AUTO_STYLE);\n this._currentKeyframe.set(prop, AUTO_STYLE);\n }\n this._currentEmptyStepKeyframe = this._currentKeyframe;\n }\n setStyles(input, easing, errors, options) {\n if (easing) {\n this._previousKeyframe.set('easing', easing);\n }\n const params = options && options.params || {};\n const styles = flattenStyles(input, this._globalTimelineStyles);\n for (let [prop, value] of styles) {\n const val = interpolateParams(value, params, errors);\n this._pendingStyles.set(prop, val);\n if (!this._localTimelineStyles.has(prop)) {\n this._backFill.set(prop, this._globalTimelineStyles.get(prop) ?? AUTO_STYLE);\n }\n this._updateStyle(prop, val);\n }\n }\n applyStylesToKeyframe() {\n if (this._pendingStyles.size == 0) return;\n this._pendingStyles.forEach((val, prop) => {\n this._currentKeyframe.set(prop, val);\n });\n this._pendingStyles.clear();\n this._localTimelineStyles.forEach((val, prop) => {\n if (!this._currentKeyframe.has(prop)) {\n this._currentKeyframe.set(prop, val);\n }\n });\n }\n snapshotCurrentStyles() {\n for (let [prop, val] of this._localTimelineStyles) {\n this._pendingStyles.set(prop, val);\n this._updateStyle(prop, val);\n }\n }\n getFinalKeyframe() {\n return this._keyframes.get(this.duration);\n }\n get properties() {\n const properties = [];\n for (let prop in this._currentKeyframe) {\n properties.push(prop);\n }\n return properties;\n }\n mergeTimelineCollectedStyles(timeline) {\n timeline._styleSummary.forEach((details1, prop) => {\n const details0 = this._styleSummary.get(prop);\n if (!details0 || details1.time > details0.time) {\n this._updateStyle(prop, details1.value);\n }\n });\n }\n buildKeyframes() {\n this.applyStylesToKeyframe();\n const preStyleProps = new Set();\n const postStyleProps = new Set();\n const isEmpty = this._keyframes.size === 1 && this.duration === 0;\n let finalKeyframes = [];\n this._keyframes.forEach((keyframe, time) => {\n const finalKeyframe = new Map([...this._backFill, ...keyframe]);\n finalKeyframe.forEach((value, prop) => {\n if (value === ɵPRE_STYLE) {\n preStyleProps.add(prop);\n } else if (value === AUTO_STYLE) {\n postStyleProps.add(prop);\n }\n });\n if (!isEmpty) {\n finalKeyframe.set('offset', time / this.duration);\n }\n finalKeyframes.push(finalKeyframe);\n });\n const preProps = [...preStyleProps.values()];\n const postProps = [...postStyleProps.values()];\n // special case for a 0-second animation (which is designed just to place styles onscreen)\n if (isEmpty) {\n const kf0 = finalKeyframes[0];\n const kf1 = new Map(kf0);\n kf0.set('offset', 0);\n kf1.set('offset', 1);\n finalKeyframes = [kf0, kf1];\n }\n return createTimelineInstruction(this.element, finalKeyframes, preProps, postProps, this.duration, this.startTime, this.easing, false);\n }\n}\nclass SubTimelineBuilder extends TimelineBuilder {\n constructor(driver, element, keyframes, preStyleProps, postStyleProps, timings, _stretchStartingKeyframe = false) {\n super(driver, element, timings.delay);\n this.keyframes = keyframes;\n this.preStyleProps = preStyleProps;\n this.postStyleProps = postStyleProps;\n this._stretchStartingKeyframe = _stretchStartingKeyframe;\n this.timings = {\n duration: timings.duration,\n delay: timings.delay,\n easing: timings.easing\n };\n }\n containsAnimation() {\n return this.keyframes.length > 1;\n }\n buildKeyframes() {\n let keyframes = this.keyframes;\n let {\n delay,\n duration,\n easing\n } = this.timings;\n if (this._stretchStartingKeyframe && delay) {\n const newKeyframes = [];\n const totalTime = duration + delay;\n const startingGap = delay / totalTime;\n // the original starting keyframe now starts once the delay is done\n const newFirstKeyframe = new Map(keyframes[0]);\n newFirstKeyframe.set('offset', 0);\n newKeyframes.push(newFirstKeyframe);\n const oldFirstKeyframe = new Map(keyframes[0]);\n oldFirstKeyframe.set('offset', roundOffset(startingGap));\n newKeyframes.push(oldFirstKeyframe);\n /*\n When the keyframe is stretched then it means that the delay before the animation\n starts is gone. Instead the first keyframe is placed at the start of the animation\n and it is then copied to where it starts when the original delay is over. This basically\n means nothing animates during that delay, but the styles are still rendered. For this\n to work the original offset values that exist in the original keyframes must be \"warped\"\n so that they can take the new keyframe + delay into account.\n delay=1000, duration=1000, keyframes = 0 .5 1\n turns into\n delay=0, duration=2000, keyframes = 0 .33 .66 1\n */\n // offsets between 1 ... n -1 are all warped by the keyframe stretch\n const limit = keyframes.length - 1;\n for (let i = 1; i <= limit; i++) {\n let kf = new Map(keyframes[i]);\n const oldOffset = kf.get('offset');\n const timeAtKeyframe = delay + oldOffset * duration;\n kf.set('offset', roundOffset(timeAtKeyframe / totalTime));\n newKeyframes.push(kf);\n }\n // the new starting keyframe should be added at the start\n duration = totalTime;\n delay = 0;\n easing = '';\n keyframes = newKeyframes;\n }\n return createTimelineInstruction(this.element, keyframes, this.preStyleProps, this.postStyleProps, duration, delay, easing, true);\n }\n}\nfunction roundOffset(offset, decimalPoints = 3) {\n const mult = Math.pow(10, decimalPoints - 1);\n return Math.round(offset * mult) / mult;\n}\nfunction flattenStyles(input, allStyles) {\n const styles = new Map();\n let allProperties;\n input.forEach(token => {\n if (token === '*') {\n allProperties ??= allStyles.keys();\n for (let prop of allProperties) {\n styles.set(prop, AUTO_STYLE);\n }\n } else {\n for (let [prop, val] of token) {\n styles.set(prop, val);\n }\n }\n });\n return styles;\n}\nfunction createTransitionInstruction(element, triggerName, fromState, toState, isRemovalTransition, fromStyles, toStyles, timelines, queriedElements, preStyleProps, postStyleProps, totalTime, errors) {\n return {\n type: 0 /* AnimationTransitionInstructionType.TransitionAnimation */,\n element,\n triggerName,\n isRemovalTransition,\n fromState,\n fromStyles,\n toState,\n toStyles,\n timelines,\n queriedElements,\n preStyleProps,\n postStyleProps,\n totalTime,\n errors\n };\n}\nconst EMPTY_OBJECT = {};\nclass AnimationTransitionFactory {\n constructor(_triggerName, ast, _stateStyles) {\n this._triggerName = _triggerName;\n this.ast = ast;\n this._stateStyles = _stateStyles;\n }\n match(currentState, nextState, element, params) {\n return oneOrMoreTransitionsMatch(this.ast.matchers, currentState, nextState, element, params);\n }\n buildStyles(stateName, params, errors) {\n let styler = this._stateStyles.get('*');\n if (stateName !== undefined) {\n styler = this._stateStyles.get(stateName?.toString()) || styler;\n }\n return styler ? styler.buildStyles(params, errors) : new Map();\n }\n build(driver, element, currentState, nextState, enterClassName, leaveClassName, currentOptions, nextOptions, subInstructions, skipAstBuild) {\n const errors = [];\n const transitionAnimationParams = this.ast.options && this.ast.options.params || EMPTY_OBJECT;\n const currentAnimationParams = currentOptions && currentOptions.params || EMPTY_OBJECT;\n const currentStateStyles = this.buildStyles(currentState, currentAnimationParams, errors);\n const nextAnimationParams = nextOptions && nextOptions.params || EMPTY_OBJECT;\n const nextStateStyles = this.buildStyles(nextState, nextAnimationParams, errors);\n const queriedElements = new Set();\n const preStyleMap = new Map();\n const postStyleMap = new Map();\n const isRemoval = nextState === 'void';\n const animationOptions = {\n params: applyParamDefaults(nextAnimationParams, transitionAnimationParams),\n delay: this.ast.options?.delay\n };\n const timelines = skipAstBuild ? [] : buildAnimationTimelines(driver, element, this.ast.animation, enterClassName, leaveClassName, currentStateStyles, nextStateStyles, animationOptions, subInstructions, errors);\n let totalTime = 0;\n timelines.forEach(tl => {\n totalTime = Math.max(tl.duration + tl.delay, totalTime);\n });\n if (errors.length) {\n return createTransitionInstruction(element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles, nextStateStyles, [], [], preStyleMap, postStyleMap, totalTime, errors);\n }\n timelines.forEach(tl => {\n const elm = tl.element;\n const preProps = getOrSetDefaultValue(preStyleMap, elm, new Set());\n tl.preStyleProps.forEach(prop => preProps.add(prop));\n const postProps = getOrSetDefaultValue(postStyleMap, elm, new Set());\n tl.postStyleProps.forEach(prop => postProps.add(prop));\n if (elm !== element) {\n queriedElements.add(elm);\n }\n });\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n checkNonAnimatableInTimelines(timelines, this._triggerName, driver);\n }\n return createTransitionInstruction(element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles, nextStateStyles, timelines, [...queriedElements.values()], preStyleMap, postStyleMap, totalTime);\n }\n}\n/**\n * Checks inside a set of timelines if they try to animate a css property which is not considered\n * animatable, in that case it prints a warning on the console.\n * Besides that the function doesn't have any other effect.\n *\n * Note: this check is done here after the timelines are built instead of doing on a lower level so\n * that we can make sure that the warning appears only once per instruction (we can aggregate here\n * all the issues instead of finding them separately).\n *\n * @param timelines The built timelines for the current instruction.\n * @param triggerName The name of the trigger for the current instruction.\n * @param driver Animation driver used to perform the check.\n *\n */\nfunction checkNonAnimatableInTimelines(timelines, triggerName, driver) {\n if (!driver.validateAnimatableStyleProperty) {\n return;\n }\n const allowedNonAnimatableProps = new Set([\n // 'easing' is a utility/synthetic prop we use to represent\n // easing functions, it represents a property of the animation\n // which is not animatable but different values can be used\n // in different steps\n 'easing']);\n const invalidNonAnimatableProps = new Set();\n timelines.forEach(({\n keyframes\n }) => {\n const nonAnimatablePropsInitialValues = new Map();\n keyframes.forEach(keyframe => {\n const entriesToCheck = Array.from(keyframe.entries()).filter(([prop]) => !allowedNonAnimatableProps.has(prop));\n for (const [prop, value] of entriesToCheck) {\n if (!driver.validateAnimatableStyleProperty(prop)) {\n if (nonAnimatablePropsInitialValues.has(prop) && !invalidNonAnimatableProps.has(prop)) {\n const propInitialValue = nonAnimatablePropsInitialValues.get(prop);\n if (propInitialValue !== value) {\n invalidNonAnimatableProps.add(prop);\n }\n } else {\n nonAnimatablePropsInitialValues.set(prop, value);\n }\n }\n }\n });\n });\n if (invalidNonAnimatableProps.size > 0) {\n console.warn(`Warning: The animation trigger \"${triggerName}\" is attempting to animate the following` + ' not animatable properties: ' + Array.from(invalidNonAnimatableProps).join(', ') + '\\n' + '(to check the list of all animatable properties visit https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties)');\n }\n}\nfunction oneOrMoreTransitionsMatch(matchFns, currentState, nextState, element, params) {\n return matchFns.some(fn => fn(currentState, nextState, element, params));\n}\nfunction applyParamDefaults(userParams, defaults) {\n const result = {\n ...defaults\n };\n Object.entries(userParams).forEach(([key, value]) => {\n if (value != null) {\n result[key] = value;\n }\n });\n return result;\n}\nclass AnimationStateStyles {\n constructor(styles, defaultParams, normalizer) {\n this.styles = styles;\n this.defaultParams = defaultParams;\n this.normalizer = normalizer;\n }\n buildStyles(params, errors) {\n const finalStyles = new Map();\n const combinedParams = applyParamDefaults(params, this.defaultParams);\n this.styles.styles.forEach(value => {\n if (typeof value !== 'string') {\n value.forEach((val, prop) => {\n if (val) {\n val = interpolateParams(val, combinedParams, errors);\n }\n const normalizedProp = this.normalizer.normalizePropertyName(prop, errors);\n val = this.normalizer.normalizeStyleValue(prop, normalizedProp, val, errors);\n finalStyles.set(prop, val);\n });\n }\n });\n return finalStyles;\n }\n}\nfunction buildTrigger(name, ast, normalizer) {\n return new AnimationTrigger(name, ast, normalizer);\n}\nclass AnimationTrigger {\n constructor(name, ast, _normalizer) {\n this.name = name;\n this.ast = ast;\n this._normalizer = _normalizer;\n this.transitionFactories = [];\n this.states = new Map();\n ast.states.forEach(ast => {\n const defaultParams = ast.options && ast.options.params || {};\n this.states.set(ast.name, new AnimationStateStyles(ast.style, defaultParams, _normalizer));\n });\n balanceProperties(this.states, 'true', '1');\n balanceProperties(this.states, 'false', '0');\n ast.transitions.forEach(ast => {\n this.transitionFactories.push(new AnimationTransitionFactory(name, ast, this.states));\n });\n this.fallbackTransition = createFallbackTransition(name, this.states, this._normalizer);\n }\n get containsQueries() {\n return this.ast.queryCount > 0;\n }\n matchTransition(currentState, nextState, element, params) {\n const entry = this.transitionFactories.find(f => f.match(currentState, nextState, element, params));\n return entry || null;\n }\n matchStyles(currentState, params, errors) {\n return this.fallbackTransition.buildStyles(currentState, params, errors);\n }\n}\nfunction createFallbackTransition(triggerName, states, normalizer) {\n const matchers = [(fromState, toState) => true];\n const animation = {\n type: AnimationMetadataType.Sequence,\n steps: [],\n options: null\n };\n const transition = {\n type: AnimationMetadataType.Transition,\n animation,\n matchers,\n options: null,\n queryCount: 0,\n depCount: 0\n };\n return new AnimationTransitionFactory(triggerName, transition, states);\n}\nfunction balanceProperties(stateMap, key1, key2) {\n if (stateMap.has(key1)) {\n if (!stateMap.has(key2)) {\n stateMap.set(key2, stateMap.get(key1));\n }\n } else if (stateMap.has(key2)) {\n stateMap.set(key1, stateMap.get(key2));\n }\n}\nconst EMPTY_INSTRUCTION_MAP = /*#__PURE__*/new ElementInstructionMap();\nclass TimelineAnimationEngine {\n constructor(bodyNode, _driver, _normalizer) {\n this.bodyNode = bodyNode;\n this._driver = _driver;\n this._normalizer = _normalizer;\n this._animations = new Map();\n this._playersById = new Map();\n this.players = [];\n }\n register(id, metadata) {\n const errors = [];\n const warnings = [];\n const ast = buildAnimationAst(this._driver, metadata, errors, warnings);\n if (errors.length) {\n throw registerFailed(errors);\n } else {\n if (warnings.length) {\n warnRegister(warnings);\n }\n this._animations.set(id, ast);\n }\n }\n _buildPlayer(i, preStyles, postStyles) {\n const element = i.element;\n const keyframes = normalizeKeyframes$1(this._normalizer, i.keyframes, preStyles, postStyles);\n return this._driver.animate(element, keyframes, i.duration, i.delay, i.easing, [], true);\n }\n create(id, element, options = {}) {\n const errors = [];\n const ast = this._animations.get(id);\n let instructions;\n const autoStylesMap = new Map();\n if (ast) {\n instructions = buildAnimationTimelines(this._driver, element, ast, ENTER_CLASSNAME, LEAVE_CLASSNAME, new Map(), new Map(), options, EMPTY_INSTRUCTION_MAP, errors);\n instructions.forEach(inst => {\n const styles = getOrSetDefaultValue(autoStylesMap, inst.element, new Map());\n inst.postStyleProps.forEach(prop => styles.set(prop, null));\n });\n } else {\n errors.push(missingOrDestroyedAnimation());\n instructions = [];\n }\n if (errors.length) {\n throw createAnimationFailed(errors);\n }\n autoStylesMap.forEach((styles, element) => {\n styles.forEach((_, prop) => {\n styles.set(prop, this._driver.computeStyle(element, prop, AUTO_STYLE));\n });\n });\n const players = instructions.map(i => {\n const styles = autoStylesMap.get(i.element);\n return this._buildPlayer(i, new Map(), styles);\n });\n const player = optimizeGroupPlayer(players);\n this._playersById.set(id, player);\n player.onDestroy(() => this.destroy(id));\n this.players.push(player);\n return player;\n }\n destroy(id) {\n const player = this._getPlayer(id);\n player.destroy();\n this._playersById.delete(id);\n const index = this.players.indexOf(player);\n if (index >= 0) {\n this.players.splice(index, 1);\n }\n }\n _getPlayer(id) {\n const player = this._playersById.get(id);\n if (!player) {\n throw missingPlayer(id);\n }\n return player;\n }\n listen(id, element, eventName, callback) {\n // triggerName, fromState, toState are all ignored for timeline animations\n const baseEvent = makeAnimationEvent(element, '', '', '');\n listenOnPlayer(this._getPlayer(id), eventName, baseEvent, callback);\n return () => {};\n }\n command(id, element, command, args) {\n if (command == 'register') {\n this.register(id, args[0]);\n return;\n }\n if (command == 'create') {\n const options = args[0] || {};\n this.create(id, element, options);\n return;\n }\n const player = this._getPlayer(id);\n switch (command) {\n case 'play':\n player.play();\n break;\n case 'pause':\n player.pause();\n break;\n case 'reset':\n player.reset();\n break;\n case 'restart':\n player.restart();\n break;\n case 'finish':\n player.finish();\n break;\n case 'init':\n player.init();\n break;\n case 'setPosition':\n player.setPosition(parseFloat(args[0]));\n break;\n case 'destroy':\n this.destroy(id);\n break;\n }\n }\n}\nconst QUEUED_CLASSNAME = 'ng-animate-queued';\nconst QUEUED_SELECTOR = '.ng-animate-queued';\nconst DISABLED_CLASSNAME = 'ng-animate-disabled';\nconst DISABLED_SELECTOR = '.ng-animate-disabled';\nconst STAR_CLASSNAME = 'ng-star-inserted';\nconst STAR_SELECTOR = '.ng-star-inserted';\nconst EMPTY_PLAYER_ARRAY = [];\nconst NULL_REMOVAL_STATE = {\n namespaceId: '',\n setForRemoval: false,\n setForMove: false,\n hasAnimation: false,\n removedBeforeQueried: false\n};\nconst NULL_REMOVED_QUERIED_STATE = {\n namespaceId: '',\n setForMove: false,\n setForRemoval: false,\n hasAnimation: false,\n removedBeforeQueried: true\n};\nconst REMOVAL_FLAG = '__ng_removed';\nclass StateValue {\n get params() {\n return this.options.params;\n }\n constructor(input, namespaceId = '') {\n this.namespaceId = namespaceId;\n const isObj = input && input.hasOwnProperty('value');\n const value = isObj ? input['value'] : input;\n this.value = normalizeTriggerValue(value);\n if (isObj) {\n // we drop the value property from options.\n const {\n value,\n ...options\n } = input;\n this.options = options;\n } else {\n this.options = {};\n }\n if (!this.options.params) {\n this.options.params = {};\n }\n }\n absorbOptions(options) {\n const newParams = options.params;\n if (newParams) {\n const oldParams = this.options.params;\n Object.keys(newParams).forEach(prop => {\n if (oldParams[prop] == null) {\n oldParams[prop] = newParams[prop];\n }\n });\n }\n }\n}\nconst VOID_VALUE = 'void';\nconst DEFAULT_STATE_VALUE = /*#__PURE__*/new StateValue(VOID_VALUE);\nclass AnimationTransitionNamespace {\n constructor(id, hostElement, _engine) {\n this.id = id;\n this.hostElement = hostElement;\n this._engine = _engine;\n this.players = [];\n this._triggers = new Map();\n this._queue = [];\n this._elementListeners = new Map();\n this._hostClassName = 'ng-tns-' + id;\n addClass(hostElement, this._hostClassName);\n }\n listen(element, name, phase, callback) {\n if (!this._triggers.has(name)) {\n throw missingTrigger(phase, name);\n }\n if (phase == null || phase.length == 0) {\n throw missingEvent(name);\n }\n if (!isTriggerEventValid(phase)) {\n throw unsupportedTriggerEvent(phase, name);\n }\n const listeners = getOrSetDefaultValue(this._elementListeners, element, []);\n const data = {\n name,\n phase,\n callback\n };\n listeners.push(data);\n const triggersWithStates = getOrSetDefaultValue(this._engine.statesByElement, element, new Map());\n if (!triggersWithStates.has(name)) {\n addClass(element, NG_TRIGGER_CLASSNAME);\n addClass(element, NG_TRIGGER_CLASSNAME + '-' + name);\n triggersWithStates.set(name, DEFAULT_STATE_VALUE);\n }\n return () => {\n // the event listener is removed AFTER the flush has occurred such\n // that leave animations callbacks can fire (otherwise if the node\n // is removed in between then the listeners would be deregistered)\n this._engine.afterFlush(() => {\n const index = listeners.indexOf(data);\n if (index >= 0) {\n listeners.splice(index, 1);\n }\n if (!this._triggers.has(name)) {\n triggersWithStates.delete(name);\n }\n });\n };\n }\n register(name, ast) {\n if (this._triggers.has(name)) {\n // throw\n return false;\n } else {\n this._triggers.set(name, ast);\n return true;\n }\n }\n _getTrigger(name) {\n const trigger = this._triggers.get(name);\n if (!trigger) {\n throw unregisteredTrigger(name);\n }\n return trigger;\n }\n trigger(element, triggerName, value, defaultToFallback = true) {\n const trigger = this._getTrigger(triggerName);\n const player = new TransitionAnimationPlayer(this.id, triggerName, element);\n let triggersWithStates = this._engine.statesByElement.get(element);\n if (!triggersWithStates) {\n addClass(element, NG_TRIGGER_CLASSNAME);\n addClass(element, NG_TRIGGER_CLASSNAME + '-' + triggerName);\n this._engine.statesByElement.set(element, triggersWithStates = new Map());\n }\n let fromState = triggersWithStates.get(triggerName);\n const toState = new StateValue(value, this.id);\n const isObj = value && value.hasOwnProperty('value');\n if (!isObj && fromState) {\n toState.absorbOptions(fromState.options);\n }\n triggersWithStates.set(triggerName, toState);\n if (!fromState) {\n fromState = DEFAULT_STATE_VALUE;\n }\n const isRemoval = toState.value === VOID_VALUE;\n // normally this isn't reached by here, however, if an object expression\n // is passed in then it may be a new object each time. Comparing the value\n // is important since that will stay the same despite there being a new object.\n // The removal arc here is special cased because the same element is triggered\n // twice in the event that it contains animations on the outer/inner portions\n // of the host container\n if (!isRemoval && fromState.value === toState.value) {\n // this means that despite the value not changing, some inner params\n // have changed which means that the animation final styles need to be applied\n if (!objEquals(fromState.params, toState.params)) {\n const errors = [];\n const fromStyles = trigger.matchStyles(fromState.value, fromState.params, errors);\n const toStyles = trigger.matchStyles(toState.value, toState.params, errors);\n if (errors.length) {\n this._engine.reportError(errors);\n } else {\n this._engine.afterFlush(() => {\n eraseStyles(element, fromStyles);\n setStyles(element, toStyles);\n });\n }\n }\n return;\n }\n const playersOnElement = getOrSetDefaultValue(this._engine.playersByElement, element, []);\n playersOnElement.forEach(player => {\n // only remove the player if it is queued on the EXACT same trigger/namespace\n // we only also deal with queued players here because if the animation has\n // started then we want to keep the player alive until the flush happens\n // (which is where the previousPlayers are passed into the new player)\n if (player.namespaceId == this.id && player.triggerName == triggerName && player.queued) {\n player.destroy();\n }\n });\n let transition = trigger.matchTransition(fromState.value, toState.value, element, toState.params);\n let isFallbackTransition = false;\n if (!transition) {\n if (!defaultToFallback) return;\n transition = trigger.fallbackTransition;\n isFallbackTransition = true;\n }\n this._engine.totalQueuedPlayers++;\n this._queue.push({\n element,\n triggerName,\n transition,\n fromState,\n toState,\n player,\n isFallbackTransition\n });\n if (!isFallbackTransition) {\n addClass(element, QUEUED_CLASSNAME);\n player.onStart(() => {\n removeClass(element, QUEUED_CLASSNAME);\n });\n }\n player.onDone(() => {\n let index = this.players.indexOf(player);\n if (index >= 0) {\n this.players.splice(index, 1);\n }\n const players = this._engine.playersByElement.get(element);\n if (players) {\n let index = players.indexOf(player);\n if (index >= 0) {\n players.splice(index, 1);\n }\n }\n });\n this.players.push(player);\n playersOnElement.push(player);\n return player;\n }\n deregister(name) {\n this._triggers.delete(name);\n this._engine.statesByElement.forEach(stateMap => stateMap.delete(name));\n this._elementListeners.forEach((listeners, element) => {\n this._elementListeners.set(element, listeners.filter(entry => {\n return entry.name != name;\n }));\n });\n }\n clearElementCache(element) {\n this._engine.statesByElement.delete(element);\n this._elementListeners.delete(element);\n const elementPlayers = this._engine.playersByElement.get(element);\n if (elementPlayers) {\n elementPlayers.forEach(player => player.destroy());\n this._engine.playersByElement.delete(element);\n }\n }\n _signalRemovalForInnerTriggers(rootElement, context) {\n const elements = this._engine.driver.query(rootElement, NG_TRIGGER_SELECTOR, true);\n // emulate a leave animation for all inner nodes within this node.\n // If there are no animations found for any of the nodes then clear the cache\n // for the element.\n elements.forEach(elm => {\n // this means that an inner remove() operation has already kicked off\n // the animation on this element...\n if (elm[REMOVAL_FLAG]) return;\n const namespaces = this._engine.fetchNamespacesByElement(elm);\n if (namespaces.size) {\n namespaces.forEach(ns => ns.triggerLeaveAnimation(elm, context, false, true));\n } else {\n this.clearElementCache(elm);\n }\n });\n // If the child elements were removed along with the parent, their animations might not\n // have completed. Clear all the elements from the cache so we don't end up with a memory leak.\n this._engine.afterFlushAnimationsDone(() => elements.forEach(elm => this.clearElementCache(elm)));\n }\n triggerLeaveAnimation(element, context, destroyAfterComplete, defaultToFallback) {\n const triggerStates = this._engine.statesByElement.get(element);\n const previousTriggersValues = new Map();\n if (triggerStates) {\n const players = [];\n triggerStates.forEach((state, triggerName) => {\n previousTriggersValues.set(triggerName, state.value);\n // this check is here in the event that an element is removed\n // twice (both on the host level and the component level)\n if (this._triggers.has(triggerName)) {\n const player = this.trigger(element, triggerName, VOID_VALUE, defaultToFallback);\n if (player) {\n players.push(player);\n }\n }\n });\n if (players.length) {\n this._engine.markElementAsRemoved(this.id, element, true, context, previousTriggersValues);\n if (destroyAfterComplete) {\n optimizeGroupPlayer(players).onDone(() => this._engine.processLeaveNode(element));\n }\n return true;\n }\n }\n return false;\n }\n prepareLeaveAnimationListeners(element) {\n const listeners = this._elementListeners.get(element);\n const elementStates = this._engine.statesByElement.get(element);\n // if this statement fails then it means that the element was picked up\n // by an earlier flush (or there are no listeners at all to track the leave).\n if (listeners && elementStates) {\n const visitedTriggers = new Set();\n listeners.forEach(listener => {\n const triggerName = listener.name;\n if (visitedTriggers.has(triggerName)) return;\n visitedTriggers.add(triggerName);\n const trigger = this._triggers.get(triggerName);\n const transition = trigger.fallbackTransition;\n const fromState = elementStates.get(triggerName) || DEFAULT_STATE_VALUE;\n const toState = new StateValue(VOID_VALUE);\n const player = new TransitionAnimationPlayer(this.id, triggerName, element);\n this._engine.totalQueuedPlayers++;\n this._queue.push({\n element,\n triggerName,\n transition,\n fromState,\n toState,\n player,\n isFallbackTransition: true\n });\n });\n }\n }\n removeNode(element, context) {\n const engine = this._engine;\n if (element.childElementCount) {\n this._signalRemovalForInnerTriggers(element, context);\n }\n // this means that a * => VOID animation was detected and kicked off\n if (this.triggerLeaveAnimation(element, context, true)) return;\n // find the player that is animating and make sure that the\n // removal is delayed until that player has completed\n let containsPotentialParentTransition = false;\n if (engine.totalAnimations) {\n const currentPlayers = engine.players.length ? engine.playersByQueriedElement.get(element) : [];\n // when this `if statement` does not continue forward it means that\n // a previous animation query has selected the current element and\n // is animating it. In this situation want to continue forwards and\n // allow the element to be queued up for animation later.\n if (currentPlayers && currentPlayers.length) {\n containsPotentialParentTransition = true;\n } else {\n let parent = element;\n while (parent = parent.parentNode) {\n const triggers = engine.statesByElement.get(parent);\n if (triggers) {\n containsPotentialParentTransition = true;\n break;\n }\n }\n }\n }\n // at this stage we know that the element will either get removed\n // during flush or will be picked up by a parent query. Either way\n // we need to fire the listeners for this element when it DOES get\n // removed (once the query parent animation is done or after flush)\n this.prepareLeaveAnimationListeners(element);\n // whether or not a parent has an animation we need to delay the deferral of the leave\n // operation until we have more information (which we do after flush() has been called)\n if (containsPotentialParentTransition) {\n engine.markElementAsRemoved(this.id, element, false, context);\n } else {\n const removalFlag = element[REMOVAL_FLAG];\n if (!removalFlag || removalFlag === NULL_REMOVAL_STATE) {\n // we do this after the flush has occurred such\n // that the callbacks can be fired\n engine.afterFlush(() => this.clearElementCache(element));\n engine.destroyInnerAnimations(element);\n engine._onRemovalComplete(element, context);\n }\n }\n }\n insertNode(element, parent) {\n addClass(element, this._hostClassName);\n }\n drainQueuedTransitions(microtaskId) {\n const instructions = [];\n this._queue.forEach(entry => {\n const player = entry.player;\n if (player.destroyed) return;\n const element = entry.element;\n const listeners = this._elementListeners.get(element);\n if (listeners) {\n listeners.forEach(listener => {\n if (listener.name == entry.triggerName) {\n const baseEvent = makeAnimationEvent(element, entry.triggerName, entry.fromState.value, entry.toState.value);\n baseEvent['_data'] = microtaskId;\n listenOnPlayer(entry.player, listener.phase, baseEvent, listener.callback);\n }\n });\n }\n if (player.markedForDestroy) {\n this._engine.afterFlush(() => {\n // now we can destroy the element properly since the event listeners have\n // been bound to the player\n player.destroy();\n });\n } else {\n instructions.push(entry);\n }\n });\n this._queue = [];\n return instructions.sort((a, b) => {\n // if depCount == 0 them move to front\n // otherwise if a contains b then move back\n const d0 = a.transition.ast.depCount;\n const d1 = b.transition.ast.depCount;\n if (d0 == 0 || d1 == 0) {\n return d0 - d1;\n }\n return this._engine.driver.containsElement(a.element, b.element) ? 1 : -1;\n });\n }\n destroy(context) {\n this.players.forEach(p => p.destroy());\n this._signalRemovalForInnerTriggers(this.hostElement, context);\n }\n}\nclass TransitionAnimationEngine {\n /** @internal */\n _onRemovalComplete(element, context) {\n this.onRemovalComplete(element, context);\n }\n constructor(bodyNode, driver, _normalizer) {\n this.bodyNode = bodyNode;\n this.driver = driver;\n this._normalizer = _normalizer;\n this.players = [];\n this.newHostElements = new Map();\n this.playersByElement = new Map();\n this.playersByQueriedElement = new Map();\n this.statesByElement = new Map();\n this.disabledNodes = new Set();\n this.totalAnimations = 0;\n this.totalQueuedPlayers = 0;\n this._namespaceLookup = {};\n this._namespaceList = [];\n this._flushFns = [];\n this._whenQuietFns = [];\n this.namespacesByHostElement = new Map();\n this.collectedEnterElements = [];\n this.collectedLeaveElements = [];\n // this method is designed to be overridden by the code that uses this engine\n this.onRemovalComplete = (element, context) => {};\n }\n get queuedPlayers() {\n const players = [];\n this._namespaceList.forEach(ns => {\n ns.players.forEach(player => {\n if (player.queued) {\n players.push(player);\n }\n });\n });\n return players;\n }\n createNamespace(namespaceId, hostElement) {\n const ns = new AnimationTransitionNamespace(namespaceId, hostElement, this);\n if (this.bodyNode && this.driver.containsElement(this.bodyNode, hostElement)) {\n this._balanceNamespaceList(ns, hostElement);\n } else {\n // defer this later until flush during when the host element has\n // been inserted so that we know exactly where to place it in\n // the namespace list\n this.newHostElements.set(hostElement, ns);\n // given that this host element is a part of the animation code, it\n // may or may not be inserted by a parent node that is of an\n // animation renderer type. If this happens then we can still have\n // access to this item when we query for :enter nodes. If the parent\n // is a renderer then the set data-structure will normalize the entry\n this.collectEnterElement(hostElement);\n }\n return this._namespaceLookup[namespaceId] = ns;\n }\n _balanceNamespaceList(ns, hostElement) {\n const namespaceList = this._namespaceList;\n const namespacesByHostElement = this.namespacesByHostElement;\n const limit = namespaceList.length - 1;\n if (limit >= 0) {\n let found = false;\n // Find the closest ancestor with an existing namespace so we can then insert `ns` after it,\n // establishing a top-down ordering of namespaces in `this._namespaceList`.\n let ancestor = this.driver.getParentElement(hostElement);\n while (ancestor) {\n const ancestorNs = namespacesByHostElement.get(ancestor);\n if (ancestorNs) {\n // An animation namespace has been registered for this ancestor, so we insert `ns`\n // right after it to establish top-down ordering of animation namespaces.\n const index = namespaceList.indexOf(ancestorNs);\n namespaceList.splice(index + 1, 0, ns);\n found = true;\n break;\n }\n ancestor = this.driver.getParentElement(ancestor);\n }\n if (!found) {\n // No namespace exists that is an ancestor of `ns`, so `ns` is inserted at the front to\n // ensure that any existing descendants are ordered after `ns`, retaining the desired\n // top-down ordering.\n namespaceList.unshift(ns);\n }\n } else {\n namespaceList.push(ns);\n }\n namespacesByHostElement.set(hostElement, ns);\n return ns;\n }\n register(namespaceId, hostElement) {\n let ns = this._namespaceLookup[namespaceId];\n if (!ns) {\n ns = this.createNamespace(namespaceId, hostElement);\n }\n return ns;\n }\n registerTrigger(namespaceId, name, trigger) {\n let ns = this._namespaceLookup[namespaceId];\n if (ns && ns.register(name, trigger)) {\n this.totalAnimations++;\n }\n }\n destroy(namespaceId, context) {\n if (!namespaceId) return;\n this.afterFlush(() => {});\n this.afterFlushAnimationsDone(() => {\n const ns = this._fetchNamespace(namespaceId);\n this.namespacesByHostElement.delete(ns.hostElement);\n const index = this._namespaceList.indexOf(ns);\n if (index >= 0) {\n this._namespaceList.splice(index, 1);\n }\n ns.destroy(context);\n delete this._namespaceLookup[namespaceId];\n });\n }\n _fetchNamespace(id) {\n return this._namespaceLookup[id];\n }\n fetchNamespacesByElement(element) {\n // normally there should only be one namespace per element, however\n // if @triggers are placed on both the component element and then\n // its host element (within the component code) then there will be\n // two namespaces returned. We use a set here to simply deduplicate\n // the namespaces in case (for the reason described above) there are multiple triggers\n const namespaces = new Set();\n const elementStates = this.statesByElement.get(element);\n if (elementStates) {\n for (let stateValue of elementStates.values()) {\n if (stateValue.namespaceId) {\n const ns = this._fetchNamespace(stateValue.namespaceId);\n if (ns) {\n namespaces.add(ns);\n }\n }\n }\n }\n return namespaces;\n }\n trigger(namespaceId, element, name, value) {\n if (isElementNode(element)) {\n const ns = this._fetchNamespace(namespaceId);\n if (ns) {\n ns.trigger(element, name, value);\n return true;\n }\n }\n return false;\n }\n insertNode(namespaceId, element, parent, insertBefore) {\n if (!isElementNode(element)) return;\n // special case for when an element is removed and reinserted (move operation)\n // when this occurs we do not want to use the element for deletion later\n const details = element[REMOVAL_FLAG];\n if (details && details.setForRemoval) {\n details.setForRemoval = false;\n details.setForMove = true;\n const index = this.collectedLeaveElements.indexOf(element);\n if (index >= 0) {\n this.collectedLeaveElements.splice(index, 1);\n }\n }\n // in the event that the namespaceId is blank then the caller\n // code does not contain any animation code in it, but it is\n // just being called so that the node is marked as being inserted\n if (namespaceId) {\n const ns = this._fetchNamespace(namespaceId);\n // This if-statement is a workaround for router issue #21947.\n // The router sometimes hits a race condition where while a route\n // is being instantiated a new navigation arrives, triggering leave\n // animation of DOM that has not been fully initialized, until this\n // is resolved, we need to handle the scenario when DOM is not in a\n // consistent state during the animation.\n if (ns) {\n ns.insertNode(element, parent);\n }\n }\n // only *directives and host elements are inserted before\n if (insertBefore) {\n this.collectEnterElement(element);\n }\n }\n collectEnterElement(element) {\n this.collectedEnterElements.push(element);\n }\n markElementAsDisabled(element, value) {\n if (value) {\n if (!this.disabledNodes.has(element)) {\n this.disabledNodes.add(element);\n addClass(element, DISABLED_CLASSNAME);\n }\n } else if (this.disabledNodes.has(element)) {\n this.disabledNodes.delete(element);\n removeClass(element, DISABLED_CLASSNAME);\n }\n }\n removeNode(namespaceId, element, context) {\n if (isElementNode(element)) {\n const ns = namespaceId ? this._fetchNamespace(namespaceId) : null;\n if (ns) {\n ns.removeNode(element, context);\n } else {\n this.markElementAsRemoved(namespaceId, element, false, context);\n }\n const hostNS = this.namespacesByHostElement.get(element);\n if (hostNS && hostNS.id !== namespaceId) {\n hostNS.removeNode(element, context);\n }\n } else {\n this._onRemovalComplete(element, context);\n }\n }\n markElementAsRemoved(namespaceId, element, hasAnimation, context, previousTriggersValues) {\n this.collectedLeaveElements.push(element);\n element[REMOVAL_FLAG] = {\n namespaceId,\n setForRemoval: context,\n hasAnimation,\n removedBeforeQueried: false,\n previousTriggersValues\n };\n }\n listen(namespaceId, element, name, phase, callback) {\n if (isElementNode(element)) {\n return this._fetchNamespace(namespaceId).listen(element, name, phase, callback);\n }\n return () => {};\n }\n _buildInstruction(entry, subTimelines, enterClassName, leaveClassName, skipBuildAst) {\n return entry.transition.build(this.driver, entry.element, entry.fromState.value, entry.toState.value, enterClassName, leaveClassName, entry.fromState.options, entry.toState.options, subTimelines, skipBuildAst);\n }\n destroyInnerAnimations(containerElement) {\n let elements = this.driver.query(containerElement, NG_TRIGGER_SELECTOR, true);\n elements.forEach(element => this.destroyActiveAnimationsForElement(element));\n if (this.playersByQueriedElement.size == 0) return;\n elements = this.driver.query(containerElement, NG_ANIMATING_SELECTOR, true);\n elements.forEach(element => this.finishActiveQueriedAnimationOnElement(element));\n }\n destroyActiveAnimationsForElement(element) {\n const players = this.playersByElement.get(element);\n if (players) {\n players.forEach(player => {\n // special case for when an element is set for destruction, but hasn't started.\n // in this situation we want to delay the destruction until the flush occurs\n // so that any event listeners attached to the player are triggered.\n if (player.queued) {\n player.markedForDestroy = true;\n } else {\n player.destroy();\n }\n });\n }\n }\n finishActiveQueriedAnimationOnElement(element) {\n const players = this.playersByQueriedElement.get(element);\n if (players) {\n players.forEach(player => player.finish());\n }\n }\n whenRenderingDone() {\n return new Promise(resolve => {\n if (this.players.length) {\n return optimizeGroupPlayer(this.players).onDone(() => resolve());\n } else {\n resolve();\n }\n });\n }\n processLeaveNode(element) {\n const details = element[REMOVAL_FLAG];\n if (details && details.setForRemoval) {\n // this will prevent it from removing it twice\n element[REMOVAL_FLAG] = NULL_REMOVAL_STATE;\n if (details.namespaceId) {\n this.destroyInnerAnimations(element);\n const ns = this._fetchNamespace(details.namespaceId);\n if (ns) {\n ns.clearElementCache(element);\n }\n }\n this._onRemovalComplete(element, details.setForRemoval);\n }\n if (element.classList?.contains(DISABLED_CLASSNAME)) {\n this.markElementAsDisabled(element, false);\n }\n this.driver.query(element, DISABLED_SELECTOR, true).forEach(node => {\n this.markElementAsDisabled(node, false);\n });\n }\n flush(microtaskId = -1) {\n let players = [];\n if (this.newHostElements.size) {\n this.newHostElements.forEach((ns, element) => this._balanceNamespaceList(ns, element));\n this.newHostElements.clear();\n }\n if (this.totalAnimations && this.collectedEnterElements.length) {\n for (let i = 0; i < this.collectedEnterElements.length; i++) {\n const elm = this.collectedEnterElements[i];\n addClass(elm, STAR_CLASSNAME);\n }\n }\n if (this._namespaceList.length && (this.totalQueuedPlayers || this.collectedLeaveElements.length)) {\n const cleanupFns = [];\n try {\n players = this._flushAnimations(cleanupFns, microtaskId);\n } finally {\n for (let i = 0; i < cleanupFns.length; i++) {\n cleanupFns[i]();\n }\n }\n } else {\n for (let i = 0; i < this.collectedLeaveElements.length; i++) {\n const element = this.collectedLeaveElements[i];\n this.processLeaveNode(element);\n }\n }\n this.totalQueuedPlayers = 0;\n this.collectedEnterElements.length = 0;\n this.collectedLeaveElements.length = 0;\n this._flushFns.forEach(fn => fn());\n this._flushFns = [];\n if (this._whenQuietFns.length) {\n // we move these over to a variable so that\n // if any new callbacks are registered in another\n // flush they do not populate the existing set\n const quietFns = this._whenQuietFns;\n this._whenQuietFns = [];\n if (players.length) {\n optimizeGroupPlayer(players).onDone(() => {\n quietFns.forEach(fn => fn());\n });\n } else {\n quietFns.forEach(fn => fn());\n }\n }\n }\n reportError(errors) {\n throw triggerTransitionsFailed(errors);\n }\n _flushAnimations(cleanupFns, microtaskId) {\n const subTimelines = new ElementInstructionMap();\n const skippedPlayers = [];\n const skippedPlayersMap = new Map();\n const queuedInstructions = [];\n const queriedElements = new Map();\n const allPreStyleElements = new Map();\n const allPostStyleElements = new Map();\n const disabledElementsSet = new Set();\n this.disabledNodes.forEach(node => {\n disabledElementsSet.add(node);\n const nodesThatAreDisabled = this.driver.query(node, QUEUED_SELECTOR, true);\n for (let i = 0; i < nodesThatAreDisabled.length; i++) {\n disabledElementsSet.add(nodesThatAreDisabled[i]);\n }\n });\n const bodyNode = this.bodyNode;\n const allTriggerElements = Array.from(this.statesByElement.keys());\n const enterNodeMap = buildRootMap(allTriggerElements, this.collectedEnterElements);\n // this must occur before the instructions are built below such that\n // the :enter queries match the elements (since the timeline queries\n // are fired during instruction building).\n const enterNodeMapIds = new Map();\n let i = 0;\n enterNodeMap.forEach((nodes, root) => {\n const className = ENTER_CLASSNAME + i++;\n enterNodeMapIds.set(root, className);\n nodes.forEach(node => addClass(node, className));\n });\n const allLeaveNodes = [];\n const mergedLeaveNodes = new Set();\n const leaveNodesWithoutAnimations = new Set();\n for (let i = 0; i < this.collectedLeaveElements.length; i++) {\n const element = this.collectedLeaveElements[i];\n const details = element[REMOVAL_FLAG];\n if (details && details.setForRemoval) {\n allLeaveNodes.push(element);\n mergedLeaveNodes.add(element);\n if (details.hasAnimation) {\n this.driver.query(element, STAR_SELECTOR, true).forEach(elm => mergedLeaveNodes.add(elm));\n } else {\n leaveNodesWithoutAnimations.add(element);\n }\n }\n }\n const leaveNodeMapIds = new Map();\n const leaveNodeMap = buildRootMap(allTriggerElements, Array.from(mergedLeaveNodes));\n leaveNodeMap.forEach((nodes, root) => {\n const className = LEAVE_CLASSNAME + i++;\n leaveNodeMapIds.set(root, className);\n nodes.forEach(node => addClass(node, className));\n });\n cleanupFns.push(() => {\n enterNodeMap.forEach((nodes, root) => {\n const className = enterNodeMapIds.get(root);\n nodes.forEach(node => removeClass(node, className));\n });\n leaveNodeMap.forEach((nodes, root) => {\n const className = leaveNodeMapIds.get(root);\n nodes.forEach(node => removeClass(node, className));\n });\n allLeaveNodes.forEach(element => {\n this.processLeaveNode(element);\n });\n });\n const allPlayers = [];\n const erroneousTransitions = [];\n for (let i = this._namespaceList.length - 1; i >= 0; i--) {\n const ns = this._namespaceList[i];\n ns.drainQueuedTransitions(microtaskId).forEach(entry => {\n const player = entry.player;\n const element = entry.element;\n allPlayers.push(player);\n if (this.collectedEnterElements.length) {\n const details = element[REMOVAL_FLAG];\n // animations for move operations (elements being removed and reinserted,\n // e.g. when the order of an *ngFor list changes) are currently not supported\n if (details && details.setForMove) {\n if (details.previousTriggersValues && details.previousTriggersValues.has(entry.triggerName)) {\n const previousValue = details.previousTriggersValues.get(entry.triggerName);\n // we need to restore the previous trigger value since the element has\n // only been moved and hasn't actually left the DOM\n const triggersWithStates = this.statesByElement.get(entry.element);\n if (triggersWithStates && triggersWithStates.has(entry.triggerName)) {\n const state = triggersWithStates.get(entry.triggerName);\n state.value = previousValue;\n triggersWithStates.set(entry.triggerName, state);\n }\n }\n player.destroy();\n return;\n }\n }\n const nodeIsOrphaned = !bodyNode || !this.driver.containsElement(bodyNode, element);\n const leaveClassName = leaveNodeMapIds.get(element);\n const enterClassName = enterNodeMapIds.get(element);\n const instruction = this._buildInstruction(entry, subTimelines, enterClassName, leaveClassName, nodeIsOrphaned);\n if (instruction.errors && instruction.errors.length) {\n erroneousTransitions.push(instruction);\n return;\n }\n // even though the element may not be in the DOM, it may still\n // be added at a later point (due to the mechanics of content\n // projection and/or dynamic component insertion) therefore it's\n // important to still style the element.\n if (nodeIsOrphaned) {\n player.onStart(() => eraseStyles(element, instruction.fromStyles));\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n skippedPlayers.push(player);\n return;\n }\n // if an unmatched transition is queued and ready to go\n // then it SHOULD NOT render an animation and cancel the\n // previously running animations.\n if (entry.isFallbackTransition) {\n player.onStart(() => eraseStyles(element, instruction.fromStyles));\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n skippedPlayers.push(player);\n return;\n }\n // this means that if a parent animation uses this animation as a sub-trigger\n // then it will instruct the timeline builder not to add a player delay, but\n // instead stretch the first keyframe gap until the animation starts. This is\n // important in order to prevent extra initialization styles from being\n // required by the user for the animation.\n const timelines = [];\n instruction.timelines.forEach(tl => {\n tl.stretchStartingKeyframe = true;\n if (!this.disabledNodes.has(tl.element)) {\n timelines.push(tl);\n }\n });\n instruction.timelines = timelines;\n subTimelines.append(element, instruction.timelines);\n const tuple = {\n instruction,\n player,\n element\n };\n queuedInstructions.push(tuple);\n instruction.queriedElements.forEach(element => getOrSetDefaultValue(queriedElements, element, []).push(player));\n instruction.preStyleProps.forEach((stringMap, element) => {\n if (stringMap.size) {\n let setVal = allPreStyleElements.get(element);\n if (!setVal) {\n allPreStyleElements.set(element, setVal = new Set());\n }\n stringMap.forEach((_, prop) => setVal.add(prop));\n }\n });\n instruction.postStyleProps.forEach((stringMap, element) => {\n let setVal = allPostStyleElements.get(element);\n if (!setVal) {\n allPostStyleElements.set(element, setVal = new Set());\n }\n stringMap.forEach((_, prop) => setVal.add(prop));\n });\n });\n }\n if (erroneousTransitions.length) {\n const errors = [];\n erroneousTransitions.forEach(instruction => {\n errors.push(transitionFailed(instruction.triggerName, instruction.errors));\n });\n allPlayers.forEach(player => player.destroy());\n this.reportError(errors);\n }\n const allPreviousPlayersMap = new Map();\n // this map tells us which element in the DOM tree is contained by\n // which animation. Further down this map will get populated once\n // the players are built and in doing so we can use it to efficiently\n // figure out if a sub player is skipped due to a parent player having priority.\n const animationElementMap = new Map();\n queuedInstructions.forEach(entry => {\n const element = entry.element;\n if (subTimelines.has(element)) {\n animationElementMap.set(element, element);\n this._beforeAnimationBuild(entry.player.namespaceId, entry.instruction, allPreviousPlayersMap);\n }\n });\n skippedPlayers.forEach(player => {\n const element = player.element;\n const previousPlayers = this._getPreviousPlayers(element, false, player.namespaceId, player.triggerName, null);\n previousPlayers.forEach(prevPlayer => {\n getOrSetDefaultValue(allPreviousPlayersMap, element, []).push(prevPlayer);\n prevPlayer.destroy();\n });\n });\n // this is a special case for nodes that will be removed either by\n // having their own leave animations or by being queried in a container\n // that will be removed once a parent animation is complete. The idea\n // here is that * styles must be identical to ! styles because of\n // backwards compatibility (* is also filled in by default in many places).\n // Otherwise * styles will return an empty value or \"auto\" since the element\n // passed to getComputedStyle will not be visible (since * === destination)\n const replaceNodes = allLeaveNodes.filter(node => {\n return replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements);\n });\n // POST STAGE: fill the * styles\n const postStylesMap = new Map();\n const allLeaveQueriedNodes = cloakAndComputeStyles(postStylesMap, this.driver, leaveNodesWithoutAnimations, allPostStyleElements, AUTO_STYLE);\n allLeaveQueriedNodes.forEach(node => {\n if (replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements)) {\n replaceNodes.push(node);\n }\n });\n // PRE STAGE: fill the ! styles\n const preStylesMap = new Map();\n enterNodeMap.forEach((nodes, root) => {\n cloakAndComputeStyles(preStylesMap, this.driver, new Set(nodes), allPreStyleElements, ɵPRE_STYLE);\n });\n replaceNodes.forEach(node => {\n const post = postStylesMap.get(node);\n const pre = preStylesMap.get(node);\n postStylesMap.set(node, new Map([...(post?.entries() ?? []), ...(pre?.entries() ?? [])]));\n });\n const rootPlayers = [];\n const subPlayers = [];\n const NO_PARENT_ANIMATION_ELEMENT_DETECTED = {};\n queuedInstructions.forEach(entry => {\n const {\n element,\n player,\n instruction\n } = entry;\n // this means that it was never consumed by a parent animation which\n // means that it is independent and therefore should be set for animation\n if (subTimelines.has(element)) {\n if (disabledElementsSet.has(element)) {\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n player.disabled = true;\n player.overrideTotalTime(instruction.totalTime);\n skippedPlayers.push(player);\n return;\n }\n // this will flow up the DOM and query the map to figure out\n // if a parent animation has priority over it. In the situation\n // that a parent is detected then it will cancel the loop. If\n // nothing is detected, or it takes a few hops to find a parent,\n // then it will fill in the missing nodes and signal them as having\n // a detected parent (or a NO_PARENT value via a special constant).\n let parentWithAnimation = NO_PARENT_ANIMATION_ELEMENT_DETECTED;\n if (animationElementMap.size > 1) {\n let elm = element;\n const parentsToAdd = [];\n while (elm = elm.parentNode) {\n const detectedParent = animationElementMap.get(elm);\n if (detectedParent) {\n parentWithAnimation = detectedParent;\n break;\n }\n parentsToAdd.push(elm);\n }\n parentsToAdd.forEach(parent => animationElementMap.set(parent, parentWithAnimation));\n }\n const innerPlayer = this._buildAnimation(player.namespaceId, instruction, allPreviousPlayersMap, skippedPlayersMap, preStylesMap, postStylesMap);\n player.setRealPlayer(innerPlayer);\n if (parentWithAnimation === NO_PARENT_ANIMATION_ELEMENT_DETECTED) {\n rootPlayers.push(player);\n } else {\n const parentPlayers = this.playersByElement.get(parentWithAnimation);\n if (parentPlayers && parentPlayers.length) {\n player.parentPlayer = optimizeGroupPlayer(parentPlayers);\n }\n skippedPlayers.push(player);\n }\n } else {\n eraseStyles(element, instruction.fromStyles);\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n // there still might be a ancestor player animating this\n // element therefore we will still add it as a sub player\n // even if its animation may be disabled\n subPlayers.push(player);\n if (disabledElementsSet.has(element)) {\n skippedPlayers.push(player);\n }\n }\n });\n // find all of the sub players' corresponding inner animation players\n subPlayers.forEach(player => {\n // even if no players are found for a sub animation it\n // will still complete itself after the next tick since it's Noop\n const playersForElement = skippedPlayersMap.get(player.element);\n if (playersForElement && playersForElement.length) {\n const innerPlayer = optimizeGroupPlayer(playersForElement);\n player.setRealPlayer(innerPlayer);\n }\n });\n // the reason why we don't actually play the animation is\n // because all that a skipped player is designed to do is to\n // fire the start/done transition callback events\n skippedPlayers.forEach(player => {\n if (player.parentPlayer) {\n player.syncPlayerEvents(player.parentPlayer);\n } else {\n player.destroy();\n }\n });\n // run through all of the queued removals and see if they\n // were picked up by a query. If not then perform the removal\n // operation right away unless a parent animation is ongoing.\n for (let i = 0; i < allLeaveNodes.length; i++) {\n const element = allLeaveNodes[i];\n const details = element[REMOVAL_FLAG];\n removeClass(element, LEAVE_CLASSNAME);\n // this means the element has a removal animation that is being\n // taken care of and therefore the inner elements will hang around\n // until that animation is over (or the parent queried animation)\n if (details && details.hasAnimation) continue;\n let players = [];\n // if this element is queried or if it contains queried children\n // then we want for the element not to be removed from the page\n // until the queried animations have finished\n if (queriedElements.size) {\n let queriedPlayerResults = queriedElements.get(element);\n if (queriedPlayerResults && queriedPlayerResults.length) {\n players.push(...queriedPlayerResults);\n }\n let queriedInnerElements = this.driver.query(element, NG_ANIMATING_SELECTOR, true);\n for (let j = 0; j < queriedInnerElements.length; j++) {\n let queriedPlayers = queriedElements.get(queriedInnerElements[j]);\n if (queriedPlayers && queriedPlayers.length) {\n players.push(...queriedPlayers);\n }\n }\n }\n const activePlayers = players.filter(p => !p.destroyed);\n if (activePlayers.length) {\n removeNodesAfterAnimationDone(this, element, activePlayers);\n } else {\n this.processLeaveNode(element);\n }\n }\n // this is required so the cleanup method doesn't remove them\n allLeaveNodes.length = 0;\n rootPlayers.forEach(player => {\n this.players.push(player);\n player.onDone(() => {\n player.destroy();\n const index = this.players.indexOf(player);\n this.players.splice(index, 1);\n });\n player.play();\n });\n return rootPlayers;\n }\n afterFlush(callback) {\n this._flushFns.push(callback);\n }\n afterFlushAnimationsDone(callback) {\n this._whenQuietFns.push(callback);\n }\n _getPreviousPlayers(element, isQueriedElement, namespaceId, triggerName, toStateValue) {\n let players = [];\n if (isQueriedElement) {\n const queriedElementPlayers = this.playersByQueriedElement.get(element);\n if (queriedElementPlayers) {\n players = queriedElementPlayers;\n }\n } else {\n const elementPlayers = this.playersByElement.get(element);\n if (elementPlayers) {\n const isRemovalAnimation = !toStateValue || toStateValue == VOID_VALUE;\n elementPlayers.forEach(player => {\n if (player.queued) return;\n if (!isRemovalAnimation && player.triggerName != triggerName) return;\n players.push(player);\n });\n }\n }\n if (namespaceId || triggerName) {\n players = players.filter(player => {\n if (namespaceId && namespaceId != player.namespaceId) return false;\n if (triggerName && triggerName != player.triggerName) return false;\n return true;\n });\n }\n return players;\n }\n _beforeAnimationBuild(namespaceId, instruction, allPreviousPlayersMap) {\n const triggerName = instruction.triggerName;\n const rootElement = instruction.element;\n // when a removal animation occurs, ALL previous players are collected\n // and destroyed (even if they are outside of the current namespace)\n const targetNameSpaceId = instruction.isRemovalTransition ? undefined : namespaceId;\n const targetTriggerName = instruction.isRemovalTransition ? undefined : triggerName;\n for (const timelineInstruction of instruction.timelines) {\n const element = timelineInstruction.element;\n const isQueriedElement = element !== rootElement;\n const players = getOrSetDefaultValue(allPreviousPlayersMap, element, []);\n const previousPlayers = this._getPreviousPlayers(element, isQueriedElement, targetNameSpaceId, targetTriggerName, instruction.toState);\n previousPlayers.forEach(player => {\n const realPlayer = player.getRealPlayer();\n if (realPlayer.beforeDestroy) {\n realPlayer.beforeDestroy();\n }\n player.destroy();\n players.push(player);\n });\n }\n // this needs to be done so that the PRE/POST styles can be\n // computed properly without interfering with the previous animation\n eraseStyles(rootElement, instruction.fromStyles);\n }\n _buildAnimation(namespaceId, instruction, allPreviousPlayersMap, skippedPlayersMap, preStylesMap, postStylesMap) {\n const triggerName = instruction.triggerName;\n const rootElement = instruction.element;\n // we first run this so that the previous animation player\n // data can be passed into the successive animation players\n const allQueriedPlayers = [];\n const allConsumedElements = new Set();\n const allSubElements = new Set();\n const allNewPlayers = instruction.timelines.map(timelineInstruction => {\n const element = timelineInstruction.element;\n allConsumedElements.add(element);\n // FIXME (matsko): make sure to-be-removed animations are removed properly\n const details = element[REMOVAL_FLAG];\n if (details && details.removedBeforeQueried) return new NoopAnimationPlayer(timelineInstruction.duration, timelineInstruction.delay);\n const isQueriedElement = element !== rootElement;\n const previousPlayers = flattenGroupPlayers((allPreviousPlayersMap.get(element) || EMPTY_PLAYER_ARRAY).map(p => p.getRealPlayer())).filter(p => {\n // the `element` is not apart of the AnimationPlayer definition, but\n // Mock/WebAnimations\n // use the element within their implementation. This will be added in Angular5 to\n // AnimationPlayer\n const pp = p;\n return pp.element ? pp.element === element : false;\n });\n const preStyles = preStylesMap.get(element);\n const postStyles = postStylesMap.get(element);\n const keyframes = normalizeKeyframes$1(this._normalizer, timelineInstruction.keyframes, preStyles, postStyles);\n const player = this._buildPlayer(timelineInstruction, keyframes, previousPlayers);\n // this means that this particular player belongs to a sub trigger. It is\n // important that we match this player up with the corresponding (@trigger.listener)\n if (timelineInstruction.subTimeline && skippedPlayersMap) {\n allSubElements.add(element);\n }\n if (isQueriedElement) {\n const wrappedPlayer = new TransitionAnimationPlayer(namespaceId, triggerName, element);\n wrappedPlayer.setRealPlayer(player);\n allQueriedPlayers.push(wrappedPlayer);\n }\n return player;\n });\n allQueriedPlayers.forEach(player => {\n getOrSetDefaultValue(this.playersByQueriedElement, player.element, []).push(player);\n player.onDone(() => deleteOrUnsetInMap(this.playersByQueriedElement, player.element, player));\n });\n allConsumedElements.forEach(element => addClass(element, NG_ANIMATING_CLASSNAME));\n const player = optimizeGroupPlayer(allNewPlayers);\n player.onDestroy(() => {\n allConsumedElements.forEach(element => removeClass(element, NG_ANIMATING_CLASSNAME));\n setStyles(rootElement, instruction.toStyles);\n });\n // this basically makes all of the callbacks for sub element animations\n // be dependent on the upper players for when they finish\n allSubElements.forEach(element => {\n getOrSetDefaultValue(skippedPlayersMap, element, []).push(player);\n });\n return player;\n }\n _buildPlayer(instruction, keyframes, previousPlayers) {\n if (keyframes.length > 0) {\n return this.driver.animate(instruction.element, keyframes, instruction.duration, instruction.delay, instruction.easing, previousPlayers);\n }\n // special case for when an empty transition|definition is provided\n // ... there is no point in rendering an empty animation\n return new NoopAnimationPlayer(instruction.duration, instruction.delay);\n }\n}\nclass TransitionAnimationPlayer {\n constructor(namespaceId, triggerName, element) {\n this.namespaceId = namespaceId;\n this.triggerName = triggerName;\n this.element = element;\n this._player = new NoopAnimationPlayer();\n this._containsRealPlayer = false;\n this._queuedCallbacks = new Map();\n this.destroyed = false;\n this.parentPlayer = null;\n this.markedForDestroy = false;\n this.disabled = false;\n this.queued = true;\n this.totalTime = 0;\n }\n setRealPlayer(player) {\n if (this._containsRealPlayer) return;\n this._player = player;\n this._queuedCallbacks.forEach((callbacks, phase) => {\n callbacks.forEach(callback => listenOnPlayer(player, phase, undefined, callback));\n });\n this._queuedCallbacks.clear();\n this._containsRealPlayer = true;\n this.overrideTotalTime(player.totalTime);\n this.queued = false;\n }\n getRealPlayer() {\n return this._player;\n }\n overrideTotalTime(totalTime) {\n this.totalTime = totalTime;\n }\n syncPlayerEvents(player) {\n const p = this._player;\n if (p.triggerCallback) {\n player.onStart(() => p.triggerCallback('start'));\n }\n player.onDone(() => this.finish());\n player.onDestroy(() => this.destroy());\n }\n _queueEvent(name, callback) {\n getOrSetDefaultValue(this._queuedCallbacks, name, []).push(callback);\n }\n onDone(fn) {\n if (this.queued) {\n this._queueEvent('done', fn);\n }\n this._player.onDone(fn);\n }\n onStart(fn) {\n if (this.queued) {\n this._queueEvent('start', fn);\n }\n this._player.onStart(fn);\n }\n onDestroy(fn) {\n if (this.queued) {\n this._queueEvent('destroy', fn);\n }\n this._player.onDestroy(fn);\n }\n init() {\n this._player.init();\n }\n hasStarted() {\n return this.queued ? false : this._player.hasStarted();\n }\n play() {\n !this.queued && this._player.play();\n }\n pause() {\n !this.queued && this._player.pause();\n }\n restart() {\n !this.queued && this._player.restart();\n }\n finish() {\n this._player.finish();\n }\n destroy() {\n this.destroyed = true;\n this._player.destroy();\n }\n reset() {\n !this.queued && this._player.reset();\n }\n setPosition(p) {\n if (!this.queued) {\n this._player.setPosition(p);\n }\n }\n getPosition() {\n return this.queued ? 0 : this._player.getPosition();\n }\n /** @internal */\n triggerCallback(phaseName) {\n const p = this._player;\n if (p.triggerCallback) {\n p.triggerCallback(phaseName);\n }\n }\n}\nfunction deleteOrUnsetInMap(map, key, value) {\n let currentValues = map.get(key);\n if (currentValues) {\n if (currentValues.length) {\n const index = currentValues.indexOf(value);\n currentValues.splice(index, 1);\n }\n if (currentValues.length == 0) {\n map.delete(key);\n }\n }\n return currentValues;\n}\nfunction normalizeTriggerValue(value) {\n // we use `!= null` here because it's the most simple\n // way to test against a \"falsy\" value without mixing\n // in empty strings or a zero value. DO NOT OPTIMIZE.\n return value != null ? value : null;\n}\nfunction isElementNode(node) {\n return node && node['nodeType'] === 1;\n}\nfunction isTriggerEventValid(eventName) {\n return eventName == 'start' || eventName == 'done';\n}\nfunction cloakElement(element, value) {\n const oldValue = element.style.display;\n element.style.display = value != null ? value : 'none';\n return oldValue;\n}\nfunction cloakAndComputeStyles(valuesMap, driver, elements, elementPropsMap, defaultStyle) {\n const cloakVals = [];\n elements.forEach(element => cloakVals.push(cloakElement(element)));\n const failedElements = [];\n elementPropsMap.forEach((props, element) => {\n const styles = new Map();\n props.forEach(prop => {\n const value = driver.computeStyle(element, prop, defaultStyle);\n styles.set(prop, value);\n // there is no easy way to detect this because a sub element could be removed\n // by a parent animation element being detached.\n if (!value || value.length == 0) {\n element[REMOVAL_FLAG] = NULL_REMOVED_QUERIED_STATE;\n failedElements.push(element);\n }\n });\n valuesMap.set(element, styles);\n });\n // we use a index variable here since Set.forEach(a, i) does not return\n // an index value for the closure (but instead just the value)\n let i = 0;\n elements.forEach(element => cloakElement(element, cloakVals[i++]));\n return failedElements;\n}\n/*\nSince the Angular renderer code will return a collection of inserted\nnodes in all areas of a DOM tree, it's up to this algorithm to figure\nout which nodes are roots for each animation @trigger.\n\nBy placing each inserted node into a Set and traversing upwards, it\nis possible to find the @trigger elements and well any direct *star\ninsertion nodes, if a @trigger root is found then the enter element\nis placed into the Map[@trigger] spot.\n */\nfunction buildRootMap(roots, nodes) {\n const rootMap = new Map();\n roots.forEach(root => rootMap.set(root, []));\n if (nodes.length == 0) return rootMap;\n const NULL_NODE = 1;\n const nodeSet = new Set(nodes);\n const localRootMap = new Map();\n function getRoot(node) {\n if (!node) return NULL_NODE;\n let root = localRootMap.get(node);\n if (root) return root;\n const parent = node.parentNode;\n if (rootMap.has(parent)) {\n // ngIf inside @trigger\n root = parent;\n } else if (nodeSet.has(parent)) {\n // ngIf inside ngIf\n root = NULL_NODE;\n } else {\n // recurse upwards\n root = getRoot(parent);\n }\n localRootMap.set(node, root);\n return root;\n }\n nodes.forEach(node => {\n const root = getRoot(node);\n if (root !== NULL_NODE) {\n rootMap.get(root).push(node);\n }\n });\n return rootMap;\n}\nfunction addClass(element, className) {\n element.classList?.add(className);\n}\nfunction removeClass(element, className) {\n element.classList?.remove(className);\n}\nfunction removeNodesAfterAnimationDone(engine, element, players) {\n optimizeGroupPlayer(players).onDone(() => engine.processLeaveNode(element));\n}\nfunction flattenGroupPlayers(players) {\n const finalPlayers = [];\n _flattenGroupPlayersRecur(players, finalPlayers);\n return finalPlayers;\n}\nfunction _flattenGroupPlayersRecur(players, finalPlayers) {\n for (let i = 0; i < players.length; i++) {\n const player = players[i];\n if (player instanceof ɵAnimationGroupPlayer) {\n _flattenGroupPlayersRecur(player.players, finalPlayers);\n } else {\n finalPlayers.push(player);\n }\n }\n}\nfunction objEquals(a, b) {\n const k1 = Object.keys(a);\n const k2 = Object.keys(b);\n if (k1.length != k2.length) return false;\n for (let i = 0; i < k1.length; i++) {\n const prop = k1[i];\n if (!b.hasOwnProperty(prop) || a[prop] !== b[prop]) return false;\n }\n return true;\n}\nfunction replacePostStylesAsPre(element, allPreStyleElements, allPostStyleElements) {\n const postEntry = allPostStyleElements.get(element);\n if (!postEntry) return false;\n let preEntry = allPreStyleElements.get(element);\n if (preEntry) {\n postEntry.forEach(data => preEntry.add(data));\n } else {\n allPreStyleElements.set(element, postEntry);\n }\n allPostStyleElements.delete(element);\n return true;\n}\nclass AnimationEngine {\n constructor(doc, _driver, _normalizer) {\n this._driver = _driver;\n this._normalizer = _normalizer;\n this._triggerCache = {};\n // this method is designed to be overridden by the code that uses this engine\n this.onRemovalComplete = (element, context) => {};\n this._transitionEngine = new TransitionAnimationEngine(doc.body, _driver, _normalizer);\n this._timelineEngine = new TimelineAnimationEngine(doc.body, _driver, _normalizer);\n this._transitionEngine.onRemovalComplete = (element, context) => this.onRemovalComplete(element, context);\n }\n registerTrigger(componentId, namespaceId, hostElement, name, metadata) {\n const cacheKey = componentId + '-' + name;\n let trigger = this._triggerCache[cacheKey];\n if (!trigger) {\n const errors = [];\n const warnings = [];\n const ast = buildAnimationAst(this._driver, metadata, errors, warnings);\n if (errors.length) {\n throw triggerBuildFailed(name, errors);\n }\n if (warnings.length) {\n warnTriggerBuild(name, warnings);\n }\n trigger = buildTrigger(name, ast, this._normalizer);\n this._triggerCache[cacheKey] = trigger;\n }\n this._transitionEngine.registerTrigger(namespaceId, name, trigger);\n }\n register(namespaceId, hostElement) {\n this._transitionEngine.register(namespaceId, hostElement);\n }\n destroy(namespaceId, context) {\n this._transitionEngine.destroy(namespaceId, context);\n }\n onInsert(namespaceId, element, parent, insertBefore) {\n this._transitionEngine.insertNode(namespaceId, element, parent, insertBefore);\n }\n onRemove(namespaceId, element, context) {\n this._transitionEngine.removeNode(namespaceId, element, context);\n }\n disableAnimations(element, disable) {\n this._transitionEngine.markElementAsDisabled(element, disable);\n }\n process(namespaceId, element, property, value) {\n if (property.charAt(0) == '@') {\n const [id, action] = parseTimelineCommand(property);\n const args = value;\n this._timelineEngine.command(id, element, action, args);\n } else {\n this._transitionEngine.trigger(namespaceId, element, property, value);\n }\n }\n listen(namespaceId, element, eventName, eventPhase, callback) {\n // @@listen\n if (eventName.charAt(0) == '@') {\n const [id, action] = parseTimelineCommand(eventName);\n return this._timelineEngine.listen(id, element, action, callback);\n }\n return this._transitionEngine.listen(namespaceId, element, eventName, eventPhase, callback);\n }\n flush(microtaskId = -1) {\n this._transitionEngine.flush(microtaskId);\n }\n get players() {\n return [...this._transitionEngine.players, ...this._timelineEngine.players];\n }\n whenRenderingDone() {\n return this._transitionEngine.whenRenderingDone();\n }\n afterFlushAnimationsDone(cb) {\n this._transitionEngine.afterFlushAnimationsDone(cb);\n }\n}\n\n/**\n * Returns an instance of `SpecialCasedStyles` if and when any special (non animateable) styles are\n * detected.\n *\n * In CSS there exist properties that cannot be animated within a keyframe animation\n * (whether it be via CSS keyframes or web-animations) and the animation implementation\n * will ignore them. This function is designed to detect those special cased styles and\n * return a container that will be executed at the start and end of the animation.\n *\n * @returns an instance of `SpecialCasedStyles` if any special styles are detected otherwise `null`\n */\nfunction packageNonAnimatableStyles(element, styles) {\n let startStyles = null;\n let endStyles = null;\n if (Array.isArray(styles) && styles.length) {\n startStyles = filterNonAnimatableStyles(styles[0]);\n if (styles.length > 1) {\n endStyles = filterNonAnimatableStyles(styles[styles.length - 1]);\n }\n } else if (styles instanceof Map) {\n startStyles = filterNonAnimatableStyles(styles);\n }\n return startStyles || endStyles ? new SpecialCasedStyles(element, startStyles, endStyles) : null;\n}\n/**\n * Designed to be executed during a keyframe-based animation to apply any special-cased styles.\n *\n * When started (when the `start()` method is run) then the provided `startStyles`\n * will be applied. When finished (when the `finish()` method is called) the\n * `endStyles` will be applied as well any any starting styles. Finally when\n * `destroy()` is called then all styles will be removed.\n */\nclass SpecialCasedStyles {\n static {\n this.initialStylesByElement = /*#__PURE__*/new WeakMap();\n }\n constructor(_element, _startStyles, _endStyles) {\n this._element = _element;\n this._startStyles = _startStyles;\n this._endStyles = _endStyles;\n this._state = 0 /* SpecialCasedStylesState.Pending */;\n let initialStyles = SpecialCasedStyles.initialStylesByElement.get(_element);\n if (!initialStyles) {\n SpecialCasedStyles.initialStylesByElement.set(_element, initialStyles = new Map());\n }\n this._initialStyles = initialStyles;\n }\n start() {\n if (this._state < 1 /* SpecialCasedStylesState.Started */) {\n if (this._startStyles) {\n setStyles(this._element, this._startStyles, this._initialStyles);\n }\n this._state = 1 /* SpecialCasedStylesState.Started */;\n }\n }\n finish() {\n this.start();\n if (this._state < 2 /* SpecialCasedStylesState.Finished */) {\n setStyles(this._element, this._initialStyles);\n if (this._endStyles) {\n setStyles(this._element, this._endStyles);\n this._endStyles = null;\n }\n this._state = 1 /* SpecialCasedStylesState.Started */;\n }\n }\n destroy() {\n this.finish();\n if (this._state < 3 /* SpecialCasedStylesState.Destroyed */) {\n SpecialCasedStyles.initialStylesByElement.delete(this._element);\n if (this._startStyles) {\n eraseStyles(this._element, this._startStyles);\n this._endStyles = null;\n }\n if (this._endStyles) {\n eraseStyles(this._element, this._endStyles);\n this._endStyles = null;\n }\n setStyles(this._element, this._initialStyles);\n this._state = 3 /* SpecialCasedStylesState.Destroyed */;\n }\n }\n}\nfunction filterNonAnimatableStyles(styles) {\n let result = null;\n styles.forEach((val, prop) => {\n if (isNonAnimatableStyle(prop)) {\n result = result || new Map();\n result.set(prop, val);\n }\n });\n return result;\n}\nfunction isNonAnimatableStyle(prop) {\n return prop === 'display' || prop === 'position';\n}\nclass WebAnimationsPlayer {\n constructor(element, keyframes, options, _specialStyles) {\n this.element = element;\n this.keyframes = keyframes;\n this.options = options;\n this._specialStyles = _specialStyles;\n this._onDoneFns = [];\n this._onStartFns = [];\n this._onDestroyFns = [];\n this._initialized = false;\n this._finished = false;\n this._started = false;\n this._destroyed = false;\n // the following original fns are persistent copies of the _onStartFns and _onDoneFns\n // and are used to reset the fns to their original values upon reset()\n // (since the _onStartFns and _onDoneFns get deleted after they are called)\n this._originalOnDoneFns = [];\n this._originalOnStartFns = [];\n this.time = 0;\n this.parentPlayer = null;\n this.currentSnapshot = new Map();\n this._duration = options['duration'];\n this._delay = options['delay'] || 0;\n this.time = this._duration + this._delay;\n }\n _onFinish() {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(fn => fn());\n this._onDoneFns = [];\n }\n }\n init() {\n this._buildPlayer();\n this._preparePlayerBeforeStart();\n }\n _buildPlayer() {\n if (this._initialized) return;\n this._initialized = true;\n const keyframes = this.keyframes;\n // @ts-expect-error overwriting a readonly property\n this.domPlayer = this._triggerWebAnimation(this.element, keyframes, this.options);\n this._finalKeyframe = keyframes.length ? keyframes[keyframes.length - 1] : new Map();\n const onFinish = () => this._onFinish();\n this.domPlayer.addEventListener('finish', onFinish);\n this.onDestroy(() => {\n // We must remove the `finish` event listener once an animation has completed all its\n // iterations. This action is necessary to prevent a memory leak since the listener captures\n // `this`, creating a closure that prevents `this` from being garbage collected.\n this.domPlayer.removeEventListener('finish', onFinish);\n });\n }\n _preparePlayerBeforeStart() {\n // this is required so that the player doesn't start to animate right away\n if (this._delay) {\n this._resetDomPlayerState();\n } else {\n this.domPlayer.pause();\n }\n }\n _convertKeyframesToObject(keyframes) {\n const kfs = [];\n keyframes.forEach(frame => {\n kfs.push(Object.fromEntries(frame));\n });\n return kfs;\n }\n /** @internal */\n _triggerWebAnimation(element, keyframes, options) {\n return element.animate(this._convertKeyframesToObject(keyframes), options);\n }\n onStart(fn) {\n this._originalOnStartFns.push(fn);\n this._onStartFns.push(fn);\n }\n onDone(fn) {\n this._originalOnDoneFns.push(fn);\n this._onDoneFns.push(fn);\n }\n onDestroy(fn) {\n this._onDestroyFns.push(fn);\n }\n play() {\n this._buildPlayer();\n if (!this.hasStarted()) {\n this._onStartFns.forEach(fn => fn());\n this._onStartFns = [];\n this._started = true;\n if (this._specialStyles) {\n this._specialStyles.start();\n }\n }\n this.domPlayer.play();\n }\n pause() {\n this.init();\n this.domPlayer.pause();\n }\n finish() {\n this.init();\n if (this._specialStyles) {\n this._specialStyles.finish();\n }\n this._onFinish();\n this.domPlayer.finish();\n }\n reset() {\n this._resetDomPlayerState();\n this._destroyed = false;\n this._finished = false;\n this._started = false;\n this._onStartFns = this._originalOnStartFns;\n this._onDoneFns = this._originalOnDoneFns;\n }\n _resetDomPlayerState() {\n if (this.domPlayer) {\n this.domPlayer.cancel();\n }\n }\n restart() {\n this.reset();\n this.play();\n }\n hasStarted() {\n return this._started;\n }\n destroy() {\n if (!this._destroyed) {\n this._destroyed = true;\n this._resetDomPlayerState();\n this._onFinish();\n if (this._specialStyles) {\n this._specialStyles.destroy();\n }\n this._onDestroyFns.forEach(fn => fn());\n this._onDestroyFns = [];\n }\n }\n setPosition(p) {\n if (this.domPlayer === undefined) {\n this.init();\n }\n this.domPlayer.currentTime = p * this.time;\n }\n getPosition() {\n // tsc is complaining with TS2362 without the conversion to number\n return +(this.domPlayer.currentTime ?? 0) / this.time;\n }\n get totalTime() {\n return this._delay + this._duration;\n }\n beforeDestroy() {\n const styles = new Map();\n if (this.hasStarted()) {\n // note: this code is invoked only when the `play` function was called prior to this\n // (thus `hasStarted` returns true), this implies that the code that initializes\n // `_finalKeyframe` has also been executed and the non-null assertion can be safely used here\n const finalKeyframe = this._finalKeyframe;\n finalKeyframe.forEach((val, prop) => {\n if (prop !== 'offset') {\n styles.set(prop, this._finished ? val : computeStyle(this.element, prop));\n }\n });\n }\n this.currentSnapshot = styles;\n }\n /** @internal */\n triggerCallback(phaseName) {\n const methods = phaseName === 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(fn => fn());\n methods.length = 0;\n }\n}\nclass WebAnimationsDriver {\n validateStyleProperty(prop) {\n // Perform actual validation in dev mode only, in prod mode this check is a noop.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n return validateStyleProperty(prop);\n }\n return true;\n }\n validateAnimatableStyleProperty(prop) {\n // Perform actual validation in dev mode only, in prod mode this check is a noop.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const cssProp = camelCaseToDashCase(prop);\n return validateWebAnimatableStyleProperty(cssProp);\n }\n return true;\n }\n containsElement(elm1, elm2) {\n return containsElement(elm1, elm2);\n }\n getParentElement(element) {\n return getParentElement(element);\n }\n query(element, selector, multi) {\n return invokeQuery(element, selector, multi);\n }\n computeStyle(element, prop, defaultValue) {\n return computeStyle(element, prop);\n }\n animate(element, keyframes, duration, delay, easing, previousPlayers = []) {\n const fill = delay == 0 ? 'both' : 'forwards';\n const playerOptions = {\n duration,\n delay,\n fill\n };\n // we check for this to avoid having a null|undefined value be present\n // for the easing (which results in an error for certain browsers #9752)\n if (easing) {\n playerOptions['easing'] = easing;\n }\n const previousStyles = new Map();\n const previousWebAnimationPlayers = previousPlayers.filter(player => player instanceof WebAnimationsPlayer);\n if (allowPreviousPlayerStylesMerge(duration, delay)) {\n previousWebAnimationPlayers.forEach(player => {\n player.currentSnapshot.forEach((val, prop) => previousStyles.set(prop, val));\n });\n }\n let _keyframes = normalizeKeyframes(keyframes).map(styles => new Map(styles));\n _keyframes = balancePreviousStylesIntoKeyframes(element, _keyframes, previousStyles);\n const specialStyles = packageNonAnimatableStyles(element, _keyframes);\n return new WebAnimationsPlayer(element, _keyframes, playerOptions, specialStyles);\n }\n}\nfunction createEngine(type, doc) {\n // TODO: find a way to make this tree shakable.\n if (type === 'noop') {\n return new AnimationEngine(doc, new NoopAnimationDriver(), new NoopAnimationStyleNormalizer());\n }\n return new AnimationEngine(doc, new WebAnimationsDriver(), new WebAnimationsStyleNormalizer());\n}\nclass Animation {\n constructor(_driver, input) {\n this._driver = _driver;\n const errors = [];\n const warnings = [];\n const ast = buildAnimationAst(_driver, input, errors, warnings);\n if (errors.length) {\n throw validationFailed(errors);\n }\n if (warnings.length) {\n warnValidation(warnings);\n }\n this._animationAst = ast;\n }\n buildTimelines(element, startingStyles, destinationStyles, options, subInstructions) {\n const start = Array.isArray(startingStyles) ? normalizeStyles(startingStyles) : startingStyles;\n const dest = Array.isArray(destinationStyles) ? normalizeStyles(destinationStyles) : destinationStyles;\n const errors = [];\n subInstructions = subInstructions || new ElementInstructionMap();\n const result = buildAnimationTimelines(this._driver, element, this._animationAst, ENTER_CLASSNAME, LEAVE_CLASSNAME, start, dest, options, subInstructions, errors);\n if (errors.length) {\n throw buildingFailed(errors);\n }\n return result;\n }\n}\nconst ANIMATION_PREFIX = '@';\nconst DISABLE_ANIMATIONS_FLAG = '@.disabled';\nclass BaseAnimationRenderer {\n constructor(namespaceId, delegate, engine, _onDestroy) {\n this.namespaceId = namespaceId;\n this.delegate = delegate;\n this.engine = engine;\n this._onDestroy = _onDestroy;\n // We need to explicitly type this property because of an api-extractor bug\n // See https://github.com/microsoft/rushstack/issues/4390\n this.ɵtype = 0 /* AnimationRendererType.Regular */;\n }\n get data() {\n return this.delegate.data;\n }\n destroyNode(node) {\n this.delegate.destroyNode?.(node);\n }\n destroy() {\n this.engine.destroy(this.namespaceId, this.delegate);\n this.engine.afterFlushAnimationsDone(() => {\n // Call the renderer destroy method after the animations has finished as otherwise\n // styles will be removed too early which will cause an unstyled animation.\n queueMicrotask(() => {\n this.delegate.destroy();\n });\n });\n this._onDestroy?.();\n }\n createElement(name, namespace) {\n return this.delegate.createElement(name, namespace);\n }\n createComment(value) {\n return this.delegate.createComment(value);\n }\n createText(value) {\n return this.delegate.createText(value);\n }\n appendChild(parent, newChild) {\n this.delegate.appendChild(parent, newChild);\n this.engine.onInsert(this.namespaceId, newChild, parent, false);\n }\n insertBefore(parent, newChild, refChild, isMove = true) {\n this.delegate.insertBefore(parent, newChild, refChild);\n // If `isMove` true than we should animate this insert.\n this.engine.onInsert(this.namespaceId, newChild, parent, isMove);\n }\n removeChild(parent, oldChild, isHostElement) {\n this.engine.onRemove(this.namespaceId, oldChild, this.delegate);\n }\n selectRootElement(selectorOrNode, preserveContent) {\n return this.delegate.selectRootElement(selectorOrNode, preserveContent);\n }\n parentNode(node) {\n return this.delegate.parentNode(node);\n }\n nextSibling(node) {\n return this.delegate.nextSibling(node);\n }\n setAttribute(el, name, value, namespace) {\n this.delegate.setAttribute(el, name, value, namespace);\n }\n removeAttribute(el, name, namespace) {\n this.delegate.removeAttribute(el, name, namespace);\n }\n addClass(el, name) {\n this.delegate.addClass(el, name);\n }\n removeClass(el, name) {\n this.delegate.removeClass(el, name);\n }\n setStyle(el, style, value, flags) {\n this.delegate.setStyle(el, style, value, flags);\n }\n removeStyle(el, style, flags) {\n this.delegate.removeStyle(el, style, flags);\n }\n setProperty(el, name, value) {\n if (name.charAt(0) == ANIMATION_PREFIX && name == DISABLE_ANIMATIONS_FLAG) {\n this.disableAnimations(el, !!value);\n } else {\n this.delegate.setProperty(el, name, value);\n }\n }\n setValue(node, value) {\n this.delegate.setValue(node, value);\n }\n listen(target, eventName, callback) {\n return this.delegate.listen(target, eventName, callback);\n }\n disableAnimations(element, value) {\n this.engine.disableAnimations(element, value);\n }\n}\nclass AnimationRenderer extends BaseAnimationRenderer {\n constructor(factory, namespaceId, delegate, engine, onDestroy) {\n super(namespaceId, delegate, engine, onDestroy);\n this.factory = factory;\n this.namespaceId = namespaceId;\n }\n setProperty(el, name, value) {\n if (name.charAt(0) == ANIMATION_PREFIX) {\n if (name.charAt(1) == '.' && name == DISABLE_ANIMATIONS_FLAG) {\n value = value === undefined ? true : !!value;\n this.disableAnimations(el, value);\n } else {\n this.engine.process(this.namespaceId, el, name.slice(1), value);\n }\n } else {\n this.delegate.setProperty(el, name, value);\n }\n }\n listen(target, eventName, callback) {\n if (eventName.charAt(0) == ANIMATION_PREFIX) {\n const element = resolveElementFromTarget(target);\n let name = eventName.slice(1);\n let phase = '';\n // @listener.phase is for trigger animation callbacks\n // @@listener is for animation builder callbacks\n if (name.charAt(0) != ANIMATION_PREFIX) {\n [name, phase] = parseTriggerCallbackName(name);\n }\n return this.engine.listen(this.namespaceId, element, name, phase, event => {\n const countId = event['_data'] || -1;\n this.factory.scheduleListenerCallback(countId, callback, event);\n });\n }\n return this.delegate.listen(target, eventName, callback);\n }\n}\nfunction resolveElementFromTarget(target) {\n switch (target) {\n case 'body':\n return document.body;\n case 'document':\n return document;\n case 'window':\n return window;\n default:\n return target;\n }\n}\nfunction parseTriggerCallbackName(triggerName) {\n const dotIndex = triggerName.indexOf('.');\n const trigger = triggerName.substring(0, dotIndex);\n const phase = triggerName.slice(dotIndex + 1);\n return [trigger, phase];\n}\nclass AnimationRendererFactory {\n constructor(delegate, engine, _zone) {\n this.delegate = delegate;\n this.engine = engine;\n this._zone = _zone;\n this._currentId = 0;\n this._microtaskId = 1;\n this._animationCallbacksBuffer = [];\n this._rendererCache = new Map();\n this._cdRecurDepth = 0;\n engine.onRemovalComplete = (element, delegate) => {\n // Note: if a component element has a leave animation, and a host leave animation,\n // the view engine will call `removeChild` for the parent\n // component renderer as well as for the child component renderer.\n // Therefore, we need to check if we already removed the element.\n const parentNode = delegate?.parentNode(element);\n if (parentNode) {\n delegate.removeChild(parentNode, element);\n }\n };\n }\n createRenderer(hostElement, type) {\n const EMPTY_NAMESPACE_ID = '';\n // cache the delegates to find out which cached delegate can\n // be used by which cached renderer\n const delegate = this.delegate.createRenderer(hostElement, type);\n if (!hostElement || !type?.data?.['animation']) {\n const cache = this._rendererCache;\n let renderer = cache.get(delegate);\n if (!renderer) {\n // Ensure that the renderer is removed from the cache on destroy\n // since it may contain references to detached DOM nodes.\n const onRendererDestroy = () => cache.delete(delegate);\n renderer = new BaseAnimationRenderer(EMPTY_NAMESPACE_ID, delegate, this.engine, onRendererDestroy);\n // only cache this result when the base renderer is used\n cache.set(delegate, renderer);\n }\n return renderer;\n }\n const componentId = type.id;\n const namespaceId = type.id + '-' + this._currentId;\n this._currentId++;\n this.engine.register(namespaceId, hostElement);\n const registerTrigger = trigger => {\n if (Array.isArray(trigger)) {\n trigger.forEach(registerTrigger);\n } else {\n this.engine.registerTrigger(componentId, namespaceId, hostElement, trigger.name, trigger);\n }\n };\n const animationTriggers = type.data['animation'];\n animationTriggers.forEach(registerTrigger);\n return new AnimationRenderer(this, namespaceId, delegate, this.engine);\n }\n begin() {\n this._cdRecurDepth++;\n if (this.delegate.begin) {\n this.delegate.begin();\n }\n }\n _scheduleCountTask() {\n queueMicrotask(() => {\n this._microtaskId++;\n });\n }\n /** @internal */\n scheduleListenerCallback(count, fn, data) {\n if (count >= 0 && count < this._microtaskId) {\n this._zone.run(() => fn(data));\n return;\n }\n const animationCallbacksBuffer = this._animationCallbacksBuffer;\n if (animationCallbacksBuffer.length == 0) {\n queueMicrotask(() => {\n this._zone.run(() => {\n animationCallbacksBuffer.forEach(tuple => {\n const [fn, data] = tuple;\n fn(data);\n });\n this._animationCallbacksBuffer = [];\n });\n });\n }\n animationCallbacksBuffer.push([fn, data]);\n }\n end() {\n this._cdRecurDepth--;\n // this is to prevent animations from running twice when an inner\n // component does CD when a parent component instead has inserted it\n if (this._cdRecurDepth == 0) {\n this._zone.runOutsideAngular(() => {\n this._scheduleCountTask();\n this.engine.flush(this._microtaskId);\n });\n }\n if (this.delegate.end) {\n this.delegate.end();\n }\n }\n whenRenderingDone() {\n return this.engine.whenRenderingDone();\n }\n}\n\n/**\n * @module\n * @description\n * Entry point for all animation APIs of the animation browser package.\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AnimationDriver, NoopAnimationDriver, Animation as ɵAnimation, AnimationEngine as ɵAnimationEngine, AnimationRenderer as ɵAnimationRenderer, AnimationRendererFactory as ɵAnimationRendererFactory, AnimationStyleNormalizer as ɵAnimationStyleNormalizer, BaseAnimationRenderer as ɵBaseAnimationRenderer, NoopAnimationStyleNormalizer as ɵNoopAnimationStyleNormalizer, WebAnimationsDriver as ɵWebAnimationsDriver, WebAnimationsPlayer as ɵWebAnimationsPlayer, WebAnimationsStyleNormalizer as ɵWebAnimationsStyleNormalizer, allowPreviousPlayerStylesMerge as ɵallowPreviousPlayerStylesMerge, camelCaseToDashCase as ɵcamelCaseToDashCase, containsElement as ɵcontainsElement, createEngine as ɵcreateEngine, getParentElement as ɵgetParentElement, invokeQuery as ɵinvokeQuery, normalizeKeyframes as ɵnormalizeKeyframes, validateStyleProperty as ɵvalidateStyleProperty, validateWebAnimatableStyleProperty as ɵvalidateWebAnimatableStyleProperty };\n","/**\n * @license Angular v18.1.3\n * (c) 2010-2024 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { Injectable, Inject, RendererFactory2, NgZone, ANIMATION_MODULE_TYPE, NgModule, ɵperformanceMarkFeature } from '@angular/core';\nexport { ANIMATION_MODULE_TYPE } from '@angular/core';\nimport { ɵDomRendererFactory2, BrowserModule } from '@angular/platform-browser';\nimport * as i1 from '@angular/animations/browser';\nimport { ɵAnimationEngine, ɵWebAnimationsStyleNormalizer, ɵAnimationRendererFactory, ɵAnimationStyleNormalizer, AnimationDriver, ɵWebAnimationsDriver, NoopAnimationDriver } from '@angular/animations/browser';\nimport { DOCUMENT } from '@angular/common';\nlet InjectableAnimationEngine = /*#__PURE__*/(() => {\n class InjectableAnimationEngine extends ɵAnimationEngine {\n // The `ApplicationRef` is injected here explicitly to force the dependency ordering.\n // Since the `ApplicationRef` should be created earlier before the `AnimationEngine`, they\n // both have `ngOnDestroy` hooks and `flush()` must be called after all views are destroyed.\n constructor(doc, driver, normalizer) {\n super(doc, driver, normalizer);\n }\n ngOnDestroy() {\n this.flush();\n }\n static {\n this.ɵfac = function InjectableAnimationEngine_Factory(ɵt) {\n return new (ɵt || InjectableAnimationEngine)(i0.ɵɵinject(DOCUMENT), i0.ɵɵinject(i1.AnimationDriver), i0.ɵɵinject(i1.ɵAnimationStyleNormalizer));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: InjectableAnimationEngine,\n factory: InjectableAnimationEngine.ɵfac\n });\n }\n }\n return InjectableAnimationEngine;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction instantiateDefaultStyleNormalizer() {\n return new ɵWebAnimationsStyleNormalizer();\n}\nfunction instantiateRendererFactory(renderer, engine, zone) {\n return new ɵAnimationRendererFactory(renderer, engine, zone);\n}\nconst SHARED_ANIMATION_PROVIDERS = [{\n provide: ɵAnimationStyleNormalizer,\n useFactory: instantiateDefaultStyleNormalizer\n}, {\n provide: ɵAnimationEngine,\n useClass: InjectableAnimationEngine\n}, {\n provide: RendererFactory2,\n useFactory: instantiateRendererFactory,\n deps: [ɵDomRendererFactory2, ɵAnimationEngine, NgZone]\n}];\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserModule.\n */\nconst BROWSER_ANIMATIONS_PROVIDERS = [{\n provide: AnimationDriver,\n useFactory: () => new ɵWebAnimationsDriver()\n}, {\n provide: ANIMATION_MODULE_TYPE,\n useValue: 'BrowserAnimations'\n}, ...SHARED_ANIMATION_PROVIDERS];\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserTestingModule.\n */\nconst BROWSER_NOOP_ANIMATIONS_PROVIDERS = [{\n provide: AnimationDriver,\n useClass: NoopAnimationDriver\n}, {\n provide: ANIMATION_MODULE_TYPE,\n useValue: 'NoopAnimations'\n}, ...SHARED_ANIMATION_PROVIDERS];\n\n/**\n * Exports `BrowserModule` with additional dependency-injection providers\n * for use with animations. See [Animations](guide/animations).\n * @publicApi\n */\nlet BrowserAnimationsModule = /*#__PURE__*/(() => {\n class BrowserAnimationsModule {\n /**\n * Configures the module based on the specified object.\n *\n * @param config Object used to configure the behavior of the `BrowserAnimationsModule`.\n * @see {@link BrowserAnimationsModuleConfig}\n *\n * @usageNotes\n * When registering the `BrowserAnimationsModule`, you can use the `withConfig`\n * function as follows:\n * ```\n * @NgModule({\n * imports: [BrowserAnimationsModule.withConfig(config)]\n * })\n * class MyNgModule {}\n * ```\n */\n static withConfig(config) {\n return {\n ngModule: BrowserAnimationsModule,\n providers: config.disableAnimations ? BROWSER_NOOP_ANIMATIONS_PROVIDERS : BROWSER_ANIMATIONS_PROVIDERS\n };\n }\n static {\n this.ɵfac = function BrowserAnimationsModule_Factory(ɵt) {\n return new (ɵt || BrowserAnimationsModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: BrowserAnimationsModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: BROWSER_ANIMATIONS_PROVIDERS,\n imports: [BrowserModule]\n });\n }\n }\n return BrowserAnimationsModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Returns the set of dependency-injection providers\n * to enable animations in an application. See [animations guide](guide/animations)\n * to learn more about animations in Angular.\n *\n * @usageNotes\n *\n * The function is useful when you want to enable animations in an application\n * bootstrapped using the `bootstrapApplication` function. In this scenario there\n * is no need to import the `BrowserAnimationsModule` NgModule at all, just add\n * providers returned by this function to the `providers` list as show below.\n *\n * ```typescript\n * bootstrapApplication(RootComponent, {\n * providers: [\n * provideAnimations()\n * ]\n * });\n * ```\n *\n * @publicApi\n */\nfunction provideAnimations() {\n ɵperformanceMarkFeature('NgEagerAnimations');\n // Return a copy to prevent changes to the original array in case any in-place\n // alterations are performed to the `provideAnimations` call results in app code.\n return [...BROWSER_ANIMATIONS_PROVIDERS];\n}\n/**\n * A null player that must be imported to allow disabling of animations.\n * @publicApi\n */\nlet NoopAnimationsModule = /*#__PURE__*/(() => {\n class NoopAnimationsModule {\n static {\n this.ɵfac = function NoopAnimationsModule_Factory(ɵt) {\n return new (ɵt || NoopAnimationsModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: NoopAnimationsModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS,\n imports: [BrowserModule]\n });\n }\n }\n return NoopAnimationsModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Returns the set of dependency-injection providers\n * to disable animations in an application. See [animations guide](guide/animations)\n * to learn more about animations in Angular.\n *\n * @usageNotes\n *\n * The function is useful when you want to bootstrap an application using\n * the `bootstrapApplication` function, but you need to disable animations\n * (for example, when running tests).\n *\n * ```typescript\n * bootstrapApplication(RootComponent, {\n * providers: [\n * provideNoopAnimations()\n * ]\n * });\n * ```\n *\n * @publicApi\n */\nfunction provideNoopAnimations() {\n // Return a copy to prevent changes to the original array in case any in-place\n // alterations are performed to the `provideNoopAnimations` call results in app code.\n return [...BROWSER_NOOP_ANIMATIONS_PROVIDERS];\n}\n\n/**\n * @module\n * @description\n * Entry point for all animation APIs of the animation browser package.\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BrowserAnimationsModule, NoopAnimationsModule, provideAnimations, provideNoopAnimations, InjectableAnimationEngine as ɵInjectableAnimationEngine };\n","import { Routes } from '@angular/router';\r\n\r\nexport const full: Routes = [\r\n\r\n];\r\n","import { Routes } from '@angular/router';\r\nimport { MANAGEMENT_ROUTER_UTILS } from 'src/app/core/utils/management-router.util';\r\nimport { ROUTER_UTILS } from 'src/app/core/utils/router.util';\r\n\r\nexport const content: Routes = [\r\n {\r\n path: ROUTER_UTILS.config.site.root,\r\n loadChildren: () =>\r\n import('../../pages/site/site.module').then((m) => m.SiteModule),\r\n },\r\n {\r\n path: ROUTER_UTILS.config.home.root,\r\n loadChildren: () =>\r\n import('../../pages/home/home.module').then((m) => m.HomeModule),\r\n },\r\n {\r\n path: ROUTER_UTILS.config.dashboard.root,\r\n loadChildren: () =>\r\n import('../../pages/dashboard/dashboard.module').then(\r\n (m) => m.DashboardModule\r\n ),\r\n },\r\n {\r\n path: ROUTER_UTILS.config.products.root,\r\n loadChildren: () =>\r\n import('../../pages/product/product.module').then((m) => m.ProductModule),\r\n },\r\n {\r\n path: ROUTER_UTILS.config.sales.root,\r\n loadChildren: () =>\r\n import('../../pages/sale/sale.module').then((m) => m.SaleModule),\r\n },\r\n {\r\n path: ROUTER_UTILS.config.returns.root,\r\n loadChildren: () =>\r\n import('../../pages/return/return.module').then((m) => m.ReturnModule),\r\n },\r\n {\r\n path: ROUTER_UTILS.config.autoPricing.root,\r\n loadChildren: () =>\r\n import('../../pages/auto-pricing/auto-pricing.module').then(\r\n (m) => m.AutoPricingModule\r\n ),\r\n },\r\n {\r\n path: ROUTER_UTILS.config.integrations.root,\r\n loadChildren: () =>\r\n import('../../pages/integration/accounting/accounting.module').then(\r\n (m) => m.AccountingModule\r\n ),\r\n },\r\n {\r\n path: ROUTER_UTILS.config.integrations.root,\r\n loadChildren: () =>\r\n import('../../pages/integration/market-place/market-place.module').then(\r\n (m) => m.MarketPlaceModule\r\n ),\r\n },\r\n {\r\n path: ROUTER_UTILS.config.accounting.root,\r\n loadChildren: () =>\r\n import('../../pages/accounting/accounting.module').then(\r\n (m) => m.AccountingModule\r\n ),\r\n },\r\n {\r\n path: ROUTER_UTILS.config.firm.root,\r\n loadChildren: () =>\r\n import('../../pages/company/company.module').then((m) => m.CompanyModule),\r\n },\r\n {\r\n path: ROUTER_UTILS.config.batchOperations.root,\r\n loadChildren: () =>\r\n import('../../pages/batch-operation/batch-operation.module').then(\r\n (m) => m.BatchOperationModule\r\n ),\r\n },\r\n {\r\n path: ROUTER_UTILS.config.values.root,\r\n loadChildren: () =>\r\n import('../../pages/value/values.module').then((m) => m.ValuesModule),\r\n },\r\n {\r\n path: ROUTER_UTILS.config.tracking.root,\r\n loadChildren: () =>\r\n import('../../pages/tracking/tracking.module').then(\r\n (m) => m.TrackingModule\r\n ),\r\n },\r\n {\r\n path: ROUTER_UTILS.config.settings.root,\r\n loadChildren: () =>\r\n import('../../pages/setting/setting.module').then((m) => m.SettingModule),\r\n },\r\n {\r\n path: ROUTER_UTILS.config.user.root,\r\n loadChildren: () =>\r\n import('../../pages/user/user.module').then((m) => m.UserModule),\r\n },\r\n {\r\n path: ROUTER_UTILS.config.retailSale.root,\r\n loadChildren: () =>\r\n import('../../pages/retail_sale/retail_sale.module').then(\r\n (m) => m.RetailSaleModule\r\n ),\r\n },\r\n {\r\n path: MANAGEMENT_ROUTER_UTILS.config.customers.root,\r\n loadChildren: () =>\r\n import('../../pages/management/customer/customer.module').then(\r\n (m) => m.CustomerModule\r\n ),\r\n },\r\n {\r\n path: MANAGEMENT_ROUTER_UTILS.config.users.root,\r\n loadChildren: () =>\r\n import('../../pages/management/user/user.module').then(\r\n (m) => m.UserModule\r\n ),\r\n },\r\n {\r\n path: MANAGEMENT_ROUTER_UTILS.config.roles.root,\r\n loadChildren: () =>\r\n import('../../pages/management/role/role.module').then(\r\n (m) => m.RoleModule\r\n ),\r\n },\r\n {\r\n path: MANAGEMENT_ROUTER_UTILS.config.version.root,\r\n loadChildren: () =>\r\n import('../../pages/management/version/version.module').then(\r\n (m) => m.VersionModule\r\n ),\r\n },\r\n {\r\n path: MANAGEMENT_ROUTER_UTILS.config.storeSettings.root,\r\n loadChildren: () =>\r\n import('../../pages/management/store-setting/store-setting.module').then(\r\n (m) => m.StoreSettingModule\r\n ),\r\n },\r\n];\r\n","import { Component, type OnInit } from '@angular/core';\nimport { SharedModule } from 'src/app/shared/shared.module';\n\n@Component({\n standalone:true,\n imports:[SharedModule],\n selector: 'app-user-agreement',\n templateUrl: './user-agreement.component.html',\n styleUrl: './user-agreement.component.scss',\n})\nexport class UserAgreementComponent implements OnInit {\n\n ngOnInit(): void { }\n\n}\n","\n","import { NgModule } from '@angular/core';\r\nimport { RouterModule, Routes } from '@angular/router';\r\nimport { AuthGuard } from './core/guards/auth_guard';\r\nimport { ROUTER_UTILS } from './core/utils';\r\nimport { SignInComponent } from './pages/auth/sign-in/sign-in.component';\r\nimport { ContentComponent } from './shared/layout/content/content.component';\r\nimport { FullComponent } from './shared/layout/full/full.component';\r\nimport { full } from './shared/routes/full.routes';\r\nimport { content } from './shared/routes/routes';\r\nimport { SiteBaseComponent } from './pages/site/site-base/site-base.component';\r\nimport { TrialCreationComponent } from './pages/auth/trial-creation/trial-creation.component';\r\nimport { NotFoundComponent } from './shared/components/not-found/not-found.component';\r\nimport { UserAgreementComponent } from './pages/contracts/user-agreement/user-agreement.component';\r\n\r\nconst routes: Routes = [\r\n {\r\n path: '',\r\n redirectTo: '',\r\n pathMatch: 'full',\r\n component: SiteBaseComponent,\r\n },\r\n {\r\n path: `${ROUTER_UTILS.config.auth.root}/${ROUTER_UTILS.config.auth.signIn}`,\r\n component: SignInComponent,\r\n },\r\n {\r\n path: `${ROUTER_UTILS.config.auth.root}/${ROUTER_UTILS.config.auth.trialCreation}`,\r\n component: TrialCreationComponent,\r\n },\r\n {\r\n path: `${ROUTER_UTILS.config.contracts.root}/${ROUTER_UTILS.config.contracts.userAgreement}`,\r\n component: UserAgreementComponent,\r\n },\r\n {\r\n path: '',\r\n component: ContentComponent,\r\n canActivate: [AuthGuard],\r\n children: content,\r\n },\r\n {\r\n path: '',\r\n component: FullComponent,\r\n canActivate: [AuthGuard],\r\n children: full,\r\n },\r\n {\r\n path: '**',\r\n component: NotFoundComponent,\r\n },\r\n];\r\n\r\n@NgModule({\r\n imports: [\r\n RouterModule.forRoot(routes, {\r\n anchorScrolling: 'enabled',\r\n scrollPositionRestoration: 'enabled'\r\n }),\r\n ],\r\n exports: [RouterModule],\r\n})\r\nexport class AppRoutingModule {}\r\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// THIS CODE IS GENERATED - DO NOT MODIFY.\nconst u = undefined;\nfunction plural(val) {\n const n = val;\n if (n === 1) return 1;\n return 5;\n}\nexport default [\"tr\", [[\"öö\", \"ös\"], [\"ÖÖ\", \"ÖS\"], u], [[\"ÖÖ\", \"ÖS\"], u, u], [[\"P\", \"P\", \"S\", \"Ç\", \"P\", \"C\", \"C\"], [\"Paz\", \"Pzt\", \"Sal\", \"Çar\", \"Per\", \"Cum\", \"Cmt\"], [\"Pazar\", \"Pazartesi\", \"Salı\", \"Çarşamba\", \"Perşembe\", \"Cuma\", \"Cumartesi\"], [\"Pa\", \"Pt\", \"Sa\", \"Ça\", \"Pe\", \"Cu\", \"Ct\"]], u, [[\"O\", \"Ş\", \"M\", \"N\", \"M\", \"H\", \"T\", \"A\", \"E\", \"E\", \"K\", \"A\"], [\"Oca\", \"Şub\", \"Mar\", \"Nis\", \"May\", \"Haz\", \"Tem\", \"Ağu\", \"Eyl\", \"Eki\", \"Kas\", \"Ara\"], [\"Ocak\", \"Şubat\", \"Mart\", \"Nisan\", \"Mayıs\", \"Haziran\", \"Temmuz\", \"Ağustos\", \"Eylül\", \"Ekim\", \"Kasım\", \"Aralık\"]], u, [[\"MÖ\", \"MS\"], u, [\"Milattan Önce\", \"Milattan Sonra\"]], 1, [6, 0], [\"d.MM.y\", \"d MMM y\", \"d MMMM y\", \"d MMMM y EEEE\"], [\"HH:mm\", \"HH:mm:ss\", \"HH:mm:ss z\", \"HH:mm:ss zzzz\"], [\"{1} {0}\", u, u, u], [\",\", \".\", \";\", \"%\", \"+\", \"-\", \"E\", \"×\", \"‰\", \"∞\", \"NaN\", \":\"], [\"#,##0.###\", \"%#,##0\", \"¤#,##0.00\", \"#E0\"], \"TRY\", \"₺\", \"Türk Lirası\", {\n \"AUD\": [\"AU$\", \"$\"],\n \"BYN\": [u, \"р.\"],\n \"PHP\": [u, \"₱\"],\n \"RON\": [u, \"L\"],\n \"RUR\": [u, \"р.\"],\n \"THB\": [\"฿\"],\n \"TRY\": [\"₺\"],\n \"TWD\": [\"NT$\"]\n}, \"ltr\", plural];\n","import {\r\n ApplicationConfig,\r\n provideZoneChangeDetection,\r\n isDevMode,\r\n LOCALE_ID,\r\n importProvidersFrom,\r\n} from '@angular/core';\r\nimport { provideRouter } from '@angular/router';\r\n\r\nimport { routes } from './app.routes';\r\nimport { provideServiceWorker } from '@angular/service-worker';\r\nimport { AuthService } from './core/services/auth';\r\nimport { AuthGuard } from './core/guards/auth_guard';\r\nimport {\r\n CommonModule,\r\n CurrencyPipe,\r\n registerLocaleData,\r\n} from '@angular/common';\r\nimport {\r\n HTTP_INTERCEPTORS,\r\n provideHttpClient,\r\n withInterceptorsFromDi,\r\n} from '@angular/common/http';\r\nimport { JwtInterceptor, ServerErrorInterceptor } from './core/interceptors';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { SharedModule } from './shared/shared.module';\r\nimport {\r\n BrowserAnimationsModule,\r\n provideAnimations,\r\n} from '@angular/platform-browser/animations';\r\nimport { provideToastr } from 'ngx-toastr';\r\nimport { StorageItem } from './core/enums';\r\nimport { JWT_OPTIONS, JwtModule } from '@auth0/angular-jwt';\r\nimport { AppRoutingModule } from './app-routing.module';\r\nimport { BrowserModule } from '@angular/platform-browser';\r\nimport localeTr from '@angular/common/locales/tr';\r\nimport { provideFirebaseApp, getApp, initializeApp } from '@angular/fire/app';\r\nimport { environment } from 'src/environments/environment';\r\nimport { getMessaging, provideMessaging } from '@angular/fire/messaging';\r\nimport { provideEnvironmentNgxMask } from 'ngx-mask';\r\n\r\nexport function jwtOptionsFactory() {\r\n return {\r\n tokenGetter: () => {\r\n return localStorage.getItem(StorageItem.Auth);\r\n },\r\n };\r\n}\r\n\r\nregisterLocaleData(localeTr);\r\n\r\nexport const appConfig: ApplicationConfig = {\r\n providers: [\r\n provideZoneChangeDetection({ eventCoalescing: true }),\r\n provideRouter(routes),\r\n { provide: LOCALE_ID, useValue: 'tr-TR' },\r\n provideHttpClient(withInterceptorsFromDi()),\r\n provideAnimations(),\r\n provideToastr(),\r\n provideServiceWorker('ngsw-worker.js', {\r\n enabled: !isDevMode(),\r\n registrationStrategy: 'registerWhenStable:30000',\r\n }),\r\n provideFirebaseApp(() => initializeApp(environment.firebase)),\r\n provideMessaging(() => getMessaging()),\r\n provideEnvironmentNgxMask(),\r\n AuthService,\r\n AuthGuard,\r\n CurrencyPipe,\r\n { provide: LOCALE_ID, useValue: 'tr-TR' },\r\n {\r\n provide: HTTP_INTERCEPTORS,\r\n useClass: ServerErrorInterceptor,\r\n multi: true,\r\n },\r\n { provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true },\r\n importProvidersFrom([\r\n BrowserModule,\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n BrowserAnimationsModule,\r\n AppRoutingModule,\r\n SharedModule,\r\n JwtModule.forRoot({\r\n jwtOptionsProvider: {\r\n provide: JWT_OPTIONS,\r\n useFactory: jwtOptionsFactory,\r\n },\r\n }),\r\n ]),\r\n provideServiceWorker('ngsw-worker.js', {\r\n enabled: !isDevMode(),\r\n registrationStrategy: 'registerWhenStable:30000',\r\n }),\r\n ],\r\n};\r\n","import { Component, CUSTOM_ELEMENTS_SCHEMA, inject } from '@angular/core';\r\nimport { Router, RouterOutlet } from '@angular/router';\r\nimport { AuthService } from './core/services/auth';\r\nimport { AlertDialogService } from './core/services/alert-dialog';\r\nimport { SpinnerService } from './core/services/spinner';\r\nimport { environment } from '../environments/environment';\r\nimport { getToken, Messaging, onMessage } from '@angular/fire/messaging';\r\n\r\n@Component({\r\n selector: 'app-root',\r\n standalone: true,\r\n imports: [RouterOutlet],\r\n templateUrl: './app.component.html',\r\n styleUrl: './app.component.scss',\r\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\r\n})\r\nexport class AppComponent {\r\n private messaging = inject(Messaging);\r\n constructor(\r\n private authService: AuthService,\r\n private alertDialogService: AlertDialogService,\r\n public spinnerService: SpinnerService,\r\n private router: Router\r\n ) {\r\n const isLoggedIn = this.authService.isLoggedIn;\r\n if (isLoggedIn) {\r\n this.authService.loadUserRole();\r\n }\r\n }\r\n ngOnInit(): void {\r\n this.requestPermission();\r\n this.listen();\r\n }\r\n\r\n requestPermission() {\r\n getToken(this.messaging, { vapidKey: environment.firebase.vapidKey })\r\n .then((currentToken) => {\r\n if (currentToken) {\r\n console.log('FCM Token alındı');\r\n } else {\r\n console.log(\r\n 'No registration token available. Request permission to generate one.'\r\n );\r\n }\r\n })\r\n .catch((err) => {\r\n console.log('An error occurred while retrieving token. ', err);\r\n });\r\n }\r\n\r\n listen() {\r\n onMessage(this.messaging, (payload) => {\r\n console.log('Message received. ', payload);\r\n this.alertDialogService.info(payload.notification!.body!);\r\n });\r\n }\r\n\r\n showSpinner(): void {\r\n this.spinnerService.showSpinner('Loading...');\r\n }\r\n\r\n hideSpinner(): void {\r\n this.spinnerService.hideSpinner();\r\n }\r\n}\r\n","\r\n\r\n","/// \r\n\r\nimport { bootstrapApplication } from '@angular/platform-browser';\r\nimport { appConfig } from './app/app.config';\r\nimport { AppComponent } from './app/app.component';\r\n\r\nbootstrapApplication(AppComponent, appConfig)\r\n .catch((err) => console.error(err));\r\n"],"mappings":"kxDAkCA,IAAaA,IAAe,IAAA,CAAtB,MAAOA,CAAe,CAOhBC,eACAC,YACAC,YACAC,OATVC,YAAcC,EACdC,UACAC,UACAC,KAAO,GAEPC,YACUT,EACAC,EACAC,EACAC,EAAc,CAHd,KAAAH,eAAAA,EACA,KAAAC,YAAAA,EACA,KAAAC,YAAAA,EACA,KAAAC,OAAAA,EAEJ,KAAKF,YAAYS,aACf,KAAKT,YAAYU,eAAiBC,GAAMC,WAC1C,KAAKV,OAAOW,cACV,IAAIC,GAAwBC,OAAOC,QAAQC,IAAI,IAAIH,GAAwBC,OAAOC,QAAQE,QAAQ,EAAE,EAGt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,CAEAV,QAAM,CACJW,GAAU,KAAKnB,UAAYoB,GAAW,CACpCL,QAAQC,IAAI,qBAAsBI,CAAO,EACzC,KAAKvB,mBAAmBwB,KAAKD,EAAQE,aAAcC,IAAK,CAC1D,CAAC,CACH,CAEAC,aAAW,CACT,KAAK1B,eAAe0B,YAAY,YAAY,CAC9C,CAEAC,aAAW,CACT,KAAK3B,eAAe2B,YAAW,CACjC,4CA/CW9B,GAAY+B,EAAAC,EAAA,EAAAD,EAAAE,EAAA,EAAAF,EAAAG,EAAA,EAAAH,EAAAI,EAAA,CAAA,CAAA,2BAAZnC,EAAYoC,UAAA,CAAA,CAAA,UAAA,CAAA,EAAAC,WAAA,GAAAC,SAAA,CAAAC,EAAA,EAAAC,MAAA,EAAAC,KAAA,EAAAC,SAAA,SAAAC,EAAAC,EAAA,CAAAD,EAAA,GChBzBE,EAAA,EAAA,eAAA,iBDWYC,EAAY,CAAA,CAAA,SAKX9C,CAAY,GAAA,EEVzB+C,GAAqBC,GAAcC,EAAS,EACzCC,MAAOC,GAAQC,QAAQC,MAAMF,CAAG,CAAC","names":["SignInComponent","activatedRoute","authService","formBuilder","router","routerUtils","ROUTER_UTILS","loginForm","returnUrl","show","constructor","isLoggedIn","userRoleValue","Roles","superAdmin","navigateByUrl","MANAGEMENT_ROUTER_UTILS","config","version","root","versions","home","snapshot","queryParamMap","get","group","email","Validators","required","password","ngOnInit","onClickSignIn","data","signIn","showPassword","ɵɵdirectiveInject","ActivatedRoute","AuthService","UntypedFormBuilder","Router","selectors","standalone","features","ɵɵStandaloneFeature","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵelement","ɵɵlistener","value","ɵɵadvance","ɵɵproperty","ɵɵtextInterpolate1","ɵɵpropertyInterpolate2","auth","forgotPassword","valid","trialCreation","CommonModule","FormsModule","ɵNgNoValidate","DefaultValueAccessor","NgControlStatus","NgControlStatusGroup","ReactiveFormsModule","FormGroupDirective","FormControlName","RouterModule","RouterLink","MatFormFieldModule","MatFormField","MatLabel","MatSuffix","MatInputModule","MatInput","MatIconModule","MatIcon","SignUpComponent","constructor","ngOnInit","selectors","decls","vars","template","rf","ctx","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","_c0","CdkStep_ng_template_0_Template","rf","ctx","ɵɵprojection","CdkStepHeader","_CdkStepHeader","_elementRef","ɵt","ɵɵdirectiveInject","ElementRef","ɵɵdefineDirective","CdkStepLabel","_CdkStepLabel","template","TemplateRef","nextId","STEP_STATE","STEPPER_GLOBAL_OPTIONS","InjectionToken","CdkStep","_CdkStep","value","_stepper","stepperOptions","EventEmitter","ɵt","ɵɵdirectiveInject","forwardRef","CdkStepper","ɵɵdefineComponent","rf","ctx","dirIndex","ɵɵcontentQuery","CdkStepLabel","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵviewQuery","TemplateRef","booleanAttribute","ɵɵInputTransformsFeature","ɵɵNgOnChangesFeature","ɵɵStandaloneFeature","_c0","ɵɵprojectionDef","ɵɵtemplate","CdkStep_ng_template_0_Template","_CdkStepper","index","step","_dir","_changeDetectorRef","_elementRef","Subject","QueryList","nextId","startWith","takeUntil","steps","headers","a","b","FocusKeyManager","of","direction","i","position","state","isCurrentStep","newIndex","stepsArray","event","hasModifier","hasModifierKey","keyCode","manager","control","stepperElement","focusedElement","_getFocusedElementPierceShadowDom","Directionality","ChangeDetectorRef","ElementRef","ɵɵdefineDirective","CdkStepHeader","numberAttribute","CdkStepperModule","_CdkStepperModule","ɵt","ɵɵdefineNgModule","ɵɵdefineInjector","BidiModule","MatStepHeader_Conditional_3_Template","rf","ctx","ɵɵelementContainer","ctx_r0","ɵɵnextContext","ɵɵproperty","MatStepHeader_Conditional_4_Case_0_Template","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate","MatStepHeader_Conditional_4_Case_1_Conditional_0_Template","MatStepHeader_Conditional_4_Case_1_Conditional_1_Template","MatStepHeader_Conditional_4_Case_1_Template","ɵɵtemplate","ɵɵconditional","MatStepHeader_Conditional_4_Template","tmp_1_0","MatStepHeader_Conditional_6_Template","MatStepHeader_Conditional_7_Template","MatStepHeader_Conditional_8_Template","MatStepHeader_Conditional_9_Template","_c0","MatStep_ng_template_0_ng_template_1_Template","MatStep_ng_template_0_Template","ɵɵprojection","_c1","a0","a1","_c2","_c3","MatStepper_Conditional_0_Template","MatStepper_Case_1_For_3_Conditional_1_Template","ɵɵelement","MatStepper_Case_1_For_3_Template","step_r1","ɵ$index_8_r2","ɵ$count_8_r3","stepTemplate_r4","ɵɵreference","ɵɵpureFunction2","MatStepper_Case_1_For_6_Template","_r5","ɵɵgetCurrentView","ɵɵlistener","$event","ɵɵrestoreView","ctx_r5","ɵɵresetView","step_r7","ɵ$index_16_r8","ɵɵclassProp","ɵɵpureFunction1","ɵɵattribute","MatStepper_Case_1_Template","ɵɵrepeaterCreate","ɵɵrepeaterTrackByIdentity","ɵɵrepeater","MatStepper_Case_2_For_1_Template","_r9","step_r10","ɵ$index_22_r11","ɵ$count_22_r12","MatStepper_Case_2_Template","MatStepper_ng_template_3_Template","_r13","step_r14","i_r15","MatStepLabel","_MatStepLabel","CdkStepLabel","ɵMatStepLabel_BaseFactory","ɵt","ɵɵgetInheritedFactory","ɵɵdefineDirective","ɵɵInheritDefinitionFeature","MatStepperIntl","_MatStepperIntl","Subject","ɵɵdefineInjectable","MAT_STEPPER_INTL_PROVIDER_FACTORY","parentIntl","MAT_STEPPER_INTL_PROVIDER","Optional","SkipSelf","MatStepHeader","_MatStepHeader","CdkStepHeader","_intl","_focusMonitor","_elementRef","changeDetectorRef","origin","options","state","ɵɵdirectiveInject","FocusMonitor","ElementRef","ChangeDetectorRef","ɵɵdefineComponent","ɵɵclassMap","ɵɵStandaloneFeature","tmp_8_0","ɵɵclassMapInterpolate1","MatRipple","NgTemplateOutlet","MatIcon","DEFAULT_HORIZONTAL_ANIMATION_DURATION","DEFAULT_VERTICAL_ANIMATION_DURATION","matStepperAnimations","trigger","style","transition","group","animate","query","animateChild","MatStepperIcon","_MatStepperIcon","templateRef","TemplateRef","MatStepContent","_MatStepContent","_template","MatStep","_MatStep","CdkStep","stepper","_errorStateMatcher","_viewContainerRef","stepperOptions","Subscription","switchMap","map","event","startWith","isSelected","TemplatePortal","control","form","originalErrorState","customErrorState","forwardRef","MatStepper","ErrorStateMatcher","ViewContainerRef","STEPPER_GLOBAL_OPTIONS","dirIndex","ɵɵcontentQuery","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵProvidersFeature","ɵɵprojectionDef","CdkPortalOutlet","_MatStepper","CdkStepper","value","dir","elementRef","QueryList","EventEmitter","inject","Platform","nodeName","name","takeUntil","distinctUntilChanged","x","y","index","step","Directionality","ɵɵviewQuery","ɵɵtemplateRefExtractor","tmp_2_0","MatStepperModule","_MatStepperModule","ɵt","ɵɵdefineNgModule","ɵɵdefineInjector","MAT_STEPPER_INTL_PROVIDER","ErrorStateMatcher","MatCommonModule","CommonModule","PortalModule","CdkStepperModule","MatIconModule","MatRippleModule","MatStepper","MatStepHeader","NGX_MASK_CONFIG","InjectionToken","NEW_CONFIG","INITIAL_CONFIG","initialConfig","value","EventEmitter","timeMasks","withoutValidation","NgxMaskApplierService","_NgxMaskApplierService","inject","str","thousandSeparatorChar","decimalChars","precision","x","decimalChar","regExp","v","decimals","res","separatorLimit","rgx","sanitizedStr","maskExpression","inputValue","substr","decimalMarker","marker","dm","precisionRegEx","precisionMatch","precisionMatchLength","diff","maskAndPattern","mask","customPattern","position","justPasted","backspaced","cb","cursor","result","multi","backspaceShift","shift","stepBack","inputArray","valuesIP","arr","i","base","inputValueAfterZero","positionOfZeroOrDecimalMarker","zeroIndexNumberZero","zeroIndexMinus","zeroIndexThousand","firstIndexDecimalMarker","firstIndexNumberZero","secondIndexDecimalMarker","thousandSeparatorCharEscaped","invalidChars","invalidCharRegexp","strForSep","commaShift","shiftStep","_shift","inputSymbol","symbolStarInPattern","daysCount","inputValueCursor","inputValueCursorPlusOne","inputValueCursorPlusTwo","inputValueCursorMinusOne","inputValueCursorMinusTwo","inputValueSliceMinusThreeMinusOne","inputValueSliceMinusOnePlusOne","inputValueSliceCursorPlusTwo","inputValueSliceMinusTwoCursor","maskStartWithMonth","startWithMonthInput","withoutDays","specialChart","day1monthInput","day2monthInput","day2monthInputDot","day1monthPaste","day2monthPaste","newPosition","actualShift","onlySpecial","char","isSpecialCharacterMaskFirstSymbol","val","maskSymbol","idx","isDecimalMarker","inputLength","comparedValue","excludedValue","index","decimalIndex","emptyOrMinus","parsedValue","integerPart","decimalPart","integerString","decimal","inputString","ɵt","ɵɵdefineInjectable","NgxMaskService","_NgxMaskService","_","ElementRef","DOCUMENT","Renderer2","getSymbol","newInputValue","actualResult","item","resLen","prefNmask","countSkipedSymbol","regex","match","formElement","curr","compare","symbol","maskChar","symbolToReplace","currSymbol","replaceSymbol","inputVal","name","cpf","cnpj","document","shadowRootEl","num","specialCharactersForRemove","specialCharacters","markers","separatorPrecision","separatorValue","key","patternString","pattern","maskExpretion","matcher","separatorExpression","maskExp","accum","currVal","repeatNumber","replaceWith","symbols","ɵNgxMaskService_BaseFactory","ɵɵgetInheritedFactory","_configFactory","initConfig","configValue","__spreadValues","provideNgxMask","provideEnvironmentNgxMask","makeEnvironmentProviders","NgxMaskDirective","_NgxMaskDirective","changes","patterns","prefix","suffix","thousandSeparator","dropSpecialCharacters","hiddenInput","showMaskTyped","placeHolderCharacter","shownMaskExpression","showTemplate","clearIfNotMatch","validation","allowNegativeNumbers","leadZeroDateTime","leadZero","triggerOnMaskChange","apm","inputTransformFn","outputTransformFn","keepCharacterPositions","a","b","c","counterOfOpt","opt","array","length","lastIndexArray","special","el","transformedValue","prefixLength","checkSymbols","checkSpecialCharacter","selectRangeBackspace","selStart","selEnd","part1","part2","caretShift","_backspaceShift","specialChartMinusOne","specialChartPlusOne","positionToApply","posStart","posEnd","nextValue","cursorStart","controlValue","__async","localeDecimalMarker","fn","isDisabled","rowMaskLen","actualValue","test","expression","check","character","indexMask","removeSpecialCharacters","ch","ɵɵdefineDirective","rf","ctx","ɵɵlistener","$event","ɵɵProvidersFeature","NG_VALUE_ACCESSOR","NG_VALIDATORS","ɵɵNgOnChangesFeature","ɵɵtext","ɵɵelementStart","ɵɵelementEnd","TrialCreationComponent","activatedRoute","authService","formBuilder","messageService","router","dialog","routerUtils","ROUTER_UTILS","creationFirstFormGroup","creationSecondFormGroup","returnUrl","show","myStepper","trialCreationFirstResult","constructor","snapshot","queryParamMap","get","config","home","root","versions","group","firstName","Validators","required","lastName","email","phoneNumber","password","confirmPassword","userName","validators","checkPasswords","code","ngOnInit","onClickTrialCreationFirst","data","markFormGroupTouched","invalid","trialCreationFirst","subscribe","success","goToStep","index","errors","length","error","errorText","httpErrorResponseUtil","onClickTrialCreationSecond","uniqueId","trialCreationSecond","message","navigateByUrl","auth","signIn","showPassword","pass","value","confirmPass","setErrors","notSame","selectedIndex","openUserAgreementDialog","open","GeneralUserAgreementDialogComponent","maxHeight","width","ɵɵdirectiveInject","ActivatedRoute","AuthService","UntypedFormBuilder","MessageService","Router","MatDialog","selectors","viewQuery","rf","ctx","ɵɵtemplate","TrialCreationComponent_ng_template_9_Template","ɵɵelement","ɵɵlistener","i0","ɵɵrestoreView","_r1","ɵɵresetView","TrialCreationComponent_mat_error_57_Template","TrialCreationComponent_ng_template_74_Template","ɵɵadvance","ɵɵproperty","ɵɵtextInterpolate1","hasError","ɵɵpropertyInterpolate2","CommonModule","NgIf","FormsModule","ɵNgNoValidate","DefaultValueAccessor","NgControlStatus","NgControlStatusGroup","ReactiveFormsModule","FormGroupDirective","FormControlName","RouterModule","RouterLink","MatFormFieldModule","MatFormField","MatLabel","MatError","MatSuffix","MatInputModule","MatInput","MatIconModule","MatIcon","NgxMaskDirective","MatStepperModule","MatStep","MatStepLabel","MatStepper","SharedModule","styles","routes","path","component","SiteBaseComponent","SignInComponent","SignUpComponent","TrialCreationComponent","ERR_SW_NOT_SUPPORTED","errorObservable","message","defer","throwError","NgswCommChannel","serviceWorker","controllerChanges","fromEvent","map","currentController","of","controllerWithChanges","concat","filter","c","switchMap","events","event","publish","action","payload","take","tap","sw","__spreadValues","type","operationNonce","waitForOperationCompleted","postMessage","result","filterFn","nonce","SwPush","_SwPush","Subject","NEVER","registration","workerDrivenSubscriptions","pm","merge","options","pushOptions","key","applicationServerKey","i","sub","doUnsubscribe","success","input","ɵt","ɵɵinject","ɵɵdefineInjectable","SwUpdate","_SwUpdate","SCRIPT","InjectionToken","ngswAppInitializer","injector","script","platformId","isPlatformBrowser","ngZone","NgZone","appRef","ApplicationRef","onControllerChange","readyToRegister$","strategy","args","delayWithTimeout","whenStable","err","timeout","delay","stable","ngswCommChannelFactory","opts","SwRegistrationOptions","provideServiceWorker","makeEnvironmentProviders","PLATFORM_ID","APP_INITIALIZER","Injector","AuthGuard","authService","router","constructor","canActivate","next","state","isLoggedIn","navigateByUrl","ROUTER_UTILS","config","auth","root","signIn","ɵɵinject","AuthService","Router","factory","ɵfac","providedIn","JwtInterceptor","authService","constructor","intercept","request","next","isLoggedIn","token","getItem","StorageItem","Auth","isApiUrl","url","startsWith","environment","apiUrl","clone","setHeaders","Authorization","Accept","signOut","handle","ɵɵinject","AuthService","factory","ɵfac","ServerErrorInterceptor","authService","router","constructor","intercept","request","next","handle","pipe","tap","error","includes","status","signOut","navigateByUrl","ROUTER_UTILS","config","auth","root","signIn","throwError","ɵɵinject","AuthService","Router","factory","ɵfac","invalidTimingValue","exp","RuntimeError","negativeStepValue","negativeDelayValue","invalidStyleParams","varName","invalidParamValue","invalidNodeType","nodeType","invalidCssUnitValue","userProvidedProperty","value","invalidTrigger","invalidDefinition","invalidState","metadataName","missingSubs","invalidStyleValue","invalidParallelAnimation","prop","firstStart","firstEnd","secondStart","secondEnd","RuntimeError","invalidKeyframes","invalidOffset","keyframeOffsetsOutOfOrder","keyframesMissingOffsets","invalidStagger","invalidQuery","selector","invalidExpression","expr","invalidTransitionAlias","alias","triggerBuildFailed","name","errors","RuntimeError","animationFailed","registerFailed","missingOrDestroyedAnimation","createAnimationFailed","missingPlayer","id","missingTrigger","phase","missingEvent","unsupportedTriggerEvent","unregisteredTrigger","triggerTransitionsFailed","transitionFailed","name","errors","RuntimeError","optimizeGroupPlayer","players","NoopAnimationPlayer","AnimationGroupPlayer","normalizeKeyframes$1","normalizer","keyframes","preStyles","postStyles","errors","normalizedKeyframes","previousOffset","previousKeyframe","kf","offset","isSameOffset","normalizedKeyframe","val","prop","normalizedProp","normalizedValue","ɵPRE_STYLE","AUTO_STYLE","animationFailed","listenOnPlayer","player","eventName","event","callback","copyAnimationEvent","e","phaseName","totalTime","disabled","makeAnimationEvent","data","element","triggerName","fromState","toState","getOrSetDefaultValue","map","key","defaultValue","value","parseTimelineCommand","command","separatorPos","id","action","documentElement","getParentElement","parent","containsVendorPrefix","_CACHED_BODY","_IS_WEBKIT","validateStyleProperty","getBodyNode","result","getBodyNode","containsElement","elm1","elm2","getParentElement","invokeQuery","element","selector","multi","elem","NoopAnimationDriver","_NoopAnimationDriver","prop","validateStyleProperty","elm1","elm2","containsElement","element","getParentElement","selector","multi","invokeQuery","defaultValue","keyframes","duration","delay","easing","previousPlayers","scrubberAccessRequested","NoopAnimationPlayer","ɵt","ɵɵdefineInjectable","_AnimationDriver","AnimationDriver","AnimationStyleNormalizer","ONE_SECOND","SUBSTITUTION_EXPR_START","SUBSTITUTION_EXPR_END","ENTER_CLASSNAME","LEAVE_CLASSNAME","NG_TRIGGER_CLASSNAME","NG_TRIGGER_SELECTOR","NG_ANIMATING_CLASSNAME","NG_ANIMATING_SELECTOR","resolveTimingValue","value","matches","_convertTimeValueToMS","unit","resolveTiming","timings","errors","allowNegativeValues","parseTimeExpression","exp","regex","duration","delay","easing","invalidTimingValue","delayMatch","easingVal","containsErrors","startIndex","negativeStepValue","negativeDelayValue","normalizeKeyframes","keyframes","kf","setStyles","element","styles","formerStyles","val","prop","camelProp","dashCaseToCamelCase","eraseStyles","_","normalizeAnimationEntry","steps","sequence","validateStyleParams","value","options","errors","params","matches","extractStyleParams","varName","invalidStyleParams","PARAM_REGEX","SUBSTITUTION_EXPR_START","SUBSTITUTION_EXPR_END","match","interpolateParams","original","str","localVal","invalidParamValue","DASH_CASE_REGEXP","input","m","allowPreviousPlayerStylesMerge","duration","delay","balancePreviousStylesIntoKeyframes","element","keyframes","previousStyles","startingKeyframe","missingStyleProps","val","prop","i","kf","computeStyle","visitDslNode","visitor","node","context","AnimationMetadataType","invalidNodeType","DIMENSIONAL_PROP_SET","WebAnimationsStyleNormalizer","AnimationStyleNormalizer","propertyName","errors","dashCaseToCamelCase","userProvidedProperty","normalizedProperty","value","unit","strVal","valAndSuffixMatch","invalidCssUnitValue","ANY_STATE","parseTransitionExpr","transitionValue","errors","expressions","str","parseInnerTransitionStr","eventStr","result","parseAnimationAlias","match","invalidExpression","fromState","separator","toState","makeLambdaFromStates","isFullAnyStateExpr","alias","invalidTransitionAlias","TRUE_BOOLEAN_VALUES","FALSE_BOOLEAN_VALUES","lhs","rhs","LHS_MATCH_BOOLEAN","RHS_MATCH_BOOLEAN","lhsMatch","rhsMatch","SELF_TOKEN","SELF_TOKEN_REGEX","buildAnimationAst","driver","metadata","warnings","AnimationAstBuilderVisitor","ROOT_SELECTOR","_driver","context","AnimationAstBuilderContext","visitDslNode","normalizeAnimationEntry","queryCount","depCount","states","transitions","invalidTrigger","def","AnimationMetadataType","stateDef","name","n","transition","invalidDefinition","styleAst","astParams","missingSubs","params","style","value","extractStyleParams","sub","invalidState","animation","matchers","normalizeAnimationOptions","s","currentTime","furthestTime","steps","step","innerAst","timingAst","constructTimingAst","styleMetadata","isEmpty","newStyleData","_styleAst","ast","styles","metadataStyles","styleTuple","AUTO_STYLE","invalidStyleValue","containsDynamicStyles","collectedEasing","styleData","SUBSTITUTION_EXPR_START","timings","endTime","startTime","tuple","prop","collectedStyles","collectedEntry","updateCollectedStyle","invalidParallelAnimation","validateStyleParams","invalidKeyframes","MAX_KEYFRAME_OFFSET","totalKeyframesWithOffsets","offsets","offsetsOutOfOrder","keyframesOutOfRange","previousOffset","keyframes","offsetVal","consumeOffset","offset","invalidOffset","keyframeOffsetsOutOfOrder","length","generatedOffset","keyframesMissingOffsets","limit","currentAnimateTimings","animateDuration","kf","i","durationUpToThisFrame","parentSelector","options","selector","includeSelf","normalizeSelector","getOrSetDefaultValue","invalidStagger","resolveTiming","hasAmpersand","token","NG_TRIGGER_SELECTOR","NG_ANIMATING_SELECTOR","normalizeParams","obj","__spreadValues","duration","makeTimingAst","strValue","v","delay","easing","createTimelineInstruction","element","preStyleProps","postStyleProps","subTimeline","ElementInstructionMap","instructions","existingInstructions","ONE_FRAME_IN_MILLISECONDS","ENTER_TOKEN","ENTER_TOKEN_REGEX","LEAVE_TOKEN","LEAVE_TOKEN_REGEX","buildAnimationTimelines","rootElement","enterClassName","leaveClassName","startingStyles","finalStyles","subInstructions","AnimationTimelineBuilderVisitor","AnimationTimelineContext","resolveTimingValue","timelines","timeline","lastRootTimeline","elementInstructions","innerContext","animationsRefsOptions","animationRefOptions","animationDelay","animationDelayValue","interpolateParams","instruction","instructionTimings","subContextCount","ctx","DEFAULT_NOOP_PREVIOUS_NODE","innerTimelines","timingValue","innerTimeline","elms","sameElementTimeline","parentContext","tl","maxTime","startingTime","_AnimationTimelineContext","_enterClassName","_leaveClassName","initialTimeline","TimelineBuilder","skipIfExists","newOptions","optionsToUpdate","newParams","paramsToUpdate","oldParams","newTime","target","updatedTimings","builder","SubTimelineBuilder","time","originalSelector","optional","results","multi","elements","invalidQuery","_TimelineBuilder","_elementTimelineStylesLookup","hasPreStyleStep","input","flattenStyles","val","properties","details1","details0","finalKeyframes","keyframe","finalKeyframe","ɵPRE_STYLE","preProps","postProps","kf0","kf1","_stretchStartingKeyframe","newKeyframes","totalTime","startingGap","newFirstKeyframe","oldFirstKeyframe","roundOffset","oldOffset","timeAtKeyframe","decimalPoints","mult","allStyles","allProperties","createTransitionInstruction","triggerName","isRemovalTransition","fromStyles","toStyles","queriedElements","EMPTY_OBJECT","AnimationTransitionFactory","_triggerName","_stateStyles","currentState","nextState","oneOrMoreTransitionsMatch","stateName","styler","currentOptions","nextOptions","skipAstBuild","transitionAnimationParams","currentAnimationParams","currentStateStyles","nextAnimationParams","nextStateStyles","preStyleMap","postStyleMap","isRemoval","animationOptions","applyParamDefaults","elm","oneOrMoreTransitionsMatch","matchFns","currentState","nextState","element","params","fn","applyParamDefaults","userParams","defaults","result","__spreadValues","key","value","AnimationStateStyles","styles","defaultParams","normalizer","errors","finalStyles","combinedParams","val","prop","interpolateParams","normalizedProp","buildTrigger","name","ast","AnimationTrigger","_normalizer","balanceProperties","AnimationTransitionFactory","createFallbackTransition","f","triggerName","states","matchers","fromState","toState","animation","AnimationMetadataType","transition","stateMap","key1","key2","EMPTY_INSTRUCTION_MAP","ElementInstructionMap","TimelineAnimationEngine","bodyNode","_driver","id","metadata","warnings","buildAnimationAst","registerFailed","i","preStyles","postStyles","keyframes","normalizeKeyframes$1","options","instructions","autoStylesMap","buildAnimationTimelines","ENTER_CLASSNAME","LEAVE_CLASSNAME","inst","getOrSetDefaultValue","missingOrDestroyedAnimation","createAnimationFailed","_","AUTO_STYLE","players","player","optimizeGroupPlayer","index","missingPlayer","eventName","callback","baseEvent","makeAnimationEvent","listenOnPlayer","command","args","QUEUED_CLASSNAME","QUEUED_SELECTOR","DISABLED_CLASSNAME","DISABLED_SELECTOR","STAR_CLASSNAME","STAR_SELECTOR","EMPTY_PLAYER_ARRAY","NULL_REMOVAL_STATE","NULL_REMOVED_QUERIED_STATE","REMOVAL_FLAG","StateValue","input","namespaceId","isObj","normalizeTriggerValue","_a","__objRest","newParams","oldParams","VOID_VALUE","DEFAULT_STATE_VALUE","AnimationTransitionNamespace","hostElement","_engine","addClass","phase","missingTrigger","missingEvent","isTriggerEventValid","unsupportedTriggerEvent","listeners","data","triggersWithStates","NG_TRIGGER_CLASSNAME","trigger","unregisteredTrigger","defaultToFallback","TransitionAnimationPlayer","objEquals","fromStyles","toStyles","eraseStyles","setStyles","playersOnElement","isFallbackTransition","removeClass","entry","elementPlayers","rootElement","context","elements","NG_TRIGGER_SELECTOR","elm","namespaces","ns","destroyAfterComplete","triggerStates","previousTriggersValues","state","elementStates","visitedTriggers","listener","engine","containsPotentialParentTransition","currentPlayers","parent","removalFlag","microtaskId","a","b","d0","d1","p","TransitionAnimationEngine","driver","namespaceList","namespacesByHostElement","found","ancestor","ancestorNs","stateValue","isElementNode","insertBefore","details","hostNS","hasAnimation","subTimelines","enterClassName","leaveClassName","skipBuildAst","containerElement","NG_ANIMATING_SELECTOR","resolve","node","cleanupFns","quietFns","triggerTransitionsFailed","skippedPlayers","skippedPlayersMap","queuedInstructions","queriedElements","allPreStyleElements","allPostStyleElements","disabledElementsSet","nodesThatAreDisabled","allTriggerElements","enterNodeMap","buildRootMap","enterNodeMapIds","nodes","root","className","allLeaveNodes","mergedLeaveNodes","leaveNodesWithoutAnimations","leaveNodeMapIds","leaveNodeMap","allPlayers","erroneousTransitions","previousValue","nodeIsOrphaned","instruction","timelines","tl","tuple","stringMap","setVal","transitionFailed","allPreviousPlayersMap","animationElementMap","prevPlayer","replaceNodes","replacePostStylesAsPre","postStylesMap","cloakAndComputeStyles","preStylesMap","ɵPRE_STYLE","post","pre","rootPlayers","subPlayers","NO_PARENT_ANIMATION_ELEMENT_DETECTED","parentWithAnimation","parentsToAdd","detectedParent","innerPlayer","parentPlayers","playersForElement","queriedPlayerResults","queriedInnerElements","j","queriedPlayers","activePlayers","removeNodesAfterAnimationDone","isQueriedElement","toStateValue","queriedElementPlayers","isRemovalAnimation","targetNameSpaceId","targetTriggerName","timelineInstruction","realPlayer","allQueriedPlayers","allConsumedElements","allSubElements","allNewPlayers","NoopAnimationPlayer","previousPlayers","flattenGroupPlayers","pp","wrappedPlayer","deleteOrUnsetInMap","NG_ANIMATING_CLASSNAME","callbacks","totalTime","phaseName","map","currentValues","cloakElement","oldValue","valuesMap","elementPropsMap","defaultStyle","cloakVals","failedElements","props","roots","rootMap","NULL_NODE","nodeSet","localRootMap","getRoot","finalPlayers","_flattenGroupPlayersRecur","AnimationGroupPlayer","k1","k2","postEntry","preEntry","AnimationEngine","doc","componentId","cacheKey","triggerBuildFailed","disable","property","action","parseTimelineCommand","eventPhase","cb","packageNonAnimatableStyles","startStyles","endStyles","filterNonAnimatableStyles","SpecialCasedStyles","_SpecialCasedStyles","_element","_startStyles","_endStyles","initialStyles","isNonAnimatableStyle","WebAnimationsPlayer","_specialStyles","onFinish","kfs","frame","computeStyle","methods","WebAnimationsDriver","elm1","elm2","containsElement","getParentElement","selector","multi","invokeQuery","defaultValue","duration","delay","easing","fill","playerOptions","previousStyles","previousWebAnimationPlayers","allowPreviousPlayerStylesMerge","_keyframes","normalizeKeyframes","balancePreviousStylesIntoKeyframes","specialStyles","ANIMATION_PREFIX","DISABLE_ANIMATIONS_FLAG","BaseAnimationRenderer","namespaceId","delegate","engine","_onDestroy","node","name","namespace","value","parent","newChild","refChild","isMove","oldChild","isHostElement","selectorOrNode","preserveContent","el","style","flags","target","eventName","callback","element","AnimationRenderer","factory","onDestroy","resolveElementFromTarget","phase","parseTriggerCallbackName","event","countId","triggerName","dotIndex","trigger","AnimationRendererFactory","_zone","parentNode","hostElement","type","EMPTY_NAMESPACE_ID","cache","renderer","onRendererDestroy","componentId","registerTrigger","count","fn","data","animationCallbacksBuffer","tuple","InjectableAnimationEngine","_InjectableAnimationEngine","AnimationEngine","doc","driver","normalizer","ɵt","ɵɵinject","DOCUMENT","AnimationDriver","AnimationStyleNormalizer","ɵɵdefineInjectable","instantiateDefaultStyleNormalizer","WebAnimationsStyleNormalizer","instantiateRendererFactory","renderer","engine","zone","AnimationRendererFactory","SHARED_ANIMATION_PROVIDERS","RendererFactory2","DomRendererFactory2","NgZone","BROWSER_ANIMATIONS_PROVIDERS","WebAnimationsDriver","ANIMATION_MODULE_TYPE","BROWSER_NOOP_ANIMATIONS_PROVIDERS","NoopAnimationDriver","BrowserAnimationsModule","_BrowserAnimationsModule","config","ɵɵdefineNgModule","ɵɵdefineInjector","BrowserModule","provideAnimations","performanceMarkFeature","full","content","path","ROUTER_UTILS","config","site","root","loadChildren","then","m","SiteModule","home","HomeModule","dashboard","DashboardModule","products","ProductModule","sales","SaleModule","returns","ReturnModule","autoPricing","AutoPricingModule","integrations","AccountingModule","MarketPlaceModule","accounting","firm","CompanyModule","batchOperations","BatchOperationModule","values","ValuesModule","tracking","TrackingModule","settings","SettingModule","user","UserModule","retailSale","RetailSaleModule","MANAGEMENT_ROUTER_UTILS","customers","CustomerModule","users","roles","RoleModule","version","VersionModule","storeSettings","StoreSettingModule","UserAgreementComponent","ngOnInit","selectors","standalone","features","ɵɵStandaloneFeature","decls","vars","template","rf","ctx","ɵɵelement","SharedModule","GeneralUserAgreementComponent","styles","routes","path","redirectTo","pathMatch","component","SiteBaseComponent","ROUTER_UTILS","config","auth","root","signIn","SignInComponent","trialCreation","TrialCreationComponent","contracts","userAgreement","UserAgreementComponent","ContentComponent","canActivate","AuthGuard","children","content","FullComponent","full","NotFoundComponent","AppRoutingModule","RouterModule","forRoot","anchorScrolling","scrollPositionRestoration","plural","val","tr_default","jwtOptionsFactory","tokenGetter","localStorage","getItem","StorageItem","Auth","registerLocaleData","localeTr","appConfig","providers","provideZoneChangeDetection","eventCoalescing","provideRouter","routes","provide","LOCALE_ID","useValue","provideHttpClient","withInterceptorsFromDi","provideAnimations","provideToastr","provideServiceWorker","enabled","isDevMode","registrationStrategy","provideFirebaseApp","initializeApp","environment","firebase","provideMessaging","getMessaging","provideEnvironmentNgxMask","AuthService","AuthGuard","CurrencyPipe","HTTP_INTERCEPTORS","useClass","ServerErrorInterceptor","multi","JwtInterceptor","importProvidersFrom","BrowserModule","CommonModule","FormsModule","ReactiveFormsModule","BrowserAnimationsModule","AppRoutingModule","SharedModule","JwtModule","forRoot","jwtOptionsProvider","JWT_OPTIONS","useFactory","AppComponent","authService","alertDialogService","spinnerService","router","messaging","inject","Messaging","constructor","isLoggedIn","loadUserRole","ngOnInit","requestPermission","listen","getToken","vapidKey","environment","firebase","then","currentToken","console","log","catch","err","onMessage","payload","info","notification","body","showSpinner","hideSpinner","ɵɵdirectiveInject","AuthService","AlertDialogService","SpinnerService","Router","selectors","standalone","features","ɵɵStandaloneFeature","decls","vars","template","rf","ctx","ɵɵelement","RouterOutlet","bootstrapApplication","AppComponent","appConfig","catch","err","console","error"],"x_google_ignoreList":[4,5,6,10,14,15,21]}