@salla.sa/twilight-components 2.12.40 → 2.12.41

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.
@@ -26552,7 +26552,7 @@ SallaTabs.style = sallaTabsCss;
26552
26552
 
26553
26553
  var intlTelInput$1 = createCommonjsModule(function (module) {
26554
26554
  /*
26555
- * International Telephone Input v17.0.13
26555
+ * International Telephone Input v18.2.1
26556
26556
  * https://github.com/jackocnr/intl-tel-input.git
26557
26557
  * Licensed under the MIT license
26558
26558
  */
@@ -26576,7 +26576,7 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
26576
26576
  // Order (if >1 country with same dial code),
26577
26577
  // Area codes
26578
26578
  // ]
26579
- var allCountries = [ [ "Afghanistan (‫افغانستان‬‎)", "af", "93" ], [ "Albania (Shqipëri)", "al", "355" ], [ "Algeria (‫الجزائر‬‎)", "dz", "213" ], [ "American Samoa", "as", "1", 5, [ "684" ] ], [ "Andorra", "ad", "376" ], [ "Angola", "ao", "244" ], [ "Anguilla", "ai", "1", 6, [ "264" ] ], [ "Antigua and Barbuda", "ag", "1", 7, [ "268" ] ], [ "Argentina", "ar", "54" ], [ "Armenia (Հայաստան)", "am", "374" ], [ "Aruba", "aw", "297" ], [ "Ascension Island", "ac", "247" ], [ "Australia", "au", "61", 0 ], [ "Austria (Österreich)", "at", "43" ], [ "Azerbaijan (Azərbaycan)", "az", "994" ], [ "Bahamas", "bs", "1", 8, [ "242" ] ], [ "Bahrain (‫البحرين‬‎)", "bh", "973" ], [ "Bangladesh (বাংলাদেশ)", "bd", "880" ], [ "Barbados", "bb", "1", 9, [ "246" ] ], [ "Belarus (Беларусь)", "by", "375" ], [ "Belgium (België)", "be", "32" ], [ "Belize", "bz", "501" ], [ "Benin (Bénin)", "bj", "229" ], [ "Bermuda", "bm", "1", 10, [ "441" ] ], [ "Bhutan (འབྲུག)", "bt", "975" ], [ "Bolivia", "bo", "591" ], [ "Bosnia and Herzegovina (Босна и Херцеговина)", "ba", "387" ], [ "Botswana", "bw", "267" ], [ "Brazil (Brasil)", "br", "55" ], [ "British Indian Ocean Territory", "io", "246" ], [ "British Virgin Islands", "vg", "1", 11, [ "284" ] ], [ "Brunei", "bn", "673" ], [ "Bulgaria (България)", "bg", "359" ], [ "Burkina Faso", "bf", "226" ], [ "Burundi (Uburundi)", "bi", "257" ], [ "Cambodia (កម្ពុជា)", "kh", "855" ], [ "Cameroon (Cameroun)", "cm", "237" ], [ "Canada", "ca", "1", 1, [ "204", "226", "236", "249", "250", "289", "306", "343", "365", "387", "403", "416", "418", "431", "437", "438", "450", "506", "514", "519", "548", "579", "581", "587", "604", "613", "639", "647", "672", "705", "709", "742", "778", "780", "782", "807", "819", "825", "867", "873", "902", "905" ] ], [ "Cape Verde (Kabu Verdi)", "cv", "238" ], [ "Caribbean Netherlands", "bq", "599", 1, [ "3", "4", "7" ] ], [ "Cayman Islands", "ky", "1", 12, [ "345" ] ], [ "Central African Republic (République centrafricaine)", "cf", "236" ], [ "Chad (Tchad)", "td", "235" ], [ "Chile", "cl", "56" ], [ "China (中国)", "cn", "86" ], [ "Christmas Island", "cx", "61", 2, [ "89164" ] ], [ "Cocos (Keeling) Islands", "cc", "61", 1, [ "89162" ] ], [ "Colombia", "co", "57" ], [ "Comoros (‫جزر القمر‬‎)", "km", "269" ], [ "Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)", "cd", "243" ], [ "Congo (Republic) (Congo-Brazzaville)", "cg", "242" ], [ "Cook Islands", "ck", "682" ], [ "Costa Rica", "cr", "506" ], [ "Côte d’Ivoire", "ci", "225" ], [ "Croatia (Hrvatska)", "hr", "385" ], [ "Cuba", "cu", "53" ], [ "Curaçao", "cw", "599", 0 ], [ "Cyprus (Κύπρος)", "cy", "357" ], [ "Czech Republic (Česká republika)", "cz", "420" ], [ "Denmark (Danmark)", "dk", "45" ], [ "Djibouti", "dj", "253" ], [ "Dominica", "dm", "1", 13, [ "767" ] ], [ "Dominican Republic (República Dominicana)", "do", "1", 2, [ "809", "829", "849" ] ], [ "Ecuador", "ec", "593" ], [ "Egypt (‫مصر‬‎)", "eg", "20" ], [ "El Salvador", "sv", "503" ], [ "Equatorial Guinea (Guinea Ecuatorial)", "gq", "240" ], [ "Eritrea", "er", "291" ], [ "Estonia (Eesti)", "ee", "372" ], [ "Eswatini", "sz", "268" ], [ "Ethiopia", "et", "251" ], [ "Falkland Islands (Islas Malvinas)", "fk", "500" ], [ "Faroe Islands (Føroyar)", "fo", "298" ], [ "Fiji", "fj", "679" ], [ "Finland (Suomi)", "fi", "358", 0 ], [ "France", "fr", "33" ], [ "French Guiana (Guyane française)", "gf", "594" ], [ "French Polynesia (Polynésie française)", "pf", "689" ], [ "Gabon", "ga", "241" ], [ "Gambia", "gm", "220" ], [ "Georgia (საქართველო)", "ge", "995" ], [ "Germany (Deutschland)", "de", "49" ], [ "Ghana (Gaana)", "gh", "233" ], [ "Gibraltar", "gi", "350" ], [ "Greece (Ελλάδα)", "gr", "30" ], [ "Greenland (Kalaallit Nunaat)", "gl", "299" ], [ "Grenada", "gd", "1", 14, [ "473" ] ], [ "Guadeloupe", "gp", "590", 0 ], [ "Guam", "gu", "1", 15, [ "671" ] ], [ "Guatemala", "gt", "502" ], [ "Guernsey", "gg", "44", 1, [ "1481", "7781", "7839", "7911" ] ], [ "Guinea (Guinée)", "gn", "224" ], [ "Guinea-Bissau (Guiné Bissau)", "gw", "245" ], [ "Guyana", "gy", "592" ], [ "Haiti", "ht", "509" ], [ "Honduras", "hn", "504" ], [ "Hong Kong (香港)", "hk", "852" ], [ "Hungary (Magyarország)", "hu", "36" ], [ "Iceland (Ísland)", "is", "354" ], [ "India (भारत)", "in", "91" ], [ "Indonesia", "id", "62" ], [ "Iran (‫ایران‬‎)", "ir", "98" ], [ "Iraq (‫العراق‬‎)", "iq", "964" ], [ "Ireland", "ie", "353" ], [ "Isle of Man", "im", "44", 2, [ "1624", "74576", "7524", "7924", "7624" ] ], [ "Israel (‫ישראל‬‎)", "il", "972" ], [ "Italy (Italia)", "it", "39", 0 ], [ "Jamaica", "jm", "1", 4, [ "876", "658" ] ], [ "Japan (日本)", "jp", "81" ], [ "Jersey", "je", "44", 3, [ "1534", "7509", "7700", "7797", "7829", "7937" ] ], [ "Jordan (‫الأردن‬‎)", "jo", "962" ], [ "Kazakhstan (Казахстан)", "kz", "7", 1, [ "33", "7" ] ], [ "Kenya", "ke", "254" ], [ "Kiribati", "ki", "686" ], [ "Kosovo", "xk", "383" ], [ "Kuwait (‫الكويت‬‎)", "kw", "965" ], [ "Kyrgyzstan (Кыргызстан)", "kg", "996" ], [ "Laos (ລາວ)", "la", "856" ], [ "Latvia (Latvija)", "lv", "371" ], [ "Lebanon (‫لبنان‬‎)", "lb", "961" ], [ "Lesotho", "ls", "266" ], [ "Liberia", "lr", "231" ], [ "Libya (‫ليبيا‬‎)", "ly", "218" ], [ "Liechtenstein", "li", "423" ], [ "Lithuania (Lietuva)", "lt", "370" ], [ "Luxembourg", "lu", "352" ], [ "Macau (澳門)", "mo", "853" ], [ "Macedonia (FYROM) (Македонија)", "mk", "389" ], [ "Madagascar (Madagasikara)", "mg", "261" ], [ "Malawi", "mw", "265" ], [ "Malaysia", "my", "60" ], [ "Maldives", "mv", "960" ], [ "Mali", "ml", "223" ], [ "Malta", "mt", "356" ], [ "Marshall Islands", "mh", "692" ], [ "Martinique", "mq", "596" ], [ "Mauritania (‫موريتانيا‬‎)", "mr", "222" ], [ "Mauritius (Moris)", "mu", "230" ], [ "Mayotte", "yt", "262", 1, [ "269", "639" ] ], [ "Mexico (México)", "mx", "52" ], [ "Micronesia", "fm", "691" ], [ "Moldova (Republica Moldova)", "md", "373" ], [ "Monaco", "mc", "377" ], [ "Mongolia (Монгол)", "mn", "976" ], [ "Montenegro (Crna Gora)", "me", "382" ], [ "Montserrat", "ms", "1", 16, [ "664" ] ], [ "Morocco (‫المغرب‬‎)", "ma", "212", 0 ], [ "Mozambique (Moçambique)", "mz", "258" ], [ "Myanmar (Burma) (မြန်မာ)", "mm", "95" ], [ "Namibia (Namibië)", "na", "264" ], [ "Nauru", "nr", "674" ], [ "Nepal (नेपाल)", "np", "977" ], [ "Netherlands (Nederland)", "nl", "31" ], [ "New Caledonia (Nouvelle-Calédonie)", "nc", "687" ], [ "New Zealand", "nz", "64" ], [ "Nicaragua", "ni", "505" ], [ "Niger (Nijar)", "ne", "227" ], [ "Nigeria", "ng", "234" ], [ "Niue", "nu", "683" ], [ "Norfolk Island", "nf", "672" ], [ "North Korea (조선 민주주의 인민 공화국)", "kp", "850" ], [ "Northern Mariana Islands", "mp", "1", 17, [ "670" ] ], [ "Norway (Norge)", "no", "47", 0 ], [ "Oman (‫عُمان‬‎)", "om", "968" ], [ "Pakistan (‫پاکستان‬‎)", "pk", "92" ], [ "Palau", "pw", "680" ], [ "Palestine (‫فلسطين‬‎)", "ps", "970" ], [ "Panama (Panamá)", "pa", "507" ], [ "Papua New Guinea", "pg", "675" ], [ "Paraguay", "py", "595" ], [ "Peru (Perú)", "pe", "51" ], [ "Philippines", "ph", "63" ], [ "Poland (Polska)", "pl", "48" ], [ "Portugal", "pt", "351" ], [ "Puerto Rico", "pr", "1", 3, [ "787", "939" ] ], [ "Qatar (‫قطر‬‎)", "qa", "974" ], [ "Réunion (La Réunion)", "re", "262", 0 ], [ "Romania (România)", "ro", "40" ], [ "Russia (Россия)", "ru", "7", 0 ], [ "Rwanda", "rw", "250" ], [ "Saint Barthélemy", "bl", "590", 1 ], [ "Saint Helena", "sh", "290" ], [ "Saint Kitts and Nevis", "kn", "1", 18, [ "869" ] ], [ "Saint Lucia", "lc", "1", 19, [ "758" ] ], [ "Saint Martin (Saint-Martin (partie française))", "mf", "590", 2 ], [ "Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)", "pm", "508" ], [ "Saint Vincent and the Grenadines", "vc", "1", 20, [ "784" ] ], [ "Samoa", "ws", "685" ], [ "San Marino", "sm", "378" ], [ "São Tomé and Príncipe (São Tomé e Príncipe)", "st", "239" ], [ "Saudi Arabia (‫المملكة العربية السعودية‬‎)", "sa", "966" ], [ "Senegal (Sénégal)", "sn", "221" ], [ "Serbia (Србија)", "rs", "381" ], [ "Seychelles", "sc", "248" ], [ "Sierra Leone", "sl", "232" ], [ "Singapore", "sg", "65" ], [ "Sint Maarten", "sx", "1", 21, [ "721" ] ], [ "Slovakia (Slovensko)", "sk", "421" ], [ "Slovenia (Slovenija)", "si", "386" ], [ "Solomon Islands", "sb", "677" ], [ "Somalia (Soomaaliya)", "so", "252" ], [ "South Africa", "za", "27" ], [ "South Korea (대한민국)", "kr", "82" ], [ "South Sudan (‫جنوب السودان‬‎)", "ss", "211" ], [ "Spain (España)", "es", "34" ], [ "Sri Lanka (ශ්‍රී ලංකාව)", "lk", "94" ], [ "Sudan (‫السودان‬‎)", "sd", "249" ], [ "Suriname", "sr", "597" ], [ "Svalbard and Jan Mayen", "sj", "47", 1, [ "79" ] ], [ "Sweden (Sverige)", "se", "46" ], [ "Switzerland (Schweiz)", "ch", "41" ], [ "Syria (‫سوريا‬‎)", "sy", "963" ], [ "Taiwan (台灣)", "tw", "886" ], [ "Tajikistan", "tj", "992" ], [ "Tanzania", "tz", "255" ], [ "Thailand (ไทย)", "th", "66" ], [ "Timor-Leste", "tl", "670" ], [ "Togo", "tg", "228" ], [ "Tokelau", "tk", "690" ], [ "Tonga", "to", "676" ], [ "Trinidad and Tobago", "tt", "1", 22, [ "868" ] ], [ "Tunisia (‫تونس‬‎)", "tn", "216" ], [ "Turkey (Türkiye)", "tr", "90" ], [ "Turkmenistan", "tm", "993" ], [ "Turks and Caicos Islands", "tc", "1", 23, [ "649" ] ], [ "Tuvalu", "tv", "688" ], [ "U.S. Virgin Islands", "vi", "1", 24, [ "340" ] ], [ "Uganda", "ug", "256" ], [ "Ukraine (Україна)", "ua", "380" ], [ "United Arab Emirates (‫الإمارات العربية المتحدة‬‎)", "ae", "971" ], [ "United Kingdom", "gb", "44", 0 ], [ "United States", "us", "1", 0 ], [ "Uruguay", "uy", "598" ], [ "Uzbekistan (Oʻzbekiston)", "uz", "998" ], [ "Vanuatu", "vu", "678" ], [ "Vatican City (Città del Vaticano)", "va", "39", 1, [ "06698" ] ], [ "Venezuela", "ve", "58" ], [ "Vietnam (Việt Nam)", "vn", "84" ], [ "Wallis and Futuna (Wallis-et-Futuna)", "wf", "681" ], [ "Western Sahara (‫الصحراء الغربية‬‎)", "eh", "212", 1, [ "5288", "5289" ] ], [ "Yemen (‫اليمن‬‎)", "ye", "967" ], [ "Zambia", "zm", "260" ], [ "Zimbabwe", "zw", "263" ], [ "Åland Islands", "ax", "358", 1, [ "18" ] ] ];
26579
+ var allCountries = [ [ "Afghanistan (‫افغانستان‬‎)", "af", "93" ], [ "Albania (Shqipëri)", "al", "355" ], [ "Algeria (‫الجزائر‬‎)", "dz", "213" ], [ "American Samoa", "as", "1", 5, [ "684" ] ], [ "Andorra", "ad", "376" ], [ "Angola", "ao", "244" ], [ "Anguilla", "ai", "1", 6, [ "264" ] ], [ "Antigua and Barbuda", "ag", "1", 7, [ "268" ] ], [ "Argentina", "ar", "54" ], [ "Armenia (Հայաստան)", "am", "374" ], [ "Aruba", "aw", "297" ], [ "Ascension Island", "ac", "247" ], [ "Australia", "au", "61", 0 ], [ "Austria (Österreich)", "at", "43" ], [ "Azerbaijan (Azərbaycan)", "az", "994" ], [ "Bahamas", "bs", "1", 8, [ "242" ] ], [ "Bahrain (‫البحرين‬‎)", "bh", "973" ], [ "Bangladesh (বাংলাদেশ)", "bd", "880" ], [ "Barbados", "bb", "1", 9, [ "246" ] ], [ "Belarus (Беларусь)", "by", "375" ], [ "Belgium (België)", "be", "32" ], [ "Belize", "bz", "501" ], [ "Benin (Bénin)", "bj", "229" ], [ "Bermuda", "bm", "1", 10, [ "441" ] ], [ "Bhutan (འབྲུག)", "bt", "975" ], [ "Bolivia", "bo", "591" ], [ "Bosnia and Herzegovina (Босна и Херцеговина)", "ba", "387" ], [ "Botswana", "bw", "267" ], [ "Brazil (Brasil)", "br", "55" ], [ "British Indian Ocean Territory", "io", "246" ], [ "British Virgin Islands", "vg", "1", 11, [ "284" ] ], [ "Brunei", "bn", "673" ], [ "Bulgaria (България)", "bg", "359" ], [ "Burkina Faso", "bf", "226" ], [ "Burundi (Uburundi)", "bi", "257" ], [ "Cambodia (កម្ពុជា)", "kh", "855" ], [ "Cameroon (Cameroun)", "cm", "237" ], [ "Canada", "ca", "1", 1, [ "204", "226", "236", "249", "250", "263", "289", "306", "343", "354", "365", "367", "368", "382", "387", "403", "416", "418", "428", "431", "437", "438", "450", "584", "468", "474", "506", "514", "519", "548", "579", "581", "584", "587", "604", "613", "639", "647", "672", "683", "705", "709", "742", "753", "778", "780", "782", "807", "819", "825", "867", "873", "902", "905" ] ], [ "Cape Verde (Kabu Verdi)", "cv", "238" ], [ "Caribbean Netherlands", "bq", "599", 1, [ "3", "4", "7" ] ], [ "Cayman Islands", "ky", "1", 12, [ "345" ] ], [ "Central African Republic (République centrafricaine)", "cf", "236" ], [ "Chad (Tchad)", "td", "235" ], [ "Chile", "cl", "56" ], [ "China (中国)", "cn", "86" ], [ "Christmas Island", "cx", "61", 2, [ "89164" ] ], [ "Cocos (Keeling) Islands", "cc", "61", 1, [ "89162" ] ], [ "Colombia", "co", "57" ], [ "Comoros (‫جزر القمر‬‎)", "km", "269" ], [ "Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)", "cd", "243" ], [ "Congo (Republic) (Congo-Brazzaville)", "cg", "242" ], [ "Cook Islands", "ck", "682" ], [ "Costa Rica", "cr", "506" ], [ "Côte d’Ivoire", "ci", "225" ], [ "Croatia (Hrvatska)", "hr", "385" ], [ "Cuba", "cu", "53" ], [ "Curaçao", "cw", "599", 0 ], [ "Cyprus (Κύπρος)", "cy", "357" ], [ "Czech Republic (Česká republika)", "cz", "420" ], [ "Denmark (Danmark)", "dk", "45" ], [ "Djibouti", "dj", "253" ], [ "Dominica", "dm", "1", 13, [ "767" ] ], [ "Dominican Republic (República Dominicana)", "do", "1", 2, [ "809", "829", "849" ] ], [ "Ecuador", "ec", "593" ], [ "Egypt (‫مصر‬‎)", "eg", "20" ], [ "El Salvador", "sv", "503" ], [ "Equatorial Guinea (Guinea Ecuatorial)", "gq", "240" ], [ "Eritrea", "er", "291" ], [ "Estonia (Eesti)", "ee", "372" ], [ "Eswatini", "sz", "268" ], [ "Ethiopia", "et", "251" ], [ "Falkland Islands (Islas Malvinas)", "fk", "500" ], [ "Faroe Islands (Føroyar)", "fo", "298" ], [ "Fiji", "fj", "679" ], [ "Finland (Suomi)", "fi", "358", 0 ], [ "France", "fr", "33" ], [ "French Guiana (Guyane française)", "gf", "594" ], [ "French Polynesia (Polynésie française)", "pf", "689" ], [ "Gabon", "ga", "241" ], [ "Gambia", "gm", "220" ], [ "Georgia (საქართველო)", "ge", "995" ], [ "Germany (Deutschland)", "de", "49" ], [ "Ghana (Gaana)", "gh", "233" ], [ "Gibraltar", "gi", "350" ], [ "Greece (Ελλάδα)", "gr", "30" ], [ "Greenland (Kalaallit Nunaat)", "gl", "299" ], [ "Grenada", "gd", "1", 14, [ "473" ] ], [ "Guadeloupe", "gp", "590", 0 ], [ "Guam", "gu", "1", 15, [ "671" ] ], [ "Guatemala", "gt", "502" ], [ "Guernsey", "gg", "44", 1, [ "1481", "7781", "7839", "7911" ] ], [ "Guinea (Guinée)", "gn", "224" ], [ "Guinea-Bissau (Guiné Bissau)", "gw", "245" ], [ "Guyana", "gy", "592" ], [ "Haiti", "ht", "509" ], [ "Honduras", "hn", "504" ], [ "Hong Kong (香港)", "hk", "852" ], [ "Hungary (Magyarország)", "hu", "36" ], [ "Iceland (Ísland)", "is", "354" ], [ "India (भारत)", "in", "91" ], [ "Indonesia", "id", "62" ], [ "Iran (‫ایران‬‎)", "ir", "98" ], [ "Iraq (‫العراق‬‎)", "iq", "964" ], [ "Ireland", "ie", "353" ], [ "Isle of Man", "im", "44", 2, [ "1624", "74576", "7524", "7924", "7624" ] ], [ "Israel (‫ישראל‬‎)", "il", "972" ], [ "Italy (Italia)", "it", "39", 0 ], [ "Jamaica", "jm", "1", 4, [ "876", "658" ] ], [ "Japan (日本)", "jp", "81" ], [ "Jersey", "je", "44", 3, [ "1534", "7509", "7700", "7797", "7829", "7937" ] ], [ "Jordan (‫الأردن‬‎)", "jo", "962" ], [ "Kazakhstan (Казахстан)", "kz", "7", 1, [ "33", "7" ] ], [ "Kenya", "ke", "254" ], [ "Kiribati", "ki", "686" ], [ "Kosovo", "xk", "383" ], [ "Kuwait (‫الكويت‬‎)", "kw", "965" ], [ "Kyrgyzstan (Кыргызстан)", "kg", "996" ], [ "Laos (ລາວ)", "la", "856" ], [ "Latvia (Latvija)", "lv", "371" ], [ "Lebanon (‫لبنان‬‎)", "lb", "961" ], [ "Lesotho", "ls", "266" ], [ "Liberia", "lr", "231" ], [ "Libya (‫ليبيا‬‎)", "ly", "218" ], [ "Liechtenstein", "li", "423" ], [ "Lithuania (Lietuva)", "lt", "370" ], [ "Luxembourg", "lu", "352" ], [ "Macau (澳門)", "mo", "853" ], [ "Madagascar (Madagasikara)", "mg", "261" ], [ "Malawi", "mw", "265" ], [ "Malaysia", "my", "60" ], [ "Maldives", "mv", "960" ], [ "Mali", "ml", "223" ], [ "Malta", "mt", "356" ], [ "Marshall Islands", "mh", "692" ], [ "Martinique", "mq", "596" ], [ "Mauritania (‫موريتانيا‬‎)", "mr", "222" ], [ "Mauritius (Moris)", "mu", "230" ], [ "Mayotte", "yt", "262", 1, [ "269", "639" ] ], [ "Mexico (México)", "mx", "52" ], [ "Micronesia", "fm", "691" ], [ "Moldova (Republica Moldova)", "md", "373" ], [ "Monaco", "mc", "377" ], [ "Mongolia (Монгол)", "mn", "976" ], [ "Montenegro (Crna Gora)", "me", "382" ], [ "Montserrat", "ms", "1", 16, [ "664" ] ], [ "Morocco (‫المغرب‬‎)", "ma", "212", 0 ], [ "Mozambique (Moçambique)", "mz", "258" ], [ "Myanmar (Burma) (မြန်မာ)", "mm", "95" ], [ "Namibia (Namibië)", "na", "264" ], [ "Nauru", "nr", "674" ], [ "Nepal (नेपाल)", "np", "977" ], [ "Netherlands (Nederland)", "nl", "31" ], [ "New Caledonia (Nouvelle-Calédonie)", "nc", "687" ], [ "New Zealand", "nz", "64" ], [ "Nicaragua", "ni", "505" ], [ "Niger (Nijar)", "ne", "227" ], [ "Nigeria", "ng", "234" ], [ "Niue", "nu", "683" ], [ "Norfolk Island", "nf", "672" ], [ "North Korea (조선 민주주의 인민 공화국)", "kp", "850" ], [ "North Macedonia (Северна Македонија)", "mk", "389" ], [ "Northern Mariana Islands", "mp", "1", 17, [ "670" ] ], [ "Norway (Norge)", "no", "47", 0 ], [ "Oman (‫عُمان‬‎)", "om", "968" ], [ "Pakistan (‫پاکستان‬‎)", "pk", "92" ], [ "Palau", "pw", "680" ], [ "Palestine (‫فلسطين‬‎)", "ps", "970" ], [ "Panama (Panamá)", "pa", "507" ], [ "Papua New Guinea", "pg", "675" ], [ "Paraguay", "py", "595" ], [ "Peru (Perú)", "pe", "51" ], [ "Philippines", "ph", "63" ], [ "Poland (Polska)", "pl", "48" ], [ "Portugal", "pt", "351" ], [ "Puerto Rico", "pr", "1", 3, [ "787", "939" ] ], [ "Qatar (‫قطر‬‎)", "qa", "974" ], [ "Réunion (La Réunion)", "re", "262", 0 ], [ "Romania (România)", "ro", "40" ], [ "Russia (Россия)", "ru", "7", 0 ], [ "Rwanda", "rw", "250" ], [ "Saint Barthélemy", "bl", "590", 1 ], [ "Saint Helena", "sh", "290" ], [ "Saint Kitts and Nevis", "kn", "1", 18, [ "869" ] ], [ "Saint Lucia", "lc", "1", 19, [ "758" ] ], [ "Saint Martin (Saint-Martin (partie française))", "mf", "590", 2 ], [ "Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)", "pm", "508" ], [ "Saint Vincent and the Grenadines", "vc", "1", 20, [ "784" ] ], [ "Samoa", "ws", "685" ], [ "San Marino", "sm", "378" ], [ "São Tomé and Príncipe (São Tomé e Príncipe)", "st", "239" ], [ "Saudi Arabia (‫المملكة العربية السعودية‬‎)", "sa", "966" ], [ "Senegal (Sénégal)", "sn", "221" ], [ "Serbia (Србија)", "rs", "381" ], [ "Seychelles", "sc", "248" ], [ "Sierra Leone", "sl", "232" ], [ "Singapore", "sg", "65" ], [ "Sint Maarten", "sx", "1", 21, [ "721" ] ], [ "Slovakia (Slovensko)", "sk", "421" ], [ "Slovenia (Slovenija)", "si", "386" ], [ "Solomon Islands", "sb", "677" ], [ "Somalia (Soomaaliya)", "so", "252" ], [ "South Africa", "za", "27" ], [ "South Korea (대한민국)", "kr", "82" ], [ "South Sudan (‫جنوب السودان‬‎)", "ss", "211" ], [ "Spain (España)", "es", "34" ], [ "Sri Lanka (ශ්‍රී ලංකාව)", "lk", "94" ], [ "Sudan (‫السودان‬‎)", "sd", "249" ], [ "Suriname", "sr", "597" ], [ "Svalbard and Jan Mayen", "sj", "47", 1, [ "79" ] ], [ "Sweden (Sverige)", "se", "46" ], [ "Switzerland (Schweiz)", "ch", "41" ], [ "Syria (‫سوريا‬‎)", "sy", "963" ], [ "Taiwan (台灣)", "tw", "886" ], [ "Tajikistan", "tj", "992" ], [ "Tanzania", "tz", "255" ], [ "Thailand (ไทย)", "th", "66" ], [ "Timor-Leste", "tl", "670" ], [ "Togo", "tg", "228" ], [ "Tokelau", "tk", "690" ], [ "Tonga", "to", "676" ], [ "Trinidad and Tobago", "tt", "1", 22, [ "868" ] ], [ "Tunisia (‫تونس‬‎)", "tn", "216" ], [ "Turkey (Türkiye)", "tr", "90" ], [ "Turkmenistan", "tm", "993" ], [ "Turks and Caicos Islands", "tc", "1", 23, [ "649" ] ], [ "Tuvalu", "tv", "688" ], [ "U.S. Virgin Islands", "vi", "1", 24, [ "340" ] ], [ "Uganda", "ug", "256" ], [ "Ukraine (Україна)", "ua", "380" ], [ "United Arab Emirates (‫الإمارات العربية المتحدة‬‎)", "ae", "971" ], [ "United Kingdom", "gb", "44", 0 ], [ "United States", "us", "1", 0 ], [ "Uruguay", "uy", "598" ], [ "Uzbekistan (Oʻzbekiston)", "uz", "998" ], [ "Vanuatu", "vu", "678" ], [ "Vatican City (Città del Vaticano)", "va", "39", 1, [ "06698" ] ], [ "Venezuela", "ve", "58" ], [ "Vietnam (Việt Nam)", "vn", "84" ], [ "Wallis and Futuna (Wallis-et-Futuna)", "wf", "681" ], [ "Western Sahara (‫الصحراء الغربية‬‎)", "eh", "212", 1, [ "5288", "5289" ] ], [ "Yemen (‫اليمن‬‎)", "ye", "967" ], [ "Zambia", "zm", "260" ], [ "Zimbabwe", "zw", "263" ], [ "Åland Islands", "ax", "358", 1, [ "18" ] ] ];
26580
26580
  // loop over all of the countries above, restructuring the data to be objects with named keys
26581
26581
  for (var i = 0; i < allCountries.length; i++) {
26582
26582
  var c = allCountries[i];
@@ -26588,6 +26588,35 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
26588
26588
  areaCodes: c[4] || null
26589
26589
  };
26590
26590
  }
26591
+ function _objectSpread(target) {
26592
+ for (var i = 1; i < arguments.length; i++) {
26593
+ var source = arguments[i] != null ? Object(arguments[i]) : {};
26594
+ var ownKeys = Object.keys(source);
26595
+ if (typeof Object.getOwnPropertySymbols === "function") {
26596
+ ownKeys.push.apply(ownKeys, Object.getOwnPropertySymbols(source).filter(function(sym) {
26597
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
26598
+ }));
26599
+ }
26600
+ ownKeys.forEach(function(key) {
26601
+ _defineProperty(target, key, source[key]);
26602
+ });
26603
+ }
26604
+ return target;
26605
+ }
26606
+ function _defineProperty(obj, key, value) {
26607
+ key = _toPropertyKey(key);
26608
+ if (key in obj) {
26609
+ Object.defineProperty(obj, key, {
26610
+ value: value,
26611
+ enumerable: true,
26612
+ configurable: true,
26613
+ writable: true
26614
+ });
26615
+ } else {
26616
+ obj[key] = value;
26617
+ }
26618
+ return obj;
26619
+ }
26591
26620
  function _classCallCheck(instance, Constructor) {
26592
26621
  if (!(instance instanceof Constructor)) {
26593
26622
  throw new TypeError("Cannot call a class as a function");
@@ -26599,14 +26628,31 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
26599
26628
  descriptor.enumerable = descriptor.enumerable || false;
26600
26629
  descriptor.configurable = true;
26601
26630
  if ("value" in descriptor) descriptor.writable = true;
26602
- Object.defineProperty(target, descriptor.key, descriptor);
26631
+ Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
26603
26632
  }
26604
26633
  }
26605
26634
  function _createClass(Constructor, protoProps, staticProps) {
26606
26635
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
26607
26636
  if (staticProps) _defineProperties(Constructor, staticProps);
26637
+ Object.defineProperty(Constructor, "prototype", {
26638
+ writable: false
26639
+ });
26608
26640
  return Constructor;
26609
26641
  }
26642
+ function _toPropertyKey(arg) {
26643
+ var key = _toPrimitive(arg, "string");
26644
+ return typeof key === "symbol" ? key : String(key);
26645
+ }
26646
+ function _toPrimitive(input, hint) {
26647
+ if (typeof input !== "object" || input === null) return input;
26648
+ var prim = input[Symbol.toPrimitive];
26649
+ if (prim !== undefined$1) {
26650
+ var res = prim.call(input, hint || "default");
26651
+ if (typeof res !== "object") return res;
26652
+ throw new TypeError("@@toPrimitive must return a primitive value.");
26653
+ }
26654
+ return (hint === "string" ? String : Number)(input);
26655
+ }
26610
26656
  var intlTelInputGlobals = {
26611
26657
  getInstance: function getInstance(input) {
26612
26658
  var id = input.getAttribute("data-intl-tel-input-id");
@@ -26618,14 +26664,17 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
26618
26664
  return document.readyState === "complete";
26619
26665
  }
26620
26666
  };
26621
- if (typeof window === "object") window.intlTelInputGlobals = intlTelInputGlobals;
26667
+ if (typeof window === "object") {
26668
+ window.intlTelInputGlobals = intlTelInputGlobals;
26669
+ }
26622
26670
  // these vars persist through all instances of the plugin
26623
26671
  var id = 0;
26624
26672
  var defaults = {
26625
26673
  // whether or not to allow the dropdown
26626
26674
  allowDropdown: true,
26627
- // if there is just a dial code in the input: remove it on blur
26628
- autoHideDialCode: true,
26675
+ // auto insert dial code (A) on init, (B) on user selecting a country, (C) on calling setCountry
26676
+ // also listen for blur/submit and auto remove dial code if that's all there is
26677
+ autoInsertDialCode: false,
26629
26678
  // add a placeholder in the input with an example number for the selected country
26630
26679
  autoPlaceholder: "polite",
26631
26680
  // modify the parentClass
@@ -26646,7 +26695,7 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
26646
26695
  initialCountry: "",
26647
26696
  // localized country names e.g. { 'de': 'Deutschland' }
26648
26697
  localizedCountries: null,
26649
- // don't insert international dial codes
26698
+ // national vs international formatting for numbers e.g. placeholders and displaying existing numbers
26650
26699
  nationalMode: true,
26651
26700
  // display only these countries
26652
26701
  onlyCountries: [],
@@ -26654,8 +26703,10 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
26654
26703
  placeholderNumberType: "MOBILE",
26655
26704
  // the countries at the top of the list. defaults to united states and united kingdom
26656
26705
  preferredCountries: [ "us", "gb" ],
26657
- // display the country dial code next to the selected flag so it's not part of the typed number
26706
+ // display the country dial code next to the selected flag
26658
26707
  separateDialCode: false,
26708
+ // option to hide the flags - must be used with separateDialCode, or allowDropdown=false
26709
+ showFlags: true,
26659
26710
  // specify the path to the libphonenumber script to enable validation/formatting
26660
26711
  utilsScript: ""
26661
26712
  };
@@ -26677,8 +26728,7 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
26677
26728
  };
