@ethlete/core 1.10.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/esm2022/lib/components/structured-data/structured-data.component.mjs +38 -0
  2. package/esm2022/lib/directives/animatable/animatable.directive.mjs +114 -0
  3. package/esm2022/lib/directives/animated-lifecycle/animated-lifecycle.directive.mjs +113 -0
  4. package/esm2022/lib/directives/animated-lifecycle/index.mjs +2 -0
  5. package/esm2022/lib/directives/animated-overlay/animated-overlay.directive.mjs +181 -0
  6. package/esm2022/lib/directives/animated-overlay/public-api.mjs +2 -0
  7. package/esm2022/lib/directives/click-outside/click-outside.directive.mjs +38 -0
  8. package/esm2022/lib/directives/cursor-drag-scroll/cursor-drag-scroll.directive.mjs +147 -0
  9. package/esm2022/lib/directives/delayable/delayable.directive.mjs +56 -0
  10. package/esm2022/lib/directives/let/let.directive.mjs +41 -0
  11. package/esm2022/lib/directives/observe-content/observe-content.directive.mjs +69 -0
  12. package/esm2022/lib/directives/observe-resize/observe-resize.directive.mjs +69 -0
  13. package/esm2022/lib/directives/observe-scroll-state/observe-scroll-state.directive.mjs +175 -0
  14. package/esm2022/lib/directives/public-api.mjs +16 -0
  15. package/esm2022/lib/directives/repeat/repeat.directive.mjs +37 -0
  16. package/esm2022/lib/directives/scroll-observer-first-element/scroll-observer-first-element.directive.mjs +32 -0
  17. package/esm2022/lib/directives/scroll-observer-ignore-target/scroll-observer-ignore-target.directive.mjs +19 -0
  18. package/esm2022/lib/directives/scroll-observer-last-element/scroll-observer-last-element.directive.mjs +35 -0
  19. package/esm2022/lib/directives/seo/seo.directive.mjs +167 -0
  20. package/esm2022/lib/pipes/normalize-game-result-type/normalize-game-result-type.pipe.mjs +16 -0
  21. package/esm2022/lib/pipes/normalize-match-participants/normalize-match-participants.pipe.mjs +16 -0
  22. package/esm2022/lib/pipes/normalize-match-score/normalize-match-score.pipe.mjs +16 -0
  23. package/esm2022/lib/pipes/normalize-match-state/normalize-match-state.pipe.mjs +16 -0
  24. package/esm2022/lib/pipes/normalize-match-type/normalize-match-type.pipe.mjs +16 -0
  25. package/esm2022/lib/pipes/to-array/to-array.pipe.mjs +16 -0
  26. package/esm2022/lib/services/click-observer.service.mjs +75 -0
  27. package/esm2022/lib/services/content-observer.service.mjs +81 -0
  28. package/esm2022/lib/services/focus-visible.service.mjs +35 -0
  29. package/esm2022/lib/services/public-api.mjs +8 -0
  30. package/esm2022/lib/services/resize-observer.service.mjs +77 -0
  31. package/esm2022/lib/services/router-state.service.mjs +116 -0
  32. package/esm2022/lib/services/viewport.service.mjs +169 -0
  33. package/esm2022/lib/types/angular.types.mjs +15 -0
  34. package/esm2022/lib/utils/destroy.utils.mjs +13 -0
  35. package/esm2022/lib/utils/public-api.mjs +13 -0
  36. package/esm2022/lib/utils/reactive-binding.util.mjs +112 -0
  37. package/esm2022/lib/utils/scrollable.utils.mjs +85 -0
  38. package/{fesm2020 → fesm2022}/ethlete-core.mjs +745 -605
  39. package/fesm2022/ethlete-core.mjs.map +1 -0
  40. package/lib/components/structured-data/structured-data.component.d.ts +1 -1
  41. package/lib/directives/animatable/animatable.directive.d.ts +1 -1
  42. package/lib/directives/animated-lifecycle/index.d.ts +1 -0
  43. package/lib/directives/animated-overlay/animated-overlay.directive.d.ts +62 -0
  44. package/lib/directives/animated-overlay/public-api.d.ts +1 -0
  45. package/lib/directives/cursor-drag-scroll/cursor-drag-scroll.directive.d.ts +1 -1
  46. package/lib/directives/let/let.directive.d.ts +1 -1
  47. package/lib/directives/observe-content/observe-content.directive.d.ts +1 -1
  48. package/lib/directives/observe-resize/observe-resize.directive.d.ts +1 -1
  49. package/lib/directives/observe-scroll-state/observe-scroll-state.directive.d.ts +1 -1
  50. package/lib/directives/public-api.d.ts +1 -0
  51. package/lib/directives/repeat/repeat.directive.d.ts +1 -1
  52. package/lib/directives/scroll-observer-first-element/scroll-observer-first-element.directive.d.ts +1 -1
  53. package/lib/directives/scroll-observer-last-element/scroll-observer-last-element.directive.d.ts +1 -1
  54. package/lib/services/public-api.d.ts +0 -1
  55. package/lib/types/angular.types.d.ts +0 -7
  56. package/lib/utils/destroy.utils.d.ts +1 -0
  57. package/lib/utils/public-api.d.ts +1 -0
  58. package/package.json +14 -19
  59. package/esm2020/lib/components/structured-data/structured-data.component.mjs +0 -37
  60. package/esm2020/lib/directives/animatable/animatable.directive.mjs +0 -115
  61. package/esm2020/lib/directives/animated-lifecycle/animated-lifecycle.directive.mjs +0 -115
  62. package/esm2020/lib/directives/click-outside/click-outside.directive.mjs +0 -37
  63. package/esm2020/lib/directives/cursor-drag-scroll/cursor-drag-scroll.directive.mjs +0 -147
  64. package/esm2020/lib/directives/delayable/delayable.directive.mjs +0 -55
  65. package/esm2020/lib/directives/let/let.directive.mjs +0 -40
  66. package/esm2020/lib/directives/observe-content/observe-content.directive.mjs +0 -68
  67. package/esm2020/lib/directives/observe-resize/observe-resize.directive.mjs +0 -68
  68. package/esm2020/lib/directives/observe-scroll-state/observe-scroll-state.directive.mjs +0 -176
  69. package/esm2020/lib/directives/public-api.mjs +0 -15
  70. package/esm2020/lib/directives/repeat/repeat.directive.mjs +0 -36
  71. package/esm2020/lib/directives/scroll-observer-first-element/scroll-observer-first-element.directive.mjs +0 -31
  72. package/esm2020/lib/directives/scroll-observer-ignore-target/scroll-observer-ignore-target.directive.mjs +0 -18
  73. package/esm2020/lib/directives/scroll-observer-last-element/scroll-observer-last-element.directive.mjs +0 -34
  74. package/esm2020/lib/directives/seo/seo.directive.mjs +0 -166
  75. package/esm2020/lib/pipes/normalize-game-result-type/normalize-game-result-type.pipe.mjs +0 -15
  76. package/esm2020/lib/pipes/normalize-match-participants/normalize-match-participants.pipe.mjs +0 -15
  77. package/esm2020/lib/pipes/normalize-match-score/normalize-match-score.pipe.mjs +0 -15
  78. package/esm2020/lib/pipes/normalize-match-state/normalize-match-state.pipe.mjs +0 -15
  79. package/esm2020/lib/pipes/normalize-match-type/normalize-match-type.pipe.mjs +0 -15
  80. package/esm2020/lib/pipes/to-array/to-array.pipe.mjs +0 -15
  81. package/esm2020/lib/services/click-observer.service.mjs +0 -73
  82. package/esm2020/lib/services/content-observer.service.mjs +0 -79
  83. package/esm2020/lib/services/destroy.service.mjs +0 -23
  84. package/esm2020/lib/services/focus-visible.service.mjs +0 -34
  85. package/esm2020/lib/services/public-api.mjs +0 -9
  86. package/esm2020/lib/services/resize-observer.service.mjs +0 -75
  87. package/esm2020/lib/services/router-state.service.mjs +0 -115
  88. package/esm2020/lib/services/viewport.service.mjs +0 -168
  89. package/esm2020/lib/types/angular.types.mjs +0 -36
  90. package/esm2020/lib/utils/public-api.mjs +0 -12
  91. package/esm2020/lib/utils/reactive-binding.util.mjs +0 -111
  92. package/esm2020/lib/utils/scrollable.utils.mjs +0 -85
  93. package/fesm2015/ethlete-core.mjs +0 -2787
  94. package/fesm2015/ethlete-core.mjs.map +0 -1
  95. package/fesm2020/ethlete-core.mjs.map +0 -1
  96. package/lib/services/destroy.service.d.ts +0 -12
  97. /package/{esm2020 → esm2022}/ethlete-core.mjs +0 -0
  98. /package/{esm2020 → esm2022}/index.mjs +0 -0
  99. /package/{esm2020 → esm2022}/lib/components/public-api.mjs +0 -0
  100. /package/{esm2020 → esm2022}/lib/components/structured-data/public-api.mjs +0 -0
  101. /package/{esm2020 → esm2022}/lib/constants/index.mjs +0 -0
  102. /package/{esm2020 → esm2022}/lib/constants/public-api.mjs +0 -0
  103. /package/{esm2020 → esm2022}/lib/constants/viewport.constants.mjs +0 -0
  104. /package/{esm2020 → esm2022}/lib/decorators/index.mjs +0 -0
  105. /package/{esm2020 → esm2022}/lib/decorators/memo/memo.decorator.mjs +0 -0
  106. /package/{esm2020 → esm2022}/lib/decorators/memo/public-api.mjs +0 -0
  107. /package/{esm2020 → esm2022}/lib/decorators/public-api.mjs +0 -0
  108. /package/{esm2020 → esm2022}/lib/directives/animatable/index.mjs +0 -0
  109. /package/{esm2020 → esm2022}/lib/directives/animatable/public-api.mjs +0 -0
  110. /package/{esm2020 → esm2022}/lib/directives/animated-lifecycle/public-api.mjs +0 -0
  111. /package/{esm2020 → esm2022}/lib/directives/click-outside/public-api.mjs +0 -0
  112. /package/{esm2020 → esm2022}/lib/directives/cursor-drag-scroll/cursor-drag-scroll.constants.mjs +0 -0
  113. /package/{esm2020 → esm2022}/lib/directives/cursor-drag-scroll/public-api.mjs +0 -0
  114. /package/{esm2020 → esm2022}/lib/directives/delayable/public-api.mjs +0 -0
  115. /package/{esm2020 → esm2022}/lib/directives/let/let.types.mjs +0 -0
  116. /package/{esm2020 → esm2022}/lib/directives/let/public-api.mjs +0 -0
  117. /package/{esm2020 → esm2022}/lib/directives/observe-content/public-api.mjs +0 -0
  118. /package/{esm2020 → esm2022}/lib/directives/observe-resize/public-api.mjs +0 -0
  119. /package/{esm2020 → esm2022}/lib/directives/observe-scroll-state/observe-scroll-state.constants.mjs +0 -0
  120. /package/{esm2020 → esm2022}/lib/directives/observe-scroll-state/observe-scroll-state.types.mjs +0 -0
  121. /package/{esm2020 → esm2022}/lib/directives/observe-scroll-state/public-api.mjs +0 -0
  122. /package/{esm2020 → esm2022}/lib/directives/repeat/public-api.mjs +0 -0
  123. /package/{esm2020 → esm2022}/lib/directives/scroll-observer-first-element/index.mjs +0 -0
  124. /package/{esm2020 → esm2022}/lib/directives/scroll-observer-first-element/public-api.mjs +0 -0
  125. /package/{esm2020 → esm2022}/lib/directives/scroll-observer-ignore-target/index.mjs +0 -0
  126. /package/{esm2020 → esm2022}/lib/directives/scroll-observer-ignore-target/public-api.mjs +0 -0
  127. /package/{esm2020 → esm2022}/lib/directives/scroll-observer-last-element/index.mjs +0 -0
  128. /package/{esm2020 → esm2022}/lib/directives/scroll-observer-last-element/public-api.mjs +0 -0
  129. /package/{esm2020 → esm2022}/lib/directives/seo/public-api.mjs +0 -0
  130. /package/{esm2020 → esm2022}/lib/directives/seo/seo.directive.constants.mjs +0 -0
  131. /package/{esm2020 → esm2022}/lib/directives/seo/seo.directive.types.mjs +0 -0
  132. /package/{esm2020 → esm2022}/lib/directives/seo/seo.directive.utils.mjs +0 -0
  133. /package/{esm2020 → esm2022}/lib/pipes/normalize-game-result-type/normalize-game-result-type.types.mjs +0 -0
  134. /package/{esm2020 → esm2022}/lib/pipes/normalize-game-result-type/normalize-game-result-type.util.mjs +0 -0
  135. /package/{esm2020 → esm2022}/lib/pipes/normalize-game-result-type/public-api.mjs +0 -0
  136. /package/{esm2020 → esm2022}/lib/pipes/normalize-match-participants/normalize-match-participants.types.mjs +0 -0
  137. /package/{esm2020 → esm2022}/lib/pipes/normalize-match-participants/normalize-match-participants.util.mjs +0 -0
  138. /package/{esm2020 → esm2022}/lib/pipes/normalize-match-participants/public-api.mjs +0 -0
  139. /package/{esm2020 → esm2022}/lib/pipes/normalize-match-score/normalize-match-score.types.mjs +0 -0
  140. /package/{esm2020 → esm2022}/lib/pipes/normalize-match-score/normalize-match-score.util.mjs +0 -0
  141. /package/{esm2020 → esm2022}/lib/pipes/normalize-match-score/public-api.mjs +0 -0
  142. /package/{esm2020 → esm2022}/lib/pipes/normalize-match-state/index.mjs +0 -0
  143. /package/{esm2020 → esm2022}/lib/pipes/normalize-match-state/normalize-match-state.constants.mjs +0 -0
  144. /package/{esm2020 → esm2022}/lib/pipes/normalize-match-state/normalize-match-state.util.mjs +0 -0
  145. /package/{esm2020 → esm2022}/lib/pipes/normalize-match-state/public-api.mjs +0 -0
  146. /package/{esm2020 → esm2022}/lib/pipes/normalize-match-type/normalize-match-type.util.mjs +0 -0
  147. /package/{esm2020 → esm2022}/lib/pipes/normalize-match-type/public-api.mjs +0 -0
  148. /package/{esm2020 → esm2022}/lib/pipes/public-api.mjs +0 -0
  149. /package/{esm2020 → esm2022}/lib/pipes/to-array/public-api.mjs +0 -0
  150. /package/{esm2020 → esm2022}/lib/pipes/to-array/to-array.util.mjs +0 -0
  151. /package/{esm2020 → esm2022}/lib/public-api.mjs +0 -0
  152. /package/{esm2020 → esm2022}/lib/services/index.mjs +0 -0
  153. /package/{esm2020 → esm2022}/lib/services/viewport.types.mjs +0 -0
  154. /package/{esm2020 → esm2022}/lib/types/i18n.types.mjs +0 -0
  155. /package/{esm2020 → esm2022}/lib/types/index.mjs +0 -0
  156. /package/{esm2020 → esm2022}/lib/types/public-api.mjs +0 -0
  157. /package/{esm2020 → esm2022}/lib/types/viewport.types.mjs +0 -0
  158. /package/{esm2020 → esm2022}/lib/utils/animation.utils.mjs +0 -0
  159. /package/{esm2020 → esm2022}/lib/utils/clamp.util.mjs +0 -0
  160. /package/{esm2020 → esm2022}/lib/utils/clone.util.mjs +0 -0
  161. /package/{esm2020 → esm2022}/lib/utils/cookie.util.mjs +0 -0
  162. /package/{esm2020 → esm2022}/lib/utils/equal.util.mjs +0 -0
  163. /package/{esm2020 → esm2022}/lib/utils/index.mjs +0 -0
  164. /package/{esm2020 → esm2022}/lib/utils/media-query-observable.util.mjs +0 -0
  165. /package/{esm2020 → esm2022}/lib/utils/rxjs.utils.mjs +0 -0
  166. /package/{esm2020 → esm2022}/lib/utils/smart-block-scroll-strategy.utils.mjs +0 -0
  167. /package/{esm2020 → esm2022}/lib/utils/viewport.util.mjs +0 -0
  168. /package/{esm2020 → esm2022}/lib/validators/is-array-not-empty.validator.mjs +0 -0
  169. /package/{esm2020 → esm2022}/lib/validators/is-email.validator.mjs +0 -0
  170. /package/{esm2020 → esm2022}/lib/validators/must-match.validator.mjs +0 -0
  171. /package/{esm2020 → esm2022}/lib/validators/public-api.mjs +0 -0
