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AY,CAAEuB,QAASyZ,EAAcsH,QAAS,IAAMrH,OAAgBtc,KAAe,C","sources":["webpack:///./assets/common/src/ui/accordion/Accordion.tsx","webpack:///./assets/common/src/utils/ui.ts","webpack:///./assets/common/src/ui/accordion/AccordionItem.tsx","webpack:///./assets/common/src/ui/button/Button.tsx","webpack:///./assets/stone/src/components/product/ColorSwatch.tsx","webpack:///./assets/stone/src/components/product/ProductActionAddToBag.tsx","webpack:///./assets/stone/src/components/product/ProductActionNotifyMe.tsx","webpack:///./assets/stone/src/components/product/ProductLabels.tsx","webpack:///./assets/stone/src/components/notify/NotifyForm.tsx","webpack:///./assets/stone/src/components/product/ProductNotifyMeModal.tsx","webpack:///./assets/stone/src/ui/selector/SelectorItem.tsx","webpack:///./assets/stone/src/components/product/Selector.tsx","webpack:///./assets/stone/src/components/product/SelectorSwiper.tsx","webpack:///./assets/stone/src/components/product/ProductSelectionColor.tsx","webpack:///./assets/stone/src/ui/selector/SelectorSize.tsx","webpack:///./assets/stone/src/components/sizeguide/BodyMeasurements.tsx","webpack:///./assets/stone/src/components/sizeguide/HowToMeasure.tsx","webpack:///./assets/stone/src/components/sizeguide/SizeGuideButton.tsx","webpack:///./assets/stone/src/hooks/useModelMeasures.tsx","webpack:///./assets/stone/src/components/sizeguide/SizeGuide.tsx","webpack:///./assets/stone/src/components/product/ProductSelectionSizesExpanded.tsx","webpack:///./assets/stone/src/components/product/ProductTile.tsx","webpack:///./assets/stone/src/components/product/ProductTileReview.tsx","webpack:///./assets/stone/src/components/product/ProductWishlistToggle.tsx"],"sourcesContent":["import React, { cloneElement, useEffect, useMemo, useState, createElement } from 'react';\nimport { isInViewport, scrollToPx } from '../../utils/ui';\nimport classNames from 'classnames';\nlet timeoutId;\nconst Accordion = (props) => {\n const [expandedCard, setExpandedCard] = useState();\n const [height, setHeight] = useState(0);\n const groupRef = React.createRef();\n const setOpen = (i) => {\n setExpandedCard(i);\n };\n const isOpen = (i) => {\n return expandedCard === i;\n };\n const onChildSelect = (i) => {\n setOpen(isOpen(i) ? null : i);\n };\n // OE-14667 set the accordion close if there is a new result in the search input\n useEffect(() => {\n if (props.results && props.results.length > 0) {\n setOpen(-1);\n }\n }, [props.results]);\n const scrollToElement = (container, opener) => {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => {\n if (!isInViewport(opener)) {\n const scrollPosition = window.scrollY;\n const containerScrollPosition = container.getBoundingClientRect().top;\n let header = document.querySelector('header');\n const headerHeight = header && header.offsetHeight;\n const gap = 100;\n const scrollPositionFinal = scrollPosition + containerScrollPosition - headerHeight - gap;\n scrollToPx(scrollPositionFinal);\n }\n }, 500);\n };\n useEffect(() => {\n let defaultOpen;\n React.Children.forEach(props.children, (c, i) => {\n if (!!c) {\n if (React.isValidElement(c)) {\n if (c.props.isInitialOpen) {\n defaultOpen = c.key || i;\n }\n }\n else {\n console.warn('Element is not an accordion item.', c);\n }\n }\n });\n setOpen(defaultOpen);\n }, []);\n useEffect(() => {\n console.log('set accordion height');\n setHeight(groupRef.current.clientHeight);\n }, []);\n const childrenLength = useMemo(() => {\n let counter = 0;\n React.Children.map(props.children, () => {\n counter += 1;\n });\n return counter;\n }, []);\n // causava sfarfallamenti\n // const disableScroll = () => {\n // if (timeout) {\n // clearTimeout(timeout);\n // }\n // document.documentElement.classList.add('initial-scroll');\n // const scrollTop = window.pageYOffset || document.documentElement.scrollTop;\n // const scrollLeft = window.pageXOffset || document.documentElement.scrollLeft;\n // window.onscroll = () => {\n // window.scrollTo(scrollLeft, scrollTop);\n // };\n // };\n // const enableScroll = () => {\n // document.documentElement.classList.remove('initial-scroll');\n // window.onscroll = () => {};\n // };\n return createElement(props.type, {\n className: classNames('accordion__group', { 'accordion__group--flex': props.flex, 'accordion__group--list': props.type === 'ul' }, props.className),\n ref: groupRef,\n style: { gap: props.gap || 0 },\n }, React.Children.map(props.children, (child, i) => {\n if (React.isValidElement(child)) {\n return cloneElement(child, Object.assign({ onSelect: () => onChildSelect(child.key || i), expanded: isOpen(child.key || i), loading: isOpen(child.key || i) && child.props.initiallyClosed, scrollToElement: scrollToElement, flex: props.flex, gap: props.gap, parentHeight: height, childrenLength: childrenLength, type: (props.type === 'ul' && 'li') || 'div' }, child.props));\n }\n }));\n};\nAccordion.defaultProps = {\n type: 'div',\n};\nexport default Accordion;\n","/**\n *\n * check if given element is in viewpot\n * @param elem - element to check\n *\n * @returns return true if is in viewport\n */\nexport const isInViewport = (elem) => {\n const bounding = elem.getBoundingClientRect();\n return (bounding.top >= 0 &&\n bounding.left >= 0 &&\n bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\n bounding.right <= (window.innerWidth || document.documentElement.clientWidth));\n};\nexport const scrollToPx = (endPosition) => {\n if ('scrollBehavior' in document.documentElement.style) {\n window.scrollTo({\n top: endPosition,\n left: 0,\n behavior: 'smooth',\n });\n }\n else {\n let gap = window.scrollY;\n const direction = gap > endPosition ? 'up' : 'down';\n const int = setInterval(function () {\n if (direction === 'up') {\n gap -= 10;\n if (gap <= endPosition)\n clearInterval(int);\n }\n else {\n gap += 10;\n if (gap >= endPosition)\n clearInterval(int);\n }\n window.scrollTo(0, gap);\n }, 10);\n }\n};\n// for PLP tiles check\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst findDuplicates = () => {\n const tiles = new Map();\n document.querySelectorAll('[data-id]').forEach((tile) => {\n // @ts-ignore\n let currentId = tile.dataset.id;\n if (tiles.has(currentId)) {\n tiles.set(currentId, Number(tiles.get(currentId)) + 1);\n }\n else {\n tiles.set(currentId, 1);\n }\n });\n let duplicateCounter = 0;\n for (const [key, value] of tiles) {\n if (value > 1) {\n duplicateCounter++;\n console.info(`found ${value} duplicates for ${key}`);\n }\n }\n console.info(`%cfound a total of ${duplicateCounter} duplicates!`, 'color:purple;background-color:white;font-weight:bold;');\n};\n","import classNames from 'classnames';\nimport React, { useEffect, useRef } from 'react';\nimport { useTranslation } from 'react-i18next';\nconst AccordionItem = (props) => {\n const { t } = useTranslation();\n const accordionPanel = useRef();\n const container = useRef();\n const opener = useRef();\n // const firstChildMargin = window.getComputedStyle(props?.parentRef?.firstChild as Element).getPropertyValue('margin-bottom');\n // useEffect(() => {\n // let heightForFlex;\n // if (props.flex && props.gap && props.parentHeight) {\n // heightForFlex =\n // console.log('children total height', heightForFlex);\n // }\n // }, [props.parentHeight]);\n useEffect(() => {\n console.log('Update Height: ', props.accordionId, props.updateHeight);\n // actual animation\n if (props.flex && props.gap && props.parentHeight) {\n accordionPanel.current.style.height = props.expanded\n ? props.autoHeight\n ? 'auto'\n : `${(props === null || props === void 0 ? void 0 : props.parentHeight) - (container.current.clientHeight * props.childrenLength + props.gap * (props.childrenLength - 1))}px`\n : '0px';\n }\n else {\n accordionPanel.current.style.height = props.expanded ? (props.autoHeight ? 'auto' : `${accordionPanel.current.firstElementChild.scrollHeight}px`) : '0px';\n }\n }, [props.expanded, props.children, props.updateHeight, props.parentHeight]);\n return (React.createElement(\"div\", { ref: container, className: (!props.miniAccordion ? 'accordion__item' : '') + (props.itemClass ? ' ' + props.itemClass : '') },\n React.createElement(\"button\", { ref: opener, type: \"button\", id: props.accordionId, onClick: () => {\n props.onClick && props.onClick();\n props.onSelect();\n if (props.callbackOnOpen && !props.expanded) {\n props.callbackOnOpen();\n }\n if (props.scrollToElement) {\n props.scrollToElement(container.current, opener.current);\n }\n }, className: classNames(props.miniAccordion ? 'accordion__header--mini' : 'accordion__header', { accordion__panel_open: props.expanded, 'header--selected': props.elementActive }, props.headerClass ? props.headerClass : ''), \"aria-expanded\": props.expanded, \"aria-controls\": props.accordionId + '-panel', tabIndex: props.tabIndex || null },\n props.isTitleMarkup ? props.title : React.createElement(\"span\", { className: \"primary-s\" + (props.miniAccordion ? ' accordion__header--underline' : '') }, props.title),\n !props.hideToggleButtons && !props.miniAccordion && (React.createElement(React.Fragment, null,\n React.createElement(\"i\", { className: \"header__open\" },\n React.createElement(\"span\", { className: \"text\" }, t('button.show'))),\n React.createElement(\"i\", { className: \"header__close\" },\n React.createElement(\"span\", { className: \"text\" }, t('button.hide'))))),\n props.miniAccordion &&\n React.createElement(React.Fragment, null,\n !props.expanded && React.createElement(\"div\", { className: \"accordion__header--arrow-down\" }),\n props.expanded && React.createElement(\"div\", { className: \"accordion__header--arrow-up\" }))),\n React.createElement(\"div\", { ref: accordionPanel, className: classNames(`accordion__panel${!!props.contentClass ? ' ' + props.contentClass : ''}`, { accordion__panel_open: props.expanded }), role: \"region\", id: props.accordionId + '-panel', \"aria-labelledby\": props.accordionId },\n React.createElement(\"div\", null,\n React.createElement(React.Fragment, null,\n props.loading && React.createElement(\"p\", { className: \"pb-12\" }, t('label.loading')),\n props.children)))));\n};\nAccordionItem.defaultProps = {\n isTitleMarkup: false,\n type: 'div',\n};\nexport default AccordionItem;\n","import classNames from 'classnames';\nimport React from 'react';\nconst Button = (props) => {\n const handleClick = (e) => {\n if (props.usesDefault != undefined && !props.usesDefault && props.onClick) {\n e.preventDefault();\n }\n props.onClick && props.onClick.call(this, e);\n };\n const handleKeyDown = (e) => {\n if (props.usesDefault != undefined && !props.usesDefault && props.onKeyDown) {\n e.preventDefault();\n }\n props.onKeyDown && props.onKeyDown.call(this, e);\n };\n return (React.createElement(\"button\", Object.assign({ ref: props.reference, onClick: handleClick, onKeyDown: handleKeyDown, disabled: props.disabled, className: classNames('button', props.cls, props.className, { loading: props.isLoading }), type: props.type, \"aria-label\": props.ariaLabel, \"aria-current\": props.ariaCurrent, \"aria-expanded\": props.ariaExpanded, \"aria-haspopup\": props.ariaHaspopup, \"aria-controls\": props.ariaControls, \"aria-busy\": props.ariaBusy, \"aria-describedby\": props.ariaDescribedby }, (props.tabIndex ? { tabIndex: props.tabIndex } : {})), props.isLoading ? (React.createElement(React.Fragment, null,\n React.createElement(\"div\", null))) : (React.createElement(\"span\", null, props.children))));\n};\nButton.defaultProps = {\n cls: ['button--primary'],\n className: '',\n};\nexport default Button;\n","import React from 'react';\nconst ColorSwatch = (props) => {\n if (!props.variation) {\n return React.createElement(React.Fragment, null);\n }\n return (React.createElement(\"i\", { className: `swatch swatch--${props.variation.refinementColor}`, style: { backgroundColor: props.variation.swatchColor, backgroundImage: (props.variation.swatchImg && `url(${props.variation.swatchImg})`) || undefined }, \"aria-hidden\": props.ariaHidden }));\n};\nexport default ColorSwatch;\n","import Button from '@stone/ui/button/Button';\nimport analytics from '@stone/utils/analytics';\nimport React, { Suspense, useEffect, useMemo, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport customEventBus from '@common/scripts/libs/eventBus';\nimport api from '@common/utils/api';\nimport { siteUrl } from '@common/utils/urlutils';\nconst LoginModal = React.lazy(() => import('@stone/components/login/LoginModal'));\nconst ProductActionAddToBag = (props) => {\n var _a, _b, _c, _d, _e;\n let { t } = useTranslation();\n const [showAddToBagMessage, setShowAddToBagMessage] = useState(false);\n const [loginOpen, setLoginOpen] = useState(false);\n useEffect(() => {\n let quickShopTimeout;\n if (showAddToBagMessage) {\n quickShopTimeout = setTimeout(() => {\n setShowAddToBagMessage(false);\n }, 5000);\n }\n return () => {\n clearTimeout(quickShopTimeout);\n };\n }, [showAddToBagMessage]);\n const addToBag = () => {\n var _a;\n setShowAddToBagMessage(true);\n props.onAddStart && props.onAddStart();\n if (!props.size) {\n // console.log('no size, triggering size selector:', props.triggerOpenSize);\n props.triggerOpenSize && props.triggerOpenSize();\n return;\n }\n const productId = ((_a = props.product) === null || _a === void 0 ? void 0 : _a.productType) === 'variant' ? props.product.id : `${props.product.id}${props.size.id}`;\n api.addToBag(productId).then((data) => {\n if (data.error) {\n props.updateErrorMessage && props.updateErrorMessage(data.message);\n props.updateErrorTitle && props.updateErrorTitle(data.label);\n }\n else {\n if (data.quantityTotal) {\n const header = document.querySelector('header');\n const firstRefine = document.querySelector('.listing-container .refine');\n header === null || header === void 0 ? void 0 : header.style.removeProperty('transform');\n if (firstRefine) {\n firstRefine.style.removeProperty('transform');\n }\n // console.info('update minicart');\n customEventBus.emit('bag:update', { fromMinicart: true });\n let wrapper = document.querySelector('.minibag');\n wrapper && wrapper.focus();\n customEventBus.emit('minicart:update', { fromAddToBag: true, pid: productId });\n }\n if (props.pushAnalytics) {\n props.pushAnalytics();\n }\n // sposto qui la callback, in modo che viene eseguita come ultima operazione se la chiamata va a buon fine\n if (props.callback) {\n props.callback();\n }\n }\n });\n };\n const btnModifiers = useMemo(() => {\n if (props.noModifiers) {\n return [];\n }\n let btnClass = 'button--' + (props.hierarchy || 'tertiary');\n if (props.inverted) {\n btnClass += '-inverted';\n }\n return [btnClass];\n }, [props.hierarchy, props.inverted, props.noModifiers]);\n return (!window.loggedin && siteUrl('login') && ((_a = props.product) === null || _a === void 0 ? void 0 : _a.unlock)) || props.productStatus === 'RESTRICTED_GUEST' ? (React.createElement(React.Fragment, null,\n React.createElement(Button, { type: \"button\", cls: btnModifiers, className: props.className, customTabIndex: props.excludeForA11N && -1, ariaHaspopup: \"dialog\", onClick: () => {\n setLoginOpen(true);\n analytics.productActionIntent('log in to purchase', props.product.id);\n } }, t('button.signintopurchase')),\n React.createElement(Suspense, { fallback: React.createElement(React.Fragment, null) },\n React.createElement(LoginModal, { incontext: \"membersonly\", modalStatus: loginOpen, updateStatus: (status) => setLoginOpen(status) })))) : showAddToBagMessage && props.isLookCarousel ? (React.createElement(Button, { type: \"button\", cls: btnModifiers, className: \"button--added-item\", onClick: () => addToBag(), customTabIndex: props.excludeForA11N && -1 }, t('bag.justadded'))) : ((_b = props === null || props === void 0 ? void 0 : props.productStatus) === null || _b === void 0 ? void 0 : _b.startsWith('RESTRICTED')) && (props === null || props === void 0 ? void 0 : props.productStatus) !== 'RESTRICTED_ELIGIBLE' ? (React.createElement(Button, { type: \"button\", cls: btnModifiers, disabled: true, customTabIndex: props.excludeForA11N && -1 }, t('button.addtobag'))) : (React.createElement(Button, { type: \"button\", cls: btnModifiers, ariaHaspopup: \"dialog\", onClick: () => addToBag(), customTabIndex: props.excludeForA11N && -1 }, ((_e = (_d = (_c = props.product.variationAttributes) === null || _c === void 0 ? void 0 : _c.find((va) => va.id == 'color')) === null || _d === void 0 ? void 0 : _d.values.find((va) => va.selected)) === null || _e === void 0 ? void 0 : _e.preorderable) ? t('button.preordernow') : t('button.addtobag')));\n};\nexport default ProductActionAddToBag;\n","import Button from '@stone/ui/button/Button';\nimport analytics from '@stone/utils/analytics';\nimport React, { useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport ProductNotifyMeModal from '@stone/components/product/ProductNotifyMeModal';\nconst ProductActionNotifyMe = (props) => {\n var _a;\n const { t } = useTranslation();\n const [showOverlay, setShowOverlay] = React.useState(false);\n const btnModifiers = useMemo(() => {\n if (props.noModifiers) {\n return [];\n }\n let btnClass = (!props.customClasses && 'button--primary') || '';\n if (props.inverted) {\n btnClass += '-inverted';\n }\n return [btnClass];\n }, [props.customClasses, props.inverted, props.noModifiers]);\n const onOpenModal = () => {\n var _a;\n if (!props.size) {\n props.triggerOpenSize && props.triggerOpenSize();\n return;\n }\n analytics.productActionIntent('notify me', ((_a = props.color) === null || _a === void 0 ? void 0 : _a.productId) || props.product.id);\n setShowOverlay(true);\n props.onOpenModal && props.onOpenModal();\n };\n const onCloseModal = (triggerCloseOnly) => {\n setShowOverlay(false);\n typeof triggerCloseOnly != 'boolean' && props.onCloseModal && props.onCloseModal();\n };\n return (React.createElement(React.Fragment, null,\n React.createElement(Button, { type: \"button\", cls: (_a = props.customClasses) !== null && _a !== void 0 ? _a : btnModifiers, onClick: () => {\n onOpenModal();\n }, customTabIndex: props.excludeForA11N && -1 }, t('label.notifyme')),\n React.createElement(ProductNotifyMeModal, { isOpen: showOverlay, title: t('label.notifyme'), product: props.product, color: props.color, size: props.size, onRequestClose: onCloseModal, from: props.from, fromReserve: props.fromReserve })));\n};\nexport default ProductActionNotifyMe;\n","import classNames from 'classnames';\nimport React, { useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useLangChecker } from '@common/utils/i18n';\nexport const GenericLabel = ({ label, className }) => {\n return (React.createElement(\"span\", { ref: useLangChecker, className: classNames('product-label', className) }, label.trim()));\n};\nconst ProductLabels = (props) => {\n const { product, type } = props;\n let { t } = useTranslation();\n const [labels, setLabels] = useState([]);\n useEffect(() => {\n let _labels = [];\n if (product) {\n _labels = [\n (product.isBoutiqueExclusive || (type !== 'tile' && product.isBoutiqueExclusivePDP)) && t('label.botiqueexclusive'),\n product.isPreview && t('label.ispreview'),\n (!product.isBoutiqueExclusive || !product.isBoutiqueExclusivePDP) && product.isComingSoon === 2 && t('label.comingsoon'),\n // product.availability?.isOutOfStock && product.isComingSoon && !product.isBoutiqueExclusive && t('label.outofstock'),\n product.isLimitedEdition && t('label.limitededition'),\n product.isOnlineExclusive && t('label.onlineexclusive'),\n product.isNew && t('label.isnew'),\n // product.unlock && t('tile.membersonly'),\n ];\n _labels = _labels.filter((string) => !!string);\n if (props.limit) {\n _labels.splice(1, props.limit);\n }\n }\n setLabels(_labels);\n }, [product]);\n if ((labels === null || labels === void 0 ? void 0 : labels.length) < 1)\n return React.createElement(React.Fragment, null);\n return (React.createElement(\"div\", { className: \"product-labels font__subtitle\" }, labels.map((label, i) => (React.createElement(GenericLabel, { key: i, label: label })))));\n};\nexport default ProductLabels;\n","import Button from '@ui/button/Button';\nimport DwFormField from '@ui/formfield/DwFormField';\nimport createDecorator from 'final-form-focus';\nimport React from 'react';\nimport { Form } from 'react-final-form';\nimport { useTranslation } from 'react-i18next';\nconst focusOnError = createDecorator(); // must be outside the component\nconst NotifyForm = ({ formdef, onSubmit, initialValues, validate, buttonText }) => {\n const { t } = useTranslation();\n return (React.createElement(React.Fragment, null, formdef && (React.createElement(Form, { onSubmit: onSubmit, initialValues: initialValues, decorators: [focusOnError], validate: (values) => validate(values, formdef), render: ({ handleSubmit, submitting }) => (React.createElement(\"form\", { onSubmit: handleSubmit },\n React.createElement(\"fieldset\", null,\n React.createElement(\"div\", { className: \"row\" },\n React.createElement(\"div\", { className: \"col-6\" },\n React.createElement(DwFormField, { def: formdef, name: \"title\", type: \"select\" })),\n React.createElement(\"div\", { className: \"col-18\" },\n React.createElement(DwFormField, { def: formdef, name: \"firstname\", placeholder: t('product.notifyme.form.placeholder.firstname') })),\n React.createElement(\"div\", { className: \"col-24\" },\n React.createElement(DwFormField, { def: formdef, name: \"lastname\", placeholder: t('product.notifyme.form.placeholder.lastname') })),\n React.createElement(\"div\", { className: \"col-24\" },\n React.createElement(DwFormField, { def: formdef, name: \"email\", placeholder: t('product.notifyme.form.placeholder.email') })),\n React.createElement(\"div\", { className: \"col-24\" },\n React.createElement(DwFormField, { def: formdef, name: \"gender\", type: \"radio\", groupClassName: \"form-group--gender-radio\" }))),\n React.createElement(\"div\", { className: \"row row--consent\" },\n React.createElement(\"div\", { className: \"col-24\" },\n React.createElement(DwFormField, { def: formdef, type: \"checkbox\", name: \"emailMarketingConsentFlag\" })),\n React.createElement(\"div\", { className: \"col-24\" },\n React.createElement(DwFormField, { def: formdef, type: \"checkbox\", name: \"privacyFlag\" })),\n React.createElement(\"div\", { className: \"col\" },\n React.createElement(\"p\", { className: \"newsletter-modal__required-label\" }, t('label.required'))))),\n React.createElement(Button, { type: \"submit\", disabled: submitting, cls: ['button--primary'] }, buttonText))) }))));\n};\nexport default NotifyForm;\n","import ErrorBox from '@components/common/ErrorBox';\nimport NotifyForm from '@stone/components/notify/NotifyForm';\nimport ModalDialog from '@stone/components/modal/ModalDialog';\nimport analytics from '@stone/utils/analytics';\nimport api from '@utils/api';\nimport formutils from '@utils/formutils';\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport ProductTileReview from '@stone/components/product/ProductTileReview';\nconst ProductNotifyMeModal = (props) => {\n const { t } = useTranslation();\n const [formdef, setFormdef] = useState();\n const [initialValues, setInitialValues] = useState();\n const [requestSent, setRequestSent] = useState();\n const [fullproductid, setFullproductid] = useState();\n const [errors, setErrors] = useState([]);\n const { product, color, size } = props;\n useEffect(() => {\n var _a, _b, _c;\n if (color) {\n setFullproductid(`${(_a = props.product) === null || _a === void 0 ? void 0 : _a.masterId}${(_b = props.color) === null || _b === void 0 ? void 0 : _b.id}${(_c = props.size) === null || _c === void 0 ? void 0 : _c.id}`);\n }\n }, [product, color, size]);\n // non renderizzare la modale all'apertura della pagina, non fare chiamate se non aperta\n const firstRender = useRef(true);\n useEffect(() => {\n if (props.isOpen && firstRender.current) {\n firstRender.current = false;\n let val = {};\n api.getForm('notifyme-product', val).then((data) => {\n prefillValues(val);\n setFormdef(data);\n if (window.loggedin) {\n api.getUserPrefillInfo().then((user) => {\n setInitialValues(Object.assign(Object.assign({}, val), user));\n });\n }\n else {\n setInitialValues(val);\n }\n });\n }\n }, [props.isOpen]);\n const prefillValues = (values) => {\n values.productid = fullproductid;\n values.from = window.location.href; // debug invalid forms\n };\n const validate = async (values) => {\n prefillValues(values);\n return await formutils.validateForm(values, formdef, 'notifyme-product');\n };\n const onSubmit = async (values) => {\n prefillValues(values);\n setErrors([]);\n let err = await validate(values);\n if (err && Object.keys(err).length > 0) {\n return err;\n }\n api.notifymeSubmit(values, formdef).then((data) => {\n var _a, _b;\n let errors = {};\n if (!formutils.checkValidationAfterSubmit(data, errors)) {\n return errors;\n }\n analytics.notifyMe(`${(_a = props.product) === null || _a === void 0 ? void 0 : _a.masterId}${(_b = props.color) === null || _b === void 0 ? void 0 : _b.id}`, 'submit');\n setRequestSent(values);\n });\n };\n const review = useCallback(() => {\n return (React.createElement(\"div\", { className: \"product-notify__detail__confirm\", role: \"alert\" },\n React.createElement(\"p\", null,\n React.createElement(\"span\", { className: \"font-medium\" },\n React.createElement(\"b\", null, t('notifyme.thankyou'))),\n React.createElement(\"br\", null),\n React.createElement(\"br\", null),\n React.createElement(\"span\", null, t('notifyme.confirmation')))));\n }, [requestSent]);\n const notifyForm = () => (React.createElement(NotifyForm, { color: props.color, size: props.size, formdef: formdef, onSubmit: onSubmit, initialValues: initialValues, validate: validate, buttonText: t('label.notifyme') }));\n const content = () => {\n if (requestSent) {\n return review();\n }\n else {\n return notifyForm();\n }\n };\n return (React.createElement(ModalDialog, { fullHeight: true, fullWidth: true, hasDivisor: true, isOpen: props.isOpen, onAfterOpen: () => {\n var _a, _b;\n analytics.notifyMe(`${(_a = props.product) === null || _a === void 0 ? void 0 : _a.masterId}${(_b = props.color) === null || _b === void 0 ? void 0 : _b.id}`);\n }, onRequestClose: props.onRequestClose, onAfterClose: () => setRequestSent(null), contentLabel: props.title, id: \"notifyme\", className: \"lg-scrollable\", subjsx: () => React.createElement(ProductTileReview, { product: props.product, color: props.color, size: props.size }), style: { content: { height: props.fromReserve ? document.querySelector('#reserveinboutique').offsetHeight : undefined } } },\n React.createElement(\"div\", { className: \"product-notify\" },\n React.createElement(\"div\", { className: \"product-notify__detail\" }, content()),\n React.createElement(ErrorBox, { errors: errors }))));\n};\nexport default ProductNotifyMeModal;\n","import classNames from 'classnames';\nimport React, { useRef } from 'react';\nimport { useTranslation } from 'react-i18next';\nconst SelectorItem = (props) => {\n const { t } = useTranslation();\n const refItem = useRef();\n const selectorContent = () => {\n return (React.createElement(React.Fragment, null,\n React.createElement(\"span\", { className: classNames('selector__menu__item__label') },\n props.label,\n props.enableOutofstockLabel && props.isOutOfStock ? ` - ${t('label.outofstock')}` : ''),\n props.children));\n };\n return (React.createElement(\"div\", { className: \"selector__menu-listitem\", ref: refItem },\n React.createElement(\"label\", { className: classNames('selector__menu__item', props.disabled && 'is-disabled', props.selected && 'selected', props.isInverted && 'inverted'), onMouseEnter: () => props.onHoverChange(true), onMouseLeave: () => props.onHoverChange(false) },\n React.createElement(\"input\", { type: \"radio\", className: \"selector__item-radio\", onChange: () => {\n props.onSelect(props.item, refItem.current);\n }, \"aria-label\": props.disabled ? t('selector.option.notavailable', { 0: props.label }) : props.label, disabled: !props.isNotAvailableSelectable && props.disabled ? true : false, name: `selector__item-${props.groupid}`, value: props.value, checked: props.selected ? true : false, tabIndex: props.disableFocus ? -1 : undefined }),\n props.children)));\n};\nSelectorItem.defaultProps = {\n enableOutofstockLabel: true,\n isNotAvailableSelectable: true,\n isInverted: false,\n};\nexport default SelectorItem;\n","import classNames from 'classnames';\nimport React, { useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport whatInput from 'what-input';\nconst Selector = (props) => {\n var _a, _b;\n const selectorRef = useRef(null);\n const menuRef = useRef(null);\n const [open, setOpen] = useState(false);\n const [focusList, setFocusList] = useState(false);\n useLayoutEffect(() => {\n var _a, _b;\n if (open) {\n props.trackOpen ? props.trackOpen() : null;\n const menuHeight = (_a = menuRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight;\n if (selectorRef.current && menuHeight > selectorRef.current.offsetHeight) {\n selectorRef.current.style.height = `${menuHeight}px`;\n selectorRef.current.style.visibility = 'visible';\n }\n }\n else {\n (_b = selectorRef.current) === null || _b === void 0 ? void 0 : _b.removeAttribute('style');\n }\n }, [open]);\n useEffect(() => {\n setOpen(props.open);\n }, [props.open, props.currentItem]);\n return (React.createElement(\"div\", { className: classNames(props.className), ref: selectorRef, onMouseEnter: () => {\n whatInput.ask() === 'mouse' && !props.disableHover && props.children.length !== 1 && setOpen(true);\n }, onMouseLeave: () => {\n !props.disableHover && !props.open && props.children.length !== 1 && setOpen(false);\n } },\n React.createElement(\"fieldset\", { ref: menuRef, className: classNames('selector__menu'), id: props.selectorId, tabIndex: -1 },\n React.createElement(\"legend\", { className: \"visually-hidden\" }, props.unselectedLabel),\n (!(props === null || props === void 0 ? void 0 : props.hideLabel) || (props === null || props === void 0 ? void 0 : props.hideValue)) && (React.createElement(\"div\", { className: \"selector__menu-labels\" },\n !(props === null || props === void 0 ? void 0 : props.hideLabel) && (React.createElement(\"span\", { className: \"selector__menu-label label\", id: props.selectorId + '-title' }, (_a = props.selectLabel) !== null && _a !== void 0 ? _a : props.selectedLabel,\n \":\")),\n !(props === null || props === void 0 ? void 0 : props.hideValue) && React.createElement(\"span\", { className: \"selector__menu-value\" }, props.itemType === 'string' ? props.currentItem : (_b = props.currentItem) === null || _b === void 0 ? void 0 : _b.displayValue))),\n React.createElement(\"div\", { role: props.listRole || null, className: classNames('selector__menu-list', { focused: focusList }), onFocus: () => {\n // handles color labels show/hide on keyboard focus\n setFocusList(true);\n }, onBlur: () => {\n // handles color labels show/hide on keyboard focus\n setFocusList(false);\n } }, props.children))));\n};\nSelector.defaultProps = {\n swatchable: false,\n enableOutofstockLabel: false,\n hideValue: false,\n itemType: 'object',\n};\nexport default Selector;\n","import classNames from 'classnames';\nimport React, { useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport whatInput from 'what-input';\nimport SwiperCore, { A11y, Controller, EffectCoverflow, Keyboard } from 'swiper';\nimport { Swiper as SwiperInstance, SwiperSlide } from 'swiper/react';\nSwiperCore.use([A11y, Keyboard, Controller, EffectCoverflow]);\nconst Selector = (props) => {\n var _a, _b;\n const selectorRef = useRef(null);\n const menuRef = useRef(null);\n const [open, setOpen] = useState(false);\n useEffect(() => {\n var _a, _b;\n if (open) {\n props.trackOpen ? props.trackOpen() : null;\n const menuHeight = (_a = menuRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight;\n if (selectorRef.current && menuHeight > selectorRef.current.offsetHeight) {\n selectorRef.current.style.height = `${menuHeight}px`;\n selectorRef.current.style.visibility = 'visible';\n }\n }\n else {\n (_b = selectorRef.current) === null || _b === void 0 ? void 0 : _b.removeAttribute('style');\n }\n }, [open]);\n useEffect(() => {\n setOpen(props.open);\n }, [props.open, props.currentItem]);\n const swiperRef = useRef();\n /* methods */\n const slideMove = (swiper) => {\n const prev = document.getElementById(`selector-prev-${props.groupid}`);\n const next = document.getElementById(`selector-next-${props.groupid}`);\n if (swiper.isBeginning) {\n prev === null || prev === void 0 ? void 0 : prev.setAttribute('disabled', 'disabled');\n prev === null || prev === void 0 ? void 0 : prev.classList.add('swiper-button-disabled');\n }\n else {\n prev === null || prev === void 0 ? void 0 : prev.removeAttribute('disabled');\n prev === null || prev === void 0 ? void 0 : prev.classList.remove('swiper-button-disabled');\n }\n if (swiper.isEnd) {\n next === null || next === void 0 ? void 0 : next.setAttribute('disabled', 'disabled');\n next === null || next === void 0 ? void 0 : next.classList.add('swiper-button-disabled');\n }\n else {\n next === null || next === void 0 ? void 0 : next.removeAttribute('disabled');\n next === null || next === void 0 ? void 0 : next.classList.remove('swiper-button-disabled');\n }\n };\n /* config */\n const swiperConf = {\n a11y: {\n slideRole: null,\n slideLabelMessage: null,\n },\n // navigation: true,\n slidesPerView: (props.fullExpanded && 4) || 3.5,\n spaceBetween: 4,\n autoplay: false,\n slideToClickedSlide: false,\n breakpoints: {\n [window.mqObj.lg]: {\n slidesPerView: 6,\n },\n [window.mqObj.xxl]: {\n slidesPerView: 5,\n spaceBetween: 6,\n },\n },\n onSlideChange: slideMove,\n onInit: (swiper) => {\n slideMove(swiper);\n },\n };\n /* EFFECT */\n useLayoutEffect(() => {\n const prev = document.getElementById(`selector-prev-${props.groupid}`);\n const next = document.getElementById(`selector-next-${props.groupid}`);\n const prevHandler = (e) => {\n e.preventDefault();\n swiperRef.current.slidePrev();\n };\n const nextHandler = (e) => {\n e.preventDefault();\n swiperRef.current.slideNext();\n };\n prev === null || prev === void 0 ? void 0 : prev.addEventListener('click', prevHandler);\n next === null || next === void 0 ? void 0 : next.addEventListener('click', nextHandler);\n return () => {\n prev === null || prev === void 0 ? void 0 : prev.removeEventListener('click', prevHandler);\n next === null || next === void 0 ? void 0 : next.removeEventListener('click', nextHandler);\n };\n }, [props.open]);\n return (React.createElement(\"div\", { className: classNames(props.className), ref: selectorRef, onMouseEnter: () => {\n whatInput.ask() === 'mouse' && !props.disableHover && props.children.length !== 1 && setOpen(true);\n }, onMouseLeave: () => {\n !props.disableHover && !props.open && props.children.length !== 1 && setOpen(false);\n } },\n React.createElement(\"div\", { ref: menuRef, className: classNames('selector__menu'), id: props.selectorId, \"aria-labelledby\": props.selectorId + '-title', \"aria-hidden\": open ? null : true, tabIndex: -1 },\n (!(props === null || props === void 0 ? void 0 : props.hideLabel) || (props === null || props === void 0 ? void 0 : props.hideValue)) && (React.createElement(\"div\", { className: \"selector__menu-labels\" },\n !(props === null || props === void 0 ? void 0 : props.hideLabel) && (React.createElement(\"span\", { className: \"selector__menu-label label\", id: props.selectorId + '-title' }, (_a = props.selectLabel) !== null && _a !== void 0 ? _a : props.selectedLabel,\n \":\")),\n !(props === null || props === void 0 ? void 0 : props.hideValue) && React.createElement(\"span\", { className: \"selector__menu-value\" }, props.itemType === 'string' ? props.currentItem : (_b = props.currentItem) === null || _b === void 0 ? void 0 : _b.displayValue))),\n open && (React.createElement(\"fieldset\", null,\n React.createElement(\"legend\", { className: \"visually-hidden\" }, props.unselectedLabel),\n React.createElement(SwiperInstance, Object.assign({ onSwiper: (swiper) => {\n swiperRef.current = swiper;\n } }, swiperConf), props.children[0].map((child, k) => (React.createElement(SwiperSlide, { key: k }, child)))))))));\n};\nSelector.defaultProps = {\n swatchable: false,\n enableOutofstockLabel: false,\n hideValue: false,\n itemType: 'object',\n};\nexport default Selector;\n","import React, { Suspense, useMemo, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport classNames from 'classnames';\nimport { getZeroPadNumber } from '@utils/stringUtils';\nimport SelectorItem from '@stone/ui/selector/SelectorItem';\n// import Selector from '@stone/components/product/Selector';\nimport ColorSwatch from '@stone/components/product/ColorSwatch';\nimport Icon from '@stone/ui/icon/Icon';\nimport Selector from '@stone/components/product/Selector';\nimport SelectorSwiper from '@stone/components/product/SelectorSwiper';\nconst ProductSelectionColor = (props) => {\n const { t } = useTranslation();\n const colorList = (props.limit && [...props.variationValues].splice(0, props.limit)) || props.variationValues;\n const [tempVariant, setTempVariant] = useState(null);\n const [isOpen, setIsOpen] = useState(props.open);\n const navigationPosition = useMemo(() => {\n if (props.showHideLabel)\n return 'top';\n return props.carouselNavigation || 'top';\n }, [props.carouselNavigation, props.carousel, props.showHideLabel]);\n const selectedVariant = useMemo(() => {\n return props.variationValues.find((variationValue) => variationValue.id === props.currentId);\n }, [props.variationValues, props.currentId]);\n const CustomSelector = useMemo(() => {\n return props.carousel ? SelectorSwiper : Selector;\n }, [props.carousel]);\n const scrollActions = () => {\n if (!props.showHideLabel && !props.carousel)\n return null;\n return (React.createElement(\"div\", { className: classNames('selector-navigation', { 'selector-navigation-top': navigationPosition === 'top' && !props.showHideLabel }) },\n props.showHideLabel && (React.createElement(\"div\", { className: \"selector-navigation-label\" },\n React.createElement(\"button\", { className: \"button\", \"aria-expanded\": isOpen, \"aria-controls\": 'pdp-colorSelector-' + props.groupid, id: 'pdp-colorSelector-' + props.groupid + '-title', onClick: () => {\n setIsOpen(!isOpen);\n }, tabIndex: props.disableFocus ? -1 : undefined },\n React.createElement(Icon, { family: \"10\", name: !isOpen ? 'open' : 'minimize' }),\n \" \",\n colorList.length > 1 ? `${colorList.length} ${t('product.colors')}` : t('product.color')))),\n props.carousel && (React.createElement(\"div\", { className: \"selector-navigation-chevrons\", style: { opacity: isOpen ? 1 : 0 } },\n React.createElement(\"button\", { id: `selector-prev-${props.groupid}`, className: \"selector-button\", tabIndex: -1, \"aria-hidden\": true },\n React.createElement(Icon, { family: \"10\", name: \"left-chevron\" })),\n React.createElement(\"button\", { id: `selector-next-${props.groupid}`, className: \"selector-button\", tabIndex: -1, \"aria-hidden\": true },\n React.createElement(Icon, { family: \"10\", name: \"right-chevron\" }))))));\n };\n return (React.createElement(\"div\", { className: \"selector-wrapper\" },\n navigationPosition === 'top' && scrollActions(),\n React.createElement(Suspense, { fallback: React.createElement(React.Fragment, null) },\n React.createElement(CustomSelector, Object.assign({ className: classNames('selector-color radio-selector', props.className, { 'with-carousel': props.carousel }), unselectedLabel: t((props.showHideLabel && 'label.a11y.colorupdatetile') || 'label.selectacolor'), selectedLabel: t('label.color'), selectorId: 'pdp-colorSelector-' + props.groupid, currentItem: tempVariant || selectedVariant, enableOutofstockLabel: !window.unshoppable, swatchable: true, open: isOpen, hideValue: props.hideValue, hideLabel: props.hideLabel || props.showHideLabel, groupid: props.groupid }, (props.carousel && { fullExpanded: props.fullExpanded })),\n colorList.map((variation, _index) => (React.createElement(SelectorItem, { key: variation.id, value: variation.id, label: variation.displayValue, disabled: props.alwaysAvailable ? false : !variation.selectable, selected: variation.value == props.currentId, isOutOfStock: !variation.selectable, item: variation, onSelect: (variation, refitem) => {\n props.onChangeVariation(variation);\n }, groupid: props.groupid, onHoverChange: (isIn) => {\n setTempVariant(isIn ? variation : null);\n }, disableFocus: props.disableFocus },\n React.createElement(ColorSwatch, { variation: variation })))),\n colorList.length < props.variationValues.length && (React.createElement(\"li\", { \"aria-label\": t('app.a11y.pdp.availableInMoreColors', { numberOfColors: props.variationValues.length - props.limit }), className: \"selector-color__hasmore\" },\n \"+ \",\n getZeroPadNumber(props.variationValues.length - props.limit, 2))))),\n navigationPosition === 'bottom' && scrollActions()));\n};\nProductSelectionColor.defaultProps = {\n variationValues: [],\n};\nexport default ProductSelectionColor;\n","import classNames from 'classnames';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\nconst SelectorSize = (props) => {\n const { t } = useTranslation();\n return (React.createElement(\"label\", { className: classNames('selector-size-item', props.disabled && 'disabled', props.selected && 'selected') },\n React.createElement(\"input\", { type: \"radio\", checked: props.selected, onChange: props.onSelect, name: `size-selector-${props.variationGroupId}`, value: props.value, \"aria-label\": `${props.label}${(props.disabled && ' ' + t('label.outofstocksize') + ' ' + t('label.notifyme')) || ''}` }),\n React.createElement(\"span\", { className: \"selector-size-item__label\", \"aria-hidden\": \"true\" }, props.label)));\n};\nexport default SelectorSize;\n","import React, { useEffect, useMemo, useState, useRef } from 'react';\nimport { useTranslation } from 'react-i18next';\nconst METRIC = 'cm';\nconst IMPERIAL = 'inches';\nconst BodyMeasurements = (props) => {\n var _a, _b, _c, _d, _e, _f, _g;\n const { t } = useTranslation();\n const { sizeChart } = props;\n const [currentMetrics, setCurrentMetrics] = useState(window.country == 'US' ? IMPERIAL : METRIC);\n const [selectedCountry, setSelectedCountry] = useState((_b = (_a = sizeChart.sizechartdata) === null || _a === void 0 ? void 0 : _a.countries.find((el) => el.id == window.country)) !== null && _b !== void 0 ? _b : (_c = sizeChart.sizechartdata) === null || _c === void 0 ? void 0 : _c.countries.filter((c) => c.id != 'MONCLER')[0]);\n const [table, setTable] = useState({});\n const sizeChartRef = useRef();\n useEffect(() => {\n if (sizeChartRef.current) {\n const maxColumnHeight = Array.from(sizeChartRef.current.querySelectorAll('.column .column-head')).reduce((previous, current) => {\n return current.clientHeight > previous ? current.clientHeight : previous;\n }, 0);\n sizeChartRef.current.style.setProperty('--sizechart-height', maxColumnHeight + 'px');\n }\n }, [props.isSelected]);\n useEffect(() => {\n var _a, _b;\n if (sizeChart && sizeChart.content) {\n const localtable = {};\n sizeChart.content.forEach((chart, i) => {\n let chartTitle = chart.title ? chart.title : 'cm';\n const decodedMap = decodeURI(sizeChart.content[i].content);\n localtable[chartTitle] = decodedMap.split('\\n').map((el) => el.split('\\t'));\n });\n setTable(localtable);\n }\n if (sizeChart && (selectedCountry === null || selectedCountry === void 0 ? void 0 : selectedCountry.id) !== window.country && ((_a = sizeChart.sizechartdata) === null || _a === void 0 ? void 0 : _a.defaultSizeConversion)) {\n let checkDefaultSizeConversion = (_b = sizeChart.sizechartdata) === null || _b === void 0 ? void 0 : _b.defaultSizeConversion.find((s) => s.id == window.country);\n if (checkDefaultSizeConversion) {\n let defaultSizeConversion = sizeChart.sizechartdata.countries.find((c) => c.id == checkDefaultSizeConversion.defaultSizeConversion);\n setSelectedCountry(defaultSizeConversion);\n }\n }\n }, [sizeChart]);\n const regionNames = useMemo(() => new Intl.DisplayNames([window.language], { type: 'region', fallback: 'code' }), []);\n const metricLabel = useMemo(() => {\n if (!sizeChart) {\n return '';\n }\n return sizeChart.mannequinGender != 'dog' ? 'sizeguide.uom.kgcm' : 'sizeguide.uom.cm';\n }, [sizeChart]);\n const imperialLabel = useMemo(() => {\n if (!sizeChart) {\n return '';\n }\n return sizeChart.mannequinGender != 'dog' ? 'sizeguide.uom.inchespounds' : 'sizeguide.uom.inches';\n }, [sizeChart]);\n const metricSelector = () => (React.createElement(\"fieldset\", { className: \"switch fieldset--plain\" },\n React.createElement(\"label\", { className: \"radio\" },\n React.createElement(\"input\", { type: \"radio\", name: \"metrics\", onChange: () => {\n setCurrentMetrics(METRIC);\n }, defaultChecked: currentMetrics === METRIC, \"data-unit-value\": \"1\", className: currentMetrics === METRIC ? 'switch__item selected' : 'switch__item' }),\n t(metricLabel)),\n React.createElement(\"label\", { className: \"radio\" },\n React.createElement(\"input\", { type: \"radio\", name: \"metrics\", onChange: () => {\n setCurrentMetrics(IMPERIAL);\n }, defaultChecked: currentMetrics === IMPERIAL, \"data-unit-value\": \"0\", className: currentMetrics === IMPERIAL ? 'switch__item selected' : 'switch__item' }),\n t(imperialLabel))));\n return (React.createElement(\"div\", { className: \"sizechart\", ref: sizeChartRef },\n (!!sizeChart.content || (!!sizeChart.sizechartdata && !!sizeChart.sizechartdata.sizes && typeof Object.values(sizeChart.sizechartdata.sizes)[0] !== 'string')) && (React.createElement(\"div\", { className: \"sizechart__filters form-group\" }, metricSelector())),\n ((_d = sizeChart === null || sizeChart === void 0 ? void 0 : sizeChart.sizechartdata) === null || _d === void 0 ? void 0 : _d.description) && (React.createElement(\"p\", { className: \"sizechart__description font__title\" }, t('sizechart.description.' + sizeChart.sizechartdata.description.toLowerCase()))),\n !!sizeChart.sizechartdata ? (React.createElement(React.Fragment, null,\n !sizeChart.sizechartdata.hideCountrySelector && (React.createElement(\"div\", { className: \"form-group country-select\" },\n React.createElement(\"label\", { className: \"form-group__label\", htmlFor: \"country\" }, t('label.country')),\n React.createElement(\"div\", { className: \"form-select mb-12\" },\n React.createElement(\"select\", { name: \"country\", value: selectedCountry === null || selectedCountry === void 0 ? void 0 : selectedCountry.id, onChange: (e) => {\n setSelectedCountry(sizeChart.sizechartdata.countries.find((c) => c.id == e.target.value));\n } }, sizeChart.sizechartdata.countries\n .filter((c) => c.id != 'MONCLER')\n .map((c, i) => (React.createElement(\"option\", { key: i, value: c.id }, c.id.length == 2 ? regionNames.of(c.id) : c.id))))))),\n React.createElement(\"div\", { className: \"custom-table\" },\n React.createElement(\"div\", { className: \"column fixed-col\" },\n React.createElement(\"span\", { className: \"column-head font__title\" }, t('sizechart.labelsize.default')),\n sizeChart.sizechartdata.countries\n .find((c) => c.id == 'MONCLER')\n .values.map((s, i) => (React.createElement(\"span\", { className: \"primary-xs\", key: i }, s)))),\n React.createElement(\"div\", { className: \"scrollable-area\" },\n selectedCountry && (React.createElement(\"div\", { className: \"column\" },\n React.createElement(\"span\", { className: \"column-head font__title\" }, t(`sizechart.labelsize.${(_e = selectedCountry === null || selectedCountry === void 0 ? void 0 : selectedCountry.id) === null || _e === void 0 ? void 0 : _e.toLowerCase()}`)), selectedCountry === null || selectedCountry === void 0 ? void 0 :\n selectedCountry.values.map((s, i) => (React.createElement(\"span\", { className: \"primary-xs\", key: i }, s))))),\n Object.keys(sizeChart.sizechartdata.labelsOnImage).map((c, i) => {\n return (React.createElement(\"div\", { key: i, className: \"column\" },\n React.createElement(\"span\", { className: \"column-head font__title\" }, t(sizeChart.sizechartdata.labelsOnImage[c])),\n sizeChart.sizechartdata.countries\n .find((c) => c.id == 'MONCLER')\n .values.map((s, i) => {\n if (sizeChart.sizechartdata.sizes[s]) {\n return (React.createElement(\"span\", { className: \"primary-xs\", key: i },\n sizeChart.sizechartdata.sizes[s][c][currentMetrics],\n ' '));\n }\n })));\n }))),\n React.createElement(\"p\", { className: \"primary-xs\" }, t('sizechart.bodymeasurements')))) : (React.createElement(\"table\", { className: \"table\" },\n React.createElement(\"thead\", null,\n React.createElement(\"tr\", null, (_f = table[currentMetrics]) === null || _f === void 0 ? void 0 : _f[0].map((h, i) => (React.createElement(\"th\", { key: i }, h))))),\n React.createElement(\"tbody\", null, (_g = table[currentMetrics]) === null || _g === void 0 ? void 0 : _g.map((row, rowI) => {\n if (rowI === 0) {\n return;\n }\n return (React.createElement(\"tr\", { key: rowI }, row.map((item, itemI) => (React.createElement(\"td\", { key: itemI }, item)))));\n }))))));\n};\nexport default BodyMeasurements;\n","import React, { useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\nconst HowToMeasure = (props) => {\n const { t } = useTranslation();\n const { mannequinGender } = props;\n const mannequinClass = useMemo(() => {\n return 'sizechart__mannequin sizechart__mannequin--' + mannequinGender;\n }, [mannequinGender]);\n const mannequinLabelText = useMemo(() => {\n switch (mannequinGender) {\n case 'men-top':\n return [\n { title: 'neck', desc: 'neckdesc' },\n { title: 'chest', desc: 'chestdesc' },\n { title: 'waist.tops', desc: 'waistdesc.tops' },\n ];\n case 'men-bottom':\n return [\n { title: 'waist.bottoms', desc: 'waistdesc.bottoms' },\n { title: 'pelvic', desc: 'pelvicdesc' },\n ];\n case 'glove':\n return [\n {\n title: 'length.gloves',\n desc: 'lengthdesc.gloves',\n },\n ];\n case 'belt':\n return [\n {\n title: 'length.belts',\n desc: 'lengthdesc.belts',\n },\n ];\n case 'hat':\n return [\n {\n title: 'length.hats',\n desc: 'lengthdesc.hats',\n },\n ];\n case 'kid':\n return [\n { title: 'height', desc: 'heightdesc' },\n { title: 'chestkids', desc: 'chestkidsdesc' },\n { title: 'armlength', desc: 'armlengthdesc' },\n { title: 'waistkids', desc: 'waistkidsdesc' },\n ];\n default:\n return;\n }\n }, [mannequinGender]);\n return (React.createElement(\"div\", { className: \"sizechart sizechart--measure\" },\n React.createElement(\"div\", { className: \"sizechart__wrapper\" },\n React.createElement(\"dl\", { className: `sizechart__legend ${mannequinGender}` }, mannequinLabelText === null || mannequinLabelText === void 0 ? void 0 : mannequinLabelText.map((content) => {\n return (React.createElement(React.Fragment, null,\n React.createElement(\"dt\", { className: \"font__title\" }, t(`sizeguide.howtomeasure.${content.title}`)),\n React.createElement(\"dd\", { className: \"primary-xs\" }, t(`sizeguide.howtomeasure.${content.desc}`))));\n }))),\n React.createElement(\"div\", { className: mannequinClass }, mannequinGender !== 'kid' &&\n (mannequinLabelText === null || mannequinLabelText === void 0 ? void 0 : mannequinLabelText.map((content, i) => {\n return React.createElement(\"div\", { className: \"sizechart__annotations\", key: content.title }, `0${i + 1}`);\n })))));\n};\nexport default HowToMeasure;\n","// import analytics from '@utils/analytics';\nimport analytics from '@stone/utils/analytics';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\nconst SizeGuideButton = (props) => {\n const { t } = useTranslation();\n return (React.createElement(\"button\", { type: \"button\", className: \"button button--tertiary findmysize-cta\", onClick: () => {\n props.onSizeGuideOpen();\n (props === null || props === void 0 ? void 0 : props.pid) && analytics.findMySize(props.pid, 'click');\n }, \"aria-haspopup\": props.withAria ? 'dialog' : undefined },\n React.createElement(\"span\", { className: \"btn-label-find-size\" }, t('sizeguide.findmysizecta'))));\n};\nexport default SizeGuideButton;\n","import React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useLangChecker } from '@common/utils/i18n';\nconst useModelMeasures = () => {\n const { t } = useTranslation();\n const cmToInches = (measure) => (parseInt(measure) * 0.3937).toFixed(2);\n const measureConverter = (measure) => {\n if (!measure) {\n return null;\n }\n const isUSorCA = ['US', 'CA'].includes(window.country);\n const value = isUSorCA ? cmToInches(measure) : measure;\n return `${value}${isUSorCA ? t('sizeguide.uom.inches') : t('sizeguide.uom.cm')}`;\n };\n const fitString = (measures) => {\n // const fitLabel = `${t('sizeguide.fit')} `;\n const fit = measures.sizeAndFit ? `${measures.sizeAndFit}. ` : '';\n const model = measures.modelHeight && measures.modelSize ? t('sizeguide.model', { height: measureConverter(measures.modelHeight), size: measures.modelSize }) : '';\n return (React.createElement(React.Fragment, null,\n React.createElement(\"b\", { ref: useLangChecker },\n t('sizeguide.fit'),\n \" \"),\n fit + model));\n // return fitLabel + fit + model;\n };\n // t('sizeguide.fit', { height: modelHeight(measures.modelHeight), size: measures.modelSize, fit: measures.sizeAndFit || '' });\n return { cmToInches, measureConverter, fitString };\n};\nexport default useModelMeasures;\n","import Accordion from '@ui/accordion/Accordion';\nimport AccordionItem from '@ui/accordion/AccordionItem';\nimport ModalDialog from '@stone/components/modal/ModalDialog';\n// import analytics from '@utils/analytics';\nimport api from '@utils/api';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Tab, TabList, TabPanel, Tabs } from 'react-tabs';\nimport BodyMeasurements from './BodyMeasurements';\nimport HowToMeasure from './HowToMeasure';\nimport SizeGuideButton from './SizeGuideButton';\nimport useModelMeasures from '@stone/hooks/useModelMeasures';\nimport useMediaQueries from '@stone/hooks/useMediaQueries';\nimport cookie from 'react-cookies';\nimport customEventBus from '@common/scripts/libs/eventBus';\nimport analytics from '@stone/utils/analytics';\nconst measmerizeconfig = {\n url: 'https://client.measmerize.com/script.js',\n brandid: window.measmerizeBrandIdWeb,\n};\nconst SizeGuide = (props) => {\n const { t } = useTranslation();\n const [sizeChart, setSizeChart] = useState();\n const [measmerizeavailable, setMeasmerizeavailable] = useState(!!window.measmerizeBrandIdWeb);\n const [selectedTab, setSelectedTab] = useState(0);\n const measmerizeSuggestedSize = useRef();\n const measmerizeSelectedSize = useRef();\n const measmerizeReady = useRef(false);\n const waitingForMeasmerize = useRef();\n const { measureConverter } = useModelMeasures();\n const { isMobile } = useMediaQueries();\n const scriptWrapId = 'measmerize-script-wrap';\n useEffect(() => {\n embedMeasmerize(props.pid);\n // embedMeasmerize(props.master);\n return () => {\n removeMeasmerizeListeners();\n };\n }, [props.pid, measmerizeavailable]);\n const firstRender = useRef('');\n useEffect(() => {\n if (props.open && firstRender.current != props.pid) {\n firstRender.current = props.pid;\n api.getSizeChart(props.pid).then((data) => setSizeChart(data));\n }\n }, [props.pid, props.open]);\n useEffect(() => {\n props.open ? document.documentElement.classList.add('sizeguide-enabled') : document.documentElement.classList.remove('sizeguide-enabled');\n return () => {\n document.documentElement.classList.remove('sizeguide-enabled');\n };\n }, [props.open]);\n const createScriptWrap = () => {\n const scriptWrap = document.createElement('div');\n scriptWrap.setAttribute('id', scriptWrapId);\n document.body.appendChild(scriptWrap);\n return scriptWrap;\n };\n const addMeasmerizeListeners = (script) => {\n script.addEventListener('measmerize.widget.ready', onMeasmerizeReady);\n script.addEventListener('measmerize.widget.unavailable', onMeasmerizeUnavailable);\n script.addEventListener('measmerize.widget.recommend', onMeasmerizeRecommend);\n script.addEventListener('measmerize.widget.select', onMeasmerizeSelect);\n script.addEventListener('measmerize.modal.close', onSizeGuideClose);\n };\n const embedMeasmerize = (pid) => {\n if (pid) {\n const scriptID = 'measmerize-script';\n const previousScript = document.getElementById(scriptID);\n if (pid && measmerizeavailable) {\n if (previousScript) {\n window.measmerize.script.productCode = props.pid;\n measmerizeReady.current = true;\n addMeasmerizeListeners(previousScript);\n return;\n }\n const script = document.createElement('script');\n const scriptWrap = document.getElementById(scriptWrapId) || createScriptWrap();\n script.id = scriptID;\n script.src = 'https://client.measmerize.com/script.js';\n script.async = true;\n script.setAttribute('data-brand-code', window.measmerizeBrandIdWeb);\n script.setAttribute('data-product-code', pid);\n script.setAttribute('data-lang-code', window.language);\n script.setAttribute('data-country-code', window.country);\n addMeasmerizeListeners(script);\n scriptWrap === null || scriptWrap === void 0 ? void 0 : scriptWrap.appendChild(script);\n }\n }\n };\n const removeMeasmerizeListeners = () => {\n const script = document.getElementById('measmerize-script');\n if (script) {\n measmerizeReady.current = false;\n script.removeEventListener('measmerize.widget.ready', onMeasmerizeReady);\n script.removeEventListener('measmerize.widget.unavailable', onMeasmerizeUnavailable);\n script.removeEventListener('measmerize.widget.recommend', onMeasmerizeRecommend);\n script.removeEventListener('measmerize.widget.select', onMeasmerizeSelect);\n script.removeEventListener('measmerize.modal.close', onSizeGuideClose);\n }\n props.onSizeSuggestion && props.onSizeSuggestion('');\n };\n const onMeasmerizeReady = (ev) => {\n measmerizeReady.current = true;\n toggleMeasmerizeAnalytics();\n customEventBus.on('cookieConsent:clicked', toggleMeasmerizeAnalytics);\n window.addEventListener('OneTrust:changed', toggleMeasmerizeAnalytics);\n if (waitingForMeasmerize.current) {\n window.measmerize.modal.mount();\n waitingForMeasmerize.current = false;\n }\n return true;\n };\n const onMeasmerizeUnavailable = () => {\n setMeasmerizeavailable(false);\n };\n const onSizeGuideClose = () => {\n const size = measmerizeSelectedSize.current || measmerizeSuggestedSize.current;\n props.onSizeguideSelection && props.onSizeguideSelection(size);\n analytics.findMySize(props.pid, 'select', size);\n props.setSizeguideOpen(false);\n };\n const onMeasmerizeRecommend = (event) => {\n var _a;\n measmerizeSuggestedSize.current = (_a = event === null || event === void 0 ? void 0 : event.detail) === null || _a === void 0 ? void 0 : _a.size;\n props.onSizeSuggestion(measmerizeSuggestedSize.current);\n };\n const onMeasmerizeSelect = (event) => {\n var _a;\n measmerizeSelectedSize.current = (_a = event === null || event === void 0 ? void 0 : event.detail) === null || _a === void 0 ? void 0 : _a.size;\n };\n const toggleMeasmerizeAnalytics = () => {\n let thirdParyAccepted = false;\n if (window.cookiePolicy === 'OneTrust' && cookie.load('OptanonAlertBoxClosed')) {\n // OneTrust\n const oneTrustChoices = cookie.load('OneTrustChoices');\n thirdParyAccepted = oneTrustChoices && oneTrustChoices.meTracking;\n }\n else if (cookie.load('TC_PRIVACY_CENTER')) {\n //Legacy Cookie System\n thirdParyAccepted = cookie.load('TC_PRIVACY_CENTER').includes('2');\n }\n if (thirdParyAccepted) {\n window.measmerize.tracking.enableAnalytics();\n }\n else {\n window.measmerize.tracking.disableAnalytics();\n }\n };\n const tabsLayout = () => (React.createElement(Tabs, { className: \"tabs tabs--padding sizechart-tabs\", forceRenderTabPanel: true, onSelect: (i) => setSelectedTab(i) },\n React.createElement(TabList, { className: \"react-tabs__tab-list\" },\n measmerizeavailable && sizeChart.mannequinGender != 'kid' && React.createElement(Tab, null, t('sizeguide.findmysize')),\n React.createElement(Tab, null, (props === null || props === void 0 ? void 0 : props.hideBodyMeasurements) ? t('sizeguide.itemmeasurements') : t('sizeguide.bodymeasurements')),\n sizeChart.mannequinGender && sizeChart.mannequinGender != 'none' && React.createElement(Tab, null, t('sizeguide.howtomeasure.title'))),\n selectedTab !== 0 && modelSizesLayout(),\n React.createElement(\"div\", null,\n measmerizeavailable && sizeChart.mannequinGender != 'kid' && (React.createElement(TabPanel, null,\n React.createElement(\"div\", { id: \"measmerize-modal\" }))),\n React.createElement(TabPanel, null,\n React.createElement(BodyMeasurements, { sizeChart: sizeChart, isSelected: selectedTab === 1 })),\n sizeChart.mannequinGender && sizeChart.mannequinGender != 'none' && (React.createElement(TabPanel, null,\n React.createElement(HowToMeasure, { contactformurl: props === null || props === void 0 ? void 0 : props.contactformurl, mannequinGender: sizeChart.mannequinGender.toLocaleLowerCase() }))))));\n const modelSizeItem = (title, desc) => {\n if (!desc) {\n return React.createElement(React.Fragment, null);\n }\n return (React.createElement(\"p\", null,\n React.createElement(\"span\", { className: \"sizeguide-modelsizes-title font__title\" }, title),\n React.createElement(\"span\", { className: \"sizeguide-modelsizes-desc\" }, desc)));\n };\n const modelSizes = () => {\n var _a, _b, _c;\n return (React.createElement(\"div\", { className: \"sizeguide-modelsizes\" },\n React.createElement(\"img\", { src: (_b = (_a = props.imgs) === null || _a === void 0 ? void 0 : _a.urls) === null || _b === void 0 ? void 0 : _b.find((el) => el.includes('_R')), alt: (_c = props.imgs) === null || _c === void 0 ? void 0 : _c.alt }),\n React.createElement(\"div\", { className: \"sizeguide-modelsizes-info\" },\n React.createElement(\"h3\", { className: \"sizeguide-modelsizes-head font-light--uc\" }, t('label.modelmeasures.title')),\n React.createElement(\"div\", { className: \"sizeguide-modelsizes-table\" },\n modelSizeItem(t('label.modelmeasures.size'), props.modelMeasures.modelSize),\n modelSizeItem(t('label.modelmeasures.height'), measureConverter(props.modelMeasures.modelHeight)),\n modelSizeItem(t('label.modelmeasures.hips'), measureConverter(props.modelMeasures.modelHips)),\n modelSizeItem(t('label.modelmeasures.fit'), props.modelMeasures.sizeAndFit),\n modelSizeItem(t('label.modelmeasures.chest'), measureConverter(props.modelMeasures.modelChest)),\n modelSizeItem(t('label.modelmeasures.waist'), measureConverter(props.modelMeasures.modelWaist))))));\n };\n const modelSizesLayout = () => {\n return (props.modelMeasures &&\n props.modelMeasures.modelHeight &&\n props.modelMeasures.modelSize &&\n (isMobile ? (React.createElement(Accordion, null,\n React.createElement(AccordionItem, { title: React.createElement(\"div\", { className: \"sizeguide-modelsizes-table\" },\n modelSizeItem(t('label.modelmeasures.size'), props.modelMeasures.modelSize),\n props.modelMeasures.sizeAndFit && modelSizeItem(t('label.modelmeasures.fit'), props.modelMeasures.sizeAndFit)), isTitleMarkup: true, accordionId: \"body\", itemClass: \"sizeguide-modelsizes-accordion-item\" }, modelSizes()))) : (modelSizes())));\n };\n return (React.createElement(React.Fragment, null,\n !(props === null || props === void 0 ? void 0 : props.onlyModal) && (React.createElement(React.Fragment, null,\n window.measmerizeBrandCode && (React.createElement(\"div\", { className: \"recommended\" },\n React.createElement(\"span\", { id: \"measmerize-result-wrap\", className: \"recommended__label\" }))),\n React.createElement(SizeGuideButton, { pid: props.pid, onSizeGuideOpen: () => props.setSizeguideOpen(true), withAria: true }))),\n sizeChart && (React.createElement(ModalDialog, { isOpen: props.open, onRequestClose: () => {\n // analytics.sizeGuideOverlay(props.pid, 'close');\n onSizeGuideClose();\n }, onAfterClose: () => {\n var _a, _b;\n setSelectedTab(0);\n (_b = (_a = window.measmerize) === null || _a === void 0 ? void 0 : _a.modal) === null || _b === void 0 ? void 0 : _b.unMount();\n }, onAfterOpen: () => {\n if (measmerizeReady.current) {\n window.measmerize.modal.mount();\n }\n else {\n waitingForMeasmerize.current = true;\n }\n }, className: \"size-modal measmerizemodal\", fullHeight: true, fullWidth: true }, tabsLayout()))));\n};\nexport default SizeGuide;\n","import classNames from 'classnames';\nimport React, { useMemo, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport useBreakpoint from '@common/utils/useBreakpoint';\nimport SelectorSize from '@stone/ui/selector/SelectorSize';\nimport SizeGuide from '@stone/components/sizeguide/SizeGuide';\nimport SizeGuideButton from '@stone/components/sizeguide/SizeGuideButton';\nimport useModelMeasures from '@stone/hooks/useModelMeasures';\nimport { getSizeVariations } from '@utils/product';\nconst ProductSelectionSizesExpanded = (props) => {\n var _a, _b, _c, _d, _e, _f;\n const { t } = useTranslation();\n const { fitString } = useModelMeasures();\n const [suggestedSize, setSuggestedSize] = useState();\n const currentBreakpoint = useBreakpoint();\n const sizeVariations = useMemo(() => {\n return props.variationValues || (props.current && getSizeVariations(props.current)) || [];\n }, [props.variationValues, props.current]);\n const currentSize = useMemo(() => {\n var _a;\n return (_a = sizeVariations === null || sizeVariations === void 0 ? void 0 : sizeVariations.find((variationValue) => variationValue.id === props.currentId)) === null || _a === void 0 ? void 0 : _a.displayValue;\n }, [sizeVariations, props.currentId]);\n const showMeasures = useMemo(() => {\n var _a, _b;\n if ((_a = props === null || props === void 0 ? void 0 : props.current) === null || _a === void 0 ? void 0 : _a.modelMeasures) {\n return ['modelHeight', 'modelSize'].every((val) => { var _a; return val in ((_a = props === null || props === void 0 ? void 0 : props.current) === null || _a === void 0 ? void 0 : _a.modelMeasures); }) || !!((_b = props === null || props === void 0 ? void 0 : props.current.modelMeasures) === null || _b === void 0 ? void 0 : _b.sizeAndFit);\n }\n else {\n return false;\n }\n }, [props === null || props === void 0 ? void 0 : props.current]);\n return (React.createElement(\"div\", { id: props.wrapperId, className: classNames('selector-size-expanded', { inverted: props.inverted, 'no-sizeselector': sizeVariations.length < 2, 'is-inline': props.isInline }, props.className) },\n !props.isInline ? (React.createElement(\"div\", { className: classNames('selector__header', { 'justify-start': props.selectSizeError }) },\n React.createElement(\"span\", { className: \"selector__label\" },\n React.createElement(\"span\", { className: \"selector__label__name\" },\n t('label.size'),\n \":\"),\n currentSize && React.createElement(\"span\", { className: \"selector__label__value\" }, currentSize)),\n ((_a = props.current) === null || _a === void 0 ? void 0 : _a.showSizeChart) &&\n !(props === null || props === void 0 ? void 0 : props.hideSizeGuide) &&\n ((props === null || props === void 0 ? void 0 : props.sizeguideOpen) == undefined ? (React.createElement(SizeGuideButton, { pid: (_b = props.current) === null || _b === void 0 ? void 0 : _b.id, onSizeGuideOpen: () => props.setSizeguideOpen(true) })) : (React.createElement(SizeGuide, { contactformurl: props === null || props === void 0 ? void 0 : props.contactformurl, pid: (_c = props.current) === null || _c === void 0 ? void 0 : _c.id, imgs: (_d = props.current) === null || _d === void 0 ? void 0 : _d.imgs, onSizeguideSelection: props === null || props === void 0 ? void 0 : props.onSizeSelection, setSizeguideOpen: props === null || props === void 0 ? void 0 : props.setSizeguideOpen, onSizeSuggestion: (suggestedsize) => setSuggestedSize(suggestedsize), open: props === null || props === void 0 ? void 0 : props.sizeguideOpen, hideBodyMeasurements: (_e = props === null || props === void 0 ? void 0 : props.current) === null || _e === void 0 ? void 0 : _e.hideBodyMeasurements, modelMeasures: (_f = props === null || props === void 0 ? void 0 : props.current) === null || _f === void 0 ? void 0 : _f.modelMeasures }))))) : (React.createElement(\"span\", { className: \"selector__label\" },\n React.createElement(\"span\", { className: \"selector__label__name\" },\n t('label.size'),\n \":\"),\n currentSize && React.createElement(\"span\", { className: \"selector__label__value\" }, currentSize),\n props.inPdp && props.lastItem && React.createElement(\"span\", { className: \"selector__label__error\" },\n \"[\",\n props.lastItem,\n \"]\"),\n props.inPdp && props.isFullyOutOfStock && React.createElement(\"span\", { className: \"selector__label__error\" },\n \"[\",\n t('product.outofstock'),\n \"]\"))),\n suggestedSize && (React.createElement(\"p\", null,\n t('sizeguide.reccommendedsize'),\n \" \",\n suggestedSize)),\n React.createElement(\"fieldset\", { className: \"selector__menu--fieldset selector__menu--size\", tabIndex: -1 },\n React.createElement(\"legend\", { className: \"visually-hidden\" },\n t('label.size'),\n ' ',\n props.error && (React.createElement(React.Fragment, null,\n '.',\n React.createElement(\"span\", { className: \"visually-hidden\" }, props.error)))), sizeVariations === null || sizeVariations === void 0 ? void 0 :\n sizeVariations.map((variation, i) => (React.createElement(SelectorSize, { key: variation.id, value: variation.id, label: variation.displayValue, selected: variation.value == props.currentId, disabled: props.alwaysAvailable ? false : props.current.isComingSoon === 2 || (!variation.selectable && !props.boutiqueAvailability && !window.unshoppable), variationGroupId: props.current.id, onSelect: () => props.onChangeVariation(variation) })))),\n props.showSizeFit &&\n showMeasures &&\n //@ts-ignore disable-next-line\n (currentBreakpoint >= window.mqObj.lg || props.showSizeFitMobile) && (React.createElement(\"div\", { className: \"fitting-caption\" },\n React.createElement(\"div\", { className: \"fitting\" }, fitString(props.current.modelMeasures))))));\n};\nexport default ProductSelectionSizesExpanded;\n","import React, { Suspense, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport { motion, useReducedMotion } from 'framer-motion';\nimport { useTranslation } from 'react-i18next';\nimport classNames from 'classnames';\nimport ProductTilesListContext from '@stone/scripts/contexts/ProductTilesListContext';\nimport analytics from '@stone/utils/analytics';\nimport Button from '@stone/ui/button/Button';\nimport einsteinutils from '@utils/einsteinutils';\nimport { getColorVariations, getProductMasterId, getSizeVariations } from '@utils/product';\nimport { handleTileNavigation } from '@utils/useMousePosition';\nimport DwMarker from '@common/components/common/DwMarker';\nimport api from '@common/utils/api';\nimport useMediaQueries from '@stone/hooks/useMediaQueries';\nimport ProductLink from '@stone/components/common/ProductLink';\nimport ErrorModal from '@components/error/ErrorModal';\nimport ProductWishlistToggle from '@stone/components/product/ProductWishlistToggle';\nimport ProductSelectionColor from '@stone/components/product/ProductSelectionColor';\nimport ProductSelectionSizesExpanded from '@stone/components/product/ProductSelectionSizesExpanded';\nimport ProductAddToBag from '@stone/components/product/ProductActionAddToBag';\nimport ProductActionNotifyMe from '@stone/components/product/ProductActionNotifyMe';\nimport ProductPrice from '@stone/components/product/ProductPrice';\nimport Icon from '@stone/ui/icon/Icon';\nimport ProductTileVisual from '@stone/components/product/ProductTileVisual';\nimport ProductLabels from './ProductLabels';\nconst LoginModal = React.lazy(() => import('@stone/components/login/LoginModal'));\nconst WishlistActionNotifyMe = React.lazy(() => import('@stone/components/wishlist/WishlistActionNotifyMe'));\nconst WishlistMoveToCart = React.lazy(() => import('@stone/components/wishlist/WishlistMoveToCart'));\nconst WishlistRemoveItem = React.lazy(() => import('@stone/components/wishlist/WishlistRemoveItem'));\nconst ProductBoutiqueModal = React.lazy(() => import('@stone/components/reserve/ProductBoutiqueModal'));\nconst ProductTile = (props) => {\n const productObject = typeof props.product === 'string' ? JSON.parse(props.product) : props.product;\n /* REFERENCES */\n const tileRef = useRef(null);\n const tileForm = useRef(null);\n const isChanged = useRef(false);\n /* HOOKS */\n const { status, navigation } = handleTileNavigation(tileRef);\n const { t } = useTranslation();\n const analyticsContext = useContext(ProductTilesListContext);\n const isReducedMotion = useReducedMotion();\n const { isDesktop, isWideDesktop } = useMediaQueries();\n /* STATES */\n const [sizeVariations, setSizeVariations] = useState();\n const [currentSize, setCurrentSize] = useState();\n const [currentColor, setCurrentColor] = useState();\n const [initialColor, setInitialColor] = useState();\n const [originalUuid, setOriginalUuid] = useState(null);\n const [forceOpenSizeSelector, setForceOpenSizeSelector] = useState(false);\n const [mustselectSize, setMustselectSize] = useState(false);\n const [showAddToBagMessage, setShowAddToBagMessage] = useState(false);\n const [variantPrice, setVariantPrice] = useState();\n const [errorMessage, setErrorMessage] = useState();\n const [errorTitle, setErrorTitle] = useState();\n const [loginOpen, setLoginOpen] = useState(false);\n const [product, setProduct] = useState(productObject);\n const [tileState, setTileState] = useState((props.fullExpanded && 'EXPANDED') || 'QUIET');\n const [isOver, setIsOver] = useState(false);\n const [modalsOpen, setModalsOpen] = useState(false);\n const [showOverlay, setShowOverlay] = useState(false);\n /* MEMO */\n const buttonStyle = useMemo(() => {\n return props.inShopTheLookPanel ? 'primary' : 'tertiary';\n }, [props.inShopTheLookPanel]);\n const colourVariations = useMemo(() => {\n return getColorVariations(product).map((value) => {\n return Object.assign(Object.assign({}, value), { groupPid: product.masterId + value.id });\n });\n }, [product]);\n const isComingSoon = useMemo(() => {\n return (product === null || product === void 0 ? void 0 : product.isComingSoon) === 2;\n }, [product]);\n const isExpanded = useMemo(() => {\n return isWideDesktop || props.fullExpanded || props.inShopTheLookModule;\n }, [isWideDesktop, props.fullExpanded, props.inShopTheLookModule]);\n const showQuickShop = useMemo(() => {\n return isExpanded && !props.disableQuickShop && !window.unshoppable;\n }, [isWideDesktop, product, props.disableQuickShop, props.fullExpanded]);\n const notMember = useMemo(() => {\n return !window.loggedin && (product === null || product === void 0 ? void 0 : product.unlock);\n }, [product]);\n const useColorCarousel = useMemo(() => {\n if (isExpanded) {\n return colourVariations.length > 5;\n }\n if (isDesktop) {\n return colourVariations.length > 6;\n }\n return colourVariations.length > 3;\n }, [isDesktop, isWideDesktop, colourVariations]);\n const showWishlistButton = useMemo(() => {\n return props.wishlist || (!!isWideDesktop && tileState !== 'QUIET');\n }, [props.wishlist, isWideDesktop, tileState]);\n const hideCta = useMemo(() => {\n return props.type === 'RESERVE';\n }, [props.type]);\n const analyticsAddToBagDetail = useMemo(() => {\n if (props.inShopTheLookPanel === 'fromModule' || props.inShopTheLookModule) {\n return 'shop the look main';\n }\n else if (props.inShopTheLookPanel === 'fromInfo') {\n return 'shop the look info panel';\n }\n else {\n return 'quick shop';\n }\n }, [props.inShopTheLookPanel, props.inShopTheLookModule]);\n /* RENDER HOOKS */\n useEffect(() => {\n setProduct(productObject);\n const colorVariations = getColorVariations(productObject);\n const selectedColor = colorVariations.find((v) => v.selected) || colorVariations[0];\n setCurrentColor(selectedColor);\n if (!initialColor)\n setInitialColor(selectedColor);\n if (props.fullExpanded) {\n const sizeVariations = getSizeVariations(productObject);\n const selectedSize = sizeVariations.find((v) => v.selected);\n selectedSize ? setCurrentSize(selectedSize) : setCurrentSize(undefined);\n }\n }, [props.product]);\n useEffect(() => {\n if (!originalUuid && productObject) {\n setOriginalUuid(productObject.uuid);\n }\n }, [productObject, originalUuid]);\n useEffect(() => {\n if (!(product === null || product === void 0 ? void 0 : product.id)) {\n return;\n }\n if (product.isobject) {\n tileRef.current.insertAdjacentHTML('afterbegin', product.isobject);\n }\n einsteinutils.trackProductInCategory(product.id, props.category, props.sortingrule);\n }, [product]);\n useEffect(() => {\n !props.fullExpanded && setTileState(isWideDesktop || props.inShopTheLookModule ? 'QUIET' : 'LIVELY');\n }, [isWideDesktop, props.fullExpanded, props.inShopTheLookModule]);\n useEffect(() => {\n if (!modalsOpen && !props.fullExpanded && ((!props.inShopTheLookModule && isDesktop) || isWideDesktop)) {\n if (navigation === 'mouse') {\n if (status === 'IN') {\n setIsOver(true);\n if (tileState === 'QUIET') {\n setTileState('LIVELY');\n }\n }\n else {\n setIsOver(false);\n //on hover change reset isChanged\n isChanged.current = false;\n if (isWideDesktop && tileState != 'QUIET') {\n setTileState('QUIET');\n }\n else if (!isWideDesktop && tileState != 'LIVELY') {\n setTileState('LIVELY');\n }\n }\n }\n }\n }, [status, navigation, props.fullExpanded, modalsOpen, isDesktop]);\n useEffect(() => {\n let sizeVariations = getSizeVariations(product);\n // se è taglia unica la imposto\n if (sizeVariations.length == 1) {\n setCurrentSize(sizeVariations[0]);\n }\n else if (currentSize) {\n // check se esiste la taglia selezionata e riseleziono per aggiornare lo stock\n if (sizeVariations.find((el) => el.value == currentSize.value)) {\n const sizeUpdated = sizeVariations.find((el) => el.value == currentSize.value);\n setCurrentSize(sizeUpdated);\n }\n else {\n setCurrentSize(undefined);\n }\n }\n setSizeVariations(sizeVariations);\n }, [product]);\n useEffect(() => {\n if (tileState !== 'EXPANDED' && mustselectSize)\n setMustselectSize(false);\n }, [tileState]);\n /* METHODS */\n const sendAnalytics = (context) => {\n analytics.addToBag(product, currentSize, variantPrice, { detail: context });\n };\n const changeSize = (variation) => {\n var _a, _b;\n if (props.wishlist) {\n let _wishlistProduct = props.product;\n let itsok = props.updateWishlist('update', {\n oldProductId: _wishlistProduct.pid,\n newProductId: _wishlistProduct.id + variation.id,\n recipeId: _wishlistProduct.mbm ? (_a = _wishlistProduct.mbm) === null || _a === void 0 ? void 0 : _a.recipeId : '',\n });\n if (!itsok) {\n setErrorMessage(t('wishlist.itemalreadypresent'));\n return;\n }\n }\n setCurrentSize(variation);\n setMustselectSize(false);\n let hookresult = !props.onChangeSize || props.onChangeSize(variation);\n //block the api if hook result is FALSE\n if (hookresult !== false) {\n // qui non va cambiato il prodotto, va solo salvata la taglia selezionata che serve per l'add to cart\n if (((_b = product === null || product === void 0 ? void 0 : product.price) === null || _b === void 0 ? void 0 : _b.type) === 'range') {\n // prezzo diverso per taglia\n api.variantPrice(`${product.masterId}${currentColor.id}${variation.id}`).then((data) => setVariantPrice(data));\n }\n }\n };\n const onSuccessAddToBag = () => {\n props.onSuccessAddToBag && props.onSuccessAddToBag();\n setShowAddToBagMessage(true);\n };\n const changeColor = (colorVariation) => {\n var _a;\n if (!colorVariation || product.id.endsWith(colorVariation.id)) {\n return;\n }\n setCurrentColor(colorVariation);\n let baseId = getProductMasterId(product);\n let newId = baseId + colorVariation.id;\n let hookresult = !props.onChangeColor || props.onChangeColor(colorVariation);\n if (props.wishlist) {\n let _wishlistProduct = props.product;\n let result = props.updateWishlist('update', {\n oldProductId: _wishlistProduct.pid,\n newProductId: newId,\n recipeId: _wishlistProduct.mbm ? (_a = _wishlistProduct.mbm) === null || _a === void 0 ? void 0 : _a.recipeId : '',\n });\n if (!result) {\n setErrorMessage(t('wishlist.itemalreadypresent'));\n setCurrentColor(currentColor);\n }\n else {\n isChanged.current = isOver;\n }\n }\n else if (hookresult === false) {\n //block the api if hook result is FALSE\n }\n else {\n api.getProductTile(newId, initialColor === null || initialColor === void 0 ? void 0 : initialColor.id).then((data) => {\n isChanged.current = isOver;\n if (analyticsContext === null || analyticsContext === void 0 ? void 0 : analyticsContext.analyticsData)\n analytics.productImpressionsChange(Object.assign(Object.assign({}, analyticsContext.analyticsData), { product: data, index: props.index }));\n setProduct(data);\n });\n }\n };\n const fakeClick = () => {\n var _a;\n const link = (_a = tileRef === null || tileRef === void 0 ? void 0 : tileRef.current) === null || _a === void 0 ? void 0 : _a.querySelector('.product-tile__link');\n if (link) {\n link.click();\n }\n };\n /* CALLBACKS */\n const quickBuyError = useCallback(() => {\n if (showAddToBagMessage) {\n return (React.createElement(\"span\", { className: \"visually-hidden\", role: \"alert\" }, t('bag.justadded')));\n }\n if (mustselectSize) {\n return (React.createElement(\"span\", { className: \"alert\", role: \"alert\" },\n React.createElement(Icon, { name: \"alert\", family: '10', ariaHidden: true }),\n React.createElement(\"span\", { \"aria-hidden\": true }, t('label.selectasize'))));\n }\n }, [showAddToBagMessage, mustselectSize]);\n const tilePrice = useCallback(() => {\n return (!props.hideprice && (React.createElement(\"span\", { className: \"product-tile__price\" },\n React.createElement(ProductPrice, { price: variantPrice || (product === null || product === void 0 ? void 0 : product.price), promotions: product.promotions, inline: true, isPlp: props.type === 'PLP' }))));\n }, [props.hideprice, variantPrice, product]);\n const productSEOName = useCallback(() => {\n return (product === null || product === void 0 ? void 0 : product.seoName) && React.createElement(\"p\", { className: \"product-tile__seoname\" }, product.seoName);\n }, [product]);\n const quickBuyButton = useCallback(() => {\n // se la taglia non è selezionata\n if (!currentSize) {\n let ctaData = buttonData();\n return (React.createElement(Button, { type: \"button\", cls: [`button--${buttonStyle}`], \"aria-busy\": mustselectSize, onClick: () => {\n //indico all'utente di selezionare la taglia\n analytics.productActionIntent(ctaData.name, currentColor.productId);\n setMustselectSize(true);\n setForceOpenSizeSelector(true);\n navigation === 'keyboard' &&\n setTimeout(() => {\n var _a;\n const button = (_a = tileRef.current) === null || _a === void 0 ? void 0 : _a.querySelector('.selector__menu--fieldset');\n button === null || button === void 0 ? void 0 : button.focus();\n }, 200);\n }, customTabIndex: props.disableFocus ? -1 : undefined }, ctaData.text));\n }\n // se isBoutiqueExclusive o notShoppable apro il find in boutique\n if ((product === null || product === void 0 ? void 0 : product.isBoutiqueExclusive) || (product === null || product === void 0 ? void 0 : product.notShoppable)) {\n return (React.createElement(Button, { type: \"button\", cls: [`button--${buttonStyle}`], onClick: () => {\n setModalsOpen(true);\n setShowOverlay(true);\n analytics.productActionIntent('reserve in store', currentColor.productId);\n } }, t('label.findinboutique')));\n }\n // se la taglia è disponibile e non è coming soon\n if ((currentSize === null || currentSize === void 0 ? void 0 : currentSize.selectable) && !isComingSoon && !product.isPreview) {\n if (props.wishlist && !props.inPublicWishlist) {\n const _wishlistProduct = props.product;\n return (React.createElement(WishlistMoveToCart, { product: _wishlistProduct, type: 'products', size: currentSize, callback: () => props.updateWishlist('remove', { listitemid: _wishlistProduct.listitemid, masterId: _wishlistProduct.masterId, moveToBag: true }), pushAnalytics: () => sendAnalytics('wishlist'), updateErrorMessage: (msg) => setErrorMessage(msg), triggerOpenSize: () => {\n setMustselectSize(true);\n setForceOpenSizeSelector(true);\n } }));\n }\n return (React.createElement(ProductAddToBag, { product: product, size: currentSize, callback: onSuccessAddToBag, pushAnalytics: () => sendAnalytics(analyticsAddToBagDetail), updateErrorMessage: (msg) => setErrorMessage(msg), updateErrorTitle: (msg) => setErrorTitle(msg), hierarchy: buttonStyle }));\n }\n if (props.wishlist) {\n const _Product = props.product;\n return (React.createElement(WishlistActionNotifyMe, { product: _Product, color: currentColor, size: currentSize, from: props.pageType || 'wishlist', triggerOpenSize: () => {\n setMustselectSize(true);\n setForceOpenSizeSelector(true);\n } }));\n }\n return (React.createElement(ProductActionNotifyMe, { product: product, color: currentColor, size: currentSize, onOpenModal: () => setModalsOpen(true), onCloseModal: () => setModalsOpen(false), from: props.pageType || 'plp', customClasses: [`button--${buttonStyle}`], triggerOpenSize: () => {\n setMustselectSize(true);\n setForceOpenSizeSelector(true);\n }, excludeForA11N: props.disableFocus }));\n }, [product, currentSize, currentColor, mustselectSize, navigation]);\n const buttonData = useCallback((fallback, name) => {\n var _a, _b;\n if (notMember) {\n return { text: t('button.signintopurchase'), name: 'log in to purchase' };\n }\n else if ((_a = product === null || product === void 0 ? void 0 : product.availability) === null || _a === void 0 ? void 0 : _a.preorder) {\n return { text: t('button.preordernow'), name: 'preorder' };\n }\n else if (!isComingSoon && (product === null || product === void 0 ? void 0 : product.isBoutiqueExclusive)) {\n return { text: t('label.findinboutique'), name: 'reserve in store' };\n }\n else if (((_b = product === null || product === void 0 ? void 0 : product.availability) === null || _b === void 0 ? void 0 : _b.isOutOfStock) || (product === null || product === void 0 ? void 0 : product.isPreview)) {\n return { text: t('label.notifyme'), name: 'notify me' };\n }\n else if (!(product === null || product === void 0 ? void 0 : product.notShoppable) && !(product === null || product === void 0 ? void 0 : product.isBoutiqueExclusive)) {\n return { text: fallback || t('button.addtobag'), name: name || 'quick add' };\n }\n return null;\n }, [product, isComingSoon]);\n const staticQuickButton = useCallback(() => {\n const ctaData = buttonData();\n if (!ctaData)\n return React.createElement(React.Fragment, null);\n if (notMember) {\n return (ctaData && (React.createElement(Button, { type: \"button\", cls: ['button--tertiary'], className: \"product-tile__quite-button\", ariaHaspopup: \"dialog\", onClick: () => {\n analytics.productActionIntent(ctaData.name, currentColor.productId);\n setLoginOpen(true);\n }, customTabIndex: props.disableFocus ? -1 : undefined }, ctaData === null || ctaData === void 0 ? void 0 : ctaData.text)));\n }\n return (ctaData && (React.createElement(Button, { type: \"button\", cls: ['button--tertiary'], className: \"product-tile__quite-button\", ariaExpanded: false, onClick: () => {\n const analyticsAction = props.inShopTheLookModule ? ' - shop the look main' : null;\n if (props.inShopTheLookModule && props.onShopTheLookClick) {\n props.onShopTheLookClick();\n }\n else {\n analytics.productActionIntent(ctaData.name, currentColor.productId, 'click', analyticsAction);\n setTileState('EXPANDED');\n }\n navigation === 'keyboard' &&\n setTimeout(() => {\n var _a;\n (_a = tileForm.current) === null || _a === void 0 ? void 0 : _a.focus();\n }, 200);\n }, customTabIndex: props.disableFocus ? -1 : undefined }, ctaData === null || ctaData === void 0 ? void 0 : ctaData.text)));\n }, [navigation, currentColor, notMember, product]);\n /* RENDER FUNCTION */\n const renderShopTheLookPanelInfo = () => {\n return (React.createElement(\"div\", null,\n React.createElement(ProductLink, { className: \"shopthelookpanel-link\", product: product, analyticsData: analyticsContext === null || analyticsContext === void 0 ? void 0 : analyticsContext.analyticsData }, t('shopthelook.viewproductdetails')),\n tilePrice()));\n };\n const renderProductInfo = () => {\n var _a;\n return (React.createElement(\"div\", { className: classNames('product-tile__info', 'single-slide__labels') },\n React.createElement(\"div\", { className: \"product-tile__info_content\" },\n React.createElement(\"div\", { className: \"product-tile__info_base\" },\n renderProductName(),\n productSEOName()),\n props.inShopTheLookPanel && renderShopTheLookPanelInfo(),\n !window.unshoppable && (React.createElement(React.Fragment, null,\n React.createElement(\"div\", { className: classNames('product-tile_quick-buy-wrp', { 'is-show': tileState != 'QUIET' }) }, tileState != 'QUIET' && (React.createElement(\"section\", { ref: tileForm, tabIndex: -1, \"aria-label\": (isExpanded && t('product.selectsizeandcolor')) || null },\n React.createElement(\"div\", { className: \"product-tile__quick-buy-panel\" },\n React.createElement(ProductSelectionColor, { variationValues: colourVariations, currentId: !props.inShopTheLookModule && !props.inShopTheLookPanel ? currentColor === null || currentColor === void 0 ? void 0 : currentColor.productId : currentColor === null || currentColor === void 0 ? void 0 : currentColor.id, onChangeVariation: (colorVariation) => {\n changeColor(colorVariation);\n }, className: classNames('intile', { 'small-swtches': !props.fullExpanded && !isWideDesktop, inwishlist: !!props.wishlist }), open: isExpanded, hideValue: false, hideLabel: false, groupid: `${Math.random().toString(16).slice(2)}_${props.index}`, showHideLabel: !isExpanded, carousel: useColorCarousel, disableFocus: props.disableFocus, fullExpanded: props.fullExpanded, carouselNavigation: (props.type !== 'HEROCAROUSEL' && isWideDesktop && !props.fullExpanded && 'bottom') || null }),\n props.inShopTheLookPanel && React.createElement(\"div\", null, quickBuyError()),\n tileState === 'EXPANDED' && isExpanded && (React.createElement(motion.div, { initial: { y: props.fullExpanded || isReducedMotion ? 0 : 10, opacity: props.fullExpanded || isReducedMotion ? 1 : 0 }, transition: { duration: 0.1 }, animate: { y: 0, opacity: 1 } },\n React.createElement(ProductSelectionSizesExpanded, { disableFocus: props.disableFocus, variationValues: sizeVariations, current: product, productId: props.product.listitemid, currentId: currentSize === null || currentSize === void 0 ? void 0 : currentSize.id, onChangeVariation: (sizeVariatzion) => {\n changeSize(sizeVariatzion);\n }, open: forceOpenSizeSelector, className: \"intile\", selectSizeError: mustselectSize, error: (mustselectSize && t('product.selectsize')) || (((_a = product === null || product === void 0 ? void 0 : product.availability) === null || _a === void 0 ? void 0 : _a.isOutOfStock) && t('label.outofstock')) })))),\n !props.inShopTheLookPanel && tilePrice(),\n tileState === 'EXPANDED' &&\n renderOnlyShoppable(React.createElement(\"div\", { className: \"product-tile__quick-buy\" },\n React.createElement(\"div\", null, !props.inShopTheLookPanel ? quickBuyError() : tilePrice()),\n React.createElement(\"div\", null, quickBuyButton())))))),\n tileState == 'QUIET' && tilePrice(),\n showQuickShop && tileState != 'EXPANDED' && React.createElement(\"div\", { className: \"product-tile__quite\" }, staticQuickButton()))))));\n };\n const renderProductName = () => {\n const Heading = (props.headingLevel ? props.headingLevel : 'h3');\n return (React.createElement(Heading, { className: 'product-tile__name' },\n React.createElement(ProductLink, { id: `${product.uuid}_link`, isShelf: props.isShelf, noClickTracking: props.noClickTracking, index: props.index, product: product, pageType: props.pageType, className: \"product-tile__link\", recommender: props === null || props === void 0 ? void 0 : props.recommender, actionList: props.actionList, analyticsData: analyticsContext === null || analyticsContext === void 0 ? void 0 : analyticsContext.analyticsData, tabIndex: props.disableFocus ? -1 : undefined, ignoreRouting: props.pageType != 'PLP' },\n React.createElement(\"span\", { dangerouslySetInnerHTML: { __html: product.productName } }))));\n };\n const renderProductVisual = () => {\n return props.inShopTheLookPanel ? (React.createElement(\"div\", { className: \"shopthelookpanel-images\" },\n React.createElement(ProductTileVisual, { product: product, tileType: props.type, visual2: '' }),\n React.createElement(ProductTileVisual, { product: product, tileType: props.type, visual1: product.lookDetailAsset || 'R', visual2: '' }))) : props.inShopTheLookModule ? (React.createElement(\"div\", { className: \"shopthelookmodule-images\" },\n React.createElement(\"button\", { className: \"product-tile__link--button\", onClick: () => fakeClick(), \"aria-hidden\": true, tabIndex: -1 },\n React.createElement(ProductTileVisual, { product: product, tileType: props.type, visual1: product.lookDetailAsset || 'F', visual2: '' })))) : (React.createElement(\"button\", { className: \"product-tile__link--button\", onClick: () => fakeClick(), \"aria-hidden\": true, tabIndex: -1 },\n React.createElement(ProductTileVisual, { product: product, tileType: props.type, isOver: isOver, customImage: props === null || props === void 0 ? void 0 : props.customImage, isChanged: isChanged === null || isChanged === void 0 ? void 0 : isChanged.current })));\n };\n const renderOnlyShoppable = (components) => {\n return (!window.unshoppable && !hideCta && components) || React.createElement(React.Fragment, null);\n };\n return (React.createElement(\"div\", { \"data-id\": `${currentColor ? currentColor.productId : ''}${currentSize ? currentSize.id : ''}`, \"data-product\": product === null || product === void 0 ? void 0 : product.id, className: classNames(`product-tile single-slide__img product-tile--${tileState}`, {\n 'product-tile__wishlist': props.wishlist,\n quickshopactive: tileState === 'EXPANDED',\n fullExpanded: props.fullExpanded,\n }), ref: tileRef, tabIndex: -1 },\n product ? (React.createElement(React.Fragment, null,\n React.createElement(DwMarker, { type: \"product\", uuid: product.uuid }),\n React.createElement(\"div\", { className: \"product-tile__card\" },\n React.createElement(\"div\", { className: \"product-tile__image-wrapper\" },\n renderProductVisual(),\n !props.hidelabels && React.createElement(ProductLabels, { limit: 1, product: product, type: \"tile\" }))),\n renderProductInfo(),\n showWishlistButton &&\n renderOnlyShoppable(React.createElement(\"div\", { className: \"product-tile__wishlist-actions\" },\n props.wishlist && props.wishlistShareEnabled && (React.createElement(\"button\", { \"aria-label\": t('wishlist.shareitem'), onClick: () => {\n props.updateWishlist &&\n props.updateWishlist('share', {\n product: product,\n });\n }, tabIndex: props.disableFocus ? -1 : undefined },\n React.createElement(Icon, { family: \"16\", name: \"wishlist-share\" }))),\n (props.wishlist && (React.createElement(WishlistRemoveItem, { color: \"black\", disableFocus: props.disableFocus, onClick: () => {\n let _wishlistProduct = props.product;\n props.updateWishlist('remove', { listitemid: _wishlistProduct.listitemid, masterId: _wishlistProduct.masterId });\n } }))) || (React.createElement(ProductWishlistToggle, { color: \"black\", productSize: currentSize, productColor: currentColor, product: product, section: props.type, disableFocus: props.disableFocus, setErrorMessage: setErrorMessage })))))) : (React.createElement(React.Fragment, null,\n React.createElement(\"div\", { className: \"product-tile__card\" },\n React.createElement(\"div\", { className: \"product-tile__link\" },\n React.createElement(\"div\", { className: \"product-tile__image-wrapper\" },\n React.createElement(\"div\", { className: \"product-image\" })))),\n !props.hidelabels && (React.createElement(\"div\", { className: \"product-tile__info single-slide__labels\" },\n React.createElement(\"p\", { className: \"product-tile__name\" }, t('label.loading')),\n !props.hideprice && React.createElement(\"span\", { className: \"product-tile__price\" }, t('label.loading')))))),\n React.createElement(ErrorModal, { label: errorTitle, message: errorMessage, onClose: () => setErrorMessage(undefined) }),\n React.createElement(Suspense, { fallback: React.createElement(React.Fragment, null) },\n notMember && React.createElement(LoginModal, { incontext: \"membersonly\", modalStatus: loginOpen, updateStatus: (status) => setLoginOpen(status) }),\n ((product === null || product === void 0 ? void 0 : product.isBoutiqueExclusive) || (product === null || product === void 0 ? void 0 : product.notShoppable)) && (React.createElement(ProductBoutiqueModal, { isOpen: showOverlay, title: t('label.findinboutique'), mode: \"find\", product: product, size: currentSize, color: currentColor, colourVariations: colourVariations, sizeVariations: sizeVariations, onRequestClose: () => {\n setShowOverlay(false);\n } })))));\n};\nexport default ProductTile;\n","import React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport ProductImage from '@stone/components/product/ProductImage';\nimport ProductPrice from '@stone/components/product/ProductPrice';\nconst ProductTileReview = (props) => {\n const { t } = useTranslation();\n const { product, color, size } = props;\n return (product && (React.createElement(\"div\", { className: \" product-tile product-tile-review product-tile-review--static\" },\n React.createElement(\"div\", { className: `product-tile-review__content image--${props.imageSize}` },\n React.createElement(ProductImage, { img: product === null || product === void 0 ? void 0 : product.imgs, type: \"F\" }),\n React.createElement(\"div\", { className: \"product-tile-review__info\" },\n React.createElement(\"div\", { className: \"product-tile-review__info-pricetitle\" },\n React.createElement(\"div\", null,\n React.createElement(\"h3\", { className: \"product-tile-review__info-title\" }, product.productName),\n product.seoName && React.createElement(\"p\", { className: \"product-tile__seoname\" }, product.seoName)),\n !props.hiddenPrice && (React.createElement(\"div\", { className: \"product-tile-review__price\" },\n React.createElement(ProductPrice, { price: product.price, promotions: product.promotions })))),\n React.createElement(\"div\", { className: \"product-tile-review__info-specs\" },\n React.createElement(\"p\", null,\n React.createElement(\"span\", { className: \"product-tile-review__info-label\" }, t('product.colorlabel')),\n React.createElement(\"span\", { className: \"product-tile-review__info-value color\" }, color === null || color === void 0 ? void 0 : color.displayValue)),\n size && (React.createElement(\"p\", null,\n React.createElement(\"span\", { className: \"product-tile-review__info-label\" },\n t('label.size'),\n \":\"),\n React.createElement(\"span\", { className: \"product-tile-review__info-value color\" }, size === null || size === void 0 ? void 0 : size.displayValue)))))))));\n};\nProductTileReview.defaultProps = {\n imageSize: 'large',\n};\nexport default ProductTileReview;\n","import React, { useEffect, useMemo, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\n// import analytics from '@utils/analytics';\nimport api from '@utils/api';\nimport ErrorModal from '@components/error/ErrorModal';\nimport customEventBus from '@common/scripts/libs/eventBus';\nimport Icon from '@stone/ui/icon/Icon';\nimport analytics from '@stone/utils/analytics';\nconst ProductWishlistToggle = (props) => {\n const { t } = useTranslation();\n //--- STATES\n const [errorMessage, setErrorMessage] = useState();\n const [status, setStatus] = useState(null);\n const [isLoading, setIsLoading] = useState(true);\n //--- MEMO\n const currentId = useMemo(() => {\n var _a, _b;\n return (((_a = props.productColor) === null || _a === void 0 ? void 0 : _a.productId) || '') + (((_b = props.productSize) === null || _b === void 0 ? void 0 : _b.id) || '');\n }, [props.productColor, props.productSize]);\n //--- EFFECTS\n useEffect(() => {\n const updateFunction = (data) => {\n setStatus(!!data.wishlistIds.find((pid) => pid.includes(currentId)));\n };\n customEventBus.on('wishlist:update', updateFunction);\n return () => {\n customEventBus.off('wishlist:update', updateFunction);\n };\n }, [currentId]);\n useEffect(() => {\n const updatedStatus = !!window.wishlistIds.find((pid) => pid.includes(currentId));\n if (updatedStatus !== status) {\n setStatus(updatedStatus);\n setIsLoading(false);\n }\n }, [currentId]);\n //--- METHODS\n const toggleWishlist = () => {\n setIsLoading(true);\n if (status) {\n api\n .removeFromWishlist(currentId)\n .then((data) => {\n if (data.success) {\n if (data.items) {\n setStatus(!!data.items.find((pid) => pid.includes(currentId)));\n customEventBus.emit('account:update', { wishlistIds: data.items });\n customEventBus.emit('wishlist:update', { wishlistIds: data.items });\n // console.info('[wishlist:update] emit from product: ', currentId, ', count: ', data.items.length);\n }\n }\n else {\n setErrorMessage(data.errorMsg);\n props.setErrorMessage(data.errorMsg);\n }\n setIsLoading(false);\n })\n .catch((res) => setErrorMessage(res));\n }\n else {\n api\n .addToWishlist(currentId)\n .then((data) => {\n if (data.success) {\n if (data.items) {\n setStatus(!!data.items.find((pid) => pid.includes(currentId)));\n customEventBus.emit('account:update', { wishlistIds: data.items });\n customEventBus.emit('wishlist:update', { wishlistIds: data.items });\n // console.info('[wishlist:update] emit from product: ', currentId, ', count: ', data.items.length);\n // analytics.saveForLaterAddToWishlist(props.product as any as models.Product, props?.productSize?.id);\n // analytics.wishlistInteraction(props.product?.masterId, props.section);\n analytics.addToWishlist(props.product.id);\n }\n }\n else {\n setErrorMessage(data.errorMsg);\n props.setErrorMessage(data.errorMsg);\n }\n setIsLoading(false);\n })\n .catch((res) => setErrorMessage(res));\n }\n };\n return (React.createElement(React.Fragment, null,\n React.createElement(\"button\", { \"aria-label\": t('button.saveforlater'), className: 'button wishlist-icon' + (props.modifierClass || ''), \"aria-pressed\": status, onClick: toggleWishlist, \"aria-busy\": isLoading, \"data-color\": props.color, tabIndex: props.disableFocus ? -1 : undefined },\n React.createElement(Icon, { family: \"16\", name: !status ? 'save' : 'save-selected', ariaHidden: true })),\n React.createElement(ErrorModal, { message: errorMessage, onClose: () => setErrorMessage(undefined) })));\n};\nexport default ProductWishlistToggle;\n"],"names":["timeoutId","Accordion","props","expandedCard","setExpandedCard","useState","height","setHeight","groupRef","setOpen","i","isOpen","useEffect","results","length","scrollToElement","container","opener","clearTimeout","setTimeout","elem","bounding","getBoundingClientRect","top","left","bottom","window","innerHeight","document","documentElement","clientHeight","right","innerWidth","clientWidth","isInViewport","scrollPosition","scrollY","containerScrollPosition","header","querySelector","endPosition","style","scrollTo","behavior","gap","direction","int","setInterval","clearInterval","scrollToPx","offsetHeight","defaultOpen","children","c","isInitialOpen","key","console","warn","log","current","childrenLength","useMemo","counter","createElement","type","className","flex","ref","child","cloneElement","Object","assign","onSelect","onChildSelect","expanded","loading","initiallyClosed","parentHeight","defaultProps","AccordionItem","t","accordionPanel","useRef","accordionId","updateHeight","autoHeight","firstElementChild","scrollHeight","miniAccordion","itemClass","id","onClick","callbackOnOpen","accordion__panel_open","elementActive","headerClass","tabIndex","isTitleMarkup","title","hideToggleButtons","contentClass","role","Button","reference","e","undefined","usesDefault","preventDefault","call","onKeyDown","disabled","cls","isLoading","ariaLabel","ariaCurrent","ariaExpanded","ariaHaspopup","ariaControls","ariaBusy","ariaDescribedby","variation","refinementColor","backgroundColor","swatchColor","backgroundImage","swatchImg","ariaHidden","LoginModal","_a","_b","_c","_d","_e","showAddToBagMessage","setShowAddToBagMessage","loginOpen","setLoginOpen","quickShopTimeout","addToBag","onAddStart","size","triggerOpenSize","productId","product","productType","then","data","error","updateErrorMessage","message","updateErrorTitle","label","quantityTotal","firstRefine","removeProperty","fromMinicart","wrapper","focus","fromAddToBag","pid","pushAnalytics","callback","btnModifiers","noModifiers","btnClass","hierarchy","inverted","loggedin","unlock","productStatus","customTabIndex","excludeForA11N","Suspense","fallback","incontext","modalStatus","updateStatus","status","isLookCarousel","startsWith","variationAttributes","find","va","values","selected","preorderable","showOverlay","setShowOverlay","customClasses","color","onOpenModal","onRequestClose","triggerCloseOnly","onCloseModal","from","fromReserve","GenericLabel","trim","labels","setLabels","_labels","isBoutiqueExclusive","isBoutiqueExclusivePDP","isPreview","isComingSoon","isLimitedEdition","isOnlineExclusive","isNew","filter","string","limit","splice","map","focusOnError","formdef","onSubmit","initialValues","validate","buttonText","useTranslation","decorators","render","handleSubmit","submitting","DwFormField","def","name","placeholder","groupClassName","setFormdef","setInitialValues","requestSent","setRequestSent","fullproductid","setFullproductid","errors","setErrors","masterId","firstRender","val","api","prefillValues","user","productid","location","href","async","formutils","err","keys","analytics","review","useCallback","ModalDialog","fullHeight","fullWidth","hasDivisor","onAfterOpen","onAfterClose","contentLabel","subjsx","ProductTileReview","content","ErrorBox","SelectorItem","refItem","isInverted","onMouseEnter","onHoverChange","onMouseLeave","onChange","item","isNotAvailableSelectable","groupid","value","checked","disableFocus","enableOutofstockLabel","Selector","selectorRef","menuRef","open","focusList","setFocusList","useLayoutEffect","trackOpen","menuHeight","visibility","removeAttribute","currentItem","disableHover","selectorId","unselectedLabel","hideLabel","hideValue","selectLabel","selectedLabel","itemType","displayValue","listRole","focused","onFocus","onBlur","swatchable","swiperRef","slideMove","swiper","prev","getElementById","next","isBeginning","setAttribute","classList","add","remove","isEnd","swiperConf","a11y","slideRole","slideLabelMessage","slidesPerView","fullExpanded","spaceBetween","autoplay","slideToClickedSlide","breakpoints","mqObj","lg","xxl","onSlideChange","onInit","prevHandler","slidePrev","nextHandler","slideNext","addEventListener","removeEventListener","onSwiper","k","ProductSelectionColor","colorList","variationValues","tempVariant","setTempVariant","setIsOpen","navigationPosition","showHideLabel","carouselNavigation","carousel","selectedVariant","variationValue","currentId","CustomSelector","SelectorSwiper","scrollActions","Icon","family","opacity","unshoppable","_index","alwaysAvailable","selectable","isOutOfStock","refitem","onChangeVariation","isIn","ColorSwatch","numberOfColors","variationGroupId","METRIC","IMPERIAL","_f","_g","sizeChart","currentMetrics","setCurrentMetrics","country","selectedCountry","setSelectedCountry","sizechartdata","countries","el","table","setTable","sizeChartRef","maxColumnHeight","Array","querySelectorAll","reduce","previous","setProperty","isSelected","localtable","forEach","chart","chartTitle","decodedMap","decodeURI","split","defaultSizeConversion","checkDefaultSizeConversion","s","regionNames","Intl","DisplayNames","language","metricLabel","mannequinGender","imperialLabel","sizes","defaultChecked","description","toLowerCase","hideCountrySelector","htmlFor","target","of","labelsOnImage","h","row","rowI","itemI","mannequinClass","mannequinLabelText","desc","onSizeGuideOpen","withAria","cmToInches","measure","parseInt","toFixed","measureConverter","isUSorCA","includes","fitString","measures","fit","sizeAndFit","model","modelHeight","modelSize","measmerizeBrandIdWeb","setSizeChart","measmerizeavailable","setMeasmerizeavailable","selectedTab","setSelectedTab","measmerizeSuggestedSize","measmerizeSelectedSize","measmerizeReady","waitingForMeasmerize","isMobile","useMediaQueries","scriptWrapId","embedMeasmerize","removeMeasmerizeListeners","addMeasmerizeListeners","script","onMeasmerizeReady","onMeasmerizeUnavailable","onMeasmerizeRecommend","onMeasmerizeSelect","onSizeGuideClose","scriptID","previousScript","measmerize","productCode","scriptWrap","body","appendChild","createScriptWrap","src","onSizeSuggestion","ev","toggleMeasmerizeAnalytics","modal","mount","onSizeguideSelection","setSizeguideOpen","event","detail","thirdParyAccepted","cookiePolicy","cookie","oneTrustChoices","meTracking","tracking","enableAnalytics","disableAnalytics","modelSizeItem","modelSizes","imgs","urls","alt","modelMeasures","modelHips","modelChest","modelWaist","modelSizesLayout","onlyModal","measmerizeBrandCode","unMount","forceRenderTabPanel","hideBodyMeasurements","contactformurl","toLocaleLowerCase","suggestedSize","setSuggestedSize","currentBreakpoint","useBreakpoint","sizeVariations","currentSize","showMeasures","every","wrapperId","isInline","inPdp","lastItem","isFullyOutOfStock","selectSizeError","showSizeChart","hideSizeGuide","sizeguideOpen","onSizeSelection","suggestedsize","boutiqueAvailability","showSizeFit","showSizeFitMobile","WishlistActionNotifyMe","WishlistMoveToCart","WishlistRemoveItem","ProductBoutiqueModal","productObject","JSON","parse","tileRef","tileForm","isChanged","navigation","analyticsContext","useContext","isReducedMotion","isDesktop","isWideDesktop","setSizeVariations","setCurrentSize","currentColor","setCurrentColor","initialColor","setInitialColor","originalUuid","setOriginalUuid","forceOpenSizeSelector","setForceOpenSizeSelector","mustselectSize","setMustselectSize","variantPrice","setVariantPrice","errorMessage","setErrorMessage","errorTitle","setErrorTitle","setProduct","tileState","setTileState","isOver","setIsOver","modalsOpen","setModalsOpen","buttonStyle","inShopTheLookPanel","colourVariations","groupPid","isExpanded","inShopTheLookModule","showQuickShop","disableQuickShop","notMember","useColorCarousel","showWishlistButton","wishlist","hideCta","analyticsAddToBagDetail","colorVariations","selectedColor","v","selectedSize","uuid","isobject","insertAdjacentHTML","category","sortingrule","sizeUpdated","sendAnalytics","context","onSuccessAddToBag","fakeClick","link","click","quickBuyError","tilePrice","hideprice","price","promotions","inline","isPlp","productSEOName","seoName","quickBuyButton","ctaData","buttonData","button","text","notShoppable","inPublicWishlist","_wishlistProduct","updateWishlist","listitemid","moveToBag","msg","_Product","pageType","availability","preorder","staticQuickButton","analyticsAction","onShopTheLookClick","renderProductName","Heading","headingLevel","isShelf","noClickTracking","index","recommender","actionList","analyticsData","ignoreRouting","dangerouslySetInnerHTML","__html","productName","renderOnlyShoppable","components","quickshopactive","tileType","visual2","visual1","lookDetailAsset","customImage","hidelabels","colorVariation","endsWith","newId","hookresult","onChangeColor","oldProductId","newProductId","recipeId","mbm","changeColor","inwishlist","Math","random","toString","slice","initial","y","transition","duration","animate","sizeVariatzion","onChangeSize","changeSize","wishlistShareEnabled","productSize","productColor","section","onClose","mode","imageSize","img","hiddenPrice","setStatus","setIsLoading","updateFunction","wishlistIds","updatedStatus","modifierClass","success","items","errorMsg","catch","res"],"sourceRoot":""}