'use strict';

var index = require('./index-C_OnxXhP.js');
var index_esm = require('./index.esm-C1i_NocP.js');
var nonNull = require('./non-null-BMnREsqJ.js');

var currencyCodes = {};

var firstMatch;
var hasRequiredFirstMatch;

function requireFirstMatch () {
	if (hasRequiredFirstMatch) return firstMatch;
	hasRequiredFirstMatch = 1;
	function truthy(d) {
	  return d
	}
	function first(array, callback, context) {
	  var callback = callback || truthy
	    , context = context || array
	    ;

	  for (var i = 0, l = array.length; i < l; i += 1) {
	    if (callback.call(context, array[i], i)) return array[i]
	  }
	}
	firstMatch = first;
	return firstMatch;
}

var nub = {exports: {}};

var hasRequiredNub;

function requireNub () {
	if (hasRequiredNub) return nub.exports;
	hasRequiredNub = 1;
	var nub$1 = nub.exports = function (xs, cmp) {
	    if (typeof xs === 'function' || cmp) {
	        return nub$1.by(xs, cmp);
	    }
	    
	    var keys = {
	        'object' : [],
	        'function' : [],
	        'string' : {},
	        'number' : {},
	        'boolean' : {},
	        'undefined' : {}
	    };
	    
	    var res = [];
	    
	    for (var i = 0; i < xs.length; i++) {
	        var x = xs[i];
	        var recs = x === '__proto__'
	            ? keys.objects
	            : keys[typeof x] || keys.objects
	        ;
	        
	        if (Array.isArray(recs)) {
	            if (recs.indexOf(x) < 0) {
	                recs.push(x);
	                res.push(x);
	            }
	        }
	        else if (!Object.hasOwnProperty.call(recs, x)) {
	            recs[x] = true;
	            res.push(x);
	        }
	    }
	    
	    return res;
	};

	nub$1.by = function (xs, cmp) {
	    if (typeof xs === 'function') {
	        var cmp_ = cmp;
	        cmp = xs;
	        xs = cmp_;
	    }
	    
	    var res = [];
	    
	    for (var i = 0; i < xs.length; i++) {
	        var x = xs[i];
	        
	        var found = false;
	        for (var j = 0; j < res.length; j++) {
	            var y = res[j];
	            if (cmp.call(res, x, y)) {
	                found = true;
	                break;
	            }
	        }
	        
	        if (!found) res.push(x);
	    }
	    
	    return res;
	};
	return nub.exports;
}

/*
	Follows ISO 4217, https://www.iso.org/iso-4217-currency-codes.html
	See https://www.currency-iso.org/dam/downloads/lists/list_one.xml
	Data last updated 2024-06-25
*/

var data;
var hasRequiredData;