@@ -1,2787 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, HostBinding, InjectionToken, Injectable, ElementRef, Inject, Optional, isDevMode, Directive, EventEmitter, Output, NgZone, Pipe, QueryList } from '@angular/core';
3
- import { DomSanitizer, Meta, Title } from '@angular/platform-browser';
4
- import { fromEvent, Observable, Subject, combineLatest, startWith, map, takeUntil, distinctUntilChanged, BehaviorSubject, skip, take, tap, filter, pairwise, debounceTime, shareReplay, merge, switchMap } from 'rxjs';
5
- import { coerceElement, coerceCssPixelValue, coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
6
- import { DOCUMENT } from '@angular/common';
7
- import { Router, NavigationEnd } from '@angular/router';
8
- import { supportsScrollBehavior } from '@angular/cdk/platform';
9
- import { __decorate, __metadata } from 'tslib';
10
- import * as i1 from '@angular/cdk/layout';
11
- import { debounceTime as debounceTime$1 } from 'rxjs/operators';
12
-
13
- class StructuredDataComponent {
14
- constructor() {
15
- this._sanitizer = inject(DomSanitizer);
16
- }
17
- set data(currentValue) {
18
- this.jsonLD = this.getSafeHTML(currentValue);
19
- }
20
- getSafeHTML(value) {
21
- const json = value ? JSON.stringify(value, null, 2).replace(/<\/script>/g, '<\\/script>') : '';
22
- const html = `<script type="application/ld+json">${json}</script>`;
23
- return this._sanitizer.bypassSecurityTrustHtml(html);
24
- }
25
- }
26
- StructuredDataComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: StructuredDataComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
27
- StructuredDataComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: StructuredDataComponent, isStandalone: true, selector: "et-structured-data", inputs: { data: "data" }, host: { properties: { "innerHTML": "this.jsonLD" }, styleAttribute: "display: none" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: StructuredDataComponent, decorators: [{
29
- type: Component,
30
- args: [{
31
- selector: 'et-structured-data',
32
- standalone: true,
33
- template: '',
34
- changeDetection: ChangeDetectionStrategy.OnPush,
35
- encapsulation: ViewEncapsulation.None,
36
- host: {
37
- style: 'display: none',
38
- },
39
- }]
40
- }], propDecorators: { data: [{
41
- type: Input
42
- }], jsonLD: [{
43
- type: HostBinding,
44
- args: ['innerHTML']
45
- }] } });
46
-
47
- const VIEWPORT_CONFIG = new InjectionToken('ViewportConfig');
48
- /**
49
- * Default viewport config based on Tailwind CSS.
50
- * @see https://tailwindcss.com/docs/screens
51
- */
52
- const DEFAULT_VIEWPORT_CONFIG = {
53
- breakpoints: {
54
- xs: [0, 639],
55
- sm: [640, 767],
56
- md: [768, 1023],
57
- lg: [1024, 1279],
58
- xl: [1280, 1535],
59
- '2xl': [1536, Infinity],
60
- },
61
- };
62
-
63
- function memoize(func, resolver, cache) {
64
- const memoized = function (...args) {
65
- var _a;
66
- const key = resolver.apply(this, args);
67
- const cache = memoized.cache;
68
- if (cache.has(key)) {
69
- return cache.get(key);
70
- }
71
- const result = func.apply(this, args);
72
- memoized.cache = (_a = cache.set(key, result)) !== null && _a !== void 0 ? _a : cache;
73
- return result;
74
- };
75
- memoized.cache = cache;
76
- return memoized;
77
- }
78
- const defaultResolver = (...args) => args.join('-');
79
- const Memo = (config = {}) => (_, __, descriptor) => {
80
- var _a, _b;
81
- if (typeof descriptor.value !== 'function') {
82
- throw new Error('Memoization can be applied only to methods');
83
- }
84
- const resolver = (_a = config.resolver) !== null && _a !== void 0 ? _a : defaultResolver;
85
- const cache = (_b = config.cache) !== null && _b !== void 0 ? _b : new Map();
86
- descriptor.value = memoize(descriptor.value, resolver, cache);
87
- return descriptor;
88
- };
89
-
90
- /* eslint-disable @typescript-eslint/no-non-null-assertion */
91
- class ClickObserverFactory {
92
- create() {
93
- return fromEvent(document, 'click');
94
- }
95
- }
96
- ClickObserverFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ClickObserverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
97
- ClickObserverFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ClickObserverFactory, providedIn: 'root' });
98
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ClickObserverFactory, decorators: [{
99
- type: Injectable,
100
- args: [{ providedIn: 'root' }]
101
- }] });
102
- class ClickObserverService {
103
- constructor(_clickObserverFactory) {
104
- this._clickObserverFactory = _clickObserverFactory;
105
- this._observedElements = new Map();
106
- }
107
- ngOnDestroy() {
108
- this._observedElements.forEach((_, element) => this._cleanupObserver(element));
109
- }
110
- observe(elementOrRef) {
111
- const element = coerceElement(elementOrRef);
112
- return new Observable((observer) => {
113
- const stream = this._observeElement(element);
114
- const subscription = stream.subscribe(observer);
115
- return () => {
116
- subscription.unsubscribe();
117
- this._unobserveElement(element);
118
- };
119
- });
120
- }
121
- _observeElement(element) {
122
- if (!this._observedElements.has(element)) {
123
- const stream = new Subject();
124
- const observer = this._clickObserverFactory.create();
125
- const sub = observer.subscribe((event) => stream.next(event));
126
- this._observedElements.set(element, { observer: sub, stream, count: 1 });
127
- }
128
- else {
129
- this._observedElements.get(element).count++;
130
- }
131
- return this._observedElements.get(element).stream;
132
- }
133
- _unobserveElement(element) {
134
- if (this._observedElements.has(element)) {
135
- this._observedElements.get(element).count--;
136
- if (!this._observedElements.get(element).count) {
137
- this._cleanupObserver(element);
138
- }
139
- }
140
- }
141
- _cleanupObserver(element) {
142
- if (this._observedElements.has(element)) {
143
- const { observer, stream } = this._observedElements.get(element);
144
- if (observer) {
145
- observer.unsubscribe();
146
- }
147
- stream.complete();
148
- this._observedElements.delete(element);
149
- }
150
- }
151
- }
152
- ClickObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ClickObserverService, deps: [{ token: ClickObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable });
153
- ClickObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ClickObserverService, providedIn: 'root' });
154
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ClickObserverService, decorators: [{
155
- type: Injectable,
156
- args: [{ providedIn: 'root' }]
157
- }], ctorParameters: function () { return [{ type: ClickObserverFactory }]; } });
158
-
159
- /* eslint-disable @typescript-eslint/no-non-null-assertion */
160
- class MutationObserverFactory {
161
- create(callback) {
162
- return typeof MutationObserver === 'undefined' ? null : new MutationObserver(callback);
163
- }
164
- }
165
- MutationObserverFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: MutationObserverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
166
- MutationObserverFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: MutationObserverFactory, providedIn: 'root' });
167
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: MutationObserverFactory, decorators: [{
168
- type: Injectable,
169
- args: [{ providedIn: 'root' }]
170
- }] });
171
- class ContentObserverService {
172
- constructor(_mutationObserverFactory) {
173
- this._mutationObserverFactory = _mutationObserverFactory;
174
- this._observedElements = new Map();
175
- }
176
- ngOnDestroy() {
177
- this._observedElements.forEach((_, element) => this._cleanupObserver(element));
178
- }
179
- observe(elementOrRef) {
180
- const element = coerceElement(elementOrRef);
181
- return new Observable((observer) => {
182
- const stream = this._observeElement(element);
183
- const subscription = stream.subscribe(observer);
184
- return () => {
185
- subscription.unsubscribe();
186
- this._unobserveElement(element);
187
- };
188
- });
189
- }
190
- _observeElement(element) {
191
- if (!this._observedElements.has(element)) {
192
- const stream = new Subject();
193
- const observer = this._mutationObserverFactory.create((mutations) => stream.next(mutations));
194
- if (observer) {
195
- observer.observe(element, {
196
- characterData: true,
197
- childList: true,
198
- subtree: true,
199
- });
200
- }
201
- this._observedElements.set(element, { observer, stream, count: 1 });
202
- }
203
- else {
204
- this._observedElements.get(element).count++;
205
- }
206
- return this._observedElements.get(element).stream;
207
- }
208
- _unobserveElement(element) {
209
- if (this._observedElements.has(element)) {
210
- this._observedElements.get(element).count--;
211
- if (!this._observedElements.get(element).count) {
212
- this._cleanupObserver(element);
213
- }
214
- }
215
- }
216
- _cleanupObserver(element) {
217
- if (this._observedElements.has(element)) {
218
- const { observer, stream } = this._observedElements.get(element);
219
- if (observer) {
220
- observer.disconnect();
221
- }
222
- stream.complete();
223
- this._observedElements.delete(element);
224
- }
225
- }
226
- }
227
- ContentObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ContentObserverService, deps: [{ token: MutationObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable });
228
- ContentObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ContentObserverService, providedIn: 'root' });
229
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ContentObserverService, decorators: [{
230
- type: Injectable,
231
- args: [{ providedIn: 'root' }]
232
- }], ctorParameters: function () { return [{ type: MutationObserverFactory }]; } });
233
-
234
- /**
235
- * @deprecated Will be replaced with the upcoming Angular 16 `DestroyRef` feature.
236
- */
237
- // TODO: Replace with Angular 16 `DestroyRef` feature when available.
238
- class DestroyService {
239
- constructor() {
240
- this._destroy$ = new Subject();
241
- this.destroy$ = this._destroy$.asObservable();
242
- }
243
- ngOnDestroy() {
244
- this._destroy$.next(true);
245
- this._destroy$.unsubscribe();
246
- }
247
- }
248
- DestroyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DestroyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
249
- DestroyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DestroyService });
250
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DestroyService, decorators: [{
251
- type: Injectable
252
- }] });
253
-
254
- class FocusVisibleService {
255
- get isFocusVisible() {
256
- return this._hadKeyboardEvent;
257
- }
258
- constructor() {
259
- this._document = inject(DOCUMENT);
260
- this._hadKeyboardEvent = false;
261
- this._document.addEventListener('keydown', this.onKeyDown.bind(this), true);
262
- this._document.addEventListener('mousedown', this.onPointerDown.bind(this), true);
263
- this._document.addEventListener('pointerdown', this.onPointerDown.bind(this), true);
264
- this._document.addEventListener('touchstart', this.onPointerDown.bind(this), true);
265
- }
266
- onKeyDown(e) {
267
- if (e.metaKey || e.altKey || e.ctrlKey) {
268
- return;
269
- }
270
- this._hadKeyboardEvent = true;
271
- }
272
- onPointerDown() {
273
- this._hadKeyboardEvent = false;
274
- }
275
- }
276
- FocusVisibleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FocusVisibleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
277
- FocusVisibleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FocusVisibleService, providedIn: 'root' });
278
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FocusVisibleService, decorators: [{
279
- type: Injectable,
280
- args: [{
281
- providedIn: 'root',
282
- }]
283
- }], ctorParameters: function () { return []; } });
284
-
285
- /* eslint-disable @typescript-eslint/no-non-null-assertion */
286
- class ResizeObserverFactory {
287
- create(callback) {
288
- return typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(callback);
289
- }
290
- }
291
- ResizeObserverFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ResizeObserverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
292
- ResizeObserverFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ResizeObserverFactory, providedIn: 'root' });
293
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ResizeObserverFactory, decorators: [{
294
- type: Injectable,
295
- args: [{ providedIn: 'root' }]
296
- }] });
297
- class ResizeObserverService {
298
- constructor(_mutationObserverFactory) {
299
- this._mutationObserverFactory = _mutationObserverFactory;
300
- this._observedElements = new Map();
301
- }
302
- ngOnDestroy() {
303
- this._observedElements.forEach((_, element) => this._cleanupObserver(element));
304
- }
305
- observe(elementOrRef) {
306
- const element = coerceElement(elementOrRef);
307
- return new Observable((observer) => {
308
- const stream = this._observeElement(element);
309
- const subscription = stream.subscribe(observer);
310
- return () => {
311
- subscription.unsubscribe();
312
- this._unobserveElement(element);
313
- };
314
- });
315
- }
316
- _observeElement(element) {
317
- if (!this._observedElements.has(element)) {
318
- const stream = new Subject();
319
- const observer = this._mutationObserverFactory.create((resizes) => stream.next(resizes));
320
- if (observer) {
321
- observer.observe(element);
322
- }
323
- this._observedElements.set(element, { observer, stream, count: 1 });
324
- }
325
- else {
326
- this._observedElements.get(element).count++;
327
- }
328
- return this._observedElements.get(element).stream;
329
- }
330
- _unobserveElement(element) {
331
- if (this._observedElements.has(element)) {
332
- this._observedElements.get(element).count--;
333
- if (!this._observedElements.get(element).count) {
334
- this._cleanupObserver(element);
335
- }
336
- }
337
- }
338
- _cleanupObserver(element) {
339
- if (this._observedElements.has(element)) {
340
- const { observer, stream } = this._observedElements.get(element);
341
- if (observer) {
342
- observer.disconnect();
343
- }
344
- stream.complete();
345
- this._observedElements.delete(element);
346
- }
347
- }
348
- }
349
- ResizeObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ResizeObserverService, deps: [{ token: ResizeObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable });
350
- ResizeObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ResizeObserverService, providedIn: 'root' });
351
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ResizeObserverService, decorators: [{
352
- type: Injectable,
353
- args: [{ providedIn: 'root' }]
354
- }], ctorParameters: function () { return [{ type: ResizeObserverFactory }]; } });
355
-
356
- const nextFrame = (cb) => {
357
- requestAnimationFrame(() => {
358
- requestAnimationFrame(cb);
359
- });
360
- };
361
- const fromNextFrame = () => {
362
- return new Observable((observer) => {
363
- nextFrame(() => {
364
- observer.next();
365
- observer.complete();
366
- });
367
- });
368
- };
369
- const forceReflow = (element = document.body) => {
370
- return element.offsetHeight;
371
- };
372
- const createFlipAnimationGroup = (config) => {
373
- const { elements, duration = 250, easing = 'cubic-bezier(0.4, 0, 0.2, 1)' } = config;
374
- const flips = elements.map((el) => {
375
- const element = 'element' in el ? el.element : el;
376
- const originElement = 'originElement' in el ? el.originElement : undefined;
377
- return createFlipAnimation({ element, originElement, duration, easing });
378
- });
379
- const onStart$ = combineLatest(flips.map((animation) => animation.onStart$));
380
- const onFinish$ = combineLatest(flips.map((animation) => animation.onFinish$));
381
- const onCancel$ = combineLatest(flips.map((animation) => animation.onCancel$));
382
- const updateInit = () => {
383
- flips.forEach((animation) => animation.updateInit());
384
- };
385
- const play = () => {
386
- flips.forEach((animation) => animation.play());
387
- };
388
- const cancel = () => {
389
- flips.forEach((animation) => animation.cancel());
390
- };
391
- return {
392
- updateInit,
393
- play,
394
- cancel,
395
- onStart$,
396
- onFinish$,
397
- onCancel$,
398
- };
399
- };
400
- const createFlipAnimation = (config) => {
401
- const { element: el, originElement = el, duration = 250, easing = 'cubic-bezier(0.4, 0, 0.2, 1)' } = config;
402
- let initialRect = originElement.getBoundingClientRect();
403
- let animation = null;
404
- const onStart$ = new Subject();
405
- const onFinish$ = new Subject();
406
- const onCancel$ = new Subject();
407
- const onAnimationFinish = () => {
408
- cleanup();
409
- onFinish$.next();
410
- };
411
- const onAnimationCancel = () => {
412
- cleanup();
413
- onCancel$.next();
414
- };
415
- const cleanup = () => {
416
- if (!animation) {
417
- return;
418
- }
419
- animation.removeEventListener('finish', onAnimationFinish);
420
- animation.removeEventListener('cancel', onAnimationCancel);
421
- };
422
- const updateInit = () => {
423
- initialRect = originElement.getBoundingClientRect();
424
- };
425
- const play = () => {
426
- const lastRect = el.getBoundingClientRect();
427
- const delta = {
428
- x: initialRect.left - lastRect.left,
429
- y: initialRect.top - lastRect.top,
430
- scaleX: initialRect.width / lastRect.width,
431
- scaleY: initialRect.height / lastRect.height,
432
- };
433
- animation = el.animate([
434
- {
435
- transformOrigin: 'top left',
436
- transform: `
437
- translate(${delta.x}px, ${delta.y}px)
438
- scale(${delta.scaleX}, ${delta.scaleY})
439
- `,
440
- },
441
- {
442
- transformOrigin: 'top left',
443
- transform: 'none',
444
- },
445
- ], {
446
- duration,
447
- easing,
448
- fill: 'both',
449
- });
450
- animation.addEventListener('finish', onAnimationFinish);
451
- animation.addEventListener('cancel', onAnimationCancel);
452
- onStart$.next();
453
- };
454
- const cancel = () => {
455
- animation === null || animation === void 0 ? void 0 : animation.cancel();
456
- cleanup();
457
- };
458
- return {
459
- updateInit,
460
- play,
461
- cancel,
462
- onStart$: onStart$.asObservable(),
463
- onFinish$: onFinish$.asObservable(),
464
- onCancel$: onCancel$.asObservable(),
465
- };
466
- };
467
-
468
- const clamp = (value, min = 0, max = 100) => {
469
- return Math.max(min, Math.min(max, value));
470
- };
471
-
472
- /* eslint-disable @typescript-eslint/no-explicit-any */
473
- /* eslint-disable no-var */
474
- /**
475
- * Stolen from klona to avoid adding a dependency
476
- * https://github.com/lukeed/klona
477
- *
478
- * MIT License
479
- *
480
- * Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
481
- *
482
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
483
- *
484
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
485
- *
486
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
487
- */
488
- const set = (obj, key, val) => {
489
- if (typeof val.value === 'object')
490
- val.value = clone(val.value);
491
- if (!val.enumerable || val.get || val.set || !val.configurable || !val.writable || key === '__proto__') {
492
- Object.defineProperty(obj, key, val);
493
- }
494
- else
495
- obj[key] = val.value;
496
- };
497
- const clone = (original) => {
498
- if (typeof original !== 'object')
499
- return original;
500
- var _og = original;
501
- var i = 0, k, list, tmp, str = Object.prototype.toString.call(_og);
502
- if (str === '[object Object]') {
503
- tmp = Object.create(_og.__proto__ || null);
504
- }
505
- else if (str === '[object Array]') {
506
- tmp = Array(_og.length);
507
- }
508
- else if (str === '[object Set]') {
509
- tmp = new Set();
510
- _og.forEach(function (val) {
511
- tmp.add(clone(val));
512
- });
513
- }
514
- else if (str === '[object Map]') {
515
- tmp = new Map();
516
- _og.forEach(function (val, key) {
517
- tmp.set(clone(key), clone(val));
518
- });
519
- }
520
- else if (str === '[object Date]') {
521
- tmp = new Date(+_og);
522
- }
523
- else if (str === '[object RegExp]') {
524
- tmp = new RegExp(_og.source, _og.flags);
525
- }
526
- else if (str === '[object DataView]') {
527
- tmp = new _og.constructor(clone(_og.buffer));
528
- }
529
- else if (str === '[object ArrayBuffer]') {
530
- tmp = _og.slice(0);
531
- }
532
- else if (str.slice(-6) === 'Array]') {
533
- // ArrayBuffer.isView(x)
534
- // ~> `new` bcuz `Buffer.slice` => ref
535
- tmp = new _og.constructor(_og);
536
- }
537
- if (tmp) {
538
- for (list = Object.getOwnPropertySymbols(_og); i < list.length; i++) {
539
- set(tmp, list[i], Object.getOwnPropertyDescriptor(_og, list[i]));
540
- }
541
- for (i = 0, list = Object.getOwnPropertyNames(_og); i < list.length; i++) {
542
- if (Object.hasOwnProperty.call(tmp, (k = list[i])) && tmp[k] === _og[k])
543
- continue;
544
- set(tmp, k, Object.getOwnPropertyDescriptor(_og, k));
545
- }
546
- }
547
- return tmp || _og;
548
- };
549
-
550
- const hasCookie = (name) => {
551
- if (typeof document === 'undefined') {
552
- return false;
553
- }
554
- return document.cookie.split(';').some((c) => {
555
- return c.trim().startsWith(name + '=');
556
- });
557
- };
558
- const getCookie = (name) => {
559
- var _a;
560
- if (typeof document === 'undefined') {
561
- return null;
562
- }
563
- // From https://stackoverflow.com/questions/10730362/get-cookie-by-name
564
- return (_a = ('; ' + document.cookie).split(`; ${name}=`).pop()) === null || _a === void 0 ? void 0 : _a.split(';')[0];
565
- };
566
- const setCookie = (name, data, expiresInDays = 30, domain = getDomain()) => {
567
- if (typeof document === 'undefined') {
568
- return;
569
- }
570
- const date = new Date();
571
- date.setTime(date.getTime() + expiresInDays * 24 * 60 * 60 * 1000);
572
- document.cookie = `${name}=${data}; path=/; expires=${date.toUTCString()}; domain=${domain}; SameSite=Lax;`;
573
- };
574
- const deleteCookie = (name, path, domain = getDomain()) => {
575
- if (hasCookie(name)) {
576
- document.cookie =
577
- name +
578
- '=' +
579
- (path ? ';path=' + path : '') +
580
- (domain ? ';domain=' + domain : '') +
581
- ';expires=Thu, 01 Jan 1970 00:00:01 GMT';
582
- }
583
- };
584
- const getDomain = () => {
585
- if (typeof navigator === 'undefined') {
586
- return null;
587
- }
588
- const hostname = window.location.hostname;
589
- if (hostname.includes('localhost')) {
590
- return 'localhost';
591
- }
592
- const splitHost = hostname.split('.');
593
- if (splitHost.length > 2) {
594
- return `${splitHost[splitHost.length - 2]}.${splitHost[splitHost.length - 1]}`;
595
- }
596
- return hostname;
597
- };
598
-
599
- /* eslint-disable @typescript-eslint/no-explicit-any */
600
- /* eslint-disable no-var */
601
- /**
602
- * Stolen from dequal to avoid adding a dependency
603
- * https://github.com/lukeed/dequal
604
- *
605
- * The MIT License (MIT)
606
- *
607
- * Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
608
- *
609
- * Permission is hereby granted, free of charge, to any person obtaining a copy
610
- * of this software and associated documentation files (the "Software"), to deal
611
- * in the Software without restriction, including without limitation the rights
612
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
613
- * copies of the Software, and to permit persons to whom the Software is
614
- * furnished to do so, subject to the following conditions:
615
- *
616
- * The above copyright notice and this permission notice shall be included in
617
- * all copies or substantial portions of the Software.
618
- *
619
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
620
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
621
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
622
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
623
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
624
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
625
- * THE SOFTWARE.
626
- */
627
- const has = Object.prototype.hasOwnProperty;
628
- function find(iter, tar, key) {
629
- for (key of iter.keys()) {
630
- if (equal(key, tar))
631
- return key;
632
- }
633
- }
634
- const equal = (foo, bar) => {
635
- var ctor, len, tmp;
636
- if (foo === bar)
637
- return true;
638
- if (foo && bar && (ctor = foo.constructor) === bar.constructor) {
639
- if (ctor === Date)
640
- return foo.getTime() === bar.getTime();
641
- if (ctor === RegExp)
642
- return foo.toString() === bar.toString();
643
- if (ctor === Array) {
644
- if ((len = foo.length) === bar.length) {
645
- while (len-- && equal(foo[len], bar[len]))
646
- ;
647
- }
648
- return len === -1;
649
- }
650
- if (ctor === Set) {
651
- if (foo.size !== bar.size) {
652
- return false;
653
- }
654
- for (len of foo) {
655
- tmp = len;
656
- if (tmp && typeof tmp === 'object') {
657
- tmp = find(bar, tmp);
658
- if (!tmp)
659
- return false;
660
- }
661
- if (!bar.has(tmp))
662
- return false;
663
- }
664
- return true;
665
- }
666
- if (ctor === Map) {
667
- if (foo.size !== bar.size) {
668
- return false;
669
- }
670
- for (len of foo) {
671
- tmp = len[0];
672
- if (tmp && typeof tmp === 'object') {
673
- tmp = find(bar, tmp);
674
- if (!tmp)
675
- return false;
676
- }
677
- if (!equal(len[1], bar.get(tmp))) {
678
- return false;
679
- }
680
- }
681
- return true;
682
- }
683
- if (ctor === ArrayBuffer) {
684
- foo = new Uint8Array(foo);
685
- bar = new Uint8Array(bar);
686
- }
687
- else if (ctor === DataView) {
688
- if ((len = foo.byteLength) === bar.byteLength) {
689
- while (len-- && foo.getInt8(len) === bar.getInt8(len))
690
- ;
691
- }
692
- return len === -1;
693
- }
694
- if (ArrayBuffer.isView(foo)) {
695
- if ((len = foo.byteLength) === bar.byteLength) {
696
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
697
- //@ts-ignore
698
- while (len-- && foo[len] === bar[len])
699
- ;
700
- }
701
- return len === -1;
702
- }
703
- if (!ctor || typeof foo === 'object') {
704
- len = 0;
705
- for (ctor in foo) {
706
- if (has.call(foo, ctor) && ++len && !has.call(bar, ctor))
707
- return false;
708
- if (!(ctor in bar) || !equal(foo[ctor], bar[ctor]))
709
- return false;
710
- }
711
- return Object.keys(bar).length === len;
712
- }
713
- }
714
- return foo !== foo && bar !== bar;
715
- };
716
-
717
- const createMediaQueryObservable = (query) => {
718
- const mq = window.matchMedia(query);
719
- const observable = new Observable((observer) => {
720
- const eventHandler = (event) => {
721
- observer.next(event);
722
- };
723
- mq.addEventListener('change', eventHandler);
724
- return () => {
725
- mq.removeEventListener('change', eventHandler);
726
- };
727
- }).pipe(startWith(mq), map(({ matches }) => ({
728
- matches,
729
- query,
730
- })));
731
- return observable;
732
- };
733
-
734
- const isAttributeRenderBinding = (value) => typeof value === 'boolean';
735
- const isAttributeValueBinding = (value) => typeof value === 'object';
736
- const createReactiveBindings = (...values) => {
737
- const rootElementRef = inject(ElementRef);
738
- const destroy$ = inject(DestroyService, { host: true }).destroy$;
739
- const subscriptions = [];
740
- const pushedAttributes = [];
741
- const defaults = {};
742
- const push = (value) => {
743
- const { attribute, observable, elementRef } = value;
744
- const elRef = elementRef || rootElementRef;
745
- const attributes = Array.isArray(attribute) ? attribute : [attribute];
746
- pushedAttributes.push(attributes);
747
- for (const attribute of attributes) {
748
- if (!defaults[attribute]) {
749
- defaults[attribute] = elRef.nativeElement.getAttribute(attribute) || undefined;
750
- }
751
- }
752
- const subscription = observable
753
- .pipe(takeUntil(destroy$), distinctUntilChanged((a, b) => {
754
- if (isAttributeRenderBinding(a) && isAttributeRenderBinding(b)) {
755
- return a === b;
756
- }
757
- else if (isAttributeValueBinding(a) && isAttributeValueBinding(b)) {
758
- return a.render === b.render && a.value === b.value;
759
- }
760
- return false;
761
- }))
762
- .subscribe((value) => {
763
- const currentAttributes = pushedAttributes.find((s) => s.some((current) => attributes.includes(current))) || [];
764
- for (const attribute of currentAttributes) {
765
- const isSingleClassMutation = attribute.startsWith('class.');
766
- const isMultipleClassMutation = attribute === 'class';
767
- const render = isAttributeRenderBinding(value) ? value : value.render;
768
- if (isSingleClassMutation) {
769
- const className = attribute.replace('class.', '');
770
- if (!className) {
771
- continue;
772
- }
773
- if (!render) {
774
- elRef.nativeElement.classList.remove(className);
775
- }
776
- else {
777
- elRef.nativeElement.classList.add(className);
778
- }
779
- }
780
- else if (isMultipleClassMutation) {
781
- const classes = isAttributeRenderBinding(value) ? '' : `${value.value}`;
782
- if (!classes) {
783
- continue;
784
- }
785
- if (!render) {
786
- elRef.nativeElement.classList.remove(...classes.split(' '));
787
- }
788
- else {
789
- elRef.nativeElement.classList.add(...classes.split(' '));
790
- }
791
- }
792
- else {
793
- const attributeValue = isAttributeRenderBinding(value) ? true : `${value.value}`;
794
- if (!attribute) {
795
- continue;
796
- }
797
- if (!render) {
798
- elRef.nativeElement.removeAttribute(attribute);
799
- }
800
- else {
801
- elRef.nativeElement.setAttribute(attribute, `${attributeValue}`);
802
- }
803
- }
804
- }
805
- });
806
- subscriptions.push({ attributes, subscription });
807
- };
808
- const remove = (...attributes) => {
809
- for (const attribute of attributes) {
810
- const sub = subscriptions.find((s) => s.attributes.includes(attribute));
811
- const attributeStack = pushedAttributes.find((a) => a.includes(attribute));
812
- if (sub) {
813
- sub.attributes = sub.attributes.filter((a) => a !== attribute);
814
- attributeStack === null || attributeStack === void 0 ? void 0 : attributeStack.splice(attributeStack.indexOf(attribute), 1);
815
- if (sub.attributes.length === 0) {
816
- sub.subscription.unsubscribe();
817
- subscriptions.splice(subscriptions.indexOf(sub), 1);
818
- }
819
- }
820
- }
821
- };
822
- const reset = () => {
823
- for (const attribute in defaults) {
824
- if (defaults[attribute] === undefined) {
825
- rootElementRef.nativeElement.removeAttribute(attribute);
826
- }
827
- else {
828
- rootElementRef.nativeElement.setAttribute(attribute, defaults[attribute]);
829
- }
830
- }
831
- };
832
- for (const value of values) {
833
- push(value);
834
- }
835
- return {
836
- push,
837
- remove,
838
- reset,
839
- };
840
- };
841
-
842
- /* eslint-disable @typescript-eslint/no-explicit-any */
843
- class BehaviorSubjectWithSubscriberCount extends BehaviorSubject {
844
- constructor() {
845
- super(...arguments);
846
- this._subscriberCount = 0;
847
- }
848
- get subscriberCount() {
849
- return this._subscriberCount;
850
- }
851
- subscribe(observerOrNext) {
852
- this._subscriberCount++;
853
- const sub = super.subscribe(observerOrNext);
854
- return Object.assign(Object.assign({}, sub), { unsubscribe: () => {
855
- sub.unsubscribe();
856
- this._subscriberCount--;
857
- } });
858
- }
859
- unsubscribe() {
860
- this._subscriberCount--;
861
- return super.unsubscribe();
862
- }
863
- }
864
-
865
- const elementCanScroll = (element) => {
866
- const { scrollHeight, clientHeight, scrollWidth, clientWidth } = element;
867
- return scrollHeight > clientHeight || scrollWidth > clientWidth;
868
- };
869
- const isElementVisible = (options) => {
870
- let { container } = options;
871
- const { element } = options;
872
- if (!element || container === null) {
873
- return null;
874
- }
875
- container || (container = document.documentElement);
876
- const canScroll = elementCanScroll(container);
877
- if (!canScroll) {
878
- return { inline: true, block: true };
879
- }
880
- const elementRect = element.getBoundingClientRect();
881
- const containerRect = container.getBoundingClientRect();
882
- const elementInlineStart = elementRect.left;
883
- const elementBlockStart = elementRect.top;
884
- const containerInlineStart = containerRect.left;
885
- const containerBlockStart = containerRect.top;
886
- const elementInlineEnd = elementInlineStart + elementRect.width;
887
- const elementBlockEnd = elementBlockStart + elementRect.height;
888
- const containerInlineEnd = containerInlineStart + containerRect.width;
889
- const containerBlockEnd = containerBlockStart + containerRect.height;
890
- const isElementInlineVisible = elementInlineStart >= containerInlineStart && elementInlineEnd <= containerInlineEnd;
891
- const isElementBlockVisible = elementBlockStart >= containerBlockStart && elementBlockEnd <= containerBlockEnd;
892
- return { inline: isElementInlineVisible, block: isElementBlockVisible };
893
- };
894
- const scrollToElement = (options) => {
895
- let { container } = options;
896
- const { element, direction, behavior = 'smooth', origin = 'nearest', scrollBlockMargin = 0, scrollInlineMargin = 0, } = options;
897
- if (!element || container === null) {
898
- return;
899
- }
900
- container || (container = document.documentElement);
901
- const canScroll = elementCanScroll(container);
902
- if (!canScroll) {
903
- return;
904
- }
905
- const elementRect = element.getBoundingClientRect();
906
- const containerRect = container.getBoundingClientRect();
907
- const elementInlineSize = elementRect.width;
908
- const elementBlockSize = elementRect.height;
909
- const containerInlineSize = containerRect.width;
910
- const containerBlockSize = containerRect.height;
911
- const elementInlineStart = elementRect.left;
912
- const elementBlockStart = elementRect.top;
913
- const containerInlineStart = containerRect.left;
914
- const containerBlockStart = containerRect.top;
915
- const elementInlineEnd = elementInlineStart + elementInlineSize;
916
- const elementBlockEnd = elementBlockStart + elementBlockSize;
917
- const containerInlineEnd = containerInlineStart + containerInlineSize;
918
- const containerBlockEnd = containerBlockStart + containerBlockSize;
919
- const elementInlineCenter = elementInlineStart + elementInlineSize / 2;
920
- const elementBlockCenter = elementBlockStart + elementBlockSize / 2;
921
- const containerInlineCenter = containerInlineStart + containerInlineSize / 2;
922
- const containerBlockCenter = containerBlockStart + containerBlockSize / 2;
923
- const elementInlineOrigin = origin === 'center' ? elementInlineCenter : origin === 'end' ? elementInlineEnd : elementInlineStart;
924
- const elementBlockOrigin = origin === 'center' ? elementBlockCenter : origin === 'end' ? elementBlockEnd : elementBlockStart;
925
- const containerInlineOrigin = origin === 'center' ? containerInlineCenter : origin === 'end' ? containerInlineEnd : containerInlineStart;
926
- const containerBlockOrigin = origin === 'center' ? containerBlockCenter : origin === 'end' ? containerBlockEnd : containerBlockStart;
927
- const inlineOffset = elementInlineOrigin - containerInlineOrigin - scrollInlineMargin;
928
- const blockOffset = elementBlockOrigin - containerBlockOrigin - scrollBlockMargin;
929
- let inlineScroll = direction === 'block' ? undefined : inlineOffset;
930
- let blockScroll = direction === 'inline' ? undefined : blockOffset;
931
- if (origin === 'nearest') {
932
- const elVisible = isElementVisible({ element, container });
933
- if ((elVisible === null || elVisible === void 0 ? void 0 : elVisible.inline) && (elVisible === null || elVisible === void 0 ? void 0 : elVisible.block)) {
934
- return;
935
- }
936
- if (elVisible === null || elVisible === void 0 ? void 0 : elVisible.inline) {
937
- inlineScroll = undefined;
938
- }
939
- if (elVisible === null || elVisible === void 0 ? void 0 : elVisible.block) {
940
- blockScroll = undefined;
941
- }
942
- }
943
- container.scrollTo({
944
- left: inlineScroll,
945
- top: blockScroll,
946
- behavior,
947
- });
948
- };
949
-
950
- const scrollBehaviorSupported = supportsScrollBehavior();
951
- class SmartBlockScrollStrategy {
952
- constructor(_viewportRuler, _routerState, document) {
953
- this._viewportRuler = _viewportRuler;
954
- this._routerState = _routerState;
955
- this._previousHTMLStyles = { top: '', left: '' };
956
- this._previousScrollPosition = { top: 0, left: 0 };
957
- this._isEnabled = false;
958
- this._urlSubscription = null;
959
- this._didNavigate = false;
960
- this._document = document;
961
- }
962
- attach() {
963
- // noop
964
- }
965
- enable() {
966
- if (this._canBeEnabled()) {
967
- const root = this._document.documentElement;
968
- this._previousScrollPosition = this._viewportRuler.getViewportScrollPosition();
969
- this._didNavigate = false;
970
- this._previousHTMLStyles.left = root.style.left || '';
971
- this._previousHTMLStyles.top = root.style.top || '';
972
- root.style.left = coerceCssPixelValue(-this._previousScrollPosition.left);
973
- root.style.top = coerceCssPixelValue(-this._previousScrollPosition.top);
974
- root.classList.add('cdk-global-scrollblock');
975
- this._isEnabled = true;
976
- this._urlSubscription = this._routerState.route$
977
- .pipe(skip(1), take(1), tap(() => {
978
- this._didNavigate = true;
979
- }))
980
- .subscribe();
981
- }
982
- }
983
- disable() {
984
- var _a;
985
- if (this._isEnabled) {
986
- (_a = this._urlSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
987
- const html = this._document.documentElement;
988
- const body = this._document.body;
989
- const htmlStyle = html.style;
990
- const bodyStyle = body.style;
991
- const previousHtmlScrollBehavior = htmlStyle.scrollBehavior || '';
992
- const previousBodyScrollBehavior = bodyStyle.scrollBehavior || '';
993
- this._isEnabled = false;
994
- htmlStyle.left = this._previousHTMLStyles.left;
995
- htmlStyle.top = this._previousHTMLStyles.top;
996
- html.classList.remove('cdk-global-scrollblock');
997
- if (scrollBehaviorSupported) {
998
- htmlStyle.scrollBehavior = bodyStyle.scrollBehavior = 'auto';
999
- }
1000
- if (!this._didNavigate) {
1001
- window.scroll(this._previousScrollPosition.left, this._previousScrollPosition.top);
1002
- }
1003
- if (scrollBehaviorSupported) {
1004
- htmlStyle.scrollBehavior = previousHtmlScrollBehavior;
1005
- bodyStyle.scrollBehavior = previousBodyScrollBehavior;
1006
- }
1007
- }
1008
- }
1009
- _canBeEnabled() {
1010
- const html = this._document.documentElement;
1011
- if (html.classList.contains('cdk-global-scrollblock') || this._isEnabled) {
1012
- return false;
1013
- }
1014
- return true;
1015
- }
1016
- }
1017
-
1018
- const provideViewportConfig = (viewportConfig) => {
1019
- return { provide: VIEWPORT_CONFIG, useValue: viewportConfig };
1020
- };
1021
-
1022
- const routerDisableScrollTop = (config = {}) => {
1023
- if (!config.asReturnRoute) {
1024
- return {
1025
- disableScrollTop: true,
1026
- };
1027
- }
1028
- return {
1029
- disableScrollTopAsReturnRoute: true,
1030
- };
1031
- };
1032
- class RouterStateService {
1033
- get route$() {
1034
- return this._route$.asObservable().pipe(distinctUntilChanged());
1035
- }
1036
- get state$() {
1037
- return this._state$.asObservable();
1038
- }
1039
- constructor() {
1040
- this._isScrollTopOnNavigationEnabled = false;
1041
- this._router = inject(Router);
1042
- this._route$ = new BehaviorSubject('/');
1043
- this._state$ = new BehaviorSubject({
1044
- title: null,
1045
- fragment: null,
1046
- data: {},
1047
- pathParams: {},
1048
- queryParams: {},
1049
- });
1050
- this._router.events
1051
- .pipe(filter((event) => event instanceof NavigationEnd), distinctUntilChanged((a, b) => a.url === b.url), map((event) => {
1052
- const { url } = event;
1053
- const urlWithoutQueryParams = url.split('?')[0];
1054
- const withoutFragment = urlWithoutQueryParams.split('#')[0];
1055
- return withoutFragment;
1056
- }))
1057
- .subscribe(this._route$);
1058
- this._route$
1059
- .pipe(map(() => {
1060
- let route = this._router.routerState.snapshot.root;
1061
- while (route.firstChild) {
1062
- route = route.firstChild;
1063
- }
1064
- const { data, params, queryParams, title, fragment } = route;
1065
- return {
1066
- data,
1067
- pathParams: params,
1068
- queryParams,
1069
- title: title !== null && title !== void 0 ? title : null,
1070
- fragment,
1071
- };
1072
- }))
1073
- .subscribe(this._state$);
1074
- }
1075
- enableScrollEnhancements(config = {}) {
1076
- if (this._isScrollTopOnNavigationEnabled) {
1077
- return;
1078
- }
1079
- this._isScrollTopOnNavigationEnabled = true;
1080
- combineLatest([this._state$.pipe(pairwise()), this._route$.pipe(pairwise())])
1081
- .pipe(debounceTime(1))
1082
- .subscribe(([[prevState, currState], [prevRoute, currRoute]]) => {
1083
- var _a, _b, _c, _d, _e, _f;
1084
- const sameUrlNavigation = prevRoute === currRoute && equal(prevState.pathParams, currState.pathParams);
1085
- const didFragmentChange = prevState.fragment !== currState.fragment;
1086
- if (sameUrlNavigation) {
1087
- const allQueryParams = [
1088
- ...new Set(Object.keys(prevState.queryParams).concat(Object.keys(currState.queryParams))),
1089
- ];
1090
- const changedQueryParams = allQueryParams.filter((key) => currState.queryParams[key] !== prevState.queryParams[key]);
1091
- if (!((_a = config.queryParamTriggerList) === null || _a === void 0 ? void 0 : _a.length) && !didFragmentChange) {
1092
- return;
1093
- }
1094
- const caseQueryParams = changedQueryParams.some((key) => { var _a; return (_a = config.queryParamTriggerList) === null || _a === void 0 ? void 0 : _a.includes(key); });
1095
- const caseFragment = didFragmentChange && ((_b = config.fragment) === null || _b === void 0 ? void 0 : _b.enabled);
1096
- if (caseQueryParams) {
1097
- ((_c = config.scrollElement) !== null && _c !== void 0 ? _c : document.documentElement).scrollTop = 0;
1098
- }
1099
- else if (caseFragment) {
1100
- const fragmentElement = document.getElementById((_d = currState.fragment) !== null && _d !== void 0 ? _d : '');
1101
- if (fragmentElement) {
1102
- fragmentElement.scrollIntoView({ behavior: ((_e = config.fragment) === null || _e === void 0 ? void 0 : _e.smooth) ? 'smooth' : 'auto' });
1103
- }
1104
- }
1105
- }
1106
- else {
1107
- if (!(currState.data['disableScrollTopAsReturnRoute'] && prevState.data['disableScrollTop']) &&
1108
- !currState.data['disableScrollTop']) {
1109
- ((_f = config.scrollElement) !== null && _f !== void 0 ? _f : document.documentElement).scrollTop = 0;
1110
- }
1111
- }
1112
- });
1113
- }
1114
- selectQueryParam(key) {
1115
- return this._state$.pipe(map((state) => state.queryParams[key]), distinctUntilChanged());
1116
- }
1117
- selectPathParam(key) {
1118
- return this._state$.pipe(map((state) => state.pathParams[key]), distinctUntilChanged());
1119
- }
1120
- selectData(key) {
1121
- return this._state$.pipe(map((state) => state.data[key]), distinctUntilChanged((a, b) => equal(a, b)));
1122
- }
1123
- }
1124
- RouterStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: RouterStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1125
- RouterStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: RouterStateService, providedIn: 'root' });
1126
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: RouterStateService, decorators: [{
1127
- type: Injectable,
1128
- args: [{
1129
- providedIn: 'root',
1130
- }]
1131
- }], ctorParameters: function () { return []; } });
1132
-
1133
- class ViewportService {
1134
- get isXs$() {
1135
- return this._isXs$.asObservable();
1136
- }
1137
- get isXs() {
1138
- return this._isXs$.value;
1139
- }
1140
- get isSm$() {
1141
- return this._isSm$.asObservable();
1142
- }
1143
- get isSm() {
1144
- return this._isSm$.value;
1145
- }
1146
- get isMd$() {
1147
- return this._isMd$.asObservable();
1148
- }
1149
- get isMd() {
1150
- return this._isMd$.value;
1151
- }
1152
- get isLg$() {
1153
- return this._isLg$.asObservable();
1154
- }
1155
- get isLg() {
1156
- return this._isLg$.value;
1157
- }
1158
- get isXl$() {
1159
- return this._isXl$.asObservable();
1160
- }
1161
- get isXl() {
1162
- return this._isXl$.value;
1163
- }
1164
- get is2Xl$() {
1165
- return this._is2Xl$.asObservable();
1166
- }
1167
- get is2Xl() {
1168
- return this._is2Xl$.value;
1169
- }
1170
- get currentViewport() {
1171
- return this.getCurrentViewport([this.isXs, this.isSm, this.isMd, this.isLg, this.isXl, this.is2Xl]);
1172
- }
1173
- constructor(_viewportConfig, _breakpointObserver) {
1174
- this._breakpointObserver = _breakpointObserver;
1175
- this._isXs$ = new BehaviorSubject(false);
1176
- this._isSm$ = new BehaviorSubject(false);
1177
- this._isMd$ = new BehaviorSubject(false);
1178
- this._isLg$ = new BehaviorSubject(false);
1179
- this._isXl$ = new BehaviorSubject(false);
1180
- this._is2Xl$ = new BehaviorSubject(false);
1181
- this.currentViewport$ = combineLatest([this.isXs$, this.isSm$, this.isMd$, this.isLg$, this.isXl$, this.is2Xl$]).pipe(map((val) => this.getCurrentViewport(val)), shareReplay(1));
1182
- this._viewportConfig = _viewportConfig || DEFAULT_VIEWPORT_CONFIG;
1183
- this._observeDefaultBreakpoints();
1184
- }
1185
- observe(options) {
1186
- const mediaQuery = this._buildMediaQuery(options);
1187
- return this._breakpointObserver.observe(mediaQuery).pipe(map((x) => x.matches), shareReplay(1));
1188
- }
1189
- isMatched(options) {
1190
- const mediaQuery = this._buildMediaQuery(options);
1191
- return this._breakpointObserver.isMatched(mediaQuery);
1192
- }
1193
- _observeDefaultBreakpoints() {
1194
- this.observe({ max: 'xs' }).subscribe(this._isXs$);
1195
- this.observe({ min: 'sm', max: 'sm' }).subscribe(this._isSm$);
1196
- this.observe({ min: 'md', max: 'md' }).subscribe(this._isMd$);
1197
- this.observe({ min: 'lg', max: 'lg' }).subscribe(this._isLg$);
1198
- this.observe({ min: 'xl', max: 'xl' }).subscribe(this._isXl$);
1199
- this.observe({ min: '2xl' }).subscribe(this._is2Xl$);
1200
- }
1201
- _getViewportSize(type, option) {
1202
- const index = option === 'min' ? 0 : 1;
1203
- const size = this._viewportConfig.breakpoints[type][index];
1204
- if (size === Infinity || size === 0) {
1205
- return size;
1206
- }
1207
- if (option === 'min') {
1208
- return size;
1209
- }
1210
- // Due to scaling, the actual size of the viewport may be a decimal number.
1211
- // Eg. on Windows 11 with 150% scaling, the viewport size may be 1535.33px
1212
- // and thus not matching any of the default breakpoints.
1213
- return size + 0.9;
1214
- }
1215
- _buildMediaQuery(options) {
1216
- if (!options.min && !options.max) {
1217
- throw new Error('At least one of min or max must be defined');
1218
- }
1219
- const mediaQueryParts = [];
1220
- if (options.min) {
1221
- if (typeof options.min === 'number') {
1222
- mediaQueryParts.push(`(min-width: ${options.min}px)`);
1223
- }
1224
- else {
1225
- mediaQueryParts.push(`(min-width: ${this._getViewportSize(options.min, 'min')}px)`);
1226
- }
1227
- }
1228
- if (options.min && options.max) {
1229
- mediaQueryParts.push('and');
1230
- }
1231
- if (options.max) {
1232
- if (typeof options.max === 'number') {
1233
- mediaQueryParts.push(`(max-width: ${options.max}px)`);
1234
- }
1235
- else {
1236
- mediaQueryParts.push(`(max-width: ${this._getViewportSize(options.max, 'max')}px)`);
1237
- }
1238
- }
1239
- return mediaQueryParts.join(' ');
1240
- }
1241
- getCurrentViewport([isXs, isSm, isMd, isLg, isXl, is2Xl]) {
1242
- if (isXs) {
1243
- return 'xs';
1244
- }
1245
- else if (isSm) {
1246
- return 'sm';
1247
- }
1248
- else if (isMd) {
1249
- return 'md';
1250
- }
1251
- else if (isLg) {
1252
- return 'lg';
1253
- }
1254
- else if (isXl) {
1255
- return 'xl';
1256
- }
1257
- else if (is2Xl) {
1258
- return '2xl';
1259
- }
1260
- return 'xs';
1261
- }
1262
- }
1263
- ViewportService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ViewportService, deps: [{ token: VIEWPORT_CONFIG, optional: true }, { token: i1.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Injectable });
1264
- ViewportService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ViewportService, providedIn: 'root' });
1265
- __decorate([
1266
- Memo(),
1267
- __metadata("design:type", Function),
1268
- __metadata("design:paramtypes", [String, String]),
1269
- __metadata("design:returntype", void 0)
1270
- ], ViewportService.prototype, "_getViewportSize", null);
1271
- __decorate([
1272
- Memo({
1273
- resolver: (v) => {
1274
- var _a, _b;
1275
- return `${(_a = v.min) !== null && _a !== void 0 ? _a : ''}-${(_b = v.max) !== null && _b !== void 0 ? _b : ''}`;
1276
- },
1277
- }),
1278
- __metadata("design:type", Function),
1279
- __metadata("design:paramtypes", [Object]),
1280
- __metadata("design:returntype", void 0)
1281
- ], ViewportService.prototype, "_buildMediaQuery", null);
1282
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ViewportService, decorators: [{
1283
- type: Injectable,
1284
- args: [{
1285
- providedIn: 'root',
1286
- }]
1287
- }], ctorParameters: function () {
1288
- return [{ type: undefined, decorators: [{
1289
- type: Inject,
1290
- args: [VIEWPORT_CONFIG]
1291
- }, {
1292
- type: Optional
1293
- }] }, { type: i1.BreakpointObserver }];
1294
- }, propDecorators: { _getViewportSize: [], _buildMediaQuery: [] } });
1295
-
1296
- const ANIMATABLE_TOKEN = new InjectionToken('ANIMATABLE_DIRECTIVE_TOKEN');
1297
- class AnimatableDirective {
1298
- constructor() {
1299
- this._didEmitStart = false;
1300
- this._parent = inject(ANIMATABLE_TOKEN, { optional: true, skipSelf: true });
1301
- this._destroy$ = inject(DestroyService, { host: true }).destroy$;
1302
- this._elementRef = inject(ElementRef);
1303
- this._animationStart$ = new Subject();
1304
- this._animationEnd$ = new Subject();
1305
- this._animatedElement$ = new BehaviorSubject(this._elementRef.nativeElement);
1306
- this.animationStart$ = this._animationStart$.asObservable().pipe(debounceTime(0));
1307
- this.animationEnd$ = this._animationEnd$.asObservable().pipe(debounceTime(0));
1308
- this._hostActiveAnimationCount$ = new BehaviorSubject(0);
1309
- this._totalActiveAnimationCount$ = new BehaviorSubject(0);
1310
- this.isAnimating$ = this._totalActiveAnimationCount$.pipe(map((count) => count > 0), debounceTime(0));
1311
- }
1312
- set animatedElement(value) {
1313
- let newElement = null;
1314
- if (value === null || value === undefined) {
1315
- newElement = this._elementRef.nativeElement;
1316
- }
1317
- else if (typeof value === 'string') {
1318
- const el = document.querySelector(value);
1319
- if (el) {
1320
- newElement = el;
1321
- }
1322
- else {
1323
- if (isDevMode()) {
1324
- console.warn(`Element with selector ${value} not found. Animatable directive will use host element.`);
1325
- }
1326
- newElement = this._elementRef.nativeElement;
1327
- }
1328
- }
1329
- else {
1330
- newElement = value;
1331
- }
1332
- if (this._animatedElement$.value !== newElement) {
1333
- this._animatedElement$.next(newElement);
1334
- }
1335
- }
1336
- ngOnInit() {
1337
- this._animatedElement$
1338
- .pipe(tap((el) => {
1339
- this._totalActiveAnimationCount$.next(this._totalActiveAnimationCount$.value - this._hostActiveAnimationCount$.value);
1340
- this._hostActiveAnimationCount$.next(0);
1341
- merge(fromEvent(el, 'animationstart'), fromEvent(el, 'transitionstart'))
1342
- .pipe(filter((e) => e.target === el), // skip events from children
1343
- tap(() => {
1344
- const count = this._hostActiveAnimationCount$.value + 1;
1345
- this._hostActiveAnimationCount$.next(count);
1346
- this._totalActiveAnimationCount$.next(count);
1347
- }), takeUntil(this._destroy$), takeUntil(this._animatedElement$.pipe(skip(1))))
1348
- .subscribe();
1349
- merge(fromEvent(el, 'animationend'), fromEvent(el, 'animationcancel'), fromEvent(el, 'transitionend'), fromEvent(el, 'transitioncancel'))
1350
- .pipe(filter((e) => e.target === el), // skip events from children
1351
- tap(() => {
1352
- const count = this._hostActiveAnimationCount$.value - 1;
1353
- this._hostActiveAnimationCount$.next(count);
1354
- this._totalActiveAnimationCount$.next(count);
1355
- }), takeUntil(this._destroy$), takeUntil(this._animatedElement$.pipe(skip(1))))
1356
- .subscribe();
1357
- }), takeUntil(this._destroy$))
1358
- .subscribe();
1359
- this._totalActiveAnimationCount$
1360
- .pipe(tap((count) => {
1361
- if (count > 0 && !this._didEmitStart) {
1362
- this._animationStart$.next();
1363
- this._didEmitStart = true;
1364
- }
1365
- else if (count === 0) {
1366
- this._animationEnd$.next();
1367
- this._didEmitStart = false;
1368
- }
1369
- }), takeUntil(this._destroy$))
1370
- .subscribe();
1371
- if (this._parent) {
1372
- this._parent._hostActiveAnimationCount$
1373
- .pipe(takeUntil(this._destroy$), tap((count) => {
1374
- this._totalActiveAnimationCount$.next(count + this._hostActiveAnimationCount$.value);
1375
- }))
1376
- .subscribe();
1377
- }
1378
- }
1379
- }
1380
- AnimatableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: AnimatableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1381
- AnimatableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.7", type: AnimatableDirective, isStandalone: true, selector: "[etAnimatable]", inputs: { animatedElement: ["etAnimatable", "animatedElement"] }, providers: [
1382
- {
1383
- provide: ANIMATABLE_TOKEN,
1384
- useExisting: AnimatableDirective,
1385
- },
1386
- DestroyService,
1387
- ], exportAs: ["etAnimatable"], ngImport: i0 });
1388
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: AnimatableDirective, decorators: [{
1389
- type: Directive,
1390
- args: [{
1391
- selector: '[etAnimatable]',
1392
- exportAs: 'etAnimatable',
1393
- standalone: true,
1394
- providers: [
1395
- {
1396
- provide: ANIMATABLE_TOKEN,
1397
- useExisting: AnimatableDirective,
1398
- },
1399
- DestroyService,
1400
- ],
1401
- }]
1402
- }], propDecorators: { animatedElement: [{
1403
- type: Input,
1404
- args: ['etAnimatable']
1405
- }] } });
1406
-
1407
- const ANIMATED_LIFECYCLE_TOKEN = new InjectionToken('ANIMATED_LIFECYCLE_DIRECTIVE_TOKEN');
1408
- const ANIMATION_CLASSES = {
1409
- enterFrom: 'et-animation-enter-from',
1410
- enterActive: 'et-animation-enter-active',
1411
- enterTo: 'et-animation-enter-to',
1412
- leaveFrom: 'et-animation-leave-from',
1413
- leaveActive: 'et-animation-leave-active',
1414
- leaveTo: 'et-animation-leave-to',
1415
- };
1416
- class AnimatedLifecycleDirective {
1417
- constructor() {
1418
- this._destroy$ = inject(DestroyService, { host: true }).destroy$;
1419
- this._elementRef = inject(ElementRef);
1420
- this._animatable = inject(ANIMATABLE_TOKEN);
1421
- this._classList = this._elementRef.nativeElement.classList;
1422
- this._state$ = new BehaviorSubject('init');
1423
- this.state$ = this._state$.asObservable();
1424
- this._bindings = createReactiveBindings({
1425
- attribute: 'class.et-force-invisible',
1426
- observable: this._state$.pipe(map((state) => state === 'init')),
1427
- });
1428
- }
1429
- get state() {
1430
- return this._state$.value;
1431
- }
1432
- enter(config) {
1433
- if (this.state !== 'init' && this.state !== 'left' && isDevMode()) {
1434
- console.warn('Tried to enter but the element is not in the initial state. This may result in unexpected behavior.', this);
1435
- }
1436
- this._state$.next('entering');
1437
- if (!(config === null || config === void 0 ? void 0 : config.onlyTransition)) {
1438
- this._classList.add(ANIMATION_CLASSES.enterFrom);
1439
- }
1440
- forceReflow();
1441
- this._classList.add(ANIMATION_CLASSES.enterActive);
1442
- fromNextFrame()
1443
- .pipe(tap(() => {
1444
- if (!(config === null || config === void 0 ? void 0 : config.onlyTransition)) {
1445
- this._classList.remove(ANIMATION_CLASSES.enterFrom);
1446
- this._classList.add(ANIMATION_CLASSES.enterTo);
1447
- }
1448
- }), switchMap(() => this._animatable.animationEnd$), tap(() => {
1449
- this._state$.next('entered');
1450
- this._classList.remove(ANIMATION_CLASSES.enterActive);
1451
- if (!(config === null || config === void 0 ? void 0 : config.onlyTransition)) {
1452
- this._classList.remove(ANIMATION_CLASSES.enterTo);
1453
- }
1454
- }), takeUntil(this._destroy$), take(1))
1455
- .subscribe();
1456
- }
1457
- leave(config) {
1458
- if (this.state !== 'entered' && this.state !== 'entering' && isDevMode()) {
1459
- console.warn('Tried to leave while already leaving or left. This may result in unexpected behavior.', this);
1460
- }
1461
- if (this._classList.contains(ANIMATION_CLASSES.enterFrom) ||
1462
- this._classList.contains(ANIMATION_CLASSES.enterActive) ||
1463
- this._classList.contains(ANIMATION_CLASSES.enterTo)) {
1464
- this._classList.remove(ANIMATION_CLASSES.enterFrom);
1465
- this._classList.remove(ANIMATION_CLASSES.enterActive);
1466
- this._classList.remove(ANIMATION_CLASSES.enterTo);
1467
- }
1468
- this._state$.next('leaving');
1469
- if (!(config === null || config === void 0 ? void 0 : config.onlyTransition)) {
1470
- this._classList.add(ANIMATION_CLASSES.leaveFrom);
1471
- }
1472
- forceReflow();
1473
- this._classList.add(ANIMATION_CLASSES.leaveActive);
1474
- fromNextFrame()
1475
- .pipe(tap(() => {
1476
- if (!(config === null || config === void 0 ? void 0 : config.onlyTransition)) {
1477
- this._classList.remove(ANIMATION_CLASSES.leaveFrom);
1478
- this._classList.add(ANIMATION_CLASSES.leaveTo);
1479
- }
1480
- }), switchMap(() => this._animatable.animationEnd$), tap(() => {
1481
- this._state$.next('left');
1482
- this._classList.remove(ANIMATION_CLASSES.leaveActive);
1483
- if (!(config === null || config === void 0 ? void 0 : config.onlyTransition)) {
1484
- this._classList.remove(ANIMATION_CLASSES.leaveTo);
1485
- }
1486
- }), takeUntil(this._destroy$), take(1))
1487
- .subscribe();
1488
- }
1489
- }
1490
- AnimatedLifecycleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: AnimatedLifecycleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1491
- AnimatedLifecycleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.7", type: AnimatedLifecycleDirective, isStandalone: true, selector: "[etAnimatedLifecycle]", providers: [
1492
- {
1493
- provide: ANIMATED_LIFECYCLE_TOKEN,
1494
- useExisting: AnimatedLifecycleDirective,
1495
- },
1496
- DestroyService,
1497
- ], exportAs: ["etAnimatedLifecycle"], hostDirectives: [{ directive: AnimatableDirective }], ngImport: i0 });
1498
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: AnimatedLifecycleDirective, decorators: [{
1499
- type: Directive,
1500
- args: [{
1501
- selector: '[etAnimatedLifecycle]',
1502
- exportAs: 'etAnimatedLifecycle',
1503
- standalone: true,
1504
- providers: [
1505
- {
1506
- provide: ANIMATED_LIFECYCLE_TOKEN,
1507
- useExisting: AnimatedLifecycleDirective,
1508
- },
1509
- DestroyService,
1510
- ],
1511
- hostDirectives: [AnimatableDirective],
1512
- }]
1513
- }] });
1514
-
1515
- class ClickOutsideDirective {
1516
- constructor() {
1517
- this._elementRef = inject(ElementRef);
1518
- this._clickObserverService = inject(ClickObserverService);
1519
- this._subscription = null;
1520
- this.etClickOutside = new EventEmitter();
1521
- }
1522
- ngOnInit() {
1523
- setTimeout(() => {
1524
- this._subscription = this._clickObserverService.observe(this._elementRef.nativeElement).subscribe((event) => {
1525
- const activeElement = event.target;
1526
- const isInside = this._elementRef.nativeElement.contains(activeElement);
1527
- if (!isInside) {
1528
- this.etClickOutside.emit(event);
1529
- }
1530
- });
1531
- });
1532
- }
1533
- ngOnDestroy() {
1534
- var _a;
1535
- (_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
1536
- }
1537
- }
1538
- ClickOutsideDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ClickOutsideDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1539
- ClickOutsideDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.7", type: ClickOutsideDirective, isStandalone: true, selector: "[etClickOutside]", outputs: { etClickOutside: "etClickOutside" }, ngImport: i0 });
1540
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ClickOutsideDirective, decorators: [{
1541
- type: Directive,
1542
- args: [{
1543
- selector: '[etClickOutside]',
1544
- standalone: true,
1545
- }]
1546
- }], propDecorators: { etClickOutside: [{
1547
- type: Output
1548
- }] } });
1549
-
1550
- const CURSOR_DRAG_SCROLLING_CLASS = 'et-cursor-drag-scroll--scrolling';
1551
- const CURSOR_DRAG_SCROLLING_PREPARED_CLASS = 'et-cursor-drag-scroll--prepared';
1552
-
1553
- class CursorDragScrollDirective {
1554
- constructor() {
1555
- this._subscriptions = [];
1556
- this._destroy$ = inject(DestroyService, { host: true }).destroy$;
1557
- this._elementRef = inject(ElementRef);
1558
- this._contentObserverService = inject(ContentObserverService);
1559
- this._resizeObserverService = inject(ResizeObserverService);
1560
- this._bufferUntilScroll = 5;
1561
- this._mouseUp$ = new Subject();
1562
- this._isScrolling = false;
1563
- this._canScroll = false;
1564
- this._currentScrollState = {
1565
- top: 0,
1566
- left: 0,
1567
- x: 0,
1568
- y: 0,
1569
- };
1570
- this._enabled = false;
1571
- }
1572
- get enabled() {
1573
- return this._enabled;
1574
- }
1575
- set enabled(value) {
1576
- this._enabled = coerceBooleanProperty(value);
1577
- if (this._enabled) {
1578
- this._enableCursorDragScroll();
1579
- }
1580
- else {
1581
- this._disableCursorDragScroll();
1582
- }
1583
- }
1584
- ngAfterViewInit() {
1585
- if (this.enabled) {
1586
- this._enableCursorDragScroll();
1587
- }
1588
- else {
1589
- this._disableCursorDragScroll();
1590
- }
1591
- }
1592
- _enableCursorDragScroll() {
1593
- const contentResizeSub = combineLatest([
1594
- this._contentObserverService.observe(this._elementRef.nativeElement).pipe(startWith(null)),
1595
- this._resizeObserverService.observe(this._elementRef.nativeElement).pipe(startWith(null)),
1596
- ])
1597
- .pipe(debounceTime(25), tap(() => this._updateCanScrollState()), takeUntil(this._destroy$))
1598
- .subscribe();
1599
- const mousedownSub = fromEvent(this._elementRef.nativeElement, 'mousedown')
1600
- .pipe(tap((e) => this._onMouseDown(e)), takeUntil(this._destroy$))
1601
- .subscribe();
1602
- this._subscriptions.push(contentResizeSub, mousedownSub);
1603
- this._updateCanScrollState();
1604
- }
1605
- _disableCursorDragScroll() {
1606
- this._subscriptions.forEach((sub) => sub.unsubscribe());
1607
- this._subscriptions.length = 0;
1608
- this._elementRef.nativeElement.style.cursor = 'default';
1609
- }
1610
- _onMouseDown(e) {
1611
- var _a;
1612
- if (!((_a = this._elementRef) === null || _a === void 0 ? void 0 : _a.nativeElement) || !this._canScroll) {
1613
- return;
1614
- }
1615
- const element = this._elementRef.nativeElement;
1616
- element.classList.add(CURSOR_DRAG_SCROLLING_PREPARED_CLASS);
1617
- this._elementRef.nativeElement.style.scrollSnapType = 'none';
1618
- this._elementRef.nativeElement.style.scrollBehavior = 'unset';
1619
- this._currentScrollState = {
1620
- left: this._elementRef.nativeElement.scrollLeft,
1621
- top: this._elementRef.nativeElement.scrollTop,
1622
- x: e.clientX,
1623
- y: e.clientY,
1624
- };
1625
- fromEvent(document, 'mousemove')
1626
- .pipe(tap((e) => this._mouseMoveHandler(e)), takeUntil(this._mouseUp$), takeUntil(this._destroy$))
1627
- .subscribe();
1628
- fromEvent(document, 'mouseup')
1629
- .pipe(tap(() => this._mouseUpHandler()), take(1), takeUntil(this._destroy$))
1630
- .subscribe();
1631
- }
1632
- _mouseMoveHandler(e) {
1633
- var _a;
1634
- e.preventDefault();
1635
- if (!((_a = this._elementRef) === null || _a === void 0 ? void 0 : _a.nativeElement)) {
1636
- return;
1637
- }
1638
- const dx = e.clientX - this._currentScrollState.x;
1639
- const dy = e.clientY - this._currentScrollState.y;
1640
- if (Math.abs(dx) > this._bufferUntilScroll || Math.abs(dy) > this._bufferUntilScroll) {
1641
- const element = this._elementRef.nativeElement;
1642
- if (!this._isScrolling) {
1643
- this._isScrolling = true;
1644
- element.style.cursor = 'grabbing';
1645
- element.classList.add(CURSOR_DRAG_SCROLLING_CLASS);
1646
- element.scroll({
1647
- top: this._currentScrollState.top - dy,
1648
- left: this._currentScrollState.left - dx,
1649
- behavior: 'smooth',
1650
- });
1651
- }
1652
- else {
1653
- element.scrollTop = this._currentScrollState.top - dy;
1654
- element.scrollLeft = this._currentScrollState.left - dx;
1655
- }
1656
- }
1657
- }
1658
- _mouseUpHandler() {
1659
- var _a;
1660
- this._mouseUp$.next(true);
1661
- this._isScrolling = false;
1662
- if (!((_a = this._elementRef) === null || _a === void 0 ? void 0 : _a.nativeElement)) {
1663
- return;
1664
- }
1665
- this._elementRef.nativeElement.style.scrollSnapType = '';
1666
- this._elementRef.nativeElement.style.scrollBehavior = '';
1667
- this._elementRef.nativeElement.style.cursor = 'grab';
1668
- this._elementRef.nativeElement.classList.remove(CURSOR_DRAG_SCROLLING_CLASS);
1669
- this._elementRef.nativeElement.classList.remove(CURSOR_DRAG_SCROLLING_PREPARED_CLASS);
1670
- }
1671
- _updateCanScrollState() {
1672
- this._canScroll = elementCanScroll(this._elementRef.nativeElement);
1673
- if (this._canScroll) {
1674
- this._elementRef.nativeElement.style.cursor = 'grab';
1675
- }
1676
- else {
1677
- this._elementRef.nativeElement.style.cursor = 'default';
1678
- }
1679
- }
1680
- }
1681
- CursorDragScrollDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CursorDragScrollDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1682
- CursorDragScrollDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.7", type: CursorDragScrollDirective, isStandalone: true, selector: "[etCursorDragScroll]", inputs: { enabled: ["etCursorDragScroll", "enabled"] }, providers: [DestroyService], exportAs: ["etCursorDragScroll"], ngImport: i0 });
1683
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CursorDragScrollDirective, decorators: [{
1684
- type: Directive,
1685
- args: [{
1686
- selector: '[etCursorDragScroll]',
1687
- exportAs: 'etCursorDragScroll',
1688
- standalone: true,
1689
- providers: [DestroyService],
1690
- }]
1691
- }], propDecorators: { enabled: [{
1692
- type: Input,
1693
- args: ['etCursorDragScroll']
1694
- }] } });
1695
-
1696
- const DELAYABLE_TOKEN = new InjectionToken('DELAYABLE_DIRECTIVE_TOKEN');
1697
- class DelayableDirective {
1698
- constructor() {
1699
- this._isDelayed$ = new BehaviorSubject(false);
1700
- }
1701
- get isDelayed$() {
1702
- return this._isDelayed$.asObservable();
1703
- }
1704
- get isDelayed() {
1705
- return this._isDelayed$.value;
1706
- }
1707
- enableDelayed() {
1708
- if (this._isDelayed$.value) {
1709
- return;
1710
- }
1711
- this._isDelayed$.next(true);
1712
- }
1713
- disableDelayed() {
1714
- if (!this._isDelayed$.value) {
1715
- return;
1716
- }
1717
- this._isDelayed$.next(false);
1718
- }
1719
- setDelayed(val) {
1720
- if (this._isDelayed$.value === val) {
1721
- return;
1722
- }
1723
- this._isDelayed$.next(val);
1724
- }
1725
- }
1726
- DelayableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DelayableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1727
- DelayableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.7", type: DelayableDirective, isStandalone: true, selector: "[etDelayable]", providers: [
1728
- {
1729
- provide: DELAYABLE_TOKEN,
1730
- useExisting: DelayableDirective,
1731
- },
1732
- ], exportAs: ["etDelayable"], ngImport: i0 });
1733
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DelayableDirective, decorators: [{
1734
- type: Directive,
1735
- args: [{
1736
- selector: '[etDelayable]',
1737
- exportAs: 'etDelayable',
1738
- standalone: true,
1739
- providers: [
1740
- {
1741
- provide: DELAYABLE_TOKEN,
1742
- useExisting: DelayableDirective,
1743
- },
1744
- ],
1745
- }]
1746
- }] });
1747
-
1748
- class LetContext {
1749
- constructor() {
1750
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1751
- this.$implicit = null;
1752
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1753
- this.etLet = null;
1754
- }
1755
- }
1756
-
1757
- class LetDirective {
1758
- set etLet(value) {
1759
- this._context.$implicit = this._context.etLet = value;
1760
- this._updateView();
1761
- }
1762
- constructor(_viewContainer, templateRef) {
1763
- this._viewContainer = _viewContainer;
1764
- this._context = new LetContext();
1765
- this._templateRef = null;
1766
- this._viewRef = null;
1767
- this._templateRef = templateRef;
1768
- }
1769
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1770
- static ngTemplateContextGuard(dir, ctx) {
1771
- return true;
1772
- }
1773
- _updateView() {
1774
- if (!this._viewRef) {
1775
- this._viewContainer.clear();
1776
- if (this._templateRef) {
1777
- this._viewRef = this._viewContainer.createEmbeddedView(this._templateRef, this._context);
1778
- }
1779
- }
1780
- }
1781
- }
1782
- LetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: LetDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
1783
- LetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.7", type: LetDirective, isStandalone: true, selector: "[etLet]", inputs: { etLet: "etLet" }, ngImport: i0 });
1784
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: LetDirective, decorators: [{
1785
- type: Directive,
1786
- args: [{
1787
- selector: '[etLet]',
1788
- standalone: true,
1789
- }]
1790
- }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }]; }, propDecorators: { etLet: [{
1791
- type: Input
1792
- }] } });
1793
-
1794
- class ObserveContentDirective {
1795
- constructor() {
1796
- this._contentObserver = inject(ContentObserverService);
1797
- this._elementRef = inject(ElementRef);
1798
- this._ngZone = inject(NgZone);
1799
- this.valueChange = new EventEmitter();
1800
- this._disabled = false;
1801
- this._debounce = null;
1802
- this._currentSubscription = null;
1803
- }
1804
- get disabled() {
1805
- return this._disabled;
1806
- }
1807
- set disabled(value) {
1808
- this._disabled = coerceBooleanProperty(value);
1809
- this._disabled ? this._unsubscribe() : this._subscribe();
1810
- }
1811
- get debounce() {
1812
- return this._debounce;
1813
- }
1814
- set debounce(value) {
1815
- this._debounce = coerceNumberProperty(value);
1816
- this._subscribe();
1817
- }
1818
- ngAfterContentInit() {
1819
- if (!this._currentSubscription && !this.disabled) {
1820
- this._subscribe();
1821
- }
1822
- }
1823
- ngOnDestroy() {
1824
- this._unsubscribe();
1825
- }
1826
- _subscribe() {
1827
- this._unsubscribe();
1828
- const stream = this._contentObserver.observe(this._elementRef);
1829
- this._ngZone.runOutsideAngular(() => {
1830
- this._currentSubscription = (this.debounce ? stream.pipe(debounceTime$1(this.debounce)) : stream).subscribe(this.valueChange);
1831
- });
1832
- }
1833
- _unsubscribe() {
1834
- var _a;
1835
- (_a = this._currentSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
1836
- }
1837
- }
1838
- ObserveContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ObserveContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1839
- ObserveContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.7", type: ObserveContentDirective, isStandalone: true, selector: "[etObserveContent]", inputs: { disabled: ["etObserveContentDisabled", "disabled"], debounce: ["etObserveContentDebounce", "debounce"] }, outputs: { valueChange: "etObserveContent" }, exportAs: ["etObserveContent"], ngImport: i0 });
1840
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ObserveContentDirective, decorators: [{
1841
- type: Directive,
1842
- args: [{
1843
- selector: '[etObserveContent]',
1844
- exportAs: 'etObserveContent',
1845
- standalone: true,
1846
- }]
1847
- }], propDecorators: { valueChange: [{
1848
- type: Output,
1849
- args: ['etObserveContent']
1850
- }], disabled: [{
1851
- type: Input,
1852
- args: ['etObserveContentDisabled']
1853
- }], debounce: [{
1854
- type: Input,
1855
- args: ['etObserveContentDebounce']
1856
- }] } });
1857
-
1858
- class ObserveResizeDirective {
1859
- constructor() {
1860
- this._resizeObserver = inject(ResizeObserverService);
1861
- this._elementRef = inject(ElementRef);
1862
- this._ngZone = inject(NgZone);
1863
- this.valueChange = new EventEmitter();
1864
- this._disabled = false;
1865
- this._debounce = null;
1866
- this._currentSubscription = null;
1867
- }
1868
- get disabled() {
1869
- return this._disabled;
1870
- }
1871
- set disabled(value) {
1872
- this._disabled = coerceBooleanProperty(value);
1873
- this._disabled ? this._unsubscribe() : this._subscribe();
1874
- }
1875
- get debounce() {
1876
- return this._debounce;
1877
- }
1878
- set debounce(value) {
1879
- this._debounce = coerceNumberProperty(value);
1880
- this._subscribe();
1881
- }
1882
- ngAfterContentInit() {
1883
- if (!this._currentSubscription && !this.disabled) {
1884
- this._subscribe();
1885
- }
1886
- }
1887
- ngOnDestroy() {
1888
- this._unsubscribe();
1889
- }
1890
- _subscribe() {
1891
- this._unsubscribe();
1892
- const stream = this._resizeObserver.observe(this._elementRef);
1893
- this._ngZone.runOutsideAngular(() => {
1894
- this._currentSubscription = (this.debounce ? stream.pipe(debounceTime(this.debounce)) : stream).subscribe(this.valueChange);
1895
- });
1896
- }
1897
- _unsubscribe() {
1898
- var _a;
1899
- (_a = this._currentSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
1900
- }
1901
- }
1902
- ObserveResizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ObserveResizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1903
- ObserveResizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.7", type: ObserveResizeDirective, isStandalone: true, selector: "[etObserveResize]", inputs: { disabled: ["etObserveResizeDisabled", "disabled"], debounce: ["etObserveResizeDebounce", "debounce"] }, outputs: { valueChange: "etObserveResize" }, exportAs: ["etObserveResize"], ngImport: i0 });
1904
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ObserveResizeDirective, decorators: [{
1905
- type: Directive,
1906
- args: [{
1907
- selector: '[etObserveResize]',
1908
- exportAs: 'etObserveResize',
1909
- standalone: true,
1910
- }]
1911
- }], propDecorators: { valueChange: [{
1912
- type: Output,
1913
- args: ['etObserveResize']
1914
- }], disabled: [{
1915
- type: Input,
1916
- args: ['etObserveResizeDisabled']
1917
- }], debounce: [{
1918
- type: Input,
1919
- args: ['etObserveResizeDebounce']
1920
- }] } });
1921
-
1922
- const SCROLL_OBSERVER_FIRST_ELEMENT_CLASS = 'et-scroll-observer-first-element';
1923
- class ScrollObserverFirstElementDirective {
1924
- constructor() {
1925
- this._isFirstElement = false;
1926
- }
1927
- get isFirstElement() {
1928
- return this._isFirstElement;
1929
- }
1930
- set isFirstElement(value) {
1931
- this._isFirstElement = coerceBooleanProperty(value);
1932
- }
1933
- }
1934
- ScrollObserverFirstElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ScrollObserverFirstElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1935
- ScrollObserverFirstElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.7", type: ScrollObserverFirstElementDirective, isStandalone: true, selector: "[etScrollObserverFirstElement]", inputs: { isFirstElement: ["etScrollObserverFirstElement", "isFirstElement"] }, host: { properties: { "class.et-scroll-observer-first-element": "this.isFirstElement" } }, ngImport: i0 });
1936
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ScrollObserverFirstElementDirective, decorators: [{
1937
- type: Directive,
1938
- args: [{
1939
- selector: '[etScrollObserverFirstElement]',
1940
- standalone: true,
1941
- }]
1942
- }], propDecorators: { isFirstElement: [{
1943
- type: Input,
1944
- args: ['etScrollObserverFirstElement']
1945
- }, {
1946
- type: HostBinding,
1947
- args: [`class.${SCROLL_OBSERVER_FIRST_ELEMENT_CLASS}`]
1948
- }] } });
1949
-
1950
- const SCROLL_OBSERVER_IGNORE_TARGET_CLASS = 'et-scroll-observer-ignore-target';
1951
- class ScrollObserverIgnoreTargetDirective {
1952
- }
1953
- ScrollObserverIgnoreTargetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ScrollObserverIgnoreTargetDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1954
- ScrollObserverIgnoreTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.7", type: ScrollObserverIgnoreTargetDirective, isStandalone: true, selector: "[etScrollObserverIgnoreTarget]", host: { classAttribute: "et-scroll-observer-ignore-target" }, ngImport: i0 });
1955
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ScrollObserverIgnoreTargetDirective, decorators: [{
1956
- type: Directive,
1957
- args: [{
1958
- selector: '[etScrollObserverIgnoreTarget]',
1959
- standalone: true,
1960
- host: {
1961
- class: SCROLL_OBSERVER_IGNORE_TARGET_CLASS,
1962
- },
1963
- }]
1964
- }] });
1965
-
1966
- const SCROLL_OBSERVER_LAST_ELEMENT_CLASS = 'et-scroll-observer-last-element';
1967
- class ScrollObserverLastElementDirective {
1968
- constructor() {
1969
- this._isLastElement = false;
1970
- }
1971
- get isLastElement() {
1972
- return this._isLastElement;
1973
- }
1974
- set isLastElement(value) {
1975
- this._isLastElement = coerceBooleanProperty(value);
1976
- }
1977
- }
1978
- ScrollObserverLastElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ScrollObserverLastElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1979
- ScrollObserverLastElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.7", type: ScrollObserverLastElementDirective, isStandalone: true, selector: "[etScrollObserverLastElement]", inputs: { isLastElement: ["etScrollObserverLastElement", "isLastElement"] }, host: { properties: { "class.et-scroll-observer-last-element": "this.isLastElement" }, classAttribute: "et-scroll-observer-last-element" }, ngImport: i0 });
1980
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ScrollObserverLastElementDirective, decorators: [{
1981
- type: Directive,
1982
- args: [{
1983
- selector: '[etScrollObserverLastElement]',
1984
- standalone: true,
1985
- host: {
1986
- class: SCROLL_OBSERVER_LAST_ELEMENT_CLASS,
1987
- },
1988
- }]
1989
- }], propDecorators: { isLastElement: [{
1990
- type: Input,
1991
- args: ['etScrollObserverLastElement']
1992
- }, {
1993
- type: HostBinding,
1994
- args: [`class.${SCROLL_OBSERVER_LAST_ELEMENT_CLASS}`]
1995
- }] } });
1996
-
1997
- const OBSERVE_SCROLL_STATE = new InjectionToken('OBSERVE_SCROLL_STATE');
1998
-
1999
- class ObserveScrollStateDirective {
2000
- constructor() {
2001
- this._destroy$ = inject(DestroyService, { host: true }).destroy$;
2002
- this._elementRef = inject(ElementRef);
2003
- this._contentObserverService = inject(ContentObserverService);
2004
- this._resizeObserverService = inject(ResizeObserverService);
2005
- this._observedChildren = {
2006
- first: this._firstCurrentChild,
2007
- last: this._lastCurrentChild,
2008
- };
2009
- this._rootMargin = 0;
2010
- this._threshold = [0.99999, 0.9999, 0.999, 0.99, 1];
2011
- this._intersectionObserver = null;
2012
- this.valueChange = new EventEmitter();
2013
- }
2014
- get _firstCurrentChild() {
2015
- const explicitFirstElement = this._elementRef.nativeElement.querySelector(`.${SCROLL_OBSERVER_FIRST_ELEMENT_CLASS}`);
2016
- if (explicitFirstElement) {
2017
- return explicitFirstElement;
2018
- }
2019
- const element = this._elementRef.nativeElement.children[0];
2020
- return this._getNonIgnoredChild(element, 'next');
2021
- }
2022
- get _lastCurrentChild() {
2023
- const explicitLastElement = this._elementRef.nativeElement.querySelector(`.${SCROLL_OBSERVER_LAST_ELEMENT_CLASS}`);
2024
- if (explicitLastElement) {
2025
- return explicitLastElement;
2026
- }
2027
- const element = this._elementRef.nativeElement.children[this._elementRef.nativeElement.children.length - 1];
2028
- return this._getNonIgnoredChild(element, 'previous');
2029
- }
2030
- get observerRootMargin() {
2031
- return this._rootMargin;
2032
- }
2033
- set observerRootMargin(value) {
2034
- this._rootMargin = coerceNumberProperty(value);
2035
- }
2036
- get observerThreshold() {
2037
- return this._threshold;
2038
- }
2039
- set observerThreshold(value) {
2040
- if (Array.isArray(value)) {
2041
- this._threshold = value;
2042
- return;
2043
- }
2044
- this._threshold = coerceNumberProperty(value);
2045
- }
2046
- ngOnInit() {
2047
- this._contentObserverService
2048
- .observe(this._elementRef.nativeElement)
2049
- .pipe(debounceTime(25), tap(() => this._checkChildren()), takeUntil(this._destroy$))
2050
- .subscribe();
2051
- this._resizeObserverService
2052
- .observe(this._elementRef.nativeElement)
2053
- .pipe(debounceTime(25), tap(() => {
2054
- const canScroll = elementCanScroll(this._elementRef.nativeElement);
2055
- if ((!this._intersectionObserver && canScroll) || (this._intersectionObserver && !canScroll)) {
2056
- this._checkChildren();
2057
- }
2058
- }), takeUntil(this._destroy$))
2059
- .subscribe();
2060
- this._checkChildren();
2061
- }
2062
- ngOnDestroy() {
2063
- this._clearIntersectionObserver();
2064
- }
2065
- _checkChildren() {
2066
- this._clearIntersectionObserver();
2067
- if (this._firstCurrentChild === this._lastCurrentChild ||
2068
- !this._firstCurrentChild ||
2069
- !this._lastCurrentChild ||
2070
- !elementCanScroll(this._elementRef.nativeElement)) {
2071
- this._unobserveChild('first');
2072
- this._unobserveChild('last');
2073
- this.valueChange.emit({
2074
- isAtStart: true,
2075
- isAtEnd: true,
2076
- canScroll: false,
2077
- });
2078
- }
2079
- else {
2080
- this._intersectionObserver = this._initiateIntersectionObserver();
2081
- this._observeChild('first', this._firstCurrentChild);
2082
- this._observeChild('last', this._lastCurrentChild);
2083
- }
2084
- }
2085
- _initiateIntersectionObserver() {
2086
- const observer = new IntersectionObserver((entries) => {
2087
- var _a, _b, _c, _d;
2088
- const { first, last } = this._observedChildren;
2089
- const isAtStart = (_b = (_a = entries.find((entry) => entry.target === first)) === null || _a === void 0 ? void 0 : _a.isIntersecting) !== null && _b !== void 0 ? _b : false;
2090
- const isAtEnd = (_d = (_c = entries.find((entry) => entry.target === last)) === null || _c === void 0 ? void 0 : _c.isIntersecting) !== null && _d !== void 0 ? _d : false;
2091
- this.valueChange.emit({
2092
- isAtStart,
2093
- isAtEnd,
2094
- canScroll: !isAtStart || !isAtEnd,
2095
- });
2096
- }, {
2097
- root: this._elementRef.nativeElement,
2098
- rootMargin: this._rootMargin ? `${this._rootMargin}px` : undefined,
2099
- threshold: this._threshold,
2100
- });
2101
- return observer;
2102
- }
2103
- _observeChild(child, element) {
2104
- var _a;
2105
- (_a = this._intersectionObserver) === null || _a === void 0 ? void 0 : _a.observe(element);
2106
- this._observedChildren[child] = element;
2107
- element.classList.add(`et-scroll-observer-observing-${child}-element`);
2108
- }
2109
- _unobserveChild(child) {
2110
- var _a;
2111
- const observedChild = this._observedChildren[child];
2112
- if (!observedChild) {
2113
- return;
2114
- }
2115
- observedChild.classList.remove('et-scroll-observer-observing-first-element', 'et-scroll-observer-observing-last-element');
2116
- (_a = this._intersectionObserver) === null || _a === void 0 ? void 0 : _a.unobserve(observedChild);
2117
- this._observedChildren[child] = null;
2118
- }
2119
- _clearIntersectionObserver() {
2120
- var _a;
2121
- (_a = this._intersectionObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
2122
- this._intersectionObserver = null;
2123
- }
2124
- _getNonIgnoredChild(element, direction) {
2125
- if (!element) {
2126
- return null;
2127
- }
2128
- if (element === null || element === void 0 ? void 0 : element.classList.contains(SCROLL_OBSERVER_IGNORE_TARGET_CLASS)) {
2129
- const nextElement = element[`${direction}ElementSibling`];
2130
- if (!nextElement) {
2131
- return null;
2132
- }
2133
- return this._getNonIgnoredChild(nextElement, direction);
2134
- }
2135
- return element;
2136
- }
2137
- }
2138
- ObserveScrollStateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ObserveScrollStateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2139
- ObserveScrollStateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.7", type: ObserveScrollStateDirective, isStandalone: true, selector: "[etObserveScrollState]", inputs: { observerRootMargin: "observerRootMargin", observerThreshold: "observerThreshold" }, outputs: { valueChange: "etObserveScrollState" }, providers: [
2140
- {
2141
- provide: OBSERVE_SCROLL_STATE,
2142
- useExisting: ObserveScrollStateDirective,
2143
- },
2144
- DestroyService,
2145
- ], exportAs: ["etObserveScrollState"], ngImport: i0 });
2146
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ObserveScrollStateDirective, decorators: [{
2147
- type: Directive,
2148
- args: [{
2149
- selector: '[etObserveScrollState]',
2150
- exportAs: 'etObserveScrollState',
2151
- standalone: true,
2152
- providers: [
2153
- {
2154
- provide: OBSERVE_SCROLL_STATE,
2155
- useExisting: ObserveScrollStateDirective,
2156
- },
2157
- DestroyService,
2158
- ],
2159
- }]
2160
- }], propDecorators: { observerRootMargin: [{
2161
- type: Input
2162
- }], observerThreshold: [{
2163
- type: Input
2164
- }], valueChange: [{
2165
- type: Output,
2166
- args: ['etObserveScrollState']
2167
- }] } });
2168
-
2169
- class RepeatDirective {
2170
- get repeatCount() {
2171
- return this._repeatCount;
2172
- }
2173
- set repeatCount(value) {
2174
- this._repeatCount = coerceNumberProperty(value);
2175
- this._render();
2176
- }
2177
- constructor(_mainTemplateRef, _viewContainerRef) {
2178
- this._mainTemplateRef = _mainTemplateRef;
2179
- this._viewContainerRef = _viewContainerRef;
2180
- this._repeatCount = 2;
2181
- }
2182
- _render() {
2183
- this._viewContainerRef.clear();
2184
- for (let i = 0; i < this.repeatCount; i++) {
2185
- this._viewContainerRef.createEmbeddedView(this._mainTemplateRef);
2186
- }
2187
- }
2188
- }
2189
- RepeatDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: RepeatDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
2190
- RepeatDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.7", type: RepeatDirective, isStandalone: true, selector: "[etRepeat]", inputs: { repeatCount: ["etRepeat", "repeatCount"] }, ngImport: i0 });
2191
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: RepeatDirective, decorators: [{
2192
- type: Directive,
2193
- args: [{
2194
- selector: '[etRepeat]',
2195
- standalone: true,
2196
- }]
2197
- }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; }, propDecorators: { repeatCount: [{
2198
- type: Input,
2199
- args: ['etRepeat']
2200
- }] } });
2201
-
2202
- const SEO_DIRECTIVE_TOKEN = new InjectionToken('SEO_DIRECTIVE_TOKEN');
2203
-
2204
- const mergeSeoConfig = (config, parentConfig) => {
2205
- return Object.assign(Object.assign({}, parentConfig), config);
2206
- };
2207
-
2208
- class SeoDirective {
2209
- constructor() {
2210
- this._metaService = inject(Meta);
2211
- this._titleService = inject(Title);
2212
- this._onDeactivate$ = new Subject();
2213
- this._isDeactivated = false;
2214
- this.parent = inject(SEO_DIRECTIVE_TOKEN, { optional: true, skipSelf: true });
2215
- this._config = {};
2216
- }
2217
- get config() {
2218
- return this._config;
2219
- }
2220
- ngOnInit() {
2221
- var _a;
2222
- (_a = this.parent) === null || _a === void 0 ? void 0 : _a._deactivate();
2223
- }
2224
- ngOnDestroy() {
2225
- var _a;
2226
- this._deactivate();
2227
- this._cleanUp();
2228
- (_a = this.parent) === null || _a === void 0 ? void 0 : _a._activate();
2229
- }
2230
- // TODO(TRB): This should get split up into multiple methods to make it more readable
2231
- // - updateTitle
2232
- // - updateMeta
2233
- // - updateLink
2234
- updateConfig(config) {
2235
- var _a;
2236
- this._config = mergeSeoConfig(config, ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.config) || {});
2237
- if (this._isDeactivated) {
2238
- return;
2239
- }
2240
- this._deactivate();
2241
- this._activate();
2242
- }
2243
- _activate() {
2244
- this._onDeactivate$.next(false);
2245
- this._isDeactivated = false;
2246
- for (const [key, value] of Object.entries(this._config)) {
2247
- if (value instanceof Observable) {
2248
- value.pipe(takeUntil(this._onDeactivate$)).subscribe((value) => this._update(key, value));
2249
- }
2250
- else if (Array.isArray(value)) {
2251
- value.forEach((value) => {
2252
- if (value instanceof Observable) {
2253
- value.pipe(takeUntil(this._onDeactivate$)).subscribe((value) => this._update(key, value));
2254
- }
2255
- else {
2256
- this._update(key, value);
2257
- }
2258
- });
2259
- }
2260
- else if (typeof value === 'object' && value !== null) {
2261
- for (const [subKey, subValue] of Object.entries(value)) {
2262
- if (subValue instanceof Observable) {
2263
- subValue.pipe(takeUntil(this._onDeactivate$)).subscribe((value) => this._update(`${key}:${subKey}`, value));
2264
- }
2265
- else {
2266
- this._update(`${key}:${subKey}`, subValue);
2267
- }
2268
- }
2269
- }
2270
- else {
2271
- this._update(key, value);
2272
- }
2273
- }
2274
- }
2275
- _deactivate() {
2276
- this._onDeactivate$.next(true);
2277
- this._isDeactivated = true;
2278
- }
2279
- _update(key, value) {
2280
- switch (key) {
2281
- case 'title':
2282
- if (value && typeof value === 'string') {
2283
- this._titleService.setTitle(value);
2284
- }
2285
- break;
2286
- case 'canonical':
2287
- {
2288
- const link = document.querySelector(`link[rel="${key}"]`);
2289
- if (link) {
2290
- link.setAttribute('href', value);
2291
- }
2292
- else {
2293
- const newLink = document.createElement('link');
2294
- newLink.setAttribute('rel', key);
2295
- newLink.setAttribute('href', value);
2296
- document.head.appendChild(newLink);
2297
- }
2298
- }
2299
- break;
2300
- case 'alternate':
2301
- {
2302
- const link = document.querySelector(`link[rel="${key}"][hreflang="${value.hreflang}"]`);
2303
- if (link) {
2304
- link.setAttribute('href', value.href);
2305
- }
2306
- else {
2307
- const newLink = document.createElement('link');
2308
- newLink.setAttribute('rel', key);
2309
- newLink.setAttribute('hreflang', value.hreflang);
2310
- newLink.setAttribute('href', value.href);
2311
- document.head.appendChild(newLink);
2312
- }
2313
- }
2314
- break;
2315
- default:
2316
- if (value !== undefined && value !== null) {
2317
- const val = Array.isArray(value) ? value.join(', ') : value;
2318
- this._metaService.updateTag({ name: key, content: val });
2319
- }
2320
- else {
2321
- this._metaService.removeTag(`name="${key}"`);
2322
- }
2323
- break;
2324
- }
2325
- }
2326
- _cleanUp() {
2327
- var _a, _b, _c, _d, _e;
2328
- for (const key in this._config) {
2329
- if (key === 'alternate') {
2330
- const links = document.querySelectorAll(`link[rel="${key}"]`);
2331
- links.forEach((link) => {
2332
- link.remove();
2333
- });
2334
- continue;
2335
- }
2336
- if (key === 'canonical') {
2337
- const link = document.querySelector(`link[rel="${key}"]`);
2338
- if (link) {
2339
- link.remove();
2340
- }
2341
- continue;
2342
- }
2343
- if (typeof this._config[key] === 'object' &&
2344
- this._config[key] !== null &&
2345
- !(this._config[key] instanceof Observable)) {
2346
- for (const subKey in this._config[key]) {
2347
- const parentValue = (_c = (_b = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b[key]) === null || _c === void 0 ? void 0 : _c[subKey];
2348
- if (parentValue === undefined) {
2349
- this._update(`${key}:${subKey}`, undefined);
2350
- }
2351
- }
2352
- }
2353
- else {
2354
- const parentValue = (_e = (_d = this.parent) === null || _d === void 0 ? void 0 : _d.config) === null || _e === void 0 ? void 0 : _e[key];
2355
- if (parentValue === undefined) {
2356
- this._update(key, null);
2357
- }
2358
- }
2359
- }
2360
- }
2361
- }
2362
- SeoDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: SeoDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2363
- SeoDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.7", type: SeoDirective, isStandalone: true, providers: [{ provide: SEO_DIRECTIVE_TOKEN, useExisting: SeoDirective }], ngImport: i0 });
2364
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: SeoDirective, decorators: [{
2365
- type: Directive,
2366
- args: [{
2367
- standalone: true,
2368
- providers: [{ provide: SEO_DIRECTIVE_TOKEN, useExisting: SeoDirective }],
2369
- }]
2370
- }] });
2371
-
2372
- // TODO(TRB): Add correct type once provided by API
2373
- const normalizeGameResultType = (type) => {
2374
- if (!type) {
2375
- return null;
2376
- }
2377
- switch (type) {
2378
- case 'extra_time':
2379
- return {
2380
- i18n: 'game-result-type.extra-time',
2381
- shortCode: 'AET',
2382
- text: 'After Extra Time',
2383
- };
2384
- case 'penalty':
2385
- return {
2386
- i18n: 'game-result-type.penalty',
2387
- shortCode: 'PSO',
2388
- text: 'Penalty shootout',
2389
- };
2390
- case 'golden_goal':
2391
- return {
2392
- i18n: 'game-result-type.golden-goal',
2393
- shortCode: 'GG',
2394
- text: 'Golden Goal',
2395
- };
2396
- case 'default':
2397
- default:
2398
- return {
2399
- i18n: 'game-result-type.full-time',
2400
- shortCode: 'FT',
2401
- text: 'Full Time',
2402
- };
2403
- }
2404
- };
2405
-
2406
- class NormalizeGameResultTypePipe {
2407
- constructor() {
2408
- this.transform = normalizeGameResultType;
2409
- }
2410
- }
2411
- NormalizeGameResultTypePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: NormalizeGameResultTypePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2412
- NormalizeGameResultTypePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.7", ngImport: i0, type: NormalizeGameResultTypePipe, isStandalone: true, name: "etNormalizeGameResultType" });
2413
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: NormalizeGameResultTypePipe, decorators: [{
2414
- type: Pipe,
2415
- args: [{ name: 'etNormalizeGameResultType', standalone: true }]
2416
- }] });
2417
-
2418
- const normalizeMatchState = (match) => {
2419
- if (match === null || match === void 0 ? void 0 : match.isCompletedByReferee) {
2420
- return "autoWin" /* MatchStateType.AUTO_WIN */;
2421
- }
2422
- else if ((match === null || match === void 0 ? void 0 : match.status) === 'preparing') {
2423
- return "preMatch" /* MatchStateType.PRE_MATCH */;
2424
- }
2425
- else if ((match === null || match === void 0 ? void 0 : match.status) === 'started') {
2426
- return "live" /* MatchStateType.LIVE */;
2427
- }
2428
- else if ((match === null || match === void 0 ? void 0 : match.status) === 'published' || (match === null || match === void 0 ? void 0 : match.status) === 'finished') {
2429
- return "postMatch" /* MatchStateType.POST_MATCH */;
2430
- }
2431
- else if ((match === null || match === void 0 ? void 0 : match.round.state) !== 'preparing') {
2432
- return "preparingRound" /* MatchStateType.PREPARING_ROUND */;
2433
- }
2434
- return null;
2435
- };
2436
-
2437
- class NormalizeMatchStatePipe {
2438
- constructor() {
2439
- this.transform = normalizeMatchState;
2440
- }
2441
- }
2442
- NormalizeMatchStatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: NormalizeMatchStatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2443
- NormalizeMatchStatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.7", ngImport: i0, type: NormalizeMatchStatePipe, isStandalone: true, name: "etNormalizeMatchState" });
2444
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: NormalizeMatchStatePipe, decorators: [{
2445
- type: Pipe,
2446
- args: [{ name: 'etNormalizeMatchState', standalone: true }]
2447
- }] });
2448
-
2449
- const normalizeMatchParticipants = (match) => {
2450
- const matchState = normalizeMatchState(match);
2451
- if (!match || !matchState) {
2452
- return null;
2453
- }
2454
- return {
2455
- home: normalizeMatchParticipant(match, 'home'),
2456
- away: normalizeMatchParticipant(match, 'away'),
2457
- };
2458
- };
2459
- const normalizeMatchParticipant = (match, side) => {
2460
- var _a, _b, _c, _d;
2461
- const matchState = normalizeMatchState(match);
2462
- if (!match || !matchState) {
2463
- return null;
2464
- }
2465
- const participant = match[side];
2466
- const participantType = (_d = (_b = (_a = match.home) === null || _a === void 0 ? void 0 : _a.type) !== null && _b !== void 0 ? _b : (_c = match.away) === null || _c === void 0 ? void 0 : _c.type) !== null && _d !== void 0 ? _d : 'unknown';
2467
- if (!participant) {
2468
- if (matchState === "postMatch" /* MatchStateType.POST_MATCH */ || matchState === "autoWin" /* MatchStateType.AUTO_WIN */) {
2469
- return {
2470
- participantType,
2471
- type: 'none',
2472
- i18n: 'match-participant.none',
2473
- text: 'No opponent',
2474
- data: participant,
2475
- };
2476
- }
2477
- else {
2478
- return {
2479
- participantType,
2480
- type: 'tbd',
2481
- i18n: 'match-participant.tbd',
2482
- text: 'TBD',
2483
- data: participant,
2484
- };
2485
- }
2486
- }
2487
- else {
2488
- return {
2489
- participantType,
2490
- type: 'participant',
2491
- data: participant,
2492
- };
2493
- }
2494
- };
2495
-
2496
- class NormalizeMatchParticipantsPipe {
2497
- constructor() {
2498
- this.transform = normalizeMatchParticipants;
2499
- }
2500
- }
2501
- NormalizeMatchParticipantsPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: NormalizeMatchParticipantsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2502
- NormalizeMatchParticipantsPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.7", ngImport: i0, type: NormalizeMatchParticipantsPipe, isStandalone: true, name: "etNormalizeMatchParticipants" });
2503
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: NormalizeMatchParticipantsPipe, decorators: [{
2504
- type: Pipe,
2505
- args: [{ name: 'etNormalizeMatchParticipants', standalone: true }]
2506
- }] });
2507
-
2508
- const EMPTY_SCORE = {
2509
- home: { score: 'match-score.placeholder', isWinner: false },
2510
- away: { score: 'match-score.placeholder', isWinner: false },
2511
- isNumeric: false,
2512
- subLine: null,
2513
- };
2514
- const normalizeMatchScore = (match) => {
2515
- var _a, _b;
2516
- if (!match) {
2517
- return null;
2518
- }
2519
- const matchState = normalizeMatchState(match);
2520
- const subLine = getMatchScoreSubLine(match);
2521
- if (!match.homeScore && !match.awayScore) {
2522
- return Object.assign(Object.assign({}, EMPTY_SCORE), { subLine, isNumeric: false });
2523
- }
2524
- if (isKnockoutMatch(match)) {
2525
- if (matchState === "preMatch" /* MatchStateType.PRE_MATCH */ || matchState === "live" /* MatchStateType.LIVE */) {
2526
- return Object.assign(Object.assign({}, EMPTY_SCORE), { subLine, isNumeric: false });
2527
- }
2528
- return {
2529
- home: {
2530
- score: getKnockoutMatchScore(match.homeScore),
2531
- isWinner: ((_a = match.homeScore) === null || _a === void 0 ? void 0 : _a.status) === 'won',
2532
- },
2533
- away: {
2534
- score: getKnockoutMatchScore(match.awayScore),
2535
- isWinner: ((_b = match.awayScore) === null || _b === void 0 ? void 0 : _b.status) === 'won',
2536
- },
2537
- subLine,
2538
- isNumeric: false,
2539
- };
2540
- }
2541
- else if (isGroupMatch(match)) {
2542
- if (match.games.length === 1) {
2543
- // Return the score if only one game has been played
2544
- return Object.assign(Object.assign({}, getGroupMatchScore(match)), { subLine, isNumeric: true });
2545
- }
2546
- else {
2547
- return Object.assign(Object.assign({}, getGroupMatchPoints(match)), { subLine, isNumeric: true });
2548
- }
2549
- }
2550
- else {
2551
- return Object.assign(Object.assign({}, getGroupMatchScore(match)), { subLine, isNumeric: true });
2552
- }
2553
- };
2554
- const isKnockoutMatch = (match) => {
2555
- if (!match) {
2556
- return false;
2557
- }
2558
- return (match.matchType === 'single_elimination' ||
2559
- match.matchType === 'double_elimination' ||
2560
- match.matchType === 'fifa_swiss');
2561
- };
2562
- const isGroupMatch = (match) => {
2563
- if (!match) {
2564
- return false;
2565
- }
2566
- return match.matchType === 'groups' || match.matchType === 'league';
2567
- };
2568
- const getKnockoutMatchScore = (score) => {
2569
- if ((score === null || score === void 0 ? void 0 : score.status) === 'won') {
2570
- return 'match-score.knockout.won';
2571
- }
2572
- else if ((score === null || score === void 0 ? void 0 : score.status) === 'lost') {
2573
- return 'match-score.knockout.lost';
2574
- }
2575
- else if ((score === null || score === void 0 ? void 0 : score.status) === 'tie') {
2576
- return 'match-score.knockout.tie';
2577
- }
2578
- return null;
2579
- };
2580
- const getMatchScoreSubLine = (match) => {
2581
- if (isKnockoutMatch(match)) {
2582
- return null;
2583
- }
2584
- else if (isGroupMatch(match)) {
2585
- return 'match-score.groups.sub-line';
2586
- }
2587
- else {
2588
- return null;
2589
- }
2590
- };
2591
- const getGroupMatchScore = (match) => {
2592
- var _a, _b, _c, _d;
2593
- if (!match) {
2594
- return null;
2595
- }
2596
- return {
2597
- home: {
2598
- score: ((_a = match.homeScore) === null || _a === void 0 ? void 0 : _a.ownPoints) || 0,
2599
- isWinner: ((_b = match.homeScore) === null || _b === void 0 ? void 0 : _b.status) === 'won',
2600
- },
2601
- away: {
2602
- score: ((_c = match.awayScore) === null || _c === void 0 ? void 0 : _c.ownPoints) || 0,
2603
- isWinner: ((_d = match.awayScore) === null || _d === void 0 ? void 0 : _d.status) === 'won',
2604
- },
2605
- };
2606
- };
2607
- const getGroupMatchPoints = (match) => {
2608
- var _a, _b, _c, _d;
2609
- if (!match) {
2610
- return null;
2611
- }
2612
- return {
2613
- home: {
2614
- score: ((_a = match.homeScore) === null || _a === void 0 ? void 0 : _a.score) || 0,
2615
- isWinner: ((_b = match.homeScore) === null || _b === void 0 ? void 0 : _b.status) === 'won',
2616
- },
2617
- away: {
2618
- score: ((_c = match.awayScore) === null || _c === void 0 ? void 0 : _c.score) || 0,
2619
- isWinner: ((_d = match.awayScore) === null || _d === void 0 ? void 0 : _d.status) === 'won',
2620
- },
2621
- };
2622
- };
2623
-
2624
- class NormalizeMatchScorePipe {
2625
- constructor() {
2626
- this.transform = normalizeMatchScore;
2627
- }
2628
- }
2629
- NormalizeMatchScorePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: NormalizeMatchScorePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2630
- NormalizeMatchScorePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.7", ngImport: i0, type: NormalizeMatchScorePipe, isStandalone: true, name: "etNormalizeMatchScore" });
2631
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: NormalizeMatchScorePipe, decorators: [{
2632
- type: Pipe,
2633
- args: [{ name: 'etNormalizeMatchScore', standalone: true }]
2634
- }] });
2635
-
2636
- const normalizeMatchType = (matchType) => {
2637
- if (!matchType) {
2638
- return null;
2639
- }
2640
- switch (matchType) {
2641
- case 'double_elimination':
2642
- return {
2643
- i18n: 'match-type.double-elimination',
2644
- text: 'Double Elimination',
2645
- };
2646
- case 'single_elimination':
2647
- return {
2648
- i18n: 'match-type.single-elimination',
2649
- text: 'Single Elimination',
2650
- };
2651
- case 'fifa_swiss':
2652
- return {
2653
- i18n: 'match-type.fifa-swiss',
2654
- text: 'FIFA Swiss',
2655
- };
2656
- case 'groups':
2657
- return {
2658
- i18n: 'match-type.groups',
2659
- text: 'Groups',
2660
- };
2661
- case 'league':
2662
- return {
2663
- i18n: 'match-type.league',
2664
- text: 'League',
2665
- };
2666
- case 'pools':
2667
- return {
2668
- i18n: 'match-type.pools',
2669
- text: 'Pools',
2670
- };
2671
- }
2672
- };
2673
-
2674
- class NormalizeMatchTypePipe {
2675
- constructor() {
2676
- this.transform = normalizeMatchType;
2677
- }
2678
- }
2679
- NormalizeMatchTypePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: NormalizeMatchTypePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2680
- NormalizeMatchTypePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.7", ngImport: i0, type: NormalizeMatchTypePipe, isStandalone: true, name: "etNormalizeMatchType" });
2681
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: NormalizeMatchTypePipe, decorators: [{
2682
- type: Pipe,
2683
- args: [{ name: 'etNormalizeMatchType', standalone: true }]
2684
- }] });
2685
-
2686
- const toArray = (value) => {
2687
- return Array.from({ length: value }, (_, i) => i);
2688
- };
2689
- const toArrayTrackByFn = (_, item) => item;
2690
-
2691
- class ToArrayPipe {
2692
- constructor() {
2693
- this.transform = toArray;
2694
- }
2695
- }
2696
- ToArrayPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ToArrayPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2697
- ToArrayPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.7", ngImport: i0, type: ToArrayPipe, isStandalone: true, name: "toArray" });
2698
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ToArrayPipe, decorators: [{
2699
- type: Pipe,
2700
- args: [{ name: 'toArray', standalone: true }]
2701
- }] });
2702
-
2703
- var _a;
2704
- class TypedQueryList extends QueryList {
2705
- constructor() {
2706
- super(...arguments);
2707
- this[_a] = () => {
2708
- return super[Symbol.iterator]();
2709
- };
2710
- }
2711
- get changes() {
2712
- return super.changes;
2713
- }
2714
- toArray() {
2715
- return super.toArray();
2716
- }
2717
- forEach(fn) {
2718
- super.forEach(fn);
2719
- }
2720
- filter(fn) {
2721
- return super.filter(fn);
2722
- }
2723
- map(fn) {
2724
- return super.map(fn);
2725
- }
2726
- reduce(fn, initialValue) {
2727
- return super.reduce(fn, initialValue);
2728
- }
2729
- some(fn) {
2730
- return super.some(fn);
2731
- }
2732
- find(fn) {
2733
- return super.find(fn);
2734
- }
2735
- }
2736
- _a = Symbol.iterator;
2737
-
2738
- const IS_ARRAY_NOT_EMPTY = 'isArrayNotEmpty';
2739
- const IsArrayNotEmpty = (control) => {
2740
- const value = control.value;
2741
- if (!value) {
2742
- return null;
2743
- }
2744
- return value.length > 0 ? null : { [IS_ARRAY_NOT_EMPTY]: true };
2745
- };
2746
-
2747
- const IS_EMAIL = 'isEmail';
2748
- const IsEmail = (control) => {
2749
- const value = control.value;
2750
- if (!value) {
2751
- return null;
2752
- }
2753
- const regex = /^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$/;
2754
- return regex.test(value) ? null : { [IS_EMAIL]: true };
2755
- };
2756
-
2757
- const MUST_MATCH = 'mustMatch';
2758
- const MustMatch = (controlName, matchingControlName) => {
2759
- return (formGroup) => {
2760
- const control = formGroup.controls[controlName];
2761
- const matchingControl = formGroup.controls[matchingControlName];
2762
- // set error on matchingControl if validation fails
2763
- if (matchingControl.errors && !matchingControl.errors[MUST_MATCH]) {
2764
- return;
2765
- }
2766
- // set error on matchingControl if validation fails
2767
- if (control.value !== matchingControl.value) {
2768
- matchingControl.setErrors({ [MUST_MATCH]: true });
2769
- }
2770
- else {
2771
- matchingControl.setErrors(null);
2772
- }
2773
- };
2774
- };
2775
-
2776
- const Validators = {
2777
- MustMatch,
2778
- IsEmail,
2779
- IsArrayNotEmpty,
2780
- };
2781
-
2782
- /**
2783
- * Generated bundle index. Do not edit.
2784
- */
2785
-
2786
- export { ANIMATABLE_TOKEN, ANIMATED_LIFECYCLE_TOKEN, AnimatableDirective, AnimatedLifecycleDirective, BehaviorSubjectWithSubscriberCount, ClickObserverFactory, ClickObserverService, ClickOutsideDirective, ContentObserverService, CursorDragScrollDirective, DEFAULT_VIEWPORT_CONFIG, DELAYABLE_TOKEN, DelayableDirective, DestroyService, FocusVisibleService, IS_ARRAY_NOT_EMPTY, IS_EMAIL, IsArrayNotEmpty, IsEmail, LetContext, LetDirective, MUST_MATCH, Memo, MustMatch, MutationObserverFactory, NormalizeGameResultTypePipe, NormalizeMatchParticipantsPipe, NormalizeMatchScorePipe, NormalizeMatchStatePipe, NormalizeMatchTypePipe, OBSERVE_SCROLL_STATE, ObserveContentDirective, ObserveResizeDirective, ObserveScrollStateDirective, RepeatDirective, ResizeObserverFactory, ResizeObserverService, RouterStateService, SCROLL_OBSERVER_FIRST_ELEMENT_CLASS, SCROLL_OBSERVER_IGNORE_TARGET_CLASS, SCROLL_OBSERVER_LAST_ELEMENT_CLASS, SEO_DIRECTIVE_TOKEN, ScrollObserverFirstElementDirective, ScrollObserverIgnoreTargetDirective, ScrollObserverLastElementDirective, SeoDirective, SmartBlockScrollStrategy, StructuredDataComponent, ToArrayPipe, TypedQueryList, VIEWPORT_CONFIG, Validators, ViewportService, clamp, clone, createFlipAnimation, createFlipAnimationGroup, createMediaQueryObservable, createReactiveBindings, deleteCookie, elementCanScroll, equal, forceReflow, fromNextFrame, getCookie, getDomain, getGroupMatchPoints, getGroupMatchScore, getKnockoutMatchScore, getMatchScoreSubLine, hasCookie, isElementVisible, isGroupMatch, isKnockoutMatch, mergeSeoConfig, nextFrame, normalizeGameResultType, normalizeMatchParticipant, normalizeMatchParticipants, normalizeMatchScore, normalizeMatchState, normalizeMatchType, provideViewportConfig, routerDisableScrollTop, scrollToElement, setCookie, toArray, toArrayTrackByFn };
2787
- //# sourceMappingURL=ethlete-core.mjs.map