@mailwoman/registry 11.0.0 → 11.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 +21 -6
- package/data/manifests/artifacts.json +35 -0
- package/data/manifests/coverage.json +63 -0
- package/data/manifests/sources.lock.json +12 -0
- package/data/normalized/language-subtags.json +18518 -0
- package/docs/data-policy.md +5 -5
- package/docs/performance.md +1 -1
- package/docs/rgy1.md +5 -5
- package/lib/artifacts/bcp47/extlang.fixture.json +260 -0
- package/lib/artifacts/bcp47/extlang.ts +32 -0
- package/lib/artifacts/bcp47/grandfathered.fixture.json +28 -0
- package/lib/artifacts/bcp47/grandfathered.ts +32 -0
- package/lib/artifacts/bcp47/language.fixture.json +8278 -0
- package/lib/artifacts/bcp47/language.ts +32 -0
- package/lib/artifacts/bcp47/redundant.fixture.json +69 -0
- package/lib/artifacts/bcp47/redundant.ts +32 -0
- package/lib/artifacts/bcp47/region.fixture.json +307 -0
- package/lib/artifacts/bcp47/region.ts +32 -0
- package/lib/artifacts/bcp47/script.fixture.json +227 -0
- package/lib/artifacts/bcp47/script.ts +32 -0
- package/lib/artifacts/bcp47/variant.fixture.json +141 -0
- package/lib/artifacts/bcp47/variant.ts +32 -0
- package/lib/artifacts/country-airport-collision.ts +7 -5
- package/lib/artifacts/iata-airport/membership.ts +7 -5
- package/lib/artifacts/iata-airport/records.ts +7 -5
- package/lib/artifacts/iso3166-1/alpha2-membership.ts +7 -5
- package/lib/artifacts/iso3166-1/alpha3-membership.ts +7 -5
- package/lib/artifacts/iso3166-1/records.ts +7 -5
- package/lib/bcp47/subtag-index.ts +65 -0
- package/lib/bcp47/tag.ts +301 -0
- package/lib/errors.ts +22 -9
- package/lib/iata/airports/records.ts +3 -4
- package/lib/iata/airports/validate.ts +6 -5
- package/lib/index.ts +18 -8
- package/lib/inspect.ts +5 -5
- package/lib/iso15924/codes.ts +169 -0
- package/lib/iso15924/unicode-script.ts +124 -0
- package/lib/iso3166/alpha2.ts +5 -5
- package/lib/iso3166/alpha3.ts +6 -6
- package/lib/iso3166/records.ts +9 -8
- package/lib/iso3166/relations.ts +5 -5
- package/lib/iso639/languages.ts +88 -0
- package/lib/key.ts +9 -7
- package/lib/normalize.ts +12 -8
- package/lib/overlap/country-airport.ts +14 -12
- package/lib/rgy1/base64.ts +3 -4
- package/lib/rgy1/reader.ts +8 -7
- package/lib/rgy1/sections.generated.ts +6 -5
- package/lib/rgy1/views.ts +5 -6
- package/lib/types.ts +66 -7
- package/lib/wasm.ts +11 -9
- package/out/artifacts/bcp47/extlang.d.ts +21 -0
- package/out/artifacts/bcp47/extlang.d.ts.map +1 -0
- package/out/artifacts/bcp47/extlang.fixture.json +260 -0
- package/out/artifacts/bcp47/extlang.js +17 -0
- package/out/artifacts/bcp47/extlang.js.map +1 -0
- package/out/artifacts/bcp47/grandfathered.d.ts +21 -0
- package/out/artifacts/bcp47/grandfathered.d.ts.map +1 -0
- package/out/artifacts/bcp47/grandfathered.fixture.json +28 -0
- package/out/artifacts/bcp47/grandfathered.js +17 -0
- package/out/artifacts/bcp47/grandfathered.js.map +1 -0
- package/out/artifacts/bcp47/language.d.ts +21 -0
- package/out/artifacts/bcp47/language.d.ts.map +1 -0
- package/out/artifacts/bcp47/language.fixture.json +8278 -0
- package/out/artifacts/bcp47/language.js +17 -0
- package/out/artifacts/bcp47/language.js.map +1 -0
- package/out/artifacts/bcp47/redundant.d.ts +21 -0
- package/out/artifacts/bcp47/redundant.d.ts.map +1 -0
- package/out/artifacts/bcp47/redundant.fixture.json +69 -0
- package/out/artifacts/bcp47/redundant.js +17 -0
- package/out/artifacts/bcp47/redundant.js.map +1 -0
- package/out/artifacts/bcp47/region.d.ts +21 -0
- package/out/artifacts/bcp47/region.d.ts.map +1 -0
- package/out/artifacts/bcp47/region.fixture.json +307 -0
- package/out/artifacts/bcp47/region.js +17 -0
- package/out/artifacts/bcp47/region.js.map +1 -0
- package/out/artifacts/bcp47/script.d.ts +21 -0
- package/out/artifacts/bcp47/script.d.ts.map +1 -0
- package/out/artifacts/bcp47/script.fixture.json +227 -0
- package/out/artifacts/bcp47/script.js +17 -0
- package/out/artifacts/bcp47/script.js.map +1 -0
- package/out/artifacts/bcp47/variant.d.ts +21 -0
- package/out/artifacts/bcp47/variant.d.ts.map +1 -0
- package/out/artifacts/bcp47/variant.fixture.json +141 -0
- package/out/artifacts/bcp47/variant.js +17 -0
- package/out/artifacts/bcp47/variant.js.map +1 -0
- package/out/artifacts/country-airport-collision.d.ts +0 -8
- package/out/artifacts/country-airport-collision.d.ts.map +1 -1
- package/out/artifacts/country-airport-collision.js +6 -5
- package/out/artifacts/country-airport-collision.js.map +1 -1
- package/out/artifacts/iata-airport/membership.d.ts +0 -8
- package/out/artifacts/iata-airport/membership.d.ts.map +1 -1
- package/out/artifacts/iata-airport/membership.js +6 -5
- package/out/artifacts/iata-airport/membership.js.map +1 -1
- package/out/artifacts/iata-airport/records.d.ts +0 -8
- package/out/artifacts/iata-airport/records.d.ts.map +1 -1
- package/out/artifacts/iata-airport/records.js +6 -5
- package/out/artifacts/iata-airport/records.js.map +1 -1
- package/out/artifacts/iso3166-1/alpha2-membership.d.ts +0 -8
- package/out/artifacts/iso3166-1/alpha2-membership.d.ts.map +1 -1
- package/out/artifacts/iso3166-1/alpha2-membership.js +6 -5
- package/out/artifacts/iso3166-1/alpha2-membership.js.map +1 -1
- package/out/artifacts/iso3166-1/alpha3-membership.d.ts +0 -8
- package/out/artifacts/iso3166-1/alpha3-membership.d.ts.map +1 -1
- package/out/artifacts/iso3166-1/alpha3-membership.js +6 -5
- package/out/artifacts/iso3166-1/alpha3-membership.js.map +1 -1
- package/out/artifacts/iso3166-1/records.d.ts +0 -8
- package/out/artifacts/iso3166-1/records.d.ts.map +1 -1
- package/out/artifacts/iso3166-1/records.js +6 -5
- package/out/artifacts/iso3166-1/records.js.map +1 -1
- package/out/bcp47/subtag-index.d.ts +22 -0
- package/out/bcp47/subtag-index.d.ts.map +1 -0
- package/out/bcp47/subtag-index.js +43 -0
- package/out/bcp47/subtag-index.js.map +1 -0
- package/out/bcp47/tag.d.ts +47 -0
- package/out/bcp47/tag.d.ts.map +1 -0
- package/out/bcp47/tag.js +218 -0
- package/out/bcp47/tag.js.map +1 -0
- package/out/errors.d.ts +12 -8
- package/out/errors.d.ts.map +1 -1
- package/out/errors.js +10 -8
- package/out/errors.js.map +1 -1
- package/out/iata/airports/records.d.ts +0 -7
- package/out/iata/airports/records.d.ts.map +1 -1
- package/out/iata/airports/records.js +2 -4
- package/out/iata/airports/records.js.map +1 -1
- package/out/iata/airports/validate.d.ts +0 -8
- package/out/iata/airports/validate.d.ts.map +1 -1
- package/out/iata/airports/validate.js +5 -5
- package/out/iata/airports/validate.js.map +1 -1
- package/out/index.d.ts +13 -8
- package/out/index.d.ts.map +1 -1
- package/out/index.js +6 -12
- package/out/index.js.map +1 -1
- package/out/inspect.d.ts +2 -5
- package/out/inspect.d.ts.map +1 -1
- package/out/inspect.js +4 -5
- package/out/inspect.js.map +1 -1
- package/out/iso15924/codes.d.ts +57 -0
- package/out/iso15924/codes.d.ts.map +1 -0
- package/out/iso15924/codes.js +133 -0
- package/out/iso15924/codes.js.map +1 -0
- package/out/iso15924/unicode-script.d.ts +10 -0
- package/out/iso15924/unicode-script.d.ts.map +1 -0
- package/out/iso15924/unicode-script.js +103 -0
- package/out/iso15924/unicode-script.js.map +1 -0
- package/out/iso3166/alpha2.d.ts +0 -8
- package/out/iso3166/alpha2.d.ts.map +1 -1
- package/out/iso3166/alpha2.js +4 -5
- package/out/iso3166/alpha2.js.map +1 -1
- package/out/iso3166/alpha3.d.ts +1 -9
- package/out/iso3166/alpha3.d.ts.map +1 -1
- package/out/iso3166/alpha3.js +5 -6
- package/out/iso3166/alpha3.js.map +1 -1
- package/out/iso3166/records.d.ts +0 -11
- package/out/iso3166/records.d.ts.map +1 -1
- package/out/iso3166/records.js +8 -8
- package/out/iso3166/records.js.map +1 -1
- package/out/iso3166/relations.d.ts +0 -7
- package/out/iso3166/relations.d.ts.map +1 -1
- package/out/iso3166/relations.js +4 -5
- package/out/iso3166/relations.js.map +1 -1
- package/out/iso639/languages.d.ts +40 -0
- package/out/iso639/languages.d.ts.map +1 -0
- package/out/iso639/languages.js +54 -0
- package/out/iso639/languages.js.map +1 -0
- package/out/key.d.ts +6 -7
- package/out/key.d.ts.map +1 -1
- package/out/key.js +8 -7
- package/out/key.js.map +1 -1
- package/out/normalize.d.ts +9 -8
- package/out/normalize.d.ts.map +1 -1
- package/out/normalize.js +2 -12
- package/out/normalize.js.map +1 -1
- package/out/overlap/country-airport.d.ts +2 -16
- package/out/overlap/country-airport.d.ts.map +1 -1
- package/out/overlap/country-airport.js +13 -12
- package/out/overlap/country-airport.js.map +1 -1
- package/out/rgy1/base64.d.ts +0 -4
- package/out/rgy1/base64.d.ts.map +1 -1
- package/out/rgy1/base64.js +2 -4
- package/out/rgy1/base64.js.map +1 -1
- package/out/rgy1/reader.d.ts +0 -11
- package/out/rgy1/reader.d.ts.map +1 -1
- package/out/rgy1/reader.js +7 -7
- package/out/rgy1/reader.js.map +1 -1
- package/out/rgy1/sections.generated.d.ts +3 -5
- package/out/rgy1/sections.generated.d.ts.map +1 -1
- package/out/rgy1/sections.generated.js +5 -5
- package/out/rgy1/sections.generated.js.map +1 -1
- package/out/rgy1/views.d.ts +2 -9
- package/out/rgy1/views.d.ts.map +1 -1
- package/out/rgy1/views.js +4 -6
- package/out/rgy1/views.js.map +1 -1
- package/out/sdk/fetch.d.ts +6 -6
- package/out/sdk/fetch.d.ts.map +1 -1
- package/out/sdk/fetch.js +23 -11
- package/out/sdk/fetch.js.map +1 -1
- package/out/sdk/fetch.run.d.ts +0 -12
- package/out/sdk/fetch.run.d.ts.map +1 -1
- package/out/sdk/fetch.run.js +22 -9
- package/out/sdk/fetch.run.js.map +1 -1
- package/out/sdk/sources.d.ts +7 -16
- package/out/sdk/sources.d.ts.map +1 -1
- package/out/sdk/sources.js +34 -14
- package/out/sdk/sources.js.map +1 -1
- package/out/tools/artifact-path.d.ts +0 -5
- package/out/tools/artifact-path.d.ts.map +1 -1
- package/out/tools/artifact-path.js +2 -5
- package/out/tools/artifact-path.js.map +1 -1
- package/out/tools/bench.run.d.ts +0 -17
- package/out/tools/bench.run.d.ts.map +1 -1
- package/out/tools/bench.run.js +13 -10
- package/out/tools/bench.run.js.map +1 -1
- package/out/tools/build-wasm.run.d.ts +0 -16
- package/out/tools/build-wasm.run.d.ts.map +1 -1
- package/out/tools/build-wasm.run.js +8 -10
- package/out/tools/build-wasm.run.js.map +1 -1
- package/out/tools/generate-sections.run.d.ts +0 -11
- package/out/tools/generate-sections.run.d.ts.map +1 -1
- package/out/tools/generate-sections.run.js +5 -14
- package/out/tools/generate-sections.run.js.map +1 -1
- package/out/tools/generate.run.d.ts +0 -16
- package/out/tools/generate.run.d.ts.map +1 -1
- package/out/tools/generate.run.js +61 -17
- package/out/tools/generate.run.js.map +1 -1
- package/out/tools/language-subtags.d.ts +59 -0
- package/out/tools/language-subtags.d.ts.map +1 -0
- package/out/tools/language-subtags.js +145 -0
- package/out/tools/language-subtags.js.map +1 -0
- package/out/tools/normalize.d.ts +4 -14
- package/out/tools/normalize.d.ts.map +1 -1
- package/out/tools/normalize.js +14 -14
- package/out/tools/normalize.js.map +1 -1
- package/out/tools/normalize.run.d.ts +0 -12
- package/out/tools/normalize.run.d.ts.map +1 -1
- package/out/tools/normalize.run.js +24 -7
- package/out/tools/normalize.run.js.map +1 -1
- package/out/types.d.ts +62 -7
- package/out/types.d.ts.map +1 -1
- package/out/types.js +12 -9
- package/out/types.js.map +1 -1
- package/out/wasm.d.ts +0 -13
- package/out/wasm.d.ts.map +1 -1
- package/out/wasm.js +10 -9
- package/out/wasm.js.map +1 -1
- package/package.json +12 -4
- package/sdk/fetch.run.ts +25 -9
- package/sdk/fetch.ts +32 -12
- package/sdk/sources.ts +36 -14
- package/tools/artifact-path.ts +2 -5
- package/tools/bench.run.ts +19 -10
- package/tools/build-wasm.run.ts +9 -10
- package/tools/generate-sections.run.ts +6 -14
- package/tools/generate.run.ts +68 -17
- package/tools/language-subtags.ts +195 -0
- package/tools/normalize.run.ts +28 -7
- package/tools/normalize.ts +16 -15
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The ISO 15924 script of a code point, from the Unicode Script property of the runtime.
|
|
6
|
+
*
|
|
7
|
+
* The answer is the registry's own code: `Latn`, `Grek`, `Hani`, `Deva`.
|
|
8
|
+
* `Zyyy` marks a Common code point (digits and punctuation), `Zinh` an Inherited one
|
|
9
|
+
* (a combining mark), and `Zzzz` a code point that has no script in the runtime's Unicode version.
|
|
10
|
+
*
|
|
11
|
+
* # The Unicode version is the runtime's
|
|
12
|
+
*
|
|
13
|
+
* The tables are the regular-expression engine's `\p{Script=…}` classes, so they add no byte to a bundle.
|
|
14
|
+
* The answer for a code point that a later Unicode version assigned depends on
|
|
15
|
+
* the runtime that runs the call: a Worker, a browser and Node can report `Zzzz`
|
|
16
|
+
* for a script that a newer one reports by name.
|
|
17
|
+
*
|
|
18
|
+
* The test of this module pins the answers for a fixed list of code points.
|
|
19
|
+
*
|
|
20
|
+
* The candidates are the registry's script codes that the runtime's regular-expression
|
|
21
|
+
* engine also names as a Script value, so the set follows both tables.
|
|
22
|
+
* A code point of a Unicode script that the registry omits reports `Zzzz`.
|
|
23
|
+
*
|
|
24
|
+
* The lookup costs one array read for ASCII, and one cached read for a code point seen before.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
import { scriptSubtagRows } from "#artifacts/bcp47/script"
|
|
28
|
+
import type { BCP47 } from "#types"
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The scripts tried first, because most addresses are written in them.
|
|
32
|
+
* The rest follow in the registry's order.
|
|
33
|
+
*/
|
|
34
|
+
const COMMON_FIRST = [
|
|
35
|
+
"Zyyy",
|
|
36
|
+
"Zinh",
|
|
37
|
+
"Latn",
|
|
38
|
+
"Hani",
|
|
39
|
+
"Cyrl",
|
|
40
|
+
"Arab",
|
|
41
|
+
"Hang",
|
|
42
|
+
"Hira",
|
|
43
|
+
"Kana",
|
|
44
|
+
"Grek",
|
|
45
|
+
"Deva",
|
|
46
|
+
"Thai",
|
|
47
|
+
"Hebr",
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The most code points the cache holds before it starts again.
|
|
52
|
+
*/
|
|
53
|
+
const CACHE_LIMIT = 65_536
|
|
54
|
+
|
|
55
|
+
let matcher: { readonly pattern: RegExp; readonly codes: readonly BCP47.ScriptCode[] } | null = null
|
|
56
|
+
|
|
57
|
+
const cache = new Map<number, BCP47.ScriptCode>()
|
|
58
|
+
|
|
59
|
+
function isScriptValue(code: string): boolean {
|
|
60
|
+
try {
|
|
61
|
+
new RegExp(`\\p{Script=${code}}`, "u")
|
|
62
|
+
|
|
63
|
+
return true
|
|
64
|
+
} catch {
|
|
65
|
+
return false
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function build(): NonNullable<typeof matcher> {
|
|
70
|
+
const known = scriptSubtagRows()
|
|
71
|
+
.map((row) => row.subtag)
|
|
72
|
+
.filter((code) => /^[A-Z][a-z]{3}$/.test(code) && isScriptValue(code))
|
|
73
|
+
|
|
74
|
+
const present = new Set(known)
|
|
75
|
+
const first = COMMON_FIRST.filter((code) => present.has(code))
|
|
76
|
+
const codes = [...first, ...known.filter((code) => !first.includes(code))] as BCP47.ScriptCode[]
|
|
77
|
+
|
|
78
|
+
// Each script is one capture group, so one `exec` reports which group matched.
|
|
79
|
+
const pattern = new RegExp(codes.map((code) => `(\\p{Script=${code}})`).join("|"), "u")
|
|
80
|
+
|
|
81
|
+
return { pattern, codes }
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The ISO 15924 script of a code point.
|
|
86
|
+
*
|
|
87
|
+
* @param codePoint A Unicode scalar value, from 0 to 0x10FFFF.
|
|
88
|
+
* @returns `Zyyy` for Common, `Zinh` for Inherited, and `Zzzz` when the runtime
|
|
89
|
+
* assigns the code point no registry script.
|
|
90
|
+
*/
|
|
91
|
+
export function codePointScript(codePoint: number): BCP47.ScriptCode {
|
|
92
|
+
if (codePoint < 0x80) {
|
|
93
|
+
const lower = codePoint | 0x20
|
|
94
|
+
|
|
95
|
+
return (lower >= 0x61 && lower <= 0x7a ? "Latn" : "Zyyy") as BCP47.ScriptCode
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const cached = cache.get(codePoint)
|
|
99
|
+
|
|
100
|
+
if (cached) return cached
|
|
101
|
+
|
|
102
|
+
matcher ??= build()
|
|
103
|
+
|
|
104
|
+
const found = matcher.pattern.exec(String.fromCodePoint(codePoint))
|
|
105
|
+
let script: BCP47.ScriptCode = "Zzzz" as BCP47.ScriptCode
|
|
106
|
+
|
|
107
|
+
if (found) {
|
|
108
|
+
for (let group = 1; group < found.length; group++) {
|
|
109
|
+
if (found[group] !== undefined) {
|
|
110
|
+
script = matcher.codes[group - 1]!
|
|
111
|
+
|
|
112
|
+
break
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (cache.size >= CACHE_LIMIT) {
|
|
118
|
+
cache.clear()
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
cache.set(codePoint, script)
|
|
122
|
+
|
|
123
|
+
return script
|
|
124
|
+
}
|
package/lib/iso3166/alpha2.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
+
* The strict alpha-2 country-code predicate over the `iso3166-1-alpha2-membership` bitset.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
* that 85-byte bitset and the reader, and no name, airport or record.
|
|
7
|
+
* An import of it retains that 85-byte bitset and the reader, and no name, airport or record.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { iso31661Alpha2MembershipArtifact } from "#artifacts/iso3166-1/alpha2-membership"
|
package/lib/iso3166/alpha3.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
+
* The strict alpha-3 country-code predicate over the `iso3166-1-alpha3-membership` bitset.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
* that 2,197-byte bitset and the reader, and no name, airport or record.
|
|
7
|
+
* An import of it retains that 2,197-byte bitset and the reader, and no name, airport or record.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { iso31661Alpha3MembershipArtifact } from "#artifacts/iso3166-1/alpha3-membership"
|
|
@@ -31,7 +31,7 @@ export function alpha3Membership(): BitsetView {
|
|
|
31
31
|
* `AUS` is one.
|
|
32
32
|
* `aus` and `AU` are not.
|
|
33
33
|
*
|
|
34
|
-
* A former code such as `DDR`
|
|
34
|
+
* A former code such as `DDR` isn't: the records artifact still describes it.
|
|
35
35
|
*/
|
|
36
36
|
export function isCountryCodeAlpha3(input: string): input is ISO.CountryCode_3166_1_Alpha3 {
|
|
37
37
|
return alpha3Membership().test(encode3(input))
|
package/lib/iso3166/records.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* Country record retrieval over the `iso3166-1-records` artifact: three id tables, six columns and a string pool.
|
|
5
|
+
* Country record retrieval over the `iso3166-1-records` artifact: three id tables,
|
|
6
|
+
* six columns and a string pool.
|
|
7
7
|
*
|
|
8
|
-
* A record is materialized on request and cached by row, so a repeated read
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* A record is materialized on request and cached by row, so a repeated read
|
|
9
|
+
* of one country returns one object.
|
|
10
|
+
* The artifact holds every status; `getCountry*` answers a record of any status and reports it,
|
|
11
|
+
* while the brands and the membership predicates cover officially assigned codes only.
|
|
11
12
|
*/
|
|
12
13
|
|
|
13
14
|
import { iso31661RecordsArtifact } from "#artifacts/iso3166-1/records"
|
package/lib/iso3166/relations.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* The code-equivalence relations of one country entity: alpha-2, alpha-3 and numeric codes of the same record.
|
|
5
|
+
* The code-equivalence relations of one country entity: alpha-2, alpha-3
|
|
6
|
+
* and numeric codes of the same record.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { getCountryByAlpha2, getCountryByAlpha3, getCountryByNumeric } from "#iso3166/records"
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* ISO 639 language subtags, read from the language subtags of the IANA Language Subtag Registry.
|
|
6
|
+
*
|
|
7
|
+
* The registry holds one subtag per language: the ISO 639-1 two-letter code
|
|
8
|
+
* where one exists, and otherwise the ISO 639-2, 639-3 or 639-5 three-letter code.
|
|
9
|
+
* Japanese is `ja` and never `jpn`; Cantonese is `yue`.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { languageSubtagRows } from "#artifacts/bcp47/language"
|
|
13
|
+
import { lazySubtagIndex } from "#bcp47/subtag-index"
|
|
14
|
+
import { type Parsed, ParseFailure } from "#errors"
|
|
15
|
+
import type { BCP47 } from "#types"
|
|
16
|
+
|
|
17
|
+
const index = lazySubtagIndex(languageSubtagRows)
|
|
18
|
+
|
|
19
|
+
const CANONICAL = /^[a-z]{2,3}$/
|
|
20
|
+
const LETTERS = /^[A-Za-z]{2,3}$/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* One language as the registry describes it.
|
|
24
|
+
*/
|
|
25
|
+
export interface LanguageRecord {
|
|
26
|
+
subtag: BCP47.LanguageSubtag
|
|
27
|
+
/**
|
|
28
|
+
* The registry's first description, such as `Japanese`.
|
|
29
|
+
*/
|
|
30
|
+
name: string
|
|
31
|
+
descriptions: readonly string[]
|
|
32
|
+
/**
|
|
33
|
+
* The script a tag for this language leaves implied, such as `Jpan` for `ja`, or `null`.
|
|
34
|
+
*/
|
|
35
|
+
suppressScript: string | null
|
|
36
|
+
/**
|
|
37
|
+
* The macrolanguage this language is a member of, such as `zh` for `yue`, or `null`.
|
|
38
|
+
*/
|
|
39
|
+
macrolanguage: string | null
|
|
40
|
+
/**
|
|
41
|
+
* `macrolanguage`, `collection`, `special` or `private-use`, or `null` for an individual language.
|
|
42
|
+
*/
|
|
43
|
+
scope: string | null
|
|
44
|
+
deprecated: string | null
|
|
45
|
+
preferredValue: string | null
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Whether `input` is a language subtag the registry holds, in lowercase.
|
|
50
|
+
*/
|
|
51
|
+
export function isLanguageSubtag(input: string): input is BCP47.LanguageSubtag {
|
|
52
|
+
return CANONICAL.test(input) && index().get(input) !== null
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The branded language subtag, or the reason the input was refused.
|
|
57
|
+
*/
|
|
58
|
+
export function parseLanguageSubtag(input: string): Parsed<BCP47.LanguageSubtag> {
|
|
59
|
+
if (!LETTERS.test(input)) return { ok: false, reason: ParseFailure.Shape, input }
|
|
60
|
+
|
|
61
|
+
if (!CANONICAL.test(input)) return { ok: false, reason: ParseFailure.Case, input }
|
|
62
|
+
|
|
63
|
+
if (!isLanguageSubtag(input)) return { ok: false, reason: ParseFailure.NotFound, input }
|
|
64
|
+
|
|
65
|
+
return { ok: true, value: input }
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The record of a lowercase language subtag, or `null`.
|
|
70
|
+
*/
|
|
71
|
+
export function getLanguage(subtag: string): LanguageRecord | null {
|
|
72
|
+
if (!CANONICAL.test(subtag)) return null
|
|
73
|
+
|
|
74
|
+
const row = index().get(subtag)
|
|
75
|
+
|
|
76
|
+
if (!row) return null
|
|
77
|
+
|
|
78
|
+
return {
|
|
79
|
+
subtag: subtag as BCP47.LanguageSubtag,
|
|
80
|
+
name: row.descriptions[0] ?? subtag,
|
|
81
|
+
descriptions: row.descriptions,
|
|
82
|
+
suppressScript: row.suppressScript ?? null,
|
|
83
|
+
macrolanguage: row.macrolanguage ?? null,
|
|
84
|
+
scope: row.scope ?? null,
|
|
85
|
+
deprecated: row.deprecated ?? null,
|
|
86
|
+
preferredValue: row.preferredValue ?? null,
|
|
87
|
+
}
|
|
88
|
+
}
|
package/lib/key.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
+
* Key encodings: the position of a code in its direct-address key space,
|
|
6
|
+
* mirroring `crates/registry-core/src/key.rs`.
|
|
5
7
|
*
|
|
6
|
-
*
|
|
8
|
+
* Two or three upper-case ASCII letters encode base-26 with the first letter in the highest place.
|
|
9
|
+
* A three-digit numeric code encodes as its decimal value.
|
|
7
10
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* anything else. A caller normalizes case or whitespace before calling, never here.
|
|
11
|
+
* Every encoder checks length and alphabet first and answers `-1` for anything else.
|
|
12
|
+
* A caller normalizes case or whitespace before calling, never here.
|
|
11
13
|
*/
|
|
12
14
|
|
|
13
15
|
/**
|
package/lib/normalize.ts
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
5
|
* Explicit input normalization, separate from the strict predicates.
|
|
7
6
|
*
|
|
8
|
-
* `canonicalSpelling` trims ASCII whitespace and upper-cases ASCII letters.
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
7
|
+
* `canonicalSpelling` trims ASCII whitespace and upper-cases ASCII letters.
|
|
8
|
+
* It reports each change.
|
|
9
|
+
*
|
|
10
|
+
* A caller who wants `" aus "` to reach `AUS` asks for that step.
|
|
11
|
+
* Every other character stays as written.
|
|
12
|
+
*
|
|
13
|
+
* A dot, a dash or a non-ASCII letter reaches the strict predicate unchanged
|
|
14
|
+
* and is refused there with `shape`.
|
|
15
|
+
* Free-text tokenization belongs to Mailwoman, outside this package.
|
|
12
16
|
*/
|
|
13
17
|
|
|
14
18
|
/**
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
+
* The country/airport collision index: codes that are both an officially assigned
|
|
6
|
+
* ISO 3166-1 alpha-3 code and an IATA airport code in the profile.
|
|
5
7
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
+
* `isCountryAirportCollision` reads only the 2,197-byte collision bitset.
|
|
9
|
+
* `interpretCountryOrAirportCode` reads the records artifacts and answers every
|
|
10
|
+
* interpretation as a discriminated union, each branch with its own brand and entity,
|
|
11
|
+
* so `AUS` is Australia under one namespace and an airport in the United States under another.
|
|
8
12
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* relations are separate: `same-spelling-as` is the collision, `located-in` is each branch's `country`. The caller
|
|
13
|
-
* ranks the interpretations, and the resolver in Mailwoman does it.
|
|
13
|
+
* The two relations are separate: `same-spelling-as` is the collision,
|
|
14
|
+
* `located-in` is each branch's `country`.
|
|
15
|
+
* The caller ranks the interpretations, and the resolver in Mailwoman does it.
|
|
14
16
|
*/
|
|
15
17
|
|
|
16
18
|
import { countryAirportCollisionArtifact } from "#artifacts/country-airport-collision"
|
|
@@ -69,9 +71,9 @@ export type CodeMatch =
|
|
|
69
71
|
/**
|
|
70
72
|
* Every namespace that holds the spelling, in namespace order: country first, then airport.
|
|
71
73
|
*
|
|
72
|
-
* The order is the namespace list's and
|
|
74
|
+
* The order is the namespace list's and isn't a ranking.
|
|
73
75
|
* An empty array is `not-found-in-snapshot` in every namespace, and a former country code
|
|
74
|
-
*
|
|
76
|
+
* isn't an interpretation here because the current-assignment brand leaves it out.
|
|
75
77
|
*/
|
|
76
78
|
export function interpretCountryOrAirportCode(input: string): CodeMatch[] {
|
|
77
79
|
const matches: CodeMatch[] = []
|
package/lib/rgy1/base64.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
5
|
* Decodes a generated artifact module's base64 text into bytes, on the platforms the readers run on.
|
|
7
6
|
*/
|
|
8
7
|
|
package/lib/rgy1/reader.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
5
|
* The synchronous RGY1 reader: validate an artifact once, then probe its tables in place.
|
|
7
6
|
*
|
|
8
|
-
* The reader mirrors `crates/registry-core/src/artifact.rs` and follows `docs/rgy1.md`.
|
|
9
|
-
* `DataView` over the caller's bytes, honoring `byteOffset`, so an
|
|
10
|
-
*
|
|
7
|
+
* The reader mirrors `crates/registry-core/src/artifact.rs` and follows `docs/rgy1.md`.
|
|
8
|
+
* It reads through a `DataView` over the caller's bytes, honoring `byteOffset`, so an
|
|
9
|
+
* artifact handed over as a subarray behaves as the same bytes would in their own buffer.
|
|
10
|
+
*
|
|
11
|
+
* No `Map` is rebuilt: a probe is an arithmetic index into the section's payload.
|
|
11
12
|
*/
|
|
12
13
|
|
|
13
14
|
import {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
+
* The RGY1 section kinds.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
* definition rather than this file.
|
|
7
|
+
* Generated from definitions/sections.json by tools/generate-sections.run.ts.
|
|
8
|
+
* Edit the definition rather than this file.
|
|
8
9
|
*/
|
|
9
10
|
|
|
10
11
|
/**
|
package/lib/rgy1/views.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
5
|
* Typed views over an artifact's sections: bitset, id table, column, string pool and relation.
|
|
7
6
|
*/
|
|
8
7
|
|
|
@@ -33,7 +32,7 @@ export class BitsetView {
|
|
|
33
32
|
|
|
34
33
|
/**
|
|
35
34
|
* Whether `key` is a member.
|
|
36
|
-
* A key outside the space
|
|
35
|
+
* A key outside the space isn't.
|
|
37
36
|
*/
|
|
38
37
|
test(key: number): boolean {
|
|
39
38
|
if (key < 0) return false
|
|
@@ -45,7 +44,7 @@ export class BitsetView {
|
|
|
45
44
|
|
|
46
45
|
/**
|
|
47
46
|
* Whether a code in its canonical spelling is a member.
|
|
48
|
-
* A code outside the grammar
|
|
47
|
+
* A code outside the grammar isn't.
|
|
49
48
|
*/
|
|
50
49
|
contains(code: string): boolean {
|
|
51
50
|
return this.test(encodeForArity(this.arity, code))
|
package/lib/types.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
+
* Branded identifier types.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
7
|
+
* A brand is a declaration-only unique symbol, so a branded value is a plain string at runtime
|
|
8
|
+
* and the compiler refuses to pass one namespace's code where another's is expected.
|
|
8
9
|
*
|
|
9
|
-
* A branded value records that a validator accepted it under a documented profile at the time of the call.
|
|
10
|
-
* issuing authority's later assignments are outside what the brand records.
|
|
10
|
+
* A branded value records that a validator accepted it under a documented profile at the time of the call.
|
|
11
|
+
* The issuing authority's later assignments are outside what the brand records.
|
|
11
12
|
*/
|
|
12
13
|
|
|
13
14
|
/**
|
|
@@ -69,6 +70,64 @@ export declare namespace ICAO {
|
|
|
69
70
|
type LocationIndicator = string & { readonly [$LocationIndicator]: true }
|
|
70
71
|
}
|
|
71
72
|
|
|
73
|
+
/**
|
|
74
|
+
* BCP 47 namespaces, read from the IANA Language Subtag Registry.
|
|
75
|
+
*/
|
|
76
|
+
export declare namespace BCP47 {
|
|
77
|
+
const $LanguageTag: unique symbol
|
|
78
|
+
const $ScriptCode: unique symbol
|
|
79
|
+
const $LanguageSubtag: unique symbol
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* A well-formed, valid BCP 47 tag in canonical form, such as `ja-Jpan-JP` or `en-GB`.
|
|
83
|
+
*/
|
|
84
|
+
type LanguageTag = string & { readonly [$LanguageTag]: true }
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* An ISO 15924 script code the registry holds, in its canonical title case, such as `Latn` or `Jpan`.
|
|
88
|
+
*/
|
|
89
|
+
type ScriptCode = string & { readonly [$ScriptCode]: true }
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* An ISO 639 language subtag the registry holds, in lowercase, such as `ja` or `yue`.
|
|
93
|
+
*/
|
|
94
|
+
type LanguageSubtag = string & { readonly [$LanguageSubtag]: true }
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The subtag types the IANA Language Subtag Registry defines.
|
|
99
|
+
*/
|
|
100
|
+
export const SubtagType = {
|
|
101
|
+
Language: "language",
|
|
102
|
+
Extlang: "extlang",
|
|
103
|
+
Script: "script",
|
|
104
|
+
Region: "region",
|
|
105
|
+
Variant: "variant",
|
|
106
|
+
Grandfathered: "grandfathered",
|
|
107
|
+
Redundant: "redundant",
|
|
108
|
+
} as const
|
|
109
|
+
|
|
110
|
+
export type SubtagType = (typeof SubtagType)[keyof typeof SubtagType]
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* One registry record as a table module holds it.
|
|
114
|
+
*
|
|
115
|
+
* `subtag` holds the subtag for the five subtag types and the whole tag for `grandfathered` and `redundant`.
|
|
116
|
+
* A private-use range keeps its range spelling, such as `qaa..qtz`.
|
|
117
|
+
*
|
|
118
|
+
* Each table holds one subtag type, so a row leaves its type out.
|
|
119
|
+
*/
|
|
120
|
+
export interface SubtagRow {
|
|
121
|
+
subtag: string
|
|
122
|
+
descriptions: string[]
|
|
123
|
+
deprecated?: string
|
|
124
|
+
preferredValue?: string
|
|
125
|
+
suppressScript?: string
|
|
126
|
+
macrolanguage?: string
|
|
127
|
+
scope?: string
|
|
128
|
+
prefixes?: string[]
|
|
129
|
+
}
|
|
130
|
+
|
|
72
131
|
/**
|
|
73
132
|
* The status a country record holds.
|
|
74
133
|
*/
|
package/lib/wasm.ts
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
5
|
* The WebAssembly batch adapter over `crates/registry-wasm`.
|
|
7
6
|
*
|
|
8
|
-
* Initialization is explicit: the caller passes the module's bytes or a compiled `WebAssembly.Module`,
|
|
9
|
-
* module compiles the module inside `createRegistry` and at no other time.
|
|
10
|
-
* binaries for a caller that loads them itself,
|
|
11
|
-
*
|
|
12
|
-
*
|
|
7
|
+
* Initialization is explicit: the caller passes the module's bytes or a compiled `WebAssembly.Module`,
|
|
8
|
+
* and this module compiles the module inside `createRegistry` and at no other time.
|
|
9
|
+
* `registryWasmURL` locates the committed binaries for a caller that loads them itself,
|
|
10
|
+
* and `preferredWasmVariant` reports whether the host runs `simd128`.
|
|
11
|
+
*
|
|
12
|
+
* A batch call stages the packed codes in linear memory, crosses the boundary once,
|
|
13
|
+
* and copies the masks into the caller's buffer.
|
|
14
|
+
* The staging buffers are kept and reused while they're large enough.
|
|
13
15
|
*/
|
|
14
16
|
|
|
15
17
|
import { countryAirportCollisionArtifact } from "#artifacts/country-airport-collision"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `bcp47-extlang-subtags` table of the `open-2026-11` profile, 258 rows,
|
|
3
|
+
* read from the IANA Language Subtag Registry of File-Date 2026-09-17.
|
|
4
|
+
*
|
|
5
|
+
* The rows live in `./extlang.fixture.json`,
|
|
6
|
+
* SHA-256 afd04073183f12bd2d441296a9a096b536089bc69d678796f4fca91dab8b0cf8.
|
|
7
|
+
* Generated by tools/generate.run.ts from data/normalized.
|
|
8
|
+
* Edit the data or the generator rather than this file.
|
|
9
|
+
*/
|
|
10
|
+
import type { SubtagRow } from "#types";
|
|
11
|
+
/**
|
|
12
|
+
* Returns the table's rows.
|
|
13
|
+
*
|
|
14
|
+
* Callers read the rows and never write them.
|
|
15
|
+
*/
|
|
16
|
+
export declare function extlangSubtagRows(): readonly SubtagRow[];
|
|
17
|
+
/**
|
|
18
|
+
* The registry edition the table was read from.
|
|
19
|
+
*/
|
|
20
|
+
export declare const EXTLANG_SUBTAGS_FILE_DATE = "2026-09-17";
|
|
21
|
+
//# sourceMappingURL=extlang.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extlang.d.ts","sourceRoot":"","sources":["../../../lib/artifacts/bcp47/extlang.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAMvC;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,SAAS,SAAS,EAAE,CAExD;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB,eAAe,CAAA"}
|