@intl-tel-input/vue 29.1.3 → 29.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1200,7 +1200,29 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1200
1200
  COUNTRY_CHANGE: "countrychange",
1201
1201
  INPUT: "input",
1202
1202
  STRICT_REJECT: "strict:reject"
1203
- }, _ = {
1203
+ }, _ = [
1204
+ "container",
1205
+ "input",
1206
+ "countryContainer",
1207
+ "selectedCountry",
1208
+ "selectedCountryPrimary",
1209
+ "selectedFlag",
1210
+ "arrow",
1211
+ "selectedDialCode",
1212
+ "countrySelector",
1213
+ "countrySelectorContainer",
1214
+ "searchWrapper",
1215
+ "searchIcon",
1216
+ "searchInput",
1217
+ "searchClear",
1218
+ "countryList",
1219
+ "countryListItem",
1220
+ "countryListItemFlag",
1221
+ "countryName",
1222
+ "dialCode",
1223
+ "countryCheck",
1224
+ "noResults"
1225
+ ], v = {
1204
1226
  HIDE: "iti__hide",
1205
1227
  V_HIDE: "iti__v-hide",
1206
1228
  ARROW_UP: "iti__arrow--up",
@@ -1210,58 +1232,58 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1210
1232
  COUNTRY_ITEM: "iti__country",
1211
1233
  HIGHLIGHT: "iti__highlight",
1212
1234
  STRICT_REJECT_ANIMATION: "iti__strict-reject-animation"
1213
- }, v = {
1235
+ }, y = {
1214
1236
  ARROW_UP: "ArrowUp",
1215
1237
  ARROW_DOWN: "ArrowDown",
1216
1238
  SPACE: " ",
1217
1239
  ENTER: "Enter",
1218
1240
  ESC: "Escape",
1219
1241
  TAB: "Tab"
1220
- }, y = {
1242
+ }, b = {
1221
1243
  PASTE: "insertFromPaste",
1222
1244
  DELETE_FORWARD: "deleteContentForward"
1223
- }, b = {
1245
+ }, x = {
1224
1246
  ALPHA_UNICODE: /\p{L}/u,
1225
1247
  NON_PLUS_NUMERIC: /[^+0-9]/,
1226
1248
  NON_PLUS_NUMERIC_GLOBAL: /[^+0-9]/g,
1227
1249
  HIDDEN_SEARCH_CHAR: /^[a-zA-ZÀ-ÿа-яА-Я ]$/
1228
- }, x = {
1250
+ }, S = {
1229
1251
  SEARCH_DEBOUNCE_MS: 100,
1230
1252
  HIDDEN_SEARCH_RESET_MS: 1e3,
1231
1253
  NEXT_TICK: 0
1232
- }, S = {
1254
+ }, C = {
1233
1255
  NARROW_VIEWPORT_WIDTH: 500,
1234
1256
  FALLBACK_SELECTED_COUNTRY_WITH_DIAL_WIDTH: 78,
1235
1257
  FALLBACK_SELECTED_COUNTRY_NO_DIAL_WIDTH: 42,
1236
1258
  INPUT_PADDING_EXTRA_LEFT: 6,
1237
1259
  DROPDOWN_MARGIN: 3,
1238
1260
  FALLBACK_DROPDOWN_HEIGHT: 200
1239
- }, C = {
1261
+ }, w = {
1240
1262
  PLUS: "+",
1241
1263
  NANP: "1"
1242
- }, w = {
1264
+ }, T = 15, E = {
1243
1265
  ISO2: "gb",
1244
1266
  DIAL_CODE: "44",
1245
1267
  MOBILE_PREFIX: "7",
1246
1268
  MOBILE_CORE_LENGTH: 10
1247
- }, T = {
1269
+ }, D = {
1248
1270
  ISO2: "us",
1249
1271
  DIAL_CODE: "1"
1250
- }, E = {
1272
+ }, O = {
1251
1273
  AGGRESSIVE: "AGGRESSIVE",
1252
1274
  POLITE: "POLITE",
1253
1275
  OFF: "OFF"
1254
- }, D = [
1276
+ }, k = [
1255
1277
  "OFF",
1256
1278
  "DROPDOWN",
1257
1279
  "FULLSCREEN",
1258
1280
  "AUTO"
1259
- ], O = [
1281
+ ], A = [
1260
1282
  "E164",
1261
1283
  "INTERNATIONAL",
1262
1284
  "NATIONAL",
1263
1285
  "RFC3966"
1264
- ], k = [
1286
+ ], j = [
1265
1287
  "FIXED_LINE",
1266
1288
  "MOBILE",
1267
1289
  "FIXED_LINE_OR_MOBILE",
@@ -1274,18 +1296,18 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1274
1296
  "UAN",
1275
1297
  "VOICEMAIL",
1276
1298
  "UNKNOWN"
1277
- ], A = [
1299
+ ], ee = [
1278
1300
  "IS_POSSIBLE",
1279
1301
  "INVALID_COUNTRY_CODE",
1280
1302
  "TOO_SHORT",
1281
1303
  "TOO_LONG",
1282
1304
  "IS_POSSIBLE_LOCAL_ONLY",
1283
1305
  "INVALID_LENGTH"
1284
- ], j = (e) => Object.fromEntries(e.map((e) => [e, e])), M = j(O), N = j(k), P = j(A), F = j(D), I = {
1306
+ ], M = (e) => Object.fromEntries(e.map((e) => [e, e])), N = M(A), P = M(j), F = M(ee), I = M(k), L = {
1285
1307
  ISO2: "iso2",
1286
1308
  DIAL_CODE: "dialCode",
1287
1309
  INSTANCE_ID: "intlTelInputId"
1288
- }, L = {
1310
+ }, R = {
1289
1311
  EXPANDED: "aria-expanded",
1290
1312
  LABEL: "aria-label",
1291
1313
  SELECTED: "aria-selected",
@@ -1295,7 +1317,7 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1295
1317
  HIDDEN: "aria-hidden",
1296
1318
  AUTOCOMPLETE: "aria-autocomplete",
1297
1319
  MODAL: "aria-modal"
1298
- }, ee = {
1320
+ }, te = {
1299
1321
  selectedCountryAriaLabel: "Change country for phone number, currently selected ${countryName} (${dialCode})",
1300
1322
  noCountrySelected: "Select country for phone number",
1301
1323
  countryListAriaLabel: "List of countries",
@@ -1305,17 +1327,18 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1305
1327
  searchSummaryAria(e) {
1306
1328
  return e === 0 ? "No results found" : e === 1 ? "1 result found" : `${e} results found`;
1307
1329
  }
1308
- }, R = (e) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(e).matches, te = () => R(`(max-width: ${S.NARROW_VIEWPORT_WIDTH}px)`), ne = () => {
1330
+ }, z = (e) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(e).matches, ne = () => z(`(max-width: ${C.NARROW_VIEWPORT_WIDTH}px)`), re = () => {
1309
1331
  if (typeof navigator < "u" && typeof window < "u") {
1310
- let e = R("(max-height: 600px)"), t = R("(pointer: coarse)");
1311
- if (te() || t && e) return F.FULLSCREEN;
1332
+ let e = z("(max-height: 600px)"), t = z("(pointer: coarse)");
1333
+ if (ne() || t && e) return I.FULLSCREEN;
1312
1334
  }
1313
- return F.DROPDOWN;
1314
- }, z = {
1315
- countrySelectorMode: F.AUTO,
1316
- allowedNumberTypes: [N.MOBILE, N.FIXED_LINE],
1335
+ return I.DROPDOWN;
1336
+ }, B = {
1337
+ countrySelectorMode: I.AUTO,
1338
+ allowedNumberTypes: [P.MOBILE, P.FIXED_LINE],
1317
1339
  allowNumberExtensions: !1,
1318
1340
  allowPhonewords: !1,
1341
+ classNames: {},
1319
1342
  containerClass: "",
1320
1343
  countryNameLocale: "en",
1321
1344
  countryNameOverrides: {},
@@ -1332,39 +1355,39 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1332
1355
  initialCountry: "",
1333
1356
  initialCountryLookup: null,
1334
1357
  loadUtils: null,
1335
- numberDisplayFormat: M.INTERNATIONAL,
1358
+ numberDisplayFormat: N.INTERNATIONAL,
1336
1359
  onlyCountries: null,
1337
- placeholderNumberPolicy: E.POLITE,
1338
- placeholderNumberType: N.MOBILE,
1360
+ placeholderNumberPolicy: O.POLITE,
1361
+ placeholderNumberType: P.MOBILE,
1339
1362
  searchInputClass: "",
1340
1363
  separateDialCode: !0,
1341
1364
  strictRejectAnimation: !0,
1342
1365
  showFlags: !0,
1343
1366
  strictMode: !0
1344
- }, B = (e) => JSON.stringify(e), V = (e) => !!e && typeof e == "object" && !Array.isArray(e), re = (e) => typeof e == "function", ie = (e) => {
1367
+ }, V = (e) => JSON.stringify(e), H = (e) => !!e && typeof e == "object" && !Array.isArray(e), ie = (e) => typeof e == "function", ae = (e) => {
1345
1368
  if (!e || typeof e != "object") return !1;
1346
1369
  let t = e;
1347
1370
  return t.nodeType === 1 && typeof t.tagName == "string" && typeof t.appendChild == "function";
1348
- }, ae = new Set(Object.values(E)), H = (e) => {
1371
+ }, oe = new Set(Object.values(O)), se = new Set(_), U = (e) => {
1349
1372
  console.warn(`[intl-tel-input] ${e}`);
1350
- }, U = (e, t, n) => {
1351
- H(`Option '${e}' must be ${t}; got ${B(n)}. Ignoring.`);
1352
- }, oe = (e, t) => {
1373
+ }, W = (e, t, n) => {
1374
+ U(`Option '${e}' must be ${t}; got ${V(n)}. Ignoring.`);
1375
+ }, ce = (e, t) => {
1353
1376
  let n = "an array of iso2 country code strings";
1354
- if (!Array.isArray(t)) return U(e, n, t), !1;
1377
+ if (!Array.isArray(t)) return W(e, n, t), !1;
1355
1378
  let r = [];
1356
1379
  for (let i of t) {
1357
- if (typeof i != "string") return U(e, n, t), !1;
1358
- m(i.toLowerCase()) ? r.push(i) : H(`Invalid iso2 code in '${e}': '${i}'. Skipping.`);
1380
+ if (typeof i != "string") return W(e, n, t), !1;
1381
+ m(i.toLowerCase()) ? r.push(i) : U(`Invalid iso2 code in '${e}': '${i}'. Skipping.`);
1359
1382
  }
1360
1383
  return r;
1361
- }, se = (e) => {
1384
+ }, le = (e) => {
1362
1385
  if (e === void 0) return {};
1363
- if (!V(e)) return H(`The second argument must be an options object; got ${B(e)}. Using defaults.`), {};
1386
+ if (!H(e)) return U(`The second argument must be an options object; got ${V(e)}. Using defaults.`), {};
1364
1387
  let t = {};
1365
1388
  for (let [n, r] of Object.entries(e)) {
1366
- if (!Object.hasOwn(z, n)) {
1367
- H(`Unknown option '${n}'. Ignoring.`);
1389
+ if (!Object.hasOwn(B, n)) {
1390
+ U(`Unknown option '${n}'. Ignoring.`);
1368
1391
  continue;
1369
1392
  }
1370
1393
  switch (n) {
@@ -1379,28 +1402,28 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1379
1402
  case "strictMode":
1380
1403
  case "strictRejectAnimation":
1381
1404
  if (typeof r != "boolean") {
1382
- U(n, "a boolean", r);
1405
+ W(n, "a boolean", r);
1383
1406
  break;
1384
1407
  }
1385
1408
  t[n] = r;
1386
1409
  break;
1387
1410
  case "countrySelectorMode":
1388
- if (typeof r != "string" || !D.includes(r)) {
1389
- U("countrySelectorMode", `one of ${D.map((e) => `"${e}"`).join(", ")}`, r);
1411
+ if (typeof r != "string" || !k.includes(r)) {
1412
+ W("countrySelectorMode", `one of ${k.map((e) => `"${e}"`).join(", ")}`, r);
1390
1413
  break;
1391
1414
  }
1392
1415
  t[n] = r;
1393
1416
  break;
1394
1417
  case "numberDisplayFormat":
1395
- if (typeof r != "string" || r === M.RFC3966 || !(r === M.E164 || r === M.INTERNATIONAL || r === M.NATIONAL)) {
1396
- U("numberDisplayFormat", "one of \"E164\", \"INTERNATIONAL\", \"NATIONAL\"", r);
1418
+ if (typeof r != "string" || r === N.RFC3966 || !(r === N.E164 || r === N.INTERNATIONAL || r === N.NATIONAL)) {
1419
+ W("numberDisplayFormat", "one of \"E164\", \"INTERNATIONAL\", \"NATIONAL\"", r);
1397
1420
  break;
1398
1421
  }
1399
1422
  t[n] = r;
1400
1423
  break;
1401
1424
  case "placeholderNumberPolicy":
1402
- if (typeof r != "string" || !ae.has(r)) {
1403
- U("placeholderNumberPolicy", `one of ${Array.from(ae).join(", ")}`, r);
1425
+ if (typeof r != "string" || !oe.has(r)) {
1426
+ W("placeholderNumberPolicy", `one of ${Array.from(oe).join(", ")}`, r);
1404
1427
  break;
1405
1428
  }
1406
1429
  t[n] = r;
@@ -1409,15 +1432,25 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1409
1432
  case "searchInputClass":
1410
1433
  case "countryNameLocale":
1411
1434
  if (typeof r != "string") {
1412
- U(n, "a string", r);
1435
+ W(n, "a string", r);
1413
1436
  break;
1414
1437
  }
1415
1438
  t[n] = r;
1416
1439
  break;
1440
+ case "classNames": {
1441
+ if (!H(r)) {
1442
+ W("classNames", "an object", r);
1443
+ break;
1444
+ }
1445
+ let e = {};
1446
+ for (let [t, n] of Object.entries(r)) se.has(t) ? typeof n == "string" ? e[t] = n.trim().replace(/\s+/g, " ") : W(`classNames.${t}`, "a string", n) : U(`Unknown slot '${t}' in 'classNames'. Valid slots: ${_.join(", ")}. Skipping.`);
1447
+ t[n] = e;
1448
+ break;
1449
+ }
1417
1450
  case "countryOrder":
1418
1451
  if (r === null) t[n] = r;
1419
1452
  else {
1420
- let e = oe(n, r);
1453
+ let e = ce(n, r);
1421
1454
  e !== !1 && (t[n] = e);
1422
1455
  }
1423
1456
  break;
@@ -1425,15 +1458,15 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1425
1458
  case "hiddenInputs":
1426
1459
  case "initialCountryLookup":
1427
1460
  case "loadUtils":
1428
- if (r !== null && !re(r)) {
1429
- U(n, "a function or null", r);
1461
+ if (r !== null && !ie(r)) {
1462
+ W(n, "a function or null", r);
1430
1463
  break;
1431
1464
  }
1432
1465
  t[n] = r;
1433
1466
  break;
1434
1467
  case "dropdownParent":
1435
- if (r !== null && !ie(r)) {
1436
- U("dropdownParent", "an HTMLElement or null", r);
1468
+ if (r !== null && !ae(r)) {
1469
+ W("dropdownParent", "an HTMLElement or null", r);
1437
1470
  break;
1438
1471
  }
1439
1472
  t[n] = r;
@@ -1442,40 +1475,40 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1442
1475
  case "onlyCountries":
1443
1476
  if (r === null) t[n] = r;
1444
1477
  else {
1445
- let e = oe(n, r);
1478
+ let e = ce(n, r);
1446
1479
  e !== !1 && (t[n] = e);
1447
1480
  }
1448
1481
  break;
1449
1482
  case "uiTranslations":
1450
- if (r && !V(r)) {
1451
- U("uiTranslations", "an object", r);
1483
+ if (r && !H(r)) {
1484
+ W("uiTranslations", "an object", r);
1452
1485
  break;
1453
1486
  }
1454
1487
  t[n] = r;
1455
1488
  break;
1456
1489
  case "countryNameOverrides":
1457
- if (r && !V(r)) {
1458
- U("countryNameOverrides", "an object", r);
1490
+ if (r && !H(r)) {
1491
+ W("countryNameOverrides", "an object", r);
1459
1492
  break;
1460
1493
  }
1461
1494
  t[n] = r;
1462
1495
  break;
1463
1496
  case "initialCountry": {
1464
1497
  if (typeof r != "string") {
1465
- U("initialCountry", "a string", r);
1498
+ W("initialCountry", "a string", r);
1466
1499
  break;
1467
1500
  }
1468
1501
  let e = r.toLowerCase();
1469
1502
  if (e && !m(e)) {
1470
- U("initialCountry", "a valid iso2 country code", r);
1503
+ W("initialCountry", "a valid iso2 country code", r);
1471
1504
  break;
1472
1505
  }
1473
1506
  t[n] = r;
1474
1507
  break;
1475
1508
  }
1476
1509
  case "placeholderNumberType":
1477
- if (typeof r != "string" || !k.includes(r)) {
1478
- U("placeholderNumberType", `one of ${k.join(", ")}`, r);
1510
+ if (typeof r != "string" || !j.includes(r)) {
1511
+ W("placeholderNumberType", `one of ${j.join(", ")}`, r);
1479
1512
  break;
1480
1513
  }
1481
1514
  t[n] = r;
@@ -1483,12 +1516,12 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1483
1516
  case "allowedNumberTypes":
1484
1517
  if (r !== null) {
1485
1518
  if (!Array.isArray(r)) {
1486
- U("allowedNumberTypes", "an array of number types or null", r);
1519
+ W("allowedNumberTypes", "an array of number types or null", r);
1487
1520
  break;
1488
1521
  }
1489
1522
  let e = !0;
1490
- for (let t of r) if (typeof t != "string" || !k.includes(t)) {
1491
- U("allowedNumberTypes", `an array of valid number types (${k.join(", ")})`, t), e = !1;
1523
+ for (let t of r) if (typeof t != "string" || !j.includes(t)) {
1524
+ W("allowedNumberTypes", `an array of valid number types (${j.join(", ")})`, t), e = !1;
1492
1525
  break;
1493
1526
  }
1494
1527
  e && (t[n] = r);
@@ -1497,22 +1530,22 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1497
1530
  }
1498
1531
  }
1499
1532
  return t;
1500
- }, ce = (e) => {
1533
+ }, ue = (e) => {
1501
1534
  e.initialCountry &&= e.initialCountry.toLowerCase(), e.onlyCountries?.length && (e.onlyCountries = e.onlyCountries.map((e) => e.toLowerCase())), e.excludeCountries?.length && (e.excludeCountries = e.excludeCountries.map((e) => e.toLowerCase())), e.countryOrder &&= e.countryOrder.map((e) => e.toLowerCase());
1502
- }, le = (e) => {
1503
- e.countrySelectorMode === F.AUTO && (e.countrySelectorMode = ne()), e.dropdownAlwaysOpen && (e.countrySelectorMode = F.DROPDOWN), e.countrySelectorMode === F.FULLSCREEN ? e.matchDropdownWidth = !1 : te() && (e.matchDropdownWidth = !0), e.onlyCountries?.length === 1 && (e.initialCountry = e.onlyCountries[0]), e.separateDialCode && e.numberDisplayFormat === M.NATIONAL && (e.numberDisplayFormat = M.INTERNATIONAL), e.countrySelectorMode !== F.OFF && !e.showFlags && !e.separateDialCode && e.numberDisplayFormat === M.NATIONAL && (e.numberDisplayFormat = M.INTERNATIONAL), e.uiTranslations = {
1504
- ...ee,
1535
+ }, de = (e) => {
1536
+ e.countrySelectorMode === I.AUTO && (e.countrySelectorMode = re()), e.dropdownAlwaysOpen && (e.countrySelectorMode = I.DROPDOWN), e.countrySelectorMode === I.FULLSCREEN ? e.matchDropdownWidth = !1 : ne() && (e.matchDropdownWidth = !0), e.onlyCountries?.length === 1 && (e.initialCountry = e.onlyCountries[0]), e.separateDialCode && e.numberDisplayFormat === N.NATIONAL && (e.numberDisplayFormat = N.INTERNATIONAL), e.countrySelectorMode !== I.OFF && !e.showFlags && !e.separateDialCode && e.numberDisplayFormat === N.NATIONAL && (e.numberDisplayFormat = N.INTERNATIONAL), e.uiTranslations = {
1537
+ ...te,
1505
1538
  ...e.uiTranslations
1506
1539
  };
1507
- }, W = (e) => e.replace(/\D/g, ""), G = (e = "") => e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), K = (e) => Object.keys(e).filter((t) => !!e[t]).join(" "), q = (e, t, n) => {
1540
+ }, G = (e) => e.replace(/\D/g, ""), fe = (e = "") => e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), pe = (e) => Object.keys(e).filter((t) => !!e[t]).join(" "), K = (e, t, n) => {
1508
1541
  let r = document.createElement(e);
1509
1542
  return t && Object.entries(t).forEach(([e, t]) => r.setAttribute(e, t)), n && n.appendChild(r), r;
1510
- }, ue = "http://www.w3.org/2000/svg", J = ([e, t, n]) => {
1511
- let r = document.createElementNS(ue, e);
1543
+ }, me = "http://www.w3.org/2000/svg", q = ([e, t, n]) => {
1544
+ let r = document.createElementNS(me, e);
1512
1545
  if (t) for (let e in t) r.setAttribute(e, String(t[e]));
1513
- if (n) for (let e of n) r.appendChild(J(e));
1546
+ if (n) for (let e of n) r.appendChild(q(e));
1514
1547
  return r;
1515
- }, de = () => J([
1548
+ }, he = () => q([
1516
1549
  "svg",
1517
1550
  {
1518
1551
  class: "iti__search-icon-svg",
@@ -1520,7 +1553,7 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1520
1553
  height: 14,
1521
1554
  viewBox: "0 0 24 24",
1522
1555
  focusable: "false",
1523
- [L.HIDDEN]: "true"
1556
+ [R.HIDDEN]: "true"
1524
1557
  },
1525
1558
  [["circle", {
1526
1559
  cx: 11,
@@ -1532,16 +1565,16 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1532
1565
  x2: 16.65,
1533
1566
  y2: 16.65
1534
1567
  }]]
1535
- ]), fe = (e) => {
1568
+ ]), ge = (e) => {
1536
1569
  let t = `iti-${e}-clear-mask`;
1537
- return J([
1570
+ return q([
1538
1571
  "svg",
1539
1572
  {
1540
1573
  class: "iti__search-clear-svg",
1541
1574
  width: 12,
1542
1575
  height: 12,
1543
1576
  viewBox: "0 0 16 16",
1544
- [L.HIDDEN]: "true",
1577
+ [R.HIDDEN]: "true",
1545
1578
  focusable: "false"
1546
1579
  },
1547
1580
  [[
@@ -1568,7 +1601,7 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1568
1601
  mask: `url(#${t})`
1569
1602
  }]]
1570
1603
  ]);
1571
- }, pe = () => J([
1604
+ }, _e = () => q([
1572
1605
  "svg",
1573
1606
  {
1574
1607
  class: "iti__country-check-svg",
@@ -1577,10 +1610,10 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1577
1610
  viewBox: "0 0 16 16",
1578
1611
  fill: "currentColor",
1579
1612
  focusable: "false",
1580
- [L.HIDDEN]: "true"
1613
+ [R.HIDDEN]: "true"
1581
1614
  },
1582
1615
  [["path", { d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z" }]]
1583
- ]), me = () => J([
1616
+ ]), J = () => q([
1584
1617
  "svg",
1585
1618
  {
1586
1619
  width: 256,
@@ -1589,7 +1622,7 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1589
1622
  class: "iti__globe-svg"
1590
1623
  },
1591
1624
  [["path", { d: "M508 213a240 240 0 0 0-449-87l-2 5-2 5c-8 14-13 30-17 46a65 65 0 0 1 56 4c16-10 35-19 56-27l9-3c-6 23-10 48-10 74h-16l4 6c3 4 5 8 6 13h6c0 22 3 44 8 65l2 10-25-10-4 5 12 18 9 3 6 2 8 3 9 26 1 2 16-7h1l-5-13-1-2c24 6 49 9 75 10v26l11 10 7 7v-30l1-13c22 0 44-3 65-8l10-2-21 48-1 1a317 317 0 0 1-14 23l-21 5h-2c6 16 7 33 1 50a240 240 0 0 0 211-265m-401-56-11 6c19-44 54-79 98-98-11 20-21 44-29 69-21 6-40 15-58 23m154 182v4c-29-1-57-6-81-13-7-25-12-52-13-81h94zm0-109h-94c1-29 6-56 13-81 24-7 52-12 81-13zm0-112c-22 1-44 4-65 8l-10 2 12-30 9-17 1-2a332 332 0 0 1 13-23c13-4 26-6 40-7zm187 69 6 4c4 12 6 25 6 38v1h-68c-1-26-4-51-10-74l48 20 1 1 14 8zm-14-44 10 20c-20-11-43-21-68-29-8-25-18-49-29-69 37 16 67 44 87 78M279 49h1c13 1 27 3 39 7l14 23 1 2a343 343 0 0 1 12 26l2 5 6 16c-23-6-48-9-74-10h-1zm0 87h1c29 1 56 6 81 13 7 24 12 51 12 80v1h-94zm2 207h-2v-94h95c-1 29-6 56-13 81-24 7-51 12-80 13m86 60-20 10c11-20 21-43 29-68 25-8 48-18 68-29-16 37-43 67-77 87m87-115-7 5-16 9-2 1a337 337 0 0 1-47 21c6-24 9-49 10-75h68c0 13-2 27-6 39" }], ["path", { d: "m261 428-2-2-22-21a40 40 0 0 0-32-11h-1a37 37 0 0 0-18 8l-1 1-4 2-2 2-5 4c-9-3-36-31-47-44s-32-45-34-55l3-2a151 151 0 0 0 11-9v-1a39 39 0 0 0 5-48l-3-3-11-19-3-4-5-7h-1l-3-3-4-3-5-2a35 35 0 0 0-16-3h-5c-4 1-14 5-24 11l-4 2-4 3-4 2c-9 8-17 17-18 27a380 380 0 0 0 212 259h3c12 0 25-10 36-21l10-12 6-11a39 39 0 0 0-8-40" }]]
1592
- ]), Y = (e) => G(e).replace(/[^\p{L}]+/gu, " ").trim(), he = (e) => {
1625
+ ]), Y = (e) => fe(e).replace(/[^\p{L}]+/gu, " ").trim(), ve = (e) => {
1593
1626
  let t = /* @__PURE__ */ new Map();
1594
1627
  for (let n of e) {
1595
1628
  let e = Y(n.name), r = e.split(" ").filter(Boolean), i = r.map((e) => e[0] || "").join("");
@@ -1601,8 +1634,8 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1601
1634
  });
1602
1635
  }
1603
1636
  return t;
1604
- }, ge = (e, t, n) => {
1605
- let r = G(n), i = Y(n), a = r !== "" && i === "", o = [], s = [], c = [], l = [], u = [], d = [], f = [];
1637
+ }, ye = (e, t, n) => {
1638
+ let r = fe(n), i = Y(n), a = r !== "" && i === "", o = [], s = [], c = [], l = [], u = [], d = [], f = [];
1606
1639
  for (let n of e) {
1607
1640
  let e = t.get(n.iso2);
1608
1641
  n.iso2 === r ? o.push(n) : !a && e.normalisedName.startsWith(i) ? s.push(n) : !a && e.normalisedName.includes(i) ? c.push(n) : r === n.dialCode || r === e.dialCodePlus ? l.push(n) : e.dialCodePlus.includes(r) ? u.push(n) : e.initials.includes(r) && d.push(n);
@@ -1630,14 +1663,14 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1630
1663
  ...d,
1631
1664
  ...f
1632
1665
  ];
1633
- }, _e = (e, t, n) => {
1666
+ }, be = (e, t, n) => {
1634
1667
  let r = Y(n);
1635
1668
  for (let n of e) {
1636
1669
  let { normalisedName: e } = t.get(n.iso2);
1637
1670
  if (e.startsWith(r)) return n;
1638
1671
  }
1639
1672
  return null;
1640
- }, ve = class e {
1673
+ }, xe = class e {
1641
1674
  #e;
1642
1675
  static toAscii(e) {
1643
1676
  return e ? e.replace(/[٠-٩]/g, (e) => String.fromCharCode(48 + (e.charCodeAt(0) - 1632))).replace(/[۰-۹]/g, (e) => String.fromCharCode(48 + (e.charCodeAt(0) - 1776))) : "";
@@ -1659,7 +1692,7 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1659
1692
  isAscii() {
1660
1693
  return !this.#e || this.#e === "ascii";
1661
1694
  }
1662
- }, ye = typeof CSS < "u" && typeof CSS.supports == "function" && CSS.supports("anchor-name: --x"), be = class {
1695
+ }, Se = typeof CSS < "u" && typeof CSS.supports == "function" && CSS.supports("anchor-name: --x"), Ce = class {
1663
1696
  #e;
1664
1697
  #t;
1665
1698
  #n;
@@ -1692,7 +1725,7 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1692
1725
  telInputEl;
1693
1726
  hadInitialPlaceholder;
1694
1727
  constructor(e, t, n) {
1695
- e.dataset[I.INSTANCE_ID] = n.toString(), this.telInputEl = e, this.#e = t, this.#t = n, this.hadInitialPlaceholder = !!e.getAttribute("placeholder"), this.#n = !!this.telInputEl.closest("[dir=rtl]"), this.#r = this.telInputEl.style.paddingLeft;
1728
+ e.dataset[L.INSTANCE_ID] = n.toString(), this.telInputEl = e, this.#e = t, this.#t = n, this.hadInitialPlaceholder = !!e.getAttribute("placeholder"), this.#n = !!this.telInputEl.closest("[dir=rtl]"), this.#r = this.telInputEl.style.paddingLeft;
1696
1729
  }
1697
1730
  static validateInput(e) {
1698
1731
  let t = e?.tagName;
@@ -1701,147 +1734,154 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1701
1734
  throw TypeError(`The first argument must be an HTMLInputElement, not ${t}`);
1702
1735
  }
1703
1736
  }
1737
+ #k(e, t) {
1738
+ let n = this.#e.classNames[e];
1739
+ return n ? `${t} ${n}` : t;
1740
+ }
1704
1741
  buildMarkup(e, t) {
1705
- this.#i = e, this.#a = t, this.telInputEl.classList.add("iti__tel-input"), this.telInputEl.hasAttribute("type") || this.telInputEl.setAttribute("type", "tel"), this.telInputEl.hasAttribute("autocomplete") || this.telInputEl.setAttribute("autocomplete", "tel"), this.telInputEl.hasAttribute("inputmode") || this.telInputEl.setAttribute("inputmode", "tel");
1706
- let n = this.#k();
1707
- this.#A(n), n.appendChild(this.telInputEl), this.#P(), this.#R(), this.#F(n), this.ensureDropdownWidthSet();
1742
+ this.#i = e, this.#a = t, this.telInputEl.classList.add(...this.#k("input", "iti__tel-input").split(" ")), this.telInputEl.hasAttribute("type") || this.telInputEl.setAttribute("type", "tel"), this.telInputEl.hasAttribute("autocomplete") || this.telInputEl.setAttribute("autocomplete", "tel"), this.telInputEl.hasAttribute("inputmode") || this.telInputEl.setAttribute("inputmode", "tel");
1743
+ let n = this.#A();
1744
+ this.#j(n), n.appendChild(this.telInputEl), this.#F(), this.#z(), this.#I(n), this.ensureDropdownWidthSet();
1708
1745
  }
1709
- #k() {
1710
- let { countrySelectorMode: e, showFlags: t, containerClass: n } = this.#e, r = q("div", { class: K({
1746
+ #A() {
1747
+ let { countrySelectorMode: e, showFlags: t, containerClass: n } = this.#e, r = pe({
1711
1748
  iti: !0,
1712
1749
  "iti--input-container": !0,
1713
- "iti--has-country-selector": e !== F.OFF,
1750
+ "iti--has-country-selector": e !== I.OFF,
1714
1751
  "iti--show-flags": t,
1715
- "iti--inline-country-selector": e !== F.FULLSCREEN,
1752
+ "iti--inline-country-selector": e !== I.FULLSCREEN,
1716
1753
  [n]: !!n
1717
- }) });
1718
- return this.#n && r.setAttribute("dir", "ltr"), this.telInputEl.before(r), r;
1754
+ }), i = K("div", { class: this.#k("container", r) });
1755
+ return this.#n && i.setAttribute("dir", "ltr"), this.telInputEl.before(i), i;
1719
1756
  }
1720
- #A(e) {
1721
- let { countrySelectorMode: t, separateDialCode: n, showFlags: r } = this.#e, i = t !== F.OFF;
1757
+ #j(e) {
1758
+ let { countrySelectorMode: t, separateDialCode: n, showFlags: r } = this.#e, i = t !== I.OFF;
1722
1759
  if (!i && !r && !n) return;
1723
- this.#l = q("div", { class: `iti__country-container ${_.V_HIDE}` }, e), i ? (this.#u = q("button", {
1760
+ this.#l = K("div", { class: this.#k("countryContainer", `iti__country-container ${v.V_HIDE}`) }, e), i ? (this.#u = K("button", {
1724
1761
  type: "button",
1725
- class: "iti__selected-country",
1726
- [L.EXPANDED]: "false",
1727
- [L.LABEL]: this.#e.uiTranslations.noCountrySelected,
1728
- [L.HASPOPUP]: "dialog",
1729
- [L.CONTROLS]: `iti-${this.#t}__country-selector`
1730
- }, this.#l), this.telInputEl.disabled && this.#u.setAttribute("disabled", "true")) : this.#u = q("div", { class: "iti__selected-country" }, this.#l);
1731
- let a = q("div", { class: "iti__selected-country-primary" }, this.#u);
1732
- this.#d = q("div", { class: _.FLAG }, a), i && (this.#p = q("div", {
1733
- class: "iti__arrow",
1734
- [L.HIDDEN]: "true"
1735
- }, a)), n && (this.#f = q("div", { class: "iti__selected-dial-code" }, this.#u)), i && this.#j();
1762
+ class: this.#k("selectedCountry", "iti__selected-country"),
1763
+ [R.EXPANDED]: "false",
1764
+ [R.LABEL]: this.#e.uiTranslations.noCountrySelected,
1765
+ [R.HASPOPUP]: "dialog",
1766
+ [R.CONTROLS]: `iti-${this.#t}__country-selector`
1767
+ }, this.#l), this.telInputEl.disabled && this.#u.setAttribute("disabled", "true")) : this.#u = K("div", { class: this.#k("selectedCountry", "iti__selected-country") }, this.#l);
1768
+ let a = K("div", { class: this.#k("selectedCountryPrimary", "iti__selected-country-primary") }, this.#u);
1769
+ this.#d = K("div", { class: this.#k("selectedFlag", v.FLAG) }, a), i && (this.#p = K("div", {
1770
+ class: this.#k("arrow", "iti__arrow"),
1771
+ [R.HIDDEN]: "true"
1772
+ }, a)), n && (this.#f = K("div", { class: this.#k("selectedDialCode", "iti__selected-dial-code") }, this.#u)), i && this.#M();
1736
1773
  }
1737
1774
  ensureDropdownWidthSet() {
1738
1775
  let { matchDropdownWidth: e, countrySelectorMode: t } = this.#e;
1739
- if (t === F.OFF || !e || this.#m.style.width) return;
1776
+ if (t === I.OFF || !e || this.#m.style.width) return;
1740
1777
  let n = this.telInputEl.offsetWidth;
1741
1778
  n > 0 && (this.#m.style.width = `${n}px`);
1742
1779
  }
1743
- #j() {
1744
- let { matchDropdownWidth: e, countrySelectorMode: t, countrySearch: n, uiTranslations: r, containerClass: i } = this.#e, a = t === F.FULLSCREEN, o = this.#M(), s = e ? "" : "iti--flexible-dropdown-width";
1745
- this.#m = q("div", {
1780
+ #M() {
1781
+ let { matchDropdownWidth: e, countrySelectorMode: t, countrySearch: n, uiTranslations: r, containerClass: i } = this.#e, a = t === I.FULLSCREEN, o = this.#N(), s = e ? "" : "iti--flexible-dropdown-width";
1782
+ if (this.#m = K("div", {
1746
1783
  id: `iti-${this.#t}__country-selector`,
1747
- class: `iti__country-selector ${_.HIDE} ${s}`,
1784
+ class: this.#k("countrySelector", `iti__country-selector ${v.HIDE} ${s}`),
1748
1785
  role: "dialog",
1749
- [L.MODAL]: "true"
1750
- }), this.#n && this.#m.setAttribute("dir", "rtl"), n && this.#N(), this.#v = q("ul", {
1751
- class: "iti__country-list",
1786
+ [R.MODAL]: "true"
1787
+ }), this.#n && this.#m.setAttribute("dir", "rtl"), n && this.#P(), this.#v = K("ul", {
1788
+ class: this.#k("countryList", "iti__country-list"),
1752
1789
  id: `iti-${this.#t}__country-listbox`,
1753
1790
  role: "listbox",
1754
- [L.LABEL]: r.countryListAriaLabel
1755
- }, this.#m), this.#I(), n && this.#H(), o ? (this.#C = q("div", { class: K({
1756
- iti: !0,
1757
- "iti--detached-country-selector": !0,
1758
- "iti--fullscreen-popup": a,
1759
- "iti--inline-country-selector": !a,
1760
- [i]: !!i
1761
- }) }), this.#C.appendChild(this.#m)) : this.#l.appendChild(this.#m);
1791
+ [R.LABEL]: r.countryListAriaLabel
1792
+ }, this.#m), this.#L(), n && this.#U(), o) {
1793
+ let e = pe({
1794
+ iti: !0,
1795
+ "iti--detached-country-selector": !0,
1796
+ "iti--fullscreen-popup": a,
1797
+ "iti--inline-country-selector": !a,
1798
+ [i]: !!i
1799
+ });
1800
+ this.#C = K("div", { class: this.#k("countrySelectorContainer", e) }), this.#C.appendChild(this.#m);
1801
+ } else this.#l.appendChild(this.#m);
1762
1802
  }
