All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.prod.util.detectNavigatorLanguage.js.map Maven / Gradle / Ivy

{
  "version": 3,
  "sources": ["../../../src/util/detectNavigatorLanguage.ts"],
  "sourcesContent": ["import { DEFAULT_LANGUAGE } from \"../generated/AssetParameters.js\";\n\nconst isSSR = typeof document === \"undefined\";\n\nconst detectNavigatorLanguage = () => {\n\tif (isSSR) {\n\t\treturn DEFAULT_LANGUAGE;\n\t}\n\tconst browserLanguages = navigator.languages;\n\n\tconst navigatorLanguage = () => {\n\t\treturn navigator.language;\n\t};\n\n\tconst rawLocale = (browserLanguages && browserLanguages[0]) || navigatorLanguage();\n\n\treturn rawLocale || DEFAULT_LANGUAGE;\n};\n\nexport default detectNavigatorLanguage;\n"],
  "mappings": "aAAA,OAAS,oBAAAA,MAAwB,kCAEjC,MAAMC,EAAQ,OAAO,SAAa,IAE5BC,EAA0B,IAAM,CACrC,GAAID,EACH,OAAOD,EAER,MAAMG,EAAmB,UAAU,UAE7BC,EAAoB,IAClB,UAAU,SAKlB,OAFmBD,GAAoBA,EAAiB,CAAC,GAAMC,EAAkB,GAE7DJ,CACrB,EAEA,eAAeE",
  "names": ["DEFAULT_LANGUAGE", "isSSR", "detectNavigatorLanguage", "browserLanguages", "navigatorLanguage"]
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy