{"version":3,"file":"v2.9fa3b2cd93754889.bundle.js","sources":["webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/config/state/info.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/dom/query-selector.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/config/state/init.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/config/state/loader-config.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/config/state/originals.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/config/state/runtime.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/config/config.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/config/state/configurable.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/constants/env.npm.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/constants/runtime.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/context/shared-context.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/deny-list/deny-list.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/drain/drain.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/event-emitter/contextual-ee.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/event-emitter/event-context.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/event-emitter/handle.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/event-emitter/register-handler.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/event-listener/event-listener-opts.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/ids/bundle-id.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/ids/unique-id.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/session/constants.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/timing/now.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/url/parse-url.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/util/console.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/util/feature-flags.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/dispatch/global-event.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/util/get-or-set.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/util/invoke.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/util/stringify.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/window/load.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/window/nreum.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/window/page-visibility.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/wrap/wrap-events.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/wrap/wrap-fetch.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/wrap/wrap-history.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/wrap/wrap-jsonp.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/wrap/wrap-mutation.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/wrap/wrap-promise.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/wrap/wrap-timer.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/wrap/wrap-xhr.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/wrap/wrap-function.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/ajax/constants.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/generic_events/constants.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/jserrors/constants.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/logging/constants.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/logging/shared/utils.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/metrics/constants.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/page_view_event/constants.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/page_view_timing/constants.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/session_replay/constants.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/session_replay/shared/utils.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/session_trace/constants.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/spa/constants.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/utils/feature-base.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/utils/feature-gates.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/loaders/api/api-methods.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/loaders/api/api.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/loaders/configure/public-path.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/loaders/configure/configure.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/wrap/wrap-logger.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/loaders/features/features.js","webpack://vortex-frontend/../../packages/ui/global.scss","webpack://vortex-frontend/../../node_modules/.pnpm/normalize.css@8.0.1/node_modules/normalize.css/normalize.css?b944","webpack://vortex-frontend/../../packages/lit/src/common/styles/app.scss","webpack://vortex-frontend/../../node_modules/.pnpm/css-loader@7.1.2_@rspack+core@1.2.8_@swc+helpers@0.5.15__webpack@5.91.0_esbuild@0.20.2_webpac_mwxvzzroc4ovju5veajcs7g4hi/node_modules/css-loader/dist/runtime/api.js","webpack://vortex-frontend/../../node_modules/.pnpm/css-loader@7.1.2_@rspack+core@1.2.8_@swc+helpers@0.5.15__webpack@5.91.0_esbuild@0.20.2_webpac_mwxvzzroc4ovju5veajcs7g4hi/node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://vortex-frontend/../../node_modules/.pnpm/dayjs@1.11.11/node_modules/dayjs/dayjs.min.js","webpack://vortex-frontend/../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js","webpack://vortex-frontend/../../node_modules/.pnpm/react-dom@19.0.0_react@19.0.0/node_modules/react-dom/cjs/react-dom-client.production.js","webpack://vortex-frontend/../../node_modules/.pnpm/react-dom@19.0.0_react@19.0.0/node_modules/react-dom/cjs/react-dom.production.js","webpack://vortex-frontend/../../node_modules/.pnpm/react-dom@19.0.0_react@19.0.0/node_modules/react-dom/client.js","webpack://vortex-frontend/../../node_modules/.pnpm/react-dom@19.0.0_react@19.0.0/node_modules/react-dom/index.js","webpack://vortex-frontend/../../node_modules/.pnpm/react@19.0.0/node_modules/react/cjs/react.production.js","webpack://vortex-frontend/../../node_modules/.pnpm/react@19.0.0/node_modules/react/index.js","webpack://vortex-frontend/../../node_modules/.pnpm/scheduler@0.25.0/node_modules/scheduler/cjs/scheduler.production.js","webpack://vortex-frontend/../../node_modules/.pnpm/scheduler@0.25.0/node_modules/scheduler/index.js","webpack://vortex-frontend/../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.91.0_esbuild@0.20.2_webpack-cli@3.3.12_webpack@4.47.0__/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://vortex-frontend/../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.91.0_esbuild@0.20.2_webpack-cli@3.3.12_webpack@4.47.0__/node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://vortex-frontend/../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.91.0_esbuild@0.20.2_webpack-cli@3.3.12_webpack@4.47.0__/node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://vortex-frontend/../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.91.0_esbuild@0.20.2_webpack-cli@3.3.12_webpack@4.47.0__/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://vortex-frontend/../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.91.0_esbuild@0.20.2_webpack-cli@3.3.12_webpack@4.47.0__/node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://vortex-frontend/../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.91.0_esbuild@0.20.2_webpack-cli@3.3.12_webpack@4.47.0__/node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://vortex-frontend/../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/stringify.js","webpack://vortex-frontend/../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/rng.js","webpack://vortex-frontend/../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v4.js","webpack://vortex-frontend/../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/regex.js","webpack://vortex-frontend/../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/validate.js","webpack://vortex-frontend/../../packages/lit/src/lib/router.ts","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/loaders/agent-base.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/loaders/features/enabled-features.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/utils/instrument-base.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/page_view_event/instrument/index.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/aggregate/aggregator.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/loaders/agent.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/loaders/features/featureDependencies.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/page_view_timing/instrument/index.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/metrics/instrument/index.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/jserrors/shared/uncaught-error.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/jserrors/shared/cast-error.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/jserrors/instrument/index.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/ids/id.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/common/util/data-size.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/ajax/instrument/distributed-tracing.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/ajax/instrument/index.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/ajax/instrument/response-size.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/session_trace/instrument/index.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/spa/instrument/index.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/session_replay/instrument/index.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/generic_events/instrument/index.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/features/logging/instrument/index.js","webpack://vortex-frontend/../../node_modules/.pnpm/@newrelic+browser-agent@1.264.0/node_modules/@newrelic/browser-agent/dist/esm/loaders/browser-agent.js","webpack://vortex-frontend/../../packages/lit/src/lib/new_relic.ts","webpack://vortex-frontend/../../packages/lit/src/common/styles/app.scss?5332","webpack://vortex-frontend/../../packages/ui/global.scss?19f3","webpack://vortex-frontend/./v2/src/main.ts","webpack://vortex-frontend/../../packages/lit/src/lib/app.ts","webpack://vortex-frontend/./v2/src/routes/index.ts","webpack://vortex-frontend/../../packages/kiln/src/index.ts","webpack://vortex-frontend/../../packages/lit/src/components/mixins/immutable_component/computed.ts","webpack://vortex-frontend/../../packages/lit/src/components/mixins/immutable_component/index.ts","webpack://vortex-frontend/../../packages/lit/src/components/providers/session_provider/architecture.ts","webpack://vortex-frontend/../../packages/lit/src/components/providers/session_provider/styles.scss","webpack://vortex-frontend/../../packages/lit/src/components/providers/session_provider/index.ts","webpack://vortex-frontend/../../packages/lit/src/contexts/session.ts","webpack://vortex-frontend/../../packages/lit/src/controllers/state_controller/listen_disconnect_controller.ts","webpack://vortex-frontend/../../packages/lit/src/controllers/state_controller/stores/store.ts","webpack://vortex-frontend/../../packages/lit/src/controllers/state_controller/index.ts","webpack://vortex-frontend/../../packages/lit/src/lib/component.ts","webpack://vortex-frontend/../../packages/lit/src/lib/feature_flags/FeatureFlag.ts","webpack://vortex-frontend/../../packages/lit/src/lib/feature_flags/FeatureFlagsManager.ts","webpack://vortex-frontend/../../packages/lit/src/lib/history/history_state_controller.ts","webpack://vortex-frontend/../../packages/lit/src/lib/history/index.ts","webpack://vortex-frontend/../../packages/lit/src/lib/history/browser_history.ts","webpack://vortex-frontend/../../packages/lit/src/types/state_controller/index.ts","webpack://vortex-frontend/../../packages/lit/src/utils/arrays.ts","webpack://vortex-frontend/../../packages/lit/src/utils/assert.ts","webpack://vortex-frontend/../../packages/lit/src/utils/dom.ts","webpack://vortex-frontend/../../packages/lit/src/utils/generators.ts","webpack://vortex-frontend/../../packages/lit/src/utils/index.ts","webpack://vortex-frontend/../../packages/lit/src/utils/objects.ts","webpack://vortex-frontend/../../packages/lit/src/utils/routes.ts","webpack://vortex-frontend/../../packages/lit/src/utils/strings.ts","webpack://vortex-frontend/../../packages/lit/src/utils/uuid.ts","webpack://vortex-frontend/../../packages/stores/session/index.ts","webpack://vortex-frontend/../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isFunction.js","webpack://vortex-frontend/../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js","webpack://vortex-frontend/../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js","webpack://vortex-frontend/../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js","webpack://vortex-frontend/../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/Subscription.js","webpack://vortex-frontend/../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/config.js","webpack://vortex-frontend/../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js","webpack://vortex-frontend/../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/noop.js","webpack://vortex-frontend/../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js","webpack://vortex-frontend/../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/errorContext.js","webpack://vortex-frontend/../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/Subscriber.js","webpack://vortex-frontend/../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js","webpack://vortex-frontend/../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/symbol/observable.js","webpack://vortex-frontend/../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/Observable.js","webpack://vortex-frontend/../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/pipe.js","webpack://vortex-frontend/../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/identity.js","webpack://vortex-frontend/../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js","webpack://vortex-frontend/../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/Subject.js","webpack://vortex-frontend/../../packages/utils/channel.ts","webpack://vortex-frontend/../../packages/utils/debounce.ts","webpack://vortex-frontend/../../packages/utils/strings.ts","webpack://vortex-frontend/../../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/decorators/base.js","webpack://vortex-frontend/../../node_modules/.pnpm/@lit-labs+context@0.2.0/node_modules/@lit-labs/context/lib/context-request-event.js","webpack://vortex-frontend/../../node_modules/.pnpm/@lit-labs+context@0.2.0/node_modules/@lit-labs/context/lib/create-context.js","webpack://vortex-frontend/../../node_modules/.pnpm/@lit-labs+context@0.2.0/node_modules/@lit-labs/context/lib/controllers/context-consumer.js","webpack://vortex-frontend/../../node_modules/.pnpm/@lit-labs+context@0.2.0/node_modules/@lit-labs/context/lib/value-notifier.js","webpack://vortex-frontend/../../node_modules/.pnpm/@lit-labs+context@0.2.0/node_modules/@lit-labs/context/lib/controllers/context-provider.js","webpack://vortex-frontend/../../node_modules/.pnpm/@lit-labs+context@0.2.0/node_modules/@lit-labs/context/lib/decorators/provide.js","webpack://vortex-frontend/../../node_modules/.pnpm/@lit-labs+context@0.2.0/node_modules/@lit-labs/context/lib/decorators/consume.js","webpack://vortex-frontend/../../node_modules/.pnpm/lit-element@2.5.1/node_modules/lit-element/lib/updating-element.js","webpack://vortex-frontend/../../node_modules/.pnpm/lit-element@2.5.1/node_modules/lit-element/lib/decorators.js","webpack://vortex-frontend/../../node_modules/.pnpm/lit-element@2.5.1/node_modules/lit-element/lib/css-tag.js","webpack://vortex-frontend/../../node_modules/.pnpm/lit-element@2.5.1/node_modules/lit-element/lit-element.js","webpack://vortex-frontend/../../node_modules/.pnpm/lit-html@1.4.1/node_modules/lit-html/lib/directive.js","webpack://vortex-frontend/../../node_modules/.pnpm/lit-html@1.4.1/node_modules/lit-html/lib/dom.js","webpack://vortex-frontend/../../node_modules/.pnpm/lit-html@1.4.1/node_modules/lit-html/lib/part.js","webpack://vortex-frontend/../../node_modules/.pnpm/lit-html@1.4.1/node_modules/lit-html/lib/parts.js","webpack://vortex-frontend/../../node_modules/.pnpm/lit-html@1.4.1/node_modules/lit-html/lib/render.js","webpack://vortex-frontend/../../node_modules/.pnpm/lit-html@1.4.1/node_modules/lit-html/lib/modify-template.js","webpack://vortex-frontend/../../node_modules/.pnpm/lit-html@1.4.1/node_modules/lit-html/lib/shady-render.js","webpack://vortex-frontend/../../node_modules/.pnpm/lit-html@1.4.1/node_modules/lit-html/lib/template-factory.js","webpack://vortex-frontend/../../node_modules/.pnpm/lit-html@1.4.1/node_modules/lit-html/lib/template-instance.js","webpack://vortex-frontend/../../node_modules/.pnpm/lit-html@1.4.1/node_modules/lit-html/lib/template-result.js","webpack://vortex-frontend/../../node_modules/.pnpm/lit-html@1.4.1/node_modules/lit-html/lib/template.js","webpack://vortex-frontend/../../node_modules/.pnpm/lit-html@1.4.1/node_modules/lit-html/lib/default-template-processor.js","webpack://vortex-frontend/../../node_modules/.pnpm/lit-html@1.4.1/node_modules/lit-html/lit-html.js","webpack://vortex-frontend/../../node_modules/.pnpm/lit-html@2.8.0/node_modules/lit-html/lit-html.js","webpack://vortex-frontend/../../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/decorators/custom-element.js","webpack://vortex-frontend/../../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/decorators/property.js","webpack://vortex-frontend/../../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/decorators/state.js","webpack://vortex-frontend/../../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js","webpack://vortex-frontend/../../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/decorators/query.js","webpack://vortex-frontend/../../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/decorators/query-all.js","webpack://vortex-frontend/../../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js","webpack://vortex-frontend/../../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/css-tag.js","webpack://vortex-frontend/../../node_modules/.pnpm/@lit+reactive-element@1.6.3/node_modules/@lit/reactive-element/reactive-element.js","webpack://vortex-frontend/../../node_modules/.pnpm/lit-element@3.3.3/node_modules/lit-element/lit-element.js","webpack://vortex-frontend/../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs","webpack://vortex-frontend/../../node_modules/.pnpm/zustand@5.0.1_@types+react@19.0.12_immer@10.1.1_react@19.0.0_use-sync-external-store@1.4.0_react@19.0.0_/node_modules/zustand/esm/react.mjs","webpack://vortex-frontend/../../node_modules/.pnpm/zustand@5.0.1_@types+react@19.0.12_immer@10.1.1_react@19.0.0_use-sync-external-store@1.4.0_react@19.0.0_/node_modules/zustand/esm/vanilla.mjs"],"sourcesContent":["import { defaults as nrDefaults, getNREUMInitializedAgent } from '../../window/nreum';\nimport { getModeledObject } from './configurable';\nconst model = {\n // preset defaults\n beacon: nrDefaults.beacon,\n errorBeacon: nrDefaults.errorBeacon,\n // others must be populated by user\n licenseKey: undefined,\n applicationID: undefined,\n sa: undefined,\n queueTime: undefined,\n applicationTime: undefined,\n ttGuid: undefined,\n user: undefined,\n account: undefined,\n product: undefined,\n extra: undefined,\n jsAttributes: {},\n userAttributes: undefined,\n atts: undefined,\n transactionName: undefined,\n tNamePlain: undefined\n};\nconst _cache = {};\nexport function isValid(id) {\n try {\n const info = getInfo(id);\n return !!info.licenseKey && !!info.errorBeacon && !!info.applicationID;\n } catch (err) {\n return false;\n }\n}\nexport function getInfo(id) {\n if (!id) throw new Error('All info objects require an agent identifier!');\n if (!_cache[id]) throw new Error(\"Info for \".concat(id, \" was never set\"));\n return _cache[id];\n}\nexport function setInfo(id, obj) {\n if (!id) throw new Error('All info objects require an agent identifier!');\n _cache[id] = getModeledObject(obj, model);\n const agentInst = getNREUMInitializedAgent(id);\n if (agentInst) agentInst.info = _cache[id];\n}","export const isValidSelector = selector => {\n if (!selector || typeof selector !== 'string') return false;\n try {\n document.createDocumentFragment().querySelector(selector);\n } catch {\n return false;\n }\n return true;\n};","import { LOG_LEVELS } from '../../../features/logging/constants';\nimport { isValidSelector } from '../../dom/query-selector';\nimport { DEFAULT_EXPIRES_MS, DEFAULT_INACTIVE_MS } from '../../session/constants';\nimport { warn } from '../../util/console';\nimport { getNREUMInitializedAgent } from '../../window/nreum';\nimport { getModeledObject } from './configurable';\nconst nrMask = '[data-nr-mask]';\nconst model = () => {\n const hiddenState = {\n mask_selector: '*',\n block_selector: '[data-nr-block]',\n mask_input_options: {\n color: false,\n date: false,\n 'datetime-local': false,\n email: false,\n month: false,\n number: false,\n range: false,\n search: false,\n tel: false,\n text: false,\n time: false,\n url: false,\n week: false,\n // unify textarea and select element with text input\n textarea: false,\n select: false,\n password: true // This will be enforced to always be true in the setter\n }\n };\n return {\n ajax: {\n deny_list: undefined,\n block_internal: true,\n enabled: true,\n harvestTimeSeconds: 10,\n autoStart: true\n },\n distributed_tracing: {\n enabled: undefined,\n exclude_newrelic_header: undefined,\n cors_use_newrelic_header: undefined,\n cors_use_tracecontext_headers: undefined,\n allowed_origins: undefined\n },\n feature_flags: [],\n generic_events: {\n enabled: true,\n harvestTimeSeconds: 30,\n autoStart: true\n },\n harvest: {\n tooManyRequestsDelay: 60\n },\n jserrors: {\n enabled: true,\n harvestTimeSeconds: 10,\n autoStart: true\n },\n logging: {\n enabled: true,\n harvestTimeSeconds: 10,\n autoStart: true,\n level: LOG_LEVELS.INFO\n },\n metrics: {\n enabled: true,\n autoStart: true\n },\n obfuscate: undefined,\n page_action: {\n enabled: true\n },\n page_view_event: {\n enabled: true,\n autoStart: true\n },\n page_view_timing: {\n enabled: true,\n harvestTimeSeconds: 30,\n long_task: false,\n autoStart: true\n },\n privacy: {\n cookies_enabled: true\n },\n // *cli - per discussion, default should be true\n proxy: {\n assets: undefined,\n // if this value is set, it will be used to overwrite the webpack asset path used to fetch assets\n beacon: undefined // likewise for the url to which we send analytics\n },\n session: {\n expiresMs: DEFAULT_EXPIRES_MS,\n inactiveMs: DEFAULT_INACTIVE_MS\n },\n session_replay: {\n // feature settings\n autoStart: true,\n enabled: false,\n harvestTimeSeconds: 60,\n preload: false,\n // if true, enables the agent to load rrweb immediately instead of waiting to do so after the window.load event\n sampling_rate: 10,\n // float from 0 - 100\n error_sampling_rate: 100,\n // float from 0 - 100\n collect_fonts: false,\n // serialize fonts for collection without public asset url, this is currently broken in RRWeb -- https://github.com/rrweb-io/rrweb/issues/1304. When fixed, revisit with test cases\n inline_images: false,\n // serialize images for collection without public asset url -- right now this is only useful for testing as it easily generates payloads too large to be harvested\n inline_stylesheet: true,\n // serialize css for collection without public asset url\n fix_stylesheets: true,\n // fetch missing stylesheet resources for inlining, only works if 'inline_stylesheet' is also true\n // recording config settings\n mask_all_inputs: true,\n // this has a getter/setter to facilitate validation of the selectors\n get mask_text_selector() {\n return hiddenState.mask_selector;\n },\n set mask_text_selector(val) {\n if (isValidSelector(val)) hiddenState.mask_selector = \"\".concat(val, \",\").concat(nrMask);else if (val === '' || val === null) hiddenState.mask_selector = nrMask;else warn(5, val);\n },\n // these properties only have getters because they are enforcable constants and should error if someone tries to override them\n get block_class() {\n return 'nr-block';\n },\n get ignore_class() {\n return 'nr-ignore';\n },\n get mask_text_class() {\n return 'nr-mask';\n },\n // props with a getter and setter are used to extend enforcable constants with customer input\n // we must preserve data-nr-block no matter what else the customer sets\n get block_selector() {\n return hiddenState.block_selector;\n },\n set block_selector(val) {\n if (isValidSelector(val)) hiddenState.block_selector += \",\".concat(val);else if (val !== '') warn(6, val);\n },\n // password: must always be present and true no matter what customer sets\n get mask_input_options() {\n return hiddenState.mask_input_options;\n },\n set mask_input_options(val) {\n if (val && typeof val === 'object') hiddenState.mask_input_options = {\n ...val,\n password: true\n };else warn(7, val);\n }\n },\n session_trace: {\n enabled: true,\n harvestTimeSeconds: 10,\n autoStart: true\n },\n soft_navigations: {\n enabled: true,\n harvestTimeSeconds: 10,\n autoStart: true\n },\n spa: {\n enabled: true,\n harvestTimeSeconds: 10,\n autoStart: true\n },\n ssl: undefined\n };\n};\nconst _cache = {};\nconst missingAgentIdError = 'All configuration objects require an agent identifier!';\nexport function getConfiguration(id) {\n if (!id) throw new Error(missingAgentIdError);\n if (!_cache[id]) throw new Error(\"Configuration for \".concat(id, \" was never set\"));\n return _cache[id];\n}\nexport function setConfiguration(id, obj) {\n if (!id) throw new Error(missingAgentIdError);\n _cache[id] = getModeledObject(obj, model());\n const agentInst = getNREUMInitializedAgent(id);\n if (agentInst) agentInst.init = _cache[id];\n}\nexport function getConfigurationValue(id, path) {\n if (!id) throw new Error(missingAgentIdError);\n var val = getConfiguration(id);\n if (val) {\n var parts = path.split('.');\n for (var i = 0; i < parts.length - 1; i++) {\n val = val[parts[i]];\n if (typeof val !== 'object') return;\n }\n val = val[parts[parts.length - 1]];\n }\n return val;\n}\n\n// TO DO: a setConfigurationValue equivalent may be nice so individual\n// properties can be tuned instead of reseting the whole model per call to `setConfiguration(agentIdentifier, {})`","import { getNREUMInitializedAgent } from '../../window/nreum';\nimport { getModeledObject } from './configurable';\nconst model = {\n accountID: undefined,\n trustKey: undefined,\n agentID: undefined,\n licenseKey: undefined,\n applicationID: undefined,\n xpid: undefined\n};\nconst _cache = {};\nexport function getLoaderConfig(id) {\n if (!id) throw new Error('All loader-config objects require an agent identifier!');\n if (!_cache[id]) throw new Error(\"LoaderConfig for \".concat(id, \" was never set\"));\n return _cache[id];\n}\nexport function setLoaderConfig(id, obj) {\n if (!id) throw new Error('All loader-config objects require an agent identifier!');\n _cache[id] = getModeledObject(obj, model);\n const agentInst = getNREUMInitializedAgent(id);\n if (agentInst) agentInst.loader_config = _cache[id];\n}","import { gosNREUMOriginals } from '../../window/nreum';\nexport const originals = gosNREUMOriginals().o;","import { getModeledObject } from './configurable';\nimport { getNREUMInitializedAgent } from '../../window/nreum';\nimport { globalScope, originTime } from '../../constants/runtime';\nimport { BUILD_ENV, DIST_METHOD, VERSION } from \"../../constants/env.npm\";\nconst readonly = {\n buildEnv: BUILD_ENV,\n distMethod: DIST_METHOD,\n version: VERSION,\n originTime\n};\nconst model = {\n customTransaction: undefined,\n disabled: false,\n isolatedBacklog: false,\n loaderType: undefined,\n maxBytes: 30000,\n onerror: undefined,\n origin: '' + globalScope.location,\n ptid: undefined,\n releaseIds: {},\n /** Agent-specific metadata found in the RUM call response. ex. entityGuid */\n appMetadata: {},\n session: undefined,\n denyList: undefined,\n harvestCount: 0,\n timeKeeper: undefined\n};\nconst _cache = {};\nexport function getRuntime(id) {\n if (!id) throw new Error('All runtime objects require an agent identifier!');\n if (!_cache[id]) throw new Error(\"Runtime for \".concat(id, \" was never set\"));\n return _cache[id];\n}\nexport function setRuntime(id, obj) {\n if (!id) throw new Error('All runtime objects require an agent identifier!');\n _cache[id] = {\n ...getModeledObject(obj, model),\n ...readonly\n };\n const agentInst = getNREUMInitializedAgent(id);\n if (agentInst) agentInst.runtime = _cache[id];\n}","import { getInfo, isValid, setInfo } from './state/info';\nimport { getConfiguration, getConfigurationValue, setConfiguration } from './state/init';\nimport { getLoaderConfig, setLoaderConfig } from './state/loader-config';\nimport { originals } from './state/originals';\nimport { getRuntime, setRuntime } from './state/runtime';\nfunction isConfigured(agentIdentifier) {\n return isValid(agentIdentifier);\n}\n\n// This module acts as a hub that bundles the static and dynamic properties used by each agent instance into one single interface\nexport { getInfo, setInfo, getConfiguration, getConfigurationValue, setConfiguration, getLoaderConfig, setLoaderConfig, originals, getRuntime, setRuntime, isConfigured };","import { warn } from '../../util/console';\nexport function getModeledObject(obj, model) {\n try {\n if (!obj || typeof obj !== 'object') return warn(3);\n if (!model || typeof model !== 'object') return warn(4);\n // allow getters and setters to pass from model to target\n const output = Object.create(Object.getPrototypeOf(model), Object.getOwnPropertyDescriptors(model));\n const target = Object.keys(output).length === 0 ? obj : output;\n for (let key in target) {\n if (obj[key] === undefined) continue;\n try {\n if (obj[key] === null) {\n output[key] = null;\n continue;\n }\n if (Array.isArray(obj[key]) && Array.isArray(model[key])) output[key] = Array.from(new Set([...obj[key], ...model[key]]));else if (typeof obj[key] === 'object' && typeof model[key] === 'object') output[key] = getModeledObject(obj[key], model[key]);else output[key] = obj[key];\n } catch (e) {\n warn(1, e);\n }\n }\n return output;\n } catch (err) {\n warn(2, err);\n }\n}","/**\n * @file This file exposes NPM build environment variables. These variables will\n * be overridden with babel.\n */\n\n/**\n * Exposes the version of the agent\n */\nexport const VERSION = \"1.264.0\";\n\n/**\n * Exposes the build type of the agent\n * Valid values are LOCAL, PROD, DEV\n */\nexport const BUILD_ENV = 'NPM';\n\n/**\n * Exposes the distribution method of the agent\n * Valid valuse are CDN, NPM\n */\nexport const DIST_METHOD = 'NPM';\n\n/**\n * Exposes the lib version of rrweb\n */\nexport const RRWEB_VERSION = \"2.0.0-alpha.12\";","/**\n * @file Contains constants about the environment the agent is running\n * within. These values are derived at the time the agent is first loaded.\n * @copyright 2023 New Relic Corporation. All rights reserved.\n * @license Apache-2.0\n */\n\nimport { now } from '../timing/now';\n\n/**\n * Indicates if the agent is running within a normal browser window context.\n */\nexport const isBrowserScope = typeof window !== 'undefined' && !!window.document;\n\n/**\n * Indicates if the agent is running within a worker context.\n */\nexport const isWorkerScope = typeof WorkerGlobalScope !== 'undefined' && (typeof self !== 'undefined' && self instanceof WorkerGlobalScope && self.navigator instanceof WorkerNavigator || typeof globalThis !== 'undefined' && globalThis instanceof WorkerGlobalScope && globalThis.navigator instanceof WorkerNavigator);\nexport const globalScope = isBrowserScope ? window : typeof WorkerGlobalScope !== 'undefined' && (typeof self !== 'undefined' && self instanceof WorkerGlobalScope && self || typeof globalThis !== 'undefined' && globalThis instanceof WorkerGlobalScope && globalThis);\nexport const loadedAsDeferredBrowserScript = globalScope?.document?.readyState === 'complete';\nexport const initiallyHidden = Boolean(globalScope?.document?.visibilityState === 'hidden');\nexport const initialLocation = '' + globalScope?.location;\nexport const isiOS = /iPad|iPhone|iPod/.test(globalScope.navigator?.userAgent);\n\n/**\n * Shared Web Workers introduced in iOS 16.0+ and n/a in 15.6-\n *\n * It was discovered in Safari 14 (https://bugs.webkit.org/show_bug.cgi?id=225305) that the buffered flag in PerformanceObserver\n * did not work. This affects our onFCP metric in particular since web-vitals uses that flag to retrieve paint timing entries.\n * This was fixed in v16+.\n */\nexport const iOSBelow16 = isiOS && typeof SharedWorker === 'undefined';\nexport const ffVersion = (() => {\n const match = globalScope.navigator?.userAgent?.match(/Firefox[/\\s](\\d+\\.\\d+)/);\n if (Array.isArray(match) && match.length >= 2) {\n return +match[1];\n }\n return 0;\n})();\nexport const supportsSendBeacon = !!globalScope.navigator?.sendBeacon;\n\n/**\n * Represents the absolute timestamp in milliseconds that the page was loaded\n * according to the browser's local clock.\n * @type {number}\n */\nexport const originTime = Date.now() - now();","import { warn } from '../util/console';\nconst model = {\n agentIdentifier: '',\n ee: undefined\n};\nexport class SharedContext {\n constructor(context) {\n try {\n if (typeof context !== 'object') return warn(8);\n this.sharedContext = {};\n Object.assign(this.sharedContext, model);\n Object.entries(context).forEach(_ref => {\n let [key, value] = _ref;\n if (Object.keys(model).includes(key)) this.sharedContext[key] = value;\n });\n } catch (err) {\n warn(9, err);\n }\n }\n}","/** An array of filter objects {hostname, pathname} for identifying XHR events to be excluded from collection.\n * @see {@link https://docs.newrelic.com/docs/browser/new-relic-browser/configuration/filter-ajax-request-events/ Filter AjaxRequest events}\n * @type {Array.<{hostname: string, pathname: string}>}\n */\nvar denyList = [];\n\n/**\n * Evaluates whether an XHR event should be included for collection based on the {@link denyList|AjaxRequest deny list}.\n * @param {Object} params - object with properties of the XHR event\n * @returns {boolean} `true` if request does not match any entries of {@link denyList|deny list}; else `false`\n */\nexport function shouldCollectEvent(params) {\n if (!params || hasUndefinedHostname(params)) return false;\n if (denyList.length === 0) return true;\n for (var i = 0; i < denyList.length; i++) {\n var parsed = denyList[i];\n if (parsed.hostname === '*') {\n return false;\n }\n if (domainMatchesPattern(parsed.hostname, params.hostname) && comparePath(parsed.pathname, params.pathname)) {\n return false;\n }\n }\n return true;\n}\nexport function hasUndefinedHostname(params) {\n return params.hostname === undefined; // requests with an undefined hostname (e.g., data URLs) should not be collected.\n}\n\n/**\n * Initializes the {@link denyList|XHR deny list} by extracting hostname and pathname from an array of filter strings.\n * @param {string[]} denyListConfig - array of URL filters to identify XHR requests to be excluded from collection\n */\nexport function setDenyList(denyListConfig) {\n denyList = [];\n if (!denyListConfig || !denyListConfig.length) {\n return;\n }\n for (var i = 0; i < denyListConfig.length; i++) {\n let url = denyListConfig[i];\n if (!url) continue; // ignore bad values like undefined or empty strings\n\n if (url.indexOf('http://') === 0) {\n url = url.substring(7);\n } else if (url.indexOf('https://') === 0) {\n url = url.substring(8);\n }\n const firstSlash = url.indexOf('/');\n let host, pathname;\n if (firstSlash > 0) {\n host = url.substring(0, firstSlash);\n pathname = url.substring(firstSlash);\n } else {\n host = url;\n pathname = '';\n }\n let [hostname] = host.split(':');\n denyList.push({\n hostname,\n pathname\n });\n }\n}\n/**\n * Returns true if the right side of `domain` (end of string) matches `pattern`.\n * @param {string} pattern - a string to be matched against the end of `domain` string\n * @param {string} domain - a domain string with no protocol or path (e.g., app1.example.com)\n * @returns {boolean} `true` if domain matches pattern; else `false`\n */\nfunction domainMatchesPattern(pattern, domain) {\n if (pattern.length > domain.length) {\n return false;\n }\n return domain.indexOf(pattern) === domain.length - pattern.length;\n}\n\n/**\n * Returns true if a URL path matches a pattern string, disregarding leading slashes.\n * @param {string} pattern - a string to compare with path (e.g., api/v1)\n * @param {string} path - a string representing a URL path (e.g., /api/v1)\n * @returns {boolean} `true` if path and pattern are an exact string match (except for leading slashes); else `false`\n */\nfunction comparePath(pattern, path) {\n if (pattern.indexOf('/') === 0) {\n pattern = pattern.substring(1);\n }\n if (path.indexOf('/') === 0) {\n path = path.substring(1);\n }\n\n // No path in pattern means match all paths.\n if (pattern === '') {\n return true;\n }\n return pattern === path;\n}","/*\n * Copyright 2020 New Relic Corporation. All rights reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { ee } from '../event-emitter/contextual-ee';\nimport { registerHandler as defaultRegister } from '../event-emitter/register-handler';\nimport { featurePriority } from '../../loaders/features/features';\nconst registry = {};\n\n/**\n * Adds an entry to the centralized drain registry specifying that a particular agent has events of a particular named\n * event-group \"bucket\" that should be drained at the time the agent drains all its buffered events. Buffered events\n * accumulate because instrumentation begins as soon as possible, before the agent has finished lazy-loading the code\n * responsible for aggregating and reporting captured data.\n * @param {string} agentIdentifier - A 16 character string uniquely identifying the agent.\n * @param {string} group - The named \"bucket\" for the events this feature will be bucketing for later collection.\n */\nexport function registerDrain(agentIdentifier, group) {\n // Here `item` captures the registered properties of a feature-group: whether it is ready for its buffered events\n // to be drained (`staged`) and the `priority` order in which it should be drained relative to other feature groups.\n const item = {\n staged: false,\n priority: featurePriority[group] || 0\n };\n curateRegistry(agentIdentifier);\n if (!registry[agentIdentifier].get(group)) registry[agentIdentifier].set(group, item);\n}\n\n/**\n * Removes an item from the registry and immediately re-checks if the registry is ready to \"drain all\"\n * @param {*} agentIdentifier - A 16 character string uniquely identifying the agent.\n * @param {*} group - The named \"bucket\" to be removed from the registry\n */\nexport function deregisterDrain(agentIdentifier, group) {\n if (!agentIdentifier || !registry[agentIdentifier]) return;\n if (registry[agentIdentifier].get(group)) registry[agentIdentifier].delete(group);\n drainGroup(agentIdentifier, group, false);\n if (registry[agentIdentifier].size) checkCanDrainAll(agentIdentifier);\n}\n\n/**\n * Registers the specified agent with the centralized event buffer registry if it is not already registered.\n * Agents without an identifier (as in the case of some tests) will be excluded from the registry.\n * @param {string} agentIdentifier - A 16 character string uniquely identifying an agent.\n */\nfunction curateRegistry(agentIdentifier) {\n if (!agentIdentifier) throw new Error('agentIdentifier required');\n if (!registry[agentIdentifier]) registry[agentIdentifier] = new Map();\n}\n\n/**\n * Drain buffered events out of the event emitter. Each feature should have its events bucketed by \"group\" and drain\n * its own named group explicitly, when ready.\n * @param {string} agentIdentifier - A unique 16 character ID corresponding to an instantiated agent.\n * @param {string} featureName - A named group into which the feature's buffered events are bucketed.\n * @param {boolean} force - Whether to force the drain to occur immediately, bypassing the registry and staging logic.\n */\nexport function drain() {\n let agentIdentifier = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n let featureName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'feature';\n let force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n curateRegistry(agentIdentifier);\n // If the feature for the specified agent is not in the registry, that means the instrument file was bypassed.\n // This could happen in tests, or loaders that directly import the aggregator. In these cases it is safe to\n // drain the feature group immediately rather than waiting to drain all at once.\n if (!agentIdentifier || !registry[agentIdentifier].get(featureName) || force) return drainGroup(agentIdentifier, featureName);\n\n // When `drain` is called, this feature is ready to drain (staged).\n registry[agentIdentifier].get(featureName).staged = true;\n checkCanDrainAll(agentIdentifier);\n}\n\n/** Checks all items in the registry to see if they have been \"staged\". If ALL items are staged, it will drain all registry items (drainGroup). It not, nothing will happen */\nfunction checkCanDrainAll(agentIdentifier) {\n // Only when the event-groups for all features are ready to drain (staged) do we execute the drain. This has the effect\n // that the last feature to call drain triggers drain for all features.\n const items = Array.from(registry[agentIdentifier]);\n if (items.every(_ref => {\n let [key, values] = _ref;\n return values.staged;\n })) {\n items.sort((a, b) => a[1].priority - b[1].priority);\n items.forEach(_ref2 => {\n let [group] = _ref2;\n registry[agentIdentifier].delete(group);\n drainGroup(agentIdentifier, group);\n });\n }\n}\n\n/**\n * Drains all the buffered (backlog) events for a particular feature's event-group by emitting each event to each of\n * the subscribed handlers for the group.\n * @param {*} group - The name of a particular feature's event \"bucket\".\n */\nfunction drainGroup(agentIdentifier, group) {\n let activateGroup = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n const baseEE = agentIdentifier ? ee.get(agentIdentifier) : ee;\n const handlers = defaultRegister.handlers; // other storage in registerHandler\n if (baseEE.aborted || !baseEE.backlog || !handlers) return;\n\n // Only activated features being drained should run queued listeners on buffered events. Deactivated features only need to release memory.\n if (activateGroup) {\n const bufferedEventsInGroup = baseEE.backlog[group];\n const groupHandlers = handlers[group]; // each group in the registerHandler storage\n if (groupHandlers) {\n // We don't cache the length of the buffer while looping because events might still be added while processing.\n for (let i = 0; bufferedEventsInGroup && i < bufferedEventsInGroup.length; ++i) {\n // eslint-disable-line no-unmodified-loop-condition\n emitEvent(bufferedEventsInGroup[i], groupHandlers);\n }\n Object.entries(groupHandlers).forEach(_ref3 => {\n let [eventType, handlerRegistrationList] = _ref3;\n Object.values(handlerRegistrationList || {}).forEach(registration => {\n // registration is an array of: [targetEE, eventHandler]\n registration[0].on(eventType, registration[1]);\n });\n });\n }\n }\n if (!baseEE.isolatedBacklog) delete handlers[group];\n baseEE.backlog[group] = null;\n baseEE.emit('drain-' + group, []); // TODO: Code exists purely for a unit test and needs to be refined\n}\n\n/**\n * Processes the specified event using all relevant handler functions associated with a particular feature, based on\n * whether the the handler is meant to apply to events of this type. (Event type is a descriptive string set at the\n * time an event is originally created by instrumentation, as with calls to the `handle` method.)\n * @param {*} evt - A single event to be emitted to (processed by) eligible handler functions.\n * @param {*} groupHandlers - A set of handler functions associated with a particular feature's event-group.\n */\nfunction emitEvent(evt, groupHandlers) {\n var type = evt[1];\n Object.values(groupHandlers[type] || {}).forEach(registration => {\n var sourceEE = evt[0];\n var ee = registration[0];\n if (ee === sourceEE) {\n var handler = registration[1];\n var ctx = evt[3];\n var args = evt[2];\n handler.apply(ctx, args);\n }\n });\n}","/*\n * Copyright 2020 New Relic Corporation. All rights reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { gosNREUM } from '../window/nreum';\nimport { getOrSet } from '../util/get-or-set';\nimport { getRuntime } from '../config/config';\nimport { EventContext } from './event-context';\nimport { bundleId } from '../ids/bundle-id';\n\n// create a unique id to store event context data for the current agent bundle\nconst contextId = \"nr@context:\".concat(bundleId);\n// create global emitter instance that can be shared among bundles\nconst globalInstance = ee(undefined, 'globalEE');\n\n// Only override the exposed event emitter if one has not already been exposed\nconst nr = gosNREUM();\nif (!nr.ee) {\n nr.ee = globalInstance;\n}\nexport { globalInstance as ee, contextId };\nfunction ee(old, debugId) {\n var handlers = {};\n var bufferGroupMap = {};\n var emitters = {};\n // In cases where multiple agents can run on a page, the event backlogs of feature event emitters must be isolated\n // to prevent event emitter context and buffers from \"bubbling up\" to other agents operating in the scope.\n // An example of this is our MicroAgent loader package, which sets this property to true to prevent overlap.\n var isolatedBacklog = false;\n try {\n // We only want to check the runtime configuration for `isolatedBacklog` if the event emitter belongs to a feature.\n // For feature event emitters, the debugId will be an agentIdentifier with a length of 16. In contrast, some of our\n // tests do not namespace the event emitter with an agentID and just use the parent (which has no ID).\n isolatedBacklog = debugId.length !== 16 ? false : getRuntime(debugId).isolatedBacklog;\n } catch (err) {\n // Do nothing for now.\n }\n var emitter = {\n on: addEventListener,\n addEventListener,\n removeEventListener,\n emit,\n get: getOrCreate,\n listeners,\n context,\n buffer: bufferEventsByGroup,\n abort,\n isBuffering,\n debugId,\n backlog: isolatedBacklog ? {} : old && typeof old.backlog === 'object' ? old.backlog : {},\n isolatedBacklog\n };\n function abort() {\n emitter._aborted = true;\n Object.keys(emitter.backlog).forEach(key => {\n delete emitter.backlog[key];\n });\n }\n Object.defineProperty(emitter, 'aborted', {\n get: () => {\n let aborted = emitter._aborted || false;\n if (aborted) return aborted;else if (old) {\n aborted = old.aborted;\n }\n return aborted;\n }\n });\n return emitter;\n function context(contextOrStore) {\n if (contextOrStore && contextOrStore instanceof EventContext) {\n return contextOrStore;\n } else if (contextOrStore) {\n return getOrSet(contextOrStore, contextId, () => new EventContext(contextId));\n } else {\n return new EventContext(contextId);\n }\n }\n function emit(type, args, contextOrStore, force, bubble) {\n if (bubble !== false) bubble = true;\n if (globalInstance.aborted && !force) {\n return;\n }\n if (old && bubble) old.emit(type, args, contextOrStore);\n var ctx = context(contextOrStore);\n var handlersArray = listeners(type);\n var len = handlersArray.length;\n\n // Apply each handler function in the order they were added\n // to the context with the arguments\n\n for (var i = 0; i < len; i++) handlersArray[i].apply(ctx, args);\n\n // Buffer after emitting for consistent ordering\n var bufferGroup = getBuffer()[bufferGroupMap[type]];\n if (bufferGroup) {\n bufferGroup.push([emitter, type, args, ctx]);\n }\n\n // Return the context so that the module that emitted can see what was done.\n return ctx;\n }\n function addEventListener(type, fn) {\n // Retrieve type from handlers, if it doesn't exist assign the default and retrieve it.\n handlers[type] = listeners(type).concat(fn);\n }\n function removeEventListener(type, fn) {\n var listeners = handlers[type];\n if (!listeners) return;\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i] === fn) {\n listeners.splice(i, 1);\n }\n }\n }\n function listeners(type) {\n return handlers[type] || [];\n }\n function getOrCreate(name) {\n return emitters[name] = emitters[name] || ee(emitter, name);\n }\n function bufferEventsByGroup(types, group) {\n const eventBuffer = getBuffer();\n group = group || 'feature';\n\n // do not buffer events if agent has been aborted\n if (emitter.aborted) return;\n Object.entries(types || {}).forEach(_ref => {\n let [_, type] = _ref;\n bufferGroupMap[type] = group;\n if (!(group in eventBuffer)) {\n eventBuffer[group] = [];\n }\n });\n }\n function isBuffering(type) {\n var bufferGroup = getBuffer()[bufferGroupMap[type]];\n return !!bufferGroup;\n }\n\n // buffer is associated with a base emitter, since there are two\n // (global and scoped to the current bundle), it is now part of the emitter\n function getBuffer() {\n return emitter.backlog;\n }\n}","export class EventContext {\n constructor(contextId) {\n this.contextId = contextId;\n }\n}","/*\n * Copyright 2020 New Relic Corporation. All rights reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { ee as globalInstance } from './contextual-ee';\nexport var handleEE = globalInstance.get('handle');\nexport function handle(type, args, ctx, group, ee) {\n if (ee) {\n ee.buffer([type], group);\n ee.emit(type, args, ctx);\n } else {\n handleEE.buffer([type], group);\n handleEE.emit(type, args, ctx);\n }\n}","/*\n * Copyright 2020 New Relic Corporation. All rights reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { handleEE } from './handle';\nexport { defaultRegister as registerHandler };\ndefaultRegister.on = registerWithSpecificEmitter;\nvar handlers = defaultRegister.handlers = {};\nexport function defaultRegister(type, handler, group, ee) {\n registerWithSpecificEmitter(ee || handleEE, handlers, type, handler, group);\n}\nfunction registerWithSpecificEmitter(ee, handlers, type, handler, group) {\n if (!group) group = 'feature';\n if (!ee) ee = handleEE;\n var groupHandlers = handlers[group] = handlers[group] || {};\n var list = groupHandlers[type] = groupHandlers[type] || [];\n list.push([ee, handler]);\n}","import { globalScope } from '../constants/runtime';\n\n/*\n * See https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#safely_detecting_option_support\n */\nlet passiveSupported = false;\nlet signalSupported = false;\ntry {\n const options = {\n get passive() {\n // this function will be called when the browser attempts to access the passive property\n passiveSupported = true;\n return false;\n },\n get signal() {\n signalSupported = true;\n return false;\n }\n };\n globalScope.addEventListener('test', null, options);\n globalScope.removeEventListener('test', null, options);\n} catch (err) {}\nexport function eventListenerOpts(useCapture, abortSignal) {\n return passiveSupported || signalSupported ? {\n capture: !!useCapture,\n passive: passiveSupported,\n // passive defaults to false\n signal: abortSignal\n } : !!useCapture; // mainly just IE11 doesn't support third param options under EventTarget API\n}\n\n/** Do not use this within the worker context. */\nexport function windowAddEventListener(event, listener) {\n let capture = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n let abortSignal = arguments.length > 3 ? arguments[3] : undefined;\n window.addEventListener(event, listener, eventListenerOpts(capture, abortSignal));\n}\n/** Do not use this within the worker context. */\nexport function documentAddEventListener(event, listener) {\n let capture = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n let abortSignal = arguments.length > 3 ? arguments[3] : undefined;\n document.addEventListener(event, listener, eventListenerOpts(capture, abortSignal));\n}","/**\n * @file Contains a unique identifier for the running agent bundle\n * when loaded.\n * @copyright 2023 New Relic Corporation. All rights reserved.\n * @license Apache-2.0\n */\n\nimport { generateUuid } from './unique-id';\n\n/**\n * Provides a unique id for the current agent bundle\n */\nexport const bundleId = generateUuid();","/*\n * Copyright 2020 New Relic Corporation. All rights reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { globalScope } from '../constants/runtime';\nconst uuidv4Template = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';\n\n/**\n * Creates a random single hexadecimal value from a provided random value\n * table and corresponding index. If a random value table is not provided,\n * Math.random will be used to generate the value.\n *\n * @param {Uint8Array} valueTable Random value table typically generated using\n * the built-in crypto engine.\n * @param {int} tableIndex The index of the value table to use for generating\n * the hexadecimal value.\n * @returns {int} single hexadecimal value in decimal format\n */\nfunction getRandomValue(valueTable, tableIndex) {\n if (valueTable) {\n /**\n * The value table could have any number value in the given index. Use\n * bitwise AND to ensure the value we generate is a valid hex value.\n * x & 15 will ensure the value converted to hex using `toString(16)`\n * falls within the range of 0 and 15 inclusively.\n */\n return valueTable[tableIndex] & 15;\n } else {\n return Math.random() * 16 | 0;\n }\n}\n\n/**\n * Generates a RFC compliant UUIDv4 using native browser crypto engine. If the browser\n * does not support the crypto engine, the function will fallback to insecure Math.random()\n * @returns {string} uuid version 4 string\n */\nexport function generateUuid() {\n const crypto = globalScope?.crypto || globalScope?.msCrypto;\n let randomValueTable;\n let randomValueIndex = 0;\n if (crypto && crypto.getRandomValues) {\n // For a UUID, we only need 30 characters since two characters are pre-defined\n // eslint-disable-next-line\n randomValueTable = crypto.getRandomValues(new Uint8Array(30));\n }\n return uuidv4Template.split('').map(templateInput => {\n if (templateInput === 'x') {\n return getRandomValue(randomValueTable, randomValueIndex++).toString(16);\n } else if (templateInput === 'y') {\n // this is the uuid variant per spec (8, 9, a, b)\n // % 4, then shift to get values 8-11\n return (getRandomValue() & 0x3 | 0x8).toString(16);\n } else {\n return templateInput;\n }\n }).join('');\n}\n\n/**\n * Generates a string of the given length containing only hexadecimal\n * value 0-9 and a-f.\n * @param {int} length length of the string to generate\n * @returns {string} generated hex string\n */\nexport function generateRandomHexString(length) {\n const crypto = globalScope?.crypto || globalScope?.msCrypto;\n let randomValueTable;\n let randomValueIndex = 0;\n if (crypto && crypto.getRandomValues) {\n // eslint-disable-next-line\n randomValueTable = crypto.getRandomValues(new Uint8Array(length));\n }\n const chars = [];\n for (var i = 0; i < length; i++) {\n chars.push(getRandomValue(randomValueTable, randomValueIndex++).toString(16));\n }\n return chars.join('');\n}\n\n/**\n * Generates a 16 character length hexadecimal string.\n * per DT-spec.\n * @see generateRandomHexString\n * @returns {string} generated hex string\n */\nexport function generateSpanId() {\n return generateRandomHexString(16);\n}\n\n/**\n * Generates a 32 character length hexadecimal string.\n * per DT-spec.\n * @see generateRandomHexString\n * @returns {string} generated hex string\n */\nexport function generateTraceId() {\n return generateRandomHexString(32);\n}","export const PREFIX = 'NRBA';\nexport const DEFAULT_KEY = 'SESSION';\nexport const DEFAULT_EXPIRES_MS = 14400000;\nexport const DEFAULT_INACTIVE_MS = 1800000;\nexport const SESSION_EVENTS = {\n STARTED: 'session-started',\n PAUSE: 'session-pause',\n RESET: 'session-reset',\n RESUME: 'session-resume',\n UPDATE: 'session-update'\n};\nexport const SESSION_EVENT_TYPES = {\n SAME_TAB: 'same-tab',\n CROSS_TAB: 'cross-tab'\n};\nexport const MODE = {\n OFF: 0,\n FULL: 1,\n ERROR: 2\n};","/*\n * Copyright 2020 New Relic Corporation. All rights reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// This is our own layer around performance.now. It's not strictly necessary, but we keep it in case of future mod-ing of the value for refactor purpose.\nexport function now() {\n return Math.floor(performance.now());\n}","/*\n * Copyright 2020 New Relic Corporation. All rights reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { globalScope } from '../constants/runtime';\nexport function parseUrl(url) {\n // Return if URL is a data URL, parseUrl assumes urls are http/https\n if ((url || '').indexOf('data:') === 0) {\n return {\n protocol: 'data'\n };\n }\n try {\n const parsedUrl = new URL(url, location.href);\n const returnVal = {\n port: parsedUrl.port,\n hostname: parsedUrl.hostname,\n pathname: parsedUrl.pathname,\n search: parsedUrl.search,\n protocol: parsedUrl.protocol.slice(0, parsedUrl.protocol.indexOf(':')),\n sameOrigin: parsedUrl.protocol === globalScope?.location?.protocol && parsedUrl.host === globalScope?.location?.host\n };\n if (!returnVal.port || returnVal.port === '') {\n if (parsedUrl.protocol === 'http:') returnVal.port = '80';\n if (parsedUrl.protocol === 'https:') returnVal.port = '443';\n }\n if (!returnVal.pathname || returnVal.pathname === '') {\n returnVal.pathname = '/';\n } else if (!returnVal.pathname.startsWith('/')) {\n returnVal.pathname = \"/\".concat(returnVal.pathname);\n }\n return returnVal;\n } catch (err) {\n return {};\n }\n}","/**\n * A helper method to warn to the console with New Relic: decoration\n * @param {string} message The primary message to warn\n * @param {*} [secondary] Secondary data to include, usually an error or object\n * @returns\n */\nexport function warn(code, secondary) {\n if (typeof console.debug !== 'function') return;\n console.debug(\"New Relic Warning: https://github.com/newrelic/newrelic-browser-agent/blob/main/docs/warning-codes.md#\".concat(code), secondary);\n}","/*\n * Copyright 2020 New Relic Corporation. All rights reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { ee } from '../event-emitter/contextual-ee';\nimport { dispatchGlobalEvent } from '../dispatch/global-event';\nconst sentIds = new Set();\n\n/** A map of feature flags and their values as provided by the rum call -- scoped by agent ID */\nexport const activatedFeatures = {};\n\n/**\n * Sets the activatedFeatures object, dispatches the global loaded event,\n * and emits the rumresp flag to features\n * @param {{[key:string]:number}} flags key-val pair of flag names and numeric\n * @param {string} agentIdentifier agent instance identifier\n * @returns {void}\n */\nexport function activateFeatures(flags, agentIdentifier) {\n const sharedEE = ee.get(agentIdentifier);\n activatedFeatures[agentIdentifier] ??= {};\n if (!(flags && typeof flags === 'object')) return;\n if (sentIds.has(agentIdentifier)) return;\n sharedEE.emit('rumresp', [flags]);\n activatedFeatures[agentIdentifier] = flags;\n sentIds.add(agentIdentifier);\n\n // let any window level subscribers know that the agent is running\n dispatchGlobalEvent({\n loaded: true\n });\n}","import { globalScope } from '../constants/runtime';\nconst GLOBAL_EVENT_NAMESPACE = 'newrelic';\nexport function dispatchGlobalEvent() {\n let detail = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n try {\n globalScope.dispatchEvent(new CustomEvent(GLOBAL_EVENT_NAMESPACE, {\n detail\n }));\n } catch (err) {\n // something happened... dispatchEvent or CustomEvent might not be supported\n // decide what to do about it here\n }\n}","/*\n * Copyright 2020 New Relic Corporation. All rights reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nvar has = Object.prototype.hasOwnProperty;\n\n/**\n * Always returns the current value of obj[prop], even if it has to set it first. Sets properties as non-enumerable if possible.\n *\n * @param {Object} obj - The object to get or set the property on.\n * @param {string} prop - The name of the property.\n * @param {Function} getVal - A function that returns the value to be set if the property does not exist.\n * @returns {*} The value of the property in the object.\n */\nexport function getOrSet(obj, prop, getVal) {\n // If the value exists return it.\n if (has.call(obj, prop)) return obj[prop];\n var val = getVal();\n\n // Attempt to set the property so it's not enumerable\n if (Object.defineProperty && Object.keys) {\n try {\n Object.defineProperty(obj, prop, {\n value: val,\n // old IE inherits non-write-ability\n writable: true,\n enumerable: false\n });\n return val;\n } catch (e) {\n // Can't report internal errors,\n // because GOS is a dependency of the reporting mechanisms\n }\n }\n\n // fall back to setting normally\n obj[prop] = val;\n return val;\n}","/**\n * Reduce the invocation of the supplied function so that it is only invoked\n * once within a given timeout.\n *\n * If `wait` is `0`, the function will be invoked during the next tick.\n * If `options.leading` is false or not provided, the function will be invoked\n * N milliseconds after the last invocation of the returned function where\n * N is the `timeout` value.\n * If `options.leading` is true, the function will be invoked immediately upon\n * the first invocation of the returned function and not again for N milliseconds\n * where N is the `timeout` value.\n * @param {function} func Function whose invocation should be limited so it is only invoked\n * once within a given timeout period.\n * @param {number} timeout Time in milliseconds that the function should only be invoked\n * once within.\n * @param {object} options Debounce options\n * @param {boolean} options.leading Forces the function to be invoked on the first\n * invocation of the returned function instead of N milliseconds after the last\n * invocation.\n * @returns {function} A wrapping function that will ensure the provided function\n * is invoked only once within the given timeout.\n */\nexport function debounce(func) {\n var _this = this;\n let timeout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;\n let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n const leading = options?.leading || false;\n let timer;\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (leading && timer === undefined) {\n func.apply(_this, args);\n timer = setTimeout(() => {\n timer = clearTimeout(timer);\n }, timeout);\n }\n if (!leading) {\n clearTimeout(timer);\n timer = setTimeout(() => {\n func.apply(_this, args);\n }, timeout);\n }\n };\n}\n\n/**\n * Reduce the invocation of the supplied function so that it is only invoked\n * once.\n * @param {function} func Function whose invocation should be limited so it is only invoked\n * once.\n * @returns {function} A wrapping function that will ensure the provided function\n * is invoked only once.\n */\nexport function single(func) {\n var _this2 = this;\n let called = false;\n return function () {\n if (!called) {\n called = true;\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n func.apply(_this2, args);\n }\n };\n}","/*\n * Copyright 2020 New Relic Corporation. All rights reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { ee } from '../event-emitter/contextual-ee';\n\n/**\n * Returns a function for use as a replacer parameter in JSON.stringify() to handle circular references.\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cyclic_object_value MDN - Cyclical object value}\n * @returns {Function} A function that filters out values it has seen before.\n */\nconst getCircularReplacer = () => {\n const seen = new WeakSet();\n return (key, value) => {\n if (typeof value === 'object' && value !== null) {\n if (seen.has(value)) {\n return;\n }\n seen.add(value);\n }\n return value;\n };\n};\n\n/**\n * The native JSON.stringify method augmented with a replacer function to handle circular references.\n * Circular references will be excluded from the JSON output rather than triggering errors.\n * @param {*} val - A value to be converted to a JSON string.\n * @returns {string} A JSON string representation of the value, with circular references handled.\n */\nexport function stringify(val) {\n try {\n return JSON.stringify(val, getCircularReplacer());\n } catch (e) {\n try {\n ee.emit('internal-error', [e]);\n } catch (err) {\n // do nothing\n }\n }\n}","import { windowAddEventListener, documentAddEventListener } from '../event-listener/event-listener-opts';\nexport function checkState() {\n return typeof document === 'undefined' || document.readyState === 'complete';\n}\nexport function onWindowLoad(cb, useCapture) {\n if (checkState()) return cb();\n windowAddEventListener('load', cb, useCapture);\n}\nexport function onDOMContentLoaded(cb) {\n if (checkState()) return cb();\n documentAddEventListener('DOMContentLoaded', cb);\n}","import { globalScope } from '../constants/runtime';\nimport { now } from '../timing/now';\nexport const defaults = {\n beacon: 'bam.nr-data.net',\n errorBeacon: 'bam.nr-data.net'\n};\nexport function gosNREUM() {\n if (!globalScope.NREUM) {\n globalScope.NREUM = {};\n }\n if (typeof globalScope.newrelic === 'undefined') globalScope.newrelic = globalScope.NREUM;\n return globalScope.NREUM;\n}\nexport function gosNREUMInfo() {\n let nr = gosNREUM();\n const externallySupplied = nr.info || {};\n nr.info = {\n beacon: defaults.beacon,\n errorBeacon: defaults.errorBeacon,\n ...externallySupplied\n };\n return nr;\n}\nexport function gosNREUMLoaderConfig() {\n let nr = gosNREUM();\n const externallySupplied = nr.loader_config || {};\n nr.loader_config = {\n ...externallySupplied\n };\n return nr;\n}\nexport function gosNREUMInit() {\n let nr = gosNREUM();\n const externallySupplied = nr.init || {};\n nr.init = {\n ...externallySupplied\n };\n return nr;\n}\nexport function gosNREUMOriginals() {\n let nr = gosNREUM();\n if (!nr.o) {\n nr.o = {\n ST: globalScope.setTimeout,\n SI: globalScope.setImmediate,\n CT: globalScope.clearTimeout,\n XHR: globalScope.XMLHttpRequest,\n REQ: globalScope.Request,\n EV: globalScope.Event,\n PR: globalScope.Promise,\n MO: globalScope.MutationObserver,\n // this'll be undefined if not in a web window\n FETCH: globalScope.fetch\n };\n }\n return nr;\n}\nexport function setNREUMInitializedAgent(id, newAgentInstance) {\n let nr = gosNREUM();\n nr.initializedAgents ??= {};\n newAgentInstance.initializedAt = {\n ms: now(),\n date: new Date()\n };\n nr.initializedAgents[id] = newAgentInstance;\n}\n\n/**\n * Get the agent instance under the associated identifier on the global newrelic object.\n * @see setNREUMInitializedAgents\n * @returns Existing agent instance under newrelic.initializedAgent[id], or undefined if it does not exist.\n */\nexport function getNREUMInitializedAgent(id) {\n let nr = gosNREUM();\n return nr.initializedAgents?.[id];\n}\nexport function addToNREUM(fnName, fn) {\n let nr = gosNREUM();\n nr[fnName] = fn;\n}\nexport function NREUMinitialized() {\n const nr = gosNREUM();\n nr.initialized = true;\n}\nexport function gosCDN() {\n gosNREUMInfo();\n gosNREUMInit();\n gosNREUMOriginals();\n gosNREUMLoaderConfig();\n return gosNREUM();\n}","/*\n * Copyright 2020 New Relic Corporation. All rights reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { documentAddEventListener } from '../event-listener/event-listener-opts';\n\n/**\n * @param {function} cb - called when a visibility change occurs with the vis state at that time\n * @param {boolean} [toHiddenOnly=false] - only execute the 'cb' when the vis is changing to the hidden state; no arg is passed to 'cb' if used\n * @returns void\n */\nexport function subscribeToVisibilityChange(cb) {\n let toHiddenOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let capture = arguments.length > 2 ? arguments[2] : undefined;\n let abortSignal = arguments.length > 3 ? arguments[3] : undefined;\n documentAddEventListener('visibilitychange', handleVisibilityChange, capture, abortSignal);\n function handleVisibilityChange() {\n if (toHiddenOnly) {\n // trigger cb on change to hidden state only\n if (document.visibilityState === 'hidden') cb();\n return;\n }\n cb(document.visibilityState);\n }\n}","/*\n * Copyright 2020 New Relic Corporation. All rights reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * @file Wraps `addEventListener` and `removeEventListener` for instrumentation.\n * This module is used directly by: session_trace.\n * It is also called by -> wrapXhr <-, so see \"wrap-xhr.js\" for features that use this indirectly.\n */\nimport { ee as baseEE, contextId } from '../event-emitter/contextual-ee';\nimport { createWrapperWithEmitter as wfn } from './wrap-function';\nimport { getOrSet } from '../util/get-or-set';\nimport { globalScope, isBrowserScope } from '../constants/runtime';\nconst wrapped = {};\nconst XHR = globalScope.XMLHttpRequest;\nconst ADD_EVENT_LISTENER = 'addEventListener';\nconst REMOVE_EVENT_LISTENER = 'removeEventListener';\nconst flag = \"nr@wrapped:\".concat(contextId);\n\n/**\n * Wraps `addEventListener` and `removeEventListener` on: global scope; the prototype of `XMLHttpRequest`, and\n * `document` (if in a browser scope). Adds custom events in context of a new emitter scoped only to these methods.\n * @param {Object} sharedEE - The shared event emitter on which a new scoped\n * event emitter will be based.\n * @returns {Object} Scoped event emitter with a debug ID of `events`.\n */\nexport function wrapEvents(sharedEE) {\n var ee = scopedEE(sharedEE);\n\n // Notice if our wrapping never ran yet, the falsy NaN will not early return; but if it has,\n // then we increment the count to track # of feats using this at runtime.\n if (wrapped[ee.debugId]++) return ee;\n wrapped[ee.debugId] = 1; // otherwise, first feature to wrap events\n var wrapFn = wfn(ee, true);\n\n // Guard against instrumenting environments w/o necessary features\n if ('getPrototypeOf' in Object) {\n if (isBrowserScope) findEventListenerProtoAndCb(document, wrapNode);\n findEventListenerProtoAndCb(globalScope, wrapNode);\n findEventListenerProtoAndCb(XHR.prototype, wrapNode);\n }\n ee.on(ADD_EVENT_LISTENER + '-start', function (args, target) {\n var originalListener = args[1];\n if (originalListener === null || typeof originalListener !== 'function' && typeof originalListener !== 'object') {\n return;\n }\n var wrapped = getOrSet(originalListener, flag, function () {\n var listener = {\n object: wrapHandleEvent,\n function: originalListener\n }[typeof originalListener];\n return listener ? wrapFn(listener, 'fn-', null, listener.name || 'anonymous') : originalListener;\n function wrapHandleEvent() {\n if (typeof originalListener.handleEvent !== 'function') return;\n return originalListener.handleEvent.apply(originalListener, arguments);\n }\n });\n this.wrapped = args[1] = wrapped;\n });\n ee.on(REMOVE_EVENT_LISTENER + '-start', function (args) {\n args[1] = this.wrapped || args[1];\n });\n function wrapNode(node) {\n wrapFn.inPlace(node, [ADD_EVENT_LISTENER, REMOVE_EVENT_LISTENER], '-', uniqueListener);\n }\n function uniqueListener(args, obj) {\n // Context for the listener is stored on itself.\n return args[1];\n }\n return ee;\n}\n/**\n * Find the base prototype of 'object' that has its own \"addEventListener\" property, and run some function on it.\n * @param {Object} object - the initial object to traverse prototype chain on\n * @param {Function} cb - the function to run on the ancestral object once found, accepts an object as a arg\n * @param {Array} rest - [optional] any additional arguments to pass to the cb\n */\nfunction findEventListenerProtoAndCb(object, cb) {\n let step = object;\n while (typeof step === 'object' && !Object.prototype.hasOwnProperty.call(step, ADD_EVENT_LISTENER)) {\n step = Object.getPrototypeOf(step);\n }\n for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n rest[_key - 2] = arguments[_key];\n }\n if (step) cb(step, ...rest);\n}\n\n/**\n * Returns an event emitter scoped specifically for the `events` context. This scoping is a remnant from when all the\n * features shared the same group in the event, to isolate events between features. It will likely be revisited.\n * @param {Object} sharedEE - Optional event emitter on which to base the scoped emitter.\n * Uses `ee` on the global scope if undefined).\n * @returns {Object} Scoped event emitter with a debug ID of 'events'.\n */\nexport function scopedEE(sharedEE) {\n return (sharedEE || baseEE).get('events');\n}","/*\n * Copyright 2020 New Relic Corporation. All rights reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * @file Wraps `fetch` and related methods for instrumentation.\n * This module is used by: ajax, spa.\n */\nimport { ee as baseEE, contextId } from '../event-emitter/contextual-ee';\nimport { globalScope } from '../constants/runtime';\nvar prefix = 'fetch-';\nvar bodyPrefix = prefix + 'body-';\nvar bodyMethods = ['arrayBuffer', 'blob', 'json', 'text', 'formData'];\nvar Req = globalScope.Request;\nvar Res = globalScope.Response;\nvar proto = 'prototype';\nconst wrapped = {};\n\n/**\n * Wraps the `fetch` method of the global scope for instrumentation. Also wraps the prototypes of the async methods\n * that parse Request and Response bodies to generate start and end events for each, in context of a new event\n * emitter scoped only to fetch and related methods.\n * @param {Object} sharedEE - The shared event emitter on which a new scoped\n * event emitter will be based.\n * @returns {Object} Scoped event emitter with a debug ID of `fetch`.\n */\nexport function wrapFetch(sharedEE) {\n const ee = scopedEE(sharedEE);\n if (!(Req && Res && globalScope.fetch)) {\n return ee;\n }\n\n // Notice if our wrapping never ran yet, the falsy NaN will not early return; but if it has,\n // then we increment the count to track # of feats using this at runtime.\n if (wrapped[ee.debugId]++) return ee;\n wrapped[ee.debugId] = 1; // otherwise, first feature to wrap fetch\n\n bodyMethods.forEach(method => {\n wrapPromiseMethod(Req[proto], method, bodyPrefix);\n wrapPromiseMethod(Res[proto], method, bodyPrefix);\n });\n wrapPromiseMethod(globalScope, 'fetch', prefix);\n ee.on(prefix + 'end', function (err, res) {\n var ctx = this;\n if (res) {\n var size = res.headers.get('content-length');\n if (size !== null) {\n ctx.rxSize = size;\n }\n ee.emit(prefix + 'done', [null, res], ctx);\n } else {\n ee.emit(prefix + 'done', [err], ctx);\n }\n });\n\n /**\n * Wraps a Promise-returning function (referenced by `target[name]`) to emit custom events before and after\n * execution, each decorated with metadata (arguments, payloads, errors). Used to wrap the async body\n * parsing methods of Request and Response (e.g. `json`, `text`, `formData`).\n * @param {Object} target - The object having the method to be wrapped.\n * @param {string} name - The name of the method to wrap.\n * @param {string} prefix - Used to decorate event names with context.\n */\n function wrapPromiseMethod(target, name, prefix) {\n var fn = target[name];\n if (typeof fn === 'function') {\n target[name] = function () {\n var args = [...arguments];\n var ctx = {};\n // we are wrapping args in an array so we can preserve the reference\n ee.emit(prefix + 'before-start', [args], ctx);\n var dtPayload;\n if (ctx[contextId] && ctx[contextId].dt) dtPayload = ctx[contextId].dt;\n var origPromiseFromFetch = fn.apply(this, args);\n ee.emit(prefix + 'start', [args, dtPayload], origPromiseFromFetch);\n\n // Note we need to cast the returned (orig) Promise from native APIs into the current global Promise, which may or may not be our WrappedPromise.\n return origPromiseFromFetch.then(function (val) {\n ee.emit(prefix + 'end', [null, val], origPromiseFromFetch);\n return val;\n }, function (err) {\n ee.emit(prefix + 'end', [err], origPromiseFromFetch);\n throw err;\n });\n };\n }\n }\n return ee;\n}\n\n/**\n * Returns an event emitter scoped specifically for the `fetch` context. This scoping is a remnant from when all the\n * features shared the same group in the event, to isolate events between features. It will likely be revisited.\n * @param {Object} sharedEE - Optional event emitter on which to base the scoped emitter.\n * Uses `ee` on the global scope if undefined).\n * @returns {Object} Scoped event emitter with a debug ID of 'fetch'.\n */\nexport function scopedEE(sharedEE) {\n return (sharedEE || baseEE).get('fetch');\n}","/*\n * Copyright 2020 New Relic Corporation. All rights reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * @file Wraps `pushState` and `replaceState` methods of `window.history` object for instrumentation.\n * This module is used by: session_trace, spa.\n */\nimport { ee as globalEE } from '../event-emitter/contextual-ee';\nimport { createWrapperWithEmitter as wfn } from './wrap-function';\nimport { isBrowserScope } from '../constants/runtime';\nconst wrapped = {};\nconst HISTORY_FNS = ['pushState', 'replaceState'];\n\n/**\n * Wraps the `pushState` and `replaceState` methods of `window.history` and returns a corresponding event emitter\n * scoped to the history object.\n * @param {Object} sharedEE - The shared event emitter on which a new scoped event emitter will be based.\n * @returns {Object} Scoped event emitter with a debug ID of `history`.\n */\nexport function wrapHistory(sharedEE) {\n const ee = scopedEE(sharedEE);\n\n // Notice if our wrapping never ran yet, the falsy NaN will not early return; but if it has,\n // then we increment the count to track # of feats using this at runtime. History API is only\n // available in browser DOM context.\n if (!isBrowserScope || wrapped[ee.debugId]++) return ee;\n wrapped[ee.debugId] = 1; // otherwise, first feature to wrap history\n\n var wrapFn = wfn(ee);\n /*\n * For objects that will be instantiated more than once, we wrap the object's prototype methods. The history object\n * is instantiated only once, so we can wrap its methods directly--and we must wrap the history methods directly as\n * long as [Chromium issue 783382](https://bugs.chromium.org/p/chromium/issues/detail?id=783382) remains unresolved.\n */\n wrapFn.inPlace(window.history, HISTORY_FNS, '-');\n return ee;\n}\n\n/**\n * Returns an event emitter scoped specifically for the `history` context. This scoping is a remnant from when all the\n * features shared the same group in the event, to isolate events between features. It will likely be revisited.\n * @param {Object} sharedEE - Optional event emitter on which to base the scoped emitter.\n * Uses `ee` on the global scope if undefined).\n * @returns {Object} Scoped event emitter with a debug ID of 'history'.\n */\nexport function scopedEE(sharedEE) {\n return (sharedEE || globalEE).get('history');\n}","/*\n * Copyright 2020 New Relic Corporation. All rights reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * @file Wraps DOM insertion methods which in turn wrap JSONP functions that show up in the DOM.\n * This module is used by: spa.\n */\n\nimport { eventListenerOpts } from '../event-listener/event-listener-opts';\nimport { ee as baseEE } from '../event-emitter/contextual-ee';\nimport { createWrapperWithEmitter as wfn } from './wrap-function';\nimport { isBrowserScope } from '../constants/runtime';\nconst wrapped = {};\nconst domInsertMethods = ['appendChild', 'insertBefore', 'replaceChild'];\n\n/**\n * Wraps DOM insertion methods to identify script elements containing JSONP callback functions and instruments those\n * functions with custom events in the context of a new event emitter scoped only to JSONP.\n * @param {Object} sharedEE - The shared event emitter on which a new scoped event emitter will be based.\n * @returns {Object} Scoped event emitter with a debug ID of `jsonp`.\n */\nexport function wrapJsonP(sharedEE) {\n const ee = scopedEE(sharedEE);\n\n // Notice if our wrapping never ran yet, the falsy NaN will not early return; but if it has,\n // then we increment the count to track # of feats using this at runtime. JSONP deals with DOM\n // tags so browser window env is required.\n if (!isBrowserScope || wrapped[ee.debugId]) return ee;\n wrapped[ee.debugId] = true; // otherwise, first feature to wrap JSONP\n\n var wrapFn = wfn(ee);\n var CALLBACK_REGEX = /[?&](?:callback|cb)=([^&#]+)/;\n var PARENT_REGEX = /(.*)\\.([^.]+)/;\n var VALUE_REGEX = /^(\\w+)(\\.|$)(.*)$/;\n\n // JSONP works by dynamically inserting