@ethlete/core 0.2.0-next.2 → 0.2.0-next.20
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.
- package/esm2020/lib/components/public-api.mjs +2 -0
- package/esm2020/lib/components/structured-data/public-api.mjs +2 -0
- package/esm2020/lib/components/structured-data/structured-data.component.mjs +37 -0
- package/esm2020/lib/directives/click-outside/click-outside.directive.mjs +37 -0
- package/esm2020/lib/directives/click-outside/public-api.mjs +2 -0
- package/esm2020/lib/directives/cursor-drag-scroll/cursor-drag-scroll.constants.mjs +3 -0
- package/esm2020/lib/directives/cursor-drag-scroll/cursor-drag-scroll.directive.mjs +147 -0
- package/esm2020/lib/directives/cursor-drag-scroll/public-api.mjs +2 -0
- package/esm2020/lib/directives/let/let.directive.mjs +8 -8
- package/esm2020/lib/directives/observe-content/observe-content.directive.mjs +11 -11
- package/esm2020/lib/directives/observe-resize/observe-resize.directive.mjs +11 -12
- package/esm2020/lib/directives/observe-scroll-state/observe-scroll-state.constants.mjs +3 -0
- package/esm2020/lib/directives/observe-scroll-state/observe-scroll-state.directive.mjs +171 -0
- package/esm2020/lib/directives/observe-scroll-state/observe-scroll-state.types.mjs +2 -0
- package/esm2020/lib/directives/observe-scroll-state/public-api.mjs +3 -0
- package/esm2020/lib/directives/public-api.mjs +10 -3
- package/esm2020/lib/directives/repeat/repeat.directive.mjs +10 -11
- package/esm2020/lib/directives/scroll-observer-first-element/index.mjs +2 -0
- package/esm2020/lib/directives/scroll-observer-first-element/public-api.mjs +2 -0
- package/esm2020/lib/directives/scroll-observer-first-element/scroll-observer-first-element.directive.mjs +31 -0
- package/esm2020/lib/directives/scroll-observer-ignore-target/index.mjs +2 -0
- package/esm2020/lib/directives/scroll-observer-ignore-target/public-api.mjs +2 -0
- package/esm2020/lib/directives/scroll-observer-ignore-target/scroll-observer-ignore-target.directive.mjs +18 -0
- package/esm2020/lib/directives/scroll-observer-last-element/index.mjs +2 -0
- package/esm2020/lib/directives/scroll-observer-last-element/public-api.mjs +2 -0
- package/esm2020/lib/directives/scroll-observer-last-element/scroll-observer-last-element.directive.mjs +34 -0
- package/esm2020/lib/directives/seo/public-api.mjs +5 -0
- package/esm2020/lib/directives/seo/seo.directive.constants.mjs +3 -0
- package/esm2020/lib/directives/seo/seo.directive.mjs +166 -0
- package/esm2020/lib/directives/seo/seo.directive.types.mjs +2 -0
- package/esm2020/lib/directives/seo/seo.directive.utils.mjs +7 -0
- package/esm2020/lib/pipes/normalize-game-result-type/normalize-game-result-type.pipe.mjs +15 -0
- package/esm2020/lib/pipes/normalize-game-result-type/normalize-game-result-type.types.mjs +2 -0
- package/esm2020/lib/pipes/normalize-game-result-type/normalize-game-result-type.util.mjs +34 -0
- package/esm2020/lib/pipes/normalize-game-result-type/public-api.mjs +4 -0
- package/esm2020/lib/pipes/normalize-match-participants/normalize-match-participants.pipe.mjs +15 -0
- package/esm2020/lib/pipes/normalize-match-participants/normalize-match-participants.types.mjs +2 -0
- package/esm2020/lib/pipes/normalize-match-participants/normalize-match-participants.util.mjs +47 -0
- package/esm2020/lib/pipes/normalize-match-participants/public-api.mjs +4 -0
- package/esm2020/lib/pipes/normalize-match-score/normalize-match-score.pipe.mjs +15 -0
- package/esm2020/lib/pipes/normalize-match-score/normalize-match-score.types.mjs +2 -0
- package/esm2020/lib/pipes/normalize-match-score/normalize-match-score.util.mjs +126 -0
- package/esm2020/lib/pipes/normalize-match-score/public-api.mjs +4 -0
- package/esm2020/lib/pipes/normalize-match-state/index.mjs +2 -0
- package/esm2020/lib/pipes/normalize-match-state/normalize-match-state.constants.mjs +2 -0
- package/esm2020/lib/pipes/normalize-match-state/normalize-match-state.pipe.mjs +15 -0
- package/esm2020/lib/pipes/normalize-match-state/normalize-match-state.util.mjs +19 -0
- package/esm2020/lib/pipes/normalize-match-state/public-api.mjs +4 -0
- package/esm2020/lib/pipes/normalize-match-type/normalize-match-type.pipe.mjs +15 -0
- package/esm2020/lib/pipes/normalize-match-type/normalize-match-type.util.mjs +38 -0
- package/esm2020/lib/pipes/normalize-match-type/public-api.mjs +3 -0
- package/esm2020/lib/pipes/public-api.mjs +6 -1
- package/esm2020/lib/pipes/to-array/to-array.pipe.mjs +3 -3
- package/esm2020/lib/public-api.mjs +2 -1
- package/esm2020/lib/services/click-observer.service.mjs +73 -0
- package/esm2020/lib/services/content-observer.service.mjs +6 -6
- package/esm2020/lib/services/destroy.service.mjs +19 -0
- package/esm2020/lib/services/focus-visible.service.mjs +7 -7
- package/esm2020/lib/services/public-api.mjs +7 -4
- package/esm2020/lib/services/resize-observer.service.mjs +6 -6
- package/esm2020/lib/services/router-state.service.mjs +81 -0
- package/esm2020/lib/services/viewport.service.mjs +16 -16
- package/esm2020/lib/types/angular.types.mjs +36 -2
- package/esm2020/lib/types/i18n.types.mjs +2 -0
- package/esm2020/lib/types/public-api.mjs +3 -2
- package/esm2020/lib/utils/clone.util.mjs +78 -0
- package/esm2020/lib/utils/cookie.util.mjs +48 -0
- package/esm2020/lib/utils/equal.util.mjs +118 -0
- package/esm2020/lib/utils/index.mjs +2 -0
- package/esm2020/lib/utils/public-api.mjs +7 -2
- package/esm2020/lib/utils/reactive-binding.util.mjs +111 -0
- package/esm2020/lib/utils/scrollable.utils.mjs +5 -0
- package/fesm2015/ethlete-core.mjs +1788 -289
- package/fesm2015/ethlete-core.mjs.map +1 -1
- package/fesm2020/ethlete-core.mjs +1784 -288
- package/fesm2020/ethlete-core.mjs.map +1 -1
- package/lib/components/public-api.d.ts +1 -0
- package/lib/components/structured-data/public-api.d.ts +1 -0
- package/lib/components/structured-data/structured-data.component.d.ts +11 -0
- package/lib/directives/click-outside/click-outside.directive.d.ts +12 -0
- package/lib/directives/click-outside/public-api.d.ts +1 -0
- package/lib/directives/cursor-drag-scroll/cursor-drag-scroll.constants.d.ts +2 -0
- package/lib/directives/cursor-drag-scroll/cursor-drag-scroll.directive.d.ts +27 -0
- package/lib/directives/cursor-drag-scroll/public-api.d.ts +1 -0
- package/lib/directives/let/let.directive.d.ts +1 -1
- package/lib/directives/observe-content/observe-content.directive.d.ts +2 -4
- package/lib/directives/observe-resize/observe-resize.directive.d.ts +3 -5
- package/lib/directives/observe-scroll-state/observe-scroll-state.constants.d.ts +3 -0
- package/lib/directives/observe-scroll-state/observe-scroll-state.directive.d.ts +31 -0
- package/lib/directives/observe-scroll-state/observe-scroll-state.types.d.ts +6 -0
- package/lib/directives/observe-scroll-state/public-api.d.ts +3 -0
- package/lib/directives/public-api.d.ts +9 -2
- package/lib/directives/repeat/repeat.directive.d.ts +3 -4
- package/lib/directives/scroll-observer-first-element/index.d.ts +1 -0
- package/lib/directives/scroll-observer-first-element/public-api.d.ts +1 -0
- package/lib/directives/scroll-observer-first-element/scroll-observer-first-element.directive.d.ts +10 -0
- package/lib/directives/scroll-observer-ignore-target/index.d.ts +1 -0
- package/lib/directives/scroll-observer-ignore-target/public-api.d.ts +1 -0
- package/lib/directives/scroll-observer-ignore-target/scroll-observer-ignore-target.directive.d.ts +6 -0
- package/lib/directives/scroll-observer-last-element/index.d.ts +1 -0
- package/lib/directives/scroll-observer-last-element/public-api.d.ts +1 -0
- package/lib/directives/scroll-observer-last-element/scroll-observer-last-element.directive.d.ts +10 -0
- package/lib/directives/seo/public-api.d.ts +4 -0
- package/lib/directives/seo/seo.directive.constants.d.ts +3 -0
- package/lib/directives/seo/seo.directive.d.ts +21 -0
- package/lib/directives/seo/seo.directive.types.d.ts +51 -0
- package/lib/directives/seo/seo.directive.utils.d.ts +2 -0
- package/lib/pipes/normalize-game-result-type/normalize-game-result-type.pipe.d.ts +7 -0
- package/lib/pipes/normalize-game-result-type/normalize-game-result-type.types.d.ts +4 -0
- package/lib/pipes/normalize-game-result-type/normalize-game-result-type.util.d.ts +2 -0
- package/lib/pipes/normalize-game-result-type/public-api.d.ts +3 -0
- package/lib/pipes/normalize-match-participants/normalize-match-participants.pipe.d.ts +7 -0
- package/lib/pipes/normalize-match-participants/normalize-match-participants.types.d.ts +21 -0
- package/lib/pipes/normalize-match-participants/normalize-match-participants.util.d.ts +4 -0
- package/lib/pipes/normalize-match-participants/public-api.d.ts +3 -0
- package/lib/pipes/normalize-match-score/normalize-match-score.pipe.d.ts +7 -0
- package/lib/pipes/normalize-match-score/normalize-match-score.types.d.ts +12 -0
- package/lib/pipes/normalize-match-score/normalize-match-score.util.d.ts +27 -0
- package/lib/pipes/normalize-match-score/public-api.d.ts +3 -0
- package/lib/pipes/normalize-match-state/index.d.ts +1 -0
- package/lib/pipes/normalize-match-state/normalize-match-state.constants.d.ts +7 -0
- package/lib/pipes/normalize-match-state/normalize-match-state.pipe.d.ts +7 -0
- package/lib/pipes/normalize-match-state/normalize-match-state.util.d.ts +3 -0
- package/lib/pipes/normalize-match-state/public-api.d.ts +3 -0
- package/lib/pipes/normalize-match-type/normalize-match-type.pipe.d.ts +7 -0
- package/lib/pipes/normalize-match-type/normalize-match-type.util.d.ts +3 -0
- package/lib/pipes/normalize-match-type/public-api.d.ts +2 -0
- package/lib/pipes/public-api.d.ts +5 -0
- package/lib/public-api.d.ts +1 -0
- package/lib/services/click-observer.service.d.ts +21 -0
- package/lib/services/destroy.service.d.ts +9 -0
- package/lib/services/public-api.d.ts +6 -3
- package/lib/services/router-state.service.d.ts +34 -0
- package/lib/services/viewport.types.d.ts +1 -1
- package/lib/types/angular.types.d.ts +14 -1
- package/lib/types/i18n.types.d.ts +4 -0
- package/lib/types/public-api.d.ts +2 -1
- package/lib/types/viewport.types.d.ts +2 -2
- package/lib/utils/clone.util.d.ts +15 -0
- package/lib/utils/cookie.util.d.ts +5 -0
- package/lib/utils/equal.util.d.ts +27 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/public-api.d.ts +6 -1
- package/lib/utils/reactive-binding.util.d.ts +19 -0
- package/lib/utils/scrollable.utils.d.ts +1 -0
- package/package.json +9 -5
|
@@ -1,12 +1,48 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { inject, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, HostBinding, InjectionToken, Injectable, Inject, Optional, ElementRef, EventEmitter, Directive, Output, NgZone, Pipe, QueryList } from '@angular/core';
|
|
3
|
+
import { DomSanitizer, Meta, Title } from '@angular/platform-browser';
|
|
4
|
+
import { coerceElement, coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
|
|
5
|
+
import { fromEvent, Observable, Subject, BehaviorSubject, filter, distinctUntilChanged, map, pairwise, combineLatest, shareReplay, takeUntil, startWith, debounceTime, tap, take } from 'rxjs';
|
|
6
|
+
import { DOCUMENT } from '@angular/common';
|
|
7
|
+
import { Router, NavigationEnd } from '@angular/router';
|
|
5
8
|
import { __decorate, __metadata } from 'tslib';
|
|
6
9
|
import * as i1 from '@angular/cdk/layout';
|
|
7
|
-
import { DOCUMENT } from '@angular/common';
|
|
8
10
|
import { debounceTime as debounceTime$1 } from 'rxjs/operators';
|
|
9
11
|
|
|
12
|
+
class StructuredDataComponent {
|
|
13
|
+
constructor() {
|
|
14
|
+
this._sanitizer = inject(DomSanitizer);
|
|
15
|
+
}
|
|
16
|
+
set data(currentValue) {
|
|
17
|
+
this.jsonLD = this.getSafeHTML(currentValue);
|
|
18
|
+
}
|
|
19
|
+
getSafeHTML(value) {
|
|
20
|
+
const json = value ? JSON.stringify(value, null, 2).replace(/<\/script>/g, '<\\/script>') : '';
|
|
21
|
+
const html = `<script type="application/ld+json">${json}</script>`;
|
|
22
|
+
return this._sanitizer.bypassSecurityTrustHtml(html);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
StructuredDataComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: StructuredDataComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
26
|
+
StructuredDataComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", 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 });
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: StructuredDataComponent, decorators: [{
|
|
28
|
+
type: Component,
|
|
29
|
+
args: [{
|
|
30
|
+
selector: 'et-structured-data',
|
|
31
|
+
standalone: true,
|
|
32
|
+
template: '',
|
|
33
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
34
|
+
encapsulation: ViewEncapsulation.None,
|
|
35
|
+
host: {
|
|
36
|
+
style: 'display: none',
|
|
37
|
+
},
|
|
38
|
+
}]
|
|
39
|
+
}], propDecorators: { data: [{
|
|
40
|
+
type: Input
|
|
41
|
+
}], jsonLD: [{
|
|
42
|
+
type: HostBinding,
|
|
43
|
+
args: ['innerHTML']
|
|
44
|
+
}] } });
|
|
45
|
+
|
|
10
46
|
const VIEWPORT_CONFIG = new InjectionToken('ViewportConfig');
|
|
11
47
|
/**
|
|
12
48
|
* Default viewport config based on Tailwind CSS.
|
|
@@ -48,127 +84,374 @@ const Memo = (config = {}) => (_, __, descriptor) => {
|
|
|
48
84
|
return descriptor;
|
|
49
85
|
};
|
|
50
86
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
56
|
-
this.etLet = null;
|
|
87
|
+
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
88
|
+
class ClickObserverFactory {
|
|
89
|
+
create() {
|
|
90
|
+
return fromEvent(document, 'click');
|
|
57
91
|
}
|
|
58
92
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
93
|
+
ClickObserverFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ClickObserverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
94
|
+
ClickObserverFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ClickObserverFactory, providedIn: 'root' });
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ClickObserverFactory, decorators: [{
|
|
96
|
+
type: Injectable,
|
|
97
|
+
args: [{ providedIn: 'root' }]
|
|
98
|
+
}] });
|
|
99
|
+
class ClickObserverService {
|
|
100
|
+
constructor(_clickObserverFactory) {
|
|
101
|
+
this._clickObserverFactory = _clickObserverFactory;
|
|
102
|
+
this._observedElements = new Map();
|
|
67
103
|
}
|
|
68
|
-
|
|
69
|
-
this.
|
|
70
|
-
this._updateView();
|
|
104
|
+
ngOnDestroy() {
|
|
105
|
+
this._observedElements.forEach((_, element) => this._cleanupObserver(element));
|
|
71
106
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
return
|
|
107
|
+
observe(elementOrRef) {
|
|
108
|
+
const element = coerceElement(elementOrRef);
|
|
109
|
+
return new Observable((observer) => {
|
|
110
|
+
const stream = this._observeElement(element);
|
|
111
|
+
const subscription = stream.subscribe(observer);
|
|
112
|
+
return () => {
|
|
113
|
+
subscription.unsubscribe();
|
|
114
|
+
this._unobserveElement(element);
|
|
115
|
+
};
|
|
116
|
+
});
|
|
75
117
|
}
|
|
76
|
-
|
|
77
|
-
if (!this.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
118
|
+
_observeElement(element) {
|
|
119
|
+
if (!this._observedElements.has(element)) {
|
|
120
|
+
const stream = new Subject();
|
|
121
|
+
const observer = this._clickObserverFactory.create();
|
|
122
|
+
const sub = observer.subscribe((event) => stream.next(event));
|
|
123
|
+
this._observedElements.set(element, { observer: sub, stream, count: 1 });
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
this._observedElements.get(element).count++;
|
|
127
|
+
}
|
|
128
|
+
return this._observedElements.get(element).stream;
|
|
129
|
+
}
|
|
130
|
+
_unobserveElement(element) {
|
|
131
|
+
if (this._observedElements.has(element)) {
|
|
132
|
+
this._observedElements.get(element).count--;
|
|
133
|
+
if (!this._observedElements.get(element).count) {
|
|
134
|
+
this._cleanupObserver(element);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
_cleanupObserver(element) {
|
|
139
|
+
if (this._observedElements.has(element)) {
|
|
140
|
+
const { observer, stream } = this._observedElements.get(element);
|
|
141
|
+
if (observer) {
|
|
142
|
+
observer.unsubscribe();
|
|
81
143
|
}
|
|
144
|
+
stream.complete();
|
|
145
|
+
this._observedElements.delete(element);
|
|
82
146
|
}
|
|
83
147
|
}
|
|
84
148
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
88
|
-
type:
|
|
89
|
-
args: [{
|
|
90
|
-
|
|
91
|
-
standalone: true,
|
|
92
|
-
}]
|
|
93
|
-
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }]; }, propDecorators: { etLet: [{
|
|
94
|
-
type: Input
|
|
95
|
-
}] } });
|
|
149
|
+
ClickObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ClickObserverService, deps: [{ token: ClickObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
150
|
+
ClickObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ClickObserverService, providedIn: 'root' });
|
|
151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ClickObserverService, decorators: [{
|
|
152
|
+
type: Injectable,
|
|
153
|
+
args: [{ providedIn: 'root' }]
|
|
154
|
+
}], ctorParameters: function () { return [{ type: ClickObserverFactory }]; } });
|
|
96
155
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
this._repeatCount = 2;
|
|
156
|
+
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
157
|
+
class MutationObserverFactory {
|
|
158
|
+
create(callback) {
|
|
159
|
+
return typeof MutationObserver === 'undefined' ? null : new MutationObserver(callback);
|
|
102
160
|
}
|
|
103
|
-
|
|
104
|
-
|
|
161
|
+
}
|
|
162
|
+
MutationObserverFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: MutationObserverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
163
|
+
MutationObserverFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: MutationObserverFactory, providedIn: 'root' });
|
|
164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: MutationObserverFactory, decorators: [{
|
|
165
|
+
type: Injectable,
|
|
166
|
+
args: [{ providedIn: 'root' }]
|
|
167
|
+
}] });
|
|
168
|
+
class ContentObserverService {
|
|
169
|
+
constructor(_mutationObserverFactory) {
|
|
170
|
+
this._mutationObserverFactory = _mutationObserverFactory;
|
|
171
|
+
this._observedElements = new Map();
|
|
105
172
|
}
|
|
106
|
-
|
|
107
|
-
this.
|
|
173
|
+
ngOnDestroy() {
|
|
174
|
+
this._observedElements.forEach((_, element) => this._cleanupObserver(element));
|
|
108
175
|
}
|
|
109
|
-
|
|
110
|
-
|
|
176
|
+
observe(elementOrRef) {
|
|
177
|
+
const element = coerceElement(elementOrRef);
|
|
178
|
+
return new Observable((observer) => {
|
|
179
|
+
const stream = this._observeElement(element);
|
|
180
|
+
const subscription = stream.subscribe(observer);
|
|
181
|
+
return () => {
|
|
182
|
+
subscription.unsubscribe();
|
|
183
|
+
this._unobserveElement(element);
|
|
184
|
+
};
|
|
185
|
+
});
|
|
111
186
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
187
|
+
_observeElement(element) {
|
|
188
|
+
if (!this._observedElements.has(element)) {
|
|
189
|
+
const stream = new Subject();
|
|
190
|
+
const observer = this._mutationObserverFactory.create((mutations) => stream.next(mutations));
|
|
191
|
+
if (observer) {
|
|
192
|
+
observer.observe(element, {
|
|
193
|
+
characterData: true,
|
|
194
|
+
childList: true,
|
|
195
|
+
subtree: true,
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
this._observedElements.set(element, { observer, stream, count: 1 });
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
this._observedElements.get(element).count++;
|
|
202
|
+
}
|
|
203
|
+
return this._observedElements.get(element).stream;
|
|
204
|
+
}
|
|
205
|
+
_unobserveElement(element) {
|
|
206
|
+
if (this._observedElements.has(element)) {
|
|
207
|
+
this._observedElements.get(element).count--;
|
|
208
|
+
if (!this._observedElements.get(element).count) {
|
|
209
|
+
this._cleanupObserver(element);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
_cleanupObserver(element) {
|
|
214
|
+
if (this._observedElements.has(element)) {
|
|
215
|
+
const { observer, stream } = this._observedElements.get(element);
|
|
216
|
+
if (observer) {
|
|
217
|
+
observer.disconnect();
|
|
218
|
+
}
|
|
219
|
+
stream.complete();
|
|
220
|
+
this._observedElements.delete(element);
|
|
115
221
|
}
|
|
116
222
|
}
|
|
117
223
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
121
|
-
type:
|
|
122
|
-
args: [{
|
|
123
|
-
|
|
124
|
-
standalone: true,
|
|
125
|
-
}]
|
|
126
|
-
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; }, propDecorators: { repeatCount: [{
|
|
127
|
-
type: Input,
|
|
128
|
-
args: ['etRepeat']
|
|
129
|
-
}] } });
|
|
224
|
+
ContentObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ContentObserverService, deps: [{ token: MutationObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
225
|
+
ContentObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ContentObserverService, providedIn: 'root' });
|
|
226
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ContentObserverService, decorators: [{
|
|
227
|
+
type: Injectable,
|
|
228
|
+
args: [{ providedIn: 'root' }]
|
|
229
|
+
}], ctorParameters: function () { return [{ type: MutationObserverFactory }]; } });
|
|
130
230
|
|
|
131
|
-
class
|
|
132
|
-
constructor(
|
|
133
|
-
this.
|
|
134
|
-
this.
|
|
135
|
-
this._isSm$ = new BehaviorSubject(false);
|
|
136
|
-
this._isMd$ = new BehaviorSubject(false);
|
|
137
|
-
this._isLg$ = new BehaviorSubject(false);
|
|
138
|
-
this._isXl$ = new BehaviorSubject(false);
|
|
139
|
-
this._is2Xl$ = new BehaviorSubject(false);
|
|
140
|
-
this.currentViewport$ = combineLatest([this.isXs$, this.isSm$, this.isMd$, this.isLg$, this.isXl$, this.is2Xl$]).pipe(map((val) => this.getCurrentViewport(val)), shareReplay());
|
|
141
|
-
this._viewportConfig = _viewportConfig || DEFAULT_VIEWPORT_CONFIG;
|
|
142
|
-
this._observeDefaultBreakpoints();
|
|
231
|
+
class DestroyService {
|
|
232
|
+
constructor() {
|
|
233
|
+
this._destroy$ = new Subject();
|
|
234
|
+
this.destroy$ = this._destroy$.asObservable();
|
|
143
235
|
}
|
|
144
|
-
|
|
145
|
-
|
|
236
|
+
ngOnDestroy() {
|
|
237
|
+
this._destroy$.next(true);
|
|
238
|
+
this._destroy$.unsubscribe();
|
|
146
239
|
}
|
|
147
|
-
|
|
148
|
-
|
|
240
|
+
}
|
|
241
|
+
DestroyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: DestroyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
242
|
+
DestroyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: DestroyService });
|
|
243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: DestroyService, decorators: [{
|
|
244
|
+
type: Injectable
|
|
245
|
+
}] });
|
|
246
|
+
|
|
247
|
+
class FocusVisibleService {
|
|
248
|
+
get isFocusVisible() {
|
|
249
|
+
return this._hadKeyboardEvent;
|
|
149
250
|
}
|
|
150
|
-
|
|
151
|
-
|
|
251
|
+
constructor() {
|
|
252
|
+
this._document = inject(DOCUMENT);
|
|
253
|
+
this._hadKeyboardEvent = false;
|
|
254
|
+
this._document.addEventListener('keydown', this.onKeyDown.bind(this), true);
|
|
255
|
+
this._document.addEventListener('mousedown', this.onPointerDown.bind(this), true);
|
|
256
|
+
this._document.addEventListener('pointerdown', this.onPointerDown.bind(this), true);
|
|
257
|
+
this._document.addEventListener('touchstart', this.onPointerDown.bind(this), true);
|
|
152
258
|
}
|
|
153
|
-
|
|
154
|
-
|
|
259
|
+
onKeyDown(e) {
|
|
260
|
+
if (e.metaKey || e.altKey || e.ctrlKey) {
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
this._hadKeyboardEvent = true;
|
|
155
264
|
}
|
|
156
|
-
|
|
157
|
-
|
|
265
|
+
onPointerDown() {
|
|
266
|
+
this._hadKeyboardEvent = false;
|
|
158
267
|
}
|
|
159
|
-
|
|
160
|
-
|
|
268
|
+
}
|
|
269
|
+
FocusVisibleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: FocusVisibleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
270
|
+
FocusVisibleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: FocusVisibleService, providedIn: 'root' });
|
|
271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: FocusVisibleService, decorators: [{
|
|
272
|
+
type: Injectable,
|
|
273
|
+
args: [{
|
|
274
|
+
providedIn: 'root',
|
|
275
|
+
}]
|
|
276
|
+
}], ctorParameters: function () { return []; } });
|
|
277
|
+
|
|
278
|
+
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
279
|
+
class ResizeObserverFactory {
|
|
280
|
+
create(callback) {
|
|
281
|
+
return typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(callback);
|
|
161
282
|
}
|
|
162
|
-
|
|
163
|
-
|
|
283
|
+
}
|
|
284
|
+
ResizeObserverFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ResizeObserverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
285
|
+
ResizeObserverFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ResizeObserverFactory, providedIn: 'root' });
|
|
286
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ResizeObserverFactory, decorators: [{
|
|
287
|
+
type: Injectable,
|
|
288
|
+
args: [{ providedIn: 'root' }]
|
|
289
|
+
}] });
|
|
290
|
+
class ResizeObserverService {
|
|
291
|
+
constructor(_mutationObserverFactory) {
|
|
292
|
+
this._mutationObserverFactory = _mutationObserverFactory;
|
|
293
|
+
this._observedElements = new Map();
|
|
164
294
|
}
|
|
165
|
-
|
|
166
|
-
|
|
295
|
+
ngOnDestroy() {
|
|
296
|
+
this._observedElements.forEach((_, element) => this._cleanupObserver(element));
|
|
167
297
|
}
|
|
168
|
-
|
|
169
|
-
|
|
298
|
+
observe(elementOrRef) {
|
|
299
|
+
const element = coerceElement(elementOrRef);
|
|
300
|
+
return new Observable((observer) => {
|
|
301
|
+
const stream = this._observeElement(element);
|
|
302
|
+
const subscription = stream.subscribe(observer);
|
|
303
|
+
return () => {
|
|
304
|
+
subscription.unsubscribe();
|
|
305
|
+
this._unobserveElement(element);
|
|
306
|
+
};
|
|
307
|
+
});
|
|
170
308
|
}
|
|
171
|
-
|
|
309
|
+
_observeElement(element) {
|
|
310
|
+
if (!this._observedElements.has(element)) {
|
|
311
|
+
const stream = new Subject();
|
|
312
|
+
const observer = this._mutationObserverFactory.create((resizes) => stream.next(resizes));
|
|
313
|
+
if (observer) {
|
|
314
|
+
observer.observe(element);
|
|
315
|
+
}
|
|
316
|
+
this._observedElements.set(element, { observer, stream, count: 1 });
|
|
317
|
+
}
|
|
318
|
+
else {
|
|
319
|
+
this._observedElements.get(element).count++;
|
|
320
|
+
}
|
|
321
|
+
return this._observedElements.get(element).stream;
|
|
322
|
+
}
|
|
323
|
+
_unobserveElement(element) {
|
|
324
|
+
if (this._observedElements.has(element)) {
|
|
325
|
+
this._observedElements.get(element).count--;
|
|
326
|
+
if (!this._observedElements.get(element).count) {
|
|
327
|
+
this._cleanupObserver(element);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
_cleanupObserver(element) {
|
|
332
|
+
if (this._observedElements.has(element)) {
|
|
333
|
+
const { observer, stream } = this._observedElements.get(element);
|
|
334
|
+
if (observer) {
|
|
335
|
+
observer.disconnect();
|
|
336
|
+
}
|
|
337
|
+
stream.complete();
|
|
338
|
+
this._observedElements.delete(element);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
ResizeObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ResizeObserverService, deps: [{ token: ResizeObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
343
|
+
ResizeObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ResizeObserverService, providedIn: 'root' });
|
|
344
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ResizeObserverService, decorators: [{
|
|
345
|
+
type: Injectable,
|
|
346
|
+
args: [{ providedIn: 'root' }]
|
|
347
|
+
}], ctorParameters: function () { return [{ type: ResizeObserverFactory }]; } });
|
|
348
|
+
|
|
349
|
+
const routerDisableScrollTop = (config = {}) => {
|
|
350
|
+
if (!config.asReturnRoute) {
|
|
351
|
+
return {
|
|
352
|
+
disableScrollTop: true,
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
return {
|
|
356
|
+
disableScrollTopAsReturnRoute: true,
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
class RouterStateService {
|
|
360
|
+
get route$() {
|
|
361
|
+
return this._route$.asObservable();
|
|
362
|
+
}
|
|
363
|
+
get state$() {
|
|
364
|
+
return this._state$.asObservable();
|
|
365
|
+
}
|
|
366
|
+
constructor() {
|
|
367
|
+
this._isScrollTopOnNavigationEnabled = false;
|
|
368
|
+
this._router = inject(Router);
|
|
369
|
+
this._route$ = new BehaviorSubject('/');
|
|
370
|
+
this._state$ = new BehaviorSubject({
|
|
371
|
+
title: undefined,
|
|
372
|
+
data: {},
|
|
373
|
+
pathParams: {},
|
|
374
|
+
queryParams: {},
|
|
375
|
+
});
|
|
376
|
+
this._router.events
|
|
377
|
+
.pipe(filter((event) => event instanceof NavigationEnd), distinctUntilChanged((a, b) => a.url === b.url), map((event) => event.url))
|
|
378
|
+
.subscribe(this._route$);
|
|
379
|
+
this._route$
|
|
380
|
+
.pipe(map(() => {
|
|
381
|
+
let route = this._router.routerState.snapshot.root;
|
|
382
|
+
while (route.firstChild) {
|
|
383
|
+
route = route.firstChild;
|
|
384
|
+
}
|
|
385
|
+
const { data, params, queryParams, title } = route;
|
|
386
|
+
return {
|
|
387
|
+
data,
|
|
388
|
+
pathParams: params,
|
|
389
|
+
queryParams,
|
|
390
|
+
title,
|
|
391
|
+
};
|
|
392
|
+
}))
|
|
393
|
+
.subscribe(this._state$);
|
|
394
|
+
}
|
|
395
|
+
enableScrollTopOnNavigation(config = {}) {
|
|
396
|
+
if (this._isScrollTopOnNavigationEnabled) {
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
this._isScrollTopOnNavigationEnabled = true;
|
|
400
|
+
this._state$.pipe(pairwise()).subscribe(([oldData, newData]) => {
|
|
401
|
+
if (!(newData.data['disableScrollTopAsReturnRoute'] && oldData.data['disableScrollTop']) &&
|
|
402
|
+
!newData.data['disableScrollTop']) {
|
|
403
|
+
(config.scrollElement ?? document.documentElement).scrollTop = 0;
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
selectQueryParam(key) {
|
|
408
|
+
return this._state$.pipe(map((state) => state.queryParams[key]));
|
|
409
|
+
}
|
|
410
|
+
selectPathParam(key) {
|
|
411
|
+
return this._state$.pipe(map((state) => state.pathParams[key]));
|
|
412
|
+
}
|
|
413
|
+
selectData(key) {
|
|
414
|
+
return this._state$.pipe(map((state) => state.data[key]));
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
RouterStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: RouterStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
418
|
+
RouterStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: RouterStateService, providedIn: 'root' });
|
|
419
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: RouterStateService, decorators: [{
|
|
420
|
+
type: Injectable,
|
|
421
|
+
args: [{
|
|
422
|
+
providedIn: 'root',
|
|
423
|
+
}]
|
|
424
|
+
}], ctorParameters: function () { return []; } });
|
|
425
|
+
|
|
426
|
+
class ViewportService {
|
|
427
|
+
get isXs$() {
|
|
428
|
+
return this._isXs$.asObservable();
|
|
429
|
+
}
|
|
430
|
+
get isXs() {
|
|
431
|
+
return this._isXs$.value;
|
|
432
|
+
}
|
|
433
|
+
get isSm$() {
|
|
434
|
+
return this._isSm$.asObservable();
|
|
435
|
+
}
|
|
436
|
+
get isSm() {
|
|
437
|
+
return this._isSm$.value;
|
|
438
|
+
}
|
|
439
|
+
get isMd$() {
|
|
440
|
+
return this._isMd$.asObservable();
|
|
441
|
+
}
|
|
442
|
+
get isMd() {
|
|
443
|
+
return this._isMd$.value;
|
|
444
|
+
}
|
|
445
|
+
get isLg$() {
|
|
446
|
+
return this._isLg$.asObservable();
|
|
447
|
+
}
|
|
448
|
+
get isLg() {
|
|
449
|
+
return this._isLg$.value;
|
|
450
|
+
}
|
|
451
|
+
get isXl$() {
|
|
452
|
+
return this._isXl$.asObservable();
|
|
453
|
+
}
|
|
454
|
+
get isXl() {
|
|
172
455
|
return this._isXl$.value;
|
|
173
456
|
}
|
|
174
457
|
get is2Xl$() {
|
|
@@ -180,6 +463,18 @@ class ViewportService {
|
|
|
180
463
|
get currentViewport() {
|
|
181
464
|
return this.getCurrentViewport([this.isXs, this.isSm, this.isMd, this.isLg, this.isXl, this.is2Xl]);
|
|
182
465
|
}
|
|
466
|
+
constructor(_viewportConfig, _breakpointObserver) {
|
|
467
|
+
this._breakpointObserver = _breakpointObserver;
|
|
468
|
+
this._isXs$ = new BehaviorSubject(false);
|
|
469
|
+
this._isSm$ = new BehaviorSubject(false);
|
|
470
|
+
this._isMd$ = new BehaviorSubject(false);
|
|
471
|
+
this._isLg$ = new BehaviorSubject(false);
|
|
472
|
+
this._isXl$ = new BehaviorSubject(false);
|
|
473
|
+
this._is2Xl$ = new BehaviorSubject(false);
|
|
474
|
+
this.currentViewport$ = combineLatest([this.isXs$, this.isSm$, this.isMd$, this.isLg$, this.isXl$, this.is2Xl$]).pipe(map((val) => this.getCurrentViewport(val)), shareReplay());
|
|
475
|
+
this._viewportConfig = _viewportConfig || DEFAULT_VIEWPORT_CONFIG;
|
|
476
|
+
this._observeDefaultBreakpoints();
|
|
477
|
+
}
|
|
183
478
|
observe(options) {
|
|
184
479
|
const mediaQuery = this._buildMediaQuery(options);
|
|
185
480
|
return this._breakpointObserver.observe(mediaQuery).pipe(map((x) => x.matches), shareReplay());
|
|
@@ -258,8 +553,8 @@ class ViewportService {
|
|
|
258
553
|
return 'xs';
|
|
259
554
|
}
|
|
260
555
|
}
|
|
261
|
-
ViewportService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
262
|
-
ViewportService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
556
|
+
ViewportService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ViewportService, deps: [{ token: VIEWPORT_CONFIG, optional: true }, { token: i1.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
557
|
+
ViewportService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ViewportService, providedIn: 'root' });
|
|
263
558
|
__decorate([
|
|
264
559
|
Memo(),
|
|
265
560
|
__metadata("design:type", Function),
|
|
@@ -276,7 +571,7 @@ __decorate([
|
|
|
276
571
|
__metadata("design:paramtypes", [Object]),
|
|
277
572
|
__metadata("design:returntype", void 0)
|
|
278
573
|
], ViewportService.prototype, "_buildMediaQuery", null);
|
|
279
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
574
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ViewportService, decorators: [{
|
|
280
575
|
type: Injectable,
|
|
281
576
|
args: [{
|
|
282
577
|
providedIn: 'root',
|
|
@@ -288,188 +583,599 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImpor
|
|
|
288
583
|
type: Optional
|
|
289
584
|
}] }, { type: i1.BreakpointObserver }]; }, propDecorators: { _getViewportSize: [], _buildMediaQuery: [] } });
|
|
290
585
|
|
|
291
|
-
class
|
|
586
|
+
class ClickOutsideDirective {
|
|
292
587
|
constructor() {
|
|
293
|
-
this.
|
|
294
|
-
this.
|
|
295
|
-
this.
|
|
296
|
-
this.
|
|
297
|
-
this._document.addEventListener('pointerdown', this.onPointerDown.bind(this), true);
|
|
298
|
-
this._document.addEventListener('touchstart', this.onPointerDown.bind(this), true);
|
|
299
|
-
}
|
|
300
|
-
get isFocusVisible() {
|
|
301
|
-
return this._hadKeyboardEvent;
|
|
588
|
+
this._elementRef = inject(ElementRef);
|
|
589
|
+
this._clickObserverService = inject(ClickObserverService);
|
|
590
|
+
this._subscription = null;
|
|
591
|
+
this.etClickOutside = new EventEmitter();
|
|
302
592
|
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
593
|
+
ngOnInit() {
|
|
594
|
+
setTimeout(() => {
|
|
595
|
+
this._subscription = this._clickObserverService.observe(this._elementRef.nativeElement).subscribe((event) => {
|
|
596
|
+
const activeElement = event.target;
|
|
597
|
+
const isInside = this._elementRef.nativeElement.contains(activeElement);
|
|
598
|
+
if (!isInside) {
|
|
599
|
+
this.etClickOutside.emit(event);
|
|
600
|
+
}
|
|
601
|
+
});
|
|
602
|
+
});
|
|
308
603
|
}
|
|
309
|
-
|
|
310
|
-
this.
|
|
604
|
+
ngOnDestroy() {
|
|
605
|
+
this._subscription?.unsubscribe();
|
|
311
606
|
}
|
|
312
607
|
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
316
|
-
type:
|
|
608
|
+
ClickOutsideDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ClickOutsideDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
609
|
+
ClickOutsideDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.4", type: ClickOutsideDirective, isStandalone: true, selector: "[etClickOutside]", outputs: { etClickOutside: "etClickOutside" }, ngImport: i0 });
|
|
610
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ClickOutsideDirective, decorators: [{
|
|
611
|
+
type: Directive,
|
|
317
612
|
args: [{
|
|
318
|
-
|
|
613
|
+
selector: '[etClickOutside]',
|
|
614
|
+
standalone: true,
|
|
319
615
|
}]
|
|
320
|
-
}],
|
|
616
|
+
}], propDecorators: { etClickOutside: [{
|
|
617
|
+
type: Output
|
|
618
|
+
}] } });
|
|
321
619
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
620
|
+
const clamp = (value, min = 0, max = 100) => {
|
|
621
|
+
return Math.max(min, Math.min(max, value));
|
|
622
|
+
};
|
|
623
|
+
|
|
624
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
625
|
+
/* eslint-disable no-var */
|
|
626
|
+
/**
|
|
627
|
+
* Stolen from klona to avoid adding a dependency
|
|
628
|
+
* https://github.com/lukeed/klona
|
|
629
|
+
*
|
|
630
|
+
* MIT License
|
|
631
|
+
*
|
|
632
|
+
* Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
|
|
633
|
+
*
|
|
634
|
+
* 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:
|
|
635
|
+
*
|
|
636
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
637
|
+
*
|
|
638
|
+
* 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.
|
|
639
|
+
*/
|
|
640
|
+
const set = (obj, key, val) => {
|
|
641
|
+
if (typeof val.value === 'object')
|
|
642
|
+
val.value = clone(val.value);
|
|
643
|
+
if (!val.enumerable || val.get || val.set || !val.configurable || !val.writable || key === '__proto__') {
|
|
644
|
+
Object.defineProperty(obj, key, val);
|
|
645
|
+
}
|
|
646
|
+
else
|
|
647
|
+
obj[key] = val.value;
|
|
648
|
+
};
|
|
649
|
+
const clone = (original) => {
|
|
650
|
+
if (typeof original !== 'object')
|
|
651
|
+
return original;
|
|
652
|
+
var _og = original;
|
|
653
|
+
var i = 0, k, list, tmp, str = Object.prototype.toString.call(_og);
|
|
654
|
+
if (str === '[object Object]') {
|
|
655
|
+
tmp = Object.create(_og.__proto__ || null);
|
|
656
|
+
}
|
|
657
|
+
else if (str === '[object Array]') {
|
|
658
|
+
tmp = Array(_og.length);
|
|
659
|
+
}
|
|
660
|
+
else if (str === '[object Set]') {
|
|
661
|
+
tmp = new Set();
|
|
662
|
+
_og.forEach(function (val) {
|
|
663
|
+
tmp.add(clone(val));
|
|
664
|
+
});
|
|
326
665
|
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
args: [{ providedIn: 'root' }]
|
|
333
|
-
}] });
|
|
334
|
-
class ResizeObserverService {
|
|
335
|
-
constructor(_mutationObserverFactory) {
|
|
336
|
-
this._mutationObserverFactory = _mutationObserverFactory;
|
|
337
|
-
this._observedElements = new Map();
|
|
666
|
+
else if (str === '[object Map]') {
|
|
667
|
+
tmp = new Map();
|
|
668
|
+
_og.forEach(function (val, key) {
|
|
669
|
+
tmp.set(clone(key), clone(val));
|
|
670
|
+
});
|
|
338
671
|
}
|
|
339
|
-
|
|
340
|
-
|
|
672
|
+
else if (str === '[object Date]') {
|
|
673
|
+
tmp = new Date(+_og);
|
|
341
674
|
}
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
return new Observable((observer) => {
|
|
345
|
-
const stream = this._observeElement(element);
|
|
346
|
-
const subscription = stream.subscribe(observer);
|
|
347
|
-
return () => {
|
|
348
|
-
subscription.unsubscribe();
|
|
349
|
-
this._unobserveElement(element);
|
|
350
|
-
};
|
|
351
|
-
});
|
|
675
|
+
else if (str === '[object RegExp]') {
|
|
676
|
+
tmp = new RegExp(_og.source, _og.flags);
|
|
352
677
|
}
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
const stream = new Subject();
|
|
356
|
-
const observer = this._mutationObserverFactory.create((resizes) => stream.next(resizes));
|
|
357
|
-
if (observer) {
|
|
358
|
-
observer.observe(element);
|
|
359
|
-
}
|
|
360
|
-
this._observedElements.set(element, { observer, stream, count: 1 });
|
|
361
|
-
}
|
|
362
|
-
else {
|
|
363
|
-
this._observedElements.get(element).count++;
|
|
364
|
-
}
|
|
365
|
-
return this._observedElements.get(element).stream;
|
|
678
|
+
else if (str === '[object DataView]') {
|
|
679
|
+
tmp = new _og.constructor(clone(_og.buffer));
|
|
366
680
|
}
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
this._observedElements.get(element).count--;
|
|
370
|
-
if (!this._observedElements.get(element).count) {
|
|
371
|
-
this._cleanupObserver(element);
|
|
372
|
-
}
|
|
373
|
-
}
|
|
681
|
+
else if (str === '[object ArrayBuffer]') {
|
|
682
|
+
tmp = _og.slice(0);
|
|
374
683
|
}
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
684
|
+
else if (str.slice(-6) === 'Array]') {
|
|
685
|
+
// ArrayBuffer.isView(x)
|
|
686
|
+
// ~> `new` bcuz `Buffer.slice` => ref
|
|
687
|
+
tmp = new _og.constructor(_og);
|
|
688
|
+
}
|
|
689
|
+
if (tmp) {
|
|
690
|
+
for (list = Object.getOwnPropertySymbols(_og); i < list.length; i++) {
|
|
691
|
+
set(tmp, list[i], Object.getOwnPropertyDescriptor(_og, list[i]));
|
|
692
|
+
}
|
|
693
|
+
for (i = 0, list = Object.getOwnPropertyNames(_og); i < list.length; i++) {
|
|
694
|
+
if (Object.hasOwnProperty.call(tmp, (k = list[i])) && tmp[k] === _og[k])
|
|
695
|
+
continue;
|
|
696
|
+
set(tmp, k, Object.getOwnPropertyDescriptor(_og, k));
|
|
383
697
|
}
|
|
384
698
|
}
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
ResizeObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ResizeObserverService, providedIn: 'root' });
|
|
388
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ResizeObserverService, decorators: [{
|
|
389
|
-
type: Injectable,
|
|
390
|
-
args: [{ providedIn: 'root' }]
|
|
391
|
-
}], ctorParameters: function () { return [{ type: ResizeObserverFactory }]; } });
|
|
699
|
+
return tmp || _og;
|
|
700
|
+
};
|
|
392
701
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
return typeof MutationObserver === 'undefined' ? null : new MutationObserver(callback);
|
|
702
|
+
const hasCookie = (name) => {
|
|
703
|
+
if (typeof document === 'undefined') {
|
|
704
|
+
return false;
|
|
397
705
|
}
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
class ContentObserverService {
|
|
406
|
-
constructor(_mutationObserverFactory) {
|
|
407
|
-
this._mutationObserverFactory = _mutationObserverFactory;
|
|
408
|
-
this._observedElements = new Map();
|
|
706
|
+
return document.cookie.split(';').some((c) => {
|
|
707
|
+
return c.trim().startsWith(name + '=');
|
|
708
|
+
});
|
|
709
|
+
};
|
|
710
|
+
const getCookie = (name) => {
|
|
711
|
+
if (typeof document === 'undefined') {
|
|
712
|
+
return null;
|
|
409
713
|
}
|
|
410
|
-
|
|
411
|
-
|
|
714
|
+
// From https://stackoverflow.com/questions/10730362/get-cookie-by-name
|
|
715
|
+
return ('; ' + document.cookie).split(`; ${name}=`).pop()?.split(';')[0];
|
|
716
|
+
};
|
|
717
|
+
const setCookie = (name, data, expiresInDays = 30, domain = getDomain()) => {
|
|
718
|
+
if (typeof document === 'undefined') {
|
|
719
|
+
return;
|
|
412
720
|
}
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
721
|
+
const date = new Date();
|
|
722
|
+
date.setTime(date.getTime() + expiresInDays * 24 * 60 * 60 * 1000);
|
|
723
|
+
document.cookie = `${name}=${data}; path=/; expires=${date.toUTCString()}; domain=${domain}; SameSite=Lax;`;
|
|
724
|
+
};
|
|
725
|
+
const deleteCookie = (name, path, domain = getDomain()) => {
|
|
726
|
+
if (hasCookie(name)) {
|
|
727
|
+
document.cookie =
|
|
728
|
+
name +
|
|
729
|
+
'=' +
|
|
730
|
+
(path ? ';path=' + path : '') +
|
|
731
|
+
(domain ? ';domain=' + domain : '') +
|
|
732
|
+
';expires=Thu, 01 Jan 1970 00:00:01 GMT';
|
|
423
733
|
}
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
734
|
+
};
|
|
735
|
+
const getDomain = () => {
|
|
736
|
+
if (typeof navigator === 'undefined') {
|
|
737
|
+
return null;
|
|
738
|
+
}
|
|
739
|
+
const hostname = window.location.hostname;
|
|
740
|
+
if (hostname.includes('localhost')) {
|
|
741
|
+
return 'localhost';
|
|
742
|
+
}
|
|
743
|
+
const splitHost = hostname.split('.');
|
|
744
|
+
if (splitHost.length > 2) {
|
|
745
|
+
return `${splitHost[splitHost.length - 2]}.${splitHost[splitHost.length - 1]}`;
|
|
746
|
+
}
|
|
747
|
+
return hostname;
|
|
748
|
+
};
|
|
749
|
+
|
|
750
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
751
|
+
/* eslint-disable no-var */
|
|
752
|
+
/**
|
|
753
|
+
* Stolen from dequal to avoid adding a dependency
|
|
754
|
+
* https://github.com/lukeed/dequal
|
|
755
|
+
*
|
|
756
|
+
* The MIT License (MIT)
|
|
757
|
+
*
|
|
758
|
+
* Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
|
|
759
|
+
*
|
|
760
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
761
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
762
|
+
* in the Software without restriction, including without limitation the rights
|
|
763
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
764
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
765
|
+
* furnished to do so, subject to the following conditions:
|
|
766
|
+
*
|
|
767
|
+
* The above copyright notice and this permission notice shall be included in
|
|
768
|
+
* all copies or substantial portions of the Software.
|
|
769
|
+
*
|
|
770
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
771
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
772
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
773
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
774
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
775
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
776
|
+
* THE SOFTWARE.
|
|
777
|
+
*/
|
|
778
|
+
const has = Object.prototype.hasOwnProperty;
|
|
779
|
+
function find(iter, tar, key) {
|
|
780
|
+
for (key of iter.keys()) {
|
|
781
|
+
if (equal(key, tar))
|
|
782
|
+
return key;
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
const equal = (foo, bar) => {
|
|
786
|
+
var ctor, len, tmp;
|
|
787
|
+
if (foo === bar)
|
|
788
|
+
return true;
|
|
789
|
+
if (foo && bar && (ctor = foo.constructor) === bar.constructor) {
|
|
790
|
+
if (ctor === Date)
|
|
791
|
+
return foo.getTime() === bar.getTime();
|
|
792
|
+
if (ctor === RegExp)
|
|
793
|
+
return foo.toString() === bar.toString();
|
|
794
|
+
if (ctor === Array) {
|
|
795
|
+
if ((len = foo.length) === bar.length) {
|
|
796
|
+
while (len-- && equal(foo[len], bar[len]))
|
|
797
|
+
;
|
|
434
798
|
}
|
|
435
|
-
|
|
436
|
-
}
|
|
437
|
-
else {
|
|
438
|
-
this._observedElements.get(element).count++;
|
|
799
|
+
return len === -1;
|
|
439
800
|
}
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
801
|
+
if (ctor === Set) {
|
|
802
|
+
if (foo.size !== bar.size) {
|
|
803
|
+
return false;
|
|
804
|
+
}
|
|
805
|
+
for (len of foo) {
|
|
806
|
+
tmp = len;
|
|
807
|
+
if (tmp && typeof tmp === 'object') {
|
|
808
|
+
tmp = find(bar, tmp);
|
|
809
|
+
if (!tmp)
|
|
810
|
+
return false;
|
|
811
|
+
}
|
|
812
|
+
if (!bar.has(tmp))
|
|
813
|
+
return false;
|
|
447
814
|
}
|
|
815
|
+
return true;
|
|
816
|
+
}
|
|
817
|
+
if (ctor === Map) {
|
|
818
|
+
if (foo.size !== bar.size) {
|
|
819
|
+
return false;
|
|
820
|
+
}
|
|
821
|
+
for (len of foo) {
|
|
822
|
+
tmp = len[0];
|
|
823
|
+
if (tmp && typeof tmp === 'object') {
|
|
824
|
+
tmp = find(bar, tmp);
|
|
825
|
+
if (!tmp)
|
|
826
|
+
return false;
|
|
827
|
+
}
|
|
828
|
+
if (!equal(len[1], bar.get(tmp))) {
|
|
829
|
+
return false;
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
return true;
|
|
833
|
+
}
|
|
834
|
+
if (ctor === ArrayBuffer) {
|
|
835
|
+
foo = new Uint8Array(foo);
|
|
836
|
+
bar = new Uint8Array(bar);
|
|
837
|
+
}
|
|
838
|
+
else if (ctor === DataView) {
|
|
839
|
+
if ((len = foo.byteLength) === bar.byteLength) {
|
|
840
|
+
while (len-- && foo.getInt8(len) === bar.getInt8(len))
|
|
841
|
+
;
|
|
842
|
+
}
|
|
843
|
+
return len === -1;
|
|
844
|
+
}
|
|
845
|
+
if (ArrayBuffer.isView(foo)) {
|
|
846
|
+
if ((len = foo.byteLength) === bar.byteLength) {
|
|
847
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
848
|
+
//@ts-ignore
|
|
849
|
+
while (len-- && foo[len] === bar[len])
|
|
850
|
+
;
|
|
851
|
+
}
|
|
852
|
+
return len === -1;
|
|
853
|
+
}
|
|
854
|
+
if (!ctor || typeof foo === 'object') {
|
|
855
|
+
len = 0;
|
|
856
|
+
for (ctor in foo) {
|
|
857
|
+
if (has.call(foo, ctor) && ++len && !has.call(bar, ctor))
|
|
858
|
+
return false;
|
|
859
|
+
if (!(ctor in bar) || !equal(foo[ctor], bar[ctor]))
|
|
860
|
+
return false;
|
|
861
|
+
}
|
|
862
|
+
return Object.keys(bar).length === len;
|
|
448
863
|
}
|
|
449
864
|
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
865
|
+
return foo !== foo && bar !== bar;
|
|
866
|
+
};
|
|
867
|
+
|
|
868
|
+
const isAttributeRenderBinding = (value) => typeof value === 'boolean';
|
|
869
|
+
const isAttributeValueBinding = (value) => typeof value === 'object';
|
|
870
|
+
const createReactiveBindings = (...values) => {
|
|
871
|
+
const rootElementRef = inject(ElementRef);
|
|
872
|
+
const destroy$ = inject(DestroyService, { host: true }).destroy$;
|
|
873
|
+
const subscriptions = [];
|
|
874
|
+
const pushedAttributes = [];
|
|
875
|
+
const defaults = {};
|
|
876
|
+
const push = (value) => {
|
|
877
|
+
const { attribute, observable, elementRef } = value;
|
|
878
|
+
const elRef = elementRef || rootElementRef;
|
|
879
|
+
const attributes = Array.isArray(attribute) ? attribute : [attribute];
|
|
880
|
+
pushedAttributes.push(attributes);
|
|
881
|
+
for (const attribute of attributes) {
|
|
882
|
+
if (!defaults[attribute]) {
|
|
883
|
+
defaults[attribute] = elRef.nativeElement.getAttribute(attribute) || undefined;
|
|
455
884
|
}
|
|
456
|
-
|
|
457
|
-
|
|
885
|
+
}
|
|
886
|
+
const subscription = observable
|
|
887
|
+
.pipe(takeUntil(destroy$), distinctUntilChanged((a, b) => {
|
|
888
|
+
if (isAttributeRenderBinding(a) && isAttributeRenderBinding(b)) {
|
|
889
|
+
return a === b;
|
|
890
|
+
}
|
|
891
|
+
else if (isAttributeValueBinding(a) && isAttributeValueBinding(b)) {
|
|
892
|
+
return a.render === b.render && a.value === b.value;
|
|
893
|
+
}
|
|
894
|
+
return false;
|
|
895
|
+
}))
|
|
896
|
+
.subscribe((value) => {
|
|
897
|
+
const currentAttributes = pushedAttributes.find((s) => s.some((current) => attributes.includes(current))) || [];
|
|
898
|
+
for (const attribute of currentAttributes) {
|
|
899
|
+
const isSingleClassMutation = attribute.startsWith('class.');
|
|
900
|
+
const isMultipleClassMutation = attribute === 'class';
|
|
901
|
+
const render = isAttributeRenderBinding(value) ? value : value.render;
|
|
902
|
+
if (isSingleClassMutation) {
|
|
903
|
+
const className = attribute.replace('class.', '');
|
|
904
|
+
if (!className) {
|
|
905
|
+
continue;
|
|
906
|
+
}
|
|
907
|
+
if (!render) {
|
|
908
|
+
elRef.nativeElement.classList.remove(className);
|
|
909
|
+
}
|
|
910
|
+
else {
|
|
911
|
+
elRef.nativeElement.classList.add(className);
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
else if (isMultipleClassMutation) {
|
|
915
|
+
const classes = isAttributeRenderBinding(value) ? '' : `${value.value}`;
|
|
916
|
+
if (!classes) {
|
|
917
|
+
continue;
|
|
918
|
+
}
|
|
919
|
+
if (!render) {
|
|
920
|
+
elRef.nativeElement.classList.remove(...classes.split(' '));
|
|
921
|
+
}
|
|
922
|
+
else {
|
|
923
|
+
elRef.nativeElement.classList.add(...classes.split(' '));
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
else {
|
|
927
|
+
const attributeValue = isAttributeRenderBinding(value) ? true : `${value.value}`;
|
|
928
|
+
if (!attribute) {
|
|
929
|
+
continue;
|
|
930
|
+
}
|
|
931
|
+
if (!render) {
|
|
932
|
+
elRef.nativeElement.removeAttribute(attribute);
|
|
933
|
+
}
|
|
934
|
+
else {
|
|
935
|
+
elRef.nativeElement.setAttribute(attribute, `${attributeValue}`);
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
});
|
|
940
|
+
subscriptions.push({ attributes, subscription });
|
|
941
|
+
};
|
|
942
|
+
const remove = (...attributes) => {
|
|
943
|
+
for (const attribute of attributes) {
|
|
944
|
+
const sub = subscriptions.find((s) => s.attributes.includes(attribute));
|
|
945
|
+
const attributeStack = pushedAttributes.find((a) => a.includes(attribute));
|
|
946
|
+
if (sub) {
|
|
947
|
+
sub.attributes = sub.attributes.filter((a) => a !== attribute);
|
|
948
|
+
attributeStack?.splice(attributeStack.indexOf(attribute), 1);
|
|
949
|
+
if (sub.attributes.length === 0) {
|
|
950
|
+
sub.subscription.unsubscribe();
|
|
951
|
+
subscriptions.splice(subscriptions.indexOf(sub), 1);
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
};
|
|
956
|
+
const reset = () => {
|
|
957
|
+
for (const attribute in defaults) {
|
|
958
|
+
if (defaults[attribute] === undefined) {
|
|
959
|
+
rootElementRef.nativeElement.removeAttribute(attribute);
|
|
960
|
+
}
|
|
961
|
+
else {
|
|
962
|
+
rootElementRef.nativeElement.setAttribute(attribute, defaults[attribute]);
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
};
|
|
966
|
+
for (const value of values) {
|
|
967
|
+
push(value);
|
|
968
|
+
}
|
|
969
|
+
return {
|
|
970
|
+
push,
|
|
971
|
+
remove,
|
|
972
|
+
reset,
|
|
973
|
+
};
|
|
974
|
+
};
|
|
975
|
+
|
|
976
|
+
const elementCanScroll = (element) => {
|
|
977
|
+
const { scrollHeight, clientHeight, scrollWidth, clientWidth } = element;
|
|
978
|
+
return scrollHeight > clientHeight || scrollWidth > clientWidth;
|
|
979
|
+
};
|
|
980
|
+
|
|
981
|
+
const provideViewportConfig = (viewportConfig) => {
|
|
982
|
+
return { provide: VIEWPORT_CONFIG, useValue: viewportConfig };
|
|
983
|
+
};
|
|
984
|
+
|
|
985
|
+
const CURSOR_DRAG_SCROLLING_CLASS = 'et-cursor-drag-scroll--scrolling';
|
|
986
|
+
const CURSOR_DRAG_SCROLLING_PREPARED_CLASS = 'et-cursor-drag-scroll--prepared';
|
|
987
|
+
|
|
988
|
+
class CursorDragScrollDirective {
|
|
989
|
+
constructor() {
|
|
990
|
+
this._subscriptions = [];
|
|
991
|
+
this._destroy$ = inject(DestroyService, { host: true }).destroy$;
|
|
992
|
+
this._elementRef = inject(ElementRef);
|
|
993
|
+
this._contentObserverService = inject(ContentObserverService);
|
|
994
|
+
this._resizeObserverService = inject(ResizeObserverService);
|
|
995
|
+
this._bufferUntilScroll = 5;
|
|
996
|
+
this._mouseUp$ = new Subject();
|
|
997
|
+
this._isScrolling = false;
|
|
998
|
+
this._canScroll = false;
|
|
999
|
+
this._currentScrollState = {
|
|
1000
|
+
top: 0,
|
|
1001
|
+
left: 0,
|
|
1002
|
+
x: 0,
|
|
1003
|
+
y: 0,
|
|
1004
|
+
};
|
|
1005
|
+
this._enabled = false;
|
|
1006
|
+
}
|
|
1007
|
+
get enabled() {
|
|
1008
|
+
return this._enabled;
|
|
1009
|
+
}
|
|
1010
|
+
set enabled(value) {
|
|
1011
|
+
this._enabled = coerceBooleanProperty(value);
|
|
1012
|
+
if (this._enabled) {
|
|
1013
|
+
this._enableCursorDragScroll();
|
|
1014
|
+
}
|
|
1015
|
+
else {
|
|
1016
|
+
this._disableCursorDragScroll();
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
ngAfterViewInit() {
|
|
1020
|
+
if (this.enabled) {
|
|
1021
|
+
this._enableCursorDragScroll();
|
|
1022
|
+
}
|
|
1023
|
+
else {
|
|
1024
|
+
this._disableCursorDragScroll();
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
_enableCursorDragScroll() {
|
|
1028
|
+
const contentResizeSub = combineLatest([
|
|
1029
|
+
this._contentObserverService.observe(this._elementRef.nativeElement).pipe(startWith(null)),
|
|
1030
|
+
this._resizeObserverService.observe(this._elementRef.nativeElement).pipe(startWith(null)),
|
|
1031
|
+
])
|
|
1032
|
+
.pipe(debounceTime(25), tap(() => this._updateCanScrollState()), takeUntil(this._destroy$))
|
|
1033
|
+
.subscribe();
|
|
1034
|
+
const mousedownSub = fromEvent(this._elementRef.nativeElement, 'mousedown')
|
|
1035
|
+
.pipe(tap((e) => this._onMouseDown(e)), takeUntil(this._destroy$))
|
|
1036
|
+
.subscribe();
|
|
1037
|
+
this._subscriptions.push(contentResizeSub, mousedownSub);
|
|
1038
|
+
this._updateCanScrollState();
|
|
1039
|
+
}
|
|
1040
|
+
_disableCursorDragScroll() {
|
|
1041
|
+
this._subscriptions.forEach((sub) => sub.unsubscribe());
|
|
1042
|
+
this._subscriptions.length = 0;
|
|
1043
|
+
this._elementRef.nativeElement.style.cursor = 'default';
|
|
1044
|
+
}
|
|
1045
|
+
_onMouseDown(e) {
|
|
1046
|
+
if (!this._elementRef?.nativeElement || !this._canScroll) {
|
|
1047
|
+
return;
|
|
1048
|
+
}
|
|
1049
|
+
const element = this._elementRef.nativeElement;
|
|
1050
|
+
element.classList.add(CURSOR_DRAG_SCROLLING_PREPARED_CLASS);
|
|
1051
|
+
this._elementRef.nativeElement.style.scrollSnapType = 'none';
|
|
1052
|
+
this._elementRef.nativeElement.style.scrollBehavior = 'unset';
|
|
1053
|
+
this._currentScrollState = {
|
|
1054
|
+
left: this._elementRef.nativeElement.scrollLeft,
|
|
1055
|
+
top: this._elementRef.nativeElement.scrollTop,
|
|
1056
|
+
x: e.clientX,
|
|
1057
|
+
y: e.clientY,
|
|
1058
|
+
};
|
|
1059
|
+
fromEvent(document, 'mousemove')
|
|
1060
|
+
.pipe(tap((e) => this._mouseMoveHandler(e)), takeUntil(this._mouseUp$), takeUntil(this._destroy$))
|
|
1061
|
+
.subscribe();
|
|
1062
|
+
fromEvent(document, 'mouseup')
|
|
1063
|
+
.pipe(tap(() => this._mouseUpHandler()), take(1), takeUntil(this._destroy$))
|
|
1064
|
+
.subscribe();
|
|
1065
|
+
}
|
|
1066
|
+
_mouseMoveHandler(e) {
|
|
1067
|
+
e.preventDefault();
|
|
1068
|
+
if (!this._elementRef?.nativeElement) {
|
|
1069
|
+
return;
|
|
1070
|
+
}
|
|
1071
|
+
const dx = e.clientX - this._currentScrollState.x;
|
|
1072
|
+
const dy = e.clientY - this._currentScrollState.y;
|
|
1073
|
+
if (Math.abs(dx) > this._bufferUntilScroll || Math.abs(dy) > this._bufferUntilScroll) {
|
|
1074
|
+
const element = this._elementRef.nativeElement;
|
|
1075
|
+
if (!this._isScrolling) {
|
|
1076
|
+
this._isScrolling = true;
|
|
1077
|
+
element.style.cursor = 'grabbing';
|
|
1078
|
+
element.classList.add(CURSOR_DRAG_SCROLLING_CLASS);
|
|
1079
|
+
element.scroll({
|
|
1080
|
+
top: this._currentScrollState.top - dy,
|
|
1081
|
+
left: this._currentScrollState.left - dx,
|
|
1082
|
+
behavior: 'smooth',
|
|
1083
|
+
});
|
|
1084
|
+
}
|
|
1085
|
+
else {
|
|
1086
|
+
element.scrollTop = this._currentScrollState.top - dy;
|
|
1087
|
+
element.scrollLeft = this._currentScrollState.left - dx;
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
_mouseUpHandler() {
|
|
1092
|
+
this._mouseUp$.next(true);
|
|
1093
|
+
this._isScrolling = false;
|
|
1094
|
+
if (!this._elementRef?.nativeElement) {
|
|
1095
|
+
return;
|
|
1096
|
+
}
|
|
1097
|
+
this._elementRef.nativeElement.style.scrollSnapType = '';
|
|
1098
|
+
this._elementRef.nativeElement.style.scrollBehavior = '';
|
|
1099
|
+
this._elementRef.nativeElement.style.cursor = 'grab';
|
|
1100
|
+
this._elementRef.nativeElement.classList.remove(CURSOR_DRAG_SCROLLING_CLASS);
|
|
1101
|
+
this._elementRef.nativeElement.classList.remove(CURSOR_DRAG_SCROLLING_PREPARED_CLASS);
|
|
1102
|
+
}
|
|
1103
|
+
_updateCanScrollState() {
|
|
1104
|
+
this._canScroll = elementCanScroll(this._elementRef.nativeElement);
|
|
1105
|
+
if (this._canScroll) {
|
|
1106
|
+
this._elementRef.nativeElement.style.cursor = 'grab';
|
|
1107
|
+
}
|
|
1108
|
+
else {
|
|
1109
|
+
this._elementRef.nativeElement.style.cursor = 'default';
|
|
458
1110
|
}
|
|
459
1111
|
}
|
|
460
1112
|
}
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
464
|
-
type:
|
|
465
|
-
args: [{
|
|
466
|
-
|
|
1113
|
+
CursorDragScrollDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: CursorDragScrollDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1114
|
+
CursorDragScrollDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.4", type: CursorDragScrollDirective, isStandalone: true, selector: "[etCursorDragScroll]", inputs: { enabled: ["etCursorDragScroll", "enabled"] }, providers: [DestroyService], exportAs: ["etCursorDragScroll"], ngImport: i0 });
|
|
1115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: CursorDragScrollDirective, decorators: [{
|
|
1116
|
+
type: Directive,
|
|
1117
|
+
args: [{
|
|
1118
|
+
selector: '[etCursorDragScroll]',
|
|
1119
|
+
exportAs: 'etCursorDragScroll',
|
|
1120
|
+
standalone: true,
|
|
1121
|
+
providers: [DestroyService],
|
|
1122
|
+
}]
|
|
1123
|
+
}], propDecorators: { enabled: [{
|
|
1124
|
+
type: Input,
|
|
1125
|
+
args: ['etCursorDragScroll']
|
|
1126
|
+
}] } });
|
|
467
1127
|
|
|
468
|
-
class
|
|
469
|
-
constructor(
|
|
470
|
-
|
|
471
|
-
this
|
|
472
|
-
|
|
1128
|
+
class LetContext {
|
|
1129
|
+
constructor() {
|
|
1130
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1131
|
+
this.$implicit = null;
|
|
1132
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1133
|
+
this.etLet = null;
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
class LetDirective {
|
|
1138
|
+
set etLet(value) {
|
|
1139
|
+
this._context.$implicit = this._context.etLet = value;
|
|
1140
|
+
this._updateView();
|
|
1141
|
+
}
|
|
1142
|
+
constructor(_viewContainer, templateRef) {
|
|
1143
|
+
this._viewContainer = _viewContainer;
|
|
1144
|
+
this._context = new LetContext();
|
|
1145
|
+
this._templateRef = null;
|
|
1146
|
+
this._viewRef = null;
|
|
1147
|
+
this._templateRef = templateRef;
|
|
1148
|
+
}
|
|
1149
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1150
|
+
static ngTemplateContextGuard(dir, ctx) {
|
|
1151
|
+
return true;
|
|
1152
|
+
}
|
|
1153
|
+
_updateView() {
|
|
1154
|
+
if (!this._viewRef) {
|
|
1155
|
+
this._viewContainer.clear();
|
|
1156
|
+
if (this._templateRef) {
|
|
1157
|
+
this._viewRef = this._viewContainer.createEmbeddedView(this._templateRef, this._context);
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
LetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LetDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1163
|
+
LetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.4", type: LetDirective, isStandalone: true, selector: "[etLet]", inputs: { etLet: "etLet" }, ngImport: i0 });
|
|
1164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LetDirective, decorators: [{
|
|
1165
|
+
type: Directive,
|
|
1166
|
+
args: [{
|
|
1167
|
+
selector: '[etLet]',
|
|
1168
|
+
standalone: true,
|
|
1169
|
+
}]
|
|
1170
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }]; }, propDecorators: { etLet: [{
|
|
1171
|
+
type: Input
|
|
1172
|
+
}] } });
|
|
1173
|
+
|
|
1174
|
+
class ObserveContentDirective {
|
|
1175
|
+
constructor() {
|
|
1176
|
+
this._contentObserver = inject(ContentObserverService);
|
|
1177
|
+
this._elementRef = inject(ElementRef);
|
|
1178
|
+
this._ngZone = inject(NgZone);
|
|
473
1179
|
this.event = new EventEmitter();
|
|
474
1180
|
this._disabled = false;
|
|
475
1181
|
this._debounce = null;
|
|
@@ -501,38 +1207,38 @@ class ObserveResizeDirective {
|
|
|
501
1207
|
this._unsubscribe();
|
|
502
1208
|
const stream = this._contentObserver.observe(this._elementRef);
|
|
503
1209
|
this._ngZone.runOutsideAngular(() => {
|
|
504
|
-
this._currentSubscription = (this.debounce ? stream.pipe(debounceTime(this.debounce)) : stream).subscribe(this.event);
|
|
1210
|
+
this._currentSubscription = (this.debounce ? stream.pipe(debounceTime$1(this.debounce)) : stream).subscribe(this.event);
|
|
505
1211
|
});
|
|
506
1212
|
}
|
|
507
1213
|
_unsubscribe() {
|
|
508
1214
|
this._currentSubscription?.unsubscribe();
|
|
509
1215
|
}
|
|
510
1216
|
}
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1217
|
+
ObserveContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ObserveContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1218
|
+
ObserveContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.4", type: ObserveContentDirective, isStandalone: true, selector: "[etObserveContent]", inputs: { disabled: ["etObserveContentDisabled", "disabled"], debounce: ["etObserveContentDebounce", "debounce"] }, outputs: { event: "etObserveContent" }, exportAs: ["etObserveContent"], ngImport: i0 });
|
|
1219
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ObserveContentDirective, decorators: [{
|
|
514
1220
|
type: Directive,
|
|
515
1221
|
args: [{
|
|
516
|
-
selector: '[
|
|
517
|
-
exportAs: '
|
|
1222
|
+
selector: '[etObserveContent]',
|
|
1223
|
+
exportAs: 'etObserveContent',
|
|
518
1224
|
standalone: true,
|
|
519
1225
|
}]
|
|
520
|
-
}],
|
|
1226
|
+
}], propDecorators: { event: [{
|
|
521
1227
|
type: Output,
|
|
522
|
-
args: ['
|
|
1228
|
+
args: ['etObserveContent']
|
|
523
1229
|
}], disabled: [{
|
|
524
1230
|
type: Input,
|
|
525
|
-
args: ['
|
|
1231
|
+
args: ['etObserveContentDisabled']
|
|
526
1232
|
}], debounce: [{
|
|
527
1233
|
type: Input,
|
|
528
|
-
args: ['
|
|
1234
|
+
args: ['etObserveContentDebounce']
|
|
529
1235
|
}] } });
|
|
530
1236
|
|
|
531
|
-
class
|
|
532
|
-
constructor(
|
|
533
|
-
this.
|
|
534
|
-
this._elementRef =
|
|
535
|
-
this._ngZone =
|
|
1237
|
+
class ObserveResizeDirective {
|
|
1238
|
+
constructor() {
|
|
1239
|
+
this._resizeObserver = inject(ResizeObserverService);
|
|
1240
|
+
this._elementRef = inject(ElementRef);
|
|
1241
|
+
this._ngZone = inject(NgZone);
|
|
536
1242
|
this.event = new EventEmitter();
|
|
537
1243
|
this._disabled = false;
|
|
538
1244
|
this._debounce = null;
|
|
@@ -562,34 +1268,797 @@ class ObserveContentDirective {
|
|
|
562
1268
|
}
|
|
563
1269
|
_subscribe() {
|
|
564
1270
|
this._unsubscribe();
|
|
565
|
-
const stream = this.
|
|
1271
|
+
const stream = this._resizeObserver.observe(this._elementRef);
|
|
566
1272
|
this._ngZone.runOutsideAngular(() => {
|
|
567
|
-
this._currentSubscription = (this.debounce ? stream.pipe(debounceTime
|
|
1273
|
+
this._currentSubscription = (this.debounce ? stream.pipe(debounceTime(this.debounce)) : stream).subscribe(this.event);
|
|
568
1274
|
});
|
|
569
1275
|
}
|
|
570
1276
|
_unsubscribe() {
|
|
571
1277
|
this._currentSubscription?.unsubscribe();
|
|
572
1278
|
}
|
|
573
1279
|
}
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1280
|
+
ObserveResizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ObserveResizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1281
|
+
ObserveResizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.4", type: ObserveResizeDirective, isStandalone: true, selector: "[etObserveResize]", inputs: { disabled: ["etObserveResizeDisabled", "disabled"], debounce: ["etObserveResizeDebounce", "debounce"] }, outputs: { event: "etObserveResize" }, exportAs: ["etObserveResize"], ngImport: i0 });
|
|
1282
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ObserveResizeDirective, decorators: [{
|
|
577
1283
|
type: Directive,
|
|
578
1284
|
args: [{
|
|
579
|
-
selector: '[
|
|
580
|
-
exportAs: '
|
|
1285
|
+
selector: '[etObserveResize]',
|
|
1286
|
+
exportAs: 'etObserveResize',
|
|
1287
|
+
standalone: true,
|
|
581
1288
|
}]
|
|
582
|
-
}],
|
|
1289
|
+
}], propDecorators: { event: [{
|
|
583
1290
|
type: Output,
|
|
584
|
-
args: ['
|
|
1291
|
+
args: ['etObserveResize']
|
|
585
1292
|
}], disabled: [{
|
|
586
1293
|
type: Input,
|
|
587
|
-
args: ['
|
|
1294
|
+
args: ['etObserveResizeDisabled']
|
|
588
1295
|
}], debounce: [{
|
|
589
1296
|
type: Input,
|
|
590
|
-
args: ['
|
|
1297
|
+
args: ['etObserveResizeDebounce']
|
|
1298
|
+
}] } });
|
|
1299
|
+
|
|
1300
|
+
const SCROLL_OBSERVER_FIRST_ELEMENT_CLASS = 'et-scroll-observer-first-element';
|
|
1301
|
+
class ScrollObserverFirstElementDirective {
|
|
1302
|
+
constructor() {
|
|
1303
|
+
this._isFirstElement = false;
|
|
1304
|
+
}
|
|
1305
|
+
get isFirstElement() {
|
|
1306
|
+
return this._isFirstElement;
|
|
1307
|
+
}
|
|
1308
|
+
set isFirstElement(value) {
|
|
1309
|
+
this._isFirstElement = coerceBooleanProperty(value);
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
ScrollObserverFirstElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ScrollObserverFirstElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1313
|
+
ScrollObserverFirstElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.4", type: ScrollObserverFirstElementDirective, isStandalone: true, selector: "[etScrollObserverFirstElement]", inputs: { isFirstElement: ["etScrollObserverFirstElement", "isFirstElement"] }, host: { properties: { "class.et-scroll-observer-first-element": "this.isFirstElement" } }, ngImport: i0 });
|
|
1314
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ScrollObserverFirstElementDirective, decorators: [{
|
|
1315
|
+
type: Directive,
|
|
1316
|
+
args: [{
|
|
1317
|
+
selector: '[etScrollObserverFirstElement]',
|
|
1318
|
+
standalone: true,
|
|
1319
|
+
}]
|
|
1320
|
+
}], propDecorators: { isFirstElement: [{
|
|
1321
|
+
type: Input,
|
|
1322
|
+
args: ['etScrollObserverFirstElement']
|
|
1323
|
+
}, {
|
|
1324
|
+
type: HostBinding,
|
|
1325
|
+
args: [`class.${SCROLL_OBSERVER_FIRST_ELEMENT_CLASS}`]
|
|
1326
|
+
}] } });
|
|
1327
|
+
|
|
1328
|
+
const SCROLL_OBSERVER_IGNORE_TARGET_CLASS = 'et-scroll-observer-ignore-target';
|
|
1329
|
+
class ScrollObserverIgnoreTargetDirective {
|
|
1330
|
+
}
|
|
1331
|
+
ScrollObserverIgnoreTargetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ScrollObserverIgnoreTargetDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1332
|
+
ScrollObserverIgnoreTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.4", type: ScrollObserverIgnoreTargetDirective, isStandalone: true, selector: "[etScrollObserverIgnoreTarget]", host: { classAttribute: "et-scroll-observer-ignore-target" }, ngImport: i0 });
|
|
1333
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ScrollObserverIgnoreTargetDirective, decorators: [{
|
|
1334
|
+
type: Directive,
|
|
1335
|
+
args: [{
|
|
1336
|
+
selector: '[etScrollObserverIgnoreTarget]',
|
|
1337
|
+
standalone: true,
|
|
1338
|
+
host: {
|
|
1339
|
+
class: SCROLL_OBSERVER_IGNORE_TARGET_CLASS,
|
|
1340
|
+
},
|
|
1341
|
+
}]
|
|
1342
|
+
}] });
|
|
1343
|
+
|
|
1344
|
+
const SCROLL_OBSERVER_LAST_ELEMENT_CLASS = 'et-scroll-observer-last-element';
|
|
1345
|
+
class ScrollObserverLastElementDirective {
|
|
1346
|
+
constructor() {
|
|
1347
|
+
this._isLastElement = false;
|
|
1348
|
+
}
|
|
1349
|
+
get isLastElement() {
|
|
1350
|
+
return this._isLastElement;
|
|
1351
|
+
}
|
|
1352
|
+
set isLastElement(value) {
|
|
1353
|
+
this._isLastElement = coerceBooleanProperty(value);
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
ScrollObserverLastElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ScrollObserverLastElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1357
|
+
ScrollObserverLastElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.4", 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 });
|
|
1358
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ScrollObserverLastElementDirective, decorators: [{
|
|
1359
|
+
type: Directive,
|
|
1360
|
+
args: [{
|
|
1361
|
+
selector: '[etScrollObserverLastElement]',
|
|
1362
|
+
standalone: true,
|
|
1363
|
+
host: {
|
|
1364
|
+
class: SCROLL_OBSERVER_LAST_ELEMENT_CLASS,
|
|
1365
|
+
},
|
|
1366
|
+
}]
|
|
1367
|
+
}], propDecorators: { isLastElement: [{
|
|
1368
|
+
type: Input,
|
|
1369
|
+
args: ['etScrollObserverLastElement']
|
|
1370
|
+
}, {
|
|
1371
|
+
type: HostBinding,
|
|
1372
|
+
args: [`class.${SCROLL_OBSERVER_LAST_ELEMENT_CLASS}`]
|
|
1373
|
+
}] } });
|
|
1374
|
+
|
|
1375
|
+
const OBSERVE_SCROLL_STATE = new InjectionToken('OBSERVE_SCROLL_STATE');
|
|
1376
|
+
|
|
1377
|
+
class ObserveScrollStateDirective {
|
|
1378
|
+
constructor() {
|
|
1379
|
+
this._destroy$ = inject(DestroyService, { host: true }).destroy$;
|
|
1380
|
+
this._elementRef = inject(ElementRef);
|
|
1381
|
+
this._contentObserverService = inject(ContentObserverService);
|
|
1382
|
+
this._resizeObserverService = inject(ResizeObserverService);
|
|
1383
|
+
this._observedChildren = {
|
|
1384
|
+
first: this._firstCurrentChild,
|
|
1385
|
+
last: this._lastCurrentChild,
|
|
1386
|
+
};
|
|
1387
|
+
this._rootMargin = 0;
|
|
1388
|
+
this._threshold = 1;
|
|
1389
|
+
this._intersectionObserver = null;
|
|
1390
|
+
this.etObserveScrollState = new EventEmitter();
|
|
1391
|
+
}
|
|
1392
|
+
get _firstCurrentChild() {
|
|
1393
|
+
const explicitFirstElement = this._elementRef.nativeElement.querySelector(`.${SCROLL_OBSERVER_FIRST_ELEMENT_CLASS}`);
|
|
1394
|
+
if (explicitFirstElement) {
|
|
1395
|
+
return explicitFirstElement;
|
|
1396
|
+
}
|
|
1397
|
+
const element = this._elementRef.nativeElement.children[0];
|
|
1398
|
+
return this._getNonIgnoredChild(element, 'next');
|
|
1399
|
+
}
|
|
1400
|
+
get _lastCurrentChild() {
|
|
1401
|
+
const explicitLastElement = this._elementRef.nativeElement.querySelector(`.${SCROLL_OBSERVER_LAST_ELEMENT_CLASS}`);
|
|
1402
|
+
if (explicitLastElement) {
|
|
1403
|
+
return explicitLastElement;
|
|
1404
|
+
}
|
|
1405
|
+
const element = this._elementRef.nativeElement.children[this._elementRef.nativeElement.children.length - 1];
|
|
1406
|
+
return this._getNonIgnoredChild(element, 'previous');
|
|
1407
|
+
}
|
|
1408
|
+
get observerRootMargin() {
|
|
1409
|
+
return this._rootMargin;
|
|
1410
|
+
}
|
|
1411
|
+
set observerRootMargin(value) {
|
|
1412
|
+
this._rootMargin = coerceNumberProperty(value);
|
|
1413
|
+
}
|
|
1414
|
+
get observerThreshold() {
|
|
1415
|
+
return this._threshold;
|
|
1416
|
+
}
|
|
1417
|
+
set observerThreshold(value) {
|
|
1418
|
+
this._threshold = coerceNumberProperty(value);
|
|
1419
|
+
}
|
|
1420
|
+
ngOnInit() {
|
|
1421
|
+
this._contentObserverService
|
|
1422
|
+
.observe(this._elementRef.nativeElement)
|
|
1423
|
+
.pipe(tap(() => this._checkChildren()), takeUntil(this._destroy$))
|
|
1424
|
+
.subscribe();
|
|
1425
|
+
this._resizeObserverService
|
|
1426
|
+
.observe(this._elementRef.nativeElement)
|
|
1427
|
+
.pipe(debounceTime(25), tap(() => {
|
|
1428
|
+
const canScroll = elementCanScroll(this._elementRef.nativeElement);
|
|
1429
|
+
if ((!this._intersectionObserver && canScroll) || (this._intersectionObserver && !canScroll)) {
|
|
1430
|
+
this._checkChildren();
|
|
1431
|
+
}
|
|
1432
|
+
}), takeUntil(this._destroy$))
|
|
1433
|
+
.subscribe();
|
|
1434
|
+
this._checkChildren();
|
|
1435
|
+
}
|
|
1436
|
+
ngOnDestroy() {
|
|
1437
|
+
this._clearIntersectionObserver();
|
|
1438
|
+
}
|
|
1439
|
+
_checkChildren() {
|
|
1440
|
+
this._clearIntersectionObserver();
|
|
1441
|
+
if (this._firstCurrentChild === this._lastCurrentChild ||
|
|
1442
|
+
!this._firstCurrentChild ||
|
|
1443
|
+
!this._lastCurrentChild ||
|
|
1444
|
+
!elementCanScroll(this._elementRef.nativeElement)) {
|
|
1445
|
+
this._unobserveChild('first');
|
|
1446
|
+
this._unobserveChild('last');
|
|
1447
|
+
this.etObserveScrollState.emit({
|
|
1448
|
+
isAtStart: true,
|
|
1449
|
+
isAtEnd: true,
|
|
1450
|
+
canScroll: false,
|
|
1451
|
+
});
|
|
1452
|
+
}
|
|
1453
|
+
else {
|
|
1454
|
+
this._intersectionObserver = this._initiateIntersectionObserver();
|
|
1455
|
+
this._observeChild('first', this._firstCurrentChild);
|
|
1456
|
+
this._observeChild('last', this._lastCurrentChild);
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
_initiateIntersectionObserver() {
|
|
1460
|
+
const observer = new IntersectionObserver((entries) => {
|
|
1461
|
+
const { first, last } = this._observedChildren;
|
|
1462
|
+
const isAtStart = entries.find((entry) => entry.target === first)?.isIntersecting ?? false;
|
|
1463
|
+
const isAtEnd = entries.find((entry) => entry.target === last)?.isIntersecting ?? false;
|
|
1464
|
+
this.etObserveScrollState.emit({
|
|
1465
|
+
isAtStart,
|
|
1466
|
+
isAtEnd,
|
|
1467
|
+
canScroll: !isAtStart || !isAtEnd,
|
|
1468
|
+
});
|
|
1469
|
+
}, {
|
|
1470
|
+
root: this._elementRef.nativeElement,
|
|
1471
|
+
rootMargin: `${this._rootMargin}px`,
|
|
1472
|
+
threshold: this._threshold,
|
|
1473
|
+
});
|
|
1474
|
+
return observer;
|
|
1475
|
+
}
|
|
1476
|
+
_observeChild(child, element) {
|
|
1477
|
+
this._intersectionObserver?.observe(element);
|
|
1478
|
+
this._observedChildren[child] = element;
|
|
1479
|
+
element.classList.add(`et-scroll-observer-observing-${child}-element`);
|
|
1480
|
+
}
|
|
1481
|
+
_unobserveChild(child) {
|
|
1482
|
+
const observedChild = this._observedChildren[child];
|
|
1483
|
+
if (!observedChild) {
|
|
1484
|
+
return;
|
|
1485
|
+
}
|
|
1486
|
+
observedChild.classList.remove('et-scroll-observer-observing-first-element', 'et-scroll-observer-observing-last-element');
|
|
1487
|
+
this._intersectionObserver?.unobserve(observedChild);
|
|
1488
|
+
this._observedChildren[child] = null;
|
|
1489
|
+
}
|
|
1490
|
+
_clearIntersectionObserver() {
|
|
1491
|
+
this._intersectionObserver?.disconnect();
|
|
1492
|
+
this._intersectionObserver = null;
|
|
1493
|
+
}
|
|
1494
|
+
_getNonIgnoredChild(element, direction) {
|
|
1495
|
+
if (!element) {
|
|
1496
|
+
return null;
|
|
1497
|
+
}
|
|
1498
|
+
if (element?.classList.contains(SCROLL_OBSERVER_IGNORE_TARGET_CLASS)) {
|
|
1499
|
+
const nextElement = element[`${direction}ElementSibling`];
|
|
1500
|
+
if (!nextElement) {
|
|
1501
|
+
return null;
|
|
1502
|
+
}
|
|
1503
|
+
return this._getNonIgnoredChild(nextElement, direction);
|
|
1504
|
+
}
|
|
1505
|
+
return element;
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
ObserveScrollStateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ObserveScrollStateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1509
|
+
ObserveScrollStateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.4", type: ObserveScrollStateDirective, isStandalone: true, selector: "[etObserveScrollState]", inputs: { observerRootMargin: "observerRootMargin", observerThreshold: "observerThreshold" }, outputs: { etObserveScrollState: "etObserveScrollState" }, providers: [
|
|
1510
|
+
{
|
|
1511
|
+
provide: OBSERVE_SCROLL_STATE,
|
|
1512
|
+
useExisting: ObserveScrollStateDirective,
|
|
1513
|
+
},
|
|
1514
|
+
DestroyService,
|
|
1515
|
+
], exportAs: ["etObserveScrollState"], ngImport: i0 });
|
|
1516
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ObserveScrollStateDirective, decorators: [{
|
|
1517
|
+
type: Directive,
|
|
1518
|
+
args: [{
|
|
1519
|
+
selector: '[etObserveScrollState]',
|
|
1520
|
+
exportAs: 'etObserveScrollState',
|
|
1521
|
+
standalone: true,
|
|
1522
|
+
providers: [
|
|
1523
|
+
{
|
|
1524
|
+
provide: OBSERVE_SCROLL_STATE,
|
|
1525
|
+
useExisting: ObserveScrollStateDirective,
|
|
1526
|
+
},
|
|
1527
|
+
DestroyService,
|
|
1528
|
+
],
|
|
1529
|
+
}]
|
|
1530
|
+
}], propDecorators: { observerRootMargin: [{
|
|
1531
|
+
type: Input
|
|
1532
|
+
}], observerThreshold: [{
|
|
1533
|
+
type: Input
|
|
1534
|
+
}], etObserveScrollState: [{
|
|
1535
|
+
type: Output
|
|
1536
|
+
}] } });
|
|
1537
|
+
|
|
1538
|
+
class RepeatDirective {
|
|
1539
|
+
get repeatCount() {
|
|
1540
|
+
return this._repeatCount;
|
|
1541
|
+
}
|
|
1542
|
+
set repeatCount(value) {
|
|
1543
|
+
this._repeatCount = coerceNumberProperty(value);
|
|
1544
|
+
this._render();
|
|
1545
|
+
}
|
|
1546
|
+
constructor(_mainTemplateRef, _viewContainerRef) {
|
|
1547
|
+
this._mainTemplateRef = _mainTemplateRef;
|
|
1548
|
+
this._viewContainerRef = _viewContainerRef;
|
|
1549
|
+
this._repeatCount = 2;
|
|
1550
|
+
}
|
|
1551
|
+
_render() {
|
|
1552
|
+
this._viewContainerRef.clear();
|
|
1553
|
+
for (let i = 0; i < this.repeatCount; i++) {
|
|
1554
|
+
this._viewContainerRef.createEmbeddedView(this._mainTemplateRef);
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
RepeatDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: RepeatDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1559
|
+
RepeatDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.4", type: RepeatDirective, isStandalone: true, selector: "[etRepeat]", inputs: { repeatCount: ["etRepeat", "repeatCount"] }, ngImport: i0 });
|
|
1560
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: RepeatDirective, decorators: [{
|
|
1561
|
+
type: Directive,
|
|
1562
|
+
args: [{
|
|
1563
|
+
selector: '[etRepeat]',
|
|
1564
|
+
standalone: true,
|
|
1565
|
+
}]
|
|
1566
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; }, propDecorators: { repeatCount: [{
|
|
1567
|
+
type: Input,
|
|
1568
|
+
args: ['etRepeat']
|
|
591
1569
|
}] } });
|
|
592
1570
|
|
|
1571
|
+
const SEO_DIRECTIVE_TOKEN = new InjectionToken('SEO_DIRECTIVE_TOKEN');
|
|
1572
|
+
|
|
1573
|
+
const mergeSeoConfig = (config, parentConfig) => {
|
|
1574
|
+
return {
|
|
1575
|
+
...parentConfig,
|
|
1576
|
+
...config,
|
|
1577
|
+
};
|
|
1578
|
+
};
|
|
1579
|
+
|
|
1580
|
+
class SeoDirective {
|
|
1581
|
+
constructor() {
|
|
1582
|
+
this._metaService = inject(Meta);
|
|
1583
|
+
this._titleService = inject(Title);
|
|
1584
|
+
this._onDeactivate$ = new Subject();
|
|
1585
|
+
this._isDeactivated = false;
|
|
1586
|
+
this.parent = inject(SEO_DIRECTIVE_TOKEN, { optional: true, skipSelf: true });
|
|
1587
|
+
this._config = {};
|
|
1588
|
+
}
|
|
1589
|
+
get config() {
|
|
1590
|
+
return this._config;
|
|
1591
|
+
}
|
|
1592
|
+
ngOnInit() {
|
|
1593
|
+
this.parent?._deactivate();
|
|
1594
|
+
}
|
|
1595
|
+
ngOnDestroy() {
|
|
1596
|
+
this._deactivate();
|
|
1597
|
+
this._cleanUp();
|
|
1598
|
+
this.parent?._activate();
|
|
1599
|
+
}
|
|
1600
|
+
// TODO(TRB): This should get split up into multiple methods to make it more readable
|
|
1601
|
+
// - updateTitle
|
|
1602
|
+
// - updateMeta
|
|
1603
|
+
// - updateLink
|
|
1604
|
+
updateConfig(config) {
|
|
1605
|
+
this._config = mergeSeoConfig(config, this.parent?.config || {});
|
|
1606
|
+
if (this._isDeactivated) {
|
|
1607
|
+
return;
|
|
1608
|
+
}
|
|
1609
|
+
this._deactivate();
|
|
1610
|
+
this._activate();
|
|
1611
|
+
}
|
|
1612
|
+
_activate() {
|
|
1613
|
+
this._onDeactivate$.next(false);
|
|
1614
|
+
this._isDeactivated = false;
|
|
1615
|
+
for (const [key, value] of Object.entries(this._config)) {
|
|
1616
|
+
if (value instanceof Observable) {
|
|
1617
|
+
value.pipe(takeUntil(this._onDeactivate$)).subscribe((value) => this._update(key, value));
|
|
1618
|
+
}
|
|
1619
|
+
else if (Array.isArray(value)) {
|
|
1620
|
+
value.forEach((value) => {
|
|
1621
|
+
if (value instanceof Observable) {
|
|
1622
|
+
value.pipe(takeUntil(this._onDeactivate$)).subscribe((value) => this._update(key, value));
|
|
1623
|
+
}
|
|
1624
|
+
else {
|
|
1625
|
+
this._update(key, value);
|
|
1626
|
+
}
|
|
1627
|
+
});
|
|
1628
|
+
}
|
|
1629
|
+
else if (typeof value === 'object' && value !== null) {
|
|
1630
|
+
for (const [subKey, subValue] of Object.entries(value)) {
|
|
1631
|
+
if (subValue instanceof Observable) {
|
|
1632
|
+
subValue.pipe(takeUntil(this._onDeactivate$)).subscribe((value) => this._update(`${key}:${subKey}`, value));
|
|
1633
|
+
}
|
|
1634
|
+
else {
|
|
1635
|
+
this._update(`${key}:${subKey}`, subValue);
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
else {
|
|
1640
|
+
this._update(key, value);
|
|
1641
|
+
}
|
|
1642
|
+
}
|
|
1643
|
+
}
|
|
1644
|
+
_deactivate() {
|
|
1645
|
+
this._onDeactivate$.next(true);
|
|
1646
|
+
this._isDeactivated = true;
|
|
1647
|
+
}
|
|
1648
|
+
_update(key, value) {
|
|
1649
|
+
switch (key) {
|
|
1650
|
+
case 'title':
|
|
1651
|
+
if (value && typeof value === 'string') {
|
|
1652
|
+
this._titleService.setTitle(value);
|
|
1653
|
+
}
|
|
1654
|
+
break;
|
|
1655
|
+
case 'canonical':
|
|
1656
|
+
{
|
|
1657
|
+
const link = document.querySelector(`link[rel="${key}"]`);
|
|
1658
|
+
if (link) {
|
|
1659
|
+
link.setAttribute('href', value);
|
|
1660
|
+
}
|
|
1661
|
+
else {
|
|
1662
|
+
const newLink = document.createElement('link');
|
|
1663
|
+
newLink.setAttribute('rel', key);
|
|
1664
|
+
newLink.setAttribute('href', value);
|
|
1665
|
+
document.head.appendChild(newLink);
|
|
1666
|
+
}
|
|
1667
|
+
}
|
|
1668
|
+
break;
|
|
1669
|
+
case 'alternate':
|
|
1670
|
+
{
|
|
1671
|
+
const link = document.querySelector(`link[rel="${key}"][hreflang="${value.hreflang}"]`);
|
|
1672
|
+
if (link) {
|
|
1673
|
+
link.setAttribute('href', value.href);
|
|
1674
|
+
}
|
|
1675
|
+
else {
|
|
1676
|
+
const newLink = document.createElement('link');
|
|
1677
|
+
newLink.setAttribute('rel', key);
|
|
1678
|
+
newLink.setAttribute('hreflang', value.hreflang);
|
|
1679
|
+
newLink.setAttribute('href', value.href);
|
|
1680
|
+
document.head.appendChild(newLink);
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
break;
|
|
1684
|
+
default:
|
|
1685
|
+
if (value !== undefined && value !== null) {
|
|
1686
|
+
const val = Array.isArray(value) ? value.join(', ') : value;
|
|
1687
|
+
this._metaService.updateTag({ name: key, content: val });
|
|
1688
|
+
}
|
|
1689
|
+
else {
|
|
1690
|
+
this._metaService.removeTag(`name="${key}"`);
|
|
1691
|
+
}
|
|
1692
|
+
break;
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
_cleanUp() {
|
|
1696
|
+
for (const key in this._config) {
|
|
1697
|
+
if (key === 'alternate') {
|
|
1698
|
+
const links = document.querySelectorAll(`link[rel="${key}"]`);
|
|
1699
|
+
links.forEach((link) => {
|
|
1700
|
+
link.remove();
|
|
1701
|
+
});
|
|
1702
|
+
continue;
|
|
1703
|
+
}
|
|
1704
|
+
if (key === 'canonical') {
|
|
1705
|
+
const link = document.querySelector(`link[rel="${key}"]`);
|
|
1706
|
+
if (link) {
|
|
1707
|
+
link.remove();
|
|
1708
|
+
}
|
|
1709
|
+
continue;
|
|
1710
|
+
}
|
|
1711
|
+
if (typeof this._config[key] === 'object' &&
|
|
1712
|
+
this._config[key] !== null &&
|
|
1713
|
+
!(this._config[key] instanceof Observable)) {
|
|
1714
|
+
for (const subKey in this._config[key]) {
|
|
1715
|
+
const parentValue = this.parent?.config?.[key]?.[subKey];
|
|
1716
|
+
if (parentValue === undefined) {
|
|
1717
|
+
this._update(`${key}:${subKey}`, undefined);
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
else {
|
|
1722
|
+
const parentValue = this.parent?.config?.[key];
|
|
1723
|
+
if (parentValue === undefined) {
|
|
1724
|
+
this._update(key, null);
|
|
1725
|
+
}
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
SeoDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: SeoDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1731
|
+
SeoDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.4", type: SeoDirective, isStandalone: true, providers: [{ provide: SEO_DIRECTIVE_TOKEN, useExisting: SeoDirective }], ngImport: i0 });
|
|
1732
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: SeoDirective, decorators: [{
|
|
1733
|
+
type: Directive,
|
|
1734
|
+
args: [{
|
|
1735
|
+
standalone: true,
|
|
1736
|
+
providers: [{ provide: SEO_DIRECTIVE_TOKEN, useExisting: SeoDirective }],
|
|
1737
|
+
}]
|
|
1738
|
+
}] });
|
|
1739
|
+
|
|
1740
|
+
// TODO(TRB): Add correct type once provided by API
|
|
1741
|
+
const normalizeGameResultType = (type) => {
|
|
1742
|
+
if (!type) {
|
|
1743
|
+
return null;
|
|
1744
|
+
}
|
|
1745
|
+
switch (type) {
|
|
1746
|
+
case 'extra_time':
|
|
1747
|
+
return {
|
|
1748
|
+
i18n: 'game-result-type.extra-time',
|
|
1749
|
+
shortCode: 'AET',
|
|
1750
|
+
text: 'After Extra Time',
|
|
1751
|
+
};
|
|
1752
|
+
case 'penalty':
|
|
1753
|
+
return {
|
|
1754
|
+
i18n: 'game-result-type.penalty',
|
|
1755
|
+
shortCode: 'PSO',
|
|
1756
|
+
text: 'Penalty shootout',
|
|
1757
|
+
};
|
|
1758
|
+
case 'golden_goal':
|
|
1759
|
+
return {
|
|
1760
|
+
i18n: 'game-result-type.golden-goal',
|
|
1761
|
+
shortCode: 'GG',
|
|
1762
|
+
text: 'Golden Goal',
|
|
1763
|
+
};
|
|
1764
|
+
case 'default':
|
|
1765
|
+
default:
|
|
1766
|
+
return {
|
|
1767
|
+
i18n: 'game-result-type.full-time',
|
|
1768
|
+
shortCode: 'FT',
|
|
1769
|
+
text: 'Full Time',
|
|
1770
|
+
};
|
|
1771
|
+
}
|
|
1772
|
+
};
|
|
1773
|
+
|
|
1774
|
+
class NormalizeGameResultTypePipe {
|
|
1775
|
+
constructor() {
|
|
1776
|
+
this.transform = normalizeGameResultType;
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
NormalizeGameResultTypePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NormalizeGameResultTypePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1780
|
+
NormalizeGameResultTypePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: NormalizeGameResultTypePipe, isStandalone: true, name: "etNormalizeGameResultType" });
|
|
1781
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NormalizeGameResultTypePipe, decorators: [{
|
|
1782
|
+
type: Pipe,
|
|
1783
|
+
args: [{ name: 'etNormalizeGameResultType', standalone: true }]
|
|
1784
|
+
}] });
|
|
1785
|
+
|
|
1786
|
+
const normalizeMatchState = (match) => {
|
|
1787
|
+
if (match?.isCompletedByReferee) {
|
|
1788
|
+
return "autoWin" /* MatchStateType.AUTO_WIN */;
|
|
1789
|
+
}
|
|
1790
|
+
else if (match?.status === 'preparing') {
|
|
1791
|
+
return "preMatch" /* MatchStateType.PRE_MATCH */;
|
|
1792
|
+
}
|
|
1793
|
+
else if (match?.status === 'started') {
|
|
1794
|
+
return "live" /* MatchStateType.LIVE */;
|
|
1795
|
+
}
|
|
1796
|
+
else if (match?.status === 'published' || match?.status === 'finished') {
|
|
1797
|
+
return "postMatch" /* MatchStateType.POST_MATCH */;
|
|
1798
|
+
}
|
|
1799
|
+
else if (match?.round.state !== 'preparing') {
|
|
1800
|
+
return "preparingRound" /* MatchStateType.PREPARING_ROUND */;
|
|
1801
|
+
}
|
|
1802
|
+
return null;
|
|
1803
|
+
};
|
|
1804
|
+
|
|
1805
|
+
class NormalizeMatchStatePipe {
|
|
1806
|
+
constructor() {
|
|
1807
|
+
this.transform = normalizeMatchState;
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
NormalizeMatchStatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NormalizeMatchStatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1811
|
+
NormalizeMatchStatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: NormalizeMatchStatePipe, isStandalone: true, name: "etNormalizeMatchState" });
|
|
1812
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NormalizeMatchStatePipe, decorators: [{
|
|
1813
|
+
type: Pipe,
|
|
1814
|
+
args: [{ name: 'etNormalizeMatchState', standalone: true }]
|
|
1815
|
+
}] });
|
|
1816
|
+
|
|
1817
|
+
const normalizeMatchParticipants = (match) => {
|
|
1818
|
+
const matchState = normalizeMatchState(match);
|
|
1819
|
+
if (!match || !matchState) {
|
|
1820
|
+
return null;
|
|
1821
|
+
}
|
|
1822
|
+
return {
|
|
1823
|
+
home: normalizeMatchParticipant(match, 'home'),
|
|
1824
|
+
away: normalizeMatchParticipant(match, 'away'),
|
|
1825
|
+
};
|
|
1826
|
+
};
|
|
1827
|
+
const normalizeMatchParticipant = (match, side) => {
|
|
1828
|
+
const matchState = normalizeMatchState(match);
|
|
1829
|
+
if (!match || !matchState) {
|
|
1830
|
+
return null;
|
|
1831
|
+
}
|
|
1832
|
+
const participant = match[side];
|
|
1833
|
+
const participantType = match.home?.type ?? match.away?.type ?? 'unknown';
|
|
1834
|
+
if (!participant) {
|
|
1835
|
+
if (matchState === "postMatch" /* MatchStateType.POST_MATCH */ || matchState === "autoWin" /* MatchStateType.AUTO_WIN */) {
|
|
1836
|
+
return {
|
|
1837
|
+
participantType,
|
|
1838
|
+
type: 'none',
|
|
1839
|
+
i18n: 'match-participant.none',
|
|
1840
|
+
text: 'No opponent',
|
|
1841
|
+
data: participant,
|
|
1842
|
+
};
|
|
1843
|
+
}
|
|
1844
|
+
else {
|
|
1845
|
+
return {
|
|
1846
|
+
participantType,
|
|
1847
|
+
type: 'tbd',
|
|
1848
|
+
i18n: 'match-participant.tbd',
|
|
1849
|
+
text: 'TBD',
|
|
1850
|
+
data: participant,
|
|
1851
|
+
};
|
|
1852
|
+
}
|
|
1853
|
+
}
|
|
1854
|
+
else {
|
|
1855
|
+
return {
|
|
1856
|
+
participantType,
|
|
1857
|
+
type: 'participant',
|
|
1858
|
+
data: participant,
|
|
1859
|
+
};
|
|
1860
|
+
}
|
|
1861
|
+
};
|
|
1862
|
+
|
|
1863
|
+
class NormalizeMatchParticipantsPipe {
|
|
1864
|
+
constructor() {
|
|
1865
|
+
this.transform = normalizeMatchParticipants;
|
|
1866
|
+
}
|
|
1867
|
+
}
|
|
1868
|
+
NormalizeMatchParticipantsPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NormalizeMatchParticipantsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1869
|
+
NormalizeMatchParticipantsPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: NormalizeMatchParticipantsPipe, isStandalone: true, name: "etNormalizeMatchParticipants" });
|
|
1870
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NormalizeMatchParticipantsPipe, decorators: [{
|
|
1871
|
+
type: Pipe,
|
|
1872
|
+
args: [{ name: 'etNormalizeMatchParticipants', standalone: true }]
|
|
1873
|
+
}] });
|
|
1874
|
+
|
|
1875
|
+
const EMPTY_SCORE = {
|
|
1876
|
+
home: { score: 'match-score.placeholder', isWinner: false },
|
|
1877
|
+
away: { score: 'match-score.placeholder', isWinner: false },
|
|
1878
|
+
isNumeric: false,
|
|
1879
|
+
subLine: null,
|
|
1880
|
+
};
|
|
1881
|
+
const normalizeMatchScore = (match) => {
|
|
1882
|
+
if (!match) {
|
|
1883
|
+
return null;
|
|
1884
|
+
}
|
|
1885
|
+
const matchState = normalizeMatchState(match);
|
|
1886
|
+
const subLine = getMatchScoreSubLine(match);
|
|
1887
|
+
if (!match.homeScore && !match.awayScore) {
|
|
1888
|
+
return { ...EMPTY_SCORE, subLine, isNumeric: false };
|
|
1889
|
+
}
|
|
1890
|
+
if (isKnockoutMatch(match)) {
|
|
1891
|
+
if (matchState === "preMatch" /* MatchStateType.PRE_MATCH */ || matchState === "live" /* MatchStateType.LIVE */) {
|
|
1892
|
+
return { ...EMPTY_SCORE, subLine, isNumeric: false };
|
|
1893
|
+
}
|
|
1894
|
+
return {
|
|
1895
|
+
home: {
|
|
1896
|
+
score: getKnockoutMatchScore(match.homeScore),
|
|
1897
|
+
isWinner: match.homeScore?.status === 'won',
|
|
1898
|
+
},
|
|
1899
|
+
away: {
|
|
1900
|
+
score: getKnockoutMatchScore(match.awayScore),
|
|
1901
|
+
isWinner: match.awayScore?.status === 'won',
|
|
1902
|
+
},
|
|
1903
|
+
subLine,
|
|
1904
|
+
isNumeric: false,
|
|
1905
|
+
};
|
|
1906
|
+
}
|
|
1907
|
+
else if (isGroupMatch(match)) {
|
|
1908
|
+
if (match.games.length === 1) {
|
|
1909
|
+
// Return the score if only one game has been played
|
|
1910
|
+
return {
|
|
1911
|
+
...getGroupMatchScore(match),
|
|
1912
|
+
subLine,
|
|
1913
|
+
isNumeric: true,
|
|
1914
|
+
};
|
|
1915
|
+
}
|
|
1916
|
+
else {
|
|
1917
|
+
return {
|
|
1918
|
+
...getGroupMatchPoints(match),
|
|
1919
|
+
subLine,
|
|
1920
|
+
isNumeric: true,
|
|
1921
|
+
};
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
else {
|
|
1925
|
+
return {
|
|
1926
|
+
...getGroupMatchScore(match),
|
|
1927
|
+
subLine,
|
|
1928
|
+
isNumeric: true,
|
|
1929
|
+
};
|
|
1930
|
+
}
|
|
1931
|
+
};
|
|
1932
|
+
const isKnockoutMatch = (match) => {
|
|
1933
|
+
if (!match) {
|
|
1934
|
+
return false;
|
|
1935
|
+
}
|
|
1936
|
+
return (match.matchType === 'single_elimination' ||
|
|
1937
|
+
match.matchType === 'double_elimination' ||
|
|
1938
|
+
match.matchType === 'fifa_swiss');
|
|
1939
|
+
};
|
|
1940
|
+
const isGroupMatch = (match) => {
|
|
1941
|
+
if (!match) {
|
|
1942
|
+
return false;
|
|
1943
|
+
}
|
|
1944
|
+
return match.matchType === 'groups' || match.matchType === 'league';
|
|
1945
|
+
};
|
|
1946
|
+
const getKnockoutMatchScore = (score) => {
|
|
1947
|
+
if (score?.status === 'won') {
|
|
1948
|
+
return 'match-score.knockout.won';
|
|
1949
|
+
}
|
|
1950
|
+
else if (score?.status === 'lost') {
|
|
1951
|
+
return 'match-score.knockout.lost';
|
|
1952
|
+
}
|
|
1953
|
+
else if (score?.status === 'tie') {
|
|
1954
|
+
return 'match-score.knockout.tie';
|
|
1955
|
+
}
|
|
1956
|
+
return null;
|
|
1957
|
+
};
|
|
1958
|
+
const getMatchScoreSubLine = (match) => {
|
|
1959
|
+
if (isKnockoutMatch(match)) {
|
|
1960
|
+
return null;
|
|
1961
|
+
}
|
|
1962
|
+
else if (isGroupMatch(match)) {
|
|
1963
|
+
return 'match-score.groups.sub-line';
|
|
1964
|
+
}
|
|
1965
|
+
else {
|
|
1966
|
+
return null;
|
|
1967
|
+
}
|
|
1968
|
+
};
|
|
1969
|
+
const getGroupMatchScore = (match) => {
|
|
1970
|
+
if (!match) {
|
|
1971
|
+
return null;
|
|
1972
|
+
}
|
|
1973
|
+
return {
|
|
1974
|
+
home: {
|
|
1975
|
+
score: match.homeScore?.ownPoints || 0,
|
|
1976
|
+
isWinner: match.homeScore?.status === 'won',
|
|
1977
|
+
},
|
|
1978
|
+
away: {
|
|
1979
|
+
score: match.awayScore?.ownPoints || 0,
|
|
1980
|
+
isWinner: match.awayScore?.status === 'won',
|
|
1981
|
+
},
|
|
1982
|
+
};
|
|
1983
|
+
};
|
|
1984
|
+
const getGroupMatchPoints = (match) => {
|
|
1985
|
+
if (!match) {
|
|
1986
|
+
return null;
|
|
1987
|
+
}
|
|
1988
|
+
return {
|
|
1989
|
+
home: {
|
|
1990
|
+
score: match.homeScore?.score || 0,
|
|
1991
|
+
isWinner: match.homeScore?.status === 'won',
|
|
1992
|
+
},
|
|
1993
|
+
away: {
|
|
1994
|
+
score: match.awayScore?.score || 0,
|
|
1995
|
+
isWinner: match.awayScore?.status === 'won',
|
|
1996
|
+
},
|
|
1997
|
+
};
|
|
1998
|
+
};
|
|
1999
|
+
|
|
2000
|
+
class NormalizeMatchScorePipe {
|
|
2001
|
+
constructor() {
|
|
2002
|
+
this.transform = normalizeMatchScore;
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
NormalizeMatchScorePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NormalizeMatchScorePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2006
|
+
NormalizeMatchScorePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: NormalizeMatchScorePipe, isStandalone: true, name: "etNormalizeMatchScore" });
|
|
2007
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NormalizeMatchScorePipe, decorators: [{
|
|
2008
|
+
type: Pipe,
|
|
2009
|
+
args: [{ name: 'etNormalizeMatchScore', standalone: true }]
|
|
2010
|
+
}] });
|
|
2011
|
+
|
|
2012
|
+
const normalizeMatchType = (matchType) => {
|
|
2013
|
+
if (!matchType) {
|
|
2014
|
+
return null;
|
|
2015
|
+
}
|
|
2016
|
+
switch (matchType) {
|
|
2017
|
+
case 'double_elimination':
|
|
2018
|
+
return {
|
|
2019
|
+
i18n: 'match-type.double-elimination',
|
|
2020
|
+
text: 'Double Elimination',
|
|
2021
|
+
};
|
|
2022
|
+
case 'single_elimination':
|
|
2023
|
+
return {
|
|
2024
|
+
i18n: 'match-type.single-elimination',
|
|
2025
|
+
text: 'Single Elimination',
|
|
2026
|
+
};
|
|
2027
|
+
case 'fifa_swiss':
|
|
2028
|
+
return {
|
|
2029
|
+
i18n: 'match-type.fifa-swiss',
|
|
2030
|
+
text: 'FIFA Swiss',
|
|
2031
|
+
};
|
|
2032
|
+
case 'groups':
|
|
2033
|
+
return {
|
|
2034
|
+
i18n: 'match-type.groups',
|
|
2035
|
+
text: 'Groups',
|
|
2036
|
+
};
|
|
2037
|
+
case 'league':
|
|
2038
|
+
return {
|
|
2039
|
+
i18n: 'match-type.league',
|
|
2040
|
+
text: 'League',
|
|
2041
|
+
};
|
|
2042
|
+
case 'pools':
|
|
2043
|
+
return {
|
|
2044
|
+
i18n: 'match-type.pools',
|
|
2045
|
+
text: 'Pools',
|
|
2046
|
+
};
|
|
2047
|
+
}
|
|
2048
|
+
};
|
|
2049
|
+
|
|
2050
|
+
class NormalizeMatchTypePipe {
|
|
2051
|
+
constructor() {
|
|
2052
|
+
this.transform = normalizeMatchType;
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2055
|
+
NormalizeMatchTypePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NormalizeMatchTypePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2056
|
+
NormalizeMatchTypePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: NormalizeMatchTypePipe, isStandalone: true, name: "etNormalizeMatchType" });
|
|
2057
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NormalizeMatchTypePipe, decorators: [{
|
|
2058
|
+
type: Pipe,
|
|
2059
|
+
args: [{ name: 'etNormalizeMatchType', standalone: true }]
|
|
2060
|
+
}] });
|
|
2061
|
+
|
|
593
2062
|
const toArray = (value) => {
|
|
594
2063
|
return Array.from({ length: value }, (_, i) => i);
|
|
595
2064
|
};
|
|
@@ -600,24 +2069,51 @@ class ToArrayPipe {
|
|
|
600
2069
|
this.transform = toArray;
|
|
601
2070
|
}
|
|
602
2071
|
}
|
|
603
|
-
ToArrayPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
604
|
-
ToArrayPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
605
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2072
|
+
ToArrayPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ToArrayPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2073
|
+
ToArrayPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: ToArrayPipe, isStandalone: true, name: "toArray" });
|
|
2074
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ToArrayPipe, decorators: [{
|
|
606
2075
|
type: Pipe,
|
|
607
2076
|
args: [{ name: 'toArray', standalone: true }]
|
|
608
2077
|
}] });
|
|
609
2078
|
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
};
|
|
2079
|
+
var _a;
|
|
2080
|
+
class TypedQueryList extends QueryList {
|
|
2081
|
+
constructor() {
|
|
2082
|
+
super(...arguments);
|
|
2083
|
+
this[_a] = () => {
|
|
2084
|
+
return super[Symbol.iterator]();
|
|
2085
|
+
};
|
|
2086
|
+
}
|
|
2087
|
+
get changes() {
|
|
2088
|
+
return super.changes;
|
|
2089
|
+
}
|
|
2090
|
+
toArray() {
|
|
2091
|
+
return super.toArray();
|
|
2092
|
+
}
|
|
2093
|
+
forEach(fn) {
|
|
2094
|
+
super.forEach(fn);
|
|
2095
|
+
}
|
|
2096
|
+
filter(fn) {
|
|
2097
|
+
return super.filter(fn);
|
|
2098
|
+
}
|
|
2099
|
+
map(fn) {
|
|
2100
|
+
return super.map(fn);
|
|
2101
|
+
}
|
|
2102
|
+
reduce(fn, initialValue) {
|
|
2103
|
+
return super.reduce(fn, initialValue);
|
|
2104
|
+
}
|
|
2105
|
+
some(fn) {
|
|
2106
|
+
return super.some(fn);
|
|
2107
|
+
}
|
|
2108
|
+
find(fn) {
|
|
2109
|
+
return super.find(fn);
|
|
2110
|
+
}
|
|
2111
|
+
}
|
|
2112
|
+
_a = Symbol.iterator;
|
|
617
2113
|
|
|
618
2114
|
/**
|
|
619
2115
|
* Generated bundle index. Do not edit.
|
|
620
2116
|
*/
|
|
621
2117
|
|
|
622
|
-
export { ContentObserverService, DEFAULT_VIEWPORT_CONFIG, FocusVisibleService, LetContext, LetDirective, Memo, MutationObserverFactory, ObserveContentDirective, ObserveResizeDirective, RepeatDirective, ResizeObserverFactory, ResizeObserverService, ToArrayPipe, VIEWPORT_CONFIG, ViewportService, clamp, provideViewportConfig, toArray, toArrayTrackByFn };
|
|
2118
|
+
export { ClickObserverFactory, ClickObserverService, ClickOutsideDirective, ContentObserverService, CursorDragScrollDirective, DEFAULT_VIEWPORT_CONFIG, DestroyService, FocusVisibleService, LetContext, LetDirective, Memo, 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, StructuredDataComponent, ToArrayPipe, TypedQueryList, VIEWPORT_CONFIG, ViewportService, clamp, clone, createReactiveBindings, deleteCookie, elementCanScroll, equal, getCookie, getDomain, getGroupMatchPoints, getGroupMatchScore, getKnockoutMatchScore, getMatchScoreSubLine, hasCookie, isGroupMatch, isKnockoutMatch, mergeSeoConfig, normalizeGameResultType, normalizeMatchParticipant, normalizeMatchParticipants, normalizeMatchScore, normalizeMatchState, normalizeMatchType, provideViewportConfig, routerDisableScrollTop, setCookie, toArray, toArrayTrackByFn };
|
|
623
2119
|
//# sourceMappingURL=ethlete-core.mjs.map
|