function requireData () {
	if (hasRequiredData) return data;
	hasRequiredData = 1;
	data = [
	  {
	    "code": "AED",
	    "number": "784",
	    "digits": 2,
	    "currency": "UAE Dirham",
	    "countries": [
	      "United Arab Emirates (The)"
	    ]
	  },
	  {
	    "code": "AFN",
	    "number": "971",
	    "digits": 2,
	    "currency": "Afghani",
	    "countries": [
	      "Afghanistan"
	    ]
	  },
	  {
	    "code": "ALL",
	    "number": "008",
	    "digits": 2,
	    "currency": "Lek",
	    "countries": [
	      "Albania"
	    ]
	  },
	  {
	    "code": "AMD",
	    "number": "051",
	    "digits": 2,
	    "currency": "Armenian Dram",
	    "countries": [
	      "Armenia"
	    ]
	  },
	  {
	    "code": "ANG",
	    "number": "532",
	    "digits": 2,
	    "currency": "Netherlands Antillean Guilder",
	    "countries": [
	      "Curaçao",
	      "Sint Maarten (Dutch Part)"
	    ]
	  },
	  {
	    "code": "AOA",
	    "number": "973",
	    "digits": 2,
	    "currency": "Kwanza",
	    "countries": [
	      "Angola"
	    ]
	  },
	  {
	    "code": "ARS",
	    "number": "032",
	    "digits": 2,
	    "currency": "Argentine Peso",
	    "countries": [
	      "Argentina"
	    ]
	  },
	  {
	    "code": "AUD",
	    "number": "036",
	    "digits": 2,
	    "currency": "Australian Dollar",
	    "countries": [
	      "Australia",
	      "Christmas Island",
	      "Cocos (Keeling) Islands (The)",
	      "Heard Island and Mcdonald Islands",
	      "Kiribati",
	      "Nauru",
	      "Norfolk Island",
	      "Tuvalu"
	    ]
	  },
	  {
	    "code": "AWG",
	    "number": "533",
	    "digits": 2,
	    "currency": "Aruban Florin",
	    "countries": [
	      "Aruba"
	    ]
	  },
	  {
	    "code": "AZN",
	    "number": "944",
	    "digits": 2,
	    "currency": "Azerbaijan Manat",
	    "countries": [
	      "Azerbaijan"
	    ]
	  },
	  {
	    "code": "BAM",
	    "number": "977",
	    "digits": 2,
	    "currency": "Convertible Mark",
	    "countries": [
	      "Bosnia and Herzegovina"
	    ]
	  },
	  {
	    "code": "BBD",
	    "number": "052",
	    "digits": 2,
	    "currency": "Barbados Dollar",
	    "countries": [
	      "Barbados"
	    ]
	  },
	  {
	    "code": "BDT",
	    "number": "050",
	    "digits": 2,
	    "currency": "Taka",
	    "countries": [
	      "Bangladesh"
	    ]
	  },
	  {
	    "code": "BGN",
	    "number": "975",
	    "digits": 2,
	    "currency": "Bulgarian Lev",
	    "countries": [
	      "Bulgaria"
	    ]
	  },
	  {
	    "code": "BHD",
	    "number": "048",
	    "digits": 3,
	    "currency": "Bahraini Dinar",
	    "countries": [
	      "Bahrain"
	    ]
	  },
	  {
	    "code": "BIF",
	    "number": "108",
	    "digits": 0,
	    "currency": "Burundi Franc",
	    "countries": [
	      "Burundi"
	    ]
	  },
	  {
	    "code": "BMD",
	    "number": "060",
	    "digits": 2,
	    "currency": "Bermudian Dollar",
	    "countries": [
	      "Bermuda"
	    ]
	  },
	  {
	    "code": "BND",
	    "number": "096",
	    "digits": 2,
	    "currency": "Brunei Dollar",
	    "countries": [
	      "Brunei Darussalam"
	    ]
	  },
	  {
	    "code": "BOB",
	    "number": "068",
	    "digits": 2,
	    "currency": "Boliviano",
	    "countries": [
	      "Bolivia (Plurinational State Of)"
	    ]
	  },
	  {
	    "code": "BOV",
	    "number": "984",
	    "digits": 2,
	    "currency": "Mvdol",
	    "countries": [
	      "Bolivia (Plurinational State Of)"
	    ]
	  },
	  {
	    "code": "BRL",
	    "number": "986",
	    "digits": 2,
	    "currency": "Brazilian Real",
	    "countries": [
	      "Brazil"
	    ]
	  },
	  {
	    "code": "BSD",
	    "number": "044",
	    "digits": 2,
	    "currency": "Bahamian Dollar",
	    "countries": [
	      "Bahamas (The)"
	    ]
	  },
	  {
	    "code": "BTN",
	    "number": "064",
	    "digits": 2,
	    "currency": "Ngultrum",
	    "countries": [
	      "Bhutan"
	    ]
	  },
	  {
	    "code": "BWP",
	    "number": "072",
	    "digits": 2,
	    "currency": "Pula",
	    "countries": [
	      "Botswana"
	    ]
	  },
	  {
	    "code": "BYN",
	    "number": "933",
	    "digits": 2,
	    "currency": "Belarusian Ruble",
	    "countries": [
	      "Belarus"
	    ]
	  },
	  {
	    "code": "BZD",
	    "number": "084",
	    "digits": 2,
	    "currency": "Belize Dollar",
	    "countries": [
	      "Belize"
	    ]
	  },
	  {
	    "code": "CAD",
	    "number": "124",
	    "digits": 2,
	    "currency": "Canadian Dollar",
	    "countries": [
	      "Canada"
	    ]
	  },
	  {
	    "code": "CDF",
	    "number": "976",
	    "digits": 2,
	    "currency": "Congolese Franc",
	    "countries": [
	      "Congo (The Democratic Republic of The)"
	    ]
	  },
	  {
	    "code": "CHE",
	    "number": "947",
	    "digits": 2,
	    "currency": "WIR Euro",
	    "countries": [
	      "Switzerland"
	    ]
	  },
	  {
	    "code": "CHF",
	    "number": "756",
	    "digits": 2,
	    "currency": "Swiss Franc",
	    "countries": [
	      "Liechtenstein",
	      "Switzerland"
	    ]
	  },
	  {
	    "code": "CHW",
	    "number": "948",
	    "digits": 2,
	    "currency": "WIR Franc",
	    "countries": [
	      "Switzerland"
	    ]
	  },
	  {
	    "code": "CLF",
	    "number": "990",
	    "digits": 4,
	    "currency": "Unidad de Fomento",
	    "countries": [
	      "Chile"
	    ]
	  },
	  {
	    "code": "CLP",
	    "number": "152",
	    "digits": 0,
	    "currency": "Chilean Peso",
	    "countries": [
	      "Chile"
	    ]
	  },
	  {
	    "code": "CNY",
	    "number": "156",
	    "digits": 2,
	    "currency": "Yuan Renminbi",
	    "countries": [
	      "China"
	    ]
	  },
	  {
	    "code": "COP",
	    "number": "170",
	    "digits": 2,
	    "currency": "Colombian Peso",
	    "countries": [
	      "Colombia"
	    ]
	  },
	  {
	    "code": "COU",
	    "number": "970",
	    "digits": 2,
	    "currency": "Unidad de Valor Real",
	    "countries": [
	      "Colombia"
	    ]
	  },
	  {
	    "code": "CRC",
	    "number": "188",
	    "digits": 2,
	    "currency": "Costa Rican Colon",
	    "countries": [
	      "Costa Rica"
	    ]
	  },
	  {
	    "code": "CUC",
	    "number": "931",
	    "digits": 2,
	    "currency": "Peso Convertible",
	    "countries": [
	      "Cuba"
	    ]
	  },
	  {
	    "code": "CUP",
	    "number": "192",
	    "digits": 2,
	    "currency": "Cuban Peso",
	    "countries": [
	      "Cuba"
	    ]
	  },
	  {
	    "code": "CVE",
	    "number": "132",
	    "digits": 2,
	    "currency": "Cabo Verde Escudo",
	    "countries": [
	      "Cabo Verde"
	    ]
	  },
	  {
	    "code": "CZK",
	    "number": "203",
	    "digits": 2,
	    "currency": "Czech Koruna",
	    "countries": [
	      "Czechia"
	    ]
	  },
	  {
	    "code": "DJF",
	    "number": "262",
	    "digits": 0,
	    "currency": "Djibouti Franc",
	    "countries": [
	      "Djibouti"
	    ]
	  },
	  {
	    "code": "DKK",
	    "number": "208",
	    "digits": 2,
	    "currency": "Danish Krone",
	    "countries": [
	      "Denmark",
	      "Faroe Islands (The)",
	      "Greenland"
	    ]
	  },
	  {
	    "code": "DOP",
	    "number": "214",
	    "digits": 2,
	    "currency": "Dominican Peso",
	    "countries": [
	      "Dominican Republic (The)"
	    ]
	  },
	  {
	    "code": "DZD",
	    "number": "012",
	    "digits": 2,
	    "currency": "Algerian Dinar",
	    "countries": [
	      "Algeria"
	    ]
	  },
	  {
	    "code": "EGP",
	    "number": "818",
	    "digits": 2,
	    "currency": "Egyptian Pound",
	    "countries": [
	      "Egypt"
	    ]
	  },
	  {
	    "code": "ERN",
	    "number": "232",
	    "digits": 2,
	    "currency": "Nakfa",
	    "countries": [
	      "Eritrea"
	    ]
	  },
	  {
	    "code": "ETB",
	    "number": "230",
	    "digits": 2,
	    "currency": "Ethiopian Birr",
	    "countries": [
	      "Ethiopia"
	    ]
	  },
	  {
	    "code": "EUR",
	    "number": "978",
	    "digits": 2,
	    "currency": "Euro",
	    "countries": [
	      "Åland Islands",
	      "Andorra",
	      "Austria",
	      "Belgium",
	      "Croatia",
	      "Cyprus",
	      "Estonia",
	      "European Union",
	      "Finland",
	      "France",
	      "French Guiana",
	      "French Southern Territories (The)",
	      "Germany",
	      "Greece",
	      "Guadeloupe",
	      "Holy See (The)",
	      "Ireland",
	      "Italy",
	      "Latvia",
	      "Lithuania",
	      "Luxembourg",
	      "Malta",
	      "Martinique",
	      "Mayotte",
	      "Monaco",
	      "Montenegro",
	      "Netherlands (The)",
	      "Portugal",
	      "Réunion",
	      "Saint Barthélemy",
	      "Saint Martin (French Part)",
	      "Saint Pierre and Miquelon",
	      "San Marino",
	      "Slovakia",
	      "Slovenia",
	      "Spain"
	    ]
	  },
	  {
	    "code": "FJD",
	    "number": "242",
	    "digits": 2,
	    "currency": "Fiji Dollar",
	    "countries": [
	      "Fiji"
	    ]
	  },
	  {
	    "code": "FKP",
	    "number": "238",
	    "digits": 2,
	    "currency": "Falkland Islands Pound",
	    "countries": [
	      "Falkland Islands (The) [Malvinas]"
	    ]
	  },
	  {
	    "code": "GBP",
	    "number": "826",
	    "digits": 2,
	    "currency": "Pound Sterling",
	    "countries": [
	      "Guernsey",
	      "Isle of Man",
	      "Jersey",
	      "United Kingdom of Great Britain and Northern Ireland (The)"
	    ]
	  },
	  {
	    "code": "GEL",
	    "number": "981",
	    "digits": 2,
	    "currency": "Lari",
	    "countries": [
	      "Georgia"
	    ]
	  },
	  {
	    "code": "GHS",
	    "number": "936",
	    "digits": 2,
	    "currency": "Ghana Cedi",
	    "countries": [
	      "Ghana"
	    ]
	  },
	  {
	    "code": "GIP",
	    "number": "292",
	    "digits": 2,
	    "currency": "Gibraltar Pound",
	    "countries": [
	      "Gibraltar"
	    ]
	  },
	  {
	    "code": "GMD",
	    "number": "270",
	    "digits": 2,
	    "currency": "Dalasi",
	    "countries": [
	      "Gambia (The)"
	    ]
	  },
	  {
	    "code": "GNF",
	    "number": "324",
	    "digits": 0,
	    "currency": "Guinean Franc",
	    "countries": [
	      "Guinea"
	    ]
	  },
	  {
	    "code": "GTQ",
	    "number": "320",
	    "digits": 2,
	    "currency": "Quetzal",
	    "countries": [
	      "Guatemala"
	    ]
	  },
	  {
	    "code": "GYD",
	    "number": "328",
	    "digits": 2,
	    "currency": "Guyana Dollar",
	    "countries": [
	      "Guyana"
	    ]
	  },
	  {
	    "code": "HKD",
	    "number": "344",
	    "digits": 2,
	    "currency": "Hong Kong Dollar",
	    "countries": [
	      "Hong Kong"
	    ]
	  },
	  {
	    "code": "HNL",
	    "number": "340",
	    "digits": 2,
	    "currency": "Lempira",
	    "countries": [
	      "Honduras"
	    ]
	  },
	  {
	    "code": "HTG",
	    "number": "332",
	    "digits": 2,
	    "currency": "Gourde",
	    "countries": [
	      "Haiti"
	    ]
	  },
	  {
	    "code": "HUF",
	    "number": "348",
	    "digits": 2,
	    "currency": "Forint",
	    "countries": [
	      "Hungary"
	    ]
	  },
	  {
	    "code": "IDR",
	    "number": "360",
	    "digits": 2,
	    "currency": "Rupiah",
	    "countries": [
	      "Indonesia"
	    ]
	  },
	  {
	    "code": "ILS",
	    "number": "376",
	    "digits": 2,
	    "currency": "New Israeli Sheqel",
	    "countries": [
	      "Israel"
	    ]
	  },
	  {
	    "code": "INR",
	    "number": "356",
	    "digits": 2,
	    "currency": "Indian Rupee",
	    "countries": [
	      "Bhutan",
	      "India"
	    ]
	  },
	  {
	    "code": "IQD",
	    "number": "368",
	    "digits": 3,
	    "currency": "Iraqi Dinar",
	    "countries": [
	      "Iraq"
	    ]
	  },
	  {
	    "code": "IRR",
	    "number": "364",
	    "digits": 2,
	    "currency": "Iranian Rial",
	    "countries": [
	      "Iran (Islamic Republic Of)"
	    ]
	  },
	  {
	    "code": "ISK",
	    "number": "352",
	    "digits": 0,
	    "currency": "Iceland Krona",
	    "countries": [
	      "Iceland"
	    ]
	  },
	  {
	    "code": "JMD",
	    "number": "388",
	    "digits": 2,
	    "currency": "Jamaican Dollar",
	    "countries": [
	      "Jamaica"
	    ]
	  },
	  {
	    "code": "JOD",
	    "number": "400",
	    "digits": 3,
	    "currency": "Jordanian Dinar",
	    "countries": [
	      "Jordan"
	    ]
	  },
	  {
	    "code": "JPY",
	    "number": "392",
	    "digits": 0,
	    "currency": "Yen",
	    "countries": [
	      "Japan"
	    ]
	  },
	  {
	    "code": "KES",
	    "number": "404",
	    "digits": 2,
	    "currency": "Kenyan Shilling",
	    "countries": [
	      "Kenya"
	    ]
	  },
	  {
	    "code": "KGS",
	    "number": "417",
	    "digits": 2,
	    "currency": "Som",
	    "countries": [
	      "Kyrgyzstan"
	    ]
	  },
	  {
	    "code": "KHR",
	    "number": "116",
	    "digits": 2,
	    "currency": "Riel",
	    "countries": [
	      "Cambodia"
	    ]
	  },
	  {
	    "code": "KMF",
	    "number": "174",
	    "digits": 0,
	    "currency": "Comorian Franc ",
	    "countries": [
	      "Comoros (The)"
	    ]
	  },
	  {
	    "code": "KPW",
	    "number": "408",
	    "digits": 2,
	    "currency": "North Korean Won",
	    "countries": [
	      "Korea (The Democratic People’s Republic Of)"
	    ]
	  },
	  {
	    "code": "KRW",
	    "number": "410",
	    "digits": 0,
	    "currency": "Won",
	    "countries": [
	      "Korea (The Republic Of)"
	    ]
	  },
	  {
	    "code": "KWD",
	    "number": "414",
	    "digits": 3,
	    "currency": "Kuwaiti Dinar",
	    "countries": [
	      "Kuwait"
	    ]
	  },
	  {
	    "code": "KYD",
	    "number": "136",
	    "digits": 2,
	    "currency": "Cayman Islands Dollar",
	    "countries": [
	      "Cayman Islands (The)"
	    ]
	  },
	  {
	    "code": "KZT",
	    "number": "398",
	    "digits": 2,
	    "currency": "Tenge",
	    "countries": [
	      "Kazakhstan"
	    ]
	  },
	  {
	    "code": "LAK",
	    "number": "418",
	    "digits": 2,
	    "currency": "Lao Kip",
	    "countries": [
	      "Lao People’s Democratic Republic (The)"
	    ]
	  },
	  {
	    "code": "LBP",
	    "number": "422",
	    "digits": 2,
	    "currency": "Lebanese Pound",
	    "countries": [
	      "Lebanon"
	    ]
	  },
	  {
	    "code": "LKR",
	    "number": "144",
	    "digits": 2,
	    "currency": "Sri Lanka Rupee",
	    "countries": [
	      "Sri Lanka"
	    ]
	  },
	  {
	    "code": "LRD",
	    "number": "430",
	    "digits": 2,
	    "currency": "Liberian Dollar",
	    "countries": [
	      "Liberia"
	    ]
	  },
	  {
	    "code": "LSL",
	    "number": "426",
	    "digits": 2,
	    "currency": "Loti",
	    "countries": [
	      "Lesotho"
	    ]
	  },
	  {
	    "code": "LYD",
	    "number": "434",
	    "digits": 3,
	    "currency": "Libyan Dinar",
	    "countries": [
	      "Libya"
	    ]
	  },
	  {
	    "code": "MAD",
	    "number": "504",
	    "digits": 2,
	    "currency": "Moroccan Dirham",
	    "countries": [
	      "Morocco",
	      "Western Sahara"
	    ]
	  },
	  {
	    "code": "MDL",
	    "number": "498",
	    "digits": 2,
	    "currency": "Moldovan Leu",
	    "countries": [
	      "Moldova (The Republic Of)"
	    ]
	  },
	  {
	    "code": "MGA",
	    "number": "969",
	    "digits": 2,
	    "currency": "Malagasy Ariary",
	    "countries": [
	      "Madagascar"
	    ]
	  },
	  {
	    "code": "MKD",
	    "number": "807",
	    "digits": 2,
	    "currency": "Denar",
	    "countries": [
	      "North Macedonia"
	    ]
	  },
	  {
	    "code": "MMK",
	    "number": "104",
	    "digits": 2,
	    "currency": "Kyat",
	    "countries": [
	      "Myanmar"
	    ]
	  },
	  {
	    "code": "MNT",
	    "number": "496",
	    "digits": 2,
	    "currency": "Tugrik",
	    "countries": [
	      "Mongolia"
	    ]
	  },
	  {
	    "code": "MOP",
	    "number": "446",
	    "digits": 2,
	    "currency": "Pataca",
	    "countries": [
	      "Macao"
	    ]
	  },
	  {
	    "code": "MRU",
	    "number": "929",
	    "digits": 2,
	    "currency": "Ouguiya",
	    "countries": [
	      "Mauritania"
	    ]
	  },
	  {
	    "code": "MUR",
	    "number": "480",
	    "digits": 2,
	    "currency": "Mauritius Rupee",
	    "countries": [
	      "Mauritius"
	    ]
	  },
	  {
	    "code": "MVR",
	    "number": "462",
	    "digits": 2,
	    "currency": "Rufiyaa",
	    "countries": [
	      "Maldives"
	    ]
	  },
	  {
	    "code": "MWK",
	    "number": "454",
	    "digits": 2,
	    "currency": "Malawi Kwacha",
	    "countries": [
	      "Malawi"
	    ]
	  },
	  {
	    "code": "MXN",
	    "number": "484",
	    "digits": 2,
	    "currency": "Mexican Peso",
	    "countries": [
	      "Mexico"
	    ]
	  },
	  {
	    "code": "MXV",
	    "number": "979",
	    "digits": 2,
	    "currency": "Mexican Unidad de Inversion (UDI)",
	    "countries": [
	      "Mexico"
	    ]
	  },
	  {
	    "code": "MYR",
	    "number": "458",
	    "digits": 2,
	    "currency": "Malaysian Ringgit",
	    "countries": [
	      "Malaysia"
	    ]
	  },
	  {
	    "code": "MZN",
	    "number": "943",
	    "digits": 2,
	    "currency": "Mozambique Metical",
	    "countries": [
	      "Mozambique"
	    ]
	  },
	  {
	    "code": "NAD",
	    "number": "516",
	    "digits": 2,
	    "currency": "Namibia Dollar",
	    "countries": [
	      "Namibia"
	    ]
	  },
	  {
	    "code": "NGN",
	    "number": "566",
	    "digits": 2,
	    "currency": "Naira",
	    "countries": [
	      "Nigeria"
	    ]
	  },
	  {
	    "code": "NIO",
	    "number": "558",
	    "digits": 2,
	    "currency": "Cordoba Oro",
	    "countries": [
	      "Nicaragua"
	    ]
	  },
	  {
	    "code": "NOK",
	    "number": "578",
	    "digits": 2,
	    "currency": "Norwegian Krone",
	    "countries": [
	      "Bouvet Island",
	      "Norway",
	      "Svalbard and Jan Mayen"
	    ]
	  },
	  {
	    "code": "NPR",
	    "number": "524",
	    "digits": 2,
	    "currency": "Nepalese Rupee",
	    "countries": [
	      "Nepal"
	    ]
	  },
	  {
	    "code": "NZD",
	    "number": "554",
	    "digits": 2,
	    "currency": "New Zealand Dollar",
	    "countries": [
	      "Cook Islands (The)",
	      "New Zealand",
	      "Niue",
	      "Pitcairn",
	      "Tokelau"
	    ]
	  },
	  {
	    "code": "OMR",
	    "number": "512",
	    "digits": 3,
	    "currency": "Rial Omani",
	    "countries": [
	      "Oman"
	    ]
	  },
	  {
	    "code": "PAB",
	    "number": "590",
	    "digits": 2,
	    "currency": "Balboa",
	    "countries": [
	      "Panama"
	    ]
	  },
	  {
	    "code": "PEN",
	    "number": "604",
	    "digits": 2,
	    "currency": "Sol",
	    "countries": [
	      "Peru"
	    ]
	  },
	  {
	    "code": "PGK",
	    "number": "598",
	    "digits": 2,
	    "currency": "Kina",
	    "countries": [
	      "Papua New Guinea"
	    ]
	  },
	  {
	    "code": "PHP",
	    "number": "608",
	    "digits": 2,
	    "currency": "Philippine Peso",
	    "countries": [
	      "Philippines (The)"
	    ]
	  },
	  {
	    "code": "PKR",
	    "number": "586",
	    "digits": 2,
	    "currency": "Pakistan Rupee",
	    "countries": [
	      "Pakistan"
	    ]
	  },
	  {
	    "code": "PLN",
	    "number": "985",
	    "digits": 2,
	    "currency": "Zloty",
	    "countries": [
	      "Poland"
	    ]
	  },
	  {
	    "code": "PYG",
	    "number": "600",
	    "digits": 0,
	    "currency": "Guarani",
	    "countries": [
	      "Paraguay"
	    ]
	  },
	  {
	    "code": "QAR",
	    "number": "634",
	    "digits": 2,
	    "currency": "Qatari Rial",
	    "countries": [
	      "Qatar"
	    ]
	  },
	  {
	    "code": "RON",
	    "number": "946",
	    "digits": 2,
	    "currency": "Romanian Leu",
	    "countries": [
	      "Romania"
	    ]
	  },
	  {
	    "code": "RSD",
	    "number": "941",
	    "digits": 2,
	    "currency": "Serbian Dinar",
	    "countries": [
	      "Serbia"
	    ]
	  },
	  {
	    "code": "RUB",
	    "number": "643",
	    "digits": 2,
	    "currency": "Russian Ruble",
	    "countries": [
	      "Russian Federation (The)"
	    ]
	  },
	  {
	    "code": "RWF",
	    "number": "646",
	    "digits": 0,
	    "currency": "Rwanda Franc",
	    "countries": [
	      "Rwanda"
	    ]
	  },
	  {
	    "code": "SAR",
	    "number": "682",
	    "digits": 2,
	    "currency": "Saudi Riyal",
	    "countries": [
	      "Saudi Arabia"
	    ]
	  },
	  {
	    "code": "SBD",
	    "number": "090",
	    "digits": 2,
	    "currency": "Solomon Islands Dollar",
	    "countries": [
	      "Solomon Islands"
	    ]
	  },
	  {
	    "code": "SCR",
	    "number": "690",
	    "digits": 2,
	    "currency": "Seychelles Rupee",
	    "countries": [
	      "Seychelles"
	    ]
	  },
	  {
	    "code": "SDG",
	    "number": "938",
	    "digits": 2,
	    "currency": "Sudanese Pound",
	    "countries": [
	      "Sudan (The)"
	    ]
	  },
	  {
	    "code": "SEK",
	    "number": "752",
	    "digits": 2,
	    "currency": "Swedish Krona",
	    "countries": [
	      "Sweden"
	    ]
	  },
	  {
	    "code": "SGD",
	    "number": "702",
	    "digits": 2,
	    "currency": "Singapore Dollar",
	    "countries": [
	      "Singapore"
	    ]
	  },
	  {
	    "code": "SHP",
	    "number": "654",
	    "digits": 2,
	    "currency": "Saint Helena Pound",
	    "countries": [
	      "Saint Helena, Ascension and Tristan Da Cunha"
	    ]
	  },
	  {
	    "code": "SLE",
	    "number": "925",
	    "digits": 2,
	    "currency": "Leone",
	    "countries": [
	      "Sierra Leone"
	    ]
	  },
	  {
	    "code": "SOS",
	    "number": "706",
	    "digits": 2,
	    "currency": "Somali Shilling",
	    "countries": [
	      "Somalia"
	    ]
	  },
	  {
	    "code": "SRD",
	    "number": "968",
	    "digits": 2,
	    "currency": "Surinam Dollar",
	    "countries": [
	      "Suriname"
	    ]
	  },
	  {
	    "code": "SSP",
	    "number": "728",
	    "digits": 2,
	    "currency": "South Sudanese Pound",
	    "countries": [
	      "South Sudan"
	    ]
	  },
	  {
	    "code": "STN",
	    "number": "930",
	    "digits": 2,
	    "currency": "Dobra",
	    "countries": [
	      "Sao Tome and Principe"
	    ]
	  },
	  {
	    "code": "SVC",
	    "number": "222",
	    "digits": 2,
	    "currency": "El Salvador Colon",
	    "countries": [
	      "El Salvador"
	    ]
	  },
	  {
	    "code": "SYP",
	    "number": "760",
	    "digits": 2,
	    "currency": "Syrian Pound",
	    "countries": [
	      "Syrian Arab Republic"
	    ]
	  },
	  {
	    "code": "SZL",
	    "number": "748",
	    "digits": 2,
	    "currency": "Lilangeni",
	    "countries": [
	      "Eswatini"
	    ]
	  },
	  {
	    "code": "THB",
	    "number": "764",
	    "digits": 2,
	    "currency": "Baht",
	    "countries": [
	      "Thailand"
	    ]
	  },
	  {
	    "code": "TJS",
	    "number": "972",
	    "digits": 2,
	    "currency": "Somoni",
	    "countries": [
	      "Tajikistan"
	    ]
	  },
	  {
	    "code": "TMT",
	    "number": "934",
	    "digits": 2,
	    "currency": "Turkmenistan New Manat",
	    "countries": [
	      "Turkmenistan"
	    ]
	  },
	  {
	    "code": "TND",
	    "number": "788",
	    "digits": 3,
	    "currency": "Tunisian Dinar",
	    "countries": [
	      "Tunisia"
	    ]
	  },
	  {
	    "code": "TOP",
	    "number": "776",
	    "digits": 2,
	    "currency": "Pa’anga",
	    "countries": [
	      "Tonga"
	    ]
	  },
	  {
	    "code": "TRY",
	    "number": "949",
	    "digits": 2,
	    "currency": "Turkish Lira",
	    "countries": [
	      "Türki̇ye"
	    ]
	  },
	  {
	    "code": "TTD",
	    "number": "780",
	    "digits": 2,
	    "currency": "Trinidad and Tobago Dollar",
	    "countries": [
	      "Trinidad and Tobago"
	    ]
	  },
	  {
	    "code": "TWD",
	    "number": "901",
	    "digits": 2,
	    "currency": "New Taiwan Dollar",
	    "countries": [
	      "Taiwan (Province of China)"
	    ]
	  },
	  {
	    "code": "TZS",
	    "number": "834",
	    "digits": 2,
	    "currency": "Tanzanian Shilling",
	    "countries": [
	      "Tanzania, United Republic Of"
	    ]
	  },
	  {
	    "code": "UAH",
	    "number": "980",
	    "digits": 2,
	    "currency": "Hryvnia",
	    "countries": [
	      "Ukraine"
	    ]
	  },
	  {
	    "code": "UGX",
	    "number": "800",
	    "digits": 0,
	    "currency": "Uganda Shilling",
	    "countries": [
	      "Uganda"
	    ]
	  },
	  {
	    "code": "USD",
	    "number": "840",
	    "digits": 2,
	    "currency": "US Dollar",
	    "countries": [
	      "American Samoa",
	      "Bonaire, Sint Eustatius and Saba",
	      "British Indian Ocean Territory (The)",
	      "Ecuador",
	      "El Salvador",
	      "Guam",
	      "Haiti",
	      "Marshall Islands (The)",
	      "Micronesia (Federated States Of)",
	      "Northern Mariana Islands (The)",
	      "Palau",
	      "Panama",
	      "Puerto Rico",
	      "Timor-Leste",
	      "Turks and Caicos Islands (The)",
	      "United States Minor Outlying Islands (The)",
	      "United States of America (The)",
	      "Virgin Islands (British)",
	      "Virgin Islands (u.s.)"
	    ]
	  },
	  {
	    "code": "USN",
	    "number": "997",
	    "digits": 2,
	    "currency": "US Dollar (Next day)",
	    "countries": [
	      "United States of America (The)"
	    ]
	  },
	  {
	    "code": "UYI",
	    "number": "940",
	    "digits": 0,
	    "currency": "Uruguay Peso en Unidades Indexadas (UI)",
	    "countries": [
	      "Uruguay"
	    ]
	  },
	  {
	    "code": "UYU",
	    "number": "858",
	    "digits": 2,
	    "currency": "Peso Uruguayo",
	    "countries": [
	      "Uruguay"
	    ]
	  },
	  {
	    "code": "UYW",
	    "number": "927",
	    "digits": 4,
	    "currency": "Unidad Previsional",
	    "countries": [
	      "Uruguay"
	    ]
	  },
	  {
	    "code": "UZS",
	    "number": "860",
	    "digits": 2,
	    "currency": "Uzbekistan Sum",
	    "countries": [
	      "Uzbekistan"
	    ]
	  },
	  {
	    "code": "VED",
	    "number": "926",
	    "digits": 2,
	    "currency": "Bolívar Soberano",
	    "countries": [
	      "Venezuela (Bolivarian Republic Of)"
	    ]
	  },
	  {
	    "code": "VES",
	    "number": "928",
	    "digits": 2,
	    "currency": "Bolívar Soberano",
	    "countries": [
	      "Venezuela (Bolivarian Republic Of)"
	    ]
	  },
	  {
	    "code": "VND",
	    "number": "704",
	    "digits": 0,
	    "currency": "Dong",
	    "countries": [
	      "Viet Nam"
	    ]
	  },
	  {
	    "code": "VUV",
	    "number": "548",
	    "digits": 0,
	    "currency": "Vatu",
	    "countries": [
	      "Vanuatu"
	    ]
	  },
	  {
	    "code": "WST",
	    "number": "882",
	    "digits": 2,
	    "currency": "Tala",
	    "countries": [
	      "Samoa"
	    ]
	  },
	  {
	    "code": "XAF",
	    "number": "950",
	    "digits": 0,
	    "currency": "CFA Franc BEAC",
	    "countries": [
	      "Cameroon",
	      "Central African Republic (The)",
	      "Chad",
	      "Congo (The)",
	      "Equatorial Guinea",
	      "Gabon"
	    ]
	  },
	  {
	    "code": "XAG",
	    "number": "961",
	    "digits": 0,
	    "currency": "Silver",
	    "countries": [
	      "Zz11_silver"
	    ]
	  },
	  {
	    "code": "XAU",
	    "number": "959",
	    "digits": 0,
	    "currency": "Gold",
	    "countries": [
	      "Zz08_gold"
	    ]
	  },
	  {
	    "code": "XBA",
	    "number": "955",
	    "digits": 0,
	    "currency": "Bond Markets Unit European Composite Unit (EURCO)",
	    "countries": [
	      "Zz01_bond Markets Unit European_eurco"
	    ]
	  },
	  {
	    "code": "XBB",
	    "number": "956",
	    "digits": 0,
	    "currency": "Bond Markets Unit European Monetary Unit (E.M.U.-6)",
	    "countries": [
	      "Zz02_bond Markets Unit European_emu-6"
	    ]
	  },
	  {
	    "code": "XBC",
	    "number": "957",
	    "digits": 0,
	    "currency": "Bond Markets Unit European Unit of Account 9 (E.U.A.-9)",
	    "countries": [
	      "Zz03_bond Markets Unit European_eua-9"
	    ]
	  },
	  {
	    "code": "XBD",
	    "number": "958",
	    "digits": 0,
	    "currency": "Bond Markets Unit European Unit of Account 17 (E.U.A.-17)",
	    "countries": [
	      "Zz04_bond Markets Unit European_eua-17"
	    ]
	  },
	  {
	    "code": "XCD",
	    "number": "951",
	    "digits": 2,
	    "currency": "East Caribbean Dollar",
	    "countries": [
	      "Anguilla",
	      "Antigua and Barbuda",
	      "Dominica",
	      "Grenada",
	      "Montserrat",
	      "Saint Kitts and Nevis",
	      "Saint Lucia",
	      "Saint Vincent and the Grenadines"
	    ]
	  },
	  {
	    "code": "XDR",
	    "number": "960",
	    "digits": 0,
	    "currency": "SDR (Special Drawing Right)",
	    "countries": [
	      "International Monetary Fund (Imf) "
	    ]
	  },
	  {
	    "code": "XOF",
	    "number": "952",
	    "digits": 0,
	    "currency": "CFA Franc BCEAO",
	    "countries": [
	      "Benin",
	      "Burkina Faso",
	      "Côte D'ivoire",
	      "Guinea-Bissau",
	      "Mali",
	      "Niger (The)",
	      "Senegal",
	      "Togo"
	    ]
	  },
	  {
	    "code": "XPD",
	    "number": "964",
	    "digits": 0,
	    "currency": "Palladium",
	    "countries": [
	      "Zz09_palladium"
	    ]
	  },
	  {
	    "code": "XPF",
	    "number": "953",
	    "digits": 0,
	    "currency": "CFP Franc",
	    "countries": [
	      "French Polynesia",
	      "New Caledonia",
	      "Wallis and Futuna"
	    ]
	  },
	  {
	    "code": "XPT",
	    "number": "962",
	    "digits": 0,
	    "currency": "Platinum",
	    "countries": [
	      "Zz10_platinum"
	    ]
	  },
	  {
	    "code": "XSU",
	    "number": "994",
	    "digits": 0,
	    "currency": "Sucre",
	    "countries": [
	      "Sistema Unitario De Compensacion Regional De Pagos \"Sucre\""
	    ]
	  },
	  {
	    "code": "XTS",
	    "number": "963",
	    "digits": 0,
	    "currency": "Codes specifically reserved for testing purposes",
	    "countries": [
	      "Zz06_testing_code"
	    ]
	  },
	  {
	    "code": "XUA",
	    "number": "965",
	    "digits": 0,
	    "currency": "ADB Unit of Account",
	    "countries": [
	      "Member Countries of the African Development Bank Group"
	    ]
	  },
	  {
	    "code": "XXX",
	    "number": "999",
	    "digits": 0,
	    "currency": "The codes assigned for transactions where no currency is involved",
	    "countries": [
	      "Zz07_no_currency"
	    ]
	  },
	  {
	    "code": "YER",
	    "number": "886",
	    "digits": 2,
	    "currency": "Yemeni Rial",
	    "countries": [
	      "Yemen"
	    ]
	  },
	  {
	    "code": "ZAR",
	    "number": "710",
	    "digits": 2,
	    "currency": "Rand",
	    "countries": [
	      "Lesotho",
	      "Namibia",
	      "South Africa"
	    ]
	  },
	  {
	    "code": "ZMW",
	    "number": "967",
	    "digits": 2,
	    "currency": "Zambian Kwacha",
	    "countries": [
	      "Zambia"
	    ]
	  },
	  {
	    "code": "ZWG",
	    "number": "924",
	    "digits": 2,
	    "currency": "Zimbabwe Gold",
	    "countries": [
	      "Zimbabwe"
	    ]
	  }
	];
	return data;
}