1763
- #M() {
1803
+ #N() {
1764
1804
  let { countrySelectorMode: e, dropdownParent: t } = this.#e;
1765
- return e === F.FULLSCREEN ? document.body : e === F.DROPDOWN ? t : null;
1805
+ return e === I.FULLSCREEN ? document.body : e === I.DROPDOWN ? t : null;
1766
1806
  }
1767
- #N() {
1768
- let { uiTranslations: e, searchInputClass: t } = this.#e, n = q("div", { class: "iti__search-input-wrapper" }, this.#m);
1769
- this.#h = q("span", {
1770
- class: "iti__search-icon",
1771
- [L.HIDDEN]: "true"
1772
- }, n), this.#h.appendChild(de()), this.#g = q("input", {
1807
+ #P() {
1808
+ let { uiTranslations: e, searchInputClass: t } = this.#e, n = K("div", { class: this.#k("searchWrapper", "iti__search-input-wrapper") }, this.#m);
1809
+ this.#h = K("span", {
1810
+ class: this.#k("searchIcon", "iti__search-icon"),
1811
+ [R.HIDDEN]: "true"
1812
+ }, n), this.#h.appendChild(he()), this.#g = K("input", {
1773
1813
  id: `iti-${this.#t}__search-input`,
1774
1814
  type: "search",
