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

793 lines
89 KiB
JavaScript

import { CommonModule, DOCUMENT, isPlatformBrowser } from '@angular/common';
import { ChangeDetectionStrategy, Component, EventEmitter, Inject, Input, NgModule, Output, PLATFORM_ID, ViewChild, ViewEncapsulation, booleanAttribute, forwardRef, numberAttribute } from '@angular/core';
import { NG_VALUE_ACCESSOR } from '@angular/forms';
import { DomHandler } from 'primeng/dom';
import { AutoFocusModule } from 'primeng/autofocus';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "primeng/autofocus";
export const SLIDER_VALUE_ACCESSOR = {
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => Slider),
multi: true
};
/**
* Slider is a component to provide input with a drag handle.
* @group Components
*/
export class Slider {
document;
platformId;
el;
renderer;
ngZone;
cd;
/**
* When enabled, displays an animation on click of the slider bar.
* @group Props
*/
animate;
/**
* When present, it specifies that the element should be disabled.
* @group Props
*/
disabled;
/**
* Mininum boundary value.
* @group Props
*/
min = 0;
/**
* Maximum boundary value.
* @group Props
*/
max = 100;
/**
* Orientation of the slider.
* @group Props
*/
orientation = 'horizontal';
/**
* Step factor to increment/decrement the value.
* @group Props
*/
step;
/**
* When specified, allows two boundary values to be picked.
* @group Props
*/
range;
/**
* Inline style of the component.
* @group Props
*/
style;
/**
* Style class of the component.
* @group Props
*/
styleClass;
/**
* Defines a string that labels the input for accessibility.
* @group Props
*/
ariaLabel;
/**
* Establishes relationships between the component and label(s) where its value should be one or more element IDs.
* @group Props
*/
ariaLabelledBy;
/**
* Index of the element in tabbing order.
* @group Props
*/
tabindex = 0;
/**
* When present, it specifies that the component should automatically get focus on load.
* @group Props
*/
autofocus;
/**
* Callback to invoke on value change.
* @param {SliderChangeEvent} event - Custom value change event.
* @group Emits
*/
onChange = new EventEmitter();
/**
* Callback to invoke when slide ended.
* @param {SliderSlideEndEvent} event - Custom slide end event.
* @group Emits
*/
onSlideEnd = new EventEmitter();
sliderHandle;
sliderHandleStart;
sliderHandleEnd;
value;
values;
handleValue;
handleValues = [];
diff;
offset;
bottom;
onModelChange = () => { };
onModelTouched = () => { };
dragging;
dragListener;
mouseupListener;
initX;
initY;
barWidth;
barHeight;
sliderHandleClick;
handleIndex = 0;
startHandleValue;
startx;
starty;
constructor(document, platformId, el, renderer, ngZone, cd) {
this.document = document;
this.platformId = platformId;
this.el = el;
this.renderer = renderer;
this.ngZone = ngZone;
this.cd = cd;
}
onMouseDown(event, index) {
if (this.disabled) {
return;
}
this.dragging = true;
this.updateDomData();
this.sliderHandleClick = true;
if (this.range && this.handleValues && this.handleValues[0] === this.max) {
this.handleIndex = 0;
}
else {
this.handleIndex = index;
}
this.bindDragListeners();
event.target.focus();
event.preventDefault();
if (this.animate) {
DomHandler.removeClass(this.el.nativeElement.children[0], 'p-slider-animate');
}
}
onDragStart(event, index) {
if (this.disabled) {
return;
}
var touchobj = event.changedTouches[0];
this.startHandleValue = this.range ? this.handleValues[index] : this.handleValue;
this.dragging = true;
if (this.range && this.handleValues && this.handleValues[0] === this.max) {
this.handleIndex = 0;
}
else {
this.handleIndex = index;
}
if (this.orientation === 'horizontal') {
this.startx = parseInt(touchobj.clientX, 10);
this.barWidth = this.el.nativeElement.children[0].offsetWidth;
}
else {
this.starty = parseInt(touchobj.clientY, 10);
this.barHeight = this.el.nativeElement.children[0].offsetHeight;
}
if (this.animate) {
DomHandler.removeClass(this.el.nativeElement.children[0], 'p-slider-animate');
}
event.preventDefault();
}
onDrag(event) {
if (this.disabled) {
return;
}
var touchobj = event.changedTouches[0], handleValue = 0;
if (this.orientation === 'horizontal') {
handleValue = Math.floor(((parseInt(touchobj.clientX, 10) - this.startx) * 100) / this.barWidth) + this.startHandleValue;
}
else {
handleValue = Math.floor(((this.starty - parseInt(touchobj.clientY, 10)) * 100) / this.barHeight) + this.startHandleValue;
}
this.setValueFromHandle(event, handleValue);
event.preventDefault();
}
onDragEnd(event) {
if (this.disabled) {
return;
}
this.dragging = false;
if (this.range)
this.onSlideEnd.emit({ originalEvent: event, values: this.values });
else
this.onSlideEnd.emit({ originalEvent: event, value: this.value });
if (this.animate) {
DomHandler.addClass(this.el.nativeElement.children[0], 'p-slider-animate');
}
event.preventDefault();
}
onBarClick(event) {
if (this.disabled) {
return;
}
if (!this.sliderHandleClick) {
this.updateDomData();
this.handleChange(event);
if (this.range)
this.onSlideEnd.emit({ originalEvent: event, values: this.values });
else
this.onSlideEnd.emit({ originalEvent: event, value: this.value });
}
this.sliderHandleClick = false;
}
onKeyDown(event, index) {
this.handleIndex = index;
switch (event.code) {
case 'ArrowDown':
case 'ArrowLeft':
this.decrementValue(event, index);
event.preventDefault();
break;
case 'ArrowUp':
case 'ArrowRight':
this.incrementValue(event, index);
event.preventDefault();
break;
case 'PageDown':
this.decrementValue(event, index, true);
event.preventDefault();
break;
case 'PageUp':
this.incrementValue(event, index, true);
event.preventDefault();
break;
case 'Home':
this.updateValue(this.min, event);
event.preventDefault();
break;
case 'End':
this.updateValue(this.max, event);
event.preventDefault();
break;
default:
break;
}
}
decrementValue(event, index, pageKey = false) {
let newValue;
if (this.range) {
if (this.step)
newValue = this.values[index] - this.step;
else
newValue = this.values[index] - 1;
}
else {
if (this.step)
newValue = this.value - this.step;
else if (!this.step && pageKey)
newValue = this.value - 10;
else
newValue = this.value - 1;
}
this.updateValue(newValue, event);
event.preventDefault();
}
incrementValue(event, index, pageKey = false) {
let newValue;
if (this.range) {
if (this.step)
newValue = this.values[index] + this.step;
else
newValue = this.values[index] + 1;
}
else {
if (this.step)
newValue = this.value + this.step;
else if (!this.step && pageKey)
newValue = this.value + 10;
else
newValue = this.value + 1;
}
this.updateValue(newValue, event);
event.preventDefault();
}
handleChange(event) {
let handleValue = this.calculateHandleValue(event);
this.setValueFromHandle(event, handleValue);
}
bindDragListeners() {
if (isPlatformBrowser(this.platformId)) {
this.ngZone.runOutsideAngular(() => {
const documentTarget = this.el ? this.el.nativeElement.ownerDocument : this.document;
if (!this.dragListener) {
this.dragListener = this.renderer.listen(documentTarget, 'mousemove', (event) => {
if (this.dragging) {
this.ngZone.run(() => {
this.handleChange(event);
});
}
});
}
if (!this.mouseupListener) {
this.mouseupListener = this.renderer.listen(documentTarget, 'mouseup', (event) => {
if (this.dragging) {
this.dragging = false;
this.ngZone.run(() => {
if (this.range)
this.onSlideEnd.emit({ originalEvent: event, values: this.values });
else
this.onSlideEnd.emit({ originalEvent: event, value: this.value });
if (this.animate) {
DomHandler.addClass(this.el.nativeElement.children[0], 'p-slider-animate');
}
});
}
});
}
});
}
}
unbindDragListeners() {
if (this.dragListener) {
this.dragListener();
this.dragListener = null;
}
if (this.mouseupListener) {
this.mouseupListener();
this.mouseupListener = null;
}
}
setValueFromHandle(event, handleValue) {
let newValue = this.getValueFromHandle(handleValue);
if (this.range) {
if (this.step) {
this.handleStepChange(newValue, this.values[this.handleIndex]);
}
else {
this.handleValues[this.handleIndex] = handleValue;
this.updateValue(newValue, event);
}
}
else {
if (this.step) {
this.handleStepChange(newValue, this.value);
}
else {
this.handleValue = handleValue;
this.updateValue(newValue, event);
}
}
this.cd.markForCheck();
}
handleStepChange(newValue, oldValue) {
let diff = newValue - oldValue;
let val = oldValue;
let _step = this.step;
if (diff < 0) {
val = oldValue + Math.ceil(newValue / _step - oldValue / _step) * _step;
}
else if (diff > 0) {
val = oldValue + Math.floor(newValue / _step - oldValue / _step) * _step;
}
this.updateValue(val);
this.updateHandleValue();
}
writeValue(value) {
if (this.range)
this.values = value || [0, 0];
else
this.value = value || 0;
this.updateHandleValue();
this.updateDiffAndOffset();
this.cd.markForCheck();
}
registerOnChange(fn) {
this.onModelChange = fn;
}
registerOnTouched(fn) {
this.onModelTouched = fn;
}
setDisabledState(val) {
this.disabled = val;
this.cd.markForCheck();
}
get rangeStartLeft() {
if (!this.isVertical())
return this.handleValues[0] > 100 ? 100 + '%' : this.handleValues[0] + '%';
return null;
}
get rangeStartBottom() {
return this.isVertical() ? this.handleValues[0] + '%' : 'auto';
}
get rangeEndLeft() {
return this.isVertical() ? null : this.handleValues[1] + '%';
}
get rangeEndBottom() {
return this.isVertical() ? this.handleValues[1] + '%' : 'auto';
}
isVertical() {
return this.orientation === 'vertical';
}
updateDomData() {
let rect = this.el.nativeElement.children[0].getBoundingClientRect();
this.initX = rect.left + DomHandler.getWindowScrollLeft();
this.initY = rect.top + DomHandler.getWindowScrollTop();
this.barWidth = this.el.nativeElement.children[0].offsetWidth;
this.barHeight = this.el.nativeElement.children[0].offsetHeight;
}
calculateHandleValue(event) {
if (this.orientation === 'horizontal')
return ((event.pageX - this.initX) * 100) / this.barWidth;
else
return ((this.initY + this.barHeight - event.pageY) * 100) / this.barHeight;
}
updateHandleValue() {
if (this.range) {
this.handleValues[0] = ((this.values[0] < this.min ? 0 : this.values[0] - this.min) * 100) / (this.max - this.min);
this.handleValues[1] = ((this.values[1] > this.max ? 100 : this.values[1] - this.min) * 100) / (this.max - this.min);
}
else {
if (this.value < this.min)
this.handleValue = 0;
else if (this.value > this.max)
this.handleValue = 100;
else
this.handleValue = ((this.value - this.min) * 100) / (this.max - this.min);
}
if (this.step) {
this.updateDiffAndOffset();
}
}
updateDiffAndOffset() {
this.diff = this.getDiff();
this.offset = this.getOffset();
}
getDiff() {
return Math.abs(this.handleValues[0] - this.handleValues[1]);
}
getOffset() {
return Math.min(this.handleValues[0], this.handleValues[1]);
}
updateValue(val, event) {
if (this.range) {
let value = val;
if (this.handleIndex == 0) {
if (value < this.min) {
value = this.min;
this.handleValues[0] = 0;
}
else if (value > this.values[1]) {
if (value > this.max) {
value = this.max;
this.handleValues[0] = 100;
}
}
this.sliderHandleStart?.nativeElement.focus();
}
else {
if (value > this.max) {
value = this.max;
this.handleValues[1] = 100;
this.offset = this.handleValues[1];
}
else if (value < this.min) {
value = this.min;
this.handleValues[1] = 0;
}
else if (value < this.values[0]) {
this.offset = this.handleValues[1];
}
this.sliderHandleEnd?.nativeElement.focus();
}
if (this.step) {
this.updateHandleValue();
}
else {
this.updateDiffAndOffset();
}
this.values[this.handleIndex] = this.getNormalizedValue(value);
let newValues = [this.minVal, this.maxVal];
this.onModelChange(newValues);
this.onChange.emit({ event: event, values: this.values });
}
else {
if (val < this.min) {
val = this.min;
this.handleValue = 0;
}
else if (val > this.max) {
val = this.max;
this.handleValue = 100;
}
this.value = this.getNormalizedValue(val);
this.onModelChange(this.value);
this.onChange.emit({ event: event, value: this.value });
this.sliderHandle?.nativeElement.focus();
}
this.updateHandleValue();
}
getValueFromHandle(handleValue) {
return (this.max - this.min) * (handleValue / 100) + this.min;
}
getDecimalsCount(value) {
if (value && Math.floor(value) !== value)
return value.toString().split('.')[1].length || 0;
return 0;
}
getNormalizedValue(val) {
let decimalsCount = this.getDecimalsCount(this.step);
if (decimalsCount > 0) {
return +parseFloat(val.toString()).toFixed(decimalsCount);
}
else {
return Math.floor(val);
}
}
ngOnDestroy() {
this.unbindDragListeners();
}
get minVal() {
return Math.min(this.values[1], this.values[0]);
}
get maxVal() {
return Math.max(this.values[1], this.values[0]);
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: Slider, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.7", type: Slider, selector: "p-slider", inputs: { animate: ["animate", "animate", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute], min: ["min", "min", numberAttribute], max: ["max", "max", numberAttribute], orientation: "orientation", step: ["step", "step", numberAttribute], range: ["range", "range", booleanAttribute], style: "style", styleClass: "styleClass", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", tabindex: ["tabindex", "tabindex", numberAttribute], autofocus: ["autofocus", "autofocus", booleanAttribute] }, outputs: { onChange: "onChange", onSlideEnd: "onSlideEnd" }, host: { classAttribute: "p-element" }, providers: [SLIDER_VALUE_ACCESSOR], viewQueries: [{ propertyName: "sliderHandle", first: true, predicate: ["sliderHandle"], descendants: true }, { propertyName: "sliderHandleStart", first: true, predicate: ["sliderHandleStart"], descendants: true }, { propertyName: "sliderHandleEnd", first: true, predicate: ["sliderHandleEnd"], descendants: true }], ngImport: i0, template: `
<div
[ngStyle]="style"
[class]="styleClass"
[ngClass]="{ 'p-slider p-component': true, 'p-disabled': disabled, 'p-slider-horizontal': orientation == 'horizontal', 'p-slider-vertical': orientation == 'vertical', 'p-slider-animate': animate }"
(click)="onBarClick($event)"
[attr.data-pc-name]="'slider'"
[attr.data-pc-section]="'root'"
>
<span
*ngIf="range && orientation == 'horizontal'"
class="p-slider-range"
[ngStyle]="{ left: offset !== null && offset !== undefined ? offset + '%' : handleValues[0] + '%', width: diff ? diff + '%' : handleValues[1] - handleValues[0] + '%' }"
[attr.data-pc-section]="'range'"
></span>
<span
*ngIf="range && orientation == 'vertical'"
class="p-slider-range"
[ngStyle]="{ bottom: offset !== null && offset !== undefined ? offset + '%' : handleValues[0] + '%', height: diff ? diff + '%' : handleValues[1] - handleValues[0] + '%' }"
[attr.data-pc-section]="'range'"
></span>
<span *ngIf="!range && orientation == 'vertical'" class="p-slider-range" [attr.data-pc-section]="'range'" [ngStyle]="{ height: handleValue + '%' }"></span>
<span *ngIf="!range && orientation == 'horizontal'" class="p-slider-range" [attr.data-pc-section]="'range'" [ngStyle]="{ width: handleValue + '%' }"></span>
<span
*ngIf="!range"
#sliderHandle
class="p-slider-handle"
[style.transition]="dragging ? 'none' : null"
[ngStyle]="{ left: orientation == 'horizontal' ? handleValue + '%' : null, bottom: orientation == 'vertical' ? handleValue + '%' : null }"
(touchstart)="onDragStart($event)"
(touchmove)="onDrag($event)"
(touchend)="onDragEnd($event)"
(mousedown)="onMouseDown($event)"
(keydown)="onKeyDown($event)"
[attr.tabindex]="disabled ? null : tabindex"
role="slider"
[attr.aria-valuemin]="min"
[attr.aria-valuenow]="value"
[attr.aria-valuemax]="max"
[attr.aria-labelledby]="ariaLabelledBy"
[attr.aria-label]="ariaLabel"
[attr.aria-orientation]="orientation"
[attr.data-pc-section]="'handle'"
pAutoFocus
[autofocus]="autofocus"
></span>
<span
*ngIf="range"
#sliderHandleStart
[style.transition]="dragging ? 'none' : null"
class="p-slider-handle"
[ngStyle]="{ left: rangeStartLeft, bottom: rangeStartBottom }"
[ngClass]="{ 'p-slider-handle-active': handleIndex == 0 }"
(keydown)="onKeyDown($event, 0)"
(mousedown)="onMouseDown($event, 0)"
(touchstart)="onDragStart($event, 0)"
(touchmove)="onDrag($event, 0)"
(touchend)="onDragEnd($event)"
[attr.tabindex]="disabled ? null : tabindex"
role="slider"
[attr.aria-valuemin]="min"
[attr.aria-valuenow]="value ? value[0] : null"
[attr.aria-valuemax]="max"
[attr.aria-labelledby]="ariaLabelledBy"
[attr.aria-label]="ariaLabel"
[attr.aria-orientation]="orientation"
[attr.data-pc-section]="'startHandler'"
pAutoFocus
[autofocus]="autofocus"
></span>
<span
*ngIf="range"
#sliderHandleEnd
[style.transition]="dragging ? 'none' : null"
class="p-slider-handle"
[ngStyle]="{ left: rangeEndLeft, bottom: rangeEndBottom }"
[ngClass]="{ 'p-slider-handle-active': handleIndex == 1 }"
(keydown)="onKeyDown($event, 1)"
(mousedown)="onMouseDown($event, 1)"
(touchstart)="onDragStart($event, 1)"
(touchmove)="onDrag($event, 1)"
(touchend)="onDragEnd($event)"
[attr.tabindex]="disabled ? null : tabindex"
[attr.aria-valuemin]="min"
[attr.aria-valuenow]="value ? value[1] : null"
[attr.aria-valuemax]="max"
[attr.aria-labelledby]="ariaLabelledBy"
[attr.aria-label]="ariaLabel"
[attr.aria-orientation]="orientation"
[attr.data-pc-section]="'endHandler'"
></span>
</div>
`, isInline: true, styles: ["@layer primeng{.p-slider{position:relative}.p-slider .p-slider-handle{position:absolute;cursor:grab;touch-action:none;display:block}.p-slider-range{position:absolute;display:block}.p-slider-horizontal .p-slider-range{top:0;left:0;height:100%}.p-slider-horizontal .p-slider-handle{top:50%}.p-slider-vertical{height:100px}.p-slider-vertical .p-slider-handle{left:50%}.p-slider-vertical .p-slider-range{bottom:0;left:0;width:100%}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: Slider, decorators: [{
type: Component,
args: [{ selector: 'p-slider', template: `
<div
[ngStyle]="style"
[class]="styleClass"
[ngClass]="{ 'p-slider p-component': true, 'p-disabled': disabled, 'p-slider-horizontal': orientation == 'horizontal', 'p-slider-vertical': orientation == 'vertical', 'p-slider-animate': animate }"
(click)="onBarClick($event)"
[attr.data-pc-name]="'slider'"
[attr.data-pc-section]="'root'"
>
<span
*ngIf="range && orientation == 'horizontal'"
class="p-slider-range"
[ngStyle]="{ left: offset !== null && offset !== undefined ? offset + '%' : handleValues[0] + '%', width: diff ? diff + '%' : handleValues[1] - handleValues[0] + '%' }"
[attr.data-pc-section]="'range'"
></span>
<span
*ngIf="range && orientation == 'vertical'"
class="p-slider-range"
[ngStyle]="{ bottom: offset !== null && offset !== undefined ? offset + '%' : handleValues[0] + '%', height: diff ? diff + '%' : handleValues[1] - handleValues[0] + '%' }"
[attr.data-pc-section]="'range'"
></span>
<span *ngIf="!range && orientation == 'vertical'" class="p-slider-range" [attr.data-pc-section]="'range'" [ngStyle]="{ height: handleValue + '%' }"></span>
<span *ngIf="!range && orientation == 'horizontal'" class="p-slider-range" [attr.data-pc-section]="'range'" [ngStyle]="{ width: handleValue + '%' }"></span>
<span
*ngIf="!range"
#sliderHandle
class="p-slider-handle"
[style.transition]="dragging ? 'none' : null"
[ngStyle]="{ left: orientation == 'horizontal' ? handleValue + '%' : null, bottom: orientation == 'vertical' ? handleValue + '%' : null }"
(touchstart)="onDragStart($event)"
(touchmove)="onDrag($event)"
(touchend)="onDragEnd($event)"
(mousedown)="onMouseDown($event)"
(keydown)="onKeyDown($event)"
[attr.tabindex]="disabled ? null : tabindex"
role="slider"
[attr.aria-valuemin]="min"
[attr.aria-valuenow]="value"
[attr.aria-valuemax]="max"
[attr.aria-labelledby]="ariaLabelledBy"
[attr.aria-label]="ariaLabel"
[attr.aria-orientation]="orientation"
[attr.data-pc-section]="'handle'"
pAutoFocus
[autofocus]="autofocus"
></span>
<span
*ngIf="range"
#sliderHandleStart
[style.transition]="dragging ? 'none' : null"
class="p-slider-handle"
[ngStyle]="{ left: rangeStartLeft, bottom: rangeStartBottom }"
[ngClass]="{ 'p-slider-handle-active': handleIndex == 0 }"
(keydown)="onKeyDown($event, 0)"
(mousedown)="onMouseDown($event, 0)"
(touchstart)="onDragStart($event, 0)"
(touchmove)="onDrag($event, 0)"
(touchend)="onDragEnd($event)"
[attr.tabindex]="disabled ? null : tabindex"
role="slider"
[attr.aria-valuemin]="min"
[attr.aria-valuenow]="value ? value[0] : null"
[attr.aria-valuemax]="max"
[attr.aria-labelledby]="ariaLabelledBy"
[attr.aria-label]="ariaLabel"
[attr.aria-orientation]="orientation"
[attr.data-pc-section]="'startHandler'"
pAutoFocus
[autofocus]="autofocus"
></span>
<span
*ngIf="range"
#sliderHandleEnd
[style.transition]="dragging ? 'none' : null"
class="p-slider-handle"
[ngStyle]="{ left: rangeEndLeft, bottom: rangeEndBottom }"
[ngClass]="{ 'p-slider-handle-active': handleIndex == 1 }"
(keydown)="onKeyDown($event, 1)"
(mousedown)="onMouseDown($event, 1)"
(touchstart)="onDragStart($event, 1)"
(touchmove)="onDrag($event, 1)"
(touchend)="onDragEnd($event)"
[attr.tabindex]="disabled ? null : tabindex"
[attr.aria-valuemin]="min"
[attr.aria-valuenow]="value ? value[1] : null"
[attr.aria-valuemax]="max"
[attr.aria-labelledby]="ariaLabelledBy"
[attr.aria-label]="ariaLabel"
[attr.aria-orientation]="orientation"
[attr.data-pc-section]="'endHandler'"
></span>
</div>
`, providers: [SLIDER_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
class: 'p-element'
}, styles: ["@layer primeng{.p-slider{position:relative}.p-slider .p-slider-handle{position:absolute;cursor:grab;touch-action:none;display:block}.p-slider-range{position:absolute;display:block}.p-slider-horizontal .p-slider-range{top:0;left:0;height:100%}.p-slider-horizontal .p-slider-handle{top:50%}.p-slider-vertical{height:100px}.p-slider-vertical .p-slider-handle{left:50%}.p-slider-vertical .p-slider-range{bottom:0;left:0;width:100%}}\n"] }]
}], ctorParameters: () => [{ type: Document, decorators: [{
type: Inject,
args: [DOCUMENT]
}] }, { type: undefined, decorators: [{
type: Inject,
args: [PLATFORM_ID]
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { animate: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], disabled: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], min: [{
type: Input,
args: [{ transform: numberAttribute }]
}], max: [{
type: Input,
args: [{ transform: numberAttribute }]
}], orientation: [{
type: Input
}], step: [{
type: Input,
args: [{ transform: numberAttribute }]
}], range: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], style: [{
type: Input
}], styleClass: [{
type: Input
}], ariaLabel: [{
type: Input
}], ariaLabelledBy: [{
type: Input
}], tabindex: [{
type: Input,
args: [{ transform: numberAttribute }]
}], autofocus: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], onChange: [{
type: Output
}], onSlideEnd: [{
type: Output
}], sliderHandle: [{
type: ViewChild,
args: ['sliderHandle']
}], sliderHandleStart: [{
type: ViewChild,
args: ['sliderHandleStart']
}], sliderHandleEnd: [{
type: ViewChild,
args: ['sliderHandleEnd']
}] } });
export class SliderModule {
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: SliderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.7", ngImport: i0, type: SliderModule, declarations: [Slider], imports: [CommonModule, AutoFocusModule], exports: [Slider] });
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: SliderModule, imports: [CommonModule, AutoFocusModule] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: SliderModule, decorators: [{
type: NgModule,
args: [{
imports: [CommonModule, AutoFocusModule],
exports: [Slider],
declarations: [Slider]
}]
}] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2xpZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2FwcC9jb21wb25lbnRzL3NsaWRlci9zbGlkZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxRQUFRLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUM1RSxPQUFPLEVBQ0gsdUJBQXVCLEVBRXZCLFNBQVMsRUFFVCxZQUFZLEVBQ1osTUFBTSxFQUNOLEtBQUssRUFDTCxRQUFRLEVBR1IsTUFBTSxFQUNOLFdBQVcsRUFFWCxTQUFTLEVBQ1QsaUJBQWlCLEVBQ2pCLGdCQUFnQixFQUNoQixVQUFVLEVBQ1YsZUFBZSxFQUNsQixNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQXdCLGlCQUFpQixFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDekUsT0F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htb3ZlKT1cIm9uRHJhZygkZXZlbnQpXCJcbiAgICAgICAgICAgICAgICAodG91Y2hlbmQpPVwib25EcmFnRW5kKCRldmVudClcIlxuICAgICAgICAgICAgICAgIChtb3VzZWRvd24pPVwib25Nb3VzZURvd24oJGV2ZW50KVwiXG4gICAgICAgICAgICAgICAgKGtleWRvd24pPVwib25LZXlEb3duKCRldmVudClcIlxuICAgICAgICAgICAgICAgIFthdHRyLnRhYmluZGV4XT1cImRpc2FibGVkID8gbnVsbCA6IHRhYmluZGV4XCJcbiAgICAgICAgICAgICAgICByb2xlPVwic2xpZGVyXCJcbiAgICAgICAgICAgICAgICBbYXR0ci5hcmlhLXZhbHVlbWluXT1cIm1pblwiXG4gICAgICAgICAgICAgICAgW2F0dHIuYXJpYS12YWx1ZW5vd109XCJ2YWx1ZVwiXG4gICAgICAgICAgICAgICAgW2F0dHIuYXJpYS12YWx1ZW1heF09XCJtYXhcIlxuICAgICAgICAgICAgICAgIFthdHRyLmFyaWEtbGFiZWxsZWRieV09XCJhcmlhTGFiZWxsZWRCeVwiXG4gICAgICAgICAgICAgICAgW2F0dHIuYXJpYS1sYWJlbF09XCJhcmlhTGFiZWxcIlxuICAgICAgICAgICAgICAgIFthdHRyLmFyaWEtb3JpZW50YXRpb25dPVwib3JpZW50YXRpb25cIlxuICAgICAgICAgICAgICAgIFthdHRyLmRhdGEtcGMtc2VjdGlvbl09XCInaGFuZGxlJ1wiXG4gICAgICAgICAgICAgICAgcEF1dG9Gb2N1c1xuICAgICAgICAgICAgICAgIFthdXRvZm9jdXNdPVwiYXV0b2ZvY3VzXCJcbiAgICAgICAgICAgID48L3NwYW4+XG4gICAgICAgICAgICA8c3BhblxuICAgICAgICAgICAgICAgICpuZ0lmPVwicmFuZ2VcIlxuICAgICAgICAgICAgICAgICNzbGlkZXJIYW5kbGVTdGFydFxuICAgICAgICAgICAgICAgIFtzdHlsZS50cmFuc2l0aW9uXT1cImRyYWdnaW5nID8gJ25vbmUnIDogbnVsbFwiXG4gICAgICAgICAgICAgICAgY2xhc3M9XCJwLXNsaWRlci1oYW5kbGVcIlxuICAgICAgICAgICAgICAgIFtuZ1N0eWxlXT1cInsgbGVmdDogcmFuZ2VTdGFydExlZnQsIGJvdHRvbTogcmFuZ2VTdGFydEJvdHRvbSB9XCJcbiAgICAgICAgICAgICAgICBbbmdDbGFzc109XCJ7ICdwLXNsaWRlci1oYW5kbGUtYWN0aXZlJzogaGFuZGxlSW5kZXggPT0gMCB9XCJcbiAgICAgICAgICAgICAgICAoa2V5ZG93bik9XCJvbktleURvd24oJGV2ZW50LCAwKVwiXG4gICAgICAgICAgICAgICAgKG1vdXNlZG93bik9XCJvbk1vdXNlRG93bigkZXZlbnQsIDApXCJcbiAgICAgICAgICAgICAgICAodG91Y2hzdGFydCk9XCJvbkRyYWdTdGFydCgkZXZlbnQsIDApXCJcbiAgICAgICAgICAgICAgICAodG91Y2htb3ZlKT1cIm9uRHJhZygkZXZlbnQsIDApXCJcbiAgICAgICAgICAgICAgICAodG91Y2hlbmQpPVwib25EcmFnRW5kKCRldmVudClcIlxuICAgICAgICAgICAgICAgIFthdHRyLnRhYmluZGV4XT1cImRpc2FibGVkID8gbnVsbCA6IHRhYmluZGV4XCJcbiAgICAgICAgICAgICAgICByb2xlPVwic2xpZGVyXCJcbiAgICAgICAgICAgICAgICBbYXR0ci5hcmlhLXZhbHVlbWluXT1cIm1pblwiXG4gICAgICAgICAgICAgICAgW2F0dHIuYXJpYS12YWx1ZW5vd109XCJ2YWx1ZSA/IHZhbHVlWzBdIDogbnVsbFwiXG4gICAgICAgICAgICAgICAgW2F0dHIuYXJpYS12YWx1ZW1heF09XCJtYXhcIlxuICAgICAgICAgICAgICAgIFthdHRyLmFyaWEtbGFiZWxsZWRieV09XCJhcmlhTGFiZWxsZWRCeVwiXG4gICAgICAgICAgICAgICAgW2F0dHIuYXJpYS1sYWJlbF09XCJhcmlhTGFiZWxcIlxuICAgICAgICAgICAgICAgIFthdHRyLmFyaWEtb3JpZW50YXRpb25dPVwib3JpZW50YXRpb25cIlxuICAgICAgICAgICAgICAgIFthdHRyLmRhdGEtcGMtc2VjdGlvbl09XCInc3RhcnRIYW5kbGVyJ1wiXG4gICAgICAgICAgICAgICAgcEF1dG9Gb2N1c1xuICAgICAgICAgICAgICAgIFthdXRvZm9jdXNdPVwiYXV0b2ZvY3VzXCJcbiAgICAgICAgICAgID48L3NwYW4+XG4gICAgICAgICAgICA8c3BhblxuICAgICAgICAgICAgICAgICpuZ0lmPVwicmFuZ2VcIlxuICAgICAgICAgICAgICAgICNzbGlkZXJIYW5kbGVFbmRcbiAgICAgICAgICAgICAgICBbc3R5bGUudHJhbnNpdGlvbl09XCJkcmFnZ2luZyA/ICdub25lJyA6IG51bGxcIlxuICAgICAgICAgICAgICAgIGNsYXNzPVwicC1zbGlkZXItaGFuZGxlXCJcbiAgICAgICAgICAgICAgICBbbmdTdHlsZV09XCJ7IGxlZnQ6IHJhbmdlRW5kTGVmdCwgYm90dG9tOiByYW5nZUVuZEJvdHRvbSB9XCJcbiAgICAgICAgICAgICAgICBbbmdDbGFzc109XCJ7ICdwLXNsaWRlci1oYW5kbGUtYWN0aXZlJzogaGFuZGxlSW5kZXggPT0gMSB9XCJcbiAgICAgICAgICAgICAgICAoa2V5ZG93bik9XCJvbktleURvd24oJGV2ZW50LCAxKVwiXG4gICAgICAgICAgICAgICAgKG1vdXNlZG93bik9XCJvbk1vdXNlRG93bigkZXZlbnQsIDEpXCJcbiAgICAgICAgICAgICAgICAodG91Y2hzdGFydCk9XCJvbkRyYWdTdGFydCgkZXZlbnQsIDEpXCJcbiAgICAgICAgICAgICAgICAodG91Y2htb3ZlKT1cIm9uRHJhZygkZXZlbnQsIDEpXCJcbiAgICAgICAgICAgICAgICAodG91Y2hlbmQpPVwib25EcmFnRW5kKCRldmVudClcIlxuICAgICAgICAgICAgICAgIFthdHRyLnRhYmluZGV4XT1cImRpc2FibGVkID8gbnVsbCA6IHRhYmluZGV4XCJcbiAgICAgICA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nRWYWx1ZShldmVudCwgaW5kZXgpO1xuICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ0Fycm93VXAnOlxuICAgICAgICAgICAgY2FzZSAnQXJyb3dSaWdodCc6XG4gICAgICAgICAgICAgICAgdGhpcy5pbmNyZW1lbnRWYWx1ZShldmVudCwgaW5kZXgpO1xuICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ1BhZ2VEb3duJzpcbiAgICAgICAgICAgICAgICB0aGlzLmRlY3JlbWVudFZhbHVlKGV2ZW50LCBpbmRleCwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAnUGFnZVVwJzpcbiAgICAgICAgICAgICAgICB0aGlzLmluY3JlbWVudFZhbHVlKGV2ZW50LCBpbmRleCwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAnSG9tZSc6XG4gICAgICAgICAgICAgICAgdGhpcy51cGRhdGVWYWx1ZSh0aGlzLm1pbiwgZXZlbnQpO1xuICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ0VuZCc6XG4gICAgICAgICAgICAgICAgdGhpcy51cGRhdGVWYWx1ZSh0aGlzLm1heCwgZXZlbnQpO1xuICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbi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kgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuZHJhZ2dpbmcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm5nWm9uZS5ydW4oKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmhhbmRsZUNoYW5nZShldmVudCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICghdGhpcy5tb3VzZXVwTGlzdGVuZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5tb3VzZXVwTGlzdGVuZXIgPSB0aGlzLnJlbmRlcmVyLmxpc3Rlbihkb2N1bWVudFRhcmdldCwgJ21vdXNldXAnLCAoZXZlbnQpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmRyYWdnaW5nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kcmFnZ2luZyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubmdab25lLnJ1bigoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLnJhbmdlKSB0aGlzLm9uU2xpZGVFbmQuZW1pdCh7IG9yaWdpbmFsRXZlbnQ6IGV2ZW50LCB2YWx1ZXM6IHRoaXMudmFsdWVzIGFzIG51bWJlcltdIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHRoaXMub25TbGlkZUVuZC5lbWl0KHsgb3JpZ2luYWxFdmVudDogZXZlbnQsIHZhbHVlOiB0aGlzLnZhbHVlIGFzIG51bWJlciB9KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5hbmltYXRlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEb21IYW5kbGVyLmFkZENsYXNzKHRoaXMuZWwubmF0aXZlRWxlbWVudC5jaGlsZHJlblswXSwgJ3Atc2xpZGVyLWFuaW1hdGUnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHVuYmluZERyYWdMaXN0ZW5lcnMoKSB7XG4gICAgICAgIGlmICh0aGlzLmRyYWdMaXN0ZW5lcikge1xuICAgICAgICAgICAgdGhpcy5kcmFnTGlzdGVuZXIoKTtcbiAgICAgICAgICAgIHRoaXMuZHJhZ0xpc3RlbmVyID0gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0aGlzLm1vdXNldXBMaXN0ZW5lcikge1xuICAgICAgICAgICAgdGhpcy5tb3VzZXVwTGlzdGVuZXIoKTtcbiAgICAgICAgICAgIHRoaXMubW91c2V1cExpc3RlbmVyID0gbnVsbDtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHNldFZhbHVlRnJvbUhhbmRsZShldmVudDogRXZlbnQsIGhhbmRsZVZhbHVlOiBhbnkpIHtcbiAgICAgICAgbGV0IG5ld1ZhbHVlID0gdGhpcy5nZXRWYWx1ZUZyb21IYW5kbGUoaGFuZGxlVmFsdWUpO1xuXG4gICAgICAgIGlmICh0aGlzLnJhbmdlKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5zdGVwKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5oYW5kbGVTdGVwQ2hhbmdlKG5ld1ZhbHVlLCAodGhpcy52YWx1ZXMgYXMgYW55KVt0aGlzLmhhbmRsZUluZGV4XSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAg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YWx1ZSA9IHRoaXMubWluO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmhhbmRsZVZhbHVlc1swXSA9IDA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh2YWx1ZSA+ICh0aGlzLnZhbHVlcyBhcyBudW1iZXJbXSlbMV0pIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlID4gdGhpcy5tYXgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlID0gdGhpcy5tYXg7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmhhbmRsZVZhbHVlc1swXSA9IDEwMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLnNsaWRlckhhbmRsZVN0YXJ0Py5uYXRpdmVFbGVtZW50LmZvY3VzKCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmICh2YWx1ZSA+IHRoaXMubWF4KSB7XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID0gdGhpcy5tYXg7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaGFuZGxlVmFsdWVzWzFdID0gMTAwO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLm9mZnNldCA9IHRoaXMuaGFuZGxlVmFsdWVzWzFdO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodmFsdWUgPCB0aGlzLm1pbikge1xuICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IHRoaXMubWluO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmhhbmRsZVZhbHVlc1sxXSA9IDA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh2YWx1ZSA8ICh0aGlzLnZhbHVlcyBhcyBudW1iZXJbXSlbMF0pIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5vZmZzZXQgPSB0aGlzLmhhbmRsZVZhbHVlc1sxXTtcbiAgICAgICAgICAgICAgICB9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