/*
	Follows ISO 4217, https://www.iso.org/iso-4217-currency-codes.html
	See https://www.currency-iso.org/dam/downloads/lists/list_one.xml
	Data last updated 2024-06-25
*/

var iso4217PublishDate;
var hasRequiredIso4217PublishDate;

function requireIso4217PublishDate () {
	if (hasRequiredIso4217PublishDate) return iso4217PublishDate;
	hasRequiredIso4217PublishDate = 1;
	iso4217PublishDate = "2024-06-25";
	return iso4217PublishDate;
}

var hasRequiredCurrencyCodes;

function requireCurrencyCodes () {
	if (hasRequiredCurrencyCodes) return currencyCodes;
	hasRequiredCurrencyCodes = 1;
	var first = requireFirstMatch();
	var nub = requireNub();
	var data = requireData();
	var publishDate = requireIso4217PublishDate();

	var code = function(code) {
	  code = code.toUpperCase();

	  return first(data, function(c) {
	    return c.code === code;
	  });
	};
	var country = function(country) {
	  country = country.toLowerCase();

	  return data.filter(function(c) {
	    return (c.countries.map(function(c) { return c.toLowerCase(); } ) || []).indexOf(country) > -1;
	  });
	};
	var number = function(number) {
	  return first(data, function(c) {
	    return c.number === String(number);
	  });
	};
	var codes = function() {
	  return data.map(function(c) {
	    return c.code;
	  });
	};
	var numbers = function() {
	  var items = data.map(function(c) {
	    return c.number;
	  });

	  // handle cases where number is undefined (e.g. XFU and XBT)
	  return items.filter(function(n) {
	    if (n) {
	      return n;
	    }
	  });
	};
	var countries = function() {
	  var m = data
	    .filter(function(c) {
	      return c.countries;
	    })
	    .map(function(c) {
	      return c.countries;
	    });
	  return nub(Array.prototype.concat.apply([], m));
	};

	currencyCodes.code = code;
	currencyCodes.country = country;
	currencyCodes.number = number;
	currencyCodes.codes = codes;
	currencyCodes.numbers = numbers;
	currencyCodes.countries = countries;
	currencyCodes.publishDate = publishDate;
	currencyCodes.data = data;
	return currencyCodes;
}

