{"version":3,"sources":["webpack/bootstrap","./src/Common/content-loader/common-content-loader.ts","./src/Common/logger/logger-log-level.enum.ts","./src/Common/logger/logger.ts","./src/Common/utilities/performance-check-utils/set-sources-downloaded-timing.ts","./src/InitialData/index.ts","./src/Common/utilities/performance-check-utils/performance-check-utils.ts"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","COMMON_CONTENT_LOADER_CLASSES","window","params","isPositionAbsolute","isOpaque","label","this","parentElement","container","document","body","createElement","labelText","className","enable","isEnabled","appendChild","containerClasses","push","join","getTemplate","CommonContentLoader","classList","add","setTimeout","disable","remove","textContent","parentNode","removeChild","setLabel","labelElement","innerHTML","error","content","fragment","createDocumentFragment","text","errorElement","description","errorDescriptionElement","timer","errorTimerElement","hasChildNodes","wrapperElement","progressElement","indeterminateElement","COMMON_LOGGER_LOG_LEVEL","initDate","Date","hashchange","previousErrors","Map","addEventListener","e","logErrorEvent","oldURL","newURL","timeStamp","log","message","level","currentDate","uptime","getTime","Level","Message","Error","time","startUTCTime","toUTCString","errorUTCTime","navigator","connection","downlink","effectiveType","type","language","platform","userAgent","location","href","errorEvent","isTrusted","returnValue","stack","isLastSameError","send","ERROR","newCount","set","http","XMLHttpRequest","open","setRequestHeader","JSON","stringify","win","performance","now","AppPerformance","timings","sourcesInitialized","console","info","setSourcesInitializedTiming","AppData","LogEnabled","initialLogger","isPerformanceCheckEnabled","IsPerformanceCheckEnabled","isAppPerformanceCreated","measures","onBeforeStateLoading","onSuccessStateLoading"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GA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L,EAAEM,QAASb,EAAwByC,MAAOlC,IAG5C,YAAAiC,KAAR,SAAc5B,GACb,IACM8B,GADgBnF,KAAK6C,eAAetE,IAAI8E,EAAIO,UACf,GAAK,EAIxC,GAFA5D,KAAK6C,eAAeuC,IAAI/B,EAAIO,QAASuB,GAEjCA,GAtIqC,EAsIW,CAtIX,IAuIpCA,IACH9B,EAAIQ,MAAMmB,iBAAkB,GAG7B,IAAMK,EAAO,IAAIC,eAEjBD,EAAKE,KAAK,OAAQ,gBAAgB,GAClCF,EAAKG,iBAAiB,eAAgB,oBACtCH,EAAKJ,KAAKQ,KAAKC,UAAUrC,MAG5B,EA1FA,G,aCrDO,SAAsCsC,GAC5C,GAAI,YAA0BA,GAAM,CACnC,IAAM7B,EAAO6B,EAAIC,YAAYC,MAE7B,YAAwBF,GACxBA,EAAIG,eAAeC,QAAQC,mBAAqBlC,EAEhDmC,QAAQC,KAAK,kCAAkCpC,ICJjDqC,CAA4BxG,QAExBA,OAAOyG,SAAWzG,OAAOyG,QAAQC,aACpC1G,OAAO2G,cAAgB,IAAI,I,kCCXrB,SAASC,EAA2BZ,G,MAC1C,SAAoB,QAAZ,EAACA,EAAIS,eAAO,eAAEI,2BAGhB,SAASC,EAAyBd,GACxCA,EAAIG,eAAiBnG,OAAOmG,gBAAkB,CAC7CY,SAAU,GACVX,QAAS,CACRC,mBAAoB,KACpBW,qBAAsB,KACtBC,sBAAuB,OAV1B","file":"initial.1a8ffcfcfa0e06774f91.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/Content/Authentication/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","import {\r\n\tICommonContentLoader,\r\n\tICommonContentLoaderError,\r\n\tICommonContentLoaderParams,\r\n} from './interfaces/common-content-loader.interface';\r\n\r\nexport const COMMON_CONTENT_LOADER_CLASSES = {\r\n\tLOADER_CONTAINER: 'b-common_content_loader-container',\r\n\tPROGRESS_OVERLAY: 'b-common_content_loader-progress-overlay',\r\n\tPROGRESS_OVERLAY_ANIMATION_RUN_CLASS: 'b-common_content_loader-progress-overlay--run',\r\n\tPROGRESS_BODY_OVERFLOW: 'b-common_content_loader-body_overflow',\r\n\tPOSITION_ABSOLUTE: 'b-common_content_loader-progress-overlay--absolute',\r\n\tOPAQUE: 'b-common_content_loader-progress-overlay--opaque',\r\n\tPROGRESS_WRAPPER: 'b-common_content_loader-wrapper',\r\n\tPROGRESS_LABEL: 'b-common_content_loader-progress-label',\r\n\tPROGRESS_ELEMENT: 'b-common_content_loader-progress',\r\n\tPROGRESS_INDETERMINATE: 'b-common_content_loader-progress-indeterminate',\r\n\tLOADING_ERROR: 'b-common_content_loader-error',\r\n\tLOADING_ERROR_DESCRIPTION: 'b-common_content_loader-error_description',\r\n\tLOADING_ERROR_TIMER: 'b-common_content_loader-error_timer',\r\n};\r\n\r\nexport class CommonContentLoader implements ICommonContentLoader {\r\n\tprivate static body: HTMLElement = document.body;\r\n\r\n\tprivate readonly parentElement: HTMLElement;\r\n\tprivate readonly container: HTMLElement;\r\n\tprivate params: ICommonContentLoaderParams;\r\n\tprivate labelElement: HTMLElement;\r\n\tprivate wrapperElement: HTMLElement;\r\n\tprivate errorElement: HTMLElement;\r\n\tprivate errorDescriptionElement: HTMLElement;\r\n\tprivate errorTimerElement: HTMLElement;\r\n\tprivate isEnabled: boolean;\r\n\tprivate labelText: string;\r\n\r\n\tconstructor(params: ICommonContentLoaderParams = {\r\n\t\tisPositionAbsolute: false,\r\n\t\tisOpaque: false,\r\n\t\tlabel: '',\r\n\t}) {\r\n\t\tthis.params = params;\r\n\t\tthis.parentElement = this.params.container || document.body;\r\n\t\tthis.container = document.createElement('div');\r\n\t\tthis.labelText = this.params.label || '';\r\n\r\n\t\tif (!this.params.container) {\r\n\t\t\tthis.container.className = COMMON_CONTENT_LOADER_CLASSES.LOADER_CONTAINER;\r\n\t\t}\r\n\t}\r\n\r\n\tpublic enable() {\r\n\t\tif (this.isEnabled) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.parentElement.appendChild(this.container);\r\n\r\n\t\tconst containerClasses = [\r\n\t\t\tCOMMON_CONTENT_LOADER_CLASSES.PROGRESS_OVERLAY,\r\n\t\t];\r\n\r\n\t\tif (this.params.isPositionAbsolute) {\r\n\t\t\tcontainerClasses.push(COMMON_CONTENT_LOADER_CLASSES.POSITION_ABSOLUTE);\r\n\t\t}\r\n\r\n\t\tif (this.params.isOpaque) {\r\n\t\t\tcontainerClasses.push(COMMON_CONTENT_LOADER_CLASSES.OPAQUE);\r\n\t\t}\r\n\r\n\t\tthis.container.className += ' ' + containerClasses.join(' ');\r\n\t\tthis.container.appendChild(this.getTemplate(this.labelText));\r\n\r\n\t\tif (!this.params.isPositionAbsolute) {\r\n\t\t\tCommonContentLoader.body.classList.add(COMMON_CONTENT_LOADER_CLASSES.PROGRESS_BODY_OVERFLOW);\r\n\t\t}\r\n\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.container.classList.add(COMMON_CONTENT_LOADER_CLASSES.PROGRESS_OVERLAY_ANIMATION_RUN_CLASS);\r\n\t\t});\r\n\r\n\t\tthis.isEnabled = true;\r\n\t}\r\n\r\n\tpublic disable() {\r\n\t\tif (!this.isEnabled) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.container.classList.remove(COMMON_CONTENT_LOADER_CLASSES.PROGRESS_OVERLAY);\r\n\t\tthis.container.classList.remove(COMMON_CONTENT_LOADER_CLASSES.POSITION_ABSOLUTE);\r\n\t\tthis.container.classList.remove(COMMON_CONTENT_LOADER_CLASSES.PROGRESS_OVERLAY_ANIMATION_RUN_CLASS);\r\n\t\tthis.container.textContent = '';\r\n\t\tthis.container.parentNode.removeChild(this.container);\r\n\r\n\t\tCommonContentLoader.body.classList.remove(COMMON_CONTENT_LOADER_CLASSES.PROGRESS_BODY_OVERFLOW);\r\n\r\n\t\tthis.isEnabled = false;\r\n\t}\r\n\r\n\tpublic setLabel(label) {\r\n\t\tthis.labelText = label;\r\n\r\n\t\tif (this.labelElement) {\r\n\t\t\tthis.labelElement.innerHTML = label;\r\n\t\t}\r\n\t}\r\n\r\n\tpublic error(content: ICommonContentLoaderError) {\r\n\t\tif (!this.isEnabled) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst fragment = document.createDocumentFragment();\r\n\r\n\t\tif (content.text) {\r\n\t\t\tif (!this.errorElement) {\r\n\t\t\t\tthis.errorElement = document.createElement('div');\r\n\t\t\t\tthis.errorElement.className = COMMON_CONTENT_LOADER_CLASSES.LOADING_ERROR;\r\n\r\n\t\t\t\tfragment.appendChild(this.errorElement);\r\n\t\t\t}\r\n\r\n\t\t\tthis.errorElement.innerHTML = content.text;\r\n\t\t}\r\n\r\n\t\tif (content.description) {\r\n\t\t\tif (!this.errorDescriptionElement) {\r\n\t\t\t\tthis.errorDescriptionElement = document.createElement('div');\r\n\t\t\t\tthis.errorDescriptionElement.className = COMMON_CONTENT_LOADER_CLASSES.LOADING_ERROR_DESCRIPTION;\r\n\r\n\t\t\t\tfragment.appendChild(this.errorDescriptionElement);\r\n\t\t\t}\r\n\r\n\t\t\tthis.errorDescriptionElement.innerHTML = content.description;\r\n\t\t}\r\n\r\n\t\tif (content.timer) {\r\n\t\t\tif (!this.errorTimerElement) {\r\n\t\t\t\tthis.errorTimerElement = document.createElement('div');\r\n\t\t\t\tthis.errorTimerElement.className = COMMON_CONTENT_LOADER_CLASSES.LOADING_ERROR_TIMER;\r\n\r\n\t\t\t\tfragment.appendChild(this.errorTimerElement);\r\n\t\t\t}\r\n\r\n\t\t\tthis.errorTimerElement.innerHTML = content.timer;\r\n\t\t}\r\n\r\n\t\tif (fragment.hasChildNodes()) {\r\n\t\t\tthis.container.appendChild(fragment);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate getTemplate(label: string): DocumentFragment {\r\n\t\tconst fragment = document.createDocumentFragment();\r\n\r\n\t\tthis.wrapperElement = document.createElement('div');\r\n\t\tthis.labelElement = document.createElement('div');\r\n\t\tthis.labelElement.innerHTML = label;\r\n\r\n\t\tconst progressElement = document.createElement('div');\r\n\t\tconst indeterminateElement = document.createElement('div');\r\n\r\n\t\tthis.wrapperElement.className = COMMON_CONTENT_LOADER_CLASSES.PROGRESS_WRAPPER;\r\n\t\tthis.labelElement.className = COMMON_CONTENT_LOADER_CLASSES.PROGRESS_LABEL;\r\n\t\tprogressElement.className = COMMON_CONTENT_LOADER_CLASSES.PROGRESS_ELEMENT;\r\n\t\tindeterminateElement.className = COMMON_CONTENT_LOADER_CLASSES.PROGRESS_INDETERMINATE;\r\n\r\n\t\tprogressElement.appendChild(indeterminateElement);\r\n\r\n\t\tthis.wrapperElement.appendChild(this.labelElement);\r\n\t\tthis.wrapperElement.appendChild(progressElement);\r\n\r\n\t\tfragment.appendChild(this.wrapperElement);\r\n\r\n\t\treturn fragment;\r\n\t}\r\n}\r\n\r\n// tslint:disable-next-line:no-string-literal\r\nwindow['CommonContentLoader'] = CommonContentLoader;\r\n","export enum COMMON_LOGGER_LOG_LEVEL {\r\n\tFATAL = 'Fatal', // Something bad happened; application is going down\r\n\tERROR = 'Error', // Something failed; application may or may not continue\r\n\tWARN = 'Warn', // Something unexpected; application will continue\r\n\tINFO = 'Info', // Normal behavior like mail sent, user updated profile etc.\r\n\tDEBUG = 'Debug', // For debugging; executed query, user authenticated, session expired\r\n\tTRACE = 'Trace', // For trace debugging; begin method X, end method X,\r\n}\r\n","import { COMMON_LOGGER_LOG_LEVEL } from './logger-log-level.enum';\r\n\r\nconst COMMON_LOGGER_MAX_SAME_ERROR_COUNT = 3;\r\n\r\nexport interface ICommonLoggerHashchange {\r\n\toldURL: string,\r\n\tnewURL: string,\r\n\ttimeStamp: number,\r\n}\r\n\r\nexport interface ICommonLoggerLogError {\r\n\r\n\t// time markers\r\n\ttime: {\r\n\t\tstartUTCTime: string, // start app time in UTC Date string\r\n\t\terrorUTCTime: string, // error time in UTC Date string\r\n\t\tuptime: number, // uptime in ms before error\r\n\t},\r\n\r\n\t// window.navigator data\r\n\tnavigator: {\r\n\t\tconnection?: {\r\n\t\t\tdownlink: number,\r\n\t\t\teffectiveType: string,\r\n\t\t\ttype: string,\r\n\t\t},\r\n\t\tlanguage: string,\r\n\t\tplatform: string,\r\n\t\tuserAgent: string,\r\n\t},\r\n\r\n\t// window.location data\r\n\tlocation: {\r\n\t\thref: string,\r\n\t},\r\n\r\n\t// hashchange events history data\r\n\thashchange: ICommonLoggerHashchange[],\r\n\r\n\t// ErrorEvent data\r\n\terrorEvent?: {\r\n\t\tisTrusted: boolean,\r\n\t\tmessage: string,\r\n\t\ttimeStamp: number,\r\n\t\treturnValue: boolean,\r\n\t\tstack: string,\r\n\t\ttype: string,\r\n\t},\r\n\r\n\tisLastSameError: boolean, // limit same errors with COMMON_LOGGER_MAX_SAME_ERROR_COUNT\r\n}\r\n\r\nexport interface ICommonLoggerLog {\r\n\tLevel: COMMON_LOGGER_LOG_LEVEL,\r\n\tMessage: string,\r\n\tError: ICommonLoggerLogError,\r\n}\r\n\r\nexport class CommonLogger {\r\n\tprivate initDate = new Date();\r\n\tprivate hashchange: ICommonLoggerHashchange[] = [];\r\n\tprivate previousErrors: Map = new Map();\r\n\r\n\tconstructor() {\r\n\t\twindow.addEventListener('error', (e) => {\r\n\t\t\tthis.logErrorEvent(e);\r\n\t\t});\r\n\t\twindow.addEventListener('hashchange', (e) => {\r\n\t\t\tthis.hashchange.push({\r\n\t\t\t\toldURL: e.oldURL,\r\n\t\t\t\tnewURL: e.newURL,\r\n\t\t\t\ttimeStamp: e.timeStamp,\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\tlog (\r\n\t\tmessage: string,\r\n\t\tlevel: COMMON_LOGGER_LOG_LEVEL,\r\n\t\te?: ErrorEvent,\r\n\t) {\r\n\t\tconst currentDate = new Date();\r\n\t\tconst uptime = currentDate.getTime() - this.initDate.getTime();\r\n\r\n\t\tconst log: ICommonLoggerLog = {\r\n\t\t\tLevel: level,\r\n\t\t\tMessage: message,\r\n\t\t\tError: {\r\n\t\t\t\ttime: {\r\n\t\t\t\t\tstartUTCTime: this.initDate.toUTCString(),\r\n\t\t\t\t\terrorUTCTime: currentDate.toUTCString(),\r\n\t\t\t\t\tuptime,\r\n\t\t\t\t},\r\n\t\t\t\tnavigator: window.navigator ? {\r\n\t\t\t\t\t// @ts-ignore\r\n\t\t\t\t\tconnection: window.navigator.connection ? {\r\n\t\t\t\t\t\t// @ts-ignore\r\n\t\t\t\t\t\tdownlink: window.navigator.connection.downlink,\r\n\t\t\t\t\t\t// @ts-ignore\r\n\t\t\t\t\t\teffectiveType: window.navigator.connection.effectiveType,\r\n\t\t\t\t\t\t// @ts-ignore\r\n\t\t\t\t\t\ttype: window.navigator.connection.type,\r\n\t\t\t\t\t} : null,\r\n\t\t\t\t\tlanguage: window.navigator.language,\r\n\t\t\t\t\tplatform: window.navigator.platform,\r\n\t\t\t\t\tuserAgent: window.navigator.userAgent,\r\n\t\t\t\t} : null,\r\n\t\t\t\tlocation: {\r\n\t\t\t\t\thref: window.location.href,\r\n\t\t\t\t},\r\n\t\t\t\thashchange: this.hashchange,\r\n\t\t\t\terrorEvent: e ? {\r\n\t\t\t\t\tisTrusted: e.isTrusted,\r\n\t\t\t\t\tmessage: e.message,\r\n\t\t\t\t\ttimeStamp: e.timeStamp,\r\n\t\t\t\t\treturnValue: e.returnValue,\r\n\t\t\t\t\tstack: e.error ? e.error.stack : null,\r\n\t\t\t\t\ttype: e.type,\r\n\t\t\t\t} : null,\r\n\t\t\t\tisLastSameError: false,\r\n\t\t\t},\r\n\t\t};\r\n\r\n\t\tthis.send(log);\r\n\t}\r\n\r\n\tlogErrorEvent (e: ErrorEvent) {\r\n\t\tthis.log(e.message, COMMON_LOGGER_LOG_LEVEL.ERROR, e);\r\n\t}\r\n\r\n\tprivate send (log: ICommonLoggerLog) {\r\n\t\tconst previousError = this.previousErrors.get(log.Message);\r\n\t\tconst newCount = (previousError || 0) + 1;\r\n\r\n\t\tthis.previousErrors.set(log.Message, newCount);\r\n\r\n\t\tif (newCount <= COMMON_LOGGER_MAX_SAME_ERROR_COUNT) {\r\n\t\t\tif (newCount === COMMON_LOGGER_MAX_SAME_ERROR_COUNT) {\r\n\t\t\t\tlog.Error.isLastSameError = true;\r\n\t\t\t}\r\n\r\n\t\t\tconst http = new XMLHttpRequest(); // for IE11\r\n\r\n\t\t\thttp.open('POST', 'api/Logs/Add', true);\r\n\t\t\thttp.setRequestHeader('Content-type', 'application/json');\r\n\t\t\thttp.send(JSON.stringify(log));\r\n\t\t}\r\n\t}\r\n}\r\n","import {\r\n\tisAppPerformanceCreated,\r\n\tisPerformanceCheckEnabled,\r\n} from '@CaseOne/Common/utilities/performance-check-utils/performance-check-utils';\r\n\r\nexport function setSourcesInitializedTiming (win: Window): void {\r\n\tif (isPerformanceCheckEnabled(win)) {\r\n\t\tconst time = win.performance.now();\r\n\r\n\t\tisAppPerformanceCreated(win);\r\n\t\twin.AppPerformance.timings.sourcesInitialized = time;\r\n\t\t// tslint:disable:no-console\r\n\t\tconsole.info(`Timing 'sourcesInitialized' is ${time}`);\r\n\t}\r\n}\r\n","import { CommonContentLoader } from '../Common/content-loader/common-content-loader';\r\nimport { CommonLogger } from '../Common/logger/logger';\r\nimport {\r\n\tsetSourcesInitializedTiming\r\n} from '@CaseOne/Common/utilities/performance-check-utils/set-sources-downloaded-timing';\r\n\r\ndeclare const HAS_INITIAL_LOADER: boolean;\r\n\r\nsetSourcesInitializedTiming(window);\r\n\r\nif (window.AppData && window.AppData.LogEnabled) {\r\n\twindow.initialLogger = new CommonLogger();\r\n}\r\n\r\nif (HAS_INITIAL_LOADER) {\r\n\twindow.initialLoader = new CommonContentLoader({\r\n\t\tisOpaque: true,\r\n\t});\r\n\twindow.initialLoader.enable();\r\n}\r\n","export function isPerformanceCheckEnabled (win: Window): boolean {\r\n\treturn !!win.AppData?.IsPerformanceCheckEnabled;\r\n}\r\n\r\nexport function isAppPerformanceCreated (win: Window): void {\r\n\twin.AppPerformance = window.AppPerformance || {\r\n\t\tmeasures: {},\r\n\t\ttimings: {\r\n\t\t\tsourcesInitialized: null,\r\n\t\t\tonBeforeStateLoading: null,\r\n\t\t\tonSuccessStateLoading: null,\r\n\t\t}\r\n\t};\r\n}\r\n"],"sourceRoot":"webpack:///"}