1/* 2 * International Telephone Input v17.0.8 3 * https://github.com/jackocnr/intl-tel-input.git 4 * Licensed under the MIT license 5 */ 6! function(a) { 7 "object" == typeof module && module.exports ? module.exports = a() : window.intlTelInput = a() 8}(function(a) { 9 "use strict"; 10 return function() { 11 function b(a, b) { 12 if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") 13 } 14 15 function c(a, b) { 16 for (var c = 0; c < b.length; c++) { 17 var d = b[c]; 18 d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) 19 } 20 } 21 22 function d(a, b, d) { 23 return b && c(a.prototype, b), d && c(a, d), a 24 } 25 for (var e = [ 26 ["Afghanistan (â«Ø§ÙØºØ§ÙØ³ØªØ§Ùâ¬â)", "af", "93"], 27 ["Albania (Shqipëri)", "al", "355"], 28 ["Algeria (â«Ø§Ùجزائرâ¬â)", "dz", "213"], 29 ["American Samoa", "as", "1", 5, ["684"]], 30 ["Andorra", "ad", "376"], 31 ["Angola", "ao", "244"], 32 ["Anguilla", "ai", "1", 6, ["264"]], 33 ["Antigua and Barbuda", "ag", "1", 7, ["268"]], 34 ["Argentina", "ar", "54"], 35 ["Armenia (ÕÕ¡ÕµÕ¡Õ½Õ¿Õ¡Õ¶)", "am", "374"], 36 ["Aruba", "aw", "297"], 37 ["Australia", "au", "61", 0], 38 ["Austria (Ãsterreich)", "at", "43"], 39 ["Azerbaijan (AzÉrbaycan)", "az", "994"], 40 ["Bahamas", "bs", "1", 8, ["242"]], 41 ["Bahrain (â«Ø§ÙØ¨ØØ±ÙÙâ¬â)", "bh", "973"], 42 ["Bangladesh (বাà¦à¦²à¦¾à¦¦à§à¦¶)", "bd", "880"], 43 ["Barbados", "bb", "1", 9, ["246"]], 44 ["Belarus (ÐелаÑÑÑÑ)", "by", "375"], 45 ["Belgium (België)", "be", "32"], 46 ["Belize", "bz", "501"], 47 ["Benin (Bénin)", "bj", "229"], 48 ["Bermuda", "bm", "1", 10, ["441"]], 49 ["Bhutan (འà½à¾²à½´à½)", "bt", "975"], 50 ["Bolivia", "bo", "591"], 51 ["Bosnia and Herzegovina (ÐоÑна и ХеÑÑеговина)", "ba", "387"], 52 ["Botswana", "bw", "267"], 53 ["Brazil (Brasil)", "br", "55"], 54 ["British Indian Ocean Territory", "io", "246"], 55 ["British Virgin Islands", "vg", "1", 11, ["284"]], 56 ["Brunei", "bn", "673"], 57 ["Bulgaria (ÐÑлгаÑиÑ)", "bg", "359"], 58 ["Burkina Faso", "bf", "226"], 59 ["Burundi (Uburundi)", "bi", "257"], 60 ["Cambodia (ááááá»áá¶)", "kh", "855"], 61 ["Cameroon (Cameroun)", "cm", "237"], 62 ["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"]], 63 ["Cape Verde (Kabu Verdi)", "cv", "238"], 64 ["Caribbean Netherlands", "bq", "599", 1, ["3", "4", "7"]], 65 ["Cayman Islands", "ky", "1", 12, ["345"]], 66 ["Central African Republic (République centrafricaine)", "cf", "236"], 67 ["Chad (Tchad)", "td", "235"], 68 ["Chile", "cl", "56"], 69 ["China (ä¸å½)", "cn", "86"], 70 ["Christmas Island", "cx", "61", 2, ["89164"]], 71 ["Cocos (Keeling) Islands", "cc", "61", 1, ["89162"]], 72 ["Colombia", "co", "57"], 73 ["Comoros (â«Ø¬Ø²Ø± اÙÙ٠رâ¬â)", "km", "269"], 74 ["Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)", "cd", "243"], 75 ["Congo (Republic) (Congo-Brazzaville)", "cg", "242"], 76 ["Cook Islands", "ck", "682"], 77 ["Costa Rica", "cr", "506"], 78 ["Côte dâIvoire", "ci", "225"], 79 ["Croatia (Hrvatska)", "hr", "385"], 80 ["Cuba", "cu", "53"], 81 ["Curaçao", "cw", "599", 0], 82 ["Cyprus (ÎÏÏÏοÏ)", "cy", "357"], 83 ["Czech Republic (Äeská republika)", "cz", "420"], 84 ["Denmark (Danmark)", "dk", "45"], 85 ["Djibouti", "dj", "253"], 86 ["Dominica", "dm", "1", 13, ["767"]], 87 ["Dominican Republic (República Dominicana)", "do", "1", 2, ["809", "829", "849"]], 88 ["Ecuador", "ec", "593"], 89 ["Egypt (â«Ù صرâ¬â)", "eg", "20"], 90 ["El Salvador", "sv", "503"], 91 ["Equatorial Guinea (Guinea Ecuatorial)", "gq", "240"], 92 ["Eritrea", "er", "291"], 93 ["Estonia (Eesti)", "ee", "372"], 94 ["Ethiopia", "et", "251"], 95 ["Falkland Islands (Islas Malvinas)", "fk", "500"], 96 ["Faroe Islands (Føroyar)", "fo", "298"], 97 ["Fiji", "fj", "679"], 98 ["Finland (Suomi)", "fi", "358", 0], 99 ["France", "fr", "33"], 100 ["French Guiana (Guyane française)", "gf", "594"], 101 ["French Polynesia (Polynésie française)", "pf", "689"], 102 ["Gabon", "ga", "241"], 103 ["Gambia", "gm", "220"], 104 ["Georgia (á¡áá¥áá ááááá)", "ge", "995"], 105 ["Germany (Deutschland)", "de", "49"], 106 ["Ghana (Gaana)", "gh", "233"], 107 ["Gibraltar", "gi", "350"], 108 ["Greece (Îλλάδα)", "gr", "30"],
109 ["Greenland (Kalaallit Nunaat)", "gl", "299"], 110 ["Grenada", "gd", "1", 14, ["473"]], 111 ["Guadeloupe", "gp", "590", 0], 112 ["Guam", "gu", "1", 15, ["671"]], 113 ["Guatemala", "gt", "502"], 114 ["Guernsey", "gg", "44", 1, ["1481", "7781", "7839", "7911"]], 115 ["Guinea (Guinée)", "gn", "224"], 116 ["Guinea-Bissau (Guiné Bissau)", "gw", "245"], 117 ["Guyana", "gy", "592"], 118 ["Haiti", "ht", "509"], 119 ["Honduras", "hn", "504"], 120 ["Hong Kong (馿¸¯)", "hk", "852"], 121 ["Hungary (Magyarország)", "hu", "36"], 122 ["Iceland (Ãsland)", "is", "354"], 123 ["India (à¤à¤¾à¤°à¤¤)", "in", "91"], 124 ["Indonesia", "id", "62"], 125 ["Iran (â«Ø§ÛراÙâ¬â)", "ir", "98"], 126 ["Iraq (â«Ø§ÙعراÙâ¬â)", "iq", "964"], 127 ["Ireland", "ie", "353"], 128 ["Isle of Man", "im", "44", 2, ["1624", "74576", "7524", "7924", "7624"]], 129 ["Israel (â«×שר××â¬â)", "il", "972"], 130 ["Italy (Italia)", "it", "39", 0], 131 ["Jamaica", "jm", "1", 4, ["876", "658"]], 132 ["Japan (æ¥æ¬)", "jp", "81"], 133 ["Jersey", "je", "44", 3, ["1534", "7509", "7700", "7797", "7829", "7937"]], 134 ["Jordan (â«Ø§ÙأردÙâ¬â)", "jo", "962"], 135 ["Kazakhstan (ÐÐ°Ð·Ð°Ñ ÑÑан)", "kz", "7", 1, ["33", "7"]], 136 ["Kenya", "ke", "254"], 137 ["Kiribati", "ki", "686"], 138 ["Kosovo", "xk", "383"], 139 ["Kuwait (â«Ø§ÙÙÙÙØªâ¬â)", "kw", "965"], 140 ["Kyrgyzstan (ÐÑÑгÑзÑÑан)", "kg", "996"], 141 ["Laos (ລາວ)", "la", "856"], 142 ["Latvia (Latvija)", "lv", "371"], 143 ["Lebanon (â«ÙØ¨ÙØ§Ùâ¬â)", "lb", "961"], 144 ["Lesotho", "ls", "266"], 145 ["Liberia", "lr", "231"], 146 ["Libya (â«ÙÙØ¨Ùاâ¬â)", "ly", "218"], 147 ["Liechtenstein", "li", "423"], 148 ["Lithuania (Lietuva)", "lt", "370"], 149 ["Luxembourg", "lu", "352"], 150 ["Macau (æ¾³é)", "mo", "853"], 151 ["Macedonia (FYROM) (ÐакедониÑа)", "mk", "389"], 152 ["Madagascar (Madagasikara)", "mg", "261"], 153 ["Malawi", "mw", "265"], 154 ["Malaysia", "my", "60"], 155 ["Maldives", "mv", "960"], 156 ["Mali", "ml", "223"], 157 ["Malta", "mt", "356"], 158 ["Marshall Islands", "mh", "692"], 159 ["Martinique", "mq", "596"], 160 ["Mauritania (â«Ù ÙØ±ÙتاÙÙØ§â¬â)", "mr", "222"], 161 ["Mauritius (Moris)", "mu", "230"], 162 ["Mayotte", "yt", "262", 1, ["269", "639"]], 163 ["Mexico (México)", "mx", "52"], 164 ["Micronesia", "fm", "691"], 165 ["Moldova (Republica Moldova)", "md", "373"], 166 ["Monaco", "mc", "377"], 167 ["Mongolia (Ðонгол)", "mn", "976"], 168 ["Montenegro (Crna Gora)", "me", "382"], 169 ["Montserrat", "ms", "1", 16, ["664"]], 170 ["Morocco (â«Ø§Ù٠غربâ¬â)", "ma", "212", 0], 171 ["Mozambique (Moçambique)", "mz", "258"], 172 ["Myanmar (Burma) (áá¼ááºáá¬)", "mm", "95"], 173 ["Namibia (Namibië)", "na", "264"], 174 ["Nauru", "nr", "674"], 175 ["Nepal (नà¥à¤ªà¤¾à¤²)", "np", "977"], 176 ["Netherlands (Nederland)", "nl", "31"], 177 ["New Caledonia (Nouvelle-Calédonie)", "nc", "687"], 178 ["New Zealand", "nz", "64"], 179 ["Nicaragua", "ni", "505"], 180 ["Niger (Nijar)", "ne", "227"], 181 ["Nigeria", "ng", "234"], 182 ["Niue", "nu", "683"], 183 ["Norfolk Island", "nf", "672"], 184 ["North Korea (ì¡°ì 민주주ì ì¸ë¯¼ ê³µíêµ)", "kp", "850"], 185 ["Northern Mariana Islands", "mp", "1", 17, ["670"]], 186 ["Norway (Norge)", "no", "47", 0], 187 ["Oman (â«Ø¹Ù٠اÙâ¬â)", "om", "968"], 188 ["Pakistan (â«Ù¾Ø§Ú©Ø³ØªØ§Ùâ¬â)", "pk", "92"], 189 ["Palau", "pw", "680"], 190 ["Palestine (â«ÙÙØ³Ø·ÙÙâ¬â)", "ps", "970"], 191 ["Panama (Panamá)", "pa", "507"], 192 ["Papua New Guinea", "pg", "675"], 193 ["Paraguay", "py", "595"], 194 ["Peru (Perú)", "pe", "51"], 195 ["Philippines", "ph", "63"], 196 ["Poland (Polska)", "pl", "48"], 197 ["Portugal", "pt", "351"], 198 ["Puerto Rico", "pr", "1", 3, ["787", "939"]], 199 ["Qatar (â«Ùطرâ¬â)", "qa", "974"], 200 ["Réunion (La Réunion)", "re", "262", 0], 201 ["Romania (România)", "ro", "40"], 202 ["Russia (РоÑÑиÑ)", "ru", "7", 0], 203 ["Rwanda", "rw", "250"], 204 ["Saint Barthélemy", "bl", "590", 1], 205 ["Saint Helena", "sh", "290"], 206 ["Saint Kitts and Nevis", "kn", "1", 18, ["869"]], 207 ["Saint Lucia", "lc", "1", 19, ["758"]], 208 ["Saint Martin (Saint-Martin (partie française))", "mf", "590", 2], 209 ["Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)", "pm", "508"], 210 ["Saint Vincent and the Grenadines", "vc", "1", 20, ["784"]], 211 ["Samoa", "ws", "685"], 212 ["San Marino", "sm", "378"], 213 ["São Tomé and PrÃncipe (São Tomé e PrÃncipe)", "st", "239"], 214 ["Saudi Arabia (â«Ø§ÙÙ Ù ÙÙØ© Ø§ÙØ¹Ø±Ø¨ÙØ© Ø§ÙØ³Ø¹ÙØ¯ÙØ©â¬â)", "sa", "966"], 215 ["Senegal (Sénégal)", "sn", "221"], 216 ["Serbia (СÑбиÑа)", "rs", "381"], 217 ["Seychelles", "sc", "248"],
218 ["Sierra Leone", "sl", "232"], 219 ["Singapore", "sg", "65"], 220 ["Sint Maarten", "sx", "1", 21, ["721"]], 221 ["Slovakia (Slovensko)", "sk", "421"], 222 ["Slovenia (Slovenija)", "si", "386"], 223 ["Solomon Islands", "sb", "677"], 224 ["Somalia (Soomaaliya)", "so", "252"], 225 ["South Africa", "za", "27"], 226 ["South Korea (ëí민êµ)", "kr", "82"], 227 ["South Sudan (â«Ø¬ÙÙØ¨ Ø§ÙØ³ÙداÙâ¬â)", "ss", "211"], 228 ["Spain (España)", "es", "34"], 229 ["Sri Lanka (à·à·âර෠ලà¶à¶à·à·)", "lk", "94"], 230 ["Sudan (â«Ø§ÙØ³ÙØ¯Ø§Ùâ¬â)", "sd", "249"], 231 ["Suriname", "sr", "597"], 232 ["Svalbard and Jan Mayen", "sj", "47", 1, ["79"]], 233 ["Swaziland", "sz", "268"], 234 ["Sweden (Sverige)", "se", "46"], 235 ["Switzerland (Schweiz)", "ch", "41"], 236 ["Syria (â«Ø³ÙØ±ÙØ§â¬â)", "sy", "963"], 237 ["Taiwan (å°ç£)", "tw", "886"], 238 ["Tajikistan", "tj", "992"], 239 ["Tanzania", "tz", "255"], 240 ["Thailand (à¹à¸à¸¢)", "th", "66"], 241 ["Timor-Leste", "tl", "670"], 242 ["Togo", "tg", "228"], 243 ["Tokelau", "tk", "690"], 244 ["Tonga", "to", "676"], 245 ["Trinidad and Tobago", "tt", "1", 22, ["868"]], 246 ["Tunisia (â«ØªÙÙØ³â¬â)", "tn", "216"], 247 ["Turkey (Türkiye)", "tr", "90"], 248 ["Turkmenistan", "tm", "993"], 249 ["Turks and Caicos Islands", "tc", "1", 23, ["649"]], 250 ["Tuvalu", "tv", "688"], 251 ["U.S. Virgin Islands", "vi", "1", 24, ["340"]], 252 ["Uganda", "ug", "256"], 253 ["Ukraine (УкÑаÑна)", "ua", "380"], 254 ["United Arab Emirates (â«Ø§Ùإ٠ارات Ø§ÙØ¹Ø±Ø¨ÙØ© اÙÙ ØªØØ¯Ø©â¬â)", "ae", "971"], 255 ["United Kingdom", "gb", "44", 0], 256 ["United States", "us", "1", 0], 257 ["Uruguay", "uy", "598"], 258 ["Uzbekistan (OÊ»zbekiston)", "uz", "998"], 259 ["Vanuatu", "vu", "678"], 260 ["Vatican City (Città del Vaticano)", "va", "39", 1, ["06698"]], 261 ["Venezuela", "ve", "58"], 262 ["Vietnam (Viá»t Nam)", "vn", "84"], 263 ["Wallis and Futuna (Wallis-et-Futuna)", "wf", "681"], 264 ["Western Sahara (â«Ø§ÙØµØØ±Ø§Ø¡ Ø§ÙØºØ±Ø¨ÙØ©â¬â)", "eh", "212", 1, ["5288", "5289"]], 265 ["Yemen (â«Ø§ÙÙÙ Ùâ¬â)", "ye", "967"], 266 ["Zambia", "zm", "260"], 267 ["Zimbabwe", "zw", "263"], 268 ["à land Islands", "ax", "358", 1, ["18"]] 269 ], f = 0; f < e.length; f++) { 270 var g = e[f]; 271 e[f] = { 272 name: g[0], 273 iso2: g[1], 274 dialCode: g[2], 275 priority: g[3] || 0, 276 areaCodes: g[4] || null 277 } 278 } 279 var h = { 280 getInstance: function(a) { 281 var b = a.getAttribute("data-intl-tel-input-id"); 282 return window.intlTelInputGlobals.instances[b] 283 }, 284 instances: {}, 285 documentReady: function() { 286 return "complete" === document.readyState 287 } 288 }; 289 "object" == typeof window && (window.intlTelInputGlobals = h); 290 var i = 0, 291 j = { 292 allowDropdown: !0, 293 autoHideDialCode: !0, 294 autoPlaceholder: "polite", 295 customContainer: "", 296 customPlaceholder: null, 297 dropdownContainer: null, 298 excludeCountries: [], 299 formatOnDisplay: !0, 300 geoIpLookup: null, 301 hiddenInput: "", 302 initialCountry: "", 303 localizedCountries: null, 304 nationalMode: !0, 305 onlyCountries: [], 306 placeholderNumberType: "MOBILE", 307 preferredCountries: ["us", "gb"], 308 separateDialCode: !1, 309 utilsScript: "" 310 }, 311 k = ["800", "822", "833", "844", "855", "866", "877", "880", "881", "882", "883", "884", "885", "886", "887", "888", "889"], 312 l = function(a, b) { 313 for (var c = Object.keys(a), d = 0; d < c.length; d++) b(c[d], a[c[d]]) 314 }, 315 m = function(a) { 316 l(window.intlTelInputGlobals.instances, function(b) { 317 window.intlTelInputGlobals.instances[b][a]() 318 }) 319 }, 320 n = function() { 321 function c(a, d) { 322 var e = this; 323 b(this, c), this.id = i++, this.a = a, this.b = null, this.c = null; 324 var f = d || {}; 325 this.d = {}, l(j, function(a, b) { 326 e.d[a] = f.hasOwnProperty(a) ? f[a] : b 327 }), this.e = Boolean(a.getAttribute("placeholder")) 328 } 329 return d(c, [{ 330 key: "_init", 331 value: function() { 332 var a = this; 333 if (this.d.nationalMode && (this.d.autoHideDialCode = !1), this.d.separateDialCode && (this.d.autoHideDialCode = this.d.nationalMode = !1), this.g = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), this.g && (document.body.classList.add("iti-mobile"), this.d.dropdownContainer || (this.d.dropdownContainer = document.body)), "undefined" != typeof Promise) { 334 var b = new Promise(function(b, c) { 335 a.h = b, a.i = c 336 }), 337 c = new Promise(function(b, c) { 338 a.i0 = b, a.i1 = c 339 }); 340 this.promise = Promise.all([b, c]) 341 } else this.h = this.i = function() {}, this.i0 = this.i1 = function() {}; 342 this.s = {}, this._b(), this._f(), this._h(), this._i(), this._i3() 343 } 344 }, { 345 key: "_b", 346 value: function() { 347 this._d(), this._d2(), this._e(), this.d.localizedCountries && this._d0(), (this.d.onlyCountries.length || this.d.localizedCountries) && this.p.sort(this._d1) 348 } 349 }, { 350 key: "_c", 351 value: function(b, c, d) { 352 c.length > this.countryCodeMaxLen && (this.countryCodeMaxLen = c.length), this.q.hasOwnProperty(c) || (this.q[c] = []); 353 for (var e = 0; e < this.q[c].length; e++) 354 if (this.q[c][e] === b) return; 355 var f = d !== a ? d : this.q[c].length; 356 this.q[c][f] = b 357 } 358 }, { 359 key: "_d", 360 value: function() { 361 if (this.d.onlyCountries.length) { 362 var a = this.d.onlyCountries.map(function(a) { 363 return a.toLowerCase() 364 }); 365 this.p = e.filter(function(b) { 366 return a.indexOf(b.iso2) > -1 367 }) 368 } else if (this.d.excludeCountries.length) { 369 var b = this.d.excludeCountries.map(function(a) { 370 return a.toLowerCase() 371 }); 372 this.p = e.filter(function(a) { 373 return -1 === b.indexOf(a.iso2) 374 }) 375 } else this.p = e 376 } 377 }, { 378 key: "_d0", 379 value: function() { 380 for (var a = 0; a < this.p.length; a++) { 381 var b = this.p[a].iso2.toLowerCase(); 382 this.d.localizedCountries.hasOwnProperty(b) && (this.p[a].name = this.d.localizedCountries[b]) 383 } 384 } 385 }, { 386 key: "_d1", 387 value: function(a, b) { 388 return a.name.localeCompare(b.name) 389 } 390 }, { 391 key: "_d2", 392 value: function() { 393 this.countryCodeMaxLen = 0, this.dialCodes = {}, this.q = {}; 394 for (var a = 0; a < this.p.length; a++) { 395 var b = this.p[a]; 396 this.dialCodes[b.dialCode] || (this.dialCodes[b.dialCode] = !0), this._c(b.iso2, b.dialCode, b.priority) 397 } 398 for (var c = 0; c < this.p.length; c++) { 399 var d = this.p[c]; 400 if (d.areaCodes) 401 for (var e = this.q[d.dialCode][0], f = 0; f < d.areaCodes.length; f++) { 402 for (var g = d.areaCodes[f], h
402= 1; h < g.length; h++) { 403 var i = d.dialCode + g.substr(0, h); 404 this._c(e, i), this._c(d.iso2, i) 405 } 406 this._c(d.iso2, d.dialCode + g) 407 } 408 } 409 } 410 }, { 411 key: "_e", 412 value: function() { 413 this.preferredCountries = []; 414 for (var a = 0; a < this.d.preferredCountries.length; a++) { 415 var b = this.d.preferredCountries[a].toLowerCase(), 416 c = this._y(b, !1, !0); 417 c && this.preferredCountries.push(c) 418 } 419 } 420 }, { 421 key: "_e2", 422 value: function(a, b, c) { 423 var d = document.createElement(a); 424 return b && l(b, function(a, b) { 425 return d.setAttribute(a, b) 426 }), c && c.appendChild(d), d 427 } 428 }, { 429 key: "_f", 430 value: function() { 431 this.a.hasAttribute("autocomplete") || this.a.form && this.a.form.hasAttribute("autocomplete") || this.a.setAttribute("autocomplete", "off"); 432 var a = "iti"; 433 this.d.allowDropdown && (a += " iti--allow-dropdown"), this.d.separateDialCode && (a += " iti--separate-dial-code"), this.d.customContainer && (a += " ", a += this.d.customContainer); 434 var b = this._e2("div", { 435 "class": a 436 }); 437 if (this.a.parentNode.insertBefore(b, this.a), this.k = this._e2("div", { 438 "class": "iti__flag-container" 439 }, b), b.appendChild(this.a), this.selectedFlag = this._e2("div", { 440 "class": "iti__selected-flag", 441 role: "combobox", 442 "aria-controls": "iti-".concat(this.id, "__country-listbox"), 443 "aria-owns": "iti-".concat(this.id, "__country-listbox"), 444 "aria-expanded": "false" 445 }, this.k), this.l = this._e2("div", { 446 "class": "iti__flag" 447 }, this.selectedFlag), this.d.separateDialCode && (this.t = this._e2("div", { 448 "class": "iti__selected-dial-code" 449 }, this.selectedFlag)), this.d.allowDropdown && (this.selectedFlag.setAttribute("tabindex", "0"), this.u = this._e2("div", { 450 "class": "iti__arrow" 451 }, this.selectedFlag), this.m = this._e2("ul", { 452 "class": "iti__country-list iti__hide", 453 id: "iti-".concat(this.id, "__country-listbox"), 454 role: "listbox", 455 "aria-label": "List of countries" 456 }), this.preferredCountries.length && (this._g(this.preferredCountries, "iti__preferred", !0), this._e2("li", { 457 "class": "iti__divider", 458 role: "separator", 459 "aria-disabled": "true" 460 }, this.m)), this._g(this.p, "iti__standard"), this.d.dropdownContainer ? (this.dropdown = this._e2("div", { 461 "class": "iti iti--container" 462 }), this.dropdown.appendChild(this.m)) : this.k.appendChild(this.m)), this.d.hiddenInput) { 463 var c = this.d.hiddenInput, 464 d = this.a.getAttribute("name"); 465 if (d) { 466 var e = d.lastIndexOf("["); - 1 !== e && (c = "".concat(d.substr(0, e), "[").concat(c, "]")) 467 } 468 this.hiddenInput = this._e2("input", { 469 type: "hidden", 470 name: c 471 }), b.appendChild(this.hiddenInput) 472 } 473 } 474 }, { 475 key: "_g", 476 value: function(a, b, c) { 477 for (var d = "", e = 0; e < a.length; e++) { 478 var f = a[e], 479 g = c ? "-preferred" : ""; 480 d += "<li class='iti__country ".concat(b, "' tabIndex='-1' id='iti-").concat(this.id, "__item-").concat(f.iso2).concat(g, "' role='option' data-dial-code='").concat(f.dialCode, "' data-country-code='").concat(f.iso2, "' aria-selected='false'>"), d += "<div class='iti__flag-box'><div class='iti__flag iti__".concat(f.iso2, "'></div></div>"), d += "<span class='iti__country-name'>
vendor: 9,173 bytes, lines 480-645
480".concat(f.name, "</span>"), d += "<span class='iti__dial-code'>+".concat(f.dialCode, "</span>"), d += "</li>" 481 } 482 this.m.insertAdjacentHTML("beforeend", d) 483 } 484 }, { 485 key: "_h", 486 value: function() { 487 var a = this.a.value, 488 b = this._5(a), 489 c = this._w(a), 490 d = this.d, 491 e = d.initialCountry, 492 f = d.nationalMode, 493 g = d.autoHideDialCode, 494 h = d.separateDialCode; 495 b && !c ? this._v(a) : "auto" !== e && (e ? this._z(e.toLowerCase()) : b && c ? this._z("us") : (this.j = this.preferredCountries.length ? this.preferredCountries[0].iso2 : this.p[0].iso2, a || this._z(this.j)), a || f || g || h || (this.a.value = "+".concat(this.s.dialCode))), a && this._u(a) 496 } 497 }, { 498 key: "_i", 499 value: function() { 500 this._j(), this.d.autoHideDialCode && this._l(), this.d.allowDropdown && this._i2(), this.hiddenInput && this._i0() 501 } 502 }, { 503 key: "_i0", 504 value: function() { 505 var a = this; 506 this._a14 = function() { 507 a.hiddenInput.value = a.getNumber() 508 }, this.a.form && this.a.form.addEventListener("submit", this._a14) 509 } 510 }, { 511 key: "_i1", 512 value: function() { 513 for (var a = this.a; a && "LABEL" !== a.tagName;) a = a.parentNode; 514 return a 515 } 516 }, { 517 key: "_i2", 518 value: function() { 519 var a = this; 520 this._a9 = function(b) { 521 a.m.classList.contains("iti__hide") ? a.a.focus() : b.preventDefault() 522 }; 523 var b = this._i1(); 524 b && b.addEventListener("click", this._a9), this._a10 = function() { 525 !a.m.classList.contains("iti__hide") || a.a.disabled || a.a.readOnly || a._n() 526 }, this.selectedFlag.addEventListener("click", this._a10), this._a11 = function(b) { 527 a.m.classList.contains("iti__hide") && -1 !== ["ArrowUp", "Up", "ArrowDown", "Down", " ", "Enter"].indexOf(b.key) && (b.preventDefault(), b.stopPropagation(), a._n()), "Tab" === b.key && a._2() 528 }, this.k.addEventListener("keydown", this._a11) 529 } 530 }, { 531 key: "_i3", 532 value: function() { 533 var a = this; 534 this.d.utilsScript && !window.intlTelInputUtils ? window.intlTelInputGlobals.documentReady() ? window.intlTelInputGlobals.loadUtils(this.d.utilsScript) : window.addEventListener("load", function() { 535 window.intlTelInputGlobals.loadUtils(a.d.utilsScript) 536 }) : this.i0(), "auto" === this.d.initialCountry ? this._i4() : this.h() 537 } 538 }, { 539 key: "_i4", 540 value: function() { 541 window.intlTelInputGlobals.autoCountry ? this.handleAutoCountry() : window.intlTelInputGlobals.startedLoadingAutoCountry || (window.intlTelInputGlobals.startedLoadingAutoCountry = !0, "function" == typeof this.d.geoIpLookup && this.d.geoIpLookup(function(a) { 542 window.intlTelInputGlobals.autoCountry = a.toLowerCase(), setTimeout(function() { 543 return m("handleAutoCountry") 544 }) 545 }, function() { 546 return m("rejectAutoCountryPromise") 547 })) 548 } 549 }, { 550 key: "_j", 551 value: function() { 552 var a = this; 553 this._a12 = function() { 554 a._v(a.a.value) && a._m2CountryChange() 555 }, this.a.addEventListener("keyup", this._a12), this._a13 = function() { 556 setTimeout(a._a12) 557 }, this.a.addEventListener("cut", this._a13), this.a.addEventListener("paste", this._a13) 558 } 559 }, { 560 key: "_j2", 561 value: function(a) { 562 var b = this.a.getAttribute("maxlength"); 563 return b && a.length > b ? a.substr(0, b) : a 564 } 565 }, { 566 key: "_l", 567 value: function() { 568 var a = this; 569 this._a8 = function() { 570 a._l2() 571 }, this.a.form && this.a.form.addEventListener("submit", this._a8), this.a.addEventListener("blur", this._a8) 572 } 573 }, { 574 key: "_l2", 575 value: function() { 576 if ("+" === this.a.value.charAt(0)) { 577 var a = this._m(this.a.value); 578 a && this.s.dialCode !== a || (this.a.value = "") 579 } 580 } 581 }, { 582 key: "_m", 583 value: function(a) { 584 return a.replace(/\D/g, "") 585 } 586 }, { 587 key: "_m2", 588 value: function(a) { 589 var b = document.createEvent("Event"); 590 b.initEvent(a, !0, !0), this.a.dispatchEvent(b) 591 } 592 }, { 593 key: "_n", 594 value: function() { 595 this.m.classList.remove("iti__hide"), this.selectedFlag.setAttribute("aria-expanded", "true"), this._o(), this.b && (this._x(this.b, !1), this._3(this.b, !0)), this._p(), this.u.classList.add("iti__arrow--up"), this._m2("open:countrydropdown") 596 } 597 }, { 598 key: "_n2", 599 value: function(a, b, c) { 600 c && !a.classList.contains(b) ? a.classList.add(b) : !c && a.classList.contains(b) && a.classList.remove(b) 601 } 602 }, { 603 key: "_o", 604 value: function() { 605 var a = this; 606 if (this.d.dropdownContainer && this.d.dropdownContainer.appendChild(this.dropdown), !this.g) { 607 var b = this.a.getBoundingClientRect(), 608 c = window.pageYOffset || document.documentElement.scrollTop, 609 d = b.top + c, 610 e = this.m.offsetHeight, 611 f = d + this.a.offsetHeight + e < c + window.innerHeight, 612 g = d - e > c; 613 if (this._n2(this.m, "iti__country-list--dropup", !f && g), this.d.dropdownContainer) { 614 var h = !f && g ? 0 : this.a.offsetHeight; 615 this.dropdown.style.top = "".concat(d + h, "px"), this.dropdown.style.left = "".concat(b.left + document.body.scrollLeft, "px"), this._a4 = function() { 616 return a._2() 617 }, window.addEventListener("scroll", this._a4) 618 } 619 } 620 } 621 }, { 622 key: "_o2", 623 value: function(a) { 624 for (var b = a; b && b !== this.m && !b.classList.contains("iti__country");) b = b.parentNode; 625 return b === this.m ? null : b 626 } 627 }, { 628 key: "_p", 629 value: function() { 630 var a = this; 631 this._a0 = function(b) { 632 var c = a._o2(b.target); 633 c && a._x(c, !1) 634 }, this.m.addEventListener("mouseover", this._a0), this._a1 = function(b) { 635 var c = a._o2(b.target); 636 c && a._1(c) 637 }, this.m.addEventListener("click", this._a1); 638 var b = !0; 639 this._a2 = function() { 640 b || a._2(), b = !1 641 }, document.documentElement.addEventListener("click", this._a2); 642 var c = "", 643 d = null; 644 this._a3 = function(b) { 645 b.preventDefault(), "ArrowUp" === b.ke
645y || "Up" === b.key || "ArrowDown" === b.key || "Down" === b.key ? a._q(b.key) : "Enter" === b.key ? a._r() : "Escape" === b.key ? a._2() : /^[a-zA-ZÃ-ÿа-ÑÐ-Я ]$/.test(b.key) && (d && clearTimeout(d), c += b.key.toLowerCase(), a._s(c), d = setTimeout(function() { 646 c = "" 647 }, 1e3)) 648 }, document.addEventListener("keydown", this._a3) 649 } 650 }, { 651 key: "_q", 652 value: function(a) { 653 var b = "ArrowUp" === a || "Up" === a ? this.c.previousElementSibling : this.c.nextElementSibling; 654 b && (b.classList.contains("iti__divider") && (b = "ArrowUp" === a || "Up" === a ? b.previousElementSibling : b.nextElementSibling), this._x(b, !0)) 655 } 656 }, { 657 key: "_r", 658 value: function() { 659 this.c && this._1(this.c) 660 } 661 }, { 662 key: "_s", 663 value: function(a) { 664 for (var b = 0; b < this.p.length; b++) 665 if (this._t(this.p[b].name, a)) { 666 var c = this.m.querySelector("#iti-".concat(this.id, "__item-").concat(this.p[b].iso2)); 667 this._x(c, !1), this._3(c, !0); 668 break 669 } 670 } 671 }, { 672 key: "_t", 673 value: function(a, b) { 674 return a.substr(0, b.length).toLowerCase() === b 675 } 676 }, { 677 key: "_u", 678 value: function(a) { 679 var b = a; 680 if (this.d.formatOnDisplay && window.intlTelInputUtils && this.s) { 681 var c = !this.d.separateDialCode && (this.d.nationalMode || "+" !== b.charAt(0)), 682 d = intlTelInputUtils.numberFormat, 683 e = d.NATIONAL, 684 f = d.INTERNATIONAL, 685 g = c ? e : f; 686 b = intlTelInputUtils.formatNumber(b, this.s.iso2, g) 687 } 688 b = this._7(b), this.a.value = b 689 } 690 }, { 691 key: "_v", 692 value: function(a) { 693 var b = a, 694 c = this.s.dialCode, 695 d = "1" === c; 696 b && this.d.nationalMode && d && "+" !== b.charAt(0) && ("1" !== b.charAt(0) && (b = "1".concat(b)), b = "+".concat(b)), this.d.separateDialCode && c && "+" !== b.charAt(0) && (b = "+".concat(c).concat(b)); 697 var e = this._5(b, !0), 698 f = this._m(b), 699 g = null; 700 if (e) { 701 var h = this.q[this._m(e)], 702 i = -1 !== h.indexOf(this.s.iso2) && f.length <= e.length - 1; 703 if (!("1" === c && this._w(f)) && !i) 704 for (var j = 0; j < h.length; j++) 705 if (h[j]) { 706 g = h[j]; 707 break 708 } 709 } else "+" === b.charAt(0) && f.length ? g = "" : b && "+" !== b || (g = this.j); 710 return null !== g && this._z(g) 711 } 712 }, { 713 key: "_w", 714 value: function(a) { 715 var b = this._m(a); 716 if ("1" === b.charAt(0)) { 717 var c = b.substr(1, 3); 718 return -1 !== k.indexOf(c) 719 } 720 return !1 721 } 722 }, { 723 key: "_x", 724 value: function(a, b) { 725 var c = this.c; 726 c && c.classList.remove("iti__highlight"), this.c = a, this.c.classList.add("iti__highlight"), b && this.c.focus() 727 } 728 }, { 729 key: "_y", 730 value: function(a, b, c) { 731 for (var d = b ? e : this.p, f = 0; f < d.length; f++) 732 if (d[f].iso2 === a) return d[f]; 733 if (c) return null; 734 throw new Error("No country data for '".concat(a, "'")) 735 } 736 }, { 737 key: "_z", 738 value: function(a) { 739 var b = this.s.iso2 ? this.s : {}; 740 this.s = a ? this._y(a, !1, !1) : {}, this.s.iso2 && (this.j = this.s.iso2), this.l.setAttribute("class", "iti__flag iti__".concat(a)); 741 var c = a ? "".concat(this.s.name, ": +").concat(this.s.dialCode) : "Unknown"; 742 if (this.selectedFlag.setAttribute("title", c), this.d.separateDialCode) { 743 var d = this.s.dialCode ? "+".concat(this.s.dialCode) : ""; 744 this.t.innerHTML = d; 745 var e = this.selectedFlag.offsetWidth || this._z2(); 746 this.a.style.paddingLeft = "".concat(e + 6, "px") 747 } 748 if (this._0(), this.d.allowDropdown) { 749 var f = this.b; 750 if (f && (f.classList.remove("iti__active"), f.setAttribute("aria-selected", "false")), a) { 751 var g = this.m.querySelector("#iti-".concat(this.id, "__item-").concat(a, "-preferred")) || this.m.querySelector("#iti-".concat(this.id, "__item-").concat(a)); 752 g.setAttribute("aria-selected", "true"), g.classList.add("iti__active"), this.b = g, this.selectedFlag.setAttribute("aria-activedescendant", g.getAttribute("id")) 753 } 754 } 755 return b.iso2 !== a 756 } 757 }, { 758 key: "_z2", 759 value: function() { 760 var a = this.a.parentNode.cloneNode(); 761 a.style.visibility = "hidden", document.body.appendChild(a); 762 var b = this.k.cloneNode(); 763 a.appendChild(b); 764 var c = this.selectedFlag.cloneNode(!0); 765 b.appendChild(c); 766 var d = c.offsetWidth; 767 return a.parentNode.removeChild(a), d 768 } 769 }, { 770 key: "_0", 771 value: function() { 772 var a = "aggressive" === this.d.autoPlaceholder || !this.e && "polite" === this.d.autoPlaceholder; 773 if (window.intlTelInputUtils && a) { 774 var b = intlTelInputUtils.numberType[this.d.placeholderNumberType], 775 c = this.s.iso2 ? intlTelInputUtils.getExampleNumber(this.s.iso2, this.d.nationalMode, b) : ""; 776 c = this._7(c), "function" == typeof this.d.customPlaceholder && (c = this.d.customPlaceholder(c, this.s)), this.a.setAttribute("placeholder", c) 777 } 778 } 779 }, { 780 key: "_1", 781 value: function(a) { 782 var b = this._z(a.getAttribute("data-country-code")); 783 this._2(), this._4(a.getAttribute("data-dial-code"), !0), this.a.focus(); 784 var c = this.a.value.length; 785 this.a.setSelectionRange(c, c), b && this._m2CountryChange() 786 } 787 }, { 788 key: "_2", 789 value: function() { 790 this.m.classList.add("iti__hide"), this.selectedFlag.setAttribute("aria-expanded", "false"), this.u.classList.remove("iti__arrow--up"), document.removeEventListener("keydown", this._a3), document.documentElement.removeEventListener("click", this._a2), this.m.removeEventListener("mouseover", this._a0), this.m.removeEventListener("click", this._a1), this.d.dropdownContainer && (this.g || window.removeEventListener("scroll", this._a4), this.dropdown.parentNode && this.dropdown.parentNode.removeChild(this.dropdown)), this._m2("close:countrydropdown") 791 } 792 }, { 793 key: "_3", 794 value: function(a, b) { 795 var c = this.m, 796 d = window.pageYOffset || document.documentElement.scrollTop, 797 e = c.offsetHeight, 798 f = c.getBoundingClientRect().top + d, 799 g = f + e, 800 h = a.offsetHeight, 801 i = a.getBoundingClientRect().top + d, 802 j = i + h, 803 k = i - f + c.scrollTop, 804 l = e / 2 - h / 2; 805 if (i < f) b && (k -= l), c.scrollTop = k; 806 else if (j > g) { 807 b && (k += l); 808 var m = e - h; 809 c.scrollTop = k - m 810 } 811 } 812 }, { 813 key: "_4", 814 value: function(a, b) { 815 var c, d = this.a.value, 816 e = "+".concat(a); 817 if ("+" === d.charAt(0)) { 818 var f = this._5(d); 819 c = f ? d.replace(f, e) : e 820 } else { 821 if (this.d.nationalMode || this.d.separateDialCode) return; 822 if (d) c = e + d; 823 else { 824 if (!b && this.d.autoHideDialCode) return; 825 c = e 826 } 827 } 828 this.a.value = c 829 } 830 }, { 831 key: "_5", 832 value: function(a, b) { 833 var c = ""; 834 if ("+" === a.charAt(0)) 835 for (var d = "", e = 0; e < a.length; e++) { 836 var f = a.charAt(e); 837 if (!isNaN(parseInt(f, 10))) { 838 if (d += f, b) this.q[d] && (c = a.substr(0, e + 1)); 839 else if (this.dialCodes[d]) { 840 c = a.substr(0, e + 1); 841 break 842 } 843 if (d.length === this.countryCodeMaxLen) break 844 } 845 } 846 return c 847 } 848 }, { 849 key: "_6", 850 value: function() { 851 var a = this.a.value.trim(), 852 b = this.s.dialCode, 853 c = this._m(a); 854 return (this.d.separateDialCode && "+" !== a.charAt(0) && b && c ? "+".concat(b) : "") + a 855 } 856 }, { 857 key: "_7", 858 value: function(a) { 859 var b = a; 860 if (this.d.separateDialCode) { 861 var c = this._5(b); 862 if (c) { 863 c = "+".concat(this.s.dialCode); 864 var d = " " === b[c.length] || "-" === b[c.length] ? c.length + 1 : c.length; 865 b = b.substr(d) 866 } 867 } 868 return this._j2(b) 869 } 870 }, { 871 key: "_m2CountryChange", 872 value: function() { 873 this._m2("countrychange") 874 } 875 }, { 876 key: "handleAutoCountry", 877 value: function() { 878 "auto" === this.d.initialCountry && (this.j = window.intlTelInputGlobals.autoCountry, this.a.value || this.setCountry(this.j), this.h()) 879 } 880 }, { 881 key: "handleUtils", 882 value: function() { 883 window.intlTelInputUtils && (this.a.value && this._u(this.a.value), this._0()), this.i0() 884 } 885 }, {
886 key: "destroy", 887 value: function() { 888 var a = this.a.form; 889 if (this.d.allowDropdown) { 890 this._2(), this.selectedFlag.removeEventListener("click", this._a10), this.k.removeEventListener("keydown", this._a11); 891 var b = this._i1(); 892 b && b.removeEventListener("click", this._a9) 893 } 894 this.hiddenInput && a && a.removeEventListener("submit", this._a14), this.d.autoHideDialCode && (a && a.removeEventListener("submit", this._a8), this.a.removeEventListener("blur", this._a8)), this.a.removeEventListener("keyup", this._a12), this.a.removeEventListener("cut", this._a13), this.a.removeEventListener("paste", this._a13), this.a.removeAttribute("data-intl-tel-input-id"); 895 var c = this.a.parentNode; 896 c.parentNode.insertBefore(this.a, c), c.parentNode.removeChild(c), delete window.intlTelInputGlobals.instances[this.id] 897 } 898 }, { 899 key: "getExtension", 900 value: function() { 901 return window.intlTelInputUtils ? intlTelInputUtils.getExtension(this._6(), this.s.iso2) : "" 902 } 903 }, { 904 key: "getNumber", 905 value: function(a) { 906 if (window.intlTelInputUtils) { 907 var b = this.s.iso2; 908 return intlTelInputUtils.formatNumber(this._6(), b, a) 909 } 910 return "" 911 } 912 }, { 913 key: "getNumberType", 914 value: function() { 915 return window.intlTelInputUtils ? intlTelInputUtils.getNumberType(this._6(), this.s.iso2) : -99 916 } 917 }, { 918 key: "getSelectedCountryData", 919 value: function() { 920 return this.s 921 } 922 }, { 923 key: "getValidationError", 924 value: function() { 925 if (window.intlTelInputUtils) { 926 var a = this.s.iso2; 927 return intlTelInputUtils.getValidationError(this._6(), a) 928 } 929 return -99 930 } 931 }, { 932 key: "isValidNumber", 933 value: function() { 934 var a = this._6().trim(), 935 b = this.d.nationalMode ? this.s.iso2 : ""; 936 return window.intlTelInputUtils ? intlTelInputUtils.isValidNumber(a, b) : null 937 } 938 }, { 939 key: "setCountry", 940 value: function(a) { 941 var b = a.toLowerCase(); 942 this.l.classList.contains("iti__".concat(b)) || (this._z(b), this._4(this.s.dialCode, !1), this._m2CountryChange()) 943 } 944 }, { 945 key: "setNumber", 946 value: function(a) { 947 var b = this._v(a); 948 this._u(a), b && this._m2CountryChange() 949 } 950 }, { 951 key: "setPlaceholderNumberType", 952 value: function(a) { 953 this.d.placeholderNumberType = a, this._0() 954 } 955 }]), c 956 }(); 957 h.getCountryData = function() { 958 return e 959 }; 960 var o = function(a, b, c) { 961 var d = document.createElement("script"); 962 d.onload = function() { 963 m("handleUtils"), b && b() 964 }, d.onerror = function() { 965 m("rejectUtilsScriptPromise"), c && c() 966 }, d.className = "iti-load-utils", d.async = !0, d.src = a, document.body.appendChild(d) 967 }; 968 return h.loadUtils = function(a) { 969 if (!window.intlTelInputUtils && !window.intlTelInputGlobals.startedLoadingUtilsScript) { 970 if (window.intlTelInputGlobals.startedLoadingUtilsScript = !0, "undefined" != typeof Promise) return new Promise(function(b, c) { 971 return o(a, b, c) 972 }); 973 o(a) 974 } 975 return null 976 }, h.defaults = j, h.version = "17.0.8", 977 function(a, b) { 978 var c = new n(a, b); 979 return c._init(), a.setAttribute("data-intl-tel-input-id", c.id), window.intlTelInputGlobals.instances[c.id] = c, c 980 } 981 }() 982});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.