{"version":3,"sources":["webpack:///./presentation/components/ribbons/filmstrip/Image.tsx","webpack:///./presentation/components/ribbons/filmstrip/Image.stylesheet.ts","webpack:///./presentation/components/ribbons/filmstrip/Filmstrip.tsx","webpack:///src/presentation/components/ribbons/filmstrip/Filmstrip.stylesheet.ts","webpack:///./presentation/components/ribbons/filmstrip/index.ts","webpack:///./presentation/utils/ribbonPadding.ts","webpack:///src/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/utils/getBreakpoints.ts","webpack:///./presentation/hocs/visibilitySet.tsx","webpack:///./domain/constants/alignment.ts","webpack:///./presentation/utils/urlLanguageParse.ts","webpack:///./presentation/hocs/withLanguage.ts","webpack:///./presentation/utils/createImageAlt.ts","webpack:///./presentation/utils/responsiveColumns.ts","webpack:///./domain/constants/imageAspectRatio.ts","webpack:///./presentation/utils/imageAspectRatioPercentage.ts","webpack:///../node_modules/ramda/es/zipWith.js"],"names":["enhance","pureEnhance","hocs","withLanguage","hooks","withProps","ownerProps","alt","createImageAlt","media","imageAspectRatio","useStyles","default","outer","position","width","height","paddingTop","imageAspectRatioPercentage","inner","top","left","right","bottom","overflow","image","transform","styles","currentLanguage","style","loading","src","urlLanguageParse","imageUrl","errorBoundary","visibilitySet","withBreakpointsHook","columns","bootstrapResponsiveColumns","layout","justify","r","Alignment","STARTING","Justify","FLEX_START","CENTER","theme","spacing","isMinLg","row","cssSides","Side","gu2px","item","id","colorway","name","items","Ribbon","type","key","i","xs","sm","lg","Image","Filmstrip","isMinSm","flush","shrinkLeading","shrinkTrailing","getPaddingSize","shrinkSide","isFlush","leading","Flush","LEADING","trailing","TRAILING","paddingBottom","stylesheet","useTheme","useBreakpoints","root","backgroundColor","getBackgroundColor","color","getTitleColor","ribbonPadding","textAlign","isMinMd","ErrorBoundary","compose","withState","lifecycle","componentDidCatch","this","hooksA","pipe","mapProps","props","selector","useMemo","getRibbonAnalytics","analytics","useSelector","dispatch","useDispatch","actions","bindActionCreators","sendImpression","withHandlers","onImpression","ribbonName","ribbonType","hooksB","isFullyInViewport","stopWatcher","useEffect","mapPropsHoc","branch","Watch","deepLink","withRouter","componentDidMount","location","hash","scrollWhenReady","animationComplete","setTimeout","scroller","scrollTo","duration","delay","smooth","WrappedComponent","mapFit","fit","Fit","FULLSCREEN","minHeight","FILL","flex","flexBasis","AUTO","isFinite","targetRef","useRef","palette","duoLayout","activeFit","findResponsiveItem","getBreakpoints","padding","duoLayoutFlex","duoRibbonWidth","display","flexDirection","percentage","ribbon","modifier","Colorway","PRIMARY_GRADIENT","backgroundImage","primary","primaryGradient","children","ref","withRibbonImpression","BaseComponent","url","language","length","parsedLanguage","split","toUpperCase","join","replace","connect","state","getCurrentLanguage","hasImage","isNotNilOrEmpty","getImageName","str","match","formatName","responsiveColumns","defaultColumns","desiredColumns","a","b","ImageAspectRatio","ratio","W16H9","W4H3","W1H1","W32H9","W64H9","W3H4","W9H16","W9H32","zipWith","fn","rv","idx","len","Math","min"],"mappings":"wOAsDeA,MAdQC,YACrB,iBAAkB,CAChBC,KAAM,CACJC,KAEFC,MAAO,CACLC,oBAAWC,IAAD,CACRC,IAAKC,YAAeF,EAAWG,UAEjCJ,oBCtCS,EAAGK,sBAA8DC,YAAU,CACxFC,QAAS,CACPC,MAAO,CACLC,SAAU,WACVC,MAAO,OACPC,OAAQ,EACRC,WAAYC,YAA2BR,IAEzCS,MAAO,CACLL,SAAU,WACVM,IAAK,EACLC,KAAM,EACNC,MAAO,EACPC,OAAQ,EACRC,SAAU,UAEZC,MAAO,CACLX,SAAU,WACVM,IAAK,MACLM,UAAW,mBACXX,MAAO,OACPC,OAAQ,cDsBChB,CAhCmB,EAChC2B,SACAlB,QACAF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,EAAM,GACVA,EAAM,GAGRgK,GAOHE,EAAcF,GAAgBA,EAAIP,QAAQ,QAAS,KAQ1CzI,QACb6I,EACA7I,IACEA,IAAO,YACP+I,EACAG,GAEFlJ,IAAS,M,oBCtDX,kFAGA,MAAMmJ,EAAoB,CACxBC,EACAC,IACGrJ,IACHA,IAAY,CAAE,KAAM,KAAM,OAC1BA,IAAU,CAACsJ,EAAGC,IACH,MAALA,EACKD,EAEFC,EACNH,GAPApJ,CAQHqJ,GAEWxJ,EAA6BG,IACxCmJ,EACAnJ,IAAMA,IAAS,MAGFmJ,O,oBCrBR,IAAKK,E,2CAAAA,K,aAAAA,E,WAAAA,E,WAAAA,E,aAAAA,E,aAAAA,E,WAAAA,E,aAAAA,E,cAAAA,M,KCEL,MAAM/K,EAA8BgL,KACO,CAC9C,CAACD,EAAiBE,OAAQ,MAC1B,CAACF,EAAiBG,MAAO,GACzB,CAACH,EAAiBI,MAAO,IACzB,CAACJ,EAAiBK,OAAQ,OAC1B,CAACL,EAAiBM,OAAQ,QAC1B,CAACN,EAAiBO,MAAO,SACzB,CAACP,EAAiBQ,OAAQ,SAC1B,CAACR,EAAiBS,OAAQ,UAEdR,IAAU,OAAhB,M,oBCbV,YA0BIS,EAEJ,aAAQ,SAAiBC,EAAIb,EAAGC,GAK9B,IAJA,IAAIa,EAAK,GACLC,EAAM,EACNC,EAAMC,KAAKC,IAAIlB,EAAElB,OAAQmB,EAAEnB,QAExBiC,EAAMC,GACXF,EAAGC,GAAOF,EAAGb,EAAEe,GAAMd,EAAEc,IACvBA,GAAO,EAGT,OAAOD,KAGM","file":"pex-static/40/29.b9f7cc6c3c628a9233aa.chunk.js","sourcesContent":["import React from 'react';\nimport {\n withProps,\n} from '@team-griffin/rehook';\nimport pureEnhance from '@ux/pure-enhance';\nimport stylesheet, { Styles } from './Image.stylesheet';\nimport createImageAlt from 'presentation/utils/createImageAlt';\nimport urlLanguageParse from 'presentation/utils/urlLanguageParse';\nimport withLanguage from 'presentation/hocs/withLanguage';\nimport { ImageAspectRatio } from 'domain/constants/imageAspectRatio';\n\ninterface OuterProps {\n media: {\n imageUrl: string,\n imageAspectRatio?: ImageAspectRatio,\n }\n}\ninterface InnerProps extends OuterProps {\n styles: Styles,\n currentLanguage: string,\n alt: string,\n}\nexport const PureFilmstripImage = ({\n styles,\n media,\n alt,\n currentLanguage,\n}: InnerProps) => (\n
\n
\n \n
\n
\n);\n\nexport const enhance = pureEnhance(\n 'FilmstripImage', {\n hocs: [\n withLanguage,\n ],\n hooks: [\n withProps((ownerProps: OuterProps) => ({\n alt: createImageAlt(ownerProps.media),\n })),\n withProps(stylesheet),\n ],\n }\n);\n\nexport default enhance(PureFilmstripImage);\n","import { useStyles } from '@team-griffin/stylr';\nimport { CSSProperties } from 'react';\nimport { imageAspectRatioPercentage } from 'presentation/utils/imageAspectRatioPercentage';\nimport { ImageAspectRatio } from 'domain/constants/imageAspectRatio';\n\nexport interface Styles {\n outer: CSSProperties,\n inner: CSSProperties,\n image: CSSProperties,\n}\n\nexport default ({ imageAspectRatio }: { imageAspectRatio: ImageAspectRatio}) => useStyles({\n default: {\n outer: {\n position: 'relative',\n width: '100%',\n height: 0,\n paddingTop: imageAspectRatioPercentage(imageAspectRatio),\n },\n inner: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n overflow: 'hidden',\n },\n image: {\n position: 'relative',\n top: '50%',\n transform: 'translateY(-50%)',\n width: '100%',\n height: 'auto',\n },\n },\n});\n","import React from 'react';\nimport {\n withProps,\n} from '@team-griffin/rehook';\nimport { Container, Row, Column, Justify } from '@ux/grid';\nimport PaddingBox from '@ux/padding-box';\nimport Ribbon from 'components/ribbons/Ribbon';\nimport { withBreakpointsHook, BreakpointProps } from '@ux/responsive';\nimport visibilitySet from 'presentation/hocs/visibilitySet';\nimport errorBoundary from 'presentation/hocs/errorBoundary';\nimport stylesheet, { Styles } from './Filmstrip.stylesheet';\nimport Image from './Image';\nimport * as r from 'ramda';\nimport { bootstrapResponsiveColumns } from '../../../utils/responsiveColumns';\nimport { Alignment } from 'domain/constants/alignment';\nimport { RibbonProps } from 'domain/constants/ribbons';\nimport pureEnhance from '@ux/pure-enhance';\nimport { ImageAspectRatio } from 'domain/constants/imageAspectRatio';\n\ntype ItemProps = {\n media: {\n imageUrl: string,\n imageAspectRatio?: ImageAspectRatio,\n }\n};\ninterface OuterProps extends RibbonProps {\n items: ItemProps[],\n}\nexport interface InnerProps extends OuterProps, BreakpointProps {\n styles: Styles,\n justify: Justify,\n columns?: number[],\n}\n\ndeclare const i: number;\ndeclare const item: ItemProps;\nexport const PureFilmstrip = ({\n id,\n styles,\n theme,\n colorway,\n layout,\n loading,\n name,\n items,\n justify,\n columns,\n}: InnerProps) => (\n \n \n \n
\n \n \n \n
\n \n
\n \n \n \n
\n
\n
\n \n);\n\nexport const enhance = pureEnhance(\n 'Filmstrip', {\n hocs: [\n errorBoundary,\n visibilitySet,\n ],\n hooks: [\n withBreakpointsHook,\n withProps((ownerProps: OuterProps) => ({\n columns: bootstrapResponsiveColumns([ 2, 3, 6 ], ownerProps.layout.columns),\n justify: r.ifElse(\n r.pathEq([ 'layout', 'alignment' ], Alignment.STARTING),\n r.always(Justify.FLEX_START),\n r.always(Justify.CENTER),\n )(ownerProps),\n })),\n withProps(stylesheet),\n ],\n }\n);\n\nexport default enhance(PureFilmstrip);\n","import { useStyles } from '@team-griffin/stylr';\nimport { gu2px } from '@ux/theme-utils';\nimport cssSides, { Side } from '@team-griffin/css-sides';\nimport { InnerProps } from './Filmstrip';\nimport { CSSProperties } from 'react';\n\nexport interface Styles {\n row: CSSProperties,\n item: CSSProperties,\n}\nexport default ({\n theme: {\n spacing,\n },\n isMinLg,\n}: InnerProps) => useStyles({\n default: {\n row: {\n ...cssSides('margin', Side.X, gu2px(-0.5, spacing)),\n ...cssSides('margin', Side.Y, gu2px(-1.5, spacing)),\n },\n item: {\n ...cssSides('padding', Side.X, gu2px(0.5, spacing)),\n ...cssSides('padding', Side.Y, gu2px(1.5, spacing)),\n },\n },\n isMinLg: {\n row: {\n ...cssSides('margin', Side.X, gu2px(-1, spacing)),\n ...cssSides('margin', Side.Y, gu2px(-2, spacing)),\n },\n item: {\n ...cssSides('padding', Side.X, gu2px(1, spacing)),\n ...cssSides('padding', Side.Y, gu2px(2, spacing)),\n },\n },\n}, [\n { isMinLg },\n]);\n","import Filmstrip from './Filmstrip';\n\nexport default Filmstrip;\n","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 { compose, lifecycle, withState, withProps } 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 { getBackgroundColor, getTitleColor } from 'presentation/utils/colorway';\nimport { gu2px, useTheme } 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, useBreakpoints } from '@ux/responsive';\n\ninterface OuterProps extends BreakpointProps {\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 = ({ colorway, layout, flush }: InnerProps) => {\n const { theme } = useTheme();\n const { isMinSm, isMinMd, isMinLg } = useBreakpoints();\n const { spacing } = theme;\n\n return useStyles(\n {\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 }, { isMinSm }, { 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 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","export 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: `${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 * as r from 'ramda';\nimport { BreakpointProps } from '@ux/responsive';\n\ninterface anyProps extends BreakpointProps {\n [key: string]: any,\n}\nexport default (props: anyProps) => r.pick([\n 'isMinSm',\n 'isMinMd',\n 'isMinLg',\n 'isMinXl',\n], props) as anyProps;\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","export enum Alignment {\n STARTING = 'STARTING',\n CENTER = 'CENTER',\n}\n\nexport default null;\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};","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","/*\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 * as r from 'ramda';\nimport { ResponsiveSet } from 'core/ribbons/primitives';\n\nconst responsiveColumns = (\n defaultColumns: ResponsiveSet,\n desiredColumns: ResponsiveSet\n) => r.pipe(\n r.defaultTo([ null, null, null ]),\n r.zipWith((a, b) => {\n if (b == null) {\n return a;\n }\n return b;\n }, defaultColumns),\n)(desiredColumns) as ResponsiveSet;\n\nexport const bootstrapResponsiveColumns = r.pipe(\n responsiveColumns,\n r.map(r.divide(12)),\n);\n\nexport default responsiveColumns;\n","export enum ImageAspectRatio {\n W16H9 = '16:9',\n W4H3 = '4:3',\n W1H1 = '1:1',\n W32H9 = '32:9',\n W64H9 = '64:9',\n W3H4 = '3:4',\n W9H16 = '9:16',\n W9H32 = '9:32',\n}\n","import { ImageAspectRatio } from 'domain/constants/imageAspectRatio';\n\nexport const imageAspectRatioPercentage = (ratio: ImageAspectRatio) => {\n const map: {[key in ImageAspectRatio]:number} = {\n [ImageAspectRatio.W16H9]: 56.25,\n [ImageAspectRatio.W4H3]: 75,\n [ImageAspectRatio.W1H1]: 100,\n [ImageAspectRatio.W32H9]: 28.125,\n [ImageAspectRatio.W64H9]: 14.0625,\n [ImageAspectRatio.W3H4]: 133.3333,\n [ImageAspectRatio.W9H16]: 177.7778,\n [ImageAspectRatio.W9H32]: 355.5556,\n };\n return `${map[ratio] || 56.25}%`;\n};\n","import _curry3 from \"./internal/_curry3.js\";\n/**\n * Creates a new list out of the two supplied by applying the function to each\n * equally-positioned pair in the lists. The returned list is truncated to the\n * length of the shorter of the two input lists.\n *\n * @function\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig ((a, b) -> c) -> [a] -> [b] -> [c]\n * @param {Function} fn The function used to combine the two elements into one value.\n * @param {Array} list1 The first array to consider.\n * @param {Array} list2 The second array to consider.\n * @return {Array} The list made by combining same-indexed elements of `list1` and `list2`\n * using `fn`.\n * @example\n *\n * const f = (x, y) => {\n * // ...\n * };\n * R.zipWith(f, [1, 2, 3], ['a', 'b', 'c']);\n * //=> [f(1, 'a'), f(2, 'b'), f(3, 'c')]\n * @symb R.zipWith(fn, [a, b, c], [d, e, f]) = [fn(a, d), fn(b, e), fn(c, f)]\n */\n\nvar zipWith =\n/*#__PURE__*/\n_curry3(function zipWith(fn, a, b) {\n var rv = [];\n var idx = 0;\n var len = Math.min(a.length, b.length);\n\n while (idx < len) {\n rv[idx] = fn(a[idx], b[idx]);\n idx += 1;\n }\n\n return rv;\n});\n\nexport default zipWith;"],"sourceRoot":""}