{"version":3,"file":"product.widgets.bundle.js","mappings":";;;;;;;;;;;;;;AAA+C;;AAE/C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6BAAe,oCAAUC,eAAe,EAAE;EACtC;AACJ;AACA;AACA;EACI,MAAMC,WAAW,SAASD,eAAe,CAAC;IACtC;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACQE,WAAWA,CAACC,IAAI,EAAE;MACd,IAAIA,IAAI,CAACC,OAAO,IAAID,IAAI,CAACE,WAAW,EAAE;QAClCC,MAAM,CAACC,QAAQ,CAACC,MAAM,CAACL,IAAI,CAACE,WAAW,CAAC;MAC5C,CAAC,MAAM,IAAIF,IAAI,CAACM,KAAK,EAAE;QACnB,IAAIN,IAAI,CAACE,WAAW,EAAE;UAClBC,MAAM,CAACC,QAAQ,CAACC,MAAM,CAACL,IAAI,CAACE,WAAW,CAAC;QAC5C,CAAC,MAAM;UACH,IAAI,CAACK,QAAQ,CAACC,KAAK,CAACC,OAAO,CAACT,IAAI,CAACM,KAAK,CAAC,GAAGN,IAAI,CAACM,KAAK,CAACI,IAAI,CAAC,OAAO,CAAC,GAAGV,IAAI,CAACM,KAAK,CAAC;QACpF;MACJ,CAAC,MAAM,IAAIN,IAAI,CAACW,MAAM,EAAE;QACpBC,MAAM,CAACC,OAAO,CAACb,IAAI,CAACW,MAAM,CAAC,CAACG,OAAO,CAAC,CAAC,CAACC,IAAI,EAAEC,QAAQ,CAAC,KAAK;UACtD,IAAI,CAACC,OAAO,CAACF,IAAI,EAAGG,KAAK,IAAK;YAC1B;YACAA,KAAK,CAACX,QAAQ,CAACS,QAAQ,CAAC;UAC5B,CAAC,CAAC;QACN,CAAC,CAAC;MACN,CAAC,MAAM;QACHpB,6DAAO,CAAC,MAAM;UACV;AACpB;AACA;AACA;UACoB,IAAI,CAACuB,IAAI,CAAC,QAAQ,EAAEnB,IAAI,CAAC;UACzB,IAAI,CAACoB,GAAG,CAAC,cAAc,CAAC,CAACC,IAA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CAAC;MAE5B,IAAIsuB,eAAe,CAAC1tB,MAAM,GAAGitB,2BAA2B,EAAE;QACtDS,eAAe,GAAGA,eAAe,CAACrK,KAAK,CAAC,CAAC,EAAE4J,2BAA2B,CAAC;MAC3E;;MAEA;MACA,IAAI,CAACK,eAAe,CAACI,eAAe,CAAC;IACzC;EACJ;EAEA,OAAOlI,mBAAmB;AAC9B","sources":["webpack://sfra-boilerplate/./cartridges/app_custom_core/cartridge/client/default/js/widgets/forms/ajax/BackInStock.js","webpack://sfra-boilerplate/./cartridges/app_custom_core/cartridge/client/default/js/widgets/forms/ajax/EVoucherDataForm.js","webpack://sfra-boilerplate/./cartridges/app_custom_core/cartridge/client/default/js/widgets/global/CuttableContent.js","webpack://sfra-boilerplate/./cartridges/app_custom_core/cartridge/client/default/js/widgets/product/AddAllToCartMixin.js","webpack://sfra-boilerplate/./cartridges/app_custom_core/cartridge/client/default/js/widgets/product/AlternativeImage.js","webpack://sfra-boilerplate/./cartridges/app_custom_core/cartridge/client/default/js/widgets/product/Availability.js","webpack://sfra-boilerplate/./cartridges/app_custom_core/cartridge/client/default/js/widgets/product/BuyTogetherCheckbox.js","webpack://sfra-boilerplate/./cartridges/app_custom_core/cartridge/client/default/js/widgets/product/BuyTogetherProduct.js","webpack://sfra-boilerplate/./cartridges/app_custom_core/cartridge/client/default/js/widgets/product/BuyTogetherRecommendation.js","webpack://sfra-boilerplate/./cartridges/app_custom_core/cartridge/client/default/js/widgets/product/ColorSwatch.js","webpack://sfra-boilerplate/./cartridges/app_custom_core/cartridge/client/default/js/widgets/product/EProductAddToCartMixin.js","webpack://sfra-boilerplate/./cartridges/app_custom_core/cartridge/client/default/js/widgets/product/EProductJustAddedProductToCartMixin.js","webpack://sfra-boilerplate/./cartridges/app_custom_core/cartridge/client/default/js/widgets/product/EProductProductDetail.js","webpack://sfra-boilerplate/./cartridges/app_custom_core/cartridge/client/default/js/widgets/product/PlusProductAddToCartMixin.js","webpack://sfra-boilerplate/./cartridges/app_custom_core/cartridge/client/default/js/widgets/product/PlusProductDetail.js","webpack://sfra-boilerplate/./cartridges/app_custom_core/cartridge/client/default/js/widgets/product/ProductDetail.js","webpack://sfra-boilerplate/./cartridges/app_custom_core/cartridge/client/default/js/widgets/product/ProductDetailContainer.js","webpack://sfra-boilerplate/./cartridges/app_custom_core/cartridge/client/default/js/widgets/product/ProductImages.js","webpack://sfra-boilerplate/./cartridges/app_custom_core/cartridge/client/default/js/widgets/product/ProductSet.js","webpack://sfra-boilerplate/./cartridges/app_custom_core/cartridge/client/default/js/widgets/product/RecentlyViewedMixin.js","webpack://sfra-boilerplate/./cartridges/app_custom_core/cartridge/client/default/js/widgets/product/SetProductDetail.js","webpack://sfra-boilerplate/./cartridges/app_custom_core/cartridge/client/default/js/widgets/product/Specifications.js","webpack://sfra-boilerplate/./cartridges/app_custom_core/cartridge/client/default/js/widgets/wishlist/EProductAddToWishlistMixin.js","webpack://sfra-boilerplate/./cartridges/app_storefront_widgets/cartridge/client/default/js/widgets/forms/ajax/BackInStock.ts","webpack://sfra-boilerplate/./cartridges/app_storefront_widgets/cartridge/client/default/js/widgets/product/AddAllToCartMixin.ts","webpack://sfra-boilerplate/./cartridges/app_storefront_widgets/cartridge/client/default/js/widgets/product/ColorSwatch.ts","webpack://sfra-boilerplate/./cartridges/app_storefront_widgets/cartridge/client/default/js/widgets/product/ProductDetail.ts","webpack://sfra-boilerplate/./cartridges/app_storefront_widgets/cartridge/client/default/js/widgets/product/ProductImages.ts","webpack://sfra-boilerplate/./cartridges/app_storefront_widgets/cartridge/client/default/js/widgets/product/ProductSet.ts","webpack://sfra-boilerplate/./cartridges/app_storefront_widgets/cartridge/client/default/js/widgets/product/ProductVideoMixin.ts","webpack://sfra-boilerplate/./cartridges/app_storefront_widgets/cartridge/client/default/js/widgets/product/RecentlyViewedMixin.ts"],"sourcesContent":["import { timeout } from 'widgets/toolbox/util';\n\n/**\n * @typedef {ReturnType<typeof import('widgets/forms/ajax/BackInStock').default>} BaseBackInStock\n */\n\n/**\n * @description BackInStock implementation\n * @param {BaseBackInStock} BaseBackInStock Base widget for extending\n * @returns {typeof BackInStock} BackInStock class\n */\nexport default function (BaseBackInStock) {\n /**\n * @class BackInStock\n * @augments BaseBackInStock\n */\n class BackInStock extends BaseBackInStock {\n /**\n * @description Handles server response\n * @emits AjaxForm#submit\n * @param {object} data Server JSON response once form submitted\n * @param {string} [data.success] - If form submission was success\n * @param {string} [data.redirectUrl] - if not empty - redirect to specified location should be executed\n * @param {boolean|string|string[]} [data.error] - error messages/message from server\n * @param {object[]} [data.fields] - form fields with errors\n * @returns {void}\n */\n onSubmitted(data) {\n if (data.success && data.redirectUrl) {\n window.location.assign(data.redirectUrl);\n } else if (data.error) {\n if (data.redirectUrl) {\n window.location.assign(data.redirectUrl);\n } else {\n this.setError(Array.isArray(data.error) ? data.error.join('<br/>') : data.error);\n }\n } else if (data.fields) {\n Object.entries(data.fields).forEach(([name, errorMsg]) => {\n this.getById(name, (input) => {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'setError' does not exist on type 'Widget... Remove this comment to see the full error message\n input.setError(errorMsg);\n });\n });\n } else {\n timeout(() => {\n /**\n * @description Event to submit AjaxForm\n * @event AjaxForm#submit\n */\n this.emit('submit', data);\n this.ref('contentBlock').hide();\n this.ref('successBlock').show();\n });\n }\n }\n }\n\n return BackInStock;\n}\n","import { submitFormJson } from 'widgets/toolbox/ajax';\n\n/**\n * @typedef {ReturnType<typeof import('widgets/forms/AjaxForm').default>} AjaxForm\n */\n\n/**\n * @description EVoucherDataForm implementation\n * @param {AjaxForm} AjaxForm Base widget for extending\n * @returns {typeof EVoucherDataForm} EVoucherDataForm class\n */\nexport default function (AjaxForm) {\n /**\n * @class EVoucherDataForm\n * @augments AjaxForm\n */\n class EVoucherDataForm extends AjaxForm {\n /**\n * @description Prevent to submit form by Enter\n * @returns {void}\n */\n handleNoop() {\n\n }\n\n /**\n * @description Programmatically submits e-voucher form data to server\n * @param {string} pliUUID newly added to cart product line itrem ID\n * @returns {Promise} a promise after form submission\n */\n submitData(pliUUID) {\n this.submitting = true;\n return submitFormJson(\n this.getFormUrl(),\n {\n pliUUID,\n ...this.getFormFields()\n },\n this.ref('self').attr('method') === 'GET' ? 'GET' : 'POST'\n )\n .then(this.onSubmitted.bind(this))\n .catch(this.onError.bind(this))\n .finally(this.afterSubmission.bind(this));\n }\n\n /**\n * @description Just to use in further `then` promise chain\n * @param {object} data server response\n * @returns {object} server response\n */\n onSubmitted(data) {\n super.onSubmitted(data);\n return data;\n }\n }\n\n return EVoucherDataForm;\n}\n","import { debounce } from 'widgets/toolbox/debounce';\n\n/**\n * @typedef {typeof import('widgets/Widget').default} Widget\n */\n\n/**\n * @description Cuttable content implementation\n * @param {Widget} Widget Base widget for extending\n * @returns {typeof CuttableContent} CuttedContent class\n */\nexport default function (Widget) {\n /**\n * @class CuttableContent\n * @augments Widget\n */\n class CuttableContent extends Widget {\n prefs() {\n return {\n moreClass: 'm-show-more',\n activeClass: 'm-cut-active',\n showMore: '',\n showLess: '',\n maxHeight: 0,\n useLess: true,\n ...super.prefs()\n };\n }\n\n init() {\n this.toggleButton();\n\n this.opened = false;\n\n this.ev('resize', debounce(this.toggleButton.bind(this), 200), window);\n }\n\n onRefresh() {\n this.toggleButton();\n }\n\n toggleButton() {\n this.has('button', button => {\n this.has('content', content => {\n if (this.prefs().maxHeight && this.prefs().maxHeight > content.prop('scrollHeight')) {\n button.hide();\n this.ref('self').removeClass(this.prefs().activeClass);\n } else if (!this.prefs().useLess || !this.opened) {\n button.show();\n this.ref('self').addClass(this.prefs().activeClass);\n }\n });\n });\n }\n\n toggleContent(link) {\n const prefs = this.prefs();\n\n this.has('content', content => content.toggleClass(prefs.moreClass));\n\n if (this.prefs().useLess) {\n link.setText(this.opened ? prefs.showMore : prefs.showLess);\n } else if (!this.opened) {\n link.hide();\n }\n\n this.opened = !this.opened;\n }\n }\n\n return CuttableContent;\n}\n","/**\n * @typedef {ReturnType<typeof import('widgets/product/AddAllToCartMixin').default>} AddAllToCartMixinBase\n * @typedef {InstanceType<typeof import('widgets/toolbox/RefElement').RefElement>} refElement\n * @typedef {InstanceType<typeof import('core/product/SetProductDetail').default>} SetProductDetail\n */\n\n/**\n * @description Extended AddAllToCartMixin implementation\n *\n * This class is not intended to have a separate DOM representation.\n *\n * @param {AddAllToCartMixinBase} AddAllToCartMixinBase widget for extending\n * @returns {typeof AddAllToCartMixin} Add to Cart mixin widget\n */\nexport default function (AddAllToCartMixinBase) {\n /**\n * @class AddAllToCartMixin\n * @augments AddAllToCartMixinBase\n * @subcategory product\n * @classdesc Represents product set component with the next features:\n * 1. Adds all product set products to the basket\n * 2. Shows alert message after adding product set products to the basket\n *\n * @property {string} data-text-network-error - network error text\n */\n class AddAllToCartMixin extends AddAllToCartMixinBase {\n prefs() {\n return {\n classesBusy: 'm-busy',\n ...super.prefs()\n };\n }\n\n /**\n * @description Returns product set data for the set items\n * @returns {array} result\n */\n getProductSetItems() {\n const productSetItems = [];\n\n this.eachChild((child) => {\n if (child.prefs().productSetItem && this.productSetSelected(child)) {\n let isOutOfStock = false;\n\n child.getById('addToCart', (addToCart) => {\n isOutOfStock = !!addToCart.prefs().isOutOfStock;\n });\n\n productSetItems.push({\n pid: child.prefs().currentProductId || child.prefs().pid,\n quantity: child.prefs().selectedQuantity,\n available: !isOutOfStock,\n readyToOrder: child.prefs().readyToOrder\n });\n }\n });\n\n return productSetItems;\n }\n\n /**\n * @description returns product set item selection status\n *\n * @param {SetProductDetail} productSetItem - product set item ref element\n * @returns {boolean} true flag if product set item selected\n */\n productSetSelected(productSetItem) {\n const SET_ITEM_SELECTED_VALUE = 'on';\n\n return productSetItem.productSelected() === SET_ITEM_SELECTED_VALUE;\n }\n\n /**\n * @description checks that all selected product is added to cart\n * @param {object} addToCartResult - add to cart result\n * @param {number} productsCount - product count\n * @returns {boolean} result\n */\n isAllProductAdded(addToCartResult, productsCount) {\n return addToCartResult.messages && (addToCartResult.messages.length === productsCount);\n }\n\n /**\n * @description shows post add to cart messages\n * @param {boolean} showAccessibilityAlerts - use accessibility flag\n * @param {Array.<string>} messages - array with messages\n * @returns {string} result\n */\n getPostAddToCartMessage(showAccessibilityAlerts, messages) {\n const message = showAccessibilityAlerts\n ? this.prefs().accessibilityAlerts.addedsettocart\n : messages.join('<br>');\n\n return message;\n }\n\n /**\n * @description checks that is current product set added to cart\n * @param {SetProductDetail} currentProductSet - current product set\n * @param {string} productID - added to cart product set item id\n * @returns {boolean} result\n */\n isAddedToCartProductSet(currentProductSet, productID) {\n return currentProductSet.prefs().productSetItem\n && this.productSetSelected(currentProductSet)\n && currentProductSet.prefs().pid\n && currentProductSet.prefs().pid.toString() === productID;\n }\n\n /**\n * @description gets added to cart product set items\n * @param {object} cartModel - updated cart model\n * @param {object} pidsObj - product set object\n * @returns {Array.<SetProductDetail>} result\n */\n getAddedToCartProductSets(cartModel, pidsObj) {\n const pidIDs = pidsObj.map((pidObj) => pidObj.pid.toString());\n const addedSetItemsIDs = pidIDs.filter((pidID) => cartModel.itemsIds.includes(pidID));\n const productWidgets = (addedSetItemsIDs || []).reduce((setWidgets, productID) => {\n this.eachChild((child) => {\n if (this.isAddedToCartProductSet(child, productID)) {\n setWidgets.push(child);\n }\n });\n\n return setWidgets;\n }, []);\n\n return productWidgets;\n }\n\n /**\n * @description Handles a result of product set adding to cart\n * @param {object} response - response\n * @param {boolean} isFullProductSet - Identifies if all product set items are added\n * @param {number} productsCount - products count to be added to the cart\n * @returns {void}\n */\n postAddAllToCart(response, isFullProductSet, productsCount) {\n if (!response.error && response.cart && response.messages) {\n const cartModel = response.cart;\n\n cartModel.showMinicart = this.prefs().showMinicartOnProductAdd;\n\n const productSetItems = this.getProductSetItems();\n const pidsObj = this.getPidsObj(productSetItems);\n const isAllProductsAdded = this.isAllProductAdded(response, productsCount);\n const showAccessibilityAlerts = isFullProductSet && isAllProductsAdded;\n const message = this.getPostAddToCartMessage(showAccessibilityAlerts, response.messages);\n const productWidgets = this.getAddedToCartProductSets(cartModel, pidsObj);\n\n this.showAddAllToCartAlert(false, message);\n this.showJustAddedProductCart(response);\n this.eventBus().emit('product.added.to.cart', cartModel, this, productWidgets);\n } else {\n this.showAddAllToCartAlert(true, response.message);\n }\n }\n\n /**\n * @description shows cart quick view\n *\n * @param {object} response - result of the adding to cart call\n * @param {object} response.cart - cart model\n * @param {string} response.pid - added product identifier\n */\n showJustAddedProductCart(response) {\n const cartModel = response.cart;\n const productID = response.pid;\n const subscriptionID = response.subscriptionID;\n const pidsObj = response.pidsObj;\n\n cartModel.action = response.action;\n\n if (response.error && this.prefs().showMessageOnProductAdd) {\n this.eventBus().emit('product.addedTocart.with.error', response);\n this.showCartMessage(response.message, response.error);\n\n return;\n }\n\n if (!cartModel || !cartModel.numItems) {\n return;\n }\n\n this.showProgressBar();\n\n this.eventBus().emit('show.just.added.cart', {\n productID,\n cartModel,\n subscriptionID,\n pidsObj\n });\n\n cartModel.showMinicart = false;\n this.eventBus().emit('cart.updated', { cartModel }, this);\n\n if (window.contexts.includes('cart')) {\n this.eventBus().emit('product.added.to.cart', { cartModel }, this);\n } else {\n this.eventBus().emit('just.added.product.to.cart', { cartModel }, this);\n }\n\n this.hideProgressBar();\n }\n\n showCartMessage(msg, error = false) {\n this.getById(this.prefs().addToCartMsg, (addToCartMsg) => {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'spacesLength' does not exist on type 'Ad... Remove this comment to see the full error message\n if (typeof this.spacesLength === 'undefined') {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'spacesLength' does not exist on type 'Ad... Remove this comment to see the full error message\n this.spacesLength = 0;\n }\n // It's needed to force render previously added success message. If we try to add the same product\n // several times, success message alert will not be announced by a screen reader.\n\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'spacesLength' does not exist on type 'Ad... Remove this comment to see the full error message\n msg = msg.concat(Array(++this.spacesLength).join(this.prefs().zeroWidthSpaceSymbol));\n\n addToCartMsg.render('template', { msg, error }, addToCartMsg.ref('container')).then(() => addToCartMsg.show());\n });\n }\n\n showProgressBar() {\n this.ref('self').addClass(this.prefs().classesBusy);\n }\n\n hideProgressBar() {\n this.ref('self').removeClass(this.prefs().classesBusy);\n }\n }\n\n return AddAllToCartMixin;\n}\n","/**\n * @typedef {ReturnType<typeof import('widgets/product/AlternativeImage').default>} BaseAlternativeImage\n */\n\n/**\n * @description AlternativeImage extension\n * @param {BaseAlternativeImage} BaseAlternativeImage Base widget for extending\n * @returns {typeof AlternativeImage} Alternative Image widget\n */\nexport default function (BaseAlternativeImage) {\n /**\n * @class AlternativeImage\n * @augments BaseAlternativeImage\n */\n class AlternativeImage extends BaseAlternativeImage {\n /**\n * @description Prepare alternative image viewport dependent src.\n * The trick is get already defined by browser image from set and prepare same image for alt.\n * If project has completely different images on breakpoints this should be extended with\n * update image src on viewport change.\n * @returns {string} alternative image url\n */\n getAlternativeImageSrc() {\n const altImageUrl = this.ref('alternativeViewContainer').attr('data-alt-image-url');\n const baseImage = this.ref('tileImage').get();\n\n if (!(baseImage instanceof HTMLImageElement) || !altImageUrl) {\n return '';\n }\n\n const baseImageUrl = baseImage.currentSrc || baseImage.src;\n const altImageUrlParsed = new URL(altImageUrl);\n const baseImageUrlParsed = new URL(baseImageUrl);\n const disQueryString = baseImageUrlParsed.search;\n\n if (altImageUrlParsed.search === disQueryString) {\n return altImageUrl;\n }\n\n return altImageUrlParsed.origin + altImageUrlParsed.pathname + disQueryString;\n }\n }\n\n return AlternativeImage;\n}\n","/**\n * @typedef {ReturnType<typeof import('widgets/Widget').default>} Widget\n */\n\n/**\n * @param {Widget} Widget Base widget for extending\n * @returns {typeof Availability} Availability class\n */\n\nexport default function (Widget) {\n /**\n * @category widgets\n * @subcategory product\n * @class Availability\n * @augments Widget\n * @classdesc Represents Availability component\n */\n\n class Availability extends Widget {\n prefs() {\n return {\n pdpAvailability: {},\n ...super.prefs()\n };\n }\n\n openBackInStockDialog() {\n this.has('backInStockDialogTemplate', backInStockDialogTemplate => {\n this.eventBus().emit('dialogshow', {\n content: backInStockDialogTemplate.prop('innerHTML'),\n wrapperClasses: 'm-back_in-stock',\n windowClasses: 'b-dialog-bg'\n });\n });\n }\n\n /**\n * @description Returns PDP availability object\n * @returns {object} PDP availability object\n */\n getAvailability() {\n return this.prefs().pdpAvailability;\n }\n\n /**\n * @description Stores updated PDP availability\n * @param {object} pdpAvailability updated PDP availability\n * @returns {void}\n */\n setAvailability(pdpAvailability) {\n this.setPref('pdpAvailability', JSON.stringify(pdpAvailability));\n }\n }\n\n return Availability;\n}\n","/**\n * @typedef {ReturnType <typeof import('widgets/forms/InputCheckbox').default>} InputCheckbox\n */\n\n/**\n * @description Base InputCheckbox implementation\n * @param {InputCheckbox} InputCheckbox - widget for extending\n * @returns {typeof BuyTogetherCheckbox} Input Checkbox class\n */\nexport default function (InputCheckbox) {\n class BuyTogetherCheckbox extends InputCheckbox {\n /**\n * @description disables checkbox\n */\n disableCheckbox() {\n this.ref('field').prop('disabled', true);\n }\n\n /**\n * @description preselects checkbox\n */\n preselectCheckbox() {\n this.ref('field').prop('checked', true);\n }\n\n /**\n * unselects checkbox\n */\n unselectCheckbox() {\n this.ref('field').prop('checked', false);\n }\n }\n\n return BuyTogetherCheckbox;\n}\n","/**\n * @typedef {ReturnType<typeof import('core/product/SetProductDetail').default>} SetProductDetail\n * @typedef {InstanceType<ReturnType<typeof import('widgets/forms/InputStepper').default>>} InputStepper\n */\n\n/**\n * @param {SetProductDetail} SetProductDetail Base SetProductDetail for extending\n * @returns {typeof BuyTogetherProduct} Availability class\n */\n\nexport default function (SetProductDetail) {\n /**\n * @class ProductDetail\n * @augments SetProductDetail\n */\n class BuyTogetherProduct extends SetProductDetail {\n prefs() {\n return {\n productAvailable: false,\n recommenderProduct: false,\n recommendationProductId: '',\n lowStockMessage: '',\n ...super.prefs()\n };\n }\n\n init() {\n super.init();\n\n this.recommendationAvailable = this.prefs().productAvailable;\n }\n\n /**\n * @description Handles product pre selection\n */\n preselectProduct() {\n if (!this.prefs().productAvailable) {\n return;\n }\n\n this.ref('self').addClass(this.prefs().selectedClass);\n\n this.getById('selectProduct', (selectProduct) => {\n selectProduct.preselectCheckbox();\n });\n\n if (this.prefs().recommenderProduct) {\n this.getById('selectProduct', (selectProduct) => {\n selectProduct.disableCheckbox();\n });\n }\n }\n\n /**\n * @description After change attribute handler\n * @param {object} response response object\n * @returns {void}\n */\n afterChangeAttribute(response) {\n super.afterChangeAttribute(response);\n\n this.eventBus().emit('update.buy.together.recommendation', response?.product?.id, this.getRecommendationProductId());\n }\n\n /**\n * @description Updates selection flag\n * @param {boolean} selectionFlag - selection flag\n * @param {string} selectionValue - selection value\n */\n updateProductSelection(selectionFlag) {\n if (!selectionFlag) {\n this.getById('selectProduct', (selectProduct) => {\n selectProduct.unselectCheckbox();\n });\n } else if (selectionFlag) {\n this.getById('selectProduct', (selectProduct) => {\n selectProduct.preselectCheckbox();\n });\n }\n }\n\n /**\n * @description updates availability section\n * @param {object} product - product object\n * @returns {Promise} rendering promise\n */\n updateAvailabilitySection(product) {\n if (product) {\n const isProductSelected = product.buyTogetherRecommender || this.productSelected() === 'on';\n\n product.selected = isProductSelected;\n product.disabled = product.buyTogetherRecommender;\n\n this.updateProductSelection(isProductSelected);\n }\n\n this.recommendationAvailable = product.available;\n\n return this.render('availabilityTogetherTemplate', product, this.ref('availabilityTogetherContainer'));\n }\n\n /**\n * @description updates availability badge\n * @param {object} product - product object\n * @returns {void}\n */\n updateAvailabilityBadge(product) {\n if (!product) {\n return;\n }\n\n const isReachedLimit = (product.readyToOrder || product.isInaccessibleVariant) && product.availability.isReachedLimit;\n let lowStockMessage = '';\n\n if (product.availability.isLowStock) {\n lowStockMessage = product.availability.messages[0];\n } else if (product.plpAvailability.available && product.plpAvailability.stock) {\n lowStockMessage = this.prefs().lowStockMessage.replace('{0}', product.plpAvailability.stock);\n }\n\n const renderingData = {\n reachedLimitMessage: isReachedLimit ? product.availability.isReachedLimitMessage : '',\n hasPromotions: !!product.promotions,\n promotions: product.promotions,\n lowStockMessage\n };\n\n this.render('additionalInfoTemplate', renderingData, this.ref('additionalInfoContainer'));\n }\n\n /**\n * @description Updates recommendation item quantity\n * @param {number} selectedQuantity - selected quantity\n */\n updateQuantity(selectedQuantity) {\n this.config.selectedQuantity = selectedQuantity;\n\n this.getById('quantityBlock', (quantityBlock) => {\n quantityBlock.render(\n 'template',\n { selectedQuantity },\n quantityBlock.ref('container')\n );\n });\n }\n\n /**\n * @description Updates recommendation item total\n * @param {object} product - recommendation product\n * @param {object} product.subtotal - recommendation product subtotal\n */\n updateTotal(product) {\n if (!product.subtotal) {\n return;\n }\n\n this.ref('totalPrice').hide();\n\n const productSetPriceBlock = this.getById('totalPriceBlock', (priceBlock) => {\n return priceBlock.ref('self');\n });\n\n this.render('setPriceTpl', { price: product.subtotal }, productSetPriceBlock);\n }\n\n /**\n * @description gets recommendation product id\n * @returns {string} recommendation product id\n */\n getRecommendationProductId() {\n return this.prefs().recommendationProductId;\n }\n }\n\n return BuyTogetherProduct;\n}\n","import { getJSONByUrl } from 'widgets/toolbox/ajax';\n\n/**\n * @typedef {ReturnType<typeof import('core/product/ProductSet').default>} ProductSet\n * @typedef {ReturnType<typeof import('core/product/BuyTogetherProduct').default>} BuyTogetherProduct\n */\n\n/**\n * @param {ProductSet} ProductSet Base ProductSet for extending\n * @returns {typeof BuyTogetherProduct} Availability class\n */\n\nexport default function (ProductSet) {\n /**\n * @class ProductDetail\n * @augments ProductSet\n */\n class BuyTogetherProduct extends ProductSet {\n prefs() {\n return {\n preselectFirstCollection: false,\n preselectRecommendations: false,\n selectRecommendationItemUrl: '',\n updateBuyTogetherItemsUrl: '',\n priceState: null,\n ...super.prefs()\n };\n }\n\n init() {\n super.init();\n\n this.initEvents();\n\n this.preselectRecommendations();\n this.initRecommendationTotal();\n }\n\n /**\n * @description inits widget events\n */\n initEvents() {\n this.eventBus().on('update.buy.together.recommendation', 'updateRecommendation');\n }\n\n /**\n * @description inits buy together recommendation total price\n */\n initRecommendationTotal() {\n if (this.prefs().priceState) {\n this.updatePriceTotal(this.prefs().priceState);\n this.togglePriceTotals(true, false);\n this.manageAddSetToCart(true);\n }\n }\n\n /**\n * Getters\n */\n\n /**\n * @description gets all buy together items\n * @returns {Array.<BuyTogetherProduct>} buy together products\n */\n getBuyTogetherItems() {\n const buyTogetherProduct = this.getConstructor('buyTogetherProduct');\n const recommendations = [];\n\n this.eachChild((child) => {\n if (child instanceof buyTogetherProduct) {\n recommendations.push(child);\n }\n });\n\n return recommendations;\n }\n\n /**\n * @description gets all selected buy together items\n * @returns {Array.<BuyTogetherProduct>} selected buy together products\n */\n getSelectedRecommendations() {\n const recommendationItems = this.getBuyTogetherItems();\n const selectedRecommendations = recommendationItems.filter((recommendationItem) => {\n return recommendationItem.productSelected() && !recommendationItem.prefs().recommenderProduct;\n });\n\n return selectedRecommendations;\n }\n\n /**\n * @description gets all pattern products\n * @returns {Array.<BuyTogetherProduct>} pattern products\n */\n getRecommender() {\n const recommendationItems = this.getBuyTogetherItems();\n const selectedRecommendations = recommendationItems.filter((recommendationItem) => {\n return recommendationItem.prefs().recommenderProduct;\n });\n\n return selectedRecommendations;\n }\n\n /**\n * @description gets selected buy together products\n * @returns {Array.<BuyTogetherProduct>} selected buy together products\n */\n getSelectedBuyTogetherItems() {\n const recommendationItems = this.getBuyTogetherItems();\n const selectedBuyTogetherItems = recommendationItems.filter((recommendationItem) => {\n return recommendationItem.productSelected();\n });\n\n return selectedBuyTogetherItems;\n }\n\n /**\n * @description gets selected buy together items IDs\n * @returns {Array.<string>} array with items IDs\n */\n getSelectedRecommendationIDs() {\n const selectedRecommendations = this.getSelectedBuyTogetherItems();\n const recommendationIDs = (selectedRecommendations || []).map((selectedRecommendation) => {\n return selectedRecommendation.getProductId().toString();\n });\n\n return recommendationIDs;\n }\n\n /**\n * @typedef {object} ProductSetItem\n * @property {boolean} available - availability flag\n * @property {number} pid - product id\n * @property {string} quantity - product quantity\n */\n\n /**\n * @description returns an array with products available for ordering\n * @param {Array.<ProductSetItem>} productSetItems - product set data for the set items\n * @returns {Array.<object>} result\n */\n getPidsObj(productSetItems) {\n return productSetItems.filter(setItem => setItem.available).map((childProduct) => {\n const pid = typeof childProduct.pid === 'number'\n ? childProduct.pid.toString()\n : childProduct.pid;\n\n return {\n pid,\n qty: childProduct.quantity\n };\n });\n }\n\n /**\n * @description gets recommendation variants\n * @returns {object} result\n */\n getRecommendationsVariants() {\n const recommendationItems = this.getBuyTogetherItems();\n\n const selectedRecommendationVariants = recommendationItems.reduce((recommendationVariants, recommendationItem) => {\n const recommendationItemID = recommendationItem.getRecommendationProductId().toString();\n const recommendationVariantID = recommendationItem.getProductId().toString();\n\n if (recommendationItemID !== recommendationVariantID) {\n recommendationVariants[recommendationItemID] = recommendationVariantID;\n }\n\n return recommendationVariants;\n }, {});\n\n return selectedRecommendationVariants;\n }\n\n /**\n * Methods\n */\n\n /**\n * @description updates buy together recommendation total\n * @param {object} priceTotal - buy together recommendation total price\n */\n updatePriceTotal(priceTotal) {\n const productSetPriceBlock = this.getById('priceBlock', (priceBlock) => priceBlock.ref('self'));\n\n this.render('setPriceTpl', { price: priceTotal }, productSetPriceBlock);\n }\n\n /**\n * @description preselects recommendation items\n */\n preselectRecommendations() {\n if (!this.prefs().preselectRecommendations) {\n return;\n }\n\n const recommendations = this.getBuyTogetherItems();\n\n recommendations.forEach((recommendation) => recommendation.preselectProduct());\n }\n\n /**\n * @description updates recommendation items\n * @param {Array.<object>} recommendationItems - updated recommendation items\n */\n updateRecommendationItems(recommendationItems) {\n recommendationItems.forEach((recommendationItem) => {\n this.getById(`buyTogetherProduct-${recommendationItem.buyTogetherRecommendationID}`, (buyTogetherProduct) => {\n buyTogetherProduct.updateQuantity(recommendationItem.recommendationQuantity);\n buyTogetherProduct.updateTotal(recommendationItem);\n buyTogetherProduct.updateAvailabilitySection(recommendationItem);\n buyTogetherProduct.updateAvailabilityBadge(recommendationItem);\n });\n });\n }\n\n /**\n * @description checks that buy together recommendation set is unavailable\n * @returns {boolean} result\n */\n isBuyTogetherRecommendationsUnavailable() {\n const allRecommendations = this.getBuyTogetherItems();\n\n return allRecommendations.every((recommendation) => {\n return !recommendation.recommendationAvailable;\n });\n }\n\n /**\n * @description checks that product recommendation set has any selected recommendations\n * @returns {boolean} result\n */\n hasSelectedProducts() {\n const selectedProducts = this.getSelectedBuyTogetherItems();\n\n return !!selectedProducts.length;\n }\n\n /**\n * @description handles updates for unavailable buy together recommendation set\n * @param {object} total - buy together recommendation total price\n */\n handleAvailabilityRecommendationSet(total) {\n if (this.isBuyTogetherRecommendationsUnavailable() || total.zeroPrice) {\n this.togglePriceTotals(false, true);\n this.manageAddSetToCart(false);\n } else {\n const hasAnySelectedProducts = this.hasSelectedProducts();\n\n if (hasAnySelectedProducts) {\n this.togglePriceTotals(true, false);\n this.updatePriceTotal(total);\n } else {\n this.togglePriceTotals(false, true);\n }\n\n this.manageAddSetToCart(hasAnySelectedProducts);\n }\n }\n\n /**\n * @description handles product selection result\n * @param {object} response - result\n * @param {object} response.total - updated total price\n */\n handleSelectedProductResult(response) {\n if (response && response.total) {\n const { total } = response;\n const hasAnySelectedProducts = this.hasSelectedProducts();\n\n if (hasAnySelectedProducts) {\n const productSetPriceBlock = this.getById('priceBlock', (priceBlock) => priceBlock.ref('self'));\n\n this.render('setPriceTpl', { price: total }, productSetPriceBlock)\n .then(this.togglePriceTotals.bind(this, true, false));\n } else {\n this.togglePriceTotals(false, true);\n }\n\n this.manageAddSetToCart(hasAnySelectedProducts);\n } else {\n this.togglePriceTotals(false, true);\n this.manageAddSetToCart(false);\n }\n }\n\n /**\n * @description handles recommendation update\n * @param {object} response - updating result\n * @param {string} updatedProductID - updated product id\n * @param {string} recommendationID - recommendation product id\n * @returns {void}\n */\n handleUpdateRecommendation(response, updatedProductID, recommendationID) {\n if (!updatedProductID || !recommendationID) {\n return;\n }\n\n const recommendationVariant = (response.recommendationItems || []).find((recommendationItem) => {\n return recommendationItem.id === updatedProductID;\n });\n\n if (!recommendationVariant) {\n return;\n }\n\n this.getById(`buyTogetherProduct-${recommendationID}`, (buyTogetherProduct) => {\n buyTogetherProduct.updateQuantity(recommendationVariant.recommendationQuantity);\n buyTogetherProduct.updateTotal(recommendationVariant);\n buyTogetherProduct.updateAvailabilitySection(recommendationVariant);\n buyTogetherProduct.updateAvailabilityBadge(recommendationVariant);\n });\n\n if (recommendationVariant.buyTogetherRecommender) {\n this.getById('buyTogetherPattern', (buyTogetherProduct) => {\n buyTogetherProduct.updateQuantity(recommendationVariant.recommendationQuantity);\n buyTogetherProduct.updateTotal(recommendationVariant);\n buyTogetherProduct.updateAvailabilityBadge(recommendationVariant);\n buyTogetherProduct.updateAvailabilitySection(recommendationVariant)\n .then(() => { this.handleAvailabilityRecommendationSet(response.total); });\n });\n } else {\n this.handleAvailabilityRecommendationSet(response.total);\n }\n }\n\n /**\n * @description handles collection update result\n * @param {object} response - result\n * @param {Array.<object>} response.recommendationItems - array with updated recommendations\n * @param {object} response.total - updated buy together total\n */\n handleUpdateCollectionResult(response) {\n if (!response || !response.recommendationItems || !response.total) {\n return;\n }\n\n this.handleAvailabilityRecommendationSet(response.total);\n this.updateRecommendationItems(response.recommendationItems);\n }\n\n /**\n * Callbacks\n */\n\n /**\n * @description Server request to get product set info/prices etc depending on pre-selected products\n * @returns {void}\n */\n onProductSelected() {\n const selectedRecommendations = this.getSelectedRecommendationIDs();\n const recommendationsVariants = this.getRecommendationsVariants();\n let currentCollection = '';\n\n this.getById('collectionSelector', (collectionSelector) => {\n currentCollection = collectionSelector.getValue();\n });\n\n getJSONByUrl(this.prefs().selectRecommendationItemUrl, {\n recommenderProductID: this.prefs().pid,\n selectedBuyTogetherItems: selectedRecommendations.join(','),\n selectedCollection: currentCollection,\n recommendationsVariants: JSON.stringify(recommendationsVariants)\n }).then(this.handleSelectedProductResult.bind(this));\n }\n\n /**\n * @description handles collection update event\n * @param {import(\"widgets/toolbox/RefElement\").RefElement} collectionSelector - collection selector\n */\n onUpdateCollection(collectionSelector) {\n const selectedRecommendations = this.getSelectedRecommendationIDs();\n const recommendationsVariants = this.getRecommendationsVariants();\n\n getJSONByUrl(this.prefs().updateBuyTogetherItemsUrl, {\n recommenderProductID: this.prefs().pid,\n selectedBuyTogetherItems: selectedRecommendations.join(','),\n selectedCollection: collectionSelector.getValue(),\n recommendationsVariants: JSON.stringify(recommendationsVariants)\n }).then(this.handleUpdateCollectionResult.bind(this));\n }\n\n /**\n * @description updates recommendation\n * @param {object} updatedProduct - updated product\n * @param {string} recommendationID - recommendation id\n */\n updateRecommendation(updatedProduct, recommendationID) {\n const selectedRecommendations = this.getSelectedRecommendationIDs();\n const recommendationsVariants = this.getRecommendationsVariants();\n let currentCollection = '';\n\n this.getById('collectionSelector', (collectionSelector) => {\n currentCollection = collectionSelector.getValue();\n });\n\n getJSONByUrl(this.prefs().updateBuyTogetherItemsUrl, {\n recommenderProductID: this.prefs().pid,\n selectedBuyTogetherItems: selectedRecommendations.join(','),\n selectedCollection: currentCollection,\n recommendationsVariants: JSON.stringify(recommendationsVariants)\n }).then((response) => this.handleUpdateRecommendation(response, updatedProduct, recommendationID));\n }\n }\n\n return BuyTogetherProduct;\n}\n","/**\n * @typedef {ReturnType<typeof import('widgets/product/ColorSwatch').default>} BaseColorSwatch\n */\n\n/**\n * @description Base ColorSwatch implementation\n * @param {BaseColorSwatch} BaseColorSwatch Base widget for extending\n * @returns {typeof ColorSwatch} Color Swatch widget\n */\nexport default function (BaseColorSwatch) {\n /**\n * @class ColorSwatch\n * @augments BaseColorSwatch\n */\n class ColorSwatch extends BaseColorSwatch {\n prefs() {\n return {\n classesShowAll: 'm-show_all',\n ...super.prefs()\n };\n }\n\n init() {\n super.init();\n\n if (this.isSelectedOptionHidden()) {\n this.toggleView();\n }\n }\n\n isSelectedOptionHidden() {\n return Object.values(this.refs).some(ref => {\n return ref.data('variationSwatch')\n ? ref.data('attrIsSelected') && ref.data('attrIsHidden')\n : false;\n });\n }\n\n toggleView() {\n if (this.showAll) {\n this.ref('self').removeClass(this.prefs().classesShowAll);\n this.showAll = false;\n } else {\n this.ref('self').addClass(this.prefs().classesShowAll);\n this.showAll = true;\n }\n\n this.eventBus().emit('highlighter.update');\n }\n }\n\n return ColorSwatch;\n}\n","import { submitFormJson } from 'widgets/toolbox/ajax';\n\n/**\n * @typedef {ReturnType<typeof import('widgets/product/AddToCartMixin').default>} BaseAddToCartMixin\n * @typedef {InstanceType<ReturnType<typeof import('widgets/global/Button').default>>} button\n * @typedef {InstanceType<ReturnType<typeof import('widgets/forms/InputTextTypeNumber').default>>} inputTextTypeNumber\n * @typedef {InstanceType<ReturnType<typeof import('core/forms/ajax/EVoucherDataForm').default>>} eVoucherDataForm\n */\n\n/**\n * @param {BaseAddToCartMixin} BaseAddToCartMixin Base widget for extending\n * @returns {typeof EProductAddToCartMixin} EProductAddToCartMixin class\n */\n\nexport default function (BaseAddToCartMixin) {\n /**\n * @category widgets\n * @subcategory product\n * @class EProductAddToCartMixin\n * @augments BaseAddToCartMixin\n * @classdesc Represents EProductAddToCartMixin component\n */\n\n class EProductAddToCartMixin extends BaseAddToCartMixin {\n prefs() {\n return {\n removeProductUrl: '',\n eproductType: 'gift-certificate',\n ...super.prefs()\n };\n }\n\n /**\n * @description Add product to cart depending on e-product type\n * If e-product type is `e-voucher`, validates e-voucher data form and in case if form is not valid - not performing add to cart action\n * @param {button} button add to cart button\n * @returns {void}\n */\n addToCart(button) {\n this.validateAndSubmit(button, this.doAddToCart);\n }\n\n /**\n * @description Method, which sends a real request for add e-product to cart\n * Includes amount of e-product, chosen by customer\n * @param {button} button add to cart button\n * @param {object} eVoucherData e-voucher form data if exists\n * @returns {void}\n */\n doAddToCart(button, eVoucherData = {}) {\n if (this.prefs().processingRequest) {\n return;\n }\n\n if (!this.prefs().readyToOrder) {\n this.showCartMessage(this.prefs().textSelectOptions, true);\n\n return;\n }\n\n if (this.stock && this.stock < this.prefs().selectedQuantity) {\n this.showCartMessage(this.prefs().textStockLimit, true);\n\n return;\n }\n\n this.setPref('processingRequest', true);\n button.startProcess();\n\n this.showProgressBar();\n\n const addToCartBtnPrefs = button.prefs();\n const amount = this.getEProductAmount();\n\n submitFormJson(addToCartBtnPrefs.addToCartUrl, {\n pid: this.prefs().currentProductId || addToCartBtnPrefs.pid,\n quantity: this.prefs().selectedQuantity || addToCartBtnPrefs.selectedQuantity,\n // @ts-ignore\n options: this.getSelectedProductOptions(),\n childProducts: this.prepareChildProducts(this.prefs().bundledProducts),\n amount: amount > 0 ? amount.toString() : '',\n ...eVoucherData\n }).then((response) => {\n this.setPref('processingRequest', false);\n this.postAddProduct(response);\n\n button.stopProcess();\n this.hideProgressBar();\n })\n .catch(() => {\n this.setPref('processingRequest', false);\n button.stopProcess();\n this.hideProgressBar();\n\n this.showCartMessage(this.prefs().textNetworkError, true);\n });\n }\n\n /**\n * @description Action after success add to cart.\n * If product type is `gift-certificate` - no changes to base flow\n * If product type is `e-voucher`:\n * In case if no error - trying to save e-voucher data to PLI on server\n * In case of saving e-voucher data error - removes PLI from cart\n * @param {object} response server response\n * @returns {void}\n */\n postAddProduct(response) {\n if (this.prefs().eproductType !== 'e-voucher') {\n super.postAddProduct(response);\n\n return;\n }\n\n if (response.eVoucherFormErrors) {\n this.getById('eVoucherDataForm', eVoucherDataForm => {\n eVoucherDataForm.onSubmitted(response);\n });\n\n return;\n }\n\n super.postAddProduct(response);\n }\n }\n\n return EProductAddToCartMixin;\n}\n","// @ts-nocheck\nimport { submitFormJson } from 'widgets/toolbox/ajax';\n\n/**\n * @typedef {ReturnType<typeof import('widgets/product/AddToCartMixin').default>} AddToCartMixin\n * @typedef {ReturnType<typeof import('widgets/global/ProcessButton').default>} ProcessButton\n */\n\n/**\n * @description just added product to cart mixin widget\n * @param {AddToCartMixin} AddToCartMixin Base widget for extending\n * @returns {typeof EProductJustAddedProductToCartMixin} ProductDetail class\n */\nexport default function (AddToCartMixin) {\n class EProductJustAddedProductToCartMixin extends AddToCartMixin {\n prefs() {\n return {\n removeProductUrl: '',\n eproductType: 'gift-certificate',\n ...super.prefs()\n };\n }\n\n /**\n * @description Add product to cart depending on e-product type\n * If e-product type is `e-voucher`, validates e-voucher data form and in case if form is not valid - not performing add to cart action\n * @param {button} button add to cart button\n * @returns {void}\n */\n addToCart(button) {\n const addToCartBtnPrefs = button.prefs();\n\n if (!addToCartBtnPrefs.justAddedRecommendationAddToCart) {\n this.validateAndSubmit(button, this.doAddToCart);\n\n return;\n }\n\n this.validateAndSubmit(button, this.addJustAddedProductRecommendation);\n }\n\n /**\n * @description Action after success add to cart.\n * If product type is `gift-certificate` - no changes to base flow\n * If product type is `e-voucher`:\n * In case if no error - trying to save e-voucher data to PLI on server\n * In case of saving e-voucher data error - removes PLI from cart\n * @param {object} response server response\n * @returns {void}\n */\n postAddProduct(response) {\n if (this.prefs().eproductType === 'e-voucher' && response.eVoucherFormErrors) {\n this.getById('eVoucherDataForm', eVoucherDataForm => {\n eVoucherDataForm.onSubmitted(response);\n });\n\n return;\n }\n\n if (response.justAddedProductCart && !this.isEProductAddedFromWishlist(response.cart, response.pid)) {\n this.showJustAddedProductCart(response);\n\n if (!response.error && response.subscriptionUUID) {\n this.eventBus().emit('added.subscription.product.line.item');\n }\n\n if (response.availability) {\n this.postAddProductAvailability(response);\n }\n } else {\n this.showMiniCart(response);\n }\n }\n\n /**\n * @description Add Linked Subscription data to request\n * @param {object} params request\n */\n addLinkedSubscriptionObj(params) {\n this.eachChild((child) => {\n if (child.prefs().isLinkedSubscription) {\n child.getById('selectSubscriptionProduct', (subscriptionProduct) => {\n if (subscriptionProduct.getValue() === 'on') {\n params.subscriptionPidObj = JSON.stringify({\n pid: child.prefs().linkedSubscriptionId,\n qty: 1\n });\n }\n });\n }\n });\n }\n\n /**\n * @description Method, which sends a real request for add e-product to cart\n * Includes amount of e-product, chosen by customer\n * @param {button} button add to cart button\n * @param {object} eVoucherData e-voucher form data if exists\n * @returns {void}\n */\n doAddToCart(button, eVoucherData = {}) {\n if (this.prefs().processingRequest) {\n return;\n }\n\n if (!this.prefs().readyToOrder) {\n this.showCartMessage(this.prefs().textSelectOptions, true);\n\n return;\n }\n\n if (this.stock && this.stock < this.prefs().selectedQuantity) {\n this.showCartMessage(this.prefs().textStockLimit, true);\n\n return;\n }\n\n this.setPref('processingRequest', true);\n button.startProcess();\n\n this.showProgressBar();\n\n const addToCartBtnPrefs = button.prefs();\n const amount = this.getEProductAmount();\n\n const params = {\n pid: this.prefs().currentProductId || addToCartBtnPrefs.pid,\n quantity: this.prefs().selectedQuantity || addToCartBtnPrefs.selectedQuantity,\n // @ts-ignore\n options: this.getSelectedProductOptions(),\n childProducts: this.prepareChildProducts(this.prefs().bundledProducts),\n amount: amount > 0 ? amount.toString() : '',\n ...eVoucherData\n };\n\n this.addLinkedSubscriptionObj(params);\n\n submitFormJson(addToCartBtnPrefs.addToCartUrl, params).then((response) => {\n this.setPref('processingRequest', false);\n this.postAddProduct(response);\n\n button.stopProcess();\n this.hideProgressBar();\n })\n .catch(() => {\n this.setPref('processingRequest', false);\n button.stopProcess();\n this.hideProgressBar();\n\n this.showCartMessage(this.prefs().textNetworkError, true);\n });\n }\n\n /**\n * @description checks that is idea product\n *\n * @param {object} response - result of the adding to cart call\n * @param {object} response.cart - cart model\n * @param {string} response.pid - added product identifier\n * @returns {boolean} result\n */\n isIdeaProduct(response) {\n const { pid, cart } = response;\n\n const productModel = cart.items.find(item => item.id === pid);\n\n return productModel && productModel.isIdea;\n }\n\n showMiniCart(response) {\n if (!response.error && response.cart) {\n this.emit('productadded');\n const cartModel = response.cart;\n\n cartModel.showMinicart = this.prefs().showMinicartOnProductAdd;\n this.eventBus().emit('product.added.to.cart', cartModel, this);\n\n if (this.prefs().showAlertOnProductAdd) {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'addedtocart' does not exist on type '{ q... Remove this comment to see the full error message\n const accessibilityAlert = this.prefs().accessibilityAlerts.addedtocart;\n\n this.eventBus().emit('alert.show', {\n accessibilityAlert\n });\n }\n }\n\n if (response.error || this.prefs().showMessageOnProductAdd) {\n this.eventBus().emit('product.addedTocart.with.error', response);\n this.showCartMessage(response.message, response.error);\n }\n\n if (response && response.availability) {\n this.postAddProductAvailability(response);\n }\n }\n\n /**\n * @description checks that is product added from wishlist\n * @param {object} cart - cart object\n * @param {string} pid - recently added product id\n * @returns {boolean} result\n */\n isEProductAddedFromWishlist(cart, pid) {\n let result = false;\n\n if (!cart && !cart.items) {\n return result;\n }\n\n const justAddedItems = cart.items.filter((item) => item.id === pid);\n const justAddedItem = justAddedItems.pop();\n\n if (!justAddedItem) {\n return result;\n }\n\n result = (justAddedItem.isEVoucher || justAddedItem.isGiftCard) && justAddedItem.isAddedFromWishList;\n\n return result;\n }\n }\n\n return EProductJustAddedProductToCartMixin;\n}\n","import { submitFormJson } from 'widgets/toolbox/ajax';\n\n/**\n * @typedef {ReturnType<typeof import('core/product/ProductDetail').default>} BaseProductDetail\n * @typedef {InstanceType<ReturnType<typeof import('widgets/forms/InputStepper').default>>} InputStepper\n * @typedef {InstanceType<ReturnType<typeof import('core/forms/InputTextTypeNumber').default>>} inputTextTypeNumber\n */\n\n/**\n * @param {BaseProductDetail} BaseProductDetail Base widget for extending\n * @returns {typeof EProductProductDetail} EProductProductDetail class\n */\n\nexport default function (BaseProductDetail) {\n /**\n * @category widgets\n * @subcategory product\n * @class EProductProductDetail\n * @augments BaseProductDetail\n * @classdesc Represents EProductProductDetail component\n */\n\n class EProductProductDetail extends BaseProductDetail {\n init() {\n super.init();\n this.otherAmountSelected = false;\n }\n\n /**\n * @description Validate eProduct forms\n * @param {object} button Dom element\n * @param {object} cb Callback function\n * @returns {void}\n */\n validateAndSubmit(button, cb) {\n const customAmountInput = this.getById('otherAmount', (/** @type {inputTextTypeNumber} */ customAmount) => customAmount);\n const eVoucherDataForm = this.getById('eVoucherDataForm', (/** @type {eVoucherDataForm} */ eVoucherData) => eVoucherData);\n const pass1 = customAmountInput.shown ? customAmountInput.validate() : true;\n const pass2 = eVoucherDataForm ? eVoucherDataForm.validate() : true;\n\n if (pass1 && pass2) {\n if (eVoucherDataForm) {\n cb.bind(this, button, eVoucherDataForm.getFormFields())();\n } else {\n cb.bind(this, button)();\n }\n }\n }\n\n /**\n * @description Get eProduct amount\n * @param {object} button Dom element\n * @param {object} cb Callback function\n * @returns {void}\n */\n getEProductAmount() {\n let amount = 0;\n\n this.getById('otherAmount', (/** @type {inputTextTypeNumber} */otherAmount) => {\n const otherAmountValue = otherAmount.getValue();\n\n amount = otherAmountValue ? parseInt(otherAmountValue, 10) : 0;\n });\n\n if (!amount) {\n this.getById('eproductAmount', (/** @type {select} */eproductAmount) => {\n amount = eproductAmount.getValue();\n });\n }\n\n return amount;\n }\n\n /**\n * @description initial updateProduct handler\n * @param {object} updateBtn Response object\n * @returns {void}\n */\n updateProduct(updateBtn) {\n this.validateAndSubmit(updateBtn, this.doUpdateProduct);\n }\n\n /**\n * @description Update line item\n * @param {object} updateBtn Response object\n * @param {object} eVoucherData eVoucher form\n * @returns {Promise<object>} Promise object represents server response for product updating\n */\n doUpdateProduct(updateBtn, eVoucherData = {}) {\n const productOption = this.prefs().productOptions[0];\n const selectedOptions = this.getSelectedProductOptions();\n const isSelectedOptionsValid = this.validateProductOptions(selectedOptions);\n\n if (!isSelectedOptionsValid) {\n return Promise.resolve(null);\n }\n\n const amount = this.getEProductAmount();\n\n return submitFormJson(\n updateBtn.ref('self').attr('data-update-url'),\n {\n pid: this.prefs().currentProductId || updateBtn.prefs().pid,\n quantity: this.prefs().selectedQuantity || updateBtn.ref('self').attr('data-selected-quantity') || 1,\n uuid: updateBtn.ref('self').attr('data-uuid'),\n amount: amount > 0 ? amount.toString() : '',\n ...eVoucherData,\n ...this.getAdditionalProductData(productOption)\n }\n )\n .then((response) => {\n this.afterUpdateProduct(response);\n\n return response;\n })\n .finally(() => {\n this.emit('updated');\n });\n }\n\n changeAmount(selectWidget) {\n const selected = selectWidget.getSelectedOptions();\n const otherAmountSelected = selected && selected.data('eproductCustomOption');\n\n this.getById('otherAmount', (/** @type {inputTextTypeNumber} */otherAmount) => {\n this.otherAmountSelected = otherAmountSelected;\n otherAmount[otherAmountSelected ? 'show' : 'hide']();\n otherAmount.setValue('', true);\n otherAmount.setRequired(false);\n\n if (otherAmountSelected) {\n otherAmount.setRequired(true);\n otherAmount.focus();\n }\n });\n }\n }\n\n return EProductProductDetail;\n}\n","import { submitFormJson } from 'widgets/toolbox/ajax';\n\n/**\n * @typedef {ReturnType<typeof import('widgets/product/AddToCartMixin').default>} BaseAddToCartMixin\n * @typedef {InstanceType<ReturnType<typeof import('widgets/global/Button').default>>} button\n */\n\n/**\n * @param {BaseAddToCartMixin} BaseAddToCartMixin Base widget for extending\n * @returns {typeof PlusProductAddToCartMixin} PlusProductAddToCartMixin class\n */\n\nexport default function (BaseAddToCartMixin) {\n /**\n * @category widgets\n * @subcategory product\n * @class EProductAddToCartMixin\n * @augments BaseAddToCartMixin\n * @classdesc Represents EProductAddToCartMixin component\n */\n\n class PlusProductAddToCartMixin extends BaseAddToCartMixin {\n prefs() {\n return {\n ...super.prefs()\n };\n }\n\n /**\n * @description Add product to cart\n * @param {button} button add to cart button\n * @returns {void}\n */\n addToCart(button) {\n if (this.prefs().processingRequest) {\n return;\n }\n\n this.setPref('processingRequest', true);\n button.startProcess();\n\n this.showProgressBar();\n\n const addToCartBtnPrefs = button.prefs();\n\n submitFormJson(addToCartBtnPrefs.addToCartUrl, {\n pid: this.prefs().pid,\n quantity: this.prefs().selectedQuantity\n }).then((response) => {\n this.setPref('processingRequest', false);\n this.postAddProduct(response);\n\n button.stopProcess(this.prefs().addedToCartLabel);\n this.hideProgressBar();\n\n this.getById('addToCartSticky', addToCartBtn => {\n addToCartBtn.stopProcess(this.prefs().addedToCartLabel);\n });\n })\n .catch(() => {\n this.setPref('processingRequest', false);\n button.stopProcess();\n this.hideProgressBar();\n\n this.showCartMessage(this.prefs().textNetworkError, true);\n });\n }\n }\n\n return PlusProductAddToCartMixin;\n}\n","import localStorageWrapper from 'widgets/toolbox/localStorageWrapper';\n\n/**\n * @typedef {ReturnType<typeof import('core/product/ProductDetail').default>} ProductDetail\n */\n\n/**\n * @param {ProductDetail} ProductDetail Base widget for extending\n * @returns {typeof PlusProductDetail} plusProductDetail class\n */\n\nexport default function (ProductDetail) {\n /**\n * @category widgets\n * @subcategory product\n * @class PlusProductDetail\n * @augments ProductDetail\n * @classdesc Represents PlusProductDetail component\n */\n\n class PlusProductDetail extends ProductDetail {\n init() {\n super.init();\n this.eventBus().on('remove.product.line.item', 'updateAddToCartBtn');\n }\n\n updateAddToCartBtn() {\n const itemIds = localStorageWrapper.getItem('cartItemIds');\n\n if (!this.prefs().isCustomerSubscribed && itemIds && !itemIds.includes(this.prefs().pid)) {\n this.getById('addToCart', addToCartBtn => {\n addToCartBtn.enable();\n addToCartBtn.setText(this.prefs().addToCartLabel);\n });\n\n this.getById('addToCartSticky', addToCartBtn => {\n addToCartBtn.enable();\n addToCartBtn.setText(this.prefs().addToCartLabel);\n });\n }\n }\n }\n\n return PlusProductDetail;\n}\n","import { scrollWindowTo } from 'widgets/toolbox/scroll';\nimport { getContentByUrl, getJSONByUrl } from 'widgets/toolbox/ajax';\nimport { timeout } from 'widgets/toolbox/util';\nimport { showErrorLayout } from 'widgets/toolbox/util';\nimport { submitFormJsonWithAbort } from 'widgets/toolbox/ajax';\n\nconst CLICK_EVENT_ID = 'navigation.click.event';\nconst GTM_EVENT_NAME = 'data-layer-event';\nconst GTM_LABEL_SELECTOR = 'gtmEventLabel';\n\nconst REVIEWS_REF_ID = 'reviews';\n/**\n * @typedef {ReturnType<typeof import('widgets/product/ProductDetail').default>} ProductDetailBase\n * @typedef {InstanceType<ReturnType<typeof import('core/product/Availability').default>>} availability\n * @typedef {InstanceType<ReturnType<typeof import('widgets/forms/InputStepper').default>>} InputStepper\n * @typedef {InstanceType<ReturnType<typeof import('widgets/global/Label').default>>} Label\n */\n\n/**\n * @description ProductDetail widget\n * @param {ProductDetailBase} ProductDetailBase Base widget for extending\n * @returns {typeof ProductDetail} ProductDetail class\n */\n\nexport default function (ProductDetailBase) {\n /**\n * @class ProductDetail\n * @augments ProductDetailBase\n */\n class ProductDetail extends ProductDetailBase {\n prefs() {\n return {\n addToCartMsgSticky: 'addToCartMsgSticky',\n addToCartStickyHeader: 'add-to-cart-sticky-header',\n ingredientsSection: 'ingredients-section',\n descriptions: 'descriptions',\n pdpSlots: ['viewDetail', 'pdpBottom1', 'pdpBottom2', 'pdpBottom3', 'pdpBottom4'],\n storeChangedUrl: '',\n slotsUrl: '',\n ...super.prefs(),\n productOptions: []\n };\n }\n\n init() {\n super.init();\n\n this.handleProductAvailability();\n this.updateQuantityWithLimit();\n this.loadAnalytics();\n\n this.eventBus().on('preferredstore.selected', 'onPreferredStoreSelected');\n }\n\n /**\n * @description loads gtm analytics on page load\n */\n loadAnalytics() {\n this.eventBus().emit('product.details.open', [this.ref('self')]);\n }\n\n /**\n * @description Handles OOS product logic\n * @returns {void}\n */\n handleProductAvailability() {\n this.has('productRecommendations', productRecommendations => {\n productRecommendations[\n this.isProductAvailableForHomeDelivery() ? 'show' : 'hide'\n ]();\n });\n }\n\n /**\n * @description Update quantity on inputStepper with limits\n */\n updateQuantityWithLimit() {\n this.getById('quantity', (quantity) => {\n quantity.setInputValue(quantity.filterInput(quantity.currentValue), false);\n });\n }\n\n /**\n * @description Update Product View\n * @param {any} product productModel\n * @returns {void}\n */\n updateProductView(product) {\n super.updateProductView(product);\n\n this.updateRecommendations(product);\n\n this.getById(this.prefs().addToCartMsgSticky, (addToCartMsgSticky) => {\n addToCartMsgSticky.hide();\n });\n\n this.getById(this.prefs().addToCartStickyHeader, (addToCartStickyHeader) => {\n addToCartStickyHeader.setText(product.productName);\n });\n\n this.handleProductAvailability();\n this.renderUnit(product);\n this.renderLargeItemBadge(product);\n\n // Due to multiplee sub-element async rendering need to fire an event in a next timer tick\n timeout(() => this.emit('productviewupdated'));\n }\n\n /**\n * @description Update PDP recommendation slots\n * @param {object} product product model from response\n * @returns {void}\n */\n updateRecommendations(product) {\n getContentByUrl(this.prefs().slotsUrl, {\n pid: product.id\n }).then(response => {\n if (!response) {\n return;\n }\n\n const wrapper = document.createElement('div');\n\n wrapper.innerHTML = response;\n\n this.prefs().pdpSlots.forEach(slot => {\n this.has(slot, slotRef => {\n const slotContentFromResponse = wrapper.querySelector('#' + slot);\n\n if (slotContentFromResponse) {\n slotRef.empty().prepend(slotContentFromResponse.innerHTML);\n }\n });\n });\n\n wrapper.remove();\n });\n }\n\n /**\n * @description Update product BazaarVoice reviews block\n * @param {object} product Product object\n * @returns {Promise<void|null>} Promise object represents ratings rendering result\n */\n updateRatings(product) {\n // update ratings summary\n this.has('ratingSummary', ratingSummary => {\n ratingSummary.data('bvProductid', product.id);\n const productRedirectUrl = ratingSummary.data('bvRedirectUrl');\n\n if (productRedirectUrl) {\n ratingSummary.data('bvRedirectUrl', product.link);\n }\n });\n\n // update product reviews\n this.has('reviews', reviews => {\n reviews.data('bvProductid', product.id);\n });\n\n const ratings = [1, 2, 3, 4, 5].map((currentValue, index) => {\n const starObj = {\n position: index > 0 ? index * 18 : 0\n };\n\n if (product.rating >= currentValue) {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'isFull' does not exist on type '{ positi... Remove this comment to see the full error message\n starObj.isFull = true;\n } else if ((product.rating % 1 > 0) && (Math.ceil(product.rating) >= currentValue)) {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'isHalf' does not exist on type '{ positi... Remove this comment to see the full error message\n starObj.isHalf = true;\n } else {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'isEmpty' does not exist on type '{ posit... Remove this comment to see the full error message\n starObj.isEmpty = true;\n }\n\n return starObj;\n });\n\n this.has('productRatings', (productRatings) => {\n const link = productRatings.data('addProductLinkToRatingsLink')\n ? product.selectedProductUrl\n : '';\n\n this.render('productRatingsPDPTemplate', { product, ratings, link }, productRatings);\n });\n\n return Promise.resolve(null);\n }\n\n /**\n * @description Render product availability\n * @param {object} product Product object\n * @returns {void}\n */\n renderAvailability(product) {\n let message = '';\n let availabilityClass = '';\n\n if (product.availability\n && product.availability.messages\n && (product.readyToOrder || product.isInaccessibleVariant)\n ) {\n message = product.availability.messages.join('');\n availabilityClass = product.availability.class;\n }\n\n if (product.availability.isReachedLimit) {\n message = product.availability.inStockMsg.join('');\n }\n\n this.has('productAvailabilityMsg', productAvailabilityMsg => {\n productAvailabilityMsg.hide();\n });\n\n this.getById('availability', (/** @type {availability} */availabilityLabel) => {\n availabilityLabel.setAvailability(product.pdpAvailability || {});\n this.eventBus().emit('update.availability');\n availabilityLabel.render('template', {\n message: message,\n class: availabilityClass,\n backInStockSubscriptionEnabled: product.backInStockSubscription?.isEnabled,\n pdpAvailability: product.pdpAvailability\n }, availabilityLabel.ref('container'));\n });\n }\n\n /**\n * @description Render product unit\n * @param {object} product Product object\n * @returns {void}\n */\n renderUnit(product) {\n this.getById('priceUnit', (/** @type {Label} */priceUnit) => {\n priceUnit.setText(product.pricePerUOM);\n });\n }\n\n /**\n * @description Render large item badge\n * @param {object} product Product object\n * @returns {void}\n */\n renderLargeItemBadge(product) {\n this.getById('largeItemBadge', (largeItemBadge) => {\n largeItemBadge.render('template', { product }, largeItemBadge.ref('container'));\n });\n }\n\n /**\n * @description Scroll to Reviews section\n * @returns {void}\n */\n scrollToReviews() {\n this.has(REVIEWS_REF_ID, reviews => scrollWindowTo(reviews.get(), true));\n }\n\n /**\n * @description Update availability for Click & Collect and Store on store changed\n * @returns {void}\n */\n onPreferredStoreSelected() {\n const storeChangedUrl = this.prefs().storeChangedUrl;\n\n if (storeChangedUrl) {\n getJSONByUrl(storeChangedUrl, {\n pid: this.prefs().currentProductId || this.prefs().pid,\n quantity: this.prefs().selectedQuantity\n }, false).then(response => {\n const product = response.product;\n\n this.renderAvailability(product);\n this.renderQuantities(product);\n this.callIfExists('renderAddToCart', response.product);\n });\n }\n }\n\n /**\n * @description Indicates if product is available\n * @returns {boolean} result\n */\n isProductAvailableForHomeDelivery() {\n let productAvailable = true;\n\n const availabilityObject = this.getProductAvailabilityObject();\n\n if (availabilityObject) {\n productAvailable = !!availabilityObject.available;\n }\n\n return productAvailable;\n }\n\n /**\n * @description Render product quantity\n * @param {object} product Product object\n * @returns {void}\n */\n updateIngredients(product) {\n this.getById(this.prefs().descriptions, (descriptions) => {\n descriptions.getById(this.prefs().ingredientsSection, (ingredientsSection) => {\n ingredientsSection.ref('ingredientsText').empty();\n\n if (product.ingredients) {\n ingredientsSection.ref('ingredientsText').append(product.ingredients);\n }\n });\n });\n }\n\n /**\n * @description trigger change from different widgets (swatch, select)\n * Saves `selectWidget.id` into a property for further global notifications etc.\n * Later, when triggering event, `selectWidget.id` will be analyzed in order to send with event correct data.\n * @param {InputStepper} selectWidget widget\n * @returns {Promise<object|null>} Promise object represents server response with attribute changing result\n */\n changeAttribute(selectWidget) {\n this.changeAttributeID = selectWidget.id;\n const selected = selectWidget.getSelectedOptions();\n\n if (!selected || selected.data('attrIsSelected')) {\n return Promise.resolve(null);\n }\n\n const requestObject = submitFormJsonWithAbort(selected.data('attrUrl'), undefined, 'GET', true);\n const isQuantityUpdate = selectWidget.data('quantityUpdate');\n\n this.changeAttributeRequests.push(requestObject);\n\n this.eventBus().emit('init.attribute.change');\n\n Promise.all(this.changeAttributeRequests.map(req => req.promise)).then(() => {\n this.eventBus().emit('finalize.attribute.change');\n });\n\n // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'.\n return requestObject.promise\n .then((response) => {\n if (isQuantityUpdate) {\n this.afterChangeQuantity(response);\n } else {\n this.afterChangeAttribute(response);\n }\n\n return response;\n })\n .catch(e => {\n if (e.name === 'AbortError') {\n return;\n }\n\n showErrorLayout(e);\n })\n .finally(() => {\n const index = this.changeAttributeRequests.indexOf(requestObject);\n\n if (index > -1) {\n this.changeAttributeRequests.splice(index, 1);\n }\n });\n }\n\n /**\n * @description Render product quantity\n * @param {object} product Product object\n * @returns {void}\n */\n renderQuantities(product) {\n const availability = product.availability;\n const response = product.quantities;\n\n if (!response || !availability) { return; }\n\n this.getById('quantity', (quantity) => {\n quantity.render(\n 'template',\n {\n attr: {\n currentQty: response.currentValue,\n max: response.max,\n min: response.min,\n step: response.step\n },\n isOutOfStock: (availability && availability.isOutOfStock) || false\n },\n quantity.ref('container')\n ).then(function () {\n quantity.update();\n quantity.setPref('attrUrl', response.actionUrl);\n });\n });\n }\n\n /**\n * @description Prepares product specification to rendering\n * @param {object} product - Product object\n * @returns {void}\n */\n prepareProductSpecification(product) {\n const { specifications } = product;\n\n (specifications || []).forEach((specification) => {\n if ((specification.id === 'sustVegan' || specification.id === 'sustVeget')) {\n specification.sustVegan = true && specification.value;\n } else if (specification.id === 'FSCIcon') {\n specification.FSCIcon = true && specification.value;\n } else if (specification.id === 'hazardousIcons') {\n specification.hazardousIcons = true;\n } else if (specification.id === 'washcare') {\n specification.washcare = true;\n } else {\n specification.default = true;\n }\n });\n }\n\n /**\n * @description Prepares product to description rendering\n * @param {object} product - Product object\n * @returns {void}\n */\n prepareProductDetailAttributes(product) {\n this.prepareProductSpecification(product);\n }\n\n /**\n * @description Render product description\n * @param {object} product - Product object\n * @returns {void}\n */\n renderProductDescriptions(product) {\n this.prepareProductDetailAttributes(product);\n\n this.getById(this.prefs().descriptions, descriptionsAccordion => {\n descriptionsAccordion.render(\n 'template',\n product,\n descriptionsAccordion.ref('container')\n // @ts-expect-error ts-migrate(2551) FIXME: Property 'reinit' does not exist on type 'Widget'.... Remove this comment to see the full error message\n ).then(() => {\n if (product && product.ingredients) {\n this.updateIngredients(product);\n }\n\n descriptionsAccordion.reinit();\n });\n });\n }\n\n /**\n * @description After change quantity handler\n * @param {object} response response object\n * @returns {void}\n */\n afterChangeQuantity(response) {\n if (response && response.product) {\n if (!this.prefs().disableHistory) {\n this.updateHistoryState(response.product);\n }\n\n this.updateProductQuantityView(response.product);\n\n this.triggerChangeAttributeEvent(response);\n }\n }\n\n /**\n * @description Update Product Quantity View\n * @param {any} product productModel\n * @returns {void}\n */\n updateProductQuantityView(product) {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentGtmInfo' does not exist on type '... Remove this comment to see the full error message\n this.currentGtmInfo = product.gtmInfo;\n\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'stock' does not exist on type 'ProductDe... Remove this comment to see the full error message\n this.stock = product.availability && product.availability.stock ? product.availability.stock : null;\n\n this.setPref('selectedQuantity', product.selectedQuantity);\n this.setPref('readyToOrder', product.readyToOrder);\n\n this.setGtmInfo(product);\n\n this.renderQuantities(product);\n this.renderPrice(product);\n this.renderAvailability(product);\n this.renderPromotions(product);\n }\n\n /**\n * @description Click Event handler\n * @listens dom#click\n * @param {HTMLElement} el Source of event\n * @param {Event} event Event object\n * @returns {void}\n */\n showRelatedIdeasClick(el) {\n this.eventBus().emit(CLICK_EVENT_ID, {\n event: GTM_EVENT_NAME,\n eventCategory: 'Key interactions',\n eventAction: 'Show ideas',\n eventLabel: el.data(GTM_LABEL_SELECTOR)\n });\n }\n\n /**\n * @description Get product availability data\n * @returns {object|undefined} product availability object\n */\n getProductAvailabilityObject() {\n let result;\n\n this.getById('availability', (/** @type {availability} */availability) => {\n const availabilityObject = availability.getAvailability();\n\n if (typeof availabilityObject === 'string') {\n result = JSON.parse(availabilityObject);\n } else {\n result = availabilityObject;\n }\n });\n\n return result;\n }\n\n /**\n * @description Get similar products carousel header\n * @returns {string} similar products carousel header\n */\n getSimilarProductsCarouselHeader() {\n const availabilityObject = this.getProductAvailabilityObject();\n let topSlotText;\n\n if (availabilityObject && availabilityObject.topSlotRef) {\n switch (availabilityObject.topSlotRef) {\n case 'ccStoreAvailability':\n topSlotText = this.prefs().ccStoreTopSlotAvailabilityText;\n break;\n case 'ccAvailability':\n topSlotText = this.prefs().ccTopSlotAvailabilityText;\n break;\n case 'oosAvailability':\n topSlotText = this.prefs().oosTopSlotAvailabilityText;\n break;\n default:\n break;\n }\n }\n\n return topSlotText;\n }\n\n /**\n * @description Triggers global event after `afterChangeAttribute` method executed.\n * @param {object} response response object\n * @returns {void}\n */\n triggerChangeAttributeEvent(response) {\n if (this.changeAttributeID && this.changeAttributeID.indexOf('attr-') === 0) {\n this.eventBus().emit('product.attribute.select', response.product);\n\n if (response.virtualPageLoad && response.analyticsPageData) {\n this.eventBus().emit('virtual.page.load', response.analyticsPageData);\n }\n }\n\n super.triggerChangeAttributeEvent(response);\n }\n }\n\n return ProductDetail;\n}\n","/**\n * @typedef {typeof import('widgets/Widget').default} Widget\n * @typedef {InstanceType<ReturnType<typeof import('core/product/ProductDetail').default>>} productDetail\n */\n\n/**\n * @param {Widget} Widget Base widget for extending\n * @returns {typeof ProductDetailContainer} ProductDetailContainer class\n */\n\nexport default function (Widget) {\n /**\n * @class ProductDetailContainer\n * @augments Widget\n */\n\n class ProductDetailContainer extends Widget {\n prefs() {\n return {\n classesStandardHeader: 'm-standard_header',\n similarProductsCarouselPlace: 'none',\n ...super.prefs()\n };\n }\n\n /**\n * @description Widget intitalization logic\n * @returns {void}\n */\n init() {\n super.init();\n this.handleProductAvailability();\n this.eventBus().on('update.availability', 'handleProductAvailability');\n }\n\n /**\n * @description Handles OOS product logic\n * @returns {void}\n */\n handleProductAvailability() {\n const productDetail = /** @type {productDetail} */ (this.getById('productDetail', widget => widget));\n const availabilityObject = productDetail.getProductAvailabilityObject();\n const headerText = productDetail.getSimilarProductsCarouselHeader();\n\n if (!headerText) {\n this.hideTopSlot();\n this.hideBottomSlot();\n } else if (this.prefs().similarProductsCarouselPlace === 'top') {\n this.showTopSlot(headerText);\n this.hideBottomSlot();\n } else if (this.prefs().similarProductsCarouselPlace === 'bottom') {\n this.hideTopSlot();\n this.showBottomSlot(headerText);\n } else if (!availabilityObject.available) {\n if (availabilityObject.availableCC) {\n this.showTopSlot(headerText, true);\n this.showBottomSlot(headerText, true);\n } else {\n this.showTopSlot(headerText);\n this.hideBottomSlot();\n }\n }\n }\n\n hideTopSlot() {\n this.has('topSlotsUp', topSlot => topSlot.hide());\n }\n\n showTopSlot(headerText = '', headerOnly = false) {\n this.has('topSlotHeaderUp', topSlotHeader => {\n topSlotHeader.prop('innerHTML', headerText || '');\n });\n this.has('topSlotCarouselUp', topSlotCarousel => {\n topSlotCarousel[headerOnly ? 'hide' : 'show']();\n });\n this.has('topSlotsUp', topSlot => {\n topSlot[headerText ? 'show' : 'hide']();\n });\n }\n\n hideBottomSlot() {\n this.getById('productDetail', productDetail => {\n productDetail.has('topSlots', topSlot => topSlot.hide());\n });\n }\n\n showBottomSlot(headerText = '', standardHeader = false) {\n this.getById('productDetail', productDetail => {\n productDetail.has('topSlotHeader', topSlotHeader => {\n topSlotHeader.prop('innerHTML', headerText || '');\n topSlotHeader[standardHeader ? 'hide' : 'show']();\n });\n productDetail.has('topSlots', topSlot => {\n topSlot.toggleClass(this.prefs().classesStandardHeader, !!standardHeader);\n topSlot[headerText ? 'show' : 'hide']();\n });\n });\n }\n\n /**\n * @description Handle product view update\n * @returns {void}\n */\n onProductViewUpdated() {\n this.handleProductAvailability();\n }\n }\n\n return ProductDetailContainer;\n}\n","/* eslint-disable sonarjs/cognitive-complexity */\n\nconst IMAGE_MODE_ZOOM = 'zoom';\nconst IMAGE_MODE_CAROUSEL = 'carousel';\nconst GLOBAL_DIALOG = 'm-has_dialog';\n\nconst keyCode = Object.freeze({\n SPACE: 32,\n ENTER: 13\n});\n\n/**\n * @typedef {ReturnType<typeof import('widgets/product/ProductImages').default>} ProductImagesBase\n */\n\n/**\n * @description ProductImages widget\n * @param {ProductImagesBase} ProductImagesBase Base widget for extending\n * @returns {typeof ProductImages} ProductImages class\n */\n\nexport default function (ProductImagesBase) {\n /**\n * @class ProductImages\n * @augments ProductImagesBase\n */\n class ProductImages extends ProductImagesBase {\n /**\n * @param {object} product - product object\n */\n renderImages(product) {\n if (product.video && product.images && product.images.large) {\n const imageLength = product.images.large.length;\n\n product.video = product.video.map(video => {\n video.index += imageLength;\n\n return video;\n });\n }\n\n super.renderImages(product);\n }\n\n /**\n * @description Does all the work to init photoswipe and show it\n * @param {typeof import('photoswipe')} PhotoSwipe - PhotoSwipe library class\n * @param {typeof import('photoswipe/dist/photoswipe-ui-default')} PhotoSwipeUI - PhotoSwipeUI_Default library class\n * @param {{originalWidth: string, originalHeight:string}} originalImageSize Object with original image width and height\n * @param {Number} page - Start image number if present, 0 by default\n */\n initAndShowZoom(PhotoSwipe, PhotoSwipeUI, { originalWidth, originalHeight }, page = null) {\n const pswpElement = document.querySelectorAll('.pswp')[0];\n const imgCarousel = this.getById('imagesCarousel', (/** @type {carousel} */ carousel) => carousel);\n const thumbnailsCarousel = this.getById('imagesThumbnails', (/** @type {carousel} */ thumbnails) => thumbnails);\n\n if (!imgCarousel || !(pswpElement instanceof HTMLElement)) {\n return;\n }\n\n const carouselImages = this.getCarouselImages();\n\n if (!carouselImages) {\n return;\n }\n\n pswpElement.setAttribute('data-tau', 'zoom_dialog');\n\n const items = Array.from(carouselImages)\n .filter(element => element.dataset.originalSrc)\n .map(element => {\n return {\n src: element.dataset.originalSrc || element.src,\n w: originalWidth || element.naturalWidth,\n h: originalHeight || element.naturalHeight\n };\n });\n\n const carouselSlideHTML = imgCarousel.ref('elemCarouselTrack').get().querySelectorAll('.js-slide-html');\n\n Array.from(carouselSlideHTML)\n .forEach(element => {\n if (element.innerHTML) {\n items.push({\n html: element.innerHTML\n });\n }\n });\n\n const prefs = this.prefs();\n\n if (!('zoomCloseElClasses' in prefs)) {\n Object.assign(prefs, {\n thumbnailsPerFrame: 4,\n thumbnailsZoomClass: 'm-zoomed-in',\n classesGlobalDialog: GLOBAL_DIALOG,\n zoomLoop: false,\n zoomClickToCloseNonZoomable: false,\n zoomCloseElClasses: '',\n closeOnScroll: false,\n predefinedHeight: 1773,\n predefinedWidth: 1333,\n barsSizeBottom: 'auto',\n barsSizeTop: 24,\n showHideOpacity: true,\n ...super.prefs()\n });\n }\n\n const options = {\n index: page || 0,\n barsSize: { top: prefs.barsSizeTop, bottom: prefs.barsSizeBottom },\n loop: prefs.zoomLoop,\n history: false,\n clickToCloseNonZoomable: prefs.zoomClickToCloseNonZoomable,\n closeElClasses: prefs.zoomCloseElClasses.split(','),\n closeOnScroll: prefs.closeOnScroll,\n showHideOpacity: prefs.showHideOpacity,\n isClickableElement: function (/** @type {HTMLElement} */ el) {\n return el.tagName === 'A'\n || el.tagName === 'BUTTON';\n }\n };\n\n const gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI, items, options);\n\n gallery.listen('close', () => this.onZoomClosed());\n\n gallery.listen('doubleTap', () => {\n const isZoomIn = gallery.getZoomLevel() === 1; // When double tap event reported we actually have previous state\n\n pswpElement.classList.toggle('pswp--zoomed-in', !isZoomIn);\n });\n\n gallery.listen('beforeChange', () => {\n const currentPage = gallery.getCurrentIndex();\n\n imgCarousel.scrollToPage(currentPage);\n\n if (thumbnailsCarousel) {\n thumbnailsCarousel.markCurrentPage(currentPage).scrollIntoView();\n }\n });\n\n const updateCurrentItem = () => {\n const currentIndex = gallery.getCurrentIndex();\n\n if (currentIndex === 0) {\n gallery.template.classList.add('pswp--first');\n } else {\n gallery.template.classList.remove('pswp--first');\n }\n\n if (currentIndex === (gallery.items.length - 1)) {\n gallery.template.classList.add('pswp--last');\n } else {\n gallery.template.classList.remove('pswp--last');\n }\n\n if (gallery.currItem.html) {\n gallery.template.classList.add('pswp--html');\n } else {\n gallery.template.classList.remove('pswp--html');\n }\n };\n\n gallery.listen('afterInit', updateCurrentItem);\n gallery.listen('afterChange', updateCurrentItem);\n\n const zoomToOriginal = gallery.zoomTo;\n\n gallery.zoomTo = (destZoomLevel, centerPoint, speed, easingFn, updateFn) => {\n if (gallery.currItem.initialZoomLevel) {\n if (destZoomLevel > gallery.currItem.initialZoomLevel) {\n gallery.template.classList.add('pswp--zoomed');\n } else {\n gallery.template.classList.remove('pswp--zoomed');\n }\n }\n\n zoomToOriginal.call(gallery, destZoomLevel, centerPoint, speed, easingFn, updateFn);\n };\n\n // Fix for console errors after destroing closed gallery\n const originalGalleryDestroy = gallery.destroy;\n\n gallery.destroy = () => {\n if (!gallery.destroyed) {\n originalGalleryDestroy.call(gallery);\n gallery.destroyed = true;\n }\n };\n\n gallery.init();\n\n this.gallery = gallery;\n this.imageMode = IMAGE_MODE_ZOOM;\n\n if (thumbnailsCarousel) {\n this.toggleZoomState(true);\n }\n\n this.addGlobalDialogClass();\n this.addFocusTrap();\n }\n\n /**\n * @description Click handler on image from large images carousel\n * @param {Element} elem - an Element where click happens\n * @param {number} page - Clicked image page number should send to gallery\n */\n onImageCarouselPageClicked(elem, page) {\n this.zoom(page);\n }\n\n /**\n * @description Generic method to open zoom popup\n * @param {number} page - Clicked image page number is sending to gallery\n */\n zoom(page = null) {\n this.loadPhotoswipeDependencies().then(([PhotoSwipe, PhotoSwipeUI, originalImageSize]) => {\n this.initAndShowZoom(PhotoSwipe.default, PhotoSwipeUI.default, originalImageSize, page);\n });\n }\n\n /**\n * @description \"Close\" photoswipe popup icon click handler\n * @listens dom#click\n */\n closeZoom() {\n if (this.gallery) {\n this.gallery.close();\n\n const thumbnailsCarousel = this.getById(\n 'imagesThumbnails',\n thumbnails => thumbnails\n );\n\n if (thumbnailsCarousel) {\n thumbnailsCarousel.updateCarouselMetric();\n thumbnailsCarousel.updateCarouselState();\n }\n }\n\n this.eventBus().emit('zoom.closed', {});\n }\n\n /**\n * @description Click handler on image from large images carousel\n * @returns {Promise} - Promise that fulfills when all of the promises passed as an iterable have been fulfilled\n */\n loadPhotoswipeDependencies() {\n return Promise.all([\n import(/* webpackChunkName: 'photoswipe' */'photoswipe'),\n import(/* webpackChunkName: 'photoswipe' */'photoswipe/dist/photoswipe-ui-default.js'),\n this.getOriginalImageSize()\n ]);\n }\n\n /**\n * @description Get URL from data-original-src attribute.\n * Load original image by URL. Get original size.\n * The image element should have data-original-src attribute with original image URL.\n * @returns {Promise} return new Promise with image sizes\n */\n getOriginalImageSize() {\n return new Promise((resolve) => {\n const imgCarousel = this.getById('imagesCarousel', (carousel) => carousel);\n const predefinedSize = {\n originalHeight: this.prefs().predefinedHeight,\n originalWidth: this.prefs().predefinedWidth\n };\n\n if (!imgCarousel) {\n resolve(predefinedSize);\n } else {\n const firstImage = this.getCarouselImages()[0];\n\n if (firstImage.dataset.originalSrc) {\n const img = new Image();\n\n img.addEventListener('load', () => resolve({ originalHeight: img.height, originalWidth: img.width }));\n img.addEventListener('error', () => resolve(predefinedSize));\n img.src = firstImage.dataset.originalSrc;\n } else {\n resolve(predefinedSize);\n }\n }\n });\n }\n\n /**\n * @description Get list of main carousel product images\n * @returns {object} images\n */\n getCarouselImages() {\n const imgCarousel = this.getById('imagesCarousel', (carousel) => carousel);\n const imagesContainer = imgCarousel.ref(imgCarousel.prefs().elemCarouselTrack).get();\n\n return [].slice.call(imagesContainer?.querySelectorAll('img')) || [];\n }\n\n /**\n * @description Enter / space handler to initiate zoom popup\n * @listens dom#keydown\n * @param {Element} _el event source element\n * @param {Event} event event instance if DOM event\n */\n handleKeydown(_el, event) {\n if (event.keyCode === keyCode.ENTER || event.keyCode === keyCode.SPACE) {\n event.preventDefault();\n event.stopPropagation();\n this.zoom();\n }\n }\n\n /**\n * @description Handler to sync main carousel with thumbnails carousel\n * @param {Element} el - event source element\n * @param {Event} page - current page number\n */\n onImageCarouselPageChanged(el, page) {\n this.getById('imagesThumbnails', (carousel) => {\n if (this.imageMode !== IMAGE_MODE_ZOOM) {\n carousel\n .markCurrentPage(page)\n .scrollIntoView();\n }\n });\n }\n\n /**\n * @description Add Global Dialog Class\n */\n addGlobalDialogClass() {\n const html = this.ref('html');\n let classesGlobalDialog;\n\n if (!this.prefs().classesGlobalDialog) {\n classesGlobalDialog = GLOBAL_DIALOG;\n } else {\n classesGlobalDialog = this.prefs().classesGlobalDialog;\n }\n\n if (!html.hasClass(classesGlobalDialog)) {\n html.addClass(classesGlobalDialog);\n }\n }\n\n /**\n * @description Sets image mode / do some DOM modifications after zoom closed\n */\n onZoomClosed() {\n this.toggleZoomState(false);\n\n this.imageMode = IMAGE_MODE_CAROUSEL;\n this.removeGlobalDialogClass();\n\n if (this.backFocusElement) {\n this.backFocusElement = undefined;\n }\n }\n\n /**\n * @description Toggle Zoom state on Thumbnails carousel\n * @param {object} state flag for toggle zoom state\n */\n toggleZoomState(state) {\n let thumbnails = this.getById('imagesThumbnails',\n (thumbnailsCarousel) => thumbnailsCarousel);\n let thumbnailsZoomClass;\n\n if (!thumbnails) {\n thumbnails = this.getById('imagesCarousel', (thumbnailsCarousel) => thumbnailsCarousel);\n }\n\n if (!this.prefs().thumbnailsZoomClass) {\n thumbnailsZoomClass = 'm-zoomed-in';\n } else {\n thumbnailsZoomClass = this.prefs().thumbnailsZoomClass;\n }\n\n thumbnails.ref('self').toggleClass(thumbnailsZoomClass, state);\n }\n\n /**\n * @description Add focus trap functionality in the opened zoom dialog to prevent background elements focusing\n */\n addFocusTrap() {\n this.backFocusElement = document.activeElement instanceof HTMLElement ? document.activeElement : document.body;\n }\n\n /**\n * @description Remove Global Dialog Class\n */\n removeGlobalDialogClass() {\n let classesGlobalDialog;\n\n if (!this.prefs().classesGlobalDialog) {\n classesGlobalDialog = GLOBAL_DIALOG;\n } else {\n classesGlobalDialog = this.prefs().classesGlobalDialog;\n }\n\n this.ref('html').removeClass(classesGlobalDialog);\n }\n }\n\n return ProductImages;\n}\n","/**\n * @typedef {ReturnType<typeof import('widgets/product/ProductSet').default>} ProductSetBase\n * @typedef {InstanceType<ReturnType<typeof import('widgets/product/SetProductDetail').default>>} setProductDetail\n */\n\nimport { getJSONByUrl } from 'widgets/toolbox/ajax';\nimport { scrollWindowTo } from 'widgets/toolbox/scroll';\n\n/**\n * @description ProductSet widget\n * @param {ProductSetBase} ProductSetBase Base widget for extending\n * @returns {typeof ProductSet} SetProductDetail class\n */\n\nexport default function (ProductSetBase) {\n /**\n * @class ProductSet\n * @augments ProductSetBase\n */\n class ProductSet extends ProductSetBase {\n prefs() {\n return {\n productSetInfoUrl: '',\n textShowMore: '',\n textShowLess: '',\n textViewedProductsSm: '',\n textViewedProductsLg: '',\n textViewedProductsAll: '',\n classesAllProducts: 'm-all_products',\n ...super.prefs()\n };\n }\n\n init() {\n super.init();\n\n this.togglePriceTotals(false, true);\n this.initEvents();\n this.updateSetPriceTotal();\n }\n\n /**\n * @description inits global events\n */\n initEvents() {\n this.eventBus().on('after.change.product.set.attribute', 'onChangeAttribute');\n this.eventBus().on('carousel.loaded', 'handleMoreIdeasLink');\n }\n\n /**\n * @description Scroll to Reviews section\n * @returns {void}\n */\n scrollToReviews() {\n this.has('reviews', reviews => scrollWindowTo(reviews.get(), true));\n }\n\n /**\n * @description Update certain page elements on page loading\n * @returns {void}\n */\n handleMoreIdeasLink() {\n this.has('showMoreIdeas', showMoreIdeas => showMoreIdeas.show());\n this.has('showMoreIdeasSecondLink', showMoreIdeasSecondLink => showMoreIdeasSecondLink.show());\n }\n\n /**\n * @description Open Browser print flyout\n * @returns {void}\n */\n print() {\n window.print();\n }\n\n togglePriceTotals(setPriceState, zeroPriceState) {\n this.getById('priceBlock', priceBlock => priceBlock.ref('self').toggle(setPriceState));\n this.ref('totalPriceZero').toggle(zeroPriceState);\n }\n\n /**\n * @description updates price totals\n */\n updateSetPriceTotal() {\n const SetProductDetail = this.getConstructor('setProductDetail');\n\n const productsSelected = [];\n\n this.eachChild(child => {\n if (child instanceof SetProductDetail && child.productSelected()) {\n productsSelected.push(child.getProductId());\n }\n });\n\n const productSetPriceBlock = this.getById('priceBlock', priceBlock => priceBlock.ref('self'));\n\n if (!productsSelected.length) {\n this.togglePriceTotals(false, true);\n this.manageAddSetToCart(false);\n\n return;\n }\n\n getJSONByUrl(this.prefs().productSetInfoUrl, {\n productSetId: this.prefs().pid,\n productSetSelectedProducts: productsSelected.join(',')\n }).then(response => {\n if (response && response.total) {\n this.render(\n 'setPriceTpl',\n { price: response.total },\n productSetPriceBlock\n ).then(this.togglePriceTotals.bind(this, true, false));\n\n this.manageAddSetToCart(true);\n } else {\n this.togglePriceTotals(false, true);\n this.manageAddSetToCart(false);\n }\n });\n }\n\n /**\n * @description updates price totals after change product variation attributes\n */\n onChangeAttribute() {\n this.updateSetPriceTotal();\n }\n\n /**\n * @description Server request to get product set info/prices etc depending on pre-selected products\n * @returns {void}\n */\n onProductSelected() {\n this.updateSetPriceTotal();\n }\n\n /**\n * @description Enables or disable `add set to cart` button\n * @param {boolean} enable enable/disable button\n * @returns {void}\n */\n manageAddSetToCart(enable = true) {\n this.getById('addSetToCart', addSetToCart => {\n addSetToCart[enable ? 'enable' : 'disable']();\n });\n }\n\n toggleProductsView() {\n const productsContainer = this.ref('productsContainer');\n\n if (productsContainer.hasClass(this.prefs().classesAllProducts)) {\n productsContainer.removeClass(this.prefs().classesAllProducts);\n\n this.ref('smProductsViewButton').setText(this.prefs().textShowMore);\n this.ref('lgProductsViewButton').setText(this.prefs().textShowMore);\n\n this.ref('smProductsViewMessage').setText(this.prefs().textViewedProductsSm);\n this.ref('lgProductsViewMessage').setText(this.prefs().textViewedProductsLg);\n } else {\n productsContainer.addClass(this.prefs().classesAllProducts);\n\n this.ref('smProductsViewButton').setText(this.prefs().textShowLess);\n this.ref('lgProductsViewButton').setText(this.prefs().textShowLess);\n\n this.ref('smProductsViewMessage').setText(this.prefs().textViewedProductsAll);\n this.ref('lgProductsViewMessage').setText(this.prefs().textViewedProductsAll);\n }\n }\n }\n\n return ProductSet;\n}\n","/**\n * @typedef {ReturnType<typeof import('widgets/product/RecentlyViewedMixin').default>} BaseRecentlyViewedMixin\n */\n\n/**\n * @description Base RecentlyViewedMixin implementation\n * @param {BaseRecentlyViewedMixin} BaseRecentlyViewedMixin Base widget for extending\n * @returns {typeof RecentlyViewedMixin} RecentlyViewedMixin\n */\nexport default function (BaseRecentlyViewedMixin) {\n /**\n * @class RecentlyViewedMixin\n * @augments BaseRecentlyViewedMixin\n */\n class RecentlyViewedMixin extends BaseRecentlyViewedMixin {\n /**\n * @description Saves visited product to cookies\n * @param {string} pid - visited master product ID\n * @returns {void}\n */\n trackViewedItem(pid) {\n const refinedPid = (this.prefs().pid || pid).toString();\n\n super.trackViewedItem(refinedPid);\n }\n }\n\n return RecentlyViewedMixin;\n}\n","/**\n * @typedef {ReturnType<typeof import('widgets/product/ProductDetail').default>} ProductDetailBase\n * @typedef {InstanceType<ReturnType<typeof import('widgets/forms/InputStepper').default>>} InputStepper\n */\n\nimport { submitFormJsonWithAbort } from 'widgets/toolbox/ajax';\nimport { showErrorLayout, appendParamsToUrl } from 'widgets/toolbox/util';\n\n/**\n * @description SetProductDetail widget\n * @param {ProductDetailBase} ProductDetailBase Base widget for extending\n * @returns {typeof SetProductDetail} SetProductDetail class\n */\n\nexport default function (ProductDetailBase) {\n /**\n * @class SetProductDetail\n * @augments ProductDetailBase\n */\n class SetProductDetail extends ProductDetailBase {\n prefs() {\n return {\n selectedClass: 'm-selected',\n lowStockMessage: '',\n ...super.prefs()\n };\n }\n\n /**\n * @description Shows/hides possibility to add product into set depending on product type\n * @param {string} productType selected product type\n * @returns {void}\n */\n setSelectProduct(productType) {\n const selectProductMethod = productType !== 'variant' && productType !== 'standard' && productType !== 'bundle'\n ? 'hide' : 'show';\n\n this.getById('selectProduct', selectProduct => selectProduct[selectProductMethod]());\n }\n\n /**\n * @description Render product price\n * Additionally renders subtotal for product in a set\n * @param {object} product Product object\n * @returns {void}\n */\n renderPrice(product) {\n this.eachChild(child => {\n if (child.data('id') === 'priceBlock') {\n if (child.data('priceMeaning') === 'subtotal'\n && product.subtotal && product.subtotal.html) {\n child.render('template', {}, undefined, product.subtotal.html);\n } else if (child.data('priceMeaning') === 'basic'\n && product.price && product.price.html) {\n child.render('template', {}, undefined, product.price.html);\n }\n }\n });\n }\n\n /**\n * @description Updates selection flag\n * @param {boolean} selectionFlag - selection flag\n * @param {string} selectionValue - selection value\n */\n updateProductSelection(selectionFlag) {\n if (!selectionFlag) {\n this.getById('selectProduct', (selectProduct) => {\n selectProduct.unselectCheckbox();\n });\n } else if (selectionFlag) {\n this.getById('selectProduct', (selectProduct) => {\n selectProduct.preselectCheckbox();\n });\n }\n }\n\n /**\n * @description updates availability section\n * @param {object} product - product object\n * @returns {Promise} rendering promise\n */\n updateAvailabilitySection(product) {\n if (product) {\n const isProductSelected = this.productSelected() === 'on';\n\n product.selected = isProductSelected;\n\n this.updateProductSelection(isProductSelected);\n }\n\n this.recommendationAvailable = product.available;\n\n return this.render('availabilitySectionTemplate', product, this.ref('availabilitySectionContainer'))\n .then(() => { this.eventBus().emit('after.change.product.set.attribute'); });\n }\n\n /**\n * @description updates callout section\n * @param {object} product - product object\n * @returns {Promise} rendering promise\n */\n updateCallOut(product) {\n const isReachedLimit = (product.readyToOrder || product.isInaccessibleVariant) && product.availability.isReachedLimit;\n let lowStockMessage = '';\n\n if (product.availability.isLowStock) {\n lowStockMessage = product.availability.messages[0];\n } else if (product.pdpAvailability.available && product.pdpAvailability.stock) {\n lowStockMessage = this.prefs().lowStockMessage.replace('{0}', product.pdpAvailability.stock);\n }\n\n const renderingData = {\n reachedLimitMessage: isReachedLimit ? product.availability.isReachedLimitMessage : '',\n hasPromotions: !!product.promotions,\n promotions: product.promotions,\n lowStockMessage\n };\n\n return this.render('callOutSectionTemplate', renderingData, this.ref('callOutSectionContainer'))\n .then(() => { this.eventBus().emit('after.change.product.set.attribute'); });\n }\n\n /**\n * @description After change attribute handler\n * @param {object} response response object\n * @returns {void}\n */\n afterChangeAttribute(response) {\n super.afterChangeAttribute(response);\n\n if (response && response.product) {\n this.setSelectProduct(response.product.productType);\n this.updateAvailabilitySection(response.product);\n this.updateCallOut(response.product);\n }\n }\n\n /**\n * @description trigger change from different widgets (swatch, select)\n * Saves `selectWidget.id` into a property for further global notifications etc.\n * Later, when triggering event, `selectWidget.id` will be analyzed in order to send with event correct data.\n * @param {InputStepper} selectWidget widget\n * @returns {Promise<object|null>} Promise object represents server response with attribute changing result\n */\n changeAttribute(selectWidget) {\n this.changeAttributeID = selectWidget.id;\n const selected = selectWidget.getSelectedOptions();\n\n if (!selected || selected.data('attrIsSelected')) {\n return Promise.resolve(null);\n }\n\n const requestURL = appendParamsToUrl(selected.data('attrUrl'), {\n partOfProductSet: true,\n productSetId: this.prefs().productSetId\n });\n\n const requestObject = submitFormJsonWithAbort(requestURL, undefined, 'GET', true);\n\n this.changeAttributeRequests.push(requestObject);\n\n // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'.\n return requestObject.promise\n .then((response) => {\n this.afterChangeAttribute(response);\n\n return response;\n })\n .catch(e => {\n if (e.name === 'AbortError') {\n return;\n }\n\n showErrorLayout(e);\n })\n .finally(() => {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'changeAttributeRequests' does not exist ... Remove this comment to see the full error message\n const index = this.changeAttributeRequests.indexOf(requestObject);\n\n if (index > -1) {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'changeAttributeRequests' does not exist ... Remove this comment to see the full error message\n this.changeAttributeRequests.splice(index, 1);\n }\n });\n }\n\n /**\n * @description Event handler for product select via chakbox in a product set\n * @returns {void}\n */\n onProductSelect() {\n this.ref('self').toggleClass(\n this.prefs().selectedClass,\n this.productSelected()\n );\n\n this.emit('productselected');\n }\n\n /**\n * @description Checks if product is selected\n * @returns {boolean} if product is selected\n */\n productSelected() {\n return this.getById('selectProduct', selectProduct => selectProduct.getValue());\n }\n\n /**\n * @description Get current product ID\n * @returns {string} current product ID\n */\n getProductId() {\n return this.config.pid;\n }\n }\n\n return SetProductDetail;\n}\n","/**\n * @typedef {typeof import('widgets/Widget').default} Widget\n */\n\n/**\n * @param {Widget} Widget Base widget for extending\n * @returns {typeof Specifications} Specifications\n */\n\nexport default function (Widget) {\n class Specifications extends Widget {\n init() {\n const currentProduct = document.getElementById('current-product');\n\n if (!currentProduct) {\n return;\n }\n\n this.currentProductSpecifications = JSON.parse(currentProduct?.getAttribute('data-items'));\n this.itemsSpecs = [...this.ref('self').get().querySelectorAll('.b-product_specifications')];\n this.addHeadings();\n this.parseData();\n }\n\n /**\n * @description Add comparison table headings\n */\n addHeadings() {\n let rows = '';\n\n this.currentProductSpecifications.forEach((spec) => {\n if (spec.id === 'washcare') {\n return;\n }\n\n rows += `<li class=\"b-product_specifications-row\">\n <div class=\"b-product_specifications-label\">\n ${spec.name}\n </div>\n </li>`;\n });\n\n const html = `<ul class=\"b-product_specifications m-comparison\">${rows}</ul>`;\n\n this.ref('headings').get().innerHTML = html;\n }\n\n /**\n * @description Parse specifications from each product\n */\n parseData() {\n this.itemsSpecs?.forEach(spec => {\n const data = JSON.parse(spec.getAttribute('data-items'));\n const obj = {};\n\n data.forEach(item => {\n obj[item.id] = {\n name: item.name,\n value: item.value\n };\n });\n\n this.renderItemSpecs(spec, obj);\n });\n }\n\n /**\n * @description Add comparison table headings\n * @param {HTMLElement} _el HTMLElement\n * @param {Object} obj object with item's specifications data\n */\n renderItemSpecs(_el, obj) {\n let rows = '';\n\n this.currentProductSpecifications.forEach((spec) => {\n if (spec.id === 'washcare') {\n return;\n }\n\n let name = spec.name;\n let value = '-';\n\n if (obj[spec.id]) {\n ({ name = '', value = '-' } = obj[spec.id]);\n }\n\n rows += `<li class=\"b-product_specifications-row\">\n <div class=\"b-product_specifications-label\">\n ${name}\n </div>\n <div class=\"b-product_specifications-value\">\n ${value}\n </div>\n </li>`;\n });\n\n _el.innerHTML = rows;\n }\n }\n\n return Specifications;\n}\n","import { submitFormJson } from 'widgets/toolbox/ajax';\n\n/**\n * @typedef {ReturnType<typeof import('plugin_wishlists/wishlist/AddToWishlistMixin').default>} BaseAddToWishlistMixin\n * @typedef {InstanceType<ReturnType<typeof import('widgets/global/Button').default>>} button\n */\n\n/**\n * @description Extended AddToWishlistMixin widget\n * @param {BaseAddToWishlistMixin} BaseAddToWishlistMixin Base widget for extending\n * @returns {typeof EProductAddToWishlistMixin} ExtendedWishlistItem widget\n */\nexport default function (BaseAddToWishlistMixin) {\n class EProductAddToWishlistMixin extends BaseAddToWishlistMixin {\n /**\n * @description Handle click on the button\n * @listens dom#click\n * @param {button} button Target button\n */\n wishlistButtonClickHandler(button) {\n if (button.isActive()) {\n this.removeProductFromWishlist(button);\n } else {\n this.validateAndSubmit(button, this.addToWishlist);\n }\n }\n\n /**\n * @description submit item to wishlist\n * @param {button} addButton - button\n * @param {object} eVoucherData - form fields\n * @returns {Promise} Promise object represents server response for product updating\n */\n addToWishlist(addButton, eVoucherData = {}) {\n const addToWishlistUrl = window.sfccData.wishlistActionUrls?.addToWishlist;\n const options = this.prefs().productOptions;\n let customOptionValue = '';\n let optionId = '';\n let optionVal = '';\n\n if (options && options.length) {\n optionId = options[0].id;\n optionVal = options[0].selectedValueId;\n customOptionValue = this.getCustomOptionValue(options[0].id);\n }\n\n const amount = this.getEProductAmount();\n\n addButton.busy();\n this.getById(this.prefs().addToWishlistMsg, (labelAddToWishlistMsg) => labelAddToWishlistMsg.hide());\n\n return submitFormJson(addToWishlistUrl, {\n pid: this.prefs().pid || '',\n qty: this.prefs().selectedQuantity || '',\n optionId: optionId,\n optionVal: optionVal,\n customOptionValue: customOptionValue,\n amount: amount > 0 ? amount.toString() : '',\n ...eVoucherData\n })\n .then(response => {\n this.handleSuccess(response);\n\n return response;\n })\n .catch(() => {\n this.showWishlistMessage(this.prefs().textNetworkError, true);\n })\n .finally(() => {\n addButton.unbusy();\n });\n }\n }\n\n return EProductAddToWishlistMixin;\n}\n","/**\n * @param AjaxForm Base widget for extending\n * @returns BackInStock widget\n */\nexport default function (AjaxForm: ReturnType<typeof import('widgets/forms/AjaxForm').default>) {\n /**\n * @category widgets\n * @subcategory forms\n * @class BackInStock\n * @augments AjaxForm\n * @classdesc Represents BackInStock component with next features:\n * 1. Updates product id of the product available for back in stock\n *\n * @property {string} data-widget - Widget name `backInStock`\n * @example <caption>Example of BackInStock widget usage</caption>\n * <form>\n * ...\n * <input\n * type=\"hidden\"\n * data-widget=\"inputHidden\"\n * data-ref=\"field\"\n * data-id=\"backInStockProductId\"\n * value=\"${product.id}\"\n * name=\"${pdict.backInStockForm.productID.htmlName}\"\n * />\n * ...\n * /form>\n */\n class BackInStock extends AjaxForm {\n updateProductId(productId) {\n this.getById('backInStockProductId', (backInStockProductId) => {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'setValue' does not exist on type 'Widget... Remove this comment to see the full error message\n backInStockProductId.setValue(productId);\n });\n }\n }\n\n return BackInStock;\n}\n","import { scrollWindowTo } from 'widgets/toolbox/scroll';\nimport { submitFormJson } from 'widgets/toolbox/ajax';\n\n/**\n * @description Base AddAllToCartMixin implementation\n *\n * This class is not intended to have a separate DOM representation.\n *\n * @param ProductSet Base widget for extending\n * @returns Add to Cart mixin widget\n */\nexport default function (ProductSet: ReturnType<typeof import('widgets/product/ProductSet').default>) {\n /**\n * @class AddAllToCartMixin\n * @augments ProductSet\n * @subcategory product\n * @classdesc Represents product set component with the next features:\n * 1. Adds all product set products to the basket\n * 2. Shows alert message after adding product set products to the basket\n *\n * @property {string} data-text-network-error - network error text\n */\n class AddAllToCartMixin extends ProductSet {\n prefs() {\n return {\n pid: '',\n processingRequest: false,\n selectedQuantity: '',\n showMinicartOnProductAdd: '',\n showAlertOnProductAdd: '',\n addToCartGlobalMsg: '',\n textNetworkError: '',\n accessibilityAlerts: {\n addedsettocart: ''\n },\n ...super.prefs()\n };\n }\n\n init() {\n super.init();\n\n this.eventBus().on('product.updated', 'onProductItemUpdated');\n }\n\n /**\n * @description If product set has unselected product variation,\n * show error message for all such products, scroll to the first one error and set focus first product with error\n * @returns {void}\n */\n handleUnselectedProduct() {\n let unselectedProduct: HTMLElement|undefined;\n\n this.eachChild((child) => {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'productSetItem' does not exist on type '... Remove this comment to see the full error message\n if (child.prefs().productSetItem && (!child.prefs().readyToOrder)) {\n child.getById('addToCartMsg', (addToCartMsg) => {\n const error = true;\n\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'textSelectOptions' does not exist on typ... Remove this comment to see the full error message\n const msg = child.prefs().textSelectOptions;\n\n addToCartMsg.render(\n 'template',\n { msg, error },\n addToCartMsg.ref('container')\n ).then(() => addToCartMsg.show());\n });\n\n if (!unselectedProduct) {\n unselectedProduct = <HTMLElement> child.getById(\n 'productName',\n (productName) => productName.ref('titleLink').get()\n );\n }\n }\n });\n\n if (unselectedProduct) {\n unselectedProduct.focus();\n scrollWindowTo(unselectedProduct, true);\n }\n }\n\n /**\n * @description Returns product set data for the set items\n * @returns {Array} result\n */\n getProductSetItems() {\n const productSetItems = [];\n\n this.eachChild((child) => {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'productSetItem' does not exist on type '... Remove this comment to see the full error message\n if (child.prefs().productSetItem) {\n let isOutOfStock = false;\n\n child.getById('addToCart', (addToCart) => {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'isOutOfStock' does not exist on type '{ ... Remove this comment to see the full error message\n isOutOfStock = !!addToCart.prefs().isOutOfStock;\n });\n\n productSetItems.push({\n\n // @ts-expect-error ts-migrate(2322) FIXME: Type 'any' is not assignable to type 'never'.\n pid: child.prefs().currentProductId || child.prefs().pid,\n\n // @ts-expect-error ts-migrate(2322) FIXME: Type 'any' is not assignable to type 'never'.\n quantity: child.prefs().selectedQuantity,\n\n // @ts-expect-error ts-migrate(2322) FIXME: Type 'boolean' is not assignable to type 'never'.\n available: !isOutOfStock,\n\n // @ts-expect-error ts-migrate(2322) FIXME: Type 'any' is not assignable to type 'never'.\n readyToOrder: child.prefs().readyToOrder\n });\n }\n });\n\n return productSetItems;\n }\n\n /**\n * @description Returns an array with products available for ordering\n * @param {Array} productSetItems - product set data for the set items\n * @returns {Array} result\n */\n getPidsObj(productSetItems) {\n return productSetItems.filter(setItem => setItem.available).map((childProduct) => {\n return {\n pid: childProduct.pid,\n qty: childProduct.quantity\n };\n });\n }\n\n /**\n * @description On add all to cart button click handler\n * @param {any} button - button\n * @returns {Promise<object|null>} Promise object represents server response for session continuation\n */\n onAddAllToCart(button) {\n if (this.prefs().processingRequest) {\n return Promise.resolve(null);\n }\n\n const productSetItems = this.getProductSetItems();\n\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'readyToOrder' does not exist on type 'ne... Remove this comment to see the full error message\n const unselectedProduct = productSetItems.find((setItem) => !setItem.readyToOrder && setItem.available);\n\n if (unselectedProduct) {\n this.handleUnselectedProduct();\n\n return Promise.resolve(null);\n }\n\n const pidsObj = this.getPidsObj(productSetItems);\n const isFullProductSet = pidsObj.length === productSetItems.length;\n\n this.setPref('processingRequest', true);\n button.startProcess();\n\n this.getById(this.prefs().addToCartGlobalMsg, (addToCartGlobalMsg) => addToCartGlobalMsg.hide());\n\n return submitFormJson(button.prefs().addToCartUrl, {\n pid: this.prefs().pid || button.prefs().pid,\n quantity: this.prefs().selectedQuantity || button.prefs().selectedQuantity,\n pidsObj: JSON.stringify(pidsObj)\n })\n .then(response => {\n this.postAddAllToCart(response, isFullProductSet, pidsObj.length);\n\n return response;\n })\n .finally(() => {\n this.setPref('processingRequest', false);\n button.stopProcess();\n }).catch(() => {\n this.showAddAllToCartAlert(true, this.prefs().textNetworkError);\n });\n }\n\n /**\n * @description Handles a result of product set adding to cart\n * @param {object} response - response\n * @param {boolean} isFullProductSet - Identifies if all product set items are added\n * @param {number} productsCount - products count to be added to the cart\n * @returns {void}\n */\n postAddAllToCart(response, isFullProductSet, productsCount) {\n if (!response.error && response.cart && response.messages) {\n const cartModel = response.cart;\n\n cartModel.showMinicart = this.prefs().showMinicartOnProductAdd;\n\n const isAllProductsAdded = response.messages && (response.messages.length === productsCount);\n const message = isFullProductSet && isAllProductsAdded\n ? this.prefs().accessibilityAlerts.addedsettocart\n : response.messages.join('<br>');\n\n this.showAddAllToCartAlert(false, message);\n\n this.eventBus().emit('product.added.to.cart', cartModel, this);\n } else {\n this.showAddAllToCartAlert(true, response.message);\n }\n }\n\n /**\n * @description Shows alert message after adding a product set to the cart\n * @param {boolean} error - identifies if message should be shown as an error\n * @param {*} message - message\n * @returns {void}\n */\n showAddAllToCartAlert(error, message) {\n if (!this.prefs().showAlertOnProductAdd) {\n return;\n }\n\n this.getById(this.prefs().addToCartGlobalMsg, (addToCartGlobalMsg) => {\n addToCartGlobalMsg.render(\n 'template',\n {\n msg: message,\n error\n },\n addToCartGlobalMsg.ref('container')\n ).then(() => addToCartGlobalMsg.show());\n });\n }\n\n onProductItemUpdated() {\n if (!this.prefs().showAlertOnProductAdd) {\n return;\n }\n\n this.getById(this.prefs().addToCartGlobalMsg, (addToCartGlobalMsg) => {\n addToCartGlobalMsg.hide();\n });\n }\n }\n\n return AddAllToCartMixin;\n}\n","import { TWidget } from 'widgets/Widget';\n// TODO: JSDoc for all methods\n// TODO: should be implemented as https://www.w3.org/TR/wai-aria-practices/#Listbox\n// single select controls group (single tab stop element) with activation on click/space/enter\nimport { RefElement } from 'widgets/toolbox/RefElement';\n\n/**\n * @description Base ColorSwatch implementation\n * @param Widget Base widget for extending\n * @returns Color Swatch widget\n */\nexport default function (Widget: TWidget) {\n /**\n * @class ColorSwatch\n * @augments Widget\n */\n class ColorSwatch extends Widget {\n selectColor(option) {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'selectedOption' does not exist on type '... Remove this comment to see the full error message\n this.selectedOption = option;\n this.emit('change', this);\n }\n\n getSelectedOptions() {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'selectedOption' does not exist on type '... Remove this comment to see the full error message\n if (this.selectedOption) {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'selectedOption' does not exist on type '... Remove this comment to see the full error message\n return this.selectedOption;\n }\n\n return new RefElement([]);\n }\n }\n\n return ColorSwatch;\n}\n","import { TWidget } from 'widgets/Widget';\n// TODO: JSDoc for all methods\n// TODO: freeze loaded sections during update with aria-busy\n// TODO: investigate proper implementation of aria-live region for updated sections\n// TODO: keep track that focus stays on the same place during PLP update\n\nimport { submitFormJson, submitFormJsonWithAbort } from 'widgets/toolbox/ajax';\nimport { showErrorLayout } from 'widgets/toolbox/util';\nimport { debounce } from 'widgets/toolbox/debounce';\n\n/**\n * @typedef {InstanceType<typeof import('widgets/toolbox/RefElement').RefElement>} refElement\n * @typedef {InstanceType<ReturnType<typeof import('widgets/forms/InputStepper').default>>} InputStepper\n */\n\n/**\n * @description Base ProductDetail implementation\n * @param Widget Base widget for extending\n * @returns Product Detail widget\n */\nexport default function (Widget: TWidget) {\n /**\n * @class ProductDetail\n * @augments Widget\n * @classdesc Represents ProductDetail component with next features:\n * 1. Support keyboard navigation for accessibility\n * 2. Rerender PDP and Quick View\n * 3. Handle product attributes change\n * 4. Handle add to cart event\n * @property {boolean} [data-ready-to-order=false] - ready to order flag\n * @property {string} data-text-select-options - select option text\n * @property {string} data-text-stock-limit - stock limit text\n * @property {string} data-out-of-stock-label - out of stock label\n * @property {string} data-bundled-products - bundled products\n * @property {number} data-selected-quantity - selected quantity\n * @category widgets\n * @subcategory product\n * @example\n * cartridges/app_storefront_widgets/cartridge/templates/default/product/productDetails.isml\n *\n * <main\n * role=\"main\"\n * class=\"l-pdp-main\"\n * data-widget=\"productDetail\"\n * data-ready-to-order=\"${product.readyToOrder}\"\n * data-text-network-error=\"${Resource.msg('error.alert.network', 'product', null)}\"\n * data-text-select-options=\"${Resource.msg('error.alert.select.options', 'product', null)}\"\n * data-text-stock-limit=\"${Resource.msg('error.alert.stock.limit', 'product', null)}\"\n * data-out-of-stock-label=\"${Resource.msg('label.outofstock', 'common', null)}\"\n * data-add-to-cart-label=\"${Resource.msg('button.addtocart', 'common', null)}\"\n * data-selected-quantity=\"${product.selectedQuantity}\"\n * data-analytics=\"${JSON.stringify(product.gtmInfo)}\"\n * data-pid=\"${product.id}\"\n * data-tau-product-id=\"${product.id}\"\n * data-add-to-wishlist-hide-texts=\"false\"\n * data-show-minicart-on-product-add.md.lg.xl=\"true\"\n * data-show-message-on-product-add=\"true\"\n * data-bundled-products=\"${JSON.stringify(product.bundledProducts)}\"\n * data-text-added-to-wishlist=\"${Resource.msg('button.added.to.wishlist', 'wishlist', null)}\"\n * data-accessibility-alerts='{\n * \"quantitychanged\": \"${Resource.msg('alert.quantitychanged', 'product', null)}\",\n * \"variationselected\": \"${Resource.msg('alert.variationselected', 'product', null)}\",\n * \"optionselected\": \"${Resource.msg('alert.optionselected', 'product', null)}\",\n * \"addedtocart\": \"${Resource.msg('alert.addedtocart', 'product', null)}\",\n * \"addedtowishlist\": \"${Resource.msg('alert.addedtowishlist', 'product', null)}\"\n * }'\n * >\n * PDP content\n * </main>\n */\n class ProductDetail extends Widget {\n prefs() {\n return {\n addToCartMsg: 'addToCartMsg',\n backInStock: 'backInStock',\n disableHistory: false,\n descriptions: 'descriptions',\n currentProductId: '',\n readyToOrder: false,\n selectedQuantity: 0,\n textSelectOptions: '',\n textStockLimit: '',\n outOfStockLabel: '',\n updateLabel: '',\n update: false,\n accessibilityAlerts: {\n quantitychanged: '',\n // eslint-disable-next-line spellcheck/spell-checker\n optionselected: '',\n // eslint-disable-next-line spellcheck/spell-checker\n variationselected: ''\n },\n productOptions: [\n {\n id: '',\n selectedValueId: '',\n customOptionValue: null,\n values: [\n {\n isCustomOption: false,\n isCustomOptionSelected: false\n }\n ]\n }\n ],\n bundledProducts: [],\n ...super.prefs()\n };\n }\n\n /**\n * @description Widget initialization\n * @returns {void}\n */\n init() {\n super.init();\n\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'changeAttributeRequests' does not exist ... Remove this comment to see the full error message\n this.changeAttributeRequests = [];\n }\n\n /**\n * @description updateProduct handler\n * @param {object} updateBtn Response object\n * @returns {Promise<object>} Promise object represents server response for product updating\n */\n updateProduct(updateBtn) {\n const productOption = this.prefs().productOptions[0];\n\n const selectedOptions = this.getSelectedProductOptions();\n const isSelectedOptionsValid = this.validateProductOptions(selectedOptions);\n\n if (!isSelectedOptionsValid) {\n return Promise.resolve(null);\n }\n\n return submitFormJson(\n updateBtn.ref('self').attr('data-update-url'),\n {\n pid: this.prefs().currentProductId || updateBtn.prefs().pid,\n quantity: this.prefs().selectedQuantity || updateBtn.ref('self').attr('data-selected-quantity') || 1,\n uuid: updateBtn.ref('self').attr('data-uuid'),\n ...this.getAdditionalProductData(productOption)\n }\n )\n .then((response) => {\n this.afterUpdateProduct(response);\n\n return response;\n })\n .finally(() => {\n this.emit('updated');\n });\n }\n\n /**\n * @description afterUpdateProduct handler\n * @param {object} response Response object\n * @emits \"product.updated\"\n * @returns {void}\n */\n afterUpdateProduct(response) {\n /**\n * @description Event to notify concerned widgets, that product was updated\n * @event \"product.updated\"\n */\n this.eventBus().emit('product.updated', response);\n }\n\n /**\n * @description Update Product View\n * @param {any} product productModel\n * @returns {void}\n */\n updateProductView(product) {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentGtmInfo' does not exist on type '... Remove this comment to see the full error message\n this.currentGtmInfo = product.gtmInfo;\n\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'uuid' does not exist on type 'ProductDet... Remove this comment to see the full error message\n this.uuid = product.uuid;\n\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'stock' does not exist on type 'ProductDe... Remove this comment to see the full error message\n this.stock = product.availability && product.availability.stock ? product.availability.stock : null;\n\n this.setPref('selectedQuantity', product.selectedQuantity);\n this.setPref('currentProductId', product.id);\n this.setPref('readyToOrder', product.readyToOrder);\n\n this.setGtmInfo(product);\n\n this.getById(this.prefs().addToCartMsg, (addToCartMsg) => {\n addToCartMsg.hide();\n });\n\n this.getById(this.prefs().backInStock, (backInStock) => {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'updateProductId' does not exist on type ... Remove this comment to see the full error message\n backInStock.updateProductId(product.id);\n });\n\n this.renderVariationAttributes(product);\n this.renderProductOptions(product);\n this.renderQuantities(product);\n this.renderPrice(product);\n this.renderAvailability(product);\n this.renderImages(product);\n this.renderName(product);\n this.renderPromotions(product);\n this.renderProductDescriptions(product);\n this.updateSocialLinks(product);\n this.updateViewFullProductURL(product);\n this.updateRatings(product);\n }\n\n /**\n * @description Update product reviews block\n * @param {object} product Product object\n * @returns {Promise<void|null>} Promise object represents ratings rendering result\n */\n updateRatings(product) {\n const ratings = [1, 2, 3, 4, 5].map((currentValue, index) => {\n const starObj = {\n position: index > 0 ? index * 20 : 0\n };\n\n if (product.rating >= currentValue) {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'isFull' does not exist on type '{ positi... Remove this comment to see the full error message\n starObj.isFull = true;\n } else if ((product.rating % 1 > 0) && (Math.ceil(product.rating) >= currentValue)) {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'isHalf' does not exist on type '{ positi... Remove this comment to see the full error message\n starObj.isHalf = true;\n } else {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'isEmpty' does not exist on type '{ posit... Remove this comment to see the full error message\n starObj.isEmpty = true;\n }\n\n return starObj;\n });\n let renderingResult;\n\n this.has('productRatings', (productRatings) => {\n const link = productRatings.data('addProductLinkToRatingsLink')\n ? product.selectedProductUrl\n : '';\n\n renderingResult = this.render('productRatingsPDPTemplate', { product, ratings, link }, productRatings);\n });\n\n return renderingResult || Promise.resolve(null);\n }\n\n /**\n * @description Render product view full product url\n * @param {object} product Product object\n * @returns {void}\n */\n updateViewFullProductURL(product) {\n if (product.selectedProductUrl) {\n this.has('viewFullProductURL', (el) => {\n el.attr('href', product.selectedProductUrl);\n });\n }\n }\n\n /**\n * TODO: Move from widget properties to preferences\n *\n * @description Set GTM info\n * @param {object} product Product object\n * @returns {void}\n */\n setGtmInfo(product) {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentGtmInfo' does not exist on type '... Remove this comment to see the full error message\n this.currentGtmInfo = product.gtmInfo;\n\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentGtmInfo' does not exist on type '... Remove this comment to see the full error message\n if (this.currentGtmInfo && product.selectedQuantity) {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'currentGtmInfo' does not exist on type '... Remove this comment to see the full error message\n this.currentGtmInfo.quantity = product.selectedQuantity;\n }\n }\n\n /**\n * @description Render product options\n * @param {object} product Product object\n * @returns {void}\n */\n renderProductOptions(product) {\n const CUSTOM_OPTION_VALUE_ID = 'CUSTOM_TEXT';\n const options = product.options;\n\n if (!options && !options.length) { return; }\n\n options.forEach(productOption => {\n const productOptionId = productOption.id;\n\n this.getById('option-' + productOptionId, (option) => {\n let previousCustomOptionValue = '';\n\n if (productOption.selectedValueId === CUSTOM_OPTION_VALUE_ID) {\n option.getById('customOptionText', (customOptionText) => {\n // @ts-expect-error ts-migrate(2322) FIXME: Type 'string | RefElement' is not assignable to ty... Remove this comment to see the full error message\n previousCustomOptionValue = customOptionText.ref('field').val();\n });\n }\n\n option.render('template', { option: productOption }, option.ref('container'))\n .then(() => {\n this.setPref('productOptions', options);\n\n if (productOption.selectedValueId === CUSTOM_OPTION_VALUE_ID) {\n option.getById('customOptionText', (customOptionText) => {\n customOptionText.ref('field').val(previousCustomOptionValue);\n });\n }\n });\n });\n });\n }\n\n /**\n * @description Render product attributes\n * @param {object} product Product object\n * @returns {void}\n */\n renderVariationAttributes(product) {\n if (product.variationAttributes && product.variationAttributes.length) {\n product.variationAttributes.forEach(variationAttribute => {\n variationAttribute.values = variationAttribute.values.map(value => {\n return {\n ...value,\n selected: value.selected,\n disabled: !value.selectable,\n selectable: value.selectable ? 'selectable' : ''\n };\n });\n this.getById('attr-' + variationAttribute.attributeId, (attribute) => {\n attribute.render('template', {\n attr: variationAttribute\n }, attribute.ref('container'));\n });\n });\n }\n }\n\n /**\n * @description Executes when user clicks on product details link.\n * Usually used by analytics etc.\n * @emits \"detail.product.link.click\"\n * @param {refElement} link - clicked product tile link\n * @returns {void}\n */\n onProductLinkClick(link) {\n this.eventBus().emit('detail.product.link.click', link);\n }\n\n /**\n * @description Render product quantity\n * @param {object} product Product object\n * @returns {void}\n */\n renderQuantities(product) {\n const availability = product.availability;\n const response = product.quantities;\n\n if (!response || !availability) { return; }\n\n this.getById('quantity', (quantity) => {\n quantity.render(\n 'template',\n {\n attr: {\n currentQty: response.currentValue,\n max: response.max,\n min: response.min,\n step: response.step\n },\n isOutOfStock: (availability && availability.isOutOfStock) || false\n },\n quantity.ref('container')\n ).then(function () {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'update' does not exist on type 'Widget'.\n quantity.update();\n quantity.setPref('attrUrl', response.actionUrl);\n });\n });\n }\n\n /**\n * @description Render product name\n * @param {object} product Product object\n * @returns {void}\n */\n renderName(product) {\n this.getById('productName', (productName) => {\n productName.render('template', { product }, productName.ref('container'));\n });\n }\n\n /**\n * @description Render product promotion\n * @param {object} product Product object\n * @returns {void}\n */\n renderPromotions(product) {\n this.getById('promotions', (promotions) => {\n promotions.render('template', {\n promotions: product.promotions || []\n }, promotions.ref('container'));\n });\n }\n\n /**\n * @description Render product price\n * @param {object} product Product object\n * @returns {void}\n */\n renderPrice(product) {\n if (product.price && product.price.html) {\n this.getById('priceBlock', (priceBlock) => {\n priceBlock.render('template', {}, undefined, product.price.html);\n });\n }\n }\n\n /**\n * @description Render product availability\n * @param {object} product Product object\n * @returns {void}\n */\n renderAvailability(product) {\n let message = '';\n let availabilityClass = '';\n\n if (product.availability\n && product.availability.messages\n && (product.readyToOrder || product.isInaccessibleVariant)\n ) {\n message = product.availability.messages.join('');\n availabilityClass = product.availability.class;\n }\n\n if (product.availability.isReachedLimit) {\n message = product.availability.inStockMsg.join('');\n }\n\n this.has('productAvailabilityMsg', productAvailabilityMsg => {\n productAvailabilityMsg.hide();\n });\n\n this.getById('availability', (availabilityLabel) => {\n availabilityLabel.render('template', {\n message: message,\n class: availabilityClass\n }, availabilityLabel.ref('container'));\n });\n }\n\n /**\n * @description Render product images\n * @param {object} product Product object\n * @returns {void}\n */\n renderImages(product) {\n this.getById('productImages', (productImages) => {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'renderImages' does not exist on type 'Wi... Remove this comment to see the full error message\n productImages.renderImages(product);\n });\n }\n\n /**\n * @description Render product description\n * @param {object} product Product object\n * @returns {void}\n */\n renderProductDescriptions(product) {\n this.getById(this.prefs().descriptions, descriptionsAccordion => {\n descriptionsAccordion.render(\n 'template',\n product,\n descriptionsAccordion.ref('container')\n // @ts-expect-error ts-migrate(2551) FIXME: Property 'reinit' does not exist on type 'Widget'.... Remove this comment to see the full error message\n ).then(() => descriptionsAccordion.reinit());\n });\n }\n\n /**\n * @description Update social links\n * @param {object} product Product object\n * @returns {void}\n */\n updateSocialLinks(product) {\n Object.keys(product.socialLinks).forEach((socialKey) => {\n this.has('social-link-' + socialKey, link => {\n link.attr('href', product.socialLinks[socialKey]);\n });\n });\n }\n\n /**\n * @description trigger change from different widgets (swatch, select)\n * Saves `selectWidget.id` into a property for further global notifications etc.\n * Later, when triggering event, `selectWidget.id` will be analyzed in order to send with event correct data.\n * @param {InputStepper} selectWidget widget\n * @returns {Promise<object|null>} Promise object represents server response with attribute changing result\n */\n changeAttribute(selectWidget) {\n // @ts-expect-error ts-migrate(2551) FIXME: Property 'changeAttributeID' does not exist on typ... Remove this comment to see the full error message\n this.changeAttributeID = selectWidget.id;\n const selected = selectWidget.getSelectedOptions();\n\n if (!selected || selected.data('attrIsSelected')) {\n return Promise.resolve(null);\n }\n\n const requestObject = submitFormJsonWithAbort(selected.data('attrUrl'), undefined, 'GET', true);\n\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'changeAttributeRequests' does not exist ... Remove this comment to see the full error message\n this.changeAttributeRequests.push(requestObject);\n\n // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'.\n return requestObject.promise\n .then((response) => {\n this.afterChangeAttribute(response);\n\n return response;\n })\n .catch(e => {\n if (e.name === 'AbortError') {\n return;\n }\n\n showErrorLayout(e);\n })\n .finally(() => {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'changeAttributeRequests' does not exist ... Remove this comment to see the full error message\n const index = this.changeAttributeRequests.indexOf(requestObject);\n\n if (index > -1) {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'changeAttributeRequests' does not exist ... Remove this comment to see the full error message\n this.changeAttributeRequests.splice(index, 1);\n }\n });\n }\n\n /**\n * @description After change attribute handler\n * @param {object} response response object\n * @returns {void}\n */\n afterChangeAttribute(response) {\n if (response && response.product) {\n if (!this.prefs().disableHistory) {\n this.updateHistoryState(response.product);\n }\n\n this.updateProductView(response.product);\n this.triggerChangeAttributeEvent(response);\n }\n }\n\n /**\n * @description Aborts redundant update product quantity requests\n * @returns {void}\n */\n dismissQty() {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'changeAttributeRequests' does not exist ... Remove this comment to see the full error message\n this.changeAttributeRequests.forEach((request) => {\n request.abortController.abort();\n });\n\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'changeAttributeRequests' does not exist ... Remove this comment to see the full error message\n this.changeAttributeRequests = [];\n }\n\n /**\n * @description Triggers global event after `afterChangeAttribute` method executed.\n * Puts localized global alert event description\n * @param {object} response response object\n * @returns {void}\n */\n triggerChangeAttributeEvent(response) {\n // @ts-expect-error ts-migrate(2551) FIXME: Property 'changeAttributeID' does not exist on typ... Remove this comment to see the full error message\n if (!this.changeAttributeID) {\n return;\n }\n\n let accessibilityAlert = '';\n\n // @ts-expect-error ts-migrate(2551) FIXME: Property 'changeAttributeID' does not exist on typ... Remove this comment to see the full error message\n if (this.changeAttributeID.indexOf('quantity') === 0) {\n accessibilityAlert = this.prefs().accessibilityAlerts.quantitychanged;\n this.showAlert(accessibilityAlert, response);\n // @ts-expect-error ts-migrate(2551) FIXME: Property 'changeAttributeID' does not exist on typ... Remove this comment to see the full error message\n } else if (this.changeAttributeID.indexOf('attr-') === 0) {\n // eslint-disable-next-line spellcheck/spell-checker\n accessibilityAlert = this.prefs().accessibilityAlerts.variationselected;\n this.showAlert(accessibilityAlert, response);\n // @ts-expect-error ts-migrate(2551) FIXME: Property 'changeAttributeID' does not exist on typ... Remove this comment to see the full error message\n } else if (this.changeAttributeID.indexOf('option-') === 0) {\n // eslint-disable-next-line spellcheck/spell-checker\n accessibilityAlert = this.prefs().accessibilityAlerts.optionselected;\n\n // since Options changes applied immediately we need to delay success\n // message to not bother keyboard users\n\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'productOptionsSelect' does not exist on ... Remove this comment to see the full error message\n if (!this.productOptionsSelect) {\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'productOptionsSelect' does not exist on ... Remove this comment to see the full error message\n this.productOptionsSelect = debounce(() => {\n this.showAlert(accessibilityAlert, response);\n }, 2000, false, true);\n }\n\n // @ts-expect-error ts-migrate(2339) FIXME: Property 'productOptionsSelect' does not exist on ... Remove this comment to see the full error message\n this.productOptionsSelect({});\n }\n }\n\n /**\n * @description Show global alert after `triggerChangeAttributeEvent` method executed.\n * @param {string} accessibilityAlert Alert message text\n * @param {object} response response object\n * @returns {void}\n */\n showAlert(accessibilityAlert, response) {\n this.eventBus().emit('alert.show', {\n accessibilityAlert\n });\n\n // @ts-expect-error ts-migrate(2551) FIXME: Property 'changeAttributeID' does not exist on typ... Remove this comment to see the full error message\n this.changeAttributeID = undefined;\n\n this.afterUpdateProduct(response);\n }\n\n /**\n * @description Update History State\n * @param {object} product product object\n */\n updateHistoryState(product) {\n window.history.replaceState(undefined, '', product.selectedProductUrl);\n }\n\n /**\n * @description Validate product options\n * @param selectedOptions Selected product options\n * @returns Result of the validation product options\n */\n validateProductOptions(selectedOptions: Array<Record<string, unknown>|null>): boolean {\n return false;\n }\n\n /**\n * @description Get selected product options\n * @returns Result\n */\n getSelectedProductOptions(): Array<Record<string, unknown>|null> {\n return [];\n }\n\n /**\n * @description Returns additional product data object\n * @param productOption - product option\n * @returns result\n */\n getAdditionalProductData(productOption?: Record<string, unknown>): Record<string, unknown> {\n return {};\n }\n }\n\n return ProductDetail;\n}\n","import { IRefElement } from 'widgets/toolbox/RefElement';\n\ntype ICarousel = InstanceType<ReturnType<typeof import('widgets/global/Carousel').default>>;\n\nconst keyCode = Object.freeze({\n SPACE: 32,\n ENTER: 13\n});\n\nconst IMAGE_MODE_CAROUSEL = 'carousel';\nconst IMAGE_MODE_ZOOM = 'zoom';\n\n/**\n * @description Base ProductImages implementation\n * @param AccessibilityFocusTrapMixin mixin\n * @returns ProductImages widget\n */\nexport default function (\n AccessibilityFocusTrapMixin: ReturnType<typeof import('widgets/global/AccessibilityFocusTrapMixin').default>\n) {\n /**\n * @class ProductImages\n * @augments AccessibilityFocusTrapMixin\n * @classdesc Basic ProductImages Widget, manages two images carousels: thumbnails and images.\n * <br>Renders images from server response and update carousels states accordingly.\n * <br>Listens to carousel scroll/click events to coordinate consistent work of two carousels.\n * <br>Serves image `zoom` popup functionality using `photoswipe` as a library\n * @property {string} data-widget - Widget name `productImages`\n * @property {string} data-thumbnails-per-frame - Number of thumbnails fully visible per frame\n * @property {string} data-thumbnails-zoom-class - Class of the thumbnails carousel, when zoom is opened\n * @property {string} data-zoom-loop - Zoom carousel needs to be looped or not\n * @property {string} data-zoom-click-to-close-non-zoomable - Close or not zoom popup for not zoomable elements\n * @property {string} data-zoom-close-el-classes - Closable zoom popup classes. For ex. `item,caption,zoom-wrap,ui,top-bar`\n * @property {boolean} closeOnScroll - Close gallery on page scroll\n * @property {boolean} showHideOpacity - Animate background opacity and image scale\n * @example\n * // use this code to display widget\n * <div\n * data-widget=\"productImages\"\n * data-thumbnails-per-frame=\"4\"\n * >\n * <div\n * class=\"b-product_gallery\"\n * data-ref=\"carouselInner\"\n * >\n * <div\n * class=\"b-product_gallery-thumbs\"\n * data-widget=\"carousel\"\n * id=\"imagesThumbnails\"\n * ....\n * data-widget-event-pageclicked=\"onThumbnailCarouselPageClicked\"\n * >...</div>\n * <div\n * class=\"b-product_gallery-main b-product_slider\"\n * data-widget=\"carousel\"\n * id=\"imagesCarousel\"\n * ....\n * data-widget-event-pagechanged=\"onImageCarouselPageChanged\"\n * >...</div>\n * </div>\n * <script type=\"template/mustache\" data-ref=\"galleryTemplate\">\n * <div\n * class=\"b-product_gallery\"\n * data-ref=\"carouselInner\"\n * >\n * ... mustache carousels templates\n * </div>\n * </script>\n * </div>\n */\n class ProductImages extends AccessibilityFocusTrapMixin {\n private gallery: typeof import('photoswipe');\n\n private backFocusElement: HTMLElement | undefined;\n\n private imageMode: string | undefined;\n\n prefs() {\n return {\n thumbnailsPerFrame: 4,\n thumbnailsZoomClass: 'm-zoomed-in',\n classesGlobalDialog: 'm-has_dialog',\n zoomLoop: false,\n zoomClickToCloseNonZoomable: false,\n zoomCloseElClasses: '',\n closeOnScroll: false,\n predefinedHeight: 1773,\n predefinedWidth: 1333,\n barsSizeBottom: 'auto',\n barsSizeTop: 24,\n showHideOpacity: true,\n ...super.prefs()\n };\n }\n\n init() {\n super.init();\n this.onDestroy(() => {\n if (this.gallery) {\n this.gallery.close();\n this.gallery.destroy();\n this.gallery = undefined;\n }\n });\n }\n\n /**\n * @description Render product images\n * @param product - product object\n * @returns Promise object represents product images rendering result\n */\n renderImages(product): Promise<void|null> {\n if (product.images && product.images.large) {\n product.images.large.forEach(element => {\n const zoomImage = product.zoomImages.zoom && product.zoomImages.zoom[element.index];\n\n element.zoomUrl = zoomImage && zoomImage.url;\n });\n\n return this.render('galleryTemplate', product,\n this.ref('carouselInner')).then(() => {\n this.update();\n });\n } else {\n return Promise.resolve(null);\n }\n }\n\n /**\n * @description Handler to sync main carousel with thumbnails carousel\n * @param el - event source element\n * @param page - current page number\n */\n onImageCarouselPageChanged(el: IRefElement, page: number): void {\n this.getById('imagesThumbnails', (carousel: ICarousel) => {\n if (this.imageMode !== IMAGE_MODE_ZOOM) {\n carousel\n .markCurrentPage(page)\n .scrollIntoView();\n }\n });\n }\n\n /**\n * @description Handle thumbs click to sync zoom and thumbs state\n * @param el - event source element\n * @param page - current page number\n */\n onThumbnailCarouselPageClicked(el : IRefElement, page: number): void {\n this.getById('imagesCarousel', (carousel: ICarousel) => carousel.scrollToPage(page));\n\n if (this.imageMode === IMAGE_MODE_ZOOM && this.gallery) {\n this.gallery.goTo(page);\n }\n\n this.getById('imagesThumbnails', (carousel: ICarousel) => {\n carousel\n .markCurrentPage(page)\n .scrollIntoView();\n });\n }\n\n /**\n * @description reset gallery state on PDP update\n */\n update(): void {\n this.getById('imagesThumbnails', (carousel: ICarousel) => carousel\n .update()\n .scrollToPage(0)\n .markCurrentPage(0));\n\n this.getById('imagesCarousel', (carousel: ICarousel) => carousel\n .update()\n .scrollToPage(0));\n }\n\n /**\n * @description Get URL from data-original-src attribute.\n * Load original image by URL. Get original size.\n * The image element should have data-original-src attribute with original image URL.\n * @returns return new Promise with image sizes\n */\n getOriginalImageSize(): Promise<{ originalHeight: number, originalWidth: number }> {\n return new Promise((resolve) => {\n const imgCarousel = <ICarousel> this.getById('imagesCarousel', (carousel: ICarousel) => carousel);\n const predefinedSize = {\n originalHeight: this.prefs().predefinedHeight,\n originalWidth: this.prefs().predefinedWidth\n };\n\n if (!imgCarousel) {\n resolve(predefinedSize);\n } else {\n const firstImage = this.getCarouselImages()[0];\n\n if (firstImage.dataset.originalSrc) {\n const img = new Image();\n\n img.addEventListener('load', () => resolve({ originalHeight: img.height, originalWidth: img.width }));\n img.addEventListener('error', () => resolve(predefinedSize));\n img.src = firstImage.dataset.originalSrc;\n } else {\n resolve(predefinedSize);\n }\n }\n });\n }\n\n /**\n * @description Add focus trap functionality in the opened zoom dialog to prevent background elements focusing\n */\n addFocusTrap(): void {\n this.backFocusElement = document.activeElement instanceof HTMLElement ? document.activeElement : document.body;\n this.addFocusTraps();\n this.afterShowModal();\n }\n\n /**\n * @description Does all the work to init photoswipe and show it\n * @param {typeof import('photoswipe')} PhotoSwipe - PhotoSwipe library class\n * @param {typeof import('photoswipe/dist/photoswipe-ui-default')} PhotoSwipeUI - PhotoSwipeUI_Default library class\n * @param {{originalWidth: string, originalHeight:string}} originalImageSize Object with original image width and height\n */\n initAndShowZoom(PhotoSwipe, PhotoSwipeUI, { originalWidth, originalHeight }): void {\n const pswpElement = document.querySelectorAll('.pswp')[0];\n const imgCarousel = <ICarousel> this.getById('imagesCarousel', (carousel: ICarousel) => carousel);\n const thumbnailsCarousel = <ICarousel> this.getById('imagesThumbnails', (thumbnails: ICarousel) => thumbnails);\n\n if (!imgCarousel || !(pswpElement instanceof HTMLElement)) {\n return;\n }\n\n pswpElement.setAttribute('data-tau', 'zoom_dialog');\n\n const items = this.getCarouselImages().map((element: HTMLImageElement) => {\n return {\n src: element.dataset.originalSrc,\n w: originalWidth || element.naturalWidth,\n h: originalHeight || element.naturalHeight\n };\n });\n\n const prefs = this.prefs();\n\n const options = {\n index: imgCarousel.getCurrentPageIndex(),\n barsSize: { top: prefs.barsSizeTop, bottom: prefs.barsSizeBottom },\n loop: prefs.zoomLoop,\n history: false,\n clickToCloseNonZoomable: prefs.zoomClickToCloseNonZoomable,\n closeElClasses: prefs.zoomCloseElClasses.split(','),\n closeOnScroll: prefs.closeOnScroll,\n showHideOpacity: prefs.showHideOpacity\n };\n\n const gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI, items, options);\n\n gallery.listen('close', () => this.onZoomClosed());\n\n gallery.listen('doubleTap', () => {\n const isZoomIn = gallery.getZoomLevel() === 1; // When double tap event reported we actually have previous state\n\n pswpElement.classList.toggle('pswp--zoomed-in', !isZoomIn);\n });\n\n gallery.listen('beforeChange', () => {\n const currentPage = gallery.getCurrentIndex();\n\n imgCarousel.scrollToPage(currentPage);\n\n if (thumbnailsCarousel) {\n thumbnailsCarousel.markCurrentPage(currentPage).scrollIntoView();\n }\n });\n\n gallery.init();\n\n this.gallery = gallery;\n\n this.imageMode = IMAGE_MODE_ZOOM;\n\n if (thumbnailsCarousel) {\n this.toggleZoomState(true);\n }\n\n this.addGlobalDialogClass();\n this.addFocusTrap();\n\n if (thumbnailsCarousel) {\n thumbnailsCarousel.updateCarouselMetric();\n thumbnailsCarousel.updateCarouselState();\n }\n }\n\n /**\n * @description Click handler on image from large images carousel\n * @returns {Promise} - Promise that fulfills when all of the promises passed as an iterable have been fulfilled\n */\n loadPhotoswipeDependencies(): Promise<typeof import('photoswipe')> {\n return Promise.all([\n import(/* webpackChunkName: 'photoswipe' */'photoswipe'),\n import(/* webpackChunkName: 'photoswipe' */'photoswipe/dist/photoswipe-ui-default.js'),\n this.getOriginalImageSize()\n ]);\n }\n\n /**\n * @description Click handler on image from large images carousel\n * @listens dom#click\n */\n onImageCarouselPageClicked(): void {\n this.zoom();\n }\n\n /**\n * @description Click handler for \"zoom\" icon\n * @listens dom#click\n */\n openZoom() {\n this.zoom();\n }\n\n /**\n * @description Generic method to open zoom popup\n */\n zoom(): void {\n this.loadPhotoswipeDependencies()\n .then(([PhotoSwipe, PhotoSwipeUI, originalImageSize]) => {\n this.initAndShowZoom(PhotoSwipe.default, PhotoSwipeUI.default, originalImageSize);\n });\n }\n\n /**\n * @description \"Close\" photoswipe popup icon click handler\n * @listens dom#click\n */\n closeZoom(): void {\n if (this.gallery) {\n this.gallery.close();\n\n const thumbnailsCarousel = <ICarousel> this.getById(\n 'imagesThumbnails',\n (thumbnails: ICarousel) => thumbnails\n );\n\n if (thumbnailsCarousel) {\n thumbnailsCarousel.updateCarouselMetric();\n thumbnailsCarousel.updateCarouselState();\n }\n }\n\n const pswpElement = document.querySelectorAll('.pswp')[0];\n\n pswpElement?.removeAttribute('data-tau');\n }\n\n /**\n * @description Zoom Keydown Event handler\n * @listens dom#keydown\n * @param _ Source of keydown event\n * @param event Event object\n */\n closeZoomKeydown(_: IRefElement, event: KeyboardEvent): void {\n if (event.keyCode === keyCode.ENTER || event.keyCode === keyCode.SPACE) {\n event.stopPropagation();\n event.preventDefault();\n this.closeZoom();\n }\n }\n\n /**\n * @description Sets image mode / do some DOM modifications after zoom closed\n */\n onZoomClosed(): void {\n this.toggleZoomState(false);\n\n this.imageMode = IMAGE_MODE_CAROUSEL;\n this.removeGlobalDialogClass();\n\n if (this.backFocusElement) {\n this.backFocusElement.focus();\n this.backFocusElement = undefined;\n }\n }\n\n /**\n * @description Add Global Dialog Class\n */\n addGlobalDialogClass(): void {\n const html = this.ref('html');\n\n if (!html.hasClass(this.prefs().classesGlobalDialog)) {\n html.addClass(this.prefs().classesGlobalDialog);\n }\n }\n\n /**\n * @description Remove Global Dialog Class\n */\n removeGlobalDialogClass(): void {\n this.ref('html').removeClass(this.prefs().classesGlobalDialog);\n }\n\n /**\n * @description Enter / space handler to initiate zoom popup\n * @listens dom#keydown\n * @param _el event source element\n * @param event event instance if DOM event\n */\n handleKeydown(_el: IRefElement, event: KeyboardEvent): void {\n if (event.keyCode === keyCode.ENTER || event.keyCode === keyCode.SPACE) {\n event.preventDefault();\n event.stopPropagation();\n this.zoom();\n }\n }\n\n /**\n * @description Get list of main carousel product images\n */\n getCarouselImages(): Array<HTMLImageElement> {\n const imgCarousel = <ICarousel> this.getById('imagesCarousel', (carousel: ICarousel) => carousel);\n const imagesContainer: HTMLElement | undefined = imgCarousel.ref(imgCarousel.prefs().elemCarouselTrack).get();\n\n return [].slice.call(imagesContainer?.querySelectorAll('img')) || [];\n }\n\n /**\n * @description Toggle Zoom state on Thumbnails carousel\n * @param state flag for toggle zoom state\n */\n toggleZoomState(state: boolean): void {\n const thumbnails = <ICarousel> this.getById('imagesThumbnails',\n (thumbnailsCarousel: ICarousel) => thumbnailsCarousel);\n\n thumbnails.ref('self').toggleClass(this.prefs().thumbnailsZoomClass, state);\n }\n }\n\n return ProductImages;\n}\n","import { TWidget } from 'widgets/Widget';\nimport { scrollWindowTo } from 'widgets/toolbox/scroll';\n\n/**\n * @param Widget Base widget for extending\n * @returns Product Set widget\n */\nexport default function (Widget: TWidget) {\n /**\n * @category widgets\n * @subcategory product\n * @class ProductSet\n * @augments Widget\n * @classdesc Represents product set component with the next features:\n * 1. Scrolls page to the product list, once `Show the collection` button pressed.\n *\n * @example <caption>Example of product set component usage</caption>\n *\n * <div\n data-widget=\"productSet\"\n ...\n >\n ...\n <div class=\"l-pdp\" data-ref=\"productsContainer\">\n ....\n </div>\n <div class=\"l-pdp-main m-product_set_buy_all\">\n ....\n </div>\n </div>\n */\n class ProductSet extends Widget {\n /**\n * @description Returns Widget configuration object\n * @returns {object} Widget configuration object\n */\n prefs() {\n return {\n productDetailId: 'productDetail-0',\n ...super.prefs()\n };\n }\n\n /**\n * @description Scrolls page to the products list and set focus on first product item\n * @returns {void}\n */\n onShopCollection() {\n const productsContainer = this.ref('productsContainer').get();\n\n if (productsContainer) {\n this.getById(this.prefs().productDetailId, (productDetail) => {\n productDetail.getById('productName', (productName) => {\n productName.ref('titleLink').focus();\n });\n });\n scrollWindowTo(productsContainer, true);\n }\n }\n }\n\n return ProductSet;\n}\n","import { RefElement } from 'widgets/toolbox/RefElement';\n\ntype IVideo = InstanceType<ReturnType<typeof import('widgets/global/Video').default>>;\ntype ICarousel = InstanceType<ReturnType<typeof import('widgets/global/Carousel').default>>;\n\n/**\n * @description Base ProductVideoMixin implementation\n * @param ProductImages Base widget for extending\n */\nexport default function (ProductImages: ReturnType<typeof import('widgets/product/ProductImages').default>) {\n /**\n * @class ProductVideoMixin\n * @augments ProductImages\n * @subcategory product\n * @classdesc Represents product video with the next features:\n * 1. Show video element and start to play the video when the video thumbnail is clicked\n * 2. Hide video element and stop the video to when an image thumbnail is clicked\n */\n class ProductVideoMixin extends ProductImages {\n /**\n * @description Show video element and start to play the video when the video thumbnail is clicked\n */\n showVideoElement(): void {\n this.getById('imagesCarousel', (carousel) => {\n carousel.ref('elemVideoWrapper').show().focus();\n\n // Start playing video\n const elemVideo = <HTMLIFrameElement> carousel.ref('elemVideo').get();\n\n if (elemVideo && elemVideo.contentWindow) {\n const { contentWindow } = elemVideo;\n\n contentWindow.postMessage('{\"event\":\"command\",\"func\":\"playVideo\",\"args\":\"\"}', '*');\n }\n });\n\n this.getById<ICarousel>('imagesThumbnails', (carousel) => {\n carousel.markCurrentPage(-1);\n });\n }\n\n /**\n * @description Hide video element and stop the video to when an image thumbnail is clicked\n */\n hideVideoElement(): void {\n this.getById<IVideo>('videoThumbnail', (videoThumbnail) => {\n videoThumbnail.hideVideo();\n });\n\n this.getById('imagesCarousel', (carousel) => {\n carousel.ref('elemVideoWrapper').hide();\n\n // Stop playing video\n const elemVideo = <HTMLIFrameElement> carousel.ref('elemVideo').get();\n\n if (elemVideo && elemVideo.contentWindow) {\n const { contentWindow } = elemVideo;\n\n contentWindow.postMessage('{\"event\":\"command\",\"func\":\"stopVideo\",\"args\":\"\"}', '*');\n }\n });\n }\n\n /**\n * @description Hide video element when image thumbnail is clicked\n * @param el - event source element\n * @param page - current page number\n */\n onThumbnailCarouselPageClicked(el: RefElement, page: number): void {\n super.onThumbnailCarouselPageClicked(el, page);\n\n this.hideVideoElement();\n }\n\n /**\n * @description Hide video element when clicking on image thumbnail or selecting thumbnail from the keyboard\n * @param el - event source element\n * @param page - current page number\n */\n onImageCarouselPageChanged(el: RefElement, page: number) {\n super.onImageCarouselPageChanged(el, page);\n\n this.hideVideoElement();\n }\n }\n\n return ProductVideoMixin;\n}\n","import { setCookie, getCookie } from '../toolbox/cookie';\n\nconst DO_NOT_TRACKED_COOKIE = 'dw_dnt';\nconst RECENTLY_VIEWED_ENTRY = 'recentlyViewed';\nconst RECENTLY_VIEWED_ITEMS_LIMIT = 12;\n\n/**\n * @description Base RecentlyViewedMixin implementation\n * @param ProductDetail widget for extending\n * @returns Recently Viewed Mixin\n */\nexport default function (ProductDetail: ReturnType<typeof import('widgets/product/ProductDetail').default>) {\n /**\n * @class RecentlyViewedMixin\n * @augments ProductDetail\n * @subcategory product\n * @classdesc Represents RecentlyViewed functionality.\n * Uses only if Einstein recently viewed functionality for some reason cannot be used. Implement next features:\n * 1. Checks if products tracking allowed\n * 2. Stores product IDs (based on visited pages) in the cookie `recentlyViewed` if tracking allowed\n * @property {boolean} data-recently-viewed-tracking-allowed - determines if recently view tracking allowed based on preference\n * @property {string} data-master-pid - master product ID\n */\n class RecentlyViewedMixin extends ProductDetail {\n prefs() {\n return {\n recentlyViewedTrackingAllowed: false,\n masterPid: '',\n ...super.prefs()\n };\n }\n\n init() {\n super.init();\n\n this.trackViewedItem(this.prefs().masterPid);\n }\n\n /**\n * @description Determines if recently viewed tracking allowed\n * @returns {boolean} result\n */\n isTrackingAllowed() {\n return (Number(getCookie(DO_NOT_TRACKED_COOKIE)) !== 1) && this.prefs().recentlyViewedTrackingAllowed;\n }\n\n /**\n * @description Saves visited product IDs to cookies\n * @param {Array} arr - array with product IDs of visited products\n * @returns {void}\n */\n saveViewedItems(arr = []) {\n setCookie(RECENTLY_VIEWED_ENTRY, arr.join('|'), 0, true);\n }\n\n /**\n * @description Parses visited product IDs from the string\n * @param {string} str - string with product IDs\n * @returns {Array} result - array with product IDs\n */\n getViewedItems(str = '') {\n if (!str) {\n return [];\n }\n\n return str.split('|');\n }\n\n /**\n * @description Saves visited product to cookies\n * @param {string} pid - visited master product ID\n * @returns {void}\n */\n trackViewedItem(pid = '') {\n if (!pid || !this.isTrackingAllowed()) {\n return;\n }\n\n let trackedProducts = this.getViewedItems(getCookie(RECENTLY_VIEWED_ENTRY));\n\n trackedProducts = trackedProducts.filter(viewedItem => viewedItem !== pid);\n\n trackedProducts.unshift(pid);\n\n if (trackedProducts.length > RECENTLY_VIEWED_ITEMS_LIMIT) {\n trackedProducts = trackedProducts.slice(1, RECENTLY_VIEWED_ITEMS_LIMIT);\n }\n\n // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'string[]' is not assignable to p... Remove this comment to see the full error message\n this.saveViewedItems(trackedProducts);\n }\n }\n\n return RecentlyViewedMixin;\n}\n"],"names":["timeout","BaseBackInStock","BackInStock","onSubmitted","data","success","redirectUrl","window","location","assign","error","setError","Array","isArray","join","fields","Object","entries","forEach","name","errorMsg","getById","input","emit","ref","hide","show","submitFormJson","AjaxForm","EVoucherDataForm","handleNoop","submitData","pliUUID","submitting","getFormUrl","getFormFields","attr","then","bind","catch","onError","finally","afterSubmission","debounce","Widget","CuttableContent","prefs","moreClass","activeClass","showMore","showLess","maxHeight","useLess","init","toggleButton","opened","ev","onRefresh","has","button","content","prop","removeClass","addClass","toggleContent","link","toggleClass","setText","AddAllToCartMixinBase","AddAllToCartMixin","classesBusy","getProductSetItems","productSetItems","eachChild","child","productSetItem","productSetSelected","isOutOfStock","addToCart","push","pid","currentProductId","quantity","selectedQuantity","available","readyToOrder","SET_ITEM_SELECTED_VALUE","productSelected","isAllProductAdded","addToCartResult","productsCount","messages","length","getPostAddToCartMessage","showAccessibilityAlerts","message","accessibilityAlerts","addedsettocart","isAddedToCartProductSet","currentProductSet","productID","toString","getAddedToCartProductSets","cartModel","pidsObj","pidIDs","map","pidObj","addedSetItemsIDs","filter","pidID","itemsIds","includes","productWidgets","reduce","setWidgets","postAddAllToCart","response","isFullProductSet","cart","showMinicart","showMinicartOnProductAdd","getPidsObj","isAllProductsAdded","showAddAllToCartAlert","showJustAddedProductCart","eventBus","subscriptionID","action","showMessageOnProductAdd","showCartMessage","numItems","showProgressBar","contexts","hideProgressBar","msg","addToCartMsg","spacesLength","concat","zeroWidthSpaceSymbol","render","BaseAlternativeImage","AlternativeImage","getAlternativeImageSrc","altImageUrl","baseImage","get","HTMLImageElement","baseImageUrl","currentSrc","src","altImageUrlParsed","URL","baseImageUrlParsed","disQueryString","search","origin","pathname","Availability","pdpAvailability","openBackInStockDialog","backInStockDialogTemplate","wrapperClasses","windowClasses","getAvailability","setAvailability","setPref","JSON","stringify","InputCheckbox","BuyTogetherCheckbox","disableCheckbox","preselectCheckbox","unselectCheckbox","SetProductDetail","BuyTogetherProduct","productAvailable","recommenderProduct","recommendationProductId","lowStockMessage","recommendationAvailable","preselectProduct","selectedClass","selectProduct","afterChangeAttribute","product","id","getRecommendationProductId","updateProductSelection","selectionFlag","updateAvailabilitySection","isProductSelected","buyTogetherRecommender","selected","disabled","updateAvailabilityBadge","isReachedLimit","isInaccessibleVariant","availability","isLowStock","plpAvailability","stock","replace","renderingData","reachedLimitMessage","isReachedLimitMessage","hasPromotions","promotions","updateQuantity","config","quantityBlock","updateTotal","subtotal","productSetPriceBlock","priceBlock","price","getJSONByUrl","ProductSet","preselectFirstCollection","preselectRecommendations","selectRecommendationItemUrl","updateBuyTogetherItemsUrl","priceState","initEvents","initRecommendationTotal","on","updatePriceTotal","togglePriceTotals","manageAddSetToCart","getBuyTogetherItems","buyTogetherProduct","getConstructor","recommendations","getSelectedRecommendations","recommendationItems","selectedRecommendations","recommendationItem","getRecommender","getSelectedBuyTogetherItems","selectedBuyTogetherItems","getSelectedRecommendationIDs","recommendationIDs","selectedRecommendation","getProductId","setItem","childProduct","qty","getRecommendationsVariants","selectedRecommendationVariants","recommendationVariants","recommendationItemID","recommendationVariantID","priceTotal","recommendation","updateRecommendationItems","buyTogetherRecommendationID","recommendationQuantity","isBuyTogetherRecommendationsUnavailable","allRecommendations","every","hasSelectedProducts","selectedProducts","handleAvailabilityRecommendationSet","total","zeroPrice","hasAnySelectedProducts","handleSelectedProductResult","handleUpdateRecommendation","updatedProductID","recommendationID","recommendationVariant","find","handleUpdateCollectionResult","onProductSelected","recommendationsVariants","currentCollection","collectionSelector","getValue","recommenderProductID","selectedCollection","onUpdateCollection","updateRecommendation","updatedProduct","BaseColorSwatch","ColorSwatch","classesShowAll","isSelectedOptionHidden","toggleView","values","refs","some","showAll","BaseAddToCartMixin","EProductAddToCartMixin","removeProductUrl","eproductType","validateAndSubmit","doAddToCart","eVoucherData","processingRequest","textSelectOptions","textStockLimit","startProcess","addToCartBtnPrefs","amount","getEProductAmount","addToCartUrl","options","getSelectedProductOptions","childProducts","prepareChildProducts","bundledProducts","postAddProduct","stopProcess","textNetworkError","eVoucherFormErrors","eVoucherDataForm","AddToCartMixin","EProductJustAddedProductToCartMixin","justAddedRecommendationAddToCart","addJustAddedProductRecommendation","justAddedProductCart","isEProductAddedFromWishlist","subscriptionUUID","postAddProductAvailability","showMiniCart","addLinkedSubscriptionObj","params","isLinkedSubscription","subscriptionProduct","subscriptionPidObj","linkedSubscriptionId","isIdeaProduct","productModel","items","item","isIdea","showAlertOnProductAdd","accessibilityAlert","addedtocart","result","justAddedItems","justAddedItem","pop","isEVoucher","isGiftCard","isAddedFromWishList","BaseProductDetail","EProductProductDetail","otherAmountSelected","cb","customAmountInput","customAmount","pass1","shown","validate","pass2","otherAmount","otherAmountValue","parseInt","eproductAmount","updateProduct","updateBtn","doUpdateProduct","productOption","productOptions","selectedOptions","isSelectedOptionsValid","validateProductOptions","Promise","resolve","uuid","getAdditionalProductData","afterUpdateProduct","changeAmount","selectWidget","getSelectedOptions","setValue","setRequired","focus","PlusProductAddToCartMixin","addedToCartLabel","addToCartBtn","localStorageWrapper","ProductDetail","PlusProductDetail","updateAddToCartBtn","itemIds","getItem","isCustomerSubscribed","enable","addToCartLabel","scrollWindowTo","getContentByUrl","showErrorLayout","submitFormJsonWithAbort","CLICK_EVENT_ID","GTM_EVENT_NAME","GTM_LABEL_SELECTOR","REVIEWS_REF_ID","ProductDetailBase","addToCartMsgSticky","addToCartStickyHeader","ingredientsSection","descriptions","pdpSlots","storeChangedUrl","slotsUrl","handleProductAvailability","updateQuantityWithLimit","loadAnalytics","productRecommendations","isProductAvailableForHomeDelivery","setInputValue","filterInput","currentValue","updateProductView","updateRecommendations","productName","renderUnit","renderLargeItemBadge","wrapper","document","createElement","innerHTML","slot","slotRef","slotContentFromResponse","querySelector","empty","prepend","remove","updateRatings","ratingSummary","productRedirectUrl","reviews","ratings","index","starObj","position","rating","isFull","Math","ceil","isHalf","isEmpty","productRatings","selectedProductUrl","renderAvailability","availabilityClass","class","inStockMsg","productAvailabilityMsg","availabilityLabel","backInStockSubscriptionEnabled","backInStockSubscription","isEnabled","priceUnit","pricePerUOM","largeItemBadge","scrollToReviews","onPreferredStoreSelected","renderQuantities","callIfExists","availabilityObject","getProductAvailabilityObject","updateIngredients","ingredients","append","changeAttribute","changeAttributeID","requestObject","undefined","isQuantityUpdate","changeAttributeRequests","all","req","promise","afterChangeQuantity","e","indexOf","splice","quantities","currentQty","max","min","step","update","actionUrl","prepareProductSpecification","specifications","specification","sustVegan","value","FSCIcon","hazardousIcons","washcare","default","prepareProductDetailAttributes","renderProductDescriptions","descriptionsAccordion","reinit","disableHistory","updateHistoryState","updateProductQuantityView","triggerChangeAttributeEvent","currentGtmInfo","gtmInfo","setGtmInfo","renderPrice","renderPromotions","showRelatedIdeasClick","el","event","eventCategory","eventAction","eventLabel","parse","getSimilarProductsCarouselHeader","topSlotText","topSlotRef","ccStoreTopSlotAvailabilityText","ccTopSlotAvailabilityText","oosTopSlotAvailabilityText","virtualPageLoad","analyticsPageData","ProductDetailContainer","classesStandardHeader","similarProductsCarouselPlace","productDetail","widget","headerText","hideTopSlot","hideBottomSlot","showTopSlot","showBottomSlot","availableCC","topSlot","headerOnly","topSlotHeader","topSlotCarousel","standardHeader","onProductViewUpdated","IMAGE_MODE_ZOOM","IMAGE_MODE_CAROUSEL","GLOBAL_DIALOG","keyCode","freeze","SPACE","ENTER","ProductImagesBase","ProductImages","renderImages","video","images","large","imageLength","initAndShowZoom","PhotoSwipe","PhotoSwipeUI","originalWidth","originalHeight","page","pswpElement","querySelectorAll","imgCarousel","carousel","thumbnailsCarousel","thumbnails","HTMLElement","carouselImages","getCarouselImages","setAttribute","from","element","dataset","originalSrc","w","naturalWidth","h","naturalHeight","carouselSlideHTML","html","thumbnailsPerFrame","thumbnailsZoomClass","classesGlobalDialog","zoomLoop","zoomClickToCloseNonZoomable","zoomCloseElClasses","closeOnScroll","predefinedHeight","predefinedWidth","barsSizeBottom","barsSizeTop","showHideOpacity","barsSize","top","bottom","loop","history","clickToCloseNonZoomable","closeElClasses","split","isClickableElement","tagName","gallery","listen","onZoomClosed","isZoomIn","getZoomLevel","classList","toggle","currentPage","getCurrentIndex","scrollToPage","markCurrentPage","scrollIntoView","updateCurrentItem","currentIndex","template","add","currItem","zoomToOriginal","zoomTo","destZoomLevel","centerPoint","speed","easingFn","updateFn","initialZoomLevel","call","originalGalleryDestroy","destroy","destroyed","imageMode","toggleZoomState","addGlobalDialogClass","addFocusTrap","onImageCarouselPageClicked","elem","zoom","loadPhotoswipeDependencies","originalImageSize","closeZoom","close","updateCarouselMetric","updateCarouselState","getOriginalImageSize","predefinedSize","firstImage","img","Image","addEventListener","height","width","imagesContainer","elemCarouselTrack","slice","handleKeydown","_el","preventDefault","stopPropagation","onImageCarouselPageChanged","hasClass","removeGlobalDialogClass","backFocusElement","state","activeElement","body","ProductSetBase","productSetInfoUrl","textShowMore","textShowLess","textViewedProductsSm","textViewedProductsLg","textViewedProductsAll","classesAllProducts","updateSetPriceTotal","handleMoreIdeasLink","showMoreIdeas","showMoreIdeasSecondLink","print","setPriceState","zeroPriceState","productsSelected","productSetId","productSetSelectedProducts","onChangeAttribute","addSetToCart","toggleProductsView","productsContainer","BaseRecentlyViewedMixin","RecentlyViewedMixin","trackViewedItem","refinedPid","appendParamsToUrl","setSelectProduct","productType","selectProductMethod","updateCallOut","requestURL","partOfProductSet","onProductSelect","Specifications","currentProduct","getElementById","currentProductSpecifications","getAttribute","itemsSpecs","addHeadings","parseData","rows","spec","obj","renderItemSpecs","BaseAddToWishlistMixin","EProductAddToWishlistMixin","wishlistButtonClickHandler","isActive","removeProductFromWishlist","addToWishlist","addButton","addToWishlistUrl","sfccData","wishlistActionUrls","customOptionValue","optionId","optionVal","selectedValueId","getCustomOptionValue","busy","addToWishlistMsg","labelAddToWishlistMsg","handleSuccess","showWishlistMessage","unbusy","updateProductId","productId","backInStockProductId","addToCartGlobalMsg","handleUnselectedProduct","unselectedProduct","onAddAllToCart","onProductItemUpdated","RefElement","selectColor","option","selectedOption","backInStock","outOfStockLabel","updateLabel","quantitychanged","optionselected","variationselected","isCustomOption","isCustomOptionSelected","renderVariationAttributes","renderProductOptions","renderName","updateSocialLinks","updateViewFullProductURL","renderingResult","CUSTOM_OPTION_VALUE_ID","productOptionId","previousCustomOptionValue","customOptionText","val","variationAttributes","variationAttribute","selectable","attributeId","attribute","onProductLinkClick","productImages","keys","socialLinks","socialKey","dismissQty","request","abortController","abort","showAlert","productOptionsSelect","replaceState","AccessibilityFocusTrapMixin","onDestroy","zoomImage","zoomImages","zoomUrl","url","onThumbnailCarouselPageClicked","goTo","addFocusTraps","afterShowModal","getCurrentPageIndex","openZoom","removeAttribute","closeZoomKeydown","_","productDetailId","onShopCollection","ProductVideoMixin","showVideoElement","elemVideo","contentWindow","postMessage","hideVideoElement","videoThumbnail","hideVideo","setCookie","getCookie","DO_NOT_TRACKED_COOKIE","RECENTLY_VIEWED_ENTRY","RECENTLY_VIEWED_ITEMS_LIMIT","recentlyViewedTrackingAllowed","masterPid","isTrackingAllowed","Number","saveViewedItems","arr","getViewedItems","str","trackedProducts","viewedItem","unshift"],"sourceRoot":""}