var currencyCodesExports = requireCurrencyCodes();

const CurrencyPicker = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.change = index.createEvent(this, "change");
        /**
         * The list of currencies. If currencies are not provided it will default to `allCurrencies`,
         * We also support ´nordicMarketCurrencies´ and ´europeanMarketCurrencies´.
         */
        this.currencies = currencyCodesExports.codes();
        /**
         * Whether the current property is required
         */
        this.required = false;
        /**
         * Whether the current property is readonly
         */
        this.readonly = false;
        /**
         * Whether the current property is invalid
         */
        this.invalid = false;
        /**
         * Whether the current property is disabled
         */
        this.disabled = false;
        this.search = async (query) => {
            if (query === '') {
                return this.currencies.map(this.createListItem).filter(nonNull.isNonNull);
            }
            return this.currencies
                .map(this.createListItem)
                .filter(nonNull.isNonNull)
                .filter((item) => {
                var _a;
                return (((_a = item === null || item === void 0 ? void 0 : item.secondaryText) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(query.toLowerCase())) ||
                    item.text.toLowerCase().includes(query.toLowerCase()));
            });
        };
        this.createListItem = (currency) => {
            if (!currency) {
                return;
            }
            return {
                text: currency,
                value: currency,
                secondaryText: this.getCurrencyName(currency),
                icon: this.getCurrencyIcon(currency),
            };
        };
        this.handleChange = (event) => {
            var _a;
            event.stopPropagation();
            this.change.emit((_a = event.detail) === null || _a === void 0 ? void 0 : _a.value);
        };
    }
    render() {
        return (index.h("limel-picker", { key: '2e9dcd3bf98fe7a3377aa24c0e45814f2c698633', label: this.label || this.defaultLabel, value: this.createListItem(this.value), helperText: this.helperText, onChange: this.handleChange, badgeIcons: false, disabled: this.disabled, required: this.required, readonly: this.readonly, invalid: this.readonly, searcher: this.search }));
    }
    getCurrencyName(code) {
        var _a;
        const formatter = Intl.NumberFormat(this.application.getLanguage(), {
            style: 'currency',
            currency: code,
            currencyDisplay: 'name',
        });
        try {
            return (_a = formatter
                .formatToParts(1)
                .find((part) => part.type === 'currency')) === null || _a === void 0 ? void 0 : _a.value;
        }
        catch (_b) {
            return;
        }
    }
    getCurrencyIcon(currency) {
        return {
            EUR: 'euro',
            USD: 'us_dollar',
            SEK: 'sek',
            NOK: 'sek',
            DKK: 'sek',
            ISK: 'sek',
        }[currency];
    }
    get translator() {
        return this.platform.get(index_esm.n.Translate);
    }
    get application() {
        return this.platform.get(index_esm.n.Application);
    }
    get defaultLabel() {
        return this.translator.get('webclient.currency-picker.label');
    }
};

exports.limebb_currency_picker = CurrencyPicker;
