{"version":3,"file":"components-slpImageWithTitle-slpImageWithTitle-0384bfac4832b4c67d1b.js","mappings":"gNAyCA,UAnC0B,SAAC,GAAqB,IAAD,IAAlBA,EAAkB,EAAlBA,YACrBC,EAAmB,CACvBC,YAAU,OACPC,EAAAA,OAAAA,WAAmB,SAACC,EAAMC,GAAP,OAClB,gBAAC,WAAD,KAAkBA,IAFZ,EAIPF,EAAAA,OAAAA,gBAAwB,SAACC,GACxB,IAAME,GAAQC,EAAAA,EAAAA,GAAoBH,EAAKI,KAAKC,OAAOC,IAAIC,IACvD,OAAOL,EAAMF,KAAKQ,KAAKC,IAAIC,SAAS,SAClC,gBAAC,aAAD,CAAmBC,IAAKT,EAAMF,KAAKQ,KAAKC,IAAKG,IAAKV,EAAMF,KAAKa,QAE7D,kCATI,GAaVC,WAAY,SAACC,GAAD,OACVA,EAAKC,MAAM,MAAMC,SAAQ,SAACF,EAAMG,GAAP,MAAa,CAACA,EAAI,GAAK,sBAAIC,IAAKD,IAAOH,QAEpE,OACE,gBAAC,iBAAD,KACE,gBAAC,aAAD,KACE,gBAAC,aAAD,CACEJ,IAAKf,EAAYwB,MAAMZ,KAAKC,IAC5BG,IAAKhB,EAAYiB,SAElBjB,MAAAA,OAAA,EAAAA,EAAayB,YACZC,EAAAA,EAAAA,GACEC,KAAKC,MAAM5B,MAAAA,GAAX,UAAWA,EAAayB,gBAAxB,aAAW,EAAuBI,KAClC5B,O,uLClCZ,EAAe,IAA0B,iDCG5B6B,EAAiBC,EAAAA,QAAAA,IAAAA,WAAH,mFAAGA,CAAH,sHACFC,GAQZC,EAAaF,EAAAA,QAAAA,IAAAA,WAAH,+EAAGA,CAAH,kLAcVG,EAAWH,EAAAA,QAAAA,GAAAA,WAAH,6EAAGA,CAAH,0ZAyBRI,EAAaJ,EAAAA,QAAAA,IAAAA,WAAH,+EAAGA,CAAH","sources":["webpack://commercial-ultramar/./src/components/slpImageWithTitle/slpImageWithTitle.js","webpack://commercial-ultramar/./src/images/bg.jpg","webpack://commercial-ultramar/./src/components/slpImageWithTitle/slpImageWithTitleStyles.js"],"sourcesContent":["import React from 'react';\nimport * as Styled from './slpImageWithTitleStyles';\nimport { BLOCKS } from '@contentful/rich-text-types';\nimport { documentToReactComponents } from '@contentful/rich-text-react-renderer';\nimport useContentfulAssets from '../../hooks/useContentfulAssets';\n\nconst SlpTitleContainer = ({ sectionData }) => {\n const optionsMainStyle = {\n renderNode: {\n [BLOCKS.HEADING_2]: (node, children) => (\n {children}\n ),\n [BLOCKS.EMBEDDED_ASSET]: (node) => {\n const asset = useContentfulAssets(node.data.target.sys.id);\n return asset.node.file.url.includes('image') ? (\n \n ) : (\n <>\n );\n },\n },\n renderText: (text) =>\n text.split('\\n').flatMap((text, i) => [i > 0 &&
, text]),\n };\n return (\n \n \n \n {sectionData?.richText &&\n documentToReactComponents(\n JSON.parse(sectionData?.richText?.raw),\n optionsMainStyle\n )}\n \n \n );\n};\n\nexport default SlpTitleContainer;\n","export default __webpack_public_path__ + \"static/bg-b114d3b229dd0a2c4d7377cf521f852c.jpg\";","import styled from 'styled-components';\nimport Background from '../../images/bg.jpg';\n\nexport const TitleContainer = styled.div`\n background: #fff url(${Background}) repeat-x top center;\n height: 670px;\n @media (max-width: 870px) {\n height: auto;\n padding-top: 20px;\n }\n`;\n\nexport const TitleStyle = styled.div`\n width: 800px;\n height: auto;\n margin: 0 auto;\n padding: 0px 0px 0px 0px;\n text-align: center;\n @media (max-width: 870px) {\n width: 100%;\n height: auto;\n padding: 0 35px 35px 35px;\n text-align: center;\n }\n`;\n\nexport const HeaderH2 = styled.h2`\n margin-bottom: 30px !important;\n margin-top: 40px !important;\n color: #fff;\n margin: 0 0 15px 0;\n padding: 0;\n font-family: 'MrAlex', arial, sans-serif;\n font-weight: normal !important;\n font-size: 25px;\n line-height: 35px;\n text-align: center;\n code {\n color: #ffca05;\n font-family: 'MrAlex', arial, sans-serif;\n font-weight: normal !important;\n font-size: 25px;\n line-height: 35px;\n }\n @media (max-width: 870px) {\n font-size: 23px;\n margin-top: 0;\n margin-bottom: 0;\n }\n`;\n\nexport const ImageStyle = styled.img`\n border: 0;\n vertical-align: top;\n width: 500px;\n height: auto;\n @media (max-width: 870px) {\n max-width: 100%;\n width: 300px;\n height: auto;\n margin-top: 0px;\n margin-bottom: 30px;\n }\n`;\n"],"names":["sectionData","optionsMainStyle","renderNode","BLOCKS","node","children","asset","useContentfulAssets","data","target","sys","id","file","url","includes","src","alt","title","renderText","text","split","flatMap","i","key","image","richText","documentToReactComponents","JSON","parse","raw","TitleContainer","styled","Background","TitleStyle","HeaderH2","ImageStyle"],"sourceRoot":""}