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,cAAa,+BAAEG,eAAe,KAAH,4BAC/C,MAAI,iDAGlB,mDAVA,IAUA,oEACD,WAAoBR,GAAsB,0EAClCjT,KAAKlB,SAAS+E,cAAcC,gBAAgBC,YAAYmC,KAAKwW,eAAejB,QAAQ,CAAD,+BACtEzb,KAAK4b,WAAW3I,EAAQhS,EAAAA,GAAAA,cAA6B,KAAD,0DAEpDjB,KAAKlB,SAASwU,cAAa,+BAAEE,gBAAgB,KAAH,4BAChD,MAAI,iDAGlB,mDATA,IASA,4EAED,WAA4BP,GAAwD,gFAC5EjT,KAAKlB,SAAS0Q,UAAUC,UAAU,CAAD,eAU9B,OATChC,EAAwByG,GAAuEjB,EAAOxF,sBAAuBzN,KAAKlB,UACtIkB,KAAKlB,SAAS0Q,UAAUmN,kBAAkB,CACtCC,SAAUC,EAAAA,GAAAA,sBACV1c,cAAe8S,EAAOxL,sBACtBvG,YAAW,kBACJ+R,GAAM,IACTgI,QAASC,EAAAA,GAAAA,cACTzN,sBAAAA,MAEL,kBACI,MAAI,uBAEDzN,KAAKlB,SAASqE,KAAK2Z,qBAAqB,kBAAiB,sCAC1D9c,KAAKlB,SAASie,cAActN,UAAU,CAAD,sBAChC,IAAI3I,MAAM,qEAAqE,KAAD,GAKtF,OAHFmM,EAAOxF,uBAAqB,QACxBvB,OAAQqI,EAAAA,GAAAA,OACLtB,EAAOxF,uBACZ,UAEWzN,KAAK4b,WAAW3I,EAAQhS,EAAAA,GAAAA,mBAAkC,KAAD,qEAG/D,MAAI,iDAGtB,mDA/BA,IA+BA,mCAED,SAAsBgS,GAClB,OAAOjT,KAAK4b,WAAW3I,EAAQhS,EAAAA,GAAAA,kBACnC,KAAC,EAtUoC,CAAS+b,EAAAA,GAAW,wCAGxD3b,EAAAA,IAAU,wEACoD,CAAC,CAAE,IAAD,G","sources":["app-react/services/casinofied/app-launcher/apps/adapters/casinofied-zoid-application-adapter.ts","app-react/services/casinofied/app-launcher/apps/adapters/casinofied-regular-application-adapter.ts","app-react/services/casinofied/app-launcher/apps/casinofied-application-base.ts","app-react/services/casinofied/app-launcher/apps/casinofied-application.interface.ts","app-react/components/on-error/boxes/on-error.box.tsx","app-react/components/on-error/boxes/on-error-default.box.tsx","app-react/components/on-error/boxes/on-error-icon.box.tsx","app-react/components/on-error/boxes/on-error-title.box.tsx","app-react/components/on-error/boxes/on-error-message.box.tsx","app-react/components/on-error/boxes/on-error-buttons.box.ts","app-react/components/on-error/on-error.component.tsx","app-react/services/casinofied/app-launcher/apps/inside-drawer.application.tsx","app-react/services/casinofied/app-launcher/apps/chat/chat.application.ts","app-react/services/casinofied/app-launcher/casinofied-app-sdk-loader.ts","app-react/services/casinofied/app-launcher/components/casinofied-component-base.ts","app-react/services/casinofied/app-launcher/components/casinofied-bubble.component.tsx","app-react/services/casinofied/app-launcher/apps/adapters/unified-cashier-zoid-adapter.ts","app-react/services/casinofied/app-launcher/apps/deposit-widget/deposit-widget.application.ts","app-react/components/payments-redirect-focus/boxes/payment-redirect-focus-title/payment-redirect-focus-title.box.ts","app-react/components/payments-redirect-focus/boxes/payment-redirect-focus-title/payment-redirect-focus-title.default.box.ts","app-react/components/payments-redirect-focus/boxes/payment-redirect-focus-container/payment-redirect-focus.box.ts","app-react/components/payments-redirect-focus/payments-redirect-focus.component.tsx","app-react/services/casinofied/app-launcher/apps/payments-redirect/payments-redirect.application.tsx","app-react/services/casinofied/app-launcher/apps/full-cashier/full-cashier.application.ts","app-react/services/casinofied/app-launcher/apps/cashout-widget/cashout-widget.application.ts","app-react/services/casinofied/app-launcher/apps/transaction-history/transaction-history.application.ts","app-react/services/casinofied/app-launcher/apps/customer-relations/customer-relations.application.ts","app-react/services/casinofied/app-launcher/apps/free-to-play-bonus-games/free-to-play-bonus-games.application.ts","app-react/services/casinofied/app-launcher/apps/help-centre/help-centre.application.ts","app-react/services/casinofied/app-launcher/apps/control-center/init-params-helper.ts","app-react/services/casinofied/app-launcher/apps/control-center/control-center-full.application.ts","app-react/services/analytics/analytics-data-layer.service.interface.ts","app-react/services/casinofied/app-launcher/apps/control-center/control-center-mini.application.ts","app-react/services/casinofied/app-launcher/apps/control-center/control-center-analytics-helper.ts","app-react/services/casinofied/app-launcher/apps/registration-widget/registration-widget.application.ts","app-react/services/casinofied/app-launcher/casinofied-app-factory.ts","app-react/services/external-links/handlers/registration/registration-marketing-data-builder.ts","app-react/services/casinofied/app-launcher/casinofied-app-launcher.service.ts"],"sourcesContent":["import {\r\n IAppClosedTopicPayload,\r\n IAppCloseIntentResultTopicPayload,\r\n IAppInitFailedTopicPayload,\r\n IAppInitSucceededTopicPayload,\r\n IDivHostedAppInitParameters,\r\n IOpenAppData,\r\n IPerformActionTopicPayload,\r\n IZoidHostedAppInitParameters,\r\n AppIdentifiers\r\n} from \"@sparkware/uc-sdk-core\";\r\nimport {ICasinofiedApplicationAdapter} from \"./casinofied-application-adapter.interface\";\r\nimport {IServiceFactoryExtended} from \"../../../../service-factory-extended.interface\";\r\n\r\nexport class CasinofiedZoidApplicationAdapter implements ICasinofiedApplicationAdapter {\r\n constructor(protected readonly appID: AppIdentifiers,\r\n protected readonly applicationSdk: any,\r\n protected readonly services: IServiceFactoryExtended) {\r\n }\r\n\r\n init(initParams: IDivHostedAppInitParameters) {\r\n const clonedInitParams = {...initParams};\r\n delete clonedInitParams.messageBrokerChannels\r\n\r\n const zoidInitParams: IZoidHostedAppInitParameters = {\r\n ...clonedInitParams,\r\n onInitSucceeded: (payload) => this._onInitSucceeded(payload, initParams),\r\n onInitFailed: (payload) => this._onInitFailed(payload, initParams),\r\n openApp: payload => this._openApp(payload, initParams),\r\n onClose: (payload) => this._onClose(payload, initParams),\r\n performAction: (payload) => this._onPerformAction(payload, initParams),\r\n closeIntentResult: (payload) => this._onCloseIntentResult(payload, initParams)\r\n }\r\n\r\n this.applicationSdk.init(zoidInitParams);\r\n }\r\n\r\n focus() {\r\n if(this.applicationSdk.focus) {\r\n this.applicationSdk.focus(this.appID);\r\n }\r\n }\r\n\r\n dispose() {\r\n //nothing to do here\r\n }\r\n\r\n closeIntent(appID: string, correlationID: string): void {\r\n this.applicationSdk.closeIntent(appID, correlationID);\r\n }\r\n\r\n protected _openApp(payload: IOpenAppData, initParams: IDivHostedAppInitParameters) {\r\n initParams.messageBrokerChannels.navigation.topics.openApp.publish({\r\n publisher: this.appID\r\n }, payload);\r\n }\r\n protected _onInitSucceeded(payload: IAppInitSucceededTopicPayload, initParams: IDivHostedAppInitParameters){\r\n initParams.messageBrokerChannels.session.topics.appInitSucceeded.publish({\r\n publisher: this.appID\r\n }, payload);\r\n }\r\n protected _onInitFailed (payload: IAppInitFailedTopicPayload, initParams: IDivHostedAppInitParameters) {\r\n initParams.messageBrokerChannels.session.topics.appInitFailed.publish({\r\n publisher: this.appID\r\n }, payload)\r\n }\r\n protected _onClose(payload: IAppClosedTopicPayload, initParams: IDivHostedAppInitParameters) {\r\n initParams.messageBrokerChannels.session.topics.appClosed.publish({\r\n publisher: this.appID\r\n }, payload);\r\n }\r\n\r\n protected _onPerformAction(payload: IPerformActionTopicPayload, initParams: IDivHostedAppInitParameters) {\r\n initParams.messageBrokerChannels.navigation.topics.performAction.publish({\r\n publisher: this.appID,\r\n }, payload);\r\n }\r\n\r\n protected _onCloseIntentResult(payload: IAppCloseIntentResultTopicPayload, initParams: IDivHostedAppInitParameters) {\r\n initParams.messageBrokerChannels.session.topics.closeIntentResult.publish({\r\n publisher: this.appID\r\n }, payload);\r\n }\r\n}","import {ICasinofiedApplicationAdapter} from \"./casinofied-application-adapter.interface\";\r\nimport {AppIdentifiers, IDivHostedAppInitParameters} from \"@sparkware/uc-sdk-core\";\r\nimport {IServiceFactoryExtended} from \"../../../../service-factory-extended.interface\";\r\n\r\nexport class CasinofiedRegularApplicationAdapter implements ICasinofiedApplicationAdapter {\r\n constructor(private readonly applicationObject, private readonly services: IServiceFactoryExtended) {\r\n }\r\n\r\n private initParams: IDivHostedAppInitParameters;\r\n init(initParams: IDivHostedAppInitParameters) {\r\n this.applicationObject.init(initParams);\r\n this.initParams = initParams;\r\n }\r\n\r\n closeIntent(appID: AppIdentifiers, correlationID: string): void {\r\n if(this.initParams) {\r\n this.services.messageBroker.channels.session.topics.closeIntent.publish({\r\n publisher: AppIdentifiers.CasinoClient,\r\n }, {\r\n appID: appID,\r\n correlationID: correlationID,\r\n launchInfo: this.initParams.applicationContext?.launchInfo\r\n });\r\n }\r\n }\r\n\r\n focus(): void {\r\n //nothing to do here\r\n }\r\n\r\n dispose() {\r\n //nothing to do here\r\n }\r\n}","import { action, observable, makeObservable } from 'mobx';\r\nimport {IServiceFactoryExtended} from '../../../service-factory-extended.interface';\r\nimport {CASINOFIED_APP_INIT_TIMEOUT_MS, ICasinofiedApplication, IAppCloseParams} from './casinofied-application.interface';\r\nimport {\r\n AppIdentifiers, ComponentID,\r\n IDivHostedAppInitParameters, IOpenAppData,\r\n ITopicSubscription,\r\n IUserInfoParameters\r\n} from '@sparkware/uc-sdk-core';\r\nimport {STANDARD_TOPIC_HEADER} from '../../message-broker/message-broker.consts';\r\nimport {ICasinofiedComponent} from '../components/casinofied-component.interface';\r\nimport {ICasinofiedComponentFactory} from '../casinofied-app-factory.interfaces';\r\nimport {CasinofiedAppSdkLoader} from '../casinofied-app-sdk-loader';\r\nimport {\r\n getCasinofiedCommonAppContextParams, getCasinofiedCommonUserInfo,\r\n getCasinofiedDeviceInfo,\r\n getCasinofiedGeoInfoParams\r\n} from '../../casinofied-helper-functions';\r\nimport {CasinofiedZoidApplicationAdapter} from \"./adapters/casinofied-zoid-application-adapter\";\r\nimport {ICasinofiedApplicationAdapter} from \"./adapters/casinofied-application-adapter.interface\";\r\nimport {CasinofiedRegularApplicationAdapter} from \"./adapters/casinofied-regular-application-adapter\";\r\nimport {IAppInitResultReportingDetails} from '../../analytics-publisher/casinofied-analytics.service';\r\nimport {Check, TimeSpan} from '@sparkware/app-utils';\r\n\r\n\r\n\r\nexport abstract class CasinofiedApplicationBase implements ICasinofiedApplication {\r\n public constructor(openAppData: IOpenAppData,\r\n private _componentFactory: ICasinofiedComponentFactory,\r\n private readonly appSdkLoader: CasinofiedAppSdkLoader,\r\n protected readonly services: IServiceFactoryExtended,\r\n protected readonly useZoidIntegration: boolean) {\r\n makeObservable(this);\r\n\r\n this._openAppData = {\r\n ...openAppData,\r\n launchInfo: {\r\n ...openAppData.launchInfo\r\n }\r\n };\r\n\r\n this.appId = this._openAppData.appID;\r\n\r\n //ZOID doesn't like minus sign in the containerID\r\n this._openAppData.launchInfo.containerID = this.appId + '_' + services.tools.getGuid().replace(/-/g, '_');\r\n }\r\n\r\n public readonly appId: AppIdentifiers;\r\n protected readonly _openAppData: IOpenAppData;\r\n protected _sessionID: string;\r\n\r\n @observable.ref\r\n isLoading = false;\r\n\r\n @action.bound\r\n private _setIsLoading(value: boolean): void {\r\n this.isLoading = value;\r\n }\r\n\r\n protected _isAnonymousModeAllowed(): boolean {\r\n return false;\r\n }\r\n\r\n\r\n protected _topicsSubscriptions: ITopicSubscription[] = [];\r\n\r\n protected _getInitAppParams(initParams: IDivHostedAppInitParameters): IDivHostedAppInitParameters {\r\n return initParams;\r\n }\r\n\r\n @observable.ref\r\n protected _appInitFailed = false;\r\n\r\n get shouldPreserveStateUponOAuthStateChange(): boolean {\r\n return false;\r\n }\r\n\r\n @action.bound\r\n protected _setAppInitFailed(): void {\r\n const rootElement = this.services.dom.getElementById(this._openAppData.launchInfo.containerID)\r\n if(rootElement) {\r\n // in case the widget rendered something on the screen but still failed to initialize\r\n // we want to clean up everything so we can show our own error message\r\n while(rootElement.firstChild) {\r\n rootElement.firstChild.remove();\r\n }\r\n }\r\n this._appInitFailed = true;\r\n }\r\n\r\n get openAppData(): IOpenAppData {\r\n return this._openAppData;\r\n }\r\n\r\n private _openPromise = Promise.resolve();\r\n open(): Promise {\r\n if(!this._isAnonymousModeAllowed() && !this.services.user.isAuthorized) {\r\n return Promise.reject(`${this.appId} is not allowed in anonymous mode`);\r\n }\r\n\r\n this._setIsLoading(true);\r\n this._openPromise = this.appSdkLoader.loadAppSdk(this.appId).then((widgetUrl) => {\r\n let appShowStartTime;\r\n if(this.isDisposed) {\r\n return Promise.reject(`${this.appId} was disposed`);\r\n }\r\n\r\n const timeoutValue = this.services.configuration.servicesConfigs.AppLauncher.widgetLoadTimeoutMS || CASINOFIED_APP_INIT_TIMEOUT_MS;\r\n\r\n return new Promise((resolve, reject) => {\r\n const openTimeout = setTimeout(() => {\r\n if(this.isDisposed) {\r\n return;\r\n }\r\n this._setAppInitFailed();\r\n this._unsubscribeFromTopics();\r\n this.onAppInitTimeout(appInitParams, {errorCode:1, errorDescription: 'Timeout'});\r\n reject(`Initializing ${this.appId} application timeout out`);\r\n }, timeoutValue);\r\n\r\n\r\n const {appInitFailed, appInitSucceeded} = this.services.messageBroker.channels.session.topics;\r\n let appInitParams: IDivHostedAppInitParameters = null;\r\n const cleanUp = () => {\r\n clearTimeout(openTimeout);\r\n this._unsubscribeFromTopics();\r\n }\r\n\r\n this._topicsSubscriptions.push(appInitSucceeded.subscribe((payload) => {\r\n if(this._isCurrentApp(payload.appID)) {\r\n if(this.isDisposed) {\r\n return;\r\n }\r\n this._sessionID = payload.sessionID;\r\n cleanUp();\r\n this.onAppInitSuccess(appInitParams, {loadingTime: Date.now() - appShowStartTime});\r\n resolve();\r\n }\r\n }));\r\n\r\n this._topicsSubscriptions.push(appInitFailed.subscribe((payload) => {\r\n if(this._isCurrentApp(payload.appID)) {\r\n if(this.isDisposed) {\r\n return;\r\n }\r\n this._setAppInitFailed();\r\n cleanUp();\r\n this.onAppInitFailed(appInitParams, {errorCode: Check.isNumber(payload.errorCode) ? payload.errorCode : parseInt(payload.errorCode), errorDescription: payload.errorDescription, loadingTime: (Date.now() - appShowStartTime)});\r\n reject(`Failed to open application ${this.appId}; errorCode: ${payload.errorCode}; errorDescription: ${payload.errorDescription}`);\r\n }\r\n }));\r\n let getAppInitParamsStartTime = Date.now();\r\n this._getAppInitCommonParams(this._openAppData, widgetUrl).then(commonParams => {\r\n this.onGetAppInitParams(commonParams, {loadSubject: \"getAppInitParams\", duration: Date.now()-getAppInitParamsStartTime, appId: this.appId});\r\n if(this._isDisposed) {\r\n return Promise.reject(`${this.appId} was disposed`);\r\n }\r\n appInitParams = commonParams;\r\n appShowStartTime = Date.now();\r\n return this._showApp(commonParams);\r\n }).catch(err => {\r\n this._setAppInitFailed();\r\n cleanUp();\r\n this.onAppInitFailed(appInitParams, {errorCode:1, errorDescription: err?.toString()});\r\n reject(err);\r\n });\r\n });\r\n }).finally(() => {\r\n this._openPromise = Promise.resolve();\r\n this._setIsLoading(false);\r\n });\r\n\r\n return this._openPromise;\r\n\r\n }\r\n\r\n protected _getAppSdkObjectName(): string {\r\n const sdkObjectName = this.services.configuration.servicesConfigs.AppLauncher.apps[this.appId].sdk;\r\n if(sdkObjectName) {\r\n return sdkObjectName;\r\n }\r\n return this.appId;\r\n }\r\n\r\n waitForAppToOpen() {\r\n return this._openPromise;\r\n }\r\n\r\n private _waitForContainerIdToBeInTheDOM(): Promise {\r\n return new Promise((resolve, reject) => {\r\n const startTime = Date.now();\r\n const interval = setInterval(() => {\r\n if(this.services.dom.getElementById(this._openAppData.launchInfo.containerID)) {\r\n clearInterval(interval);\r\n resolve();\r\n } else if(Date.now() - startTime > TimeSpan.fromSeconds(3).totalMilliseconds) {\r\n clearInterval(interval);\r\n reject(`containerID creation for widget ${this.appId} timeout`);\r\n }\r\n }, 10);\r\n })\r\n }\r\n\r\n protected _applicationAdapter: ICasinofiedApplicationAdapter;\r\n protected async _showApp(initParams: IDivHostedAppInitParameters): Promise {\r\n\r\n const appObject = this.services.window.getGlobalProperty(this._getAppSdkObjectName());\r\n if(!appObject) {\r\n throw new Error(`Couldn't find an object for ${this.appId} application`);\r\n }\r\n\r\n if(!appObject.init) {\r\n throw new Error(`${this.appId} application doesn't have an init function`);\r\n }\r\n\r\n this._applicationAdapter = this._createApplicationAdapter(appObject);\r\n\r\n this.onAppInitRequest(initParams);\r\n\r\n await this._waitForContainerIdToBeInTheDOM();\r\n this._applicationAdapter.init(this._getInitAppParams(initParams));\r\n }\r\n\r\n protected _createApplicationAdapter(appObject: any): ICasinofiedApplicationAdapter {\r\n if(this.useZoidIntegration) {\r\n return new CasinofiedZoidApplicationAdapter(this.appId, appObject, this.services);\r\n } else {\r\n return new CasinofiedRegularApplicationAdapter(appObject, this.services);\r\n }\r\n\r\n }\r\n\r\n private _getUserInfo(): Promise {\r\n let userInfo: IUserInfoParameters = {\r\n ...getCasinofiedCommonUserInfo(this.services)\r\n };\r\n\r\n if(!this.services.user.isAuthorized) {\r\n return Promise.resolve(userInfo);\r\n }\r\n\r\n return this.services.user.getPlatformToken().then(({token}) => {\r\n return {...userInfo, token: token, userMode: 'authenticated'};\r\n });\r\n }\r\n\r\n private async _getAppInitCommonParams(openAppData: IOpenAppData, widgetUrl: string): Promise {\r\n let correlationId = openAppData.correlationID || openAppData.launchInfo?.businessCorrelationID || this.services.tools.getGuid()\r\n const userInfo = await this._getUserInfo();\r\n const geoInfo = await getCasinofiedGeoInfoParams(this.services);\r\n\r\n const result: IDivHostedAppInitParameters = {\r\n correlationID: correlationId,\r\n applicationContext: {\r\n appID: this.appId,\r\n launchInfo: {\r\n ...openAppData.launchInfo\r\n },\r\n productPackageToID: this.services.configuration.servicesConfigs.AppLauncher.apps[this.appId].productPackageID,\r\n widgetUrl: widgetUrl,\r\n ...getCasinofiedCommonAppContextParams(this.services)\r\n },\r\n messageBrokerChannels: this.services.messageBroker.channels,\r\n deviceInfo: getCasinofiedDeviceInfo(this.services),\r\n geoInfo: geoInfo,\r\n userInfo: userInfo,\r\n\r\n };\r\n\r\n return result;\r\n }\r\n\r\n private _unsubscribeFromTopics() {\r\n this._topicsSubscriptions.forEach(subscription => {\r\n subscription.unsubscribe();\r\n });\r\n\r\n this._topicsSubscriptions = [];\r\n }\r\n\r\n private _isDisposed = false;\r\n public get isDisposed(): boolean {\r\n return this._isDisposed;\r\n }\r\n\r\n dispose() {\r\n this._isDisposed = true;\r\n this._unsubscribeFromTopics();\r\n this._miniatureComponent?.remove();\r\n this._applicationAdapter?.dispose();\r\n }\r\n\r\n protected _isCurrentApp(appId: string) {\r\n return this.appId === appId;\r\n }\r\n\r\n @observable.ref\r\n private _isMinimized: boolean = false;\r\n\r\n get isMinimized() {\r\n return this._isMinimized;\r\n }\r\n\r\n @action.bound\r\n protected _setIsMinimized(value: boolean): void {\r\n this._isMinimized = value;\r\n }\r\n\r\n protected _getMiniatureComponentID(): ComponentID {\r\n return null;\r\n }\r\n\r\n private _miniatureComponent: ICasinofiedComponent = null;\r\n minimize(componentData: any): void {\r\n if (this._miniatureComponent?.isLoading) {\r\n return;\r\n }\r\n const componentID = this._getMiniatureComponentID();\r\n if (!componentID) {\r\n throw new Error(`Application ${this.appId} doesn't have configured the minimization support`);\r\n }\r\n this._setIsMinimized(true);\r\n\r\n this.waitForAppToOpen().then(() => {\r\n this._miniatureComponent = this._componentFactory.createComponent(componentID);\r\n this._miniatureComponent.show(componentData)\r\n .catch((err) => {\r\n this._miniatureComponent = null;\r\n this.services.logger.error(`Failed to show miniature component ${componentID}`, err);\r\n }).finally(() => {\r\n if (this.isDisposed) { // if the application was closed meanwhile then we need to remove the bubble.\r\n this._miniatureComponent?.remove();\r\n }\r\n });\r\n });\r\n }\r\n\r\n async maximize(): Promise {\r\n this._setIsMinimized(false);\r\n if(this._miniatureComponent) {\r\n this._miniatureComponent.remove();\r\n this._miniatureComponent = null;\r\n }\r\n }\r\n\r\n protected _publishMinimizeApp() {\r\n this.services.messageBroker.channels.session.topics.minimizeApp.publish(STANDARD_TOPIC_HEADER, {\r\n appID: this.appId\r\n });\r\n }\r\n\r\n public close(appCloseParams: IAppCloseParams) {\r\n this.services.messageBroker.channels.session.topics.appClosed.publish(STANDARD_TOPIC_HEADER, {\r\n appID: this.appId,\r\n closeReason: appCloseParams.reason,\r\n launchInfo: {\r\n ...this._openAppData.launchInfo,\r\n channel: appCloseParams.channel\r\n }\r\n });\r\n }\r\n\r\n isOpeningInNewWindow(): boolean {\r\n return false;\r\n }\r\n\r\n protected onAppInitTimeout(appInitParams: IDivHostedAppInitParameters, appInitResultReportingDetails?: IAppInitResultReportingDetails) {\r\n this.services.casinofiedAnalytics.appInitResult(appInitParams, appInitResultReportingDetails);\r\n }\r\n protected onAppInitSuccess(appInitParams: IDivHostedAppInitParameters, appInitResultReportingDetails?: IAppInitResultReportingDetails) {\r\n this.services.casinofiedAnalytics.appInitResult(appInitParams, appInitResultReportingDetails);\r\n }\r\n protected onAppInitFailed(appInitParams: IDivHostedAppInitParameters, appInitResultReportingDetails?: IAppInitResultReportingDetails) {\r\n this.services.casinofiedAnalytics.appInitResult(appInitParams, appInitResultReportingDetails);\r\n }\r\n protected onGetAppInitParams(commonParams: IDivHostedAppInitParameters, reportData: {loadSubject: string; duration: number; appId: string;}) {\r\n this.services.casinofiedAnalytics.reportDuration(reportData.loadSubject, reportData.duration, reportData.appId);\r\n }\r\n protected onAppInitRequest(appInitParams: IDivHostedAppInitParameters) {\r\n this.services.casinofiedAnalytics.appInitRequest(appInitParams);\r\n }\r\n}\r\n","import {AppIdentifiers, IOpenAppData, IChannel} from '@sparkware/uc-sdk-core';\r\n\r\nexport const CASINOFIED_APP_INIT_TIMEOUT_MS = 10000;\r\n\r\nexport interface IAppCloseParams {\r\n reason?: string;\r\n channel: IChannel;\r\n}\r\n\r\nexport interface ICasinofiedApplication {\r\n readonly appId: AppIdentifiers;\r\n readonly isMinimized: boolean;\r\n readonly isLoading: boolean;\r\n readonly openAppData: IOpenAppData;\r\n readonly shouldPreserveStateUponOAuthStateChange: boolean;\r\n open(): Promise;\r\n minimize(appData: any): void;\r\n maximize(): Promise;\r\n dispose(): void;\r\n readonly isDisposed: boolean;\r\n waitForAppToOpen(): Promise;\r\n isOpeningInNewWindow(): boolean;\r\n close(appCloseParams: IAppCloseParams): void;\r\n}\r\n","import {OnErrorDefaultBox} from \"./on-error-default.box\";\r\n\r\nexport const OnErrorBox = OnErrorDefaultBox;\r\n","import styled from \"styled-components\";\r\n\r\nexport const OnErrorDefaultBox = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: center;\r\n width: 100%;\r\n margin: auto 0;\r\n padding: 2rem;\r\n`;\r\n","import styled from \"styled-components\";\r\n\r\nexport const OnErrorIconBox = styled.div`\r\n margin: 1rem;\r\n`;\r\n","import styled from \"styled-components\";\r\n\r\nexport const OnErrorTitleBox = styled.div`\r\n width: 100%;\r\n padding: 1rem;\r\n font-size: 1.8rem;\r\n ${({theme}) => theme.font.presets.medium};\r\n text-align: center;\r\n color: ${props => props.theme.colors.textLight};\r\n`;\r\n","import styled from \"styled-components\";\r\n\r\nexport const OnErrorMessageBox = styled.div`\r\n width: 100%;\r\n padding: 0 5rem 5rem 5rem;\r\n font-size: 1.6rem;\r\n ${({theme}) => theme.font.presets.regular};\r\n color: ${({theme}) => theme.colors.textLight.toString()};\r\n text-align: center;\r\n line-height: 1.2;\r\n`;\r\n","import styled from 'styled-components';\r\n\r\nexport const OnErrorButtonsBox = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: space-around;\r\n width: 100%;\r\n`\r\n","import React from \"react\";\r\nimport {Button} from \"../../basic-ui-components/button/base/button.component\";\r\nimport {OnErrorBox} from \"./boxes/on-error.box\";\r\nimport {OnErrorIconBox} from \"./boxes/on-error-icon.box\";\r\nimport {OnErrorTitleBox} from \"./boxes/on-error-title.box\";\r\nimport {OnErrorMessageBox} from \"./boxes/on-error-message.box\";\r\nimport {OrbitComponent} from \"../base-components/orbit-component/orbit-component\";\r\nimport {OnErrorButtonsBox} from './boxes/on-error-buttons.box';\r\n\r\n\r\n\r\nexport interface OnErrorComponentProps{\r\n title?: string;\r\n message?: string;\r\n onRetryButtonClick: () => void;\r\n onCloseButtonClick: () => void;\r\n}\r\n\r\nexport class OnErrorComponent extends OrbitComponent {\r\n\r\n\r\n render() {\r\n const title = this.props.title || this.services.translation.translate(\"CANT_CONNECT_ERROR_TITLE\");\r\n const message = this.props.message || this.services.translation.translate(\"CANT_CONNECT_ERROR_MESSAGE\");\r\n return (\r\n \r\n \r\n {message}/\r\n \r\n {title}\r\n {message}\r\n \r\n this.props.onCloseButtonClick()}\r\n sizeVariant=\"xs\"\r\n noRemUnits\r\n >\r\n {this.services.translation.translate(\"CLOSE\")}\r\n \r\n this.props.onRetryButtonClick()}\r\n sizeVariant=\"xs\"\r\n noRemUnits\r\n >\r\n {this.services.translation.translate(\"RETRY\")}\r\n \r\n \r\n\r\n \r\n );\r\n }\r\n}\r\n","import React from 'react';\r\nimport {\r\n IDrawerContent,\r\n IDrawerContentHandler\r\n} from '../../../drawer/drawer.service.interface';\r\nimport {CasinofiedApplicationBase} from './casinofied-application-base';\r\nimport {AreaType, IDivHostedAppInitParameters} from '@sparkware/uc-sdk-core';\r\nimport {OnErrorComponent} from '../../../../components/on-error/on-error.component';\r\nimport {STANDARD_TOPIC_HEADER} from '../../message-broker/message-broker.consts';\r\nimport {\r\n CHANNEL_ELEMENTS,\r\n CHANNEL_SOURCE,\r\n DISPLAY_MESSAGE_IDS\r\n} from '../../../../../common/const/casinofied-analytics-consts';\r\nimport {Undefined} from '../../../../../common/types/nullable-types';\r\n\r\nexport class InsideDrawerApplication extends CasinofiedApplicationBase implements IDrawerContent {\r\n /**\r\n * IDrawerContent.id\r\n * Used by drawer to uniquely identify the content\r\n */\r\n get id() {\r\n return this._openAppData.launchInfo.containerID;\r\n }\r\n\r\n /**\r\n * IDrawerContent.id\r\n * Used by drawer to decide the z-index\r\n */\r\n get minOverlayZIndex(): number | null {\r\n return this.services.sdk.overlayZIndex.OMG + 1;\r\n }\r\n\r\n /**\r\n * IDrawerContent.render\r\n * Called by drawer to render the content\r\n */\r\n render(): React.ReactNode {\r\n if(this._appInitFailed) {\r\n return ( this._retryOpen()}\r\n onCloseButtonClick={() => this.dispose()} />);\r\n }\r\n return (\r\n // We just render an empty React fragment.\r\n // The Drawer will create a div with an id equal to _launchInfo.containerID returned by IDrawerContent.id getter\r\n // and the app will render itself inside that div.\r\n <>\r\n );\r\n }\r\n\r\n private _retryOpen() {\r\n this.dispose();\r\n this.services.messageBroker.channels.navigation.topics.openApp.publish(STANDARD_TOPIC_HEADER, {\r\n ...this._openAppData,\r\n launchInfo: {\r\n ...this._openAppData.launchInfo,\r\n businessCorrelationID: this.services.tools.getGuid(),\r\n channel: {\r\n source: CHANNEL_SOURCE.casinoClient,\r\n area: AreaType.Message,\r\n element: CHANNEL_ELEMENTS.retryButton\r\n }\r\n }\r\n });\r\n }\r\n\r\n onOverlayClicked(): void {\r\n if(this.supportsCloseIntent) {\r\n this._applicationAdapter.closeIntent(this._openAppData.appID, this._openAppData.correlationID);\r\n }\r\n }\r\n\r\n /**\r\n * IDrawerContent.onClose\r\n * Called by drawer when is closed (click on the overlay, user login/logout etc.\r\n */\r\n onClose(): void {\r\n if(this.supportsCloseIntent) {\r\n return;\r\n }\r\n if (this._shouldMinimizeOnDrawerClose()) {\r\n if (!this.isMinimized) {\r\n this._setIsMinimized(true);\r\n this._publishMinimizeApp();\r\n }\r\n } else {\r\n this.close({channel: {\r\n source: CHANNEL_SOURCE.casinoClient,\r\n area: AreaType.Overlay,\r\n element: \"\"\r\n }, reason: this._getOnCloseReason()});\r\n }\r\n\r\n }\r\n /**\r\n * IDrawerContent.supportsCloseIntent\r\n */\r\n get supportsCloseIntent(): boolean {\r\n return false;\r\n }\r\n\r\n protected _getOnCloseReason(): Undefined {\r\n return \"OVERLAY_CLICKED\";\r\n }\r\n\r\n protected _setAppInitFailed() {\r\n super._setAppInitFailed();\r\n this.services.casinofiedAnalytics.messageDisplay({\r\n businessCorrelationID: this._openAppData.launchInfo?.businessCorrelationID,\r\n displayMessageID: DISPLAY_MESSAGE_IDS.retryCloseDrawerMessage\r\n });\r\n }\r\n\r\n\r\n async open(): Promise {\r\n (await this.services.drawer).right.showSpinner();\r\n try {\r\n await super.open();\r\n } finally {\r\n (await this.services.drawer).right.hideSpinner();\r\n }\r\n }\r\n\r\n protected _shouldMinimizeOnDrawerClose(): boolean {\r\n return false;\r\n }\r\n\r\n dispose(reportToIndex?:string) {\r\n super.dispose();\r\n this._drawerContentHandler?.remove();\r\n try {\r\n if(reportToIndex){\r\n this.services.casinofiedAnalytics.appDisposed(this._openAppData.appID, this._openAppData.launchInfo.businessCorrelationID, reportToIndex);\r\n }\r\n }\r\n catch (err){\r\n this.services.logger.error(\"Drawer application dispose error: \"+err);\r\n }\r\n }\r\n\r\n private _drawerContentHandler: IDrawerContentHandler;\r\n protected async _showApp(initParams: IDivHostedAppInitParameters): Promise {\r\n this._drawerContentHandler = (await this.services.drawer).right.push(this);\r\n await super._showApp(initParams);\r\n }\r\n\r\n async maximize(): Promise {\r\n await super.maximize();\r\n this._drawerContentHandler = (await this.services.drawer).right.push(this);\r\n }\r\n}\r\n","import {InsideDrawerApplication} from '../inside-drawer.application';\r\nimport {ComponentID, IChatSpecificParams, ChatOpenMode} from '@sparkware/uc-sdk-core';\r\n\r\n\r\nexport class ChatApplication extends InsideDrawerApplication {\r\n\r\n protected _shouldMinimizeOnDrawerClose(): boolean {\r\n return !(this.isDisposed || this._appInitFailed);\r\n }\r\n\r\n get shouldPreserveStateUponOAuthStateChange(): boolean {\r\n return true;\r\n }\r\n\r\n protected _getMiniatureComponentID(): ComponentID {\r\n return 'CR_CHAT_BUBBLE';\r\n }\r\n\r\n get minOverlayZIndex(): number | null {\r\n const chatSpecificParams = this._openAppData.launchInfo.appSpecificParameters as IChatSpecificParams;\r\n if(chatSpecificParams?.openMode === ChatOpenMode.SOF) {\r\n return this.services.sdk.overlayZIndex.OMG + 1\r\n }\r\n return null;\r\n }\r\n\r\n protected _isAnonymousModeAllowed(): boolean {\r\n return true;\r\n }\r\n}\r\n\r\n\r\n","import {IServiceFactoryExtended} from '../../service-factory-extended.interface';\r\n\r\nexport class CasinofiedAppSdkLoader {\r\n constructor(private readonly _services: IServiceFactoryExtended) {\r\n }\r\n\r\n\r\n\r\n private _loadedAppsSDKs: Record> = {};\r\n\r\n loadAppSdk(appId: string): Promise {\r\n\r\n const appLauncherConfigs = this._services.configuration.servicesConfigs.AppLauncher;\r\n const appConfigs = appLauncherConfigs.apps[appId];\r\n\r\n let url = appConfigs?.url;\r\n\r\n if(!url && appConfigs.sdk) {\r\n url = appLauncherConfigs.sdks[appConfigs.sdk]?.url;\r\n }\r\n\r\n if(!url) {\r\n return Promise.reject(`There is no component or application with ID ${appId} configured in the catalog`);\r\n }\r\n\r\n if(this._loadedAppsSDKs[url]) {\r\n return this._loadedAppsSDKs[url];\r\n }\r\n\r\n let sdkloadStartTime = Date.now();\r\n const loadScripPromise = this._services.sdk.loadScript({\r\n url: url,\r\n tagId: appId + \"_APPLICATION\",\r\n scriptType: appConfigs.scriptType\r\n });\r\n\r\n return loadScripPromise.then(() => {\r\n this._loadedAppsSDKs[url] = loadScripPromise.then(() => url);\r\n this._services.casinofiedAnalytics.reportDuration(\"loadAppSdkOk\", Date.now() - sdkloadStartTime, appConfigs.sdk || appId);\r\n return url;\r\n }).catch(err => {\r\n this._services.casinofiedAnalytics.reportDuration(\"loadAppSdkError\", Date.now() - sdkloadStartTime, appConfigs.sdk || appId);\r\n this._services.logger.error(`Failed to load SDK for ${appId} from url ${url}`, err);\r\n throw err;\r\n });\r\n }\r\n}\r\n","import {ICasinofiedComponent} from './casinofied-component.interface';\r\nimport {IServiceFactoryExtended} from '../../../service-factory-extended.interface';\r\nimport {CasinofiedAppSdkLoader} from '../casinofied-app-sdk-loader';\r\nimport {IComponentController} from '@sparkware/uc-sdk-core';\r\nimport { action, observable, makeObservable } from 'mobx';\r\nimport {TimeSpan} from '@sparkware/app-utils';\r\n\r\nexport abstract class CasinofiedComponentBase implements ICasinofiedComponent {\r\n protected readonly _containerID: string;\r\n\r\n constructor(protected readonly _componentID: string,\r\n private readonly _appSdkLoader: CasinofiedAppSdkLoader,\r\n protected readonly services: IServiceFactoryExtended) {\r\n makeObservable(this);\r\n\r\n this._containerID = services.tools.getGuid();\r\n }\r\n\r\n\r\n private _waitForContainerIdToBeInTheDOM(): Promise {\r\n return new Promise((resolve, reject) => {\r\n const startTime = Date.now();\r\n const interval = setInterval(() => {\r\n if(this.services.dom.getElementById(this._containerID)) {\r\n clearInterval(interval);\r\n resolve();\r\n } else if(Date.now() - startTime > TimeSpan.fromSeconds(3).totalMilliseconds) {\r\n clearInterval(interval);\r\n reject(`containerID creation for component ${this._componentID} timeout`);\r\n }\r\n }, 10);\r\n })\r\n }\r\n\r\n @observable.ref\r\n isLoading: boolean = false;\r\n\r\n @action.bound\r\n private _setIsLoading(value: boolean): void {\r\n this.isLoading = value;\r\n }\r\n async show(componentData: any): Promise {\r\n this._setIsLoading(true);\r\n try {\r\n await this._appSdkLoader.loadAppSdk(this._componentID);\r\n this._displayComponent(componentData);\r\n } finally {\r\n this._setIsLoading(false);\r\n }\r\n }\r\n\r\n private _componentController(): IComponentController {\r\n const componentController: IComponentController = this.services.window.getGlobalProperty(this._componentID);\r\n\r\n if(!componentController) {\r\n throw new Error(`Couldn't find a controller for ${this._componentID} component`);\r\n }\r\n\r\n if(!componentController.show) {\r\n throw new Error(`${this._componentID} component doesn't implement show method`);\r\n }\r\n\r\n if(!componentController.remove) {\r\n throw new Error(`${this._componentID} component doesn't implement remove method`);\r\n }\r\n\r\n return componentController;\r\n }\r\n\r\n protected async _displayComponent(componentData: any): Promise {\r\n await this._waitForContainerIdToBeInTheDOM();\r\n this._componentController().show({\r\n containerID: this._containerID,\r\n messageBrokerChannels: this.services.messageBroker.channels,\r\n componentData: componentData\r\n });\r\n }\r\n\r\n remove() {\r\n this._componentController().remove();\r\n }\r\n}\r\n","import React from 'react';\r\nimport {\r\n IFloatingBubbleContent,\r\n IFloatingBubbleHandler\r\n} from '../../../floating-bubbles/floating-bubbles.service.interface';\r\nimport {CasinofiedComponentBase} from './casinofied-component-base';\r\n\r\nexport class CasinofiedBubbleComponent extends CasinofiedComponentBase implements IFloatingBubbleContent {\r\n\r\n private _floatingBubbleHandler: IFloatingBubbleHandler = null;\r\n\r\n protected async _displayComponent(componentData: any): Promise {\r\n this._floatingBubbleHandler = this.services.floatingBubbles.addBubble(this);\r\n await super._displayComponent(componentData);\r\n\r\n }\r\n\r\n /**\r\n * IFloatingBubbleContent.id\r\n */\r\n get id(): string {\r\n return this._containerID;\r\n }\r\n\r\n /**\r\n * IFloatingBubbleContent.visible\r\n */\r\n get isVisible(): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * IFloatingBubbleContent.render\r\n */\r\n render(): React.ReactNode {\r\n return (<>); // we only need to render an empty fragment. The FloatingBubblesComponent will render a div for us\r\n }\r\n\r\n remove() {\r\n try {\r\n super.remove();\r\n }\r\n finally {\r\n this._floatingBubbleHandler?.remove();\r\n }\r\n }\r\n}\r\n","import {CasinofiedZoidApplicationAdapter} from \"./casinofied-zoid-application-adapter\";\r\nimport {IAppClosedTopicPayload, IDivHostedAppInitParameters} from \"@sparkware/uc-sdk-core\";\r\n\r\nexport class UnifiedCashierZoidAdapter extends CasinofiedZoidApplicationAdapter {\r\n\r\n private _onCloseAlreadyCalled: Record = {};\r\n protected _onClose(payload: IAppClosedTopicPayload, initParams: IDivHostedAppInitParameters) {\r\n const appID = payload?.appID || this.appID;\r\n\r\n if(this._onCloseAlreadyCalled[appID]) { // unified cashier is calling twice this method. The second time is without payload. Adrian Parsan is saying that is something related to zoid\r\n this._onCloseAlreadyCalled[appID] = false;\r\n } else {\r\n this._onCloseAlreadyCalled[appID] = true;\r\n try {\r\n this.applicationSdk.close(appID);\r\n } catch (err) {\r\n this.services.logger.debug(`Calling applicationSdk.close on _onClose failed for app ${this.appID}`, err);\r\n }\r\n\r\n super._onClose({\r\n ...payload,\r\n appID: appID\r\n }, initParams);\r\n }\r\n }\r\n\r\n dispose() {\r\n if(this.applicationSdk.close && !this._onCloseAlreadyCalled[this.appID]) {\r\n try {\r\n this.applicationSdk.close(this.appID);\r\n } catch (err) {\r\n this.services.logger.debug(`Calling applicationSdk.close on dispose failed for app ${this.appID}`, err);\r\n }\r\n\r\n }\r\n }\r\n}","import {InsideDrawerApplication} from \"../inside-drawer.application\";\r\nimport {IOpenAppData} from \"@sparkware/uc-sdk-core\";\r\nimport {ICasinofiedComponentFactory} from \"../../casinofied-app-factory.interfaces\";\r\nimport {CasinofiedAppSdkLoader} from \"../../casinofied-app-sdk-loader\";\r\nimport {IServiceFactoryExtended} from \"../../../../service-factory-extended.interface\";\r\nimport {ICasinofiedApplicationAdapter} from \"../adapters/casinofied-application-adapter.interface\";\r\nimport {UnifiedCashierZoidAdapter} from \"../adapters/unified-cashier-zoid-adapter\";\r\n\r\nexport class DepositWidgetApplication extends InsideDrawerApplication {\r\n public constructor(openAppData: IOpenAppData,\r\n componentFactory: ICasinofiedComponentFactory,\r\n appSdkLoader: CasinofiedAppSdkLoader,\r\n services: IServiceFactoryExtended) {\r\n super(openAppData, componentFactory, appSdkLoader, services, true);\r\n }\r\n\r\n open(): Promise {\r\n if (this.services.miniOrbit.isEnabled) {\r\n return this.services.miniOrbit.openDeposit(this._openAppData.launchInfo);\r\n } else {\r\n return super.open();\r\n }\r\n }\r\n\r\n isOpeningInNewWindow(): boolean {\r\n return this.services.miniOrbit.isEnabled;\r\n }\r\n\r\n get supportsCloseIntent(): boolean {\r\n if(this.isLoading) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n dispose() {\r\n super.dispose(\"nts-deposit-logs\");\r\n this.services.sdk.fireDepositWidgetClosed();\r\n }\r\n\r\n protected _createApplicationAdapter(appObject: any): ICasinofiedApplicationAdapter {\r\n return new UnifiedCashierZoidAdapter(this.appId, appObject, this.services);\r\n }\r\n}","import {PaymentRedirectFocusTitleDefaultBox} from \"./payment-redirect-focus-title.default.box\";\r\n\r\nexport const PaymentRedirectFocusTitleBox = PaymentRedirectFocusTitleDefaultBox;\r\n","import styled from \"styled-components\";\r\nimport { DialogTextBox } from \"../../../modal-dialog/boxes/text/dialog-text.box\";\r\n\r\nexport const PaymentRedirectFocusTitleDefaultBox = styled(DialogTextBox)`\r\n padding-bottom: 4rem;\r\n`;\r\n","import styled from \"styled-components\";\r\nimport {styledByDevice} from \"../../../../themes/architecture/styled-by-device\";\r\n\r\nconst PaymentRedirectFocusDefaultBox = styled.div`\r\n display: flex;\r\n align-items: center;\r\n flex-direction: column;\r\n justify-content: center;\r\n font-size: 1.5rem;\r\n ${({theme}) => theme.font.presets.body};\r\n margin: 2.5rem 0 0 0;\r\n padding: 0;\r\n`;\r\n\r\nconst PcBox = styled(PaymentRedirectFocusDefaultBox)`\r\n width: 25vw;\r\n`;\r\n\r\nconst MobileBox = styled(PaymentRedirectFocusDefaultBox)`\r\n width: 80vw;\r\n @media ${({theme}) => `${theme.mediaQuery.landscape}`} {\r\n width: 56vw;\r\n }\r\n`;\r\n\r\n\r\nexport const PaymentRedirectFocusBox = styledByDevice(PcBox, MobileBox);","import React from \"react\";\r\nimport {OrbitComponent} from \"../base-components/orbit-component/orbit-component\";\r\nimport {PaymentsRedirectApplication} from \"../../services/casinofied/app-launcher/apps/payments-redirect/payments-redirect.application\";\r\nimport {CyClass} from \"../../../common/cy-classes\";\r\nimport {PaymentRedirectFocusTitleBox} from \"./boxes/payment-redirect-focus-title/payment-redirect-focus-title.box\";\r\nimport {PaymentRedirectFocusBox} from \"./boxes/payment-redirect-focus-container/payment-redirect-focus.box\";\r\nimport { ModalDialogActionsComponent } from \"../modal-dialog/modal-dialog-actions.component\";\r\n\r\ninterface PaymentsRedirectFocusComponentProps {\r\n redirectApp: PaymentsRedirectApplication;\r\n}\r\n\r\nexport class PaymentsRedirectFocusComponent extends OrbitComponent {\r\n\r\n private _renderButtonContainer(): React.ReactNode {\r\n return (\r\n {}\r\n }} />\r\n );\r\n }\r\n\r\n render() {\r\n return (\r\n this.props.redirectApp.focus()}\r\n >\r\n \r\n {this.services.translation.translate(\"PAYMENTS_REDIRECT_FOCUS_TEXT\", {mftName: this.props.redirectApp.mftName})}\r\n \r\n {this._renderButtonContainer()}\r\n \r\n );\r\n }\r\n}\r\n","import React from 'react';\r\nimport {CasinofiedApplicationBase} from \"../casinofied-application-base\";\r\nimport {IOpenAppData} from \"@sparkware/uc-sdk-core\";\r\nimport {ICasinofiedComponentFactory} from \"../../casinofied-app-factory.interfaces\";\r\nimport {CasinofiedAppSdkLoader} from \"../../casinofied-app-sdk-loader\";\r\nimport {IServiceFactoryExtended} from \"../../../../service-factory-extended.interface\";\r\nimport {PaymentsRedirectFocusComponent} from \"../../../../../components/payments-redirect-focus/payments-redirect-focus.component\";\r\nimport {IModalDialogHandler} from \"../../../../dialog/dialog.service.interface\";\r\nimport {ICasinofiedApplicationAdapter} from \"../adapters/casinofied-application-adapter.interface\";\r\nimport {DISPLAY_MESSAGE_IDS} from \"../../../../../../common/const/casinofied-analytics-consts\";\r\nimport {Check} from \"@sparkware/app-utils\";\r\nimport {UnifiedCashierZoidAdapter} from \"../adapters/unified-cashier-zoid-adapter\";\r\n\r\nexport class PaymentsRedirectApplication extends CasinofiedApplicationBase {\r\n public constructor(openAppData: IOpenAppData,\r\n componentFactory: ICasinofiedComponentFactory,\r\n appSdkLoader: CasinofiedAppSdkLoader,\r\n services: IServiceFactoryExtended) {\r\n super(openAppData, componentFactory, appSdkLoader, services, true);\r\n }\r\n\r\n private _focusDialogHandler: IModalDialogHandler = null;\r\n private _containerElement: Element = null;\r\n open(): Promise {\r\n this._containerElement = this.services.dom.createElement('div');\r\n this._containerElement.id = this.openAppData.launchInfo.containerID;\r\n this.services.dom.body.appendChild(this._containerElement);\r\n return super.open().then(() => {\r\n this.services.casinofiedAnalytics.messageDisplay({\r\n displayMessageID: DISPLAY_MESSAGE_IDS.psRedirectFocusDialog,\r\n businessCorrelationID: this._openAppData.launchInfo.businessCorrelationID\r\n });\r\n\r\n this._focusDialogHandler = this.services.dialog.showModal(() => {\r\n return ()\r\n }, {\r\n title: this.services.translation.translate(\"PAYMENTS_REDIRECT_FOCUS_TITLE\"),\r\n icon: this.services.theme.currentTheme.icons.paymentsRedirectIcon,\r\n hideCloseButton: true,\r\n isHighPriority: true,\r\n forceCentralization: true,\r\n mobileCenterHeader: true,\r\n forceTransparentBackground: true,\r\n disableFullscreenMobile: true\r\n });\r\n });\r\n }\r\n\r\n focus() {\r\n this.services.casinofiedAnalytics.messageActionTaken({\r\n businessCorrelationID: this._openAppData.launchInfo.businessCorrelationID,\r\n actionType: 'focus',\r\n sendLogLevelOnly: true\r\n });\r\n\r\n this._applicationAdapter.focus();\r\n }\r\n\r\n dispose() {\r\n super.dispose();\r\n this._containerElement?.remove();\r\n this._focusDialogHandler?.close();\r\n }\r\n\r\n get mftName(): string {\r\n const mftName = this._openAppData.launchInfo.appSpecificParameters[\"mft\"];\r\n\r\n return Check.isNullOrUndefined(mftName) ? \"\" : mftName;\r\n }\r\n\r\n protected _createApplicationAdapter(appObject: any): ICasinofiedApplicationAdapter {\r\n return new UnifiedCashierZoidAdapter(this.appId, appObject, this.services);\r\n }\r\n}","import {OpenCashierOptions} from \"../../../../../../common/interfaces/cashier.service.interface\";\r\nimport {ICasinofiedApplication, IAppCloseParams} from \"../casinofied-application.interface\";\r\nimport {IServiceFactoryExtended} from \"../../../../service-factory-extended.interface\";\r\nimport {AppIdentifiers, IOpenAppData} from \"@sparkware/uc-sdk-core\";\r\nimport {\r\n getCasinofiedCommonAppContextParams, getCasinofiedCommonUserInfo,\r\n getCasinofiedDeviceInfo,\r\n getCasinofiedGeoInfoParams\r\n} from \"../../../casinofied-helper-functions\";\r\nimport {CGPEventSubscription} from \"../../../../sdk/cgp-sdk.interface\";\r\nimport {STANDARD_TOPIC_HEADER} from \"../../../message-broker/message-broker.consts\";\r\nimport {GNWP_SOURCES} from \"../../../../gnwp/gnwp-consts\";\r\n\r\n\r\nexport class FullCashierApplication implements ICasinofiedApplication {\r\n constructor(public readonly openAppData: IOpenAppData, private readonly services: IServiceFactoryExtended) {\r\n }\r\n\r\n readonly shouldPreserveStateUponOAuthStateChange = false;\r\n async open(): Promise {\r\n this.isLoading = true;\r\n\r\n try {\r\n const options: OpenCashierOptions = {};\r\n if(this.openAppData.launchInfo.appSpecificParameters?.SessionType) {\r\n options.sessionType = this.openAppData.launchInfo.appSpecificParameters.SessionType;\r\n }\r\n\r\n const geoInfo = await getCasinofiedGeoInfoParams(this.services);\r\n\r\n this.services.casinofiedAnalytics.appInitRequest({\r\n correlationID: this.openAppData.correlationID,\r\n applicationContext: {\r\n appID: this.openAppData.appID,\r\n launchInfo: this.openAppData.launchInfo,\r\n ...getCasinofiedCommonAppContextParams(this.services),\r\n productPackageToID: this.services.cashier.getProductPackage()\r\n },\r\n deviceInfo: getCasinofiedDeviceInfo(this.services),\r\n geoInfo: geoInfo,\r\n userInfo: {\r\n ...getCasinofiedCommonUserInfo(this.services),\r\n userMode: 'authenticated'\r\n },\r\n messageBrokerChannels: this.services.messageBroker.channels\r\n });\r\n\r\n this._onExternalLinkClosedSubscription = this.services.sdk.events.onExternalLinkClosed(this._onExternalLinkClosed);\r\n\r\n try {\r\n await this.services.cashier.openOldCashier(options);\r\n } catch (err) {\r\n this._onExternalLinkClosedSubscription.off();\r\n throw err;\r\n }\r\n\r\n } finally {\r\n this.isLoading = false;\r\n }\r\n\r\n }\r\n\r\n get appId(): AppIdentifiers {\r\n return AppIdentifiers.FullCashier;\r\n }\r\n isDisposed: boolean = false;\r\n\r\n isLoading: boolean = false;\r\n\r\n get isMinimized(): boolean {\r\n return false;\r\n }\r\n\r\n dispose(): void {\r\n this.isDisposed = true;\r\n this._onExternalLinkClosedSubscription?.off();\r\n }\r\n\r\n async maximize(): Promise {\r\n }\r\n\r\n minimize(appData: any): void {\r\n }\r\n\r\n waitForAppToOpen(): Promise {\r\n return Promise.resolve();\r\n }\r\n\r\n private _onExternalLinkClosedSubscription: CGPEventSubscription = null;\r\n private _onExternalLinkClosed = (linkSource: string) => {\r\n if(linkSource === GNWP_SOURCES.CASHIER) {\r\n this.services.messageBroker.channels.session.topics.appClosed.publish(STANDARD_TOPIC_HEADER, {\r\n appID: this.appId\r\n });\r\n }\r\n }\r\n\r\n isOpeningInNewWindow(): boolean {\r\n return false;\r\n }\r\n\r\n close(params: IAppCloseParams): void {\r\n // not used at the moment, implemented to respect the interface constraints\r\n // if needed, check implementation in casinofied-application-base\r\n }\r\n}","import {InsideDrawerApplication} from \"../inside-drawer.application\";\r\nimport {IOpenAppData} from \"@sparkware/uc-sdk-core\";\r\nimport {ICasinofiedComponentFactory} from \"../../casinofied-app-factory.interfaces\";\r\nimport {CasinofiedAppSdkLoader} from \"../../casinofied-app-sdk-loader\";\r\nimport {IServiceFactoryExtended} from \"../../../../service-factory-extended.interface\";\r\nimport {ICasinofiedApplicationAdapter} from \"../adapters/casinofied-application-adapter.interface\";\r\nimport {UnifiedCashierZoidAdapter} from \"../adapters/unified-cashier-zoid-adapter\";\r\n\r\nexport class CashoutWidgetApplication extends InsideDrawerApplication {\r\n public constructor(openAppData: IOpenAppData,\r\n componentFactory: ICasinofiedComponentFactory,\r\n appSdkLoader: CasinofiedAppSdkLoader,\r\n services: IServiceFactoryExtended) {\r\n super(openAppData, componentFactory, appSdkLoader, services, true);\r\n }\r\n\r\n protected _createApplicationAdapter(appObject: any): ICasinofiedApplicationAdapter {\r\n return new UnifiedCashierZoidAdapter(this.appId, appObject, this.services);\r\n }\r\n\r\n dispose() {\r\n super.dispose(\"nts-cashout-logs\");\r\n }\r\n}","import {InsideDrawerApplication} from \"../inside-drawer.application\";\r\nimport {IOpenAppData} from \"@sparkware/uc-sdk-core\";\r\nimport {ICasinofiedComponentFactory} from \"../../casinofied-app-factory.interfaces\";\r\nimport {CasinofiedAppSdkLoader} from \"../../casinofied-app-sdk-loader\";\r\nimport {IServiceFactoryExtended} from \"../../../../service-factory-extended.interface\";\r\nimport {ICasinofiedApplicationAdapter} from \"../adapters/casinofied-application-adapter.interface\";\r\nimport {UnifiedCashierZoidAdapter} from \"../adapters/unified-cashier-zoid-adapter\";\r\n\r\nexport class TransactionHistoryApplication extends InsideDrawerApplication {\r\n public constructor(openAppData: IOpenAppData,\r\n componentFactory: ICasinofiedComponentFactory,\r\n appSdkLoader: CasinofiedAppSdkLoader,\r\n services: IServiceFactoryExtended) {\r\n super(openAppData, componentFactory, appSdkLoader, services, true);\r\n }\r\n\r\n protected _createApplicationAdapter(appObject: any): ICasinofiedApplicationAdapter {\r\n return new UnifiedCashierZoidAdapter(this.appId, appObject, this.services);\r\n }\r\n\r\n dispose() {\r\n super.dispose(\"nts-transaction-history-logs\");\r\n }\r\n}","import {AppIdentifiers, IOpenAppData} from \"@sparkware/uc-sdk-core\";\r\nimport {ICasinofiedApplication, IAppCloseParams} from \"../casinofied-application.interface\";\r\nimport {IServiceFactoryExtended} from \"../../../../service-factory-extended.interface\";\r\nimport {OpenCashierOptions} from \"../../../../../../common/interfaces/cashier.service.interface\";\r\nimport {\r\n getCasinofiedCommonAppContextParams, getCasinofiedCommonUserInfo,\r\n getCasinofiedDeviceInfo,\r\n getCasinofiedGeoInfoParams\r\n} from \"../../../casinofied-helper-functions\";\r\n\r\nexport class CustomerRelationsApplication implements ICasinofiedApplication {\r\n constructor(public readonly openAppData: IOpenAppData, private readonly services: IServiceFactoryExtended) {\r\n }\r\n\r\n readonly shouldPreserveStateUponOAuthStateChange = false;\r\n\r\n async open(): Promise {\r\n this.isLoading = true;\r\n\r\n try {\r\n const options: OpenCashierOptions = {};\r\n if(this.openAppData.launchInfo.appSpecificParameters?.SessionType) {\r\n options.sessionType = this.openAppData.launchInfo.appSpecificParameters.SessionType;\r\n }\r\n\r\n const geoInfo = await getCasinofiedGeoInfoParams(this.services);\r\n\r\n this.services.casinofiedAnalytics.appInitRequest({\r\n correlationID: this.openAppData.correlationID,\r\n applicationContext: {\r\n appID: this.openAppData.appID,\r\n launchInfo: this.openAppData.launchInfo,\r\n ...getCasinofiedCommonAppContextParams(this.services),\r\n productPackageToID: this.services.cashier.getProductPackage()\r\n },\r\n deviceInfo: getCasinofiedDeviceInfo(this.services),\r\n geoInfo: geoInfo,\r\n userInfo: {\r\n ...getCasinofiedCommonUserInfo(this.services),\r\n userMode: 'authenticated'\r\n },\r\n messageBrokerChannels: this.services.messageBroker.channels\r\n });\r\n const featureType = this.openAppData.launchInfo.appSpecificParameters?.featureType;\r\n const externalLinks = await this.services.externalLinks;\r\n switch (featureType) {\r\n case 1:\r\n await externalLinks.openOldChat();\r\n break;\r\n case 2:\r\n await externalLinks.openContactUs();\r\n break;\r\n case 3:\r\n await externalLinks.openHelpPage();\r\n break;\r\n default:\r\n await externalLinks.openHelpPage();\r\n this.services.logger.error(`App ${this.openAppData.launchInfo?.sourceAppID} sent wrong featureType paramenter ${featureType}`);\r\n }\r\n\r\n } finally {\r\n this.isLoading = false;\r\n }\r\n }\r\n\r\n isOpeningInNewWindow(): boolean {\r\n return true;\r\n }\r\n\r\n get appId(): AppIdentifiers {\r\n return AppIdentifiers.CustomerRelations;\r\n }\r\n isDisposed: boolean = false;\r\n\r\n isLoading: boolean = false;\r\n\r\n get isMinimized(): boolean {\r\n return false;\r\n }\r\n\r\n dispose(): void {\r\n this.isDisposed = true;\r\n }\r\n\r\n async maximize(): Promise {\r\n }\r\n\r\n minimize(appData: any): void {\r\n }\r\n\r\n waitForAppToOpen(): Promise {\r\n return Promise.resolve();\r\n }\r\n\r\n close(params: IAppCloseParams): void {\r\n // not used at the moment, implemented to respect the interface constraints\r\n // if needed, check implementation in casinofied-application-base\r\n }\r\n}","import {CasinofiedApplicationBase} from \"../casinofied-application-base\";\r\nimport {IDivHostedAppInitParameters} from \"@sparkware/uc-sdk-core\";\r\n\r\nexport class FreeToPlayBonusGamesApplication extends CasinofiedApplicationBase {\r\n private _bonusWheelContainerElement: HTMLElement | null = null;\r\n protected async _showApp(initParams: IDivHostedAppInitParameters): Promise {\r\n this._bonusWheelContainerElement = this.services.dom.createElement('div');\r\n this._bonusWheelContainerElement.id = this._openAppData.launchInfo.containerID;\r\n this.services.dom.body.appendChild(this._bonusWheelContainerElement);\r\n await super._showApp(initParams);\r\n }\r\n\r\n async open(): Promise {\r\n this.services.freeToPlay.setIsPromotionOpened(true);\r\n try {\r\n await super.open();\r\n } catch (err) {\r\n this.services.freeToPlay.setIsPromotionOpened(false);\r\n throw err;\r\n }\r\n }\r\n\r\n dispose() {\r\n super.dispose();\r\n this.services.freeToPlay.setIsPromotionOpened(false);\r\n this.services.sdk.fireFreeToPlayWidgetClosed();\r\n\r\n try {\r\n this._bonusWheelContainerElement?.remove();\r\n } catch (err) {\r\n this.services.logger.error('Failed to remove bonus wheel container element', err);\r\n }\r\n }\r\n}","import {InsideDrawerApplication} from '../inside-drawer.application';\r\n\r\nexport class HelpCentreApplication extends InsideDrawerApplication {\r\n protected _isAnonymousModeAllowed(): boolean {\r\n return true;\r\n }\r\n}\r\n\r\n\r\n","import {\r\n ControlCenterOpenSource,\r\n Enviroments,\r\n IControlCenterBaseSpecificParams,\r\n IDivHostedAppInitParameters,\r\n} from '@sparkware/uc-sdk-core';\r\nimport {IServiceFactoryExtended} from '../../../../service-factory-extended.interface';\r\n\r\nexport function getInitAppParamsForControlCenter(initParams: IDivHostedAppInitParameters, services: IServiceFactoryExtended): IDivHostedAppInitParameters {\r\n initParams.applicationContext.launchInfo.appSpecificParameters = getAppSpecificParamsForControlCenter(initParams.applicationContext.launchInfo.appSpecificParameters, services);\r\n\r\n // The env property should be sent for all applications and setting it should be in CasinofiedApplicationBase (casinofied-application-base.ts) nethod _getAppInitCommonParams\r\n // But because we did not sent it to other applications and we don't have the exact values to send, we only send it to control center\r\n initParams[\"env\"] = services.configuration.startupConfiguration.sdk.config.ExtraProperties.env as Enviroments;\r\n\r\n return initParams;\r\n}\r\n\r\nexport function getAppSpecificParamsForControlCenter(appSpecificParameters: T, services: IServiceFactoryExtended) {\r\n let source = appSpecificParameters?.source ?? ControlCenterOpenSource.Lobby;\r\n\r\n return {\r\n clientPlatform: parseInt(services.sdk.getSkin().getClientPlatform()),\r\n ...appSpecificParameters,\r\n source\r\n };\r\n\r\n}\r\n","import {InsideDrawerApplication} from '../inside-drawer.application';\r\nimport {IDivHostedAppInitParameters, IOpenAppData} from '@sparkware/uc-sdk-core';\r\nimport {getInitAppParamsForControlCenter} from './init-params-helper';\r\nimport {IAppInitResultReportingDetails} from '../../../analytics-publisher/casinofied-analytics.service';\r\nimport {ICasinofiedComponentFactory} from '../../casinofied-app-factory.interfaces';\r\nimport {CasinofiedAppSdkLoader} from '../../casinofied-app-sdk-loader';\r\nimport {IServiceFactoryExtended} from '../../../../service-factory-extended.interface';\r\nimport {IAppCloseParams} from '../casinofied-application.interface';\r\nimport {ControlCenterAnalyticsHelper} from './control-center-analytics-helper';\r\n\r\nexport class ControlCenterFullApplication extends InsideDrawerApplication {\r\n // private appClosedSubscription: ITopicSubscription | null = null;\r\n\r\n constructor(openAppData: IOpenAppData,\r\n _componentFactory: ICasinofiedComponentFactory,\r\n appSdkLoader: CasinofiedAppSdkLoader,\r\n services: IServiceFactoryExtended,\r\n private analyticsHelper: ControlCenterAnalyticsHelper\r\n ) {\r\n super(openAppData, _componentFactory, appSdkLoader, services, false);\r\n // In the old implementation of safezone the close internal was not reported by us, if we have to then we have to use this subscription\r\n // this.appClosedSubscription = this.services.messageBroker.channels.session.topics.appClosed.subscribe((payload) => {\r\n // if (this._isCurrentApp(payload.appID)) {\r\n // if (payload.closeReason === this._getOnCloseReason()) {\r\n // // report full close external (overlay click)\r\n // } else {\r\n // // report full close internal (X button, links)\r\n // }\r\n // this.appClosedSubscription.unsubscribe();\r\n // }\r\n // });\r\n\r\n // at this moment we dont have appInitParams so we have to rely on IOpenAppData\r\n this.analyticsHelper.setCorrelationID(openAppData.correlationID).setSource(openAppData.launchInfo.appSpecificParameters.source).trackAppOpen();\r\n }\r\n protected _getInitAppParams(initParams: IDivHostedAppInitParameters): IDivHostedAppInitParameters {\r\n let result = super._getInitAppParams(initParams);\r\n result = getInitAppParamsForControlCenter(result, this.services);\r\n /* save here the correlationId and the source for analytics */\r\n this.analyticsHelper.setCorrelationID(result.correlationID).setSource(result.applicationContext.launchInfo.appSpecificParameters.source);\r\n return result;\r\n }\r\n\r\n close(params: IAppCloseParams) {\r\n super.close(params);\r\n if (params.reason === this._getOnCloseReason()) {\r\n this.analyticsHelper.trackCloseExternal();\r\n }\r\n }\r\n\r\n protected onAppInitSuccess(appInitParams: IDivHostedAppInitParameters, appInitResultReportingDetails?: IAppInitResultReportingDetails) {\r\n super.onAppInitSuccess(appInitParams, appInitResultReportingDetails);\r\n this.analyticsHelper.trackAppInitSuccess();\r\n }\r\n\r\n protected onAppInitTimeout(appInitParams: IDivHostedAppInitParameters, appInitResultReportingDetails?: IAppInitResultReportingDetails) {\r\n super.onAppInitTimeout(appInitParams, appInitResultReportingDetails);\r\n this.analyticsHelper.trackAppInitFailed();\r\n }\r\n\r\n protected onAppInitFailed(appInitParams: IDivHostedAppInitParameters, appInitResultReportingDetails?: IAppInitResultReportingDetails) {\r\n super.onAppInitFailed(appInitParams, appInitResultReportingDetails);\r\n this.analyticsHelper.trackAppInitFailed();\r\n }\r\n}\r\n","export interface IAnalyticsDataLayerService{\r\n pushControlCenterEvent(eventParams:IControlCenterEventParams): void;\r\n}\r\n\r\nexport interface IControlCenterDataLayerParams {\r\n intent: string,\r\n login_session_id: string,\r\n user_type: string,\r\n rm_status: number,\r\n rg_risk_level: number,\r\n local_time: string,\r\n sub_brand_name: number,\r\n sub_brand_id: number,\r\n registration_country: string,\r\n context: string,\r\n registration_date: string,\r\n cid: string,\r\n env: string,\r\n product_package: number\r\n}\r\n\r\nexport interface IControlCenterEventParams {\r\n action: string,\r\n category: string,\r\n event: string,\r\n correlation_id?: string,\r\n channel: string,\r\n label: string,\r\n local_time: string,\r\n session_status?: SESSION_STATUS\r\n}\r\n\r\nexport enum SESSION_STATUS {\r\n Failure = 0,\r\n Success = 1,\r\n Partial = 2\r\n};\r\n\r\n","import {CasinofiedApplicationBase} from '../casinofied-application-base';\r\nimport {IOpenAppData, IDivHostedAppInitParameters, ControlCenterCloseSource} from '@sparkware/uc-sdk-core';\r\nimport {ICasinofiedComponentFactory} from '../../casinofied-app-factory.interfaces';\r\nimport {CasinofiedAppSdkLoader} from '../../casinofied-app-sdk-loader';\r\nimport {IServiceFactoryExtended} from '../../../../service-factory-extended.interface';\r\nimport {CONTROL_CENTER_CONTAINERS_ID} from '../../../../control-center/control-center.service.interface';\r\nimport {getInitAppParamsForControlCenter} from './init-params-helper';\r\nimport {IAppInitResultReportingDetails} from '../../../analytics-publisher/casinofied-analytics.service';\r\nimport {IAppCloseParams} from '../casinofied-application.interface';\r\nimport {ControlCenterAnalyticsHelper} from \"./control-center-analytics-helper\";\r\n\r\nexport class ControlCenterMiniApplication extends CasinofiedApplicationBase {\r\n\r\n constructor(openAppData: IOpenAppData,\r\n _componentFactory: ICasinofiedComponentFactory,\r\n appSdkLoader: CasinofiedAppSdkLoader,\r\n services: IServiceFactoryExtended,\r\n private analyticsHelper: ControlCenterAnalyticsHelper\r\n ) {\r\n super(openAppData, _componentFactory, appSdkLoader, services, false);\r\n this._openAppData.launchInfo.containerID = CONTROL_CENTER_CONTAINERS_ID.CONTROL_CENTER_MINI_CONTAINER_ID;\r\n // at this moment we dont have appInitParams so we have to rely on IOpenAppData\r\n this.analyticsHelper.setCorrelationID(openAppData.correlationID).setSource(openAppData.launchInfo.appSpecificParameters.source).trackAppOpen();\r\n }\r\n\r\n protected _getInitAppParams(initParams: IDivHostedAppInitParameters): IDivHostedAppInitParameters {\r\n let result = super._getInitAppParams(initParams);\r\n result = getInitAppParamsForControlCenter(result, this.services);\r\n /* save here the correlationId and the source for analytics */\r\n this.analyticsHelper.setCorrelationID(result.correlationID).setSource(result.applicationContext.launchInfo.appSpecificParameters.source);\r\n return result;\r\n }\r\n\r\n public close(params: IAppCloseParams) {\r\n super.close(params);\r\n // If you wonder why I do analytics here and not using services.messageBroker.channels.session.topics.appClosed.subscribe\r\n // it is because appClosed is not triggered by control center when clicking on the mini widget to open the full. It is triggered by me also here.\r\n // So no point subscribing. If in the future others will trigger appClosed will reconsider this\r\n if (params.reason === ControlCenterCloseSource.MiniSafeZone) {\r\n this.analyticsHelper.trackCloseInternal();\r\n } else if (params.reason === ControlCenterCloseSource.ClientPage) {\r\n this.analyticsHelper.trackCloseExternal();\r\n }\r\n }\r\n\r\n protected onAppInitSuccess(appInitParams: IDivHostedAppInitParameters, appInitResultReportingDetails?: IAppInitResultReportingDetails) {\r\n super.onAppInitSuccess(appInitParams, appInitResultReportingDetails);\r\n this.analyticsHelper.trackAppInitSuccess();\r\n }\r\n\r\n protected onAppInitTimeout(appInitParams: IDivHostedAppInitParameters, appInitResultReportingDetails?: IAppInitResultReportingDetails) {\r\n super.onAppInitTimeout(appInitParams, appInitResultReportingDetails);\r\n this.analyticsHelper.trackAppInitFailed()\r\n }\r\n\r\n protected onAppInitFailed(appInitParams: IDivHostedAppInitParameters, appInitResultReportingDetails?: IAppInitResultReportingDetails) {\r\n super.onAppInitFailed(appInitParams, appInitResultReportingDetails);\r\n this.analyticsHelper.trackAppInitFailed()\r\n }\r\n\r\n}\r\n\r\n\r\n","import {SESSION_STATUS, IControlCenterEventParams} from \"../../../../analytics/analytics-data-layer.service.interface\";\r\nimport {IServiceFactoryExtended} from \"../../../../service-factory-extended.interface\";\r\n\r\ninterface IControlCenterEventNames {\r\n category: string;\r\n open: string;\r\n ready: string;\r\n closeExternal: string;\r\n closeInternal?: string;\r\n}\r\n\r\nexport class ControlCenterAnalyticsHelper {\r\n private correlationID: string | null = null;\r\n private source: string | null = null;\r\n private sessionStatus: SESSION_STATUS = SESSION_STATUS.Partial;\r\n\r\n constructor(\r\n private eventNames: IControlCenterEventNames,\r\n private services: IServiceFactoryExtended\r\n ) {\r\n\r\n }\r\n\r\n setCorrelationID(c: string) {\r\n this.correlationID = c;\r\n return this;\r\n }\r\n\r\n setSource(s: string) {\r\n this.source = s;\r\n return this;\r\n }\r\n\r\n trackAppOpen() {\r\n this._pushControlCenterEvent(this.eventNames.open);\r\n }\r\n\r\n trackAppInitSuccess() {\r\n this.sessionStatus = SESSION_STATUS.Success;\r\n this._pushControlCenterEvent(this.eventNames.ready);\r\n }\r\n\r\n trackAppInitFailed() {\r\n this.sessionStatus = SESSION_STATUS.Failure;\r\n this._pushControlCenterEvent(this.eventNames.ready);\r\n }\r\n\r\n trackCloseExternal() {\r\n this._pushControlCenterEvent(this.eventNames.closeExternal);\r\n }\r\n\r\n trackCloseInternal() {\r\n if (this.eventNames.closeInternal) {\r\n this._pushControlCenterEvent(this.eventNames.closeInternal);\r\n }\r\n }\r\n\r\n private async _pushControlCenterEvent(controlCenterEvent: string): Promise {\r\n (await this.services.analyticsDataLayer).pushControlCenterEvent({\r\n ...this._getEventParams(controlCenterEvent, this.correlationID, this.source),\r\n session_status: this.sessionStatus\r\n });\r\n }\r\n protected _getEventParams(name: string, correlation_id: string, source: string): IControlCenterEventParams {\r\n return {\r\n action: name,\r\n category: this.eventNames.category,\r\n event: name,\r\n correlation_id: correlation_id,\r\n channel: source,\r\n label: undefined,\r\n local_time: (new Date()).toString()\r\n };\r\n }\r\n\r\n}","import {IOpenAppData} from \"@sparkware/uc-sdk-core\";\r\nimport {IServiceFactoryExtended} from \"../../../../service-factory-extended.interface\";\r\nimport {ICasinofiedComponentFactory} from \"../../casinofied-app-factory.interfaces\";\r\nimport {CasinofiedAppSdkLoader} from \"../../casinofied-app-sdk-loader\";\r\nimport {InsideDrawerApplication} from \"../inside-drawer.application\";\r\n\r\nexport class RegistrationWidget extends InsideDrawerApplication {\r\n public constructor(openAppData: IOpenAppData,\r\n componentFactory: ICasinofiedComponentFactory,\r\n appSdkLoader: CasinofiedAppSdkLoader,\r\n services: IServiceFactoryExtended) {\r\n super(openAppData, componentFactory, appSdkLoader, services, false);\r\n }\r\n\r\n protected _isAnonymousModeAllowed(): boolean {\r\n return true;\r\n }\r\n\r\n get supportsCloseIntent(): boolean {\r\n if(this.isLoading) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n}","import {ICasinofiedApplication} from './apps/casinofied-application.interface';\r\nimport {AppIdentifiers, ComponentID, IOpenAppData} from '@sparkware/uc-sdk-core';\r\nimport {ChatApplication} from './apps/chat/chat.application';\r\nimport {IServiceFactoryExtended} from '../../service-factory-extended.interface';\r\nimport {CasinofiedAppSdkLoader} from './casinofied-app-sdk-loader';\r\nimport {ICasinofiedComponent} from './components/casinofied-component.interface';\r\nimport {CasinofiedBubbleComponent} from './components/casinofied-bubble.component';\r\nimport {InsideDrawerApplication} from './apps/inside-drawer.application';\r\nimport {ICasinofiedAppFactory, ICasinofiedComponentFactory} from './casinofied-app-factory.interfaces';\r\nimport {DepositWidgetApplication} from \"./apps/deposit-widget/deposit-widget.application\";\r\nimport {PaymentsRedirectApplication} from \"./apps/payments-redirect/payments-redirect.application\";\r\nimport {FullCashierApplication} from \"./apps/full-cashier/full-cashier.application\";\r\nimport {CashoutWidgetApplication} from './apps/cashout-widget/cashout-widget.application';\r\nimport {TransactionHistoryApplication} from './apps/transaction-history/transaction-history.application';\r\nimport {CustomerRelationsApplication} from \"./apps/customer-relations/customer-relations.application\";\r\nimport {FreeToPlayBonusGamesApplication} from \"./apps/free-to-play-bonus-games/free-to-play-bonus-games.application\";\r\nimport {HelpCentreApplication} from \"./apps/help-centre/help-centre.application\";\r\nimport {ControlCenterFullApplication} from \"./apps/control-center/control-center-full.application\";\r\nimport {ControlCenterMiniApplication} from \"./apps/control-center/control-center-mini.application\";\r\nimport {ControlCenterAnalyticsHelper} from './apps/control-center/control-center-analytics-helper';\r\nimport {CONTROL_CENTER_BI_EVENTS} from '../../control-center/control-center.service.interface';\r\nimport {RegistrationWidget} from './apps/registration-widget/registration-widget.application';\r\n\r\nexport class CasinofiedAppFactory implements ICasinofiedAppFactory, ICasinofiedComponentFactory {\r\n constructor(private readonly _services: IServiceFactoryExtended) {\r\n this._appSdkLoader = new CasinofiedAppSdkLoader(_services);\r\n }\r\n\r\n private readonly _appSdkLoader: CasinofiedAppSdkLoader;\r\n\r\n createApplication(openAppData: IOpenAppData): ICasinofiedApplication {\r\n switch (openAppData.appID) {\r\n case AppIdentifiers.CRChat:\r\n return new ChatApplication(openAppData, this, this._appSdkLoader, this._services, false);\r\n case AppIdentifiers.OpenBanking:\r\n return new InsideDrawerApplication(openAppData, this, this._appSdkLoader, this._services, false);\r\n case AppIdentifiers.UnifiedCashier:\r\n return new DepositWidgetApplication(openAppData, this, this._appSdkLoader, this._services);\r\n case AppIdentifiers.Redirect:\r\n return new PaymentsRedirectApplication(openAppData, this, this._appSdkLoader, this._services);\r\n case AppIdentifiers.FullCashier:\r\n return new FullCashierApplication(openAppData, this._services);\r\n case AppIdentifiers.UnifiedCashout:\r\n return new CashoutWidgetApplication(openAppData, this, this._appSdkLoader, this._services);\r\n case AppIdentifiers.TransactionHistory:\r\n return new TransactionHistoryApplication(openAppData, this, this._appSdkLoader, this._services);\r\n case AppIdentifiers.CustomerRelations:\r\n return new CustomerRelationsApplication(openAppData, this._services);\r\n case AppIdentifiers.CasinoBonusGameWidget:\r\n return new FreeToPlayBonusGamesApplication(openAppData, this, this._appSdkLoader, this._services, false);\r\n case AppIdentifiers.Registration:\r\n return new RegistrationWidget(openAppData, this, this._appSdkLoader, this._services)\r\n case AppIdentifiers.CRHelpCenter:\r\n return new HelpCentreApplication(openAppData, this, this._appSdkLoader, this._services, false);\r\n case AppIdentifiers.ControlCenterFull:\r\n return new ControlCenterFullApplication(openAppData, this, this._appSdkLoader, this._services, new ControlCenterAnalyticsHelper(\r\n {\r\n category: CONTROL_CENTER_BI_EVENTS.CATEGORY_FULL,\r\n open: CONTROL_CENTER_BI_EVENTS.FULL_OPEN,\r\n ready: CONTROL_CENTER_BI_EVENTS.FULL_READY,\r\n closeExternal: CONTROL_CENTER_BI_EVENTS.FULL_CLOSE_EXTERNAL\r\n }, this._services\r\n ));\r\n case AppIdentifiers.ControlCenterMini:\r\n return new ControlCenterMiniApplication(openAppData, this, this._appSdkLoader, this._services, new ControlCenterAnalyticsHelper(\r\n {\r\n category: CONTROL_CENTER_BI_EVENTS.CATEGORY_MINI,\r\n open: CONTROL_CENTER_BI_EVENTS.MINI_OPEN,\r\n ready: CONTROL_CENTER_BI_EVENTS.MINI_READY,\r\n closeExternal: CONTROL_CENTER_BI_EVENTS.MINI_CLOSE_EXTERNAL,\r\n closeInternal: CONTROL_CENTER_BI_EVENTS.MINI_CLOSE_INTERNAL\r\n }, this._services\r\n ));\r\n default:\r\n throw new Error(`Application with ID ${openAppData.appID} is not supported`);\r\n }\r\n }\r\n\r\n createComponent(componentId: ComponentID): ICasinofiedComponent {\r\n switch (componentId) {\r\n case 'CR_CHAT_BUBBLE':\r\n return new CasinofiedBubbleComponent(componentId, this._appSdkLoader, this._services);\r\n default:\r\n throw new Error(`Component with ID ${componentId} is not supported`);\r\n }\r\n }\r\n}\r\n","import {IServiceFactoryExtended} from \"../../../service-factory-extended.interface\";\r\nimport {MarketingParams} from \"../../../../../common/interfaces/marketing-params.interface\";\r\n\r\nexport interface IRegistrationMarketingData {\r\n TestData: {\r\n dl: string;\r\n dlp: string;\r\n \"orig-lp\": string;\r\n referrer: string;\r\n //FirebaseAppInstanceID?: string; //this is will be added from IDeviceInfoParameters in additionalParams\r\n //FirebaseAppID?: string; //this is will be added from IDeviceInfoParameters in additionalParams\r\n //AppsFlyerID?: string; //this is will be added from IDeviceInfoParameters in additionalParams\r\n //AppID?: string; //this is will be added from IDeviceInfoParameters in additionalParams\r\n //DeviceID?: string; //this is will be added from IDeviceInfoParameters in additionalParams\r\n IDFV?: string;\r\n [key: string]: any;\r\n };\r\n additionalParams?: {\r\n campaignid: string;\r\n [key: string]: any;\r\n };\r\n sr: string; //this is actually the defaultSerial\r\n}\r\n\r\nexport class RegistrationMarketingDataBuilder {\r\n constructor(private readonly services: IServiceFactoryExtended) {\r\n }\r\n\r\n async buildMarketingData(options?: MarketingParams): Promise {\r\n let marketingData = (await this.services.marketing).getMarketingData(options);\r\n marketingData = await this.services.sdk.getSkin().getSerialData(marketingData);\r\n\r\n marketingData = await this._appendHybridMarketingTestData(marketingData);\r\n\r\n marketingData = await this.services.hybrid.getLexisNexisSession(marketingData);\r\n\r\n return marketingData;\r\n\r\n /*\r\n const result: any = {};\r\n\r\n Object.keys(marketingData).forEach((key) => {\r\n if (_.isString(marketingData[key])) {\r\n result[key] = marketingData[key];\r\n } else {\r\n result[key] = JSON.stringify(marketingData[key]);\r\n }\r\n });\r\n\r\n return result;\r\n */\r\n }\r\n\r\n private async _appendHybridMarketingTestData(marketingData: any): Promise {\r\n if(!this.services.device.hybrid.inCasino) {\r\n return marketingData;\r\n }\r\n\r\n let testData = marketingData.TestData ?? {};\r\n const hybridTestData = this.services.hybrid.getAppMareketingData();\r\n\r\n marketingData.TestData = {\r\n ...testData,\r\n ...hybridTestData\r\n };\r\n return marketingData;\r\n }\r\n\r\n}","import {ICasinofiedAppLauncherService, ILaunchAppData} from './casinofied-app-launcher.service.interface';\r\nimport {ServiceBase} from '../../ServiceBase';\r\nimport {IServiceFactoryExtended} from '../../service-factory-extended.interface';\r\nimport {\r\n ActionID,\r\n AppIdentifiers,\r\n ControlCenterOpenSource,\r\n IAppClosedTopicPayload,\r\n IAppMaximizedTopicPayload,\r\n IAppMinimizedTopicPayload, ICasinoFreeToPlaySpecificParameters,\r\n IChatSpecificParams,\r\n IControlCenterBaseSpecificParams,\r\n IControlCenterFullSpecificParams,\r\n IOpenAppData, IRegistrationSpecificParams,\r\n SequentialCorrelationIdHandler,\r\n TriggerType\r\n} from '@sparkware/uc-sdk-core';\r\nimport {CasinofiedAppFactory} from './casinofied-app-factory';\r\nimport {ICasinofiedApplication} from './apps/casinofied-application.interface';\r\nimport {STANDARD_TOPIC_HEADER} from '../message-broker/message-broker.consts';\r\nimport {Check} from \"@sparkware/app-utils\";\r\nimport {makeObservable, observable, runInAction} from \"mobx\";\r\nimport {getAppSpecificParamsForControlCenter} from './apps/control-center/init-params-helper';\r\nimport {IOpenRegistrationOptions} from '../../external-links/handlers/registration/registration.external-link-handler.interface';\r\nimport {\r\n RegistrationMarketingDataBuilder\r\n} from \"../../external-links/handlers/registration/registration-marketing-data-builder\";\r\n\r\n\r\nexport class CasinofiedAppLauncherService extends ServiceBase implements ICasinofiedAppLauncherService {\r\n\r\n private readonly _appFactory: CasinofiedAppFactory;\r\n @observable\r\n private _runningApps: Record = {};\r\n\r\n constructor(services: IServiceFactoryExtended) {\r\n super(services);\r\n\r\n makeObservable(this);\r\n\r\n this._appFactory = new CasinofiedAppFactory(services);\r\n\r\n this._subscribeToTopics();\r\n this._subscribeToSdkEvents();\r\n this._subscribeToBrowserEvents();\r\n }\r\n\r\n private _subscribeToTopics() {\r\n const {openApp} = this.services.messageBroker.channels.navigation.topics;\r\n openApp.subscribe(this._openAppHandler);\r\n\r\n const {appClosed, appMaximized, appMinimized, closeIntentResult} = this.services.messageBroker.channels.session.topics;\r\n appClosed.subscribe(this._appClosedHandler);\r\n appMinimized.subscribe(this._appMinimizedHandler);\r\n appMaximized.subscribe(this._appMaximizedHandler);\r\n closeIntentResult.subscribe((payload) => {\r\n if (payload.canClose) {\r\n const app = this._runningApps[payload.appID];\r\n if (!app) {\r\n return;\r\n }\r\n\r\n this._appClosedHandler({\r\n appID: payload.appID,\r\n correlationID: payload.correlationID,\r\n launchInfo: app.openAppData.launchInfo,\r\n closeReason: 'closeIntentResult'\r\n })\r\n }\r\n });\r\n }\r\n\r\n private _subscribeToSdkEvents() {\r\n this.services.sdk.events.onBeforeOAuthStateChanged(this._onBeforeOAuthStateChangedHandler);\r\n }\r\n\r\n private _onBeforeOAuthStateChangedHandler = () => {\r\n if (this.services.user.isAuthorized) {\r\n //if the user isAuthorized it means that is about to be logged out\r\n this.services.messageBroker.channels.identity.topics.logout.publish(STANDARD_TOPIC_HEADER, {} as any);\r\n }\r\n\r\n this._closeAllApps(\"automatic_closure\", {shouldPreserveAppsState: true});\r\n }\r\n\r\n private _subscribeToBrowserEvents() {\r\n this.services.window.subscribeTo.unload(this._onBrowserUnload);\r\n }\r\n\r\n private _openAppHandler = async (payload: IOpenAppData): Promise => {\r\n await this._openApp(payload, true);\r\n }\r\n\r\n private _onBrowserUnload = () => {\r\n this._closeAllApps(\"user_closed_app\", {shouldPreserveAppsState: false});\r\n }\r\n\r\n private _sequentialCorrelationIdHandlers: Record = {};\r\n\r\n getSequentialCorrelationIdHandler(bussinesCorrelationId: string) {\r\n if (!this._sequentialCorrelationIdHandlers[bussinesCorrelationId]) {\r\n this._sequentialCorrelationIdHandlers[bussinesCorrelationId] = new SequentialCorrelationIdHandler();\r\n }\r\n return this._sequentialCorrelationIdHandlers[bussinesCorrelationId];\r\n }\r\n\r\n private async _openApp(payload: IOpenAppData, shouldReportOpenAppEvent: boolean): Promise {\r\n const runningApp = this._runningApps[payload.appID];\r\n if (runningApp) {\r\n\r\n if (runningApp.isMinimized) {\r\n await runningApp.waitForAppToOpen();\r\n this.services.messageBroker.channels.session.topics.appMaximized.publish(STANDARD_TOPIC_HEADER, {\r\n appID: runningApp.appId\r\n });\r\n }\r\n this.services.logger.info(`App ${payload.appID} is already open. Running apps: ${this._runningApps}`);\r\n return;\r\n }\r\n\r\n try {\r\n\r\n this.getSequentialCorrelationIdHandler(payload.launchInfo.businessCorrelationID).increment();\r\n\r\n if (shouldReportOpenAppEvent) {\r\n this.services.casinofiedAnalytics.openAppRequest(payload);\r\n }\r\n\r\n const app = await this._appFactory.createApplication(payload);\r\n if (!app.isOpeningInNewWindow()) {\r\n // we keep running apps in memory to dispose them later, when they are closed\r\n // only for the apps that are not opened in another window\r\n runInAction(() => {\r\n this._runningApps[payload.appID] = app;\r\n });\r\n\r\n }\r\n await app.open();\r\n\r\n return app;\r\n } catch (err) {\r\n const app = this._runningApps[payload.appID];\r\n if (app) {\r\n runInAction(() => {\r\n delete this._runningApps[payload.appID];\r\n });\r\n\r\n if (app.isMinimized) {\r\n app.dispose();\r\n }\r\n }\r\n\r\n this.services.logger.error(`Failed to load app: ${payload.appID}`, err);\r\n }\r\n return null;\r\n }\r\n\r\n private _appClosedHandler = (payload: IAppClosedTopicPayload) => {\r\n const runningApp = this._runningApps[payload.appID];\r\n if (runningApp) {\r\n runInAction(() => {\r\n delete this._runningApps[payload.appID];\r\n\r\n });\r\n\r\n this._cleanUpBusinessCorrelationIdHandler();\r\n\r\n runningApp.dispose();\r\n if (!runningApp.isLoading) {\r\n this.services.casinofiedAnalytics.appClosed(payload);\r\n }\r\n }\r\n }\r\n\r\n private _cleanUpBusinessCorrelationIdHandler = () => {\r\n const runningAppsGroupedByBusinessCorrelationId = Object.values(this._runningApps)\r\n .filter(runningApp => runningApp.openAppData.launchInfo?.businessCorrelationID)\r\n .groupByKey(runningApp => runningApp.openAppData.launchInfo.businessCorrelationID);\r\n\r\n for (let businessCorrelationId of Object.keys(this._sequentialCorrelationIdHandlers)) {\r\n if (!runningAppsGroupedByBusinessCorrelationId[businessCorrelationId]) {\r\n delete this._sequentialCorrelationIdHandlers[businessCorrelationId];\r\n }\r\n }\r\n }\r\n\r\n private _appMinimizedHandler = (payload: IAppMinimizedTopicPayload): void => {\r\n const app = this._runningApps[payload.appID];\r\n if (app) {\r\n app.minimize(payload.appData);\r\n }\r\n }\r\n\r\n private _appMaximizedHandler = (payload: IAppMaximizedTopicPayload): void => {\r\n this._runningApps[payload.appID]?.maximize();\r\n }\r\n\r\n private _closeAllApps(closeReason: string, options: {shouldPreserveAppsState: boolean}) {\r\n\r\n const preservedApps: Record = {}\r\n Object.values(this._runningApps).forEach(app => {\r\n if (app.shouldPreserveStateUponOAuthStateChange && options.shouldPreserveAppsState && !app.isLoading) {\r\n preservedApps[app.appId] = app;\r\n } else {\r\n this.services.messageBroker.channels.session.topics.appClosed.publish(STANDARD_TOPIC_HEADER, {\r\n appID: app.appId,\r\n closeReason: closeReason,\r\n launchInfo: {\r\n appSpecificParameters: app.openAppData.launchInfo?.appSpecificParameters,\r\n businessCorrelationID: app.openAppData.launchInfo?.businessCorrelationID,\r\n trigger: TriggerType.automaticFlow,\r\n sourceAppID: app.appId,\r\n sourceAppVersion: \"\",\r\n channel: null\r\n }\r\n });\r\n }\r\n\r\n });\r\n runInAction(() => {\r\n this._runningApps = preservedApps;\r\n });\r\n }\r\n\r\n private _launchApp(params: ILaunchAppData, appIdentifier: AppIdentifiers): Promise {\r\n const correlationId = params.businessCorrelationID || this.services.tools.getGuid();\r\n const clientVersion = this.services.sdk.getSkin().getVersion();\r\n return this._openApp({\r\n correlationID: correlationId,\r\n appID: appIdentifier,\r\n launchInfo: {\r\n sequentialCorrelationID: 1, //TODO - remove sequenceId after all widget removes its usage\r\n containerID: this.services.tools.getGuid(),\r\n trigger: TriggerType.userSelection,\r\n appSpecificParameters: params.appSpecificParameters,\r\n businessCorrelationID: correlationId,\r\n channel: params.channel,\r\n sourceAppID: AppIdentifiers.CasinoClient,\r\n sourceAppVersion: clientVersion,\r\n clientVersion: clientVersion\r\n }\r\n }, false);\r\n }\r\n\r\n get isThereRunningApps(): boolean {\r\n return !Check.isEmpty(Object.values(this._runningApps).filter(app => !app.isMinimized));\r\n }\r\n\r\n async openChat(params: ILaunchAppData): Promise {\r\n if (this.services.configuration.servicesConfigs.AppLauncher.apps.CR_CHAT.enabled\r\n && !this.services.language.isRTLLanguage) {\r\n return this._launchApp(params, AppIdentifiers.CRChat);\r\n } else {\r\n await (await this.services.externalLinks).openOldChat();\r\n return null;\r\n }\r\n\r\n }\r\n\r\n openDepositWidget(params: ILaunchAppData): Promise {\r\n return this._launchApp(params, AppIdentifiers.UnifiedCashier);\r\n }\r\n\r\n openCashoutWidget(params: ILaunchAppData): Promise {\r\n return this._launchApp(params, AppIdentifiers.UnifiedCashout);\r\n }\r\n\r\n openTransactionHistoryWidget(params: ILaunchAppData): Promise {\r\n return this._launchApp(params, AppIdentifiers.TransactionHistory);\r\n }\r\n\r\n\r\n async openRegistrationWidget(options: IOpenRegistrationOptions): Promise {\r\n const marketingData = await new RegistrationMarketingDataBuilder(this.services).buildMarketingData(options.marketingParams);\r\n\r\n let serial = marketingData.sr;\r\n if (this.services.device.hybrid.inCasino) {\r\n const defaultHybridSerial = this.services.sdk.getSkin().getDefaultHybridSerial();\r\n if (defaultHybridSerial) {\r\n serial = defaultHybridSerial;\r\n }\r\n }\r\n\r\n const params: ILaunchAppData = {\r\n channel: options.channel,\r\n businessCorrelationID: options.businessCorrelationID ?? this.services.tools.getGuid(),\r\n appSpecificParameters: {\r\n testData: JSON.stringify(marketingData.TestData ?? \"\"),\r\n campaignId: marketingData.additionalParams?.campaignId,\r\n serial: serial, // ??? should marketingData.sr be used for serial or for defaultSerial\r\n hardwareId: 0,\r\n aBTestFeatures: {},\r\n promoCode: options.promoCode\r\n //defaultSerial: marketingData.sr // ????\r\n }\r\n }\r\n return this._launchApp(params, AppIdentifiers.Registration);\r\n }\r\n\r\n openFreeToPlayBonusGames(params: ILaunchAppData): Promise {\r\n return this._launchApp(params, AppIdentifiers.CasinoBonusGameWidget);\r\n }\r\n\r\n async openHelpCenter(params: ILaunchAppData): Promise {\r\n if (this.services.configuration.servicesConfigs.AppLauncher.apps.CR_HELP_CENTER.enabled) {\r\n return await this._launchApp(params, AppIdentifiers.CRHelpCenter);\r\n } else {\r\n await (await this.services.externalLinks).openHelpPage();\r\n return null;\r\n }\r\n\r\n }\r\n async openContactUs(params: ILaunchAppData): Promise {\r\n if (this.services.configuration.servicesConfigs.AppLauncher.apps.CR_HELP_CENTER.enabled) {\r\n return await this._launchApp(params, AppIdentifiers.CRHelpCenter);\r\n } else {\r\n await (await this.services.externalLinks).openContactUs();\r\n return null;\r\n }\r\n\r\n }\r\n\r\n async openControlCenterFull(params: ILaunchAppData): Promise {\r\n if (this.services.miniOrbit.isEnabled) {\r\n let appSpecificParameters = getAppSpecificParamsForControlCenter(params.appSpecificParameters, this.services);\r\n this.services.miniOrbit.openControlCenter({\r\n actionID: ActionID.openControlCenterFull,\r\n correlationID: params.businessCorrelationID,\r\n launchInfo: {\r\n ...params,\r\n trigger: TriggerType.userSelection,\r\n appSpecificParameters\r\n }\r\n });\r\n return null;\r\n } else {\r\n if (await this.services.user.ensureUserIsLoggedIn('Control Center')) {\r\n if (!this.services.controlCenter.isEnabled) {\r\n throw new Error(\"Control center is not enabled, and an open attempt was performed.\");\r\n }\r\n params.appSpecificParameters = {\r\n source: ControlCenterOpenSource.Lobby,\r\n ...params.appSpecificParameters\r\n };\r\n\r\n return await this._launchApp(params, AppIdentifiers.ControlCenterFull);\r\n }\r\n else {\r\n return null;\r\n }\r\n }\r\n }\r\n\r\n openControlCenterMini(params: ILaunchAppData): Promise {\r\n return this._launchApp(params, AppIdentifiers.ControlCenterMini);\r\n }\r\n\r\n}\r\n"],"names":["CasinofiedZoidApplicationAdapter","appID","applicationSdk","services","initParams","clonedInitParams","messageBrokerChannels","zoidInitParams","onInitSucceeded","payload","_onInitSucceeded","onInitFailed","_onInitFailed","openApp","_openApp","onClose","_onClose","performAction","_onPerformAction","closeIntentResult","_onCloseIntentResult","this","init","focus","correlationID","closeIntent","navigation","topics","publish","publisher","session","appInitSucceeded","appInitFailed","appClosed","CasinofiedRegularApplicationAdapter","applicationObject","messageBroker","channels","AppIdentifiers","launchInfo","applicationContext","CasinofiedApplicationBase","observable","action","openAppData","_componentFactory","appSdkLoader","useZoidIntegration","appId","_openAppData","_sessionID","_topicsSubscriptions","_openPromise","Promise","resolve","_applicationAdapter","_isDisposed","_miniatureComponent","makeObservable","containerID","tools","getGuid","replace","value","isLoading","rootElement","dom","getElementById","firstChild","remove","_appInitFailed","_isAnonymousModeAllowed","user","isAuthorized","_setIsLoading","loadAppSdk","then","widgetUrl","appShowStartTime","isDisposed","reject","timeoutValue","configuration","servicesConfigs","AppLauncher","widgetLoadTimeoutMS","openTimeout","setTimeout","_setAppInitFailed","_unsubscribeFromTopics","onAppInitTimeout","appInitParams","errorCode","errorDescription","cleanUp","clearTimeout","push","subscribe","_isCurrentApp","sessionID","onAppInitSuccess","loadingTime","Date","now","onAppInitFailed","Check","parseInt","getAppInitParamsStartTime","_getAppInitCommonParams","commonParams","onGetAppInitParams","loadSubject","duration","_showApp","catch","err","toString","finally","sdkObjectName","apps","sdk","startTime","interval","setInterval","clearInterval","TimeSpan","totalMilliseconds","appObject","window","getGlobalProperty","_getAppSdkObjectName","Error","_createApplicationAdapter","onAppInitRequest","_waitForContainerIdToBeInTheDOM","_getInitAppParams","userInfo","getCasinofiedCommonUserInfo","getPlatformToken","token","userMode","correlationId","businessCorrelationID","_getUserInfo","getCasinofiedGeoInfoParams","geoInfo","result","productPackageToID","productPackageID","getCasinofiedCommonAppContextParams","deviceInfo","getCasinofiedDeviceInfo","forEach","subscription","unsubscribe","dispose","_isMinimized","componentData","componentID","_getMiniatureComponentID","_setIsMinimized","waitForAppToOpen","createComponent","show","logger","error","minimizeApp","STANDARD_TOPIC_HEADER","appCloseParams","closeReason","reason","channel","appInitResultReportingDetails","casinofiedAnalytics","appInitResult","reportData","reportDuration","appInitRequest","OnErrorBox","styled","OnErrorIconBox","OnErrorTitleBox","theme","font","presets","medium","props","colors","textLight","OnErrorMessageBox","regular","OnErrorButtonsBox","OnErrorComponent","title","translation","translate","message","src","currentTheme","images","brokenLinkIcon","alt","preset","className","onClick","onCloseButtonClick","sizeVariant","noRemUnits","onRetryButtonClick","OrbitComponent","InsideDrawerApplication","_drawerContentHandler","overlayZIndex","OMG","_retryOpen","source","CHANNEL_SOURCE","area","AreaType","element","CHANNEL_ELEMENTS","supportsCloseIntent","_shouldMinimizeOnDrawerClose","isMinimized","_publishMinimizeApp","close","_getOnCloseReason","messageDisplay","displayMessageID","DISPLAY_MESSAGE_IDS","drawer","right","showSpinner","hideSpinner","reportToIndex","appDisposed","ChatApplication","chatSpecificParams","appSpecificParameters","openMode","ChatOpenMode","CasinofiedAppSdkLoader","_services","_loadedAppsSDKs","appLauncherConfigs","appConfigs","url","sdks","sdkloadStartTime","loadScripPromise","loadScript","tagId","scriptType","CasinofiedComponentBase","_componentID","_appSdkLoader","_containerID","_displayComponent","componentController","_componentController","CasinofiedBubbleComponent","_floatingBubbleHandler","floatingBubbles","addBubble","UnifiedCashierZoidAdapter","_onCloseAlreadyCalled","debug","DepositWidgetApplication","componentFactory","miniOrbit","isEnabled","openDeposit","fireDepositWidgetClosed","PaymentRedirectFocusTitleBox","DialogTextBox","PaymentRedirectFocusDefaultBox","body","PcBox","MobileBox","mediaQuery","landscape","PaymentRedirectFocusBox","styledByDevice","PaymentsRedirectFocusComponent","primaryAction","text","CyClass","redirectApp","mftName","_renderButtonContainer","PaymentsRedirectApplication","_focusDialogHandler","_containerElement","createElement","id","appendChild","dialog","showModal","icon","icons","paymentsRedirectIcon","hideCloseButton","isHighPriority","forceCentralization","mobileCenterHeader","forceTransparentBackground","disableFullscreenMobile","messageActionTaken","actionType","sendLogLevelOnly","FullCashierApplication","shouldPreserveStateUponOAuthStateChange","_onExternalLinkClosedSubscription","_onExternalLinkClosed","linkSource","GNWP_SOURCES","options","SessionType","sessionType","cashier","getProductPackage","events","onExternalLinkClosed","openOldCashier","off","appData","params","CashoutWidgetApplication","TransactionHistoryApplication","CustomerRelationsApplication","featureType","externalLinks","openOldChat","openContactUs","openHelpPage","sourceAppID","FreeToPlayBonusGamesApplication","_bonusWheelContainerElement","freeToPlay","setIsPromotionOpened","fireFreeToPlayWidgetClosed","HelpCentreApplication","getInitAppParamsForControlCenter","getAppSpecificParamsForControlCenter","startupConfiguration","config","ExtraProperties","env","ControlCenterOpenSource","clientPlatform","getSkin","getClientPlatform","SESSION_STATUS","ControlCenterFullApplication","analyticsHelper","setCorrelationID","setSource","trackAppOpen","trackCloseExternal","trackAppInitSuccess","trackAppInitFailed","ControlCenterMiniApplication","CONTROL_CENTER_CONTAINERS_ID","ControlCenterCloseSource","trackCloseInternal","ControlCenterAnalyticsHelper","eventNames","sessionStatus","Partial","c","s","_pushControlCenterEvent","open","Success","ready","Failure","closeExternal","closeInternal","controlCenterEvent","analyticsDataLayer","pushControlCenterEvent","_getEventParams","session_status","name","correlation_id","category","event","label","undefined","local_time","RegistrationWidget","CasinofiedAppFactory","CONTROL_CENTER_BI_EVENTS","componentId","RegistrationMarketingDataBuilder","marketing","marketingData","getMarketingData","getSerialData","_appendHybridMarketingTestData","hybrid","getLexisNexisSession","device","inCasino","testData","TestData","hybridTestData","getAppMareketingData","CasinofiedAppLauncherService","_appFactory","_onBeforeOAuthStateChangedHandler","identity","logout","_closeAllApps","shouldPreserveAppsState","_openAppHandler","_onBrowserUnload","_sequentialCorrelationIdHandlers","_appClosedHandler","runningApp","_runningApps","runInAction","_cleanUpBusinessCorrelationIdHandler","runningAppsGroupedByBusinessCorrelationId","Object","values","filter","groupByKey","keys","businessCorrelationId","_appMinimizedHandler","app","minimize","_appMaximizedHandler","maximize","_subscribeToTopics","_subscribeToSdkEvents","_subscribeToBrowserEvents","appMaximized","appMinimized","canClose","onBeforeOAuthStateChanged","subscribeTo","unload","bussinesCorrelationId","SequentialCorrelationIdHandler","shouldReportOpenAppEvent","info","getSequentialCorrelationIdHandler","increment","openAppRequest","createApplication","isOpeningInNewWindow","preservedApps","trigger","TriggerType","sourceAppVersion","appIdentifier","clientVersion","getVersion","sequentialCorrelationID","CR_CHAT","enabled","language","isRTLLanguage","_launchApp","buildMarketingData","marketingParams","serial","sr","defaultHybridSerial","getDefaultHybridSerial","JSON","stringify","campaignId","additionalParams","hardwareId","aBTestFeatures","promoCode","CR_HELP_CENTER","openControlCenter","actionID","ActionID","ensureUserIsLoggedIn","controlCenter","ServiceBase"],"sourceRoot":""}