26678
26729
  // this is our plugin class that we will create an instance of
26679
26730
  // eslint-disable-next-line no-unused-vars
26680
- var Iti = /*#__PURE__*/
26681
- function() {
26731
+ var Iti = /*#__PURE__*/ function() {
26682
26732
  function Iti(input, options) {
26683
26733
  var _this = this;
26684
26734
  _classCallCheck(this, Iti);
@@ -26699,13 +26749,19 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
26699
26749
  key: "_init",
26700
26750
  value: function _init() {
26701
26751
  var _this2 = this;
26702
- // if in nationalMode, disable options relating to dial codes
26703
- if (this.options.nationalMode) this.options.autoHideDialCode = false;
26704
- // if separateDialCode then doesn't make sense to A) insert dial code into input
26705
- // (autoHideDialCode), and B) display national numbers (because we're displaying the country
26706
- // dial code next to them)
26752
+ // if in nationalMode, do not insert dial codes
26753
+ if (this.options.nationalMode) {
26754
+ this.options.autoInsertDialCode = false;
26755
+ }
26756
+ // if separateDialCode enabled, do not insert dial codes
26707
26757
  if (this.options.separateDialCode) {
26708
- this.options.autoHideDialCode = this.options.nationalMode = false;
26758
+ this.options.autoInsertDialCode = false;
26759
+ }
26760
+ // force showFlags=true if there's a dropdown and we're not displaying the dial code,
26761
+ // as otherwise you just have a down arrow on it's own which doesn't make sense
26762
+ var forceShowFlags = this.options.allowDropdown && !this.options.separateDialCode;
26763
+ if (!this.options.showFlags && forceShowFlags) {
26764
+ this.options.showFlags = true;
26709
26765
  }
26710
26766
  // we cannot just test screen size as some smartphones/website meta tags will report desktop
26711
26767
  // resolutions
@@ -26717,8 +26773,12 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
26717
26773
  // trigger the mobile dropdown css
26718
26774
  document.body.classList.add("iti-mobile");
26719
26775
  // on mobile, we want a full screen dropdown, so we must append it to the body
26720
- if (!this.options.dropdownContainer) this.options.dropdownContainer = document.body;
26776
+ if (!this.options.dropdownContainer) {
26777
+ this.options.dropdownContainer = document.body;
26778
+ }
26721
26779
  }
26780
+ // check if input has one parent with RTL
26781
+ this.isRTL = !!this.telInput.closest("[dir=rtl]");
26722
26782
  // these promises get resolved when their individual requests complete
26723
26783
  // this way the dev can do something like iti.promise.then(...) to know when all requests are
26724
26784
  // complete
@@ -26746,7 +26806,7 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
26746
26806
  this._generateMarkup();
26747
26807
  // set the initial state of the input value and the selected flag
26748
26808
  this._setInitialState();
26749
- // start all of the event listeners: autoHideDialCode, input keydown, selectedFlag click
26809
+ // start all of the event listeners: autoInsertDialCode, input keydown, selectedFlag click
26750
26810
  this._initListeners();
26751
26811
  // utils script, and auto country
26752
26812
  this._initRequests();
@@ -26761,7 +26821,9 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
26761
26821
  // process the preferredCountries
26762
26822
  this._processPreferredCountries();
26763
26823
  // translate countries according to localizedCountries option
26764
- if (this.options.localizedCountries) this._translateCountriesByLocale();
26824
+ if (this.options.localizedCountries) {
26825
+ this._translateCountriesByLocale();
26826
+ }
26765
26827
  // sort countries by name
26766
26828
  if (this.options.onlyCountries.length || this.options.localizedCountries) {
26767
26829
  this.countries.sort(this._countryNameSort);
@@ -26778,7 +26840,9 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
26778
26840
  }
26779
26841
  // bail if we already have this country for this countryCode
26780
26842
  for (var i = 0; i < this.countryCodes[countryCode].length; i++) {
26781
- if (this.countryCodes[countryCode][i] === iso2) return;
26843
+ if (this.countryCodes[countryCode][i] === iso2) {
26844
+ return;
26845
+ }
26782
26846
  }
26783
26847
  // check for undefined as 0 is falsy
26784
26848
  var index = priority !== undefined$1 ? priority : this.countryCodes[countryCode].length;
@@ -26818,7 +26882,13 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
26818
26882
  }, {
26819
26883
  key: "_countryNameSort",
26820
26884
  value: function _countryNameSort(a, b) {
26821
- return a.name.localeCompare(b.name);
26885
+ if (a.name < b.name) {
26886
+ return -1;
26887
+ }
26888
+ if (a.name > b.name) {
26889
+ return 1;
26890
+ }
26891
+ return 0;
26822
26892
  }
26823
26893
  }, {
26824
26894
  key: "_processCountryCodes",
@@ -26831,7 +26901,9 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
26831
26901
  // first: add dial codes
26832
26902
  for (var i = 0; i < this.countries.length; i++) {
26833
26903
  var c = this.countries[i];
26834
- if (!this.dialCodes[c.dialCode]) this.dialCodes[c.dialCode] = true;
26904
+ if (!this.dialCodes[c.dialCode]) {
26905
+ this.dialCodes[c.dialCode] = true;
26906
+ }
26835
26907
  this._addCountryCode(c.iso2, c.dialCode, c.priority);
26836
26908
  }
26837
26909
  // next: add area codes
@@ -26866,17 +26938,23 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
26866
26938
  for (var i = 0; i < this.options.preferredCountries.length; i++) {
26867
26939
  var countryCode = this.options.preferredCountries[i].toLowerCase();
26868
26940
  var countryData = this._getCountryData(countryCode, false, true);
26869
- if (countryData) this.preferredCountries.push(countryData);
26941
+ if (countryData) {
26942
+ this.preferredCountries.push(countryData);
26943
+ }
26870
26944
  }
26871
26945
  }
26872
26946
  }, {
26873
26947
  key: "_createEl",
26874
26948
  value: function _createEl(name, attrs, container) {
26875
26949
  var el = document.createElement(name);
26876
- if (attrs) forEachProp(attrs, function(key, value) {
26877
- return el.setAttribute(key, value);
26878
- });
26879
- if (container) container.appendChild(el);
26950
+ if (attrs) {
26951
+ forEachProp(attrs, function(key, value) {
26952
+ return el.setAttribute(key, value);
26953
+ });
26954
+ }
26955
+ if (container) {
26956
+ container.appendChild(el);
26957
+ }
26880
26958
  return el;
26881
26959
  }
26882
26960
  }, {
@@ -26885,45 +26963,69 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
26885
26963
  // if autocomplete does not exist on the element and its form, then
26886
26964
  // prevent autocomplete as there's no safe, cross-browser event we can react to, so it can
26887
26965
  // easily put the plugin in an inconsistent state e.g. the wrong flag selected for the
26888
- // autocompleted number, which on submit could mean wrong number is saved (esp in nationalMode)
26966
+ // autocompleted number, which on submit could mean wrong number is saved
26889
26967
  if (!this.telInput.hasAttribute("autocomplete") && !(this.telInput.form && this.telInput.form.hasAttribute("autocomplete"))) {
26890
26968
  this.telInput.setAttribute("autocomplete", "off");
26891
26969
  }
26970
+ var _this$options = this.options, allowDropdown = _this$options.allowDropdown, separateDialCode = _this$options.separateDialCode, showFlags = _this$options.showFlags, customContainer = _this$options.customContainer, hiddenInput = _this$options.hiddenInput, dropdownContainer = _this$options.dropdownContainer;
26892
26971
  // containers (mostly for positioning)
26893
26972
  var parentClass = "iti";
26894
- if (this.options.allowDropdown) parentClass += " iti--allow-dropdown";
26895
- if (this.options.separateDialCode) parentClass += " iti--separate-dial-code";
26896
- if (this.options.customContainer) {
26897
- parentClass += " ";
26898
- parentClass += this.options.customContainer;
26973
+ if (allowDropdown) {
26974
+ parentClass += " iti--allow-dropdown";
26975
+ }
26976
+ if (separateDialCode) {
26977
+ parentClass += " iti--separate-dial-code";
26978
+ }
26979
+ if (showFlags) {
26980
+ parentClass += " iti--show-flags";
26981
+ }
26982
+ if (customContainer) {
26983
+ parentClass += " ".concat(customContainer);
26899
26984
  }
26900
26985
  var wrapper = this._createEl("div", {
26901
26986
  "class": parentClass
26902
26987
  });
26903
26988
  this.telInput.parentNode.insertBefore(wrapper, this.telInput);
26904
- this.flagsContainer = this._createEl("div", {
26905
- "class": "iti__flag-container"
26906
- }, wrapper);
26989
+ // only hide the flagsContainer if allowDropdown, showFlags and separateDialCode are all false
26990
+ var showFlagsContainer = allowDropdown || showFlags || separateDialCode;
26991
+ if (showFlagsContainer) {
26992
+ this.flagsContainer = this._createEl("div", {
26993
+ "class": "iti__flag-container"
26994
+ }, wrapper);
26995
+ }
26907
26996
  wrapper.appendChild(this.telInput);
26908
26997
  // selected flag (displayed to left of input)
26909
- this.selectedFlag = this._createEl("div", {
26910
- "class": "iti__selected-flag",
26911
- role: "combobox",
26912
- "aria-controls": "iti-".concat(this.id, "__country-listbox"),
26913
- "aria-owns": "iti-".concat(this.id, "__country-listbox"),
26914
- "aria-expanded": "false"
26915
- }, this.flagsContainer);
26916
- this.selectedFlagInner = this._createEl("div", {
26917
- "class": "iti__flag"
26918
- }, this.selectedFlag);
26919
- if (this.options.separateDialCode) {
26998
+ // using Aria tags for "Select-Only Combobox Example"
26999
+ // https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/
27000
+ if (showFlagsContainer) {
27001
+ this.selectedFlag = this._createEl("div", _objectSpread({
27002
+ "class": "iti__selected-flag"
27003
+ }, allowDropdown && {
27004
+ role: "combobox",
27005
+ "aria-haspopup": "listbox",
27006
+ "aria-controls": "iti-".concat(this.id, "__country-listbox"),
27007
+ "aria-expanded": "false",
27008
+ "aria-label": "Telephone country code"
27009
+ }), this.flagsContainer);
27010
+ }
27011
+ if (showFlags) {
27012
+ this.selectedFlagInner = this._createEl("div", {
27013
+ "class": "iti__flag"
27014
+ }, this.selectedFlag);
27015
+ }
27016
+ if (this.selectedFlag && this.telInput.disabled) {
27017
+ this.selectedFlag.setAttribute("aria-disabled", "true");
27018
+ }
27019
+ if (separateDialCode) {
26920
27020
  this.selectedDialCode = this._createEl("div", {
26921
27021
  "class": "iti__selected-dial-code"
26922
27022
  }, this.selectedFlag);
26923
27023
  }
26924
- if (this.options.allowDropdown) {
26925
- // make element focusable and tab navigable
26926
- this.selectedFlag.setAttribute("tabindex", "0");
27024
+ if (allowDropdown) {
27025
+ if (!this.telInput.disabled) {
27026
+ // make element focusable and tab navigable
27027
+ this.selectedFlag.setAttribute("tabindex", "0");
27028
+ }
26927
27029
  this.dropdownArrow = this._createEl("div", {
26928
27030
  "class": "iti__arrow"
26929
27031
  }, this.selectedFlag);
@@ -26944,7 +27046,7 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
26944
27046
  }
26945
27047
  this._appendListItems(this.countries, "iti__standard");
26946
27048
  // create dropdownContainer markup
26947
- if (this.options.dropdownContainer) {
27049
+ if (dropdownContainer) {
26948
27050
  this.dropdown = this._createEl("div", {
26949
27051
  "class": "iti iti--container"
26950
27052
  });
@@ -26953,14 +27055,16 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
26953
27055
  this.flagsContainer.appendChild(this.countryList);
26954
27056
  }
26955
27057
  }
26956
- if (this.options.hiddenInput) {
26957
- var hiddenInputName = this.options.hiddenInput;
27058
+ if (hiddenInput) {
27059
+ var hiddenInputName = hiddenInput;
26958
27060
  var name = this.telInput.getAttribute("name");
26959
27061
  if (name) {
26960
27062
  var i = name.lastIndexOf("[");
26961
27063
  // if input name contains square brackets, then give the hidden input the same name,
26962
27064
  // replacing the contents of the last set of brackets with the given hiddenInput name
26963
- if (i !== -1) hiddenInputName = "".concat(name.substr(0, i), "[").concat(hiddenInputName, "]");
27065
+ if (i !== -1) {
27066
+ hiddenInputName = "".concat(name.substr(0, i), "[").concat(hiddenInputName, "]");
27067
+ }
26964
27068
  }
26965
27069
  this.hiddenInput = this._createEl("input", {
26966
27070
  type: "hidden",
@@ -26982,7 +27086,9 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
26982
27086
  // open the list item
26983
27087
  tmp += "<li class='iti__country ".concat(className, "' tabIndex='-1' id='iti-").concat(this.id, "__item-").concat(c.iso2).concat(idSuffix, "' role='option' data-dial-code='").concat(c.dialCode, "' data-country-code='").concat(c.iso2, "' aria-selected='false'>");
26984
27088
  // add the flag
26985
- tmp += "<div class='iti__flag-box'><div class='iti__flag iti__".concat(c.iso2, "'></div></div>");
27089
+ if (this.options.showFlags) {
27090
+ tmp += "<div class='iti__flag-box'><div class='iti__flag iti__".concat(c.iso2, "'></div></div>");
27091
+ }
26986
27092
  // and the country name and dial code
26987
27093
  tmp += "<span class='iti__country-name'>".concat(c.name, "</span>");
26988
27094
  tmp += "<span class='iti__dial-code'>+".concat(c.dialCode, "</span>");
@@ -27003,7 +27109,7 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27003
27109
  var val = useAttribute ? attributeValue : inputValue;
27004
27110
  var dialCode = this._getDialCode(val);
27005
27111
  var isRegionlessNanp = this._isRegionlessNanp(val);
27006
- var _this$options = this.options, initialCountry = _this$options.initialCountry, nationalMode = _this$options.nationalMode, autoHideDialCode = _this$options.autoHideDialCode, separateDialCode = _this$options.separateDialCode;
27112
+ var _this$options2 = this.options, initialCountry = _this$options2.initialCountry, autoInsertDialCode = _this$options2.autoInsertDialCode;
27007
27113
  // if we already have a dial code, and it's not a regionlessNanp, we can go ahead and set the
27008
27114
  // flag, else fall back to the default country
27009
27115
  if (dialCode && !isRegionlessNanp) {
@@ -27024,22 +27130,30 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27024
27130
  }
27025
27131
  }
27026
27132
  }
27027
- // if empty and no nationalMode and no autoHideDialCode then insert the default dial code
27028
- if (!val && !nationalMode && !autoHideDialCode && !separateDialCode) {
27133
+ // if empty and autoInsertDialCode then insert the dial code
27134
+ if (!val && autoInsertDialCode) {
27029
27135
  this.telInput.value = "+".concat(this.selectedCountryData.dialCode);
27030
27136
  }
27031
27137
  }
27032
27138
  // NOTE: if initialCountry is set to auto, that will be handled separately
27033
27139
  // format - note this wont be run after _updateDialCode as that's only called if no val
27034
- if (val) this._updateValFromNumber(val);
27140
+ if (val) {
27141
+ this._updateValFromNumber(val);
27142
+ }
27035
27143
  }
27036
27144
  }, {
27037
27145
  key: "_initListeners",
27038
27146
  value: function _initListeners() {
27039
27147
  this._initKeyListeners();
27040
- if (this.options.autoHideDialCode) this._initBlurListeners();
27041
- if (this.options.allowDropdown) this._initDropdownListeners();
27042
- if (this.hiddenInput) this._initHiddenInputListener();
27148
+ if (this.options.autoInsertDialCode) {
27149
+ this._initBlurListeners();
27150
+ }
27151
+ if (this.options.allowDropdown) {
27152
+ this._initDropdownListeners();
27153
+ }
27154
+ if (this.hiddenInput) {
27155
+ this._initHiddenInputListener();
27156
+ }
27043
27157
  }
27044
27158
  }, {
27045
27159
  key: "_initHiddenInputListener",
@@ -27048,7 +27162,9 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27048
27162
  this._handleHiddenInputSubmit = function() {
27049
27163
  _this3.hiddenInput.value = _this3.getNumber();
27050
27164
  };
27051
- if (this.telInput.form) this.telInput.form.addEventListener("submit", this._handleHiddenInputSubmit);
27165
+ if (this.telInput.form) {
27166
+ this.telInput.form.addEventListener("submit", this._handleHiddenInputSubmit);
27167
+ }
27052
27168
  }
27053
27169
  }, {
27054
27170
  key: "_getClosestLabel",
@@ -27068,10 +27184,16 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27068
27184
  // close it again
27069
27185
  this._handleLabelClick = function(e) {
27070
27186
  // if the dropdown is closed, then focus the input, else ignore the click
27071
- if (_this4.countryList.classList.contains("iti__hide")) _this4.telInput.focus(); else e.preventDefault();
27187
+ if (_this4.countryList.classList.contains("iti__hide")) {
27188
+ _this4.telInput.focus();
27189
+ } else {
27190
+ e.preventDefault();
27191
+ }
27072
27192
  };
27073
27193
  var label = this._getClosestLabel();
27074
- if (label) label.addEventListener("click", this._handleLabelClick);
27194
+ if (label) {
27195
+ label.addEventListener("click", this._handleLabelClick);
27196
+ }
27075
27197
  // toggle country dropdown on click
27076
27198
  this._handleClickSelectedFlag = function() {
27077
27199
  // only intercept this event if we're opening the dropdown
@@ -27093,7 +27215,9 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27093
27215
  _this4._showDropdown();
27094
27216
  }
27095
27217
  // allow navigation from dropdown to input on TAB
27096
- if (e.key === "Tab") _this4._closeDropdown();
27218
+ if (e.key === "Tab") {
27219
+ _this4._closeDropdown();
27220
+ }
27097
27221
  };
27098
27222
  this.flagsContainer.addEventListener("keydown", this._handleFlagsContainerKeydown);
27099
27223
  }
@@ -27112,8 +27236,14 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27112
27236
  window.intlTelInputGlobals.loadUtils(_this5.options.utilsScript);
27113
27237
  });
27114
27238
  }
