const fetchConfig = { credentials: 'same-origin', mode: 'cors', priority: 'low', cache: 'no-store' } const langCode = window.LANG_CODE.toLowerCase() window.initialCriticalData = window.fetch ? Promise.all( [ '/api/v4/settings/countries_currencies', '/api/v2/player', '/api/cms/v4/languages', '/api/v4/auth/restricted_countries', `/api/cms/v4/strings/${langCode}` ].map((endpoint) => fetch(endpoint, fetchConfig) .then((response) => response.json()) .then((value) => value && value.data ? { ...value, __langCode__: langCode } : value)) ).catch(() => null) : null