1775
- class: `iti__search-input ${t}`,
1815
+ class: this.#k("searchInput", `iti__search-input ${t}`),
1776
1816
  placeholder: e.searchPlaceholder,
1777
1817
  role: "combobox",
1778
- [L.EXPANDED]: "true",
1779
- [L.LABEL]: e.searchPlaceholder,
1780
- [L.CONTROLS]: `iti-${this.#t}__country-listbox`,
1781
- [L.AUTOCOMPLETE]: "list",
1818
+ [R.EXPANDED]: "true",
1819
+ [R.LABEL]: e.searchPlaceholder,
1820
+ [R.CONTROLS]: `iti-${this.#t}__country-listbox`,
1821
+ [R.AUTOCOMPLETE]: "list",
1782
1822
  autocomplete: "off"
1783
- }, n), this.#_ = q("button", {
1823
+ }, n), this.#_ = K("button", {
1784
1824
  type: "button",
1785
- class: `iti__search-clear ${_.HIDE}`,
1786
- [L.LABEL]: e.clearSearchAriaLabel,
1825
+ class: this.#k("searchClear", `iti__search-clear ${v.HIDE}`),
1826
+ [R.LABEL]: e.clearSearchAriaLabel,
1787
1827
  tabindex: "-1"
1788
- }, n), this.#_.appendChild(fe(this.#t)), this.#S = q("span", { class: "iti__a11y-text" }, this.#m), this.#x = q("div", {
1789
- class: `iti__no-results ${_.HIDE}`,
1790
- [L.HIDDEN]: "true"
1828
+ }, n), this.#_.appendChild(ge(this.#t)), this.#S = K("span", { class: "iti__a11y-text" }, this.#m), this.#x = K("div", {
1829
+ class: this.#k("noResults", `iti__no-results ${v.HIDE}`),
1830
+ [R.HIDDEN]: "true"
1791
1831
  }, this.#m), this.#x.textContent = e.searchEmptyState ?? null;
1792
1832
  }
1793
- #P() {
1794
- this.#l && (this.#L(), this.#l.classList.remove(_.V_HIDE));
1833
+ #F() {
1834
+ this.#l && (this.#R(), this.#l.classList.remove(v.V_HIDE));
1795
1835
  }
1796
- #F(e) {
1836
+ #I(e) {
1797
1837
  let { hiddenInputs: t } = this.#e;
1798
1838
  if (!t) return;
1799
1839
  let n = t(this.telInputEl.getAttribute("name") || "");
1800
1840
  if (n.phone) {
1801
1841
  let t = this.telInputEl.form?.querySelector(`input[name="${n.phone}"]`);
1802
- t ? this.#y = t : (this.#y = q("input", {
1842
+ t ? this.#y = t : (this.#y = K("input", {
1803
1843
  type: "hidden",
1804
1844
  name: n.phone
1805
1845
  }), e.appendChild(this.#y));
1806
1846
  }
1807
1847
  if (n.country) {
1808
1848
  let t = this.telInputEl.form?.querySelector(`input[name="${n.country}"]`);
1809
- t ? this.#b = t : (this.#b = q("input", {
1849
+ t ? this.#b = t : (this.#b = K("input", {
1810
1850
  type: "hidden",
1811
1851
  name: n.country
1812
1852
  }), e.appendChild(this.#b));
1813
1853
  }
1814
1854
  }
1815
- #I() {
1816
- let e = document.createDocumentFragment();
1817
- for (let t = 0; t < this.#i.length; t++) {
1818
- let n = this.#i[t], r = K({ [_.COUNTRY_ITEM]: !0 }), i = q("li", {
1819
- id: `iti-${this.#t}__item-${n.iso2}`,
1820
- class: r,
1855
+ #L() {
1856
+ let e = document.createDocumentFragment(), t = this.#k("countryListItem", v.COUNTRY_ITEM);
1857
+ for (let n = 0; n < this.#i.length; n++) {
1858
+ let r = this.#i[n], i = K("li", {
1859
+ id: `iti-${this.#t}__item-${r.iso2}`,
1860
+ class: t,
1821
1861
  tabindex: "-1",
1822
1862
  role: "option",
1823
- [L.SELECTED]: "false"
1863
+ [R.SELECTED]: "false"
1824
1864
  });
