(self.webpackChunk_beakerx_beakerx_widgets=self.webpackChunk_beakerx_beakerx_widgets||[]).push([[445],{36445:(t,e,i)=>{var n,o,s;o=[i(22576)],void 0===(s="function"==typeof(n=function(t){t.widget("custom.combobox",{_create:function(){this.wrapper=t("<div>").addClass("ui-combobox").insertAfter(this.element),this.element.hide(),this._createAutocomplete(),this._createShowAllButton()},_createAutocomplete:function(){var e=this.element.children(":selected"),i=e.val()?e.text():"";this.input=t("<input>").appendTo(this.wrapper).val(i).attr("title","").addClass("ui-combobox-input ui-widget ui-widget-content ui-state-default ui-corner-left").autocomplete({delay:0,minLength:0,source:t.proxy(this,"_source")}),this._on(this.input,{autocompleteselect:function(t,e){var i=this.input;i.removeClass("ui-input-invalid"),e.item.option.selected=!0,this._trigger("select",t,{item:e.item.option}),setTimeout((function(){i.blur()}),1)},focus:function(){this.input.attr("placeholder",this.input.val()).val(""),this.input.autocomplete("search","")},blur:function(){""===this.input.val()&&this.input.val(this.input.attr("placeholder")),this._removeIfInvalid(),this.element.trigger("change")}})},_createShowAllButton:function(){var e=this.input;t("<span>").addClass("ui-icon ui-icon-triangle-1-s").attr("tabIndex",-1).appendTo(this.wrapper).click((function(){e.focus()}))},_source:function(e,i){var n=new RegExp(t.ui.autocomplete.escapeRegex(e.term),"i");i(this.element.children("option").map((function(){var i=t(this).text();if(this.value&&(!e.term||n.test(i)))return{label:i,value:i,option:this}})))},_removeIfInvalid:function(e,i){if(this.input.removeClass("ui-input-invalid"),!i||!i.item){var n=this.input.val().toLowerCase(),o=!1;this.element.children("option").each((function(){if(t(this).text().toLowerCase()===n)return this.selected=o=!0,!1})),o||(this.element.val(""),this.input.autocomplete("instance").term="",this.input.addClass("ui-input-invalid"))}},_destroy:function(){this.wrapper.remove(),this.element.show()}})})?n.apply(e,o):n)||(t.exports=s)}}]);