(function(){$.extend(page,{using:{types:["SearchOptionProvider","SearchView","QueryCompactResultPresenter","GoogleAnalyticsProvider"]},onLoad:function(){var e=this.url.get("proceed","onSelect");var i="Search";if(this.url&&this.url.params&&this.url.params.searchAndListName){var t=this.url.params.searchAndListName;u8.services.googleAnalyticsProvider.sendCRMDataToGA(t,i)}if(/on.*Select/.test(e)){this.commandBindings=$.extend(this.commandBindings,{"Select*":this._onCommandSelect.bind(this)})}var a=$.extend({isDefault:true},u8.services.searchOptionProvider.buildFromPage(page));if(a.viewOptions&&a.viewOptions.list&&a.viewOptions.list.grid){var n=false;if(!page.process){n=u8.session.webConfigValues.getBoolean("Search.AutoExpandOnSingleHit",false)}a.viewOptions.list.grid.executeDefaultActionOnSingleResult=page.url.getBoolean(["autoExpandOnSingleHit","searchOneRecordDetailView"],n)}this.view=new u8.Crm.Widgets.SearchView($el("search"),a)},_onCommandSelect:function(i,t,a){if(page.process){var n=page.url.get("selectLinkName");if(n&&t=="Select"){e(a,n,s)}else{s(a)}}else{a.stopPropagation=false}function s(){var e={uid:a.uid,uids:a.uids,command:t};page.proceed(e)}}});function e(e,i,t){var a=e.uid;u8.services.crud.readLink({uid:a,linkName:i},function(i,n){e.originalUid=a;e.uid=n.uid;t(e)})}})();