{"version":3,"file":"main-KYK5DV5J.js","sources":["packages/vanilla/lib/shared/header/header-search.service.ts","packages/global-search/productstub-lib/src/entrypoints/sticky-entry.component.html","packages/global-search/productstub-lib/src/entrypoints/sticky-entry.component.ts","packages/global-search/productstub-lib/src/entrypoints/entrypoints.module.ts","packages/global-search/productstub-lib/src/config/client-config.ts","packages/global-search/productstub-lib/src/context/service.ts","packages/global-search/productstub-lib/src/shared/content/index-loader.service.ts","packages/global-search/productstub-lib/src/shared/indexing/index-loader-registration.service.ts","packages/global-search/productstub-lib/src/shared/webanalytics/trackingservice.ts","packages/global-search/productstub-lib/src/shared/bootstrapping/bootstrap.service.ts","packages/global-search/productstub-lib/src/global-search.module.ts","packages/casino/app/src/globalsearch/globalsearchservice.ts","packages/casino/app/src/shared/services/globalsearch-bootstrap.service.ts","packages/casino/app/src/shared/services/tagmanager-renderer.service.ts","packages/casino/app/src/bootstrap/casino-bootstrap.service.ts","packages/casino/app/src/publicPagesWrapper/publicPages.guard.ts","node_modules/ngx-lottie/fesm2022/ngx-lottie.mjs","packages/vanilla/lib/features/launch-darkly/src/launch-darkly.client-config.ts","node_modules/launchdarkly-js-client-sdk/dist/ldclient.es.js","packages/vanilla/lib/features/launch-darkly/src/launch-darkly.service.ts","packages/vanilla/lib/features/launch-darkly/src/launch-darkly-bootstrap.service.ts","packages/vanilla/lib/features/launch-darkly/src/launch-darkly.feature.ts","packages/casino/app/src/mod-casino/teaser-section/teaser-launch-darkly.model.ts","packages/casino/app/src/mod-casino/teaser-section/teaser-section.component.html","packages/casino/app/src/mod-casino/teaser-section/teaser-section.component.ts","packages/vanilla/lib/features/svg/src/svg.component.ts","packages/vanilla/lib/features/svg/src/svg.component.html","packages/vanilla/lib/shared/image/image.html","packages/vanilla/lib/shared/image/image.component.ts","packages/vanilla/lib/shared/badge/src/badge.client-config.ts","packages/vanilla/lib/features/menus/src/menu-item-badge.directive.ts","packages/vanilla/lib/shared/auth/src/authstate.directive.ts","packages/vanilla/lib/shared/tooltips/src/tooltips.client-config.ts","packages/vanilla/lib/shared/tooltips/src/tooltips.service.ts","packages/vanilla/lib/shared/tooltips/src/tooltips.html","packages/vanilla/lib/shared/tooltips/src/tooltips.component.ts","packages/vanilla/lib/features/menus/src/menu-item-click-handler.service.ts","packages/vanilla/lib/features/menus/src/menu-item-text-content.html","packages/vanilla/lib/features/menus/src/menu-item-text-content.component.ts","packages/vanilla/lib/features/menus/src/menu-item.html","packages/vanilla/lib/features/menus/src/menu-item.component.ts","packages/vanilla/lib/shared/account-menu/account-menu-onboarding.service.ts","packages/vanilla/lib/shared/account-menu/account-menu.client-config.ts","packages/vanilla/lib/shared/account-menu/account-menu-data.service.ts","packages/vanilla/lib/shared/account-menu/account-menu.models.ts","packages/vanilla/lib/shared/account-menu/account-menu-tasks.service.ts","packages/vanilla/lib/shared/account-menu/account-menu-router.ts","packages/vanilla/lib/shared/account-menu/account-menu.html","packages/vanilla/lib/shared/account-menu/account-menu.component.ts","packages/vanilla/lib/shared/overlay-factory/src/overlay-factory.models.ts","packages/vanilla/lib/shared/overlay-factory/src/overlay.factory.ts","packages/vanilla/lib/shared/login/src/workflow.service.ts","packages/vanilla/lib/shared/login/src/login.client-config.ts","packages/vanilla/lib/shared/login/src/login.service.ts","packages/vanilla/lib/features/header-bar/src/header-bar.client-config.ts","packages/vanilla/lib/features/header-bar/src/header-bar.service.ts","packages/vanilla/lib/features/header-bar/src/header-bar-bootstrap.service.ts","packages/vanilla/lib/features/header-bar/src/header-bar.feature.ts","packages/vanilla/lib/shared/confirm-popup/src/confirm-popup.client-config.ts","packages/vanilla/lib/shared/confirm-popup/src/confirm-popup.html","packages/vanilla/lib/shared/confirm-popup/src/confirm-popup.component.ts","packages/vanilla/lib/shared/confirm-popup/src/confirm-popup.service.ts","packages/vanilla/lib/features/header-bar/src/header-bar.models.ts","packages/vanilla/lib/features/header-bar/src/header-bar.html","packages/vanilla/lib/features/header-bar/src/header-bar.component.ts","packages/vanilla/lib/features/header-bar/src/lh-header-bar.component.ts","packages/vanilla/lib/features/header-bar/src/header-bar.component.html","packages/vanilla/lib/features/content/src/page-matrix.service.ts","packages/vanilla/lib/features/content/src/page-matrix.directive.ts","packages/vanilla/lib/features/content/src/pc-component.ts","packages/vanilla/lib/features/content/src/pc-scrollmenu.directive.ts","packages/vanilla/lib/features/content/src/pm-component.ts","packages/vanilla/lib/features/content/src/profiles.directive.ts","packages/vanilla/lib/features/content/src/components-v2/pc-component-header.html","packages/vanilla/lib/features/content/src/components-v2/pc-component-header.component.ts","packages/vanilla/lib/features/content/src/components-v2/pc-menu-item.html","packages/vanilla/lib/features/content/src/components-v2/pc-menu-item.component.ts","packages/vanilla/lib/features/content/src/components-v2/pm-1col-page.html","packages/vanilla/lib/features/content/src/components-v2/pc-text.html","packages/vanilla/lib/features/content/src/components-v2/pc-text-with-header-bar.html","packages/vanilla/lib/features/content/src/components-v2/pc-header-for-mpp-page.html","packages/vanilla/lib/features/content/src/components-v2/pc-toggle.html","packages/vanilla/lib/features/content/src/components-v2/pc-image.html","packages/vanilla/lib/features/content/src/components-v2/pc-image-text.html","packages/vanilla/lib/features/content/src/components-v2/pc-video.html","packages/vanilla/lib/features/content/src/components-v2/pc-teaser.html","packages/vanilla/lib/features/content/src/components-v2/pc-container.html","packages/vanilla/lib/features/content/src/components-v2/pc-component-folder.html","packages/vanilla/lib/features/content/src/components-v2/pc-menu.html","packages/vanilla/lib/features/content/src/components-v2/pc-regional-component.html","packages/vanilla/lib/features/content/src/components-v2/pc-raw-image.html","packages/vanilla/lib/features/content/src/components-v2/pc-carousel.html","packages/vanilla/lib/features/content/src/components-v2/pc-scrollmenu.html","packages/vanilla/lib/features/content/src/components-v2/pc.components.ts","packages/vanilla/lib/features/content/src/components-v2/pc-raw-text.html","packages/vanilla/lib/features/content/src/content-filter.component.ts","packages/vanilla/lib/features/content/src/page-matrix-bootstrap.service.ts","packages/vanilla/lib/features/content/src/content.feature.ts","packages/vanilla/lib/features/content/src/page-matrix.component.ts","packages/casino/platform-lib/gaming-stories/shared/model/story.model.ts","packages/casino/platform-lib/gaming-stories/shared/services/user-action.service.ts","packages/casino/platform-lib/gaming-stories/instagram-story-progress-bar/instagram-story-progress-bar.component.html","packages/casino/platform-lib/gaming-stories/instagram-story-progress-bar/instagram-story-progress-bar.component.ts","packages/casino/platform-lib/gaming-stories/instagram-story-modal/instagram-story-modal.component.html","packages/casino/platform-lib/gaming-stories/instagram-story-modal/instagram-story-modal.component.ts","packages/casino/platform-lib/gaming-stories/gaming-stories-api/gaming-stories-api.service.ts","packages/casino/platform-lib/gaming-stories/promo-optin-button/promo-optin-button.component.html","packages/casino/platform-lib/gaming-stories/promo-optin-button/promo-optin-button.component.ts","packages/casino/platform-lib/gaming-stories/insta-story-imagery-item/insta-story-imagery-item.component.html","packages/casino/platform-lib/gaming-stories/insta-story-imagery-item/insta-story-imagery-item.component.ts","packages/casino/platform-lib/gaming-stories/insta-story-imagery-item/insta-story-imagery-item-bootstrap.service.ts","packages/casino/platform-lib/gaming-stories/promo-optin-insta-storyitem/promo-optin-insta-storyitem.component.html","packages/casino/platform-lib/gaming-stories/promo-optin-insta-storyitem/promo-optin-insta-storyitem.component.ts","packages/casino/platform-lib/gaming-stories/promo-optin-insta-storyitem/promo-optin-insta-story-item-bootstrap.service.ts","packages/casino/platform-lib/gaming-stories/on-app-init/on-app-init.handler.ts","packages/casino/platform-lib/gaming-stories/instagram-promo-image/instagram-promo-image.component.ts","packages/casino/platform-lib/gaming-stories/instagram-promo-image/instagram-promo-image.component.html","packages/casino/platform-lib/gaming-stories/shared/model/insta-promo-local-storage.model.ts","packages/casino/platform-lib/gaming-stories/instagram-story-container/instagram-story-container.component.ts","packages/casino/platform-lib/gaming-stories/instagram-story-container/instagram-story-container.component.html","packages/casino/platform-lib/gaming-stories/shared/model/insta-promo.model.ts","packages/casino/platform-lib/gaming-stories/instagram-data/instagram-data.component.html","packages/casino/platform-lib/gaming-stories/instagram-data/instagram-data.component.ts","packages/casino/platform-lib/gaming-stories/instagram-source/instagram-source.component.html","packages/casino/platform-lib/gaming-stories/instagram-source/instagram-source.component.ts","packages/casino/app/src/mod-casino/arcade-navigation-section/arcade-navigation-section.component.html","packages/casino/app/src/mod-casino/arcade-navigation-section/arcade-navigation-section.component.ts","packages/casino/app/src/mod-casino/casino-games-section/casino-games-section.component.ts","packages/casino/app/src/mod-casino/casino-games-section/casino-games-section.component.html","packages/casino/app/src/mod-casino/dynamic-player-title/dynamic-player-title.component.html","packages/casino/app/src/mod-casino/dynamic-player-title/dynamic-player-title.component.ts","packages/casino/app/src/mod-casino/games-nav-section/games-nav-section.component.ts","packages/casino/app/src/mod-casino/games-nav-section/games-nav-section.component.html","packages/casino/app/src/mod-casino/games-sub-nav-section/games-sub-nav-section.component.ts","packages/casino/app/src/mod-casino/games-sub-nav-section/games-sub-nav-section.component.html","packages/casino/app/src/mod-casino/gaming-stories-wrapper/gaming-stories-loader.service.ts","packages/casino/app/src/mod-casino/gaming-stories-wrapper/gaming-stories-loader.directive.ts","packages/casino/app/src/mod-casino/instagram-section/instagram-section.component.html","packages/casino/app/src/mod-casino/instagram-section/instagram-section.component.ts","packages/casino/app/src/lazy-routes.ts","packages/casino/app/src/lazy-master/lazy-route.service.ts","packages/casino/app/src/mod-casino/lazy-placeholder/lazy-placeholder.component.ts","packages/casino/app/src/mod-casino/lazy-placeholder/lazy-placeholder.component.html","packages/casino/app/src/mod-casino/nav-section/nav-section.component.ts","packages/casino/app/src/mod-casino/nav-section/nav-section.component.html","packages/casino/app/src/mod-casino/sub-nav-section/sub-nav-section.component.ts","packages/casino/app/src/mod-casino/sub-nav-section/sub-nav-section.component.html","packages/casino/app/src/mod-casino/widgets/widgets.component.ts","packages/vanilla/lib/features/home-page/src/home-page.component.ts","packages/vanilla/lib/features/home-page/src/home-page.html","packages/vanilla/lib/features/home-page/src/home-page.client-config.ts","packages/casino/app/src/immersive-lobby-skeleton/lottie-loading/lottie-loading.component.ts","packages/casino/app/src/immersive-lobby-skeleton/lottie-loading/lottie-loading.component.html","packages/casino/app/src/immersive-lobby-skeleton/immersive-lobby-skeleton.component.html","packages/casino/app/src/immersive-lobby-skeleton/immersive-lobby-skeleton.component.ts","packages/casino/app/src/skeleton/skeleton.component.html","packages/casino/app/src/skeleton/skeleton.component.ts","packages/casino/app/src/mod-casino/coin-economy-animation/coin-economy-animation.component.html","packages/casino/app/src/mod-casino/coin-economy-animation/coin-economy-animation.component.ts","packages/casino/app/src/mod-casino/full-takeover-background/full-takeover-background.component.html","packages/casino/app/src/mod-casino/full-takeover-background/full-takeover-background.component.ts","packages/casino/app/src/mod-casino/widget-composition/widget-composition.component.ts","packages/casino/app/src/mod-casino/widget-composition/widget-composition.component.html","packages/casino/app/src/mod-casino/widget-container/widget-container.component.html","packages/casino/app/src/mod-casino/widget-container/widget-container.component.ts","packages/casino/app/src/mod-casino/lobby-container/lobby-container.component.html","packages/casino/app/src/mod-casino/lobby-container/lobby-container.component.ts","packages/casino/app/src/home-lobby-mod/home-lobby-mod.component.html","packages/casino/app/src/home-lobby-mod/home-lobby-mod.component.ts","packages/casino/platform-lib/src/lib/recentlyPlayedandGYMLWrapper/recentlyPlayed-gyml-wrapper.component.html","packages/casino/platform-lib/src/lib/recentlyPlayedandGYMLWrapper/recentlyPlayed-gyml-wrapper.component.ts","node_modules/@angular/cdk/fesm2022/observers/private.mjs","node_modules/@angular/material/fesm2022/form-field.mjs","node_modules/@angular/cdk/fesm2022/table.mjs","node_modules/@angular/material/fesm2022/table.mjs","node_modules/@angular/material/fesm2022/button.mjs","node_modules/@rx-angular/template/fesm2022/template-for.mjs","packages/vanilla/lib/features/header/src/navigation-pill/navigation-pill.service.ts","packages/vanilla/lib/features/header/src/header.client-config.ts","packages/vanilla/lib/shared/menu-item/src/menu-item-highlight.service.ts","packages/vanilla/lib/features/header/src/header.service.ts","packages/vanilla/lib/features/content-messages/src/content-messages-tracking.service.ts","packages/vanilla/lib/features/content-messages/src/content-message.html","packages/vanilla/lib/features/content-messages/src/content-message.component.ts","packages/vanilla/lib/features/content-messages/src/close-message.component.ts","packages/vanilla/lib/features/content-messages/src/content-messages-bootstrap.service.ts","packages/vanilla/lib/features/content-messages/src/content-messages.feature.ts","packages/vanilla/lib/features/content-messages/src/content-messages.service.ts","packages/vanilla/lib/features/content-messages/src/content-messages.html","packages/vanilla/lib/features/content-messages/src/content-messages.component.ts","packages/vanilla/lib/shared/kyc/src/kyc-status.service.ts","packages/vanilla/lib/features/header/src/avatar-menu-counters-provider.ts","packages/vanilla/lib/features/header/src/header-component-map.ts","packages/vanilla/lib/features/header/src/header-messages.service.ts","packages/vanilla/lib/features/header/src/header-messages/header-messages.html","packages/vanilla/lib/features/header/src/header-messages/header-messages.component.ts","packages/vanilla/lib/features/header/src/header-section/header-section.component.ts","packages/vanilla/lib/features/header/src/header.html","packages/vanilla/lib/features/header/src/header.component.ts","packages/vanilla/lib/features/header/src/header-bootstrap.service.ts","packages/vanilla/lib/features/header/src/header.feature.ts","node_modules/lottie-web/build/player/lottie.js","node_modules/@angular/platform-browser/fesm2022/animations/async.mjs","packages/loaders-lib/src/loader-styles.service.ts","packages/loaders-lib/src/module.service.ts","packages/loaders-lib/src/loaders.client-config.ts","packages/loaders-lib/src/loaders.models.ts","packages/loaders-lib/src/loader.service.ts","packages/loaders-lib/src/loaders-bootstrap.service.ts","packages/loaders-lib/src/loaders-map.ts","packages/loaders-lib/src/loaders.feature.ts","packages/loaders-lib/routes/vanilla-lazy-routes.ts","packages/casino/app/src/home-lobby-mod/casino-home-page.gaurd.ts","packages/casino/app/src/app.routes.ts","packages/casino/app/src/provide.ts","packages/casino/app/src/casino-menu/casino-menu-actions-bootstrap.service.ts","packages/vanilla/lib/shared/product-activation/src/product-activator.service.ts","packages/casino/app/src/host-app/host-app-bootstrapper.service.ts","node_modules/@angular/material/fesm2022/select.mjs","node_modules/@angular/material/fesm2022/tooltip.mjs","node_modules/@angular/material/fesm2022/paginator.mjs","packages/casino/app/src/poker-leaderboard-feed/poker-leaderboard-feed.component.html","packages/casino/app/src/poker-leaderboard-feed/poker-leaderboard-feed.component.ts","packages/casino/app/src/poker-leaderboard-feed/poker-leaderboard-feed-bootstrap.service.ts","packages/casino/app/src/main.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\nimport { Observable, Subject } from 'rxjs';\n\n/** @stable */\n@Injectable({\n providedIn: 'root',\n})\nexport class HeaderSearchService {\n private events: Subject = new Subject();\n\n /** Observable of when the header search input is clicked. */\n get clickEvent(): Observable {\n return this.events.pipe();\n }\n\n click() {\n this.events.next();\n }\n}\n","\n","import { Component, ElementRef, NgZone, OnChanges, OnDestroy, OnInit, ViewChild } from '@angular/core';\n\nimport { DeviceService } from '@frontend/vanilla/core';\n\nimport { IGlobalSearchContext } from '../context/search';\nimport { __CONTEXT__, __ENTRY_POINT_ACTIVE__, __FETCH_CONTEXT__, __LAUNCH_SEARCH__, __PRESENTATION_BOOTSTRAPPED__ } from '../events';\n\n@Component({\n selector: 'gs-entry-sticky',\n templateUrl: './sticky-entry.component.html',\n})\nexport class StickyEntryComponent implements OnInit, OnDestroy, OnChanges {\n private searchContext: IGlobalSearchContext | undefined;\n @ViewChild('container') container: ElementRef | undefined;\n @ViewChild('item') item: ElementRef | undefined;\n\n constructor(\n private readonly deviceService: DeviceService,\n // private readonly searchLauncherService: SearchLauncherService,\n private _ngZone: NgZone,\n ) {}\n\n private displayIcon = true;\n private shouldHideFloatingEntry = false;\n private displayImage = false;\n private wrapperClassValue = 'fab-search-wrapper';\n private iconClassValue = 'fab-search-icn theme-search';\n private imageSourceValue = '#';\n\n get isEnabled(): boolean {\n return (\n (this.searchContext &&\n this.searchContext.appContext &&\n this.searchContext.appContext.isEnabled &&\n this.deviceService.isTouch &&\n !this.shouldHideFloatingEntry) ||\n false\n );\n }\n\n ngOnInit() {\n this.setState(this.searchContext);\n this.registerEventHandlers();\n this.raiseIsAppEnabledQuery();\n if (\n this.searchContext &&\n this.searchContext.presentationContext &&\n this.searchContext.presentationContext.configuration &&\n this.searchContext?.presentationContext?.configuration?.DraggableStickyIcon &&\n this.searchContext.presentationContext?.configuration?.DraggableStickyIcon === 'true'\n ) {\n this.draggablestickyicon();\n }\n }\n\n ngOnChanges() {\n this.setState(this.searchContext);\n this.registerEventHandlers();\n this.raiseIsAppEnabledQuery();\n if (\n this.searchContext &&\n this.searchContext.presentationContext &&\n this.searchContext.presentationContext.configuration &&\n this.searchContext?.presentationContext?.configuration?.DraggableStickyIcon &&\n this.searchContext.presentationContext?.configuration?.DraggableStickyIcon === 'true'\n ) {\n this.draggablestickyicon();\n }\n }\n\n ngOnDestroy(): void {\n this.unregisterEventHandlers();\n }\n private readonly registerDraggableStickyIcon = (event: Event): void => {\n if (event) {\n setTimeout(() => {\n if (\n this.searchContext &&\n this.searchContext.presentationContext &&\n this.searchContext.presentationContext.configuration &&\n this.searchContext?.presentationContext?.configuration?.DraggableStickyIcon &&\n this.searchContext?.presentationContext?.configuration?.DraggableStickyIcon === 'true'\n ) {\n this.draggablestickyicon();\n }\n }, 100);\n }\n };\n draggablestickyicon() {\n const dragItem = document.querySelector('#item');\n const container = document.querySelector('#container');\n\n let active = false;\n let currentX: any;\n let currentY: any;\n let initialX: any;\n let initialY: any;\n let xOffset = 0;\n let yOffset = 0;\n if (container) {\n container.addEventListener('touchstart', dragStart, false);\n container.addEventListener('touchend', dragEnd, false);\n container.addEventListener('touchmove', drag, false);\n\n container.addEventListener('mousedown', dragStart, false);\n container.addEventListener('mouseup', dragEnd, false);\n container.addEventListener('mousemove', drag, false);\n }\n function dragStart(e: any) {\n if (e.type === 'touchstart') {\n initialX = e.touches[0].clientX - xOffset;\n initialY = e.touches[0].clientY - yOffset;\n } else {\n initialX = e.clientX - xOffset;\n initialY = e.clientY - yOffset;\n }\n active = true;\n }\n\n function dragEnd(e: any) {\n if (e) {\n initialX = currentX;\n initialY = currentY;\n active = false;\n }\n }\n\n function drag(e: any) {\n if (active) {\n if (e.cancelable) {\n e.preventDefault();\n }\n if (e.type === 'touchmove') {\n currentX = e.touches[0].clientX - initialX;\n currentY = e.touches[0].clientY - initialY;\n if (e.touches[0].clientX >= 66 && e.touches[0].clientX < window.screen.width - 66) {\n if (e.touches[0].clientY >= 66 && e.touches[0].clientY < window.innerHeight - 66) {\n xOffset = currentX;\n yOffset = currentY;\n setTranslate(currentX, currentY, dragItem);\n }\n }\n } else {\n currentX = e.clientX - initialX;\n currentY = e.clientY - initialY;\n if (e.clientX >= 66 && e.clientX < window.screen.width - 66) {\n if (e.clientY > 0 && e.clientY < window.innerHeight - 66) {\n xOffset = currentX;\n yOffset = currentY;\n setTranslate(currentX, currentY, dragItem);\n }\n }\n }\n }\n }\n\n function setTranslate(xPos: any, yPos: any, el: any) {\n if (el) {\n el.style.transform = 'translate3d(' + xPos + 'px, ' + yPos + 'px, 0)';\n }\n }\n }\n\n launchSearch(): void {\n dispatchEvent(new CustomEvent(__LAUNCH_SEARCH__, { detail: { launchChannel: 'mobile', launchedFrom: 'bottom-sticky' } }));\n }\n\n get canDisplayIcon(): boolean {\n return this.displayIcon;\n }\n\n get canDisplayImage(): boolean {\n return this.displayImage;\n }\n\n get wrapperClass(): string {\n return this.wrapperClassValue;\n }\n\n get iconClass(): string {\n return this.iconClassValue;\n }\n\n get imageSource(): string {\n return this.imageSourceValue;\n }\n\n private setState(searchContext?: IGlobalSearchContext) {\n this.wrapperClassValue = this.getWrapperClassFromClientConfig(searchContext);\n\n if (!this.wrapperClassValue) {\n this.wrapperClassValue = 'fab-search-wrapper';\n }\n\n this.iconClassValue = this.getIconClassFromClientConfig(searchContext);\n if (this.iconClassValue) {\n this.displayIcon = true;\n this.displayImage = false;\n } else {\n this.iconClassValue = 'fab-search-icn theme-search';\n this.displayIcon = true;\n this.displayImage = false;\n }\n\n this.imageSourceValue = this.getImageSrcFromClientConfig(searchContext);\n if (this.imageSourceValue) {\n this.displayIcon = false;\n this.displayImage = true;\n }\n this.searchContext = searchContext;\n\n this.shouldHideFloatingEntry = !((searchContext && searchContext.appContext && searchContext.appContext.isEnabled) || false);\n if (!this.shouldHideFloatingEntry) {\n this.shouldHideFloatingEntry = this.shouldHideFloatingEntryPoint(searchContext);\n }\n if (this.isEnabled) {\n dispatchEvent(new CustomEvent(__ENTRY_POINT_ACTIVE__, { detail: { activeFrom: 'bottom-sticky' } }));\n if (\n this.searchContext &&\n this.searchContext.presentationContext &&\n this.searchContext.presentationContext.configuration &&\n this.searchContext?.presentationContext?.configuration?.DraggableStickyIcon &&\n this.searchContext?.presentationContext?.configuration?.DraggableStickyIcon === 'true'\n ) {\n this.draggablestickyicon();\n }\n }\n }\n\n private getWrapperClassFromClientConfig(searchContext?: IGlobalSearchContext): string {\n return (\n searchContext?.presentationContext?.entryPoints?.['sticky']?.parameters['WrapperClass'] ||\n searchContext?.presentationContext?.entryPoints?.['sticky']?.parameters['wrapperClass'] ||\n ''\n );\n }\n\n private getIconClassFromClientConfig(searchContext?: IGlobalSearchContext): string {\n return (\n searchContext?.presentationContext?.entryPoints?.['sticky']?.parameters['IconClass'] ||\n searchContext?.presentationContext?.entryPoints?.['sticky']?.parameters['iconClass'] ||\n ''\n );\n }\n\n private getImageSrcFromClientConfig(searchContext?: IGlobalSearchContext): string {\n return searchContext?.presentationContext?.entryPoints?.['sticky']?.image?.src || '';\n }\n\n private raiseIsAppEnabledQuery() {\n dispatchEvent(new CustomEvent(__FETCH_CONTEXT__));\n }\n\n private readonly hideFloatingEntryEventHandler = (event: Event): void => {\n this.shouldHideFloatingEntry = true;\n if (event && event?.stopImmediatePropagation && typeof event?.stopImmediatePropagation === typeof (() => {})) {\n event?.stopImmediatePropagation();\n }\n };\n\n private readonly showFloatingEntryEventHandler = (event: Event): void => {\n this.shouldHideFloatingEntry =\n this.searchContext?.presentationContext?.configuration?.HideFloatingEntryPoint?.trim()?.toLowerCase() == 'true' ? true : false;\n if (event && event?.stopImmediatePropagation && typeof event?.stopImmediatePropagation === typeof (() => {})) {\n event?.stopImmediatePropagation();\n }\n };\n\n private readonly messageEventHandler = (messageEvent: MessageEvent): void => {\n if (\n messageEvent &&\n messageEvent.data &&\n messageEvent.data.eventIdentifier &&\n typeof messageEvent.data.eventIdentifier === typeof '' &&\n messageEvent.data.eventIdentifier?.trim()\n ) {\n switch (messageEvent.data.eventIdentifier?.trim().toLowerCase()) {\n case 'gs:hidefloatingentry':\n this.hideFloatingEntryEventHandler(messageEvent);\n break;\n case 'gs:showfloatingentry':\n this.showFloatingEntryEventHandler(messageEvent);\n break;\n default:\n break;\n }\n }\n };\n\n private shouldHideFloatingEntryPoint(searchcontext?: IGlobalSearchContext): boolean {\n return searchcontext?.presentationContext?.configuration?.HideFloatingEntryPoint?.trim().toLowerCase() === 'true' || false;\n }\n\n private readonly presentationBootstarppedEventHandler = (messageEvent: CustomEventInit) => {\n if (messageEvent && messageEvent.detail && messageEvent.detail) {\n const searchHost: any = messageEvent.detail;\n // this.isEnabled = searchHost.searchContext.appContext.isEnabled || false;\n this.setState(searchHost.searchContext);\n }\n };\n\n private readonly contextResultEventHandler = (customEvent: CustomEventInit) => {\n if (customEvent && customEvent?.detail) {\n //this.isEnabled = customEvent?.detail?.appContext.isEnabled || false;\n this.setState(customEvent?.detail);\n }\n };\n\n private registerEventHandlers() {\n this._ngZone.runOutsideAngular(() => {\n addEventListener(__ENTRY_POINT_ACTIVE__, this.registerDraggableStickyIcon);\n addEventListener('gs:hideFloatingEntry', this.hideFloatingEntryEventHandler);\n addEventListener('gs:showFloatingEntry', this.showFloatingEntryEventHandler);\n\n addEventListener('gs:classifyFloatingEntry', this.classifyFloatingEntry);\n addEventListener('gs:deClassifyFloatingEntry', this.deClassifyFloatingEntry);\n\n // if (this.globalSearchConfig.legacyMode) {\n // addEventListener(SearchAppLoadedEventIdentifier, this.searchAppLoadedEventHandler);\n // addEventListener(SearchAppQueryResultEventIdentifier, this.searchAppQueryResultHandler);\n // }\n // else {\n addEventListener(__CONTEXT__, this.contextResultEventHandler);\n addEventListener(__PRESENTATION_BOOTSTRAPPED__, this.presentationBootstarppedEventHandler);\n //}\n\n addEventListener('message', this.messageEventHandler);\n });\n }\n\n private unregisterEventHandlers() {\n this._ngZone.runOutsideAngular(() => {\n removeEventListener('gs:hideFloatingEntry', this.hideFloatingEntryEventHandler);\n removeEventListener('gs:showFloatingEntry', this.showFloatingEntryEventHandler);\n\n removeEventListener('gs:classifyFloatingEntry', this.classifyFloatingEntry);\n removeEventListener('gs:deClassifyFloatingEntry', this.deClassifyFloatingEntry);\n\n // if (this.globalSearchConfig.legacyMode) {\n // removeEventListener(SearchAppLoadedEventIdentifier, this.searchAppLoadedEventHandler);\n // removeEventListener(SearchAppQueryResultEventIdentifier, this.contextResultEventHandler);\n // }\n // else {\n removeEventListener(__CONTEXT__, this.contextResultEventHandler);\n removeEventListener(__PRESENTATION_BOOTSTRAPPED__, this.presentationBootstarppedEventHandler);\n //}\n\n removeEventListener('message', this.messageEventHandler);\n });\n }\n\n private readonly classifyFloatingEntry = (event: Event) => {\n const className: string = (event as CustomEvent)?.detail;\n if (className && !(this.wrapperClassValue && this.wrapperClassValue?.split(' ').some((x) => x === className))) {\n this.wrapperClassValue = `${this.wrapperClassValue} ${className}`;\n }\n };\n\n private readonly deClassifyFloatingEntry = (event: Event) => {\n const className: string = (event as CustomEvent)?.detail;\n const wrapperClassValues: string[] = (this.wrapperClassValue && this.wrapperClassValue.split(' ')) || [];\n if (className && wrapperClassValues.length > 0) {\n const newClassValues: string[] = wrapperClassValues.filter((x) => x !== className);\n if (newClassValues) {\n this.wrapperClassValue = newClassValues.join(' ');\n }\n }\n };\n}\n","import { CommonModule } from '@angular/common';\nimport { ApplicationRef, DoBootstrap, ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { MenuActionsService } from '@frontend/vanilla/core';\n\nimport { HeaderLeftMenuEntryComponent } from './header-leftmenu-entry.component';\nimport { StickyEntryComponent } from './sticky-entry.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [HeaderLeftMenuEntryComponent, StickyEntryComponent],\n providers: [MenuActionsService],\n})\nexport class GlobalSearchEntryPointsModule implements DoBootstrap {\n ngDoBootstrap(appRef: ApplicationRef) {\n appRef.bootstrap(HeaderLeftMenuEntryComponent, StickyEntryComponent); // Or some other component\n }\n public static forRoot(): ModuleWithProviders {\n return {\n ngModule: GlobalSearchEntryPointsModule,\n };\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { ClientConfig, ClientConfigProductName, ClientConfigService } from '@frontend/vanilla/core';\n\n@ClientConfig({ key: 'globalSearch', product: ClientConfigProductName.HOST })\n@Injectable({\n providedIn: 'root',\n deps: [ClientConfigService],\n useFactory: globalSearchConfigfactory,\n})\nexport class GlobalSearchClientConfig {\n // appId: string;\n // configPath: string;\n contextPath: string | undefined;\n // indexPath: string;\n // isEnabled: boolean;\n searchLanguage: string | undefined;\n //targetId: string;\n // presentation: IClientPresentation;\n transportToken: string | undefined;\n //legacyMode: boolean;\n assetPaths: IAssetPaths | undefined;\n stickyicondragabble: boolean | undefined;\n}\nexport interface IAssetPaths {\n scripts: string[];\n styles: string[];\n}\n\nexport function globalSearchConfigfactory(clientConfigService: ClientConfigService) {\n return clientConfigService.get(GlobalSearchClientConfig);\n}\n","import { EventEmitter, Injectable } from '@angular/core';\n\nimport { SearchAppLoadedEventIdentifier, SearchAppQueryEventIdentifier, SearchAppQueryResultEventIdentifier } from '../events';\nimport { IAppContext } from './app';\nimport { IContentContext } from './content';\nimport { IIndexingContext } from './indexing';\nimport { IClientPresentation } from './presentation';\nimport { IGlobalSearchContext } from './search';\nimport { ISecurityContext } from './security';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SearchContextService implements IGlobalSearchContext {\n private readonly isAppEnabledQuery = 'isappenabled';\n private readonly queryToken = 'sticky-entry-query-isappenabled';\n private searchContext: IGlobalSearchContext | undefined;\n\n get appContext(): IAppContext | undefined {\n return this.searchContext?.appContext;\n }\n\n get contentContext(): IContentContext | undefined {\n return this.searchContext?.contentContext;\n }\n\n get indexingContext(): IIndexingContext | undefined {\n return this.searchContext?.indexingContext;\n }\n\n get securityContext(): ISecurityContext | undefined {\n return this.searchContext?.securityContext;\n }\n\n get presentationContext(): IClientPresentation | undefined {\n return this.searchContext?.presentationContext;\n }\n\n public contextAvailable: EventEmitter;\n\n constructor() {\n this.contextAvailable = new EventEmitter(true);\n this.registerEventHandlers();\n this.raiseIsAppEnabledQuery();\n }\n\n private setContext(searchContext: IGlobalSearchContext) {\n this.searchContext = searchContext;\n this.contextAvailable.emit(this.searchContext);\n }\n\n private registerEventHandlers() {\n addEventListener(SearchAppLoadedEventIdentifier, this.searchAppLoadedEventHandler);\n addEventListener(SearchAppQueryResultEventIdentifier, this.searchAppQueryResultHandler);\n }\n\n private readonly searchAppLoadedEventHandler = (messageEvent: CustomEventInit) => {\n if (messageEvent && messageEvent.detail && messageEvent.detail?.context) {\n const context: IGlobalSearchContext = messageEvent.detail?.context;\n this.setContext(context);\n }\n };\n\n private readonly searchAppQueryResultHandler = (customEvent: CustomEventInit) => {\n if (\n customEvent &&\n customEvent?.detail &&\n customEvent?.detail?.query &&\n customEvent?.detail?.queryToken &&\n customEvent?.detail?.queryToken === this.queryToken &&\n customEvent?.detail?.query === this.isAppEnabledQuery\n ) {\n this.setContext(customEvent?.detail?.context);\n }\n };\n\n private raiseIsAppEnabledQuery() {\n dispatchEvent(\n new CustomEvent(SearchAppQueryEventIdentifier, {\n detail: {\n query: this.isAppEnabledQuery,\n queryToken: this.queryToken,\n },\n }),\n );\n }\n}\n","/* eslint-disable no-console */\nimport { Injectable } from '@angular/core';\n\nimport { IGlobalSearchContext } from '../../context/search';\nimport { SearchContextService } from '../../context/service';\nimport { SearchIndexLoadEvent } from '../../events';\n\n@Injectable({ providedIn: 'root' })\nexport class IndexLoaderClientService {\n private pendingLoad = false;\n private pendingReload = false;\n private searchContext: IGlobalSearchContext;\n\n constructor(private searchContextService: SearchContextService) {\n this.searchContext = this.searchContextService;\n if (this.searchContextService) {\n this.searchContextService.contextAvailable.subscribe((searchContext: IGlobalSearchContext) => {\n this.searchContext = searchContext;\n if (this.pendingLoad) {\n this.loadIndex();\n this.pendingLoad = false;\n }\n if (this.pendingReload) {\n this.loadIndex();\n this.pendingReload = false;\n }\n });\n }\n }\n\n loadIndex(): void {\n console.info('[GlobalSearch]', '[ProductStub]', '[IndexLoaderClientService]', '[loadIndex]');\n if (this.searchContext && this.searchContext.appContext) {\n this.reloadIndex();\n } else {\n this.pendingLoad = true;\n }\n }\n\n reloadIndex(): void {\n console.info('[GlobalSearch]', '[ProductStub]', '[IndexLoaderClientService]', '[reloadIndex]');\n dispatchEvent(new CustomEvent(SearchIndexLoadEvent));\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { UserLoginEvent, UserLogoutEvent, UserService } from '@frontend/vanilla/core';\nimport { filter } from 'rxjs/operators';\n\nimport { IndexLoaderClientService } from '../content/index-loader.service';\n\n@Injectable({ providedIn: 'root' })\nexport class SearchIndexLoaderRegistrationService {\n constructor(\n private readonly userService: UserService,\n private readonly indexLoaderClientService: IndexLoaderClientService,\n ) {}\n\n register(): void {\n this.userService.events.pipe(filter((e: any) => e instanceof (UserLoginEvent || UserLogoutEvent))).subscribe(() => {\n this.indexLoaderClientService.reloadIndex();\n });\n }\n}\n","import { Injectable, NgZone } from '@angular/core';\n\nimport { ClientConfigDiff, ClientConfigService, TrackingService } from '@frontend/vanilla/core';\n\nimport { __CLIENT_CONFIG_UPDATE_AVAILABLE__, __READ_CLIENT_CONFIG__, __TRACK__ } from '../../events';\nimport { IEventTrackingInput } from './event-tracking.input';\n\n@Injectable({ providedIn: 'root' })\nexport class GlobalSearchWebTrackingService {\n constructor(\n private readonly trackingService: TrackingService,\n private readonly clientConfigService: ClientConfigService,\n private _ngZone: NgZone,\n ) {\n this.clientConfigService.updates.subscribe((clientConfigDiff: ClientConfigDiff) => {\n dispatchEvent(new CustomEvent(__CLIENT_CONFIG_UPDATE_AVAILABLE__, { detail: clientConfigDiff }));\n });\n }\n registerHandlers() {\n addEventListener(__TRACK__, this.trackingHandler, false);\n this._ngZone.runOutsideAngular(() => {\n addEventListener(__READ_CLIENT_CONFIG__, this.readClientConfighandler, false);\n });\n }\n\n trackingHandler = (customevent: Event) => {\n const trackingData = (customevent as CustomEvent)?.detail;\n if (trackingData) {\n const eventName = trackingData.eventName;\n const data = trackingData.data;\n const options = trackingData.options;\n this.trackingService.triggerEvent(eventName, data, options);\n }\n };\n\n readClientConfighandler = (customevent: Event) => {\n if ((customevent as CustomEvent)?.detail?.clientConfig) {\n (customevent as CustomEvent).detail.clientConfig = (window as any).clientConfig;\n // to read clientconfig from vanilla\n }\n };\n\n trackClick(eventInput: IEventTrackingInput): void {\n this.trackingService.triggerEvent('Event.Tracking', {\n 'component.CategoryEvent': eventInput.componentCategoryEvent,\n 'component.LabelEvent': eventInput.componentLabelEvent,\n 'component.ActionEvent': eventInput.componentActionEvent,\n 'component.PositionEvent': eventInput.componentPositionEvent,\n 'component.LocationEvent': eventInput.componentLocationEvent,\n 'component.EventDetails': eventInput.componentEventDetails,\n 'component.URLClicked': eventInput.componentURLClicked,\n });\n }\n trackTerm(eventInput: IEventTrackingInput): void {\n this.trackingService.triggerEvent('Event.Tracking', {\n 'component.CategoryEvent': eventInput.componentCategoryEvent,\n 'component.LabelEvent': eventInput.componentLabelEvent,\n 'component.ActionEvent': eventInput.componentActionEvent,\n 'component.PositionEvent': eventInput.componentPositionEvent,\n 'component.LocationEvent': eventInput.componentLocationEvent,\n 'component.EventDetails': eventInput.componentEventDetails,\n 'component.URLClicked': eventInput.componentURLClicked,\n });\n }\n}\n","import { Injectable, Type } from '@angular/core';\n\nimport { DeviceService, DynamicComponentsRegistry, DynamicLayoutService, HeaderService, MenuActionsService, OnAppInit } from '@frontend/vanilla/core';\nimport { HeaderSearchService } from '@frontend/vanilla/shared/header';\n\nimport { GlobalSearchClientConfig } from '../../config/client-config';\n// import { HeaderLeftMenuEntryComponent } from '../../entrypoints/header-leftmenu-entry.component';\nimport { StickyEntryComponent } from '../../entrypoints/sticky-entry.component';\nimport { __BOOTSTRAP_APP__, __LAUNCH_SEARCH__ } from '../../events';\nimport { SearchIndexLoaderRegistrationService } from '../indexing/index-loader-registration.service';\nimport { GlobalSearchWebTrackingService } from '../webanalytics/trackingservice';\n\n@Injectable({ providedIn: 'root' })\nexport class GlobalSearchBootstrapService implements OnAppInit {\n bottom: string | undefined;\n isEnabled: false | undefined;\n\n constructor(\n private readonly dynamicComponentsRegistry: DynamicComponentsRegistry,\n private readonly tracking: GlobalSearchWebTrackingService,\n private readonly deviceService: DeviceService,\n private readonly headerService: HeaderService,\n private readonly menuActionsService: MenuActionsService,\n private readonly headerSearchService: HeaderSearchService,\n private readonly searchIndexLoaderRegistrationService: SearchIndexLoaderRegistrationService,\n private readonly globalSearchConfig: GlobalSearchClientConfig,\n private readonly dynamicLayoutService: DynamicLayoutService,\n ) {}\n\n async onAppInit(): Promise {\n const GS_COMPONENTS_MAP: { [key: string]: () => Promise> } = {\n 'gs-search': () => import('../../entrypoints/header-leftmenu-entry.component').then((x) => x.HeaderLeftMenuEntryComponent),\n };\n this.tracking.registerHandlers();\n this.dynamicComponentsRegistry.registerLazyComponent('HEADER', 'global-search', GS_COMPONENTS_MAP['gs-search']);\n this.headerService.whenReady.subscribe(() => {\n // this.headerService.setHeaderComponent('global-search', HeaderLeftMenuEntryComponent);\n this.headerSearchService.clickEvent.subscribe(() => {\n dispatchEvent(new CustomEvent(__LAUNCH_SEARCH__, { detail: { launchChannel: 'mobile', launchedFrom: 'epcot' } }));\n });\n });\n this.menuActionsService.register('openGlobalSearch', () => {\n dispatchEvent(new CustomEvent(__LAUNCH_SEARCH__, { detail: { launchChannel: 'mobile', launchedFrom: 'bottom' } }));\n });\n\n if (this.deviceService.isTouch) {\n this.dynamicLayoutService.addComponent('app', StickyEntryComponent, null);\n }\n\n addEventListener(__BOOTSTRAP_APP__, () => {\n this.globalSearchConfig.assetPaths?.scripts.forEach((scriptpath) => {\n if ((scriptpath || '')?.trim()) {\n const scriptElement = document.createElement('script');\n scriptElement.src = (scriptpath || '')?.trim();\n document.body.appendChild(scriptElement);\n }\n });\n this.globalSearchConfig.assetPaths?.styles.forEach((stylepath) => {\n if ((stylepath || '')?.trim()) {\n const styleElement = document.createElement('link');\n styleElement.rel = 'stylesheet';\n styleElement.type = 'text/css';\n styleElement.href = (stylepath || '')?.trim();\n document.body.appendChild(styleElement.cloneNode(true));\n }\n });\n });\n this.searchIndexLoaderRegistrationService.register();\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\n// import { SearcherModule } from './searcher/searcher.module';\nimport { runOnAppInit } from '@frontend/vanilla/core';\n\nimport { GlobalSearchEntryPointsModule } from './entrypoints/entrypoints.module';\n// import { TranslatorService } from './translate/translator.service';\nimport { GlobalSearchBootstrapService } from './shared/bootstrapping/bootstrap.service';\nimport { IndexLoaderClientService } from './shared/content/index-loader.service';\nimport { SearchIndexLoaderRegistrationService } from './shared/indexing/index-loader-registration.service';\nimport { GlobalSearchWebTrackingService } from './shared/webanalytics/trackingservice';\n\n@NgModule({\n imports: [GlobalSearchEntryPointsModule],\n})\nexport class GlobalSearchModule {\n public static forRoot(): ModuleWithProviders {\n return {\n ngModule: GlobalSearchModule,\n providers: [\n runOnAppInit(GlobalSearchBootstrapService),\n GlobalSearchWebTrackingService,\n SearchIndexLoaderRegistrationService,\n IndexLoaderClientService,\n // TranslatorService,\n ],\n };\n }\n}\n\nexport function getGlobalSearchProviders() {\n return [GlobalSearchBootstrapService, GlobalSearchWebTrackingService, SearchIndexLoaderRegistrationService, IndexLoaderClientService];\n}\n","import { Injectable } from '@angular/core';\n\nimport { CasinoLobbyService, RecentGamesService } from '@casinocore/platform/core';\n\nexport interface ILocalStorageCollectedLobby {\n lobbyType: string;\n feed: any;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class GLobalSearchService {\n constructor(\n private casinoLobbyService: CasinoLobbyService,\n private recentGamesService: RecentGamesService,\n ) {}\n\n init(): void {\n addEventListener('LocalStorage_Collected_Lobbies', this.handleCollectedLobbies, false);\n addEventListener('gs:search:Request_Casino_Source', this.getandDispatchData, false);\n addEventListener('casino:Recent_Games_Updated', this.handleRecentlyPlayedGames, false);\n addEventListener('gs:search:Request_Recent_Games_From_Casino', this.getAndDispatchRecentlyPlayed, false);\n }\n\n private getAndDispatchRecentlyPlayed = () => {\n const recentGames = this.recentGamesService.getRecentGames();\n recentGames && Object.keys(recentGames).length > 0 && this.dispatchRecentGames(recentGames);\n };\n\n private dispatchRecentGames = (recentGames: any) => {\n dispatchEvent(new CustomEvent('gs:search:Casino_Recent_Games_Updated', { detail: recentGames }));\n };\n\n private handleCollectedLobbies = (customevent: CustomEvent) => {\n const collectedLobbies = customevent && customevent.detail && customevent.detail.collectedLobbies;\n\n this.respondToDataConstributor(collectedLobbies);\n };\n\n private respondToDataConstributor(content: ILocalStorageCollectedLobby[]): void {\n const status: boolean = content && content.length > 0;\n dispatchEvent(new CustomEvent('gs:search:Casino_Data_Source', { detail: { status: status, content: content } }));\n }\n\n private getandDispatchData = () => {\n this.casinoLobbyService.readAndDispatchLobbyDataForGlobalSearch(true);\n };\n\n private handleRecentlyPlayedGames = (event: CustomEvent) => {\n if (event && event.detail) {\n this.dispatchRecentGames(event.detail);\n }\n };\n}\n","import { Injectable } from '@angular/core';\n\nimport { CasinoGlobalSearchClientConfig } from '../../client-config';\nimport { WindowRef } from '../windowref.service';\n\n@Injectable({ providedIn: 'root' })\nexport class GlobalSearchBootstrapper {\n private isGlobalSearchBootstrapperLoadInitialized: boolean = false;\n\n constructor(\n private windowRef: WindowRef,\n private casinoGlobalSearchClientConfig: CasinoGlobalSearchClientConfig,\n ) {}\n\n bootstrap(): void {\n if (\n this.casinoGlobalSearchClientConfig &&\n this.casinoGlobalSearchClientConfig.isEnabled &&\n this.casinoGlobalSearchClientConfig.bootstrapOrigin === 'client' &&\n !this.isGlobalSearchBootstrapperLoadInitialized\n ) {\n this.isGlobalSearchBootstrapperLoadInitialized = true;\n\n this.windowRef.nativeWindow.setTimeout(() => {\n this.loadGlobalSearch();\n }, this.casinoGlobalSearchClientConfig.bootstrapTimeout);\n }\n }\n\n private loadGlobalSearch(): void {\n dispatchEvent(new CustomEvent('gs:search:bootstrap:app'));\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { TagManagerService, TrackingService } from '@frontend/vanilla/core';\nimport { rxEffects } from '@rx-angular/state/effects';\n\nimport { TagManagerClientConfig } from '../../client-config';\nimport { WindowRef } from '../windowref.service';\n\n@Injectable({ providedIn: 'root' })\nexport class TagManagerRenderer {\n private readonly rxEffects = rxEffects();\n private isGoogleTagManagerLoadInitialized: boolean = false;\n\n constructor(\n private tagManagerService: TagManagerService,\n private vanillaTrackingService: TrackingService,\n private tagManagerClientConfig: TagManagerClientConfig,\n private windowRef: WindowRef,\n ) {}\n\n renderGTMTag(): void {\n if (\n this.tagManagerClientConfig &&\n this.tagManagerClientConfig.triggerGoogleTagManagerClientInjection &&\n !this.isGoogleTagManagerLoadInitialized\n ) {\n this.isGoogleTagManagerLoadInitialized = true;\n\n this.windowRef.nativeWindow.setTimeout(() => {\n this.loadGTM();\n }, this.tagManagerClientConfig.googleTagManagerInjectionDelay);\n }\n }\n\n private loadGTM(): void {\n // Call function if attached on window to handle fixes via sitecore.\n this.windowRef.nativeWindow.CasinoPreGTMLoad?.Execute?.();\n\n // Load GTM Script\n this.rxEffects.register(this.tagManagerService.whenReady, () => {\n this.tagManagerService.loadPartyTownGTM();\n });\n // Fire App Loaded Event for use as a trigger in GTM\n this.vanillaTrackingService.triggerEvent('Vanilla_Portal_App_Loaded', {\n 'component.CategoryEvent': '',\n });\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { OnAppInitHandler } from '@casinocore/platform';\nimport {\n CasinoCoreGamelaunchService,\n CasinoCoreNpmParams,\n CasinoLobbyService,\n CasinoManager,\n ConfigProviderService,\n GameLaunch,\n OobeeIntimationToasterService,\n} from '@casinocore/platform/core';\nimport { BingoloaderService } from '@frontend/bingoloader';\nimport {\n CookieService,\n NativeAppService,\n NavigationService,\n OnAppInit,\n ProductHomepagesConfig,\n UserLoginEvent,\n UserService,\n} from '@frontend/vanilla/core';\nimport { SearchAppQueryEventIdentifier } from '@globalsearch/productstub';\nimport { rxEffects } from '@rx-angular/state/effects';\nimport { filter } from 'rxjs/operators';\n\nimport { FeaturesClientConfig, GlobalClientConfig, McPageClientConfig } from '../client-config';\nimport { GLobalSearchService } from '../globalsearch/globalsearchservice';\nimport { CasinoWidgetService } from '../shared';\nimport { GlobalSearchBootstrapper } from '../shared/services/globalsearch-bootstrap.service';\nimport { PerformanceMarker, PerformanceMarkerIdentifiers } from '../shared/services/performance-marker.service';\nimport { TagManagerRenderer } from '../shared/services/tagmanager-renderer.service';\nimport { WindowRef } from '../shared/windowref.service';\n\n@Injectable({ providedIn: 'root' })\nexport class CasinoBootstrapService implements OnAppInit {\n previousUrl = this.mcPage.prefix;\n invokerProduct: string;\n private readonly isAppEnabledQuery = 'isappenabled';\n private readonly queryToken = 'global-jackpot-query-isappenabled';\n private readonly rxEffects = rxEffects();\n\n constructor(\n private user: UserService,\n private casinoManager: CasinoManager,\n private navigation: NavigationService,\n private mcPage: McPageClientConfig,\n private global: GlobalClientConfig,\n private nativeApp: NativeAppService,\n private productHomepages: ProductHomepagesConfig,\n private casinoWidgetService: CasinoWidgetService,\n private gameLaunchService: CasinoCoreGamelaunchService,\n private readonly oobeeIntimationToasterService: OobeeIntimationToasterService,\n private cookie: CookieService,\n private casinoLobbyService: CasinoLobbyService,\n private onAppInitHandler: OnAppInitHandler,\n private tagManagerRenderer: TagManagerRenderer,\n private globalSearchBootstrapper: GlobalSearchBootstrapper,\n private performanceMarker: PerformanceMarker,\n private globalSearchService: GLobalSearchService,\n private featuresConfig: FeaturesClientConfig,\n private windowRef: WindowRef,\n private configProviderService: ConfigProviderService,\n private bingoLoaderService: BingoloaderService,\n ) {}\n\n onAppInit() {\n if (this.featuresConfig.enableHashText) {\n const currUrl = this.navigation.location.absUrl();\n const hashTextExists = currUrl.includes(this.featuresConfig.hashText);\n\n if (!hashTextExists) {\n this.navigation.goTo(currUrl + '#' + this.featuresConfig?.hashText, { replace: true });\n }\n }\n this.registerEventHandlers();\n this.raiseIsAppEnabledQuery();\n this.triggerGTMInjection();\n this.casinoWidgetService.setWidgetProduct();\n this.invokerProduct = this.navigation.location.search.get('invokerproduct') || '';\n //disable overflow-x for entire application\n document.body.classList.add('casino-body');\n\n this.subscribeToLobbyLoad();\n const casinoCoreNpmParams: CasinoCoreNpmParams = new CasinoCoreNpmParams();\n casinoCoreNpmParams.isDll = true;\n casinoCoreNpmParams.disableFullLobbyFetch = true;\n this.globalSearchService.init();\n this.casinoLobbyService.initiateCasinoLobby(casinoCoreNpmParams);\n this.getInitFeed();\n document.getElementsByTagName('html')[0].classList.add('hide-bingo-tournaments');\n if (!this.getFromCookie('dark-mode')) {\n document.getElementsByTagName('html')[0].classList.remove('casino-darkmode');\n this.setBackgroundColor();\n } else {\n document.getElementsByTagName('html')[0].classList.add('casino-darkmode');\n }\n const bingoNPMModular: any = this.configProviderService.provideModularBingoClientConfig();\n if (bingoNPMModular?.isEnabled) {\n const environment = process.env.NODE_ENV;\n const params = {\n isDll: false,\n };\n this.bingoLoaderService.loadBingoNpmModule(environment ? environment : 'production', params);\n }\n this.onAppInitHandler.execute();\n }\n\n getInitFeed() {\n const featuresConfig: any = this.configProviderService.provideFeaturesConfig();\n const nonCasinoUrlPaths = featuresConfig?.nonCasinoUrls ? JSON.parse(featuresConfig.nonCasinoUrls) : [];\n this.rxEffects.register(this.navigation.locationChange, (e) => {\n if (e && e.previousUrl != null) {\n this.previousUrl = e.previousUrl;\n }\n const nextUrl = e?.nextUrl;\n const values = nonCasinoUrlPaths?.map((m: any) => nextUrl.toLocaleLowerCase().indexOf(m.toLocaleLowerCase()) > -1);\n const isTrueValue = values.indexOf(true) > -1;\n if (e && e.nextUrl && isTrueValue) {\n const casinoLobbyBgColor: string = document.body.getAttribute('data-bg-color') || '';\n if (casinoLobbyBgColor === this.global.lobbyConfigurations.lobbyBackgroundColor) {\n document.body.removeAttribute('data-bg-color');\n document.body.style.removeProperty('background-color');\n }\n } else {\n if (!this.getFromCookie('dark-mode')) {\n this.setBackgroundColor();\n }\n }\n });\n\n this.setUserPreferenceData();\n\n this.rxEffects.register(this.user.events.pipe(filter((e: any) => e instanceof UserLoginEvent)), () => {\n this.postLoginCalls();\n });\n\n this.rxEffects.register(this.nativeApp.eventsFromNative, (e) => {\n const eventName = e.eventName.toUpperCase();\n if (eventName === 'CASINO_SESSION_KEY' && e.parameters) {\n const eventParams: any = JSON.parse(JSON.parse(JSON.stringify(e.parameters)));\n if (eventParams.sessionKey && eventParams.sessionKey !== '') {\n const clientUrl: string =\n this.productHomepages.casino +\n '/casino?invokerProduct=' +\n this.nativeApp.product +\n '&_nativeApp=' +\n this.nativeApp.applicationName +\n '&_sso=' +\n eventParams.sessionKey;\n window.location.href = clientUrl;\n }\n }\n });\n }\n\n postLoginCalls(): void {\n this.handlePostloginDirectGameLaunch();\n this.oobeeIntimationToasterService.display();\n }\n\n getFromCookie(key: string): boolean {\n if (this.cookie.get(key) > '0') {\n return true;\n }\n return false;\n }\n\n getGoBackUrl() {\n if (this.previousUrl === this.navigation.location.absUrl()) return this.mcPage.prefix;\n else return this.previousUrl;\n }\n\n goBackImmediateUrl() {\n return this.navigation.location.absUrl();\n }\n\n handlePostloginDirectGameLaunch() {\n const currentHref = window.location.href;\n if (currentHref.indexOf('launchEmbedded') > -1) {\n const slashLastIndex = currentHref.lastIndexOf('/');\n const queryLastIndex = currentHref.lastIndexOf('?');\n const gameId = currentHref.substring(slashLastIndex + 1, queryLastIndex - slashLastIndex - 1);\n\n gameId && this.gameLaunchService.handleDirectDesktopGameLaunch(gameId);\n }\n }\n\n setBackgroundColor() {\n document.body.style.backgroundColor = this.global.lobbyConfigurations.lobbyBackgroundColor;\n document.body.setAttribute('data-bg-color', this.global.lobbyConfigurations.lobbyBackgroundColor);\n }\n\n setUserPreferenceData() {\n this.casinoManager.setPlayerSegmentationData();\n }\n\n private raiseIsAppEnabledQuery() {\n dispatchEvent(\n new CustomEvent(SearchAppQueryEventIdentifier, {\n detail: {\n query: this.isAppEnabledQuery,\n queryToken: this.queryToken,\n },\n }),\n );\n dispatchEvent(new CustomEvent('gs:search:service:context:fetch'));\n }\n\n private registerEventHandlers() {\n addEventListener('gs:globalsearch:casinogamelaunch', this.launchGameGlobalSearch);\n }\n private readonly launchGameGlobalSearch = (customevent: CustomEventInit) => {\n if (customevent && customevent.detail && customevent.detail.gameParams) {\n const gameLink = customevent.detail.gameParams;\n this.globalSearchGameLaunch(gameLink);\n }\n };\n\n globalSearchGameLaunch(gameLink: any) {\n const gameId = gameLink.searchParams.get('gameid');\n const launchLobbyType = gameLink.searchParams.get('launchLobbyType');\n const isTouch = this.casinoManager.isTouch();\n const gameInfo = this.casinoLobbyService.getGameInfo(gameId);\n let provider;\n if (gameInfo) {\n provider = gameInfo.provider;\n }\n const lobbyType = this.casinoManager.getCurrentLobby();\n const gameObj: any = {\n gameId: gameId,\n provider: provider,\n lobbyType: launchLobbyType ? launchLobbyType : lobbyType,\n };\n const gameHomeUrl = gameLink.searchParams.get('returnUrl');\n const gameModel = new GameLaunch();\n gameModel.game = gameObj;\n gameModel.trackingproduct = gameLink.searchParams.get('specialproduct');\n gameModel.returnUrl = gameHomeUrl;\n gameModel.isTouch = isTouch;\n gameModel.categoryType = gameLink.searchParams.get('specialproduct');\n gameModel.clickTimeStamp = gameLink.searchParams.get('clickTimeStamp');\n gameModel.recommendationType = gameLink.searchParams.get('recommendationType');\n if (!gameModel.clickTimeStamp) {\n gameModel.clickTimeStamp = this.gameLaunchService.currentTimeStamp();\n }\n let Globalsearchsection: any;\n if (gameLink.searchParams.get('tracking:containerName')) {\n Globalsearchsection = gameLink.searchParams.get('tracking:containerName').split('+').join(' ');\n }\n const Globalsearchgameposition = parseInt(gameLink.searchParams.get('tracking:position'));\n gameModel.Globalsearchsection = Globalsearchsection;\n gameModel.Globalsearchgameposition = Globalsearchgameposition;\n gameModel.gameLaunchedFrom = gameModel.trackingproduct;\n gameModel.gamePosition = Number(gameLink.searchParams.get('tracking:position'));\n this.gameLaunchService.launchGame(gameModel);\n }\n\n private subscribeToLobbyLoad(): void {\n this.rxEffects.register(this.casinoLobbyService.lobbyLoadedObservable, (result) => {\n if (result) {\n this.clearLocalStorage();\n this.createPerformanceMark(PerformanceMarkerIdentifiers.LobbyLoadComplete);\n setTimeout(() => {\n if (document.getElementById('casino-prerender')) {\n document.getElementById('casino-prerender')!.innerHTML = ' window.prerenderReady = true';\n this.windowRef.nativeWindow.prerenderReady = true;\n }\n }, 0);\n this.bootstrapGlobalSearch();\n }\n });\n }\n private clearLocalStorage(): void {\n const featuresConfig: any = this.configProviderService.provideFeaturesConfig();\n const expirationInterval = featuresConfig.browserLocalStorageCategoryDataUpdateInterval * 1000;\n const allLSLookupItems = Object.keys(localStorage).filter((item: any) => item.indexOf('categoryCoreLookUp') > -1);\n allLSLookupItems.forEach((item: string) => {\n this.removeExpiredkey(item, expirationInterval);\n });\n }\n\n private removeExpiredkey(key: string, expirationInterval: any): void {\n const cachedItem = localStorage.getItem(key.trim());\n const parsedCacheItem = cachedItem && JSON.parse(cachedItem);\n if (parsedCacheItem) {\n const cachedAt = parsedCacheItem.createdAt;\n if (cachedAt && new Date().getTime() - cachedAt > expirationInterval) {\n localStorage.removeItem(key);\n }\n }\n }\n private bootstrapGlobalSearch(): void {\n this.globalSearchBootstrapper.bootstrap();\n }\n\n private triggerGTMInjection(): void {\n this.tagManagerRenderer.renderGTMTag();\n }\n\n private createPerformanceMark(markerName: string): void {\n this.performanceMarker.mark(markerName);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { CanActivate } from '@angular/router';\n\nimport { PageMatrixService } from '@frontend/vanilla/core';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class PublicPagesGuard implements CanActivate {\n constructor(private pageMatrixService: PageMatrixService) {}\n\n canActivate(): Observable {\n return this.pageMatrixService.whenReady.pipe(\n map(() => {\n return true;\n }),\n );\n }\n}\n","import * as i0 from '@angular/core';\nimport { InjectionToken, inject, NgZone, ɵisPromise as _isPromise, Injectable, input, PLATFORM_ID, Directive, Output, ElementRef, Component, ChangeDetectionStrategy, ViewChild, makeStateKey } from '@angular/core';\nimport { from, of, Observable, Subject, BehaviorSubject, defer } from 'rxjs';\nimport { map, tap, shareReplay, mergeMap, filter, switchMap } from 'rxjs/operators';\nimport { isPlatformBrowser, NgStyle, NgClass } from '@angular/common';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nconst _c0 = [\"container\"];\nconst LOTTIE_OPTIONS = new InjectionToken('LottieOptions');\nfunction convertPlayerOrLoaderToObservable() {\n const ngZone = inject(NgZone);\n const {\n player,\n useWebWorker\n } = inject(LOTTIE_OPTIONS);\n const playerOrLoader = ngZone.runOutsideAngular(() => player());\n // We need to use `isPromise` instead of checking whether\n // `result instanceof Promise`. In zone.js patched environments, `global.Promise`\n // is the `ZoneAwarePromise`. Some APIs, which are likely not patched by zone.js\n // for certain reasons, might not work with `instanceof`. For instance, the dynamic\n // import `() => import('./chunk.js')` returns a native promise (not a `ZoneAwarePromise`),\n // causing this check to be falsy.\n const player$ = _isPromise(playerOrLoader) ? from(playerOrLoader).pipe(map(module => module.default || module)) : of(playerOrLoader);\n return player$.pipe(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n tap(player => player.useWebWorker?.(useWebWorker)), shareReplay({\n bufferSize: 1,\n refCount: true\n }));\n}\nlet AnimationLoader = /*#__PURE__*/(() => {\n class AnimationLoader {\n constructor() {\n this.player$ = convertPlayerOrLoaderToObservable().pipe(mergeMap(player => raf$(this.ngZone).pipe(map(() => player))));\n this.ngZone = inject(NgZone);\n }\n loadAnimation(options) {\n return this.player$.pipe(map(player => this.createAnimationItem(player, options)));\n }\n resolveOptions(options, container) {\n return Object.assign({\n container,\n renderer: 'svg',\n loop: true,\n autoplay: true\n }, options);\n }\n createAnimationItem(player, options) {\n return this.ngZone.runOutsideAngular(() => player.loadAnimation(options));\n }\n /** @nocollapse */\n static {\n this.ɵfac = function AnimationLoader_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || AnimationLoader)();\n };\n }\n /** @nocollapse */\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: AnimationLoader,\n factory: AnimationLoader.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return AnimationLoader;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction raf$(ngZone) {\n return new Observable(subscriber => {\n const requestId = ngZone.runOutsideAngular(() => requestAnimationFrame(() => {\n subscriber.next();\n subscriber.complete();\n }));\n return () => cancelAnimationFrame(requestId);\n });\n}\nlet CacheableAnimationLoader = /*#__PURE__*/(() => {\n class CacheableAnimationLoader extends AnimationLoader {\n constructor() {\n super(...arguments);\n this.cache = new Map();\n }\n ngOnDestroy() {\n this.cache.clear();\n }\n loadAnimation(options) {\n return this.player$.pipe(map(player => {\n const animationItem = this.createAnimationItem(player, this.transformOptions(options));\n this.awaitConfigAndCache(options, animationItem);\n return animationItem;\n }));\n }\n awaitConfigAndCache(options, animationItem) {\n if (this.isAnimationConfigWithPath(options)) {\n // Don't wait for the `config_ready` event if it has been cached previously.\n if (this.cache.has(options.path)) {\n return;\n }\n animationItem.addEventListener('config_ready', () => {\n // See the comments below on why we're storing the animation data as a string.\n this.cache.set(options.path, JSON.stringify(animationItem['animationData']));\n });\n }\n }\n transformOptions(options) {\n if (this.isAnimationConfigWithPath(options) && this.cache.has(options.path)) {\n return {\n ...options,\n path: undefined,\n // Caretaker note: `lottie-web` cannot re-use the `animationData` object between animations, and we\n // have to retrieve a new object each time an animation is created.\n // https://github.com/airbnb/lottie-web#html\n // See comments for the `animationData` property.\n animationData: JSON.parse(this.cache.get(options.path))\n };\n } else {\n return options;\n }\n }\n isAnimationConfigWithPath(options) {\n return typeof options.path === 'string';\n }\n /** @nocollapse */\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵCacheableAnimationLoader_BaseFactory;\n return function CacheableAnimationLoader_Factory(__ngFactoryType__) {\n return (ɵCacheableAnimationLoader_BaseFactory || (ɵCacheableAnimationLoader_BaseFactory = i0.ɵɵgetInheritedFactory(CacheableAnimationLoader)))(__ngFactoryType__ || CacheableAnimationLoader);\n };\n })();\n }\n /** @nocollapse */\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: CacheableAnimationLoader,\n factory: CacheableAnimationLoader.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return CacheableAnimationLoader;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction provideCacheableAnimationLoader() {\n return [{\n provide: AnimationLoader,\n useExisting: CacheableAnimationLoader\n }];\n}\nfunction provideLottieOptions(options) {\n return [{\n provide: LOTTIE_OPTIONS,\n useValue: options\n }];\n}\nlet BaseDirective = /*#__PURE__*/(() => {\n class BaseDirective {\n constructor() {\n this.options = input(null);\n this.containerClass = input(null);\n this.styles = input(null);\n /**\n * `animationCreated` is dispatched after calling `loadAnimation`.\n */\n this.animationCreated = this.getAnimationItem();\n /**\n * `complete` is dispatched after completing the last frame.\n */\n this.complete = this.awaitAnimationItemAndStartListening('complete');\n /**\n * `loopComplete` is dispatched after completing the frame loop.\n */\n this.loopComplete = this.awaitAnimationItemAndStartListening('loopComplete');\n /**\n * `enterFrame` is dispatched after entering the new frame.\n */\n this.enterFrame = this.awaitAnimationItemAndStartListening('enterFrame');\n /**\n * `segmentStart` is dispatched when the new segment is adjusted.\n */\n this.segmentStart = this.awaitAnimationItemAndStartListening('segmentStart');\n /**\n * Original event name is `config_ready`. `config_ready` is dispatched\n * after the needed renderer is configured.\n */\n this.configReady = this.awaitAnimationItemAndStartListening('config_ready');\n /**\n * Original event name is `data_ready`. `data_ready` is dispatched\n * when all parts of the animation have been loaded.\n */\n this.dataReady = this.awaitAnimationItemAndStartListening('data_ready');\n /**\n * Original event name is `DOMLoaded`. `DOMLoaded` is dispatched\n * when elements have been added to the DOM.\n */\n this.domLoaded = this.awaitAnimationItemAndStartListening('DOMLoaded');\n /**\n * `destroy` will be dispatched when the component gets destroyed,\n * it's handy for releasing resources.\n */\n this.destroy = this.awaitAnimationItemAndStartListening('destroy');\n /**\n * `error` will be dispatched if the Lottie player could not render\n * some frame or parse config.\n */\n this.error = this.awaitAnimationItemAndStartListening('error');\n this.ngZone = inject(NgZone);\n this.isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n this.animationLoader = inject(AnimationLoader);\n this.loadAnimation$ = new Subject();\n this.animationItem$ = new BehaviorSubject(null);\n this.setupLoadAnimationListener();\n }\n ngOnDestroy() {\n this.destroyAnimation();\n }\n loadAnimation(changes, container) {\n this.ngZone.runOutsideAngular(() => this.loadAnimation$.next([changes, container]));\n }\n getAnimationItem() {\n return defer(() => this.animationItem$).pipe(filter(animationItem => animationItem !== null));\n }\n awaitAnimationItemAndStartListening(name) {\n return this.getAnimationItem().pipe(switchMap(animationItem =>\n // `fromEvent` will try to call `removeEventListener` when `unsubscribe()` is invoked.\n // The problem is that `ngOnDestroy()` is called before Angular unsubscribes from\n // `@Output()` properties, thus `animationItem` will be `null` already, also `lottie-web`\n // removes event listeners when calling `destroy()`.\n new Observable(observer => {\n this.ngZone.runOutsideAngular(() => {\n animationItem.addEventListener(name, event => {\n this.ngZone.runOutsideAngular(() => {\n observer.next(event);\n });\n });\n });\n })));\n }\n setupLoadAnimationListener() {\n const loadAnimation$ = this.loadAnimation$.pipe(filter(([changes]) => this.isBrowser && changes.options !== undefined));\n loadAnimation$.pipe(switchMap(([changes, container]) => {\n this.destroyAnimation();\n return this.animationLoader.loadAnimation(this.animationLoader.resolveOptions(changes.options.currentValue, container));\n }), takeUntilDestroyed()).subscribe(animationItem => {\n this.ngZone.run(() => this.animationItem$.next(animationItem));\n });\n }\n destroyAnimation() {\n const animationItem = this.animationItem$.getValue();\n // The `ng-lottie` component or the `lottie` directive can be destroyed\n // before the `animationItem` is set, thus it will fail with\n // `Cannot read property 'destroy' of null`.\n // Potentially it can happen if the directive gets destroyed before change\n // detection is run.\n if (animationItem === null) {\n return;\n }\n // `destroy()` will remove all events listeners.\n animationItem.destroy();\n this.animationItem$.next(null);\n }\n /** @nocollapse */\n static {\n this.ɵfac = function BaseDirective_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || BaseDirective)();\n };\n }\n /** @nocollapse */\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: BaseDirective,\n selectors: [[\"\", \"lottie\", \"\"]],\n inputs: {\n options: [1, \"options\"],\n containerClass: [1, \"containerClass\"],\n styles: [1, \"styles\"]\n },\n outputs: {\n animationCreated: \"animationCreated\",\n complete: \"complete\",\n loopComplete: \"loopComplete\",\n enterFrame: \"enterFrame\",\n segmentStart: \"segmentStart\",\n configReady: \"configReady\",\n dataReady: \"dataReady\",\n domLoaded: \"domLoaded\",\n destroy: \"destroy\",\n error: \"error\"\n }\n });\n }\n }\n return BaseDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet LottieDirective = /*#__PURE__*/(() => {\n class LottieDirective extends BaseDirective {\n constructor() {\n super(...arguments);\n this.host = inject(ElementRef);\n }\n ngOnChanges(changes) {\n super.loadAnimation(changes, this.host.nativeElement);\n }\n /** @nocollapse */\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵLottieDirective_BaseFactory;\n return function LottieDirective_Factory(__ngFactoryType__) {\n return (ɵLottieDirective_BaseFactory || (ɵLottieDirective_BaseFactory = i0.ɵɵgetInheritedFactory(LottieDirective)))(__ngFactoryType__ || LottieDirective);\n };\n })();\n }\n /** @nocollapse */\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: LottieDirective,\n selectors: [[\"\", \"lottie\", \"\"]],\n standalone: true,\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n }\n return LottieDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet LottieComponent = /*#__PURE__*/(() => {\n class LottieComponent extends BaseDirective {\n constructor() {\n super(...arguments);\n this.width = input(null);\n this.height = input(null);\n this.container = null;\n }\n ngOnChanges(changes) {\n super.loadAnimation(changes, this.container.nativeElement);\n }\n /** @nocollapse */\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵLottieComponent_BaseFactory;\n return function LottieComponent_Factory(__ngFactoryType__) {\n return (ɵLottieComponent_BaseFactory || (ɵLottieComponent_BaseFactory = i0.ɵɵgetInheritedFactory(LottieComponent)))(__ngFactoryType__ || LottieComponent);\n };\n })();\n }\n /** @nocollapse */\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: LottieComponent,\n selectors: [[\"ng-lottie\"]],\n viewQuery: function LottieComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c0, 7);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.container = _t.first);\n }\n },\n inputs: {\n width: [1, \"width\"],\n height: [1, \"height\"]\n },\n standalone: true,\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature, i0.ɵɵStandaloneFeature],\n decls: 2,\n vars: 6,\n consts: [[\"container\", \"\"], [3, \"ngStyle\", \"ngClass\"]],\n template: function LottieComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 1, 0);\n }\n if (rf & 2) {\n i0.ɵɵstyleProp(\"width\", ctx.width() || \"100%\")(\"height\", ctx.height() || \"100%\");\n i0.ɵɵproperty(\"ngStyle\", ctx.styles())(\"ngClass\", ctx.containerClass());\n }\n },\n dependencies: [NgStyle, NgClass],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return LottieComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction transformAnimationFilenameToKey(animation) {\n const [animationName] = animation.split('.json');\n return `animation-${animationName}`;\n}\nlet LottieTransferState = /*#__PURE__*/(() => {\n class LottieTransferState {\n constructor(transferState) {\n this.transferState = transferState;\n }\n get(animation) {\n const animationKey = transformAnimationFilenameToKey(animation);\n const stateKey = makeStateKey(animationKey);\n return this.transferState.get(stateKey, null);\n }\n /** @nocollapse */\n static {\n this.ɵfac = function LottieTransferState_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || LottieTransferState)(i0.ɵɵinject(i0.TransferState));\n };\n }\n /** @nocollapse */\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: LottieTransferState,\n factory: LottieTransferState.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return LottieTransferState;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AnimationLoader, BaseDirective, LottieComponent, LottieDirective, LottieTransferState, provideCacheableAnimationLoader, provideLottieOptions, transformAnimationFilenameToKey, CacheableAnimationLoader as ɵCacheableAnimationLoader, LOTTIE_OPTIONS as ɵLOTTIE_OPTIONS };\n","import { Injectable } from '@angular/core';\n\nimport { ClientConfigProductName, LazyClientConfig, LazyClientConfigBase, LazyClientConfigService } from '@frontend/vanilla/core';\nimport { LDOptions } from 'launchdarkly-js-client-sdk';\n\n/**\n * @stable\n */\n@LazyClientConfig({ key: 'vnLaunchDarkly', product: ClientConfigProductName.SF })\n@Injectable({\n providedIn: 'root',\n useFactory: launchDarklyConfigFactory,\n deps: [LazyClientConfigService],\n})\nexport class LaunchDarklyConfig extends LazyClientConfigBase {\n clientId: string;\n options: LDOptions;\n sessionCookieName: string;\n}\n\nexport function launchDarklyConfigFactory(service: LazyClientConfigService) {\n return service.get(LaunchDarklyConfig);\n}\n","function e(e) {\n function t(e, t) {\n Error.captureStackTrace && Error.captureStackTrace(this, this.constructor), this.message = e, this.code = t;\n }\n return t.prototype = new Error(), t.prototype.name = e, t.prototype.constructor = t, t;\n}\nconst t = e(\"LaunchDarklyUnexpectedResponseError\"),\n n = e(\"LaunchDarklyInvalidEnvironmentIdError\"),\n r = e(\"LaunchDarklyInvalidUserError\"),\n o = e(\"LaunchDarklyInvalidEventKeyError\"),\n i = e(\"LaunchDarklyInvalidArgumentError\"),\n a = e(\"LaunchDarklyFlagFetchError\");\nfor (var s = {\n LDUnexpectedResponseError: t,\n LDInvalidEnvironmentIdError: n,\n LDInvalidUserError: r,\n LDInvalidEventKeyError: o,\n LDInvalidArgumentError: i,\n LDInvalidDataError: e(\"LaunchDarklyInvalidDataError\"),\n LDFlagFetchError: a,\n LDTimeoutError: e(\"LaunchDarklyTimeoutError\"),\n isHttpErrorRecoverable: function (e) {\n return !(e >= 400 && e < 500) || 400 === e || 408 === e || 429 === e;\n }\n }, c = function (e) {\n var t = m(e),\n n = t[0],\n r = t[1];\n return 3 * (n + r) / 4 - r;\n }, u = function (e) {\n var t,\n n,\n r = m(e),\n o = r[0],\n i = r[1],\n a = new g(function (e, t, n) {\n return 3 * (t + n) / 4 - n;\n }(0, o, i)),\n s = 0,\n c = i > 0 ? o - 4 : o;\n for (n = 0; n < c; n += 4) t = f[e.charCodeAt(n)] << 18 | f[e.charCodeAt(n + 1)] << 12 | f[e.charCodeAt(n + 2)] << 6 | f[e.charCodeAt(n + 3)], a[s++] = t >> 16 & 255, a[s++] = t >> 8 & 255, a[s++] = 255 & t;\n 2 === i && (t = f[e.charCodeAt(n)] << 2 | f[e.charCodeAt(n + 1)] >> 4, a[s++] = 255 & t);\n 1 === i && (t = f[e.charCodeAt(n)] << 10 | f[e.charCodeAt(n + 1)] << 4 | f[e.charCodeAt(n + 2)] >> 2, a[s++] = t >> 8 & 255, a[s++] = 255 & t);\n return a;\n }, l = function (e) {\n for (var t, n = e.length, r = n % 3, o = [], i = 16383, a = 0, s = n - r; a < s; a += i) o.push(h(e, a, a + i > s ? s : a + i));\n 1 === r ? (t = e[n - 1], o.push(d[t >> 2] + d[t << 4 & 63] + \"==\")) : 2 === r && (t = (e[n - 2] << 8) + e[n - 1], o.push(d[t >> 10] + d[t >> 4 & 63] + d[t << 2 & 63] + \"=\"));\n return o.join(\"\");\n }, d = [], f = [], g = \"undefined\" != typeof Uint8Array ? Uint8Array : Array, v = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\", p = 0; p < 64; ++p) d[p] = v[p], f[v.charCodeAt(p)] = p;\nfunction m(e) {\n var t = e.length;\n if (t % 4 > 0) throw new Error(\"Invalid string. Length must be a multiple of 4\");\n var n = e.indexOf(\"=\");\n return -1 === n && (n = t), [n, n === t ? 0 : 4 - n % 4];\n}\nfunction h(e, t, n) {\n for (var r, o, i = [], a = t; a < n; a += 3) r = (e[a] << 16 & 16711680) + (e[a + 1] << 8 & 65280) + (255 & e[a + 2]), i.push(d[(o = r) >> 18 & 63] + d[o >> 12 & 63] + d[o >> 6 & 63] + d[63 & o]);\n return i.join(\"\");\n}\nf[\"-\".charCodeAt(0)] = 62, f[\"_\".charCodeAt(0)] = 63;\nvar y = {\n byteLength: c,\n toByteArray: u,\n fromByteArray: l\n },\n w = Array.isArray,\n b = Object.keys,\n k = Object.prototype.hasOwnProperty,\n E = function e(t, n) {\n if (t === n) return !0;\n if (t && n && \"object\" == typeof t && \"object\" == typeof n) {\n var r,\n o,\n i,\n a = w(t),\n s = w(n);\n if (a && s) {\n if ((o = t.length) != n.length) return !1;\n for (r = o; 0 != r--;) if (!e(t[r], n[r])) return !1;\n return !0;\n }\n if (a != s) return !1;\n var c = t instanceof Date,\n u = n instanceof Date;\n if (c != u) return !1;\n if (c && u) return t.getTime() == n.getTime();\n var l = t instanceof RegExp,\n d = n instanceof RegExp;\n if (l != d) return !1;\n if (l && d) return t.toString() == n.toString();\n var f = b(t);\n if ((o = f.length) !== b(n).length) return !1;\n for (r = o; 0 != r--;) if (!k.call(n, f[r])) return !1;\n for (r = o; 0 != r--;) if (!e(t[i = f[r]], n[i])) return !1;\n return !0;\n }\n return t != t && n != n;\n };\nconst D = [\"key\", \"ip\", \"country\", \"email\", \"firstName\", \"lastName\", \"avatar\", \"name\"];\nfunction x(e) {\n const t = unescape(encodeURIComponent(e));\n return y.fromByteArray(function (e) {\n const t = [];\n for (let n = 0; n < e.length; n++) t.push(e.charCodeAt(n));\n return t;\n }(t));\n}\nfunction C(e, t) {\n return Object.prototype.hasOwnProperty.call(e, t);\n}\nvar P,\n S = {\n appendUrlPath: function (e, t) {\n return (e.endsWith(\"/\") ? e.substring(0, e.length - 1) : e) + (t.startsWith(\"/\") ? \"\" : \"/\") + t;\n },\n base64URLEncode: function (e) {\n return x(e).replace(/=/g, \"\").replace(/\\+/g, \"-\").replace(/\\//g, \"_\");\n },\n btoa: x,\n clone: function (e) {\n return JSON.parse(JSON.stringify(e));\n },\n deepEquals: function (e, t) {\n return E(e, t);\n },\n extend: function (...e) {\n return e.reduce((e, t) => ({\n ...e,\n ...t\n }), {});\n },\n getLDUserAgentString: function (e) {\n const t = e.version || \"?\";\n return e.userAgent + \"/\" + t;\n },\n objectHasOwnProperty: C,\n onNextTick: function (e) {\n setTimeout(e, 0);\n },\n sanitizeContext: function (e) {\n if (!e) return e;\n let t;\n return null !== e.kind && void 0 !== e.kind || D.forEach(n => {\n const r = e[n];\n void 0 !== r && \"string\" != typeof r && (t = t || {\n ...e\n }, t[n] = String(r));\n }), t || e;\n },\n transformValuesToVersionedValues: function (e) {\n const t = {};\n for (const n in e) C(e, n) && (t[n] = {\n value: e[n],\n version: 0\n });\n return t;\n },\n transformVersionedValuesToValues: function (e) {\n const t = {};\n for (const n in e) C(e, n) && (t[n] = e[n].value);\n return t;\n },\n wrapPromiseCallback: function (e, t) {\n const n = e.then(e => (t && setTimeout(() => {\n t(null, e);\n }, 0), e), e => {\n if (!t) return Promise.reject(e);\n setTimeout(() => {\n t(e, null);\n }, 0);\n });\n return t ? void 0 : n;\n }\n },\n I = new Uint8Array(16);\nfunction O() {\n if (!P && !(P = \"undefined\" != typeof crypto && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || \"undefined\" != typeof msCrypto && \"function\" == typeof msCrypto.getRandomValues && msCrypto.getRandomValues.bind(msCrypto))) throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n return P(I);\n}\nvar T = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\nfunction L(e) {\n return \"string\" == typeof e && T.test(e);\n}\nfor (var U, R, A = [], j = 0; j < 256; ++j) A.push((j + 256).toString(16).substr(1));\nfunction F(e) {\n var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0,\n n = (A[e[t + 0]] + A[e[t + 1]] + A[e[t + 2]] + A[e[t + 3]] + \"-\" + A[e[t + 4]] + A[e[t + 5]] + \"-\" + A[e[t + 6]] + A[e[t + 7]] + \"-\" + A[e[t + 8]] + A[e[t + 9]] + \"-\" + A[e[t + 10]] + A[e[t + 11]] + A[e[t + 12]] + A[e[t + 13]] + A[e[t + 14]] + A[e[t + 15]]).toLowerCase();\n if (!L(n)) throw TypeError(\"Stringified UUID is invalid\");\n return n;\n}\nvar N = 0,\n $ = 0;\nfunction V(e) {\n if (!L(e)) throw TypeError(\"Invalid UUID\");\n var t,\n n = new Uint8Array(16);\n return n[0] = (t = parseInt(e.slice(0, 8), 16)) >>> 24, n[1] = t >>> 16 & 255, n[2] = t >>> 8 & 255, n[3] = 255 & t, n[4] = (t = parseInt(e.slice(9, 13), 16)) >>> 8, n[5] = 255 & t, n[6] = (t = parseInt(e.slice(14, 18), 16)) >>> 8, n[7] = 255 & t, n[8] = (t = parseInt(e.slice(19, 23), 16)) >>> 8, n[9] = 255 & t, n[10] = (t = parseInt(e.slice(24, 36), 16)) / 1099511627776 & 255, n[11] = t / 4294967296 & 255, n[12] = t >>> 24 & 255, n[13] = t >>> 16 & 255, n[14] = t >>> 8 & 255, n[15] = 255 & t, n;\n}\nfunction M(e, t, n) {\n function r(e, r, o, i) {\n if (\"string\" == typeof e && (e = function (e) {\n e = unescape(encodeURIComponent(e));\n for (var t = [], n = 0; n < e.length; ++n) t.push(e.charCodeAt(n));\n return t;\n }(e)), \"string\" == typeof r && (r = V(r)), 16 !== r.length) throw TypeError(\"Namespace must be array-like (16 iterable integer values, 0-255)\");\n var a = new Uint8Array(16 + e.length);\n if (a.set(r), a.set(e, r.length), (a = n(a))[6] = 15 & a[6] | t, a[8] = 63 & a[8] | 128, o) {\n i = i || 0;\n for (var s = 0; s < 16; ++s) o[i + s] = a[s];\n return o;\n }\n return F(a);\n }\n try {\n r.name = e;\n } catch (e) {}\n return r.DNS = \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\", r.URL = \"6ba7b811-9dad-11d1-80b4-00c04fd430c8\", r;\n}\nfunction q(e) {\n return 14 + (e + 64 >>> 9 << 4) + 1;\n}\nfunction H(e, t) {\n var n = (65535 & e) + (65535 & t);\n return (e >> 16) + (t >> 16) + (n >> 16) << 16 | 65535 & n;\n}\nfunction z(e, t, n, r, o, i) {\n return H((a = H(H(t, e), H(r, i))) << (s = o) | a >>> 32 - s, n);\n var a, s;\n}\nfunction K(e, t, n, r, o, i, a) {\n return z(t & n | ~t & r, e, t, o, i, a);\n}\nfunction _(e, t, n, r, o, i, a) {\n return z(t & r | n & ~r, e, t, o, i, a);\n}\nfunction J(e, t, n, r, o, i, a) {\n return z(t ^ n ^ r, e, t, o, i, a);\n}\nfunction B(e, t, n, r, o, i, a) {\n return z(n ^ (t | ~r), e, t, o, i, a);\n}\nvar G = M(\"v3\", 48, function (e) {\n if (\"string\" == typeof e) {\n var t = unescape(encodeURIComponent(e));\n e = new Uint8Array(t.length);\n for (var n = 0; n < t.length; ++n) e[n] = t.charCodeAt(n);\n }\n return function (e) {\n for (var t = [], n = 32 * e.length, r = \"0123456789abcdef\", o = 0; o < n; o += 8) {\n var i = e[o >> 5] >>> o % 32 & 255,\n a = parseInt(r.charAt(i >>> 4 & 15) + r.charAt(15 & i), 16);\n t.push(a);\n }\n return t;\n }(function (e, t) {\n e[t >> 5] |= 128 << t % 32, e[q(t) - 1] = t;\n for (var n = 1732584193, r = -271733879, o = -1732584194, i = 271733878, a = 0; a < e.length; a += 16) {\n var s = n,\n c = r,\n u = o,\n l = i;\n n = K(n, r, o, i, e[a], 7, -680876936), i = K(i, n, r, o, e[a + 1], 12, -389564586), o = K(o, i, n, r, e[a + 2], 17, 606105819), r = K(r, o, i, n, e[a + 3], 22, -1044525330), n = K(n, r, o, i, e[a + 4], 7, -176418897), i = K(i, n, r, o, e[a + 5], 12, 1200080426), o = K(o, i, n, r, e[a + 6], 17, -1473231341), r = K(r, o, i, n, e[a + 7], 22, -45705983), n = K(n, r, o, i, e[a + 8], 7, 1770035416), i = K(i, n, r, o, e[a + 9], 12, -1958414417), o = K(o, i, n, r, e[a + 10], 17, -42063), r = K(r, o, i, n, e[a + 11], 22, -1990404162), n = K(n, r, o, i, e[a + 12], 7, 1804603682), i = K(i, n, r, o, e[a + 13], 12, -40341101), o = K(o, i, n, r, e[a + 14], 17, -1502002290), n = _(n, r = K(r, o, i, n, e[a + 15], 22, 1236535329), o, i, e[a + 1], 5, -165796510), i = _(i, n, r, o, e[a + 6], 9, -1069501632), o = _(o, i, n, r, e[a + 11], 14, 643717713), r = _(r, o, i, n, e[a], 20, -373897302), n = _(n, r, o, i, e[a + 5], 5, -701558691), i = _(i, n, r, o, e[a + 10], 9, 38016083), o = _(o, i, n, r, e[a + 15], 14, -660478335), r = _(r, o, i, n, e[a + 4], 20, -405537848), n = _(n, r, o, i, e[a + 9], 5, 568446438), i = _(i, n, r, o, e[a + 14], 9, -1019803690), o = _(o, i, n, r, e[a + 3], 14, -187363961), r = _(r, o, i, n, e[a + 8], 20, 1163531501), n = _(n, r, o, i, e[a + 13], 5, -1444681467), i = _(i, n, r, o, e[a + 2], 9, -51403784), o = _(o, i, n, r, e[a + 7], 14, 1735328473), n = J(n, r = _(r, o, i, n, e[a + 12], 20, -1926607734), o, i, e[a + 5], 4, -378558), i = J(i, n, r, o, e[a + 8], 11, -2022574463), o = J(o, i, n, r, e[a + 11], 16, 1839030562), r = J(r, o, i, n, e[a + 14], 23, -35309556), n = J(n, r, o, i, e[a + 1], 4, -1530992060), i = J(i, n, r, o, e[a + 4], 11, 1272893353), o = J(o, i, n, r, e[a + 7], 16, -155497632), r = J(r, o, i, n, e[a + 10], 23, -1094730640), n = J(n, r, o, i, e[a + 13], 4, 681279174), i = J(i, n, r, o, e[a], 11, -358537222), o = J(o, i, n, r, e[a + 3], 16, -722521979), r = J(r, o, i, n, e[a + 6], 23, 76029189), n = J(n, r, o, i, e[a + 9], 4, -640364487), i = J(i, n, r, o, e[a + 12], 11, -421815835), o = J(o, i, n, r, e[a + 15], 16, 530742520), n = B(n, r = J(r, o, i, n, e[a + 2], 23, -995338651), o, i, e[a], 6, -198630844), i = B(i, n, r, o, e[a + 7], 10, 1126891415), o = B(o, i, n, r, e[a + 14], 15, -1416354905), r = B(r, o, i, n, e[a + 5], 21, -57434055), n = B(n, r, o, i, e[a + 12], 6, 1700485571), i = B(i, n, r, o, e[a + 3], 10, -1894986606), o = B(o, i, n, r, e[a + 10], 15, -1051523), r = B(r, o, i, n, e[a + 1], 21, -2054922799), n = B(n, r, o, i, e[a + 8], 6, 1873313359), i = B(i, n, r, o, e[a + 15], 10, -30611744), o = B(o, i, n, r, e[a + 6], 15, -1560198380), r = B(r, o, i, n, e[a + 13], 21, 1309151649), n = B(n, r, o, i, e[a + 4], 6, -145523070), i = B(i, n, r, o, e[a + 11], 10, -1120210379), o = B(o, i, n, r, e[a + 2], 15, 718787259), r = B(r, o, i, n, e[a + 9], 21, -343485551), n = H(n, s), r = H(r, c), o = H(o, u), i = H(i, l);\n }\n return [n, r, o, i];\n }(function (e) {\n if (0 === e.length) return [];\n for (var t = 8 * e.length, n = new Uint32Array(q(t)), r = 0; r < t; r += 8) n[r >> 5] |= (255 & e[r / 8]) << r % 32;\n return n;\n }(e), 8 * e.length));\n }),\n W = G;\nfunction X(e, t, n, r) {\n switch (e) {\n case 0:\n return t & n ^ ~t & r;\n case 1:\n case 3:\n return t ^ n ^ r;\n case 2:\n return t & n ^ t & r ^ n & r;\n }\n}\nfunction Q(e, t) {\n return e << t | e >>> 32 - t;\n}\nvar Y = M(\"v5\", 80, function (e) {\n var t = [1518500249, 1859775393, 2400959708, 3395469782],\n n = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];\n if (\"string\" == typeof e) {\n var r = unescape(encodeURIComponent(e));\n e = [];\n for (var o = 0; o < r.length; ++o) e.push(r.charCodeAt(o));\n } else Array.isArray(e) || (e = Array.prototype.slice.call(e));\n e.push(128);\n for (var i = e.length / 4 + 2, a = Math.ceil(i / 16), s = new Array(a), c = 0; c < a; ++c) {\n for (var u = new Uint32Array(16), l = 0; l < 16; ++l) u[l] = e[64 * c + 4 * l] << 24 | e[64 * c + 4 * l + 1] << 16 | e[64 * c + 4 * l + 2] << 8 | e[64 * c + 4 * l + 3];\n s[c] = u;\n }\n s[a - 1][14] = 8 * (e.length - 1) / Math.pow(2, 32), s[a - 1][14] = Math.floor(s[a - 1][14]), s[a - 1][15] = 8 * (e.length - 1) & 4294967295;\n for (var d = 0; d < a; ++d) {\n for (var f = new Uint32Array(80), g = 0; g < 16; ++g) f[g] = s[d][g];\n for (var v = 16; v < 80; ++v) f[v] = Q(f[v - 3] ^ f[v - 8] ^ f[v - 14] ^ f[v - 16], 1);\n for (var p = n[0], m = n[1], h = n[2], y = n[3], w = n[4], b = 0; b < 80; ++b) {\n var k = Math.floor(b / 20),\n E = Q(p, 5) + X(k, m, h, y) + w + t[k] + f[b] >>> 0;\n w = y, y = h, h = Q(m, 30) >>> 0, m = p, p = E;\n }\n n[0] = n[0] + p >>> 0, n[1] = n[1] + m >>> 0, n[2] = n[2] + h >>> 0, n[3] = n[3] + y >>> 0, n[4] = n[4] + w >>> 0;\n }\n return [n[0] >> 24 & 255, n[0] >> 16 & 255, n[0] >> 8 & 255, 255 & n[0], n[1] >> 24 & 255, n[1] >> 16 & 255, n[1] >> 8 & 255, 255 & n[1], n[2] >> 24 & 255, n[2] >> 16 & 255, n[2] >> 8 & 255, 255 & n[2], n[3] >> 24 & 255, n[3] >> 16 & 255, n[3] >> 8 & 255, 255 & n[3], n[4] >> 24 & 255, n[4] >> 16 & 255, n[4] >> 8 & 255, 255 & n[4]];\n }),\n Z = Y;\nvar ee = Object.freeze({\n __proto__: null,\n v1: function (e, t, n) {\n var r = t && n || 0,\n o = t || new Array(16),\n i = (e = e || {}).node || U,\n a = void 0 !== e.clockseq ? e.clockseq : R;\n if (null == i || null == a) {\n var s = e.random || (e.rng || O)();\n null == i && (i = U = [1 | s[0], s[1], s[2], s[3], s[4], s[5]]), null == a && (a = R = 16383 & (s[6] << 8 | s[7]));\n }\n var c = void 0 !== e.msecs ? e.msecs : Date.now(),\n u = void 0 !== e.nsecs ? e.nsecs : $ + 1,\n l = c - N + (u - $) / 1e4;\n if (l < 0 && void 0 === e.clockseq && (a = a + 1 & 16383), (l < 0 || c > N) && void 0 === e.nsecs && (u = 0), u >= 1e4) throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n N = c, $ = u, R = a;\n var d = (1e4 * (268435455 & (c += 122192928e5)) + u) % 4294967296;\n o[r++] = d >>> 24 & 255, o[r++] = d >>> 16 & 255, o[r++] = d >>> 8 & 255, o[r++] = 255 & d;\n var f = c / 4294967296 * 1e4 & 268435455;\n o[r++] = f >>> 8 & 255, o[r++] = 255 & f, o[r++] = f >>> 24 & 15 | 16, o[r++] = f >>> 16 & 255, o[r++] = a >>> 8 | 128, o[r++] = 255 & a;\n for (var g = 0; g < 6; ++g) o[r + g] = i[g];\n return t || F(o);\n },\n v3: W,\n v4: function (e, t, n) {\n var r = (e = e || {}).random || (e.rng || O)();\n if (r[6] = 15 & r[6] | 64, r[8] = 63 & r[8] | 128, t) {\n n = n || 0;\n for (var o = 0; o < 16; ++o) t[n + o] = r[o];\n return t;\n }\n return F(r);\n },\n v5: Z,\n NIL: \"00000000-0000-0000-0000-000000000000\",\n version: function (e) {\n if (!L(e)) throw TypeError(\"Invalid UUID\");\n return parseInt(e.substr(14, 1), 16);\n },\n validate: L,\n stringify: F,\n parse: V\n});\nconst te = [\"debug\", \"info\", \"warn\", \"error\", \"none\"];\nvar ne = {\n commonBasicLogger: function (e, t) {\n if (e && e.destination && \"function\" != typeof e.destination) throw new Error(\"destination for basicLogger was set to a non-function\");\n function n(e) {\n return function (t) {\n console && console[e] && console[e].call(console, t);\n };\n }\n const r = e && e.destination ? [e.destination, e.destination, e.destination, e.destination] : [n(\"log\"), n(\"info\"), n(\"warn\"), n(\"error\")],\n o = !(!e || !e.destination),\n i = e && void 0 !== e.prefix && null !== e.prefix ? e.prefix : \"[LaunchDarkly] \";\n let a = 1;\n if (e && e.level) for (let t = 0; t < te.length; t++) te[t] === e.level && (a = t);\n function s(e, n, a) {\n if (a.length < 1) return;\n let s;\n const c = o ? n + \": \" + i : i;\n if (1 !== a.length && t) {\n const e = [...a];\n e[0] = c + e[0], s = t(...e);\n } else s = c + a[0];\n try {\n r[e](s);\n } catch (e) {\n console && console.log && console.log(\"[LaunchDarkly] Configured logger's \" + n + \" method threw an exception: \" + e);\n }\n }\n const c = {};\n for (let e = 0; e < te.length; e++) {\n const t = te[e];\n if (\"none\" !== t) if (e < a) c[t] = () => {};else {\n const n = e;\n c[t] = function () {\n s(n, t, arguments);\n };\n }\n }\n return c;\n },\n validateLogger: function (e) {\n te.forEach(t => {\n if (\"none\" !== t && (!e[t] || \"function\" != typeof e[t])) throw new Error(\"Provided logger instance must support logger.\" + t + \"(...) method\");\n });\n }\n};\nfunction re(e) {\n return e && e.message ? e.message : \"string\" == typeof e || e instanceof String ? e : JSON.stringify(e);\n}\nconst oe = \" Please see https://docs.launchdarkly.com/sdk/client-side/javascript#initialize-the-client for instructions on SDK initialization.\";\nvar ie = {\n bootstrapInvalid: function () {\n return \"LaunchDarkly bootstrap data is not available because the back end could not read the flags.\";\n },\n bootstrapOldFormat: function () {\n return \"LaunchDarkly client was initialized with bootstrap data that did not include flag metadata. Events may not be sent correctly.\" + oe;\n },\n clientInitialized: function () {\n return \"LaunchDarkly client initialized\";\n },\n clientNotReady: function () {\n return \"LaunchDarkly client is not ready\";\n },\n debugEnqueueingEvent: function (e) {\n return 'enqueueing \"' + e + '\" event';\n },\n debugPostingDiagnosticEvent: function (e) {\n return \"sending diagnostic event (\" + e.kind + \")\";\n },\n debugPostingEvents: function (e) {\n return \"sending \" + e + \" events\";\n },\n debugStreamDelete: function (e) {\n return 'received streaming deletion for flag \"' + e + '\"';\n },\n debugStreamDeleteIgnored: function (e) {\n return 'received streaming deletion for flag \"' + e + '\" but ignored due to version check';\n },\n debugStreamPatch: function (e) {\n return 'received streaming update for flag \"' + e + '\"';\n },\n debugStreamPatchIgnored: function (e) {\n return 'received streaming update for flag \"' + e + '\" but ignored due to version check';\n },\n debugStreamPing: function () {\n return \"received ping message from stream\";\n },\n debugPolling: function (e) {\n return \"polling for feature flags at \" + e;\n },\n debugStreamPut: function () {\n return \"received streaming update for all flags\";\n },\n deprecated: function (e, t) {\n return t ? '\"' + e + '\" is deprecated, please use \"' + t + '\"' : '\"' + e + '\" is deprecated';\n },\n environmentNotFound: function () {\n return \"Environment not found. Double check that you specified a valid environment/client-side ID.\" + oe;\n },\n environmentNotSpecified: function () {\n return \"No environment/client-side ID was specified.\" + oe;\n },\n errorFetchingFlags: function (e) {\n return \"Error fetching flag settings: \" + re(e);\n },\n eventCapacityExceeded: function () {\n return \"Exceeded event queue capacity. Increase capacity to avoid dropping events.\";\n },\n eventWithoutContext: function () {\n return \"Be sure to call `identify` in the LaunchDarkly client: https://docs.launchdarkly.com/sdk/features/identify#javascript\";\n },\n httpErrorMessage: function (e, t, n) {\n return \"Received error \" + e + (401 === e ? \" (invalid SDK key)\" : \"\") + \" for \" + t + \" - \" + (s.isHttpErrorRecoverable(e) ? n : \"giving up permanently\");\n },\n httpUnavailable: function () {\n return \"Cannot make HTTP requests in this environment.\" + oe;\n },\n identifyDisabled: function () {\n return \"identify() has no effect here; it must be called on the main client instance\";\n },\n inspectorMethodError: (e, t) => `an inspector: \"${t}\" of type: \"${e}\" generated an exception`,\n invalidContentType: function (e) {\n return 'Expected application/json content type but got \"' + e + '\"';\n },\n invalidData: function () {\n return \"Invalid data received from LaunchDarkly; connection may have been interrupted\";\n },\n invalidInspector: (e, t) => `an inspector: \"${t}\" of an invalid type (${e}) was configured`,\n invalidKey: function () {\n return \"Event key must be a string\";\n },\n invalidMetricValue: e => `The track function was called with a non-numeric \"metricValue\" (${e}), only numeric metric values are supported.`,\n invalidContext: function () {\n return \"Invalid context specified.\" + oe;\n },\n invalidTagValue: e => `Config option \"${e}\" must only contain letters, numbers, ., _ or -.`,\n localStorageUnavailable: function (e) {\n return \"local storage is unavailable: \" + re(e);\n },\n networkError: e => \"network error\" + (e ? \" (\" + e + \")\" : \"\"),\n optionBelowMinimum: (e, t, n) => 'Config option \"' + e + '\" was set to ' + t + \", changing to minimum value of \" + n,\n streamClosing: function () {\n return \"Closing stream connection\";\n },\n streamConnecting: function (e) {\n return \"Opening stream connection to \" + e;\n },\n streamError: function (e, t) {\n return \"Error on stream connection: \" + re(e) + \", will continue retrying after \" + t + \" milliseconds.\";\n },\n tagValueTooLong: e => `Value of \"${e}\" was longer than 64 characters and was discarded.`,\n unknownCustomEventKey: function (e) {\n return 'Custom event \"' + e + '\" does not exist';\n },\n unknownOption: e => 'Ignoring unknown config option \"' + e + '\"',\n contextNotSpecified: function () {\n return \"No context specified.\" + oe;\n },\n unrecoverableStreamError: e => `Error on stream connection ${re(e)}, giving up permanently`,\n wrongOptionType: (e, t, n) => 'Config option \"' + e + '\" should be of type ' + t + \", got \" + n + \", using default value\",\n wrongOptionTypeBoolean: (e, t) => 'Config option \"' + e + '\" should be a boolean, got ' + t + \", converting to boolean\"\n};\nconst {\n validateLogger: ae\n } = ne,\n se = {\n baseUrl: {\n default: \"https://app.launchdarkly.com\"\n },\n streamUrl: {\n default: \"https://clientstream.launchdarkly.com\"\n },\n eventsUrl: {\n default: \"https://events.launchdarkly.com\"\n },\n sendEvents: {\n default: !0\n },\n streaming: {\n type: \"boolean\"\n },\n sendLDHeaders: {\n default: !0\n },\n requestHeaderTransform: {\n type: \"function\"\n },\n sendEventsOnlyForVariation: {\n default: !1\n },\n useReport: {\n default: !1\n },\n evaluationReasons: {\n default: !1\n },\n eventCapacity: {\n default: 100,\n minimum: 1\n },\n flushInterval: {\n default: 2e3,\n minimum: 2e3\n },\n samplingInterval: {\n default: 0,\n minimum: 0\n },\n streamReconnectDelay: {\n default: 1e3,\n minimum: 0\n },\n allAttributesPrivate: {\n default: !1\n },\n privateAttributes: {\n default: []\n },\n bootstrap: {\n type: \"string|object\"\n },\n diagnosticRecordingInterval: {\n default: 9e5,\n minimum: 2e3\n },\n diagnosticOptOut: {\n default: !1\n },\n wrapperName: {\n type: \"string\"\n },\n wrapperVersion: {\n type: \"string\"\n },\n stateProvider: {\n type: \"object\"\n },\n application: {\n validator: function (e, t, n) {\n const r = {};\n t.id && (r.id = le(`${e}.id`, t.id, n));\n t.version && (r.version = le(`${e}.version`, t.version, n));\n return r;\n }\n },\n inspectors: {\n default: []\n }\n },\n ce = /^(\\w|\\.|-)+$/;\nfunction ue(e) {\n return e && e.replace(/\\/+$/, \"\");\n}\nfunction le(e, t, n) {\n if (\"string\" == typeof t && t.match(ce)) {\n if (!(t.length > 64)) return t;\n n.warn(ie.tagValueTooLong(e));\n } else n.warn(ie.invalidTagValue(e));\n}\nvar de = {\n baseOptionDefs: se,\n validate: function (e, t, n, r) {\n const o = S.extend({\n logger: {\n default: r\n }\n }, se, n),\n i = {};\n function a(e) {\n S.onNextTick(() => {\n t && t.maybeReportError(new s.LDInvalidArgumentError(e));\n });\n }\n let c = S.extend({}, e || {});\n return function (e) {\n const t = e;\n Object.keys(i).forEach(e => {\n if (void 0 !== t[e]) {\n const n = i[e];\n r && r.warn(ie.deprecated(e, n)), n && (void 0 === t[n] && (t[n] = t[e]), delete t[e]);\n }\n });\n }(c), c = function (e) {\n const t = S.extend({}, e);\n return Object.keys(o).forEach(e => {\n void 0 !== t[e] && null !== t[e] || (t[e] = o[e] && o[e].default);\n }), t;\n }(c), c = function (e) {\n const t = S.extend({}, e),\n n = e => {\n if (null === e) return \"any\";\n if (void 0 === e) return;\n if (Array.isArray(e)) return \"array\";\n const t = typeof e;\n return \"boolean\" === t || \"string\" === t || \"number\" === t || \"function\" === t ? t : \"object\";\n };\n return Object.keys(e).forEach(i => {\n const s = e[i];\n if (null != s) {\n const c = o[i];\n if (void 0 === c) a(ie.unknownOption(i));else {\n const o = c.type || n(c.default),\n u = c.validator;\n if (u) {\n const n = u(i, e[i], r);\n void 0 !== n ? t[i] = n : delete t[i];\n } else if (\"any\" !== o) {\n const e = o.split(\"|\"),\n r = n(s);\n e.indexOf(r) < 0 ? \"boolean\" === o ? (t[i] = !!s, a(ie.wrongOptionTypeBoolean(i, r))) : (a(ie.wrongOptionType(i, o, r)), t[i] = c.default) : \"number\" === r && void 0 !== c.minimum && s < c.minimum && (a(ie.optionBelowMinimum(i, s, c.minimum)), t[i] = c.minimum);\n }\n }\n }\n }), t.baseUrl = ue(t.baseUrl), t.streamUrl = ue(t.streamUrl), t.eventsUrl = ue(t.eventsUrl), t;\n }(c), ae(c.logger), c;\n },\n getTags: function (e) {\n const t = {};\n return e && (e.application && void 0 !== e.application.id && null !== e.application.id && (t[\"application-id\"] = [e.application.id]), e.application && void 0 !== e.application.version && null !== e.application.id && (t[\"application-version\"] = [e.application.version])), t;\n }\n};\nconst {\n getLDUserAgentString: fe\n} = S;\nvar ge = {\n getLDHeaders: function (e, t) {\n if (t && !t.sendLDHeaders) return {};\n const n = {};\n n[e.userAgentHeaderName || \"User-Agent\"] = fe(e), t && t.wrapperName && (n[\"X-LaunchDarkly-Wrapper\"] = t.wrapperVersion ? t.wrapperName + \"/\" + t.wrapperVersion : t.wrapperName);\n const r = de.getTags(t),\n o = Object.keys(r);\n return o.length && (n[\"x-launchdarkly-tags\"] = o.sort().map(e => Array.isArray(r[e]) ? r[e].sort().map(t => `${e}/${t}`) : [`${e}/${r[e]}`]).reduce((e, t) => e.concat(t), []).join(\" \")), n;\n },\n transformHeaders: function (e, t) {\n return t && t.requestHeaderTransform ? t.requestHeaderTransform({\n ...e\n }) : e;\n }\n};\nconst {\n v1: ve\n } = ee,\n {\n getLDHeaders: pe,\n transformHeaders: me\n } = ge;\nvar he = function (e, t, n) {\n const r = S.extend({\n \"Content-Type\": \"application/json\"\n }, pe(e, n)),\n o = {};\n return o.sendEvents = (t, o, i) => {\n if (!e.httpRequest) return Promise.resolve();\n const a = JSON.stringify(t),\n c = i ? null : ve();\n return function t(u) {\n const l = i ? r : S.extend({}, r, {\n \"X-LaunchDarkly-Event-Schema\": \"4\",\n \"X-LaunchDarkly-Payload-ID\": c\n });\n return e.httpRequest(\"POST\", o, me(l, n), a).promise.then(e => {\n if (e) return e.status >= 400 && s.isHttpErrorRecoverable(e.status) && u ? t(!1) : function (e) {\n const t = {\n status: e.status\n },\n n = e.header(\"date\");\n if (n) {\n const e = Date.parse(n);\n e && (t.serverTime = e);\n }\n return t;\n }(e);\n }).catch(() => u ? t(!1) : Promise.reject());\n }(!0).catch(() => {});\n }, o;\n};\nconst {\n commonBasicLogger: ye\n} = ne;\nfunction we(e) {\n return \"string\" == typeof e && \"kind\" !== e && e.match(/^(\\w|\\.|-)+$/);\n}\nfunction be(e) {\n return e.includes(\"%\") || e.includes(\":\") ? e.replace(/%/g, \"%25\").replace(/:/g, \"%3A\") : e;\n}\nvar ke = {\n checkContext: function (e, t) {\n if (e) {\n if (t && (void 0 === e.kind || null === e.kind)) return void 0 !== e.key && null !== e.key;\n const n = e.key,\n r = void 0 === e.kind ? \"user\" : e.kind,\n o = we(r),\n i = \"multi\" === r || null != n && \"\" !== n;\n if (\"multi\" === r) {\n const t = Object.keys(e).filter(e => \"kind\" !== e);\n return i && t.every(e => we(e)) && t.every(t => {\n const n = e[t].key;\n return null != n && \"\" !== n;\n });\n }\n return i && o;\n }\n return !1;\n },\n getContextKeys: function (e, t = ye()) {\n if (!e) return;\n const n = {},\n {\n kind: r,\n key: o\n } = e;\n switch (r) {\n case void 0:\n n.user = `${o}`;\n break;\n case \"multi\":\n Object.entries(e).filter(([e]) => \"kind\" !== e).forEach(([e, t]) => {\n t && t.key && (n[e] = t.key);\n });\n break;\n case null:\n t.warn(`null is not a valid context kind: ${e}`);\n break;\n case \"\":\n t.warn(`'' is not a valid context kind: ${e}`);\n break;\n default:\n n[r] = `${o}`;\n }\n return n;\n },\n getContextKinds: function (e) {\n return e ? null === e.kind || void 0 === e.kind ? [\"user\"] : \"multi\" !== e.kind ? [e.kind] : Object.keys(e).filter(e => \"kind\" !== e) : [];\n },\n getCanonicalKey: function (e) {\n if (e) {\n if ((void 0 === e.kind || null === e.kind || \"user\" === e.kind) && e.key) return e.key;\n if (\"multi\" !== e.kind && e.key) return `${e.kind}:${be(e.key)}`;\n if (\"multi\" === e.kind) return Object.keys(e).sort().filter(e => \"kind\" !== e).map(t => `${t}:${be(e[t].key)}`).join(\":\");\n }\n }\n};\nconst {\n getContextKinds: Ee\n} = ke;\nvar De = function () {\n const e = {};\n let t = 0,\n n = 0,\n r = {},\n o = {};\n return e.summarizeEvent = e => {\n if (\"feature\" === e.kind) {\n const i = e.key + \":\" + (null !== e.variation && void 0 !== e.variation ? e.variation : \"\") + \":\" + (null !== e.version && void 0 !== e.version ? e.version : \"\"),\n a = r[i];\n let s = o[e.key];\n s || (s = new Set(), o[e.key] = s), function (e) {\n return e.context ? Ee(e.context) : e.contextKeys ? Object.keys(e.contextKeys) : [];\n }(e).forEach(e => s.add(e)), a ? a.count = a.count + 1 : r[i] = {\n count: 1,\n key: e.key,\n version: e.version,\n variation: e.variation,\n value: e.value,\n default: e.default\n }, (0 === t || e.creationDate < t) && (t = e.creationDate), e.creationDate > n && (n = e.creationDate);\n }\n }, e.getSummary = () => {\n const e = {};\n let i = !0;\n for (const t of Object.values(r)) {\n let n = e[t.key];\n n || (n = {\n default: t.default,\n counters: [],\n contextKinds: [...o[t.key]]\n }, e[t.key] = n);\n const r = {\n value: t.value,\n count: t.count\n };\n void 0 !== t.variation && null !== t.variation && (r.variation = t.variation), void 0 !== t.version && null !== t.version ? r.version = t.version : r.unknown = !0, n.counters.push(r), i = !1;\n }\n return i ? null : {\n startDate: t,\n endDate: n,\n features: e\n };\n }, e.clearSummary = () => {\n t = 0, n = 0, r = {}, o = {};\n }, e;\n};\nfunction xe(e) {\n return e.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n}\nfunction Ce(e) {\n return (e.startsWith(\"/\") ? e.substring(1) : e).split(\"/\").map(e => e.indexOf(\"~\") >= 0 ? e.replace(/~1/g, \"/\").replace(/~0/g, \"~\") : e);\n}\nfunction Pe(e) {\n return !e.startsWith(\"/\");\n}\nfunction Se(e, t) {\n const n = Pe(e),\n r = Pe(t);\n if (n && r) return e === t;\n if (n) {\n const n = Ce(t);\n return 1 === n.length && e === n[0];\n }\n if (r) {\n const n = Ce(e);\n return 1 === n.length && t === n[0];\n }\n return e === t;\n}\nfunction Ie(e) {\n return `/${xe(e)}`;\n}\nvar Oe = {\n cloneExcluding: function (e, t) {\n const n = [],\n r = {},\n o = [];\n for (n.push(...Object.keys(e).map(t => ({\n key: t,\n ptr: Ie(t),\n source: e,\n parent: r,\n visited: [e]\n }))); n.length;) {\n const e = n.pop();\n if (t.some(t => Se(t, e.ptr))) o.push(e.ptr);else {\n const t = e.source[e.key];\n if (null === t) e.parent[e.key] = t;else if (Array.isArray(t)) e.parent[e.key] = [...t];else if (\"object\" == typeof t) {\n if (e.visited.includes(t)) continue;\n e.parent[e.key] = {}, n.push(...Object.keys(t).map(n => {\n return {\n key: n,\n ptr: (r = e.ptr, o = xe(n), `${r}/${o}`),\n source: t,\n parent: e.parent[e.key],\n visited: [...e.visited, t]\n };\n var r, o;\n }));\n } else e.parent[e.key] = t;\n }\n }\n return {\n cloned: r,\n excluded: o.sort()\n };\n },\n compare: Se,\n literalToReference: Ie\n};\nvar Te = function (e) {\n const t = {},\n n = e.allAttributesPrivate,\n r = e.privateAttributes || [],\n o = [\"key\", \"kind\", \"_meta\", \"anonymous\"],\n i = [\"name\", \"ip\", \"firstName\", \"lastName\", \"email\", \"avatar\", \"country\"],\n a = (e, t) => {\n if (\"object\" != typeof e || null === e || Array.isArray(e)) return;\n const {\n cloned: i,\n excluded: a\n } = Oe.cloneExcluding(e, ((e, t) => (n || t && e.anonymous ? Object.keys(e) : [...r, ...(e._meta && e._meta.privateAttributes || [])]).filter(e => !o.some(t => Oe.compare(e, t))))(e, t));\n return i.key = String(i.key), a.length && (i._meta || (i._meta = {}), i._meta.redactedAttributes = a), i._meta && (delete i._meta.privateAttributes, 0 === Object.keys(i._meta).length && delete i._meta), void 0 !== i.anonymous && (i.anonymous = !!i.anonymous), i;\n };\n return t.filter = (e, t = !1) => void 0 === e.kind || null === e.kind ? a((e => {\n const t = {\n ...(e.custom || {}),\n kind: \"user\",\n key: e.key\n };\n void 0 !== e.anonymous && (t.anonymous = !!e.anonymous);\n for (const n of i) delete t[n], void 0 !== e[n] && null !== e[n] && (t[n] = String(e[n]));\n return void 0 !== e.privateAttributeNames && null !== e.privateAttributeNames && (t._meta = t._meta || {}, t._meta.privateAttributes = e.privateAttributeNames.map(e => e.startsWith(\"/\") ? Oe.literalToReference(e) : e)), t;\n })(e), t) : \"multi\" === e.kind ? ((e, t) => {\n const n = {\n kind: e.kind\n },\n r = Object.keys(e);\n for (const o of r) if (\"kind\" !== o) {\n const r = a(e[o], t);\n r && (n[o] = r);\n }\n return n;\n })(e, t) : a(e, t), t;\n};\nconst {\n getContextKeys: Le\n} = ke;\nvar Ue = function (e, t, n, r = null, o = null, i = null) {\n const a = {},\n c = i || he(e, n, t),\n u = S.appendUrlPath(t.eventsUrl, \"/events/bulk/\" + n),\n l = De(),\n d = Te(t),\n f = t.samplingInterval,\n g = t.eventCapacity,\n v = t.flushInterval,\n p = t.logger;\n let m,\n h = [],\n y = 0,\n w = !1,\n b = !1;\n function k() {\n return 0 === f || 0 === Math.floor(Math.random() * f);\n }\n function E(e) {\n const t = S.extend({}, e);\n return \"identify\" === e.kind ? t.context = d.filter(e.context) : \"feature\" === e.kind ? t.context = d.filter(e.context, !0) : (t.contextKeys = Le(e.context, p), delete t.context), \"feature\" === e.kind && (delete t.trackEvents, delete t.debugEventsUntilDate), t;\n }\n function D(e) {\n h.length < g ? (h.push(e), b = !1) : (b || (b = !0, p.warn(ie.eventCapacityExceeded())), r && r.incrementDroppedEvents());\n }\n return a.enqueue = function (e) {\n if (w) return;\n let t = !1,\n n = !1;\n var r;\n if (l.summarizeEvent(e), \"feature\" === e.kind ? k() && (t = !!e.trackEvents, n = !!(r = e).debugEventsUntilDate && r.debugEventsUntilDate > y && r.debugEventsUntilDate > new Date().getTime()) : t = k(), t && D(E(e)), n) {\n const t = S.extend({}, e, {\n kind: \"debug\"\n });\n t.context = d.filter(t.context), delete t.trackEvents, delete t.debugEventsUntilDate, D(t);\n }\n }, a.flush = function () {\n if (w) return Promise.resolve();\n const e = h,\n t = l.getSummary();\n return l.clearSummary(), t && (t.kind = \"summary\", e.push(t)), r && r.setEventsInLastBatch(e.length), 0 === e.length ? Promise.resolve() : (h = [], p.debug(ie.debugPostingEvents(e.length)), c.sendEvents(e, u).then(e => {\n e && (e.serverTime && (y = e.serverTime), s.isHttpErrorRecoverable(e.status) || (w = !0), e.status >= 400 && S.onNextTick(() => {\n o.maybeReportError(new s.LDUnexpectedResponseError(ie.httpErrorMessage(e.status, \"event posting\", \"some events were dropped\")));\n }));\n }));\n }, a.start = function () {\n const e = () => {\n a.flush(), m = setTimeout(e, v);\n };\n m = setTimeout(e, v);\n }, a.stop = function () {\n clearTimeout(m);\n }, a;\n};\nvar Re = function (e) {\n const t = {},\n n = {};\n return t.on = function (e, t, r) {\n n[e] = n[e] || [], n[e] = n[e].concat({\n handler: t,\n context: r\n });\n }, t.off = function (e, t, r) {\n if (n[e]) for (let o = 0; o < n[e].length; o++) n[e][o].handler === t && n[e][o].context === r && (n[e] = n[e].slice(0, o).concat(n[e].slice(o + 1)));\n }, t.emit = function (e) {\n if (!n[e]) return;\n const t = n[e].slice(0);\n for (let e = 0; e < t.length; e++) t[e].handler.apply(t[e].context, Array.prototype.slice.call(arguments, 1));\n }, t.getEvents = function () {\n return Object.keys(n);\n }, t.getEventListenerCount = function (e) {\n return n[e] ? n[e].length : 0;\n }, t.maybeReportError = function (t) {\n t && (n[\"error\"] ? this.emit(\"error\", t) : (e || console).error(t.message));\n }, t;\n};\nconst Ae = \"ready\",\n je = \"initialized\",\n Fe = \"failed\";\nvar Ne = function (e) {\n let t = !1,\n n = !1,\n r = null,\n o = null;\n const i = new Promise(t => {\n const n = () => {\n e.off(Ae, n), t();\n };\n e.on(Ae, n);\n }).catch(() => {});\n return {\n getInitializationPromise: () => o || (t ? Promise.resolve() : n ? Promise.reject(r) : (o = new Promise((t, n) => {\n const r = () => {\n e.off(je, r), t();\n },\n o = t => {\n e.off(Fe, o), n(t);\n };\n e.on(je, r), e.on(Fe, o);\n }), o)),\n getReadyPromise: () => i,\n signalSuccess: () => {\n t || n || (t = !0, e.emit(je), e.emit(Ae));\n },\n signalFailure: o => {\n t || n || (n = !0, r = o, e.emit(Fe, o), e.emit(Ae)), e.maybeReportError(o);\n }\n };\n};\nvar $e = function (e, t, n, r) {\n const o = {};\n function i() {\n let e = \"\";\n const o = r.getContext();\n return o && (e = n || S.btoa(JSON.stringify(o))), \"ld:\" + t + \":\" + e;\n }\n return o.loadFlags = () => e.get(i()).then(e => {\n if (null == e) return null;\n try {\n let t = JSON.parse(e);\n if (t) {\n const e = t.$schema;\n void 0 === e || e < 1 ? t = S.transformValuesToVersionedValues(t) : delete t.$schema;\n }\n return t;\n } catch (e) {\n return o.clearFlags().then(() => null);\n }\n }), o.saveFlags = t => {\n const n = S.extend({}, t, {\n $schema: 1\n });\n return e.set(i(), JSON.stringify(n));\n }, o.clearFlags = () => e.clear(i()), o;\n};\nvar Ve = function (e, t) {\n const n = {};\n let r = !1;\n const o = e => {\n r || (r = !0, t.warn(ie.localStorageUnavailable(e)));\n };\n return n.isEnabled = () => !!e, n.get = t => new Promise(n => {\n e ? e.get(t).then(n).catch(e => {\n o(e), n(void 0);\n }) : n(void 0);\n }), n.set = (t, n) => new Promise(r => {\n e ? e.set(t, n).then(() => r(!0)).catch(e => {\n o(e), r(!1);\n }) : r(!1);\n }), n.clear = t => new Promise(n => {\n e ? e.clear(t).then(() => n(!0)).catch(e => {\n o(e), n(!1);\n }) : n(!1);\n }), n;\n};\nconst {\n appendUrlPath: Me,\n base64URLEncode: qe,\n objectHasOwnProperty: He\n } = S,\n {\n getLDHeaders: ze,\n transformHeaders: Ke\n } = ge,\n {\n isHttpErrorRecoverable: _e\n } = s;\nvar Je = function (e, t, n, r) {\n const o = t.streamUrl,\n i = t.logger,\n a = {},\n s = Me(o, \"/eval/\" + n),\n c = t.useReport,\n u = t.evaluationReasons,\n l = t.streamReconnectDelay,\n d = ze(e, t);\n let f,\n g = !1,\n v = null,\n p = null,\n m = null,\n h = null,\n y = null,\n w = 0;\n function b() {\n const e = (t = function () {\n const e = l * Math.pow(2, w);\n return e > 3e4 ? 3e4 : e;\n }(), t - Math.trunc(.5 * Math.random() * t));\n var t;\n return w += 1, e;\n }\n function k(e) {\n if (e.status && \"number\" == typeof e.status && !_e(e.status)) return x(), i.error(ie.unrecoverableStreamError(e)), void (p && (clearTimeout(p), p = null));\n const t = b();\n g || (i.warn(ie.streamError(e, t)), g = !0), C(!1), x(), E(t);\n }\n function E(e) {\n p || (e ? p = setTimeout(D, e) : D());\n }\n function D() {\n let r;\n p = null;\n let a = \"\";\n const l = {\n headers: d,\n readTimeoutMillis: 3e5\n };\n if (e.eventSourceFactory) {\n null != h && (a = \"h=\" + h), c ? e.eventSourceAllowsReport ? (r = s, l.method = \"REPORT\", l.headers[\"Content-Type\"] = \"application/json\", l.body = JSON.stringify(m)) : (r = Me(o, \"/ping/\" + n), a = \"\") : r = s + \"/\" + qe(JSON.stringify(m)), l.headers = Ke(l.headers, t), u && (a = a + (a ? \"&\" : \"\") + \"withReasons=true\"), r = r + (a ? \"?\" : \"\") + a, x(), i.info(ie.streamConnecting(r)), f = new Date().getTime(), v = e.eventSourceFactory(r, l);\n for (const e in y) He(y, e) && v.addEventListener(e, y[e]);\n v.onerror = k, v.onopen = () => {\n w = 0;\n };\n }\n }\n function x() {\n v && (i.info(ie.streamClosing()), v.close(), v = null);\n }\n function C(e) {\n f && r && r.recordStreamInit(f, !e, new Date().getTime() - f), f = null;\n }\n return a.connect = function (e, t, n) {\n m = e, h = t, y = {};\n for (const e in n || {}) y[e] = function (t) {\n g = !1, C(!0), n[e] && n[e](t);\n };\n E();\n }, a.disconnect = function () {\n clearTimeout(p), p = null, x();\n }, a.isConnected = function () {\n return !!(v && e.eventSourceIsActive && e.eventSourceIsActive(v));\n }, a;\n};\nvar Be = function (e) {\n let t, n, r, o;\n const i = {\n addPromise: (i, a) => {\n t = i, n && n(), n = a, i.then(n => {\n t === i && (r(n), e && e());\n }, n => {\n t === i && (o(n), e && e());\n });\n }\n };\n return i.resultPromise = new Promise((e, t) => {\n r = e, o = t;\n }), i;\n};\nconst {\n transformHeaders: Ge,\n getLDHeaders: We\n } = ge,\n Xe = \"application/json\";\nvar Qe = function (e, t, n) {\n const r = t.baseUrl,\n o = t.useReport,\n i = t.evaluationReasons,\n a = t.logger,\n c = {},\n u = {};\n function l(n, r) {\n if (!e.httpRequest) return new Promise((e, t) => {\n t(new s.LDFlagFetchError(ie.httpUnavailable()));\n });\n const o = r ? \"REPORT\" : \"GET\",\n i = We(e, t);\n r && (i[\"Content-Type\"] = Xe);\n let a = u[n];\n a || (a = Be(() => {\n delete u[n];\n }), u[n] = a);\n const c = e.httpRequest(o, n, Ge(i, t), r),\n l = c.promise.then(e => {\n if (200 === e.status) {\n if (e.header(\"content-type\") && e.header(\"content-type\").substring(0, 16) === Xe) return JSON.parse(e.body);\n {\n const t = ie.invalidContentType(e.header(\"content-type\") || \"\");\n return Promise.reject(new s.LDFlagFetchError(t));\n }\n }\n return Promise.reject(function (e) {\n return 404 === e.status ? new s.LDInvalidEnvironmentIdError(ie.environmentNotFound()) : new s.LDFlagFetchError(ie.errorFetchingFlags(e.statusText || String(e.status)));\n }(e));\n }, e => Promise.reject(new s.LDFlagFetchError(ie.networkError(e))));\n return a.addPromise(l, () => {\n c.cancel && c.cancel();\n }), a.resultPromise;\n }\n return c.fetchJSON = function (e) {\n return l(S.appendUrlPath(r, e), null);\n }, c.fetchFlagSettings = function (e, t) {\n let s,\n c,\n u,\n d = \"\";\n return o ? (c = [r, \"/sdk/evalx/\", n, \"/context\"].join(\"\"), u = JSON.stringify(e)) : (s = S.base64URLEncode(JSON.stringify(e)), c = [r, \"/sdk/evalx/\", n, \"/contexts/\", s].join(\"\")), t && (d = \"h=\" + t), i && (d = d + (d ? \"&\" : \"\") + \"withReasons=true\"), c = c + (d ? \"?\" : \"\") + d, a.debug(ie.debugPolling(c)), l(c, u);\n }, c;\n};\nvar Ye = function (e, t) {\n const n = {};\n let r;\n return n.setContext = function (e) {\n r = S.sanitizeContext(e), r && t && t(S.clone(r));\n }, n.getContext = function () {\n return r ? S.clone(r) : null;\n }, e && n.setContext(e), n;\n};\nconst {\n v1: Ze\n } = ee,\n {\n getContextKinds: et\n } = ke;\nvar tt = function (e) {\n function t(e) {\n return null == e || \"user\" === e ? \"ld:$anonUserId\" : `ld:$contextKey:${e}`;\n }\n function n(n, r) {\n return null !== r.key && void 0 !== r.key ? (r.key = r.key.toString(), Promise.resolve(r)) : r.anonymous ? function (n) {\n return e.get(t(n));\n }(n).then(o => {\n if (o) return r.key = o, r;\n {\n const o = Ze();\n return r.key = o, function (n, r) {\n return e.set(t(r), n);\n }(o, n).then(() => r);\n }\n }) : Promise.reject(new s.LDInvalidUserError(ie.invalidContext()));\n }\n this.processContext = e => {\n if (!e) return Promise.reject(new s.LDInvalidUserError(ie.contextNotSpecified()));\n const t = S.clone(e);\n if (\"multi\" === e.kind) {\n const e = et(t);\n return Promise.all(e.map(e => n(e, t[e]))).then(() => t);\n }\n return n(e.kind, t);\n };\n};\nconst {\n v1: nt\n } = ee,\n {\n baseOptionDefs: rt\n } = de,\n {\n appendUrlPath: ot\n } = S;\nvar it = {\n DiagnosticId: function (e) {\n const t = {\n diagnosticId: nt()\n };\n return e && (t.sdkKeySuffix = e.length > 6 ? e.substring(e.length - 6) : e), t;\n },\n DiagnosticsAccumulator: function (e) {\n let t, n, r, o;\n function i(e) {\n t = e, n = 0, r = 0, o = [];\n }\n return i(e), {\n getProps: () => ({\n dataSinceDate: t,\n droppedEvents: n,\n eventsInLastBatch: r,\n streamInits: o\n }),\n setProps: e => {\n t = e.dataSinceDate, n = e.droppedEvents || 0, r = e.eventsInLastBatch || 0, o = e.streamInits || [];\n },\n incrementDroppedEvents: () => {\n n++;\n },\n setEventsInLastBatch: e => {\n r = e;\n },\n recordStreamInit: (e, t, n) => {\n const r = {\n timestamp: e,\n failed: t,\n durationMillis: n\n };\n o.push(r);\n },\n reset: i\n };\n },\n DiagnosticsManager: function (e, t, n, r, o, i, a) {\n const s = !!e.diagnosticUseCombinedEvent,\n c = \"ld:\" + o + \":$diagnostics\",\n u = ot(i.eventsUrl, \"/events/diagnostic/\" + o),\n l = i.diagnosticRecordingInterval,\n d = n;\n let f,\n g,\n v = !!i.streaming;\n const p = {};\n function m() {\n return {\n sdk: w(),\n configuration: b(),\n platform: e.diagnosticPlatformData\n };\n }\n function h(e) {\n i.logger && i.logger.debug(ie.debugPostingDiagnosticEvent(e)), r.sendEvents(e, u, !0).then(() => {}).catch(() => {});\n }\n function y() {\n h(function () {\n const e = new Date().getTime();\n let t = {\n kind: s ? \"diagnostic-combined\" : \"diagnostic\",\n id: a,\n creationDate: e,\n ...d.getProps()\n };\n return s && (t = {\n ...t,\n ...m()\n }), d.reset(e), t;\n }()), g = setTimeout(y, l), f = new Date().getTime(), s && function () {\n if (t.isEnabled()) {\n const e = {\n ...d.getProps()\n };\n t.set(c, JSON.stringify(e));\n }\n }();\n }\n function w() {\n const t = {\n ...e.diagnosticSdkData\n };\n return i.wrapperName && (t.wrapperName = i.wrapperName), i.wrapperVersion && (t.wrapperVersion = i.wrapperVersion), t;\n }\n function b() {\n return {\n customBaseURI: i.baseUrl !== rt.baseUrl.default,\n customStreamURI: i.streamUrl !== rt.streamUrl.default,\n customEventsURI: i.eventsUrl !== rt.eventsUrl.default,\n eventsCapacity: i.eventCapacity,\n eventsFlushIntervalMillis: i.flushInterval,\n reconnectTimeMillis: i.streamReconnectDelay,\n streamingDisabled: !v,\n allAttributesPrivate: !!i.allAttributesPrivate,\n diagnosticRecordingIntervalMillis: i.diagnosticRecordingInterval,\n usingSecureMode: !!i.hash,\n bootstrapMode: !!i.bootstrap,\n fetchGoalsDisabled: !i.fetchGoals,\n sendEventsOnlyForVariation: !!i.sendEventsOnlyForVariation\n };\n }\n return p.start = () => {\n s ? function (e) {\n if (!t.isEnabled()) return e(!1);\n t.get(c).then(t => {\n if (t) try {\n const e = JSON.parse(t);\n d.setProps(e), f = e.dataSinceDate;\n } catch (e) {}\n e(!0);\n }).catch(() => {\n e(!1);\n });\n }(e => {\n if (e) {\n const e = (f || 0) + l,\n t = new Date().getTime();\n t >= e ? y() : g = setTimeout(y, e - t);\n } else 0 === Math.floor(4 * Math.random()) ? y() : g = setTimeout(y, l);\n }) : (h({\n kind: \"diagnostic-init\",\n id: a,\n creationDate: d.getProps().dataSinceDate,\n ...m()\n }), g = setTimeout(y, l));\n }, p.stop = () => {\n g && clearTimeout(g);\n }, p.setStreaming = e => {\n v = e;\n }, p;\n }\n};\nvar at = function (e, t) {\n let n = !1;\n const r = {\n type: e.type,\n name: e.name,\n synchronous: e.synchronous,\n method: (...o) => {\n try {\n e.method(...o);\n } catch {\n n || (n = !0, t.warn(ie.inspectorMethodError(r.type, r.name)));\n }\n }\n };\n return r;\n};\nconst {\n onNextTick: st\n } = S,\n ct = {\n flagUsed: \"flag-used\",\n flagDetailsChanged: \"flag-details-changed\",\n flagDetailChanged: \"flag-detail-changed\",\n clientIdentityChanged: \"client-identity-changed\"\n };\nObject.freeze(ct);\nvar ut = {\n InspectorTypes: ct,\n InspectorManager: function (e, t) {\n const n = {},\n r = {\n [ct.flagUsed]: [],\n [ct.flagDetailsChanged]: [],\n [ct.flagDetailChanged]: [],\n [ct.clientIdentityChanged]: []\n },\n o = {\n [ct.flagUsed]: [],\n [ct.flagDetailsChanged]: [],\n [ct.flagDetailChanged]: [],\n [ct.clientIdentityChanged]: []\n },\n i = e && e.map(e => at(e, t));\n return i && i.forEach(e => {\n Object.prototype.hasOwnProperty.call(r, e.type) && !e.synchronous ? r[e.type].push(e) : Object.prototype.hasOwnProperty.call(o, e.type) && e.synchronous ? o[e.type].push(e) : t.warn(ie.invalidInspector(e.type, e.name));\n }), n.hasListeners = e => r[e] && r[e].length || o[e] && o[e].length, n.onFlagUsed = (e, t, n) => {\n const i = ct.flagUsed;\n o[i].length && o[i].forEach(r => r.method(e, t, n)), r[i].length && st(() => {\n r[i].forEach(r => r.method(e, t, n));\n });\n }, n.onFlags = e => {\n const t = ct.flagDetailsChanged;\n o[t].length && o[t].forEach(t => t.method(e)), r[t].length && st(() => {\n r[t].forEach(t => t.method(e));\n });\n }, n.onFlagChanged = (e, t) => {\n const n = ct.flagDetailChanged;\n o[n].length && o[n].forEach(n => n.method(e, t)), r[n].length && st(() => {\n r[n].forEach(n => n.method(e, t));\n });\n }, n.onIdentityChanged = e => {\n const t = ct.clientIdentityChanged;\n o[t].length && o[t].forEach(t => t.method(e)), r[t].length && st(() => {\n r[t].forEach(t => t.method(e));\n });\n }, n;\n }\n};\nconst {\n LDTimeoutError: lt\n} = s;\nvar dt = function (e, t) {\n return new Promise((n, r) => {\n setTimeout(() => {\n r(new lt(`${t} timed out after ${e} seconds.`));\n }, 1e3 * e);\n });\n};\nconst {\n commonBasicLogger: ft\n } = ne,\n {\n checkContext: gt,\n getContextKeys: vt\n } = ke,\n {\n InspectorTypes: pt,\n InspectorManager: mt\n } = ut,\n ht = \"change\",\n yt = \"internal-change\";\nvar wt = {\n initialize: function (e, t, n, r, o) {\n const i = function () {\n if (n && n.logger) return n.logger;\n return o && o.logger && o.logger.default || ft(\"warn\");\n }(),\n a = Re(i),\n c = Ne(a),\n u = de.validate(n, a, o, i),\n l = mt(u.inspectors, i),\n d = u.sendEvents;\n let f = e,\n g = u.hash;\n const v = Ve(r.localStorage, i),\n p = he(r, f, u),\n m = u.sendEvents && !u.diagnosticOptOut,\n h = m ? it.DiagnosticId(f) : null,\n y = m ? it.DiagnosticsAccumulator(new Date().getTime()) : null,\n w = m ? it.DiagnosticsManager(r, v, y, p, f, u, h) : null,\n b = Je(r, u, f, y),\n k = u.eventProcessor || Ue(r, u, f, y, a, p),\n E = Qe(r, u, f);\n let D,\n x,\n C,\n P = {},\n I = u.streaming,\n O = !1,\n T = !1,\n L = !0;\n const U = u.stateProvider,\n R = Ye(null, function (e) {\n (function (e) {\n if (U) return;\n e && F({\n kind: \"identify\",\n context: e,\n creationDate: new Date().getTime()\n });\n })(e), l.hasListeners(pt.clientIdentityChanged) && l.onIdentityChanged(R.getContext());\n }),\n A = new tt(v),\n j = v.isEnabled() ? $e(v, f, g, R) : null;\n function F(e) {\n f && (U && U.enqueueEvent && U.enqueueEvent(e) || (e.context ? (L = !1, !d || T || r.isDoNotTrack() || (i.debug(ie.debugEnqueueingEvent(e.kind)), k.enqueue(e))) : L && (i.warn(ie.eventWithoutContext()), L = !1)));\n }\n function N(e, t) {\n l.hasListeners(pt.flagDetailChanged) && l.onFlagChanged(e.key, H(t));\n }\n function $() {\n l.hasListeners(pt.flagDetailsChanged) && l.onFlags(Object.entries(P).map(([e, t]) => ({\n key: e,\n detail: H(t)\n })).reduce((e, t) => (e[t.key] = t.detail, e), {}));\n }\n function V(e, t, n, r) {\n const o = R.getContext(),\n i = new Date(),\n a = {\n kind: \"feature\",\n key: e,\n context: o,\n value: t ? t.value : null,\n variation: t ? t.variationIndex : null,\n default: n,\n creationDate: i.getTime()\n },\n s = P[e];\n s && (a.version = s.flagVersion ? s.flagVersion : s.version, a.trackEvents = s.trackEvents, a.debugEventsUntilDate = s.debugEventsUntilDate), (r || s && s.trackReason) && t && (a.reason = t.reason), F(a);\n }\n function M(e) {\n return gt(e, !1) ? Promise.resolve(e) : Promise.reject(new s.LDInvalidUserError(ie.invalidContext()));\n }\n function q(e, t, n, r, o, i) {\n let a, s;\n return P && S.objectHasOwnProperty(P, e) && P[e] && !P[e].deleted ? (s = P[e], a = H(s), null !== s.value && void 0 !== s.value || (a.value = t)) : a = {\n value: t,\n variationIndex: null,\n reason: {\n kind: \"ERROR\",\n errorKind: \"FLAG_NOT_FOUND\"\n }\n }, n && (o || s?.prerequisites?.forEach(e => {\n q(e, void 0, n, !1, !1, !1);\n }), V(e, a, t, r)), !o && i && function (e, t) {\n l.hasListeners(pt.flagUsed) && l.onFlagUsed(e, t, R.getContext());\n }(e, a), a;\n }\n function H(e) {\n return {\n value: e.value,\n variationIndex: void 0 === e.variation ? null : e.variation,\n reason: e.reason || null\n };\n }\n function z() {\n if (x = !0, !R.getContext()) return;\n const e = e => {\n try {\n return JSON.parse(e);\n } catch (e) {\n return void a.maybeReportError(new s.LDInvalidDataError(ie.invalidData()));\n }\n };\n b.connect(R.getContext(), g, {\n ping: function () {\n i.debug(ie.debugStreamPing());\n const e = R.getContext();\n E.fetchFlagSettings(e, g).then(t => {\n S.deepEquals(e, R.getContext()) && _(t || {});\n }).catch(e => {\n a.maybeReportError(new s.LDFlagFetchError(ie.errorFetchingFlags(e)));\n });\n },\n put: function (t) {\n const n = e(t.data);\n n && (i.debug(ie.debugStreamPut()), _(n));\n },\n patch: function (t) {\n const n = e(t.data);\n if (!n) return;\n const r = P[n.key];\n if (!r || !r.version || !n.version || r.version < n.version) {\n i.debug(ie.debugStreamPatch(n.key));\n const e = {},\n t = S.extend({}, n);\n delete t.key, P[n.key] = t;\n const o = H(t);\n e[n.key] = r ? {\n previous: r.value,\n current: o\n } : {\n current: o\n }, N(n, t), J(e);\n } else i.debug(ie.debugStreamPatchIgnored(n.key));\n },\n delete: function (t) {\n const n = e(t.data);\n if (n) if (!P[n.key] || P[n.key].version < n.version) {\n i.debug(ie.debugStreamDelete(n.key));\n const e = {};\n P[n.key] && !P[n.key].deleted && (e[n.key] = {\n previous: P[n.key].value\n }), P[n.key] = {\n version: n.version,\n deleted: !0\n }, N(n, P[n.key]), J(e);\n } else i.debug(ie.debugStreamDeleteIgnored(n.key));\n }\n });\n }\n function K() {\n x && (b.disconnect(), x = !1);\n }\n function _(e) {\n const t = {};\n if (!e) return Promise.resolve();\n for (const n in P) S.objectHasOwnProperty(P, n) && P[n] && (e[n] && !S.deepEquals(e[n].value, P[n].value) ? t[n] = {\n previous: P[n].value,\n current: H(e[n])\n } : e[n] && !e[n].deleted || (t[n] = {\n previous: P[n].value\n }));\n for (const n in e) S.objectHasOwnProperty(e, n) && e[n] && (!P[n] || P[n].deleted) && (t[n] = {\n current: H(e[n])\n });\n return P = {\n ...e\n }, $(), J(t).catch(() => {});\n }\n function J(e) {\n const t = Object.keys(e);\n if (t.length > 0) {\n const n = {};\n t.forEach(t => {\n const r = e[t].current,\n o = r ? r.value : void 0,\n i = e[t].previous;\n a.emit(ht + \":\" + t, o, i), n[t] = r ? {\n current: o,\n previous: i\n } : {\n previous: i\n };\n }), a.emit(ht, n), a.emit(yt, P), u.sendEventsOnlyForVariation || U || t.forEach(t => {\n V(t, e[t].current);\n });\n }\n return D && j ? j.saveFlags(P) : Promise.resolve();\n }\n function B() {\n const e = I || C && void 0 === I;\n e && !x ? z() : !e && x && K(), w && w.setStreaming(e);\n }\n function G(e) {\n return e === ht || e.substr(0, 7) === ht + \":\";\n }\n if (\"string\" == typeof u.bootstrap && \"LOCALSTORAGE\" === u.bootstrap.toUpperCase() && (j ? D = !0 : i.warn(ie.localStorageUnavailable())), \"object\" == typeof u.bootstrap && (P = function (e) {\n const t = Object.keys(e),\n n = \"$flagsState\",\n r = \"$valid\",\n o = e[n];\n !o && t.length && i.warn(ie.bootstrapOldFormat()), !1 === e[r] && i.warn(ie.bootstrapInvalid());\n const a = {};\n return t.forEach(t => {\n if (t !== n && t !== r) {\n let n = {\n value: e[t]\n };\n o && o[t] ? n = S.extend(n, o[t]) : n.version = 0, a[t] = n;\n }\n }), a;\n }(u.bootstrap)), U) {\n const e = U.getInitialState();\n e ? W(e) : U.on(\"init\", W), U.on(\"update\", function (e) {\n e.context && R.setContext(e.context);\n e.flags && _(e.flags);\n });\n } else (function () {\n if (!e) return Promise.reject(new s.LDInvalidEnvironmentIdError(ie.environmentNotSpecified()));\n return A.processContext(t).then(M).then(e => (R.setContext(e), \"object\" == typeof u.bootstrap ? X() : D ? j.loadFlags().then(e => null == e ? (P = {}, E.fetchFlagSettings(R.getContext(), g).then(e => _(e || {})).then(X).catch(e => {\n Q(new s.LDFlagFetchError(ie.errorFetchingFlags(e)));\n })) : (P = e, S.onNextTick(X), E.fetchFlagSettings(R.getContext(), g).then(e => _(e)).catch(e => a.maybeReportError(e)))) : E.fetchFlagSettings(R.getContext(), g).then(e => {\n P = e || {}, $(), X();\n }).catch(e => {\n P = {}, Q(e);\n })));\n })().catch(Q);\n function W(e) {\n f = e.environment, R.setContext(e.context), P = {\n ...e.flags\n }, S.onNextTick(X);\n }\n function X() {\n i.info(ie.clientInitialized()), O = !0, B(), c.signalSuccess();\n }\n function Q(e) {\n c.signalFailure(e);\n }\n const Y = {\n waitForInitialization: function (e = void 0) {\n if (null != e) {\n if (\"number\" == typeof e) return function (e) {\n e > 5 && i.warn(\"The waitForInitialization function was called with a timeout greater than 5 seconds. We recommend a timeout of 5 seconds or less.\");\n const t = c.getInitializationPromise(),\n n = dt(e, \"waitForInitialization\");\n return Promise.race([n, t]).catch(e => {\n throw e instanceof s.LDTimeoutError && i.error(`waitForInitialization error: ${e}`), e;\n });\n }(e);\n i.warn(\"The waitForInitialization method was provided with a non-numeric timeout.\");\n }\n return i.warn(\"The waitForInitialization function was called without a timeout specified. In a future version a default timeout will be applied.\"), c.getInitializationPromise();\n },\n waitUntilReady: () => c.getReadyPromise(),\n identify: function (e, t, n) {\n if (T) return S.wrapPromiseCallback(Promise.resolve({}), n);\n if (U) return i.warn(ie.identifyDisabled()), S.wrapPromiseCallback(Promise.resolve(S.transformVersionedValuesToValues(P)), n);\n const r = D && j ? j.clearFlags() : Promise.resolve();\n return S.wrapPromiseCallback(r.then(() => A.processContext(e)).then(M).then(e => E.fetchFlagSettings(e, t).then(n => {\n const r = S.transformVersionedValuesToValues(n);\n return R.setContext(e), g = t, n ? _(n).then(() => r) : r;\n })).then(e => (x && z(), e)).catch(e => (a.maybeReportError(e), Promise.reject(e))), n);\n },\n getContext: function () {\n return R.getContext();\n },\n variation: function (e, t) {\n return q(e, t, !0, !1, !1, !0).value;\n },\n variationDetail: function (e, t) {\n return q(e, t, !0, !0, !1, !0);\n },\n track: function (e, t, n) {\n if (\"string\" != typeof e) return void a.maybeReportError(new s.LDInvalidEventKeyError(ie.unknownCustomEventKey(e)));\n void 0 !== n && \"number\" != typeof n && i.warn(ie.invalidMetricValue(typeof n)), r.customEventFilter && !r.customEventFilter(e) && i.warn(ie.unknownCustomEventKey(e));\n const o = R.getContext(),\n c = {\n kind: \"custom\",\n key: e,\n context: o,\n url: r.getCurrentUrl(),\n creationDate: new Date().getTime()\n };\n o && o.anonymous && (c.contextKind = o.anonymous ? \"anonymousUser\" : \"user\"), null != t && (c.data = t), null != n && (c.metricValue = n), F(c);\n },\n on: function (e, t, n) {\n G(e) ? (C = !0, O && B(), a.on(e, t, n)) : a.on(...arguments);\n },\n off: function (e) {\n if (a.off(...arguments), G(e)) {\n let e = !1;\n a.getEvents().forEach(t => {\n G(t) && a.getEventListenerCount(t) > 0 && (e = !0);\n }), e || (C = !1, x && void 0 === I && K());\n }\n },\n setStreaming: function (e) {\n const t = null === e ? void 0 : e;\n t !== I && (I = t, B());\n },\n flush: function (e) {\n return S.wrapPromiseCallback(d ? k.flush() : Promise.resolve(), e);\n },\n allFlags: function () {\n const e = {};\n if (!P) return e;\n for (const t in P) S.objectHasOwnProperty(P, t) && !P[t].deleted && (e[t] = q(t, null, !u.sendEventsOnlyForVariation, !1, !0, !1).value);\n return e;\n },\n close: function (e) {\n if (T) return S.wrapPromiseCallback(Promise.resolve(), e);\n const t = () => {\n T = !0, P = {};\n },\n n = Promise.resolve().then(() => {\n if (K(), w && w.stop(), d) return k.stop(), k.flush();\n }).then(t).catch(t);\n return S.wrapPromiseCallback(n, e);\n }\n };\n return {\n client: Y,\n options: u,\n emitter: a,\n ident: R,\n logger: i,\n requestor: E,\n start: function () {\n d && (w && w.start(), k.start());\n },\n enqueueEvent: F,\n getFlagsInternal: function () {\n return P;\n },\n getEnvironmentId: () => f,\n internalChangeEventName: yt\n };\n },\n commonBasicLogger: ft,\n errors: s,\n messages: ie,\n utils: S,\n getContextKeys: vt\n },\n bt = wt.initialize,\n kt = wt.errors,\n Et = wt.messages;\nfunction Dt(e, t, n) {\n return (t = function (e) {\n var t = function (e, t) {\n if (\"object\" != typeof e || !e) return e;\n var n = e[Symbol.toPrimitive];\n if (void 0 !== n) {\n var r = n.call(e, t || \"default\");\n if (\"object\" != typeof r) return r;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === t ? String : Number)(e);\n }(e, \"string\");\n return \"symbol\" == typeof t ? t : t + \"\";\n }(t)) in e ? Object.defineProperty(e, t, {\n value: n,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[t] = n, e;\n}\nfunction xt(e, t) {\n var n = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var r = Object.getOwnPropertySymbols(e);\n t && (r = r.filter(function (t) {\n return Object.getOwnPropertyDescriptor(e, t).enumerable;\n })), n.push.apply(n, r);\n }\n return n;\n}\nfunction Ct(e) {\n for (var t = 1; t < arguments.length; t++) {\n var n = null != arguments[t] ? arguments[t] : {};\n t % 2 ? xt(Object(n), !0).forEach(function (t) {\n Dt(e, t, n[t]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : xt(Object(n)).forEach(function (t) {\n Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));\n });\n }\n return e;\n}\nvar Pt = wt.commonBasicLogger;\nvar St = function (e) {\n return Pt(Ct({\n destination: console.log\n }, e));\n};\nvar It = {\n promise: Promise.resolve({\n status: 200,\n header: function () {\n return null;\n },\n body: null\n })\n};\nfunction Ot(e, t, n, r, o) {\n if (o && !function () {\n var e = window.navigator && window.navigator.userAgent;\n if (e) {\n var t = e.match(/Chrom(e|ium)\\/([0-9]+)\\./);\n if (t) return parseInt(t[2], 10) < 73;\n }\n return !0;\n }()) return It;\n var i = new window.XMLHttpRequest();\n for (var a in i.open(e, t, !o), n || {}) Object.prototype.hasOwnProperty.call(n, a) && i.setRequestHeader(a, n[a]);\n if (o) {\n try {\n i.send(r);\n } catch (e) {}\n return It;\n }\n var s,\n c = new Promise(function (e, t) {\n i.addEventListener(\"load\", function () {\n s || e({\n status: i.status,\n header: function (e) {\n return i.getResponseHeader(e);\n },\n body: i.responseText\n });\n }), i.addEventListener(\"error\", function () {\n s || t(new Error());\n }), i.send(r);\n });\n return {\n promise: c,\n cancel: function () {\n s = !0, i.abort();\n }\n };\n}\nvar Tt = e => {\n if (\"string\" != typeof e) throw new TypeError(\"Expected a string\");\n return e.replace(/[|\\\\{}()[\\]^$+*?.]/g, \"\\\\$&\").replace(/-/g, \"\\\\x2d\");\n};\nfunction Lt(e, t, n, r) {\n var o,\n i,\n a = ((\"substring\" === e.kind || \"regex\" === e.kind) && r.includes(\"/\") ? t : t.replace(r, \"\")).replace(n, \"\");\n switch (e.kind) {\n case \"exact\":\n i = t, o = new RegExp(\"^\" + Tt(e.url) + \"/?$\");\n break;\n case \"canonical\":\n i = a, o = new RegExp(\"^\" + Tt(e.url) + \"/?$\");\n break;\n case \"substring\":\n i = a, o = new RegExp(\".*\" + Tt(e.substring) + \".*$\");\n break;\n case \"regex\":\n i = a, o = new RegExp(e.pattern);\n break;\n default:\n return !1;\n }\n return o.test(i);\n}\nfunction Ut(e, t) {\n for (var n = {}, r = null, o = [], i = 0; i < e.length; i++) for (var a = e[i], s = a.urls || [], c = 0; c < s.length; c++) if (Lt(s[c], window.location.href, window.location.search, window.location.hash)) {\n \"pageview\" === a.kind ? t(\"pageview\", a) : (o.push(a), t(\"click_pageview\", a));\n break;\n }\n return o.length > 0 && (r = function (e) {\n for (var n = function (e, t) {\n for (var n = [], r = 0; r < t.length; r++) for (var o = e.target, i = t[r], a = i.selector, s = document.querySelectorAll(a); o && s.length > 0;) {\n for (var c = 0; c < s.length; c++) o === s[c] && n.push(i);\n o = o.parentNode;\n }\n return n;\n }(e, o), r = 0; r < n.length; r++) t(\"click\", n[r]);\n }, document.addEventListener(\"click\", r)), n.dispose = function () {\n document.removeEventListener(\"click\", r);\n }, n;\n}\nfunction Rt(e, t) {\n var n, r;\n function o() {\n r && r.dispose(), n && n.length && (r = Ut(n, i));\n }\n function i(t, n) {\n var r = e.ident.getContext(),\n o = {\n kind: t,\n key: n.key,\n data: null,\n url: window.location.href,\n creationDate: new Date().getTime(),\n context: r\n };\n return \"click\" === t && (o.selector = n.selector), e.enqueueEvent(o);\n }\n return e.requestor.fetchJSON(\"/sdk/goals/\" + e.getEnvironmentId()).then(function (e) {\n e && e.length > 0 && (r = Ut(n = e, i), function (e, t) {\n var n,\n r = window.location.href;\n function o() {\n (n = window.location.href) !== r && (r = n, t());\n }\n !function e(t, n) {\n t(), setTimeout(function () {\n e(t, n);\n }, n);\n }(o, e), window.history && window.history.pushState ? window.addEventListener(\"popstate\", o) : window.addEventListener(\"hashchange\", o);\n }(300, o)), t();\n }).catch(function (n) {\n e.emitter.maybeReportError(new kt.LDUnexpectedResponseError((n && n.message, n.message))), t();\n }), {};\n}\nvar At = \"goalsReady\",\n jt = {\n fetchGoals: {\n default: !0\n },\n hash: {\n type: \"string\"\n },\n eventProcessor: {\n type: \"object\"\n },\n eventUrlTransformer: {\n type: \"function\"\n },\n disableSyncEventPost: {\n default: !1\n }\n };\nfunction Ft(e, t) {\n var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {},\n r = function (e) {\n var t,\n n = {\n userAgentHeaderName: \"X-LaunchDarkly-User-Agent\",\n synchronousFlush: !1\n };\n if (window.XMLHttpRequest) {\n var r = e && e.disableSyncEventPost;\n n.httpRequest = function (e, t, o, i) {\n var a = n.synchronousFlush & !r;\n return n.synchronousFlush = !1, Ot(e, t, o, i, a);\n };\n }\n n.httpAllowsPost = function () {\n return void 0 === t && (t = !!window.XMLHttpRequest && \"withCredentials\" in new window.XMLHttpRequest()), t;\n }, n.httpFallbackPing = function (e) {\n new window.Image().src = e;\n };\n var o,\n i = e && e.eventUrlTransformer;\n n.getCurrentUrl = function () {\n return i ? i(window.location.href) : window.location.href;\n }, n.isDoNotTrack = function () {\n var e;\n return 1 === (e = window.navigator && void 0 !== window.navigator.doNotTrack ? window.navigator.doNotTrack : window.navigator && void 0 !== window.navigator.msDoNotTrack ? window.navigator.msDoNotTrack : window.doNotTrack) || !0 === e || \"1\" === e || \"yes\" === e;\n };\n try {\n window.localStorage && (n.localStorage = {\n get: function (e) {\n return new Promise(function (t) {\n t(window.localStorage.getItem(e));\n });\n },\n set: function (e, t) {\n return new Promise(function (n) {\n window.localStorage.setItem(e, t), n();\n });\n },\n clear: function (e) {\n return new Promise(function (t) {\n window.localStorage.removeItem(e), t();\n });\n }\n });\n } catch (e) {\n n.localStorage = null;\n }\n if (e && e.useReport && \"function\" == typeof window.EventSourcePolyfill && window.EventSourcePolyfill.supportedOptions && window.EventSourcePolyfill.supportedOptions.method ? (n.eventSourceAllowsReport = !0, o = window.EventSourcePolyfill) : (n.eventSourceAllowsReport = !1, o = window.EventSource), window.EventSource) {\n var a = 3e5;\n n.eventSourceFactory = function (e, t) {\n var n = Ct(Ct({}, {\n heartbeatTimeout: a,\n silentTimeout: a,\n skipDefaultHeaders: !0\n }), t);\n return new o(e, n);\n }, n.eventSourceIsActive = function (e) {\n return e.readyState === window.EventSource.OPEN || e.readyState === window.EventSource.CONNECTING;\n };\n }\n return n.userAgent = \"JSClient\", n.version = \"3.5.0\", n.diagnosticSdkData = {\n name: \"js-client-sdk\",\n version: \"3.5.0\"\n }, n.diagnosticPlatformData = {\n name: \"JS\"\n }, n.diagnosticUseCombinedEvent = !0, n;\n }(n),\n o = bt(e, t, n, r, jt),\n i = o.client,\n a = o.options,\n s = o.emitter,\n c = new Promise(function (e) {\n var t = s.on(At, function () {\n s.off(At, t), e();\n });\n });\n i.waitUntilGoalsReady = function () {\n return c;\n }, a.fetchGoals ? Rt(o, function () {\n return s.emit(At);\n }) : s.emit(At), \"complete\" !== document.readyState ? window.addEventListener(\"load\", o.start) : o.start();\n var u = function () {\n r.synchronousFlush = !0, i.flush().catch(function () {}), r.synchronousFlush = !1;\n };\n return document.addEventListener(\"visibilitychange\", function () {\n \"hidden\" === document.visibilityState && u();\n }), window.addEventListener(\"pagehide\", u), i;\n}\nvar Nt = St,\n $t = void 0,\n Vt = \"3.5.0\";\nvar Mt = {\n initialize: function (e, t) {\n var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};\n return console && console.warn && console.warn(Et.deprecated(\"default export\", \"named LDClient export\")), Ft(e, t, n);\n },\n version: Vt\n};\nexport { Nt as basicLogger, $t as createConsoleLogger, Mt as default, Ft as initialize, Vt as version };\n","import { Injectable, OnDestroy } from '@angular/core';\n\nimport {\n CookieName,\n CookieService,\n LaunchDarklyContextProviderService,\n Logger,\n TrackingService,\n UserEvent,\n UserLoginEvent,\n UserLogoutEvent,\n UserService,\n} from '@frontend/vanilla/core';\nimport { LDClient, LDEvaluationDetail, LDFlagChangeset, LDFlagSet, LDOptions, initialize } from 'launchdarkly-js-client-sdk';\nimport { BehaviorSubject, Observable, ReplaySubject, Subscription, catchError, map, merge, of, switchMap, timeout } from 'rxjs';\nimport { first } from 'rxjs/operators';\n\nimport { LaunchDarklyConfig } from './launch-darkly.client-config';\n\n/**\n * @stable\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class LaunchDarklyService implements OnDestroy {\n /**\n * LaunchDarkly SDK client object.\n *\n * Can be used directly to access all properties and methods provided by the SDK.\n *\n * For more information, see the [SDK Reference Guide](https://docs.launchdarkly.com/sdk/client-side/javascript).\n */\n client: LDClient;\n defaultOptions: LDOptions = {\n inspectors: [\n {\n type: 'flag-used',\n name: 'flag-used-inspector',\n method: (flagKey: string, flagDetail: LDEvaluationDetail) => this.trackFlagUsed(flagKey, flagDetail),\n },\n ],\n };\n private flags: LDFlagSet = {};\n private userAuthenticationSubscriber: Subscription;\n private _featureFlags = new BehaviorSubject({});\n private isLaunchDarklyConfigured = false;\n\n constructor(\n private userService: UserService,\n private contextProviderService: LaunchDarklyContextProviderService,\n private config: LaunchDarklyConfig,\n private trackingService: TrackingService,\n private cookieService: CookieService,\n private logger: Logger,\n ) {}\n\n private _clientInitialized = new ReplaySubject(1);\n private get clientInitialized(): Observable {\n return this._clientInitialized.pipe(first());\n }\n\n async initialize(clientId: string) {\n this.isLaunchDarklyConfigured = true;\n\n if (!this.client) {\n const options = Object.assign({}, this.defaultOptions, this.config.options);\n const context = await this.contextProviderService.getContext();\n this.client = initialize(clientId, context, options);\n\n this.client\n .waitForInitialization()\n .then(() => {\n this.fetchLDFlags();\n this._clientInitialized.next();\n this.contextProviderService.contextChanged.subscribe(() => {\n this.updateContext();\n });\n this.subscribeToUserAuthenticationEvents();\n })\n .catch((error: unknown) => {\n this.logger.error('[LaunchDarkly] - Error while initializing SDK.', error);\n });\n\n this.client.on('change', async (changedFlags: LDFlagChangeset) => {\n await this.updateFlag(changedFlags);\n this.logger.info('[LaunchDarkly] - Flags changed', changedFlags);\n });\n\n this.client.on('error', (error: any) => {\n this.logger.error('[LaunchDarkly] - General error.', error);\n });\n }\n }\n\n /**\n * Emits the current value for the specified Feature flag.\n *\n * // Usage (component example):\n * export class HeaderComponent implements OnInit\n * {\n * buttonsEnabled = false;\n * ngOnInit() {\n * this.flagsService.getFeatureFlagValue('HeaderButtonsEnabled').subscribe((value) => {\n * this.buttonsEnabled = value;\n * });\n * }\n * }\n *\n * // Usage (Markup)\n *