File "autocomplete.min.fe6c6c0a1f38.js"

Full Path: /home/lacostenacom/public_html/wp/wp./wp-content/plugins/imunify-security/assets/ui-app/assets/static/shared-dependencies/autocomplete.min.fe6c6c0a1f38.js
File size: 23.49 KB
MIME-type: text/plain
Charset: utf-8

System.register(["@angular/core","@angular/material/core","@angular/common","@angular/cdk/scrolling","@angular/cdk/overlay","@angular/cdk/a11y","@angular/cdk/coercion","@angular/cdk/platform","@angular/animations","rxjs","@angular/cdk/keycodes","@angular/cdk/portal","@angular/forms","@angular/material/form-field","rxjs/operators","@angular/cdk/bidi"],(function(e){"use strict";var t,i,o,n,s,a,l,r,c,h,u,p,d,_,m,v,g,f,y,O,b,A,S,C,w,E,P,T,k,M,R,I,D,F,L,x,V,j,N,W,Y,q,B,U,K,z,H,Q,G,X,Z,J,$,ee,te,ie,oe,ne,se;return{setters:[function(e){t=e.InjectionToken,i=e.EventEmitter,o=e,n=e.TemplateRef,e.Directive,e.Inject,e.ViewChild,e.Input,e.Output,e.Component,e.ViewEncapsulation,e.ChangeDetectionStrategy,e.ContentChildren,s=e.forwardRef,e.Optional,e.Host,e.NgModule},function(e){a=e.mixinDisableRipple,l=e.MAT_OPTGROUP,r=e.MatOption,c=e.MAT_OPTION_PARENT_COMPONENT,h=e.MatOptionSelectionChange,u=e._countGroupLabelsBeforeOption,p=e._getOptionScrollPosition,d=e.MatOptionModule,_=e.MatCommonModule},function(e){m=e,v=e.DOCUMENT,g=e.CommonModule},function(e){f=e,y=e.CdkScrollableModule},function(e){O=e.OverlayConfig,b=e,A=e.OverlayModule,S=e.Overlay},function(e){C=e.ActiveDescendantKeyManager,w=e.addAriaReferencedId,E=e.removeAriaReferencedId},function(e){P=e.coerceBooleanProperty,T=e.coerceStringArray},function(e){k=e,M=e._getEventTarget},function(e){R=e.trigger,I=e.state,D=e.style,F=e.transition,L=e.group,x=e.animate},function(e){V=e.Subscription,j=e.Subject,N=e.defer,W=e.merge,Y=e.of,q=e.fromEvent},function(e){B=e.ESCAPE,U=e.hasModifierKey,K=e.UP_ARROW,z=e.ENTER,H=e.TAB,Q=e.DOWN_ARROW},function(e){G=e.TemplatePortal},function(e){X=e.NG_VALUE_ACCESSOR},function(e){Z=e.MAT_FORM_FIELD,e},function(e){J=e.startWith,$=e.switchMap,ee=e.take,te=e.filter,ie=e.map,oe=e.tap,ne=e.delay},function(e){se=e}],execute:function(){e({MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY:_e,MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY:Ae,getMatAutocompleteMissingPanelError:Oe});const ae=["panel"];function le(e,t){if(1&e){const e=o.\u0275\u0275getCurrentView();o.\u0275\u0275elementStart(0,"div",0,1),o.\u0275\u0275listener("@panelAnimation.done",(function(t){o.\u0275\u0275restoreView(e);const i=o.\u0275\u0275nextContext();return o.\u0275\u0275resetView(i._animationDone.next(t))})),o.\u0275\u0275projection(2),o.\u0275\u0275elementEnd()}if(2&e){const e=t.id,i=o.\u0275\u0275nextContext();o.\u0275\u0275property("id",i.id)("ngClass",i._classList)("@panelAnimation",i.isOpen?"visible":"hidden"),o.\u0275\u0275attribute("aria-label",i.ariaLabel||null)("aria-labelledby",i._getPanelAriaLabelledby(e))}}const re=["*"],ce=R("panelAnimation",[I("void, hidden",D({opacity:0,transform:"scaleY(0.8)"})),F(":enter, hidden => visible",[L([x("0.03s linear",D({opacity:1})),x("0.12s cubic-bezier(0, 0, 0.2, 1)",D({transform:"scaleY(1)"}))])]),F(":leave, visible => hidden",[x("0.075s linear",D({opacity:0}))])]);let he=0;class ue{constructor(e,t){this.source=e,this.option=t}}e("MatAutocompleteSelectedEvent",ue);const pe=a(class{}),de=e("MAT_AUTOCOMPLETE_DEFAULT_OPTIONS",new t("mat-autocomplete-default-options",{providedIn:"root",factory:_e}));function _e(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1}}class me extends pe{get isOpen(){return this._isOpen&&this.showPanel}_setColor(e){this._color=e,this._setThemeClasses(this._classList)}get autoActiveFirstOption(){return this._autoActiveFirstOption}set autoActiveFirstOption(e){this._autoActiveFirstOption=P(e)}get autoSelectActiveOption(){return this._autoSelectActiveOption}set autoSelectActiveOption(e){this._autoSelectActiveOption=P(e)}get requireSelection(){return this._requireSelection}set requireSelection(e){this._requireSelection=P(e)}set classList(e){e&&e.length?this._classList=T(e).reduce(((e,t)=>(e[t]=!0,e)),{}):this._classList={},this._setVisibilityClasses(this._classList),this._setThemeClasses(this._classList),this._elementRef.nativeElement.className=""}constructor(e,t,o,n){super(),this._changeDetectorRef=e,this._elementRef=t,this._defaults=o,this._activeOptionChanges=V.EMPTY,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this.optionSelected=new i,this.opened=new i,this.closed=new i,this.optionActivated=new i,this._classList={},this.id="mat-autocomplete-"+he++,this.inertGroups=n?.SAFARI||!1,this._autoActiveFirstOption=!!o.autoActiveFirstOption,this._autoSelectActiveOption=!!o.autoSelectActiveOption,this._requireSelection=!!o.requireSelection}ngAfterContentInit(){this._keyManager=new C(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe((e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null})})),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe()}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._setVisibilityClasses(this._classList),this._changeDetectorRef.markForCheck()}_emitSelectEvent(e){const t=new ue(this,e);this.optionSelected.emit(t)}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;const t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_setVisibilityClasses(e){e[this._visibleClass]=this.showPanel,e[this._hiddenClass]=!this.showPanel}_setThemeClasses(e){e["mat-primary"]="primary"===this._color,e["mat-warn"]="warn"===this._color,e["mat-accent"]="accent"===this._color}_skipPredicate(e){return e.disabled}static{this.\u0275fac=function(e){return new(e||me)(o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(de),o.\u0275\u0275directiveInject(k.Platform))}}static{this.\u0275dir=o.\u0275\u0275defineDirective({type:me,viewQuery:function(e,t){if(1&e&&(o.\u0275\u0275viewQuery(n,7),o.\u0275\u0275viewQuery(ae,5)),2&e){let e;o.\u0275\u0275queryRefresh(e=o.\u0275\u0275loadQuery())&&(t.template=e.first),o.\u0275\u0275queryRefresh(e=o.\u0275\u0275loadQuery())&&(t.panel=e.first)}},inputs:{ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:"autoActiveFirstOption",autoSelectActiveOption:"autoSelectActiveOption",requireSelection:"requireSelection",panelWidth:"panelWidth",classList:["class","classList"]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},features:[o.\u0275\u0275InheritDefinitionFeature]})}}e("_MatAutocompleteBase",me);class ve extends me{constructor(){super(...arguments),this._visibleClass="mat-mdc-autocomplete-visible",this._hiddenClass="mat-mdc-autocomplete-hidden",this._animationDone=new i,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=P(e),this._syncParentProperties()}_syncParentProperties(){if(this.options)for(const e of this.options)e._changeDetectorRef.markForCheck()}ngOnDestroy(){super.ngOnDestroy(),this._animationDone.complete()}_skipPredicate(e){return!1}static{this.\u0275fac=function(){let e;return function(t){return(e||(e=o.\u0275\u0275getInheritedFactory(ve)))(t||ve)}}()}static{this.\u0275cmp=o.\u0275\u0275defineComponent({type:ve,selectors:[["mat-autocomplete"]],contentQueries:function(e,t,i){if(1&e&&(o.\u0275\u0275contentQuery(i,l,5),o.\u0275\u0275contentQuery(i,r,5)),2&e){let e;o.\u0275\u0275queryRefresh(e=o.\u0275\u0275loadQuery())&&(t.optionGroups=e),o.\u0275\u0275queryRefresh(e=o.\u0275\u0275loadQuery())&&(t.options=e)}},hostAttrs:["ngSkipHydration","",1,"mat-mdc-autocomplete"],inputs:{disableRipple:"disableRipple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator"},exportAs:["matAutocomplete"],features:[o.\u0275\u0275ProvidersFeature([{provide:c,useExisting:ve}]),o.\u0275\u0275InheritDefinitionFeature],ngContentSelectors:re,decls:1,vars:0,consts:[["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id","ngClass"],["panel",""]],template:function(e,t){1&e&&(o.\u0275\u0275projectionDef(),o.\u0275\u0275template(0,le,3,5,"ng-template"))},dependencies:[m.NgClass],styles:["div.mat-mdc-autocomplete-panel{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-autocomplete-background-color)}.cdk-high-contrast-active div.mat-mdc-autocomplete-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden}mat-autocomplete{display:none}"],encapsulation:2,data:{animation:[ce]},changeDetection:0})}}e("MatAutocomplete",ve);class ge{constructor(e){this.elementRef=e}static{this.\u0275fac=function(e){return new(e||ge)(o.\u0275\u0275directiveInject(o.ElementRef))}}static{this.\u0275dir=o.\u0275\u0275defineDirective({type:ge})}}e("_MatAutocompleteOriginBase",ge);class fe extends ge{static{this.\u0275fac=function(){let e;return function(t){return(e||(e=o.\u0275\u0275getInheritedFactory(fe)))(t||fe)}}()}static{this.\u0275dir=o.\u0275\u0275defineDirective({type:fe,selectors:[["","matAutocompleteOrigin",""]],exportAs:["matAutocompleteOrigin"],features:[o.\u0275\u0275InheritDefinitionFeature]})}}e("MatAutocompleteOrigin",fe);const ye=e("MAT_AUTOCOMPLETE_VALUE_ACCESSOR",{provide:X,useExisting:s((()=>we)),multi:!0});function Oe(){return Error("Attempting to open an undefined instance of `mat-autocomplete`. Make sure that the id passed to the `matAutocomplete` is correct and that you're attempting to open it after the ngAfterContentInit hook.")}const be=e("MAT_AUTOCOMPLETE_SCROLL_STRATEGY",new t("mat-autocomplete-scroll-strategy"));function Ae(e){return()=>e.scrollStrategies.reposition()}const Se=e("MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER",{provide:be,deps:[S],useFactory:Ae});class Ce{get autocompleteDisabled(){return this._autocompleteDisabled}set autocompleteDisabled(e){this._autocompleteDisabled=P(e)}constructor(e,t,i,o,n,s,a,l,r,c,h){this._element=e,this._overlay=t,this._viewContainerRef=i,this._zone=o,this._changeDetectorRef=n,this._dir=a,this._formField=l,this._document=r,this._viewportRuler=c,this._defaults=h,this._componentDestroyed=!1,this._autocompleteDisabled=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=V.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new j,this._windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen},this._onChange=()=>{},this._onTouched=()=>{},this.position="auto",this.autocompleteAttribute="off",this._overlayAttached=!1,this.optionSelections=N((()=>{const e=this.autocomplete?this.autocomplete.options:null;return e?e.changes.pipe(J(e),$((()=>W(...e.map((e=>e.onSelectionChange)))))):this._zone.onStable.pipe(ee(1),$((()=>this.optionSelections)))})),this._handlePanelKeydown=e=>{(e.keyCode===B&&!U(e)||e.keyCode===K&&U(e,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),e.stopPropagation(),e.preventDefault())},this._trackedModal=null,this._scrollStrategy=s}ngAfterViewInit(){const e=this._getWindow();void 0!==e&&this._zone.runOutsideAngular((()=>e.addEventListener("blur",this._windowBlurHandler)))}ngOnChanges(e){e.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){const e=this._getWindow();void 0!==e&&e.removeEventListener("blur",this._windowBlurHandler),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete(),this._clearFromModal()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){if(this._attachOverlay(),this._floatLabel(),this._trackedModal){const e=this.autocomplete.id;w(this._trackedModal,"aria-owns",e)}}closePanel(){if(this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run((()=>{this.autocomplete.closed.emit()})),this.autocomplete._isOpen=this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges(),this._trackedModal)){const e=this.autocomplete.id;E(this._trackedModal,"aria-owns",e)}}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return W(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(te((()=>this._overlayAttached))),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(te((()=>this._overlayAttached))):Y()).pipe(ie((e=>e instanceof h?e:null)))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return W(q(this._document,"click"),q(this._document,"auxclick"),q(this._document,"touchend")).pipe(te((e=>{const t=M(e),i=this._formField?this._formField._elementRef.nativeElement:null,o=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;return this._overlayAttached&&t!==this._element.nativeElement&&this._document.activeElement!==this._element.nativeElement&&(!i||!i.contains(t))&&(!o||!o.contains(t))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(t)})))}writeValue(e){Promise.resolve(null).then((()=>this._assignOptionValue(e)))}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._element.nativeElement.disabled=e}_handleKeydown(e){const t=e.keyCode,i=U(e);if(t!==B||i||e.preventDefault(),this.activeOption&&t===z&&this.panelOpen&&!i)this.activeOption._selectViaInteraction(),this._resetActiveItem(),e.preventDefault();else if(this.autocomplete){const o=this.autocomplete._keyManager.activeItem,n=t===K||t===Q;t===H||n&&!i&&this.panelOpen?this.autocomplete._keyManager.onKeydown(e):n&&this._canOpen()&&this.openPanel(),(n||this.autocomplete._keyManager.activeItem!==o)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._element.nativeElement.value),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(e){let t=e.target,i=t.value;"number"===t.type&&(i=""==i?null:parseFloat(i)),this._previousValue!==i&&(this._previousValue=i,this._pendingAutoselectedOption=null,this.autocomplete&&this.autocomplete.requireSelection||this._onChange(i),i||this._clearPreviousSelectedOption(null,!1),this._canOpen()&&this._document.activeElement===e.target&&this.openPanel())}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this.openPanel()}_floatLabel(e=!1){this._formField&&"auto"===this._formField.floatLabel&&(e?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){const e=this._zone.onStable.pipe(ee(1)),t=this.autocomplete.options.changes.pipe(oe((()=>this._positionStrategy.reapplyLastPosition())),ne(0));return W(e,t).pipe($((()=>(this._zone.run((()=>{const e=this.panelOpen;this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),e!==this.panelOpen&&(this.panelOpen?(this._captureValueOnAttach(),this._emitOpened()):this.autocomplete.closed.emit())})),this.panelClosingActions))),ee(1)).subscribe((e=>this._setValueAndClose(e)))}_emitOpened(){this.autocomplete.opened.emit()}_captureValueOnAttach(){this._valueOnAttach=this._element.nativeElement.value}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_assignOptionValue(e){const t=this.autocomplete&&this.autocomplete.displayWith?this.autocomplete.displayWith(e):e;this._updateNativeInputValue(null!=t?t:"")}_updateNativeInputValue(e){this._formField?this._formField._control.value=e:this._element.nativeElement.value=e,this._previousValue=e}_setValueAndClose(e){const t=this.autocomplete,i=e?e.source:this._pendingAutoselectedOption;i?(this._clearPreviousSelectedOption(i),this._assignOptionValue(i.value),this._onChange(i.value),t._emitSelectEvent(i),this._element.nativeElement.focus()):t.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),t._animationDone?t._animationDone.pipe(ee(1)).subscribe((()=>this._onChange(null))):this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(e,t){this.autocomplete?.options?.forEach((i=>{i!==e&&i.selected&&i.deselect(t)}))}_attachOverlay(){this.autocomplete;let e=this._overlayRef;e?(this._positionStrategy.setOrigin(this._getConnectedElement()),e.updateSize({width:this._getPanelWidth()})):(this._portal=new G(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),e=this._overlay.create(this._getOverlayConfig()),this._overlayRef=e,this._viewportSubscription=this._viewportRuler.change().subscribe((()=>{this.panelOpen&&e&&e.updateSize({width:this._getPanelWidth()})}))),e&&!e.hasAttached()&&(e.attach(this._portal),this._closingActionsSubscription=this._subscribeToClosingActions());const t=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this._captureValueOnAttach(),this.panelOpen&&t!==this.panelOpen&&this._emitOpened()}_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){const e=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=e.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=e.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=null}_getOverlayConfig(){return new O({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,panelClass:this._defaults?.overlayPanelClass})}_getOverlayPosition(){const e=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){const t=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],i=this._aboveClass,o=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:i},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:i}];let n;n="above"===this.position?o:"below"===this.position?t:[...t,...o],e.withPositions(n)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){const e=this.autocomplete;if(e.autoActiveFirstOption){let t=-1;for(let i=0;i<e.options.length;i++){if(!e.options.get(i).disabled){t=i;break}}e._keyManager.setActiveItem(t)}else e._keyManager.setActiveItem(-1)}_canOpen(){const e=this._element.nativeElement;return!e.readOnly&&!e.disabled&&!this._autocompleteDisabled}_getWindow(){return this._document?.defaultView||window}_scrollToOption(e){const t=this.autocomplete,i=u(e,t.options,t.optionGroups);if(0===e&&1===i)t._setScrollTop(0);else if(t.panel){const i=t.options.toArray()[e];if(i){const e=i._getHostElement(),o=p(e.offsetTop,e.offsetHeight,t._getScrollTop(),t.panel.nativeElement.offsetHeight);t._setScrollTop(o)}}}_applyModalPanelOwnership(){const e=this._element.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;const t=this.autocomplete.id;this._trackedModal&&E(this._trackedModal,"aria-owns",t),w(e,"aria-owns",t),this._trackedModal=e}_clearFromModal(){if(this._trackedModal){const e=this.autocomplete.id;E(this._trackedModal,"aria-owns",e),this._trackedModal=null}}static{this.\u0275fac=function(e){return new(e||Ce)(o.\u0275\u0275directiveInject(o.ElementRef),o.\u0275\u0275directiveInject(b.Overlay),o.\u0275\u0275directiveInject(o.ViewContainerRef),o.\u0275\u0275directiveInject(o.NgZone),o.\u0275\u0275directiveInject(o.ChangeDetectorRef),o.\u0275\u0275directiveInject(be),o.\u0275\u0275directiveInject(se.Directionality,8),o.\u0275\u0275directiveInject(Z,9),o.\u0275\u0275directiveInject(v,8),o.\u0275\u0275directiveInject(f.ViewportRuler),o.\u0275\u0275directiveInject(de,8))}}static{this.\u0275dir=o.\u0275\u0275defineDirective({type:Ce,inputs:{autocomplete:["matAutocomplete","autocomplete"],position:["matAutocompletePosition","position"],connectedTo:["matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:["autocomplete","autocompleteAttribute"],autocompleteDisabled:["matAutocompleteDisabled","autocompleteDisabled"]},features:[o.\u0275\u0275NgOnChangesFeature]})}}e("_MatAutocompleteTriggerBase",Ce);class we extends Ce{constructor(){super(...arguments),this._aboveClass="mat-mdc-autocomplete-panel-above"}static{this.\u0275fac=function(){let e;return function(t){return(e||(e=o.\u0275\u0275getInheritedFactory(we)))(t||we)}}()}static{this.\u0275dir=o.\u0275\u0275defineDirective({type:we,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(e,t){1&e&&o.\u0275\u0275listener("focusin",(function(){return t._handleFocus()}))("blur",(function(){return t._onTouched()}))("input",(function(e){return t._handleInput(e)}))("keydown",(function(e){return t._handleKeydown(e)}))("click",(function(){return t._handleClick()})),2&e&&o.\u0275\u0275attribute("autocomplete",t.autocompleteAttribute)("role",t.autocompleteDisabled?null:"combobox")("aria-autocomplete",t.autocompleteDisabled?null:"list")("aria-activedescendant",t.panelOpen&&t.activeOption?t.activeOption.id:null)("aria-expanded",t.autocompleteDisabled?null:t.panelOpen.toString())("aria-controls",t.autocompleteDisabled||!t.panelOpen||null==t.autocomplete?null:t.autocomplete.id)("aria-haspopup",t.autocompleteDisabled?null:"listbox")},exportAs:["matAutocompleteTrigger"],features:[o.\u0275\u0275ProvidersFeature([ye]),o.\u0275\u0275InheritDefinitionFeature]})}}e("MatAutocompleteTrigger",we);class Ee{static{this.\u0275fac=function(e){return new(e||Ee)}}static{this.\u0275mod=o.\u0275\u0275defineNgModule({type:Ee})}static{this.\u0275inj=o.\u0275\u0275defineInjector({providers:[Se],imports:[A,d,_,g,y,d,_]})}}e("MatAutocompleteModule",Ee)}}}));