import zeroLocalStorage from"./localstorage-polyfill.js";import ZeroLogFactory from"./log.js";import ZeroIndexedDBFactory from"./indexedDB.js";import"./lib/compare-versions.js";import"./js/background_preload.js";import"./lib/idb-keyval.js";import"./lib/moment-with-locales.js";import"./lib/csso.js";import"./js/log_error.js";import"./js/omega_debug.js";import"./js/omega_pac.min.js";import"./js/omega_target.min.js";import"./js/omega_target_chromium_extension.min.js";import"./img/icons/draw_omega.js";import"./js/background.js";const isFirefox=!!globalThis.localStorage,zcb=globalThis.zeroDetectModeCB;function detectPrivateMode(cb){var db,tempMode,on,off;zcb?(on=zcb(cb,!0),off=zcb(cb,!1)):(on=()=>{setTimeout(cb.bind(null,!0),1)},off=()=>{setTimeout(cb.bind(null,!1),1)}),isFirefox?(tempMode=localStorage.getItem("zeroOmega.isPrivateMode"))?"true"==tempMode?on():off():((db=indexedDB.open("zeroOmega-test")).onerror=on,db.onsuccess=off):off()}globalThis.POPUPHTMLURL="./popup-iframe.html",globalThis.navigator&&/Android/i.test(globalThis.navigator.userAgent)&&(globalThis.POPUPHTMLURL="./popup/index.html"),setInterval(chrome.runtime.getPlatformInfo,25e3),detectPrivateMode((function(isPrivateMode){isFirefox&&localStorage.setItem("zeroOmega.isPrivateMode",isPrivateMode?"true":"false"),isPrivateMode&&isFirefox&&ZeroIndexedDBFactory(),ZeroLogFactory();const zeroStorage=isFirefox?localStorage:zeroLocalStorage;globalThis.zeroBackground(zeroStorage),console.log("is private mode: "+isPrivateMode)}));