27115
- } else this.resolveUtilsScriptPromise();
27116
- if (this.options.initialCountry === "auto") this._loadAutoCountry(); else this.resolveAutoCountryPromise();
27239
+ } else {
27240
+ this.resolveUtilsScriptPromise();
27241
+ }
27242
+ if (this.options.initialCountry === "auto") {
27243
+ this._loadAutoCountry();
27244
+ } else {
27245
+ this.resolveAutoCountryPromise();
27246
+ }
27117
27247
  }
27118
27248
  }, {
27119
27249
  key: "_loadAutoCountry",
@@ -27178,7 +27308,9 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27178
27308
  this._handleSubmitOrBlurEvent = function() {
27179
27309
  _this7._removeEmptyDialCode();
27180
27310
  };
27181
- if (this.telInput.form) this.telInput.form.addEventListener("submit", this._handleSubmitOrBlurEvent);
27311
+ if (this.telInput.form) {
27312
+ this.telInput.form.addEventListener("submit", this._handleSubmitOrBlurEvent);
27313
+ }
27182
27314
  this.telInput.addEventListener("blur", this._handleSubmitOrBlurEvent);
27183
27315
  }
27184
27316
  }, {
@@ -27226,7 +27358,11 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27226
27358
  }, {
27227
27359
  key: "_toggleClass",
27228
27360
  value: function _toggleClass(el, className, shouldHaveClass) {
27229
- if (shouldHaveClass && !el.classList.contains(className)) el.classList.add(className); else if (!shouldHaveClass && el.classList.contains(className)) el.classList.remove(className);
27361
+ if (shouldHaveClass && !el.classList.contains(className)) {
27362
+ el.classList.add(className);
27363
+ } else if (!shouldHaveClass && el.classList.contains(className)) {
27364
+ el.classList.remove(className);
27365
+ }
27230
27366
  }
27231
27367
  }, {
27232
27368
  key: "_setDropdownPosition",
@@ -27282,13 +27418,17 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27282
27418
  this._handleMouseoverCountryList = function(e) {
27283
27419
  // handle event delegation, as we're listening for this event on the countryList
27284
27420
  var listItem = _this9._getClosestListItem(e.target);
27285
- if (listItem) _this9._highlightListItem(listItem, false);
27421
+ if (listItem) {
27422
+ _this9._highlightListItem(listItem, false);
27423
+ }
27286
27424
  };
27287
27425
  this.countryList.addEventListener("mouseover", this._handleMouseoverCountryList);
27288
27426
  // listen for country selection
27289
27427
  this._handleClickCountryList = function(e) {
27290
27428
  var listItem = _this9._getClosestListItem(e.target);
27291
- if (listItem) _this9._selectListItem(listItem);
27429
+ if (listItem) {
27430
+ _this9._selectListItem(listItem);
27431
+ }
27292
27432
  };
27293
27433
  this.countryList.addEventListener("click", this._handleClickCountryList);
27294
27434
  // click off to close
@@ -27296,7 +27436,9 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27296
27436
  // we cannot just stopPropagation as it may be needed to close another instance
27297
27437
  var isOpening = true;
27298
27438
  this._handleClickOffToClose = function() {
27299
- if (!isOpening) _this9._closeDropdown();
27439
+ if (!isOpening) {
27440
+ _this9._closeDropdown();
27441
+ }
27300
27442
  isOpening = false;
27301
27443
  };
27302
27444
  document.documentElement.addEventListener("click", this._handleClickOffToClose);
@@ -27311,9 +27453,17 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27311
27453
  // and enter key from submitting a form etc
27312
27454
  e.preventDefault();
27313
27455
  // up and down to navigate
27314
- if (e.key === "ArrowUp" || e.key === "Up" || e.key === "ArrowDown" || e.key === "Down") _this9._handleUpDownKey(e.key); else if (e.key === "Enter") _this9._handleEnterKey(); else if (e.key === "Escape") _this9._closeDropdown(); else if (/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(e.key)) {
27456
+ if (e.key === "ArrowUp" || e.key === "Up" || e.key === "ArrowDown" || e.key === "Down") {
27457
+ _this9._handleUpDownKey(e.key);
27458
+ } else if (e.key === "Enter") {
27459
+ _this9._handleEnterKey();
27460
+ } else if (e.key === "Escape") {
27461
+ _this9._closeDropdown();
27462
+ } else if (/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(e.key)) {
27315
27463
  // jump to countries that start with the query string
27316
- if (queryTimer) clearTimeout(queryTimer);
27464
+ if (queryTimer) {
27465
+ clearTimeout(queryTimer);
27466
+ }
27317
27467
  query += e.key.toLowerCase();
27318
27468
  _this9._searchForCountry(query);
27319
27469
  // if the timer hits 1 second, reset the query
@@ -27339,7 +27489,9 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27339
27489
  }, {
27340
27490
  key: "_handleEnterKey",
27341
27491
  value: function _handleEnterKey() {
27342
- if (this.highlightedItem) this._selectListItem(this.highlightedItem);
27492
+ if (this.highlightedItem) {
27493
+ this._selectListItem(this.highlightedItem);
27494
+ }
27343
27495
  }
27344
27496
  }, {
27345
27497
  key: "_searchForCountry",
@@ -27364,7 +27516,7 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27364
27516
  value: function _updateValFromNumber(originalNumber) {
27365
27517
  var number = originalNumber;
27366
27518
  if (this.options.formatOnDisplay && window.intlTelInputUtils && this.selectedCountryData) {
27367
- var useNational = !this.options.separateDialCode && (this.options.nationalMode || number.charAt(0) !== "+");
27519
+ var useNational = this.options.nationalMode || number.charAt(0) !== "+" && !this.options.separateDialCode;
27368
27520
  var _intlTelInputUtils$nu = intlTelInputUtils.numberFormat, NATIONAL = _intlTelInputUtils$nu.NATIONAL, INTERNATIONAL = _intlTelInputUtils$nu.INTERNATIONAL;
27369
27521
  var format = useNational ? NATIONAL : INTERNATIONAL;
27370
27522
  number = intlTelInputUtils.formatNumber(number, this.selectedCountryData.iso2, format);
@@ -27375,7 +27527,7 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27375
27527
  }, {
27376
27528
  key: "_updateFlagFromNumber",
27377
27529
  value: function _updateFlagFromNumber(originalNumber) {
27378
- // if we're in nationalMode and we already have US/Canada selected, make sure the number starts
27530
+ // if we already have US/Canada selected, make sure the number starts
27379
27531
  // with a +1 so _getDialCode will be able to extract the area code
27380
27532
  // update: if we dont yet have selectedCountryData, but we're here (trying to update the flag
27381
27533
  // from the number), that means we're initialising the plugin with a number that already has a
@@ -27383,11 +27535,13 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27383
27535
  var number = originalNumber;
27384
27536
  var selectedDialCode = this.selectedCountryData.dialCode;
27385
27537
  var isNanp = selectedDialCode === "1";
27386
- if (number && this.options.nationalMode && isNanp && number.charAt(0) !== "+") {
27387
- if (number.charAt(0) !== "1") number = "1".concat(number);
27538
+ if (number && isNanp && number.charAt(0) !== "+") {
27539
+ if (number.charAt(0) !== "1") {
27540
+ number = "1".concat(number);
27541
+ }
27388
27542
  number = "+".concat(number);
27389
27543
  }
27390
- // update flag if user types area code for another country
27544
+ // if separateDialCode enabled, then consider the selected dial code to be part of the number
27391
27545
  if (this.options.separateDialCode && selectedDialCode && number.charAt(0) !== "+") {
27392
27546
  number = "+".concat(selectedDialCode).concat(number);
27393
27547
  }
@@ -27445,10 +27599,15 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27445
27599
  key: "_highlightListItem",
27446
27600
  value: function _highlightListItem(listItem, shouldFocus) {
27447
27601
  var prevItem = this.highlightedItem;
27448
- if (prevItem) prevItem.classList.remove("iti__highlight");
27602
+ if (prevItem) {
27603
+ prevItem.classList.remove("iti__highlight");
27604
+ }
27449
27605
  this.highlightedItem = listItem;
27450
27606
  this.highlightedItem.classList.add("iti__highlight");
27451
- if (shouldFocus) this.highlightedItem.focus();
27607
+ this.selectedFlag.setAttribute("aria-activedescendant", listItem.getAttribute("id"));
27608
+ if (shouldFocus) {
27609
+ this.highlightedItem.focus();
27610
+ }
27452
27611
  }
27453
27612
  }, {
27454
27613
  key: "_getCountryData",
@@ -27467,6 +27626,7 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27467
27626
  }, {
27468
27627
  key: "_setFlag",
27469
27628
  value: function _setFlag(countryCode) {
27629
+ var _this$options3 = this.options, allowDropdown = _this$options3.allowDropdown, separateDialCode = _this$options3.separateDialCode, showFlags = _this$options3.showFlags;
27470
27630
  var prevCountry = this.selectedCountryData.iso2 ? this.selectedCountryData : {};
27471
27631
  // do this first as it will throw an error and stop if countryCode is invalid
27472
27632
  this.selectedCountryData = countryCode ? this._getCountryData(countryCode, false, false) : {};
@@ -27474,22 +27634,26 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27474
27634
  if (this.selectedCountryData.iso2) {
27475
27635
  this.defaultCountry = this.selectedCountryData.iso2;
27476
27636
  }
27477
- this.selectedFlagInner.setAttribute("class", "iti__flag iti__".concat(countryCode));
27478
- // update the selected country's title attribute
27479
- var title = countryCode ? "".concat(this.selectedCountryData.name, ": +").concat(this.selectedCountryData.dialCode) : "Unknown";
27480
- this.selectedFlag.setAttribute("title", title);
27481
- if (this.options.separateDialCode) {
27637
+ if (showFlags) {
27638
+ this.selectedFlagInner.setAttribute("class", "iti__flag iti__".concat(countryCode));
27639
+ }
27640
+ this._setSelectedCountryFlagTitleAttribute(countryCode, separateDialCode);
27641
+ if (separateDialCode) {
27482
27642
  var dialCode = this.selectedCountryData.dialCode ? "+".concat(this.selectedCountryData.dialCode) : "";
27483
27643
  this.selectedDialCode.innerHTML = dialCode;
27484
27644
  // offsetWidth is zero if input is in a hidden container during initialisation
27485
27645
  var selectedFlagWidth = this.selectedFlag.offsetWidth || this._getHiddenSelectedFlagWidth();
27486
27646
  // add 6px of padding after the grey selected-dial-code box, as this is what we use in the css
27487
- this.telInput.style.paddingLeft = "".concat(selectedFlagWidth + 6, "px");
27647
+ if (this.isRTL) {
27648
+ this.telInput.style.paddingRight = "".concat(selectedFlagWidth + 6, "px");
27649
+ } else {
27650
+ this.telInput.style.paddingLeft = "".concat(selectedFlagWidth + 6, "px");
27651
+ }
27488
27652
  }
27489
27653
  // and the input's placeholder
27490
27654
  this._updatePlaceholder();
27491
27655
  // update the active list item
27492
- if (this.options.allowDropdown) {
27656
+ if (allowDropdown) {
27493
27657
  var prevItem = this.activeItem;
27494
27658
  if (prevItem) {
27495
27659
  prevItem.classList.remove("iti__active");
@@ -27501,12 +27665,29 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27501
27665
  nextItem.setAttribute("aria-selected", "true");
27502
27666
  nextItem.classList.add("iti__active");
27503
27667
  this.activeItem = nextItem;
27504
- this.selectedFlag.setAttribute("aria-activedescendant", nextItem.getAttribute("id"));
27505
27668
  }
27506
27669
  }
27507
27670
  // return if the flag has changed or not
27508
27671
  return prevCountry.iso2 !== countryCode;
27509
27672
  }
27673
+ }, {
27674
+ key: "_setSelectedCountryFlagTitleAttribute",
27675
+ value: function _setSelectedCountryFlagTitleAttribute(countryCode, separateDialCode) {
27676
+ if (!this.selectedFlag) {
27677
+ return;
27678
+ }
27679
+ var title;
27680
+ if (countryCode && !separateDialCode) {
27681
+ title = "".concat(this.selectedCountryData.name, ": +").concat(this.selectedCountryData.dialCode);
27682
+ } else if (countryCode) {
27683
+ // For screen reader output, we don't want to include the dial code in the reader output twice
27684
+ // so just use the selected country name here:
27685
+ title = this.selectedCountryData.name;
27686
+ } else {
27687
+ title = "Unknown";
27688
+ }
27689
+ this.selectedFlag.setAttribute("title", title);
27690
+ }
27510
27691
  }, {
27511
27692
  key: "_getHiddenSelectedFlagWidth",
27512
27693
  value: function _getHiddenSelectedFlagWidth() {
@@ -27543,11 +27724,11 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27543
27724
  // update selected flag and active list item
27544
27725
  var flagChanged = this._setFlag(listItem.getAttribute("data-country-code"));
27545
27726
  this._closeDropdown();
27546
- this._updateDialCode(listItem.getAttribute("data-dial-code"), true);
27727
+ this._updateDialCode(listItem.getAttribute("data-dial-code"));
27547
27728
  // focus the input
27548
27729
  this.telInput.focus();
27549
- // put cursor at end - this fix is required for FF and IE11 (with nationalMode=false i.e. auto
27550
- // inserting dial code), who try to put the cursor at the beginning the first time
27730
+ // put cursor at end - this fix is required for FF and IE11 (with auto inserting dial code),
27731
+ // who try to put the cursor at the beginning the first time
27551
27732
  var len = this.telInput.value.length;
27552
27733
  this.telInput.setSelectionRange(len, len);
27553
27734
  if (flagChanged) {
@@ -27559,6 +27740,7 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27559
27740
  value: function _closeDropdown() {
27560
27741
  this.countryList.classList.add("iti__hide");
27561
27742
  this.selectedFlag.setAttribute("aria-expanded", "false");
27743
+ this.selectedFlag.removeAttribute("aria-activedescendant");
27562
27744
  // update the arrow
27563
27745
  this.dropdownArrow.classList.remove("iti__arrow--up");
27564
27746
  // unbind key events
@@ -27568,8 +27750,12 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27568
27750
  this.countryList.removeEventListener("click", this._handleClickCountryList);
27569
27751
  // remove menu from container
27570
27752
  if (this.options.dropdownContainer) {
27571
- if (!this.isMobile) window.removeEventListener("scroll", this._handleWindowScroll);
27572
- if (this.dropdown.parentNode) this.dropdown.parentNode.removeChild(this.dropdown);
27753
+ if (!this.isMobile) {
27754
+ window.removeEventListener("scroll", this._handleWindowScroll);
27755
+ }
27756
+ if (this.dropdown.parentNode) {
27757
+ this.dropdown.parentNode.removeChild(this.dropdown);
27758
+ }
27573
27759
  }
27574
27760
  this._trigger("close:countrydropdown");
27575
27761
  }
@@ -27589,24 +27775,28 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27589
27775
  var middleOffset = containerHeight / 2 - elementHeight / 2;
27590
27776
  if (elementTop < containerTop) {
27591
27777
  // scroll up
27592
- if (middle) newScrollTop -= middleOffset;
27778
+ if (middle) {
27779
+ newScrollTop -= middleOffset;
27780
+ }
27593
27781
  container.scrollTop = newScrollTop;
27594
27782
  } else if (elementBottom > containerBottom) {
27595
27783
  // scroll down
27596
- if (middle) newScrollTop += middleOffset;
27784
+ if (middle) {
27785
+ newScrollTop += middleOffset;
27786
+ }
27597
27787
  var heightDifference = containerHeight - elementHeight;
27598
27788
  container.scrollTop = newScrollTop - heightDifference;
27599
27789
  }
27600
27790
  }
27601
27791
  }, {
27602
27792
  key: "_updateDialCode",
27603
- value: function _updateDialCode(newDialCodeBare, hasSelectedListItem) {
27793
+ value: function _updateDialCode(newDialCodeBare) {
27604
27794
  var inputVal = this.telInput.value;
27605
27795
  // save having to pass this every time
27606
27796
  var newDialCode = "+".concat(newDialCodeBare);
27607
27797
  var newNumber;
27608
27798
  if (inputVal.charAt(0) === "+") {
27609
- // there's a plus so we're dealing with a replacement (doesn't matter if nationalMode or not)
27799
+ // there's a plus so we're dealing with a replacement
27610
27800
  var prevDialCode = this._getDialCode(inputVal);
27611
27801
  if (prevDialCode) {
27612
27802
  // current number contains a valid dial code, so replace it
@@ -27616,23 +27806,16 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27616
27806
  // (no way to determine where the invalid dial code ends and the rest of the number begins)
27617
27807
  newNumber = newDialCode;
27618
27808
  }
27619
- } else if (this.options.nationalMode || this.options.separateDialCode) {
27620
- // don't do anything
27621
- return;
27622
- } else {
27623
- // nationalMode is disabled
27809
+ this.telInput.value = newNumber;
27810
+ } else if (this.options.autoInsertDialCode) {
27624
27811
  if (inputVal) {
27625
27812
  // there is an existing value with no dial code: prefix the new dial code
27626
27813
  newNumber = newDialCode + inputVal;
27627
- } else if (hasSelectedListItem || !this.options.autoHideDialCode) {
27628
- // no existing value and either they've just selected a list item, or autoHideDialCode is
27629
- // disabled: insert new dial code
27630
- newNumber = newDialCode;
27631
27814
  } else {
27632
- return;
27815
+ newNumber = newDialCode;
27633
27816
  }
27817
+ this.telInput.value = newNumber;
27634
27818
  }
27635
- this.telInput.value = newNumber;
27636
27819
  }
27637
27820
  }, {
27638
27821
  key: "_getDialCode",
@@ -27747,13 +27930,19 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27747
27930
  this.flagsContainer.removeEventListener("keydown", this._handleFlagsContainerKeydown);
27748
27931
  // label click hack
27749
27932
  var label = this._getClosestLabel();
27750
- if (label) label.removeEventListener("click", this._handleLabelClick);
27933
+ if (label) {
27934
+ label.removeEventListener("click", this._handleLabelClick);
27935
+ }
27751
27936
  }
27752
27937
  // unbind hiddenInput listeners
27753
- if (this.hiddenInput && form) form.removeEventListener("submit", this._handleHiddenInputSubmit);
27754
- // unbind autoHideDialCode listeners
27755
- if (this.options.autoHideDialCode) {
27756
- if (form) form.removeEventListener("submit", this._handleSubmitOrBlurEvent);
27938
+ if (this.hiddenInput && form) {
27939
+ form.removeEventListener("submit", this._handleHiddenInputSubmit);
27940
+ }
27941
+ // unbind autoInsertDialCode listeners
27942
+ if (this.options.autoInsertDialCode) {
27943
+ if (form) {
27944
+ form.removeEventListener("submit", this._handleSubmitOrBlurEvent);
27945
+ }
27757
27946
  this.telInput.removeEventListener("blur", this._handleSubmitOrBlurEvent);
27758
27947
  }
27759
27948
  // unbind key events, and cut/paste events
@@ -27811,17 +28000,22 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27811
28000
  key: "isValidNumber",
27812
28001
  value: function isValidNumber() {
27813
28002
  var val = this._getFullNumber().trim();
27814
- var countryCode = this.options.nationalMode ? this.selectedCountryData.iso2 : "";
27815
- return window.intlTelInputUtils ? intlTelInputUtils.isValidNumber(val, countryCode) : null;
28003
+ return window.intlTelInputUtils ? intlTelInputUtils.isValidNumber(val, this.selectedCountryData.iso2) : null;
28004
+ }
28005
+ }, {
28006
+ key: "isPossibleNumber",
28007
+ value: function isPossibleNumber() {
28008
+ var val = this._getFullNumber().trim();
28009
+ return window.intlTelInputUtils ? intlTelInputUtils.isPossibleNumber(val, this.selectedCountryData.iso2) : null;
27816
28010
  }
27817
28011
  }, {
27818
28012
  key: "setCountry",
27819
28013
  value: function setCountry(originalCountryCode) {
27820
28014
  var countryCode = originalCountryCode.toLowerCase();
27821
28015
  // check if already selected
27822
- if (!this.selectedFlagInner.classList.contains("iti__".concat(countryCode))) {
28016
+ if (this.selectedCountryData.iso2 !== countryCode) {
27823
28017
  this._setFlag(countryCode);
27824
- this._updateDialCode(this.selectedCountryData.dialCode, false);
28018
+ this._updateDialCode(this.selectedCountryData.dialCode);
27825
28019
  this._triggerCountryChange();
27826
28020
  }
27827
28021
  }
@@ -27858,11 +28052,15 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27858
28052
  var script = document.createElement("script");
27859
28053
  script.onload = function() {
27860
28054
  forEachInstance("handleUtils");
27861
- if (handleSuccess) handleSuccess();
28055
+ if (handleSuccess) {
28056
+ handleSuccess();
28057
+ }
27862
28058
  };
27863
28059
  script.onerror = function() {
27864
28060
  forEachInstance("rejectUtilsScriptPromise");
27865
- if (handleFailure) handleFailure();
28061
+ if (handleFailure) {
28062
+ handleFailure();
28063
+ }
27866
28064
  };
27867
28065
  script.className = "iti-load-utils";
27868
28066
  script.async = true;
@@ -27891,7 +28089,7 @@ var intlTelInput$1 = createCommonjsModule(function (module) {
27891
28089
  // default options
27892
28090
  intlTelInputGlobals.defaults = defaults;
27893
28091
  // version
27894
- intlTelInputGlobals.version = "17.0.13";
28092
+ intlTelInputGlobals.version = "18.2.1";
27895
28093
  // convenience wrapper
27896
28094
  return function(input, options) {
27897
28095
  var iti = new Iti(input, options);