1825
- i.dataset[I.DIAL_CODE] = n.dialCode, i.dataset[I.ISO2] = n.iso2, this.#E.set(n.iso2, i), this.#e.showFlags && q("div", { class: `${_.FLAG} iti__${n.iso2}` }, i);
1826
- let a = q("span", { class: "iti__country-name" }, i);
1827
- a.textContent = `${n.name} `;
1828
- let o = q("span", { class: "iti__dial-code" }, a);
1829
- this.#n && o.setAttribute("dir", "ltr"), o.textContent = `(+${n.dialCode})`, e.appendChild(i);
1865
+ i.dataset[L.DIAL_CODE] = r.dialCode, i.dataset[L.ISO2] = r.iso2, this.#E.set(r.iso2, i), this.#e.showFlags && K("div", { class: this.#k("countryListItemFlag", `${v.FLAG} iti__${r.iso2}`) }, i);
1866
+ let a = K("span", { class: this.#k("countryName", "iti__country-name") }, i);
1867
+ a.textContent = `${r.name} `;
1868
+ let o = K("span", { class: this.#k("dialCode", "iti__dial-code") }, a);
1869
+ this.#n && o.setAttribute("dir", "ltr"), o.textContent = `(+${r.dialCode})`, e.appendChild(i);
1830
1870
  }
1831
1871
  this.#v.appendChild(e);
1832
1872
  }
1833
- #L() {
1873
+ #R() {
1834
1874
  if (this.#u) {
1835
- let e = this.#e.separateDialCode ? S.FALLBACK_SELECTED_COUNTRY_WITH_DIAL_WIDTH : S.FALLBACK_SELECTED_COUNTRY_NO_DIAL_WIDTH, t = (this.#u.offsetWidth || this.#z() || e) + S.INPUT_PADDING_EXTRA_LEFT;
1875
+ let e = this.#e.separateDialCode ? C.FALLBACK_SELECTED_COUNTRY_WITH_DIAL_WIDTH : C.FALLBACK_SELECTED_COUNTRY_NO_DIAL_WIDTH, t = (this.#u.offsetWidth || this.#B() || e) + C.INPUT_PADDING_EXTRA_LEFT;
1836
1876
  this.telInputEl.style.paddingLeft = `${t}px`;
1837
1877
  }
1838
1878
  }
1839
- #R() {
1879
+ #z() {
1840
1880
  !this.#u || typeof ResizeObserver > "u" || (this.#O = new ResizeObserver(() => {
1841
- this.#u?.offsetWidth && this.#L();
1881
+ this.#u?.offsetWidth && this.#R();
1842
1882
  }), this.#O.observe(this.#u));
1843
1883
  }
1844
- #z() {
1884
+ #B() {
1845
1885
  if (!this.telInputEl.parentNode) return 0;
1846
1886
  let e = document.body, t = this.telInputEl.parentNode.cloneNode(!1);
1847
1887
  t.style.visibility = "hidden", e.appendChild(t);
@@ -1852,61 +1892,61 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1852
1892
  let i = r.offsetWidth;
1853
1893
  return e.removeChild(t), i;
1854
1894
  }
1855
- #B() {
1895
+ #V() {
1856
1896
  if (this.#s !== void 0) return;
1857
- let { countrySearch: e, matchDropdownWidth: t } = this.#e, { height: n, width: r } = this.#V();
1897
+ let { countrySearch: e, matchDropdownWidth: t } = this.#e, { height: n, width: r } = this.#H();
1858
1898
  this.#s = n, e && (this.#m.style.height = `${n}px`, !t && r > 0 && (this.#m.style.width = `${r}px`));
1859
1899
  }
1860
- #V() {
1900
+ #H() {
1861
1901
  let e = document.body, t = this.#m, n = t.parentNode, r = t.nextSibling;
1862
- t.classList.remove(_.HIDE);
1863
- let i = q("div", { class: "iti iti--inline-country-selector" });
1902
+ t.classList.remove(v.HIDE);
1903
+ let i = K("div", { class: "iti iti--inline-country-selector" });
1864
1904
  i.appendChild(t), i.style.visibility = "hidden", e.appendChild(i);
1865
1905
  let a = t.offsetHeight, o = t.offsetWidth;
1866
- return e.removeChild(i), t.classList.add(_.HIDE), n && n.insertBefore(t, r), {
1867
- height: a > 0 ? a : S.FALLBACK_DROPDOWN_HEIGHT,
1906
+ return e.removeChild(i), t.classList.add(v.HIDE), n && n.insertBefore(t, r), {
1907
+ height: a > 0 ? a : C.FALLBACK_DROPDOWN_HEIGHT,
1868
1908
  width: o
1869
1909
  };
1870
1910
  }
1871
- #H() {
1911
+ #U() {
1872
1912
  let { uiTranslations: e } = this.#e, t = this.#v.childElementCount;
1873
1913
  this.#S.textContent = e.searchSummaryAria(t);
1874
1914
  }
1875
- #U(e) {
1915
+ #W(e) {
1876
1916
  let t;
1877
1917
  if (e === "") t = this.#i;
1878
1918
  else {
1879
- let n = ve.toAscii(e);
1880
- t = ge(this.#i, this.#a, n);
1919
+ let n = xe.toAscii(e);
1920
+ t = ye(this.#i, this.#a, n);
1881
1921
  }
1882
- this.#ie(t);
1922
+ this.#ae(t);
1883
1923
  }
1884
1924
  prefillSearchWithPlus() {
1885
- this.#g.value = "+", this.#g.focus(), this.#U("");
1925
+ this.#g.value = "+", this.#g.focus(), this.#W("");
1886
1926
  }
1887
- #W() {
1927
+ #G() {
1888
1928
  let e = this.#g.value.trim();
1889
- this.#U(e), this.#g.value ? this.#_.classList.remove(_.HIDE) : this.#_.classList.add(_.HIDE);
1929
+ this.#W(e), this.#g.value ? this.#_.classList.remove(v.HIDE) : this.#_.classList.add(v.HIDE);
1890
1930
  }
1891
- #G() {
1931
+ #K() {
1892
1932
  this.#o && clearTimeout(this.#o), this.#o = setTimeout(() => {
1893
- this.#W(), this.#o = null;
1894
- }, x.SEARCH_DEBOUNCE_MS);
1933
+ this.#G(), this.#o = null;
1934
+ }, S.SEARCH_DEBOUNCE_MS);
1895
1935
  }
1896
- #K() {
1897
- this.#g.value = "", this.#g.focus(), this.#W();
1936
+ #q() {
1937
+ this.#g.value = "", this.#g.focus(), this.#G();
1898
1938
  }
1899
- #q(e) {
1939
+ #J(e) {
1900
1940
  let t = this.#v, n = t.getBoundingClientRect(), r = e.getBoundingClientRect(), i = r.top - n.top + t.scrollTop;
1901
1941
  r.top < n.top ? t.scrollTop = i : r.bottom > n.bottom && (t.scrollTop = i - n.height + r.height);
1902
1942
  }
1903
- #J(e, t = !0) {
1904
- if (this.#T?.classList.remove(_.HIGHLIGHT), e) {
1905
- if (e.classList.add(_.HIGHLIGHT), this.#e.countrySearch) {
1943
+ #Y(e, t = !0) {
1944
+ if (this.#T?.classList.remove(v.HIGHLIGHT), e) {
1945
+ if (e.classList.add(v.HIGHLIGHT), this.#e.countrySearch) {
1906
1946
  let t = e.getAttribute("id") || "";
1907
- this.#g.setAttribute(L.ACTIVE_DESCENDANT, t);
1947
+ this.#g.setAttribute(R.ACTIVE_DESCENDANT, t);
1908
1948
  }
1909
- t && this.#q(e), this.#T = e;
1949
+ t && this.#J(e), this.#T = e;
1910
1950
  } else this.#T = null;
1911
1951
  }
1912
1952
  bindHiddenInputSubmitListener(e, t, n) {
@@ -1923,147 +1963,147 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
1923
1963
  !this.isCountrySelectorOpen() && !this.telInputEl.disabled && !this.telInputEl.readOnly && t();
1924
1964
  }, { signal: e }), this.#l.addEventListener("keydown", (e) => {
1925
1965
  let r = [
1926
- v.ARROW_UP,
1927
- v.ARROW_DOWN,
1928
- v.SPACE,
1929
- v.ENTER
1966
+ y.ARROW_UP,
1967
+ y.ARROW_DOWN,
1968
+ y.SPACE,
1969
+ y.ENTER
1930
1970
  ];
1931
- !this.isCountrySelectorOpen() && r.includes(e.key) && (e.preventDefault(), e.stopPropagation(), t()), e.key === v.TAB && n();
1971
+ !this.isCountrySelectorOpen() && r.includes(e.key) && (e.preventDefault(), e.stopPropagation(), t()), e.key === y.TAB && n();
1932
1972
  }, { signal: e });
1933
1973
  }
1934
1974
  openCountrySelector(e, t) {
1935
1975
  let { countrySearch: n, dropdownAlwaysOpen: r } = this.#e;
1936
- if (this.#D = new AbortController(), this.#e.countrySelectorMode !== F.FULLSCREEN && this.#B(), this.ensureDropdownWidthSet(), this.#C) this.#oe();
1976
+ if (this.#D = new AbortController(), this.#e.countrySelectorMode !== I.FULLSCREEN && this.#V(), this.ensureDropdownWidthSet(), this.#C) this.#se();
1937
1977
  else {
1938
- let e = this.#ae(), t = this.telInputEl.offsetHeight + S.DROPDOWN_MARGIN;
1978
+ let e = this.#oe(), t = this.telInputEl.offsetHeight + C.DROPDOWN_MARGIN;
1939
1979
  e ? this.#m.style.top = `${t}px` : this.#m.style.bottom = `${t}px`;
1940
1980
  }
1941
- this.#m.classList.remove(_.HIDE), this.#u.setAttribute(L.EXPANDED, "true");
1981
+ this.#m.classList.remove(v.HIDE), this.#u.setAttribute(R.EXPANDED, "true");
1942
1982
  let i = this.#w ?? this.#v.firstElementChild;
1943
- i && this.#J(i), n && !r && this.#g.focus(), this.#e.countrySelectorMode === F.FULLSCREEN && this.#C && window.visualViewport && window.visualViewport.addEventListener("resize", () => {
1944
- this.#ce(), this.#T && this.#q(this.#T);
1945
- }, { signal: this.#D.signal }), this.#p.classList.add(_.ARROW_UP), this.#Y(e, t);
1983
+ i && this.#Y(i), n && !r && this.#g.focus(), this.#e.countrySelectorMode === I.FULLSCREEN && this.#C && window.visualViewport && window.visualViewport.addEventListener("resize", () => {
1984
+ this.#le(), this.#T && this.#J(this.#T);
1985
+ }, { signal: this.#D.signal }), this.#p.classList.add(v.ARROW_UP), this.#X(e, t);
1946
1986
  }
1947
- #Y(e, t) {
1987
+ #X(e, t) {
1948
1988
  let n = this.#D.signal;
1949
- this.#X(n), this.#Z(n, e), this.#e.dropdownAlwaysOpen || this.#Q(n, t), this.#$(n, e, t), this.#e.countrySearch && this.#ee(n), this.#e.countrySelectorMode === F.DROPDOWN && this.#e.dropdownParent && !ye && document.addEventListener("scroll", t, {
1989
+ this.#Z(n), this.#Q(n, e), this.#e.dropdownAlwaysOpen || this.#$(n, t), this.#ee(n, e, t), this.#e.countrySearch && this.#te(n), this.#e.countrySelectorMode === I.DROPDOWN && this.#e.dropdownParent && !Se && document.addEventListener("scroll", t, {
1950
1990
  signal: n,
1951
1991
  capture: !0,
1952
1992
  passive: !0
1953
1993
  });
1954
1994
  }
1955
- #X(e) {
1995
+ #Z(e) {
1956
1996
  this.#v.addEventListener("mouseover", (e) => {
1957
- let t = e.target?.closest(`.${_.COUNTRY_ITEM}`);
1958
- t && this.#J(t, !1);
1997
+ let t = e.target?.closest(`.${v.COUNTRY_ITEM}`);
1998
+ t && this.#Y(t, !1);
1959
1999
  }, { signal: e });
1960
2000
  }
1961
- #Z(e, t) {
2001
+ #Q(e, t) {
1962
2002
  this.#v.addEventListener("click", (e) => {
1963
- let n = e.target?.closest(`.${_.COUNTRY_ITEM}`);
2003
+ let n = e.target?.closest(`.${v.COUNTRY_ITEM}`);
1964
2004
  n && t(n);
1965
2005
  }, { signal: e });
1966
2006
  }
1967
- #Q(e, t) {
2007
+ #$(e, t) {
1968
2008
  setTimeout(() => {
1969
2009
  document.documentElement.addEventListener("click", (e) => {
1970
2010
  this.#m.contains(e.target) || t();
1971
2011
  }, { signal: e });
1972
2012
  }, 0);
1973
2013
  }
1974
- #$(e, t, n) {
2014
+ #ee(e, t, n) {
1975
2015
  let r = "", i = null, a = (e) => {
1976
2016
  [
1977
- v.ARROW_UP,
1978
- v.ARROW_DOWN,
1979
- v.ENTER,
1980
- v.ESC
1981
- ].includes(e.key) && (e.preventDefault(), e.stopPropagation(), e.key === v.ARROW_UP || e.key === v.ARROW_DOWN ? this.#ne(e.key) : e.key === v.ENTER && !e.isComposing ? t(this.#T) : e.key === v.ESC && (n(), this.#u.focus())), !this.#e.countrySearch && b.HIDDEN_SEARCH_CHAR.test(e.key) && (e.stopPropagation(), i && clearTimeout(i), r += e.key.toLowerCase(), this.#te(r), i = setTimeout(() => {
2017
+ y.ARROW_UP,
2018
+ y.ARROW_DOWN,
2019
+ y.ENTER,
2020
+ y.ESC
2021
+ ].includes(e.key) && (e.preventDefault(), e.stopPropagation(), e.key === y.ARROW_UP || e.key === y.ARROW_DOWN ? this.#re(e.key) : e.key === y.ENTER && !e.isComposing ? t(this.#T) : e.key === y.ESC && (n(), this.#u.focus())), !this.#e.countrySearch && x.HIDDEN_SEARCH_CHAR.test(e.key) && (e.stopPropagation(), i && clearTimeout(i), r += e.key.toLowerCase(), this.#ne(r), i = setTimeout(() => {
1982
2022
  r = "";
1983
- }, x.HIDDEN_SEARCH_RESET_MS));
2023
+ }, S.HIDDEN_SEARCH_RESET_MS));
1984
2024
  };
