{"version":3,"file":"modern.newsletter.CeOabotS.js","names":[],"sources":["../../../../../../owl-nest/external/owl-kit/src/styles/container.tsx","../../../../../../owl-nest/external/owl-kit/src/components/SkewedBanner.tsx","../../../../../../owl-nest/common/newsletter-subscription/src/hook.tsx","../../../../../../owl-nest/common/newsletter-subscription/src/component.tsx","../../../../../../owl-nest/ulule/features/newsletter/src/Newsletter.tsx","../../../../../../owl-nest/ulule/features/newsletter/src/index.tsx"],"sourcesContent":["import { styled } from 'next-yak'\nimport * as breakpoint from '../constants/breakpoints'\nimport { MAIN_CONTAINER_WIDTH } from '../constants/sizes'\n\nexport const SkewedContainer = styled.div<{ $skewedBorder: 'bottom' | 'top' }>`\n margin-top: -20px;\n padding: 35px 0 60px;\n transform-origin: top left;\n transform: skew(0, -5deg);\n`\nSkewedContainer.displayName = 'S.container.SkewedContainer'\n// WARNING: the risk is that on some browsers the content can be blurred\n// an alternative is to use ::before / ::after to generate a triangle\n\nexport const SkewedContent = styled.div`\n transform: skew(0, 5deg);\n`\nSkewedContent.displayName = 'S.container.SkewedContent'\n\nexport const Base = styled.div`\n padding-left: 20px;\n padding-right: 20px;\n margin-left: auto;\n margin-right: auto;\n width: 100%;\n min-width: 320px;\n\n @media screen and ${breakpoint.MOBILE_L} {\n max-width: ${MAIN_CONTAINER_WIDTH};\n padding-left: 40px;\n padding-right: 40px;\n }\n`\n","import * as React from 'react'\nimport { styled } from 'next-yak'\n\nimport * as S from '../styles'\n\nexport type SkewedBannerProps = React.HTMLAttributes & {\n skewedBorder?: 'top' | 'bottom'\n children: React.ReactNode\n className?: string\n}\n\nfunction SkewedBannerComponent({\n children,\n skewedBorder = 'bottom',\n className,\n ...props\n}: SkewedBannerProps): React.ReactElement {\n return (\n \n {children}\n \n )\n}\n\nexport const SkewedBanner = styled(SkewedBannerComponent)``\nSkewedBanner.displayName = 'SkewedBanner'\n","import * as React from 'react'\nimport * as yup from 'yup'\n\nimport { api } from '@owl-nest/api-client/latest'\n\ntype Subscription = 'success' | 'error' | 'info'\ntype Hook = {\n handleSubscription: (country: string, email: string, locale: string) => Promise\n isLoading: boolean\n status: Subscription | undefined\n}\n\nconst emailSchema = yup.object().shape({\n email: yup.string().email(),\n})\n\nexport const subscribeNewsLetter = async (country: string, email: string, locale: string): Promise => {\n const isValid = await emailSchema.isValid({\n email,\n })\n\n if (isValid) {\n const response = await api.post.subscribeNewsLetter({\n body: { country: country, email: email, lang: locale },\n })\n\n return response.caseOf({\n left: (_error) => 'error',\n right: (_result) => 'success',\n })\n } else {\n return 'error'\n }\n}\n\nexport function useNewsLetterSubscription(): Hook {\n const [isLoading, setIsLoading] = React.useState(false)\n const [status, setStatus] = React.useState(undefined)\n\n return { handleSubscription, isLoading, status }\n\n async function handleSubscription(country: string, email: string, locale: string): Promise {\n if (email === '') {\n setStatus('info')\n } else {\n setIsLoading(true)\n const subscriptionStatus = await subscribeNewsLetter(country, email, locale)\n setStatus(subscriptionStatus)\n setIsLoading(false)\n }\n }\n}\n","import * as React from 'react'\nimport { styled } from 'next-yak'\n\nimport * as env from '@owl-nest/config'\nimport { t, tc } from '@owl-nest/localize'\n\nimport * as plume from '@ulule/owl-kit-components/next'\n\nimport { useNewsLetterSubscription } from './hook'\n\ntype NewsletterBlockComponentProps = {\n className?: string\n country: string\n locale: string\n}\n\nfunction NewsletterBlockComponent({\n className,\n country,\n locale,\n}: NewsletterBlockComponentProps): React.ReactElement {\n const [isToggled, setIsToggled] = React.useState(false)\n const [email, setEmail] = React.useState('')\n\n const { handleSubscription, isLoading, status } = useNewsLetterSubscription()\n\n return (\n \n {t('Join the Ulule community!')}\n {locale !== 'fr' && {t('Subscribe to receive the best of Ulule in your inbox every week.')}}\n \n {\n e.preventDefault()\n }}\n >\n setEmail(e.target.value)} placeholder={t('Enter your e-mail address')} />\n handleSubscription(country, email, locale)} size=\"medium\">\n {t('Subscribe')}\n \n \n {status && (\n \n {status === 'success' &&\n t('Thank you for your registration! You will receive an email to confirm your registration.')}\n {status === 'error' && t('This email is not valid, please correct it.')}\n {status === 'info' && t('This email is not valid, please correct it.')}\n \n )}\n setIsToggled(!isToggled)}>\n {t('We will only use your email address to send you our newsletter.')}{' '}\n {isToggled ? t('Show less') : t('Learn more')}\n \n \n \n {tc(\n 'Ulule collects your data to send you our newsletter. Depending on the purpose of each treatment, you have certain rights (right of opposition, right of access to your data, right to rectify and erase your data, right to define the fate of your data after your death). To exercise these rights, write to privacy@ulule.com or ULULE SAS, %(ululePostalAddress)s or, for certain rights, go directly to your account. For more details: [privacy: Ulule Privacy Policy].',\n {\n ululePostalAddress: t('10 rue de Penthièvre, 75008 Paris, France'),\n privacy: ,\n },\n )}\n \n \n \n )\n}\n\nexport const NewsletterBlock = styled(NewsletterBlockComponent)``\n\nconst Block = styled.div`\n width: 100%;\n max-width: 620px;\n`\n\nconst Wrapper = styled.div`\n align-items: center;\n background-color: ${plume.COLORS.PRIMARY_GREY_000};\n border-radius: 8px;\n box-shadow: 1px 2px 14px rgba(89, 84, 78, 0.12);\n display: flex;\n flex-direction: column;\n height: auto;\n overflow: hidden;\n padding: 35px 16px;\n width: 100%;\n\n ${plume.glyphs.stroke.CaretDown} {\n color: ${plume.COLORS.PRIMARY_GREY_000};\n }\n\n @media screen and ${plume.BREAKPOINTS.TABLET} {\n ${plume.TextField} {\n max-width: 415px;\n }\n }\n`\n\nconst Call = styled(plume.styles.heading.L)`\n color: ${plume.COLORS.TEXT_PRIMARY};\n max-width: 300px;\n text-align: center;\n\n @media screen and ${plume.BREAKPOINTS.TABLET} {\n max-width: none;\n }\n`\n\nconst Detail = styled(plume.styles.copy.M.light)`\n max-width: 325px;\n padding-top: 8px;\n text-align: center;\n\n @media screen and ${plume.BREAKPOINTS.TABLET} {\n max-width: none;\n }\n`\n\nconst Form = styled.form`\n align-items: center;\n display: flex;\n flex-direction: column;\n margin-top: 24px;\n width: 100%;\n\n div {\n flex-grow: 1;\n width: 100%;\n }\n\n @media screen and ${plume.BREAKPOINTS.TABLET} {\n flex-direction: row;\n margin-bottom: 16px;\n margin-top: 32px;\n }\n`\n\nconst SubmitButton = styled(plume.Button)`\n margin-bottom: 16px;\n margin-top: 16px;\n white-space: nowrap;\n width: 100%;\n\n @media screen and ${plume.BREAKPOINTS.TABLET} {\n margin-bottom: 0;\n margin-left: 16px;\n margin-top: 0;\n width: auto;\n }\n`\n\nconst ShowMoreText = styled.span`\n font-weight: 600; // HACK: Irregular font manipulation\n`\n\nconst Disclaimer = styled(plume.styles.heading.XXXXXS)<{ $isToggled: boolean }>`\n color: ${plume.COLORS.TEXT_SECONDARY};\n cursor: pointer;\n width: fit-content;\n\n ${plume.glyphs.stroke.CaretDown} {\n color: ${plume.COLORS.PRIMARY_SAND_500};\n height: 6px;\n left: 6px;\n position: relative;\n transform: rotateX(${({ $isToggled }) => ($isToggled ? '180' : '0')}deg);\n width: 10px;\n }\n\n @media screen and ${plume.BREAKPOINTS.TABLET} {\n padding-bottom: ${({ $isToggled }) => ($isToggled ? '16' : '0')}px;\n }\n`\n\nconst ExtendedDisclaimer = styled(plume.styles.heading.XXXXXXS)<{ $isToggled: boolean }>`\n color: ${plume.COLORS.TEXT_SECONDARY};\n display: ${({ $isToggled }) => ($isToggled ? 'block' : 'none')};\n text-transform: uppercase;\n\n @media screen and ${plume.BREAKPOINTS.TABLET} {\n padding-right: 30px;\n }\n`\n\nconst DynCallout = styled(plume.Callout)`\n margin-bottom: 16px;\n`\n","import * as React from 'react'\nimport { styled } from 'next-yak'\n\nimport { t } from '@owl-nest/localize'\n\nimport * as plume from '@ulule/owl-kit-components/next'\nimport { NewsletterBlock } from '@owl-nest/newsletter-subscription'\nimport * as env from '@owl-nest/config'\n\nexport function Newsletter(): React.ReactElement {\n const userConfig = env.useUserEnv()\n const locale = userConfig.lang\n const country = env.USER_COUNTRY\n\n return (\n \n \n {t('Ulule Newsletter')}\n \n \n \n \n \n )\n}\n\nconst Content = styled.div`\n display: flex;\n margin: 50px auto;\n max-width: 1100px;\n padding: 0 16px;\n\n @media screen and ${plume.BREAKPOINTS.LAPTOP} {\n padding: 0 80px;\n }\n`\n\nconst NewsletterTitle = styled(plume.styles.heading.XL)`\n color: ${plume.COLORS.PRIMARY_GREY_000};\n font-family: ${plume.FONTS.EMPHASIS_FONT};\n font-size: 50px;\n font-style: italic;\n font-weight: 900;\n line-height: 1.1;\n\n @media screen and (min-width: 768px) {\n font-size: 80px;\n min-width: 445px;\n }\n`\n\nconst Wrapper = styled.div`\n ${plume.SkewedBanner} {\n background-color: ${plume.COLORS.PRIMARY_BLUE_500};\n margin-bottom: 22px;\n padding: 10% 8%;\n\n @media screen and ${plume.BREAKPOINTS.LAPTOP} {\n padding-top: 10em;\n padding-bottom: 4em;\n }\n }\n\n ${NewsletterTitle} {\n max-width: 1100px;\n margin: 0 auto;\n }\n`\n","import * as React from 'react'\nimport * as ReactDOM from 'react-dom/client'\nimport { BrowserRouter as Router } from 'react-router'\n\nimport { Header } from '@ulule/header'\nimport { initializeLocalization } from '@owl-nest/localize'\nimport * as logger from '@owl-nest/logger'\nimport * as layout from '@owl-nest/layout'\nimport * as env from '@owl-nest/config'\n\nimport { Newsletter } from './Newsletter'\n\nrenderApp()\n\nasync function renderApp(): Promise {\n await env.initUserConfig()\n const userConfig = await env.getUserConfig()\n\n await initializeLocalization(userConfig.lang, env.LOCALE_FILES[userConfig.lang])\n const newsletterAppContainer = document.querySelector('#js-newsletter')\n\n if (newsletterAppContainer) {\n const appRoot = ReactDOM.createRoot(newsletterAppContainer)\n appRoot.render()\n } else {\n logger.err('Newsletter container is missing')\n }\n\n const headerContainer = document.querySelector('#react-ulule-header')\n\n // Router is needed as it is a dependency for partnership tracking. Not ideal.\n if (headerContainer) {\n const headerRoot = ReactDOM.createRoot(headerContainer)\n headerRoot.render(\n \n
\n ,\n )\n } else {\n logger.err('Header container is missing')\n }\n\n const footerContainer = document.querySelector('#react-ulule-footer')\n\n if (footerContainer) {\n const headerRoot = ReactDOM.createRoot(footerContainer)\n headerRoot.render()\n } else {\n logger.err('Footer container is missing')\n }\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