{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./cartridges/app_custom_core/cartridge/client/default/js/utils/tileImage.js","webpack:///./dependencies/storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/util.js","webpack:///./cartridges/app_custom_core/cartridge/client/default/js/components/recommendations.js","webpack:///./cartridges/app_custom_core/cartridge/client/default/js/recommendedProductCarousal.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","initHoverImageContainer","$hoverContainer","Array","forEach","find","element","dataset","src","endsWith","remove","children","length","className","hoverImage","$","window","ready","include","keys","tileImage","updateProgressBar","$parent","nextSlide","slideCount","slidesToShow","calc","$progressBar","$progressBarLabel","css","attr","text","getSliderOptions","slidesToScroll","dots","focusOnSelect","arrows","infinite","responsive","breakpoint","settings","initProductRecommendationSlick","document","sliderOptions","on","event","slick","currentSlide","this","parent","options","baseOptions","popupSliderOptions","extend","not","each","index","obfuscationEinstein","e","stopPropagation","encodedUrl","imageReplaceURL","decodeURIComponent","atob","replace","location","href","initRecommandationLogic","processInclude"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAA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ACNf,aAAc,IACdW,QAAQ,EACRH,eAAgB,MAuBxBmB,EAAqBrC,EAAEsC,OAAO,GAAIF,EAAa,CAC/C1B,aAAc,EACdQ,eAAgB,EAChBK,WAAY,CACR,CACIC,WAAY,IACZC,SAAU,CACNf,aAAc,IACdW,QAAQ,EACRH,eAAgB,OAOhClB,EAAE,+DAA+DuC,IAAI,sBAAsBR,MAAMM,GAGjGrC,EAAE,0CAA0CuC,IAAI,sBAAsBR,MAAMH,GAE5E5B,EAAE,6CAA6CwC,MAAK,SAAUC,EAAOlD,GACjEc,EAAUnB,wBAAwBc,EAAET,UAQhD,SAASmD,IACL1C,EAAE,QAAQ6B,GAAG,QAAS,8BAA8B,SAAUc,GAC1DA,EAAEC,kBACF,IAAIC,EAAa7C,EAAEiC,MAAMlB,KAAK,YAE1B+B,EADcC,mBAAmB9C,OAAO+C,KAAKH,IACfI,QAAQ,IAAK,OAC/ChD,OAAOiD,SAASC,KAAOL,KAc/B7F,EAAOD,QAAU,CACbiE,mBAAkBX,oBAAmB8C,wBARzC,WACIpD,GAAE,WACE0B,IACAgB,QAK0DA,sBAAqBhB,mC,iCCrHvF,IAAI2B,EAAiB,EAAQ,GAE7BrD,EAAE2B,UAAUzB,OAAM,WACdmD,EAAe,EAAQ","file":"default/js/recommendedProductCarousal.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 352);\n","'use strict';\n\n/**\n * Init hover image different of th original image too prevent double load of an image\n * @param {DOMElement} $hoverContainer hover container\n */\nfunction initHoverImageContainer($hoverContainer) {\n Array.prototype.forEach.call($hoverContainer.find('.tile-hover-image'), element => {\n if (element.dataset.src.endsWith('1_X.jpg')) {\n element.remove();\n }\n });\n Array.prototype.forEach.call($hoverContainer.find('.images-hover'), element => {\n if (element.children.length === 3) {\n element.children[0].className += ' let-hover';\n }\n });\n}\n\n// Hover Image\n/**\n * Search to see for each element if there is an hover image different of th original image too prevent double load of an image\n */\nfunction hoverImage() {\n $(window).ready(function () {\n let $hoverContainer = $('.image-container');\n initHoverImageContainer($hoverContainer);\n });\n}\n\nmodule.exports = {\n hoverImage: hoverImage,\n initHoverImageContainer: initHoverImageContainer\n};\n","'use strict';\n\nmodule.exports = function (include) {\n if (typeof include === 'function') {\n include();\n } else if (typeof include === 'object') {\n Object.keys(include).forEach(function (key) {\n if (typeof include[key] === 'function') {\n include[key]();\n }\n });\n }\n};\n","'use strict';\n\nconst tileImage = require('../utils/tileImage');\n\n/**\n* Updates the progress bar for a slider\n* @param {jQuery} $parent - The parent element containing the progress bar and label\n* @param {number} nextSlide - The index of the next slide\n* @param {number} slideCount - The total number of slides\n* @param {number} slidesToShow - The number of slides to be displayed at a time\n* @returns {void}\n*/\nfunction updateProgressBar($parent, nextSlide, slideCount, slidesToShow) {\n let calc;\n let $progressBar = $parent.find('.progress');\n let $progressBarLabel = $parent.find('.slider__label');\n\n if (nextSlide === 0) {\n calc = 0;\n } else {\n calc = ((nextSlide + 1) / (slideCount - slidesToShow + 1)) * 100;\n }\n\n $progressBar.css('background-size', calc + '% 100%').attr('aria-valuenow', calc);\n $progressBarLabel.text(calc + '% completed');\n}\n\n/**\n* Returns the options for the slider component\n* @returns {Object} options for the slider\n*/\nfunction getSliderOptions() {\n return {\n slidesToShow: 4,\n slidesToScroll: 2,\n dots: false,\n focusOnSelect: false,\n arrows: true,\n infinite: false,\n responsive: [\n {\n breakpoint: 544,\n settings: {\n slidesToShow: 1.5,\n arrows: true,\n slidesToScroll: 1\n }\n }\n ]\n };\n}\n\n/**\n * Init product recommendation slick\n */\nfunction initProductRecommendationSlick() {\n $(document).ready(function () {\n let $slider = $('.slick-slider');\n let sliderOptions = getSliderOptions();\n\n $slider.on('beforeChange', function (event, slick, currentSlide, nextSlide) {\n let $parent = $(this).parent();\n updateProgressBar($parent, nextSlide, slick.slideCount, slick.options.slidesToShow);\n });\n\n let baseOptions = getSliderOptions();\n\n // Modify options specific to the popup slick slider\n let popupSliderOptions = $.extend({}, baseOptions, {\n slidesToShow: 1,\n slidesToScroll: 1,\n responsive: [\n {\n breakpoint: 544,\n settings: {\n slidesToShow: 1.5,\n arrows: true,\n slidesToScroll: 1\n }\n }\n ]\n });\n\n // Initialize the popup slick slider\n $('.added-to-cart-popup .product-recommendations .product-grid').not('.slick-initialized').slick(popupSliderOptions);\n\n // Initialiser le slick slider principal\n $('.product-recommendations .product-grid').not('.slick-initialized').slick(sliderOptions);\n\n $('.product-recommendations .image-container').each(function (index, element) {\n tileImage.initHoverImageContainer($(element));\n });\n });\n}\n\n/**\n * Obfuscation of the href\n */\nfunction obfuscationEinstein() {\n $('body').on('click', '.image-container .link-cbo', function (e) {\n e.stopPropagation();\n var encodedUrl = $(this).attr('data-cbo');\n var showMoreUrl = decodeURIComponent(window.atob(encodedUrl));\n var imageReplaceURL = showMoreUrl.replace('#', '%23');\n window.location.href = imageReplaceURL;\n });\n}\n\n/**\n * Init quick access feature\n */\nfunction initRecommandationLogic() {\n $(function () {\n initProductRecommendationSlick();\n obfuscationEinstein();\n });\n}\n\nmodule.exports = {\n getSliderOptions, updateProgressBar, initRecommandationLogic, obfuscationEinstein, initProductRecommendationSlick\n};\n","'use strict';\n\nvar processInclude = require('core/util');\n\n$(document).ready(function () {\n processInclude(require('./components/recommendations'));\n});\n"],"sourceRoot":""}