1 | import { NgModule, Component, ViewChild, Input, Output, EventEmitter, ContentChildren, forwardRef, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
|
---|
2 | import { CommonModule } from '@angular/common';
|
---|
3 | import { trigger, style, transition, animate } from '@angular/animations';
|
---|
4 | import { InputTextModule } from 'primeng/inputtext';
|
---|
5 | import { ButtonModule } from 'primeng/button';
|
---|
6 | import { RippleModule } from 'primeng/ripple';
|
---|
7 | import { SharedModule, PrimeTemplate, TranslationKeys } from 'primeng/api';
|
---|
8 | import { DomHandler, ConnectedOverlayScrollHandler } from 'primeng/dom';
|
---|
9 | import { ObjectUtils, UniqueComponentId, ZIndexUtils } from 'primeng/utils';
|
---|
10 | import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
---|
11 | import { CdkVirtualScrollViewport, ScrollingModule } from '@angular/cdk/scrolling';
|
---|
12 | import * as i0 from "@angular/core";
|
---|
13 | import * as i1 from "primeng/api";
|
---|
14 | import * as i2 from "@angular/cdk/scrolling";
|
---|
15 | import * as i3 from "@angular/common";
|
---|
16 | import * as i4 from "primeng/button";
|
---|
17 | import * as i5 from "primeng/ripple";
|
---|
18 | export const AUTOCOMPLETE_VALUE_ACCESSOR = {
|
---|
19 | provide: NG_VALUE_ACCESSOR,
|
---|
20 | useExisting: forwardRef(() => AutoComplete),
|
---|
21 | multi: true
|
---|
22 | };
|
---|
23 | export class AutoComplete {
|
---|
24 | constructor(el, renderer, cd, differs, config, overlayService) {
|
---|
25 | this.el = el;
|
---|
26 | this.renderer = renderer;
|
---|
27 | this.cd = cd;
|
---|
28 | this.differs = differs;
|
---|
29 | this.config = config;
|
---|
30 | this.overlayService = overlayService;
|
---|
31 | this.minLength = 1;
|
---|
32 | this.delay = 300;
|
---|
33 | this.type = 'text';
|
---|
34 | this.autoZIndex = true;
|
---|
35 | this.baseZIndex = 0;
|
---|
36 | this.dropdownIcon = "pi pi-chevron-down";
|
---|
37 | this.unique = true;
|
---|
38 | this.completeOnFocus = false;
|
---|
39 | this.completeMethod = new EventEmitter();
|
---|
40 | this.onSelect = new EventEmitter();
|
---|
41 | this.onUnselect = new EventEmitter();
|
---|
42 | this.onFocus = new EventEmitter();
|
---|
43 | this.onBlur = new EventEmitter();
|
---|
44 | this.onDropdownClick = new EventEmitter();
|
---|
45 | this.onClear = new EventEmitter();
|
---|
46 | this.onKeyUp = new EventEmitter();
|
---|
47 | this.onShow = new EventEmitter();
|
---|
48 | this.onHide = new EventEmitter();
|
---|
49 | this.scrollHeight = '200px';
|
---|
50 | this.dropdownMode = 'blank';
|
---|
51 | this.showTransitionOptions = '.12s cubic-bezier(0, 0, 0.2, 1)';
|
---|
52 | this.hideTransitionOptions = '.1s linear';
|
---|
53 | this.autocomplete = 'off';
|
---|
54 | this.onModelChange = () => { };
|
---|
55 | this.onModelTouched = () => { };
|
---|
56 | this.overlayVisible = false;
|
---|
57 | this.focus = false;
|
---|
58 | this.inputFieldValue = null;
|
---|
59 | this.differ = differs.find([]).create(null);
|
---|
60 | this.listId = UniqueComponentId() + '_list';
|
---|
61 | }
|
---|
62 | get suggestions() {
|
---|
63 | return this._suggestions;
|
---|
64 | }
|
---|
65 | set suggestions(val) {
|
---|
66 | this._suggestions = val;
|
---|
67 | this.handleSuggestionsChange();
|
---|
68 | }
|
---|
69 | ngAfterViewChecked() {
|
---|
70 | //Use timeouts as since Angular 4.2, AfterViewChecked is broken and not called after panel is updated
|
---|
71 | if (this.suggestionsUpdated && this.overlay && this.overlay.offsetParent) {
|
---|
72 | setTimeout(() => {
|
---|
73 | if (this.overlay) {
|
---|
74 | this.alignOverlay();
|
---|
75 | }
|
---|
76 | }, 1);
|
---|
77 | this.suggestionsUpdated = false;
|
---|
78 | }
|
---|
79 | if (this.highlightOptionChanged) {
|
---|
80 | setTimeout(() => {
|
---|
81 | if (this.overlay && this.itemsWrapper) {
|
---|
82 | let listItem = DomHandler.findSingle(this.overlay, 'li.p-highlight');
|
---|
83 | if (listItem) {
|
---|
84 | DomHandler.scrollInView(this.itemsWrapper, listItem);
|
---|
85 | }
|
---|
86 | if (this.virtualScroll && this.viewPort) {
|
---|
87 | let range = this.viewPort.getRenderedRange();
|
---|
88 | this.updateVirtualScrollSelectedIndex();
|
---|
89 | if (range.start > this.virtualScrollSelectedIndex || range.end < this.virtualScrollSelectedIndex) {
|
---|
90 | this.viewPort.scrollToIndex(this.virtualScrollSelectedIndex);
|
---|
91 | }
|
---|
92 | }
|
---|
93 | }
|
---|
94 | }, 1);
|
---|
95 | this.highlightOptionChanged = false;
|
---|
96 | }
|
---|
97 | }
|
---|
98 | handleSuggestionsChange() {
|
---|
99 | if (this._suggestions != null && this.loading) {
|
---|
100 | this.highlightOption = null;
|
---|
101 | if (this._suggestions.length) {
|
---|
102 | this.noResults = false;
|
---|
103 | this.show();
|
---|
104 | this.suggestionsUpdated = true;
|
---|
105 | if (this.autoHighlight) {
|
---|
106 | this.highlightOption = this._suggestions[0];
|
---|
107 | }
|
---|
108 | }
|
---|
109 | else {
|
---|
110 | this.noResults = true;
|
---|
111 | if (this.showEmptyMessage) {
|
---|
112 | this.show();
|
---|
113 | this.suggestionsUpdated = true;
|
---|
114 | }
|
---|
115 | else {
|
---|
116 | this.hide();
|
---|
117 | }
|
---|
118 | }
|
---|
119 | this.loading = false;
|
---|
120 | }
|
---|
121 | }
|
---|
122 | ngAfterContentInit() {
|
---|
123 | this.templates.forEach((item) => {
|
---|
124 | switch (item.getType()) {
|
---|
125 | case 'item':
|
---|
126 | this.itemTemplate = item.template;
|
---|
127 | break;
|
---|
128 | case 'group':
|
---|
129 | this.groupTemplate = item.template;
|
---|
130 | break;
|
---|
131 | case 'selectedItem':
|
---|
132 | this.selectedItemTemplate = item.template;
|
---|
133 | break;
|
---|
134 | case 'header':
|
---|
135 | this.headerTemplate = item.template;
|
---|
136 | break;
|
---|
137 | case 'empty':
|
---|
138 | this.emptyTemplate = item.template;
|
---|
139 | break;
|
---|
140 | case 'footer':
|
---|
141 | this.footerTemplate = item.template;
|
---|
142 | break;
|
---|
143 | default:
|
---|
144 | this.itemTemplate = item.template;
|
---|
145 | break;
|
---|
146 | }
|
---|
147 | });
|
---|
148 | }
|
---|
149 | updateVirtualScrollSelectedIndex() {
|
---|
150 | if (this.highlightOption && this.suggestions && this.suggestions.length) {
|
---|
151 | this.virtualScrollSelectedIndex = this.findOptionIndex(this.highlightOption, this.suggestions);
|
---|
152 | }
|
---|
153 | }
|
---|
154 | writeValue(value) {
|
---|
155 | this.value = value;
|
---|
156 | this.filled = this.value && this.value != '';
|
---|
157 | this.updateInputField();
|
---|
158 | this.cd.markForCheck();
|
---|
159 | }
|
---|
160 | getOptionGroupChildren(optionGroup) {
|
---|
161 | return this.optionGroupChildren ? ObjectUtils.resolveFieldData(optionGroup, this.optionGroupChildren) : optionGroup.items;
|
---|
162 | }
|
---|
163 | getOptionGroupLabel(optionGroup) {
|
---|
164 | return this.optionGroupLabel ? ObjectUtils.resolveFieldData(optionGroup, this.optionGroupLabel) : (optionGroup.label != undefined ? optionGroup.label : optionGroup);
|
---|
165 | }
|
---|
166 | registerOnChange(fn) {
|
---|
167 | this.onModelChange = fn;
|
---|
168 | }
|
---|
169 | registerOnTouched(fn) {
|
---|
170 | this.onModelTouched = fn;
|
---|
171 | }
|
---|
172 | setDisabledState(val) {
|
---|
173 | this.disabled = val;
|
---|
174 | this.cd.markForCheck();
|
---|
175 | }
|
---|
176 | onInput(event) {
|
---|
177 | // When an input element with a placeholder is clicked, the onInput event is invoked in IE.
|
---|
178 | if (!this.inputKeyDown && DomHandler.isIE()) {
|
---|
179 | return;
|
---|
180 | }
|
---|
181 | if (this.timeout) {
|
---|
182 | clearTimeout(this.timeout);
|
---|
183 | }
|
---|
184 | let value = event.target.value;
|
---|
185 | if (!this.multiple && !this.forceSelection) {
|
---|
186 | this.onModelChange(value);
|
---|
187 | }
|
---|
188 | if (value.length === 0 && !this.multiple) {
|
---|
189 | this.hide();
|
---|
190 | this.onClear.emit(event);
|
---|
191 | this.onModelChange(value);
|
---|
192 | }
|
---|
193 | if (value.length >= this.minLength) {
|
---|
194 | this.timeout = setTimeout(() => {
|
---|
195 | this.search(event, value);
|
---|
196 | }, this.delay);
|
---|
197 | }
|
---|
198 | else {
|
---|
199 | this.hide();
|
---|
200 | }
|
---|
201 | this.updateFilledState();
|
---|
202 | this.inputKeyDown = false;
|
---|
203 | }
|
---|
204 | onInputClick(event) {
|
---|
205 | if (this.documentClickListener) {
|
---|
206 | this.inputClick = true;
|
---|
207 | }
|
---|
208 | }
|
---|
209 | search(event, query) {
|
---|
210 | //allow empty string but not undefined or null
|
---|
211 | if (query === undefined || query === null) {
|
---|
212 | return;
|
---|
213 | }
|
---|
214 | this.loading = true;
|
---|
215 | this.completeMethod.emit({
|
---|
216 | originalEvent: event,
|
---|
217 | query: query
|
---|
218 | });
|
---|
219 | }
|
---|
220 | selectItem(option, focus = true) {
|
---|
221 | if (this.forceSelectionUpdateModelTimeout) {
|
---|
222 | clearTimeout(this.forceSelectionUpdateModelTimeout);
|
---|
223 | this.forceSelectionUpdateModelTimeout = null;
|
---|
224 | }
|
---|
225 | if (this.multiple) {
|
---|
226 | this.multiInputEL.nativeElement.value = '';
|
---|
227 | this.value = this.value || [];
|
---|
228 | if (!this.isSelected(option) || !this.unique) {
|
---|
229 | this.value = [...this.value, option];
|
---|
230 | this.onModelChange(this.value);
|
---|
231 | }
|
---|
232 | }
|
---|
233 | else {
|
---|
234 | this.inputEL.nativeElement.value = this.resolveFieldData(option);
|
---|
235 | this.value = option;
|
---|
236 | this.onModelChange(this.value);
|
---|
237 | }
|
---|
238 | this.onSelect.emit(option);
|
---|
239 | this.updateFilledState();
|
---|
240 | if (focus) {
|
---|
241 | this.itemClicked = true;
|
---|
242 | this.focusInput();
|
---|
243 | }
|
---|
244 | }
|
---|
245 | show() {
|
---|
246 | if (this.multiInputEL || this.inputEL) {
|
---|
247 | let hasFocus = this.multiple ?
|
---|
248 | this.multiInputEL.nativeElement.ownerDocument.activeElement == this.multiInputEL.nativeElement :
|
---|
249 | this.inputEL.nativeElement.ownerDocument.activeElement == this.inputEL.nativeElement;
|
---|
250 | if (!this.overlayVisible && hasFocus) {
|
---|
251 | this.overlayVisible = true;
|
---|
252 | }
|
---|
253 | }
|
---|
254 | }
|
---|
255 | onOverlayAnimationStart(event) {
|
---|
256 | switch (event.toState) {
|
---|
257 | case 'visible':
|
---|
258 | this.overlay = event.element;
|
---|
259 | this.itemsWrapper = this.virtualScroll ? DomHandler.findSingle(this.overlay, '.cdk-virtual-scroll-viewport') : this.overlay;
|
---|
260 | this.appendOverlay();
|
---|
261 | if (this.autoZIndex) {
|
---|
262 | ZIndexUtils.set('overlay', this.overlay, this.baseZIndex + this.config.zIndex.overlay);
|
---|
263 | }
|
---|
264 | this.alignOverlay();
|
---|
265 | this.bindDocumentClickListener();
|
---|
266 | this.bindDocumentResizeListener();
|
---|
267 | this.bindScrollListener();
|
---|
268 | this.onShow.emit(event);
|
---|
269 | break;
|
---|
270 | case 'void':
|
---|
271 | this.onOverlayHide();
|
---|
272 | break;
|
---|
273 | }
|
---|
274 | }
|
---|
275 | onOverlayAnimationEnd(event) {
|
---|
276 | switch (event.toState) {
|
---|
277 | case 'void':
|
---|
278 | if (this.autoZIndex) {
|
---|
279 | ZIndexUtils.clear(event.element);
|
---|
280 | }
|
---|
281 | break;
|
---|
282 | }
|
---|
283 | }
|
---|
284 | onOverlayClick(event) {
|
---|
285 | this.overlayService.add({
|
---|
286 | originalEvent: event,
|
---|
287 | target: this.el.nativeElement
|
---|
288 | });
|
---|
289 | }
|
---|
290 | appendOverlay() {
|
---|
291 | if (this.appendTo) {
|
---|
292 | if (this.appendTo === 'body')
|
---|
293 | document.body.appendChild(this.overlay);
|
---|
294 | else
|
---|
295 | DomHandler.appendChild(this.overlay, this.appendTo);
|
---|
296 | if (!this.overlay.style.minWidth) {
|
---|
297 | this.overlay.style.minWidth = DomHandler.getWidth(this.el.nativeElement.children[0]) + 'px';
|
---|
298 | }
|
---|
299 | }
|
---|
300 | }
|
---|
301 | resolveFieldData(value) {
|
---|
302 | let data = this.field ? ObjectUtils.resolveFieldData(value, this.field) : value;
|
---|
303 | return data !== (null || undefined) ? data : '';
|
---|
304 | }
|
---|
305 | restoreOverlayAppend() {
|
---|
306 | if (this.overlay && this.appendTo) {
|
---|
307 | this.el.nativeElement.appendChild(this.overlay);
|
---|
308 | }
|
---|
309 | }
|
---|
310 | alignOverlay() {
|
---|
311 | if (this.appendTo)
|
---|
312 | DomHandler.absolutePosition(this.overlay, (this.multiple ? this.multiContainerEL.nativeElement : this.inputEL.nativeElement));
|
---|
313 | else
|
---|
314 | DomHandler.relativePosition(this.overlay, (this.multiple ? this.multiContainerEL.nativeElement : this.inputEL.nativeElement));
|
---|
315 | }
|
---|
316 | hide() {
|
---|
317 | this.overlayVisible = false;
|
---|
318 | this.cd.markForCheck();
|
---|
319 | }
|
---|
320 | handleDropdownClick(event) {
|
---|
321 | if (!this.overlayVisible) {
|
---|
322 | this.focusInput();
|
---|
323 | let queryValue = this.multiple ? this.multiInputEL.nativeElement.value : this.inputEL.nativeElement.value;
|
---|
324 | if (this.dropdownMode === 'blank')
|
---|
325 | this.search(event, '');
|
---|
326 | else if (this.dropdownMode === 'current')
|
---|
327 | this.search(event, queryValue);
|
---|
328 | this.onDropdownClick.emit({
|
---|
329 | originalEvent: event,
|
---|
330 | query: queryValue
|
---|
331 | });
|
---|
332 | }
|
---|
333 | else {
|
---|
334 | this.hide();
|
---|
335 | }
|
---|
336 | }
|
---|
337 | focusInput() {
|
---|
338 | if (this.multiple)
|
---|
339 | this.multiInputEL.nativeElement.focus();
|
---|
340 | else
|
---|
341 | this.inputEL.nativeElement.focus();
|
---|
342 | }
|
---|
343 | get emptyMessageLabel() {
|
---|
344 | return this.emptyMessage || this.config.getTranslation(TranslationKeys.EMPTY_MESSAGE);
|
---|
345 | }
|
---|
346 | removeItem(item) {
|
---|
347 | let itemIndex = DomHandler.index(item);
|
---|
348 | let removedValue = this.value[itemIndex];
|
---|
349 | this.value = this.value.filter((val, i) => i != itemIndex);
|
---|
350 | this.onModelChange(this.value);
|
---|
351 | this.updateFilledState();
|
---|
352 | this.onUnselect.emit(removedValue);
|
---|
353 | }
|
---|
354 | onKeydown(event) {
|
---|
355 | if (this.overlayVisible) {
|
---|
356 | switch (event.which) {
|
---|
357 | //down
|
---|
358 | case 40:
|
---|
359 | if (this.group) {
|
---|
360 | let highlightItemIndex = this.findOptionGroupIndex(this.highlightOption, this.suggestions);
|
---|
361 | if (highlightItemIndex !== -1) {
|
---|
362 | let nextItemIndex = highlightItemIndex.itemIndex + 1;
|
---|
363 | if (nextItemIndex < (this.getOptionGroupChildren(this.suggestions[highlightItemIndex.groupIndex]).length)) {
|
---|
364 | this.highlightOption = this.getOptionGroupChildren(this.suggestions[highlightItemIndex.groupIndex])[nextItemIndex];
|
---|
365 | this.highlightOptionChanged = true;
|
---|
366 | }
|
---|
367 | else if (this.suggestions[highlightItemIndex.groupIndex + 1]) {
|
---|
368 | this.highlightOption = this.getOptionGroupChildren(this.suggestions[highlightItemIndex.groupIndex + 1])[0];
|
---|
369 | this.highlightOptionChanged = true;
|
---|
370 | }
|
---|
371 | }
|
---|
372 | else {
|
---|
373 | this.highlightOption = this.getOptionGroupChildren(this.suggestions[0])[0];
|
---|
374 | }
|
---|
375 | }
|
---|
376 | else {
|
---|
377 | let highlightItemIndex = this.findOptionIndex(this.highlightOption, this.suggestions);
|
---|
378 | if (highlightItemIndex != -1) {
|
---|
379 | var nextItemIndex = highlightItemIndex + 1;
|
---|
380 | if (nextItemIndex != (this.suggestions.length)) {
|
---|
381 | this.highlightOption = this.suggestions[nextItemIndex];
|
---|
382 | this.highlightOptionChanged = true;
|
---|
383 | }
|
---|
384 | }
|
---|
385 | else {
|
---|
386 | this.highlightOption = this.suggestions[0];
|
---|
387 | }
|
---|
388 | }
|
---|
389 | event.preventDefault();
|
---|
390 | break;
|
---|
391 | //up
|
---|
392 | case 38:
|
---|
393 | if (this.group) {
|
---|
394 | let highlightItemIndex = this.findOptionGroupIndex(this.highlightOption, this.suggestions);
|
---|
395 | if (highlightItemIndex !== -1) {
|
---|
396 | let prevItemIndex = highlightItemIndex.itemIndex - 1;
|
---|
397 | if (prevItemIndex >= 0) {
|
---|
398 | this.highlightOption = this.getOptionGroupChildren(this.suggestions[highlightItemIndex.groupIndex])[prevItemIndex];
|
---|
399 | this.highlightOptionChanged = true;
|
---|
400 | }
|
---|
401 | else if (prevItemIndex < 0) {
|
---|
402 | let prevGroup = this.suggestions[highlightItemIndex.groupIndex - 1];
|
---|
403 | if (prevGroup) {
|
---|
404 | this.highlightOption = this.getOptionGroupChildren(prevGroup)[this.getOptionGroupChildren(prevGroup).length - 1];
|
---|
405 | this.highlightOptionChanged = true;
|
---|
406 | }
|
---|
407 | }
|
---|
408 | }
|
---|
409 | }
|
---|
410 | else {
|
---|
411 | let highlightItemIndex = this.findOptionIndex(this.highlightOption, this.suggestions);
|
---|
412 | if (highlightItemIndex > 0) {
|
---|
413 | let prevItemIndex = highlightItemIndex - 1;
|
---|
414 | this.highlightOption = this.suggestions[prevItemIndex];
|
---|
415 | this.highlightOptionChanged = true;
|
---|
416 | }
|
---|
417 | }
|
---|
418 | event.preventDefault();
|
---|
419 | break;
|
---|
420 | //enter
|
---|
421 | case 13:
|
---|
422 | if (this.highlightOption) {
|
---|
423 | this.selectItem(this.highlightOption);
|
---|
424 | this.hide();
|
---|
425 | }
|
---|
426 | event.preventDefault();
|
---|
427 | break;
|
---|
428 | //escape
|
---|
429 | case 27:
|
---|
430 | this.hide();
|
---|
431 | event.preventDefault();
|
---|
432 | break;
|
---|
433 | //tab
|
---|
434 | case 9:
|
---|
435 | if (this.highlightOption) {
|
---|
436 | this.selectItem(this.highlightOption);
|
---|
437 | }
|
---|
438 | this.hide();
|
---|
439 | break;
|
---|
440 | }
|
---|
441 | }
|
---|
442 | else {
|
---|
443 | if (event.which === 40 && this.suggestions) {
|
---|
444 | this.search(event, event.target.value);
|
---|
445 | }
|
---|
446 | }
|
---|
447 | if (this.multiple) {
|
---|
448 | switch (event.which) {
|
---|
449 | //backspace
|
---|
450 | case 8:
|
---|
451 | if (this.value && this.value.length && !this.multiInputEL.nativeElement.value) {
|
---|
452 | this.value = [...this.value];
|
---|
453 | const removedValue = this.value.pop();
|
---|
454 | this.onModelChange(this.value);
|
---|
455 | this.updateFilledState();
|
---|
456 | this.onUnselect.emit(removedValue);
|
---|
457 | }
|
---|
458 | break;
|
---|
459 | }
|
---|
460 | }
|
---|
461 | this.inputKeyDown = true;
|
---|
462 | }
|
---|
463 | onKeyup(event) {
|
---|
464 | this.onKeyUp.emit(event);
|
---|
465 | }
|
---|
466 | onInputFocus(event) {
|
---|
467 | if (!this.itemClicked && this.completeOnFocus) {
|
---|
468 | let queryValue = this.multiple ? this.multiInputEL.nativeElement.value : this.inputEL.nativeElement.value;
|
---|
469 | this.search(event, queryValue);
|
---|
470 | }
|
---|
471 | this.focus = true;
|
---|
472 | this.onFocus.emit(event);
|
---|
473 | this.itemClicked = false;
|
---|
474 | }
|
---|
475 | onInputBlur(event) {
|
---|
476 | this.focus = false;
|
---|
477 | this.onModelTouched();
|
---|
478 | this.onBlur.emit(event);
|
---|
479 | }
|
---|
480 | onInputChange(event) {
|
---|
481 | if (this.forceSelection) {
|
---|
482 | let valid = false;
|
---|
483 | let inputValue = event.target.value.trim();
|
---|
484 | if (this.suggestions) {
|
---|
485 | for (let suggestion of this.suggestions) {
|
---|
486 | let itemValue = this.field ? ObjectUtils.resolveFieldData(suggestion, this.field) : suggestion;
|
---|
487 | if (itemValue && inputValue === itemValue.trim()) {
|
---|
488 | valid = true;
|
---|
489 | this.forceSelectionUpdateModelTimeout = setTimeout(() => {
|
---|
490 | this.selectItem(suggestion, false);
|
---|
491 | }, 250);
|
---|
492 | break;
|
---|
493 | }
|
---|
494 | }
|
---|
495 | }
|
---|
496 | if (!valid) {
|
---|
497 | if (this.multiple) {
|
---|
498 | this.multiInputEL.nativeElement.value = '';
|
---|
499 | }
|
---|
500 | else {
|
---|
501 | this.value = null;
|
---|
502 | this.inputEL.nativeElement.value = '';
|
---|
503 | }
|
---|
504 | this.onClear.emit(event);
|
---|
505 | this.onModelChange(this.value);
|
---|
506 | this.updateFilledState();
|
---|
507 | }
|
---|
508 | }
|
---|
509 | }
|
---|
510 | onInputPaste(event) {
|
---|
511 | this.onKeydown(event);
|
---|
512 | }
|
---|
513 | isSelected(val) {
|
---|
514 | let selected = false;
|
---|
515 | if (this.value && this.value.length) {
|
---|
516 | for (let i = 0; i < this.value.length; i++) {
|
---|
517 | if (ObjectUtils.equals(this.value[i], val, this.dataKey)) {
|
---|
518 | selected = true;
|
---|
519 | break;
|
---|
520 | }
|
---|
521 | }
|
---|
522 | }
|
---|
523 | return selected;
|
---|
524 | }
|
---|
525 | findOptionIndex(option, suggestions) {
|
---|
526 | let index = -1;
|
---|
527 | if (suggestions) {
|
---|
528 | for (let i = 0; i < suggestions.length; i++) {
|
---|
529 | if (ObjectUtils.equals(option, suggestions[i])) {
|
---|
530 | index = i;
|
---|
531 | break;
|
---|
532 | }
|
---|
533 | }
|
---|
534 | }
|
---|
535 | return index;
|
---|
536 | }
|
---|
537 | findOptionGroupIndex(val, opts) {
|
---|
538 | let groupIndex, itemIndex;
|
---|
539 | if (opts) {
|
---|
540 | for (let i = 0; i < opts.length; i++) {
|
---|
541 | groupIndex = i;
|
---|
542 | itemIndex = this.findOptionIndex(val, this.getOptionGroupChildren(opts[i]));
|
---|
543 | if (itemIndex !== -1) {
|
---|
544 | break;
|
---|
545 | }
|
---|
546 | }
|
---|
547 | }
|
---|
548 | if (itemIndex !== -1) {
|
---|
549 | return { groupIndex: groupIndex, itemIndex: itemIndex };
|
---|
550 | }
|
---|
551 | else {
|
---|
552 | return -1;
|
---|
553 | }
|
---|
554 | }
|
---|
555 | updateFilledState() {
|
---|
556 | if (this.multiple)
|
---|
557 | this.filled = (this.value && this.value.length) || (this.multiInputEL && this.multiInputEL.nativeElement && this.multiInputEL.nativeElement.value != '');
|
---|
558 | else
|
---|
559 | this.filled = (this.inputFieldValue && this.inputFieldValue != '') || (this.inputEL && this.inputEL.nativeElement && this.inputEL.nativeElement.value != '');
|
---|
560 | ;
|
---|
561 | }
|
---|
562 | updateInputField() {
|
---|
563 | let formattedValue = this.resolveFieldData(this.value);
|
---|
564 | this.inputFieldValue = formattedValue;
|
---|
565 | if (this.inputEL && this.inputEL.nativeElement) {
|
---|
566 | this.inputEL.nativeElement.value = formattedValue;
|
---|
567 | }
|
---|
568 | this.updateFilledState();
|
---|
569 | }
|
---|
570 | bindDocumentClickListener() {
|
---|
571 | if (!this.documentClickListener) {
|
---|
572 | const documentTarget = this.el ? this.el.nativeElement.ownerDocument : 'document';
|
---|
573 | this.documentClickListener = this.renderer.listen(documentTarget, 'click', (event) => {
|
---|
574 | if (event.which === 3) {
|
---|
575 | return;
|
---|
576 | }
|
---|
577 | if (!this.inputClick && !this.isDropdownClick(event)) {
|
---|
578 | this.hide();
|
---|
579 | }
|
---|
580 | this.inputClick = false;
|
---|
581 | this.cd.markForCheck();
|
---|
582 | });
|
---|
583 | }
|
---|
584 | }
|
---|
585 | isDropdownClick(event) {
|
---|
586 | if (this.dropdown) {
|
---|
587 | let target = event.target;
|
---|
588 | return (target === this.dropdownButton.nativeElement || target.parentNode === this.dropdownButton.nativeElement);
|
---|
589 | }
|
---|
590 | else {
|
---|
591 | return false;
|
---|
592 | }
|
---|
593 | }
|
---|
594 | unbindDocumentClickListener() {
|
---|
595 | if (this.documentClickListener) {
|
---|
596 | this.documentClickListener();
|
---|
597 | this.documentClickListener = null;
|
---|
598 | }
|
---|
599 | }
|
---|
600 | bindDocumentResizeListener() {
|
---|
601 | this.documentResizeListener = this.onWindowResize.bind(this);
|
---|
602 | window.addEventListener('resize', this.documentResizeListener);
|
---|
603 | }
|
---|
604 | unbindDocumentResizeListener() {
|
---|
605 | if (this.documentResizeListener) {
|
---|
606 | window.removeEventListener('resize', this.documentResizeListener);
|
---|
607 | this.documentResizeListener = null;
|
---|
608 | }
|
---|
609 | }
|
---|
610 | onWindowResize() {
|
---|
611 | this.hide();
|
---|
612 | }
|
---|
613 | bindScrollListener() {
|
---|
614 | if (!this.scrollHandler) {
|
---|
615 | this.scrollHandler = new ConnectedOverlayScrollHandler(this.containerEL.nativeElement, () => {
|
---|
616 | if (this.overlayVisible) {
|
---|
617 | this.hide();
|
---|
618 | }
|
---|
619 | });
|
---|
620 | }
|
---|
621 | this.scrollHandler.bindScrollListener();
|
---|
622 | }
|
---|
623 | unbindScrollListener() {
|
---|
624 | if (this.scrollHandler) {
|
---|
625 | this.scrollHandler.unbindScrollListener();
|
---|
626 | }
|
---|
627 | }
|
---|
628 | onOverlayHide() {
|
---|
629 | this.unbindDocumentClickListener();
|
---|
630 | this.unbindDocumentResizeListener();
|
---|
631 | this.unbindScrollListener();
|
---|
632 | this.overlay = null;
|
---|
633 | this.onHide.emit();
|
---|
634 | }
|
---|
635 | ngOnDestroy() {
|
---|
636 | if (this.forceSelectionUpdateModelTimeout) {
|
---|
637 | clearTimeout(this.forceSelectionUpdateModelTimeout);
|
---|
638 | this.forceSelectionUpdateModelTimeout = null;
|
---|
639 | }
|
---|
640 | if (this.scrollHandler) {
|
---|
641 | this.scrollHandler.destroy();
|
---|
642 | this.scrollHandler = null;
|
---|
643 | }
|
---|
644 | if (this.overlay) {
|
---|
645 | ZIndexUtils.clear(this.overlay);
|
---|
646 | }
|
---|
647 | this.restoreOverlayAppend();
|
---|
648 | this.onOverlayHide();
|
---|
649 | }
|
---|
650 | }
|
---|
651 | AutoComplete.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: AutoComplete, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.IterableDiffers }, { token: i1.PrimeNGConfig }, { token: i1.OverlayService }], target: i0.ɵɵFactoryTarget.Component });
|
---|
652 | AutoComplete.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: AutoComplete, selector: "p-autoComplete", inputs: { minLength: "minLength", delay: "delay", style: "style", panelStyle: "panelStyle", styleClass: "styleClass", panelStyleClass: "panelStyleClass", inputStyle: "inputStyle", inputId: "inputId", inputStyleClass: "inputStyleClass", placeholder: "placeholder", readonly: "readonly", disabled: "disabled", virtualScroll: "virtualScroll", itemSize: "itemSize", maxlength: "maxlength", name: "name", required: "required", size: "size", appendTo: "appendTo", autoHighlight: "autoHighlight", forceSelection: "forceSelection", type: "type", autoZIndex: "autoZIndex", baseZIndex: "baseZIndex", ariaLabel: "ariaLabel", dropdownAriaLabel: "dropdownAriaLabel", ariaLabelledBy: "ariaLabelledBy", dropdownIcon: "dropdownIcon", unique: "unique", group: "group", completeOnFocus: "completeOnFocus", field: "field", scrollHeight: "scrollHeight", dropdown: "dropdown", showEmptyMessage: "showEmptyMessage", dropdownMode: "dropdownMode", multiple: "multiple", tabindex: "tabindex", dataKey: "dataKey", emptyMessage: "emptyMessage", showTransitionOptions: "showTransitionOptions", hideTransitionOptions: "hideTransitionOptions", autofocus: "autofocus", autocomplete: "autocomplete", optionGroupChildren: "optionGroupChildren", optionGroupLabel: "optionGroupLabel", suggestions: "suggestions" }, outputs: { completeMethod: "completeMethod", onSelect: "onSelect", onUnselect: "onUnselect", onFocus: "onFocus", onBlur: "onBlur", onDropdownClick: "onDropdownClick", onClear: "onClear", onKeyUp: "onKeyUp", onShow: "onShow", onHide: "onHide" }, host: { properties: { "class.p-inputwrapper-filled": "filled", "class.p-inputwrapper-focus": "(focus && !disabled) ||\u00A0overlayVisible" }, classAttribute: "p-element p-inputwrapper" }, providers: [AUTOCOMPLETE_VALUE_ACCESSOR], queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "containerEL", first: true, predicate: ["container"], descendants: true }, { propertyName: "inputEL", first: true, predicate: ["in"], descendants: true }, { propertyName: "multiInputEL", first: true, predicate: ["multiIn"], descendants: true }, { propertyName: "multiContainerEL", first: true, predicate: ["multiContainer"], descendants: true }, { propertyName: "dropdownButton", first: true, predicate: ["ddBtn"], descendants: true }, { propertyName: "viewPort", first: true, predicate: CdkVirtualScrollViewport, descendants: true }], ngImport: i0, template: `
|
---|
653 | <span #container [ngClass]="{'p-autocomplete p-component':true,'p-autocomplete-dd':dropdown,'p-autocomplete-multiple':multiple}" [ngStyle]="style" [class]="styleClass">
|
---|
654 | <input *ngIf="!multiple" #in [attr.type]="type" [attr.id]="inputId" [ngStyle]="inputStyle" [class]="inputStyleClass" [autocomplete]="autocomplete" [attr.required]="required" [attr.name]="name"
|
---|
655 | class="p-autocomplete-input p-inputtext p-component" [ngClass]="{'p-autocomplete-dd-input':dropdown,'p-disabled': disabled}" [value]="inputFieldValue" aria-autocomplete="list" [attr.aria-controls]="listId" role="searchbox" [attr.aria-expanded]="overlayVisible" aria-haspopup="true" [attr.aria-activedescendant]="'p-highlighted-option'"
|
---|
656 | (click)="onInputClick($event)" (input)="onInput($event)" (keydown)="onKeydown($event)" (keyup)="onKeyup($event)" [attr.autofocus]="autofocus" (focus)="onInputFocus($event)" (blur)="onInputBlur($event)" (change)="onInputChange($event)" (paste)="onInputPaste($event)"
|
---|
657 | [attr.placeholder]="placeholder" [attr.size]="size" [attr.maxlength]="maxlength" [attr.tabindex]="tabindex" [readonly]="readonly" [disabled]="disabled" [attr.aria-label]="ariaLabel" [attr.aria-labelledby]="ariaLabelledBy" [attr.aria-required]="required"
|
---|
658 | ><ul *ngIf="multiple" #multiContainer class="p-autocomplete-multiple-container p-component p-inputtext" [ngClass]="{'p-disabled':disabled,'p-focus':focus}" (click)="multiIn.focus()">
|
---|
659 | <li #token *ngFor="let val of value" class="p-autocomplete-token">
|
---|
660 | <ng-container *ngTemplateOutlet="selectedItemTemplate; context: {$implicit: val}"></ng-container>
|
---|
661 | <span *ngIf="!selectedItemTemplate" class="p-autocomplete-token-label">{{resolveFieldData(val)}}</span>
|
---|
662 | <span class="p-autocomplete-token-icon pi pi-times-circle" (click)="removeItem(token)" *ngIf="!disabled && !readonly"></span>
|
---|
663 | </li>
|
---|
664 | <li class="p-autocomplete-input-token">
|
---|
665 | <input #multiIn [attr.type]="type" [attr.id]="inputId" [disabled]="disabled" [attr.placeholder]="(value&&value.length ? null : placeholder)" [attr.tabindex]="tabindex" [attr.maxlength]="maxlength" (input)="onInput($event)" (click)="onInputClick($event)"
|
---|
666 | (keydown)="onKeydown($event)" [readonly]="readonly" (keyup)="onKeyup($event)" [attr.autofocus]="autofocus" (focus)="onInputFocus($event)" (blur)="onInputBlur($event)" (change)="onInputChange($event)" (paste)="onInputPaste($event)" [autocomplete]="autocomplete"
|
---|
667 | [ngStyle]="inputStyle" [class]="inputStyleClass" [attr.aria-label]="ariaLabel" [attr.aria-labelledby]="ariaLabelledBy" [attr.aria-required]="required"
|
---|
668 | aria-autocomplete="list" [attr.aria-controls]="listId" role="searchbox" [attr.aria-expanded]="overlayVisible" aria-haspopup="true" [attr.aria-activedescendant]="'p-highlighted-option'">
|
---|
669 | </li>
|
---|
670 | </ul>
|
---|
671 | <i *ngIf="loading" class="p-autocomplete-loader pi pi-spinner pi-spin"></i><button #ddBtn type="button" pButton [icon]="dropdownIcon" [attr.aria-label]="dropdownAriaLabel" class="p-autocomplete-dropdown" [disabled]="disabled" pRipple
|
---|
672 | (click)="handleDropdownClick($event)" *ngIf="dropdown" [attr.tabindex]="tabindex"></button>
|
---|
673 | <div #panel *ngIf="overlayVisible" (click)="onOverlayClick($event)" [ngClass]="['p-autocomplete-panel p-component']" [style.max-height]="virtualScroll ? 'auto' : scrollHeight" [ngStyle]="panelStyle" [class]="panelStyleClass"
|
---|
674 | [@overlayAnimation]="{value: 'visible', params: {showTransitionParams: showTransitionOptions, hideTransitionParams: hideTransitionOptions}}" (@overlayAnimation.start)="onOverlayAnimationStart($event)" (@overlayAnimation.done)="onOverlayAnimationEnd($event)">
|
---|
675 | <ng-container *ngTemplateOutlet="headerTemplate"></ng-container>
|
---|
676 | <ul role="listbox" [attr.id]="listId" class="p-autocomplete-items" [ngClass]="{'p-autocomplete-virtualscroll': virtualScroll}">
|
---|
677 | <ng-container *ngIf="group">
|
---|
678 | <ng-template ngFor let-optgroup [ngForOf]="suggestions">
|
---|
679 | <li class="p-autocomplete-item-group">
|
---|
680 | <span *ngIf="!groupTemplate">{{getOptionGroupLabel(optgroup)||'empty'}}</span>
|
---|
681 | <ng-container *ngTemplateOutlet="groupTemplate; context: {$implicit: optgroup}"></ng-container>
|
---|
682 | </li>
|
---|
683 | <ng-container *ngTemplateOutlet="itemslist; context: {$implicit: getOptionGroupChildren(optgroup)}"></ng-container>
|
---|
684 | </ng-template>
|
---|
685 | </ng-container>
|
---|
686 | <ng-container *ngIf="!group">
|
---|
687 | <ng-container *ngTemplateOutlet="itemslist; context: {$implicit: suggestions}"></ng-container>
|
---|
688 | </ng-container>
|
---|
689 | <ng-template #itemslist let-suggestionsToDisplay>
|
---|
690 | <ng-container *ngIf="!virtualScroll; else virtualScrollList">
|
---|
691 | <li role="option" *ngFor="let option of suggestionsToDisplay; let idx = index" class="p-autocomplete-item" pRipple [ngClass]="{'p-highlight': (option === highlightOption)}" [id]="highlightOption == option ? 'p-highlighted-option':''" (click)="selectItem(option)">
|
---|
692 | <span *ngIf="!itemTemplate">{{resolveFieldData(option)}}</span>
|
---|
693 | <ng-container *ngTemplateOutlet="itemTemplate; context: {$implicit: option, index: idx}"></ng-container>
|
---|
694 | </li>
|
---|
695 | </ng-container>
|
---|
696 | <ng-template #virtualScrollList>
|
---|
697 | <cdk-virtual-scroll-viewport [ngStyle]="{'height': scrollHeight}" [itemSize]="itemSize" *ngIf="virtualScroll && !noResults">
|
---|
698 | <ng-container *cdkVirtualFor="let option of suggestionsToDisplay; let i = index; let c = count; let f = first; let l = last; let e = even; let o = odd">
|
---|
699 | <li role="option" class="p-autocomplete-item" pRipple [ngClass]="{'p-highlight': (option === highlightOption)}" [ngStyle]="{'height': itemSize + 'px'}" [id]="highlightOption == option ? 'p-highlighted-option':''" (click)="selectItem(option)">
|
---|
700 | <span *ngIf="!itemTemplate">{{resolveFieldData(option)}}</span>
|
---|
701 | <ng-container *ngTemplateOutlet="itemTemplate; context: {$implicit: option, index: i}"></ng-container>
|
---|
702 | </li>
|
---|
703 | </ng-container>
|
---|
704 | </cdk-virtual-scroll-viewport>
|
---|
705 | </ng-template>
|
---|
706 | <li *ngIf="noResults && showEmptyMessage" class="p-autocomplete-empty-message">
|
---|
707 | <ng-container *ngIf="!emptyTemplate; else empty">
|
---|
708 | {{emptyMessageLabel}}
|
---|
709 | </ng-container>
|
---|
710 | <ng-container #empty *ngTemplateOutlet="emptyTemplate"></ng-container>
|
---|
711 | </li>
|
---|
712 | </ng-template>
|
---|
713 | </ul>
|
---|
714 | <ng-container *ngTemplateOutlet="footerTemplate"></ng-container>
|
---|
715 | </div>
|
---|
716 | </span>
|
---|
717 | `, isInline: true, styles: [".p-autocomplete{display:inline-flex;position:relative}.p-autocomplete-loader{position:absolute;top:50%;margin-top:-.5rem}.p-autocomplete-dd .p-autocomplete-input{flex:1 1 auto;width:1%}.p-autocomplete-dd .p-autocomplete-input,.p-autocomplete-dd .p-autocomplete-multiple-container{border-top-right-radius:0;border-bottom-right-radius:0}.p-autocomplete-dd .p-autocomplete-dropdown{border-top-left-radius:0;border-bottom-left-radius:0}.p-autocomplete .p-autocomplete-panel{min-width:100%;top:0;left:0}.p-autocomplete-panel{position:absolute;overflow:auto}.p-autocomplete-items{margin:0;padding:0;list-style-type:none}.p-autocomplete-item{cursor:pointer;white-space:nowrap;position:relative;overflow:hidden}.p-autocomplete-multiple-container{margin:0;padding:0;list-style-type:none;cursor:text;overflow:hidden;display:flex;align-items:center;flex-wrap:wrap}.p-autocomplete-token{cursor:default;display:inline-flex;align-items:center;flex:0 0 auto}.p-autocomplete-token-icon{cursor:pointer}.p-autocomplete-input-token{flex:1 1 auto;display:inline-flex}.p-autocomplete-input-token input{border:0 none;outline:0 none;background-color:transparent;margin:0;padding:0;box-shadow:none;border-radius:0;width:100%}.p-fluid .p-autocomplete{display:flex}.p-fluid .p-autocomplete-dd .p-autocomplete-input{width:1%}\n"], components: [{ type: i2.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }], directives: [{ type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { type: i5.Ripple, selector: "[pRipple]" }, { type: i2.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { type: i2.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }], animations: [
|
---|
718 | trigger('overlayAnimation', [
|
---|
719 | transition(':enter', [
|
---|
720 | style({ opacity: 0, transform: 'scaleY(0.8)' }),
|
---|
721 | animate('{{showTransitionParams}}')
|
---|
722 | ]),
|
---|
723 | transition(':leave', [
|
---|
724 | animate('{{hideTransitionParams}}', style({ opacity: 0 }))
|
---|
725 | ])
|
---|
726 | ])
|
---|
727 | ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
---|
728 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: AutoComplete, decorators: [{
|
---|
729 | type: Component,
|
---|
730 | args: [{ selector: 'p-autoComplete', template: `
|
---|
731 | <span #container [ngClass]="{'p-autocomplete p-component':true,'p-autocomplete-dd':dropdown,'p-autocomplete-multiple':multiple}" [ngStyle]="style" [class]="styleClass">
|
---|
732 | <input *ngIf="!multiple" #in [attr.type]="type" [attr.id]="inputId" [ngStyle]="inputStyle" [class]="inputStyleClass" [autocomplete]="autocomplete" [attr.required]="required" [attr.name]="name"
|
---|
733 | class="p-autocomplete-input p-inputtext p-component" [ngClass]="{'p-autocomplete-dd-input':dropdown,'p-disabled': disabled}" [value]="inputFieldValue" aria-autocomplete="list" [attr.aria-controls]="listId" role="searchbox" [attr.aria-expanded]="overlayVisible" aria-haspopup="true" [attr.aria-activedescendant]="'p-highlighted-option'"
|
---|
734 | (click)="onInputClick($event)" (input)="onInput($event)" (keydown)="onKeydown($event)" (keyup)="onKeyup($event)" [attr.autofocus]="autofocus" (focus)="onInputFocus($event)" (blur)="onInputBlur($event)" (change)="onInputChange($event)" (paste)="onInputPaste($event)"
|
---|
735 | [attr.placeholder]="placeholder" [attr.size]="size" [attr.maxlength]="maxlength" [attr.tabindex]="tabindex" [readonly]="readonly" [disabled]="disabled" [attr.aria-label]="ariaLabel" [attr.aria-labelledby]="ariaLabelledBy" [attr.aria-required]="required"
|
---|
736 | ><ul *ngIf="multiple" #multiContainer class="p-autocomplete-multiple-container p-component p-inputtext" [ngClass]="{'p-disabled':disabled,'p-focus':focus}" (click)="multiIn.focus()">
|
---|
737 | <li #token *ngFor="let val of value" class="p-autocomplete-token">
|
---|
738 | <ng-container *ngTemplateOutlet="selectedItemTemplate; context: {$implicit: val}"></ng-container>
|
---|
739 | <span *ngIf="!selectedItemTemplate" class="p-autocomplete-token-label">{{resolveFieldData(val)}}</span>
|
---|
740 | <span class="p-autocomplete-token-icon pi pi-times-circle" (click)="removeItem(token)" *ngIf="!disabled && !readonly"></span>
|
---|
741 | </li>
|
---|
742 | <li class="p-autocomplete-input-token">
|
---|
743 | <input #multiIn [attr.type]="type" [attr.id]="inputId" [disabled]="disabled" [attr.placeholder]="(value&&value.length ? null : placeholder)" [attr.tabindex]="tabindex" [attr.maxlength]="maxlength" (input)="onInput($event)" (click)="onInputClick($event)"
|
---|
744 | (keydown)="onKeydown($event)" [readonly]="readonly" (keyup)="onKeyup($event)" [attr.autofocus]="autofocus" (focus)="onInputFocus($event)" (blur)="onInputBlur($event)" (change)="onInputChange($event)" (paste)="onInputPaste($event)" [autocomplete]="autocomplete"
|
---|
745 | [ngStyle]="inputStyle" [class]="inputStyleClass" [attr.aria-label]="ariaLabel" [attr.aria-labelledby]="ariaLabelledBy" [attr.aria-required]="required"
|
---|
746 | aria-autocomplete="list" [attr.aria-controls]="listId" role="searchbox" [attr.aria-expanded]="overlayVisible" aria-haspopup="true" [attr.aria-activedescendant]="'p-highlighted-option'">
|
---|
747 | </li>
|
---|
748 | </ul>
|
---|
749 | <i *ngIf="loading" class="p-autocomplete-loader pi pi-spinner pi-spin"></i><button #ddBtn type="button" pButton [icon]="dropdownIcon" [attr.aria-label]="dropdownAriaLabel" class="p-autocomplete-dropdown" [disabled]="disabled" pRipple
|
---|
750 | (click)="handleDropdownClick($event)" *ngIf="dropdown" [attr.tabindex]="tabindex"></button>
|
---|
751 | <div #panel *ngIf="overlayVisible" (click)="onOverlayClick($event)" [ngClass]="['p-autocomplete-panel p-component']" [style.max-height]="virtualScroll ? 'auto' : scrollHeight" [ngStyle]="panelStyle" [class]="panelStyleClass"
|
---|
752 | [@overlayAnimation]="{value: 'visible', params: {showTransitionParams: showTransitionOptions, hideTransitionParams: hideTransitionOptions}}" (@overlayAnimation.start)="onOverlayAnimationStart($event)" (@overlayAnimation.done)="onOverlayAnimationEnd($event)">
|
---|
753 | <ng-container *ngTemplateOutlet="headerTemplate"></ng-container>
|
---|
754 | <ul role="listbox" [attr.id]="listId" class="p-autocomplete-items" [ngClass]="{'p-autocomplete-virtualscroll': virtualScroll}">
|
---|
755 | <ng-container *ngIf="group">
|
---|
756 | <ng-template ngFor let-optgroup [ngForOf]="suggestions">
|
---|
757 | <li class="p-autocomplete-item-group">
|
---|
758 | <span *ngIf="!groupTemplate">{{getOptionGroupLabel(optgroup)||'empty'}}</span>
|
---|
759 | <ng-container *ngTemplateOutlet="groupTemplate; context: {$implicit: optgroup}"></ng-container>
|
---|
760 | </li>
|
---|
761 | <ng-container *ngTemplateOutlet="itemslist; context: {$implicit: getOptionGroupChildren(optgroup)}"></ng-container>
|
---|
762 | </ng-template>
|
---|
763 | </ng-container>
|
---|
764 | <ng-container *ngIf="!group">
|
---|
765 | <ng-container *ngTemplateOutlet="itemslist; context: {$implicit: suggestions}"></ng-container>
|
---|
766 | </ng-container>
|
---|
767 | <ng-template #itemslist let-suggestionsToDisplay>
|
---|
768 | <ng-container *ngIf="!virtualScroll; else virtualScrollList">
|
---|
769 | <li role="option" *ngFor="let option of suggestionsToDisplay; let idx = index" class="p-autocomplete-item" pRipple [ngClass]="{'p-highlight': (option === highlightOption)}" [id]="highlightOption == option ? 'p-highlighted-option':''" (click)="selectItem(option)">
|
---|
770 | <span *ngIf="!itemTemplate">{{resolveFieldData(option)}}</span>
|
---|
771 | <ng-container *ngTemplateOutlet="itemTemplate; context: {$implicit: option, index: idx}"></ng-container>
|
---|
772 | </li>
|
---|
773 | </ng-container>
|
---|
774 | <ng-template #virtualScrollList>
|
---|
775 | <cdk-virtual-scroll-viewport [ngStyle]="{'height': scrollHeight}" [itemSize]="itemSize" *ngIf="virtualScroll && !noResults">
|
---|
776 | <ng-container *cdkVirtualFor="let option of suggestionsToDisplay; let i = index; let c = count; let f = first; let l = last; let e = even; let o = odd">
|
---|
777 | <li role="option" class="p-autocomplete-item" pRipple [ngClass]="{'p-highlight': (option === highlightOption)}" [ngStyle]="{'height': itemSize + 'px'}" [id]="highlightOption == option ? 'p-highlighted-option':''" (click)="selectItem(option)">
|
---|
778 | <span *ngIf="!itemTemplate">{{resolveFieldData(option)}}</span>
|
---|
779 | <ng-container *ngTemplateOutlet="itemTemplate; context: {$implicit: option, index: i}"></ng-container>
|
---|
780 | </li>
|
---|
781 | </ng-container>
|
---|
782 | </cdk-virtual-scroll-viewport>
|
---|
783 | </ng-template>
|
---|
784 | <li *ngIf="noResults && showEmptyMessage" class="p-autocomplete-empty-message">
|
---|
785 | <ng-container *ngIf="!emptyTemplate; else empty">
|
---|
786 | {{emptyMessageLabel}}
|
---|
787 | </ng-container>
|
---|
788 | <ng-container #empty *ngTemplateOutlet="emptyTemplate"></ng-container>
|
---|
789 | </li>
|
---|
790 | </ng-template>
|
---|
791 | </ul>
|
---|
792 | <ng-container *ngTemplateOutlet="footerTemplate"></ng-container>
|
---|
793 | </div>
|
---|
794 | </span>
|
---|
795 | `, animations: [
|
---|
796 | trigger('overlayAnimation', [
|
---|
797 | transition(':enter', [
|
---|
798 | style({ opacity: 0, transform: 'scaleY(0.8)' }),
|
---|
799 | animate('{{showTransitionParams}}')
|
---|
800 | ]),
|
---|
801 | transition(':leave', [
|
---|
802 | animate('{{hideTransitionParams}}', style({ opacity: 0 }))
|
---|
803 | ])
|
---|
804 | ])
|
---|
805 | ], host: {
|
---|
806 | 'class': 'p-element p-inputwrapper',
|
---|
807 | '[class.p-inputwrapper-filled]': 'filled',
|
---|
808 | '[class.p-inputwrapper-focus]': '(focus && !disabled) || overlayVisible'
|
---|
809 | }, providers: [AUTOCOMPLETE_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: [".p-autocomplete{display:inline-flex;position:relative}.p-autocomplete-loader{position:absolute;top:50%;margin-top:-.5rem}.p-autocomplete-dd .p-autocomplete-input{flex:1 1 auto;width:1%}.p-autocomplete-dd .p-autocomplete-input,.p-autocomplete-dd .p-autocomplete-multiple-container{border-top-right-radius:0;border-bottom-right-radius:0}.p-autocomplete-dd .p-autocomplete-dropdown{border-top-left-radius:0;border-bottom-left-radius:0}.p-autocomplete .p-autocomplete-panel{min-width:100%;top:0;left:0}.p-autocomplete-panel{position:absolute;overflow:auto}.p-autocomplete-items{margin:0;padding:0;list-style-type:none}.p-autocomplete-item{cursor:pointer;white-space:nowrap;position:relative;overflow:hidden}.p-autocomplete-multiple-container{margin:0;padding:0;list-style-type:none;cursor:text;overflow:hidden;display:flex;align-items:center;flex-wrap:wrap}.p-autocomplete-token{cursor:default;display:inline-flex;align-items:center;flex:0 0 auto}.p-autocomplete-token-icon{cursor:pointer}.p-autocomplete-input-token{flex:1 1 auto;display:inline-flex}.p-autocomplete-input-token input{border:0 none;outline:0 none;background-color:transparent;margin:0;padding:0;box-shadow:none;border-radius:0;width:100%}.p-fluid .p-autocomplete{display:flex}.p-fluid .p-autocomplete-dd .p-autocomplete-input{width:1%}\n"] }]
|
---|
810 | }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i0.IterableDiffers }, { type: i1.PrimeNGConfig }, { type: i1.OverlayService }]; }, propDecorators: { minLength: [{
|
---|
811 | type: Input
|
---|
812 | }], delay: [{
|
---|
813 | type: Input
|
---|
814 | }], style: [{
|
---|
815 | type: Input
|
---|
816 | }], panelStyle: [{
|
---|
817 | type: Input
|
---|
818 | }], styleClass: [{
|
---|
819 | type: Input
|
---|
820 | }], panelStyleClass: [{
|
---|
821 | type: Input
|
---|
822 | }], inputStyle: [{
|
---|
823 | type: Input
|
---|
824 | }], inputId: [{
|
---|
825 | type: Input
|
---|
826 | }], inputStyleClass: [{
|
---|
827 | type: Input
|
---|
828 | }], placeholder: [{
|
---|
829 | type: Input
|
---|
830 | }], readonly: [{
|
---|
831 | type: Input
|
---|
832 | }], disabled: [{
|
---|
833 | type: Input
|
---|
834 | }], virtualScroll: [{
|
---|
835 | type: Input
|
---|
836 | }], itemSize: [{
|
---|
837 | type: Input
|
---|
838 | }], maxlength: [{
|
---|
839 | type: Input
|
---|
840 | }], name: [{
|
---|
841 | type: Input
|
---|
842 | }], required: [{
|
---|
843 | type: Input
|
---|
844 | }], size: [{
|
---|
845 | type: Input
|
---|
846 | }], appendTo: [{
|
---|
847 | type: Input
|
---|
848 | }], autoHighlight: [{
|
---|
849 | type: Input
|
---|
850 | }], forceSelection: [{
|
---|
851 | type: Input
|
---|
852 | }], type: [{
|
---|
853 | type: Input
|
---|
854 | }], autoZIndex: [{
|
---|
855 | type: Input
|
---|
856 | }], baseZIndex: [{
|
---|
857 | type: Input
|
---|
858 | }], ariaLabel: [{
|
---|
859 | type: Input
|
---|
860 | }], dropdownAriaLabel: [{
|
---|
861 | type: Input
|
---|
862 | }], ariaLabelledBy: [{
|
---|
863 | type: Input
|
---|
864 | }], dropdownIcon: [{
|
---|
865 | type: Input
|
---|
866 | }], unique: [{
|
---|
867 | type: Input
|
---|
868 | }], group: [{
|
---|
869 | type: Input
|
---|
870 | }], completeOnFocus: [{
|
---|
871 | type: Input
|
---|
872 | }], completeMethod: [{
|
---|
873 | type: Output
|
---|
874 | }], onSelect: [{
|
---|
875 | type: Output
|
---|
876 | }], onUnselect: [{
|
---|
877 | type: Output
|
---|
878 | }], onFocus: [{
|
---|
879 | type: Output
|
---|
880 | }], onBlur: [{
|
---|
881 | type: Output
|
---|
882 | }], onDropdownClick: [{
|
---|
883 | type: Output
|
---|
884 | }], onClear: [{
|
---|
885 | type: Output
|
---|
886 | }], onKeyUp: [{
|
---|
887 | type: Output
|
---|
888 | }], onShow: [{
|
---|
889 | type: Output
|
---|
890 | }], onHide: [{
|
---|
891 | type: Output
|
---|
892 | }], field: [{
|
---|
893 | type: Input
|
---|
894 | }], scrollHeight: [{
|
---|
895 | type: Input
|
---|
896 | }], dropdown: [{
|
---|
897 | type: Input
|
---|
898 | }], showEmptyMessage: [{
|
---|
899 | type: Input
|
---|
900 | }], dropdownMode: [{
|
---|
901 | type: Input
|
---|
902 | }], multiple: [{
|
---|
903 | type: Input
|
---|
904 | }], tabindex: [{
|
---|
905 | type: Input
|
---|
906 | }], dataKey: [{
|
---|
907 | type: Input
|
---|
908 | }], emptyMessage: [{
|
---|
909 | type: Input
|
---|
910 | }], showTransitionOptions: [{
|
---|
911 | type: Input
|
---|
912 | }], hideTransitionOptions: [{
|
---|
913 | type: Input
|
---|
914 | }], autofocus: [{
|
---|
915 | type: Input
|
---|
916 | }], autocomplete: [{
|
---|
917 | type: Input
|
---|
918 | }], optionGroupChildren: [{
|
---|
919 | type: Input
|
---|
920 | }], optionGroupLabel: [{
|
---|
921 | type: Input
|
---|
922 | }], containerEL: [{
|
---|
923 | type: ViewChild,
|
---|
924 | args: ['container']
|
---|
925 | }], inputEL: [{
|
---|
926 | type: ViewChild,
|
---|
927 | args: ['in']
|
---|
928 | }], multiInputEL: [{
|
---|
929 | type: ViewChild,
|
---|
930 | args: ['multiIn']
|
---|
931 | }], multiContainerEL: [{
|
---|
932 | type: ViewChild,
|
---|
933 | args: ['multiContainer']
|
---|
934 | }], dropdownButton: [{
|
---|
935 | type: ViewChild,
|
---|
936 | args: ['ddBtn']
|
---|
937 | }], viewPort: [{
|
---|
938 | type: ViewChild,
|
---|
939 | args: [CdkVirtualScrollViewport]
|
---|
940 | }], templates: [{
|
---|
941 | type: ContentChildren,
|
---|
942 | args: [PrimeTemplate]
|
---|
943 | }], suggestions: [{
|
---|
944 | type: Input
|
---|
945 | }] } });
|
---|
946 | export class AutoCompleteModule {
|
---|
947 | }
|
---|
948 | AutoCompleteModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: AutoCompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
---|
949 | AutoCompleteModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: AutoCompleteModule, declarations: [AutoComplete], imports: [CommonModule, InputTextModule, ButtonModule, SharedModule, RippleModule, ScrollingModule], exports: [AutoComplete, SharedModule, ScrollingModule] });
|
---|
950 | AutoCompleteModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: AutoCompleteModule, imports: [[CommonModule, InputTextModule, ButtonModule, SharedModule, RippleModule, ScrollingModule], SharedModule, ScrollingModule] });
|
---|
951 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: AutoCompleteModule, decorators: [{
|
---|
952 | type: NgModule,
|
---|
953 | args: [{
|
---|
954 | imports: [CommonModule, InputTextModule, ButtonModule, SharedModule, RippleModule, ScrollingModule],
|
---|
955 | exports: [AutoComplete, SharedModule, ScrollingModule],
|
---|
956 | declarations: [AutoComplete]
|
---|
957 | }]
|
---|
958 | }] });
|
---|
959 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0b2NvbXBsZXRlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2FwcC9jb21wb25lbnRzL2F1dG9jb21wbGV0ZS9hdXRvY29tcGxldGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFFBQVEsRUFBQyxTQUFTLEVBQUMsU0FBUyxFQUF3RCxLQUFLLEVBQUMsTUFBTSxFQUFDLFlBQVksRUFBQyxlQUFlLEVBQWlDLFVBQVUsRUFBbUMsdUJBQXVCLEVBQUUsaUJBQWlCLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDcFIsT0FBTyxFQUFDLFlBQVksRUFBQyxNQUFNLGlCQUFpQixDQUFDO0FBQzdDLE9BQU8sRUFBQyxPQUFPLEVBQUMsS0FBSyxFQUFDLFVBQVUsRUFBQyxPQUFPLEVBQWdCLE1BQU0scUJBQXFCLENBQUM7QUFDcEYsT0FBTyxFQUFDLGVBQWUsRUFBQyxNQUFNLG1CQUFtQixDQUFDO0FBQ2xELE9BQU8sRUFBQyxZQUFZLEVBQUMsTUFBTSxnQkFBZ0IsQ0FBQztBQUM1QyxPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0sZ0JBQWdCLENBQUM7QUFDNUMsT0FBTyxFQUFDLFlBQVksRUFBQyxhQUFhLE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yLmlkXT1cImxpc3RJZFwiIGNsYXNzPVwicC1hdXRvY29tcGxldGUtaXRlbXNcIiBbbmdDbGFzc109XCJ7J3AtYXV0b2NvbXBsZXRlLXZpcnR1YWxzY3JvbGwnOiB2aXJ0dWFsU2Nyb2xsfVwiPlxuICAgICAgICAgICAgICAgICAgICA8bmctY29udGFpbmVyICpuZ0lmPVwiZ3JvdXBcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxuZy10ZW1wbGF0ZSBuZ0ZvciBsZXQtb3B0Z3JvdXAgW25nRm9yT2ZdPVwic3VnZ2VzdGlvbnNcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bGkgY2xhc3M9XCJwLWF1dG9jb21wbGV0ZS1pdGVtLWdyb3VwXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuICpuZ0lmPVwiIWdyb3VwVGVtcGxhdGVcIj57e2dldE9wdGlvbkdyb3VwTGFiZWwob3B0Z3JvdXApfHwnZW1wdHknfX08L3NwYW4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nVGVtcGxhdGVPdXRsZXQ9XCJncm91cFRlbXBsYXRlOyBjb250ZXh0OiB7JGltcGxpY2l0OiBvcHRncm91cH1cIj48L25nLWNvbnRhaW5lcj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2xpPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nVGVtcGxhdGVPdXRsZXQ9XCJpdGVtc2xpc3Q7IGNvbnRleHQ6IHskaW1wbGljaXQ6IGdldE9wdGlvbkdyb3VwQ2hpbGRyZW4ob3B0Z3JvdXApfVwiPjwvbmctY29udGFpbmVyPlxuICAgICAgICAgICAgICAgICAgICAgICAgPC9uZy10ZW1wbGF0ZT5cbiAgICAgICAgICAgICAgICAgICAgPC9uZy1jb250YWluZXI+XG4gICAgICAgICAgICAgICAgICAgIDxuZy1j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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiAqbmdJZj1cIiFpdGVtVGVtcGxhdGVcIj57e3Jlc29sdmVGaWVsZERhdGEob3B0aW9uKX19PC9zcGFuPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nVGVtcGxhdGVPdXRsZXQ9XCJpdGVtVGVtcGxhdGU7IGNvbnRleHQ6IHskaW1wbGljaXQ6IG9wdGlvbiwgaW5kZXg6IGl9XCI+PC9uZy1jb250YWluZXI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2xpPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Nkay12aXJ0dWFsLXNjcm9sbC12aWV3cG9ydD5cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvbmctdGVtcGxhdGU+XG4gICAgICAgICAgICAgICAgICAgICAgICA8bGkgKm5nSWY9XCJub1Jlc3VsdHMgJiYgc2hvd0VtcHR5TWVzc2FnZVwiIGNsYXNzPVwicC1hdXRvY29tcGxldGUtZW1wdHktbWVzc2FnZVwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nSWY9XCIhZW1wdHlUZW1wbGF0ZTsgZWxzZSBlbXB0eVwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7e2VtcHR5TWVzc2FnZUxhYmVsfX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bmctY29udGFpbmVyICNlbXB0eSAqbmdUZW1wbGF0ZU91dGxldD1cImVtcHR5VGVtcGxhdGVcIj48L25nLWNvbnRhaW5lcj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvbGk+XG4gICAgICAgICAgICAgICAg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WdnZXN0aW9uc1VwZGF0ZWQgJiYgdGhpcy5vdmVybGF5ICYmIHRoaXMub3ZlcmxheS5vZmZzZXRQYXJlbnQpIHtcbiAgICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLm92ZXJsYXkpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5hbGlnbk92ZXJsYXkoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LCAxKTtcbiAgICAgICAgICAgIHRoaXMuc3VnZ2VzdGlvbnNVcGRhdGVkID0gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodGhpcy5oaWdobGlnaHRPcHRpb25DaGFuZ2VkKSB7XG4gICAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5vdmVybGF5ICYmIHRoaXMuaXRlbXNXcmFwcGVyKSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCBsaXN0SXRlbSA9IERvbUhhbmRsZXIuZmluZFNpbmdsZSh0aGlzLm92ZXJsYXksICdsaS5wLWhpZ2hsaWdodCcpO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChsaXN0SXRlbSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgRG9tSGFuZGxlci5zY3JvbGxJblZpZXcodGhpcy5pdGVtc1dyYXBwZXIsIGxpc3RJdGVtKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLnZpcnR1YWxTY3JvbGwgJiYgdGhpcy52aWV3UG9ydCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJhbmdlID0gdGhpcy52aWV3UG9ydC5nZXRSZW5kZXJlZFJhbmdlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZVZpcnR1YWxTY3JvbGxTZWxlY3RlZEluZGV4KCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyYW5nZS5zdGFydCA+IHRoaXMudmlydHVhbFNjcm9sbFNlbGVjdGVkSW5kZXggfHwgcmFuZ2UuZW5kIDwgdGhpcy52aXJ0dWFsU2Nyb2xsU2VsZWN0ZWRJbmRleCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudmlld1BvcnQuc2Nyb2xsVG9JbmRleCh0aGlzLnZpcnR1YWxTY3JvbGxTZWxlY3RlZEluZGV4KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sIDEpO1xuICAgICAgICAgICAgdGhpcy5oaWdobGlnaHRPcHRpb25DaGFuZ2VkID0gZmFsc2U7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBoYW5kbGVTdWdnZXN0aW9uc0NoYW5nZSgpIHtcbiAgICAgICAgaWYgKHRoaXMuX3N1Z2dlc3Rpb25zICE9IG51bGwgJiYgdGhpcy5sb2FkaW5nKSB7XG4gICAgICAgICAgICB0aGlzLmhpZ2hsaWdodE9wdGlvbiA9IG51bGw7XG4gICAgICAgICAgICBpZiAodGhpcy5fc3VnZ2VzdGlvbnMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5ub1Jlc3VsdHMgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB0aGlzLnNob3coKTtcbiAgICAgICAgICAgICAgICB0aGlzLnN1Z2dlc3Rpb25zVXBkYXRlZCA9IHRydWU7XG5cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5hdXRvSGlnaGxpZ2h0KSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaGlnaGxpZ2h0T3B0aW9uID0gdGhpcy5fc3VnZ2VzdGlvbnNbMF07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5ub1Jlc3VsdHMgPSB0cnVlO1xuXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuc2hvd0VtcHR5TWVzc2FnZSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnNob3coKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zdWdnZXN0aW9uc1VwZGF0ZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5oaWRlKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0aGlzLmxvYWRpbmcgPSBmYWxzZTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG5nQWZ0ZXJDb250ZW50SW5pdCgpIHtcbiAgICAgICAgdGhpcy50ZW1wbGF0ZXMuZm9yRWFjaCgoaXRlbSkgPT4ge1xuICAgICAgICAgICAgc3dpdGNoKGl0ZW0uZ2V0VHlwZSgpKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAnaXRlbSc6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaXRlbVRlbXBsYXRlID0gaXRlbS50ZW1wbGF0ZTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIGNhc2UgJ2dyb3VwJzpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5ncm91cFRlbXBsYXRlID0gaXRlbS50ZW1wbGF0ZTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIGNhc2UgJ3NlbGVjdGVkSXRlbSc6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRJdGVtVGVtcGxhdGUgPSBpdGVtLnRlbXBsYXRlO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgY2FzZSAnaGVhZGVyJzpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5oZWFkZXJUZW1wbGF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xkZXIgaXMgY2xpY2tlZCwgdGhlIG9uSW5wdXQgZXZlbnQgaXMgaW52b2tlZCBpbiBJRS5cbiAgICAgICAgaWYgKCF0aGlzLmlucHV0S2V5RG93biAmJiBEb21IYW5kbGVyLmlzSUUoKSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRoaXMudGltZW91dCkge1xuICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHRoaXMudGltZW91dCk7XG4gICAgICAgIH1cblxuICAgICAgICBsZXQgdmFsdWUgPSAoPEhUTUxJbnB1dEVsZW1lbnQ+IGV2ZW50LnRhcmdldCkudmFsdWU7XG4gICAgICAgIGlmICghdGhpcy5tdWx0aXBsZSAmJiAhdGhpcy5mb3JjZVNlbGVjdGlvbikge1xuICAgICAgICAgICAgdGhpcy5vbk1vZGVsQ2hhbmdlKHZhbHVlKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh2YWx1ZS5sZW5ndGggPT09IDAgJiYgIXRoaXMubXVsdGlwbGUpIHtcbiAgICAgICAgICAgIHRoaXMuaGlkZSgpO1xuICAgICAgICAgICAgdGhpcy5vbkNsZWFyLmVtaXQoZXZlbnQpO1xuXHQgICAgICAgIHRoaXMub25Nb2RlbENoYW5nZSh2YWx1ZSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodmFsdWUubGVuZ3RoID49IHRoaXMubWluTGVuZ3RoKSB7XG4gICAgICAgICAgICB0aGlzLnRpbWVvdXQgPSBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgICAgICAgICB0aGlzLnNlYXJjaChldmVudCwgdmFsdWUpO1xuICAgICAgICAgICAgfSwgdGhpcy5kZWxheSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB0aGlzLmhpZGUoKTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLnVwZGF0ZUZpbGxlZFN0YXRlKCk7XG4gICAgICAgIHRoaXMua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GlzLmlucHV0RUwubmF0aXZlRWxlbWVudC5vd25lckRvY3VtZW50LmFjdGl2ZUVsZW1lbnQgPT0gdGhpcy5pbnB1dEVMLm5hdGl2ZUVsZW1lbnQ7XG5cbiAgICAgICAgICAgIGlmICghdGhpcy5vdmVybGF5VmlzaWJsZSAmJiBoYXNGb2N1cykge1xuICAgICAgICAgICAgICAgIHRoaXMub3ZlcmxheVZpc2libGUgPSB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgb25PdmVybGF5QW5pbWF0aW9uU3RhcnQoZXZlbnQ6IEFuaW1hdGlvbkV2ZW50KSB7XG4gICAgICAgIHN3aXRjaCAoZXZlbnQudG9TdGF0ZSkge1xuICAgICAgICAgICAgY2FzZSAndmlzaWJsZSc6XG4gICAgICAgICAgICAgICAgdGhpcy5vdmVybGF5ID0gZXZlbnQuZWxlbWVudDtcbiAgICAgICAgICAgICAgICB0aGlzLml0ZW1zV3JhcHBlciA9IHRoaXMudmlydHVhbFNjcm9sbCA/IERvbUhhbmRsZXIuZmluZFNpbmdsZSh0aGlzLm92ZXJsYXksICcuY2RrLXZpcnR1YWwtc2Nyb2xsLXZpZXdwb3J0JykgOiB0aGlzLm92ZXJsYXk7XG4gICAgICAgICAgICAgICAgdGhpcy5hcHBlbmRPdmVybGF5KCk7XG5cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5hdXRvWkluZGV4KSB7XG4gICAgICAgICAgICAgICAgICAgIFpJbmRleFV0aWxzLnNldCgnb3ZlcmxheScsIHRoaXMub3ZlcmxheSwgdGhpcy5iYXNlWkluZGV4ICsgdGhpcy5jb25maWcuekluZGV4Lm92ZXJsYXkpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRoaXMuYWxpZ25PdmVybGF5KCk7XG4gICAgICAgICAgICAgICAgdGhpcy5iaW5kRG9jdW1lbnRDbGlja0xpc3RlbmVyKCk7XG4gICAgICAgICAgICAgICAgdGhpcy5iaW5kRG9jdW1lbnRSZXNpemVMaXN0ZW5lcigpO1xuICAgICAgICAgICAgICAgIHRoaXMuYmluZFNjcm9sbExpc3RlbmVyKCk7XG4gICAgICAgICAgICAgICAgdGhpcy5vblNob3cuZW1pdChldmVudCk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAndm9pZCc6XG4gICAgICAgICAgICAgICAgdGhpcy5vbk92ZXJsYXlIaWRlKCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG9uT3ZlcmxheUFuaW1hdGlvbkVuZChldmVudDogQW5pbWF0aW9uRXZlbnQpIHtcbiAgICAgICAgc3dpdGNoKGV2ZW50LnRvU3RhdGUpIHtcbiAgICAgICAgICAgIGNhc2UgJ3ZvaWQnOlxuICAgICAgICAgICAgICAgIGlmICh0aGlzLmF1dG9aSW5kZXgpIHtcbiAgICAgICAgICAgICAgICAgICAgWkluZGV4VXRpbHMuY2xlYXIoZXZlbnQuZWxlbWVudCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBvbk92ZXJsYXlDbGljayhldmVudCkge1xuICAgICAgICB0aGlzLm92ZXJsYXlTZXJ2aWNlLmFkZCh7XG4gICAgICAgICAgICBvcmlnaW5hbEV2ZW50OiBldmVudCxcbiAgICAgICAgICAgIHRhcmdldDogdGhpcy5lbC5uYXRpdmVFbGVtZW50XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIGFwcGVuZE92ZXJsYXkoKSB7XG4gICAgICAgIGlmICh0aGlzLmFwcGVuZFRvKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5hcHBlbmRUbyA9PT0gJ2JvZHknKVxuICAgICAgICAgICAgICAgIGRvY3VtZW50LmJvZHkuYXBwZW5kQ2hpbGQodGhpcy5vdmVybGF5KTtcbiAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICBEb21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ICAgICAgICAgICAgICAgICBsZXQgaGlnaGxpZ2h0SXRlbUluZGV4ID0gdGhpcy5maW5kT3B0aW9uR3JvdXBJbmRleCh0aGlzLmhpZ2hsaWdodE9wdGlvbiwgdGhpcy5zdWdnZXN0aW9ucyk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChoaWdobGlnaHRJdGVtSW5kZXggIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5leHRJdGVtSW5kZXggPSBoaWdobGlnaHRJdGVtSW5kZXguaXRlbUluZGV4ICsgMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobmV4dEl0ZW1JbmRleCA8ICh0aGlzLmdldE9wdGlvbkdyb3VwQ2hpbGRyZW4odGhpcy5zdWdnZXN0aW9uc1toaWdobGlnaHRJdGVtSW5kZXguZ3JvdXBJbmRleF0pLmxlbmd0aCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5oaWdobGlnaHRPcHRpb24gPSB0aGlzLmdldE9wdGlvbkdyb3VwQ2hpbGRyZW4odGhpcy5zdWdnZXN0aW9uc1toaWdobGlnaHRJdGVtSW5kZXguZ3JvdXBJbmRleF0pW25leHRJdGVtSW5kZXhdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmhpZ2hsaWdodE9wdGlvbkNoYW5nZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICh0aGlzLnN1Z2dlc3Rpb25zW2hpZ2hsaWdodEl0ZW1JbmRleC5ncm91cEluZGV4ICsgMV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5oaWdobGlnaHRPcHRpb24gPSB0aGlzLmdldE9wdGlvbkdyb3VwQ2hpbGRyZW4odGhpcy5zdWdnZXN0aW9uc1toaWdobGlnaHRJdGVtSW5kZXguZ3JvdXBJbmRleCArIDFdKVswXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5oaWdobGlnaHRPcHRpb25DaGFuZ2VkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmhpZ2hsaWdodE9wdGlvbiA9IHRoaXMuZ2V0T3B0aW9uR3JvdXBDaGlsZHJlbih0aGlzLnN1Z2dlc3Rpb25zWzBdKVswXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoaWdobGlnaHRJdGVtSW5kZXggPSB0aGlzLmZpbmRPcHRpb25JbmRleCh0aGlzLmhpZ2hsaWdodE9wdGlvbiwgdGhpcy5zdWdnZXN0aW9ucyk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChoaWdobGlnaHRJdGVtSW5kZXggIT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbmV4dEl0ZW1JbmRleCA9IGhpZ2hsaWdodEl0ZW1JbmRleCArIDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG5leHRJdGVtSW5kZXggIT0gKHRoaXMuc3VnZ2VzdGlvbnMubGVuZ3RoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmhpZ2hsaWdodE9wdGlvbiA9IHRoaXMuc3VnZ2VzdGlvbnNbbmV4dEl0ZW1JbmRleF07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuaGlnaGxpZ2h0T3B0aW9uQ2hhbmdlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5oaWdobGlnaHRPcHRpb24gPSB0aGlzLnN1Z2dlc3Rpb25zWzBdO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIC8vdXBcbiAgICAgICAgICAgICAgICBjYXNlIDM4OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5ncm91cCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhpZ2hsaWdodEl0ZW1JbmRleCA9IHRoaXMuZmluZE9wdGlvbkdyb3VwSW5kZXgodGhpcy5oaWdobGlnaHRPcHRpb24sIHRoaXMuc3VnZ2VzdGlvbnMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGhpZ2hsaWdodEl0ZW1JbmRleCAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcHJldkl0ZW1JbmRleCA9IGhpZ2hsaWdodEl0ZW1JbmRleC5pdGVtSW5kZXggLSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwcmV2SXRlbUluZGV4ID49IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5oaWdobGlnaHRPcHRpb24gPSB0aGlzLmdldE9wdGlvbkdyb3VwQ2hpbGRyZW4odGhpcy5zdWdnZXN0aW9uc1toaWdobGlnaHRJdGVtSW5kZXguZ3JvdXBJbmRleF0pW3ByZXZJdGVtSW5kZXhdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmhpZ2hsaWdodE9wdGlvbkNoYW5nZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChwcmV2SXRlbUluZGV4IDwgMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcHJldkdyb3VwID0gdGhpcy5zdWdnZXN0aW9uc1toaWdobGlnaHRJdGVtSW5kZXguZ3JvdXBJbmRleCAtIDFdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocHJldkdyb3VwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmhpZ2hsaWdodE9wdGlvbiA9IHRoaXMuZ2V0T3B0aW9uR3JvdXBDaGlsZHJlbihwcmV2R3JvdXApW3RoaXMuZ2V0T3B0aW9uR3JvdXBDaGlsZHJlbihwcmV2R3JvdXApLmxlbmd0aCAtIDFdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5oaWdobGlnaHRPcHRpb25DaGFuZ2VkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoaWdobGlnaHRJdGVtSW5kZXggPSB0aGlzLmZpbmRPcHRpb25JbmRleCh0aGlzLmhpZ2hsaWdodE9wdGlvbiwgdGhpcy5zdWdnZXN0aW9ucyk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChoaWdobGlnaHRJdGVtSW5kZXggPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHByZXZJdGVtSW5kZXggPSBoaWdobGlnaHRJdGVtSW5kZXggLSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuaGlnaGxpZ2h0T3B0aW9uID0gdGhpcy5zdWdnZXN0aW9uc1twcmV2SXRlbUluZGV4XTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmhpZ2hsaWdodE9wdGlvbkNoYW5nZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIC8vZW50ZXJcbiAgICAgICAgICAgICAgICBjYXNlIDEzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5oaWdobGlnaHRPcHRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0SXRlbSh0aGlzLmhpZ2hsaWdodE9wdGlvbik7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmhpZGUoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgLy9lc2NhcGVcbiAgICAgICAgICAgICAgICBjYXNlIDI3OlxuICAgICAgICAgICAgICAgICAgICB0aGlzLmhpZGUoKTtcbiAgICAgICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuXG4gICAgICAgICAgICAgICAgLy90YWJcbiAgICAgICAgICAgICAgICBjYXNlIDk6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmhpZ2hsaWdodE9wdGlvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZWxlY3RJdGVtKHRoaXMuaGlnaGxpZ2h0T3B0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB0aGlzLmhpZGUoKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmIChldmVudC53aGljaCA9PT0gNDAgJiYgdGhpcy5zdWdnZXN0aW9ucykge1xuICAgICAgICAgICAgICAgIHRoaXMuc2VhcmNoKGV2ZW50LGV2ZW50LnRhcmdldC52YWx1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodGhpcy5tdWx0aXBsZSkge1xuICAgICAgICAgICAgc3dpdGNoKGV2ZW50LndoaWNoKSB7XG4gICAgICAgICAgICAgICAgLy9iYWNrc3BhY2VcbiAgICAgICAgICAgICAgICBjYXNlIDg6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLnZhbHVlICYmIHRoaXMudmFsdWUubGVuZ3RoICYmICF0aGlzLm11bHRpSW5wdXRFTC5uYXRpdmVFbGVtZW50LnZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnZhbHVlID0gWy4uLnRoaXMudmFsdWVdO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVtb3ZlZFZhbHVlID0gdGhpcy52YWx1ZS5wb3AoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMub25Nb2RlbENoYW5nZSh0aGlzLnZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlRmlsbGVkU3RhdGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMub25VbnNlbGVjdC5lbWl0KHJlbW92ZWRWYWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuaW5wdXRLZXlEb3duID0gdHJ1ZTtcbiAgICB9XG5cbiAgICBvbktleXVwKGV2ZW50KSB7XG4gICAgICAgIHRoaXM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lzLmZpZWxkID8gT2JqZWN0VXRpbHMucmVzb2x2ZUZpZWxkRGF0YShzdWdnZXN0aW9uLCB0aGlzLmZpZWxkKSA6IHN1Z2dlc3Rpb247XG4gICAgICAgICAgICAgICAgICAgIGlmIChpdGVtVmFsdWUgJiYgaW5wdXRWYWx1ZSA9PT0gaXRlbVZhbHVlLnRyaW0oKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFsaWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5mb3JjZVNlbGVjdGlvblVwZGF0ZU1vZGVsVGltZW91dCA9IHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0SXRlbShzdWdnZXN0aW9uLCBmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCAyNTApO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICghdmFsaWQpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5tdWx0aXBsZSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLm11bHRpSW5wdXRFTC5uYXRpdmVFbGVtZW50LnZhbHVlID0gJyc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnZhbHVlID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5pbnB1dEVMLm5hdGl2ZUVsZW1lbnQudmFsdWUgPSAnJztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0aGlzLm9uQ2xlYXIuZW1pdChldmVudCk7XG4gICAgICAgICAgICAgICAgdGhpcy5vbk1vZGVsQ2hhbmdlKHRoaXMudmFsdWUpO1xuICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlRmlsbGVkU3RhdGUoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIG9uSW5wdXRQYXN0ZShldmVudDogQ2xpcGJvYXJkRXZlbnQpIHtcbiAgICAgICAgdGhpcy5vbktleWRvd24oZXZlbnQpO1xuICAgIH1cblxuICAgIGlzU2VsZWN0ZWQodmFsOiBhbnkpOiBib29sZWFuIHtcbiAgICAgICAgbGV0IHNlbGVjdGVkOiBib29sZWFuID0gZmFsc2U7XG4gICAgICAgIGlmICh0aGlzLnZhbHVlICYmIHRoaXMudmFsdWUubGVuZ3RoKSB7XG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRoaXMudmFsdWUubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBpZiAoT2JqZWN0VXRpbHMuZXF1YWxzKHRoaXMudmFsdWVbaV0sIHZhbCwgdGhpcy5kYXRhS2V5KSkge1xuICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gc2VsZWN0ZWQ7XG4gICAgfVxuXG4gICAgZmluZE9wdGlvbkluZGV4KG9wdGlvbiwgc3VnZ2VzdGlvbnMpOiBudW1iZXIge1xuICAgICAgICBsZXQgaW5kZXg6IG51bWJlciA9IC0xO1xuICAgICAgICBpZiAoc3VnZ2VzdGlvbnMpIHtcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgc3VnZ2VzdGlvbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBpZiAoT2JqZWN0VXRpbHMuZXF1YWxzKG9wdGlvbiwgc3VnZ2VzdGlvbnNbaV0pKSB7XG4gICAgICAgICAgICAgICAgICAgIGluZGV4ID0gaTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGluZGV4O1xuICAgIH1cblxuICAgIGZpbmRPcHRpb25Hcm91cEluZGV4KHZhbDogYW55LCBvcHRzOiBhbnlbXSk6IGFueSB7XG4gICAgICAgIGxldCBncm91cEluZGV4LCBpdGVtSW5kZXg7XG5cbiAgICAgICAgaWYgKG9wdHMpIHtcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgb3B0cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGdyb3VwSW5kZXggPSBpO1xuICAgICAgICAgICAgICAgIGl0ZW1JbmRleCA9IHRoaXMuZmluZE9wdGlvbkluZGV4KHZhbCwgdGhpcy5nZXRPcHRpb25Hcm91cENoaWxkcmVuKG9wdHNbaV0pKTtcblxuICAgICAgICAgICAgICAgIGlmIChpdGVtSW5kZXggIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChpdGVtSW5kZXggIT09IC0xKSB7XG4gICAgICAgICAgICByZXR1cm4ge2dyb3VwSW5kZXg6IGdyb3VwSW5kZXgsIGl0ZW1JbmRleDogaXRlbUluZGV4fTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiAtMTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHVwZGF0ZUZpbGxlZFN0YXRlKCkge1xuICAgICAgICBpZiAodGhpcy5tdWx0aXBsZSlcbiAgICAgICAgICAgIHRoaXMuZmlsbGVkID0gKHRoaXMudmFsdWUgJiYgdGhpcy52YWx1ZS5sZW5ndGgpIHx8wqAodGhpcy5tdWx0aUlucHV0RUwgJiYgdGhpcy5tdWx0aUlucHV0RUwubmF0aXZlRWxlbWVudCAmJiB0aGlzLm11bHRpSW5wdXRFTC5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VudCkgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChldmVudC53aGljaCA9PT0gMykge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKCF0aGlzLmlucHV0Q2xpY2sgJiYgIXRoaXMuaXNEcm9wZG93bkNsaWNrKGV2ZW50KSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmhpZGUoKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0aGlzLmlucHV0Q2xpY2sgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB0aGlzLmNkLm1hcmtGb3JDaGVjaygpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBpc0Ryb3Bkb3duQ2xpY2soZXZlbnQpIHtcbiAgICAgICAgaWYgKHRoaXMuZHJvcGRvd24pIHtcbiAgICAgICAgICAgIGxldCB0YXJnZXQgPSBldmVudC50YXJnZXQ7XG4gICAgICAgICAgICByZXR1cm4gKHRhcmdldCA9PT0gdGhpcy5kcm9wZG93bkJ1dHRvbi5uYXRpdmVFbGVtZW50IHx8IHRhcmdldC5wYXJlbnROb2RlID09PSB0aGlzLmRyb3Bkb3duQnV0dG9uLm5hdGl2ZUVsZW1lbnQpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgdW5iaW5kRG9jdW1lbnRDbGlja0xpc3RlbmVyKCkge1xuICAgICAgICBpZiAodGhpcy5kb2N1bWVudENsaWNrTGlzdGVuZXIpIHtcbiAgICAgICAgICAgIHRoaXMuZG9jdW1lbnRDbGlja0xpc3RlbmVyKCk7XG4gICAgICAgICAgICB0aGlzLmRvY3VtZW50Q2xpY2tMaXN0ZW5lciA9IG51bGw7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBiaW5kRG9jdW1l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