1985
2025
  this.#u?.addEventListener("keydown", a, { signal: e }), this.#m?.addEventListener("keydown", a, { signal: e });
1986
2026
  }
1987
- #ee(e) {
1988
- this.#g.addEventListener("input", () => this.#G(), { signal: e }), this.#_.addEventListener("click", () => this.#K(), { signal: e });
1989
- }
1990
2027
  #te(e) {
1991
- let t = _e(this.#i, this.#a, e);
2028
+ this.#g.addEventListener("input", () => this.#K(), { signal: e }), this.#_.addEventListener("click", () => this.#q(), { signal: e });
2029
+ }
2030
+ #ne(e) {
2031
+ let t = be(this.#i, this.#a, e);
1992
2032
  if (t) {
1993
2033
  let e = this.#E.get(t.iso2);
1994
- this.#J(e);
2034
+ this.#Y(e);
1995
2035
  }
1996
2036
  }
1997
- #ne(e) {
1998
- let t = e === v.ARROW_UP ? this.#T?.previousElementSibling : this.#T?.nextElementSibling;
1999
- !t && this.#v.childElementCount > 1 && (t = e === v.ARROW_UP ? this.#v.lastElementChild : this.#v.firstElementChild), t && this.#J(t);
2000
- }
2001
2037
  #re(e) {
