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AAGL,EAAO,CACrCI,cAAe6C,EACfpO,UAAAA,EACAD,QAAAA,IAGIsO,EAzJkB,SAAAhD,GACxB,IACEgD,EAGEhD,EAHFgD,QAIIC,EAAQ,CACZhD,KAAM,CAAC,OAFLD,EAFFtL,QAEEsL,EADFE,cAGwC,gBACxCgB,IAAK,CAAC,OACNM,SAAU,CAAC,aAEb,OAAO0B,EAAAA,EAAAA,GAAeD,EAAO1D,EAAuByD,EACtD,CA6IkBG,CAAkBnD,GAqBlC,OAlBE4B,EADEmB,GACsB1D,EAAAA,EAAAA,KAAK4B,GAAWd,EAAAA,EAAAA,GAAS,CAC/CpM,IAAKA,EACLF,IAAKA,EACLmO,OAAQA,EACRD,MAAOA,EACP/B,WAAYA,EACZ6B,UAAWmB,EAAQ9B,KAClBY,IACsB,MAAhBH,EACEA,EACFmB,GAAU/O,EACRA,EAAI,IAESsL,EAAAA,EAAAA,KAAKiC,EAAgB,CAC3CO,UAAWmB,EAAQxB,YAIHnC,EAAAA,EAAAA,KAAKO,GAAYO,EAAAA,EAAAA,GAAS,CAC5CiD,GAAIzO,EACJqL,WAAYA,EACZ6B,WAAWwB,EAAAA,EAAAA,GAAKL,EAAQ/C,KAAM4B,GAC9BzH,IAAKA,GACJ6H,EAAO,CACRL,SAAUA,IAEd,G","sources":["components/books/Description.tsx","components/meta/Helmet.tsx","components/misc/AuthorLink.tsx","components/misc/CategoryLinkChip.tsx","components/misc/NewsletterBanner.tsx","components/misc/StoreLinks.tsx","components/misc/pagination/Pagination.tsx","statics/Homepage/NewsletterEmailSignup.tsx","statics/public-books/SearchBar.tsx","statics/public-books/books/BookIndexSingle.tsx","statics/public-books/categories/CategoryIndex.tsx","store/stores/stores.ts","utils/casing.ts","../node_modules/@mui/material/internal/svg-icons/Person.js","../node_modules/@mui/material/Avatar/avatarClasses.js","../node_modules/@mui/material/Avatar/Avatar.js"],"sourcesContent":["import React from 'react';\nimport { Typography } from '@mui/material';\n\n/**\n * Pretty quiet in here, but `whiteSpace: 'pre-line'` is important\n * to show the newline characters.\n *\n * Separated with the goals of uniformity and ease of refactoring/extending.\n */\nconst Description = function ({ description }: { description: string }) {\n return (\n <Typography\n style={{ whiteSpace: 'pre-line' }}\n color=\"text.secondary\"\n data-description\n >\n {description}\n </Typography>\n );\n};\n\nexport default Description;\n","import React from 'react';\nimport { Helmet as ReactHelmet } from 'react-helmet';\n\ninterface HelmetInput {\n title: string;\n url: string;\n description?: string;\n // Provide if there's a better image than the default\n ogImage?: string;\n}\n\nexport default function Helmet({ metaContent, schema }: { metaContent: HelmetInput, schema?: Array<Object> }) {\n const { title, url, description, ogImage } = metaContent;\n const defaultOgImage =\n 'https://website-assets-public.s3.us-west-2.amazonaws.com/opengraph/girl-in-hammock.jpg';\n const currentOgImage = ogImage || defaultOgImage;\n // Recent OG Images generated from Canva are 1200 x 600\n // So if one was set from Helmet, we use the smaller 600 size.\n // These will have to be redone and this discrepancy removed.\n const height = ogImage ? '600' : '630';\n return (\n <ReactHelmet>\n <title>{title}</title>\n <meta property=\"og:title\" content={title} />\n <link rel=\"canonical\" href={url} />\n <meta property=\"og:url\" content={url} />\n <meta property=\"og:description\" content={description} />\n <meta property=\"og:image\" content={currentOgImage} />\n <meta property=\"og:image:url\" content={currentOgImage} />\n <meta property=\"og:image:width\" content=\"1200\" />\n <meta property=\"og:image:height\" content={height} />\n\n <script type=\"application/ld+json\">\n {JSON.stringify({\n \"@context\": \"https://schema.org\",\n \"@type\": \"Organization\",\n \"url\": \"https://bookraid.com\",\n \"logo\": \"https://bookraid.com/logo.png\",\n \"description\": \"BookRaid is a website and newsletter that lets you download free & bestselling discount eBooks for your Kindle, Nook, Kobo, or other eReader\"\n })}\n </script>\n {schema && (\n schema.map(sch => <script type=\"application/ld+json\">{JSON.stringify(sch)}</script>)\n )}\n </ReactHelmet>\n );\n}\n\nHelmet.defaultProps = {\n schema: [],\n};\n","import React from \"react\";\nimport { Avatar } from \"@mui/material\";\nimport { parameterize } from \"../../utils/casing\";\nimport { Author } from \"../../store/authors/authorsSlice\";\nimport MuiRouterLink from \"../mui-wrappers/MuiRouterLink\";\n\nconst AuthorLink = function ({ author }: { author: Author }) {\n return (\n <MuiRouterLink\n sx={{ '&:hover': { textDecoration: 'underline' }, display: 'inline-flex', alignItems: 'center' }}\n to={`/authors/${author.id}/${parameterize(author.name)}`}\n >\n <Avatar\n sx={{ width: '1.5rem', height: '1.5rem', mr: 0.75 }}\n src={author.avatar_mini_url}\n alt={author.name}\n />\n {author.name}\n </MuiRouterLink>\n )\n}\n\nexport default AuthorLink;\n","import { Chip, darken, lighten } from \"@mui/material\";\nimport React from \"react\";\nimport { Link } from \"react-router-dom\";\nimport { camelize, parameterize } from \"../../utils/casing\";\nimport { Category } from \"../../store/categories/categoriesSlice\";\nimport { colors } from '../../theme/theme';\n\nconst CategoryLinkChip = function ({ category }: { category: Category }) {\n return (\n <Chip\n sx={{\n borderRadius: '4px',\n borderColor: darken(colors.categories[camelize(category.name)].backgroundColor, 0.1),\n '&:hover': {\n borderColor: darken(colors.categories[camelize(category.name)].backgroundColor, 0.2),\n backgroundColor: `${lighten(colors.categories[camelize(category.name)].backgroundColor, 0.6)} !important`,\n },\n }}\n clickable\n label={category.name}\n variant=\"outlined\"\n component={Link}\n to={`/categories/${category.id}/${parameterize(category.name)}`}\n />\n )\n}\n\nexport default CategoryLinkChip;\n","import { Box, Grid, Typography } from '@mui/material';\nimport React from 'react';\nimport NewsletterEmailSignup from '../../statics/Homepage/NewsletterEmailSignup';\n\nconst NewsletterBanner = function () {\n return (\n <Box sx={{\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n width: '100%',\n p: { xs: 2, md: 3, xl: 4 },\n backgroundColor: '#fff3ea',\n }}>\n <Grid container spacing={2} sx={{ maxWidth: 1400 }}>\n <Grid item xs={12} sm={7}>\n <Box sx={{ display: 'flex', justifyContent: 'center', flexDirection: 'column', height: '100%' }}>\n <Typography variant=\"h5\" sx={{ mb: 2, fontWeight: 'bold' }}>Join now to get limited time, exclusive deals on free and discounted eBooks</Typography>\n <Typography>We'll find amazing new authors and books for you to get excited about. You just have to worry about finding the time to read them all.</Typography>\n </Box>\n </Grid>\n <Grid item xs={0} sm={1} />\n <Grid item xs={12} sm={4}>\n <Box sx={{ display: 'flex', justifyContent: { xs: 'center', md: 'flex-end' }, alignItems: 'center', height: '100%' }}>\n <Box sx={{ backgroundColor: 'white', px: 3, pb: 3, pt: 1 }}>\n <NewsletterEmailSignup hideText />\n </Box>\n </Box>\n </Grid>\n </Grid>\n </Box>\n )\n}\n\nexport default NewsletterBanner;\n","import React from 'react';\nimport { styled } from '@mui/material/styles';\nimport { Typography } from '@mui/material';\nimport { colors } from '../../theme/theme';\nimport { Book } from '../../store/books/booksSlice';\nimport stores from '../../store/stores/stores';\nimport { Promotion } from '../../store/promotions/promotionsSlice';\n\nconst StyledLink = styled('a')<{ store: string }>(({ store }) => ({\n color: colors.stores[store].color,\n textDecoration: 'none',\n paddingRight: '1rem',\n fontWeight: 'bold',\n lineHeight: '2.5em',\n whiteSpace: 'nowrap',\n '&:hover': {\n textDecoration: 'underline',\n },\n}));\n\n/**\n * Display the links to the book.\n *\n * This partial can be used internally - in which case you don't pass in\n * a promotion. This will link directly to the books' retailer pages.\n *\n * If you want a redirect link for click tracking, pass in the promotion.\n *\n * @param book - the book to print stores from\n * @returns\n */\nconst StoreLinks = function ({\n book,\n promotion,\n useClickTracking,\n useAmznAffiliateUrl,\n}: {\n book: Book;\n promotion?: Promotion;\n useClickTracking?: Boolean;\n useAmznAffiliateUrl?: Boolean;\n}) {\n // This safeguards accidental use of click tracking if passing in a promotion.\n if ((useClickTracking && !promotion) || (!useClickTracking && promotion)) {\n throw new Error(\n 'To use click tracking, pass a promotion and enable useClickTracking'\n );\n }\n\n return (\n <Typography\n variant=\"body1\"\n sx={{\n wordBreak: 'break-all',\n }}\n >\n {stores.map((store) => {\n if (!book[store.urlProperty]) return <span key={store.title} />;\n\n const url = promotion\n ? `/${store.clickTrackingUrlPrefix}/${promotion.id}${useAmznAffiliateUrl && store.title === 'Amazon' ? '/1' : ''}?click_source=web`\n : book[store.urlProperty]?.toString();\n return (\n <StyledLink\n href={url}\n key={store.title}\n target=\"_blank\"\n rel=\"noreferrer\"\n store={store.camelCase}\n >\n {store.title}\n </StyledLink>\n );\n })}\n </Typography>\n );\n};\n\nStoreLinks.defaultProps = {\n promotion: null,\n useClickTracking: false,\n useAmznAffiliateUrl: false,\n};\n\nexport default StoreLinks;\n","import React from 'react';\nimport {\n Box,\n Pagination as MuiPagination,\n SxProps,\n Theme,\n} from '@mui/material';\n\nconst Pagination = function ({\n totalPages,\n page,\n setPage,\n sx,\n}: {\n totalPages: number;\n page: number;\n setPage: Function;\n sx?: SxProps<Theme>;\n}) {\n if (totalPages <= 1) return null;\n return (\n <Box sx={{ mb: 3, display: 'flex', justifyContent: 'right', ...sx }}>\n <MuiPagination\n count={totalPages}\n page={page}\n onChange={(event, pageNumber) => {\n setPage(pageNumber);\n }}\n variant=\"outlined\"\n color=\"secondary\"\n />\n </Box>\n );\n};\n\nPagination.defaultProps = {\n sx: {},\n};\n\nexport default Pagination;\n","import React from 'react';\nimport { Box, TextField, Typography } from '@mui/material';\nimport FacebookPixel from 'react-facebook-pixel';\nimport RedditPixel from 'react-reddit-pixel';\nimport ReactGA from 'react-ga4';\nimport ReactPinterestTag from 'react-pinterest-tag';\nimport { push } from 'connected-react-router';\nimport { LoadingButton } from '@mui/lab';\nimport { createReader } from '../../store/readers/readersSlice';\nimport { useAppDispatch } from '../../app/hooks';\nimport { addSnack } from '../../store/snacks/snacksSlice';\n\nconst NewsletterEmailSignup = function ({\n signupEmailFieldRef,\n hideText,\n extraParams,\n btnText,\n follow,\n handleSuccess,\n}: {\n signupEmailFieldRef?: any;\n hideText?: boolean;\n extraParams?: Object;\n btnText?: string;\n follow?: string;\n handleSuccess?: Function;\n}) {\n const [email, setEmail] = React.useState('');\n const [creating, setCreating] = React.useState(false);\n const dispatch = useAppDispatch();\n\n async function handleCreate(event: React.FormEvent<HTMLFormElement>) {\n event.preventDefault();\n setCreating(true);\n\n dispatch(createReader({ email, ...extraParams }))\n .unwrap()\n .then((e: any) => {\n FacebookPixel.trackCustom('ReaderSubscribed');\n RedditPixel.track('SignUp');\n ReactGA.event({\n category: 'Readers',\n action: 'ReadersSignUp',\n });\n ReactPinterestTag.track('checkout', {\n value: 100,\n order_quantity: 1,\n currency: 'USD',\n line_items: [\n {\n product_name: 'Newsletter subscription',\n product_id: '1',\n product_price: 1.0,\n product_quantity: 1,\n },\n ],\n });\n // reader conversion\n ReactGA.gtag('event', 'conversion', {\n send_to: process.env.REACT_APP_GTAG_READER_SIGNUP as string,\n });\n\n if (e.skip_categories) {\n dispatch(addSnack({ message: `Follow on ${follow} successfully created.`, variant: 'success' }))\n } else {\n let pushUrl = `/readers/${e.uuid}/edit`;\n if (follow) { pushUrl += `?follow=${follow}`; }\n dispatch(push(pushUrl));\n }\n if (handleSuccess) { handleSuccess(); }\n })\n .finally(() => {\n setCreating(false);\n })\n .catch(() => {\n // throw e;\n });\n\n return () => setCreating(false);\n }\n\n return (\n <Box sx={{ maxWidth: '350px', margin: '0 auto' }}>\n {!hideText && <Typography variant=\"h4\" component=\"h1\" color=\"secondary.main\" align=\"center\">\n Discounted & Free Bestselling Ebooks\n </Typography>}\n\n <form onSubmit={handleCreate}>\n <TextField\n onChange={(e) => setEmail(e.target.value)}\n ref={signupEmailFieldRef || null}\n variant=\"outlined\"\n margin=\"normal\"\n required\n fullWidth\n name=\"email\"\n label=\"Email\"\n value={email}\n />\n <LoadingButton\n loading={creating}\n variant=\"contained\"\n color=\"secondary\"\n type=\"submit\"\n fullWidth\n >\n {btnText}\n </LoadingButton>\n </form>\n </Box>\n );\n};\n\nNewsletterEmailSignup.defaultProps = {\n signupEmailFieldRef: null,\n hideText: false,\n extraParams: {},\n btnText: `Start Reading - It's Free`,\n follow: null,\n handleSuccess: null,\n};\n\nexport default NewsletterEmailSignup;\n","// components/SearchBar.tsx\r\nimport React, { useState, useEffect } from 'react';\r\nimport { TextField } from '@mui/material';\r\n\r\ntype SearchBarProps = {\r\n value: string;\r\n onChange: (value: string) => void;\r\n placeholder?: string;\r\n debounceDelay?: number;\r\n};\r\n\r\nconst SearchBar: React.FC<SearchBarProps> = ({\r\n value,\r\n onChange,\r\n placeholder,\r\n debounceDelay = 500, // Default debounce delay of 500ms\r\n}) => {\r\n const [inputValue, setInputValue] = useState(value);\r\n\r\n // Update local input value when the parent value changes\r\n useEffect(() => {\r\n setInputValue(value);\r\n }, [value]);\r\n\r\n // Debounce logic\r\n useEffect(() => {\r\n const handler = setTimeout(() => {\r\n onChange(inputValue);\r\n }, debounceDelay);\r\n\r\n // Cleanup the timeout if inputValue changes before the delay\r\n return () => {\r\n clearTimeout(handler);\r\n };\r\n }, [inputValue, onChange, debounceDelay]);\r\n\r\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n setInputValue(e.target.value);\r\n };\r\n\r\n return (\r\n <TextField\r\n fullWidth\r\n variant=\"outlined\"\r\n value={inputValue}\r\n onChange={handleInputChange}\r\n placeholder={placeholder || 'Search...'}\r\n sx={{ mb: 2 }}\r\n />\r\n );\r\n};\r\n\r\nexport default SearchBar;\r\n","import React from 'react';\n\nimport { Box, alpha, Typography } from '@mui/material';\nimport { Promotion } from '../../../store/promotions/promotionsSlice';\nimport Description from '../../../components/books/Description';\nimport StoreLinks from '../../../components/misc/StoreLinks';\nimport { humanReadableDate, promotionHasExpired } from '../../../utils/dates';\nimport theme, { colors } from '../../../theme/theme';\nimport MuiRouterLink from '../../../components/mui-wrappers/MuiRouterLink';\nimport { parameterize } from '../../../utils/casing';\nimport CategoryLinkChip from '../../../components/misc/CategoryLinkChip';\nimport AuthorLink from '../../../components/misc/AuthorLink';\n\nconst BookIndexSingle = function ({ promotion }: { promotion: Promotion }) {\n const bookData = () => (\n <>\n <Description description={promotion.book.description} />\n <Box sx={{ mt: 2, display: 'flex', alignItems: 'baseline' }}>\n <Typography\n sx={{\n fontSize: '1.5rem',\n fontWeight: 'bold',\n color: theme.palette.secondary.main,\n }}\n >\n {promotion.sale_price === 0 ? 'FREE' : `$${promotion.sale_price}`}\n </Typography>\n <Typography\n sx={{ ml: 1, textDecoration: 'line-through', ...colors.subdued }}\n >\n ${promotion.current_price}\n </Typography>\n </Box>\n {promotion.promotion_date &&\n promotionHasExpired(promotion.promotion_date) && (\n <Typography\n sx={{ mt: 1, fontSize: '0.8rem' }}\n color={alpha(theme.palette.warning.dark, 0.8)}\n >\n This book was promoted {humanReadableDate(promotion.promotion_date)}{' '}\n and may no longer be discounted.\n </Typography>\n )}\n <Box sx={{ mt: 2 }}>\n <StoreLinks\n book={promotion.book}\n promotion={promotion}\n useClickTracking\n useAmznAffiliateUrl\n />\n </Box>\n </>\n );\n\n return (\n <Box\n sx={{ display: 'flex', flexDirection: 'column', mb: { xs: 6, md: 0 } }}\n >\n <Box sx={{ display: 'flex', mb: { xs: 0, md: 6 } }}>\n <Box sx={{ flex: '1 1 250px' }}>\n <MuiRouterLink\n to={`/books/${promotion.book.id}/${parameterize(\n promotion.book.title\n )}`}\n >\n <Box\n component=\"img\"\n src={promotion.book.amazon_image_url}\n alt={promotion.book.title}\n sx={{\n width: '100%',\n height: 'auto',\n boxShadow: '2px 2px 7px rgb(0 0 0 / 10%)',\n }}\n />\n </MuiRouterLink>\n </Box>\n <Box sx={{ flex: '1 1 750px', pl: 2, pb: 1 }}>\n <MuiRouterLink to={`/books/${promotion.book.id}/${parameterize(promotion.book.title)}`}>\n <Typography variant=\"h5\" sx={{ mb: 1, '&:hover': { textDecoration: 'underline' } }}>\n {promotion.book.title}\n </Typography>\n </MuiRouterLink>\n\n <AuthorLink author={promotion.book.author} />\n <Box sx={{ mb: { xs: 0, md: 2 }, mt: 1 }}>\n <CategoryLinkChip category={promotion.category} />\n </Box>\n <Box sx={{ display: { xs: 'none', md: 'block' } }}>{bookData()}</Box>\n </Box>\n </Box>\n <Box sx={{ display: { xs: 'block', md: 'none' } }}>{bookData()}</Box>\n </Box>\n );\n};\nexport default BookIndexSingle;\n","import React, { useState } from 'react';\nimport {\n Box,\n CircularProgress,\n Container,\n Grid,\n Typography,\n} from '@mui/material';\nimport { useParams } from 'react-router-dom';\nimport {\n getAllPromotions,\n Promotion,\n promotionsSlice,\n selectAllPromotions,\n} from '../../../store/promotions/promotionsSlice';\nimport { useAppDispatch, useAppSelector } from '../../../app/hooks';\nimport Pagination from '../../../components/misc/pagination/Pagination';\nimport NewListingPromotion from '../books/BookIndexSingle';\nimport Helmet from '../../../components/meta/Helmet';\nimport { Category, getCategory, selectCategory } from '../../../store/categories/categoriesSlice';\nimport NewsletterBanner from '../../../components/misc/NewsletterBanner';\nimport SearchBar from '../SearchBar';\nimport { parameterize } from '../../../utils/casing';\n\nconst CategoryIndex = function () {\n const id = parseInt(useParams<{ id: string }>().id, 10);\n const dispatch = useAppDispatch();\n const promotions = useAppSelector(selectAllPromotions);\n const category = useAppSelector((state) => selectCategory(state, id)) as Category;\n const [isPromotionsLoading, setIsPromotionsLoading] = useState(true);\n const [isCategoryLoading, setIsCategoryLoading] = useState(true);\n const [totalPages, setTotalPages] = React.useState(1);\n const [page, setPage] = React.useState(1);\n const [searchQuery, setSearchQuery] = useState('');\n\n // we can't be sure that the promotions currently in store have the right associated data, so we clear them out\n React.useEffect(() => {\n dispatch(promotionsSlice.actions.removeAllPromotions())\n }, []);\n \n React.useEffect(() => {\n dispatch(\n getAllPromotions({\n joins: [{ book: { author: 'books' } }, 'category'],\n status: ['Successfully Sent'],\n sort_col: 'promotion_date',\n sort_dir: 'desc',\n resourceType: 'partner',\n page,\n category_id: [id],\n ...(searchQuery ? { query: searchQuery } : {}),\n })\n )\n .then((response: any) => {\n setTotalPages(response.payload.meta.total_pages);\n })\n .finally(() => {\n setIsPromotionsLoading(false);\n });\n return () => setIsPromotionsLoading(false);\n }, [dispatch, page, searchQuery]);\n\n React.useEffect(() => {\n dispatch(getCategory({ id, resourceType: 'partner' }))\n .finally(() => {\n setIsCategoryLoading(false);\n });\n return () => setIsCategoryLoading(false);\n }, [dispatch, page]);\n\n const filteredPromotions = () => (\n promotions\n .filter((promotion) => id === promotion.category.id)\n .sort(\n (firstP: Promotion, secondP: Promotion) =>\n new Date(secondP.promotion_date || 0).getTime() -\n new Date(firstP.promotion_date || 0).getTime()\n )\n )\n\n const content = () => {\n if (isPromotionsLoading || isCategoryLoading) { return (\n <Box sx={{ display: 'flex', justifyContent: 'center', alignItems: 'center', mt: 10 }}>\n <CircularProgress size=\"2rem\" />\n </Box>\n ) }\n\n return (\n <>\n <Helmet\n metaContent={{\n title: `Free and Discounted ${category.name} eBooks`,\n url: `https://bookraid.com/categories/${id}/${parameterize(category.name)}`,\n description: `Find free and discounted ${category.name} eBooks, updated daily.`,\n }}\n />\n <Typography variant=\"h4\" component=\"h1\" sx={{ mt: 4, mb: 2 }}>Free and Discounted {category.name} eBooks</Typography>\n\n <Box sx={{ mb: 1 }}>\n <SearchBar\n value={searchQuery}\n onChange={(e) => setSearchQuery(e)}\n placeholder={`Search ${category.name} eBooks`}\n debounceDelay={500} // Debounce delay of 300ms\n />\n </Box>\n\n {filteredPromotions().length > 0 && (\n <>\n {filteredPromotions().map((promotion) => <NewListingPromotion key={promotion.id} promotion={promotion} /> )}\n <Pagination totalPages={totalPages} page={page} setPage={setPage} sx={{ justifyContent: 'center', mt: 4 }} />\n </>\n )}\n </>\n )\n }\n\n return (\n <Box>\n <NewsletterBanner />\n <Container component=\"main\" maxWidth=\"lg\">\n <Grid container>\n <Grid item xs={12}>\n {content()}\n </Grid>\n </Grid>\n </Container>\n </Box>\n );\n};\nexport default CategoryIndex;\n","import { camelize } from '../../utils/casing';\n\nexport interface Store {\n title: string;\n snakeCase: string;\n camelCase: string;\n urlProperty: string;\n clickTrackingUrlPrefix: string;\n}\n\nconst storeTitles = [\n 'Amazon',\n 'iBooks',\n 'Kobo',\n 'Google Play',\n 'Barnes and Noble',\n];\n\n/**\n * Returns an array with objects holding various name casings:\n * [{\n * title: 'Barnes and Noble',\n * snakeCase: 'barnes_and_noble',\n * camelCase: 'barnes-and-noble',\n * },\n * {\n * title: 'Amazon',\n * snakeCase: 'amazon',\n * camelCase: 'amazon',\n * },\n * ...\n * ]\n */\nconst storesList: Array<Store> = storeTitles.map((storeTitle) => ({\n title: storeTitle,\n snakeCase: storeTitle.toLowerCase().replace(/\\s/g, '_'),\n camelCase: camelize(storeTitle),\n urlProperty: `${storeTitle.toLowerCase().replace(/\\s/g, '_')}_url`,\n clickTrackingUrlPrefix: `${storeTitle.toLowerCase().replace(/\\s/g, '_')}`,\n}));\n\nexport default storesList;\n","/**\n * Turns some \"Non Slug Case String\" to a \"slug-case-string\"\n *\n * Strips html entities out completely in the first `replace`.\n */\nexport const slugCase = function (token: string): string {\n return trimNonWhitespaceCharacters(token)\n .replace(/&[^;]*;/g, '')\n .replace(/&/g, '')\n .replace(/\\s+/g, '-')\n .toLowerCase();\n};\n\n// convert to camelCase\nexport const camelize = function (str: string) {\n const moddedStr = trimNonWhitespaceCharacters(str)\n .replace(/-/g, ' ')\n .toLowerCase();\n return moddedStr\n .replace(/(?:^\\w|[A-Z]|\\b\\w)/g, (word, index) =>\n index === 0 ? word.toLowerCase() : word.toUpperCase()\n )\n .replace(/\\s+/g, '');\n};\n\n/**\n * Turns some \"Non Slug Case String\" to a \"snake_case_string\"\n */\nexport const snakeCase = function (token: string): string {\n return trimNonWhitespaceCharacters(token)\n .replace(/\\s/g, '_')\n .replace(/-/g, '_')\n .toLowerCase();\n};\n\n/**\n * Remove some junk characters to reduce everything to letters only\n * @param textToTrim\n * @returns\n */\nconst trimNonWhitespaceCharacters = function (textToTrim: string): string {\n return textToTrim\n .trim()\n .replace(/'/g, '')\n .replace(/,/g, '')\n .replace(/_/g, ' ');\n};\n\nexport const parameterize = function (text: string): string {\n return text\n .toLowerCase()\n .trim()\n .replace(/ /g, '-')\n .replace(/[^\\w-]+/g, '');\n};\n","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\"\n}), 'Person');","import { generateUtilityClass, generateUtilityClasses } from '@mui/base';\nexport function getAvatarUtilityClass(slot) {\n return generateUtilityClass('MuiAvatar', slot);\n}\nconst avatarClasses = generateUtilityClasses('MuiAvatar', ['root', 'colorDefault', 'circular', 'rounded', 'square', 'img', 'fallback']);\nexport default avatarClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"alt\", \"children\", \"className\", \"component\", \"imgProps\", \"sizes\", \"src\", \"srcSet\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport Person from '../internal/svg-icons/Person';\nimport { getAvatarUtilityClass } from './avatarClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant,\n colorDefault\n } = ownerState;\n const slots = {\n root: ['root', variant, colorDefault && 'colorDefault'],\n img: ['img'],\n fallback: ['fallback']\n };\n return composeClasses(slots, getAvatarUtilityClass, classes);\n};\n\nconst AvatarRoot = styled('div', {\n name: 'MuiAvatar',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], ownerState.colorDefault && styles.colorDefault];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flexShrink: 0,\n width: 40,\n height: 40,\n fontFamily: theme.typography.fontFamily,\n fontSize: theme.typography.pxToRem(20),\n lineHeight: 1,\n borderRadius: '50%',\n overflow: 'hidden',\n userSelect: 'none'\n}, ownerState.variant === 'rounded' && {\n borderRadius: theme.shape.borderRadius\n}, ownerState.variant === 'square' && {\n borderRadius: 0\n}, ownerState.colorDefault && {\n color: theme.palette.background.default,\n backgroundColor: theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]\n}));\nconst AvatarImg = styled('img', {\n name: 'MuiAvatar',\n slot: 'Img',\n overridesResolver: (props, styles) => styles.img\n})({\n width: '100%',\n height: '100%',\n textAlign: 'center',\n // Handle non-square image. The property isn't supported by IE11.\n objectFit: 'cover',\n // Hide alt text.\n color: 'transparent',\n // Hide the image broken icon, only works on Chrome.\n textIndent: 10000\n});\nconst AvatarFallback = styled(Person, {\n name: 'MuiAvatar',\n slot: 'Fallback',\n overridesResolver: (props, styles) => styles.fallback\n})({\n width: '75%',\n height: '75%'\n});\n\nfunction useLoaded({\n crossOrigin,\n referrerPolicy,\n src,\n srcSet\n}) {\n const [loaded, setLoaded] = React.useState(false);\n React.useEffect(() => {\n if (!src && !srcSet) {\n return undefined;\n }\n\n setLoaded(false);\n let active = true;\n const image = new Image();\n\n image.onload = () => {\n if (!active) {\n return;\n }\n\n setLoaded('loaded');\n };\n\n image.onerror = () => {\n if (!active) {\n return;\n }\n\n setLoaded('error');\n };\n\n image.crossOrigin = crossOrigin;\n image.referrerPolicy = referrerPolicy;\n image.src = src;\n\n if (srcSet) {\n image.srcset = srcSet;\n }\n\n return () => {\n active = false;\n };\n }, [crossOrigin, referrerPolicy, src, srcSet]);\n return loaded;\n}\n\nconst Avatar = /*#__PURE__*/React.forwardRef(function Avatar(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiAvatar'\n });\n\n const {\n alt,\n children: childrenProp,\n className,\n component = 'div',\n imgProps,\n sizes,\n src,\n srcSet,\n variant = 'circular'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n let children = null; // Use a hook instead of onError on the img element to support server-side rendering.\n\n const loaded = useLoaded(_extends({}, imgProps, {\n src,\n srcSet\n }));\n const hasImg = src || srcSet;\n const hasImgNotFailing = hasImg && loaded !== 'error';\n\n const ownerState = _extends({}, props, {\n colorDefault: !hasImgNotFailing,\n component,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n\n if (hasImgNotFailing) {\n children = /*#__PURE__*/_jsx(AvatarImg, _extends({\n alt: alt,\n src: src,\n srcSet: srcSet,\n sizes: sizes,\n ownerState: ownerState,\n className: classes.img\n }, imgProps));\n } else if (childrenProp != null) {\n children = childrenProp;\n } else if (hasImg && alt) {\n children = alt[0];\n } else {\n children = /*#__PURE__*/_jsx(AvatarFallback, {\n className: classes.fallback\n });\n }\n\n return /*#__PURE__*/_jsx(AvatarRoot, _extends({\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref\n }, other, {\n children: children\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Avatar.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Used in combination with `src` or `srcSet` to\n * provide an alt attribute for the rendered `img` element.\n */\n alt: PropTypes.string,\n\n /**\n * Used to render icon or text elements inside the Avatar if `src` is not set.\n * This can be an element, or just a string.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attributes) applied to the `img` element if the component is used to display an image.\n * It can be used to listen for the loading error event.\n */\n imgProps: PropTypes.object,\n\n /**\n * The `sizes` attribute for the `img` element.\n */\n sizes: PropTypes.string,\n\n /**\n * The `src` attribute for the `img` element.\n */\n src: PropTypes.string,\n\n /**\n * The `srcSet` attribute for the `img` element.\n * Use this attribute for responsive image display.\n */\n srcSet: PropTypes.string,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n\n /**\n * The shape of the avatar.\n * @default 'circular'\n */\n variant: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['circular', 'rounded', 'square']), PropTypes.string])\n} : void 0;\nexport default Avatar;"],"names":["description","style","whiteSpace","color","Helmet","metaContent","schema","title","url","ogImage","currentOgImage","height","property","content","rel","href","type","JSON","stringify","map","sch","defaultProps","author","sx","textDecoration","display","alignItems","to","id","parameterize","name","width","mr","src","avatar_mini_url","alt","category","borderRadius","borderColor","darken","colors","camelize","backgroundColor","lighten","clickable","label","variant","component","Link","justifyContent","p","xs","md","xl","container","spacing","maxWidth","item","sm","flexDirection","mb","fontWeight","px","pb","pt","hideText","StyledLink","styled","store","paddingRight","lineHeight","StoreLinks","book","promotion","useClickTracking","useAmznAffiliateUrl","Error","wordBreak","stores","urlProperty","clickTrackingUrlPrefix","toString","target","camelCase","Pagination","totalPages","page","setPage","count","onChange","event","pageNumber","NewsletterEmailSignup","signupEmailFieldRef","extraParams","btnText","follow","handleSuccess","React","email","setEmail","creating","setCreating","dispatch","useAppDispatch","preventDefault","createReader","unwrap","then","e","FacebookPixel","RedditPixel","ReactGA","action","ReactPinterestTag","value","order_quantity","currency","line_items","product_name","product_id","product_price","product_quantity","send_to","process","skip_categories","addSnack","message","pushUrl","uuid","push","finally","catch","margin","align","onSubmit","ref","required","fullWidth","loading","placeholder","debounceDelay","useState","inputValue","setInputValue","useEffect","handler","setTimeout","clearTimeout","bookData","mt","fontSize","theme","sale_price","ml","current_price","promotion_date","promotionHasExpired","alpha","humanReadableDate","flex","amazon_image_url","boxShadow","pl","parseInt","useParams","promotions","useAppSelector","selectAllPromotions","state","selectCategory","isPromotionsLoading","setIsPromotionsLoading","isCategoryLoading","setIsCategoryLoading","setTotalPages","searchQuery","setSearchQuery","promotionsSlice","getAllPromotions","joins","status","sort_col","sort_dir","resourceType","category_id","query","response","payload","meta","total_pages","getCategory","filteredPromotions","filter","sort","firstP","secondP","Date","getTime","size","length","storesList","storeTitle","snakeCase","toLowerCase","replace","slugCase","token","trimNonWhitespaceCharacters","str","word","index","toUpperCase","textToTrim","trim","text","createSvgIcon","_jsx","d","getAvatarUtilityClass","slot","generateUtilityClass","generateUtilityClasses","_excluded","AvatarRoot","overridesResolver","props","styles","ownerState","root","colorDefault","_extends","position","flexShrink","fontFamily","typography","pxToRem","overflow","userSelect","shape","palette","background","default","mode","grey","AvatarImg","img","textAlign","objectFit","textIndent","AvatarFallback","Person","fallback","inProps","useThemeProps","childrenProp","children","className","imgProps","sizes","srcSet","other","_objectWithoutPropertiesLoose","loaded","crossOrigin","referrerPolicy","setLoaded","active","image","Image","onload","onerror","srcset","useLoaded","hasImg","hasImgNotFailing","classes","slots","composeClasses","useUtilityClasses","as","clsx"],"sourceRoot":""}