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J,EAAI,EAAGA,EAAI4J,EAAWnK,OAAQO,IACjCC,EAAM2J,EAAW5J,GACb2J,EAASE,QAAQ5J,IAAQ,IAC7BgJ,EAAOhJ,GAAOoJ,EAAOpJ,IAEvB,OAAOgJ,CACT,C","sources":["webpack:///./assets/common/src/components/common/ErrorBox.tsx","webpack:///./assets/common/src/utils/brandDiffsUtils.ts","webpack:///./assets/moncler/src/components/newsletter/MonclerCollectionCheckbox.tsx","webpack:///./assets/moncler/src/components/newsletter/Newsletter.tsx","webpack:///./assets/moncler/src/components/newsletter/NewsletterErrorModal.tsx","webpack:///./assets/moncler/src/components/newsletter/NewsletterForm.tsx","webpack:///./node_modules/@babel/runtime/helpers/esm/extends.js","webpack:///./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js"],"sourcesContent":["import classNames from 'classnames';\nimport React from 'react';\nconst ErrorBox = (props) => {\n if (!props.errors || props.errors.length === 0 || props.errors.every((err) => err === '')) {\n return React.createElement(React.Fragment, null);\n }\n return (React.createElement(\"div\", { className: classNames('globalerrors', 'invalid-feedback', props.className), role: \"alert\" }, props.errors.map((e, i) => (React.createElement(\"div\", { key: i }, (e || '').toString())))));\n};\nexport default ErrorBox;\n","import classNames from 'classnames';\nconst gridClassMultiplier = {\n MO: 1,\n ST: 2,\n};\nconst getGridColNumber = (colnumnber) => {\n return colnumnber * (gridClassMultiplier[getId()] || gridClassMultiplier.MO);\n};\nconst getId = () => {\n return window.brandId;\n};\nconst getName = () => {\n return window.brand;\n};\nconst is = (brandId) => {\n return getId() === brandId;\n};\nconst nameIs = (brand) => {\n return getName() === brand;\n};\nconst autoChooseClassnames = (classesObj, commonclasses) => {\n return classNames(classesObj[getId()], commonclasses);\n};\nconst gridClassname = (monclerColumn = 12, brackpoint, type, commonclasses) => {\n let result = [(type || 'col')];\n brackpoint && result.push(brackpoint);\n result.push(getGridColNumber(monclerColumn) + '');\n return result.join('-');\n};\nconst gridClassnames = (configs, commonclasses) => {\n return (configs\n .map((args) => {\n return gridClassname.apply(this, [...args]);\n })\n .join(' ') + (commonclasses ? ' ' + commonclasses : ''));\n};\nconst autoChooseComponent = (componentsObj) => {\n return componentsObj[getId()];\n};\nconst autoChooseProps = (props) => {\n return props[getId()];\n};\nexport { autoChooseClassnames, autoChooseComponent, autoChooseProps, getGridColNumber, getId, getName, gridClassname, gridClassnames, is, nameIs };\n","import DwFormField from '@ui/formfield/DwFormField';\nimport React, { useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport classNames from 'classnames';\nimport FormField from '@ui/formfield/FormField';\nconst MonclerCollectionCheckbox = ({ formdef, formInstance }) => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;\n const { t } = useTranslation();\n const [collectionCheckbox, setCollectionCheckbox] = useState(false);\n const [menCollection, setMenCollection] = useState(false);\n const [womenCollection, setWomenCollection] = useState(false);\n const [childrenCollection, setChildrenCollection] = useState(false);\n const [genius, setGenius] = useState(false);\n const [grenoble, setGrenoble] = useState(false);\n const [loggedin, setLoggedin] = useState(window.loggedin);\n useEffect(() => {\n if (!menCollection && !womenCollection && !childrenCollection && collectionCheckbox) {\n setCollectionCheckbox(false);\n }\n else if ((menCollection || womenCollection || childrenCollection) && !collectionCheckbox) {\n setCollectionCheckbox(true);\n }\n }, [menCollection, womenCollection, childrenCollection]);\n useEffect(() => {\n var _a, _b, _c, _d, _e;\n setChildrenCollection((_a = formdef.addtoemaillistchildren) === null || _a === void 0 ? void 0 : _a.checked);\n setWomenCollection((_b = formdef.addtoemaillistwomen) === null || _b === void 0 ? void 0 : _b.checked);\n setMenCollection((_c = formdef.addtoemaillistmen) === null || _c === void 0 ? void 0 : _c.checked);\n setGenius((_d = formdef.addtoemaillistgenius) === null || _d === void 0 ? void 0 : _d.checked);\n setGrenoble((_e = formdef.addtoemaillistgrenoble) === null || _e === void 0 ? void 0 : _e.checked);\n }, []);\n const toggleCollection = (e) => {\n const checked = e.currentTarget.checked;\n setCollectionCheckbox(checked);\n setMenCollection(checked);\n setWomenCollection(checked);\n setChildrenCollection(checked);\n formInstance.batch(() => {\n formInstance.change('addtoemaillistmen', checked);\n formInstance.change('addtoemaillistwomen', checked);\n formInstance.change('addtoemaillistchildren', checked);\n });\n };\n return (React.createElement(React.Fragment, null,\n React.createElement(FormField, { type: \"checkbox\", name: \"triggerCollection\", controlledInput: true, disabled: window.clickfromstore, checkboxChecked: (!loggedin || ((_a = formdef.personalInfoFlag) === null || _a === void 0 ? void 0 : _a.checked) || ((_b = formdef.personalinfo) === null || _b === void 0 ? void 0 : _b.checked)) && collectionCheckbox, onChange: (e) => toggleCollection(e), className: \"newsletter-checkbox moncler-collection\", label: t('newsletter.monclercollection.title') }),\n React.createElement(\"p\", { className: classNames('newsletter-checkbox-description', { 'mb-16': !collectionCheckbox }) }, t('newsletter.monclercollection.description')),\n collectionCheckbox && (React.createElement(\"fieldset\", { className: \"text-normal\" },\n React.createElement(\"legend\", { className: \"visually-hidden\" }, t('newsletter.monclercollection')),\n React.createElement(DwFormField, { def: formdef, name: \"addtoemaillistmen\", type: \"checkbox\", controlledInput: true, disabled: window.clickfromstore, checkboxChecked: (!loggedin || ((_c = formdef.personalInfoFlag) === null || _c === void 0 ? void 0 : _c.checked) || ((_d = formdef.personalinfo) === null || _d === void 0 ? void 0 : _d.checked)) && menCollection, onChange: (e) => setMenCollection(e.currentTarget.checked) }),\n React.createElement(DwFormField, { def: formdef, name: \"addtoemaillistwomen\", type: \"checkbox\", controlledInput: true, disabled: window.clickfromstore, checkboxChecked: (!loggedin || ((_e = formdef.personalInfoFlag) === null || _e === void 0 ? void 0 : _e.checked) || ((_f = formdef.personalinfo) === null || _f === void 0 ? void 0 : _f.checked)) && womenCollection, onChange: (e) => {\n setWomenCollection(e.currentTarget.checked);\n } }),\n React.createElement(DwFormField, { def: formdef, name: \"addtoemaillistchildren\", type: \"checkbox\", controlledInput: true, disabled: window.clickfromstore, checkboxChecked: (!loggedin || ((_g = formdef.personalInfoFlag) === null || _g === void 0 ? void 0 : _g.checked) || ((_h = formdef.personalinfo) === null || _h === void 0 ? void 0 : _h.checked)) && childrenCollection, onChange: (e) => setChildrenCollection(e.currentTarget.checked) }))),\n React.createElement(DwFormField, { def: formdef, name: \"addtoemaillistgenius\", type: \"checkbox\", disabled: window.clickfromstore, className: \"newsletter-checkbox moncler-genius\", controlledInput: true, checkboxChecked: (!loggedin || ((_j = formdef.personalInfoFlag) === null || _j === void 0 ? void 0 : _j.checked) || ((_k = formdef.personalinfo) === null || _k === void 0 ? void 0 : _k.checked)) && genius, onChange: (e) => setGenius(e.currentTarget.checked) }),\n React.createElement(\"p\", { className: \"newsletter-checkbox-description mb-16\" }, t('newsletter.genius.description')),\n React.createElement(DwFormField, { def: formdef, name: \"addtoemaillistgrenoble\", type: \"checkbox\", disabled: window.clickfromstore, className: \"newsletter-checkbox moncler-grenoble\", controlledInput: true, checkboxChecked: (!loggedin || ((_l = formdef.personalInfoFlag) === null || _l === void 0 ? void 0 : _l.checked) || ((_m = formdef.personalinfo) === null || _m === void 0 ? void 0 : _m.checked)) && grenoble, onChange: (e) => setGrenoble(e.currentTarget.checked) }),\n React.createElement(\"p\", { className: \"newsletter-checkbox-description\" }, t('newsletter.grenoble.description'))));\n};\nexport default MonclerCollectionCheckbox;\n","import ErrorBox from '@components/common/ErrorBox';\nimport Button from '@ui/button/Button';\nimport FormField from '@ui/formfield/FormField';\nimport ModalDialog from '@ui/modal/ModalDialog';\nimport analytics from '@utils/analytics';\nimport api from '@utils/api';\nimport React, { useState } from 'react';\nimport { Form } from 'react-final-form';\nimport { useTranslation } from 'react-i18next';\nimport NewsletterErrorModal from './NewsletterErrorModal';\nimport NewsletterForm from './NewsletterForm';\nimport classNames from 'classnames';\nconst Newsletter = (props) => {\n const { t } = useTranslation();\n const [errors, setErrors] = useState([]);\n const [modalErrorMessage, setModalErrorMessage] = useState();\n const [submitSuccess, setSubmitSuccess] = useState(false);\n const [showSubModal, setShowSubModal] = useState(false);\n const [email, setEmail] = useState('');\n const validateEmail = (email) => {\n const re = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n return re.test(String(email).toLowerCase());\n };\n const onSubmit = async (values) => {\n setErrors([]);\n if (validateEmail(values.nlField)) {\n const isNewEmail = await api.checkNewsletterEmail(values.nlField);\n if (isNewEmail.success) {\n setEmail(values.nlField);\n setShowSubModal(true);\n //check if we are on monclernow listing\n if (props.isMonclernowModule) {\n analytics.newsletterModuleContinue();\n }\n else {\n analytics.footerSection(props.footerSectionTitle, t('button.continue'));\n }\n }\n else {\n setModalErrorMessage({\n title: t('newsletter.alreadyregisteredtitle'),\n body: t('newsletter.alreadyregisteredtext'),\n buttonLink: '/',\n buttonText: t('newslettermodal.continue'),\n });\n }\n }\n else {\n setErrors([t('forgotpassword.invalidemail')]);\n }\n };\n return (React.createElement(React.Fragment, null,\n React.createElement(Form, { onSubmit: onSubmit, render: ({ handleSubmit }) => (React.createElement(\"form\", { onSubmit: handleSubmit },\n React.createElement(\"div\", { className: \"row justify-center\" },\n React.createElement(\"div\", { className: \"col-12 newsletter-container\" },\n React.createElement(FormField, { className: classNames({ 'form-control--outline': !props.isFooter }), labelClassName: classNames('form-group__label', { 'form-group__label--floating': !props.isFooter }), name: \"nlField\", label: t('footer.email.address'), type: \"email\", autocomplete: \"email\", required: true, placeholder: t('footer.newsletter.placeholder') }),\n React.createElement(ErrorBox, { errors: errors, className: \"mt-20\" }),\n props.isFooter ? (React.createElement(\"button\", { type: \"submit\", \"aria-label\": t('button.continue') },\n React.createElement(\"i\", { className: \"icon--chevron-small-right\", \"aria-hidden\": true }))) : (React.createElement(Button, { type: \"submit\", cls: ['button--secondary'] }, t('button.continue'))))))) }),\n React.createElement(NewsletterErrorModal, { isOpen: Boolean(modalErrorMessage === null || modalErrorMessage === void 0 ? void 0 : modalErrorMessage.title), modalErrorMessage: modalErrorMessage, onRequestClose: setModalErrorMessage }),\n React.createElement(ModalDialog, { className: \"newsletter-modal newsletter-modal--subscription-modal\", isOpen: showSubModal, contentLabel: \"Newsletter subscription\", onRequestClose: () => {\n analytics.newsletterCloseModal();\n setShowSubModal(false);\n } },\n React.createElement(\"div\", { className: \"newsletter-modal__columns-wrapper\" },\n React.createElement(\"div\", { className: \"newsletter-modal__img-container\" },\n React.createElement(\"img\", { src: props.image, alt: \"\" })),\n React.createElement(\"div\", { className: \"newsletter-modal__text-holder\" }, submitSuccess ? (React.createElement(\"div\", { className: \"modal__header-sticky\" },\n React.createElement(\"h2\", { className: \"newsletter-modal__title\", role: \"alert\" }, t('newslettermodal.successtitle')),\n React.createElement(\"p\", { className: \"newsletter-modal__description\" },\n React.createElement(\"span\", { dangerouslySetInnerHTML: { __html: t('newslettermodal.successdescription') } }),\n React.createElement(\"a\", { href: window.homeurl, className: \"button button--primary\" }, t('newslettermodal.continue'))))) : (React.createElement(React.Fragment, null,\n React.createElement(\"div\", { className: \"modal__header-sticky\" },\n React.createElement(\"h2\", { className: \"newsletter-modal__title\" }, t('newslettermodal.title')),\n React.createElement(\"p\", { className: \"newsletter-modal__description\" },\n React.createElement(\"span\", null, t('newslettermodal.description')))),\n React.createElement(NewsletterForm, { email: email, cookiepage: props.cookiepage, onSubmitSuccess: () => {\n setSubmitSuccess(true);\n } }))))))));\n};\nexport default Newsletter;\n","import ModalDialog from '@ui/modal/ModalDialog';\nimport React from 'react';\nconst NewsletterErrorModal = ({ isOpen, modalErrorMessage, onRequestClose }) => {\n return (React.createElement(ModalDialog, { className: \"newsletter-modal newsletter-modal--error-modal\", isOpen: isOpen, contentLabel: modalErrorMessage === null || modalErrorMessage === void 0 ? void 0 : modalErrorMessage.title, onRequestClose: () => onRequestClose(undefined) },\n React.createElement(React.Fragment, null,\n React.createElement(\"div\", { className: \"newsletter-modal__description\" },\n React.createElement(\"span\", null, modalErrorMessage === null || modalErrorMessage === void 0 ? void 0 : modalErrorMessage.body),\n React.createElement(\"a\", { href: modalErrorMessage === null || modalErrorMessage === void 0 ? void 0 : modalErrorMessage.buttonLink, className: \"button button--primary\" },\n React.createElement(\"span\", null, modalErrorMessage === null || modalErrorMessage === void 0 ? void 0 : modalErrorMessage.buttonText))))));\n};\nexport default NewsletterErrorModal;\n","import ErrorBox from '@components/common/ErrorBox';\nimport Button from '@ui/button/Button';\nimport DwFormField from '@ui/formfield/DwFormField';\nimport analytics from '@utils/analytics';\nimport api from '@utils/api';\nimport formutils from '@utils/formutils';\nimport React, { useEffect, useState } from 'react';\nimport { Form } from 'react-final-form';\nimport { useTranslation } from 'react-i18next';\nimport MonclerCollectionCheckbox from '@moncler/components/newsletter/MonclerCollectionCheckbox';\nconst NewsletterForm = ({ email, onSubmitSuccess, cookiepage, isPopup }) => {\n const { t } = useTranslation();\n const [formdef, setFormdef] = useState();\n const [initialValues, setInitialValues] = useState();\n const [errors, setErrors] = React.useState([]);\n useEffect(() => {\n let val = {};\n api.getForm('newsletters-subscribe', val).then((data) => {\n setInitialValues(Object.assign(Object.assign({}, val), { newslettersEmailSubscription: email }));\n setFormdef(data);\n });\n }, []);\n const validate = async (values) => {\n return await formutils.validateForm(values, formdef, 'newsletters-subscribe');\n };\n const onSubmit = async (values) => {\n setErrors([]);\n let errors = await validate(values);\n if (errors && Object.keys(errors).length > 0) {\n return errors;\n }\n return api\n .submitNewsletter(values, formdef)\n .then((data) => {\n if (data.success) {\n //save preferences in analytics\n let flags = [];\n let tempValues = values;\n for (const property in tempValues) {\n if (tempValues[property] && property.includes('addtoemaillist')) {\n let properyCleanedForGTM = '';\n //OE-12611 Delocalization label\n if (property == 'addtoemaillistmen') {\n properyCleanedForGTM = t('description.checkbox.emailsignup.men.profile').toLowerCase();\n }\n else if (property == 'addtoemaillistwomen') {\n properyCleanedForGTM = t('description.checkbox.emailsignup.women.profile').toLowerCase();\n }\n else if (property == 'addtoemaillistchildren') {\n properyCleanedForGTM = t('description.checkbox.emailsignup.children.profile').toLowerCase();\n }\n else if (property == 'addtoemaillistgrenoble') {\n properyCleanedForGTM = t('description.checkbox.emailsignup.grenoble.profile').toLowerCase();\n }\n else if (property == 'addtoemaillistgenius') {\n properyCleanedForGTM = t('description.checkbox.emailsignup.genius.profile').toLowerCase();\n }\n flags.push(properyCleanedForGTM);\n }\n }\n analytics.newsletterSubscription(t('button.submitanalytics'), flags, isPopup);\n onSubmitSuccess();\n }\n else {\n // setErrors(data.error);\n }\n })\n .catch((e) => setErrors([e]));\n };\n if (!formdef) {\n return React.createElement(React.Fragment, null);\n }\n return (React.createElement(\"div\", null,\n React.createElement(Form, { onSubmit: onSubmit, initialValues: initialValues, validate: validate, render: ({ handleSubmit, form, submitting, pristine, values }) => (React.createElement(\"form\", { onSubmit: handleSubmit },\n React.createElement(DwFormField, { def: formdef, name: \"newslettersEmailSubscription\", type: \"email\" }),\n React.createElement(\"div\", { className: \"newsletter-modal__gender-wrapper mt-12 mb-16\" },\n React.createElement(DwFormField, { def: formdef, name: \"gender\", type: \"radio\" })),\n values['gender'] && (React.createElement(\"div\", { className: \"newsletter-modal__radio-wrapper\" },\n React.createElement(\"p\", null, t('preferences.notifymeabout')),\n React.createElement(\"div\", { className: \"checkbox-wrapper\" },\n React.createElement(\"div\", { className: \"newsletter-flag mb-28\" },\n React.createElement(MonclerCollectionCheckbox, { formdef: formdef, formInstance: form }))),\n React.createElement(ErrorBox, { errors: errors }))),\n React.createElement(\"div\", { className: \"newsletter-modal__privacy-flag\" },\n React.createElement(DwFormField, { def: formdef, name: \"personalInfoFlag\", type: \"checkbox\" })),\n React.createElement(\"p\", { className: \"newsletter-modal__required-label\" }, t('label.required')),\n React.createElement(\"div\", { className: \"row button-row\" },\n React.createElement(Button, { type: \"submit\", cls: ['button--primary'] }, t('button.submit'))),\n React.createElement(\"p\", { className: \"newsletter-modal__legal-label\" },\n t('preferences.newsletterterms1'),\n ' ',\n React.createElement(\"a\", { href: cookiepage, target: \"_blank\" }, t('preferences.privacysettings.privacyandcookiepolicy')),\n ' ',\n t('preferences.newsletterterms2')))) })));\n};\nexport default NewsletterForm;\n","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}"],"names":["props","errors","length","every","err","className","role","map","e","i","key","toString","gridClassMultiplier","MO","ST","getId","window","brandId","is","autoChooseClassnames","classesObj","commonclasses","gridClassname","monclerColumn","brackpoint","type","result","push","join","gridClassnames","configs","args","apply","autoChooseComponent","componentsObj","autoChooseProps","formdef","formInstance","_a","_b","_c","_d","_e","_f","_g","_h","_j","_k","_l","_m","t","collectionCheckbox","setCollectionCheckbox","useState","menCollection","setMenCollection","womenCollection","setWomenCollection","childrenCollection","setChildrenCollection","genius","setGenius","grenoble","setGrenoble","loggedin","setLoggedin","useEffect","addtoemaillistchildren","checked","addtoemaillistwomen","addtoemaillistmen","addtoemaillistgenius","addtoemaillistgrenoble","name","controlledInput","disabled","clickfromstore","checkboxChecked","personalInfoFlag","personalinfo","onChange","currentTarget","batch","change","toggleCollection","label","def","setErrors","modalErrorMessage","setModalErrorMessage","submitSuccess","setSubmitSuccess","showSubModal","setShowSubModal","email","setEmail","onSubmit","async","values","test","String","toLowerCase","validateEmail","nlField","success","isMonclernowModule","footerSectionTitle","title","body","buttonLink","buttonText","render","handleSubmit","isFooter","labelClassName","autocomplete","required","placeholder","cls","isOpen","Boolean","onRequestClose","contentLabel","src","image","alt","dangerouslySetInnerHTML","__html","href","homeurl","cookiepage","onSubmitSuccess","undefined","isPopup","setFormdef","initialValues","setInitialValues","val","then","data","Object","assign","newslettersEmailSubscription","validate","keys","flags","tempValues","property","includes","properyCleanedForGTM","catch","form","submitting","pristine","target","_extends","bind","arguments","source","prototype","hasOwnProperty","call","this","_objectWithoutPropertiesLoose","excluded","sourceKeys","indexOf"],"sourceRoot":""}