{"version":3,"file":"groupCountriesByPrefix.mjs","sources":["../../../../src/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.ts"],"sourcesContent":["import { Country } from '../../data/countries';\n\nexport const groupCountriesByPrefix = (countries: readonly Country[]) => {\n  const countriesByPrefix = new Map<string, Country[]>();\n  countries.forEach((country) => {\n    countriesByPrefix.set(country.phone, [\n      ...(countriesByPrefix.get(country.phone) ?? []),\n      country,\n    ]);\n  });\n  return countriesByPrefix;\n};\n"],"names":["groupCountriesByPrefix","countries","countriesByPrefix","Map","forEach","country","set","phone","get"],"mappings":"AAEO,MAAMA,sBAAsB,GAAIC,SAA6B,IAAI;AACtE,EAAA,MAAMC,iBAAiB,GAAG,IAAIC,GAAG,EAAqB;AACtDF,EAAAA,SAAS,CAACG,OAAO,CAAEC,OAAO,IAAI;IAC5BH,iBAAiB,CAACI,GAAG,CAACD,OAAO,CAACE,KAAK,EAAE,CACnC,IAAIL,iBAAiB,CAACM,GAAG,CAACH,OAAO,CAACE,KAAK,CAAC,IAAI,EAAE,CAAC,EAC/CF,OAAO,CACR,CAAC;AACJ,EAAA,CAAC,CAAC;AACF,EAAA,OAAOH,iBAAiB;AAC1B;;;;"}