Telegram Web K with changes to work inside I2P https://web.telegram.i2p/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
25 KiB

/*
* https://github.com/morethanwords/tweb
* Copyright (C) 2019-2021 Eduard Kuzmenko
* https://github.com/morethanwords/tweb/blob/master/LICENSE
*/
import type { HelpCountriesList } from "./layer";
const Countries: HelpCountriesList.helpCountriesList = {
_: 'help.countriesList',
countries: [{"iso2":"AD","default_name":"Andorra","country_codes":[{"country_code":"376","patterns":["XX XX XX"]}]},{"iso2":"AE","default_name":"United Arab Emirates","country_codes":[{"country_code":"971","patterns":["XX XXX XXXX"]}]},{"iso2":"AF","default_name":"Afghanistan","country_codes":[{"country_code":"93","patterns":["XXX XXX XXX"]}]},{"iso2":"AG","default_name":"Antigua & Barbuda","country_codes":[{"country_code":"1268","patterns":["XXX XXXX"]}]},{"iso2":"AI","default_name":"Anguilla","country_codes":[{"country_code":"1264","patterns":["XXX XXXX"]}]},{"iso2":"AL","default_name":"Albania","country_codes":[{"country_code":"355","patterns":["XX XXX XXXX"]}]},{"iso2":"AM","default_name":"Armenia","country_codes":[{"country_code":"374","patterns":["XX XXX XXX"]}]},{"iso2":"AO","default_name":"Angola","country_codes":[{"country_code":"244","patterns":["XXX XXX XXX"]}]},{"iso2":"AR","default_name":"Argentina","country_codes":[{"country_code":"54"}]},{"iso2":"AS","default_name":"American Samoa","country_codes":[{"country_code":"1684","patterns":["XXX XXXX"]}]},{"iso2":"AT","default_name":"Austria","country_codes":[{"country_code":"43","patterns":["X XXXXXXXX"]}]},{"iso2":"AU","default_name":"Australia","country_codes":[{"country_code":"61","patterns":["X XXXX XXXX"]}]},{"iso2":"AW","default_name":"Aruba","country_codes":[{"country_code":"297","patterns":["XXX XXXX"]}]},{"iso2":"AZ","default_name":"Azerbaijan","country_codes":[{"country_code":"994","patterns":["XX XXX XXXX"]}]},{"iso2":"BA","default_name":"Bosnia & Herzegovina","country_codes":[{"country_code":"387","patterns":["XX XXX XXX"]}]},{"iso2":"BB","default_name":"Barbados","country_codes":[{"country_code":"1246","patterns":["XXX XXXX"]}]},{"iso2":"BD","default_name":"Bangladesh","country_codes":[{"country_code":"880","patterns":["XX XXX XXX"]}]},{"iso2":"BE","default_name":"Belgium","country_codes":[{"country_code":"32","patterns":["XXX XX XX XX"]}]},{"iso2":"BF","default_name":"Burkina Faso","country_codes":[{"country_code":"226","patterns":["XX XX XX XX"]}]},{"iso2":"BG","default_name":"Bulgaria","country_codes":[{"country_code":"359"}]},{"iso2":"BH","default_name":"Bahrain","country_codes":[{"country_code":"973","patterns":["XXXX XXXX"]}]},{"iso2":"BI","default_name":"Burundi","country_codes":[{"country_code":"257","patterns":["XX XX XXXX"]}]},{"iso2":"BJ","default_name":"Benin","country_codes":[{"country_code":"229","patterns":["XX XXX XXX"]}]},{"iso2":"BM","default_name":"Bermuda","country_codes":[{"country_code":"1441","patterns":["XXX XXXX"]}]},{"iso2":"BN","default_name":"Brunei Darussalam","country_codes":[{"country_code":"673","patterns":["XXX XXXX"]}]},{"iso2":"BO","default_name":"Bolivia","country_codes":[{"country_code":"591","patterns":["X XXX XXXX"]}]},{"iso2":"BQ","default_name":"Bonaire, Sint Eustatius & Saba","country_codes":[{"country_code":"599"}]},{"iso2":"BR","default_name":"Brazil","country_codes":[{"country_code":"55","patterns":["XX XXXXX XXXX"]}]},{"iso2":"BS","default_name":"Bahamas","country_codes":[{"country_code":"1242","patterns":["XXX XXXX"]}]},{"iso2":"BT","default_name":"Bhutan","country_codes":[{"country_code":"975","patterns":["XX XXX XXX"]}]},{"iso2":"BW","default_name":"Botswana","country_codes":[{"country_code":"267","patterns":["XX XXX XXX"]}]},{"iso2":"BY","default_name":"Belarus","country_codes":[{"country_code":"375","patterns":["XX XXX XXXX"]}]},{"iso2":"BZ","default_name":"Belize","country_codes":[{"country_code":"501"}]},{"iso2":"CA","default_name":"Canada","country_codes":[{"country_code":"1","prefixes":["403","587","780","825","236","250","604","672","778","204","431","506","709","902","782","226","249","289","343","365","416","437","519","548","613","647","705","807","905","418","438","450","514","579","581","819","873","306","639","867"],"patterns":["XXX XXX XXXX"]}]},{"iso2":"CD","default_name":"Congo (Dem. Rep.)","country_codes":[{"country_code":"243","patterns":["XX XXX XXXX"]}]},{"iso2":"CF","default_name":"Central African Rep.","country_codes":[{"country_code":"236","patterns":["XX XX XX XX"]}]},{"iso2"
hash: 0
};
/* const PhoneCodesMain: {[phoneCode: string]: Country} = {
'1': Countries.find((c) => c.name === 'United States'),
'44': Countries.find((c) => c.name === 'United Kingdom'),
'61': Countries.find((c) => c.name === 'Australia'),
'64': Countries.find((c) => c.name === 'New Zealand'),
'246': Countries.find((c) => c.name === 'Diego Garcia'),
'255': Countries.find((c) => c.name === 'Tanzania'),
'262': Countries.find((c) => c.name === 'Reunion'),
'500': Countries.find((c) => c.name === 'Falkland Islands'),
'590': Countries.find((c) => c.name === 'Guadeloupe'),
'672': Countries.find((c) => c.name === 'Norfolk Island'),
'1 268': Countries.find((c) => c.name === 'Antigua & Barbuda'),
}; */
/*
const toInt = (str) => {
return parseInt(str.replace(/ /g, ''));
};
var arr = window.Countries.sort((a, b) => toInt(a.phoneCode) - toInt(b.phoneCode));
arr.forEach((el, idx) => {
if(idx === (arr.length - 1)) {
return;
}
if(toInt(arr[idx + 1].phoneCode) === toInt(el.phoneCode)) {
console.log('duplicate', el, arr[idx + 1]);
}
});
*/
export default Countries;