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A,CAANwE,KAMtC,EAAE,SAGJ,EACS,GAAA/C,EAAAjC,GAAA,EAACkF,EAAAA,CAASA,CAAAA,CAACzB,MAAOA,EAAOC,QAASA,IAGvCF,CAAAA,MAAAA,EAAAA,KAAAA,EAAAA,EAAesB,MAAM,GAAI,GAAMlF,EAWjC,GAAAqC,EAAAjC,GAAA,EAACC,MAAAA,CAAIC,UAAWC,IAAAA,SAAgB,UAC9B,GAAA8B,EAAA7B,IAAA,EAACH,MAAAA,CAAIC,UAAWC,GAAAA,CAAAA,sBAA6B,WAC1CoE,EACCZ,CAAAA,GAAsB/D,CAAAA,GAAc+E,OAZxC,GAAA1C,EAAAjC,GAAA,EAACC,MAAAA,CAAIC,UAAWC,IAAAA,SAAgB,UAC9B,GAAA8B,EAAAjC,GAAA,EAACC,MAAAA,CAAIC,UAAWC,IAAAA,cAAqB,UACnC,GAAA8B,EAAAjC,GAAA,EAACmF,EAAAA,CAAeA,CAAAA,CAAAA,MAc1B,UC1Ee,SAASC,IACtB,MACE,GAAAnD,EAAA7B,IAAA,EAACiF,EAAAA,CAAMA,CAAAA,CAACC,YAAW,aACjB,GAAArD,EAAAjC,GAAA,EAAC4C,EAAmBA,CAAAA,GACpB,GAAAX,EAAAjC,GAAA,EAACiD,EAAYA,CAAAA,KAGnB,qBClBAsC,EAAAC,OAAA,EAAkB,0aCAlBD,EAAAC,OAAA,EAAkB,gHCAlBD,EAAAC,OAAA,EAAkB","sources":["webpack://_N_E/?dd21","webpack://_N_E/./src/components/Providers/Card/index.tsx","webpack://_N_E/./src/components/Providers/Header/Input/index.tsx","webpack://_N_E/./src/components/Providers/Header/index.tsx","webpack://_N_E/./src/components/Providers/List/index.tsx","webpack://_N_E/./src/pages/games/providers/index.tsx","webpack://_N_E/./src/components/Providers/Card/styles.module.scss","webpack://_N_E/./src/components/Providers/Header/styles.module.scss","webpack://_N_E/./src/components/Providers/List/styles.module.scss"],"sourcesContent":["\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/games/providers\",\n function () {\n return require(\"private-next-pages/games/providers/index.tsx\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/games/providers\"])\n });\n }\n ","import { Image } from '@starsoft/common/components';\nimport { GameProviderProps } from './props';\nimport styles from './styles.module.scss';\nimport { GameProviderId } from '@/enums/gameProviderId';\nimport { memo } from 'react';\nimport useTranslation from 'next-translate/useTranslation';\n\nfunction GameProviderCard({ provider, onClick, isLoading }: GameProviderProps) {\n const { t } = useTranslation('common');\n\n function handleClick() {\n onClick(provider);\n }\n\n if (isLoading) {\n return
;\n }\n\n return (\n \n
\n {provider?.name} -{' '}\n {t('game_count', { count: `${provider?.gamesCount}` })}\n
\n\n \n
\n );\n}\n\nexport default memo(GameProviderCard);\n","import { Input } from '@starsoft/common/components';\nimport {\n handleChangeProviderSearchValue,\n resetSearchProvider,\n} from '@/lib/store/casino/actions';\nimport { debounce } from 'lodash';\nimport useTranslation from 'next-translate/useTranslation';\nimport { useCallback, useEffect } from 'react';\nimport { useDispatch } from 'react-redux';\n\nexport default function GameProvidersHeaderInput() {\n const { t } = useTranslation('casino');\n const dispatch = useDispatch();\n\n //eslint-disable-next-line\n const debouncedFetch = useCallback(\n debounce(\n (nextValue: string) =>\n dispatch(handleChangeProviderSearchValue(nextValue)),\n 300,\n ),\n [],\n );\n\n function handleSearchProviderValue(\n e: React.ChangeEvent,\n ): void {\n debouncedFetch(e.target.value);\n }\n\n function onErase() {\n dispatch(handleChangeProviderSearchValue(''));\n }\n\n function onUnmount() {\n return () => {\n dispatch(resetSearchProvider());\n };\n }\n\n useEffect(onUnmount, [dispatch]);\n\n return (\n \n );\n}\n","import useTranslation from 'next-translate/useTranslation';\nimport React from 'react';\nimport styles from './styles.module.scss';\nimport GameProvidersHeaderInput from './Input';\nimport { NavigationBreadcrumbs } from '@starsoft/common/components';\n\nexport default function GameProvidersHeader() {\n const { t } = useTranslation('common');\n\n return (\n
\n \n\n \n
\n );\n}\n","import { useSelector } from 'react-redux';\nimport { useGameProviders } from '@/api/game-providers';\nimport { RootState } from '@/lib/store';\nimport styles from './styles.module.scss';\nimport { useCallback, useMemo } from 'react';\nimport { useRouter } from 'next/router';\nimport { useInfiniteDocumentScroll } from '@starsoft/common/hooks';\nimport { ErrorCard, NoDataComponent } from '@starsoft/common/components';\nimport GameProviderCard from '../Card';\nimport { GameProvider } from '@/models/game/provider';\n\nexport default function ProviderList() {\n const { push } = useRouter();\n const providerName: string = useSelector(\n (state: RootState) => state.casino.searchProvider,\n );\n const {\n gameProviders,\n error,\n isLoading,\n refetch,\n isFetchingNextPage,\n hasNextPage,\n fetchNextPage,\n isFetching,\n } = useGameProviders({ limit: 50, query: providerName });\n useInfiniteDocumentScroll({\n hasMore: hasNextPage ?? false,\n isLoading: isLoading || isFetchingNextPage || isFetching,\n loadMore: () => fetchNextPage(),\n });\n\n const handleTargetProvider = useCallback(\n (provider: GameProvider) => {\n push(`/games/providers/${provider?.slug}`);\n },\n [push],\n );\n\n const Providers = useMemo(\n () =>\n gameProviders?.map(provider => (\n \n )),\n [gameProviders, handleTargetProvider],\n );\n\n const Skeletons = useMemo(\n () =>\n Array.from({ length: 50 }).map((_, index) => (\n undefined}\n />\n )),\n [],\n );\n\n if (error) {\n return ;\n }\n\n if (gameProviders?.length == 0 && !isLoading) {\n return (\n
\n
\n \n
\n
\n );\n }\n\n return (\n
\n
\n {Providers}\n {(isFetchingNextPage || isLoading) && Skeletons}\n
\n
\n );\n}\n","import { prefetchGameProviders } from '@/api/game-providers/queries/useGameProviders/prefetch';\nimport Layout from '@/components/core/Layout';\nimport GameProvidersHeader from '@/components/Providers/Header';\nimport ProviderList from '@/components/Providers/List';\nimport { Language } from '@/enums/language';\nimport { GetServerSidePropsResultWithMetadataAndServerState } from '@/interfaces/pages/getServerSidePropsResultWithMetadataAndDehydratedState';\nimport { SSRCookies } from '@/interfaces/ssr-cookies.interface';\nimport { generateCasinoMetadata } from '@/lib/metadata';\nimport { mainPrefetchs } from '@/lib/prefetch';\nimport { dehydrate, QueryClient } from '@tanstack/react-query';\nimport { GetServerSidePropsContext } from 'next';\n\nexport default function GameProvidersPage() {\n return (\n \n \n \n \n );\n}\n\nexport async function getServerSideProps({\n locale,\n req,\n res,\n resolvedUrl,\n}: GetServerSidePropsContext): Promise {\n const queryClient = new QueryClient();\n\n const [metadata] = await Promise.all([\n generateCasinoMetadata({\n lang: locale as Language,\n title: 'providers_title',\n path: '/games/providers',\n }),\n prefetchGameProviders(queryClient, {} as SSRCookies, {\n limit: 50,\n query: '',\n }),\n\n mainPrefetchs({\n queryClient,\n req,\n }),\n ]);\n\n return {\n props: {\n metadata: JSON.stringify(metadata),\n dehydratedState: dehydrate(queryClient),\n },\n };\n}\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"skeleton\":\"styles_skeleton__E3CRk\",\"skeleton-animation\":\"styles_skeleton-animation__b6TCc\",\"container\":\"styles_container__HzPdD\",\"container__game-row\":\"styles_container__game-row__ngV9k\",\"container__row\":\"styles_container__row__x_rYg\",\"container__card\":\"styles_container__card__SLAbY\",\"container__card__wrapper\":\"styles_container__card__wrapper__7usnl\",\"container__card__image\":\"styles_container__card__image__7Hibs\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"styles_container__utCr_\",\"skeleton-animation\":\"styles_skeleton-animation__My5sS\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"skeleton\":\"styles_skeleton__AEQun\",\"skeleton-animation\":\"styles_skeleton-animation__FiZY_\",\"container\":\"styles_container__K0smT\",\"container__game-row\":\"styles_container__game-row__1D1hu\",\"container__row\":\"styles_container__row__1MTDR\",\"container__card\":\"styles_container__card__cSRQ3\",\"container__card__wrapper\":\"styles_container__card__wrapper__5MnCw\",\"container__card__image\":\"styles_container__card__image__ClNvl\"};"],"names":["window","__NEXT_P","push","__webpack_require__","__webpack_exports__","Z","memo","param","provider","onClick","isLoading","t","useTranslation","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsx","div","className","styles","jsxs","name","strong","count","concat","gamesCount","Image","width","height","externalId","GameProviderId","Originals","src","process","image","alt","format","secondarySkeleton","id","GameProvidersHeaderInput","dispatch","useDispatch","debouncedFetch","useCallback","debounce","handleChangeProviderSearchValue","nextValue","useEffect","resetSearchProvider","jsx_runtime","Input","placeholder","onChange","e","target","value","isContainerColor","icon","showEraserButton","onErase","GameProvidersHeader","NavigationBreadcrumbs","to","lastPageLabel","currentPageLabel","ProviderList","useRouter","providerName","useSelector","state","casino","searchProvider","gameProviders","error","refetch","isFetchingNextPage","hasNextPage","fetchNextPage","isFetching","useGameProviders","limit","query","useInfiniteDocumentScroll","hasMore","loadMore","handleTargetProvider","slug","Providers","useMemo","map","GameProviderCard","Skeletons","Array","from","length","_","index","undefined","ErrorCard","NoDataComponent","GameProvidersPage","Layout","disabledGap","module","exports"],"sourceRoot":""}