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AA,EAAAA,GAAeJ,EAA6B,aAAc,qBAE/DW,EAAAA,EAAAA,GAACnB,EAAgB,SAIjC,C","sources":["helpers/lazyloading.ts","components/styleObjects/ArticleCard.ts","components/WhitePapers/WhitePapersCards.tsx","pages/public/WhitePapersHome.tsx"],"sourcesContent":["export function getLazyLoadByIndex(index: number, noLazyLoadCount = 2): boolean {\n    return !(index <= noLazyLoadCount - 1);\n}\n","import { v2Colors } from '@web-for-marketing/react-ui';\n\nexport const ArticleCardStyle = {\n    cardLinkContainer: {\n        zIndex: 1,\n        display: 'block',\n        width: '100%',\n        height: '100%',\n        boxShadow: 'none',\n        overflow: 'hidden',\n        position: 'relative',\n        transition: 'transform ease 750ms, box-shadow ease 500ms',\n        border: '1px solid #DFE3EA',\n        borderRadius: '10px',\n        '&::after': {\n            content: '\"\"',\n            visibility: 'hidden',\n            position: 'absolute',\n            display: 'block',\n            opacity: '0',\n            height: '100%',\n            width: '100%',\n            top: 0,\n            left: 0,\n            zIndex: 1000,\n            transition: 'visibility ease 400ms, opacity 400ms ease',\n            background:\n                'linear-gradient(0deg,rgba(1, 23, 41, 0) 0%, rgba(1, 23, 41, 0) 25%, rgba(1, 23, 41, 0.1) 50%, rgba(1, 23, 41, 0.3) 100%)',\n        },\n        '&:focus::after': {\n            visibility: 'visible',\n            opacity: '1',\n            boxShadow: '0 0 6px rgba(108,127,148,0.1), 0 10px 10px rgba(108,127,148,0.1)',\n        },\n        '&:active::after': {\n            visibility: 'hidden',\n            transform: 'translateY(0)',\n            opacity: '0',\n        },\n        '&:hover': {\n            transform: 'translateY(-1rem)',\n            boxShadow: '0 0 6px rgba(108,127,148,0.1), 0 10px 10px rgba(108,127,148,0.1)',\n        },\n        '&:focus': {\n            borderColor: v2Colors.core.innovation,\n            outlineColor: v2Colors.core.innovation,\n            transform: 'translateY(-1rem)',\n            boxShadow: '0 0 6px rgba(108,127,148,0.1), 0 10px 10px rgba(108,127,148,0.1)',\n        },\n    },\n    card: {\n        height: '100%',\n        position: 'relative',\n        boxShadow: 'none',\n    },\n    viewIcon: {\n        width: '1em',\n        height: '1em',\n        marginRight: '1rem',\n    },\n    media: {\n        borderRadius: '10px 10px 0 0',\n        objectFit: 'cover',\n        maxHeight: '26rem',\n        width: '100%',\n    },\n    cardTitle: {\n        fontSize: '2rem',\n        fontWeight: 500,\n    },\n    cardContent: {\n        padding: '3rem 3rem 7rem !important',\n        transition: 'transform 200ms ease',\n    },\n    link: {\n        cursor: 'pointer',\n        display: 'flex',\n        alignItems: 'center',\n        position: 'absolute',\n        fontWeight: 500,\n        bottom: '3rem',\n        left: '3rem',\n    },\n    pagination: {\n        width: '100%',\n        marginTop: '2rem',\n    },\n    largeCardImage: {\n        maxHeight: '43rem',\n    },\n} as const;\n","import React from 'react';\nimport { Grid2, Stack } from '@mui/material';\nimport { useAtom } from 'jotai';\nimport { isMobileAtom, selectedLanguageAtom } from '@atoms/appSettings';\nimport { useTranslation } from '@stateManagement/TranslationContext';\nimport { ArticleCardStyle as classes } from '../styleObjects/ArticleCard';\nimport { languageRouteTypes } from '@helpers/languageRoutes';\nimport { getLanguageRouteAndPrefixByCodeAndRouteKey } from '@helpers/languages';\nimport { Card } from '../Cards/Card';\nimport { cardTypes } from '../../helpers/ObjectTypeModels/Card';\nimport { getTranslation } from '@helpers/languageTranslations';\nimport { getLazyLoadByIndex } from '@helpers/lazyloading';\nimport { useStaticValues } from '@stateManagement/StaticValuesContext';\nimport { Pagination, PaginationItem } from '@web-for-marketing/react-ui';\n\nexport function WhitePapersCards(): JSX.Element | null {\n    const [isMobile] = useAtom(isMobileAtom);\n    const [selectedLanguage] = useAtom(selectedLanguageAtom);\n    const { whitePaper } = useStaticValues();\n    const { selectedLanguageTranslation } = useTranslation();\n    const notLazyLoadedAmount = isMobile ? 2 : 6;\n    const viewLinkText = getTranslation(selectedLanguageTranslation, 'articleCard', 'viewLink');\n\n    return whitePaper.homePageData?.pagedAllWhitePapers && whitePaper.homePageData.pagedAllWhitePapers.pageRecords ? (\n        <>\n            <Grid2\n                container\n                alignItems='stretch'\n                rowSpacing={'4rem'}\n                columnSpacing={'4%'}\n                data-testid='cards-container'\n            >\n                {whitePaper.homePageData.pagedAllWhitePapers.pageRecords.map((whitePaper, index) => {\n                    const cardContent = {\n                        title: whitePaper.title,\n                        image: {\n                            imagePath: whitePaper.cardImageUrl,\n                            mobilePath: whitePaper.mobileCardImageUrl,\n                            imageAlt: whitePaper.cardImageAlt,\n                            lazyLoad: getLazyLoadByIndex(index, notLazyLoadedAmount),\n                        },\n                        linkText: viewLinkText,\n                        ariaLabel: `${whitePaper.title}. ${viewLinkText}`,\n                    };\n\n                    return (\n                        <Grid2 size={{ xs: 12, md: 6, lg: 4 }} key={whitePaper.slug}>\n                            <Card\n                                card={{\n                                    ...cardTypes.EXTRA_FEATURE_CARD,\n                                    content: cardContent,\n                                }}\n                                href={`${getLanguageRouteAndPrefixByCodeAndRouteKey(\n                                    selectedLanguage,\n                                    languageRouteTypes.WHITE_PAPER\n                                )}${whitePaper.slug}`}\n                                data-testid={`whitePaperCard${index}`}\n                            />\n                        </Grid2>\n                    );\n                })}\n            </Grid2>\n            {whitePaper.homePageData.pagedAllWhitePapers.totalRecordCount >\n            whitePaper.homePageData.pagedAllWhitePapers.maxRecordsPerPage ? (\n                    <Stack alignItems='center' css={classes.pagination}>\n                        <Pagination\n                            currentPage={whitePaper.homePageData.pagedAllWhitePapers.currentPage}\n                            totalRecordCount={whitePaper.homePageData.pagedAllWhitePapers.totalRecordCount}\n                            maxRecordsPerPage={whitePaper.homePageData.pagedAllWhitePapers.maxRecordsPerPage}\n                            renderItem={(item) => (\n                            // eslint-disable-next-line jsx-a11y/anchor-has-content\n                                <PaginationItem\n                                    component='a'\n                                    href={`${getLanguageRouteAndPrefixByCodeAndRouteKey(\n                                        selectedLanguage,\n                                        languageRouteTypes.WHITE_PAPERS_HOME\n                                    )}${item.page}/`}\n                                    {...item}\n                                />\n                            )}\n                        />\n                    </Stack>\n                ) : null}\n        </>\n    ) : null;\n}\n","import React from 'react';\nimport { CallToActionBanner } from '@components/SectionComponents';\nimport { WhitePapersCards } from '@components/WhitePapers/WhitePapersCards';\nimport { PageHelmet } from '@components/PageHelmet';\nimport { useStaticValues } from '@stateManagement/StaticValuesContext';\nimport { useTranslation } from '@stateManagement/TranslationContext';\nimport { getTranslation } from '@helpers/languageTranslations';\nimport { Heading, containerWidth } from '@web-for-marketing/react-ui';\nimport HeroImage from '@images/WhitePapers/white-paper-landing-page-hero-image@2x.jpg';\nimport { SectionContainer } from '@components/SectionComponents/SectionContainer';\n\nexport default function WhitePapersHome(): JSX.Element {\n    const { whitePaper } = useStaticValues();\n    const { selectedLanguageTranslation } = useTranslation();\n    const whitePapersHomeTranslation = getTranslation(selectedLanguageTranslation, 'whitePapersHome');\n\n    const seo = {\n        title: `${whitePapersHomeTranslation.seo.title} | Geotab`,\n        description: whitePapersHomeTranslation.seo.description,\n    };\n\n    const seoTitle = (): string => {\n        if (\n            whitePaper.homePageData?.pagedAllWhitePapers &&\n            whitePaper.homePageData.pagedAllWhitePapers.totalRecordCount >\n                whitePaper.homePageData.pagedAllWhitePapers.maxRecordsPerPage\n        ) {\n            return `${whitePapersHomeTranslation.seo.title} ${whitePapersHomeTranslation.page} ${whitePaper.homePageData?.pagedAllWhitePapers.currentPage} | Geotab`;\n        } else {\n            return seo.title;\n        }\n    };\n\n    return (\n        <div>\n            <PageHelmet seo={{ ...seo, title: seoTitle() }} />\n            <CallToActionBanner\n                headerBanner={true}\n                imagePath={HeroImage}\n                title={whitePapersHomeTranslation.title}\n                align='flex-start'\n                customProps={{\n                    customGradient:\n                        'linear-gradient(90deg, rgb(1, 23, 41, 0) 0%, rgba(1, 23, 41, 0.4) 54%, rgba(1, 23, 41, 0.5) 100%),',\n                }}\n            />\n            <SectionContainer maxWidth={containerWidth.lg}>\n                <Heading variant='h2' color='primary' css={{ marginBottom: '4rem' }}>\n                    {getTranslation(selectedLanguageTranslation, 'whitePaper', 'allWhitePapers')}\n                </Heading>\n                <WhitePapersCards />\n            </SectionContainer>\n        </div>\n    );\n}\n"],"names":["getLazyLoadByIndex","index","noLazyLoadCount","ArticleCardStyle","cardLinkContainer","zIndex","display","width","height","boxShadow","overflow","position","transition","border","borderRadius","content","visibility","opacity","top","left","background","transform","borderColor","v2Colors","core","innovation","outlineColor","card","viewIcon","marginRight","media","objectFit","maxHeight","cardTitle","fontSize","fontWeight","cardContent","padding","link","cursor","alignItems","bottom","pagination","marginTop","largeCardImage","WhitePapersCards","isMobile","useAtom","isMobileAtom","selectedLanguage","selectedLanguageAtom","whitePaper","useStaticValues","selectedLanguageTranslation","useTranslation","notLazyLoadedAmount","viewLinkText","getTranslation","homePageData","pagedAllWhitePapers","pageRecords","_jsxs","_Fragment","children","_jsx","Grid2","container","rowSpacing","columnSpacing","map","title","image","imagePath","cardImageUrl","mobilePath","mobileCardImageUrl","imageAlt","cardImageAlt","lazyLoad","linkText","ariaLabel","size","xs","md","lg","Card","cardTypes","EXTRA_FEATURE_CARD","href","getLanguageRouteAndPrefixByCodeAndRouteKey","languageRouteTypes","WHITE_PAPER","slug","totalRecordCount","maxRecordsPerPage","Stack","css","classes","Pagination","currentPage","renderItem","item","PaginationItem","component","WHITE_PAPERS_HOME","page","_ref","name","styles","WhitePapersHome","whitePapersHomeTranslation","seo","description","PageHelmet","CallToActionBanner","headerBanner","HeroImage","align","customProps","customGradient","SectionContainer","maxWidth","containerWidth","Heading","variant","color"],"sourceRoot":""}