{"version":3,"file":"default/js/productDetail.js","mappings":";;;;;;;;;AAAA,kBAAkB,mBAAO,CAAC,+GAAuB;AACjD,gBAAgB,mBAAO,CAAC,+FAAoB;;AAE5C;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC,kKAAkK;AAClK;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,sBAAsB;AACpC;;AAEA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT,MAAM;AACN;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA,6DAA6D,qDAAqD;;AAElH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;;AAEA,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;;AAEA,oCAAoC,+BAA+B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;;AAEA;AACA;;AAEA,aAAa;AACb;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;AACA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,iBAAiB;AACjB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wCAAwC,4BAA4B;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,sBAAsB;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,iBAAiB;AACjB;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;ACh+BD,WAAW,mBAAO,CAAC,gFAAQ;;AAE3B;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA,0BAA0B;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA,wCAAwC,oBAAoB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA,cAAc,2CAA2C;AACzD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,6CAA6C,mCAAmC;;AAEhF;AACA,6CAA6C,wCAAwC;;AAErF;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;;;;;;;;;;;AC3OA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA,uCAAuC;AACvC;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,kBAAkB;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,qBAAqB;AACrB,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,mFAAmF,yBAAyB;AAC5G;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;;;;;;;;;;;ACtJA;AACA;AACA;AACA;;AAEA;AACA,6BAA6B,IAAI,GAAG,gCAAgC;AACpE;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;;AAEL;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;;;;;;;;;;;;AC1Fa;;AAEb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClCa;;AAEb;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;;;;;;UCZA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,eAAe,4BAA4B;WAC3C,eAAe;WACf,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;ACNuC;AACD;AACI;;AAE1C;AACA,IAAI,gDAAc,CAAC,wDAAM;AACzB,IAAI,gDAAc,CAAC,0DAAQ;AAC3B,CAAC","sources":["webpack://sfra-startup-kit/./cartridges/app_cwf/cartridge/client/default/js/product/base.js","webpack://sfra-startup-kit/./cartridges/app_cwf/cartridge/client/default/js/product/detail.js","webpack://sfra-startup-kit/./cartridges/app_cwf/cartridge/client/default/js/product/wishlist.js","webpack://sfra-startup-kit/./cartridges/app_cwf/cartridge/client/default/js/utils/urlHelper.js","webpack://sfra-startup-kit/./cartridges/app_storefront_base/cartridge/client/default/js/components/focus.js","webpack://sfra-startup-kit/./cartridges/app_storefront_base/cartridge/client/default/js/util.js","webpack://sfra-startup-kit/webpack/bootstrap","webpack://sfra-startup-kit/webpack/runtime/compat get default export","webpack://sfra-startup-kit/webpack/runtime/define property getters","webpack://sfra-startup-kit/webpack/runtime/hasOwnProperty shorthand","webpack://sfra-startup-kit/webpack/runtime/make namespace object","webpack://sfra-startup-kit/./cartridges/app_cwf/cartridge/client/default/js/productDetail.js"],"sourcesContent":["var focusHelper = require(\"base/components/focus\");\nvar urlHelper = require(\"../utils/urlHelper\");\n\n/**\n * Dynamically creates Bootstrap carousel from response containing images\n * @param {Object[]} imgs - Array of large product images,along with related information\n * @param {jQuery} $productContainer - DOM element for a given product\n */\nfunction createCarousel(imgs, $productContainer) {\n var carousel = $productContainer.find(\".product-visuals__container\");\n $(carousel).empty();\n for (var i = 0; i < imgs.length; i++) {\n $(carousel).append(\"
\\\"\"
\");\n }\n}\n\n/**\n * Retrieves the relevant pid value\n * @param {jquery} $el - DOM container for a given add to cart button\n * @return {string} - value to be used when adding product to cart\n */\nfunction getPidValue($el) {\n var pid;\n if ($(\"#quickViewModal\").hasClass(\"show\") && !$(\".product-set\").length) {\n pid = $($el).closest(\".modal-content\").find(\".product-quickview\").data(\"pid\");\n } else if ($(\".product-set-detail\").length || $(\".product-set\").length) {\n pid = $($el).closest(\".product-detail\").find(\".product-id\").text();\n } else {\n pid = $(\".product-detail:not(\\\".bundle-item\\\")\").data(\"pid\");\n }\n\n return pid;\n}\n\n/**\n * Retrieve contextual quantity selector\n * @param {jquery} $el - DOM container for the relevant quantity\n * @return {jquery} - quantity selector DOM container\n */\nfunction getQuantitySelector($el) {\n var quantitySelected;\n if ($el && $(\".set-items\").length) {\n quantitySelected = $($el).closest(\".product-detail\").find(\".quantity-select\");\n } else if ($el && $(\".product-bundle\").length) {\n var quantitySelectedModal = $($el).closest(\".modal-footer\").find(\".quantity-select\");\n var quantitySelectedPDP = $($el).closest(\".bundle-footer\").find(\".quantity-select\");\n if (quantitySelectedModal.val() === undefined) {\n quantitySelected = quantitySelectedPDP;\n } else {\n quantitySelected = quantitySelectedModal;\n }\n } else {\n quantitySelected = $(\".quantity-select\");\n }\n return quantitySelected;\n}\n\n/**\n * Retrieves the value associated with the Quantity pull-down menu\n * @param {jquery} $el - DOM container for the relevant quantity\n * @return {string} - value found in the quantity input\n */\nfunction getQuantitySelected($el) {\n return getQuantitySelector($el).val();\n}\n\n/**\n * Process the attribute values for an attribute that has image swatches\n *\n * @param {Object} attr - Attribute\n * @param {string} attr.id - Attribute ID\n * @param {Object[]} attr.values - Array of attribute value objects\n * @param {string} attr.values.value - Attribute coded value\n * @param {string} attr.values.url - URL to de/select an attribute value of the product\n * @param {boolean} attr.values.isSelectable - Flag as to whether an attribute value can be\n * selected. If there is no variant that corresponds to a specific combination of attribute\n * values, an attribute may be disabled in the Product Detail Page\n * @param {jQuery} $productContainer - DOM container for a given product\n * @param {Object} msgs - object containing resource messages\n */\nfunction processSwatchValues(attr, $productContainer, msgs) {\n attr.values.forEach(function (attrValue) {\n var $attrValue = $productContainer.find(\"[data-attr=\\\"\" + attr.id + \"\\\"] [data-attr-value=\\\"\"\n + attrValue.value + \"\\\"]\");\n var $swatchButton = $attrValue.parent();\n\n if (attrValue.selected) {\n $attrValue.addClass(\"selected\");\n $attrValue.siblings(\".selected-assistive-text\").text(msgs.assistiveSelectedText);\n if (attr.id === \"size\") {\n $(\".size-attribute\").removeClass(\"btn-active\");\n $swatchButton.addClass(\"btn-active\");\n $productContainer.find(\".size-selector__selected .size-selector__selected-size\").remove();\n $productContainer.find(\".size-selector__selected\").append(\"\"+attr.displayValue+\"\");\n }\n } else {\n $attrValue.removeClass(\"selected\");\n $attrValue.siblings(\".selected-assistive-text\").empty();\n }\n\n if (attrValue.url) {\n $swatchButton.attr(\"data-url\", attrValue.url);\n }\n // else {\n // $swatchButton.removeAttr('data-url');\n // }\n // Disable if not selectable\n $swatchButton.removeClass(\"selectable unselectable\");\n $swatchButton.addClass(attrValue.selectable ? \"selectable\" : \"unselectable\");\n });\n}\n\n/**\n * Process attribute values associated with an attribute that does not have image swatches\n *\n * @param {Object} attr - Attribute\n * @param {string} attr.id - Attribute ID\n * @param {Object[]} attr.values - Array of attribute value objects\n * @param {string} attr.values.value - Attribute coded value\n * @param {string} attr.values.url - URL to de/select an attribute value of the product\n * @param {boolean} attr.values.isSelectable - Flag as to whether an attribute value can be\n * selected. If there is no variant that corresponds to a specific combination of attribute\n * values, an attribute may be disabled in the Product Detail Page\n * @param {jQuery} $productContainer - DOM container for a given product\n */\nfunction processNonSwatchValues(attr, $productContainer) {\n var $attr = \"[data-attr=\\\"\" + attr.id + \"\\\"]\";\n var $defaultOption = $productContainer.find($attr + \" .select-\" + attr.id + \" option:first\");\n $defaultOption.attr(\"disabled\", \"disabled\");\n\n attr.values.forEach(function (attrValue) {\n var $attrValue = $productContainer\n .find($attr + \" [data-attr-value=\\\"\" + attrValue.value + \"\\\"]\");\n\n $attrValue.attr(\"value\", attrValue.url)\n .removeAttr(\"disabled\");\n\n if (!attrValue.selectable) {\n $attrValue.attr(\"disabled\", true);\n }\n });\n}\n\n/**\n * Routes the handling of attribute processing depending on whether the attribute has image\n * swatches or not\n *\n * @param {Object} attrs - Attribute\n * @param {string} attr.id - Attribute ID\n * @param {jQuery} $productContainer - DOM element for a given product\n * @param {Object} msgs - object containing resource messages\n */\nfunction updateAttrs(attrs, $productContainer, msgs) {\n // Currently, the only attribute type that has image swatches is Color.\n var attrsWithSwatches = [\"color\", \"size\"];\n\n attrs.forEach(function (attr) {\n if (attrsWithSwatches.indexOf(attr.id) > -1) {\n processSwatchValues(attr, $productContainer, msgs);\n } else {\n processNonSwatchValues(attr, $productContainer);\n }\n });\n}\n\n/**\n * Updates the availability status in the Product Detail Page\n *\n * @param {Object} response - Ajax response object after an\n * attribute value has been [de]selected\n * @param {jQuery} $productContainer - DOM element for a given product\n */\nfunction updateAvailability(response, $productContainer) {\n var availabilityValue = \"\";\n var availabilityMessages = response.product.availability.messages;\n if (!response.product.readyToOrder) {\n availabilityValue = \"
  • \" + response.resources.info_selectforstock + \"
  • \";\n } else {\n $productContainer.find(\".add-to-cart\").text(response.resources.addToCart);\n availabilityMessages.forEach(function (message) {\n availabilityValue += \"
  • \" + message + \"
  • \";\n });\n }\n\n $($productContainer).trigger(\"product:updateAvailability\", {\n product: response.product,\n $productContainer: $productContainer,\n message: availabilityValue,\n resources: response.resources\n });\n}\n\n/**\n * Generates html for product attributes section\n *\n * @param {array} attributes - list of attributes\n * @return {string} - Compiled HTML\n */\nfunction getAttributesHtml(attributes) {\n if (!attributes) {\n return \"\";\n }\n\n var html = \"\";\n\n attributes.forEach(function (attributeGroup) {\n if (attributeGroup.ID === \"mainAttributes\") {\n attributeGroup.attributes.forEach(function (attribute) {\n html += \"
    \" + attribute.label + \": \"\n + attribute.value + \"
    \";\n });\n }\n });\n\n return html;\n}\n\n/**\n * @typedef UpdatedOptionValue\n * @type Object\n * @property {string} id - Option value ID for look up\n * @property {string} url - Updated option value selection URL\n */\n\n/**\n * @typedef OptionSelectionResponse\n * @type Object\n * @property {string} priceHtml - Updated price HTML code\n * @property {Object} options - Updated Options\n * @property {string} options.id - Option ID\n * @property {UpdatedOptionValue[]} options.values - Option values\n */\n\n/**\n * Updates DOM using post-option selection Ajax response\n *\n * @param {OptionSelectionResponse} optionsHtml - Ajax response optionsHtml from selecting a product option\n * @param {jQuery} $productContainer - DOM element for current product\n */\nfunction updateOptions(optionsHtml, $productContainer) {\n // Update options\n $productContainer.find(\".product-options\").empty().html(optionsHtml);\n}\n\n/**\n * Parses JSON from Ajax call made whenever an attribute value is [de]selected\n * @param {Object} response - response from Ajax call\n * @param {Object} response.product - Product object\n * @param {string} response.product.id - Product ID\n * @param {Object[]} response.product.variationAttributes - Product attributes\n * @param {Object[]} response.product.images - Product images\n * @param {boolean} response.product.hasRequiredAttrsSelected - Flag as to whether all required\n * attributes have been selected. Used partially to\n * determine whether the Add to Cart button can be enabled\n * @param {jQuery} $productContainer - DOM element for a given product.\n */\nfunction handleVariantResponse(response, $productContainer) {\n var isChoiceOfBonusProducts = $productContainer.parents(\".choose-bonus-product-dialog\").length > 0;\n var isVariant;\n const galleryCarousel = $productContainer.find(\".product-visuals__container\");\n if (response.product.variationAttributes) {\n updateAttrs(response.product.variationAttributes, $productContainer, response.resources);\n isVariant = response.product.productType === \"variant\";\n if (isChoiceOfBonusProducts && isVariant) {\n $productContainer.parent(\".bonus-product-item\")\n .data(\"pid\", response.product.id);\n\n $productContainer.parent(\".bonus-product-item\")\n .data(\"ready-to-order\", response.product.readyToOrder);\n }\n }\n\n // Update primary images\n var primaryImageUrls = response.product.images.large;\n createCarousel(primaryImageUrls, $productContainer);\n\n if (galleryCarousel.length > 0) {\n if (galleryCarousel.hasClass(\"slick-initialized\")) {\n galleryCarousel.slick(\"slickRemove\", null, null, true).slick(\"refresh\");\n }\n }\n\n // Update pricing\n if (!isChoiceOfBonusProducts) {\n var $priceSelector = $(\".prices .price\", $productContainer).length\n ? $(\".prices .price\", $productContainer)\n : $(\".prices .price\");\n $priceSelector.replaceWith(response.product.price.html);\n }\n\n // Update promotions\n $productContainer.find(\".promotions\").empty().html(response.product.promotionsHtml);\n\n updateAvailability(response, $productContainer);\n\n if (isChoiceOfBonusProducts) {\n var $selectButton = $productContainer.find(\".select-bonus-product\");\n $selectButton.trigger(\"bonusproduct:updateSelectButton\", {\n product: response.product, $productContainer: $productContainer\n });\n } else {\n // Enable \"Add to Cart\" button if all required attributes have been selected\n $(\"button.add-to-cart, button.add-to-cart-global, button.update-cart-product-global\").trigger(\"product:updateAddToCart\", {\n product: response.product, $productContainer: $productContainer\n }).trigger(\"product:statusUpdate\", response.product);\n }\n\n // Update attributes\n $productContainer.find(\".main-attributes\").empty()\n .html(getAttributesHtml(response.product.attributes));\n}\n\n/**\n * @typespec UpdatedQuantity\n * @type Object\n * @property {boolean} selected - Whether the quantity has been selected\n * @property {string} value - The number of products to purchase\n * @property {string} url - Compiled URL that specifies variation attributes, product ID, options,\n * etc.\n */\n\n/**\n * Updates the quantity DOM elements post Ajax call\n * @param {UpdatedQuantity[]} quantities -\n * @param {jQuery} $productContainer - DOM container for a given product\n */\nfunction updateQuantities(quantities, $productContainer) {\n if ($productContainer.parent(\".bonus-product-item\").length <= 0) {\n var optionsHtml = quantities.map(function (quantity) {\n var selected = quantity.selected ? \" selected \" : \"\";\n return \"\";\n }).join(\"\");\n getQuantitySelector($productContainer).empty().html(optionsHtml);\n }\n}\n\n/**\n * updates the product view when a product attribute is selected or deselected or when\n * changing quantity\n * @param {string} selectedValueUrl - the Url for the selected variation value\n * @param {jQuery} $productContainer - DOM element for current product\n * @param {jQuery} params - trigger params\n * @param {boolean} isAttributeUpdate - true if this is a product attribute update\n */\nfunction attributeSelect(selectedValueUrl, $productContainer, params, isAttributeUpdate) {\n if (selectedValueUrl) {\n $(\"body\").trigger(\"product:beforeAttributeSelect\", { url: selectedValueUrl, container: $productContainer });\n\n var url = selectedValueUrl;\n if (isAttributeUpdate && $productContainer.hasClass(\"js-product-detail\")) {\n url = urlHelper.appendParamToURL(url, \"isPDP\", true);\n }\n\n $.ajax({\n url: url,\n method: \"GET\",\n success: function (data) {\n if (data.redirectUrl && params !== \"noredirect\") {\n window.location.href = data.redirectUrl;\n return;\n }\n\n const product = data.product;\n const productId = product.id;\n const arrayBasket = $productContainer.data(\"cart-items\");\n\n handleVariantResponse(data, $productContainer);\n updateOptions(product.optionsHtml, $productContainer);\n updateQuantities(product.quantities, $productContainer);\n $(\"body\").trigger(\"product:afterAttributeSelect\", {\n data: data,\n productId: productId,\n arrayBasket: arrayBasket,\n container: $productContainer\n });\n\n if ($productContainer.hasClass(\"set-item\")) {\n var optionSize = $productContainer.find(\".select-size\");\n var options = $(optionSize).find(\"option\");\n var optionsUnavailable = $(optionSize).find(\"option:disabled:not(:nth-child(1))\");\n\n for (var i = 0; i < options.length; i++) {\n var option = options[i];\n if (!$(option).hasClass(\"selectOption\")) {\n var optionName = $(option).attr(\"data-attr-name\");\n $(option).text(optionName);\n }\n }\n\n for (var j = 0; j < optionsUnavailable.length; j++) {\n var optionUnavailable = optionsUnavailable[j];\n var unavailableName = $(optionUnavailable).attr(\"data-attr-name\");\n var txtUnavailable = $(optionUnavailable).attr(\"data-attr-unavailable\");\n if (!$(optionUnavailable).hasClass(\"selectOption\")) {\n $(optionUnavailable).text(unavailableName + \" - \" + txtUnavailable);\n }\n }\n }\n\n $.spinner().stop();\n },\n error: function () {\n $.spinner().stop();\n }\n });\n }\n}\n\n/**\n * Retrieves url to use when adding a product to the cart\n *\n * @return {string} - The provided URL to use when adding a product to the cart\n */\nfunction getAddToCartUrl() {\n return $(\".add-to-cart-url\").val();\n}\n\n/**\n * Parses the html for a modal window\n * @param {string} html - representing the body and footer of the modal window\n *\n * @return {Object} - Object with properties body and footer.\n */\nfunction parseHtml(html) {\n var $html = $(\"
    \").append($.parseHTML(html));\n\n var body = $html.find(\".choice-of-bonus-product\");\n var footer = $html.find(\".modal-footer\").children();\n\n return { body: body, footer: footer };\n}\n\n/**\n * Retrieves url to use when adding a product to the cart\n *\n * @param {Object} data - data object used to fill in dynamic portions of the html\n */\nfunction chooseBonusProducts(data) {\n $(\".modal-body\").spinner().start();\n\n if ($(\"#chooseBonusProductModal\").length !== 0) {\n $(\"#chooseBonusProductModal\").remove();\n }\n var bonusUrl;\n if (data.bonusChoiceRuleBased) {\n bonusUrl = data.showProductsUrlRuleBased;\n } else {\n bonusUrl = data.showProductsUrlListBased;\n }\n\n var htmlString = \"\"\n + \"
    \"\n + \"\"\n + \"
    \"\n + \"\"\n + \"
    \"\n + \"
    \"\n + \" \" + data.labels.selectprods + \"\"\n + \" \"\n + \"
    \"\n + \"
    \"\n + \"
    \"\n + \"
    \"\n + \"
    \"\n + \"
    \";\n $(\"body\").append(htmlString);\n $(\".modal-body\").spinner().start();\n\n $.ajax({\n url: bonusUrl,\n method: \"GET\",\n dataType: \"json\",\n success: function (response) {\n var parsedHtml = parseHtml(response.renderedTemplate);\n $(\"#chooseBonusProductModal .modal-body\").empty();\n $(\"#chooseBonusProductModal .enter-message\").text(response.enterDialogMessage);\n $(\"#chooseBonusProductModal .modal-header .close .sr-only\").text(response.closeButtonText);\n $(\"#chooseBonusProductModal .modal-body\").html(parsedHtml.body);\n $(\"#chooseBonusProductModal .modal-footer\").html(parsedHtml.footer);\n $(\"#chooseBonusProductModal\").modal(\"show\");\n $.spinner().stop();\n },\n error: function () {\n $.spinner().stop();\n }\n });\n}\n\n/**\n * Updates the Mini-Cart quantity value after the customer has pressed the \"Add to Cart\" button\n * @param {string} response - ajax response from clicking the add to cart button\n */\nfunction handlePostCartAdd(response) {\n $(\".minicart\").trigger(\"count:update\", response);\n var messageType = response.error ? \"alert-danger\" : \"alert-success\";\n // show add to cart toast\n if (response.newBonusDiscountLineItem\n && Object.keys(response.newBonusDiscountLineItem).length !== 0) {\n chooseBonusProducts(response.newBonusDiscountLineItem);\n } else {\n if ($(\".add-to-cart-messages\").length === 0) {\n $(\"body\").append(\n \"
    \"\n );\n }\n\n $(\".add-to-cart-messages\").append(\n \"
    \"\n + response.message\n + \"
    \"\n );\n\n setTimeout(function () {\n $(\".add-to-basket-alert\").remove();\n }, 5000);\n }\n}\n\n/**\n * Retrieves the bundle product item ID's for the Controller to replace bundle master product\n * items with their selected variants\n *\n * @return {string[]} - List of selected bundle product item ID's\n */\nfunction getChildProducts() {\n var childProducts = [];\n $(\".bundle-item\").each(function () {\n childProducts.push({\n pid: $(this).find(\".product-id\").text(),\n quantity: parseInt($(this).find(\"label.quantity\").data(\"quantity\"), 10)\n });\n });\n\n return childProducts.length ? JSON.stringify(childProducts) : [];\n}\n\n/**\n * Retrieve product options\n *\n * @param {jQuery} $productContainer - DOM element for current product\n * @return {string} - Product options and their selected values\n */\nfunction getOptions($productContainer) {\n var options = $productContainer\n .find(\".product-option\")\n .map(function () {\n var $elOption = $(this).find(\".options-select\");\n var urlValue = $elOption.val();\n var selectedValueId = $elOption.find(\"option[value=\\\"\" + urlValue + \"\\\"]\")\n .data(\"value-id\");\n return {\n optionId: $(this).data(\"option-id\"),\n selectedValueId: selectedValueId\n };\n }).toArray();\n\n return JSON.stringify(options);\n}\n\n/**\n * Makes a call to the server to report the event of adding an item to the cart\n *\n * @param {string | boolean} url - a string representing the end point to hit so that the event can be recorded, or false\n */\nfunction miniCartReportingUrl(url) {\n if (url) {\n $.ajax({\n url: url,\n method: \"GET\",\n success: function () {\n // reporting urls hit on the server\n },\n error: function () {\n // no reporting urls hit on the server\n }\n });\n }\n}\n\nmodule.exports = {\n attributeSelect: attributeSelect,\n methods: {\n editBonusProducts: function (data) {\n chooseBonusProducts(data);\n }\n },\n\n focusChooseBonusProductModal: function () {\n $(\"body\").on(\"shown.bs.modal\", \"#chooseBonusProductModal\", function () {\n $(\"#chooseBonusProductModal\").siblings().attr(\"aria-hidden\", \"true\");\n $(\"#chooseBonusProductModal .close\").focus();\n });\n },\n\n onClosingChooseBonusProductModal: function () {\n $(\"body\").on(\"hidden.bs.modal\", \"#chooseBonusProductModal\", function () {\n $(\"#chooseBonusProductModal\").siblings().attr(\"aria-hidden\", \"false\");\n });\n },\n\n trapChooseBonusProductModalFocus: function () {\n $(\"body\").on(\"keydown\", \"#chooseBonusProductModal\", function (e) {\n var focusParams = {\n event: e,\n containerSelector: \"#chooseBonusProductModal\",\n firstElementSelector: \".close\",\n lastElementSelector: \".add-bonus-products\"\n };\n focusHelper.setTabNextFocus(focusParams);\n });\n },\n\n colorAttribute: function () {\n $(document).on(\"click\", \"button.color-attribute\", function (e) {\n e.preventDefault();\n var sizeSelected = $(\".select-size option:selected\").attr(\"data-attr-value\");\n var productPid;\n\n if ($(\".product-wrapper\").length > 0) {\n productPid = $(\".product-wrapper\").attr(\"data-pid\");\n } else {\n productPid = $(this).closest(\".set-item\").attr(\"data-pid\");\n }\n var masterPid = productPid.split(\"_\");\n\n if (sizeSelected) {\n sessionStorage.setItem(\"selectedSize\", sizeSelected);\n sessionStorage.setItem(\"masterPid\", masterPid[0]);\n } else {\n sessionStorage.removeItem(\"selectedSize\");\n sessionStorage.removeItem(\"masterPid\");\n }\n\n if ($(this).attr(\"disabled\")) {\n return;\n }\n var $productContainer = $(this).closest(\".set-item\");\n if (!$productContainer.length) {\n $productContainer = $(this).closest(\".product-detail\");\n attributeSelect($(this).attr(\"data-url\"), $productContainer, null, true);\n } else {\n attributeSelect($(this).attr(\"data-url\"), $productContainer, \"noredirect\", true);\n $(\".color-attribute\").removeClass(\"btn-active\");\n $(this).addClass(\"btn-active\");\n var selectedColor = $(this).closest(\".set-item\").find(\".color-selector__selected-color\");\n var selectedStatus = $(this).closest(\".set-item\").find(\".color-selector__unavailable\");\n var targetColor = $(this).find(\".color-value\").attr(\"data-name\");\n var targetStatus = $(this).find(\".color-value\").attr(\"data-status\");\n $(selectedColor).text(targetColor);\n $(selectedColor).attr(\"data-selected\", targetColor);\n if (targetStatus === \"\") {\n $(selectedStatus).text(\"\");\n $(selectedStatus).attr(\"data-selectable\", \"\");\n } else {\n $(selectedStatus).text(targetStatus);\n $(selectedStatus).attr(\"data-selectable\", targetStatus);\n }\n\n }\n });\n\n $(\"button.color-attribute .color-value\").on(\"mouseenter\", function () {\n var selectedColor;\n var selectedStatus;\n var targetColor = $(this).attr(\"data-name\");\n var targetStatus = $(this).attr(\"data-status\");\n var $productContainer = $(this).closest(\".set-item\");\n\n if (!$productContainer.length) {\n selectedColor = $(\".color-selector__selected-color\");\n selectedStatus = $(\".color-selector__unavailable\");\n } else {\n selectedColor = $(this).closest(\".set-item\").find(\".color-selector__selected-color\");\n selectedStatus = $(this).closest(\".set-item\").find(\".color-selector__unavailable\");\n }\n $(selectedColor).text(targetColor);\n $(selectedStatus).text(targetStatus);\n });\n\n $(\"button.color-attribute .color-value\").on(\"mouseleave\", function () {\n var selectedColor;\n var selectedStatus;\n var $productContainer = $(this).closest(\".set-item\");\n\n if (!$productContainer.length) {\n selectedColor = $(\".color-selector__selected-color\");\n selectedStatus = $(\".color-selector__unavailable\");\n } else {\n selectedColor = $(this).closest(\".set-item\").find(\".color-selector__selected-color\");\n selectedStatus = $(this).closest(\".set-item\").find(\".color-selector__unavailable\");\n }\n\n var baseColor = $(selectedColor).attr(\"data-selected\");\n var baseStatus = $(selectedStatus).attr(\"data-selectable\");\n $(selectedColor).text(baseColor);\n $(selectedStatus).text(baseStatus);\n });\n },\n\n selectAttribute: function () {\n $(document).on(\"click\", \".size-selector__content .size-attribute\", function (e) {\n e.preventDefault();\n\n var $productContainer = $(this).closest(\".set-item\");\n if (!$productContainer.length) {\n $productContainer = $(this).closest(\".product-detail\");\n }\n attributeSelect(e.currentTarget.dataset.url, $productContainer, \"noredirect\", true);\n });\n },\n\n availability: function () {\n $(document).on(\"change\", \".quantity-select\", function (e) {\n e.preventDefault();\n\n var $productContainer = $(this).closest(\".product-detail\");\n if (!$productContainer.length) {\n $productContainer = $(this).closest(\".modal-content\").find(\".product-quickview\");\n }\n\n if ($(\".bundle-items\", $productContainer).length === 0) {\n attributeSelect($(e.currentTarget).find(\"option:selected\").data(\"url\"), $productContainer);\n }\n });\n },\n\n addToCart: function () {\n $(document).on(\"click\", \"button.add-to-cart, button.add-to-cart-global\", function () {\n var addToCartUrl;\n var pid;\n var pidsObj;\n var setPids;\n var thisContainer = $(this).closest(\".product-detail\");\n\n $(\"body\").trigger(\"product:beforeAddToCart\", this);\n\n if ($(\".set-items\").length && $(this).hasClass(\"add-to-cart-global\")) {\n setPids = [];\n\n $(\".product-detail\").each(function () {\n if (!$(this).hasClass(\"product-set-detail\")) {\n setPids.push({\n pid: $(this).find(\".product-id\").text(),\n qty: $(this).find(\".quantity-select\").val(),\n options: getOptions($(this))\n });\n }\n });\n pidsObj = JSON.stringify(setPids);\n }\n\n pid = getPidValue($(this));\n\n var $productContainer = $(this).closest(\".product-detail\");\n if (!$productContainer.length) {\n $productContainer = $(this).closest(\".quick-view-dialog\").find(\".product-detail\");\n }\n\n addToCartUrl = getAddToCartUrl();\n\n var form = {\n pid: pid,\n pidsObj: pidsObj,\n childProducts: getChildProducts(),\n quantity: getQuantitySelected($(this))\n };\n\n if (!$(\".bundle-item\").length) {\n form.options = getOptions($productContainer);\n }\n\n $(this).trigger(\"updateAddToCartFormData\", form);\n\n var cartItemsArray = [];\n if (addToCartUrl) {\n $.ajax({\n url: addToCartUrl,\n method: \"POST\",\n data: form,\n success: function (data) {\n handlePostCartAdd(data);\n $(\"body\").trigger(\"product:afterAddToCart\", data);\n $.spinner().stop();\n miniCartReportingUrl(data.reportingURL);\n\n for (var i = 0; i < data.cart.items.length; i++) {\n cartItemsArray.push(data.cart.items[i].id);\n }\n $productContainer.data(\"cart-items\", cartItemsArray);\n thisContainer.find(\".select-size\").val($(\".select-size option:first\").val());\n thisContainer.find(\".add-to-cart\").addClass(\"d-none\");\n thisContainer.find(\".go-to-cart\").removeClass(\"d-none\");\n },\n error: function () {\n $.spinner().stop();\n }\n });\n }\n });\n },\n selectBonusProduct: function () {\n $(document).on(\"click\", \".select-bonus-product\", function () {\n var $choiceOfBonusProduct = $(this).parents(\".choice-of-bonus-product\");\n var pid = $(this).data(\"pid\");\n var maxPids = $(\".choose-bonus-product-dialog\").data(\"total-qty\");\n var submittedQty = parseInt($choiceOfBonusProduct.find(\".bonus-quantity-select\").val(), 10);\n var totalQty = 0;\n $.each($(\"#chooseBonusProductModal .selected-bonus-products .selected-pid\"), function () {\n totalQty += $(this).data(\"qty\");\n });\n totalQty += submittedQty;\n var optionID = $choiceOfBonusProduct.find(\".product-option\").data(\"option-id\");\n var valueId = $choiceOfBonusProduct.find(\".options-select option:selected\").data(\"valueId\");\n if (totalQty <= maxPids) {\n var selectedBonusProductHtml = \"\"\n + \"
    \"\n + \"
    \"\n + $choiceOfBonusProduct.find(\".product-name\").html()\n + \"
    \"\n + \"
    \"\n + \"
    \";\n $(\"#chooseBonusProductModal .selected-bonus-products\").append(selectedBonusProductHtml);\n $(\".pre-cart-products\").html(totalQty);\n $(\".selected-bonus-products .bonus-summary\").removeClass(\"alert-danger\");\n } else {\n $(\".selected-bonus-products .bonus-summary\").addClass(\"alert-danger\");\n }\n });\n },\n removeBonusProduct: function () {\n $(document).on(\"click\", \".selected-pid\", function () {\n $(this).remove();\n var $selected = $(\"#chooseBonusProductModal .selected-bonus-products .selected-pid\");\n var count = 0;\n if ($selected.length) {\n $selected.each(function () {\n count += parseInt($(this).data(\"qty\"), 10);\n });\n }\n\n $(\".pre-cart-products\").html(count);\n $(\".selected-bonus-products .bonus-summary\").removeClass(\"alert-danger\");\n });\n },\n enableBonusProductSelection: function () {\n $(\"body\").on(\"bonusproduct:updateSelectButton\", function (e, response) {\n $(\"button.select-bonus-product\", response.$productContainer).attr(\n \"disabled\",\n (!response.product.readyToOrder || !response.product.available)\n );\n var pid = response.product.id;\n $(\"button.select-bonus-product\", response.$productContainer).data(\"pid\", pid);\n });\n },\n showMoreBonusProducts: function () {\n $(document).on(\"click\", \".show-more-bonus-products\", function () {\n var url = $(this).data(\"url\");\n $(\".modal-content\").spinner().start();\n $.ajax({\n url: url,\n method: \"GET\",\n success: function (html) {\n var parsedHtml = parseHtml(html);\n $(\".modal-body\").append(parsedHtml.body);\n $(\".show-more-bonus-products:first\").remove();\n $(\".modal-content\").spinner().stop();\n },\n error: function () {\n $(\".modal-content\").spinner().stop();\n }\n });\n });\n },\n addBonusProductsToCart: function () {\n $(document).on(\"click\", \".add-bonus-products\", function () {\n var $readyToOrderBonusProducts = $(\".choose-bonus-product-dialog .selected-pid\");\n var queryString = \"?pids=\";\n var url = $(\".choose-bonus-product-dialog\").data(\"addtocarturl\");\n var pidsObject = {\n bonusProducts: []\n };\n\n $.each($readyToOrderBonusProducts, function () {\n var qtyOption = parseInt($(this).data(\"qty\"), 10);\n\n var option = null;\n if (qtyOption > 0) {\n if ($(this).data(\"optionid\") && $(this).data(\"option-selected-value\")) {\n option = {};\n option.optionId = $(this).data(\"optionid\");\n option.productId = $(this).data(\"pid\");\n option.selectedValueId = $(this).data(\"option-selected-value\");\n }\n pidsObject.bonusProducts.push({\n pid: $(this).data(\"pid\"),\n qty: qtyOption,\n options: [option]\n });\n pidsObject.totalQty = parseInt($(\".pre-cart-products\").html(), 10);\n }\n });\n queryString += JSON.stringify(pidsObject);\n queryString = queryString + \"&uuid=\" + $(\".choose-bonus-product-dialog\").data(\"uuid\");\n queryString = queryString + \"&pliuuid=\" + $(\".choose-bonus-product-dialog\").data(\"pliuuid\");\n $.spinner().start();\n $.ajax({\n url: url + queryString,\n method: \"POST\",\n success: function (data) {\n $.spinner().stop();\n if (data.error) {\n $(\"#chooseBonusProductModal\").modal(\"hide\");\n if ($(\".add-to-cart-messages\").length === 0) {\n $(\"body\").append(\"
    \");\n }\n $(\".add-to-cart-messages\").append(\n \"
    \"\n + data.errorMessage + \"
    \"\n );\n setTimeout(function () {\n $(\".add-to-basket-alert\").remove();\n }, 3000);\n } else {\n $(\".configure-bonus-product-attributes\").html(data);\n $(\".bonus-products-step2\").removeClass(\"hidden-xl-down\");\n $(\"#chooseBonusProductModal\").modal(\"hide\");\n\n if ($(\".add-to-cart-messages\").length === 0) {\n $(\"body\").append(\"
    \");\n }\n $(\".minicart-quantity\").html(data.totalQty);\n $(\".add-to-cart-messages\").append(\n \"
    \"\n + data.msgSuccess + \"
    \"\n );\n setTimeout(function () {\n $(\".add-to-basket-alert\").remove();\n if ($(\".cart-page\").length) {\n window.location.reload();\n }\n }, 1500);\n }\n },\n error: function () {\n $.spinner().stop();\n }\n });\n });\n },\n\n getPidValue: getPidValue,\n getQuantitySelected: getQuantitySelected,\n miniCartReportingUrl: miniCartReportingUrl\n};\n\n$(window).on(\"load\", function () {\n if ($(\".product-wrapper\").length > 0) {\n if (sessionStorage.getItem(\"selectedSize\") !== null) {\n var productPid = $(\".product-wrapper\").attr(\"data-pid\");\n var productMaster = productPid.split(\"_\");\n var valueSelected = sessionStorage.getItem(\"selectedSize\");\n var productSelected = sessionStorage.getItem(\"masterPid\");\n\n if (productMaster[0] === productSelected) {\n $(\".select-size option[data-attr-value=\" + valueSelected + \"]\").attr(\"selected\", \"selected\");\n $(\".select-size\").trigger(\"change\");\n $.spinner().stop();\n } else {\n sessionStorage.removeItem(\"selectedSize\");\n sessionStorage.removeItem(\"masterPid\");\n }\n }\n }\n});\n","var base = require(\"./base\");\n\n/**\n * Enable/disable UI elements\n * @param {boolean} enableOrDisable - true or false\n */\nfunction updateAddToCartEnableDisableOtherElements(enableOrDisable) {\n $(\"button.add-to-cart-global\").attr(\"disabled\", enableOrDisable);\n}\n\n$(\".add-to-cart__container\").on(\"click\", (e) => {\n if ($(e.target).find(\".add-to-cart\").attr(\"disabled\")) {\n $(\".add-to-cart__error.not-ready-to-order\").show();\n }\n});\n\nmodule.exports = {\n methods: {\n updateAddToCartEnableDisableOtherElements: updateAddToCartEnableDisableOtherElements\n },\n\n availability: base.availability,\n\n addToCart: base.addToCart,\n\n updateAttributesAndDetails: function () {\n $(\"body\").on(\"product:statusUpdate\", function (e, data) {\n var $productContainer = $(\".product-detail[data-pid=\\\"\" + data.id + \"\\\"]\");\n\n $productContainer.find(\".description-and-detail .product-attributes\")\n .empty()\n .html(data.attributesHtml);\n\n if (data.shortDescription) {\n $productContainer.find(\".description-and-detail .description\")\n .removeClass(\"hidden-xl-down\");\n $productContainer.find(\".description-and-detail .description .content\")\n .empty()\n .html(data.shortDescription);\n } else {\n $productContainer.find(\".description-and-detail .description\")\n .addClass(\"hidden-xl-down\");\n }\n\n if (data.longDescription) {\n $productContainer.find(\".description-and-detail .details\")\n .removeClass(\"hidden-xl-down\");\n $productContainer.find(\".description-and-detail .details .content\")\n .empty()\n .html(data.longDescription);\n } else {\n $productContainer.find(\".description-and-detail .details\")\n .addClass(\"hidden-xl-down\");\n }\n });\n },\n\n showSpinner: function () {\n $(\"body\").on(\"product:beforeAddToCart product:beforeAttributeSelect\", function () {\n $.spinner().start();\n });\n },\n updateAttribute: function () {\n $(\"body\").on(\"product:afterAttributeSelect\", function (e, response) {\n\n if (!$(\".product-detail\").hasClass(\"product-set-detail\")) {\n if (response.arrayBasket.indexOf(response.productId) !== -1) {\n $(this).find(\".add-to-cart\").addClass(\"d-none\");\n $(this).find(\".go-to-cart\").removeClass(\"d-none\");\n } else {\n $(this).find(\".add-to-cart\").removeClass(\"d-none\");\n $(this).find(\".go-to-cart\").addClass(\"d-none\");\n }\n\n } else {\n $(\".product-detail\").each(function () {\n if (response.data.product.id.split(\"/\")[0] === response.data.masterP) {\n if (response.arrayBasket.indexOf(response.productId) !== -1) {\n $(this).find(\".add-to-cart\").addClass(\"d-none\");\n $(this).find(\".go-to-cart\").removeClass(\"d-none\");\n\n } else {\n $(this).find(\".add-to-cart\").removeClass(\"d-none\");\n $(this).find(\".go-to-cart\").addClass(\"d-none\");\n }\n }\n\n if ($(this).data(\"pid\") === response.productId) {\n var figures = $(this).find(\".product-visuals__wrapper figure\");\n for (var i = 0; i < figures.length; i++) {\n var figure = figures[i];\n var figureImg = $(figure).find(\"img\");\n if (response.data.product.images.large[i]) {\n $(figure).attr(\"data-image\", response.data.product.images.large[i].url);\n $(figureImg).attr(\"src\", response.data.product.images.large[i].url);\n $(figureImg).attr(\"alt\", response.data.product.images.large[i].alt);\n }\n }\n }\n });\n }\n\n if ($(\".product-detail>.bundle-items\").length) {\n response.container.data(\"pid\", response.data.product.id);\n response.container.find(\".product-id\").text(response.data.product.id);\n } else if ($(\".product-set-detail\").eq(0)) { // NOSONAR\n response.container.data(\"pid\", response.data.product.id);\n response.container.find(\".product-id\").text(response.data.product.id);\n } else {\n $(\".product-id\").text(response.data.product.id);\n $(\".product-detail:not(\\\".bundle-item\\\")\").data(\"pid\", response.data.product.id);\n }\n });\n },\n updateAddToCart: function () {\n $(\"body\").on(\"product:updateAddToCart\", function (e, response) {\n // update local add to cart (for sets)\n $(\"button.add-to-cart\", response.$productContainer).attr(\n \"disabled\",\n (!response.product.readyToOrder || !response.product.available)\n );\n\n if (response.product.readyToOrder && response.product.available) {\n $(\".add-to-cart__error.not-ready-to-order\").hide();\n }\n\n if (response.product.available) {\n $(\".add-to-cart__error.unavailable\").hide();\n } else {\n $(\".add-to-cart__error.unavailable\").show();\n }\n\n var enable = $(\".product-availability\").toArray().every(function (item) {\n return $(item).data(\"available\") && $(item).data(\"ready-to-order\");\n });\n module.exports.methods.updateAddToCartEnableDisableOtherElements(!enable);\n module.exports.updateAttribute();\n });\n },\n updateAvailability: function () {\n $(\"body\").on(\"product:updateAvailability\", function (e, response) {\n $(\"div.availability\", response.$productContainer)\n .data(\"ready-to-order\", response.product.readyToOrder)\n .data(\"available\", response.product.available);\n\n $(\".availability-msg\", response.$productContainer)\n .empty().html(response.message);\n\n if ($(\".global-availability\").length) {\n var allAvailable = $(\".product-availability\").toArray()\n .every(function (item) { return $(item).data(\"available\"); });\n\n var allReady = $(\".product-availability\").toArray()\n .every(function (item) { return $(item).data(\"ready-to-order\"); });\n\n $(\".global-availability\")\n .data(\"ready-to-order\", allReady)\n .data(\"available\", allAvailable);\n\n $(\".global-availability .availability-msg\").empty()\n .html(allReady ? response.message : response.resources.info_selectforstock);\n }\n });\n },\n sizeChart: function () {\n $(\".size-chart a\").on(\"click\", function (e) {\n e.preventDefault();\n var url = $(this).attr(\"href\");\n var $productSizeChartModal = $(\"#sizeChartDialog\");\n var $prodSizeChart = $productSizeChartModal.find(\".size-chart__content\");\n\n if ($prodSizeChart.is(\":empty\")) {\n $.ajax({\n url: url,\n type: \"get\",\n dataType: \"json\",\n success: function (data) {\n $prodSizeChart.append(data.content);\n $productSizeChartModal.appendTo(\"body\");\n }\n });\n }\n\n $productSizeChartModal.modal(\"show\");\n });\n\n var $sizeChart = $(\".size-chart-collapsible\");\n $(\"body\").on(\"click touchstart\", function (e) {\n if ($(\".size-chart\").has(e.target).length <= 0) {\n $sizeChart.removeClass(\"active\");\n }\n });\n },\n copyProductLink: function () {\n $(\"body\").on(\"click\", \"#fa-link\", function () {\n window.event.preventDefault();\n var $temp = $(\"\");\n $(\"body\").append($temp);\n $temp.val($(\"#shareUrl\").val()).select();\n document.execCommand(\"copy\");\n $temp.remove();\n $(\".copy-link-message\").attr(\"role\", \"alert\");\n $(\".copy-link-message\").removeClass(\"d-none\");\n setTimeout(function () {\n $(\".copy-link-message\").addClass(\"d-none\");\n }, 3000);\n });\n },\n getNavHistory: function () {\n $(\".breadcrumb__item\").on(\"click\", \"a\", function (e) {\n e.preventDefault();\n var windowLocation = sessionStorage.getItem(\"windowLocation\");\n var catPathname = sessionStorage.getItem(\"catPathname\");\n var thisLocation = window.location.href;\n\n if ($(this).attr(\"href\") === catPathname) {\n sessionStorage.setItem(\"windowLocation\", thisLocation);\n window.location.replace(windowLocation);\n }\n });\n\n $(window).on(\"popstate\", function (e) {\n e.preventDefault();\n var windowLocation = sessionStorage.getItem(\"windowLocation\");\n var catPathname = sessionStorage.getItem(\"catPathname\");\n var thisLocation = window.location.href;\n\n if ($(this).attr(\"href\") === catPathname) {\n sessionStorage.setItem(\"windowLocation\", thisLocation);\n window.location.replace(windowLocation);\n }\n });\n },\n\n focusChooseBonusProductModal: base.focusChooseBonusProductModal()\n};\n","/**\n * appends params to a url\n * @param {string} data - data returned from the server's ajax call\n * @param {Object} button - button that was clicked to add a product to the wishlist\n */\nfunction displayMessage(data, button) {\n $.spinner().stop();\n var status;\n var icon = button.find(\"i\");\n if (data.success) {\n changeIcon(icon);\n status = \"alert-success\";\n } else {\n status = \"alert-danger\";\n }\n\n if ($(\".add-to-wishlist-messages\").length === 0) {\n if ($(window).width() > 992) { // NOSONAR\n $(\"body\").append(\"
    \");\n } else {\n $(\"body\").append(\"
    \");\n }\n }\n\n let linkWishlist = $(\".js-link-wishlist\").attr(\"href\");\n let linkWishlistTitle = $(\".js-link-wishlist\").attr(\"title\");\n\n if (data.action === \"Wishlist-AddProduct\") {\n $(\".add-to-wishlist-messages\").append(\"
    \" + data.msg + \"\" + data.link + \"
    \");\n } else {\n $(\".add-to-wishlist-messages\").append(\"
    \" + data.msg + \"
    \");\n }\n\n setTimeout(function () {\n $(\".add-to-wishlist-messages\").remove();\n button.removeAttr(\"disabled\");\n }, 5000);\n}\n\n/**\n * appends params to a url\n * @param {Object} icon - Icon that was clicked to add a product to the wishlist\n */\nfunction changeIcon(icon) {\n icon.toggleClass(\"cwf-star\").toggleClass(\"cwf-star-empty\");\n}\n\nmodule.exports = {\n addToWishlist: function () {\n var $wishlistBtn = $(\".product-detail__top--visuals--wishlist\");\n\n $wishlistBtn.each((index) => {\n let $wishlist = $($wishlistBtn[index]);\n\n $wishlist.find(\".add-to-wish-list\").on(\"click\", function (e) {\n e.preventDefault();\n\n let url = null;\n\n if ($wishlist.hasClass(\"not-wishlisted\")) {\n url = $(this).data(\"add-url\");\n } else {\n url = $(this).data(\"remove-url\");\n }\n\n var button = $(this);\n var pid = $(this).closest(\".product-detail\").find(\".product-id\").html();\n var optionId = $(this).closest(\".product-detail\").find(\".product-option\").attr(\"data-option-id\");\n var optionVal = $(this).closest(\".product-detail\").find(\".options-select option:selected\").attr(\"data-value-id\");\n optionId = optionId || null;\n optionVal = optionVal || null;\n if (!url || !pid) {\n return;\n }\n\n if ($wishlist.hasClass(\"not-wishlisted\")) {\n $wishlist.removeClass(\"not-wishlisted\").addClass(\"wishlisted\");\n $.spinner().start();\n $(this).attr(\"disabled\", true);\n $.ajax({\n url: url,\n type: \"post\",\n dataType: \"json\",\n data: {\n pid: pid,\n optionId: optionId,\n optionVal: optionVal\n },\n success: function (data) {\n displayMessage(data, button);\n },\n error: function (err) {\n displayMessage(err, button);\n }\n });\n } else {\n $wishlist.removeClass(\"wishlisted\").addClass(\"not-wishlisted\");\n $.spinner().start();\n $(this).attr(\"disabled\", true);\n $.ajax({\n url: url,\n type: \"get\",\n dataType: \"json\",\n data: {\n pid: pid\n },\n success: function (data) {\n displayMessage(data, button);\n },\n error: function (err) {\n displayMessage(err, button);\n }\n });\n }\n });\n });\n },\n /**\n * Fetches and displays the wishlist status for a product on PDP\n * @function\n * @name showWishlistStatus\n * @returns {void}\n */\n showWishlistStatus: function () {\n var $wishlistBtn = $(\".product-detail__top--wishlist\");\n var url = $wishlistBtn.data(\"fetch-wishlist-url\");\n var pid = $(\".product-detail\").find(\".product-id\").html();\n $(window).on(\"load\", function () {\n $.ajax({\n url: url,\n type: \"get\",\n dataType: \"json\",\n data: {\n pid: pid\n },\n success: function (data) {\n if (data && data.list && data.list.items && data.list.items.length) {\n var foundInList = data.list.items.filter(function (item) { return item.pid === pid;});\n if (foundInList.length > 0) {\n changeIcon($wishlistBtn.find(\"i\"));\n $wishlistBtn.closest(\".product-detail__top--visuals--wishlist\").toggleClass(\"not-wishlisted wishlisted\");\n }\n }\n },\n error: function (err) {\n displayMessage(err, $wishlistBtn);\n }\n });\n });\n }\n};\n","/* eslint-disable no-param-reassign */\nconst helpers = {\n appendToUrl(url, params) {\n let newUrl = url;\n\n newUrl += (newUrl.indexOf('?') !== -1 ? '&' : '?') + Object.keys(params)\n .map((key) => `${key}=${encodeURIComponent(params[key])}`)\n .join('&');\n return newUrl;\n },\n\n appendParamToURL(url, name, value) {\n // quit if the param already exists\n if (url.indexOf(name + '=') !== -1) {\n return url;\n }\n const separator = url.indexOf('?') !== -1 ? '&' : '?';\n\n value = decodeURIComponent(value);\n\n return url + separator + name + '=' + encodeURIComponent(value);\n },\n appendParamsToURL(url, params) {\n return Object.entries(params).reduce((acc, [name, value]) => {\n return helpers.appendParamToURL(acc, name, value);\n }, url);\n },\n\n removeParamFromURL(url, name) {\n if (url.indexOf('?') === -1 || url.indexOf(name + '=') === -1) {\n return url;\n }\n let hash = null;\n let params = null;\n const domain = url.split('?')[0];\n let paramUrl = url.split('?')[1];\n const newParams = [];\n // if there is a hash at the end, store the hash\n if (paramUrl.indexOf('#') > -1) {\n hash = paramUrl.split('#')[1] || '';\n paramUrl = paramUrl.split('#')[0];\n }\n params = paramUrl.split('&');\n for (let i = 0; i < params.length; i++) {\n // put back param to newParams array if it is not the one to be removed\n if (params[i].split('=')[0] !== name) {\n newParams.push(params[i]);\n }\n }\n\n return domain + '?' + newParams.join('&') + (hash ? '#' + hash : '');\n },\n\n updateURLParam(url, name, value) {\n url = this.removeParamFromURL(url, name);\n url = this.appendParamToURL(url, name, value);\n\n return url;\n },\n\n getQueryStringParams(qs) {\n if (!qs || qs.length === 0) {\n return {};\n }\n const params = {};\n // Use the string::replace method to iterate over each\n // name-value pair in the string.\n qs.replace(new RegExp('([^?=&]+)(=([^&]*))?', 'g'), ($0, $1, $2, $3) => {\n params[$1] = decodeURIComponent($3).replace(/\\+/g, ' ');\n });\n return params;\n },\n\n updateURLParams(url, params) {\n let updateUrl = url;\n for (let urlParam in params) { // eslint-disable-line\n updateUrl = this.updateURLParam(updateUrl, urlParam, params[urlParam]);\n }\n return updateUrl;\n },\n\n getParameterValueFromUrl(parameterName, url) {\n const currentQueryString = url || window.location.search;\n const currentQueryStringParams = this.getQueryStringParams(currentQueryString);\n\n return currentQueryStringParams[parameterName];\n }\n};\n\n\nmodule.exports = helpers;\n","'use strict';\n\nmodule.exports = {\n setTabNextFocus: function (focusParams) {\n var KEYCODE_TAB = 9;\n var isTabPressed = (focusParams.event.key === 'Tab' || focusParams.event.keyCode === KEYCODE_TAB);\n\n if (!isTabPressed) {\n return;\n }\n\n var firstFocusableEl = $(focusParams.containerSelector + ' ' + focusParams.firstElementSelector);\n var lastFocusableEl = $(focusParams.containerSelector + ' ' + focusParams.lastElementSelector);\n\n if ($(focusParams.containerSelector + ' ' + focusParams.lastElementSelector).is(':disabled')) {\n lastFocusableEl = $(focusParams.containerSelector + ' ' + focusParams.nextToLastElementSelector);\n if ($('.product-quickview.product-set').length > 0) {\n var linkElements = $(focusParams.containerSelector + ' a#fa-link.share-icons');\n lastFocusableEl = linkElements[linkElements.length - 1];\n }\n }\n\n if (focusParams.event.shiftKey) /* shift + tab */ {\n if ($(':focus').is(firstFocusableEl)) {\n lastFocusableEl.focus();\n focusParams.event.preventDefault();\n }\n } else /* tab */ {\n if ($(':focus').is(lastFocusableEl)) { // eslint-disable-line\n firstFocusableEl.focus();\n focusParams.event.preventDefault();\n }\n }\n }\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","// 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","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import processInclude from \"base/util\";\nimport detail from \"./product/detail\";\nimport wishlist from \"./product/wishlist\";\n\n$(document).ready(() => {\n processInclude(detail);\n processInclude(wishlist);\n});\n"],"names":[],"sourceRoot":""}