2002
- if (this.#w && this.#w.dataset[I.ISO2] !== e && (this.#w.setAttribute(L.SELECTED, "false"), this.#w.querySelector(".iti__country-check")?.remove(), this.#w = null), e && !this.#w) {
2038
+ let t = e === y.ARROW_UP ? this.#T?.previousElementSibling : this.#T?.nextElementSibling;
2039
+ !t && this.#v.childElementCount > 1 && (t = e === y.ARROW_UP ? this.#v.lastElementChild : this.#v.firstElementChild), t && this.#Y(t);
2040
+ }
2041
+ #ie(e) {
2042
+ if (this.#w && this.#w.dataset[L.ISO2] !== e && (this.#w.setAttribute(R.SELECTED, "false"), this.#w.querySelector(".iti__country-check")?.remove(), this.#w = null), e && !this.#w) {
2003
2043
  let t = this.#v.querySelector(`[data-iso2="${e}"]`);
2004
- t && (t.setAttribute(L.SELECTED, "true"), q("span", {
2005
- class: "iti__country-check",
2006
- [L.HIDDEN]: "true"
2007
- }, t).appendChild(pe()), this.#w = t, this.#e.dropdownAlwaysOpen && this.#J(t));
2044
+ t && (t.setAttribute(R.SELECTED, "true"), K("span", {
2045
+ class: this.#k("countryCheck", "iti__country-check"),
2046
+ [R.HIDDEN]: "true"
2047
+ }, t).appendChild(_e()), this.#w = t, this.#e.dropdownAlwaysOpen && this.#Y(t));
2008
2048
  }
2009
2049
  }
2010
- #ie(e) {
2050
+ #ae(e) {
2011
2051
  this.#v.replaceChildren();
2012
2052
  let t = !0;
2013
2053
  for (let n of e) {
2014
2054
  let e = this.#E.get(n.iso2);
2015
- e && (this.#v.appendChild(e), t &&= (this.#J(e, !1), !1));
2055
+ e && (this.#v.appendChild(e), t &&= (this.#Y(e, !1), !1));
2016
2056
  }
2017
- t ? (this.#J(null), this.#x && this.#x.classList.remove(_.HIDE)) : this.#x && this.#x.classList.add(_.HIDE), this.#v.scrollTop = 0, this.#H();
2057
+ t ? (this.#Y(null), this.#x && this.#x.classList.remove(v.HIDE)) : this.#x && this.#x.classList.add(v.HIDE), this.#v.scrollTop = 0, this.#U();
2018
2058
  }
2019
2059
  closeCountrySelector() {
2020
2060
  let { countrySearch: e } = this.#e;
2021
- this.#D.abort(), this.#D = null, this.#m.classList.add(_.HIDE), this.#u.setAttribute(L.EXPANDED, "false"), e && (this.#g.removeAttribute(L.ACTIVE_DESCENDANT), this.#g.value = "", this.#W(), this.#T &&= (this.#T.classList.remove(_.HIGHLIGHT), null)), this.#p.classList.remove(_.ARROW_UP), this.#C ? (this.#C.remove(), this.#C.style.top = "", this.#C.style.bottom = "", this.#C.style.paddingLeft = "", this.#C.style.paddingRight = "") : (this.#m.style.top = "", this.#m.style.bottom = "");
2061
+ this.#D.abort(), this.#D = null, this.#m.classList.add(v.HIDE), this.#u.setAttribute(R.EXPANDED, "false"), e && (this.#g.removeAttribute(R.ACTIVE_DESCENDANT), this.#g.value = "", this.#G(), this.#T &&= (this.#T.classList.remove(v.HIGHLIGHT), null)), this.#p.classList.remove(v.ARROW_UP), this.#C ? (this.#C.remove(), this.#C.style.top = "", this.#C.style.bottom = "", this.#C.style.paddingLeft = "", this.#C.style.paddingRight = "") : (this.#m.style.top = "", this.#m.style.bottom = "");
2022
2062
  }
2023
- #ae() {
2063
+ #oe() {
2024
2064
  if (this.#e.dropdownAlwaysOpen) return !0;
2025
2065
  let e = this.telInputEl.getBoundingClientRect(), t = e.top, n = window.innerHeight - e.bottom;
2026
2066
  return n >= this.#s || n >= t;
2027
2067
  }
2028
- #oe() {
2029
- let e = this.#e.countrySelectorMode === F.FULLSCREEN, t = this.#M();
2068
+ #se() {
2069
+ let e = this.#e.countrySelectorMode === I.FULLSCREEN, t = this.#N();
2030
2070
  if (e) {
2031
- if (window.innerWidth >= S.NARROW_VIEWPORT_WIDTH) {
2071
+ if (window.innerWidth >= C.NARROW_VIEWPORT_WIDTH) {
2032
2072
  let e = this.telInputEl.getBoundingClientRect();
2033
2073
  this.#C.style.paddingLeft = `${e.left}px`, this.#C.style.paddingRight = `${window.innerWidth - e.right}px`;
2034
2074
  }
2035
- } else this.#se();
2036
- if (!e && !ye) {
2075
+ } else this.#ce();
2076
+ if (!e && !Se) {
2037
2077
  let e = this.telInputEl.getBoundingClientRect();
2038
- this.#C.style.left = `${e.left}px`, this.#ae() ? this.#C.style.top = `${e.bottom + S.DROPDOWN_MARGIN}px` : (this.#C.style.top = "unset", this.#C.style.bottom = `${window.innerHeight - e.top + S.DROPDOWN_MARGIN}px`);
2078
+ this.#C.style.left = `${e.left}px`, this.#oe() ? this.#C.style.top = `${e.bottom + C.DROPDOWN_MARGIN}px` : (this.#C.style.top = "unset", this.#C.style.bottom = `${window.innerHeight - e.top + C.DROPDOWN_MARGIN}px`);
2039
2079
  }
2040
2080
  t.appendChild(this.#C);
2041
2081
  }
2042
- #se() {
2082
+ #ce() {
2043
2083
  if (this.#c) return;
2044
2084
  this.#c = !0;
2045
2085
  let e = `--iti-anchor-${this.#t}`, t = getComputedStyle(this.telInputEl).anchorName;
2046
2086
  this.telInputEl.style.anchorName = t && t !== "none" ? `${t}, ${e}` : e, this.#C.style.positionAnchor = e;
2047
2087
  }
2048
- #ce() {
2088
+ #le() {
2049
2089
  let e = window.visualViewport;
2050
2090
  if (!e || !this.#C) return;
2051
2091
  let t = window.innerHeight - e.height;
2052
2092
  this.#C.style.bottom = `${t}px`;
2053
2093
  }
2054
2094
  isCountrySelectorOpen() {
2055
- return !this.#m.classList.contains(_.HIDE);
2095
+ return !this.#m.classList.contains(v.HIDE);
2056
2096
  }
2057
2097
  setLoading(e) {
2058
- this.#d.classList.toggle(_.LOADING, e);
2098
+ this.#d.classList.toggle(v.LOADING, e);
2059
2099
  }
2060
2100
  playStrictRejectAnimation() {
2061
2101
  if (!this.#e.strictRejectAnimation) return;
2062
2102
  let e = this.telInputEl.parentElement;
2063
- e && (e.classList.remove(_.STRICT_REJECT_ANIMATION), e.offsetWidth, e.classList.add(_.STRICT_REJECT_ANIMATION), e.addEventListener("animationend", () => e.classList.remove(_.STRICT_REJECT_ANIMATION), { once: !0 }));
2103
+ e && (e.classList.remove(v.STRICT_REJECT_ANIMATION), e.offsetWidth, e.classList.add(v.STRICT_REJECT_ANIMATION), e.addEventListener("animationend", () => e.classList.remove(v.STRICT_REJECT_ANIMATION), { once: !0 }));
2064
2104
  }
2065
2105
  isLoading() {
2066
- return this.#d.classList.contains(_.LOADING);
2106
+ return this.#d.classList.contains(v.LOADING);
2067
2107
  }
2068
2108
  setDisabled(e) {
2069
2109
  this.telInputEl.disabled = e, this.#u && (e ? this.#u.setAttribute("disabled", "true") : this.#u.removeAttribute("disabled"));
@@ -2073,24 +2113,24 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2073
2113
  }
2074
2114
  setSelectedCountry(e) {
2075
2115
  let { countrySelectorMode: t, showFlags: n, separateDialCode: r, uiTranslations: i } = this.#e, a = e?.name, o = e?.dialCode, s = e?.iso2 ?? "";
2076
- if (t !== F.OFF && this.#re(s), this.#u) {
2077
- let e = s && n ? `${_.FLAG} iti__${s}` : `${_.FLAG} ${_.GLOBE}`, t, r, c = null;
2078
- s ? (r = a, t = i.selectedCountryAriaLabel.replace("${countryName}", a).replace("${dialCode}", `+${o}`), n || (c = me())) : (r = i.noCountrySelected, t = i.noCountrySelected, c = me()), this.#d.className = e, this.#u.setAttribute("title", r), this.#u.setAttribute(L.LABEL, t), c ? this.#d.replaceChildren(c) : this.#d.replaceChildren();
2116
+ if (t !== I.OFF && this.#ie(s), this.#u) {
2117
+ let e = this.#k("selectedFlag", s && n ? `${v.FLAG} iti__${s}` : `${v.FLAG} ${v.GLOBE}`), t, r, c = null;
2118
+ s ? (r = a, t = i.selectedCountryAriaLabel.replace("${countryName}", a).replace("${dialCode}", `+${o}`), n || (c = J())) : (r = i.noCountrySelected, t = i.noCountrySelected, c = J()), this.#d.className = e, this.#u.setAttribute("title", r), this.#u.setAttribute(R.LABEL, t), c ? this.#d.replaceChildren(c) : this.#d.replaceChildren();
2079
2119
  }
2080
2120
  if (r) {
2081
2121
  let e = o ? `+${o}` : "";
2082
- this.#f.textContent = e, this.#L();
2122
+ this.#f.textContent = e, this.#R();
2083
2123
  }
2084
2124
  }
2085
2125
  destroy() {
2086
- this.telInputEl.iti = void 0, delete this.telInputEl.dataset[I.INSTANCE_ID], this.#O?.disconnect(), this.telInputEl.style.paddingLeft = this.#r;
2126
+ this.telInputEl.iti = void 0, delete this.telInputEl.dataset[L.INSTANCE_ID], this.#O?.disconnect(), this.telInputEl.style.paddingLeft = this.#r;
2087
2127
  let e = this.telInputEl.parentNode;
2088
2128
  e && (e.before(this.telInputEl), e.remove()), this.#E.clear();
2089
2129
  }
2090
- }, xe = (e) => {
2130
+ }, we = (e) => {
2091
2131
  let { onlyCountries: t, excludeCountries: n } = e;
2092
2132
  return t?.length ? h.filter((e) => t.includes(e.iso2)) : n?.length ? h.filter((e) => !n.includes(e.iso2)) : [...h];
2093
- }, Se = (e, t) => {
2133
+ }, Te = (e, t) => {
2094
2134
  let { countryNameLocale: n, countryNameOverrides: r, uiTranslations: i } = t, a = i?.countryNames, o;
2095
2135
  try {
2096
2136
  o = typeof Intl < "u" && typeof Intl.DisplayNames == "function" ? new Intl.DisplayNames(n, { type: "region" }) : null;
@@ -2098,7 +2138,7 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2098
2138
  console.error(e), o = null;
2099
2139
  }
2100
2140
  for (let t of e) t.name = r[t.iso2] || a?.[t.iso2] || o?.of(t.iso2.toUpperCase()) || "";
2101
- }, Ce = (e) => {
2141
+ }, Ee = (e) => {
2102
2142
  let t = /* @__PURE__ */ new Set(), n = 0, r = {}, i = (e, t) => {
2103
2143
  if (!e || !t) return;
2104
2144
  t.length > n && (n = t.length), Object.hasOwn(r, t) || (r[t] = []);
@@ -2127,7 +2167,7 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2127
2167
  dialCodeMaxLength: n,
2128
2168
  dialCodeToIso2Map: r
2129
2169
  };
2130
- }, we = (e, t) => {
2170
+ }, De = (e, t) => {
2131
2171
  let { countryOrder: n } = t;
2132
2172
  e.sort((e, t) => {
2133
2173
  if (n) {
@@ -2136,7 +2176,7 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2136
2176
  }
2137
2177
  return e.name.localeCompare(t.name);
2138
2178
  });
2139
- }, Te = /* @__PURE__ */ new Set([
2179
+ }, Oe = /* @__PURE__ */ new Set([
2140
2180
  "800",
2141
2181
  "808",
2142
2182
  "870",
@@ -2145,17 +2185,17 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2145
2185
  "883",
2146
2186
  "888",
2147
2187
  "979"
2148
- ]), Ee = (e) => {
2149
- let t = W(e).slice(0, 3);
2150
- return e.startsWith("+") && Te.has(t);
2151
- }, De = (e, t, n, r) => {
2188
+ ]), ke = (e) => {
2189
+ let t = G(e).slice(0, 3);
2190
+ return e.startsWith("+") && Oe.has(t);
2191
+ }, Ae = (e, t, n, r) => {
2152
2192
  if (!n || !t) return e;
2153
2193
  let i = `+${r.dialCode}`, a = e[i.length] === " " || e[i.length] === "-" ? i.length + 1 : i.length;
2154
2194
  return e.substring(a);
2155
- }, Oe = (e, t, n, r, i) => {
2195
+ }, je = (e, t, n, r, i) => {
2156
2196
  let a = n ? n.formatNumberAsYouType(e, r?.iso2) : e, o = r?.dialCode;
2157
2197
  return i && t.charAt(0) !== "+" && a.includes(`+${o}`) ? (a.split(`+${o}`)[1] || "").trim() : a;
2158
- }, ke = (e, t, n, r) => {
2198
+ }, Me = (e, t, n, r) => {
2159
2199
  if (n === 0 && !r) return 0;
2160
2200
  let i = 0;
2161
2201
  for (let n = 0; n < t.length; n++) {
@@ -2163,7 +2203,7 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2163
2203
  if (r && i === e + 1) return n;
2164
2204
  }
2165
2205
  return t.length;
2166
- }, Ae = /* @__PURE__ */ new Set([
2206
+ }, Ne = /* @__PURE__ */ new Set([
2167
2207
  "800",
2168
2208
  "822",
2169
2209
  "833",
@@ -2181,16 +2221,16 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2181
2221
  "887",
2182
2222
  "888",
2183
2223
  "889"
2184
- ]), je = (e) => {
2185
- let t = W(e);
2186
- if (t.startsWith(C.NANP) && t.length >= 4) {
2224
+ ]), Pe = (e) => {
2225
+ let t = G(e);
2226
+ if (t.startsWith(w.NANP) && t.length >= 4) {
2187
2227
  let e = t.substring(1, 4);
2188
- return Ae.has(e);
2228
+ return Ne.has(e);
2189
2229
  }
2190
2230
  return !1;
2191
- }, Me = 0, X = (e) => {
2231
+ }, Fe = 0, X = (e) => {
2192
2232
  if (!Q.utils) throw Error(`intlTelInput.utils is required for ${e}(). See: https://intl-tel-input.com/docs/utils`);
2193
- }, Ne = () => {
2233
+ }, Ie = () => {
2194
2234
  let e, t;
2195
2235
  return {
2196
2236
  promise: new Promise((n, r) => {
@@ -2222,13 +2262,13 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2222
2262
  #_;
2223
2263
  #v;
2224
2264
  constructor(e, t = {}) {
2225
- this.id = Me++, be.validateInput(e);
2226
- let n = se(t);
2265
+ this.id = Fe++, Ce.validateInput(e);
2266
+ let n = le(t);
2227
2267
  this.#t = {
2228
- ...z,
2268
+ ...B,
2229
2269
  ...n
2230
- }, ce(this.#t), le(this.#t), this.#e = new be(e, this.#t, this.id), this.#n = typeof navigator < "u" && /Android/i.test(navigator.userAgent), this.#m = new ve(e.value), this.promise = this.#x(this.#t), this.#r = xe(this.#t);
2231
- let { dialCodes: r, dialCodeMaxLength: i, dialCodeToIso2Map: a } = Ce(this.#r);
2270
+ }, ue(this.#t), de(this.#t), this.#e = new Ce(e, this.#t, this.id), this.#n = typeof navigator < "u" && /Android/i.test(navigator.userAgent), this.#m = new xe(e.value), this.promise = this.#x(this.#t), this.#r = we(this.#t);
2271
+ let { dialCodes: r, dialCodeMaxLength: i, dialCodeToIso2Map: a } = Ee(this.#r);
2232
2272
  this.#o = r, this.#i = i, this.#a = a, this.#s = new Map(this.#r.map((e) => [e.iso2, e])), this.#S();
2233
2273
  }
2234
2274
  #y() {
@@ -2240,20 +2280,20 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2240
2280
  }
2241
2281
  #x(e) {
2242
2282
  let { initialCountry: t, initialCountryLookup: n, loadUtils: r } = e, i = !t && !!n, a = !!r && !Q.utils;
2243
- return i && (this.#_ = Ne()), a && (this.#v = Ne()), Promise.all([this.#_?.promise, this.#v?.promise]).then(() => {});
2283
+ return i && (this.#_ = Ie()), a && (this.#v = Ie()), Promise.all([this.#_?.promise, this.#v?.promise]).then(() => {});
2244
2284
  }
2245
2285
  #S() {
2246
2286
  this.#p = new AbortController(), this.#C(), this.#e.buildMarkup(this.#r, this.#c), this.#w(), this.#T(), this.#E(), this.#t.dropdownAlwaysOpen && this.openCountrySelector();
2247
2287
  }
2248
2288
  #C() {
2249
- Se(this.#r, this.#t), we(this.#r, this.#t), this.#c = he(this.#r);
2289
+ Te(this.#r, this.#t), De(this.#r, this.#t), this.#c = ve(this.#r);
2250
2290
  }
2251
2291
  #w(e = !1) {
2252
- let t = this.#e.telInputEl.getAttribute("value"), n = this.#m.normalise(t ?? ""), r = this.#y(), i = n && n.startsWith("+") && (!r || !r.startsWith("+")) ? n : r, a = this.#ne(i), o = je(i), { initialCountry: s, initialCountryLookup: c } = this.#t, l = !s && !!c, u = l && Q.autoCountry ? Q.autoCountry : s, d = l && !e && !Q.autoCountry, f = m(u);
2253
- a ? o ? f ? this.#X(u) : d || this.#X(T.ISO2) : (f && this.#X(u), this.#K(i)) : f ? this.#X(u) : d || this.#X(""), i && this.#G(i);
2292
+ let t = this.#e.telInputEl.getAttribute("value"), n = this.#m.normalise(t ?? ""), r = this.#y(), i = n && n.startsWith("+") && (!r || !r.startsWith("+")) ? n : r, a = this.#re(i), o = Pe(i), { initialCountry: s, initialCountryLookup: c } = this.#t, l = !s && !!c, u = l && Q.autoCountry ? Q.autoCountry : s, d = l && !e && !Q.autoCountry, f = m(u);
2293
+ a ? o ? f ? this.#Z(u) : d || this.#Z(D.ISO2) : (f && this.#Z(u), this.#q(i)) : f ? this.#Z(u) : d || this.#Z(""), i && this.#K(i);
2254
2294
  }
2255
2295
  #T() {
2256
- this.#A(), this.#t.countrySelectorMode !== F.OFF && this.#e.bindAllInitialCountrySelectorListeners(this.#p.signal, () => this.openCountrySelector(), () => this.#ee()), this.#e.bindHiddenInputSubmitListener(this.#p.signal, () => this.getNumber(), () => this.#l?.iso2 || "");
2296
+ this.#A(), this.#t.countrySelectorMode !== I.OFF && this.#e.bindAllInitialCountrySelectorListeners(this.#p.signal, () => this.openCountrySelector(), () => this.#te()), this.#e.bindHiddenInputSubmitListener(this.#p.signal, () => this.getNumber(), () => this.#l?.iso2 || "");
2257
2297
  }
2258
2298
  #E() {
2259
2299
  if (this.#v) {
@@ -2266,7 +2306,7 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2266
2306
  }
2267
2307
  async #D() {
2268
2308
  if (Q.autoCountry) {
2269
- this.#se();
2309
+ this.#ce();
2270
2310
  return;
2271
2311
  }
2272
2312
  if (this.#e.setLoading(!0), !Q.startedLoadingAutoCountry && (Q.startedLoadingAutoCountry = !0, typeof this.#t.initialCountryLookup == "function")) {
@@ -2302,30 +2342,30 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2302
2342
  }
2303
2343
  #M(e, t) {
2304
2344
  let n = this.#k(e);
2305
- this.#e.telInputEl.setSelectionRange(n, n), this.#e.playStrictRejectAnimation(), this.#W(g.STRICT_REJECT, {
2345
+ this.#e.telInputEl.setSelectionRange(n, n), this.#e.playStrictRejectAnimation(), this.#G(g.STRICT_REJECT, {
2306
2346
  source: "key",
2307
2347
  rejectedInput: t,
2308
2348
  reason: "invalid"
2309
2349
  });
2310
2350
  }
2311
2351
  #N(e, t) {
2312
- let n = this.#e.telInputEl.selectionStart || 0, r = e.substring(0, n).replace(b.NON_PLUS_NUMERIC_GLOBAL, "").length, i = Oe(this.#ie(), e, Q.utils, this.#l, this.#t.separateDialCode), a = ke(r, i, n, t);
2352
+ let n = this.#e.telInputEl.selectionStart || 0, r = e.substring(0, n).replace(x.NON_PLUS_NUMERIC_GLOBAL, "").length, i = je(this.#ae(), e, Q.utils, this.#l, this.#t.separateDialCode), a = Me(r, i, n, t);
2313
2353
  this.#b(i), this.#e.telInputEl.setSelectionRange(a, a);
2314
2354
  }
2315
2355
  #P(e) {
2316
- if (e.startsWith("+") && this.#l && this.#ne(e)) {
2317
- let t = De(e, !0, !0, this.#l);
2356
+ if (e.startsWith("+") && this.#l && this.#re(e)) {
2357
+ let t = Ae(e, !0, !0, this.#l);
2318
2358
  this.#b(t);
2319
2359
  }
2320
2360
  }
2321
2361
  #F() {
2322
- this.#h = b.ALPHA_UNICODE.test(this.#y()), this.#e.telInputEl.addEventListener("input", this.#I, { signal: this.#p.signal });
2362
+ this.#h = x.ALPHA_UNICODE.test(this.#y()), this.#e.telInputEl.addEventListener("input", this.#I, { signal: this.#p.signal });
2323
2363
  }
2324
2364
  #I = (e) => {
2325
2365
  let { strictMode: t, formatAsYouType: n, separateDialCode: r, countrySelectorMode: i, countrySearch: a } = this.#t, o = e?.detail;
2326
2366
  if (o?.isCountryChange) return;
2327
- let s = this.#y(), c = e?.inputType === y.PASTE, l = t && c;
2328
- if (this.#n && !c && e?.data === "+" && r && i !== F.OFF && a) {
2367
+ let s = this.#y(), c = e?.inputType === b.PASTE, l = t && c;
2368
+ if (this.#n && !c && e?.data === "+" && r && i !== I.OFF && a) {
2329
2369
  this.#j(s);
2330
2370
  return;
2331
2371
  }
@@ -2337,7 +2377,7 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2337
2377
  if (this.#V()) return;
2338
2378
  s = this.#y();
2339
2379
  }
2340
- this.#K(s) && (this.#oe(), this.#W(g.INPUT, { isCountryChange: !0 })), !l && e?.data && b.NON_PLUS_NUMERIC.test(e.data) || c && s && !t ? this.#h = !0 : b.NON_PLUS_NUMERIC.test(s) || (this.#h = !1), n && !this.#h && !o?.isSetNumber && this.#m.isAscii() && this.#N(s, e?.inputType === y.DELETE_FORWARD), r && this.#P(s);
2380
+ this.#q(s) && (this.#se(), this.#G(g.INPUT, { isCountryChange: !0 })), !l && e?.data && x.NON_PLUS_NUMERIC.test(e.data) || c && s && !t ? this.#h = !0 : x.NON_PLUS_NUMERIC.test(s) || (this.#h = !1), n && !this.#h && !o?.isSetNumber && this.#m.isAscii() && this.#N(s, e?.inputType === b.DELETE_FORWARD), r && this.#P(s);
2341
2381
  };
2342
2382
  #L() {
2343
2383
  let { strictMode: e, separateDialCode: t } = this.#t;
@@ -2346,15 +2386,15 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2346
2386
  #R = (e) => {
2347
2387
  let { strictMode: t, separateDialCode: n, countrySelectorMode: r, countrySearch: i } = this.#t;
2348
2388
  if (!e.key || e.key.length !== 1 || e.altKey || e.ctrlKey || e.metaKey) return;
2349
- if (n && r !== F.OFF && i && e.key === "+") {
2389
+ if (n && r !== I.OFF && i && e.key === "+") {
2350
2390
  e.preventDefault(), this.#O();
2351
2391
  return;
2352
2392
  }
2353
2393
  if (!t) return;
2354
- let a = this.#y(), o = !a.startsWith("+") && this.#e.telInputEl.selectionStart === 0 && e.key === "+", s = this.#m.normalise(e.key), c = /^[0-9]$/.test(s), l = n ? c : o || c, u = this.#e.telInputEl, d = u.selectionStart, f = u.selectionEnd, p = a.slice(0, d ?? void 0), m = a.slice(f ?? void 0), h = p + s + m, _ = this.#re(h), v = !1;
2355
- Q.utils && this.#u && (v = Q.utils.getCoreNumber(_, this.#l?.iso2).length > this.#u);
2356
- let y = this.#J(_) !== null;
2357
- (!l || v && !y && !o) && (this.#e.playStrictRejectAnimation(), this.#W(g.STRICT_REJECT, {
2394
+ let a = this.#y(), o = !a.startsWith("+") && this.#e.telInputEl.selectionStart === 0 && e.key === "+", s = this.#m.normalise(e.key), c = /^[0-9]$/.test(s), l = n ? c : o || c, u = this.#e.telInputEl, d = u.selectionStart, f = u.selectionEnd, p = a.slice(0, d ?? void 0), m = a.slice(f ?? void 0), h = p + s + m, _ = this.#ie(h), v = G(_).length > T;
2395
+ !v && Q.utils && this.#u && (v = Q.utils.getCoreNumber(_, this.#l?.iso2).length > this.#u);
2396
+ let y = this.#Y(_) !== null;
2397
+ (!l || v && !y && !o) && (this.#e.playStrictRejectAnimation(), this.#G(g.STRICT_REJECT, {
2358
2398
  source: "key",
2359
2399
  rejectedInput: e.key,
2360
2400
  reason: l ? "max-length" : "invalid"
@@ -2375,45 +2415,45 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2375
2415
  #V() {
2376
2416
  let e = this.#e.telInputEl, t = this.#g;
2377
2417
  if (this.#g = null, !t) return !1;
2378
- let n = t.pastedRaw, r = t.value, i = t.selectionStart, a = t.selectionEnd, o = r.slice(0, i), s = r.slice(a), c = this.#l?.iso2, l = this.#m.normalise(n), u = i === 0 && a > 0, d = !r.startsWith("+") || u, f = l.replace(b.NON_PLUS_NUMERIC_GLOBAL, ""), p = f.startsWith("+"), m = f.replace(/\+/g, ""), h = p && d ? `+${m}` : m, _ = o + h + s, v = h === l ? null : "invalid";
2379
- if (_.length > 30) return this.#e.playStrictRejectAnimation(), this.#W(g.STRICT_REJECT, {
2380
- source: "paste",
2381
- rejectedInput: n,
2382
- reason: "max-length"
2383
- }), this.#H(t), !0;
2384
- if (_.length > 5 && Q.utils) {
2418
+ let n = t.pastedRaw, r = t.value, i = t.selectionStart, a = t.selectionEnd, o = r.slice(0, i), s = r.slice(a), c = this.#l?.iso2, l = this.#m.normalise(n), u = i === 0 && a > 0, d = !r.startsWith("+") || u, f = l.replace(x.NON_PLUS_NUMERIC_GLOBAL, ""), p = f.startsWith("+"), m = f.replace(/\+/g, ""), h = p && d ? `+${m}` : m, _ = o + h + s, v = h === l ? null : "invalid";
2419
+ if (_.length > 30) return this.#H(t), !0;
2420
+ let y = G(this.#ie(_)).length - T;
2421
+ if (y > 0) {
2422
+ if (a !== r.length) return this.#H(t), !0;
2423
+ _ = _.slice(0, _.length - y), v = "max-length";
2424
+ }
2425
+ if (this.#u && _.length > 5 && Q.utils) {
2385
2426
  let e = Q.utils.getCoreNumber(_, c);
2386
2427
  for (; e.length === 0 && _.length > 0;) _ = _.slice(0, -1), e = Q.utils.getCoreNumber(_, c);
2387
- if (!e) return this.#e.playStrictRejectAnimation(), this.#W(g.STRICT_REJECT, {
2388
- source: "paste",
2389
- rejectedInput: n,
2390
- reason: "max-length"
2391
- }), this.#H(t), !0;
2392
- if (this.#u && e.length > this.#u) if (a === r.length) {
2428
+ if (!e) return this.#H(t), !0;
2429
+ if (e.length > this.#u) if (a === r.length) {
2393
2430
  let t = e.length - this.#u;
2394
2431
  _ = _.slice(0, _.length - t), v = "max-length";
2395
- } else return this.#e.playStrictRejectAnimation(), this.#W(g.STRICT_REJECT, {
2396
- source: "paste",
2397
- rejectedInput: n,
2398
- reason: "max-length"
2399
- }), this.#H(t), !0;
2432
+ } else return this.#H(t), !0;
2400
2433
  }
2401
2434
  this.#b(_);
2402
- let y = i + h.length;
2403
- return e.setSelectionRange(y, y), v && (l.length > 0 && h.length === 0 && this.#e.playStrictRejectAnimation(), this.#W(g.STRICT_REJECT, {
2435
+ let b = i + h.length;
2436
+ return e.setSelectionRange(b, b), v && (l.length > 0 && h.length === 0 && this.#e.playStrictRejectAnimation(), this.#G(g.STRICT_REJECT, {
2404
2437
  source: "paste",
2405
2438
  rejectedInput: n,
2406
2439
  reason: v
2407
2440
  })), !1;
2408
2441
  }
2409
2442
  #H(e) {
2410
- this.#b(e.value), this.#e.telInputEl.setSelectionRange(e.selectionStart, e.selectionEnd);
2443
+ this.#e.playStrictRejectAnimation(), this.#G(g.STRICT_REJECT, {
2444
+ source: "paste",
2445
+ rejectedInput: e.pastedRaw,
2446
+ reason: "max-length"
2447
+ }), this.#U(e);
2411
2448
  }
2412
2449
  #U(e) {
2450
+ this.#b(e.value), this.#e.telInputEl.setSelectionRange(e.selectionStart, e.selectionEnd);
2451
+ }
2452
+ #W(e) {
2413
2453
  let t = Number(this.#e.telInputEl.getAttribute("maxlength"));
2414
2454
  return t && e.length > t ? e.substring(0, t) : e;
2415
2455
  }
2416
- #W(e, t = {}) {
2456
+ #G(e, t = {}) {
2417
2457
  let n = new CustomEvent(e, {
2418
2458
  bubbles: !0,
2419
2459
  cancelable: !0,
@@ -2422,41 +2462,41 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2422
2462
  this.#e.telInputEl.dispatchEvent(n);
2423
2463
  }
2424
2464
  openCountrySelector() {
2425
- this.#e.isCountrySelectorOpen() || (this.#e.openCountrySelector((e) => this.#$(e), () => this.#ee()), this.#W(g.OPEN_COUNTRY_SELECTOR));
2465
+ this.#e.isCountrySelectorOpen() || (this.#e.openCountrySelector((e) => this.#ee(e), () => this.#te()), this.#G(g.OPEN_COUNTRY_SELECTOR));
2426
2466
  }
2427
- #G(e) {
2467
+ #K(e) {
2428
2468
  let { numberDisplayFormat: t, separateDialCode: n } = this.#t, r = e;
2429
2469
  if (Q.utils && this.#l) {
2430
- let i = Ee(e), a = !r.startsWith("+") && !n, o = t === M.NATIONAL && !i || a, s;
2431
- s = o ? M.NATIONAL : t === M.E164 && !i ? M.E164 : M.INTERNATIONAL, r = Q.utils.formatNumber(r, this.#l?.iso2, s);
2470
+ let i = ke(e), a = !r.startsWith("+") && !n, o = t === N.NATIONAL && !i || a, s;
2471
+ s = o ? N.NATIONAL : t === N.E164 && !i ? N.E164 : N.INTERNATIONAL, r = Q.utils.formatNumber(r, this.#l?.iso2, s);
2432
2472
  }
2433
- r = this.#ae(r), this.#b(r);
2434
- }
2435
- #K(e) {
2436
- let t = this.#J(e);
2437
- return t === null ? !1 : this.#X(t);
2473
+ r = this.#oe(r), this.#b(r);
2438
2474
  }
2439
2475
  #q(e) {
2476
+ let t = this.#Y(e);
2477
+ return t === null ? !1 : this.#Z(t);
2478
+ }
2479
+ #J(e) {
2440
2480
  let t = this.#l?.dialCode, n = this.#l?.nationalPrefix;
2441
2481
  return e.startsWith("+") || !t ? e : `+${t}${n && e.startsWith(n) && !this.#t.separateDialCode ? e.substring(1) : e}`;
2442
2482
  }
2443
- #J(e) {
2483
+ #Y(e) {
2444
2484
  let t = e.indexOf("+"), n = t > 0 ? e.substring(t) : e, r = this.#l?.iso2;
2445
- n = this.#q(n);
2446
- let i = this.#ne(n, !0), a = W(n);
2485
+ n = this.#J(n);
2486
+ let i = this.#re(n, !0), a = G(n);
2447
2487
  if (i) {
2448
- let e = W(i), t = this.#a[e];
2449
- return t.length === 1 ? t[0] === r ? null : t[0] : this.#Y(t, e, a);
2488
+ let e = G(i), t = this.#a[e];
2489
+ return t.length === 1 ? t[0] === r ? null : t[0] : this.#X(t, e, a);
2450
2490
  } else if (n.startsWith("+") && a.length) {
2451
2491
  let e = this.#l?.dialCode || "";
2452
- return e && e.startsWith(a) ? null : "";
2492
+ return e && e.startsWith(a) || !r ? null : "";
2453
2493
  } else if ((!n || n === "+") && !r && this.#d) return this.#d;
2454
2494
  return null;
2455
2495
  }
2456
- #Y(e, t, n) {
2496
+ #X(e, t, n) {
2457
2497
  let r = this.#l?.iso2, i = this.#l?.dialCode;
2458
2498
  if (!r && this.#d && e.includes(this.#d)) return this.#d;
2459
- if (i === C.NANP && je(n)) return null;
2499
+ if (i === w.NANP && Pe(n)) return null;
2460
2500
  let a = this.#l?.areaCodes, o = this.#l?.priority;
2461
2501
  if (a) {
2462
2502
  let e = a.map((e) => `${i}${e}`);
@@ -2465,11 +2505,11 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2465
2505
  let s = a && o !== 0 && n.length > t.length, c = r && e.includes(r) && !s, l = r === e[0];
2466
2506
  return !c && !l ? e[0] : null;
2467
2507
  }
2468
- #X(e) {
2508
+ #Z(e) {
2469
2509
  let t = this.#l?.iso2 || "";
2470
- return this.#l = e ? this.#s.get(e) : null, this.#l && (this.#d = this.#l.iso2), this.#e.setSelectedCountry(this.#l), this.#Q(), this.#Z(), t !== e;
2510
+ return this.#l = e ? this.#s.get(e) : null, this.#l && (this.#d = this.#l.iso2), this.#e.setSelectedCountry(this.#l), this.#$(), this.#Q(), t !== e;
2471
2511
  }
2472
- #Z() {
2512
+ #Q() {
2473
2513
  let { strictMode: e, placeholderNumberType: t, allowedNumberTypes: n } = this.#t;
2474
2514
  if (!e || !Q.utils) return;
2475
2515
  let r = this.#l?.iso2;
@@ -2477,39 +2517,39 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2477
2517
  this.#u = null;
2478
2518
  return;
2479
2519
  }
