adnbn 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -29
- package/dist/NativeLocale-BwVCqh2v.d.mts +25 -0
- package/dist/NativeLocale-C_gjXClM.d.ts +25 -0
- package/dist/cli/index.cjs +1184 -456
- package/dist/cli/index.cjs.map +1 -1
- package/dist/index.cjs +9 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -45
- package/dist/index.d.ts +2 -45
- package/dist/index.js +11 -29
- package/dist/index.js.map +1 -1
- package/dist/locale/index.cjs +39 -1
- package/dist/locale/index.cjs.map +1 -1
- package/dist/locale/index.d.mts +46 -3
- package/dist/locale/index.d.ts +46 -3
- package/dist/locale/index.js +36 -2
- package/dist/locale/index.js.map +1 -1
- package/dist/locale/react/index.d.mts +2 -1
- package/dist/locale/react/index.d.ts +2 -1
- package/dist/{NativeLocale-lgR6wNj3.d.mts → locale-Do4kUmgC.d.mts} +1 -23
- package/dist/{NativeLocale-lgR6wNj3.d.ts → locale-Do4kUmgC.d.ts} +1 -23
- package/dist/offscreen/index.cjs +41 -43
- package/dist/offscreen/index.cjs.map +1 -1
- package/dist/offscreen/index.js +41 -43
- package/dist/offscreen/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types/app.ts","../src/main/background.ts","../src/types/browser.ts","../src/types/command.ts","../src/main/command.ts","../src/main/config.ts","../src/types/content.ts","../src/entry/content/core/resolvers/mount.ts","../src/entry/content/core/resolvers/render.ts","../src/entry/content/core/resolvers/definition.ts","../src/main/content.ts","../src/cli/plugins/dotenv/utils.ts","../src/main/env.ts","../src/types/icon.ts","../src/main/icon.ts","../src/types/locale.ts","../src/locale/providers/AbstractLocale.ts","../src/locale/utils.ts","../src/locale/providers/NativeLocale.ts","../src/main/locale.ts","../src/types/manifest.ts","../src/transport/BaseTransport.ts","../src/transport/ProxyTransport.ts","../src/transport/TransportManager.ts","../src/types/offscreen.ts","../src/offscreen/OffscreenManager.ts","../src/message/providers/AbstractMessage.ts","../src/types/message.ts","../src/message/MessageManager.ts","../src/message/handlers/AbstractHandler.ts","../src/message/handlers/SingleHandler.ts","../src/message/handlers/MapHandler.ts","../src/message/handlers/GeneralHandler.ts","../src/message/providers/Message.ts","../src/transport/TransportMessage.ts","../src/offscreen/OffscreenMessage.ts","../src/offscreen/OffscreenBridge.ts","../src/offscreen/utils.ts","../src/offscreen/providers/ProxyOffscreen.ts","../src/main/offscreen.ts","../src/main/page.ts","../src/main/plugin.ts","../src/main/popup.ts","../src/types/relay.ts","../src/relay/RelayManager.ts","../src/relay/providers/ProxyRelay.ts","../src/main/relay.ts","../src/types/service.ts","../src/service/ServiceManager.ts","../src/service/ServiceMessage.ts","../src/service/providers/ProxyService.ts","../src/main/service.ts","../src/main/sidebar.ts"],"names":["Mode","Command","Browser","ContentScriptAppend","browser","setActionIcon","Language","LocaleDir","_","getI18nMessage","getI18nUILanguage","ManifestIncognito","OffscreenReason","nanoid","onMessage","sendTabMessage","sendMessage","isBackground","isManifestVersion3","hasOffscreen","closeOffscreen","createOffscreen","getUrl","setActionPopup","setActionTitle","get","injectScriptFactory","path","args","manager","isAvailableScripting","getManifestVersion","setSidebarPath","setSidebarTitle"],"mappings":";;;;;;;;;;;;;AAGY,IAAA,IAAA,qBAAAA,KAAL,KAAA;AACH,EAAAA,MAAA,MAAO,CAAA,GAAA,MAAA;AACP,EAAAA,MAAA,aAAc,CAAA,GAAA,aAAA;AACd,EAAAA,MAAA,YAAa,CAAA,GAAA,YAAA;AAHL,EAAAA,OAAAA,KAAAA;AAAA,CAAA,EAAA,IAAA,IAAA,EAAA;AAMA,IAAA,OAAA,qBAAAC,QAAL,KAAA;AACH,EAAAA,SAAA,OAAQ,CAAA,GAAA,OAAA;AACR,EAAAA,SAAA,OAAQ,CAAA,GAAA,OAAA;AAFA,EAAAA,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EAAA,KAAK,CAAG,CAAA,CAAA,CAAA;AAAA;AAGnD,EAAI,IAAA,GAAA,IAAO,OAAO,GAAA,KAAQ,QAAU,EAAA;AAChC,IAAA,GAAA,GAAM,GAAI,CAAA,EAAA;AAAA;AAGd,EAAM,MAAA,EAAC,IAAM,EAAA,KAAA,EAAS,GAAA,OAAA;AAEtB,EAAA,IAAI,CAAC,IAAM,EAAA;AACP,IAAA,MAAM,IAAI,KAAA,CAAM,CAA4B,yBAAA,EAAA,KAAK,CAAG,CAAA,CAAA,CAAA;AAAA;AAGxD,EAAM,MAAAe,sBAAA,CAAe,MAAM,GAAG,CAAA;AAE9B,EAAA,IAAI,KAAO,EAAA;AACP,IAAA,MAAMC,uBAAgB,CAAA,GAAA,CAAI,KAAK,CAAA,EAAG,GAAG,CAAA;AAAA;AAE7C","file":"index.cjs","sourcesContent":["export const PackageName = \"adnbn\";\nexport const SystemDir = \".adnbn\";\n\nexport enum Mode {\n None = \"none\",\n Development = \"development\",\n Production = \"production\",\n}\n\nexport enum Command {\n Build = \"build\",\n Watch = \"watch\",\n}\n","import {BackgroundConfig, BackgroundDefinition, BackgroundMainHandler} from \"@typing/background\";\n\nexport type {BackgroundConfig, BackgroundDefinition, BackgroundMainHandler};\n\nexport const defineBackground = (options: BackgroundDefinition): BackgroundDefinition => {\n return options;\n};\n","export enum Browser {\n Chrome = \"chrome\",\n Chromium = \"chromium\",\n Edge = \"edge\",\n Firefox = \"firefox\",\n Opera = \"opera\",\n Safari = \"safari\",\n}\n","import {Required} from \"utility-types\";\n\nimport {EntrypointBuilder, EntrypointOptions} from \"@typing/entrypoint\";\nimport {BackgroundConfig} from \"@typing/background\";\nimport {Awaiter} from \"@typing/helpers\";\n\ntype Tab = chrome.tabs.Tab;\n\nexport const CommandExecuteActionName = \"_execute_action\";\n\nexport interface CommandConfig extends BackgroundConfig {\n name: string;\n description?: string;\n global?: boolean;\n defaultKey?: string;\n windowsKey?: string;\n macKey?: string;\n chromeosKey?: string;\n linuxKey?: string;\n}\n\nexport type CommandOptions = CommandConfig & EntrypointOptions;\n\nexport type CommandEntrypointOptions = Partial<CommandOptions>;\n\nexport type CommandExecute = (tab: Tab | undefined, options: CommandOptions) => Awaiter<void>;\n\nexport interface CommandDefinition extends CommandEntrypointOptions {\n execute: CommandExecute;\n}\n\nexport type ExecuteActionCommandDefinition = Omit<CommandDefinition, \"name\">;\n\nexport type CommandUnresolvedDefinition = Partial<CommandDefinition>;\n\nexport type CommandResolvedDefinition = Required<CommandDefinition, \"name\" | \"execute\">;\n\nexport type CommandBuilder = EntrypointBuilder;\n","import {\n CommandConfig,\n CommandDefinition,\n CommandExecute,\n CommandExecuteActionName,\n ExecuteActionCommandDefinition,\n} from \"@typing/command\";\n\nexport {\n type CommandDefinition,\n type ExecuteActionCommandDefinition,\n CommandExecuteActionName,\n type CommandConfig,\n type CommandExecute,\n};\n\nexport const defineCommand = (options: CommandDefinition): CommandDefinition => {\n return options;\n};\n\nexport const defineExecuteActionCommand = (options: ExecuteActionCommandDefinition): CommandDefinition => {\n return {...options, name: CommandExecuteActionName};\n};\n","import {Config, ConfigDefinition, ReadonlyConfig, UserConfig} from \"@typing/config\";\n\nexport type {Config, ReadonlyConfig, ConfigDefinition, UserConfig};\n\nexport const defineConfig = (config: ConfigDefinition): ConfigDefinition => {\n return config;\n};\n","import type {FC, ReactNode} from \"react\";\nimport {Optional} from \"utility-types\";\n\nimport {EntrypointBuilder, EntrypointOptions} from \"@typing/entrypoint\";\nimport {Awaiter, PickNonFunctionProperties} from \"@typing/helpers\";\n\ntype ExecutionWorld = chrome.scripting.ExecutionWorld;\ntype RunAt = chrome.userScripts.RunAt;\n\nexport const ContentScriptMatches = [\"*://*/*\"];\n\nexport interface ContentScriptConfig {\n matches?: string[];\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default []\n */\n excludeMatches?: string[];\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default []\n */\n includeGlobs?: string[];\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default []\n */\n excludeGlobs?: string[];\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default false\n */\n allFrames?: boolean;\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default \"documentIdle\"\n */\n runAt?: RunAt;\n /**\n * See https://developer.chrome.com/docs/extensions/develop/concepts/content-scripts#isolated_world\n */\n world?: ExecutionWorld;\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default false\n */\n matchAboutBlank?: boolean;\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default false\n */\n matchOriginAsFallback?: boolean;\n /**\n * Whether this content script requires explicit permission declaration in the extension manifest.\n * When set to true, the content script must be declared in the manifest.json permissions section\n * to be allowed to run on the specified pages.\n *\n * @see https://developer.chrome.com/docs/extensions/mv3/declare_permissions/\n *\n * @default false\n */\n declarative?: boolean;\n}\n\nexport type ContentScriptOptions = ContentScriptConfig & EntrypointOptions;\n\nexport type ContentScriptEntrypointOptions = Partial<ContentScriptOptions>;\n\n// Append\nexport enum ContentScriptAppend {\n Last = \"last\",\n First = \"first\",\n Replace = \"replace\",\n Before = \"before\",\n After = \"after\",\n}\n\n// Mount\nexport type ContentScriptMountFunction = (anchor: Element, container: Element) => void | (() => void);\n\nexport interface ContentScriptMount {\n mount(): void;\n\n unmount(): void;\n}\n\n// Props\nexport interface ContentScriptProps extends ContentScriptEntrypointOptions {\n anchor: Element;\n}\n\n// Anchor\nexport type ContentScriptAnchor = string | Element | null | undefined;\nexport type ContentScriptAnchorGetter = () => Awaiter<ContentScriptAnchor>;\nexport type ContentScriptAnchorResolver = () => Awaiter<Element[]>;\n\n// Render\nexport type ContentScriptRenderReactComponent = FC<ContentScriptProps>;\nexport type ContentScriptRenderValue = Element | ReactNode | ContentScriptRenderReactComponent;\nexport type ContentScriptRenderHandler = (props: ContentScriptProps) => Awaiter<undefined | ContentScriptRenderValue>;\n\n// Container\nexport type ContentScriptContainerTag = Exclude<keyof HTMLElementTagNameMap, \"html\" | \"body\">;\n\nexport type ContentScriptContainerOptions = {\n [Tag in ContentScriptContainerTag]: {\n tagName: Tag;\n } & Exclude<Optional<PickNonFunctionProperties<HTMLElementTagNameMap[Tag]>>, \"id\">;\n}[ContentScriptContainerTag];\n\nexport type ContentScriptContainerFactory = (\n props: ContentScriptProps\n) => Awaiter<Element | ContentScriptContainerTag | ContentScriptContainerOptions>;\nexport type ContentScriptContainerCreator = (props: ContentScriptProps) => Awaiter<Element>;\n\n// Watch\nexport type ContentScriptWatchStrategy = (update: () => void, context: ContentScriptContext) => () => void;\n\n// Context\nexport interface ContentScriptContext extends ContentScriptMount {\n nodes: ReadonlySet<ContentScriptNode>;\n}\n\n// Main\nexport type ContentScriptMainFunction = (context: ContentScriptContext, options: ContentScriptOptions) => Awaiter<void>;\n\n// Node\nexport interface ContentScriptNode extends ContentScriptMount {\n anchor: Element;\n container?: Element;\n}\n\nexport type ContentScriptNodeSet = Set<ContentScriptNode>;\n\n// Definition\nexport interface ContentScriptDefinition extends ContentScriptEntrypointOptions {\n anchor?: ContentScriptAnchor | ContentScriptAnchorGetter;\n mount?: ContentScriptMountFunction;\n render?: ContentScriptRenderValue | ContentScriptRenderHandler;\n container?: ContentScriptContainerTag | ContentScriptContainerOptions | ContentScriptContainerFactory;\n watch?: true | ContentScriptWatchStrategy;\n main?: ContentScriptMainFunction;\n}\n\n// prettier-ignore\nexport interface ContentScriptResolvedDefinition extends Omit<ContentScriptDefinition, \"anchor\" | \"mount\" | \"container\" | \"render\" | \"watch\"> {\n anchor: ContentScriptAnchorResolver;\n mount: ContentScriptMountFunction;\n render?: ContentScriptRenderHandler;\n container: ContentScriptContainerCreator;\n watch: ContentScriptWatchStrategy;\n}\n\nexport interface ContentScriptAppendDefinition extends Omit<ContentScriptDefinition, \"mount\"> {\n append?: ContentScriptAppend;\n}\n\n// Builder\nexport interface ContentScriptBuilder extends EntrypointBuilder {\n getContext(): ContentScriptContext;\n}\n","import {ContentScriptAppend, ContentScriptMountFunction} from \"@typing/content\";\n\n// prettier-ignore\nexport const contentScriptMountAppendResolver =\n (append?: ContentScriptAppend): ContentScriptMountFunction =>\n (anchor: Element, container: Element): void => {\n switch (append) {\n case ContentScriptAppend.Last:\n anchor.append(container);\n break;\n default:\n case undefined:\n case ContentScriptAppend.First:\n anchor.prepend(container);\n break;\n case ContentScriptAppend.Replace:\n anchor.replaceWith(container);\n break;\n case ContentScriptAppend.After:\n anchor.parentElement?.insertBefore(container, anchor.nextElementSibling);\n break;\n case ContentScriptAppend.Before:\n anchor.parentElement?.insertBefore(container, anchor);\n break;\n }\n };\n","import {ContentScriptRenderHandler, ContentScriptRenderValue} from \"@typing/content\";\n\nexport const isValidContentScriptRenderValue = (value: unknown): value is string | number | Element => {\n return (typeof value === \"string\" && value.length > 0) || typeof value === \"number\" || value instanceof Element;\n};\n\n// prettier-ignore\nexport const contentScriptRenderResolver =\n (render?: ContentScriptRenderValue | ContentScriptRenderHandler): ContentScriptRenderHandler =>\n async (props): Promise<undefined | ContentScriptRenderValue> => {\n let resolvedRender = typeof render === \"function\" ? render(props) : render;\n\n if (resolvedRender instanceof Promise) {\n resolvedRender = await resolvedRender;\n }\n\n if (resolvedRender !== true && !isValidContentScriptRenderValue(resolvedRender)) {\n return;\n }\n\n return resolvedRender;\n };\n","import {isValidContentScriptRenderValue} from \"../resolvers/render\";\n\nimport {ContentScriptDefinition, ContentScriptRenderHandler, ContentScriptRenderValue} from \"@typing/content\";\n\nexport const isContentScriptDefinition = (definition: any): definition is ContentScriptDefinition => {\n return (\n definition && typeof definition === \"object\" && definition.constructor === Object && !(\"$$typeof\" in definition)\n );\n};\n\nexport const isValidContentScriptDefinitionRenderValue = (\n definition: any\n): definition is ContentScriptRenderValue | ContentScriptRenderHandler => {\n return (\n isValidContentScriptRenderValue(definition) ||\n typeof definition === \"function\" ||\n (typeof definition === \"object\" && definition.constructor === Object && \"$$typeof\" in definition)\n );\n};\n","import {contentScriptMountAppendResolver} from \"@entry/content\";\n\nimport {ContentScriptAppendDefinition, ContentScriptDefinition} from \"@typing/content\";\n\nexport * from \"@entry/content\";\nexport * from \"@typing/content\";\n\nexport const defineContentScript = (options: ContentScriptDefinition): ContentScriptDefinition => {\n return options;\n};\n\nexport const defineContentScriptAppend = (options: ContentScriptAppendDefinition): ContentScriptDefinition => {\n const {append, ...definition} = options;\n\n return {\n ...definition,\n mount: contentScriptMountAppendResolver(append),\n };\n};\n","import {createHash} from \"crypto\";\n\nexport const generateCryptoKey = (password: string): string => {\n return createHash(\"sha256\").update(password).digest(\"base64\");\n};\n\nexport const encryptData = <T = any>(data: T, key: string): string => {\n const jsonString = JSON.stringify(data);\n const dataBytes = Array.from(jsonString, c => c.charCodeAt(0));\n const keyBytes = Array.from(key, c => c.charCodeAt(0));\n\n const encryptedBytes = dataBytes.map((byte, i) => byte ^ keyBytes[i % keyBytes.length]);\n const encryptedString = String.fromCharCode(...encryptedBytes);\n\n return btoa(encryptedString);\n};\n\nexport const decryptData = <T = any>(encrypted: string, key?: string): T => {\n const encryptedString = atob(encrypted);\n const encryptedBytes = Array.from(encryptedString, c => c.charCodeAt(0));\n let keyBytes: any[];\n try {\n //@ts-expect-error: __ADNBN_ENV_CRYPTO_KEY__ is a virtual variable generated by the bundler `src/cli/plugins/dotenv/index.ts`\n keyBytes = Array.from(key || __ADNBN_ENV_CRYPTO_KEY__, c => c.charCodeAt(0));\n } catch (err) {\n throw new Error('You need to specify the \"key\" argument for the decryptData function.');\n }\n\n const decryptedBytes = encryptedBytes.map((byte, i) => byte ^ keyBytes[i % keyBytes.length]);\n const decryptedString = String.fromCharCode(...decryptedBytes);\n\n return JSON.parse(decryptedString);\n};\n","import {Browser} from \"@typing/browser\";\nimport {ManifestVersion} from \"@typing/manifest\";\nimport {decryptData} from \"@cli/plugins/dotenv/utils\";\n\nexport const getEnv: {\n <T extends string>(key: string): T | undefined;\n <T extends string, D>(key: string, defaults: D): T | D;\n} = (() => {\n let envCache: object;\n\n return (key: string, defaults?: string) => {\n let env: object;\n\n if (typeof process.env === \"object\") {\n env = process.env;\n } else {\n envCache ??= decryptData(process.env);\n env = envCache;\n }\n\n return (env[key] ?? defaults) as any;\n };\n})();\n\nexport const getApp = (): string => {\n const app = getEnv(\"APP\");\n\n if (app === undefined) {\n throw new Error(\"App is not defined\");\n }\n\n return app;\n};\n\nexport const getBrowser = (): Browser => {\n const browser = getEnv<Browser>(\"BROWSER\");\n\n if (browser === undefined) {\n throw new Error(\"Browser is not defined\");\n }\n\n return browser;\n};\n\nexport const isBrowser = (browser: Browser): browser is Browser => {\n return getBrowser() === browser;\n};\n\nexport const getManifestVersion = (): ManifestVersion => {\n const manifestVersion = getEnv(\"MANIFEST_VERSION\", \"3\");\n\n return parseInt(manifestVersion) as ManifestVersion;\n};\n","export const DefaultIconGroupName = \"default\";\n","import {setActionIcon} from \"@adnbn/browser\";\n\nimport {DefaultIconGroupName} from \"@typing/icon\";\n\ntype Tab = chrome.tabs.Tab;\n\nexport const getIcons = (): Record<string, Record<number, string>> => {\n try {\n // @ts-expect-error: __ADNBN_ICONS__ is a virtual variable generated by the bundler `src/cli/plugins/icon/index.ts`\n return __ADNBN_ICONS__;\n } catch (e) {\n console.error(\"Failed getting icons: \", e);\n }\n\n return {};\n};\n\nexport const changeActionIcon = async (icon?: string, tab?: number | Tab): Promise<void> => {\n if (!icon) {\n icon = DefaultIconGroupName;\n }\n\n const icons = getIcons()[icon];\n\n if (!icons) {\n throw new Error(`Icon group name \"${icon}\" not found for action icon.`);\n }\n\n if (tab && typeof tab === \"object\") {\n tab = tab.id;\n }\n\n await setActionIcon({path: icons, tabId: tab});\n};\n","export enum Language {\n Arabic = \"ar\",\n Amharic = \"am\",\n Bulgarian = \"bg\",\n Bengali = \"bn\",\n Catalan = \"ca\",\n Czech = \"cs\",\n Danish = \"da\",\n German = \"de\",\n Greek = \"el\",\n English = \"en\",\n EnglishAustralia = \"en_AU\",\n EnglishGreatBritain = \"en_GB\",\n EnglishUSA = \"en_US\",\n Spanish = \"es\",\n SpanishLatinAmericaAndCaribbean = \"es_419\",\n Estonian = \"et\",\n Persian = \"fa\",\n Finnish = \"fi\",\n Filipino = \"fil\",\n French = \"fr\",\n Gujarati = \"gu\",\n Hebrew = \"he\",\n Hindi = \"hi\",\n Croatian = \"hr\",\n Hungarian = \"hu\",\n Indonesian = \"id\",\n Italian = \"it\",\n Japanese = \"ja\",\n Kannada = \"kn\",\n Korean = \"ko\",\n Lithuanian = \"lt\",\n Latvian = \"lv\",\n Malayalam = \"ml\",\n Marathi = \"mr\",\n Malay = \"ms\",\n Dutch = \"nl\",\n Norwegian = \"no\",\n Polish = \"pl\",\n PortugueseBrazil = \"pt_BR\",\n PortuguesePortugal = \"pt_PT\",\n Romanian = \"ro\",\n Russian = \"ru\",\n Slovak = \"sk\",\n Slovenian = \"sl\",\n Serbian = \"sr\",\n Swedish = \"sv\",\n Swahili = \"sw\",\n Tamil = \"ta\",\n Telugu = \"te\",\n Thai = \"th\",\n Turkish = \"tr\",\n Ukrainian = \"uk\",\n Vietnamese = \"vi\",\n ChineseChina = \"zh_CN\",\n ChineseTaiwan = \"zh_TW\",\n}\n\nexport enum LocaleDir {\n RightToLeft = \"rtl\",\n LeftToRight = \"ltr\",\n}\n\nexport const RtlLanguages: ReadonlySet<Language> = new Set([Language.Arabic, Language.Persian, Language.Hebrew]);\n\nexport const LocaleNestedKeysSeparator = \".\";\n\nexport const LocaleKeysSeparator = \"_\";\n\nexport const LocaleValuesSeparator = \"|\";\n\nexport const LocaleCustomKeyForLanguage = \"locale\";\n\nexport const LocaleKeyMarker = \"@\";\n\nexport const LanguageCodes: ReadonlySet<string> = new Set(Object.values(Language));\n\nexport const LocaleFileExtensions: ReadonlySet<string> = new Set([\"yaml\", \"yml\", \"json\"]);\n\nexport type LocaleValue = string | number | string[] | number[];\n\nexport type LocaleData = {\n [key: string]: LocaleValue | LocaleData;\n};\n\nexport type LocaleItems = Map<string, string>;\n\nexport type LocaleKeys = ReadonlySet<string>;\n\nexport type LocaleMessages = {\n [key: string]: {\n message: string;\n };\n};\n\nexport interface LocaleBuilder {\n lang(): Language;\n\n merge(data: LocaleData): this;\n\n build(): LocaleMessages;\n\n get(): LocaleItems;\n\n keys(): LocaleKeys;\n\n structure(): LocaleStructure;\n\n isValid(): boolean;\n\n validate(): this;\n}\n\nexport interface LocaleValidator {\n isValid(locale: LocaleBuilder): boolean;\n\n validate(locale: LocaleBuilder): this;\n}\n\nexport interface LocaleFutures {\n plural: boolean;\n substitutions: readonly string[];\n}\n\nexport interface LocaleStructure {\n [key: string]: LocaleFutures;\n}\n\nexport type LocaleNonPluralKeys<T extends LocaleStructure> = {\n [K in keyof T]: T[K] extends {plural: false} ? K : never;\n}[keyof T] &\n string;\n\nexport type LocalePluralKeys<T extends LocaleStructure> = {\n [K in keyof T]: T[K] extends {plural: true} ? K : never;\n}[keyof T] &\n string;\n\nexport type LocaleSubstitutionsFor<T extends LocaleStructure, K extends keyof T> = T[K] extends {\n substitutions: readonly (infer U)[];\n}\n ? Partial<Record<U & string, string | number>>\n : never;\n\nexport interface LocaleProvider<S extends LocaleStructure> {\n lang(): Language;\n\n languages(): Set<Language>;\n\n keys(): ReadonlySet<keyof S>;\n\n // non-plural keys\n trans<K extends LocaleNonPluralKeys<S>>(key: K, substitutions?: LocaleSubstitutionsFor<S, K>): string;\n\n // plural keys\n choice<K extends LocalePluralKeys<S>>(key: K, count: number, substitutions?: LocaleSubstitutionsFor<S, K>): string;\n}\n\nexport interface LocaleDynamicProvider<S extends LocaleStructure> extends LocaleProvider<S> {\n change(lang: Language): Promise<Language>;\n}\n","import {\n Language,\n LocaleNonPluralKeys,\n LocalePluralKeys,\n LocaleProvider,\n LocaleStructure,\n LocaleSubstitutionsFor,\n LocaleValuesSeparator,\n} from \"@typing/locale\";\n\nexport default abstract class<S extends LocaleStructure> implements LocaleProvider<S> {\n public abstract lang(): Language;\n\n public abstract keys(): Set<keyof S>;\n\n public abstract languages(): Set<Language>;\n\n protected abstract value(key: keyof S & string): string | undefined;\n\n public trans<K extends LocaleNonPluralKeys<S>>(key: K, substitutions?: LocaleSubstitutionsFor<S, K>): string {\n return this.get(key, substitutions);\n }\n\n public choice<K extends LocalePluralKeys<S>>(\n key: K,\n count: number,\n substitutions?: LocaleSubstitutionsFor<S, K>\n ): string {\n const parts = this.get(key, substitutions).split(LocaleValuesSeparator);\n const idx = this.getPluralIndex(count);\n return parts[idx] ?? parts[0] ?? (key as string);\n }\n\n public get<K extends keyof S & string>(key: K, substitutions?: LocaleSubstitutionsFor<S, K>): string {\n const template = this.value(key);\n\n if (template === undefined) {\n console.warn(`Locale key \"${key}\" not found in \"${this.lang()}\" language.`);\n return key as string;\n }\n\n if (substitutions) {\n return template.replace(/{{(.*?)}}/g, (_, placeholder: string) => {\n if (placeholder in substitutions) {\n return substitutions[placeholder]!.toString();\n }\n console.warn(\n `Locale substitution \"${placeholder}\" not found for key \"${key}\" in \"${this.lang()}\" language.`\n );\n return placeholder;\n });\n }\n\n return template;\n }\n\n private getPluralIndex(count: number): number {\n switch (this.lang()) {\n case Language.Indonesian:\n case Language.Japanese:\n case Language.Kannada:\n case Language.Korean:\n case Language.Malay:\n case Language.Thai:\n case Language.Turkish:\n case Language.Vietnamese:\n return 0;\n\n case Language.Bengali:\n case Language.Bulgarian:\n case Language.Catalan:\n case Language.Danish:\n case Language.German:\n case Language.Greek:\n case Language.English:\n case Language.EnglishAustralia:\n case Language.EnglishGreatBritain:\n case Language.EnglishUSA:\n case Language.Spanish:\n case Language.SpanishLatinAmericaAndCaribbean:\n case Language.Estonian:\n case Language.Persian:\n case Language.Finnish:\n case Language.Gujarati:\n case Language.Hebrew:\n case Language.Hungarian:\n case Language.Italian:\n case Language.Malayalam:\n case Language.Marathi:\n case Language.Dutch:\n case Language.Norwegian:\n case Language.Swedish:\n case Language.Swahili:\n case Language.Tamil:\n case Language.Telugu:\n case Language.ChineseChina:\n case Language.ChineseTaiwan:\n case Language.PortugueseBrazil:\n case Language.PortuguesePortugal:\n return count == 1 ? 0 : 1;\n\n case Language.Amharic:\n case Language.Filipino:\n case Language.French:\n case Language.Hindi:\n return count == 0 || count == 1 ? 0 : 1;\n\n case Language.Croatian:\n case Language.Russian:\n case Language.Serbian:\n case Language.Ukrainian:\n return count % 10 == 1 && count % 100 != 11\n ? 0\n : count % 10 >= 2 && count % 10 <= 4 && (count % 100 < 10 || count % 100 >= 20)\n ? 1\n : 2;\n\n case Language.Czech:\n case Language.Slovak:\n return count == 1 ? 0 : count >= 2 && count <= 4 ? 1 : 2;\n\n case Language.Lithuanian:\n return count % 10 == 1 && count % 100 != 11\n ? 0\n : count % 10 >= 2 && (count % 100 < 10 || count % 100 >= 20)\n ? 1\n : 2;\n\n case Language.Slovenian:\n return count % 100 == 1 ? 0 : count % 100 == 2 ? 1 : count % 100 == 3 || count % 100 == 4 ? 2 : 3;\n\n case Language.Latvian:\n return count == 0 ? 0 : count % 10 == 1 && count % 100 != 11 ? 1 : 2;\n\n case Language.Polish:\n return count == 1\n ? 0\n : count % 10 >= 2 && count % 10 <= 4 && (count % 100 < 12 || count % 100 > 14)\n ? 1\n : 2;\n\n case Language.Romanian:\n return count == 1 ? 0 : count == 0 || (count % 100 > 0 && count % 100 < 20) ? 1 : 2;\n\n case Language.Arabic:\n return count == 0\n ? 0\n : count == 1\n ? 1\n : count == 2\n ? 2\n : count % 100 >= 3 && count % 100 <= 10\n ? 3\n : count % 100 >= 11 && count % 100 <= 99\n ? 4\n : 5;\n\n default:\n return 0;\n }\n }\n}\n","import {\n Language,\n LocaleDir,\n LocaleKeyMarker,\n LocaleKeysSeparator,\n LocaleMessages,\n LocaleNestedKeysSeparator,\n RtlLanguages,\n} from \"@typing/locale\";\n\nexport const getLocaleFilename = (lang: Language): string => {\n return `_locales/${lang}/messages.json`;\n};\n\nexport const convertLocaleKey = (key: string): string => {\n return key.replaceAll(LocaleNestedKeysSeparator, LocaleKeysSeparator);\n};\n\nexport const convertLocaleMessageKey = (key: string): string => {\n return `__MSG_${convertLocaleKey(key)}__`;\n};\n\nexport const extractLocaleKey = (key?: string): string | undefined => {\n if (isLocaleKey(key)) {\n return key.substring(1);\n }\n};\n\nexport const isLocaleKey = (key?: string): key is string => {\n return key?.startsWith(LocaleKeyMarker) ?? false;\n};\n\nexport const modifyLocaleMessageKey = (key?: string): string | undefined => {\n if (typeof key !== \"string\") {\n return undefined;\n }\n\n const localeKey = extractLocaleKey(key);\n\n if (localeKey) {\n return convertLocaleMessageKey(localeKey);\n }\n\n return key;\n};\n\nexport const isLocaleRtl = (lang: Language): boolean => {\n return RtlLanguages.has(lang);\n};\n\nexport const getLocaleDir = (lang: Language): LocaleDir => {\n return isLocaleRtl(lang) ? LocaleDir.RightToLeft : LocaleDir.LeftToRight;\n};\n\nexport const flattenLocaleMessages = (messages: LocaleMessages): Record<string, string> => {\n return Object.fromEntries(Object.entries(messages).map(([key, value]) => [key, value.message]));\n};\n","import {getI18nMessage, getI18nUILanguage} from \"@adnbn/browser\";\n\nimport AbstractLocale from \"./AbstractLocale\";\n\nimport {convertLocaleKey} from \"@locale/utils\";\n\nimport {isBrowser} from \"@main/env\";\n\nimport {Language, LanguageCodes, LocaleCustomKeyForLanguage, LocaleProvider, LocaleStructure} from \"@typing/locale\";\nimport {Browser} from \"@typing/browser\";\n\nexport interface LocaleNativeStructure extends LocaleStructure {}\n\nexport default class NativeLocale extends AbstractLocale<LocaleNativeStructure> {\n private static instance?: LocaleProvider<LocaleNativeStructure>;\n\n public static getInstance<S extends LocaleStructure = LocaleNativeStructure>(): LocaleProvider<S> {\n return (NativeLocale.instance ??= new NativeLocale());\n }\n\n public lang(): Language {\n let lang: Language | undefined;\n\n /**\n * The Opera browser does not support RTL languages,\n * and for Opera you need to directly indicate what kind of language it is.\n * interface language is always different\n */\n if (isBrowser(Browser.Opera)) {\n lang = getI18nMessage(LocaleCustomKeyForLanguage) as Language;\n\n if (LanguageCodes.has(lang)) {\n return lang;\n }\n }\n\n lang = getI18nUILanguage() as Language;\n\n if (!lang) {\n throw new Error(\"Locale Native: Unable to get UI language\");\n }\n\n return lang;\n }\n\n public keys(): Set<keyof LocaleNativeStructure> {\n try {\n // @ts-expect-error: __ADNBN_LOCALE_KEYS__ is a virtual variable generated by the bundler `src/cli/plugins/locale/index.ts`\n return new Set<string>(__ADNBN_LOCALE_KEYS__);\n } catch (e) {\n console.error(\"Locale Native: Unable to get keys\", e);\n\n return new Set<string>();\n }\n }\n\n public languages(): Set<Language> {\n try {\n // @ts-expect-error: __ADNBN_DEFINED_LOCALES__ is a virtual variable generated by the bundler `src/cli/plugins/locale/index.ts`\n return new Set<Language>(__ADNBN_DEFINED_LOCALES__);\n } catch (e) {\n console.error(\"Locale Native: Unable to get defined locales\", e);\n\n return new Set<Language>();\n }\n }\n\n protected value(key: Extract<keyof LocaleNativeStructure, string>): string | undefined {\n const value = getI18nMessage(convertLocaleKey(key));\n\n if (!value || value.length === 0) {\n return undefined;\n }\n\n return value;\n }\n}\n","import {LocaleNativeStructure, NativeLocale} from \"@locale/providers\";\n\nimport {convertLocaleMessageKey, extractLocaleKey} from \"@locale/utils\";\n\nimport {\n Language,\n LanguageCodes,\n LocaleDir,\n LocaleNonPluralKeys,\n LocalePluralKeys,\n LocaleSubstitutionsFor,\n} from \"@typing/locale\";\n\nexport {Language, LanguageCodes, LocaleDir};\n\n/**\n * Translates a given locale key into the corresponding localized string.\n *\n * @template K - A type representing the non-plural keys of the locale structure.\n * @param {K} key - The locale key to be translated.\n * @param {LocaleSubstitutionsFor<LocaleNativeStructure, K>} [substitutions] - Optional substitutions to be applied\n * within the localized string. These are typically placeholders replaced with dynamic values.\n * @returns {string} - The translated string for the given key, with substitutions applied if provided.\n */\nexport const _ = <K extends LocaleNonPluralKeys<LocaleNativeStructure>>(\n key: K,\n substitutions?: LocaleSubstitutionsFor<LocaleNativeStructure, K>\n): string => {\n return NativeLocale.getInstance().trans(key, substitutions);\n};\n\n/**\n * Translates a given locale key into the corresponding localized string\n * based on a specific count for pluralization.\n *\n * @template K - A type representing the non-plural keys of the locale structure.\n * @param {K} key - The locale key to be translated.\n * @param {number} count - The count used to determine the pluralization form.\n * @param {LocaleSubstitutionsFor<LocaleNativeStructure, K>} [substitutions] - Optional substitutions to be applied\n * within the localized string. These are typically placeholders replaced with dynamic values.\n * @returns {string} - The translated string for the given key, adjusted for pluralization and with substitutions applied if provided.\n */\nexport const _c = <K extends LocalePluralKeys<LocaleNativeStructure>>(\n key: K,\n count: number,\n substitutions?: LocaleSubstitutionsFor<LocaleNativeStructure, K>\n): string => {\n return NativeLocale.getInstance().choice(key, count, substitutions);\n};\n\n/**\n * Converts a locale key into a standardized format and logs a warning if the key is not found\n * in the current language's locale keys.\n *\n * @param {Extract<keyof LocaleNativeStructure, string>} key - The locale key to be converted.\n * This key must be a string and exist within the `LocaleNativeStructure`.\n * @returns {string} - The converted locale message key.\n */\nexport const __ = (key: keyof LocaleNativeStructure & string): string => {\n const locale = NativeLocale.getInstance();\n\n if (!locale.keys().has(key)) {\n console.warn(`Locale key \"${key}\" not found in \"${locale.lang()}\" language.`);\n }\n\n return convertLocaleMessageKey(key);\n};\n\n/**\n * Attempts to extract a locale key from the provided string and translates it\n * into the corresponding localized string. If no locale key can be extracted,\n * the original string is returned.\n *\n * @param {string} input - The input string from which a locale key is to be extracted.\n * @returns {string} - The translated string if a locale key is successfully extracted,\n * or the original string if no locale key is found.\n */\nexport const __t = (input: string): string => {\n const localeKey = extractLocaleKey(input);\n\n if (localeKey) {\n return _(localeKey as LocaleNonPluralKeys<LocaleNativeStructure>);\n }\n\n return input;\n};\n","import {ContentScriptConfig} from \"@typing/content\";\nimport {BackgroundConfig} from \"@typing/background\";\nimport {CommandConfig} from \"@typing/command\";\nimport {Language} from \"@typing/locale\";\n\ntype ManifestCommon = chrome.runtime.Manifest;\ntype ManifestBase = chrome.runtime.ManifestBase;\ntype ManifestPermission = chrome.runtime.ManifestPermissions;\n\nexport const ManifestMatchSchemes: ReadonlySet<string> = new Set<string>([\"http\", \"https\", \"file\", \"ftp\", \"ws\", \"wss\"]);\n\nexport const ManifestSpecialSchemes: ReadonlySet<string> = new Set<string>([\n \"chrome-extension\",\n \"moz-extension\",\n \"data\",\n \"blob\",\n \"filesystem\",\n \"about\",\n \"chrome\",\n \"resource\",\n]);\n\ntype ManifestFixed<T extends ManifestBase> = Omit<T, \"manifest_version\"> & {\n manifest_version: ManifestVersion;\n};\n\ninterface ManifestUnstable {\n permissions?: (ManifestPermission | (string & Record<never, never>))[];\n web_accessible_resources?: string[] | chrome.runtime.ManifestV3[\"web_accessible_resources\"];\n}\n\nexport type ManifestVersion = 2 | 3;\n\nexport enum ManifestIncognito {\n Spanning = \"spanning\",\n Split = \"split\",\n NotAllowed = \"not_allowed\",\n}\n\nexport type ManifestIncognitoValue = ManifestIncognito | `${ManifestIncognito}`;\n\nexport type CoreManifest = ManifestFixed<ManifestBase>;\n\nexport type ChromeManifest = ManifestFixed<ManifestCommon>;\n\nexport type FirefoxManifest = ChromeManifest & {\n action?: chrome.runtime.ManifestV3[\"action\"] & {\n browser_style?: boolean;\n };\n browser_action?: chrome.runtime.ManifestV2[\"browser_action\"] & {\n browser_style?: boolean;\n };\n page_action?: chrome.runtime.ManifestV2[\"page_action\"] & {\n browser_style?: boolean;\n };\n browser_specific_settings?: {\n gecko?: {\n id?: string;\n strict_min_version?: string;\n strict_max_version?: string;\n update_url?: string;\n };\n gecko_android?: {\n strict_min_version?: string;\n strict_max_version?: string;\n };\n };\n} & ManifestUnstable;\n\nexport type SafariManifest = ChromeManifest & {\n browser_specific_settings?: {\n safari?: {\n strict_min_version?: string;\n strict_max_version?: string;\n };\n };\n} & ManifestUnstable;\n\nexport type Manifest = ChromeManifest | FirefoxManifest | SafariManifest;\n\nexport interface ManifestBuilder<T extends CoreManifest = Manifest> {\n setName(name: string): this;\n\n setShortName(shortName?: string): this;\n\n setDescription(description?: string): this;\n\n setEmail(email?: string): this;\n\n setAuthor(author?: string): this;\n\n setHomepage(homepage?: string): this;\n\n setVersion(version?: string): this;\n\n setIncognito(incognito?: ManifestIncognitoValue): this;\n\n setMinimumVersion(minimumVersion?: string): this;\n\n setLocale(lang?: Language): this;\n\n // Icons\n setIcons(icons?: ManifestIcons): this;\n\n setIcon(icon?: string): this; // name of an icon set for manifest.icons\n\n // Entry\n setBackground(background?: ManifestBackground): this;\n\n setCommands(commands?: ManifestCommands): this;\n\n setContentScripts(contentScripts?: ManifestContentScripts): this;\n\n setPopup(popup?: ManifestPopup): this;\n\n setSidebar(sidebar?: ManifestSidebar): this;\n\n // System\n setDependencies(dependencies: ManifestDependencies): this;\n\n // Permissions\n addPermission(permission: ManifestPermission): this;\n\n setPermissions(permissions: ManifestPermissions): this;\n\n appendPermissions(permissions: ManifestPermissions): this;\n\n addHostPermission(permission: string): this;\n\n setHostPermissions(permissions: ManifestHostPermissions): this;\n\n // Host Permissions\n appendHostPermissions(permissions: ManifestHostPermissions): this;\n\n // Web Accessible Resource\n setManifestAccessibleResource(accessibleResources: ManifestAccessibleResources): this;\n\n appendAccessibleResources(accessibleResources: ManifestAccessibleResources): this;\n\n addAccessibleResource(accessibleResource: ManifestAccessibleResource): this;\n\n // Getter\n get(): T;\n}\n\ntype Entry = string;\n\nexport interface ManifestEntry {\n entry: Entry;\n}\n\nexport type ManifestBackground = ManifestEntry & BackgroundConfig;\n\nexport type ManifestContentScript = ManifestEntry & ContentScriptConfig;\nexport type ManifestContentScripts = Set<ManifestContentScript>;\n\nexport type ManifestCommand = CommandConfig;\nexport type ManifestCommands = Set<ManifestCommand>;\n\nexport interface ManifestPopup {\n /**\n * Represents the group name of an icon that can be used in UI elements.\n * This property is optional and, if defined, should typically refer to a string\n * that matches the name of an icon resource available in the application or icon library.\n */\n icon?: string;\n /**\n * Represents an optional title or name or locale key that can be assigned to an entity.\n */\n title?: string;\n /**\n * Represents an optional HTML path.\n */\n path?: string;\n}\n\nexport interface ManifestSidebar {\n /**\n * Represents the group name of an icon that can be used in UI elements.\n * This property is optional and, if defined, should typically refer to a string\n * that matches the name of an icon resource available in the application or icon library.\n */\n icon?: string;\n /**\n * Represents an optional title or name or locale key that can be assigned to an entity.\n */\n title?: string;\n /**\n * Represents an optional HTML path.\n */\n path?: string;\n}\n\nexport interface ManifestAccessibleResource {\n resources: string[];\n matches: string[];\n}\n\nexport type ManifestAccessibleResources = Set<ManifestAccessibleResource>;\n\nexport interface ManifestDependency {\n js: Set<string>;\n css: Set<string>;\n assets: Set<string>;\n}\n\nexport type ManifestIcon = Map<number, string>;\n\nexport type ManifestIcons = Map<string, ManifestIcon>;\n\nexport type ManifestDependencies = Map<Entry, ManifestDependency>;\n\nexport type ManifestPermissions = Set<ManifestPermission>;\n\nexport type ManifestHostPermissions = Set<string>;\n","import type {TransportDictionary, TransportManager, TransportName} from \"@typing/transport\";\n\nexport default abstract class<N extends TransportName, T = TransportDictionary[N]> {\n protected constructor(protected readonly name: N) {}\n\n protected abstract manager(): TransportManager;\n\n public get(): T {\n return this.manager().get(this.name);\n }\n\n public destroy(): void {\n this.manager().remove(this.name);\n }\n}\n","import BaseTransport from \"./BaseTransport\";\n\nimport type {DeepAsyncProxy} from \"@typing/helpers\";\nimport type {TransportDictionary, TransportName} from \"@typing/transport\";\n\nexport default abstract class<\n N extends TransportName,\n T = DeepAsyncProxy<TransportDictionary[N]>,\n> extends BaseTransport<N, T> {\n protected abstract apply(args: any[], path?: string): any;\n\n protected createProxy(path?: string): T {\n const wrapped = () => {};\n\n const proxy = new Proxy(wrapped, {\n apply: async (_target, _thisArg, args) => this.apply(args, path),\n\n get: (_target, propertyName, receiver) => {\n if (propertyName === \"__proxy\" || typeof propertyName !== \"string\") {\n return Reflect.get(wrapped, propertyName, receiver);\n }\n\n const newPath = path == null ? propertyName : `${path}.${String(propertyName)}`;\n\n return this.createProxy(newPath);\n },\n });\n\n // @ts-expect-error — Adding a hidden property\n proxy.__proxy = true;\n\n return proxy as unknown as T;\n }\n\n public get(): T {\n return this.createProxy();\n }\n}\n","import type {TransportDictionary, TransportManager as TransportManagerContract, TransportName} from \"@typing/transport\";\n\nexport default abstract class TransportManager implements TransportManagerContract {\n private items = new Map<TransportName, TransportDictionary[TransportName]>();\n\n public add<K extends TransportName>(name: K, instance: TransportDictionary[K]): this {\n this.items.set(name, instance);\n\n return this;\n }\n\n public get<K extends TransportName>(name: K): TransportDictionary[K] | undefined {\n return this.items.get(name) as TransportDictionary[K] | undefined;\n }\n\n public has(name: TransportName): boolean {\n return this.items.has(name);\n }\n\n public remove<K extends TransportName>(name: K): TransportDictionary[K] | undefined {\n const service = this.get(name);\n\n this.items.delete(name);\n\n return service;\n }\n\n public clear(): this {\n this.items.clear();\n\n return this;\n }\n}\n","import {TransportConfig, TransportDefinition, TransportType} from \"@typing/transport\";\nimport {ViewOptions} from \"@typing/view\";\nimport {Awaiter} from \"@typing/helpers\";\n\nexport const OffscreenGlobalKey = \"adnbnOffscreen\";\nexport const OffscreenGlobalAccess = \"adnbnOffscreenAccess\";\n\nexport enum OffscreenReason {\n /** A reason used for testing purposes only. */\n Testing = \"TESTING\",\n /** The offscreen document is responsible for playing audio. */\n AudioPlayback = \"AUDIO_PLAYBACK\",\n /** The offscreen document needs to embed and script an iframe in order to modify the iframe's content. */\n IframeScripting = \"IFRAME_SCRIPTING\",\n /** The offscreen document needs to embed an iframe and scrape its DOM to extract information. */\n DOMScraping = \"DOM_SCRAPING\",\n /** The offscreen document needs to interact with Blob objects (including URL.createObjectURL()). */\n Blobs = \"BLOBS\",\n /** The offscreen document needs to use the DOMParser API. */\n DOMParser = \"DOM_PARSER\",\n /** The offscreen document needs to interact with media streams from user media (e.g. getUserMedia()). */\n UserMedia = \"USER_MEDIA\",\n /** The offscreen document needs to interact with media streams from display media (e.g. getDisplayMedia()). */\n DisplayMedia = \"DISPLAY_MEDIA\",\n /** The offscreen document needs to use WebRTC APIs. */\n WebRTC = \"WEB_RTC\",\n /** The offscreen document needs to interact with the clipboard APIs(e.g. Navigator.clipboard). */\n Clipboard = \"CLIPBOARD\",\n /** Specifies that the offscreen document needs access to localStorage. */\n LocalStorage = \"LOCAL_STORAGE\",\n /** Specifies that the offscreen document needs to spawn workers. */\n Workers = \"WORKERS\",\n /** Specifies that the offscreen document needs to use navigator.getBattery. */\n BatteryStatus = \"BATTERY_STATUS\",\n /** Specifies that the offscreen document needs to use window.matchMedia. */\n MatchMedia = \"MATCH_MEDIA\",\n /** Specifies that the offscreen document needs to use navigator.geolocation. */\n Geolocation = \"GEOLOCATION\",\n}\n\nexport interface OffscreenConfig extends TransportConfig {\n reasons?: `${OffscreenReason}` | `${OffscreenReason}`[] | OffscreenReason | OffscreenReason[];\n justification?: string;\n}\n\nexport type OffscreenOptions = OffscreenConfig & ViewOptions;\n\nexport type OffscreenEntrypointOptions = Partial<OffscreenOptions>;\n\nexport type OffscreenMainHandler<T extends TransportType> = (\n offscreen: T,\n options: OffscreenEntrypointOptions\n) => Awaiter<void>;\n\nexport interface OffscreenDefinition<T extends TransportType>\n extends TransportDefinition<OffscreenOptions, T>,\n OffscreenEntrypointOptions {\n main?: OffscreenMainHandler<T>;\n}\n\nexport type OffscreenUnresolvedDefinition<T extends TransportType> = Partial<OffscreenDefinition<T>>;\n","import TransportManager from \"@transport/TransportManager\";\n\nimport {OffscreenGlobalKey} from \"@typing/offscreen\";\n\nimport type {TransportManager as TransportManagerContract} from \"@typing/transport\";\n\nexport default class OffscreenManager extends TransportManager {\n public static getInstance(): TransportManagerContract {\n return (globalThis[OffscreenGlobalKey] ??= new OffscreenManager());\n }\n}\n","import {nanoid} from \"nanoid\";\nimport {\n MessageBody,\n MessageData,\n MessageDictionary,\n MessageGeneralHandler,\n MessageMapHandler,\n MessageProvider,\n MessageResponse,\n MessageTargetHandler,\n MessageType,\n} from \"@typing/message\";\n\nexport default abstract class AbstractMessage<T extends MessageDictionary, TOptions>\n implements MessageProvider<T, TOptions>\n{\n public abstract send<K extends MessageType<T>>(\n type: K,\n data: MessageData<T, K>,\n options?: TOptions\n ): Promise<MessageResponse<T, K>>;\n\n public abstract watch<K extends MessageType<T>>(type: K, handler: MessageTargetHandler<T, K>): () => void;\n\n public abstract watch(map: MessageMapHandler<T>): () => void;\n\n public abstract watch<K extends MessageType<T>>(general: MessageGeneralHandler<T, K>): () => void;\n\n protected buildMessage<K extends MessageType<T>>(type: K, data: MessageData<T, K>): MessageBody<T, K> {\n return {\n id: nanoid(),\n type,\n data,\n timestamp: Date.now(),\n };\n }\n}\n","export const MessageGlobalKey = \"adnbnMessage\";\n\nexport const MessageTypeSeparator = \":\";\n\nexport type MessageSender = chrome.runtime.MessageSender;\n\nexport interface MessageDictionary {\n [key: string]: (data: any) => any;\n}\n\nexport type MessageType<T extends MessageDictionary> = Extract<keyof T, string>;\nexport type MessageData<T extends MessageDictionary, K extends MessageType<T>> = Parameters<T[K]>[0];\nexport type MessageResponse<T extends MessageDictionary, K extends MessageType<T>> = ReturnType<T[K]>;\n\nexport type MessageTargetHandler<T extends MessageDictionary, K extends MessageType<T>> = (\n data: MessageData<T, K>,\n sender: MessageSender\n) => MessageResponse<T, K>;\nexport type MessageMapHandler<T extends MessageDictionary> = {[K in MessageType<T>]?: MessageTargetHandler<T, K>};\nexport type MessageGeneralHandler<T extends MessageDictionary, K extends MessageType<T>> = (\n type: K,\n data: MessageData<T, K>,\n sender: MessageSender\n) => any;\n\nexport interface MessageBody<T extends MessageDictionary, K extends MessageType<T>> {\n id: string;\n type: K;\n data: MessageData<T, K>;\n timestamp: number;\n}\n\nexport interface MessageProvider<T extends MessageDictionary, TOptions = void> {\n send<K extends MessageType<T>>(\n type: K,\n data: MessageData<T, K>,\n options?: TOptions\n ): Promise<MessageResponse<T, K>>;\n\n watch<K extends MessageType<T>>(type: K, handler: MessageTargetHandler<T, K>): () => void;\n\n watch(map: MessageMapHandler<T>): () => void;\n\n watch<K extends MessageType<T>>(general: MessageGeneralHandler<T, K>): () => void;\n}\n\nexport interface MessageHandler<T extends MessageDictionary> {\n run(\n type: MessageType<T>,\n data: MessageData<T, MessageType<T>>,\n sender: MessageSender\n ): MessageResponse<T, MessageType<T>> | undefined;\n}\n","import {onMessage} from \"@adnbn/browser\";\n\nimport {\n MessageBody,\n MessageDictionary,\n MessageGlobalKey,\n MessageHandler,\n MessageSender,\n MessageType,\n} from \"@typing/message\";\n\nexport default class MessageManager<T extends MessageDictionary> {\n private handlers: Set<MessageHandler<T>> = new Set();\n private unsubscribe: (() => void) | null = null;\n\n public static getInstance<T extends MessageDictionary>(): MessageManager<T> {\n return (globalThis[MessageGlobalKey] ??= new MessageManager<T>());\n }\n\n constructor() {\n this.listener = this.listener.bind(this);\n }\n\n public add(handler: MessageHandler<T>) {\n this.handlers.add(handler);\n this.updateListener();\n }\n\n public remove(handler: MessageHandler<T>) {\n this.handlers.delete(handler);\n this.updateListener();\n }\n\n public clear() {\n this.handlers = new Set();\n this.updateListener();\n }\n\n private updateListener() {\n if (this.handlers.size > 0 && !this.unsubscribe) {\n this.unsubscribe = onMessage(this.listener);\n } else if (this.handlers.size === 0 && this.unsubscribe) {\n this.unsubscribe();\n this.unsubscribe = null;\n }\n }\n\n private listener<K extends MessageType<T>>(\n message: MessageBody<T, K>,\n sender: MessageSender,\n sendResponse: (response?: any) => void\n ): boolean | void {\n if (!message || typeof message !== \"object\" || !message.type) return;\n\n const results: Promise<any>[] = [];\n\n for (const handler of this.handlers) {\n try {\n const result = handler.run(message.type, message.data, sender);\n if (result !== undefined) {\n results.push(Promise.resolve(result));\n }\n } catch (err) {\n console.error(\"Message handler error:\", err);\n }\n }\n\n if (results.length > 1) {\n throw new Error(\n `Message type \"${message.type}\" has multiple handlers returning a response. Only one response is allowed.`\n );\n }\n\n if (results.length === 1) {\n results[0].then(sendResponse);\n return true;\n }\n }\n}\n","import {\n MessageData,\n MessageDictionary,\n MessageHandler,\n MessageResponse,\n MessageSender,\n MessageType,\n} from \"@typing/message\";\n\nexport default abstract class AbstractHandler<T extends MessageDictionary> implements MessageHandler<T> {\n public abstract run(\n type: MessageType<T>,\n data: MessageData<T, MessageType<T>>,\n sender: MessageSender\n ): MessageResponse<T, MessageType<T>> | undefined;\n}\n","import AbstractHandler from \"./AbstractHandler\";\nimport {\n MessageData,\n MessageDictionary,\n MessageResponse,\n MessageSender,\n MessageTargetHandler,\n MessageType,\n} from \"@typing/message\";\n\nexport default class SingleHandler<T extends MessageDictionary> extends AbstractHandler<T> {\n constructor(\n private messageType: MessageType<T>,\n private handler: MessageTargetHandler<T, MessageType<T>>\n ) {\n super();\n }\n\n public run(\n type: MessageType<T>,\n data: MessageData<T, MessageType<T>>,\n sender: MessageSender\n ): MessageResponse<T, MessageType<T>> | undefined {\n if (type === this.messageType) {\n return this.handler(data, sender);\n }\n }\n}\n","import AbstractHandler from \"./AbstractHandler\";\nimport {\n MessageData,\n MessageDictionary,\n MessageMapHandler,\n MessageResponse,\n MessageSender,\n MessageType,\n} from \"@typing/message\";\n\nexport default class MapHandler<T extends MessageDictionary> extends AbstractHandler<T> {\n constructor(private map: MessageMapHandler<T>) {\n super();\n }\n\n public run(\n type: MessageType<T>,\n data: MessageData<T, MessageType<T>>,\n sender: MessageSender\n ): MessageResponse<T, MessageType<T>> | undefined {\n const handler = this.map[type];\n if (handler) {\n if (typeof handler === \"function\") {\n return handler(data, sender);\n } else {\n throw new Error(`Handler for type \"${type}\" in object of handlers must be a function`);\n }\n }\n }\n}\n","import AbstractHandler from \"./AbstractHandler\";\nimport {\n MessageData,\n MessageDictionary,\n MessageGeneralHandler,\n MessageResponse,\n MessageSender,\n MessageType,\n} from \"@typing/message\";\n\nexport default class GeneralHandler<T extends MessageDictionary, K extends MessageType<T>> extends AbstractHandler<T> {\n constructor(private generalHandler: MessageGeneralHandler<T, K>) {\n super();\n }\n\n public run(\n type: K,\n data: MessageData<T, MessageType<T>>,\n sender: MessageSender\n ): MessageResponse<T, MessageType<T>> | undefined {\n return this.generalHandler(type, data, sender);\n }\n}\n","import {sendMessage, sendTabMessage} from \"@adnbn/browser\";\n\nimport {\n MessageData,\n MessageDictionary,\n MessageGeneralHandler,\n MessageHandler,\n MessageMapHandler,\n MessageResponse,\n MessageTargetHandler,\n MessageType,\n} from \"@typing/message\";\n\nimport AbstractMessage from \"./AbstractMessage\";\nimport MessageManager from \"../MessageManager\";\n\nimport {GeneralHandler, MapHandler, SingleHandler} from \"../handlers\";\n\nexport type MessageSendOptions = number | {tabId: number; frameId?: number; documentId?: string};\n\nexport default class Message<T extends MessageDictionary> extends AbstractMessage<T, MessageSendOptions> {\n private static instance: Message<MessageDictionary> | null = null;\n\n public static getInstance<T extends MessageDictionary>() {\n return (this.instance ??= new Message<T>());\n }\n\n protected get manager(): MessageManager<T> {\n return MessageManager.getInstance<T>();\n }\n\n public send<K extends MessageType<T>>(\n type: K,\n data: MessageData<T, K>,\n options?: MessageSendOptions\n ): Promise<MessageResponse<T, K>> {\n const message = this.buildMessage(type, data);\n\n if (options) {\n if (typeof options === \"number\") {\n return sendTabMessage(options, message);\n }\n\n const {tabId, ...other} = options;\n\n return sendTabMessage(tabId, message, other);\n }\n\n return sendMessage(message);\n }\n\n public watch<K extends MessageType<T>>(\n arg1: K | MessageMapHandler<T> | MessageGeneralHandler<T, K>,\n arg2?: MessageTargetHandler<T, K>\n ): () => void {\n let handler: MessageHandler<T>;\n\n if (typeof arg1 === \"function\") {\n handler = new GeneralHandler<T, K>(arg1);\n } else if (typeof arg1 === \"object\" && arg2 === undefined) {\n handler = new MapHandler<T>(arg1);\n } else if (typeof arg1 === \"string\" && arg2) {\n handler = new SingleHandler<T>(arg1, arg2);\n } else {\n throw new Error(\"Invalid arguments passed to watch()\");\n }\n\n this.manager.add(handler);\n\n return () => this.manager.remove(handler);\n }\n}\n","import {Message, MessageSendOptions} from \"@message/providers\";\n\nimport type {MessageDictionary, MessageProvider} from \"@typing/message\";\nimport type {TransportMessage as TransportMessageContract, TransportMessageData} from \"@typing/transport\";\n\nexport default abstract class TransportMessage implements TransportMessageContract {\n private message: MessageProvider<MessageDictionary, MessageSendOptions> = new Message();\n\n protected abstract readonly key: string;\n\n public async send(data: TransportMessageData) {\n return this.message.send(this.key, data);\n }\n\n public watch(handler: (data: TransportMessageData) => any): void {\n this.message.watch(this.key, handler);\n }\n}\n","import TransportMessage from \"@transport/TransportMessage\";\n\nimport {MessageTypeSeparator} from \"@typing/message\";\n\nexport default class OffscreenMessage extends TransportMessage {\n protected readonly key: string;\n\n constructor(name: string) {\n super();\n\n this.key = `offscreen${MessageTypeSeparator}${name}`;\n }\n}\n","import {isBackground} from \"@adnbn/browser\";\n\nimport {Message} from \"@message/providers\";\n\ntype CreateParameters = chrome.offscreen.CreateParameters;\n\nexport default class OffscreenBridge {\n protected readonly key: string = \"offscreen-background\";\n\n protected readonly message = new Message();\n\n private static instance?: OffscreenBridge;\n\n public static getInstance(): OffscreenBridge {\n return (OffscreenBridge.instance ??= new OffscreenBridge());\n }\n\n public static async createOffscreen(parameters: CreateParameters): Promise<void> {\n return OffscreenBridge.getInstance().create(parameters);\n }\n\n public async create(parameters: CreateParameters): Promise<any> {\n if (isBackground()) {\n await this.apply(parameters);\n\n return;\n }\n\n await this.message.send(this.key, parameters);\n }\n\n protected apply({url}: CreateParameters): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n if (document.querySelector(`iframe[src=\"${url}\"]`)) {\n resolve();\n\n return;\n }\n\n const iframe = document.createElement(\"iframe\");\n\n iframe.src = url;\n iframe.onload = () => resolve();\n iframe.onerror = () => reject();\n\n document.body.appendChild(iframe);\n });\n }\n}\n","import {OffscreenGlobalAccess} from \"@typing/offscreen\";\n\nexport const isOffscreen = () => {\n return globalThis[OffscreenGlobalAccess] === true;\n};\n","import {closeOffscreen, createOffscreen, hasOffscreen, isManifestVersion3} from \"@adnbn/browser\";\nimport {__t} from \"@main/locale\";\nimport {getBrowser} from \"@main/env\";\n\nimport ProxyTransport from \"@transport/ProxyTransport\";\n\nimport OffscreenManager from \"../OffscreenManager\";\nimport OffscreenMessage from \"../OffscreenMessage\";\nimport OffscreenBridge from \"../OffscreenBridge\";\n\nimport {isOffscreen} from \"../utils\";\n\nimport {Browser} from \"@typing/browser\";\nimport {DeepAsyncProxy} from \"@typing/helpers\";\nimport {TransportDictionary, TransportManager, TransportMessage, TransportName} from \"@typing/transport\";\n\ntype CreateParameters = chrome.offscreen.CreateParameters;\n\nexport default class<N extends TransportName, T = DeepAsyncProxy<TransportDictionary[N]>> extends ProxyTransport<N, T> {\n protected message: TransportMessage;\n\n constructor(\n name: N,\n private parameters: CreateParameters\n ) {\n super(name);\n\n this.message = new OffscreenMessage(name);\n }\n\n protected manager(): TransportManager {\n return OffscreenManager.getInstance();\n }\n\n protected async apply(args: any[], path?: string): Promise<any> {\n const parameters: CreateParameters = {\n ...this.parameters,\n justification: __t(this.parameters.justification),\n };\n\n if (!isManifestVersion3() || getBrowser() === Browser.Firefox) {\n await OffscreenBridge.createOffscreen(parameters);\n } else {\n if (await hasOffscreen()) {\n await closeOffscreen();\n }\n\n await createOffscreen(parameters);\n }\n\n return this.message.send({path, args});\n }\n\n public get(): T {\n if (isOffscreen()) {\n throw new Error(\n `You are trying to get proxy offscreen service \"${this.name}\" from offscreen. You can get original offscreen service instead`\n );\n }\n\n return super.get();\n }\n}\n","import ProxyOffscreen from \"@offscreen/providers/ProxyOffscreen\";\n\nimport {type OffscreenDefinition, OffscreenReason, type OffscreenUnresolvedDefinition} from \"@typing/offscreen\";\nimport {TransportDictionary, TransportType} from \"@typing/transport\";\nimport {DeepAsyncProxy} from \"@typing/helpers\";\n\ntype OffscreenParameters = chrome.offscreen.CreateParameters;\n\nexport {OffscreenReason, OffscreenDefinition, OffscreenUnresolvedDefinition};\n\nexport type OffscreenAlias = string;\n\nexport type OffscreenMap = Map<OffscreenAlias, OffscreenParameters>;\n\nexport const defineOffscreen = <T extends TransportType>(options: OffscreenDefinition<T>): OffscreenDefinition<T> => {\n return options;\n};\n\nexport const getOffscreens = (): OffscreenMap => {\n const offscreens: OffscreenMap = new Map();\n\n try {\n // @ts-expect-error: __ADNBN_OFFSCREEN_PARAMETERS__ is a virtual variable generated by the bundler `src/cli/plugins/offscreen/index.ts`\n Object.entries<OffscreenParameters>(__ADNBN_OFFSCREEN_PARAMETERS__).forEach(([key, value]) => {\n offscreens.set(key, value);\n });\n } catch (e) {\n console.error(\"Failed getting offscreens: \", e);\n }\n\n return offscreens;\n};\n\nexport const getOffscreen = <N extends Extract<keyof TransportDictionary, string>>(\n name: N\n): DeepAsyncProxy<TransportDictionary[N]> => {\n const parameters = getOffscreens().get(name);\n\n if (!parameters) {\n throw new Error(`Unable to get offscreen: ${name}`);\n }\n\n return new ProxyOffscreen(name, parameters).get();\n};\n","import {getUrl} from \"@adnbn/browser\";\n\nimport {PageConfig, PageDefinition, PageProps} from \"@typing/page\";\n\nexport type {PageDefinition, PageProps, PageConfig};\n\nexport type PageAlias = string;\n\nexport type PageMap = Map<PageAlias, string>;\n\nexport const definePage = (options: PageDefinition): PageDefinition => {\n return options;\n};\n\nexport const getPages = (): PageMap => {\n const pages: PageMap = new Map();\n\n try {\n // @ts-expect-error: __ADNBN_PAGE_ALIAS__ is a virtual variable generated by the bundler `src/cli/plugins/page/index.ts`\n Object.entries<string>(__ADNBN_PAGE_ALIAS__).forEach(([key, value]) => {\n pages.set(key, value);\n });\n } catch (e) {\n console.error(\"Failed getting pages: \", e);\n }\n\n return pages;\n};\n\nexport const getPageUrl = (alias: PageAlias): string => {\n let path = getPages().get(alias);\n\n if (!path) {\n console.warn(`Cannot find page: ${alias}`);\n\n path = alias;\n }\n\n return getUrl(path);\n};\n","import {Plugin, PluginDefinition} from \"@typing/plugin\";\n\nexport type {Plugin, PluginDefinition};\n\nexport function definePlugin<T extends any[] = []>(plugin: PluginDefinition<T>): PluginDefinition<T> {\n return plugin;\n}\n","import {changeActionIcon} from \"./icon\";\nimport {__t} from \"./locale\";\n\nimport {setActionPopup, setActionTitle} from \"@adnbn/browser\";\n\nimport {PopupDefinition} from \"@typing/popup\";\nimport {ManifestPopup} from \"@typing/manifest\";\n\ntype Tab = chrome.tabs.Tab;\n\nexport type PopupAlias = string;\n\nexport type PopupMap = Map<PopupAlias, ManifestPopup>;\n\nexport const definePopup = (options: PopupDefinition): PopupDefinition => {\n return options;\n};\n\nexport const getPopups = (): PopupMap => {\n const popups: PopupMap = new Map();\n\n try {\n // @ts-expect-error: __ADNBN_POPUP_MAP__ is a virtual variable generated by the bundler `src/cli/plugins/popup/index.ts`\n Object.entries<ManifestPopup>(__ADNBN_POPUP_MAP__).forEach(([key, value]) => {\n popups.set(key, value);\n });\n } catch (e) {\n console.error(\"Failed getting popups: \", e);\n }\n\n return popups;\n};\n\nexport const changePopup = async (alias: PopupAlias, tab?: number | Tab): Promise<void> => {\n const popup = getPopups().get(alias);\n\n if (!popup) {\n throw new Error(`Not found popup: \"${alias}\"`);\n }\n\n if (tab && typeof tab === \"object\") {\n tab = tab.id;\n }\n\n const {path, title, icon} = popup;\n\n if (!path) {\n throw new Error(`Not found popup path: \"${alias}\"`);\n }\n\n await setActionPopup(path, tab);\n\n if (title) {\n await setActionTitle(__t(title), tab);\n }\n\n if (icon) {\n await changeActionIcon(icon, tab);\n }\n};\n","import {EntrypointOptions} from \"@typing/entrypoint\";\nimport {ContentScriptConfig, ContentScriptContext, ContentScriptDefinition} from \"@typing/content\";\nimport {TransportConfig, TransportDefinition, TransportType} from \"@typing/transport\";\nimport {Awaiter} from \"@typing/helpers\";\n\nexport const RelayGlobalKey = \"adnbnRelay\";\n\nexport type RelayConfig = TransportConfig & ContentScriptConfig;\n\nexport type RelayOptions = RelayConfig & EntrypointOptions;\n\nexport type RelayEntrypointOptions = Partial<RelayOptions>;\n\nexport type RelayMainHandler<T extends TransportType> = (\n relay: T,\n context: ContentScriptContext,\n options: RelayEntrypointOptions\n) => Awaiter<void>;\n\nexport interface RelayDefinition<T extends TransportType>\n extends Omit<TransportDefinition<RelayOptions, T>, \"main\">,\n Omit<ContentScriptDefinition, \"main\">,\n Omit<RelayEntrypointOptions, \"declarative\"> {\n main?: RelayMainHandler<T>;\n}\n\nexport type RelayUnresolvedDefinition<T extends TransportType> = Partial<RelayDefinition<T>>;\n","import get from \"get-value\";\n\nimport TransportManager from \"@transport/TransportManager\";\n\nimport {TransportManager as TransportManagerContract, TransportName} from \"@typing/transport\";\nimport {RelayGlobalKey} from \"@typing/relay\";\n\ntype PropertyOptions = {\n path?: string;\n args?: any[];\n getOptions?: get.Options;\n};\n\nexport default class RelayManager extends TransportManager {\n public static getInstance(): TransportManagerContract {\n return (globalThis[RelayGlobalKey] ??= new RelayManager());\n }\n\n public async property(name: TransportName, options?: PropertyOptions): Promise<any> {\n const {path, args, getOptions} = options || {};\n const relay = this.get(name);\n\n const property = path == null ? relay : get(relay, path, getOptions);\n\n if (property === undefined) {\n throw new Error(`Property not found at path \"${path}\" in relay \"${name}\"`);\n }\n\n if (typeof property === \"function\") {\n return await property.apply(relay, args);\n }\n\n return property;\n }\n}\n","import {getManifestVersion, isAvailableScripting} from \"@adnbn/browser\";\n\nimport injectScriptFactory, {type InjectScriptContract, type InjectScriptOptions} from \"@adnbn/inject-script\";\n\nimport ProxyTransport from \"@transport/ProxyTransport\";\n\nimport RelayManager from \"../RelayManager\";\n\nimport {RelayGlobalKey} from \"@typing/relay\";\n\nimport type {DeepAsyncProxy} from \"@typing/helpers\";\nimport type {TransportDictionary, TransportManager, TransportName} from \"@typing/transport\";\n\nexport type ProxyRelayOptions =\n | number\n | (Omit<InjectScriptOptions, \"frameId\" | \"documentId\" | \"timeFallback\"> & {\n frameId?: number;\n documentId?: string;\n });\n\nexport default class ProxyRelay<\n N extends TransportName,\n T = DeepAsyncProxy<TransportDictionary[N]>,\n> extends ProxyTransport<N, T> {\n private injectScript: InjectScriptContract;\n\n constructor(\n name: N,\n protected options: ProxyRelayOptions\n ) {\n super(name);\n\n this.injectScript = injectScriptFactory({\n ...(typeof options === \"number\" ? {tabId: options} : options),\n timeFallback: 4000,\n });\n }\n\n protected manager(): TransportManager {\n return RelayManager.getInstance();\n }\n\n protected async apply(args: any[], path?: string): Promise<any> {\n const func = async (name: string, path: string, args: any[], key: string) => {\n try {\n const awaitManager = async (maxAttempts = 10, delay = 300): Promise<RelayManager> => {\n for (let count = 0; count < maxAttempts; count++) {\n const manager = globalThis[key];\n\n if (manager) return manager;\n\n await new Promise(resolve => setTimeout(resolve, delay));\n }\n\n throw new Error(`Relay manager not found after ${maxAttempts} attempts.`);\n };\n\n const manager: RelayManager = await awaitManager();\n\n return await manager.property(name, {path, args});\n } catch (error) {\n console.error(\"ProxyRelay.createProxy()\", document.location.href, error);\n\n throw error;\n }\n };\n\n const result = await this.injectScript.run(func, [this.name, path!, args, RelayGlobalKey]);\n\n return result?.[0]?.result;\n }\n\n public get(): T {\n if (!isAvailableScripting() && getManifestVersion() !== 2) {\n throw new Error(\n `You are trying to get proxy relay \"${this.name}\" from script content. You can get original relay instead`\n );\n }\n\n return super.get();\n }\n}\n","import {ProxyRelay, type ProxyRelayOptions} from \"@relay/providers\";\n\nimport {DeepAsyncProxy} from \"@typing/helpers\";\nimport {TransportDictionary, TransportType} from \"@typing/transport\";\nimport {RelayDefinition, RelayUnresolvedDefinition} from \"@typing/relay\";\n\nexport type {RelayDefinition, RelayUnresolvedDefinition};\n\nexport const defineRelay = <T extends TransportType>(options: RelayDefinition<T>): RelayDefinition<T> => {\n return options;\n};\n\nexport const getRelay = <N extends Extract<keyof TransportDictionary, string>>(\n name: N,\n options: ProxyRelayOptions\n): DeepAsyncProxy<TransportDictionary[N]> => {\n return new ProxyRelay(name, options).get();\n};\n","import {BackgroundConfig} from \"@typing/background\";\nimport {EntrypointOptions} from \"@typing/entrypoint\";\nimport {TransportConfig, TransportDefinition, TransportType} from \"@typing/transport\";\n\nexport const ServiceGlobalKey = \"adnbnService\";\n\nexport type ServiceConfig = TransportConfig & BackgroundConfig;\n\nexport type ServiceOptions = ServiceConfig & EntrypointOptions;\n\nexport type ServiceEntrypointOptions = Partial<ServiceOptions>;\n\nexport type ServiceDefinition<T extends TransportType> = TransportDefinition<ServiceOptions, T> &\n ServiceEntrypointOptions;\n\nexport type ServiceUnresolvedDefinition<T extends TransportType> = Partial<ServiceDefinition<T>>;\n","import TransportManager from \"@transport/TransportManager\";\n\nimport {ServiceGlobalKey} from \"@typing/service\";\n\nimport type {TransportManager as TransportManagerContract} from \"@typing/transport\";\n\nexport default class ServiceManager extends TransportManager {\n public static getInstance(): TransportManagerContract {\n return (globalThis[ServiceGlobalKey] ??= new ServiceManager());\n }\n}\n","import TransportMessage from \"@transport/TransportMessage\";\n\nimport {MessageTypeSeparator} from \"@typing/message\";\n\nexport default class ServiceMessage extends TransportMessage {\n protected readonly key: string;\n\n constructor(name: string) {\n super();\n this.key = `service${MessageTypeSeparator}${name}`;\n }\n}\n","import {isBackground} from \"@adnbn/browser\";\n\nimport ProxyTransport from \"@transport/ProxyTransport\";\n\nimport ServiceManager from \"../ServiceManager\";\nimport ServiceMessage from \"../ServiceMessage\";\n\nimport type {DeepAsyncProxy} from \"@typing/helpers\";\nimport type {TransportDictionary, TransportManager, TransportMessage, TransportName} from \"@typing/transport\";\n\nexport default class<N extends TransportName, T = DeepAsyncProxy<TransportDictionary[N]>> extends ProxyTransport<N, T> {\n protected message: TransportMessage;\n\n constructor(name: N) {\n super(name);\n this.message = new ServiceMessage(name);\n }\n\n protected manager(): TransportManager {\n return ServiceManager.getInstance();\n }\n\n protected async apply(args: any[], path?: string): Promise<any> {\n return this.message.send({path, args});\n }\n\n public get(): T {\n if (isBackground()) {\n throw new Error(\n `You are trying to get proxy service \"${this.name}\" from background. You can get original service instead`\n );\n }\n\n return super.get();\n }\n}\n","import {ProxyService} from \"@service/providers\";\n\nimport {DeepAsyncProxy} from \"@typing/helpers\";\nimport {TransportDictionary, TransportType} from \"@typing/transport\";\nimport {ServiceDefinition} from \"@typing/service\";\n\nexport type {ServiceDefinition};\n\nexport const defineService = <T extends TransportType>(options: ServiceDefinition<T>): ServiceDefinition<T> => {\n return options;\n};\n\nexport const getService = <N extends Extract<keyof TransportDictionary, string>>(\n name: N\n): DeepAsyncProxy<TransportDictionary[N]> => {\n return new ProxyService(name).get();\n};\n","import {setSidebarPath, setSidebarTitle} from \"@adnbn/browser\";\n\nimport {__t} from \"./locale\";\n\nimport type {SidebarDefinition} from \"@typing/sidebar\";\nimport type {ManifestSidebar} from \"@typing/manifest\";\n\ntype Tab = chrome.tabs.Tab;\n\nexport type SidebarAlias = string;\n\nexport type SidebarMap = Map<SidebarAlias, ManifestSidebar>;\n\nexport const defineSidebar = (options: SidebarDefinition): SidebarDefinition => {\n return options;\n};\n\nexport const getSidebars = (): SidebarMap => {\n const sidebars: SidebarMap = new Map();\n\n try {\n // @ts-expect-error: __ADNBN_SIDEBAR_MAP__ is a virtual variable generated by the bundler `src/cli/plugins/sidebar/index.ts`\n Object.entries<ManifestSidebar>(__ADNBN_SIDEBAR_MAP__).forEach(([key, value]) => {\n sidebars.set(key, value);\n });\n } catch (e) {\n console.error(\"Failed getting sidebars: \", e);\n }\n\n return sidebars;\n};\n\nexport const changeSidebar = async (alias: SidebarAlias, tab?: number | Tab): Promise<void> => {\n const sidebar = getSidebars().get(alias);\n\n if (!sidebar) {\n throw new Error(`Not found sidebar: \"${alias}\"`);\n }\n\n if (tab && typeof tab === \"object\") {\n tab = tab.id;\n }\n\n const {path, title} = sidebar;\n\n if (!path) {\n throw new Error(`Not found sidebar path: \"${alias}\"`);\n }\n\n await setSidebarPath(path, tab);\n\n if (title) {\n await setSidebarTitle(__t(title), tab);\n }\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/types/app.ts","../src/main/background.ts","../src/types/browser.ts","../src/types/command.ts","../src/main/command.ts","../src/main/config.ts","../src/types/content.ts","../src/entry/content/core/resolvers/mount.ts","../src/entry/content/core/resolvers/render.ts","../src/entry/content/core/resolvers/definition.ts","../src/main/content.ts","../src/cli/plugins/dotenv/utils.ts","../src/main/env.ts","../src/types/icon.ts","../src/main/icon.ts","../src/types/manifest.ts","../src/types/locale.ts","../src/locale/providers/AbstractLocale.ts","../src/locale/utils.ts","../src/locale/providers/NativeLocale.ts","../src/locale/helpers.ts","../src/transport/BaseTransport.ts","../src/transport/ProxyTransport.ts","../src/transport/TransportManager.ts","../src/types/offscreen.ts","../src/offscreen/OffscreenManager.ts","../src/message/providers/AbstractMessage.ts","../src/types/message.ts","../src/message/MessageManager.ts","../src/message/handlers/AbstractHandler.ts","../src/message/handlers/SingleHandler.ts","../src/message/handlers/MapHandler.ts","../src/message/handlers/GeneralHandler.ts","../src/message/providers/Message.ts","../src/transport/TransportMessage.ts","../src/offscreen/OffscreenMessage.ts","../src/offscreen/OffscreenBridge.ts","../src/offscreen/utils.ts","../src/offscreen/providers/ProxyOffscreen.ts","../src/main/offscreen.ts","../src/main/page.ts","../src/main/plugin.ts","../src/main/popup.ts","../src/types/relay.ts","../src/relay/RelayManager.ts","../src/relay/providers/ProxyRelay.ts","../src/main/relay.ts","../src/types/service.ts","../src/service/ServiceManager.ts","../src/service/ServiceMessage.ts","../src/service/providers/ProxyService.ts","../src/main/service.ts","../src/main/sidebar.ts"],"names":["Mode","Command","Browser","ContentScriptAppend","browser","setActionIcon","ManifestIncognito","Language","_","getI18nMessage","getI18nUILanguage","OffscreenReason","nanoid","onMessage","sendTabMessage","sendMessage","isBackground","isManifestVersion3","hasOffscreen","closeOffscreen","createOffscreen","getUrl","setActionPopup","setActionTitle","get","injectScriptFactory","path","args","manager","isAvailableScripting","getManifestVersion","setSidebarPath","setSidebarTitle"],"mappings":";;;;;;;;;;;;;AAGY,IAAA,IAAA,qBAAAA,KAAL,KAAA;AACH,EAAAA,MAAA,MAAO,CAAA,GAAA,MAAA;AACP,EAAAA,MAAA,aAAc,CAAA,GAAA,aAAA;AACd,EAAAA,MAAA,YAAa,CAAA,GAAA,YAAA;AAHL,EAAAA,OAAAA,KAAAA;AAAA,CAAA,EAAA,IAAA,IAAA,EAAA;AAMA,IAAA,OAAA,qBAAAC,QAAL,KAAA;AACH,EAAAA,SAAA,OAAQ,CAAA,GAAA,OAAA;AACR,EAAAA,SAAA,OAAQ,CAAA,GAAA,OAAA;AAFA,E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C,CAAC,GAAA,EAAK,KAAK,CAAM,KAAA;AAC7E,MAAS,QAAA,CAAA,GAAA,CAAI,KAAK,KAAK,CAAA;AAAA,KAC1B,CAAA;AAAA,WACI,CAAG,EAAA;AACR,IAAQ,OAAA,CAAA,KAAA,CAAM,6BAA6B,CAAC,CAAA;AAAA;AAGhD,EAAO,OAAA,QAAA;AACX;AAEa,IAAA,aAAA,GAAgB,OAAO,KAAA,EAAqB,GAAsC,KAAA;AAC3F,EAAA,MAAM,OAAU,GAAA,WAAA,EAAc,CAAA,GAAA,CAAI,KAAK,CAAA;AAEvC,EAAA,IAAI,CAAC,OAAS,EAAA;AACV,IAAA,MAAM,IAAI,KAAA,CAAM,CAAuB,oBAAA,EAAA,KAAK,CAAG,CAAA,CAAA,CAAA;AAAA;AAGnD,EAAI,IAAA,GAAA,IAAO,OAAO,GAAA,KAAQ,QAAU,EAAA;AAChC,IAAA,GAAA,GAAM,GAAI,CAAA,EAAA;AAAA;AAGd,EAAM,MAAA,EAAC,IAAM,EAAA,KAAA,EAAS,GAAA,OAAA;AAEtB,EAAA,IAAI,CAAC,IAAM,EAAA;AACP,IAAA,MAAM,IAAI,KAAA,CAAM,CAA4B,yBAAA,EAAA,KAAK,CAAG,CAAA,CAAA,CAAA;AAAA;AAGxD,EAAM,MAAAe,sBAAA,CAAe,MAAM,GAAG,CAAA;AAE9B,EAAA,IAAI,KAAO,EAAA;AACP,IAAA,MAAMC,uBAAgB,CAAA,GAAA,CAAI,KAAK,CAAA,EAAG,GAAG,CAAA;AAAA;AAE7C","file":"index.cjs","sourcesContent":["export const PackageName = \"adnbn\";\nexport const SystemDir = \".adnbn\";\n\nexport enum Mode {\n None = \"none\",\n Development = \"development\",\n Production = \"production\",\n}\n\nexport enum Command {\n Build = \"build\",\n Watch = \"watch\",\n}\n","import {BackgroundConfig, BackgroundDefinition, BackgroundMainHandler} from \"@typing/background\";\n\nexport type {BackgroundConfig, BackgroundDefinition, BackgroundMainHandler};\n\nexport const defineBackground = (options: BackgroundDefinition): BackgroundDefinition => {\n return options;\n};\n","export enum Browser {\n Chrome = \"chrome\",\n Chromium = \"chromium\",\n Edge = \"edge\",\n Firefox = \"firefox\",\n Opera = \"opera\",\n Safari = \"safari\",\n}\n","import {Required} from \"utility-types\";\n\nimport {EntrypointBuilder, EntrypointOptions} from \"@typing/entrypoint\";\nimport {BackgroundConfig} from \"@typing/background\";\nimport {Awaiter} from \"@typing/helpers\";\n\ntype Tab = chrome.tabs.Tab;\n\nexport const CommandExecuteActionName = \"_execute_action\";\n\nexport interface CommandConfig extends BackgroundConfig {\n name: string;\n description?: string;\n global?: boolean;\n defaultKey?: string;\n windowsKey?: string;\n macKey?: string;\n chromeosKey?: string;\n linuxKey?: string;\n}\n\nexport type CommandOptions = CommandConfig & EntrypointOptions;\n\nexport type CommandEntrypointOptions = Partial<CommandOptions>;\n\nexport type CommandExecute = (tab: Tab | undefined, options: CommandOptions) => Awaiter<void>;\n\nexport interface CommandDefinition extends CommandEntrypointOptions {\n execute: CommandExecute;\n}\n\nexport type ExecuteActionCommandDefinition = Omit<CommandDefinition, \"name\">;\n\nexport type CommandUnresolvedDefinition = Partial<CommandDefinition>;\n\nexport type CommandResolvedDefinition = Required<CommandDefinition, \"name\" | \"execute\">;\n\nexport type CommandBuilder = EntrypointBuilder;\n","import {\n CommandConfig,\n CommandDefinition,\n CommandExecute,\n CommandExecuteActionName,\n ExecuteActionCommandDefinition,\n} from \"@typing/command\";\n\nexport {\n type CommandDefinition,\n type ExecuteActionCommandDefinition,\n CommandExecuteActionName,\n type CommandConfig,\n type CommandExecute,\n};\n\nexport const defineCommand = (options: CommandDefinition): CommandDefinition => {\n return options;\n};\n\nexport const defineExecuteActionCommand = (options: ExecuteActionCommandDefinition): CommandDefinition => {\n return {...options, name: CommandExecuteActionName};\n};\n","import {Config, ConfigDefinition, ReadonlyConfig, UserConfig} from \"@typing/config\";\n\nexport type {Config, ReadonlyConfig, ConfigDefinition, UserConfig};\n\nexport const defineConfig = (config: ConfigDefinition): ConfigDefinition => {\n return config;\n};\n","import type {FC, ReactNode} from \"react\";\nimport {Optional} from \"utility-types\";\n\nimport {EntrypointBuilder, EntrypointOptions} from \"@typing/entrypoint\";\nimport {Awaiter, PickNonFunctionProperties} from \"@typing/helpers\";\n\ntype ExecutionWorld = chrome.scripting.ExecutionWorld;\ntype RunAt = chrome.userScripts.RunAt;\n\nexport const ContentScriptMatches = [\"*://*/*\"];\n\nexport interface ContentScriptConfig {\n matches?: string[];\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default []\n */\n excludeMatches?: string[];\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default []\n */\n includeGlobs?: string[];\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default []\n */\n excludeGlobs?: string[];\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default false\n */\n allFrames?: boolean;\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default \"documentIdle\"\n */\n runAt?: RunAt;\n /**\n * See https://developer.chrome.com/docs/extensions/develop/concepts/content-scripts#isolated_world\n */\n world?: ExecutionWorld;\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default false\n */\n matchAboutBlank?: boolean;\n /**\n * See https://developer.chrome.com/docs/extensions/mv3/content_scripts/\n * @default false\n */\n matchOriginAsFallback?: boolean;\n /**\n * Whether this content script requires explicit permission declaration in the extension manifest.\n * When set to true, the content script must be declared in the manifest.json permissions section\n * to be allowed to run on the specified pages.\n *\n * @see https://developer.chrome.com/docs/extensions/mv3/declare_permissions/\n *\n * @default false\n */\n declarative?: boolean;\n}\n\nexport type ContentScriptOptions = ContentScriptConfig & EntrypointOptions;\n\nexport type ContentScriptEntrypointOptions = Partial<ContentScriptOptions>;\n\n// Append\nexport enum ContentScriptAppend {\n Last = \"last\",\n First = \"first\",\n Replace = \"replace\",\n Before = \"before\",\n After = \"after\",\n}\n\n// Mount\nexport type ContentScriptMountFunction = (anchor: Element, container: Element) => void | (() => void);\n\nexport interface ContentScriptMount {\n mount(): void;\n\n unmount(): void;\n}\n\n// Props\nexport interface ContentScriptProps extends ContentScriptEntrypointOptions {\n anchor: Element;\n}\n\n// Anchor\nexport type ContentScriptAnchor = string | Element | null | undefined;\nexport type ContentScriptAnchorGetter = () => Awaiter<ContentScriptAnchor>;\nexport type ContentScriptAnchorResolver = () => Awaiter<Element[]>;\n\n// Render\nexport type ContentScriptRenderReactComponent = FC<ContentScriptProps>;\nexport type ContentScriptRenderValue = Element | ReactNode | ContentScriptRenderReactComponent;\nexport type ContentScriptRenderHandler = (props: ContentScriptProps) => Awaiter<undefined | ContentScriptRenderValue>;\n\n// Container\nexport type ContentScriptContainerTag = Exclude<keyof HTMLElementTagNameMap, \"html\" | \"body\">;\n\nexport type ContentScriptContainerOptions = {\n [Tag in ContentScriptContainerTag]: {\n tagName: Tag;\n } & Exclude<Optional<PickNonFunctionProperties<HTMLElementTagNameMap[Tag]>>, \"id\">;\n}[ContentScriptContainerTag];\n\nexport type ContentScriptContainerFactory = (\n props: ContentScriptProps\n) => Awaiter<Element | ContentScriptContainerTag | ContentScriptContainerOptions>;\nexport type ContentScriptContainerCreator = (props: ContentScriptProps) => Awaiter<Element>;\n\n// Watch\nexport type ContentScriptWatchStrategy = (update: () => void, context: ContentScriptContext) => () => void;\n\n// Context\nexport interface ContentScriptContext extends ContentScriptMount {\n nodes: ReadonlySet<ContentScriptNode>;\n}\n\n// Main\nexport type ContentScriptMainFunction = (context: ContentScriptContext, options: ContentScriptOptions) => Awaiter<void>;\n\n// Node\nexport interface ContentScriptNode extends ContentScriptMount {\n anchor: Element;\n container?: Element;\n}\n\nexport type ContentScriptNodeSet = Set<ContentScriptNode>;\n\n// Definition\nexport interface ContentScriptDefinition extends ContentScriptEntrypointOptions {\n anchor?: ContentScriptAnchor | ContentScriptAnchorGetter;\n mount?: ContentScriptMountFunction;\n render?: ContentScriptRenderValue | ContentScriptRenderHandler;\n container?: ContentScriptContainerTag | ContentScriptContainerOptions | ContentScriptContainerFactory;\n watch?: true | ContentScriptWatchStrategy;\n main?: ContentScriptMainFunction;\n}\n\n// prettier-ignore\nexport interface ContentScriptResolvedDefinition extends Omit<ContentScriptDefinition, \"anchor\" | \"mount\" | \"container\" | \"render\" | \"watch\"> {\n anchor: ContentScriptAnchorResolver;\n mount: ContentScriptMountFunction;\n render?: ContentScriptRenderHandler;\n container: ContentScriptContainerCreator;\n watch: ContentScriptWatchStrategy;\n}\n\nexport interface ContentScriptAppendDefinition extends Omit<ContentScriptDefinition, \"mount\"> {\n append?: ContentScriptAppend;\n}\n\n// Builder\nexport interface ContentScriptBuilder extends EntrypointBuilder {\n getContext(): ContentScriptContext;\n}\n","import {ContentScriptAppend, ContentScriptMountFunction} from \"@typing/content\";\n\n// prettier-ignore\nexport const contentScriptMountAppendResolver =\n (append?: ContentScriptAppend): ContentScriptMountFunction =>\n (anchor: Element, container: Element): void => {\n switch (append) {\n case ContentScriptAppend.Last:\n anchor.append(container);\n break;\n default:\n case undefined:\n case ContentScriptAppend.First:\n anchor.prepend(container);\n break;\n case ContentScriptAppend.Replace:\n anchor.replaceWith(container);\n break;\n case ContentScriptAppend.After:\n anchor.parentElement?.insertBefore(container, anchor.nextElementSibling);\n break;\n case ContentScriptAppend.Before:\n anchor.parentElement?.insertBefore(container, anchor);\n break;\n }\n };\n","import {ContentScriptRenderHandler, ContentScriptRenderValue} from \"@typing/content\";\n\nexport const isValidContentScriptRenderValue = (value: unknown): value is string | number | Element => {\n return (typeof value === \"string\" && value.length > 0) || typeof value === \"number\" || value instanceof Element;\n};\n\n// prettier-ignore\nexport const contentScriptRenderResolver =\n (render?: ContentScriptRenderValue | ContentScriptRenderHandler): ContentScriptRenderHandler =>\n async (props): Promise<undefined | ContentScriptRenderValue> => {\n let resolvedRender = typeof render === \"function\" ? render(props) : render;\n\n if (resolvedRender instanceof Promise) {\n resolvedRender = await resolvedRender;\n }\n\n if (resolvedRender !== true && !isValidContentScriptRenderValue(resolvedRender)) {\n return;\n }\n\n return resolvedRender;\n };\n","import {isValidContentScriptRenderValue} from \"../resolvers/render\";\n\nimport {ContentScriptDefinition, ContentScriptRenderHandler, ContentScriptRenderValue} from \"@typing/content\";\n\nexport const isContentScriptDefinition = (definition: any): definition is ContentScriptDefinition => {\n return (\n definition && typeof definition === \"object\" && definition.constructor === Object && !(\"$$typeof\" in definition)\n );\n};\n\nexport const isValidContentScriptDefinitionRenderValue = (\n definition: any\n): definition is ContentScriptRenderValue | ContentScriptRenderHandler => {\n return (\n isValidContentScriptRenderValue(definition) ||\n typeof definition === \"function\" ||\n (typeof definition === \"object\" && definition.constructor === Object && \"$$typeof\" in definition)\n );\n};\n","import {contentScriptMountAppendResolver} from \"@entry/content\";\n\nimport {ContentScriptAppendDefinition, ContentScriptDefinition} from \"@typing/content\";\n\nexport * from \"@entry/content\";\nexport * from \"@typing/content\";\n\nexport const defineContentScript = (options: ContentScriptDefinition): ContentScriptDefinition => {\n return options;\n};\n\nexport const defineContentScriptAppend = (options: ContentScriptAppendDefinition): ContentScriptDefinition => {\n const {append, ...definition} = options;\n\n return {\n ...definition,\n mount: contentScriptMountAppendResolver(append),\n };\n};\n","import {createHash} from \"crypto\";\n\nexport const generateCryptoKey = (password: string): string => {\n return createHash(\"sha256\").update(password).digest(\"base64\");\n};\n\nexport const encryptData = <T = any>(data: T, key: string): string => {\n const jsonString = JSON.stringify(data);\n const dataBytes = Array.from(jsonString, c => c.charCodeAt(0));\n const keyBytes = Array.from(key, c => c.charCodeAt(0));\n\n const encryptedBytes = dataBytes.map((byte, i) => byte ^ keyBytes[i % keyBytes.length]);\n const encryptedString = String.fromCharCode(...encryptedBytes);\n\n return btoa(encryptedString);\n};\n\nexport const decryptData = <T = any>(encrypted: string, key?: string): T => {\n const encryptedString = atob(encrypted);\n const encryptedBytes = Array.from(encryptedString, c => c.charCodeAt(0));\n let keyBytes: any[];\n try {\n //@ts-expect-error: __ADNBN_ENV_CRYPTO_KEY__ is a virtual variable generated by the bundler `src/cli/plugins/dotenv/index.ts`\n keyBytes = Array.from(key || __ADNBN_ENV_CRYPTO_KEY__, c => c.charCodeAt(0));\n } catch (err) {\n throw new Error('You need to specify the \"key\" argument for the decryptData function.');\n }\n\n const decryptedBytes = encryptedBytes.map((byte, i) => byte ^ keyBytes[i % keyBytes.length]);\n const decryptedString = String.fromCharCode(...decryptedBytes);\n\n return JSON.parse(decryptedString);\n};\n","import {Browser} from \"@typing/browser\";\nimport {ManifestVersion} from \"@typing/manifest\";\nimport {decryptData} from \"@cli/plugins/dotenv/utils\";\n\nexport const getEnv: {\n <T extends string>(key: string): T | undefined;\n <T extends string, D>(key: string, defaults: D): T | D;\n} = (() => {\n let envCache: object;\n\n return (key: string, defaults?: string) => {\n let env: object;\n\n if (typeof process.env === \"object\") {\n env = process.env;\n } else {\n envCache ??= decryptData(process.env);\n env = envCache;\n }\n\n return (env[key] ?? defaults) as any;\n };\n})();\n\nexport const getApp = (): string => {\n const app = getEnv(\"APP\");\n\n if (app === undefined) {\n throw new Error(\"App is not defined\");\n }\n\n return app;\n};\n\nexport const getBrowser = (): Browser => {\n const browser = getEnv<Browser>(\"BROWSER\");\n\n if (browser === undefined) {\n throw new Error(\"Browser is not defined\");\n }\n\n return browser;\n};\n\nexport const isBrowser = (browser: Browser): browser is Browser => {\n return getBrowser() === browser;\n};\n\nexport const getManifestVersion = (): ManifestVersion => {\n const manifestVersion = getEnv(\"MANIFEST_VERSION\", \"3\");\n\n return parseInt(manifestVersion) as ManifestVersion;\n};\n","export const DefaultIconGroupName = \"default\";\n","import {setActionIcon} from \"@adnbn/browser\";\n\nimport {DefaultIconGroupName} from \"@typing/icon\";\n\ntype Tab = chrome.tabs.Tab;\n\nexport const getIcons = (): Record<string, Record<number, string>> => {\n try {\n // @ts-expect-error: __ADNBN_ICONS__ is a virtual variable generated by the bundler `src/cli/plugins/icon/index.ts`\n return __ADNBN_ICONS__;\n } catch (e) {\n console.error(\"Failed getting icons: \", e);\n }\n\n return {};\n};\n\nexport const changeActionIcon = async (icon?: string, tab?: number | Tab): Promise<void> => {\n if (!icon) {\n icon = DefaultIconGroupName;\n }\n\n const icons = getIcons()[icon];\n\n if (!icons) {\n throw new Error(`Icon group name \"${icon}\" not found for action icon.`);\n }\n\n if (tab && typeof tab === \"object\") {\n tab = tab.id;\n }\n\n await setActionIcon({path: icons, tabId: tab});\n};\n","import {ContentScriptConfig} from \"@typing/content\";\nimport {BackgroundConfig} from \"@typing/background\";\nimport {CommandConfig} from \"@typing/command\";\nimport {Language} from \"@typing/locale\";\n\ntype ManifestCommon = chrome.runtime.Manifest;\ntype ManifestBase = chrome.runtime.ManifestBase;\ntype ManifestPermission = chrome.runtime.ManifestPermissions;\n\nexport const ManifestMatchSchemes: ReadonlySet<string> = new Set<string>([\"http\", \"https\", \"file\", \"ftp\", \"ws\", \"wss\"]);\n\nexport const ManifestSpecialSchemes: ReadonlySet<string> = new Set<string>([\n \"chrome-extension\",\n \"moz-extension\",\n \"data\",\n \"blob\",\n \"filesystem\",\n \"about\",\n \"chrome\",\n \"resource\",\n]);\n\ntype ManifestFixed<T extends ManifestBase> = Omit<T, \"manifest_version\"> & {\n manifest_version: ManifestVersion;\n};\n\ninterface ManifestUnstable {\n permissions?: (ManifestPermission | (string & Record<never, never>))[];\n web_accessible_resources?: string[] | chrome.runtime.ManifestV3[\"web_accessible_resources\"];\n}\n\nexport type ManifestVersion = 2 | 3;\n\nexport enum ManifestIncognito {\n Spanning = \"spanning\",\n Split = \"split\",\n NotAllowed = \"not_allowed\",\n}\n\nexport type ManifestIncognitoValue = ManifestIncognito | `${ManifestIncognito}`;\n\nexport type CoreManifest = ManifestFixed<ManifestBase>;\n\nexport type ChromeManifest = ManifestFixed<ManifestCommon>;\n\nexport type FirefoxManifest = ChromeManifest & {\n action?: chrome.runtime.ManifestV3[\"action\"] & {\n browser_style?: boolean;\n };\n browser_action?: chrome.runtime.ManifestV2[\"browser_action\"] & {\n browser_style?: boolean;\n };\n page_action?: chrome.runtime.ManifestV2[\"page_action\"] & {\n browser_style?: boolean;\n };\n browser_specific_settings?: {\n gecko?: {\n id?: string;\n strict_min_version?: string;\n strict_max_version?: string;\n update_url?: string;\n };\n gecko_android?: {\n strict_min_version?: string;\n strict_max_version?: string;\n };\n };\n} & ManifestUnstable;\n\nexport type SafariManifest = ChromeManifest & {\n browser_specific_settings?: {\n safari?: {\n strict_min_version?: string;\n strict_max_version?: string;\n };\n };\n} & ManifestUnstable;\n\nexport type Manifest = ChromeManifest | FirefoxManifest | SafariManifest;\n\nexport interface ManifestBuilder<T extends CoreManifest = Manifest> {\n setName(name: string): this;\n\n setShortName(shortName?: string): this;\n\n setDescription(description?: string): this;\n\n setEmail(email?: string): this;\n\n setAuthor(author?: string): this;\n\n setHomepage(homepage?: string): this;\n\n setVersion(version?: string): this;\n\n setIncognito(incognito?: ManifestIncognitoValue): this;\n\n setMinimumVersion(minimumVersion?: string): this;\n\n setLocale(lang?: Language): this;\n\n // Icons\n setIcons(icons?: ManifestIcons): this;\n\n setIcon(icon?: string): this; // name of an icon set for manifest.icons\n\n // Entry\n setBackground(background?: ManifestBackground): this;\n\n setCommands(commands?: ManifestCommands): this;\n\n setContentScripts(contentScripts?: ManifestContentScripts): this;\n\n setPopup(popup?: ManifestPopup): this;\n\n setSidebar(sidebar?: ManifestSidebar): this;\n\n // System\n setDependencies(dependencies: ManifestDependencies): this;\n\n // Permissions\n addPermission(permission: ManifestPermission): this;\n\n setPermissions(permissions: ManifestPermissions): this;\n\n appendPermissions(permissions: ManifestPermissions): this;\n\n addHostPermission(permission: string): this;\n\n setHostPermissions(permissions: ManifestHostPermissions): this;\n\n // Host Permissions\n appendHostPermissions(permissions: ManifestHostPermissions): this;\n\n // Web Accessible Resource\n setManifestAccessibleResource(accessibleResources: ManifestAccessibleResources): this;\n\n appendAccessibleResources(accessibleResources: ManifestAccessibleResources): this;\n\n addAccessibleResource(accessibleResource: ManifestAccessibleResource): this;\n\n // Getter\n get(): T;\n}\n\ntype Entry = string;\n\nexport interface ManifestEntry {\n entry: Entry;\n}\n\nexport type ManifestBackground = ManifestEntry & BackgroundConfig;\n\nexport type ManifestContentScript = ManifestEntry & ContentScriptConfig;\nexport type ManifestContentScripts = Set<ManifestContentScript>;\n\nexport type ManifestCommand = CommandConfig;\nexport type ManifestCommands = Set<ManifestCommand>;\n\nexport interface ManifestPopup {\n /**\n * Represents the group name of an icon that can be used in UI elements.\n * This property is optional and, if defined, should typically refer to a string\n * that matches the name of an icon resource available in the application or icon library.\n */\n icon?: string;\n /**\n * Represents an optional title or name or locale key that can be assigned to an entity.\n */\n title?: string;\n /**\n * Represents an optional HTML path.\n */\n path?: string;\n}\n\nexport interface ManifestSidebar {\n /**\n * Represents the group name of an icon that can be used in UI elements.\n * This property is optional and, if defined, should typically refer to a string\n * that matches the name of an icon resource available in the application or icon library.\n */\n icon?: string;\n /**\n * Represents an optional title or name or locale key that can be assigned to an entity.\n */\n title?: string;\n /**\n * Represents an optional HTML path.\n */\n path?: string;\n}\n\nexport interface ManifestAccessibleResource {\n resources: string[];\n matches: string[];\n}\n\nexport type ManifestAccessibleResources = Set<ManifestAccessibleResource>;\n\nexport interface ManifestDependency {\n js: Set<string>;\n css: Set<string>;\n assets: Set<string>;\n}\n\nexport type ManifestIcon = Map<number, string>;\n\nexport type ManifestIcons = Map<string, ManifestIcon>;\n\nexport type ManifestDependencies = Map<Entry, ManifestDependency>;\n\nexport type ManifestPermissions = Set<ManifestPermission>;\n\nexport type ManifestHostPermissions = Set<string>;\n","export enum Language {\n Arabic = \"ar\",\n Amharic = \"am\",\n Bulgarian = \"bg\",\n Bengali = \"bn\",\n Catalan = \"ca\",\n Czech = \"cs\",\n Danish = \"da\",\n German = \"de\",\n Greek = \"el\",\n English = \"en\",\n EnglishAustralia = \"en_AU\",\n EnglishGreatBritain = \"en_GB\",\n EnglishUSA = \"en_US\",\n Spanish = \"es\",\n SpanishLatinAmericaAndCaribbean = \"es_419\",\n Estonian = \"et\",\n Persian = \"fa\",\n Finnish = \"fi\",\n Filipino = \"fil\",\n French = \"fr\",\n Gujarati = \"gu\",\n Hebrew = \"he\",\n Hindi = \"hi\",\n Croatian = \"hr\",\n Hungarian = \"hu\",\n Indonesian = \"id\",\n Italian = \"it\",\n Japanese = \"ja\",\n Kannada = \"kn\",\n Korean = \"ko\",\n Lithuanian = \"lt\",\n Latvian = \"lv\",\n Malayalam = \"ml\",\n Marathi = \"mr\",\n Malay = \"ms\",\n Dutch = \"nl\",\n Norwegian = \"no\",\n Polish = \"pl\",\n PortugueseBrazil = \"pt_BR\",\n PortuguesePortugal = \"pt_PT\",\n Romanian = \"ro\",\n Russian = \"ru\",\n Slovak = \"sk\",\n Slovenian = \"sl\",\n Serbian = \"sr\",\n Swedish = \"sv\",\n Swahili = \"sw\",\n Tamil = \"ta\",\n Telugu = \"te\",\n Thai = \"th\",\n Turkish = \"tr\",\n Ukrainian = \"uk\",\n Vietnamese = \"vi\",\n ChineseChina = \"zh_CN\",\n ChineseTaiwan = \"zh_TW\",\n}\n\nexport enum LocaleDir {\n RightToLeft = \"rtl\",\n LeftToRight = \"ltr\",\n}\n\nexport const RtlLanguages: ReadonlySet<Language> = new Set([Language.Arabic, Language.Persian, Language.Hebrew]);\n\nexport const LocaleNestedKeysSeparator = \".\";\n\nexport const LocaleKeysSeparator = \"_\";\n\nexport const LocaleValuesSeparator = \"|\";\n\nexport const LocaleCustomKeyForLanguage = \"locale\";\n\nexport const LocaleKeyMarker = \"@\";\n\nexport const LanguageCodes: ReadonlySet<string> = new Set(Object.values(Language));\n\nexport const LocaleFileExtensions: ReadonlySet<string> = new Set([\"yaml\", \"yml\", \"json\"]);\n\nexport type LocaleValue = string | number | string[] | number[];\n\nexport type LocaleData = {\n [key: string]: LocaleValue | LocaleData;\n};\n\nexport type LocaleItems = Map<string, string>;\n\nexport type LocaleKeys = ReadonlySet<string>;\n\nexport type LocaleMessages = {\n [key: string]: {\n message: string;\n };\n};\n\nexport interface LocaleBuilder {\n lang(): Language;\n\n merge(data: LocaleData): this;\n\n build(): LocaleMessages;\n\n get(): LocaleItems;\n\n keys(): LocaleKeys;\n\n structure(): LocaleStructure;\n\n isValid(): boolean;\n\n validate(): this;\n}\n\nexport interface LocaleValidator {\n isValid(locale: LocaleBuilder): boolean;\n\n validate(locale: LocaleBuilder): this;\n}\n\nexport interface LocaleFutures {\n plural: boolean;\n substitutions: readonly string[];\n}\n\nexport interface LocaleStructure {\n [key: string]: LocaleFutures;\n}\n\nexport type LocaleNonPluralKeys<T extends LocaleStructure> = {\n [K in keyof T]: T[K] extends {plural: false} ? K : never;\n}[keyof T] &\n string;\n\nexport type LocalePluralKeys<T extends LocaleStructure> = {\n [K in keyof T]: T[K] extends {plural: true} ? K : never;\n}[keyof T] &\n string;\n\nexport type LocaleSubstitutionsFor<T extends LocaleStructure, K extends keyof T> = T[K] extends {\n substitutions: readonly (infer U)[];\n}\n ? Partial<Record<U & string, string | number>>\n : never;\n\nexport interface LocaleProvider<S extends LocaleStructure> {\n lang(): Language;\n\n languages(): Set<Language>;\n\n keys(): ReadonlySet<keyof S>;\n\n // non-plural keys\n trans<K extends LocaleNonPluralKeys<S>>(key: K, substitutions?: LocaleSubstitutionsFor<S, K>): string;\n\n // plural keys\n choice<K extends LocalePluralKeys<S>>(key: K, count: number, substitutions?: LocaleSubstitutionsFor<S, K>): string;\n}\n\nexport interface LocaleDynamicProvider<S extends LocaleStructure> extends LocaleProvider<S> {\n change(lang: Language): Promise<Language>;\n}\n","import {\n Language,\n LocaleNonPluralKeys,\n LocalePluralKeys,\n LocaleProvider,\n LocaleStructure,\n LocaleSubstitutionsFor,\n LocaleValuesSeparator,\n} from \"@typing/locale\";\n\nexport default abstract class<S extends LocaleStructure> implements LocaleProvider<S> {\n public abstract lang(): Language;\n\n public abstract keys(): Set<keyof S>;\n\n public abstract languages(): Set<Language>;\n\n protected abstract value(key: keyof S & string): string | undefined;\n\n public trans<K extends LocaleNonPluralKeys<S>>(key: K, substitutions?: LocaleSubstitutionsFor<S, K>): string {\n return this.get(key, substitutions);\n }\n\n public choice<K extends LocalePluralKeys<S>>(\n key: K,\n count: number,\n substitutions?: LocaleSubstitutionsFor<S, K>\n ): string {\n const parts = this.get(key, substitutions).split(LocaleValuesSeparator);\n const idx = this.getPluralIndex(count);\n return parts[idx] ?? parts[0] ?? (key as string);\n }\n\n public get<K extends keyof S & string>(key: K, substitutions?: LocaleSubstitutionsFor<S, K>): string {\n const template = this.value(key);\n\n if (template === undefined) {\n console.warn(`Locale key \"${key}\" not found in \"${this.lang()}\" language.`);\n return key as string;\n }\n\n if (substitutions) {\n return template.replace(/{{(.*?)}}/g, (_, placeholder: string) => {\n if (placeholder in substitutions) {\n return substitutions[placeholder]!.toString();\n }\n console.warn(\n `Locale substitution \"${placeholder}\" not found for key \"${key}\" in \"${this.lang()}\" language.`\n );\n return placeholder;\n });\n }\n\n return template;\n }\n\n private getPluralIndex(count: number): number {\n switch (this.lang()) {\n case Language.Indonesian:\n case Language.Japanese:\n case Language.Kannada:\n case Language.Korean:\n case Language.Malay:\n case Language.Thai:\n case Language.Turkish:\n case Language.Vietnamese:\n return 0;\n\n case Language.Bengali:\n case Language.Bulgarian:\n case Language.Catalan:\n case Language.Danish:\n case Language.German:\n case Language.Greek:\n case Language.English:\n case Language.EnglishAustralia:\n case Language.EnglishGreatBritain:\n case Language.EnglishUSA:\n case Language.Spanish:\n case Language.SpanishLatinAmericaAndCaribbean:\n case Language.Estonian:\n case Language.Persian:\n case Language.Finnish:\n case Language.Gujarati:\n case Language.Hebrew:\n case Language.Hungarian:\n case Language.Italian:\n case Language.Malayalam:\n case Language.Marathi:\n case Language.Dutch:\n case Language.Norwegian:\n case Language.Swedish:\n case Language.Swahili:\n case Language.Tamil:\n case Language.Telugu:\n case Language.ChineseChina:\n case Language.ChineseTaiwan:\n case Language.PortugueseBrazil:\n case Language.PortuguesePortugal:\n return count == 1 ? 0 : 1;\n\n case Language.Amharic:\n case Language.Filipino:\n case Language.French:\n case Language.Hindi:\n return count == 0 || count == 1 ? 0 : 1;\n\n case Language.Croatian:\n case Language.Russian:\n case Language.Serbian:\n case Language.Ukrainian:\n return count % 10 == 1 && count % 100 != 11\n ? 0\n : count % 10 >= 2 && count % 10 <= 4 && (count % 100 < 10 || count % 100 >= 20)\n ? 1\n : 2;\n\n case Language.Czech:\n case Language.Slovak:\n return count == 1 ? 0 : count >= 2 && count <= 4 ? 1 : 2;\n\n case Language.Lithuanian:\n return count % 10 == 1 && count % 100 != 11\n ? 0\n : count % 10 >= 2 && (count % 100 < 10 || count % 100 >= 20)\n ? 1\n : 2;\n\n case Language.Slovenian:\n return count % 100 == 1 ? 0 : count % 100 == 2 ? 1 : count % 100 == 3 || count % 100 == 4 ? 2 : 3;\n\n case Language.Latvian:\n return count == 0 ? 0 : count % 10 == 1 && count % 100 != 11 ? 1 : 2;\n\n case Language.Polish:\n return count == 1\n ? 0\n : count % 10 >= 2 && count % 10 <= 4 && (count % 100 < 12 || count % 100 > 14)\n ? 1\n : 2;\n\n case Language.Romanian:\n return count == 1 ? 0 : count == 0 || (count % 100 > 0 && count % 100 < 20) ? 1 : 2;\n\n case Language.Arabic:\n return count == 0\n ? 0\n : count == 1\n ? 1\n : count == 2\n ? 2\n : count % 100 >= 3 && count % 100 <= 10\n ? 3\n : count % 100 >= 11 && count % 100 <= 99\n ? 4\n : 5;\n\n default:\n return 0;\n }\n }\n}\n","import {\n Language,\n LocaleDir,\n LocaleKeyMarker,\n LocaleKeysSeparator,\n LocaleMessages,\n LocaleNestedKeysSeparator,\n RtlLanguages,\n} from \"@typing/locale\";\n\nexport const getLocaleFilename = (lang: Language): string => {\n return `_locales/${lang}/messages.json`;\n};\n\nexport const convertLocaleKey = (key: string): string => {\n return key.replaceAll(LocaleNestedKeysSeparator, LocaleKeysSeparator);\n};\n\nexport const convertLocaleMessageKey = (key: string): string => {\n return `__MSG_${convertLocaleKey(key)}__`;\n};\n\nexport const extractLocaleKey = (key?: string): string | undefined => {\n if (isLocaleKey(key)) {\n return key.substring(1);\n }\n};\n\nexport const isLocaleKey = (key?: string): key is string => {\n return key?.startsWith(LocaleKeyMarker) ?? false;\n};\n\nexport const modifyLocaleMessageKey = (key?: string): string | undefined => {\n if (typeof key !== \"string\") {\n return undefined;\n }\n\n const localeKey = extractLocaleKey(key);\n\n if (localeKey) {\n return convertLocaleMessageKey(localeKey);\n }\n\n return key;\n};\n\nexport const isLocaleRtl = (lang: Language): boolean => {\n return RtlLanguages.has(lang);\n};\n\nexport const getLocaleDir = (lang: Language): LocaleDir => {\n return isLocaleRtl(lang) ? LocaleDir.RightToLeft : LocaleDir.LeftToRight;\n};\n\nexport const flattenLocaleMessages = (messages: LocaleMessages): Record<string, string> => {\n return Object.fromEntries(Object.entries(messages).map(([key, value]) => [key, value.message]));\n};\n","import {getI18nMessage, getI18nUILanguage} from \"@adnbn/browser\";\n\nimport AbstractLocale from \"./AbstractLocale\";\n\nimport {convertLocaleKey} from \"@locale/utils\";\n\nimport {isBrowser} from \"@main/env\";\n\nimport {Language, LanguageCodes, LocaleCustomKeyForLanguage, LocaleProvider, LocaleStructure} from \"@typing/locale\";\nimport {Browser} from \"@typing/browser\";\n\nexport interface LocaleNativeStructure extends LocaleStructure {}\n\nexport default class NativeLocale extends AbstractLocale<LocaleNativeStructure> {\n private static instance?: LocaleProvider<LocaleNativeStructure>;\n\n public static getInstance<S extends LocaleStructure = LocaleNativeStructure>(): LocaleProvider<S> {\n return (NativeLocale.instance ??= new NativeLocale());\n }\n\n public lang(): Language {\n let lang: Language | undefined;\n\n /**\n * The Opera browser does not support RTL languages,\n * and for Opera you need to directly indicate what kind of language it is.\n * interface language is always different\n */\n if (isBrowser(Browser.Opera)) {\n lang = getI18nMessage(LocaleCustomKeyForLanguage) as Language;\n\n if (LanguageCodes.has(lang)) {\n return lang;\n }\n }\n\n lang = getI18nUILanguage() as Language;\n\n if (!lang) {\n throw new Error(\"Locale Native: Unable to get UI language\");\n }\n\n return lang;\n }\n\n public keys(): Set<keyof LocaleNativeStructure> {\n try {\n // @ts-expect-error: __ADNBN_LOCALE_KEYS__ is a virtual variable generated by the bundler `src/cli/plugins/locale/index.ts`\n return new Set<string>(__ADNBN_LOCALE_KEYS__);\n } catch (e) {\n console.error(\"Locale Native: Unable to get keys\", e);\n\n return new Set<string>();\n }\n }\n\n public languages(): Set<Language> {\n try {\n // @ts-expect-error: __ADNBN_DEFINED_LOCALES__ is a virtual variable generated by the bundler `src/cli/plugins/locale/index.ts`\n return new Set<Language>(__ADNBN_DEFINED_LOCALES__);\n } catch (e) {\n console.error(\"Locale Native: Unable to get defined locales\", e);\n\n return new Set<Language>();\n }\n }\n\n protected value(key: Extract<keyof LocaleNativeStructure, string>): string | undefined {\n const value = getI18nMessage(convertLocaleKey(key));\n\n if (!value || value.length === 0) {\n return undefined;\n }\n\n return value;\n }\n}\n","import {LocaleNativeStructure, NativeLocale} from \"@locale/providers\";\nimport {convertLocaleMessageKey, extractLocaleKey} from \"@locale/utils\";\nimport {LocaleNonPluralKeys, LocalePluralKeys, LocaleSubstitutionsFor} from \"@typing/locale\";\n\n/**\n * Translates a given locale key into the corresponding localized string.\n *\n * @template K - A type representing the non-plural keys of the locale structure.\n * @param {K} key - The locale key to be translated.\n * @param {LocaleSubstitutionsFor<LocaleNativeStructure, K>} [substitutions] - Optional substitutions to be applied\n * within the localized string. These are typically placeholders replaced with dynamic values.\n * @returns {string} - The translated string for the given key, with substitutions applied if provided.\n */\nexport const _ = <K extends LocaleNonPluralKeys<LocaleNativeStructure>>(\n key: K,\n substitutions?: LocaleSubstitutionsFor<LocaleNativeStructure, K>\n): string => {\n return NativeLocale.getInstance().trans(key, substitutions);\n};\n\n/**\n * Translates a given locale key into the corresponding localized string\n * based on a specific count for pluralization.\n *\n * @template K - A type representing the non-plural keys of the locale structure.\n * @param {K} key - The locale key to be translated.\n * @param {number} count - The count used to determine the pluralization form.\n * @param {LocaleSubstitutionsFor<LocaleNativeStructure, K>} [substitutions] - Optional substitutions to be applied\n * within the localized string. These are typically placeholders replaced with dynamic values.\n * @returns {string} - The translated string for the given key, adjusted for pluralization and with substitutions applied if provided.\n */\nexport const _c = <K extends LocalePluralKeys<LocaleNativeStructure>>(\n key: K,\n count: number,\n substitutions?: LocaleSubstitutionsFor<LocaleNativeStructure, K>\n): string => {\n return NativeLocale.getInstance().choice(key, count, substitutions);\n};\n\n/**\n * Converts a locale key into a standardized format and logs a warning if the key is not found\n * in the current language's locale keys.\n *\n * @param {Extract<keyof LocaleNativeStructure, string>} key - The locale key to be converted.\n * This key must be a string and exist within the `LocaleNativeStructure`.\n * @returns {string} - The converted locale message key.\n */\nexport const __ = (key: keyof LocaleNativeStructure & string): string => {\n const locale = NativeLocale.getInstance();\n\n if (!locale.keys().has(key)) {\n console.warn(`Locale key \"${key}\" not found in \"${locale.lang()}\" language.`);\n }\n\n return convertLocaleMessageKey(key);\n};\n\n/**\n * Attempts to extract a locale key from the provided string and translates it\n * into the corresponding localized string. If no locale key can be extracted,\n * the original string is returned.\n *\n * @param {string} input - The input string from which a locale key is to be extracted.\n * @returns {string} - The translated string if a locale key is successfully extracted,\n * or the original string if no locale key is found.\n */\nexport const __t = (input: string): string => {\n const localeKey = extractLocaleKey(input);\n\n if (localeKey) {\n return _(localeKey as LocaleNonPluralKeys<LocaleNativeStructure>);\n }\n\n return input;\n};\n","import type {TransportDictionary, TransportManager, TransportName} from \"@typing/transport\";\n\nexport default abstract class<N extends TransportName, T = TransportDictionary[N]> {\n protected constructor(protected readonly name: N) {}\n\n protected abstract manager(): TransportManager;\n\n public get(): T {\n return this.manager().get(this.name);\n }\n\n public destroy(): void {\n this.manager().remove(this.name);\n }\n}\n","import BaseTransport from \"./BaseTransport\";\n\nimport type {DeepAsyncProxy} from \"@typing/helpers\";\nimport type {TransportDictionary, TransportName} from \"@typing/transport\";\n\nexport default abstract class<\n N extends TransportName,\n T = DeepAsyncProxy<TransportDictionary[N]>,\n> extends BaseTransport<N, T> {\n protected abstract apply(args: any[], path?: string): any;\n\n protected createProxy(path?: string): T {\n const wrapped = () => {};\n\n const proxy = new Proxy(wrapped, {\n apply: async (_target, _thisArg, args) => this.apply(args, path),\n\n get: (_target, propertyName, receiver) => {\n if (propertyName === \"__proxy\" || typeof propertyName !== \"string\") {\n return Reflect.get(wrapped, propertyName, receiver);\n }\n\n const newPath = path == null ? propertyName : `${path}.${String(propertyName)}`;\n\n return this.createProxy(newPath);\n },\n });\n\n // @ts-expect-error — Adding a hidden property\n proxy.__proxy = true;\n\n return proxy as unknown as T;\n }\n\n public get(): T {\n return this.createProxy();\n }\n}\n","import type {TransportDictionary, TransportManager as TransportManagerContract, TransportName} from \"@typing/transport\";\n\nexport default abstract class TransportManager implements TransportManagerContract {\n private items = new Map<TransportName, TransportDictionary[TransportName]>();\n\n public add<K extends TransportName>(name: K, instance: TransportDictionary[K]): this {\n this.items.set(name, instance);\n\n return this;\n }\n\n public get<K extends TransportName>(name: K): TransportDictionary[K] | undefined {\n return this.items.get(name) as TransportDictionary[K] | undefined;\n }\n\n public has(name: TransportName): boolean {\n return this.items.has(name);\n }\n\n public remove<K extends TransportName>(name: K): TransportDictionary[K] | undefined {\n const service = this.get(name);\n\n this.items.delete(name);\n\n return service;\n }\n\n public clear(): this {\n this.items.clear();\n\n return this;\n }\n}\n","import {TransportConfig, TransportDefinition, TransportType} from \"@typing/transport\";\nimport {ViewOptions} from \"@typing/view\";\nimport {Awaiter} from \"@typing/helpers\";\n\nexport const OffscreenGlobalKey = \"adnbnOffscreen\";\nexport const OffscreenGlobalAccess = \"adnbnOffscreenAccess\";\n\nexport enum OffscreenReason {\n /** A reason used for testing purposes only. */\n Testing = \"TESTING\",\n /** The offscreen document is responsible for playing audio. */\n AudioPlayback = \"AUDIO_PLAYBACK\",\n /** The offscreen document needs to embed and script an iframe in order to modify the iframe's content. */\n IframeScripting = \"IFRAME_SCRIPTING\",\n /** The offscreen document needs to embed an iframe and scrape its DOM to extract information. */\n DOMScraping = \"DOM_SCRAPING\",\n /** The offscreen document needs to interact with Blob objects (including URL.createObjectURL()). */\n Blobs = \"BLOBS\",\n /** The offscreen document needs to use the DOMParser API. */\n DOMParser = \"DOM_PARSER\",\n /** The offscreen document needs to interact with media streams from user media (e.g. getUserMedia()). */\n UserMedia = \"USER_MEDIA\",\n /** The offscreen document needs to interact with media streams from display media (e.g. getDisplayMedia()). */\n DisplayMedia = \"DISPLAY_MEDIA\",\n /** The offscreen document needs to use WebRTC APIs. */\n WebRTC = \"WEB_RTC\",\n /** The offscreen document needs to interact with the clipboard APIs(e.g. Navigator.clipboard). */\n Clipboard = \"CLIPBOARD\",\n /** Specifies that the offscreen document needs access to localStorage. */\n LocalStorage = \"LOCAL_STORAGE\",\n /** Specifies that the offscreen document needs to spawn workers. */\n Workers = \"WORKERS\",\n /** Specifies that the offscreen document needs to use navigator.getBattery. */\n BatteryStatus = \"BATTERY_STATUS\",\n /** Specifies that the offscreen document needs to use window.matchMedia. */\n MatchMedia = \"MATCH_MEDIA\",\n /** Specifies that the offscreen document needs to use navigator.geolocation. */\n Geolocation = \"GEOLOCATION\",\n}\n\nexport interface OffscreenConfig extends TransportConfig {\n reasons?: `${OffscreenReason}` | `${OffscreenReason}`[] | OffscreenReason | OffscreenReason[];\n justification?: string;\n}\n\nexport type OffscreenOptions = OffscreenConfig & ViewOptions;\n\nexport type OffscreenEntrypointOptions = Partial<OffscreenOptions>;\n\nexport type OffscreenMainHandler<T extends TransportType> = (\n offscreen: T,\n options: OffscreenEntrypointOptions\n) => Awaiter<void>;\n\nexport interface OffscreenDefinition<T extends TransportType>\n extends TransportDefinition<OffscreenOptions, T>,\n OffscreenEntrypointOptions {\n main?: OffscreenMainHandler<T>;\n}\n\nexport type OffscreenUnresolvedDefinition<T extends TransportType> = Partial<OffscreenDefinition<T>>;\n","import TransportManager from \"@transport/TransportManager\";\n\nimport {OffscreenGlobalKey} from \"@typing/offscreen\";\n\nimport type {TransportManager as TransportManagerContract} from \"@typing/transport\";\n\nexport default class OffscreenManager extends TransportManager {\n public static getInstance(): TransportManagerContract {\n return (globalThis[OffscreenGlobalKey] ??= new OffscreenManager());\n }\n}\n","import {nanoid} from \"nanoid\";\nimport {\n MessageBody,\n MessageData,\n MessageDictionary,\n MessageGeneralHandler,\n MessageMapHandler,\n MessageProvider,\n MessageResponse,\n MessageTargetHandler,\n MessageType,\n} from \"@typing/message\";\n\nexport default abstract class AbstractMessage<T extends MessageDictionary, TOptions>\n implements MessageProvider<T, TOptions>\n{\n public abstract send<K extends MessageType<T>>(\n type: K,\n data: MessageData<T, K>,\n options?: TOptions\n ): Promise<MessageResponse<T, K>>;\n\n public abstract watch<K extends MessageType<T>>(type: K, handler: MessageTargetHandler<T, K>): () => void;\n\n public abstract watch(map: MessageMapHandler<T>): () => void;\n\n public abstract watch<K extends MessageType<T>>(general: MessageGeneralHandler<T, K>): () => void;\n\n protected buildMessage<K extends MessageType<T>>(type: K, data: MessageData<T, K>): MessageBody<T, K> {\n return {\n id: nanoid(),\n type,\n data,\n timestamp: Date.now(),\n };\n }\n}\n","export const MessageGlobalKey = \"adnbnMessage\";\n\nexport const MessageTypeSeparator = \":\";\n\nexport type MessageSender = chrome.runtime.MessageSender;\n\nexport interface MessageDictionary {\n [key: string]: (data: any) => any;\n}\n\nexport type MessageType<T extends MessageDictionary> = Extract<keyof T, string>;\nexport type MessageData<T extends MessageDictionary, K extends MessageType<T>> = Parameters<T[K]>[0];\nexport type MessageResponse<T extends MessageDictionary, K extends MessageType<T>> = ReturnType<T[K]>;\n\nexport type MessageTargetHandler<T extends MessageDictionary, K extends MessageType<T>> = (\n data: MessageData<T, K>,\n sender: MessageSender\n) => MessageResponse<T, K>;\nexport type MessageMapHandler<T extends MessageDictionary> = {[K in MessageType<T>]?: MessageTargetHandler<T, K>};\nexport type MessageGeneralHandler<T extends MessageDictionary, K extends MessageType<T>> = (\n type: K,\n data: MessageData<T, K>,\n sender: MessageSender\n) => any;\n\nexport interface MessageBody<T extends MessageDictionary, K extends MessageType<T>> {\n id: string;\n type: K;\n data: MessageData<T, K>;\n timestamp: number;\n}\n\nexport interface MessageProvider<T extends MessageDictionary, TOptions = void> {\n send<K extends MessageType<T>>(\n type: K,\n data: MessageData<T, K>,\n options?: TOptions\n ): Promise<MessageResponse<T, K>>;\n\n watch<K extends MessageType<T>>(type: K, handler: MessageTargetHandler<T, K>): () => void;\n\n watch(map: MessageMapHandler<T>): () => void;\n\n watch<K extends MessageType<T>>(general: MessageGeneralHandler<T, K>): () => void;\n}\n\nexport interface MessageHandler<T extends MessageDictionary> {\n run(\n type: MessageType<T>,\n data: MessageData<T, MessageType<T>>,\n sender: MessageSender\n ): MessageResponse<T, MessageType<T>> | undefined;\n}\n","import {onMessage} from \"@adnbn/browser\";\n\nimport {\n MessageBody,\n MessageDictionary,\n MessageGlobalKey,\n MessageHandler,\n MessageSender,\n MessageType,\n} from \"@typing/message\";\n\nexport default class MessageManager<T extends MessageDictionary> {\n private handlers: Set<MessageHandler<T>> = new Set();\n private unsubscribe: (() => void) | null = null;\n\n public static getInstance<T extends MessageDictionary>(): MessageManager<T> {\n return (globalThis[MessageGlobalKey] ??= new MessageManager<T>());\n }\n\n constructor() {\n this.listener = this.listener.bind(this);\n }\n\n public add(handler: MessageHandler<T>) {\n this.handlers.add(handler);\n this.updateListener();\n }\n\n public remove(handler: MessageHandler<T>) {\n this.handlers.delete(handler);\n this.updateListener();\n }\n\n public clear() {\n this.handlers = new Set();\n this.updateListener();\n }\n\n private updateListener() {\n if (this.handlers.size > 0 && !this.unsubscribe) {\n this.unsubscribe = onMessage(this.listener);\n } else if (this.handlers.size === 0 && this.unsubscribe) {\n this.unsubscribe();\n this.unsubscribe = null;\n }\n }\n\n private listener<K extends MessageType<T>>(\n message: MessageBody<T, K>,\n sender: MessageSender,\n sendResponse: (response?: any) => void\n ): boolean | void {\n if (!message || typeof message !== \"object\" || !message.type) return;\n\n const results: Promise<any>[] = [];\n\n for (const handler of this.handlers) {\n try {\n const result = handler.run(message.type, message.data, sender);\n if (result !== undefined) {\n results.push(Promise.resolve(result));\n }\n } catch (err) {\n console.error(\"Message handler error:\", err);\n }\n }\n\n if (results.length > 1) {\n throw new Error(\n `Message type \"${message.type}\" has multiple handlers returning a response. Only one response is allowed.`\n );\n }\n\n if (results.length === 1) {\n results[0].then(sendResponse);\n return true;\n }\n }\n}\n","import {\n MessageData,\n MessageDictionary,\n MessageHandler,\n MessageResponse,\n MessageSender,\n MessageType,\n} from \"@typing/message\";\n\nexport default abstract class AbstractHandler<T extends MessageDictionary> implements MessageHandler<T> {\n public abstract run(\n type: MessageType<T>,\n data: MessageData<T, MessageType<T>>,\n sender: MessageSender\n ): MessageResponse<T, MessageType<T>> | undefined;\n}\n","import AbstractHandler from \"./AbstractHandler\";\nimport {\n MessageData,\n MessageDictionary,\n MessageResponse,\n MessageSender,\n MessageTargetHandler,\n MessageType,\n} from \"@typing/message\";\n\nexport default class SingleHandler<T extends MessageDictionary> extends AbstractHandler<T> {\n constructor(\n private messageType: MessageType<T>,\n private handler: MessageTargetHandler<T, MessageType<T>>\n ) {\n super();\n }\n\n public run(\n type: MessageType<T>,\n data: MessageData<T, MessageType<T>>,\n sender: MessageSender\n ): MessageResponse<T, MessageType<T>> | undefined {\n if (type === this.messageType) {\n return this.handler(data, sender);\n }\n }\n}\n","import AbstractHandler from \"./AbstractHandler\";\nimport {\n MessageData,\n MessageDictionary,\n MessageMapHandler,\n MessageResponse,\n MessageSender,\n MessageType,\n} from \"@typing/message\";\n\nexport default class MapHandler<T extends MessageDictionary> extends AbstractHandler<T> {\n constructor(private map: MessageMapHandler<T>) {\n super();\n }\n\n public run(\n type: MessageType<T>,\n data: MessageData<T, MessageType<T>>,\n sender: MessageSender\n ): MessageResponse<T, MessageType<T>> | undefined {\n const handler = this.map[type];\n if (handler) {\n if (typeof handler === \"function\") {\n return handler(data, sender);\n } else {\n throw new Error(`Handler for type \"${type}\" in object of handlers must be a function`);\n }\n }\n }\n}\n","import AbstractHandler from \"./AbstractHandler\";\nimport {\n MessageData,\n MessageDictionary,\n MessageGeneralHandler,\n MessageResponse,\n MessageSender,\n MessageType,\n} from \"@typing/message\";\n\nexport default class GeneralHandler<T extends MessageDictionary, K extends MessageType<T>> extends AbstractHandler<T> {\n constructor(private generalHandler: MessageGeneralHandler<T, K>) {\n super();\n }\n\n public run(\n type: K,\n data: MessageData<T, MessageType<T>>,\n sender: MessageSender\n ): MessageResponse<T, MessageType<T>> | undefined {\n return this.generalHandler(type, data, sender);\n }\n}\n","import {sendMessage, sendTabMessage} from \"@adnbn/browser\";\n\nimport {\n MessageData,\n MessageDictionary,\n MessageGeneralHandler,\n MessageHandler,\n MessageMapHandler,\n MessageResponse,\n MessageTargetHandler,\n MessageType,\n} from \"@typing/message\";\n\nimport AbstractMessage from \"./AbstractMessage\";\nimport MessageManager from \"../MessageManager\";\n\nimport {GeneralHandler, MapHandler, SingleHandler} from \"../handlers\";\n\nexport type MessageSendOptions = number | {tabId: number; frameId?: number; documentId?: string};\n\nexport default class Message<T extends MessageDictionary> extends AbstractMessage<T, MessageSendOptions> {\n private static instance: Message<MessageDictionary> | null = null;\n\n public static getInstance<T extends MessageDictionary>() {\n return (this.instance ??= new Message<T>());\n }\n\n protected get manager(): MessageManager<T> {\n return MessageManager.getInstance<T>();\n }\n\n public send<K extends MessageType<T>>(\n type: K,\n data: MessageData<T, K>,\n options?: MessageSendOptions\n ): Promise<MessageResponse<T, K>> {\n const message = this.buildMessage(type, data);\n\n if (options) {\n if (typeof options === \"number\") {\n return sendTabMessage(options, message);\n }\n\n const {tabId, ...other} = options;\n\n return sendTabMessage(tabId, message, other);\n }\n\n return sendMessage(message);\n }\n\n public watch<K extends MessageType<T>>(\n arg1: K | MessageMapHandler<T> | MessageGeneralHandler<T, K>,\n arg2?: MessageTargetHandler<T, K>\n ): () => void {\n let handler: MessageHandler<T>;\n\n if (typeof arg1 === \"function\") {\n handler = new GeneralHandler<T, K>(arg1);\n } else if (typeof arg1 === \"object\" && arg2 === undefined) {\n handler = new MapHandler<T>(arg1);\n } else if (typeof arg1 === \"string\" && arg2) {\n handler = new SingleHandler<T>(arg1, arg2);\n } else {\n throw new Error(\"Invalid arguments passed to watch()\");\n }\n\n this.manager.add(handler);\n\n return () => this.manager.remove(handler);\n }\n}\n","import {Message, MessageSendOptions} from \"@message/providers\";\n\nimport type {MessageDictionary, MessageProvider} from \"@typing/message\";\nimport type {TransportMessage as TransportMessageContract, TransportMessageData} from \"@typing/transport\";\n\nexport default abstract class TransportMessage implements TransportMessageContract {\n private message: MessageProvider<MessageDictionary, MessageSendOptions> = new Message();\n\n protected abstract readonly key: string;\n\n public async send(data: TransportMessageData) {\n return this.message.send(this.key, data);\n }\n\n public watch(handler: (data: TransportMessageData) => any): void {\n this.message.watch(this.key, handler);\n }\n}\n","import TransportMessage from \"@transport/TransportMessage\";\n\nimport {MessageTypeSeparator} from \"@typing/message\";\n\nexport default class OffscreenMessage extends TransportMessage {\n protected readonly key: string;\n\n constructor(name: string) {\n super();\n\n this.key = `offscreen${MessageTypeSeparator}${name}`;\n }\n}\n","import {isBackground} from \"@adnbn/browser\";\n\nimport {Message} from \"@message/providers\";\n\ntype CreateParameters = chrome.offscreen.CreateParameters;\n\nexport default class OffscreenBridge {\n protected readonly key: string = \"offscreen-background\";\n\n protected readonly message = new Message();\n\n private static instance?: OffscreenBridge;\n\n public static getInstance(): OffscreenBridge {\n return (OffscreenBridge.instance ??= new OffscreenBridge());\n }\n\n public static async createOffscreen(parameters: CreateParameters): Promise<void> {\n return OffscreenBridge.getInstance().create(parameters);\n }\n\n public async create(parameters: CreateParameters): Promise<any> {\n if (isBackground()) {\n await this.apply(parameters);\n\n return;\n }\n\n await this.message.send(this.key, parameters);\n }\n\n protected apply({url}: CreateParameters): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n if (document.querySelector(`iframe[src=\"${url}\"]`)) {\n resolve();\n\n return;\n }\n\n const iframe = document.createElement(\"iframe\");\n\n iframe.src = url;\n iframe.onload = () => resolve();\n iframe.onerror = () => reject();\n\n document.body.appendChild(iframe);\n });\n }\n}\n","import {OffscreenGlobalAccess} from \"@typing/offscreen\";\n\nexport const isOffscreen = () => {\n return globalThis[OffscreenGlobalAccess] === true;\n};\n","import {closeOffscreen, createOffscreen, hasOffscreen, isManifestVersion3} from \"@adnbn/browser\";\n\nimport {getBrowser} from \"@main/env\";\n\nimport {__t} from \"@locale/helpers\";\n\nimport ProxyTransport from \"@transport/ProxyTransport\";\n\nimport OffscreenManager from \"../OffscreenManager\";\nimport OffscreenMessage from \"../OffscreenMessage\";\nimport OffscreenBridge from \"../OffscreenBridge\";\n\nimport {isOffscreen} from \"../utils\";\n\nimport {Browser} from \"@typing/browser\";\nimport {DeepAsyncProxy} from \"@typing/helpers\";\nimport {TransportDictionary, TransportManager, TransportMessage, TransportName} from \"@typing/transport\";\n\ntype CreateParameters = chrome.offscreen.CreateParameters;\n\nexport default class<N extends TransportName, T = DeepAsyncProxy<TransportDictionary[N]>> extends ProxyTransport<N, T> {\n protected message: TransportMessage;\n\n constructor(\n name: N,\n private parameters: CreateParameters\n ) {\n super(name);\n\n this.message = new OffscreenMessage(name);\n }\n\n protected manager(): TransportManager {\n return OffscreenManager.getInstance();\n }\n\n protected async apply(args: any[], path?: string): Promise<any> {\n const parameters: CreateParameters = {\n ...this.parameters,\n justification: __t(this.parameters.justification),\n };\n\n if (!isManifestVersion3() || getBrowser() === Browser.Firefox) {\n await OffscreenBridge.createOffscreen(parameters);\n } else {\n if (await hasOffscreen()) {\n await closeOffscreen();\n }\n\n await createOffscreen(parameters);\n }\n\n return this.message.send({path, args});\n }\n\n public get(): T {\n if (isOffscreen()) {\n throw new Error(\n `You are trying to get proxy offscreen service \"${this.name}\" from offscreen. You can get original offscreen service instead`\n );\n }\n\n return super.get();\n }\n}\n","import ProxyOffscreen from \"@offscreen/providers/ProxyOffscreen\";\n\nimport {type OffscreenDefinition, OffscreenReason, type OffscreenUnresolvedDefinition} from \"@typing/offscreen\";\nimport {TransportDictionary, TransportType} from \"@typing/transport\";\nimport {DeepAsyncProxy} from \"@typing/helpers\";\n\ntype OffscreenParameters = chrome.offscreen.CreateParameters;\n\nexport {OffscreenReason, OffscreenDefinition, OffscreenUnresolvedDefinition};\n\nexport type OffscreenAlias = string;\n\nexport type OffscreenMap = Map<OffscreenAlias, OffscreenParameters>;\n\nexport const defineOffscreen = <T extends TransportType>(options: OffscreenDefinition<T>): OffscreenDefinition<T> => {\n return options;\n};\n\nexport const getOffscreens = (): OffscreenMap => {\n const offscreens: OffscreenMap = new Map();\n\n try {\n // @ts-expect-error: __ADNBN_OFFSCREEN_PARAMETERS__ is a virtual variable generated by the bundler `src/cli/plugins/offscreen/index.ts`\n Object.entries<OffscreenParameters>(__ADNBN_OFFSCREEN_PARAMETERS__).forEach(([key, value]) => {\n offscreens.set(key, value);\n });\n } catch (e) {\n console.error(\"Failed getting offscreens: \", e);\n }\n\n return offscreens;\n};\n\nexport const getOffscreen = <N extends Extract<keyof TransportDictionary, string>>(\n name: N\n): DeepAsyncProxy<TransportDictionary[N]> => {\n const parameters = getOffscreens().get(name);\n\n if (!parameters) {\n throw new Error(`Unable to get offscreen: ${name}`);\n }\n\n return new ProxyOffscreen(name, parameters).get();\n};\n","import {getUrl} from \"@adnbn/browser\";\n\nimport {PageConfig, PageDefinition, PageProps} from \"@typing/page\";\n\nexport type {PageDefinition, PageProps, PageConfig};\n\nexport type PageAlias = string;\n\nexport type PageMap = Map<PageAlias, string>;\n\nexport const definePage = (options: PageDefinition): PageDefinition => {\n return options;\n};\n\nexport const getPages = (): PageMap => {\n const pages: PageMap = new Map();\n\n try {\n // @ts-expect-error: __ADNBN_PAGE_ALIAS__ is a virtual variable generated by the bundler `src/cli/plugins/page/index.ts`\n Object.entries<string>(__ADNBN_PAGE_ALIAS__).forEach(([key, value]) => {\n pages.set(key, value);\n });\n } catch (e) {\n console.error(\"Failed getting pages: \", e);\n }\n\n return pages;\n};\n\nexport const getPageUrl = (alias: PageAlias): string => {\n let path = getPages().get(alias);\n\n if (!path) {\n console.warn(`Cannot find page: ${alias}`);\n\n path = alias;\n }\n\n return getUrl(path);\n};\n","import {Plugin, PluginDefinition} from \"@typing/plugin\";\n\nexport type {Plugin, PluginDefinition};\n\nexport function definePlugin<T extends any[] = []>(plugin: PluginDefinition<T>): PluginDefinition<T> {\n return plugin;\n}\n","import {setActionPopup, setActionTitle} from \"@adnbn/browser\";\n\nimport {__t} from \"@locale/helpers\";\n\nimport {changeActionIcon} from \"./icon\";\n\nimport {PopupDefinition} from \"@typing/popup\";\nimport {ManifestPopup} from \"@typing/manifest\";\n\ntype Tab = chrome.tabs.Tab;\n\nexport type PopupAlias = string;\n\nexport type PopupMap = Map<PopupAlias, ManifestPopup>;\n\nexport const definePopup = (options: PopupDefinition): PopupDefinition => {\n return options;\n};\n\nexport const getPopups = (): PopupMap => {\n const popups: PopupMap = new Map();\n\n try {\n // @ts-expect-error: __ADNBN_POPUP_MAP__ is a virtual variable generated by the bundler `src/cli/plugins/popup/index.ts`\n Object.entries<ManifestPopup>(__ADNBN_POPUP_MAP__).forEach(([key, value]) => {\n popups.set(key, value);\n });\n } catch (e) {\n console.error(\"Failed getting popups: \", e);\n }\n\n return popups;\n};\n\nexport const changePopup = async (alias: PopupAlias, tab?: number | Tab): Promise<void> => {\n const popup = getPopups().get(alias);\n\n if (!popup) {\n throw new Error(`Not found popup: \"${alias}\"`);\n }\n\n if (tab && typeof tab === \"object\") {\n tab = tab.id;\n }\n\n const {path, title, icon} = popup;\n\n if (!path) {\n throw new Error(`Not found popup path: \"${alias}\"`);\n }\n\n await setActionPopup(path, tab);\n\n if (title) {\n await setActionTitle(__t(title), tab);\n }\n\n if (icon) {\n await changeActionIcon(icon, tab);\n }\n};\n","import {EntrypointOptions} from \"@typing/entrypoint\";\nimport {ContentScriptConfig, ContentScriptContext, ContentScriptDefinition} from \"@typing/content\";\nimport {TransportConfig, TransportDefinition, TransportType} from \"@typing/transport\";\nimport {Awaiter} from \"@typing/helpers\";\n\nexport const RelayGlobalKey = \"adnbnRelay\";\n\nexport type RelayConfig = TransportConfig & ContentScriptConfig;\n\nexport type RelayOptions = RelayConfig & EntrypointOptions;\n\nexport type RelayEntrypointOptions = Partial<RelayOptions>;\n\nexport type RelayMainHandler<T extends TransportType> = (\n relay: T,\n context: ContentScriptContext,\n options: RelayEntrypointOptions\n) => Awaiter<void>;\n\nexport interface RelayDefinition<T extends TransportType>\n extends Omit<TransportDefinition<RelayOptions, T>, \"main\">,\n Omit<ContentScriptDefinition, \"main\">,\n Omit<RelayEntrypointOptions, \"declarative\"> {\n main?: RelayMainHandler<T>;\n}\n\nexport type RelayUnresolvedDefinition<T extends TransportType> = Partial<RelayDefinition<T>>;\n","import get from \"get-value\";\n\nimport TransportManager from \"@transport/TransportManager\";\n\nimport {TransportManager as TransportManagerContract, TransportName} from \"@typing/transport\";\nimport {RelayGlobalKey} from \"@typing/relay\";\n\ntype PropertyOptions = {\n path?: string;\n args?: any[];\n getOptions?: get.Options;\n};\n\nexport default class RelayManager extends TransportManager {\n public static getInstance(): TransportManagerContract {\n return (globalThis[RelayGlobalKey] ??= new RelayManager());\n }\n\n public async property(name: TransportName, options?: PropertyOptions): Promise<any> {\n const {path, args, getOptions} = options || {};\n const relay = this.get(name);\n\n const property = path == null ? relay : get(relay, path, getOptions);\n\n if (property === undefined) {\n throw new Error(`Property not found at path \"${path}\" in relay \"${name}\"`);\n }\n\n if (typeof property === \"function\") {\n return await property.apply(relay, args);\n }\n\n return property;\n }\n}\n","import {getManifestVersion, isAvailableScripting} from \"@adnbn/browser\";\n\nimport injectScriptFactory, {type InjectScriptContract, type InjectScriptOptions} from \"@adnbn/inject-script\";\n\nimport ProxyTransport from \"@transport/ProxyTransport\";\n\nimport RelayManager from \"../RelayManager\";\n\nimport {RelayGlobalKey} from \"@typing/relay\";\n\nimport type {DeepAsyncProxy} from \"@typing/helpers\";\nimport type {TransportDictionary, TransportManager, TransportName} from \"@typing/transport\";\n\nexport type ProxyRelayOptions =\n | number\n | (Omit<InjectScriptOptions, \"frameId\" | \"documentId\" | \"timeFallback\"> & {\n frameId?: number;\n documentId?: string;\n });\n\nexport default class ProxyRelay<\n N extends TransportName,\n T = DeepAsyncProxy<TransportDictionary[N]>,\n> extends ProxyTransport<N, T> {\n private injectScript: InjectScriptContract;\n\n constructor(\n name: N,\n protected options: ProxyRelayOptions\n ) {\n super(name);\n\n this.injectScript = injectScriptFactory({\n ...(typeof options === \"number\" ? {tabId: options} : options),\n timeFallback: 4000,\n });\n }\n\n protected manager(): TransportManager {\n return RelayManager.getInstance();\n }\n\n protected async apply(args: any[], path?: string): Promise<any> {\n const func = async (name: string, path: string, args: any[], key: string) => {\n try {\n const awaitManager = async (maxAttempts = 10, delay = 300): Promise<RelayManager> => {\n for (let count = 0; count < maxAttempts; count++) {\n const manager = globalThis[key];\n\n if (manager) return manager;\n\n await new Promise(resolve => setTimeout(resolve, delay));\n }\n\n throw new Error(`Relay manager not found after ${maxAttempts} attempts.`);\n };\n\n const manager: RelayManager = await awaitManager();\n\n return await manager.property(name, {path, args});\n } catch (error) {\n console.error(\"ProxyRelay.createProxy()\", document.location.href, error);\n\n throw error;\n }\n };\n\n const result = await this.injectScript.run(func, [this.name, path!, args, RelayGlobalKey]);\n\n return result?.[0]?.result;\n }\n\n public get(): T {\n if (!isAvailableScripting() && getManifestVersion() !== 2) {\n throw new Error(\n `You are trying to get proxy relay \"${this.name}\" from script content. You can get original relay instead`\n );\n }\n\n return super.get();\n }\n}\n","import {ProxyRelay, type ProxyRelayOptions} from \"@relay/providers\";\n\nimport {DeepAsyncProxy} from \"@typing/helpers\";\nimport {TransportDictionary, TransportType} from \"@typing/transport\";\nimport {RelayDefinition, RelayUnresolvedDefinition} from \"@typing/relay\";\n\nexport type {RelayDefinition, RelayUnresolvedDefinition};\n\nexport const defineRelay = <T extends TransportType>(options: RelayDefinition<T>): RelayDefinition<T> => {\n return options;\n};\n\nexport const getRelay = <N extends Extract<keyof TransportDictionary, string>>(\n name: N,\n options: ProxyRelayOptions\n): DeepAsyncProxy<TransportDictionary[N]> => {\n return new ProxyRelay(name, options).get();\n};\n","import {BackgroundConfig} from \"@typing/background\";\nimport {EntrypointOptions} from \"@typing/entrypoint\";\nimport {TransportConfig, TransportDefinition, TransportType} from \"@typing/transport\";\n\nexport const ServiceGlobalKey = \"adnbnService\";\n\nexport type ServiceConfig = TransportConfig & BackgroundConfig;\n\nexport type ServiceOptions = ServiceConfig & EntrypointOptions;\n\nexport type ServiceEntrypointOptions = Partial<ServiceOptions>;\n\nexport type ServiceDefinition<T extends TransportType> = TransportDefinition<ServiceOptions, T> &\n ServiceEntrypointOptions;\n\nexport type ServiceUnresolvedDefinition<T extends TransportType> = Partial<ServiceDefinition<T>>;\n","import TransportManager from \"@transport/TransportManager\";\n\nimport {ServiceGlobalKey} from \"@typing/service\";\n\nimport type {TransportManager as TransportManagerContract} from \"@typing/transport\";\n\nexport default class ServiceManager extends TransportManager {\n public static getInstance(): TransportManagerContract {\n return (globalThis[ServiceGlobalKey] ??= new ServiceManager());\n }\n}\n","import TransportMessage from \"@transport/TransportMessage\";\n\nimport {MessageTypeSeparator} from \"@typing/message\";\n\nexport default class ServiceMessage extends TransportMessage {\n protected readonly key: string;\n\n constructor(name: string) {\n super();\n this.key = `service${MessageTypeSeparator}${name}`;\n }\n}\n","import {isBackground} from \"@adnbn/browser\";\n\nimport ProxyTransport from \"@transport/ProxyTransport\";\n\nimport ServiceManager from \"../ServiceManager\";\nimport ServiceMessage from \"../ServiceMessage\";\n\nimport type {DeepAsyncProxy} from \"@typing/helpers\";\nimport type {TransportDictionary, TransportManager, TransportMessage, TransportName} from \"@typing/transport\";\n\nexport default class<N extends TransportName, T = DeepAsyncProxy<TransportDictionary[N]>> extends ProxyTransport<N, T> {\n protected message: TransportMessage;\n\n constructor(name: N) {\n super(name);\n this.message = new ServiceMessage(name);\n }\n\n protected manager(): TransportManager {\n return ServiceManager.getInstance();\n }\n\n protected async apply(args: any[], path?: string): Promise<any> {\n return this.message.send({path, args});\n }\n\n public get(): T {\n if (isBackground()) {\n throw new Error(\n `You are trying to get proxy service \"${this.name}\" from background. You can get original service instead`\n );\n }\n\n return super.get();\n }\n}\n","import {ProxyService} from \"@service/providers\";\n\nimport {DeepAsyncProxy} from \"@typing/helpers\";\nimport {TransportDictionary, TransportType} from \"@typing/transport\";\nimport {ServiceDefinition} from \"@typing/service\";\n\nexport type {ServiceDefinition};\n\nexport const defineService = <T extends TransportType>(options: ServiceDefinition<T>): ServiceDefinition<T> => {\n return options;\n};\n\nexport const getService = <N extends Extract<keyof TransportDictionary, string>>(\n name: N\n): DeepAsyncProxy<TransportDictionary[N]> => {\n return new ProxyService(name).get();\n};\n","import {setSidebarPath, setSidebarTitle} from \"@adnbn/browser\";\n\nimport {__t} from \"@locale/helpers\";\n\nimport type {SidebarDefinition} from \"@typing/sidebar\";\nimport type {ManifestSidebar} from \"@typing/manifest\";\n\ntype Tab = chrome.tabs.Tab;\n\nexport type SidebarAlias = string;\n\nexport type SidebarMap = Map<SidebarAlias, ManifestSidebar>;\n\nexport const defineSidebar = (options: SidebarDefinition): SidebarDefinition => {\n return options;\n};\n\nexport const getSidebars = (): SidebarMap => {\n const sidebars: SidebarMap = new Map();\n\n try {\n // @ts-expect-error: __ADNBN_SIDEBAR_MAP__ is a virtual variable generated by the bundler `src/cli/plugins/sidebar/index.ts`\n Object.entries<ManifestSidebar>(__ADNBN_SIDEBAR_MAP__).forEach(([key, value]) => {\n sidebars.set(key, value);\n });\n } catch (e) {\n console.error(\"Failed getting sidebars: \", e);\n }\n\n return sidebars;\n};\n\nexport const changeSidebar = async (alias: SidebarAlias, tab?: number | Tab): Promise<void> => {\n const sidebar = getSidebars().get(alias);\n\n if (!sidebar) {\n throw new Error(`Not found sidebar: \"${alias}\"`);\n }\n\n if (tab && typeof tab === \"object\") {\n tab = tab.id;\n }\n\n const {path, title} = sidebar;\n\n if (!path) {\n throw new Error(`Not found sidebar path: \"${alias}\"`);\n }\n\n await setSidebarPath(path, tab);\n\n if (title) {\n await setSidebarTitle(__t(title), tab);\n }\n};\n"]}
|