ant0-browser 0.0.0-stage → 0.1.1
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/LICENSE +35 -0
- package/README.md +100 -2
- package/dist/chromium-version.d.ts +22 -0
- package/dist/chromium-version.d.ts.map +1 -0
- package/dist/chromium-version.js +22 -0
- package/dist/chromium-version.js.map +1 -0
- package/dist/download.d.ts +22 -0
- package/dist/download.d.ts.map +1 -0
- package/dist/download.js +219 -0
- package/dist/download.js.map +1 -0
- package/dist/fingerprint.d.ts +213 -0
- package/dist/fingerprint.d.ts.map +1 -0
- package/dist/fingerprint.js +375 -0
- package/dist/fingerprint.js.map +1 -0
- package/dist/fontpack.d.ts +13 -0
- package/dist/fontpack.d.ts.map +1 -0
- package/dist/fontpack.js +149 -0
- package/dist/fontpack.js.map +1 -0
- package/dist/fonts.d.ts +15 -0
- package/dist/fonts.d.ts.map +1 -0
- package/dist/fonts.js +86 -0
- package/dist/fonts.js.map +1 -0
- package/dist/geoip.d.ts +45 -0
- package/dist/geoip.d.ts.map +1 -0
- package/dist/geoip.js +289 -0
- package/dist/geoip.js.map +1 -0
- package/dist/geometry.d.ts +28 -0
- package/dist/geometry.d.ts.map +1 -0
- package/dist/geometry.js +79 -0
- package/dist/geometry.js.map +1 -0
- package/dist/humanize.d.ts +20 -0
- package/dist/humanize.d.ts.map +1 -0
- package/dist/humanize.js +921 -0
- package/dist/humanize.js.map +1 -0
- package/dist/identity-persistence.d.ts +51 -0
- package/dist/identity-persistence.d.ts.map +1 -0
- package/dist/identity-persistence.js +301 -0
- package/dist/identity-persistence.js.map +1 -0
- package/dist/identity.d.ts +43 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +197 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +234 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +593 -0
- package/dist/index.js.map +1 -0
- package/dist/launch-ticket.d.ts +87 -0
- package/dist/launch-ticket.d.ts.map +1 -0
- package/dist/launch-ticket.js +233 -0
- package/dist/launch-ticket.js.map +1 -0
- package/dist/launchopts.d.ts +133 -0
- package/dist/launchopts.d.ts.map +1 -0
- package/dist/launchopts.js +204 -0
- package/dist/launchopts.js.map +1 -0
- package/dist/motion.d.ts +106 -0
- package/dist/motion.d.ts.map +1 -0
- package/dist/motion.js +311 -0
- package/dist/motion.js.map +1 -0
- package/dist/motionscore.d.ts +57 -0
- package/dist/motionscore.d.ts.map +1 -0
- package/dist/motionscore.js +215 -0
- package/dist/motionscore.js.map +1 -0
- package/dist/persona-migration.d.ts +51 -0
- package/dist/persona-migration.d.ts.map +1 -0
- package/dist/persona-migration.js +95 -0
- package/dist/persona-migration.js.map +1 -0
- package/dist/persona-profile-v2.d.ts +155 -0
- package/dist/persona-profile-v2.d.ts.map +1 -0
- package/dist/persona-profile-v2.js +421 -0
- package/dist/persona-profile-v2.js.map +1 -0
- package/dist/population-model.d.ts +42 -0
- package/dist/population-model.d.ts.map +1 -0
- package/dist/population-model.js +224 -0
- package/dist/population-model.js.map +1 -0
- package/dist/release-fetch.d.ts +70 -0
- package/dist/release-fetch.d.ts.map +1 -0
- package/dist/release-fetch.js +392 -0
- package/dist/release-fetch.js.map +1 -0
- package/dist/release.d.ts +16 -0
- package/dist/release.d.ts.map +1 -0
- package/dist/release.js +26 -0
- package/dist/release.js.map +1 -0
- package/dist/render.d.ts +38 -0
- package/dist/render.d.ts.map +1 -0
- package/dist/render.js +104 -0
- package/dist/render.js.map +1 -0
- package/dist/shaderdialect.d.ts +33 -0
- package/dist/shaderdialect.d.ts.map +1 -0
- package/dist/shaderdialect.js +46 -0
- package/dist/shaderdialect.js.map +1 -0
- package/dist/template-selection.d.ts +14 -0
- package/dist/template-selection.d.ts.map +1 -0
- package/dist/template-selection.js +65 -0
- package/dist/template-selection.js.map +1 -0
- package/dist/warnings.d.ts +19 -0
- package/dist/warnings.d.ts.map +1 -0
- package/dist/warnings.js +159 -0
- package/dist/warnings.js.map +1 -0
- package/dist/widevine.d.ts +44 -0
- package/dist/widevine.d.ts.map +1 -0
- package/dist/widevine.js +202 -0
- package/dist/widevine.js.map +1 -0
- package/package.json +56 -4
package/dist/fontpack.js
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
// Real-Windows font pack: locate / download / cache the true Windows font set so a Windows persona
|
|
2
|
+
// renders real fonts (correct metrics) on a bare Linux host, instead of collapsing to the handful
|
|
3
|
+
// a server/container ships. Windows hosts already have these fonts, so this is a no-op there.
|
|
4
|
+
//
|
|
5
|
+
// Resolution order (first hit wins):
|
|
6
|
+
// 1. ANT0_BROWSER_FONT_PACK — an explicit local directory of font files (skips any download).
|
|
7
|
+
// 2. the cached, previously-extracted pack under the SDK cache dir.
|
|
8
|
+
// 3. download ANT0_BROWSER_FONT_PACK_URL (SHA-256 pinned), verify, extract, cache.
|
|
9
|
+
// Never throws: returns a directory path or undefined (callers fall back to the bundled clones).
|
|
10
|
+
import { createHash } from "node:crypto";
|
|
11
|
+
import { createWriteStream, existsSync, mkdirSync, readdirSync, readFileSync, renameSync, rmSync, writeFileSync, } from "node:fs";
|
|
12
|
+
import { homedir, tmpdir } from "node:os";
|
|
13
|
+
import { execFileSync } from "node:child_process";
|
|
14
|
+
import { join } from "node:path";
|
|
15
|
+
export const PACK_VERSION = "windows-v1";
|
|
16
|
+
// SHA-256 of the pinned pack zip (ant0-fontpack-windows-v1.zip).
|
|
17
|
+
export const PACK_SHA256 = "c3ec22541252f983e0467317427530695fc1db4fccf109b79f8d4fdec0110511";
|
|
18
|
+
const FONT_EXTS = [".ttf", ".ttc", ".otf"];
|
|
19
|
+
/** The opt-in pack URL (`ANT0_BROWSER_FONT_PACK_URL`), read at call time — not frozen at import —
|
|
20
|
+
* so a host process (e.g. a daemon) can set it after loading the SDK. Empty string when unset. */
|
|
21
|
+
export function packUrl() {
|
|
22
|
+
return process.env.ANT0_BROWSER_FONT_PACK_URL || "";
|
|
23
|
+
}
|
|
24
|
+
function log(quiet, msg) {
|
|
25
|
+
if (!quiet)
|
|
26
|
+
process.stderr.write(`[ant0-browser] ${msg}\n`);
|
|
27
|
+
}
|
|
28
|
+
function cacheRoot() {
|
|
29
|
+
const env = process.env.ANT0_BROWSER_CACHE;
|
|
30
|
+
if (env)
|
|
31
|
+
return join(env, "fontpack");
|
|
32
|
+
if (process.platform === "win32") {
|
|
33
|
+
return join(process.env.LOCALAPPDATA || join(homedir(), "AppData", "Local"), "ant0-browser", "fontpack");
|
|
34
|
+
}
|
|
35
|
+
if (process.platform === "darwin")
|
|
36
|
+
return join(homedir(), "Library", "Caches", "ant0-browser", "fontpack");
|
|
37
|
+
return join(process.env.XDG_CACHE_HOME || join(homedir(), ".cache"), "ant0-browser", "fontpack");
|
|
38
|
+
}
|
|
39
|
+
function hasFonts(dir) {
|
|
40
|
+
try {
|
|
41
|
+
return readdirSync(dir).some((n) => FONT_EXTS.includes(n.slice(n.lastIndexOf(".")).toLowerCase()));
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async function downloadAndExtract(dest, url, quiet) {
|
|
48
|
+
const { get } = await import("node:https");
|
|
49
|
+
const unzipper = await import("unzipper");
|
|
50
|
+
mkdirSync(join(dest, ".."), { recursive: true });
|
|
51
|
+
const zpath = join(tmpdir(), `ant0-fontpack-${process.pid}.zip`);
|
|
52
|
+
log(quiet, "fontpack: downloading real Windows font pack (~200 MB, first run only)");
|
|
53
|
+
await new Promise((resolve, reject) => {
|
|
54
|
+
const follow = (url, n = 0) => {
|
|
55
|
+
get(url, (res) => {
|
|
56
|
+
if (res.statusCode && res.statusCode >= 300 && res.statusCode < 400 && res.headers.location && n < 5) {
|
|
57
|
+
res.resume();
|
|
58
|
+
follow(res.headers.location, n + 1);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (res.statusCode !== 200) {
|
|
62
|
+
reject(new Error(`HTTP ${res.statusCode}`));
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const out = createWriteStream(zpath);
|
|
66
|
+
res.pipe(out);
|
|
67
|
+
out.on("finish", () => out.close(() => resolve()));
|
|
68
|
+
out.on("error", reject);
|
|
69
|
+
}).on("error", reject);
|
|
70
|
+
};
|
|
71
|
+
follow(url);
|
|
72
|
+
});
|
|
73
|
+
const actual = createHash("sha256").update(readFileSync(zpath)).digest("hex");
|
|
74
|
+
if (PACK_SHA256 && actual !== PACK_SHA256) {
|
|
75
|
+
rmSync(zpath, { force: true });
|
|
76
|
+
throw new Error(`sha256 mismatch: ${actual}`);
|
|
77
|
+
}
|
|
78
|
+
const staging = `${dest}.part`;
|
|
79
|
+
rmSync(staging, { recursive: true, force: true });
|
|
80
|
+
mkdirSync(staging, { recursive: true });
|
|
81
|
+
const dir = await unzipper.Open.file(zpath);
|
|
82
|
+
for (const f of dir.files) {
|
|
83
|
+
const ext = f.path.slice(f.path.lastIndexOf(".")).toLowerCase();
|
|
84
|
+
if (f.type === "File" && FONT_EXTS.includes(ext)) {
|
|
85
|
+
writeFileSync(join(staging, f.path.split("/").pop()), await f.buffer());
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
rmSync(zpath, { force: true });
|
|
89
|
+
if (!existsSync(dest))
|
|
90
|
+
renameSync(staging, dest);
|
|
91
|
+
else
|
|
92
|
+
rmSync(staging, { recursive: true, force: true });
|
|
93
|
+
log(quiet, "fontpack: ready");
|
|
94
|
+
return hasFonts(dest) ? dest : undefined;
|
|
95
|
+
}
|
|
96
|
+
/** Return a directory of real Windows font files, or undefined (fall back to bundled clones). */
|
|
97
|
+
export async function resolveFontPack(opts = {}) {
|
|
98
|
+
const quiet = opts.quiet ?? false;
|
|
99
|
+
const env = process.env.ANT0_BROWSER_FONT_PACK;
|
|
100
|
+
if (env && existsSync(env) && hasFonts(env))
|
|
101
|
+
return env;
|
|
102
|
+
if (process.platform === "win32")
|
|
103
|
+
return undefined; // real Windows fonts already installed
|
|
104
|
+
const dest = join(cacheRoot(), PACK_VERSION);
|
|
105
|
+
if (hasFonts(dest))
|
|
106
|
+
return dest;
|
|
107
|
+
const url = packUrl();
|
|
108
|
+
if ((opts.download ?? true) && url) {
|
|
109
|
+
try {
|
|
110
|
+
return await downloadAndExtract(dest, url, quiet);
|
|
111
|
+
}
|
|
112
|
+
catch (e) {
|
|
113
|
+
log(quiet, `fontpack: unavailable (${String(e)}) — using bundled clones`);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return undefined;
|
|
117
|
+
}
|
|
118
|
+
/** Lower-cased family names in the pack (cached in families.txt; fc-scan once if missing). */
|
|
119
|
+
export function packFamilies(packDir) {
|
|
120
|
+
if (!packDir)
|
|
121
|
+
return new Set();
|
|
122
|
+
const manifest = join(packDir, "families.txt");
|
|
123
|
+
try {
|
|
124
|
+
if (existsSync(manifest)) {
|
|
125
|
+
return new Set(readFileSync(manifest, "utf8").split("\n").map((s) => s.trim().toLowerCase()).filter(Boolean));
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
catch { /* fall through to scan */ }
|
|
129
|
+
const fams = new Set();
|
|
130
|
+
try {
|
|
131
|
+
const files = readdirSync(packDir)
|
|
132
|
+
.filter((n) => FONT_EXTS.includes(n.slice(n.lastIndexOf(".")).toLowerCase()))
|
|
133
|
+
.map((n) => join(packDir, n));
|
|
134
|
+
if (!files.length)
|
|
135
|
+
return fams;
|
|
136
|
+
const out = execFileSync("fc-scan", ["--format", "%{family}\n", ...files], { encoding: "utf8", timeout: 60000 });
|
|
137
|
+
for (const line of out.split("\n"))
|
|
138
|
+
for (const part of line.split(",")) {
|
|
139
|
+
const p = part.trim().toLowerCase();
|
|
140
|
+
if (p)
|
|
141
|
+
fams.add(p);
|
|
142
|
+
}
|
|
143
|
+
if (fams.size)
|
|
144
|
+
writeFileSync(manifest, [...fams].sort().join("\n") + "\n");
|
|
145
|
+
}
|
|
146
|
+
catch { /* fc-scan unavailable */ }
|
|
147
|
+
return fams;
|
|
148
|
+
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G,CAAC,EAAE,CAAC;gBACvE,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;gBAAC,IAAI,CAAC;oBAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAC1D,CAAC;QACD,IAAI,IAAI,CAAC,IAAI;YAAE,aAAa,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IAC7E,CAAC;IAAC,MAAM,CAAC,CAAC,yBAAyB,CAAC,CAAC;IACrC,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/fonts.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Returns `{ FONTCONFIG_FILE }` on Linux — pack mode when `packDir` is given (real fonts), else
|
|
2
|
+
* clone mode from the bundled template. `{}` when there is nothing to wire. */
|
|
3
|
+
export declare function linuxFontEnv(exePath: string, packDir?: string): Record<string, string>;
|
|
4
|
+
type EnvMap = {
|
|
5
|
+
[key: string]: string | undefined;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Build the `env` to pass to Playwright's launch so the bundled fonts resolve.
|
|
9
|
+
* Merges process.env (Playwright replaces the env when `env` is set, so we must include it),
|
|
10
|
+
* the bundled-font FONTCONFIG_FILE, then any caller-supplied `env` (caller wins).
|
|
11
|
+
* Returns `undefined` when there is nothing to add (preserve Playwright's default env).
|
|
12
|
+
*/
|
|
13
|
+
export declare function fontLaunchEnv(exePath: string, userEnv?: EnvMap, packDir?: string): EnvMap | undefined;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=fonts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../src/fonts.ts"],"names":[],"mappings":"AA8CA;gFACgF;AAChF,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAsBtF;AAED,KAAK,MAAM,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAEpD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAIrG"}
|
package/dist/fonts.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// Linux font wiring.
|
|
2
|
+
//
|
|
3
|
+
// The Linux release bundles metric-compatible font clones (Segoe UI->Selawik,
|
|
4
|
+
// Arial->Arimo, Times New Roman->Tinos, …) under `<binDir>/fonts/`, together with a
|
|
5
|
+
// self-contained `fonts.conf.template`. On a bare server/container the Windows families
|
|
6
|
+
// (and even the standard fontconfig metric-alias rules) are absent, so a page asking for
|
|
7
|
+
// "Segoe UI" collapses to a single default — a detectable render + an absent-font tell.
|
|
8
|
+
//
|
|
9
|
+
// At launch we materialize the template (substituting the real fonts dir + a writable
|
|
10
|
+
// cache dir) and point FONTCONFIG_FILE at it, so the clones resolve without depending on
|
|
11
|
+
// the host's /etc/fonts. No-op on non-Linux and on older binaries that ship no `fonts/`.
|
|
12
|
+
import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
|
|
13
|
+
import { dirname, join } from "node:path";
|
|
14
|
+
import { tmpdir } from "node:os";
|
|
15
|
+
function xml(text) {
|
|
16
|
+
return text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
17
|
+
}
|
|
18
|
+
const RENDER_DEFAULTS = ' <match target="font"><edit name="antialias" mode="assign"><bool>true</bool></edit></match>\n' +
|
|
19
|
+
' <match target="font"><edit name="hinting" mode="assign"><bool>true</bool></edit></match>\n' +
|
|
20
|
+
' <match target="font"><edit name="hintstyle" mode="assign"><const>hintslight</const></edit></match>\n' +
|
|
21
|
+
' <match target="font"><edit name="rgba" mode="assign"><const>rgb</const></edit></match>\n' +
|
|
22
|
+
' <match target="font"><edit name="lcdfilter" mode="assign"><const>lcddefault</const></edit></match>\n';
|
|
23
|
+
function isDir(p) {
|
|
24
|
+
try {
|
|
25
|
+
return statSync(p).isDirectory();
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
// A fontconfig that serves the REAL Windows fonts (correct metrics), clones as fallback; no forced
|
|
32
|
+
// Windows->clone substitution (so real Arial renders as real Arial).
|
|
33
|
+
function packConf(packDir, clonesDir, cacheDir) {
|
|
34
|
+
let dirs = ` <dir>${xml(packDir)}</dir>\n`;
|
|
35
|
+
if (clonesDir && isDir(clonesDir))
|
|
36
|
+
dirs += ` <dir>${xml(clonesDir)}</dir>\n`;
|
|
37
|
+
return '<?xml version="1.0"?>\n<!DOCTYPE fontconfig SYSTEM "fonts.dtd">\n<fontconfig>\n' + dirs +
|
|
38
|
+
` <cachedir>${xml(cacheDir)}</cachedir>\n` +
|
|
39
|
+
' <alias><family>sans-serif</family><prefer><family>Segoe UI</family><family>Arial</family></prefer></alias>\n' +
|
|
40
|
+
' <alias><family>serif</family><prefer><family>Times New Roman</family></prefer></alias>\n' +
|
|
41
|
+
' <alias><family>monospace</family><prefer><family>Consolas</family><family>Courier New</family></prefer></alias>\n' +
|
|
42
|
+
' <alias><family>system-ui</family><prefer><family>Segoe UI</family></prefer></alias>\n' +
|
|
43
|
+
' <alias><family>-webkit-standard</family><prefer><family>Segoe UI</family></prefer></alias>\n' +
|
|
44
|
+
RENDER_DEFAULTS + "</fontconfig>\n";
|
|
45
|
+
}
|
|
46
|
+
/** Returns `{ FONTCONFIG_FILE }` on Linux — pack mode when `packDir` is given (real fonts), else
|
|
47
|
+
* clone mode from the bundled template. `{}` when there is nothing to wire. */
|
|
48
|
+
export function linuxFontEnv(exePath, packDir) {
|
|
49
|
+
if (process.platform !== "linux")
|
|
50
|
+
return {};
|
|
51
|
+
const clonesDir = join(dirname(exePath), "fonts");
|
|
52
|
+
const template = join(clonesDir, "fonts.conf.template");
|
|
53
|
+
try {
|
|
54
|
+
const cacheDir = join(tmpdir(), "cc-fc-cache");
|
|
55
|
+
mkdirSync(cacheDir, { recursive: true });
|
|
56
|
+
if (packDir && isDir(packDir)) {
|
|
57
|
+
const confPath = join(cacheDir, "fonts.pack.conf");
|
|
58
|
+
writeFileSync(confPath, packConf(packDir, clonesDir, cacheDir));
|
|
59
|
+
return { FONTCONFIG_FILE: confPath };
|
|
60
|
+
}
|
|
61
|
+
if (!existsSync(template))
|
|
62
|
+
return {};
|
|
63
|
+
const conf = readFileSync(template, "utf8")
|
|
64
|
+
.split("@FONTS_DIR@").join(clonesDir)
|
|
65
|
+
.split("@CACHE_DIR@").join(cacheDir);
|
|
66
|
+
const confPath = join(clonesDir, "fonts.generated.conf");
|
|
67
|
+
writeFileSync(confPath, conf);
|
|
68
|
+
return { FONTCONFIG_FILE: confPath };
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
return {}; // never block a launch on font wiring
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Build the `env` to pass to Playwright's launch so the bundled fonts resolve.
|
|
76
|
+
* Merges process.env (Playwright replaces the env when `env` is set, so we must include it),
|
|
77
|
+
* the bundled-font FONTCONFIG_FILE, then any caller-supplied `env` (caller wins).
|
|
78
|
+
* Returns `undefined` when there is nothing to add (preserve Playwright's default env).
|
|
79
|
+
*/
|
|
80
|
+
export function fontLaunchEnv(exePath, userEnv, packDir) {
|
|
81
|
+
const fontEnv = linuxFontEnv(exePath, packDir);
|
|
82
|
+
if (Object.keys(fontEnv).length === 0 && !userEnv)
|
|
83
|
+
return undefined;
|
|
84
|
+
return { ...process.env, ...fontEnv, ...(userEnv ?? {}) };
|
|
85
|
+
}
|
|
86
|
+
//# sourceMapping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C,CAAC;QACzD,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAC9B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,CAAC;IACvC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC,CAAC,sCAAsC;IACnD,CAAC;AACH,CAAC;AAID;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe,EAAE,OAAgB,EAAE,OAAgB;IAC/E,MAAM,OAAO,GAAG,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC/C,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,OAAO;QAAE,OAAO,SAAS,CAAC;IACpE,OAAO,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,GAAG,OAAO,EAAE,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,CAAC;AAC5D,CAAC"}
|
package/dist/geoip.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export declare const DEFAULT_MMDB_URL = "https://releases.ant0.link/ant0-assets/geoip/v1/geoip-aio-all.mmdb.zip";
|
|
2
|
+
export declare const DEFAULT_IPECHO_URL = "http://ip.ant0.link/";
|
|
3
|
+
export declare const DEFAULT_GEOJSON_URL = "http://ip.ant0.link/json";
|
|
4
|
+
/** Env overrides are read at call time (not frozen at import) so tests and daemons can set them. */
|
|
5
|
+
export declare function geoEndpoints(): {
|
|
6
|
+
ipecho: string[];
|
|
7
|
+
mmdb: string;
|
|
8
|
+
geojson: string;
|
|
9
|
+
};
|
|
10
|
+
export interface Geo {
|
|
11
|
+
ip?: string;
|
|
12
|
+
country?: string;
|
|
13
|
+
timezone?: string;
|
|
14
|
+
acceptLanguage?: string;
|
|
15
|
+
location?: string;
|
|
16
|
+
}
|
|
17
|
+
/** Discover the egress IP via an IP-echo through the proxy (or direct). */
|
|
18
|
+
export declare function exitIp(proxy: string | null, quiet?: boolean): Promise<string | null>;
|
|
19
|
+
/** Shape of `GET ip.ant0.link/json` (fields are null when unknown). */
|
|
20
|
+
export interface IpEchoJson {
|
|
21
|
+
ip: string | null;
|
|
22
|
+
country: string | null;
|
|
23
|
+
region: string | null;
|
|
24
|
+
city: string | null;
|
|
25
|
+
timezone: string | null;
|
|
26
|
+
lat: number | null;
|
|
27
|
+
lon: number | null;
|
|
28
|
+
asn: number | null;
|
|
29
|
+
org: string | null;
|
|
30
|
+
}
|
|
31
|
+
/** Map an ip.ant0.link/json body to Geo; null when it carries no usable geo. */
|
|
32
|
+
export declare function geoFromEchoJson(j: Partial<IpEchoJson> | null | undefined): Geo | null;
|
|
33
|
+
/**
|
|
34
|
+
* Resolve geo for the egress (through `proxy` if given, else direct). Never throws — returns null
|
|
35
|
+
* on failure. Uses the geoip-all-in-one offline DB first, ip.ant0.link/json as a fallback.
|
|
36
|
+
*/
|
|
37
|
+
export declare function resolveGeo(proxy?: {
|
|
38
|
+
server?: string;
|
|
39
|
+
username?: string;
|
|
40
|
+
password?: string;
|
|
41
|
+
}, opts?: {
|
|
42
|
+
quiet?: boolean;
|
|
43
|
+
}): Promise<Geo | null>;
|
|
44
|
+
export declare function acceptLanguageForCountry(cc?: string): string;
|
|
45
|
+
//# sourceMappingURL=geoip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geoip.d.ts","sourceRoot":"","sources":["../src/geoip.ts"],"names":[],"mappings":"AA6BA,eAAO,MAAM,gBAAgB,2EAA2E,CAAC;AACzG,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AACzD,eAAO,MAAM,mBAAmB,6BAA6B,CAAC;AAK9D,oGAAoG;AACpG,wBAAgB,YAAY,IAAI;IAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CASlF;AAED,MAAM,WAAW,GAAG;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC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geoip.js
ADDED
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
// geoip: resolve the egress IP's geo (timezone + lat/lon + language) so the browser matches the
|
|
2
|
+
// proxy actually in use — the way Camoufox does it. Primary source is daijro's offline
|
|
3
|
+
// "geoip-all-in-one" MaxMind DB (more accurate than a single online API; merges IP2Location +
|
|
4
|
+
// GeoLite2 + DB-IP, timezone computed from coordinates), served from the Ant0 asset mirror. Flow:
|
|
5
|
+
// discover the exit IP via Ant0's own IP echo (ip.ant0.link, zero request logging) *through the
|
|
6
|
+
// proxy*, then look that IP up in the cached .mmdb. Falls back to ip.ant0.link/json (geo computed
|
|
7
|
+
// server-side from the same DB, through the proxy) if the DB can't be fetched/opened.
|
|
8
|
+
//
|
|
9
|
+
// Network endpoints, in order of preference (all overridable):
|
|
10
|
+
// ANT0_BROWSER_IPECHO_URL plain-text IP echo; default http://ip.ant0.link/ (then https://, then
|
|
11
|
+
// the legacy third parties api.ipify.org / ip-api.com as a last resort)
|
|
12
|
+
// ANT0_BROWSER_GEOIP_URL the .mmdb zip; default releases.ant0.link/ant0-assets/geoip/v1/…
|
|
13
|
+
// ANT0_BROWSER_GEOJSON_URL JSON geo fallback; default http://ip.ant0.link/json
|
|
14
|
+
//
|
|
15
|
+
// The .mmdb (GPL-3.0 data with IP2Location LITE / GeoLite2 / DB-IP attributions, see README) is
|
|
16
|
+
// downloaded + cached on first use (≈52 MB zip → ≈120 MB), NOT bundled.
|
|
17
|
+
// http(s) proxies only for the lookup; SOCKS is skipped (we never fall back to the local IP under a
|
|
18
|
+
// proxy, which would give the wrong region).
|
|
19
|
+
import http from "node:http";
|
|
20
|
+
import https from "node:https";
|
|
21
|
+
import { createWriteStream, existsSync, mkdirSync, readdirSync, rmSync, statSync } from "node:fs";
|
|
22
|
+
import os from "node:os";
|
|
23
|
+
import path from "node:path";
|
|
24
|
+
import { Readable } from "node:stream";
|
|
25
|
+
import { pipeline } from "node:stream/promises";
|
|
26
|
+
import maxmind from "maxmind";
|
|
27
|
+
import * as unzipper from "unzipper";
|
|
28
|
+
export const DEFAULT_MMDB_URL = "https://releases.ant0.link/ant0-assets/geoip/v1/geoip-aio-all.mmdb.zip";
|
|
29
|
+
export const DEFAULT_IPECHO_URL = "http://ip.ant0.link/";
|
|
30
|
+
export const DEFAULT_GEOJSON_URL = "http://ip.ant0.link/json";
|
|
31
|
+
// Kept only as a last resort after both ip.ant0.link schemes fail (third parties, plain HTTP).
|
|
32
|
+
const LEGACY_IPECHO_URLS = ["http://api.ipify.org", "http://ip-api.com/line/?fields=query"];
|
|
33
|
+
const MMDB_MAX_AGE_DAYS = 30;
|
|
34
|
+
/** Env overrides are read at call time (not frozen at import) so tests and daemons can set them. */
|
|
35
|
+
export function geoEndpoints() {
|
|
36
|
+
const ipecho = process.env.ANT0_BROWSER_IPECHO_URL || DEFAULT_IPECHO_URL;
|
|
37
|
+
const list = [ipecho];
|
|
38
|
+
if (ipecho === DEFAULT_IPECHO_URL)
|
|
39
|
+
list.push(ipecho.replace(/^http:/, "https:"), ...LEGACY_IPECHO_URLS);
|
|
40
|
+
return {
|
|
41
|
+
ipecho: list,
|
|
42
|
+
mmdb: process.env.ANT0_BROWSER_GEOIP_URL || DEFAULT_MMDB_URL,
|
|
43
|
+
geojson: process.env.ANT0_BROWSER_GEOJSON_URL || DEFAULT_GEOJSON_URL,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function log(quiet, m) {
|
|
47
|
+
if (!quiet)
|
|
48
|
+
process.stderr.write(`[ant0-browser] ${m}\n`);
|
|
49
|
+
}
|
|
50
|
+
function geoCacheRoot() {
|
|
51
|
+
if (process.env.ANT0_BROWSER_CACHE)
|
|
52
|
+
return path.join(process.env.ANT0_BROWSER_CACHE, "geoip");
|
|
53
|
+
if (process.platform === "win32")
|
|
54
|
+
return path.join(process.env.LOCALAPPDATA || path.join(os.homedir(), "AppData", "Local"), "ant0-browser", "geoip");
|
|
55
|
+
if (process.platform === "darwin")
|
|
56
|
+
return path.join(os.homedir(), "Library", "Caches", "ant0-browser", "geoip");
|
|
57
|
+
return path.join(process.env.XDG_CACHE_HOME || path.join(os.homedir(), ".cache"), "ant0-browser", "geoip");
|
|
58
|
+
}
|
|
59
|
+
function proxyUrl(proxy) {
|
|
60
|
+
if (!proxy?.server)
|
|
61
|
+
return null;
|
|
62
|
+
let server = proxy.server;
|
|
63
|
+
if (!/:\/\//.test(server))
|
|
64
|
+
server = "http://" + server;
|
|
65
|
+
if (proxy.username) {
|
|
66
|
+
const u = new URL(server);
|
|
67
|
+
u.username = encodeURIComponent(proxy.username);
|
|
68
|
+
if (proxy.password)
|
|
69
|
+
u.password = encodeURIComponent(proxy.password);
|
|
70
|
+
return u.toString();
|
|
71
|
+
}
|
|
72
|
+
return server;
|
|
73
|
+
}
|
|
74
|
+
function isSocks(proxy) {
|
|
75
|
+
return !!proxy?.server && /^socks/i.test(proxy.server);
|
|
76
|
+
}
|
|
77
|
+
// GET an http(s):// URL, optionally through an http proxy (absolute-form request target for http://
|
|
78
|
+
// targets; https:// targets are only fetched directly — through a proxy they would need CONNECT,
|
|
79
|
+
// so the caller lists them after the plain-http variant). Text body.
|
|
80
|
+
function httpGetText(targetUrl, proxy, timeoutMs) {
|
|
81
|
+
return new Promise((resolve, reject) => {
|
|
82
|
+
const t = new URL(targetUrl);
|
|
83
|
+
const secure = t.protocol === "https:";
|
|
84
|
+
if (secure && proxy)
|
|
85
|
+
return reject(new Error("https target through an http proxy is not supported here"));
|
|
86
|
+
let opts;
|
|
87
|
+
if (proxy) {
|
|
88
|
+
const p = new URL(proxy);
|
|
89
|
+
opts = { host: p.hostname, port: p.port || 80, path: targetUrl, timeout: timeoutMs,
|
|
90
|
+
headers: { Host: t.host, "User-Agent": "ant0-browser-sdk", Accept: "*/*" } };
|
|
91
|
+
if (p.username) {
|
|
92
|
+
const cred = Buffer.from(`${decodeURIComponent(p.username)}:${decodeURIComponent(p.password)}`).toString("base64");
|
|
93
|
+
opts.headers["Proxy-Authorization"] = `Basic ${cred}`;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
opts = { host: t.hostname, port: t.port || (secure ? 443 : 80), path: t.pathname + t.search, timeout: timeoutMs,
|
|
98
|
+
headers: { Host: t.host, "User-Agent": "ant0-browser-sdk", Accept: "*/*" } };
|
|
99
|
+
}
|
|
100
|
+
const req = (secure ? https : http).request(opts, (res) => {
|
|
101
|
+
let data = "";
|
|
102
|
+
res.setEncoding("utf8");
|
|
103
|
+
res.on("data", (c) => (data += c));
|
|
104
|
+
res.on("end", () => resolve(data.trim()));
|
|
105
|
+
});
|
|
106
|
+
req.on("error", reject);
|
|
107
|
+
req.on("timeout", () => req.destroy(new Error("timed out")));
|
|
108
|
+
req.end();
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
const IPV4 = /^(?:\d{1,3}\.){3}\d{1,3}$/;
|
|
112
|
+
const IPV6 = /^[0-9a-f:]+$/i;
|
|
113
|
+
function looksLikeIp(s) {
|
|
114
|
+
return IPV4.test(s) || (s.includes(":") && IPV6.test(s));
|
|
115
|
+
}
|
|
116
|
+
/** Discover the egress IP via an IP-echo through the proxy (or direct). */
|
|
117
|
+
export async function exitIp(proxy, quiet) {
|
|
118
|
+
for (const url of geoEndpoints().ipecho) {
|
|
119
|
+
try {
|
|
120
|
+
const ip = (await httpGetText(url, proxy, 8000)).split(/\s+/)[0];
|
|
121
|
+
if (looksLikeIp(ip))
|
|
122
|
+
return ip;
|
|
123
|
+
}
|
|
124
|
+
catch {
|
|
125
|
+
/* try next */
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
log(quiet, "geoip: could not determine the exit IP");
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
let _mmdbInflight = null;
|
|
132
|
+
async function ensureMmdb(quiet) {
|
|
133
|
+
const dir = geoCacheRoot();
|
|
134
|
+
const file = path.join(dir, "geoip-aio-all.mmdb");
|
|
135
|
+
if (existsSync(file)) {
|
|
136
|
+
const ageDays = (Date.now() - statSync(file).mtimeMs) / 86_400_000;
|
|
137
|
+
if (ageDays < MMDB_MAX_AGE_DAYS)
|
|
138
|
+
return file;
|
|
139
|
+
}
|
|
140
|
+
if (_mmdbInflight)
|
|
141
|
+
return _mmdbInflight;
|
|
142
|
+
_mmdbInflight = (async () => {
|
|
143
|
+
try {
|
|
144
|
+
mkdirSync(dir, { recursive: true });
|
|
145
|
+
const zip = path.join(dir, "geoip-aio-all.mmdb.zip");
|
|
146
|
+
log(quiet, "geoip: downloading the geoip-all-in-one database (~52 MB, first run only)");
|
|
147
|
+
const res = await fetch(geoEndpoints().mmdb, { redirect: "follow" });
|
|
148
|
+
if (!res.ok || !res.body)
|
|
149
|
+
throw new Error(`HTTP ${res.status}`);
|
|
150
|
+
await pipeline(Readable.fromWeb(res.body), createWriteStream(zip));
|
|
151
|
+
const tmp = path.join(dir, ".extract");
|
|
152
|
+
rmSync(tmp, { recursive: true, force: true });
|
|
153
|
+
const archive = await unzipper.Open.file(zip);
|
|
154
|
+
await archive.extract({ path: tmp });
|
|
155
|
+
const found = findMmdb(tmp);
|
|
156
|
+
if (!found)
|
|
157
|
+
throw new Error("no .mmdb in archive");
|
|
158
|
+
rmSync(file, { force: true });
|
|
159
|
+
// move (rename across same dir)
|
|
160
|
+
const fs = await import("node:fs");
|
|
161
|
+
fs.renameSync(found, file);
|
|
162
|
+
rmSync(zip, { force: true });
|
|
163
|
+
rmSync(tmp, { recursive: true, force: true });
|
|
164
|
+
log(quiet, "geoip: database ready");
|
|
165
|
+
return file;
|
|
166
|
+
}
|
|
167
|
+
catch (e) {
|
|
168
|
+
log(quiet, `geoip: database fetch failed (${e.message}) — falling back to ip.ant0.link/json`);
|
|
169
|
+
return null;
|
|
170
|
+
}
|
|
171
|
+
finally {
|
|
172
|
+
_mmdbInflight = null;
|
|
173
|
+
}
|
|
174
|
+
})();
|
|
175
|
+
return _mmdbInflight;
|
|
176
|
+
}
|
|
177
|
+
function findMmdb(dir) {
|
|
178
|
+
const stack = [dir];
|
|
179
|
+
while (stack.length) {
|
|
180
|
+
const cur = stack.pop();
|
|
181
|
+
for (const e of readdirSync(cur, { withFileTypes: true })) {
|
|
182
|
+
const full = path.join(cur, e.name);
|
|
183
|
+
if (e.isDirectory())
|
|
184
|
+
stack.push(full);
|
|
185
|
+
else if (e.name.toLowerCase().endsWith(".mmdb"))
|
|
186
|
+
return full;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return null;
|
|
190
|
+
}
|
|
191
|
+
let _reader = null;
|
|
192
|
+
async function mmdbLookup(ip, quiet) {
|
|
193
|
+
const file = await ensureMmdb(quiet);
|
|
194
|
+
if (!file)
|
|
195
|
+
return null;
|
|
196
|
+
try {
|
|
197
|
+
if (!_reader)
|
|
198
|
+
_reader = await maxmind.open(file);
|
|
199
|
+
const rec = _reader.get(ip);
|
|
200
|
+
if (!rec)
|
|
201
|
+
return null;
|
|
202
|
+
const country = rec?.country?.iso_code;
|
|
203
|
+
const lat = rec?.location?.latitude;
|
|
204
|
+
const lon = rec?.location?.longitude;
|
|
205
|
+
const tz = rec?.location?.time_zone;
|
|
206
|
+
if (!tz && lat == null)
|
|
207
|
+
return null;
|
|
208
|
+
return {
|
|
209
|
+
ip,
|
|
210
|
+
country,
|
|
211
|
+
timezone: tz,
|
|
212
|
+
acceptLanguage: acceptLanguageForCountry(country),
|
|
213
|
+
location: lat != null && lon != null ? `${lat},${lon}` : undefined,
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
catch (e) {
|
|
217
|
+
log(quiet, `geoip: mmdb read failed (${e.message})`);
|
|
218
|
+
return null;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
/** Map an ip.ant0.link/json body to Geo; null when it carries no usable geo. */
|
|
222
|
+
export function geoFromEchoJson(j) {
|
|
223
|
+
if (!j || typeof j !== "object" || !j.ip)
|
|
224
|
+
return null;
|
|
225
|
+
const country = j.country ? String(j.country).toUpperCase() : undefined;
|
|
226
|
+
const timezone = j.timezone || undefined;
|
|
227
|
+
const hasLoc = typeof j.lat === "number" && typeof j.lon === "number";
|
|
228
|
+
if (!timezone && !hasLoc && !country)
|
|
229
|
+
return null;
|
|
230
|
+
return {
|
|
231
|
+
ip: j.ip,
|
|
232
|
+
country,
|
|
233
|
+
timezone,
|
|
234
|
+
acceptLanguage: acceptLanguageForCountry(country),
|
|
235
|
+
location: hasLoc ? `${j.lat},${j.lon}` : undefined,
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
// Fallback: ip.ant0.link/json returns geo directly (through the proxy), no local DB needed.
|
|
239
|
+
async function geoJsonFallback(proxy, quiet) {
|
|
240
|
+
try {
|
|
241
|
+
const txt = await httpGetText(geoEndpoints().geojson, proxy, 8000);
|
|
242
|
+
return geoFromEchoJson(JSON.parse(txt));
|
|
243
|
+
}
|
|
244
|
+
catch {
|
|
245
|
+
return null;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Resolve geo for the egress (through `proxy` if given, else direct). Never throws — returns null
|
|
250
|
+
* on failure. Uses the geoip-all-in-one offline DB first, ip.ant0.link/json as a fallback.
|
|
251
|
+
*/
|
|
252
|
+
export async function resolveGeo(proxy, opts = {}) {
|
|
253
|
+
if (isSocks(proxy)) {
|
|
254
|
+
log(opts.quiet, "geoip: SOCKS proxy can't be used for the geo lookup — set timezone/acceptLanguage explicitly. Skipping.");
|
|
255
|
+
return null;
|
|
256
|
+
}
|
|
257
|
+
const purl = proxyUrl(proxy);
|
|
258
|
+
const ip = await exitIp(purl, opts.quiet);
|
|
259
|
+
let geo = ip ? await mmdbLookup(ip, opts.quiet) : null;
|
|
260
|
+
if (!geo)
|
|
261
|
+
geo = await geoJsonFallback(purl, opts.quiet);
|
|
262
|
+
if (geo)
|
|
263
|
+
log(opts.quiet, `geoip: ${geo.ip} -> ${geo.country} tz=${geo.timezone} lang=${geo.acceptLanguage}`);
|
|
264
|
+
return geo;
|
|
265
|
+
}
|
|
266
|
+
// country (ISO-3166 alpha-2) -> Accept-Language. Plain comma list (NO ;q= weights — Chromium's
|
|
267
|
+
// --accept-lang adds those). The geoip DB has no language data, so this maps the resolved country.
|
|
268
|
+
const COUNTRY_LANG = {
|
|
269
|
+
US: "en-US,en", GB: "en-GB,en", CA: "en-CA,en,fr-CA", AU: "en-AU,en", NZ: "en-NZ,en",
|
|
270
|
+
IE: "en-IE,en", IN: "en-IN,en,hi", ZA: "en-ZA,en", SG: "en-SG,en",
|
|
271
|
+
DE: "de-DE,de,en", AT: "de-AT,de,en", CH: "de-CH,de,fr,en",
|
|
272
|
+
FR: "fr-FR,fr,en", BE: "nl-BE,nl,fr,en", NL: "nl-NL,nl,en",
|
|
273
|
+
ES: "es-ES,es,en", MX: "es-MX,es,en", AR: "es-AR,es,en", CL: "es-CL,es,en",
|
|
274
|
+
CO: "es-CO,es,en", PT: "pt-PT,pt,en", BR: "pt-BR,pt,en",
|
|
275
|
+
IT: "it-IT,it,en", PL: "pl-PL,pl,en", RU: "ru-RU,ru,en", UA: "uk-UA,uk,ru,en",
|
|
276
|
+
SE: "sv-SE,sv,en", NO: "nb-NO,no,en", DK: "da-DK,da,en", FI: "fi-FI,fi,en",
|
|
277
|
+
CZ: "cs-CZ,cs,en", RO: "ro-RO,ro,en", HU: "hu-HU,hu,en", GR: "el-GR,el,en",
|
|
278
|
+
TR: "tr-TR,tr,en", IL: "he-IL,he,en", SA: "ar-SA,ar,en", AE: "ar-AE,ar,en",
|
|
279
|
+
EG: "ar-EG,ar,en", JP: "ja-JP,ja,en", KR: "ko-KR,ko,en",
|
|
280
|
+
CN: "zh-CN,zh,en", HK: "zh-HK,zh,en", TW: "zh-TW,zh,en",
|
|
281
|
+
TH: "th-TH,th,en", VN: "vi-VN,vi,en", ID: "id-ID,id,en",
|
|
282
|
+
MY: "ms-MY,ms,en", PH: "en-PH,en,fil",
|
|
283
|
+
};
|
|
284
|
+
export function acceptLanguageForCountry(cc) {
|
|
285
|
+
if (!cc)
|
|
286
|
+
return "en-US,en";
|
|
287
|
+
return COUNTRY_LANG[cc.toUpperCase()] || "en-US,en";
|
|
288
|
+
}
|
|
289
|
+
//# sourceMappingURL=geoip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geoip.js","sourceRoot":"","sources":["../src/geoip.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,uFAAuF;AACvF,8FAA8F;AAC9F,kGAAkG;AAClG,gGAAgG;AAChG,kGAAkG;AAClG,sFAAsF;AACtF,EAAE;AACF,+DAA+D;AAC/D,oGAAoG;AACpG,oGAAoG;AACpG,+FAA+F;AAC/F,kFAAkF;AAClF,EAAE;AACF,gGAAgG;AAChG,wEAAwE;AACxE,oGAAoG;AACpG,6CAA6C;AAE7C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAClG,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,OAAwB,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAErC,MAAM,CAAC,MAAM,gBAAgB,GAAG,wEAAwE,CAAC;AACzG,MAAM,CAAC,MAAM,kBAAkB,GAAG,sBAAsB,CAAC;AACzD,MAAM,CAAC,MAAM,mBAAmB,GAAG,0BAA0B,CAAC;AAC9D,+FAA+F;AAC/F,MAAM,kBAAkB,GAAG,CAAC,sBAAsB,EAAE,sCAAsC,CAAC,CAAC;AAC5F,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAE7B,oGAAoG;AACpG,MAAM,UAAU,YAAY;IAC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