2480
- let i = Q.utils.getExampleNumber(r, t, M.E164), a = i;
2520
+ let i = Q.utils.getExampleNumber(r, t, N.E164), a = i;
2481
2521
  for (; Q.utils.isValidNumber(i, r, n);) a = i, i += "0";
2482
2522
  let o = Q.utils.getCoreNumber(a, r);
2483
2523
  this.#u = o.length, r === "by" && (this.#u = o.length + 1);
2484
2524
  }
2485
- #Q() {
2486
- let { placeholderNumberPolicy: e, placeholderNumberType: t, numberDisplayFormat: n, customPlaceholder: r } = this.#t, i = e === E.AGGRESSIVE || !this.#e.hadInitialPlaceholder && e === E.POLITE;
2525
+ #$() {
2526
+ let { placeholderNumberPolicy: e, placeholderNumberType: t, numberDisplayFormat: n, customPlaceholder: r } = this.#t, i = e === O.AGGRESSIVE || !this.#e.hadInitialPlaceholder && e === O.POLITE;
2487
2527
  if (!Q.utils || !i) return;
2488
2528
  let a = this.#l ? Q.utils.getExampleNumber(this.#l.iso2, t, n) : "";
2489
- a = this.#ae(a), typeof r == "function" && (a = r(a, this.#l)), this.#e.telInputEl.setAttribute("placeholder", a);
2529
+ a = this.#oe(a), typeof r == "function" && (a = r(a, this.#l)), this.#e.telInputEl.setAttribute("placeholder", a);
2490
2530
  }
2491
- #$(e) {
2531
+ #ee(e) {
2492
2532
  if (!e) return;
2493
- let t = e.dataset[I.ISO2], n = this.#X(t);
2494
- this.#ee();
2495
- let r = e.dataset[I.DIAL_CODE];
2496
- this.#te(r);
2533
+ let t = e.dataset[L.ISO2], n = this.#Z(t);
2534
+ this.#te();
2535
+ let r = e.dataset[L.DIAL_CODE];
2536
+ this.#ne(r);
2497
2537
  let i = this.#y();
2498
- this.#G(i), this.#e.telInputEl.focus(), n && (this.#oe(), this.#W(g.INPUT, { isCountryChange: !0 }));
2538
+ this.#K(i), this.#e.telInputEl.focus(), n && (this.#se(), this.#G(g.INPUT, { isCountryChange: !0 }));
2499
2539
  }
2500
2540
  closeCountrySelector() {
2501
- this.#ee();
2502
- }
2503
- #ee(e) {
2504
- !this.#e.isCountrySelectorOpen() || this.#t.dropdownAlwaysOpen && !e || (this.#e.closeCountrySelector(), this.#W(g.CLOSE_COUNTRY_SELECTOR));
2541
+ this.#te();
2505
2542
  }
2506
2543
  #te(e) {
2544
+ !this.#e.isCountrySelectorOpen() || this.#t.dropdownAlwaysOpen && !e || (this.#e.closeCountrySelector(), this.#G(g.CLOSE_COUNTRY_SELECTOR));
2545
+ }
2546
+ #ne(e) {
2507
2547
  let t = this.#y();
2508
2548
  if (!t.startsWith("+")) return;
2509
- let n = `+${e}`, r = this.#ne(t), i;
2549
+ let n = `+${e}`, r = this.#re(t), i;
2510
2550
  i = r ? t.replace(r, n) : n, this.#b(i);
2511
2551
  }
2512
- #ne(e, t) {
2552
+ #re(e, t) {
2513
2553
  if (!e.startsWith("+")) return "";
2514
2554
  let n = "", r = "", i = !1;
2515
2555
  for (let a = 0; a < e.length; a++) {
@@ -2524,22 +2564,22 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2524
2564
  }
2525
2565
  return n;
2526
2566
  }
2527
- #re(e) {
2528
- let t = this.#l?.dialCode, n = W(e);
2567
+ #ie(e) {
2568
+ let t = this.#l?.dialCode, n = G(e);
2529
2569
  return (this.#t.separateDialCode && !e.startsWith("+") && t && n ? `+${t}` : "") + e;
2530
2570
  }
2531
- #ie() {
2571
+ #ae() {
2532
2572
  let e = this.#y();
2533
- return this.#re(e);
2573
+ return this.#ie(e);
2534
2574
  }
2535
- #ae(e) {
2536
- let t = De(e, !!this.#ne(e), this.#t.separateDialCode, this.#l);
2537
- return this.#U(t);
2538
- }
2539
- #oe() {
2540
- this.#W(g.COUNTRY_CHANGE, this.#l ?? null);
2575
+ #oe(e) {
2576
+ let t = Ae(e, !!this.#re(e), this.#t.separateDialCode, this.#l);
2577
+ return this.#W(t);
2541
2578
  }
2542
2579
  #se() {
2580
+ this.#G(g.COUNTRY_CHANGE, this.#l ?? null);
2581
+ }
2582
+ #ce() {
2543
2583
  if (!this.#_ || !Q.autoCountry) return;
2544
2584
  if (!this.#f) {
2545
2585
  this.#_.resolve();
@@ -2548,14 +2588,14 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2548
2588
  let e = document.activeElement === this.#e.telInputEl, t = !!this.#y();
2549
2589
  this.#e.isLoading() && !(e && t) ? this.setSelectedCountry(Q.autoCountry) : this.#d = Q.autoCountry, this.#e.setLoading(!1), this.#_.resolve();
2550
2590
  }
2551
- #ce() {
2591
+ #le() {
2552
2592
  if (!this.#f) {
2553
2593
  this.#_?.reject();
2554
2594
  return;
2555
2595
  }
2556
2596
  this.#w(!0), this.#e.setLoading(!1), this.#_?.reject();
2557
2597
  }
2558
- #le() {
2598
+ #ue() {
2559
2599
  if (!this.#f) {
2560
2600
  this.#v?.resolve();
2561
2601
  return;
@@ -2565,9 +2605,9 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2565
2605
  return;
2566
2606
  }
2567
2607
  let e = this.#y(), t = document.activeElement === this.#e.telInputEl;
