1313 lines
170 KiB
JavaScript
1313 lines
170 KiB
JavaScript
import { animate, style, transition, trigger } from '@angular/animations';
|
|
import { CommonModule, DOCUMENT, isPlatformBrowser } from '@angular/common';
|
|
import { ChangeDetectionStrategy, Component, ContentChildren, EventEmitter, Inject, Input, NgModule, Output, PLATFORM_ID, ViewChild, ViewEncapsulation, booleanAttribute, effect, forwardRef, numberAttribute, signal } from '@angular/core';
|
|
import { RouterModule } from '@angular/router';
|
|
import { PrimeTemplate, SharedModule } from 'primeng/api';
|
|
import { DomHandler } from 'primeng/dom';
|
|
import { AngleRightIcon } from 'primeng/icons/angleright';
|
|
import { RippleModule } from 'primeng/ripple';
|
|
import { TooltipModule } from 'primeng/tooltip';
|
|
import { ObjectUtils, UniqueComponentId, ZIndexUtils } from 'primeng/utils';
|
|
import * as i0 from "@angular/core";
|
|
import * as i1 from "@angular/common";
|
|
import * as i2 from "@angular/router";
|
|
import * as i3 from "primeng/ripple";
|
|
import * as i4 from "primeng/tooltip";
|
|
import * as i5 from "primeng/api";
|
|
export class ContextMenuSub {
|
|
document;
|
|
el;
|
|
renderer;
|
|
cd;
|
|
contextMenu;
|
|
ref;
|
|
visible = false;
|
|
items;
|
|
itemTemplate;
|
|
root = false;
|
|
autoZIndex = true;
|
|
baseZIndex = 0;
|
|
popup;
|
|
menuId;
|
|
ariaLabel;
|
|
ariaLabelledBy;
|
|
level = 0;
|
|
focusedItemId;
|
|
activeItemPath;
|
|
tabindex = 0;
|
|
itemClick = new EventEmitter();
|
|
itemMouseEnter = new EventEmitter();
|
|
menuFocus = new EventEmitter();
|
|
menuBlur = new EventEmitter();
|
|
menuKeydown = new EventEmitter();
|
|
sublistViewChild;
|
|
constructor(document, el, renderer, cd, contextMenu, ref) {
|
|
this.document = document;
|
|
this.el = el;
|
|
this.renderer = renderer;
|
|
this.cd = cd;
|
|
this.contextMenu = contextMenu;
|
|
this.ref = ref;
|
|
}
|
|
getItemProp(processedItem, name, params = null) {
|
|
return processedItem && processedItem.item ? ObjectUtils.getItemValue(processedItem.item[name], params) : undefined;
|
|
}
|
|
getItemId(processedItem) {
|
|
return processedItem.item && processedItem.item?.id ? processedItem.item.id : `${this.menuId}_${processedItem.key}`;
|
|
}
|
|
getItemKey(processedItem) {
|
|
return this.getItemId(processedItem);
|
|
}
|
|
getItemClass(processedItem) {
|
|
return {
|
|
...this.getItemProp(processedItem, 'class'),
|
|
'p-menuitem': true,
|
|
'p-highlight': this.isItemActive(processedItem),
|
|
'p-menuitem-active': this.isItemActive(processedItem),
|
|
'p-focus': this.isItemFocused(processedItem),
|
|
'p-disabled': this.isItemDisabled(processedItem)
|
|
};
|
|
}
|
|
getItemLabel(processedItem) {
|
|
return this.getItemProp(processedItem, 'label');
|
|
}
|
|
getSeparatorItemClass(processedItem) {
|
|
return {
|
|
...this.getItemProp(processedItem, 'class'),
|
|
'p-menuitem-separator': true
|
|
};
|
|
}
|
|
getAriaSetSize() {
|
|
return this.items.filter((processedItem) => this.isItemVisible(processedItem) && !this.getItemProp(processedItem, 'separator')).length;
|
|
}
|
|
getAriaPosInset(index) {
|
|
return index - this.items.slice(0, index).filter((processedItem) => this.isItemVisible(processedItem) && this.getItemProp(processedItem, 'separator')).length + 1;
|
|
}
|
|
isItemVisible(processedItem) {
|
|
return this.getItemProp(processedItem, 'visible') !== false;
|
|
}
|
|
isItemActive(processedItem) {
|
|
if (this.activeItemPath) {
|
|
return this.activeItemPath.some((path) => path.key === processedItem.key);
|
|
}
|
|
}
|
|
isItemDisabled(processedItem) {
|
|
return this.getItemProp(processedItem, 'disabled');
|
|
}
|
|
isItemFocused(processedItem) {
|
|
return this.focusedItemId === this.getItemId(processedItem);
|
|
}
|
|
isItemGroup(processedItem) {
|
|
return ObjectUtils.isNotEmpty(processedItem.items);
|
|
}
|
|
onItemMouseEnter(param) {
|
|
const { event, processedItem } = param;
|
|
this.itemMouseEnter.emit({ originalEvent: event, processedItem });
|
|
}
|
|
onItemClick(event, processedItem) {
|
|
this.getItemProp(processedItem, 'command', { originalEvent: event, item: processedItem.item });
|
|
this.itemClick.emit({ originalEvent: event, processedItem, isFocus: true });
|
|
}
|
|
onEnter(event, sublist) {
|
|
if (event.fromState === 'void' && event.toState) {
|
|
const sublist = event.element;
|
|
this.position(sublist);
|
|
}
|
|
}
|
|
position(sublist) {
|
|
const parentItem = sublist.parentElement.parentElement;
|
|
const containerOffset = DomHandler.getOffset(sublist.parentElement.parentElement);
|
|
const viewport = DomHandler.getViewport();
|
|
const sublistWidth = sublist.offsetParent ? sublist.offsetWidth : DomHandler.getHiddenElementOuterWidth(sublist);
|
|
const itemOuterWidth = DomHandler.getOuterWidth(parentItem.children[0]);
|
|
sublist.style.top = '0px';
|
|
if (parseInt(containerOffset.left, 10) + itemOuterWidth + sublistWidth > viewport.width - DomHandler.calculateScrollbarWidth()) {
|
|
sublist.style.left = -1 * sublistWidth + 'px';
|
|
}
|
|
else {
|
|
sublist.style.left = itemOuterWidth + 'px';
|
|
}
|
|
}
|
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ContextMenuSub, deps: [{ token: DOCUMENT }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: forwardRef(() => ContextMenu) }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.7", type: ContextMenuSub, selector: "p-contextMenuSub", inputs: { visible: ["visible", "visible", booleanAttribute], items: "items", itemTemplate: "itemTemplate", root: ["root", "root", booleanAttribute], autoZIndex: ["autoZIndex", "autoZIndex", booleanAttribute], baseZIndex: ["baseZIndex", "baseZIndex", numberAttribute], popup: ["popup", "popup", booleanAttribute], menuId: "menuId", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", level: ["level", "level", numberAttribute], focusedItemId: "focusedItemId", activeItemPath: "activeItemPath", tabindex: ["tabindex", "tabindex", numberAttribute] }, outputs: { itemClick: "itemClick", itemMouseEnter: "itemMouseEnter", menuFocus: "menuFocus", menuBlur: "menuBlur", menuKeydown: "menuKeydown" }, host: { classAttribute: "p-element" }, viewQueries: [{ propertyName: "sublistViewChild", first: true, predicate: ["sublist"], descendants: true }], ngImport: i0, template: `
|
|
<ul
|
|
*ngIf="root ? true : visible"
|
|
#sublist
|
|
role="menu"
|
|
[ngClass]="{ 'p-submenu-list': !root, 'p-contextmenu-root-list': root }"
|
|
[@overlayAnimation]="visible"
|
|
(@overlayAnimation.start)="onEnter($event, sublist)"
|
|
[attr.id]="menuId + '_list'"
|
|
[tabindex]="tabindex"
|
|
[attr.aria-label]="ariaLabel"
|
|
[attr.aria-labelledBy]="ariaLabelledBy"
|
|
[attr.aria-activedescendant]="focusedItemId"
|
|
[attr.aria-orientation]="'vertical'"
|
|
[attr.data-pc-section]="'menu'"
|
|
(keydown)="menuKeydown.emit($event)"
|
|
(focus)="menuFocus.emit($event)"
|
|
(blur)="menuBlur.emit($event)"
|
|
>
|
|
<ng-template ngFor let-processedItem [ngForOf]="items" let-index="index">
|
|
<li
|
|
*ngIf="isItemVisible(processedItem) && getItemProp(processedItem, 'separator')"
|
|
[attr.id]="getItemId(processedItem)"
|
|
[style]="getItemProp(processedItem, 'style')"
|
|
[ngClass]="getSeparatorItemClass(processedItem)"
|
|
role="separator"
|
|
[attr.data-pc-section]="'separator'"
|
|
></li>
|
|
<li
|
|
#listItem
|
|
*ngIf="isItemVisible(processedItem) && !getItemProp(processedItem, 'separator')"
|
|
role="menuitem"
|
|
[attr.id]="getItemId(processedItem)"
|
|
[attr.data-pc-section]="'menuitem'"
|
|
[attr.data-p-highlight]="isItemActive(processedItem)"
|
|
[attr.data-p-focused]="isItemFocused(processedItem)"
|
|
[attr.data-p-disabled]="isItemDisabled(processedItem)"
|
|
[attr.aria-label]="getItemLabel(processedItem)"
|
|
[attr.aria-disabled]="isItemDisabled(processedItem) || undefined"
|
|
[attr.aria-haspopup]="isItemGroup(processedItem) && !getItemProp(processedItem, 'to') ? 'menu' : undefined"
|
|
[attr.aria-expanded]="isItemGroup(processedItem) ? isItemActive(processedItem) : undefined"
|
|
[attr.aria-level]="level + 1"
|
|
[attr.aria-setsize]="getAriaSetSize()"
|
|
[attr.aria-posinset]="getAriaPosInset(index)"
|
|
[ngStyle]="getItemProp(processedItem, 'style')"
|
|
[ngClass]="getItemClass(processedItem)"
|
|
[class]="getItemProp(processedItem, 'styleClass')"
|
|
pTooltip
|
|
[tooltipOptions]="getItemProp(processedItem, 'tooltipOptions')"
|
|
>
|
|
<div [attr.data-pc-section]="'content'" class="p-menuitem-content" (click)="onItemClick($event, processedItem)" (mouseenter)="onItemMouseEnter({$event, processedItem})">
|
|
<ng-container *ngIf="!itemTemplate">
|
|
<a
|
|
*ngIf="!getItemProp(processedItem, 'routerLink')"
|
|
[attr.href]="getItemProp(processedItem, 'url')"
|
|
[attr.aria-hidden]="true"
|
|
[attr.data-automationid]="getItemProp(processedItem, 'automationId')"
|
|
[attr.data-pc-section]="'action'"
|
|
[target]="getItemProp(processedItem, 'target')"
|
|
[ngClass]="{ 'p-menuitem-link': true }"
|
|
[attr.tabindex]="-1"
|
|
pRipple
|
|
>
|
|
<span
|
|
*ngIf="getItemProp(processedItem, 'icon')"
|
|
class="p-menuitem-icon"
|
|
[ngClass]="getItemProp(processedItem, 'icon')"
|
|
[ngStyle]="getItemProp(processedItem, 'iconStyle')"
|
|
[attr.data-pc-section]="'icon'"
|
|
[attr.aria-hidden]="true"
|
|
[attr.tabindex]="-1"
|
|
>
|
|
</span>
|
|
<span *ngIf="getItemProp(processedItem, 'escape'); else htmlLabel" class="p-menuitem-text" [attr.data-pc-section]="'label'">
|
|
{{ getItemLabel(processedItem) }}
|
|
</span>
|
|
<ng-template #htmlLabel>
|
|
<span class="p-menuitem-text" [innerHTML]="getItemLabel(processedItem)" [attr.data-pc-section]="'label'"></span>
|
|
</ng-template>
|
|
<span class="p-menuitem-badge" *ngIf="getItemProp(processedItem, 'badge')" [ngClass]="getItemProp(processedItem, 'badgeStyleClass')">{{ getItemProp(processedItem, 'badge') }}</span>
|
|
|
|
<ng-container *ngIf="isItemGroup(processedItem)">
|
|
<AngleRightIcon *ngIf="!contextMenu.submenuIconTemplate" [styleClass]="'p-submenu-icon'" [attr.data-pc-section]="'submenuicon'" [attr.aria-hidden]="true" />
|
|
<ng-template *ngTemplateOutlet="contextMenu.submenuIconTemplate" [attr.data-pc-section]="'submenuicon'" [attr.aria-hidden]="true"></ng-template>
|
|
</ng-container>
|
|
</a>
|
|
<a
|
|
*ngIf="getItemProp(processedItem, 'routerLink')"
|
|
[routerLink]="getItemProp(processedItem, 'routerLink')"
|
|
[attr.data-automationid]="getItemProp(processedItem, 'automationId')"
|
|
[attr.tabindex]="-1"
|
|
[attr.aria-hidden]="true"
|
|
[attr.data-pc-section]="'action'"
|
|
[queryParams]="getItemProp(processedItem, 'queryParams')"
|
|
[routerLinkActive]="'p-menuitem-link-active'"
|
|
[routerLinkActiveOptions]="getItemProp(processedItem, 'routerLinkActiveOptions') || { exact: false }"
|
|
[target]="getItemProp(processedItem, 'target')"
|
|
[ngClass]="{ 'p-menuitem-link': true, 'p-disabled': getItemProp(processedItem, 'disabled') }"
|
|
[fragment]="getItemProp(processedItem, 'fragment')"
|
|
[queryParamsHandling]="getItemProp(processedItem, 'queryParamsHandling')"
|
|
[preserveFragment]="getItemProp(processedItem, 'preserveFragment')"
|
|
[skipLocationChange]="getItemProp(processedItem, 'skipLocationChange')"
|
|
[replaceUrl]="getItemProp(processedItem, 'replaceUrl')"
|
|
[state]="getItemProp(processedItem, 'state')"
|
|
pRipple
|
|
>
|
|
<span
|
|
*ngIf="getItemProp(processedItem, 'icon')"
|
|
class="p-menuitem-icon"
|
|
[ngClass]="getItemProp(processedItem, 'icon')"
|
|
[ngStyle]="getItemProp(processedItem, 'iconStyle')"
|
|
[attr.data-pc-section]="'icon'"
|
|
[attr.aria-hidden]="true"
|
|
[attr.tabindex]="-1"
|
|
>
|
|
</span>
|
|
<span *ngIf="getItemProp(processedItem, 'escape'); else htmlLabel" class="p-menuitem-text" [attr.data-pc-section]="'label'">
|
|
{{ getItemLabel(processedItem) }}
|
|
</span>
|
|
<ng-template #htmlLabel>
|
|
<span class="p-menuitem-text" [innerHTML]="getItemLabel(processedItem)" [attr.data-pc-section]="'label'"></span>
|
|
</ng-template>
|
|
<span class="p-menuitem-badge" *ngIf="getItemProp(processedItem, 'badge')" [ngClass]="getItemProp(processedItem, 'badgeStyleClass')">{{ getItemProp(processedItem, 'badge') }}</span>
|
|
|
|
<ng-container *ngIf="isItemGroup(processedItem)">
|
|
<AngleRightIcon *ngIf="!contextMenu.submenuIconTemplate" [styleClass]="'p-submenu-icon'" [attr.data-pc-section]="'submenuicon'" [attr.aria-hidden]="true" />
|
|
<ng-template *ngTemplateOutlet="contextMenu.submenuIconTemplate" [attr.data-pc-section]="'submenuicon'" [attr.aria-hidden]="true"></ng-template>
|
|
</ng-container>
|
|
</a>
|
|
</ng-container>
|
|
<ng-container *ngIf="itemTemplate">
|
|
<ng-template *ngTemplateOutlet="itemTemplate; context: { $implicit: processedItem.item }"></ng-template>
|
|
</ng-container>
|
|
</div>
|
|
|
|
<p-contextMenuSub
|
|
*ngIf="isItemVisible(processedItem) && isItemGroup(processedItem)"
|
|
[items]="processedItem.items"
|
|
[itemTemplate]="itemTemplate"
|
|
[menuId]="menuId"
|
|
[visible]="isItemActive(processedItem) && isItemGroup(processedItem)"
|
|
[activeItemPath]="activeItemPath"
|
|
[focusedItemId]="focusedItemId"
|
|
[level]="level + 1"
|
|
(itemClick)="itemClick.emit($event)"
|
|
(itemMouseEnter)="onItemMouseEnter($event)"
|
|
></p-contextMenuSub>
|
|
</li>
|
|
</ng-template>
|
|
</ul>
|
|
`, isInline: true, dependencies: [{ kind: "directive", type: i0.forwardRef(() => i1.NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgForOf), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgIf), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgStyle), selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i0.forwardRef(() => i2.RouterLink), selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i0.forwardRef(() => i2.RouterLinkActive), selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: i0.forwardRef(() => i3.Ripple), selector: "[pRipple]" }, { kind: "directive", type: i0.forwardRef(() => i4.Tooltip), selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: i0.forwardRef(() => AngleRightIcon), selector: "AngleRightIcon" }, { kind: "component", type: i0.forwardRef(() => ContextMenuSub), selector: "p-contextMenuSub", inputs: ["visible", "items", "itemTemplate", "root", "autoZIndex", "baseZIndex", "popup", "menuId", "ariaLabel", "ariaLabelledBy", "level", "focusedItemId", "activeItemPath", "tabindex"], outputs: ["itemClick", "itemMouseEnter", "menuFocus", "menuBlur", "menuKeydown"] }], animations: [trigger('overlayAnimation', [transition(':enter', [style({ opacity: 0 })]), transition(':leave', [style({ opacity: 0 })])])], encapsulation: i0.ViewEncapsulation.None });
|
|
}
|
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ContextMenuSub, decorators: [{
|
|
type: Component,
|
|
args: [{
|
|
selector: 'p-contextMenuSub',
|
|
template: `
|
|
<ul
|
|
*ngIf="root ? true : visible"
|
|
#sublist
|
|
role="menu"
|
|
[ngClass]="{ 'p-submenu-list': !root, 'p-contextmenu-root-list': root }"
|
|
[@overlayAnimation]="visible"
|
|
(@overlayAnimation.start)="onEnter($event, sublist)"
|
|
[attr.id]="menuId + '_list'"
|
|
[tabindex]="tabindex"
|
|
[attr.aria-label]="ariaLabel"
|
|
[attr.aria-labelledBy]="ariaLabelledBy"
|
|
[attr.aria-activedescendant]="focusedItemId"
|
|
[attr.aria-orientation]="'vertical'"
|
|
[attr.data-pc-section]="'menu'"
|
|
(keydown)="menuKeydown.emit($event)"
|
|
(focus)="menuFocus.emit($event)"
|
|
(blur)="menuBlur.emit($event)"
|
|
>
|
|
<ng-template ngFor let-processedItem [ngForOf]="items" let-index="index">
|
|
<li
|
|
*ngIf="isItemVisible(processedItem) && getItemProp(processedItem, 'separator')"
|
|
[attr.id]="getItemId(processedItem)"
|
|
[style]="getItemProp(processedItem, 'style')"
|
|
[ngClass]="getSeparatorItemClass(processedItem)"
|
|
role="separator"
|
|
[attr.data-pc-section]="'separator'"
|
|
></li>
|
|
<li
|
|
#listItem
|
|
*ngIf="isItemVisible(processedItem) && !getItemProp(processedItem, 'separator')"
|
|
role="menuitem"
|
|
[attr.id]="getItemId(processedItem)"
|
|
[attr.data-pc-section]="'menuitem'"
|
|
[attr.data-p-highlight]="isItemActive(processedItem)"
|
|
[attr.data-p-focused]="isItemFocused(processedItem)"
|
|
[attr.data-p-disabled]="isItemDisabled(processedItem)"
|
|
[attr.aria-label]="getItemLabel(processedItem)"
|
|
[attr.aria-disabled]="isItemDisabled(processedItem) || undefined"
|
|
[attr.aria-haspopup]="isItemGroup(processedItem) && !getItemProp(processedItem, 'to') ? 'menu' : undefined"
|
|
[attr.aria-expanded]="isItemGroup(processedItem) ? isItemActive(processedItem) : undefined"
|
|
[attr.aria-level]="level + 1"
|
|
[attr.aria-setsize]="getAriaSetSize()"
|
|
[attr.aria-posinset]="getAriaPosInset(index)"
|
|
[ngStyle]="getItemProp(processedItem, 'style')"
|
|
[ngClass]="getItemClass(processedItem)"
|
|
[class]="getItemProp(processedItem, 'styleClass')"
|
|
pTooltip
|
|
[tooltipOptions]="getItemProp(processedItem, 'tooltipOptions')"
|
|
>
|
|
<div [attr.data-pc-section]="'content'" class="p-menuitem-content" (click)="onItemClick($event, processedItem)" (mouseenter)="onItemMouseEnter({$event, processedItem})">
|
|
<ng-container *ngIf="!itemTemplate">
|
|
<a
|
|
*ngIf="!getItemProp(processedItem, 'routerLink')"
|
|
[attr.href]="getItemProp(processedItem, 'url')"
|
|
[attr.aria-hidden]="true"
|
|
[attr.data-automationid]="getItemProp(processedItem, 'automationId')"
|
|
[attr.data-pc-section]="'action'"
|
|
[target]="getItemProp(processedItem, 'target')"
|
|
[ngClass]="{ 'p-menuitem-link': true }"
|
|
[attr.tabindex]="-1"
|
|
pRipple
|
|
>
|
|
<span
|
|
*ngIf="getItemProp(processedItem, 'icon')"
|
|
class="p-menuitem-icon"
|
|
[ngClass]="getItemProp(processedItem, 'icon')"
|
|
[ngStyle]="getItemProp(processedItem, 'iconStyle')"
|
|
[attr.data-pc-section]="'icon'"
|
|
[attr.aria-hidden]="true"
|
|
[attr.tabindex]="-1"
|
|
>
|
|
</span>
|
|
<span *ngIf="getItemProp(processedItem, 'escape'); else htmlLabel" class="p-menuitem-text" [attr.data-pc-section]="'label'">
|
|
{{ getItemLabel(processedItem) }}
|
|
</span>
|
|
<ng-template #htmlLabel>
|
|
<span class="p-menuitem-text" [innerHTML]="getItemLabel(processedItem)" [attr.data-pc-section]="'label'"></span>
|
|
</ng-template>
|
|
<span class="p-menuitem-badge" *ngIf="getItemProp(processedItem, 'badge')" [ngClass]="getItemProp(processedItem, 'badgeStyleClass')">{{ getItemProp(processedItem, 'badge') }}</span>
|
|
|
|
<ng-container *ngIf="isItemGroup(processedItem)">
|
|
<AngleRightIcon *ngIf="!contextMenu.submenuIconTemplate" [styleClass]="'p-submenu-icon'" [attr.data-pc-section]="'submenuicon'" [attr.aria-hidden]="true" />
|
|
<ng-template *ngTemplateOutlet="contextMenu.submenuIconTemplate" [attr.data-pc-section]="'submenuicon'" [attr.aria-hidden]="true"></ng-template>
|
|
</ng-container>
|
|
</a>
|
|
<a
|
|
*ngIf="getItemProp(processedItem, 'routerLink')"
|
|
[routerLink]="getItemProp(processedItem, 'routerLink')"
|
|
[attr.data-automationid]="getItemProp(processedItem, 'automationId')"
|
|
[attr.tabindex]="-1"
|
|
[attr.aria-hidden]="true"
|
|
[attr.data-pc-section]="'action'"
|
|
[queryParams]="getItemProp(processedItem, 'queryParams')"
|
|
[routerLinkActive]="'p-menuitem-link-active'"
|
|
[routerLinkActiveOptions]="getItemProp(processedItem, 'routerLinkActiveOptions') || { exact: false }"
|
|
[target]="getItemProp(processedItem, 'target')"
|
|
[ngClass]="{ 'p-menuitem-link': true, 'p-disabled': getItemProp(processedItem, 'disabled') }"
|
|
[fragment]="getItemProp(processedItem, 'fragment')"
|
|
[queryParamsHandling]="getItemProp(processedItem, 'queryParamsHandling')"
|
|
[preserveFragment]="getItemProp(processedItem, 'preserveFragment')"
|
|
[skipLocationChange]="getItemProp(processedItem, 'skipLocationChange')"
|
|
[replaceUrl]="getItemProp(processedItem, 'replaceUrl')"
|
|
[state]="getItemProp(processedItem, 'state')"
|
|
pRipple
|
|
>
|
|
<span
|
|
*ngIf="getItemProp(processedItem, 'icon')"
|
|
class="p-menuitem-icon"
|
|
[ngClass]="getItemProp(processedItem, 'icon')"
|
|
[ngStyle]="getItemProp(processedItem, 'iconStyle')"
|
|
[attr.data-pc-section]="'icon'"
|
|
[attr.aria-hidden]="true"
|
|
[attr.tabindex]="-1"
|
|
>
|
|
</span>
|
|
<span *ngIf="getItemProp(processedItem, 'escape'); else htmlLabel" class="p-menuitem-text" [attr.data-pc-section]="'label'">
|
|
{{ getItemLabel(processedItem) }}
|
|
</span>
|
|
<ng-template #htmlLabel>
|
|
<span class="p-menuitem-text" [innerHTML]="getItemLabel(processedItem)" [attr.data-pc-section]="'label'"></span>
|
|
</ng-template>
|
|
<span class="p-menuitem-badge" *ngIf="getItemProp(processedItem, 'badge')" [ngClass]="getItemProp(processedItem, 'badgeStyleClass')">{{ getItemProp(processedItem, 'badge') }}</span>
|
|
|
|
<ng-container *ngIf="isItemGroup(processedItem)">
|
|
<AngleRightIcon *ngIf="!contextMenu.submenuIconTemplate" [styleClass]="'p-submenu-icon'" [attr.data-pc-section]="'submenuicon'" [attr.aria-hidden]="true" />
|
|
<ng-template *ngTemplateOutlet="contextMenu.submenuIconTemplate" [attr.data-pc-section]="'submenuicon'" [attr.aria-hidden]="true"></ng-template>
|
|
</ng-container>
|
|
</a>
|
|
</ng-container>
|
|
<ng-container *ngIf="itemTemplate">
|
|
<ng-template *ngTemplateOutlet="itemTemplate; context: { $implicit: processedItem.item }"></ng-template>
|
|
</ng-container>
|
|
</div>
|
|
|
|
<p-contextMenuSub
|
|
*ngIf="isItemVisible(processedItem) && isItemGroup(processedItem)"
|
|
[items]="processedItem.items"
|
|
[itemTemplate]="itemTemplate"
|
|
[menuId]="menuId"
|
|
[visible]="isItemActive(processedItem) && isItemGroup(processedItem)"
|
|
[activeItemPath]="activeItemPath"
|
|
[focusedItemId]="focusedItemId"
|
|
[level]="level + 1"
|
|
(itemClick)="itemClick.emit($event)"
|
|
(itemMouseEnter)="onItemMouseEnter($event)"
|
|
></p-contextMenuSub>
|
|
</li>
|
|
</ng-template>
|
|
</ul>
|
|
`,
|
|
animations: [trigger('overlayAnimation', [transition(':enter', [style({ opacity: 0 })]), transition(':leave', [style({ opacity: 0 })])])],
|
|
encapsulation: ViewEncapsulation.None,
|
|
host: {
|
|
class: 'p-element'
|
|
}
|
|
}]
|
|
}], ctorParameters: () => [{ type: Document, decorators: [{
|
|
type: Inject,
|
|
args: [DOCUMENT]
|
|
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: ContextMenu, decorators: [{
|
|
type: Inject,
|
|
args: [forwardRef(() => ContextMenu)]
|
|
}] }, { type: i0.ViewContainerRef }], propDecorators: { visible: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], items: [{
|
|
type: Input
|
|
}], itemTemplate: [{
|
|
type: Input
|
|
}], root: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], autoZIndex: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], baseZIndex: [{
|
|
type: Input,
|
|
args: [{ transform: numberAttribute }]
|
|
}], popup: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], menuId: [{
|
|
type: Input
|
|
}], ariaLabel: [{
|
|
type: Input
|
|
}], ariaLabelledBy: [{
|
|
type: Input
|
|
}], level: [{
|
|
type: Input,
|
|
args: [{ transform: numberAttribute }]
|
|
}], focusedItemId: [{
|
|
type: Input
|
|
}], activeItemPath: [{
|
|
type: Input
|
|
}], tabindex: [{
|
|
type: Input,
|
|
args: [{ transform: numberAttribute }]
|
|
}], itemClick: [{
|
|
type: Output
|
|
}], itemMouseEnter: [{
|
|
type: Output
|
|
}], menuFocus: [{
|
|
type: Output
|
|
}], menuBlur: [{
|
|
type: Output
|
|
}], menuKeydown: [{
|
|
type: Output
|
|
}], sublistViewChild: [{
|
|
type: ViewChild,
|
|
args: ['sublist']
|
|
}] } });
|
|
/**
|
|
* ContextMenu displays an overlay menu on right click of its target. Note that components like Table has special integration with ContextMenu.
|
|
* @group Components
|
|
*/
|
|
export class ContextMenu {
|
|
document;
|
|
platformId;
|
|
el;
|
|
renderer;
|
|
cd;
|
|
config;
|
|
overlayService;
|
|
/**
|
|
* An array of menuitems.
|
|
* @group Props
|
|
*/
|
|
set model(value) {
|
|
this._model = value;
|
|
this._processedItems = this.createProcessedItems(this._model || []);
|
|
}
|
|
get model() {
|
|
return this._model;
|
|
}
|
|
/**
|
|
* Event for which the menu must be displayed.
|
|
* @group Props
|
|
*/
|
|
triggerEvent = 'contextmenu';
|
|
/**
|
|
* Local template variable name of the element to attach the context menu.
|
|
* @group Props
|
|
*/
|
|
target;
|
|
/**
|
|
* Attaches the menu to document instead of a particular item.
|
|
* @group Props
|
|
*/
|
|
global;
|
|
/**
|
|
* Inline style of the component.
|
|
* @group Props
|
|
*/
|
|
style;
|
|
/**
|
|
* Style class of the component.
|
|
* @group Props
|
|
*/
|
|
styleClass;
|
|
/**
|
|
* Target element to attach the overlay, valid values are "body" or a local ng-template variable of another element.
|
|
* @group Props
|
|
*/
|
|
appendTo;
|
|
/**
|
|
* Whether to automatically manage layering.
|
|
* @group Props
|
|
*/
|
|
autoZIndex = true;
|
|
/**
|
|
* Base zIndex value to use in layering.
|
|
* @group Props
|
|
*/
|
|
baseZIndex = 0;
|
|
/**
|
|
* Current id state as a string.
|
|
* @group Props
|
|
*/
|
|
id;
|
|
/**
|
|
* Defines a string value that labels an interactive element.
|
|
* @group Props
|
|
*/
|
|
ariaLabel;
|
|
/**
|
|
* Identifier of the underlying input element.
|
|
* @group Props
|
|
*/
|
|
ariaLabelledBy;
|
|
/**
|
|
* Press delay in touch devices as miliseconds.
|
|
* @group Props
|
|
*/
|
|
pressDelay = 500;
|
|
/**
|
|
* Callback to invoke when overlay menu is shown.
|
|
* @group Emits
|
|
*/
|
|
onShow = new EventEmitter();
|
|
/**
|
|
* Callback to invoke when overlay menu is hidden.
|
|
* @group Emits
|
|
*/
|
|
onHide = new EventEmitter();
|
|
templates;
|
|
rootmenu;
|
|
containerViewChild;
|
|
submenuIconTemplate;
|
|
itemTemplate;
|
|
container;
|
|
outsideClickListener;
|
|
resizeListener;
|
|
triggerEventListener;
|
|
documentClickListener;
|
|
documentTriggerListener;
|
|
touchEndListener;
|
|
pageX;
|
|
pageY;
|
|
visible = signal(false);
|
|
relativeAlign;
|
|
window;
|
|
focused = false;
|
|
activeItemPath = signal([]);
|
|
focusedItemInfo = signal({ index: -1, level: 0, parentKey: '', item: null });
|
|
submenuVisible = signal(false);
|
|
searchValue = '';
|
|
searchTimeout;
|
|
_processedItems;
|
|
_model;
|
|
pressTimer;
|
|
get visibleItems() {
|
|
const processedItem = this.activeItemPath().find((p) => p.key === this.focusedItemInfo().parentKey);
|
|
return processedItem ? processedItem.items : this.processedItems;
|
|
}
|
|
get processedItems() {
|
|
if (!this._processedItems || !this._processedItems.length) {
|
|
this._processedItems = this.createProcessedItems(this.model || []);
|
|
}
|
|
return this._processedItems;
|
|
}
|
|
get focusedItemId() {
|
|
const focusedItem = this.focusedItemInfo();
|
|
return focusedItem.item && focusedItem.item?.id ? focusedItem.item.id : focusedItem.index !== -1 ? `${this.id}${ObjectUtils.isNotEmpty(focusedItem.parentKey) ? '_' + focusedItem.parentKey : ''}_${focusedItem.index}` : null;
|
|
}
|
|
constructor(document, platformId, el, renderer, cd, config, overlayService) {
|
|
this.document = document;
|
|
this.platformId = platformId;
|
|
this.el = el;
|
|
this.renderer = renderer;
|
|
this.cd = cd;
|
|
this.config = config;
|
|
this.overlayService = overlayService;
|
|
this.window = this.document.defaultView;
|
|
effect(() => {
|
|
const path = this.activeItemPath();
|
|
if (ObjectUtils.isNotEmpty(path)) {
|
|
this.bindGlobalListeners();
|
|
}
|
|
else if (!this.visible()) {
|
|
this.unbindGlobalListeners();
|
|
}
|
|
});
|
|
}
|
|
ngOnInit() {
|
|
this.id = this.id || UniqueComponentId();
|
|
this.bindTriggerEventListener();
|
|
}
|
|
isMobile() {
|
|
return DomHandler.isIOS() || DomHandler.isAndroid();
|
|
}
|
|
bindTriggerEventListener() {
|
|
if (isPlatformBrowser(this.platformId)) {
|
|
if (!this.triggerEventListener) {
|
|
if (!this.isMobile()) {
|
|
if (this.global) {
|
|
this.triggerEventListener = this.renderer.listen(this.document, this.triggerEvent, (event) => {
|
|
this.show(event);
|
|
});
|
|
}
|
|
else if (this.target) {
|
|
this.triggerEventListener = this.renderer.listen(this.target, this.triggerEvent, (event) => {
|
|
this.show(event);
|
|
});
|
|
}
|
|
}
|
|
else {
|
|
if (this.global) {
|
|
this.triggerEventListener = this.renderer.listen(this.document, 'touchstart', this.onTouchStart.bind(this));
|
|
this.touchEndListener = this.renderer.listen(this.document, 'touchend', this.onTouchEnd.bind(this));
|
|
}
|
|
else if (this.target) {
|
|
this.triggerEventListener = this.renderer.listen(this.target, 'touchstart', this.onTouchStart.bind(this));
|
|
this.touchEndListener = this.renderer.listen(this.target, 'touchend', this.onTouchEnd.bind(this));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
bindGlobalListeners() {
|
|
if (isPlatformBrowser(this.platformId)) {
|
|
if (!this.documentClickListener) {
|
|
const documentTarget = this.el ? this.el.nativeElement.ownerDocument : 'document';
|
|
this.documentClickListener = this.renderer.listen(documentTarget, 'click', (event) => {
|
|
if (this.containerViewChild.nativeElement.offsetParent && this.isOutsideClicked(event) && !event.ctrlKey && event.button !== 2 && this.triggerEvent !== 'click') {
|
|
this.hide();
|
|
}
|
|
});
|
|
this.documentTriggerListener = this.renderer.listen(documentTarget, this.triggerEvent, (event) => {
|
|
if (this.containerViewChild.nativeElement.offsetParent && this.isOutsideClicked(event)) {
|
|
this.hide();
|
|
}
|
|
});
|
|
}
|
|
if (!this.resizeListener) {
|
|
this.resizeListener = this.renderer.listen(this.document.defaultView, 'resize', (event) => {
|
|
this.hide();
|
|
});
|
|
}
|
|
}
|
|
}
|
|
ngAfterContentInit() {
|
|
this.templates?.forEach((item) => {
|
|
switch (item.getType()) {
|
|
case 'submenuicon':
|
|
this.submenuIconTemplate = item.template;
|
|
break;
|
|
case 'item':
|
|
this.itemTemplate = item.template;
|
|
break;
|
|
default:
|
|
this.itemTemplate = item.template;
|
|
break;
|
|
}
|
|
});
|
|
}
|
|
createProcessedItems(items, level = 0, parent = {}, parentKey = '') {
|
|
const processedItems = [];
|
|
items &&
|
|
items.forEach((item, index) => {
|
|
const key = (parentKey !== '' ? parentKey + '_' : '') + index;
|
|
const newItem = {
|
|
item,
|
|
index,
|
|
level,
|
|
key,
|
|
parent,
|
|
parentKey
|
|
};
|
|
newItem['items'] = this.createProcessedItems(item.items, level + 1, newItem, key);
|
|
processedItems.push(newItem);
|
|
});
|
|
return processedItems;
|
|
}
|
|
getItemProp(item, name) {
|
|
return item ? ObjectUtils.getItemValue(item[name]) : undefined;
|
|
}
|
|
getProccessedItemLabel(processedItem) {
|
|
return processedItem ? this.getItemLabel(processedItem.item) : undefined;
|
|
}
|
|
getItemLabel(item) {
|
|
return this.getItemProp(item, 'label');
|
|
}
|
|
isProcessedItemGroup(processedItem) {
|
|
return processedItem && ObjectUtils.isNotEmpty(processedItem.items);
|
|
}
|
|
isSelected(processedItem) {
|
|
return this.activeItemPath().some((p) => p.key === processedItem.key);
|
|
}
|
|
isValidSelectedItem(processedItem) {
|
|
return this.isValidItem(processedItem) && this.isSelected(processedItem);
|
|
}
|
|
isValidItem(processedItem) {
|
|
return !!processedItem && !this.isItemDisabled(processedItem.item) && !this.isItemSeparator(processedItem.item);
|
|
}
|
|
isItemDisabled(item) {
|
|
return this.getItemProp(item, 'disabled');
|
|
}
|
|
isItemSeparator(item) {
|
|
return this.getItemProp(item, 'separator');
|
|
}
|
|
isItemMatched(processedItem) {
|
|
return this.isValidItem(processedItem) && this.getProccessedItemLabel(processedItem).toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase());
|
|
}
|
|
isProccessedItemGroup(processedItem) {
|
|
return processedItem && ObjectUtils.isNotEmpty(processedItem.items);
|
|
}
|
|
onItemClick(event) {
|
|
const { processedItem } = event;
|
|
const grouped = this.isProcessedItemGroup(processedItem);
|
|
const selected = this.isSelected(processedItem);
|
|
if (selected) {
|
|
const { index, key, level, parentKey, item } = processedItem;
|
|
this.activeItemPath.set(this.activeItemPath().filter((p) => key !== p.key && key.startsWith(p.key)));
|
|
this.focusedItemInfo.set({ index, level, parentKey, item });
|
|
DomHandler.focus(this.rootmenu.sublistViewChild.nativeElement);
|
|
}
|
|
else {
|
|
grouped ? this.onItemChange(event) : this.hide();
|
|
}
|
|
}
|
|
onItemMouseEnter(event) {
|
|
this.onItemChange(event);
|
|
}
|
|
onKeyDown(event) {
|
|
const metaKey = event.metaKey || event.ctrlKey;
|
|
switch (event.code) {
|
|
case 'ArrowDown':
|
|
this.onArrowDownKey(event);
|
|
break;
|
|
case 'ArrowUp':
|
|
this.onArrowUpKey(event);
|
|
break;
|
|
case 'ArrowLeft':
|
|
this.onArrowLeftKey(event);
|
|
break;
|
|
case 'ArrowRight':
|
|
this.onArrowRightKey(event);
|
|
break;
|
|
case 'Home':
|
|
this.onHomeKey(event);
|
|
break;
|
|
case 'End':
|
|
this.onEndKey(event);
|
|
break;
|
|
case 'Space':
|
|
this.onSpaceKey(event);
|
|
break;
|
|
case 'Enter':
|
|
this.onEnterKey(event);
|
|
break;
|
|
case 'Escape':
|
|
this.onEscapeKey(event);
|
|
break;
|
|
case 'Tab':
|
|
this.onTabKey(event);
|
|
break;
|
|
case 'PageDown':
|
|
case 'PageUp':
|
|
case 'Backspace':
|
|
case 'ShiftLeft':
|
|
case 'ShiftRight':
|
|
//NOOP
|
|
break;
|
|
default:
|
|
if (!metaKey && ObjectUtils.isPrintableCharacter(event.key)) {
|
|
this.searchItems(event, event.key);
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
onArrowDownKey(event) {
|
|
const itemIndex = this.focusedItemInfo().index !== -1 ? this.findNextItemIndex(this.focusedItemInfo().index) : this.findFirstFocusedItemIndex();
|
|
this.changeFocusedItemIndex(event, itemIndex);
|
|
event.preventDefault();
|
|
}
|
|
onArrowRightKey(event) {
|
|
const processedItem = this.visibleItems[this.focusedItemInfo().index];
|
|
const grouped = this.isProccessedItemGroup(processedItem);
|
|
if (grouped) {
|
|
this.onItemChange({ originalEvent: event, processedItem });
|
|
this.focusedItemInfo.set({ index: -1, parentKey: processedItem.key, item: processedItem.item });
|
|
this.searchValue = '';
|
|
this.onArrowDownKey(event);
|
|
}
|
|
event.preventDefault();
|
|
}
|
|
onArrowUpKey(event) {
|
|
if (event.altKey) {
|
|
if (this.focusedItemInfo().index !== -1) {
|
|
const processedItem = this.visibleItems[this.focusedItemInfo().index];
|
|
const grouped = this.isProccessedItemGroup(processedItem);
|
|
!grouped && this.onItemChange({ originalEvent: event, processedItem });
|
|
}
|
|
this.hide();
|
|
event.preventDefault();
|
|
}
|
|
else {
|
|
const itemIndex = this.focusedItemInfo().index !== -1 ? this.findPrevItemIndex(this.focusedItemInfo().index) : this.findLastFocusedItemIndex();
|
|
this.changeFocusedItemIndex(event, itemIndex);
|
|
event.preventDefault();
|
|
}
|
|
}
|
|
onArrowLeftKey(event) {
|
|
const processedItem = this.visibleItems[this.focusedItemInfo().index];
|
|
const parentItem = this.activeItemPath().find((p) => p.key === processedItem.parentKey);
|
|
const root = ObjectUtils.isEmpty(processedItem.parent);
|
|
if (!root) {
|
|
this.focusedItemInfo.set({ index: -1, parentKey: parentItem ? parentItem.parentKey : '', item: processedItem.item });
|
|
this.searchValue = '';
|
|
this.onArrowDownKey(event);
|
|
}
|
|
const activeItemPath = this.activeItemPath().filter((p) => p.parentKey !== this.focusedItemInfo().parentKey);
|
|
this.activeItemPath.set(activeItemPath);
|
|
event.preventDefault();
|
|
}
|
|
onHomeKey(event) {
|
|
this.changeFocusedItemIndex(event, this.findFirstItemIndex());
|
|
event.preventDefault();
|
|
}
|
|
onEndKey(event) {
|
|
this.changeFocusedItemIndex(event, this.findLastItemIndex());
|
|
event.preventDefault();
|
|
}
|
|
onSpaceKey(event) {
|
|
this.onEnterKey(event);
|
|
}
|
|
onEscapeKey(event) {
|
|
this.hide();
|
|
const processedItem = this.findVisibleItem(this.findFirstFocusedItemIndex());
|
|
const focusedItemInfo = this.focusedItemInfo();
|
|
this.focusedItemInfo.set({ ...focusedItemInfo, index: this.findFirstFocusedItemIndex(), item: processedItem.item });
|
|
event.preventDefault();
|
|
}
|
|
onTabKey(event) {
|
|
if (this.focusedItemInfo().index !== -1) {
|
|
const processedItem = this.visibleItems[this.focusedItemInfo().index];
|
|
const grouped = this.isProccessedItemGroup(processedItem);
|
|
!grouped && this.onItemChange({ originalEvent: event, processedItem });
|
|
}
|
|
this.hide();
|
|
}
|
|
onEnterKey(event) {
|
|
if (this.focusedItemInfo().index !== -1) {
|
|
const element = DomHandler.findSingle(this.rootmenu.el.nativeElement, `li[id="${`${this.focusedItemId}`}"]`);
|
|
const anchorElement = element && DomHandler.findSingle(element, 'a[data-pc-section="action"]');
|
|
anchorElement ? anchorElement.click() : element && element.click();
|
|
const processedItem = this.visibleItems[this.focusedItemInfo().index];
|
|
const grouped = this.isProccessedItemGroup(processedItem);
|
|
if (!grouped) {
|
|
const focusedItemInfo = this.focusedItemInfo();
|
|
this.focusedItemInfo.set({ ...focusedItemInfo, index: this.findFirstFocusedItemIndex() });
|
|
}
|
|
}
|
|
event.preventDefault();
|
|
}
|
|
onItemChange(event) {
|
|
const { processedItem, isFocus } = event;
|
|
if (ObjectUtils.isEmpty(processedItem))
|
|
return;
|
|
const { index, key, level, parentKey, items } = processedItem;
|
|
const grouped = ObjectUtils.isNotEmpty(items);
|
|
const activeItemPath = this.activeItemPath().filter((p) => p.parentKey !== parentKey && p.parentKey !== key);
|
|
if (grouped) {
|
|
activeItemPath.push(processedItem);
|
|
this.submenuVisible.set(true);
|
|
}
|
|
this.focusedItemInfo.set({ index, level, parentKey, item: processedItem.item });
|
|
this.activeItemPath.set(activeItemPath);
|
|
isFocus && DomHandler.focus(this.rootmenu.sublistViewChild.nativeElement);
|
|
}
|
|
onMenuFocus(event) {
|
|
this.focused = true;
|
|
const focusedItemInfo = this.focusedItemInfo().index !== -1 ? this.focusedItemInfo() : { index: -1, level: 0, parentKey: '', item: null };
|
|
this.focusedItemInfo.set(focusedItemInfo);
|
|
}
|
|
onMenuBlur(event) {
|
|
this.focused = false;
|
|
this.focusedItemInfo.set({ index: -1, level: 0, parentKey: '', item: null });
|
|
this.searchValue = '';
|
|
}
|
|
onOverlayAnimationStart(event) {
|
|
switch (event.toState) {
|
|
case 'visible':
|
|
this.container = event.element;
|
|
this.position();
|
|
this.moveOnTop();
|
|
this.appendOverlay();
|
|
this.bindGlobalListeners();
|
|
DomHandler.focus(this.rootmenu.sublistViewChild.nativeElement);
|
|
break;
|
|
}
|
|
}
|
|
onOverlayAnimationEnd(event) {
|
|
switch (event.toState) {
|
|
case 'void':
|
|
this.onOverlayHide();
|
|
break;
|
|
}
|
|
}
|
|
appendOverlay() {
|
|
if (this.appendTo) {
|
|
if (this.appendTo === 'body')
|
|
this.renderer.appendChild(this.document.body, this.containerViewChild.nativeElement);
|
|
else
|
|
DomHandler.appendChild(this.containerViewChild.nativeElement, this.appendTo);
|
|
}
|
|
}
|
|
moveOnTop() {
|
|
if (this.autoZIndex && this.containerViewChild) {
|
|
ZIndexUtils.set('menu', this.containerViewChild.nativeElement, this.baseZIndex + this.config.zIndex.menu);
|
|
}
|
|
}
|
|
onOverlayHide() {
|
|
this.unbindGlobalListeners();
|
|
if (!this.cd.destroyed) {
|
|
this.target = null;
|
|
}
|
|
if (this.container && this.autoZIndex) {
|
|
ZIndexUtils.clear(this.container);
|
|
}
|
|
this.container = null;
|
|
}
|
|
onTouchStart(event) {
|
|
this.pressTimer = setTimeout(() => {
|
|
this.show(event);
|
|
}, this.pressDelay);
|
|
}
|
|
onTouchEnd() {
|
|
clearTimeout(this.pressTimer);
|
|
}
|
|
hide() {
|
|
this.visible.set(false);
|
|
this.onHide.emit();
|
|
this.activeItemPath.set([]);
|
|
this.focusedItemInfo.set({ index: -1, level: 0, parentKey: '', item: null });
|
|
}
|
|
toggle(event) {
|
|
this.visible() ? this.hide() : this.show(event);
|
|
}
|
|
show(event) {
|
|
this.activeItemPath.set([]);
|
|
this.focusedItemInfo.set({ index: -1, level: 0, parentKey: '', item: null });
|
|
this.pageX = event.pageX;
|
|
this.pageY = event.pageY;
|
|
this.onShow.emit();
|
|
this.visible() ? this.position() : this.visible.set(true);
|
|
event.stopPropagation();
|
|
event.preventDefault();
|
|
}
|
|
position() {
|
|
let left = this.pageX + 1;
|
|
let top = this.pageY + 1;
|
|
let width = this.containerViewChild.nativeElement.offsetParent ? this.containerViewChild.nativeElement.offsetWidth : DomHandler.getHiddenElementOuterWidth(this.containerViewChild.nativeElement);
|
|
let height = this.containerViewChild.nativeElement.offsetParent ? this.containerViewChild.nativeElement.offsetHeight : DomHandler.getHiddenElementOuterHeight(this.containerViewChild.nativeElement);
|
|
let viewport = DomHandler.getViewport();
|
|
//flip
|
|
if (left + width - this.document.scrollingElement.scrollLeft > viewport.width) {
|
|
left -= width;
|
|
}
|
|
//flip
|
|
if (top + height - this.document.scrollingElement.scrollTop > viewport.height) {
|
|
top -= height;
|
|
}
|
|
//fit
|
|
if (left < this.document.scrollingElement.scrollLeft) {
|
|
left = this.document.scrollingElement.scrollLeft;
|
|
}
|
|
//fit
|
|
if (top < this.document.scrollingElement.scrollTop) {
|
|
top = this.document.scrollingElement.scrollTop;
|
|
}
|
|
this.containerViewChild.nativeElement.style.left = left + 'px';
|
|
this.containerViewChild.nativeElement.style.top = top + 'px';
|
|
}
|
|
searchItems(event, char) {
|
|
this.searchValue = (this.searchValue || '') + char;
|
|
let itemIndex = -1;
|
|
let matched = false;
|
|
if (this.focusedItemInfo().index !== -1) {
|
|
itemIndex = this.visibleItems.slice(this.focusedItemInfo().index).findIndex((processedItem) => this.isItemMatched(processedItem));
|
|
itemIndex = itemIndex === -1 ? this.visibleItems.slice(0, this.focusedItemInfo().index).findIndex((processedItem) => this.isItemMatched(processedItem)) : itemIndex + this.focusedItemInfo().index;
|
|
}
|
|
else {
|
|
itemIndex = this.visibleItems.findIndex((processedItem) => this.isItemMatched(processedItem));
|
|
}
|
|
if (itemIndex !== -1) {
|
|
matched = true;
|
|
}
|
|
if (itemIndex === -1 && this.focusedItemInfo().index === -1) {
|
|
itemIndex = this.findFirstFocusedItemIndex();
|
|
}
|
|
if (itemIndex !== -1) {
|
|
this.changeFocusedItemIndex(event, itemIndex);
|
|
}
|
|
if (this.searchTimeout) {
|
|
clearTimeout(this.searchTimeout);
|
|
}
|
|
this.searchTimeout = setTimeout(() => {
|
|
this.searchValue = '';
|
|
this.searchTimeout = null;
|
|
}, 500);
|
|
return matched;
|
|
}
|
|
findVisibleItem(index) {
|
|
return ObjectUtils.isNotEmpty(this.visibleItems) ? this.visibleItems[index] : null;
|
|
}
|
|
findLastFocusedItemIndex() {
|
|
const selectedIndex = this.findSelectedItemIndex();
|
|
return selectedIndex < 0 ? this.findLastItemIndex() : selectedIndex;
|
|
}
|
|
findLastItemIndex() {
|
|
return ObjectUtils.findLastIndex(this.visibleItems, (processedItem) => this.isValidItem(processedItem));
|
|
}
|
|
findPrevItemIndex(index) {
|
|
const matchedItemIndex = index > 0 ? ObjectUtils.findLastIndex(this.visibleItems.slice(0, index), (processedItem) => this.isValidItem(processedItem)) : -1;
|
|
return matchedItemIndex > -1 ? matchedItemIndex : index;
|
|
}
|
|
findNextItemIndex(index) {
|
|
const matchedItemIndex = index < this.visibleItems.length - 1 ? this.visibleItems.slice(index + 1).findIndex((processedItem) => this.isValidItem(processedItem)) : -1;
|
|
return matchedItemIndex > -1 ? matchedItemIndex + index + 1 : index;
|
|
}
|
|
findFirstFocusedItemIndex() {
|
|
const selectedIndex = this.findSelectedItemIndex();
|
|
return selectedIndex < 0 ? this.findFirstItemIndex() : selectedIndex;
|
|
}
|
|
findFirstItemIndex() {
|
|
return this.visibleItems.findIndex((processedItem) => this.isValidItem(processedItem));
|
|
}
|
|
findSelectedItemIndex() {
|
|
return this.visibleItems.findIndex((processedItem) => this.isValidSelectedItem(processedItem));
|
|
}
|
|
changeFocusedItemIndex(event, index) {
|
|
const processedItem = this.findVisibleItem(index);
|
|
const focusedItemInfo = this.focusedItemInfo();
|
|
if (focusedItemInfo.index !== index) {
|
|
this.focusedItemInfo.set({ ...focusedItemInfo, index, item: processedItem.item });
|
|
this.scrollInView();
|
|
}
|
|
}
|
|
scrollInView(index = -1) {
|
|
const id = index !== -1 ? `${this.id}_${index}` : this.focusedItemId;
|
|
const element = DomHandler.findSingle(this.rootmenu.el.nativeElement, `li[id="${id}"]`);
|
|
if (element) {
|
|
element.scrollIntoView && element.scrollIntoView({ block: 'nearest', inline: 'nearest' });
|
|
}
|
|
}
|
|
bindResizeListener() {
|
|
if (isPlatformBrowser(this.platformId)) {
|
|
if (!this.resizeListener) {
|
|
this.resizeListener = this.renderer.listen(this.document.defaultView, 'resize', (event) => {
|
|
this.hide();
|
|
});
|
|
}
|
|
}
|
|
}
|
|
isOutsideClicked(event) {
|
|
return !(this.containerViewChild.nativeElement.isSameNode(event.target) || this.containerViewChild.nativeElement.contains(event.target));
|
|
}
|
|
unbindResizeListener() {
|
|
if (this.resizeListener) {
|
|
this.resizeListener();
|
|
this.resizeListener = null;
|
|
}
|
|
}
|
|
unbindGlobalListeners() {
|
|
if (this.documentClickListener) {
|
|
this.documentClickListener();
|
|
this.documentClickListener = null;
|
|
}
|
|
if (this.documentTriggerListener) {
|
|
this.documentTriggerListener();
|
|
this.documentTriggerListener = null;
|
|
}
|
|
if (this.resizeListener) {
|
|
this.resizeListener();
|
|
this.resizeListener = null;
|
|
}
|
|
if (this.touchEndListener) {
|
|
this.touchEndListener();
|
|
this.touchEndListener = null;
|
|
}
|
|
}
|
|
unbindTriggerEventListener() {
|
|
if (this.triggerEventListener) {
|
|
this.triggerEventListener();
|
|
this.triggerEventListener = null;
|
|
}
|
|
}
|
|
removeAppendedElements() {
|
|
if (this.appendTo && this.containerViewChild) {
|
|
if (this.appendTo === 'body') {
|
|
this.renderer.removeChild(this.document.body, this.containerViewChild.nativeElement);
|
|
}
|
|
else {
|
|
DomHandler.removeChild(this.containerViewChild.nativeElement, this.appendTo);
|
|
}
|
|
}
|
|
}
|
|
ngOnDestroy() {
|
|
this.unbindGlobalListeners();
|
|
this.unbindTriggerEventListener();
|
|
this.removeAppendedElements();
|
|
}
|
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ContextMenu, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i5.PrimeNGConfig }, { token: i5.OverlayService }], target: i0.ɵɵFactoryTarget.Component });
|
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.7", type: ContextMenu, selector: "p-contextMenu", inputs: { model: "model", triggerEvent: "triggerEvent", target: "target", global: ["global", "global", booleanAttribute], style: "style", styleClass: "styleClass", appendTo: "appendTo", autoZIndex: ["autoZIndex", "autoZIndex", booleanAttribute], baseZIndex: ["baseZIndex", "baseZIndex", numberAttribute], id: "id", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", pressDelay: ["pressDelay", "pressDelay", numberAttribute] }, outputs: { onShow: "onShow", onHide: "onHide" }, host: { classAttribute: "p-element" }, queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "rootmenu", first: true, predicate: ["rootmenu"], descendants: true }, { propertyName: "containerViewChild", first: true, predicate: ["container"], descendants: true }], ngImport: i0, template: `
|
|
<div
|
|
#container
|
|
[attr.data-pc-section]="'root'"
|
|
[attr.data-pc-name]="'contextmenu'"
|
|
[attr.id]="id"
|
|
[ngClass]="{ 'p-contextmenu p-component': true, 'p-contextmenu-overlay': true }"
|
|
[class]="styleClass"
|
|
[ngStyle]="style"
|
|
[@overlayAnimation]="{ value: 'visible' }"
|
|
(@overlayAnimation.start)="onOverlayAnimationStart($event)"
|
|
(@overlayAnimation.done)="onOverlayAnimationEnd($event)"
|
|
*ngIf="visible()"
|
|
>
|
|
<p-contextMenuSub
|
|
#rootmenu
|
|
[root]="true"
|
|
[items]="processedItems"
|
|
[itemTemplate]="itemTemplate"
|
|
[menuId]="id"
|
|
[tabindex]="!disabled ? tabindex : -1"
|
|
[ariaLabel]="ariaLabel"
|
|
[ariaLabelledBy]="ariaLabelledBy"
|
|
[baseZIndex]="baseZIndex"
|
|
[autoZIndex]="autoZIndex"
|
|
[visible]="submenuVisible()"
|
|
[focusedItemId]="focused ? focusedItemId : undefined"
|
|
[activeItemPath]="activeItemPath()"
|
|
(itemClick)="onItemClick($event)"
|
|
(menuFocus)="onMenuFocus($event)"
|
|
(menuBlur)="onMenuBlur($event)"
|
|
(menuKeydown)="onKeyDown($event)"
|
|
(itemMouseEnter)="onItemMouseEnter($event)"
|
|
></p-contextMenuSub>
|
|
</div>
|
|
`, isInline: true, styles: ["@layer primeng{.p-contextmenu{position:absolute}.p-contextmenu ul{margin:0;padding:0;list-style:none}.p-contextmenu .p-submenu-list{position:absolute;min-width:100%;z-index:1}.p-contextmenu .p-menuitem-link{cursor:pointer;display:flex;align-items:center;text-decoration:none;overflow:hidden;position:relative}.p-contextmenu .p-menuitem-text{line-height:1}.p-contextmenu .p-menuitem{position:relative}.p-contextmenu .p-menuitem-link .p-submenu-icon:not(svg){margin-left:auto}.p-contextmenu .p-menuitem-link .p-icon-wrapper{margin-left:auto}}\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: "component", type: ContextMenuSub, selector: "p-contextMenuSub", inputs: ["visible", "items", "itemTemplate", "root", "autoZIndex", "baseZIndex", "popup", "menuId", "ariaLabel", "ariaLabelledBy", "level", "focusedItemId", "activeItemPath", "tabindex"], outputs: ["itemClick", "itemMouseEnter", "menuFocus", "menuBlur", "menuKeydown"] }], animations: [trigger('overlayAnimation', [transition(':enter', [style({ opacity: 0 }), animate('250ms')]), transition(':leave', [animate('.1s linear', style({ opacity: 0 }))])])], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
}
|
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ContextMenu, decorators: [{
|
|
type: Component,
|
|
args: [{ selector: 'p-contextMenu', template: `
|
|
<div
|
|
#container
|
|
[attr.data-pc-section]="'root'"
|
|
[attr.data-pc-name]="'contextmenu'"
|
|
[attr.id]="id"
|
|
[ngClass]="{ 'p-contextmenu p-component': true, 'p-contextmenu-overlay': true }"
|
|
[class]="styleClass"
|
|
[ngStyle]="style"
|
|
[@overlayAnimation]="{ value: 'visible' }"
|
|
(@overlayAnimation.start)="onOverlayAnimationStart($event)"
|
|
(@overlayAnimation.done)="onOverlayAnimationEnd($event)"
|
|
*ngIf="visible()"
|
|
>
|
|
<p-contextMenuSub
|
|
#rootmenu
|
|
[root]="true"
|
|
[items]="processedItems"
|
|
[itemTemplate]="itemTemplate"
|
|
[menuId]="id"
|
|
[tabindex]="!disabled ? tabindex : -1"
|
|
[ariaLabel]="ariaLabel"
|
|
[ariaLabelledBy]="ariaLabelledBy"
|
|
[baseZIndex]="baseZIndex"
|
|
[autoZIndex]="autoZIndex"
|
|
[visible]="submenuVisible()"
|
|
[focusedItemId]="focused ? focusedItemId : undefined"
|
|
[activeItemPath]="activeItemPath()"
|
|
(itemClick)="onItemClick($event)"
|
|
(menuFocus)="onMenuFocus($event)"
|
|
(menuBlur)="onMenuBlur($event)"
|
|
(menuKeydown)="onKeyDown($event)"
|
|
(itemMouseEnter)="onItemMouseEnter($event)"
|
|
></p-contextMenuSub>
|
|
</div>
|
|
`, animations: [trigger('overlayAnimation', [transition(':enter', [style({ opacity: 0 }), animate('250ms')]), transition(':leave', [animate('.1s linear', style({ opacity: 0 }))])])], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
class: 'p-element'
|
|
}, styles: ["@layer primeng{.p-contextmenu{position:absolute}.p-contextmenu ul{margin:0;padding:0;list-style:none}.p-contextmenu .p-submenu-list{position:absolute;min-width:100%;z-index:1}.p-contextmenu .p-menuitem-link{cursor:pointer;display:flex;align-items:center;text-decoration:none;overflow:hidden;position:relative}.p-contextmenu .p-menuitem-text{line-height:1}.p-contextmenu .p-menuitem{position:relative}.p-contextmenu .p-menuitem-link .p-submenu-icon:not(svg){margin-left:auto}.p-contextmenu .p-menuitem-link .p-icon-wrapper{margin-left:auto}}\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.ChangeDetectorRef }, { type: i5.PrimeNGConfig }, { type: i5.OverlayService }], propDecorators: { model: [{
|
|
type: Input
|
|
}], triggerEvent: [{
|
|
type: Input
|
|
}], target: [{
|
|
type: Input
|
|
}], global: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], style: [{
|
|
type: Input
|
|
}], styleClass: [{
|
|
type: Input
|
|
}], appendTo: [{
|
|
type: Input
|
|
}], autoZIndex: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], baseZIndex: [{
|
|
type: Input,
|
|
args: [{ transform: numberAttribute }]
|
|
}], id: [{
|
|
type: Input
|
|
}], ariaLabel: [{
|
|
type: Input
|
|
}], ariaLabelledBy: [{
|
|
type: Input
|
|
}], pressDelay: [{
|
|
type: Input,
|
|
args: [{ transform: numberAttribute }]
|
|
}], onShow: [{
|
|
type: Output
|
|
}], onHide: [{
|
|
type: Output
|
|
}], templates: [{
|
|
type: ContentChildren,
|
|
args: [PrimeTemplate]
|
|
}], rootmenu: [{
|
|
type: ViewChild,
|
|
args: ['rootmenu']
|
|
}], containerViewChild: [{
|
|
type: ViewChild,
|
|
args: ['container']
|
|
}] } });
|
|
export class ContextMenuModule {
|
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.7", ngImport: i0, type: ContextMenuModule, declarations: [ContextMenu, ContextMenuSub], imports: [CommonModule, RouterModule, RippleModule, TooltipModule, AngleRightIcon, SharedModule], exports: [ContextMenu, RouterModule, TooltipModule, SharedModule] });
|
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ContextMenuModule, imports: [CommonModule, RouterModule, RippleModule, TooltipModule, AngleRightIcon, SharedModule, RouterModule, TooltipModule, SharedModule] });
|
|
}
|
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ContextMenuModule, decorators: [{
|
|
type: NgModule,
|
|
args: [{
|
|
imports: [CommonModule, RouterModule, RippleModule, TooltipModule, AngleRightIcon, SharedModule],
|
|
exports: [ContextMenu, RouterModule, TooltipModule, SharedModule],
|
|
declarations: [ContextMenu, ContextMenuSub]
|
|
}]
|
|
}] });
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGV4dG1lbnUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXBwL2NvbXBvbmVudHMvY29udGV4dG1lbnUvY29udGV4dG1lbnUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFrQixPQUFPLEVBQUUsS0FBSyxFQUFFLFVBQVUsRUFBRSxPQUFPLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUMxRixPQUFPLEVBQUUsWUFBWSxFQUFFLFFBQVEsRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQzVFLE9BQU8sRUFFSCx1QkFBdUIsRUFFdkIsU0FBUyxFQ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AgICAgICA8dWxcbiAgICAgICAgICAgICpuZ0lmPVwicm9vdCA/IHRydWUgOiB2aXNpYmxlXCJcbiAgICAgICAgICAgICNzdWJsaXN0XG4gICAgICAgICAgICByb2xlPVwibWVudVwiXG4gICAgICAgICAgICBbbmdDbGFzc109XCJ7ICdwLXN1Ym1lbnUtbGlzdCc6ICFyb290LCAncC1jb250ZXh0bWVudS1yb290LWxpc3QnOiByb290IH1cIlxuICAgICAgICAgICAgW0BvdmVybGF5QW5pbWF0aW9uXT1cInZpc2libGVcIlxuICAgICAgICAgICAgKEBvdmVybGF5QW5pbWF0aW9uLnN0YXJ0KT1cIm9uRW50ZXIoJGV2ZW50LCBzdWJsaXN0KVwiXG4gICAgICAgICAgICBbYXR0ci5pZF09XCJtZW51SWQgKyAnX2xpc3QnXCJcbiAgICAgICAgICAgIFt0YWJpbmRleF09XCJ0YWJpbmRleFwiXG4gICAgICAgICAgICBbYXR0ci5hcmlhLWxhYmVsXT1cImFyaWFMYWJlbFwiXG4gICAgICAgICAgICBbYXR0ci5hcmlhLWxhYmVsbGVkQnldPVwiYXJpYUxhYmVsbGVkQnlcIlxuICAgICAgICAgICAgW2F0dHIuYXJpYS1hY3RpdmVkZXNjZW5kYW50XT1cImZvY3VzZWRJdGVtSWRcIlxuICAgICAgICAgICAgW2F0dHIuYXJpYS1vcmllbnRhdGlvbl09XCIndmVydGljYWwnXCJcbiAgICAgICAgICAgIFthdHRyLmRhdGEtcGMtc2VjdGlvbl09XCInbWVudSdcIlxuICAgICAgICAgICAgKGtleWRvd24pPVwibWVudUtleWRvd24uZW1pdCgkZXZlbnQpXCJcbiAgICAgICAgICAgIChmb2N1cyk9XCJtZW51Rm9jdXMuZW1pdCgkZXZlbnQpXCJcbiAgICAgICAgICAgIChibHVyKT1cIm1lbnVCbHVyLmVtaXQoJGV2ZW50KVwiXG4gICAgICAgID5cbiAgICAgICAgICAgIDxuZy10ZW1wbGF0ZSBuZ0ZvciBsZXQtcHJvY2Vzc2VkSXRlbSBbbmdGb3JPZl09XCJpdGVtc1wiIGxldC1pbmRleD1cImluZGV4XCI+XG4gICAgICAgICAgICAgICAgPGxpXG4gICAgICAgICAgICAgICAgICAgICpuZ0lmPVwiaXNJdGVtVmlzaWJsZShwcm9jZXNzZWRJdGVtKSAmJiBnZXRJdGVtUHJvcChwcm9jZXNzZWRJdGVtLCAnc2VwYXJhdG9yJylcIlxuICAgICAgICAgICAgICAgICAgICBbYXR0ci5pZF09XCJnZXRJdGVtSWQocHJvY2Vzc2VkSXRlbSlcIlxuICAgICAgICAgICAgICAgICAgICBbc3R5bGVdPVwiZ2V0SXRlbVByb3AocHJvY2Vzc2VkSXRlbSwgJ3N0eWxlJylcIlxuICAgICAgICAgICAgICAgICAgICBbbmdDbGFzc109XCJnZXRTZXBhcmF0b3JJdGVtQ2xhc3MocHJvY2Vzc2VkSXRlbSlcIlxuICAgICAgICAgICAgICAgICAgICByb2xlPVwic2VwYXJhdG9yXCJcbiAgICAgICAgICAgICAgICAgICAgW2F0dHIuZGF0YS1wYy1zZWN0aW9uXT1cIidzZXBhcmF0b3InXCJcbiAgICAgICAgICAgICAgICA+PC9saT5cbiAgICAgICAgICAgICAgICA8bGlcbiAgICAgICAgICAgICAgICAgICAgI2xpc3RJdGVtXG4gICAgICAgICAgICAgICAgICAgICpuZ0lmPVwiaXNJdGVtVmlzaWJsZShwcm9jZXNzZWRJdGVtKSAmJiAhZ2V0SXRlbVByb3AocHJvY2Vzc2VkSXRlbSwgJ3NlcGFyYXRvcicpXCJcbiAgICAgICAgICAgICAgICAgICAgcm9sZT1cIm1lbnVpdGVtXCJcbiAgICAgICAgICAgICAgICAgICAgW2F0dHIuaWRdPVwiZ2V0SXRlbUlkKHByb2Nlc3NlZEl0ZW0pXCJcbiAgICAgICAgICAgICAgICAgICAgW2F0dHIuZGF0YS1wYy1zZWN0aW9uXT1cIidtZW51aXRlbSdcIlxuICAgICAgICAgICAgICAgICAgICBbYXR0ci5kYXRhLXAtaGlnaGxpZ2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lc3NlZEl0ZW0sICdzdHlsZScpXCJcbiAgICAgICAgICAgICAgICAgICAgW25nQ2xhc3NdPVwiZ2V0SXRlbUNsYXNzKHByb2Nlc3NlZEl0ZW0pXCJcbiAgICAgICAgICAgICAgICAgICAgW2NsYXNzXT1cImdldEl0ZW1Qcm9wKHByb2Nlc3NlZEl0ZW0sICdzdHlsZUNsYXNzJylcIlxuICAgICAgICAgICAgICAgICAgICBwVG9vbHRpcFxuICAgICAgICAgICAgICAgICAgICBbdG9vbHRpcE9wdGlvbnNdPVwiZ2V0SXRlbVByb3AocHJvY2Vzc2VkSXRlbSwgJ3Rvb2x0aXBPcHRpb25zJylcIlxuICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBbYXR0ci5kYXRhLXBjLXNlY3Rpb25dPVwiJ2NvbnRlbnQnXCIgY2xhc3M9XCJwLW1lbnVpdGVtLWNvbnRlbnRcIiAoY2xpY2spPVwib25JdGVtQ2xpY2soJGV2ZW50LCBwcm9jZXNzZWRJdGVtKVwiIChtb3VzZWVudGVyKT1cIm9uSXRlbU1vdXNlRW50ZXIoeyRldmVudCwgcHJvY2Vzc2VkSXRlbX0pXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICA8bmctY29udGFpbmVyICpuZ0lmPVwiIWl0ZW1UZW1wbGF0ZVwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpuZ0lmPVwiIWdldEl0ZW1Qcm9wKHByb2Nlc3NlZEl0ZW0sICdyb3V0ZXJMaW5rJylcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbYXR0ci5ocmVmXT1cImdldEl0ZW1Qcm9wKHByb2Nlc3NlZEl0ZW0sICd1cmwnKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFthdHRyLmFyaWEtaGlkZGVuXT1cInRydWVcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbYXR0ci5kYXRhLWF1dG9tYXRpb25pZF09XCJnZXRJdGVtUHJvcChwcm9jZXNzZWRJdGVtLCAnYXV0b21hdGlvbklkJylcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbYXR0ci5kYXRhLXBjLXNlY3Rpb25dPVwiJ2FjdGlvbidcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbdGFyZ2V0XT1cImdldEl0ZW1Qcm9wKHByb2Nlc3NlZEl0ZW0sICd0YXJnZXQnKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtuZ0NsYXNzXT1cInsgJ3AtbWVudWl0ZW0tbGluayc6IHRydWUgfVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFthdHRyLnRhYmluZGV4XT1cIi0xXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcFJpcHBsZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpuZ0lmPVwiZ2V0SXRlbVByb3AocHJvY2Vzc2VkSXRlbSwgJ2ljb24nKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzcz1cInAtbWVudWl0ZW0taWNvblwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbbmdDbGFzc109XCJnZXRJdGVtUHJvcChwcm9jZXNzZWRJdGVtLCAnaWNvbicpXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtuZ1N0eWxlXT1cImdldEl0ZW1Qcm9wKHByb2Nlc3NlZEl0ZW0sICdpY29uU3R5bGUnKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbYXR0ci5kYXRhLXBjLXNlY3Rpb25dPVwiJ2ljb24nXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFthdHRyLmFyaWEtaGlkZGVuXT1cInRydWVcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW2F0dHIudGFiaW5kZXhdPVwiLTFcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvc3Bhbj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW4gKm5nSWY9XCJnZXRJdGVtUHJvcChwcm9jZXNzZWRJdGVtLCAnZXNjYXBlJyk7IGVsc2UgaHRtbExhYmVsXCIgY2xhc3M9XCJwLW1lbnVpdGVtLXRleHRcIiBbYXR0ci5kYXRhLXBjLXNlY3Rpb25dPVwiJ2xhYmVsJ1wiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge3sgZ2V0SXRlbUxhYmVsKHByb2Nlc3NlZEl0ZW0pIH19XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvc3Bhbj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPG5nLXRlbXBsYXRlICNodG1sTGFiZWw+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cInAtbWVudWl0ZW0tdGV4dFwiIFtpbm5lckhUTUxdPVwiZ2V0SXRlbUxhYmVsKHByb2Nlc3NlZEl0ZW0pXCIgW2F0dHIuZGF0YS1wYy1zZWN0aW9uXT1cIidsYWJlbCdcIj48L3NwYW4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvbmctdGVtcGxhdGU+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPVwicC1tZW51aXRlbS1iYWRnZVwiICpuZ0lmPVwiZ2V0SXRlbVByb3AocHJvY2Vzc2VkSXRlbSwgJ2JhZGdlJylcIiBbbmdDbGFzc109XCJnZXRJdGVtUHJvcChwcm9jZXNzZWRJdGVtLCAnYmFkZ2VTdHlsZUNsYXNzJylcIj57eyBnZXRJdGVtUHJvcChwcm9jZXNzZWRJdGVtLCAnYmFkZ2UnKSB9fTwvc3Bhbj5cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bmctY29udGFpbmVyICpuZ0lmPVwiaXNJdGVtR3JvdXAocHJvY2Vzc2VkSXRlbSlcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxBbmdsZVJpZ2h0SWNvbiAqbmdJZj1cIiFjb250ZXh0TWVudS5zdWJtZW51SWNvblRlbXBsYXRlXCIgW3N0eWxlQ2xhc3NdPVwiJ3Atc3VibWVudS1pY29uJ1wiIFthdHRyLmRhdGEtcGMtc2VjdGlvbl09XCInc3VibWVudWljb24nXCIgW2F0dHIuYXJpYS1oaWRkZW5dPVwidHJ1ZVwiIC8+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bmctdGVtcGxhdGUgKm5nVGVtcGxhdGVPdXRsZXQ9XCJjb250ZXh0TWVudS5zdWJtZW51SWNvblRlbXBsYXRlXCIgW2F0dHIuZGF0YS1wYy1zZWN0aW9uXT1cIidzdWJtZW51aWNvbidcIiBbYXR0ci5hcmlhLWhpZGRlbl09XCJ0cnVlXCI+PC9uZy10ZW1wbGF0ZT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9uZy1jb250YWluZXI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9hPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpuZ0lmPVwiZ2V0SXRlbVByb3AocHJvY2Vzc2VkSXRlbSwgJ3JvdXRlckxpbmsnKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtyb3V0ZXJMaW5rXT1cImdldEl0ZW1Qcm9wKHByb2Nlc3NlZEl0ZW0sICdyb3V0ZXJMaW5rJylcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbYXR0ci5kYXRhLWF1dG9tYXRpb25pZF09XCJnZXRJdGVtUHJvcChwcm9jZXNzZWRJdGVtLCAnYXV0b21hdGlvbklkJylcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbYXR0ci50YWJpbmRleF09XCItMVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFthdHRyLmFyaWEtaGlkZGVuXT1cInRydWVcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbYXR0ci5kYXRhLXBjLXNlY3Rpb25dPVwiJ2FjdGlvbidcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbcXVlcnlQYXJhbXNdPVwiZ2V0SXRlbVByb3AocHJvY2Vzc2VkSXRlbSwgJ3F1ZXJ5UGFyYW1zJylcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbcm91dGVyTGlua0FjdGl2ZV09XCIncC1tZW51aXRlbS1saW5rLWFjdGl2ZSdcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbcm91dGVyTGlua0FjdGl2ZU9wdGlvbnNdPVwiZ2V0SXRlbVByb3AocHJvY2Vzc2VkSXRlbSwgJ3JvdXRlckxpbmtBY3RpdmVPcHRpb25zJykgfHwgeyBleGFjdDogZmFsc2UgfVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFt0YXJnZXRdPVwiZ2V0SXRlbVByb3AocHJvY2Vzc2VkSXRlbSwgJ3RhcmdldCcpXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW25nQ2xhc3NdPVwieyAncC1tZW51aXRlbS1saW5rJzogdHJ1ZSwgJ3AtZGlzYWJsZWQnOiBnZXRJdGVtUHJvcChwcm9jZXNzZWRJdGVtLCAnZGlzYWJsZWQnKSB9XCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW2ZyYWdtZW50XT1cImdldEl0ZW1Qcm9wKHByb2Nlc3NlZEl0ZW0sICdmcmFnbWVudCcpXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW3F1ZXJ5UGFyYW1zSGFuZGxpbmddPVwiZ2V0SXRlbVByb3AocHJvY2Vzc2VkSXRlbSwgJ3F1ZXJ5UGFyYW1zSGFuZGxpbmcnKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtwcmVzZXJ2ZUZyYWdtZW50XT1cImdldEl0ZW1Qcm9wKHByb2Nlc3NlZEl0ZW0sICdwcmVzZXJ2ZUZyYWdtZW50JylcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbc2tpcExvY2F0aW9uQ2hhbmdlXT1cImdldEl0ZW1Qcm9wKHByb2Nlc3NlZEl0ZW0sICdza2lwTG9jYXRpb25DaGFuZ2UnKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtyZXBsYWNlVXJsXT1cImdldEl0ZW1Qcm9wKHByb2Nlc3NlZEl0ZW0sICdyZXBsYWNlVXJsJylcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbc3RhdGVdPVwiZ2V0SXRlbVByb3AocHJvY2Vzc2VkSXRlbSwgJ3N0YXRlJylcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwUmlwcGxlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm5nSWY9XCJnZXRJdGVtUHJvcChwcm9jZXNzZWRJdGVtLCAnaWNvbicpXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzPVwicC1tZW51aXRlbS1pY29uXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtuZ0NsYXNzXT1cImdldEl0ZW1Qcm9wKHByb2Nlc3NlZEl0ZW0sICdpY29uJylcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW25nU3R5bGVdPVwiZ2V0SXRlbVByb3AocHJvY2Vzc2VkSXRlbSwgJ2ljb25TdHlsZScpXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFthdHRyLmRhdGEtcGMtc2VjdGlvbl09XCInaWNvbidcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW2F0dHIuYXJpYS1oaWRkZW5dPVwidHJ1ZVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbYXR0ci50YWJpbmRleF09XCItMVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9zcGFuPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiAqbmdJZj1cImdldEl0ZW1Qcm9wKHByb2Nlc3NlZEl0ZW0sICdlc2NhcGUnKTsgZWxzZSBodG1sTGFiZWxcIiBjbGFzcz1cInAtbWVudWl0ZW0tdGV4dFwiIFthdHRyLmRhdGEtcGMtc2VjdGlvbl09XCInbGFiZWwnXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7eyBnZXRJdGVtTGFiZWwocHJvY2Vzc2VkSXRlbSkgfX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9zcGFuPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bmctdGVtcGxhdGUgI2h0bWxMYWJlbD5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPVwicC1tZW51aXRlbS10ZXh0XCIgW2lubmVySFRNTF09XCJnZXRJdGVtTGFiZWwocHJvY2Vzc2VkSXRlbSlcIiBbYXR0ci5kYXRhLXBjLXNlY3Rpb25dPVwiJ2xhYmVsJ1wiPjwvc3Bhbj5cbiAgICAgICAgIC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AgICA8L25nLWNvbnRhaW5lcj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nSWY9XCJpdGVtVGVtcGxhdGVcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bmctdGVtcGxhdGUgKm5nVGVtcGxhdGVPdXRsZXQ9XCJpdGVtVGVtcGxhdGU7IGNvbnRleHQ6IHsgJGltcGxpY2l0OiBwcm9jZXNzZWRJdGVtLml0ZW0gfVwiPjwvbmctdGVtcGxhdGU+XG4gICAgICAgICAgICAgICAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG5cbiAgICAgICAgICAgICAgICAgICAgPHAtY29udGV4dE1lbnVTdWJcbiAgICAgICAgICAgICAgICAgICAgICAgICpuZ0lmPVwiaXNJdGVtVmlzaWJsZShwcm9jZXNzZWRJdGVtKSAmJiBpc0l0ZW1Hcm91cChwcm9jZXNzZWRJdGVtKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICBbaXRlbXNdPVwicHJvY2Vzc2VkSXRlbS5pdGVtc1wiXG4gICAgICAgICAgICAgICAgICAgICAgICBbaXRlbVRlbXBsYXRlXT1cIml0ZW1UZW1wbGF0ZVwiXG4gICAgICAgICAgICAgICAgICAgICAgICBbbWVudUlkXT1cIm1lbnVJZFwiXG4gICAgICAgICAgICAgICAgICAgICAgICBbdmlzaWJsZV09XCJpc0l0ZW1BY3RpdmUocHJvY2Vzc2VkSXRlbSkgJiYgaXNJdGVtR3JvdXAocHJvY2Vzc2VkSXRlbSlcIlxuICAgICAgICAgICAgICAgICAgICAgICAgW2FjdGl2ZUl0ZW1QYXRoXT1cImFjdGl2ZUl0ZW1QYXRoXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIFtmb2N1c2VkSXRlbUlkXT1cImZvY3VzZWRJdGVtSWRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgW2xldmVsXT1cImxldmVsICsgMVwiXG4gICAgICA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U3ViXG4gICAgICAgICAgICAgICAgI3Jvb3RtZW51XG4gICAgICAgICAgICAgICAgW3Jvb3RdPVwidHJ1ZVwiXG4gICAgICAgICAgICAgICAgW2l0ZW1zXT1cInByb2Nlc3NlZEl0ZW1zXCJcbiAgICAgICAgICAgICAgICBbaXRlbVRlbXBsYXRlXT1cIml0ZW1UZW1wbGF0ZVwiXG4gICAgICAgICAgICAgICAgW21lbnVJZF09XCJpZFwiXG4gICAgICAgICAgICAgICAgW3RhYmluZGV4XT1cIiFkaXNhYmxlZCA/IHRhYmluZGV4IDogLTFcIlxuICAgICAgICAgICAgICAgIFthcmlhTGFiZWxdPVwiYXJpYUxhYmVsXCJcbiAgICAgICAgICAgICAgICBbYXJpYUxhYmVsbGVkQnldPVwiYXJpYUxhYmVsbGVkQnlcIlxuICAgICAgICAgICAgICAgIFtiYXNlWkluZGV4XT1cImJhc2VaSW5kZXhcIlxuICAgICAgICAgICAgICAgIFthdXRvWkluZGV4XT1cImF1dG9aSW5kZXhcIlxuICAgICAgICAgICAgICAgIFt2aXNpYmxlXT1cInN1Ym1lbnVWaXNpYmxlKClcIlxuICAgICAgICAgICAgICAgIFtmb2N1c2VkSXRlbUlkXT1cImZvY3VzZWQgPyBmb2N1c2VkSXRlbUlkIDogdW5kZWZpbmVkXCJcbiAgICAgICAgICAgICAgICBbYWN0aXZlSXRlbVBhdGhdPVwiYWN0aXZlSXRlbVBhdGgoKVwiXG4gICAgICAgICAgICAgICAgKGl0ZW1DbGljayk9XCJvbkl0ZW1DbGljaygkZXZlbnQpXCJcbiAgICAgICAgICAgICAgICAobWVudUZvY3VzKT1cIm9uTWVudUZvY3VzKCRldmVudClcIlxuICAgICAgICAgICAgICAgIChtZW51Qmx1cik9XCJvbk1lbnVCbHVyKCRldmVudClcIlxuICAgICAgICAgICAgICAgIChtZW51S2V5ZG93bik9XCJvbktleURvd24oJGV2ZW50KVwiXG4gICAgICAgICAgICAgICAgKGl0ZW1Nb3VzZUVudGVyKT1cIm9u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ICAgICB0aGlzLmlkID0gdGhpcy5pZCB8fCBVbmlxdWVDb21wb25lbnRJZCgpO1xuICAgICAgICB0aGlzLmJpbmRUcmlnZ2VyRXZlbnRMaXN0ZW5lcigpO1xuICAgIH1cblxuICAgIGlzTW9iaWxlKCkge1xuICAgICAgICByZXR1cm4gRG9tSGFuZGxlci5pc0lPUygpIHx8IERvbUhhbmRsZXIuaXNBbmRyb2lkKCk7XG4gICAgfVxuXG4gICAgYmluZFRyaWdnZXJFdmVudExpc3RlbmVyKCkge1xuICAgICAgICBpZiAoaXNQbGF0Zm9ybUJyb3dzZXIodGhpcy5wbGF0Zm9ybUlkKSkge1xuICAgICAgICAgICAgaWYgKCF0aGlzLnRyaWdnZXJFdmVudExpc3RlbmVyKSB7XG4gICAgICAgICAgICAgICAgaWYgKCF0aGlzLmlzTW9iaWxlKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuZ2xvYmFsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnRyaWdnZXJFdmVudExpc3RlbmVyID0gdGhpcy5yZW5kZXJlci5saXN0ZW4odGhpcy5kb2N1bWVudCwgdGhpcy50cmlnZ2VyRXZlbnQsIChldmVudCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2hvdyhldmVudCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLnRhcmdldCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50cmlnZ2VyRXZlbnRMaXN0ZW5lciA9IHRoaXMucmVuZGVyZXIubGlzdGVuKHRoaXMudGFyZ2V0LCB0aGlzLnRyaWdnZXJFdmVudCwgKGV2ZW50KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zaG93KGV2ZW50KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuZ2xvYmFsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnRyaWdnZXJFdmVudExpc3RlbmVyID0gdGhpcy5yZW5kZXJlci5saXN0ZW4odGhpcy5kb2N1bWVudCwgJ3RvdWNoc3RhcnQnLCB0aGlzLm9uVG91Y2hTdGFydC5iaW5kKHRoaXMpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudG91Y2hFbmRMaXN0ZW5lciA9IHRoaXMucmVuZGVyZXIubGlzdGVuKHRoaXMuZG9jdW1lbnQsICd0b3VjaGVuZCcsIHRoaXMub25Ub3VjaEVuZC5iaW5kKHRoaXMpKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLnRhcmdldCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50cmlnZ2VyRXZlbnRMaXN0ZW5lciA9IHRoaXMucmVuZGVyZXIubGlzdGVuKHRoaXMudGFyZ2V0LCAndG91Y2hzdGFydCcsIHRoaXMub25Ub3VjaFN0YXJ0LmJpbmQodGhpcykpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50b3VjaEVuZExpc3RlbmVyID0gdGhpcy5yZW5kZXJlci5saXN0ZW4odGhpcy50YXJnZXQsICd0b3VjaGVuZCcsIHRoaXMub25Ub3VjaEVuZC5iaW5kKHRoaXMpKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGJpbmRHbG9iYWxMaXN0ZW5lcnMoKSB7XG4gICAgICAgIGlmIChpc1BsYXRmb3JtQnJvd3Nlcih0aGlzLnBsYXRmb3JtSWQpKSB7XG4gICAgICAgICAgICBpZiAoIXRoaXMuZG9jdW1lbnRDbGlja0xpc3RlbmVyKSB7XG4gICAgICAgICA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AgICAgICAgICAgICAgdGhpcy5yZXNpemVMaXN0ZW5lciA9IHRoaXMucmVuZGVyZXIubGlzdGVuKHRoaXMuZG9jdW1lbnQuZGVmYXVsdFZpZXcsICdyZXNpemUnLCAoZXZlbnQpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5oaWRlKCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBuZ0FmdGVyQ29udGVudEluaXQoKSB7XG4gICAgICAgIHRoaXMudGVtcGxhdGVzPy5mb3JFYWNoKChpdGVtKSA9PiB7XG4gICAgICAgICAgICBzd2l0Y2ggKGl0ZW0uZ2V0VHlwZSgpKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAnc3VibWVudWljb24nOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLnN1Ym1lbnVJY29uVGVtcGxhdGUgPSBpdGVtLnRlbXBsYXRlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBjYXNlICdpdGVtJzpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5pdGVtVGVtcGxhdGUgPSBpdGVtLnRlbXBsYXRlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICB0aGlzLml0ZW1UZW1wbGF0ZSA9IGl0ZW0udGVtcGxhdGU7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBjcmVhdGVQcm9jZXNzZWRJdGVtcyhpdGVtczogYW55LCBsZXZlbDogbnVtYmVyID0gMCwgcGFyZW50OiBhbnkgPSB7fSwgcGFyZW50S2V5OiBhbnkgPSAnJykge1xuICAgICAgICBjb25zdCBwcm9jZXNzZWRJdGVtcyA9IFtdO1xuXG4gICAgICAgIGl0ZW1zICYmXG4gICAgICAgICAgICBpdGVtcy5mb3JFYWNoKChpdGVtLCBpbmRleCkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IGtleSA9IChwYXJlbnRLZXkgIT09ICcnID8gcGFyZW50S2V5ICsgJ18nIDogJycpICsgaW5kZXg7XG4gICAgICAgICAgICAgICAgY29uc3QgbmV3SXRlbSA9IHtcbiAgICAgICAgICAgICAgICAgICAgaXRlbSxcbiAgICAgICAgICAgICAgICAgICAgaW5kZXgsXG4gICAgICAgICAgICAgICAgICAgIGxldmVsLFxuICAgICAgICAgICAgICAgICAgICBrZXksXG4gICAgICAgICAgICAgICAgICAgIHBhcmVudCxcbiAgICAgICAgICAgICAgICAgICAgcGFyZW50S2V5XG4gICAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICAgIG5ld0l0ZW1bJ2l0ZW1zJ10gPSB0aGlzLmNyZWF0ZVByb2Nlc3NlZEl0ZW1zKGl0ZW0uaXRlbXMsIGxldmVsICsgMSwgbmV3SXRlbSwga2V5KTtcbiAgICAgICAgICAgICAgICBwcm9jZXNzZWRJdGVtcy5wdXNoKG5ld0l0ZW0pO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgcmV0dXJuIHByb2Nlc3NlZEl0ZW1zO1xuICAgIH1cblxuICAgIGdldEl0ZW1Qcm9wKGl0ZW06IGFueSwgbmFtZTogc3RyaW5nKSB7XG4gICAgICAgIHJldHVybiBpdGVtID8gT2JqZWN0VXRpbHMuZ2V0SXRlbVZhbHVlKGl0ZW1bbmFtZV0pIDogdW5kZWZpbmVkO1xuICAgIH1cblxuICAgIGdldFByb2NjZXNzZWRJdGVtTGFiZWwocHJvY2Vzc2VkSXRlbTogYW55KSB7XG4gICAgICAgIHJldHVybiBwcm9jZXNzZWRJdGVtID8gdGhpcy5nZXRJdGVtTGFiZWwocHJvY2Vzc2VkSXRlbS5pdGVtKSA6IHVuZGVmaW5lZDtcbiAgICB9XG5cbiAgICBnZXRJdGVtTGFiZWwoaXRlbTogYW55KSB7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JdGVtUGF0aCgpLmZpbHRlcigocCkgPT4ga2V5ICE9PSBwLmtleSAmJiBrZXkuc3RhcnRzV2l0aChwLmtleSkpKTtcbiAgICAgICAgICAgIHRoaXMuZm9jdXNlZEl0ZW1JbmZvLnNldCh7IGluZGV4LCBsZXZlbCwgcGFyZW50S2V5LCBpdGVtIH0pO1xuXG4gICAgICAgICAgICBEb21IYW5kbGVyLmZvY3VzKHRoaXMucm9vdG1lbnUuc3VibGlzdFZpZXdDaGlsZC5uYXRpdmVFbGVtZW50KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGdyb3VwZWQgPyB0aGlzLm9uSXRlbUNoYW5nZShldmVudCkgOiB0aGlzLmhpZGUoKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG9uSXRlbU1vdXNlRW50ZXIoZXZlbnQ6IGFueSkge1xuICAgICAgICB0aGlzLm9uSXRlbUNoYW5nZShldmVudCk7XG4gICAgfVxuXG4gICAgb25LZXlEb3duKGV2ZW50OiBLZXlib2FyZEV2ZW50KSB7XG4gICAgICAgIGNvbnN0IG1ldGFLZXkgPSBldmVudC5tZXRhS2V5IHx8IGV2ZW50LmN0cmxLZXk7XG5cbiAgICAgICAgc3dpdGNoIChldmVudC5jb2RlKSB7XG4gICAgICAgICAgICBjYXNlICdBcnJvd0Rvd24nOlxuICAgICAgICAgICAgICAgIHRoaXMub25BcnJvd0Rvd25LZXkoZXZlbnQpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlICdBcnJvd1VwJzpcbiAgICAgICAgICAgICAgICB0aGlzLm9uQXJyb3dVcEtleShldmVudCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ0Fycm93TGVmdCc6XG4gICAgICAgICAgICAgICAgdGhpcy5vbkFycm93TGVmdEtleShldmVudCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ0Fycm93UmlnaHQnOlxuICAgICAgICAgICAgICAgIHRoaXMub25BcnJvd1JpZ2h0S2V5KGV2ZW50KTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAnSG9tZSc6XG4gICAgICAgICAgICAgICAgdGhpcy5vbkhvbWVLZXkoZXZlbnQpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlICdFbmQnOlxuICAgICAgICAgICAgICAgIHRoaXMub25FbmRLZXkoZXZlbnQpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlICdTcGFjZSc6XG4gICAgICAgICAgICAgICAgdGhpcy5vblNwYWNlS2V5KGV2ZW50KTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAnRW50ZXInOlxuICAgICAgICAgICAgICAgIHRoaXMub25FbnRlcktleShldmVudCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ0VzY2FwZSc6XG4gICAgICAgICAgICAgICAgdGhpcy5vbkVzY2FwZUtleShldmVudCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ1RhYic6XG4gICAgICAgICAgICAgICAgdGhpcy5vblRhYktleShldmVudCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ1BhZ2VEb3duJzpcbiAgICAgICAgICAgIGNhc2UgJ1BhZ2VVcCc6XG4gICAgICAgICAgICBjYXNlICdCYWNrc3BhY2UnOlxuICAgICAgICAgICAgY2FzZSAnU2hpZnRMZWZ0JzpcbiAgICAgICAgICAgIGNhc2UgJ1NoaWZ0UmlnaHQnOlxuICAgICAgICAgICAgICAgIC8vTk9PUFxuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgI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kge1xuICAgICAgICBzd2l0Y2ggKGV2ZW50LnRvU3RhdGUpIHtcbiAgICAgICAgICAgIGNhc2UgJ3Zpc2libGUnOlxuICAgICAgICAgICAgICAgIHRoaXMuY29udGFpbmVyID0gZXZlbnQuZWxlbWVudDtcbiAgICAgICAgICAgICAgICB0aGlzLnBvc2l0aW9uKCk7XG4gICAgICAgICAgICAgICAgdGhpcy5tb3ZlT25Ub3AoKTtcbiAgICAgICAgICAgICAgICB0aGlzLmFwcGVuZE92ZXJsYXkoKTtcbiAgICAgICAgICAgICAgICB0aGlzLmJpbmRHbG9iYWxMaXN0ZW5lcnMoKTtcbiAgICAgICAgICAgICAgICBEb21IYW5kbGVyLmZvY3VzKHRoaXMucm9vdG1lbnUuc3VibGlzdFZpZXdDaGlsZC5uYXRpdmVFbGVtZW50KTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG9uT3ZlcmxheUFuaW1hdGlvbkVuZChldmVudDogQW5pbWF0aW9uRXZlbnQpIHtcbiAgICAgICAgc3dpdGNoIChldmVudC50b1N0YXRlKSB7XG4gICAgICAgICAgICBjYXNlICd2b2lkJzpcbiAgICAgICAgICAgICAgICB0aGlzLm9uT3ZlcmxheUhpZGUoKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGFwcGVuZE92ZXJsYXkoKSB7XG4gICAgICAgIGlmICh0aGlzLmFwcGVuZFRvKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5hcHBlbmRUbyA9PT0gJ2JvZHknKSB0aGlzLnJlbmRlcmVyLmFwcGVuZENoaWxkKHRoaXMuZG9jdW1lbnQuYm9keSwgdGhpcy5jb250YWluZXJWaWV3Q2hpbGQubmF0aXZlRWxlbWVudCk7XG4gICAgICAgICAgICBlbHNlIERvbUhhbmRsZXIuYXBwZW5kQ2hpbGQodGhpcy5jb250YWluZXJWaWV3Q2hpbGQubmF0aXZlRWxlbWVudCw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