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I,wBAA0B,SAAU,GACtC,GAAI,EAAqB,eAAe,GACtC,OAAO,EAAqB,EAGhC,EAaO,CAEX,CAEA,OAAO,QAAU","file":"/npm/country-locale-map@1.9.12/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/country-locale-map@1.9.12/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","const fuzz = require('fuzzball');\r\nfunction CLM() {\r\n    var clm = {};\r\n    var countries; \r\n\r\n    if((typeof process !== 'undefined') && process && process.env && process.env.CLM_MODE == 'INTL') {\r\n        countries = require('./countries-intl.json');\r\n    } else {\r\n        countries = require('./countries.json');\r\n    }\r\n\r\n    var countryByAlpha2Code = {};\r\n    var countryByAlpha3Code = {};\r\n    var countryByNumericCode = {};\r\n    var countryByName = {};\r\n    var countryNames = [];\r\n    var countriesByContinent = {};\r\n    \r\n    for(let i=0; i<countries.length; ++i) {\r\n        countryByAlpha2Code[countries[i]['alpha2']] = countries[i];\r\n        countryByAlpha3Code[countries[i]['alpha3']] = countries[i];\r\n        countryByNumericCode[countries[i]['numeric']] = countries[i];\r\n        countryByName[countries[i]['name']] = countries[i];\r\n        countryNames.push(countries[i]['name']);\r\n        countriesByContinent[countries[i][\"continent\"]] = [\r\n                          ...(countriesByContinent[countries[i][\"continent\"]] || []),\r\n                          countries[i],\r\n                        ];\r\n        \r\n        if(countries[i]['alternate_names']) {\r\n            for(let j=0; j<countries[i]['alternate_names'].length; ++j) {\r\n                countryByName[countries[i]['alternate_names'][j]] = countries[i];\r\n                countryNames.push(countries[i]['alternate_names'][j]);\r\n            }\r\n        }\r\n    }\r\n\r\n    Object.freeze(countryByAlpha2Code)\r\n    Object.freeze(countryByAlpha3Code)\r\n    Object.freeze(countryByNumericCode)\r\n    Object.freeze(countryByName)\r\n    Object.freeze(countryNames)\r\n    Object.freeze(countriesByContinent);\r\n    \r\n    clm.getAllCountries = function(){\r\n        return countries;\r\n    }\r\n\r\n    /* get values by alpha2 */\r\n    clm.getAlpha3ByAlpha2 = function(alpha2) {\r\n        if (countryByAlpha2Code.hasOwnProperty(alpha2))\r\n            return countryByAlpha2Code[alpha2].alpha3;\r\n        else \r\n            return undefined;\r\n    }; \r\n\r\n    clm.getLocaleByAlpha2 = function(alpha2) {\r\n        if (countryByAlpha2Code.hasOwnProperty(alpha2))\r\n            return countryByAlpha2Code[alpha2].default_locale;\r\n        else \r\n            return undefined;\r\n    };\r\n\r\n    clm.getCountryNameByAlpha2 = function(alpha2) {\r\n        if (countryByAlpha2Code.hasOwnProperty(alpha2))\r\n            return countryByAlpha2Code[alpha2].name;\r\n        else \r\n            return undefined; \r\n    };\r\n\r\n    clm.getNumericByAlpha2 = function(alpha2) {\r\n        if (countryByAlpha2Code.hasOwnProperty(alpha2))\r\n            return countryByAlpha2Code[alpha2].numeric;\r\n        else \r\n            return undefined; \r\n    };\r\n    \r\n    clm.getCurrencyByAlpha2 = function(alpha2) {\r\n        if (countryByAlpha2Code.hasOwnProperty(alpha2))\r\n            return countryByAlpha2Code[alpha2].currency;\r\n        else \r\n            return undefined; \r\n    }; \r\n\r\n    clm.getCountryByAlpha2 = function(alpha2) {\r\n        return countryByAlpha2Code.hasOwnProperty(alpha2) ? countryByAlpha2Code[alpha2] : undefined;\r\n    }\r\n\r\n    /* get values by alpha3 */\r\n    clm.getAlpha2ByAlpha3 = function(alpha3) {\r\n        if (countryByAlpha3Code.hasOwnProperty(alpha3))\r\n            return countryByAlpha3Code[alpha3].alpha2;\r\n        else \r\n            return undefined;\r\n    }; \r\n\r\n    clm.getLocaleByAlpha3 = function(alpha3) {\r\n        if (countryByAlpha3Code.hasOwnProperty(alpha3))\r\n            return countryByAlpha3Code[alpha3].default_locale;\r\n        else \r\n            return undefined;\r\n    };\r\n\r\n    clm.getCountryNameByAlpha3 = function(alpha3) {\r\n        if (countryByAlpha3Code.hasOwnProperty(alpha3))\r\n            return countryByAlpha3Code[alpha3].name;\r\n        else \r\n            return undefined; \r\n    };\r\n\r\n    clm.getNumericByAlpha3 = function(alpha3) {\r\n        if (countryByAlpha3Code.hasOwnProperty(alpha3))\r\n            return countryByAlpha3Code[alpha3].numeric;\r\n        else \r\n            return undefined; \r\n    };    \r\n\r\n    clm.getCurrencyByAlpha3 = function(alpha3) {\r\n        if (countryByAlpha3Code.hasOwnProperty(alpha3))\r\n            return countryByAlpha3Code[alpha3].currency;\r\n        else \r\n            return undefined; \r\n    }; \r\n\r\n    clm.getCountryByAlpha3 = function(alpha3) {\r\n        return countryByAlpha3Code.hasOwnProperty(alpha3) ? countryByAlpha3Code[alpha3] : undefined;\r\n    }\r\n\r\n    /* get values by numeric */\r\n    clm.getAlpha2ByNumeric = function(numeric) {\r\n        if (countryByNumericCode.hasOwnProperty(numeric))\r\n            return countryByNumericCode[numeric].alpha2;\r\n        else \r\n            return undefined;\r\n    }; \r\n\r\n    clm.getAlpha3ByNumeric = function(numeric) {\r\n        if (countryByNumericCode.hasOwnProperty(numeric))\r\n            return countryByNumericCode[numeric].alpha3;\r\n        else \r\n            return undefined;\r\n    };     \r\n\r\n    clm.getLocaleByNumeric = function(numeric) {\r\n        if (countryByNumericCode.hasOwnProperty(numeric))\r\n            return countryByNumericCode[numeric].default_locale;\r\n        else \r\n            return undefined;\r\n    };\r\n\r\n    clm.getCountryNameByNumeric = function(numeric) {\r\n        if (countryByNumericCode.hasOwnProperty(numeric))\r\n            return countryByNumericCode[numeric].name;\r\n        else \r\n            return undefined; \r\n    };    \r\n\r\n    clm.getCurrencyByNumeric = function(numeric) {\r\n        if (countryByNumericCode.hasOwnProperty(numeric))\r\n            return countryByNumericCode[numeric].currency;\r\n        else \r\n            return undefined;\r\n    };\r\n\r\n    clm.getCountryByNumeric = function(numeric) {\r\n        return countryByNumericCode.hasOwnProperty(numeric) ? countryByNumericCode[numeric] : undefined;\r\n    };\r\n\r\n    /* get values by country name */\r\n    clm.getAlpha2ByName = function(name, fuzzy) {\r\n        if(countryByName.hasOwnProperty(name)) {\r\n            return countryByName[name].alpha2;\r\n        } else if(fuzzy) {\r\n            let match = getClosestMatch(name);\r\n            if(match) {\r\n                return countryByName[match].alpha2;\r\n            }\r\n        }\r\n        return undefined;\r\n    }; \r\n\r\n    clm.getAlpha3ByName = function(name, fuzzy) {\r\n        if(countryByName.hasOwnProperty(name)) {\r\n            return countryByName[name].alpha3;\r\n        } else if(fuzzy) {\r\n            let match = getClosestMatch(name);\r\n            if(match) {\r\n                return countryByName[match].alpha3;\r\n            }\r\n        }\r\n        \r\n        return undefined;\r\n    };     \r\n\r\n    clm.getLocaleByName = function(name, fuzzy) {\r\n        if(countryByName.hasOwnProperty(name)) {\r\n            return countryByName[name].default_locale;\r\n        } else if(fuzzy) {\r\n            let match = getClosestMatch(name);\r\n            if(match) {\r\n                return countryByName[match].default_locale;\r\n            }\r\n        }\r\n        \r\n        return undefined;\r\n    };\r\n\r\n    clm.getNumericByName = function(name, fuzzy) {\r\n        if(countryByName.hasOwnProperty(name)) {\r\n            return countryByName[name].numeric;\r\n        } else if(fuzzy) {\r\n            let match = getClosestMatch(name);\r\n            if(match) {\r\n                return countryByName[match].numeric;\r\n            }\r\n        }\r\n        return undefined; \r\n    };    \r\n\r\n    clm.getCurrencyByName = function(name, fuzzy) {\r\n        if(countryByName.hasOwnProperty(name)) {\r\n            return countryByName[name].currency;\r\n        } else if(fuzzy) {\r\n            let match = getClosestMatch(name);\r\n            if(match) {\r\n                return countryByName[match].currency;\r\n            }\r\n        }\r\n        \r\n        return undefined;\r\n    };\r\n\r\n    clm.getCountryByName = function(name, fuzzy) {\r\n        \r\n        if(countryByName.hasOwnProperty(name)) {\r\n            return countryByName[name];\r\n        } else if(fuzzy) {\r\n            let match = getClosestMatch(name);\r\n            if(match) {\r\n                return countryByName[match];\r\n            }\r\n        }       \r\n\r\n        return undefined; \r\n\r\n    };\r\n    \r\n    /* get countries by continent name */\r\n    clm.getCountriesByContinent = function (name) {\r\n      if (countriesByContinent.hasOwnProperty(name)) {\r\n        return countriesByContinent[name];\r\n      }\r\n      return undefined\r\n    }\r\n    \r\n    function getClosestMatch(name) {\r\n\r\n        let result = fuzz.extract(name, countryNames);\r\n        if(result[0][1] >= 60) {\r\n            return result[0][0];\r\n        }\r\n\r\n        return undefined;\r\n\r\n    }\r\n\r\n    return clm; \r\n\r\n}\r\n\r\nmodule.exports = CLM();\r\n"]}