You are on page 1of 6

var AutoSuggest;(function(n){var t;(function(t){function h(n){return

n.toLocaleLowerCase().replace(v,"").trim()}function c(n,t,i,r,u){if(!n)return
i;if(typeof n!
="string")try{return{content:URL.createObjectURL(n),type:0,bgColor:r}}catch(f)
{return SharedLogHelper.LogError("convertToHtmlImage "+t,u,f),i}else
return{content:n,type:0,bgColor:r}}function e(n,t){var
i=parseInt(n.substr(1),16),r=i>>16&255,u=i>>8&255,f=i&255;return"rgba("+r+","+u+","
+f+","+t+")"}var i,o,r,u,f,v=/[\.,:;?!]/g,s=-
933981677285477,l,a;t.Office365Provider="Office365";t.OutlookProvider="Outlook";t.S
ubstrateResourceUrl="https://outlook.office.com/";t.toIcon=c;l={"action://Help/Laun
ch":sa_config.htmlHelpCanvas?"Help":"SpeechHelp","ms-
cortana://navigate/Settings":"Settings","ms-
cortana://navigate/Notebook":"Notebook"};a=function(){function a(e){var
s=this;this._config=e;this._queriesToIgnoreOnQueryTextChangedEvent={};this._queryPa
ramsCache={};this._modifierKeyState={altKey:!1,ctrlKey:!1,shiftKey:!
1};this._appVisibleEventHandlers=[];this._shownEventHandlers=[];this._conversationS
tartEventHandlers=[];this._dismissedEventHandlers=[];this._appHiddenEventHandlers=[
];this._searchBoxGotFocusEventHandlers=[];this._searchBoxLostFocusEventHandlers=[];
this._onSubmitHandlers=[];this._queryChangedHandlers=[];this._cursorPositionChanged
Handlers=[];this._keyDownHandlers=[];this._keyUpHandlers=[];this._state=0;this._pan
eCloseCount=0;this.usedImpressionIds={};this.getEdgeIcon=function(n,t){return
s._edgeIconCache(n,t)};this._suggestionsContainer=_ge("suggestionsList");this._qfCo
ntainer=_ge("container");n.safeExecute(function()
{i=SearchAppWrapper.CortanaApp;o=i.queryFormulationView;r=i.launcher;u=i.searchBox;
f=n.Service.QueryParams;s._currentCVID=n.cleanGuid(s.createGuid());s._randomPrivacy
Number=s.getNewPrivacyNumber();var e=o.searchHistory;e?
e.addEventListener("cleardevicehistoryrequested",function()
{n.log("clearDeviceHistoryRequested");var t=function(t){return
n.safeExecute(function(){n.log(t?"clearDeviceHistory succeded":"clearDeviceHistory
failed");e.signalClearDeviceHistoryCompleted(t)},"signalClearDeviceHistoryCompleted
")};s._clearStorageRequestedEventHandler?(n.log("calling
clearDeviceHistoryRequested handler"),n.safeExecute(function(){return
s._clearStorageRequestedEventHandler(t),!0},"clearDeviceHistoryRequested")||t(!1)):
(n.log("no handler for clearDeviceHistoryRequested"),t(!1))}):n.log("searchHistory
not available");i.addEventListener("statechanged",function(n){return
s.updateState(s._state,n.newState,!
1)});u.addEventListener("querytextchanged",function(n)
{if(s.updateState(s._state,2,!
0),s._queriesToIgnoreOnQueryTextChangedEvent[n.queryText]||
s._lastIgnoredQueryOnQueryTextChangedEvent==n.queryText){delete
s._queriesToIgnoreOnQueryTextChangedEvent[n.queryText];s._lastIgnoredQueryOnQueryTe
xtChangedEvent=n.queryText;return}s._lastIgnoredQueryOnQueryTextChangedEvent=null;s
.callQueryChangedHandlers(n,!
1,n.impressionId)});u.addEventListener("keydown",function(i){var
f=i.keyCode,e={shiftKey:i.isShiftKeyPressed,ctrlKey:i.isControlKeyPressed,altKey:!
1},r,u;s._config.searchBoxFocusEvents||(r=n.getCurrentActiveElement(),r&&!
t.isBodyOrSuggestion(r)&&r.blur());u=i.isHandled;s._keyDownHandlers.forEach(functio
n(t){return n.safeExecute(function(){return
t(f,e,u)},"keyDown")})});sj_b.addEventListener("keydown",function(i){var
r,u;if(i.target)
{if(r=_ge("fbpgdg"),r&&r.contains(i.target))return;if(t.PreviewPane&&(u=_ge("qfPrev
iewPane"),u&&u.contains(i.target)))if(i.keyCode==37)sj_pd(i);else
return}if(n.contains([38,40],i.keyCode)&&sj_pd(i),s.isRequestFocusAvailable())
{if(i.keyCode==13)return;n.contains([38,40],i.keyCode)&&s.setFocusInSearchBox("keyD
own")}s._keyDownHandlers.forEach(function(t){return n.safeExecute(function(){return
t(i.keyCode,i)},"keyDown")})});u.addEventListener("keyup",function(t){var
i=t.keyCode,r={shiftKey:t.isShiftKeyPressed,ctrlKey:t.isControlKeyPressed,altKey:!
1},u=t.isHandled;s._keyUpHandlers.forEach(function(t){return
n.safeExecute(function(){return
t(i,r,u)},"keyUp")})});sj_b.addEventListener("keyup",function(t){return
s._keyUpHandlers.forEach(function(i){return n.safeExecute(function(){return
i(t.keyCode,t)},"keyUp")})});u.addEventListener("gotfocus",function(){return
s._searchBoxGotFocusEventHandlers.forEach(function(t){return
n.safeExecute(function(){return
t()},"gotfocus")})});u.addEventListener("lostfocus",function(){return
s._searchBoxLostFocusEventHandlers.forEach(function(t){return
n.safeExecute(function(){return
t()},"lostfocus")})});u.addEventListener("submitbuttonclick",function(){return
s._onSubmitHandlers.forEach(function(t){return n.safeExecute(function(){return t(!
0,null)},"submitbuttonclick")})});sj_evt.bind("ajax.feedback.initialized",sj_dm(s,s
.registerFeedbackDebugCallback),!
0)},"WindowsHostInit");this.bindAppVisible(function(){return
s.initCachedVariables(!0)});this.bindShown(function()
{sj_evt.fire("ajax.threshold.pageStart",(new
Date).getTime());s.initCachedVariables(!1);var
t=s.getNewConversationId();s._currentCVID!
=t&&(s._currentCVID=t,s._randomPrivacyNumber=s.getNewPrivacyNumber(),s._conversatio
nStartEventHandlers.forEach(function(t){return n.safeExecute(function(){return
t()},"conversationStart")}));s._lastKeyWasEnter=!1});this.bindDismissed(function()
{sj_evt.fire("WindowsFeedback.Form.Hide");sj_evt.fire("threshold.pageUnload");s.cle
anupCachedVariables(!
1);s._queriesToIgnoreOnQueryTextChangedEvent={}});this.bindAppHidden(function()
{s.cleanupCachedVariables(!
0);s.uploadClientErrorLog()});this.bindKeyDown(function(t,i)
{s._modifierKeyState=i;var r=t==13;r&&!
s._lastKeyWasEnter&&s._onSubmitHandlers.forEach(function(t){return
n.safeExecute(function(){return t(!1,i)},"onSubmit
handlers")});s._lastKeyWasEnter=r});this.bindKeyUp(function(n){s._lastKeyWasEnter=!
1;switch(n){case 16:s._modifierKeyState.shiftKey=!1;break;case
17:s._modifierKeyState.ctrlKey=!
1}});_G.PN="QF";this._edgeIconCache=t.Promise.safeChainWithGlobalCaching("edgeIcon"
,function(n){return o.deviceSearch.findAppsAsync([t.EdgeAppId]).then(function(i)
{var r=i[t.EdgeAppId];return
r.getImageAsync(t.getImageSizeValue(n)).then(function(n){return
c(n,"edgeIcon",null,r.logoBackgroundColor)})})},function(n){return
n+"_edgeIcon"});!
t.isMobileCache&&i.setDefaultUriLaunchPolicy&&i.setDefaultUriLaunchPolicy(2)}return
a.prototype.uploadClientErrorLog=function(){var
o,u,e,t,f,r;if(i.getFlightingLogsAndDelete)for(o=n.safeExecute(function(){return
i.getFlightingLogsAndDelete()},"getFlightingLogsAndDelete",""),u=0,e=o.split("\r\n"
);u<e.length;u++)t=e[u],t!=""&&(f=t.indexOf("|"),f<0||f+1==t.length?
SharedLogHelper.LogWarning("clientError",t,"Malformed clientError data"):
(r=t.substr(f+1),r.startsWith("Critical:")||r.startsWith("Error:")?
SharedLogHelper.LogError("clientError",null,r):SharedLogHelper.LogWarning("clientEr
ror",null,r)))},a.prototype.registerFeedbackDebugCallback=function(n){var
t=n[1].debugCollector;t.registerCollectionCallback(sj_dm(this,this.collectDebugInfo
))},a.prototype.collectDebugInfo=function(){var
n=this._currentQuery&&this._currentQuery.originalQuery,t={};return
n&&(t.query=n),t},a.prototype.clearInitialFetchTimer=function()
{this._initialFetchTimer&&(sb_ct(this._initialFetchTimer),this._initialFetchTimer=n
ull)},a.prototype.callQueryChangedHandlers=function(t,r,u){var
e=this,f;this.clearInitialFetchTimer();u||
(f=i.impressionId,this.usedImpressionIds[f]||(u=f,this.usedImpressionIds[f]=!
0));this._currentRawImpressionId=u&&u!=this._currentRawImpressionId?
u:this.createGuid();this._previousQuery=this._currentQuery;this._currentQuery=this.
getStructuredQuery(t,this._previousQuery);this._previousQuery&&this._previousQuery.
cursorPosition==this._currentQuery.cursorPosition||
this._cursorPositionChangedHandlers.forEach(function(t){return
n.safeExecute(function(){return
t(e._currentQuery,r)},"cursorPositionChanged")});this._queryChangedHandlers.forEach
(function(t){return n.safeExecute(function(){return
t(e._currentQuery,r)},"queryTextChanged")})},a.prototype.getStructuredQuery=functio
n(n,i){return
t.parseQuery(n.queryText,n.cursorPosition,this._config,i)},a.prototype.updateState=
function(t,i,r){var f=this;t!
=i&&(this._state=i,t==0&&this._appVisibleEventHandlers.forEach(function(t){return
n.safeExecute(function(){return
t()},"appVisible")}),i==2&&(this._shownEventHandlers.forEach(function(t){return
n.safeExecute(function(){return t()},"shown")}),r||
(this._initialFetchTimer=sb_st(function(){return n.safeExecute(function(){return
f.callQueryChangedHandlers(u.getQueryText(),!
1)},"initialFetch")},0))),t==2&&(this.clearInitialFetchTimer(),this._dismissedEvent
Handlers.forEach(function(t){return n.safeExecute(function(){return
t()},"dismissed")})),i==0&&(this._paneCloseCount+=1,this._appHiddenEventHandlers.fo
rEach(function(t){return n.safeExecute(function(){return
t()},"appHidden")})))},a.prototype.initializeEvents=function()
{this.updateState(this._state,i.currentState,!
1)},a.prototype.bindClearMRURequested=function(n)
{this._clearStorageRequestedEventHandler&&SharedLogHelper.LogError("bindClearMRUReq
uested",null,new Error("Only one event handler
supported"));this._clearStorageRequestedEventHandler=n},a.prototype.shouldRequestEl
token=function(){return
this._shouldRequestEltoken},a.prototype.getElToken=function(){return
this._elToken},a.prototype.setElToken=function(n)
{this._elToken=n;this._shouldRequestEltoken=!
1},a.prototype.getInstrumentationParameters=function(n){var t=i.createStringMap?
i.createStringMap():{};return
_G.nclid&&(t[f.HashedMuid]=_G.nclid),t[f.FormCode]=n||
this.getFormCode(),t[f.ConversationId]=this.getConversationId(),t},a.prototype.clea
nupCachedVariables=function(n)
{n&&(this._vcdKeywords=null,t.Promise.clearGlobalCache(),this._locStrings=null,t.cl
eanScopePrefixes());delete
this._queryParamsCache[f.HomeGeographicRegion]},a.prototype.initCachedVariables=fun
ction(r){var u=this,e,o;
(n.isBingEnabledCache=i.isBingEnabled,t.isCortanaEnabledCache=i.isCortanaEnabled,t.
regionCache=i.region,this._queryParamsCache[f.CountryCode]=t.regionCache,t.homeGeog
raphicRegionCache=i.h
omeGeographicRegion,t.homeGeographicRegionCache&&t.homeGeographicRegionCache!
=t.regionCache&&(this._queryParamsCache[f.HomeGeographicRegion]=t.homeGeographicReg
ionCache),this._config.cortanaCapabilitiesAvailable?
(t.availableCortanaCapabilities=n.safeExecute(function(){return
i.getCortanaCapabilities()},"getCortanaCapabilities","").split(","),t.isSignedInWit
hMSA=n.contains(t.availableCortanaCapabilities,t.CortanaCapabilities.Personalizatio
n),t.isSignedInWithMSA&&typeof ConnectedAccounts!
="undefined"&&t.Promise.safeChain("initConnectedAccount",function(){return
ConnectedAccounts.init()},function()
{n.isDataSourceEnabled(t.DataSources.SubstrateSuggestionsEnterprise,null,u._config)
&&t.Promise.safeChain("getConnectedAccount_SubstrateEnterprise",function(){return
ConnectedAccounts.getConnectedAccount(t.Office365Provider,t.SubstrateResourceUrl,!
1,1440)},function(n){t.isSubstrateO365AccountConnected=!!
n&&n.Connected});n.isDataSourceEnabled(t.DataSources.SubstrateSuggestionsConsumer,n
ull,u._config)&&t.Promise.safeChain("getConnectedAccount_SubstrateConsumer",functio
n(){return
ConnectedAccounts.getConnectedAccount(t.OutlookProvider,t.SubstrateResourceUrl,!
1,1440)},function(n){t.isSubstrateOutlookAccountConnected=!!
n&&n.Connected})})):t.availableCortanaCapabilities=[],e=[],i.systemRAMInMB&&i.syste
mRAMInMB<=512&&e.push("LowMemoryDevice"),e.push("FontV16"),e.push("LightAnswers"),t
his._headersCache={},e.length>0&&(this._headersCache["X-BM-
ClientFeatures"]=e.join()),ThresholdUtilities.getCortanaHeaders(function(n){var
r=n["X-Search-Location"],i;u._shouldRequestEltoken=!!
r;u._config.cortanaCapabilitiesAvailable||(t.isSignedInWithMSA=!!n["X-Search-
RPSToken"]);i=n["X-BM-
ClientFeatures"];i&&(Array.prototype.push.apply(e,i.split(",")),u._headersCache["X-
BM-
ClientFeatures"]=e.join())}),r)&&(t.isCortanaEnabledCache&&i.getVcdKeywordsAsync&&t
.Promise.safeChain("vcdKeywords",function(){return
i.getVcdKeywordsAsync()},function(n){return
u._vcdKeywords=n}),t.uiLanguageCache=i.uiLanguage,this._queryParamsCache[n.Service.
QueryParams.SetLang]=t.uiLanguageCache,o={uiCulture:"en-
US",name:"CortanaQF",namespace:"AutoSuggest"},this._enUsLocStrings||
(this._enUsLocStrings=LocStringManager.getLocString(o)),t.uiLanguageCache.toLowerCa
se()!="en-
us"&&(o.uiCulture=t.uiLanguageCache,this._locStrings=n.safeExecute(function()
{return
LocStringManager.getLocString(o)},"getLocString",null,o.uiCulture)),this._suggestio
nsContainer.setAttribute("aria-
label",this.getLocString("ResultsList")),t.initScopePrefixes(this._config,function(
n){return u.getLocString(n)},function(n){return
u.getEnUsLocString(n)}),this._elToken=null,ThresholdUtilities.getThemeColor(functio
n(n){n!
=u._accentColor&&(u._accentColor=n,u.applyAccentColor(n))}),ThresholdUtilities.setB
odyLangAttributes(i.uiLanguage))},a.prototype.getAccentColor=function(){return
this._accentColor},a.prototype.applyAccentColor=function(t){var u,f="accent-
style",r=_ge(f),i;r||
(r=_d.createElement("style"),r.setAttribute("id",f),r.type="text/css",u=!
0);i=".icon svg { fill: {0} } .gridLayout .suggestion.sa_hv, .gridLayout
.suggestion.sa_hv:hover { border-color: {1}; }";n.isHighContrastEnabled()||
(i+=".action, .accentColor, .useChevron .groupAnnotations { color: {0}; }
.sa_hv, .scr .sa_hv:hover, .scr .sa_hv.selectable:active { background-color:
{1}; }",i+=".topHitConnectedToGroup:not(.sa_hv) { background: {2}; }",i+="#root
.selectedScope { background-color: {3}; }",i+="#root .selectedScope:hover
{ background-color: {4}; }",i+="#root .selectedScope:active { background-color:
{5}; }",i+="#startMenu .icon { background-color:
{5}; }",i+=".accentButtonBackground { background-color:
{6}; }",i+=".accentButtonBackground:focus { background-color:
{1}; }",i+=".scopeOptions input[type='button'], .topOptions input[type='button']
{ background-color: {0}; border-color: {0} }",i+=".scopeOptions
input[type='button']:hover, .topOptions input[type='button']:hover { border-color:
{3} }");r.innerHTML=n.formatString(i,
[t,e(t,.3),e(t,.1),e(t,.4),e(t,.6),e(t,.7),e(t,.15)]);u&&_d.head.appendChild(r)},a.
prototype.createGuid=function(){return n.safeExecute(function(){return
i.createGuid()},"createGuid","")},a.prototype.getLocString=function(t){for(var
i,u=[],r=1;r<arguments.length;r++)u[r-1]=arguments[r];return i=this._locStrings?
this._locStrings[t]:this._enUsLocStrings[t],i&&u.length>0&&(i=n.formatString(i,u)),
i},a.prototype.getEnUsLocString=function(n){return
this._enUsLocStrings[n]},a.prototype.getRawImpressionGuid=function(){return
this._currentRawImpressionId},a.prototype.getConversationId=function(){return
this._currentCVID},a.prototype.getPrivacyNumber=function(){return
this._randomPrivacyNumber},a.prototype.getNewConversationId=function(){var
t=n.cleanGuid(n.safeExecute(function(){return
o.perfMetrics.conversationId},"conversationId"));return t||
(SharedLogHelper.LogWarning("getNewConversationId",null,new Error("Client returned
null conversation
ID")),t=n.cleanGuid(this.createGuid())),t},a.prototype.getNewPrivacyNumber=function
(){return
Math.floor(Math.random()*Number.MAX_VALUE)},a.prototype.bindQueryChangedOrInitializ
ed=function(n)
{this._queryChangedHandlers.push(n)},a.prototype.bindCursorPositionUpdated=function
(n)
{this._cursorPositionChangedHandlers.push(n)},a.prototype.bindOnSubmit=function(n)
{this._onSubmitHandlers.push(n)},a.prototype.bindSearchBoxGotFocus=function(n)
{this._searchBoxGotFocusEventHandlers.push(n)},a.prototype.bindSearchBoxLostFocus=f
unction(n)
{this._searchBoxLostFocusEventHandlers.push(n)},a.prototype.getModifierKeyState=fun
ction(){return this._modifierKeyState},a.prototype.bindAppVisible=function(n)
{this._appVisibleEventHandlers.push(n)},a.prototype.bindShown=function(n)
{this._shownEventHandlers.push(n)},a.prototype.bindConversationStart=function(n)
{this._conversationStartEventHandlers.push(n)},a.prototype.bindDismissed=function(n
){this._dismissedEventHandlers.push(n)},a.prototype.bindAppHidden=function(n)
{this._appHiddenEventHandlers.push(n)},a.prototype.bindKeyDown=function(n)
{this._keyDownHandlers.push(n)},a.prototype.bindKeyUp=function(n)
{this._keyUpHandlers.push(n)},a.prototype.getQuery=function(){return
this.getStructuredQuery(u.getQueryText(),this._previousQuery)},a.prototype.setQuery
=function(t,r,f){var o=this,e=this._currentQuery?
this._currentQuery.originalQuery:null;t=t||r?t:e;r||f||!t||t==e||
(this._queriesToIgnoreOnQueryTextChangedEvent[t]=!
0);this._currentQuery&&this._currentQuery.taskFrame&&t==e&&n.safeExecute(function()
{return i.searchResultsView.setTaskFrame(t,o._currentQuery.taskFrame)},"restore
task frame");n.safeExecute(function(){return u.setQueryText(t,r)},"setQueryText");
(r&&this._config.triggerQueryTextChangedEventsOnSetQuery||f)&&sb_st(function()
{return n.safeExecute(function(){return
o.callQueryChangedHandlers({queryText:t,cursorPosition:t.length},f)},"triggerQueryT
extChangedEvent")},0)},a.prototype.setAutoCompleteQueryText=function(t){var
i=this;n.safeExecute(function(){return
u.setAutoCompleteQueryText(t,i._currentRawImpressionId)},"setAutoCompleteQueryText"
)},a.prototype.launchUrl=function(n){t.isMobileCache?
t.Promise.safeChain("launchUrl",function(){return
r.launchUriAsync(n)}):i.setDefaultUriLaunchPolicy?
t.Promise.safeChain("launchUrl",function(){var t=r.createUriLaunchOptions();return
t.launchPolicy=2,r.launchUriAsync(n,t)}):t.Promise.safeChain("launchUrlTH1",functio
n(){return r.launchUriAsync("microsoft-
edge:"+n)})},a.prototype.matchesVcd=function(n){var
t,r,i,u,f,e;if(this._vcdKeywords&&n&&(t=h(n),t))for(r in
this._vcdKeywords)if(this._vcdKeywords.hasOwnProperty(r)&&(i=h(r),i&&(u=t.indexOf(i
),u>=0&&((f=this._vcdKeywords[r],f&1)||f&2&&u==0||f&4&&(u==t.length-i.length||
(e=t.lastIndexOf(i),e==t.length-i.length))))))return!0;return!
1},a.prototype.isRequestFocusAvailable=function(){return!!
u.requestFocus},a.prototype.setFocusInSearchBox=function(t)
{if(this.isRequestFocusAvailable()){n.safeExecute(function(){return
u.requestFocus()},"requestFocus",null,t);var
i=n.getCurrentActiveElement();i&&i.blur()}},a.prototype.getFeatureEnabled=function(
n){return i.getFeatureEnabled?i.getFeatureEnabled(n):{validFeature:!
1,featureEnabled:!1}},a.prototype.getFeatureDWORD=function(n){return
i.getFeatureDWORD?i.getFeatureDWORD(n):{validFeature:!
1,featureValue:0}},a.prototype.getFeatureString=function(n){return
i.getFeatureString?i.getFeatureString(n):{validFeature:!
1,featureValue:""}},a.prototype.launchInApp=function(i,r,f){this.setQuery(r,!1,!
1);n.safeExecute(f,i);t.isMobileCache&&u.requestUnfocus&&n.safeExecute(function()
{return
u.requestUnfocus()},"requestUnfocus",null,i)},a.prototype.launchVoiceFlow=function(
n){var t=this;this.launchInApp("launchVoiceFlow",n,function(){return
r.launchRAFAsync(n,t.getFormCode(),t.getInstrumentationParameters())})},a.prototype
.launchSearch=function(n,u,f){f?this.launchVoiceFlow(n):t.isMobileCache?
this.launchInApp("launchSearch",n,function(){var
t=r.createSearchLaunchOptions();t.searchQuery=n;var
i=u.indexOf("/search"),f=u.indexOf("/",u.indexOf("//")
+2),e=f==i?"":u.substring(f+1,i);e&&(t.pivot=e);t.mode=1;t.uriContext=u.substr(u.in
dexOf("&")+1);r.launchSearchAsync(t)}):i.setDefaultUriLaunchPolicy?
t.Promise.safeChain("launchSearch",function(){return
r.launchUriAsync(u)}):t.Promise.safeChain("launchSearchTH1",function(){return
r.launchUriAsync("microsoft-edge:"+u)})},a.prototype.launchCat1=function(n,t,u){var
e=this,f=l[t];f?this.launchInApp("launch"+f,n,function(){return
i.launchExperienceByName(f,null)}):this.launchInApp("launchCat1",n,function()
{return
r.launchCat1Async(n,u,e.getInstrumentationParameters())})},a.prototype.launchCat1My
Stuff=function(n,t){var i=this;this.launchInApp("launchCat1MyStuff",n,function()
{return
r.launchMyStuffTaskFrameAsync(n,i.getFormCode(),t,i.getInstrumentationParameters())
})},a.prototype.launchCat2or3a=function(n,t){var
i=this;this.launchInApp("launchCat2",n,function(){return
r.launchCat2Async(n,i.getFormCode(),t,i.getInstrumentationParameters())})},a.protot
ype.launchStorePdp=function(i){var
u="ms-windows-store:pdp?ProductId="+n.encodeQueryParameter(i)
+"&ocid="+n.encodeQueryParameter(this._config.storeHandoffTag);t.Promise.safeChain(
"launchStorePdp",function(){return
r.launchUriAsync(u)})},a.prototype.launchStoreSearch=function(i){var u="ms-windows-
store:search?query="+n.encodeQueryParameter(i)
+"&ocid="+n.encodeQueryParameter(this._config.storeHandoffTag);t.Promise.safeChain(
"launchStoreSearch",function(){return
r.launchUriAsync(u)})},a.prototype.launchFolder=function(t)
{n.safeExecute(function(){return
r.startLaunchFolder(t)},"launchFolder")},a.prototype.launchDeviceItem=function(n,i)
{var u=i;t.localDataSourceMayContainPII(i)||
(u+="\n"+n.id);t.Promise.safeChain("launchDeviceItem",function(){return
r.launchSearchItemAsync(n)},null,null,null,u)},a.prototype.launchAppItem=function(i
,u,f){var e=u+"\n"+i.id;f&&e+"\n"+f;n.safeExecute(function(){var
n;f&&(n=r.createAppLaunchOptions(),n.appContext=f);t.Promise.safeChain("launchAppIt
em",function(){return
r.launchSearchItemAsync(i,n)},null,null,null,e)},"launchAppItem",null,e)},a.prototy
pe.launchWebContent=function(n,t){var
i=r.createWebContentLaunchOptions();i.uri=n;t&&(i.searchBoxQueryText=t);this.launch
InApp("launchWebContent",null,function(){return
r.launchWebContent(i)})},a.prototype.getCustomUrlParameters=function(n){var
i=Object.assign({},this._queryParamsCache),r=n.scope;return r==t.Scope.All?delete
i[f.Scope]:i[f.Scope]=t.Scope[r].toLowerCase(),i},a.prototype.getCustomHeaders=func
tion(){return
Object.assign({},this._headersCache)},a.prototype.reloadWebView=function(n){var
r=this;n?t.Promise.safeChain("repopulateAppCacheAsync",function(){return
i.repopulateAppCacheAsync()},function(){return r.reloadWebView(!
1)}):t.Promise.safeChain("reloadWebViewAsync",function(){return
i.reloadWebViewAsync()})},a.prototype.getFormCode=function()
{return"WNSGPH"},a.prototype.getRegion=function(){return
t.regionCache},a.prototype.getLanguage=function(){return
t.uiLanguageCache},a.prototype.dataSourceDependencies=function(i){return
i==n.WebDataSource?[t.DataSources.BingApps,t.DataSources.BingSettings]:
[]},a.prototype.getPaneCloseCount=function(){return
this._paneCloseCount},a.prototype.hasFallbackHappened=function(){var
t=n.safeExecute(function()
{return+SearchAppWrapper.CortanaApp.queryFormulationView.perfMetrics.lookup(32)},"p
erfMetricsFallbackLookup",s);return t!=s},a}();t.Host=a})(t=n.Windows||
(n.Windows={}))})(AutoSuggest||(AutoSuggest={}))

You might also like