Icard/angular-clarity-master(work.../node_modules/primeng/esm2022/spinner/spinner.mjs

447 lines
49 KiB
JavaScript

import { NgModule, Component, Input, Output, EventEmitter, forwardRef, ViewChild, ChangeDetectionStrategy, ViewEncapsulation, booleanAttribute, numberAttribute } from '@angular/core';
import { CommonModule } from '@angular/common';
import { InputTextModule } from 'primeng/inputtext';
import { NG_VALUE_ACCESSOR } from '@angular/forms';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
export const SPINNER_VALUE_ACCESSOR = {
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => Spinner),
multi: true
};
export class Spinner {
el;
cd;
onChange = new EventEmitter();
onFocus = new EventEmitter();
onBlur = new EventEmitter();
min;
max;
maxlength;
size;
placeholder;
inputId;
disabled;
readonly;
tabindex;
required;
name;
ariaLabelledBy;
inputStyle;
inputStyleClass;
formatInput;
decimalSeparator;
thousandSeparator;
precision;
value;
_step = 1;
formattedValue;
onModelChange = () => { };
onModelTouched = () => { };
keyPattern = /[0-9\+\-]/;
timer;
focus;
filled;
negativeSeparator = '-';
localeDecimalSeparator;
localeThousandSeparator;
thousandRegExp;
calculatedPrecision;
inputfieldViewChild;
get step() {
return this._step;
}
set step(val) {
this._step = val;
if (this._step != null) {
let tokens = this.step.toString().split(/[,]|[.]/);
this.calculatedPrecision = tokens[1] ? tokens[1].length : undefined;
}
}
constructor(el, cd) {
this.el = el;
this.cd = cd;
}
ngOnInit() {
if (this.formatInput) {
this.localeDecimalSeparator = (1.1).toLocaleString().substring(1, 2);
this.localeThousandSeparator = (1000).toLocaleString().substring(1, 2);
this.thousandRegExp = new RegExp(`[${this.thousandSeparator || this.localeThousandSeparator}]`, 'gim');
if (this.decimalSeparator && this.thousandSeparator && this.decimalSeparator === this.thousandSeparator) {
console.warn('thousandSeparator and decimalSeparator cannot have the same value.');
}
}
}
repeat(event, interval, dir) {
let i = interval || 500;
this.clearTimer();
this.timer = setTimeout(() => {
this.repeat(event, 40, dir);
}, i);
this.spin(event, dir);
}
spin(event, dir) {
let step = this.step * dir;
let currentValue;
let precision = this.getPrecision();
if (this.value)
currentValue = typeof this.value === 'string' ? this.parseValue(this.value) : this.value;
else
currentValue = 0;
if (precision)
this.value = parseFloat(this.toFixed(currentValue + step, precision));
else
this.value = currentValue + step;
if (this.maxlength !== undefined && this.value.toString().length > this.maxlength) {
this.value = currentValue;
}
if (this.min !== undefined && this.value < this.min) {
this.value = this.min;
}
if (this.max !== undefined && this.value > this.max) {
this.value = this.max;
}
this.formatValue();
this.onModelChange(this.value);
this.onChange.emit(event);
}
getPrecision() {
return this.precision === undefined ? this.calculatedPrecision : this.precision;
}
toFixed(value, precision) {
let power = Math.pow(10, precision || 0);
return String(Math.round(value * power) / power);
}
onUpButtonMousedown(event) {
if (!this.disabled) {
this.inputfieldViewChild.nativeElement.focus();
this.repeat(event, null, 1);
this.updateFilledState();
event.preventDefault();
}
}
onUpButtonMouseup(event) {
if (!this.disabled) {
this.clearTimer();
}
}
onUpButtonMouseleave(event) {
if (!this.disabled) {
this.clearTimer();
}
}
onDownButtonMousedown(event) {
if (!this.disabled) {
this.inputfieldViewChild.nativeElement.focus();
this.repeat(event, null, -1);
this.updateFilledState();
event.preventDefault();
}
}
onDownButtonMouseup(event) {
if (!this.disabled) {
this.clearTimer();
}
}
onDownButtonMouseleave(event) {
if (!this.disabled) {
this.clearTimer();
}
}
onInputKeydown(event) {
if (event.which == 38) {
this.spin(event, 1);
event.preventDefault();
}
else if (event.which == 40) {
this.spin(event, -1);
event.preventDefault();
}
}
onInputChange(event) {
this.onChange.emit(event);
}
onInput(event) {
this.value = this.parseValue(event.target.value);
this.onModelChange(this.value);
this.updateFilledState();
}
onInputBlur(event) {
this.focus = false;
this.formatValue();
this.onModelTouched();
this.onBlur.emit(event);
}
onInputFocus(event) {
this.focus = true;
this.onFocus.emit(event);
}
parseValue(val) {
let value;
let precision = this.getPrecision();
if (val.trim() === '') {
value = null;
}
else {
if (this.formatInput) {
val = val.replace(this.thousandRegExp, '');
}
if (precision) {
val = this.formatInput ? val.replace(this.decimalSeparator || this.localeDecimalSeparator, '.') : val.replace(',', '.');
value = parseFloat(val);
}
else {
value = parseInt(val, 10);
}
if (!isNaN(value)) {
if (this.max !== null && value > this.max) {
value = this.max;
}
if (this.min !== null && value < this.min) {
value = this.min;
}
}
else {
value = null;
}
}
return value;
}
formatValue() {
let value = this.value;
let precision = this.getPrecision();
if (value != null) {
if (this.formatInput) {
value = value.toLocaleString(undefined, { maximumFractionDigits: 20 });
if (this.decimalSeparator && this.thousandSeparator) {
value = value.split(this.localeDecimalSeparator);
if (precision && value[1]) {
value[1] = (this.decimalSeparator || this.localeDecimalSeparator) + value[1];
}
if (this.thousandSeparator && value[0].length > 3) {
value[0] = value[0].replace(new RegExp(`[${this.localeThousandSeparator}]`, 'gim'), this.thousandSeparator);
}
value = value.join('');
}
}
this.formattedValue = value.toString();
}
else {
this.formattedValue = null;
}
if (this.inputfieldViewChild && this.inputfieldViewChild.nativeElement) {
this.inputfieldViewChild.nativeElement.value = this.formattedValue;
}
}
clearTimer() {
if (this.timer) {
clearInterval(this.timer);
}
}
writeValue(value) {
this.value = value;
this.formatValue();
this.updateFilledState();
this.cd.markForCheck();
}
registerOnChange(fn) {
this.onModelChange = fn;
}
registerOnTouched(fn) {
this.onModelTouched = fn;
}
setDisabledState(val) {
this.disabled = val;
this.cd.markForCheck();
}
updateFilledState() {
this.filled = this.value !== undefined && this.value != null;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: Spinner, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.7", type: Spinner, selector: "p-spinner", inputs: { min: ["min", "min", numberAttribute], max: ["max", "max", numberAttribute], maxlength: ["maxlength", "maxlength", numberAttribute], size: ["size", "size", numberAttribute], placeholder: "placeholder", inputId: "inputId", disabled: ["disabled", "disabled", booleanAttribute], readonly: ["readonly", "readonly", booleanAttribute], tabindex: ["tabindex", "tabindex", numberAttribute], required: ["required", "required", booleanAttribute], name: "name", ariaLabelledBy: "ariaLabelledBy", inputStyle: "inputStyle", inputStyleClass: "inputStyleClass", formatInput: ["formatInput", "formatInput", booleanAttribute], decimalSeparator: "decimalSeparator", thousandSeparator: "thousandSeparator", precision: ["precision", "precision", numberAttribute], step: "step" }, outputs: { onChange: "onChange", onFocus: "onFocus", onBlur: "onBlur" }, host: { properties: { "class.ui-inputwrapper-filled": "filled", "class.ui-inputwrapper-focus": "focus" }, classAttribute: "p-element" }, providers: [SPINNER_VALUE_ACCESSOR], viewQueries: [{ propertyName: "inputfieldViewChild", first: true, predicate: ["inputfield"], descendants: true }], ngImport: i0, template: `
<span class="ui-spinner ui-widget ui-corner-all">
<input
#inputfield
type="text"
[attr.id]="inputId"
[value]="formattedValue || null"
[attr.name]="name"
[attr.aria-valumin]="min"
[attr.aria-valuemax]="max"
[attr.aria-valuenow]="value"
[attr.aria-labelledby]="ariaLabelledBy"
[attr.size]="size"
[attr.maxlength]="maxlength"
[attr.tabindex]="tabindex"
[attr.placeholder]="placeholder"
[disabled]="disabled"
[readonly]="readonly"
[attr.required]="required"
(keydown)="onInputKeydown($event)"
(blur)="onInputBlur($event)"
(input)="onInput($event)"
(change)="onInputChange($event)"
(focus)="onInputFocus($event)"
[ngStyle]="inputStyle"
[class]="inputStyleClass"
[ngClass]="'ui-spinner-input ui-inputtext ui-widget ui-state-default ui-corner-all'"
/>
<button
type="button"
[ngClass]="{ 'ui-spinner-button ui-spinner-up ui-corner-tr ui-button ui-widget ui-state-default': true, 'ui-state-disabled': disabled }"
[disabled]="disabled || readonly"
tabindex="-1"
[attr.readonly]="readonly"
(mouseleave)="onUpButtonMouseleave($event)"
(mousedown)="onUpButtonMousedown($event)"
(mouseup)="onUpButtonMouseup($event)"
>
<span class="ui-spinner-button-icon pi pi-caret-up ui-clickable"></span>
</button>
<button
type="button"
[ngClass]="{ 'ui-spinner-button ui-spinner-down ui-corner-br ui-button ui-widget ui-state-default': true, 'ui-state-disabled': disabled }"
[disabled]="disabled || readonly"
tabindex="-1"
[attr.readonly]="readonly"
(mouseleave)="onDownButtonMouseleave($event)"
(mousedown)="onDownButtonMousedown($event)"
(mouseup)="onDownButtonMouseup($event)"
>
<span class="ui-spinner-button-icon pi pi-caret-down ui-clickable"></span>
</button>
</span>
`, isInline: true, styles: ["@layer primeng{.ui-spinner{display:inline-block;overflow:visible;padding:0;position:relative;vertical-align:middle}.ui-spinner-input{vertical-align:middle;padding-right:1.5em}.ui-spinner-button{cursor:default;display:block;height:50%;margin:0;overflow:hidden;padding:0;position:absolute;right:0;text-align:center;vertical-align:middle;width:1.5em}.ui-spinner .ui-spinner-button-icon{position:absolute;top:50%;left:50%;margin-top:-.5em;margin-left:-.5em;width:1em}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-fluid .ui-spinner{width:100%}.ui-fluid .ui-spinner .ui-spinner-input{padding-right:2em;width:100%}.ui-fluid .ui-spinner .ui-spinner-button{width:1.5em}.ui-fluid .ui-spinner .ui-spinner-button .ui-spinner-button-icon{left:.7em}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: Spinner, decorators: [{
type: Component,
args: [{ selector: 'p-spinner', template: `
<span class="ui-spinner ui-widget ui-corner-all">
<input
#inputfield
type="text"
[attr.id]="inputId"
[value]="formattedValue || null"
[attr.name]="name"
[attr.aria-valumin]="min"
[attr.aria-valuemax]="max"
[attr.aria-valuenow]="value"
[attr.aria-labelledby]="ariaLabelledBy"
[attr.size]="size"
[attr.maxlength]="maxlength"
[attr.tabindex]="tabindex"
[attr.placeholder]="placeholder"
[disabled]="disabled"
[readonly]="readonly"
[attr.required]="required"
(keydown)="onInputKeydown($event)"
(blur)="onInputBlur($event)"
(input)="onInput($event)"
(change)="onInputChange($event)"
(focus)="onInputFocus($event)"
[ngStyle]="inputStyle"
[class]="inputStyleClass"
[ngClass]="'ui-spinner-input ui-inputtext ui-widget ui-state-default ui-corner-all'"
/>
<button
type="button"
[ngClass]="{ 'ui-spinner-button ui-spinner-up ui-corner-tr ui-button ui-widget ui-state-default': true, 'ui-state-disabled': disabled }"
[disabled]="disabled || readonly"
tabindex="-1"
[attr.readonly]="readonly"
(mouseleave)="onUpButtonMouseleave($event)"
(mousedown)="onUpButtonMousedown($event)"
(mouseup)="onUpButtonMouseup($event)"
>
<span class="ui-spinner-button-icon pi pi-caret-up ui-clickable"></span>
</button>
<button
type="button"
[ngClass]="{ 'ui-spinner-button ui-spinner-down ui-corner-br ui-button ui-widget ui-state-default': true, 'ui-state-disabled': disabled }"
[disabled]="disabled || readonly"
tabindex="-1"
[attr.readonly]="readonly"
(mouseleave)="onDownButtonMouseleave($event)"
(mousedown)="onDownButtonMousedown($event)"
(mouseup)="onDownButtonMouseup($event)"
>
<span class="ui-spinner-button-icon pi pi-caret-down ui-clickable"></span>
</button>
</span>
`, host: {
class: 'p-element',
'[class.ui-inputwrapper-filled]': 'filled',
'[class.ui-inputwrapper-focus]': 'focus'
}, providers: [SPINNER_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: ["@layer primeng{.ui-spinner{display:inline-block;overflow:visible;padding:0;position:relative;vertical-align:middle}.ui-spinner-input{vertical-align:middle;padding-right:1.5em}.ui-spinner-button{cursor:default;display:block;height:50%;margin:0;overflow:hidden;padding:0;position:absolute;right:0;text-align:center;vertical-align:middle;width:1.5em}.ui-spinner .ui-spinner-button-icon{position:absolute;top:50%;left:50%;margin-top:-.5em;margin-left:-.5em;width:1em}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-fluid .ui-spinner{width:100%}.ui-fluid .ui-spinner .ui-spinner-input{padding-right:2em;width:100%}.ui-fluid .ui-spinner .ui-spinner-button{width:1.5em}.ui-fluid .ui-spinner .ui-spinner-button .ui-spinner-button-icon{left:.7em}}\n"] }]
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }], propDecorators: { onChange: [{
type: Output
}], onFocus: [{
type: Output
}], onBlur: [{
type: Output
}], min: [{
type: Input,
args: [{ transform: numberAttribute }]
}], max: [{
type: Input,
args: [{ transform: numberAttribute }]
}], maxlength: [{
type: Input,
args: [{ transform: numberAttribute }]
}], size: [{
type: Input,
args: [{ transform: numberAttribute }]
}], placeholder: [{
type: Input
}], inputId: [{
type: Input
}], disabled: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], readonly: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], tabindex: [{
type: Input,
args: [{ transform: numberAttribute }]
}], required: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], name: [{
type: Input
}], ariaLabelledBy: [{
type: Input
}], inputStyle: [{
type: Input
}], inputStyleClass: [{
type: Input
}], formatInput: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], decimalSeparator: [{
type: Input
}], thousandSeparator: [{
type: Input
}], precision: [{
type: Input,
args: [{ transform: numberAttribute }]
}], inputfieldViewChild: [{
type: ViewChild,
args: ['inputfield']
}], step: [{
type: Input
}] } });
export class SpinnerModule {
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: SpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.7", ngImport: i0, type: SpinnerModule, declarations: [Spinner], imports: [CommonModule, InputTextModule], exports: [Spinner] });
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: SpinnerModule, imports: [CommonModule, InputTextModule] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: SpinnerModule, decorators: [{
type: NgModule,
args: [{
imports: [CommonModule, InputTextModule],
exports: [Spinner],
declarations: [Spinner]
}]
}] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Bpbm5lci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHAvY29tcG9uZW50cy9zcGlubmVyL3NwaW5uZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxTQUFTLEVBQXNCLEtBQUssRUFBRSxNQUFNLEVBQUUsWUFBWSxFQUFFLFVBQVUsRUFBRSxTQUFTLEVBQXFCLHVCQUF1QixFQUFFLGlCQUFpQixFQUFFLGdCQUFnQixFQUFFLGVBQWUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUM5TixPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQ3BELE9BQU8sRUFBRSxpQkFBaUIsRUFBd0IsTUFBTSxnQkFBZ0IsQ0FBQzs7O0FBRXpFLE1BQU0sQ0FBQyxNQUFNLHNCQUFzQixHQUFRO0lBQ3ZDLE9BQU8sRUFBRSxpQkFBaUI7SUFDMUIsV0FBVyxFQUFFLFVBQVUsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxPQUFPLENBQUM7SUFDdEMsS0FBSyxFQUFFLElBQUk7Q0FDZCxDQUFDO0FBb0VGLE1BQU0sT0FBTyxPQUFPO0lBcUZHO0lBQXVCO0lBcEZoQyxRQUFRLEdBQXNCLElBQUksWUFBWSxFQUFFLENBQUM7SUFFakQsT0FBTyxHQUFzQixJQUFJLFlBQVksRUFBRSx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gIFthdHRyLm5hbWVdPVwibmFtZVwiXG4gICAgICAgICAgICAgICAgW2F0dHIuYXJpYS12YWx1bWluXT1cIm1pblwiXG4gICAgICAgICAgICAgICAgW2F0dHIuYXJpYS12YWx1ZW1heF09XCJtYXhcIlxuICAgICAgICAgICAgICAgIFthdHRyLmFyaWEtdmFsdWVub3ddPVwidmFsdWVcIlxuICAgICAgICAgICAgICAgIFthdHRyLmFyaWEtbGFiZWxsZWRieV09XCJhcmlhTGFiZWxsZWRCeVwiXG4gICAgICAgICAgICAgICAgW2F0dHIuc2l6ZV09XCJzaXplXCJcbiAgICAgICAgICAgICAgICBbYXR0ci5tYXhsZW5ndGhdPVwibWF4bGVuZ3RoXCJcbiAgICAgICAgICAgICAgICBbYXR0ci50YWJpbmRleF09XCJ0YWJpbmRleFwiXG4gICAgICAgICAgICAgICAgW2F0dHIucGxhY2Vob2xkZXJdPVwicGxhY2Vob2xkZXJcIlxuICAgICAgICAgICAgICAgIFtkaXNhYmxlZF09XCJkaXNhYmxlZFwiXG4gICAgICAgICAgICAgICAgW3JlYWRvbmx5XT1cInJlYWRvbmx5XCJcbiAgICAgICAgICAgICAgICBbYXR0ci5yZXF1aXJlZF09XCJyZXF1aXJlZFwiXG4gICAgICAgICAgICAgICAgKGtleWRvd24pPVwib25JbnB1dEtleWRvd24oJGV2ZW50KVwiXG4gICAgICAgICAgICAgICAgKGJsdXIpPVwib25JbnB1dEJsdXIoJGV2ZW50KVwiXG4gICAgICAgICAgICAgICAgKGlucHV0KT1cIm9uSW5wdXQoJGV2ZW50KVwiXG4gICAgICAgICAgICAgICAgKGNoYW5nZSk9XCJvbklucHV0Q2hhbmdlKCRldmVudClcIlxuICAgICAgICAgICAgICAgIChmb2N1cyk9XCJvbklucHV0Rm9jdXMoJGV2ZW50KVwiXG4gICAgICAgICAgICAgICAgW25nU3R5bGVdPVwiaW5wdXRTdHlsZVwiXG4gICAgICAgICAgICAgICAgW2NsYXNzXT1cImlucHV0U3R5bGVDbGFzc1wiXG4gICAgICAgICAgICAgICAgW25nQ2xhc3NdPVwiJ3VpLXNwaW5uZXItaW5wdXQgdWktaW5wdXR0ZXh0IHVpLXdpZGdldCB1aS1zdGF0ZS1kZWZhdWx0IHVpLWNvcm5lci1hbGwnXCJcbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgICA8YnV0dG9uXG4gICAgICAgICAgICAgICAgdHlwZT1cImJ1dHRvblwiXG4gICAgICAgICAgICAgICAgW25nQ2xhc3NdPVwieyAndWktc3Bpbm5lci1idXR0b24gdWktc3Bpbm5lci11cCB1aS1jb3JuZXItdHIgdWktYnV0dG9uIHVpLXdpZGdldCB1aS1zdGF0ZS1kZWZhdWx0JzogdHJ1ZSwgJ3VpLXN0YXRlLWRpc2FibGVkJzogZGlzYWJsZWQgfVwiXG4gICAgICAgICAgICAgICAgW2Rpc2FibGVkXT1cImRpc2FibGVkIHx8IHJlYWRvbmx5XCJcbiAgICAgICAgICAgICAgICB0YWJpbmRleD1cIi0xXCJcbiAgICAgICAgICAgICAgICBbYXR0ci5yZWFkb25seV09XCJyZWFkb25seVwiXG4gICAgICAgICAgICAgICAgKG1vdXNlbGVhdmUpPVwib25VcEJ1dHRvbk1vdXNlbGVhdmUoJGV2ZW50KVwiXG4gICAgICAgICAgICAgICAgKG1vdXNlZG93bik9XCJvblVwQnV0dG9uTW91c2Vkb3duKCRldmVudClcIlxuICAgICAgICAgICAgICAgIChtb3VzZXVwKT1cIm9uVXBCdXR0b25Nb3VzZXVwKCRldmVudClcIlxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPVwidWktc3Bpbm5lci1idXR0b24taWNvbiBwaSBwaS1jYXJldC11cCB1aS1jbGlja2FibGVcIj48L3NwYW4+XG4gICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgICAgIDxidXR0b25cbiAgICAgICAgICAgICAgICB0eXBlPVwiYnV0dG9uXCJcbiAgICAgICAgICAgICAgICBbbmdDbGFzc109XCJ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3Q2hpbGQubmF0aXZlRWxlbWVudC5mb2N1cygpO1xuICAgICAgICAgICAgdGhpcy5yZXBlYXQoZXZlbnQsIG51bGwsIC0xKTtcbiAgICAgICAgICAgIHRoaXMudXBkYXRlRmlsbGVkU3RhdGUoKTtcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBvbkRvd25CdXR0b25Nb3VzZXVwKGV2ZW50OiBFdmVudCkge1xuICAgICAgICBpZiAoIXRoaXMuZGlzYWJsZWQpIHtcbiAgICAgICAgICAgIHRoaXMuY2xlYXJUaW1lcigpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgb25Eb3duQnV0dG9uTW91c2VsZWF2ZShldmVudDogRXZlbnQpIHtcbiAgICAgICAgaWYgKCF0aGlzLmRpc2FibGVkKSB7XG4gICAgICAgICAgICB0aGlzLmNsZWFyVGltZXIoKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG9uSW5wdXRLZXlkb3duKGV2ZW50OiBLZXlib2FyZEV2ZW50KSB7XG4gICAgICAgIGlmIChldmVudC53aGljaCA9PSAzOCkge1xuICAgICAgICAgICAgdGhpcy5zcGluKGV2ZW50LCAxKTtcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgIH0gZWxzZSBpZiAoZXZlbnQud2hpY2ggPT0gNDApIHtcbiAgICAgICAgICAgIHRoaXMuc3BpbihldmVudCwgLTEpO1xuICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG9uSW5wdXRDaGFuZ2UoZXZlbnQ6IEV2ZW50KSB7XG4gICAgICAgIHRoaXMub25DaGFuZ2UuZW1pdChldmVudCk7XG4gICAgfVxuXG4gICAgb25JbnB1dChldmVudDogS2V5Ym9hcmRFdmVudCkge1xuICAgICAgICB0aGlzLnZhbHVlID0gdGhpcy5wYXJzZVZ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JykgOiB2YWwucmVwbGFjZSgnLCcsICcuJyk7XG4gICAgICAgICAgICAgICAgdmFsdWUgPSBwYXJzZUZsb2F0KHZhbCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhbHVlID0gcGFyc2VJbnQodmFsLCAxMCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICghaXNOYU4odmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMubWF4ICE9PSBudWxsICYmIHZhbHVlID4gdGhpcy5tYXgpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSB0aGlzLm1heDtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5taW4gIT09IG51bGwgJiYgdmFsdWUgPCB0aGlzLm1pbikge1xuICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IHRoaXMubWluO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdmFsdWUgPSBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHZhbHVlO1xuICAgIH1cblxuICAgIGZvcm1hdFZhbHVlKCkge1xuICAgICAgICBsZXQgdmFsdWUgPSB0aGlzLnZhbHVlO1xuICAgICAgICBsZXQgcHJlY2lzaW9uID0gdGhpcy5nZXRQcmVjaXNpb24oKTtcblxuICAgICAgICBpZiAodmFsdWUgIT0gbnVsbCkge1xuICAgICAgICAgICAgaWYgKHRoaXMuZm9ybWF0SW5wdXQpIHtcbiAgICAgICAgICAgICAgICB2YWx1ZSA9IHZhbHVlLnRvTG9jYWxlU3RyaW5nKHVuZGVmaW5lZCwgeyBtYXhpbXVtRnJhY3Rpb25EaWdpdHM6IDIwIH0pO1xuXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuZGVjaW1hbFNlcGFyYXRvciAmJiB0aGlzLnRob3VzYW5kU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