(function(f){var d=f.FEATURES;f.extend({extension:{onConnect:{addListener:function(a){return chrome.runtime.onConnect.addListener(a)}},onConnectExternal:{addListener:function(a){return chrome.runtime.onConnectExternal.addListener(a)}},onMessageExternal:{addListener:function(a){return chrome.runtime.onMessageExternal.addListener(a)}},manifest:chrome.runtime.getManifest(),inIncognitoContext:chrome.extension.inIncognitoContext,getViews:function(a){return chrome.extension.getViews(a)},urls:{prepareForReport:function(a){return a}}},
runtime:{onInstalled:{addListener:function(a){chrome.runtime.onInstalled&&chrome.runtime.onInstalled.addListener(a)}},onUpdateAvailable:{addListener:function(a){chrome.runtime.onUpdateAvailable&&chrome.runtime.onUpdateAvailable.addListener(a)}},isDarkMode:function(){var a;return function(){var b;if(void 0===a){b=document.body||document.documentElement||document;var c=document.createElement("div");c.setAttribute("id","isdark");c.setAttribute("style","height: 10px");var e=document.createElement("style");
e.textContent="@media (prefers-color-scheme: dark) { #isdark { height: 20px !important; } };";b.appendChild(e);b.appendChild(c);b=a=20==c.offsetHeight}else b=a;return b}}()},tabs:{onActivated:{addListener:function(a){return chrome.tabs.onActivated.addListener(a)}},onUpdated:{addListener:function(a){return chrome.tabs.onUpdated.addListener(a)}},onReplaced:{addListener:function(a){if(chrome.tabs.onReplaced)return chrome.tabs.onReplaced.addListener(a)}},onRemoved:{addListener:function(a){return chrome.tabs.onRemoved.addListener(a)}},
executeScript:function(a,b,c){return chrome.tabs.executeScript(a,b,c)},create:function(a,b){var c,e,d;(c=a.parent)&&void 0!==(e=c.id)&&void 0!==(d=c.windowId)&&(a.openerTabId=e,a.windowId=d);delete a.parent;return chrome.tabs.create(a,b)},update:function(a,b,c){return chrome.tabs.update(a,b,c)},remove:function(a,b){return chrome.tabs.remove(a,b)},highlight:function(a,b){if(a&&a.tabs){a.tabs instanceof Array||(a.tabs=[a.tabs]);var c=[],e,d=function(){if(a.tabs.length){var f=a.tabs.pop();chrome.tabs.get(f,
function(a){void 0===e&&(e=a.windowId);a.windowId===e&&c.push(a.index);d()})}else return chrome.tabs.highlight({windowId:e,tabs:c},b)};d()}else b&&b()},getSelected:function(a,b){return chrome.tabs.getSelected(a,b)},get:function(a,b){return chrome.tabs.get(a,b)},query:function(a,b){return chrome.tabs.query(a,b)},sendMessage:function(){return chrome.tabs.sendMessage.apply(this,arguments)}},windows:{getAll:function(a,b){chrome.windows.getAll(a,b)}},webRequest:{headerModificationSupported:!0,extraHeaderNeeded:chrome.webRequest&&
chrome.webRequest.OnBeforeSendHeadersOptions&&chrome.webRequest.OnBeforeSendHeadersOptions.hasOwnProperty("EXTRA_HEADERS"),onBeforeRequest:{addListener:function(a,b,c){return chrome.webRequest.onBeforeRequest.addListener(a,b,c)},removeListener:function(a){return chrome.webRequest.onBeforeRequest.removeListener(a)}},onBeforeSendHeaders:{addListener:function(a,b,c){return chrome.webRequest.onBeforeSendHeaders.addListener(a,b,c)},removeListener:function(a){return chrome.webRequest.onBeforeSendHeaders.removeListener(a)}},
onHeadersReceived:{addListener:function(a,b,c){return chrome.webRequest.onHeadersReceived.addListener(a,b,c)},removeListener:function(a){return chrome.webRequest.onHeadersReceived.removeListener(a)}},onBeforeRedirect:{addListener:function(a,b,c){return chrome.webRequest.onBeforeRedirect.addListener(a,b,c)},removeListener:function(a){return chrome.webRequest.onBeforeRedirect.removeListener(a)}},onResponseStarted:{addListener:function(a,b){return chrome.webRequest.onResponseStarted.addListener(a,b)},
removeListener:function(a){return chrome.webRequest.onResponseStarted.removeListener(a)}},onErrorOccurred:{addListener:function(a,b){return chrome.webRequest.onErrorOccurred.addListener(a,b)},removeListener:function(a){return chrome.webRequest.onErrorOccurred.removeListener(a)}},handlerBehaviorChanged:function(a){return chrome.webRequest.handlerBehaviorChanged(a)}},webNavigation:{supported:!!chrome.webNavigation,onCommitted:{addListener:function(a){if(chrome.webNavigation.onCommitted)return chrome.webNavigation.onCommitted.addListener(a)}},
onErrorOccurred:{addListener:function(a){if(chrome.webNavigation.onErrorOccurred)return chrome.webNavigation.onErrorOccurred.addListener(a)}}},browserAction:{setIcon:function(a,b){var c=a.path;c&&(a.path=53<=d.RUNTIME.BROWSER_VERSION?{19:c.replace(/\.png$/,"19.png"),38:c.replace(/\.png$/,"38.png"),16:c.replace(/\.png$/,"16.png"),24:c.replace(/\.png$/,"24.png"),32:c.replace(/\.png$/,"32.png")}:{19:c.replace(/\.png$/,"19.png"),38:c.replace(/\.png$/,"38.png")});return chrome.browserAction.setIcon(a,
b)},setTitle:function(a){return chrome.browserAction.setTitle(a)},setBadgeText:function(a){return chrome.browserAction.setBadgeText(a)},setBadgeBackgroundColor:function(a){return chrome.browserAction.setBadgeBackgroundColor(a)},setPopup:function(a){return chrome.browserAction.setPopup(a)}},storage:{onChanged:{addListener:function(a){return chrome.storage.onChanged.addListener(a)}},local:{set:function(a,b){return chrome.storage.local.set(a,b)},get:function(a,b){return chrome.storage.local.get(a,b)},
remove:function(a,b){return chrome.storage.local.remove(a,b)},clear:function(a){return chrome.storage.local.clear(a)}},sync:{supported:!0,set:function(a,b){return chrome.storage.sync.set(a,b)},get:function(a,b){return chrome.storage.sync.get(a,b)},remove:function(a,b){return chrome.storage.sync.remove(a,b)},clear:function(a){return chrome.storage.sync.clear(a)}}},downloads:{supported:!0,onChanged:{addListener:function(a){return chrome.downloads.onChanged.addListener(a)}},search:function(a,b){return chrome.downloads.search(a,
b)},cancel:function(a,b){return chrome.downloads.cancel(a,b)},download:function(a,b){return chrome.downloads.download(a,b)}},file:{isAllowed:function(a){return chrome.extension.isAllowedFileSchemeAccess(a)},get:function(a,b,c){try{var e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";e.onload=function(){b(e.response)};e.onerror=function(){c(e.statusText)};e.send()}catch(d){c(d.message)}}},cookies:{getAll:function(a,b){return chrome.cookies.getAll(a,b)},remove:function(a,b){return chrome.cookies.remove(a,
b)},set:function(a,b){return chrome.cookies.set(a,b)}},commands:{supported:!(!chrome.commands||!chrome.commands.onCommand),onCommand:{addListener:function(a){return chrome.commands.onCommand.addListener(a)}}},notifications:{onPermissionLevelChanged:{addListener:function(a){return chrome.notifications.onPermissionLevelChanged.addListener(a)}},onClicked:{addListener:function(a){return chrome.notifications.onClicked.addListener(a)}},onClosed:{addListener:function(a){return chrome.notifications.onClosed.addListener(a)}},
supported:!!(chrome.notifications&&chrome.notifications.getPermissionLevel&&chrome.notifications.onPermissionLevelChanged&&chrome.notifications.onClicked),getPermissionLevel:function(a){return chrome.notifications.getPermissionLevel(a)},create:function(a,b,c){return chrome.notifications.create(a,b,c)},clear:function(a,b){return chrome.notifications.clear(a,b)}},contextMenus:function(){var a=!!(d.RUNTIME.CONTEXT_MENU&&chrome.contextMenus&&chrome.contextMenus.create&&chrome.contextMenus.update&&chrome.contextMenus.remove);
return a?{supported:a,create:function(a,c){return chrome.contextMenus.create(a,c)},update:function(a,c,e){return chrome.contextMenus.update(a,c,e)},remove:function(a,c){return chrome.contextMenus.remove(a,c)},removeAll:function(a){return chrome.contextMenus.removeAll(a)},onClicked:{addListener:function(a){return chrome.contextMenus.onClicked.addListener(a)}}}:{supported:!1}}(),permissions:{supported:!0,getAll:function(a){return chrome.permissions.getAll(a)},contains:function(a,b){return chrome.permissions.contains(a,
b)},request:function(a,b){return chrome.permissions.request(a,b)},remove:function(a,b){return chrome.permissions.remove(a,b)},onAdded:{addListener:function(a){if(chrome.permissions.onAdded)return chrome.permissions.onAdded.addListener(a)}},onRemoved:{addListener:function(a){if(chrome.permissions.onRemoved)return chrome.permissions.onRemoved.addListener(a)}}},i18n:{native_support:!0,getMessage:function(){return chrome.i18n.getMessage.apply(this,arguments)},getUILanguage:function(){return chrome.i18n.getUILanguage?
chrome.i18n.getUILanguage():navigator.language},getAcceptLanguages:function(a){return chrome.i18n.getAcceptLanguages?chrome.i18n.getAcceptLanguages(a):a([])}},idle:{queryState:function(a,b){return chrome.idle.queryState(a,b)}},other:function(){return{openDatabase:function(a,b,c,e){var d=window.openDatabase;if(d)return d(a,b,c,e)},requestFileSystem:function(a,b,c,d){var f=window.requestFileSystem||window.webkitRequestFileSystem;if(f)return f(a,b,c,d);d("not supported")}}}()});(function(){try{d.HTML5.LOCALSTORAGE=
window.localStorage}catch(a){console.warn("prep: window.localStorage will be unavailable")}d.DB.USE=d.DB.DEFAULT;try{d.HTML5.LOCALSTORAGE&&(d.DB.NO_WARNING="nowarning"===d.HTML5.LOCALSTORAGE.getItem("#brokenprofile"),d.DB.USE=d.HTML5.LOCALSTORAGE.getItem(d.CONSTANTS.STORAGE.TYPE)||d.DB.DEFAULT)}catch(a){console.warn("prep: error at storage type detection",a)}f.file.isAllowed(function(a){d.RUNTIME.ALLOWS_FILE_SCHEME_ACCESS=a;d.INITIALIZED=!0})})()})(window.rea);
