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,MACvBmnB,EAAernB,EAAI+nB,aAAa7pB,IAAI,YAAc,GAClDiJ,EAAOnH,EAAI+nB,aAAa7pB,IAAI,SAAW,GAEvCuqB,EAAcpB,EAAa9hB,cAAcgF,MAAM,KAAK,GAC1D,OAAOpD,EAAK5B,gBAAkB,WAAWA,eAA8C,YAA7BkjB,EAAYljB,aAC1E,CL8DwBmjB,GAChB,OAAO,EAEX,MAAMC,EAAYnqB,OAAOymB,uBAAuBF,KAC1C6D,EAAQpqB,OAAOqmB,QAAQC,iBAAiBC,MAAMC,YACpD,OAAO2D,GAAaC,CACxB,CAM6DC,KAChDrqB,OAAOymB,wBACRzmB,OAAOymB,sBAAwB,CAAC,GAEpCzmB,OAAOymB,sBAAsB6D,aAAe5E,GAC5C1lB,OAAO+lB,yBAAyBqB,SAAU,GMrFrB,mCN8FrBpnB,OAAO+lB,2BACP/lB,OAAO+lB,yBAAyBI,OM/FX,qCFoBzBnmB,OAAOuc,YAAc,CACjBG,mBAAkB,GAClBC,cAAa,GACbkB,cAAa,IAEjB,GAA+BS,EACnC,E","sources":["webpack://@msnews/edgemobile/webpack/bootstrap","webpack://@msnews/edgemobile/webpack/runtime/define property getters","webpack://@msnews/edgemobile/webpack/runtime/global","webpack://@msnews/edgemobile/webpack/runtime/hasOwnProperty shorthand","webpack://@msnews/edgemobile/../../libs/isomorphic-util/dist/DOMHelpersCore.js","webpack://@msnews/edgemobile/../../libs/isomorphic-util/dist/IsomorphicStorage.js","webpack://@msnews/edgemobile/../../libs/isomorphic-util/dist/requestData.js","webpack://@msnews/edgemobile/../../libs/isomorphic-util/dist/SSRInteropContract.js","webpack://@msnews/edgemobile/../../libs/isomorphic-util/dist/DOMHelpers.js","webpack://@msnews/edgemobile/../../libs/experiences-constants/dist/AuthCookieNames.js","webpack://@msnews/edgemobile/../../libs/core-helper/dist/GetCookieCore.js","webpack://@msnews/edgemobile/../../libs/core-helper/dist/TryParseJson.js","webpack://@msnews/edgemobile/../../libs/experiences-constants/dist/Flights.js","webpack://@msnews/edgemobile/../../libs/inline-head-common/dist/InlineHeadCommon.js","webpack://@msnews/edgemobile/../../libs/experimentation-helpers/dist/GetPeregrineFlights.js","webpack://@msnews/edgemobile/../../libs/cookie-utils/dist/cookie-helpers/AudienceModeCookie.js","webpack://@msnews/edgemobile/../../libs/fundamentals/dist/utilities/ChinaCompliance.js","webpack://@msnews/edgemobile/../../libs/widget-initializer/dist/ErrorDispatcher.js","webpack://@msnews/edgemobile/../../libs/experiences-constants/dist/Widgets.js","webpack://@msnews/edgemobile/../../libs/widget-initializer/dist/Utilities.js","webpack://@msnews/edgemobile/../../libs/widget-initializer/dist/ErrorLogging.js","webpack://@msnews/edgemobile/../../libs/widget-initializer/dist/LoadingIcon.js","webpack://@msnews/edgemobile/../../libs/widget-initializer/dist/GetOverrideParams.js","webpack://@msnews/edgemobile/../../libs/widget-initializer/dist/AddMarkerToPageTimings.js","webpack://@msnews/edgemobile/../../libs/core-helper/dist/LodashLiteInline.js","webpack://@msnews/edgemobile/../../libs/core-helper/dist/ErrorHelper.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/isArray.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_freeGlobal.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_root.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_Symbol.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_getRawTag.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_objectToString.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_baseGetTag.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/isSymbol.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/isObjectLike.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_isKey.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/isObject.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_coreJsData.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_isMasked.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_toSource.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_baseIsNative.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/isFunction.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_getNative.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_getValue.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_nativeCreate.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_hashGet.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_hashHas.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_Hash.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_hashClear.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_hashDelete.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_hashSet.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_assocIndexOf.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/eq.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_listCacheDelete.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_ListCache.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_listCacheClear.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_listCacheGet.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_listCacheHas.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_listCacheSet.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_Map.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_getMapData.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_isKeyable.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_MapCache.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_mapCacheClear.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_mapCacheDelete.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_mapCacheGet.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_mapCacheHas.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_mapCacheSet.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/memoize.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_stringToPath.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_memoizeCapped.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_baseToString.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_arrayMap.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_castPath.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/toString.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_toKey.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/get.js","webpack://@msnews/edgemobile/../../node_modules/lodash-es/_baseGet.js","webpack://@msnews/edgemobile/../../libs/diagnostics/dist/logging/Util.js","webpack://@msnews/edgemobile/../../libs/diagnostics/dist/logging/Logger.js","webpack://@msnews/edgemobile/../../libs/diagnostics/dist/logging/LiteLogger.js","webpack://@msnews/edgemobile/../../libs/fundamentals/dist/webstorage/WebStorage.js","webpack://@msnews/edgemobile/../../libs/fundamentals/dist/webstorage/LocalStorage.js","webpack://@msnews/edgemobile/../../libs/widget-initializer/dist/GetPcsResponse.js","webpack://@msnews/edgemobile/../../libs/experimentation-helpers/dist/FlightHelpers.js","webpack://@msnews/edgemobile/../../libs/widget-initializer/dist/WidgetInitializer.js","webpack://@msnews/edgemobile/../../libs/widget-initializer/dist/GetDataWidgetAttributes.js","webpack://@msnews/edgemobile/../../libs/widget-initializer/dist/SetOneTrustScript.js","webpack://@msnews/edgemobile/../../node_modules/js-base64/base64.mjs","webpack://@msnews/edgemobile/../../libs/sapphire-feed-bridge/dist/SapphireCore.js","webpack://@msnews/edgemobile/../../libs/sapphire-feed-bridge/dist/userConfigUtils/PromiseWithTimeout.js","webpack://@msnews/edgemobile/../../libs/sapphire-feed-bridge/dist/bridge/Data.js","webpack://@msnews/edgemobile/../../libs/fundamentals/dist/utilities/NativeAppUtility.js","webpack://@msnews/edgemobile/./src/widget-initializer.ts","webpack://@msnews/edgemobile/../../libs/sapphire-feed-bridge/dist/utils/NativeAppCheck.js","webpack://@msnews/edgemobile/../../libs/sapphire-feed-bridge/dist/Constants.js"],"sourcesContent":["// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// © Microsoft Corporation. All rights reserved.\n/**\n * Checks if the DOM is available to access and use.\n * If you want to distinguish between server side rendering and client side rendering, prefer use `__WEBPACK_IS_NODE__` because it's a constant value that can be optimized by webpack.\n * @returns {boolean} - true if DOM is available, or false if it is not. This is typically true for\n * client side rendering and false for server side rendering.\n */\nexport function canUseDOM() {\n return !!(typeof window !== \"undefined\" && window.document && window.document.createElement && !window.isRenderServiceEnv);\n}\n//# sourceMappingURL=DOMHelpersCore.js.map","// © Microsoft Corporation. All rights reserved.\nlet storage = new Map();\nfunction getItem(key, fallback) {\n let found = storage.get(key);\n if (found === void 0 && fallback) {\n found = fallback();\n storage.set(key, found);\n }\n return found;\n}\n/**\n * Create a StorageBackend instance that wraps a getter function for the actual backend.\n */\nexport function createStoreWrapper(getBackend) {\n return {\n get: (key) => getBackend().get(key),\n set: (key, value) => getBackend().set(key, value),\n delete: (key) => getBackend().delete(key),\n clear: () => getBackend().clear(),\n has: (key) => getBackend().has(key)\n };\n}\nexport const IsomorphicStorage = Object.freeze({\n /**\n * Stores a value in storage.\n * @param key - The key to store the value under.\n * @param value - The value to store.\n * @returns This RequestStorage instance.\n */\n set(key, value) {\n storage.set(key, value);\n return this;\n },\n /**\n * Gets a value from storage.\n * @param key - The key to get the value for.\n * @param fallback - A function that provides a value if there is nothing stored under the key.\n * @returns The value stored under the key.\n * @remarks\n * The return result of the fallback function will be stored under the key for later access.\n */\n get: getItem,\n /**\n * Clears all values.\n */\n clear() {\n storage.clear();\n },\n /**\n *\n * @param key - The key to delete.\n * @returns true if the value was deleted; false otherwise.\n */\n delete(key) {\n return storage.delete(key);\n },\n /**\n * Determines whether there's a value for the given key.\n * @param key - The key to check.\n * @returns true if the key exists; false otherwise\n */\n has(key) {\n return storage.has(key);\n }\n});\nexport function setStorageBackend(backend) {\n storage = backend;\n}\n/**\n * Create an IsomorphicStorage-based value reference\n * @param value - The initial value\n * @returns { current: T } the object contains getter & setter to current value\n */\nexport function useIsomorphicStorageRef(value) {\n const key = Symbol();\n return {\n get current() {\n return IsomorphicStorage.get(key, () => value);\n },\n set current(nextValue) {\n IsomorphicStorage.set(key, nextValue);\n }\n };\n}\n//# sourceMappingURL=IsomorphicStorage.js.map","// © Microsoft Corporation. All rights reserved.\nimport { IsomorphicStorage } from \"./IsomorphicStorage\";\nimport { osatCookieExistsCookieName, osatCookieName } from \"./SSRInteropContract\";\nconst isomorphicStorageKey = \"__RequestDataInstance__\";\n/**\n * Singleton class to store client browser data sent through query param to Render Service.\n * This is only used under server environment.\n */\nclass RequestData {\n /**\n * Initialize the request data instance with passed in client properties\n */\n constructor(data, isPssrMode) {\n this.url = new URL(data.href);\n this.innerHeight = data.innerHeight;\n this.devicePixelRatio = data.devicePixelRatio;\n this.canUseCssGrid = data.canUseCssGrid;\n this.requestId = data.requestId;\n this.cookie = data.cookie;\n this.referer = data.referer;\n this.userAgent = data.userAgent;\n this.clientData = data.clientData;\n this.oneServiceHeaders = tryParseJson(data.oneServiceHeaders) || {};\n this.isPssrMode = isPssrMode;\n if (isPssrMode) {\n const osatCookieExists = getCookie(osatCookieExistsCookieName, this.cookie);\n const isOsateCookieValid = !!osatCookieExists && osatCookieExists === \"1\";\n const osatCookie = getCookie(osatCookieName, this.cookie);\n // When user is in interactive login scenario, OSATE is present but not valid,\n // so both conditions will fail and we will skip pure SSR\n // When OSAT is present and OSATE is valid (i.e. set to \"1\"), user has already signed in successfully\n // When both OSAT and OSATE are missing, user is not signed in (fallback to MUID for 1S calls)\n if ((isOsateCookieValid && osatCookie) || (!osatCookieExists && !osatCookie)) {\n this.msalAuthReady = true;\n if (osatCookie) {\n // When user has signed in, set JWT token in 1S request header for authentication\n this.oneServiceHeaders[\"Authorization\"] = `Bearer ${osatCookie}`;\n }\n return;\n }\n this.msalAuthReady = false;\n if (osatCookieExists && !isOsateCookieValid) {\n this.pssrRejectedReason = \"interactiveLogin\";\n }\n else if (osatCookieExists && !osatCookie) {\n this.pssrRejectedReason = \"missOSAT\";\n }\n else {\n this.pssrRejectedReason = \"missOSATE\";\n }\n }\n }\n /**\n * Returns singleton class instance.\n * @returns RequestData\n */\n static getInstance() {\n const instance = IsomorphicStorage.get(isomorphicStorageKey);\n if (instance) {\n return instance;\n }\n if (global[\"TEST_ENV\"]) {\n return resetRequestData({\n href: \"http://localhost:8080/\",\n innerHeight: 768,\n devicePixelRatio: 1,\n canUseCssGrid: false,\n requestId: \"0\",\n cookie: \"\",\n userAgent: \"\",\n referer: \"\",\n oneServiceHeaders: \"\"\n });\n }\n // Throw error if the request data has not been set as this should never be the case.\n // This likely highlights that the request data was not initialized when handling a\n // request when server side rendering.\n // TODO - http://osgvsowi/24832691 renable throwing an error.\n // This is currently disabled as other singletons that are initialized at import time use\n // this they will throw an error before anyone has the chance to initialize the request data\n return resetRequestData({\n href: \"http://localhost:8080/\",\n innerHeight: 0,\n devicePixelRatio: 0,\n canUseCssGrid: false,\n requestId: \"0\",\n cookie: \"\",\n userAgent: \"\",\n referer: \"\",\n oneServiceHeaders: \"\"\n });\n }\n /**\n * Reset singleton class instance with passed in info and client settings\n * @returns RequestData\n */\n static resetInstance(data, isPssr = false) {\n const newInstance = new RequestData(data, isPssr);\n IsomorphicStorage.set(isomorphicStorageKey, newInstance);\n return newInstance;\n }\n}\n/**\n * Helper to get cookie content from cookie string\n *\n * @param name cookie name\n * @param cookieString cookie string with which to search for the content by `name`\n * @returns\n */\nfunction getCookie(name, cookieString) {\n if (cookieString && name) {\n const re = new RegExp(\"\\\\b\" + name + \"\\\\s*=\\\\s*([^;]*)\", \"i\");\n const match = re.exec(cookieString);\n return (match && match.length > 1 ? match[1] : null);\n }\n return null;\n}\n/**\n * Helper to safely parse JSON\n * @param json The JSON string to parse\n * @returns The parsed JSON object, or undefined if invalid.\n */\nfunction tryParseJson(json) {\n try {\n if (json) {\n return JSON.parse(json);\n }\n }\n catch (ex) {\n // tslint:disable-next-line:no-empty\n }\n}\n/**\n * Export function to reset the request data singleton.\n * This must be used to set the request data.\n */\nexport const resetRequestData = RequestData.resetInstance;\n/**\n * Export get instance function for testing\n */\nexport const getRequestData = () => (RequestData.getInstance());\n//# sourceMappingURL=requestData.js.map","// © Microsoft Corporation. All rights reserved.\nimport { breakpoints } from \"./SSRInteropContractHelpers\";\n/**\n * The param-name prefix used when serializing params onto the query string.\n */\nexport const SSRRequestDataPrefix = \"rd\";\n/**\n * `OSATE` (OneService access token exists) is a client readable companions cookie dropped together with the\n * `OSAT`(OneService Access Token) cookie to indicate the existence of the `OSAT` cookie.\n * `OSATE` cookie is usually set to expire 6 months from creation, while `OSAT` expires at token expiry (~1-24h)\n *\n * Thus if `OSATE` cookie exists without the accompanying `OSAT` cookie to conclude that\n * a session exists, but the token has expired, which must be re-acquired/re-validated via client-side JS.\n *\n * The `OSATE` can also be deleted manually during various interactive login/logout scenarios to semantically\n * indicate that the `OSAT` token must be re-established/re-validated on client-side JS.\n *\n * 1) Thus if only one of `OSAT` or `OSATE` exists, that indicates PSSR code cannot render the page and thus must\n * fallback to client-side rendering.\n * 2) If both are missing that means the user has logged out, or never established\n * an auth session, which should enable PSSR.\n * 3) If both exists that means the token inside `OSAT` is valid and can be used in PSSR.\n */\nexport const osatCookieExistsCookieName = \"OSATE\";\n/**\n * OneService Access Token cookie used to autheticate 1S calls under PSSR mode.\n * Expires at the time of token expiry (~1-24hr based on MSO tenant auth configuration)\n * Please see detailed notes under `osatCookieExistsCookieName`\n */\nexport const osatCookieName = \"OSAT\";\n/**\n * Defines the \"interop\" contract between client and server-side renderer.\n * All of these values will be serialized into request parameters to be passed\n * on the HTTP request to the SSR server.\n */\nexport const SSRContract = {\n ver: \"0.1.0\",\n spec: {\n // IWindow\n innerWidth: {\n clientValue: () => window.innerWidth\n },\n innerHeight: {\n clientValue: () => window.innerHeight\n },\n outerWidth: {\n clientValue: () => window.outerWidth\n },\n breakpoint: {\n clientValue: () => identifyBreakpoint(window.innerWidth, breakpoints)\n },\n locationHash: {\n clientValue: () => window.location.hash\n },\n locationHref: {\n clientValue: () => window.location.href\n },\n locationHost: {\n clientValue: () => window.location.host\n },\n locationHostName: {\n clientValue: () => window.location.hostname\n },\n locationOrigin: {\n clientValue: () => window.location.origin\n },\n locationPathName: {\n clientValue: () => window.location.pathname\n },\n locationProtocol: {\n clientValue: () => window.location.protocol\n },\n locationSearch: {\n clientValue: () => window.location.search\n },\n screenTop: {\n clientValue: () => window.screenTop\n },\n screenY: {\n clientValue: () => window.screenY\n },\n // IBrowser\n canUseCssGrid: {\n clientValue: () => ((window.CSS && window.CSS.supports && CSS.supports(\"display\", \"grid\")) || false)\n },\n // IDevice\n devicePixelRatio: {\n clientValue: () => window.devicePixelRatio\n },\n // ILocale\n language: {\n clientValue: () => document.documentElement.lang\n },\n direction: {\n clientValue: () => document.documentElement.dir\n }\n }\n};\n/**\n * Identifies current breakpoint based on window width. Same implementation as \"\"@microsoft/fast-layouts-react\"\"\n * The package has been deprecated and prevented dependency projects to use react version later than 16. So removing these dependencies.\n */\nfunction identifyBreakpoint(windowWidth, breakpoints) {\n for (let breakpoint = breakpoints.length - 1; breakpoint >= 0; breakpoint--) {\n if (windowWidth >= breakpoints[breakpoint]) {\n return breakpoint;\n }\n }\n}\n//# sourceMappingURL=SSRInteropContract.js.map","// © Microsoft Corporation. All rights reserved.\nimport { canUseDOM } from \"./DOMHelpersCore\";\nimport { getRequestData } from \"./requestData\";\n/**\n * Get window.navigator.userAgent in an isomorphic manner.\n */\nexport function getUserAgent() {\n return canUseDOM() ? window.navigator.userAgent : getRequestData().userAgent;\n}\n/**\n * Get window.location.href in an isomorphic manner.\n */\nexport function getLocationHref() {\n return canUseDOM() ? window.location.href : getRequestData().url.href;\n}\n/**\n * Get window.location.hostname in an isomorphic manner.\n */\nexport function getLocationHostname() {\n return canUseDOM() ? window.location.hostname : getRequestData().url.hostname;\n}\n/**\n * Get window.location.host in an isomorphic manner.\n */\nexport function getLocationHost() {\n return canUseDOM() ? window.location.host : getRequestData().url.host;\n}\n/**\n * Get window.location.origin in an isomorphic manner.\n */\nexport function getLocationOrigin() {\n return canUseDOM() ? window.location.origin : getRequestData().url.origin;\n}\n/**\n * Get window.location.search in an isomorphic manner.\n */\nexport function getLocationSearch() {\n return canUseDOM() ? window.location.search : getRequestData().url.search;\n}\n/**\n * Get window.location.pathname in an isomorphic manner.\n */\nexport function getLocationPathname() {\n return canUseDOM() ? window.location.pathname : getRequestData().url.pathname;\n}\n/**\n * Get window.location.protocol in an isomorphic manner.\n */\nexport function getLocationProtocol() {\n return canUseDOM() ? window.location.protocol : getRequestData().url.protocol;\n}\n/**\n * Get window.location.hash in an isomorphic manner.\n */\nexport function getLocationHash() {\n return canUseDOM() ? window.location.hash : getRequestData().url.hash;\n}\n/**\n * Get the current URL in an isomorphic manner.\n */\nexport function getCurrentUrl() {\n return getLocationOrigin() + getLocationPathname();\n}\n/**\n * Get document.cookie in an isomorphic manner.\n */\nexport function getCookieString() {\n return canUseDOM() ? window.document.cookie : getRequestData().cookie;\n}\n/**\n * Get window.document.getElementById(elementId).\n */\nexport function getDocumentElementById(elementId) {\n if (!canUseDOM()) {\n throw new Error(\"getDocumentElementById is unsupported server side. This call should be wrapped in canUseDOM().\");\n }\n return window.document.getElementById(elementId);\n}\n/**\n * Get window.document.getDocumentElementsByTagName(tagName).\n */\nexport function getDocumentElementsByTagName(tagName) {\n if (!canUseDOM()) {\n throw new Error(\"getDocumentElementsByTagName is unsupported server side. This call should be wrapped in canUseDOM().\");\n }\n return window.document.getElementsByTagName(tagName);\n}\n/**\n * Get window.document.getDocumentElementsByClassName(className).\n */\nexport function getDocumentElementsByClassName(className) {\n if (!canUseDOM()) {\n throw new Error(\"getDocumentElementsByClassName is unsupported server side. This call should be wrapped in canUseDOM().\");\n }\n return window.document.getElementsByClassName(className);\n}\n/**\n * Get indexedDB in an isomorphic manner.\n * Todo (http://osgvsowi/23753462), provide actual functionality for indexedDB on the server side.\n */\nexport function getIndexedDB() {\n return canUseDOM() ? window.indexedDB : null;\n}\n/**\n * Get window.innerHeight in an isomorphic manner.\n * Todo (http://osgvsowi/23876778), remove the need for server to know about innerWidth by limiting layout options or use CSS based solution.\n */\nexport function getInnerHeight() {\n return canUseDOM() ? window.innerHeight : getRequestData().innerHeight;\n}\n/**\n * Get window.devicePixelRatio in an isomorphic manner.\n */\nexport function getDevicePixelRatio() {\n return canUseDOM() ? window.devicePixelRatio : getRequestData().devicePixelRatio;\n}\n/**\n * Get CSS Grid support in an isomorphic manner\n */\nexport function getCssGridSupport() {\n return !!(canUseDOM() ? (window.CSS && window.CSS.supports && CSS.supports(\"display\", \"grid\")) : getRequestData().canUseCssGrid);\n}\n/**\n * Get variable font support in an isomorphic manner\n * TODO: SSR currently does not support custom fonts.\n */\nexport function getVariableFontSupport() {\n if (!canUseDOM()) {\n throw new Error(\"SSR currently does not support custom fonts.\");\n }\n return !!(window.CSS && window.CSS.supports && CSS.supports(\"(font-variation-settings: normal)\"));\n}\n/**\n * Returns a script element using several default values.\n * Not supported server side.\n * @param src The absolute URL for the script src. Default is undefined, blank is okay.\n * @param id The id to assign the script element. default is \"\" so no id.\n * @param loadAsync Should the script load asynchronously. Default is true.\n * @param crossOrigin Set the script crossorigin attribute. Default is anonymous.\n * @param className The optional className to assign the script element.\n * @returns {HTMLScriptElement} the script element. not using const so it can be overridden by caller.\n */\nexport function createScriptTag(src = undefined, id = undefined, loadAsync = true, crossOrigin = \"anonymous\", className, onload) {\n if (!canUseDOM()) {\n throw new Error(\"createScriptTag is unsupported server side. This call should be wrapped in canUseDOM().\");\n }\n const scriptElement = document.createElement(\"script\");\n if (id) {\n scriptElement.id = id;\n }\n if (className) {\n scriptElement.setAttribute(\"class\", className);\n }\n if (onload) {\n scriptElement.onload = onload;\n }\n scriptElement.type = \"text/javascript\";\n if (src) {\n if (window && window.trustedTypesURLValidation) {\n scriptElement.src = window.trustedTypesURLValidation(src, \"scriptSrcUrlPolicy\");\n }\n else {\n scriptElement.src = src;\n }\n scriptElement.async = loadAsync;\n scriptElement.crossOrigin = crossOrigin;\n }\n // @ts-ignore\n if (window && window.NONCE_ID) {\n // @ts-ignore\n scriptElement.nonce = window.NONCE_ID;\n }\n return scriptElement;\n}\n//# sourceMappingURL=DOMHelpers.js.map","// © Microsoft Corporation. All rights reserved.\n/**\n * Enum for different auth cookie names\n * @enum\n */\nexport var AuthCookieName;\n(function (AuthCookieName) {\n AuthCookieName[\"Anon\"] = \"ANON\";\n AuthCookieName[\"AppAnon\"] = \"APP_ANON\";\n AuthCookieName[\"Unknown\"] = \"\";\n})(AuthCookieName || (AuthCookieName = {}));\n/**\n * List of http-readable cookies that indicate the presence of an auth cookie\n * IMPORTANT NOTE: If this is updated, please update the list in WebWorkerInitializer.ts as well\n */\nexport var AuthCookieExistsCookieName;\n(function (AuthCookieExistsCookieName) {\n AuthCookieExistsCookieName[\"AnonCookieExists\"] = \"ace\";\n AuthCookieExistsCookieName[\"AppAnonCookieExists\"] = \"aace\";\n})(AuthCookieExistsCookieName || (AuthCookieExistsCookieName = {}));\n/**\n * Original source is Constants.ts\n * Child cookie name, used to signal if rpsUser is child account.\n */\nexport const childCookieName = \"child\";\n//# sourceMappingURL=AuthCookieNames.js.map","// © Microsoft Corporation. All rights reserved.\n/**\n * Returns the cookie content given a name\n * @param cookieString {string} - cookie string (usually comes via `document.cookie` for client-side JS)\n * @param name {string} - cookie name\n * @returns the value of the cookie or `null`, if the key is not found.\n */\nexport function getCookieCore(cookieString, name) {\n if (cookieString) {\n const re = new RegExp(\"\\\\b\" + name + \"\\\\s*=\\\\s*([^;]*)\", \"i\");\n const match = re.exec(cookieString);\n return (match && match.length > 1 ? match[1] : null);\n }\n return null;\n}\n//# sourceMappingURL=GetCookieCore.js.map","// © Microsoft Corporation. All rights reserved.\n/**\n * Helper to parse a JSON string to the corresponding object/value, optionally casting\n * it to the preferred type.\n * @param jsonString - The json string to parse\n * @returns The parse object value or null if the string is not valid or failed to parse.\n */\nexport function tryParseJson(jsonString) {\n try {\n if (jsonString) {\n return JSON.parse(jsonString);\n }\n // eslint-disable-next-line no-empty\n }\n catch (ex) { }\n return null;\n}\n//# sourceMappingURL=TryParseJson.js.map","// © Microsoft Corporation. All rights reserved.\n/**\n * Config Service v3 endpoint\n */\nexport const CrsV3Endpoint = \"v3\";\n/**\n * Config Service v3.1 endpoint\n * Will be used for experimentation only.\n */\nexport const CrsV31Endpoint = \"v3.1\";\n/**\n * Config Service Path\n */\nexport const CrsPath = \"/resolver/api/resolve/\";\n/**\n * Prong2 flight prefix\n */\nexport const Prong2FlightPrefix = \"prg-pr2-\";\n/**\n * Peregrine widget specific flights prefix\n */\nexport const widgetFlightsPrefix = \"prg-pw-\";\n/**\n * Peregrine flights with prefix\n */\nexport const PeregrineFlightPrefix = \"prg-\";\n/**\n * Git configs indexedDB caching flight\n */\nexport const GitConfigsIndexedDbTreatment = \"prg-gitconfigs-t\";\n/**\n * Remove page experiments from target scope flight\n */\nexport const RemoveCrsFDHeadTreatment = \"prg-crsfdheadrem\";\n/**\n * Treatment flight for using Akamai-CRS for Prong 1.\n */\nexport const Prong1AkamaiCRSCallTreatmentId = \"prg-1sw-akp1crs\";\n/**\n * Prong 1 flights with prefix\n */\nexport const Prong1FlightsPrefix = \"prg-1sw-\";\n/**\n * Treatment flight for using Akamai endpoint to retrieve CRS configs.\n */\nexport const AkamaiCRSCallTreatmentId = \"prg-callcrsfrakm\";\n/** Treatment flight for disabling welcome greeting & weather one liner in Anaheim */\nexport const AnaheimDisableWeatherInHeadFlight = \"prg-ntp-noweahd\";\n/**\n * Treatment flight for using Akamai-CRS for cn domains in ntp.\n */\nexport const NtpChinaChinaCRSCallTreatmentId = \"prg-akntpcrscncl\";\n/**\n * Akamai base url to call crs used for when treatment flight is detected.\n * Will be used in the ntp flight.\n */\n// eslint-disable-next-line msnews-experiences-rules/no-hardcode-asset-path\nexport const AkamaiBaseUrl = \"https://assets.msn.com\";\n/**\n * Akamai base url to call crs used for when treatment flight is detected.\n * Will be used in the China flight.\n */\nexport const ChinaAkamaiBaseUrl = \"https://assets.msn.cn\";\n/**\n * Treatment flight for using long PCS cache duration for Prong 2.\n */\nexport const Prong2PcsDurationTreatmentId = \"prg-pr2-pcsdur\";\n/**\n * Treatment flight for using manual PCS cache treatment for Prong 2.\n */\nexport const Prong2ManualPcsCacheTreatmentId = \"prg-pr2-manupcs\";\n/**\n * Treatment flight for using Akamai host for Prong2 PCS API\n */\nexport const Prong2PcsApiUseAkamaiEndpoint = \"prg-pr2-akmpcs\";\n/**\n * Treatment flight id for removing the x-ms-flightId header from ads call.\n */\nexport const RemoveFlightIdHeaderTreatment = \"remflighthead\";\n/**\n * Treatment flight id for passing page type to ads calls (native, display, video)\n */\nexport const PassAllAdTypesPageTypeTreatment = \"prg-ad-pgtype\";\n/**\n * Treatment flight id for passing MSFT member id 280 to Xandr ads calls (display, video)\n */\nexport const PassXandrMSFTMemberIdTreatment = \"prg-ad-mbid\";\n/**\n * Treatment flight id for switching UT endpoint to msn domain for AST SDK in display ad\n */\nexport const DisplayAdUseMSNDomainEndpointTreatment = \"prg-ad-astmsn\";\n/**\n * Holdout treatment flight id for switching AST to microsoft domain for display ad\n */\nexport const DisplayAdUseMicrosoftDomainASTSdkHoldoutTreatment = \"prg-ad-astmsft-rf\";\n/**\n * Treatment flight id for sending assigned flights (id and numberline) in display ad request\n */\nexport const DisplayAdPassFlightsTreatment = \"prg-ad-dispflts-t\";\n/**\n * Treatment flight id for sending AST more debug informaton on performance\n */\nexport const EnableDisplayCustomEventTreatment = \"prg-ad-astce\";\n//# sourceMappingURL=Flights.js.map","// © Microsoft Corporation. All rights reserved.\nimport { canUseDOM, getLocationHostname, getLocationSearch } from \"@msnews/isomorphic-util\";\nimport { getAudienceModeFromCookies } from \"@msnews/cookie-utils\";\nimport { getFlightsFilterPrefix, getPeregrineFlights } from \"@msnews/experimentation-helpers\";\nimport { isChinaCompliance } from \"@msnews/fundamentals\";\nimport { tryParseJson } from \"@msnews/core-helper\";\n/**\n * Initialize the inline-head-common module logic.\n * This currently includes the following:\n * - Fetching the CRS call early\n * @param options - Options for the inlineHead initialization call\n */\nexport function init(initOptions = {}) {\n const result = {};\n try {\n if (!canUseDOM()) {\n return result;\n }\n const clientSettings = parseClientSettings();\n let crsAppType = clientSettings.apptype?.toLocaleLowerCase();\n const crsOptions = initOptions.crsOptions || {};\n // Only turn on early CRS call for Prong 2 and MSN HP. Due to shared init logic for app types\n // Until universal shipping - All other app types will have to opt-in to early CRS call via flights or update similarly\n if (crsAppType === \"winwidgets\" || crsAppType === \"homepage\" || crsAppType === \"travel\") {\n crsOptions.crsPrefetch = true;\n }\n // Turn on early CRS call if it's set by the host page for widgets.\n if (clientSettings.widgetAttributes?.clientPerf?.earlyCRSCall) {\n crsOptions.crsPrefetch = true;\n }\n // flight name for edgeChromium exceeds the 20 characters limit\n if (crsAppType === \"edgechromium\") {\n crsAppType = \"edgechr\";\n }\n // shouldUsePWOnlyFlights is typically set by the host page in the widgets page.\n // Widget initializer adds WidgetAttributes exist in the host into client settings for appEnvironment to consume.\n const shouldUsePWOnlyFlights = !!clientSettings.widgetAttributes?.clientPerf?.shouldUsePWOnlyFlights;\n const { all, prg } = parseFlights(shouldUsePWOnlyFlights, crsAppType);\n // Early CRS call is currently enabled based on the flight\n // and the feature switch enablement by each canvas\n const earlyCRSCall = crsOptions.crsPrefetch || (all.includes(\"inlinecrscall\") || all.includes(`icrscall-${crsAppType}`));\n if (earlyCRSCall) {\n fetchCRS(clientSettings, prg, crsOptions);\n result.inlineCRS = true;\n }\n }\n catch (ex) {\n // eslint-disable-next-line no-console\n console.error(\"InlineHeadCommon: \" + ex);\n }\n return result;\n}\n/**\n * Prepares the request object for the CRS call and fetch the response.\n * The method will attempt to fetch from assets.msn.com first, and then fallback\n * to www.msn.com if the first attempt fails. The resulting promise will be cached\n * in the global scope for the ConfigService to consume later when requested by the page.\n * @param clientSettings - Parsed version of the client settings value from the document\n * @param prgExperiments - The list of `prg-` prefixed experiments to be passed to the CRS call\n * @param crsOptions - Options to modify the fetch sequence\n */\nfunction fetchCRS(clientSettings, prgExperiments, crsOptions) {\n const audienceMode = getAudienceModeFromCookies(document.cookie, clientSettings);\n const { apptype, browser, domain: pcsDomain, bundleInfo: { v: bundleVersion } = {}, deviceFormFactor, locale: { content, display } = {}, ocid, os, pagetype: pageType, servicesEndpoints: { crs } = {} } = clientSettings;\n // for widget scenarios we don't want to use the PCS provided domain\n // as the host page domain can be completely different than the PCS call,\n // so we use the current host in that case\n const domain = (tryGetWidgetElement() ? getLocationHostname() : pcsDomain) || \"\";\n if (!apptype || !bundleVersion || !crs) {\n return;\n }\n const currentRequestTargetScope = {\n audienceMode,\n browser,\n deviceFormFactor,\n domain,\n locale: { content, display },\n ocid,\n os,\n platform: \"web\",\n pageType,\n pageExperiments: prgExperiments\n };\n const params = new URLSearchParams([\n [\"expType\", \"AppConfig\"],\n [\"expInstance\", \"default\"],\n [\"apptype\", apptype],\n [\"v\", bundleVersion]\n // Note we don't add the target scope object here as the URLSearchParams adds a lot of\n // escape characters that bloats the payload. Instead we add it as raw JSON string below\n ]);\n // If url has dev only query string params, send this dev/test traffic to int1 environment instead of prod.\n const locationSearch = getLocationSearch();\n const devQueryParam = locationSearch.includes(\"?item=\") || locationSearch.includes(\"&item=\")\n ? \"&citem=dev:true&instance=Int1\"\n : \"\";\n const crsPathAndQuery = `${crs.path}${crs.v}/config/?${params}&targetScope=${JSON.stringify(currentRequestTargetScope)}${devQueryParam}`;\n const fetchHelper = (domain) => {\n const url = new URL(`https://${domain}${crsPathAndQuery}`);\n const { timeout = 5000 } = crsOptions;\n // this is checked in the early CRS promise in ConfigService.ts\n window.crsRequestData = { url: url.toString() };\n let abortSignal;\n if (timeout >= 0) {\n const ctrl = new AbortController();\n setTimeout(() => ctrl.abort(), timeout);\n abortSignal = ctrl.signal;\n }\n return fetch(url, {\n signal: abortSignal\n });\n };\n const compliantSuperMsnDomain = `msn.${isChinaCompliance(location, clientSettings) ? \"cn\" : \"com\"}`;\n // this value is often empty, but if it's not, we should use it as the domain\n const { domain: serverSpecifiedCrsOrigin } = crs;\n const serverSpecifiedCrsDomain = serverSpecifiedCrsOrigin && new URL(serverSpecifiedCrsOrigin).host;\n // enable existing path in ConfigService.ts to fetch result from global promise variable\n let crsPromise = fetchHelper(serverSpecifiedCrsDomain || `assets.${compliantSuperMsnDomain}`);\n if (!crsOptions.disableFallback) {\n crsPromise = crsPromise.catch(() => {\n // only *.msn.com should fallback to the host page domain, otherwise for things like bing.com, it should\n // fallback to www.msn.com\n const { hostname } = location;\n const fallbackDomain = hostname.match(/\\.msn\\.(com|cn)$/)\n ? hostname\n : `www.${compliantSuperMsnDomain}`;\n return fetchHelper(fallbackDomain);\n });\n }\n window.crsPromise = crsPromise;\n}\n/**\n * Parses the flights list from the document -- supports both normal and widget modes.\n * @param shouldUsePWOnlyFlights - Flag to keep only prg-pw- flights\n * @param appType - App type\n * @returns\n */\nexport function parseFlights(shouldUsePWOnlyFlights = false, appType = \"\") {\n const allFlights = tryGetFlights(getPageDatasetValue(\"info\")) || [];\n // When data-canvas-info is present, we use instead of getting prg- flights from all flights.\n let prgFlights = tryGetFlights(getPageDatasetValue(\"canvasInfo\"));\n if (!prgFlights) {\n const prgFilterPrefix = getFlightsFilterPrefix(allFlights, shouldUsePWOnlyFlights, appType);\n prgFlights = getPeregrineFlights(allFlights, prgFilterPrefix);\n }\n return {\n all: allFlights,\n prg: prgFlights\n };\n}\n/**\n * Parses the client settings value from the document -- supports both normal and widget modes.\n * @returns The core client settings object\n */\nfunction parseClientSettings() {\n return tryParseJson(getPageDatasetValue(\"clientSettings\")) || {};\n}\n/**\n * Helper to get one of the well-known dataset values from the document.\n * @param key - The key to get from the dataset\n * @returns The value of the dataset key, or undefined if not found\n */\nfunction getPageDatasetValue(key) {\n // Note that we look at the head dataset first because that's the majority of the cases.\n // We only query for the widget scenario if the head dataset doesn't have the value.\n return document.head.dataset[key]\n || tryGetWidgetElement()?.dataset[key];\n}\n/**\n * Cached widget element value from a previous query -- since we query for both\n * `clientSettings` and `info` values, caching this will save on another DOM query\n */\nlet widgetElement;\n/**\n * Queries the document for the widget element and caches the result.\n * @returns The widget element, or null if not found\n */\nfunction tryGetWidgetElement() {\n if (widgetElement === undefined) {\n widgetElement = document.getElementsByClassName(\"peregrine-widget-settings\")[0] || null;\n }\n return widgetElement;\n}\n/** Helper to reset internal state for UTs */\nexport function _resetInlineHeadCommon() {\n widgetElement = undefined;\n}\n/**\n * Parse head dataset and get the flights in lower case and sorted order.\n * @param key info or canvasInfo\n * @returns Array of flights present in the dataset\n */\nfunction tryGetFlights(flightString) {\n if (!flightString || !flightString.startsWith(\"f:\")) {\n // Return undefined if the dataset is not present or empty.\n // Example: data-canvas-info or data-canvas-info: \"\" or data-canvas-info: \"string without f:\"\n return;\n }\n const reduced = ((flightString.match(/f:\\s*([^;]+)/i)) || [])[1];\n if (!reduced) {\n // Return empty array if the flight string is empty.\n // Example: data-canvas-info: \"f:;\"\n // This is a valid case where the flight string is empty.\n return [];\n }\n // Example: data-canvas-info: \"f:flight1,flight2,flight3;\"\n // Returns [\"flight1\", \"flight2\", \"flight3\"]\n return reduced.toLowerCase().split(\",\")?.sort();\n}\n//# sourceMappingURL=InlineHeadCommon.js.map","// © Microsoft Corporation. All rights reserved.\nimport { PeregrineFlightPrefix, Prong1FlightsPrefix, Prong2FlightPrefix, widgetFlightsPrefix } from \"@msnews/experiences-constants\";\n/**\n * Goes through the array of flights that is given and will filter out any flight that doesn't start with prg-pw.\n * @param flights Array\n * @returns specific flights\n */\nexport function getPeregrineWidgetFlights(flights) {\n return getPeregrineFlights(flights, widgetFlightsPrefix);\n}\n/**\n * Goes through the array of flights that is given and will filter out any flight that doesn't start with\n * prg-. It then sorts them and returns a new string[].\n * @param flights Array of flights that we will filter through and return only the peregrine\n * @param flightPrefix Prefix of the flight ids used for the filter\n * @returns specific flights\n */\nexport function getPeregrineFlights(flights, flightPrefix = PeregrineFlightPrefix) {\n const prefixLen = flightPrefix.length;\n const prgPrefixFlights = [];\n if (flights && flights.length) {\n flights.forEach(item => {\n const cleanItem = item && item.trim();\n if (cleanItem\n && cleanItem.length >= prefixLen\n // much faster to do a substring for the first few characters\n // than to do a lowercase on the whole flight string (also faster than case-insensitive regex)\n && cleanItem.substring(0, prefixLen).toLowerCase() === flightPrefix) {\n prgPrefixFlights.push(cleanItem.toLowerCase());\n }\n });\n prgPrefixFlights.sort();\n }\n return prgPrefixFlights;\n}\n/**\n * Goes through the array of flights that is given and will retrun the correct prefix to filter out any\n * unwanted flights. By default this will return the prefix to only keep flights with prefix 'prg-'\n * @param flights Array of flights that we will filter through\n * @param shouldUseWPOnlyFlights Flag to keep only prg-pw- flights\n * @param appType App type\n * @returns prefix for flights to keep\n */\nexport function getFlightsFilterPrefix(flights, shouldUseWPOnlyFlights = false, appType = \"\") {\n let filterPrefix = PeregrineFlightPrefix;\n if (shouldUseWPOnlyFlights) {\n filterPrefix = widgetFlightsPrefix;\n }\n else if (appType.toLocaleLowerCase() === \"windowsShell\" /* AppType.WindowsShell */.toLocaleLowerCase() ||\n appType.toLocaleLowerCase() === \"windowsShellV2\" /* AppType.WindowsShellV2 */.toLocaleLowerCase()) {\n filterPrefix = Prong1FlightsPrefix;\n }\n else if (appType.toLocaleLowerCase() === \"winWidgets\" /* AppType.WindowsNewsWidgets */.toLocaleLowerCase()\n && !isVpTest()) {\n filterPrefix = Prong2FlightPrefix;\n }\n return filterPrefix;\n}\n/**\n * Checks if the current page is a VP test page\n * We will not import extra libraries due to circle dependencies\n * @returns boolean\n */\nfunction isVpTest() {\n return window?.location?.search?.includes(\"reqsrc=vp\") || !!window?.location?.search?.includes(\"vptest\");\n}\n//# sourceMappingURL=GetPeregrineFlights.js.map","// © Microsoft Corporation. All rights reserved.\nimport { childCookieName } from \"@msnews/experiences-constants\";\nimport { getCookieCore, tryParseJson } from \"@msnews/core-helper\";\n/**\n * Common helper function to get the audience mode from the cookie string.\n * @param cookieString - The cookie string to parse for the aace/child mode value.\n * @param clientSettings - The client settings from PCS\n * @returns The audience mode calculated from the cookies.\n */\nexport function getAudienceModeFromCookies(cookieString, clientSettings) {\n // Set Kids audience mode based on conditions below, otherwise use PCS provided Audience mode.\n let audienceMode;\n // There are two auth endpoints in production, at the time of this comment. One is a Prime based auth-endpoint (that is still being used by few Peregrine canvases)\n // and the second is a dedicated Peregrine endpoint hosted by OneService. In both endpoints, AACE cookie is dropped independent of the child cookie.\n // In Prime based auth endpoint, if the account is identified as Child account, a Child cookie is being dropped. In practice, we see that the value of that cookie is 0,\n // but the cookie is only dropped for Child accounts, so it's enough to check for just the presence of that cookie.\n // In OneService based auth endpoint (that is used by most of the Peregrine canvases), if an account is identified as Child account, auth service drops an AACE cookie\n // with a value of {\"child\": 1} for child accounts and {\"child\": 0} otherwise.\n // Until we move over to the newer (1S based) auth endpoint, we still have to honor both ways of identifying a child account.\n const aaceCookie = decodeURIComponent(getCookieCore(cookieString, \"aace\" /* AuthCookieExistsCookieName.AppAnonCookieExists */));\n const { child } = (aaceCookie && tryParseJson(aaceCookie)) || {};\n const childCookie = getCookieCore(cookieString, childCookieName);\n if (aaceCookie && (child === 1 || childCookie)) {\n audienceMode = \"kids\" /* AudienceModeType.Kids */;\n }\n else {\n audienceMode = clientSettings.audienceMode || \"adult\" /* AudienceModeType.Adult */;\n }\n return audienceMode;\n}\n//# sourceMappingURL=AudienceModeCookie.js.map","// © Microsoft Corporation. All rights reserved.\n/**\n * Gets if the current page should be considered as a China compliance context.\n * @param pageUrl - The current page URL info with the following info:\n * - hostname: The hostname of the current page URL.\n * - search: The search part of the current page URL.\n * @param clientSettings - The client settings of the page.\n * @returns `true` if the current page should be considered as a China compliance context; otherwise, `false`.\n */\nexport function isChinaCompliance(pageUrl, clientSettings) {\n const isChina = pageUrl.hostname.toLowerCase().endsWith(\".cn\")\n // PCS sends isChinaCompliance to be true when it meets appropriate conditions.\n // This flag is not present or will be undefined when PCS conditions aren't met.\n || clientSettings.isChinaCompliance\n // Widget Initializer set this flag when host page ask to use China domain\n || clientSettings.useCnDomain\n // Sapphire mini app sets this flag to true or false based on app configuration\n || pageUrl.search.match(/isChinaBuild=true/i)\n // For testing/debugging on localhost, item=revip:cn\n || pageUrl.search.match(/item=revip:cn/);\n return !!isChina;\n}\n//# sourceMappingURL=ChinaCompliance.js.map","// © Microsoft Corporation. All rights reserved.\nexport var CustomEventPayloadStage;\n(function (CustomEventPayloadStage) {\n CustomEventPayloadStage[\"INITIALIZE\"] = \"initialize\";\n CustomEventPayloadStage[\"CHANGE\"] = \"change\";\n CustomEventPayloadStage[\"ALL\"] = \"all\";\n})(CustomEventPayloadStage || (CustomEventPayloadStage = {}));\nexport const CustomWidgetErrorEvent = \"CustomWidgetErrorEvent\";\n/**\n * Dispatch custom event when some errors arised.\n * @param name - Event name\n * @param payload - Payload for event message\n */\nexport function dispatchCustomEvent(name, payload) {\n window.dispatchEvent(new CustomEvent(name, {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n type: \"AppError\",\n payload\n }\n }));\n}\n/**\n * Get data for custom widget event\n * @param event - CustomWidgetErrorEvent\n */\nexport function getDispatchedCustomEventPayload(event) {\n if (event.type !== CustomWidgetErrorEvent) {\n return null;\n }\n const payload = event.detail?.payload || {};\n return {\n stage: payload.stage,\n message: payload.message,\n extra: payload.extra\n };\n}\n//# sourceMappingURL=ErrorDispatcher.js.map","// © Microsoft Corporation. All rights reserved.\n/**\n * Widget group div class name in the DOM\n */\nexport const widgetGroupClassName = \"peregrine-widgetgroup\";\n/**\n * Widgets div class name in the DOM\n */\nexport const widgetClassName = \"peregrine-widgets\";\n/**\n * Widget settings div\n */\nexport const widgetSettingsClassName = \"peregrine-widget-settings\";\n/**\n * Widgets script core bundle class name in the DOM\n */\nexport const coreBundleClassName = \"peregrine-core-bundle\";\n/**\n * Widget info attribute (used in both 'peregrine-widgetgroup' divs and 'peregrine-widgets' divs)\n */\nexport const widgetInfoAttribute = \"data-widget\";\n/**\n * Widget render state attribute\n */\nexport const widgetRenderStateAttribute = \"data-widget-state\";\n/**\n * Attribute name of the pcsData.info in head element\n */\nexport const headTagDataInfoAttribute = \"data-info\";\n/**\n * Attribute name of the pcsData.clientSettings in head element\n */\nexport const headTagtClientSettingAttribute = \"data-client-settings\";\n/**\n * Attribute name of the pcsData.canvasInfo in head element\n */\nexport const headTagtCanvasInfo = \"data-canvas-info\";\n/**\n * App type name of sharedWidgets app\n */\nexport const sharedWidgetsAppTypeName = \"sharedWidgets\";\n/**\n * App type name of MSN studio app\n */\nexport const msnStudioAppTypeName = \"msnStudio\";\n/**\n * App type name of bingHomepage app\n */\nexport const bingHomepageAppTypeName = \"bingHomepage\";\n/**\n * Page type of bingHomepage app (default search page)\n */\nexport const bingHomepagePageType = \"widgetfeed\";\n/**\n * Page type of bingHomepage app (no search results page)\n */\nexport const bingNoResultsPageType = \"bingNoResultsPage\";\n/**\n * Page name of bingHomepage app\n */\nexport const bingHomepagePageName = \"widgetfeed\";\n/**\n * Ocid of bingHomepage app\n */\nexport const bingHomepageOcid = \"BingHp01\";\n/**\n * Ocid of sharedWidgets app\n */\nexport const sharedWidgetsOcid = \"hpwidget\";\n/**\n * Ocid of sharedWidgets app\n */\nexport const msnStudioOcid = \"msnstudio\";\n/**\n * Page Product of bingHomepage app\n */\nexport const bingHomepageProductName = \"bing\";\n/**\n * Widget Custom Event name\n */\nexport const widgetCustomEventName = \"PeregrineWidgetEvent\";\n/**\n * App type name of distribution app\n */\nexport const distributionAppTypeName = \"distribution\";\n/**\n * Page type of distribution app\n */\nexport const distributionPageType = \"widgetfeed\";\n/**\n * Page name of distribution app\n */\nexport const distributionPageName = \"widgetfeed\";\n/**\n * Ocid of distribution app\n */\nexport const distributionOcid = \"distribution\";\n/**\n * Page Product of distribution app\n */\nexport const distributionProductName = \"distribution\";\n/**\n* Static Server Endpoint name\n*/\nexport const staticServerEndpoint = \"staticview.msn.com\";\n/**\n* Static Server Endpoint name for cn domain\n*/\nexport const staticServerEndpointCnDomain = \"staticview.msn.cn\";\n/**\n * PCS Response cache key\n */\nexport const pwPcsResponseCacheKey = \"pw-pcsresponse\";\n/**\n * Duration of time until PCS response is considered valid from cache.\n * 172800000 = 2 days in milliseconds\n * 2 days: because telemetry pipeline would throw away events with activity id older than 2 days\n */\nexport const pwPcsResponseCacheDuration = 172800000;\n/**\n * Duration of time until PCS response is considered valid from cache for Prong 2\n * 30000 = 30 seconds in milliseconds\n * 30 seconds: because Prong 2 has several flights where a live call to PCS is needed for updating the\n * response info and cannot rely on the stale info in the cache from longer periods.\n*/\nexport const pwPcsResponseProng2CacheDuration = 30000;\n/**\n * Duration of time until PCS response is considered valid from cache for always cached app\n * 2592000000 = 30 days in milliseconds\n * for always cached app, the concept is that we always want user to load the \"previous app version\" from cache.\n * Then we use an app cache manager to update the cache in the background.\n * Then the cache mamanger will decide if current app version is to old and current page view need to be reloaded\n * ideally the cache duration can be set to a very long time like 1 year, which is depends on how long the history app\n * bundles are stored in the server. But for now, we set it to 30 days.\n * NOTE: to understand the SRM issue, we use a very short cache duration for now. Then plan to gradually increase it, until we see the SRM issue happens.\n */\nexport const alwaysCachedAppPcsResponseCacheDuration = 86400000; // 24hrs\n/**\n * Loading icon class name\n */\nexport const widgetLoadingIconClassName = \"peregrine-widget-load-icon\";\n/**\n * EdgeChromium expected widget cards local storage key.\n */\nexport const expectedWidgetsCardsLocalStorageKey = \"expected-widget-cards\";\nexport const widgetsCardsArgsKey = \"widgets-cards-args\";\n//# sourceMappingURL=Widgets.js.map","// © Microsoft Corporation. All rights reserved.\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\n/**\n * Check if widgets loading is supported by the host page\n * @returns true if widgets is supported for rendering else false.\n */\nexport function shouldRenderWidgets() {\n // Make sure that this script runs on proper environment\n // Example: IE11 doesn't support fetch: https://www.caniuse.com/?search=fetch\n if (!canUseDOM()\n || typeof location === \"undefined\"\n || typeof fetch === \"undefined\") {\n console.error(\"Missing required global features.\");\n return false;\n }\n // Check if browser has following support in order to classify as a modern browser.\n // This will help render React or Web component based Widget(s) on modern browsers.\n // If host page accidentally calls widget-initializer script on unsupported browser,\n // this will protect host page, by not rendering widgets on unsupported browser.\n if (typeof customElements === \"undefined\"\n || typeof ShadowRoot === \"undefined\"\n || typeof HTMLTemplateElement === \"undefined\") {\n console.error(\"Not sure if this is modern browser to render widgets!\");\n return false;\n }\n return true;\n}\n/**\n * Get random guid as RID/ActivityId since PCS call is not made yet\n * @returns GUID\n */\nexport function getRandomGuid() {\n return \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\".replace(/[xy]/g, function (c) {\n const r = Math.random() * 16 | 0;\n const v = c == \"x\" ? r : (r & 0x3 | 0x8);\n return v.toString(16);\n });\n}\n/**\n * Use pg.p as telemetry => pageProduct if provided by the host page.\n * For windows, use pg.p as entwindowsdash if query=\"enterprise\" is found in pcsAdditionalQsp else use windowsdash.\n * By default use pg.p as appType\n * @param appType appType found in the data-widget json.\n * @param pageProduct pageProduct found in the telemetry object in data-widget json.\n * @param pcsAdditionalQsp pcsAdditionalQsp attribute in the data-widget json. Example: \"locale=en-US®ion=US&query=enterprise\"\n * @returns pg.p (pageProduct) to be used by the widget initializer app errors.\n */\nexport function getTelemetryPageProduct(appType, pageProduct = null, pcsAdditionalQsp = null) {\n // Use pageProduct as pg.p if specified by the host page. Example:\n // data-widget: { telemetry: { pageProduct: \"bing\"}} then we will return \"bing\" as pg.p\n if (pageProduct && pageProduct.length > 0) {\n return pageProduct;\n }\n // Applicable to AppTypes: winwidgets and windowsnewsplus\n // \"query\" in pcsAdditionalQsp is typically used by prong2 to distinguish pg.p\n // Based on this query prong2 differentiate enteprise and retail app errors.\n if (appType === \"windowsNewsPlus\" /* AppType.WindowsNewsPlus */ || appType === \"winWidgets\" /* AppType.WindowsNewsWidgets */) {\n return pcsAdditionalQsp && pcsAdditionalQsp.includes(\"query=enterprise\")\n ? \"entwindowsdash\"\n : \"windowsdash\";\n }\n // Default pg.p as appType\n return appType;\n}\n/**\n * Check if Prong2 MarketSelector enabled\n * @returns true if Prong2 MarketSelector enable else false.\n */\nexport function isMarketSelectorEnabled(appType, flights) {\n return appType === \"winWidgets\" /* AppType.WindowsNewsWidgets */ && flights.includes(\"prg-pr2-marketsel\");\n}\n//# sourceMappingURL=Utilities.js.map","// © Microsoft Corporation. All rights reserved.\nimport { CustomEventPayloadStage, CustomWidgetErrorEvent, dispatchCustomEvent } from \"./ErrorDispatcher\";\nimport { getRandomGuid, getTelemetryPageProduct } from \"./Utilities\";\nlet loggingEndpoint;\nexport let dataWidgetAttributes;\nexport let clientSettings;\nexport let navigatorObj;\n/**\n * Set logging metadata like appType, pageType and market\n * @param dataWidgetAttr\n */\nexport function setLoggingMetadata(dataWidgetAttr, clientSettingsParam) {\n if (dataWidgetAttr) {\n dataWidgetAttributes = dataWidgetAttr;\n }\n if (clientSettingsParam) {\n clientSettings = clientSettingsParam;\n }\n if (!navigatorObj) {\n // window.navigator doesn't exist in IE 11\n // https://caniuse.com/?search=navigator\n const { connection = {}, deviceMemory = \"\", hardwareConcurrency } = window.navigator || {};\n navigatorObj = {\n connectionEffectiveType: connection && connection.effectiveType,\n deviceMemory,\n hardwareConcurrency\n };\n }\n}\n/**\n * Logs error to the given endpoint (e.g. otf). ONLY USE FROM INLINE SCRIPTS.\n * @param message - The error message\n * @param appErrorId - The app error id to be logged\n * @param propertyBag - The blob to store additional error information\n */\nexport async function logError(message, appErrorId, propertyBag) {\n try {\n const settingsObject = {};\n const params = getLoggingParameters(settingsObject);\n let iKey = \"\";\n if (params && params[\"apikey\"]) {\n iKey = getIKeyValue(params[\"apikey\"]);\n }\n const payload = await getLoggingPayload(appErrorId, message, iKey, propertyBag);\n dispatchError(message, params, payload);\n if (params && payload) {\n // Print app error on console\n console.error(payload);\n // fire and forget\n navigator.sendBeacon(\"https://\" + loggingEndpoint + \"/OneCollector/1.0\" + formatParams(params), payload);\n }\n else {\n // eslint-disable-next-line @cs-core/no-console-logs\n console.log(\"missing required params. \" + message);\n }\n }\n catch (error) {\n // eslint-disable-next-line @cs-core/no-console-logs\n console.log(`Error ${error} logging the app error. ${message}`);\n dispatchError(message, {}, \"\");\n }\n}\n/**\n * Verify if the core JS files loaded.\n * NOTE: We cannot verify the experience bundle directly as Experiences does not show up in webpackJsonp.\n * !IMPORTANT!:\n * The same function exists mostly the same in libs\\page-error-handling\\src\\CommonErrorHandlers.ts. Update that function with any changes.\n * @param bundlesToVerify - Use to customize the names of the bundles to verify. Default is [\"vendors\", \"common\", \"microsoft\"]\n * @param errorMessage - Use to customize the logged error message. Default is\"Error when loading bundle(s): \".\n * @param timeout - Use to customize the timeout. Default is 10 seconds.\n * @param callback - on failure call the specified function\n */\nexport function verifyJSLoading(bundlesToVerify = [\"vendors\", \"common\", \"microsoft\"], errorMessage = \"Error when loading bundle(s): \", timeout = 15000, callback) {\n setTimeout(() => {\n const webpackJsonp = window.webpackJsonp;\n if (webpackJsonp) {\n const webpackLength = webpackJsonp.length;\n // The upperbound should always be 1 more than the bundle count.\n const expectedBundlesLength = bundlesToVerify.length + 1;\n if (webpackLength < expectedBundlesLength) {\n if (webpackLength === (expectedBundlesLength - 1)) {\n // experience failed to load so reset array to the generic name and do not cycle thru list.\n bundlesToVerify = [\"experience\"];\n }\n else {\n // An error occured loading our JS files. See which one failed to load.\n const slicedArray = webpackJsonp.slice(0, expectedBundlesLength);\n slicedArray.forEach(bundle => {\n if (bundle.length && bundle[0][0]) {\n bundlesToVerify = bundlesToVerify.splice(bundlesToVerify.indexOf(bundle[0][0]), 1);\n }\n });\n }\n try {\n logError(errorMessage + bundlesToVerify.toString(), 20202, {});\n }\n finally {\n if (callback) {\n callback();\n }\n }\n }\n }\n }, timeout);\n}\n/**\n * Dispatch common error to host page\n * @param message - The error message\n * @param params - The logging parameters\n * @param payload - The logging payload\n */\nfunction dispatchError(message, params, payload) {\n dispatchCustomEvent(CustomWidgetErrorEvent, {\n stage: CustomEventPayloadStage.ALL,\n message,\n extra: {\n payload,\n params\n }\n });\n}\n/**\n * Gets data to set the logging parameters\n * @param settingsObject - The object containing client settings\n */\nfunction getLoggingParameters(settingsObject) {\n if (settingsObject) {\n const { pcsInfo, pageGenTime } = settingsObject;\n const uploadTime = new Date(pageGenTime).getTime();\n const isProd = !pcsInfo || pcsInfo.env === \"prod\";\n // JSLL endpoints\n loggingEndpoint = isProd\n ? `browser.events.data.msn.${dataWidgetAttributes.useCnDomain ? \"cn\" : \"com\"}`\n : `events-sandbox.data.msn.${dataWidgetAttributes.useCnDomain ? \"cn\" : \"com\"}`;\n const apikey = isProd\n ? \"0ded60c75e44443aa3484c42c1c43fe8-9fc57d3f-fdac-4bcf-b927-75eafe60192e-7279\"\n : \"f8857dedc6f54ca8962cfb713e01e7d7-e9250191-fe0b-446f-95ae-07516262f98c-7028\";\n return {\n cors: \"true\",\n \"content-type\": \"application/x-json-stream\",\n \"client-id\": \"NO_AUTH\",\n \"client-version\": \"1DS-Web-JS-2.2.2\",\n apikey: apikey,\n \"upload-time\": uploadTime,\n w: \"0\",\n anoncknm: \"app_anon\"\n };\n }\n return null;\n}\n/**\n * Gets data to set the logging payload\n * @param appErrorId - The app error id to be logged\n * @param message - The error message\n * @param iKey - The key for authenticating on 1DS endpoint\n * @param propertyBag - The blob to store additional error information\n * @param flightIds - The flight ids\n */\nasync function getLoggingPayload(appErrorId, message, iKey, propertyBag) {\n if (!dataWidgetAttributes) {\n return;\n }\n const { appType, pageType, cm, telemetry = {}, pcsAdditionalQsp = \"\" } = dataWidgetAttributes;\n const { pageProduct, pagetype: telemetryPageType } = telemetry;\n const reportingPageType = telemetryPageType || pageType || \"dhp\";\n // Add all data widget attributes (ex: apptype, pagetype, cm, cookie info, etc.) into property bag.\n propertyBag = propertyBag || {};\n propertyBag.dataWidgetAttributes = dataWidgetAttributes;\n // Instrument PCS and client's build number and environment.\n if (clientSettings) {\n const { bundleInfo, pcsInfo } = clientSettings;\n if (pcsInfo) {\n propertyBag.pcsVersion = pcsInfo.v;\n propertyBag.pcsEnv = pcsInfo.env;\n }\n const { alias, v } = bundleInfo || {};\n // Capture build version info\n propertyBag.build = v;\n propertyBag.buildAlias = alias;\n }\n // Add network diagnostics when available\n if (navigatorObj) {\n propertyBag.navigator = navigatorObj;\n }\n // NOTE: since the PCS API call is not made by the host page yet, we do not know rid/aid.\n // Hence we need to generate RID at client\n const rid = getRandomGuid();\n // @ts-ignore\n const tryGetCustomAppErrorEventNameAsync = typeof window === \"object\" && window._tryGetCustomAppErrorEventNameAsync;\n const name = typeof tryGetCustomAppErrorEventNameAsync === \"function\" && await tryGetCustomAppErrorEventNameAsync() || \"MS.News.Web.AppError\";\n // Setting RID=AID might not be correct. The more complex logic in the bundles may determine that we have already burned this as a RID\n // and generate a new one different from AID. But it's better than nothing and we cannot see AID on app error reports right now.\n // Most of the time when we are not using app cache these two will be the same.\n const payload = {\n name: name,\n time: new Date().toISOString(),\n ver: \"4.0\",\n iKey: `o:${iKey}`,\n data: {\n baseData: {},\n baseType: \"MS.News.Web.Base\",\n page: {\n name: \"default\",\n product: getTelemetryPageProduct(appType, pageProduct, pcsAdditionalQsp),\n type: isProng2AppType(appType) ? \"dhp\" : reportingPageType,\n content: {\n category: \"standaloneError\"\n }\n },\n browser: {\n // Assume that cookie consent is not provided so muid is not being sent from cookie\n clientId: \"\"\n },\n flight: {\n id: \"\"\n },\n request: {\n activityId: rid,\n requestId: rid,\n afdMuid: clientSettings && clientSettings.fd_muid ? clientSettings.fd_muid : \"\"\n },\n locale: {\n mkt: cm\n },\n extSchema: {\n id: appErrorId,\n severity: 0,\n pb: propertyBag,\n message: message\n }\n }\n };\n return payload ? JSON.stringify(payload) : null;\n}\n/**\n * Format query string parameters\n * @param params - The logging params\n */\nfunction formatParams(params) {\n return \"?\" + Object\n .keys(params)\n .map(function (key) {\n return key + \"=\" + encodeURIComponent(params[key]);\n }).join(\"&\");\n}\n/**\n * Extracts the value of iKey from apikey\n * @param apikey - The value of apikey for 1DS authentication\n */\nfunction getIKeyValue(apikey) {\n if (apikey) {\n const iKeyIndex = apikey.indexOf(\"-\");\n if (iKeyIndex > 0) {\n return apikey.substring(0, iKeyIndex);\n }\n }\n return \"\";\n}\n/**\n * Helper to tell if app is prong2\n * @param appType The type to evaluate\n * @returns True if appType corresponds to a vesion of prong2, False otherwise\n */\nexport function isProng2AppType(appType) {\n return appType === \"windowsNewsPlus\" /* AppType.WindowsNewsPlus */ || appType === \"winWidgets\" /* AppType.WindowsNewsWidgets */;\n}\n/**\n * NOTE: TOBE USED ONLY FOR UNIT TESTS\n */\nexport function resetIntermediateState() {\n dataWidgetAttributes = undefined;\n clientSettings = undefined;\n navigatorObj = undefined;\n}\n//# sourceMappingURL=ErrorLogging.js.map","// © Microsoft Corporation. All rights reserved.\nimport { widgetGroupClassName, widgetLoadingIconClassName } from \"@msnews/experiences-constants\";\n/**\n * Local variable to store the state of loading icon in widget initializer\n */\nlet loadingIconRemoved = false;\n/**\n * Once this timeout is hit, loading icon will be removed on the host page\n */\nconst LOADING_ICON_REMOVAL_TIMEOUT = 5000;\n/**\n * Add loading icon under peregrine widget group div\n * @param renderWidgetsIcon This boolean value is provided by the host page\n * @param peregrineWidgetGroupDiv\n */\nexport function addLoadingIcon(dataWidgetAttributes) {\n if (!dataWidgetAttributes\n || !dataWidgetAttributes.clientPerf\n || !dataWidgetAttributes.clientPerf.shouldShowLoadingIcon) {\n return;\n }\n const peregrineWidgetGroupDiv = getWidgetGroupDiv();\n if (!peregrineWidgetGroupDiv) {\n return;\n }\n const widgetLoadingIconImg = document.createElement(\"img\");\n widgetLoadingIconImg.setAttribute(\"class\", widgetLoadingIconClassName);\n widgetLoadingIconImg.setAttribute(\"src\", getLoadingImageUrl(dataWidgetAttributes.useCnDomain));\n widgetLoadingIconImg.setAttribute(\"alt\", \"Loading\");\n widgetLoadingIconImg.setAttribute(\"style\", \"display:block;margin:auto;\");\n peregrineWidgetGroupDiv.appendChild(widgetLoadingIconImg);\n // This handler will enable us to remove \"loading\" icon later in the core bundles.\n window._pw_removeLoadingIcon = removeLoadingIcon;\n // After a given timeout, remove the loading icon\n setTimeout(removeLoadingIcon, LOADING_ICON_REMOVAL_TIMEOUT);\n}\n/**\n * Removes loading icon element from the host page under peregrine-widgetgroup div\n */\nfunction removeLoadingIcon() {\n if (loadingIconRemoved) {\n return;\n }\n const peregrineWidgetGroupDiv = getWidgetGroupDiv();\n if (!peregrineWidgetGroupDiv) {\n return;\n }\n const widgetLoadingIconElement = peregrineWidgetGroupDiv.getElementsByClassName(widgetLoadingIconClassName)[0];\n if (widgetLoadingIconElement) {\n peregrineWidgetGroupDiv.removeChild(widgetLoadingIconElement);\n loadingIconRemoved = true;\n }\n}\n/**\n * Get loading image asset url\n * @param useCnDomain\n * @returns Loading asset url\n */\nfunction getLoadingImageUrl(useCnDomain) {\n return `https://assets.msn.${useCnDomain ? \"cn\" : \"com\"}/staticsb/statics/latest/widget/LoadingImg.gif`;\n}\n/**\n * Get div with class name \"peregrine-widgetgroup\"\n * @returns specific div\n */\nfunction getWidgetGroupDiv() {\n return document.body.getElementsByClassName(widgetGroupClassName)[0];\n}\n/**\n * TO BE USED ONLY FOR UNIT TEST CONTEXT\n */\nexport function resetLocalVariables() {\n loadingIconRemoved = false;\n}\n//# sourceMappingURL=LoadingIcon.js.map","// © Microsoft Corporation. All rights reserved.\n/**\n * Get override params for appType, pageType and cm.\n */\nexport function getOverrideParams() {\n const queryParams = location.search && location.search.replace(\"?\", \"\").split(\"&\");\n // This ensures that overrideParams will be always defined so no need to check undefined or null in the caller.\n const overrideParams = {};\n if (!queryParams) {\n return overrideParams;\n }\n // Loop through query params and set appType, pageType and cm in overrideParams.\n // Example:\n // QSP item=appType:windowsShell.\n // This will set overrideParams.appType to be windowsShell\n // overrideParams.pageType and overrideParams.cm will be null.\n for (let i = 0; i < queryParams.length; i++) {\n const itemQsp = queryParams[i];\n const pair = itemQsp.split(\"=\");\n if (pair.length !== 2) {\n continue;\n }\n // Following QSPs are used in statics context/debugging.\n const qspKey = decodeURIComponent(pair[0]);\n const qspValue = decodeURIComponent(pair[1]);\n if (qspKey === \"instance\") {\n overrideParams.staticsAttributes = {\n ...overrideParams.staticsAttributes,\n instance: qspValue\n };\n }\n if (qspKey === \"staticsEnv\") {\n overrideParams.staticsAttributes = {\n ...overrideParams.staticsAttributes,\n staticsEnv: qspValue\n };\n }\n // Following code is for item QSPs.\n if (\n // decodeURIComponent exist in all browsers. https://www.caniuse.com/?search=decodeURIComponent\n qspKey === \"item\"\n && qspValue) {\n const itemPair = qspValue.split(\":\");\n if (itemPair\n && itemPair.length === 2\n && itemPair[0]\n && itemPair[1]) {\n const value = itemPair[1];\n // Add instance=intpr or instance=intperf QSP if item=pcsenv:intpr or item=pcsenv:intperf\n const pcsEnvQsp = (itemPair[0] === \"pcsenv\" && (value === \"intpr\" || value === \"intperf\")) && `instance=${value}`;\n overrideParams.pcsAdditionalQsp = `${overrideParams.pcsAdditionalQsp ? `${overrideParams.pcsAdditionalQsp}&` : \"\"}${pcsEnvQsp || itemQsp}`;\n switch (itemPair[0]) {\n case \"appType\":\n overrideParams.appType = value;\n break;\n case \"pageType\":\n overrideParams.pageType = value;\n break;\n case \"cm\":\n overrideParams.cm = value;\n break;\n case \"dl\":\n overrideParams.dl = value;\n break;\n case \"useCnDomain\":\n overrideParams.useCnDomain = value === \"true\";\n break;\n case \"reportingOcid\":\n overrideParams.telemetry = {\n ...overrideParams.telemetry,\n ocid: value\n };\n break;\n case \"tmpl\":\n overrideParams.telemetry = {\n ...overrideParams.telemetry,\n tmpl: value\n };\n break;\n case \"feedOcid\":\n overrideParams.feed = {\n ...overrideParams.feed,\n ocid: value\n };\n break;\n case \"feedApiKey\":\n overrideParams.feed = {\n ...overrideParams.feed,\n apiKey: value\n };\n break;\n case \"shouldPreFetchPcsResponse\":\n overrideParams.clientPerf = {\n ...overrideParams.clientPerf,\n shouldPreFetchPcsResponse: value === \"true\"\n };\n break;\n case \"shouldUsePWOnlyFlights\":\n overrideParams.clientPerf = {\n ...overrideParams.clientPerf,\n shouldUsePWOnlyFlights: value === \"true\"\n };\n break;\n case \"shouldShowLoadingIcon\":\n overrideParams.clientPerf = {\n ...overrideParams.clientPerf,\n shouldShowLoadingIcon: value === \"true\"\n };\n break;\n }\n }\n }\n }\n return overrideParams;\n}\nexport const PcsMicrosoftStartEnvironment = \"microsoftstart\";\nexport const PcsMicrosoftStartQueryParam = \"item=pcsenv:microsoftstart\";\n/**\n * For debugging purpose: get pcs env from query string param\n * @param appType\n * @returns string (www, int, int1 or microsoftstart)\n */\nexport function getPcsEnvironment(appType = \"\", pcsAdditionalQsp = \"\") {\n const queryParams = location.search?.replace(\"?\", \"\").split(\"&\");\n if (queryParams) {\n // indexOf exist in IE9 and above. https://www.caniuse.com/?search=indexof\n if (queryParams.indexOf(\"item=pcsenv:int1\") > -1) {\n return \"int1\";\n }\n if (queryParams.indexOf(\"item=pcsenv:int\") > -1\n || queryParams.indexOf(\"item=pcsenv:intpr\") > -1\n || queryParams.indexOf(\"item=pcsenv:intperf\") > -1) {\n return \"int\";\n }\n if (appType === \"distribution\" /* AppType.Distribution */ || queryParams.indexOf(PcsMicrosoftStartQueryParam) > -1) {\n return PcsMicrosoftStartEnvironment;\n }\n }\n const inlineQueryParams = pcsAdditionalQsp && pcsAdditionalQsp.replace(\"?\", \"\").split(\"&\");\n if (inlineQueryParams) {\n if (inlineQueryParams.indexOf(PcsMicrosoftStartQueryParam) > -1) {\n return PcsMicrosoftStartEnvironment;\n }\n }\n // Default behavior\n return \"www\";\n}\n//# sourceMappingURL=GetOverrideParams.js.map","// © Microsoft Corporation. All rights reserved.\nconst appTimingsWindowPropertyName = \"_appTimings\";\n/**\n * Add given perf marker to pageTimings global object\n * TODO: We could use this function from diagnostic package but importing that is adding lot of unnecessary code\n * and that is bloating size of widgetInitializer.js from 7 kb to few mb.\n * @param marker name\n */\nexport function addMarkerToPageTimings(marker) {\n if (!performance || !performance.now) {\n return;\n }\n const pageTimings = window._pageTimings || (window._pageTimings = {});\n pageTimings[marker] = Math.round(performance.now());\n}\n/**\n * Add given perf marker to appTimings object\n * @param marker name\n */\nexport function addAppTraceMarker(marker) {\n if (!performance || !performance.now) {\n return;\n }\n const appTimings = window[appTimingsWindowPropertyName] || (window[appTimingsWindowPropertyName] = {});\n appTimings[marker] = performance.now();\n}\n/**\n * Gets current window._pageTimings object\n */\nexport function getPageTimings() {\n if (typeof window === \"object\" && window !== null) {\n return window._pageTimings || (window._pageTimings = {});\n }\n return {};\n}\n//# sourceMappingURL=AddMarkerToPageTimings.js.map","// © Microsoft Corporation. All rights reserved.\n/**\n * A functionally limited, but lite implementation of lodash memoize helper\n * to help memoize the value of an argumentless function.\n */\nexport function memoizeLite(fn) {\n let cachedValue;\n let invokedOnce = false;\n const memoizedFn = function () {\n if (!invokedOnce) {\n invokedOnce = true;\n cachedValue = fn();\n }\n return cachedValue;\n };\n // helper to clear memoization cache value\n memoizedFn.cache = {\n clear: () => {\n invokedOnce = false;\n cachedValue = undefined;\n }\n };\n return memoizedFn;\n}\n//# sourceMappingURL=LodashLiteInline.js.map","// © Microsoft Corporation. All rights reserved.\n/**\n * Converts the given error object to its string representation based on\n * the type of the input object.\n * @param error - the error object to convert to a string.\n * @param tryIncludeErrorStack - If true, will try to get the stack of the error\n * if the error is an actual Error object that has a stack.\n * @returns {string} - The string representation of the error.\n */\nexport function stringifyError(error, tryIncludeErrorStack) {\n if (error instanceof Error) {\n const message = error.toString();\n return tryIncludeErrorStack && error.stack\n ? `${message}, Stack: ${error.stack}`\n : message;\n }\n else if (typeof error === \"string\") {\n return error;\n }\n else {\n return tryStringifyJson(error);\n }\n}\n/**\n * Attempts to stringify json. Empty string in case of serialization error.\n * @param value - the JS value to convert to a string.\n * @returns {string} - Stringify'ed object\n */\nexport function tryStringifyJson(value) {\n // JSON.stringify returns `undefined` if `undefined` is passed\n // unlike how it handles `null` which is correctly converted to \"null\".\n // So we explicitly handle the undefined scenario here.\n if (value === undefined) {\n return \"undefined\";\n }\n try {\n return JSON.stringify(value);\n }\n catch {\n return \"[serialization-error]\";\n }\n}\n/**\n * Convert the given error \"value\" to an Error object.\n * It will retain the original error message if given an actual Error object\n * or otherwise the string representation of the input value will be used to create a new Error object.\n * @param error - The unknown error value to convert to an Error object.\n * @returns {Error} - The Error object created from the input value.\n */\nexport function toErrorObj(error) {\n return error instanceof Error\n ? error\n : new Error(stringifyError(error));\n}\n//# sourceMappingURL=ErrorHelper.js.map","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nexport default isArray;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n","import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nexport default getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nexport default baseGetTag;\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nexport default isSymbol;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n","import isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nexport default isKey;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nexport default isObject;\n","import root from './_root.js';\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nexport default coreJsData;\n","import coreJsData from './_coreJsData.js';\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nexport default isMasked;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nexport default toSource;\n","import isFunction from './isFunction.js';\nimport isMasked from './_isMasked.js';\nimport isObject from './isObject.js';\nimport toSource from './_toSource.js';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nexport default baseIsNative;\n","import baseGetTag from './_baseGetTag.js';\nimport isObject from './isObject.js';\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nexport default isFunction;\n","import baseIsNative from './_baseIsNative.js';\nimport getValue from './_getValue.js';\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nexport default getNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nexport default getValue;\n","import getNative from './_getNative.js';\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nexport default nativeCreate;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nexport default hashGet;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nexport default hashHas;\n","import hashClear from './_hashClear.js';\nimport hashDelete from './_hashDelete.js';\nimport hashGet from './_hashGet.js';\nimport hashHas from './_hashHas.js';\nimport hashSet from './_hashSet.js';\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nexport default Hash;\n","import nativeCreate from './_nativeCreate.js';\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nexport default hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nexport default hashDelete;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nexport default hashSet;\n","import eq from './eq.js';\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nexport default assocIndexOf;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nexport default eq;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nexport default listCacheDelete;\n","import listCacheClear from './_listCacheClear.js';\nimport listCacheDelete from './_listCacheDelete.js';\nimport listCacheGet from './_listCacheGet.js';\nimport listCacheHas from './_listCacheHas.js';\nimport listCacheSet from './_listCacheSet.js';\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nexport default ListCache;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nexport default listCacheClear;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nexport default listCacheGet;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nexport default listCacheHas;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nexport default listCacheSet;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nexport default Map;\n","import isKeyable from './_isKeyable.js';\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nexport default getMapData;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nexport default isKeyable;\n","import mapCacheClear from './_mapCacheClear.js';\nimport mapCacheDelete from './_mapCacheDelete.js';\nimport mapCacheGet from './_mapCacheGet.js';\nimport mapCacheHas from './_mapCacheHas.js';\nimport mapCacheSet from './_mapCacheSet.js';\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nexport default MapCache;\n","import Hash from './_Hash.js';\nimport ListCache from './_ListCache.js';\nimport Map from './_Map.js';\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nexport default mapCacheClear;\n","import getMapData from './_getMapData.js';\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nexport default mapCacheDelete;\n","import getMapData from './_getMapData.js';\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nexport default mapCacheGet;\n","import getMapData from './_getMapData.js';\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nexport default mapCacheHas;\n","import getMapData from './_getMapData.js';\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nexport default mapCacheSet;\n","import MapCache from './_MapCache.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nexport default memoize;\n","import memoizeCapped from './_memoizeCapped.js';\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nexport default stringToPath;\n","import memoize from './memoize.js';\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nexport default memoizeCapped;\n","import Symbol from './_Symbol.js';\nimport arrayMap from './_arrayMap.js';\nimport isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nexport default baseToString;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nexport default arrayMap;\n","import isArray from './isArray.js';\nimport isKey from './_isKey.js';\nimport stringToPath from './_stringToPath.js';\nimport toString from './toString.js';\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nexport default castPath;\n","import baseToString from './_baseToString.js';\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nexport default toString;\n","import isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nexport default toKey;\n","import baseGet from './_baseGet.js';\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nexport default get;\n","import castPath from './_castPath.js';\nimport toKey from './_toKey.js';\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nexport default baseGet;\n","// © Microsoft Corporation. All rights reserved.\n/**\n * Utility method to extract query string param in url.\n * @param name - Query param name\n * @returns Query param value\n */\nexport function getQueryParameterByName(locationHref, name) {\n const nameRegEx = name.replace(/[[\\]]/g, \"\\\\$&\");\n const regex = new RegExp(\"[?&]\" + nameRegEx + \"(=([^&#]*)|&|#|$)\");\n const queryNameValueMatches = regex.exec(locationHref);\n if (!queryNameValueMatches) {\n return null;\n }\n // the second group would contain the value of the param\n const queryValue = queryNameValueMatches[2];\n return decodeURIComponent(queryValue.replace(/\\+/g, \" \")) || \"\";\n}\n//# sourceMappingURL=Util.js.map","// © Microsoft Corporation. All rights reserved.\nimport { LiteLogger } from \"./LiteLogger\";\n/**\n * Set the logger instance.\n * @param _logger The logger instance to change to.\n */\nexport function setLogger(_logger) {\n logger = _logger;\n}\n/** Logger used by everyone. Default is LiteLogger. Please set up desired logger implementaiton with setLogger(). */\nexport let logger = new LiteLogger();\n//# sourceMappingURL=Logger.js.map","// © Microsoft Corporation. All rights reserved.\nimport { getQueryParameterByName } from \"./Util\";\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\n/**\n * Logger that simply logs to console with minimum dependencies.\n * Used for bootstrap/inline script where we don't need any logging nor its dependencies.\n */\nexport class LiteLogger {\n /**\n * The constructor\n */\n constructor() {\n if (canUseDOM()) {\n this.isDebugEnabled = ((getQueryParameterByName(window.location.href, \"debug\") || \"\").toLowerCase() in { 1: 1, true: 1 }) ||\n ((getQueryParameterByName(window.location.href, \"reqsrc\") || \"\").toLowerCase() === \"vp\");\n // On debug mode, make webpack_require available as global function\n // so any code in packages could be triggered from console. Handy for debugging.\n if (this.isDebugEnabled && !global[\"TEST_ENV\"]) {\n window.webpackRequire = __webpack_require__;\n }\n }\n else {\n this.isDebugEnabled = false; // isDebugEnabled should be set explictly using the setDebug method\n }\n }\n /**\n * Returns the logging service\n * @returns {ILoggingService}\n */\n getLoggingService() {\n return null;\n }\n /**\n * Checks whether we're running in debug mode.\n * @returns True when either debug=1 or debug=true is present as a query param, otherwise false.\n */\n isDebug() {\n return this.isDebugEnabled;\n }\n /**\n * Override the isDebug setting. Useful when server side rendering.\n */\n setDebug(isDebug) {\n this.isDebugEnabled = isDebug;\n }\n /**\n * Set the tags to filter logs.\n * @param tags Tags to filter logs. If empty, do not filter.\n */\n setTags(tags) {\n // Not supported in console logger at the moment\n }\n /**\n * Log console message.\n * Note that these are not output to the console unless you're in debug mode.\n * @param message - Message to log.\n * @param tags - Optional tags for specifying log type for filtering logs.\n */\n log(message, tags) {\n if (this.isDebug()) {\n console.info(message);\n }\n }\n /**\n * Log error message.\n * @param message - Message to log\n */\n logError(message) {\n console.error(message);\n }\n /**\n * Lazy log console message. Use this when the message being constructed is complex or expensive so that it's only evaluated if needed.\n * Note that the callback is not invoked and the message is not output unless you're in debug mode.\n * @param getMessage - The function to call to get message to log\n */\n logCallback(getMessage) {\n if (this.isDebug()) {\n console.info(getMessage());\n }\n }\n /**\n * Log the objects to the console.\n * Note that these are not output to the console unless you're in debug mode.\n * @param message - Array of messages to log\n */\n logObjects(...message) {\n if (this.isDebug()) {\n console.log(...message);\n }\n }\n /**\n * Log the object to the console.\n * Note that these are not output to the console unless you're in debug mode.\n * @param message - Array of messages to log\n */\n logSingleObject(message, isMetrics) {\n if (this.isDebug()) {\n console.log(message);\n }\n }\n}\n//# sourceMappingURL=LiteLogger.js.map","// © Microsoft Corporation. All rights reserved.\n// Provides utility functions to get and set data from browser webStorage.\nimport { tryParseJson } from \"../utilities/Parsing\";\nimport { logger } from \"@msnews/diagnostics\";\n/**\n * Base class for localeStorage and sessionStorage abstractions\n */\nexport class WebStorage {\n /**\n * Check if the web storage is supported\n * @returns {boolean} true if supported\n */\n get supported() {\n return !!this.storage;\n }\n /**\n * Local storage object for persistent storage\n * @param storage Storage used.\n */\n constructor(storage) {\n this.storage = storage;\n }\n /**\n * Get given key's value from web storage\n * @param {string} key - Key name\n * @returns {string} Key value\n */\n getItem(key) {\n if (this.supported) {\n return this.storage.getItem(key);\n }\n }\n /**\n * Gets the value from local storage using the key.\n * @param {string} key - the storage key to store under\n * @param {T} defaultValue - the default value to return if parsing fails\n * @returns {T} The parsed JSON value\n */\n getObject(key, defaultValue) {\n const value = this.getItem(key);\n if (value != null) {\n const parsedObj = tryParseJson(value);\n if (parsedObj != null) {\n return parsedObj;\n }\n }\n return defaultValue;\n }\n /**\n * Gets given index location key from web storage\n * @param {string} key - Key name\n * @returns {string} Key value\n */\n key(index) {\n if (this.supported && index >= 0) {\n return this.storage.key(index);\n }\n }\n /**\n * Returns all the keys under the storage\n */\n keys() {\n return this.supported\n ? Object.keys(this.storage)\n : [];\n }\n /**\n * Sets the given value after stringifying as JSON\n * @param {string} key - the storage key to store under\n * @param {T} value - the value to serialize and store\n */\n setObject(key, value) {\n (value !== undefined)\n ? this.setItem(key, JSON.stringify(value))\n : this.removeItem(key);\n }\n /**\n * Removes the given key from storage and returns the existing value parsed\n * @param {string} key - the key to remove.\n */\n removeObject(key) {\n const value = this.removeItem(key);\n if (value != null) {\n return tryParseJson(value);\n }\n }\n /**\n * Set given key's value to local storage\n * @param {string} key - Key name\n * @param {string} value - Key value\n * @param {boolean} ignoreError - log error instead of throwing\n */\n setItem(key, value, ignoreError = true) {\n if (this.supported) {\n try {\n if (!value) {\n throw \"Attempted to store null/undefined value: \" + value;\n }\n this.storage.setItem(key, value);\n }\n catch (e) {\n if (ignoreError) {\n logger.logError(e);\n }\n else {\n throw e;\n }\n }\n }\n else if (!ignoreError) {\n throw new Error(\"WebStorage not supported\");\n }\n }\n /**\n * Get entry count of storage\n * @returns storage.length\n */\n get length() {\n if (this.supported) {\n return this.storage.length;\n }\n }\n /**\n * Remove key item from local storage\n * @param {string} key - Key name\n * @returns {string} Key value\n */\n removeItem(key) {\n if (this.supported) {\n const value = this.getItem(key);\n this.storage.removeItem(key);\n return value;\n }\n }\n /**\n * Removes all key/value pairs from storage, if there are any\n */\n clear() {\n if (this.supported) {\n this.storage.clear();\n }\n }\n /**\n * Removes all keys containing the given substring in the storage key\n * @param {string} substring The substring to check\n */\n removeSubstringKeys(substring) {\n if (!this.supported || !substring) {\n return;\n }\n const matchingKeys = [];\n for (let index = 0; index < this.storage.length; index++) {\n const storageKey = this.key(index);\n if (storageKey && storageKey.includes(substring)) {\n matchingKeys.push(storageKey);\n }\n }\n for (let index = 0; index < matchingKeys.length; index++) {\n this.removeItem(matchingKeys[index]);\n }\n }\n}\n//# sourceMappingURL=WebStorage.js.map","// © Microsoft Corporation. All rights reserved.\nimport { WebStorage } from \"./WebStorage\";\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\n/* eslint-disable msnews-experiences-rules/no-direct-api-usage */\n/**\n * Local storage class for persistent storage\n */\nexport class LocalStorage extends WebStorage {\n constructor() {\n let storage = null;\n if (canUseDOM()) {\n try {\n storage = localStorage;\n }\n catch (ex) {\n // Getting local storage failed. Can happen in Chrome when user has disabled cookies.\n }\n }\n super(storage);\n }\n}\n/**\n * Set the local storage instance. Useful when setting up mock storage instance.\n * @param _storage The local storage instance to change to.\n */\nexport function setLocalStorage(_storage) {\n safeLocalStorage = _storage;\n}\n/**\n * Get the local storage instance. This should be used in place of window.localStorage\n * as the browser API would throw exception on browsers with cookies disabled.\n * @return The local storage instance.\n */\nexport function getLocalStorage() {\n return safeLocalStorage;\n}\nlet safeLocalStorage = new LocalStorage();\n//# sourceMappingURL=LocalStorage.js.map","// © Microsoft Corporation. All rights reserved.\nimport { addAppTraceMarker, addMarkerToPageTimings, getPageTimings } from \"./AddMarkerToPageTimings\";\nimport { isProng2AppType, logError } from \"./ErrorLogging\";\nimport { memoizeLite, stringifyError } from \"@msnews/core-helper\";\nimport { pwPcsResponseCacheDuration, alwaysCachedAppPcsResponseCacheDuration, pwPcsResponseCacheKey, staticServerEndpoint, staticServerEndpointCnDomain } from \"@msnews/experiences-constants\";\nimport { get } from \"lodash-es\";\nimport { shouldProng2PcsApiUseAkamaiEndpoint } from \"@msnews/experimentation-helpers\";\nimport { getLocalStorage } from \"@msnews/core\";\n/**\n * Timeout in miliseconds to terminate PCS or Statics network call.\n */\nconst timeoutInMs = 15000;\n// page timings keys\nconst pcsRetry = \"PcsRetry\";\nconst pcsCached = \"PcsCached\";\nconst pcsNoCacheReason = \"PcsNoCacheReason\";\n/**\n * Data Widget Attributes specified by the host page in the Div and override QSPs\n */\nlet dataWidgetAttributes;\n/**\n * This is used to delay writing response to local storage later.\n */\nlet pcsNetworkResponse;\n/**\n * This function calls and gets PCS response for client-setting, user data-info, and core-bundle scripts to render widgets.\n * @param hostPageAttributes contains the specific appType, pageType, cm and pcsAdditionalQsp information.\n * @returns an async response that contains the needed information above.\n */\nexport async function getPcsResponse(hostPageAttributes) {\n if (!hostPageAttributes) {\n return null;\n }\n const pageTimings = getPageTimings();\n pageTimings[pcsRetry] = 0;\n pageTimings[pcsCached] = 0;\n // Add perf marker and app trace marker on global timings objects\n addMarkerToPageTimings(\"WidgetsPcsCallStart\");\n addAppTraceMarker(\"WidgetsPcsCall-start\");\n // Set dataWidgetAttributes for global function\n dataWidgetAttributes = hostPageAttributes;\n let pcsCachedResponse = null;\n // Get PCS response from cache if specified by the host page by setting \"shouldPreFetchPcsResponse\" to be true\n const { appType, clientPerf } = dataWidgetAttributes;\n if ((clientPerf && clientPerf.shouldPreFetchPcsResponse)\n // Temporary remove appType === AppType.WindowsNewsWidgets for CRS spike experiment\n || appType && (appType === \"distribution\" /* AppType.Distribution */)) {\n // Set handler on global object so this can be called at a later point in time\n setHandlerToWritePcsResponseToCache();\n // Get PCS response from cache.\n pcsCachedResponse = await getPcsResponseFromCache();\n }\n else if (window.__useCachedApp) {\n // Get PCS response from cache.\n pcsCachedResponse = await getPcsResponseFromCache();\n }\n if (!pcsCachedResponse && clientPerf && clientPerf.customPrefetchStrategy) {\n let strategy = null;\n if (typeof clientPerf.customPrefetchStrategy === \"string\") {\n strategy = get(window, clientPerf.customPrefetchStrategy, null);\n }\n if (strategy) {\n try {\n pcsCachedResponse = await strategy;\n pcsCachedResponse = tryUpdatePcsResponse(pcsCachedResponse, dataWidgetAttributes.useCnDomain);\n }\n catch (error) {\n pcsCachedResponse = null;\n }\n }\n }\n // If \"shouldPreFetchPcsResponse\" was not specified by the host page or cached response was not valid,\n // proceed making live call to PCS\n if (!pcsCachedResponse) {\n pcsNetworkResponse = await tryGetPcsResponseFromNetwork();\n }\n else {\n pageTimings[pcsCached] = 1;\n }\n // If PCS response from network was not valid, try to return the cached response regardless of the cache duration to avoid blank page.\n if (!pcsNetworkResponse && window.__useCachedApp) {\n pcsCachedResponse = await getPcsResponseFromCache(true);\n }\n // set handler to update the cache for next time; Immediately update PCS response in cache to get new AID/RID\n if (window.__useCachedApp) {\n setTryGetPcsResponseFromNetworkForFutureCaching();\n }\n // Add perf marker and app trace marker on global timings objects\n addMarkerToPageTimings(\"WidgetsPcsCallEnd\");\n addAppTraceMarker(\"WidgetsPcsCall-end\");\n return pcsNetworkResponse || pcsCachedResponse;\n}\n/**\n * This function calls and gets PCS response from PCS API and gets client-setting, user data-info, and core-bundle scripts to render widgets.\n * This is global promise since we want the ability to call from widget initializer as well as from Peregrine bundles (later in page cycle).\n * @returns an async response that contains the needed information above.\n */\nlet tryGetPcsResponseFromNetwork = memoizeLite(async () => {\n if (!dataWidgetAttributes) {\n logError(\"dataWidgetAttributes is null in getPcsResponseFromNetwork\", 43715, {});\n return null;\n }\n // Set a 15-second timeout for PCS API call\n let timer;\n let responseData;\n const fetchUrl = buildPcsFetchUrl();\n try {\n const timeoutPromise = new Promise((resolve) => {\n timer = setTimeout(() => {\n // Log an app error if PCS API call timed out\n logError(\"PCS Widgets API call timed out. Trying to get response from statics\", 43713, { url: fetchUrl });\n resolve(null);\n }, timeoutInMs);\n });\n const pcsFetchPromise = fetch(fetchUrl, { credentials: \"include\" }).then(async (pcsResponse) => {\n if (timer) {\n clearTimeout(timer);\n }\n if (pcsResponse.ok) {\n return await pcsResponse.json();\n }\n const afdAId = tryGetAfdActivityIdFromHeaders(pcsResponse);\n logError(\"Verify PCS response for pcsData and bundleData for request url\", 43716, { fetchUrl, afdAId });\n return null;\n });\n // Race between PCS and a timeout based promise\n responseData = await Promise.race([pcsFetchPromise, timeoutPromise]);\n }\n catch (e) {\n if (timer) {\n clearTimeout(timer);\n }\n // This line of code sends app error only if prong2 page is visible when app type is prong2 app type.\n // If page is not visible in prong2 app type, don't send app error as that is a background refresh.\n const { appType, isCallFromWidgetsChanged } = dataWidgetAttributes || {};\n if (!(isProng2AppType(appType) && isCallFromWidgetsChanged)) {\n // If this is not prong2 app type, send this app error anyways.\n logError(\"Fetch failed for PCS url\", 43715, { originalUrl: fetchUrl, error: stringifyError(e, false) });\n }\n }\n // If response was null or respone was invalid, try get response from static fallback\n if (!validatePcsResponse(responseData)) {\n responseData = await getStaticFallbackPage(fetchUrl);\n }\n // RETRY! If response was still not valid, try getting from static fallback again as a last chance.\n // Make sure that user network is online before retrying.\n const online = (navigator && navigator.onLine) || true;\n if (online && !validatePcsResponse(responseData)) {\n responseData = await getStaticFallbackPage(fetchUrl, true);\n }\n return tryUpdatePcsResponse(responseData, dataWidgetAttributes.useCnDomain);\n});\n/**\n * Get static fall back page if PCS call is not successful\n * @param url - Widget Url\n * @param thisIsRetry - This is used to send different set of app errors\n * @returns StaticResponse\n */\nexport async function getStaticFallbackPage(url, thisIsRetry = false) {\n const { instance, staticsEnv } = dataWidgetAttributes && dataWidgetAttributes.staticsAttributes || {};\n const pageTimings = getPageTimings();\n pageTimings[pcsRetry] = (pageTimings[pcsRetry] || 0) + 1;\n if (instance) {\n url += `&instance=${instance}`;\n }\n if (staticsEnv) {\n url += `&staticsEnv=${staticsEnv}`;\n }\n const originalUrl = new URL(url);\n let staticUrl = url.replace(originalUrl.hostname, staticServerEndpoint);\n if (originalUrl.hostname.includes(\".cn\")) {\n staticUrl = url.replace(originalUrl.hostname, staticServerEndpointCnDomain);\n }\n // Set a 15-second timeout for Static call\n let timer;\n try {\n const timeoutPromise = new Promise((resolve) => {\n timer = setTimeout(() => {\n // Log an app error if Static Response timed out\n const [attempt, errorId] = thisIsRetry ? [\"second\", 52009] : [\"first\", 52006];\n logError(`PCS static Response timed out in ${attempt} attempt`, errorId, { originalUrl: url, staticUrl: staticUrl });\n resolve(null);\n }, timeoutInMs);\n });\n const staticFetchPromise = fetch(staticUrl, { credentials: \"include\" }).then(async (staticResponse) => {\n if (timer) {\n clearTimeout(timer);\n }\n const afdAId = tryGetAfdActivityIdFromHeaders(staticResponse);\n if (staticResponse.ok) {\n return await staticResponse.json();\n }\n else {\n // log error for not loading static page\n const [attempt, errorId] = thisIsRetry ? [\"second\", 52010] : [\"first\", 52004];\n logError(`Response not-ok in ${attempt} attempt to get PCS staticview`, errorId, { originalUrl: url, staticUrl: staticUrl, afdAId });\n return null;\n }\n });\n // Race between PCS and a timeout based promise\n const responeFromRace = await Promise.race([staticFetchPromise, timeoutPromise]);\n return responeFromRace;\n }\n catch (e) {\n if (timer) {\n clearTimeout(timer);\n }\n // log exception while loading static page\n const [attempt, errorId] = thisIsRetry ? [\"second\", 52011] : [\"first\", 52005];\n logError(`Exception in ${attempt} attempt to get PCS static response`, errorId, { error: stringifyError(e, false), originalUrl: url, staticUrl: staticUrl });\n return null;\n }\n}\n/**\n * Get PCS response from storage if it was stored in last 24 hours and if it is valid.\n * @param ignoreDuration - Ignore cache duration and return cached response\n * @returns PCS response from browser storage\n */\nexport async function getPcsResponseFromCache(ignoreDuration = false) {\n try {\n const key = getPcsResponseCacheKey();\n let pcsResponse = JSON.parse(localStorage.getItem(key));\n if (!pcsResponse && window.__bridgeSdk && window.__useCachedApp) {\n // try to get PCS from native storage\n const cachedResponseStr = await window.__bridgeSdk.promiseWithTimeout?.(window.__bridgeSdk.loadDataAsync?.({ key }), 500).then((res) => res ? JSON.parse(res).value : null);\n if (cachedResponseStr) {\n pcsResponse = JSON.parse(cachedResponseStr);\n }\n }\n const { appType } = dataWidgetAttributes || {};\n const storageTimestamp = pcsResponse && pcsResponse.storageTimestamp;\n const pcsUrlCached = pcsResponse && pcsResponse.pcsUrl;\n const currentPcsUrl = buildPcsFetchUrl();\n if (!pcsResponse) {\n // NOTE: JSON.parse(null|0|false) doesn't throw exception, so we need to check for falsy values explicitly\n logPcsNoCacheReason(\"Empty cache response\");\n }\n if (\n // for always cached app in offline mode, return valid cached response immediately without checking cache duration\n ((window.__useCachedApp && !navigator.onLine)\n // if PCS from network failed, return cached response immediately without checking cache duration\n || ignoreDuration)\n && pcsUrlCached === currentPcsUrl && validatePcsResponse(pcsResponse)) {\n return pcsResponse;\n }\n if (appType && appType === \"winWidgets\" /* AppType.WindowsNewsWidgets */) {\n if (dataWidgetAttributes.useCnDomain && shouldProng2PcsApiUseAkamaiEndpoint(pcsResponse)) {\n // if the PCS cache contains the PCS API Akamai migration flight, set pcs env to Akamai endpoint for the next PCS request\n dataWidgetAttributes.pcsEnvironment = \"assets\";\n }\n // Temporary remove the Prong2's cache for CRS spike experiment\n // Return after the akamai endpoint check\n return null;\n }\n const cacheDuration = window.__useCachedApp ? alwaysCachedAppPcsResponseCacheDuration : pwPcsResponseCacheDuration;\n const now = new Date().getTime();\n const isCacheStale = storageTimestamp ? (now - storageTimestamp) >= cacheDuration : true;\n if (!isCacheStale\n // Check if pcs cached url matches current pcs url\n && pcsUrlCached === currentPcsUrl\n // Validate cached response\n && validatePcsResponse(pcsResponse)) {\n return pcsResponse;\n }\n else {\n if (isCacheStale) {\n logPcsNoCacheReason(\"Cache is stale\");\n }\n else if (pcsUrlCached !== currentPcsUrl) {\n logPcsNoCacheReason(\"Cached PCS URL does not match current PCS URL\");\n }\n else {\n logPcsNoCacheReason(\"Cached PCS response is not valid\");\n }\n }\n }\n catch (e) {\n const msg = \"Error reading PCS response from local storage\";\n logPcsNoCacheReason(msg);\n logError(msg, 52007, { error: stringifyError(e, true) });\n }\n return null;\n}\n/**\n * log reason for not caching PCS response in LoadTime Telemetry for debugging\n * @param reason Reason for not caching PCS response\n */\nfunction logPcsNoCacheReason(reason) {\n const pageTimings = getPageTimings();\n if (!pageTimings[pcsNoCacheReason]) {\n pageTimings[pcsNoCacheReason] = reason;\n }\n}\n/**\n * This handler will enable us to call PCS API later point in time and write response to local storage.\n */\nfunction setHandlerToWritePcsResponseToCache() {\n window._pw_cachePcsResponse = async () => {\n try {\n const pcsResponse = await tryGetPcsResponseFromNetwork();\n updateCache(pcsResponse);\n }\n catch (e) {\n logError(\"Error writing PCS response to local storage\", 52008, { error: stringifyError(e, true) });\n }\n };\n}\n/**\n * For always cached app, we want to make sure that the PCS flight info and bundle info is matching with the GitConfig. So we will use a App cache manager to manage the cache flow.\n */\nfunction setTryGetPcsResponseFromNetworkForFutureCaching() {\n // immediately update the cache for next time asynchronously, then resolve the\n const getResponseFromNetworkPromise = new Promise((resolve) => {\n tryGetPcsResponseFromNetwork().then((response) => {\n updateCache(response);\n resolve(response);\n });\n });\n window._pw_tryGetPcsResponseFromNetwork = getResponseFromNetworkPromise;\n}\n/**\n * a helper function to update cache\n * @param pcsResponse response object to be stored in cache\n */\nfunction updateCache(pcsResponse) {\n if (pcsResponse) {\n pcsResponse.storageTimestamp = new Date().getTime();\n pcsResponse.pcsUrl = buildPcsFetchUrl();\n const key = getPcsResponseCacheKey();\n localStorage.setItem(key, JSON.stringify(pcsResponse));\n if (window.__bridgeSdk && window.__useCachedApp) {\n // update cache in native storage\n window.__bridgeSdk.saveDataAsync?.({ key, value: JSON.stringify(pcsResponse) }).catch((e) => {\n logError(\"Error writing PCS response to native storage\", 52008, { error: stringifyError(e, true) });\n });\n }\n }\n else {\n logError(\"PCS response was null\", 52008, {});\n }\n}\n/**\n * Clear PCS response from browser storage\n */\nexport function clearPcsCache() {\n // for always cached app, never clear the cache, we only update the cache when we get the new PCS response.\n // this is to make sure the app works in offline mode.\n if (window.__useCachedApp) {\n return;\n }\n localStorage.removeItem(getPcsResponseCacheKey());\n}\n/**\n * Check if PCS response is valid\n * @param PCS response\n * @returns true if response is valid, false otherwise\n */\nfunction validatePcsResponse(response) {\n return response\n && response.pcsData\n && response.pcsData.info\n && response.pcsData.clientSettings\n && response.bundleData\n && response.bundleData.bootstrappingRefs;\n}\n/**\n * Update response per business logic\n */\nfunction tryUpdatePcsResponse(response, useCnDomain) {\n if (!validatePcsResponse(response)) {\n return null;\n }\n // PCS currently does not send this property, so we need to use the host page provided value to set it\n // Add useCnDomain in client settings so all subsequent endpoints will be switched to use .cn instead of .com\n response.pcsData.clientSettings.useCnDomain = useCnDomain;\n // Add widget attribute on client settings so bundles can read required properties\n response.pcsData.clientSettings.widgetAttributes = dataWidgetAttributes;\n return response;\n}\n/**\n * Get PCS response cache key from Constant, AppType and PageType\n * @returns Cache Key\n */\nfunction getPcsResponseCacheKey() {\n if (!dataWidgetAttributes) {\n return \"\";\n }\n const { appType, cm, pageType } = dataWidgetAttributes;\n return `${pwPcsResponseCacheKey}_${appType}_${pageType}_${cm}`;\n}\n/**\n * Build PCS fetch url from DataWidgetAttributes\n * @returns PCS fetch url\n */\nfunction buildPcsFetchUrl() {\n if (!dataWidgetAttributes) {\n return \"\";\n }\n const { appType, useCnDomain, pageType, pcsEnvironment = \"www\", pcsAdditionalQsp } = dataWidgetAttributes;\n const isMarketSelectorEnabled = getLocalStorage().getItem(\"Prong2MarketSelectorEnabled\");\n const pcsUrl = getLocalStorage().getItem(\"Prong2PcsUrl\");\n if (isMarketSelectorEnabled === \"1\" && pcsUrl && pcsUrl.includes(\"/pcs/api/widget/\")) {\n // PCS url in 1S response contains locale and region query params, so we need to remove them\n return `${pcsUrl}${pcsAdditionalQsp ? `&${pcsAdditionalQsp.split(\"&\").filter(param => !param.startsWith(\"locale=\") && !param.startsWith(\"region=\")).join(\"&\")}` : \"\"}`;\n }\n return `https://${pcsEnvironment}.msn.${useCnDomain ? \"cn\" : \"com\"}/pcs/api/widget/${appType}/${pageType || \"\"}${pcsAdditionalQsp ? `?${pcsAdditionalQsp}` : \"\"}`;\n}\n/**\n * Return AFD provided activity id from response header.\n * @param response from server\n * @returns AFD activity id\n */\nfunction tryGetAfdActivityIdFromHeaders(response) {\n if (!response || !response.headers) {\n return \"\";\n }\n // Return string sequence representing the values of the retrieved header or null if this header is not set.\n // This doesn't throw error if not found.\n return response.headers.get(\"x-msedge-ref\") || \"\";\n}\n/**\n * TO BE USED FOR UNIT TESTING ONLY\n */\nexport function setLocalVariables(attributes) {\n if (attributes) {\n dataWidgetAttributes = attributes;\n }\n tryGetPcsResponseFromNetwork.cache.clear();\n}\n/**\n * Clear memoize cache.\n */\nexport function clearNetworkCachedResponse() {\n if (tryGetPcsResponseFromNetwork) {\n tryGetPcsResponseFromNetwork.cache.clear();\n }\n}\n//# sourceMappingURL=GetPcsResponse.js.map","// © Microsoft Corporation. All rights reserved.\nimport { CrsV31Endpoint, CrsV3Endpoint, Prong2ManualPcsCacheTreatmentId, Prong2PcsApiUseAkamaiEndpoint, Prong2PcsDurationTreatmentId, RemoveCrsFDHeadTreatment } from \"@msnews/experiences-constants\";\n/**\n * Remove the prefix and suffix of flightInfo and generate a flight list for prong 2.\n * @param flightInfo sample: \"f:prg-sp-liveapi,cprg-c-ads-dl;\"\n * @returns flight string list\n */\nexport function getProng2FlightList(flightInfo) {\n if (flightInfo.startsWith(\"f:\")) {\n flightInfo = flightInfo.substring(2);\n }\n if (flightInfo.endsWith(\";\")) {\n flightInfo = flightInfo.substring(0, flightInfo.length - 1);\n }\n return flightInfo.split(\",\");\n}\n/**\n * Check if Git configs should be used\n * @param {string} version - CRS version. Example: v2 or v3 (case sensitive)\n * @param {string} configIndexDocId. Example: cms/api/amp/experienceConfigIndex/BBUsYQa\n * @param {string} apptype. Example: edgeChromium\n * @returns true if git configs are supported\n */\nexport function shouldUseGitConfigs(version, configIndexDocId, apptype) {\n // If app type is not defined or empty, do not use Git configs.\n // For local dev scenarion of individual experiences running in standalone, app type is blank.\n // Also app type is MUST param in Git configs, if app type is not present, we do not want to attempt Git configs too in prod.\n // If version is not present or it is not v3 and or v3.1, do not support Git configs\n if (!apptype || !version || (version < CrsV3Endpoint)) {\n return false;\n }\n // Return true if this does not have configIndexDocId\n return !configIndexDocId;\n}\n/**\n * Checks if flight exist (prg-crs31) if it does out new crs version will point to V3.1,\n * otherwise we will point to the value that is in PCS head data. (Service endpoints).\n * @param version CRS Version from PCS head data\n * @param flights flights from current request.\n * @returns version of crs to be used. (V3 or V3.1) V3.1 will be flight based.\n */\nexport function tryGetCrsVersion(version, flights, appType) {\n try {\n // Excluding weather and fiance app types from this flight b/c they are SSR enabled, therefore not going to afd\n // when making the crs request, which is necessary for this flight.\n return version &&\n flights &&\n flights.includes(RemoveCrsFDHeadTreatment) &&\n (appType !== \"weather\" /* AppType.Weather */ && appType !== \"finance\" /* AppType.Finance */) ? CrsV31Endpoint : version;\n }\n catch (error) {\n // flights is not an array\n }\n return version;\n}\n/**\n * Determine if 1S request should use fdhead QSP.\n */\nexport function shouldOneServiceUseFdheadQsp(replaceOneServiceQspOverrides, isNtpSsr = false) {\n const { itemOverrides } = replaceOneServiceQspOverrides || {};\n // Check override QSP. Example: item=should1sUseFdheadQsp:true or item=should1sUseFdheadQsp:false\n const itemQsp = itemOverrides && itemOverrides.find(item => item.key === \"should1sUseFdheadQsp\");\n if (itemQsp && itemQsp.value) {\n return itemQsp.value === \"true\";\n }\n // NTP SSR do not use fdhead QSP.\n if (isNtpSsr) {\n return false;\n }\n // Debug/test flags\n const qspFlights = itemOverrides && itemOverrides.find(item => item.key === \"flights\" || item.key.toLowerCase() === \"appendflights\");\n if (qspFlights && qspFlights.value && qspFlights.value.length > 0) {\n return true;\n }\n // Default\n return false;\n}\nfunction hasFlightInPcsResponse(pcsResponse, targetFlight) {\n const flightInfo = pcsResponse?.pcsData?.info || \"\";\n const flights = flightInfo.substring(2, flightInfo.length - 1).split(\",\");\n return flights.includes(targetFlight);\n}\n/**\n * Determine which PCS cache duration to use for Prong2.\n */\nexport function shouldDisableProng2CustomPcsCacheDuration(pcsResponse) {\n // If the flight is present, do not use the custom cache duration.\n return hasFlightInPcsResponse(pcsResponse, Prong2PcsDurationTreatmentId);\n}\n/**\n * Determine if Prong2 timeout PCS cache should be disabled.\n */\nexport function shouldDisableProng2TimeoutPcsCache(flights) {\n return !!(flights && flights.includes(Prong2ManualPcsCacheTreatmentId));\n}\n/**\n * Determine if we should only check Prong2 flights.\n * @param appType appType\n * @returns\n */\nexport function shouldOnlyCheckProng2Flights(appType) {\n return appType === \"winWidgets\" /* AppType.WindowsNewsWidgets */;\n}\n/**\n * Determine whether PCS requst should use Akamai endpoint\n */\nexport function shouldProng2PcsApiUseAkamaiEndpoint(pcsResponse) {\n return hasFlightInPcsResponse(pcsResponse, Prong2PcsApiUseAkamaiEndpoint);\n}\n//# sourceMappingURL=FlightHelpers.js.map","// © Microsoft Corporation. All rights reserved.\nimport * as inlineHeadCommon from \"@msnews/inline-head-common\";\nimport { CustomEventPayloadStage, CustomWidgetErrorEvent, dispatchCustomEvent } from \"./ErrorDispatcher\";\nimport { coreBundleClassName, headTagDataInfoAttribute, headTagtCanvasInfo, headTagtClientSettingAttribute, widgetGroupClassName, widgetSettingsClassName } from \"@msnews/experiences-constants\";\nimport { isOneTrustScriptData, setOneTrustScript } from \"./SetOneTrustScript\";\nimport { setLoggingMetadata, verifyJSLoading } from \"./ErrorLogging\";\nimport { addLoadingIcon } from \"./LoadingIcon\";\nimport { createScriptTag } from \"@msnews/isomorphic-util\";\nimport { getDataWidgetAttributes } from \"./GetDataWidgetAttributes\";\nimport { clearPcsCache, getPcsResponse } from \"./GetPcsResponse\";\nimport { shouldRenderWidgets } from \"./Utilities\";\nimport { getPageTimings } from \"./AddMarkerToPageTimings\";\n/**\n * Widget Initializer routine.\n * This file is not used by any code in the msnews-experinces repo.\n * This script is expected to run on non-Peregrine pages as a standalone script and help include Peregrine experiences.\n * 1. This script expects following div in the DOM.\n
\",\"pageType\":\"\",\"cm\":\"\",\"pcsAdditionalQsp\":\"\"}\">
\n * 2. This script should read the div and call PCS with above appType, pageType, cm (optional) and pcsAdditionalQsp (optional)\n * 3. Add info and clientSettings obtained from PCS response to the DOM.\n * 4. Start downloading Peregrine core bundles.\n * @param options - \"string\" for backwards compatibility to support logging telemetry join id.\n * WidgetInitializerOptions should be used going forward with a predefined contract.\n * This options are added to global object __pw_options for Peregrine bundles to consume.\n */\nexport async function startWidgetInitializer(options) {\n // Return if host page browser isn't supported.\n if (!shouldRenderWidgets()) {\n return;\n }\n // wait until network is online before trying to make network calls\n // NOTE: cacheable widget app works offline, so we don't need to wait for network to be online\n if (!window.__useCachedApp && navigator && navigator.onLine === false) {\n const waitForNetwork = new Promise(resolve => {\n window.addEventListener(\"online\", () => resolve(), { once: true });\n });\n await waitForNetwork;\n }\n // Only call PCS if the bundle