{"version":3,"sources":["webpack:///./Avensia.Common/Features/Shared/Blocks/AudioPlayer/index.tsx","webpack:///./Avensia.Common/Features/Shared/Blocks/AudioPlayer/audio-utils.ts","webpack:///./Avensia.Common/Features/Shared/Partials/PropertyTypes/Html.tsx","webpack:///./Avensia.Common/Features/Shared/Blocks/Editor/EditorBlock.tsx","webpack:///./Avensia.Common/Features/Shared/Blocks/BlockSpacing.ts","webpack:///./Avensia.Common/Features/Shared/Sigvaris/ThemeTextColor/index.tsx","webpack:///./Avensia.Common/Features/Shared/Sigvaris/CampaignBrandTheme/index.tsx","webpack:///./Avensia.Common/Features/Shared/Blocks/Editor/EditorBlockContext.tsx"],"names":["props","url","title","target","isValidAudio","indexOf","split","pop","trim","getUrlExtension","isAudio","createElement","Base","Div","CampaignThemeLink","as","themeType","to","fillInBlock","Title","AudioControl","playsInline","controls","preload","src","InvalidAudio","position","display","flexDirection","maxWidth","boxShadow","transition","property","duration","marginBottom","textAlign","margin","xy","audio","width","HtmlTagContext","createContext","noMargin","twoColumn","HtmlSettingsProvider","Provider","value","children","noMarginDecorator","generateDecorator","Component","mapProps","item","i","componentProps","contextualStyle","Object","assign","css","_a","_b","_c","_d","_e","_f","_g","_h","attr","parseInt","height","keepImageSizes","size","Medium","Small","widths","entries","filter","k","v","alignStyle","style","marginLeft","x","float","Wrapper","subscribeToCache","preset","key","Image","href","restProps","className","anchorStyle","y","CampaignThemeButton","Button","Primary","ctaStyle","Secondary","div","maxHeight","StyledEditorBlock","isMobile","isTwoColumns","textColor","titleAlignment","bgColor","backgroundColor","desktopLeftRight","mobileLeftRight","desktopTopBottom","mobileTopBottom","textStyle","color","blockSpacing","backgroundColorStyle","twoColumnStyle","columnCount","columnGap","bodyStyle","isInEditorBlock","id","Body","noShowTitle","Heading","component","BodyBase","propertyComponentProps","displayImageMobile","displayImage","for","body","overflow","bottom","lineHeight","font","theme","isCompact","getPaddingStyle","spacing","Spacing","paddingLeft","paddingRight","paddingTop","paddingBottom","BlockSpacing","desktopTop","mobileTop","desktopBottom","mobileBottom","desktopLeft","mobileLeft","desktopRight","mobileRight","BlockHorizontalSpacing","ThemeTextColor","themeColor","themeColorLight","themeColorDark","siteTheme","colors","primary","secondary","darkTextTheme","lightBlue","darkBlue","CampaignBrandTheme","EditorBlockContext"],"mappings":";wRAgBe,mBATKA,IAChB,MAAM,IAAEC,EAAG,MAAEC,EAAK,OAAEC,GAAWH,EACzBI,ECTH,SAAiBH,GACpB,QAAKA,IAGuD,IADlC,CAAC,MAAO,OACTI,QAEtB,SAAyBJ,GAC5B,OAAOA,EAAIK,MAAM,QAAQ,GAAGA,MAAM,KAAKC,MAAMC,OAHZC,CAAgBR,IDK5BS,CAAQT,GAC7B,OAAQ,IAAMU,cAAcC,EAAM,KAAMR,EAAgB,IAAMO,cAAc,IAAOE,IAAK,KACpF,IAAMF,cAAcG,EAAA,EAAmB,CAAEC,GAAI,QAASC,UAAW,QAASC,GAAIhB,EAAKE,OAAQA,EAAQe,aAAa,GAC5G,IAAMP,cAAcQ,EAAO,KAAMjB,IACrC,IAAMS,cAAcS,EAAc,CAAEC,aAAa,EAAMC,UAAU,EAAMC,QAAS,QAC5E,IAAMZ,cAAc,SAAU,CAAEa,IAAKvB,MAAa,IAAMU,cAAcc,EAAc,KAAM,aAAU,yCAGhH,MAAMb,EAAO,YAAO,IAAiB,CACjCc,SAAU,WACVC,QAAS,OACTC,cAAe,SACfC,SAAU,IACVC,UAAW,+BACXC,WAAY,CACRC,SAAU,aACVC,SAAU,SAGZd,EAAQ,YAAO,IAAG,CACpBe,aAAc,GACdC,UAAW,WAETV,EAAe,YAAO,IAAG,CAC3BW,OAAQ,CACJC,GAAI,MAGNjB,EAAe,IAAOkB,MAAM,CAC9BC,MAAO,SEtBLC,EAAiB,IAAMC,cAAc,CAAEC,UAAU,EAAOC,WAAW,EAAO3B,UAAW,OAC9E4B,EAAuB5C,GAAU,IAAMW,cAAc6B,EAAeK,SAAU,CAAEC,MAAO9C,GAASA,EAAM+C,UAC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OAAOuD,EAAUC,OAAOC,QAC5B,IAAK,aACD,OAAOF,EAAUC,OAAOE,UAC5B,IAAK,YACD,OAAOH,EAAUC,OAAOG,cAC5B,IAAK,YACD,OAAOJ,EAAUC,OAAOI,UAC5B,IAAK,WACD,OAAOL,EAAUC,OAAOK,Y,iCCzCpC,qEAIO,MAAMC,EAAsBrD,IAC/B,MAAM,WAAE2C,EAAU,gBAAEC,EAAe,eAAEC,GAAmB,qBAAW,KAC7DC,EAAY,cAClB,GAAIH,EACA,OAAQ3C,GACJ,IAAK,QACD,OAAO2C,EACX,IAAK,aACD,OAAOC,EACX,IAAK,YACD,OAAOC,EAGnB,OAAQ7C,GACJ,IAAK,QACD,OAAO8C,EAAUC,OAAOC,QAC5B,IAAK,aACD,OAAOF,EAAUC,OAAOE,UAC5B,IAAK,YACD,OAAOH,EAAUC,OAAOG,cAC5B,IAAK,YACD,OAAOJ,EAAUC,OAAOI,UAC5B,IAAK,WACD,OAAOL,EAAUC,OAAOK,SAC5B,IAAK,QACD,OAAO,KACX,IAAK,OACD,OAAO,KACX,IAAK,QACD,OAAO,O,iCCjCnB,6CACO,MAAME,EAAqB,wBAAc,CAC5C3D,iBAAkB,KAClBC,gBAAiB,KACjBW,iBAAiB","file":"assets/53.chunk.de474c19c6aeb48d17cc.js","sourcesContent":["import React from 'react';\r\nimport { styled } from '@glitz/react';\r\nimport { WhiteThemeBlock } from 'Shared/Theme';\r\nimport { isAudio } from './audio-utils';\r\nimport { translate } from '@avensia/scope';\r\nimport CampaignThemeLink from 'Shared/Sigvaris/CampaignThemeLink';\r\nimport { P } from 'Shared/Generic';\r\nconst AudioPlayer = props => {\r\n const { url, title, target } = props;\r\n const isValidAudio = isAudio(url);\r\n return (React.createElement(Base, null, isValidAudio ? (React.createElement(styled.Div, null,\r\n React.createElement(CampaignThemeLink, { as: 'theme', themeType: 'theme', to: url, target: target, fillInBlock: true },\r\n React.createElement(Title, null, title)),\r\n React.createElement(AudioControl, { playsInline: true, controls: true, preload: \"none\" },\r\n React.createElement(\"source\", { src: url })))) : (React.createElement(InvalidAudio, null, translate('/Shared/AudioPlayer/InvalidAudio')))));\r\n};\r\nexport default styled(AudioPlayer);\r\nconst Base = styled(WhiteThemeBlock, {\r\n position: 'relative',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n maxWidth: 350,\r\n boxShadow: '0px 2px 6px rgba(0,0,0,0.15)',\r\n transition: {\r\n property: 'box-shadow',\r\n duration: '.2s',\r\n },\r\n});\r\nconst Title = styled(P, {\r\n marginBottom: 16,\r\n textAlign: 'center',\r\n});\r\nconst InvalidAudio = styled(P, {\r\n margin: {\r\n xy: 16,\r\n },\r\n});\r\nconst AudioControl = styled.audio({\r\n width: '100%',\r\n});\r\n","export function isAudio(url) {\r\n if (!url)\r\n return false;\r\n const SUPPORTED_FORMATS = ['mp3', 'mp4'];\r\n return SUPPORTED_FORMATS.indexOf(getUrlExtension(url)) !== -1;\r\n}\r\nexport function getUrlExtension(url) {\r\n return url.split(/[#?]/)[0].split('.').pop().trim();\r\n}\r\n","import { __rest } from \"tslib\";\r\n/**\r\n * @ComponentFor EPiServer.Core.XhtmlString\r\n */\r\nimport React, { useContext } from 'react';\r\nimport { Html, registerDecorator } from '@avensia/scope-episerver';\r\nimport Image from 'Shared/Image';\r\nimport AspectRatioImage from 'Shared/Image/Ratio';\r\nimport { imageSizes, Size } from 'Shared/image-sizes';\r\nimport { H1, H2, H3, H4, H5, H6, Hr, P, Ul } from 'Shared/Generic';\r\nimport { Theme as ButtonTheme } from 'Shared/Button';\r\nimport { styled } from '@glitz/react';\r\nimport { small } from 'Shared/Style';\r\nimport CampaignThemeButton from 'Shared/Sigvaris/CampaignThemeButton';\r\nimport CampaignThemeLink from 'Shared/Sigvaris/CampaignThemeLink';\r\nimport AudioPlayer from 'Shared/Blocks/AudioPlayer';\r\nconst HtmlTagContext = React.createContext({ noMargin: false, twoColumn: false, themeType: null });\r\nexport const HtmlSettingsProvider = props => (React.createElement(HtmlTagContext.Provider, { value: props }, props.children));\r\nconst noMarginDecorator = styled({ margin: { xy: 0 } });\r\nregisterDecorator('img', (item, i, props, componentProps) => {\r\n var _a, _b, _c, _d, _e, _f, _g, _h;\r\n const { twoColumn } = useContext(HtmlTagContext);\r\n let width;\r\n if ((_a = item === null || item === void 0 ? void 0 : item.attr) === null || _a === void 0 ? void 0 : _a.width) {\r\n props.width = parseInt((_b = item === null || item === void 0 ? void 0 : item.attr) === null || _b === void 0 ? void 0 : _b.width);\r\n // To be used by aspect ratio wrapper\r\n width = props.width;\r\n }\r\n if ((_c = item === null || item === void 0 ? void 0 : item.attr) === null || _c === void 0 ? void 0 : _c.height) {\r\n props.height = parseInt((_d = item === null || item === void 0 ? void 0 : item.attr) === null || _d === void 0 ? void 0 : _d.height);\r\n }\r\n if (componentProps.keepImageSizes !== true) {\r\n if (props.width) {\r\n delete props.width;\r\n }\r\n if (props.height) {\r\n delete props.height;\r\n }\r\n // Fall back to original image width\r\n width = props.src.width;\r\n }\r\n let size = Size.Medium;\r\n if (twoColumn) {\r\n size = Size.Small;\r\n }\r\n else if (props.width) {\r\n // Set size to the lowest preset that is larger or equal to the image width set in tinymce\r\n const widths = Object.entries(imageSizes).filter(([k, v]) => v >= props.width);\r\n size = parseInt(widths[0][0]);\r\n }\r\n if (props['data-size']) {\r\n size = props['data-size'];\r\n }\r\n let alignStyle = {};\r\n if (((_f = (_e = item === null || item === void 0 ? void 0 : item.attr) === null || _e === void 0 ? void 0 : _e.style) === null || _f === void 0 ? void 0 : _f.marginLeft) === 'auto') {\r\n // img tag is centered in editor\r\n alignStyle = { display: 'block', margin: { x: 'auto' } };\r\n }\r\n if ((_h = (_g = item === null || item === void 0 ? void 0 : item.attr) === null || _g === void 0 ? void 0 : _g.style) === null || _h === void 0 ? void 0 : _h.float) {\r\n // img tag is left or right aligned in editor\r\n alignStyle = { float: item.attr.style.float };\r\n }\r\n if (width) {\r\n return (React.createElement(Wrapper, { css: Object.assign({ width }, alignStyle) },\r\n React.createElement(AspectRatioImage, Object.assign({}, props, { subscribeToCache: true, preset: size, key: i }))));\r\n }\r\n else {\r\n return React.createElement(Image, Object.assign({}, props, { subscribeToCache: true, preset: size, key: i }));\r\n }\r\n});\r\nfunction generateDecorator(Component, mapProps) {\r\n return (item, i, props, componentProps, children) => {\r\n const { noMargin } = useContext(HtmlTagContext);\r\n let contextualStyle = null;\r\n if (noMargin) {\r\n contextualStyle = noMarginDecorator;\r\n }\r\n return (React.createElement(Component, Object.assign({}, (mapProps ? mapProps(props) : props), { css: contextualStyle && contextualStyle }), children));\r\n };\r\n}\r\nregisterDecorator('h1', generateDecorator(H1));\r\nregisterDecorator('h2', generateDecorator(H2));\r\nregisterDecorator('h3', generateDecorator(H3));\r\nregisterDecorator('h4', generateDecorator(H4));\r\nregisterDecorator('h5', generateDecorator(H5));\r\nregisterDecorator('h6', generateDecorator(H6));\r\nregisterDecorator('hr', generateDecorator(Hr));\r\nregisterDecorator('p', generateDecorator(P));\r\nregisterDecorator('ul', generateDecorator(Ul));\r\n// Since `` is special we need to take its props into consideration\r\nregisterDecorator('a', (item, i, props, componentProps, children) => {\r\n const { themeType } = useContext(HtmlTagContext);\r\n const { href, target } = props, restProps = __rest(props, [\"href\", \"target\"]);\r\n const className = props['className'];\r\n const anchorStyle = {\r\n margin: {\r\n y: small,\r\n },\r\n };\r\n if (className) {\r\n switch (className) {\r\n case 'btn-primary':\r\n return (React.createElement(CampaignThemeButton, Object.assign({ as: ButtonTheme.Primary }, restProps, { ctaStyle: 'solid', themeType: themeType, to: href, css: anchorStyle }), children));\r\n case 'btn-secondary':\r\n return (React.createElement(CampaignThemeButton, Object.assign({ as: ButtonTheme.Secondary }, restProps, { ctaStyle: 'outlined', themeType: themeType, to: href, css: anchorStyle }), children));\r\n case 'audio-player':\r\n return (React.createElement(AudioPlayer, Object.assign({}, restProps, { url: href, target: target }), children));\r\n }\r\n }\r\n return (React.createElement(CampaignThemeLink, Object.assign({}, restProps, { themeType: themeType, target: target, to: href }), children));\r\n});\r\nexport default Html;\r\nconst Wrapper = styled.div({\r\n // Centers this wrapper if it is within a
with `text-align: center`\r\n display: 'inline-block',\r\n // Fit inside accordion\r\n maxWidth: '100%',\r\n maxHeight: '100%',\r\n // Remove alignment of image inside this wrapper, align the wrapper instead ^\r\n textAlign: 'initial',\r\n});\r\n","/**\r\n * @ComponentFor EditorBlock\r\n */\r\nimport React from 'react';\r\nimport { epiPropertyValue, EpiProperty, supportsComponentProp } from '@avensia/scope-episerver';\r\nimport { applyClassName, styled } from '@glitz/react';\r\nimport { media } from '@glitz/core';\r\nimport { alpha, delta, epsilon, figma, large, mediaMinMedium, sourceSansPro } from 'Shared/Style';\r\nimport { HtmlSettingsProvider } from 'Shared/Partials/PropertyTypes/Html';\r\nimport { ThemeTextColor } from 'Shared/Sigvaris/ThemeTextColor';\r\nimport { CampaignBrandTheme } from 'Shared/Sigvaris/CampaignBrandTheme';\r\nimport BlockBase from 'Shared/BlockBase';\r\nimport { Spacing } from '../BlockSpacing';\r\nimport { H2 } from 'Shared/Generic';\r\nimport { EditorBlockContext } from './EditorBlockContext';\r\nimport { useIsMobile } from 'Shared/use-viewport';\r\nfunction EditorBlock(props) {\r\n const isMobile = useIsMobile();\r\n const isTwoColumns = epiPropertyValue(props.isTwoColumns);\r\n const title = epiPropertyValue(props.title);\r\n const textColor = epiPropertyValue(props.textColor);\r\n const titleAlignment = epiPropertyValue(props.titleAlignment);\r\n const bgColor = epiPropertyValue(props.backgroundColor);\r\n const desktopLeftRight = epiPropertyValue(props.desktopLeftRight);\r\n const mobileLeftRight = epiPropertyValue(props.mobileLeftRight);\r\n const desktopTopBottom = epiPropertyValue(props.desktopTopBottom);\r\n const mobileTopBottom = epiPropertyValue(props.mobileTopBottom);\r\n const textStyle = {\r\n color: `${ThemeTextColor(textColor)}`,\r\n textAlign: titleAlignment,\r\n };\r\n const blockSpacing = Spacing(desktopLeftRight, desktopTopBottom, mobileLeftRight, mobileTopBottom);\r\n const backgroundColorStyle = Object.assign({ backgroundColor: `${CampaignBrandTheme(bgColor)}`, height: '100%' }, blockSpacing);\r\n const twoColumnStyle = Object.assign(Object.assign({}, (isTwoColumns && Object.assign({ columnCount: 1, columnGap: large }, media(mediaMinMedium, {\r\n columnCount: 2,\r\n })))), { color: `${ThemeTextColor(textColor)}` });\r\n const bodyStyle = Object.assign({ height: '100%', display: 'flex', flexDirection: 'column' }, ((desktopTopBottom !== 'none' || mobileTopBottom !== 'none') && {\r\n marginBottom: 0,\r\n }));\r\n return (React.createElement(EditorBlockContext.Provider, { value: {\r\n desktopLeftRight: desktopLeftRight,\r\n mobileLeftRight: mobileLeftRight,\r\n isInEditorBlock: true,\r\n } },\r\n React.createElement(BlockBase, { id: \"editor-block\", css: bodyStyle },\r\n React.createElement(Body, { css: backgroundColorStyle },\r\n !props.noShowTitle && title && React.createElement(Heading, { css: textStyle }, title),\r\n React.createElement(HtmlSettingsProvider, { twoColumn: isTwoColumns, themeType: bgColor },\r\n React.createElement(styled.Div, { css: twoColumnStyle },\r\n React.createElement(EpiProperty, { component: BodyBase, propertyComponentProps: {\r\n keepImageSizes: !isMobile\r\n ? epiPropertyValue(props.displayImage)\r\n : epiPropertyValue(props.displayImageMobile),\r\n }, for: props.body })))))));\r\n}\r\nconst StyledEditorBlock = styled(applyClassName(EditorBlock), {\r\n height: '100%',\r\n overflow: 'hidden',\r\n});\r\nexport default supportsComponentProp(StyledEditorBlock);\r\nconst Heading = styled(H2, {\r\n margin: {\r\n bottom: alpha,\r\n },\r\n});\r\nconst Body = styled.div(sourceSansPro(epsilon), {\r\n lineHeight: 1.45,\r\n});\r\nconst BodyBase = styled.div({\r\n font: {\r\n size: theme => (theme.isCompact ? figma : delta),\r\n },\r\n});\r\n","import * as style from 'Shared/Style';\r\nimport { media } from '@glitz/core';\r\nconst _HUGE_PADDING = 166;\r\nconst _LARGE_PADDING = 80;\r\nconst _MEDIUM_PADDING = 40;\r\nconst _SMALL_PADDING = 16;\r\nfunction getPaddingStyle(spacing) {\r\n if (spacing === 'huge') {\r\n return _HUGE_PADDING;\r\n }\r\n else if (spacing === 'large') {\r\n return _LARGE_PADDING;\r\n }\r\n else if (spacing === 'medium') {\r\n return _MEDIUM_PADDING;\r\n }\r\n else if (spacing === 'small') {\r\n return _SMALL_PADDING;\r\n }\r\n else {\r\n return 0;\r\n }\r\n}\r\nexport const Spacing = (desktopLeftRight, desktopTopBottom, mobileLeftRight, mobileTopBottom) => {\r\n return Object.assign({ paddingLeft: getPaddingStyle(mobileLeftRight), paddingRight: getPaddingStyle(mobileLeftRight), paddingTop: getPaddingStyle(mobileTopBottom), paddingBottom: getPaddingStyle(mobileTopBottom) }, media(style.mediaMinMedium, {\r\n paddingLeft: getPaddingStyle(desktopLeftRight),\r\n paddingRight: getPaddingStyle(desktopLeftRight),\r\n paddingTop: getPaddingStyle(desktopTopBottom),\r\n paddingBottom: getPaddingStyle(desktopTopBottom),\r\n }));\r\n};\r\nexport const BlockSpacing = (desktopTop, mobileTop, desktopBottom, mobileBottom, desktopLeft, mobileLeft, desktopRight, mobileRight) => {\r\n return Object.assign({ paddingTop: getPaddingStyle(mobileTop), paddingBottom: getPaddingStyle(mobileBottom), paddingLeft: getPaddingStyle(mobileLeft), paddingRight: getPaddingStyle(mobileRight) }, media(style.mediaMinMedium, {\r\n paddingTop: getPaddingStyle(desktopTop),\r\n paddingBottom: getPaddingStyle(desktopBottom),\r\n paddingLeft: getPaddingStyle(desktopLeft),\r\n paddingRight: getPaddingStyle(desktopRight),\r\n }));\r\n};\r\nexport const BlockHorizontalSpacing = (desktopLeft, mobileLeft, desktopRight, mobileRight) => {\r\n return Object.assign({ paddingLeft: getPaddingStyle(mobileLeft), paddingRight: getPaddingStyle(mobileRight) }, media(style.mediaMinMedium, {\r\n paddingLeft: getPaddingStyle(desktopLeft),\r\n paddingRight: getPaddingStyle(desktopRight),\r\n }));\r\n};\r\n","import { white, grey80, titleBlockBlack } from 'Shared/Style';\r\nimport { CampaignBrandContext } from 'Pages/Campaign/CampaignBrandPageContext';\r\nimport { useContext } from 'react';\r\nimport { useCurrentTheme } from 'SiteLayout/Theming';\r\nexport const ThemeTextColor = (textColor) => {\r\n const { themeColor, themeColorLight, themeColorDark } = useContext(CampaignBrandContext);\r\n const siteTheme = useCurrentTheme();\r\n // If campaign color is set\r\n if (themeColor) {\r\n switch (textColor) {\r\n case 'theme':\r\n return themeColor;\r\n case 'themeLight':\r\n return themeColorLight;\r\n case 'themeDark':\r\n return themeColorDark;\r\n case 'white':\r\n return white;\r\n case 'grey':\r\n return grey80;\r\n case 'black':\r\n return titleBlockBlack;\r\n }\r\n }\r\n // Fallback text color\r\n switch (textColor) {\r\n case white:\r\n return white;\r\n case 'grey':\r\n return grey80;\r\n case 'black':\r\n return titleBlockBlack;\r\n case 'theme':\r\n return siteTheme.colors.primary;\r\n case 'themeLight':\r\n return siteTheme.colors.secondary;\r\n case 'themeDark':\r\n return siteTheme.colors.darkTextTheme;\r\n case 'lightBlue':\r\n return siteTheme.colors.lightBlue;\r\n case 'darkBlue':\r\n return siteTheme.colors.darkBlue;\r\n }\r\n};\r\n","import { CampaignBrandContext } from 'Pages/Campaign/CampaignBrandPageContext';\r\nimport { useContext } from 'react';\r\nimport { black, lightGrey, white } from 'Shared/Style';\r\nimport { useCurrentTheme } from 'SiteLayout/Theming';\r\nexport const CampaignBrandTheme = (color) => {\r\n const { themeColor, themeColorLight, themeColorDark } = useContext(CampaignBrandContext);\r\n const siteTheme = useCurrentTheme();\r\n if (themeColor) {\r\n switch (color) {\r\n case 'theme':\r\n return themeColor;\r\n case 'themeLight':\r\n return themeColorLight;\r\n case 'themeDark':\r\n return themeColorDark;\r\n }\r\n }\r\n switch (color) {\r\n case 'theme':\r\n return siteTheme.colors.primary;\r\n case 'themeLight':\r\n return siteTheme.colors.secondary;\r\n case 'themeDark':\r\n return siteTheme.colors.darkTextTheme;\r\n case 'lightBlue':\r\n return siteTheme.colors.lightBlue;\r\n case 'darkBlue':\r\n return siteTheme.colors.darkBlue;\r\n case 'white':\r\n return white;\r\n case 'grey':\r\n return lightGrey;\r\n case 'black':\r\n return black;\r\n }\r\n};\r\n","import { createContext } from 'react';\r\nexport const EditorBlockContext = createContext({\r\n desktopLeftRight: null,\r\n mobileLeftRight: null,\r\n isInEditorBlock: false,\r\n});\r\n"],"sourceRoot":""}