{"version":3,"sources":["webpack:///./presentation/utils/ribbonPadding.ts","webpack:///./presentation/hocs/errorBoundary.tsx","webpack:///./presentation/hocs/withRibbonImpression.ts","webpack:///./presentation/utils/ribbonWidth.ts","webpack:///./presentation/hocs/deepLink.tsx","webpack:///./presentation/components/ribbons/Ribbon/Ribbon.tsx","webpack:///./presentation/components/ribbons/Ribbon/ConnectedRibbon.ts","webpack:///./presentation/components/ribbons/Ribbon/index.ts","webpack:///./presentation/components/Shortcode/PendingShortcode.tsx","webpack:///./presentation/components/Shortcode/Alt.tsx","webpack:///./presentation/components/Shortcode/Bold.tsx","webpack:///./presentation/components/Shortcode/Italic.tsx","webpack:///./presentation/components/Shortcode/Link.tsx","webpack:///./presentation/components/Shortcode/Text.tsx","webpack:///./presentation/components/Shortcode/Tooltip.tsx","webpack:///./presentation/components/Shortcode/Shortcode.tsx","webpack:///./presentation/components/Shortcode/index.ts","webpack:///./presentation/hocs/visibilitySet.tsx","webpack:///./presentation/hocs/withLanguage.ts","webpack:///./presentation/utils/urlLanguageParse.ts","webpack:///./presentation/utils/createImageAlt.ts","webpack:///./presentation/components/common/CallToAction.tsx","webpack:///./domain/constants/callToAction.ts","webpack:///./presentation/hocs/callToAction.js","webpack:///./presentation/utils/createImageUrl.ts"],"names":["spacing","isMinSm","isMinLg","layout","flush","r","shrinkLeading","shrinkTrailing","getPaddingSize","shrinkSide","isFlush","leading","Flush","LEADING","trailing","TRAILING","paddingTop","gu2px","paddingBottom","stylesheet","theme","colorway","isMinMd","useStyles","default","root","backgroundColor","getBackgroundColor","color","getTitleColor","ribbonPadding","cssSides","Side","X","textAlign","WrappedComponent","ErrorBoundary","styles","style","id","props","compose","withState","lifecycle","componentDidCatch","this","setHasErrored","withProps","hooksA","pipe","mapProps","selector","useMemo","getRibbonAnalytics","analytics","useSelector","dispatch","useDispatch","actions","bindActionCreators","sendImpression","withHandlers","onImpression","name","type","ribbonName","ribbonType","hooksB","isFullyInViewport","stopWatcher","useEffect","pureEnhance","hocs","mapPropsHoc","branch","Watch","deepLink","withRouter","componentDidMount","location","hash","scrollWhenReady","loading","animationComplete","setTimeout","scroller","scrollTo","duration","delay","smooth","mapFit","fit","Fit","FULLSCREEN","minHeight","FILL","flex","flexBasis","AUTO","height","isFinite","enhance","hooks","targetRef","useRef","withBreakpointsHook","palette","duoLayout","activeFit","findResponsiveItem","getBreakpoints","padding","duoLayoutFlex","flexSize","percentage","duoRibbonWidth","position","display","flexDirection","width","inner","ribbon","modifier","Colorway","PRIMARY_GRADIENT","backgroundImage","primary","primaryGradient","children","ref","withRibbonImpression","Ribbon","randomWidth","Math","floor","random","puree","code","against","lines","elements","RecursiveShortcode","rest","tertiary","fontWeight","fontStyle","getUsfConfig","wlSelectors","getAppConfig","mapStateToProps","connect","contentType","attributes","externalRoutes","to","goto","analyticskey","size","TextButtonSize","INHERIT","escapeShortCodes","nl2br","string","split","map","reduce","prev","cur","i","key","text","newline","isFalse","formatText","ReactTooltip","lazy","eventToggle","CallToAction","label","fallback","tagName","useDefaultStyles","content","maxWidth","Glyph","Sup","List","OrderedList","ListItem","TickListItem","ProductPrice","PhoneNumber","Shortcode","element","genericShortcodeHandler","shortcodeName","Component","String","getAgainst","Element","nuller","Text","Italic","Bold","Alt","Link","Tooltip","glyph","PendingShortcode","BaseComponent","state","currentLanguage","getCurrentLanguage","url","language","length","parsedLanguage","toUpperCase","join","replace","hasImage","isNotNilOrEmpty","str","image","match","callToAction","defaultProps","Against","LIGHT","kind","addingStatus","handleClick","status","Status","PENDING","SUCCESS","FAILURE","DEFAULT","buttonProps","onClick","Behavior","formatPricingTier","behavior","buttonId","ribbonId","index","getExternalRoutes","getRibbon","product","ribbonList","createRibbonName","getAddingStatus","addToBasket","applyVoucher","setVisibility","push","openReduxModal","signals","open","productClicked","promotionClicked","productAddToBasket","stateProps","dispatchProps","ownProps","handleAnalytics","ctaType","list","productId","promotion","handleAddToBasketClick","postAction","pricingTier","productData","price","selectors","getPrice","includeTax","category","categoryName","handleNavigateClick","handleApplyVoucherClick","voucherCode","handleConfigureClick","initialSku","query","qs","stringify","pathname","search","handleSetVisibilityClick","visibilitySet","handlePlayVideoClick","videoId","provider","route","params","ownerProps","ADD_TO_BASKET","APPLY_VOUCHER","CONFIGURE","SET_VISIBILITY","PLAY_VIDEO","NAVIGATION","linkAttribution","hasIllustration","media","createPaintbrushUrl","illustration","urlLanguageParse","imageUrl"],"mappings":"6EAAA,0EAKe,MACbA,UACAC,UACAC,UACAC,SACAC,YASA,GAAIC,IAASD,GAAO,GAElB,MAAO,GAGT,MAAM,cAEJE,EAFI,eAIJC,GACEF,IAAY,GAAIF,GASdK,EAAiB,CAACC,EAAoBC,IAEtCA,EACK,EAGFL,IAAO,CACZ,CAAEA,IAASI,GAAY,GAAO,IAAMJ,IAClCA,KAAS,GACTA,IAAS,GACTA,IAAS,IAHyBA,CAIlCJ,IACF,CAAEI,IAAS,WAAW,GAAOA,IAAS,IACtC,CAAEA,IAAS,WAAW,GAAOA,IAAS,IACtC,CAAEA,IAAKA,IAAS,KARXA,CASJ,CACDH,UACAD,UACAK,gBACAC,mBAIEI,EAAUH,EAAe,gBAAiBJ,IAAUQ,IAAMC,SAC1DC,EAAWN,EAAe,iBAAkBJ,IAAUQ,IAAMG,UAElE,MAAO,CACLC,WAAYC,YAAMN,EAASX,GAC3BkB,cAAeD,YAAMH,EAAUd,M,oBClEnC,qGAmCA,MAAMmB,EAAa,EACjBC,QACAC,WACApB,UACAqB,UACApB,UACAC,SACAC,YAEA,MAAM,QACJJ,GACEoB,EAEJ,OAAOG,YAAU,CACfC,QAAS,CACPC,KAAM,CACJC,gBAAiBC,YAAmBP,EAAOC,GAC3CO,MAAOC,YAAcT,EAAOC,MACzBS,YAAc,CACf9B,UACAC,UACAC,UACAC,SACAC,aAEC2B,YAAS,OAAQC,IAAKC,EAAGhB,YAAM,EAAGjB,IACrCkC,UAAW,WAGfjC,QAAS,CACPwB,KAAM,IACDM,YAAS,OAAQC,IAAKC,EAAGhB,YAAM,EAA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O,EAAS8D,YAC1BzS,IAASoS,EAAWL,uBAEtB,CACE/R,IAAS,OAAQ2O,EAAS+D,YAC1B1S,IAASoS,EAAWjB,sBAEtB,CACEnR,IAEAA,IAASA,IAAS,SA5BTA,CA8BVoS,EAAWvD,UAEd3M,GAAIlC,IACFA,IAAgBwN,kBAAiB,CAAE,YAAa,oBAChD,EAAGvK,eAAH,kBAA8BA,EAAU0P,iBACxC3S,IAASoS,EAAWlQ,IAHlBlC,CAIFoS,EAAWvD,e,oBCvPjB,+CAoBA,MAAM+D,EAAkB5S,IAAgBwN,kBAAiB,gBAE1C,KACbqF,EAIA9R,EACA+L,IACG9M,IACH4S,EACA,IAAME,YAAoBD,EAAME,aAAchS,GAC9C,IAAMiS,YAAiBH,EAAMI,SAAUnG,GAHpC9M,CAIH6S","file":"pex-static/1.7b0688e3dca765807b02.chunk.js","sourcesContent":["import { Flush } from 'domain/constants/ribbons';\nimport { gu2px } from '@ux/theme-utils';\nimport * as r from 'ramda';\nimport { Layout } from 'domain/constants/layout';\n\nexport default ({\n spacing,\n isMinSm,\n isMinLg,\n layout,\n flush,\n}: {\n spacing: number,\n isMinSm: boolean,\n isMinLg: boolean,\n layout?: Layout,\n flush?: Flush|boolean,\n}) => {\n\n if (r.equals(flush, true)) {\n // Component will handle all padding, used on full bleed image ribbons\n return {};\n }\n\n const {\n //@ts-ignore\n shrinkLeading,\n //@ts-ignore\n shrinkTrailing,\n } = r.defaultTo({}, layout);\n\n /*\n shrinkSide:\n shrink[Leading/Trailing] prop is true then return a reduced padding\n depending on screen size\n isFlush:\n leading or trailing edge has been designated as flush, no padding\n */\n const getPaddingSize = (shrinkSide: string, isFlush: boolean) => {\n\n if (isFlush) {\n return 0;\n }\n\n return r.cond([\n [ r.propEq(shrinkSide, true), () => r.ifElse(\n r.equals(true),\n r.always(1),\n r.always(0.5),\n )(isMinSm) ],\n [ r.propEq('isMinLg', true), r.always(6) ],\n [ r.propEq('isMinSm', true), r.always(5) ],\n [ r.T, r.always(4) ],\n ])({\n isMinLg,\n isMinSm,\n shrinkLeading,\n shrinkTrailing,\n });\n };\n\n const leading = getPaddingSize('shrinkLeading', flush === Flush.LEADING);\n const trailing = getPaddingSize('shrinkTrailing', flush === Flush.TRAILING);\n\n return {\n paddingTop: gu2px(leading, spacing),\n paddingBottom: gu2px(trailing, spacing),\n };\n};\n","import React, { CSSProperties } from 'react';\nimport {\n compose,\n lifecycle,\n withState,\n withProps,\n} from 'recompose';\nimport Message from '@ux/message';\nimport { Container } from '@ux/grid';\nimport * as r from 'ramda';\nimport cssSides, { Side } from '@team-griffin/css-sides';\nimport {\n getBackgroundColor,\n getTitleColor,\n} from 'presentation/utils/colorway';\nimport { gu2px, Theme } from '@ux/theme-utils';\nimport ribbonPadding from 'presentation/utils/ribbonPadding';\nimport { useStyles } from '@team-griffin/stylr';\nimport { Colorway } from 'domain/constants/colorway';\nimport { Layout } from 'domain/constants/layout';\nimport { Flush } from 'domain/constants/ribbons';\nimport { BreakpointProps } from '@ux/responsive';\ninterface OuterProps extends BreakpointProps {\n theme: Theme,\n colorway: Colorway,\n layout: Layout,\n flush?: Flush|boolean,\n}\n\ninterface InnerProps extends OuterProps {\n styles: {\n root: CSSProperties,\n }\n hasErrored: boolean,\n}\nconst stylesheet = ({\n theme,\n colorway,\n isMinSm,\n isMinMd,\n isMinLg,\n layout,\n flush,\n}: InnerProps) => {\n const {\n spacing,\n } = theme;\n\n return useStyles({\n default: {\n root: {\n backgroundColor: getBackgroundColor(theme, colorway),\n color: getTitleColor(theme, colorway),\n ...ribbonPadding({\n spacing,\n isMinSm,\n isMinLg,\n layout,\n flush,\n }),\n ...cssSides('Side', Side.X, gu2px(3, spacing)),\n textAlign: 'center',\n },\n },\n isMinSm: {\n root: {\n ...cssSides('Side', Side.X, gu2px(4, spacing)),\n },\n },\n }, [\n { colorway },\n { isMinSm },\n { isMinMd },\n ]);\n};\n\nexport default (WrappedComponent: any) => {\n const ErrorBoundary = r.ifElse(\n r.propEq('hasErrored', true),\n ({ styles }) => (\n
\n \n \n \n
\n ),\n (props: InnerProps) => (\n \n ),\n );\n\n return compose(\n withState('hasErrored', 'setHasErrored', false),\n lifecycle({\n componentDidCatch: function() {\n //@ts-ignore\n this.props.setHasErrored(true);\n },\n }),\n withProps(stylesheet),\n )(ErrorBoundary);\n};\n","import { useMemo, useEffect } from 'react';\nimport { branch, mapProps as mapPropsHoc } from 'recompose';\nimport pureEnhance from '@ux/pure-enhance';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { pipe, withProps, mapProps, withHandlers } from '@team-griffin/rehook';\nimport { Watch } from 'scrollmonitor-react';\nimport * as r from 'ramda';\nimport { sendImpression } from 'application/signals/ribbons';\nimport { getRibbonAnalytics } from 'domain/selectors/ribbons';\nimport { Type } from 'domain/constants/ribbons';\n\nconst hooksA = pipe(\n mapProps((props: any) => {\n const { id } = props;\n const selector = useMemo(() => getRibbonAnalytics(id), [ id ]);\n const analytics = useSelector(selector);\n const dispatch = useDispatch();\n const actions = bindActionCreators({ sendImpression }, dispatch);\n\n return r.mergeDeepLeft(props, {\n analytics,\n actions,\n });\n }),\n withHandlers({\n onImpression: ({\n name,\n type,\n analytics,\n actions: {\n sendImpression,\n },\n }: {\n name: string,\n type: Type,\n analytics: any,\n actions: {\n sendImpression: Function,\n }\n }) => () => sendImpression({\n ...analytics,\n ribbonName: name,\n ribbonType: type,\n }),\n }),\n);\n\nconst hooksB = pipe(\n withProps(({\n isFullyInViewport,\n stopWatcher,\n onImpression,\n analytics,\n }: {\n isFullyInViewport: boolean,\n stopWatcher: () => void,\n onImpression: (a: any) => void,\n analytics: any,\n }) => {\n useEffect(() => {\n if (isFullyInViewport) {\n stopWatcher();\n onImpression(analytics);\n }\n }, [ isFullyInViewport ]);\n }),\n);\n\nexport default pureEnhance('RibbonImpression', {\n hocs: [\n mapPropsHoc(hooksA),\n branch(\n r.propSatisfies(r.complement(r.isNil), 'analytics'),\n Watch,\n ),\n mapPropsHoc(hooksB),\n ],\n});\n","import { percentage } from '@ux/style-utils';\n\nexport const duoRibbonWidth = ({\n isMinMd,\n duoLayout,\n}: {\n isMinMd: boolean,\n duoLayout?: boolean,\n}) => {\n if (!isMinMd || duoLayout == null) {\n return {};\n }\n\n const flexSize = (isMinMd && duoLayout) ? 50 : 100;\n return {\n flex: percentage(flexSize),\n };\n};\n\nexport default null;","import React, { Fragment } from 'react';\nimport {\n compose,\n lifecycle,\n} from 'recompose';\nimport { withRouter } from 'react-router';\nimport { Element, scroller } from 'react-scroll';\n\nconst deepLink = compose(\n withRouter,\n lifecycle({\n componentDidMount: function() {\n //Adding some ts-ignores here so it doesn't throw not recognizing\n //this.props\n\n //@ts-ignore\n if (this.props.location.hash === `#${this.props.name}`) {\n const scrollWhenReady = () => {\n // we can't scroll to eagerly or we'll end up in the wrong place\n //@ts-ignore\n if (this.props.loading || !this.props.animationComplete) {\n return setTimeout(scrollWhenReady, 100);\n }\n //@ts-ignore\n scroller.scrollTo(this.props.name, {\n duration: 500,\n delay: 100,\n smooth: true,\n });\n };\n setTimeout(scrollWhenReady, 100);\n }\n },\n }),\n (WrappedComponent: any) => {\n return (props: any) => (\n \n \n \n \n );\n },\n);\n\nexport default deepLink;\n","import React, { useRef, useLayoutEffect, CSSProperties, ReactNode, Ref } from 'react';\nimport { withProps } from '@team-griffin/rehook';\nimport pureEnhance from '@ux/pure-enhance';\nimport { withBreakpointsHook, BreakpointProps } from '@ux/responsive';\nimport findResponsiveItem from 'presentation/utils/findResponsiveItem';\nimport getBreakpoints from 'presentation/utils/getBreakpoints';\nimport ribbonPadding from 'presentation/utils/ribbonPadding';\nimport { duoRibbonWidth } from 'presentation/utils/ribbonWidth';\nimport { percentage, modifier } from '@ux/style-utils';\nimport deepLink from 'presentation/hocs/deepLink';\nimport { getBackgroundColor } from 'presentation/utils/colorway';\nimport { useStyles } from '@team-griffin/stylr';\nimport { Colorway } from 'domain/constants/colorway';\nimport { Fit, Flush, RibbonProps } from 'domain/constants/ribbons';\nimport * as r from 'ramda';\n\nexport {\n Flush,\n};\n\ninterface OuterProps extends RibbonProps {\n children?: ReactNode,\n}\ninterface WithHandlerProps extends OuterProps {\n setAnimationComplete: Function,\n setRibbonHeight: Function,\n setHeight: Function,\n onAnimationEnd: (props: {\n newHeight: number;\n }) => void,\n}\n\ninterface InnerProps extends WithHandlerProps, BreakpointProps {\n rendered: boolean,\n targetRef: Ref,\n duration: number,\n styles: {\n root: CSSProperties,\n inner: CSSProperties,\n ribbon: CSSProperties,\n }\n}\n\nconst mapFit = (fit: Fit) => r.cond([\n [ r.equals(Fit.FULLSCREEN), r.always({\n minHeight: '100vh',\n }) ],\n [ r.equals(Fit.FILL), r.always({\n flex: 1,\n flexBasis: 'auto',\n }) ],\n [ r.equals(Fit.AUTO), r.always({\n height: 'auto',\n }) ],\n [ isFinite, r.always({\n minHeight: fit,\n }) ],\n [ r.T, r.always({\n height: 'auto',\n }) ],\n])(fit);\n\nconst stylesheet = ({\n theme,\n colorway,\n loading,\n layout,\n flush,\n ...props\n}: InnerProps) => {\n const {\n palette,\n spacing,\n } = theme;\n const {\n //@ts-ignore\n fit,\n } = r.defaultTo({}, layout);\n\n const {\n isMinSm,\n isMinMd,\n isMinLg,\n duoLayout,\n } = props;\n\n const activeFit = findResponsiveItem(\n getBreakpoints(props),\n fit,\n );\n\n const padding = ribbonPadding({\n spacing,\n isMinSm,\n isMinLg,\n layout,\n flush,\n });\n\n const duoLayoutFlex = duoRibbonWidth({\n isMinMd,\n duoLayout,\n });\n\n return useStyles({\n default: {\n root: {\n backgroundColor: getBackgroundColor(theme, colorway),\n position: 'relative',\n display: 'flex',\n flexDirection: 'column',\n width: percentage(100),\n ...mapFit(activeFit),\n ...padding,\n ...duoLayoutFlex,\n },\n inner: {\n flex: 1,\n flexBasis: 'auto',\n display: 'flex',\n height: 'auto',\n },\n ribbon: {\n display: 'flex',\n flexDirection: 'column',\n width: percentage(100),\n },\n },\n\n [modifier('colorway', Colorway.PRIMARY_GRADIENT)]: {\n root: {\n backgroundImage: `linear-gradient(to right, ${palette.primary}, ${palette.primaryGradient})`,\n },\n },\n }, [\n { loading },\n { colorway },\n { isMinSm },\n { isMinMd },\n { isMinLg },\n ]);\n};\n\nexport const PureRibbon = ({\n styles,\n targetRef,\n children,\n}: InnerProps) => (\n
\n
\n \n {children}\n
\n \n
\n);\n\nexport const enhance = pureEnhance('Ribbon', {\n hocs: [\n deepLink,\n ],\n hooks: [\n withProps(() => {\n const targetRef = useRef({});\n\n if (process.env.NODE_ENV !== 'production') {\n useLayoutEffect(() => {\n // when backstop runs on ribbons, this lets us filter out a lot of false\n // positives and a lot of race condition fails by only initialising\n // the snapshot once loading has finished + a delay to wait for fonts etc to load\n // eslint-disable-next-line\n setTimeout(() => {\n // eslint-disable-next-line\n console.log('BACKSTOP_RIBBON_READY');\n }, 3000);\n }, [ targetRef.current ]);\n }\n\n return {\n targetRef,\n };\n }),\n withBreakpointsHook,\n withProps(stylesheet),\n ],\n});\n\nexport default enhance(PureRibbon);\n","import pureEnhance from '@ux/pure-enhance';\nimport withRibbonImpression from 'presentation/hocs/withRibbonImpression';\n\nimport Ribbon from './Ribbon';\n\nconst enhance = pureEnhance('ConnectedRibbon', {\n hocs: [ withRibbonImpression ],\n});\n\nexport default enhance(Ribbon);\n","import Ribbon from './ConnectedRibbon';\nimport { Flush } from './Ribbon';\n\nexport { Flush };\n\nexport default Ribbon;\n","import React from 'react';\nimport { puree, GetInnerProps } from '@ux/pure-enhance';\nimport Shimmer from '@ux/shimmer';\nimport { ShortcodeProps } from './';\nimport { Colorway } from '@ux/theme-utils';\n\nexport interface OuterProps {\n against?: Colorway,\n code: ShortcodeProps,\n}\n\n// random % width for shimmer betwen 50% and 95%\nconst randomWidth = () => Math.floor((Math.random() * (95 - 50)) + 50);\n\nconst enhance = puree('PendingShortcode')();\n\ntype InnerProps = GetInnerProps;\n\nconst PurePendingShortcode = ({\n code,\n against,\n}: InnerProps) => (\n \n \n \n);\n\nexport default enhance(PurePendingShortcode);\n","import React from 'react';\nimport * as r from 'ramda';\nimport pureEnhance from '@ux/pure-enhance';\nimport { RecursiveShortcodeProps } from './Shortcode';\n\nexport default pureEnhance(\n 'Alt',\n)(({\n RecursiveShortcode,\n elements,\n theme,\n against,\n ...rest\n}) => (\n \n \n \n));\n","import React from 'react';\nimport { RecursiveShortcodeProps } from './Shortcode';\nimport pureEnhance from '@ux/pure-enhance';\n\nexport default pureEnhance(\n 'Bold',\n)(({ elements, RecursiveShortcode, ...rest }) => (\n \n \n \n));\n","import React from 'react';\nimport pureEnhance from '@ux/pure-enhance';\nimport { RecursiveShortcodeProps } from './Shortcode';\n\nexport default pureEnhance(\n 'Bold',\n)(({ elements, RecursiveShortcode, ...rest }) => (\n \n \n \n));","import React from 'react';\nimport { withProps } from '@team-griffin/rehook';\nimport TextButton, {\n Size as TextButtonSize,\n} from '@ux/text-button';\nimport { connect } from '@ux/fabric';\nimport { selectors as wlSelectors } from '@ux/whitelabel';\nimport pureEnhance from '@ux/pure-enhance';\nimport * as r from 'ramda';\nimport { RecursiveShortcodeProps } from './Shortcode';\n\nconst getUsfConfig = wlSelectors.getAppConfig('usf');\n\nconst mapStateToProps = r.pipe(\n getUsfConfig,\n r.pathOr([], [ 'externalRoutes' ]),\n r.objOf('externalRoutes'),\n);\n\nexport default pureEnhance(\n 'Link', [\n //@ts-ignore (apparently incompatible states)\n withProps(connect(mapStateToProps)),\n ])(({\n RecursiveShortcode,\n elements,\n contentType,\n attributes,\n theme,\n against,\n externalRoutes,\n ...rest\n}) => (\n \n \n \n));\n","import React, { Fragment } from 'react';\nimport { isFalse } from '@team-griffin/capra';\nimport * as r from 'ramda';\nimport pureEnhance from '@ux/pure-enhance';\n\nconst escapeShortCodes = r.pipe(\n r.replace('[!', '['),\n r.replace('!/]', '/]'),\n r.replace('[/!', '[/'),\n);\n\nconst nl2br = (string: string) => string.split('\\n')\n .map(r.identity)\n //@ts-ignore typescript cant figure typing out\n // eslint-disable-next-line react/no-array-index-key\n .reduce((prev, cur, i) => [ prev, (
), cur ]);\n\nconst formatText = (text: string, newline: boolean|Element) => r.pipe(\n escapeShortCodes,\n // unless newline is false, run through nl2br\n r.unless(\n r.always(isFalse(newline)),\n nl2br,\n ),\n)(text);\n\ninterface Props {\n text: string,\n nl2br: Element,\n}\nexport default pureEnhance(\n 'Text',\n)(({ text, nl2br }) => (\n \n {formatText(text, nl2br)}\n \n));\n","import React, { lazy, Suspense } from 'react';\nimport { withProps } from '@team-griffin/rehook';\nimport TextButton, { Size as TextButtonSize } from '@ux/text-button';\nimport { withBreakpointsHook } from '@ux/responsive';\nimport { gu2px } from '@ux/theme-utils';\nimport pureEnhance from '@ux/pure-enhance';\nimport { RecursiveShortcodeProps } from './Shortcode';\n\n/*\n React-Tooltip is a heavy dependency therefore we asynchronously load it in\n and gracefully decorate the functionality in once it has loaded\n*/\nconst ReactTooltip = lazy(() => import(\n /* webpackChunkName: \"react-tooltip-lite\" */\n 'react-tooltip-lite'\n));\n\nexport default pureEnhance(\n 'TooltipShortcode', [\n withBreakpointsHook,\n withProps(({\n theme,\n isMinLg,\n }: RecursiveShortcodeProps) => {\n return {\n eventToggle: isMinLg ? void 0 : 'onClick',\n padding: `${gu2px(2, theme.spacing)}px`, // requires String; gross\n };\n }),\n ],\n)(({\n RecursiveShortcode,\n theme,\n against,\n padding,\n eventToggle,\n attributes,\n elements,\n}) => {\n const CallToAction = (\n \n {attributes.label}\n \n );\n\n return (\n \n {/*@ts-ignore children doesnt exist */}\n \n \n \n )}\n >\n {CallToAction}\n \n \n );\n});\n","import React, { Fragment, Suspense, lazy, ReactNode } from 'react';\nimport pureEnhance from '@ux/pure-enhance';\nimport PendingShortcode from './PendingShortcode';\nimport { getAgainst } from 'presentation/utils/colorway';\nimport { nuller } from '@team-griffin/capra';\nimport { Theme } from '@ux/theme-utils';\nimport { Layout } from 'domain/constants/layout';\nimport { Styles } from './stylesheets';\nimport { BreakpointProps } from '@ux/responsive';\nimport { ShortcodeProps } from '.';\nimport * as r from 'ramda';\nimport { Against } from '@ux/button';\n\n/*\n These shortcodes should not be lazy loaded in as they are already in the\n main bundle and it causes a unnecessary shimmer which makes the page feel\n less responsive\n*/\nimport Alt from './Alt';\nimport Bold from './Bold';\nimport Italic from './Italic';\nimport Link from './Link';\nimport Text from './Text';\nimport Tooltip from './Tooltip';\n\nconst Glyph = lazy(() => import(\n /* webpackChunkName: \"shortcode-glyph\" */\n './Glyph'\n));\n\nconst Sup = lazy(() => import(\n /* webpackChunkName: \"shortcode-sup\" */\n './Sup'\n));\n\nconst List = lazy(() => import(\n /* webpackChunkName: \"shortcode-list\" */\n './List'\n));\n\nconst OrderedList = lazy(() => import(\n /* webpackChunkName: \"shortcode-ordered-list\" */\n './OrderedList'\n));\n\nconst ListItem = lazy(() => import(\n /* webpackChunkName: \"shortcode-list-item\" */\n './ListItem'\n));\n\nconst TickListItem = lazy(() => import(\n /* webpackChunkName: \"shortcode-tick-list-item\" */\n './TickListItem'\n));\n\nconst ProductPrice = lazy(() => import(\n /* webpackChunkName: \"shortcode-product-price\" */\n './ProductPrice'\n));\n\nconst PhoneNumber = lazy(() => import(\n /* webpackChunkName: \"shortcode-phone-number\" */\n './PhoneNumber'\n));\n\ndeclare const i: number;\ndeclare const element: ShortcodeProps;\n\nexport interface RecursiveShortcodeProps extends BreakpointProps{\n elements: ShortcodeProps[],\n layout?: Layout,\n RecursiveShortcode: React.LazyExoticComponent,\n theme?: Theme,\n against?: Against,\n styles?: Styles,\n attributes?: {\n use?: string,\n number?: number,\n analyticskey?: string,\n goto?: string,\n label?: ReactNode,\n prices?: string,\n inctax?: string,\n }\n nl2br?: boolean,\n rest: {\n [key: string]: any,\n }\n [key: string]: any,\n}\nconst RecursiveShortcode = ({ elements, ...rest }: RecursiveShortcodeProps) => (\n \n \n \n \n \n);\n\nexport interface ShortcodeOuterProps {\n theme?: Theme,\n against?: Against,\n RecursiveShortcode: React.LazyExoticComponent,\n code: RecursiveShortcodeProps,\n}\n\nfunction genericShortcodeHandler(\n shortcodeName: string,\n Component: React.LazyExoticComponent | React.ComponentType,\n) {\n return [\n r.both(\n r.propEq('type', 'element'),\n r.propEq('name', shortcodeName),\n ),\n (props: ShortcodeOuterProps) => (\n \n ),\n ];\n}\n\nconst Shortcode = ({ code, ...rest }: ShortcodeOuterProps) => {\n const props = r.pipe(\n r.ifElse(\n () => r.is(String, code),\n r.assoc('code', code),\n r.mergeDeepLeft(code),\n ),\n r.over(\n r.lensProp('against'),\n (colorway) => getAgainst(colorway),\n ),\n r.assoc('RecursiveShortcode', RecursiveShortcode),\n r.over(\n r.lensProp('attributes'),\n r.defaultTo({}),\n ),\n )(rest);\n\n // @ts-ignore\n const Element = r.cond([\n [\n r.isNil,\n nuller,\n ],\n [\n r.propIs(String, 'code'),\n () => (\n //@ts-ignore\n \n ),\n ],\n [\n r.propEq('type', 'text'),\n () => (\n \n ),\n ],\n genericShortcodeHandler('i', Italic),\n genericShortcodeHandler('b', Bold),\n genericShortcodeHandler('alt', Alt),\n genericShortcodeHandler('sup', Sup),\n genericShortcodeHandler('glyph', Glyph),\n genericShortcodeHandler('tel', PhoneNumber),\n genericShortcodeHandler('link', Link),\n genericShortcodeHandler('productprice', ProductPrice),\n genericShortcodeHandler('tooltip', Tooltip),\n [\n r.both(\n r.propEq('type', 'element'),\n r.propEq('name', 'list'),\n ),\n () => r.ifElse(\n r.propEq('style', 'number'),\n () => (\n \n ),\n () => (\n \n ),\n )(props.attributes),\n ],\n [\n r.both(\n r.propEq('type', 'element'),\n r.propEq('name', 'li'),\n ),\n () => r.ifElse(\n r.propEq('style', 'glyph'),\n () => (\n \n ),\n () => (\n \n ),\n )(props.attributes),\n ],\n //@ts-ignore\n genericShortcodeHandler('root', RecursiveShortcode),\n [\n r.T,\n nuller,\n ],\n ]);\n\n return (\n \n );\n};\n\nconst ShortcodeWrapper = (props: ShortcodeOuterProps) => (\n \n )}\n >\n \n \n);\n\nconst enhance = pureEnhance('Shortcode');\n\nexport default enhance(ShortcodeWrapper);\n","import Shortcode, { RecursiveShortcodeProps } from './Shortcode';\n\n//TODO: help.. please.\nexport type ShortcodeProps = RecursiveShortcodeProps;\n\n\nexport default Shortcode;\n","import React from 'react';\nimport * as r from 'ramda';\n\nexport default (BaseComponent: any) => r.ifElse(\n r.prop('visible'),\n (props) => ,\n (props) => (\n
\n \n
\n ),\n);\n","import {\n compose,\n} from 'recompose';\nimport { connect } from 'react-redux';\nimport { getCurrentLanguage } from 'domain/selectors/ribbons';\n\nexport default (BaseComponent: any) => {\n return compose(\n connect((state) => {\n return {\n currentLanguage: getCurrentLanguage(state),\n };\n }),\n )(BaseComponent);\n};\n","export default (url: string, language: string) => {\n if (url && url.length && language) {\n let parsedLanguage;\n if (language.split('-').length === 2) {\n parsedLanguage = [\n language.split('-')[0],\n language.split('-')[1].toUpperCase(),\n ].join('-');\n } else {\n parsedLanguage = language;\n }\n return url.replace('{{language}}', parsedLanguage);\n }\n return url;\n};","/*\n createImageAlt({\n illustration: ?String,\n imageUrl: String,\n });\n\n Returns a relevant alt tag text from the URL path\n*/\n\nimport { isNotNilOrEmpty } from '@team-griffin/capra';\nimport * as r from 'ramda';\n\nconst hasImage = r.propSatisfies(isNotNilOrEmpty, 'imageUrl');\n\n/*\n getImageName\n From a URL like https://img1.wsimg.com/cdn/Image/All/Website/2/en-GB/ad586f1e-81a0-4a9d-a675-e266e25e965f/Christian_Jaroljmek.jpg\n return the text between the final slash and dot (Christian_Jaroljmek)\n\n If no regex match, return the string as is (this will capture illustrations)\n*/\nconst getImageName = (str: string) => {\n if (typeof str !== 'string') {\n return '';\n }\n\n const image = str.match(/\\/([^/]+?)\\.[a-zA-Z0-9]+$/);\n\n if (image && image[1]) {\n return image[1];\n }\n\n return str;\n};\n\n/*\n formatName\n Replace any underscores and hyphens with whitespace\n*/\nconst formatName = (str: string) => str.replace(/[-_]/g, ' ');\n\n// eslint-disable-next-line no-underscore-dangle\nexport const __test__ = {\n getImageName,\n formatName,\n};\n\nexport default r.ifElse(\n hasImage,\n r.pipe(\n r.prop('imageUrl'),\n getImageName,\n formatName,\n ),\n r.always(''),\n);","import React from 'react';\nimport {\n defaultProps,\n} from '@team-griffin/rehook';\nimport Button, {\n Against,\n Status,\n Size,\n} from '@ux/reactive-button';\nimport callToAction from 'presentation/hocs/callToAction';\nimport * as r from 'ramda';\nimport pureEnhance from '@ux/pure-enhance';\nimport { Theme } from '@ux/theme-utils';\nimport { CTA } from 'core/ribbons/cta';\nimport { Product } from '@ux/product';\n\ninterface OuterProps extends CTA {\n product?: Product,\n theme: Theme,\n against?: Against,\n block?: boolean,\n size?: Size,\n ribbonId: string,\n index: number,\n glyph?: string,\n}\ninterface DefaultProps extends OuterProps {\n against: Against,\n}\ninterface InnerProps extends DefaultProps {\n addingStatus: Status,\n handleClick: (props: any) => () => void,\n}\n\nconst PureCallToAction = ({\n kind,\n against,\n label,\n addingStatus,\n handleClick,\n ...props\n}: InnerProps) => {\n const status = r.cond([\n [ r.equals('REQUESTED'), r.always(Status.PENDING) ],\n [ r.equals('SUCCESS'), r.always(Status.SUCCESS) ],\n [ r.equals('FAILED'), r.always(Status.FAILURE) ],\n [ r.T, r.always(Status.DEFAULT) ],\n ])(addingStatus);\n\n const goto = r.pathOr(null, [ 'behavior', 'goto' ], props);\n\n const buttonProps = r.omit([\n 'colorway',\n 'actions',\n 'buttonId',\n 'ribbonId',\n 'index',\n 'behavior',\n 'handlePlayVideoClick',\n 'handleSetVisibilityClick',\n 'handleConfigureClick',\n 'handleApplyVoucherClick',\n 'handleAddToBasketClick',\n 'handleNavigateClick',\n 'handleAnalytics',\n 'ribbonList',\n ], props);\n\n return (\n \n {label}\n \n );\n};\n\nexport const enhance = pureEnhance(\n 'CallToAction',\n {\n hocs: [\n callToAction,\n ],\n hooks: [\n defaultProps({\n against: Against.LIGHT,\n }),\n ],\n },\n);\n\nexport default enhance(PureCallToAction);\n","export enum Behavior {\n NAVIGATION = 'navigation',\n ADD_TO_BASKET = 'addToBasket',\n APPLY_VOUCHER = 'APPLY_VOUCHER',\n CONFIGURE = 'configure',\n SET_VISIBILITY = 'changeActiveVisibilitySet',\n PLAY_VIDEO = 'playVideo',\n}\n\nexport default null;\n","import {\n compose,\n defaultProps,\n withProps,\n withHandlers,\n} from 'recompose';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport * as r from 'ramda';\nimport { addToBasket, applyVoucher } from 'application/signals/basket';\nimport { setVisibility } from 'application/signals/ribbons';\nimport {\n productClicked,\n promotionClicked,\n productAddToBasket,\n} from 'application/signals/cta';\nimport { getAddingStatus } from 'domain/selectors/basket';\nimport { getExternalRoutes } from 'domain/selectors/common';\nimport { createRibbonName } from 'domain/transformers/ribbons';\nimport { getRibbon } from 'domain/selectors/ribbons';\nimport { Behavior } from 'domain/constants/callToAction';\nimport { push } from 'connected-react-router';\nimport { signals } from '@team-griffin/redux-modal-router';\nimport { isNotNilOrEmpty } from '@team-griffin/capra';\nimport { selectors } from '@ux/product';\nimport qs from 'qs';\n\nconst formatPricingTier = r.pipe(\n r.converge(\n r.unapply(r.identity),\n [\n r.prop('paymentInterval'),\n r.prop('term'),\n ],\n ),\n // if both interval and term are null then we don't want to return anything\n r.ifElse(\n r.all(r.isNil),\n r.always(void 0),\n r.pipe(\n r.map(r.defaultTo('')),\n r.join(':'),\n ),\n ),\n);\n\nconst mapStateToProps = (state, props) => {\n const buttonId = `${props.ribbonId}-cta-${props.index}`;\n const externalRoutes = getExternalRoutes(state);\n const ribbon = getRibbon(props.ribbonId)(state);\n const ribbonType = r.prop('type', ribbon);\n const ribbonName = r.path([ 'props', 'name' ], ribbon);\n const product = r.path(['product' ], props);\n\n const ribbonList = createRibbonName(ribbonType, ribbonName);\n return {\n externalRoutes,\n addingStatus: getAddingStatus(buttonId)(state),\n buttonId,\n ribbonList,\n product,\n };\n};\n\nconst mapDispatchToProps = (dispatch) => bindActionCreators({\n addToBasket,\n applyVoucher,\n setVisibility,\n push,\n openReduxModal: signals.open,\n productClicked,\n promotionClicked,\n productAddToBasket,\n}, dispatch);\n\nconst mergeProps = (stateProps, dispatchProps, ownProps) => {\n return {\n ...stateProps,\n ...ownProps,\n actions: {\n ...dispatchProps,\n ...ownProps.actions,\n },\n };\n};\n\nexport default compose(\n defaultProps({\n behavior: {},\n }),\n connect(\n mapStateToProps,\n mapDispatchToProps,\n mergeProps,\n ),\n withHandlers({\n handleAnalytics: (props) => () => {\n const ctaType = r.path([ 'behavior', 'type' ], props);\n const type = r.path([ 'behavior', 'analytics', 'type' ], props);\n const list = r.prop('ribbonList', props);\n const product = r.prop('product', props);\n\n if (type === 'PRODUCT') {\n const productId = r.path([ 'behavior', 'analytics', 'productId' ], props);\n props.actions.productClicked({\n productId,\n list,\n });\n } else if (type === 'PROMOTION') {\n const promotion = r.path([ 'behavior', 'analytics', 'promotion' ], props);\n props.actions.promotionClicked({ promotion });\n } else if (ctaType === 'addToBasket') {\n props.actions.productAddToBasket({\n list,\n product,\n });\n }\n },\n }),\n withHandlers({\n handleAddToBasketClick: (props) => () => {\n const {\n buttonId,\n product,\n actions: {\n addToBasket,\n },\n behavior: {\n productId,\n postAction,\n pricingTier,\n },\n handleAnalytics,\n } = props;\n const productData = {\n name: product ? product.name : null,\n price: product ? selectors.getPrice({product, includeTax: false}) : null,\n category: product ? product.categoryName : null,\n };\n addToBasket(\n buttonId,\n productId,\n postAction,\n formatPricingTier(pricingTier),\n 1, //quantity\n productData,\n );\n\n handleAnalytics();\n },\n handleNavigateClick: ({ handleAnalytics }) => () => {\n handleAnalytics();\n },\n handleApplyVoucherClick: ({\n buttonId,\n actions: {\n applyVoucher,\n },\n behavior: {\n voucherCode,\n postAction,\n },\n }) => () => {\n applyVoucher(buttonId, voucherCode, postAction);\n },\n handleConfigureClick: ({\n actions: {\n push,\n },\n behavior: {\n productId,\n initialSku,\n pricingTier,\n },\n }) => () => {\n const query = qs.stringify({\n productId,\n initialSku,\n pricingTier: formatPricingTier(pricingTier),\n });\n push({\n pathname: '/configuration',\n search: `?${query}`,\n });\n },\n handleSetVisibilityClick: ({\n actions: {\n setVisibility,\n },\n behavior,\n }) => () => {\n setVisibility(behavior.visibilitySet);\n },\n handlePlayVideoClick: ({\n actions: {\n openReduxModal,\n },\n behavior: {\n videoId,\n provider,\n },\n }) => () => {\n openReduxModal({\n route: 'PLAY_VIDEO',\n params: {\n videoId,\n provider,\n },\n });\n },\n }),\n withProps((ownerProps) => ({\n handleClick: r.cond([\n [\n r.propEq('type', Behavior.ADD_TO_BASKET),\n r.always(ownerProps.handleAddToBasketClick),\n ],\n [\n r.propEq('type', Behavior.APPLY_VOUCHER),\n r.always(ownerProps.handleApplyVoucherClick),\n ],\n [\n r.propEq('type', Behavior.CONFIGURE),\n r.always(ownerProps.handleConfigureClick),\n ],\n [\n r.propEq('type', Behavior.SET_VISIBILITY),\n r.always(ownerProps.handleSetVisibilityClick),\n ],\n [\n r.propEq('type', Behavior.PLAY_VIDEO),\n r.always(ownerProps.handlePlayVideoClick),\n ],\n [\n r.propEq('type', Behavior.NAVIGATION),\n r.always(ownerProps.handleNavigateClick),\n ],\n [\n r.T,\n // noop\n r.always(r.always(null)),\n ],\n ])(ownerProps.behavior),\n // add an analytics prefixed `id` to the cta if required\n id: r.ifElse(\n r.pathSatisfies(isNotNilOrEmpty, [ 'analytics', 'linkAttribution' ]),\n ({ analytics }) => `usf-cta-${analytics.linkAttribution}`,\n r.always(ownerProps.id),\n )(ownerProps.behavior),\n })),\n);\n","\n// /*\n// createImageUrl(\n// {\n// illustration: ?String,\n// imageUrl: ?String,\n// },\n// theme,\n// currentLanguage,\n// );\n\n// Returns a painbtrush URL if an illustration is provided,\n// otherwise returns a static imageUrl\n// */\n\nimport { createPaintbrushUrl } from '@ux/illustrations';\nimport { isNotNilOrEmpty } from '@team-griffin/capra';\nimport * as r from 'ramda';\nimport urlLanguageParse from 'presentation/utils/urlLanguageParse';\nimport { Theme } from '@ux/theme-utils';\n\nconst hasIllustration = r.propSatisfies(isNotNilOrEmpty, 'illustration');\n\nexport default (\n media: {\n illustration: string,\n imageUrl: string\n },\n theme: Theme,\n currentLanguage?: string,\n) => r.ifElse(\n hasIllustration,\n () => createPaintbrushUrl(media.illustration, theme),\n () => urlLanguageParse(media.imageUrl, currentLanguage),\n)(media);"],"sourceRoot":""}