You are on page 1of 58

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)}}(),__spreadArrays,__assign,WSB;(function(n)
{function f(t,r,u,f,e,o,s,h){i(t,r,u,function(t){var
i=null;t.status==200&&(i=t.responseText?n.config.moreLogForJSError&&t.responseURL?
n.safeExecute(function(){return JSON.parse(t.responseText)},"JSON.parse.moreErrLog
"+t.responseURL.substring(0,100),undefined,t.responseText.substring(0,100)):n.safeE
xecute(function(){return JSON.parse(t.responseText)},"JSON.parse"):{success:!
0});f(i)},e,o,s,h)}function i(i,r,u,f,e,o,s,h,c){var l=c&&_w.XMLHttpRequest?new
XMLHttpRequest:sj_gx(),v,a;try{l.open(u?"POST":"GET",i,!0)}catch(y)
{SharedLogHelper.LogError("fetchUrl",i,y);f&&f({responseText:"",contentType:"",stat
us:-1,result:3});return}if(r)for(v in
r)l.setRequestHeader(v,r[v]);e&&(a=e.register(function(){return l.abort()},!1,"xhr
abort"));n.config.useEventListeners?(l.addEventListener("load",function()
{t(l,0,f,a,e,o)}),l.addEventListener("timeout",function()
{t(l,1,f,a,e,o)}),l.addEventListener("abort",function()
{t(l,2,f,a,e,o)}),l.addEventListener("error",function(){t(l,3,f,a,e,o)})):
(l.onreadystatechange=function()
{l.readyState==4&&l.status>0&&t(l,0,f,a,e,o)},l.ontimeout=function(){return
t(l,1,f,a,e,o)},l.onabort=function(){return t(l,2,f,a,e,o)},l.onerror=function()
{return t(l,3,f,a,e,o)});typeof s!="undefined"?
l.withCredentials=s:l.withCredentials!==undefined&&(l.withCredentials=!
0);h&&h>0&&(l.timeout=h);l.send(u)}function t(n,t,i,r,u,f){(!f||
f())&&(n.readyState==4&&(n.onreadystatechange=function()
{}),r&&u.unregister(r),i&&i({responseText:n.responseText,contentType:n.getResponseH
eader("content-
type")||"",status:n.status,result:t,responseURL:n.responseURL}))}function e(n){var
t=n.IconContent;return t?t[0]=="S"?{content:t.slice(1),type:1}:
{content:t,type:2}:n.Icon?{content:n.Icon,type:0}:null}var
r,u;n.fetchUrlJson=f;n.fetchUrl=i;r=function(){function t(t)
{this._dataSource=t;this._delay=n.config.webDataSourcesWithThrottling[t]||
0;this._timers=[]}return t.prototype.getBaseUrl=function(){throw new Error("Not
Implemented");},t.prototype.getPostBody=function(){return
undefined},t.prototype.onBeforeFetchUrl=function()
{},t.prototype.createUrl=function(t){return decodeURIComponent(this.getBaseUrl())+
(t?
n.encodeQueryParameter(t.queryToFetch.toLowerCase()):"")},t.prototype.addParamsToUr
l=function(n,t){var i=t?Object.keys(t):[];return
i.length>0&&(n+=n.includes("?")?"&":"?",n+=i.map(function(n){return
n+"="+t[n]}).join("&")),n},t.prototype.fetch=function(t,i,r,u,f,e,o,s,h,c){var
p=this,l,v,a,y,w;if(n.isDataSourceEnabled(this._dataSource,t))
{if(l=this.addParamsToUrl(this.createUrl(t),e),n.config.shGAWDx&&(t===null||
t===void 0?void 0:t.fromSearchHome)&&(t===null||t===void 0?void
0:t.queryToFetch)==="Good news - MSN"&&(l="https://api.msn.com/news/feed?
ocid=winsearch&market=en-us&query=good
%20news&apikey=uvobH5fEn1uz1xwZ5yuwtWzu2y32WpRZ6EMpZx7o09"),v=this.getPostBody(t)||
"",this._lastSequenceNumber!=r){for(a=0,y=this._timers;a<y.length;a+
+)w=y[a],sb_ct(w);this._timers=[];this._lastSequenceNumber=r}if(this._delay>0&&!
t.isFormulatedQuery)this._timers.push(n.safeSetTimeout(function()
{p.onBeforeFetchUrl(r,l);p.fetchUrl(l,o,v,i,u,f,s,h,c)},this._delay,"fetchDelay"));
else{this.onBeforeFetchUrl(r,l);this.fetchUrl(l,o,v,i,u,f,s,h,c)}}},t.prototype.fet
chUrl=function(t,r,u,f,e,o,s,h,c){var l=this;i(t,r,u,function(i){var
r=i.responseText,o=i.contentType,u=i.status,e;u==200&&(n.TestHookUrlParameters&&r&&
(r=r.replace(new RegExp("<!--[^]*?--
>","gm"),"")),r&&o.includes("json")&&(e=n.safeExecute(function(){return
JSON.parse(r)},"parseWebProviderResponse",null,t)));f(l._dataSource,e,u==200?
null:u.toString())},this._delay>0?e:null,o,h,s,c)},t}
();n.JsonDataProvider=r;u=function(t){function i(n){var i=t.call(this,"Web")||
this;return i._responseCacheManager=n,i}return
__extends(i,t),i.prototype.getName=function()
{return"AsSuggestionsDataProvider"},i.prototype.getBaseUrl=function(){return
n.config.u},i.prototype.onBeforeFetchUrl=function(t,i)
{n.InstrumentationHelper.instrumentSnRProviderFetchUrl(t,i)},i.prototype.fetch=func
tion(i,r,u,f,e,o,s){var
c=this,h;n.isDataSourceEnabled(this._dataSource,i)&&(n.config.enableFetchStartLoggi
ng&&n.InstrumentationHelper.instrumentFetchProviderBegin(u,"ASDP:"+this._dataSource
),h=r,h=function(t,u,f,e)
{u&&n.isEmptyUrlPrefix(i)&&(u.Suggestions=[]);c.processResourceResponse(u);r(t,u,f,
e)},this._responseCacheManager?
this.fetchWithCache(i,h,u,f,e,o,s):t.prototype.fetch.call(this,i,h,u,f,e,o,s))},i.p
rototype.fetchWithCache=function(i,r,u,f,e,o,s){var
c=this,l=this._responseCacheManager.get(i),a,v,h;if(l)
{a=this.addParamsToUrl(this.createUrl(i),o);this.onBeforeFetchUrl(u,a);r(this._data
Source,l,null,1);n.config.forceUseNifQF&&this._dataSource=="Web"&&this.fetchWithout
Cache(i,r,u,f,e,o,s)}else v=function(){return!0},h=r,h=function(n,t,u)
{e()&&r(n,t,u,0);i.queryToFetch&&c.responseIsValidForCaching(u,t)&&(t.ELToken&&(t=O
bject.assign({},t),delete
t.ELToken),c._responseCacheManager.put(i,t))},t.prototype.fetch.call(this,i,h,u,f,v
,o,s)},i.prototype.fetchWithoutCache=function(n,i,r,u,f,e,o){var
s=this,c=function(){return!0},h=i;h=function(t,r,u)
{f()&&i(t,r,u,0);n.queryToFetch&&s.responseIsValidForCaching(u,r)&&(r.ELToken&&(r=O
bject.assign({},r),delete
r.ELToken),s._responseCacheManager.put(n,r))};t.prototype.fetch.call(this,n,h,r,u,c
,e,o)},i.prototype.responseIsValidForCaching=function(n,t){var i="HS";return!
n&&t&&t.Suggestions.every(function(n){return!n.InstantAnswer&&n.Attributes.stype!
=i})},i.prototype.processResourceResponse=function(n){var
t,i;n&&(t=n.Resources,t)&&(this._downloadedStylesResources?
this.updateWithDownloadedResources(t):this._downloadedStylesResources=t.Styles,i={S
tyles:t.Styles,Scripts:null},JsonInject.WriteHeadAndBeforeContentResources(i))},i.p
rototype.updateWithDownloadedResources=function(n){var t,i;for(t in n.Styles)for(i
in n.Styles[t])this._downloadedStylesResources[t][i]?delete n.Styles[t]
[i]:this._downloadedStylesResources[t][i]=n.Styles[t][i]},i}
(r);n.AsSuggestionsDataProvider=u;n.getIconFromOnlineResponse=e})(WSB||
(WSB={})),function(n){var t;(function(t){function f(n,t,i,r,f){typeof indexedDB!
="undefined"&&new u(n,f,t,i,r)}function e(n,t,i,r,f){typeof indexedDB!
="undefined"&&new u(n,f,t,i,r)}function o(n,t,i,r,f,e){typeof indexedDB!
="undefined"&&new u(n,e,t,i,r,f)}function s(n,t,i,r,f,e){typeof indexedDB!
="undefined"&&new u(n,e,t,i,r,f)}function h(n,t,u){i(n,"deleteDatabase
requested");try{var f=indexedDB.deleteDatabase(n);f.onsuccess=function()
{i(n,"deleteDatabase
completed");t&&t()};f.onerror=r("deleteDatabase.onError",function(t)
{SharedLogHelper.LogError("deleteDB",n,t);u&&u(t)})}catch(e){u&&u(e)}}function
r(n,t){return function(i){var r=n;try{r+=" "+i.target.error.name}catch(u){}t(new
Error(r))}}var
i,u;t.instanceWithNumberKeys=f;t.instanceWithStringKeys=e;t.instanceWithNumberKeysA
ndSecondaryKey=o;t.instanceWithStringKeysAndSecondaryKey=s;i=(n.TestHookUrlParamete
rs===null||n.TestHookUrlParameters===void 0?void
0:n.TestHookUrlParameters.dbTrace)?function(t,i){return n.log("["+t+"]
"+i)}:function(){};t.deleteDatabase=h;t.handleErrorEvent=r;u=function(){function
t(n,u,f,e,o,s){var
h=this,c;this._databaseName=n;this.onClosed=o;this._secondaryIndex=s;this._closePen
ding=!1;this._storeName=n+"Store";i(this._databaseName,"open
requested");try{c=indexedDB.open(n,u||1)}catch(l){e(new
Error("IndexedDbClientSideStorage.const: Could not open
database"));return}c.onsuccess=function(n)
{h._database=n.target.result;t._allInstances.push(h);i(h._databaseName,"open
completed");f(h)};c.onupgradeneeded=function(n){var
t,r;i(h._databaseName,"upgrading");t=n.target.result;t.objectStoreNames.contains(h.
_storeName)&&t.deleteObjectStore(h._storeName);r=t.createObjectStore(h._storeName);
h._secondaryIndex&&r.createIndex(h._secondaryIndex,h._secondaryIndex,{unique:!
1})};c.onerror=r("open.onError",e);c.onblocked=r("open.onBlocked",e)}return
t.prototype.put=function(n,t,i,r)
{this.safeDbOperation("put",n.toString(),"readwrite",i,function(i,r,u){var
f=i.put(t,n);f.onsuccess=r;f.onerror=u},r)},t.prototype.putMultiple=function(n,t,i)
{this.safeDbOperation("putMultiple",n.length.toString(),"readwrite",t,function(t,i,
r){var u=0,f=function(){if(u<n.length){var
e=t.put(n[u].value,n[u].key);u+=1;e.onsuccess=u==n.length?
i:f;e.onerror=r}};f()},i)},t.prototype.getValue=function(n,t,i)
{this.safeDbOperation("getValue",n.toString(),"readonly",function(n){return
t(n.target.result)},function(t,i,r){var
u=t.get(n);u.onsuccess=i;u.onerror=r},i)},t.prototype.getRange=function(n,t,i,r)
{var u=this;this.safeDbOperation("getRange","["+n+",
"+t+")","readonly",i,function(i,r,f){var e=IDBKeyRange.bound(n,t,!1,!
0);u.queryFromCursor(i.openCursor(e),r,f)},r)},t.prototype.getRangeOnSecondaryKey=f
unction(n,t,i,r){var u=this;this._secondaryIndex?
this.safeDbOperation("getRangeOnSecondaryKey","["+n+",
"+t+")","readonly",i,function(i,r,f){var
e=i.index(u._secondaryIndex),o=IDBKeyRange.bound(n,t,!1,!
0);u.queryFromCursor(e.openCursor(o),r,f)},r):r(new Error("getRangeOnSecondaryKey:
Index name is missing"))},t.prototype.removeRange=function(n,t,i,r){var
u=this;this.safeDbOperation("removeRange","["+n+","+t+"]","readwrite",i,function(i,
r,f){var e=IDBKeyRange.bound(n,t,!1,!
0);u.removeFromCursor(i.openCursor(e),r,f)},r)},t.prototype.removeRangeOnSecondaryK
ey=function(n,t,i,r){var u=this;this._secondaryIndex?
this.safeDbOperation("removeRangeOnSecondaryKey","["+n+","+t+"]","readwrite",i,func
tion(i,r,f){var e=i.index(u._secondaryIndex),o=IDBKeyRange.bound(n,t,!1,!
0);u.removeFromCursor(e.openCursor(o),r,f)},r):r(new
Error("removeRangeOnSecondaryKey: Index name is
missing"))},t.prototype.getAll=function(n,t){var
i=this;this.safeDbOperation("getAll",null,"readonly",n,function(n,t,r){return
i.queryFromCursor(n.openCursor(),t,r)},t)},t.prototype.close=function()
{i(this._databaseName,"close
requested");this.innerClose()},t.prototype.innerClose=function(){var
f,e,r,u,o;if(t._requestsInProgress>0)i(this._databaseName,"delaying close because
of "+t._requestsInProgress+" requests in progress"),this._closePending=!0;else
for(f=function(t){t._database&&(n.safeExecute(function(){return
t._database.close()},e._databaseName+".close"),i(t._databaseName,"close
completed"),t._database=null,t.onClosed())},e=this,r=0,u=t._allInstances;r<u.length
;r++)o=u[r],f(o)},t.prototype.queryFromCursor=function(t,i,r){var
u=[];t.onsuccess=function(t){var
r=t.target.result;r&&u.push({key:r.primaryKey,value:r.value});r&&u.length!
=n.config.maxIndexedDBCursorIterations?r["continue"]
():i(u)};t.onerror=r},t.prototype.removeFromCursor=function(t,i,r){var
u=0;t.onsuccess=function(t){var r=t.target.result;r&&(r["delete"](),u+=1);r&&u!
=n.config.maxIndexedDBCursorIterations?r["continue"]
():i(null)};t.onerror=r},t.prototype.safeDbOperation=function(n,u,f,e,o,s){var
h=this,l,c,a;i(this._databaseName,n+" requested"+(u?"
"+u:""));t._requestsInProgress+=1;l=function(r){i(h._databaseName,n+" completed "+
(u?u+" ":""));t._requestsInProgress-
=1;e(r);h._closePending&&t._requestsInProgress==0&&h.innerClose()};c=function(n)
{t._requestsInProgress-
=1;s(n);h._closePending&&t._requestsInProgress==0&&h.innerClose()};try{this._databa
se?
(a=this._database.transaction(this._storeName,f).objectStore(this._storeName),o(a,l
,r(n+".onError",c))):c(new Error(n+" Database not initialized"))}catch(v)
{c(v)}},t._requestsInProgress=0,t._allInstances=[],t}()})(t=n.ClientSideStorage||
(n.ClientSideStorage={}))}(WSB||(WSB={})),function(n){var t;(function(t){var
i=function(){function t(t,i,r,u,f){var
e=this;this._storageFactory=t;this.createResponse=i;this.dataPopulated=r;this.getDa
taSourceState=u;this._dataSource=f;this._pendingQueries=[];this._storageOpenInProgr
ess=!1;n.Host&&(n.Host.bindAppVisible(function(){return
e.initStorage()}),n.Host.bindDismissed(function(){return
e._pendingQueries=[]}),n.Host.bindAppHidden(function(){return
e.teardownStorage()}))}return t.prototype.onAfterWrite=function()
{if(this._writing=!1,this._pendingWrites.length>0){var
n=this._pendingWrites.shift();n()}else
this._tearDownPending&&this.teardownStorage()},t.prototype.teardownStorage=function
(){this._writing?this._tearDownPending=!0:(this._tearDownPending=!
1,this._storage&&this._storage.close())},t.prototype.initStorage=function(){var
n=this;!
this._storageOpenInProgress&&this.dataPopulated()&&(this._storageOpenInProgress=!
0,this._storageFactory(function(t){n._storage=t;n._storageOpenInProgress=!
1;n._pendingQueries.forEach(function(n){return
n()});n._pendingQueries=[]},function(t){n.onError(t,"open
storage");n._storageOpenInProgress=!1;n._pendingQueries.forEach(function(n){return
n()});n._pendingQueries=[]},function(){return
n._storage=null}))},t.getUnixTime=function(t){return t||
(t=n.getCurrentDate()),Math.round(t.getTime()/1e3)},t.prototype.onError=function(n,
t){t!="open
storage"&&SharedLogHelper.LogError(t,this._dataSource,n);this.teardownStorage()},t.
prototype.reloadStorage=function()
{this.teardownStorage();this.initStorage()},t.prototype.isReady=function(){return!!
this._storage},t.prototype.getTimeout=function(t,i){return!t||(i===null||i===void
0?void 0:i.isSearchHomeZI)?
n.config.latencyTimeoutForZeroInput:n.config.indexedDBTimeout},t.prototype.getKey=f
unction(n){return this._dataSource=="ANA"?"anaheimData":n.queryToFetch?
n.queryToFetch.toLocaleLowerCase():""},t.prototype.fetch=function(t,i,r,u,f){var
o=this,s=n.getCurrentTime(),e;
(n.config.enableFetchStartLogging&&n.InstrumentationHelper.instrumentFetchProviderB
egin(r,"SBDP:"+this._dataSource),n.isDataSourceEnabled(this._dataSource,t))&&(e=fun
ction(r,u){var h=n.getCurrentTime()-
s,e;n.InstrumentationHelper.instrumentPerfEvent(n.SequenceNumberManager.getSequence
Number(),"Fetch"+o._dataSource,h);e=u=="R";f()&&i(o._dataSource,o.createResponse(t,
r,e),o.getDataSourceState(u))},this.innerQueryStorage(1,this.getKey(t),function(n)
{return e(n,"R")},function(){return e(null,"E")},function(){return
e(null,"X")},function(){return
e(null,"T")},t))},t.prototype.withStorage=function(n){return this._storage?
(n(this._storage),!0):!1},t.prototype.getMaxKey=function(n){return
n.slice(0,n.length-1)+String.fromCharCode(n.charCodeAt(n.length-
1)+1)},t.prototype.getStorage=function(n,t,i,r)
{this.innerQueryStorage(null,null,function(t){return
n(t)},t,i,r)},t.prototype.queryStorage=function(n,t,i,r,u)
{this.innerQueryStorage(0,n,t,i,r,u)},t.prototype.innerQueryStorage=function(t,i,r,
u,f,e,o){var c=this,s=null,h=!1,l=!0,v=function(){if(l)if(l=!1,c._storage){var
n=function(n){s&&sb_ct(s);c.onError(n,"query");h||(h=!0,u())};t==0?
c._storage.getValue(i,function(n){s&&sb_ct(s);h||(h=!0,r(n))},n):i?
c._storage.getRange(i,c.getMaxKey(i),function(n){s&&sb_ct(s);h||(h=!
0,r(n))},n):c._storage.getAll(function(n){s&&sb_ct(s);h||(h=!0,r(n))},n)}else
s&&sb_ct(s),h||(h=!0,u())},a;if(this._storage)v();else
if(this.initStorage(),this._storageOpenInProgress)this._pendingQueries.push(v);else
{f();return}a=this.getTimeout(i,o);a&&(s=n.safeSetTimeout(function(){s=null;l=!
1;h||(h=!0,e())},a,"innerQueryStorage"))},t}();t.StorageBasedDataProvider=i})
(t=n.ClientSideStorage||(n.ClientSideStorage={}))}(WSB||(WSB={})),function(n){var
t=function(){function t(n,t)
{this._navigationHelper=n;this._temporaryMessageHandler=t}return
t.prototype.parse=function(t,i,r,u,f,e,o){var
c=this,l=[],a=[],v=[],y=[],p=[],w=[],b=[],k=[],d,s,h,g;if(u&&u.Suggestions)for(d=fu
nction(r){var u=r.suggestionData,f,e;u.handoffType==2?n.isApp(u.type)?
(f=u,a.push(f.id),p.push(r)):n.isSetting(u.type)?
(f=u,v.push(f.id),w.push(r)):n.isFileOrFolder(u.type)&&(f=u,y.push(f.id),b.push(r))
:n.isBingEnabled()&&(e=n.safeExecute(function(){return
c.parseMRUWebSuggestion(t,r,i)},"parseMRUWebSuggestion"),e&&(u.handoffType==0?
k.push(e):l.push(e)))},s=0,h=u.Suggestions;s<h.length;s+
+)g=h[s],d(g);n.lookupById(t,"MPP",a,p,function(n)
{return[n.suggestionData.id]},"MST",v,w,function(n){return
n.suggestionData.id},f,i,e,o,function(n,r,u,f){return
c.parseIdLookupResponse(t,i,n,r,u,f)},"MFF",y,b,function(n){return
n.suggestionData.id});n.isDataSourceEnabled("MRS",t)&&e("MRS",k,u);e("MRU",l,u)},t.
prototype.parseIdLookupResponse=function(t,i,r,u,f,e){var
s=this,o=r.suggestionData,h,c;((n.MockUrlParameters===null||
n.MockUrlParameters===void 0?void
0:n.MockUrlParameters.mockMRUDataFile)&&f.length==0&&(h={displayName:o.id,id:o.id,k
ind:"document",getProperty:null,propertyHits:
[],rankScore:1e3},f.push(n.createLocalResponseSuggestionWithDeviceItemImage(h,o.typ
e,u))),f.length==1)&&(c=function(n){return
s.setupRemoveFromHistoryContextMenu(n,r,t),n.lastLaunchTime=r.rankingData.lastLaunc
hTime,o.appContextData&&(n.appContext=o.appContextData.appContext,n.query=o.appCont
extData.query,n.text=t.queryToFetch?
HitHighlightingParser.addMarkers(o.appContextData.textWithoutHH,t.queryToFetch):o.a
ppContextData.textWithoutHH),s.setRankingSignals(n,o),!0},n.safeExecute(function()
{return
n.parseLocalSuggestion(t,f[0],u,i,s._temporaryMessageHandler,o.type,e,c)},"parseLoc
alSuggestion "+u))},t.prototype.setRankingSignals=function(n,t)
{n.hc=t.hc;n.highConfidenceMetaSuggestionScore=t.highConfidenceMetaSuggestionScore;
n.prefetchConfidenceScore=t.prefetchConfidenceScore;n.fromHistory=!0;n.hasMruData=!
0},t.prototype.parseMRUWebSuggestion=function(t,i,r){var
f=i.suggestionData,u=n.createSuggestion(t,t.queryToFetch?
HitHighlightingParser.addMarkers(f.textWithoutHH,t.queryToFetch):f.textWithoutHH,nu
ll,f.icon,f.type,f.query,n.InstrumentedItem.createInstrumentedItem(r,f.type),f.hand
offType,r,!
1),e,h,o,c,s;u.lastLaunchTime=i.rankingData.lastLaunchTime;this.setRankingSignals(u
,f);switch(u.handoffType){case 5:case 4:if(!n.isCortanaEnabledCache||
u.type=="CSK"||(e=f,u.primaryMetadata=e.annotation||
e.secondaryText,u.reactKey=u.type+u.primaryMetadata,!
n.setCat1SuggestionProperties(u,t,r,e.actionUri,e.taskFrame,e.confidence,e.source))
)return null;break;case 10:return null;case 0:if(!
n.isDataSourceEnabled("MRS",t))return
null;h=f;t.isSearchHomeZI&&(u.text=f.query,u.icon={type:2,content:"&#xE721"});n.set
WebSearchSuggestionProperties(u,t,r,h.url,this._navigationHelper);u.reactKey=this.g
enerateReactKey(t,u);break;case
1:o=f;c=i.rankingData;t.queryToFetch.length>3&&(u.autoOpenPreviewPaneWhenOnTopHit=!
!c.previewPaneLaunchCount);s=o.title||o.secondaryText;t.isSearchHomeZI&&s?
(u.additionalInfoText=o.url,u.text=HitHighlightingParser.removeMarkers(s)):u.primar
yMetadata=s;u.reactKey=o.type+o.url;n.setUrlSuggestionProperties(u,t,r,o.url);n.con
fig.directNavPreviewPane&&u.type=="MD"&&u.url&&(u.getIcon=n.getFaviconUrlForRawUrl(
u.url,64,64,1.5),t.isSearchHomeZI||(u.previewPaneType=2));break;default:return
SharedLogHelper.LogError("parseMruWebSuggestion",null,new Error("Unexpected handoff
type: "+f.handoffType)),null}return n.isValidSuggestion(u,"parseMruWebSuggestion")?
(this.setupRemoveFromHistoryContextMenu(u,i,t),u):null},t.prototype.setupRemoveFrom
HistoryContextMenu=function(t,i,r){var u=this;n.RuntimeConfig.QfMode!
=5&&n.RuntimeConfig.QfMode!=9&&i.remove&&n.setExtraVerbs(t,function(f){if(f||!
i.remove)return[];if(!t.removeIcon&&t.duplicates&&t.duplicates.some(function(n)
{return!n.fromHistory}))return[];var
e=n.config.mruSearchHome&&r.scope==n.Scope.All,o={verb:e?"RemoveFromDeviceHistoryAl
l":"RemoveFromDeviceHistory",displayName:n.Host.getLocString("RemoveFromDeviceHisto
ry"),executeSync:function(){i.remove(function(){n.Host.refreshCurrentPane();e||
u._temporaryMessageHandler.showTemporaryMessage(n.Host.getLocString("RemovedFromDev
iceHistory",HitHighlightingParser.removeMarkers(t.text)))});delete i.remove},icon:
{content:"&#xE711",type:2}};return[o]},!
0)},t.prototype.generateReactKey=function(n,t){return(n===null||n===void 0?void
0:n.isSearchHomeZI)?t.type+t.text:t.type+n.fullPartialQuery},t}();n.MRUParser=t}
(WSB||(WSB={}));__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)}}(),function(n){var t;(function(t){var
r="LastUpdated",i="MRUNoItemsAvailable",u=function(t){function u(i,u,f,e,o,s,h,c,l)
{var a=this;i&&i.bindItemLaunch(function(n,t,i){return a.onLaunch(n,t,i)});var
v,y=function(t,i,f){return u(s,function(i){t(i);var r=n.getTimeDiffInDays(v);
(r===null||r>=1)&&(v=n.getCurrentDate(),a.prune());a.getStorage(function(n){return
a.instrumentMRUSize(n)},function(){return a.onAfterWrite()},function(){return
a.onAfterWrite()},function(){return a.onAfterWrite()})},i,f,r)},p=function(t,i,r)
{return n.MockUrlParameters&&typeof
n.MockedMRUData=="object"&&(i=n.MockedMRUData),n.safeExecute(function(){return
a.createMruResponse(t,i,r)},"createMruResponse")},w=function(){return!
0},b=function(n){return n=="R"?undefined:n};return
n.Host.bindClearMRURequested(function(t)
{a.teardownStorage();n.ClientSideStorage.deleteDatabase(s,function(){return t(!
0)},function(){return t(!1)})}),a=t.call(this,y,p,w,b,"MRU")||
this,a.candidatesEnabled=h,a.loggingEnabled=c,a.getSuggestionKey=f,a.getGroupType=e
,a.isMRUHistoryGroupType=o,a.lightweightStorage=l,a._pendingWrites=[],sj_evt.bind("
clearMRUButtonClicked",function()
{n.ClientSideStorage.deleteDatabase(n.MRUDatabaseName);a.reloadStorage()}),a}return
__extends(u,t),u.prototype.getName=function()
{return"MRUDataProvider"},u.prototype.createMruResponse=function(t,i,r){var
c=this,f,s,u,o,h;if(i=i||[],f=this.getKey(t),this._lastKey=r?f:null,s=r?
i.find(function(n){return n.key==f}):null,this._valueForLastKey=s?
s.value:null,u={},n.config.mruSignalsEnabled&&this._valueForLastKey&&(u.SuggestionE
ngagementData=this._valueForLastKey.SuggestionEngagementData),u.LookupCompletions=i
.map(function(n)
{return{key:n.key,value:n.value.SuggestionEngagementData}}),this.candidatesEnabled(
)){var e=[],v=this.getOldestDateToKeep(),y=function(n,i){var
f,r,u,o;if(i.Suggestions)for(f=function(r){if(!
t.isSearchHomeZI&&r.handoffType==0)return"continue";var
u=l.getRankingData(i,r);u&&u.lastLaunchTime&&u.lastLaunchTime>=v&&e.push({rankingDa
ta:n==l._lastKey?
{prefixLaunchCount:u.prefixLaunchCount,lastLaunchTime:u.lastLaunchTime,previewPaneL
aunchCount:u.previewPaneLaunchCount,lastPreviewPaneLaunchTime:u.lastPreviewPaneLaun
chTime}:u,suggestionData:r,remove:function(t){return
c.remove(n,r,t)}})},r=0,u=i.Suggestions;r<u.length;r+
+)o=u[r],f(o)},l=this;for(o=0,h=i;o<h.length;o++){var
a=h[o],p=a.key,w=a.value;y(p,w)}e.length>0&&(u.Suggestions=[],e.sort(function(n,t)
{return t.rankingData.lastLaunchTime-
n.rankingData.lastLaunchTime}),e.forEach(function(n){return
c.addToResponseIfNotPresent(u.Suggestions,n)}),f?f.length<=n.config.mruLengthA?
u.Suggestions.splice(n.config.maxMruA):f.length<=n.config.mruLengthB&&u.Suggestions
.splice(n.config.maxMruB):u.Suggestions.splice(n.config.maxMruZeroInput))}return
u},u.removeRankerSignals=function(n,t){return
n=="highConfidenceMetaSuggestionScore"||n=="prefetchConfidenceScore"?
undefined:t},u.prototype.addToResponseIfNotPresent=function(n,t){var
f=JSON.stringify(t.suggestionData,u.removeRankerSignals),i=n.find(function(n)
{return JSON.stringify(n.suggestionData,u.removeRankerSignals)==f}),r;i?
(r=i.remove,i.remove=function(n){return r(function(){return
t.remove(n)})},i.rankingData.lastLaunchTime=Math.max(i.rankingData.lastLaunchTime,t
.rankingData.lastLaunchTime),i.rankingData.prefixLaunchCount+=t.rankingData.prefixL
aunchCount,t.rankingData.previewPaneLaunchCount&&(i.rankingData.previewPaneLaunchCo
unt=(i.rankingData.previewPaneLaunchCount||
0)+t.rankingData.previewPaneLaunchCount),t.rankingData.lastPreviewPaneLaunchTime&&(
i.rankingData.lastPreviewPaneLaunchTime=i.rankingData.lastPreviewPaneLaunchTime?
Math.max(i.rankingData.lastPreviewPaneLaunchTime,t.rankingData.lastPreviewPaneLaunc
hTime):t.rankingData.lastPreviewPaneLaunchTime)):n.push(t)},u.prototype.addToDataIf
NotPresent=function(n,t){var
i=JSON.stringify(t,u.removeRankerSignals),r=n.find(function(n){return
JSON.stringify(n,u.removeRankerSignals)==i});r||
n.push(t)},u.prototype.onLaunch=function(n,t,i){var
r=this,u;if(this.loggingEnabled()){if(this._writing)
{this._pendingWrites.push(function(){return
r.onLaunch(n,t,i)});return}this._writing=!0;u=this.getKey(t);this._lastKey==u?
this.updateAndSaveLaunchData(u,this._valueForLastKey,n,i):this.queryStorage(u,funct
ion(t){return r.updateAndSaveLaunchData(u,t,n,i)},function(){return
r.onAfterWrite()},function(){return r.onAfterWrite()},function(){return
r.onAfterWrite()})}},u.prototype.remove=function(n,t,i){var
r=this;if(this._writing){this._pendingWrites.push(function(){return
r.remove(n,t,i)});return}this._writing=!0;this._lastKey==n?
this.removeAndSaveLaunchData(n,this._valueForLastKey,t,i):this.queryStorage(n,funct
ion(u){return r.removeAndSaveLaunchData(n,u,t,i)},function(){return
r.onAfterWrite()},function(){return r.onAfterWrite()},function(){return
r.onAfterWrite()})},u.prototype.createOrUpdateDbEntry=function(t,r,u,f){var
e,o;return r?
(r.LastUpdated=n.ClientSideStorage.StorageBasedDataProvider.getUnixTime(),r.Suggest
ionEngagementData=r.SuggestionEngagementData||
{}):r={LastUpdated:n.ClientSideStorage.StorageBasedDataProvider.getUnixTime(),Sugge
stionEngagementData:
{}},e=this.getSuggestionKey(u),r.SuggestionEngagementData[e]=this.updateMRUEntryCli
cksAndTime(r.SuggestionEngagementData[e],r.LastUpdated,f),this.getGroupType&&(r.Sug
gestionEngagementData[e].groupType=this.getGroupType(u)),this.lightweightStorage.ge
tItem(i)=="1"&&this.isMRUHistoryGroupType&&this.isMRUHistoryGroupType(u)&&this.ligh
tweightStorage.removeItem(i),this.candidatesEnabled()&&(o=u.getMruData(),o&&t&&(r.S
uggestions||
(r.Suggestions=[]),this.addToDataIfNotPresent(r.Suggestions,o))),r},u.prototype.upd
ateMRUEntryClicksAndTime=function(n,t,i){return n?
(n.prefixLaunchCount+=1,n.lastLaunchTime=t):n={prefixLaunchCount:1,lastLaunchTime:t
},i&&(n.previewPaneLaunchCount=(n.previewPaneLaunchCount||
0)+1,n.lastPreviewPaneLaunchTime=t),n},u.prototype.getOldestDateToKeep=function()
{var t=n.getCurrentDate();return t.setDate(t.getDate()-
n.config.mruMaxAgeInDays),n.ClientSideStorage.StorageBasedDataProvider.getUnixTime(
t)},u.prototype.updateAndSaveLaunchData=function(t,i,r,u){var
f=this;if(i=n.safeExecute(function(){return
f.createOrUpdateDbEntry(t,i,r,u)},"createOrUpdateDbEntry"),!i)
{this.onAfterWrite();return}n.safeExecute(function(){return
f.removeOldLaunches(i,f.getOldestDateToKeep())},"removeOldLaunches");this._lastKey=
t;this._valueForLastKey=i;this.withStorage(function(n){return n.put(t,i,function()
{return f.onAfterWrite()},function(n)
{f.onError(n,"updateAndSaveLaunchData");f.onAfterWrite()})})||
this.onAfterWrite()},u.prototype.removeAndSaveLaunchData=function(n,t,i,r){var
u=this,e,f;if(!t){SharedLogHelper.LogError("removeAndSaveLaunchData",null,new
Error("MRU entry not
present"));this.onAfterWrite();return}if(e=JSON.stringify(i),f=(t.Suggestions||
[]).findIndex(function(n){return JSON.stringify(n)==e}),f==-1)
{SharedLogHelper.LogError("removeAndSaveLaunchData",null,new Error("Suggestion not
present in
MRU"));this.onAfterWrite();return}t.Suggestions.splice(f,1);this._lastKey=n;this._v
alueForLastKey=t;this.withStorage(function(i){return i.put(n,t,function()
{r&&r();u.onAfterWrite()},function(n)
{u.onError(n,"removeAndSaveLaunchData");u.onAfterWrite()})})||
this.onAfterWrite()},u.prototype.getRankingData=function(n,t){return
n.SuggestionEngagementData?
n.SuggestionEngagementData[t.suggestionKey]:undefined},u.prototype.removeOldLaunche
s=function(n,t){var i,r,u;if(n.Suggestions)for(i=n.Suggestions.length-1;i>=0;--
i)r=this.getRankingData(n,n.Suggestions[i]),u=r?r.lastLaunchTime:null,(!u||
u<t)&&n.Suggestions.splice(i,1);this.removeOldEngagementData(n.SuggestionEngagement
Data,t)},u.prototype.removeOldEngagementData=function(n,t){var i,r,u;if(n)for(i in
n)r=n[i],r&&(u=r.lastLaunchTime,(!u||u<t)&&delete
n[i])},u.prototype.prune=function(n){var t=this;if(this._writing)
{this._pendingWrites.push(function(){return t.prune(n)});return}this._writing=!
0;this.withStorage(function(i){return
i.removeRangeOnSecondaryKey(0,t.getOldestDateToKeep(),function()
{n&&n();t.onAfterWrite()},function(n){t.onError(n,"MRUDataProvider
prune");t.onAfterWrite()})})||
this.onAfterWrite()},u.prototype.instrumentMRUSize=function(t){for(var
r,e,u=0,i=0,f=t;i<f.length;i+
+)r=f[i].value,r.Suggestions&&(u+=r.Suggestions.length);e={totalnumberOfEntries:t.l
ength.toString(),totalNumberOfSuggestions:u.toString()};n.InstrumentationHelper.log
ClientInstEvent("ClientInst","MRUSize",null,e)},u}
(n.ClientSideStorage.StorageBasedDataProvider);t.MRUDataProvider=u})(t=n.MRU||
(n.MRU={}))}(WSB||(WSB={}));__spreadArrays=this&&this.__spreadArrays||function()
{for(var i=0,n=0,r=arguments.length;n<r;n++)i+=arguments[n].length;for(var
u=Array(i),f=0,n=0;n<r;n++)for(var e=arguments[n],t=0,o=e.length;t<o;t++,f+
+)u[f]=e[t];return u},function(n){var t;(function(t){function o(t,i){var u,f;if(!
i)throw new Error("Undefined query IQuery for data source: "+t);if(r||rt(),u=r[t],!
u)throw new Error("Unsupported data source:
"+t);if(n.config.indexerQuerySimplified&&t=="IFF"&&(i===null||i===void 0?void
0:i.queryToFetch.length)<=8)return u[4];if(f=u.filter(function(n){return!
n.enabled||n.enabled(i)}),f.length==0)throw new Error("No enabled strategies for
data source: "+t);else if(f.length>1)throw new Error("Multiple strategies for data
source: "+t);else return f[0]}function cr(n){return r||rt(),!!r[n]}function
lr(n,t,i){if(!r||!r[i]||t.taskFrame)return!1;var u=o(i,t);return u.sfgaoFilter?!
u.sfgaoFilter(n.getProperty("System.SFGAOFlags")):!1}function i(n,t){return
n=wi.concat(n),t&&(n=n.concat(bi)),n}function rt()
{v=SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.getUserSID();var
it=0,ii=f(n.getKnownFolderPathLC(n.FOLDERID_Profile)),rt=ui(it,v,!
1),ut=rt[0],y=rt[1],ft=ui(it,v,!0),o=ft[0],t=ft[1];g=ut;kt=y;var
ot='"System.Kind" != ANY ARRAY['+tt.concat("link").map(function(n)
{return"'"+n+"'"}).join(", ")+"] AND "+ut,ri="\"System.Kind\" = SOME
ARRAY['program'] AND "+o,s='"System.Kind" != ANY ARRAY['+gt.map(function(n)
{return"'"+n+"'"}).join(", ")+"] AND "+o,b='"System.Kind" != ANY
ARRAY['+dt.concat(tt).concat("folder").map(function(n){return"'"+n+"'"}).join(", ")
+"] AND "+o,fi="\"System.Kind\" = SOME ARRAY['folder'] AND "+o,st="\"System.Kind\"
= SOME ARRAY['Music'] AND "+o,ni="\"System.Kind\" = SOME ARRAY['Picture'] AND
"+o,ti='"System.Kind" = SOME ARRAY['+nt.map(function(n){return"'"+n+"'"}).join(",
")+"] AND "+o,ei="\"System.Kind\" != ANY ARRAY['game', 'calendar', 'web history',
'feed', 'contact', 'task', 'journal', 'note', 'instantmessage'] AND "+o,oi="SCOPE =
'file:"+ii+"' AND \"System.Kind\" = SOME ARRAY['folder'] AND
"+o,si=br(v);r={};r.IFF=[{selectFields:i(e,!1),filterFieldsSets:
[lt],mostRelevantProps:c,kindAndScopeClauses:ot,sortClause:n.config.enableIndexerQu
eryExtensionSort?p(h):u,searchOptions:3,sfgaoFilter:y,enabled:function(t){return!!
(t===null||t===void 0?void 0:t.queryToFetch)&&!n.supportsShortcuts("IFF",t)}},
{selectFields:i(e,!1),filterFieldsSets:
[],mostRelevantProps:c,kindAndScopeClauses:ot,sortClause:n.config.enableIndexerQuer
yExtensionSort?p(h):u,searchOptions:0,sfgaoFilter:y,enabled:function(t){return!
(t===null||t===void 0?void 0:t.queryToFetch)&&!n.supportsShortcuts("IFF",t)}},
{selectFields:i(at,!0),filterFieldsSets:
[ki],mostRelevantProps:c,kindAndScopeClauses:s,sortClause:n.config.enableIndexerQue
ryExtensionSort?p(h):u,searchOptions:3,sfgaoFilter:t,enabled:function(t){return!!
(t===null||t===void 0?void 0:t.queryToFetch)&&n.supportsShortcuts("IFF",t)}},
{selectFields:i(at,!0),filterFieldsSets:
[],mostRelevantProps:c,kindAndScopeClauses:s,sortClause:n.config.enableIndexerQuery
ExtensionSort?p(h):u,searchOptions:0,sfgaoFilter:t,enabled:function(t){return t&&!
t.queryToFetch&&n.supportsShortcuts("IFF",t)}},{selectFields:i(e,!
0),filterFieldsSets:
[di],mostRelevantProps:c.concat(["System.Title"]),kindAndScopeClauses:s,sortClause:
n.config.enableIndexerQueryExtensionSort?
p(h):u,searchOptions:0,sfgaoFilter:t,enabled:function(t){return
n.config.indexerQuerySimplified&&(t===null||t===void 0?void
0:t.queryToFetch.length)<=8&&!!(t===null||t===void 0?void
0:t.queryToFetch)}}];r.MDOC=[{selectFields:i(l,!0),filterFieldsSets:
[vt.concat(ir)],mostRelevantProps:w,kindAndScopeClauses:b,sortClause:u,searchOption
s:3,sfgaoFilter:t,enabled:function(t){return(t===null||t===void 0?void
0:t.queryToFetch)&&n.config.minLengthForContentMatch&&(t===null||t===void 0?void
0:t.queryToFetch.length)>=n.config.minLengthForContentMatch}},{selectFields:i(l,!
0),filterFieldsSets:
[vt],mostRelevantProps:w,kindAndScopeClauses:b,sortClause:u,searchOptions:3,sfgaoFi
lter:t,enabled:function(t){return(t===null||t===void 0?void 0:t.queryToFetch)&&(!
n.config.minLengthForContentMatch||(t===null||t===void 0?void
0:t.queryToFetch.length)<n.config.minLengthForContentMatch)}},{selectFields:i(l,!
0),filterFieldsSets:
[],mostRelevantProps:w,kindAndScopeClauses:b,sortClause:u,searchOptions:0,sfgaoFilt
er:t,enabled:function(n){return n&&!
n.queryToFetch}},];r.MPVD=[{selectFields:i(l.concat(a).concat(a),!
0),filterFieldsSets:
[k],mostRelevantProps:w,kindAndScopeClauses:ei,sortClause:u,searchOptions:3,sfgaoFi
lter:t,enabled:function(n){return!!(n===null||n===void 0?void
0:n.queryToFetch)}}];r.MFOL=[{selectFields:i(rr,!0),filterFieldsSets:
[fr],mostRelevantProps:ur,kindAndScopeClauses:fi,sortClause:u,searchOptions:3,sfgao
Filter:t}];r.MPHO=[{selectFields:i(d,!0),filterFieldsSets:
[er],mostRelevantProps:yt,kindAndScopeClauses:ni,sortClause:u,searchOptions:3,sfgao
Filter:t,enabled:function(n){return!!(n===null||n===void 0?void
0:n.queryToFetch)}},{selectFields:i(d,!0),filterFieldsSets:
[],mostRelevantProps:yt,kindAndScopeClauses:ni,sortClause:u,searchOptions:0,sfgaoFi
lter:t,enabled:function(n){return n&&!
n.queryToFetch}},];r.MVID=[{selectFields:i(a,!0),filterFieldsSets:
[or],mostRelevantProps:pt,kindAndScopeClauses:ti,sortClause:u,searchOptions:3,sfgao
Filter:t,enabled:function(n){return!!(n===null||n===void 0?void
0:n.queryToFetch)}},{selectFields:i(a,!0),filterFieldsSets:
[],mostRelevantProps:pt,kindAndScopeClauses:ti,sortClause:u,searchOptions:0,sfgaoFi
lter:t,enabled:function(n){return n&&!
n.queryToFetch}},];r.MMUS=[{selectFields:i(wt,!0),filterFieldsSets:
[sr],mostRelevantProps:bt,kindAndScopeClauses:st,sortClause:u,searchOptions:3,sfgao
Filter:t,enabled:function(n){return!!(n===null||n===void 0?void
0:n.queryToFetch)}},{selectFields:i(wt,!0),filterFieldsSets:
[],mostRelevantProps:bt,kindAndScopeClauses:st,sortClause:u,searchOptions:0,sfgaoFi
lter:t,enabled:function(n){return n&&!
n.queryToFetch}},];r.IBA=[{selectFields:i(gi,!0),filterFieldsSets:
[tr],mostRelevantProps:nr,kindAndScopeClauses:ri,sortClause:u,searchOptions:3,sfgao
Filter:t}];r.MFF=[{selectFields:i(e,!1),filterFieldsSets:
[hr],mostRelevantProps:null,kindAndScopeClauses:null,sortClause:null,searchOptions:
0,sfgaoFilter:null}];r.LDIC=[{selectFields:i(e,!0),filterFieldsSets:
[],mostRelevantProps:null,kindAndScopeClauses:oi,sortClause:u,searchOptions:0,sfgao
Filter:t}];r[et]=[{selectFields:i(e,!0),filterFieldsSets:
[],mostRelevantProps:null,kindAndScopeClauses:s,sortClause:u,searchOptions:0,sfgaoF
ilter:t}];r.ANA=[{selectFields:i(ct,!1),filterFieldsSets:[],mostRelevantProps:
[],kindAndScopeClauses:si,sortClause:ht,searchOptions:0,sfgaoFilter:null,enabled:fu
nction(){return n.isDataSourceEnabled("ANA",null)&&!
n.AnaheimDataProvider.isInitialized()}},{selectFields:i(ct,!1),filterFieldsSets:
[],mostRelevantProps:
[],kindAndScopeClauses:"",sortClause:ht,searchOptions:0,sfgaoFilter:null,enabled:fu
nction(){return
n.isDataSourceEnabled("ANA",null)&&n.AnaheimDataProvider.isInitialized()}},]}functi
on ar(n,t,i,r,u){var f;return uu((f=n===null||n===void 0?void 0:n.queryToFetch)!
==null&&f!==void 0?f:"").then(function(f){return dr(n,f,t,i,r,u)})}function
vr(n,t,i,r){var u=o(t,n),f="SELECT TOP "+i.length+" "+b(u.selectFields)+" FROM
SystemIndex WHERE "+tu(u,i,r),e=ut(r);return e!=""&&(f+=" AND "+e),f}function
yr(t,i){var r=o(t,null),e=n.config.maxDeviceItemCacheSize,u="SELECT TOP "+e+"
"+b(r.selectFields)+" FROM SystemIndex WHERE ",f=ut(i);return f!=""&&(u+=f+" AND
"),u+r.kindAndScopeClauses}function pr(){var n=o(et,null),t="WorkId,
"+b(n.selectFields),i=n.kindAndScopeClauses;return"SELECT "+t+" FROM SystemIndex
WHERE "+i+" ORDER BY "+n.sortClause}function wr(n,t){r&&r[n]&&r[n][t]&&(r[n]
[t].kindAndScopeClauses=kr(v))}function br(n){return"SCOPE =
'winrt://{"+n+"}/LS/Desktop/Microsoft Edge/Builds/' OR SCOPE =
'winrt://{"+n+"}/LS/Desktop/Microsoft Edge/Canary/Profiles/' OR SCOPE =
'winrt://{"+n+"}/LS/Desktop/Microsoft Edge/Dev/Profiles/' OR SCOPE =
'winrt://{"+n+"}/LS/Desktop/Microsoft Edge/Beta/Profiles/' OR SCOPE =
'winrt://{"+n+"}/LS/Desktop/Microsoft Edge/Stable/Profiles/' OR SCOPE =
'winrt://{"+n+"}/LS/Desktop/Microsoft Edge/undefined/Profiles/'"}function kr(t){var
r=n.AnaheimDataProvider===null||n.AnaheimDataProvider===void 0?void
0:n.AnaheimDataProvider.getAvailableChannels(),f=n.AnaheimDataProvider===null||
n.AnaheimDataProvider===void 0?void
0:n.AnaheimDataProvider.getSelectedProfile(),u="",i;if(r&&f)for(i=0;i<r.length;i++)
{if(u+="SCOPE = 'winrt://{"+t+"}/LS/Desktop/Microsoft
Edge/"+r[i].displayName+"/"+f.displayName+"/'",i==r.length-1)break;u+=" OR "}return
u}function dr(n,t,i,r,u,f){var
h,c,a=SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.getLCIDStringFo
rText((h=n===null||n===void 0?void 0:n.queryToFetch)!==null&&h!==void 0?
h:""),e=n.taskFrame?cu(u,n.taskFrame.parsed,a):o(u,n),s="SELECT TOP "+r+"
"+b(e.selectFields)+" FROM SystemIndex",v=iu(e,(c=n===null||n===void 0?void
0:n.queryToFetch)!==null&&c!==void 0?c:"",t,i,e.searchOptions,a,f),l;return v!
=""&&(s=s+" WHERE "+v,l=ut(f),l!=""&&(s+=" AND "+l)),s+(" ORDER BY
"+e.sortClause)}function gr(n){var f,i,r,t,u;if(n.kind=="link"||
n.kind=="program")for(f=n.getProperty("System.Kind"),i=0,r=f;i<r.length;i++)
{if(t=r[i],t=="program")return nu(n,t);if(t!="link")return
u={displayName:n.displayName,id:n.id,kind:t,getProperty:function(t){return
n.getProperty(t)},propertyHits:n.propertyHits,rankScore:n.rankScore,getImageAsync:f
unction(t){return
n.getImageAsync(t)},imageType:n.imageType,canHaveContextMenu:n.canHaveContextMenu,g
etVerbsAsync:function(){return
n.getVerbsAsync()},extension:n.extension,itemTypeDisplayName:n.itemTypeDisplayName,
createdDate:n.createdDate,lastModifiedDate:n.lastModifiedDate},u.originalDeviceItem
=n,u}return n}function nu(t,i){var r=t.displayName,u,f;return
r.toLocaleLowerCase().endsWith(".lnk")&&(r=r.substr(0,r.length-
4)),u=n.indexerFilePathToRegularPath(t.id),f={displayName:r,id:u,kind:i,getProperty
:function(n){return
t.getProperty(n)},propertyHits:t.propertyHits,rankScore:t.rankScore,getImageAsync:f
unction(n){return
t.getImageAsync(n)},imageType:t.imageType,canHaveContextMenu:t.canHaveContextMenu,g
etVerbsAsync:function(){return
t.getVerbsAsync()},extension:t.extension,itemTypeDisplayName:t.itemTypeDisplayName,
createdDate:t.createdDate,lastModifiedDate:t.lastModifiedDate,filePath:u,lastAccess
ed:t.getProperty("System.DateAccessed"),version:null,isImmersive:!
1,logoBackgroundColor:null,launchArguments:null,totalLaunches:null,isTrustedApp:!
1,packageFamilyName:null,jumpList:null,getJumpListAsync:null,voiceCommandExamples:n
ull,rawIndexResponse:null},f.originalDeviceItem=t,f}function b(n){return
n.map(function(n){return
n=="System.ParsingPath"?"path":'"'+n+'"'}).join(",")}function ut(t){return
n.config.useWhereId&&t?"ReuseWhere("+t+") ":""}function tu(n,t){return"("+fu(n,t)
+")"}function iu(n,t,i,r,u,e){var o="",s,h;return
n.mostRelevantProps.length>0&&(o+="WITH ("+n.mostRelevantProps.join(", ")+") AS
#MRProps "),s=eu(n,t,i,u,e),s&&(o+="("+s+")
AND "),h=r?f(r):r,h&&(o+="(Scope = '"+h+"') AND
"),o+n.kindAndScopeClauses}function ru(n,t){return
SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.tokenize(n,t)}functio
n uu(n){return
SearchAppWrapper.CortanaApp.queryFormulationView.getLinguisticDataAsync(n)}function
ni(t,i){var r="",u=t.filterFieldsSets.length>1;return
t.filterFieldsSets.forEach(function(t){var s,f,h,l,e,o,c,a;for(u&&(r?r+=") AND
(":r="("),s=!0,f=0,h=t;f<h.length;f++){for(l=h[f],e=!1,o=0,c=i;o<c.length;o+
+)a=c[o],s?(r+="(",s=!1):r+=e?" OR ":" OR (",r+=n.formatString(l,[a]),e=!
0;e&&(r+=")")}}),u&&(r+=")"),r}function fu(n,t){var i=t.map(function(n){return
ft(n)});return ni(n,i)}function eu(n,t,i,r,u){var o=[t],e,f;return
i.alternatives&&i.alternatives.forEach(function(n){return
o.push(n)}),e=o.map(function(n){return ft(n)}),f=ni(n,e),
(r&2)==2&&(f=ou(r,i,e,f,u)),f}function ou(t,i,r,u,f){for(var
k,c,l,p,e,s,v,w,d,g=su(t),h=!1,y=0,b=g;y<b.length;y++){for(k=b[y],c=!
1,l=0,p=r;l<p.length;l++){var
nt=p[l],a=[],o=ru(nt,i.language);if(h&&n.config.indexerQueryMWLimit){if((t&4)==0||
o.length<=n.config.indexerQueryMWLimit)for(e=0;e<Math.min(o.length,n.config.indexer
QueryMWLimit);++e)a.push(o[e])}else if((t&4)==0||
o.length<=st)for(e=0;e<Math.min(o.length,st);++e)a.push(o[e]);if(a.length>1)
{for(s="",v=0,w=a;v<w.length;v++)d=w[v],s&&(s+=" AND "),s+='"'+d+(h?'*"':'"');u?
u+=c?" OR ":" OR (":u="(";u+=n.formatString(k,[s,f]);c=!0}}c&&(u+=")");h=!h}return
u}function su(n){var t=[];return t.push("CONTAINS(#MRProps, '{0}', {1}) RANK BY
COERCION(ABSOLUTE, 600)"),(n&1)==1&&t.push("CONTAINS(#MRProps, '{0}', {1}) RANK BY
COERCION(ABSOLUTE, 550)"),t}function ti(n,t){return
n.length>0&&(n=n.replace(/'/g,"''"),n=n.replace(/"/g,"
"),t>=2&&(n=n.replace(/%/g,"[%]"),n=n.replace(/_/g,"[_]"),n=n.replace(/\[/
g,"[[]"),t==3?(n=n.replace(/\*/g,"%"),n=n.replace(/\?/g,"_")):(n=n.replace(/\*/g,"
"),n=n.replace(/\?/g," ")))),n}function f(n){return ti(n,1)}function ft(n){return
ti(n,2)}function hu(n){var t=y[n];if(t)return t;throw new Error("select fields for
NL Data source was not found: "+n);}function s(n,t,i){for(var
u=[],r=3;r<arguments.length;r++)u[r-3]=arguments[r];typeof i=="string"?
(i=ft(i),t.push(u.map(function(t){return"CONTAINS("+t+",'\""+i+"*\"',"+n+") RANK BY
COERCION(ABSOLUTE, 1000)"}))):i&&i.Value&&s.apply(void
0,__spreadArrays([n,t,i.Value],u))}function cu(n,t,i){var f=[],e='"System.Kind" !=
ANY ARRAY['+it+"]",o,r;if(t.FileType&&t.FileType.Value)
{o=t.FileType.Value;switch(o){case"Document":break;case"Picture":e="\"System.Kind\"
= SOME ARRAY['Picture']";break;case"Video":e='"System.Kind" = SOME
ARRAY['+nt.map(function(n){return"'"+n+"'"}).join(", ")
+"]";break;case"Powerpoint":case"Word":case"Excel":e="CONTAINS(System.ItemType,'\""
+ii[o]+"*\"',"+i+') RANK BY COERCION(ABSOLUTE, 1000) AND "System.Kind" != ANY
ARRAY['+it+"]";break;default:e='"System.Kind" != ANY
ARRAY['+it+"]";s(i,f,o,"System.ItemType","System.ItemTypeText")}}return
s(i,f,t.Title,"System.ItemNameDisplay","System.Title"),s(i,f,t.Body,"System.ItemNam
eDisplay","System.Title","System.FileDescription","System.Keywords","System.Search.
Contents"),t.People&&t.People.forEach(function(n){var t=n.Value;t&&s(i,f,t=="me"?
SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.userName:t,"System.Au
thor","System.FileOwner","System.Document.LastAuthor","System.Photo.TagViewAggregat
e")}),s(i,f,t.Place,"System.Photo.TagViewAggregate"),r=lu(t.Time),r&&f.push(["Syste
m.DateCreated>='"+r[0]+"' AND
System.DateCreated<'"+r[1]+"'","System.DateModified>='"+r[0]+"' AND
System.DateModified<'"+r[1]+"'","System.DateAccessed>='"+r[0]+"' AND
System.DateAccessed<'"+r[1]+"'","System.DateArchived>='"+r[0]+"' AND
System.DateArchived<'"+r[1]+"'","System.DateAcquired>='"+r[0]+"' AND
System.DateAcquired<'"+r[1]+"'",]),
{selectFields:hu(n),filterFieldsSets:f,kindAndScopeClauses:e?e+" AND
"+g:g,mostRelevantProps:[],searchOptions:0,sortClause:u,sfgaoFilter:kt}}function
lu(t){var i,f,u,e,r;return t?(i=t.value,!i)?null:(f=i.indexOf("T"),f!=-
1&&(i=i.substr(0,f)),u=i.split("-"),u.length<2||u.length>3)?null:(e=new Date(i),!
n.isValidDate(e))?null:(r=new Date(i),u.length==3?r.setUTCDate(r.getUTCDate()
+1):r.setUTCMonth(r.getUTCMonth()+1),[ri(e),ri(r)]):null}function ri(n){var
t=n.toISOString();return t.substr(0,t.indexOf("T"))}function ui(t,i,r){var
u,h,c,e,o,s,l,a,v;r||(u="NOT System.Shell.SFGAOFlagsStrings = SOME ARRAY['hidden']
AND NOT System.Shell.SFGAOFlagsStrings = SOME ARRAY['system'] AND NOT
System.Shell.SFGAOFlagsStrings = SOME ARRAY['link']");r?h=function(n){return!
(n&ai)&&!(n&li)&&(!!(n&&vi)||n&&pi&&!!(n&&ot)||n&&yi&&!!(n&&ot))}:(u+=" AND
(System.Shell.SFGAOFlagsStrings = SOME ARRAY['stream']",u+=" OR
(System.Shell.SFGAOFlagsStrings = SOME ARRAY['fileanc'] AND
System.Shell.SFGAOFlagsStrings = SOME ARRAY['folder'])",u+=" OR
(System.Shell.SFGAOFlagsStrings = SOME ARRAY['storageanc'] AND
System.Shell.SFGAOFlagsStrings = SOME ARRAY['folder'])",u+=")");r?
u="System.Shell.OmitFromView != 'true'":u+=" AND System.Shell.OmitFromView !=
'true'";c=f(n.getKnownFolderPathLC(n.FOLDERID_Profile));switch(t){case
0:e=f(n.getKnownFolderPathLC(oi));u+=" AND (Scope = 'file://' OR Scope =
'csc://{"+i+"}') AND (Scope <> 'file:"+c+"\\AppData') AND (Scope <> 'file:"+e+"\\
Default\\AppData') AND (Scope <> 'file:"+e+"\\Administrator\\
AppData')";o=f(n.getKnownFolderPathLC(fi));s=f(n.getKnownFolderPathLC(ei));u+=" AND
(Scope <> 'file:"+o+"')";s!=o&&(u+=" AND (Scope <>
'file:"+s+"')");l=f(n.getKnownFolderPathLC(si));u+=" AND (Scope <>
'file:"+l+"')";a=f(n.getKnownFolderPathLC(hi));u+=" AND (Scope <>
'file:"+a+"')";r&&(v=f(n.getKnownFolderPathLC(ci)),u+=" AND (Scope <>
'file:"+v+"')");break;case 1:u+=" AND (Scope = 'file://' OR Scope =
'csc://{"+i+"}')";break;default:throw new Error("Unknown SearchScope:
"+t);}return[u,h]}function p(n){for(var e,i="CASE ",r=1,t=0,f=n;t<f.length;t+
+)e=f[t],i+="WHEN 'System.FileExtension' = "+e+" THEN "+r.toString()+"
",r+=1;return i+("ELSE 999 END ASC, "+u)}var et="PRIME",fi="{905e63b6-c1bf-494e-
b29c-65b732d3d21a}",ei="{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}",oi="{0762D272-C50A-
4BB0-A382-697DCD729B80}",si="{A4115719-D62E-491D-AA7C-E74B8BE3B067}",hi="{0482af6c-
08f1-4c34-8c90-e17ec98b1e17}",ci="{bfb9d5e0-c6a9-404c-b2b2-
ae6db6af4968}",li=4096,ai=524288,vi=4194304,ot=536870912,yi=8388608,pi=268435456,st
=3,u='"System.Search.Rank" DESC, "System.DateModified" DESC,
"System.ItemNameDisplay"
ASC',h=['".exe"','".xlsx"','".lnk"','".docx"','".xls"','".doc"','".bat"','".pptx"',
'".pdf"','".txt"',],wi=["System.Kind","System.Search.Rank","System.ParsingPath","Sy
stem.DateCreated","System.DateModified","System.Search.QueryPropertyHits","System.I
temNameDisplay","System.FileExtension","System.ItemType",],bi=["System.Link.TargetP
arsingPath","System.SFGAOFlags",],ht='"System.DateCreated" DESC,
"System.Link.DateVisited" DESC, "System.History.VisitCount" DESC,
"System.History.SelectionCount"
DESC',ct=["System.ApplicationName","System.Document.Version","System.Identity","Sys
tem.Status","System.ContentType","System.ProviderItemID","System.Link.TargetUrl","S
ystem.Title","System.Link.DateVisited","System.History.VisitCount","System.History.
SelectionCount",],e=["System.Title","System.Music.AlbumTitle","System.Music.Display
Artist"],c=["System.ItemNameDisplay","System.Music.DisplayArtist","System.Music.Alb
umTitle",],lt=["CONTAINS(System.ItemNameDisplay, '\"{0}*\"') RANK BY
COERCION(ABSOLUTE, 960)","CONTAINS(System.Title, '\"{0}*\"') RANK BY
COERCION(ABSOLUTE, 860)","CONTAINS(System.Music.DisplayArtist, '\"{0}*\"') RANK BY
COERCION(ABSOLUTE, 760)","CONTAINS(System.Music.AlbumTitle, '\"{0}*\"') RANK BY
COERCION(ABSOLUTE,
660)",],at=e.concat("System.DateAccessed"),ki=lt.concat(["CONTAINS(System.Link.Targ
etParsingPath, '\"{0}*\"') RANK BY COERCION(ABSOLUTE,
920)"]),di=["CONTAINS(System.ItemNameDisplay, '\"{0}*\"') RANK BY
COERCION(ABSOLUTE, 960)","CONTAINS(System.Title, '\"{0}*\"') RANK BY
COERCION(ABSOLUTE, 860)","CONTAINS(System.Link.TargetParsingPath, '\"{0}*\"') RANK
BY COERCION(ABSOLUTE,
920)",],gi=["System.DateAccessed",],nr=["System.ItemNameDisplay",],tr=["CONTAINS(Sy
stem.ItemNameDisplay, '\"{0}*\"') RANK BY COERCION(ABSOLUTE,
895)","CONTAINS(System.Link.TargetParsingPath, '\"{0}*\"') RANK BY
COERCION(ABSOLUTE,
795)",],l=["System.Search.AutoSummary","System.Keywords","System.Title","System.Aut
hor","System.Document.LastAuthor",],w=["System.ItemNameDisplay","System.Keywords","
System.Title",],k=["CONTAINS(System.ItemNameDisplay, '\"{0}*\"') RANK BY
COERCION(ABSOLUTE, 895)","CONTAINS(System.Title, '\"{0}*\"') RANK BY
COERCION(ABSOLUTE, 875)","CONTAINS(System.Keywords, '\"{0}*\"') RANK BY
COERCION(ABSOLUTE, 855)","CONTAINS(System.Photo.TagViewAggregate, '\"{0}*\"') RANK
BY COERCION(ABSOLUTE, 835)","CONTAINS(System.Music.DisplayArtist, '\"{0}*\"') RANK
BY COERCION(ABSOLUTE, 855)","CONTAINS(System.Music.Genre, '\"{0}*\"') RANK BY
COERCION(ABSOLUTE, 845)",],y,ii;n.config.onlyWhereContains||
(k=k.concat(["System.ItemNameDisplay = '{0}' RANK BY COERCION(ABSOLUTE,
999)","System.Title = '{0}' RANK BY COERCION(ABSOLUTE, 980)","System.Keywords =
'{0}' RANK BY COERCION(ABSOLUTE, 960)","System.Photo.TagViewAggregate = '{0}' RANK
BY COERCION(ABSOLUTE, 940)","System.Music.DisplayArtist = '{0}' RANK BY
COERCION(ABSOLUTE, 960)","System.Music.Genre = '{0}' RANK BY COERCION(ABSOLUTE,
950)",]));var vt=["CONTAINS(System.ItemNameDisplay, '\"{0}*\"') RANK BY
COERCION(ABSOLUTE, 895)","CONTAINS(System.Title, '\"{0}*\"') RANK BY
COERCION(ABSOLUTE, 875)","CONTAINS(System.Keywords, '\"{0}*\"') RANK BY
COERCION(ABSOLUTE, 855)",],ir="CONTAINS(System.Search.Contents, '\"{0}*\"') RANK BY
COERCION(ABSOLUTE,
545)",rr=[],ur=["System.ItemNameDisplay",],fr=["CONTAINS(System.ItemNameDisplay,
'\"{0}*\"') RANK BY COERCION(ABSOLUTE,
895)",],d=["System.Photo.TagViewAggregate","System.Title",],yt=["System.ItemNameDis
play","System.Photo.TagViewAggregate",],er=["CONTAINS(System.ItemNameDisplay,
'\"{0}*\"') RANK
BY COERCION(ABSOLUTE, 895)","CONTAINS(System.Title, '\"{0}*\"') RANK BY
COERCION(ABSOLUTE, 875)","CONTAINS(System.Photo.TagViewAggregate, '\"{0}*\"') RANK
BY COERCION(ABSOLUTE,
835)",],a=["System.Title","System.Keywords","System.Music.DisplayArtist","System.Mu
sic.Genre",],pt=["System.ItemNameDisplay","System.Title","System.Keywords",],or=["C
ONTAINS(System.ItemNameDisplay, '\"{0}*\"') RANK BY COERCION(ABSOLUTE,
895)","CONTAINS(System.Title, '\"{0}*\"') RANK BY COERCION(ABSOLUTE,
875)","CONTAINS(System.Music.DisplayArtist, '\"{0}*\"') RANK BY COERCION(ABSOLUTE,
855)","CONTAINS(System.Music.Genre, '\"{0}*\"') RANK BY COERCION(ABSOLUTE,
845)","CONTAINS(System.Keywords, '\"{0}*\"') RANK BY COERCION(ABSOLUTE,
835)",],wt=["System.Title","System.Music.DisplayArtist","System.Music.AlbumTitle","
System.Music.Genre",],bt=["System.ItemNameDisplay","System.Title","System.Music.Alb
umTitle",],sr=["CONTAINS(System.ItemNameDisplay, '\"{0}*\"') RANK BY
COERCION(ABSOLUTE, 895)","CONTAINS(System.Title, '\"{0}*\"') RANK BY
COERCION(ABSOLUTE, 875)","CONTAINS(System.Music.AlbumTitle, '\"{0}*\"') RANK BY
COERCION(ABSOLUTE, 865)","CONTAINS(System.Music.DisplayArtist, '\"{0}*\"') RANK BY
COERCION(ABSOLUTE, 855)","CONTAINS(System.Music.Genre, '\"{0}*\"') RANK BY
COERCION(ABSOLUTE, 845)",],hr=["path =
'{0}'"],r;t.getStrategy=o;t.dataSourceSupported=cr;t.suppress=lr;var
v,g,kt,nt=["Movie","RecordedTV","Video"],dt=nt.concat(["Picture","Music"]),gt=["cal
endar","game","web
history","feed","contact","task","journal","note","instantmessage"],tt=gt.concat("p
rogram"),it=dt.concat(tt).concat(["folder","link"]).map(function(n)
{return"'"+n+"'"}).join(",");t.initStrategies=rt;t.generateIndexerQueryAsync=ar;t.g
enerateIndexerQueryForMRUFilesAndFolders=vr;t.generateIndexerQueryForDeviceItemCach
e=yr;t.generateIndexerPrimerQuery=pr;t.updateAnaheimStrategy=wr;t.fixKind=gr;y={};y
.MPHO=i(d,!1);y.MVID=i(a,!1);y.MDOC=i(l,!1);ii=function(){var n={};return
n.Powerpoint="ppt",n.Word="doc",n.Excel="xls",n}()})(t=n.IndexerQueryGenerator||
(n.IndexerQueryGenerator={}))}(WSB||(WSB={})),function(n){function
c(t,i,r,u,f,e,o,s){var h=u?r+" "+i:r;return
n.Async.safeChainWithGlobalCaching("getIcon",function(i){return
t.getImageAsync(n.getImageSizeValue(i))},function(n){return n+"_"+i},function(t)
{return n.toIcon(t,"getIcon.toIcon",e,o,h)},e,f?function(){var
n;return((n=t)===null||n===void 0?void 0:n.imageType)===0}:null,h,null,s)}function
t(t,i,r,u,f,e){return{deviceItem:t,getIcon:c(t,t.id,r,r&&!
n.localDataSourceMayContainPII(r),n.displayedInGridLayout(i),u,f,0),icon:e?
u:null,suggestionType:i}}function l(n,t,i)
{return{deviceItem:n,icon:i,suggestionType:t}}function lt(n){return
n.map(function(n){return{isSimulated:!
0,displayName:n,id:null,kind:null,getProperty:null,propertyHits:null,rankScore:null
}})}function a()
{n.config.enableFetchStartLogging&&n.InstrumentationHelper.instrumentFetchProviderB
egin(n.SequenceNumberManager.getSequenceNumber(),"TOPP");var
t=SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.getAllAppsAsync();r
eturn t.then(function(t){var r=[],u,i;for(u in t)
(i=t[u],i)&&(n.config.allowZeroLaunchTopApps||i.totalLaunches>0)&&!
n.contains(ct,i.id)&&r.push(i);return
n.config.minTopApps&&r.length<n.config.minTopApps?[]:r}).then(function(n){return
n}).then(function(n){return n}).then(function(t){return t.sort(function(t,i){return
t.totalLaunches!==0||i.totalLaunches!==0?i.totalLaunches-
t.totalLaunches:n.contains(e,t.id)?n.contains(e,i.id)?e.indexOf(t.id)-
e.indexOf(i.id):-1:n.contains(e,i.id)?1:0}),[].concat(t)})}function i(t,i,r)
{switch(t){case"program":return"IBA";case"picture":return
i&&n.contains(v,i.toLowerCase())?"FL":"LI";case"video":return
i&&n.contains(y,i.toLowerCase())?"FL":"LV";case"movie":case"recordedtv":return"LV";
case"music":return"MU";case"folder":return"FD";default:return r}}function
o(t,i,r,u,f,e,o,s,h){var l=o&&h?t.filter(function(t){return
n.contains(Object.keys(tt),t)}):[],c;l.length>0&&(t=t.filter(function(t){return!
n.contains(l,t)}));c=function(t){for(var u,e,r=0,f=l;r<f.length;r+
+)u=f[r],e=tt[u],t[u]={deviceItem:
{id:u,displayName:n.Host.getLocString(e.locStringKey),kind:null,getProperty:functio
n(){return null},propertyHits:
[],rankScore:1e3},icon:e.icon};i(t)};n.safeExecute(function(){var
h,i,l,a,v;if(t.length==0)c({});else{if(h={},i=t.slice(0),s)for(l=t.length-1;l>=0;--
l)a=t[l],s.hasOwnProperty(a)&&(h[a]=s[a],i.splice(l,1));i.length==0?c(h):(v=!o||
n.localDataSourceMayContainPII(o)?o:o+" "+i,n.Async.safeChain(r,function(){return
u(i)},function(r){var e=n.Map.map(i,r,function(n){return
f(n)}),u;if(s&&i.forEach(function(n){return s[n]=e[n]}),i.length!=t.length)for(u in
h)h.hasOwnProperty(u)&&(e[u]=h[u]);c(e)},function(){return
c({})},e,v))}},"resolveIdsWithCache",null,o,function(){return c({})})}function
pt(n,t){if(!t.launchArguments||yt.test(n.query))return!0;var
i=t.id.toLowerCase();return it.some(function(n){return i.includes(n)})?!0:!
1}function rt(t,i,r,u,f){if(!f)return!1;var
o=t.displayName.toLocaleLowerCase(),e=i.queryToFetch.toLocaleLowerCase(),s=null;if(
f.Parses&&f.Parses.length>0&&f.Parses[0].SubParses&&f.Parses[0].SubParses.length>1&
&f.Parses[0].SubParses[0].Interpretation&&f.Parses[0].SubParses[0].Interpretation==
="regex"&&e.length>=f.Parses[0].SubParses[0].QueryEnd&&f.Query!=null)
{if(e.length===f.Parses[0].SubParses[0].QueryEnd)return!
0;e=e.substr(f.Parses[0].SubParses[0].QueryEnd+1);f.Query=f.Query.substr(f.Parses[0
].SubParses[0].QueryEnd+1)}return
e.length<n.config.filterCICandidatesPrefixLength&&!
ut(e,o)&&(s=n.matchesOnPropertyHH(o,e),!s)?!0:dt(o,e,t,r,u,f)?!0:!1}function
dt(t,i,r,u,f,e){var o,s,h;return!i||!e||!e.MatchScore||!e.Parses||
e.Parses.length==0||!e.Parses[0].Entities||e.Parses[0].Entities.length==0||!
e.Query?!1:t.startsWith(i)&&i.length>=n.config.filterCICandidatesPrefixLength?!1:
(o=e.Query,o.startsWith(i))?!1:n.config.bypassCIFilterOnSubstringMatch&&t.split("
").some(function(n){return n.startsWith(i)})?!1:(s=t.startsWith(o),!s)?!0:
(h=1,f.Counter>=h)?!0:(f.Counter++,!1)}function ut(n,t){var r,i;if(!!
t&&t.length==0||(r=t.split(" "),n.length!=r.length))return!1;for(i=0;i<r.length;i+
+)if(r[i].length==0||r[i][0]!=n[i])return!1;return!0}function ft(n){var
i=n.id.toLowerCase(),t;if(i.startsWith("http:")||i.startsWith("https:")||
n.kind=="link"&&i.endsWith(".url"))return 1;if(i.startsWith("file:")||
n.kind=="document")return 0;if(t=n.filePath,t&&(t=t.toLowerCase(),t!=i))
{if(t.startsWith("http:")||t.startsWith("https:")||
n.kind=="link"&&t.endsWith(".url"))return 1;if(t.startsWith("file:"))return
0}return 2}function et(n,t){if(t.dataSource=="PP"){var
i=ft(n);if(i==1)return"LURL";if(i==0)return"LDOC"}return
t.getSuggestionType(n)}function ot(t){return t&&t.rawIndexResponse?
n.safeExecute(function(){return
JSON.parse(t.rawIndexResponse)},"parseConstraintIndexMetaData"):undefined}function
st(t,i,r,u,f,e){var
w,a,s,p,c,o,v,l,h;if(n.IndexerQueryGenerator&&n.IndexerQueryGenerator.suppress(i,t,
u))return!0;if(r=="PP")return(w=i.id,n.contains(wt,w))?!0:(a=i,rt(a,t,!0,f,e))?!0:
(s=i.kind,s&&(s=s.toLocaleLowerCase(),s!="program"&&s!="unknown"))?!
0:u=="LRA"&&ft(a)!=2?!0:(p=a.extension,p&&p.toLowerCase()==".chm")?!0:!1;if(r!
="LURL"&&i.kind=="link"&&n.RuntimeConfig.QfMode!=5)return!
0;if(n.isSetting(r))return rt(i,t,!1,f,e)?!0:!1;if((c=i,!
n.IndexerQueryGenerator&&u=="MDOC"&&c.propertyHits.length==1&&c.propertyHits[0]=="S
ystem.Search.Contents"&&(!n.config.minLengthForContentMatch||
t.queryToFetch.length<n.config.minLengthForContentMatch))||
(o=c.id,o&&(n.RuntimeConfig.QfMode!=5&&(o.includes("\\.")||o.includes("/."))||
(o=o.toLowerCase(),t.queryToFetch.toLocaleLowerCase()!
=i.displayName.toLocaleLowerCase()&&kt.some(function(n){return
o.includes("\\"+n+"\\")||o.includes("/"+n+"/")}))))||
(v=c.extension,v&&n.RuntimeConfig.QfMode!=5&&!
t.queryToFetch.toLowerCase().includes(v.toLowerCase())&&n.contains(bt,v.toLowerCase
())))return!0;if(r=="CG"){if(l=i,h=l.displayName.split(" ")
[0].toLowerCase(),h.includes("\\")||h.indexOf(":")==1)return!1;var
y=l.id.toLowerCase(),b=y.lastIndexOf("."),k=y.lastIndexOf("\\"),d=l.kind=="folder"|
|b<0||b<k;if(d&&!h.includes("%")||![".exe",".com"].some(function(n){return
h.includes(n)})&&(at.some(function(n){return y.includes(n)})||!
l.launchArguments&&it.some(function(n){return y.includes(n)})||
n.contains(vt,h)))return!0}return!1}var s=":wux:",h="Classic_{87d66a43-7b11-4a28-
9811-c86ee395acf7}",ct=["Microsoft.XboxGamingOverlay_8wekyb3d8bbwe!
App"],e=["Microsoft.MicrosoftEdge_8wekyb3d8bbwe!
MicrosoftEdge","windows.immersivecontrolpanel_cw5n1h2txyewy!
microsoft.windows.immersivecontrolpanel","Microsoft.WindowsCalculator_8wekyb3d8bbwe
!App","Microsoft.ScreenSketch_8wekyb3d8bbwe!App","{D65231B0-B2F1-4857-A4CE-
A8E7C6EA7D27}\\mspaint.exe","{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\\
mspaint.exe"],v,y,ht,f;n.getIcon=c;n.createLocalResponseSuggestionWithDeviceItemIma
ge=t;n.fetchForTopLocalApps=a;v=[".dwg",".ai",".psd"];y=[".ts"];n.getSuggestionType
FromKindAndExtension=i;var p={getResultsContainer:function(n){return
n.apps},dataSource:"PP",getSuggestionType:function()
{return"PP"},maxUpTo3chars:4,maxAfter3chars:7,maxAfter8charsOrInL2ZeroInput:15,cust
omCreateLocalResponseSuggestion:function(i,r,u){return
t(i,r,u,n.ScopeConfig[n.Scope.Apps].icon,i.isImmersive?
i.logoBackgroundColor:undefined)},supportsEmptyQuery:!
0},w={getResultsContainer:function(n){return
n.settings},dataSource:"ST",getSuggestionType:function()
{return"ST"},maxUpTo3chars:4,maxAfter3chars:7,maxAfter8charsOrInL2ZeroInput:15,cust
omCreateLocalResponseSuggestion:function(i,r,u){if(n.isModernSetting(i)){var
f=i.glyph,e=void 0;return e=n.config.useCobaltCSS&&i.glyphFontFamily==="Settings
Fluent Icons"?{content:f,type:8}:f?
{content:f,type:1}:n.ScopeConfig[n.Scope.Settings].icon,l(i,r,e)}return
t(i,r,u,n.ScopeConfig[n.Scope.Settings].icon)},supportsEmptyQuery:!1},b=[p,w,
{getResultsContainer:function(n){return
n.media},dataSource:"LM",getSuggestionType:function(n){return
i(n.kind,n.extension,"FL")},maxUpTo3chars:7,maxAfter3chars:10,maxAfter8charsOrInL2Z
eroInput:20,supportsEmptyQuer
y:!0},{getResultsContainer:function(n){return
n.files},dataSource:"FL",getSuggestionType:function(n){return
i(n.kind,n.extension,"FL")},maxUpTo3chars:7,maxAfter3chars:10,maxAfter8charsOrInL2Z
eroInput:20,supportsEmptyQuery:!0},{getResultsContainer:function(){throw
Error("Only supported via
IndexerQuery");},dataSource:"IBA",getSuggestionType:function()
{return"IBA"},maxUpTo3chars:4,maxAfter3chars:7,maxAfter8charsOrInL2ZeroInput:15,cus
tomCreateLocalResponseSuggestion:function(i,r,u){return
t(i,r,u,n.ScopeConfig[n.Scope.Apps].icon)},supportsEmptyQuery:!1},
{getResultsContainer:function(){throw Error("Only supported via
IndexerQuery");},dataSource:"IFF",getSuggestionType:function(n){return
i(n.kind,n.extension,"FL")},maxUpTo3chars:7,maxAfter3chars:15,maxAfter8charsOrInL2Z
eroInput:25,supportsEmptyQuery:!0},],k=[{getResultsContainer:function(n){return
n.files},dataSource:"MDOC",getSuggestionType:function(n){return
i(n.kind,n.extension,"FL")},maxUpTo3chars:4,maxAfter3chars:7,maxAfter8charsOrInL2Ze
roInput:15,customCreateLocalResponseSuggestion:function(i,r,u){return
t(i,r,u,n.ScopeConfig[n.Scope.Documents].icon,null,!0)},supportsEmptyQuery:!1},
{getResultsContainer:function(n){return
n.folders},dataSource:"MFOL",getSuggestionType:function(n){return
i(n.kind,n.extension,"FD")},maxUpTo3chars:4,maxAfter3chars:7,maxAfter8charsOrInL2Ze
roInput:15,customCreateLocalResponseSuggestion:function(i,r,u){return
t(i,r,u,n.ScopeConfig[n.Scope.Folders].icon,null,!0)},supportsEmptyQuery:!1},
{getResultsContainer:function(n){return
n.pictures},dataSource:"MPHO",getSuggestionType:function(n){return
i(n.kind,n.extension,"LI")},maxUpTo3chars:4,maxAfter3chars:7,maxAfter8charsOrInL2Ze
roInput:15,customCreateLocalResponseSuggestion:function(i,r,u){return
t(i,r,u,n.ScopeConfig[n.Scope.Photos].icon,null,!0)},supportsEmptyQuery:!1},
{getResultsContainer:function(n){return
n.video},dataSource:"MVID",getSuggestionType:function(n){return
i(n.kind,n.extension,"LV")},maxUpTo3chars:4,maxAfter3chars:7,maxAfter8charsOrInL2Ze
roInput:15,customCreateLocalResponseSuggestion:function(i,r,u){return
t(i,r,u,n.ScopeConfig[n.Scope.Videos].icon,null,!0)},supportsEmptyQuery:!1},
{getResultsContainer:function(n){return
n.music},dataSource:"MMUS",getSuggestionType:function()
{return"MU"},maxUpTo3chars:4,maxAfter3chars:7,maxAfter8charsOrInL2ZeroInput:15,cust
omCreateLocalResponseSuggestion:function(i,r,u){return
t(i,r,u,n.ScopeConfig[n.Scope.Music].icon,null,!0)},supportsEmptyQuery:!1},
{getResultsContainer:function(n){return
n.files},dataSource:"MPVD",getSuggestionType:function(n){return
i(n.kind,n.extension,"FL")},maxUpTo3chars:4,maxAfter3chars:7,maxAfter8charsOrInL2Ze
roInput:15,customCreateLocalResponseSuggestion:function(i,r,u){return
t(i,r,u,n.ScopeConfig[n.Scope.Documents].icon,null,!0)},supportsEmptyQuery:!
1},],d=[{getResultsContainer:function(n){return
SearchAppWrapper.CortanaApp.queryFormulationView.startPathCompletionQuery(n.origina
lQuery,"")},dataSource:"PT",getSuggestionType:function()
{return"PT"},maxUpTo3chars:15,maxAfter3chars:15,maxAfter8charsOrInL2ZeroInput:15,cu
stomCancellation:function(){return
SearchAppWrapper.CortanaApp.queryFormulationView.cancelLastPathCompletionQuery()},s
upportsEmptyQuery:!1},{getResultsContainer:function(){return
SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.getRecentAppsAsync()}
,getResults:function(n){return n},dataSource:"LRA",getSuggestionType:function()
{return"PP"},customCreateLocalResponseSuggestion:function(i,r,u){return
t(i,r,u,n.ScopeConfig[n.Scope.Apps].icon,i.isImmersive?
i.logoBackgroundColor:undefined)},supportsEmptyQuery:!0},
{getResultsContainer:function(t){return
ThresholdUtilities.createPromise(function(i){var
r=SearchAppWrapper.CortanaApp.fileExplorerSuggestionPage.recentSearches||
[],u,f,e;r=r.filter(function(n){return!!
n});r.length>0&&t.queryToFetch&&(u=n.escapeRegex(t.queryToFetch),f=u.split("
").map(function(n){return new RegExp("^"+n+"| "+n,"i")}),r=r.filter(function(n)
{return f.every(function(t){return
t.test(n)})}));e=lt(r);i(e)})},getResults:function(n){return
n},dataSource:"FEH",getSuggestionType:function()
{return"FEH"},customCreateLocalResponseSuggestion:function(n,t){return l(n,t,
{type:2,content:"&#xE81C"})},supportsEmptyQuery:!0},{getResultsContainer:function()
{return a()},getResults:function(n,t){return n.then(function(n){return t?
n.slice(0,t):n})},dataSource:"TOPP",getSuggestionType:function()
{return"TOPL"},customGetMax:function(t){return n.shouldShowStaticSearchHome(t)?
6:5},customCreateLocalResponseSuggestion:function(i,r,u){return
t(i,r,u,n.ScopeConfig[n.Scope.Apps].icon,i.isImmersive?
i.logoBackgroundColor:undefined)},supportsEmptyQuery:!0},
{getResultsContainer:function(n){return
ThresholdUtilities.createPromise(function(t){var i=r?
r.retrieveItemsFromCache(n.queryToFetch):[];t(i)})},getResults:function(n){return
n},dataSource:"LDIC",getSuggestionType:function(n){return
i(n.kind,n.extension,"FD")},maxUpTo3chars:4,maxAfter3chars:7,maxAfter8charsOrInL2Ze
roInput:15,supportsEmptyQuery:!1},],g=[{getResultsContainer:function(n){return
SearchAppWrapper.CortanaApp.queryFormulationView.startCommandLineQuery(n.originalQu
ery,"")},dataSource:"CG",getSuggestionType:function()
{return"CG"},customCancellation:function(){return
SearchAppWrapper.CortanaApp.queryFormulationView.cancelLastCommandLineQuery()},supp
ortsEmptyQuery:!
1},];n.LocalDataProviderDataSources=b.concat(k).concat(d).concat(g).map(function(n)
{return n.dataSource});var u={suggestions:[],maxedOut:!
1},nt={},r,tt={"shell:RecycleBinFolder":{icon:
{content:"&#xEF87",type:2},locStringKey:"RecycleBin"}};var at=["\\system32\\
user.exe","\\system32\\sidebar.exe","\\system32\\at.exe","\\system32\\
change.exe","\\system32\\control.exe","\\system32\\find.exe","\\system32\\
net.exe","\\system32\\share.exe","\\system32\\rundll32.exe","\\system32\\
append.exe","\\system32\\choice.exe","\\system32\\clip.exe","\\system32\\
comp.exe","\\system32\\compact.exe","\\system32\\consent.exe","\\system32\\
convert.exe","\\system32\\format.exe","\\system32\\graphics.com","\\system32\\
label.exe","\\system32\\mem.exe","\\system32\\mode.com","\\system32\\more.com","\\
system32\\recover.exe","\\system32\\replace.exe","\\system32\\reset.exe","\\
system32\\shadow.exe","\\system32\\sort.exe","\\system32\\tree.com","\\system32\\
webcam.exe","\\system32\\systemsettings.exe","\\system32\\command.com","\\
system32\\tabtip.exe","\\system32\\services.exe","\\system32\\help.exe","\\
system32\\where.exe","\\system32\\skydrive.exe","\\system32\\calc.exe","\\
system32\\fc.exe","\\accessories\\wordpad.exe",n.config.blocklistNotepadCommand?"\\
system32\\notepad.exe":null,].filter(function(n){return!!n}),it=["\\system32\\
finger.exe","\\system32\\ping.exe","\\system32\\print.exe","\\system32\\
shutdown.exe","\\system32\\expand.exe","\\system32\\tskill.exe","\\system32\\
reg.exe","\\system32\\
sc.exe",],vt=["uninstall","outlook","excel","skype","nero","onenote","lync","vmware
","firefox","itunes","photoshop","print","opera","visio","thunderbird","smartscreen
"],yt=/[\/\.\-\\]/;n.isRealCommand=pt;var wt=["Microsoft.Cortana_8wekyb3d8bbwe!
CortanaUI","Microsoft.Windows.Cortana_cw5n1h2txyewy!
CortanaUI",],bt=[".dll",".pdb",".obj",".bin",".etl",".bak",".config",".resx",".mani
fest",".ini",".searchconnector-ms",".settingcontent-ms",".vstx",".vssx",".ms-one-
stub",],kt=["visio
content","bin","debug","obj","objd","amd64","x86","microsoftedgebackups",];n.isInit
ials=ut;n.getSuggestionTypeOverride=et;n.parseConstraintIndexMetaData=ot;n.isSuppre
ssed=st;ht=function(){function e(t,i){var
u=this;this._previousKeystrokeCache=t;i&&(r=i,n.Host.bindShown(function()
{r&&(r.clean(),u.cacheDeviceItems())}));n.Host.bindAppHidden(function()
{nt={}})}return e.prototype.getName=function()
{return"LocalDataProvider"},e.setWhereId=function(n)
{e.whereId=n},e.prototype.fetch=function(t,i,r,u,o){var
it=this,s,c,rt,a,ut,h,v,st,y,ft,p,ht,ct,w,et,nt,lt,at,tt,ot,l;if(u&&u.register(func
tion(){return n.Async.clearPendingItemsFromCache()},!
1,"clearPendingItemsFromCache"),s=[],c=b.filter(function(i){return
n.isDataSourceEnabled(i.dataSource,t)}),n.IndexerQueryGenerator&&(s=s.concat(c.filt
er(function(t){return
n.IndexerQueryGenerator.dataSourceSupported(t.dataSource)})),c=c.filter(function(t)
{return!n.IndexerQueryGenerator.dataSourceSupported(t.dataSource)})),c.length>0)
{if(!t.queryToFetch&&!c.every(function(n){return n.supportsEmptyQuery}))throw new
Error(f);if(u&&u.register(function(){return
SearchAppWrapper.CortanaApp.queryFormulationView.cancelLastDeviceQuery()},!
1,"cancelLastDeviceQuery"),rt=n.safeExecute(function(){var
i=n.Host.getRawImpressionGuid();return
n.config.logClientPerf&&n.InstrumentationHelper.instrumentDeviceQueryBegin(i),Searc
hAppWrapper.CortanaApp.queryFormulationView.startDeviceQuery(t.queryToFetch,i)},"st
artDeviceQuery",null,t.queryToFetch),rt)for(a=0,ut=c;a<ut.length;a+
+)l=ut[a],this.searchFolderWithMultipleResults(t,l,rt,i,o,u,e.whereId);else
this.emptyFetch(c,i)}if(h=k.filter(function(i){return
n.isDataSourceEnabled(i.dataSource,t)}),n.IndexerQueryGenerator&&(s=s.concat(h.filt
er(function(t){return
n.IndexerQueryGenerator.dataSourceSupported(t.dataSource)})),h=h.filter(function(t)
{return!n.IndexerQueryGenerator.dataSourceSupported(t.dataSource)})),h.length>0)
{if(!t.queryToFetch&&!h.every(function(n){return n.supportsEmptyQuery}))throw new
Error(f);v=t.taskFrame?
t.taskFrame.raw:"";n.Async.safeChain("executeSearchAsync",function(){return
SearchAppWrapper.CortanaApp.searchResultsView.executeSearchAsync(t.queryToFetch,v)}
,function(n){var r,f,s;if(o())if(n)for(r=0,f=h;r<f.length;r+
+)s=f[r],it.searchFolderWithMultipleResults(t,s,n,i,o,u,e.whereId);else
it.emptyFetch(h,i)},function(){return it.emptyFetch(h,i)},null,v?t.queryToFetch+"\
n"+v:t.queryToFetch)}if(s.length>0){if(e.lastQuery&&!
t.fullPartialQuery.startsWith(e.lastQuery)&&e.setWhereId(null),e.lastQuery=t.fullPa
rtialQuery,!t.queryToFetch&&!s.every(function(n){return
n.supportsEmptyQuery}))throw
new Error(f);if(s.some(function(n){return
n.dataSource=="MPHO"})&&s.some(function(n){return
n.dataSource=="MVID"})&&s.some(function(n){return
n.dataSource=="MDOC"})&&s.some(function(n){return
n.dataSource=="MPVD"}))st=s.find(function(n){return
n.dataSource=="MPVD"}),this.searchFolderWithMultipleResults(t,st,null,i,o,u,e.where
Id);else for(y=0,ft=s;y<ft.length;y+
+)l=ft[y],this.searchFolderWithMultipleResults(t,l,null,i,o,u,e.whereId)}if(p=d.fil
ter(function(i){return n.isDataSourceEnabled(i.dataSource,t)}),p.length>0){if(!
t.queryToFetch&&!p.every(function(n){return n.supportsEmptyQuery}))throw new
Error(f);for(ht=function(n){u&&n.customCancellation&&u.register(function(){return
n.customCancellation()},!0,n.dataSource+"
cancellation");ct.searchFolderWithMultipleResults(t,n,t,i,o,u,e.whereId)},ct=this,w
=0,et=p;w<et.length;w++)l=et[w],ht(l)}if(nt=g.filter(function(i){return
n.isDataSourceEnabled(i.dataSource,t)}),nt.length>0){if(!t.queryToFetch&&!
nt.every(function(n){return n.supportsEmptyQuery}))throw new
Error(f);for(lt=function(n){u&&n.customCancellation&&u.register(function(){return
n.customCancellation()},!0,n.dataSource+"
cancellation");at.searchFolderWithSingleResult(t,n,t,i,o)},at=this,tt=0,ot=nt;tt<ot
.length;tt++)l=ot[tt],lt(l)}t.taskFrame&&n.safeExecute(function(){return
SearchAppWrapper.CortanaApp.searchResultsView.setTaskFrame(t.originalQuery,"")},"re
set task frame")},e.prototype.emptyFetch=function(n,t){for(var
f,i=0,r=n;i<r.length;i+
+)f=r[i],this.logProviderFailure(f.dataSource),t(f.dataSource,u,e.getDataSourceStat
e(0))},e.prototype.getMax=function(t,i){return i.customGetMax?
i.customGetMax(t):n.RuntimeConfig.QfMode==5||t.scope!=n.Scope.All?t.queryToFetch?
i.maxAfter8charsOrInL2ZeroInput*2:i.maxAfter8charsOrInL2ZeroInput:t.queryToFetch.le
ngth>8?i.maxAfter8charsOrInL2ZeroInput:t.queryToFetch.length>3?
i.maxAfter3chars:i.maxUpTo3chars},e.prototype.toLocalResponse=function(i,r,u,f,e)
{var y,p,a,w,o,v;e&&(p=f,p.getGroupDisplayName&&(y=p.getGroupDisplayName(e)));var
k={Counter:0},b=[],d=u.length<i;for(a=0,w=u;a<w.length;a++){var
c=w[a],l=et(c,f),h=n.isApp(l)||n.isSetting(l)?
ot(c):undefined;st(r,c,l,f.dataSource,k,h)||(o=void
0,o=f.customCreateLocalResponseSuggestion?
f.customCreateLocalResponseSuggestion(c,l,f.dataSource):t(c,l,f.dataSource),y&&(o.g
roupDisplayName=y),h&&(o.ciMetaData=h,h.Query&&h.Query.includes(s)&&(v=h.Query.spli
t(s),v.length==2&&(o.uxHint=v[1],o.ciMetaData.Query=v[0]))),b.push(o))}return{sugge
stions:b,maxedOut:d}},e.prototype.getResults=function(n,t,i,r)
{if(r.getResults)return r.getResults(i,t);var
u=i,f=this.enableSpellCorrection(n);return u.getItemsAsyncWithSpeller?
u.getItemsAsyncWithSpeller(0,t,f):i.getItemsAsync(0,t)},e.prototype.enableSpellCorr
ection=function(t){return
t.queryToFetch.length>=n.config.enableCISpellerAtPrefixLength&&this._previousKeystr
okeCache&&this._previousKeystrokeCache.enableCISpeller(t.queryToFetch)?!
0:t.queryToFetch.length>=n.config.enableCISpellerAtPrefixLength&&n.config.enableCIS
peller==1?!0:!
1},e.prototype.searchFolderWithMultipleResults=function(t,i,r,f,o,s,h){var
y=this,c=i.dataSource,p=this.getMax(t,i),l=!r,w,a,v;if(l)
{if(n.RuntimeConfig.QfMode==5&&(v=n.Host.getFileExplorerCurrentPath()),v&&!/^[a-zA-
Z]\:\\/.test(v)){f(c,u,null,null,!0);return}w=function(){return
n.IndexerQueryGenerator.generateIndexerQueryAsync(t,v,p,c,h).then(function(n)
{return
SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.queryWindowsSearchInd
exerAsync(n)})}}else{if(a=n.safeExecute(function(){return
i.getResultsContainer(r)},"getResultsContainer "+c),!a)
{f(c,u,null);return}w=function(){return
y.getResults(t,p,a,i)}}n.Async.safeChain(l?"queryWindowsSearchIndexerAsync":"getIte
msAsync",w,function(r){var u,s,h;o()&&(u=r.resultSet,s=void
0,r.whereId&&e.setWhereId(r.whereId),u?s=r.state:u=typeof r.length=="undefined"?
Object.keys(r).map(function(n){return
r[n]}):r,l&&n.supportsShortcuts(c,t)&&(u=u.map(function(t){return
n.IndexerQueryGenerator.fixKind(t)})),h=e.getDataSourceState(s),f(c,y.toLocalRespon
se(p,t,u,i,a),h))},function(t){n.isCancellation(t)||
y.logProviderFailure(c);f(c,u,null)},l?s:null,c+"
"+t.queryToFetch)},e.prototype.searchFolderWithSingleResult=function(t,i,r,f,e){var
s=this,o=i.dataSource,h=n.safeExecute(function(){return
i.getResultsContainer(r)},"getResultsContainer "+o);h?
n.Async.safeChain("tryGetResultAsync "+o,function(){return
h.tryGetResultAsync()},function(n){e()&&f(o,s.toLocalResponse(1,t,n?[n]:
[],i,null),null)},function(t){n.isCancellation(t)||
s.logProviderFailure(o);f(o,u,null)},null,t.queryToFetch):f(o,u,null)},e.prototype.
logProviderFailure=function(t){var
i=n.providerFailureLogName(t);i&&SearchAppWrapper.CortanaApp.queryFormulationView.l
ogProviderFailure&&n.safeExecute(function(){return
SearchAppWrapper.CortanaApp.queryFormulationView.logProviderFailure(i,"ErrorForTopH
it")},"logProviderFailure")},e.prototype.cacheDeviceItems=function(){var
t="LDIC",i=function(){var
i=n.IndexerQueryGenerator.generateIndexerQueryForDeviceItemCache(t,e.whereId);retur
n
SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.queryWindowsSearchInd
exerAsync(i)};r.setReady(!
1);n.Async.safeChain("initializeDeviceItemCacheAsync",i,function(n){var
t,i,u;for(n.whereId&&e.setWhereId(n.whereId),t=0,i=n.resultSet;t<i.length;t+
+)u=i[t],r.addItemToCache(u);r.setReady(!0)})},e.getDataSourceState=function(n)
{switch(n){case 0:return"UN";case 1:return"NI";case 2:return"PI"}return
undefined},e.getApps=function(n,t,i,r){o(n,t,"findAppsAsync",function(n){return
SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.findAppsAsync(n)},fun
ction(n){return p.customCreateLocalResponseSuggestion(n,null,r)},i,r,null,!
0)},e.getSettings=function(n,t,i,r){o(n,t,"findSettingsAsync",function(n){return
SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.findSettingsAsync(n)}
,function(n){return
w.customCreateLocalResponseSuggestion(n,null,r)},i,r,null)},e.getFiles=function(r,u
,f,s,h){o(r,u,"findFilesAsync",function(t){if(n.IndexerQueryGenerator){var
i=n.IndexerQueryGenerator.generateIndexerQueryForMRUFilesAndFolders(f,"MFF",t,e.whe
reId);return
SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.queryWindowsSearchInd
exerAsync(i).then(function(n){var
i,t,r,u;for(n.whereId&&e.setWhereId(n.whereId),i={},t=0,r=n.resultSet;t<r.length;t+
+)u=r[t],i[u.id]=u;return i})}return
SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.findFilesAsync(t)},fu
nction(n){return
t(n,i(n.kind,n.extension,"FL"),h)},s,h,nt)},e.launchIndexingOptions=function(t){var
i=this;e.getSettings([h],function(r){var u=r[h];u?
n.Host.launchDeviceItem(u.deviceItem,"ST"):t||i.launchIndexingOptions(!
0)},null,null,!0)},e}();n.LocalDataProvider=ht;f="Local provider doesn't support
empty query"}(WSB||(WSB={}));__spreadArrays=this&&this.__spreadArrays||function()
{for(var i=0,n=0,r=arguments.length;n<r;n++)i+=arguments[n].length;for(var
u=Array(i),f=0,n=0;n<r;n++)for(var e=arguments[n],t=0,o=e.length;t<o;t++,f+
+)u[f]=e[t];return u},function(n){var
i,u="UpsellDismissed",f="moreButton",r="feedbackButton",e="optionsButton",o="reward
sBadgeButton",s="userProfileButton",h="closeButton",t="WsbWorkScopeDotIconInfo",c=f
unction(){function c(t,c,l,a,v,y,p){var w=this,b,k,d;
(this._page=t,this._accessTokenManager=c,this._msRewardsViewModel=l,this._menuFacto
ry=a,this._substrateProfilePictureProvider=v,this._optionsWindow=y,this._moreButton
={id:f,selected:!1,text:null},this._feedbackButton={id:r,selected:!
1,text:null},this._optionsButton={id:e,selected:!
1,text:null},this._rewardsBadgeButton={id:o,selected:!
1,text:null},this._userProfileButton={id:s,selected:!
1,text:null},this._closeButton={id:h,selected:!1,text:null},this._topHitPresent=!
1,this._resultsPresent=!1,this._currentScopeTileIndex=-1,this._moreMenuOpened=!
1,this._optionsMenuOpened=!1,this._userProfileMenuOpened=!
1,this._shouldRenderScopes=!
0,this._advancedOptionsIdCounter=0,this._advancedOptionsScope=[],this._shouldShowBu
ildNumber=!
1,this._userProfilesCache={},this._storage=p,this._upsellGotDismissed=p.getItem(u)=
="1",i=SearchAppWrapper.CortanaApp,this._scopesHeaderElement=_ge("scopesHeader"),n.
config.scopesOrderBegin.length!=0)&&(b=function()
{w._currentQuery&&w.renderScopes()},n.Host.bindAppHidden(function()
{w._scopeTiles=null;w._effectiveScopeOrder=null}),n.Host.bindQueryChangedOrInitiali
zed(function(n){w._currentQuery=n;w._currentScopeTileIndex=-
1}),n.Host.bindDismissed(function(){w._shouldRenderScopes=!
0;w._currentScopeTileIndex=-1;w._verifyAccountForAADRequired=!
1;w._verifyAccountForMSARequired=!
1}),n.Host.bindButtonRightOfSearchBoxClick(function(t){(t==""||
t=="")&&(n.Host.reformulate(""),w.setFocusInSearchBox("clear search
box"),n.InstrumentationHelper.logClientInstEvent("Select","ClearSearchBox",null))})
,n.Host.bindScopeListRequiresUpdate(function()
{w.init();b()}),n.Host.bindOnFeedbackClosing(function(t){!
t&&n.RuntimeConfig.AlwaysWide&&_ge(r).focus()}),n.Host.bindKeyDown(function(n,t)
{t.ctrlKey&&n==13&&t.shiftKey&&(w._shouldShowBuildNumber=!
0)}),this._substrateUpsellDismiss={action:function(){w._upsellGotDismissed=!
0;p.setItem(u,"1");n.Host.refreshCurrentPane()},icon:
{content:"&#xE711",type:2}},l&&l.bindRewardsBadgeUpdated(function()
{w._shouldRenderScopes=n.config.optScopesRender;b()}),c&&(k=function()
{if(w._currentQuery){var
t=n.ScopeConfig[w._currentQuery.scope];w.refreshAdvancedOptionsScopeList(t);w.updat
eTopHitHeader()}},d=function(n,t,i){n==0?(t=="https://substrate.office.com/
SubstrateSearch-Internal.ReadWrite"||t=="https://substrate.office.com/
M365.Access"||
t=="service::cortana.bing.com::mbi_ssl")&&(w._verifyAccountForMSARequired=i,k()):n=
=1&&t=="https://
substrate.office.com"&&(w._verifyAccountForAADRequired=i,k())},c.bindVerifyAccountR
equired(function(n,t){d(n,t,!0)}),c.bindAccessTokenAvailable(function(n,t){d(n,t,!
1)})))}return c.prototype.focusNextScopeTile=function(t,i){var
r=[].slice.call(this._scopesHeaderElement.getElementsByClassName("scope-
tile")),u=n.shouldSkipSelectedScope()?r.filter(function(n){return!
n.classList.contains("scope-tile--selec
ted")}):r;this._currentScopeTileIndex=u.indexOf(t);i?this._currentScopeTileIndex!
=u.length-1&&++this._currentScopeTileIndex:this._currentScopeTileIndex>0&&--
this._currentScopeTileIndex;n.shouldSkipSelectedScope()&&(this._currentScopeTileInd
ex=r.indexOf(u[this._currentScopeTileIndex]));this._menuFactory.dismiss();r[this._c
urrentScopeTileIndex].focus()},c.prototype.render=function(t,i,r,u,f){var
e,o;this._currentQuery=t;t?
(o=n.getEffectiveScope(t),this.handleWorkScopeDotIconShowState(t.scope),this.innerR
ender(t.scope,o,t,i,r,u,f),this._previousScope=(e=this._selectedScope)===null||
e===void 0?void
0:e.type):this.cleanUp()},c.prototype.handleWorkScopeDotIconShowState=function(i)
{var u,f,r;typeof
n.isMsbWorkScopeApplicable=="function"&&n.isMsbWorkScopeApplicable()&&n.config.msbW
orkScopeDotIndicatorEnabled&&(u=this.getScopeBarElements().find(function(t){return
t.type===n.Scope.Work}),u&&(f=this._storage.getItem(t),r=f?
JSON.parse(f):undefined,i===n.Scope.Work&&i!=this._previousScope?
(u.isDotIconEnabled=!1,(r===null||r===void 0?void
0:r.clickCount)<n.config.msbWorkScopeDotIndicatorPerDayFrequency&&(r.clickCount+
+,this._storage.setItem(t,JSON.stringify(r)),_w.bfbWsbTel&&bfbWsbTel.logValue("WsbW
orkScopeWithDotClicked","Y"))):i!
=n.Scope.Work&&r&&(u.isDotIconEnabled=r.clickCount<n.config.msbWorkScopeDotIndicato
rPerDayFrequency)))},c.prototype.getScopeToolTip=function(t,i){var
u=n.ScopeConfig[t],f=n.getScopeDisplayName(u),r;return r=i&&!
this._allScopeButtonPresent?"RemovingScopeNarratorText2":t==n.Scope.All?"AddingScop
eNarratorTextAll2":"AddingScopeNarratorText",n.Host.getLocString(r,f.toLocaleLowerC
ase())},c.prototype.selectScope=function(n){var
i,r,t;for(this._selectedScope&&(this._selectedScope.tooltip=this.getScopeToolTip(th
is._selectedScope.type,!1),this._selectedScope.enabled=!
1,this._selectedScope=null),i=0,r=this._scopeTiles;i<r.length;i+
+)if(t=r[i],t.enabled=t.type==n,t.enabled){t.tooltip=this.getScopeToolTip(n,!
0);this._selectedScope=t;break}},c.prototype.innerRender=function(t,i,r,u,f,e,o)
{this._topHitPresent=u;this._resultsPresent=f;n.RuntimeConfig.ScopesAvailable&&(thi
s._scopeTiles||this.init(),this._scopeTiles&&(!this._selectedScope||
this._selectedScope.type!
=t)&&this.selectScope(t));this.renderTopHitHeader(t,i,r,f,e,o);n.RuntimeConfig.Scop
esAvailable&&(this.renderScopes(),this.renderBranding());var
s=this._advancedOptionsScope.filter(function(n){return n.layout==1||
n.layout==6});s&&this._page.renderAdvancedOptionsMessages(s)},c.prototype.refreshAd
vancedOptionsScopeList=function(t)
{this._advancedOptionsScope=n.RuntimeConfig.ScopesAvailable&&t.showUpsellOnSuggesti
onsList&&t.showUpsellOnSuggestionsList()?
this.getAdvancedOptions(n.SequenceNumberManager.getSequenceNumber(),0):
[]},c.prototype.renderTopHitHeader=function(t,i,r,u,f,e){var
o=n.ScopeConfig[i],l=r.showProgressBar?e:!f,a=!r||!
r.queryToFetch,v=this.getEmptyResultsMessage(u,l,a,i,o),s=v[0],h=v[1],c=l||a||u||!
this._lastRenderedTopHitHeader||n.uses3lineTemplate(i)?
this.getHeaderText(i,o):this._lastRenderedTopHitHeader.headerText,y;
(this.refreshAdvancedOptionsScopeList(o),n.RuntimeConfig.AlwaysWide&&(this._advance
dOptionsScope=this._advancedOptionsScope.concat(this.getAdvancedOptions(n.SequenceN
umberManager.getSequenceNumber(),1))),this._lastRenderedTopHitHeader&&this._lastRen
deredTopHitHeader.scope==t&&this._lastRenderedTopHitHeader.message==s&&this._lastRe
nderedTopHitHeader.subMessage==h&&this._lastRenderedTopHitHeader.headerText==c&&thi
s._lastRenderedTopHitHeader.advancedOptions==this._advancedOptionsScope)||
(this._lastRenderedTopHitHeader={scope:t,headerText:c,message:s,subMessage:h,advanc
edOptions:this._advancedOptionsScope,scopeForDisplay:i},y={headerText:c,message:s,s
ubMessage:h,messageIcon:s?
o.icon:null},this._page.updateTopHitHeaderView(y))},c.prototype.updateTopHitHeader=
function(){if(this._lastRenderedTopHitHeader){var
t=n.ScopeConfig[this._lastRenderedTopHitHeader.scopeForDisplay],i={headerText:this.
_lastRenderedTopHitHeader.headerText,message:this._lastRenderedTopHitHeader.message
,subMessage:this._lastRenderedTopHitHeader.subMessage,messageIcon:this._lastRendere
dTopHitHeader.message?
t.icon:null};this._page.updateTopHitHeaderView(i)}},c.prototype.shouldShowRewardsBa
dge=function(t){return n.RuntimeConfig.AlwaysWide||!!
t&&t.scope==n.Scope.All},c.prototype.getScopesHeaderDataModel=function(){var
t=this;this._advancedOptionsIdCounter=0;var
i=this.getScopeBarElements(),u=this.getHiddenScopeElements(i)||
[],f=this._msRewardsViewModel&&this._msRewardsViewModel.getDataModel(),s=typeof
n.enableCobaltBranding=="function"&&n.enableCobaltBranding()?
this.getScopesBrandingDataModel():null,r=n.cohortProfileManager===null||
n.cohortProfileManager===void 0?void
0:n.cohortProfileManager.isTourVisible();r&&(i=i.map(function(n){return
Object.assign({},n,{click:undefined,tooltip:undefined})}),f&&(f.click=function()
{return null}));var e=n.config.userProfileButtonEnabled?
this.getUserProfileButtonData():
[null,null],o=e[0],h=e[1];return{isWin11DSB:n.isWin11DSB(this._currentQuery),scopes
:n.config.pureRender?n.deepCopy(i):i,showFeedback:this.isFeedbackEnabled()?r?
function(){return}:function(){return
t.showFeedback()}:null,rewardsBadgeDataModel:this.shouldShowRewardsBadge(this._curr
entQuery)&&f,moreMenuDataModel:u.length>0?
{opened:this._moreMenuOpened,menuItems:u,buttonClickHandler:function(n,i,f){return
r?null:t._moreMenuOpened?
t.closeMoreMenuDropDown():t.openMoreMenuDropDown(u,n,i,f)}}:null,optionsMenuDataMod
el:{opened:this._optionsMenuOpened,buttonClickHandler:function(n,i,u){return r?
null:t._optionsMenuOpened?
t.closeOptionsMenuDropDown():t.openOptionsMenuDropDown(n,i,u)}},userProfileButtonDa
taModel:n.config.userProfileButtonEnabled&&o?
{opened:this._userProfileMenuOpened,buttonClickHandler:function(n,i,u){return r?
null:t._userProfileMenuOpened?
t.closeUserProfileDropDown():t.openUserProfileDropDown(n,i,u)},icon:o,userName:h}:n
ull,brandBarDataModel:s,closeButtonClickHandler:function(n,i,r){return
t.closeButtonClicked(n,i,r)}}},c.prototype.renderScopes=function(){var t;(!
n.config.optScopesRender||this._currentQuery&&this._currentQuery.scopePrefix||
(this._selectedScope?this._selectedScope.selected==!1:
((t=this._currentQuery)===null||t===void 0?void 0:t.scope)==n.Scope.All)||
this._moreMenuOpened||this._optionsMenuOpened)&&(this._shouldRenderScopes=!
0);this._shouldRenderScopes&&(this._page.updateScopesHeaderView(this.getScopesHeade
rDataModel()),this._shouldRenderScopes=!
1)},c.prototype.getScopesBrandingDataModel=function(){if(typeof
n.getMsbBranding=="function"){var t=n.getMsbBranding();if(!!
t)return{msbBranding:t}}return null},c.prototype.renderBranding=function(){var
i=_ge("msbBrandingBar"),t;if(i){if(typeof
n.enableBrandingBar=="function"&&n.enableBrandingBar()&&(t=this.getScopesBrandingDa
taModel(),t===null||t===void 0?void 0:t.msbBranding))
{this._page.updateBrandingBarView(t);return}this._page.updateBrandingBarView(null)}
},c.prototype.createTourFlyout=function(){var
t=this,e=Object.keys(n.Host.getQuery().enabledDataSources),o=e.indexOf("MRU")!=-1?
this._storage.getItem("MRUNoItemsAvailable")=="1":!
0,u=[{id:"web_Tour",message:n.Host.getLocString("TourSearchText"),title:n.Host.getL
ocString("TourSearchTitle"),group:'document.createElement(\'search\').setAttribute(
"id", "search")',enabled:!0,icon:"WebSearch"},
{id:o?"gr37_TourWide":"gr37_Tour",message:n.Host.getLocString("TourQuickSearchText"
),title:n.Host.getLocString("TourQuickSearchTitle"),group:"gr37",enabled:n.shouldEn
ableQuickSearches(n.Host.getLanguage().toLowerCase()),icon:"QuickSearch"},
{id:"SNSC_Tour",message:n.Host.getLocString("TourSnipSearchText"),title:n.Host.getL
ocString("TourSnipSearchTitle"),group:"SNSC",enabled:n.shouldEnableSnipSearch(),ico
n:"VisualSearch"},
{id:"rewardsBadgeButton_Tour",message:n.Host.getLocString("TourRewardsText"),title:
n.Host.getLocString("TourRewardsTitle"),group:"rewardsBadgeButton",enabled:this._ms
RewardsViewModel.isRewardsEnabled(),icon:"RewardsTrophy"}],i=this._page.createFlyou
t("WWETour",this._storage),r,f;if(i==null)
{this._storage.removeItem("wweTourEnabled");n.setZeroInputDataSourcesForL1();n.Host
.refreshCurrentPane();_ge("root").classList.remove("overlayEnabled");this._storage.
removeItem("wweTourRefreshed");return}n.Host.bindAppHidden(function()
{t.removeTourFlyout();t._page.hideOverlayAreaView();t._page.hideFlyoutAreaView();t.
_page.updateScopesHeaderView(t.getScopesHeaderDataModel())});this._page.updateScope
sHeaderView(this.getScopesHeaderDataModel());i.dismissible(Number.MIN_VALUE,null);i
.repeat(Number.MAX_VALUE);i.icon("WebSearch").overlay(!0);u.forEach(function(n)
{n.enabled&&i.addMessage(n.message,n.title,_ge(n.group),n.id,n.icon)});r=u.filter(f
unction(n){return
n.enabled}).length;f=r==1;n.InstrumentationHelper.logClientInstEvent("Select","WWET
our",null,
{intendedFlyouts:r.toString()});i.target(_ge("groups")).button(n.Host.getLocString(
"WelcomeExpTourFinish"),function()
{t.removeTourFlyout();t._page.hideOverlayAreaView();t._page.updateScopesHeaderView(
t.getScopesHeaderDataModel())}).isLinkTextButton(!
1).showButton(f).show()},c.prototype.removeTourFlyout=function()
{this._storage.removeItem("wweTourRefreshed");this._storage.removeItem("wweTourEnab
led");_ge("root").classList.remove("overlayEnabled")},c.prototype.getInstItem=funct
ion(t,i){var
r=n.InstrumentedItem.getNonSuggestionInstrumentedItem(t,n.SyntheticQSCodesMaps.KVal
ues,n.SyntheticQSCodesMaps.HandoffsForNonSuggestions[t]);return
n.InstrumentationHelper.instrumentSyntheticInstrumentedItem(i,t,r),r},c.prototype.c
loseButtonClicked=function(t,i,r){var
u=n.SequenceNumberManager.getSequenceNumber(),f=this.getInstItem("CB",u);n.Instrume
ntationHelper.instrumentItemClick(t,f,u,null,i,r);SearchAppWrapper.CortanaApp.dismi
ssApp()},c.prototype.openMoreMenuDropDown=function(t,i,r,u){var
e=this,f=n.SequenceNumberManager.getSequenceNumber(),o=this.getInstItem("MMB",f);n.
InstrumentationHelper.instrumentItemClick(i,o,f,null,r,u);this._msRewardsViewModel&
&this._msRewardsViewModel.hide();this._menuFactory.showDropdownMenu(t,document.getE
lementByI
d(this._moreButton.id),1,function(){n.safeSetTimeout(function(){return
e.closeMoreMenuDropDown()},0,"closeMoreMenuDropDown")},r);this._moreMenuOpened=!
0;this.renderScopes()},c.prototype.closeMoreMenuDropDown=function()
{this._moreMenuOpened=!
1;this.renderScopes()},c.prototype.openOptionsMenuDropDown=function(t,i,r){var
f=this,e=n.RuntimeConfig.AlwaysWide?
1:2,u=n.SequenceNumberManager.getSequenceNumber(),o=this.getAdvancedOptions(u,e),s=
this.getInstItem("OMB",u);n.InstrumentationHelper.instrumentItemClick(t,s,u,null,i,
r);this._msRewardsViewModel&&this._msRewardsViewModel.hide();this._menuFactory.show
DropdownMenu(o,document.getElementById(this._optionsButton.id),2,function()
{n.safeSetTimeout(function(){return
f.closeOptionsMenuDropDown()},0,"closeOptionsMenuDropDown")},i);this._optionsMenuOp
ened=!0;this.renderScopes()},c.prototype.closeOptionsMenuDropDown=function()
{this._optionsMenuOpened=!1;this._shouldShowBuildNumber=!
1;this.renderScopes()},c.prototype.openUserProfileDropDown=function(t,i){var
u=this,r=n.SequenceNumberManager.getSequenceNumber(),f=this.getAccountOptionsForUse
rProfileButton(r),e=this.getInstItem("APB",r);n.InstrumentationHelper.instrumentIte
mClick(t,e,r,null,i,null);this._msRewardsViewModel&&this._msRewardsViewModel.hide()
;this._menuFactory.showDropdownMenu(f,document.getElementById(this._userProfileButt
on.id),2,function(){n.safeSetTimeout(function(){return
u.closeUserProfileDropDown()},0,"closeUserProfileDropDown")},i);this._userProfileMe
nuOpened=!0;this.renderScopes()},c.prototype.closeUserProfileDropDown=function()
{this._userProfileMenuOpened=!1;this.renderScopes()},c.prototype.cleanUp=function()
{_w.ReactDOM&&(_w.ReactDOM.unmountComponentAtNode(_ge("topResults")),_w.ReactDOM.un
mountComponentAtNode(_ge("groups")),_w.ReactDOM.unmountComponentAtNode(_ge("topHitH
eader")),_w.ReactDOM.unmountComponentAtNode(_ge("scopesHeader")));this._lastRendere
dTopHitHeader=null;this._page.updateTopHitHeaderView(null);this._page.updateScopesH
eaderView(null)},c.prototype.scopeNamesElements=function(t){var i=this;return
t.map(function(t){return i._scopeTiles.find(function(i){return
n.Scope[i.type]==t})}).filter(function(n){return!!
n})},c.prototype.getEffectiveScopeOrder=function(){var i,r,u,t,f;return!
this._scopeTiles||this._scopeTiles.length==0?[]:this._effectiveScopeOrder&&!
n.config.pathCompletionReplacesAll?this._effectiveScopeOrder.slice(0):
(n.RuntimeConfig.AlwaysWide?
(i=n.config.scopesOrderBeginAlwaysWide,r=n.config.scopesOrderLastAlwaysWide,u=n.con
fig.numberOfScopesToRenderAlwaysWide):
(i=n.config.scopesOrderBegin,r=n.config.scopesOrderLast,u=n.config.numberOfScopesTo
Render),t=[],i&&(n.config.pathCompletionReplacesAll&&(r=r.filter(function(n){return
n!
="PathCompletion"}),this._currentQuery&&this._currentQuery.canBePathCompletion&&(i=
i.map(function(n){return n=="All"?"PathCompletion":n}))),f=r?
this.scopeNamesElements(r):[],t=this.scopeNamesElements(i),t=t.slice(0,u-
f.length),t.push.apply(t,f)),this._effectiveScopeOrder=t,t.slice(0))},c.prototype.g
etHiddenScopeElements=function(t){return this._moreScopeTiles?
this._moreScopeTiles.filter(function(i){return t.find(function(n){return
n.type==i.type})==undefined&&n.Scope[i.type]!="PathCompletion"&&n.Scope[i.type]!
="All"}):[]},c.prototype.getScopeBarElements=function(){var u=this,t,i,r;return
this._scopeTiles?(t=this.getEffectiveScopeOrder(),i=t.some(function(n){return
n.enabled}),!
i&&this._selectedScope&&(n.config.pathCompletionReplacesAll&&n.Scope[this._selected
Scope.type]=="PathCompletion"||(r=this._scopeTiles.find(function(n){return
n.type==u._selectedScope.type}),t.push(r),i=!0)),t):
[]},c.prototype.isFeedbackEnabled=function(){return
n.isBingEnabled()},c.prototype.showFeedback=function(){typeof WindowsFeedbackForm!
="undefined"&&WindowsFeedbackForm.Show("");this._msRewardsViewModel&&this._msReward
sViewModel.hide()},c.prototype.getHeaderText=function(t,i){var
r,u;if(n.RuntimeConfig.FlatListWithoutGroups)return
null;if(r=n.getScopeDisplayName(i),r){if(this._topHitPresent)return
t==n.Scope.All||t==n.Scope.PathCompletion?
(u=n.config.quickMatchLabel?"QuickMatch":"BestMatch",n.Host.getLocString(u)):t==n.S
cope.Work?n.Host.getLocString("BestMatch"):
(u=n.config.quickMatchLabel?"QuickMatchFor":"BestMatchFor",n.Host.getLocString(u,r.
toLocaleLowerCase()));if(this._resultsPresent)return null;if(t!=n.Scope.All)return
r}return
n.Host.getLocString("BestMatch")},c.prototype.getEmptyResultsMessage=function(t,i,r
,u,f){var e;return n.RuntimeConfig.QfMode==5||n.RuntimeConfig.QfMode==9||t||!i&&!
r||u!
=n.Scope.Documents&&f.showUpsellOnSuggestionsList&&f.showUpsellOnSuggestionsList()?
["",""]:r?f.getEmptyZIMessages():[n.Host.getLocString("NoResults",
(e=this._currentQuery)===null||e===void 0?void
0:e.queryToFetch),""]},c.prototype.init=function(){var
r,u,i,t;if(n.initScopePrefixes(),this._scopeTiles=[],this._moreScopeTiles=[],n.Runt
imeConfig.ScopesAvailable){r=n.RuntimeConfig.AlwaysWide?
n.config.scopesOrderBeginAlwaysWide:n.config.scopesOrderBegin;this._allScopeButtonP
resent=n.contains(r,"All");for(u in n.ScopeConfig)
(i=parseInt(u),t=n.ScopeConfig[i],(t.prefixes||t.prefixesLocString||
t.scopeNameLocString)&&n.isScopeEnabled(i,t))&&((i!=n.Scope.All||
this._allScopeButtonPresent)&&this._scopeTiles.push(this.createScopeElement(i,t,!
1)),this._moreScopeTiles.push(this.createScopeElement(i,t,!
0)));this._moreScopeTiles.sort(function(t,i){return t.type==n.Scope.All?-
1:i.type==n.Scope.All?
1:t.text.localeCompare(i.text)});this._selectedScope&&this.selectScope(this._select
edScope.type);this._effectiveScopeOrder=null}},c.prototype.createScopeElement=funct
ion(t,i,r){var u=this;return{isScopeElement:!0,id:(r?"scope":"l1scope")
+t,type:t,enabled:!1,text:n.getScopeDisplayName(i),title:null,icon:t==n.Scope.All?
{content:"&#xE8A9",type:1}:i.icon,click:function(){return
u.clickHandler(t,"scopeBar")},selected:!1,tooltip:this.getScopeToolTip(t,!
1),isSelectable:!
0,isDotIconEnabled:this.isDotIconEnabled(t),dotIconColor:this.getDotIconColor(t)}},
c.prototype.getDotIconColor=function(t){var i="",r,u;switch(t){case
n.Scope.Work:r=n.Host.getWindowsTheme();u=r===2;i=u?
n.config.msbWorkScopeDotIndicatorDarkThemeColor:n.config.msbWorkScopeDotIndicatorCo
lor}return i},c.prototype.isDotIconEnabled=function(t){var i=!1;switch(t){case
n.Scope.Work:i=this.isWorkScopeDotIconEnabled()}return
i},c.prototype.isWorkScopeDotIconEnabled=function(){var r=!1,o,s,i;if(typeof
n.isMsbWorkScopeApplicable=="function"&&n.isMsbWorkScopeApplicable()&&n.config.msbW
orkScopeDotIndicatorEnabled){var u=new
Date,f=u.getDate(),e=this._storage.getItem(t);e?
(o=u.getTime(),i=JSON.parse(e),o>i.expiry?r=!1:i.currentDate===f?
r=i.clickCount<n.config.msbWorkScopeDotIndicatorPerDayFrequency:f>i.currentDate&&(i
.clickCount=0,i.currentDate=f,this.setWorkScopeDotIconInfoInLocalStorage(i),r=!0)):
(s=u.setDate(u.getDate()+(n.config.msbWorkScopeDotIndicatorExpiryInDays||
0)),i={expiry:s,clickCount:0,currentDate:f},this.setWorkScopeDotIconInfoInLocalStor
age(i),r=!0)}return
r},c.prototype.setWorkScopeDotIconInfoInLocalStorage=function(n)
{this._storage.setItem(t,JSON.stringify(n))},c.prototype.clickHandler=function(t,i,
r){var
h=n.getScopeDisplayName(n.ScopeConfig[t]),e,u=this._currentQuery,f=u.scope,o,s,c;if
(this._shouldRenderScopes=!0,this._scopeTiles.some(function(n){return n.type==f})||
(f=n.Scope.All),h&&f!=t)e=(t==n.Scope.All||
t==n.Scope.PathCompletion?"":h.toLocaleLowerCase()+": ")
+u.queryToFetch,this.innerRender(t,t,u,this._topHitPresent,this._resultsPresent,!
0,!1),o={query:this._currentQuery,topResults:[],groups:
[]},this._page.updateTopResultsView(o,!1),this._page.updateGroupsView(o,!
1);else{if(f==n.Scope.All||this._allScopeButtonPresent)
{this.setFocusInSearchBox("scope clickHandler
noop");return}e=u.queryToFetch;t=n.Scope.All;this.innerRender(t,t,u,this._topHitPre
sent,this._resultsPresent,!0,!
1)}s=n.Scope[t];c={Scope:s,Source:i,GroupSource:r&&r.source?
r.source.toString():undefined};n.InstrumentationHelper.logClientInstEvent("Select",
"ScopeChanged",null,c);f!
=t&&n.Host.reformulate(e,undefined,undefined,r);this.setFocusInSearchBox("scope
clickHandler "+s)},c.prototype.setFocusInSearchBox=function(t)
{n.Host.setFocusInSearchBox(null,t);var
i=n.getCurrentActiveElement();i&&i.blur()},c.prototype.isScopeElement=function(t)
{return t&&this._scopeTiles&&(this.isScopeButton(t.id)||
n.contains(this._scopeTiles,t))},c.prototype.isMenuElement=function(n){return
n&&this.isMenuButton(n.id)},c.prototype.isScopeButton=function(n){return
n==this._feedbackButton.id||n==this._rewardsBadgeButton.id||
n==this._userProfileButton.id||n==this._closeButton.id||
this.isMenuButton(n)},c.prototype.isMenuButton=function(n){return
n==this._moreButton.id||
n==this._optionsButton.id},c.prototype.getSelectableItems=function(){var
t=[],i;return
n.RuntimeConfig.ScopesAvailable&&(t=t.concat(this.getScopeSelectableItems())),i=thi
s._advancedOptionsScope.filter(function(n){return n.layout==0||
n.layout==6}),i.length>0&&(t=t.concat(i)),t},c.prototype.getSelectableItemsByGroup=
function(){var i=[],t=this.getScopeBarElements(),r,u,e,f;return
n.shouldSkipSelectedScope()&&this._selectedScope==t[0]&&(t=t.slice(1)),n.isWin11DSB
(this._currentQuery)||(i.push(t.slice(0,1)),r=t.findIndex(function(n){return
n.selected}),r>0?i.push(t.slice(r,r+1)):n.shouldSkipSelectedScope()||
(u=t.findIndex(function(n){return
n.enabled}),u>0&&i.push(t.slice(u,u+1)))),e=[this._moreButton,this._rewardsBadgeBut
ton,this._userProfileButton,this._feedbackButton,this._optionsButton,this._closeBut
ton],e.forEach(function(n)
{_ge(n.id)&&i.push([n])}),f=this._advancedOptionsScope.filter(function(n){return
n.layout==0||n.layout==6}),f.length>0&&i.push.apply(i,f.map(function(n)
{return[n]})),i},c.prototype.getScopeSelectableItems=function(){var
i=this.getScopeBarElements(),t=this._currentScopeTileIndex,c=i.length,u;if(n.isWin1
1DSB(this._currentQuery))return t<0&&(t=0),this.getSelectableItemsByGroup()
[t];if(n.shouldSkipSelectedScope()&&this._selectedScope==i[0]&&(i=i.slice(1),--t,--
c),t<0&&this._selectedScope&&!n.shouldSkipSelectedScope())return[this._sele
ctedScope];if(u=n.getCurrentActiveElement(),u)switch(u.id){case
f:return[this._moreButton];case r:return[this._feedbackButton];case
e:return[this._optionsButton];case o:return[this._rewardsBadgeButton];case
s:return[this._userProfileButton];case h:return[this._closeButton]}return(t<0||
t>=c)&&(t=0),i.slice(t,t+1)},c.prototype.getSelectedItem=function(){return
null},c.prototype.select=function(t){var
i=[].slice.call(this._scopesHeaderElement.getElementsByClassName("scope-
tile")),r=n.shouldSkipSelectedScope()?i.filter(function(n){return!
n.classList.contains("scope-tile--
selected")}):i;this._currentScopeTileIndex=r.indexOf(_ge(t.id));n.shouldSkipSelecte
dScope()&&(this._currentScopeTileIndex=i.indexOf(r[this._currentScopeTileIndex]))},
c.prototype.onAfterKeyDown=function(){return!
1},c.prototype.getSubstrateUpsellClickHandler=function(t){var r=this,i=function()
{n.Host.refreshCurrentPane();n.Host.setFocusInSearchBox(null,"SubstrateUpsell")};re
turn function(){return
r._accessTokenManager.promptAutheticateDialog(t,n.getSubstrateResourceOrScope(t),i,
i)}},c.prototype.getSubstrateUpsell=function(t,i,r){var
c=null,u="VerifyAccountToSearch",f=0,l="CloudSearch",a=["Verify"],e=null,o=[],v,s,h
;return r==0?
(v=n.getEffectiveScope(this._currentQuery),f=6,s=this._accessTokenManager?
this._accessTokenManager.getCachedAccountInfo(t):null,s&&o.push(s.accountUserName),
h=[n.Scope.People,n.Scope.Emails,n.Scope.Documents],n.config.accountVerificationInA
llScope&&h.push(n.Scope.All),n.contains(h,v)&&(o.length>0&&(u="VerifyAccount"),e=th
is._substrateUpsellDismiss),l=""):r==2&&(u=null,f=2,c={content:"&#xE9BE",type:2,nee
dsAccentColor:!
0},e=this._substrateUpsellDismiss,a=["VerifyAccountToSearch"]),this.createAdvancedO
ption(t==1?"COFA":"COOA",i,l,u,a,this.getSubstrateUpsellClickHandler(t),f,e,c,null,
o,"VerifyButton")},c.prototype.getOneDriveUpsell=function(t){return
this.createAdvancedOption("SDSC",t,null,null,["SeeResultsFromOneDrive"],function()
{n.Host.launchCortanaSignIn()},2,null,{content:"&#xE9BE",type:2,needsAccentColor:!
1})},c.prototype.getIndexingOption=function(t){var
i=n.config.controlPanelSearchSettings?function(){return
n.Host.launchSearchSettings()}:function(){return
n.LocalDataProvider.launchIndexingOptions(!1)};return
this.createAdvancedOption("OMIO",t,"",null,["OptionsMenuIndexing"],i,2,null,
{type:2,content:"&#xED52"})},c.prototype.getAdvancedOptionCssClass=function(n,t)
{return n==4?t?"menuInfo
selectedAccount":"menuInfo":n==5?"menuLabel":null},c.prototype.createContextMenuGro
up=function(n,t,i,r){var u=this.createAdvancedOption(n,t,null,i,null,null,5);return
u.groupItems=r,u.narratorText=u.message,u},c.prototype.createBuildVersionOption=fun
ction(){var
t=n.Host.getLocString("Build");return{id:"advancedOption"+this._advancedOptionsIdCo
unter++,selected:!1,title:t,message:undefined,text:t+":
"+n.config.snrVersion,instItem:undefined,click:undefined,layout:4,cssClass:this.get
AdvancedOptionCssClass(4),isSelectable:!1,subItems:undefined,isExpanded:!
1}},c.prototype.createDebugFallbackOption=function(t){return
this.createAdvancedOption(null,t,"FallbackBundleText",null,
["FallbackBundleText"],function(){return n.fallbackToPrepopulatedBundle(new
Error("Fallback button clicked"))},2,null,
{type:2,content:"&#xE81F"})},c.prototype.createAdvancedOption=function(t,i,r,u,f,e,
o,s,h,c,l,a){var y,p,v;return
t&&(y=this.getInstItem(t,i)),p="advancedOption"+this._advancedOptionsIdCounter+
+,c&&c.length==0&&(c=null),v={id:p,selected:!
1,title:n.Host.getLocString(r),message:u?
n.Host.getLocString.apply(n.Host,__spreadArrays([u],l?l:[])):null,text:f?
n.Host.getLocString(f[0]):null,instItem:y,click:undefined,layout:o,dismiss:s,icon:h
,cssClass:this.getAdvancedOptionCssClass(o),isSelectable:!!e||!!
c,subItems:c,buttonLabel:n.Host.getLocString(a),isExpanded:!c?undefined:!
1},v.narratorText=v.text,v.click=e?function(t,i)
{y&&n.InstrumentationHelper.instrumentItemClick(t,y,n.SequenceNumberManager.getSequ
enceNumber(),null,i,null);e(v)}:undefined,v},c.prototype.getAccountOptions=function
(t,i){var u=[];if(!this._accessTokenManager)return u;var
f=this._accessTokenManager.getCachedAccountInfo(0),e=this._accessTokenManager.getCa
chedAccountInfo(1),c=this._accessTokenManager.isMsaAvailable(),l=this._accessTokenM
anager.isAadAvailable(),o="menuItemWithButton
focusable",s="removeHover",h="highlight",r;return(f||e)&&!
i&&(r=this.createAdvancedOption(null,t,null,"ConnectedAccounts",null,null,5),r.cssC
lass=this.getAdvancedOptionCssClass(5),u.push(r),f&&n.isCloudSearchEnabledMsaCache&
&(r=this.createAdvancedOption(null,t,null,null,
["MicrosoftAccount"],null,4),r.message=f.accountUserName,r.narratorText=r.message,r
.cssClass=this.getAdvancedOptionCssClass(4),n.isSubstrateOutlookAccountConnected||
(r.cssClass+="
"+h),u.push(r),this._verifyAccountForMSARequired&&(r=this.createAdvancedOption(null
,t,null,"VerifyAccountAttention",null,this.getSubstrateUpsellClickHandler(0),4),r.c
ssClass=s,r.icon={type:2,content:"&#xE946"},u.push(r),r=this.createAdvancedOption("
OMVA",t,null,"VerifyButton",null,this.getSubstrateUpsellClickHandler(0),2),r.cssCla
ss=o,u.push(r))),e&&n.isCloudSearchEnabledAadCache&&(r=this.createAdvancedOption(nu
ll,t,null,null,
["AadAccount"],null,4),r.message=e.accountUserName,r.narratorText=r.message,r.cssCl
ass=this.getAdvancedOptionCssClass(4),u.push(r),n.isSubstrateO365AccountConnected||
(r.cssClass+="
"+h),this._verifyAccountForAADRequired&&(r=this.createAdvancedOption(null,t,null,"V
erifyAccountAttention",null,this.getSubstrateUpsellClickHandler(1),4),r.cssClass=s,
r.icon={type:2,content:"&#xE946"},u.push(r),r=this.createAdvancedOption("OMVA",t,nu
ll,"VerifyButton",null,this.getSubstrateUpsellClickHandler(1),2),r.cssClass=o,u.pus
h(r))),u.push(this.getMenuDividerOption()),r=this.createAdvancedOption("OMAC",t,nul
l,null,["ManageAccounts"],function(){return
n.Host.launchWindowsAccountSettings()},2,null,
{type:2,content:"&#xE716"}),r.cssClass=this.getAdvancedOptionCssClass(2),u.push(r))
,i&&this._accessTokenManager.getSelectedAccountInfo()||
(f&&(n.isCloudSearchEnabledMsaCache||!c)||
(r=this.createAdvancedOption("OMAC",t,null,null,n.isCloudSearchEnabledMsaCache?
["AddMicrosoftAccount"]:["EnableMsaSearch"],n.isCloudSearchEnabledMsaCache?
function(){return n.Host.launchWindowsAccountSettings()}:function(){return
n.Host.launchSearchPermissions()},2,null,
{type:2,content:n.isCloudSearchEnabledMsaCache?"&#xE8FA":"&#xE9BE"}),r.cssClass=thi
s.getAdvancedOptionCssClass(2),u.push(r)),e&&(n.isCloudSearchEnabledAadCache||!l)||
(r=this.createAdvancedOption("OMAC",t,null,null,n.isCloudSearchEnabledAadCache?
["AddAadAccount"]:["EnableAadSearch"],n.isCloudSearchEnabledAadCache?function()
{return n.Host.launchWindowsAccountSettings()}:function(){return
n.Host.launchSearchPermissions()},2,null,
{type:2,content:n.isCloudSearchEnabledAadCache?"&#xE8FA":"&#xE9BE"}),r.cssClass=thi
s.getAdvancedOptionCssClass(2),u.push(r))),u},c.prototype.getUserProfileButtonData=
function(){var
r=this,u,i,t=this._accessTokenManager.getSelectedAccountInfo(),f;return t?
(i=t.accountProviderAuthority=="consumers"?
0:1,u=this._userProfilesCache[t.accountUserName],!u)?
(f=this._substrateProfilePictureProvider.getPersonDefaultIcon(t.accountUserName),th
is._userProfilesCache[t.accountUserName]=f,this._accessTokenManager.getAccount(i,i=
=1?"https://outlook.office.com/":n.config.useCobaltCSS?"https://
outlook.office.com/M365.Access":"https://outlook.office.com/User.ReadWrite",!1,!
0,function(n){if(n&&n.Token){var
u=r._substrateProfilePictureProvider.getProfilePictureIconForToken(i,n.Token,t.acco
untUserName);u&&u(1,function(n)
{n&&(r._userProfilesCache[t.accountUserName]=n,r.renderScopes())})}}),
[f,t.accountUserName]):[u,t.accountUserName]:
[null,null]},c.prototype.getAccountOptionsForUserProfileButton=function(t){var
l=this,r,i,u,y,h,e,c,p;if(!this._accessTokenManager)return[];var
a="removeHover",v="menuItemWithButton
focusable",o=this._accessTokenManager.getAllAvailableAccounts(0),s=this._accessToke
nManager.getAllAvailableAccounts(1),w=this._accessTokenManager.getCachedAccountInfo
(0),b=this._accessTokenManager.getCachedAccountInfo(1),f=o.concat(s);if(o.length+s.
length==0)return[];if(r=[],u=this._accessTokenManager.getSelectedAccountInfo(),u&&(
f=f.filter(function(n){return n.accountUserName!
=u.accountUserName}),n.config.useCobaltCSS||
(i=this.createAdvancedOption(null,t,null,"Accounts",null,null,5),i.cssClass=this.ge
tAdvancedOptionCssClass(5),r.push(i)),i=this.createAdvancedOption(null,t,null,null,
u.accountProviderAuthority=="consumers"?["MicrosoftAccount"]:
["AadAccount"],null,4,null,this._userProfilesCache[u.accountUserName]),i.message=u.
accountUserName,i.narratorText=i.message,i.cssClass=this.getAdvancedOptionCssClass(
4,u),i.isSelectedAccount=u&&n.config.useCobaltCSS,r.push(i),w&&n.isCloudSearchEnabl
edMsaCache&&this._verifyAccountForMSARequired&&(i=this.createAdvancedOption(null,t,
null,"VerifyAccountAttention",null,this.getSubstrateUpsellClickHandler(0),4),i.cssC
lass=a,i.icon={type:2,content:"&#xE946"},r.push(i),i=this.createAdvancedOption("OMV
A",t,null,"VerifyButton",null,this.getSubstrateUpsellClickHandler(0),2),i.cssClass=
v,r.push(i)),b&&n.isCloudSearchEnabledAadCache&&this._verifyAccountForAADRequired&&
(i=this.createAdvancedOption(null,t,null,"VerifyAccountAttention",null,this.getSubs
trateUpsellClickHandler(1),4),i.cssClass=a,i.icon={type:2,content:"&#xE946"},r.push
(i),i=this.createAdvancedOption("OMVA",t,null,"VerifyButton",null,this.getSubstrate
UpsellClickHandler(1),2),i.cssClass=v,r.push(i))),f.length>0)for(r.push(this.getMen
uDividerOption()),y=function(u)
{i=h.createAdvancedOption("APPA",t,null,null,u.accountProviderAuthority=="consumers
"?["MicrosoftAccount"]:["AadAccount"],function()
{l._accessTokenManager.setSelectedAccount(u);n.Host.notifyAccountSelected(u);l._men
uFactory.dismiss()},0,null,
{type:2,content:"&#xE77B"});i.message=u.accountUserName;i.narratorText=i.message;i.
cssClass=h.getAdvancedOptionCssClass(0);r.push(i)},h=this,e=0,c=f;e<c.length;e+
+)p=c[e],y(p);return
r.push(this.getMenuDividerOption()),i=this.createAdvancedOption("OMAC",t,null,null,
["ManageAccounts"],function(){return n.Host.launchWindowsAccountSettings()},2,null,
{type:2,content:"&#xE716"}),i.cssClass=this.getAdvancedOptionCssClass(2),r.push(i),
o&&(n.isCloudSearchEnabledMsaCache||!this._accessTokenManager.isMsaAvailable())||
(i=this.createAdvancedOption("OMAC",t,null,null,n.isCloudSearchEnabledMsaCache?
["AddMicrosoftAccount"]:["EnableMsaSearch"],n.isCloudSearchEnabledMsaCache?
function(){return n.Host.launchWindowsAccountSettings()}:function(){return
n.Host.launchSearchPermissions()},2,null,
{type:2,content:n.isCloudSearchEnabledMsaCache?"&#xE8FA":"&#xE9BE"}),i.cssClass=thi
s.getAdvancedOptionCssClass(2),r.push(i)),s&&(n.isCloudSearchEnabledAadCache||!
this._accessTokenManager.isAadAvailable())||
(i=this.createAdvancedOption("OMAC",t,null,null,n.isCloudSearchEnabledAadCache?
["AddAadAccount"]:["EnableAadSearch"],n.isCloudSearchEnabledAadCache?function()
{return n.Host.launchWindowsAccountSettings()}:function(){return
n.Host.launchSearchPermissions()},2,null,
{type:2,content:n.isCloudSearchEnabledAadCache?"&#xE8FA":"&#xE9BE"}),i.cssClass=thi
s.getAdvancedOptionCssClass(2),r.push(i)),r},c.prototype.getMenuDividerOption=funct
ion(){return{id:null,selected:!1,title:"",message:null,isSeparator:!
0,text:"",instItem:null,click:null,layout:3,isSelectable:!
1}},c.prototype.addZiCustomization=function(t,i,r){var
h=this,f,c,u,o,e,s,v,y;if(r===void 0&&(r=!
0),n.config.enableSearchHomeCustomization&&this._currentQuery.isSearchHomeZI&&this.
_currentQuery.scope==n.Scope.All){f={};for(c in
this._currentQuery.availableDataSources)if(u=this._currentQuery.availableDataSource
s[c],u&&u.suggestionGroupToggler){if(typeof u.groupType!="number")throw new
Error("missing groupType declaration for suggestionGroupToggler");f[u.groupType]||
(f[u.groupType]=u.suggestionGroupToggler)}if(o=this._currentQuery.staticGroupOrder?
this._currentQuery.staticGroupOrder.filter(function(n){return!!
f[n]}):Object.keys(f).map(function(n){return+n}),o.length!=0){var
l=[],p=function(t){var
r=f[t],u=r.isHidden(),e=a.createAdvancedOption("OMZI",i,null,null,[],function()
{r.toggle(!
u);h._menuFactory.dismiss();n.Host.refreshCurrentPane()},2,null,null,null),o=n.getG
roupTitleAndNarratorText(a._currentQuery,t,null,!
1).title;e.text=n.Host.getLocString(u?"ShowSomething":"HideSomething",o);l.push(e)}
,a=this;for(e=0,s=o;e<s.length;e+
+)v=s[e],p(v);y=this.createAdvancedOption(null,i,null,null,
["CustomizeSearchHome"],function(n){return h._menuFactory.showSubMenu(n)},2,null,
{type:2,content:"&#xE70F"},l);r&&t.push(this.getMenuDividerOption());t.push(y)}}},c
.prototype.addSinglepPaneOptions=function(t,r){var
e=this,o=this.getScopeBarElements(),s=this.getHiddenScopeElements(o).filter(functio
n(t){return t.type!=n.Scope.All}).map(function(n){var t=n;return
t.layout=0,t}),u,f;t.push(this.createContextMenuGroup(null,r,"MoreScopesListToolTip
",s));t.push(this.getMenuDividerOption());u=[];i.authenticationManager.getAllSearch
WebAccountsAsync?
(this._accessTokenManager.getSelectedAccountInfo()&&n.config.userProfileButtonEnabl
ed||(f=this.getAccountOptions(r),u.push(this.createAdvancedOption(null,r,null,null,
["ConnectedAccounts"],null,2,null,
{type:2,content:"&#xE716"},f))),u.push(this.createAdvancedOption("OMSS",r,null,null
,["SearchSettings"],function(){return n.config.controlPanelSearchSettings?
n.Host.launchSearchPermissions():n.Host.launchSearchSettings()},2,null,
{type:2,content:"&#xE713"}))):(n.isCloudSearchEnabledAadCache||
n.isCloudSearchEnabledMsaCache)&&this.addCloudSearchUpsells(u,r,2);u.push(this.getI
ndexingOption(r,1));this.addZiCustomization(u,r,!
1);t.push(this.createContextMenuGroup(null,r,"OptionsButtonToolTip",u));this.isFeed
backEnabled()&&(t.push(this.getMenuDividerOption()),t.push(this.createAdvancedOptio
n("FB",r,null,null,["FeedbackButtonText"],function(){return
e.showFeedback()},2,null,
{type:2,content:"&#xED15"},null)))},c.prototype.getAdvancedOptions=function(t,r)
{var f=this,u=[],e;return
r==1&&(i.authenticationManager.getAllSearchWebAccountsAsync&&(u.push.apply(u,this.g
etAccountOptions(t,n.config.userProfileButtonEnabled)),u.push(this.createAdvancedOp
tion("OMSS",t,null,null,["SearchSettings"],function(){return
n.config.controlPanelSearchSettings?
n.Host.launchSearchPermissions():n.Host.launchSearchSettings()},2,null,
{type:2,content:"&#xE713"}))),u.push(this.getIndexingOption(t,r)),this.isFeedbackEn
abled()&&n.isTwoPanesZIEnabled()&&(u.push(this.getMenuDividerOption()),e=this.creat
eAdvancedOption("FB",t,null,null,["FeedbackButtonText"],function(){return
f.showFeedback()},2,null,
{type:2,content:"&#xED15"},null),e.cssClass=this.getAdvancedOptionCssClass(2),u.pus
h(e)),this.addZiCustomization(u,t)),r==2&&this.addSinglepPaneOptions(u,t),r==0&&(n.
isCloudSearchEnabledAadCache||
n.isCloudSearchEnabledMsaCache)&&this.addCloudSearchUpsells(u,t,r),r!
=2&&n.config.troubleshootButton&&u.push(this.getMenuDividerOption()),n.config.troub
leshootButton&&(r==1||r==2)&&u.push(this.createAdvancedOption("OMTS",t,null,null,
["Troubleshoot"],function(){return
n.Host.launchUri("https://aka.ms/fixsearch")},2,null,
{type:2,content:"&#xE90F"},null)),(n.MockUrlParameters===null||
n.MockUrlParameters===void 0?void 0:n.MockUrlParameters.isTest)||!
this._optionsWindow||r!=1&&r!=2||u.push(this.createAdvancedOption(null,t,null,null,
["OptionsWindowButton"],function()
{f._optionsWindow.showOptionsWindow();f._menuFactory.dismiss()},2,null,
{type:2,content:"&#xE90F"},null)),r!
=0&&n.TestHookUrlParameters&&n.config.debugFallbackScenario&&u.push(this.createDebu
gFallbackOption(t)),n.config.snrVersion&&(r==1||
r==2)&&(this._shouldShowBuildNumber||n.TestHookUrlParameters||typeof
n.getIsMsbInternalTenant=="function"&&n.getIsMsbInternalTenant())&&u.push(this.crea
teBuildVersionOption()),u},c.prototype.addCloudSearchUpsells=function(t,i,r){var
e,f,u;if((this.addMsbUpsell(t,i,r),e=n.substrateProvidersEnabled(),r==0||
r==2)&&(f=[n.Scope.People,n.Scope.Emails,n.Scope.Documents],n.config.accountVerific
ationInAllScope&&f.push(n.Scope.All),r!=0||this._selectedScope!
=null&&n.contains(f,this._selectedScope.type)))if(e)
{if(this._upsellGotDismissed&&this._selectedScope&&n.contains(f,this._selectedScope
.type)&&r==0)return;u=n.AccessTokenManager===null||n.AccessTokenManager===void 0?
void 0:n.AccessTokenManager.getWindowsAccountType();(u==1||
u==4)&&this._verifyAccountForAADRequired&&t.push(this.getSubstrateUpsell(1,i,r));
(u==2||
u==4)&&this._verifyAccountForMSARequired&&t.push(this.getSubstrateUpsell(0,i,r))}el
se
n.isBingEnabled()&&n.isCortanaEnabledCache&&t.push(this.getOneDriveUpsell(i))},c.pr
ototype.addMsbUpsell=function(t,i,r){var
c=this;if(n.config.msbAccountVerificationInSearchHome&&n.msbEnabledForQuery(null)&&
r==0&&this._selectedScope!
=null&&this._selectedScope.type==n.Scope.All&&this._currentQuery!
=null&&this._currentQuery.isSearchHomeZI){var f=!
1,e="MsbVerifyAccount",o=[],s=n.getStoredMsbTenantName(this._storage);s&&(f=!
0,e="MsbReverifyAccount",o=[s]);var
u={isReverify:f,WSB_SessinRandom:n.Host.createGuid(),WSB_Position:r,WSB_SequenceNum
ber:i,WSB_ScopeType:this._selectedScope.type},l=function(){var t=function()
{_w.bfbWsbTel&&bfbWsbTel.logValue("VerifyAccountSuccess","",u);n.Host.refreshCurren
tPane();n.Host.setFocusInSearchBox(null,"MsbAadUpsell")},i=function()
{_w.bfbWsbTel&&bfbWsbTel.logValue("VerifyAccountFailed","",u);n.Host.refreshCurrent
Pane();n.Host.setFocusInSearchBox(null,"MsbAadUpsell")};_w.bfbWsbTel&&bfbWsbTel.log
Value("VerifyAccountDialogShown","",u);c._accessTokenManager.promptAutheticateDialo
g(1,"9ea1ad79-fdb6-4f9a-8bc3-
2b70f96e34c7",t,i)},h=this.createAdvancedOption("MSBA",i,null,e,null,l,6,null,
{type:2,content:"&#xE814"},null,o,"VerifyButton");h.cssClass="msb-aad-
upsell";t.push(h);_w.bfbWsbTel&&bfbWsbTel.logValue("VerifyAccountUpsellAdded","",u)
}},c}();n.HeaderFooterViewModel=c}(WSB||(WSB={}));__assign=this&&this.__assign||
function(){return __assign=Object.assign||function(n){for(var
t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in
t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return
n},__assign.apply(this,arguments)},function(n){function t(n,t){var
i=HitHighlightingParser.removeMarkers(n.text),r;!
i.includes(t.queryToFetch)&&i.toLowerCase().startsWith(t.queryToFetch.toLowerCase()
)&&(r=t.queryToFetch+i.substr(t.queryToFetch.length),n.text=HitHighlightingParser.a
ddMarkers(r,t.queryToFetch));!
n.query.includes(t.queryToFetch)&&n.query.toLowerCase().startsWith(t.queryToFetch.t
oLowerCase())&&(n.query=t.queryToFetch+n.query.substr(t.queryToFetch.length))}funct
ion i(i,r,u,f,e,o,s){var
c,h;if(i.actionUri=f,i.confidence=o,i.source=s,i.handoffType==4)if(c=i.query.toLowe
rCase()==r.queryToFetch.toLowerCase(),i.updateFromQuery=function(t){return c?
(i.query=t.queryToFetch,i.text=HitHighlightingParser.addMarkers(i.query,t.queryToFe
tch),i.narratorText=n.getNarratorText(i),!0):!
1},h=n.parseTaskFrame(e),h)i.isReformulation=!0,i.click=function(){return
n.safeSetTimeout(function(){return n.Host.reformulate(i.query,h)},0,"Cat1Click-
Reformulation")};else return!1;else i.classNames.push("action"),i.click=function()
{return n.Host.launchCat1(i.query,f,e)};return
i.icon={type:3},t(i,r),i.narratorText=n.getNarratorText(i),i.type!
="CSK"&&(i.getMruData=function(){return
__assign(__assign({},n.getMruWebSuggestionData(i)),
{annotation:i.primaryMetadata,actionUri:f,taskFrame:e,confidence:o,source:s})}),!
0}function o(i,r,u,e,o,s,h,c,l,a,v){if(i.isAnswer=!0,i.htmlContent=e&&e.Content?
e.Content.HTML:null,i.segments=c,i.htmlContent){var
y=JsonInject.GetResourceKeys([e]);y&&(i.executeScript=function(){return
JsonInject.WriteAfterContentResources(JsonInject.FilterResources(a,y))})}s&&(i.seco
ndaryIcon={content:s,type:0});i.text.includes(HitHighlightingParser.startMarker)||
(i.text=HitHighlightingParser.addMarkers(i.text,r.queryToFetch));i.htmlContent||
o&&(i.primaryMetadata=o,i.additionalInfoText=" - "+o);i.handoffType==10?
(i.classNames.push("action"),t(i,r),i.icon={type:3},i.click=function(){return
n.Host.launchCat2or3a(i.query,l)},i.allowedInGroups=!i.htmlContent):
(f(i,r),i.click=function(){return
n.Host.launchSearch(i.query,v.getSearchUrl(r.fullPartialQuery,i.query,i.type,h),!
1)},i.allowedInGroups=i.secondaryIcon?!!i.additionalInfoText:!
i.htmlContent,i.getMruData=function(){return
n.getMruUrlSuggestionData(i,h)});i.narratorText=n.getNarratorText(i)}function
r(t,i,r,u,e,o){f(t,i);i.queryToFetch||
(t.text=HitHighlightingParser.addMarkers(t.text));t.click=function(){return
n.Host.launchSearch(t.query,e.getSearchUrl(i.fullPartialQuery,t.query,t.type,u,t.ha
ndoffType,i.isSearchHomeZI&&n.mapOSFormCode("WSHBSH")),t.useRaf)};t.narratorText=n.
getNarratorText(t);t.getMruData=function(){return
n.getMruUrlSuggestionData(t,u)};t.type=="HS"&&n.setExtraVerbs(t,function(){var
i=[{verb:"ManageSearchHistory",displayName:n.Host.getLocString("ManageSearchHistory
"),executeSync:function(){return n.Host.launchPrivacyPortal()},icon:
{content:"&#xE81C",type:2}}];return
n.config.removeSuggUrl&&i.unshift({verb:"RemoveFromWebHistory",displayName:n.Host.g
etLocString("RemoveFromWebHistory"),executeSync:function(){return o(t.text)},icon:
{content:"&#xE711",type:2}}),i},!0)}function u(t,i,r,u){t.tooltip=i.isSearchHomeZI?
t.text+"\n\n"+u:u+"\n\
n"+HitHighlightingParser.removeMarkers(t.primaryMetadata);n.isValidIcon(t.icon)||
(t.getIcon=n.Host.getEdgeIcon);t.url=u;t.click=function(){return
n.Host.launchUri(u)};t.narratorText=n.getNarratorText(t,n.Host.getLocString("Direct
NavSuggestion"));t.getMruData=function(){return
n.getMruUrlSuggestionData(t,u)}}function f(t,i){n.isValidIcon(t.icon)||
(t.icon=t.type=="HS"?{content:"&#xE81C",type:2}:t.handoffType===13?
{content:"&#xEB9F",type:2}:t.handoffType===14?
{content:"&#xE714",type:1}:n.getSearchSuggestionIcon());t.primaryMetadata||
t.secondaryIcon||t.htmlContent||t.additionalInfoText||
(t.primaryMetadata=t.handoffType===13?
n.Host.getLocString("SearchForWebImages"):t.handoffType===14?
n.Host.getLocString("SearchForWebVideos"):n.getWebSuggestionAnnotation(n.msbEnabled
ForQuery(i)))}var e=function(){function t(t,i,r,u){var
f=this;this._navigationHelper=t;this._temporaryMessageHandler=i;this._accessTokenMa
nager=r;this._previousKeystrokeCache=u;this.removeBingHistorySuggestionCallBack=fun
ction(t){f._accessTokenManager?
f._accessTokenManager.getAccount(0,n.getBingResourceOrScope(0),!1,!0,function(n)
{if(n&&n.Token){var i={};i["X-Search-
RPSToken"]=n.Token;f.sendRemoveBingHistorySuggestionRequest(t,i)}}):f.sendRemoveBin
gHistorySuggestionRequest(t,null)}}return t.prototype.parse=function(n,t,i,r,u,f,e)
{this.parseOnlineSuggestions(n,t,r,u,f,e,i)},t.prototype.parseOnlineSuggestions=fun
ction(t,i,r,u,f,e,o){var l=this,s,c,b;if(!r)
{n.isDataSourceEnabled("Web",t)&&f("Web",
[],null);n.isDataSourceEnabled("OSTMA",t)&&f("OSTMA",
[],null);n.isDataSourceEnabled("QS",t)&&f("QS",
[],null);return}r&&r.ELToken&&(n.Host.setElToken(r.ELToken),r.LC==1&&n.Host.sendElT
oken());var
a=[],v=[],y=[],h=[],p=[],w=n.isDataSourceEnabled("Web",t);n.safeExecute(function()
{for(var e,s=function(u){var s=u.Attributes,c=s.appId,f,e;if(c)return
v.push(u),c.split(";").forEach(function(t){n.contains(h,t)||
h.push(t)}),"continue";if(f=s.settingId,f)return
y.push(u),p.push(f),"continue";w&&(e=n.safeExecute(function(){return
l.parseOnlineSuggestion(t,u,i,r.Resources,o)},"parseOnlineSuggestion"),e&&a.push(e)
)},u=0,f=r.Suggestions;u<f.length;u+
+)e=f[u],s(e)},"parseOnlineSuggestions");w&&(s=null,c=null,r.RankingSignals&&(s=n.s
afeExecute(function(){return
n.parseWebEngagementSignals(r.RankingSignals)},"parseWebEngagementSignals"),n.isL2(
t)||(c=n.safeExecute(function(){return
n.parseWebSuppressionSignals(r.RankingSignals,t)},"parseWebSuppressionSignals"))),t
his._previousKeystrokeCache&&this._previousKeystrokeCache.updateWebSignalsData(t.qu
eryToFetch,s),b={rankingSignals:r.RankingSignals,engagementSignals:s,suppressedGrou
ps:c,webTopResultRoutingType:r.PrefixRoutingType},f("Web",a,b));n.lookupById(t,"OST
MA",h,v,function(n){return n.Attributes.appId.split(";")},"QS",p,y,function(n)
{return n.Attributes.settingId},u,i,f,e,function(n,u,f,e){return
l.parseIdLookupResponse(r,t,i,n,u,f,e)},null,null,null,null)},t.prototype.parseIdLo
okupResponse=function(t,r,u,f,e,o,s){var h=this,c,l;if(o.length!=1)
{c=n.safeExecute(function(){return
h.parseOnlineSuggestion(r,f,u,t.Resources,e)},"parseOnlineSuggestion
"+e);c&&s.push(c);return}l=function(t){var e=f.Attributes;return
h.compliesWithMinVersion(e.appMinVersion,t.deviceItem.version)?
(t.appContext=e.appContext,h.setRankingSignals(t,f),f.Text&&e.query&&(!
n.isApp(t.type)||
t.appContext)&&(t.text=f.Text,t.query=e.query),f.SecondaryText&&(t.primaryMetadata=
f.SecondaryText),t.handoffType==5)?
i(t,r,u,e.actionUri,e.taskFrame,parseFloat(e.confidence),parseInt(e.source)):!0:!
1};n.safeExecute(function(){return
n.parseLocalSuggestion(r,o[0],e,u,h._temporaryMessageHandler,f.Attributes.stype,s,l
)},"parseLocalSuggestion
"+e)},t.prototype.parseOnlineSuggestion=function(t,f,e,s,h){var
d=this,l=f.Attributes,a=l.stype,y,c,v;if(a=="CS"||l.appId||l.settingId)return
null;if(y=l.isAnswer==="1"?l.url||l.vertical?
n.verticalToHandoffType(l.vertical):10:l.taskFrame?
l.actionUri.startsWith("action://FindMyStuff/")?4:5:a=="MD"||a=="ML"?
1:n.verticalToHandoffType(l.vertical),c=n.createSuggestion(t,f.Text,null,n.getIconF
romOnlineResponse(f),a,l.query,n.InstrumentedItem.createInstrumentedItem(e,a),y,e,!
1),c.primaryMetadata=f.SecondaryText,this.setRankingSignals(c,f),c.autoOpenPreviewP
aneWhenOnTopHit=l.openPP==="1",l.isAnswer==="1"){if(!l.url&&!
n.isCortanaEnabledCache)return
null;c.signals=f.Signals;o(c,t,e,f.InstantAnswer,l.additionalInfoText,l.secondaryIc
onUrl,l.url,l.segments,l.taskFrame,s,this._navigationHelper);l.noHeightRestriction=
=="1"&&c.classNames.push("noHeightRestriction");c.reactKey=a+l.url}else
if(l.taskFrame){if(!n.isCortanaEnabledCache||!
i(c,t,e,l.actionUri,l.taskFrame,parseFloat(l.confidence),parseInt(l.source)))return
null;c.reactKey=a+l.taskFrame}else{if(!l.url)return
null;if(c.autoOpenPreviewPaneWhenOnTopHit=l.openPP==="1",c.reactKey=a+t.queryToFetc
h+l.url,c.type=="MD"||c.type=="ML")v=n.prettyPrintUrl(l.query,t.queryToFetch,!0),v!
=c.query&&(c.query=v,c.text=t.queryToFetch?
HitHighlightingParser.addMarkers(v,t.queryToFetch):v),c.primaryMetadata&&!
c.primaryMetadata.includes(HitHighlightingParser.startMarker)&&(c.primaryMetadata=H
itHighlightingParser.addMarkers(c.primaryMetadata,t.queryToFetch)),u(c,t,e,l.url);e
lse{if(n.queryLooksLikeUrl(c.query))return
null;r(c,t,e,l.url,this._navigationHelper,this.removeBingHistorySuggestionCallBack)
}}if(!n.isValidSuggestion(c,"parseOnlineSuggestion"))return null;var
g=["Actor","City","Place","Country","State","Animal","Attraction","Food","Artist","
People"],nt=["Song","TvShow","Movie"],p=c.segments,w=p?p.split(","):
[],b=w.some(function(t){return n.contains(g,t)}),k=w.some(function(t){return
n.contains(nt,t)});return(f.ChildSuggestions||b||
k)&&(c.calculateChildSuggestions=function(){return
d.calculateRelatedSuggestions(c,t,f,h,b,k)}),n.config.directNavPreviewPane&&c.type=
="MD"&&c.url&&(c.getIcon=n.getFaviconUrlForRawUrl(c.url,64,64,1.5),c.previewPaneTyp
e=2),c},t.prototype.setRankingSignals=function(n,t){var
i=t.Attributes;n.hc=i.hc==="1";n.highConfidenceSuggestionScore=+i.hcs;n.highConfide
nceMetaSuggestionScore=t.HighConfidenceMetaSuggestionScore;n.prefetchConfidenceScor
e=t.PrefetchConfidenceScore;n.suggestionLogMeta=i.lm},t.prototype.compliesWithMinVe
rsion=function(n,t){var r,u,i,f,e;if(!n)return!0;if(!t)return!
1;for(r=n.split("."),u=t.split(".");r.length>u.length;)u.push("0");for(i=0;i<r.leng
th;++i){if(f=u[i],e=r[i],f<e)return!1;if(f>e)return!0}return!
0},t.prototype.sendRemoveBingHistorySuggestionRequest=function(t,i){var
u=this,r;t=HitHighlightingParser.removeMarkers(t);r=n.config.removeSuggUrl.replace(
"%7b0%7d",encodeURIComponent(t)).replace("%7bSID
%7d",sj_cook.get("_SS","SID"));n.fetchUrlJson(r,i,null,function(i)
{i&&i.success&&(n.Host.refreshCurrentPane(),n.safeSetTimeout(function(){return
u._temporaryMessageHandler.showTemporaryMessage(n.Host.getLocString("RemoveFromWebH
istoryConfirmation",t))},250,"removeBingHistorySuggestion"))})},t.prototype.addRela
tedSuggestion=function(t,i,u,f,e,o,s){var h=n.createSuggestion(i,f,null,e,o,t?
t.Query:u.query,n.InstrumentedItem.createInstrumentedItem(u.sequenceNumber,o),s,u.s
equenceNumber,!1,null,null,!
0);h.groupType=n.GroupType.Related;h.parent=u;h.isChild=!0;h.tooltip=t?
t.SecondaryText:null;h.rankingScore=t?t.RankingScore:0;h.category=t?
t.Category:null;h.isAnswer=!0;r(h,i,u.sequenceNumber,t?
t.Url:null,this._navigationHelper,this.removeBingHistorySuggestionCallBack);h.prima
ryMetadata=null;h.reactKey=o+f+(t?
t.Category+t.SecondaryText:"");n.isValidSuggestion(h,"calculateRelatedSuggestions")
&&u.childSuggestions.push(h)},t.prototype.calculateRelatedSuggestions=function(t,i,
r,u,f,e){var
s,h,o;if(t.childSuggestions=[],r.ChildSuggestions)for(s=0,h=r.ChildSuggestions;s<h.
length;s+
+)o=h[s],this.addRelatedSuggestion(o,i,t,o.Text,n.getIconFromOnlineResponse(o),o.Ty
pe,0);f&&this.addRelatedSuggestion(null,i,t,n.Host.getLocString("Images"),null,"EIM
",13);e&&this.addRelatedSuggestion(null,i,t,n.Host.getLocString("Videos"),null,"EVI
",14);t.childSuggestions.length>0&&n.InstrumentationHelper.instrumentDataSource(t.s
equenceNumber,u,t.childSuggestions,null)},t}
();n.OnlineSuggestionsParser=e;n.adjustCasing=t;n.setCat1SuggestionProperties=i;n.s
etWebSearchSuggestionProperties=r;n.setUrlSuggestionProperties=u}(WSB||
(WSB={}));__assign=this&&this.__assign||function(){return __assign=Object.assign||
function(n){for(var t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in
t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return
n},__assign.apply(this,arguments)},function(n){function p(n){return n?[n]:
[]}function ut(n){if(n){var t=n.lastIndexOf(".");if(t>=0)return
n.substring(t)}return""}function ft(t){var i=t?new Date(t):null;return
n.isValidDate(i)?i:null}function et(t){if(t){var
i=n.getCurrentDate();if(i.getDate()==t.getDate()&&i.getMonth()==t.getMonth()&&i.get
FullYear()==t.getFullYear
())return t.toLocaleTimeString(n.uiLanguageCache,
{hour:"numeric",minute:"numeric"})}return null}function r(t,r,u,e,o){var
nt,tt,p,it,a,w,v,h,c,s,rt,y,b;if(o===void 0&&(o=!1),!
o&&e.extensionLC&&SearchAppWrapper.CortanaApp.hideFileExtensions){var
d=e.extensionLC.length,l=e.query,g=l.toLocaleLowerCase();g.endsWith(e.extensionLC)&
&(nt=r?HitHighlightingParser.addMarkers(l,r):l,tt=n.config.disableSyntaxHighlight?
r===""||!
e.extensionLC.toLocaleLowerCase().startsWith("."+r.toLocaleLowerCase()):nt.toLocale
LowerCase().endsWith(e.extensionLC),tt&&(e.query=l.substring(0,l.length-
d),p=e.text.toLocaleLowerCase(),it=HitHighlightingParser.removeMarkers(p),g==it&&(a
=p.lastIndexOf(e.extensionLC),a>0&&(e.text=e.text.substring(0,a)
+e.text.substr(a+d)))))}for(e.lastModifiedDate&&(e.lastModifiedDateString=e.lastMod
ifiedDate.toLocaleString(n.uiLanguageCache,
{day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"})),e.
lastAccessDate&&(e.lastAccessDateString=e.lastAccessDate.toLocaleString(n.uiLanguag
eCache,
{day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"})),e.
primaryMetadata=e.sourceForGroup&&e.sourceForGroup!=1?
n.getGroupSourceDisplayName(e.sourceForGroup):e.itemTypeDisplayName,e.explanation?
e.additionalInfoText=e.explanation:t.isSearchHomeZI&&n.config.msbQws3sSugHideTimest
amp?
e.additionalInfoText=null:t.isSearchHomeZI&&(e.additionalInfoText=e.prettyPrintedPa
th||e.path),e.classNames=[],e.match?(w=(vt(e.match.matchType)?
n.Host.getLocString(n.MatchType[e.match.matchType])+": ":"")
+HitHighlightingParser.addMarkers(e.match.matchedText,r),e.additionalInfoText=w,e.s
econdaryMetadata=w,e.classNames.push("withMatchAnnotation","forceNoWrapOutsideTopRe
sult")):e.lastModifiedDateString&&n.RuntimeConfig.QfMode!
=5&&(e.secondaryMetadata=n.Host.getLocString("LastModified")+":
"+e.lastModifiedDateString),e.narratorText=n.getNarratorText(e),n.displayedInGridLa
yout(e.type)&&(u?
e.classNames.push("bigIcon","biggerIcon"):e.classNames.push("bigIcon")),!
o&&e.handoffType==2&&SearchAppWrapper.CortanaApp.copyToClipboard&&i(e,function()
{return[{verb:n.JumplistActionItemType[n.JumplistActionItemType.S_CopyFullPath],dis
playName:n.Host.getLocString("CopyFullPath"),executeSync:function(){return
SearchAppWrapper.CortanaApp.copyToClipboard(e.path,"")},icon:
{type:1,content:"&#xE8C8"}}]},!1),v={},h=e.prettyPrintedPath||
e.path,h&&(c=h.lastIndexOf("/"),c<0&&(c=h.lastIndexOf("\\")),c<0&&(c=h.lastIndexOf(
" >
")),s=h.substring(0,c),s.endsWith(":")&&(s=s+"\\"),e.parentFolder=s,v[n.Host.getLoc
String("Location")]=[{text:s,click:function(){return n.isUncOrLocalPath(s)?
SearchAppWrapper.CortanaApp.launcher.startLaunchFolder(s):e.locationUrl?
SearchAppWrapper.CortanaApp.launcher.launchUriAsync(decodeURI(e.locationUrl)):Searc
hAppWrapper.CortanaApp.launcher.launchUriAsync(s)}}]),rt=n.nicerCloudFilesEnabled(t
,e),e.tooltip=at(e,rt),y=0,b=f;y<b.length;y++){var
k=b[y],ft=k[0],et=k[1],ot=k[2],ut=e[ot];ut&&!
ft&&(v[n.Host.getLocString(et)]=[{text:ut}]);e.previewMetadata=v}}function
ot(t,i,u){var e,o;for(i.match||!u.match||i.parentFolderDisambig||
(i.match=u.match,i.needsRefreshAfterDeduping=!
0,i.previewPaneNeedsRefreshAfterDeduping=!0),e=0,o=f;e<o.length;e++){var
c=o[e],s=c[2],h=u[s];h&&!i[s]&&(i[s]=h,i.needsRefreshAfterDeduping=!
0,i.previewPaneNeedsRefreshAfterDeduping=!0)}(n.RuntimeConfig.QfMode==5||
n.RuntimeConfig.QfMode==9)&&(i.needsRefreshAfterDeduping=!
1,i.previewPaneNeedsRefreshAfterDeduping=!
1);i.needsRefreshAfterDeduping&&r(t,n.getEffectiveQuery(t),n.isL2(t),i,!0)}function
st(t,i){return n.Async.safeChainWithGlobalCaching("getIconForTypeAsync",function(t)
{return
SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.getIconForTypeAsync(i
,n.getImageSizeValue(t))},function(n){return n+"_"+i},function(i){return
n.toIcon(i,"getIconForTypeAsync",t)},t)}function w(n){return n!
=null&&(n.type==3||!!n.content||!!n.className)}function e(n,t,i){i===void 0&&(i=!
0);var r=n.mayContainPII;return n.text?n.query?!n.handoffType&&n.handoffType!==0?
(SharedLogHelper.LogError(t,r?"":n.text,new Error("Missing handoff type")),!
1):n.type?i&&!n.getIcon&&!w(n.icon)?(SharedLogHelper.LogError(t,r?"":n.text,new
Error("Missing icon")),!1):!0:(SharedLogHelper.LogError(t,r?"":n.text,new
Error("Missing suggestion type")),!1):(SharedLogHelper.LogError(t,r?"":n.text,new
Error("Missing query")),!1):(SharedLogHelper.LogError(t,r?"":n.deviceItem?
n.deviceItem.id:"",new Error("Missing text")),!1)}function i(t,i,r){var
u=t.getExtraVerbs;t.getExtraVerbs=function(t){var f=u?u(t):[],e=i(t);return
n.joinVerbs(f,e,r)}}function ht(t,i,r){var
u=t.getExtraVerbsAsync;t.getExtraVerbsAsync=u?function(t){return
ThresholdUtilities.createPromise(function(f){return u(t).then(function(u){return
i(t).then(function(t){return f(n.joinVerbs(u,t,r))})})})}:i}function u(n,t){var
r=n.propertyHits||[],i=r.indexOf(t);return typeof i=="object"&&i.returnValue!
==undefined?i.returnValue:i>=0}function ct(n){var i,t;if(n&&typeof
n=="object"&&n.length){for(i="",t=0;t<n.length;t++)i+=n[t],t!=n.length-1&&(i+=",
");return i}return n}function t(t,i,r){return n.safeExecute(function(){return
ct(t.getProperty(i))},"get"+i,undefined,r)}function lt(t){for(var
r,f,o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];for(r=0,f=o;r<f.length;r++)
{var e=f[r],h=e[0],s=e[1],c=e[2];if(s&&u(t,c))return n.createMatch(h,s)}return
null}function at(t,i){var r=i?t.query+"\n"+t.parentFolder:t.prettyPrintedPath||
t.path||"",o,l,e,s,u;for(t.textContentIfMatched&&(r+=(r?"\n\n":"")
+t.textContentIfMatched),o=!!r,l=function(){r&&(r+="\n");o&&(r+="\n",o=!
1)},e=0,s=f;e<s.length;e++){var
h=s[e],a=h[0],v=h[1],c=h[2];i&&c=="lastModifiedBy"&&t.lastModifiedDateString||
(u=t[c],u&&(!a||
i)&&(l(),i&&c=="lastModifiedDateString"&&t.lastModifiedBy&&(u=n.Host.getLocString("
LastModifiedCombined",u,t.lastModifiedBy)),r+=n.Host.getLocString(v)+":
"+u))}return
t.explanation&&t.meeting&&(r=HitHighlightingParser.removeMarkers(t.explanation)+"\
n\n"+r),r}function vt(t){switch(t){case n.MatchType.Author:case
n.MatchType.LastModifiedBy:case n.MatchType.Tags:case n.MatchType.Genre:case
n.MatchType.Album:case n.MatchType.Artist:return!0;case n.MatchType.Content:case
n.MatchType.Location:return!1;default:throw new Error("Unknown match type:
"+t);}}function yt(t,i,r,u,f,e,o,s,h,c,l,a,v,y,w,b,k,d)
{i&&n.isDataSourceEnabled(i,t)&&n.LocalDataProvider.getApps(r,function(t){var
e,s,r,o,h;if(c())
{for(n.InstrumentationHelper.instrumentResponseReceived(l,i,null,0,!1,!
1),e=[],s=function(r){n.safeExecute(function(){return y(r,i,f(r).map(function(n)
{return t[n]}).filter(function(n){return!!n}),e)},"parseApp
"+i)},r=0,o=u;r<o.length;r+
+)h=o[r],s(h);a(i,e,null)}},v,i);e&&n.isDataSourceEnabled(e,t)&&n.LocalDataProvider
.getSettings(o,function(t){var u,o,r,f,v;if(c())
{for(n.InstrumentationHelper.instrumentResponseReceived(l,e,null,0,!1,!
1),u=[],o=function(r){n.safeExecute(function(){return
y(r,e,p(t[h(r)]),u)},"parseSetting "+i)},r=0,f=s;r<f.length;r+
+)v=f[r],o(v);a(e,u,null)}},v,e);w&&n.isDataSourceEnabled(w,t)&&n.LocalDataProvider
.getFiles(b,function(t){var r,f,i,u,e;if(c())
{for(n.InstrumentationHelper.instrumentResponseReceived(l,w,null,0,!1,!
1),r=[],f=function(i){n.safeExecute(function(){return
y(i,w,p(t[d(i)]),r)},"parseFile "+w)},i=0,u=k;i<u.length;i+
+)e=u[i],f(e);a(w,r,null)}},t,v,w)}function pt(t){return
n.EdgeAppIds.some(function(n){return t.id==n})?
n.Host.getLocString("MicrosoftRecommendedBrowser"):n.Host.getLocString("App")}funct
ion wt(t){return n.isModernSetting(t)?
n.Host.getLocString("SystemSettingsAnnotation"):n.Host.getLocString("ControlPanelAn
notation")}function bt(t){return n.isFileOrFolder(t.type)?
t.deviceItem:null}function kt(t,u,f,e,o,s){var
h=n.getAppItem(o),l,a,c,v,p,y,w;if(h)
{e&&k(o,h);o.primaryMetadata=pt(h);o.narratorText=n.getNarratorText(o);o.tooltip=t.
isSearchHomeZI?
o.text:"";o.type=="IBA"&&(o.tooltip=h.id,o.path=h.id);return}if(n.isSetting(o.type)
)
{o.primaryMetadata=wt(o.deviceItem);o.narratorText=n.getNarratorText(o);o.tooltip=t
.isSearchHomeZI?o.text:"";return}if(o.type=="LURL"&&(h=o.deviceItem,h))
{l=h.id;o.narratorText=n.getNarratorText(o,n.Host.getLocString("DirectNavSuggestion
"));o.tooltip=o.query+"\n\n"+l;o.url=l;return}if(a=bt(o),a)
{dt(t,u,f,e,s,o,a);return}if(o.type=="PT"||o.type=="CG"){if(c=o,o.type!
="PT"&&o.deviceItem.launchArguments||
(c.path=o.deviceItem.id),v=o.deviceItem,p=v.kind,p=="program")
{d(o);return}if(y=gt(v),y)
{c.itemTypeDisplayName=y;r(t,u,f,c);return}o.type=="CG"&&d(o);return}if(o.type=="FE
H")
{o.narratorText=n.getNarratorText(o,n.Host.getLocString("SearchHistorySuggestion"))
;u&&(o.text=HitHighlightingParser.addMarkers(o.text,u));SearchAppWrapper.CortanaApp
.fileExplorerSuggestionPage.onSearchHistoryRemoved&&(w={verb:"RemoveFromDeviceHisto
ry",displayName:n.Host.getLocString("RemoveFromDeviceHistory"),executeSync:function
()
{SearchAppWrapper.CortanaApp.fileExplorerSuggestionPage.onSearchHistoryRemoved(o.qu
ery);n.Host.refreshCurrentPane()},icon:{content:"&#xE711",type:2}},i(o,function()
{return[w]},!1));return}throw new Error("Unexpected type: "+o.type);}function
dt(i,f,e,o,s,h,c){var y,p,d,w,b,v,a,g,l,nt,tt;if(d=h.type=="LDOC"?
n.resolveKnownFolderGUIDsInPath(c.id):n.indexerFilePathToRegularPath(c.id),h.path=d
,h.itemTypeDisplayName=c.itemTypeDisplayName,o&&k(h,c),w=c.lastModifiedDate,n.isVal
idDate(w)&&(h.lastModifiedDate=w),b=c.extension,b&&(h.extensionLC=b.toLocaleLowerCa
se()),s!="MFF"||n.IndexerQueryGenerator)
{h.type=="MU"&&(h.artist=n.IndexerQueryGenerator?
t(c,"System.Music.DisplayArtist",s):t(c,"System.Music.Artist",s),h.album=t(c,"Syste
m.Music.AlbumTitle",s));v=void 0;switch(s)
{case"MPVD":h.author=t(c,"System.Author",s);h.lastModifiedBy=t(c,"System.Document.L
astAuthor",s);h.tags=t(c,"System.Keywords",s);h.tags+=t(c,"System.Photo.TagViewAggr
egate",s);u(c,"System.Search.Contents")&&(a=t(c,"System.Search.AutoSummary",s),a&&(
y=n.tryGetTextContentMatch(a,f),h.textContentIfMatched=y[0],v=y[1]),c.propertyHits.
length==1&&(h.matchedOnlyOnContent=!
0));n.IndexerQueryGenerator&&(h.artist=t(c,"System.Music.DisplayArtist",s),h.genre=
t(c,
"System.Music.Genre",s));break;case"MDOC":h.author=t(c,"System.Author",s);h.lastMod
ifiedBy=t(c,"System.Document.LastAuthor",s);h.tags=t(c,"System.Keywords",s);u(c,"Sy
stem.Search.Contents")&&(a=t(c,"System.Search.AutoSummary",s),a&&(p=n.tryGetTextCon
tentMatch(a,f),h.textContentIfMatched=p[0],v=p[1]),c.propertyHits.length==1&&(h.mat
chedOnlyOnContent=!
0));break;case"MPHO":h.tags=t(c,"System.Photo.TagViewAggregate",s);break;case"MVID"
:n.IndexerQueryGenerator&&(h.artist=t(c,"System.Music.DisplayArtist",s),h.genre=t(c
,"System.Music.Genre",s));h.tags=t(c,"System.Keywords",s);break;case"MMUS":h.genre=
t(c,"System.Music.Genre",s)}g=n.config.disableSyntaxHighlight?!
h.text.startsWith(n.Host.getQuery().queryToFetch)&&f:!
h.text.includes(HitHighlightingParser.startMarker)&&f;g&&(l=void 0,nt=s!="LM"&&s!
="FL",nt&&(s=="MFF"?(l=t(c,"System.Title",s),l&&!
n.matchesOnPropertyHH(l,f)&&(l=undefined)):u(c,"System.Title")&&(l=t(c,"System.Titl
e",s))),l?h.text=HitHighlightingParser.addMarkers(l,f):v?h.match=v:
(tt=n.IndexerQueryGenerator?"System.Music.DisplayArtist":"System.Music.Artist",h.ma
tch=lt(c,s,[n.MatchType.Album,h.album,"System.Music.AlbumTitle"],
[n.MatchType.Artist,h.artist,tt],[n.MatchType.Genre,h.genre,"System.Music.Genre"],
[n.MatchType.Tags,h.tags,"System.Keywords"],
[n.MatchType.Tags,h.tags,"System.Photo.TagViewAggregate"],
[n.MatchType.Author,h.author,"System.Author"],
[n.MatchType.LastModifiedBy,h.lastModifiedBy,"System.Document.LastAuthor"])))}r(i,f
,e,h);ni(h)}function k(t,i){var r=n.safeExecute(function(){return
i.getProperty("System.Link.TargetParsingPath")},"getTargetPath"),u,f,e;r&&(r=r.toLo
caleLowerCase(),u=n.getKnownFolderPathLC(n.FOLDERID_Profile),u&&(f=n.getKnownFolder
PathLC(n.FOLDERID_SystemX86),f&&r.startsWith(f+"\\config\\systemprofile")?
r=u+r.substr(f.length+21):
(e=n.getKnownFolderPathLC(n.FOLDERID_System),e&&r.startsWith(e+"\\config\\
systemprofile")&&(r=u+r.substr(e.length+21)))),t.targetPathLC=r)}function gt(n)
{if(n.launchArguments)return null;var t=n.itemTypeDisplayName;return t&&t[0]!="."?
t:null}function o(t){for(var f,e,l,y,s,h,a,i,c,r,v,o=[],u=0;u<t.length-1;+
+u)if(f=t[u],!n.displayedInGridLayout(f.type)&&!f.explanation)for(e=u+1;e<t.length;
+
+e)if(l=t[e],f.type==l.type&&f.text.toLocaleLowerCase()==l.text.toLocaleLowerCase()
){o[u]=!0;o[e]=!0;break}if(o.length!=0)for(y=t.filter(function(n,t){return
o[t]}),s=n.Host.getLocString("InfoTextWithSource"),h=0,a=y;h<a.length;h+
+)if(i=a[h],i.path){if(c=i.path.lastIndexOf("\\"),c==-
1)continue;if(r=i.path.slice(i.path.lastIndexOf("\\",c-1)+1,c),v=i.handoffType==2?
null:i.primaryMetadata,v&&r.endsWith(":"))continue;i.type=="IBA"?
(i.secondaryMetadata=i.primaryMetadata,i.primaryMetadata=r):i.primaryMetadata=i.pri
maryMetadata?v?n.formatString(s,[r,i.primaryMetadata]):n.formatString(s,
[i.primaryMetadata,r]):r;i.additionalInfoText=n.formatString(s,["
-",r]);i.match&&(i.classNames=i.classNames.filter(function(n){return n!
="withMatchAnnotation"&&n!
="forceNoWrapOutsideTopResult"}));i.narratorText=n.getNarratorText(i);i.parentFolde
rDisambig=r}}function d(t)
{t.primaryMetadata=n.Host.getLocString("RunCommandPrompt");t.classNames.push("actio
n");t.narratorText=n.getNarratorText(t)}function g(t,i,r,u,f,o,s,h){var
w=n.localDataSourceMayContainPII(r),b,y,l,p,k;if(!o)
{b=i.deviceItem.kind;SharedLogHelper.LogError("parseLocalSuggestion"+r,w?"":i.devic
eItem.displayName||i.deviceItem.id,new Error("Unrecognized kind:
"+b));return}if(y=o=="LURL"?1:2,n.isSuggestionTypeEnabled(r,o,y,t)){var
a=n.getEffectiveQuery(t),v=i.deviceItem.displayName,d=v&&a?
HitHighlightingParser.addMarkers(v,a):v,c=n.createSuggestion(t,d,i.getIcon,i.icon,o
,v,n.InstrumentedItem.createInstrumentedItem(u,o),y,u,w);c.uxHint=ui(i,a);i.deviceI
tem.isSimulated||
(c.deviceItem=i.deviceItem);c.ciMetaData=i.ciMetaData;n.isApp(o)&&(c.pinnedToTaskba
r=n.Host.isPinnedToTaskbar(i.deviceItem.id));i.groupDisplayName&&(c.groupDisplayNam
e=i.groupDisplayName);l=n.getAppItem(c);l?(c.click=function(){return
n.Host.launchAppItem(l,r,c.appContext)},n.config.maxJLcm&&ti(t,c,l,f,u,r),c.reactKe
y=o+l.id):c.type=="FEH"?(c.click=function(){return
n.Host.submitFileExplorerTextSuggestion(c.query)},c.reactKey=o+c.query):c.type=="FD
"&&n.RuntimeConfig.QfMode==5?(c.click=function(){return
n.Host.submitFileExplorerFolderSuggestion(c.path)},c.reactKey=o+c.path):
(c.click=function(){return
n.Host.launchDeviceItem(c.deviceItem,r)},c.reactKey=o+c.deviceItem.id);l&&c.type!
="IBA"||n.isSetting(c.type)||n.isFileOrFolder(c.type)&&c.type!="LDOC"?
c.getMruData=function(){return __assign(__assign({},n.getMruSuggestionData(c)),
{id:i.deviceItem.id,appContextData:c.appContext?
{appContext:c.appContext,query:c.query,textWithoutHH:HitHighlightingParser.removeMa
rkers(c.text)}:undefined})}:
(p=n.getCommandLineItem(c),p&&(c.hc=n.isRealCommand(c,p)));k=n.getGroupType(c);n.sh
ouldSetThisPcGroupSource(k,t)&&(c.sourceForGroup=1);kt(t,a,n.isL2(t),n.supportsShor
tcuts(r,t),c,r);(n.RuntimeConfig.QfMode==5||
n.RuntimeConfig.QfMode==9)&&(c.additionalInfoText=undefined,c.primaryMetadata=undef
ined,c.secondaryMetadata=undefined);c.reactKey||
(c.reactKey=o+t+i.deviceItem.id);e(c,"parseLocalSuggestion
"+r)&&h(c)&&s.push(c)}}function ni(t){i(t,function(){var i,r;return
t.duplicates&&(i=t.duplicates.find(function(n){return n.handoffType==7||
n.handoffType==8}),i)?
(r=[],r.push({verb:n.JumplistActionItemType[n.JumplistActionItemType.S_OpenInBrowse
r],displayName:n.Host.getLocString("OpenInBrowser"),executeSync:function(){return
n.Host.launchUri(i.url+(i.handoffType==8?"?web=1":""))},icon:
{type:1,content:"&#xE774"}}),i.locationUrl&&r.push({verb:n.JumplistActionItemType[n
.JumplistActionItemType.S_OpenFileLocationInBrowser],displayName:n.Host.getLocStrin
g("OpenFileLocationIn",n.getGroupSourceDisplayName(i.sourceForGroup)),executeSync:f
unction(){return n.Host.launchUri(i.locationUrl)},icon:
{type:2,content:"&#xE838"}}),r):[]},!0)}function nt(t,i){return!
n.config.enableFallbackIconsForJumpLists||!y[t]?!1:n.contains(y[t],i)}function
ti(t,r,u,f,e,o){var l=u.id,p=u.filePath,h,w,y;if(!n.config.forceAllJumplists)
{if(h=n.config.enableJumplistRestrictions&&it[l],!h&&p){w=p.toLowerCase();for(y in
v)if(w.includes(y)){h=v[y];break}if(!h&&n.config.enableJumplistRestrictions)for(y
in a)if(w.includes(y)){h=a[y];break}}if(h&&h.length==0)return}
(n.RuntimeConfig.AlwaysWide||!rt.find(function(n){return
n==l}))&&(r.calculateChildSuggestions=function(){return
ii(t,l,p,r,u,h,f,e,o)},n.config.maxJLcm&&i(r,function(t){var i=[],e,o;return t||
(r.calculateChildSuggestions&&r.calculateChildSuggestions(),!r.childSuggestions||
n.RuntimeConfig.AlwaysWide&&r.previewPaneType||(e=!
1,r.childSuggestions.filter(function(t){return t.type=="JL"&&!
t.displayed&&t.groupType==n.GroupType.JumpListTasks}).slice(0,n.config.maxJLcm).for
Each(function(n){e=!0;var t=nt(r.deviceItem.id,n.groupType)?
r.getIcon:s(n.jumpListItem,n.parent,!
1,l),o={verb:"JumpListTask_"+l+"_"+n.text,displayName:n.text,executeSync:function()
{return c(u,n,f)},getIcon:t};i.push(o)}),o=!1,r.childSuggestions.filter(function(t)
{return t.type=="JL"&&!t.displayed&&t.groupType!
=n.GroupType.JumpListTasks}).slice(0,n.config.maxJLcm).forEach(function(n,t){var
r,h;e&&!o&&(r={},i.push(r));o=!
0;h={verb:"JumpList_"+l+"_"+t,displayName:n.text,executeSync:function(){return
c(u,n,f)},getIcon:s(n.jumpListItem,n.parent,!0,l)};i.push(h)}))),i},!0))}function
ii(t,i,r,u,f,l,a,v,y){var
k,w,ut,p,d,it,b,g,rt,ot;if(u.calculateChildSuggestions=null,k=f.jumpList,k&&k.lengt
h!=0){for(w=r||"",ut=w.indexOf("}"),w=w.substr(ut+1),p=[],d=0,it=k;d<it.length;d+
+)if(b=it[d],!l||n.contains(l,b.type)){var ft=h(b.type),et=ft!
=n.GroupType.JumpListTasks,st=function(r){var y;if(tt(r))return"continue";var
k=nt(u.deviceItem.id,h(b.type))?
u.getIcon:s(r,u,et,i),l="JL",o=n.createSuggestion(t,r.displayName,k,null,l,r.displa
yName,n.InstrumentedItem.createInstrumentedItem(v,l),2,u.sequenceNumber,et,null,nul
l,!0);o.click=function(){return
c(f,o,a)};o.jumpListItem=r;o.groupType=ft;o.groupDisplayName=b.name;o.parent=u;o.to
oltip=r.description;y=w&&r.path.endsWith(w);y||
(o.path=r.path);e(o,"calculateJumpListSuggestions")&&(p.push(o),ri(f,o,a))};for(g=0
,rt=b.items;g<rt.length;g+
+)ot=rt[g],st(ot)}p.length>0&&(u.childSuggestions=u.childSuggestions?
u.childSuggestions.concat(p):p,o(p),n.InstrumentationHelper.instrumentDataSource(v,
y,p,null))}}function s(t,i,r,u){return function(f,e){return
n.getIcon(t,u+"_"+t.path+"_"+t.displayName,"jumpList",!r,!1,null,null,0)
(f,function(n){n?e(n):i.getIcon(f,e)})}}function tt(t){return t.displayName?!
n.RuntimeConfig.AlwaysWide&&n.olderThan2Weeks(t.lastAccessed)?!0:!1:!0}function
h(t){switch(t){case 0:return n.GroupType.JumpListTasks;case 1:return
n.GroupType.JumpListPinned;case 2:return n.GroupType.JumpListRecent;case 3:return
n.GroupType.JumpListFrequent;default:return n.GroupType.JumpListCustom}}function
c(t,i,r){n.Async.safeChain("launchJumpList",function(){return
i.jumpListItem.launchAsync()},function(){return
n.Host.manuallyDismissApp()},function(){n.DialogBox?
n.DialogBox.show(n.Host.getLocString("JumpListItemUnavailableDeleteConfirmation"),
[{id:null,text:n.Host.getLocString("Cancel"),selected:!0,action:function(){return
n.Host.setFocusInSearchBox(null,"jumpListItemDialogBoxCancel")}},
{id:null,text:n.Host.getLocString("Remove"),selected:!1,action:function()
{l(t,i,r);n.Host.setFocusInSearchBox(null,"jumpListItemUnavailable1")}}]):
(r.showTemporaryMessage(n.Host.getLocString("JumpListItemUnavailable")),l(t,i,r),n.
Host.setFocusInSearchBox(null,"jumpListItemUnavailable2"))})}function l(t,i,r){var
u=function(){return
r.showTemporaryMessage(n.Host.getLocString("RemoveFromListFailure",i.text))},f=i.pa
rent.childSuggestions.length==1;n.Async.safeChain("deleteJumpList",function()
{return i.jumpListItem.deleteAsync()},function()
{n.Async.safeChain("getJumpListAsync",function(){return
t.getJumpListAsync()},function(t){f&&t.some(function(n){return
h(n.type)==i.groupType&&n.items.some(function(n){return!tt(n)})})?u():
(n.Host.refreshCurrentPane(),r.showTemporaryMessage(n.Host.getLocString("RemovedFro
mList",i.text)))},u)},u)
}function ri(t,r,u){r.jumpListItem.deleteAsync&&i(r,function(){var
i={verb:"RemoveFromThisList",displayName:n.Host.getLocString("RemoveFromThisList"),
executeSync:function(){return l(t,r,u)},icon:
{type:2,content:"&#xE711"}};return[i]},!0)}function ui(t,i){if(t&&t.uxHint){var
r=i?HitHighlightingParser.addMarkers(t.uxHint,i):t.uxHint;return
n.Host.getLocString("RelatedSynonym",r)}return null}var
it={"Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge":
[0],"Microsoft.InternetExplorer.Default":[0],Chrome:[0],"360browser":[0]},a={skype:
[],outlook:[0],"360browser":[0],chrome:[0],iexplore:[0],opera:[0],firefox:
[0],safari:[0]},v={"\\msedge.exe":[0]},rt=["Microsoft.Windows.Explorer",],f=[[!
0,"LastAccessed","lastAccessDateString"],[!
1,"LastModified","lastModifiedDateString"],[!1,"LastModifiedBy","lastModifiedBy"],
[!1,"Author","author"],[!1,"Artist","artist"],[!1,"Album","album"],[!
1,"Genre","genre"],[!1,"Tags","tags"],],y={"Microsoft.MicrosoftEdge_8wekyb3d8bbwe!
MicrosoftEdge":
[n.GroupType.JumpListTasks],"Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe!App":
[n.GroupType.JumpListTasks],"Microsoft.XboxApp_8wekyb3d8bbwe!Microsoft.XboxApp":
[n.GroupType.JumpListCustom],"com.squirrel.Teams.Teams":
[n.GroupType.JumpListTasks],"Microsoft.ScreenSketch_8wekyb3d8bbwe!App":
[n.GroupType.JumpListTasks]},b;n.getFileExtension=ut;n.toDate=ft;n.getTodayTimeStri
ng=et;n.setFileTemplate=r;n.enrichMetadataFromDuplicate=ot;n.getIconForTypeAsync=st
;n.isValidIcon=w;n.isValidSuggestion=e;n.setExtraVerbs=i;n.setExtraVerbsAsync=ht;b=
function(){function t(n){this._temporaryMessageHandler=n}return
t.prototype.parse=function(t,i,r,u,f,e){for(var l,a,v=this,s=[],y=function(u)
{n.safeExecute(function(){return
g(t,u,r,i,v._temporaryMessageHandler,u.suggestionType,s,function(){return!
0})},"parseLocalSuggestion "+r)},h=0,c=u.suggestions;h<c.length;h++)l=c[h],y(l);
(n.isFileOrFolderLocalDataSource(r)||
r=="IBA")&&o(s);a={maxedOut:u.maxedOut};e(r,s,a)},t}
();n.SuggestionsParser=b;n.lookupById=yt;n.decorateSuggestionsWithParentFolder=o;n.
parseLocalSuggestion=g}(WSB||(WSB={})),function(n){var t;(function(t)
{t.currentCIVersion="-1";var i=function(){function i(r,u){var f=this;
(this._lightweightStorage=u,n.Host.bindShown(function(){var
n=f.getContstraintIndexInfo(r.lastUrl);t.currentCIVersion=n?String(n.version):"-
1"}),n.Host.hasFallbackHappened())||n.Host.bindAppHidden(function(){var
l,s,e,h;if(n.isBingEnabled()&&n.isBrowserOnline()){var
c=f.safeGetLastUrl(r),w=f.safeGetUrlResult(r),b=n.getWindowHost().toLowerCase(),nt=
b=="bing.com"||b.endsWith(".bing.com");if(!nt&&!(n.MockUrlParameters===null||
n.MockUrlParameters===void 0?void
0:n.MockUrlParameters.isTest))return;if(l=f._lightweightStorage.getItem(i.LastCIDow
nloadAttemptKey),s=null,l&&(s=new
Date(l)),s&&(f.getTimeDiffInMins(s)<n.config.waitBetweenCIDownloadCallsInMins?
n.config.waitBetweenCIDownloadCallsInMins:0))return;e=f.getContstraintIndexInfo(c);
t.currentCIVersion=String(e.version);var
a=n.getCurrentLanguage(),u=n.config.ciVersion,o=f.parseUrlResult(w),v=f.getUrlForCi
Cab(u,a),k=n.contains(n.config.blocklistedCiVersions,e.version)&&u<e.version,tt=u==
o.version&&o.errorCode!="00000000";if(u>0&&n.config.supportedCiMarkets[a]&&(a!
=e.language||u>e.version||k||tt)&&(!o.url||k||c==o.url||o.errorCode!="00000000"))
{var y="cis_v"+u,p="ci_v"+u,d=f._lightweightStorage.getItem(y)?
parseInt(f._lightweightStorage.getItem(y)):0,g=f._lightweightStorage.getItem(p)?
parseInt(f._lightweightStorage.getItem(p)):0;f._lightweightStorage.setItem(i.LastCI
DownloadAttemptKey,n.getCurrentDate().toString());h="constraintIndexDownloader.tryD
ownloadFromUrlAsync";n.Async.safeChain(h,function(){return
r.tryDownloadFromUrlAsync(v)},function(n){if(n){var
i=f.getContstraintIndexInfo(c);t.currentCIVersion=String(i.version);d+
+;f._lightweightStorage.setItem(y,d.toString())}else
SharedLogHelper.LogError(h,"urlResult: "+w,"Download failed");g+
+;f._lightweightStorage.setItem(p,g.toString())},function(n)
{SharedLogHelper.LogError(h,"onError - url: "+v,n.message)},null,v,0)}}})}return
i.prototype.parseUrlResult=function(n){var r=null,t=null,u=1,i,f;return n?
(i=n.split(":0x"),i.length>1?(r=i[0],t=i[1],t!
="00000000"&&SharedLogHelper.LogWarning("constraintIndexDownloader.urlResult",t,"Do
wnload encountered
problems"),f=this.getContstraintIndexInfo(r),u=f.version):SharedLogHelper.LogError(
"constraintIndexDownloader.parseUrlResult","urlResult: "+n,"Invalid
URL")):SharedLogHelper.LogError("constraintIndexDownloader.parseUrlResult","No
urlResult"),
{url:r,version:u,errorCode:t}},i.prototype.getContstraintIndexInfo=function(n){var
r=-1,u="",t,i;return n?(t=n.split("/"),t.length>1?(i=t[t.length-
1].split("."),u=i.length==2?i[0]:"",r=+t[t.length-
2]):SharedLogHelper.LogError("constraintIndexDownloader.getContstraintIndexInfo","u
rl: "+n,"Invalid
URL")):SharedLogHelper.LogError("constraintIndexDownloader.getContstraintIndexInfo"
,"No Url"),{version:r,language:u}},i.prototype.safeGetLastUrl=function(t){if(!
n.config.ciDownloadUpdate)return t.lastUrl;var
r="https://www.bing.com/bcs/ci/-1/en-us.cab",i=r;try{return
i=t.lastUrl,n.isNullOrUndefined(i)||i.length==0?r:i}catch(u){return
r}},i.prototype.safeGetUrlResult=function(t){if(!n.config.ciDownloadUpdate)return
t.urlResult;var r="https://www.bing.com/bcs/ci/-1/en-
us.cab:0x8000FFFF",i=r;try{return i=t.urlResult,n.isNullOrUndefined(i)||
i.length==0?r:i}catch(u){return r}},i.prototype.getUrlForCiCab=function(n,t)
{return"https://www.bing.com/bcs/
ci/"+n+"/"+t+".cab"},i.prototype.getTimeDiffInMins=function(t){if(!
n.isValidDate(t))return 0;var i=t.getTime(),r=n.getCurrentTime();return
Math.round((r-i)%n.DayToMs%n.HourToMs/n.MinuteToMs)},i.LastCIDownloadAttemptKey="La
stCIDownloadAttempt",i}();t.ConstraintIndexDataLoader=i})(t=n.ConstraintIndex||
(n.ConstraintIndex={}))}(WSB||(WSB={}));__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)}}(),function(n){function u(n){switch(n.type)
{case"Folder":return"FD";case"Photo":return"LI";case"Video":return"LV";case"Audio":
case"Music":return"MU";default:return n.fileSize?"FL":"FD"}}function c(t){switch(t)
{case"FD":return n.Scope.Folders;case"LI":return n.Scope.Photos;case"LV":return
n.Scope.Videos;case"MU":return n.Scope.Music;default:return n.Scope.Documents}}var
t="https://onedrive.live.com",i=t+"/redir.aspx?
resid=",e="&ancestorId=",o="&contentMatch=",r="OneDrive provider called without
{0}",s=621355968e5,h=function(t){function i(n){var i=t.call(this,"ODC")||
this;return i._accessTokenManager=n,i}return
__extends(i,t),i.prototype.getName=function()
{return"OneDriveDataProvider"},i.prototype.addOneDriveAncestorResourceIdQueryString
=function(){if(n.RuntimeConfig.QfMode==5&&!
n.isFileExplorerCurrentPathThisPcOrQuickAccess){var t=void
0,i=SearchAppWrapper.CortanaApp.fileExplorerSuggestionPage.currentSyncRootContentUr
i?
n.tryParseUrl(SearchAppWrapper.CortanaApp.fileExplorerSuggestionPage.currentSyncRoo
tContentUri,!
1):null;if(i&&i.parameters&&(t=i.parameters.substr(1).split("&").find(function(n)
{return n.startsWith("id=")}).substr(3)),t)return
e+t;SharedLogHelper.LogError("OneDriveParser","QfMode="+n.RuntimeConfig.QfMode,new
Error(n.formatString(r,
["currentSyncRootResourceId"])))}return""},i.prototype.addOneDriveContentMatchQuery
String=function(t){return n.RuntimeConfig.QfMode==5||t.scope==n.Scope.Documents?
o+"1":""},i.prototype.createUrl=function(t){var
i=decodeURIComponent(n.config.oneDriveDotComRootUrl),r;return
i+=this.addOneDriveAncestorResourceIdQueryString(),i+=this.addOneDriveContentMatchQ
ueryString(t),r=t?
n.encodeQueryParameter(t.queryToFetch.toLowerCase()):"",i+"&q="+r},i.prototype.getA
llAccountTokens=function(t){if(n.RuntimeConfig.QfMode==5){var
i=SearchAppWrapper.CortanaApp.fileExplorerSuggestionPage.currentSyncRootAccount;i?
this._accessTokenManager.getAccountByUserName(!1,0,i,!1,!0,function(n){n&&n.Token?
t([n.Token]):t(null,"AccountNotFound")}):n.isFileExplorerCurrentPathThisPcOrQuickAc
cess?this._accessTokenManager.getAllSyncingAccounts(!1,0,!1,!0,function(n)
{n.length>0?t(n.map(function(n){return n.Token})):t(null,"NoAccountsFound")}):
(SharedLogHelper.LogError("OneDriveParser","QfMode="+n.RuntimeConfig.QfMode,new
Error(n.formatString(r,
["currentSyncRootAccount"]))),t(null,"CurrentSyncRootAccount"))}else
n.AccessTokenManager.getWindowsAccountType()==2?
this._accessTokenManager.getAccount(0,n.getBingResourceOrScope(0),!1,!0,function(n)
{n&&n.Token?
t([n.Token]):t(null,"NoAccountsFound")}):t(null)},i.prototype.fetch=function(i,r,u,
f,e,o,s){var
l=this,h,c;n.isDataSourceEnabled(this._dataSource,i)&&(h={numOfPendingResponses:0},
s||(s={}),s["BingAPIs-Authorization-Source"]="Explicit",c=function(c){var
v=Object.assign({},s),a;c&&(v["X-Search-RPSToken"]=c);a=Object.assign({},o);delete
a[n.Service.QueryParams.ImpressionGuid];delete
a[n.Service.QueryParams.RequestElToken];t.prototype.fetch.call(l,i,function(n,t,i,u
,f){--h.numOfPendingResponses;r(n,t,i,u,f,h.numOfPendingResponses!
=0)},u,f,e,a,v)},this.getAllAccountTokens(function(n,t){t?
r(l._dataSource,null,t,null,null,!1):n?
(h.numOfPendingResponses=n.length,n.forEach(function(n){return c(n)})):
(h.numOfPendingResponses=1,c(null))}))},i}
(n.JsonDataProvider),f;n.OneDriveDataProvider=h;f=function(){function r(){}return
r.prototype.parse=function(t,i,r,u,f,e){var
h=[],o,c,l,s,a,v;if(u&&u.suggestionGroups)for(o=0,c=u.suggestionGroups;o<c.length;o
++)if(l=c[o],l.searchSuggestions)for(s=0,a=l.searchSuggestions;s<a.length;s+
+)v=a[s],this.addContent(t,h,v,i);n.decorateSuggestionsWithParentFolder(h);e("ODC",
h,null)},r.prototype.isValidSuggestion=function(n){return!n.result||
n.result.length!=1?!1:n.result[0].type==="History"?
(SharedLogHelper.LogError("OneDriveParser",null,new Error("History
should be disabled in the request URL")),!1):n.result[0].type==="Tag"?!1:!
0},r.prototype.addContent=function(r,f,e,o){var
l,a,w;if(this.isValidSuggestion(e)&&(l=e.result[0],a=u(l),n.isSuggestionTypeEnabled
("ODC",a,7,r))){var
v=l.rawResourceId,b="https://storage.live.com/items/"+v+":Cropped176x176#h=176&w=17
6",p=n.ScopeConfig[c(a)].icon,y=a=="FD"?"":n.getFileExtension(l.path),k=this.getOne
DriveSuggestionIcon(n.isMedia(a),p,b,y,v),h=n.createSuggestion(r,e.displayText,k,p,
a,e.query,n.InstrumentedItem.createInstrumentedItem(o,a),7,o,!
0);h.url=i+v;h.path="OneDrive:\\"+l.path.slice(1).replace(/[/]/
g,"\\");h.extensionLC=y?y.toLocaleLowerCase():undefined;w=+l.dateModified/1e4-
s;h.lastModifiedDate=n.toDate(w);h.sourceForGroup=2;n.setFileTemplate(r,n.getEffect
iveQuery(r),n.isL2(r),h);h.click=function(){return
n.Host.launchUri(h.url)};h.locationUrl=l.parentFolder&&l.parentFolder.id?
i+l.parentFolder.id:t;h.reactKey=this.generateReactKey(l);n.setExtraVerbs(h,functio
n(){var
t={verb:n.JumplistActionItemType[n.JumplistActionItemType.S_OpenFileLocationInBrows
er],displayName:n.Host.getLocString("OpenFileLocationIn",n.getGroupSourceDisplayNam
e(2)),executeSync:function(){return n.Host.launchUri(h.locationUrl)},icon:
{type:2,content:"&#xE838"}};return[t]},!
0);n.isValidSuggestion(h,"OneDriveParser")&&f.push(h)}},r.prototype.generateReactKe
y=function(n){return u(n)
+n.path+n.rawResourceId},r.prototype.getOneDriveSuggestionIcon=function(t,i,r,u)
{return n.getIconForTypeAsync(i,u)},r}();n.OneDriveParser=f}(WSB||
(WSB={})),function(n){var t;(function(t){var i=function(){function t(){var
t=this;n.Host.bindQueryChangedOrInitialized(function()
{t._previousWebSignals=t._currentWebSignals;t._currentWebSignals=null;(!
n.config.enableCISpeller||
t._currentSpellerTrigger)&&(t._previousSpellerTrigger=t._currentSpellerTrigger,t._c
urrentSpellerTrigger=null)});n.Host.bindConversationStart(function()
{t._previousWebSignals=null;t._currentWebSignals=null;t._previousSpellerTrigger=nul
l;t._currentSpellerTrigger=null;t._previousBestMatchSuggestion=null;t._previousQuer
y=null})}return t.prototype.setPreviousQuery=function(n)
{this._previousQuery=n},t.prototype.getPreviousQuery=function(){return
this._previousQuery||""},t.prototype.updateWebSignalsData=function(n,t)
{this._currentWebSignals={query:n,signals:t}},t.prototype.setPreviousTopHit=functio
n(n){this._previousBestMatchSuggestion=n},t.prototype.getPreviousTopHit=function()
{return
this._previousBestMatchSuggestion},t.prototype.updateSpellerTriggerData=function(n,
t)
{this._currentSpellerTrigger={query:n,triggerSpeller:this.triggerSpellerOnTheNextKe
yStroke(t,n)}},t.prototype.getPreviousEventWebSignalsData=function(n){return
this._previousWebSignals&&this.isPreviousEventQuery(this._previousWebSignals.query,
n)?this._previousWebSignals.signals:null},t.prototype.disableCISpeller=function(n)
{return
this._previousSpellerTrigger&&this._previousSpellerTrigger.triggerSpeller&&this.isP
ossibleFirstMisspelling(n,this._previousSpellerTrigger.query)?!0:!
1},t.prototype.enableCISpeller=function(t){return n.config.enableCISpeller?
this._previousSpellerTrigger&&this._previousSpellerTrigger.triggerSpeller&&this.dis
ableCISpeller(t)?!
1:this._previousSpellerTrigger&&this.isPossibleFirstMisspelling(this._previousSpell
erTrigger.query,t)?!
0:this._previousSpellerTrigger&&(this.isTypedEventQuery(this._previousSpellerTrigge
r.query,t)||
this.isBackspaceEventQuery(this._previousSpellerTrigger.query,t))&&this._previousSp
ellerTrigger.triggerSpeller:this._previousSpellerTrigger&&this.isPreviousEventQuery
(this._previousSpellerTrigger.query,t)&&this._previousSpellerTrigger.triggerSpeller
},t.prototype.triggerSpellerOnTheNextKeyStroke=function(t,i){return
n.config.enableCISpeller==1?!0:t.every(function(n){return n.notAResult})?!
0:t.length>0&&this.isWebSpellCorrectedSuggestion(t[0])&&t.every(function(n){return
n.handoffType==0})?!0:n.config.enableCISpeller==2&&!t.some(function(t){return
n.isApp(t.type)||n.isSetting(t.type)})?!0:this.enableCISpeller(i)?!0:!
1},t.prototype.isWebSpellCorrectedSuggestion=function(n){return n.type=="SC"||
n.type=="OS"},t.prototype.isPreviousEventQuery=function(n,t){return
n&&t&&n.length==t.length-
1&&t.startsWith(n)},t.prototype.isBackspaceEventQuery=function(n,t){return
n&&t&&n.length==t.length+1&&n.startsWith(t)},t.prototype.isTypedEventQuery=function
(n,t){return(n||
n==="")&&t&&n.length<t.length&&t.startsWith(n)},t.prototype.isPossibleFirstMisspell
ing=function(t,i){if(this._previousBestMatchSuggestion){var
r=this._previousBestMatchSuggestion.ciMatchedQuery||
this._previousBestMatchSuggestion.query;return
r.toLocaleLowerCase().startsWith(t.toLocaleLowerCase())&&!
r.toLocaleLowerCase().startsWith(i.toLocaleLowerCase())&&this.isTypedEventQuery(t,i
)&&i.length>=n.config.enableCISpellerAtPrefixLength?!0:!1}return
this._previousBestMatchSuggestion&&this._previousBestMatchSuggestion.query.toLocale
LowerCase().startsWith(t.toLocaleLowerCase())&&!
this._previousBestMatchSuggestion.query.toLocaleLowerCase().startsWith(i.toLocaleLo
werCase())&&this.isTypedEventQuery(t,i)&&i.length>=n.config.enableCISpellerAtPrefix
Length?!0:!1},t}();t.PreviousKeystrokeCache=i})(t=n.Cache||(n.Cache={}))}(WSB||
(WSB={})),function(n){var t;(function(t){function c(t){e=t;var
f=_ge("dialogBox");f&&(sj_be(f,"click",function(n){var
r=n.target.id,t=i().filter(function(n){return n.id==r}).shift();t?
(t.action&&t.action(),u()):r=="dialog_overlay"&&u();sj_sp(n)},!
0),n.Host.bindKeyDown(function(n){var e,o,t,s,f,u;if(r){e=void 0;switch(n){case
39:for(t=i(),o=!1,f=0,u=void 0;u=t[f];f++)if(o){e=u;break}else if(o=u.selected==!
0,o&&f+1==t.length){e=t[0];break}break;case 37:for(t=i(),s=void 0,f=0,u=void
0;u=t[f];f++){if(u.selected==!0){e=s?s:t[t.length-
1];break}s=u}}e&&h(e)}}),n.Host.bindKeyEscape(function(n){o()&&(u(),n.handled=!
0)}))}function l(t,i,u,o){var s,h;if(f=[],i.length==0)throw new Error("DialogBox:
Empty buttons array");f=i.map(function(n,t){var i=n;return
i.id="dialog_b"+t,i.narratorText=i.text,i.selected&&(s=i.id),i});h={isVisible:!
0,title:u,messageText:t,buttons:f,isModal:o};e.updateDialogBox(h);s&&n.safeSetTimeo
ut(function(){return
_ge(s).focus()},0,"DialogBox.show");n.Host.setFocusInWebView("dialogBoxViewModel");
r=!0}function u(){if(r)e.updateDialogBox({isVisible:!1}),r=!1}function o(){return
r}function i(){return f}function a(){return i().map(function(n)
{return[n]})}function s(){return i().filter(function(n){return
n.selected}).shift()}function h(n){for(var r,t=0,u=i();t<u.length;t+
+)r=u[t],r.selected=r.id==n.id,r.selected&&_ge(n.id).focus()}function v(){if(o())
{var n=s();n&&(n.action&&n.action(),u())}}function y(){return!1}var f=[],e,r=!
1;t.init=c;t.show=l;t.hide=u;t.isVisible=o;t.getSelectableItems=i;t.getSelectableIt
emsByGroup=a;t.getSelectedItem=s;t.select=h;t.submit=v;t.onAfterKeyDown=y})
(t=n.DialogBox||(n.DialogBox={}))}(WSB||(WSB={})),function(n){function a(n){return
n.includes("form=vsranf")}function v(t){var i=n.tryParseUrl(t,!0);return!!i&&/[\?\
&]q=/i.test(i.parameters)&&!/[\?\&]view=detail/i.test(i.parameters)}function kt(t)
{var i=n.tryParseUrl(t,!0);return!!i&&yt.test(i.parameters)}function dt(n)
{switch(n){case 17:case 21:case 1:case 0:return 1;case 13:return 2;case 14:return
3;default:throw Error("Unsupported handoff type: "+n);}}function y(n){switch(n)
{case 1:return 1;case 2:return 7;case 3:return 8;default:throw Error("Unsupported
vertical: "+n);}}function p(t){var i=n.tryGetBingPathLC(t);return i?
n.contains(at,i)?2:n.contains(vt,i)?3:n.contains(n.WebSearchPaths,i)?
1:null:null}var
u=["bfbTenantSettings","bfbUserConfigs","bfbSubstrateUnifiedSearch"],b="Wsb.WorkSer
p",h=n.PreviewPaneWidth-24,k="miniserp_focus",d="disableOutline",i=2,g=["tab-
active","slide"],nt=["aria-
expanded"],tt="videoPreview",it=300,f=30,rt="IsSearchAppXYFocusEnabled",ut="WinJS",
ft="dFocusExit",t="win-xyfocus-
suspended",et="Rewards.ReportActivity.Success",ot="Rewards.ReportActivity.Failure",
w,s;n.MiniSerpIframeId="miniIframeSerp";n.MiniSerpFetchEvent="miniSERP.Fetch";n.Min
iSerpLoadedEvent="MiniSerpContentLoaded";n.MiniSerpClearingEvent="MiniSerpContentCl
earing";var st=["/account/","/settings.aspx"],r=function(){var n={};return
n[37]="left",n[39]="right",n[38]="up",n[40]="down",n}
(),ht=1e4,c=800,ct=100,lt=["&form=s00037&"],at=["/images/search","/images"],vt=["/
videos/search","/videos"],yt=/[\?\&]FORM=HDRSC[1-3]/
i,e="ClientInst",o="wsbpf",pt="wsbPrefetchGuid",l="inprocess",wt="wsbstoploadingscr
een",bt="wsbstoprequeryloadingscreen";w=function(){function t(t,i){var
r=this,u;this._navigationHelper=t;this._msRewardsViewModel=i;this._deviceScale=1;th
is._previewRequestId=0;this._previousURLs=[];this.blockedMiniSERPUrls=[_w.location.
origin+_w.location.pathname];this._msbPrefetch=_w.BingAtWork;this._msbContext=(u=_w
.BingAtWork)===null||u===void 0?void
0:u.context;this._wsbPrefetchModel={};this._msbContext&&(this._msbContext.isWsbPref
etchEnabled=n.config.wsbWorkScopeWsbPrefetchEnabled);n.Host.bindShown(function()
{ThresholdUtilities.getCortanaHeaders(function(n){n&&n["X-BM-
DeviceScale"]&&(r._deviceScale=+n["X-BM-DeviceScale"]/
100)});r.setVertical(1)});n.Host.bindAppHidden(function()
{r._seeAllResults&&(r._seeAllResults.innerText="");r._currentVertical=null});n.Host
.bindSearchBoxGotFocus(function()
{r._focusHelper&&r._focusHelper.onSearchBoxFocusChanged()});sj_evt.bind(n.MiniSerpL
oadedEvent,function()
{r.isMsbPerfLogEnabled()&&bfbWsbTel.logPerf("miniSERP::Loaded");r._onIFrameLoadedCa
llback&&(r._onIFrameLoadedCallback(),r._onIFrameLoadedCallback=null)});this._msRewa
rdsViewModel&&(sj_evt.bind(et,function(n){var
t=n[1];r._msRewardsViewModel.notifyPointsRewarded(t)}),sj_evt.bind(ot,function(n)
{var t=n[1];SharedLogHelper.LogError("RewardsReportActivityFailureEvent",null,t?new
Error(t):null)}))}return t.prototype.init=function(t,i){var
u=this;this._previewPaneViewModelParent=t;this._root=i;this._seeAllResults=this._ro
ot.querySelector("#seeAllResults");this._footer=this._root.querySelector("#footer")
;this._mask=this._root.querySelector("#previewMask");this._forceLoadScreen=this._ro
ot.querySelector("
#forceLoadMessage");this._contentContainer=this._root.querySelector("#miniSerpPaneC
ontainer");this._scrollArea=this._root.querySelector("#miniSerpScrollArea");this._l
oadingScreen=this._root.querySelector("#loadingScreen");this._hasErrored=!
1;this._selectedItem=null;sj_be(this._scrollArea,"scroll",function(t)
{u._iframe&&n.contains([2,3],u._currentVertical)&&u._iframe.contentWindow.dispatchE
vent(new
Event(t.type,t));u._calculateIFrameHeight&&u._calculateIFrameHeight()});this._foote
r&&sj_be(this._footer,"keydown",function(t){u._iframe&&n.isUpOrDownKey(t.keyCode)?
(t.keyCode==38?u.tryExecuteFocusOnMiniSerp(function(){return
u._focusHelper.moveFocusToEdgeFocusableElement(1)}):n.RuntimeConfig.AllowKeyboardNa
vCycling&&u.tryExecuteFocusOnMiniSerp(function(){return
u._focusHelper.moveFocusToEdgeFocusableElement(0)}),sj_pd(t),sj_sp(t)):t.keyCode==1
3&&u._footer.click()});this._mask&&n.RuntimeConfig.MiniSERPMode!
=0&&sj_be(this._mask,"keydown",function(n)
{n.keyCode==13&&u._mask.click()});sj_be(_w,"message",function(t){var f=t.data?
t.data.msWinJSXYFocusControlMessage:null,i,e;f&&f.type==ft&&(i=f.direction,e=f.keyC
ode,u._focusHelper&&!u._focusHelper.isL2Visible()&&u._focusHelper.getXYFocusRoot()!
=u._originalMiniSerpXYFocusRoot?
(u._focusHelper.setXYFocusRoot(u._originalMiniSerpXYFocusRoot),u.tryExecuteFocusOnM
iniSerp(function(){return u._focusHelper.moveFocus(i,e)})):(i!
=r[n.getRtlAdjustedKey(39)]&&t.source.blur(),i==r[40]||
i==r[38]&&n.RuntimeConfig.AllowKeyboardNavCycling?u._footer?
u._footer.focus():u._focusHelper.moveFocusToEdgeFocusableElement(i==r[38]?1:0):i!
=r[n.getRtlAdjustedKey(37)]||n.Host.searchBoxHasFocus()||
n.Host.setFocusInSearchBox(e,"previewPaneUnfocus")))})},t.prototype.finalizeKeystro
ke=function(){this.instrumentOnPreviewPaneRendered(!1,!
0)},t.prototype.getSelectableItems=function(){return this._selectedItem?
[this._selectedItem]:[]},t.prototype.getSelectableItemsByGroup=function()
{return[]},t.prototype.getSelectedItem=function(){return
this._selectedItem},t.prototype.select=function()
{},t.prototype.onAfterKeyDown=function(){return!1},t.prototype.clear=function()
{this._previewedSuggestion=null;this._onPreviewPaneRendered=null;this._hasErrored=!
1;this._selectedItem=null;this._footer&&(n.setVisibility(this._footer,!
1),this._footer.onclick=null);this._mask&&(n.setVisibility(this._mask,!
1),this._mask.onclick=null);this._forceLoadScreen&&this.clearForceLoadPage();this.c
learContent();this._previousURLs=[]},t.prototype.showForceLoad=function(t,i){var
r=this;n.InstrumentationHelper.logClientInstEvent("Select","ForceLoadOpened",n.Sequ
enceNumberManager.getSequenceNumber(),
{suggestionText:t});this.stopLoadingScreen();n.setVisibility(this._scrollArea,!
1);n.setVisibility(this._footer,!1);n.setVisibility(this._mask,!
1);n.setVisibility(this._forceLoadScreen,!
0);this.formatForceLoadPage(t);this._forceLoadScreen.onclick=function()
{r.clearForceLoadPage();r.startLoadingScreen();i()}},t.prototype.clearForceLoadPage
=function(){for(n.setVisibility(this._forceLoadScreen,!
1),n.setVisibility(this._scrollArea,!
0),this._forceLoadScreen.onclick=null,this._forceLoadScreen.classList.remove("force
LoadContainer");this._forceLoadScreen.hasChildNodes();)this._forceLoadScreen.remove
Child(this._forceLoadScreen.lastChild)},t.prototype.formatForceLoadPage=function(t)
{var
h=n.Host.getLocString("ForceLoadMessage"),c=n.Host.getLocString("ForceLoadButton"),
o=h.split("{0}"),s=sj_ce("div","","accentColor"),u,r,f,e,i;this._forceLoadScreen.ap
pendChild(s);u=_d.createElement("span");u.id="forceLoadIcon";u.innerHTML="&#xE721";
s.appendChild(u);r=sj_ce("div","forceLoadQueryText","");r.appendChild(_d.createText
Node(o[0]));f=_d.createElement("span");f.textContent=t;r.appendChild(f);r.appendChi
ld(_d.createTextNode(o[1]));this._forceLoadScreen.appendChild(r);e=sj_ce("div","","
");this._forceLoadScreen.appendChild(e);i=_d.createElement("button");i.className="c
-
button";i.id="forceLoadSubmit";i.type="submit";i.textContent=c;e.appendChild(i)},t.
prototype.startLoadingScreen=function(){n.setVisibility(this._scrollArea,!
1);n.setVisibility(this._footer,!1);n.setVisibility(this._mask,!
1);n.setVisibility(this._loadingScreen,!
0)},t.prototype.stopLoadingScreen=function(){n.setVisibility(this._loadingScreen,!
1);n.setVisibility(this._scrollArea,!0)},t.prototype.clearContent=function()
{for(this._previewRequestId+=1,this._focusHelper=null,this._onIFrameLoadedCallback=
null,sj_evt.fire(n.MiniSerpClearingEvent);this._contentContainer.hasChildNodes();)t
his._contentContainer.removeChild(this._contentContainer.lastChild);this._iframe&&(
this._iframe=null,this._calculateIFrameHeight=null);this._mutationObserver&&(this._
mutationObserver.disconnect(),this._mutationObserver=null)},t.prototype.hasFocus=fu
nction(){if(n.Host.searchBoxHasFocus())return!1;var
t=n.getCurrentActiveElement();return t&&t!
=this._iframe&&this._root.contains(t)},t.prototype.focus=function(){var
i=this,t;this.hasFocus()||(this._iframe?
(t=this.tryExecuteFocusOnMiniSerp(function(){return
i._focusHelper.moveFocusToLastFocusedElement()}),t?
n.Host.setFocusInWebView("miniserp
focus"):n.Host.setFocusInSearchBox(null,"MiniSERP VM Focus
failed")):this._hasErrored&&n.config.edgeTransferOnTimeout?
(_ge("errorFooter").focus(),this._selectedItem={id:"errorFooter",text:null,selected
:!0},n.Host.searchBoxHasFocus()&&n.Host.setFocusInWebView("errorPP
focus")):this._previewPaneViewModelParent.focusPending=!
0)},t.prototype.readyToBlur=function(){return!0},t.prototype.blur=function()
{},t.prototype.setVertical=function(t){if(t!=this._currentVertical)
{if(this._seeAllResults)switch(t){case
1:this._seeAllResults.innerText=n.Host.getLocString("OpenResultsBrowser");break;cas
e
2:this._seeAllResults.innerText=n.Host.getLocString("SeeAllImageResults");break;cas
e
3:this._seeAllResults.innerText=n.Host.getLocString("SeeAllVideoResults");break;def
ault:throw new Error("Unsupported vertical type:
"+t);}this._currentVertical=t}},t.prototype.instrumentOnPreviewPaneRendered=functio
n(n,t){if(this._timestampFirstRender&&this._onPreviewPaneRendered){var
i={firstRenderTS:this._timestampFirstRender};this._onPreviewPaneRendered(t,!
n,i)}},t.prototype.update=function(t,i,r,u,f,e){var
o=this,a,s,w,v,l,b,k,y;if(this._onPreviewPaneErrored=e,!f)
{this.instrumentOnPreviewPaneRendered(!0,!
1);return}if(this.isMsbPerfLogEnabled()&&bfbWsbTel.logPerf("miniSERP::update"),this
.instrumentOnPreviewPaneRendered(!1,!
0),this.miniSERPRenderTimeoutInstrumentation("miniSerpViewModelUpdate"),n.config.di
sableOfflineRequest&&!n.isBrowserOnline())
{this.renderOfflineMessage(t.query);return}if(this._currentHandoffType=t.handoffTyp
e,typeof
n.isMsbWorkScope=="function"&&n.isMsbWorkScope(t.handoffType)&&this._iframe&&(s=thi
s._iframe.contentWindow,s&&((a=s.BingAtWork)===null||a===void 0?void
0:a.workVerticalNavClickHandler))){var h={navigationPayload:
{domain:t.navDomain,id:t.navDomainId},query:t.query},nt=t.scope===t.previousScope,p
=t.query===t.previousQuery;if(p&&nt)
{this.stopLoadingScreen();this._scrollArea.scrollTop=0;h.isRequery=!
1;s.BingAtWork.workVerticalNavClickHandler(h);this.updatePreviousState(t,f);return}
if(i.scope===n.Scope.Work&&n.config.msbWorkScopeQfRequeryEnabled&&t.previousQuery&&
!p)
{this._scrollArea.scrollTop=0;n.config.msbWorkScopeQfRequeryLoadingScreenEnabled&&t
his.startLoadingScreen();w=n.Host.createGuid();v=""+bt+w;this.handleLoadingStateEve
nt(v);h.isRequery=!
0;h.loadingStateEventKey=v;s.BingAtWork.workVerticalNavClickHandler(h);this.updateP
reviousState(t,f);return}}if(this.updatePreviousState(t,f),l=t.type=="MB"&&t.segmen
ts=="Organization"?
null:t.baseSearchUrl,b=dt(t.handoffType),this.setVertical(b),this._footer&&(this._f
ooter.onclick=function(r)
{o._previewPaneViewModelParent.onBeforeItemLaunch(n.getCurrentTime(),n.getInputType
(r),3);n.Host.launchSearch(t.query,o._navigationHelper.getSearchUrl(i.fullPartialQu
ery,t.query,t.type,l,t.handoffType,undefined,undefined,undefined,undefined,t.msbVer
ticalHash),!
1);o._previewPaneViewModelParent.onAfterItemLaunch(3)}),this._mask&&(this._mask.onc
lick=function(r)
{o._previewPaneViewModelParent.onBeforeItemLaunch(n.getCurrentTime(),n.getInputType
(r),3);n.Host.launchSearch(t.query,o._navigationHelper.getSearchUrl(i.fullPartialQu
ery,t.query,t.type,l,t.handoffType,undefined,undefined,undefined,undefined,t.msbVer
ticalHash),!
1);o._previewPaneViewModelParent.onAfterItemLaunch(3)}),n.TestHookUrlParameters===n
ull||n.TestHookUrlParameters===void 0?void 0:n.TestHookUrlParameters.noSerp)
{this.renderIframe(null,"<html><body><\/body><\/html>",{},undefined,!
1);k=n.getCurrentTime();this._previewPaneViewModelParent.onResponseReceived(k);retu
rn}var
d=r==0,g=SearchAppWrapper.CortanaApp.entryPoint=="WNSHVR",tt=g?"WMSHVA":n.mapOSForm
Code("WMSRPA"),it=g?"WMSHVM":n.mapOSFormCode("WMSRPM"),rt=d?
tt:it,c=this._navigationHelper.getSearchUrl(i.fullPartialQuery,t.query,t.type,l,t.h
andoffType,rt,!
0,null,d,t.msbVerticalHash);if(c+="&qfig="+n.InstrumentationHelper.getImpressionGui
d(n.SequenceNumberManager.getSequenceNumber()),this._msRewardsViewModel&&this._msRe
wardsViewModel.isRewardsEnabled()&&(c+="&rewards=1"),i.serpURLParams)for(y in
i.serpURLParams)c=ThresholdUtilities.setUrlParameter(c,y,i.serpURLParams[y]);this._
previousURLs=[];this.downloadAndDisplayMiniSerp(t,c,null,r)},t.prototype.getCurrent
HandoffType=function(){return
this._currentHandoffType},t.prototype.isIframeActive=function(){return
this._iframe!==null},t.prototype.updatePreviousState=function(n,t)
{this._previewedSuggestion=n;this._onPreviewPaneRendered=t;this._timestampFirstRend
er=null},t.prototype.miniSERPRenderTimeoutInstrumentation=function(t){var
i;i={FunctionCalled:t};n.InstrumentationHelper.logClientInstEvent(e,"MiniSERPRender
Timeout",n.SequenceNumberManager.getSequenceNumber(),i)},t.prototype.miniSerpErrorI
nstrumentation=function(t,i,r){var u;u=r?
{ErrorCause:t,ResponseRecievedTimeStamp:i.toString(),ResponseText:r.responseText,Co
ntentType:r.contentType,ResponseStatusCode:r.status.toString(),RequestStatusCode:r.
result.toString()}:
{ErrorCause:t};n.InstrumentationHelper.notifyTopHitPreviewPaneOpened
OrInterrupted(n.SequenceNumberManager.getSequenceNumber());n.InstrumentationHelper.
logClientInstEvent(e,"MiniSERPError",n.SequenceNumberManager.getSequenceNumber(),u)
},t.prototype.renderOfflineMessage=function(t){for(var
e,o=n.isBrowserOnline(),f=n.Host.getLocString("PreviewPaneOfflineTitle"),r=n.Host.g
etLocString("PreviewPaneOfflineMessage").split("{0}"),u=[],s=r.length-
1,i=0;i<r.length;i++)i==s?u.push({text:r[i],click:function(){return
n.Host.launchUri("ms-
settings:troubleshoot")}}):u.push({text:r[i]});e={isOnline:o,previewPaneTitle:f,pre
viewPaneItems:u,fullPartialQuery:t,narratorMessage:f};this._onPreviewPaneErrored(e)
},t.prototype.renderErrorMessage=function(t){for(var
f,e=n.isBrowserOnline(),r=n.Host.getLocString("PreviewPaneErrorMessage").split("{0}
"),u=[],o=n.Host.getLocString("PreviewPaneErrorMessage",t)+"
"+n.Host.getLocString("PreviewPaneTimeoutMessage"),i=0;i<r.length;i+
+)u.push({text:r[i]});f={isOnline:e,previewPaneTitle:"",previewPaneItems:u,fullPart
ialQuery:t,narratorMessage:o};this._hasErrored=!
0;this._onPreviewPaneErrored(f)},t.prototype.downloadAndDisplayMiniSerp=function(t,
i,r,u){var f=this,s=!1,o,c,l,a,v,p,e,y,w,b,k;(n.TestHookUrlParameters||
n.MockUrlParameters)&&(s=!!n.MockUrlParameters,o=n.TestHookUrlParameters!
==null&&n.TestHookUrlParameters!==void 0?
n.TestHookUrlParameters:n.MockUrlParameters,c=o.previewPaneUrlOverride,i=c?
decodeURIComponent(c):n.UrlParameters.copyTestParametersTo(i),s&&(i=ThresholdUtilit
ies.setUrlParameter(i,"client","windowsMiniSerp")),l=o.miniSerpBag,l&&(i=ThresholdU
tilities.setUrlParameter(i,"bag",l)),a=o.dummyref,a&&(i=ThresholdUtilities.setUrlPa
rameter(i,"dummyref",a)),v=o.clientIP,v&&(i=ThresholdUtilities.setUrlParameter(i,"c
lientip",v)));p=u==0;sj_evt.fire(n.MiniSerpFetchEvent,t,p);e=n.Host.getCustomHeader
s(null);e["X-BM-DeviceDimensionsLogical"]=h+"x"+this._root.clientHeight;e["X-BM-
DeviceDimensions"]=String(Math.round(h*this._deviceScale))
+"x"+this._root.clientHeight;s||(e["User-Agent"]=navigator.userAgent+"
RestrictedAPI");r&&(e["Content-
Type"]=r.contentType);n.config.msbMockToken&&(y=_w.BingAtWork&&_w.BingAtWork.wsb&&_
w.BingAtWork.wsb.wsbAccessToken,y&&(e.Authorization="Bearer "+y));typeof
n.isMsbWorkScope=="function"&&n.isMsbWorkScope(t.handoffType)&&n.config.wsbWorkScop
eWsbPrefetchEnabled&&(this.bindWsbPrefetchResponseWithModel(),this.fetchUnifiedSear
ch(t.query),this.fetchTenantSettings(),this.fetchUserConfigs());e["X-Search-
SafeSearch"]="Strict";w=++this._previewRequestId;b=function(u)
{if(f._shouldRenderMiniSerp)sb_ct(f._ppMiniSerpRenderTimer),f._ppMiniSerpRenderTime
r=null,f._shouldRenderMiniSerp=!1;else
return;f.miniSERPRenderTimeoutInstrumentation("miniSerpViewModelCallback");var
o=n.getCurrentTime();f._previewPaneViewModelParent.onResponseReceived(o);u.status==
200&&u.responseText?(f._previousURLs.push(i),f.renderIframe(i,u.responseText,e,s,!!
r)):
(n.InstrumentationHelper.notifyTopHitPreviewPaneOpenedOrInterrupted(n.SequenceNumbe
rManager.getSequenceNumber()),f.miniSerpErrorInstrumentation("renderErrorMessage",o
,u),f.renderErrorMessage(t.query))};this._ppMiniSerpRenderTimer&&(sb_ct(this._ppMin
iSerpRenderTimer),this._ppMiniSerpRenderTimer=null);this._shouldRenderMiniSerp=!
0;k=(n.config.miniSERPRequestRetries+1)*n.config.miniSERPRequestTimeout+1e3;this._p
pMiniSerpRenderTimer=n.safeSetTimeout(function(){f._previewedSuggestion!
=null&&f._previewedSuggestion==t&&(f._shouldRenderMiniSerp=!
1,n.InstrumentationHelper.notifyTopHitPreviewPaneOpenedOrInterrupted(n.SequenceNumb
erManager.getSequenceNumber()),f.miniSERPRenderTimeoutInstrumentation("ppMiniSerpRe
nderTimeout"),f.stopLoadingScreen(),f.renderErrorMessage(t.query))},k,"ppMiniSerpRe
nderTimer");this.fetchMiniSerpUrl(i,r?r.data:null,e,b,w,r?
0:n.config.miniSERPRequestRetries)},t.prototype.isDarkModeEnabled=function(){var
t=n.Host.getWindowsTheme();return
t==2},t.prototype.fetchMiniSerpUrl=function(t,i,r,u,f,o){var
h=this,s;this.isMsbPerfLogEnabled()&&bfbWsbTel.logPerf("miniSERP::fetchMiniSerpUrl"
);s=u;o>0&&(s=function(i){if(i.result==0&&i.responseText)u(i);else{var
s={Url:t,StatusCode:i.status.toString(),Timeout:n.config.miniSERPRequestTimeout.toS
tring(),RetriesRemaining:o.toString()};n.InstrumentationHelper.logClientInstEvent(e
,"MiniSERPRefetch",n.SequenceNumberManager.getSequenceNumber(),s);h.fetchMiniSerpUr
l(t,null,r,u,f,o-1)}});n.config.isThemeAware&&this.isDarkModeEnabled()&&!
t.includes("&darkschemeovr=1")&&(t+="&darkschemeovr=1");n.config.useCobaltCSS&&!
t.includes("addfeaturesnoexpansion=wsbcobalt")&&(t+="&addfeaturesnoexpansion=wsbcob
alt");n.Host.isBingWallpaperAppInstalled()&&(t+="&BWPA=1");n.fetchUrl(t,r,i,s,null,
function(){return f==h._previewRequestId},!0,i?
undefined:n.config.miniSERPRequestTimeout)},t.prototype.renderIframe=function(t,i,r
,u,f){var
e=this;this.clearContent();this.isMsbPerfLogEnabled()&&bfbWsbTel.logPerf("miniSERP:
:renderIframe");this._iframe=sj_ce("iframe",n.MiniSerpIframeId);this._iframe.setAtt
ribute("scrolling","no");this._contentContainer.appendChild(this._iframe);var
s=this._iframe.contentWindow,o=this._iframe.contentDocument,h=!1,c=typeof
n.isMsbWorkScope=="function"&&n.isMsbWorkScope(this._currentHandoffType);this._foot
er&&(n.setVisibility(this._footer,!f),n.setVisibility(this._mask,!
f));this.setIframeHeight(0);this._onIFrameLoadedCallback=function(){var
i,f,h;c&&(n.config.wsbWorkScopeWsbPrefetchEnabled&&e.handleWsbPrefetch(),e.handleLo
adingStateForWorkScope());i=o.body;f=0;e._calculateIFrameHeight=function(){var
n=i.offsetHeight;n!
=f&&n>0&&(f=e.setIframeHeight(n))};e._calculateIFrameHeight();e.overrideAjaxCalls(s
,r,u);e.captureNavigationsAndSizeEvents(t,i,s,o);e._scrollArea.scrollTop=0;n.config
.backStackSearchEnabled&&(e._shouldAddSearchBackStack=!
0,e._currentBackStackTimeout&&clearTimeout(e._currentBackStackTimeout),e._currentBa
ckStackTimeout=sb_st(function(){e._shouldAddSearchBackStack=!
1},n.config.miniSerpRedirectTimeoutInMs));n.contains([2,3],e._currentVertical)&&(h=
{childList:!0,subtree:!0},e._mutationObserver=new MutationObserver(function()
{e._calculateIFrameHeight&&e._calculateIFrameHeight()}),n.safeExecute(function()
{e._currentVertical===2?
e._mutationObserver.observe(o.getElementById("images"),h):e._currentVertical===3&&e
._mutationObserver.observe(o.getElementById("video"),h)},"onIFrameLoadedCallback"))
;e._msRewardsViewModel&&e._msRewardsViewModel.isRewardsEnabled()&&s.sj_rra&&s.sj_rr
a(t);e._timestampFirstRender=n.getCurrentTime();e.instrumentOnPreviewPaneRendered(!
0,!1)};this._iframe.onload=function()
{if(e.isMsbPerfLogEnabled()&&bfbWsbTel.logPerf("miniSERP::_iframe.onload"),c&&(e._s
crollArea.scrollTop=0,n.config.wsbWorkScopeWsbPrefetchEnabled&&(e.clearWsbPrefetchS
torage(),e.stopLoadingScreen())),h){e.tryLaunchUrl(t,s.location.href,0);return}h=!
0;e.overrideAjaxCalls(s,r,u)};this.isMsbPerfLogEnabled()&&bfbWsbTel.logPerf("miniSE
RP::iFrameDocument.open");o.open();o.write(i);o.write("<base href='"+t+"'
target='_parent'
/>");o.write("<script>window.parent.sj_evt.fire('"+n.MiniSerpLoadedEvent+"')<\/
script>");o.close();this.isMsbPerfLogEnabled()&&bfbWsbTel.logPerf("miniSERP::iFrame
Document.close")},t.prototype.setIframeHeight=function(n){return
n<c&&(n=c),this._iframe.style.height=n+"px",n},t.prototype.overrideAjaxCalls=functi
on(t,i,r){var u=this;t.sj_gx=function(){var t=sj_gx(),f=t.open;return
t.open=function(e,o,s,h,c){if(u.blockedMiniSERPUrls.some(function(n){return
o.startsWith(n)}))throw new Error("MiniSERP blocked URL request: iFrame URL:
"+u._iframe.contentDocument.baseURI+" requestUrl:
"+o);e=="GET"&&r&&(o=ThresholdUtilities.setUrlParameter(o,"client","windowsMiniSerp
"));n.config.isThemeAware&&u.isDarkModeEnabled()&&!
o.includes("&darkschemeovr=1")&&(o=ThresholdUtilities.setUrlParameter(o,"darkscheme
ovr","1"));n.config.useCobaltCSS&&!
o.includes("&addfeaturesnoexpansion=wsbcobalt")&&(o=ThresholdUtilities.setUrlParame
ter(o,"addfeaturesnoexpansion","wsbcobalt"));f(e,o,s,h,c);for(var l in
i)t.setRequestHeader(l,i[l])},t}},t.prototype.captureNavigationsAndSizeEvents=funct
ion(t,i,r,u){var
f=this,c;this._focusHelper=this.createFocusHelper(r,u);this._focusHelper&&(this._or
iginalMiniSerpXYFocusRoot=this._focusHelper.getXYFocusRoot());this._previewPaneView
ModelParent.focusPending&&(this._previewPaneViewModelParent.focusPending=!
1,this.focus());this._iframe.contentWindow.overlay_onBeforeContentLoad=function()
{f.setIframeHeight(ht)};this._iframe.contentWindow.overlay_onBeforeSuccess=function
(n){f.setIframeHeight(n.clientHeight+ct)};var o=function(){r.sj_lc=function(n)
{if(n)f.tryLaunchUrl(t,n,0);else{var i=f._previousURLs[f._previousURLs.length-
2];f._previousURLs.splice(f._previousURLs.length-
2,2);f.tryLaunchUrl(t,i,0)}};r.MiniSerp=!
0;f._calculateIFrameHeight()},h=function(n)
{f._focusHelper.setXYFocusRoot(n);f._focusHelper.moveFocusToEdgeFocusableElement(0)
},s=r.sj_evt;s?(c=["onP1","ajaxReady"],c.forEach(function(n){return
s.bind(n,o)}),s.bind("l2_overlay_visible",function(n){o();var
t=f._iframe.contentDocument.getElementById(n[1]);t&&(f._focusHelper.setIsL2Visible(
!0),h(t))}),s.bind("l2_overlay_hidden",function()
{o();f._focusHelper.setIsL2Visible(!
1);h(f._iframe.contentDocument.body)})):o();r.open=function(n){return
f.tryLaunchUrl(t,n,0),null};i.onclick=function(i){var r=i.target;if(r)
{if(r.id=="miniSERPToWeb")
{n.InstrumentationHelper.logClientInstEvent(e,"AdultExplicitLoad",n.SequenceNumberM
anager.getSequenceNumber(),
{url:t,query:f._previewedSuggestion.query});f._footer.click();return}while(r&&!
r.href)r=r.parentNode}r&&f.tryLaunchUrl(t,r.href,n.getInputType(i))==0&&i.preventDe
fault()}},t.prototype.navigateInPlace=function(t,i,r,u){var
s=this,f=y(u),e,o;this._previewPaneViewModelParent.onBeforeItemLaunch(i,r,f);this._
footer&&(this._footer.onclick=function(){return
n.Host.launchSearch(null,s.enrichBingSearchUrlParameters(t),!
1)});this.clearContent();this._previewPaneViewModelParent.focusPending=!
0;this.startLoadingScreen();e=this.enrichBingSearchUrlParameters(t,!
0);this.setVertical(u);o={destinationVertical:u.toString(),url:t};n.Instrumentation
Helper.logClientInstEvent("Select","Navi
gateInPlace",n.SequenceNumberManager.getSequenceNumber(),o);this.downloadAndDisplay
MiniSerp(this._previewedSuggestion,e,null,1);this._previewPaneViewModelParent.onAft
erItemLaunch(f)},t.prototype.tryLaunchUrl=function(t,i,r){var e,u,o,f,h,s,c,l;if(!
i)return 1;if(e=n.getCurrentTime(),i=i.trim(),u=i.toLowerCase(),o=p(i),o!
==null&&v(i)&&!a(u)&&kt(i)&&o!==this._currentVertical)return
this.navigateInPlace(i,e,r,o),0;if(u.startsWith("javascript:location.reload"))retur
n 0;if(i==t+"#"||u.startsWith("javascript:"))return 1;if(u=="/loading")return
0;if(i.startsWith(window.location.href))return
SharedLogHelper.LogError("previewPane.tryLaunchUrl",t,new Error("Anchor navigation
on PreviewPane")),0;if(i.startsWith("/")&&(i=n.getWindowProtocol()
+"//"+n.getWindowHost()+i),f=p(i),f)
{if(f==this._currentVertical&&v(i)&&lt.some(function(n){return
u.includes(n)}))return
this.navigateInPlace(i,e,r,f),0;i=this.enrichBingSearchUrlParameters(i)}h=f?
y(f):2;this._previewPaneViewModelParent.onBeforeItemLaunch(e,r,h);s=n.tryGetBingPat
hLC(i);s?st.some(function(n){return s.startsWith(n)})||a(u)?
n.Host.launchUri(n.config.settingsUri):s.startsWith("/profile/interests")?
n.Host.launchCat1(null,"ms-cortana://navigate/Notebook",null):
(this._shouldAddSearchBackStack&&i.indexOf("aclk?ld=")>-
1&&(sb_ct(this._currentBackStackTimeout),i=this.buildAdsRedirectUrl(this._previewed
Suggestion.query,i)),n.Host.launchUri(i)):(this._shouldAddSearchBackStack&&!
u.startsWith("ms-settings")&&(sb_ct(this._currentBackStackTimeout),typeof
n.isMsbWorkScope=="function"&&n.isMsbWorkScope(this._previewedSuggestion.handoffTyp
e)&&this._iframe?(c="form="+n.mapOSFormCode("WSBWS0")
+"&cvid="+n.encodeQueryParameter(n.Host.getConversationId()),l=i.includes("?")?"&":
"?",i=""+i+l+c):i=this.buildRedirectUrl(this._previewedSuggestion.query,i)),n.Host.
launchUri(i));this._previewPaneViewModelParent.onAfterItemLaunch(h);return
0},t.prototype.enrichBingSearchUrlParameters=function(n,t){return t===void 0&&(t=!
1),n=this._navigationHelper.enrichUrlWithMarketInfo(n),n=this._navigationHelper.enr
ichUrlWithDeviceInfo(n),n=this._navigationHelper.enrichUrlWithCvid(n),n=this._navig
ationHelper.enrichUrlWithSuggestionType(n,this._previewedSuggestion.type),t||
(n=this._navigationHelper.enrichUrlWithMuidInfo(n),n=this._navigationHelper.enrichU
rlWithSafeSearchInfo(n)),n},t.prototype.createFocusHelper=function(n,t){var
i=this.getSearchAppWinJSXYFocus(n);return!
i&&SearchAppWinJS&&SearchAppWinJS.initXYFocus&&(SearchAppWinJS.initXYFocus(n),i=thi
s.getSearchAppWinJSXYFocus(n),n[rt]=i?!0:!1),i?new
s(t,n,i,this._scrollArea,this._currentVertical):null},t.prototype.getSearchAppWinJS
XYFocus=function(n){var i,t=n[ut];return
t&&t.UI&&(i=t.UI.XYFocus),i},t.prototype.tryExecuteFocusOnMiniSerp=function(n){var
t=!1;return this._focusHelper&&(t=n()),t||this._footer&&(this._footer.focus(),t=!
0),t},t.prototype.buildAdsRedirectUrl=function(t,i){var r=new URL(i);return!r||!
r.search||r.search.length<1?i:_w.location.protocol+"//"+_w.location.host+"/WS/
redirect/?q="+n.encodeQueryParameter(t)+"&form="+n.mapOSFormCode("WSBBST")
+"&cvid="+n.encodeQueryParameter(n.Host.getConversationId())
+"&rtk="+this._iframe.contentWindow.rtk+"&"+r.search.substring(1)},t.prototype.buil
dRedirectUrl=function(t,i){return
_w.location.protocol+"//"+_w.location.host+"/WS/redirect/?
q="+n.encodeQueryParameter(t)+"&url="+btoa(i)+"&form="+n.mapOSFormCode("WSBBST")
+"&cvid="+n.encodeQueryParameter(n.Host.getConversationId())
+"&rtk="+this._iframe.contentWindow.rtk},t.prototype.isMsbPerfLogEnabled=function()
{return n.config.msbEnablePerfLog&&_w.bfbWsbTel&&typeof
n.isTenantMsbEnabled=="function"&&n.isTenantMsbEnabled()},t.prototype.fetchTenantSe
ttings=function()
{this._msbPrefetch&&(this._msbPrefetch.fetchTenantSettings(),this._msbPrefetch.isTe
nantSettingsPrefetchStarted=!1)},t.prototype.fetchUserConfigs=function()
{this._msbPrefetch&&this._msbPrefetch.fetchUserConfigs()},t.prototype.fetchUnifiedS
earch=function(t){if(this._msbPrefetch&&this._msbContext)
{this._msbContext.query=t;var i=n.config.msbWorkScopeScenarioNameEnabled?
b:undefined;this._msbPrefetch.substrateUnifiedSearch("All",null,!
0,i)}},t.prototype.bindWsbPrefetchResponseWithModel=function(){var
t=this;this._wsbPrefetchGuid=n.Host.createGuid();this._wsbPrefetchModel={};u.forEac
h(function(n){var i;t._wsbPrefetchModel[n]={status:"inprogress"};i=function(r){var
u={status:"done",response:r};t._wsbPrefetchModel[n]=u;sj_evt.unbind(n,i)};sj_evt.bi
nd(n,i,!1,0,!0)})},t.prototype.handleLoadingStateForWorkScope=function()
{this.handleLoadingStateEvent(wt)},t.prototype.handleLoadingStateEvent=function(n)
{var u=this,t,i,r;((i=(t=this._iframe)===null||t===void 0?void
0:t.contentWindow)===null||i===void 0?void 0:i.sj_evt)&&(r=function(){var
t;u.stopLoadingScreen();(t=u._iframe.contentWindow.sj_evt)===null||t===void 0?void
0:t.unbind(n,r)},this._iframe.contentWindow.sj_evt.bind(n,r,!0,0,!
0))},t.prototype.handleWsbPrefetch=function(){var
n=this;this._iframe.contentWindow&&(this._iframe.contentWindow[pt]=this._wsbPrefetc
hGuid,u.forEach(function(t){var
i=n._wsbPrefetchModel[t],r=""+o+t+"-"+n._wsbPrefetchGuid,u;if(i)
{u=JSON.stringify(i);try{n._iframe.contentWindow.sessionStorage.setItem(r,u)}catch(
f)
{}}}));this.bindAndSetWsbPrefetchToChildIframeStorage()},t.prototype.bindAndSetWsbP
refetchToChildIframeStorage=function(){var
n=this;this._iframe.contentWindow&&u.forEach(function(t){var i=function(r){var
u,f;if(r){var
s={status:"done",response:r},h=JSON.stringify(s),e=""+o+t;try{((u=n._iframe)===null
||u===void 0?void
0:u.contentWindow)&&(n._iframe.contentWindow.sessionStorage.setItem(e,h),
(f=n._iframe.contentWindow.sj_evt)===null||f===void 0?void
0:f.fire(""+l+e+"-"+n._wsbPrefetchGuid,s))}catch(c)
{}}sj_evt.unbind(t,i)};sj_evt.bind(t,i,!1,0,!
0)})},t.prototype.clearWsbPrefetchStorage=function(){var t=this,n;
((n=this._iframe)===null||n===void 0?void
0:n.contentWindow)&&(u.forEach(function(n){var i,r,u=""+o+n;
(r=(i=t._iframe)===null||i===void 0?void 0:i.contentWindow)===null||r===void 0?void
0:r.sessionStorage.removeItem(u)}),this._wsbPrefetchModel={})},t}
();n.MiniSerpViewModel=w;s=function(){function u(t,i,r,u,f,e){var
o=this,s;this._targetDocument=t;this._targetWindow=i;this._searchAppXYFocus=r;this.
_scrollArea=u;this._verticalType=f;this._useStickyFocusOverride=e;this._isL2Visible
=!1;this._useStickyFocus=!1;(n.TestHookUrlParameters===null||
n.TestHookUrlParameters===void 0?void 0:n.TestHookUrlParameters.stickyFocus)===!
0&&(this._useStickyFocus=!0);this._useStickyFocusOverride!
=null&&(this._useStickyFocus=this._useStickyFocusOverride);var h="b_hide",c="acc-
inactive",l=".b_slidebar";this._focusDiv=sj_ce("div",k,h);t.body.appendChild(this._
focusDiv);sj_be(t,"blur",function(t){o._useStickyFocus?(!
t.srcElement.offsetParent||t.srcElement.classList.contains("b_hide")||
t.relatedTarget)&&n.setVisibility(o._focusDiv,!1):n.setVisibility(o._focusDiv,!
1)},!0);s=!0;sj_be(t,"click",function(){return s=!1},!
0);sj_be(t,"keydown",function(){return s=!0},!0);sj_be(t,"focus",function(){return
o.updateFocusedElementAndOutline(o._targetDocument.activeElement,s)},!
0);sj_be(t,"scroll",function(n)
{o._lastElementFocused&&(n.srcElement==o._lastElementFocused||
o._lastElementFocused.compareDocumentPosition(n.srcElement)&Node.DOCUMENT_POSITION_
CONTAINS)&&o.updateFocusedElementAndOutline(o._lastElementFocused,s)},!
0);sj_be(t,"transitionend",function(n){var t=o._targetDocument.activeElement;
(n.propertyName=="height"||n.srcElement==t.closest(l))&&(o._focusOutlineTimeout?
(o.clearFocusOutlineTimeout(),o.outlineElementAndScrollIntoView(t)):o._focusDiv.cla
ssList.contains(h)||
o.outlineElementAndScrollIntoView(t),n.srcElement.style.height=="0px"?
n.srcElement.classList.add(c):n.srcElement.classList.remove(c))});this._searchAppXY
Focus.keyCodeMap.home.push(36);this._searchAppXYFocus.keyCodeMap.end.push(35)}retur
n u.prototype.getXYFocusRoot=function(){return
this._searchAppXYFocus.focusRoot},u.prototype.isL2Visible=function(){return
this._isL2Visible},u.prototype.setIsL2Visible=function(n)
{this._isL2Visible=n},u.prototype.setXYFocusRoot=function(n)
{this._searchAppXYFocus.focusRoot=n},u.prototype.moveFocus=function(n,t){return
this._searchAppXYFocus._xyFocus(n,t)},u.prototype.moveFocusToEdgeFocusableElement=f
unction(n,t){var i,h;if(t===void 0&&(t=!
1),this._targetWindow.focus(),t&&n==0)i=this.focusFirstSerpElement();else{var
f=void 0,e=void 0,u=void
0,o=this._targetWindow.innerWidth,s=this._targetWindow.innerHeight;n==0?(f=-
1,e=0,u=40):n==1&&(f=s,e=s+1,u=38);h={top:f,bottom:e,right:o,left:0,height:1,width:
o};i=this._searchAppXYFocus._xyFocus(r[u],u,h)}return
i&&(this.scrollTo(n),this.updateFocusedElementAndOutline(this._targetDocument.activ
eElement)),i},u.prototype.onSearchBoxFocusChanged=function()
{this._targetDocument.hasFocus()?
this.updateFocusedElementAndOutline(this._targetDocument.activeElement):this._useSt
ickyFocus||n.setVisibility(this._focusDiv,!1)},u.prototype.isVisible=function(n)
{var t=_w.getComputedStyle(n);return!(t.visibility=="hidden"||t.display=="none"||
n.offsetWidth===0&&n.offsetHeight===0)},u.prototype.moveFocusToLastFocusedElement=f
unction(){return
this._lastElementFocused&&this.isVisible(this._lastElementFocused)?
(this._lastElementFocused.focus(),this.updateFocusedElementAndOutline(this._lastEle
mentFocused),!0):this.moveFocusToEdgeFocusableElement(0,!
0)},u.prototype.updateFocusedElementAndOutline=function(t,i){var r=this,u;(i===void
0&&(i=!0),t&&t!
=this._targetDocument.body)&&(this.processFocusedElement(t),i)&&(u=this._lastElemen
tFocused&&t.elementType&&t.elementType==this._lastElementFocused.elementType&&t.par
entElement==this._lastElementFocused.parentElement?it:0,u?
(n.setVisibility(this._focusDiv,!
1),this._focusOutlineTimeout=n.safeSetTimeout(function()
{r._targetDocument.activeElement==t&&r.outlineElementAndScrollIntoView(t);r.clearFo
cusOutlineTimeout()},u,"updateFocusedElementAndOutline")):this.outlineElementAndScr
ollIntoView(t),this._lastElementFocused=t)},u.prototype.outlineElementAndScrollInto
View=function(t){var
u,o,s;if(t!=this._targetDocument.body&&(this._useStickyFocus||
this._targetDocument.hasFocus())){var
r=t.getBoundingClientRect(),y=this._targetDocument.documentElement.scrollWidth-
i*2,p=this._targetDocument.documentElement.scrollHeight-
i*2,h=r.top+this._targetWindow.pageYOffset,e=r.left+this._targetWindow.pageXOffset,
w=y-e,b=p-h,c=e<0?Math.floor(r.width+e-i):r.width;if(c<=0)
{n.setVisibility(this._focusDiv,!
1);return}if(u=r.height,u<=0&&t.children.length>0)for(o=0;o<t.children.length;o+
+)s=t.children[o].getBoundingClientRect(),s.height>u&&(u=s.height,h=s.top);this._fo
cusDiv.style.top=Math.max(i,h)
+"px";this._focusDiv.style.left=Math.max(this.isL2Visible?i:i*4,e)
+"px";this._focusDiv.style.width=Math.min(w,c)
+"px";this._focusDiv.style.height=Math.min(b,u)
+"px";n.setVisibility(this._focusDiv,!0);var
l=t.getBoundingClientRect(),a=this._scrollArea.offsetHeight+this._scrollArea.scroll
Top-l.bottom-f,v=l.top-this._scrollArea.scrollTop-f;a<0?
this._scrollArea.scrollTop+=f-a:v<0&&(this._scrollArea.scrollTop+=v-
f)}},u.prototype.scrollTo=function(n){var
t=0;n==1&&(t=this._scrollArea.scrollHeight);this._scrollArea.scrollTop=t},u.prototy
pe.processFocusedElement=function(i){var r=this,u,e,o,c,f,s,h;i.isProcessed||
(u=i.tagName.toLocaleLowerCase(),e=i.getAttribute("type"),u=="select"&&(sj_be(i,"ke
ydown",function(n){n.keyCode==32?
i.classList.add(t):n.keyCode==13&&i.classList.remove(t)},!
0),this.reactivateXYFocusOnBlur(i)),u=="input"&&e=="range"&&(sj_be(i,"keydown",func
tion(n){var
r=n.target,f=+r.getAttribute("min"),e=+r.getAttribute("step"),u=n.keyCode==37,o=n.k
eyCode==39,s=+r.value-e<f&&u;n.keyCode==38||n.keyCode==40||s?i.classList.remove(t):
(u||o)&&i.classList.add(t)},!0),this.reactivateXYFocusOnBlur(i)),o=function(n,r)
{var u;if(!r.readOnly){if(u=r.selectionStart!=r.selectionEnd,u)
{i.classList.add(t);return}var
f=r.selectionEnd==0,e=r.selectionEnd==r.value.length,o=n.keyCode==36&&!
f,s=n.keyCode==35&&!e,h=n.keyCode==37&&!f,c=n.keyCode==39&&!e;h||c||o||s?
i.classList.add(t):i.classList.remove(t)}},u=="textarea"&&(sj_be(i,"keydown",functi
on(n){return o(n,n.target)},!
0),this.reactivateXYFocusOnBlur(i)),u=="input"&&(e=="number"||
e=="text")&&(sj_be(i,"keydown",function(n){return o(n,n.target)},!
0),this.reactivateXYFocusOnBlur(i)),g.some(function(n){return
i.classList.contains(n)})?
(i.elementType="slide",c=Array.prototype.slice.call(i.querySelectorAll("a:not([oncl
ick='TestHooks.HideShowTestHooks(this);']):not([disabled])"),0),f=c.filter(function
(n){return
r.isVisible(n)&&n.offsetHeight>0&&n.offsetWidth>0}),f&&sj_be(i,"keydown",function(n
){var t=r.countUniqueHrefs(f),u=n.keyCode;n.srcElement==i&&(t>1&&u==40?
(n.preventDefault(),r._searchAppXYFocus.focusRoot=i,f[0].focus()):t==1&&u==13&&f[0]
.click())})):nt.some(function(n){return i.hasAttribute(n)})?
(i.elementType="expansion",s=function(t){t===void 0&&(t=!
0);n.setVisibility(r._focusDiv,!
1);r.updateFocusedElementAndOutline(r._targetDocument.activeElement,t)},sj_be(i,"ke
yup",function(n){n.keyCode==13&&s()},!0),sj_be(i,"click",function(){s(!
1)})):i.classList.contains(tt)&&(h=function(){var
n=r._targetDocument.getElementById("vidPreStopButton"),t,u;n&&n.focus();t=function(
){i.focus()};sj_be(n,"click",t);sj_be(n,"keydown",function(n)
{n=sj_ev(n);n.keyCode===13&&t()});u=r._targetDocument.getElementsByTagName("video")
[0];sj_be(u,"ended",t)},sj_be(i,"keydown",function(n){n.keyCode==13&&h()},!
0),sj_be(i,"click",function(){h()})),i.classList.add(d),i.isProcessed=!
0)},u.prototype.countUniqueHrefs=function(n){var
r={},t,i;if(n)for(t=0;t<n.length;t++)i=n[t],i&&(r[i.href]=!0);return
Object.keys(r).length},u.prototype.reactivateXYFocusOnBlur=function(n)
{sj_be(n,"blur",function()
{n.classList.remove(t)})},u.prototype.focusFirstSerpElement=function(){var
n,i,t,r;switch(this._verticalType){case
1:n=this._targetDocument.getElementById("b_content");break;case
2:n=this._targetDocument.getElementById("images");break;case
3:n=this._targetDocument.getElementById("video");break;default:throw Error("Unknown
vertical type
"+this._verticalType);}if(n)for(i=n.querySelectorAll('a:not([onclick=\'TestHooks.Hi
deShowTestHooks(this);\']):not([disabled]):not([tabindex="-1"]),
button:not([disabled]), input[type=text]:not([disabled]),
input[type=submit]:not([disabled]), textarea:not([disabled]),
select:not([disabled]):not(#tta_sl):not(#tta_srcsl),
[tabindex]:not([disabled]):not([tabindex="-
1"]):not(#tta_playiconsrc)'),t=0;t<i.length;t++)if(r=i[t],this.isVisible(r))return
r.focus(),!0;return!1},u.prototype.clearFocusOutlineTimeout=function()
{sb_ct(this._focusOutlineTimeout);this._focusOutlineTimeout=null},u}
();n.WSBMiniSerpFocusHelper=s}(WSB||(WSB={})),function(n){function i(n,t){switch(n)
{case"arrowRight":case"button":case"submit":return
1;case"autoContent":case"keepOpen":case"alwaysWide":case"refresh":return
t&&t.inorganic?3:0;case"arrowUpOrDown":return 0;default:throw new Error("Unknown
open type: "+n);}}var t="noScroll",r=function(){function r(t,i,r,u,f){var
e=this;this._page=t;this._previewPaneId=0;this._beforeItemLaunchEventHandlers=[];th
is._afterItemLaunchEventHandlers=[];var l=function(n,t,i,r,u)
{e._clickLoggedForCurrentPreviewPane||
e._beforeItemLaunchEventHandlers.forEach(function(f){return
f(n,e._previewedSuggestion,t,i,r,u)})},a=function(n)
{e._clickLoggedForCurrentPreviewPane||
(e._afterItemLaunchEventHandlers.forEach(function(t){return
t(e._previewedSuggestion,e._queryForPreviewedSuggestion,n)}),e._clickLoggedForCurre
ntPreviewPane=!0)},v=function(t){var
i,r,u;e._previewPaneResponseReceivedTimeStamp=t;u=((i=e._activePreviewPaneViewModel
)===null||i===void 0?void 0:i.getCurrentHandoffType)?
((r=e._activePreviewPaneViewModel)===null||r===void 0?void
0:r.getCurrentHandoffType())===21:!1;(n.TestHookUrlParameters===null||
n.TestHookUrlParameters===void 0?void 0:n.TestHookUrlParameters.isLoading)||!
e.isPreviewPaneWithLoaderViewModel(e._activePreviewPaneViewModel)||u||
e._activePreviewPaneViewModel.stopLoadingScreen()};this._previewPaneViewModelParent
={focusPending:!
1,onBeforeItemLaunch:l,onAfterItemLaunch:a,onResponseReceived:v};var
o=_ge("localPane"),s=_ge("miniSerpPane"),h=_ge("msbPane"),c=_ge("goodNewsPane");i.i
nit(this._previewPaneViewModelParent,s);r&&r.init(this._previewPaneViewModelParent,
o);u&&u.init(this._previewPaneViewModelParent,h);f&&f.init(this._previewPaneViewMod
elParent,c);SearchAppWrapper.CortanaApp.addEventListener("resettingtodefaultsize",f
unction(){return e.dismiss()});n.Host.bindKeyDown(function()
{e._previewPaneViewModelParent.focusPending=!
1});n.Host.bindSearchBoxGotFocus(function(){return
e._previewPaneViewModelParent.focusPending=!
1});n.Host.bindQueryChangedOrInitialized(function(n){return e._currentQuery=n},!
0);n.Host.bindAccountChanged(function(){e._miniSerpMustRefresh=!
0});n.InstrumentationHelper.bindFinalizeKeystroke(function(n)
{e._activePreviewPaneViewModel&&n&&e._activePreviewPaneViewModel.finalizeKeystroke(
)});this._previewPaneInfos=[];this._previewPaneInfos[0]={paneElement:_ge("errorPane
"),viewModel:null};this._previewPaneInfos[1]={paneElement:s,viewModel:i,disableRoot
Scroll:!
0};this._previewPaneInfos[2]={paneElement:o,viewModel:r,disableRootScroll:n.config.
useCobaltCSS?!0:!
1};this._previewPaneInfos[3]={paneElement:h,viewModel:u};this._previewPaneInfos[4]=
{paneElement:c,viewModel:f};this._previewPaneScrollElement=_ge("qfPreviewScrollArea
")}return r.prototype.init=function(n)
{this._selectionHandler=n},r.prototype.getSelectableItems=function(){return
this._activePreviewPaneViewModel?
this._activePreviewPaneViewModel.getSelectableItems():
[]},r.prototype.getSelectableItemsByGroup=function(){return
this._activePreviewPaneViewModel?
this._activePreviewPaneViewModel.getSelectableItemsByGroup():
[]},r.prototype.getSelectedItem=function(){return this._activePreviewPaneViewModel?
this._activePreviewPaneViewModel.getSelectedItem():null},r.prototype.select=functio
n(n,t)
{this._activePreviewPaneViewModel&&this._activePreviewPaneViewModel.select(n,t)},r.
prototype.onAfterKeyDown=function(n,t,i,r){return this._activePreviewPaneViewModel?
this._activePreviewPaneViewModel.onAfterKeyDown(n,t,i,r):!
1},r.prototype.getPreviewedSuggestion=function(){return
this._previewedSuggestion},r.prototype.getPreviewedSuggestionToForceTopHit=function
(){return this._forceTopHitForPreviewedSuggestion&&!this._closeTimer?
this._previewedSuggestion:null},r.prototype.getOnPreviewPaneRendered=function(t,r,u
,f){var o=this,h=++this._previewPaneId,s=!
0,c=n.getCurrentTime(),e;if(this._instrumentedOpenThisImpression=!
1,e="None",t)switch(t.previewPaneType){case 2:e="Local";break;case
3:e="Msb";break;case 1:e="Web";break;case 4:e="GoodNews"}return n!
==undefined&&n.config.perfLogging&&n.WSBPerformance&&n.WSBPerformance.getInstance()
.beginMark("RenderPreviewPane - "+e),function(l,a,v){var y,p;if(l||!a){if(a||(s=!
1),!o._instrumentedOpenThisImpression){if(y={ppId:""+h,openType:r,suggestion:t?
t.instItem.getLayoutKValue():undefined,suggestionType:t?
t.type:undefined,startOpening:""+c,openDelay:u?""+u:undefined},v)for(p in
v)y[p]=v[p];y.waitingForMore=s?"true":undefined;n.InstrumentationHelper.previewPane
OpenedOrClosed(!0,n.SequenceNumberManager.getSequenceNumber(),t?
t.instItem:undefined,t?
t.previewPaneType:undefined,i(r,f)==0,y)}o._instrumentedOpenThisImpression=!
0;l&&(o._instrumentedOpenThisImpression=!1,r="keepOpen");!s&&n!
==undefined&&n.config.perfLogging&&n.WSBPerformance&&n.WSBPerformance.getInstance()
.endMark("RenderPreviewPane - "+e)}}},r.prototype.onPreviewPaneErrored=function(i)
{for(var f,r=0,u=this._previewPaneInfos;r<u.length;r+
+)f=u[r],n.setVisibility(f.paneElement,!
1);this._page.updateNarratorMessageView(null);this._previewPaneScrollElement.classL
ist.remove(t);this._page.updatePreviewErrorMessageView(i);n.setVisibility(this._pre
viewPaneInfos[0].paneElement,!
0);this._page.updateNarratorMessageView(i.narratorMessage)},r.prototype.showPreview
=function(t,r,u,f,e,o){var h=this,s;u===void 0&&(u="button");f===void 0&&(f=!
1);e===void 0&&(e=0);o===void 0&&(o=!
1);this.updateMsbWorkScopeSuggestion(t,r);this._previewPaneOpenedForThisQuery=!
0;this.clearSugg
OpeningState(this._pendingPreviewedSuggestion);this.clearOpenTimer();this.clearClos
eTimer();(r!=this._previewedSuggestion||f)&&(n.RuntimeConfig.AlwaysWide||
this._page.setPreviewPaneVisibility(!0),s=this.getOnPreviewPaneRendered(r,u,e,t),o?
n.InstrumentationHelper.notifyPreviewPanePending(n.SequenceNumberManager.getSequenc
eNumber(),r.previewPaneType,r.type):n.InstrumentationHelper.notifyTopHitPreviewPane
OpenedOrInterrupted(n.SequenceNumberManager.getSequenceNumber()),this.setPreviewPan
eContent(t,r,i(u,t),this._previewPaneId,s,function(n){return
h.onPreviewPaneErrored(n)}));u!
="button"&&this._selectionHandler.updateSelectionState(r)},r.prototype.updateMsbWor
kScopeSuggestion=function(t,i){var r,u,f,e=typeof
n.isMsbWorkScope=="function"&&n.isMsbWorkScope(i.handoffType);e&&(i.previousQuery=(
r=this._previewedSuggestion)===null||r===void 0?void
0:r.query,i.previousScope=(u=this._previewedSuggestion)===null||u===void 0?void
0:u.scope,i.query=t.queryToFetch,i.scope=t.scope,i.previousMsbVerticalHash=(f=this.
_previewedSuggestion)===null||f===void 0?void
0:f.msbVerticalHash)},r.prototype.showPreviewAndFocus=function(n,t,i){i===void
0&&(i="submit");(this._closeTimer||this._previewedSuggestion!
=t)&&this.showPreview(n,t,i);this._activePreviewPaneViewModel.focus(!
1);this._forceTopHitForPreviewedSuggestion=!0},r.prototype.focus=function(n){return
this._activePreviewPaneViewModel?(this._activePreviewPaneViewModel.focus(n),!0):!
1},r.prototype.blur=function()
{this._activePreviewPaneViewModel&&this._activePreviewPaneViewModel.blur()},r.proto
type.dismiss=function(){this.close(!0)},r.prototype.close=function(t){var
r=this,i;this.clearOpenTimer();i=t?0:n.config.closePreviewPaneDelay;i?
this._closeTimer||(this._closeTimer=n.safeSetTimeout(function()
{r._closeTimer=null;r.innerClose(t)},i,"ppCloseTimer")):
(this.clearCloseTimer(),this.innerClose(t))},r.prototype.innerClose=function(t){var
i,r;this._previewedSuggestion&&(i=!0,t&&(this._clickLoggedForCurrentPreviewPane?i=!
1:this._previewPaneResponseReceivedTimeStamp&&n.getCurrentTime()>this._previewPaneR
esponseReceivedTimeStamp+1e3&&(i=!1)),i&&(r=t?
{fromQFDismiss:"1"}:undefined,n.InstrumentationHelper.previewPaneOpenedOrClosed(!
1,n.SequenceNumberManager.getSequenceNumber(),this._previewedSuggestion.instItem,th
is._previewedSuggestion.previewPaneType,undefined,r)),n.RuntimeConfig.AlwaysWide||
t||this._page.setPreviewPaneVisibility(!
1),this.isPreviewPaneWithLoaderViewModel(this._activePreviewPaneViewModel)&&this._a
ctivePreviewPaneViewModel.stopLoadingScreen(),this.clear())},r.prototype.clear=func
tion(){for(var t=0;t<this._previewPaneInfos.length;+
+t)n.setVisibility(this._previewPaneInfos[t].paneElement,!
1);this._previewedSuggestion&&(this._previewedSuggestion.hasPreviewPaneOpened=!
1,this._selectionHandler.updateSelectionState(this._previewedSuggestion),this._prev
iewedSuggestion=null);this._forceTopHitForPreviewedSuggestion=!
1;this._clickLoggedForCurrentPreviewPane=!
1;this._previewPaneViewModelParent.focusPending=!
1;this._activePreviewPaneViewModel&&(this._activePreviewPaneViewModel.clear(),this.
isPreviewPaneWithLoaderViewModel(this._activePreviewPaneViewModel)&&this._activePre
viewPaneViewModel.stopLoadingScreen());this._queryForPreviewedSuggestion=null;this.
_previewPaneResponseReceivedTimeStamp=null;this._activePreviewPaneViewModel=null},r
.prototype.onQueryChanged=function(t,i){var
r,u;if(this._previewPaneOpenedForThisQuery=!
1,r=this._queryForPendingPreviewedSuggestion||
this._queryForPreviewedSuggestion,this._queryIsContinuationOfPreviousQuery=r&&t.que
ryToFetch.toLocaleLowerCase().startsWith(r.queryToFetch.toLocaleLowerCase()),r&&t.q
ueryToFetch.toLocaleLowerCase()!
=r.queryToFetch.toLocaleLowerCase())if(u=this._pendingPreviewedSuggestion&&this._pe
ndingPreviewedSuggestion.updateFromQuery?
this._pendingPreviewedSuggestion:this._previewedSuggestion&&!
this._closeTimer&&this._previewedSuggestion.updateFromQuery?
this._previewedSuggestion:null,u){if(n.RuntimeConfig.AlwaysWide)
{this.autoOpen(t,u,"alwaysWide",!0,!
0);return}this._queryIsContinuationOfPreviousQuery?
(this._forceTopHitForPreviewedSuggestion=!1,this.autoOpen(t,u,"keepOpen",!0,!
0)):this.close(!1)}else i&&this.autoOpen(t,i,"keepOpen",!0,!
0)},r.prototype.clearSuggOpeningState=function(n){n&&(n.isPreviewPaneOpening=!
1,this._selectionHandler.updateSelectionState(n))},r.prototype.clearOpenTimer=funct
ion()
{this._openTimer&&(sb_ct(this._openTimer),this._openTimer=null,this._pendingPreview
edSuggestion=null,this._queryForPendingPreviewedSuggestion=null,this.isPreviewPaneW
ithLoaderViewModel(this._activePreviewPaneViewModel)&&this._activePreviewPaneViewMo
del.stopLoadingScreen())},r.prototype.clearCloseTimer=function()
{this._closeTimer&&(sb_ct(this._closeTimer),this._closeTimer=null)},r.prototype.onT
opHitUpdated=function(t,i,r,u){if(r){if(!
this._closeTimer&&(this._openTimer&&this._pendingPreviewedSuggestion!
=r&&this.clearOpenTimer(),!this._miniSerpMustRefresh||r.previewPaneType!=1))
{if(r.scope=t.scope,this._pendingPreviewedSuggestion&&n.isEquivalentForPreviewPaneP
urposes(t,this._pendingPreviewedSuggestion,r))
{this._pendingPreviewedSuggestion=r;this._queryForPendingPreviewedSuggestion=t;r.ha
sPreviewPaneOpened=!
0;this._selectionHandler.updateSelectionState(r);return}if(this._previewedSuggestio
n&&n.isEquivalentForPreviewPanePurposes(t,this._previewedSuggestion,r)){(!
n.contains(u,i)||
r.previewPaneNeedsRefreshAfterDeduping)&&(this._previewedSuggestion=r,this._queryFo
rPreviewedSuggestion=t,r.hasPreviewPaneOpened=!
0,this._selectionHandler.updateSelectionState(r),this.refreshLocalContent(t,r,n.Seq
uenceNumberManager.getSequenceNumber()));return}}if(this._miniSerpMustRefresh=!
1,this._forceTopHitForPreviewedSuggestion=!1,r.previewPaneType)
{if(n.RuntimeConfig.AlwaysWide){this.autoOpen(t,r,"alwaysWide",!1,!
0);return}if(r==u[0]&&!this._previewPaneOpenedForThisQuery)
{if(r.autoOpenPreviewPaneWhenOnTopHit){this.autoOpen(t,r,"autoContent",!1,!
0);return}if(this._previewedSuggestion&&this._queryIsContinuationOfPreviousQuery)
{this.autoOpen(t,r,"keepOpen",!1,!
0);return}}}}this._openTimer&&(this.clearSuggOpeningState(this._pendingPreviewedSug
gestion),this.clearOpenTimer());this._previewedSuggestion&&this.close(!
1)},r.prototype.getDelayForMiniSerp=function(t,i,r){var
u=n.getTweakedSetting("preventAutomaticMiniSerp");switch(t)
{case"keepOpen":case"alwaysWide":return r&&r.inorganic?0:u?
Number.MAX_VALUE:n.config.probabilityNextKeyStrokeEnabled&&i.featureStore&&i.featur
eStore[264]!==undefined?
this.calculateDelayForProbabilitySignal(i.featureStore[264]):n.RuntimeConfig.Always
Wide?i.isAnswer?0:typeof
n.getTenantMsbStatus=="function"&&n.getTenantMsbStatus()===n.TenantMsbStatus.Enable
d?
n.config.msbMiniSerpDelay:n.config.autoOpenMiniSerpDelay:n.config.keepMiniSerpOpenD
elay;case"arrowUpOrDown":return u?
Number.MAX_VALUE:n.config.openOnKeybNavMiniSerpDelay}return
0},r.prototype.calculateDelayForProbabilitySignal=function(t){for(var
i=n.config.probabilityNextKeyStrokeThresholds.length-
1;i>=0;i--)if(t>=n.config.probabilityNextKeyStrokeThresholds[i])return
n.config.probabilityNextKeyStrokeDelays[i];return
0},r.prototype.shouldOpenMiniSerp=function(t){return
n.RuntimeConfig.MiniSERPMode==0||t.previewPaneType!=1?!1:t.isAnswer?
(n.RuntimeConfig.MiniSERPMode&1)!=0:t.type=="MD"?(n.RuntimeConfig.MiniSERPMode&2)!
=0:(n.RuntimeConfig.MiniSERPMode&4)!=4?!
1:t.query.length>=n.config.minPrefixLengthForMiniSerp},r.prototype.autoOpen=functio
n(t,i,r,u,f){var
e=this,s,h,o;n.InstrumentationHelper.notifyPreviewPaneStartRender(n.SequenceNumberM
anager.getSequenceNumber());f&&n.InstrumentationHelper.notifyPreviewPanePending(n.S
equenceNumberManager.getSequenceNumber(),i.previewPaneType,i.type);h=n.config.disab
leOfflineRequest?
n.isBrowserOnline()&&this.shouldOpenMiniSerp(i):this.shouldOpenMiniSerp(i);o=h?
this.getDelayForMiniSerp(r,i,t):0;o?((i===null||i===void 0?void
0:i.previewPaneType)!=((s=this._previewedSuggestion)===null||s===void 0?void
0:s.previewPaneType)&&this.clear(),typeof
n.isMsbWorkScope=="function"&&n.isMsbWorkScope(i.handoffType)||r!="arrowUpOrDown"||
(this.clear(),this.clearSuggOpeningState(this._pendingPreviewedSuggestion),this.cle
arSuggOpeningState(this._previewedSuggestion)),i.isPreviewPaneOpening=!
0,this._selectionHandler.updateSelectionState(i),this.clearOpenTimer(),this.clearCl
oseTimer(),this._pendingPreviewedSuggestion=i,this._queryForPendingPreviewedSuggest
ion=t,this.setActivePreviewPaneContainer(i,t),this._openTimer=o==Number.MAX_VALUE?
Number.MAX_VALUE:n.safeSetTimeout(function()
{e._openTimer=null;i=e._pendingPreviewedSuggestion;e._pendingPreviewedSuggestion=nu
ll;e._queryForPendingPreviewedSuggestion=null;e.showPreview(t,i,r,u,o,f)},o,"ppOpen
Timer"),!this.isPreviewPaneWithLoaderViewModel(this._activePreviewPaneViewModel)||!
this.isStartLoadingRequiredInWorkScopeScenarios(t,i)&&(r=="arrowUpOrDown"||
this._previewedSuggestion!=null)||
this._activePreviewPaneViewModel.startLoadingScreen()):this.showPreview(t,i,r,u,nul
l,f)},r.prototype.onAfterKeyDownWhenNewSelection=function(t,i,r){var
f=n.RuntimeConfig.AlwaysWide&&n.config.openOnKeybNavMiniSerp,u;if(n.isGroup(r))
{f&&(this.clearSuggOpeningState(this._pendingPreviewedSuggestion),this.clearSuggOpe
ningState(this._previewedSuggestion),n.InstrumentationHelper.notifyTopHitPreviewPan
eOpenedOrInterrupted(n.SequenceNumberManager.getSequenceNumber()),this.clear(),this
.clearOpenTimer(),this.clearCloseTimer(),this.isPreviewPaneWithLoaderViewModel(this
._activePreviewPaneViewModel)&&this._activePreviewPaneViewModel.stopLoadingScreen()
);return}u=r;u.previewPaneType?f&&(t==40||t==38||t==9)?(this._previewedSuggestion!
=u||typeof
n.isMsbWorkScope=="function"&&n.isMsbWorkScope(u.handoffType))&&this.autoOpen(i,u,"
arrowUpOrDown",!1,!
1):t==n.getRtlAdjustedKey(39)&&this._currentQuery.originalCursorPosition==this._cur
rentQuery.originalQuery.length&&n.Host.searchBoxHasFocus()?
this.showPreviewAndFocus(i,u,"arrowRight"):t==n.getRtlAdjustedKey(37)&&this._active
PreviewPaneViewModel&&this._activePreviewPaneViewModel.hasFocus()&&this._activePrev
iewPaneViewModel.readyToBlur()&&n.Host.
setFocusInSearchBox(t,"previewPaneUnfocus"):this.clear()},r.prototype.isStartLoadin
gRequiredInWorkScopeScenarios=function(t,i){var r,u=typeof
n.isMsbWorkScope=="function"&&n.isMsbWorkScope(i.handoffType),f=i.msbVerticalHash!
=""&&t.scope===n.Scope.Work,e=i.previousMsbVerticalHash!
=""&&i.msbVerticalHash==""&&t.scope===n.Scope.Work,o=((r=this._previewedSuggestion)
===null||r===void 0?void 0:r.query)!==t.queryToFetch&&t.scope===n.Scope.Work;return
u&&!f&&!o&&!e},r.prototype.refreshLocalContent=function(t,i,r){var
e=this,u=null,f;this._instrumentedOpenThisImpression&&(u=this.getOnPreviewPaneRende
red(i,"refresh",0,t));f=function(n){return
e.onPreviewPaneErrored(n)};n.InstrumentationHelper.notifyPreviewPanePending(r,i.pre
viewPaneType,i.type);this._activePreviewPaneViewModel.update(i,t,0,this._previewPan
eId,u,f,!0)},r.prototype.setActivePreviewPaneContainer=function(i,r){var
u=i.previewPaneType;i.previewPaneType!=2&&(this.shouldOpenMiniSerp(i)||
i.previewPaneType!=1)||
(u=2);n.setVisibility(this._previewPaneInfos[u].paneElement,!
0);this._activePreviewPaneViewModel=this._previewPaneInfos[u].viewModel;this._previ
ewPaneInfos[u].disableRootScroll?
this._previewPaneScrollElement.classList.add(t):this._previewPaneScrollElement.clas
sList.remove(t);this.shouldStartWorkScopeLoadingState(r.scope,i.handoffType)&&this.
isPreviewPaneWithLoaderViewModel(this._activePreviewPaneViewModel)&&this._activePre
viewPaneViewModel.startLoadingScreen()},r.prototype.shouldStartWorkScopeLoadingStat
e=function(t,i){var r=!0,u,f;return typeof
n.isMsbWorkScope=="function"&&n.isMsbWorkScope(i)&&(u=this._activePreviewPaneViewMo
del.isIframeActive?this._activePreviewPaneViewModel.isIframeActive():!
1,f=this._activePreviewPaneViewModel.getCurrentHandoffType?
this._activePreviewPaneViewModel.getCurrentHandoffType()===i:!1,r=!
(u&&f)),r},r.prototype.setPreviewPaneContent=function(t,i,r,u,f,e){typeof
n.isMsbWorkScope=="function"&&n.isMsbWorkScope(i.handoffType)||
this.clear();this._previewedSuggestion=i;this._previewedSuggestion&&(this._previewe
dSuggestion.hasPreviewPaneOpened=!
0,this._previewedSuggestion.isPreviewPaneOpening=!
1);this._previewPaneResponseReceivedTimeStamp=null;this._queryForPreviewedSuggestio
n=t;this.setActivePreviewPaneContainer(i,t);this._activePreviewPaneViewModel.update
(i,t,r,u,f,e,i.previewPaneNeedsRefreshAfterDeduping)},r.prototype.bindBeforeItemLau
nch=function(n)
{this._beforeItemLaunchEventHandlers.push(n)},r.prototype.bindAfterItemLaunch=funct
ion(n){this._afterItemLaunchEventHandlers.push(n)},r.prototype.hasFocus=function()
{return this._activePreviewPaneViewModel?
this._activePreviewPaneViewModel.hasFocus():!1},r.prototype.isOpened=function()
{return!!
this._previewedSuggestion},r.prototype.isPreviewPaneWithLoaderViewModel=function(n)
{var t;return!!((t=n)===null||t===void 0?void 0:t.startLoadingScreen)},r}
();n.PreviewPane=r}(WSB||(WSB={}));__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)}}(),function(n){var
t="NR",i="RF",r="CHN",u="OFL",f=function(f){function e(){return f!
==null&&f.apply(this,arguments)||this}return
__extends(e,f),e.prototype.fetchUrl=function(f,e,o,s,h,c){var
a=this,l;if(n.isBrowserOnline()){var w=o?
1:0,v=SearchAppWrapper.CortanaApp,y=v.createStringMap(),p=v.createStringMap();if(e)
for(l in e)l.toLowerCase().startsWith("content")?
p[l]=e[l]:y[l]=e[l];n.Async.safeChain("makeHttpRequestAsync",function(){return
v.makeHttpRequestAsync(w,f,y,o,p)},function(r){c()&&(r.statusCode===200?
n.Async.safeChain("readResponse",function(){return
r.readAsStringAsync()},function(i){if(c())
{n.TestHookUrlParameters&&i&&(i=i.replace(new RegExp("<!--[^]*?-->","gm"),""));var
r=i?n.safeExecute(function(){return
JSON.parse(i)},"parseCortanaHttpResponse",null,null):null;r!=null?
s(a._dataSource,r,null):s(a._dataSource,null,t)}},function(){return
s(a._dataSource,null,i)},h):s(a._dataSource,null,r.statusCode.toString()))},functio
n(){return s(a._dataSource,null,r)},h)}else s(this._dataSource,null,u,null,!0)},e}
(n.JsonDataProvider);n.CortanaJsonDataProvider=f}(WSB||(WSB={}));1

You might also like