=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Xc=function(e){function a(a){var d=e.call(this,Yc(Yc({},a),{popup:!0}))||this;return d.isMaximizable=!1,d.isMaximized=!1,d.maximizeListeners=[],d.resizeListenerDestroy=null,d.lastPosition={x:0,y:0,width:0,height:0},d}return Kc(a,e),a.prototype.postConstruct=function(){var a=this,d=this.getGui(),t=this.config,i=t.movable,s=t.resizable,o=t.maximizable;this.addCssClass("ag-dialog"),e.prototype.postConstruct.call(this),this.addManagedListener(d,"focusin",(function(e){d.contains(e.relatedTarget)||a.popupService.bringPopupToFront(d)})),i&&this.setMovable(i),o&&this.setMaximizable(o),s&&this.setResizable(s)},a.prototype.renderComponent=function(){var e=this.getGui(),a=this.config,d=a.alwaysOnTop,t=a.modal,i=a.title,s=a.afterGuiAttached,o=this.localeService.getLocaleTextFunc(),l=this.popupService.addPopup({modal:t,eChild:e,closeOnEsc:!0,closedCallback:this.destroy.bind(this),alwaysOnTop:d,ariaLabel:i||o("ariaLabelDialog","Dialog"),afterGuiAttached:s});l&&(this.close=l.hideFunc)},a.prototype.toggleMaximize=function(){var e=this.positionableFeature.getPosition();if(this.isMaximized){var a=this.lastPosition,d=a.x,t=a.y,i=a.width,s=a.height;this.setWidth(i),this.setHeight(s),this.positionableFeature.offsetElement(d,t)}else this.lastPosition.width=this.getWidth(),this.lastPosition.height=this.getHeight(),this.lastPosition.x=e.x,this.lastPosition.y=e.y,this.positionableFeature.offsetElement(0,0),this.setHeight("100%"),this.setWidth("100%");this.isMaximized=!this.isMaximized,this.refreshMaximizeIcon()},a.prototype.refreshMaximizeIcon=function(){dt(this.maximizeIcon,!this.isMaximized),dt(this.minimizeIcon,this.isMaximized)},a.prototype.clearMaximizebleListeners=function(){this.maximizeListeners.length&&(this.maximizeListeners.forEach((function(e){return e()})),this.maximizeListeners.length=0),this.resizeListenerDestroy&&(this.resizeListenerDestroy(),this.resizeListenerDestroy=null)},a.prototype.destroy=function(){this.maximizeButtonComp=this.destroyBean(this.maximizeButtonComp),this.clearMaximizebleListeners(),e.prototype.destroy.call(this)},a.prototype.setResizable=function(e){this.positionableFeature.setResizable(e)},a.prototype.setMovable=function(e){this.positionableFeature.setMovable(e,this.eTitleBar)},a.prototype.setMaximizable=function(e){var a=this;if(!e)return this.clearMaximizebleListeners(),void(this.maximizeButtonComp&&(this.destroyBean(this.maximizeButtonComp),this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=void 0));var d=this.eTitleBar;if(d&&e!==this.isMaximizable){var t=this.buildMaximizeAndMinimizeElements();this.refreshMaximizeIcon(),t.addManagedListener(t.getGui(),"click",this.toggleMaximize.bind(this)),this.addTitleBarButton(t,0),this.maximizeListeners.push(this.addManagedListener(d,"dblclick",this.toggleMaximize.bind(this))),this.resizeListenerDestroy=this.addManagedListener(this,"resize",(function(){a.isMaximized=!1,a.refreshMaximizeIcon()}))}},a.prototype.buildMaximizeAndMinimizeElements=function(){var e=this.maximizeButtonComp=this.createBean(new hi('')||this;return a.hasHighlighting=!1,a}return op(a,e),a.prototype.setState=function(e,a){this.value=e,this.render(),this.updateSelected(a)},a.prototype.updateSelected=function(e){this.addOrRemoveCssClass("ag-autocomplete-row-selected",e)},a.prototype.setSearchString=function(e){var a,d=!1;if(i(e)){var t=null===(a=this.value)||void 0===a?void 0:a.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(t>=0){d=!0,this.hasHighlighting=!0;var s=t+e.length,o=oa(this.value.slice(0,t)),l=oa(this.value.slice(t,s)),m=oa(this.value.slice(s));this.getGui().lastElementChild.innerHTML="".concat(o,"").concat(l,"").concat(m)}}!d&&this.hasHighlighting&&(this.hasHighlighting=!1,this.render())},a.prototype.render=function(){var e;this.getGui().lastElementChild.innerHTML=null!==(e=oa(this.value))&&void 0!==e?e:" "},a}(hi),mp=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),up=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},np=function(e){function a(d){var t=e.call(this,a.TEMPLATE)||this;return t.params=d,t.searchString="",t}return mp(a,e),a.prototype.destroy=function(){e.prototype.destroy.call(this)},a.prototype.init=function(){var e=this;this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList=this.createManagedBean(new Ic({cssIdentifier:"autocomplete"})),this.virtualList.setComponentCreator(this.createRowComponent.bind(this)),this.eList.appendChild(this.virtualList.getGui()),this.virtualList.setModel({getRowCount:function(){return e.autocompleteEntries.length},getRow:function(a){return e.autocompleteEntries[a]}});var a=this.virtualList.getGui();this.addManagedListener(a,"click",(function(){return e.params.onConfirmed()})),this.addManagedListener(a,"mousemove",this.onMouseMove.bind(this)),this.addManagedListener(a,"mousedown",(function(e){return e.preventDefault()})),this.setSelectedValue(0)},a.prototype.onNavigationKeyDown=function(e,a){e.preventDefault();var d=this.autocompleteEntries.indexOf(this.selectedValue),t=a===zt.UP?d-1:d+1;this.checkSetSelectedValue(t)},a.prototype.setSearch=function(e){this.searchString=e,i(e)?this.runSearch():(this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList.refresh(),this.checkSetSelectedValue(0)),this.updateSearchInList()},a.prototype.runContainsSearch=function(e,a){var d,t=!1,i=e.toLocaleLowerCase(),s=a.filter((function(e){var a=e.toLocaleLowerCase().indexOf(i),s=0===a,o=a>=0;return o&&(!d||!t&&s||t===s&&e.length=0&&e