var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),WSB;(function(n){var t="QSCH",u=function(r){function u(t){var f=r.call(this,"QSCH")||this;return f._lightweightStorage=t,f._lastTypedQuery=new i,u.lightweightStorage=f._lightweightStorage,(n.TestHookUrlParameters===null||n.TestHookUrlParameters===void 0?void 0:n.TestHookUrlParameters.mockLastQuery)&&f._lastTypedQuery.setQuery(n.TestHookUrlParameters.mockLastQuery),n.Host.bindDismissed(function(n){n&&n.queryToFetch&&f._lastTypedQuery.setQuery(n.fullPartialQuery)}),f}return __extends(u,r),u.prototype.getName=function(){return"QuickSearchSuggestionsDataProvider"},u.prototype.fetch=function(n,i){if(n.enabledDataSources[t]){var r={};r=u.getQuickSearchResponse(r);i(t,r,undefined)}},u.getQuickSearchResponse=function(t){var r=n.ScopeConfig[n.Scope.Web]&&n.ScopeConfig[n.Scope.Web].prefixes?n.ScopeConfig[n.Scope.Web].prefixes[0]:null,f=n.Host.getLanguage().toLowerCase(),i;return n.shouldEnableQuickSearches(f)&&(i=[],t.quickAnswers=n.getQuickAnswersTranslatedSuggestions(f,u.lightweightStorage),t.quickAnswers.forEach(function(n){r?i.push(r.toLowerCase()+": "+n.query):i.push(n.query)})),t},u}(n.JsonDataProvider),i,r;n.QuickSearchSuggestionsDataProvider=u;i=function(){function t(){this.LastTypedQueryTTLms=6e5}return t.prototype.getQuery=function(){var t=n.getCurrentTime();return this._lastTypedQueryTimeStamp&&t-this._lastTypedQueryTimeStamp