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AAAA,cAAiB,CAAE,gBAAiB,MAAOe,wBAAyB,CAAEC,OAAQsE,KAU9FzJ,EAAAA,cAAoBmE,EAAAA,iBAAoB,KAAM,UAAC2E,EAAOa,YAAR,iBAAC,EAAauB,aAAd,OAAC,EAAoBxF,OAA8E1F,EAAAA,cAAoBA,EAAAA,SAAgB,KAAM8I,EAAOa,KAAKuB,MAAMvC,KAAKwC,GAAUnL,EAAAA,cAAoBA,EAAAA,SAAgB,CAAEoL,IAAKD,EAAKlE,IAAM/C,EAAMkE,YAAYC,WAAcrI,EAAAA,cAAoBqL,EAAsB,IAAKF,IAAYnL,EAAAA,cAAoBsL,EAAAA,GAAkB,IAAKH,EAAMJ,aAAc7G,EAAM6G,mBAArW/K,EAAAA,cAAoBmE,EAAAA,cAAiB,KAAM,uBAR5H,UAAA2E,EAAOa,YAAP,mBAAauB,aAAb,eAAoBxF,QAAS,GAAM1F,EAAAA,cAAoBA,EAAAA,SAAgB,KACnEA,EAAAA,cAAoBuL,EAAAA,EAAY,CAAE7J,UAAW5B,EAAO4B,UAAWC,SAAU7B,EAAO6B,SAAUC,WAAYkH,EAAOa,KAAK/H,WAAYC,aAAeyF,IACrIQ,EAAU,CAAEpG,UAAW4F,GAAS,UAChCgC,GAAa,IAErBtJ,EAAAA,cAAoBmE,EAAAA,cAAiB,CAAE,gBAAiB,SAAUe,wBAAyB,CAAEC,OAAQsE,OAC3F,YAAlBX,EAAO0C,QAAwBxL,EAAAA,cAAoByL,EAAAA,EAAkB,CAAEC,MAAO,WAAiBC,OAAQ,WAC3G,IAAyB,IAGzB,SAASrC,IAELsC,YAAW,4BAAM/D,EAAaxH,eAAnB,aAAM,EAAsBgK,eAAe,CAClDC,SAAU,SACVuB,MAAO,QACPC,OAAQ,SAHD,GAIP,GACP,I","sources":["webpack://lcci/./src/hooks/useResize.ts","webpack://lcci/./src/stories/Components/Listings/Pagination/Pagination.styles.ts","webpack://lcci/./src/stories/Components/Listings/Pagination/Pagination.tsx","webpack://lcci/./src/stories/Components/Cards/PastEventListingCard/PastEventListingCard.styles.ts","webpack://lcci/./src/stories/Components/Cards/PastEventListingCard/PastEventListingCard.tsx","webpack://lcci/./src/stories/Widgets/EventListing/EventListing.styles.ts","webpack://lcci/./src/stories/Widgets/EventListing/Search/Search.styles.ts","webpack://lcci/./src/stories/Widgets/EventListing/Search/Search.tsx","webpack://lcci/./src/stories/Widgets/EventListing/EventListing.tsx"],"sourcesContent":["import debounce from 'lodash/debounce';\r\nimport * as React from 'react';\r\nexport function useResize(params) {\r\n const refWindowHeight = React.useRef();\r\n const refWindowWidth = React.useRef();\r\n const onResize = React.useCallback(debounce(() => {\r\n const prevHeight = refWindowHeight.current;\r\n const prevWidth = refWindowWidth.current;\r\n const newHeight = window.innerHeight;\r\n const newWidth = window.innerWidth;\r\n const shouldTrigger = params.on === 'both' ||\r\n (params.on === 'y' && prevHeight !== newHeight) ||\r\n (params.on === 'x' && prevWidth !== newWidth);\r\n if (shouldTrigger) {\r\n params.callback();\r\n }\r\n refWindowHeight.current = newHeight;\r\n refWindowWidth.current = newWidth;\r\n }, params.debounce), [params.debounce, params.on]);\r\n React.useEffect(() => {\r\n if (!params.callback) {\r\n return;\r\n }\r\n if (params.immediate) {\r\n onResize();\r\n }\r\n window.addEventListener('resize', onResize);\r\n return () => {\r\n window.removeEventListener('resize', onResize);\r\n };\r\n }, [params.on]);\r\n}\r\n","import { transition } from '@helpers/animate';\r\nimport brand from '@helpers/brand';\r\nimport { fluid } from '@helpers/fluid';\r\nimport fonts from '@helpers/fonts';\r\nimport { Device, until } from '@helpers/media';\r\nimport ButtonStyles from '@stories/Components/Buttons/Button/Button.styles';\r\nimport styled from 'styled-components';\r\nconst Wrapper = styled.div `\r\n display: block;\r\n user-select: none;\r\n margin-top: 40px;\r\n width: 100%;\r\n overflow: hidden;\r\n\r\n &[data-variant='white'] ul li {\r\n a,\r\n span {\r\n --colorFg: ${brand.white};\r\n --colorBorder: ${brand.white};\r\n\r\n --colorFgActive: ${brand.base.blue};\r\n --colorBgActive: ${brand.white};\r\n --colorBorderActive: ${brand.white};\r\n\r\n --colorFgComplete: ${brand.base.blue};\r\n --colorBgComplete: ${brand.white};\r\n }\r\n }\r\n\r\n ul {\r\n display: flex;\r\n flex-direction: row;\r\n place-content: center;\r\n place-items: center;\r\n width: 100%;\r\n\r\n li {\r\n ${transition('opacity')};\r\n\r\n display: inline-block;\r\n opacity: 1;\r\n padding: 0 6px;\r\n\r\n @media ${until(Device.Tablet)} {\r\n padding: 0 8px;\r\n }\r\n\r\n &:nth-child(2) {\r\n @media ${until(Device.Tablet)} {\r\n flex: 1 1 25%;\r\n display: flex;\r\n justify-content: flex-end;\r\n }\r\n }\r\n\r\n &:nth-last-child(2) {\r\n @media ${until(Device.Tablet)} {\r\n flex: 1 1 25%;\r\n }\r\n }\r\n\r\n a,\r\n span {\r\n ${transition('background-size, border-color, opacity')};\r\n ${fonts.apparat.semiBold};\r\n\r\n --borderWidth: 2px;\r\n\r\n --bgSize: 0% 100%;\r\n --colorFg: ${brand.primary.blue};\r\n --colorBg: transparent;\r\n --colorBorder: ${brand.primary.blue};\r\n\r\n --bgSizeActive: 100% 100%;\r\n --colorFgActive: ${brand.white};\r\n --colorBgActive: ${brand.primary.blue};\r\n --colorBorderActive: ${brand.primary.blue};\r\n\r\n --colorFgComplete: ${brand.white};\r\n --colorBgComplete: ${brand.base.blue};\r\n\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n border: var(--borderWidth, 0) solid var(--colorBorder, var(--colorBg));\r\n border-radius: ${fluid(24, 50)};\r\n background: var(--colorBg);\r\n background-image: linear-gradient(to right, var(--colorBgActive), var(--colorBgActive));\r\n background-repeat: no-repeat;\r\n background-size: var(--bgSize);\r\n color: var(--colorFg);\r\n height: ${fluid(40, 50)};\r\n text-decoration: none;\r\n user-select: none;\r\n width: ${fluid(40, 50)};\r\n position: relative;\r\n background-position: left center;\r\n font-size: ${fluid(16, 18)};\r\n }\r\n\r\n a {\r\n /* Mobile click styles - button should mimic press */\r\n @media ${until(Device.TabletLarge)} {\r\n ${transition('color, background-color, border-color, transform')};\r\n &:active {\r\n transform: translateY(1.5px);\r\n }\r\n }\r\n\r\n @supports selector(:focus-visible) {\r\n &:focus-visible {\r\n outline: auto;\r\n outline-offset: 3px;\r\n outline-width: 2px;\r\n outline-style: solid;\r\n }\r\n\r\n &:hover {\r\n border-color: var(--colorBorderActive, var(--colorBgActive));\r\n color: var(--colorFgActive);\r\n background-size: var(--bgSizeActive);\r\n }\r\n\r\n &:active {\r\n outline: none;\r\n color: var(--colorFgComplete);\r\n background: var(--colorBgComplete);\r\n }\r\n }\r\n\r\n @supports not selector(:focus-visible) {\r\n &:focus {\r\n outline: none;\r\n }\r\n\r\n &:focus {\r\n outline: auto;\r\n outline-offset: 3px;\r\n outline-width: 2px;\r\n outline-style: solid;\r\n }\r\n\r\n &:hover {\r\n border-color: var(--colorBorderActive, var(--colorBgActive));\r\n color: var(--colorFgActive);\r\n background-size: var(--bgSizeActive);\r\n }\r\n\r\n &:active {\r\n outline: none;\r\n color: var(--colorFgComplete);\r\n background: var(--colorBgComplete);\r\n }\r\n }\r\n }\r\n\r\n &.previous,\r\n &.next {\r\n @media ${until(Device.Tablet)} {\r\n flex: 1 0 50%;\r\n display: flex;\r\n }\r\n\r\n a {\r\n display: flex;\r\n border: none;\r\n background-color: transparent;\r\n color: var(--fgColour);\r\n border-radius: 5000px;\r\n\r\n &::after {\r\n content: none;\r\n }\r\n }\r\n }\r\n\r\n &.previous {\r\n transform: scaleX(-1);\r\n padding-left: 6px;\r\n padding-right: 6px;\r\n }\r\n\r\n &.next {\r\n padding-right: 0px;\r\n padding-left: 6px;\r\n }\r\n\r\n &.break {\r\n a {\r\n pointer-events: none;\r\n }\r\n }\r\n\r\n &.selected {\r\n a {\r\n color: var(--colorFgComplete);\r\n background: var(--colorBgComplete);\r\n }\r\n }\r\n\r\n &.disabled {\r\n cursor: default;\r\n opacity: 0.5;\r\n pointer-events: none;\r\n }\r\n }\r\n\r\n ${ButtonStyles.IconWrapper} svg {\r\n transform: none;\r\n }\r\n }\r\n`;\r\nexport default {\r\n Wrapper,\r\n};\r\n","import { Device, until } from '@helpers/media';\r\nimport Button from '@stories/Components/Buttons/Button/Button';\r\nimport React from 'react';\r\nimport ReactPaginate from 'react-paginate';\r\nimport { useMedia } from 'react-use';\r\nimport PaginationStyles from './Pagination.styles';\r\nconst Pagination = ({ pageIndex, pageSize, totalCount, onPageChange, variant = 'blue', }) => {\r\n const isMobile = useMedia(until(Device.Tablet), false);\r\n const pageRange = isMobile ? 1 : 3;\r\n return (React.createElement(PaginationStyles.Wrapper, { \"data-variant\": variant },\r\n React.createElement(ReactPaginate, { pageCount: Math.ceil(totalCount / pageSize), pageRangeDisplayed: pageRange, marginPagesDisplayed: 1, previousLabel: React.createElement(Button, { buttonType: variant === 'blue' ? 'blue-outline' : 'white-outline', icon: \"chevron\", iconOnly: true }), nextLabel: React.createElement(Button, { buttonType: variant === 'blue' ? 'blue-outline' : 'white-outline', icon: \"chevron\", iconOnly: true }), forcePage: pageIndex - 1, hrefBuilder: (page, pageCount) => page >= 1 && page <= pageCount ? `?pageIndex=${page}` : '/', hrefAllControls: true, onPageChange: ({ selected }) => {\r\n onPageChange(selected + 1);\r\n } })));\r\n};\r\nexport default Pagination;\r\n","import brand from '@helpers/brand';\r\nimport { fluid } from '@helpers/fluid';\r\nimport fonts from '@helpers/fonts';\r\nimport { imageCoverContainer, imageWrapperPreserveRatio } from '@helpers/image';\r\nimport { Device, from } from '@helpers/media';\r\nimport { paragraphSmall } from '@helpers/typography';\r\nimport CtaLinkStyles from '@stories/Components/Buttons/CtaLink/CtaLink.styles';\r\nimport Image from '@stories/Components/Misc/Image/Image';\r\nimport styled from 'styled-components';\r\nconst Container = styled.article `\r\n --shadowColour: rgba(0, 0, 0, 0.05);\r\n\r\n display: grid;\r\n grid-template-rows: 1fr auto;\r\n box-shadow: -0.1px 1px 1.1px var(--shadowColour), -0.2px 2.7px 3px -0.8px var(--shadowColour),\r\n -0.4px 6.3px 7.1px -1.7px var(--shadowColour), -0.9px 5px 16.9px -2.5px var(--shadowColour);\r\n border-radius: 10px;\r\n overflow: hidden;\r\n height: 100%;\r\n scroll-margin: var(--scrollOffset, 0px) 0 0;\r\n\r\n &[data-category='lcci-event'] {\r\n --categoryColor: ${brand.primary.orange};\r\n }\r\n\r\n &[data-category='lcci-partner'] {\r\n --categoryColor: ${brand.primary.blue};\r\n }\r\n\r\n &[data-category='member-run'] {\r\n --categoryColor: ${brand.tag.press};\r\n }\r\n`;\r\nconst ImageWrapper = styled.div `\r\n ${imageWrapperPreserveRatio(340, 227)};\r\n`;\r\nconst Img = styled(Image) `\r\n ${imageCoverContainer()};\r\n`;\r\nconst Category = styled.div `\r\n position: relative;\r\n height: 7px;\r\n background-color: var(--categoryColor, ${brand.primary.orange});\r\n`;\r\nconst CategoryTag = styled.span `\r\n ${fonts.apparat.semiBold};\r\n\r\n position: absolute;\r\n top: 50%;\r\n left: ${fluid(12, 22)};\r\n transform: translateY(-50%);\r\n background-color: var(--categoryColor, ${brand.primary.orange});\r\n color: ${brand.white};\r\n padding: ${fluid(10, 16)} ${fluid(16, 24)} ${fluid(6, 12)};\r\n border-radius: 10px;\r\n font-size: ${fluid(12, 16)};\r\n text-transform: uppercase;\r\n white-space: nowrap;\r\n box-shadow: 0px 0px 5px 0px rgb(0 0 0 / 20%);\r\n`;\r\nconst ContentWrapper = styled.div `\r\n padding: ${fluid(24, 36)} ${fluid(16, 24)} ${fluid(16, 32)};\r\n color: ${brand.base.blue};\r\n\r\n ${CtaLinkStyles.Container} {\r\n margin: ${fluid(0, 20)} 0 0;\r\n font-size: ${fluid(18, 20)};\r\n line-height: ${fluid(24, 26)};\r\n }\r\n`;\r\nconst DateTypeWrapper = styled.div `\r\n ${fonts.apparat.light};\r\n\r\n display: flex;\r\n align-items: flex-end;\r\n gap: 40px;\r\n font-size: ${fluid(12, 16)};\r\n text-transform: uppercase;\r\n margin: 0 0 ${fluid(20, 24)};\r\n\r\n > time {\r\n opacity: 0.5;\r\n line-height: ${fluid(22, 26)};\r\n letter-spacing: 0.09em;\r\n }\r\n\r\n > span {\r\n background-color: ${brand.primary.blueGrey};\r\n border-radius: 5px;\r\n padding: 11px 16px 9px;\r\n }\r\n\r\n @media ${from(Device.MobileLarge)} {\r\n gap: 16px;\r\n align-items: center;\r\n }\r\n`;\r\nconst Title = styled.h3 `\r\n ${fonts.apparat.semiBold};\r\n\r\n font-size: ${fluid(18, 24)};\r\n line-height: ${fluid(28, 34)};\r\n margin: 0 0 24px;\r\n\r\n @media ${from(Device.Tablet)} {\r\n ${fonts.apparat.medium};\r\n margin: 0 0 12px;\r\n }\r\n\r\n + ${CtaLinkStyles.Container} {\r\n margin: 0;\r\n }\r\n`;\r\nconst Info = styled.div `\r\n ${paragraphSmall};\r\n\r\n &[data-type='overview'] {\r\n display: none;\r\n\r\n @media ${from(Device.Tablet)} {\r\n display: -webkit-box;\r\n -webkit-line-clamp: 3;\r\n -webkit-box-orient: vertical;\r\n overflow: hidden;\r\n margin: 0;\r\n }\r\n }\r\n\r\n &[data-type='tags'] {\r\n opacity: 0.5;\r\n border-top: 1px solid ${brand.secondary.blueGrey};\r\n margin: ${fluid(18, 22)} 0 0;\r\n padding: ${fluid(16, 24)} 0 0;\r\n }\r\n`;\r\nconst PastEventListingCardStyles = {\r\n Container,\r\n ImageWrapper,\r\n Img,\r\n Category,\r\n CategoryTag,\r\n ContentWrapper,\r\n DateTypeWrapper,\r\n Title,\r\n Info,\r\n};\r\nexport default PastEventListingCardStyles;\r\n","import { formatDate, formatDateISO } from '@helpers/date';\r\nimport { imageUrl } from '@helpers/image';\r\nimport CtaLink from '@stories/Components/Buttons/CtaLink/CtaLink';\r\nimport * as React from 'react';\r\nimport { EventLocationType, getCategoryTitle, } from '../EventListingCard/EventListingCard';\r\nimport S from './PastEventListingCard.styles';\r\nconst PastEventListingCard = (props) => {\r\n return (React.createElement(S.Container, { \"data-category\": props.category },\r\n React.createElement(S.ImageWrapper, null,\r\n React.createElement(S.Img, { src: imageUrl(props.image, {}), alt: props.image.altText, loading: 'lazy' })),\r\n React.createElement(S.Category, null,\r\n React.createElement(S.CategoryTag, null, getCategoryTitle(props.category))),\r\n React.createElement(S.ContentWrapper, null,\r\n React.createElement(S.DateTypeWrapper, null,\r\n React.createElement(\"time\", { dateTime: formatDateISO(props.date) }, formatDate(props.date, 'LLLL yyyy')),\r\n props.location && React.createElement(\"span\", null, props.location)),\r\n React.createElement(S.Title, null, props.title),\r\n React.createElement(S.Info, { \"data-type\": \"overview\", dangerouslySetInnerHTML: { __html: props.overview } }),\r\n props.url && (React.createElement(CtaLink, { href: props.url }, props.location === EventLocationType.Webinar ? 'Watch Webinar' : 'Read Summary')),\r\n props.categoryTags && props.categoryTags.length > 0 ? (React.createElement(S.Info, { \"data-type\": \"tags\", dangerouslySetInnerHTML: { __html: props.categoryTags.join(' | ') } })) : null)));\r\n};\r\nexport default PastEventListingCard;\r\n","import brand from '@helpers/brand';\r\nimport { fluid } from '@helpers/fluid';\r\nimport fonts from '@helpers/fonts';\r\nimport { baseGrid, SiteWidthBreakpoint } from '@helpers/grid';\r\nimport { Device, from } from '@helpers/media';\r\nimport { headingStyles, paragraphLarge } from '@helpers/typography';\r\nimport EventListingCardStyles from '@stories/Components/Cards/EventListingCard/EventListingCard.styles';\r\nimport PastEventListingCardStyles from '@stories/Components/Cards/PastEventListingCard/PastEventListingCard.styles';\r\nimport SectionWrapper from '@stories/Components/Misc/SectionWrapper/SectionWrapper';\r\nimport styled from 'styled-components';\r\nconst Container = styled(SectionWrapper) `\r\n overflow: hidden;\r\n margin-bottom: var(--sectionSpacing);\r\n`;\r\nconst TopWrapper = styled.div `\r\n position: relative;\r\n padding: ${fluid(32, 48)} 0 ${fluid(48, 64)};\r\n\r\n &::before,\r\n &::after {\r\n content: '';\r\n height: 100%;\r\n position: absolute;\r\n z-index: 1;\r\n top: 0;\r\n }\r\n\r\n &::before {\r\n left: 50%;\r\n transform: translateX(-50%);\r\n width: 100vw;\r\n background-color: ${brand.primary.blueGrey};\r\n }\r\n\r\n &::after {\r\n --width: ${fluid(146, 232)};\r\n\r\n right: calc(var(--sitePadding) * -1);\r\n width: var(--width);\r\n background-color: ${brand.secondary.blueGrey};\r\n border-radius: 5000px 0 0 5000px;\r\n\r\n @media ${from(SiteWidthBreakpoint)} {\r\n right: calc((100vw - (var(--siteWidth) - (var(--sitePadding) * 2))) * -0.5);\r\n }\r\n }\r\n`;\r\nconst Title = styled.h2 `\r\n ${headingStyles};\r\n\r\n font-size: ${fluid(22, 26)};\r\n line-height: ${fluid(32, 36)};\r\n text-align: center;\r\n position: relative;\r\n z-index: 2;\r\n margin: 0 0 24px;\r\n`;\r\nconst ResultsContainer = styled.div `\r\n ${baseGrid};\r\n\r\n row-gap: ${fluid(24, 80)};\r\n scroll-margin: var(--scrollOffset, 0px) 0 0;\r\n\r\n ${PastEventListingCardStyles.Container},\r\n ${EventListingCardStyles.Container} {\r\n grid-column: span 24;\r\n }\r\n\r\n ${PastEventListingCardStyles.Container} {\r\n @media ${from(Device.Tablet)} {\r\n grid-column: span 12;\r\n }\r\n\r\n @media ${from(Device.TabletLarge)} {\r\n grid-column: span 8;\r\n }\r\n\r\n @media ${from(Device.DesktopSmall)} {\r\n grid-column: span 6;\r\n }\r\n }\r\n`;\r\nconst NoResultsText = styled.p `\r\n ${paragraphLarge};\r\n\r\n grid-column: span 24;\r\n text-align: center;\r\n margin-top: ${fluid(16, 24)};\r\n`;\r\nconst PagingSummary = styled.div `\r\n ${fonts.apparat.medium};\r\n\r\n font-size: ${fluid(18, 20)};\r\n line-height: ${fluid(28, 30)};\r\n text-align: center;\r\n\r\n > span {\r\n ${fonts.apparat.semiBold};\r\n }\r\n\r\n &[data-position='top'] {\r\n margin: 0 0 ${fluid(32, 48)};\r\n }\r\n\r\n &[data-position='bottom'] {\r\n margin: ${fluid(30, 64)} 0 0;\r\n }\r\n`;\r\nconst EventListingStyles = {\r\n Container,\r\n NoResultsText,\r\n ResultsContainer,\r\n Title,\r\n PagingSummary,\r\n TopWrapper,\r\n};\r\nexport default EventListingStyles;\r\n","import { transition } from '@helpers/animate';\r\nimport brand from '@helpers/brand';\r\nimport { fluid } from '@helpers/fluid';\r\nimport fonts from '@helpers/fonts';\r\nimport styled from 'styled-components';\r\nconst Container = styled.form `\r\n position: relative;\r\n width: 100%;\r\n max-width: 576px;\r\n margin: 0 auto;\r\n`;\r\nconst InputWrapper = styled.div `\r\n position: relative;\r\n z-index: 2;\r\n`;\r\nconst Input = styled.input `\r\n ${transition('border-color')}\r\n\r\n display: block;\r\n appearance: none;\r\n border: 2px solid rgba(0, 0, 0, 0.25);\r\n border-radius: 25px;\r\n color: ${brand.primary.blue};\r\n ${fonts.apparat.light}\r\n font-size: 18px;\r\n height: 50px;\r\n line-height: 1em;\r\n padding: 0 24px;\r\n width: 100%;\r\n\r\n &::placeholder {\r\n color: rgba(0, 0, 0, 0.5);\r\n }\r\n\r\n &:focus {\r\n border-color: ${brand.primary.blue};\r\n }\r\n`;\r\nconst Button = styled.button `\r\n ${transition('background-color, border-color, color')}\r\n\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n height: 100%;\r\n display: inline-flex;\r\n align-items: center;\r\n background-color: ${brand.white};\r\n border: 2px solid ${brand.primary.blue};\r\n border-radius: 25px;\r\n color: ${brand.primary.blue};\r\n gap: 8px;\r\n padding: 0px ${fluid(20, 32)};\r\n\r\n ${Input}:focus + &,\r\n &:focus,\r\n &:hover {\r\n background-color: ${brand.primary.blue};\r\n border-color: ${brand.primary.blue};\r\n color: ${brand.white};\r\n }\r\n`;\r\nconst ButtonIcon = styled.span `\r\n display: inline-block;\r\n height: 19px;\r\n transform: translateX(4px);\r\n width: 19px;\r\n\r\n ${Input}:focus + ${Button} &,\r\n ${Button}:focus &,\r\n ${Button}:hover & {\r\n transform: translateX(0px);\r\n }\r\n`;\r\nconst ButtonLabel = styled.span `\r\n ${transition('width')}\r\n\r\n display: inline-block;\r\n color: currentColor;\r\n ${fonts.apparat.bold};\r\n font-size: 16px;\r\n line-height: 1em;\r\n overflow: hidden;\r\n text-decoration: none;\r\n text-transform: uppercase;\r\n white-space: nowrap;\r\n width: 0px;\r\n\r\n ${Input}:focus + ${Button} &,\r\n ${Button}:focus &,\r\n ${Button}:hover & {\r\n width: 8ch;\r\n }\r\n`;\r\nconst SearchStyles = {\r\n Button,\r\n ButtonIcon,\r\n ButtonLabel,\r\n Container,\r\n Input,\r\n InputWrapper,\r\n};\r\nexport default SearchStyles;\r\n","import SvgSearch from '@img/icons/search.svg';\r\nimport * as React from 'react';\r\nimport S from './Search.styles';\r\nconst Search = (props) => {\r\n const [searchTerm, setSearchTerm] = React.useState(props.initialValue ?? '');\r\n return (React.createElement(S.Container, { onSubmit: (e) => {\r\n e.preventDefault();\r\n props.onSubmit(searchTerm);\r\n } },\r\n React.createElement(S.InputWrapper, null,\r\n React.createElement(S.Input, { id: \"searchText\", autoComplete: \"off\", name: \"searchText\", placeholder: props.placeholder, type: \"search\", value: searchTerm, onChange: (event) => {\r\n setSearchTerm(event.target.value);\r\n } }),\r\n React.createElement(S.Button, null,\r\n React.createElement(S.ButtonIcon, { as: SvgSearch }),\r\n React.createElement(S.ButtonLabel, null, \"Search\")))));\r\n};\r\nexport default Search;\r\n","import { API_URLS } from '@helpers/api';\r\nimport { clamp } from '@helpers/utils';\r\nimport { withQueryParams } from '@hoc/withQueryParams';\r\nimport { useApi } from '@hooks/useApi';\r\nimport EventListingCard from '@stories/Components/Cards/EventListingCard/EventListingCard';\r\nimport PastEventListingCard from '@stories/Components/Cards/PastEventListingCard/PastEventListingCard';\r\nimport Filters from '@stories/Components/Listings/Filters/Filters';\r\nimport Pagination from '@stories/Components/Listings/Pagination/Pagination';\r\nimport LoadingIndicator from '@stories/Components/Misc/LoadingIndicator/LoadingIndicator';\r\nimport qs from 'query-string';\r\nimport * as React from 'react';\r\nimport { ArrayParam, NumberParam, StringParam, useQueryParams, withDefault, } from 'use-query-params';\r\nimport S from './EventListing.styles';\r\nimport Search from './Search/Search';\r\nconst EventListing = (props) => {\r\n const containerRef = React.useRef(null);\r\n const [params, setParams] = useQueryParams(Object.assign({\r\n pageIndex: withDefault(NumberParam, 1),\r\n pageSize: withDefault(NumberParam, props.initialData?.pastEvents ?? false ? 12 : 10),\r\n search: withDefault(StringParam, ''),\r\n sortBy: withDefault(StringParam, props.sortOptions ? props.sortOptions.value : ''),\r\n }, ...props.filterOptions.map((f) => ({\r\n [f.name]: withDefault(ArrayParam, []),\r\n }))));\r\n const result = useApi({\r\n initialData: props.initialData,\r\n url: `${API_URLS.GET_EVENTS}?${qs.stringify(params)}&pastEvents=${props.initialData.pastEvents}&location=${props.initialData?.location ?? ''}`,\r\n });\r\n const filterOptions = props.filterOptions.map((f) => ({\r\n ...f,\r\n value: params[f.name],\r\n onChange: (value) => {\r\n const values = params[f.name];\r\n if (value === '') {\r\n setParams({ [f.name]: [value] }, 'pushIn');\r\n }\r\n else if (values.includes(value)) {\r\n setParams({ [f.name]: values.filter((v) => v !== value) }, 'pushIn');\r\n }\r\n else {\r\n setParams({ [f.name]: [...values, value] }, 'pushIn');\r\n }\r\n setParams({ pageIndex: 1 }, 'pushIn');\r\n scrollToTop();\r\n },\r\n onClear: () => {\r\n setParams({ [f.name]: [], pageIndex: 1 }, 'pushIn');\r\n scrollToTop();\r\n },\r\n }));\r\n const onResetClick = () => {\r\n setParams({ pageIndex: 1 }, 'replace');\r\n scrollToTop();\r\n };\r\n const sortOptions = props.sortOptions\r\n ? {\r\n ...props.sortOptions,\r\n value: params.sortBy,\r\n onChange: (value) => {\r\n setParams({ sortBy: value, pageIndex: 1 }, 'pushIn');\r\n scrollToTop();\r\n },\r\n }\r\n : undefined;\r\n const pagingString = `${params.pageIndex > 1 ? `${(params.pageIndex - 1) * params.pageSize + 1} - ` : ''}${clamp(params.pageIndex * params.pageSize, result?.data?.totalCount ?? props.initialData.totalCount)} of ${result?.data?.totalCount ?? props.initialData.totalCount} events`;\r\n const [hash, setHash] = React.useState('');\r\n // Check if there is a hash in the URL and set the hash state\r\n React.useEffect(() => {\r\n const hashValue = window?.location?.hash?.replace('#', '');\r\n if (hashValue) {\r\n setHash(hashValue);\r\n }\r\n }, []);\r\n const hashResult = useApi({\r\n url: `${API_URLS.GET_EVENTS_PAGE_FROM_HASH}?hash=${hash}&pageSize=${params.pageSize}`,\r\n validate: () => !!hash,\r\n });\r\n // If there is a hash in the URL and the hashResult is available, set the page index to the hash result\r\n React.useEffect(() => {\r\n if (hash && hashResult.data && hashResult.data !== params.pageIndex) {\r\n setParams({ pageIndex: hashResult.data }, 'pushIn');\r\n }\r\n }, [hashResult]);\r\n // Scroll to the correct hash when the page index changes\r\n React.useEffect(() => {\r\n if (hash && hashResult.data) {\r\n const element = document.getElementById(hash);\r\n if (element) {\r\n element.scrollIntoView({ behavior: 'smooth' });\r\n }\r\n setHash('');\r\n }\r\n }, [result.data]);\r\n return (React.createElement(S.Container, { id: props.anchorId, spacing: \"none\", ref: containerRef },\r\n React.createElement(S.TopWrapper, null,\r\n React.createElement(S.Title, null, props.title),\r\n React.createElement(Search, { placeholder: props.searchPlaceholder ?? 'What are you looking for?', initialValue: params.search, onSubmit: (value) => {\r\n setParams({ search: value, pageIndex: 1 }, 'pushIn');\r\n scrollToTop();\r\n } })),\r\n React.createElement(Filters, { filterOptions: filterOptions, sortOptions: sortOptions, clearAll: () => onResetClick(), selectedTitle: props.translations?.['global.selectedFilters'] ?? 'Selected Filters', variant: \"grey\", hasAdvancedFilters: true, viewButtonLabel: props.translations?.['listings.viewEvents'] ?? 'View Events' }),\r\n result.data && (React.createElement(React.Fragment, null,\r\n React.createElement(S.PagingSummary, { \"data-position\": \"top\", dangerouslySetInnerHTML: { __html: pagingString } }),\r\n renderResults(),\r\n result.data?.items?.length > 0 && (React.createElement(React.Fragment, null,\r\n React.createElement(Pagination, { pageIndex: params.pageIndex, pageSize: params.pageSize, totalCount: result.data.totalCount, onPageChange: (value) => {\r\n setParams({ pageIndex: value }, 'pushIn');\r\n scrollToTop();\r\n } }),\r\n React.createElement(S.PagingSummary, { \"data-position\": \"bottom\", dangerouslySetInnerHTML: { __html: pagingString } }))))),\r\n result.status === 'loading' && React.createElement(LoadingIndicator, { label: \"Loading\\u2026\", layout: \"fixed\" })));\r\n function renderResults() {\r\n return (React.createElement(S.ResultsContainer, null, !result.data?.items?.length ? (React.createElement(S.NoResultsText, null, \"No results found.\")) : (React.createElement(React.Fragment, null, result.data.items.map((item) => (React.createElement(React.Fragment, { key: item.id }, props.initialData.pastEvents ? (React.createElement(PastEventListingCard, { ...item })) : (React.createElement(EventListingCard, { ...item, translations: props.translations })))))))));\r\n }\r\n function scrollToTop() {\r\n /** timeout required to ensure scrolling occurs on prev/next buttons */\r\n setTimeout(() => containerRef.current?.scrollIntoView({\r\n behavior: 'smooth',\r\n block: 'start',\r\n inline: 'start',\r\n }), 50);\r\n }\r\n};\r\nexport default withQueryParams(EventListing);\r\n"],"names":["useResize","params","refWindowHeight","React","refWindowWidth","onResize","debounce","prevHeight","current","prevWidth","newHeight","window","innerHeight","newWidth","innerWidth","on","callback","immediate","addEventListener","removeEventListener","Wrapper","styled","brand","transition","until","Device","fonts","fluid","ButtonStyles","pageIndex","pageSize","totalCount","onPageChange","variant","pageRange","useMedia","PaginationStyles","ReactPaginate","pageCount","Math","ceil","pageRangeDisplayed","marginPagesDisplayed","previousLabel","Button","buttonType","icon","iconOnly","nextLabel","forcePage","hrefBuilder","page","hrefAllControls","selected","Container","ImageWrapper","imageWrapperPreserveRatio","Img","Image","imageCoverContainer","Category","CategoryTag","ContentWrapper","CtaLinkStyles","DateTypeWrapper","from","Title","Info","paragraphSmall","props","S","category","src","imageUrl","image","alt","altText","loading","getCategoryTitle","dateTime","formatDateISO","date","formatDate","location","title","dangerouslySetInnerHTML","__html","overview","url","CtaLink","href","EventLocationType","categoryTags","length","join","SectionWrapper","TopWrapper","SiteWidthBreakpoint","headingStyles","ResultsContainer","baseGrid","PastEventListingCardStyles","EventListingCardStyles","NoResultsText","paragraphLarge","PagingSummary","InputWrapper","Input","ButtonIcon","ButtonLabel","searchTerm","setSearchTerm","initialValue","onSubmit","e","preventDefault","id","autoComplete","name","placeholder","type","value","onChange","event","target","as","SvgSearch","withQueryParams","containerRef","setParams","useQueryParams","Object","assign","withDefault","NumberParam","initialData","pastEvents","search","StringParam","sortBy","sortOptions","filterOptions","map","f","ArrayParam","result","useApi","API_URLS","qs","values","includes","filter","v","scrollToTop","onClear","undefined","pagingString","clamp","data","hash","setHash","hashValue","replace","hashResult","validate","element","document","getElementById","scrollIntoView","behavior","anchorId","spacing","ref","Search","searchPlaceholder","Filters","clearAll","selectedTitle","translations","hasAdvancedFilters","viewButtonLabel","items","item","key","PastEventListingCard","EventListingCard","Pagination","status","LoadingIndicator","label","layout","setTimeout","block","inline"],"sourceRoot":""}