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./src/components/Radio/CuratedStationList.module.scss","webpack://quran.com/./src/components/Radio/ReciterStationList.module.scss","webpack://quran.com/./src/pages/radio.module.scss","webpack://quran.com/./src/components/Radio/CuratedStationList.tsx","webpack://quran.com/./src/components/Radio/ReciterStationList.tsx","webpack://quran.com/./src/utils/cdn.ts","webpack://quran.com/external commonjs \"@reduxjs/toolkit\"","webpack://quran.com/external commonjs \"@sentry/nextjs\"","webpack://quran.com/external commonjs \"@xstate/react\"","webpack://quran.com/external commonjs \"classnames\"","webpack://quran.com/external commonjs \"humps\"","webpack://quran.com/external commonjs \"lodash/findKey\"","webpack://quran.com/external commonjs \"lodash/groupBy\"","webpack://quran.com/external commonjs \"lodash/random\"","webpack://quran.com/external commonjs \"lodash/range\"","webpack://quran.com/external commonjs \"lodash/sample\"","webpack://quran.com/external commonjs \"next-seo\"","webpack://quran.com/external commonjs \"next-translate/useTranslation\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/app-router-context.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/head-manager-context.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/head.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/i18n/detect-domain-locale.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/i18n/normalize-locale-path.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/image-config-context.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/image-config.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/is-plain-object.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/mitt.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/page-path/denormalize-page-path.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router-context.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/add-locale.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/add-path-prefix.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/compare-states.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/format-next-pathname-info.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/format-url.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/get-asset-path-from-route.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/get-next-pathname-info.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/is-bot.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/is-dynamic.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/parse-path.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/parse-relative-url.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/path-has-prefix.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/querystring.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/remove-trailing-slash.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/resolve-rewrites.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/route-matcher.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/route-regex.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/utils.js\"","webpack://quran.com/external commonjs \"next/router\"","webpack://quran.com/external commonjs \"react\"","webpack://quran.com/external commonjs \"react/jsx-runtime\"","webpack://quran.com/external commonjs \"xstate\"","webpack://quran.com/external commonjs \"xstate/lib/actions\"","webpack://quran.com/external module \"@radix-ui/react-tooltip\"","webpack://quran.com/external module \"firebase/compat/analytics\"","webpack://quran.com/external module \"firebase/compat/app\"","webpack://quran.com/external module \"react-toastify\"","webpack://quran.com/external node-commonjs \"querystring\""],"sourcesContent":["import classNames from 'classnames';\nimport { GetStaticProps } from 'next';\nimport useTranslation from 'next-translate/useTranslation';\n\nimport pageStyle from './index.module.scss';\nimport radioStyle from './radio.module.scss';\n\nimport { getAvailableReciters } from '@/api';\nimport NextSeoWrapper from '@/components/NextSeoWrapper';\nimport CuratedStationList from '@/components/Radio/CuratedStationList';\nimport ReciterStationList from '@/components/Radio/ReciterStationList';\nimport { getAllChaptersData } from '@/utils/chapter';\nimport { getLanguageAlternates } from '@/utils/locale';\nimport { getCanonicalUrl } from '@/utils/navigation';\nimport Reciter from 'types/Reciter';\n\ntype RadioPageProps = {\n reciters: Reciter[];\n};\n\nconst NAVIGATION_URL = '/radio';\n\nconst RadioPage = ({ reciters }: RadioPageProps) => {\n const { t, lang } = useTranslation('radio');\n\n return (\n <>\n <NextSeoWrapper\n title={t('common:quran-radio')}\n canonical={getCanonicalUrl(lang, NAVIGATION_URL)}\n languageAlternates={getLanguageAlternates(NAVIGATION_URL)}\n description={t('radio-desc')}\n />\n <div className={pageStyle.pageContainer}>\n <div className={radioStyle.ribbon} />\n <div className={pageStyle.flow}>\n <div\n className={classNames(pageStyle.flowItem, radioStyle.title, radioStyle.titleOnRibbon)}\n >\n {t('curated-stations')}\n </div>\n <div className={classNames(pageStyle.flowItem, pageStyle.fullWidth)}>\n <CuratedStationList />\n </div>\n <div className={classNames(pageStyle.flowItem, radioStyle.title)}>\n {t('reciter-stations')}\n </div>\n <div className={classNames(pageStyle.flowItem, pageStyle.fullWidth)}>\n <ReciterStationList reciters={reciters} />\n </div>\n </div>\n </div>\n </>\n );\n};\n\nexport const getStaticProps: GetStaticProps = async ({ locale }) => {\n try {\n const chaptersData = await getAllChaptersData(locale);\n const { reciters } = await getAvailableReciters(locale, ['profile_picture']);\n return {\n props: {\n chaptersData,\n reciters,\n },\n };\n } catch (e) {\n return {\n notFound: true,\n };\n }\n};\n\nexport default RadioPage;\n","import * as Sentry from '@sentry/nextjs';\nimport * as serverComponentModule from '__SENTRY_WRAPPING_TARGET_FILE__.cjs';\nexport * from '__SENTRY_WRAPPING_TARGET_FILE__.cjs';\n\n/*\n * This file is a template for the code which will be substituted when our webpack loader handles non-API files in the\n * `pages/` directory.\n *\n * We use `__SENTRY_WRAPPING_TARGET_FILE__.cjs` as a placeholder for the path to the file being wrapped. Because it's not a real package,\n * this causes both TS and ESLint to complain, hence the pragma comments below.\n */\n\nconst userPageModule = serverComponentModule ;\n\nconst pageComponent = userPageModule ? userPageModule.default : undefined;\n\nconst origGetInitialProps = pageComponent ? pageComponent.getInitialProps : undefined;\nconst origGetStaticProps = userPageModule ? userPageModule.getStaticProps : undefined;\nconst origGetServerSideProps = userPageModule ? userPageModule.getServerSideProps : undefined;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst getInitialPropsWrappers = {\n '/_app': Sentry.wrapAppGetInitialPropsWithSentry,\n '/_document': Sentry.wrapDocumentGetInitialPropsWithSentry,\n '/_error': Sentry.wrapErrorGetInitialPropsWithSentry,\n};\n\nconst getInitialPropsWrapper = getInitialPropsWrappers['/radio'] || Sentry.wrapGetInitialPropsWithSentry;\n\nif (pageComponent && typeof origGetInitialProps === 'function') {\n pageComponent.getInitialProps = getInitialPropsWrapper(origGetInitialProps) ;\n}\n\nconst getStaticProps =\n typeof origGetStaticProps === 'function'\n ? Sentry.wrapGetStaticPropsWithSentry(origGetStaticProps, '/radio')\n : undefined;\nconst getServerSideProps =\n typeof origGetServerSideProps === 'function'\n ? Sentry.wrapGetServerSidePropsWithSentry(origGetServerSideProps, '/radio')\n : undefined;\n\nconst pageWrapperTemplate = pageComponent ? Sentry.wrapPageComponentWithSentry(pageComponent ) : pageComponent;\n\nexport { pageWrapperTemplate as default, getServerSideProps, getStaticProps };\n","// Exports\nmodule.exports = {\n\t\"container\": \"CuratedStationList_container__AwJQZ\",\n\t\"item\": \"CuratedStationList_item__P7_sR\"\n};\n","// Exports\nmodule.exports = {\n\t\"container\": \"ReciterStationList_container__zUdts\"\n};\n","// Exports\nmodule.exports = {\n\t\"title\": \"radio_title__ZPrd6\",\n\t\"titleOnRibbon\": \"radio_titleOnRibbon__DJfOZ\",\n\t\"footerContainer\": \"radio_footerContainer__Tvi1H\",\n\t\"ribbon\": \"radio_ribbon__OVBhI\"\n};\n","import { useContext } from 'react';\n\nimport { useSelector } from '@xstate/react';\nimport useTranslation from 'next-translate/useTranslation';\n\nimport Card, { CardSize } from '../dls/Card/Card';\n\nimport styles from './CuratedStationList.module.scss';\nimport curatedStations from './curatedStations';\nimport { StationType } from './types';\n\nimport PauseIcon from '@/icons/pause.svg';\nimport PlayIcon from '@/icons/play-arrow.svg';\nimport { logEvent } from '@/utils/eventLogger';\nimport { AudioPlayerMachineContext } from 'src/xstate/AudioPlayerMachineContext';\n\n// When one of the curated station is clicked,\n// 1) Pick (randomly) one of the audioTrack listen in the station\n// the listen can be found in curatadStations.ts\n// 2) Update the current station state in the redux\n// 3) Play the audio\nconst CuratedStationList = () => {\n const { t } = useTranslation('radio');\n\n const audioService = useContext(AudioPlayerMachineContext);\n const isAudioPlaying = useSelector(audioService, (state) =>\n state.matches('VISIBLE.AUDIO_PLAYER_INITIATED.PLAYING'),\n );\n const radioActor = useSelector(audioService, (state) => state.context.radioActor);\n\n const playStation = async (id: string) => {\n logEvent('station_played', {\n stationId: id,\n type: StationType.Curated,\n });\n\n audioService.send({\n type: 'PLAY_RADIO',\n stationType: StationType.Curated,\n stationId: Number(id),\n });\n };\n\n const radioContext = radioActor?.getSnapshot()?.context || {};\n\n return (\n <div className={styles.container}>\n {Object.entries(curatedStations).map(([id, station]) => {\n const isSelectedStation =\n radioContext.type === StationType.Curated && radioContext.id === Number(id);\n\n let onClick;\n if (!isSelectedStation) onClick = () => playStation(id);\n if (isSelectedStation && isAudioPlaying) onClick = () => audioService.send('TOGGLE');\n if (isSelectedStation && !isAudioPlaying) onClick = () => audioService.send('TOGGLE');\n\n const actionIcon = isSelectedStation && isAudioPlaying ? <PauseIcon /> : <PlayIcon />;\n\n return (\n <div className={styles.item} key={id}>\n <Card\n shouldFlipIconOnRTL={false}\n actionIcon={actionIcon}\n imgSrc={station.bannerImgSrc}\n size={CardSize.Large}\n tooltip={t('common:audio.play')}\n ariaLabel={t('common:audio.play')}\n title={t(`curated-station.${station.title}`)}\n imgAlt={t(`curated-station.${station.title}`)}\n description={t(`curated-station.${station.description}`)}\n onImgClick={onClick}\n onActionIconClick={onClick}\n />\n </div>\n );\n })}\n </div>\n );\n};\n\nexport default CuratedStationList;\n","import { useContext } from 'react';\n\nimport { useSelector } from '@xstate/react';\n\nimport Card, { CardSize } from '../dls/Card/Card';\nimport Link from '../dls/Link/Link';\n\nimport styles from './ReciterStationList.module.scss';\nimport { StationType } from './types';\n\nimport PauseIcon from '@/icons/pause.svg';\nimport PlayIcon from '@/icons/play-arrow.svg';\nimport { makeCDNUrl } from '@/utils/cdn';\nimport { logEvent } from '@/utils/eventLogger';\nimport { getReciterNavigationUrl } from '@/utils/navigation';\nimport { AudioPlayerMachineContext } from 'src/xstate/AudioPlayerMachineContext';\nimport Reciter from 'types/Reciter';\n\ntype ReciterStationListProps = {\n reciters: Reciter[];\n};\nconst ReciterStationList = ({ reciters }: ReciterStationListProps) => {\n const audioService = useContext(AudioPlayerMachineContext);\n const isAudioPlaying = useSelector(audioService, (state) =>\n state.matches('VISIBLE.AUDIO_PLAYER_INITIATED.PLAYING'),\n );\n\n const radioActor = useSelector(audioService, (state) => state.context.radioActor);\n const radioContext = radioActor?.getSnapshot()?.context || {};\n\n return (\n <div className={styles.container}>\n {reciters.map((reciter) => {\n const isSelectedStation =\n radioContext.type === StationType.Reciter && Number(radioContext.id) === reciter.id;\n\n let onClick;\n if (!isSelectedStation) {\n onClick = () => {\n logEvent('station_played', {\n stationId: reciter.id,\n type: StationType.Curated,\n });\n audioService.send({\n type: 'PLAY_RADIO',\n stationType: StationType.Reciter,\n stationId: reciter.id,\n });\n };\n }\n if (isSelectedStation) {\n onClick = () => audioService.send('TOGGLE');\n }\n\n const actionIcon = isSelectedStation && isAudioPlaying ? <PauseIcon /> : <PlayIcon />;\n return (\n <Card\n actionIcon={actionIcon}\n imgSrc={makeCDNUrl(reciter.profilePicture)}\n key={reciter.id}\n onImgClick={onClick}\n title={\n <Link key={reciter.id} href={getReciterNavigationUrl(reciter.id.toString())}>\n {reciter.translatedName.name}\n </Link>\n }\n imgAlt={reciter.translatedName.name}\n description={reciter.style.name}\n size={CardSize.Medium}\n />\n );\n })}\n </div>\n );\n};\n\nexport default ReciterStationList;\n","export const CDN_HOST = 'https://static.qurancdn.com';\nexport const CDN_ASSETS_VERSION = '1';\n\n/**\n * Generate versioned URL of static asset\n *\n * @param {string} path the path of static asset\n * @returns {string}\n */\n\nexport const makeCDNUrl = (path: string) => {\n return `${CDN_HOST}/${path}?v=${CDN_ASSETS_VERSION}`;\n};\n","module.exports = require(\"@reduxjs/toolkit\");","module.exports = require(\"@sentry/nextjs\");","module.exports = require(\"@xstate/react\");","module.exports = require(\"classnames\");","module.exports = require(\"humps\");","module.exports = require(\"lodash/findKey\");","module.exports = require(\"lodash/groupBy\");","module.exports = require(\"lodash/random\");","module.exports = require(\"lodash/range\");","module.exports = require(\"lodash/sample\");","module.exports = require(\"next-seo\");","module.exports = require(\"next-translate/useTranslation\");","module.exports = require(\"next/dist/shared/lib/app-router-context.js\");","module.exports = require(\"next/dist/shared/lib/head-manager-context.js\");","module.exports = require(\"next/dist/shared/lib/head.js\");","module.exports = require(\"next/dist/shared/lib/i18n/detect-domain-locale.js\");","module.exports = require(\"next/dist/shared/lib/i18n/normalize-locale-path.js\");","module.exports = require(\"next/dist/shared/lib/image-config-context.js\");","module.exports = require(\"next/dist/shared/lib/image-config.js\");","module.exports = require(\"next/dist/shared/lib/is-plain-object.js\");","module.exports = require(\"next/dist/shared/lib/mitt.js\");","module.exports = require(\"next/dist/shared/lib/page-path/denormalize-page-path.js\");","module.exports = require(\"next/dist/shared/lib/router-context.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/add-locale.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/add-path-prefix.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/compare-states.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/format-next-pathname-info.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/format-url.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/get-asset-path-from-route.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/get-next-pathname-info.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/is-bot.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/is-dynamic.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/parse-path.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/parse-relative-url.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/path-has-prefix.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/querystring.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/remove-trailing-slash.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/resolve-rewrites.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/route-matcher.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/route-regex.js\");","module.exports = require(\"next/dist/shared/lib/utils.js\");","module.exports = require(\"next/router\");","module.exports = require(\"react\");","module.exports = require(\"react/jsx-runtime\");","module.exports = require(\"xstate\");","module.exports = require(\"xstate/lib/actions\");","module.exports = import(\"@radix-ui/react-tooltip\");;","module.exports = import(\"firebase/compat/analytics\");;","module.exports = import(\"firebase/compat/app\");;","module.exports = import(\"react-toastify\");;","module.exports = require(\"querystring\");"],"names":["NAVIGATION_URL","RadioPage","reciters","t","lang","useTranslation","_jsxs","_Fragment","_jsx","NextSeoWrapper","title","canonical","getCanonicalUrl","languageAlternates","getLanguageAlternates","description","div","className","pageStyle","pageContainer","radioStyle","ribbon","flow","classNames","flowItem","titleOnRibbon","fullWidth","CuratedStationList","ReciterStationList","getStaticProps","locale","chaptersData","getAllChaptersData","getAvailableReciters","props","e","notFound","useContext","useSelector","Card","CardSize","styles","curatedStations","StationType","PauseIcon","PlayIcon","logEvent","AudioPlayerMachineContext","audioService","isAudioPlaying","state","matches","radioActor","context","playStation","id","stationId","type","Curated","send","stationType","Number","radioContext","getSnapshot","container","Object","entries","map","station","isSelectedStation","onClick","actionIcon","item","shouldFlipIconOnRTL","imgSrc","bannerImgSrc","size","Large","tooltip","ariaLabel","imgAlt","onImgClick","onActionIconClick","Link","makeCDNUrl","getReciterNavigationUrl","reciter","Reciter","profilePicture","href","toString","translatedName","name","style","Medium","CDN_HOST","CDN_ASSETS_VERSION","path"],"sourceRoot":""}
|