{"version":3,"sources":["node_modules/@newrelic/browser-agent/dist/esm/features/utils/feature-gates.js","node_modules/@newrelic/browser-agent/dist/esm/features/session_replay/shared/utils.js"],"sourcesContent":["import { getConfigurationValue } from '../../common/config/config';\nimport { isBrowserScope } from '../../common/constants/runtime';\n\n/**\n * Checks if session can be tracked, affects session entity and dependent features\n * @param {string} agentId\n * @returns {boolean}\n */\nexport const canEnableSessionTracking = agentId => {\n return isBrowserScope && getConfigurationValue(agentId, 'privacy.cookies_enabled') === true;\n};","import { getConfigurationValue, originals } from '../../../common/config/config';\nimport { canEnableSessionTracking } from '../../utils/feature-gates';\nimport { originTime } from '../../../common/constants/runtime';\nexport function hasReplayPrerequisite(agentId) {\n return !!originals.MO &&\n // Session Replay cannot work without Mutation Observer\n canEnableSessionTracking(agentId) &&\n // requires session tracking to be running (hence \"session\" replay...)\n getConfigurationValue(agentId, 'session_trace.enabled') === true; // Session Replay as of now is tightly coupled with Session Trace in the UI\n}\nexport function isPreloadAllowed(agentId) {\n return getConfigurationValue(agentId, 'session_replay.preload') === true && hasReplayPrerequisite(agentId);\n}\nexport function buildNRMetaNode(timestamp, timeKeeper) {\n const correctedTimestamp = timeKeeper.correctAbsoluteTimestamp(timestamp);\n return {\n originalTimestamp: timestamp,\n correctedTimestamp,\n timestampDiff: timestamp - correctedTimestamp,\n originTime,\n correctedOriginTime: timeKeeper.correctedOriginTime,\n originTimeDiff: Math.floor(originTime - timeKeeper.correctedOriginTime)\n };\n}"],"mappings":"6DAQO,IAAMA,EAA2BC,GAC/BC,GAAkBC,EAAsBF,EAAS,yBAAyB,IAAM,GCNlF,SAASG,EAAsBC,EAAS,CAC7C,MAAO,CAAC,CAACC,EAAU,IAEnBC,EAAyBF,CAAO,GAEhCG,EAAsBH,EAAS,uBAAuB,IAAM,EAC9D,CACO,SAASI,EAAiBJ,EAAS,CACxC,OAAOG,EAAsBH,EAAS,wBAAwB,IAAM,IAAQD,EAAsBC,CAAO,CAC3G,CACO,SAASK,EAAgBC,EAAWC,EAAY,CACrD,IAAMC,EAAqBD,EAAW,yBAAyBD,CAAS,EACxE,MAAO,CACL,kBAAmBA,EACnB,mBAAAE,EACA,cAAeF,EAAYE,EAC3B,WAAAC,EACA,oBAAqBF,EAAW,oBAChC,eAAgB,KAAK,MAAME,EAAaF,EAAW,mBAAmB,CACxE,CACF","names":["canEnableSessionTracking","agentId","isBrowserScope","getConfigurationValue","hasReplayPrerequisite","agentId","originals","canEnableSessionTracking","getConfigurationValue","isPreloadAllowed","buildNRMetaNode","timestamp","timeKeeper","correctedTimestamp","originTime"],"x_google_ignoreList":[0,1]}