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AE;MACxC,IAAI,OAAOa,OAAO,CAACb,GAAG,CAAC,KAAK,UAAU,EAAE;QACpCa,OAAO,CAACb,GAAG,CAAC,CAAC,CAAC;MAClB;IACJ,CAAC,CAAC;EACN;AACJ,CAAC;;;;;;UCZD;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;;;;;;ACtBa;;AAEb,IAAIc,cAAc,GAAG/T,mBAAO,CAAC,yHAAW,CAAC;AAEzCI,CAAC,CAAC8N,QAAQ,CAAC,CAAC8F,KAAK,CAAC,YAAY;EAC1BD,cAAc,CAAC/T,mBAAO,CAAC,qHAAkB,CAAC,CAAC;EAC3C+T,cAAc,CAAC/T,mBAAO,CAAC,4IAAoC,CAAC,CAAC;AACjE,CAAC,CAAC,C","sources":["webpack://roche-sfra/./custom/cartridges/app_custom_subscriptions/cartridge/client/default/js/product/subscription.js","webpack://roche-sfra/./custom/cartridges/app_custom_unified_portal/cartridge/client/default/js/components/modal.js","webpack://roche-sfra/./custom/cartridges/app_custom_unified_portal/cartridge/client/default/js/product/base.js","webpack://roche-sfra/./custom/cartridges/app_custom_unified_portal/cartridge/client/default/js/product/detail.js","webpack://roche-sfra/./storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/components/focus.js","webpack://roche-sfra/./storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/util.js","webpack://roche-sfra/webpack/bootstrap","webpack://roche-sfra/./custom/cartridges/app_custom_unified_portal/cartridge/client/default/js/productDetail.js"],"sourcesContent":["'use_strict';\r\n\r\nvar base = require('app_custom_unified_portal/product/base');\r\n\r\nmodule.exports = {\r\n updateAddToCartFormData() {\r\n $('body').on('updateAddToCartFormData', function (e, form) {\r\n if (\r\n $(\"input[name='purchaseType']:checked\").val() === 'subscription' ||\r\n $('.subscription-oop-option-only').length > 0\r\n ) {\r\n form.schedule = $(this).find('.product-schedule-select').val();\r\n }\r\n });\r\n // Trigger quantity selector update when changing the selected purchase type or the\r\n // selected subscription frequency\r\n $(\"input[name='purchaseType'], .product-schedule-select\").on('change', function () {\r\n var quantitySelector = base.getQuantitySelector();\r\n if (quantitySelector?.length) {\r\n // Pass true as parameter to hide all errors\r\n quantitySelector?.trigger('change', true);\r\n }\r\n });\r\n }\r\n};\r\n","/* eslint-disable prettier/prettier */\r\n\r\n'use strict';\r\n\r\n/**\r\n * Creates and shows a generic modal according to the passed parameters\r\n * @param {string} title - Modal title\r\n * @param {string} msg - Modal main text\r\n * @param {string} btnText - CTA button text\r\n * @param {string} btnAction - CTA button url. If not set, the button will act as a close button\r\n * @param {string} btnType - Class to give custom styles to the button\r\n * @param {boolean} openInNewTab - Open in a new tab if true\r\n * @param {string} secondaryBtnText - (Only if you need 2 buttons) CTA secondary button text (positioned to the right)\r\n * @param {string} secondaryBtnAction - (Only if you need 2 buttons) CTA secondary button url. If not set, the button\r\n * will act as a close button\r\n * @param {string} secondaryBtnType - (Only if you need 2 buttons) Class to give custom styles to the secondary button\r\n * @param {boolean} secondaryBtnOpenInNewTab - (Only if you need 2 buttons) Open the secondary button link in a new tab\r\n */\r\nfunction renderGenericCtaModal(\r\n title,\r\n msg,\r\n btnText,\r\n btnAction,\r\n btnType,\r\n openInNewTab,\r\n secondaryBtnText,\r\n secondaryBtnAction,\r\n secondaryBtnType,\r\n secondaryBtnOpenInNewTab\r\n) {\r\n // Remove previous modal if exists\r\n $('#ctaModal').remove();\r\n var modalHtml =\r\n '
' +\r\n '
' +\r\n '
' +\r\n '
' +\r\n `

${title || ''}

