{"version":3,"file":"static/chunks/54298.e7fcede03f6c0147.js","sources":["webpack://_N_E/./src/modules/games/Game/store/gameAutobet/gameAutobet.actions.ts","webpack://_N_E/./src/common/constants/modal/stack.modal.constants.ts","webpack://_N_E/./src/modules/modals/store/thunks/openNewCoinGenericModal.thunk.ts","webpack://_N_E/./src/common/methods/isTodayLaterThan.ts","webpack://_N_E/./src/LegacyApp/client/modals/NewCoinGenericModal/methods/checkIfModalNewCoinGenericWasEverOpened.ts","webpack://_N_E/./src/LegacyApp/client/modals/NewCoinGenericModal/methods/checkIfNewCoinsAreAvailableGeneric.ts","webpack://_N_E/./src/modules/modals/store/thunks/openNewCoinModals.thunk.ts","webpack://_N_E/./src/modules/modals/store/modal.epic.js","webpack://_N_E/./src/modules/modals/store/thunks/openWelcomeModal.thunk.ts","webpack://_N_E/./src/modules/modals/store/thunks/setModalCloseThunk.thunk.ts","webpack://_N_E/./src/modules/modals/store/thunks/setModalCloseCallback.thunk.ts"],"sourceRoot":"","sourcesContent":["import { actionSimple } from '@legacyApp/client/modules/app/actionService';\nimport { CurrencyType } from '@legacyApp/types/wallet/CurrencyType';\nimport { roundNumber } from '@common/methods/roundNumber/roundNumber';\nimport { LocalStorageKeys } from '@modules/localStorage/types/localStorageKeys.type';\nimport { GameType } from '../../constants/availableGames';\nimport { RollRule } from '../../types/RollRule';\nimport { AutoBetMode } from '../game/thunks/handleBet.thunk';\nimport {\n\tAUTOBET,\n\tAUTOBET_CLEAR,\n\tAUTOBET_PAUSE,\n\tAUTOBET_PLAY,\n\tAUTOBET_RESET_TO_DEFAULT,\n\tAUTOBET_ROLLING,\n\tAUTOBET_SET_ACTIVE,\n\tAUTOBET_SET_AUTO_STATS,\n\tAUTOBET_SET_CONFIG,\n\tAUTOBET_SET_CONFIG_EASY,\n\tAUTOBET_SET_CURRENCY,\n\tAUTOBET_SET_DEFAULTS,\n\tAUTOBET_SET_EDIT_MODAL,\n\tAUTOBET_SET_ID,\n\tAUTOBET_SET_MANUAL,\n\tAUTOBET_SET_MODE,\n\tAUTOBET_SET_PAUSE,\n\tAUTOBET_SET_PAUSE_DATA,\n\tAUTOBET_SET_ROLLS,\n\tAUTOBET_SET_ROLLS_COUNTER,\n\tAUTOBET_STOP,\n\tAUTOBET_STOPPED,\n\tAUTOBET_SUMMARY_CONNECTION_ERROR,\n\tAUTOBET_UPDATE_CONFIG_EASY,\n\tDELETE_AUTOBET_STRATEGY,\n\tDISABLE_CHECK_AUTOBET_STRATEGY,\n\tEDIT_AUTOBET_STRATEGY,\n\tGET_AUTOBET_STRATEGIES,\n\tSAVE_AUTOBET_STRATEGY,\n\tSET_ACTIVE_AUTOBET_STRATEGY,\n\tSET_AUTOBET_STRATEGIES,\n} from './gameAutobet.constants';\n\nexport const autobet = actionSimple(AUTOBET);\n\nexport const autobetPause = actionSimple(AUTOBET_PAUSE);\n\nexport const autobetSetPause = actionSimple(AUTOBET_SET_PAUSE);\n\nexport const autobetSetPauseData = actionSimple(AUTOBET_SET_PAUSE_DATA);\n\nexport const saveAutobetStrategy = (payload, setActive) => ({\n\ttype: SAVE_AUTOBET_STRATEGY,\n\tpayload,\n\tsetActive,\n});\n\nexport const editAutobetStrategy = actionSimple(EDIT_AUTOBET_STRATEGY);\n\nexport const setAutobetStrategies = actionSimple(SET_AUTOBET_STRATEGIES);\n\nexport const getAutobetStrategies = actionSimple(GET_AUTOBET_STRATEGIES);\n\nexport const deleteAutobetStrategy = actionSimple(DELETE_AUTOBET_STRATEGY);\n\nexport const setActiveAutobetStrategy = actionSimple(\n\tSET_ACTIVE_AUTOBET_STRATEGY,\n);\n\nexport const disableCheckAutobetStrategy = actionSimple(\n\tDISABLE_CHECK_AUTOBET_STRATEGY,\n);\n\nexport const getAutobetSessionLength = (game) => {\n\treturn (dispatch, getState) => {\n\t\tconst gameSession = getState().gameSession;\n\t\treturn roundNumber(\n\t\t\tparseFloat(gameSession.lostAuto[game]) +\n\t\t\t\tparseFloat(gameSession.wonAuto[game]),\n\t\t\t0,\n\t\t);\n\t};\n};\n\nexport const autobetSummaryConnectionError = (\n\tbet,\n\tdata = null,\n\tonlyAlert = false,\n) => ({\n\ttype: AUTOBET_SUMMARY_CONNECTION_ERROR,\n\tbet,\n\tdata,\n\tonlyAlert,\n});\n\nexport const autobetSetRolls = actionSimple(AUTOBET_SET_ROLLS);\n\nexport const autobetSetRollsCounter = actionSimple(AUTOBET_SET_ROLLS_COUNTER);\n\nexport const autobetSetActive = actionSimple<{\n\tgame: GameType;\n\tvalue: AutoBetMode | boolean;\n}>(AUTOBET_SET_ACTIVE);\n\nexport const autoBetRolling = actionSimple(AUTOBET_ROLLING);\n\nexport interface AutobetPlayProps {\n\tgame: GameType;\n\tcurrency: CurrencyType;\n\trule?: RollRule;\n\tstopped?: boolean;\n\tmanualConfirmed?: boolean;\n}\n\nexport const autobetPlay = actionSimple<AutobetPlayProps>(AUTOBET_PLAY);\n\nexport const autobetStop = actionSimple(AUTOBET_STOP);\n\nexport const autobetStopped = actionSimple(AUTOBET_STOPPED);\n\nexport const autobetClear = actionSimple(AUTOBET_CLEAR);\n\nexport const autobetSetMode = actionSimple(AUTOBET_SET_MODE, {\n\tlsKey: LocalStorageKeys.AUTOBET_MODE,\n});\n\nexport const autobetSetConfig = actionSimple(AUTOBET_SET_CONFIG);\n\nexport const autobetSetEditModal = actionSimple(AUTOBET_SET_EDIT_MODAL);\n\nexport const autobetSetConfigEasy = actionSimple(AUTOBET_SET_CONFIG_EASY);\n\nexport const autobetUpdateConfigEasy = actionSimple(AUTOBET_UPDATE_CONFIG_EASY);\n\nexport const autobetSetAutoStats = actionSimple(AUTOBET_SET_AUTO_STATS);\n\nexport const autobetSetId = (game, id) => ({\n\ttype: AUTOBET_SET_ID,\n\tgame,\n\tid,\n});\n\nexport const autobetSetCurrency = (game, payload) => ({\n\ttype: AUTOBET_SET_CURRENCY,\n\tgame,\n\tpayload,\n});\n\nexport const autobetSetManual = actionSimple(AUTOBET_SET_MANUAL);\n\nexport const autobetResetToDefault = actionSimple(AUTOBET_RESET_TO_DEFAULT);\nexport const autobetSetDefaults = actionSimple(AUTOBET_SET_DEFAULTS);\n","import { MODAL_ID } from './ids.modal.constants';\n\nexport const STACK_MODAL_CONSTANTS = [MODAL_ID.NEW_COIN_MODAL];\n","import { AppThunk } from '@legacyApp/types/store/ThunkAction';\nimport { openModal } from '@modules/modals/store/modal.actions';\nimport { Token } from '@legacyApp/types/wallet/CurrencyType';\nimport { ModalReducerType } from '@modules/modals/store/modal.types';\nimport { isTodayLaterThan } from '@common/methods/isTodayLaterThan';\nimport { checkIfModalNewCoinGenericWasEverOpened } from '@legacyApp/client/modals/NewCoinGenericModal/methods/checkIfModalNewCoinGenericWasEverOpened';\nimport { checkIfNewCoinsAreAvailableGeneric } from '@legacyApp/client/modals/NewCoinGenericModal/methods/checkIfNewCoinsAreAvailableGeneric';\nimport { isFeatureAvailable } from '@legacyApp/client/modules/app/featureService';\nimport { FEATURES_TYPE } from '@legacyApp/client/config';\nimport { CookiesKeys } from '@modules/cookies/types/cookiesKeys.type';\n\nexport type OpenNewCoinGenericModalData = {\n\tmodalId: ModalReducerType['id'];\n\ttokens: Array<Token>;\n\texpirationDate: string;\n\theader: string;\n\timgSrc: string;\n\timgSrcMobile: string;\n};\n\nexport const openNewCoinGenericModalThunk = (\n\tdata: OpenNewCoinGenericModalData,\n): AppThunk => {\n\treturn (dispatch) => {\n\t\tconst { modalId, tokens, expirationDate } = data;\n\t\tconst cookieKey = `${CookiesKeys.NEW_COIN}_${tokens.join('_')}`;\n\n\t\tconst showNewCoinModal =\n\t\t\t!checkIfModalNewCoinGenericWasEverOpened(cookieKey) &&\n\t\t\tcheckIfNewCoinsAreAvailableGeneric(tokens) &&\n\t\t\tisFeatureAvailable(FEATURES_TYPE.NEW_COIN_MODAL) &&\n\t\t\t!isTodayLaterThan(expirationDate);\n\n\t\tif (showNewCoinModal) {\n\t\t\tdispatch(\n\t\t\t\topenModal(modalId, 'openNewCoinGenericModalThunk', {\n\t\t\t\t\t...data,\n\t\t\t\t\tcookieKey,\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\t};\n};\n","export const isTodayLaterThan = (date: string) => {\n\tconst currentDate = new Date();\n\tconst comparisonDate = new Date(date);\n\n\treturn currentDate > comparisonDate;\n};\n","import { cookieService } from '@common/controllers/cookieService';\n\nexport const checkIfModalNewCoinGenericWasEverOpened = (cookieKey) =>\n\tcookieService.get(cookieKey);\n","import { currenciesSettings } from '@common/controllers/currency/currenciesSettings';\nimport { Token } from '@legacyApp/types/wallet/CurrencyType';\n\nexport const checkIfNewCoinsAreAvailableGeneric = (newTokens: Array<Token>) =>\n\tnewTokens.every((newCoin) => currenciesSettings.tokens.includes(newCoin));\n","import {\n\tOpenNewCoinGenericModalData,\n\topenNewCoinGenericModalThunk,\n} from '@modules/modals/store/thunks/openNewCoinGenericModal.thunk';\nimport { AppThunk } from '@legacyApp/types/store/ThunkAction';\n\nconst modalsConfig: Array<OpenNewCoinGenericModalData> = [\n\t// {\n\t// \tmodalId: MODAL_ID.NEW_COIN_MODAL,\n\t// \ttokens: [], //[Token.ton],\n\t// \texpirationDate: '2025-06-01',\n\t// \theader: '', //`${Token.ton}`,\n\t// \timgSrc: '/img/new-coin-modal/new-coin-modal-ton.png',\n\t// \timgSrcMobile: '/img/new-coin-modal/new-coin-modal-ton-mobile.png',\n\t// },\n\t// {\n\t// \tmodalId: MODAL_ID.NEW_COIN_MODAL,\n\t// \ttokens: [], //[Token.sol],\n\t// \texpirationDate: '2025-06-01',\n\t// \theader: '', //`${Token.sol}`,\n\t// \timgSrc: '/img/new-coin-modal/new-coin-modal-sol.png',\n\t// \timgSrcMobile: '/img/new-coin-modal/new-coin-modal-sol-mobile.png',\n\t// },\n];\n\nexport const openNewCoinModalsThunk = (): AppThunk => {\n\treturn (dispatch) => {\n\t\tmodalsConfig.map((config) =>\n\t\t\tdispatch(openNewCoinGenericModalThunk(config)),\n\t\t);\n\t};\n};\n","import { delay } from 'rxjs/operators';\nimport { combineEpics } from 'redux-observable';\nimport { of } from 'rxjs';\nimport { LOCATION_CHANGE } from 'connected-next-router';\nimport queryString from 'query-string';\nimport { APP_GO_TO } from '@legacyApp/client/store/app/app.constants';\nimport { updateUrlQuery } from '@legacyApp/client/store/app/app.actions';\nimport { epic, epicOldState } from '@legacyApp/client/modules/app/epicService';\nimport { MODAL_ID } from '@common/constants/modal/ids.modal.constants';\nimport { PRIORITY_MODAL_CONSTANTS } from '@common/constants/modal/priority.modal.constants';\nimport { REGISTRY_MODAL_PACKAGE } from '@legacyApp/client/store/registry/registry.constants';\nimport { openWelcomeModalThunk } from '@modules/modals/store/thunks/openWelcomeModal.thunk';\nimport { lsGet } from '@modules/localStorage/methods/lsGet';\nimport { lsClear } from '@modules/localStorage/methods/lsClear';\nimport { LocalStorageKeys } from '@modules/localStorage/types/localStorageKeys.type';\nimport { jsonToString } from '@common/methods/jsonToString';\nimport { getPathLocalized } from '@common/methods/getPathLocalized/getPathLocalized';\nimport { STACK_MODAL_CONSTANTS } from '@common/constants/modal/stack.modal.constants';\nimport { modalService } from '@modules/modals/modalService';\nimport { setModalCloseThunkThunk } from '@modules/modals/store/thunks/setModalCloseThunk.thunk';\nimport {\n\tCLOSE_MODAL,\n\tCLOSE_MODAL_DELAYED,\n\tMODAL_HANDLE_PREVIOUS,\n\tMODAL_TRIGGER_CLOSE_CALLBACK,\n\tOPEN_MODAL,\n\tOPEN_SECURITY_WARNING_MODAL,\n} from './modal.constants';\nimport {\n\tcloseModal,\n\tisInitModal,\n\tmodalHandlePrevious,\n\tmodalSetPrevious,\n\tmodalTriggerCloseCallback,\n\topenModal,\n\tresetModal,\n} from './modal.actions';\nimport { setModalCloseCallbackThunk } from './thunks/setModalCloseCallback.thunk';\nimport { openNewCoinModalsThunk } from './thunks/openNewCoinModals.thunk';\n\nconst modalInitEpic = epic('modalInitEpic', {\n\tactions: (ofType) => ofType(REGISTRY_MODAL_PACKAGE),\n\tcallback: ({ store$ }) => {\n\t\tconst query = queryString.parse(store$.value.router.location.search);\n\n\t\tconst modals = [openWelcomeModalThunk(), openNewCoinModalsThunk()];\n\n\t\tif (query.modal && isInitModal(query.modal)) {\n\t\t\tif (query?.id) {\n\t\t\t\tlsClear(LocalStorageKeys.MODAL_PROPS);\n\t\t\t}\n\t\t\treturn of([\n\t\t\t\topenModal(query.modal, 'init', {\n\t\t\t\t\t...(query.id ? {} : lsGet(LocalStorageKeys.MODAL_PROPS, {})),\n\t\t\t\t\t...query,\n\t\t\t\t\ttype: query.betType || query.type,\n\t\t\t\t}),\n\t\t\t\t...modals,\n\t\t\t]);\n\t\t}\n\t\treturn of(modals);\n\t},\n});\n\nconst closeModalCallbackEpic = epic('closeModalCallbackEpic', {\n\tactions: (ofType) => ofType(CLOSE_MODAL),\n\tcallback: ({ store$, action }) => {\n\t\tif (PRIORITY_MODAL_CONSTANTS.indexOf(store$.value.modal?.id) > -1) {\n\t\t\treturn [];\n\t\t}\n\t\tconst actions = [resetModal(true, CLOSE_MODAL)];\n\t\tif (store$.value.modal?.closeCallback && !action.payload) {\n\t\t\tconst callback = store$.value.modal.closeCallback;\n\t\t\tconst data = store$.value.modal.closeData;\n\t\t\tactions.push(\n\t\t\t\tmodalTriggerCloseCallback({\n\t\t\t\t\tcallback,\n\t\t\t\t\tdata,\n\t\t\t\t}),\n\t\t\t);\n\t\t} else {\n\t\t\tactions.push(\n\t\t\t\tupdateUrlQuery({\n\t\t\t\t\tmodal: null,\n\t\t\t\t\tid: null,\n\t\t\t\t\tbetType: null,\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\t\tactions.push(setModalCloseCallbackThunk());\n\t\treturn of(actions);\n\t},\n});\n\nconst closeModalDelayedEpic = epic('closeModalDelayedEpic', {\n\tactions: (ofType) => ofType(CLOSE_MODAL_DELAYED),\n\tcallback: ({ action }) => {\n\t\tif (!action.delay) {\n\t\t\treturn of(closeModal());\n\t\t}\n\t\treturn of(closeModal()).pipe(delay(action.delay));\n\t},\n});\n\nconst openModalEpic = epicOldState('openModalEpic', {\n\tactions: (ofType) => ofType(OPEN_MODAL),\n\tcallback: ({ oldState, newState, action }) => {\n\t\tif (PRIORITY_MODAL_CONSTANTS.indexOf(oldState.modal.id) > -1) {\n\t\t\treturn [];\n\t\t}\n\t\tconst result = [];\n\t\tconst isInit = isInitModal(newState.modal.id);\n\t\tconst newQuery = {\n\t\t\t...queryString.parse(oldState.router.location.search),\n\t\t\tmodal: isInit ? newState.modal.id : null,\n\t\t\tid: isInit && newState.modal.props.id ? newState.modal.props.id : null,\n\t\t\tbetType:\n\t\t\t\tisInit && newState.modal.props.type ? newState.modal.props.type : null,\n\t\t};\n\t\tif (isInit && newState.router.location.search !== jsonToString(newQuery)) {\n\t\t\tresult.push(updateUrlQuery(newQuery));\n\t\t}\n\t\tif (action?.props?.closeCallback) {\n\t\t\tresult.push(\n\t\t\t\tsetModalCloseCallbackThunk(\n\t\t\t\t\taction.props?.closeCallback,\n\t\t\t\t\taction.props?.closeData,\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\tif (oldState.modal.id) {\n\t\t\tresult.push(\n\t\t\t\tmodalSetPrevious({\n\t\t\t\t\tid: oldState.modal.id,\n\t\t\t\t\tprops: oldState.modal.props\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t...oldState.modal.props,\n\t\t\t\t\t\t  }\n\t\t\t\t\t\t: false,\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\n\t\tif (STACK_MODAL_CONSTANTS.indexOf(oldState.modal.id) > -1) {\n\t\t\tresult.push(modalHandlePrevious());\n\t\t}\n\n\t\treturn result;\n\t},\n});\n\nconst setCloseCallbackEpic = epic('setCloseCallbackEpic', {\n\tactions: (ofType) => ofType(OPEN_MODAL),\n\tcallback: ({ action }) => {\n\t\tconst thunk = modalService.getModalCloseCallback(action.name);\n\t\tif (thunk) {\n\t\t\treturn of(setModalCloseThunkThunk(thunk(action)));\n\t\t}\n\t\treturn of();\n\t},\n});\n\nconst securityWarningModalEpic = epic('securityWarningModalEpic', {\n\tactions: (ofType) => ofType(OPEN_SECURITY_WARNING_MODAL),\n\tcallback: ({ store$ }) => {\n\t\tif (!store$.value.twoFA.isActive || !store$.value.user.email) {\n\t\t\treturn of(\n\t\t\t\topenModal(MODAL_ID.SECURITY_WARNING, 'securityWarningModalEpic'),\n\t\t\t);\n\t\t}\n\t\treturn of();\n\t},\n});\n\nconst handlePreviousModalEpic = epic('handlePreviousModalEpic', {\n\tactions: (ofType) => ofType(MODAL_HANDLE_PREVIOUS),\n\tcallback: ({ store$ }) => {\n\t\tif (!store$.value.modal?.previous) {\n\t\t\treturn of();\n\t\t}\n\t\t// if (['vault'].indexOf(store$.value.modal.previous.id) === -1) return of();\n\t\treturn of(\n\t\t\tsetModalCloseCallbackThunk(\n\t\t\t\t({ id, props }) => {\n\t\t\t\t\treturn openModal(id, 'handlePreviousModalEpic', props);\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: store$.value.modal?.previous?.id,\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t...store$.value.modal?.previous?.props,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t),\n\t\t);\n\t},\n});\n\nconst closeModalEpic = epicOldState('closeModalEpic', {\n\tactions: (ofType) => ofType(APP_GO_TO, LOCATION_CHANGE),\n\tcallback: ({ newState, oldState }) => {\n\t\tconst isModalClosed =\n\t\t\tnewState.modal.id &&\n\t\t\t!!queryString.parse(oldState.router.location.search).modal &&\n\t\t\t!queryString.parse(newState.router.location.search).modal;\n\t\tconst isPathChanged =\n\t\t\tgetPathLocalized({ pathname: newState.router.location.pathname }) !==\n\t\t\tgetPathLocalized({ pathname: oldState.router.location.pathname });\n\t\tif (isModalClosed || isPathChanged) {\n\t\t\treturn [closeModal(true)];\n\t\t}\n\t\treturn [];\n\t},\n});\n\nconst triggerCloseCallbackEpic = epic('triggerCloseCallbackEpic', {\n\tactions: (ofType) => ofType(MODAL_TRIGGER_CLOSE_CALLBACK),\n\tcallback: ({ action }) => {\n\t\tif (action.payload?.callback) {\n\t\t\treturn of([action.payload.callback(action.payload.data)]);\n\t\t}\n\t\treturn of();\n\t},\n});\n\nconst modalEpic = combineEpics(\n\tcloseModalCallbackEpic,\n\topenModalEpic,\n\tcloseModalDelayedEpic,\n\tsecurityWarningModalEpic,\n\thandlePreviousModalEpic,\n\tmodalInitEpic,\n\tcloseModalEpic,\n\tsetCloseCallbackEpic,\n\ttriggerCloseCallbackEpic,\n);\n\nexport default modalEpic;\n","import { AppThunk } from '@legacyApp/types/store/ThunkAction';\nimport { lsGet } from '@modules/localStorage/methods/lsGet';\nimport { openModal } from '@modules/modals/store/modal.actions';\nimport { MODAL_ID } from '@common/constants/modal/ids.modal.constants';\nimport { isFeatureAvailable } from '@legacyApp/client/modules/app/featureService';\nimport { FEATURES_TYPE } from '@legacyApp/client/config';\n\nimport { lsClear } from '@modules/localStorage/methods/lsClear';\nimport { LocalStorageKeys } from '@modules/localStorage/types/localStorageKeys.type';\n\nexport const openWelcomeModalThunk = (): AppThunk => {\n\treturn (dispatch) => {\n\t\tif (!isFeatureAvailable(FEATURES_TYPE.WELCOME_MODAL)) {\n\t\t\tif (lsGet(LocalStorageKeys.OPEN_WELCOME_MODAL_THUNK)) {\n\t\t\t\tlsClear(LocalStorageKeys.OPEN_WELCOME_MODAL_THUNK);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tconst modalAlreadyTriggered = lsGet(\n\t\t\tLocalStorageKeys.OPEN_WELCOME_MODAL_THUNK,\n\t\t);\n\t\tif (modalAlreadyTriggered) {\n\t\t\treturn;\n\t\t}\n\t\tdispatch(\n\t\t\topenModal(\n\t\t\t\tMODAL_ID.WELCOME_MODAL,\n\t\t\t\tLocalStorageKeys.OPEN_WELCOME_MODAL_THUNK,\n\t\t\t),\n\t\t);\n\t};\n};\n","import { AppThunk } from '@legacyApp/types/store/ThunkAction';\nimport { setModalCloseCallback } from '../modal.actions';\n\nexport const setModalCloseThunkThunk = (thunk?: AppThunk): AppThunk => {\n\treturn (dispatch, getState) => {\n\t\tconst { modal } = getState();\n\n\t\tif (!modal?.id) {\n\t\t\tthunk = null;\n\t\t}\n\n\t\tif (!modal.closeCallback && !thunk && !modal.closeData) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn dispatch(\n\t\t\tsetModalCloseCallback(thunk ? () => dispatch(thunk) : false),\n\t\t);\n\t};\n};\n","import { AppThunk } from '@legacyApp/types/store/ThunkAction';\nimport { setModalCloseCallback } from '../modal.actions';\n\nexport const setModalCloseCallbackThunk = (\n\tcallback?: () => void,\n\tcallbackData?: any,\n): AppThunk => {\n\treturn (dispatch, getState) => {\n\t\tconst { modal } = getState();\n\n\t\tif (!modal?.id) {\n\t\t\tcallback = null;\n\t\t\tcallbackData = null;\n\t\t}\n\n\t\tif (\n\t\t\t!modal.closeCallback &&\n\t\t\t!callback &&\n\t\t\t!modal.closeData &&\n\t\t\t!callbackData\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn dispatch(setModalCloseCallback(callback || false, callbackData));\n\t};\n};\n"],"names":["autobet","actionSimple","AUTOBET","autobetPause","AUTOBET_PAUSE","autobetSetPause","AUTOBET_SET_PAUSE","autobetSetPauseData","AUTOBET_SET_PAUSE_DATA","saveAutobetStrategy","payload","setActive","type","SAVE_AUTOBET_STRATEGY","editAutobetStrategy","EDIT_AUTOBET_STRATEGY","setAutobetStrategies","SET_AUTOBET_STRATEGIES","getAutobetStrategies","GET_AUTOBET_STRATEGIES","deleteAutobetStrategy","DELETE_AUTOBET_STRATEGY","setActiveAutobetStrategy","SET_ACTIVE_AUTOBET_STRATEGY","disableCheckAutobetStrategy","DISABLE_CHECK_AUTOBET_STRATEGY","autobetSummaryConnectionError","bet","data","onlyAlert","AUTOBET_SUMMARY_CONNECTION_ERROR","autobetSetRolls","AUTOBET_SET_ROLLS","autobetSetRollsCounter","AUTOBET_SET_ROLLS_COUNTER","autobetSetActive","AUTOBET_SET_ACTIVE","autoBetRolling","AUTOBET_ROLLING","autobetPlay","AUTOBET_PLAY","autobetStop","AUTOBET_STOP","autobetStopped","AUTOBET_STOPPED","autobetClear","AUTOBET_CLEAR","autobetSetMode","AUTOBET_SET_MODE","lsKey","LocalStorageKeys","autobetSetConfig","AUTOBET_SET_CONFIG","autobetSetEditModal","AUTOBET_SET_EDIT_MODAL","autobetSetConfigEasy","AUTOBET_SET_CONFIG_EASY","autobetUpdateConfigEasy","AUTOBET_UPDATE_CONFIG_EASY","autobetSetAutoStats","AUTOBET_SET_AUTO_STATS","autobetSetId","game","id","AUTOBET_SET_ID","autobetSetCurrency","AUTOBET_SET_CURRENCY","autobetSetManual","AUTOBET_SET_MANUAL","autobetResetToDefault","AUTOBET_RESET_TO_DEFAULT","autobetSetDefaults","AUTOBET_SET_DEFAULTS","STACK_MODAL_CONSTANTS","MODAL_ID","openNewCoinGenericModalThunk","dispatch","date","modalId","tokens","expirationDate","cookieKey","CookiesKeys","join","showNewCoinModal","cookieService","checkIfModalNewCoinGenericWasEverOpened","every","newCoin","currenciesSettings","isFeatureAvailable","FEATURES_TYPE","Date","openModal","modalsConfig","modalInitEpic","epic","actions","ofType","REGISTRY_MODAL_PACKAGE","callback","store$","query","queryString","value","router","location","search","modals","lsGet","lsClear","map","config","modal","isInitModal","of","betType","closeModalCallbackEpic","CLOSE_MODAL","action","PRIORITY_MODAL_CONSTANTS","resetModal","closeCallback","closeData","push","modalTriggerCloseCallback","updateUrlQuery","setModalCloseCallbackThunk","closeModalDelayedEpic","CLOSE_MODAL_DELAYED","delay","closeModal","pipe","openModalEpic","epicOldState","OPEN_MODAL","oldState","newState","result","isInit","newQuery","props","jsonToString","modalSetPrevious","indexOf","modalHandlePrevious","setCloseCallbackEpic","thunk","modalService","name","getState","setModalCloseCallback","setModalCloseThunkThunk","securityWarningModalEpic","OPEN_SECURITY_WARNING_MODAL","twoFA","isActive","user","email","handlePreviousModalEpic","MODAL_HANDLE_PREVIOUS","previous","closeModalEpic","APP_GO_TO","LOCATION_CHANGE","isModalClosed","isPathChanged","getPathLocalized","pathname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