2568
- e && !t && this.#G(e), this.#l && (this.#Q(), this.#Z()), this.#v?.resolve();
2608
+ e && !t && this.#K(e), this.#l && (this.#$(), this.#Q()), this.#v?.resolve();
2569
2609
  }
2570
- #ue(e) {
2610
+ #de(e) {
2571
2611
  if (!this.#f) {
2572
2612
  this.#v?.reject(e);
2573
2613
  return;
@@ -2575,22 +2615,22 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2575
2615
  this.#v?.reject(e);
2576
2616
  }
2577
2617
  destroy() {
2578
- this.#f && (this.#f = !1, this.#t.countrySelectorMode !== F.OFF && this.#ee(!0), this.#p.abort(), this.#e.destroy(), Q.instances.delete(String(this.id)));
2618
+ this.#f && (this.#f = !1, this.#t.countrySelectorMode !== I.OFF && this.#te(!0), this.#p.abort(), this.#e.destroy(), Q.instances.delete(String(this.id)));
2579
2619
  }
2580
2620
  isActive() {
2581
2621
  return this.#f;
2582
2622
  }
2583
2623
  getExtension() {
2584
- return this.#f ? (X("getExtension"), Q.utils.getExtension(this.#ie(), this.#l?.iso2)) : "";
2624
+ return this.#f ? (X("getExtension"), Q.utils.getExtension(this.#ae(), this.#l?.iso2)) : "";
2585
2625
  }
2586
2626
  getNumber(e) {
2587
2627
  if (!this.#f) return "";
2588
2628
  X("getNumber");
2589
- let t = this.#l?.iso2, n = this.#ie(), r = Q.utils.formatNumber(n, t, e);
2629
+ let t = this.#l?.iso2, n = this.#ae(), r = Q.utils.formatNumber(n, t, e);
2590
2630
  return this.#m.denormalise(r);
2591
2631
  }
2592
2632
  getNumberType() {
2593
- return this.#f ? (X("getNumberType"), Q.utils.getNumberType(this.#ie(), this.#l?.iso2)) : null;
2633
+ return this.#f ? (X("getNumberType"), Q.utils.getNumberType(this.#ae(), this.#l?.iso2)) : null;
2594
2634
  }
2595
2635
  getSelectedCountry() {
2596
2636
  return this.#l ?? null;
@@ -2599,27 +2639,27 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2599
2639
  if (!this.#f) return null;
2600
2640
  X("getValidationError");
2601
2641
  let e = this.#l?.iso2;
2602
- return Q.utils.getValidationError(this.#ie(), e);
2642
+ return Q.utils.getValidationError(this.#ae(), e);
2603
2643
  }
2604
2644
  isValidNumber() {
2605
2645
  if (!this.#f) return null;
2606
2646
  X("isValidNumber");
2607
- let e = this.#l?.dialCode, t = this.#l?.iso2, n = this.#ie(), r = Q.utils.getCoreNumber(n, t);
2647
+ let e = this.#l?.dialCode, t = this.#l?.iso2, n = this.#ae(), r = Q.utils.getCoreNumber(n, t);
2608
2648
  if (r) {
2609
- if (e === w.DIAL_CODE && r[0] === w.MOBILE_PREFIX && r.length !== w.MOBILE_CORE_LENGTH) return !1;
2610
- if (!b.ALPHA_UNICODE.test(n) && e) {
2611
- let t = W(n.startsWith("+") ? n.slice(1 + e.length) : n).length;
2649
+ if (e === E.DIAL_CODE && r[0] === E.MOBILE_PREFIX && r.length !== E.MOBILE_CORE_LENGTH) return !1;
2650
+ if (!x.ALPHA_UNICODE.test(n) && e) {
2651
+ let t = G(n.startsWith("+") ? n.slice(1 + e.length) : n).length;
2612
2652
  if (r.length > t) return !1;
2613
2653
  }
2614
2654
  }
2615
- return this.#de("possible");
2655
+ return this.#fe("possible");
2616
2656
  }
2617
2657
  isValidNumberPrecise() {
2618
- return this.#f ? (X("isValidNumberPrecise"), this.#de("precise")) : null;
2658
+ return this.#f ? (X("isValidNumberPrecise"), this.#fe("precise")) : null;
2619
2659
  }
2620
- #de(e) {
2621
- let { allowNumberExtensions: t, allowPhonewords: n, allowedNumberTypes: r } = this.#t, i = this.#l?.iso2, a = this.#ie();
2622
- return !this.#l && !Ee(a) || !(e === "precise" ? Q.utils.isValidNumberPrecise : Q.utils.isValidNumber)(a, i, r) ? !1 : b.ALPHA_UNICODE.test(a) ? Q.utils.getExtension(a, i) ? t : n : !0;
2660
+ #fe(e) {
2661
+ let { allowNumberExtensions: t, allowPhonewords: n, allowedNumberTypes: r } = this.#t, i = this.#l?.iso2, a = this.#ae();
2662
+ return !this.#l && !ke(a) || !(e === "precise" ? Q.utils.isValidNumberPrecise : Q.utils.isValidNumber)(a, i, r) ? !1 : x.ALPHA_UNICODE.test(a) ? Q.utils.getExtension(a, i) ? t : n : !0;
2623
2663
  }
2624
2664
  setSelectedCountry(e) {
2625
2665
  if (!this.#f) return;
@@ -2627,17 +2667,17 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2627
2667
  if (!m(t)) throw Error(`Invalid iso2 code: '${t}'`);
2628
2668
  let n = this.#l?.iso2;
2629
2669
  if (!(e && t !== n || !e && n)) return;
2630
- this.#X(t), this.#te(this.#l?.dialCode || "");
2670
+ this.#Z(t), this.#ne(this.#l?.dialCode || "");
2631
2671
  let r = this.#y();
2632
- this.#G(r), this.#oe(), this.#W(g.INPUT, { isCountryChange: !0 });
2672
+ this.#K(r), this.#se(), this.#G(g.INPUT, { isCountryChange: !0 });
2633
2673
  }
2634
2674
  setNumber(e) {
2635
2675
  if (!this.#f) return;
2636
- let t = this.#m.normalise(e), n = this.#K(t);
2637
- this.#G(t), n && this.#oe(), this.#W(g.INPUT, { isSetNumber: !0 });
2676
+ let t = this.#m.normalise(e), n = this.#q(t);
2677
+ this.#K(t), n && this.#se(), this.#G(g.INPUT, { isSetNumber: !0 });
2638
2678
  }
2639
2679
  setPlaceholderNumberType(e) {
2640
- this.#f && (this.#t.placeholderNumberType = e, this.#Q());
2680
+ this.#f && (this.#t.placeholderNumberType = e, this.#$());
2641
2681
  }
2642
2682
  setDisabled(e) {
2643
2683
  this.#f && this.#e.setDisabled(e);
@@ -2650,16 +2690,16 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2650
2690
  r.forEach((n) => {
2651
2691
  if (n instanceof e) switch (t) {
2652
2692
  case "handleUtilsLoaded":
2653
- n.#le();
2693
+ n.#ue();
2654
2694
  break;
2655
2695
  case "handleUtilsFailure":
2656
- n.#ue(i);
2696
+ n.#de(i);
2657
2697
  break;
2658
2698
  case "handleAutoCountryLoaded":
2659
- n.#se();
2699
+ n.#ce();
2660
2700
  break;
2661
2701
  case "handleAutoCountryFailure":
2662
- n.#ce();
2702
+ n.#le();
2663
2703
  break;
2664
2704
  }
2665
2705
  });
@@ -2668,11 +2708,11 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2668
2708
  let n = new Z(e, t);
2669
2709
  return Q.instances.set(String(n.id), n), e.iti = n, n;
2670
2710
  }, {
2671
- defaults: z,
2711
+ defaults: B,
2672
2712
  documentReady: () => document.readyState === "complete",
2673
2713
  getAllCountries: () => h,
2674
2714
  getInstance: (e) => {
2675
- let t = e.dataset[I.INSTANCE_ID];
2715
+ let t = e.dataset[L.INSTANCE_ID];
2676
2716
  return t ? Q.instances.get(t) ?? null : null;
2677
2717
  },
2678
2718
  instances: /* @__PURE__ */ new Map(),
@@ -2690,13 +2730,13 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2690
2730
  },
2691
2731
  startedLoadingUtils: !1,
2692
2732
  startedLoadingAutoCountry: !1,
2693
- version: "29.1.3",
2694
- NUMBER_FORMAT: M,
2695
- NUMBER_TYPE: N,
2696
- VALIDATION_ERROR: P,
2697
- PLACEHOLDER_POLICY: E,
2698
- COUNTRY_SELECTOR_MODE: F
2699
- }), $ = Q, Pe = /* @__PURE__ */ n({
2733
+ version: "29.2.1",
2734
+ NUMBER_FORMAT: N,
2735
+ NUMBER_TYPE: P,
2736
+ VALIDATION_ERROR: F,
2737
+ PLACEHOLDER_POLICY: O,
2738
+ COUNTRY_SELECTOR_MODE: I
2739
+ }), $ = Q, Le = /* @__PURE__ */ n({
2700
2740
  inheritAttrs: !1,
2701
2741
  __name: "IntlTelInput",
2702
2742
  props: {
@@ -2719,6 +2759,7 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2719
2759
  allowedNumberTypes: {},
2720
2760
  allowNumberExtensions: { type: Boolean },
2721
2761
  allowPhonewords: { type: Boolean },
2762
+ classNames: {},
2722
2763
  containerClass: {},
2723
2764
  countryNameLocale: {},
2724
2765
  countryNameOverrides: {},
@@ -2767,7 +2808,7 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2767
2808
  "oninput"
2768
2809
  ]), _ = c(""), v = e(() => {
2769
2810
  let e = p.inputProps ?? {}, t = {};
2770
- for (let [n, r] of Object.entries(e)) g.has(n) ? h(n) : n === "class" ? t[n] = `${_.value} ${r}` : t[n] = r;
2811
+ for (let [n, r] of Object.entries(e)) g.has(n) ? h(n) : n === "class" ? t[n] = [_.value, r].filter(Boolean).join(" ") : t[n] = r;
2771
2812
  return t;
2772
2813
  }), y = e(() => p.modelValue ?? p.initialValue ?? ""), b = r(), x = Object.keys($.defaults), S = e(() => {
2773
2814
  let e = b?.vnode.props ?? {}, t = new Set(Object.keys(e).map((e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()))), n = {};
@@ -2784,7 +2825,7 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2784
2825
  }
2785
2826
  let e = A(), t = e ? null : w.value.getValidationError();
2786
2827
  e !== D.value && (D.value = e, m("changeValidity", e)), t !== O.value && (O.value = t, m("changeErrorCode", t));
2787
- }, M = () => {
2828
+ }, ee = () => {
2788
2829
  if (!w.value?.isActive()) return;
2789
2830
  if (!$.utils) {
2790
2831
  k = !0;
@@ -2792,18 +2833,20 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2792
2833
  }
2793
2834
  let e = w.value.getNumber() ?? "";
2794
2835
  e !== T.value && (T.value = e, m("changeNumber", e), m("update:modelValue", e)), j();
2795
- }, N = () => {
2836
+ }, M = () => {
2796
2837
  if (!w.value?.isActive()) return;
2797
2838
  let e = w.value.getSelectedCountry()?.iso2 ?? "";
2798
- e !== E.value && (E.value = e, m("changeCountry", e)), M();
2799
- }, P = () => m("openCountrySelector"), F = () => m("closeCountrySelector"), I = (e) => {
2839
+ e !== E.value && (E.value = e, m("changeCountry", e)), ee();
2840
+ }, N = () => m("openCountrySelector"), P = () => m("closeCountrySelector"), F = (e) => {
2800
2841
  let { source: t, rejectedInput: n, reason: r } = e.detail;
2801
2842
  m("strictReject", t, n, r);
2802
2843
  };
2803
2844
  return a(() => {
2804
- C.value && (w.value = $(C.value, S.value), _.value = C.value.className, C.value.addEventListener("input", N), C.value.addEventListener("open:countryselector", P), C.value.addEventListener("close:countryselector", F), C.value.addEventListener("strict:reject", I), p.disabled && w.value.setDisabled(p.disabled), p.readonly && w.value.setReadonly(p.readonly), E.value = w.value.getSelectedCountry()?.iso2 ?? "", w.value.promise.then(() => {
2805
- w.value?.isActive() && (y.value && w.value.setNumber(y.value), k ? (k = !1, N()) : (T.value = w.value.getNumber() ?? "", D.value = A(), O.value = D.value ? null : w.value.getValidationError()));
2806
- }));
2845
+ if (!C.value) return;
2846
+ let e = new Set(C.value.classList);
2847
+ w.value = $(C.value, S.value), _.value = Array.from(C.value.classList).filter((t) => !e.has(t)).join(" "), C.value.addEventListener("input", M), C.value.addEventListener("open:countryselector", N), C.value.addEventListener("close:countryselector", P), C.value.addEventListener("strict:reject", F), p.disabled && w.value.setDisabled(p.disabled), p.readonly && w.value.setReadonly(p.readonly), E.value = w.value.getSelectedCountry()?.iso2 ?? "", w.value.promise.then(() => {
2848
+ w.value?.isActive() && (y.value && w.value.setNumber(y.value), k ? (k = !1, M()) : (T.value = w.value.getNumber() ?? "", D.value = A(), O.value = D.value ? null : w.value.getValidationError()));
2849
+ });
2807
2850
  }), u(() => p.disabled, (e) => w.value?.setDisabled(e)), u(() => p.readonly, (e) => w.value?.setReadonly(e)), u(() => y.value, (e) => {
2808
2851
  w.value && w.value.promise.then(() => {
2809
2852
  if (!w.value?.isActive()) return;
@@ -2811,7 +2854,7 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2811
2854
  document.activeElement === C.value || n === t || (w.value.setNumber(t), j());
2812
2855
  });
2813
2856
  }, { flush: "post" }), o(() => {
2814
- C.value && (C.value.removeEventListener("input", N), C.value.removeEventListener("open:countryselector", P), C.value.removeEventListener("close:countryselector", F), C.value.removeEventListener("strict:reject", I)), w.value?.destroy();
2857
+ C.value && (C.value.removeEventListener("input", M), C.value.removeEventListener("open:countryselector", N), C.value.removeEventListener("close:countryselector", P), C.value.removeEventListener("strict:reject", F)), w.value?.destroy();
2815
2858
  }), d({
2816
2859
  instance: w,
2817
2860
  input: C
@@ -2823,4 +2866,4 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2823
2866
  }
2824
2867
  });
2825
2868
  //#endregion
2826
- export { $ as n, Pe as t };
2869
+ export { $ as n, Le as t };