{"version":3,"file":"static/chunks/27072-fb63e8ce8779a8a0.js","sources":["webpack://_N_E/./src/modules/games/DiceGame/components/BetValue/BetValue.container.tsx","webpack://_N_E/./src/modules/games/Game/hooks/useUpdateWinChanceValueAction.ts","webpack://_N_E/./src/modules/games/Game/hooks/useUpdatePayoutValueAction.ts","webpack://_N_E/./src/modules/games/DiceGame/components/BetValue/BetValue.styled.ts","webpack://_N_E/./src/modules/games/DiceGame/components/BetValue/BetValueSingle/BetValueSingle.tsx","webpack://_N_E/./src/modules/games/DiceGame/components/BetValue/BetValue.tsx","webpack://_N_E/./src/modules/games/DiceGame/components/BetValue/BetValueMultiple/BetValueMultiple.tsx","webpack://_N_E/./src/modules/games/Game/hooks/useDiceBetValue.ts","webpack://_N_E/./src/modules/games/Game/store/dice/selectors/useDiceSingleValueSelector.ts","webpack://_N_E/./src/modules/games/Game/methods/checkIsWinChanceDisabled.ts","webpack://_N_E/./src/modules/games/Game/methods/getSwitchedRollDirection.ts","webpack://_N_E/./src/modules/games/Game/methods/validateBetValue.ts","webpack://_N_E/./src/modules/games/Game/store/dice/thunks/switchDirection.thunk.ts","webpack://_N_E/./src/modules/games/Game/store/dice/thunks/updateBetValue.thunk.ts","webpack://_N_E/./src/modules/games/Game/constants/gameFieldTypes.ts","webpack://_N_E/./src/modules/games/Game/store/gameValidation/thunks/disableGameValidationErrorThunk.ts","webpack://_N_E/./src/modules/games/Game/store/dice/thunks/updateRuleThunk.ts"],"sourceRoot":"","sourcesContent":["import { FC } from 'react';\nimport { useAppDispatch } from '@legacyApp/hooks/store/useAppDispatch';\nimport { useDiceRollRuleSelector } from '../../../Game/store/dice/selectors/useDiceRollRuleSelector';\nimport { useUpdateWinChanceValueAction } from '../../../Game/hooks/useUpdateWinChanceValueAction';\nimport { useUpdatePayoutValueAction } from '../../../Game/hooks/useUpdatePayoutValueAction';\nimport { switchDirectionThunk } from '../../../Game/store/dice/thunks/switchDirection.thunk';\nimport { useDiceBetValue } from '../../../Game/hooks/useDiceBetValue';\nimport { useGameInputDisabled } from '../../../Game/store/game/game.selectors';\nimport { updateBetValueThunk } from '../../../Game/store/dice/thunks/updateBetValue.thunk';\nimport { GAME } from './betValue.constants';\nimport { BetValue } from './BetValue';\n\nexport interface BetValueContainerInputProps {\n\tlocalTheme?: any;\n\tclassName?: string;\n}\n\nexport const BetValueContainer: FC = (props) => {\n\tconst rule = useDiceRollRuleSelector();\n\tconst updateWinChanceValue_ = useUpdateWinChanceValueAction(GAME);\n\tconst updatePayoutValue_ = useUpdatePayoutValueAction(GAME);\n\tconst betValues = useDiceBetValue();\n\tconst isDisabled = useGameInputDisabled(GAME);\n\tconst dispatch = useAppDispatch();\n\n\treturn (\n\t\t\n\t\t\t\tdispatch(updateBetValueThunk(valuesArray, rule))\n\t\t\t}\n\t\t\tswitchDirection={() => dispatch(switchDirectionThunk())}\n\t\t/>\n\t);\n};\n","import { useCallback } from 'react';\nimport { useAppDispatch } from '@legacyApp/hooks/store/useAppDispatch';\nimport { mathService } from '@legacyApp/client/modules/math/mathService';\nimport { GameValueActionProps } from '../types/GameValueAction';\nimport { useGameWinChance } from '../store/game/game.selectors';\nimport { updateWinChanceThunk } from '../store/game/thunks/updateWinChance.thunk';\nimport { GameType } from '../constants/availableGames';\n\nexport const useUpdateWinChanceValueAction = (game: GameType) => {\n\tconst dispatch = useAppDispatch();\n\tconst storeValue = useGameWinChance(game);\n\treturn useCallback(\n\t\t({ value, game }: GameValueActionProps) => {\n\t\t\tif (mathService.isNumberDiff(value, storeValue)) {\n\t\t\t\treturn dispatch(updateWinChanceThunk(value, game));\n\t\t\t}\n\t\t},\n\t\t[dispatch, storeValue],\n\t);\n};\n","import { useCallback } from 'react';\nimport { useAppDispatch } from '@legacyApp/hooks/store/useAppDispatch';\nimport { mathService } from '@legacyApp/client/modules/math/mathService';\nimport { useGamePayout } from '../store/game/game.selectors';\nimport { GameValueActionProps } from '../types/GameValueAction';\nimport { updatePayoutThunk } from '../store/game/thunks/updatePayout.thunk';\nimport { GameType } from '../constants/availableGames';\n\nexport const useUpdatePayoutValueAction = (game: GameType) => {\n\tconst dispatch = useAppDispatch();\n\tconst storeValue = useGamePayout(game);\n\treturn useCallback(\n\t\t({ value, game }: GameValueActionProps) => {\n\t\t\tif (mathService.isNumberDiff(value, storeValue)) {\n\t\t\t\treturn dispatch(updatePayoutThunk(value, game));\n\t\t\t}\n\t\t},\n\t\t[dispatch, storeValue],\n\t);\n};\n","import styled, { css } from 'styled-components';\nimport { InputWrapperStyle } from '@legacyApp/client/components/input/styled/inputWrapper.style';\nimport { chatViewport } from '@legacyApp/client/modules/style/methods/chatViewport';\nimport { calcStyle } from '@legacyApp/client/modules/style/methods/calcStyle';\n\nexport const BetValueInputWrapper = styled(InputWrapperStyle)`\n\tlabel {\n\t\tmax-width: 100%;\n\t\tmin-width: 10px;\n\t\toverflow: visible !important;\n\t}\n`;\n\nexport const BetValueMultipleInputWrapper = styled(InputWrapperStyle)`\n\t${chatViewport(\n\t\t(viewportPadding) => css`\n\t\t\t@media (max-width: ${(props) =>\n\t\t\t\t\tcalcStyle({\n\t\t\t\t\t\ta: props.theme.media.maxWidthTablet,\n\t\t\t\t\t\tb: viewportPadding,\n\t\t\t\t\t})}) {\n\t\t\t\t&:not(.index-0) {\n\t\t\t\t\tpadding-left: 10px;\n\t\t\t\t}\n\n\t\t\t\t&:not(.index-last) {\n\t\t\t\t\tpadding-right: 10px;\n\t\t\t\t}\n\t\t\t}\n\t\t`,\n\t)}\n`;\n","import { FC, useCallback, useRef } from 'react';\nimport { faExchangeAlt } from '@fortawesome/free-solid-svg-icons';\nimport classnames from 'classnames';\nimport { useWindowEventListener } from 'rooks';\nimport { Button } from '@ui/button';\nimport { trans } from '@legacyApp/client/modules/translation/translate';\nimport { AwesomeIcon } from '@common/components/icons/AwesomeIcon';\nimport { getPayout } from '@legacyApp/client/modules/app/gameService';\nimport { useOnMount } from '@common/hooks/useOnMount';\nimport { useOptionEnabled } from '@common/selectors/options.selectors';\nimport { OPTIONS } from '@legacyApp/client/store/options/options.constants';\nimport { useAppDispatch } from '@legacyApp/hooks/store/useAppDispatch';\nimport { Input } from '@legacyApp/client/components/input/input';\nimport { isFunction } from '@common/methods/isFunction';\nimport { InputRelativeBoxStyle } from '@legacyApp/client/components/input/styled/inputRelativeBox.styled';\nimport { InputLabelStyle } from '@legacyApp/client/components/input/styled/inputLabelStyle';\nimport { preventDefault } from '@common/methods/preventDefault';\nimport { Tooltip } from '@legacyApp/client/components/tooltip';\nimport { checkHotkeysAllowed } from '@legacyApp/client/modules/app/checkHotkeysAllowed';\nimport { RollRule } from '../../../../Game/types/RollRule';\nimport { getSwitchedRollDirection } from '../../../../Game/methods/getSwitchedRollDirection';\nimport { getWinChangeFromSingleBetValue } from '../../../../Game/methods/getWinChanceFromBetValues';\nimport { BetValueInputProps } from '../BetValue';\nimport { GAME, ID, roundBetValue } from '../betValue.constants';\nimport { BetValueInputWrapper } from '../BetValue.styled';\nimport { getHotkeyThunk } from '../../../../Game/store/game/thunks/getHotkey.thunk';\nimport { useGameInputDisabled } from '../../../../Game/store/game/game.selectors';\n\nexport const BetValueSingle: FC = (props) => {\n\tconst dispatch = useAppDispatch();\n\n\tconst {\n\t\trule,\n\t\tlocalTheme,\n\t\tclassName,\n\t\tupdateWinChanceValue,\n\t\tupdatePayoutValue,\n\t\tbetValues,\n\t} = props;\n\n\tconst isDisabled = useGameInputDisabled(GAME);\n\tconst disableHotkeys = !useOptionEnabled(OPTIONS.HOTKEYS);\n\n\tconst wrapperRef = useRef(null);\n\n\tconst switchDirection_ = useCallback(() => {\n\t\tif (props.switchDirection) {\n\t\t\tprops.switchDirection();\n\t\t}\n\t}, [props]);\n\n\tconst handleKeyboard = useCallback(\n\t\t(obj) => {\n\t\t\tif (\n\t\t\t\tisDisabled ||\n\t\t\t\t!wrapperRef.current ||\n\t\t\t\t!checkHotkeysAllowed(disableHotkeys)\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tobj.keyCode ===\n\t\t\t\tdispatch(getHotkeyThunk('switch_direction', GAME)).keyCode\n\t\t\t) {\n\t\t\t\tobj.preventDefault();\n\t\t\t\tswitchDirection_();\n\t\t\t}\n\t\t},\n\t\t[disableHotkeys, dispatch, isDisabled, switchDirection_],\n\t);\n\n\tuseWindowEventListener('keydown', (event) => handleKeyboard(event));\n\n\tuseOnMount(() => {\n\t\tconst winChance = getWinChangeFromSingleBetValue(betValues[0], rule);\n\t\tif (isFunction(updateWinChanceValue)) {\n\t\t\tupdateWinChanceValue({ value: winChance, game: GAME });\n\t\t}\n\t\tif (isFunction(updatePayoutValue)) {\n\t\t\tupdatePayoutValue({ value: getPayout(winChance, GAME), game: GAME });\n\t\t}\n\t});\n\n\treturn (\n\t\t\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t{trans({ label: `Roll ${rule || RollRule.OVER}` })}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{!!props.switchDirection && (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import { FC } from 'react';\nimport { GameValueAction } from '../../../Game/types/GameValueAction';\nimport { RollRule } from '../../../Game/types/RollRule';\nimport { checkIsWinChanceDisabled } from '../../../Game/methods/checkIsWinChanceDisabled';\nimport { GameType } from '../../../Game/constants/availableGames';\nimport { BetValueSingle } from './BetValueSingle/BetValueSingle';\nimport { BetValueMultiple } from './BetValueMultiple/BetValueMultiple';\n\nexport interface BetValueInputProps {\n\tupdateWinChanceValue: GameValueAction;\n\tupdatePayoutValue: GameValueAction;\n\tupdateBetValue: (values: ReadonlyArray, rule: RollRule) => void;\n\tbetValues: ReadonlyArray;\n\tswitchDirection: () => void;\n\tlocalTheme?: any;\n\tclassName?: string;\n\trule: RollRule;\n\tisDisabled?: boolean;\n}\n\nexport const BetValue: FC = (props) => {\n\tif (checkIsWinChanceDisabled(props.rule, GameType.DICE)) {\n\t\treturn ;\n\t}\n\n\treturn ;\n};\n","import classnames from 'classnames';\nimport { FC, useCallback } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { isTrueOrZero } from '@common/methods/isTrueOrZero';\nimport { preventDefault } from '@common/methods/preventDefault';\nimport { config } from '@legacyApp/client/config';\nimport { getPayout } from '@legacyApp/client/modules/app/gameService';\nimport { calcStyle } from '@legacyApp/client/modules/style/methods/calcStyle';\nimport { chatViewport } from '@legacyApp/client/modules/style/methods/chatViewport';\nimport { trans } from '@legacyApp/client/modules/translation/translate';\nimport { BetValueInputProps } from '@modules/games/DiceGame/components/BetValue/BetValue';\nimport {\n\tID,\n\troundBetValue,\n} from '@modules/games/DiceGame/components/BetValue/betValue.constants';\nimport { GameType } from '@modules/games/Game/constants/availableGames';\nimport { checkIsQuadrupleValue } from '@modules/games/Game/methods/checkIsQuadrupleValue';\nimport { checkIsSingleValue } from '@modules/games/Game/methods/checkIsSingleValue';\nimport { getBetValueMaxMin } from '@modules/games/Game/methods/getBetValueMaxMin';\nimport {\n\tgetWinChanceFromMultipleBetValues,\n\tgetWinChangeFromSingleBetValue,\n} from '@modules/games/Game/methods/getWinChanceFromBetValues';\nimport { validateBetValue } from '@modules/games/Game/methods/validateBetValue';\nimport { RollRule } from '@modules/games/Game/types/RollRule';\nimport transactionService from '@modules/transactions/transactionsService';\n\nimport { Input } from '@legacyApp/client/components/input/input';\nimport { InputLabelStyle } from '@legacyApp/client/components/input/styled/inputLabelStyle';\nimport { InputRelativeBoxStyle } from '@legacyApp/client/components/input/styled/inputRelativeBox.styled';\nimport {\n\tBetValueInputWrapper,\n\tBetValueMultipleInputWrapper,\n} from '@modules/games/DiceGame/components/BetValue/BetValue.styled';\n\nconst getPlaceholder = (\n\tbetValues: ReadonlyArray,\n\tindex: number,\n\trule: RollRule,\n) => {\n\tconst { min, max } = getBetValueMaxMin({ betValues, rule, index });\n\treturn `${roundBetValue(min)} - ${roundBetValue(max)}`;\n};\n\nexport const BetValueMultiple: FC = (props) => {\n\tconst {\n\t\trule,\n\t\tclassName,\n\t\tupdateWinChanceValue,\n\t\tupdatePayoutValue,\n\t\tupdateBetValue,\n\t\tbetValues,\n\t\tisDisabled,\n\t} = props;\n\n\tconst validateValue = useCallback(\n\t\t(value: number, index: number) => {\n\t\t\treturn validateBetValue(betValues, rule, value, index);\n\t\t},\n\t\t[betValues, rule],\n\t);\n\n\tconst updateValue = useCallback(\n\t\t(value: number, index: number) => {\n\t\t\tif (!Array.isArray(betValues)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { min } = getBetValueMaxMin({ betValues, rule, index });\n\n\t\t\tconst value_ = validateValue(isTrueOrZero(value) ? value : min, index);\n\n\t\t\tconst valuesArray = [...betValues];\n\n\t\t\tvaluesArray[index] = value_;\n\n\t\t\tif (transactionService.isListDifferent(valuesArray, betValues)) {\n\t\t\t\tupdateBetValue(valuesArray, rule);\n\n\t\t\t\tconst winChance = checkIsSingleValue(rule)\n\t\t\t\t\t? getWinChangeFromSingleBetValue(valuesArray[0], rule)\n\t\t\t\t\t: getWinChanceFromMultipleBetValues(valuesArray, rule);\n\n\t\t\t\tconst payout = getPayout(winChance, GameType.DICE);\n\n\t\t\t\tif (updateWinChanceValue) {\n\t\t\t\t\tupdateWinChanceValue({\n\t\t\t\t\t\tvalue: winChance,\n\t\t\t\t\t\tgame: GameType.DICE,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (updatePayoutValue) {\n\t\t\t\t\tupdatePayoutValue({\n\t\t\t\t\t\tvalue: payout,\n\t\t\t\t\t\tgame: GameType.DICE,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tbetValues,\n\t\t\trule,\n\t\t\tupdateBetValue,\n\t\t\tupdatePayoutValue,\n\t\t\tupdateWinChanceValue,\n\t\t\tvalidateValue,\n\t\t],\n\t);\n\n\tif (!Array.isArray(betValues)) {\n\t\treturn null;\n\t}\n\n\tconst isQuadrupleValue = checkIsQuadrupleValue(rule);\n\n\treturn (\n\t\t\n\t\t\t{betValues.map((betValue, index) => {\n\t\t\t\tconst isLabelVisible = isQuadrupleValue ? index % 2 === 0 : index === 0;\n\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{trans({\n\t\t\t\t\t\t\t\t\tlabel: `Roll ${\n\t\t\t\t\t\t\t\t\t\tisQuadrupleValue ? RollRule.BETWEEN : rule || RollRule.OVER\n\t\t\t\t\t\t\t\t\t}`,\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tvalidateValue(Number(value), index) === Number(value)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonChangeDelayed={(value: string) =>\n\t\t\t\t\t\t\t\t\t\tupdateValue(Number(value), index)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tvalue={roundBetValue(betValue)}\n\t\t\t\t\t\t\t\t\tnoTranslatePlaceholder={true}\n\t\t\t\t\t\t\t\t\tdisableEmpty={true}\n\t\t\t\t\t\t\t\t\tisDisabled={isDisabled}\n\t\t\t\t\t\t\t\t\tname=\"bet_value\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t{index % 2 === 0 && index !== 0 && &}\n\n\t\t\t\t\t\t{index % 2 === 1 && index !== 0 && -}\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\t})}\n\t\t\n\t);\n};\n\nexport const BetValueMultipleBoxInputWrapper = styled(BetValueInputWrapper)`\n\tgrid-auto-flow: column;\n\tmargin-bottom: 0px;\n\tpadding: 0 !important;\n`;\n\nexport const BetValueAnd = styled.div`\n\talign-items: center;\n\tdisplay: flex;\n\n\tjustify-content: center;\n\tposition: absolute;\n\ttop: 50%;\n\n\t${chatViewport(\n\t\t(viewportPadding) => css`\n\t\t\theight: 27px;\n\t\t\tleft: -15px;\n\t\t\twidth: 30px;\n\t\t\t@media (max-width: ${(props) =>\n\t\t\t\t\tcalcStyle({\n\t\t\t\t\t\ta: props.theme.media.maxWidthTablet,\n\t\t\t\t\t\tb: viewportPadding,\n\t\t\t\t\t})}) {\n\t\t\t\twidth: 20px;\n\t\t\t\theight: 21px;\n\t\t\t\tleft: -10px;\n\t\t\t}\n\t\t\t@media (max-width: ${(props) =>\n\t\t\t\t\tcalcStyle({\n\t\t\t\t\t\ta: props.theme.media.maxWidthVerySmall,\n\t\t\t\t\t\tb: viewportPadding,\n\t\t\t\t\t})}) {\n\t\t\t\theight: 17px;\n\t\t\t}\n\t\t`,\n\t)}\n`;\n","import { useDiceRollRuleSelector } from '../store/dice/selectors/useDiceRollRuleSelector';\nimport { checkIsSingleValue } from '../methods/checkIsSingleValue';\nimport { useDiceValueSelector } from '../store/dice/selectors/useDiceSingleValueSelector';\nimport { checkIsDoubleValue } from '../methods/checkIsDoubleValue';\nimport { checkIsQuadrupleValue } from '../methods/checkIsQuadrupleValue';\nimport { parseSingleBetValue } from '../methods/getWinChanceFromBetValues';\nimport { RollRule } from '../types/RollRule';\n\nexport const useDiceBetValue = (): ReadonlyArray => {\n\tconst rule = useDiceRollRuleSelector();\n\tconst betValue = useDiceValueSelector();\n\n\tif (rule === RollRule.DIRECT) {\n\t\treturn [Number(betValue.singleUnder)];\n\t}\n\n\tif (checkIsSingleValue(rule)) {\n\t\treturn [parseSingleBetValue(Number(betValue.singleUnder), rule)];\n\t}\n\n\tif (checkIsDoubleValue(rule)) {\n\t\treturn betValue.double;\n\t}\n\n\tif (checkIsQuadrupleValue(rule)) {\n\t\treturn betValue.quadruple;\n\t}\n\n\treturn [];\n};\n","import { shallowEqual } from 'react-redux';\nimport { useAppSelector } from '@legacyApp/hooks/store/useAppSelector';\nimport { RootState } from '@legacyApp/client/store/configure.store';\n\nexport const useDiceSingleValueSelector = () =>\n\tuseAppSelector(\n\t\t(state) => state.dice?.betValue?.singleUnder,\n\t\tshallowEqual,\n\t);\nexport const useDiceValueSelector = () =>\n\tuseAppSelector(\n\t\t(state) => state.dice?.betValue,\n\t);\n","import { RollRule } from '../types/RollRule';\nimport { GameType } from '../constants/availableGames';\nimport { checkIsSingleValue } from './checkIsSingleValue';\n\nexport const checkIsWinChanceDisabled = (rule: RollRule, game: GameType) => {\n\tif (game !== GameType.DICE) {\n\t\treturn false;\n\t}\n\treturn !checkIsSingleValue(rule) || rule === RollRule.DIRECT;\n};\n","import { RollRule } from '../types/RollRule';\n\nexport const getSwitchedRollDirection = (direction: RollRule) => {\n\tif (direction === RollRule.OVER) {\n\t\treturn RollRule.UNDER;\n\t}\n\treturn RollRule.OVER;\n};\n","import { RollRule } from '../types/RollRule';\nimport { getBetValueMaxMin } from './getBetValueMaxMin';\n\nexport const validateBetValues = (\n\tbetValues: ReadonlyArray,\n\trule: RollRule,\n): ReadonlyArray => {\n\tconst validated = [...betValues];\n\tbetValues.forEach((betValue, index) => {\n\t\tvalidated[index] = validateBetValue(validated, rule, betValue, index);\n\t});\n\treturn validated;\n};\n\nexport const validateBetValue = (\n\tbetValues: ReadonlyArray,\n\trule: RollRule,\n\tvalue: number,\n\tindex: number,\n): number => {\n\tconst { min, max } = getBetValueMaxMin({ betValues, rule, index });\n\t// console.log('validateBetValue', rule, betValues, { value, index, min, max });\n\tif (!Array.isArray(betValues)) {\n\t\treturn min;\n\t}\n\tif (value > max) {\n\t\treturn max;\n\t}\n\tif (value < min) {\n\t\treturn min;\n\t}\n\treturn value;\n};\n","import { AppThunk } from '@legacyApp/types/store/ThunkAction';\nimport { getSwitchedRollDirection } from '../../../methods/getSwitchedRollDirection';\nimport { updateRuleThunk } from './updateRuleThunk';\n\nexport const switchDirectionThunk = (): AppThunk => {\n\treturn (dispatch, getState) => {\n\t\tconst direction = getSwitchedRollDirection(getState().dice.rollDirection);\n\t\tdispatch(updateRuleThunk(direction));\n\t};\n};\n","import { AppThunk } from '@legacyApp/types/store/ThunkAction';\nimport { RollRule } from '../../../types/RollRule';\nimport { checkIsSingleValue } from '../../../methods/checkIsSingleValue';\nimport { diceActions } from '../dice.actions';\nimport { checkIsDoubleValue } from '../../../methods/checkIsDoubleValue';\nimport { checkIsQuadrupleValue } from '../../../methods/checkIsQuadrupleValue';\nimport transactionService from '../../../../../transactions/transactionsService';\nimport { parseSingleBetValue } from '../../../methods/getWinChanceFromBetValues';\n\nexport const updateBetValueThunk = (\n\tbetValues: ReadonlyArray,\n\trule: RollRule,\n): AppThunk => {\n\treturn (dispatch, getState) => {\n\t\tconst state = getState();\n\n\t\tif (checkIsSingleValue(rule)) {\n\t\t\tconst parsedBetValue = betValues[0];\n\t\t\tconst betValueUnder = parseSingleBetValue(parsedBetValue, rule);\n\t\t\tif (state.dice.betValue.singleUnder !== betValueUnder) {\n\t\t\t\tdispatch(diceActions.singleValueUpdate(betValueUnder));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif (Array.isArray(betValues) && betValues.length > 1) {\n\t\t\tif (checkIsDoubleValue(rule) && betValues.length === 2) {\n\t\t\t\tif (\n\t\t\t\t\ttransactionService.isListDifferent(\n\t\t\t\t\t\tbetValues,\n\t\t\t\t\t\tstate.dice.betValue.double,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\t// @ts-expect-error invalid type def\n\t\t\t\t\tdispatch(diceActions.doubleValueUpdate(betValues));\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (checkIsQuadrupleValue(rule) && betValues.length === 4) {\n\t\t\t\tif (\n\t\t\t\t\ttransactionService.isListDifferent(\n\t\t\t\t\t\tbetValues,\n\t\t\t\t\t\tstate.dice.betValue.quadruple,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\t// @ts-expect-error invalid type def\n\t\t\t\t\tdispatch(diceActions.quadrupleValueUpdate(betValues));\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t};\n};\n","export enum GameFieldType {\n\tBET_AMOUNT = 'betAmount',\n\tFORM = 'form',\n\tPAYOUT = 'payout',\n\tPROFIT = 'profit',\n\tWIN_CHANCE = 'winChance',\n}\n\nexport type GameFieldErrorType = `${GameFieldType}Error`;\n","import { AppThunk } from 'src/LegacyApp/types/store/ThunkAction';\nimport { getGameFromUrl } from 'src/LegacyApp/client/modules/app/gameService';\nimport { GameType } from 'src/modules/games/Game/constants/availableGames';\nimport { GameFieldType } from 'src/modules/games/Game/constants/gameFieldTypes';\nimport {\n\tgameUpdateAmountError,\n\tgameUpdateFormError,\n\tgameUpdatePayoutError,\n\tgameUpdateProfitError,\n\tgameUpdateWinChanceError,\n} from '../gameValidation.actions';\n\ntype DisableGameValidationErrorThunk = {\n\t(game: GameType, type?: GameFieldType): AppThunk;\n};\n\nconst typesToActions = {\n\t[GameFieldType.BET_AMOUNT]: gameUpdateAmountError,\n\t[GameFieldType.FORM]: gameUpdateFormError,\n\t[GameFieldType.PAYOUT]: gameUpdatePayoutError,\n\t[GameFieldType.PROFIT]: gameUpdateProfitError,\n\t[GameFieldType.WIN_CHANCE]: gameUpdateWinChanceError,\n};\n\nconst disableGameValidationErrorThunk: DisableGameValidationErrorThunk = (\n\tgame,\n\ttype,\n) => {\n\treturn (dispatch, getState) => {\n\t\tconst state = getState();\n\n\t\tif (\n\t\t\t(type && !typesToActions[type]) ||\n\t\t\t(type && !state.gameValidation[`${type}Error`][GameType.DICE])\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!game) {\n\t\t\tgame = state.game?.activeGame || getGameFromUrl();\n\t\t}\n\n\t\tconst actionPayload = {\n\t\t\tvalue: true,\n\t\t\tgame,\n\t\t};\n\n\t\tif (type) {\n\t\t\tconst action = typesToActions[type];\n\n\t\t\tdispatch(action(actionPayload));\n\t\t} else {\n\t\t\tconst allActions = Object.values(typesToActions);\n\n\t\t\tallActions.forEach((action) => dispatch(action(actionPayload)));\n\t\t}\n\t};\n};\n\nexport default disableGameValidationErrorThunk;\n","import { AppThunk } from '@legacyApp/types/store/ThunkAction';\nimport { getPayout } from '@legacyApp/client/modules/app/gameService';\nimport disableGameValidationErrorThunk from 'src/modules/games/Game/store/gameValidation/thunks/disableGameValidationErrorThunk';\nimport { GameFieldType } from 'src/modules/games/Game/constants/gameFieldTypes';\nimport { diceActions } from '../dice.actions';\nimport {\n\tgetWinChanceFromMultipleBetValues,\n\tgetWinChangeFromSingleBetValue,\n\tparseSingleBetValue,\n} from '../../../methods/getWinChanceFromBetValues';\nimport { GameType } from '../../../constants/availableGames';\nimport { RollRule } from '../../../types/RollRule';\nimport { checkIsSingleValue } from '../../../methods/checkIsSingleValue';\nimport { checkIsDoubleValue } from '../../../methods/checkIsDoubleValue';\nimport { validateBetValues } from '../../../methods/validateBetValue';\nimport transactionService from '../../../../../transactions/transactionsService';\nimport { updatePayoutThunk } from '../../game/thunks/updatePayout.thunk';\nimport { updateWinChanceThunk } from '../../game/thunks/updateWinChance.thunk';\nimport { updateBetValueThunk } from './updateBetValue.thunk';\n\nexport const updateRuleThunk = (rule: RollRule): AppThunk => {\n\treturn (dispatch, getState) => {\n\t\tconst state = getState();\n\n\t\tif (rule === state.dice.rollDirection) {\n\t\t\treturn;\n\t\t}\n\n\t\tdispatch(diceActions.ruleUpdate(rule));\n\n\t\tconst isSingleValue = checkIsSingleValue(rule);\n\t\tconst isDoubleValue = checkIsDoubleValue(rule);\n\n\t\tlet winChanceValue: number;\n\n\t\tif (isSingleValue) {\n\t\t\tconst validated = validateBetValues(\n\t\t\t\t[getWinChangeFromSingleBetValue(state.dice.betValue.singleUnder, rule)],\n\t\t\t\trule,\n\t\t\t);\n\t\t\tif (\n\t\t\t\ttransactionService.isListDifferent(validated, [\n\t\t\t\t\tstate.dice.betValue.singleUnder,\n\t\t\t\t])\n\t\t\t) {\n\t\t\t\tdispatch(updateBetValueThunk(validated, rule));\n\t\t\t}\n\t\t\twinChanceValue = parseSingleBetValue(validated[0], rule);\n\t\t} else if (isDoubleValue) {\n\t\t\tconst validated = validateBetValues(state.dice.betValue.double, rule);\n\t\t\t// console.log('updateRuleThunk', validated, state.dice.betValue.double, { rule });\n\t\t\tif (\n\t\t\t\ttransactionService.isListDifferent(\n\t\t\t\t\tvalidated,\n\t\t\t\t\tstate.dice.betValue.double,\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tdispatch(updateBetValueThunk(validated, rule));\n\t\t\t}\n\t\t\twinChanceValue = getWinChanceFromMultipleBetValues(validated, rule);\n\t\t} else {\n\t\t\twinChanceValue = getWinChanceFromMultipleBetValues(\n\t\t\t\tstate.dice.betValue.quadruple,\n\t\t\t\trule,\n\t\t\t);\n\t\t}\n\n\t\tif (state.game.winChanceValue[GameType.DICE] !== winChanceValue) {\n\t\t\tdispatch(updateWinChanceThunk(winChanceValue, GameType.DICE));\n\t\t}\n\n\t\tconst payoutValue = getPayout(winChanceValue, GameType.DICE);\n\n\t\tif (state.game.winChanceValue[GameType.DICE] !== payoutValue) {\n\t\t\tdispatch(updatePayoutThunk(payoutValue, GameType.DICE));\n\t\t}\n\n\t\tdispatch(\n\t\t\tdisableGameValidationErrorThunk(GameType.DICE, GameFieldType.BET_AMOUNT),\n\t\t);\n\t};\n};\n"],"names":["BetValueContainer","props","rule","useDiceRollRuleSelector","updateWinChanceValue_","game","dispatch","useAppDispatch","storeValue","useGameWinChance","useCallback","value","mathService","updateWinChanceThunk","useUpdateWinChanceValueAction","GAME","updatePayoutValue_","useGamePayout","updatePayoutThunk","useUpdatePayoutValueAction","betValues","useDiceBetValue","isDisabled","useGameInputDisabled","BetValue","updateWinChanceValue","updatePayoutValue","updateBetValue","valuesArray","updateBetValueThunk","switchDirection","switchDirectionThunk","BetValueInputWrapper","styled","InputWrapperStyle","BetValueMultipleInputWrapper","chatViewport","viewportPadding","css","calcStyle","a","theme","media","maxWidthTablet","b","BetValueSingle","localTheme","className","disableHotkeys","useOptionEnabled","OPTIONS","wrapperRef","useRef","switchDirection_","handleKeyboard","obj","current","checkHotkeysAllowed","keyCode","getHotkeyThunk","preventDefault","useWindowEventListener","event","useOnMount","winChance","getWinChangeFromSingleBetValue","isFunction","getPayout","ref","htmlFor","ID","onClick","trans","label","RollRule","classnames","disabled","I","id","type","inputClasses","roundBetValue","noTranslatePlaceholder","name","content","getSwitchedRollDirection","iconBefore","AwesomeIcon","icon","faExchangeAlt","checkIsWinChanceDisabled","GameType","BetValueMultiple","getPlaceholder","index","getBetValueMaxMin","min","max","validateValue","validateBetValue","updateValue","Array","isArray","value_","isTrueOrZero","transactionService","checkIsSingleValue","getWinChanceFromMultipleBetValues","payout","isQuadrupleValue","checkIsQuadrupleValue","BetValueMultipleBoxInputWrapper","map","betValue","isLabelVisible","length","style","visibility","placeholder","precision","config","onFocusOut","Number","onChangeDelayed","disableEmpty","BetValueAnd","maxWidthVerySmall","useAppSelector","state","dice","singleUnder","parseSingleBetValue","checkIsDoubleValue","quadruple","direction","validateBetValues","validated","forEach","getState","rollDirection","updateRuleThunk","parsedBetValue","betValueUnder","diceActions","GameFieldType","typesToActions","BET_AMOUNT","gameUpdateAmountError","FORM","gameUpdateFormError","PAYOUT","gameUpdatePayoutError","PROFIT","gameUpdateProfitError","WIN_CHANCE","gameUpdateWinChanceError","gameValidation","activeGame","getGameFromUrl","actionPayload","action","Object","values","winChanceValue","isSingleValue","isDoubleValue","payoutValue","disableGameValidationErrorThunk"],"mappings":";;y1BAiBO,IAAMA,EAAqD,SAACC,GAClE,IAAMC,GAAOC,EAAAA,EAAAA,KACPC,ECXsC,SAACC,GAC7C,IAAMC,GAAWC,EAAAA,EAAAA,KACXC,GAAaC,EAAAA,EAAAA,IAAiBJ,GACpC,OAAOK,EAAAA,EAAAA,cACN,YAA2C,IAAxCC,EAAwC,EAAxCA,MAAON,EAAiC,EAAjCA,KACT,GAAIO,EAAAA,EAA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