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,MAAOP,EAAK+B,MACZC,eAAgBhC,EAAK+B,MAErB/D,SACEgC,EAAKiC,SAAW,EACZpI,EAAAA,GAA2BE,WAC3BiG,EAAKiC,SACX5G,KAAM2E,EAAKkC,KACXC,QAASnC,EAAKoC,QACdC,MAAOrC,EAAKsC,QACZrM,KAAM+J,EAAKkC,KACZ,IAGId,CAAY,EAGRmB,EACXC,IAEA,MAAM7O,EAAoD,GAmB1D,OAjBI6O,IACEA,EAAwB/M,OAAS,GACnC9B,EAAK2C,KAAK,CAAEgC,MAAOJ,EAAAA,GAAAA,EAAO,kBAAmBS,MAAO8J,EAAAA,KAGtDD,EAAwBnE,SAAQ5J,IAC1BA,EAAKE,UACPhB,EAAK2C,KAAK,CACRgC,MAAO7D,EAAKE,SACRwK,IAAAA,KAAW1K,EAAKE,UAAUyK,OAAO7M,EAAAA,GAAc+M,GAAGE,MAClD,GACJ7G,MAAOlE,EAAKC,IAEhB,KAIGf,CAAI,EAGA+O,EAA8BA,CACzCrO,EACAsO,KAEA,MAAMhP,EAA2C,GAEjD,GAAIU,EACF,IAAK,MAAMC,KAAeD,EAAOC,YAAa,CAC5C,MAAMiH,EAAgBlH,EAAOC,YAAYA,GAAaI,GAEhC,OAAlBiO,QAAkB,IAAlBA,GAAAA,EAAoBjO,IAAM6G,MAAqC,OAAlBoH,QAAkB,IAAlBA,OAAkB,EAAlBA,EAAoBjO,KACnEf,EAAK2C,KAAK,CACRqC,MAAO4C,EACPjD,MAAOjE,EAAOC,YAAYA,GAAa+G,MAG7C,CAGF,OAAO1H,CAAI,C","sources":["newelements/RacingSport/index.tsx","newelements/RacingSport/hooks/useGetUpcomingRaces.ts","utils/constants/sportsbook/racing-sport-with-translation.ts","utils/sportsbook/racing.ts"],"sourcesContent":["import { ReactElement, Suspense, useEffect } from 'react';\nimport { useDispatch } from 'react-redux';\nimport { Route, useHistory } from 'react-router-dom';\nimport cc from 'classcat';\nimport {\n FUTURE_RACES,\n GREYHOUNDS_RACING,\n HORSE_RACING,\n RACING_SPORT_ALIAS,\n SPECIAL_RACES\n} from 'utils/constants/sportsbook/racing-sport';\nimport SpringConfigs from 'utils/constants/swarm/spring-configs';\nimport { lazy } from 'utils/generic/lazy';\nimport { mountPoint } from 'utils/generic/route-manipulation';\nimport { routePathWithMockedDataCheck } from 'utils/helpers';\nimport { isMobile } from 'utils/is-mobile';\nimport RidGenerator from 'utils/swarm/rid-generator';\nimport { ERacingPageTypes, ERacingSportSideBarTabs } from 'interfaces/racing';\nimport { unsubscribeCommand } from 'services/get-data-level';\nimport { useGetUpcomingRaces } from './hooks/useGetUpcomingRaces';\nimport { StreamCourtSkeleton } from 'newcomponents/Shared/sportsbook/MatchStreaming/Skeleton/Details/StreamCourtSkeleton';\nimport { useContentHeight } from 'hooks/useContentHeight';\nimport { useSbRouteMatch } from 'newhooks/generic/useSbRouteMatch';\nimport { batchActions } from 'store/actions';\nimport {\n removeUpcomingAllData,\n setIsUpcomingRacesLoading\n} from 'store/actions/racing-data';\nimport './index.less';\n\nif (SpringConfigs.IS_RTL) {\n import('./rtl.less');\n}\n\nconst { RacingDesktopView } = lazy(\n () =>\n import(/* webpackChunkName: \"racing-desktop-view\" */ './layouts/Desktop')\n);\n\nconst { RacingMobileView } = lazy(\n () => import(/* webpackChunkName: \"racing-mobile-view\" */ './layouts/Mobile')\n);\n\nconst { MatchStreamingWidget } = lazy(\n () =>\n import(\n /* webpackChunkName: \"match-streaming-widget\" */ 'newelements/Sportsbook/Widgets/MatchStreamingWidget'\n )\n);\n\ntype TProps = {\n configs: {\n fit: 'cover' | 'contain';\n racingSportsList: ERacingSportSideBarTabs[];\n };\n};\n\nexport const RacingSport = ({ configs }: TProps): ReactElement => {\n const contentHeight = useContentHeight(true);\n const history = useHistory();\n const dispatch = useDispatch();\n const getUpcomingRacesData = useGetUpcomingRaces();\n\n const { params } = useSbRouteMatch(\n `${mountPoint(history.location.pathname)}/:type/:sport/:competition?/:game?`\n );\n\n const isFutureOrSpecial = [FUTURE_RACES.alias, SPECIAL_RACES.alias].includes(\n params.sport\n );\n\n const racingSportsList = configs.racingSportsList?.length\n ? configs.racingSportsList\n : [ERacingSportSideBarTabs.All];\n\n useEffect(() => {\n if (SpringConfigs?.MOCKED_DATA) {\n return;\n }\n\n let updatedSport = params.sport || HORSE_RACING.alias;\n const updatedType = params.type || ERacingPageTypes.UPCOMING;\n\n if (\n !racingSportsList.includes(ERacingSportSideBarTabs.All) &&\n !(isFutureOrSpecial && params.game)\n ) {\n const allowedSportAlias = racingSportsList.includes(\n ERacingSportSideBarTabs.GREYHOUNDS_RACING\n )\n ? GREYHOUNDS_RACING.alias\n : HORSE_RACING.alias;\n\n if (allowedSportAlias !== params.sport) {\n updatedSport = allowedSportAlias;\n }\n }\n\n if (!params.sport || updatedSport !== params.sport) {\n history.push(\n `${mountPoint(location.pathname)}/${updatedType}/${updatedSport}?${\n location.search\n }`\n );\n }\n }, []);\n\n const sportId = SpringConfigs.MOCKED_DATA\n ? HORSE_RACING.id\n : RACING_SPORT_ALIAS[params.sport];\n\n useEffect(() => {\n if (sportId) {\n const rId = RidGenerator.gForSubscribe('RacingUpcomingRaces');\n getUpcomingRacesData(+sportId, rId);\n\n return () => {\n unsubscribeCommand(rId);\n dispatch(\n batchActions(removeUpcomingAllData(), setIsUpcomingRacesLoading(true))\n );\n };\n }\n }, [sportId]);\n\n return (\n \n \n }>\n {isMobile() ? (\n <>\n \n }\n >\n \n \n \n \n ) : (\n \n )}\n \n \n \n );\n};\n","import { useCallback } from 'react';\nimport { useDispatch } from 'react-redux';\nimport { sortUpcomingSwarmData, UTCDate } from 'utils/sportsbook/racing';\nimport { Sport } from 'interfaces/sportsbook-data-levels';\nimport { executeCommand } from 'services/get-data-level';\nimport { batchActions } from 'store/actions/batch';\nimport {\n setIsUpcomingRacesLoading,\n setUpcomingData\n} from 'store/actions/racing-data';\n\nexport const useGetUpcomingRaces = (): ((\n sportId: number,\n rId: string\n) => void) => {\n const dispatch = useDispatch();\n\n const setUpcomingEvents = (swarmData: { sport: Record }) => {\n const data = sortUpcomingSwarmData(swarmData);\n\n dispatch(\n batchActions(setUpcomingData(data), setIsUpcomingRacesLoading(false))\n );\n };\n\n return useCallback((sportId: number, rId: string) => {\n executeCommand(\n rId,\n {\n sport: ['id', 'alias'],\n region: ['id', 'name', 'alias', 'order'],\n competition: ['id', 'name', 'order'],\n market: ['id', 'extra_info', 'type'],\n event: [\n 'id',\n 'name',\n 'type',\n 'extra_info',\n 'original_order',\n 'sp_enabled',\n 'price',\n 'ew_allowed'\n ],\n game: ['id', 'start_ts', 'info', 'team1_name', 'team2_name']\n },\n {\n sport: {\n id: sportId\n },\n game: {\n start_ts: {\n '@gte': UTCDate().todayStart\n }\n }\n },\n setUpcomingEvents,\n true,\n setUpcomingEvents\n );\n }, []);\n};\n","import i18n from 'i18next';\nimport {\n DAY_AFTER_TOMORROW_DAYS_NUMBER_FROM_TODAY,\n FUTURE_RACES,\n GREYHOUNDS_RACING,\n HORSE_RACING,\n MAX_DAY_VALUE,\n SPECIAL_RACES,\n TWO_DAYS_AFTER_TOMORROW_DAYS_NUMBER_FROM_TODAY,\n WEEK_DAYS_NUMBER\n} from 'utils/constants/sportsbook/racing-sport';\nimport {\n ENextOff,\n ERacingPageTypes,\n ERacingResultPositionTypes,\n ERacingResultsTimeFilterTabs,\n ERacingTabsTimeFilters,\n TDateAndSportFilterTab,\n TRacingPageTab\n} from 'interfaces/racing';\n\nconst date = new Date();\n\nexport const RACING_SPORTS_TABS: TRacingPageTab[] = [\n {\n label: i18n.t('pages.horseRacing'),\n alias: HORSE_RACING.alias,\n sport: HORSE_RACING.id,\n icon: HORSE_RACING.alias\n },\n {\n label: i18n.t('pages.greyhounds'),\n alias: GREYHOUNDS_RACING.alias,\n sport: GREYHOUNDS_RACING.id,\n icon: GREYHOUNDS_RACING.alias\n }\n];\n\nexport const RACING_PAGE_TYPE_TABS = [\n {\n key: ERacingPageTypes.UPCOMING,\n title: i18n.t('racing.upcomingRacesTitle')\n },\n {\n key: ERacingPageTypes.RESULTS,\n title: i18n.t('racing.resultsTitle')\n }\n];\n\nexport const RACING_RESULTS_TIME_FILTER_TABS = [\n {\n key: ERacingResultsTimeFilterTabs.YESTERDAY,\n value: i18n.t('date.yesterday')\n },\n {\n key: ERacingResultsTimeFilterTabs.TODAY,\n value: i18n.t('date.today')\n }\n];\n\nconst weekdayNames = [\n i18n.t('date.sunday'),\n i18n.t('date.monday'),\n i18n.t('date.tuesday'),\n i18n.t('date.wednesday'),\n i18n.t('date.thursday'),\n i18n.t('date.friday'),\n i18n.t('date.saturday')\n];\n\nexport const RACING_DATE_AND_SPORTS_FILTER_TABS: TDateAndSportFilterTab[] = [\n {\n key: ENextOff.NEXT_OFF,\n title: i18n.t('racing.nextOff'),\n timeFilter: ERacingTabsTimeFilters.TODAY\n },\n {\n key: ERacingTabsTimeFilters.TODAY,\n title: i18n.t('date.today'),\n timeFilter: ERacingTabsTimeFilters.TODAY\n },\n {\n key: ERacingTabsTimeFilters.TOMORROW,\n title: i18n.t('date.tomorrow'),\n timeFilter: ERacingTabsTimeFilters.TOMORROW\n },\n {\n key: ERacingTabsTimeFilters.DAY_AFTER_TOMORROW,\n title:\n date.getDay() + DAY_AFTER_TOMORROW_DAYS_NUMBER_FROM_TODAY > MAX_DAY_VALUE\n ? weekdayNames[\n date.getDay() +\n DAY_AFTER_TOMORROW_DAYS_NUMBER_FROM_TODAY -\n WEEK_DAYS_NUMBER\n ]\n : weekdayNames[\n date.getDay() + DAY_AFTER_TOMORROW_DAYS_NUMBER_FROM_TODAY\n ],\n timeFilter: ERacingTabsTimeFilters.DAY_AFTER_TOMORROW\n },\n {\n key: ERacingTabsTimeFilters.TWO_DAYS_AFTER_TOMORROW,\n title:\n date.getDay() + TWO_DAYS_AFTER_TOMORROW_DAYS_NUMBER_FROM_TODAY >\n MAX_DAY_VALUE\n ? weekdayNames[\n date.getDay() +\n TWO_DAYS_AFTER_TOMORROW_DAYS_NUMBER_FROM_TODAY -\n WEEK_DAYS_NUMBER\n ]\n : weekdayNames[\n date.getDay() + TWO_DAYS_AFTER_TOMORROW_DAYS_NUMBER_FROM_TODAY\n ],\n timeFilter: ERacingTabsTimeFilters.TWO_DAYS_AFTER_TOMORROW\n },\n {\n key: FUTURE_RACES.alias,\n title: i18n.t('racing.futureRaces'),\n timeFilter: ERacingTabsTimeFilters.ALL_TIME\n },\n {\n key: SPECIAL_RACES.alias,\n title: i18n.t('racing.specialRaces'),\n timeFilter: ERacingTabsTimeFilters.ALL_TIME\n }\n];\n\nexport const RACING_RESULTS_POSITION_NAMES: Record = {\n 1: i18n.t('sportsbook.First'),\n 2: i18n.t('sportsbook.Second'),\n 3: i18n.t('sportsbook.Third'),\n 4: i18n.t('sportsbook.Fourth'),\n 5: i18n.t('sportsbook.Fifth'),\n 6: i18n.t('sportsbook.Sixth'),\n 7: i18n.t('sportsbook.Seventh'),\n 8: i18n.t('sportsbook.Eighth'),\n 9: i18n.t('sportsbook.Ninth'),\n 10: i18n.t('sportsbook.Tenth'),\n 11: i18n.t('sportsbook.Eleventh'),\n 12: i18n.t('sportsbook.Twelfth'),\n [ERacingResultPositionTypes.NOT_FINISHED]: '-',\n [ERacingResultPositionTypes.NON_RUNNER]: i18n.t('racing.nonRunnerShort')\n};\n\nexport const RACING_RESULTS_BET_TYPES: Record = {\n 1: i18n.t('racing.tricast'),\n 2: i18n.t('racing.forecast')\n};\n","import axios from 'axios';\nimport dayjs from 'dayjs';\nimport i18n from 'i18next';\nimport { sortByOrder } from 'utils/collection-manipulation/array-sort-by';\nimport { sliceLength } from 'utils/constants/app/magic-numbers-app';\nimport {\n MILLISECONDS_IN_SECOND,\n SECONDS_PER_HOUR,\n SECONDS_PER_MINUTE\n} from 'utils/constants/dateInfo/time-numbers';\nimport {\n GREYHOUNDS_RACING,\n RACES_ALL_GAMES,\n WINNER_MARKET_TYPE_NAME\n} from 'utils/constants/sportsbook/racing-sport';\nimport { RACING_DATE_AND_SPORTS_FILTER_TABS } from 'utils/constants/sportsbook/racing-sport-with-translation';\nimport SpringConfigs from 'utils/constants/swarm/spring-configs';\nimport { dateFormat } from 'utils/date-manipulation/date-format';\nimport { isMobile } from 'utils/is-mobile';\nimport {\n ERacingResultPositionTypes,\n ERacingTabsTimeFilters,\n TDayFilter,\n TRacingGameJsonData,\n TRacingResultsCompetition,\n TRacingResultsCompetitionGame,\n TRacingResultsGame,\n TRacingResultsGameData,\n TRacingResultsRegion,\n TResultsCompetitionViewGameData\n} from 'interfaces/racing';\nimport {\n IRacingGameHorseAdditionalData,\n RacingGame,\n RacingRegion,\n Sport\n} from 'interfaces/sportsbook-data-levels';\nimport { HTTP_REQUEST_SUCCESS_STATUS } from '../constants/app/general';\n\ntype UTCDateType = {\n todayStart: number;\n todayEnd: number;\n tomorrowStart: number;\n tomorrowEnd: number;\n dayAfterTomorrowStart: number;\n dayAfterTomorrowEnd: number;\n twoDaysAfterTomorrowStart: number;\n twoDaysAfterTomorrowEnd: number;\n};\n\nexport const sortRegionSwarmData = (swarmData: {\n sport: Record;\n}): Record => {\n if (swarmData) {\n const sport =\n swarmData?.sport &&\n 'sport' in swarmData &&\n Object.values(swarmData.sport);\n\n if (sport && sport?.length) {\n const regionData: Record = {};\n\n const regions = sport[0].region;\n\n for (const region in regions) {\n const currentRegion: RacingRegion = {\n ...regions[region],\n sportId: sport[0].id ? sport[0].id.toString() : '0',\n sportAlias: sport[0].alias\n };\n\n regionData[currentRegion.id] = currentRegion;\n }\n\n return regionData;\n }\n }\n\n return {};\n};\n\nexport const sortUpcomingSwarmData = (swarmData: {\n sport: Record;\n}): RacingGame[] => {\n const data: Record = {};\n\n const sport = 'sport' in swarmData && Object.values(swarmData?.sport);\n\n if (sport && sport.length) {\n const regions = sport[0].region;\n\n for (const region in regions) {\n const competitions = regions[region].competition;\n\n for (const competition in competitions) {\n const games = competitions[competition]?.game;\n\n for (const game in games) {\n if (games[game]?.id) {\n const winnerMarket = Object.values(games[game]?.market || {}).find(\n market => {\n if (market?.type) {\n return (\n market.type.toLowerCase() ===\n WINNER_MARKET_TYPE_NAME.toLowerCase()\n );\n }\n }\n );\n\n data[games[game].id] = {\n ...games[game],\n sportId: sport[0].id,\n regionId: regions[region].id,\n regionName: regions[region].name,\n regionAlias: regions[region].alias,\n competitionId: competitions[competition].id,\n competitionName: competitions[competition].name,\n winnerMarketId: winnerMarket?.id || 0,\n market: { ...games[game]?.market }\n };\n }\n }\n }\n }\n }\n\n return sortByOrder(Object.values(data || {}), 'start_ts');\n};\n\nexport const UTCDate = (): UTCDateType => {\n const objDate = new Date();\n objDate.setHours(0, 0, 0, 0);\n\n const todayStart =\n objDate.valueOf() / MILLISECONDS_IN_SECOND - SECONDS_PER_HOUR,\n todayEnd = objDate.setDate(objDate.getDate() + 1) / MILLISECONDS_IN_SECOND,\n tomorrowStart =\n objDate.setDate(objDate.getDate()) / MILLISECONDS_IN_SECOND - 1,\n tomorrowEnd =\n objDate.setDate(objDate.getDate() + 1) / MILLISECONDS_IN_SECOND,\n dayAfterTomorrowStart =\n objDate.setDate(objDate.getDate()) / MILLISECONDS_IN_SECOND - 1,\n dayAfterTomorrowEnd =\n objDate.setDate(objDate.getDate() + 1) / MILLISECONDS_IN_SECOND,\n twoDaysAfterTomorrowStart =\n objDate.setDate(objDate.getDate()) / MILLISECONDS_IN_SECOND - 1,\n twoDaysAfterTomorrowEnd =\n objDate.setDate(objDate.getDate() + 1) / MILLISECONDS_IN_SECOND;\n\n return {\n todayStart: todayStart,\n todayEnd: todayEnd,\n tomorrowStart: tomorrowStart,\n tomorrowEnd: tomorrowEnd,\n dayAfterTomorrowStart: dayAfterTomorrowStart,\n dayAfterTomorrowEnd: dayAfterTomorrowEnd,\n twoDaysAfterTomorrowStart: twoDaysAfterTomorrowStart,\n twoDaysAfterTomorrowEnd: twoDaysAfterTomorrowEnd\n };\n};\n\nexport const dayFilterCommandCondition = (\n selectedDayFilter: ERacingTabsTimeFilters\n): TDayFilter => {\n if (selectedDayFilter === ERacingTabsTimeFilters.ALL_TIME) {\n return {};\n }\n\n const dateMilliseconds = UTCDate();\n\n let start = 0,\n end = 0;\n\n switch (selectedDayFilter) {\n case ERacingTabsTimeFilters.TODAY:\n start = dateMilliseconds.todayStart;\n end = dateMilliseconds.todayEnd;\n break;\n case ERacingTabsTimeFilters.TOMORROW:\n start = dateMilliseconds.tomorrowStart;\n end = dateMilliseconds.tomorrowEnd;\n break;\n case ERacingTabsTimeFilters.DAY_AFTER_TOMORROW:\n start = dateMilliseconds.dayAfterTomorrowStart;\n end = dateMilliseconds.dayAfterTomorrowEnd;\n break;\n case ERacingTabsTimeFilters.TWO_DAYS_AFTER_TOMORROW:\n start = dateMilliseconds.twoDaysAfterTomorrowStart;\n end = dateMilliseconds.twoDaysAfterTomorrowEnd;\n break;\n }\n\n return {\n '@gt': start,\n '@lt': end\n };\n};\n\nexport const getGameAdditionalData = async (gameId: number) => {\n const url = `https://horseracing.betcoapps.com/rc/${gameId}.json`;\n\n return await axios\n .get(url)\n .then((response: TRacingGameJsonData) => {\n if (response.status === HTTP_REQUEST_SUCCESS_STATUS) {\n const gameAdditionalDataJson = response.data;\n\n const gameAdditionalData: IRacingGameHorseAdditionalData = {\n id: gameId,\n events: {},\n distanceText: '',\n gameCompiledTitle: '',\n name: ''\n };\n\n const firstPositionPrize = gameAdditionalDataJson.prizes?.find(\n prize => prize.position === 1\n );\n\n const firstPositionPrizeString =\n firstPositionPrize &&\n firstPositionPrize.position &&\n firstPositionPrize.amount\n ? `${firstPositionPrize?.position}st: £${firstPositionPrize?.amount}`\n : '';\n\n const gameCompiledTitle = `${\n gameAdditionalDataJson?.title\n ? `${gameAdditionalDataJson?.title} `\n : ''\n }${\n gameAdditionalDataJson?.distanceText\n ? `${gameAdditionalDataJson?.distanceText} `\n : ''\n }${\n gameAdditionalDataJson?.going\n ? `${\n gameAdditionalDataJson?.title ||\n gameAdditionalDataJson?.distanceText\n ? '- '\n : ''\n }${gameAdditionalDataJson?.going} ${\n firstPositionPrizeString ? '/ ' : ''\n }`\n : ''\n }${firstPositionPrizeString ? `${firstPositionPrizeString}` : ''}`;\n\n gameAdditionalData.distanceText =\n gameAdditionalDataJson.distanceText || '';\n gameAdditionalData.gameCompiledTitle = gameCompiledTitle || '';\n gameAdditionalData.name = gameAdditionalDataJson.name;\n\n gameAdditionalDataJson.selections.forEach(event => {\n if (event.name) {\n gameAdditionalData.events[event.name.toLowerCase()] = event;\n }\n });\n\n return gameAdditionalData;\n } else {\n return undefined;\n }\n })\n .catch(() => {\n return undefined;\n });\n};\n\nexport const getRacingStartsInTime = (startTs: number) => {\n const nowTimeSeconds = new Date().getTime() / MILLISECONDS_IN_SECOND;\n\n if (nowTimeSeconds > startTs) {\n return '';\n }\n\n const difference = Math.round(startTs - nowTimeSeconds);\n\n const min = Math.floor((difference % SECONDS_PER_HOUR) / SECONDS_PER_MINUTE);\n const hour = Math.floor(difference / SECONDS_PER_HOUR);\n\n return `${hour > 0 ? `${hour} ${i18n.t('account.hour')}` : ''}${\n hour > 0 && min > 0 ? ' ' : ''\n }${min > 0 ? `${min} ${i18n.t('racing.min')}` : ''}`;\n};\n\nexport const getRacingDateAndTime = (startTs: number) => {\n return startTs\n ? dayjs.unix(startTs).format(\n dateFormat({\n date: SpringConfigs.DT.shortDate,\n time: SpringConfigs.DT.time,\n dateTimeSeparator: ' | '\n })\n )\n : '';\n};\n\nexport const getRacingTime = (startTs: number) => {\n return startTs ? dayjs.unix(startTs).format(SpringConfigs.DT.time) : '';\n};\n\nexport const getRacingAndSportsFilterTabs = (sportAlias: string) => {\n if (sportAlias === GREYHOUNDS_RACING.alias) {\n return RACING_DATE_AND_SPORTS_FILTER_TABS.slice(\n isMobile() ? 0 : 1,\n isMobile() ? sliceLength.SLICE_START_3 : sliceLength.SLICE_START_3\n );\n } else {\n return RACING_DATE_AND_SPORTS_FILTER_TABS.slice(isMobile() ? 0 : 1);\n }\n};\n\nconst setGameData = (\n item: TResultsCompetitionViewGameData,\n modifiedData: Record\n) => {\n modifiedData[item.RegionId].competition[item.CompetitionId].game[item.Id] = {\n id: item.Id,\n start_ts: item.StartTime\n };\n};\n\nconst setGameCompetitionData = (\n item: TResultsCompetitionViewGameData,\n modifiedData: Record\n) => {\n modifiedData[item.RegionId].competition[item.CompetitionId] = {\n id: item.CompetitionId,\n order: item.CompetitionOrder,\n name: item.CompetitionName,\n game: {}\n };\n setGameData(item, modifiedData);\n};\n\nconst setRegionData = (\n item: TResultsCompetitionViewGameData,\n modifiedData: Record\n) => {\n const sportAlias = item.SportAlias;\n modifiedData[item.RegionId] = {\n id: item.RegionId,\n name: item.RegionName,\n alias: item.RegionAlias,\n order: item.RegionOrder,\n sportAlias,\n sportId: `${item.SportId}`,\n competition: {}\n };\n setGameCompetitionData(item, modifiedData);\n};\n\nexport const modifyResultsGamesListData = (\n data: TResultsCompetitionViewGameData[] = []\n): TRacingResultsRegion[] => {\n if (data.length) {\n const modifiedData: Record = {};\n\n data.forEach(item => {\n if (modifiedData[item.RegionId]) {\n if (modifiedData[item.RegionId].competition) {\n if (modifiedData[item.RegionId].competition[item.CompetitionId]) {\n if (\n modifiedData[item.RegionId].competition[item.CompetitionId].game\n ) {\n if (\n !modifiedData[item.RegionId].competition[item.CompetitionId]\n .game[item.StartTime]\n ) {\n setGameData(item, modifiedData);\n }\n } else {\n modifiedData[item.RegionId].competition[item.CompetitionId].game =\n {};\n setGameData(item, modifiedData);\n }\n } else {\n setGameCompetitionData(item, modifiedData);\n }\n } else {\n modifiedData[item.RegionId].competition = {};\n setGameCompetitionData(item, modifiedData);\n }\n } else {\n setRegionData(item, modifiedData);\n }\n });\n\n return sortByOrder(Object.values(modifiedData), 'order');\n } else {\n return [];\n }\n};\n\nexport const modifyResultsGameData = (\n data: TRacingResultsGameData\n): TRacingResultsGame => {\n const compiledData: TRacingResultsGame = {\n id: data.MatchId,\n start_ts: data.StartTime,\n winnerMarketId: data.MarketId,\n market: {\n [data.MarketId]: {\n id: data.MarketId,\n name: data.MarketName,\n type_id: data.MarketTypeId,\n extra_info: JSON.parse(data.MarketExtraInfo),\n event: {},\n type: WINNER_MARKET_TYPE_NAME.toLowerCase()\n }\n }\n };\n\n data.Selections.forEach(item => {\n compiledData.market[data.MarketId].event[item.Id] = {\n id: item.Id,\n order: item.Order,\n original_order: item.Order,\n /* ---- need to correct with swarm team to now position statuses (-1, -2, 0 ...) ---- */\n position:\n item.Position < 1\n ? ERacingResultPositionTypes.NON_RUNNER\n : item.Position,\n name: item.Name,\n outcome: item.Outcome,\n price: item.SPPrice,\n type: item.Name\n };\n });\n\n return compiledData;\n};\n\nexport const createCompetitionTimes = (\n competitionOrderedGames: TRacingResultsCompetitionGame[]\n): { title: string; value: string | number }[] => {\n const data: { title: string; value: string | number }[] = [];\n\n if (competitionOrderedGames) {\n if (competitionOrderedGames.length > 1) {\n data.push({ title: i18n.t('pages.allRaces'), value: RACES_ALL_GAMES });\n }\n\n competitionOrderedGames.forEach(game => {\n if (game.start_ts) {\n data.push({\n title: game.start_ts\n ? dayjs.unix(game.start_ts).format(SpringConfigs.DT.time)\n : '',\n value: game.id\n });\n }\n });\n }\n\n return data;\n};\n\nexport const createRegionCompetitionList = (\n region: TRacingResultsRegion | null,\n currentCompetition: TRacingResultsCompetition | null\n): { title: string; value: number }[] => {\n const data: { title: string; value: number }[] = [];\n\n if (region) {\n for (const competition in region.competition) {\n const competitionId = region.competition[competition].id;\n\n if (currentCompetition?.id && competitionId !== +currentCompetition?.id) {\n data.push({\n value: competitionId,\n title: region.competition[competition].name\n });\n }\n }\n }\n\n return data;\n};\n"],"names":["SpringConfigs","IS_RTL","RacingDesktopView","lazy","RacingMobileView","MatchStreamingWidget","RacingSport","_ref","_configs$racingSports","configs","contentHeight","useContentHeight","history","useHistory","dispatch","useDispatch","getUpcomingRacesData","useGetUpcomingRaces","setUpcomingEvents","swarmData","data","sortUpcomingSwarmData","batchActions","setUpcomingData","setIsUpcomingRacesLoading","useCallback","sportId","rId","executeCommand","sport","region","competition","market","event","game","id","start_ts","UTCDate","todayStart","params","useSbRouteMatch","mountPoint","location","pathname","isFutureOrSpecial","FUTURE_RACES","alias","SPECIAL_RACES","includes","racingSportsList","length","ERacingSportSideBarTabs","All","useEffect","MOCKED_DATA","updatedSport","HORSE_RACING","updatedType","type","ERacingPageTypes","UPCOMING","allowedSportAlias","GREYHOUNDS_RACING","push","search","RACING_SPORT_ALIAS","RidGenerator","gForSubscribe","unsubscribeCommand","removeUpcomingAllData","_jsx","className","cc","isMobile","children","Route","exact","path","routePathWithMockedDataCheck","Suspense","fallback","style","height","_jsxs","_Fragment","StreamCourtSkeleton","classNames","date","Date","RACING_SPORTS_TABS","label","i18n","icon","RACING_PAGE_TYPE_TABS","key","title","RESULTS","RACING_RESULTS_TIME_FILTER_TABS","ERacingResultsTimeFilterTabs","YESTERDAY","value","TODAY","weekdayNames","RACING_DATE_AND_SPORTS_FILTER_TABS","ENextOff","NEXT_OFF","timeFilter","ERacingTabsTimeFilters","TOMORROW","DAY_AFTER_TOMORROW","getDay","DAY_AFTER_TOMORROW_DAYS_NUMBER_FROM_TODAY","MAX_DAY_VALUE","WEEK_DAYS_NUMBER","TWO_DAYS_AFTER_TOMORROW","TWO_DAYS_AFTER_TOMORROW_DAYS_NUMBER_FROM_TODAY","ALL_TIME","RACING_RESULTS_POSITION_NAMES","ERacingResultPositionTypes","NOT_FINISHED","NON_RUNNER","RACING_RESULTS_BET_TYPES","sortRegionSwarmData","Object","values","regionData","regions","currentRegion","toString","sportAlias","competitions","_competitions$competi","games","_games$game","_games$game2","_games$game3","winnerMarket","find","toLowerCase","WINNER_MARKET_TYPE_NAME","regionId","regionName","name","regionAlias","competitionId","competitionName","winnerMarketId","sortByOrder","objDate","setHours","valueOf","MILLISECONDS_IN_SECOND","SECONDS_PER_HOUR","todayEnd","setDate","getDate","tomorrowStart","tomorrowEnd","dayAfterTomorrowStart","dayAfterTomorrowEnd","twoDaysAfterTomorrowStart","twoDaysAfterTomorrowEnd","dayFilterCommandCondition","selectedDayFilter","dateMilliseconds","start","end","getGameAdditionalData","async","url","gameId","axios","then","response","status","HTTP_REQUEST_SUCCESS_STATUS","_gameAdditionalDataJs","gameAdditionalDataJson","gameAdditionalData","events","distanceText","gameCompiledTitle","firstPositionPrize","prizes","prize","position","firstPositionPrizeString","amount","going","selections","forEach","catch","getRacingStartsInTime","startTs","nowTimeSeconds","getTime","difference","Math","round","min","floor","SECONDS_PER_MINUTE","hour","getRacingDateAndTime","dayjs","format","dateFormat","DT","shortDate","time","dateTimeSeparator","getRacingTime","getRacingAndSportsFilterTabs","slice","sliceLength","SLICE_START_3","setGameData","item","modifiedData","RegionId","CompetitionId","Id","StartTime","setGameCompetitionData","order","CompetitionOrder","CompetitionName","modifyResultsGamesListData","arguments","undefined","setRegionData","SportAlias","RegionName","RegionAlias","RegionOrder","SportId","modifyResultsGameData","compiledData","MatchId","MarketId","MarketName","type_id","MarketTypeId","extra_info","JSON","parse","MarketExtraInfo","Selections","Order","original_order","Position","Name","outcome","Outcome","price","SPPrice","createCompetitionTimes","competitionOrderedGames","RACES_ALL_GAMES","createRegionCompetitionList","currentCompetition"],"sourceRoot":""}