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

683 lines
95 KiB
JavaScript

import { animate, animation, style, transition, trigger, useAnimation } from '@angular/animations';
import { CommonModule, DOCUMENT, isPlatformBrowser } from '@angular/common';
import { ChangeDetectionStrategy, Component, Inject, NgModule, Optional, PLATFORM_ID, SkipSelf, ViewChild, ViewEncapsulation } from '@angular/core';
import { SharedModule, TranslationKeys } from 'primeng/api';
import { DomHandler } from 'primeng/dom';
import { FocusTrapModule } from 'primeng/focustrap';
import { TimesIcon } from 'primeng/icons/times';
import { WindowMaximizeIcon } from 'primeng/icons/windowmaximize';
import { WindowMinimizeIcon } from 'primeng/icons/windowminimize';
import { UniqueComponentId, ZIndexUtils } from 'primeng/utils';
import { DynamicDialogContent } from './dynamicdialogcontent';
import * as i0 from "@angular/core";
import * as i1 from "./dynamicdialog-config";
import * as i2 from "./dynamicdialog-ref";
import * as i3 from "primeng/api";
import * as i4 from "@angular/common";
import * as i5 from "primeng/focustrap";
const showAnimation = animation([style({ transform: '{{transform}}', opacity: 0 }), animate('{{transition}}', style({ transform: 'none', opacity: 1 }))]);
const hideAnimation = animation([animate('{{transition}}', style({ transform: '{{transform}}', opacity: 0 }))]);
export class DynamicDialogComponent {
document;
platformId;
cd;
renderer;
config;
dialogRef;
zone;
primeNGConfig;
parentDialog;
visible = true;
componentRef;
mask;
resizing;
dragging;
maximized;
_style = {};
originalStyle;
lastPageX;
lastPageY;
ariaLabelledBy;
id = UniqueComponentId();
styleElement;
insertionPoint;
maskViewChild;
contentViewChild;
footerViewChild;
headerViewChild;
childComponentType;
container;
wrapper;
documentKeydownListener;
documentEscapeListener;
maskClickListener;
transformOptions = 'scale(0.7)';
documentResizeListener;
documentResizeEndListener;
documentDragListener;
documentDragEndListener;
get minX() {
return this.config.minX ? this.config.minX : 0;
}
get minY() {
return this.config.minY ? this.config.minY : 0;
}
get keepInViewport() {
return this.config.keepInViewport;
}
get maximizable() {
return this.config.maximizable;
}
get maximizeIcon() {
return this.config.maximizeIcon;
}
get minimizeIcon() {
return this.config.minimizeIcon;
}
get style() {
return this._style;
}
get position() {
return this.config.position;
}
get closeAriaLabel() {
return this.primeNGConfig.getTranslation(TranslationKeys.ARIA)['close'];
}
set style(value) {
if (value) {
this._style = { ...value };
this.originalStyle = value;
}
}
get parent() {
const domElements = Array.from(this.document.getElementsByClassName('p-dialog'));
if (domElements.length > 1) {
return domElements.pop();
}
}
get parentContent() {
const domElements = Array.from(this.document.getElementsByClassName('p-dialog'));
if (domElements.length > 0) {
const contentElements = domElements[domElements.length - 1].querySelector('.p-dialog-content');
if (contentElements)
return Array.isArray(contentElements) ? contentElements[0] : contentElements;
}
}
get header() {
return this.config.header;
}
get data() {
return this.config.data;
}
get breakpoints() {
return this.config.breakpoints;
}
get footerTemplate() {
return this.config?.templates?.footer;
}
get headerTemplate() {
return this.config?.templates?.header;
}
get contentTemplate() {
return this.config?.templates?.content;
}
get minimizeIconTemplate() {
return this.config?.templates?.minimizeicon;
}
get maximizeIconTemplate() {
return this.config?.templates?.maximizeicon;
}
get closeIconTemplate() {
return this.config?.templates?.closeicon;
}
constructor(document, platformId, cd, renderer, config, dialogRef, zone, primeNGConfig, parentDialog) {
this.document = document;
this.platformId = platformId;
this.cd = cd;
this.renderer = renderer;
this.config = config;
this.dialogRef = dialogRef;
this.zone = zone;
this.primeNGConfig = primeNGConfig;
this.parentDialog = parentDialog;
}
ngOnInit() {
if (this.breakpoints) {
this.createStyle();
}
}
createStyle() {
if (isPlatformBrowser(this.platformId)) {
if (!this.styleElement) {
this.styleElement = this.renderer.createElement('style');
this.styleElement.type = 'text/css';
this.renderer.appendChild(this.document.head, this.styleElement);
let innerHTML = '';
for (let breakpoint in this.breakpoints) {
innerHTML += `
@media screen and (max-width: ${breakpoint}) {
.p-dialog[${this.id}]:not(.p-dialog-maximized) {
width: ${this.breakpoints[breakpoint]} !important;
}
}
`;
}
this.renderer.setProperty(this.styleElement, 'innerHTML', innerHTML);
}
}
}
destroyStyle() {
if (this.styleElement) {
this.renderer.removeChild(this.document.head, this.styleElement);
this.styleElement = null;
}
}
ngAfterViewInit() {
this.loadChildComponent(this.childComponentType);
this.ariaLabelledBy = this.getAriaLabelledBy();
this.cd.detectChanges();
}
getAriaLabelledBy() {
return this.header !== null ? UniqueComponentId() + '_header' : null;
}
loadChildComponent(componentType) {
let viewContainerRef = this.insertionPoint?.viewContainerRef;
viewContainerRef?.clear();
this.componentRef = viewContainerRef?.createComponent(componentType);
this.dialogRef.onChildComponentLoaded.next(this.componentRef.instance);
}
moveOnTop() {
if (this.config.autoZIndex !== false) {
ZIndexUtils.set('modal', this.container, (this.config.baseZIndex || 0) + this.primeNGConfig.zIndex.modal);
this.wrapper.style.zIndex = String(parseInt(this.container.style.zIndex, 10) - 1);
}
}
onAnimationStart(event) {
switch (event.toState) {
case 'visible':
this.container = event.element;
this.wrapper = this.container.parentElement;
this.moveOnTop();
if (this.parent) {
this.unbindGlobalListeners();
}
this.bindGlobalListeners();
this.container?.setAttribute(this.id, '');
if (this.config.modal !== false) {
this.enableModality();
}
if (this.config.focusOnShow !== false) {
this.focus();
}
break;
case 'void':
if (this.wrapper && this.config.modal !== false) {
DomHandler.addClass(this.wrapper, 'p-component-overlay-leave');
}
break;
}
}
onAnimationEnd(event) {
if (event.toState === 'void') {
if (this.parentContent) {
this.focus(this.parentContent);
}
this.onContainerDestroy();
this.dialogRef.destroy();
}
}
onContainerDestroy() {
this.unbindGlobalListeners();
if (this.container && this.config.autoZIndex !== false) {
ZIndexUtils.clear(this.container);
}
if (this.config.modal !== false) {
this.disableModality();
}
this.container = null;
}
close() {
this.visible = false;
this.cd.markForCheck();
}
hide() {
if (this.dialogRef) {
this.dialogRef.close();
}
}
enableModality() {
if (this.config.dismissableMask) {
this.maskClickListener = this.renderer.listen(this.wrapper, 'mousedown', (event) => {
if (this.wrapper && this.wrapper.isSameNode(event.target)) {
this.hide();
}
});
}
if (this.config.modal !== false) {
DomHandler.addClass(this.document.body, 'p-overflow-hidden');
}
}
disableModality() {
if (this.wrapper) {
if (this.config.dismissableMask) {
this.unbindMaskClickListener();
}
if (this.config.modal !== false) {
DomHandler.removeClass(this.document.body, 'p-overflow-hidden');
}
if (!this.cd.destroyed) {
this.cd.detectChanges();
}
}
}
focus(focusParentElement = this.contentViewChild.nativeElement) {
let focusable = DomHandler.getFocusableElement(focusParentElement, '[autofocus]');
if (focusable) {
this.zone.runOutsideAngular(() => {
setTimeout(() => focusable.focus(), 5);
});
return;
}
const focusableElement = DomHandler.getFocusableElement(focusParentElement);
if (focusableElement) {
this.zone.runOutsideAngular(() => {
setTimeout(() => focusableElement.focus(), 5);
});
}
else if (this.footerViewChild) {
// If the content section is empty try to focus on footer
this.focus(this.footerViewChild.nativeElement);
}
else if (!focusableElement && this.headerViewChild) {
this.focus(this.headerViewChild.nativeElement);
}
}
maximize() {
this.maximized = !this.maximized;
if (this.maximized) {
DomHandler.addClass(this.document.body, 'p-overflow-hidden');
}
else {
DomHandler.removeClass(this.document.body, 'p-overflow-hidden');
}
this.dialogRef.maximize({ maximized: this.maximized });
}
initResize(event) {
if (this.config.resizable) {
if (!this.documentResizeListener) {
this.bindDocumentResizeListeners();
}
this.resizing = true;
this.lastPageX = event.pageX;
this.lastPageY = event.pageY;
DomHandler.addClass(this.document.body, 'p-unselectable-text');
this.dialogRef.resizeInit(event);
}
}
onResize(event) {
if (this.resizing) {
let deltaX = event.pageX - this.lastPageX;
let deltaY = event.pageY - this.lastPageY;
let containerWidth = DomHandler.getOuterWidth(this.container);
let containerHeight = DomHandler.getOuterHeight(this.container);
let contentHeight = DomHandler.getOuterHeight(this.contentViewChild.nativeElement);
let newWidth = containerWidth + deltaX;
let newHeight = containerHeight + deltaY;
let minWidth = this.container.style.minWidth;
let minHeight = this.container.style.minHeight;
let offset = this.container.getBoundingClientRect();
let viewport = DomHandler.getViewport();
let hasBeenDragged = !parseInt(this.container.style.top) || !parseInt(this.container.style.left);
if (hasBeenDragged) {
newWidth += deltaX;
newHeight += deltaY;
}
if ((!minWidth || newWidth > parseInt(minWidth)) && offset.left + newWidth < viewport.width) {
this._style.width = newWidth + 'px';
this.container.style.width = this._style.width;
}
if ((!minHeight || newHeight > parseInt(minHeight)) && offset.top + newHeight < viewport.height) {
this.contentViewChild.nativeElement.style.height = contentHeight + newHeight - containerHeight + 'px';
if (this._style.height) {
this._style.height = newHeight + 'px';
this.container.style.height = this._style.height;
}
}
this.lastPageX = event.pageX;
this.lastPageY = event.pageY;
}
}
resizeEnd(event) {
if (this.resizing) {
this.resizing = false;
DomHandler.removeClass(this.document.body, 'p-unselectable-text');
this.dialogRef.resizeEnd(event);
}
}
initDrag(event) {
if (DomHandler.hasClass(event.target, 'p-dialog-header-icon') || DomHandler.hasClass(event.target.parentElement, 'p-dialog-header-icon')) {
return;
}
if (this.config.draggable) {
this.dragging = true;
this.lastPageX = event.pageX;
this.lastPageY = event.pageY;
this.container.style.margin = '0';
DomHandler.addClass(this.document.body, 'p-unselectable-text');
this.dialogRef.dragStart(event);
}
}
onDrag(event) {
if (this.dragging) {
let containerWidth = DomHandler.getOuterWidth(this.container);
let containerHeight = DomHandler.getOuterHeight(this.container);
let deltaX = event.pageX - this.lastPageX;
let deltaY = event.pageY - this.lastPageY;
let offset = this.container.getBoundingClientRect();
let leftPos = offset.left + deltaX;
let topPos = offset.top + deltaY;
let viewport = DomHandler.getViewport();
this.container.style.position = 'fixed';
if (this.keepInViewport) {
if (leftPos >= this.minX && leftPos + containerWidth < viewport.width) {
this._style.left = leftPos + 'px';
this.lastPageX = event.pageX;
this.container.style.left = leftPos + 'px';
}
if (topPos >= this.minY && topPos + containerHeight < viewport.height) {
this._style.top = topPos + 'px';
this.lastPageY = event.pageY;
this.container.style.top = topPos + 'px';
}
}
else {
this.lastPageX = event.pageX;
this.container.style.left = leftPos + 'px';
this.lastPageY = event.pageY;
this.container.style.top = topPos + 'px';
}
}
}
endDrag(event) {
if (this.dragging) {
this.dragging = false;
DomHandler.removeClass(this.document.body, 'p-unselectable-text');
this.dialogRef.dragEnd(event);
this.cd.detectChanges();
}
}
resetPosition() {
this.container.style.position = '';
this.container.style.left = '';
this.container.style.top = '';
this.container.style.margin = '';
}
bindDocumentDragListener() {
if (isPlatformBrowser(this.platformId)) {
this.zone.runOutsideAngular(() => {
this.documentDragListener = this.renderer.listen(this.document, 'mousemove', this.onDrag.bind(this));
});
}
}
bindDocumentDragEndListener() {
if (isPlatformBrowser(this.platformId)) {
this.zone.runOutsideAngular(() => {
this.documentDragEndListener = this.renderer.listen(this.document, 'mouseup', this.endDrag.bind(this));
});
}
}
unbindDocumentDragEndListener() {
if (this.documentDragEndListener) {
this.documentDragEndListener();
this.documentDragListener = null;
}
}
unbindDocumentDragListener() {
if (this.documentDragListener) {
this.documentDragListener();
this.documentDragListener = null;
}
}
bindDocumentResizeListeners() {
if (isPlatformBrowser(this.platformId)) {
this.zone.runOutsideAngular(() => {
this.documentResizeListener = this.renderer.listen(this.document, 'mousemove', this.onResize.bind(this));
this.documentResizeEndListener = this.renderer.listen(this.document, 'mouseup', this.resizeEnd.bind(this));
});
}
}
unbindDocumentResizeListeners() {
if (this.documentResizeListener && this.documentResizeEndListener) {
this.documentResizeListener();
this.documentResizeEndListener();
this.documentResizeListener = null;
this.documentResizeEndListener = null;
}
}
bindGlobalListeners() {
if (this.config.closeOnEscape !== false) {
this.bindDocumentEscapeListener();
}
if (this.config.resizable) {
this.bindDocumentResizeListeners();
}
if (this.config.draggable) {
this.bindDocumentDragListener();
this.bindDocumentDragEndListener();
}
}
unbindGlobalListeners() {
this.unbindDocumentEscapeListener();
this.unbindDocumentResizeListeners();
this.unbindDocumentDragListener();
this.unbindDocumentDragEndListener();
}
bindDocumentEscapeListener() {
const documentTarget = this.maskViewChild ? this.maskViewChild.nativeElement.ownerDocument : 'document';
this.documentEscapeListener = this.renderer.listen(documentTarget, 'keydown', (event) => {
if (event.which == 27) {
if (parseInt(this.container.style.zIndex) == ZIndexUtils.getCurrent()) {
this.hide();
}
}
});
}
unbindDocumentEscapeListener() {
if (this.documentEscapeListener) {
this.documentEscapeListener();
this.documentEscapeListener = null;
}
}
unbindMaskClickListener() {
if (this.maskClickListener) {
this.maskClickListener();
this.maskClickListener = null;
}
}
ngOnDestroy() {
this.onContainerDestroy();
if (this.componentRef) {
this.componentRef.destroy();
}
this.destroyStyle();
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: DynamicDialogComponent, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i1.DynamicDialogConfig }, { token: i2.DynamicDialogRef }, { token: i0.NgZone }, { token: i3.PrimeNGConfig }, { token: DynamicDialogComponent, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.7", type: DynamicDialogComponent, selector: "p-dynamicDialog", host: { classAttribute: "p-element" }, viewQueries: [{ propertyName: "insertionPoint", first: true, predicate: DynamicDialogContent, descendants: true }, { propertyName: "maskViewChild", first: true, predicate: ["mask"], descendants: true }, { propertyName: "contentViewChild", first: true, predicate: ["content"], descendants: true }, { propertyName: "footerViewChild", first: true, predicate: ["footer"], descendants: true }, { propertyName: "headerViewChild", first: true, predicate: ["titlebar"], descendants: true }], ngImport: i0, template: `
<div
#mask
[ngClass]="{
'p-dialog-mask': true,
'p-component-overlay p-component-overlay-enter p-dialog-mask-scrollblocker': config.modal !== false,
'p-dialog-left': position === 'left',
'p-dialog-right': position === 'right',
'p-dialog-top': position === 'top',
'p-dialog-bottom': position === 'bottom',
'p-dialog-top-left': position === 'topleft' || position === 'top-left',
'p-dialog-top-right': position === 'topright' || position === 'top-right',
'p-dialog-bottom-left': position === 'bottomleft' || position === 'bottom-left',
'p-dialog-bottom-right': position === 'bottomright' || position === 'bottom-right'
}"
[class]="config.maskStyleClass"
>
<div
#container
[ngClass]="{ 'p-dialog p-dynamic-dialog p-component': true, 'p-dialog-rtl': config.rtl, 'p-dialog-resizable': config.resizable, 'p-dialog-draggable': config.draggable, 'p-dialog-maximized': maximized }"
[ngStyle]="config.style"
[class]="config.styleClass"
[@animation]="{ value: 'visible', params: { transform: transformOptions, transition: config.transitionOptions || '150ms cubic-bezier(0, 0, 0.2, 1)' } }"
(@animation.start)="onAnimationStart($event)"
(@animation.done)="onAnimationEnd($event)"
role="dialog"
*ngIf="visible"
pFocusTrap
[pFocusTrapDisabled]="config.focusTrap === false"
[style.width]="config.width"
[style.height]="config.height"
[attr.aria-labelledby]="ariaLabelledBy"
[attr.aria-modal]="true"
>
<div *ngIf="config.resizable" class="p-resizable-handle" style="z-index: 90;" (mousedown)="initResize($event)"></div>
<div #titlebar class="p-dialog-header" (mousedown)="initDrag($event)" *ngIf="config.showHeader === false ? false : true">
<ng-container *ngComponentOutlet="headerTemplate"></ng-container>
<ng-container *ngIf="!headerTemplate">
<span class="p-dialog-title" [id]="ariaLabelledBy">{{ config.header }}</span>
<div class="p-dialog-header-icons">
<button *ngIf="config.maximizable" type="button" [ngClass]="{ 'p-dialog-header-icon p-dialog-header-maximize p-link': true }" (click)="maximize()" (keydown.enter)="maximize()" tabindex="-1" pRipple>
<span class="p-dialog-header-maximize-icon" *ngIf="!maximizeIconTemplate || !minimizeIconTemplate" [ngClass]="maximized ? minimizeIcon : maximizeIcon"></span>
<WindowMaximizeIcon *ngIf="!maximized && !maximizeIcon && !maximizeIconTemplate" [styleClass]="'p-dialog-header-maximize-icon'" />
<WindowMinimizeIcon *ngIf="maximized && !minimizeIcon && !minimizeIconTemplate" [styleClass]="'p-dialog-header-maximize-icon'" />
<ng-container *ngComponentOutlet="maximizeIconTemplate"></ng-container>
<ng-container *ngComponentOutlet="minimizeIconTemplate"></ng-container>
</button>
<button [ngClass]="'p-dialog-header-icon p-dialog-header-maximize p-link'" type="button" role="button" (click)="hide()" (keydown.enter)="hide()" *ngIf="config.closable !== false" [attr.aria-label]="closeAriaLabel">
<TimesIcon [styleClass]="'p-dialog-header-close-icon'" *ngIf="!closeIconTemplate" />
<ng-container *ngComponentOutlet="closeIconTemplate"></ng-container>
</button>
</div>
</ng-container>
</div>
<div #content class="p-dialog-content" [ngStyle]="config.contentStyle">
<ng-template pDynamicDialogContent *ngIf="!contentTemplate"></ng-template>
<ng-container *ngComponentOutlet="contentTemplate"></ng-container>
</div>
<div #footer class="p-dialog-footer" *ngIf="config.footer || footerTemplate">
<ng-container *ngIf="!footerTemplate">
{{ config.footer }}
</ng-container>
<ng-container *ngComponentOutlet="footerTemplate"></ng-container>
</div>
</div>
</div>
`, isInline: true, styles: ["@layer primeng{.p-dialog-mask{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;pointer-events:none}.p-dialog-mask.p-component-overlay{pointer-events:auto}.p-dialog{display:flex;flex-direction:column;pointer-events:auto;max-height:90%;transform:scale(1);position:relative}.p-dialog-content{overflow-y:auto;flex-grow:1}.p-dialog-header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.p-dialog-draggable .p-dialog-header{cursor:move}.p-dialog-footer{flex-shrink:0}.p-dialog .p-dialog-header-icons{display:flex;align-items:center}.p-dialog .p-dialog-header-icon{display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-fluid .p-dialog-footer .p-button{width:auto}.p-dialog-top .p-dialog,.p-dialog-bottom .p-dialog,.p-dialog-left .p-dialog,.p-dialog-right .p-dialog,.p-dialog-top-left .p-dialog,.p-dialog-top-right .p-dialog,.p-dialog-bottom-left .p-dialog,.p-dialog-bottom-right .p-dialog{margin:.75rem;transform:translateZ(0)}.p-dialog-maximized{-webkit-transition:none;transition:none;transform:none;width:100vw!important;height:100vh!important;top:0!important;left:0!important;max-height:100%;height:100%}.p-dialog-maximized .p-dialog-content{flex-grow:1}.p-dialog-left{justify-content:flex-start}.p-dialog-right{justify-content:flex-end}.p-dialog-top{align-items:flex-start}.p-dialog-top-left{justify-content:flex-start;align-items:flex-start}.p-dialog-top-right{justify-content:flex-end;align-items:flex-start}.p-dialog-bottom{align-items:flex-end}.p-dialog-bottom-left{justify-content:flex-start;align-items:flex-end}.p-dialog-bottom-right{justify-content:flex-end;align-items:flex-end}.p-dialog .p-resizable-handle{position:absolute;font-size:.1px;display:block;cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.p-confirm-dialog .p-dialog-content{display:flex;align-items:center}}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => i4.NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => i4.NgComponentOutlet), selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i0.forwardRef(() => i4.NgIf), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(() => i4.NgStyle), selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i0.forwardRef(() => WindowMaximizeIcon), selector: "WindowMaximizeIcon" }, { kind: "component", type: i0.forwardRef(() => WindowMinimizeIcon), selector: "WindowMinimizeIcon" }, { kind: "component", type: i0.forwardRef(() => TimesIcon), selector: "TimesIcon" }, { kind: "directive", type: i0.forwardRef(() => i5.FocusTrap), selector: "[pFocusTrap]", inputs: ["pFocusTrapDisabled"] }, { kind: "directive", type: i0.forwardRef(() => DynamicDialogContent), selector: "[pDynamicDialogContent]" }], animations: [trigger('animation', [transition('void => visible', [useAnimation(showAnimation)]), transition('visible => void', [useAnimation(hideAnimation)])])], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: DynamicDialogComponent, decorators: [{
type: Component,
args: [{ selector: 'p-dynamicDialog', template: `
<div
#mask
[ngClass]="{
'p-dialog-mask': true,
'p-component-overlay p-component-overlay-enter p-dialog-mask-scrollblocker': config.modal !== false,
'p-dialog-left': position === 'left',
'p-dialog-right': position === 'right',
'p-dialog-top': position === 'top',
'p-dialog-bottom': position === 'bottom',
'p-dialog-top-left': position === 'topleft' || position === 'top-left',
'p-dialog-top-right': position === 'topright' || position === 'top-right',
'p-dialog-bottom-left': position === 'bottomleft' || position === 'bottom-left',
'p-dialog-bottom-right': position === 'bottomright' || position === 'bottom-right'
}"
[class]="config.maskStyleClass"
>
<div
#container
[ngClass]="{ 'p-dialog p-dynamic-dialog p-component': true, 'p-dialog-rtl': config.rtl, 'p-dialog-resizable': config.resizable, 'p-dialog-draggable': config.draggable, 'p-dialog-maximized': maximized }"
[ngStyle]="config.style"
[class]="config.styleClass"
[@animation]="{ value: 'visible', params: { transform: transformOptions, transition: config.transitionOptions || '150ms cubic-bezier(0, 0, 0.2, 1)' } }"
(@animation.start)="onAnimationStart($event)"
(@animation.done)="onAnimationEnd($event)"
role="dialog"
*ngIf="visible"
pFocusTrap
[pFocusTrapDisabled]="config.focusTrap === false"
[style.width]="config.width"
[style.height]="config.height"
[attr.aria-labelledby]="ariaLabelledBy"
[attr.aria-modal]="true"
>
<div *ngIf="config.resizable" class="p-resizable-handle" style="z-index: 90;" (mousedown)="initResize($event)"></div>
<div #titlebar class="p-dialog-header" (mousedown)="initDrag($event)" *ngIf="config.showHeader === false ? false : true">
<ng-container *ngComponentOutlet="headerTemplate"></ng-container>
<ng-container *ngIf="!headerTemplate">
<span class="p-dialog-title" [id]="ariaLabelledBy">{{ config.header }}</span>
<div class="p-dialog-header-icons">
<button *ngIf="config.maximizable" type="button" [ngClass]="{ 'p-dialog-header-icon p-dialog-header-maximize p-link': true }" (click)="maximize()" (keydown.enter)="maximize()" tabindex="-1" pRipple>
<span class="p-dialog-header-maximize-icon" *ngIf="!maximizeIconTemplate || !minimizeIconTemplate" [ngClass]="maximized ? minimizeIcon : maximizeIcon"></span>
<WindowMaximizeIcon *ngIf="!maximized && !maximizeIcon && !maximizeIconTemplate" [styleClass]="'p-dialog-header-maximize-icon'" />
<WindowMinimizeIcon *ngIf="maximized && !minimizeIcon && !minimizeIconTemplate" [styleClass]="'p-dialog-header-maximize-icon'" />
<ng-container *ngComponentOutlet="maximizeIconTemplate"></ng-container>
<ng-container *ngComponentOutlet="minimizeIconTemplate"></ng-container>
</button>
<button [ngClass]="'p-dialog-header-icon p-dialog-header-maximize p-link'" type="button" role="button" (click)="hide()" (keydown.enter)="hide()" *ngIf="config.closable !== false" [attr.aria-label]="closeAriaLabel">
<TimesIcon [styleClass]="'p-dialog-header-close-icon'" *ngIf="!closeIconTemplate" />
<ng-container *ngComponentOutlet="closeIconTemplate"></ng-container>
</button>
</div>
</ng-container>
</div>
<div #content class="p-dialog-content" [ngStyle]="config.contentStyle">
<ng-template pDynamicDialogContent *ngIf="!contentTemplate"></ng-template>
<ng-container *ngComponentOutlet="contentTemplate"></ng-container>
</div>
<div #footer class="p-dialog-footer" *ngIf="config.footer || footerTemplate">
<ng-container *ngIf="!footerTemplate">
{{ config.footer }}
</ng-container>
<ng-container *ngComponentOutlet="footerTemplate"></ng-container>
</div>
</div>
</div>
`, animations: [trigger('animation', [transition('void => visible', [useAnimation(showAnimation)]), transition('visible => void', [useAnimation(hideAnimation)])])], changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, host: {
class: 'p-element'
}, styles: ["@layer primeng{.p-dialog-mask{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;pointer-events:none}.p-dialog-mask.p-component-overlay{pointer-events:auto}.p-dialog{display:flex;flex-direction:column;pointer-events:auto;max-height:90%;transform:scale(1);position:relative}.p-dialog-content{overflow-y:auto;flex-grow:1}.p-dialog-header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.p-dialog-draggable .p-dialog-header{cursor:move}.p-dialog-footer{flex-shrink:0}.p-dialog .p-dialog-header-icons{display:flex;align-items:center}.p-dialog .p-dialog-header-icon{display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-fluid .p-dialog-footer .p-button{width:auto}.p-dialog-top .p-dialog,.p-dialog-bottom .p-dialog,.p-dialog-left .p-dialog,.p-dialog-right .p-dialog,.p-dialog-top-left .p-dialog,.p-dialog-top-right .p-dialog,.p-dialog-bottom-left .p-dialog,.p-dialog-bottom-right .p-dialog{margin:.75rem;transform:translateZ(0)}.p-dialog-maximized{-webkit-transition:none;transition:none;transform:none;width:100vw!important;height:100vh!important;top:0!important;left:0!important;max-height:100%;height:100%}.p-dialog-maximized .p-dialog-content{flex-grow:1}.p-dialog-left{justify-content:flex-start}.p-dialog-right{justify-content:flex-end}.p-dialog-top{align-items:flex-start}.p-dialog-top-left{justify-content:flex-start;align-items:flex-start}.p-dialog-top-right{justify-content:flex-end;align-items:flex-start}.p-dialog-bottom{align-items:flex-end}.p-dialog-bottom-left{justify-content:flex-start;align-items:flex-end}.p-dialog-bottom-right{justify-content:flex-end;align-items:flex-end}.p-dialog .p-resizable-handle{position:absolute;font-size:.1px;display:block;cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.p-confirm-dialog .p-dialog-content{display:flex;align-items:center}}\n"] }]
}], ctorParameters: () => [{ type: Document, decorators: [{
type: Inject,
args: [DOCUMENT]
}] }, { type: undefined, decorators: [{
type: Inject,
args: [PLATFORM_ID]
}] }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i1.DynamicDialogConfig }, { type: i2.DynamicDialogRef }, { type: i0.NgZone }, { type: i3.PrimeNGConfig }, { type: DynamicDialogComponent, decorators: [{
type: SkipSelf
}, {
type: Optional
}] }], propDecorators: { insertionPoint: [{
type: ViewChild,
args: [DynamicDialogContent]
}], maskViewChild: [{
type: ViewChild,
args: ['mask']
}], contentViewChild: [{
type: ViewChild,
args: ['content']
}], footerViewChild: [{
type: ViewChild,
args: ['footer']
}], headerViewChild: [{
type: ViewChild,
args: ['titlebar']
}] } });
export class DynamicDialogModule {
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: DynamicDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.7", ngImport: i0, type: DynamicDialogModule, declarations: [DynamicDialogComponent, DynamicDialogContent], imports: [CommonModule, WindowMaximizeIcon, WindowMinimizeIcon, TimesIcon, SharedModule, FocusTrapModule], exports: [SharedModule] });
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: DynamicDialogModule, imports: [CommonModule, WindowMaximizeIcon, WindowMinimizeIcon, TimesIcon, SharedModule, FocusTrapModule, SharedModule] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: DynamicDialogModule, decorators: [{
type: NgModule,
args: [{
imports: [CommonModule, WindowMaximizeIcon, WindowMinimizeIcon, TimesIcon, SharedModule, FocusTrapModule],
declarations: [DynamicDialogComponent, DynamicDialogContent],
exports: [SharedModule]
}]
}] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHluYW1pY2RpYWxvZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHAvY29tcG9uZW50cy9keW5hbWljZGlhbG9nL2R5bmFtaWNkaWFsb2cudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE9BQU8sRUFBRSxTQUFTLEVBQWtCLEtBQUssRUFBRSxVQUFVLEVBQUUsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQ25ILE9BQU8sRUFBRSxZQUFZLEVBQUUsUUFBUSxFQUFFLGlCQUFpQixFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDNUUsT0FBTyxFQUVILHVCQUF1QixFQUV2QixTQUFTL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b24gPT09ICdib3R0b20tcmlnaHQnXG4gICAgICAgICAgICB9XCJcbiAgICAgICAgICAgIFtjbGFzc109XCJjb25maWcubWFza1N0eWxlQ2xhc3NcIlxuICAgICAgICA+XG4gICAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICAgICAgI2NvbnRhaW5lclxuICAgICAgICAgICAgICAgIFtuZ0NsYXNzXT1cInsgJ3AtZGlhbG9nIHAtZHluYW1pYy1kaWFsb2cgcC1jb21wb25lbnQnOiB0cnVlLCAncC1kaWFsb2ctcnRsJzogY29uZmlnLnJ0bCwgJ3AtZGlhbG9nLXJlc2l6YWJsZSc6IGNvbmZpZy5yZXNpemFibGUsICdwLWRpYWxvZy1kcmFnZ2FibGUnOiBjb25maWcuZHJhZ2dhYmxlLCAncC1kaWFsb2ctbWF4aW1pemVkJzogbWF4aW1pemVkIH1cIlxuICAgICAgICAgICAgICAgIFtuZ1N0eWxlXT1cImNvbmZpZy5zdHlsZVwiXG4gICAgICAgICAgICAgICAgW2NsYXNzXT1cImNvbmZpZy5zdHlsZUNsYXNzXCJcbiAgICAgICAgICAgICAgICBbQGFuaW1hdGlvbl09XCJ7IHZhbHVlOiAndmlzaWJsZScsIHBhcmFtczogeyB0cmFuc2Zvcm06IHRyYW5zZm9ybU9wdGlvbnMsIHRyYW5zaXRpb246IGNvbmZpZy50cmFuc2l0aW9uT3B0aW9ucyB8fCAnMTUwbXMgY3ViaWMtYmV6aWVyKDAsIDAsIDAuMiwgMSknIH0gfVwiXG4gICAgICAgICAgICAgICAgKEBhbmltYXRpb24uc3RhcnQpPVwib25BbmltYXRpb25TdGFydCgkZXZlbnQpXCJcbiAgICAgICAgICAgICAgICAoQGFuaW1hdGlvbi5kb25lKT1cIm9uQW5pbWF0aW9uRW5kKCRldmVudClcIlxuICAgICAgICAgICAgICAgIHJvbGU9XCJkaWFsb2dcIlxuICAgICAgICAgICAgICAgICpuZ0lmPVwidmlzaWJsZVwiXG4gICAgICAgICAgICAgICAgcEZvY3VzVHJhcFxuICAgICAgICAgICAgICAgIFtwRm9jdXNUcmFwRGlzYWJsZWRdPVwiY29uZmlnLmZvY3VzVHJhcCA9PT0gZmFsc2VcIlxuICAgICAgICAgICAgICAgIFtzdHlsZS53aWR0aF09XCJjb25maWcud2lkdGhcIlxuICAgICAgICAgICAgICAgIFtzdHlsZS5oZWlnaHRdPVwiY29uZmlnLmhlaWdodFwiXG4gICAgICAgICAgICAgICAgW2F0dHIuYXJpYS1sYWJlbGxlZGJ5XT1cImFyaWFMYWJlbGxlZEJ5XCJcbiAgICAgICAgICAgICAgICBbYXR0ci5hcmlhLW1vZGFsXT1cInRydWVcIlxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgIDxkaXYgKm5nSWY9XCJjb25maWcucmVzaXphYmxlXCIgY2xhc3M9XCJwLXJlc2l6YWJsZS1oYW5kbGVcIiBzdHlsZT1cInotaW5kZXg6IDkwO1wiIChtb3VzZWRvd24pPVwiaW5pdFJlc2l6ZSgkZXZlbnQpXCI+PC9kaXY+XG4gICAgICAgICAgICAgICAgPGRpdiAjdGl0bGViYXIgY2xhc3M9XCJwLWRpYWxvZy1oZWFkZXJcIiAobW91c2Vkb3duKT1cImluaXREcmFnKCRldmVudClcIiAqbmdJZj1cImNvbmZpZy5zaG93SGVhZGVyID09PSBmYWxzZSA/IGZhbHNlIDogdHJ1ZVwiPlxuICAgICAgICAgICAgICAgICAgICA8bmctY29udGFpbmVyICpuZ0NvbXBvbmVudE91dGxldD1cImhlYWRlclRlbXBsYXRlXCI+PC9uZy1jb250YWluZXI+XG4gICAgICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nSWY9XCIhaGVhZGVyVGVtcGxhdGVcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPVwicC1kaWFsb2ctdGl0bGVcIiBbaWRdPVwiYXJpYUxhYmVsbGVkQnlcIj57eyBjb25maWcuaGVhZGVyIH19PC9zcGFuPlxuICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInAtZGlhbG9nLWhlYWRlci1pY29uc1wiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxidXR0b24gKm5nSWY9XCJjb25maWcubWF4aW1pemFibGVcIiB0eXBlPVwiYnV0dG9uXCIgW25nQ2xhc3NdPVwieyAncC1kaWFsb2ctaGVhZGVyLWljb24gcC1kaWFsb2ctaGVhZGVyLW1heGltaXplIHAtbGluayc6IHRydWUgfVwiIChjbGljayk9XCJtYXhpbWl6ZSgpXCIgKGtleWRvd24uZW50ZXIpPVwibWF4aW1pemUoKVwiIHRhYmluZGV4PVwiLTFcIiBwUmlwcGxlPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cInAtZGlhbG9nLWhlYWRlci1tYXhpbWl6ZS1pY29uXCIgKm5nSWY9XCIhbWF4aW1pemVJY29uVGVtcGxhdGUgfHwgIW1pbmltaXplSWNvblRlbXBsYXRlXCIgW25nQ2xhc3NdPVwibWF4aW1pemVkID8gbWluaW1pemVJY29uIDogbWF4aW1pemVJY29uXCI+PC9zcGFuPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8V2luZG93TWF4aW1pemVJY29uICpuZ0lmPVwiIW1heGltaXplZCAmJiAhbWF4aW1pemVJY29uICYmICFtYXhpbWl6ZUljb25UZW1wbGF0ZVwiIFtzdHlsZUNsYXNzXT1cIidwLWRpYWxvZy1oZWFkZXItbWF4aW1pemUtaWNvbidcIiAvPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8V2luZG93TWluaW1pemVJY29uICpuZ0lmPVwibWF4aW1pemVkICYmICFtaW5pbWl6ZUljb24gJiYgIW1pbmltaXplSWNvblRlbXBsYXRlXCIgW3N0eWxlQ2xhc3NdPVwiJ3AtZGlhbG9nLWhlYWRlci1tYXhpbWl6ZS1pY29uJ1wiIC8+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nQ29tcG9uZW50T3V0bGV0PVwibWF4aW1pemVJY29uVGVtcGxhdGVcIj48L25nLWNvbnRhaW5lcj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPG5nLWNvbnRhaW5lciAqbmdDb21wb25lbnRPdXRsZXQ9XCJtaW5pbWl6ZUljb25UZW1wbGF0ZVwiPjwvbmctY29udGFpbmVyPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvYnV0dG9uPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxidXR0b24gW25nQ2xhc3NdPVwiJ3AtZGlhbG9nLWhlYWRlci1pY29uIHAtZGlhbG9nLWhlYWRlci1tYXhpbWl6ZSBwLWxpbmsnXCIgdHlwZT1cImJ1dHRvblwiIHJvbGU9XCJidXR0b25cIiAoY2xpY2spPVwiaGlkZSgpXCIgKGtleWRvd24uZW50ZXIpPVwiaGlkZSgpXCIgKm5nSWY9XCJjb25maWcuY2xvc2FibGUgIT09IGZhbHNlXCIgW2F0dHIuYXJpYS1sYWJlbF09XCJjbG9zZUFyaWFMYWJlbFwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8VGltZXNJY29uIFtzdHlsZUNsYXNzXT1cIidwLWRpYWxvZy1oZWFkZXItY2xvc2UtaWNvbidcIiAqbmdJZj1cIiFjbG9zZUljb25UZW1wbGF0ZVwiIC8+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nQ29tcG9uZW50T3V0bGV0PVwiY2xvc2VJY29uVGVtcGxhdGVcIj48L25nLWNvbnRhaW5lcj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8ZGl2ICNjb250ZW50IGNsYXNzPVwicC1kaWFsb2ctY29udGVudFwiIFtuZ1N0eWxlXT1cImNvbmZpZy5jb250ZW50U3R5bGVcIj5cbiAgICAgICAgICAgICAgICAgICAgPG5nLXRlbXBsYXRlIHBEeW5hbWljRGlhbG9nQ29udGVudCAqbmdJZj1cIiFjb250ZW50VGVtcGxhdGVcIj48L25nLXRlbXBsYXRlPlxuICAgICAgICAgICAgICAgICAgICA8bmctY29udGFpbmVyICpuZ0NvbXBvbmVudE91dGxldD1cImNvbnRlbnRUZW1wbGF0ZVwiPjwvbmctY29udGFpbmVyPlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgI2Zvb3RlciBjbGFzcz1cInAtZGlhbG9nLWZvb3RlclwiICpuZ0lmPVwiY29uZmlnLmZvb3RlciB8fCBmb290ZXJUZW1wbGF0ZVwiPlxuICAgICAgICAgICAgICAgICAgICA8bmctY29udGFpbmVyICpuZ0lmPVwiIWZvb3RlclRlbXBsYXRlXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICB7eyBjb25maWcuZm9vdGVyIH19XG4gICAgICAgICAgICAgICAgICAgIDwvbmctY29udGFpbmVyPlxuICAgICAgICAgICAgICAgICAgICA8bmctY29udGFpbmVyICpuZ0NvbXBvbmVudE91dGxldD1cImZvb3RlclRlbXBsYXRlXCI+PC9uZy1jb250YWluZXI+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgPC9kaXY+XG4gICAgYCxcbiAgICBhbmltYXRpb25zOiBbdHJpZ2dlcignYW5pbWF0aW9uJywgW3RyYW5zaXRpb24oJ3ZvaWQgPT4gdmlzaWJsZScsIFt1c2VBbmltYXRpb24oc2hvd0FuaW1hdGlvbildKSwgdHJhbnNpdGlvbigndmlzaWJsZSA9PiB2b2lkJywgW3VzZUFuaW1hdGlvbihoaWRlQW5pbWF0aW9uKV0pXSldLFxuICAgIGNoYW5nZURldGVjdGlvbjogQ2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Zy5taW5YID8gdGhpcy5jb25maWcubWluWCA6IDA7XG4gICAgfVxuXG4gICAgZ2V0IG1pblkoKTogbnVtYmVyIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuY29uZmlnLm1pblkgPyB0aGlzLmNvbmZpZy5taW5ZIDogMDtcbiAgICB9XG5cbiAgICBnZXQga2VlcEluVmlld3BvcnQoKTogYm9vbGVhbiB7XG4gICAgICAgIHJldHVybiB0aGlzLmNvbmZpZy5rZWVwSW5WaWV3cG9ydCE7XG4gICAgfVxuXG4gICAgZ2V0IG1heGltaXphYmxlKCk6IGJvb2xlYW4ge1xuICAgICAgICByZXR1cm4gdGhpcy5jb25maWcubWF4aW1pemFibGUhO1xuICAgIH1cblxuICAgIGdldCBtYXhpbWl6ZUljb24oKTogc3RyaW5nIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuY29uZmlnLm1heGltaXplSWNvbiE7XG4gICAgfVxuXG4gICAgZ2V0IG1pbmltaXplSWNvbigpOiBzdHJpbmcge1xuICAgICAgICByZXR1cm4gdGhpcy5jb25maWcubWluaW1pemVJY29uITtcbiAgICB9XG5cbiAgICBnZXQgc3R5bGUoKTogYW55IHtcbiAgICAgICAgcmV0dXJuIHRoaXMuX3N0eWxlO1xuICAgIH1cblxuICAgIGdldCBwb3NpdGlvbigpOiBzdHJpbmcge1xuICAgICAgICByZXR1cm4gdGhpcy5jb25maWcucG9zaXRpb24hO1xuICAgIH1cblxuICAgIGdldCBjbG9zZUFyaWFMYWJlbCgpOiBzdHJpbmcge1xuICAgICAgICByZXR1cm4gdGhpcy5wcmltZU5HQ29uZmlnLmdldFRyYW5zbGF0aW9uKFRyYW5zbGF0aW9uS2V5cy5BUklBKVsnY2xvc2UnXTtcbiAgICB9XG5cbiAgICBzZXQgc3R5bGUodmFsdWU6IGFueSkge1xuICAgICAgICBpZiAodmFsdWUpIHtcbiAgICAgICAgICAgIHRoaXMuX3N0eWxlID0geyAuLi52YWx1ZSB9O1xuICAgICAgICAgICAgdGh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lhbG9nUmVmLFxuICAgICAgICBwdWJsaWMgem9uZTogTmdab25lLFxuICAgICAgICBwdWJsaWMgcHJpbWVOR0NvbmZpZzogUHJpbWVOR0NvbmZpZyxcbiAgICAgICAgQFNraXBTZWxmKCkgQE9wdGlvbmFsKCkgcHJpdmF0ZSBwYXJlbnREaWFsb2c6IER5bmFtaWNEaWFsb2dDb21wb25lbnRcbiAgICApIHt9XG5cbiAgICBuZ09uSW5pdCgpIHtcbiAgICAgICAgaWYgKHRoaXMuYnJlYWtwb2ludHMpIHtcbiAgICAgICAgICAgIHRoaXMuY3JlYXRlU3R5bGUoKTtcbiAgICAgICAgfVxuICAgIH1cbiAgICBjcmVhdGVTdHlsZSgpIHtcbiAgICAgICAgaWYgKGlzUGxhdGZvcm1Ccm93c2VyKHRoaXMucGxhdGZvcm1JZCkpIHtcbiAgICAgICAgICAgIGlmICghdGhpcy5zdHlsZUVsZW1lbnQpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnN0eWxlRWxlbWVudCA9IHRoaXMucmVuZGVyZXIuY3JlYXRlRWxlbWVudCgnc3R5bGUnKTtcbiAgICAgICAgICAgICAgICB0aGlzLnN0eWxlRWxlbWVudC50eXBlID0gJ3RleHQvY3NzJztcbiAgICAgICAgICAgICAgICB0aGlzLnJlbmRlcmVyLmFwcGVuZENoaWxkKHRoaXMuZG9jdW1lbnQuaGVhZCwgdGhpcy5zdHlsZUVsZW1lbnQpO1xuICAgICAgICAgICAgICAgIGxldCBpbm5lckhUTUwgPSAnJztcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBicmVha3BvaW50IGluIHRoaXMuYnJlYWtwb2ludHMpIHtcbiAgICAgICAgICAgICAgICAgICAgaW5uZXJIVE1MICs9IGBcbiAgICAgICAgICAgICAgICAgICAgICAgIEBtZWRpYSBzY3JlZW4gYW5kIChtYXgtd2lkdGg6ICR7YnJlYWtwb2ludH0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAucC1kaWFsb2dbJHt0aGlzLmlkfV06bm90KC5wLWRpYWxvZy1tYXhpbWl6ZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6ICR7dGhpcy5icmVha3BvaW50c1ticmVha3BvaW50XX0gIWltcG9ydGFudDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGA7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGhpcy5yZW5kZXJlci5zZXRQcm9wZXJ0eSh0aGlzLnN0eWxlRWxlbWVudCwgJ2lubmVySFRNTCcsIGlubmVySFRNTCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgZGVzdHJveVN0eWxlKCkge1xuICAgICAgICBpZiAodGhpcy5zdHlsZUVsZW1lbnQpIHtcbiAgICAgICAgICAgIHRoaXMucmVuZGVyZXIucmVtb3ZlQ2hpbGQodGhpcy5kb2N1bWVudC5oZWFkLCB0aGlzLnN0eWxlRWxlbWVudCk7XG4gICAgICAgICAgICB0aGlzLnN0eWxlRWxlbWVudCA9IG51bGw7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBuZ0FmdGVyVmlld0luaXQoKSB7XG4gICAgICAgIHRoaXMubG9hZENoaWxkQ29tcG9uZW50KHRoaXMuY2hpbGRDb21wb25lbnRUeXBlISk7XG4gICAgICAgIHRoaXMuYXJpYUxhYmVsbGVkQnkgPSB0aGlzLmdldEFyaWFMYWJlbGxlZEJ5KCk7XG4gICAgICAgIHRoaXMuY2QuZGV0ZWN0Q2hhbmdlcygpO1xuICAgIH1cblxuICAgIGdldEFyaWFMYWJlbGxlZEJ5KCkge1xuICAgICAgICByZXR1cm4gdGhpcy5oZWFkZXIgIT09IG51bGwgPyBVbmlxdWVDb21wb25lbnRJZCgpICsgJ19oZWFkZXInIDogbnVsbDtcbiAgICB9XG5cbiAgICBsb2FkQ2hpbGRDb21wb25lbnQoY29tcG9uZW50VHlwZTogVHlwZTxhbnk+KSB7XG4gICAgICAgIGxldCB2aWV3Q29udGFpbmVyUmVmID0gdGhpcy5pbnNlcnRpb25Qb2ludD8udmlld0NvbnRhaW5lclJlZjtcbiAgICAgICAgdmlld0NvbnRhaW5lclJlZj8uY2xlYXIoKTtcblxuICAgICAgICB0aGlzLmNvbXBvbmVudFJlZiA9IHZpZXdDb250YWluZXJSZWY/LmNyZWF0ZUNvbXBvbmVudChjb21wb25lbnRUeXBlKTtcbiAgICAgICAgdGhpcy5kaWFsb2dSZWYub25DaGlsZENvbXBvbmVudExvYWRlZC5uZXh0KHRoaXMuY29tcG9uZW50UmVmIS5pbnN0YW5jZSk7XG4gICAgfVxuXG4gICAgbW92ZU9uVG9wKCkge1xuICAgICAgICBpZiAodGhpcy5jb25maWcuYXV0b1pJbmRleCAhPT0gZmFsc2UpIHtcbiAgICAgICAgICAgIFpJbmRleFV0aWxzLnNldCgnbW9kYWwnLCB0aGlzLmNvbnRhaW5lciwgKHRoaXMuY29uZmlnLmJhc2VaSW5kZXggfHwgMCkgKyB0aGlzLnByaW1lTkdDb25maWcuekluZGV4Lm1vZGFsKTtcbiAgICAgICAgICAgICh0aGlzLndyYXBwZXIgYXMgSFRNTEVsZW1lbnQpLnN0eWxlLnpJbmRleCA9IFN0cmluZyhwYXJzZUludCgodGhpcy5jb250YWluZXIgYXMgSFRNTERpdkVsZW1lbnQpLnN0eWxlLnpJbmRleCwgMTApIC0gMSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBvbkFuaW1hdGlvblN0YXJ0KGV2ZW50OiBBbmltYXRpb25FdmVudCkge1xuICAgICAgICBzd2l0Y2ggKGV2ZW50LnRvU3RhdGUpIHtcbiAgICAgICAgICAgIGNhc2UgJ3Zpc2libGUnOlxuICAgICAgICAgICAgICAgIHRoaXMuY29udGFpbmVyID0gZXZlbnQuZWxlbWVudDtcbiAgICAgICAgICAgICAgICB0aGlzLndyYXBwZXIgPSAodGhpcy5jb250YWluZXIgYXMgSFRNTERpdkVsZW1lbnQpLnBhcmVudEVsZW1lbnQ7XG4gICAgICAgICAgICAgICAgdGhpcy5tb3ZlT25Ub3AoKTtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5wYXJlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy51bmJpbmRHbG9iYWxMaXN0ZW5lcnMoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhpcy5iaW5kR2xvYmFsTGlzdGVuZXJzKCk7XG4gICAgICAgICAgICAgICAgdGhpcy5jb250YWluZXI/LnNldEF0dHJpYnV0ZSh0aGlzLmlkLCAnJyk7XG5cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5jb25maWcubW9kYWwgIT09IGZhbHNlKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZW5hYmxlTW9kYWxpdHkoKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5jb25maWcuZm9jdXNPblNob3cgIT09IGZhbHNlKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZm9jdXMoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ3ZvaWQnOlxuICAgICAgICAgICAgICAgIGlmICh0aGlzLndyYXBwZXIgJiYgdGhpcy5jb25maWcubW9kYWwgIT09IGZhbHNlKSB7XG4gICAgICAgICAgICAgICAgICAgIERvbUhhbmRsZXIuYWRkQ2xhc3ModGhpcy53cmFwcGVyLCAncC1jb21wb25lbnQtb3ZlcmxheS1sZWF2ZScpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG9uQW5pbWF0aW9uRW5kKGV2ZW50OiBBbmltYXRpb25FdmVudCkge1xuICAgICAgICBpZiAoZXZlbnQudG9TdGF0ZSA9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XMucmVuZGVyZXIubGlzdGVuKHRoaXMud3JhcHBlciwgJ21vdXNlZG93bicsIChldmVudDogYW55KSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMud3JhcHBlciAmJiB0aGlzLndyYXBwZXIuaXNTYW1lTm9kZShldmVudC50YXJnZXQpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaGlkZSgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRoaXMuY29uZmlnLm1vZGFsICE9PSBmYWxzZSkge1xuICAgICAgICAgICAgRG9tSGFuZGxlci5hZGRDbGFzcyh0aGlzLmRvY3VtZW50LmJvZHksICdwLW92ZXJmbG93LWhpZGRlbicpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgZGlzYWJsZU1vZGFsaXR5KCkge1xuICAgICAgICBpZiAodGhpcy53cmFwcGVyKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5jb25maWcuZGlzbWlzc2FibGVNYXNrKSB7XG4gICAgICAgICAgICAgICAgdGhpcy51bmJpbmRNYXNrQ2xpY2tMaXN0ZW5lcigpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodGhpcy5jb25maWcubW9kYWwgIT09IGZhbHNlKSB7XG4gICAgICAgICAgICAgICAgRG9tSGFuZGxlci5yZW1vdmVDbGFzcyh0aGlzLmRvY3VtZW50LmJvZHksICdwLW92ZXJmbG93LWhpZGRlbicpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoISh0aGlzLmNkIGFzIFZpZXdSZWYpLmRlc3Ryb3llZCkge1xuICAgICAgICAgICAgICAgIHRoaXMuY2QuZGV0ZWN0Q2hhbmdlcygpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgZm9jdXMoZm9jdXNQYXJlbnRFbGVtZW50ID0gdGhpcy5jb250ZW50Vmlld0NoaWxkLm5hdG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ZW1lbnQpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgbWF4aW1pemUoKSB7XG4gICAgICAgIHRoaXMubWF4aW1pemVkID0gIXRoaXMubWF4aW1pemVkO1xuXG4gICAgICAgIGlmICh0aGlzLm1heGltaXplZCkge1xuICAgICAgICAgICAgRG9tSGFuZGxlci5hZGRDbGFzcyh0aGlzLmRvY3VtZW50LmJvZHksICdwLW92ZXJmbG93LWhpZGRlbicpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgRG9tSGFuZGxlci5yZW1vdmVDbGFzcyh0aGlzLmRvY3VtZW50LmJvZHksICdwLW92ZXJmbG93LWhpZGRlbicpO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5kaWFsb2dSZWYubWF4aW1pemUoeyBtYXhpbWl6ZWQ6IHRoaXMubWF4aW1pemVkIH0pO1xuICAgIH1cblxuICAgIGluaXRSZXNpemUoZXZlbnQ6IE1vdXNlRXZlbnQpIHtcbiAgICAgICAgaWYgKHRoaXMuY29uZmlnLnJlc2l6YWJsZSkge1xuICAgICAgICAgICAgaWYgKCF0aGlzLmRvY3VtZW50UmVzaXplTGlzdGVuZXIpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmJpbmREb2N1bWVudFJlc2l6ZUxpc3RlbmVycygpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0aGlzLnJlc2l6aW5nID0gdHJ1ZTtcbiAgICAgICAgICAgIHRoaXMubGFzdFBhZ2VYID0gZXZlbnQucGFnZVg7XG4gICAgICAgICAgICB0aGlzLmxhc3RQYWdlWSA9IGV2ZW50LnBhZ2VZO1xuICAgICAgICAgICAgRG9tSGFuZGxlci5hZGRDbGFzcyh0aGlzLmRvY3VtZW50LmJvZHksICdwLXVuc2VsZWN0YWJsZS10ZXh0Jyk7XG4gICAgICAgICAgICB0aGlzLmRpYWxvZ1JlZi5yZXNpemVJbml0KGV2ZW50KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG9u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3MgPSBvZmZzZXQudG9wICsgZGVsdGFZO1xuICAgICAgICAgICAgbGV0IHZpZXdwb3J0ID0gRG9tSGFuZGxlci5nZXRWaWV3cG9ydCgpO1xuXG4gICAgICAgICAgICAodGhpcy5jb250YWluZXIgYXMgSFRNTERpdkVsZW1lbnQpLnN0eWxlLnBvc2l0aW9uID0gJ2ZpeGVkJztcblxuICAgICAgICAgICAgaWYgKHRoaXMua2VlcEluVmlld3BvcnQpIHtcbiAgICAgICAgICAgICAgICBpZiAobGVmdFBvcyA+PSB0aGlzLm1pblggJiYgbGVmdFBvcyArIGNvbnRhaW5lcldpZHRoIDwgdmlld3BvcnQud2lkdGgpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fc3R5bGUubGVmdCA9IGxlZnRQb3MgKyAncHgnO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmxhc3RQYWdlWCA9IGV2ZW50LnBhZ2VYO1xuICAgICAgICAgICAgICAgICAgICAodGhpcy5jb250YWluZXIgYXMgSFRNTERpdkVsZW1lbnQpLnN0eWxlLmxlZnQgPSBsZWZ0UG9zICsgJ3B4JztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAodG9wUG9zID49IHRoaXMubWluWSAmJiB0b3BQb3MgKyBjb250YWluZXJIZWlnaHQgPCB2aWV3cG9ydC5oZWlnaHQpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fc3R5bGUudG9wID0gdG9wUG9zICsgJ3B4JztcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5sYXN0UGFnZVkgPSBldmVudC5wYWdlWTtcbiAgICAgICAgICAgICAgICAgICAgKHRoaXMuY29udGFpbmVyIGFzIEhUTUxEaXZFbGVtZW50KS5zdHlsZS50b3AgPSB0b3BQb3MgKyAncHgnO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5sYXN0UGFnZVggPSBldmVudC5wY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W5kZXJlci5saXN0ZW4oZG9jdW1lbnRUYXJnZXQsICdrZXlkb3duJywgKGV2ZW50KSA9PiB7XG4gICAgICAgICAgICBpZiAoZXZlbnQud2hpY2ggPT0gMjcpIHtcbiAgICAgICAgICAgICAgICBpZiAocGFyc2VJbnQoKHRoaXMuY29udGFpbmVyIGFzIEhUTUxEaXZFbGVtZW50KS5zdHlsZS56SW5kZXgpID09IFpJbmRleFV0aWxzLmdldEN1cnJlbnQoKSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmhpZGUoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIHVuYmluZERvY3VtZW50RXNjYXBlTGlzdGVuZXIoKSB7XG4gICAgICAgIGlmICh0aGlzLmRvY3VtZW50RXNjYXBlTGlzdGVuZXIpIHtcbiAgICAgICAgICAgIHRoaXMuZG9jdW1lbnRFc2NhcGVMaXN0ZW5lcigpO1xuICAgICAgICAgICAgdGhpcy5kb2N1bWVudEVzY2FwZUxpc3RlbmVyID0gbnVsbDtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHVuYmluZE1hc2tDbGlja0xpc3RlbmVyKCkge1xuICAgICAgICBpZiAodGhpcy5tYXNrQ2xpY2tMaXN0ZW5lcikge1xuICAgICAgICAgICAgdGhpcy5tYXNrQ2xpY2tMaXN0ZW5lcigpO1xuICAgICAgICAgICAgdGhpcy5tYXNrQ2xpY2tMaXN0ZW5lciA9IG51bGw7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBuZ09uRGVzdHJveSgpIHtcbiAgICAgICAgdGhpcy5vbkNvbnRhaW5lckRlc3Ryb3koKTtcblxuICAgICAgICBpZiAodGhpcy5jb21wb25lbnRSZWYpIHtcbiAgICAgICAgICAgIHRoaXMuY29tcG9uZW50UmVmLmRlc3Ryb3koKTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLmRlc3Ryb3lTdHlsZSgpO1xuICAgIH1cbn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