var nab=nab||{};nab.jQuery=nab.jQuery||$,nab.search=nab.search||{},nab.search.init=function(){var a={endPoint:{autocomplete:"/searchapi/v2"},profile:"nabcq5"};return window.NABSearch.SearchClientConfig?$.extend(!0,window.NABSearch.SearchClientConfig,a):window.NABSearch.SearchClientConfig=a,new window.NABSearch.SearchClient(window.NABSearch.SearchClientConfig)},nab.jQuery(document).ready(function(a){var b=nab.search.init(),c={numSuggestedSearches:10,query:""},d=function(a){return new RegExp("\\b"+a,"ig")};"undefined"==typeof fieldIdentifier||a(fieldIdentifier).each(function(){var d=a(this);a(this).autocomplete({minLength:3,source:function(e,f){c.query=d.val().replace(/\//g,""),b.autocomplete(c).then(function(b){b&&b.suggested&&b.suggested.length>0?f(a.map(b.suggested,function(a){return{label:a,value:a}})):a(".ac-input").autocomplete("close")}).catch(function(b){console.log(b),a(".ac-input").autocomplete("close")})}})}),a.ui.autocomplete.prototype._resizeMenu=function(){this.menu.element.outerWidth(this.element.outerWidth())},a.ui.autocomplete.prototype._renderItem=function(b,c){var e=this.term.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),f=c.label.replace(d(e),''+this.term+"");return a("