@budiauktioner/buildi-primitives 0.1.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/CHANGELOG.md +51 -0
- package/LICENSE +21 -0
- package/README.md +253 -0
- package/THIRD_PARTY_NOTICES.md +52 -0
- package/dist/banking/index.cjs +6491 -0
- package/dist/banking/index.cjs.map +1 -0
- package/dist/banking/index.d.cts +58 -0
- package/dist/banking/index.d.ts +58 -0
- package/dist/banking/index.js +6464 -0
- package/dist/banking/index.js.map +1 -0
- package/dist/contact/index.cjs +6678 -0
- package/dist/contact/index.cjs.map +1 -0
- package/dist/contact/index.d.cts +709 -0
- package/dist/contact/index.d.ts +709 -0
- package/dist/contact/index.js +6586 -0
- package/dist/contact/index.js.map +1 -0
- package/dist/country-BhD51LDL.d.cts +433 -0
- package/dist/country-p0n0EVQ9.d.ts +433 -0
- package/dist/finance/index.cjs +3592 -0
- package/dist/finance/index.cjs.map +1 -0
- package/dist/finance/index.d.cts +83 -0
- package/dist/finance/index.d.ts +83 -0
- package/dist/finance/index.js +3584 -0
- package/dist/finance/index.js.map +1 -0
- package/dist/geography/index.cjs +4227 -0
- package/dist/geography/index.cjs.map +1 -0
- package/dist/geography/index.d.cts +34 -0
- package/dist/geography/index.d.ts +34 -0
- package/dist/geography/index.js +4202 -0
- package/dist/geography/index.js.map +1 -0
- package/dist/index.cjs +14087 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +75 -0
- package/dist/index.d.ts +75 -0
- package/dist/index.js +13868 -0
- package/dist/index.js.map +1 -0
- package/dist/isin-EeVPpNWu.d.ts +39 -0
- package/dist/isin-ZlQLBVm8.d.cts +39 -0
- package/dist/organization/index.cjs +2376 -0
- package/dist/organization/index.cjs.map +1 -0
- package/dist/organization/index.d.cts +117 -0
- package/dist/organization/index.d.ts +117 -0
- package/dist/organization/index.js +2346 -0
- package/dist/organization/index.js.map +1 -0
- package/dist/person/index.cjs +1144 -0
- package/dist/person/index.cjs.map +1 -0
- package/dist/person/index.d.cts +60 -0
- package/dist/person/index.d.ts +60 -0
- package/dist/person/index.js +1125 -0
- package/dist/person/index.js.map +1 -0
- package/dist/person-full-name-Cmc9Ynuc.d.cts +82 -0
- package/dist/person-full-name-D6Hbsab6.d.ts +82 -0
- package/dist/phone-number-C24--ggy.d.ts +139 -0
- package/dist/phone-number-DZ-YxCQQ.d.cts +139 -0
- package/dist/property/index.cjs +487 -0
- package/dist/property/index.cjs.map +1 -0
- package/dist/property/index.d.cts +56 -0
- package/dist/property/index.d.ts +56 -0
- package/dist/property/index.js +480 -0
- package/dist/property/index.js.map +1 -0
- package/dist/sample-data/index.cjs +12310 -0
- package/dist/sample-data/index.cjs.map +1 -0
- package/dist/sample-data/index.d.cts +260 -0
- package/dist/sample-data/index.d.ts +260 -0
- package/dist/sample-data/index.js +12302 -0
- package/dist/sample-data/index.js.map +1 -0
- package/dist/swedish-address-DNC3ftRF.d.cts +297 -0
- package/dist/swedish-address-GMzjqgxb.d.ts +297 -0
- package/dist/swedish-bank-account-holder-name-BFJ8h1aO.d.cts +45 -0
- package/dist/swedish-bank-account-holder-name-CAAru07F.d.ts +45 -0
- package/dist/swedish-municipality-DlUS7g7h.d.cts +87 -0
- package/dist/swedish-municipality-nDRHYRAd.d.ts +87 -0
- package/dist/swedish-organization-name-D7NvERxA.d.cts +33 -0
- package/dist/swedish-organization-name-rR0Q836C.d.ts +33 -0
- package/dist/swedish-organization-number-Bcj7V_lh.d.cts +130 -0
- package/dist/swedish-organization-number-DM8dpXwR.d.ts +130 -0
- package/dist/swedish-organization-type-CZOdETwG.d.cts +29 -0
- package/dist/swedish-organization-type-CZOdETwG.d.ts +29 -0
- package/dist/swedish-personal-identity-number-BiIg4io3.d.ts +149 -0
- package/dist/swedish-personal-identity-number-Cp9Coz55.d.cts +149 -0
- package/dist/swedish-property-designation-BM-gdd9x.d.ts +46 -0
- package/dist/swedish-property-designation-BaHXufqV.d.cts +46 -0
- package/dist/swedish-sni-code-Ccsswpni.d.ts +53 -0
- package/dist/swedish-sni-code-CuJFyM6l.d.cts +53 -0
- package/dist/swedish-swish-number-CL6Gx_h3.d.cts +397 -0
- package/dist/swedish-swish-number-DDG3mNDg.d.ts +397 -0
- package/dist/text-candidate-qg2bD9PY.d.cts +110 -0
- package/dist/text-candidate-qg2bD9PY.d.ts +110 -0
- package/dist/text-scanning/index.cjs +10414 -0
- package/dist/text-scanning/index.cjs.map +1 -0
- package/dist/text-scanning/index.d.cts +153 -0
- package/dist/text-scanning/index.d.ts +153 -0
- package/dist/text-scanning/index.js +10406 -0
- package/dist/text-scanning/index.js.map +1 -0
- package/dist/validation/index.cjs +83 -0
- package/dist/validation/index.cjs.map +1 -0
- package/dist/validation/index.d.cts +63 -0
- package/dist/validation/index.d.ts +63 -0
- package/dist/validation/index.js +79 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/web/index.cjs +3994 -0
- package/dist/web/index.cjs.map +1 -0
- package/dist/web/index.d.cts +203 -0
- package/dist/web/index.d.ts +203 -0
- package/dist/web/index.js +3987 -0
- package/dist/web/index.js.map +1 -0
- package/package.json +211 -0
|
@@ -0,0 +1,4227 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/primitives-defaults.ts
|
|
4
|
+
var DEFAULT_UI_CULTURE = "sv-SE";
|
|
5
|
+
var state = {
|
|
6
|
+
uiCulture: DEFAULT_UI_CULTURE};
|
|
7
|
+
var PrimitivesDefaults = {
|
|
8
|
+
/**
|
|
9
|
+
* `true` when {@link uiCulture} is Swedish (`sv` or `sv-*`).
|
|
10
|
+
* Types use this to select between localized and English display names.
|
|
11
|
+
*/
|
|
12
|
+
get useLocalizedDisplayNames() {
|
|
13
|
+
const lang = state.uiCulture.toLowerCase().split("-")[0];
|
|
14
|
+
return lang === "sv";
|
|
15
|
+
}};
|
|
16
|
+
|
|
17
|
+
// src/geography/continent.ts
|
|
18
|
+
var MAX_INPUT_LENGTH = 50;
|
|
19
|
+
var Continent = class _Continent {
|
|
20
|
+
static typeInfo = Object.freeze({
|
|
21
|
+
englishName: "Continent",
|
|
22
|
+
localizedName: "Kontinent",
|
|
23
|
+
emoji: "\u{1F5FA}\uFE0F",
|
|
24
|
+
sources: Object.freeze([
|
|
25
|
+
"https://unstats.un.org/unsd/methodology/m49/",
|
|
26
|
+
"https://datahub.io/core/continent-codes"
|
|
27
|
+
])
|
|
28
|
+
});
|
|
29
|
+
static Africa = new _Continent("AF", "Africa", "Afrika");
|
|
30
|
+
static Antarctica = new _Continent("AN", "Antarctica", "Antarktis");
|
|
31
|
+
static Asia = new _Continent("AS", "Asia", "Asien");
|
|
32
|
+
static Europe = new _Continent("EU", "Europe", "Europa");
|
|
33
|
+
static NorthAmerica = new _Continent("NA", "North America", "Nordamerika");
|
|
34
|
+
static Oceania = new _Continent("OC", "Oceania", "Oceanien");
|
|
35
|
+
static SouthAmerica = new _Continent("SA", "South America", "Sydamerika");
|
|
36
|
+
/** All seven continents. */
|
|
37
|
+
static all = Object.freeze([
|
|
38
|
+
_Continent.Africa,
|
|
39
|
+
_Continent.Antarctica,
|
|
40
|
+
_Continent.Asia,
|
|
41
|
+
_Continent.Europe,
|
|
42
|
+
_Continent.NorthAmerica,
|
|
43
|
+
_Continent.Oceania,
|
|
44
|
+
_Continent.SouthAmerica
|
|
45
|
+
]);
|
|
46
|
+
code;
|
|
47
|
+
englishName;
|
|
48
|
+
localizedName;
|
|
49
|
+
constructor(code, englishName, localizedName) {
|
|
50
|
+
this.code = code;
|
|
51
|
+
this.englishName = englishName;
|
|
52
|
+
this.localizedName = localizedName;
|
|
53
|
+
}
|
|
54
|
+
get displayName() {
|
|
55
|
+
return PrimitivesDefaults.useLocalizedDisplayNames ? this.localizedName : this.englishName;
|
|
56
|
+
}
|
|
57
|
+
get value() {
|
|
58
|
+
return this.code;
|
|
59
|
+
}
|
|
60
|
+
static tryParse(input) {
|
|
61
|
+
if (input == null) return null;
|
|
62
|
+
const trimmed = input.trim();
|
|
63
|
+
if (trimmed.length === 0 || trimmed.length > MAX_INPUT_LENGTH) return null;
|
|
64
|
+
const lower = trimmed.toLowerCase();
|
|
65
|
+
return BY_KEY.get(lower) ?? null;
|
|
66
|
+
}
|
|
67
|
+
static parse(input) {
|
|
68
|
+
const r = _Continent.tryParse(input);
|
|
69
|
+
if (r === null) throw new Error("Unknown continent.");
|
|
70
|
+
return r;
|
|
71
|
+
}
|
|
72
|
+
static isValid(input) {
|
|
73
|
+
return _Continent.tryParse(input) !== null;
|
|
74
|
+
}
|
|
75
|
+
static format(input, options) {
|
|
76
|
+
const r = _Continent.tryParse(input);
|
|
77
|
+
if (r) return r.displayName;
|
|
78
|
+
if (options?.fallbackToTrimmedInputWhenInvalid && input != null && input.trim() !== "") {
|
|
79
|
+
return input.trim();
|
|
80
|
+
}
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
static normalize(input, options) {
|
|
84
|
+
const r = _Continent.tryParse(input);
|
|
85
|
+
if (r) return r.code;
|
|
86
|
+
if (options?.fallbackToTrimmedInputWhenInvalid && input != null) {
|
|
87
|
+
const trimmed = input.trim();
|
|
88
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
89
|
+
}
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
static isNormalized(input) {
|
|
93
|
+
return input != null && _Continent.normalize(input) === input;
|
|
94
|
+
}
|
|
95
|
+
toNormalizedString() {
|
|
96
|
+
return this.code;
|
|
97
|
+
}
|
|
98
|
+
toString() {
|
|
99
|
+
return this.displayName;
|
|
100
|
+
}
|
|
101
|
+
equals(other) {
|
|
102
|
+
return other != null && this.code === other.code;
|
|
103
|
+
}
|
|
104
|
+
compareTo(other) {
|
|
105
|
+
if (other == null) return 1;
|
|
106
|
+
return this.code < other.code ? -1 : this.code > other.code ? 1 : 0;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
var BY_KEY = (() => {
|
|
110
|
+
const m = /* @__PURE__ */ new Map();
|
|
111
|
+
for (const c of Continent.all) {
|
|
112
|
+
m.set(c.code.toLowerCase(), c);
|
|
113
|
+
m.set(c.englishName.toLowerCase(), c);
|
|
114
|
+
m.set(c.localizedName.toLowerCase(), c);
|
|
115
|
+
}
|
|
116
|
+
return m;
|
|
117
|
+
})();
|
|
118
|
+
|
|
119
|
+
// src/geography/country-capital.ts
|
|
120
|
+
var CountryCapital = class {
|
|
121
|
+
englishName;
|
|
122
|
+
localizedName;
|
|
123
|
+
nativeName;
|
|
124
|
+
coordinate;
|
|
125
|
+
/** @internal */
|
|
126
|
+
constructor(englishName, localizedName, nativeName, coordinate) {
|
|
127
|
+
this.englishName = englishName;
|
|
128
|
+
this.localizedName = localizedName;
|
|
129
|
+
this.nativeName = nativeName;
|
|
130
|
+
this.coordinate = coordinate;
|
|
131
|
+
}
|
|
132
|
+
/** Capital city name in the current display language. */
|
|
133
|
+
get displayName() {
|
|
134
|
+
return PrimitivesDefaults.useLocalizedDisplayNames ? this.localizedName : this.englishName;
|
|
135
|
+
}
|
|
136
|
+
toString() {
|
|
137
|
+
return this.displayName;
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
// src/internal/input-sanitization.ts
|
|
142
|
+
var FORMAT_OR_NOT_ASSIGNED = /[\p{Cf}\p{Cn}]/u;
|
|
143
|
+
var SPACE_SEPARATOR = /[\p{Zs}\p{Zl}\p{Zp}]/u;
|
|
144
|
+
var CONTROL = /\p{Cc}/u;
|
|
145
|
+
function sanitizeInput(input) {
|
|
146
|
+
let out = "";
|
|
147
|
+
for (const c of input) {
|
|
148
|
+
if (c === "\u2018" || c === "\u2019" || c === "\u201A" || c === "\u201B") {
|
|
149
|
+
out += "'";
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
if (c === "\u201C" || c === "\u201D" || c === "\u201E" || c === "\u201F" || c === "\xAB" || c === "\xBB") {
|
|
153
|
+
out += '"';
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
if (FORMAT_OR_NOT_ASSIGNED.test(c)) {
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
if (CONTROL.test(c)) {
|
|
160
|
+
if (c === " " || c === "\n" || c === "\r") out += " ";
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
if (SPACE_SEPARATOR.test(c)) {
|
|
164
|
+
out += " ";
|
|
165
|
+
continue;
|
|
166
|
+
}
|
|
167
|
+
out += c;
|
|
168
|
+
}
|
|
169
|
+
return out;
|
|
170
|
+
}
|
|
171
|
+
function keepDigits(input) {
|
|
172
|
+
let out = "";
|
|
173
|
+
for (let i = 0; i < input.length; i++) {
|
|
174
|
+
const c = input.charCodeAt(i);
|
|
175
|
+
if (c >= 48 && c <= 57) out += input[i];
|
|
176
|
+
}
|
|
177
|
+
return out;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// src/geography/geo-coordinate.ts
|
|
181
|
+
var GeoCoordinate = class _GeoCoordinate {
|
|
182
|
+
static typeInfo = Object.freeze({
|
|
183
|
+
englishName: "Geographic Coordinate",
|
|
184
|
+
localizedName: "Geografisk koordinat",
|
|
185
|
+
emoji: "\u{1F4CD}",
|
|
186
|
+
sources: Object.freeze([
|
|
187
|
+
"https://en.wikipedia.org/wiki/Geographic_coordinate_system",
|
|
188
|
+
"https://epsg.io/4326"
|
|
189
|
+
])
|
|
190
|
+
});
|
|
191
|
+
latitude;
|
|
192
|
+
longitude;
|
|
193
|
+
constructor(latitude, longitude) {
|
|
194
|
+
this.latitude = latitude;
|
|
195
|
+
this.longitude = longitude;
|
|
196
|
+
}
|
|
197
|
+
/** @internal */
|
|
198
|
+
static _unsafe(latitude, longitude) {
|
|
199
|
+
return new _GeoCoordinate(latitude, longitude);
|
|
200
|
+
}
|
|
201
|
+
get latitudeDirection() {
|
|
202
|
+
return this.latitude >= 0 ? "N" : "S";
|
|
203
|
+
}
|
|
204
|
+
get longitudeDirection() {
|
|
205
|
+
return this.longitude >= 0 ? "E" : "W";
|
|
206
|
+
}
|
|
207
|
+
/** Creates a coordinate from explicit latitude and longitude values. */
|
|
208
|
+
static create(latitude, longitude) {
|
|
209
|
+
if (!Number.isFinite(latitude) || latitude < -90 || latitude > 90) {
|
|
210
|
+
throw new RangeError("Latitude must be between -90 and 90.");
|
|
211
|
+
}
|
|
212
|
+
if (!Number.isFinite(longitude) || longitude < -180 || longitude > 180) {
|
|
213
|
+
throw new RangeError("Longitude must be between -180 and 180.");
|
|
214
|
+
}
|
|
215
|
+
return _GeoCoordinate._unsafe(latitude, longitude);
|
|
216
|
+
}
|
|
217
|
+
static tryParse(input) {
|
|
218
|
+
if (input == null || input.trim() === "") return null;
|
|
219
|
+
const sanitized = sanitizeInput(input).trim();
|
|
220
|
+
if (sanitized.length === 0 || sanitized.length > 200) return null;
|
|
221
|
+
let m;
|
|
222
|
+
m = sanitized.match(DECIMAL_DEGREES);
|
|
223
|
+
if (m) return tryDecimal(m.groups.lat, m.groups.lon);
|
|
224
|
+
m = sanitized.match(SPACE_SEPARATED);
|
|
225
|
+
if (m) return tryDecimal(m.groups.lat, m.groups.lon);
|
|
226
|
+
m = sanitized.match(DECIMAL_CARDINAL_SUFFIX);
|
|
227
|
+
if (m) {
|
|
228
|
+
return tryDecimalCardinal(
|
|
229
|
+
m.groups.lat,
|
|
230
|
+
m.groups.latDir,
|
|
231
|
+
m.groups.lon,
|
|
232
|
+
m.groups.lonDir
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
m = sanitized.match(CARDINAL_PREFIX);
|
|
236
|
+
if (m) {
|
|
237
|
+
return tryDecimalCardinal(
|
|
238
|
+
m.groups.lat,
|
|
239
|
+
m.groups.latDir,
|
|
240
|
+
m.groups.lon,
|
|
241
|
+
m.groups.lonDir
|
|
242
|
+
);
|
|
243
|
+
}
|
|
244
|
+
m = sanitized.match(DMS);
|
|
245
|
+
if (m) return tryDms(m.groups);
|
|
246
|
+
m = sanitized.match(DDM);
|
|
247
|
+
if (m) return tryDdm(m.groups);
|
|
248
|
+
return null;
|
|
249
|
+
}
|
|
250
|
+
static parse(input) {
|
|
251
|
+
const r = _GeoCoordinate.tryParse(input);
|
|
252
|
+
if (r === null) throw new Error("Invalid geographic coordinate.");
|
|
253
|
+
return r;
|
|
254
|
+
}
|
|
255
|
+
static isValid(input) {
|
|
256
|
+
return _GeoCoordinate.tryParse(input) !== null;
|
|
257
|
+
}
|
|
258
|
+
static format(input, options) {
|
|
259
|
+
const r = _GeoCoordinate.tryParse(input);
|
|
260
|
+
if (r) return r.toString();
|
|
261
|
+
if (options?.fallbackToTrimmedInputWhenInvalid && input != null && input.trim() !== "") {
|
|
262
|
+
return input.trim();
|
|
263
|
+
}
|
|
264
|
+
return null;
|
|
265
|
+
}
|
|
266
|
+
static normalize(input, options) {
|
|
267
|
+
const r = _GeoCoordinate.tryParse(input);
|
|
268
|
+
if (r) return r.toNormalizedString();
|
|
269
|
+
if (options?.fallbackToTrimmedInputWhenInvalid && input != null) {
|
|
270
|
+
const trimmed = input.trim();
|
|
271
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
272
|
+
}
|
|
273
|
+
return null;
|
|
274
|
+
}
|
|
275
|
+
static isNormalized(input) {
|
|
276
|
+
return input != null && _GeoCoordinate.normalize(input) === input;
|
|
277
|
+
}
|
|
278
|
+
toNormalizedString() {
|
|
279
|
+
return `${formatNumber(this.latitude)}, ${formatNumber(this.longitude)}`;
|
|
280
|
+
}
|
|
281
|
+
toString() {
|
|
282
|
+
return `${formatNumber(Math.abs(this.latitude))}\xB0${this.latitudeDirection}, ${formatNumber(Math.abs(this.longitude))}\xB0${this.longitudeDirection}`;
|
|
283
|
+
}
|
|
284
|
+
/** Returns the coordinate in degrees, minutes, and seconds, e.g. `59°19'45.5"N, 18°4'7"E`. */
|
|
285
|
+
toDmsString() {
|
|
286
|
+
const [latDeg, latMin, latSec] = toDmsParts(Math.abs(this.latitude));
|
|
287
|
+
const [lonDeg, lonMin, lonSec] = toDmsParts(Math.abs(this.longitude));
|
|
288
|
+
return `${latDeg}\xB0${latMin}'${formatSeconds(latSec)}"${this.latitudeDirection}, ${lonDeg}\xB0${lonMin}'${formatSeconds(lonSec)}"${this.longitudeDirection}`;
|
|
289
|
+
}
|
|
290
|
+
/** Distance in kilometers (Haversine) between two coordinates. */
|
|
291
|
+
static distanceKilometers(a, b) {
|
|
292
|
+
return haversineKm(a, b);
|
|
293
|
+
}
|
|
294
|
+
/** Returns true if coordinates `a` and `b` are within `radiusKm` kilometers of each other. */
|
|
295
|
+
static isWithinKilometers(a, b, radiusKm) {
|
|
296
|
+
return _GeoCoordinate.distanceKilometers(a, b) <= radiusKm;
|
|
297
|
+
}
|
|
298
|
+
/** Distance in kilometers from this coordinate to `other`. */
|
|
299
|
+
distanceKilometersTo(other) {
|
|
300
|
+
return haversineKm(this, other);
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Returns true if `other` is within `radiusKm` kilometers of this
|
|
304
|
+
* coordinate (inclusive).
|
|
305
|
+
*/
|
|
306
|
+
isWithinKilometers(other, radiusKm) {
|
|
307
|
+
return this.distanceKilometersTo(other) <= radiusKm;
|
|
308
|
+
}
|
|
309
|
+
equals(other) {
|
|
310
|
+
return other != null && this.latitude === other.latitude && this.longitude === other.longitude;
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
var DECIMAL_DEGREES = /^\s*\(?\s*(?<lat>[+-]?\d+(?:\.\d+)?)\s*[,;]\s*(?<lon>[+-]?\d+(?:\.\d+)?)\s*\)?\s*$/;
|
|
314
|
+
var SPACE_SEPARATED = /^\s*\(?\s*(?<lat>[+-]?\d+(?:\.\d+)?)\s+(?<lon>[+-]?\d+(?:\.\d+)?)\s*\)?\s*$/;
|
|
315
|
+
var DECIMAL_CARDINAL_SUFFIX = /^\s*\(?\s*(?<lat>\d+(?:\.\d+)?)\s*°?\s*(?<latDir>[NSns])\s*[,;\s]\s*(?<lon>\d+(?:\.\d+)?)\s*°?\s*(?<lonDir>[EWewÖöVv])\s*\)?\s*$/u;
|
|
316
|
+
var CARDINAL_PREFIX = /^\s*\(?\s*(?<latDir>[NSns])\s*(?<lat>\d+(?:\.\d+)?)\s*°?\s*[,;\s]\s*(?<lonDir>[EWewÖöVv])\s*(?<lon>\d+(?:\.\d+)?)\s*°?\s*\)?\s*$/u;
|
|
317
|
+
var DMS = /^\s*\(?\s*(?<latDeg>\d+)\s*°\s*(?<latMin>\d+)\s*[′']\s*(?<latSec>\d+(?:\.\d+)?)\s*[″"]\s*(?<latDir>[NSns])\s*[,;\s]\s*(?<lonDeg>\d+)\s*°\s*(?<lonMin>\d+)\s*[′']\s*(?<lonSec>\d+(?:\.\d+)?)\s*[″"]\s*(?<lonDir>[EWewÖöVv])\s*\)?\s*$/u;
|
|
318
|
+
var DDM = /^\s*\(?\s*(?<latDeg>\d+)\s*°\s*(?<latDecMin>\d+(?:\.\d+)?)\s*[′']\s*(?<latDir>[NSns])\s*[,;\s]\s*(?<lonDeg>\d+)\s*°\s*(?<lonDecMin>\d+(?:\.\d+)?)\s*[′']\s*(?<lonDir>[EWewÖöVv])\s*\)?\s*$/u;
|
|
319
|
+
function tryDecimal(latStr, lonStr) {
|
|
320
|
+
const lat = parseFloat(latStr);
|
|
321
|
+
const lon = parseFloat(lonStr);
|
|
322
|
+
if (!Number.isFinite(lat) || !Number.isFinite(lon)) return null;
|
|
323
|
+
if (!isInRange(lat, lon)) return null;
|
|
324
|
+
return GeoCoordinate._unsafe(lat, lon);
|
|
325
|
+
}
|
|
326
|
+
function tryDecimalCardinal(latStr, latDir, lonStr, lonDir) {
|
|
327
|
+
const lat = applyLatDirection(parseFloat(latStr), latDir);
|
|
328
|
+
const lon = applyLonDirection(parseFloat(lonStr), lonDir);
|
|
329
|
+
if (!Number.isFinite(lat) || !Number.isFinite(lon)) return null;
|
|
330
|
+
if (!isInRange(lat, lon)) return null;
|
|
331
|
+
return GeoCoordinate._unsafe(lat, lon);
|
|
332
|
+
}
|
|
333
|
+
function tryDms(g) {
|
|
334
|
+
const latDeg = parseFloat(g.latDeg);
|
|
335
|
+
const latMin = parseFloat(g.latMin);
|
|
336
|
+
const latSec = parseFloat(g.latSec);
|
|
337
|
+
const lonDeg = parseFloat(g.lonDeg);
|
|
338
|
+
const lonMin = parseFloat(g.lonMin);
|
|
339
|
+
const lonSec = parseFloat(g.lonSec);
|
|
340
|
+
if (latMin >= 60 || latSec >= 60 || lonMin >= 60 || lonSec >= 60) return null;
|
|
341
|
+
let lat = round8(latDeg + latMin / 60 + latSec / 3600);
|
|
342
|
+
let lon = round8(lonDeg + lonMin / 60 + lonSec / 3600);
|
|
343
|
+
lat = applyLatDirection(lat, g.latDir);
|
|
344
|
+
lon = applyLonDirection(lon, g.lonDir);
|
|
345
|
+
if (!isInRange(lat, lon)) return null;
|
|
346
|
+
return GeoCoordinate._unsafe(lat, lon);
|
|
347
|
+
}
|
|
348
|
+
function tryDdm(g) {
|
|
349
|
+
const latDeg = parseFloat(g.latDeg);
|
|
350
|
+
const latDecMin = parseFloat(g.latDecMin);
|
|
351
|
+
const lonDeg = parseFloat(g.lonDeg);
|
|
352
|
+
const lonDecMin = parseFloat(g.lonDecMin);
|
|
353
|
+
if (latDecMin >= 60 || lonDecMin >= 60) return null;
|
|
354
|
+
let lat = round8(latDeg + latDecMin / 60);
|
|
355
|
+
let lon = round8(lonDeg + lonDecMin / 60);
|
|
356
|
+
lat = applyLatDirection(lat, g.latDir);
|
|
357
|
+
lon = applyLonDirection(lon, g.lonDir);
|
|
358
|
+
if (!isInRange(lat, lon)) return null;
|
|
359
|
+
return GeoCoordinate._unsafe(lat, lon);
|
|
360
|
+
}
|
|
361
|
+
function applyLatDirection(lat, dir) {
|
|
362
|
+
return dir.toUpperCase() === "S" ? -lat : lat;
|
|
363
|
+
}
|
|
364
|
+
function applyLonDirection(lon, dir) {
|
|
365
|
+
const u = dir.toUpperCase();
|
|
366
|
+
return u === "W" || u === "V" ? -lon : lon;
|
|
367
|
+
}
|
|
368
|
+
function isInRange(lat, lon) {
|
|
369
|
+
return lat >= -90 && lat <= 90 && lon >= -180 && lon <= 180;
|
|
370
|
+
}
|
|
371
|
+
function round8(v) {
|
|
372
|
+
return Math.round(v * 1e8) / 1e8;
|
|
373
|
+
}
|
|
374
|
+
function toDmsParts(dd) {
|
|
375
|
+
const degrees = Math.trunc(dd);
|
|
376
|
+
const fracMinutes = (dd - degrees) * 60;
|
|
377
|
+
const minutes = Math.trunc(fracMinutes);
|
|
378
|
+
const seconds = Math.round((fracMinutes - minutes) * 600) / 10;
|
|
379
|
+
return [degrees, minutes, seconds];
|
|
380
|
+
}
|
|
381
|
+
function formatNumber(value) {
|
|
382
|
+
return value.toString();
|
|
383
|
+
}
|
|
384
|
+
function formatSeconds(seconds) {
|
|
385
|
+
if (Number.isInteger(seconds)) return seconds.toString();
|
|
386
|
+
return seconds.toString().replace(/(\.\d*?)0+$/, "$1");
|
|
387
|
+
}
|
|
388
|
+
function haversineKm(a, b) {
|
|
389
|
+
const R = 6371;
|
|
390
|
+
const dLat = toRadians(b.latitude - a.latitude);
|
|
391
|
+
const dLon = toRadians(b.longitude - a.longitude);
|
|
392
|
+
const lat1 = toRadians(a.latitude);
|
|
393
|
+
const lat2 = toRadians(b.latitude);
|
|
394
|
+
const h = Math.sin(dLat / 2) ** 2 + Math.cos(lat1) * Math.cos(lat2) * Math.sin(dLon / 2) ** 2;
|
|
395
|
+
return R * 2 * Math.atan2(Math.sqrt(h), Math.sqrt(1 - h));
|
|
396
|
+
}
|
|
397
|
+
function toRadians(degrees) {
|
|
398
|
+
return degrees * (Math.PI / 180);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
// src/geography/language.ts
|
|
402
|
+
var TextDirection = {
|
|
403
|
+
LeftToRight: "LeftToRight",
|
|
404
|
+
RightToLeft: "RightToLeft"
|
|
405
|
+
};
|
|
406
|
+
var WritingScript = {
|
|
407
|
+
Unknown: "Unknown",
|
|
408
|
+
Latin: "Latin",
|
|
409
|
+
Cyrillic: "Cyrillic",
|
|
410
|
+
Arabic: "Arabic",
|
|
411
|
+
Greek: "Greek",
|
|
412
|
+
Hebrew: "Hebrew",
|
|
413
|
+
Devanagari: "Devanagari",
|
|
414
|
+
Bengali: "Bengali",
|
|
415
|
+
Gurmukhi: "Gurmukhi",
|
|
416
|
+
Gujarati: "Gujarati",
|
|
417
|
+
Oriya: "Oriya",
|
|
418
|
+
Tamil: "Tamil",
|
|
419
|
+
Telugu: "Telugu",
|
|
420
|
+
Kannada: "Kannada",
|
|
421
|
+
Malayalam: "Malayalam",
|
|
422
|
+
Sinhala: "Sinhala",
|
|
423
|
+
Thai: "Thai",
|
|
424
|
+
Lao: "Lao",
|
|
425
|
+
Tibetan: "Tibetan",
|
|
426
|
+
Myanmar: "Myanmar",
|
|
427
|
+
Georgian: "Georgian",
|
|
428
|
+
Hangul: "Hangul",
|
|
429
|
+
Ethiopic: "Ethiopic",
|
|
430
|
+
Cherokee: "Cherokee",
|
|
431
|
+
Canadian: "Canadian",
|
|
432
|
+
Khmer: "Khmer",
|
|
433
|
+
Mongolian: "Mongolian",
|
|
434
|
+
Han: "Han",
|
|
435
|
+
Armenian: "Armenian",
|
|
436
|
+
Thaana: "Thaana"
|
|
437
|
+
};
|
|
438
|
+
var MAX_INPUT_LENGTH2 = 100;
|
|
439
|
+
var Language = class _Language {
|
|
440
|
+
static typeInfo = Object.freeze({
|
|
441
|
+
englishName: "Language",
|
|
442
|
+
localizedName: "Spr\xE5k",
|
|
443
|
+
emoji: "\u{1F5E3}\uFE0F",
|
|
444
|
+
sources: Object.freeze([
|
|
445
|
+
"https://www.loc.gov/standards/iso639-2/php/code_list.php",
|
|
446
|
+
"https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes",
|
|
447
|
+
"https://iso639-3.sil.org/"
|
|
448
|
+
])
|
|
449
|
+
});
|
|
450
|
+
alpha2Code;
|
|
451
|
+
alpha3Code;
|
|
452
|
+
englishName;
|
|
453
|
+
localizedName;
|
|
454
|
+
nativeName;
|
|
455
|
+
script;
|
|
456
|
+
direction;
|
|
457
|
+
constructor(alpha2, alpha3, en, sv, native, script, direction) {
|
|
458
|
+
this.alpha2Code = alpha2;
|
|
459
|
+
this.alpha3Code = alpha3;
|
|
460
|
+
this.englishName = en;
|
|
461
|
+
this.localizedName = sv;
|
|
462
|
+
this.nativeName = native;
|
|
463
|
+
this.script = script;
|
|
464
|
+
this.direction = direction;
|
|
465
|
+
}
|
|
466
|
+
get displayName() {
|
|
467
|
+
return PrimitivesDefaults.useLocalizedDisplayNames ? this.localizedName : this.englishName;
|
|
468
|
+
}
|
|
469
|
+
get value() {
|
|
470
|
+
return this.alpha2Code;
|
|
471
|
+
}
|
|
472
|
+
/** @internal Used by Country and other types. */
|
|
473
|
+
static _create(alpha2, alpha3, en, sv, native, script, direction = TextDirection.LeftToRight) {
|
|
474
|
+
return new _Language(alpha2, alpha3, en, sv, native, script, direction);
|
|
475
|
+
}
|
|
476
|
+
static tryParse(input) {
|
|
477
|
+
if (input == null || input.trim() === "") return null;
|
|
478
|
+
const trimmed = sanitizeInput(input).trim();
|
|
479
|
+
if (trimmed.length === 0 || trimmed.length > MAX_INPUT_LENGTH2) return null;
|
|
480
|
+
const lower = trimmed.toLowerCase();
|
|
481
|
+
return BY_KEY2.get(lower) ?? null;
|
|
482
|
+
}
|
|
483
|
+
static parse(input) {
|
|
484
|
+
const r = _Language.tryParse(input);
|
|
485
|
+
if (r === null) throw new Error("Unknown language.");
|
|
486
|
+
return r;
|
|
487
|
+
}
|
|
488
|
+
static isValid(input) {
|
|
489
|
+
return _Language.tryParse(input) !== null;
|
|
490
|
+
}
|
|
491
|
+
static format(input, options) {
|
|
492
|
+
const r = _Language.tryParse(input);
|
|
493
|
+
if (r) return r.displayName;
|
|
494
|
+
if (options?.fallbackToTrimmedInputWhenInvalid && input != null && input.trim() !== "") {
|
|
495
|
+
return input.trim();
|
|
496
|
+
}
|
|
497
|
+
return null;
|
|
498
|
+
}
|
|
499
|
+
static normalize(input, options) {
|
|
500
|
+
const r = _Language.tryParse(input);
|
|
501
|
+
if (r) return r.alpha2Code;
|
|
502
|
+
if (options?.fallbackToTrimmedInputWhenInvalid && input != null) {
|
|
503
|
+
const trimmed = input.trim();
|
|
504
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
505
|
+
}
|
|
506
|
+
return null;
|
|
507
|
+
}
|
|
508
|
+
static isNormalized(input) {
|
|
509
|
+
return input != null && _Language.normalize(input) === input;
|
|
510
|
+
}
|
|
511
|
+
toNormalizedString() {
|
|
512
|
+
return this.alpha2Code;
|
|
513
|
+
}
|
|
514
|
+
toDisplayString() {
|
|
515
|
+
return this.displayName;
|
|
516
|
+
}
|
|
517
|
+
toEnglishString() {
|
|
518
|
+
return this.englishName;
|
|
519
|
+
}
|
|
520
|
+
toNativeString() {
|
|
521
|
+
return this.nativeName;
|
|
522
|
+
}
|
|
523
|
+
toString() {
|
|
524
|
+
return this.displayName;
|
|
525
|
+
}
|
|
526
|
+
equals(other) {
|
|
527
|
+
return other != null && this.alpha2Code === other.alpha2Code;
|
|
528
|
+
}
|
|
529
|
+
compareTo(other) {
|
|
530
|
+
if (other == null) return 1;
|
|
531
|
+
return this.alpha2Code < other.alpha2Code ? -1 : this.alpha2Code > other.alpha2Code ? 1 : 0;
|
|
532
|
+
}
|
|
533
|
+
/** All recognized ISO 639-1 languages. */
|
|
534
|
+
static get all() {
|
|
535
|
+
return ALL;
|
|
536
|
+
}
|
|
537
|
+
// Frequently used language constants — populated below ALL.
|
|
538
|
+
static Afrikaans;
|
|
539
|
+
static Albanian;
|
|
540
|
+
static Arabic;
|
|
541
|
+
static Bulgarian;
|
|
542
|
+
static Catalan;
|
|
543
|
+
static Chinese;
|
|
544
|
+
static Croatian;
|
|
545
|
+
static Czech;
|
|
546
|
+
static Danish;
|
|
547
|
+
static Dutch;
|
|
548
|
+
static English;
|
|
549
|
+
static Estonian;
|
|
550
|
+
static Faroese;
|
|
551
|
+
static Finnish;
|
|
552
|
+
static French;
|
|
553
|
+
static German;
|
|
554
|
+
static Greek;
|
|
555
|
+
static Hindi;
|
|
556
|
+
static Hungarian;
|
|
557
|
+
static Icelandic;
|
|
558
|
+
static Italian;
|
|
559
|
+
static Japanese;
|
|
560
|
+
static Korean;
|
|
561
|
+
static Latvian;
|
|
562
|
+
static Lithuanian;
|
|
563
|
+
static NorthernSami;
|
|
564
|
+
static Norwegian;
|
|
565
|
+
static NorwegianBokmal;
|
|
566
|
+
static NorwegianNynorsk;
|
|
567
|
+
static Polish;
|
|
568
|
+
static Portuguese;
|
|
569
|
+
static Romanian;
|
|
570
|
+
static Russian;
|
|
571
|
+
static Slovak;
|
|
572
|
+
static Slovenian;
|
|
573
|
+
static Spanish;
|
|
574
|
+
static Swahili;
|
|
575
|
+
static Swedish;
|
|
576
|
+
static Turkish;
|
|
577
|
+
static Ukrainian;
|
|
578
|
+
};
|
|
579
|
+
var L = Language._create;
|
|
580
|
+
var ALL = Object.freeze([
|
|
581
|
+
L("aa", "aar", "Afar", "Afar", "Afaraf", WritingScript.Latin),
|
|
582
|
+
L("ab", "abk", "Abkhazian", "Abchaziska", "\u0410\u04A7\u0441\u0443\u0430", WritingScript.Cyrillic),
|
|
583
|
+
L("af", "afr", "Afrikaans", "Afrikaans", "Afrikaans", WritingScript.Latin),
|
|
584
|
+
L("ak", "aka", "Akan", "Akan", "Akan", WritingScript.Latin),
|
|
585
|
+
L("am", "amh", "Amharic", "Amhariska", "\u12A0\u121B\u122D\u129B", WritingScript.Ethiopic),
|
|
586
|
+
L("an", "arg", "Aragonese", "Aragonesiska", "Aragon\xE9s", WritingScript.Latin),
|
|
587
|
+
L("ar", "ara", "Arabic", "Arabiska", "\u0627\u0644\u0639\u0631\u0628\u064A\u0629", WritingScript.Arabic, TextDirection.RightToLeft),
|
|
588
|
+
L("as", "asm", "Assamese", "Assamesiska", "\u0985\u09B8\u09AE\u09C0\u09AF\u09BC\u09BE", WritingScript.Bengali),
|
|
589
|
+
L("av", "ava", "Avaric", "Avariska", "\u0410\u0432\u0430\u0440", WritingScript.Cyrillic),
|
|
590
|
+
L("ay", "aym", "Aymara", "Aymara", "Aymar", WritingScript.Latin),
|
|
591
|
+
L("az", "aze", "Azerbaijani", "Azerbajdzjanska", "Az\u0259rbaycan", WritingScript.Latin),
|
|
592
|
+
L("ba", "bak", "Bashkir", "Basjkiriska", "\u0411\u0430\u0448\u04A1\u043E\u0440\u0442", WritingScript.Cyrillic),
|
|
593
|
+
L("be", "bel", "Belarusian", "Vitryska", "\u0411\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F", WritingScript.Cyrillic),
|
|
594
|
+
L("bg", "bul", "Bulgarian", "Bulgariska", "\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438", WritingScript.Cyrillic),
|
|
595
|
+
L("bh", "bih", "Bihari", "Bihari", "\u092D\u094B\u091C\u092A\u0941\u0930\u0940", WritingScript.Devanagari),
|
|
596
|
+
L("bi", "bis", "Bislama", "Bislama", "Bislama", WritingScript.Latin),
|
|
597
|
+
L("bm", "bam", "Bambara", "Bambara", "Bamanankan", WritingScript.Latin),
|
|
598
|
+
L("bn", "ben", "Bengali", "Bengali", "\u09AC\u09BE\u0982\u09B2\u09BE", WritingScript.Bengali),
|
|
599
|
+
L("bo", "bod", "Tibetan", "Tibetanska", "\u0F56\u0F7C\u0F51\u0F0B\u0F61\u0F72\u0F42", WritingScript.Tibetan),
|
|
600
|
+
L("br", "bre", "Breton", "Bretonska", "Brezhoneg", WritingScript.Latin),
|
|
601
|
+
L("bs", "bos", "Bosnian", "Bosniska", "Bosanski", WritingScript.Latin),
|
|
602
|
+
L("ca", "cat", "Catalan", "Katalanska", "Catal\xE0", WritingScript.Latin),
|
|
603
|
+
L("ce", "che", "Chechen", "Tjetjenska", "\u041D\u043E\u0445\u0447\u0438\u0439\u043D", WritingScript.Cyrillic),
|
|
604
|
+
L("ch", "cha", "Chamorro", "Chamorro", "Chamoru", WritingScript.Latin),
|
|
605
|
+
L("co", "cos", "Corsican", "Korsikanska", "Corsu", WritingScript.Latin),
|
|
606
|
+
L("cr", "cre", "Cree", "Cree", "\u14C0\u1426\u1403\u152D\u140D\u140F\u1423", WritingScript.Canadian),
|
|
607
|
+
L("cs", "ces", "Czech", "Tjeckiska", "\u010Ce\u0161tina", WritingScript.Latin),
|
|
608
|
+
L("cu", "chu", "Church Slavonic", "Kyrkoslaviska", "\u0421\u043B\u043E\u0432\u0463\u043D\u044C\u0441\u043A\u044A", WritingScript.Cyrillic),
|
|
609
|
+
L("cv", "chv", "Chuvash", "Tjuvasjiska", "\u0427\u04D1\u0432\u0430\u0448", WritingScript.Cyrillic),
|
|
610
|
+
L("cy", "cym", "Welsh", "Walesiska", "Cymraeg", WritingScript.Latin),
|
|
611
|
+
L("da", "dan", "Danish", "Danska", "Dansk", WritingScript.Latin),
|
|
612
|
+
L("de", "deu", "German", "Tyska", "Deutsch", WritingScript.Latin),
|
|
613
|
+
L("dv", "div", "Divehi", "Divehi", "\u078B\u07A8\u0788\u07AC\u0780\u07A8", WritingScript.Thaana, TextDirection.RightToLeft),
|
|
614
|
+
L("dz", "dzo", "Dzongkha", "Dzongkha", "\u0F62\u0FAB\u0F7C\u0F44\u0F0B\u0F41", WritingScript.Tibetan),
|
|
615
|
+
L("ee", "ewe", "Ewe", "Ewe", "E\u028Begbe", WritingScript.Latin),
|
|
616
|
+
L("el", "ell", "Greek", "Grekiska", "\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC", WritingScript.Greek),
|
|
617
|
+
L("en", "eng", "English", "Engelska", "English", WritingScript.Latin),
|
|
618
|
+
L("eo", "epo", "Esperanto", "Esperanto", "Esperanto", WritingScript.Latin),
|
|
619
|
+
L("es", "spa", "Spanish", "Spanska", "Espa\xF1ol", WritingScript.Latin),
|
|
620
|
+
L("et", "est", "Estonian", "Estniska", "Eesti", WritingScript.Latin),
|
|
621
|
+
L("eu", "eus", "Basque", "Baskiska", "Euskara", WritingScript.Latin),
|
|
622
|
+
L("fa", "fas", "Persian", "Persiska", "\u0641\u0627\u0631\u0633\u06CC", WritingScript.Arabic, TextDirection.RightToLeft),
|
|
623
|
+
L("ff", "ful", "Fulah", "Fulani", "Fulfulde", WritingScript.Latin),
|
|
624
|
+
L("fi", "fin", "Finnish", "Finska", "Suomi", WritingScript.Latin),
|
|
625
|
+
L("fj", "fij", "Fijian", "Fijianska", "Vosa Vakaviti", WritingScript.Latin),
|
|
626
|
+
L("fo", "fao", "Faroese", "F\xE4r\xF6iska", "F\xF8royskt", WritingScript.Latin),
|
|
627
|
+
L("fr", "fra", "French", "Franska", "Fran\xE7ais", WritingScript.Latin),
|
|
628
|
+
L("fy", "fry", "Western Frisian", "Frisiska", "Frysk", WritingScript.Latin),
|
|
629
|
+
L("ga", "gle", "Irish", "Iriska", "Gaeilge", WritingScript.Latin),
|
|
630
|
+
L("gd", "gla", "Scottish Gaelic", "Skotsk gaeliska", "G\xE0idhlig", WritingScript.Latin),
|
|
631
|
+
L("gl", "glg", "Galician", "Galiciska", "Galego", WritingScript.Latin),
|
|
632
|
+
L("gn", "grn", "Guarani", "Guaran\xED", "Ava\xF1e'\u1EBD", WritingScript.Latin),
|
|
633
|
+
L("gu", "guj", "Gujarati", "Gujarati", "\u0A97\u0AC1\u0A9C\u0AB0\u0ABE\u0AA4\u0AC0", WritingScript.Gujarati),
|
|
634
|
+
L("gv", "glv", "Manx", "Manx", "Gaelg", WritingScript.Latin),
|
|
635
|
+
L("ha", "hau", "Hausa", "Hausa", "Hausa", WritingScript.Latin),
|
|
636
|
+
L("he", "heb", "Hebrew", "Hebreiska", "\u05E2\u05D1\u05E8\u05D9\u05EA", WritingScript.Hebrew, TextDirection.RightToLeft),
|
|
637
|
+
L("hi", "hin", "Hindi", "Hindi", "\u0939\u093F\u0928\u094D\u0926\u0940", WritingScript.Devanagari),
|
|
638
|
+
L("ho", "hmo", "Hiri Motu", "Hiri Motu", "Hiri Motu", WritingScript.Latin),
|
|
639
|
+
L("hr", "hrv", "Croatian", "Kroatiska", "Hrvatski", WritingScript.Latin),
|
|
640
|
+
L("ht", "hat", "Haitian Creole", "Haitisk kreol", "Krey\xF2l Ayisyen", WritingScript.Latin),
|
|
641
|
+
L("hu", "hun", "Hungarian", "Ungerska", "Magyar", WritingScript.Latin),
|
|
642
|
+
L("hy", "hye", "Armenian", "Armeniska", "\u0540\u0561\u0575\u0565\u0580\u0565\u0576", WritingScript.Armenian),
|
|
643
|
+
L("ia", "ina", "Interlingua", "Interlingua", "Interlingua", WritingScript.Latin),
|
|
644
|
+
L("id", "ind", "Indonesian", "Indonesiska", "Bahasa Indonesia", WritingScript.Latin),
|
|
645
|
+
L("ie", "ile", "Interlingue", "Interlingue", "Interlingue", WritingScript.Latin),
|
|
646
|
+
L("ig", "ibo", "Igbo", "Igbo", "Igbo", WritingScript.Latin),
|
|
647
|
+
L("ii", "iii", "Sichuan Yi", "Yi", "\uA188\uA320\uA4A1", WritingScript.Unknown),
|
|
648
|
+
L("ik", "ipk", "Inupiaq", "Inupiaq", "I\xF1upiaq", WritingScript.Latin),
|
|
649
|
+
L("io", "ido", "Ido", "Ido", "Ido", WritingScript.Latin),
|
|
650
|
+
L("is", "isl", "Icelandic", "Isl\xE4ndska", "\xCDslenska", WritingScript.Latin),
|
|
651
|
+
L("it", "ita", "Italian", "Italienska", "Italiano", WritingScript.Latin),
|
|
652
|
+
L("iu", "iku", "Inuktitut", "Inuktitut", "\u1403\u14C4\u1483\u144E\u1450\u1466", WritingScript.Canadian),
|
|
653
|
+
L("ja", "jpn", "Japanese", "Japanska", "\u65E5\u672C\u8A9E", WritingScript.Han),
|
|
654
|
+
L("jv", "jav", "Javanese", "Javanesiska", "Basa Jawa", WritingScript.Latin),
|
|
655
|
+
L("ka", "kat", "Georgian", "Georgiska", "\u10E5\u10D0\u10E0\u10D7\u10E3\u10DA\u10D8", WritingScript.Georgian),
|
|
656
|
+
L("kg", "kon", "Kongo", "Kikongo", "KiKongo", WritingScript.Latin),
|
|
657
|
+
L("ki", "kik", "Kikuyu", "Kikuyu", "G\u0129k\u0169y\u0169", WritingScript.Latin),
|
|
658
|
+
L("kj", "kua", "Kuanyama", "Kuanyama", "Kuanyama", WritingScript.Latin),
|
|
659
|
+
L("kk", "kaz", "Kazakh", "Kazakiska", "\u049A\u0430\u0437\u0430\u049B\u0448\u0430", WritingScript.Cyrillic),
|
|
660
|
+
L("kl", "kal", "Kalaallisut", "Gr\xF6nl\xE4ndska", "Kalaallisut", WritingScript.Latin),
|
|
661
|
+
L("km", "khm", "Khmer", "Khmer", "\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A", WritingScript.Khmer),
|
|
662
|
+
L("kn", "kan", "Kannada", "Kannada", "\u0C95\u0CA8\u0CCD\u0CA8\u0CA1", WritingScript.Kannada),
|
|
663
|
+
L("ko", "kor", "Korean", "Koreanska", "\uD55C\uAD6D\uC5B4", WritingScript.Hangul),
|
|
664
|
+
L("kr", "kau", "Kanuri", "Kanuri", "Kanuri", WritingScript.Latin),
|
|
665
|
+
L(
|
|
666
|
+
"ks",
|
|
667
|
+
"kas",
|
|
668
|
+
"Kashmiri",
|
|
669
|
+
"Kashmiri",
|
|
670
|
+
"\u0915\u0936\u094D\u092E\u0940\u0930\u0940",
|
|
671
|
+
WritingScript.Arabic,
|
|
672
|
+
TextDirection.RightToLeft
|
|
673
|
+
),
|
|
674
|
+
L("ku", "kur", "Kurdish", "Kurdiska", "Kurd\xEE", WritingScript.Latin),
|
|
675
|
+
L("kv", "kom", "Komi", "Komi", "\u041A\u043E\u043C\u0438", WritingScript.Cyrillic),
|
|
676
|
+
L("kw", "cor", "Cornish", "Korniska", "Kernewek", WritingScript.Latin),
|
|
677
|
+
L("ky", "kir", "Kyrgyz", "Kirgiziska", "\u041A\u044B\u0440\u0433\u044B\u0437\u0447\u0430", WritingScript.Cyrillic),
|
|
678
|
+
L("la", "lat", "Latin", "Latin", "Latina", WritingScript.Latin),
|
|
679
|
+
L("lb", "ltz", "Luxembourgish", "Luxemburgiska", "L\xEBtzebuergesch", WritingScript.Latin),
|
|
680
|
+
L("lg", "lug", "Ganda", "Luganda", "Luganda", WritingScript.Latin),
|
|
681
|
+
L("li", "lim", "Limburgish", "Limburgiska", "Limburgs", WritingScript.Latin),
|
|
682
|
+
L("ln", "lin", "Lingala", "Lingala", "Ling\xE1la", WritingScript.Latin),
|
|
683
|
+
L("lo", "lao", "Lao", "Laotiska", "\u0E9E\u0EB2\u0EAA\u0EB2\u0EA5\u0EB2\u0EA7", WritingScript.Lao),
|
|
684
|
+
L("lt", "lit", "Lithuanian", "Litauiska", "Lietuvi\u0173", WritingScript.Latin),
|
|
685
|
+
L("lu", "lub", "Luba-Katanga", "Luba-Katanga", "Kiluba", WritingScript.Latin),
|
|
686
|
+
L("lv", "lav", "Latvian", "Lettiska", "Latvie\u0161u", WritingScript.Latin),
|
|
687
|
+
L("mg", "mlg", "Malagasy", "Malagassiska", "Malagasy", WritingScript.Latin),
|
|
688
|
+
L("mh", "mah", "Marshallese", "Marshallesiska", "Kajin M\u0327aje\u013C", WritingScript.Latin),
|
|
689
|
+
L("mi", "mri", "Maori", "Maori", "Te Reo M\u0101ori", WritingScript.Latin),
|
|
690
|
+
L("mk", "mkd", "Macedonian", "Makedonska", "\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0441\u043A\u0438", WritingScript.Cyrillic),
|
|
691
|
+
L("ml", "mal", "Malayalam", "Malayalam", "\u0D2E\u0D32\u0D2F\u0D3E\u0D33\u0D02", WritingScript.Malayalam),
|
|
692
|
+
L("mn", "mon", "Mongolian", "Mongoliska", "\u041C\u043E\u043D\u0433\u043E\u043B", WritingScript.Cyrillic),
|
|
693
|
+
L("mr", "mar", "Marathi", "Marathi", "\u092E\u0930\u093E\u0920\u0940", WritingScript.Devanagari),
|
|
694
|
+
L("ms", "msa", "Malay", "Malajiska", "Bahasa Melayu", WritingScript.Latin),
|
|
695
|
+
L("mt", "mlt", "Maltese", "Maltesiska", "Malti", WritingScript.Latin),
|
|
696
|
+
L("my", "mya", "Burmese", "Burmesiska", "\u1019\u103C\u1014\u103A\u1019\u102C\u1005\u102C", WritingScript.Myanmar),
|
|
697
|
+
L("na", "nau", "Nauru", "Nauru", "Dorerin Naoero", WritingScript.Latin),
|
|
698
|
+
L("nb", "nob", "Norwegian Bokm\xE5l", "Norska (bokm\xE5l)", "Norsk bokm\xE5l", WritingScript.Latin),
|
|
699
|
+
L("nd", "nde", "Northern Ndebele", "Nordndebele", "isiNdebele", WritingScript.Latin),
|
|
700
|
+
L("ne", "nep", "Nepali", "Nepalesiska", "\u0928\u0947\u092A\u093E\u0932\u0940", WritingScript.Devanagari),
|
|
701
|
+
L("ng", "ndo", "Ndonga", "Ndonga", "Owambo", WritingScript.Latin),
|
|
702
|
+
L("nl", "nld", "Dutch", "Nederl\xE4ndska", "Nederlands", WritingScript.Latin),
|
|
703
|
+
L("nn", "nno", "Norwegian Nynorsk", "Norska (nynorsk)", "Norsk nynorsk", WritingScript.Latin),
|
|
704
|
+
L("no", "nor", "Norwegian", "Norska", "Norsk", WritingScript.Latin),
|
|
705
|
+
L("nr", "nbl", "Southern Ndebele", "Sydndebele", "isiNdebele", WritingScript.Latin),
|
|
706
|
+
L("nv", "nav", "Navajo", "Navajo", "Din\xE9 Bizaad", WritingScript.Latin),
|
|
707
|
+
L("ny", "nya", "Chichewa", "Chichewa", "Chichewa", WritingScript.Latin),
|
|
708
|
+
L("oc", "oci", "Occitan", "Occitanska", "Occitan", WritingScript.Latin),
|
|
709
|
+
L("oj", "oji", "Ojibwa", "Ojibwa", "\u140A\u14C2\u1511\u14C8\u142F\u14A7\u140E\u14D0", WritingScript.Canadian),
|
|
710
|
+
L("om", "orm", "Oromo", "Oromo", "Afaan Oromoo", WritingScript.Latin),
|
|
711
|
+
L("or", "ori", "Oriya", "Oriya", "\u0B13\u0B21\u0B3C\u0B3F\u0B06", WritingScript.Oriya),
|
|
712
|
+
L("os", "oss", "Ossetian", "Ossetiska", "\u0418\u0440\u043E\u043D", WritingScript.Cyrillic),
|
|
713
|
+
L("pa", "pan", "Punjabi", "Punjabi", "\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40", WritingScript.Gurmukhi),
|
|
714
|
+
L("pi", "pli", "Pali", "Pali", "\u092A\u093E\u0932\u093F", WritingScript.Devanagari),
|
|
715
|
+
L("pl", "pol", "Polish", "Polska", "Polski", WritingScript.Latin),
|
|
716
|
+
L("ps", "pus", "Pashto", "Pashto", "\u067E\u069A\u062A\u0648", WritingScript.Arabic, TextDirection.RightToLeft),
|
|
717
|
+
L("pt", "por", "Portuguese", "Portugisiska", "Portugu\xEAs", WritingScript.Latin),
|
|
718
|
+
L("qu", "que", "Quechua", "Quechua", "Runa Simi", WritingScript.Latin),
|
|
719
|
+
L("rm", "roh", "Romansh", "R\xE4toromanska", "Rumantsch", WritingScript.Latin),
|
|
720
|
+
L("rn", "run", "Rundi", "Kirundi", "Ikirundi", WritingScript.Latin),
|
|
721
|
+
L("ro", "ron", "Romanian", "Rum\xE4nska", "Rom\xE2n\u0103", WritingScript.Latin),
|
|
722
|
+
L("ru", "rus", "Russian", "Ryska", "\u0420\u0443\u0441\u0441\u043A\u0438\u0439", WritingScript.Cyrillic),
|
|
723
|
+
L("rw", "kin", "Kinyarwanda", "Kinyarwanda", "Ikinyarwanda", WritingScript.Latin),
|
|
724
|
+
L("sa", "san", "Sanskrit", "Sanskrit", "\u0938\u0902\u0938\u094D\u0915\u0943\u0924\u092E\u094D", WritingScript.Devanagari),
|
|
725
|
+
L("sc", "srd", "Sardinian", "Sardiska", "Sardu", WritingScript.Latin),
|
|
726
|
+
L("sd", "snd", "Sindhi", "Sindhi", "\u0633\u0646\u068C\u064A", WritingScript.Arabic, TextDirection.RightToLeft),
|
|
727
|
+
L("se", "sme", "Northern Sami", "Nordsamiska", "Davvis\xE1megiella", WritingScript.Latin),
|
|
728
|
+
L("sg", "sag", "Sango", "Sango", "Y\xE2ng\xE2 t\xEE S\xE4ng\xF6", WritingScript.Latin),
|
|
729
|
+
L("si", "sin", "Sinhala", "Singalesiska", "\u0DC3\u0DD2\u0D82\u0DC4\u0DBD", WritingScript.Sinhala),
|
|
730
|
+
L("sk", "slk", "Slovak", "Slovakiska", "Sloven\u010Dina", WritingScript.Latin),
|
|
731
|
+
L("sl", "slv", "Slovenian", "Slovenska", "Sloven\u0161\u010Dina", WritingScript.Latin),
|
|
732
|
+
L("sm", "smo", "Samoan", "Samoanska", "Gagana S\u0101moa", WritingScript.Latin),
|
|
733
|
+
L("sn", "sna", "Shona", "Shona", "ChiShona", WritingScript.Latin),
|
|
734
|
+
L("so", "som", "Somali", "Somaliska", "Soomaali", WritingScript.Latin),
|
|
735
|
+
L("sq", "sqi", "Albanian", "Albanska", "Shqip", WritingScript.Latin),
|
|
736
|
+
L("sr", "srp", "Serbian", "Serbiska", "\u0421\u0440\u043F\u0441\u043A\u0438", WritingScript.Cyrillic),
|
|
737
|
+
L("ss", "ssw", "Swati", "Swati", "SiSwati", WritingScript.Latin),
|
|
738
|
+
L("st", "sot", "Southern Sotho", "Sotho", "Sesotho", WritingScript.Latin),
|
|
739
|
+
L("su", "sun", "Sundanese", "Sundanesiska", "Basa Sunda", WritingScript.Latin),
|
|
740
|
+
L("sv", "swe", "Swedish", "Svenska", "Svenska", WritingScript.Latin),
|
|
741
|
+
L("sw", "swa", "Swahili", "Swahili", "Kiswahili", WritingScript.Latin),
|
|
742
|
+
L("ta", "tam", "Tamil", "Tamil", "\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD", WritingScript.Tamil),
|
|
743
|
+
L("te", "tel", "Telugu", "Telugu", "\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41", WritingScript.Telugu),
|
|
744
|
+
L("tg", "tgk", "Tajik", "Tadzjikiska", "\u0422\u043E\u04B7\u0438\u043A\u04E3", WritingScript.Cyrillic),
|
|
745
|
+
L("th", "tha", "Thai", "Thail\xE4ndska", "\u0E44\u0E17\u0E22", WritingScript.Thai),
|
|
746
|
+
L("ti", "tir", "Tigrinya", "Tigrinja", "\u1275\u130D\u122D\u129B", WritingScript.Ethiopic),
|
|
747
|
+
L("tk", "tuk", "Turkmen", "Turkmeniska", "T\xFCrkmen", WritingScript.Latin),
|
|
748
|
+
L("tl", "tgl", "Tagalog", "Tagalog", "Tagalog", WritingScript.Latin),
|
|
749
|
+
L("tn", "tsn", "Tswana", "Tswana", "Setswana", WritingScript.Latin),
|
|
750
|
+
L("to", "ton", "Tongan", "Tonganska", "Lea Faka-Tonga", WritingScript.Latin),
|
|
751
|
+
L("tr", "tur", "Turkish", "Turkiska", "T\xFCrk\xE7e", WritingScript.Latin),
|
|
752
|
+
L("ts", "tso", "Tsonga", "Tsonga", "Xitsonga", WritingScript.Latin),
|
|
753
|
+
L("tt", "tat", "Tatar", "Tatariska", "\u0422\u0430\u0442\u0430\u0440", WritingScript.Cyrillic),
|
|
754
|
+
L("tw", "twi", "Twi", "Twi", "Twi", WritingScript.Latin),
|
|
755
|
+
L("ty", "tah", "Tahitian", "Tahitiska", "Reo Tahiti", WritingScript.Latin),
|
|
756
|
+
L(
|
|
757
|
+
"ug",
|
|
758
|
+
"uig",
|
|
759
|
+
"Uyghur",
|
|
760
|
+
"Uiguriska",
|
|
761
|
+
"\u0626\u06C7\u064A\u063A\u06C7\u0631\u0686\u06D5",
|
|
762
|
+
WritingScript.Arabic,
|
|
763
|
+
TextDirection.RightToLeft
|
|
764
|
+
),
|
|
765
|
+
L("uk", "ukr", "Ukrainian", "Ukrainska", "\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430", WritingScript.Cyrillic),
|
|
766
|
+
L("ur", "urd", "Urdu", "Urdu", "\u0627\u0631\u062F\u0648", WritingScript.Arabic, TextDirection.RightToLeft),
|
|
767
|
+
L("uz", "uzb", "Uzbek", "Uzbekiska", "O\u02BBzbek", WritingScript.Latin),
|
|
768
|
+
L("ve", "ven", "Venda", "Venda", "Tshiven\u1E13a", WritingScript.Latin),
|
|
769
|
+
L("vi", "vie", "Vietnamese", "Vietnamesiska", "Ti\u1EBFng Vi\u1EC7t", WritingScript.Latin),
|
|
770
|
+
L("vo", "vol", "Volap\xFCk", "Volap\xFCk", "Volap\xFCk", WritingScript.Latin),
|
|
771
|
+
L("wa", "wln", "Walloon", "Vallonska", "Walon", WritingScript.Latin),
|
|
772
|
+
L("wo", "wol", "Wolof", "Wolof", "Wollof", WritingScript.Latin),
|
|
773
|
+
L("xh", "xho", "Xhosa", "Xhosa", "isiXhosa", WritingScript.Latin),
|
|
774
|
+
L("yi", "yid", "Yiddish", "Jiddisch", "\u05D9\u05D9\u05B4\u05D3\u05D9\u05E9", WritingScript.Hebrew, TextDirection.RightToLeft),
|
|
775
|
+
L("yo", "yor", "Yoruba", "Yoruba", "Yor\xF9b\xE1", WritingScript.Latin),
|
|
776
|
+
L("za", "zha", "Zhuang", "Zhuang", "Sa\u026F cue\u014B\u0185", WritingScript.Latin),
|
|
777
|
+
L("zh", "zho", "Chinese", "Kinesiska", "\u4E2D\u6587", WritingScript.Han),
|
|
778
|
+
L("zu", "zul", "Zulu", "Zulu", "isiZulu", WritingScript.Latin)
|
|
779
|
+
]);
|
|
780
|
+
var BY_KEY2 = (() => {
|
|
781
|
+
const m = /* @__PURE__ */ new Map();
|
|
782
|
+
for (const lang of ALL) {
|
|
783
|
+
m.set(lang.alpha2Code, lang);
|
|
784
|
+
m.set(lang.alpha3Code, lang);
|
|
785
|
+
m.set(lang.englishName.toLowerCase(), lang);
|
|
786
|
+
if (!m.has(lang.localizedName.toLowerCase())) {
|
|
787
|
+
m.set(lang.localizedName.toLowerCase(), lang);
|
|
788
|
+
}
|
|
789
|
+
if (lang.nativeName.toLowerCase() !== lang.englishName.toLowerCase() && !m.has(lang.nativeName.toLowerCase())) {
|
|
790
|
+
m.set(lang.nativeName.toLowerCase(), lang);
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
return m;
|
|
794
|
+
})();
|
|
795
|
+
var byA2 = (a2) => BY_KEY2.get(a2);
|
|
796
|
+
Language.Afrikaans = byA2("af");
|
|
797
|
+
Language.Albanian = byA2("sq");
|
|
798
|
+
Language.Arabic = byA2("ar");
|
|
799
|
+
Language.Bulgarian = byA2("bg");
|
|
800
|
+
Language.Catalan = byA2("ca");
|
|
801
|
+
Language.Chinese = byA2("zh");
|
|
802
|
+
Language.Croatian = byA2("hr");
|
|
803
|
+
Language.Czech = byA2("cs");
|
|
804
|
+
Language.Danish = byA2("da");
|
|
805
|
+
Language.Dutch = byA2("nl");
|
|
806
|
+
Language.English = byA2("en");
|
|
807
|
+
Language.Estonian = byA2("et");
|
|
808
|
+
Language.Faroese = byA2("fo");
|
|
809
|
+
Language.Finnish = byA2("fi");
|
|
810
|
+
Language.French = byA2("fr");
|
|
811
|
+
Language.German = byA2("de");
|
|
812
|
+
Language.Greek = byA2("el");
|
|
813
|
+
Language.Hindi = byA2("hi");
|
|
814
|
+
Language.Hungarian = byA2("hu");
|
|
815
|
+
Language.Icelandic = byA2("is");
|
|
816
|
+
Language.Italian = byA2("it");
|
|
817
|
+
Language.Japanese = byA2("ja");
|
|
818
|
+
Language.Korean = byA2("ko");
|
|
819
|
+
Language.Latvian = byA2("lv");
|
|
820
|
+
Language.Lithuanian = byA2("lt");
|
|
821
|
+
Language.NorthernSami = byA2("se");
|
|
822
|
+
Language.Norwegian = byA2("no");
|
|
823
|
+
Language.NorwegianBokmal = byA2("nb");
|
|
824
|
+
Language.NorwegianNynorsk = byA2("nn");
|
|
825
|
+
Language.Polish = byA2("pl");
|
|
826
|
+
Language.Portuguese = byA2("pt");
|
|
827
|
+
Language.Romanian = byA2("ro");
|
|
828
|
+
Language.Russian = byA2("ru");
|
|
829
|
+
Language.Slovak = byA2("sk");
|
|
830
|
+
Language.Slovenian = byA2("sl");
|
|
831
|
+
Language.Spanish = byA2("es");
|
|
832
|
+
Language.Swahili = byA2("sw");
|
|
833
|
+
Language.Swedish = byA2("sv");
|
|
834
|
+
Language.Turkish = byA2("tr");
|
|
835
|
+
Language.Ukrainian = byA2("uk");
|
|
836
|
+
|
|
837
|
+
// src/text-scanning/text-candidate-category.ts
|
|
838
|
+
var TextCandidateCategory = {
|
|
839
|
+
Geography: "Geography"};
|
|
840
|
+
|
|
841
|
+
// src/text-scanning/text-candidate.ts
|
|
842
|
+
var TextCandidate = class {
|
|
843
|
+
/** Zero-based start position in the scanned text. */
|
|
844
|
+
startIndex;
|
|
845
|
+
/** Number of characters in the original matched span. */
|
|
846
|
+
length;
|
|
847
|
+
/** The raw substring from the input text that was matched. */
|
|
848
|
+
originalText;
|
|
849
|
+
/**
|
|
850
|
+
* Short type name, e.g. `EmailAddress` or `SwedishPersonalIdentityNumber`.
|
|
851
|
+
*/
|
|
852
|
+
typeName;
|
|
853
|
+
/** Broad category of the matched type. */
|
|
854
|
+
category;
|
|
855
|
+
/** Machine-comparable canonical form of the matched value. */
|
|
856
|
+
normalizedForm;
|
|
857
|
+
/** Human-readable display form of the matched value. */
|
|
858
|
+
formattedForm;
|
|
859
|
+
/**
|
|
860
|
+
* Display form with sensitive content masked (e.g. `990807-****`).
|
|
861
|
+
* Produced by the type's `toMaskedString()` helper.
|
|
862
|
+
*/
|
|
863
|
+
maskedForm;
|
|
864
|
+
/** Heuristic confidence level. */
|
|
865
|
+
confidence;
|
|
866
|
+
/** The successfully parsed instance of the matched type. */
|
|
867
|
+
value;
|
|
868
|
+
constructor(opts) {
|
|
869
|
+
this.startIndex = opts.startIndex;
|
|
870
|
+
this.length = opts.length;
|
|
871
|
+
this.originalText = opts.originalText;
|
|
872
|
+
this.typeName = opts.typeName;
|
|
873
|
+
this.category = opts.category;
|
|
874
|
+
this.normalizedForm = opts.normalizedForm;
|
|
875
|
+
this.formattedForm = opts.formattedForm;
|
|
876
|
+
this.maskedForm = opts.maskedForm;
|
|
877
|
+
this.confidence = opts.confidence;
|
|
878
|
+
this.value = opts.value;
|
|
879
|
+
}
|
|
880
|
+
/** Exclusive end position (`startIndex + length`). */
|
|
881
|
+
get endIndex() {
|
|
882
|
+
return this.startIndex + this.length;
|
|
883
|
+
}
|
|
884
|
+
/** Returns `true` if this candidate's span overlaps with `other`. */
|
|
885
|
+
overlaps(other) {
|
|
886
|
+
return this.startIndex < other.endIndex && other.startIndex < this.endIndex;
|
|
887
|
+
}
|
|
888
|
+
/** Returns `true` if this candidate's span fully contains `other`. */
|
|
889
|
+
contains(other) {
|
|
890
|
+
return this.startIndex <= other.startIndex && this.endIndex >= other.endIndex;
|
|
891
|
+
}
|
|
892
|
+
};
|
|
893
|
+
|
|
894
|
+
// src/text-scanning/text-match-confidence.ts
|
|
895
|
+
var TextMatchConfidence = {
|
|
896
|
+
/**
|
|
897
|
+
* Pattern match only. High false-positive risk — the matched text merely
|
|
898
|
+
* fits a syntactic pattern (e.g. a run of digits that happens to be the
|
|
899
|
+
* right length).
|
|
900
|
+
*/
|
|
901
|
+
Low: 0};
|
|
902
|
+
|
|
903
|
+
// src/finance/currency.ts
|
|
904
|
+
var KNOWN_CURRENCIES = [
|
|
905
|
+
{ code: "SEK", en: "Swedish krona", sv: "Svensk krona", symbol: "kr", decimalPlaces: 2 },
|
|
906
|
+
{ code: "NOK", en: "Norwegian krone", sv: "Norsk krona", symbol: "kr", decimalPlaces: 2 },
|
|
907
|
+
{ code: "DKK", en: "Danish krone", sv: "Dansk krona", symbol: "kr", decimalPlaces: 2 },
|
|
908
|
+
{ code: "ISK", en: "Icelandic kr\xF3na", sv: "Isl\xE4ndsk krona", symbol: "kr", decimalPlaces: 0 },
|
|
909
|
+
{ code: "EUR", en: "Euro", sv: "Euro", symbol: "\u20AC", decimalPlaces: 2 },
|
|
910
|
+
{
|
|
911
|
+
code: "USD",
|
|
912
|
+
en: "United States dollar",
|
|
913
|
+
sv: "Amerikansk dollar",
|
|
914
|
+
symbol: "$",
|
|
915
|
+
decimalPlaces: 2
|
|
916
|
+
},
|
|
917
|
+
{ code: "GBP", en: "Pound sterling", sv: "Brittiskt pund", symbol: "\xA3", decimalPlaces: 2 },
|
|
918
|
+
{ code: "CHF", en: "Swiss franc", sv: "Schweizisk franc", symbol: "CHF", decimalPlaces: 2 },
|
|
919
|
+
{ code: "JPY", en: "Japanese yen", sv: "Japansk yen", symbol: "\xA5", decimalPlaces: 0 },
|
|
920
|
+
{ code: "CNY", en: "Chinese yuan", sv: "Kinesisk yuan", symbol: "\xA5", decimalPlaces: 2 },
|
|
921
|
+
{ code: "CAD", en: "Canadian dollar", sv: "Kanadensisk dollar", symbol: "CA$", decimalPlaces: 2 },
|
|
922
|
+
{ code: "AUD", en: "Australian dollar", sv: "Australisk dollar", symbol: "A$", decimalPlaces: 2 },
|
|
923
|
+
{
|
|
924
|
+
code: "NZD",
|
|
925
|
+
en: "New Zealand dollar",
|
|
926
|
+
sv: "Nyzeel\xE4ndsk dollar",
|
|
927
|
+
symbol: "NZ$",
|
|
928
|
+
decimalPlaces: 2
|
|
929
|
+
},
|
|
930
|
+
{ code: "PLN", en: "Polish z\u0142oty", sv: "Polsk zloty", symbol: "z\u0142", decimalPlaces: 2 },
|
|
931
|
+
{ code: "CZK", en: "Czech koruna", sv: "Tjeckisk koruna", symbol: "K\u010D", decimalPlaces: 2 },
|
|
932
|
+
{ code: "HUF", en: "Hungarian forint", sv: "Ungersk forint", symbol: "Ft", decimalPlaces: 2 },
|
|
933
|
+
{ code: "RON", en: "Romanian leu", sv: "Rum\xE4nsk leu", symbol: "lei", decimalPlaces: 2 },
|
|
934
|
+
{ code: "BGN", en: "Bulgarian lev", sv: "Bulgarisk lev", symbol: "\u043B\u0432", decimalPlaces: 2 },
|
|
935
|
+
{ code: "HRK", en: "Croatian kuna", sv: "Kroatisk kuna", symbol: "kn", decimalPlaces: 2 },
|
|
936
|
+
{ code: "TRY", en: "Turkish lira", sv: "Turkisk lira", symbol: "\u20BA", decimalPlaces: 2 },
|
|
937
|
+
{ code: "RUB", en: "Russian ruble", sv: "Rysk rubel", symbol: "\u20BD", decimalPlaces: 2 },
|
|
938
|
+
{ code: "INR", en: "Indian rupee", sv: "Indisk rupie", symbol: "\u20B9", decimalPlaces: 2 },
|
|
939
|
+
{ code: "BRL", en: "Brazilian real", sv: "Brasiliansk real", symbol: "R$", decimalPlaces: 2 },
|
|
940
|
+
{ code: "ZAR", en: "South African rand", sv: "Sydafrikansk rand", symbol: "R", decimalPlaces: 2 },
|
|
941
|
+
{ code: "MXN", en: "Mexican peso", sv: "Mexikansk peso", symbol: "MX$", decimalPlaces: 2 },
|
|
942
|
+
{
|
|
943
|
+
code: "SGD",
|
|
944
|
+
en: "Singapore dollar",
|
|
945
|
+
sv: "Singaporiansk dollar",
|
|
946
|
+
symbol: "S$",
|
|
947
|
+
decimalPlaces: 2
|
|
948
|
+
},
|
|
949
|
+
{ code: "HKD", en: "Hong Kong dollar", sv: "Hongkongdollar", symbol: "HK$", decimalPlaces: 2 },
|
|
950
|
+
{ code: "KRW", en: "South Korean won", sv: "Sydkoreansk won", symbol: "\u20A9", decimalPlaces: 0 },
|
|
951
|
+
{ code: "THB", en: "Thai baht", sv: "Thail\xE4ndsk baht", symbol: "\u0E3F", decimalPlaces: 2 },
|
|
952
|
+
{
|
|
953
|
+
code: "TWD",
|
|
954
|
+
en: "New Taiwan dollar",
|
|
955
|
+
sv: "Taiwanesisk dollar",
|
|
956
|
+
symbol: "NT$",
|
|
957
|
+
decimalPlaces: 2
|
|
958
|
+
},
|
|
959
|
+
{ code: "ILS", en: "Israeli new shekel", sv: "Israelisk shekel", symbol: "\u20AA", decimalPlaces: 2 },
|
|
960
|
+
{
|
|
961
|
+
code: "AED",
|
|
962
|
+
en: "United Arab Emirates dirham",
|
|
963
|
+
sv: "Emiratisk dirham",
|
|
964
|
+
symbol: "\u062F.\u0625",
|
|
965
|
+
decimalPlaces: 2
|
|
966
|
+
},
|
|
967
|
+
{ code: "SAR", en: "Saudi riyal", sv: "Saudisk riyal", symbol: "\uFDFC", decimalPlaces: 2 },
|
|
968
|
+
{ code: "PHP", en: "Philippine peso", sv: "Filippinsk peso", symbol: "\u20B1", decimalPlaces: 2 },
|
|
969
|
+
{ code: "IDR", en: "Indonesian rupiah", sv: "Indonesisk rupiah", symbol: "Rp", decimalPlaces: 2 },
|
|
970
|
+
{ code: "MYR", en: "Malaysian ringgit", sv: "Malaysisk ringgit", symbol: "RM", decimalPlaces: 2 },
|
|
971
|
+
{ code: "VND", en: "Vietnamese \u0111\u1ED3ng", sv: "Vietnamesisk dong", symbol: "\u20AB", decimalPlaces: 0 },
|
|
972
|
+
{ code: "UAH", en: "Ukrainian hryvnia", sv: "Ukrainsk hryvnia", symbol: "\u20B4", decimalPlaces: 2 },
|
|
973
|
+
{ code: "EGP", en: "Egyptian pound", sv: "Egyptiskt pund", symbol: "E\xA3", decimalPlaces: 2 },
|
|
974
|
+
{ code: "NGN", en: "Nigerian naira", sv: "Nigeriansk naira", symbol: "\u20A6", decimalPlaces: 2 },
|
|
975
|
+
{ code: "KES", en: "Kenyan shilling", sv: "Kenyansk shilling", symbol: "KSh", decimalPlaces: 2 },
|
|
976
|
+
{ code: "COP", en: "Colombian peso", sv: "Colombiansk peso", symbol: "CO$", decimalPlaces: 2 },
|
|
977
|
+
{ code: "ARS", en: "Argentine peso", sv: "Argentinsk peso", symbol: "AR$", decimalPlaces: 2 },
|
|
978
|
+
{ code: "CLP", en: "Chilean peso", sv: "Chilensk peso", symbol: "CL$", decimalPlaces: 0 },
|
|
979
|
+
{ code: "PEN", en: "Peruvian sol", sv: "Peruansk sol", symbol: "S/.", decimalPlaces: 2 }
|
|
980
|
+
];
|
|
981
|
+
var Currency = class _Currency {
|
|
982
|
+
static typeInfo = Object.freeze({
|
|
983
|
+
englishName: "Currency",
|
|
984
|
+
localizedName: "Valuta",
|
|
985
|
+
emoji: "\u{1F4B1}",
|
|
986
|
+
sources: Object.freeze([
|
|
987
|
+
"https://www.iso.org/iso-4217-currency-codes.html",
|
|
988
|
+
"https://en.wikipedia.org/wiki/ISO_4217"
|
|
989
|
+
])
|
|
990
|
+
});
|
|
991
|
+
code;
|
|
992
|
+
englishName;
|
|
993
|
+
localizedName;
|
|
994
|
+
symbol;
|
|
995
|
+
decimalPlaces;
|
|
996
|
+
constructor(row) {
|
|
997
|
+
this.code = row.code;
|
|
998
|
+
this.englishName = row.en;
|
|
999
|
+
this.localizedName = row.sv;
|
|
1000
|
+
this.symbol = row.symbol;
|
|
1001
|
+
this.decimalPlaces = row.decimalPlaces;
|
|
1002
|
+
}
|
|
1003
|
+
/** @internal */
|
|
1004
|
+
static _fromRow(row) {
|
|
1005
|
+
return new _Currency(row);
|
|
1006
|
+
}
|
|
1007
|
+
/** Display name in current UI culture (Swedish or English). */
|
|
1008
|
+
/**
|
|
1009
|
+
* The currency name as used in its issuing country. Falls back to
|
|
1010
|
+
* {@link englishName} when no issuing country is known.
|
|
1011
|
+
*/
|
|
1012
|
+
get nativeName() {
|
|
1013
|
+
const country = Country.all.find(
|
|
1014
|
+
(c) => c.currencyCode != null && c.currencyCode.toUpperCase() === this.code.toUpperCase()
|
|
1015
|
+
);
|
|
1016
|
+
if (country === void 0) return this.englishName;
|
|
1017
|
+
return country.nativeName === country.englishName ? this.englishName : this.localizedName;
|
|
1018
|
+
}
|
|
1019
|
+
get displayName() {
|
|
1020
|
+
return PrimitivesDefaults.useLocalizedDisplayNames ? this.localizedName : this.englishName;
|
|
1021
|
+
}
|
|
1022
|
+
static tryParse(input) {
|
|
1023
|
+
if (input == null || input.trim() === "") return null;
|
|
1024
|
+
const trimmed = sanitizeInput(input).trim();
|
|
1025
|
+
const byCode = BY_CODE.get(trimmed.toUpperCase());
|
|
1026
|
+
if (byCode) return byCode;
|
|
1027
|
+
const byName = BY_NAME.get(trimmed.toLowerCase());
|
|
1028
|
+
if (byName) return byName;
|
|
1029
|
+
return null;
|
|
1030
|
+
}
|
|
1031
|
+
static parse(input) {
|
|
1032
|
+
const r = _Currency.tryParse(input);
|
|
1033
|
+
if (r === null) throw new Error("Unknown currency.");
|
|
1034
|
+
return r;
|
|
1035
|
+
}
|
|
1036
|
+
static isValid(input) {
|
|
1037
|
+
return _Currency.tryParse(input) !== null;
|
|
1038
|
+
}
|
|
1039
|
+
static format(input, options) {
|
|
1040
|
+
const r = _Currency.tryParse(input);
|
|
1041
|
+
if (r) return r.displayName;
|
|
1042
|
+
if (options?.fallbackToTrimmedInputWhenInvalid && input != null && input.trim() !== "") {
|
|
1043
|
+
return input.trim();
|
|
1044
|
+
}
|
|
1045
|
+
return null;
|
|
1046
|
+
}
|
|
1047
|
+
static normalize(input, options) {
|
|
1048
|
+
const r = _Currency.tryParse(input);
|
|
1049
|
+
if (r) return r.code;
|
|
1050
|
+
if (options?.fallbackToTrimmedInputWhenInvalid && input != null && input.trim() !== "") {
|
|
1051
|
+
return input.trim();
|
|
1052
|
+
}
|
|
1053
|
+
return null;
|
|
1054
|
+
}
|
|
1055
|
+
static isNormalized(input) {
|
|
1056
|
+
return input != null && _Currency.normalize(input) === input;
|
|
1057
|
+
}
|
|
1058
|
+
/** All known currencies. */
|
|
1059
|
+
static get all() {
|
|
1060
|
+
return ALL_CURRENCIES;
|
|
1061
|
+
}
|
|
1062
|
+
/** @internal Lookup by symbol. */
|
|
1063
|
+
static tryParseSymbol(symbol) {
|
|
1064
|
+
if (symbol == null || symbol.trim() === "") return null;
|
|
1065
|
+
return BY_SYMBOL.get(symbol.trim().toLowerCase()) ?? null;
|
|
1066
|
+
}
|
|
1067
|
+
toNormalizedString() {
|
|
1068
|
+
return this.code;
|
|
1069
|
+
}
|
|
1070
|
+
toString() {
|
|
1071
|
+
return this.displayName;
|
|
1072
|
+
}
|
|
1073
|
+
toDisplayString() {
|
|
1074
|
+
return this.displayName;
|
|
1075
|
+
}
|
|
1076
|
+
toEnglishString() {
|
|
1077
|
+
return this.englishName;
|
|
1078
|
+
}
|
|
1079
|
+
toNativeString() {
|
|
1080
|
+
return this.nativeName;
|
|
1081
|
+
}
|
|
1082
|
+
equals(other) {
|
|
1083
|
+
return other != null && this.code === other.code;
|
|
1084
|
+
}
|
|
1085
|
+
compareTo(other) {
|
|
1086
|
+
if (other == null) return 1;
|
|
1087
|
+
return this.code < other.code ? -1 : this.code > other.code ? 1 : 0;
|
|
1088
|
+
}
|
|
1089
|
+
static get SEK() {
|
|
1090
|
+
return BY_CODE.get("SEK");
|
|
1091
|
+
}
|
|
1092
|
+
static get EUR() {
|
|
1093
|
+
return BY_CODE.get("EUR");
|
|
1094
|
+
}
|
|
1095
|
+
static get USD() {
|
|
1096
|
+
return BY_CODE.get("USD");
|
|
1097
|
+
}
|
|
1098
|
+
static get NOK() {
|
|
1099
|
+
return BY_CODE.get("NOK");
|
|
1100
|
+
}
|
|
1101
|
+
static get DKK() {
|
|
1102
|
+
return BY_CODE.get("DKK");
|
|
1103
|
+
}
|
|
1104
|
+
static get GBP() {
|
|
1105
|
+
return BY_CODE.get("GBP");
|
|
1106
|
+
}
|
|
1107
|
+
};
|
|
1108
|
+
var ALL_CURRENCIES = KNOWN_CURRENCIES.map((r) => Currency._fromRow(r));
|
|
1109
|
+
var BY_CODE = /* @__PURE__ */ new Map();
|
|
1110
|
+
for (const c of ALL_CURRENCIES) BY_CODE.set(c.code.toUpperCase(), c);
|
|
1111
|
+
var BY_NAME = /* @__PURE__ */ new Map();
|
|
1112
|
+
for (const c of ALL_CURRENCIES) {
|
|
1113
|
+
BY_NAME.set(c.englishName.toLowerCase(), c);
|
|
1114
|
+
BY_NAME.set(c.localizedName.toLowerCase(), c);
|
|
1115
|
+
}
|
|
1116
|
+
var BY_SYMBOL = /* @__PURE__ */ new Map();
|
|
1117
|
+
for (const c of ALL_CURRENCIES) {
|
|
1118
|
+
if (!BY_SYMBOL.has(c.symbol.toLowerCase())) BY_SYMBOL.set(c.symbol.toLowerCase(), c);
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
// src/geography/country-data.ts
|
|
1122
|
+
var C = (alpha2, alpha3, numeric, en, sv, native, callingCode, tld, continent) => ({ alpha2, alpha3, numeric, en, sv, native, callingCode, tld, continent });
|
|
1123
|
+
var COUNTRY_ROWS = [
|
|
1124
|
+
C("AF", "AFG", 4, "Afghanistan", "Afghanistan", "\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646", "93", ".af", Continent.Asia),
|
|
1125
|
+
C("AL", "ALB", 8, "Albania", "Albanien", "Shqip\xEBria", "355", ".al", Continent.Europe),
|
|
1126
|
+
C("DZ", "DZA", 12, "Algeria", "Algeriet", "\u0627\u0644\u062C\u0632\u0627\u0626\u0631", "213", ".dz", Continent.Africa),
|
|
1127
|
+
C(
|
|
1128
|
+
"AS",
|
|
1129
|
+
"ASM",
|
|
1130
|
+
16,
|
|
1131
|
+
"American Samoa",
|
|
1132
|
+
"Amerikanska Samoa",
|
|
1133
|
+
"American Samoa",
|
|
1134
|
+
"1",
|
|
1135
|
+
".as",
|
|
1136
|
+
Continent.Oceania
|
|
1137
|
+
),
|
|
1138
|
+
C("AD", "AND", 20, "Andorra", "Andorra", "Andorra", "376", ".ad", Continent.Europe),
|
|
1139
|
+
C("AO", "AGO", 24, "Angola", "Angola", "Angola", "244", ".ao", Continent.Africa),
|
|
1140
|
+
C(
|
|
1141
|
+
"AG",
|
|
1142
|
+
"ATG",
|
|
1143
|
+
28,
|
|
1144
|
+
"Antigua and Barbuda",
|
|
1145
|
+
"Antigua och Barbuda",
|
|
1146
|
+
"Antigua and Barbuda",
|
|
1147
|
+
"1",
|
|
1148
|
+
".ag",
|
|
1149
|
+
Continent.NorthAmerica
|
|
1150
|
+
),
|
|
1151
|
+
C("AR", "ARG", 32, "Argentina", "Argentina", "Argentina", "54", ".ar", Continent.SouthAmerica),
|
|
1152
|
+
C("AM", "ARM", 51, "Armenia", "Armenien", "\u0540\u0561\u0575\u0561\u057D\u057F\u0561\u0576", "374", ".am", Continent.Asia),
|
|
1153
|
+
C("AW", "ABW", 533, "Aruba", "Aruba", "Aruba", "297", ".aw", Continent.NorthAmerica),
|
|
1154
|
+
C("AU", "AUS", 36, "Australia", "Australien", "Australia", "61", ".au", Continent.Oceania),
|
|
1155
|
+
C("AT", "AUT", 40, "Austria", "\xD6sterrike", "\xD6sterreich", "43", ".at", Continent.Europe),
|
|
1156
|
+
C("AZ", "AZE", 31, "Azerbaijan", "Azerbajdzjan", "Az\u0259rbaycan", "994", ".az", Continent.Asia),
|
|
1157
|
+
C("BS", "BHS", 44, "Bahamas", "Bahamas", "Bahamas", "1", ".bs", Continent.NorthAmerica),
|
|
1158
|
+
C("BH", "BHR", 48, "Bahrain", "Bahrain", "\u0627\u0644\u0628\u062D\u0631\u064A\u0646", "973", ".bh", Continent.Asia),
|
|
1159
|
+
C("BD", "BGD", 50, "Bangladesh", "Bangladesh", "\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6", "880", ".bd", Continent.Asia),
|
|
1160
|
+
C("BB", "BRB", 52, "Barbados", "Barbados", "Barbados", "1", ".bb", Continent.NorthAmerica),
|
|
1161
|
+
C("BY", "BLR", 112, "Belarus", "Belarus", "\u0411\u0435\u043B\u0430\u0440\u0443\u0441\u044C", "375", ".by", Continent.Europe),
|
|
1162
|
+
C("BE", "BEL", 56, "Belgium", "Belgien", "Belgi\xEB", "32", ".be", Continent.Europe),
|
|
1163
|
+
C("BZ", "BLZ", 84, "Belize", "Belize", "Belize", "501", ".bz", Continent.NorthAmerica),
|
|
1164
|
+
C("BJ", "BEN", 204, "Benin", "Benin", "B\xE9nin", "229", ".bj", Continent.Africa),
|
|
1165
|
+
C("BM", "BMU", 60, "Bermuda", "Bermuda", "Bermuda", "1", ".bm", Continent.NorthAmerica),
|
|
1166
|
+
C("BT", "BTN", 64, "Bhutan", "Bhutan", "\u0F60\u0F56\u0FB2\u0F74\u0F42", "975", ".bt", Continent.Asia),
|
|
1167
|
+
C("BO", "BOL", 68, "Bolivia", "Bolivia", "Bolivia", "591", ".bo", Continent.SouthAmerica),
|
|
1168
|
+
C(
|
|
1169
|
+
"BA",
|
|
1170
|
+
"BIH",
|
|
1171
|
+
70,
|
|
1172
|
+
"Bosnia and Herzegovina",
|
|
1173
|
+
"Bosnien och Hercegovina",
|
|
1174
|
+
"Bosna i Hercegovina",
|
|
1175
|
+
"387",
|
|
1176
|
+
".ba",
|
|
1177
|
+
Continent.Europe
|
|
1178
|
+
),
|
|
1179
|
+
C("BW", "BWA", 72, "Botswana", "Botswana", "Botswana", "267", ".bw", Continent.Africa),
|
|
1180
|
+
C("BR", "BRA", 76, "Brazil", "Brasilien", "Brasil", "55", ".br", Continent.SouthAmerica),
|
|
1181
|
+
C("BN", "BRN", 96, "Brunei", "Brunei", "Brunei", "673", ".bn", Continent.Asia),
|
|
1182
|
+
C("BG", "BGR", 100, "Bulgaria", "Bulgarien", "\u0411\u044A\u043B\u0433\u0430\u0440\u0438\u044F", "359", ".bg", Continent.Europe),
|
|
1183
|
+
C(
|
|
1184
|
+
"BF",
|
|
1185
|
+
"BFA",
|
|
1186
|
+
854,
|
|
1187
|
+
"Burkina Faso",
|
|
1188
|
+
"Burkina Faso",
|
|
1189
|
+
"Burkina Faso",
|
|
1190
|
+
"226",
|
|
1191
|
+
".bf",
|
|
1192
|
+
Continent.Africa
|
|
1193
|
+
),
|
|
1194
|
+
C("BI", "BDI", 108, "Burundi", "Burundi", "Burundi", "257", ".bi", Continent.Africa),
|
|
1195
|
+
C("CV", "CPV", 132, "Cabo Verde", "Kap Verde", "Cabo Verde", "238", ".cv", Continent.Africa),
|
|
1196
|
+
C("KH", "KHM", 116, "Cambodia", "Kambodja", "\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6", "855", ".kh", Continent.Asia),
|
|
1197
|
+
C("CM", "CMR", 120, "Cameroon", "Kamerun", "Cameroun", "237", ".cm", Continent.Africa),
|
|
1198
|
+
C("CA", "CAN", 124, "Canada", "Kanada", "Canada", "1", ".ca", Continent.NorthAmerica),
|
|
1199
|
+
C(
|
|
1200
|
+
"CF",
|
|
1201
|
+
"CAF",
|
|
1202
|
+
140,
|
|
1203
|
+
"Central African Republic",
|
|
1204
|
+
"Centralafrikanska republiken",
|
|
1205
|
+
"R\xE9publique centrafricaine",
|
|
1206
|
+
"236",
|
|
1207
|
+
".cf",
|
|
1208
|
+
Continent.Africa
|
|
1209
|
+
),
|
|
1210
|
+
C("TD", "TCD", 148, "Chad", "Tchad", "Tchad", "235", ".td", Continent.Africa),
|
|
1211
|
+
C("CL", "CHL", 152, "Chile", "Chile", "Chile", "56", ".cl", Continent.SouthAmerica),
|
|
1212
|
+
C("CN", "CHN", 156, "China", "Kina", "\u4E2D\u56FD", "86", ".cn", Continent.Asia),
|
|
1213
|
+
C("CO", "COL", 170, "Colombia", "Colombia", "Colombia", "57", ".co", Continent.SouthAmerica),
|
|
1214
|
+
C("KM", "COM", 174, "Comoros", "Komorerna", "Komori", "269", ".km", Continent.Africa),
|
|
1215
|
+
C("CG", "COG", 178, "Congo", "Kongo", "Congo", "242", ".cg", Continent.Africa),
|
|
1216
|
+
C(
|
|
1217
|
+
"CD",
|
|
1218
|
+
"COD",
|
|
1219
|
+
180,
|
|
1220
|
+
"Congo (Democratic Republic)",
|
|
1221
|
+
"Demokratiska republiken Kongo",
|
|
1222
|
+
"R\xE9publique d\xE9mocratique du Congo",
|
|
1223
|
+
"243",
|
|
1224
|
+
".cd",
|
|
1225
|
+
Continent.Africa
|
|
1226
|
+
),
|
|
1227
|
+
C(
|
|
1228
|
+
"CR",
|
|
1229
|
+
"CRI",
|
|
1230
|
+
188,
|
|
1231
|
+
"Costa Rica",
|
|
1232
|
+
"Costa Rica",
|
|
1233
|
+
"Costa Rica",
|
|
1234
|
+
"506",
|
|
1235
|
+
".cr",
|
|
1236
|
+
Continent.NorthAmerica
|
|
1237
|
+
),
|
|
1238
|
+
C(
|
|
1239
|
+
"CI",
|
|
1240
|
+
"CIV",
|
|
1241
|
+
384,
|
|
1242
|
+
"C\xF4te d'Ivoire",
|
|
1243
|
+
"Elfenbenskusten",
|
|
1244
|
+
"C\xF4te d'Ivoire",
|
|
1245
|
+
"225",
|
|
1246
|
+
".ci",
|
|
1247
|
+
Continent.Africa
|
|
1248
|
+
),
|
|
1249
|
+
C("HR", "HRV", 191, "Croatia", "Kroatien", "Hrvatska", "385", ".hr", Continent.Europe),
|
|
1250
|
+
C("CU", "CUB", 192, "Cuba", "Kuba", "Cuba", "53", ".cu", Continent.NorthAmerica),
|
|
1251
|
+
C("CW", "CUW", 531, "Cura\xE7ao", "Cura\xE7ao", "Cura\xE7ao", "599", ".cw", Continent.NorthAmerica),
|
|
1252
|
+
C("CY", "CYP", 196, "Cyprus", "Cypern", "\u039A\u03CD\u03C0\u03C1\u03BF\u03C2", "357", ".cy", Continent.Europe),
|
|
1253
|
+
C("CZ", "CZE", 203, "Czechia", "Tjeckien", "\u010Cesko", "420", ".cz", Continent.Europe),
|
|
1254
|
+
C("DK", "DNK", 208, "Denmark", "Danmark", "Danmark", "45", ".dk", Continent.Europe),
|
|
1255
|
+
C("DJ", "DJI", 262, "Djibouti", "Djibouti", "Djibouti", "253", ".dj", Continent.Africa),
|
|
1256
|
+
C("DM", "DMA", 212, "Dominica", "Dominica", "Dominica", "1", ".dm", Continent.NorthAmerica),
|
|
1257
|
+
C(
|
|
1258
|
+
"DO",
|
|
1259
|
+
"DOM",
|
|
1260
|
+
214,
|
|
1261
|
+
"Dominican Republic",
|
|
1262
|
+
"Dominikanska republiken",
|
|
1263
|
+
"Rep\xFAblica Dominicana",
|
|
1264
|
+
"1",
|
|
1265
|
+
".do",
|
|
1266
|
+
Continent.NorthAmerica
|
|
1267
|
+
),
|
|
1268
|
+
C("EC", "ECU", 218, "Ecuador", "Ecuador", "Ecuador", "593", ".ec", Continent.SouthAmerica),
|
|
1269
|
+
C("EG", "EGY", 818, "Egypt", "Egypten", "\u0645\u0635\u0631", "20", ".eg", Continent.Africa),
|
|
1270
|
+
C(
|
|
1271
|
+
"SV",
|
|
1272
|
+
"SLV",
|
|
1273
|
+
222,
|
|
1274
|
+
"El Salvador",
|
|
1275
|
+
"El Salvador",
|
|
1276
|
+
"El Salvador",
|
|
1277
|
+
"503",
|
|
1278
|
+
".sv",
|
|
1279
|
+
Continent.NorthAmerica
|
|
1280
|
+
),
|
|
1281
|
+
C(
|
|
1282
|
+
"GQ",
|
|
1283
|
+
"GNQ",
|
|
1284
|
+
226,
|
|
1285
|
+
"Equatorial Guinea",
|
|
1286
|
+
"Ekvatorialguinea",
|
|
1287
|
+
"Guinea Ecuatorial",
|
|
1288
|
+
"240",
|
|
1289
|
+
".gq",
|
|
1290
|
+
Continent.Africa
|
|
1291
|
+
),
|
|
1292
|
+
C("ER", "ERI", 232, "Eritrea", "Eritrea", "\u12A4\u122D\u1275\u122B", "291", ".er", Continent.Africa),
|
|
1293
|
+
C("EE", "EST", 233, "Estonia", "Estland", "Eesti", "372", ".ee", Continent.Europe),
|
|
1294
|
+
C("SZ", "SWZ", 748, "Eswatini", "Eswatini", "eSwatini", "268", ".sz", Continent.Africa),
|
|
1295
|
+
C("ET", "ETH", 231, "Ethiopia", "Etiopien", "\u12A2\u1275\u12EE\u1335\u12EB", "251", ".et", Continent.Africa),
|
|
1296
|
+
C("FJ", "FJI", 242, "Fiji", "Fiji", "Fiji", "679", ".fj", Continent.Oceania),
|
|
1297
|
+
C("FI", "FIN", 246, "Finland", "Finland", "Suomi", "358", ".fi", Continent.Europe),
|
|
1298
|
+
C("FR", "FRA", 250, "France", "Frankrike", "France", "33", ".fr", Continent.Europe),
|
|
1299
|
+
C("GA", "GAB", 266, "Gabon", "Gabon", "Gabon", "241", ".ga", Continent.Africa),
|
|
1300
|
+
C("GM", "GMB", 270, "Gambia", "Gambia", "Gambia", "220", ".gm", Continent.Africa),
|
|
1301
|
+
C("GE", "GEO", 268, "Georgia", "Georgien", "\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD", "995", ".ge", Continent.Asia),
|
|
1302
|
+
C("DE", "DEU", 276, "Germany", "Tyskland", "Deutschland", "49", ".de", Continent.Europe),
|
|
1303
|
+
C("GH", "GHA", 288, "Ghana", "Ghana", "Ghana", "233", ".gh", Continent.Africa),
|
|
1304
|
+
C("GI", "GIB", 292, "Gibraltar", "Gibraltar", "Gibraltar", "350", ".gi", Continent.Europe),
|
|
1305
|
+
C("GR", "GRC", 300, "Greece", "Grekland", "\u0395\u03BB\u03BB\u03AC\u03B4\u03B1", "30", ".gr", Continent.Europe),
|
|
1306
|
+
C(
|
|
1307
|
+
"GL",
|
|
1308
|
+
"GRL",
|
|
1309
|
+
304,
|
|
1310
|
+
"Greenland",
|
|
1311
|
+
"Gr\xF6nland",
|
|
1312
|
+
"Kalaallit Nunaat",
|
|
1313
|
+
"299",
|
|
1314
|
+
".gl",
|
|
1315
|
+
Continent.NorthAmerica
|
|
1316
|
+
),
|
|
1317
|
+
C("GD", "GRD", 308, "Grenada", "Grenada", "Grenada", "1", ".gd", Continent.NorthAmerica),
|
|
1318
|
+
C("GU", "GUM", 316, "Guam", "Guam", "Guam", "1", ".gu", Continent.Oceania),
|
|
1319
|
+
C("GT", "GTM", 320, "Guatemala", "Guatemala", "Guatemala", "502", ".gt", Continent.NorthAmerica),
|
|
1320
|
+
C("GG", "GGY", 831, "Guernsey", "Guernsey", "Guernsey", "44", ".gg", Continent.Europe),
|
|
1321
|
+
C("GN", "GIN", 324, "Guinea", "Guinea", "Guin\xE9e", "224", ".gn", Continent.Africa),
|
|
1322
|
+
C(
|
|
1323
|
+
"GW",
|
|
1324
|
+
"GNB",
|
|
1325
|
+
624,
|
|
1326
|
+
"Guinea-Bissau",
|
|
1327
|
+
"Guinea-Bissau",
|
|
1328
|
+
"Guin\xE9-Bissau",
|
|
1329
|
+
"245",
|
|
1330
|
+
".gw",
|
|
1331
|
+
Continent.Africa
|
|
1332
|
+
),
|
|
1333
|
+
C("GY", "GUY", 328, "Guyana", "Guyana", "Guyana", "592", ".gy", Continent.SouthAmerica),
|
|
1334
|
+
C("HT", "HTI", 332, "Haiti", "Haiti", "Ha\xEFti", "509", ".ht", Continent.NorthAmerica),
|
|
1335
|
+
C("HN", "HND", 340, "Honduras", "Honduras", "Honduras", "504", ".hn", Continent.NorthAmerica),
|
|
1336
|
+
C("HK", "HKG", 344, "Hong Kong", "Hongkong", "\u9999\u6E2F", "852", ".hk", Continent.Asia),
|
|
1337
|
+
C("HU", "HUN", 348, "Hungary", "Ungern", "Magyarorsz\xE1g", "36", ".hu", Continent.Europe),
|
|
1338
|
+
C("IS", "ISL", 352, "Iceland", "Island", "\xCDsland", "354", ".is", Continent.Europe),
|
|
1339
|
+
C("IN", "IND", 356, "India", "Indien", "\u092D\u093E\u0930\u0924", "91", ".in", Continent.Asia),
|
|
1340
|
+
C("ID", "IDN", 360, "Indonesia", "Indonesien", "Indonesia", "62", ".id", Continent.Asia),
|
|
1341
|
+
C("IR", "IRN", 364, "Iran", "Iran", "\u0627\u06CC\u0631\u0627\u0646", "98", ".ir", Continent.Asia),
|
|
1342
|
+
C("IQ", "IRQ", 368, "Iraq", "Irak", "\u0627\u0644\u0639\u0631\u0627\u0642", "964", ".iq", Continent.Asia),
|
|
1343
|
+
C("IE", "IRL", 372, "Ireland", "Irland", "\xC9ire", "353", ".ie", Continent.Europe),
|
|
1344
|
+
C("IM", "IMN", 833, "Isle of Man", "Isle of Man", "Isle of Man", "44", ".im", Continent.Europe),
|
|
1345
|
+
C("IL", "ISR", 376, "Israel", "Israel", "\u05D9\u05E9\u05E8\u05D0\u05DC", "972", ".il", Continent.Asia),
|
|
1346
|
+
C("IT", "ITA", 380, "Italy", "Italien", "Italia", "39", ".it", Continent.Europe),
|
|
1347
|
+
C("JM", "JAM", 388, "Jamaica", "Jamaica", "Jamaica", "1", ".jm", Continent.NorthAmerica),
|
|
1348
|
+
C("JP", "JPN", 392, "Japan", "Japan", "\u65E5\u672C", "81", ".jp", Continent.Asia),
|
|
1349
|
+
C("JE", "JEY", 832, "Jersey", "Jersey", "Jersey", "44", ".je", Continent.Europe),
|
|
1350
|
+
C("JO", "JOR", 400, "Jordan", "Jordanien", "\u0627\u0644\u0623\u0631\u062F\u0646", "962", ".jo", Continent.Asia),
|
|
1351
|
+
C("KZ", "KAZ", 398, "Kazakhstan", "Kazakstan", "\u049A\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D", "7", ".kz", Continent.Asia),
|
|
1352
|
+
C("KE", "KEN", 404, "Kenya", "Kenya", "Kenya", "254", ".ke", Continent.Africa),
|
|
1353
|
+
C("KI", "KIR", 296, "Kiribati", "Kiribati", "Kiribati", "686", ".ki", Continent.Oceania),
|
|
1354
|
+
C("KP", "PRK", 408, "North Korea", "Nordkorea", "\uC870\uC120", "850", ".kp", Continent.Asia),
|
|
1355
|
+
C("KR", "KOR", 410, "South Korea", "Sydkorea", "\uB300\uD55C\uBBFC\uAD6D", "82", ".kr", Continent.Asia),
|
|
1356
|
+
C("KW", "KWT", 414, "Kuwait", "Kuwait", "\u0627\u0644\u0643\u0648\u064A\u062A", "965", ".kw", Continent.Asia),
|
|
1357
|
+
C("KG", "KGZ", 417, "Kyrgyzstan", "Kirgizistan", "\u041A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D", "996", ".kg", Continent.Asia),
|
|
1358
|
+
C("LA", "LAO", 418, "Laos", "Laos", "\u0EA5\u0EB2\u0EA7", "856", ".la", Continent.Asia),
|
|
1359
|
+
C("LV", "LVA", 428, "Latvia", "Lettland", "Latvija", "371", ".lv", Continent.Europe),
|
|
1360
|
+
C("LB", "LBN", 422, "Lebanon", "Libanon", "\u0644\u0628\u0646\u0627\u0646", "961", ".lb", Continent.Asia),
|
|
1361
|
+
C("LS", "LSO", 426, "Lesotho", "Lesotho", "Lesotho", "266", ".ls", Continent.Africa),
|
|
1362
|
+
C("LR", "LBR", 430, "Liberia", "Liberia", "Liberia", "231", ".lr", Continent.Africa),
|
|
1363
|
+
C("LY", "LBY", 434, "Libya", "Libyen", "\u0644\u064A\u0628\u064A\u0627", "218", ".ly", Continent.Africa),
|
|
1364
|
+
C(
|
|
1365
|
+
"LI",
|
|
1366
|
+
"LIE",
|
|
1367
|
+
438,
|
|
1368
|
+
"Liechtenstein",
|
|
1369
|
+
"Liechtenstein",
|
|
1370
|
+
"Liechtenstein",
|
|
1371
|
+
"423",
|
|
1372
|
+
".li",
|
|
1373
|
+
Continent.Europe
|
|
1374
|
+
),
|
|
1375
|
+
C("LT", "LTU", 440, "Lithuania", "Litauen", "Lietuva", "370", ".lt", Continent.Europe),
|
|
1376
|
+
C("LU", "LUX", 442, "Luxembourg", "Luxemburg", "L\xEBtzebuerg", "352", ".lu", Continent.Europe),
|
|
1377
|
+
C("MO", "MAC", 446, "Macao", "Macao", "\u6FB3\u9580", "853", ".mo", Continent.Asia),
|
|
1378
|
+
C("MG", "MDG", 450, "Madagascar", "Madagaskar", "Madagasikara", "261", ".mg", Continent.Africa),
|
|
1379
|
+
C("MW", "MWI", 454, "Malawi", "Malawi", "Malawi", "265", ".mw", Continent.Africa),
|
|
1380
|
+
C("MY", "MYS", 458, "Malaysia", "Malaysia", "Malaysia", "60", ".my", Continent.Asia),
|
|
1381
|
+
C("MV", "MDV", 462, "Maldives", "Maldiverna", "\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AC", "960", ".mv", Continent.Asia),
|
|
1382
|
+
C("ML", "MLI", 466, "Mali", "Mali", "Mali", "223", ".ml", Continent.Africa),
|
|
1383
|
+
C("MT", "MLT", 470, "Malta", "Malta", "Malta", "356", ".mt", Continent.Europe),
|
|
1384
|
+
C(
|
|
1385
|
+
"MH",
|
|
1386
|
+
"MHL",
|
|
1387
|
+
584,
|
|
1388
|
+
"Marshall Islands",
|
|
1389
|
+
"Marshall\xF6arna",
|
|
1390
|
+
"Marshall Islands",
|
|
1391
|
+
"692",
|
|
1392
|
+
".mh",
|
|
1393
|
+
Continent.Oceania
|
|
1394
|
+
),
|
|
1395
|
+
C("MR", "MRT", 478, "Mauritania", "Mauretanien", "\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627", "222", ".mr", Continent.Africa),
|
|
1396
|
+
C("MU", "MUS", 480, "Mauritius", "Mauritius", "Maurice", "230", ".mu", Continent.Africa),
|
|
1397
|
+
C("MX", "MEX", 484, "Mexico", "Mexiko", "M\xE9xico", "52", ".mx", Continent.NorthAmerica),
|
|
1398
|
+
C("FM", "FSM", 583, "Micronesia", "Mikronesien", "Micronesia", "691", ".fm", Continent.Oceania),
|
|
1399
|
+
C("MD", "MDA", 498, "Moldova", "Moldavien", "Moldova", "373", ".md", Continent.Europe),
|
|
1400
|
+
C("MC", "MCO", 492, "Monaco", "Monaco", "Monaco", "377", ".mc", Continent.Europe),
|
|
1401
|
+
C("MN", "MNG", 496, "Mongolia", "Mongoliet", "\u041C\u043E\u043D\u0433\u043E\u043B", "976", ".mn", Continent.Asia),
|
|
1402
|
+
C("ME", "MNE", 499, "Montenegro", "Montenegro", "Crna Gora", "382", ".me", Continent.Europe),
|
|
1403
|
+
C("MA", "MAR", 504, "Morocco", "Marocko", "\u0627\u0644\u0645\u063A\u0631\u0628", "212", ".ma", Continent.Africa),
|
|
1404
|
+
C("MZ", "MOZ", 508, "Mozambique", "Mo\xE7ambique", "Mo\xE7ambique", "258", ".mz", Continent.Africa),
|
|
1405
|
+
C("MM", "MMR", 104, "Myanmar", "Myanmar", "\u1019\u103C\u1014\u103A\u1019\u102C", "95", ".mm", Continent.Asia),
|
|
1406
|
+
C("NA", "NAM", 516, "Namibia", "Namibia", "Namibia", "264", ".na", Continent.Africa),
|
|
1407
|
+
C("NR", "NRU", 520, "Nauru", "Nauru", "Nauru", "674", ".nr", Continent.Oceania),
|
|
1408
|
+
C("NP", "NPL", 524, "Nepal", "Nepal", "\u0928\u0947\u092A\u093E\u0932", "977", ".np", Continent.Asia),
|
|
1409
|
+
C("NL", "NLD", 528, "Netherlands", "Nederl\xE4nderna", "Nederland", "31", ".nl", Continent.Europe),
|
|
1410
|
+
C("NZ", "NZL", 554, "New Zealand", "Nya Zeeland", "Aotearoa", "64", ".nz", Continent.Oceania),
|
|
1411
|
+
C("NI", "NIC", 558, "Nicaragua", "Nicaragua", "Nicaragua", "505", ".ni", Continent.NorthAmerica),
|
|
1412
|
+
C("NE", "NER", 562, "Niger", "Niger", "Niger", "227", ".ne", Continent.Africa),
|
|
1413
|
+
C("NG", "NGA", 566, "Nigeria", "Nigeria", "Nigeria", "234", ".ng", Continent.Africa),
|
|
1414
|
+
C(
|
|
1415
|
+
"MK",
|
|
1416
|
+
"MKD",
|
|
1417
|
+
807,
|
|
1418
|
+
"North Macedonia",
|
|
1419
|
+
"Nordmakedonien",
|
|
1420
|
+
"\u0421\u0435\u0432\u0435\u0440\u043D\u0430 \u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430",
|
|
1421
|
+
"389",
|
|
1422
|
+
".mk",
|
|
1423
|
+
Continent.Europe
|
|
1424
|
+
),
|
|
1425
|
+
C("NO", "NOR", 578, "Norway", "Norge", "Norge", "47", ".no", Continent.Europe),
|
|
1426
|
+
C("OM", "OMN", 512, "Oman", "Oman", "\u0639\u0645\u0627\u0646", "968", ".om", Continent.Asia),
|
|
1427
|
+
C("PK", "PAK", 586, "Pakistan", "Pakistan", "\u067E\u0627\u06A9\u0633\u062A\u0627\u0646", "92", ".pk", Continent.Asia),
|
|
1428
|
+
C("PW", "PLW", 585, "Palau", "Palau", "Palau", "680", ".pw", Continent.Oceania),
|
|
1429
|
+
C("PS", "PSE", 275, "Palestine", "Palestina", "\u0641\u0644\u0633\u0637\u064A\u0646", "970", ".ps", Continent.Asia),
|
|
1430
|
+
C("PA", "PAN", 591, "Panama", "Panama", "Panam\xE1", "507", ".pa", Continent.NorthAmerica),
|
|
1431
|
+
C(
|
|
1432
|
+
"PG",
|
|
1433
|
+
"PNG",
|
|
1434
|
+
598,
|
|
1435
|
+
"Papua New Guinea",
|
|
1436
|
+
"Papua Nya Guinea",
|
|
1437
|
+
"Papua Niugini",
|
|
1438
|
+
"675",
|
|
1439
|
+
".pg",
|
|
1440
|
+
Continent.Oceania
|
|
1441
|
+
),
|
|
1442
|
+
C("PY", "PRY", 600, "Paraguay", "Paraguay", "Paraguay", "595", ".py", Continent.SouthAmerica),
|
|
1443
|
+
C("PE", "PER", 604, "Peru", "Peru", "Per\xFA", "51", ".pe", Continent.SouthAmerica),
|
|
1444
|
+
C("PH", "PHL", 608, "Philippines", "Filippinerna", "Pilipinas", "63", ".ph", Continent.Asia),
|
|
1445
|
+
C("PL", "POL", 616, "Poland", "Polen", "Polska", "48", ".pl", Continent.Europe),
|
|
1446
|
+
C("PT", "PRT", 620, "Portugal", "Portugal", "Portugal", "351", ".pt", Continent.Europe),
|
|
1447
|
+
C(
|
|
1448
|
+
"PR",
|
|
1449
|
+
"PRI",
|
|
1450
|
+
630,
|
|
1451
|
+
"Puerto Rico",
|
|
1452
|
+
"Puerto Rico",
|
|
1453
|
+
"Puerto Rico",
|
|
1454
|
+
"1",
|
|
1455
|
+
".pr",
|
|
1456
|
+
Continent.NorthAmerica
|
|
1457
|
+
),
|
|
1458
|
+
C("QA", "QAT", 634, "Qatar", "Qatar", "\u0642\u0637\u0631", "974", ".qa", Continent.Asia),
|
|
1459
|
+
C("RO", "ROU", 642, "Romania", "Rum\xE4nien", "Rom\xE2nia", "40", ".ro", Continent.Europe),
|
|
1460
|
+
C("RU", "RUS", 643, "Russia", "Ryssland", "\u0420\u043E\u0441\u0441\u0438\u044F", "7", ".ru", Continent.Europe),
|
|
1461
|
+
C("RW", "RWA", 646, "Rwanda", "Rwanda", "Rwanda", "250", ".rw", Continent.Africa),
|
|
1462
|
+
C(
|
|
1463
|
+
"KN",
|
|
1464
|
+
"KNA",
|
|
1465
|
+
659,
|
|
1466
|
+
"Saint Kitts and Nevis",
|
|
1467
|
+
"Saint Kitts och Nevis",
|
|
1468
|
+
"Saint Kitts and Nevis",
|
|
1469
|
+
"1",
|
|
1470
|
+
".kn",
|
|
1471
|
+
Continent.NorthAmerica
|
|
1472
|
+
),
|
|
1473
|
+
C(
|
|
1474
|
+
"LC",
|
|
1475
|
+
"LCA",
|
|
1476
|
+
662,
|
|
1477
|
+
"Saint Lucia",
|
|
1478
|
+
"Saint Lucia",
|
|
1479
|
+
"Saint Lucia",
|
|
1480
|
+
"1",
|
|
1481
|
+
".lc",
|
|
1482
|
+
Continent.NorthAmerica
|
|
1483
|
+
),
|
|
1484
|
+
C(
|
|
1485
|
+
"VC",
|
|
1486
|
+
"VCT",
|
|
1487
|
+
670,
|
|
1488
|
+
"Saint Vincent and the Grenadines",
|
|
1489
|
+
"Saint Vincent och Grenadinerna",
|
|
1490
|
+
"Saint Vincent and the Grenadines",
|
|
1491
|
+
"1",
|
|
1492
|
+
".vc",
|
|
1493
|
+
Continent.NorthAmerica
|
|
1494
|
+
),
|
|
1495
|
+
C("WS", "WSM", 882, "Samoa", "Samoa", "S\u0101moa", "685", ".ws", Continent.Oceania),
|
|
1496
|
+
C("SM", "SMR", 674, "San Marino", "San Marino", "San Marino", "378", ".sm", Continent.Europe),
|
|
1497
|
+
C(
|
|
1498
|
+
"ST",
|
|
1499
|
+
"STP",
|
|
1500
|
+
678,
|
|
1501
|
+
"S\xE3o Tom\xE9 and Pr\xEDncipe",
|
|
1502
|
+
"S\xE3o Tom\xE9 och Pr\xEDncipe",
|
|
1503
|
+
"S\xE3o Tom\xE9 e Pr\xEDncipe",
|
|
1504
|
+
"239",
|
|
1505
|
+
".st",
|
|
1506
|
+
Continent.Africa
|
|
1507
|
+
),
|
|
1508
|
+
C("SA", "SAU", 682, "Saudi Arabia", "Saudiarabien", "\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629", "966", ".sa", Continent.Asia),
|
|
1509
|
+
C("SN", "SEN", 686, "Senegal", "Senegal", "S\xE9n\xE9gal", "221", ".sn", Continent.Africa),
|
|
1510
|
+
C("RS", "SRB", 688, "Serbia", "Serbien", "\u0421\u0440\u0431\u0438\u0458\u0430", "381", ".rs", Continent.Europe),
|
|
1511
|
+
C("SC", "SYC", 690, "Seychelles", "Seychellerna", "Seychelles", "248", ".sc", Continent.Africa),
|
|
1512
|
+
C(
|
|
1513
|
+
"SL",
|
|
1514
|
+
"SLE",
|
|
1515
|
+
694,
|
|
1516
|
+
"Sierra Leone",
|
|
1517
|
+
"Sierra Leone",
|
|
1518
|
+
"Sierra Leone",
|
|
1519
|
+
"232",
|
|
1520
|
+
".sl",
|
|
1521
|
+
Continent.Africa
|
|
1522
|
+
),
|
|
1523
|
+
C("SG", "SGP", 702, "Singapore", "Singapore", "Singapore", "65", ".sg", Continent.Asia),
|
|
1524
|
+
C("SK", "SVK", 703, "Slovakia", "Slovakien", "Slovensko", "421", ".sk", Continent.Europe),
|
|
1525
|
+
C("SI", "SVN", 705, "Slovenia", "Slovenien", "Slovenija", "386", ".si", Continent.Europe),
|
|
1526
|
+
C(
|
|
1527
|
+
"SB",
|
|
1528
|
+
"SLB",
|
|
1529
|
+
90,
|
|
1530
|
+
"Solomon Islands",
|
|
1531
|
+
"Salomon\xF6arna",
|
|
1532
|
+
"Solomon Islands",
|
|
1533
|
+
"677",
|
|
1534
|
+
".sb",
|
|
1535
|
+
Continent.Oceania
|
|
1536
|
+
),
|
|
1537
|
+
C("SO", "SOM", 706, "Somalia", "Somalia", "Soomaaliya", "252", ".so", Continent.Africa),
|
|
1538
|
+
C("ZA", "ZAF", 710, "South Africa", "Sydafrika", "Suid-Afrika", "27", ".za", Continent.Africa),
|
|
1539
|
+
C("SS", "SSD", 728, "South Sudan", "Sydsudan", "South Sudan", "211", ".ss", Continent.Africa),
|
|
1540
|
+
C("ES", "ESP", 724, "Spain", "Spanien", "Espa\xF1a", "34", ".es", Continent.Europe),
|
|
1541
|
+
C("LK", "LKA", 144, "Sri Lanka", "Sri Lanka", "\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0", "94", ".lk", Continent.Asia),
|
|
1542
|
+
C("SD", "SDN", 729, "Sudan", "Sudan", "\u0627\u0644\u0633\u0648\u062F\u0627\u0646", "249", ".sd", Continent.Africa),
|
|
1543
|
+
C("SR", "SUR", 740, "Suriname", "Surinam", "Suriname", "597", ".sr", Continent.SouthAmerica),
|
|
1544
|
+
C("SE", "SWE", 752, "Sweden", "Sverige", "Sverige", "46", ".se", Continent.Europe),
|
|
1545
|
+
C("CH", "CHE", 756, "Switzerland", "Schweiz", "Schweiz", "41", ".ch", Continent.Europe),
|
|
1546
|
+
C("SY", "SYR", 760, "Syria", "Syrien", "\u0633\u0648\u0631\u064A\u0627", "963", ".sy", Continent.Asia),
|
|
1547
|
+
C("TW", "TWN", 158, "Taiwan", "Taiwan", "\u81FA\u7063", "886", ".tw", Continent.Asia),
|
|
1548
|
+
C("TJ", "TJK", 762, "Tajikistan", "Tadzjikistan", "\u0422\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D", "992", ".tj", Continent.Asia),
|
|
1549
|
+
C("TZ", "TZA", 834, "Tanzania", "Tanzania", "Tanzania", "255", ".tz", Continent.Africa),
|
|
1550
|
+
C("TH", "THA", 764, "Thailand", "Thailand", "\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E44\u0E17\u0E22", "66", ".th", Continent.Asia),
|
|
1551
|
+
C("TL", "TLS", 626, "Timor-Leste", "\xD6sttimor", "Timor-Leste", "670", ".tl", Continent.Asia),
|
|
1552
|
+
C("TG", "TGO", 768, "Togo", "Togo", "Togo", "228", ".tg", Continent.Africa),
|
|
1553
|
+
C("TO", "TON", 776, "Tonga", "Tonga", "Tonga", "676", ".to", Continent.Oceania),
|
|
1554
|
+
C(
|
|
1555
|
+
"TT",
|
|
1556
|
+
"TTO",
|
|
1557
|
+
780,
|
|
1558
|
+
"Trinidad and Tobago",
|
|
1559
|
+
"Trinidad och Tobago",
|
|
1560
|
+
"Trinidad and Tobago",
|
|
1561
|
+
"1",
|
|
1562
|
+
".tt",
|
|
1563
|
+
Continent.NorthAmerica
|
|
1564
|
+
),
|
|
1565
|
+
C("TN", "TUN", 788, "Tunisia", "Tunisien", "\u062A\u0648\u0646\u0633", "216", ".tn", Continent.Africa),
|
|
1566
|
+
C("TR", "TUR", 792, "Turkey", "Turkiet", "T\xFCrkiye", "90", ".tr", Continent.Asia),
|
|
1567
|
+
C("TM", "TKM", 795, "Turkmenistan", "Turkmenistan", "T\xFCrkmenistan", "993", ".tm", Continent.Asia),
|
|
1568
|
+
C("TV", "TUV", 798, "Tuvalu", "Tuvalu", "Tuvalu", "688", ".tv", Continent.Oceania),
|
|
1569
|
+
C("UG", "UGA", 800, "Uganda", "Uganda", "Uganda", "256", ".ug", Continent.Africa),
|
|
1570
|
+
C("UA", "UKR", 804, "Ukraine", "Ukraina", "\u0423\u043A\u0440\u0430\u0457\u043D\u0430", "380", ".ua", Continent.Europe),
|
|
1571
|
+
C(
|
|
1572
|
+
"AE",
|
|
1573
|
+
"ARE",
|
|
1574
|
+
784,
|
|
1575
|
+
"United Arab Emirates",
|
|
1576
|
+
"F\xF6renade Arabemiraten",
|
|
1577
|
+
"\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A",
|
|
1578
|
+
"971",
|
|
1579
|
+
".ae",
|
|
1580
|
+
Continent.Asia
|
|
1581
|
+
),
|
|
1582
|
+
C(
|
|
1583
|
+
"GB",
|
|
1584
|
+
"GBR",
|
|
1585
|
+
826,
|
|
1586
|
+
"United Kingdom",
|
|
1587
|
+
"Storbritannien",
|
|
1588
|
+
"United Kingdom",
|
|
1589
|
+
"44",
|
|
1590
|
+
".uk",
|
|
1591
|
+
Continent.Europe
|
|
1592
|
+
),
|
|
1593
|
+
C(
|
|
1594
|
+
"US",
|
|
1595
|
+
"USA",
|
|
1596
|
+
840,
|
|
1597
|
+
"United States",
|
|
1598
|
+
"F\xF6renta staterna",
|
|
1599
|
+
"United States",
|
|
1600
|
+
"1",
|
|
1601
|
+
".us",
|
|
1602
|
+
Continent.NorthAmerica
|
|
1603
|
+
),
|
|
1604
|
+
C("UY", "URY", 858, "Uruguay", "Uruguay", "Uruguay", "598", ".uy", Continent.SouthAmerica),
|
|
1605
|
+
C("UZ", "UZB", 860, "Uzbekistan", "Uzbekistan", "O\u02BBzbekiston", "998", ".uz", Continent.Asia),
|
|
1606
|
+
C("VU", "VUT", 548, "Vanuatu", "Vanuatu", "Vanuatu", "678", ".vu", Continent.Oceania),
|
|
1607
|
+
C(
|
|
1608
|
+
"VA",
|
|
1609
|
+
"VAT",
|
|
1610
|
+
336,
|
|
1611
|
+
"Vatican City",
|
|
1612
|
+
"Vatikanstaten",
|
|
1613
|
+
"Citt\xE0 del Vaticano",
|
|
1614
|
+
"379",
|
|
1615
|
+
".va",
|
|
1616
|
+
Continent.Europe
|
|
1617
|
+
),
|
|
1618
|
+
C("VE", "VEN", 862, "Venezuela", "Venezuela", "Venezuela", "58", ".ve", Continent.SouthAmerica),
|
|
1619
|
+
C("VN", "VNM", 704, "Vietnam", "Vietnam", "Vi\u1EC7t Nam", "84", ".vn", Continent.Asia),
|
|
1620
|
+
C("YE", "YEM", 887, "Yemen", "Jemen", "\u0627\u0644\u064A\u0645\u0646", "967", ".ye", Continent.Asia),
|
|
1621
|
+
C("ZM", "ZMB", 894, "Zambia", "Zambia", "Zambia", "260", ".zm", Continent.Africa),
|
|
1622
|
+
C("ZW", "ZWE", 716, "Zimbabwe", "Zimbabwe", "Zimbabwe", "263", ".zw", Continent.Africa),
|
|
1623
|
+
C("AX", "ALA", 248, "\xC5land Islands", "\xC5land", "\xC5land", "358", ".ax", Continent.Europe),
|
|
1624
|
+
C("FO", "FRO", 234, "Faroe Islands", "F\xE4r\xF6arna", "F\xF8royar", "298", ".fo", Continent.Europe),
|
|
1625
|
+
C("XK", "XKX", 0, "Kosovo", "Kosovo", "Kosova", "383", ".xk", Continent.Europe)
|
|
1626
|
+
];
|
|
1627
|
+
|
|
1628
|
+
// src/geography/country-coordinates.ts
|
|
1629
|
+
var COUNTRY_COORDINATES = Object.freeze({
|
|
1630
|
+
AF: [33, 65],
|
|
1631
|
+
AL: [41, 20],
|
|
1632
|
+
DZ: [28, 3],
|
|
1633
|
+
AS: [-14.27, -170.7],
|
|
1634
|
+
AD: [42.5, 1.5],
|
|
1635
|
+
AO: [-12.5, 18.5],
|
|
1636
|
+
AG: [17.05, -61.8],
|
|
1637
|
+
AR: [-34, -64],
|
|
1638
|
+
AM: [40, 45],
|
|
1639
|
+
AW: [12.5, -69.97],
|
|
1640
|
+
AU: [-27, 133],
|
|
1641
|
+
AT: [47.33, 13.33],
|
|
1642
|
+
AZ: [40.5, 47.5],
|
|
1643
|
+
BS: [24.25, -76],
|
|
1644
|
+
BH: [26, 50.55],
|
|
1645
|
+
BD: [24, 90],
|
|
1646
|
+
BB: [13.17, -59.53],
|
|
1647
|
+
BY: [53, 28],
|
|
1648
|
+
BE: [50.83, 4],
|
|
1649
|
+
BZ: [17.25, -88.75],
|
|
1650
|
+
BJ: [9.5, 2.25],
|
|
1651
|
+
BM: [32.33, -64.75],
|
|
1652
|
+
BT: [27.5, 90.5],
|
|
1653
|
+
BO: [-17, -65],
|
|
1654
|
+
BA: [44, 18],
|
|
1655
|
+
BW: [-22, 24],
|
|
1656
|
+
BR: [-10, -55],
|
|
1657
|
+
BN: [4.5, 114.67],
|
|
1658
|
+
BG: [43, 25],
|
|
1659
|
+
BF: [13, -2],
|
|
1660
|
+
BI: [-3.5, 30],
|
|
1661
|
+
CV: [16, -24],
|
|
1662
|
+
KH: [13, 105],
|
|
1663
|
+
CM: [6, 12],
|
|
1664
|
+
CA: [60, -95],
|
|
1665
|
+
CF: [7, 21],
|
|
1666
|
+
TD: [15, 19],
|
|
1667
|
+
CL: [-30, -71],
|
|
1668
|
+
CN: [35, 105],
|
|
1669
|
+
CO: [4, -72],
|
|
1670
|
+
KM: [-12.17, 44.25],
|
|
1671
|
+
CG: [-1, 15],
|
|
1672
|
+
CD: [0, 25],
|
|
1673
|
+
CR: [10, -84],
|
|
1674
|
+
CI: [8, -5],
|
|
1675
|
+
HR: [45.17, 15.5],
|
|
1676
|
+
CU: [21.5, -80],
|
|
1677
|
+
CW: [12.17, -68.98],
|
|
1678
|
+
CY: [35, 33],
|
|
1679
|
+
CZ: [49.75, 15.5],
|
|
1680
|
+
DK: [56, 10],
|
|
1681
|
+
DJ: [11.5, 43],
|
|
1682
|
+
DM: [15.42, -61.33],
|
|
1683
|
+
DO: [19, -70.67],
|
|
1684
|
+
EC: [-2, -77.5],
|
|
1685
|
+
EG: [27, 30],
|
|
1686
|
+
SV: [13.83, -88.92],
|
|
1687
|
+
GQ: [2, 10],
|
|
1688
|
+
ER: [15, 39],
|
|
1689
|
+
EE: [59, 26],
|
|
1690
|
+
SZ: [-26.5, 31.5],
|
|
1691
|
+
ET: [8, 38],
|
|
1692
|
+
FJ: [-18, 175],
|
|
1693
|
+
FI: [64, 26],
|
|
1694
|
+
FR: [46, 2],
|
|
1695
|
+
GA: [-1, 11.75],
|
|
1696
|
+
GM: [13.47, -16.57],
|
|
1697
|
+
GE: [42, 43.5],
|
|
1698
|
+
DE: [51, 9],
|
|
1699
|
+
GH: [8, -2],
|
|
1700
|
+
GI: [36.13, -5.35],
|
|
1701
|
+
GR: [39, 22],
|
|
1702
|
+
GL: [72, -40],
|
|
1703
|
+
GD: [12.12, -61.67],
|
|
1704
|
+
GU: [13.47, 144.78],
|
|
1705
|
+
GT: [15.5, -90.25],
|
|
1706
|
+
GG: [49.45, -2.54],
|
|
1707
|
+
GN: [11, -10],
|
|
1708
|
+
GW: [12, -15],
|
|
1709
|
+
GY: [5, -59],
|
|
1710
|
+
HT: [19, -72.42],
|
|
1711
|
+
HN: [15, -86.5],
|
|
1712
|
+
HK: [22.25, 114.17],
|
|
1713
|
+
HU: [47, 20],
|
|
1714
|
+
IS: [65, -18],
|
|
1715
|
+
IN: [20, 77],
|
|
1716
|
+
ID: [-5, 120],
|
|
1717
|
+
IR: [32, 53],
|
|
1718
|
+
IQ: [33, 44],
|
|
1719
|
+
IE: [53, -8],
|
|
1720
|
+
IM: [54.23, -4.55],
|
|
1721
|
+
IL: [31.5, 34.75],
|
|
1722
|
+
IT: [42.83, 12.83],
|
|
1723
|
+
JM: [18.25, -77.5],
|
|
1724
|
+
JP: [36, 138],
|
|
1725
|
+
JE: [49.21, -2.13],
|
|
1726
|
+
JO: [31, 36],
|
|
1727
|
+
KZ: [48, 68],
|
|
1728
|
+
KE: [1, 38],
|
|
1729
|
+
KI: [1.42, 173],
|
|
1730
|
+
KP: [40, 127],
|
|
1731
|
+
KR: [37, 127.5],
|
|
1732
|
+
KW: [29.34, 47.66],
|
|
1733
|
+
KG: [41, 75],
|
|
1734
|
+
LA: [18, 105],
|
|
1735
|
+
LV: [57, 25],
|
|
1736
|
+
LB: [33.83, 35.83],
|
|
1737
|
+
LS: [-29.5, 28.5],
|
|
1738
|
+
LR: [6.5, -9.5],
|
|
1739
|
+
LY: [25, 17],
|
|
1740
|
+
LI: [47.17, 9.53],
|
|
1741
|
+
LT: [56, 24],
|
|
1742
|
+
LU: [49.75, 6.17],
|
|
1743
|
+
MO: [22.17, 113.55],
|
|
1744
|
+
MG: [-20, 47],
|
|
1745
|
+
MW: [-13.5, 34],
|
|
1746
|
+
MY: [2.5, 112.5],
|
|
1747
|
+
MV: [3.25, 73],
|
|
1748
|
+
ML: [17, -4],
|
|
1749
|
+
MT: [35.83, 14.58],
|
|
1750
|
+
MH: [9, 168],
|
|
1751
|
+
MR: [20, -12],
|
|
1752
|
+
MU: [-20.28, 57.55],
|
|
1753
|
+
MX: [23, -102],
|
|
1754
|
+
FM: [6.92, 158.25],
|
|
1755
|
+
MD: [47, 29],
|
|
1756
|
+
MC: [43.73, 7.42],
|
|
1757
|
+
MN: [46, 105],
|
|
1758
|
+
ME: [42, 19],
|
|
1759
|
+
MA: [32, -5],
|
|
1760
|
+
MZ: [-18.25, 35],
|
|
1761
|
+
MM: [22, 98],
|
|
1762
|
+
NA: [-22, 17],
|
|
1763
|
+
NR: [-0.53, 166.92],
|
|
1764
|
+
NP: [28, 84],
|
|
1765
|
+
NL: [52.5, 5.75],
|
|
1766
|
+
NZ: [-41, 174],
|
|
1767
|
+
NI: [13, -85],
|
|
1768
|
+
NE: [16, 8],
|
|
1769
|
+
NG: [10, 8],
|
|
1770
|
+
MK: [41.83, 22],
|
|
1771
|
+
NO: [62, 10],
|
|
1772
|
+
OM: [21, 57],
|
|
1773
|
+
PK: [30, 70],
|
|
1774
|
+
PW: [7.5, 134.5],
|
|
1775
|
+
PS: [32, 35.25],
|
|
1776
|
+
PA: [9, -80],
|
|
1777
|
+
PG: [-6, 147],
|
|
1778
|
+
PY: [-23, -58],
|
|
1779
|
+
PE: [-10, -76],
|
|
1780
|
+
PH: [13, 122],
|
|
1781
|
+
PL: [52, 20],
|
|
1782
|
+
PT: [39.5, -8],
|
|
1783
|
+
PR: [18.25, -66.5],
|
|
1784
|
+
QA: [25.5, 51.25],
|
|
1785
|
+
RO: [46, 25],
|
|
1786
|
+
RU: [60, 100],
|
|
1787
|
+
RW: [-2, 30],
|
|
1788
|
+
KN: [17.33, -62.75],
|
|
1789
|
+
LC: [13.88, -61.13],
|
|
1790
|
+
VC: [13.25, -61.2],
|
|
1791
|
+
WS: [-13.58, -172.33],
|
|
1792
|
+
SM: [43.77, 12.42],
|
|
1793
|
+
ST: [1, 7],
|
|
1794
|
+
SA: [25, 45],
|
|
1795
|
+
SN: [14, -14],
|
|
1796
|
+
RS: [44, 21],
|
|
1797
|
+
SC: [-4.58, 55.67],
|
|
1798
|
+
SL: [8.5, -11.5],
|
|
1799
|
+
SG: [1.37, 103.8],
|
|
1800
|
+
SK: [48.67, 19.5],
|
|
1801
|
+
SI: [46.12, 14.82],
|
|
1802
|
+
SB: [-8, 159],
|
|
1803
|
+
SO: [10, 49],
|
|
1804
|
+
ZA: [-29, 24],
|
|
1805
|
+
SS: [8, 30],
|
|
1806
|
+
ES: [40, -4],
|
|
1807
|
+
LK: [7, 81],
|
|
1808
|
+
SD: [15, 30],
|
|
1809
|
+
SR: [4, -56],
|
|
1810
|
+
SE: [62, 15],
|
|
1811
|
+
CH: [47, 8],
|
|
1812
|
+
SY: [35, 38],
|
|
1813
|
+
TW: [23.5, 121],
|
|
1814
|
+
TJ: [39, 71],
|
|
1815
|
+
TZ: [-6, 35],
|
|
1816
|
+
TH: [15, 100],
|
|
1817
|
+
TL: [-8.55, 125.73],
|
|
1818
|
+
TG: [8, 1.17],
|
|
1819
|
+
TO: [-20, -175],
|
|
1820
|
+
TT: [11, -61],
|
|
1821
|
+
TN: [34, 9],
|
|
1822
|
+
TR: [39, 35],
|
|
1823
|
+
TM: [40, 60],
|
|
1824
|
+
TV: [-8, 178],
|
|
1825
|
+
UG: [1, 32],
|
|
1826
|
+
UA: [49, 32],
|
|
1827
|
+
AE: [24, 54],
|
|
1828
|
+
GB: [54, -2],
|
|
1829
|
+
US: [38, -97],
|
|
1830
|
+
UY: [-33, -56],
|
|
1831
|
+
UZ: [41, 64],
|
|
1832
|
+
VU: [-16, 167],
|
|
1833
|
+
VA: [41.9, 12.45],
|
|
1834
|
+
VE: [8, -66],
|
|
1835
|
+
VN: [16, 106],
|
|
1836
|
+
YE: [15, 48],
|
|
1837
|
+
ZM: [-15, 30],
|
|
1838
|
+
ZW: [-20, 30],
|
|
1839
|
+
AX: [60.12, 19.9],
|
|
1840
|
+
FO: [62, -7],
|
|
1841
|
+
XK: [42.67, 21.17]
|
|
1842
|
+
});
|
|
1843
|
+
|
|
1844
|
+
// src/geography/country-capitals.ts
|
|
1845
|
+
var RAW = {
|
|
1846
|
+
AF: { en: "Kabul", sv: "Kabul", native: "\u06A9\u0627\u0628\u0644", lat: 34.53, lon: 69.17 },
|
|
1847
|
+
AL: { en: "Tirana", sv: "Tirana", native: "Tiran\xEB", lat: 41.33, lon: 19.82 },
|
|
1848
|
+
DZ: { en: "Algiers", sv: "Alger", native: "\u0627\u0644\u062C\u0632\u0627\u0626\u0631", lat: 36.75, lon: 3.04 },
|
|
1849
|
+
AD: {
|
|
1850
|
+
en: "Andorra la Vella",
|
|
1851
|
+
sv: "Andorra la Vella",
|
|
1852
|
+
native: "Andorra la Vella",
|
|
1853
|
+
lat: 42.51,
|
|
1854
|
+
lon: 1.52
|
|
1855
|
+
},
|
|
1856
|
+
AO: { en: "Luanda", sv: "Luanda", native: "Luanda", lat: -8.84, lon: 13.23 },
|
|
1857
|
+
AG: { en: "St. John's", sv: "Saint John's", native: "St. John's", lat: 17.12, lon: -61.85 },
|
|
1858
|
+
AR: { en: "Buenos Aires", sv: "Buenos Aires", native: "Buenos Aires", lat: -34.61, lon: -58.38 },
|
|
1859
|
+
AM: { en: "Yerevan", sv: "Jerevan", native: "\u0535\u0580\u0587\u0561\u0576", lat: 40.18, lon: 44.51 },
|
|
1860
|
+
AU: { en: "Canberra", sv: "Canberra", native: "Canberra", lat: -35.28, lon: 149.13 },
|
|
1861
|
+
AT: { en: "Vienna", sv: "Wien", native: "Wien", lat: 48.21, lon: 16.37 },
|
|
1862
|
+
AZ: { en: "Baku", sv: "Baku", native: "Bak\u0131", lat: 40.41, lon: 49.87 },
|
|
1863
|
+
BS: { en: "Nassau", sv: "Nassau", native: "Nassau", lat: 25.06, lon: -77.34 },
|
|
1864
|
+
BH: { en: "Manama", sv: "Manama", native: "\u0627\u0644\u0645\u0646\u0627\u0645\u0629", lat: 26.23, lon: 50.59 },
|
|
1865
|
+
BD: { en: "Dhaka", sv: "Dhaka", native: "\u09A2\u09BE\u0995\u09BE", lat: 23.71, lon: 90.41 },
|
|
1866
|
+
BB: { en: "Bridgetown", sv: "Bridgetown", native: "Bridgetown", lat: 13.1, lon: -59.62 },
|
|
1867
|
+
BY: { en: "Minsk", sv: "Minsk", native: "\u041C\u0456\u043D\u0441\u043A", lat: 53.9, lon: 27.57 },
|
|
1868
|
+
BE: { en: "Brussels", sv: "Bryssel", native: "Bruxelles", lat: 50.85, lon: 4.35 },
|
|
1869
|
+
BZ: { en: "Belmopan", sv: "Belmopan", native: "Belmopan", lat: 17.25, lon: -88.77 },
|
|
1870
|
+
BJ: { en: "Porto-Novo", sv: "Porto-Novo", native: "Porto-Novo", lat: 6.5, lon: 2.6 },
|
|
1871
|
+
BT: { en: "Thimphu", sv: "Thimphu", native: "\u0F50\u0F72\u0F58\u0F0B\u0F55\u0F74", lat: 27.47, lon: 89.64 },
|
|
1872
|
+
BO: { en: "Sucre", sv: "Sucre", native: "Sucre", lat: -19.04, lon: -65.26 },
|
|
1873
|
+
BA: { en: "Sarajevo", sv: "Sarajevo", native: "Sarajevo", lat: 43.86, lon: 18.41 },
|
|
1874
|
+
BW: { en: "Gaborone", sv: "Gaborone", native: "Gaborone", lat: -24.65, lon: 25.91 },
|
|
1875
|
+
BR: { en: "Bras\xEDlia", sv: "Bras\xEDlia", native: "Bras\xEDlia", lat: -15.79, lon: -47.88 },
|
|
1876
|
+
BN: {
|
|
1877
|
+
en: "Bandar Seri Begawan",
|
|
1878
|
+
sv: "Bandar Seri Begawan",
|
|
1879
|
+
native: "Bandar Seri Begawan",
|
|
1880
|
+
lat: 4.94,
|
|
1881
|
+
lon: 114.95
|
|
1882
|
+
},
|
|
1883
|
+
BG: { en: "Sofia", sv: "Sofia", native: "\u0421\u043E\u0444\u0438\u044F", lat: 42.7, lon: 23.32 },
|
|
1884
|
+
BF: { en: "Ouagadougou", sv: "Ouagadougou", native: "Ouagadougou", lat: 12.37, lon: -1.52 },
|
|
1885
|
+
BI: { en: "Gitega", sv: "Gitega", native: "Gitega", lat: -3.43, lon: 29.93 },
|
|
1886
|
+
CV: { en: "Praia", sv: "Praia", native: "Praia", lat: 14.92, lon: -23.51 },
|
|
1887
|
+
KH: { en: "Phnom Penh", sv: "Phnom Penh", native: "\u1797\u17D2\u1793\u17C6\u1796\u17C1\u1789", lat: 11.56, lon: 104.93 },
|
|
1888
|
+
CM: { en: "Yaound\xE9", sv: "Yaound\xE9", native: "Yaound\xE9", lat: 3.87, lon: 11.52 },
|
|
1889
|
+
CA: { en: "Ottawa", sv: "Ottawa", native: "Ottawa", lat: 45.42, lon: -75.7 },
|
|
1890
|
+
CF: { en: "Bangui", sv: "Bangui", native: "Bangui", lat: 4.37, lon: 18.59 },
|
|
1891
|
+
TD: { en: "N'Djamena", sv: "N'Djamena", native: "N'Djamena", lat: 12.11, lon: 15.05 },
|
|
1892
|
+
CL: { en: "Santiago", sv: "Santiago", native: "Santiago", lat: -33.45, lon: -70.67 },
|
|
1893
|
+
CN: { en: "Beijing", sv: "Peking", native: "\u5317\u4EAC", lat: 39.91, lon: 116.39 },
|
|
1894
|
+
CO: { en: "Bogot\xE1", sv: "Bogot\xE1", native: "Bogot\xE1", lat: 4.71, lon: -74.07 },
|
|
1895
|
+
KM: { en: "Moroni", sv: "Moroni", native: "Moroni", lat: -11.7, lon: 43.26 },
|
|
1896
|
+
CG: { en: "Brazzaville", sv: "Brazzaville", native: "Brazzaville", lat: -4.27, lon: 15.28 },
|
|
1897
|
+
CD: { en: "Kinshasa", sv: "Kinshasa", native: "Kinshasa", lat: -4.32, lon: 15.31 },
|
|
1898
|
+
CR: { en: "San Jos\xE9", sv: "San Jos\xE9", native: "San Jos\xE9", lat: 9.93, lon: -84.08 },
|
|
1899
|
+
CI: { en: "Yamoussoukro", sv: "Yamoussoukro", native: "Yamoussoukro", lat: 6.82, lon: -5.28 },
|
|
1900
|
+
HR: { en: "Zagreb", sv: "Zagreb", native: "Zagreb", lat: 45.81, lon: 15.98 },
|
|
1901
|
+
CU: { en: "Havana", sv: "Havanna", native: "La Habana", lat: 23.13, lon: -82.38 },
|
|
1902
|
+
CY: { en: "Nicosia", sv: "Nicosia", native: "\u039B\u03B5\u03C5\u03BA\u03C9\u03C3\u03AF\u03B1", lat: 35.17, lon: 33.37 },
|
|
1903
|
+
CZ: { en: "Prague", sv: "Prag", native: "Praha", lat: 50.09, lon: 14.42 },
|
|
1904
|
+
DK: { en: "Copenhagen", sv: "K\xF6penhamn", native: "K\xF8benhavn", lat: 55.68, lon: 12.57 },
|
|
1905
|
+
DJ: { en: "Djibouti", sv: "Djibouti", native: "Djibouti", lat: 11.59, lon: 43.15 },
|
|
1906
|
+
DM: { en: "Roseau", sv: "Roseau", native: "Roseau", lat: 15.3, lon: -61.39 },
|
|
1907
|
+
DO: { en: "Santo Domingo", sv: "Santo Domingo", native: "Santo Domingo", lat: 18.47, lon: -69.9 },
|
|
1908
|
+
EC: { en: "Quito", sv: "Quito", native: "Quito", lat: -0.18, lon: -78.47 },
|
|
1909
|
+
EG: { en: "Cairo", sv: "Kairo", native: "\u0627\u0644\u0642\u0627\u0647\u0631\u0629", lat: 30.04, lon: 31.24 },
|
|
1910
|
+
SV: { en: "San Salvador", sv: "San Salvador", native: "San Salvador", lat: 13.69, lon: -89.19 },
|
|
1911
|
+
GQ: { en: "Malabo", sv: "Malabo", native: "Malabo", lat: 3.75, lon: 8.78 },
|
|
1912
|
+
ER: { en: "Asmara", sv: "Asmara", native: "\u12A3\u1235\u1218\u122B", lat: 15.33, lon: 38.93 },
|
|
1913
|
+
EE: { en: "Tallinn", sv: "Tallinn", native: "Tallinn", lat: 59.44, lon: 24.75 },
|
|
1914
|
+
SZ: { en: "Mbabane", sv: "Mbabane", native: "Mbabane", lat: -26.32, lon: 31.13 },
|
|
1915
|
+
ET: { en: "Addis Ababa", sv: "Addis Abeba", native: "\u12A0\u12F2\u1235 \u12A0\u1260\u1263", lat: 9.02, lon: 38.75 },
|
|
1916
|
+
FJ: { en: "Suva", sv: "Suva", native: "Suva", lat: -18.14, lon: 178.44 },
|
|
1917
|
+
FI: { en: "Helsinki", sv: "Helsingfors", native: "Helsinki", lat: 60.17, lon: 24.94 },
|
|
1918
|
+
FR: { en: "Paris", sv: "Paris", native: "Paris", lat: 48.86, lon: 2.35 },
|
|
1919
|
+
GA: { en: "Libreville", sv: "Libreville", native: "Libreville", lat: 0.39, lon: 9.45 },
|
|
1920
|
+
GM: { en: "Banjul", sv: "Banjul", native: "Banjul", lat: 13.45, lon: -16.58 },
|
|
1921
|
+
GE: { en: "Tbilisi", sv: "Tbilisi", native: "\u10D7\u10D1\u10D8\u10DA\u10D8\u10E1\u10D8", lat: 41.69, lon: 44.8 },
|
|
1922
|
+
DE: { en: "Berlin", sv: "Berlin", native: "Berlin", lat: 52.52, lon: 13.41 },
|
|
1923
|
+
GH: { en: "Accra", sv: "Accra", native: "Accra", lat: 5.56, lon: -0.19 },
|
|
1924
|
+
GR: { en: "Athens", sv: "Aten", native: "\u0391\u03B8\u03AE\u03BD\u03B1", lat: 37.98, lon: 23.73 },
|
|
1925
|
+
GD: { en: "St. George's", sv: "Saint George's", native: "St. George's", lat: 12.05, lon: -61.75 },
|
|
1926
|
+
GT: {
|
|
1927
|
+
en: "Guatemala City",
|
|
1928
|
+
sv: "Guatemala City",
|
|
1929
|
+
native: "Ciudad de Guatemala",
|
|
1930
|
+
lat: 14.63,
|
|
1931
|
+
lon: -90.51
|
|
1932
|
+
},
|
|
1933
|
+
GN: { en: "Conakry", sv: "Conakry", native: "Conakry", lat: 9.54, lon: -13.68 },
|
|
1934
|
+
GW: { en: "Bissau", sv: "Bissau", native: "Bissau", lat: 11.86, lon: -15.6 },
|
|
1935
|
+
GY: { en: "Georgetown", sv: "Georgetown", native: "Georgetown", lat: 6.8, lon: -58.16 },
|
|
1936
|
+
HT: { en: "Port-au-Prince", sv: "Port-au-Prince", native: "P\xF2toprens", lat: 18.54, lon: -72.34 },
|
|
1937
|
+
HN: { en: "Tegucigalpa", sv: "Tegucigalpa", native: "Tegucigalpa", lat: 14.1, lon: -87.22 },
|
|
1938
|
+
HK: { en: "Hong Kong", sv: "Hongkong", native: "\u9999\u6E2F", lat: 22.28, lon: 114.16 },
|
|
1939
|
+
HU: { en: "Budapest", sv: "Budapest", native: "Budapest", lat: 47.5, lon: 19.04 },
|
|
1940
|
+
IS: { en: "Reykjavik", sv: "Reykjavik", native: "Reykjav\xEDk", lat: 64.14, lon: -21.9 },
|
|
1941
|
+
IN: { en: "New Delhi", sv: "New Delhi", native: "\u0928\u0908 \u0926\u093F\u0932\u094D\u0932\u0940", lat: 28.61, lon: 77.21 },
|
|
1942
|
+
ID: { en: "Jakarta", sv: "Jakarta", native: "Jakarta", lat: -6.21, lon: 106.85 },
|
|
1943
|
+
IR: { en: "Tehran", sv: "Teheran", native: "\u062A\u0647\u0631\u0627\u0646", lat: 35.69, lon: 51.39 },
|
|
1944
|
+
IQ: { en: "Baghdad", sv: "Bagdad", native: "\u0628\u063A\u062F\u0627\u062F", lat: 33.34, lon: 44.4 },
|
|
1945
|
+
IE: { en: "Dublin", sv: "Dublin", native: "Baile \xC1tha Cliath", lat: 53.35, lon: -6.26 },
|
|
1946
|
+
IL: { en: "Jerusalem", sv: "Jerusalem", native: "\u05D9\u05E8\u05D5\u05E9\u05DC\u05D9\u05DD", lat: 31.77, lon: 35.23 },
|
|
1947
|
+
IT: { en: "Rome", sv: "Rom", native: "Roma", lat: 41.9, lon: 12.5 },
|
|
1948
|
+
JM: { en: "Kingston", sv: "Kingston", native: "Kingston", lat: 18, lon: -76.79 },
|
|
1949
|
+
JP: { en: "Tokyo", sv: "Tokyo", native: "\u6771\u4EAC", lat: 35.68, lon: 139.69 },
|
|
1950
|
+
JO: { en: "Amman", sv: "Amman", native: "\u0639\u0645\u0651\u0627\u0646", lat: 31.95, lon: 35.93 },
|
|
1951
|
+
KZ: { en: "Astana", sv: "Astana", native: "\u0410\u0441\u0442\u0430\u043D\u0430", lat: 51.17, lon: 71.43 },
|
|
1952
|
+
KE: { en: "Nairobi", sv: "Nairobi", native: "Nairobi", lat: -1.29, lon: 36.82 },
|
|
1953
|
+
KI: { en: "Tarawa", sv: "Tarawa", native: "Tarawa", lat: 1.45, lon: 173 },
|
|
1954
|
+
KP: { en: "Pyongyang", sv: "Pyongyang", native: "\uD3C9\uC591", lat: 39.02, lon: 125.75 },
|
|
1955
|
+
KR: { en: "Seoul", sv: "Seoul", native: "\uC11C\uC6B8", lat: 37.57, lon: 126.98 },
|
|
1956
|
+
KW: { en: "Kuwait City", sv: "Kuwait City", native: "\u0645\u062F\u064A\u0646\u0629 \u0627\u0644\u0643\u0648\u064A\u062A", lat: 29.37, lon: 47.98 },
|
|
1957
|
+
KG: { en: "Bishkek", sv: "Bisjkek", native: "\u0411\u0438\u0448\u043A\u0435\u043A", lat: 42.87, lon: 74.59 },
|
|
1958
|
+
LA: { en: "Vientiane", sv: "Vientiane", native: "\u0EA7\u0EBD\u0E87\u0E88\u0EB1\u0E99", lat: 17.97, lon: 102.63 },
|
|
1959
|
+
LV: { en: "Riga", sv: "Riga", native: "R\u012Bga", lat: 56.95, lon: 24.11 },
|
|
1960
|
+
LB: { en: "Beirut", sv: "Beirut", native: "\u0628\u064A\u0631\u0648\u062A", lat: 33.89, lon: 35.5 },
|
|
1961
|
+
LS: { en: "Maseru", sv: "Maseru", native: "Maseru", lat: -29.31, lon: 27.48 },
|
|
1962
|
+
LR: { en: "Monrovia", sv: "Monrovia", native: "Monrovia", lat: 6.3, lon: -10.8 },
|
|
1963
|
+
LY: { en: "Tripoli", sv: "Tripoli", native: "\u0637\u0631\u0627\u0628\u0644\u0633", lat: 32.9, lon: 13.18 },
|
|
1964
|
+
LI: { en: "Vaduz", sv: "Vaduz", native: "Vaduz", lat: 47.14, lon: 9.52 },
|
|
1965
|
+
LT: { en: "Vilnius", sv: "Vilnius", native: "Vilnius", lat: 54.69, lon: 25.28 },
|
|
1966
|
+
LU: { en: "Luxembourg City", sv: "Luxemburg", native: "L\xEBtzebuerg", lat: 49.61, lon: 6.13 },
|
|
1967
|
+
MO: { en: "Macao", sv: "Macao", native: "\u6FB3\u9580", lat: 22.2, lon: 113.54 },
|
|
1968
|
+
MG: { en: "Antananarivo", sv: "Antananarivo", native: "Antananarivo", lat: -18.91, lon: 47.53 },
|
|
1969
|
+
MW: { en: "Lilongwe", sv: "Lilongwe", native: "Lilongwe", lat: -13.97, lon: 33.79 },
|
|
1970
|
+
MY: { en: "Kuala Lumpur", sv: "Kuala Lumpur", native: "Kuala Lumpur", lat: 3.14, lon: 101.69 },
|
|
1971
|
+
MV: { en: "Mal\xE9", sv: "Mal\xE9", native: "\u0789\u07A7\u078D\u07AC", lat: 4.18, lon: 73.51 },
|
|
1972
|
+
ML: { en: "Bamako", sv: "Bamako", native: "Bamako", lat: 12.65, lon: -8 },
|
|
1973
|
+
MT: { en: "Valletta", sv: "Valletta", native: "Valletta", lat: 35.9, lon: 14.51 },
|
|
1974
|
+
MH: { en: "Majuro", sv: "Majuro", native: "Majuro", lat: 7.09, lon: 171.38 },
|
|
1975
|
+
MR: { en: "Nouakchott", sv: "Nouakchott", native: "\u0646\u0648\u0627\u0643\u0634\u0648\u0637", lat: 18.09, lon: -15.98 },
|
|
1976
|
+
MU: { en: "Port Louis", sv: "Port Louis", native: "Port Louis", lat: -20.16, lon: 57.5 },
|
|
1977
|
+
MX: { en: "Mexico City", sv: "Mexico City", native: "Ciudad de M\xE9xico", lat: 19.43, lon: -99.13 },
|
|
1978
|
+
FM: { en: "Palikir", sv: "Palikir", native: "Palikir", lat: 6.92, lon: 158.16 },
|
|
1979
|
+
MD: { en: "Chi\u0219in\u0103u", sv: "Chi\u0219in\u0103u", native: "Chi\u0219in\u0103u", lat: 47.01, lon: 28.86 },
|
|
1980
|
+
MC: { en: "Monaco", sv: "Monaco", native: "Monaco", lat: 43.73, lon: 7.42 },
|
|
1981
|
+
MN: { en: "Ulaanbaatar", sv: "Ulaanbaatar", native: "\u0423\u043B\u0430\u0430\u043D\u0431\u0430\u0430\u0442\u0430\u0440", lat: 47.91, lon: 106.91 },
|
|
1982
|
+
ME: { en: "Podgorica", sv: "Podgorica", native: "Podgorica", lat: 42.44, lon: 19.26 },
|
|
1983
|
+
MA: { en: "Rabat", sv: "Rabat", native: "\u0627\u0644\u0631\u0628\u0627\u0637", lat: 34.01, lon: -6.84 },
|
|
1984
|
+
MZ: { en: "Maputo", sv: "Maputo", native: "Maputo", lat: -25.97, lon: 32.57 },
|
|
1985
|
+
MM: { en: "Naypyidaw", sv: "Naypyidaw", native: "\u1014\u1031\u1015\u103C\u100A\u103A\u1010\u1031\u102C\u103A", lat: 19.76, lon: 96.07 },
|
|
1986
|
+
NA: { en: "Windhoek", sv: "Windhoek", native: "Windhoek", lat: -22.57, lon: 17.08 },
|
|
1987
|
+
NR: { en: "Yaren", sv: "Yaren", native: "Yaren", lat: -0.55, lon: 166.93 },
|
|
1988
|
+
NP: { en: "Kathmandu", sv: "Kathmandu", native: "\u0915\u093E\u0920\u092E\u093E\u0921\u094C\u0902", lat: 27.7, lon: 85.32 },
|
|
1989
|
+
NL: { en: "Amsterdam", sv: "Amsterdam", native: "Amsterdam", lat: 52.37, lon: 4.9 },
|
|
1990
|
+
NZ: { en: "Wellington", sv: "Wellington", native: "Wellington", lat: -41.29, lon: 174.78 },
|
|
1991
|
+
NI: { en: "Managua", sv: "Managua", native: "Managua", lat: 12.15, lon: -86.27 },
|
|
1992
|
+
NE: { en: "Niamey", sv: "Niamey", native: "Niamey", lat: 13.51, lon: 2.11 },
|
|
1993
|
+
NG: { en: "Abuja", sv: "Abuja", native: "Abuja", lat: 9.06, lon: 7.49 },
|
|
1994
|
+
MK: { en: "Skopje", sv: "Skopje", native: "\u0421\u043A\u043E\u043F\u0458\u0435", lat: 42, lon: 21.43 },
|
|
1995
|
+
NO: { en: "Oslo", sv: "Oslo", native: "Oslo", lat: 59.91, lon: 10.75 },
|
|
1996
|
+
OM: { en: "Muscat", sv: "Muskat", native: "\u0645\u0633\u0642\u0637", lat: 23.59, lon: 58.54 },
|
|
1997
|
+
PK: { en: "Islamabad", sv: "Islamabad", native: "\u0627\u0633\u0644\u0627\u0645 \u0622\u0628\u0627\u062F", lat: 33.69, lon: 73.04 },
|
|
1998
|
+
PW: { en: "Ngerulmud", sv: "Ngerulmud", native: "Ngerulmud", lat: 7.5, lon: 134.62 },
|
|
1999
|
+
PS: { en: "Ramallah", sv: "Ramallah", native: "\u0631\u0627\u0645 \u0627\u0644\u0644\u0647", lat: 31.9, lon: 35.2 },
|
|
2000
|
+
PA: { en: "Panama City", sv: "Panama City", native: "Ciudad de Panam\xE1", lat: 8.98, lon: -79.52 },
|
|
2001
|
+
PG: { en: "Port Moresby", sv: "Port Moresby", native: "Port Moresby", lat: -9.48, lon: 147.15 },
|
|
2002
|
+
PY: { en: "Asunci\xF3n", sv: "Asunci\xF3n", native: "Asunci\xF3n", lat: -25.26, lon: -57.58 },
|
|
2003
|
+
PE: { en: "Lima", sv: "Lima", native: "Lima", lat: -12.05, lon: -77.04 },
|
|
2004
|
+
PH: { en: "Manila", sv: "Manila", native: "Maynila", lat: 14.6, lon: 120.98 },
|
|
2005
|
+
PL: { en: "Warsaw", sv: "Warszawa", native: "Warszawa", lat: 52.23, lon: 21.01 },
|
|
2006
|
+
PT: { en: "Lisbon", sv: "Lissabon", native: "Lisboa", lat: 38.72, lon: -9.14 },
|
|
2007
|
+
PR: { en: "San Juan", sv: "San Juan", native: "San Juan", lat: 18.47, lon: -66.11 },
|
|
2008
|
+
QA: { en: "Doha", sv: "Doha", native: "\u0627\u0644\u062F\u0648\u062D\u0629", lat: 25.29, lon: 51.53 },
|
|
2009
|
+
RO: { en: "Bucharest", sv: "Bukarest", native: "Bucure\u0219ti", lat: 44.43, lon: 26.1 },
|
|
2010
|
+
RU: { en: "Moscow", sv: "Moskva", native: "\u041C\u043E\u0441\u043A\u0432\u0430", lat: 55.76, lon: 37.62 },
|
|
2011
|
+
RW: { en: "Kigali", sv: "Kigali", native: "Kigali", lat: -1.94, lon: 30.06 },
|
|
2012
|
+
KN: { en: "Basseterre", sv: "Basseterre", native: "Basseterre", lat: 17.3, lon: -62.72 },
|
|
2013
|
+
LC: { en: "Castries", sv: "Castries", native: "Castries", lat: 14.01, lon: -61 },
|
|
2014
|
+
VC: { en: "Kingstown", sv: "Kingstown", native: "Kingstown", lat: 13.15, lon: -61.22 },
|
|
2015
|
+
WS: { en: "Apia", sv: "Apia", native: "Apia", lat: -13.83, lon: -171.76 },
|
|
2016
|
+
SM: { en: "San Marino", sv: "San Marino", native: "San Marino", lat: 43.94, lon: 12.45 },
|
|
2017
|
+
ST: { en: "S\xE3o Tom\xE9", sv: "S\xE3o Tom\xE9", native: "S\xE3o Tom\xE9", lat: 0.34, lon: 6.73 },
|
|
2018
|
+
SA: { en: "Riyadh", sv: "Riyadh", native: "\u0627\u0644\u0631\u064A\u0627\u0636", lat: 24.69, lon: 46.72 },
|
|
2019
|
+
SN: { en: "Dakar", sv: "Dakar", native: "Dakar", lat: 14.69, lon: -17.44 },
|
|
2020
|
+
RS: { en: "Belgrade", sv: "Belgrad", native: "\u0411\u0435\u043E\u0433\u0440\u0430\u0434", lat: 44.82, lon: 20.46 },
|
|
2021
|
+
SC: { en: "Victoria", sv: "Victoria", native: "Victoria", lat: -4.62, lon: 55.45 },
|
|
2022
|
+
SL: { en: "Freetown", sv: "Freetown", native: "Freetown", lat: 8.48, lon: -13.23 },
|
|
2023
|
+
SG: { en: "Singapore", sv: "Singapore", native: "Singapore", lat: 1.29, lon: 103.85 },
|
|
2024
|
+
SK: { en: "Bratislava", sv: "Bratislava", native: "Bratislava", lat: 48.14, lon: 17.11 },
|
|
2025
|
+
SI: { en: "Ljubljana", sv: "Ljubljana", native: "Ljubljana", lat: 46.05, lon: 14.51 },
|
|
2026
|
+
SB: { en: "Honiara", sv: "Honiara", native: "Honiara", lat: -9.43, lon: 159.96 },
|
|
2027
|
+
SO: { en: "Mogadishu", sv: "Mogadishu", native: "Muqdisho", lat: 2.05, lon: 45.32 },
|
|
2028
|
+
ZA: { en: "Pretoria", sv: "Pretoria", native: "Pretoria", lat: -25.75, lon: 28.19 },
|
|
2029
|
+
SS: { en: "Juba", sv: "Juba", native: "Juba", lat: 4.85, lon: 31.58 },
|
|
2030
|
+
ES: { en: "Madrid", sv: "Madrid", native: "Madrid", lat: 40.42, lon: -3.7 },
|
|
2031
|
+
LK: {
|
|
2032
|
+
en: "Sri Jayawardenepura Kotte",
|
|
2033
|
+
sv: "Sri Jayawardenepura Kotte",
|
|
2034
|
+
native: "\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DA2\u0DBA\u0DC0\u0DBB\u0DCA\u0DB0\u0DB1\u0DB4\u0DD4\u0DBB \u0D9A\u0DDD\u0DA7\u0DCA\u0DA7\u0DDA",
|
|
2035
|
+
lat: 6.89,
|
|
2036
|
+
lon: 79.92
|
|
2037
|
+
},
|
|
2038
|
+
SD: { en: "Khartoum", sv: "Khartoum", native: "\u0627\u0644\u062E\u0631\u0637\u0648\u0645", lat: 15.59, lon: 32.53 },
|
|
2039
|
+
SR: { en: "Paramaribo", sv: "Paramaribo", native: "Paramaribo", lat: 5.83, lon: -55.17 },
|
|
2040
|
+
SE: { en: "Stockholm", sv: "Stockholm", native: "Stockholm", lat: 59.33, lon: 18.07 },
|
|
2041
|
+
CH: { en: "Bern", sv: "Bern", native: "Bern", lat: 46.95, lon: 7.45 },
|
|
2042
|
+
SY: { en: "Damascus", sv: "Damaskus", native: "\u062F\u0645\u0634\u0642", lat: 33.51, lon: 36.29 },
|
|
2043
|
+
TW: { en: "Taipei", sv: "Taipei", native: "\u81FA\u5317", lat: 25.03, lon: 121.57 },
|
|
2044
|
+
TJ: { en: "Dushanbe", sv: "Dusjanbe", native: "\u0414\u0443\u0448\u0430\u043D\u0431\u0435", lat: 38.56, lon: 68.77 },
|
|
2045
|
+
TZ: { en: "Dodoma", sv: "Dodoma", native: "Dodoma", lat: -6.16, lon: 35.75 },
|
|
2046
|
+
TH: { en: "Bangkok", sv: "Bangkok", native: "\u0E01\u0E23\u0E38\u0E07\u0E40\u0E17\u0E1E\u0E21\u0E2B\u0E32\u0E19\u0E04\u0E23", lat: 13.76, lon: 100.5 },
|
|
2047
|
+
TL: { en: "Dili", sv: "Dili", native: "Dili", lat: -8.56, lon: 125.57 },
|
|
2048
|
+
TG: { en: "Lom\xE9", sv: "Lom\xE9", native: "Lom\xE9", lat: 6.14, lon: 1.21 },
|
|
2049
|
+
TO: { en: "Nuku\u02BBalofa", sv: "Nuku\u02BBalofa", native: "Nuku\u02BBalofa", lat: -21.21, lon: -175.2 },
|
|
2050
|
+
TT: {
|
|
2051
|
+
en: "Port of Spain",
|
|
2052
|
+
sv: "Port of Spain",
|
|
2053
|
+
native: "Port of Spain",
|
|
2054
|
+
lat: 10.66,
|
|
2055
|
+
lon: -61.51
|
|
2056
|
+
},
|
|
2057
|
+
TN: { en: "Tunis", sv: "Tunis", native: "\u062A\u0648\u0646\u0633", lat: 36.81, lon: 10.17 },
|
|
2058
|
+
TR: { en: "Ankara", sv: "Ankara", native: "Ankara", lat: 39.93, lon: 32.86 },
|
|
2059
|
+
TM: { en: "Ashgabat", sv: "Asjchabad", native: "A\u015Fgabat", lat: 37.95, lon: 58.38 },
|
|
2060
|
+
TV: { en: "Funafuti", sv: "Funafuti", native: "Funafuti", lat: -8.52, lon: 179.2 },
|
|
2061
|
+
UG: { en: "Kampala", sv: "Kampala", native: "Kampala", lat: 0.31, lon: 32.58 },
|
|
2062
|
+
UA: { en: "Kyiv", sv: "Kiev", native: "\u041A\u0438\u0457\u0432", lat: 50.45, lon: 30.52 },
|
|
2063
|
+
AE: { en: "Abu Dhabi", sv: "Abu Dhabi", native: "\u0623\u0628\u0648 \u0638\u0628\u064A", lat: 24.45, lon: 54.65 },
|
|
2064
|
+
GB: { en: "London", sv: "London", native: "London", lat: 51.51, lon: -0.13 },
|
|
2065
|
+
US: {
|
|
2066
|
+
en: "Washington, D.C.",
|
|
2067
|
+
sv: "Washington, D.C.",
|
|
2068
|
+
native: "Washington, D.C.",
|
|
2069
|
+
lat: 38.9,
|
|
2070
|
+
lon: -77.04
|
|
2071
|
+
},
|
|
2072
|
+
UY: { en: "Montevideo", sv: "Montevideo", native: "Montevideo", lat: -34.88, lon: -56.19 },
|
|
2073
|
+
UZ: { en: "Tashkent", sv: "Tasjkent", native: "Toshkent", lat: 41.3, lon: 69.28 },
|
|
2074
|
+
VU: { en: "Port Vila", sv: "Port Vila", native: "Port Vila", lat: -17.74, lon: 168.31 },
|
|
2075
|
+
VA: {
|
|
2076
|
+
en: "Vatican City",
|
|
2077
|
+
sv: "Vatikanstaden",
|
|
2078
|
+
native: "Citt\xE0 del Vaticano",
|
|
2079
|
+
lat: 41.9,
|
|
2080
|
+
lon: 12.45
|
|
2081
|
+
},
|
|
2082
|
+
VE: { en: "Caracas", sv: "Caracas", native: "Caracas", lat: 10.49, lon: -66.9 },
|
|
2083
|
+
VN: { en: "Hanoi", sv: "Hanoi", native: "H\xE0 N\u1ED9i", lat: 21.03, lon: 105.85 },
|
|
2084
|
+
YE: { en: "Sana'a", sv: "Sana'a", native: "\u0635\u0646\u0639\u0627\u0621", lat: 15.35, lon: 44.21 },
|
|
2085
|
+
ZM: { en: "Lusaka", sv: "Lusaka", native: "Lusaka", lat: -15.39, lon: 28.32 },
|
|
2086
|
+
ZW: { en: "Harare", sv: "Harare", native: "Harare", lat: -17.83, lon: 31.05 },
|
|
2087
|
+
AX: { en: "Mariehamn", sv: "Mariehamn", native: "Mariehamn", lat: 60.1, lon: 19.94 },
|
|
2088
|
+
FO: { en: "T\xF3rshavn", sv: "Torshamn", native: "T\xF3rshavn", lat: 62.01, lon: -6.77 },
|
|
2089
|
+
XK: { en: "Pristina", sv: "Pristina", native: "Prishtin\xEB", lat: 42.66, lon: 21.17 },
|
|
2090
|
+
GI: { en: "Gibraltar", sv: "Gibraltar", native: "Gibraltar", lat: 36.14, lon: -5.35 },
|
|
2091
|
+
GL: { en: "Nuuk", sv: "Nuuk", native: "Nuuk", lat: 64.17, lon: -51.74 },
|
|
2092
|
+
GG: {
|
|
2093
|
+
en: "St. Peter Port",
|
|
2094
|
+
sv: "Saint Peter Port",
|
|
2095
|
+
native: "St. Peter Port",
|
|
2096
|
+
lat: 49.46,
|
|
2097
|
+
lon: -2.54
|
|
2098
|
+
},
|
|
2099
|
+
IM: { en: "Douglas", sv: "Douglas", native: "Douglas", lat: 54.15, lon: -4.48 },
|
|
2100
|
+
JE: { en: "St. Helier", sv: "Saint Helier", native: "St. Helier", lat: 49.19, lon: -2.1 }
|
|
2101
|
+
};
|
|
2102
|
+
function getCountryCapital(alpha2) {
|
|
2103
|
+
const r = RAW[alpha2];
|
|
2104
|
+
if (!r) return null;
|
|
2105
|
+
return new CountryCapital(r.en, r.sv, r.native, GeoCoordinate.create(r.lat, r.lon));
|
|
2106
|
+
}
|
|
2107
|
+
|
|
2108
|
+
// src/geography/country-metadata.ts
|
|
2109
|
+
var set = (codes) => {
|
|
2110
|
+
const s = /* @__PURE__ */ new Set();
|
|
2111
|
+
for (const c of codes) s.add(c.toUpperCase());
|
|
2112
|
+
return s;
|
|
2113
|
+
};
|
|
2114
|
+
var EU_COUNTRIES = set([
|
|
2115
|
+
"AT",
|
|
2116
|
+
"BE",
|
|
2117
|
+
"BG",
|
|
2118
|
+
"HR",
|
|
2119
|
+
"CY",
|
|
2120
|
+
"CZ",
|
|
2121
|
+
"DK",
|
|
2122
|
+
"EE",
|
|
2123
|
+
"FI",
|
|
2124
|
+
"FR",
|
|
2125
|
+
"DE",
|
|
2126
|
+
"GR",
|
|
2127
|
+
"HU",
|
|
2128
|
+
"IE",
|
|
2129
|
+
"IT",
|
|
2130
|
+
"LV",
|
|
2131
|
+
"LT",
|
|
2132
|
+
"LU",
|
|
2133
|
+
"MT",
|
|
2134
|
+
"NL",
|
|
2135
|
+
"PL",
|
|
2136
|
+
"PT",
|
|
2137
|
+
"RO",
|
|
2138
|
+
"SK",
|
|
2139
|
+
"SI",
|
|
2140
|
+
"ES",
|
|
2141
|
+
"SE"
|
|
2142
|
+
]);
|
|
2143
|
+
var EEA_COUNTRIES = set([
|
|
2144
|
+
"AT",
|
|
2145
|
+
"BE",
|
|
2146
|
+
"BG",
|
|
2147
|
+
"HR",
|
|
2148
|
+
"CY",
|
|
2149
|
+
"CZ",
|
|
2150
|
+
"DK",
|
|
2151
|
+
"EE",
|
|
2152
|
+
"FI",
|
|
2153
|
+
"FR",
|
|
2154
|
+
"DE",
|
|
2155
|
+
"GR",
|
|
2156
|
+
"HU",
|
|
2157
|
+
"IE",
|
|
2158
|
+
"IT",
|
|
2159
|
+
"LV",
|
|
2160
|
+
"LT",
|
|
2161
|
+
"LU",
|
|
2162
|
+
"MT",
|
|
2163
|
+
"NL",
|
|
2164
|
+
"PL",
|
|
2165
|
+
"PT",
|
|
2166
|
+
"RO",
|
|
2167
|
+
"SK",
|
|
2168
|
+
"SI",
|
|
2169
|
+
"ES",
|
|
2170
|
+
"SE",
|
|
2171
|
+
"IS",
|
|
2172
|
+
"LI",
|
|
2173
|
+
"NO"
|
|
2174
|
+
]);
|
|
2175
|
+
var SCHENGEN_COUNTRIES = set([
|
|
2176
|
+
"AT",
|
|
2177
|
+
"BE",
|
|
2178
|
+
"BG",
|
|
2179
|
+
"HR",
|
|
2180
|
+
"CZ",
|
|
2181
|
+
"DK",
|
|
2182
|
+
"EE",
|
|
2183
|
+
"FI",
|
|
2184
|
+
"FR",
|
|
2185
|
+
"DE",
|
|
2186
|
+
"GR",
|
|
2187
|
+
"HU",
|
|
2188
|
+
"IT",
|
|
2189
|
+
"LV",
|
|
2190
|
+
"LT",
|
|
2191
|
+
"LU",
|
|
2192
|
+
"MT",
|
|
2193
|
+
"NL",
|
|
2194
|
+
"PL",
|
|
2195
|
+
"PT",
|
|
2196
|
+
"RO",
|
|
2197
|
+
"SK",
|
|
2198
|
+
"SI",
|
|
2199
|
+
"ES",
|
|
2200
|
+
"SE",
|
|
2201
|
+
"IS",
|
|
2202
|
+
"LI",
|
|
2203
|
+
"NO",
|
|
2204
|
+
"CH"
|
|
2205
|
+
]);
|
|
2206
|
+
var NORDIC_COUNTRIES = set(["DK", "FI", "IS", "NO", "SE"]);
|
|
2207
|
+
var SEPA_COUNTRIES = set([
|
|
2208
|
+
"AT",
|
|
2209
|
+
"BE",
|
|
2210
|
+
"BG",
|
|
2211
|
+
"HR",
|
|
2212
|
+
"CY",
|
|
2213
|
+
"CZ",
|
|
2214
|
+
"DK",
|
|
2215
|
+
"EE",
|
|
2216
|
+
"FI",
|
|
2217
|
+
"FR",
|
|
2218
|
+
"DE",
|
|
2219
|
+
"GR",
|
|
2220
|
+
"HU",
|
|
2221
|
+
"IE",
|
|
2222
|
+
"IT",
|
|
2223
|
+
"LV",
|
|
2224
|
+
"LT",
|
|
2225
|
+
"LU",
|
|
2226
|
+
"MT",
|
|
2227
|
+
"NL",
|
|
2228
|
+
"PL",
|
|
2229
|
+
"PT",
|
|
2230
|
+
"RO",
|
|
2231
|
+
"SK",
|
|
2232
|
+
"SI",
|
|
2233
|
+
"ES",
|
|
2234
|
+
"SE",
|
|
2235
|
+
"IS",
|
|
2236
|
+
"LI",
|
|
2237
|
+
"NO",
|
|
2238
|
+
"AL",
|
|
2239
|
+
"AD",
|
|
2240
|
+
"MD",
|
|
2241
|
+
"MC",
|
|
2242
|
+
"ME",
|
|
2243
|
+
"MK",
|
|
2244
|
+
"SM",
|
|
2245
|
+
"RS",
|
|
2246
|
+
"CH",
|
|
2247
|
+
"GB",
|
|
2248
|
+
"VA",
|
|
2249
|
+
"GG",
|
|
2250
|
+
"IM",
|
|
2251
|
+
"JE"
|
|
2252
|
+
]);
|
|
2253
|
+
var COUNTRY_CURRENCIES = Object.freeze({
|
|
2254
|
+
AF: ["AFN"],
|
|
2255
|
+
AL: ["ALL"],
|
|
2256
|
+
DZ: ["DZD"],
|
|
2257
|
+
AS: ["USD"],
|
|
2258
|
+
AD: ["EUR"],
|
|
2259
|
+
AO: ["AOA"],
|
|
2260
|
+
AG: ["XCD"],
|
|
2261
|
+
AR: ["ARS"],
|
|
2262
|
+
AM: ["AMD"],
|
|
2263
|
+
AW: ["AWG"],
|
|
2264
|
+
AU: ["AUD"],
|
|
2265
|
+
AT: ["EUR"],
|
|
2266
|
+
AZ: ["AZN"],
|
|
2267
|
+
BS: ["BSD"],
|
|
2268
|
+
BH: ["BHD"],
|
|
2269
|
+
BD: ["BDT"],
|
|
2270
|
+
BB: ["BBD"],
|
|
2271
|
+
BY: ["BYN"],
|
|
2272
|
+
BE: ["EUR"],
|
|
2273
|
+
BZ: ["BZD"],
|
|
2274
|
+
BJ: ["XOF"],
|
|
2275
|
+
BM: ["BMD"],
|
|
2276
|
+
BT: ["BTN"],
|
|
2277
|
+
BO: ["BOB"],
|
|
2278
|
+
BA: ["BAM"],
|
|
2279
|
+
BW: ["BWP"],
|
|
2280
|
+
BR: ["BRL"],
|
|
2281
|
+
BN: ["BND"],
|
|
2282
|
+
BG: ["BGN"],
|
|
2283
|
+
BF: ["XOF"],
|
|
2284
|
+
BI: ["BIF"],
|
|
2285
|
+
CV: ["CVE"],
|
|
2286
|
+
KH: ["KHR"],
|
|
2287
|
+
CM: ["XAF"],
|
|
2288
|
+
CA: ["CAD"],
|
|
2289
|
+
CF: ["XAF"],
|
|
2290
|
+
TD: ["XAF"],
|
|
2291
|
+
CL: ["CLP"],
|
|
2292
|
+
CN: ["CNY"],
|
|
2293
|
+
CO: ["COP"],
|
|
2294
|
+
KM: ["KMF"],
|
|
2295
|
+
CG: ["XAF"],
|
|
2296
|
+
CD: ["CDF"],
|
|
2297
|
+
CR: ["CRC"],
|
|
2298
|
+
CI: ["XOF"],
|
|
2299
|
+
HR: ["EUR"],
|
|
2300
|
+
CU: ["CUP"],
|
|
2301
|
+
CW: ["ANG"],
|
|
2302
|
+
CY: ["EUR"],
|
|
2303
|
+
CZ: ["CZK"],
|
|
2304
|
+
DK: ["DKK"],
|
|
2305
|
+
DJ: ["DJF"],
|
|
2306
|
+
DM: ["XCD"],
|
|
2307
|
+
DO: ["DOP"],
|
|
2308
|
+
EC: ["USD"],
|
|
2309
|
+
EG: ["EGP"],
|
|
2310
|
+
SV: ["USD"],
|
|
2311
|
+
GQ: ["XAF"],
|
|
2312
|
+
ER: ["ERN"],
|
|
2313
|
+
EE: ["EUR"],
|
|
2314
|
+
SZ: ["SZL"],
|
|
2315
|
+
ET: ["ETB"],
|
|
2316
|
+
FJ: ["FJD"],
|
|
2317
|
+
FI: ["EUR"],
|
|
2318
|
+
FR: ["EUR"],
|
|
2319
|
+
GA: ["XAF"],
|
|
2320
|
+
GM: ["GMD"],
|
|
2321
|
+
GE: ["GEL"],
|
|
2322
|
+
DE: ["EUR"],
|
|
2323
|
+
GH: ["GHS"],
|
|
2324
|
+
GI: ["GIP"],
|
|
2325
|
+
GR: ["EUR"],
|
|
2326
|
+
GL: ["DKK"],
|
|
2327
|
+
GD: ["XCD"],
|
|
2328
|
+
GU: ["USD"],
|
|
2329
|
+
GT: ["GTQ"],
|
|
2330
|
+
GG: ["GBP"],
|
|
2331
|
+
GN: ["GNF"],
|
|
2332
|
+
GW: ["XOF"],
|
|
2333
|
+
GY: ["GYD"],
|
|
2334
|
+
HT: ["HTG"],
|
|
2335
|
+
HN: ["HNL"],
|
|
2336
|
+
HK: ["HKD"],
|
|
2337
|
+
HU: ["HUF"],
|
|
2338
|
+
IS: ["ISK"],
|
|
2339
|
+
IN: ["INR"],
|
|
2340
|
+
ID: ["IDR"],
|
|
2341
|
+
IR: ["IRR"],
|
|
2342
|
+
IQ: ["IQD"],
|
|
2343
|
+
IE: ["EUR"],
|
|
2344
|
+
IM: ["GBP"],
|
|
2345
|
+
IL: ["ILS"],
|
|
2346
|
+
IT: ["EUR"],
|
|
2347
|
+
JM: ["JMD"],
|
|
2348
|
+
JP: ["JPY"],
|
|
2349
|
+
JE: ["GBP"],
|
|
2350
|
+
JO: ["JOD"],
|
|
2351
|
+
KZ: ["KZT"],
|
|
2352
|
+
KE: ["KES"],
|
|
2353
|
+
KI: ["AUD"],
|
|
2354
|
+
KP: ["KPW"],
|
|
2355
|
+
KR: ["KRW"],
|
|
2356
|
+
KW: ["KWD"],
|
|
2357
|
+
KG: ["KGS"],
|
|
2358
|
+
LA: ["LAK"],
|
|
2359
|
+
LV: ["EUR"],
|
|
2360
|
+
LB: ["LBP"],
|
|
2361
|
+
LS: ["LSL"],
|
|
2362
|
+
LR: ["LRD"],
|
|
2363
|
+
LY: ["LYD"],
|
|
2364
|
+
LI: ["CHF"],
|
|
2365
|
+
LT: ["EUR"],
|
|
2366
|
+
LU: ["EUR"],
|
|
2367
|
+
MO: ["MOP"],
|
|
2368
|
+
MG: ["MGA"],
|
|
2369
|
+
MW: ["MWK"],
|
|
2370
|
+
MY: ["MYR"],
|
|
2371
|
+
MV: ["MVR"],
|
|
2372
|
+
ML: ["XOF"],
|
|
2373
|
+
MT: ["EUR"],
|
|
2374
|
+
MH: ["USD"],
|
|
2375
|
+
MR: ["MRU"],
|
|
2376
|
+
MU: ["MUR"],
|
|
2377
|
+
MX: ["MXN"],
|
|
2378
|
+
FM: ["USD"],
|
|
2379
|
+
MD: ["MDL"],
|
|
2380
|
+
MC: ["EUR"],
|
|
2381
|
+
MN: ["MNT"],
|
|
2382
|
+
ME: ["EUR"],
|
|
2383
|
+
MA: ["MAD"],
|
|
2384
|
+
MZ: ["MZN"],
|
|
2385
|
+
MM: ["MMK"],
|
|
2386
|
+
NA: ["NAD"],
|
|
2387
|
+
NR: ["AUD"],
|
|
2388
|
+
NP: ["NPR"],
|
|
2389
|
+
NL: ["EUR"],
|
|
2390
|
+
NZ: ["NZD"],
|
|
2391
|
+
NI: ["NIO"],
|
|
2392
|
+
NE: ["XOF"],
|
|
2393
|
+
NG: ["NGN"],
|
|
2394
|
+
MK: ["MKD"],
|
|
2395
|
+
NO: ["NOK"],
|
|
2396
|
+
OM: ["OMR"],
|
|
2397
|
+
PK: ["PKR"],
|
|
2398
|
+
PW: ["USD"],
|
|
2399
|
+
PS: ["ILS"],
|
|
2400
|
+
PA: ["PAB"],
|
|
2401
|
+
PG: ["PGK"],
|
|
2402
|
+
PY: ["PYG"],
|
|
2403
|
+
PE: ["PEN"],
|
|
2404
|
+
PH: ["PHP"],
|
|
2405
|
+
PL: ["PLN"],
|
|
2406
|
+
PT: ["EUR"],
|
|
2407
|
+
PR: ["USD"],
|
|
2408
|
+
QA: ["QAR"],
|
|
2409
|
+
RO: ["RON"],
|
|
2410
|
+
RU: ["RUB"],
|
|
2411
|
+
RW: ["RWF"],
|
|
2412
|
+
KN: ["XCD"],
|
|
2413
|
+
LC: ["XCD"],
|
|
2414
|
+
VC: ["XCD"],
|
|
2415
|
+
WS: ["WST"],
|
|
2416
|
+
SM: ["EUR"],
|
|
2417
|
+
ST: ["STN"],
|
|
2418
|
+
SA: ["SAR"],
|
|
2419
|
+
SN: ["XOF"],
|
|
2420
|
+
RS: ["RSD"],
|
|
2421
|
+
SC: ["SCR"],
|
|
2422
|
+
SL: ["SLE"],
|
|
2423
|
+
SG: ["SGD"],
|
|
2424
|
+
SK: ["EUR"],
|
|
2425
|
+
SI: ["EUR"],
|
|
2426
|
+
SB: ["SBD"],
|
|
2427
|
+
SO: ["SOS"],
|
|
2428
|
+
ZA: ["ZAR"],
|
|
2429
|
+
SS: ["SSP"],
|
|
2430
|
+
ES: ["EUR"],
|
|
2431
|
+
LK: ["LKR"],
|
|
2432
|
+
SD: ["SDG"],
|
|
2433
|
+
SR: ["SRD"],
|
|
2434
|
+
SE: ["SEK"],
|
|
2435
|
+
CH: ["CHF"],
|
|
2436
|
+
SY: ["SYP"],
|
|
2437
|
+
TW: ["TWD"],
|
|
2438
|
+
TJ: ["TJS"],
|
|
2439
|
+
TZ: ["TZS"],
|
|
2440
|
+
TH: ["THB"],
|
|
2441
|
+
TL: ["USD"],
|
|
2442
|
+
TG: ["XOF"],
|
|
2443
|
+
TO: ["TOP"],
|
|
2444
|
+
TT: ["TTD"],
|
|
2445
|
+
TN: ["TND"],
|
|
2446
|
+
TR: ["TRY"],
|
|
2447
|
+
TM: ["TMT"],
|
|
2448
|
+
TV: ["AUD"],
|
|
2449
|
+
UG: ["UGX"],
|
|
2450
|
+
UA: ["UAH"],
|
|
2451
|
+
AE: ["AED"],
|
|
2452
|
+
GB: ["GBP"],
|
|
2453
|
+
US: ["USD"],
|
|
2454
|
+
UY: ["UYU"],
|
|
2455
|
+
UZ: ["UZS"],
|
|
2456
|
+
VU: ["VUV"],
|
|
2457
|
+
VA: ["EUR"],
|
|
2458
|
+
VE: ["VES"],
|
|
2459
|
+
VN: ["VND"],
|
|
2460
|
+
YE: ["YER"],
|
|
2461
|
+
ZM: ["ZMW"],
|
|
2462
|
+
ZW: ["ZWG"],
|
|
2463
|
+
AX: ["EUR"],
|
|
2464
|
+
FO: ["DKK"],
|
|
2465
|
+
XK: ["EUR"]
|
|
2466
|
+
});
|
|
2467
|
+
var COUNTRY_LANGUAGES = Object.freeze({
|
|
2468
|
+
AF: ["ps", "fa"],
|
|
2469
|
+
AL: ["sq"],
|
|
2470
|
+
DZ: ["ar"],
|
|
2471
|
+
AD: ["ca"],
|
|
2472
|
+
AO: ["pt"],
|
|
2473
|
+
AG: ["en"],
|
|
2474
|
+
AR: ["es"],
|
|
2475
|
+
AM: ["hy"],
|
|
2476
|
+
AU: ["en"],
|
|
2477
|
+
AT: ["de"],
|
|
2478
|
+
AZ: ["az"],
|
|
2479
|
+
BS: ["en"],
|
|
2480
|
+
BH: ["ar"],
|
|
2481
|
+
BD: ["bn"],
|
|
2482
|
+
BB: ["en"],
|
|
2483
|
+
BY: ["be", "ru"],
|
|
2484
|
+
BE: ["nl", "fr", "de"],
|
|
2485
|
+
BZ: ["en"],
|
|
2486
|
+
BJ: ["fr"],
|
|
2487
|
+
BT: ["dz"],
|
|
2488
|
+
BO: ["es", "qu", "ay"],
|
|
2489
|
+
BA: ["bs", "hr", "sr"],
|
|
2490
|
+
BW: ["en", "tn"],
|
|
2491
|
+
BR: ["pt"],
|
|
2492
|
+
BN: ["ms"],
|
|
2493
|
+
BG: ["bg"],
|
|
2494
|
+
BF: ["fr"],
|
|
2495
|
+
BI: ["rn", "fr"],
|
|
2496
|
+
CV: ["pt"],
|
|
2497
|
+
KH: ["km"],
|
|
2498
|
+
CM: ["fr", "en"],
|
|
2499
|
+
CA: ["en", "fr"],
|
|
2500
|
+
CF: ["fr", "sg"],
|
|
2501
|
+
TD: ["fr", "ar"],
|
|
2502
|
+
CL: ["es"],
|
|
2503
|
+
CN: ["zh"],
|
|
2504
|
+
CO: ["es"],
|
|
2505
|
+
KM: ["ar", "fr"],
|
|
2506
|
+
CG: ["fr"],
|
|
2507
|
+
CD: ["fr"],
|
|
2508
|
+
CR: ["es"],
|
|
2509
|
+
CI: ["fr"],
|
|
2510
|
+
HR: ["hr"],
|
|
2511
|
+
CU: ["es"],
|
|
2512
|
+
CY: ["el", "tr"],
|
|
2513
|
+
CZ: ["cs"],
|
|
2514
|
+
DK: ["da"],
|
|
2515
|
+
DJ: ["fr", "ar"],
|
|
2516
|
+
DM: ["en"],
|
|
2517
|
+
DO: ["es"],
|
|
2518
|
+
EC: ["es"],
|
|
2519
|
+
EG: ["ar"],
|
|
2520
|
+
SV: ["es"],
|
|
2521
|
+
GQ: ["es", "fr", "pt"],
|
|
2522
|
+
ER: ["ti", "ar", "en"],
|
|
2523
|
+
EE: ["et"],
|
|
2524
|
+
SZ: ["en", "ss"],
|
|
2525
|
+
ET: ["am"],
|
|
2526
|
+
FJ: ["en", "fj"],
|
|
2527
|
+
FI: ["fi", "sv"],
|
|
2528
|
+
FR: ["fr"],
|
|
2529
|
+
GA: ["fr"],
|
|
2530
|
+
GM: ["en"],
|
|
2531
|
+
GE: ["ka"],
|
|
2532
|
+
DE: ["de"],
|
|
2533
|
+
GH: ["en"],
|
|
2534
|
+
GR: ["el"],
|
|
2535
|
+
GD: ["en"],
|
|
2536
|
+
GT: ["es"],
|
|
2537
|
+
GN: ["fr"],
|
|
2538
|
+
GW: ["pt"],
|
|
2539
|
+
GY: ["en"],
|
|
2540
|
+
HT: ["ht", "fr"],
|
|
2541
|
+
HN: ["es"],
|
|
2542
|
+
HU: ["hu"],
|
|
2543
|
+
IS: ["is"],
|
|
2544
|
+
IN: ["hi", "en"],
|
|
2545
|
+
ID: ["id"],
|
|
2546
|
+
IR: ["fa"],
|
|
2547
|
+
IQ: ["ar", "ku"],
|
|
2548
|
+
IE: ["en", "ga"],
|
|
2549
|
+
IL: ["he", "ar"],
|
|
2550
|
+
IT: ["it"],
|
|
2551
|
+
JM: ["en"],
|
|
2552
|
+
JP: ["ja"],
|
|
2553
|
+
JO: ["ar"],
|
|
2554
|
+
KZ: ["kk", "ru"],
|
|
2555
|
+
KE: ["en", "sw"],
|
|
2556
|
+
KI: ["en"],
|
|
2557
|
+
KP: ["ko"],
|
|
2558
|
+
KR: ["ko"],
|
|
2559
|
+
KW: ["ar"],
|
|
2560
|
+
KG: ["ky", "ru"],
|
|
2561
|
+
LA: ["lo"],
|
|
2562
|
+
LV: ["lv"],
|
|
2563
|
+
LB: ["ar", "fr"],
|
|
2564
|
+
LS: ["en", "st"],
|
|
2565
|
+
LR: ["en"],
|
|
2566
|
+
LY: ["ar"],
|
|
2567
|
+
LI: ["de"],
|
|
2568
|
+
LT: ["lt"],
|
|
2569
|
+
LU: ["lb", "fr", "de"],
|
|
2570
|
+
MG: ["mg", "fr"],
|
|
2571
|
+
MW: ["en", "ny"],
|
|
2572
|
+
MY: ["ms"],
|
|
2573
|
+
MV: ["dv"],
|
|
2574
|
+
ML: ["fr"],
|
|
2575
|
+
MT: ["mt", "en"],
|
|
2576
|
+
MH: ["en", "mh"],
|
|
2577
|
+
MR: ["ar"],
|
|
2578
|
+
MU: ["en"],
|
|
2579
|
+
MX: ["es"],
|
|
2580
|
+
MD: ["ro"],
|
|
2581
|
+
MC: ["fr"],
|
|
2582
|
+
MN: ["mn"],
|
|
2583
|
+
ME: ["sr"],
|
|
2584
|
+
MA: ["ar"],
|
|
2585
|
+
MZ: ["pt"],
|
|
2586
|
+
MM: ["my"],
|
|
2587
|
+
NA: ["en"],
|
|
2588
|
+
NR: ["en", "na"],
|
|
2589
|
+
NP: ["ne"],
|
|
2590
|
+
NL: ["nl"],
|
|
2591
|
+
NZ: ["en", "mi"],
|
|
2592
|
+
NI: ["es"],
|
|
2593
|
+
NE: ["fr"],
|
|
2594
|
+
NG: ["en"],
|
|
2595
|
+
MK: ["mk"],
|
|
2596
|
+
NO: ["no", "nb", "nn"],
|
|
2597
|
+
OM: ["ar"],
|
|
2598
|
+
PK: ["ur", "en"],
|
|
2599
|
+
PW: ["en"],
|
|
2600
|
+
PA: ["es"],
|
|
2601
|
+
PG: ["en"],
|
|
2602
|
+
PY: ["es", "gn"],
|
|
2603
|
+
PE: ["es", "qu"],
|
|
2604
|
+
PH: ["tl", "en"],
|
|
2605
|
+
PL: ["pl"],
|
|
2606
|
+
PT: ["pt"],
|
|
2607
|
+
QA: ["ar"],
|
|
2608
|
+
RO: ["ro"],
|
|
2609
|
+
RU: ["ru"],
|
|
2610
|
+
RW: ["rw", "fr", "en"],
|
|
2611
|
+
KN: ["en"],
|
|
2612
|
+
LC: ["en"],
|
|
2613
|
+
VC: ["en"],
|
|
2614
|
+
WS: ["sm", "en"],
|
|
2615
|
+
SM: ["it"],
|
|
2616
|
+
ST: ["pt"],
|
|
2617
|
+
SA: ["ar"],
|
|
2618
|
+
SN: ["fr"],
|
|
2619
|
+
RS: ["sr"],
|
|
2620
|
+
SC: ["en", "fr"],
|
|
2621
|
+
SL: ["en"],
|
|
2622
|
+
SG: ["en", "ms", "zh", "ta"],
|
|
2623
|
+
SK: ["sk"],
|
|
2624
|
+
SI: ["sl"],
|
|
2625
|
+
SB: ["en"],
|
|
2626
|
+
SO: ["so", "ar"],
|
|
2627
|
+
ZA: ["en", "af", "zu"],
|
|
2628
|
+
SS: ["en"],
|
|
2629
|
+
ES: ["es"],
|
|
2630
|
+
LK: ["si", "ta"],
|
|
2631
|
+
SD: ["ar", "en"],
|
|
2632
|
+
SR: ["nl"],
|
|
2633
|
+
SE: ["sv"],
|
|
2634
|
+
CH: ["de", "fr", "it", "rm"],
|
|
2635
|
+
SY: ["ar"],
|
|
2636
|
+
TW: ["zh"],
|
|
2637
|
+
TJ: ["tg"],
|
|
2638
|
+
TZ: ["sw", "en"],
|
|
2639
|
+
TH: ["th"],
|
|
2640
|
+
TL: ["pt"],
|
|
2641
|
+
TG: ["fr"],
|
|
2642
|
+
TO: ["en", "to"],
|
|
2643
|
+
TT: ["en"],
|
|
2644
|
+
TN: ["ar"],
|
|
2645
|
+
TR: ["tr"],
|
|
2646
|
+
TM: ["tk"],
|
|
2647
|
+
TV: ["en"],
|
|
2648
|
+
UG: ["en", "sw"],
|
|
2649
|
+
UA: ["uk"],
|
|
2650
|
+
AE: ["ar"],
|
|
2651
|
+
GB: ["en"],
|
|
2652
|
+
US: ["en"],
|
|
2653
|
+
UY: ["es"],
|
|
2654
|
+
UZ: ["uz"],
|
|
2655
|
+
VU: ["en", "fr", "bi"],
|
|
2656
|
+
VA: ["it", "la"],
|
|
2657
|
+
VE: ["es"],
|
|
2658
|
+
VN: ["vi"],
|
|
2659
|
+
YE: ["ar"],
|
|
2660
|
+
ZM: ["en"],
|
|
2661
|
+
ZW: ["en", "sn", "nd"],
|
|
2662
|
+
AS: ["en", "sm"],
|
|
2663
|
+
AW: ["nl"],
|
|
2664
|
+
BM: ["en"],
|
|
2665
|
+
CW: ["nl"],
|
|
2666
|
+
FO: ["fo", "da"],
|
|
2667
|
+
GI: ["en"],
|
|
2668
|
+
GL: ["kl", "da"],
|
|
2669
|
+
GG: ["en"],
|
|
2670
|
+
GU: ["en"],
|
|
2671
|
+
HK: ["zh", "en"],
|
|
2672
|
+
IM: ["en"],
|
|
2673
|
+
JE: ["en"],
|
|
2674
|
+
XK: ["sq", "sr"],
|
|
2675
|
+
MO: ["zh", "pt"],
|
|
2676
|
+
PR: ["es", "en"]
|
|
2677
|
+
});
|
|
2678
|
+
var COUNTRY_ALIASES = Object.freeze({
|
|
2679
|
+
USA: "US",
|
|
2680
|
+
UK: "GB",
|
|
2681
|
+
Holland: "NL",
|
|
2682
|
+
"Czech Republic": "CZ",
|
|
2683
|
+
"Ivory Coast": "CI",
|
|
2684
|
+
Burma: "MM",
|
|
2685
|
+
Swaziland: "SZ",
|
|
2686
|
+
Persia: "IR",
|
|
2687
|
+
"Great Britain": "GB",
|
|
2688
|
+
England: "GB",
|
|
2689
|
+
UAE: "AE",
|
|
2690
|
+
"South Korea": "KR",
|
|
2691
|
+
"North Korea": "KP",
|
|
2692
|
+
"Republic of Ireland": "IE",
|
|
2693
|
+
Suisse: "CH",
|
|
2694
|
+
Svizzera: "CH",
|
|
2695
|
+
Belgique: "BE",
|
|
2696
|
+
Noreg: "NO",
|
|
2697
|
+
Vitryssland: "BY"
|
|
2698
|
+
});
|
|
2699
|
+
var PRIMARY_BY_CALLING_CODE = Object.freeze({
|
|
2700
|
+
"1": "US",
|
|
2701
|
+
"44": "GB",
|
|
2702
|
+
"7": "RU"
|
|
2703
|
+
});
|
|
2704
|
+
|
|
2705
|
+
// src/geography/country.ts
|
|
2706
|
+
var MAX_INPUT_LENGTH3 = 100;
|
|
2707
|
+
var Country = class _Country {
|
|
2708
|
+
static typeInfo = Object.freeze({
|
|
2709
|
+
englishName: "Country",
|
|
2710
|
+
localizedName: "Land",
|
|
2711
|
+
emoji: "\u{1F30D}",
|
|
2712
|
+
sources: Object.freeze([
|
|
2713
|
+
"https://www.iso.org/iso-3166-country-codes.html",
|
|
2714
|
+
"https://en.wikipedia.org/wiki/ISO_3166-1",
|
|
2715
|
+
"https://www.itu.int/rec/T-REC-E.164/",
|
|
2716
|
+
"https://www.iana.org/domains/root/db",
|
|
2717
|
+
"https://www.wikidata.org/wiki/Property:P625",
|
|
2718
|
+
"https://www.wikidata.org/wiki/Property:P36",
|
|
2719
|
+
"https://www.wikidata.org/wiki/Property:P47"
|
|
2720
|
+
])
|
|
2721
|
+
});
|
|
2722
|
+
alpha2Code;
|
|
2723
|
+
alpha3Code;
|
|
2724
|
+
numericCode;
|
|
2725
|
+
englishName;
|
|
2726
|
+
localizedName;
|
|
2727
|
+
nativeName;
|
|
2728
|
+
callingCode;
|
|
2729
|
+
topLevelDomain;
|
|
2730
|
+
continent;
|
|
2731
|
+
currencyCodes;
|
|
2732
|
+
languageCodes;
|
|
2733
|
+
constructor(row) {
|
|
2734
|
+
this.alpha2Code = row.alpha2;
|
|
2735
|
+
this.alpha3Code = row.alpha3;
|
|
2736
|
+
this.numericCode = row.numeric;
|
|
2737
|
+
this.englishName = row.en;
|
|
2738
|
+
this.localizedName = row.sv;
|
|
2739
|
+
this.nativeName = row.native;
|
|
2740
|
+
this.callingCode = row.callingCode;
|
|
2741
|
+
this.topLevelDomain = row.tld;
|
|
2742
|
+
this.continent = row.continent;
|
|
2743
|
+
this.currencyCodes = COUNTRY_CURRENCIES[row.alpha2] ?? [];
|
|
2744
|
+
this.languageCodes = COUNTRY_LANGUAGES[row.alpha2] ?? [];
|
|
2745
|
+
}
|
|
2746
|
+
/** The canonical value of this country: its ISO 3166-1 alpha-2 code. */
|
|
2747
|
+
get value() {
|
|
2748
|
+
return this.alpha2Code;
|
|
2749
|
+
}
|
|
2750
|
+
/** Display name in the current culture (Swedish or English). */
|
|
2751
|
+
get displayName() {
|
|
2752
|
+
return PrimitivesDefaults.useLocalizedDisplayNames ? this.localizedName : this.englishName;
|
|
2753
|
+
}
|
|
2754
|
+
/** Culture-independent display form. Always the English name. */
|
|
2755
|
+
get formatted() {
|
|
2756
|
+
return this.englishName;
|
|
2757
|
+
}
|
|
2758
|
+
/** Geographic coordinate of the country (centroid, from Wikidata P625). */
|
|
2759
|
+
get coordinate() {
|
|
2760
|
+
const c = COUNTRY_COORDINATES[this.alpha2Code];
|
|
2761
|
+
if (!c) throw new Error(`No coordinate for country ${this.alpha2Code}.`);
|
|
2762
|
+
return GeoCoordinate.create(c[0], c[1]);
|
|
2763
|
+
}
|
|
2764
|
+
/** Approximate latitude (WGS 84) of the country centroid. */
|
|
2765
|
+
get latitude() {
|
|
2766
|
+
return this.coordinate.latitude;
|
|
2767
|
+
}
|
|
2768
|
+
/** Approximate longitude (WGS 84) of the country centroid. */
|
|
2769
|
+
get longitude() {
|
|
2770
|
+
return this.coordinate.longitude;
|
|
2771
|
+
}
|
|
2772
|
+
/** Capital city, or `null` for entries without a capital (e.g. Antarctica). */
|
|
2773
|
+
get capital() {
|
|
2774
|
+
return getCountryCapital(this.alpha2Code);
|
|
2775
|
+
}
|
|
2776
|
+
get isInEuropeanUnion() {
|
|
2777
|
+
return EU_COUNTRIES.has(this.alpha2Code);
|
|
2778
|
+
}
|
|
2779
|
+
get isInEea() {
|
|
2780
|
+
return EEA_COUNTRIES.has(this.alpha2Code);
|
|
2781
|
+
}
|
|
2782
|
+
get isInSchengen() {
|
|
2783
|
+
return SCHENGEN_COUNTRIES.has(this.alpha2Code);
|
|
2784
|
+
}
|
|
2785
|
+
get isInNordics() {
|
|
2786
|
+
return NORDIC_COUNTRIES.has(this.alpha2Code);
|
|
2787
|
+
}
|
|
2788
|
+
get isInSepa() {
|
|
2789
|
+
return SEPA_COUNTRIES.has(this.alpha2Code);
|
|
2790
|
+
}
|
|
2791
|
+
/** True when the euro is among the country's legal tenders. */
|
|
2792
|
+
get usesEuro() {
|
|
2793
|
+
return this.currencyCodes.includes("EUR");
|
|
2794
|
+
}
|
|
2795
|
+
/** Primary ISO 4217 currency code, or `null` when unknown. */
|
|
2796
|
+
get currencyCode() {
|
|
2797
|
+
return this.currencyCodes[0] ?? null;
|
|
2798
|
+
}
|
|
2799
|
+
/**
|
|
2800
|
+
* Primary legal-tender currency, or `null` when unknown. Countries with
|
|
2801
|
+
* several legal tenders (Cuba, Panama, Namibia) return the first; use
|
|
2802
|
+
* {@link currencies} for the full list.
|
|
2803
|
+
*/
|
|
2804
|
+
get currency() {
|
|
2805
|
+
const code = this.currencyCode;
|
|
2806
|
+
return code == null ? null : Currency.tryParse(code);
|
|
2807
|
+
}
|
|
2808
|
+
/** All recognized currencies for this country, in priority order. */
|
|
2809
|
+
get currencies() {
|
|
2810
|
+
return Object.freeze(
|
|
2811
|
+
this.currencyCodes.map((code) => Currency.tryParse(code)).filter((c) => c !== null)
|
|
2812
|
+
);
|
|
2813
|
+
}
|
|
2814
|
+
/**
|
|
2815
|
+
* Primary official language, or `null` when unknown. Countries with several
|
|
2816
|
+
* official languages (Belgium, Switzerland) return the most widely spoken;
|
|
2817
|
+
* use {@link officialLanguages} for the full list.
|
|
2818
|
+
*/
|
|
2819
|
+
get primaryLanguage() {
|
|
2820
|
+
const code = this.languageCodes[0];
|
|
2821
|
+
return code == null ? null : Language.tryParse(code);
|
|
2822
|
+
}
|
|
2823
|
+
/** All official languages of the country, in priority order. */
|
|
2824
|
+
get officialLanguages() {
|
|
2825
|
+
return Object.freeze(
|
|
2826
|
+
this.languageCodes.map((code) => Language.tryParse(code)).filter((l) => l !== null)
|
|
2827
|
+
);
|
|
2828
|
+
}
|
|
2829
|
+
static tryParse(input) {
|
|
2830
|
+
if (input == null) return null;
|
|
2831
|
+
const sanitized = sanitizeInput(input).trim();
|
|
2832
|
+
if (sanitized.length === 0 || sanitized.length > MAX_INPUT_LENGTH3) return null;
|
|
2833
|
+
const direct = lookupCi(sanitized);
|
|
2834
|
+
if (direct) return direct;
|
|
2835
|
+
if (sanitized.length > 4 && sanitized.slice(0, 4).toLowerCase() === "the ") {
|
|
2836
|
+
const without = sanitized.slice(4);
|
|
2837
|
+
const stripped = lookupCi(without);
|
|
2838
|
+
if (stripped) return stripped;
|
|
2839
|
+
}
|
|
2840
|
+
return null;
|
|
2841
|
+
}
|
|
2842
|
+
static parse(input) {
|
|
2843
|
+
const r = _Country.tryParse(input);
|
|
2844
|
+
if (r === null) throw new Error("Unknown country.");
|
|
2845
|
+
return r;
|
|
2846
|
+
}
|
|
2847
|
+
static isValid(input) {
|
|
2848
|
+
return _Country.tryParse(input) !== null;
|
|
2849
|
+
}
|
|
2850
|
+
static format(input, options) {
|
|
2851
|
+
const r = _Country.tryParse(input);
|
|
2852
|
+
if (r) return r.displayName;
|
|
2853
|
+
if (options?.fallbackToTrimmedInputWhenInvalid && input != null && input.trim() !== "") {
|
|
2854
|
+
return input.trim();
|
|
2855
|
+
}
|
|
2856
|
+
return null;
|
|
2857
|
+
}
|
|
2858
|
+
static normalize(input, options) {
|
|
2859
|
+
const r = _Country.tryParse(input);
|
|
2860
|
+
if (r) return r.alpha2Code;
|
|
2861
|
+
if (options?.fallbackToTrimmedInputWhenInvalid && input != null) {
|
|
2862
|
+
const trimmed = input.trim();
|
|
2863
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
2864
|
+
}
|
|
2865
|
+
return null;
|
|
2866
|
+
}
|
|
2867
|
+
static isNormalized(input) {
|
|
2868
|
+
return input != null && _Country.normalize(input) === input;
|
|
2869
|
+
}
|
|
2870
|
+
/** Look up a country by its phone calling code. Primary owner wins for shared codes. */
|
|
2871
|
+
static tryFindByCallingCode(callingCode) {
|
|
2872
|
+
if (callingCode == null) return null;
|
|
2873
|
+
const trimmed = callingCode.trim();
|
|
2874
|
+
if (trimmed.length === 0) return null;
|
|
2875
|
+
return BY_CALLING_CODE.get(trimmed) ?? null;
|
|
2876
|
+
}
|
|
2877
|
+
/** All known countries. */
|
|
2878
|
+
static get all() {
|
|
2879
|
+
return ALL_COUNTRIES;
|
|
2880
|
+
}
|
|
2881
|
+
/**
|
|
2882
|
+
* Returns countries within `radiusKm` of this country, ordered by distance.
|
|
2883
|
+
*/
|
|
2884
|
+
findNeighbors(radiusKm) {
|
|
2885
|
+
if (!Number.isFinite(radiusKm) || radiusKm <= 0) {
|
|
2886
|
+
throw new RangeError("radiusKm must be a positive finite number.");
|
|
2887
|
+
}
|
|
2888
|
+
return _Country.findNeighbors(this.coordinate, radiusKm).filter((d) => d.country !== this);
|
|
2889
|
+
}
|
|
2890
|
+
/** Returns countries within `radiusKm` of `coordinate`, ordered by distance. */
|
|
2891
|
+
static findNeighbors(coordinate, radiusKm) {
|
|
2892
|
+
if (!Number.isFinite(radiusKm) || radiusKm <= 0) {
|
|
2893
|
+
throw new RangeError("radiusKm must be a positive finite number.");
|
|
2894
|
+
}
|
|
2895
|
+
const out = [];
|
|
2896
|
+
for (const c of ALL_COUNTRIES) {
|
|
2897
|
+
const dist = GeoCoordinate.distanceKilometers(coordinate, c.coordinate);
|
|
2898
|
+
if (dist <= radiusKm) out.push({ country: c, distanceKilometers: dist });
|
|
2899
|
+
}
|
|
2900
|
+
out.sort((a, b) => a.distanceKilometers - b.distanceKilometers);
|
|
2901
|
+
return out;
|
|
2902
|
+
}
|
|
2903
|
+
/**
|
|
2904
|
+
* Scans unstructured text for country names (4+ chars, word-bounded). Low confidence
|
|
2905
|
+
* because country names can occur in non-geographic contexts.
|
|
2906
|
+
*/
|
|
2907
|
+
static findCandidatesInText(text) {
|
|
2908
|
+
if (!text) return [];
|
|
2909
|
+
const out = [];
|
|
2910
|
+
SCAN_PATTERN.lastIndex = 0;
|
|
2911
|
+
let m;
|
|
2912
|
+
while ((m = SCAN_PATTERN.exec(text)) !== null) {
|
|
2913
|
+
const country = _Country.tryParse(m[0]);
|
|
2914
|
+
if (!country) continue;
|
|
2915
|
+
out.push(
|
|
2916
|
+
new TextCandidate({
|
|
2917
|
+
startIndex: m.index,
|
|
2918
|
+
length: m[0].length,
|
|
2919
|
+
originalText: m[0],
|
|
2920
|
+
typeName: "Country",
|
|
2921
|
+
category: TextCandidateCategory.Geography,
|
|
2922
|
+
normalizedForm: country.toNormalizedString(),
|
|
2923
|
+
formattedForm: country.toString(),
|
|
2924
|
+
maskedForm: country.localizedName,
|
|
2925
|
+
confidence: TextMatchConfidence.Low,
|
|
2926
|
+
value: country
|
|
2927
|
+
})
|
|
2928
|
+
);
|
|
2929
|
+
}
|
|
2930
|
+
return out;
|
|
2931
|
+
}
|
|
2932
|
+
toNormalizedString() {
|
|
2933
|
+
return this.alpha2Code;
|
|
2934
|
+
}
|
|
2935
|
+
toString() {
|
|
2936
|
+
return this.displayName;
|
|
2937
|
+
}
|
|
2938
|
+
toDisplayString() {
|
|
2939
|
+
return this.displayName;
|
|
2940
|
+
}
|
|
2941
|
+
toEnglishString() {
|
|
2942
|
+
return this.englishName;
|
|
2943
|
+
}
|
|
2944
|
+
toNativeString() {
|
|
2945
|
+
return this.nativeName;
|
|
2946
|
+
}
|
|
2947
|
+
equals(other) {
|
|
2948
|
+
return other != null && this.alpha2Code === other.alpha2Code;
|
|
2949
|
+
}
|
|
2950
|
+
compareTo(other) {
|
|
2951
|
+
if (other == null) return 1;
|
|
2952
|
+
return this.alpha2Code < other.alpha2Code ? -1 : this.alpha2Code > other.alpha2Code ? 1 : 0;
|
|
2953
|
+
}
|
|
2954
|
+
static get Sweden() {
|
|
2955
|
+
return getByAlpha2("SE");
|
|
2956
|
+
}
|
|
2957
|
+
static get Norway() {
|
|
2958
|
+
return getByAlpha2("NO");
|
|
2959
|
+
}
|
|
2960
|
+
static get Finland() {
|
|
2961
|
+
return getByAlpha2("FI");
|
|
2962
|
+
}
|
|
2963
|
+
static get Denmark() {
|
|
2964
|
+
return getByAlpha2("DK");
|
|
2965
|
+
}
|
|
2966
|
+
static get Iceland() {
|
|
2967
|
+
return getByAlpha2("IS");
|
|
2968
|
+
}
|
|
2969
|
+
static get Germany() {
|
|
2970
|
+
return getByAlpha2("DE");
|
|
2971
|
+
}
|
|
2972
|
+
static get Poland() {
|
|
2973
|
+
return getByAlpha2("PL");
|
|
2974
|
+
}
|
|
2975
|
+
static get Estonia() {
|
|
2976
|
+
return getByAlpha2("EE");
|
|
2977
|
+
}
|
|
2978
|
+
static get Lithuania() {
|
|
2979
|
+
return getByAlpha2("LT");
|
|
2980
|
+
}
|
|
2981
|
+
static get Latvia() {
|
|
2982
|
+
return getByAlpha2("LV");
|
|
2983
|
+
}
|
|
2984
|
+
static get Romania() {
|
|
2985
|
+
return getByAlpha2("RO");
|
|
2986
|
+
}
|
|
2987
|
+
static get Bulgaria() {
|
|
2988
|
+
return getByAlpha2("BG");
|
|
2989
|
+
}
|
|
2990
|
+
static get CzechRepublic() {
|
|
2991
|
+
return getByAlpha2("CZ");
|
|
2992
|
+
}
|
|
2993
|
+
static get Spain() {
|
|
2994
|
+
return getByAlpha2("ES");
|
|
2995
|
+
}
|
|
2996
|
+
static get Netherlands() {
|
|
2997
|
+
return getByAlpha2("NL");
|
|
2998
|
+
}
|
|
2999
|
+
static get Greece() {
|
|
3000
|
+
return getByAlpha2("GR");
|
|
3001
|
+
}
|
|
3002
|
+
static get Italy() {
|
|
3003
|
+
return getByAlpha2("IT");
|
|
3004
|
+
}
|
|
3005
|
+
static get Slovenia() {
|
|
3006
|
+
return getByAlpha2("SI");
|
|
3007
|
+
}
|
|
3008
|
+
static get Croatia() {
|
|
3009
|
+
return getByAlpha2("HR");
|
|
3010
|
+
}
|
|
3011
|
+
static get Portugal() {
|
|
3012
|
+
return getByAlpha2("PT");
|
|
3013
|
+
}
|
|
3014
|
+
static get Hungary() {
|
|
3015
|
+
return getByAlpha2("HU");
|
|
3016
|
+
}
|
|
3017
|
+
static get France() {
|
|
3018
|
+
return getByAlpha2("FR");
|
|
3019
|
+
}
|
|
3020
|
+
static get Slovakia() {
|
|
3021
|
+
return getByAlpha2("SK");
|
|
3022
|
+
}
|
|
3023
|
+
static get Belgium() {
|
|
3024
|
+
return getByAlpha2("BE");
|
|
3025
|
+
}
|
|
3026
|
+
static get UnitedKingdom() {
|
|
3027
|
+
return getByAlpha2("GB");
|
|
3028
|
+
}
|
|
3029
|
+
static get Austria() {
|
|
3030
|
+
return getByAlpha2("AT");
|
|
3031
|
+
}
|
|
3032
|
+
static get Cyprus() {
|
|
3033
|
+
return getByAlpha2("CY");
|
|
3034
|
+
}
|
|
3035
|
+
static get Switzerland() {
|
|
3036
|
+
return getByAlpha2("CH");
|
|
3037
|
+
}
|
|
3038
|
+
static get Ireland() {
|
|
3039
|
+
return getByAlpha2("IE");
|
|
3040
|
+
}
|
|
3041
|
+
static get Luxembourg() {
|
|
3042
|
+
return getByAlpha2("LU");
|
|
3043
|
+
}
|
|
3044
|
+
static get Malta() {
|
|
3045
|
+
return getByAlpha2("MT");
|
|
3046
|
+
}
|
|
3047
|
+
static get Liechtenstein() {
|
|
3048
|
+
return getByAlpha2("LI");
|
|
3049
|
+
}
|
|
3050
|
+
/** @internal */
|
|
3051
|
+
static _fromRow(row) {
|
|
3052
|
+
return new _Country(row);
|
|
3053
|
+
}
|
|
3054
|
+
};
|
|
3055
|
+
var ALL_COUNTRIES = COUNTRY_ROWS.map((r) => Country._fromRow(r));
|
|
3056
|
+
var BY_ALPHA2 = /* @__PURE__ */ new Map();
|
|
3057
|
+
var BY_NAME2 = /* @__PURE__ */ new Map();
|
|
3058
|
+
var BY_CALLING_CODE = /* @__PURE__ */ new Map();
|
|
3059
|
+
for (const c of ALL_COUNTRIES) {
|
|
3060
|
+
BY_ALPHA2.set(c.alpha2Code.toUpperCase(), c);
|
|
3061
|
+
BY_NAME2.set(c.alpha2Code.toUpperCase(), c);
|
|
3062
|
+
BY_NAME2.set(c.alpha3Code.toUpperCase(), c);
|
|
3063
|
+
BY_NAME2.set(c.englishName.toLowerCase(), c);
|
|
3064
|
+
if (!BY_NAME2.has(c.localizedName.toLowerCase())) BY_NAME2.set(c.localizedName.toLowerCase(), c);
|
|
3065
|
+
if (c.nativeName.toLowerCase() !== c.englishName.toLowerCase() && !BY_NAME2.has(c.nativeName.toLowerCase())) {
|
|
3066
|
+
BY_NAME2.set(c.nativeName.toLowerCase(), c);
|
|
3067
|
+
}
|
|
3068
|
+
if (!BY_CALLING_CODE.has(c.callingCode)) BY_CALLING_CODE.set(c.callingCode, c);
|
|
3069
|
+
}
|
|
3070
|
+
for (const [aliasOrCode, alpha2] of Object.entries(COUNTRY_ALIASES)) {
|
|
3071
|
+
const target = BY_ALPHA2.get(alpha2.toUpperCase());
|
|
3072
|
+
if (target) BY_NAME2.set(aliasOrCode.toLowerCase(), target);
|
|
3073
|
+
}
|
|
3074
|
+
for (const [code, alpha2] of Object.entries(PRIMARY_BY_CALLING_CODE)) {
|
|
3075
|
+
const target = BY_ALPHA2.get(alpha2.toUpperCase());
|
|
3076
|
+
if (target) BY_CALLING_CODE.set(code, target);
|
|
3077
|
+
}
|
|
3078
|
+
var SCAN_PATTERN = (() => {
|
|
3079
|
+
const names = [...BY_NAME2.keys()].filter((n) => n.length >= 4).sort((a, b) => b.length - a.length).map(escapeRegex);
|
|
3080
|
+
return new RegExp(`(?<![\\p{L}\\p{N}_])(?:${names.join("|")})(?![\\p{L}\\p{N}_])`, "giu");
|
|
3081
|
+
})();
|
|
3082
|
+
function getByAlpha2(code) {
|
|
3083
|
+
const c = BY_ALPHA2.get(code.toUpperCase());
|
|
3084
|
+
if (!c) throw new Error(`Unknown country code ${code}.`);
|
|
3085
|
+
return c;
|
|
3086
|
+
}
|
|
3087
|
+
function lookupCi(input) {
|
|
3088
|
+
const upper = input.toUpperCase();
|
|
3089
|
+
const a2 = BY_ALPHA2.get(upper);
|
|
3090
|
+
if (a2) return a2;
|
|
3091
|
+
const lower = input.toLowerCase();
|
|
3092
|
+
return BY_NAME2.get(lower) ?? BY_NAME2.get(upper) ?? null;
|
|
3093
|
+
}
|
|
3094
|
+
function escapeRegex(s) {
|
|
3095
|
+
return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
3096
|
+
}
|
|
3097
|
+
|
|
3098
|
+
// src/geography/swedish-county.ts
|
|
3099
|
+
var MAX_INPUT_LENGTH4 = 100;
|
|
3100
|
+
var SwedishCounty = class _SwedishCounty {
|
|
3101
|
+
static typeInfo = Object.freeze({
|
|
3102
|
+
englishName: "County",
|
|
3103
|
+
localizedName: "L\xE4n",
|
|
3104
|
+
emoji: "\u{1F3DB}\uFE0F",
|
|
3105
|
+
sources: Object.freeze([
|
|
3106
|
+
"https://www.scb.se/en/finding-statistics/regional-statistics/regional-divisions/counties-and-municipalities/",
|
|
3107
|
+
"https://www.scb.se/en/finding-statistics/regional-statistics/regional-divisions/counties-and-municipalities/counties-and-municipalities-in-numerical-order/"
|
|
3108
|
+
])
|
|
3109
|
+
});
|
|
3110
|
+
code;
|
|
3111
|
+
localizedName;
|
|
3112
|
+
englishName;
|
|
3113
|
+
coordinate;
|
|
3114
|
+
constructor(code, localized, english, coord) {
|
|
3115
|
+
this.code = code;
|
|
3116
|
+
this.localizedName = localized;
|
|
3117
|
+
this.englishName = english;
|
|
3118
|
+
this.coordinate = coord;
|
|
3119
|
+
}
|
|
3120
|
+
get latitude() {
|
|
3121
|
+
return this.coordinate.latitude;
|
|
3122
|
+
}
|
|
3123
|
+
get longitude() {
|
|
3124
|
+
return this.coordinate.longitude;
|
|
3125
|
+
}
|
|
3126
|
+
get displayName() {
|
|
3127
|
+
return PrimitivesDefaults.useLocalizedDisplayNames ? this.localizedName : this.englishName;
|
|
3128
|
+
}
|
|
3129
|
+
static tryParse(input) {
|
|
3130
|
+
if (input == null) return null;
|
|
3131
|
+
const trimmed = sanitizeInput(input).trim();
|
|
3132
|
+
if (trimmed.length === 0 || trimmed.length > MAX_INPUT_LENGTH4) return null;
|
|
3133
|
+
const digits = keepDigits(trimmed);
|
|
3134
|
+
if (digits.length === 2 && BY_CODE2.has(digits)) return BY_CODE2.get(digits);
|
|
3135
|
+
return BY_NAME3.get(trimmed.toLowerCase()) ?? null;
|
|
3136
|
+
}
|
|
3137
|
+
static parse(input) {
|
|
3138
|
+
const r = _SwedishCounty.tryParse(input);
|
|
3139
|
+
if (r === null) throw new Error("Invalid Swedish county.");
|
|
3140
|
+
return r;
|
|
3141
|
+
}
|
|
3142
|
+
static isValid(input) {
|
|
3143
|
+
return _SwedishCounty.tryParse(input) !== null;
|
|
3144
|
+
}
|
|
3145
|
+
static format(input, options) {
|
|
3146
|
+
const r = _SwedishCounty.tryParse(input);
|
|
3147
|
+
if (r) return r.localizedName;
|
|
3148
|
+
if (options?.fallbackToTrimmedInputWhenInvalid && input != null && input.trim() !== "") {
|
|
3149
|
+
return input.trim();
|
|
3150
|
+
}
|
|
3151
|
+
return null;
|
|
3152
|
+
}
|
|
3153
|
+
static normalize(input, options) {
|
|
3154
|
+
const r = _SwedishCounty.tryParse(input);
|
|
3155
|
+
if (r) return r.code;
|
|
3156
|
+
if (options?.fallbackToTrimmedInputWhenInvalid && input != null) {
|
|
3157
|
+
const trimmed = input.trim();
|
|
3158
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
3159
|
+
}
|
|
3160
|
+
return null;
|
|
3161
|
+
}
|
|
3162
|
+
static isNormalized(input) {
|
|
3163
|
+
return input != null && _SwedishCounty.normalize(input) === input;
|
|
3164
|
+
}
|
|
3165
|
+
/** All 21 Swedish counties. */
|
|
3166
|
+
static get all() {
|
|
3167
|
+
return ALL_COUNTIES;
|
|
3168
|
+
}
|
|
3169
|
+
static findCandidatesInText(text) {
|
|
3170
|
+
if (!text) return [];
|
|
3171
|
+
const out = [];
|
|
3172
|
+
SCAN_PATTERN2.lastIndex = 0;
|
|
3173
|
+
let m;
|
|
3174
|
+
while ((m = SCAN_PATTERN2.exec(text)) !== null) {
|
|
3175
|
+
const county = _SwedishCounty.tryParse(m[0]);
|
|
3176
|
+
if (!county) continue;
|
|
3177
|
+
out.push(
|
|
3178
|
+
new TextCandidate({
|
|
3179
|
+
startIndex: m.index,
|
|
3180
|
+
length: m[0].length,
|
|
3181
|
+
originalText: m[0],
|
|
3182
|
+
typeName: "SwedishCounty",
|
|
3183
|
+
category: TextCandidateCategory.Geography,
|
|
3184
|
+
normalizedForm: county.toNormalizedString(),
|
|
3185
|
+
formattedForm: county.toString(),
|
|
3186
|
+
maskedForm: county.localizedName,
|
|
3187
|
+
confidence: TextMatchConfidence.Low,
|
|
3188
|
+
value: county
|
|
3189
|
+
})
|
|
3190
|
+
);
|
|
3191
|
+
}
|
|
3192
|
+
return out;
|
|
3193
|
+
}
|
|
3194
|
+
/** Distance in kilometers between two counties (by county seat). */
|
|
3195
|
+
static distanceKilometers(a, b) {
|
|
3196
|
+
return GeoCoordinate.distanceKilometers(a.coordinate, b.coordinate);
|
|
3197
|
+
}
|
|
3198
|
+
distanceKilometersTo(other) {
|
|
3199
|
+
const target = other instanceof _SwedishCounty ? other.coordinate : other;
|
|
3200
|
+
return GeoCoordinate.distanceKilometers(this.coordinate, target);
|
|
3201
|
+
}
|
|
3202
|
+
toNormalizedString() {
|
|
3203
|
+
return this.code;
|
|
3204
|
+
}
|
|
3205
|
+
toString() {
|
|
3206
|
+
return this.displayName;
|
|
3207
|
+
}
|
|
3208
|
+
toDisplayString() {
|
|
3209
|
+
return this.displayName;
|
|
3210
|
+
}
|
|
3211
|
+
toEnglishString() {
|
|
3212
|
+
return this.englishName;
|
|
3213
|
+
}
|
|
3214
|
+
toLocalString() {
|
|
3215
|
+
return this.localizedName;
|
|
3216
|
+
}
|
|
3217
|
+
equals(other) {
|
|
3218
|
+
return other != null && this.code === other.code;
|
|
3219
|
+
}
|
|
3220
|
+
compareTo(other) {
|
|
3221
|
+
if (other == null) return 1;
|
|
3222
|
+
return this.code < other.code ? -1 : this.code > other.code ? 1 : 0;
|
|
3223
|
+
}
|
|
3224
|
+
/** @internal */
|
|
3225
|
+
static _new(code, sv, en, c) {
|
|
3226
|
+
return new _SwedishCounty(code, sv, en, c);
|
|
3227
|
+
}
|
|
3228
|
+
};
|
|
3229
|
+
var COUNTY_DEFS = [
|
|
3230
|
+
{ code: "01", sv: "Stockholms l\xE4n", en: "Stockholm County", lat: 59.3275, lon: 18.054719 },
|
|
3231
|
+
{ code: "03", sv: "Uppsala l\xE4n", en: "Uppsala County", lat: 59.866667, lon: 17.633333 },
|
|
3232
|
+
{
|
|
3233
|
+
code: "04",
|
|
3234
|
+
sv: "S\xF6dermanlands l\xE4n",
|
|
3235
|
+
en: "S\xF6dermanland County",
|
|
3236
|
+
lat: 58.752778,
|
|
3237
|
+
lon: 17.008611
|
|
3238
|
+
},
|
|
3239
|
+
{ code: "05", sv: "\xD6sterg\xF6tlands l\xE4n", en: "\xD6sterg\xF6tland County", lat: 58.4, lon: 15.616667 },
|
|
3240
|
+
{ code: "06", sv: "J\xF6nk\xF6pings l\xE4n", en: "J\xF6nk\xF6ping County", lat: 57.783333, lon: 14.2 },
|
|
3241
|
+
{ code: "07", sv: "Kronobergs l\xE4n", en: "Kronoberg County", lat: 56.883333, lon: 14.8 },
|
|
3242
|
+
{ code: "08", sv: "Kalmar l\xE4n", en: "Kalmar County", lat: 56.666667, lon: 16.366667 },
|
|
3243
|
+
{ code: "09", sv: "Gotlands l\xE4n", en: "Gotland County", lat: 57.615278, lon: 18.280556 },
|
|
3244
|
+
{ code: "10", sv: "Blekinge l\xE4n", en: "Blekinge County", lat: 56.183333, lon: 15.65 },
|
|
3245
|
+
{ code: "12", sv: "Sk\xE5ne l\xE4n", en: "Sk\xE5ne County", lat: 55.565, lon: 13.018611 },
|
|
3246
|
+
{ code: "13", sv: "Hallands l\xE4n", en: "Halland County", lat: 56.666667, lon: 12.85 },
|
|
3247
|
+
{
|
|
3248
|
+
code: "14",
|
|
3249
|
+
sv: "V\xE4stra G\xF6talands l\xE4n",
|
|
3250
|
+
en: "V\xE4stra G\xF6taland County",
|
|
3251
|
+
lat: 57.7,
|
|
3252
|
+
lon: 11.933333
|
|
3253
|
+
},
|
|
3254
|
+
{ code: "17", sv: "V\xE4rmlands l\xE4n", en: "V\xE4rmland County", lat: 59.383333, lon: 13.533333 },
|
|
3255
|
+
{ code: "18", sv: "\xD6rebro l\xE4n", en: "\xD6rebro County", lat: 59.273889, lon: 15.213333 },
|
|
3256
|
+
{ code: "19", sv: "V\xE4stmanlands l\xE4n", en: "V\xE4stmanland County", lat: 59.616667, lon: 16.533333 },
|
|
3257
|
+
{ code: "20", sv: "Dalarnas l\xE4n", en: "Dalarna County", lat: 60.6, lon: 15.633333 },
|
|
3258
|
+
{ code: "21", sv: "G\xE4vleborgs l\xE4n", en: "G\xE4vleborg County", lat: 60.666667, lon: 17.166667 },
|
|
3259
|
+
{
|
|
3260
|
+
code: "22",
|
|
3261
|
+
sv: "V\xE4sternorrlands l\xE4n",
|
|
3262
|
+
en: "V\xE4sternorrland County",
|
|
3263
|
+
lat: 62.633333,
|
|
3264
|
+
lon: 17.933333
|
|
3265
|
+
},
|
|
3266
|
+
{ code: "23", sv: "J\xE4mtlands l\xE4n", en: "J\xE4mtland County", lat: 63.183333, lon: 14.666667 },
|
|
3267
|
+
{ code: "24", sv: "V\xE4sterbottens l\xE4n", en: "V\xE4sterbotten County", lat: 63.833333, lon: 20.25 },
|
|
3268
|
+
{ code: "25", sv: "Norrbottens l\xE4n", en: "Norrbotten County", lat: 65.584444, lon: 22.153889 }
|
|
3269
|
+
];
|
|
3270
|
+
var ALL_COUNTIES = COUNTY_DEFS.map(
|
|
3271
|
+
(d) => SwedishCounty._new(d.code, d.sv, d.en, GeoCoordinate.create(d.lat, d.lon))
|
|
3272
|
+
);
|
|
3273
|
+
var BY_CODE2 = /* @__PURE__ */ new Map();
|
|
3274
|
+
var BY_NAME3 = /* @__PURE__ */ new Map();
|
|
3275
|
+
for (const c of ALL_COUNTIES) {
|
|
3276
|
+
BY_CODE2.set(c.code, c);
|
|
3277
|
+
BY_NAME3.set(c.localizedName.toLowerCase(), c);
|
|
3278
|
+
BY_NAME3.set(c.englishName.toLowerCase(), c);
|
|
3279
|
+
const sv = c.localizedName;
|
|
3280
|
+
if (sv.endsWith(" l\xE4n")) {
|
|
3281
|
+
const baseSv = sv.slice(0, -4);
|
|
3282
|
+
if (!BY_NAME3.has(baseSv.toLowerCase())) BY_NAME3.set(baseSv.toLowerCase(), c);
|
|
3283
|
+
addGenitive(baseSv, c);
|
|
3284
|
+
}
|
|
3285
|
+
const en = c.englishName;
|
|
3286
|
+
if (en.endsWith(" County")) {
|
|
3287
|
+
const baseEn = en.slice(0, -7);
|
|
3288
|
+
if (!BY_NAME3.has(baseEn.toLowerCase())) BY_NAME3.set(baseEn.toLowerCase(), c);
|
|
3289
|
+
addGenitive(baseEn, c);
|
|
3290
|
+
}
|
|
3291
|
+
}
|
|
3292
|
+
function addGenitive(name, county) {
|
|
3293
|
+
if (name.endsWith("s") || name.endsWith("S")) return;
|
|
3294
|
+
const key = (name + "s").toLowerCase();
|
|
3295
|
+
if (!BY_NAME3.has(key)) BY_NAME3.set(key, county);
|
|
3296
|
+
}
|
|
3297
|
+
var SCAN_PATTERN2 = (() => {
|
|
3298
|
+
const names = [...BY_NAME3.keys()].sort((a, b) => b.length - a.length).map((s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
3299
|
+
return new RegExp(`(?<![\\p{L}\\p{N}_])(?:${names.join("|")})(?![\\p{L}\\p{N}_])`, "giu");
|
|
3300
|
+
})();
|
|
3301
|
+
|
|
3302
|
+
// src/geography/swedish-municipality-data.ts
|
|
3303
|
+
var MUNICIPALITY_ROWS = [
|
|
3304
|
+
{ code: "0114", name: "Upplands V\xE4sby", lat: 59.516667, lon: 17.9 },
|
|
3305
|
+
{ code: "0115", name: "Vallentuna", lat: 59.583333, lon: 18.2 },
|
|
3306
|
+
{ code: "0117", name: "\xD6ster\xE5ker", lat: 59.5, lon: 18.45 },
|
|
3307
|
+
{ code: "0120", name: "V\xE4rmd\xF6", lat: 59.316667, lon: 18.566667 },
|
|
3308
|
+
{ code: "0123", name: "J\xE4rf\xE4lla", lat: 59.433333, lon: 17.833333 },
|
|
3309
|
+
{ code: "0125", name: "Eker\xF6", lat: 59.35, lon: 17.683333 },
|
|
3310
|
+
{ code: "0126", name: "Huddinge", lat: 59.233333, lon: 17.983333 },
|
|
3311
|
+
{ code: "0127", name: "Botkyrka", lat: 59.2, lon: 17.833333 },
|
|
3312
|
+
{ code: "0128", name: "Salem", lat: 59.233333, lon: 17.683333 },
|
|
3313
|
+
{ code: "0136", name: "Haninge", lat: 59.166667, lon: 18.133333 },
|
|
3314
|
+
{ code: "0138", name: "Tyres\xF6", lat: 59.233333, lon: 18.216667 },
|
|
3315
|
+
{ code: "0139", name: "Upplands-Bro", lat: 59.533333, lon: 17.666667 },
|
|
3316
|
+
{ code: "0140", name: "Nykvarn", lat: 59.183333, lon: 17.4 },
|
|
3317
|
+
{ code: "0160", name: "T\xE4by", lat: 59.4439, lon: 18.06872 },
|
|
3318
|
+
{ code: "0162", name: "Danderyd", lat: 59.4, lon: 18.083333 },
|
|
3319
|
+
{ code: "0163", name: "Sollentuna", lat: 59.45, lon: 17.916667 },
|
|
3320
|
+
{ code: "0180", name: "Stockholm", lat: 59.3275, lon: 18.054719 },
|
|
3321
|
+
{ code: "0181", name: "S\xF6dert\xE4lje", lat: 59.1, lon: 17.516667 },
|
|
3322
|
+
{ code: "0182", name: "Nacka", lat: 59.316667, lon: 18.166667 },
|
|
3323
|
+
{ code: "0183", name: "Sundbyberg", lat: 59.363333, lon: 17.965556 },
|
|
3324
|
+
{ code: "0184", name: "Solna", lat: 59.366667, lon: 18.016667 },
|
|
3325
|
+
{ code: "0186", name: "Liding\xF6", lat: 59.36303, lon: 18.15096 },
|
|
3326
|
+
{ code: "0187", name: "Vaxholm", lat: 59.4, lon: 18.283333 },
|
|
3327
|
+
{ code: "0188", name: "Norrt\xE4lje", lat: 59.766667, lon: 18.7 },
|
|
3328
|
+
{ code: "0191", name: "Sigtuna", lat: 59.633333, lon: 17.883333 },
|
|
3329
|
+
{ code: "0192", name: "Nyn\xE4shamn", lat: 58.933333, lon: 17.883333 },
|
|
3330
|
+
{ code: "0305", name: "H\xE5bo", lat: 59.567778, lon: 17.529722 },
|
|
3331
|
+
{ code: "0319", name: "\xC4lvkarleby", lat: 60.624444, lon: 17.416111 },
|
|
3332
|
+
{ code: "0330", name: "Knivsta", lat: 59.716667, lon: 17.8 },
|
|
3333
|
+
{ code: "0331", name: "Heby", lat: 59.933333, lon: 16.883333 },
|
|
3334
|
+
{ code: "0360", name: "Tierp", lat: 60.344444, lon: 17.513056 },
|
|
3335
|
+
{ code: "0380", name: "Uppsala", lat: 59.866667, lon: 17.633333 },
|
|
3336
|
+
{ code: "0381", name: "Enk\xF6ping", lat: 59.635556, lon: 17.076389 },
|
|
3337
|
+
{ code: "0382", name: "\xD6sthammar", lat: 60.258889, lon: 18.373611 },
|
|
3338
|
+
{ code: "0428", name: "Ving\xE5ker", lat: 59.033333, lon: 15.866667 },
|
|
3339
|
+
{ code: "0461", name: "Gnesta", lat: 59.0475, lon: 17.312222 },
|
|
3340
|
+
{ code: "0480", name: "Nyk\xF6ping", lat: 58.752778, lon: 17.008611 },
|
|
3341
|
+
{ code: "0481", name: "Oxel\xF6sund", lat: 58.666667, lon: 17.116667 },
|
|
3342
|
+
{ code: "0482", name: "Flen", lat: 59.058333, lon: 16.588889 },
|
|
3343
|
+
{ code: "0483", name: "Katrineholm", lat: 58.995556, lon: 16.206111 },
|
|
3344
|
+
{ code: "0484", name: "Eskilstuna", lat: 59.370556, lon: 16.512778 },
|
|
3345
|
+
{ code: "0486", name: "Str\xE4ngn\xE4s", lat: 59.376944, lon: 17.035278 },
|
|
3346
|
+
{ code: "0488", name: "Trosa", lat: 58.893889, lon: 17.552222 },
|
|
3347
|
+
{ code: "0509", name: "\xD6desh\xF6g", lat: 58.230833, lon: 14.652778 },
|
|
3348
|
+
{ code: "0512", name: "Ydre", lat: 57.827222, lon: 15.273889 },
|
|
3349
|
+
{ code: "0513", name: "Kinda", lat: 57.989167, lon: 15.627222 },
|
|
3350
|
+
{ code: "0560", name: "Boxholm", lat: 58.196389, lon: 15.051944 },
|
|
3351
|
+
{ code: "0561", name: "\xC5tvidaberg", lat: 58.201667, lon: 15.998056 },
|
|
3352
|
+
{ code: "0562", name: "Finsp\xE5ng", lat: 58.709167, lon: 15.786944 },
|
|
3353
|
+
{ code: "0563", name: "Valdemarsvik", lat: 58.205556, lon: 16.601944 },
|
|
3354
|
+
{ code: "0580", name: "Link\xF6ping", lat: 58.4, lon: 15.616667 },
|
|
3355
|
+
{ code: "0581", name: "Norrk\xF6ping", lat: 58.591944, lon: 16.185556 },
|
|
3356
|
+
{ code: "0582", name: "S\xF6derk\xF6ping", lat: 58.480278, lon: 16.3225 },
|
|
3357
|
+
{ code: "0583", name: "Motala", lat: 58.536389, lon: 15.0375 },
|
|
3358
|
+
{ code: "0584", name: "Vadstena", lat: 58.448333, lon: 14.889722 },
|
|
3359
|
+
{ code: "0586", name: "Mj\xF6lby", lat: 58.325, lon: 15.130556 },
|
|
3360
|
+
{ code: "0604", name: "Aneby", lat: 57.833333, lon: 14.8 },
|
|
3361
|
+
{ code: "0617", name: "Gnosj\xF6", lat: 57.366667, lon: 13.733333 },
|
|
3362
|
+
{ code: "0642", name: "Mullsj\xF6", lat: 57.916667, lon: 13.883333 },
|
|
3363
|
+
{ code: "0643", name: "Habo", lat: 57.916667, lon: 14.066667 },
|
|
3364
|
+
{ code: "0662", name: "Gislaved", lat: 57.3, lon: 13.533333 },
|
|
3365
|
+
{ code: "0665", name: "Vaggeryd", lat: 57.5, lon: 14.116667 },
|
|
3366
|
+
{ code: "0680", name: "J\xF6nk\xF6ping", lat: 57.783333, lon: 14.2 },
|
|
3367
|
+
{ code: "0682", name: "N\xE4ssj\xF6", lat: 57.65, lon: 14.683333 },
|
|
3368
|
+
{ code: "0683", name: "V\xE4rnamo", lat: 57.183333, lon: 14.033333 },
|
|
3369
|
+
{ code: "0684", name: "S\xE4vsj\xF6", lat: 57.4, lon: 14.666667 },
|
|
3370
|
+
{ code: "0685", name: "Vetlanda", lat: 57.433333, lon: 15.066667 },
|
|
3371
|
+
{ code: "0686", name: "Eksj\xF6", lat: 57.666667, lon: 14.966667 },
|
|
3372
|
+
{ code: "0687", name: "Tran\xE5s", lat: 58.033333, lon: 14.966667 },
|
|
3373
|
+
{ code: "0760", name: "Uppvidinge", lat: 57.166667, lon: 15.333333 },
|
|
3374
|
+
{ code: "0761", name: "Lessebo", lat: 56.75, lon: 15.266667 },
|
|
3375
|
+
{ code: "0763", name: "Tingsryd", lat: 56.533333, lon: 14.983333 },
|
|
3376
|
+
{ code: "0764", name: "Alvesta", lat: 56.9, lon: 14.55 },
|
|
3377
|
+
{ code: "0765", name: "\xC4lmhult", lat: 56.55, lon: 14.133333 },
|
|
3378
|
+
{ code: "0767", name: "Markaryd", lat: 56.466667, lon: 13.6 },
|
|
3379
|
+
{ code: "0780", name: "V\xE4xj\xF6", lat: 56.883333, lon: 14.8 },
|
|
3380
|
+
{ code: "0781", name: "Ljungby", lat: 56.833333, lon: 13.933333 },
|
|
3381
|
+
{ code: "0821", name: "H\xF6gsby", lat: 57.166667, lon: 16.033333 },
|
|
3382
|
+
{ code: "0834", name: "Tors\xE5s", lat: 56.4, lon: 16 },
|
|
3383
|
+
{ code: "0840", name: "M\xF6rbyl\xE5nga", lat: 56.516667, lon: 16.383333 },
|
|
3384
|
+
{ code: "0860", name: "Hultsfred", lat: 57.483333, lon: 15.833333 },
|
|
3385
|
+
{ code: "0861", name: "M\xF6nster\xE5s", lat: 57.033333, lon: 16.45 },
|
|
3386
|
+
{ code: "0862", name: "Emmaboda", lat: 56.616667, lon: 15.55 },
|
|
3387
|
+
{ code: "0880", name: "Kalmar", lat: 56.666667, lon: 16.366667 },
|
|
3388
|
+
{ code: "0881", name: "Nybro", lat: 56.733333, lon: 15.9 },
|
|
3389
|
+
{ code: "0882", name: "Oskarshamn", lat: 57.266667, lon: 16.45 },
|
|
3390
|
+
{ code: "0883", name: "V\xE4stervik", lat: 57.75, lon: 16.633333 },
|
|
3391
|
+
{ code: "0884", name: "Vimmerby", lat: 57.666667, lon: 15.85 },
|
|
3392
|
+
{ code: "0885", name: "Borgholm", lat: 56.878056, lon: 16.661667 },
|
|
3393
|
+
{ code: "0980", name: "Gotland", lat: 57.615278, lon: 18.280556 },
|
|
3394
|
+
{ code: "1060", name: "Olofstr\xF6m", lat: 56.266667, lon: 14.533333 },
|
|
3395
|
+
{ code: "1080", name: "Karlskrona", lat: 56.183333, lon: 15.65 },
|
|
3396
|
+
{ code: "1081", name: "Ronneby", lat: 56.2, lon: 15.283333 },
|
|
3397
|
+
{ code: "1082", name: "Karlshamn", lat: 56.166667, lon: 14.85 },
|
|
3398
|
+
{ code: "1083", name: "S\xF6lvesborg", lat: 56.05, lon: 14.583333 },
|
|
3399
|
+
{ code: "1214", name: "Sval\xF6v", lat: 55.916667, lon: 13.116667 },
|
|
3400
|
+
{ code: "1230", name: "Staffanstorp", lat: 55.633333, lon: 13.2 },
|
|
3401
|
+
{ code: "1231", name: "Burl\xF6v", lat: 55.633333, lon: 13.066667 },
|
|
3402
|
+
{ code: "1233", name: "Vellinge", lat: 55.466667, lon: 13.016667 },
|
|
3403
|
+
{ code: "1256", name: "\xD6stra G\xF6inge", lat: 56.25, lon: 14.066667 },
|
|
3404
|
+
{ code: "1257", name: "\xD6rkelljunga", lat: 56.283333, lon: 13.283333 },
|
|
3405
|
+
{ code: "1260", name: "Bjuv", lat: 56.083333, lon: 12.916667 },
|
|
3406
|
+
{ code: "1261", name: "K\xE4vlinge", lat: 55.8, lon: 13.116667 },
|
|
3407
|
+
{ code: "1262", name: "Lomma", lat: 55.666667, lon: 13.083333 },
|
|
3408
|
+
{ code: "1263", name: "Svedala", lat: 55.5, lon: 13.233333 },
|
|
3409
|
+
{ code: "1264", name: "Skurup", lat: 55.483333, lon: 13.5 },
|
|
3410
|
+
{ code: "1265", name: "Sj\xF6bo", lat: 55.633333, lon: 13.7 },
|
|
3411
|
+
{ code: "1266", name: "H\xF6rby", lat: 55.85, lon: 13.65 },
|
|
3412
|
+
{ code: "1267", name: "H\xF6\xF6r", lat: 55.933333, lon: 13.55 },
|
|
3413
|
+
{ code: "1270", name: "Tomelilla", lat: 55.55, lon: 13.95 },
|
|
3414
|
+
{ code: "1272", name: "Brom\xF6lla", lat: 56.05, lon: 14.466667 },
|
|
3415
|
+
{ code: "1273", name: "Osby", lat: 56.366667, lon: 13.983333 },
|
|
3416
|
+
{ code: "1275", name: "Perstorp", lat: 56.133333, lon: 13.383333 },
|
|
3417
|
+
{ code: "1276", name: "Klippan", lat: 56.133333, lon: 13.133333 },
|
|
3418
|
+
{ code: "1277", name: "\xC5storp", lat: 56.133333, lon: 12.95 },
|
|
3419
|
+
{ code: "1278", name: "B\xE5stad", lat: 56.416667, lon: 12.866667 },
|
|
3420
|
+
{ code: "1280", name: "Malm\xF6", lat: 55.565, lon: 13.018611 },
|
|
3421
|
+
{ code: "1281", name: "Lund", lat: 55.7, lon: 13.2 },
|
|
3422
|
+
{ code: "1282", name: "Landskrona", lat: 55.866667, lon: 12.85 },
|
|
3423
|
+
{ code: "1283", name: "Helsingborg", lat: 56.05, lon: 12.716667 },
|
|
3424
|
+
{ code: "1284", name: "H\xF6gan\xE4s", lat: 56.2, lon: 12.566667 },
|
|
3425
|
+
{ code: "1285", name: "Esl\xF6v", lat: 55.833333, lon: 13.3 },
|
|
3426
|
+
{ code: "1286", name: "Ystad", lat: 55.416667, lon: 13.833333 },
|
|
3427
|
+
{ code: "1287", name: "Trelleborg", lat: 55.366667, lon: 13.166667 },
|
|
3428
|
+
{ code: "1290", name: "Kristianstad", lat: 56.033333, lon: 14.15 },
|
|
3429
|
+
{ code: "1291", name: "Simrishamn", lat: 55.55, lon: 14.35 },
|
|
3430
|
+
{ code: "1292", name: "\xC4ngelholm", lat: 56.25, lon: 12.85 },
|
|
3431
|
+
{ code: "1293", name: "H\xE4ssleholm", lat: 56.166667, lon: 13.766667 },
|
|
3432
|
+
{ code: "1315", name: "Hylte", lat: 57, lon: 13.25 },
|
|
3433
|
+
{ code: "1380", name: "Halmstad", lat: 56.666667, lon: 12.85 },
|
|
3434
|
+
{ code: "1381", name: "Laholm", lat: 56.516667, lon: 13.033333 },
|
|
3435
|
+
{ code: "1382", name: "Falkenberg", lat: 56.916667, lon: 12.5 },
|
|
3436
|
+
{ code: "1383", name: "Varberg", lat: 57.1, lon: 12.25 },
|
|
3437
|
+
{ code: "1384", name: "Kungsbacka", lat: 57.483333, lon: 12.066667 },
|
|
3438
|
+
{ code: "1401", name: "H\xE4rryda", lat: 57.666667, lon: 12.116667 },
|
|
3439
|
+
{ code: "1402", name: "Partille", lat: 57.733333, lon: 12.1 },
|
|
3440
|
+
{ code: "1407", name: "\xD6cker\xF6", lat: 57.711111, lon: 11.647222 },
|
|
3441
|
+
{ code: "1415", name: "Stenungsund", lat: 58.083333, lon: 11.816667 },
|
|
3442
|
+
{ code: "1419", name: "Tj\xF6rn", lat: 58, lon: 11.55 },
|
|
3443
|
+
{ code: "1421", name: "Orust", lat: 58.233333, lon: 11.683333 },
|
|
3444
|
+
{ code: "1427", name: "Soten\xE4s", lat: 58.366667, lon: 11.25 },
|
|
3445
|
+
{ code: "1430", name: "Munkedal", lat: 58.483333, lon: 11.683333 },
|
|
3446
|
+
{ code: "1435", name: "Tanum", lat: 58.716667, lon: 11.316667 },
|
|
3447
|
+
{ code: "1438", name: "Dals-Ed", lat: 58.916667, lon: 11.916667 },
|
|
3448
|
+
{ code: "1439", name: "F\xE4rgelanda", lat: 58.566667, lon: 11.983333 },
|
|
3449
|
+
{ code: "1440", name: "Ale", lat: 57.925, lon: 12.086944 },
|
|
3450
|
+
{ code: "1441", name: "Lerum", lat: 57.766667, lon: 12.3 },
|
|
3451
|
+
{ code: "1442", name: "V\xE5rg\xE5rda", lat: 58.033333, lon: 12.8 },
|
|
3452
|
+
{ code: "1443", name: "Bollebygd", lat: 57.666667, lon: 12.566667 },
|
|
3453
|
+
{ code: "1444", name: "Gr\xE4storp", lat: 58.333333, lon: 12.666667 },
|
|
3454
|
+
{ code: "1445", name: "Essunga", lat: 58.183333, lon: 12.716667 },
|
|
3455
|
+
{ code: "1446", name: "Karlsborg", lat: 58.533333, lon: 14.516667 },
|
|
3456
|
+
{ code: "1447", name: "Gullsp\xE5ng", lat: 58.983333, lon: 14.116667 },
|
|
3457
|
+
{ code: "1452", name: "Tranemo", lat: 57.483333, lon: 13.35 },
|
|
3458
|
+
{ code: "1460", name: "Bengtsfors", lat: 59.033333, lon: 12.216667 },
|
|
3459
|
+
{ code: "1461", name: "Mellerud", lat: 58.7, lon: 12.466667 },
|
|
3460
|
+
{ code: "1462", name: "Lilla Edet", lat: 58.133333, lon: 12.133333 },
|
|
3461
|
+
{ code: "1463", name: "Mark", lat: 57.516667, lon: 12.683333 },
|
|
3462
|
+
{ code: "1465", name: "Svenljunga", lat: 57.5, lon: 13.116667 },
|
|
3463
|
+
{ code: "1466", name: "Herrljunga", lat: 58.083333, lon: 13.033333 },
|
|
3464
|
+
{ code: "1470", name: "Vara", lat: 58.266667, lon: 12.95 },
|
|
3465
|
+
{ code: "1471", name: "G\xF6tene", lat: 58.533333, lon: 13.483333 },
|
|
3466
|
+
{ code: "1472", name: "Tibro", lat: 58.416667, lon: 14.166667 },
|
|
3467
|
+
{ code: "1473", name: "T\xF6reboda", lat: 58.716667, lon: 14.133333 },
|
|
3468
|
+
{ code: "1480", name: "G\xF6teborg", englishName: "Gothenburg", lat: 57.7, lon: 11.933333 },
|
|
3469
|
+
{ code: "1481", name: "M\xF6lndal", lat: 57.654167, lon: 12.019167 },
|
|
3470
|
+
{ code: "1482", name: "Kung\xE4lv", lat: 57.866667, lon: 11.966667 },
|
|
3471
|
+
{ code: "1484", name: "Lysekil", lat: 58.283333, lon: 11.433333 },
|
|
3472
|
+
{ code: "1485", name: "Uddevalla", lat: 58.35, lon: 11.916667 },
|
|
3473
|
+
{ code: "1486", name: "Str\xF6mstad", lat: 58.933333, lon: 11.166667 },
|
|
3474
|
+
{ code: "1487", name: "V\xE4nersborg", lat: 58.383333, lon: 12.316667 },
|
|
3475
|
+
{ code: "1488", name: "Trollh\xE4ttan", lat: 58.283333, lon: 12.283333 },
|
|
3476
|
+
{ code: "1489", name: "Alings\xE5s", lat: 57.933333, lon: 12.533333 },
|
|
3477
|
+
{ code: "1490", name: "Bor\xE5s", lat: 57.716667, lon: 12.933333 },
|
|
3478
|
+
{ code: "1491", name: "Ulricehamn", lat: 57.791667, lon: 13.412778 },
|
|
3479
|
+
{ code: "1492", name: "\xC5m\xE5l", lat: 59.05, lon: 12.7 },
|
|
3480
|
+
{ code: "1493", name: "Mariestad", lat: 58.7, lon: 13.816667 },
|
|
3481
|
+
{ code: "1494", name: "Lidk\xF6ping", lat: 58.5, lon: 13.183333 },
|
|
3482
|
+
{ code: "1495", name: "Skara", lat: 58.383333, lon: 13.433333 },
|
|
3483
|
+
{ code: "1496", name: "Sk\xF6vde", lat: 58.383333, lon: 13.85 },
|
|
3484
|
+
{ code: "1497", name: "Hjo", lat: 58.3, lon: 14.283333 },
|
|
3485
|
+
{ code: "1498", name: "Tidaholm", lat: 58.183333, lon: 13.95 },
|
|
3486
|
+
{ code: "1499", name: "Falk\xF6ping", lat: 58.166667, lon: 13.55 },
|
|
3487
|
+
{ code: "1715", name: "Kil", lat: 59.5, lon: 13.316389 },
|
|
3488
|
+
{ code: "1730", name: "Eda", lat: 59.883333, lon: 12.283333 },
|
|
3489
|
+
{ code: "1737", name: "Torsby", lat: 60.133333, lon: 13 },
|
|
3490
|
+
{ code: "1760", name: "Storfors", lat: 59.533333, lon: 14.266667 },
|
|
3491
|
+
{ code: "1761", name: "Hammar\xF6", lat: 59.333333, lon: 13.433333 },
|
|
3492
|
+
{ code: "1762", name: "Munkfors", lat: 59.833333, lon: 13.533333 },
|
|
3493
|
+
{ code: "1763", name: "Forshaga", lat: 59.533333, lon: 13.466667 },
|
|
3494
|
+
{ code: "1764", name: "Grums", lat: 59.351667, lon: 13.111389 },
|
|
3495
|
+
{ code: "1765", name: "\xC5rj\xE4ng", lat: 59.383333, lon: 12.133333 },
|
|
3496
|
+
{ code: "1766", name: "Sunne", lat: 59.833333, lon: 13.133333 },
|
|
3497
|
+
{ code: "1780", name: "Karlstad", lat: 59.383333, lon: 13.533333 },
|
|
3498
|
+
{ code: "1781", name: "Kristinehamn", lat: 59.3, lon: 14.116667 },
|
|
3499
|
+
{ code: "1782", name: "Filipstad", lat: 59.716667, lon: 14.166667 },
|
|
3500
|
+
{ code: "1783", name: "Hagfors", lat: 60.033333, lon: 13.65 },
|
|
3501
|
+
{ code: "1784", name: "Arvika", lat: 59.65, lon: 12.583333 },
|
|
3502
|
+
{ code: "1785", name: "S\xE4ffle", lat: 59.133333, lon: 12.933333 },
|
|
3503
|
+
{ code: "1814", name: "Lekeberg", lat: 59.166667, lon: 14.866667 },
|
|
3504
|
+
{ code: "1860", name: "Lax\xE5", lat: 58.988611, lon: 14.6175 },
|
|
3505
|
+
{ code: "1861", name: "Hallsberg", lat: 59.066667, lon: 15.116667 },
|
|
3506
|
+
{ code: "1862", name: "Degerfors", lat: 59.233333, lon: 14.433333 },
|
|
3507
|
+
{ code: "1863", name: "H\xE4llefors", lat: 59.766667, lon: 14.516667 },
|
|
3508
|
+
{ code: "1864", name: "Ljusnarsberg", lat: 59.866667, lon: 14.983333 },
|
|
3509
|
+
{ code: "1880", name: "\xD6rebro", lat: 59.273889, lon: 15.213333 },
|
|
3510
|
+
{ code: "1881", name: "Kumla", lat: 59.116667, lon: 15.133333 },
|
|
3511
|
+
{ code: "1882", name: "Askersund", lat: 58.883333, lon: 14.9 },
|
|
3512
|
+
{ code: "1883", name: "Karlskoga", lat: 59.325, lon: 14.525 },
|
|
3513
|
+
{ code: "1884", name: "Nora", lat: 59.516667, lon: 15.033333 },
|
|
3514
|
+
{ code: "1885", name: "Lindesberg", lat: 59.583333, lon: 15.25 },
|
|
3515
|
+
{ code: "1904", name: "Skinnskatteberg", lat: 59.833333, lon: 15.683333 },
|
|
3516
|
+
{ code: "1907", name: "Surahammar", lat: 59.716667, lon: 16.216667 },
|
|
3517
|
+
{ code: "1960", name: "Kungs\xF6r", lat: 59.416667, lon: 16.083333 },
|
|
3518
|
+
{ code: "1961", name: "Hallstahammar", lat: 59.616667, lon: 16.25 },
|
|
3519
|
+
{ code: "1962", name: "Norberg", lat: 60.083333, lon: 15.95 },
|
|
3520
|
+
{ code: "1980", name: "V\xE4ster\xE5s", lat: 59.616667, lon: 16.533333 },
|
|
3521
|
+
{ code: "1981", name: "Sala", lat: 59.920417, lon: 16.606111 },
|
|
3522
|
+
{ code: "1982", name: "Fagersta", lat: 60, lon: 15.816667 },
|
|
3523
|
+
{ code: "1983", name: "K\xF6ping", lat: 59.513056, lon: 15.998611 },
|
|
3524
|
+
{ code: "1984", name: "Arboga", lat: 59.4, lon: 15.833333 },
|
|
3525
|
+
{ code: "2021", name: "Vansbro", lat: 60.516667, lon: 14.216667 },
|
|
3526
|
+
{ code: "2023", name: "Malung-S\xE4len", lat: 60.683333, lon: 13.733333 },
|
|
3527
|
+
{ code: "2026", name: "Gagnef", lat: 60.55, lon: 15.133333 },
|
|
3528
|
+
{ code: "2029", name: "Leksand", lat: 60.733333, lon: 15 },
|
|
3529
|
+
{ code: "2031", name: "R\xE4ttvik", lat: 60.883333, lon: 15.133333 },
|
|
3530
|
+
{ code: "2034", name: "Orsa", lat: 61.116667, lon: 14.616667 },
|
|
3531
|
+
{ code: "2039", name: "\xC4lvdalen", lat: 61.233333, lon: 14.033333 },
|
|
3532
|
+
{ code: "2061", name: "Smedjebacken", lat: 60.133333, lon: 15.416667 },
|
|
3533
|
+
{ code: "2062", name: "Mora", lat: 61.016667, lon: 14.533333 },
|
|
3534
|
+
{ code: "2080", name: "Falun", lat: 60.6, lon: 15.633333 },
|
|
3535
|
+
{ code: "2081", name: "Borl\xE4nge", lat: 60.482778, lon: 15.436389 },
|
|
3536
|
+
{ code: "2082", name: "S\xE4ter", lat: 60.35, lon: 15.75 },
|
|
3537
|
+
{ code: "2083", name: "Hedemora", lat: 60.283333, lon: 15.983333 },
|
|
3538
|
+
{ code: "2084", name: "Avesta", lat: 60.145556, lon: 16.168333 },
|
|
3539
|
+
{ code: "2085", name: "Ludvika", lat: 60.133333, lon: 15.183333 },
|
|
3540
|
+
{ code: "2101", name: "Ockelbo", lat: 60.883333, lon: 16.716667 },
|
|
3541
|
+
{ code: "2104", name: "Hofors", lat: 60.55, lon: 16.283333 },
|
|
3542
|
+
{ code: "2121", name: "Ovan\xE5ker", lat: 61.383333, lon: 15.816667 },
|
|
3543
|
+
{ code: "2132", name: "Nordanstig", lat: 61.983333, lon: 17.066667 },
|
|
3544
|
+
{ code: "2161", name: "Ljusdal", lat: 61.833333, lon: 16.083333 },
|
|
3545
|
+
{ code: "2180", name: "G\xE4vle", lat: 60.666667, lon: 17.166667 },
|
|
3546
|
+
{ code: "2181", name: "Sandviken", lat: 60.616667, lon: 16.783333 },
|
|
3547
|
+
{ code: "2182", name: "S\xF6derhamn", lat: 61.3, lon: 17.083333 },
|
|
3548
|
+
{ code: "2183", name: "Bolln\xE4s", lat: 61.35, lon: 16.4 },
|
|
3549
|
+
{ code: "2184", name: "Hudiksvall", lat: 61.733333, lon: 17.116667 },
|
|
3550
|
+
{ code: "2260", name: "\xC5nge", lat: 62.516667, lon: 15.616667 },
|
|
3551
|
+
{ code: "2262", name: "Timr\xE5", lat: 62.5, lon: 17.333333 },
|
|
3552
|
+
{ code: "2280", name: "H\xE4rn\xF6sand", lat: 62.633333, lon: 17.933333 },
|
|
3553
|
+
{ code: "2281", name: "Sundsvall", lat: 62.4, lon: 17.316667 },
|
|
3554
|
+
{ code: "2282", name: "Kramfors", lat: 62.932167, lon: 17.777167 },
|
|
3555
|
+
{ code: "2283", name: "Sollefte\xE5", lat: 63.166667, lon: 17.266667 },
|
|
3556
|
+
{ code: "2284", name: "\xD6rnsk\xF6ldsvik", lat: 63.283333, lon: 18.733333 },
|
|
3557
|
+
{ code: "2303", name: "Ragunda", lat: 63.1, lon: 16.35 },
|
|
3558
|
+
{ code: "2305", name: "Br\xE4cke", lat: 62.75, lon: 15.416667 },
|
|
3559
|
+
{ code: "2309", name: "Krokom", lat: 63.316667, lon: 14.5 },
|
|
3560
|
+
{ code: "2313", name: "Str\xF6msund", lat: 63.85, lon: 15.583333 },
|
|
3561
|
+
{ code: "2321", name: "\xC5re", lat: 63.35, lon: 13.466667 },
|
|
3562
|
+
{ code: "2326", name: "Berg", lat: 62.766667, lon: 14.45 },
|
|
3563
|
+
{ code: "2361", name: "H\xE4rjedalen", lat: 62.033333, lon: 14.35 },
|
|
3564
|
+
{ code: "2380", name: "\xD6stersund", lat: 63.183333, lon: 14.666667 },
|
|
3565
|
+
{ code: "2401", name: "Nordmaling", lat: 63.566667, lon: 19.5 },
|
|
3566
|
+
{ code: "2403", name: "Bjurholm", lat: 63.916667, lon: 19.216667 },
|
|
3567
|
+
{ code: "2404", name: "Vindeln", lat: 64.2, lon: 19.716667 },
|
|
3568
|
+
{ code: "2409", name: "Robertsfors", lat: 64.192014, lon: 20.849513 },
|
|
3569
|
+
{ code: "2417", name: "Norsj\xF6", lat: 64.916667, lon: 19.483333 },
|
|
3570
|
+
{ code: "2418", name: "Mal\xE5", lat: 65.183333, lon: 18.75 },
|
|
3571
|
+
{ code: "2421", name: "Storuman", lat: 65.1, lon: 17.1 },
|
|
3572
|
+
{ code: "2422", name: "Sorsele", lat: 65.533333, lon: 17.533333 },
|
|
3573
|
+
{ code: "2425", name: "Dorotea", lat: 64.266667, lon: 16.416667 },
|
|
3574
|
+
{ code: "2460", name: "V\xE4nn\xE4s", lat: 63.916667, lon: 19.75 },
|
|
3575
|
+
{ code: "2462", name: "Vilhelmina", lat: 64.616667, lon: 16.65 },
|
|
3576
|
+
{ code: "2463", name: "\xC5sele", lat: 64.15, lon: 17.35 },
|
|
3577
|
+
{ code: "2480", name: "Ume\xE5", lat: 63.833333, lon: 20.25 },
|
|
3578
|
+
{ code: "2481", name: "Lycksele", lat: 64.6, lon: 18.666667 },
|
|
3579
|
+
{ code: "2482", name: "Skellefte\xE5", lat: 64.75, lon: 20.95 },
|
|
3580
|
+
{ code: "2505", name: "Arvidsjaur", lat: 65.583333, lon: 19.116667 },
|
|
3581
|
+
{ code: "2506", name: "Arjeplog", lat: 66.033333, lon: 17.95 },
|
|
3582
|
+
{ code: "2510", name: "Jokkmokk", lat: 66.616667, lon: 19.833333 },
|
|
3583
|
+
{ code: "2513", name: "\xD6verkalix", lat: 66.35, lon: 22.883333 },
|
|
3584
|
+
{ code: "2514", name: "Kalix", lat: 65.85, lon: 23.166667 },
|
|
3585
|
+
{ code: "2518", name: "\xD6vertorne\xE5", lat: 66.383333, lon: 23.666667 },
|
|
3586
|
+
{ code: "2521", name: "Pajala", lat: 67.183333, lon: 23.366667 },
|
|
3587
|
+
{ code: "2523", name: "G\xE4llivare", lat: 67.133333, lon: 20.65 },
|
|
3588
|
+
{ code: "2560", name: "\xC4lvsbyn", lat: 65.683333, lon: 21.016667 },
|
|
3589
|
+
{ code: "2580", name: "Lule\xE5", lat: 65.584444, lon: 22.153889 },
|
|
3590
|
+
{ code: "2581", name: "Pite\xE5", lat: 65.333333, lon: 21.5 },
|
|
3591
|
+
{ code: "2582", name: "Boden", lat: 65.833333, lon: 21.716667 },
|
|
3592
|
+
{ code: "2583", name: "Haparanda", lat: 65.833333, lon: 24.133333 },
|
|
3593
|
+
{ code: "2584", name: "Kiruna", lat: 67.854722, lon: 20.222778 }
|
|
3594
|
+
];
|
|
3595
|
+
|
|
3596
|
+
// src/geography/swedish-municipality.ts
|
|
3597
|
+
var MAX_INPUT_LENGTH5 = 100;
|
|
3598
|
+
var MIN_SCAN_NAME_LENGTH = 4;
|
|
3599
|
+
var SwedishMunicipality = class _SwedishMunicipality {
|
|
3600
|
+
static typeInfo = Object.freeze({
|
|
3601
|
+
englishName: "Municipality",
|
|
3602
|
+
localizedName: "Kommun",
|
|
3603
|
+
emoji: "\u{1F3D8}\uFE0F",
|
|
3604
|
+
sources: Object.freeze([
|
|
3605
|
+
"https://www.scb.se/en/finding-statistics/regional-statistics/regional-divisions/counties-and-municipalities/counties-and-municipalities-in-numerical-order/"
|
|
3606
|
+
])
|
|
3607
|
+
});
|
|
3608
|
+
code;
|
|
3609
|
+
localizedName;
|
|
3610
|
+
englishName;
|
|
3611
|
+
county;
|
|
3612
|
+
coordinate;
|
|
3613
|
+
constructor(code, localized, english, county, coord) {
|
|
3614
|
+
this.code = code;
|
|
3615
|
+
this.localizedName = localized;
|
|
3616
|
+
this.englishName = english;
|
|
3617
|
+
this.county = county;
|
|
3618
|
+
this.coordinate = coord;
|
|
3619
|
+
}
|
|
3620
|
+
get countyCode() {
|
|
3621
|
+
return this.county.code;
|
|
3622
|
+
}
|
|
3623
|
+
get latitude() {
|
|
3624
|
+
return this.coordinate.latitude;
|
|
3625
|
+
}
|
|
3626
|
+
get longitude() {
|
|
3627
|
+
return this.coordinate.longitude;
|
|
3628
|
+
}
|
|
3629
|
+
get displayName() {
|
|
3630
|
+
return PrimitivesDefaults.useLocalizedDisplayNames ? this.localizedName : this.englishName;
|
|
3631
|
+
}
|
|
3632
|
+
static tryParse(input) {
|
|
3633
|
+
if (input == null) return null;
|
|
3634
|
+
const trimmed = sanitizeInput(input).trim();
|
|
3635
|
+
if (trimmed.length === 0 || trimmed.length > MAX_INPUT_LENGTH5) return null;
|
|
3636
|
+
const digits = keepDigits(trimmed);
|
|
3637
|
+
if (digits.length === 4 && BY_CODE3.has(digits)) return BY_CODE3.get(digits);
|
|
3638
|
+
return BY_NAME4.get(trimmed.toLowerCase()) ?? null;
|
|
3639
|
+
}
|
|
3640
|
+
static parse(input) {
|
|
3641
|
+
const r = _SwedishMunicipality.tryParse(input);
|
|
3642
|
+
if (r === null) throw new Error("Invalid Swedish municipality.");
|
|
3643
|
+
return r;
|
|
3644
|
+
}
|
|
3645
|
+
static isValid(input) {
|
|
3646
|
+
return _SwedishMunicipality.tryParse(input) !== null;
|
|
3647
|
+
}
|
|
3648
|
+
static format(input, options) {
|
|
3649
|
+
const r = _SwedishMunicipality.tryParse(input);
|
|
3650
|
+
if (r) return r.localizedName;
|
|
3651
|
+
if (options?.fallbackToTrimmedInputWhenInvalid && input != null && input.trim() !== "") {
|
|
3652
|
+
return input.trim();
|
|
3653
|
+
}
|
|
3654
|
+
return null;
|
|
3655
|
+
}
|
|
3656
|
+
static normalize(input, options) {
|
|
3657
|
+
const r = _SwedishMunicipality.tryParse(input);
|
|
3658
|
+
if (r) return r.code;
|
|
3659
|
+
if (options?.fallbackToTrimmedInputWhenInvalid && input != null) {
|
|
3660
|
+
const trimmed = input.trim();
|
|
3661
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
3662
|
+
}
|
|
3663
|
+
return null;
|
|
3664
|
+
}
|
|
3665
|
+
static isNormalized(input) {
|
|
3666
|
+
return input != null && _SwedishMunicipality.normalize(input) === input;
|
|
3667
|
+
}
|
|
3668
|
+
/** All 290 Swedish municipalities, ordered by code. */
|
|
3669
|
+
static get all() {
|
|
3670
|
+
return ALL_MUNICIPALITIES;
|
|
3671
|
+
}
|
|
3672
|
+
static findCandidatesInText(text) {
|
|
3673
|
+
if (!text) return [];
|
|
3674
|
+
const out = [];
|
|
3675
|
+
SCAN_PATTERN3.lastIndex = 0;
|
|
3676
|
+
let m;
|
|
3677
|
+
while ((m = SCAN_PATTERN3.exec(text)) !== null) {
|
|
3678
|
+
const municipality = _SwedishMunicipality.tryParse(m[0]);
|
|
3679
|
+
if (!municipality) continue;
|
|
3680
|
+
out.push(
|
|
3681
|
+
new TextCandidate({
|
|
3682
|
+
startIndex: m.index,
|
|
3683
|
+
length: m[0].length,
|
|
3684
|
+
originalText: m[0],
|
|
3685
|
+
typeName: "SwedishMunicipality",
|
|
3686
|
+
category: TextCandidateCategory.Geography,
|
|
3687
|
+
normalizedForm: municipality.toNormalizedString(),
|
|
3688
|
+
formattedForm: municipality.toString(),
|
|
3689
|
+
maskedForm: municipality.localizedName,
|
|
3690
|
+
confidence: TextMatchConfidence.Low,
|
|
3691
|
+
value: municipality
|
|
3692
|
+
})
|
|
3693
|
+
);
|
|
3694
|
+
}
|
|
3695
|
+
return out;
|
|
3696
|
+
}
|
|
3697
|
+
static distanceKilometers(a, b) {
|
|
3698
|
+
return GeoCoordinate.distanceKilometers(a.coordinate, b.coordinate);
|
|
3699
|
+
}
|
|
3700
|
+
distanceKilometersTo(other) {
|
|
3701
|
+
const target = other instanceof _SwedishMunicipality ? other.coordinate : other;
|
|
3702
|
+
return GeoCoordinate.distanceKilometers(this.coordinate, target);
|
|
3703
|
+
}
|
|
3704
|
+
findNeighbors(radiusKm) {
|
|
3705
|
+
if (!Number.isFinite(radiusKm) || radiusKm <= 0) {
|
|
3706
|
+
throw new RangeError("radiusKm must be a positive finite number.");
|
|
3707
|
+
}
|
|
3708
|
+
const out = [];
|
|
3709
|
+
for (const m of ALL_MUNICIPALITIES) {
|
|
3710
|
+
if (m === this) continue;
|
|
3711
|
+
const dist = GeoCoordinate.distanceKilometers(this.coordinate, m.coordinate);
|
|
3712
|
+
if (dist <= radiusKm) out.push({ municipality: m, distanceKilometers: dist });
|
|
3713
|
+
}
|
|
3714
|
+
out.sort((a, b) => a.distanceKilometers - b.distanceKilometers);
|
|
3715
|
+
return out;
|
|
3716
|
+
}
|
|
3717
|
+
static findNeighbors(coordinate, radiusKm) {
|
|
3718
|
+
if (!Number.isFinite(radiusKm) || radiusKm <= 0) {
|
|
3719
|
+
throw new RangeError("radiusKm must be a positive finite number.");
|
|
3720
|
+
}
|
|
3721
|
+
const out = [];
|
|
3722
|
+
for (const m of ALL_MUNICIPALITIES) {
|
|
3723
|
+
const dist = GeoCoordinate.distanceKilometers(coordinate, m.coordinate);
|
|
3724
|
+
if (dist <= radiusKm) out.push({ municipality: m, distanceKilometers: dist });
|
|
3725
|
+
}
|
|
3726
|
+
out.sort((a, b) => a.distanceKilometers - b.distanceKilometers);
|
|
3727
|
+
return out;
|
|
3728
|
+
}
|
|
3729
|
+
toNormalizedString() {
|
|
3730
|
+
return this.code;
|
|
3731
|
+
}
|
|
3732
|
+
toString() {
|
|
3733
|
+
return this.displayName;
|
|
3734
|
+
}
|
|
3735
|
+
toDisplayString() {
|
|
3736
|
+
return this.displayName;
|
|
3737
|
+
}
|
|
3738
|
+
toEnglishString() {
|
|
3739
|
+
return this.englishName;
|
|
3740
|
+
}
|
|
3741
|
+
toLocalString() {
|
|
3742
|
+
return this.localizedName;
|
|
3743
|
+
}
|
|
3744
|
+
equals(other) {
|
|
3745
|
+
return other != null && this.code === other.code;
|
|
3746
|
+
}
|
|
3747
|
+
compareTo(other) {
|
|
3748
|
+
if (other == null) return 1;
|
|
3749
|
+
return this.code < other.code ? -1 : this.code > other.code ? 1 : 0;
|
|
3750
|
+
}
|
|
3751
|
+
/** @internal */
|
|
3752
|
+
static _new(code, sv, en, county, coord) {
|
|
3753
|
+
return new _SwedishMunicipality(code, sv, en, county, coord);
|
|
3754
|
+
}
|
|
3755
|
+
};
|
|
3756
|
+
var ALL_MUNICIPALITIES = MUNICIPALITY_ROWS.map((r) => {
|
|
3757
|
+
const county = SwedishCounty.parse(r.code.slice(0, 2));
|
|
3758
|
+
const coord = GeoCoordinate.create(r.lat, r.lon);
|
|
3759
|
+
return SwedishMunicipality._new(r.code, r.name, r.englishName ?? r.name, county, coord);
|
|
3760
|
+
}).slice().sort((a, b) => a.code.localeCompare(b.code));
|
|
3761
|
+
var BY_CODE3 = /* @__PURE__ */ new Map();
|
|
3762
|
+
var BY_NAME4 = /* @__PURE__ */ new Map();
|
|
3763
|
+
for (const m of ALL_MUNICIPALITIES) {
|
|
3764
|
+
BY_CODE3.set(m.code, m);
|
|
3765
|
+
BY_NAME4.set(m.localizedName.toLowerCase(), m);
|
|
3766
|
+
if (m.englishName.toLowerCase() !== m.localizedName.toLowerCase()) {
|
|
3767
|
+
BY_NAME4.set(m.englishName.toLowerCase(), m);
|
|
3768
|
+
}
|
|
3769
|
+
addGenitive2(m.localizedName, m);
|
|
3770
|
+
if (m.englishName.toLowerCase() !== m.localizedName.toLowerCase()) {
|
|
3771
|
+
addGenitive2(m.englishName, m);
|
|
3772
|
+
}
|
|
3773
|
+
}
|
|
3774
|
+
function addGenitive2(name, m) {
|
|
3775
|
+
if (name.endsWith("s") || name.endsWith("S")) return;
|
|
3776
|
+
const key = (name + "s").toLowerCase();
|
|
3777
|
+
if (!BY_NAME4.has(key)) BY_NAME4.set(key, m);
|
|
3778
|
+
}
|
|
3779
|
+
var SCAN_PATTERN3 = (() => {
|
|
3780
|
+
const names = [...BY_NAME4.keys()].filter((n) => n.length >= MIN_SCAN_NAME_LENGTH).sort((a, b) => b.length - a.length).map((s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
3781
|
+
return new RegExp(`(?<![\\p{L}\\p{N}_])(?:${names.join("|")})(?![\\p{L}\\p{N}_])`, "giu");
|
|
3782
|
+
})();
|
|
3783
|
+
|
|
3784
|
+
// src/geography/adjacency-data.ts
|
|
3785
|
+
var COUNTY_ADJACENCY = Object.freeze({
|
|
3786
|
+
"01": ["03", "04"],
|
|
3787
|
+
"03": ["01", "19", "20", "21"],
|
|
3788
|
+
"04": ["01", "05", "18", "19"],
|
|
3789
|
+
"05": ["04", "06", "08", "18"],
|
|
3790
|
+
"06": ["05", "07", "08", "13", "14"],
|
|
3791
|
+
"07": ["06", "08", "10", "12", "13"],
|
|
3792
|
+
"08": ["05", "06", "07", "10"],
|
|
3793
|
+
"09": [],
|
|
3794
|
+
"10": ["07", "08", "12"],
|
|
3795
|
+
"12": ["07", "10", "13"],
|
|
3796
|
+
"13": ["06", "07", "12", "14"],
|
|
3797
|
+
"14": ["06", "13", "17", "18"],
|
|
3798
|
+
"17": ["14", "18", "20"],
|
|
3799
|
+
"18": ["04", "05", "14", "17", "19", "20"],
|
|
3800
|
+
"19": ["03", "04", "18", "20", "21"],
|
|
3801
|
+
"20": ["03", "17", "18", "19", "21", "23"],
|
|
3802
|
+
"21": ["03", "19", "20", "22", "23"],
|
|
3803
|
+
"22": ["21", "23", "24"],
|
|
3804
|
+
"23": ["20", "21", "22", "24"],
|
|
3805
|
+
"24": ["22", "23", "25"],
|
|
3806
|
+
"25": ["24"]
|
|
3807
|
+
});
|
|
3808
|
+
var MUNICIPALITY_ADJACENCY = Object.freeze({
|
|
3809
|
+
"0114": ["0115", "0123", "0139", "0160", "0163", "0191"],
|
|
3810
|
+
"0115": ["0114", "0117", "0160", "0188", "0191"],
|
|
3811
|
+
"0117": ["0115", "0160", "0187", "0188"],
|
|
3812
|
+
"0120": ["0182"],
|
|
3813
|
+
"0123": ["0114", "0139", "0163", "0180"],
|
|
3814
|
+
"0126": ["0127", "0136", "0138", "0180"],
|
|
3815
|
+
"0127": ["0126", "0128", "0136", "0181", "0192"],
|
|
3816
|
+
"0128": ["0127", "0181"],
|
|
3817
|
+
"0136": ["0126", "0127", "0138", "0192"],
|
|
3818
|
+
"0138": ["0126", "0136", "0180", "0182"],
|
|
3819
|
+
"0139": ["0114", "0123", "0191", "0305"],
|
|
3820
|
+
"0140": ["0181", "0461", "0486"],
|
|
3821
|
+
"0160": ["0114", "0115", "0117", "0162", "0163"],
|
|
3822
|
+
"0162": ["0160", "0163", "0180", "0184"],
|
|
3823
|
+
"0163": ["0114", "0123", "0160", "0162", "0180", "0183", "0184"],
|
|
3824
|
+
"0180": ["0123", "0126", "0138", "0162", "0163", "0182", "0183", "0184"],
|
|
3825
|
+
"0181": ["0127", "0128", "0140", "0461", "0488"],
|
|
3826
|
+
"0182": ["0120", "0138", "0180"],
|
|
3827
|
+
"0183": ["0163", "0180", "0184"],
|
|
3828
|
+
"0184": ["0162", "0163", "0180", "0183"],
|
|
3829
|
+
"0187": ["0117"],
|
|
3830
|
+
"0188": ["0115", "0117", "0191", "0330", "0380", "0382"],
|
|
3831
|
+
"0191": ["0114", "0115", "0139", "0188", "0305", "0330", "0380"],
|
|
3832
|
+
"0192": ["0127", "0136"],
|
|
3833
|
+
"0305": ["0139", "0191", "0330", "0380", "0381"],
|
|
3834
|
+
"0319": ["0360", "2180"],
|
|
3835
|
+
"0330": ["0188", "0191", "0305", "0380"],
|
|
3836
|
+
"0331": ["0360", "0380", "0381", "1981", "2084", "2180", "2181"],
|
|
3837
|
+
"0360": ["0319", "0331", "0380", "0382", "2180"],
|
|
3838
|
+
"0380": ["0188", "0191", "0305", "0330", "0331", "0360", "0381", "0382"],
|
|
3839
|
+
"0381": ["0305", "0331", "0380", "1980", "1981"],
|
|
3840
|
+
"0382": ["0188", "0360", "0380"],
|
|
3841
|
+
"0428": ["0483", "0562", "1880"],
|
|
3842
|
+
"0461": ["0140", "0181", "0480", "0482", "0486", "0488"],
|
|
3843
|
+
"0480": ["0461", "0481", "0482", "0483", "0488", "0581"],
|
|
3844
|
+
"0481": ["0480"],
|
|
3845
|
+
"0482": ["0461", "0480", "0483", "0484", "0486"],
|
|
3846
|
+
"0483": ["0428", "0480", "0482", "0484", "0562", "0581"],
|
|
3847
|
+
"0484": ["0482", "0483", "0486", "1960", "1984"],
|
|
3848
|
+
"0486": ["0140", "0461", "0482", "0484"],
|
|
3849
|
+
"0488": ["0181", "0461", "0480"],
|
|
3850
|
+
"0509": ["0560", "0584", "0586", "0680", "0687"],
|
|
3851
|
+
"0512": ["0513", "0560", "0604", "0686", "0687", "0884"],
|
|
3852
|
+
"0513": ["0512", "0560", "0561", "0580", "0883", "0884"],
|
|
3853
|
+
"0560": ["0509", "0512", "0513", "0580", "0586", "0687"],
|
|
3854
|
+
"0561": ["0513", "0563", "0580", "0582", "0883"],
|
|
3855
|
+
"0562": ["0428", "0483", "0580", "0581", "0583", "1861", "1880"],
|
|
3856
|
+
"0563": ["0561", "0582", "0883"],
|
|
3857
|
+
"0580": ["0513", "0560", "0561", "0562", "0581", "0582", "0583", "0586"],
|
|
3858
|
+
"0581": ["0480", "0483", "0562", "0580", "0582"],
|
|
3859
|
+
"0582": ["0561", "0563", "0580", "0581"],
|
|
3860
|
+
"0583": ["0562", "0580", "0584", "0586", "1861", "1882"],
|
|
3861
|
+
"0584": ["0509", "0583", "0586"],
|
|
3862
|
+
"0586": ["0509", "0560", "0580", "0583", "0584"],
|
|
3863
|
+
"0604": ["0512", "0680", "0682", "0686", "0687"],
|
|
3864
|
+
"0617": ["0662", "0665", "0683"],
|
|
3865
|
+
"0642": ["0643", "0680", "1491", "1498", "1499"],
|
|
3866
|
+
"0643": ["0642", "0680", "1497", "1498"],
|
|
3867
|
+
"0662": ["0617", "0665", "0680", "0683", "0781", "1315", "1382", "1452", "1465"],
|
|
3868
|
+
"0665": ["0617", "0662", "0680", "0682", "0683", "0684"],
|
|
3869
|
+
"0680": ["0509", "0604", "0642", "0643", "0662", "0665", "0682", "0687", "1452", "1491"],
|
|
3870
|
+
"0682": ["0604", "0665", "0680", "0684", "0685", "0686"],
|
|
3871
|
+
"0683": ["0617", "0662", "0665", "0684", "0764", "0781"],
|
|
3872
|
+
"0684": ["0665", "0682", "0683", "0685", "0764", "0780"],
|
|
3873
|
+
"0685": ["0682", "0684", "0686", "0760", "0780", "0821", "0860"],
|
|
3874
|
+
"0686": ["0512", "0604", "0682", "0685", "0860", "0884"],
|
|
3875
|
+
"0687": ["0509", "0512", "0560", "0604", "0680"],
|
|
3876
|
+
"0760": ["0685", "0761", "0780", "0821", "0860", "0881"],
|
|
3877
|
+
"0761": ["0760", "0763", "0780", "0862", "0881"],
|
|
3878
|
+
"0763": ["0761", "0764", "0765", "0780", "0862", "1060", "1081", "1082"],
|
|
3879
|
+
"0764": ["0683", "0684", "0763", "0765", "0780", "0781"],
|
|
3880
|
+
"0765": ["0763", "0764", "0767", "0781", "1060", "1273", "1293"],
|
|
3881
|
+
"0767": ["0765", "0781", "1257", "1273", "1293", "1381"],
|
|
3882
|
+
"0780": ["0684", "0685", "0760", "0761", "0763", "0764"],
|
|
3883
|
+
"0781": ["0662", "0683", "0764", "0765", "0767", "1315", "1380", "1381"],
|
|
3884
|
+
"0821": ["0685", "0760", "0860", "0861", "0881", "0882"],
|
|
3885
|
+
"0834": ["0862", "0880", "1080"],
|
|
3886
|
+
"0840": ["0885"],
|
|
3887
|
+
"0860": ["0685", "0686", "0760", "0821", "0882", "0884"],
|
|
3888
|
+
"0861": ["0821", "0880", "0881", "0882"],
|
|
3889
|
+
"0862": ["0761", "0763", "0834", "0880", "0881", "1080", "1081"],
|
|
3890
|
+
"0880": ["0834", "0861", "0862", "0881"],
|
|
3891
|
+
"0881": ["0760", "0761", "0821", "0861", "0862", "0880"],
|
|
3892
|
+
"0882": ["0821", "0860", "0861", "0883", "0884"],
|
|
3893
|
+
"0883": ["0513", "0561", "0563", "0882", "0884"],
|
|
3894
|
+
"0884": ["0512", "0513", "0686", "0860", "0882", "0883"],
|
|
3895
|
+
"0885": ["0840"],
|
|
3896
|
+
"1060": ["0763", "0765", "1082", "1083", "1256", "1272", "1273", "1290"],
|
|
3897
|
+
"1080": ["0834", "0862", "1081"],
|
|
3898
|
+
"1081": ["0763", "0862", "1080", "1082"],
|
|
3899
|
+
"1082": ["0763", "1060", "1081", "1083"],
|
|
3900
|
+
"1083": ["1060", "1082", "1272"],
|
|
3901
|
+
"1214": ["1260", "1261", "1276", "1277", "1282", "1283", "1285"],
|
|
3902
|
+
"1230": ["1231", "1262", "1263", "1280", "1281"],
|
|
3903
|
+
"1231": ["1230", "1262", "1280"],
|
|
3904
|
+
"1233": ["1263", "1280", "1287"],
|
|
3905
|
+
"1256": ["1060", "1273", "1290", "1293"],
|
|
3906
|
+
"1257": ["0767", "1275", "1276", "1292", "1293", "1381"],
|
|
3907
|
+
"1260": ["1214", "1277", "1283"],
|
|
3908
|
+
"1261": ["1214", "1262", "1281", "1282", "1285"],
|
|
3909
|
+
"1262": ["1230", "1231", "1261", "1281"],
|
|
3910
|
+
"1263": ["1230", "1233", "1264", "1280", "1281", "1287"],
|
|
3911
|
+
"1264": ["1263", "1265", "1281", "1286", "1287"],
|
|
3912
|
+
"1265": ["1264", "1266", "1270", "1281", "1285", "1286"],
|
|
3913
|
+
"1266": ["1265", "1267", "1270", "1285", "1290", "1293"],
|
|
3914
|
+
"1267": ["1266", "1276", "1285", "1293"],
|
|
3915
|
+
"1270": ["1265", "1266", "1286", "1290", "1291"],
|
|
3916
|
+
"1272": ["1060", "1083", "1290"],
|
|
3917
|
+
"1273": ["0765", "0767", "1060", "1256", "1290", "1293"],
|
|
3918
|
+
"1275": ["1257", "1276", "1293"],
|
|
3919
|
+
"1276": ["1214", "1257", "1267", "1275", "1277", "1285", "1292", "1293"],
|
|
3920
|
+
"1277": ["1214", "1260", "1276", "1283", "1292"],
|
|
3921
|
+
"1278": ["1292", "1381"],
|
|
3922
|
+
"1280": ["1230", "1231", "1233", "1263"],
|
|
3923
|
+
"1281": ["1230", "1261", "1262", "1263", "1264", "1265", "1285", "1287"],
|
|
3924
|
+
"1282": ["1214", "1261", "1283"],
|
|
3925
|
+
"1283": ["1214", "1260", "1277", "1282", "1284", "1292"],
|
|
3926
|
+
"1284": ["1283"],
|
|
3927
|
+
"1285": ["1214", "1261", "1265", "1266", "1267", "1276", "1281"],
|
|
3928
|
+
"1286": ["1264", "1265", "1270", "1291"],
|
|
3929
|
+
"1287": ["1233", "1263", "1264", "1281"],
|
|
3930
|
+
"1290": ["1060", "1256", "1266", "1270", "1272", "1273", "1291", "1293"],
|
|
3931
|
+
"1291": ["1270", "1286", "1290"],
|
|
3932
|
+
"1292": ["1257", "1276", "1277", "1278", "1283", "1381"],
|
|
3933
|
+
"1293": ["0765", "0767", "1256", "1257", "1266", "1267", "1273", "1275", "1276", "1290"],
|
|
3934
|
+
"1315": ["0662", "0781", "1380", "1382"],
|
|
3935
|
+
"1380": ["0781", "1315", "1381", "1382"],
|
|
3936
|
+
"1381": ["0767", "0781", "1257", "1278", "1292", "1380"],
|
|
3937
|
+
"1382": ["0662", "1315", "1380", "1383", "1463", "1465"],
|
|
3938
|
+
"1383": ["1382", "1384", "1463", "1465"],
|
|
3939
|
+
"1384": ["1383", "1401", "1463", "1480", "1481"],
|
|
3940
|
+
"1401": ["1384", "1402", "1441", "1443", "1463", "1480", "1481"],
|
|
3941
|
+
"1402": ["1401", "1441", "1480"],
|
|
3942
|
+
"1415": ["1462", "1482", "1485"],
|
|
3943
|
+
"1421": ["1484", "1485"],
|
|
3944
|
+
"1427": ["1430", "1435", "1484"],
|
|
3945
|
+
"1430": ["1427", "1435", "1438", "1439", "1484", "1485"],
|
|
3946
|
+
"1435": ["1427", "1430", "1438", "1486"],
|
|
3947
|
+
"1438": ["1430", "1435", "1439", "1460", "1765"],
|
|
3948
|
+
"1439": ["1430", "1438", "1460", "1461", "1485", "1487"],
|
|
3949
|
+
"1440": ["1441", "1462", "1480", "1482", "1488", "1489"],
|
|
3950
|
+
"1441": ["1401", "1402", "1440", "1443", "1480", "1489"],
|
|
3951
|
+
"1442": ["1443", "1445", "1466", "1489", "1490"],
|
|
3952
|
+
"1443": ["1401", "1441", "1442", "1463", "1489", "1490"],
|
|
3953
|
+
"1444": ["1445", "1470", "1487", "1488", "1494"],
|
|
3954
|
+
"1445": ["1442", "1444", "1466", "1470", "1488", "1489"],
|
|
3955
|
+
"1446": ["1472", "1473", "1497", "1860", "1882"],
|
|
3956
|
+
"1447": ["1473", "1493", "1781", "1860", "1862"],
|
|
3957
|
+
"1452": ["0662", "0680", "1465", "1490", "1491"],
|
|
3958
|
+
"1460": ["1438", "1439", "1461", "1492", "1765", "1785"],
|
|
3959
|
+
"1461": ["1439", "1460", "1487", "1492"],
|
|
3960
|
+
"1462": ["1415", "1440", "1482", "1485", "1487", "1488"],
|
|
3961
|
+
"1463": ["1382", "1383", "1384", "1401", "1443", "1465", "1481", "1490"],
|
|
3962
|
+
"1465": ["0662", "1382", "1383", "1452", "1463", "1490"],
|
|
3963
|
+
"1466": ["1442", "1445", "1470", "1490", "1491", "1499"],
|
|
3964
|
+
"1470": ["1444", "1445", "1466", "1494", "1495", "1499"],
|
|
3965
|
+
"1471": ["1493", "1494", "1495", "1496"],
|
|
3966
|
+
"1472": ["1446", "1473", "1496", "1497"],
|
|
3967
|
+
"1473": ["1446", "1447", "1472", "1493", "1496", "1860"],
|
|
3968
|
+
"1480": ["1384", "1401", "1402", "1440", "1441", "1481", "1482"],
|
|
3969
|
+
"1481": ["1384", "1401", "1463", "1480"],
|
|
3970
|
+
"1482": ["1415", "1440", "1462", "1480"],
|
|
3971
|
+
"1484": ["1421", "1427", "1430", "1485"],
|
|
3972
|
+
"1485": ["1415", "1421", "1430", "1439", "1462", "1484", "1487", "1488"],
|
|
3973
|
+
"1486": ["1435"],
|
|
3974
|
+
"1487": ["1439", "1444", "1461", "1462", "1485", "1488", "1494"],
|
|
3975
|
+
"1488": ["1440", "1444", "1445", "1462", "1485", "1487", "1489"],
|
|
3976
|
+
"1489": ["1440", "1441", "1442", "1443", "1445", "1488"],
|
|
3977
|
+
"1490": ["1442", "1443", "1452", "1463", "1465", "1466", "1491"],
|
|
3978
|
+
"1491": ["0642", "0680", "1452", "1466", "1490", "1499"],
|
|
3979
|
+
"1492": ["1460", "1461", "1765", "1785"],
|
|
3980
|
+
"1493": ["1447", "1471", "1473", "1496"],
|
|
3981
|
+
"1494": ["1444", "1470", "1471", "1487", "1495"],
|
|
3982
|
+
"1495": ["1470", "1471", "1494", "1496", "1499"],
|
|
3983
|
+
"1496": ["1471", "1472", "1473", "1493", "1495", "1497", "1498", "1499"],
|
|
3984
|
+
"1497": ["0643", "1446", "1472", "1496", "1498"],
|
|
3985
|
+
"1498": ["0642", "0643", "1496", "1497", "1499"],
|
|
3986
|
+
"1499": ["0642", "1466", "1470", "1491", "1495", "1496", "1498"],
|
|
3987
|
+
"1715": ["1763", "1764", "1766", "1780", "1784"],
|
|
3988
|
+
"1730": ["1765", "1784"],
|
|
3989
|
+
"1737": ["1766", "1783", "1784", "2023"],
|
|
3990
|
+
"1760": ["1780", "1781", "1782", "1863", "1883"],
|
|
3991
|
+
"1761": ["1780"],
|
|
3992
|
+
"1762": ["1763", "1766", "1783"],
|
|
3993
|
+
"1763": ["1715", "1762", "1766", "1780", "1783"],
|
|
3994
|
+
"1764": ["1715", "1780", "1784", "1785"],
|
|
3995
|
+
"1765": ["1438", "1460", "1492", "1730", "1784", "1785"],
|
|
3996
|
+
"1766": ["1715", "1737", "1762", "1763", "1783", "1784"],
|
|
3997
|
+
"1780": ["1715", "1760", "1761", "1763", "1764", "1781", "1782", "1783"],
|
|
3998
|
+
"1781": ["1447", "1760", "1780", "1860", "1862", "1883"],
|
|
3999
|
+
"1782": ["1760", "1780", "1783", "1863", "2021", "2023", "2085"],
|
|
4000
|
+
"1783": ["1737", "1762", "1763", "1766", "1780", "1782", "2023"],
|
|
4001
|
+
"1784": ["1715", "1730", "1737", "1764", "1765", "1766", "1785"],
|
|
4002
|
+
"1785": ["1460", "1492", "1764", "1765", "1784"],
|
|
4003
|
+
"1814": ["1860", "1861", "1862", "1880", "1881", "1883"],
|
|
4004
|
+
"1860": ["1446", "1447", "1473", "1781", "1814", "1861", "1862", "1882"],
|
|
4005
|
+
"1861": ["0562", "0583", "1814", "1860", "1880", "1881", "1882"],
|
|
4006
|
+
"1862": ["1447", "1781", "1814", "1860", "1883"],
|
|
4007
|
+
"1863": ["1760", "1782", "1864", "1883", "1884", "1885", "2085"],
|
|
4008
|
+
"1864": ["1863", "1885", "2061", "2085"],
|
|
4009
|
+
"1880": ["0428", "0562", "1814", "1861", "1881", "1883", "1884", "1885", "1984"],
|
|
4010
|
+
"1881": ["1814", "1861", "1880"],
|
|
4011
|
+
"1882": ["0583", "1446", "1860", "1861"],
|
|
4012
|
+
"1883": ["1760", "1781", "1814", "1862", "1863", "1880", "1884"],
|
|
4013
|
+
"1884": ["1863", "1880", "1883", "1885"],
|
|
4014
|
+
"1885": ["1863", "1864", "1880", "1884", "1904", "1983", "1984", "2061"],
|
|
4015
|
+
"1904": ["1885", "1907", "1982", "1983", "2061"],
|
|
4016
|
+
"1907": ["1904", "1961", "1980", "1981", "1982", "1983"],
|
|
4017
|
+
"1960": ["0484", "1983", "1984"],
|
|
4018
|
+
"1961": ["1907", "1980", "1983"],
|
|
4019
|
+
"1962": ["1981", "1982", "2061", "2083", "2084"],
|
|
4020
|
+
"1980": ["0381", "1907", "1961", "1981", "1983"],
|
|
4021
|
+
"1981": ["0331", "0381", "1907", "1962", "1980", "1982", "2084", "2181"],
|
|
4022
|
+
"1982": ["1904", "1907", "1962", "1981", "2061"],
|
|
4023
|
+
"1983": ["1885", "1904", "1907", "1960", "1961", "1980", "1984"],
|
|
4024
|
+
"1984": ["0484", "1880", "1885", "1960", "1983"],
|
|
4025
|
+
"2021": ["1782", "2023", "2026", "2029", "2062", "2085"],
|
|
4026
|
+
"2023": ["1737", "1782", "1783", "2021", "2039", "2062"],
|
|
4027
|
+
"2026": ["2021", "2029", "2080", "2081", "2085"],
|
|
4028
|
+
"2029": ["2021", "2026", "2031", "2062", "2080", "2081"],
|
|
4029
|
+
"2031": ["2029", "2034", "2062", "2080", "2121", "2161"],
|
|
4030
|
+
"2034": ["2031", "2062", "2161", "2361"],
|
|
4031
|
+
"2039": ["2023", "2062", "2361"],
|
|
4032
|
+
"2061": ["1864", "1885", "1904", "1962", "1982", "2082", "2083", "2085"],
|
|
4033
|
+
"2062": ["2021", "2023", "2029", "2031", "2034", "2039", "2361"],
|
|
4034
|
+
"2080": ["2026", "2029", "2031", "2081", "2082", "2083", "2101", "2104", "2121", "2181", "2183"],
|
|
4035
|
+
"2081": ["2026", "2029", "2080", "2082", "2085"],
|
|
4036
|
+
"2082": ["2061", "2080", "2081", "2083", "2085", "2104"],
|
|
4037
|
+
"2083": ["1962", "2061", "2080", "2082", "2084", "2104"],
|
|
4038
|
+
"2084": ["0331", "1962", "1981", "2083", "2104", "2181"],
|
|
4039
|
+
"2085": ["1782", "1863", "1864", "2021", "2026", "2061", "2081", "2082"],
|
|
4040
|
+
"2101": ["2080", "2180", "2181", "2182", "2183"],
|
|
4041
|
+
"2104": ["2080", "2082", "2083", "2084", "2181"],
|
|
4042
|
+
"2121": ["2031", "2080", "2161", "2183"],
|
|
4043
|
+
"2132": ["2184", "2260", "2281"],
|
|
4044
|
+
"2161": ["2031", "2034", "2121", "2183", "2184", "2260", "2361"],
|
|
4045
|
+
"2180": ["0319", "0331", "0360", "2101", "2181", "2182"],
|
|
4046
|
+
"2181": ["0331", "1981", "2080", "2084", "2101", "2104", "2180"],
|
|
4047
|
+
"2182": ["2101", "2180", "2183", "2184"],
|
|
4048
|
+
"2183": ["2080", "2101", "2121", "2161", "2182", "2184"],
|
|
4049
|
+
"2184": ["2132", "2161", "2182", "2183", "2260"],
|
|
4050
|
+
"2260": ["2132", "2161", "2184", "2281", "2305", "2326", "2361"],
|
|
4051
|
+
"2262": ["2280", "2281", "2283"],
|
|
4052
|
+
"2280": ["2262", "2281", "2282", "2283"],
|
|
4053
|
+
"2281": ["2132", "2260", "2262", "2280", "2283", "2303", "2305"],
|
|
4054
|
+
"2282": ["2280", "2283", "2284"],
|
|
4055
|
+
"2283": ["2262", "2280", "2281", "2282", "2284", "2303", "2313", "2425", "2463"],
|
|
4056
|
+
"2284": ["2282", "2283", "2401", "2403", "2463"],
|
|
4057
|
+
"2303": ["2281", "2283", "2305", "2313", "2380"],
|
|
4058
|
+
"2305": ["2260", "2281", "2303", "2326", "2380"],
|
|
4059
|
+
"2309": ["2313", "2321", "2380"],
|
|
4060
|
+
"2313": ["2283", "2303", "2309", "2380", "2425", "2462"],
|
|
4061
|
+
"2321": ["2309", "2326"],
|
|
4062
|
+
"2326": ["2260", "2305", "2321", "2361", "2380"],
|
|
4063
|
+
"2361": ["2034", "2039", "2062", "2161", "2260", "2326"],
|
|
4064
|
+
"2380": ["2303", "2305", "2309", "2313", "2326"],
|
|
4065
|
+
"2401": ["2284", "2403", "2460", "2480"],
|
|
4066
|
+
"2403": ["2284", "2401", "2404", "2460", "2463", "2481"],
|
|
4067
|
+
"2404": ["2403", "2417", "2460", "2480", "2481", "2482"],
|
|
4068
|
+
"2409": ["2480", "2482"],
|
|
4069
|
+
"2417": ["2404", "2418", "2481", "2482", "2505"],
|
|
4070
|
+
"2418": ["2417", "2422", "2481", "2505"],
|
|
4071
|
+
"2421": ["2422", "2462", "2481"],
|
|
4072
|
+
"2422": ["2418", "2421", "2481", "2505", "2506"],
|
|
4073
|
+
"2425": ["2283", "2313", "2462", "2463"],
|
|
4074
|
+
"2460": ["2401", "2403", "2404", "2480"],
|
|
4075
|
+
"2462": ["2313", "2421", "2425", "2463", "2481"],
|
|
4076
|
+
"2463": ["2283", "2284", "2403", "2425", "2462", "2481"],
|
|
4077
|
+
"2480": ["2401", "2404", "2409", "2460", "2482"],
|
|
4078
|
+
"2481": ["2403", "2404", "2417", "2418", "2421", "2422", "2462", "2463"],
|
|
4079
|
+
"2482": ["2404", "2409", "2417", "2480", "2505", "2581"],
|
|
4080
|
+
"2505": ["2417", "2418", "2422", "2482", "2506", "2510", "2560", "2581"],
|
|
4081
|
+
"2506": ["2422", "2505", "2510"],
|
|
4082
|
+
"2510": ["2505", "2506", "2523", "2560", "2582"],
|
|
4083
|
+
"2513": ["2514", "2518", "2521", "2523", "2580", "2582"],
|
|
4084
|
+
"2514": ["2513", "2518", "2580", "2583"],
|
|
4085
|
+
"2518": ["2513", "2514", "2521", "2583"],
|
|
4086
|
+
"2521": ["2513", "2518", "2523", "2584"],
|
|
4087
|
+
"2523": ["2510", "2513", "2521", "2582", "2584"],
|
|
4088
|
+
"2560": ["2505", "2510", "2580", "2581", "2582"],
|
|
4089
|
+
"2580": ["2513", "2514", "2560", "2581", "2582"],
|
|
4090
|
+
"2581": ["2482", "2505", "2560", "2580", "2582"],
|
|
4091
|
+
"2582": ["2510", "2513", "2523", "2560", "2580", "2581"],
|
|
4092
|
+
"2583": ["2514", "2518"],
|
|
4093
|
+
"2584": ["2521", "2523"]
|
|
4094
|
+
});
|
|
4095
|
+
|
|
4096
|
+
// src/geography/geography-extensions.ts
|
|
4097
|
+
function getMunicipalities(county) {
|
|
4098
|
+
return SwedishMunicipality.all.filter((m) => m.countyCode === county.code).slice().sort((a, b) => a.code.localeCompare(b.code));
|
|
4099
|
+
}
|
|
4100
|
+
function getAdjacentMunicipalities(municipality) {
|
|
4101
|
+
const codes = MUNICIPALITY_ADJACENCY[municipality.code];
|
|
4102
|
+
if (!codes) return [];
|
|
4103
|
+
const out = [];
|
|
4104
|
+
for (const c of codes) {
|
|
4105
|
+
const m = SwedishMunicipality.tryParse(c);
|
|
4106
|
+
if (m) out.push(m);
|
|
4107
|
+
}
|
|
4108
|
+
return out;
|
|
4109
|
+
}
|
|
4110
|
+
function getAdjacentCounties(county) {
|
|
4111
|
+
const codes = COUNTY_ADJACENCY[county.code];
|
|
4112
|
+
if (!codes) return [];
|
|
4113
|
+
const out = [];
|
|
4114
|
+
for (const c of codes) {
|
|
4115
|
+
const cn = SwedishCounty.tryParse(c);
|
|
4116
|
+
if (cn) out.push(cn);
|
|
4117
|
+
}
|
|
4118
|
+
return out;
|
|
4119
|
+
}
|
|
4120
|
+
function getBorderingCountries(country) {
|
|
4121
|
+
const codes = COUNTRY_BORDERS[country.alpha2Code];
|
|
4122
|
+
if (!codes) return [];
|
|
4123
|
+
return codes.map((code) => Country.parse(code));
|
|
4124
|
+
}
|
|
4125
|
+
function getCountries(continent) {
|
|
4126
|
+
return Country.all.filter((country) => country.continent.equals(continent)).slice().sort((a, b) => a.englishName.localeCompare(b.englishName));
|
|
4127
|
+
}
|
|
4128
|
+
var COUNTRY_BORDERS = {
|
|
4129
|
+
AT: ["CH", "CZ", "DE", "HU", "IT", "LI", "SI", "SK"],
|
|
4130
|
+
BE: ["DE", "FR", "LU", "NL"],
|
|
4131
|
+
CA: ["US"],
|
|
4132
|
+
CH: ["AT", "FR", "DE", "IT", "LI"],
|
|
4133
|
+
CZ: ["AT", "DE", "PL", "SK"],
|
|
4134
|
+
DE: ["AT", "BE", "CH", "CZ", "DK", "FR", "LU", "NL", "PL"],
|
|
4135
|
+
DK: ["DE"],
|
|
4136
|
+
ES: ["AD", "FR", "GI", "MA", "PT"],
|
|
4137
|
+
FI: ["NO", "RU", "SE"],
|
|
4138
|
+
FR: ["AD", "BE", "DE", "IT", "LU", "MC", "ES", "CH"],
|
|
4139
|
+
LU: ["BE", "DE", "FR"],
|
|
4140
|
+
NL: ["BE", "DE"],
|
|
4141
|
+
NO: ["FI", "RU", "SE"],
|
|
4142
|
+
PL: ["BY", "CZ", "DE", "LT", "RU", "SK", "UA"],
|
|
4143
|
+
RU: ["AZ", "BY", "CN", "EE", "FI", "GE", "KZ", "KP", "LV", "LT", "MN", "NO", "PL", "UA"],
|
|
4144
|
+
SE: ["FI", "NO"],
|
|
4145
|
+
US: ["CA", "CU", "MX"]
|
|
4146
|
+
};
|
|
4147
|
+
|
|
4148
|
+
// src/geography/geography-masking.ts
|
|
4149
|
+
var MASK_CHAR = "*";
|
|
4150
|
+
function maskGeoCoordinate(coordinate) {
|
|
4151
|
+
return `${maskDecimals(coordinate.latitude.toFixed(4))}, ${maskDecimals(coordinate.longitude.toFixed(4))}`;
|
|
4152
|
+
}
|
|
4153
|
+
function maskSwedishMunicipality(m) {
|
|
4154
|
+
return maskKeepFirst(m.displayName);
|
|
4155
|
+
}
|
|
4156
|
+
function maskSwedishCounty(c) {
|
|
4157
|
+
const parts = c.displayName.split(" ");
|
|
4158
|
+
return parts.map(
|
|
4159
|
+
(p, i) => i === 0 && p.length > 1 ? p[0] + MASK_CHAR.repeat(p.length - 1) : MASK_CHAR.repeat(p.length)
|
|
4160
|
+
).join(" ");
|
|
4161
|
+
}
|
|
4162
|
+
function maskLanguage(l) {
|
|
4163
|
+
return maskKeepFirst(l.displayName);
|
|
4164
|
+
}
|
|
4165
|
+
function maskKeepFirst(name) {
|
|
4166
|
+
if (name.length <= 1) return MASK_CHAR.repeat(name.length);
|
|
4167
|
+
return name[0] + MASK_CHAR.repeat(name.length - 1);
|
|
4168
|
+
}
|
|
4169
|
+
function maskDecimals(num) {
|
|
4170
|
+
const dot = num.indexOf(".");
|
|
4171
|
+
if (dot < 0) return num;
|
|
4172
|
+
const head = num.slice(0, dot + 2);
|
|
4173
|
+
const tail = num.slice(dot + 2);
|
|
4174
|
+
return head + MASK_CHAR.repeat(tail.length);
|
|
4175
|
+
}
|
|
4176
|
+
|
|
4177
|
+
// src/geography/geography-external-links.ts
|
|
4178
|
+
var SCB_URL = "https://www.scb.se/hitta-statistik/regional-statistik-och-kartor/regionala-indelningar/lan-och-kommuner/";
|
|
4179
|
+
function getCountyScbUrl(_county) {
|
|
4180
|
+
return SCB_URL;
|
|
4181
|
+
}
|
|
4182
|
+
function getCountyWikipediaUrl(county) {
|
|
4183
|
+
return `https://sv.wikipedia.org/wiki/${encodeURIComponent(county.localizedName.replace(/ /g, "_"))}`;
|
|
4184
|
+
}
|
|
4185
|
+
function getCountyGoogleMapsUrl(county) {
|
|
4186
|
+
return `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(county.localizedName)}`;
|
|
4187
|
+
}
|
|
4188
|
+
function getMunicipalityScbUrl(_m) {
|
|
4189
|
+
return SCB_URL;
|
|
4190
|
+
}
|
|
4191
|
+
function getMunicipalityWikipediaUrl(m) {
|
|
4192
|
+
return `https://sv.wikipedia.org/wiki/${encodeURIComponent(
|
|
4193
|
+
`${m.localizedName}s kommun`.replace(/ /g, "_")
|
|
4194
|
+
)}`;
|
|
4195
|
+
}
|
|
4196
|
+
function getMunicipalityGoogleMapsUrl(m) {
|
|
4197
|
+
return `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(
|
|
4198
|
+
`${m.localizedName} kommun`
|
|
4199
|
+
)}`;
|
|
4200
|
+
}
|
|
4201
|
+
|
|
4202
|
+
exports.Continent = Continent;
|
|
4203
|
+
exports.Country = Country;
|
|
4204
|
+
exports.CountryCapital = CountryCapital;
|
|
4205
|
+
exports.GeoCoordinate = GeoCoordinate;
|
|
4206
|
+
exports.Language = Language;
|
|
4207
|
+
exports.SwedishCounty = SwedishCounty;
|
|
4208
|
+
exports.SwedishMunicipality = SwedishMunicipality;
|
|
4209
|
+
exports.TextDirection = TextDirection;
|
|
4210
|
+
exports.WritingScript = WritingScript;
|
|
4211
|
+
exports.getAdjacentCounties = getAdjacentCounties;
|
|
4212
|
+
exports.getAdjacentMunicipalities = getAdjacentMunicipalities;
|
|
4213
|
+
exports.getBorderingCountries = getBorderingCountries;
|
|
4214
|
+
exports.getCountries = getCountries;
|
|
4215
|
+
exports.getCountyGoogleMapsUrl = getCountyGoogleMapsUrl;
|
|
4216
|
+
exports.getCountyScbUrl = getCountyScbUrl;
|
|
4217
|
+
exports.getCountyWikipediaUrl = getCountyWikipediaUrl;
|
|
4218
|
+
exports.getMunicipalities = getMunicipalities;
|
|
4219
|
+
exports.getMunicipalityGoogleMapsUrl = getMunicipalityGoogleMapsUrl;
|
|
4220
|
+
exports.getMunicipalityScbUrl = getMunicipalityScbUrl;
|
|
4221
|
+
exports.getMunicipalityWikipediaUrl = getMunicipalityWikipediaUrl;
|
|
4222
|
+
exports.maskGeoCoordinate = maskGeoCoordinate;
|
|
4223
|
+
exports.maskLanguage = maskLanguage;
|
|
4224
|
+
exports.maskSwedishCounty = maskSwedishCounty;
|
|
4225
|
+
exports.maskSwedishMunicipality = maskSwedishMunicipality;
|
|
4226
|
+
//# sourceMappingURL=index.cjs.map
|
|
4227
|
+
//# sourceMappingURL=index.cjs.map
|