` +\r\n '
' +\r\n `
${msg || ''}
` +\r\n '
';\r\n $('body').append(modalHtml);\r\n // Initialize the modal\r\n $('body > .modal-backdrop').remove();\r\n $('body').removeClass('modal-open');\r\n $('#ctaModal').modal('show');\r\n}\r\n\r\nmodule.exports = {\r\n renderGenericCtaModal\r\n};\r\n","'use strict';\r\n\r\nvar focusHelper = require('base/components/focus');\r\nvar modalHelper = require('../components/modal');\r\n\r\n/**\r\n * Retrieves the relevant pid value\r\n * @param {jquery} $el - DOM container for a given add to cart button\r\n * @return {string} - value to be used when adding product to cart\r\n */\r\nfunction getPidValue($el) {\r\n var pid;\r\n\r\n if ($('#quickViewModal').hasClass('show') && !$('.product-set').length) {\r\n pid = $($el).closest('.modal-content').find('.product-quickview').data('pid');\r\n } else if ($('.product-set-detail').length || $('.product-set').length) {\r\n pid = $($el).closest('.product-detail').find('.product-id').text();\r\n } else {\r\n pid = $('.product-detail:not(\".bundle-item\")').data('pid');\r\n }\r\n\r\n return pid;\r\n}\r\n\r\n/**\r\n * Check the selected purchase option\r\n * @return {boolean} - True if subscription is selected\r\n */\r\nfunction isSubscriptionSelected() {\r\n return (\r\n $(\"input[name='purchaseType']:checked\").val() === 'subscription' ||\r\n $('.subscription-oop-option-only').length > 0\r\n );\r\n}\r\n\r\n/**\r\n * Get the right OTP/Subscription quantity selector\r\n * @return {string} - The quantity selector\r\n */\r\nfunction getCustomQuantitySelector() {\r\n return isSubscriptionSelected()\r\n ? '.quantity-select.subscription-quantity-selector'\r\n : '.quantity-select:not(.subscription-quantity-selector)';\r\n}\r\n\r\n/**\r\n * Retrieve contextual quantity selector\r\n * @param {jquery} $el - DOM container for the relevant quantity\r\n * @return {jquery} - quantity selector DOM container\r\n */\r\nfunction getQuantitySelector($el) {\r\n var quantitySelected;\r\n var quantitySelector = getCustomQuantitySelector();\r\n if ($el && $('.set-items').length) {\r\n quantitySelected = $($el).closest('.product-detail').find(quantitySelector);\r\n } else if ($el && $('.product-bundle').length) {\r\n var quantitySelectedModal = $($el).closest('.modal-footer').find('.quantity-select');\r\n var quantitySelectedPDP = $($el).closest('.bundle-footer').find('.quantity-select');\r\n if (quantitySelectedModal.val() === undefined) {\r\n quantitySelected = quantitySelectedPDP;\r\n } else {\r\n quantitySelected = quantitySelectedModal;\r\n }\r\n } else {\r\n quantitySelected = $(quantitySelector);\r\n }\r\n return quantitySelected;\r\n}\r\n\r\n/**\r\n * Retrieves the value associated with the Quantity pull-down menu\r\n * @param {jquery} $el - DOM container for the relevant quantity\r\n * @return {string} - value found in the quantity input\r\n */\r\nfunction getQuantitySelected($el) {\r\n return getQuantitySelector($el).val();\r\n}\r\n\r\n/**\r\n * Process the attribute values for an attribute that has image swatches\r\n *\r\n * @param {Object} attr - Attribute\r\n * @param {string} attr.id - Attribute ID\r\n * @param {Object[]} attr.values - Array of attribute value objects\r\n * @param {string} attr.values.value - Attribute coded value\r\n * @param {string} attr.values.url - URL to de/select an attribute value of the product\r\n * @param {boolean} attr.values.isSelectable - Flag as to whether an attribute value can be\r\n * selected. If there is no variant that corresponds to a specific combination of attribute\r\n * values, an attribute may be disabled in the Product Detail Page\r\n * @param {jQuery} $productContainer - DOM container for a given product\r\n * @param {Object} msgs - object containing resource messages\r\n */\r\nfunction processSwatchValues(attr, $productContainer, msgs) {\r\n attr.values.forEach(function (attrValue) {\r\n var $attrValue = $productContainer.find(`[data-attr=\"${attr.id}\"] [data-attr-value=\"${attrValue.value}\"]`);\r\n var $swatchButton = $attrValue.parent();\r\n\r\n if (attrValue.selected) {\r\n $attrValue.addClass('selected');\r\n $attrValue.siblings('.selected-assistive-text').text(msgs.assistiveSelectedText);\r\n } else {\r\n $attrValue.removeClass('selected');\r\n $attrValue.siblings('.selected-assistive-text').empty();\r\n }\r\n\r\n if (attrValue.url) {\r\n $swatchButton.attr('data-url', attrValue.url);\r\n } else {\r\n $swatchButton.removeAttr('data-url');\r\n }\r\n\r\n // Disable if not selectable\r\n $attrValue.removeClass('selectable unselectable');\r\n\r\n $attrValue.addClass(attrValue.selectable ? 'selectable' : 'unselectable');\r\n });\r\n}\r\n\r\n/**\r\n * Process attribute values associated with an attribute that does not have image swatches\r\n *\r\n * @param {Object} attr - Attribute\r\n * @param {string} attr.id - Attribute ID\r\n * @param {Object[]} attr.values - Array of attribute value objects\r\n * @param {string} attr.values.value - Attribute coded value\r\n * @param {string} attr.values.url - URL to de/select an attribute value of the product\r\n * @param {boolean} attr.values.isSelectable - Flag as to whether an attribute value can be\r\n * selected. If there is no variant that corresponds to a specific combination of attribute\r\n * values, an attribute may be disabled in the Product Detail Page\r\n * @param {jQuery} $productContainer - DOM container for a given product\r\n */\r\nfunction processNonSwatchValues(attr, $productContainer) {\r\n var $attr = `[data-attr=\"${attr.id}\"]`;\r\n var $defaultOption = $productContainer.find(`${$attr} .select-${attr.id} option:first`);\r\n $defaultOption.attr('value', attr.resetUrl);\r\n\r\n attr.values.forEach(function (attrValue) {\r\n var $attrValue = $productContainer.find(`${$attr} [data-attr-value=\"${attrValue.value}\"]`);\r\n $attrValue.attr('value', attrValue.url).removeAttr('disabled');\r\n\r\n if (!attrValue.selectable) {\r\n $attrValue.attr('disabled', true);\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Routes the handling of attribute processing depending on whether the attribute has image\r\n * swatches or not\r\n *\r\n * @param {Object} attrs - Attribute\r\n * @param {string} attr.id - Attribute ID\r\n * @param {jQuery} $productContainer - DOM element for a given product\r\n * @param {Object} msgs - object containing resource messages\r\n */\r\nfunction updateAttrs(attrs, $productContainer, msgs) {\r\n // Currently, the only attribute type that has image swatches is Color.\r\n var attrsWithSwatches = ['color'];\r\n\r\n attrs.forEach(function (attr) {\r\n if (attrsWithSwatches.indexOf(attr.id) > -1) {\r\n processSwatchValues(attr, $productContainer, msgs);\r\n } else {\r\n processNonSwatchValues(attr, $productContainer);\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Updates the availability status in the Product Detail Page\r\n *\r\n * @param {Object} response - Ajax response object after an\r\n * attribute value has been [de]selected\r\n * @param {jQuery} $productContainer - DOM element for a given product\r\n */\r\nfunction updateAvailability(response, $productContainer) {\r\n var availabilityValue = '';\r\n var availabilityMessages = response.product.availability.messages;\r\n if (!response.product.readyToOrder) {\r\n availabilityValue = `
  • ${response.resources.info_selectforstock}
  • `;\r\n } else {\r\n availabilityMessages.forEach(function (message) {\r\n availabilityValue += `
  • ${message}
  • `;\r\n });\r\n }\r\n\r\n $($productContainer).trigger('product:updateAvailability', {\r\n product: response.product,\r\n $productContainer,\r\n message: availabilityValue,\r\n resources: response.resources\r\n });\r\n}\r\n\r\n/**\r\n * Generates html for product attributes section\r\n *\r\n * @param {array} attributes - list of attributes\r\n * @return {string} - Compiled HTML\r\n */\r\nfunction getAttributesHtml(attributes) {\r\n if (!attributes) {\r\n return '';\r\n }\r\n\r\n var html = '';\r\n\r\n attributes.forEach(function (attributeGroup) {\r\n if (attributeGroup.ID === 'mainAttributes') {\r\n attributeGroup.attributes.forEach(function (attribute) {\r\n html += `
    ${attribute.label}: ${attribute.value}
    `;\r\n });\r\n }\r\n });\r\n\r\n return html;\r\n}\r\n\r\n/**\r\n * @typedef UpdatedOptionValue\r\n * @type Object\r\n * @property {string} id - Option value ID for look up\r\n * @property {string} url - Updated option value selection URL\r\n */\r\n\r\n/**\r\n * @typedef OptionSelectionResponse\r\n * @type Object\r\n * @property {string} priceHtml - Updated price HTML code\r\n * @property {Object} options - Updated Options\r\n * @property {string} options.id - Option ID\r\n * @property {UpdatedOptionValue[]} options.values - Option values\r\n */\r\n\r\n/**\r\n * Updates DOM using post-option selection Ajax response\r\n *\r\n * @param {OptionSelectionResponse} optionsHtml - Ajax response optionsHtml from selecting a product option\r\n * @param {jQuery} $productContainer - DOM element for current product\r\n */\r\nfunction updateOptions(optionsHtml, $productContainer) {\r\n // Update options\r\n $productContainer.find('.product-options').empty().html(optionsHtml);\r\n}\r\n\r\n/**\r\n * Dynamically creates Bootstrap carousel from response containing images\r\n * @param {Object[]} imgs - Array of large product images,along with related information\r\n * @param {jQuery} $productContainer - DOM element for a given product\r\n */\r\nfunction createCarousel(imgs, $productContainer) {\r\n var carousel = $productContainer.find('.carousel');\r\n $(carousel).carousel('dispose');\r\n var carouselId = $(carousel).attr('id');\r\n $(carousel)\r\n .empty()\r\n .append(\r\n '
      ${carousel.data('prev')}` +\r\n `` +\r\n `${carousel}`\r\n );\r\n for (var i = 0; i < imgs.length; i++) {\r\n $(\r\n `
      \"${\r\n
      `\r\n ).appendTo($(carousel).find('.carousel-inner'));\r\n $(`
    1. `).appendTo(\r\n $(carousel).find('.carousel-indicators')\r\n );\r\n }\r\n $($(carousel).find('.carousel-item')).first().addClass('active');\r\n $($(carousel).find('.carousel-indicators > li')).first().addClass('active');\r\n if (imgs.length === 1) {\r\n $($(carousel).find('.carousel-indicators, a[class^=\"carousel-control-\"]')).detach();\r\n }\r\n $(carousel).carousel();\r\n $($(carousel).find('.carousel-indicators')).attr('aria-hidden', true);\r\n}\r\n\r\n/**\r\n * Get current quantity already added to the cart for the current product and current purchase type\r\n * @param {number} qtyAlreadyInCart - Already added to the cart amount\r\n * @param {boolean} isProductInBasketSubscription - True if the product is added to the cart as a subscription\r\n * @param {boolean} isSubscription - True if the selected purchase type is subscription\r\n * @return {number} The quantity already added to the cart for the current purchase type and product\r\n */\r\nfunction getQtyInCartForPurchaseType(qtyAlreadyInCart, isProductInBasketSubscription, isSubscription) {\r\n var qtyInCart = 0;\r\n if (\r\n qtyAlreadyInCart &&\r\n ((isProductInBasketSubscription && isSubscription) || (!isProductInBasketSubscription && !isSubscription))\r\n ) {\r\n qtyInCart = qtyAlreadyInCart;\r\n }\r\n return qtyInCart;\r\n}\r\n\r\n/**\r\n * Parses JSON from Ajax call made whenever an attribute value is [de]selected\r\n * @param {Object} response - response from Ajax call\r\n * @param {Object} response.product - Product object\r\n * @param {string} response.product.id - Product ID\r\n * @param {Object[]} response.product.variationAttributes - Product attributes\r\n * @param {Object[]} response.product.images - Product images\r\n * @param {boolean} response.product.hasRequiredAttrsSelected - Flag as to whether all required\r\n * attributes have been selected. Used partially to\r\n * determine whether the Add to Cart button can be enabled\r\n * @param {jQuery} $productContainer - DOM element for a given product.\r\n * @param {boolean} updateImages - if true, the product images should be recreated\r\n */\r\nfunction handleVariantResponse(response, $productContainer, updateImages) {\r\n var isChoiceOfBonusProducts = $productContainer.parents('.choose-bonus-product-dialog').length > 0;\r\n var isVaraint;\r\n if (response.product.variationAttributes) {\r\n updateAttrs(response.product.variationAttributes, $productContainer, response.resources);\r\n isVaraint = response.product.productType === 'variant';\r\n if (isChoiceOfBonusProducts && isVaraint) {\r\n $productContainer.parent('.bonus-product-item').data('pid', response.product.id);\r\n\r\n $productContainer.parent('.bonus-product-item').data('ready-to-order', response.product.readyToOrder);\r\n }\r\n }\r\n\r\n if (updateImages) {\r\n // Update primary images\r\n var primaryImageUrls = response.product.images.large;\r\n createCarousel(primaryImageUrls, $productContainer);\r\n }\r\n\r\n // Update pricing\r\n if (!isChoiceOfBonusProducts) {\r\n var $totalPriceSelector = $('.product-total-price .price', $productContainer).length\r\n ? $('.product-total-price .price', $productContainer)\r\n : $('.product-total-price .price');\r\n $totalPriceSelector.replaceWith(response.totalPriceHtml);\r\n }\r\n\r\n // Update promotions\r\n $productContainer.find('.promotions').empty().html(response.product.promotionsHtml);\r\n\r\n updateAvailability(response, $productContainer);\r\n\r\n // Update attributes\r\n $productContainer.find('.main-attributes').empty().html(getAttributesHtml(response.product.attributes));\r\n}\r\n\r\n/**\r\n * Get all product quatities\r\n * @param {Object} product - The current product\r\n * @param {boolean} isSubscription - True if the selected purchase option is subscription\r\n * @param {jQuery} $productContainer - DOM container for a given product\r\n * @return {Object[]} The array of quantities to apply\r\n */\r\nfunction getAllQuantities(product, isSubscription, $productContainer) {\r\n if (isSubscription) {\r\n var selectedFrequency = $productContainer?.find('.product-schedule-select')?.val();\r\n if (selectedFrequency) {\r\n var possibleQuantities = product.subscriptionQuantities?.reduce((acc, val) => {\r\n if (acc.length === 0 && val.frequency === selectedFrequency) {\r\n return val.quantities;\r\n }\r\n return acc;\r\n }, []);\r\n return possibleQuantities?.length ? possibleQuantities : [];\r\n }\r\n }\r\n return product.quantities?.length ? product.quantities : [];\r\n}\r\n\r\n/**\r\n * Get all possible quantity options\r\n * @param {Object} product - The current product\r\n * @param {jQuery} $productContainer - DOM container for a given product\r\n * @param {boolean} isSubscription - True if subscription is the selected purchase type\r\n * @param {number} qtyInCart - The quantity already added to the cart for the current purchase type and product\r\n * @return {Object[]} The array of possible quantities to apply\r\n */\r\nfunction getQuantityOptions(product, $productContainer, isSubscription, qtyInCart) {\r\n var possibleQuantities = getAllQuantities(product, isSubscription, $productContainer);\r\n return possibleQuantities.reduce(function (acc, quantity, index) {\r\n // A quantity is only valid if, when whe suppress the quantity already in the cart, it still has a possitive\r\n // value. The last element will be always valid to ensure that we have at least 1 option in our select.\r\n if (parseInt(quantity.value, 10) - qtyInCart > 0 || index === possibleQuantities.length - 1) {\r\n acc.push(quantity);\r\n }\r\n return acc;\r\n }, []);\r\n}\r\n\r\n/**\r\n * Updates the quantity DOM elements post Ajax call\r\n * @param {Object} product - The current product\r\n * @param {jQuery} $productContainer - DOM container for a given product\r\n * @param {number} qtyAlreadyInCart - Already added to the cart amount\r\n * @param {boolean} isProductInBasketSubscription - True if the product is added to the cart as a subscription\r\n * @param {boolean} resetQuantity - If true, the product quantity selector is reset to the lowest quantity available\r\n * @param {boolean} disableCartForActiveSubs - True if the customer is already an active subscriber\r\n */\r\nfunction updateQuantities(\r\n product,\r\n $productContainer,\r\n qtyAlreadyInCart,\r\n isProductInBasketSubscription,\r\n disableCartForActiveSubs,\r\n resetQuantity\r\n) {\r\n if ($productContainer.parent('.bonus-product-item').length <= 0) {\r\n var isSubscription = isSubscriptionSelected();\r\n var qtyInCart = getQtyInCartForPurchaseType(qtyAlreadyInCart, isProductInBasketSubscription, isSubscription);\r\n var quantityOptions = getQuantityOptions(product, $productContainer, isSubscription, qtyInCart);\r\n var optionsHtml = quantityOptions\r\n .reduce(function (acc, quantity) {\r\n // The value we will use is the current option value's minus our quantity in the cart\r\n var currentValue =\r\n parseInt(quantity.value, 10) - qtyInCart > 0\r\n ? parseInt(quantity.value, 10) - qtyInCart\r\n : qtyInCart || 1;\r\n var selected =\r\n (resetQuantity && acc.length === 0) || (!resetQuantity && product.selectedQuantity) === currentValue\r\n ? ' selected '\r\n : '';\r\n // Adapt our url according to our final option value\r\n var currentUrl =\r\n qtyInCart > 0\r\n ? quantity.url.replace(/quantity=\\d+/g, `quantity=${currentValue.toString()}`)\r\n : quantity.url;\r\n acc.push(``);\r\n return acc;\r\n }, [])\r\n .join('');\r\n var quantitySelector = getQuantitySelector($productContainer);\r\n var previousValue = quantitySelector.val();\r\n quantitySelector.empty().html(optionsHtml);\r\n\r\n // Moved from handleVariantResponse, to take into account the quantity limitations when enabling/disabling\r\n // the add to cart button\r\n var isChoiceOfBonusProducts = $productContainer.parents('.choose-bonus-product-dialog').length > 0;\r\n if (isChoiceOfBonusProducts) {\r\n var $selectButton = $productContainer.find('.select-bonus-product');\r\n $selectButton.trigger('bonusproduct:updateSelectButton', { product, $productContainer });\r\n } else {\r\n var invalidQuantity = false;\r\n if (product && $productContainer) {\r\n // If the quantity added to the cart already equals the maximum amount, disable the add to cart button\r\n if (\r\n !quantityOptions?.length ||\r\n parseInt(quantityOptions[quantityOptions.length - 1].value, 10) <= qtyInCart\r\n ) {\r\n invalidQuantity = true;\r\n quantitySelector.trigger('product:showMaxError', qtyInCart);\r\n }\r\n var disableCartForSubs = disableCartForActiveSubs && isSubscription;\r\n // Enable \"Add to Cart\" button if all required attributes have been selected\r\n $('button.add-to-cart, button.add-to-cart-global, button.update-cart-product-global')\r\n .trigger('product:updateAddToCart', {\r\n product,\r\n $productContainer,\r\n invalidQuantity,\r\n disableCartForSubs\r\n })\r\n .trigger('product:statusUpdate', product);\r\n }\r\n }\r\n // End of code taken from handleVariantResponse function\r\n\r\n // If the new selected quantity is different, call Product-Variation again to update the total price\r\n if (previousValue !== quantitySelector.val()) {\r\n quantitySelector.trigger('change');\r\n } else {\r\n quantitySelector.trigger('product:updateQuantitySelectors');\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * updates the product view when a product attribute is selected or deselected or when\r\n * changing quantity\r\n * @param {string} selectedValueUrl - the Url for the selected variation value\r\n * @param {jQuery} $productContainer - DOM element for current product\r\n * @param {boolean} updateImages - if true, the product images should be recreated\r\n * @param {boolean} resetQuantity - if true, the product quantity selector is reset to the lowest quantity available\r\n */\r\nfunction attributeSelect(selectedValueUrl, $productContainer, updateImages = true, resetQuantity) {\r\n if (selectedValueUrl) {\r\n $('body').trigger('product:beforeAttributeSelect', { url: selectedValueUrl, container: $productContainer });\r\n var params = {\r\n issubscription:\r\n $(\"input[name='purchaseType']:checked\").val() === 'subscription' ||\r\n $('.subscription-oop-option-only').length > 0\r\n };\r\n $.ajax({\r\n url: selectedValueUrl,\r\n method: 'GET',\r\n data: params,\r\n success(data) {\r\n handleVariantResponse(data, $productContainer, updateImages);\r\n updateOptions(data.product.optionsHtml, $productContainer);\r\n updateQuantities(\r\n data.product,\r\n $productContainer,\r\n data.qtyAlreadyInCart,\r\n data.isProductInBasketSubscription,\r\n data.disableCartForActiveSubs,\r\n resetQuantity\r\n );\r\n $('body').trigger('product:afterAttributeSelect', { data, container: $productContainer });\r\n $.spinner().stop();\r\n },\r\n error() {\r\n $.spinner().stop();\r\n }\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Retrieves url to use when adding a product to the cart\r\n *\r\n * @return {string} - The provided URL to use when adding a product to the cart\r\n */\r\nfunction getAddToCartUrl() {\r\n return $('.add-to-cart-url').val();\r\n}\r\n\r\n/**\r\n * Parses the html for a modal window\r\n * @param {string} html - representing the body and footer of the modal window\r\n *\r\n * @return {Object} - Object with properties body and footer.\r\n */\r\nfunction parseHtml(html) {\r\n var $html = $('
      ').append($.parseHTML(html));\r\n\r\n var body = $html.find('.choice-of-bonus-product');\r\n var footer = $html.find('.modal-footer').children();\r\n\r\n return { body, footer };\r\n}\r\n\r\n/**\r\n * Retrieves url to use when adding a product to the cart\r\n *\r\n * @param {Object} data - data object used to fill in dynamic portions of the html\r\n */\r\nfunction chooseBonusProducts(data) {\r\n $('.modal-body').spinner().start();\r\n\r\n if ($('#chooseBonusProductModal').length !== 0) {\r\n $('#chooseBonusProductModal').remove();\r\n }\r\n var bonusUrl;\r\n if (data.bonusChoiceRuleBased) {\r\n bonusUrl = data.showProductsUrlRuleBased;\r\n } else {\r\n bonusUrl = data.showProductsUrlListBased;\r\n }\r\n\r\n var htmlString =\r\n '' +\r\n '
      ' +\r\n '' +\r\n '
      ` +\r\n '' +\r\n '
      ' +\r\n '
      ' +\r\n ` ${data.labels.selectprods}` +\r\n ' ' +\r\n '
      ' +\r\n '
      ' +\r\n '
      ' +\r\n '
      ' +\r\n '
      ' +\r\n '
      ';\r\n $('body').append(htmlString);\r\n $('.modal-body').spinner().start();\r\n\r\n $.ajax({\r\n url: bonusUrl,\r\n method: 'GET',\r\n dataType: 'json',\r\n success(response) {\r\n var parsedHtml = parseHtml(response.renderedTemplate);\r\n $('#chooseBonusProductModal .modal-body').empty();\r\n $('#chooseBonusProductModal .enter-message').text(response.enterDialogMessage);\r\n $('#chooseBonusProductModal .modal-header .close .sr-only').text(response.closeButtonText);\r\n $('#chooseBonusProductModal .modal-body').html(parsedHtml.body);\r\n $('#chooseBonusProductModal .modal-footer').html(parsedHtml.footer);\r\n $('#chooseBonusProductModal').modal('show');\r\n $.spinner().stop();\r\n },\r\n error() {\r\n $.spinner().stop();\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Updates the Mini-Cart quantity value after the customer has pressed the \"Add to Cart\" button\r\n * @param {string} response - ajax response from clicking the add to cart button\r\n */\r\nfunction handlePostCartAdd(response) {\r\n $('.minicart').trigger('count:update', response);\r\n var messageType = response.error ? 'alert-danger' : 'alert-success';\r\n // show add to cart toast\r\n if (response.newBonusDiscountLineItem && Object.keys(response.newBonusDiscountLineItem).length !== 0) {\r\n chooseBonusProducts(response.newBonusDiscountLineItem);\r\n } else if (response.modalData && Object.keys(response.modalData).length > 0) {\r\n modalHelper.renderGenericCtaModal(\r\n response.modalData.title,\r\n response.modalData.msg,\r\n // First button controls\r\n response.modalData.btnText,\r\n response.modalData.btnAction,\r\n response.modalData.btnType,\r\n response.modalData.openInNewTab,\r\n // Secondary button controls\r\n response.modalData.secondaryBtnText,\r\n response.modalData.secondaryBtnAction,\r\n response.modalData.secondaryBtnType,\r\n response.modalData.secondaryBtnOpenInNewTab\r\n );\r\n } else {\r\n if ($('.add-to-cart-messages').length === 0) {\r\n $('body').append('
      ');\r\n }\r\n\r\n $('.add-to-cart-messages').append(\r\n `
      ${response.message}
      `\r\n );\r\n if (messageType === 'alert-danger') {\r\n setTimeout(function () {\r\n $('.add-to-basket-alert').remove();\r\n }, 8000);\r\n } else {\r\n setTimeout(function () {\r\n $('.add-to-basket-alert').remove();\r\n }, 5000);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Retrieves the bundle product item ID's for the Controller to replace bundle master product\r\n * items with their selected variants\r\n *\r\n * @return {string[]} - List of selected bundle product item ID's\r\n */\r\nfunction getChildProducts() {\r\n var childProducts = [];\r\n $('.bundle-item').each(function () {\r\n childProducts.push({\r\n pid: $(this).find('.product-id').text(),\r\n quantity: parseInt($(this).find('label.quantity').data('quantity'), 10)\r\n });\r\n });\r\n\r\n return childProducts.length ? JSON.stringify(childProducts) : [];\r\n}\r\n\r\n/**\r\n * Retrieve product options\r\n *\r\n * @param {jQuery} $productContainer - DOM element for current product\r\n * @return {string} - Product options and their selected values\r\n */\r\nfunction getOptions($productContainer) {\r\n var options = $productContainer\r\n .find('.product-option')\r\n .map(function () {\r\n var $elOption = $(this).find('.options-select');\r\n var urlValue = $elOption.val();\r\n var selectedValueId = $elOption.find(`option[value=\"${urlValue}\"]`).data('value-id');\r\n return { optionId: $(this).data('option-id'), selectedValueId };\r\n })\r\n .toArray();\r\n\r\n return JSON.stringify(options);\r\n}\r\n\r\n/**\r\n * Makes a call to the server to report the event of adding an item to the cart\r\n *\r\n * @param {string | boolean} url - a string representing the end point to hit so that the event can be recorded or false\r\n */\r\nfunction miniCartReportingUrl(url) {\r\n if (url) {\r\n $.ajax({\r\n url,\r\n method: 'GET',\r\n success() {\r\n // reporting urls hit on the server\r\n },\r\n error() {\r\n // no reporting urls hit on the server\r\n }\r\n });\r\n }\r\n}\r\n\r\nmodule.exports = {\r\n attributeSelect,\r\n methods: {\r\n editBonusProducts(data) {\r\n chooseBonusProducts(data);\r\n }\r\n },\r\n\r\n focusChooseBonusProductModal() {\r\n $('body').on('shown.bs.modal', '#chooseBonusProductModal', function () {\r\n $('#chooseBonusProductModal').siblings().attr('aria-hidden', 'true');\r\n $('#chooseBonusProductModal .close').focus();\r\n });\r\n },\r\n\r\n onClosingChooseBonusProductModal() {\r\n $('body').on('hidden.bs.modal', '#chooseBonusProductModal', function () {\r\n $('#chooseBonusProductModal').siblings().attr('aria-hidden', 'false');\r\n });\r\n },\r\n\r\n trapChooseBonusProductModalFocus() {\r\n $('body').on('keydown', '#chooseBonusProductModal', function (e) {\r\n var focusParams = {\r\n event: e,\r\n containerSelector: '#chooseBonusProductModal',\r\n firstElementSelector: '.close',\r\n lastElementSelector: '.add-bonus-products'\r\n };\r\n focusHelper.setTabNextFocus(focusParams);\r\n });\r\n },\r\n\r\n colorAttribute() {\r\n $(document).on('click', '[data-attr=\"color\"] button', function (e) {\r\n e.preventDefault();\r\n\r\n if ($(this).attr('disabled')) {\r\n return;\r\n }\r\n var $productContainer = $(this).closest('.set-item');\r\n if (!$productContainer.length) {\r\n $productContainer = $(this).closest('.product-detail');\r\n }\r\n\r\n attributeSelect($(this).attr('data-url'), $productContainer);\r\n });\r\n },\r\n\r\n selectAttribute() {\r\n $(document).on('change', 'select[class*=\"select-\"], .options-select', function (e) {\r\n e.preventDefault();\r\n\r\n var $productContainer = $(this).closest('.set-item');\r\n if (!$productContainer.length) {\r\n $productContainer = $(this).closest('.product-detail');\r\n }\r\n attributeSelect(e.currentTarget.value, $productContainer);\r\n });\r\n },\r\n\r\n availability() {\r\n $(document).on('change', '.quantity-select', function (e) {\r\n e.preventDefault();\r\n\r\n var $productContainer = $(this).closest('.product-detail');\r\n if (!$productContainer.length) {\r\n $productContainer = $(this).closest('.modal-content').find('.product-quickview');\r\n }\r\n\r\n if ($('.bundle-items', $productContainer).length === 0) {\r\n // Avoid recreating the image carousel by passing false as the 'updateImages' param value,\r\n // as changing the product quantity doen't affect them\r\n attributeSelect($(e.currentTarget).find('option:selected').data('url'), $productContainer, false);\r\n }\r\n });\r\n // Ensure our quantity selector's status is the right one after adding a product to the cart,\r\n // removing one, updating the quantity...\r\n $('body').on('cart:update product:afterAddToCart', function (e) {\r\n var $productContainer = $(this).find('.product-detail');\r\n if (!$productContainer.length) {\r\n $productContainer = $(this).closest('.modal-content').find('.product-quickview');\r\n }\r\n\r\n if ($('.bundle-items', $productContainer).length === 0) {\r\n var selectedQuantityUrl;\r\n if (\r\n $(\"input[name='purchaseType']:checked\").val() === 'subscription' ||\r\n $('.subscription-oop-option-only').length > 0\r\n ) {\r\n selectedQuantityUrl = $(e.currentTarget)\r\n .find('.custom-quantity-selector__select.subscription-quantity-selector option:selected')\r\n .data('url');\r\n } else {\r\n selectedQuantityUrl = $(e.currentTarget)\r\n .find('.custom-quantity-selector__select:not(.subscription-quantity-selector) option:selected')\r\n .data('url');\r\n }\r\n // Avoid recreating the image carousel by passing false as the 'updateImages' param value,\r\n // as changing the product quantity doen't affect them\r\n attributeSelect(selectedQuantityUrl, $productContainer, false, true);\r\n }\r\n });\r\n },\r\n\r\n addToCart() {\r\n $(document).on('click', 'button.add-to-cart, button.add-to-cart-global', function () {\r\n var addToCartUrl;\r\n var pid;\r\n var pidsObj;\r\n var setPids;\r\n\r\n $('body').trigger('product:beforeAddToCart', this);\r\n\r\n if ($('.set-items').length && $(this).hasClass('add-to-cart-global')) {\r\n setPids = [];\r\n\r\n $('.product-detail').each(function () {\r\n if (!$(this).hasClass('product-set-detail')) {\r\n var quantitySelector = getCustomQuantitySelector();\r\n setPids.push({\r\n pid: $(this).find('.product-id').text(),\r\n qty: $(this).find(quantitySelector).val(),\r\n options: getOptions($(this))\r\n });\r\n }\r\n });\r\n pidsObj = JSON.stringify(setPids);\r\n }\r\n\r\n pid = getPidValue($(this));\r\n\r\n var $productContainer = $(this).closest('.product-detail');\r\n if (!$productContainer.length) {\r\n $productContainer = $(this).closest('.quick-view-dialog').find('.product-detail');\r\n }\r\n\r\n addToCartUrl = getAddToCartUrl();\r\n\r\n var form = {\r\n pid,\r\n pidsObj,\r\n childProducts: getChildProducts(),\r\n quantity: getQuantitySelected($(this)),\r\n trainingDone: $('.product-detail').attr('training-done'),\r\n // Check if we have the banner for completing a prescription order (valid prescription)\r\n prescriptionValid: !!$('.prescription-complete').length, // TODO: pick this INFO from API response\r\n // True if the clicked button is the one from the pop up that confirms the add to cart\r\n confirmAddToCart: $(this).hasClass('cta-modal-action')\r\n };\r\n\r\n if (!$('.bundle-item').length) {\r\n form.options = getOptions($productContainer);\r\n }\r\n\r\n $(this).trigger('updateAddToCartFormData', form);\r\n if (addToCartUrl) {\r\n $.ajax({\r\n url: addToCartUrl,\r\n method: 'POST',\r\n data: form,\r\n success(data) {\r\n handlePostCartAdd(data);\r\n $('body').trigger('product:afterAddToCart', data);\r\n $.spinner().stop();\r\n miniCartReportingUrl(data.reportingURL);\r\n },\r\n error() {\r\n $.spinner().stop();\r\n }\r\n });\r\n }\r\n });\r\n },\r\n selectBonusProduct() {\r\n $(document).on('click', '.select-bonus-product', function () {\r\n var $choiceOfBonusProduct = $(this).parents('.choice-of-bonus-product');\r\n var pid = $(this).data('pid');\r\n var maxPids = $('.choose-bonus-product-dialog').data('total-qty');\r\n var submittedQty = parseInt($choiceOfBonusProduct.find('.bonus-quantity-select').val(), 10);\r\n var totalQty = 0;\r\n $.each($('#chooseBonusProductModal .selected-bonus-products .selected-pid'), function () {\r\n totalQty += $(this).data('qty');\r\n });\r\n totalQty += submittedQty;\r\n var optionID = $choiceOfBonusProduct.find('.product-option').data('option-id');\r\n var valueId = $choiceOfBonusProduct.find('.options-select option:selected').data('valueId');\r\n if (totalQty <= maxPids) {\r\n var selectedBonusProductHtml =\r\n '' +\r\n '
      ' +\r\n `
      ${$choiceOfBonusProduct\r\n .find('.product-name')\r\n .html()}
      ` +\r\n '
      ' +\r\n '
      ';\r\n $('#chooseBonusProductModal .selected-bonus-products').append(selectedBonusProductHtml);\r\n $('.pre-cart-products').html(totalQty);\r\n $('.selected-bonus-products .bonus-summary').removeClass('alert-danger');\r\n } else {\r\n $('.selected-bonus-products .bonus-summary').addClass('alert-danger');\r\n }\r\n });\r\n },\r\n removeBonusProduct() {\r\n $(document).on('click', '.selected-pid', function () {\r\n $(this).remove();\r\n var $selected = $('#chooseBonusProductModal .selected-bonus-products .selected-pid');\r\n var count = 0;\r\n if ($selected.length) {\r\n $selected.each(function () {\r\n count += parseInt($(this).data('qty'), 10);\r\n });\r\n }\r\n\r\n $('.pre-cart-products').html(count);\r\n $('.selected-bonus-products .bonus-summary').removeClass('alert-danger');\r\n });\r\n },\r\n enableBonusProductSelection() {\r\n $('body').on('bonusproduct:updateSelectButton', function (e, response) {\r\n $('button.select-bonus-product', response.$productContainer).attr(\r\n 'disabled',\r\n !response.product.readyToOrder || !response.product.available\r\n );\r\n var pid = response.product.id;\r\n $('button.select-bonus-product', response.$productContainer).data('pid', pid);\r\n });\r\n },\r\n showMoreBonusProducts() {\r\n $(document).on('click', '.show-more-bonus-products', function () {\r\n var url = $(this).data('url');\r\n $('.modal-content').spinner().start();\r\n $.ajax({\r\n url,\r\n method: 'GET',\r\n success(html) {\r\n var parsedHtml = parseHtml(html);\r\n $('.modal-body').append(parsedHtml.body);\r\n $('.show-more-bonus-products:first').remove();\r\n $('.modal-content').spinner().stop();\r\n },\r\n error() {\r\n $('.modal-content').spinner().stop();\r\n }\r\n });\r\n });\r\n },\r\n addBonusProductsToCart() {\r\n $(document).on('click', '.add-bonus-products', function () {\r\n var $readyToOrderBonusProducts = $('.choose-bonus-product-dialog .selected-pid');\r\n var queryString = '?pids=';\r\n var url = $('.choose-bonus-product-dialog').data('addtocarturl');\r\n var pidsObject = { bonusProducts: [] };\r\n\r\n $.each($readyToOrderBonusProducts, function () {\r\n var qtyOption = parseInt($(this).data('qty'), 10);\r\n\r\n var option = null;\r\n if (qtyOption > 0) {\r\n if ($(this).data('optionid') && $(this).data('option-selected-value')) {\r\n option = {};\r\n option.optionId = $(this).data('optionid');\r\n option.productId = $(this).data('pid');\r\n option.selectedValueId = $(this).data('option-selected-value');\r\n }\r\n pidsObject.bonusProducts.push({ pid: $(this).data('pid'), qty: qtyOption, options: [option] });\r\n pidsObject.totalQty = parseInt($('.pre-cart-products').html(), 10);\r\n }\r\n });\r\n queryString += JSON.stringify(pidsObject);\r\n queryString = `${queryString}&uuid=${$('.choose-bonus-product-dialog').data('uuid')}`;\r\n queryString = `${queryString}&pliuuid=${$('.choose-bonus-product-dialog').data('pliuuid')}`;\r\n $.spinner().start();\r\n $.ajax({\r\n url: url + queryString,\r\n method: 'POST',\r\n success(data) {\r\n $.spinner().stop();\r\n if (data.error) {\r\n $('#chooseBonusProductModal').modal('hide');\r\n if ($('.add-to-cart-messages').length === 0) {\r\n $('body').append('
      ');\r\n }\r\n $('.add-to-cart-messages').append(\r\n '
      ${data.errorMessage}
      `\r\n );\r\n setTimeout(function () {\r\n $('.add-to-basket-alert').remove();\r\n }, 3000);\r\n } else {\r\n $('.configure-bonus-product-attributes').html(data);\r\n $('.bonus-products-step2').removeClass('hidden-xl-down');\r\n $('#chooseBonusProductModal').modal('hide');\r\n\r\n if ($('.add-to-cart-messages').length === 0) {\r\n $('body').append('
      ');\r\n }\r\n $('.minicart-quantity').html(data.totalQty);\r\n $('.add-to-cart-messages').append(\r\n '
      ${data.msgSuccess}
      `\r\n );\r\n setTimeout(function () {\r\n $('.add-to-basket-alert').remove();\r\n if ($('.cart-page').length) {\r\n location.reload();\r\n }\r\n }, 1500);\r\n }\r\n },\r\n error() {\r\n $.spinner().stop();\r\n }\r\n });\r\n });\r\n },\r\n getPidValue,\r\n getQuantitySelected,\r\n miniCartReportingUrl,\r\n getQuantitySelector\r\n};\r\n","'use strict';\r\n\r\nvar base = require('./base');\r\n\r\n/**\r\n * Enable/disable UI elements\r\n * @param {boolean} enableOrDisable - true or false\r\n */\r\nfunction updateAddToCartEnableDisableOtherElements(enableOrDisable) {\r\n $('button.add-to-cart-global').attr('disabled', enableOrDisable);\r\n}\r\n\r\nmodule.exports = {\r\n methods: { updateAddToCartEnableDisableOtherElements },\r\n\r\n // Not needed, since it is already exported in cart.js\r\n // availability: base.availability,\r\n\r\n addToCart: base.addToCart,\r\n\r\n updateAttributesAndDetails() {\r\n $('body').on('product:statusUpdate', function (e, data) {\r\n var $productContainer = $(`.product-detail[data-pid=\"${data.id}\"]`);\r\n\r\n $productContainer.find('.description-and-detail .product-attributes').empty().html(data.attributesHtml);\r\n\r\n if (data.shortDescription) {\r\n $productContainer.find('.description-and-detail .description').removeClass('hidden-xl-down');\r\n $productContainer\r\n .find('.description-and-detail .description .content')\r\n .empty()\r\n .html(data.shortDescription);\r\n } else {\r\n $productContainer.find('.description-and-detail .description').addClass('hidden-xl-down');\r\n }\r\n\r\n if (data.longDescription) {\r\n $productContainer.find('.description-and-detail .details').removeClass('hidden-xl-down');\r\n $productContainer.find('.description-and-detail .details .content').empty().html(data.longDescription);\r\n } else {\r\n $productContainer.find('.description-and-detail .details').addClass('hidden-xl-down');\r\n }\r\n });\r\n },\r\n\r\n showSpinner() {\r\n $('body').on('product:beforeAddToCart product:beforeAttributeSelect', function () {\r\n $.spinner().start();\r\n });\r\n },\r\n updateAttribute() {\r\n $('body').on('product:afterAttributeSelect', function (e, response) {\r\n if ($('.product-detail>.bundle-items').length) {\r\n response.container.data('pid', response.data.product.id);\r\n response.container.find('.product-id').text(response.data.product.id);\r\n } else if ($('.product-set-detail').eq(0)) {\r\n response.container.data('pid', response.data.product.id);\r\n response.container.find('.product-id').text(response.data.product.id);\r\n } else {\r\n $('.product-id').text(response.data.product.id);\r\n $('.product-detail:not(\".bundle-item\")').data('pid', response.data.product.id);\r\n }\r\n });\r\n },\r\n afterAddToCart() {\r\n $('body').on('product:afterAddToCart', function (e, response) {\r\n var $popupDiv = $('#prescription-pop-up-data-disabled');\r\n if ($popupDiv.length && response.pliUUID) {\r\n $popupDiv.attr('id', 'prescription-pop-up-data');\r\n }\r\n });\r\n },\r\n\r\n updateAddToCart() {\r\n $('body').on('product:updateAddToCart', function (e, response) {\r\n // update local add to cart (for sets)\r\n $('button.add-to-cart', response.$productContainer).attr(\r\n 'disabled',\r\n !response.product.readyToOrder ||\r\n !response.product.available ||\r\n response.invalidQuantity ||\r\n response.disableCartForSubs\r\n );\r\n\r\n var enable = $('.product-availability')\r\n .toArray()\r\n .every(function (item) {\r\n return $(item).data('available') && $(item).data('ready-to-order');\r\n });\r\n module.exports.methods.updateAddToCartEnableDisableOtherElements(!enable);\r\n });\r\n },\r\n updateAvailability() {\r\n $('body').on('product:updateAvailability', function (e, response) {\r\n $('div.availability', response.$productContainer)\r\n .data('ready-to-order', response.product.readyToOrder)\r\n .data('available', response.product.available);\r\n\r\n $('.availability-msg', response.$productContainer)\r\n .empty()\r\n .html(!response.product.available || !response.product.readyToOrder ? response.message : '');\r\n\r\n if ($('.global-availability').length) {\r\n var allAvailable = $('.product-availability')\r\n .toArray()\r\n .every(function (item) {\r\n return $(item).data('available');\r\n });\r\n\r\n var allReady = $('.product-availability')\r\n .toArray()\r\n .every(function (item) {\r\n return $(item).data('ready-to-order');\r\n });\r\n\r\n $('.global-availability').data('ready-to-order', allReady).data('available', allAvailable);\r\n\r\n var availabilityText = '';\r\n if (allReady || !response.product.available) {\r\n availabilityText = response.message;\r\n } else if (!allReady) {\r\n availabilityText = response.resources.info_selectforstock;\r\n }\r\n $('.global-availability .availability-msg').empty().html(availabilityText);\r\n }\r\n });\r\n },\r\n sizeChart() {\r\n $('.size-chart a').on('click', function (e) {\r\n e.preventDefault();\r\n var url = $(this).attr('href');\r\n var $prodSizeChart = $(this).closest('.size-chart').find('.size-chart-collapsible');\r\n if ($prodSizeChart.is(':empty')) {\r\n $.ajax({\r\n url,\r\n type: 'get',\r\n dataType: 'json',\r\n success(data) {\r\n $prodSizeChart.append(data.content);\r\n }\r\n });\r\n }\r\n $prodSizeChart.toggleClass('active');\r\n });\r\n\r\n var $sizeChart = $('.size-chart-collapsible');\r\n $('body').on('click touchstart', function (e) {\r\n if ($('.size-chart').has(e.target).length <= 0) {\r\n $sizeChart.removeClass('active');\r\n }\r\n });\r\n },\r\n copyProductLink() {\r\n $('body').on('click', '#fa-link', function () {\r\n event.preventDefault();\r\n var $temp = $('');\r\n $('body').append($temp);\r\n $temp.val($('#shareUrl').val()).select();\r\n document.execCommand('copy');\r\n $temp.remove();\r\n $('.copy-link-message').attr('role', 'alert');\r\n $('.copy-link-message').removeClass('d-none');\r\n setTimeout(function () {\r\n $('.copy-link-message').addClass('d-none');\r\n }, 3000);\r\n });\r\n },\r\n scrollToTarget() {\r\n $('input[type=radio][name=purchaseType]').on('change', function () {\r\n $('.prices-add-to-cart-actions')[0].scrollIntoView({ behavior: 'smooth', block: 'end' });\r\n });\r\n },\r\n addPrescription() {\r\n $('body').on('click', '.prescription-complete-action', function (event) {\r\n var prescriptionPopUpData = $('#prescription-pop-up-data');\r\n var basketCount = $('.js-basket-count').text();\r\n if (prescriptionPopUpData.length && parseInt(basketCount, 10) > 0) {\r\n event.preventDefault();\r\n var title = prescriptionPopUpData.data('title');\r\n var msg = prescriptionPopUpData.data('msg');\r\n var btnText = prescriptionPopUpData.data('btn-text');\r\n var btnAction = $(this).attr('href');\r\n var btnType = prescriptionPopUpData.data('btn-type');\r\n var openInNewTab = prescriptionPopUpData.data('open-in-new-tab');\r\n var secondaryBtnText = prescriptionPopUpData.data('secondary-btn-text');\r\n var secondaryBtnAction = prescriptionPopUpData.data('secondary-btn-action');\r\n var secondaryBtnType = prescriptionPopUpData.data('secondary-btn-type');\r\n var secondaryBtnOpenInNewTab = prescriptionPopUpData.data('secondary-btn-open-in-new-tab');\r\n\r\n var modalHelper = require('../components/modal');\r\n modalHelper.renderGenericCtaModal(\r\n title,\r\n msg,\r\n // First button controls\r\n btnText,\r\n btnAction,\r\n btnType,\r\n openInNewTab,\r\n // Secondary button controls\r\n secondaryBtnText,\r\n secondaryBtnAction,\r\n secondaryBtnType,\r\n secondaryBtnOpenInNewTab\r\n );\r\n }\r\n });\r\n },\r\n\r\n focusChooseBonusProductModal: base.focusChooseBonusProductModal()\r\n};\r\n","'use strict';\r\n\r\nmodule.exports = {\r\n setTabNextFocus: function (focusParams) {\r\n var KEYCODE_TAB = 9;\r\n var isTabPressed = (focusParams.event.key === 'Tab' || focusParams.event.keyCode === KEYCODE_TAB);\r\n\r\n if (!isTabPressed) {\r\n return;\r\n }\r\n\r\n var firstFocusableEl = $(focusParams.containerSelector + ' ' + focusParams.firstElementSelector);\r\n var lastFocusableEl = $(focusParams.containerSelector + ' ' + focusParams.lastElementSelector);\r\n\r\n if ($(focusParams.containerSelector + ' ' + focusParams.lastElementSelector).is(':disabled')) {\r\n lastFocusableEl = $(focusParams.containerSelector + ' ' + focusParams.nextToLastElementSelector);\r\n if ($('.product-quickview.product-set').length > 0) {\r\n var linkElements = $(focusParams.containerSelector + ' a#fa-link.share-icons');\r\n lastFocusableEl = linkElements[linkElements.length - 1];\r\n }\r\n }\r\n\r\n if (focusParams.event.shiftKey) /* shift + tab */ {\r\n if ($(':focus').is(firstFocusableEl)) {\r\n lastFocusableEl.focus();\r\n focusParams.event.preventDefault();\r\n }\r\n } else /* tab */ {\r\n if ($(':focus').is(lastFocusableEl)) { // eslint-disable-line\r\n firstFocusableEl.focus();\r\n focusParams.event.preventDefault();\r\n }\r\n }\r\n }\r\n};\r\n","'use strict';\r\n\r\nmodule.exports = function (include) {\r\n if (typeof include === 'function') {\r\n include();\r\n } else if (typeof include === 'object') {\r\n Object.keys(include).forEach(function (key) {\r\n if (typeof include[key] === 'function') {\r\n include[key]();\r\n }\r\n });\r\n }\r\n};\r\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","'use strict';\r\n\r\nvar processInclude = require('base/util');\r\n\r\n$(document).ready(function () {\r\n processInclude(require('./product/detail'));\r\n processInclude(require('subscriptions/product/subscription'));\r\n});\r\n"],"names":["base","require","module","exports","updateAddToCartFormData","$","on","e","form","val","length","schedule","find","quantitySelector","getQuantitySelector","trigger","renderGenericCtaModal","title","msg","btnText","btnAction","btnType","openInNewTab","secondaryBtnText","secondaryBtnAction","secondaryBtnType","secondaryBtnOpenInNewTab","remove","modalHtml","concat","append","removeClass","modal","focusHelper","modalHelper","getPidValue","$el","pid","hasClass","closest","data","text","isSubscriptionSelected","getCustomQuantitySelector","quantitySelected","quantitySelectedModal","quantitySelectedPDP","undefined","getQuantitySelected","processSwatchValues","attr","$productContainer","msgs","values","forEach","attrValue","$attrValue","id","value","$swatchButton","parent","selected","addClass","siblings","assistiveSelectedText","empty","url","removeAttr","selectable","processNonSwatchValues","$attr","$defaultOption","resetUrl","updateAttrs","attrs","attrsWithSwatches","indexOf","updateAvailability","response","availabilityValue","availabilityMessages","product","availability","messages","readyToOrder","resources","info_selectforstock","message","getAttributesHtml","attributes","html","attributeGroup","ID","attribute","label","updateOptions","optionsHtml","createCarousel","imgs","carousel","carouselId","i","alt","parseInt","index","appendTo","first","detach","getQtyInCartForPurchaseType","qtyAlreadyInCart","isProductInBasketSubscription","isSubscription","qtyInCart","handleVariantResponse","updateImages","isChoiceOfBonusProducts","parents","isVaraint","variationAttributes","productType","primaryImageUrls","images","large","$totalPriceSelector","replaceWith","totalPriceHtml","promotionsHtml","getAllQuantities","_product$quantities","_$productContainer$fi","selectedFrequency","_product$subscription","possibleQuantities","subscriptionQuantities","reduce","acc","frequency","quantities","getQuantityOptions","quantity","push","updateQuantities","disableCartForActiveSubs","resetQuantity","quantityOptions","currentValue","selectedQuantity","currentUrl","replace","toString","join","previousValue","$selectButton","invalidQuantity","disableCartForSubs","attributeSelect","selectedValueUrl","arguments","container","params","issubscription","ajax","method","success","spinner","stop","error","getAddToCartUrl","parseHtml","$html","parseHTML","body","footer","children","chooseBonusProducts","start","bonusUrl","bonusChoiceRuleBased","showProductsUrlRuleBased","showProductsUrlListBased","htmlString","maxBonusItems","uuid","pliUUID","addToCartUrl","pageSize","labels","selectprods","dataType","parsedHtml","renderedTemplate","enterDialogMessage","closeButtonText","handlePostCartAdd","messageType","newBonusDiscountLineItem","Object","keys","modalData","setTimeout","getChildProducts","childProducts","each","JSON","stringify","getOptions","options","map","$elOption","urlValue","selectedValueId","optionId","toArray","miniCartReportingUrl","methods","editBonusProducts","focusChooseBonusProductModal","focus","onClosingChooseBonusProductModal","trapChooseBonusProductModalFocus","focusParams","event","containerSelector","firstElementSelector","lastElementSelector","setTabNextFocus","colorAttribute","document","preventDefault","selectAttribute","currentTarget","selectedQuantityUrl","addToCart","pidsObj","setPids","qty","trainingDone","prescriptionValid","confirmAddToCart","reportingURL","selectBonusProduct","$choiceOfBonusProduct","maxPids","submittedQty","totalQty","optionID","valueId","selectedBonusProductHtml","removeBonusProduct","$selected","count","enableBonusProductSelection","available","showMoreBonusProducts","addBonusProductsToCart","$readyToOrderBonusProducts","queryString","pidsObject","bonusProducts","qtyOption","option","productId","errorMessage","msgSuccess","location","reload","updateAddToCartEnableDisableOtherElements","enableOrDisable","updateAttributesAndDetails","attributesHtml","shortDescription","longDescription","showSpinner","updateAttribute","eq","afterAddToCart","$popupDiv","updateAddToCart","enable","every","item","allAvailable","allReady","availabilityText","sizeChart","$prodSizeChart","is","type","content","toggleClass","$sizeChart","has","target","copyProductLink","$temp","select","execCommand","scrollToTarget","scrollIntoView","behavior","block","addPrescription","prescriptionPopUpData","basketCount","KEYCODE_TAB","isTabPressed","key","keyCode","firstFocusableEl","lastFocusableEl","nextToLastElementSelector","linkElements","shiftKey","_typeof","obj","Symbol","iterator","constructor","prototype","include","processInclude","ready"],"sourceRoot":""}