nxt-pick-datetime 16.0.0-alpha.6 → 16.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{esm2020 → esm2022}/lib/class/date-time-adapter.class.mjs +96 -96
- package/{esm2020 → esm2022}/lib/class/date-time-format.class.mjs +3 -3
- package/esm2022/lib/class/date-time.class.mjs +96 -0
- package/{esm2020 → esm2022}/lib/class/dialog-config.class.mjs +46 -46
- package/{esm2020 → esm2022}/lib/class/dialog-ref.class.mjs +118 -118
- package/esm2022/lib/date-time/calendar/calendar.component.mjs +347 -0
- package/esm2022/lib/date-time/calendar-body/calendar-body.component.mjs +152 -0
- package/esm2022/lib/date-time/calendar-month-view/calendar-month-view.component.mjs +430 -0
- package/esm2022/lib/date-time/calendar-multi-year-view/calendar-multi-year-view.component.mjs +359 -0
- package/esm2022/lib/date-time/calendar-year-view/calendar-year-view.component.mjs +363 -0
- package/esm2022/lib/date-time/date-time-inline/date-time-inline.component.mjs +276 -0
- package/esm2022/lib/date-time/date-time-picker/date-time-picker.component.mjs +542 -0
- package/{esm2020 → esm2022}/lib/date-time/date-time-picker-container/date-time-picker-container.animations.mjs +18 -18
- package/esm2022/lib/date-time/date-time-picker-container/date-time-picker-container.component.mjs +390 -0
- package/esm2022/lib/date-time/date-time-picker-input.directive.mjs +619 -0
- package/esm2022/lib/date-time/date-time-picker-intl.service.mjs +62 -0
- package/esm2022/lib/date-time/date-time-picker-trigger.directive.mjs +71 -0
- package/esm2022/lib/date-time/date-time.module.mjs +97 -0
- package/esm2022/lib/date-time/number-fixed-len.pipe.mjs +23 -0
- package/esm2022/lib/date-time/timer/timer.component.mjs +300 -0
- package/esm2022/lib/date-time/timer-box/timer-box.component.mjs +96 -0
- package/esm2022/lib/dialog/dialog-container/dialog-container.component.mjs +249 -0
- package/esm2022/lib/dialog/dialog.module.mjs +43 -0
- package/esm2022/lib/dialog/dialog.service.mjs +252 -0
- package/esm2022/lib/utils/object.mjs +24 -0
- package/esm2022/moment-adapter/date-time-adapter.class.mjs +221 -0
- package/{esm2020 → esm2022}/moment-adapter/date-time-format.class.mjs +12 -12
- package/esm2022/moment-adapter/moment-adapter.module.mjs +38 -0
- package/{esm2020 → esm2022}/moment-adapter/nxt-pick-datetime-moment-adapter.mjs +4 -4
- package/{esm2020 → esm2022}/moment-adapter/public-api.mjs +2 -2
- package/esm2022/native-adapter/date-time-adapter.class.mjs +367 -0
- package/{esm2020 → esm2022}/native-adapter/date-time-format.class.mjs +12 -12
- package/esm2022/native-adapter/native-adapter.module.mjs +38 -0
- package/{esm2020 → esm2022}/native-adapter/nxt-pick-datetime-native-adapter.mjs +4 -4
- package/{esm2020 → esm2022}/native-adapter/public-api.mjs +1 -1
- package/{esm2020 → esm2022}/nxt-pick-datetime.mjs +4 -4
- package/{esm2020 → esm2022}/public-api.mjs +13 -13
- package/{fesm2020 → fesm2022}/nxt-pick-datetime-moment-adapter.mjs +257 -257
- package/{fesm2020 → fesm2022}/nxt-pick-datetime-moment-adapter.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/nxt-pick-datetime-native-adapter.mjs +402 -402
- package/{fesm2020 → fesm2022}/nxt-pick-datetime-native-adapter.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/nxt-pick-datetime.mjs +4858 -4860
- package/{fesm2020 → fesm2022}/nxt-pick-datetime.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/lib/class/date-time-adapter.class.d.ts +176 -176
- package/lib/class/date-time-format.class.d.ts +12 -12
- package/lib/class/date-time.class.d.ts +76 -76
- package/lib/class/dialog-config.class.d.ts +90 -90
- package/lib/class/dialog-ref.class.d.ts +50 -50
- package/lib/date-time/calendar/calendar.component.d.ts +147 -147
- package/lib/date-time/calendar-body/calendar-body.component.d.ts +79 -79
- package/lib/date-time/calendar-month-view/calendar-month-view.component.d.ts +139 -139
- package/lib/date-time/calendar-multi-year-view/calendar-multi-year-view.component.d.ts +115 -115
- package/lib/date-time/calendar-year-view/calendar-year-view.component.d.ts +123 -123
- package/lib/date-time/date-time-inline/date-time-inline.component.d.ts +106 -106
- package/lib/date-time/date-time-picker/date-time-picker.component.d.ts +172 -172
- package/lib/date-time/date-time-picker-container/date-time-picker-container.animations.d.ts +6 -6
- package/lib/date-time/date-time-picker-container/date-time-picker-container.component.d.ts +129 -129
- package/lib/date-time/date-time-picker-input.directive.d.ts +167 -167
- package/lib/date-time/date-time-picker-intl.service.d.ts +51 -51
- package/lib/date-time/date-time-picker-trigger.directive.d.ts +22 -22
- package/lib/date-time/date-time.module.d.ts +23 -23
- package/lib/date-time/number-fixed-len.pipe.d.ts +8 -8
- package/lib/date-time/timer/timer.component.d.ts +131 -131
- package/lib/date-time/timer-box/timer-box.component.d.ts +37 -37
- package/lib/dialog/dialog-container/dialog-container.component.d.ts +69 -69
- package/lib/dialog/dialog.module.d.ts +12 -12
- package/lib/dialog/dialog.service.d.ts +78 -78
- package/lib/utils/object.d.ts +9 -10
- package/moment-adapter/date-time-adapter.class.d.ts +64 -64
- package/moment-adapter/date-time-format.class.d.ts +5 -5
- package/moment-adapter/index.d.ts +5 -5
- package/moment-adapter/moment-adapter.module.d.ts +6 -6
- package/moment-adapter/public-api.d.ts +2 -2
- package/native-adapter/date-time-adapter.class.d.ts +72 -72
- package/native-adapter/date-time-format.class.d.ts +5 -5
- package/native-adapter/index.d.ts +5 -5
- package/native-adapter/native-adapter.module.d.ts +7 -7
- package/native-adapter/public-api.d.ts +1 -1
- package/package.json +18 -28
- package/public-api.d.ts +14 -14
- package/esm2020/lib/class/date-time.class.mjs +0 -95
- package/esm2020/lib/date-time/calendar/calendar.component.mjs +0 -346
- package/esm2020/lib/date-time/calendar-body/calendar-body.component.mjs +0 -151
- package/esm2020/lib/date-time/calendar-month-view/calendar-month-view.component.mjs +0 -429
- package/esm2020/lib/date-time/calendar-multi-year-view/calendar-multi-year-view.component.mjs +0 -358
- package/esm2020/lib/date-time/calendar-year-view/calendar-year-view.component.mjs +0 -362
- package/esm2020/lib/date-time/date-time-inline/date-time-inline.component.mjs +0 -275
- package/esm2020/lib/date-time/date-time-picker/date-time-picker.component.mjs +0 -541
- package/esm2020/lib/date-time/date-time-picker-container/date-time-picker-container.component.mjs +0 -389
- package/esm2020/lib/date-time/date-time-picker-input.directive.mjs +0 -618
- package/esm2020/lib/date-time/date-time-picker-intl.service.mjs +0 -61
- package/esm2020/lib/date-time/date-time-picker-trigger.directive.mjs +0 -70
- package/esm2020/lib/date-time/date-time.module.mjs +0 -96
- package/esm2020/lib/date-time/number-fixed-len.pipe.mjs +0 -22
- package/esm2020/lib/date-time/timer/timer.component.mjs +0 -299
- package/esm2020/lib/date-time/timer-box/timer-box.component.mjs +0 -95
- package/esm2020/lib/dialog/dialog-container/dialog-container.component.mjs +0 -248
- package/esm2020/lib/dialog/dialog.module.mjs +0 -42
- package/esm2020/lib/dialog/dialog.service.mjs +0 -252
- package/esm2020/lib/utils/object.mjs +0 -25
- package/esm2020/moment-adapter/date-time-adapter.class.mjs +0 -220
- package/esm2020/moment-adapter/moment-adapter.module.mjs +0 -37
- package/esm2020/native-adapter/date-time-adapter.class.mjs +0 -366
- package/esm2020/native-adapter/native-adapter.module.mjs +0 -37
- package/fesm2015/nxt-pick-datetime-moment-adapter.mjs +0 -274
- package/fesm2015/nxt-pick-datetime-moment-adapter.mjs.map +0 -1
- package/fesm2015/nxt-pick-datetime-native-adapter.mjs +0 -420
- package/fesm2015/nxt-pick-datetime-native-adapter.mjs.map +0 -1
- package/fesm2015/nxt-pick-datetime.mjs +0 -5014
- package/fesm2015/nxt-pick-datetime.mjs.map +0 -1
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
import { Subject } from 'rxjs';
|
|
2
|
-
import { filter, take } from 'rxjs/operators';
|
|
3
|
-
export class DialogRef {
|
|
4
|
-
constructor(overlayRef, container, id, location) {
|
|
5
|
-
this.overlayRef = overlayRef;
|
|
6
|
-
this.container = container;
|
|
7
|
-
this.id = id;
|
|
8
|
-
this._beforeClose$ = new Subject();
|
|
9
|
-
this._afterOpen$ = new Subject();
|
|
10
|
-
this._afterClosed$ = new Subject();
|
|
11
|
-
/** Whether the user is allowed to close the dialog */
|
|
12
|
-
this.disableClose = !!this.container.config?.disableClose;
|
|
13
|
-
this.container.animationStateChanged
|
|
14
|
-
.pipe(filter((event) => event.phaseName === 'done' && event.toState === 'enter'), take(1))
|
|
15
|
-
.subscribe(() => {
|
|
16
|
-
this._afterOpen$.next(undefined);
|
|
17
|
-
this._afterOpen$.complete();
|
|
18
|
-
});
|
|
19
|
-
this.container.animationStateChanged
|
|
20
|
-
.pipe(filter((event) => event.phaseName === 'done' && event.toState === 'exit'), take(1))
|
|
21
|
-
.subscribe(() => {
|
|
22
|
-
this.overlayRef.dispose();
|
|
23
|
-
this.locationChanged?.unsubscribe();
|
|
24
|
-
this.locationChanged = undefined;
|
|
25
|
-
this._afterClosed$.next(this.result);
|
|
26
|
-
this._afterClosed$.complete();
|
|
27
|
-
this.componentInstance = undefined;
|
|
28
|
-
});
|
|
29
|
-
this.overlayRef.keydownEvents()
|
|
30
|
-
.pipe(filter(event => event.code.toLowerCase() === 'escape' && !this.disableClose))
|
|
31
|
-
.subscribe(() => this.close());
|
|
32
|
-
if (location) {
|
|
33
|
-
this.locationChanged = location.subscribe(() => {
|
|
34
|
-
if (this.container.config?.closeOnNavigation) {
|
|
35
|
-
this.close();
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
close(dialogResult) {
|
|
41
|
-
this.result = dialogResult;
|
|
42
|
-
this.container.animationStateChanged
|
|
43
|
-
.pipe(filter((event) => event.phaseName === 'start'), take(1))
|
|
44
|
-
.subscribe(() => {
|
|
45
|
-
this._beforeClose$.next(dialogResult);
|
|
46
|
-
this._beforeClose$.complete();
|
|
47
|
-
this.overlayRef.detachBackdrop();
|
|
48
|
-
});
|
|
49
|
-
this.container.startExitAnimation();
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Gets an observable that emits when the overlay's backdrop has been clicked.
|
|
53
|
-
*/
|
|
54
|
-
backdropClick() {
|
|
55
|
-
return this.overlayRef.backdropClick();
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Gets an observable that emits when keydown events are targeted on the overlay.
|
|
59
|
-
*/
|
|
60
|
-
keydownEvents() {
|
|
61
|
-
return this.overlayRef.keydownEvents();
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Updates the dialog's position.
|
|
65
|
-
*
|
|
66
|
-
* @param position New dialog position.
|
|
67
|
-
*/
|
|
68
|
-
updatePosition(position) {
|
|
69
|
-
const strategy = this.getPositionStrategy();
|
|
70
|
-
if (position && (position.left || position.right)) {
|
|
71
|
-
if (position.left)
|
|
72
|
-
strategy.left(position.left);
|
|
73
|
-
else
|
|
74
|
-
strategy.right(position.right);
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
strategy.centerHorizontally();
|
|
78
|
-
}
|
|
79
|
-
if (position && (position.top || position.bottom)) {
|
|
80
|
-
if (position.top)
|
|
81
|
-
strategy.top(position.top);
|
|
82
|
-
else
|
|
83
|
-
strategy.bottom(position.bottom);
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
strategy.centerVertically();
|
|
87
|
-
}
|
|
88
|
-
this.overlayRef.updatePosition();
|
|
89
|
-
return this;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Updates the dialog's width and height.
|
|
93
|
-
*
|
|
94
|
-
* @param width New width of the dialog.
|
|
95
|
-
* @param height New height of the dialog.
|
|
96
|
-
*/
|
|
97
|
-
updateSize(width = 'auto', height = 'auto') {
|
|
98
|
-
this.overlayRef.updateSize({ width, height });
|
|
99
|
-
this.overlayRef.updatePosition();
|
|
100
|
-
return this;
|
|
101
|
-
}
|
|
102
|
-
isAnimating() {
|
|
103
|
-
return this.container.isAnimating;
|
|
104
|
-
}
|
|
105
|
-
afterOpen() {
|
|
106
|
-
return this._afterOpen$.asObservable();
|
|
107
|
-
}
|
|
108
|
-
beforeClose() {
|
|
109
|
-
return this._beforeClose$.asObservable();
|
|
110
|
-
}
|
|
111
|
-
afterClosed() {
|
|
112
|
-
return this._afterClosed$.asObservable();
|
|
113
|
-
}
|
|
114
|
-
/** Fetches the position strategy object from the overlay ref */
|
|
115
|
-
getPositionStrategy() {
|
|
116
|
-
return this.overlayRef.getConfig().positionStrategy;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
2
|
+
import { filter, take } from 'rxjs/operators';
|
|
3
|
+
export class DialogRef {
|
|
4
|
+
constructor(overlayRef, container, id, location) {
|
|
5
|
+
this.overlayRef = overlayRef;
|
|
6
|
+
this.container = container;
|
|
7
|
+
this.id = id;
|
|
8
|
+
this._beforeClose$ = new Subject();
|
|
9
|
+
this._afterOpen$ = new Subject();
|
|
10
|
+
this._afterClosed$ = new Subject();
|
|
11
|
+
/** Whether the user is allowed to close the dialog */
|
|
12
|
+
this.disableClose = !!this.container.config?.disableClose;
|
|
13
|
+
this.container.animationStateChanged
|
|
14
|
+
.pipe(filter((event) => event.phaseName === 'done' && event.toState === 'enter'), take(1))
|
|
15
|
+
.subscribe(() => {
|
|
16
|
+
this._afterOpen$.next(undefined);
|
|
17
|
+
this._afterOpen$.complete();
|
|
18
|
+
});
|
|
19
|
+
this.container.animationStateChanged
|
|
20
|
+
.pipe(filter((event) => event.phaseName === 'done' && event.toState === 'exit'), take(1))
|
|
21
|
+
.subscribe(() => {
|
|
22
|
+
this.overlayRef.dispose();
|
|
23
|
+
this.locationChanged?.unsubscribe();
|
|
24
|
+
this.locationChanged = undefined;
|
|
25
|
+
this._afterClosed$.next(this.result);
|
|
26
|
+
this._afterClosed$.complete();
|
|
27
|
+
this.componentInstance = undefined;
|
|
28
|
+
});
|
|
29
|
+
this.overlayRef.keydownEvents()
|
|
30
|
+
.pipe(filter(event => event.code.toLowerCase() === 'escape' && !this.disableClose))
|
|
31
|
+
.subscribe(() => this.close());
|
|
32
|
+
if (location) {
|
|
33
|
+
this.locationChanged = location.subscribe(() => {
|
|
34
|
+
if (this.container.config?.closeOnNavigation) {
|
|
35
|
+
this.close();
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
close(dialogResult) {
|
|
41
|
+
this.result = dialogResult;
|
|
42
|
+
this.container.animationStateChanged
|
|
43
|
+
.pipe(filter((event) => event.phaseName === 'start'), take(1))
|
|
44
|
+
.subscribe(() => {
|
|
45
|
+
this._beforeClose$.next(dialogResult);
|
|
46
|
+
this._beforeClose$.complete();
|
|
47
|
+
this.overlayRef.detachBackdrop();
|
|
48
|
+
});
|
|
49
|
+
this.container.startExitAnimation();
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Gets an observable that emits when the overlay's backdrop has been clicked.
|
|
53
|
+
*/
|
|
54
|
+
backdropClick() {
|
|
55
|
+
return this.overlayRef.backdropClick();
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Gets an observable that emits when keydown events are targeted on the overlay.
|
|
59
|
+
*/
|
|
60
|
+
keydownEvents() {
|
|
61
|
+
return this.overlayRef.keydownEvents();
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Updates the dialog's position.
|
|
65
|
+
*
|
|
66
|
+
* @param position New dialog position.
|
|
67
|
+
*/
|
|
68
|
+
updatePosition(position) {
|
|
69
|
+
const strategy = this.getPositionStrategy();
|
|
70
|
+
if (position && (position.left || position.right)) {
|
|
71
|
+
if (position.left)
|
|
72
|
+
strategy.left(position.left);
|
|
73
|
+
else
|
|
74
|
+
strategy.right(position.right);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
strategy.centerHorizontally();
|
|
78
|
+
}
|
|
79
|
+
if (position && (position.top || position.bottom)) {
|
|
80
|
+
if (position.top)
|
|
81
|
+
strategy.top(position.top);
|
|
82
|
+
else
|
|
83
|
+
strategy.bottom(position.bottom);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
strategy.centerVertically();
|
|
87
|
+
}
|
|
88
|
+
this.overlayRef.updatePosition();
|
|
89
|
+
return this;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Updates the dialog's width and height.
|
|
93
|
+
*
|
|
94
|
+
* @param width New width of the dialog.
|
|
95
|
+
* @param height New height of the dialog.
|
|
96
|
+
*/
|
|
97
|
+
updateSize(width = 'auto', height = 'auto') {
|
|
98
|
+
this.overlayRef.updateSize({ width, height });
|
|
99
|
+
this.overlayRef.updatePosition();
|
|
100
|
+
return this;
|
|
101
|
+
}
|
|
102
|
+
isAnimating() {
|
|
103
|
+
return this.container.isAnimating;
|
|
104
|
+
}
|
|
105
|
+
afterOpen() {
|
|
106
|
+
return this._afterOpen$.asObservable();
|
|
107
|
+
}
|
|
108
|
+
beforeClose() {
|
|
109
|
+
return this._beforeClose$.asObservable();
|
|
110
|
+
}
|
|
111
|
+
afterClosed() {
|
|
112
|
+
return this._afterClosed$.asObservable();
|
|
113
|
+
}
|
|
114
|
+
/** Fetches the position strategy object from the overlay ref */
|
|
115
|
+
getPositionStrategy() {
|
|
116
|
+
return this.overlayRef.getConfig().positionStrategy;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
119
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLXJlZi5jbGFzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3BpY2stZGF0ZXRpbWUvc3JjL2xpYi9jbGFzcy9kaWFsb2ctcmVmLmNsYXNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdBLE9BQU8sRUFBRSxPQUFPLEVBQXFDLE1BQU0sTUFBTSxDQUFBO0FBQ2pFLE9BQU8sRUFBRSxNQUFNLEVBQUUsSUFBSSxFQUFFLE1BQU0sZ0JBQWdCLENBQUE7Q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T0gJ2VudGVyJyksXG4gICAgICAgICAgICAgICAgdGFrZSgxKVxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgLnN1YnNjcmliZSgoKSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5fYWZ0ZXJPcGVuJC5uZXh0KHVuZGVmaW5lZClcbiAgICAgICAgICAgICAgICB0aGlzLl9hZnRlck9wZW4kLmNvbXBsZXRlKClcbiAgICAgICAgICAgIH0pXG5cbiAgICAgICAgdGhpcy5jb250YWluZXIuYW5pbWF0aW9uU3RhdGVDaGFuZ2VkXG4gICAgICAgICAgICAucGlwZShcbiAgICAgICAgICAgICAgICBmaWx0ZXIoKGV2ZW50OiBBbmltYXRpb25FdmVudCkgPT4gZXZlbnQucGhhc2VOYW1lID09PSAnZG9uZScgJiYgZXZlbnQudG9TdGF0ZSA9PT0gJ2V4aXQnKSxcbiAgICAgICAgICAgICAgICB0YWtlKDEpXG4gICAgICAgICAgICApXG4gICAgICAgICAgICAuc3Vic2NyaWJlKCgpID0+IHtcbiAgICAgICAgICAgICAgICB0aGlzLm92ZXJsYXlSZWYuZGlzcG9zZSgpXG4gICAgICAgICAgICAgICAgdGhpcy5sb2NhdGlvbkNoYW5nZWQ/LnVuc3Vic2NyaWJlKClcbiAgICAgICAgICAgICAgICB0aGlzLmxvY2F0aW9uQ2hhbmdlZCA9IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgIHRoaXMuX2FmdGVyQ2xvc2VkJC5uZXh0KHRoaXMucmVzdWx0KVxuICAgICAgICAgICAgICAgIHRoaXMuX2FmdGVyQ2xvc2VkJC5jb21wbGV0ZSgpXG4gICAgICAgICAgICAgICAgdGhpcy5jb21wb25lbnRJbnN0YW5jZSA9IHVuZGVmaW5lZFxuICAgICAgICAgICAgfSlcblxuICAgICAgICB0aGlzLm92ZXJsYXlSZWYua2V5ZG93bkV2ZW50cygpXG4gICAgICAgICAgICAucGlwZShmaWx0ZXIoZXZlbnQgPT4gZXZlbnQuY29kZS50b0xv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