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CAAS,kCAKzBM,EAAWN,EAAAA,QAAAA,GAAAA,WAAS,kFAATA,CAAS,mHAIbO,EAAAA,GAGPC,EAAYR,EAAAA,QAAAA,EAAAA,WAAQ,mFAARA,CAAQ,iGASpBS,EAAaT,EAAAA,QAAAA,IAAAA,WAAU,oFAAVA,CAAU,+EAOvBU,EAAkBV,EAAAA,QAAAA,GAAAA,WAAS,yFAATA,CAAS,sIAY3BW,GAAcX,EAAAA,EAAAA,SAAOY,EAAAA,GAAI,iGAAXZ,CAAW,MAEzBa,EAAYb,EAAAA,QAAAA,KAAAA,WAAW,oFAAXA,CAAW,yG","sources":["webpack://bluewave-energy/./src/dynamicComponents/contentListWithRightData/contentListWithRightData.js","webpack://bluewave-energy/./src/dynamicComponents/contentListWithRightData/contentListWithRightDataStyle.js"],"sourcesContent":["import React from 'react';\nimport { documentToReactComponents } from '@contentful/rich-text-react-renderer';\nimport { BLOCKS, INLINES } from '@contentful/rich-text-types';\nimport { sectionList } from '../../constants/queryFragments';\nimport loadable from '@loadable/component';\nimport * as Styled from './contentListWithRightDataStyle';\nimport isExternalUrl, {\n addTrailingSlash,\n isExternalUrlhref,\n} from '../../utils';\nimport { useContentfulImages } from '../../hooks/useContentfulImages';\nimport { useEffect } from 'react';\n\nconst ContentListWithRightData = ({ sectionData, location }) => {\n useEffect(async () => {\n if (sectionData?.elementId === location?.hash?.replace('#', '')) {\n const waitedID = await new Promise((resolve) => {\n document?.getElementById(sectionData?.elementId) && resolve(true);\n });\n if (waitedID) {\n setTimeout(() => {\n window.location.href = `#${sectionData?.elementId}`;\n }, 500);\n }\n }\n }, [sectionData?.elementId]);\n const optionsMainStyle = {\n renderNode: {\n [BLOCKS.HEADING_2]: (node, children) => (\n {children}\n ),\n [BLOCKS.HEADING_3]: (node, children) => (\n {children}\n ),\n [BLOCKS.PARAGRAPH]: (node, children) => (\n {children}\n ),\n [BLOCKS.UL_LIST]: (node, children) => (\n {children}\n ),\n [BLOCKS.LIST_ITEM]: (node, children) => (\n {children}\n ),\n [INLINES.HYPERLINK]: (node, children) => (\n \n {children}\n \n ),\n [BLOCKS.EMBEDDED_ASSET]: (node) => {\n const asset = useContentfulImages(node?.data?.target?.sys?.id);\n return asset?.node?.file?.url?.includes('image') ? (\n \n ) : (\n <>\n );\n },\n [BLOCKS.HR]: () => ,\n },\n renderText: (text) =>\n text?.split('\\n')?.flatMap((text, i) => [i > 0 &&
, text]),\n };\n return (\n \n {sectionData?.elementId?.trim() && (\n \n )}\n {sectionData?.header?.trim() && (\n {sectionData?.header}\n )}\n {sectionData?.subtext?.trim() && (\n {sectionData?.subtext}\n )}\n {sectionData?.listDetails &&\n documentToReactComponents(\n JSON.parse(sectionData?.listDetails?.raw),\n optionsMainStyle\n )}\n {sectionData && (\n
\n {sectionData?.list &&\n sectionData?.list?.map((section, index) => {\n if (section?.type && sectionList?.includes(section?.type)) {\n const SectionComponent = loadable(() =>\n import(\n `../../dynamicComponents/${section?.type}/${section?.type}`\n )\n );\n return ;\n }\n })}\n
\n )}\n
\n );\n};\nexport default ContentListWithRightData;\n","import styled from 'styled-components';\nimport LinkArrowImage from '../../images/arrow-blue.png';\nimport { Col } from 'react-bootstrap';\n\nexport const MainDiv = styled.div`\n color: #666;\n font-family: 'Figtree-Regular', arial, sans-serif;\n font-size: 15px;\n line-height: 24px;\n letter-spacing: 0.02em;\n @media (max-width: 767px) {\n font-size: 15px;\n line-height: 22px;\n }\n`;\nexport const HeaderH1 = styled.h1`\n margin: 0 0 35px 0;\n padding: 0;\n font-family: 'Figtree-Light', arial, sans-serif;\n font-weight: normal !important;\n color: #00457c;\n font-size: 45px;\n line-height: 50px;\n letter-spacing: 0.02em;\n @media (max-width: 767px) {\n font-size: 35px;\n line-height: 40px;\n }\n`;\nexport const HeaderH2 = styled.h2`\n margin: 0 0 35px 0;\n padding: 0;\n font-family: 'Figtree-Light', arial, sans-serif;\n font-weight: normal !important;\n color: #037ec4;\n font-size: 32px;\n line-height: 38px;\n letter-spacing: 0.02em;\n @media (max-width: 767px) {\n font-size: 25px;\n line-height: 30px;\n margin-bottom: 20px;\n }\n`;\n\nexport const ParaText = styled.p`\n margin: 0 0 30px 0;\n padding: 0;\n i {\n font-size: 19px;\n line-height: 28px;\n color: #666;\n font-family: 'Figtree-Regular', arial, sans-serif;\n letter-spacing: 0.02em;\n font-style: normal !important;\n @media (max-width: 767px) {\n font-size: 18px;\n line-height: 25px;\n }\n }\n`;\n\nexport const HeaderH3 = styled.h3`\n margin: 0 0 35px 0;\n padding: 0;\n font-family: 'Figtree-Light', arial, sans-serif;\n font-weight: normal !important;\n color: #48b4f1;\n font-size: 26px;\n line-height: 35px;\n letter-spacing: 0.02em;\n @media (max-width: 767px) {\n font-size: 18px;\n line-height: 23px;\n margin-bottom: 20px;\n }\n`;\n\nexport const UnorderedList = styled.ul`\n margin: 0 0 30px 0;\n padding: 0;\n`;\n\nexport const ListItem = styled.li`\n margin: 0;\n padding: 4px 0 4px 25px;\n list-style: none;\n background: url(${LinkArrowImage}) no-repeat 0 10px;\n background-size: 7px auto;\n`;\nexport const LinkStyle = styled.a`\n text-decoration: none;\n color: #9fb577;\n :hover {\n text-decoration: none;\n color: #037ec4;\n outline: none;\n }\n`;\nexport const ImageStyle = styled.img`\n height: auto !important;\n width: auto !important;\n border: 0;\n vertical-align: top;\n`;\n\nexport const HorizontalBreak = styled.hr`\n height: 1px;\n border: none;\n background: #e5e5e5;\n margin: 50px 0;\n clear: both;\n opacity: 1 !important;\n @media (max-width: 767px) {\n margin: 30px 0;\n }\n`;\n\nexport const ColumnStyle = styled(Col)``;\n\nexport const SpanStyle = styled.span`\n position: absolute;\n top: 460px;\n @media (max-width: 991px) {\n top: -60px;\n }\n @media (max-width: 767px) {\n top: -45px;\n }\n`;\n"],"names":["ContentListWithRightData","sectionData","location","useEffect","elementId","hash","replace","Promise","resolve","document","getElementById","setTimeout","window","href","optionsMainStyle","renderNode","BLOCKS","node","children","INLINES","isExternalUrlhref","data","uri","addTrailingSlash","process","target","isExternalUrl","asset","useContentfulImages","sys","id","file","url","includes","src","alt","title","renderText","text","split","flatMap","i","key","trim","header","subtext","listDetails","documentToReactComponents","JSON","parse","raw","list","map","section","index","type","sectionList","SectionComponent","loadable","MainDiv","styled","HeaderH1","HeaderH2","ParaText","HeaderH3","UnorderedList","ListItem","LinkArrowImage","LinkStyle","ImageStyle","HorizontalBreak","ColumnStyle","Col","SpanStyle"],"sourceRoot":""}