{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///../ecom-core/cartridges/app_custom_core/cartridge/client/default/js/product/base.js","webpack:///../ecom-core/cartridges/app_custom_core/cartridge/client/default/js/components/carousel.js","webpack:///../ecom-core/cartridges/app_custom_core/cartridge/client/default/js/components/load3dModel.js","webpack:///../ecom-core/cartridges/app_custom_core/cartridge/client/default/js/components/loadVideo.js","webpack:///../ecom-core/dependencies/storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/components/focus.js","webpack:///./cartridges/app_custom_bolle/cartridge/client/default/js/productDetail.js","webpack:///../ecom-core/cartridges/app_custom_core/cartridge/client/default/js/productDetail.js","webpack:///../ecom-core/cartridges/app_custom_core/cartridge/client/default/js/product/detail.js","webpack:///../ecom-core/dependencies/storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/product/detail.js","webpack:///./node_modules/clamp-js/clamp.js","webpack:///../ecom-core/cartridges/app_custom_core/cartridge/client/default/js/product/pdpInstoreInventory.js","webpack:///../ecom-core/cartridges/app_custom_core/cartridge/client/default/js/product/technicalSheetUpdate.js","webpack:///../ecom-core/cartridges/app_custom_core/cartridge/client/default/js/components/sideBySideImages.js","webpack:///./node_modules/zurb-twentytwenty/js/jquery.event.move.js","webpack:///./node_modules/zurb-twentytwenty/js/jquery.twentytwenty.js","webpack:///../ecom-core/cartridges/app_custom_core/cartridge/client/default/js/components/productZoomImage.js","webpack:///../ecom-core/node_modules/jquery-zoom/jquery.zoom.js","webpack:///../ecom-core/cartridges/app_custom_core/cartridge/client/default/js/product/pdpRX.js","webpack:///../ecom-core/dependencies/plugin_giftregistry/cartridges/plugin_giftregistry/cartridge/client/default/js/product/giftRegistry.js","webpack:///../ecom-core/cartridges/app_custom_core/cartridge/client/default/js/product/applepay.js","webpack:///../ecom-core/dependencies/plugin_wishlists/cartridges/plugin_wishlists/cartridge/client/default/js/product/wishlist.js","webpack:///../ecom-core/cartridges/app_custom_core/cartridge/client/default/js/storeLocator/storeLocator.js","webpack:///../ecom-core/dependencies/storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/storeLocator/storeLocator.js","webpack:///../ecom-core/dependencies/storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/util.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","carouselHelper","load3dModel","loadVideo","focusHelper","getPidValue","$el","$","hasClass","length","closest","find","data","text","getQuantitySelector","getQuantitySelected","val","handleVariantResponse","response","$productContainer","isVaraint","isMaster","isChoiceOfBonusProducts","parents","product","isEcommerceDisabled","addClass","removeClass","variationAttributes","attrs","msgs","isQuickView","attrsWithSwatches","forEach","attr","indexOf","id","values","attrValue","$attrValue","$swatchButton","parent","selected","siblings","assistiveSelectedText","empty","url","removeAttr","selectable","processSwatchValues","isOnline","isOrderable","color","substring","lastIndexOf","replace","size","inStockMapping","processSizeValues","$attr","resetUrl","processNonSwatchValues","updateAttrs","resources","productType","hasSelectedColor","$sizeButtonsContainer","selectableSizesList","not","attributeSelect","readyToOrder","productName","html","frameColor","carouselHtml","methods","createProductCarousel","bind3dModel","$pricesContainer","isPriceHidden","replaceWith","price","promotionsHtml","availabilityValue","availabilityMessages","availability","messages","message","info_selectforstock","updatedAvailability","productSoldWithQuoteRequest","available","trigger","updateAvailability","productSale","append","list","decimalPrice","updatePercentage","showLensLabel","lensName","lensCategory","lensDescription","updateLensDescription","$recommendations","relatedRecommendations","initRecommendationsCarousel","updateRecommendations","sizeDescription","pdpContentAssets","$contentAssetSection","pdpContentAssetsSeo","$contentAssetSeoSection","manufacturerSKU","updateManufacturerSKU","productQuoteUrl","updateProductSoldWithQuoteRequest","displayShippingDateRange","shippingDates","shippingCost","attributes","attributeGroup","ID","attribute","label","getAttributesHtml","$tabToSelect","lensTechnology","toLowerCase","$currentSliderContainer","$newImageToSelect","first","$currentSlickSlider","initLensTechnologyCarousel","selectedValueUrl","container","ajax","method","success","options","option","$optionEl","updateOptions","quantities","optionsHtml","map","quantity","join","updateQuantities","customquantities","spinner","stop","error","parseHtml","$html","parseHTML","body","footer","children","chooseBonusProducts","bonusUrl","remove","bonusChoiceRuleBased","showProductsUrlRuleBased","showProductsUrlListBased","htmlString","maxBonusItems","uuid","pliUUID","addToCartUrl","pageSize","labels","selectprods","on","start","modal","dataType","parsedHtml","renderedTemplate","enterDialogMessage","closeButtonText","getOptions","$elOption","this","urlValue","selectedValueId","optionId","toArray","JSON","stringify","editBonusProducts","focusChooseBonusProductModal","focus","onClosingChooseBonusProductModal","trapChooseBonusProductModalFocus","e","focusParams","event","containerSelector","firstElementSelector","lastElementSelector","setTabNextFocus","buttonAttribute","document","preventDefault","selectAttribute","currentTarget","addToCart","pid","pidsObj","setPids","$this","each","push","qty","childProducts","form","parseInt","$rxb2cModal","actionTarget","newBonusDiscountLineItem","keys","selectBonusProduct","$choiceOfBonusProduct","maxPids","submittedQty","totalQty","optionID","valueId","selectedBonusProductHtml","removeBonusProduct","$selected","count","enableBonusProductSelection","showMoreBonusProducts","addBonusProductsToCart","$readyToOrderBonusProducts","queryString","pidsObject","bonusProducts","qtyOption","productId","errorMessage","setTimeout","location","reload","defaultConfig","rows","dots","infinite","slidesToShow","slidesToScroll","responsive","breakpoint","settings","recommendationsDefaultConfig","centerMode","autoplay","autoplaySpeed","arrows","upsellRecommendationsDefaultConfig","mobileFist","einsteinDefaultConfig","lensTechnologyConfig","initProductCarousel","$carousel","$carouselContainer","carouselSlickConfig","slick","currentSlide","nextSlide","$slickPaging","index","initUpsellRecommendationsCarousel","nbOfItems","init","selectedVariation","$currentLensTechnologyItem","currentSlideClasseName","split","filter","className","test","startIndex","Math","max","MutationObserver","mutations","mutation","addedNodes","carousels","len","observe","childList","subtree","$oldCarousel","off","hotspotsVisible","htsptbtns","getElementsByClassName","window","toggleHotspots","getElementById","style","backgroundImage","visibility","mvHoverOff","mvHoverOn","startWiggle","stopWiggle","hs_show","display","animationName","bottom","backgroundColor","hs_hide","$modelEle","css","width","$currentActiveContainer","modelViewer","progress","bar","querySelector","addEventListener","totalProgress","detail","classList","toggle","transform","script1","createElement","script2","script3","script4","script5","script6","script7","script8","type","src","getElementsByTagName","appendChild","isAR","hide","show","emersyaURL","isShowcaseAR","productCode","presetCode","locale","getEmersyaURL","appendTo","$videoEle","videoUrl","keyCode","firstFocusableEl","lastFocusableEl","is","nextToLastElementSelector","linkElements","shiftKey","processInclude","ready","ex","base","$clamp","element","searchPID","exportDetails","extend","stickyProductInfo","scrollTop","containerWidth","innerWidth","descriptionSectionOffset","offset","currentScrollPosition","height","top","lensTechnoBottomPosition","topPosition","calculatePositionPrimaryFixedContainer","displayLenseTechnologyByFilter","str","currentLensTechnology","touchEndDetected","clickDetected","currentSelectedTechnology","click","lensTechnologyHover","outerHeight","displayLenseTechnologyByImageVariation","currentLensTechnologyItemAttribute","variationButton","readMoreLensDescription","$variantLensDescription","clamp","prev","customEvents","mainProductImageHeight","upsellEvents","updateAddToCartEnableDisableOtherElements","enableOrDisable","updateAttributesAndDetails","attributesHtml","shortDescription","longDescription","showSpinner","updateAttribute","eq","updateAddToCart","enable","every","item","allAvailable","allReady","sizeChart","$prodSizeChart","content","toggleClass","$sizeChart","has","target","copyProductLink","$temp","select","execCommand","truncationHTMLContainer","win","opt","useNativeClamp","splitOnChars","animate","truncationChar","truncationHTML","sty","originalText","innerHTML","supportsNativeClamp","clampValue","isCSSValue","computeStyle","elem","prop","getComputedStyle","el","pseudo","getPropertyValue","re","arguments","toUpperCase","currentStyle","getMaxLines","availHeight","clientHeight","lineHeight","getLineHeight","floor","lh","chunks","lastChunk","clampedText","clmp","slice","splitChar","getLastChild","lastChild","Array","pop","nodeValue","parentNode","removeChild","applyEllipsis","overflow","textOverflow","webkitBoxOrient","webkitLineClamp","truncate","maxHeight","shift","storeLocator","getModalHtmlElement","fillModalElement","selectedPostalCode","selectedRadius","requestData","products","radius","postalCode","storesResultsHtml","search","changeRadius","selectStore","updateSelectStoreButton","deselectStore","$container","storeElement","removeData","updateQuantityOptions","storeId","$quantitySelect","selectorPrefix","productIdSelector","quantitySelector","quantityOptionSelector","quantitySelected","productAtsValue","atsValue","originalHTML","selectedQuantity","updateQOptions","updateSelectStore","availableForInStorePickup","removeSelectedStoreOnAttributeChange","updateAddToCartFormData","parse","showInStoreInventory","stopPropagation","removeStoreSelection","selectStoreWithInventory","storeDetailsHtml","storeID","$changeStoreButton","searchPostalCode","searchRadius","changeStore","updateTechnicalAttribute","lensSize","dimensions","weight","productMaterial","lensMaterial","additionalLenses","additionalLensCategory","vlt","polarization","photochromy","vltAdditionalLens","lensShape","highContrast","baseTint","mirrorTint","lensCoating","technologies","mips","fitSystem","ventillation","removablePaddings","rx","interchangeableLenses","includedAccesories","certifications","isEmptyTechnicalSheet","updateTechnicalAttributes","default_offset_pct","orientation","before_label","after_label","no_overlay","move_slider_on_hover","move_with_handle_only","click_to_move","twentytwenty","assign","jQuery","requestFrame","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","fn","CustomEvent","params","bubbles","cancelable","undefined","evt","createEvent","initCustomEvent","Event","ignoreTags","textarea","input","button","mouseevents","touchevents","rspaces","eventOptions","eventsSymbol","getEvents","node","types","selector","events","handler","handlers","k","removeEventListener","splice","properties","dispatchEvent","Timer","callback","active","running","time","kick","end","cb","noop","identifiedTouch","touchList","identifier","changedTouch","touch","changedTouches","pageX","pageY","mousemove","checkThreshold","removeMouse","mouseend","removeTouch","touchmove","touchend","distX","distY","touches","targetTouches","timeStamp","template","altKey","ctrlKey","startX","startY","deltaX","deltaY","velocityX","velocityY","finger","enableMove","moveEnabled","triggerStart","activeMousemove","timer","activeMouseend","endEvent","which","isPrimaryButton","tagName","isIgnoreTag","defaultPrevented","updateEvent","activeTouchmove","activeTouchend","removeActiveTouch","special","movestart","setup","enableMove1","teardown","add","move","enableMove2","moveend","enableMove3","handleObj","originalEvent","apply","sliderPct","sliderOrientation","beforeDirection","afterDirection","wrap","overlay","beforeImg","afterImg","slider","adjustSlider","pct","dimensionPct","w","h","cw","ch","adjustContainer","getSliderPercentage","positionX","positionY","num","min","offsetY","imgHeight","offsetX","imgWidth","onMoveStart","left","onMove","onMoveEnd","moveTarget","doubletap","onDoubleTapCallback","onTapCallback","tapped","clearTimeout","viewportWidth","mobile","maxWidth","minWidth","tablet","layout","viewports","getMode","windowWidth","outerWidth","isMobile","isTablet","isDesktop","loadZoom","$imgZoom","hiresUrl","zoom","onZoomOut","onZoomIn","loadDesktopZoom","initMobileZoomEvent","$zoomedImg","one","loadMobileZoom","viewMode","layoutView","defaults","duration","magnify","source","img","targetHeight","targetWidth","sourceHeight","sourceWidth","xRatio","yRatio","$target","position","$source","opacity","border","$img","clicked","touched","srcElement","getAttribute","currentSrc","onload","fadeTo","support","isFunction","setAttribute","alt","handlePrescriptionFilter","isFilterPrescriptionActive","$spans","$indicator","isRx","firstPrescriptionSwatch","switchPrescriptionCTAs","nonPrescriptionPreviouslySelected","dataLayer","choixPrescription","RXFrame","updateAddToRegistry","updateGiftRegistryURLQuantity","giftRegistryLink","addToGiftRegistry","args","prodSetPid","encodedArgs","encodeURIComponent","redirectUrl","href","status","msg","displayMessage","err","responseJSON","applePayButton","showApplePay","applePayButtonIsmlString","addToWishlist","optionVal","store","appendToUrl","newUrl","maps","infowindow","google","InfoWindow","mapOptions","scrollwheel","center","LatLng","Map","mapdiv","autocomplete","bounds","LatLngBounds","markerImg","path","fillColor","fillOpacity","scale","strokeColor","strokeWeight","anchor","Point","labelOrigin","lable","storeLocation","latitude","longitude","marker","Marker","title","icon","toString","fontSize","addListener","setOptions","infoWindowHtml","open","fitBounds","places","Autocomplete","place","getPlace","geometry","lat","long","lng","updateStoresResults","$resultsDiv","$mapDiv","hasResults","stores","searchKey","locations","dialog","$form","urlParams","category","$geolocationField","geolocation","payload","serialize","detectLocation","navigator","getCurrentPosition","co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X,EAAWzB,KAAOyB,EAAWxB,OACpCW,EAAY,CACR1W,OAAQA,EACR8V,IAAKyB,EAAWzB,IAChBC,KAAMwB,EAAWxB,OAIzBzxB,EAAM2uB,EAAY3uB,EAAKoyB,GACvB,IAAIF,EAASz0B,EAAEgL,MAAM7K,QAAQ,8BACzB4I,EAAU0rB,EAAOv0B,OAASu0B,EAAO1rB,UAAY/I,EAAE+I,UACnDA,EAAQwB,QACRvK,EAAEiI,KAAK,CACH1F,IAAKA,EACLqS,KAAM,MACNnK,SAAU,OACVtC,QAAS,SAAU9H,GACf0I,EAAQC,OACRkrB,EAAoB7zB,GACpBL,EAAE,iBAAiBqb,KAAK,YAAY,UAKpDiD,YAAa,WACTte,EAAE,4BAA4BsK,GAAG,QAAS,iBAAiB,SAAWsB,GAClEA,EAAES,iBACF,IAAIopB,EAAgBz1B,EAAE,WAAY,0BAC9BK,EAAO,CACP8f,QAASsV,EAAch1B,MACvB6f,aAActgB,EAAE,WAAWS,MAC3B4f,iBAAkBrgB,EAAE,YAAYK,KAAK,cAAc6d,WACnDgC,iBAAkBuV,EAAcrzB,SAAS,SAAShC,KAAK,kBAAkB6D,OACzE6H,MAAOF,GAGX5L,EAAE,QAAQqF,QAAQ,iBAAkBhF,OAG5Cke,wBAAyB,WACrBve,EAAE,QAAQsK,GAAG,SAAU,uBAAuB,WAC1CtK,EAAE,iBAAiBqb,KAAK,YAAY,S,+BClQhD5d,EAAOD,QAAU,SAAUk4B,GACA,mBAAZA,EACPA,IAC0B,iBAAZA,GACdt3B,OAAOkP,KAAKooB,GAASh0B,SAAQ,SAAUzC,GACP,mBAAjBy2B,EAAQz2B,IACfy2B,EAAQz2B","file":"default/js/productDetail.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 = 248);\n","'use strict';\n\nvar carouselHelper = require('~/components/carousel');\nvar load3dModel = require('~/components/load3dModel');\nvar loadVideo = require('~/components/loadVideo');\nvar focusHelper = require('base:components/focus');\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\n if ($('#quickViewModal').hasClass('show') && !$('.product-set').length) {\n pid = $($el)\n .closest('.modal-content')\n .find('.product-quickview')\n .data('pid');\n } else if ($('.product-set-detail').length || $('.product-set').length) {\n pid = $($el)\n .closest('.product-detail')\n .find('.product-id')\n .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 return $el && $('.set-items').length\n ? $($el)\n .closest('.product-detail')\n .find('.quantity-select')\n : $('.quantity-select');\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, isQuickView) {\n attr.values.forEach(function (attrValue) {\n var $attrValue = $productContainer.find(\n '[data-attr=\"' + attr.id + '\"] [data-attr-value=\"' + attrValue.value + '\"]'\n );\n var $swatchButton = $attrValue.parent();\n\n if (attrValue.selected) {\n $attrValue.addClass('selected');\n $attrValue.siblings('.selected-assistive-text').text(msgs.assistiveSelectedText);\n } else {\n $attrValue.removeClass('selected');\n $attrValue.siblings('.selected-assistive-text').empty();\n }\n if (attrValue.url && !attrValue.selected) {\n $swatchButton.attr('data-url', attrValue.url + (isQuickView ? '&isQuickView=true' : ''));\n } else {\n $swatchButton.removeAttr('data-url');\n }\n\n // Disable if not selectable\n $attrValue.removeClass('selectable unselectable');\n\n $attrValue.addClass(attrValue.selectable ? 'selectable' : 'unselectable');\n });\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 */\nfunction processSizeValues(attr, $productContainer, isQuickView) {\n attr.values.forEach(function (attrValue) {\n var $attrValue = $productContainer.find(\n '[data-attr=\"' + attr.id + '\"] [data-attr-value=\"' + attrValue.value + '\"]'\n );\n var $swatchButton = $attrValue.parent();\n\n if (attrValue.selected) {\n $swatchButton.addClass('selected');\n } else {\n $swatchButton.removeClass('selected');\n }\n\n if (attrValue.url) {\n $swatchButton.attr('data-url', attrValue.url + (isQuickView ? '&isQuickView=true' : ''));\n } else {\n $swatchButton.removeAttr('data-url');\n }\n\n // Disable if not selectable\n $swatchButton.removeAttr('disabled');\n\n if (!attrValue.selectable) {\n $swatchButton.attr('disabled', true);\n }\n\n if (attrValue.isOnline) {\n $swatchButton.removeClass('d-none');\n } else {\n $swatchButton.addClass('d-none');\n }\n\n var url = attrValue.url;\n var color = url.substring(\n url.lastIndexOf('_color=') + 7,\n url.indexOf('&')\n ).replace('%26', '&').replace('%2B', '+').replace('%25', '%').replace('%3E', '>');\n var size = attrValue.value;\n var isOrderable;\n if (typeof attrValue.inStockMapping[color] !== 'undefined') {\n isOrderable = !!attrValue.inStockMapping[color][size];\n }\n if (isOrderable) {\n $swatchButton.removeClass('swatch-not-orderable');\n } else {\n $swatchButton.addClass('swatch-not-orderable');\n }\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, isQuickView) {\n var $attr = '[data-attr=\"' + attr.id + '\"]';\n var $defaultOption = $productContainer.find($attr + ' .select-' + attr.id + ' option:first');\n $defaultOption.attr('value', attr.resetUrl);\n\n attr.values.forEach(function (attrValue) {\n var $attrValue = $productContainer.find($attr + ' [data-attr-value=\"' + attrValue.value + '\"]');\n $attrValue.attr('value', attrValue.url + (isQuickView ? '&isQuickView=true' : '')).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, isQuickView) {\n // Currently, the only attribute type that has image swatches is Color.\n var attrsWithSwatches = ['color'];\n\n attrs.forEach(function (attr) {\n if (attrsWithSwatches.indexOf(attr.id) > -1) {\n processSwatchValues(attr, $productContainer, msgs, isQuickView);\n } else if (attr.id === 'size') {\n processSizeValues(attr, $productContainer, isQuickView);\n } else {\n processNonSwatchValues(attr, $productContainer, isQuickView);\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 availabilityMessages.forEach(function (message) {\n availabilityValue += '
  • ' + message + '
  • ';\n });\n }\n\n if (response.product) {\n var updatedAvailability = response.product.productSoldWithQuoteRequest ? false : response.product.available;\n $productContainer.find('.product-availability').attr('data-available', updatedAvailability);\n $productContainer.find('.product-availability').attr('data-ready-to-order', response.product.readyToOrder);\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 * Updates the lens Description 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 updateLensDescription(response, $productContainer) {\n var showLensLabel = false;\n if (response.product.lensName && response.product.lensName !== 'No Lens Reference') {\n if (response.product.lensName && response.product.lensName.length > 0) {\n $productContainer.find('.lens-attribute-name').html(response.product.lensName);\n showLensLabel = true;\n } else {\n $productContainer.find('.lens-attribute-name').empty();\n }\n\n if (response.product.lensCategory && response.product.lensCategory.length > 0) {\n $productContainer.find('.lens-attribute-category').html(' - ' + response.product.lensCategory);\n showLensLabel = true;\n } else {\n $productContainer.find('.lens-attribute-category').empty();\n }\n\n if (response.product.lensDescription && response.product.lensDescription.length > 0) {\n $productContainer.find('.lens-attribute-description').html(response.product.lensDescription);\n showLensLabel = true;\n } else {\n $productContainer.find('.lens-attribute-description').empty();\n }\n } else {\n $productContainer.find('.lens-attribute-name').empty();\n $productContainer.find('.lens-attribute-category').empty();\n $productContainer.find('.lens-attribute-description').empty();\n }\n\n // eslint-disable-next-line no-unused-expressions\n if (showLensLabel) {\n $productContainer.find('.lens-attributes').removeClass('d-none');\n } else {\n $productContainer.find('.lens-attributes').addClass('d-none');\n }\n}\n\n/**\n * Updates the Manufacturer SKU 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 updateManufacturerSKU(response, $productContainer) {\n if (response.product.manufacturerSKU && response.product.manufacturerSKU.length > 0) {\n $productContainer.find('.manufacturer-sku').html(response.product.manufacturerSKU);\n $productContainer.find('.manufacturer-sku-section').removeClass('d-none');\n } else {\n $productContainer.find('.manufacturer-sku').empty();\n $productContainer.find('.manufacturer-sku-section').addClass('d-none');\n }\n}\n\n/**\n * Updates the Add to cart in the Product Detail Page\n * If the product is only sellable with a quote then the add to cart redirect to this 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 updateProductSoldWithQuoteRequest(response, $productContainer) {\n $productContainer.find('.pdp-quote-button a, .js-content-asset-quote-link').attr('href', response.product.productQuoteUrl);\n if (response.product.productSoldWithQuoteRequest) {\n $productContainer.find('.pdp-quote-button').removeClass('d-none').addClass('d-flex');\n $productContainer.find('.prices-add-to-cart-actions .pdp-checkout-button').not('.pdp-quote-button').addClass('d-none').removeClass('d-flex');\n $productContainer.find('.add-to-cart-quantities').addClass('d-none');\n $productContainer.find('.update-cart-url').parent().addClass('d-none').removeClass('d-flex');\n $productContainer.find('.pdp-reinsurance-asset').addClass('d-none');\n } else {\n $productContainer.find('.pdp-quote-button').addClass('d-none').removeClass('d-flex');\n $productContainer.find('.prices-add-to-cart-actions .pdp-checkout-button').not('.pdp-quote-button').removeClass('d-none').addClass('d-flex');\n $productContainer.find('.add-to-cart-quantities').removeClass('d-none');\n $productContainer.find('.update-cart-url').parent().removeClass('d-none').addClass('d-flex');\n $productContainer.find('.pdp-reinsurance-asset').removeClass('d-none');\n }\n}\n\n/**\n * Update promotion percentage\n * @param {Object} response response\n * @param {JQuery} $productContainer productContainer\n */\nfunction updatePercentage(response, $productContainer) {\n var price = $productContainer.find('.prices .price > span');\n price.append('' + response.product.productSale + '%');\n}\n\n/**\n * Updates the recommendation carousal 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 updateRecommendations(response, $productContainer) {\n var $recommendations = $productContainer.find('.recommendations-carousel');\n $recommendations.html(response.product.relatedRecommendations);\n if (response.product.relatedRecommendations) {\n $recommendations.removeClass('slick-initialized slick-slider');\n carouselHelper.methods.initRecommendationsCarousel($recommendations);\n $productContainer.find('.recommendations .product-reco').removeClass('d-none');\n $productContainer.find('.recommendations .product-reco').attr('aria-hidden', 'false');\n } else {\n $productContainer.find('.recommendations .product-reco').addClass('d-none');\n $productContainer.find('.recommendations .product-reco').attr('aria-hidden', 'true');\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 + ': ' + 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} options - Ajax response options from selecting a product option\n * @param {jQuery} $productContainer - DOM element for current product\n */\nfunction updateOptions(options, $productContainer) {\n options.forEach(function (option) {\n var $optionEl = $productContainer.find('.product-option[data-option-id*=\"' + option.id + '\"]');\n option.values.forEach(function (value) {\n var valueEl = $optionEl.find('option[data-value-id*=\"' + value.id + '\"]');\n valueEl.val(value.url);\n });\n });\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 isVaraint;\n var isMaster;\n\n if (response.product.isEcommerceDisabled === true) {\n $('.js-hide-on-ecom-disabled', $productContainer).addClass('hide-ecom');\n $('.js-show-on-ecom-disabled', $productContainer).removeClass('hide-ecom');\n } else {\n $('.js-hide-on-ecom-disabled', $productContainer).removeClass('hide-ecom');\n $('.js-show-on-ecom-disabled', $productContainer).addClass('hide-ecom');\n }\n\n if (response.product.variationAttributes) {\n updateAttrs(response.product.variationAttributes, $productContainer, response.resources, response.isQuickView);\n\n isMaster = response.product.productType === 'master';\n isVaraint = response.product.productType === 'variant';\n\n var hasSelectedColor = $productContainer.find('.color-value').hasClass('selected');\n var $sizeButtonsContainer = $productContainer.find('.size-buttons-wrapper');\n\n // handle the case when a master with size and color attributes has no attribute selected and it is displayed as a master (incorrect name, prices appear as a range)\n if (isMaster && hasSelectedColor) { // just the color is selected, the size is not\n if ($sizeButtonsContainer.hasClass('size-first-load')) { // page first load with no selected sizes\n var selectableSizesList = $sizeButtonsContainer.find('.size-attribute').not(':disabled'); // list of selectable sizes\n if (selectableSizesList.length > 0) { // selectable sizes list is not empty\n $sizeButtonsContainer.removeClass('size-first-load'); // remove the original class added from the html when the page is loaded\n attributeSelect($(selectableSizesList[0]).attr('data-url'), $productContainer); // select the first selevctable size\n }\n }\n }\n\n if (isChoiceOfBonusProducts && isVaraint) {\n $productContainer.parent('.bonus-product-item').data('pid', response.product.id);\n\n $productContainer.parent('.bonus-product-item').data('ready-to-order', response.product.readyToOrder);\n }\n }\n\n // Update Display Name\n var productName = response.product.productName;\n $productContainer.find('.product-name').html(productName);\n\n // Update Display Color\n if (response.product.frameColor && response.product.frameColor.length > 0) {\n $productContainer.find('.frame-attribute-color-value').html(response.product.frameColor);\n }\n\n // Update carousel\n var carouselHtml = response.product.carouselHtml;\n carouselHelper.methods.createProductCarousel(carouselHtml, $productContainer);\n load3dModel.bind3dModel();\n loadVideo();\n\n // Update pricing\n if (!isChoiceOfBonusProducts) {\n var $pricesContainer = $('.prices', $productContainer);\n if (response.product.isPriceHidden === true) {\n $pricesContainer.addClass('hide-price');\n } else {\n $pricesContainer.removeClass('hide-price');\n }\n var $priceSelector = $('.price', $pricesContainer).length\n ? $('.price', $pricesContainer)\n : $('.prices .price');\n $priceSelector.replaceWith(response.product.price.html);\n }\n\n // Update promotions\n $('.promotions')\n .empty()\n .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,\n $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')\n .trigger('product:updateAddToCart', {\n product: response.product,\n $productContainer: $productContainer\n })\n .trigger('product:statusUpdate', response.product);\n }\n if (response.product.productSale) {\n updatePercentage(response, $productContainer);\n }\n updateLensDescription(response, $productContainer);\n\n updateRecommendations(response, $productContainer);\n $productContainer.find('.size-description').html(response.product.sizeDescription);\n\n if (response.product.pdpContentAssets) {\n let $contentAssetSection = $productContainer.find('.content-asset-section');\n if ($contentAssetSection.length) {\n $contentAssetSection.html(response.product.pdpContentAssets);\n } else {\n $productContainer.siblings('.content-asset-section').html(response.product.pdpContentAssets);\n }\n }\n if (response.product.pdpContentAssetsSeo) {\n let $contentAssetSeoSection = $productContainer.find('.content-asset-seo-section');\n if ($contentAssetSeoSection.length) {\n $contentAssetSeoSection.html(response.product.pdpContentAssetsSeo);\n } else {\n $productContainer.siblings('.content-asset-seo-section').html(response.product.pdpContentAssetsSeo);\n }\n }\n\n // Update Manufacturer SKU\n updateManufacturerSKU(response, $productContainer);\n\n updateProductSoldWithQuoteRequest(response, $productContainer);\n\n // Update Delivery Dates\n if (!response.product.available || !response.displayShippingDateRange) {\n $productContainer.find('.shipping-dates').addClass('d-none');\n $productContainer.find('.shipping-dates-value-container').addClass('d-none');\n } else {\n $productContainer.find('.shipping-dates').removeClass('d-none');\n $productContainer.find('.shipping-dates-value-container').removeClass('d-none');\n\n // Check if free delivery or not\n if (response.product.shippingDates) {\n var deliveryPrice = response.product.shippingDates.shippingCost;\n if (deliveryPrice === '0.00') {\n $productContainer.find('.free-shipping-dates').removeClass('d-none');\n $productContainer.find('.paid-shipping-dates').addClass('d-none');\n } else {\n $productContainer.find('.paid-shipping-dates').removeClass('d-none');\n $productContainer.find('.free-shipping-dates').addClass('d-none');\n }\n }\n }\n\n // Update attributes\n $productContainer\n .find('.main-attributes')\n .empty()\n .html(getAttributesHtml(response.product.attributes));\n\n if ($('.filter-by-lens-technology-list').length > 0 && $('.filter-by-lens-technology-list.no-refresh').length === 0) {\n var $tabToSelect = $('.filter-by-lens-technology-list li a[data-lenstechnology=\\'' + response.product.lensTechnology.toLowerCase().replace(/\\.|\\s/g, '-') + '\\']');\n $('.filter-by-lens-technology-list li').removeClass('active');\n $tabToSelect.parent().addClass('active');\n $('.lens-technology-description-variation').removeClass('d-none d-flex').addClass('d-none');\n var $currentSliderContainer = $('.lens-technology-description .variation-' + escapeSpecialChar(response.product.lensTechnology.toLowerCase().replace(/\\.|\\s/g, '-')));\n $currentSliderContainer.removeClass('d-none').addClass('d-flex');\n\n $('.variant-technology-image').removeClass('active');\n var $newImageToSelect = $('.lens-technology-description-variation .variant-color-attribute[data-image-variant=\\'' + response.product.id + '\\']:visible');\n $newImageToSelect.parent().addClass('active');\n\n $('.variant-technology-description').removeClass('active d-flex').addClass('d-none');\n var $newSectionToDisplay = $newImageToSelect.parents('.lens-technology-description-variation').find('.variant-technology-description[data-variant=\\'' + response.product.id + '\\']').first();\n $newSectionToDisplay.removeClass('d-none').addClass('active d-flex');\n var $currentSlickSlider = $currentSliderContainer.find('.lens-technology-carousel:visible');\n if (!$currentSlickSlider.hasClass('slick-initialized slick-slider')) {\n carouselHelper.methods.initLensTechnologyCarousel($currentSlickSlider);\n }\n } else {\n $('.filter-by-lens-technology-list').removeClass('no-refresh');\n }\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\n .map(function (quantity) {\n var selected = quantity.selected ? ' selected ' : '';\n return (\n ''\n );\n })\n .join('');\n getQuantitySelector($productContainer)\n .empty()\n .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 */\nfunction attributeSelect(selectedValueUrl, $productContainer) {\n if (selectedValueUrl) {\n $('body').trigger('product:beforeAttributeSelect', { url: selectedValueUrl, container: $productContainer });\n\n $.ajax({\n url: selectedValueUrl,\n method: 'GET',\n success: function (data) {\n handleVariantResponse(data, $productContainer);\n updateOptions(data.product.options, $productContainer);\n var productQuantities = (data.product.customquantities && data.product.customquantities.length > 0) ? data.product.customquantities : data.product.quantities;\n updateQuantities(productQuantities, $productContainer);\n $('body').trigger('product:afterAttributeSelect', { data: data, container: $productContainer });\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 * Escape String for special Characters\n * @param {*} str\n * @returns\n */\nfunction escapeSpecialChar(str) {\n return str.replace(/\\+/g, '\\\\+');\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 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 + ' '\n + data.labels.selectprods\n + ''\n + ' '\n + '
    '\n + '
    '\n + ''\n + '
    '\n + '
    '\n + '
    ';\n\n $('body').append(htmlString);\n\n $('#chooseBonusProductModal').on('shown.bs.modal', function () {\n if ($('.cart-page').length === 0) {\n $('#chooseBonusProductModal .modal-content')\n .spinner()\n .start();\n }\n });\n $('#chooseBonusProductModal').modal('show');\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\n $.spinner().stop();\n $('#chooseBonusProductModal .modal-content').spinner().stop();\n },\n error: function () {\n $.spinner().stop();\n $('#chooseBonusProductModal .modal-content').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\n // show add to cart toast\n if (response.newBonusDiscountLineItem && Object.keys(response.newBonusDiscountLineItem).length !== 0) {\n chooseBonusProducts(response.newBonusDiscountLineItem);\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)\n .find('.product-id')\n .text(),\n quantity: parseInt(\n $(this)\n .find('label.quantity')\n .data('quantity'),\n 10\n )\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 + '\"]').data('value-id');\n return {\n optionId: $(this).data('option-id'),\n selectedValueId: selectedValueId\n };\n })\n .toArray();\n\n return JSON.stringify(options);\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')\n .siblings()\n .attr('aria-hidden', 'true');\n $('#chooseBonusProductModal .close').focus();\n });\n },\n\n onClosingChooseBonusProductModal: function () {\n $('body').on('hidden.bs.modal', '#chooseBonusProductModal', function () {\n $('#chooseBonusProductModal')\n .siblings()\n .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 buttonAttribute: function () {\n $(document).on('click', '[data-attr=\"color\"] button, [data-attr=\"size\"] button', function (e) {\n e.preventDefault();\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 }\n\n attributeSelect($(this).attr('data-url'), $productContainer);\n });\n },\n\n selectAttribute: function () {\n $(document).on('change', 'select[class*=\"select-\"], .options-select', 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.value, $productContainer);\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)\n .closest('.modal-content')\n .find('.product-quickview');\n }\n\n if ($('.bundle-items', $productContainer).length === 0) {\n attributeSelect(\n $(e.currentTarget)\n .find('option:selected')\n .data('url'),\n $productContainer\n );\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 $this = $(this);\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)\n .find('.product-id')\n .text(),\n qty: $(this)\n .find('.quantity-select')\n .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)\n .closest('.quick-view-dialog')\n .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 if (addToCartUrl) {\n var $rxb2cModal = $('#rxB2CAddToCartModal');\n if ($rxb2cModal.length && $('input[name=\"currentCartIsRX\"]', $rxb2cModal).val() === 'true' && $('input[name=\"customerConfirmSubmit\"]', $rxb2cModal).val() !== 'true') {\n $.spinner().stop();\n $('body').trigger('rxb2c:openconfirmationmodal', {\n actionTarget: $this\n });\n return;\n }\n\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 },\n error: function () {\n $.spinner().stop();\n }\n });\n }\n });\n },\n selectBonusProduct: function () {\n $(document).on('click', '.select-bonus-product', function () {\n //Remove Previously added product\n $('.selected-pid').trigger('click');\n\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 $('.add-bonus-products').trigger('click');\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')\n .spinner()\n .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')\n .spinner()\n .stop();\n },\n error: function () {\n $('.modal-content')\n .spinner()\n .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 $('.minicart-quantity').html(data.totalQty);\n if ($('.cart-page').length === 0) {\n $('body').trigger('cart:update');\n }\n setTimeout(function () {\n if ($('.cart-page').length) {\n location.reload();\n }\n }, 1500);\n }\n },\n error: function () {\n $.spinner().stop();\n }\n });\n });\n },\n getPidValue: getPidValue,\n getQuantitySelected: getQuantitySelected\n};\n","'use strict';\n\nconst defaultConfig = {\n rows: 0,\n dots: true,\n infinite: true,\n slidesToShow: 4,\n slidesToScroll: 4,\n responsive: [\n {\n breakpoint: 1024,\n settings: {\n dots: true,\n infinite: true,\n rows: 0,\n slidesToShow: 3,\n slidesToScroll: 3\n\n }\n }, {\n breakpoint: 600,\n settings: {\n dots: true,\n infinite: true,\n rows: 0,\n slidesToShow: 2,\n slidesToScroll: 2\n }\n }, {\n breakpoint: 480,\n settings: {\n dots: false,\n infinite: true,\n rows: 0,\n slidesToShow: 2,\n slidesToScroll: 1\n }\n }\n ]\n};\n\nconst recommendationsDefaultConfig = {\n rows: 0,\n dots: true,\n infinite: false,\n slidesToShow: 4,\n slidesToScroll: 1,\n centerMode: false,\n autoplay: false,\n autoplaySpeed: 1000,\n responsive: [\n {\n breakpoint: 1140,\n settings: {\n dots: true,\n infinite: true,\n rows: 0,\n slidesToShow: 3,\n slidesToScroll: 1,\n centerMode: false,\n autoplay: false,\n autoplaySpeed: 1000,\n arrows: true\n }\n }, {\n breakpoint: 720,\n settings: {\n dots: true,\n infinite: true,\n rows: 0,\n slidesToShow: 2,\n slidesToScroll: 1,\n centerMode: false,\n autoplay: false,\n autoplaySpeed: 1000,\n arrows: true\n }\n }, {\n breakpoint: 540,\n settings: {\n dots: true,\n infinite: true,\n rows: 0,\n slidesToShow: 2,\n slidesToScroll: 1,\n centerMode: false,\n autoplay: false,\n autoplaySpeed: 1000,\n arrows: true\n }\n }\n ]\n};\n\nconst upsellRecommendationsDefaultConfig = {\n rows: 0,\n dots: false,\n infinite: false,\n slidesToShow: 2,\n slidesToScroll: 1,\n centerMode: false,\n autoplay: false,\n mobileFist: true,\n responsive: []\n};\n\nconst einsteinDefaultConfig = {\n rows: 0,\n dots: false,\n infinite: false,\n slidesToShow: 4,\n slidesToScroll: 1,\n centerMode: false,\n autoplay: false,\n autoplaySpeed: 1000,\n responsive: [\n {\n breakpoint: 1140,\n settings: {\n dots: true,\n infinite: true,\n rows: 0,\n slidesToShow: 3,\n slidesToScroll: 1,\n centerMode: false,\n autoplay: false,\n autoplaySpeed: 1000,\n arrows: true\n }\n }, {\n breakpoint: 720,\n settings: {\n dots: true,\n infinite: true,\n rows: 0,\n slidesToShow: 2,\n slidesToScroll: 1,\n centerMode: false,\n autoplay: false,\n autoplaySpeed: 1000,\n arrows: true\n }\n }, {\n breakpoint: 540,\n settings: {\n dots: false,\n infinite: true,\n rows: 0,\n slidesToShow: 2,\n slidesToScroll: 1,\n centerMode: false,\n autoplay: false,\n autoplaySpeed: 1000,\n arrows: true\n }\n }\n ]\n};\n\nvar lensTechnologyConfig = {\n rows: 0,\n dots: false,\n infinite: false,\n slidesToShow: 5,\n centerMode: false,\n autoplay: false,\n autoplaySpeed: 1000,\n arrows: true,\n responsive: [\n {\n breakpoint: 1140,\n settings: {\n dots: false,\n infinite: false,\n rows: 0,\n slidesToShow: 4,\n centerMode: false,\n autoplay: false,\n autoplaySpeed: 1000,\n arrows: true\n }\n }, {\n breakpoint: 992,\n settings: {\n dots: false,\n infinite: false,\n rows: 0,\n slidesToShow: 4,\n centerMode: false,\n autoplay: false,\n autoplaySpeed: 1000,\n arrows: true\n }\n }, {\n breakpoint: 544,\n settings: {\n dots: false,\n infinite: false,\n rows: 0,\n slidesToShow: 5,\n centerMode: false,\n autoplay: false,\n autoplaySpeed: 1000,\n arrows: true\n }\n }, {\n breakpoint: 460,\n settings: {\n dots: false,\n infinite: false,\n rows: 0,\n slidesToShow: 4,\n centerMode: false,\n autoplay: false,\n autoplaySpeed: 1000,\n arrows: true\n }\n }, {\n breakpoint: 365,\n settings: {\n dots: false,\n infinite: false,\n rows: 0,\n slidesToShow: 3,\n centerMode: false,\n autoplay: false,\n autoplaySpeed: 1000,\n arrows: true\n }\n }\n ]\n};\n\n/**\n * Dynamically creates Bootstrap carousel from response containing images\n * @param {string} html - The carousel html\n * @param {jQuery} $productContainer - DOM element for a given product\n */\nconst createProductCarousel = (html, $productContainer) => {\n const $carouselContainer = $productContainer.find('.carousel-container');\n const $oldCarousel = $($carouselContainer).find('.product-carousel');\n\n $carouselContainer.off('touchstart click', '.slick-paging-btn');\n $oldCarousel.off('beforeChange');\n $oldCarousel.find('.product-carousel').slick('unslick');\n\n $($carouselContainer)\n .empty()\n .append(html);\n\n const $carousel = $($carouselContainer).find('.product-carousel');\n initProductCarousel($carousel);\n};\n\n/**\n * Initializes the carousel with all the necessary events\n * @param {jQuery} $carousel The jQuery object for the carousel\n */\nconst initProductCarousel = ($carousel) => {\n const $carouselContainer = $carousel.parents('.carousel-container');\n var carouselSlickConfig = $carouselContainer.data('configuration');\n if (carouselSlickConfig) {\n $carousel.slick(carouselSlickConfig);\n } else {\n $carousel.slick({ rows: 0 });\n }\n\n $carousel.on('beforeChange', function (event, slick, currentSlide, nextSlide) {\n var $slickPaging = $carouselContainer.find('.slick-paging');\n $slickPaging.find('.slick-paging-btn').removeClass('active');\n $slickPaging.find(`.slick-paging-btn:nth-child(${nextSlide + 1})`).addClass('active');\n });\n\n $carouselContainer.on('touchstart click', '.slick-paging-btn', function () {\n $carousel.slick('slickGoTo', $(this).index());\n });\n};\n\nconst initCarousel = ($carousel) => {\n if (!$carousel.data('slick')) {\n $carousel.slick(defaultConfig);\n } else {\n $carousel.slick();\n }\n};\n\n// recommendations-carousel\nconst initRecommendationsCarousel = ($carousel) => {\n if (!$carousel.data('slick')) {\n $carousel.slick(recommendationsDefaultConfig);\n } else {\n $carousel.slick();\n }\n};\n\n// upsell recommendations-carousel\nconst initUpsellRecommendationsCarousel = ($carousel) => {\n if (!$carousel.data('slick')) {\n $carousel.slick(upsellRecommendationsDefaultConfig);\n } else {\n $carousel.slick();\n }\n};\n\n// recommendations-carousel\nconst initEinsteinRecommendationsCarousel = ($carousel) => {\n if (!$carousel.data('slick')) {\n $carousel.slick(einsteinDefaultConfig);\n } else {\n $carousel.slick();\n }\n};\n\nconst initLensTechnologyCarousel = ($carousel) => {\n if (!$carousel.data('slick')) {\n var nbOfItems = $carousel.find('li').length;\n if (nbOfItems >= 5) {\n lensTechnologyConfig.slidesToShow = 5;\n } else if (nbOfItems === 4) {\n lensTechnologyConfig.slidesToShow = 4;\n } else if (nbOfItems === 3) {\n lensTechnologyConfig.slidesToShow = 3;\n lensTechnologyConfig.responsive[0].settings.slidesToShow = 3;\n lensTechnologyConfig.responsive[1].settings.slidesToShow = 3;\n lensTechnologyConfig.responsive[2].settings.slidesToShow = 3;\n lensTechnologyConfig.responsive[3].settings.slidesToShow = 3;\n } else if (nbOfItems === 2) {\n lensTechnologyConfig.slidesToShow = 2;\n lensTechnologyConfig.responsive[0].settings.slidesToShow = 2;\n lensTechnologyConfig.responsive[1].settings.slidesToShow = 2;\n lensTechnologyConfig.responsive[2].settings.slidesToShow = 2;\n lensTechnologyConfig.responsive[3].settings.slidesToShow = 2;\n lensTechnologyConfig.responsive[4].settings.slidesToShow = 2;\n } else if (nbOfItems === 1) {\n lensTechnologyConfig.slidesToShow = 1;\n lensTechnologyConfig.responsive[0].settings.slidesToShow = 1;\n lensTechnologyConfig.responsive[1].settings.slidesToShow = 1;\n lensTechnologyConfig.responsive[2].settings.slidesToShow = 1;\n lensTechnologyConfig.responsive[3].settings.slidesToShow = 1;\n lensTechnologyConfig.responsive[3].settings.slidesToShow = 1;\n lensTechnologyConfig.responsive[4].settings.slidesToShow = 1;\n } else if (nbOfItems === 0) {\n lensTechnologyConfig.slidesToShow = 0;\n lensTechnologyConfig.responsive[0].settings.slidesToShow = 0;\n lensTechnologyConfig.responsive[1].settings.slidesToShow = 0;\n lensTechnologyConfig.responsive[2].settings.slidesToShow = 0;\n lensTechnologyConfig.responsive[3].settings.slidesToShow = 0;\n lensTechnologyConfig.responsive[4].settings.slidesToShow = 0;\n } else {\n lensTechnologyConfig.slidesToShow = $carousel.find('li').length;\n }\n $carousel.slick(lensTechnologyConfig);\n } else {\n $carousel.slick();\n }\n};\n\nconst init = () => {\n $('.carousel').each(function () {\n initCarousel($(this));\n });\n\n $('.product-carousel').each(function () {\n initProductCarousel($(this));\n });\n\n $('.lens-technology-carousel:visible').each(function () {\n /**\n * Select lens technology based on default variation (at page load)\n */\n $(this).on('init', function (event, slick) {\n var selectedVariation = $('#color-variations-wrapper .color-value.selected').closest('.color-variations-item').attr('data-color-variant');\n\n // retieve the corresponding lens technology item\n var $currentLensTechnologyItem = $(\".variant-technology-image[data-color-variant='\" + selectedVariation + \"']\");\n // scroll to the current active slide\n if ($currentLensTechnologyItem.closest('.lens-technology-image-list').hasClass('slick-initialized')) {\n var currentSlideClasses = $currentLensTechnologyItem.attr('class').split(' '); // get all classes\n var currentSlideClasseName = currentSlideClasses.filter(className => /^custom-order-\\d+$/.test(className))[0]; // get the string for the class \"order-\"\n var currentSlidePosition = parseInt(currentSlideClasseName.split('-')[1], 10); // get the number\n\n var slidesToShow = slick.options.slidesToShow;\n var startIndex = currentSlidePosition - slidesToShow + 1;\n startIndex = Math.max(startIndex, 0);\n slick.currentSlide = startIndex;\n }\n });\n initLensTechnologyCarousel($(this));\n });\n\n $('.recommendations-carousel').each(function () {\n initRecommendationsCarousel($(this));\n });\n\n $('.recommendations-upsell-carousel').each(function () {\n initUpsellRecommendationsCarousel($(this));\n });\n\n $('body').on('shown.bs.modal', '.modal', function () {\n $(this).find('.product-carousel').each(function () {\n initProductCarousel($(this));\n });\n });\n\n const observer = new MutationObserver(function (mutations) {\n mutations.forEach((mutation) => {\n if (mutation.addedNodes && mutation.addedNodes.length > 0) {\n const carousels = $(mutation.addedNodes).find('.slot-carousel');\n for (let i = 0, len = carousels.length; i < len; i++) {\n initEinsteinRecommendationsCarousel($(carousels[i]));\n }\n }\n });\n });\n\n observer.observe(document.body, { childList: true, subtree: true });\n};\n\nmodule.exports = {\n init,\n methods: {\n createProductCarousel: createProductCarousel,\n initRecommendationsCarousel: initRecommendationsCarousel,\n initUpsellRecommendationsCarousel: initUpsellRecommendationsCarousel,\n initLensTechnologyCarousel: initLensTechnologyCarousel\n }\n};\n","'use strict';\n\nvar hotspotsVisible = true;\nlet htsptbtns = document.getElementsByClassName('Hotspot hs-element');\n\nfunction mvHoverOff() {\n hotspotsVisible = false;\n document.getElementById('btn-toggle').style.backgroundImage = \"url('https://dky5neca2x8co.cloudfront.net/Bolle/model-viewers/common/images/info-icon2.png')\";\n let list= document.getElementsByClassName('hs-element');\n for (var i = 0; i < list.length; i++) {\n list[i].style.visibility= \"hidden\";\n }\n}\n\nfunction mvHoverOn() {\n hotspotsVisible = true;\n document.getElementById('btn-toggle').style.backgroundImage = \"url('https://dky5neca2x8co.cloudfront.net/Bolle/model-viewers/common/images/info-icon.png')\";\n let list= document.getElementsByClassName('hs-element');\n for (var i = 0; i < list.length; i++) {\n list[i].style.visibility= \"visible\";\n }\n}\n\nwindow.toggleHotspots = function() {\n if(hotspotsVisible) mvHoverOff();\n else mvHoverOn();\n}\n\nwindow.startWiggle = function() {\n $('model-viewer').attr('interaction-prompt', \"auto\");\n}\n\nwindow.stopWiggle = function() {\n $('model-viewer').attr('interaction-prompt', \"none\");\n}\n\nwindow.hs_show = function(id) {\n document.getElementById(id).style.display = \"block\";\n document.getElementById(id).style.animationName = \"slide-in\";\n document.getElementById(id).style.bottom = \"0\";\n \n // hide btns\n for(var i=0; i {\n $(window).on('resize', function () {\n var $modelEle = $('.product-carousel .model-container');\n setTimeout(() => {\n $('model-viewer').css({\n 'width' : $modelEle.width(),\n 'height' : $modelEle.width()\n })\n }, 200);\n });\n $('.product-sticker-3d').on('click', function(event) {\n event.preventDefault();\n $('.slick-paging-3d').addClass('showcase-ar').trigger('click');\n });\n $('.product-carousel').on('afterChange', function(event, slick, currentSlide, nextSlide) {\n var $currentActiveContainer = $('.carousel-item[data-slick-index=\"' + currentSlide + '\"');\n if ($currentActiveContainer.hasClass('model-container')) {\n $('.product-carousel').slick('slickSetOption', 'swipe', false, false);\n var $modelEle = $('.product-carousel .model-container');\n\n //If model is already loaded, then return\n if ($modelEle.hasClass('model-loaded')) return;\n\n var modelViewer = $currentActiveContainer.find('.model-viewer').get(0);\n var progress = $currentActiveContainer.find('.model-progress').get(0);\n var bar = progress.querySelector('.bar');\n \n modelViewer.addEventListener('progress', (event) => {\n var { totalProgress } = event.detail;\n progress.classList.toggle('show', totalProgress < 1);\n bar.style.transform = `scaleX(${totalProgress})`;\n });\n \n //3d model js files\n var script1 = document.createElement(\"script\");\n var script2 = document.createElement(\"script\");\n var script3 = document.createElement(\"script\");\n var script4 = document.createElement(\"script\");\n var script5 = document.createElement(\"script\");\n var script6 = document.createElement(\"script\");\n var script7 = document.createElement(\"script\");\n var script8 = document.createElement(\"script\");\n script1.type = \"text/javascript\";\n script2.type = \"text/javascript\";\n script3.type = \"text/javascript\";\n script4.type = \"text/javascript\";\n script5.type = \"text/javascript\";\n script6.type = \"module\";\n script7.type = \"text/javascript\";\n script8.type = \"text/javascript\";\n script1.src=\"https://unpkg.com/@webcomponents/webcomponentsjs@2.1.3/webcomponents-loader.js\"\n script2.src=\"https://unpkg.com/intersection-observer@0.5.1/intersection-observer.js\"\n script3.src=\"https://unpkg.com/resize-observer-polyfill@1.5.0/dist/ResizeObserver.js\"\n script4.src=\"https://unpkg.com/fullscreen-polyfill@1.0.2/dist/fullscreen.polyfill.js\"\n script5.src=\"https://unpkg.com/focus-visible@5.1.0/dist/focus-visible.js\"\n script6.src=\"https://dky5neca2x8co.cloudfront.net/model-viewer-public/model-viewer.min.js\"\n script7.src=\"https://dky5neca2x8co.cloudfront.net/model-viewer-public/timeme.min.js\"\n script8.src=\"https://dky5neca2x8co.cloudfront.net/model-viewer-public/stats_track.min.js\"\n document.getElementsByTagName(\"head\")[0].appendChild(script1);\n document.getElementsByTagName(\"head\")[0].appendChild(script2);\n document.getElementsByTagName(\"head\")[0].appendChild(script3);\n document.getElementsByTagName(\"head\")[0].appendChild(script4);\n document.getElementsByTagName(\"head\")[0].appendChild(script5);\n document.getElementsByTagName(\"head\")[0].appendChild(script6);\n document.getElementsByTagName(\"head\")[0].appendChild(script7);\n document.getElementsByTagName(\"head\")[0].appendChild(script8);\n\n $('model-viewer').css({\n 'width' : $modelEle.width(),\n 'height' : $modelEle.width()\n });\n $modelEle.addClass('model-loaded');\n } else if ($currentActiveContainer.hasClass('emersya-container')) {\n $('.product-carousel').slick('slickSetOption', 'swipe', false, false);\n var $modelEle = $('.product-carousel .emersya-container').not('.slick-cloned');\n var isAR = $('.slick-paging-3d.showcase-ar').length > 0 ? true : false;\n\n if (isAR) {\n $('.emersya-iframe').hide();\n $('.emersya-iframe-ar').show();\n } else {\n $('.emersya-iframe').show();\n $('.emersya-iframe-ar').hide();\n }\n $('.slick-paging-3d').removeClass('showcase-ar');\n\n //If model is already loaded, then return\n if (!isAR && $modelEle.hasClass('emersya-loaded')) return;\n if (isAR && $modelEle.hasClass('emersya-ar-loaded')) return;\n \n var emersyaURL = getEmersyaURL($modelEle, isAR);\n\n $('')\n .appendTo($modelEle);\n\n if (isAR) {\n $modelEle.addClass('emersya-ar-loaded');\n } else {\n $modelEle.addClass('emersya-loaded');\n }\n } else {\n $('.product-carousel').slick('slickSetOption', 'swipe', true, false);\n }\n });\n};\n\nconst init = () => {\n if ($('.emersya-container').length === 0) {\n bind3dModel();\n }\n};\n\n/**\n * Create emersya url\n * @param {jQuery} $modelEle - Current container\n * @param {boolean} isShowcaseAR - Display the AR directly or not\n * @returns {string} - Emersya URL\n */\nfunction getEmersyaURL($modelEle, isShowcaseAR) {\n var productCode = $modelEle.attr('data-emersya-productcode');\n\n if (productCode.length === 0) return;\n\n var presetCode = $modelEle.attr('data-emersya-productpreset');\n var locale = $modelEle.attr('data-emersya-locale');\n\n if (locale === 'default' || locale.length === 0) {\n locale = 'en';\n }\n var emersyaURL = 'https://emersya.com';\n if (locale.length > 0) {\n emersyaURL += '/' + locale;\n }\n\n emersyaURL += (isShowcaseAR ? '/showcaseAR/' : '/showcase/') + productCode;\n\n if (presetCode.length > 0) {\n emersyaURL += '/' + presetCode;\n }\n\n return emersyaURL;\n}\n\nmodule.exports = {\n init,\n bind3dModel: bind3dModel\n};\n","'use strict';\n\n/**\n * Function to load a youtube video in the pdp image carousel\n */\nmodule.exports = function () {\n $('.product-carousel').on('afterChange', function (event, slick, currentSlide, nextSlide) {\n var $currentActiveContainer = $('.carousel-item[data-slick-index=\"' + currentSlide + '\"');\n if ($currentActiveContainer.hasClass('video-container')) {\n $('.product-carousel').slick('slickSetOption', 'swipe', false, false);\n var $videoEle = $('.product-carousel .video-container');\n\n // If model is already loaded, then return\n if ($videoEle.hasClass('video-loaded')) return;\n\n var videoThumbnail = $videoEle.attr('data-video-thumbnail');\n\n if (videoThumbnail.length === 0) return;\n\n var videoUrl = $videoEle.attr('data-video-url');\n\n // Youtube URL\n $('')\n .appendTo($videoEle);\n\n $videoEle.addClass('video-loaded');\n }\n });\n};\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\nrequire('core/productDetail');\n","'use strict';\n\nvar processInclude = require('base:util');\n\n$(document).ready(function () {\n // Include base details\n processInclude(require('~/product/detail'));\n processInclude(require('~/product/pdpInstoreInventory'));\n processInclude(require('~/product/technicalSheetUpdate'));\n // plugin for the polarization effect on PDP Polarization Benefits section\n processInclude(require('~/components/sideBySideImages'));\n\n // plugin for the zoom effect on PDP Image section\n processInclude(require('~/components/productZoomImage'));\n\n processInclude(require('~/components/loadVideo'));\n //plugin for loading 3d-model\n processInclude(require('~/components/load3dModel'));\n processInclude(require('~/product/pdpRX'));\n // Gift Registry\n try {\n processInclude(require('giftregistry:product/giftRegistry'));\n } catch (ex) {\n // plugin not in use\n }\n\n // Apple pay\n try {\n processInclude(require('~/product/applepay'));\n } catch (ex) {\n // plugin not in use\n }\n\n // Wishlists\n try {\n processInclude(require('wishlist:product/wishlist'));\n } catch (ex) {\n // plugin not in use\n }\n});\n","'use strict';\n\nvar base = require('~/product/base');\nvar detail = require('base:product/detail');\nvar carouselHelper = require('~/components/carousel');\nvar $clamp = require('clampjs');\n\n/**\n * Update availability on change event on quantity selector and on store:afterRemoveStoreSelection event.\n * If store has been selected, exit function otherwise proceed to update attributes.\n * @param {Object} element DOM Element.\n */\nfunction updateAvailability(element) {\n var searchPID = $(element).closest('.product-detail').attr('data-pid');\n var selectorPrefix = '.product-detail[data-pid=\"' + searchPID + '\"]';\n if ($(selectorPrefix + ' .selected-store-with-inventory').is(':visible')) {\n return;\n }\n\n var $productContainer = $(element).closest('.product-detail');\n if (!$productContainer.length) {\n $productContainer = $(element).closest('.modal-content').find('.product-quickview');\n }\n\n if ($('.bundle-items', $productContainer).length === 0) {\n base.attributeSelect($(element).find('option:selected').data('url'),\n $productContainer);\n }\n}\n\n/**\n * Registering on change event on quantity selector. If store has been selected, exist function,\n * otherwise proceed to update attributes.\n */\nfunction availability() {\n $(document).on('change', '.quantity-select', function (e) {\n e.preventDefault();\n\n updateAvailability($(this));\n });\n\n $(document).on('store:afterRemoveStoreSelection', function (e, element) {\n e.preventDefault();\n updateAvailability(element);\n });\n}\n\n/**\n * Register custom events\n */\nfunction customEvents() {\n $(window).on('scroll', function () {\n $('.product-carousel-container .carousel-container').css('min-height', '');\n var mainProductImageHeight = $('.product-carousel-container .carousel-container > div').height();\n $('.product-carousel-container .carousel-container').css('min-height', mainProductImageHeight);\n });\n\n $(window).on('resize', function () {\n $('.product-carousel-container .carousel-container').css('min-height', '');\n });\n if ($('.product-reco-upsell').height() > 0 && $('.product-reco-upsell').is(':visible')) {\n $('.lens-technology-description').css('min-height', 425);\n }\n}\n\n/**\n * Dynamically update PDP Main info container width and trigger the calculation of the Primary Container\n */\nfunction stickyProductInfo() {\n if ($('.product-sunglasses-context').length > 0) {\n $(window).on('scroll resize', function () {\n calculatePositionPrimaryFixedContainer($(this).scrollTop());\n });\n $(window).on('load resize', function () {\n $(window).trigger('scroll');\n });\n $('.lens-technology-carousel:visible').slick('refresh');\n }\n}\n\n/**\n * Display lense technology By Filter\n */\nfunction displayLenseTechnologyByFilter() {\n $('.filter-by-lens-technology-list').on('click', 'li > a', function (e) {\n e.preventDefault();\n $('.filter-by-lens-technology-list li').removeClass('active');\n $(this).parent().addClass('active');\n $('.lens-technology-description-variation').removeClass('d-none d-flex').addClass('d-none');\n var currentLensTechnology = $(this).attr('data-lenstechnology');\n $('.lens-technology-description .variation-' + escapeSpecialChar(currentLensTechnology)).removeClass('d-none').addClass('d-flex');\n $('.filter-by-lens-technology-select').val(currentLensTechnology);\n\n $('.variant-technology-image a:visible').first().trigger('click');\n\n if ($('.lens-technology-carousel:visible .slick-track').length > 0) {\n $('.lens-technology-carousel:visible').slick('slickGoTo', 0).slick('refresh');\n } else {\n carouselHelper.methods.initLensTechnologyCarousel($('.lens-technology-carousel:visible'));\n }\n touchEndDetected = false;\n clickDetected = false;\n });\n\n $('.filter-by-lens-technology-select').on('change', function() {\n var currentSelectedTechnology = $(this).val();\n $('.filter-by-lens-technology-list li a[data-lenstechnology=\\'' + currentSelectedTechnology + '\\']').click();\n });\n\n var touchEndDetected = false;\n var clickDetected = false;\n\n $('.filter-by-lens-technology-list li').on('click mouseover touchend', function (e) {\n if (e.type === 'touchend' || e.type === 'click') {\n touchEndDetected = true;\n clickDetected = true;\n }\n\n if (!touchEndDetected && !clickDetected && $(window).width() > 768) {\n var lensTechnologyHover = $(this).find('.asset-lens-technology');\n lensTechnologyHover.removeAttr('style');\n lensTechnologyHover\n .css('width', $('.variant-technology-asset:visible').width())\n .css('top', -lensTechnologyHover.outerHeight() - 10)\n .css('margin-left', (-(lensTechnologyHover.width() / 2) + ($(this).width() / 2)))\n .removeClass('d-none');\n\n touchEndDetected = false;\n clickDetected = false;\n }\n });\n\n $('.filter-by-lens-technology-list li').on('mouseleave', function (e) {\n $(this).find('.asset-lens-technology').addClass('d-none');\n });\n\n $(window).on('resize', function () {\n touchEndDetected = false;\n clickDetected = false;\n });\n}\n\n/**\n * Display lense technology By Image Variation\n */\nfunction displayLenseTechnologyByImageVariation() {\n $('.variant-technology-image').on('click', 'a', function (e) {\n e.preventDefault();\n var $currentLensTechnologyItem = $(this);\n\n // deselect other lens variant images and mark the current item as selected\n $('.variant-technology-image').removeClass('active');\n $currentLensTechnologyItem.parent().addClass('active');\n\n // get the attribute from the lens\n var currentLensTechnologyItemAttribute = $currentLensTechnologyItem.attr('data-color-variant');\n\n // set classes for the lens tabs section, make sure only the current tab is visible\n $('.variant-technology-description').removeClass('active d-flex').addClass('d-none');\n var $newSectionToDisplay = $currentLensTechnologyItem.closest('.lens-technology-description-variation').find('.variant-technology-description[data-color-variant=\\'' + currentLensTechnologyItemAttribute + '\\']').first();\n $newSectionToDisplay.removeClass('d-none').addClass('active d-flex');\n\n $('.filter-by-lens-technology-list').addClass('no-refresh');\n\n // trigger the click on the button corresponding to this colour\n var variationButton = $(\"#color-variations-wrapper > button[data-color-variant='\" + currentLensTechnologyItemAttribute + \"']\");\n $(variationButton).trigger('click');\n });\n}\n\n/**\n * Escape String for special Characters\n * @param {*} str\n * @returns\n */\nfunction escapeSpecialChar(str) {\n return str.replace(/\\+/g, '\\\\+');\n}\n\n/**\n * Calculate of the Primary Container to define when the fixed container should become relative on scroll.\n */\nfunction calculatePositionPrimaryFixedContainer(scrollTop) {\n var containerWidth = $('.pdp-primary-info').innerWidth() - 30; // substract padding\n $('.pdp-primary-info-fixed-container').width(containerWidth);\n\n if ($(window).width() > 768) {\n var descriptionSectionOffset = $('.description-and-detail').offset();\n var margin = 40;\n var currentScrollPosition = scrollTop + $('.pdp-primary-info-fixed-container').height() + $('.product-carousel-container').offset().top;\n var lensTechnoBottomPosition = $('.lens-technology-section').offset().top + $('.lens-technology-section').height() - margin;\n if ((currentScrollPosition) > lensTechnoBottomPosition) {\n $('.pdp-primary-info').css('max-height', '0px');\n var topPosition = descriptionSectionOffset.top - $('.pdp-primary-info-fixed-container').height() - $('.product-carousel-container').offset().top - margin;\n $('.pdp-primary-info-fixed-container').removeClass('position-fixed').addClass('position-relative').css('top', topPosition);\n } else if ($('.pdp-primary-info-fixed-container.position-fixed').length === 0) {\n $('.pdp-primary-info-fixed-container').addClass('position-fixed').removeClass('position-relative').css('top', '');\n }\n } else {\n $('.pdp-primary-info-fixed-container').removeClass('position-fixed').removeClass('position-relative').css('top', '');\n $('.pdp-primary-info').css('max-height', '');\n }\n}\n\n/**\n * Toggle read more button on lens description\n */\nfunction readMoreLensDescription() {\n var $variantLensDescription = $('.variant-lens-attribute-lensdescription');\n if ($variantLensDescription.length > 0) {\n $(window).on('load resize', function () {\n $variantLensDescription.each(function (index, element) {\n if ($(window).width() <= 543) {\n if ($('.read-less-txt:visible').length > 0) {\n return;\n }\n $clamp(element, { clamp: 2 });\n if ($variantLensDescription.css('overflow') === 'hidden') {\n $('.read-more-txt').removeClass('d-none');\n $('.read-less-txt').addClass('d-none');\n } else {\n $('.read-more-txt').addClass('d-none');\n $('.read-less-txt').addClass('d-none');\n }\n } else {\n $variantLensDescription.removeAttr('style');\n $('.read-more-txt').addClass('d-none');\n $('.read-less-txt').addClass('d-none');\n }\n });\n });\n\n $('.read-more-txt').on('click', function () {\n $(this).addClass('d-none');\n $(this).parent().find('.read-less-txt').removeClass('d-none');\n $(this).parent().prev('.variant-lens-attribute-lensdescription').removeAttr('style');\n });\n\n $('.read-less-txt').on('click', function () {\n $(this).parent().find('.read-more-txt').removeClass('d-none');\n $(this).addClass('d-none');\n $clamp($(this).parent().prev('.variant-lens-attribute-lensdescription')[0], { clamp: 2 });\n });\n }\n}\n\n/**\n * Init upsell feature events\n */\nfunction upsellEvents() {\n $('body').on('click', '.js-add-to-cart-upsell', function (e) {\n e.preventDefault();\n let addToCartUrl = $('.add-to-cart-url').val();\n let $this = $(this);\n\n if (!addToCartUrl) {\n return;\n }\n\n var $rxb2cModal = $('#rxB2CAddToCartModal');\n if ($rxb2cModal.length && $('input[name=\"currentCartIsRX\"]', $rxb2cModal).val() === 'true' && $('input[name=\"customerConfirmSubmit\"]', $rxb2cModal).val() !== 'true') {\n $('body').trigger('rxb2c:openconfirmationmodal', {\n actionTarget: $this\n });\n return;\n }\n\n $.ajax({\n method: 'post',\n url: addToCartUrl,\n data: {\n quantity: 1,\n pid: $(this).attr('data-upsell-pid')\n },\n success: function (data) {\n if (!data.error) {\n $('.minicart').trigger('count:update', data);\n $('body').trigger('cart:update');\n }\n }\n });\n });\n}\n\nvar exportDetails = $.extend({}, detail, {\n availability: availability,\n init: base.init,\n stickyProductInfo: stickyProductInfo,\n displayLenseTechnologyByFilter: displayLenseTechnologyByFilter,\n displayLenseTechnologyByImageVariation: displayLenseTechnologyByImageVariation,\n readMoreLensDescription: readMoreLensDescription,\n customEvents: customEvents,\n upsellEvents: upsellEvents\n});\n\nmodule.exports = exportDetails;\n","'use strict';\nvar 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\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 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)) {\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('disabled',\n (!response.product.readyToOrder || !response.product.available));\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 });\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 $prodSizeChart = $(this).closest('.size-chart').find('.size-chart-collapsible');\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 }\n });\n }\n $prodSizeChart.toggleClass('active');\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 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\n focusChooseBonusProductModal: base.focusChooseBonusProductModal()\n};\n","/*!\n * Clamp.js 0.7.0\n *\n * Copyright 2011-2013, Joseph Schmitt http://joe.sh\n * Released under the WTFPL license\n * http://sam.zoy.org/wtfpl/\n */\n\n(function(root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD\n define([], factory);\n } else if (typeof exports === 'object') {\n // Node, CommonJS-like\n module.exports = factory();\n } else {\n // Browser globals\n root.$clamp = factory();\n }\n}(this, function() {\n /**\n * Clamps a text node.\n * @param {HTMLElement} element. Element containing the text node to clamp.\n * @param {Object} options. Options to pass to the clamper.\n */\n function clamp(element, options) {\n options = options || {};\n\n var self = this,\n win = window,\n opt = {\n clamp: options.clamp || 2,\n useNativeClamp: typeof(options.useNativeClamp) != 'undefined' ? options.useNativeClamp : true,\n splitOnChars: options.splitOnChars || ['.', '-', '–', '—', ' '], //Split on sentences (periods), hypens, en-dashes, em-dashes, and words (spaces).\n animate: options.animate || false,\n truncationChar: options.truncationChar || '…',\n truncationHTML: options.truncationHTML\n },\n\n sty = element.style,\n originalText = element.innerHTML,\n\n supportsNativeClamp = typeof(element.style.webkitLineClamp) != 'undefined',\n clampValue = opt.clamp,\n isCSSValue = clampValue.indexOf && (clampValue.indexOf('px') > -1 || clampValue.indexOf('em') > -1),\n truncationHTMLContainer;\n\n if (opt.truncationHTML) {\n truncationHTMLContainer = document.createElement('span');\n truncationHTMLContainer.innerHTML = opt.truncationHTML;\n }\n\n\n // UTILITY FUNCTIONS __________________________________________________________\n\n /**\n * Return the current style for an element.\n * @param {HTMLElement} elem The element to compute.\n * @param {string} prop The style property.\n * @returns {number}\n */\n function computeStyle(elem, prop) {\n if (!win.getComputedStyle) {\n win.getComputedStyle = function(el, pseudo) {\n this.el = el;\n this.getPropertyValue = function(prop) {\n var re = /(\\-([a-z]){1})/g;\n if (prop == 'float') prop = 'styleFloat';\n if (re.test(prop)) {\n prop = prop.replace(re, function() {\n return arguments[2].toUpperCase();\n });\n }\n return el.currentStyle && el.currentStyle[prop] ? el.currentStyle[prop] : null;\n };\n return this;\n };\n }\n\n return win.getComputedStyle(elem, null).getPropertyValue(prop);\n }\n\n /**\n * Returns the maximum number of lines of text that should be rendered based\n * on the current height of the element and the line-height of the text.\n */\n function getMaxLines(height) {\n var availHeight = height || element.clientHeight,\n lineHeight = getLineHeight(element);\n\n return Math.max(Math.floor(availHeight / lineHeight), 0);\n }\n\n /**\n * Returns the maximum height a given element should have based on the line-\n * height of the text and the given clamp value.\n */\n function getMaxHeight(clmp) {\n var lineHeight = getLineHeight(element);\n return lineHeight * clmp;\n }\n\n /**\n * Returns the line-height of an element as an integer.\n */\n function getLineHeight(elem) {\n var lh = computeStyle(elem, 'line-height');\n if (lh == 'normal') {\n // Normal line heights vary from browser to browser. The spec recommends\n // a value between 1.0 and 1.2 of the font size. Using 1.1 to split the diff.\n lh = parseInt(computeStyle(elem, 'font-size')) * 1.2;\n }\n return parseInt(lh);\n }\n\n\n // MEAT AND POTATOES (MMMM, POTATOES...) ______________________________________\n var splitOnChars = opt.splitOnChars.slice(0),\n splitChar = splitOnChars[0],\n chunks,\n lastChunk;\n\n /**\n * Gets an element's last child. That may be another node or a node's contents.\n */\n function getLastChild(elem) {\n //Current element has children, need to go deeper and get last child as a text node\n if (elem.lastChild.children && elem.lastChild.children.length > 0) {\n return getLastChild(Array.prototype.slice.call(elem.children).pop());\n }\n //This is the absolute last child, a text node, but something's wrong with it. Remove it and keep trying\n else if (!elem.lastChild || !elem.lastChild.nodeValue || elem.lastChild.nodeValue === '' || elem.lastChild.nodeValue == opt.truncationChar) {\n elem.lastChild.parentNode.removeChild(elem.lastChild);\n return getLastChild(element);\n }\n //This is the last child we want, return it\n else {\n return elem.lastChild;\n }\n }\n\n /**\n * Removes one character at a time from the text until its width or\n * height is beneath the passed-in max param.\n */\n function truncate(target, maxHeight) {\n if (!maxHeight) {\n return;\n }\n\n /**\n * Resets global variables.\n */\n function reset() {\n splitOnChars = opt.splitOnChars.slice(0);\n splitChar = splitOnChars[0];\n chunks = null;\n lastChunk = null;\n }\n\n var nodeValue = target.nodeValue.replace(opt.truncationChar, '');\n\n //Grab the next chunks\n if (!chunks) {\n //If there are more characters to try, grab the next one\n if (splitOnChars.length > 0) {\n splitChar = splitOnChars.shift();\n }\n //No characters to chunk by. Go character-by-character\n else {\n splitChar = '';\n }\n\n chunks = nodeValue.split(splitChar);\n }\n\n //If there are chunks left to remove, remove the last one and see if\n // the nodeValue fits.\n if (chunks.length > 1) {\n // console.log('chunks', chunks);\n lastChunk = chunks.pop();\n // console.log('lastChunk', lastChunk);\n applyEllipsis(target, chunks.join(splitChar));\n }\n //No more chunks can be removed using this character\n else {\n chunks = null;\n }\n\n //Insert the custom HTML before the truncation character\n if (truncationHTMLContainer) {\n target.nodeValue = target.nodeValue.replace(opt.truncationChar, '');\n element.innerHTML = target.nodeValue + ' ' + truncationHTMLContainer.innerHTML + opt.truncationChar;\n }\n\n //Search produced valid chunks\n if (chunks) {\n //It fits\n if (element.clientHeight <= maxHeight) {\n //There's still more characters to try splitting on, not quite done yet\n if (splitOnChars.length >= 0 && splitChar !== '') {\n applyEllipsis(target, chunks.join(splitChar) + splitChar + lastChunk);\n chunks = null;\n }\n //Finished!\n else {\n return element.innerHTML;\n }\n }\n }\n //No valid chunks produced\n else {\n //No valid chunks even when splitting by letter, time to move\n //on to the next node\n if (splitChar === '') {\n applyEllipsis(target, '');\n target = getLastChild(element);\n\n reset();\n }\n }\n\n //If you get here it means still too big, let's keep truncating\n if (opt.animate) {\n setTimeout(function() {\n truncate(target, maxHeight);\n }, opt.animate === true ? 10 : opt.animate);\n } else {\n return truncate(target, maxHeight);\n }\n }\n\n function applyEllipsis(elem, str) {\n elem.nodeValue = str + opt.truncationChar;\n }\n\n\n // CONSTRUCTOR ________________________________________________________________\n\n if (clampValue == 'auto') {\n clampValue = getMaxLines();\n } else if (isCSSValue) {\n clampValue = getMaxLines(parseInt(clampValue));\n }\n\n var clampedText;\n if (supportsNativeClamp && opt.useNativeClamp) {\n sty.overflow = 'hidden';\n sty.textOverflow = 'ellipsis';\n sty.webkitBoxOrient = 'vertical';\n sty.display = '-webkit-box';\n sty.webkitLineClamp = clampValue;\n\n if (isCSSValue) {\n sty.height = opt.clamp + 'px';\n }\n } else {\n var height = getMaxHeight(clampValue);\n if (height <= element.clientHeight) {\n clampedText = truncate(getLastChild(element), height);\n }\n }\n\n return {\n 'original': originalText,\n 'clamped': clampedText\n };\n }\n\n return clamp;\n}));\n","'use strict';\n\nvar storeLocator = require('base/storeLocator/storeLocator');\n\n/**\n * Restores Quantity Selector to its original state.\n * @param {HTMLElement} $quantitySelect - The Quantity Select Element\n */\nfunction restoreQuantityOptions($quantitySelect) {\n var originalHTML = $quantitySelect.data('originalHTML');\n if (originalHTML) {\n $quantitySelect.html(originalHTML);\n }\n}\n\n/**\n * Sets the data attribute of Quantity Selector to save its original state.\n * @param {HTMLElement} $quantitySelect - The Quantity Select Element\n */\nfunction setOriginalQuantitySelect($quantitySelect) {\n if (!$quantitySelect.data('originalHTML')) {\n $quantitySelect.data('originalHTML', $quantitySelect.html());\n } // If it's already there, don't re-set it\n}\n\n/**\n * Updates the Quantity Selector based on the In Store Quantity.\n * @param {string} quantitySelector - Quantity Selector\n * @param {string} quantityOptionSelector - Quantity Option Selector\n * @param {number} productAtsValue - Inventory in the selected store\n */\nfunction updateQOptions(quantitySelector, quantityOptionSelector, productAtsValue) {\n var selectedQuantity = $(quantitySelector).val();\n restoreQuantityOptions($(quantitySelector));\n for (var i = $(quantityOptionSelector).length - 1; i >= productAtsValue; i--) {\n $(quantityOptionSelector).eq(i).remove();\n }\n $(quantitySelector + ' option[value=\"' + selectedQuantity + '\"]').attr('selected', 'selected');\n}\n\n/**\n * Generates the modal window on the first call.\n */\nfunction getModalHtmlElement() {\n if ($('#inStoreInventoryModal').length !== 0) {\n $('#inStoreInventoryModal').remove();\n }\n var htmlString = ''\n + '
    '\n + '
    '\n + ''\n + '
    '\n + '
    '\n + ' '\n + '
    '\n + '
    '\n + '
    '\n + '
    '\n + '
    '\n + '
    ';\n $('body').append(htmlString);\n $('#inStoreInventoryModal').modal('show');\n}\n\n/**\n * Replaces the content in the modal window with find stores components and\n * the result store list.\n * @param {string} pid - The product ID to search for\n * @param {number} quantity - Number of products to search inventory for\n * @param {number} selectedPostalCode - The postal code to search for inventory\n * @param {number} selectedRadius - The radius to search for inventory\n */\nfunction fillModalElement(pid, quantity, selectedPostalCode, selectedRadius) {\n var requestData = {\n products: pid + ':' + quantity\n };\n\n if (selectedRadius) {\n requestData.radius = selectedRadius;\n }\n\n if (selectedPostalCode) {\n requestData.postalCode = selectedPostalCode;\n }\n\n $('#inStoreInventoryModal').spinner().start();\n $.ajax({\n url: $('.btn-get-in-store-inventory').data('action-url'),\n data: requestData,\n method: 'GET',\n success: function (response) {\n $('.modal-body').empty();\n $('.modal-body').html(response.storesResultsHtml);\n storeLocator.search();\n storeLocator.changeRadius();\n storeLocator.selectStore();\n storeLocator.updateSelectStoreButton();\n\n $('.btn-storelocator-search').attr('data-search-pid', pid);\n\n if (selectedRadius) {\n $('#radius').val(selectedRadius);\n }\n\n if (selectedPostalCode) {\n $('#store-postal-code').val(selectedPostalCode);\n }\n\n if (!$('.results').data('has-results')) {\n $('.store-locator-no-results').show();\n }\n\n $('#inStoreInventoryModal').modal('show');\n $('#inStoreInventoryModal').spinner().stop();\n },\n error: function () {\n $('#inStoreInventoryModal').spinner().stop();\n }\n });\n}\n\n/**\n * Remove the selected store.\n * @param {HTMLElement} $container - the target html element\n */\nfunction deselectStore($container) {\n var storeElement = $($container).find('.selected-store-with-inventory');\n $(storeElement).find('.card-body').empty();\n $(storeElement).addClass('display-none');\n $($container).find('.btn-get-in-store-inventory').show();\n $($container).find('.quantity-select').removeData('originalHTML');\n}\n\n/**\n * Update quantity options. Only display quantity options that are available for the store.\n * @param {sring} searchPID - The product ID of the selected product.\n * @param {number} storeId - The store ID selected for in store pickup.\n */\nfunction updateQuantityOptions(searchPID, storeId) {\n var selectorPrefix = '.product-detail[data-pid=\"' + searchPID + '\"]';\n var productIdSelector = selectorPrefix + ' .product-id';\n var quantitySelector = selectorPrefix + ' .quantity-select';\n var quantityOptionSelector = quantitySelector + ' option';\n\n setOriginalQuantitySelect($(quantitySelector));\n\n var requestData = {\n pid: $(productIdSelector).text(),\n quantitySelected: $(quantitySelector).val(),\n storeId: storeId\n };\n\n $.ajax({\n url: $('.btn-get-in-store-inventory').data('ats-action-url'),\n data: requestData,\n method: 'GET',\n success: function (response) {\n // Update Quantity dropdown, Remove quantity greater than inventory\n var productAtsValue = response.atsValue;\n var availabilityValue = '';\n\n var $productContainer = $('.product-detail[data-pid=\"' + searchPID + '\"]');\n\n if (!response.product.readyToOrder) {\n availabilityValue = '
    ' + response.resources.info_selectforstock + '
    ';\n } else {\n response.product.messages.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 $('button.add-to-cart, button.add-to-cart-global, button.update-cart-product-global').trigger('product:updateAddToCart', {\n product: response.product, $productContainer: $productContainer\n });\n\n updateQOptions(quantitySelector, quantityOptionSelector, productAtsValue);\n }\n });\n}\n\nmodule.exports = {\n updateSelectStore: function () {\n $('body').on('product:updateAddToCart', function (e, response) {\n $('.btn-get-in-store-inventory', response.$productContainer).attr('disabled',\n (!response.product.readyToOrder || !response.product.available ||\n !response.product.availableForInStorePickup));\n });\n },\n removeSelectedStoreOnAttributeChange: function () {\n $('body').on('product:afterAttributeSelect', function (e, response) {\n response.container.attr('data-pid', response.data.product.id);\n deselectStore(response.container);\n });\n },\n updateAddToCartFormData: function () {\n $('body').on('updateAddToCartFormData', function (e, form) {\n if (form.pidsObj) {\n var pidsObj = JSON.parse(form.pidsObj);\n pidsObj.forEach(function (product) {\n var storeElement = $('.product-detail[data-pid=\"' +\n product.pid\n + '\"]').find('.store-name');\n product.storeId = $(storeElement).length// eslint-disable-line no-param-reassign\n ? $(storeElement).attr('data-store-id')\n : null;\n });\n\n form.pidsObj = JSON.stringify(pidsObj);// eslint-disable-line no-param-reassign\n }\n\n var storeElement = $('.product-detail[data-pid=\"'\n + form.pid\n + '\"]');\n\n if ($(storeElement).length) {\n form.storeId = $(storeElement).find('.store-name') // eslint-disable-line\n .attr('data-store-id');\n }\n });\n },\n showInStoreInventory: function () {\n $('.btn-get-in-store-inventory').on('click', function (e) {\n var pid = $(this).closest('.product-detail').attr('data-pid');\n var quantity = $(this).closest('.product-detail').find('.quantity-select').val();\n getModalHtmlElement();\n fillModalElement(pid, quantity);\n e.stopPropagation();\n });\n },\n removeStoreSelection: function () {\n $('body').on('click', '#remove-store-selection', (function () {\n deselectStore($(this).closest('.product-detail'));\n $(document).trigger('store:afterRemoveStoreSelection', $(this).closest('.product-detail').find('.quantity-select'));\n }));\n },\n selectStoreWithInventory: function () {\n $('body').on('store:selected', function (e, data) {\n var searchPID = $('.btn-storelocator-search').attr('data-search-pid');\n var storeElement = $('.product-detail[data-pid=\"' + searchPID + '\"]');\n $(storeElement).find('.selected-store-with-inventory .card-body').empty();\n $(storeElement).find('.selected-store-with-inventory .card-body').append(data.storeDetailsHtml);\n $(storeElement).find('.store-name').attr('data-store-id', data.storeID);\n $(storeElement).find('.selected-store-with-inventory').removeClass('display-none');\n\n var $changeStoreButton = $(storeElement).find('.change-store');\n $($changeStoreButton).data('postal', data.searchPostalCode);\n $($changeStoreButton).data('radius', data.searchRadius);\n\n $(storeElement).find('.btn-get-in-store-inventory').hide();\n\n updateQuantityOptions(searchPID, data.storeID);\n\n $('#inStoreInventoryModal').modal('hide');\n $('#inStoreInventoryModal').remove();\n });\n },\n changeStore: function () {\n $('body').on('click', '.change-store', (function () {\n var pid = $(this).closest('.product-detail').attr('data-pid');\n var quantity = $(this).closest('.product-detail').find('.quantity-select').val();\n getModalHtmlElement();\n fillModalElement(pid, quantity, $(this).data('postal'), $(this).data('radius'));\n }));\n }\n};\n","'use strict';\n\n/**\n * Updates the product attribute in the Product Detail Page\n *\n * @param {jQuery} $productContainer - DOM element for a given product\n * @param {string} attrValue - Attribute value for the passed attrbute id\n * @param {string} className - Attribute class name to be changed\n */\nfunction updateTechnicalAttribute($productContainer, attrValue, className) {\n var $container = $productContainer.find(className);\n if (attrValue && attrValue.length > 0) {\n $container.find(className + '-value').html(attrValue);\n $container.removeClass('d-none');\n } else {\n $container.find(className + '-value').empty();\n $container.addClass('d-none');\n }\n}\n\n/**\n * Updates the product attributes related to Serengeti 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 updateTechnicalAttributes(response, $productContainer) {\n updateTechnicalAttribute($productContainer, response.product.manufacturerSKU, '.product-reference');\n updateTechnicalAttribute($productContainer, response.product.lensSize, '.product-fit');\n updateTechnicalAttribute($productContainer, response.product.dimensions, '.product-dimensions');\n updateTechnicalAttribute($productContainer, response.product.weight, '.product-weight');\n updateTechnicalAttribute($productContainer, response.product.productMaterial, '.product-material');\n updateTechnicalAttribute($productContainer, response.product.frameColor, '.frame-color');\n updateTechnicalAttribute($productContainer, response.product.color, '.product-color');\n updateTechnicalAttribute($productContainer, response.product.lensMaterial, '.lens-material');\n updateTechnicalAttribute($productContainer, response.product.lensName, '.lens-name');\n updateTechnicalAttribute($productContainer, response.product.additionalLenses, '.additional-lenses');\n updateTechnicalAttribute($productContainer, response.product.lensCategory, '.lens-category');\n updateTechnicalAttribute($productContainer, response.product.additionalLensCategory, '.additional-lens-category');\n updateTechnicalAttribute($productContainer, response.product.vlt, '.product-vlt');\n updateTechnicalAttribute($productContainer, response.product.polarization, '.product-polarization');\n updateTechnicalAttribute($productContainer, response.product.photochromy, '.product-photochromy');\n updateTechnicalAttribute($productContainer, response.product.vltAdditionalLens, '.vlt-additional-lens');\n updateTechnicalAttribute($productContainer, response.product.lensShape, '.lens-shape');\n updateTechnicalAttribute($productContainer, response.product.highContrast, '.high-contrast');\n updateTechnicalAttribute($productContainer, response.product.baseTint, '.base-tint');\n updateTechnicalAttribute($productContainer, response.product.mirrorTint, '.mirror-tint');\n updateTechnicalAttribute($productContainer, response.product.lensCoating, '.lens-coating');\n updateTechnicalAttribute($productContainer, response.product.technologies, '.product-technologies');\n updateTechnicalAttribute($productContainer, response.product.base, '.product-base');\n updateTechnicalAttribute($productContainer, response.product.mips, '.product-mips');\n updateTechnicalAttribute($productContainer, response.product.fitSystem, '.fit-system');\n updateTechnicalAttribute($productContainer, response.product.ventillation, '.product-ventillation');\n updateTechnicalAttribute($productContainer, response.product.removablePaddings, '.removable-paddings');\n updateTechnicalAttribute($productContainer, response.product.rx, '.product-rx');\n updateTechnicalAttribute($productContainer, response.product.interchangeableLenses, '.interchangeable-lenses');\n updateTechnicalAttribute($productContainer, response.product.includedAccesories, '.included-accesories');\n updateTechnicalAttribute($productContainer, response.product.certifications, '.product-certifications');\n\n if (response.product.isEmptyTechnicalSheet) {\n $productContainer.find('.technical-sheet-values').addClass('d-none');\n $productContainer.find('.technical-sheet-nothing-to-display').removeClass('d-none');\n $productContainer.find('.technical-sheet-nothing-to-display').addClass('d-flex');\n } else {\n $productContainer.find('.technical-sheet-values').removeClass('d-none');\n $productContainer.find('.technical-sheet-nothing-to-display').addClass('d-none');\n $productContainer.find('.technical-sheet-nothing-to-display').removeClass('d-flex');\n }\n}\n\nmodule.exports = function () {\n $('body').on('product:afterAttributeSelect', function (e, response) {\n updateTechnicalAttributes(response.data, response.container);\n });\n};\n","'use strict';\n\nvar processInclude = require('core/util');\nprocessInclude(require('zurb-twentytwenty/js/jquery.event.move'));\nvar twentytwenty = require('zurb-twentytwenty/js/jquery.twentytwenty');\n\n$(document).ready(function () {\n var defaultConfig = {\n default_offset_pct: 0.5, // How much of the before image is visible when the page loads\n orientation: 'horizontal', // Orientation of the before and after images ('horizontal' or 'vertical')\n before_label: '', // Set a custom before label\n after_label: '', // Set a custom after label\n no_overlay: true, //Do not show the overlay with before and after\n move_slider_on_hover: false, // Move slider on mouse hover?\n move_with_handle_only: true, // Allow a user to swipe anywhere on the image to control slider movement. \n click_to_move: false // Allow a user to click (or tap) anywhere on the image to move the slider to that location.\n };\n\n $(window).on('load', function () {\n $('.twentytwenty-container').twentytwenty(defaultConfig);\n });\n});\n","// DOM.event.move\n//\n// 2.0.0\n//\n// Stephen Band\n//\n// Triggers 'movestart', 'move' and 'moveend' events after\n// mousemoves following a mousedown cross a distance threshold,\n// similar to the native 'dragstart', 'drag' and 'dragend' events.\n// Move events are throttled to animation frames. Move event objects\n// have the properties:\n//\n// pageX:\n// pageY: Page coordinates of pointer.\n// startX:\n// startY: Page coordinates of pointer at movestart.\n// distX:\n// distY: Distance the pointer has moved since movestart.\n// deltaX:\n// deltaY: Distance the finger has moved since last event.\n// velocityX:\n// velocityY: Average velocity over last few events.\n\n\n(function(fn) {\n\tif (typeof define === 'function' && define.amd) {\n define([], fn);\n } else if ((typeof module !== \"undefined\" && module !== null) && module.exports) {\n module.exports = fn;\n\t} else {\n\t\tfn();\n\t}\n})(function(){\n\tvar assign = Object.assign || window.jQuery && jQuery.extend;\n\n\t// Number of pixels a pressed pointer travels before movestart\n\t// event is fired.\n\tvar threshold = 8;\n\n\t// Shim for requestAnimationFrame, falling back to timer. See:\n\t// see http://paulirish.com/2011/requestanimationframe-for-smart-animating/\n\tvar requestFrame = (function(){\n\t\treturn (\n\t\t\twindow.requestAnimationFrame ||\n\t\t\twindow.webkitRequestAnimationFrame ||\n\t\t\twindow.mozRequestAnimationFrame ||\n\t\t\twindow.oRequestAnimationFrame ||\n\t\t\twindow.msRequestAnimationFrame ||\n\t\t\tfunction(fn, element){\n\t\t\t\treturn window.setTimeout(function(){\n\t\t\t\t\tfn();\n\t\t\t\t}, 25);\n\t\t\t}\n\t\t);\n\t})();\n\t\n\t// Shim for customEvent\n\t// see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent#Polyfill\n\t(function () {\n\t\tif ( typeof window.CustomEvent === \"function\" ) return false;\n\t\tfunction CustomEvent ( event, params ) {\n\t\t\tparams = params || { bubbles: false, cancelable: false, detail: undefined };\n\t\t\tvar evt = document.createEvent( 'CustomEvent' );\n\t\t\tevt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail );\n\t\t\treturn evt;\n\t\t}\n\t\t\n\t\tCustomEvent.prototype = window.Event.prototype;\n\t\twindow.CustomEvent = CustomEvent;\n\t})();\n\n\tvar ignoreTags = {\n\t\t\ttextarea: true,\n\t\t\tinput: true,\n\t\t\tselect: true,\n\t\t\tbutton: true\n\t\t};\n\n\tvar mouseevents = {\n\t\tmove: 'mousemove',\n\t\tcancel: 'mouseup dragstart',\n\t\tend: 'mouseup'\n\t};\n\n\tvar touchevents = {\n\t\tmove: 'touchmove',\n\t\tcancel: 'touchend',\n\t\tend: 'touchend'\n\t};\n\n\tvar rspaces = /\\s+/;\n\n\n\t// DOM Events\n\n\tvar eventOptions = { bubbles: true, cancelable: true };\n\n\tvar eventsSymbol = typeof Symbol === \"function\" ? Symbol('events') : {};\n\n\tfunction createEvent(type) {\n\t\treturn new CustomEvent(type, eventOptions);\n\t}\n\n\tfunction getEvents(node) {\n\t\treturn node[eventsSymbol] || (node[eventsSymbol] = {});\n\t}\n\n\tfunction on(node, types, fn, data, selector) {\n\t\ttypes = types.split(rspaces);\n\n\t\tvar events = getEvents(node);\n\t\tvar i = types.length;\n\t\tvar handlers, type;\n\n\t\tfunction handler(e) { fn(e, data); }\n\n\t\twhile (i--) {\n\t\t\ttype = types[i];\n\t\t\thandlers = events[type] || (events[type] = []);\n\t\t\thandlers.push([fn, handler]);\n\t\t\tnode.addEventListener(type, handler);\n\t\t}\n\t}\n\n\tfunction off(node, types, fn, selector) {\n\t\ttypes = types.split(rspaces);\n\n\t\tvar events = getEvents(node);\n\t\tvar i = types.length;\n\t\tvar type, handlers, k;\n\n\t\tif (!events) { return; }\n\n\t\twhile (i--) {\n\t\t\ttype = types[i];\n\t\t\thandlers = events[type];\n\t\t\tif (!handlers) { continue; }\n\t\t\tk = handlers.length;\n\t\t\twhile (k--) {\n\t\t\t\tif (handlers[k][0] === fn) {\n\t\t\t\t\tnode.removeEventListener(type, handlers[k][1]);\n\t\t\t\t\thandlers.splice(k, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction trigger(node, type, properties) {\n\t\t// Don't cache events. It prevents you from triggering an event of a\n\t\t// given type from inside the handler of another event of that type.\n\t\tvar event = createEvent(type);\n\t\tif (properties) { assign(event, properties); }\n\t\tnode.dispatchEvent(event);\n\t}\n\n\n\t// Constructors\n\n\tfunction Timer(fn){\n\t\tvar callback = fn,\n\t\t active = false,\n\t\t running = false;\n\n\t\tfunction trigger(time) {\n\t\t\tif (active){\n\t\t\t\tcallback();\n\t\t\t\trequestFrame(trigger);\n\t\t\t\trunning = true;\n\t\t\t\tactive = false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\n\t\tthis.kick = function(fn) {\n\t\t\tactive = true;\n\t\t\tif (!running) { trigger(); }\n\t\t};\n\n\t\tthis.end = function(fn) {\n\t\t\tvar cb = callback;\n\n\t\t\tif (!fn) { return; }\n\n\t\t\t// If the timer is not running, simply call the end callback.\n\t\t\tif (!running) {\n\t\t\t\tfn();\n\t\t\t}\n\t\t\t// If the timer is running, and has been kicked lately, then\n\t\t\t// queue up the current callback and the end callback, otherwise\n\t\t\t// just the end callback.\n\t\t\telse {\n\t\t\t\tcallback = active ?\n\t\t\t\t\tfunction(){ cb(); fn(); } :\n\t\t\t\t\tfn ;\n\n\t\t\t\tactive = true;\n\t\t\t}\n\t\t};\n\t}\n\n\n\t// Functions\n\n\tfunction noop() {}\n\n\tfunction preventDefault(e) {\n\t\te.preventDefault();\n\t}\n\n\tfunction isIgnoreTag(e) {\n\t\treturn !!ignoreTags[e.target.tagName.toLowerCase()];\n\t}\n\n\tfunction isPrimaryButton(e) {\n\t\t// Ignore mousedowns on any button other than the left (or primary)\n\t\t// mouse button, or when a modifier key is pressed.\n\t\treturn (e.which === 1 && !e.ctrlKey && !e.altKey);\n\t}\n\n\tfunction identifiedTouch(touchList, id) {\n\t\tvar i, l;\n\n\t\tif (touchList.identifiedTouch) {\n\t\t\treturn touchList.identifiedTouch(id);\n\t\t}\n\n\t\t// touchList.identifiedTouch() does not exist in\n\t\t// webkit yet… we must do the search ourselves...\n\n\t\ti = -1;\n\t\tl = touchList.length;\n\n\t\twhile (++i < l) {\n\t\t\tif (touchList[i].identifier === id) {\n\t\t\t\treturn touchList[i];\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction changedTouch(e, data) {\n\t\tvar touch = identifiedTouch(e.changedTouches, data.identifier);\n\n\t\t// This isn't the touch you're looking for.\n\t\tif (!touch) { return; }\n\n\t\t// Chrome Android (at least) includes touches that have not\n\t\t// changed in e.changedTouches. That's a bit annoying. Check\n\t\t// that this touch has changed.\n\t\tif (touch.pageX === data.pageX && touch.pageY === data.pageY) { return; }\n\n\t\treturn touch;\n\t}\n\n\n\t// Handlers that decide when the first movestart is triggered\n\n\tfunction mousedown(e){\n\t\t// Ignore non-primary buttons\n\t\tif (!isPrimaryButton(e)) { return; }\n\n\t\t// Ignore form and interactive elements\n\t\tif (isIgnoreTag(e)) { return; }\n\n\t\ton(document, mouseevents.move, mousemove, e);\n\t\ton(document, mouseevents.cancel, mouseend, e);\n\t}\n\n\tfunction mousemove(e, data){\n\t\tcheckThreshold(e, data, e, removeMouse);\n\t}\n\n\tfunction mouseend(e, data) {\n\t\tremoveMouse();\n\t}\n\n\tfunction removeMouse() {\n\t\toff(document, mouseevents.move, mousemove);\n\t\toff(document, mouseevents.cancel, mouseend);\n\t}\n\n\tfunction touchstart(e) {\n\t\t// Don't get in the way of interaction with form elements\n\t\tif (ignoreTags[e.target.tagName.toLowerCase()]) { return; }\n\n\t\tvar touch = e.changedTouches[0];\n\n\t\t// iOS live updates the touch objects whereas Android gives us copies.\n\t\t// That means we can't trust the touchstart object to stay the same,\n\t\t// so we must copy the data. This object acts as a template for\n\t\t// movestart, move and moveend event objects.\n\t\tvar data = {\n\t\t\ttarget: touch.target,\n\t\t\tpageX: touch.pageX,\n\t\t\tpageY: touch.pageY,\n\t\t\tidentifier: touch.identifier,\n\n\t\t\t// The only way to make handlers individually unbindable is by\n\t\t\t// making them unique.\n\t\t\ttouchmove: function(e, data) { touchmove(e, data); },\n\t\t\ttouchend: function(e, data) { touchend(e, data); }\n\t\t};\n\n\t\ton(document, touchevents.move, data.touchmove, data);\n\t\ton(document, touchevents.cancel, data.touchend, data);\n\t}\n\n\tfunction touchmove(e, data) {\n\t\tvar touch = changedTouch(e, data);\n\t\tif (!touch) { return; }\n\t\tcheckThreshold(e, data, touch, removeTouch);\n\t}\n\n\tfunction touchend(e, data) {\n\t\tvar touch = identifiedTouch(e.changedTouches, data.identifier);\n\t\tif (!touch) { return; }\n\t\tremoveTouch(data);\n\t}\n\n\tfunction removeTouch(data) {\n\t\toff(document, touchevents.move, data.touchmove);\n\t\toff(document, touchevents.cancel, data.touchend);\n\t}\n\n\tfunction checkThreshold(e, data, touch, fn) {\n\t\tvar distX = touch.pageX - data.pageX;\n\t\tvar distY = touch.pageY - data.pageY;\n\n\t\t// Do nothing if the threshold has not been crossed.\n\t\tif ((distX * distX) + (distY * distY) < (threshold * threshold)) { return; }\n\n\t\ttriggerStart(e, data, touch, distX, distY, fn);\n\t}\n\n\tfunction triggerStart(e, data, touch, distX, distY, fn) {\n\t\tvar touches = e.targetTouches;\n\t\tvar time = e.timeStamp - data.timeStamp;\n\n\t\t// Create a movestart object with some special properties that\n\t\t// are passed only to the movestart handlers.\n\t\tvar template = {\n\t\t\taltKey: e.altKey,\n\t\t\tctrlKey: e.ctrlKey,\n\t\t\tshiftKey: e.shiftKey,\n\t\t\tstartX: data.pageX,\n\t\t\tstartY: data.pageY,\n\t\t\tdistX: distX,\n\t\t\tdistY: distY,\n\t\t\tdeltaX: distX,\n\t\t\tdeltaY: distY,\n\t\t\tpageX: touch.pageX,\n\t\t\tpageY: touch.pageY,\n\t\t\tvelocityX: distX / time,\n\t\t\tvelocityY: distY / time,\n\t\t\tidentifier: data.identifier,\n\t\t\ttargetTouches: touches,\n\t\t\tfinger: touches ? touches.length : 1,\n\t\t\tenableMove: function() {\n\t\t\t\tthis.moveEnabled = true;\n\t\t\t\tthis.enableMove = noop;\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t};\n\n\t\t// Trigger the movestart event.\n\t\ttrigger(data.target, 'movestart', template);\n\n\t\t// Unbind handlers that tracked the touch or mouse up till now.\n\t\tfn(data);\n\t}\n\n\n\t// Handlers that control what happens following a movestart\n\n\tfunction activeMousemove(e, data) {\n\t\tvar timer = data.timer;\n\n\t\tdata.touch = e;\n\t\tdata.timeStamp = e.timeStamp;\n\t\ttimer.kick();\n\t}\n\n\tfunction activeMouseend(e, data) {\n\t\tvar target = data.target;\n\t\tvar event = data.event;\n\t\tvar timer = data.timer;\n\n\t\tremoveActiveMouse();\n\n\t\tendEvent(target, event, timer, function() {\n\t\t\t// Unbind the click suppressor, waiting until after mouseup\n\t\t\t// has been handled.\n\t\t\tsetTimeout(function(){\n\t\t\t\toff(target, 'click', preventDefault);\n\t\t\t}, 0);\n\t\t});\n\t}\n\n\tfunction removeActiveMouse() {\n\t\toff(document, mouseevents.move, activeMousemove);\n\t\toff(document, mouseevents.end, activeMouseend);\n\t}\n\n\tfunction activeTouchmove(e, data) {\n\t\tvar event = data.event;\n\t\tvar timer = data.timer;\n\t\tvar touch = changedTouch(e, event);\n\n\t\tif (!touch) { return; }\n\n\t\t// Stop the interface from gesturing\n\t\te.preventDefault();\n\n\t\tevent.targetTouches = e.targetTouches;\n\t\tdata.touch = touch;\n\t\tdata.timeStamp = e.timeStamp;\n\n\t\ttimer.kick();\n\t}\n\n\tfunction activeTouchend(e, data) {\n\t\tvar target = data.target;\n\t\tvar event = data.event;\n\t\tvar timer = data.timer;\n\t\tvar touch = identifiedTouch(e.changedTouches, event.identifier);\n\n\t\t// This isn't the touch you're looking for.\n\t\tif (!touch) { return; }\n\n\t\tremoveActiveTouch(data);\n\t\tendEvent(target, event, timer);\n\t}\n\n\tfunction removeActiveTouch(data) {\n\t\toff(document, touchevents.move, data.activeTouchmove);\n\t\toff(document, touchevents.end, data.activeTouchend);\n\t}\n\n\n\t// Logic for triggering move and moveend events\n\n\tfunction updateEvent(event, touch, timeStamp) {\n\t\tvar time = timeStamp - event.timeStamp;\n\n\t\tevent.distX = touch.pageX - event.startX;\n\t\tevent.distY = touch.pageY - event.startY;\n\t\tevent.deltaX = touch.pageX - event.pageX;\n\t\tevent.deltaY = touch.pageY - event.pageY;\n\n\t\t// Average the velocity of the last few events using a decay\n\t\t// curve to even out spurious jumps in values.\n\t\tevent.velocityX = 0.3 * event.velocityX + 0.7 * event.deltaX / time;\n\t\tevent.velocityY = 0.3 * event.velocityY + 0.7 * event.deltaY / time;\n\t\tevent.pageX = touch.pageX;\n\t\tevent.pageY = touch.pageY;\n\t}\n\n\tfunction endEvent(target, event, timer, fn) {\n\t\ttimer.end(function(){\n\t\t\ttrigger(target, 'moveend', event);\n\t\t\treturn fn && fn();\n\t\t});\n\t}\n\n\n\t// Set up the DOM\n\n\tfunction movestart(e) {\n\t\tif (e.defaultPrevented) { return; }\n\t\tif (!e.moveEnabled) { return; }\n\n\t\tvar event = {\n\t\t\tstartX: e.startX,\n\t\t\tstartY: e.startY,\n\t\t\tpageX: e.pageX,\n\t\t\tpageY: e.pageY,\n\t\t\tdistX: e.distX,\n\t\t\tdistY: e.distY,\n\t\t\tdeltaX: e.deltaX,\n\t\t\tdeltaY: e.deltaY,\n\t\t\tvelocityX: e.velocityX,\n\t\t\tvelocityY: e.velocityY,\n\t\t\tidentifier: e.identifier,\n\t\t\ttargetTouches: e.targetTouches,\n\t\t\tfinger: e.finger\n\t\t};\n\n\t\tvar data = {\n\t\t\ttarget: e.target,\n\t\t\tevent: event,\n\t\t\ttimer: new Timer(update),\n\t\t\ttouch: undefined,\n\t\t\ttimeStamp: e.timeStamp\n\t\t};\n\n\t\tfunction update(time) {\n\t\t\tupdateEvent(event, data.touch, data.timeStamp);\n\t\t\ttrigger(data.target, 'move', event);\n\t\t}\n\n\t\tif (e.identifier === undefined) {\n\t\t\t// We're dealing with a mouse event.\n\t\t\t// Stop clicks from propagating during a move\n\t\t\ton(e.target, 'click', preventDefault);\n\t\t\ton(document, mouseevents.move, activeMousemove, data);\n\t\t\ton(document, mouseevents.end, activeMouseend, data);\n\t\t}\n\t\telse {\n\t\t\t// In order to unbind correct handlers they have to be unique\n\t\t\tdata.activeTouchmove = function(e, data) { activeTouchmove(e, data); };\n\t\t\tdata.activeTouchend = function(e, data) { activeTouchend(e, data); };\n\n\t\t\t// We're dealing with a touch.\n\t\t\ton(document, touchevents.move, data.activeTouchmove, data);\n\t\t\ton(document, touchevents.end, data.activeTouchend, data);\n\t\t}\n\t}\n\n\ton(document, 'mousedown', mousedown);\n\ton(document, 'touchstart', touchstart);\n\ton(document, 'movestart', movestart);\n\n\n\t// jQuery special events\n\t//\n\t// jQuery event objects are copies of DOM event objects. They need\n\t// a little help copying the move properties across.\n\n\tif (!window.jQuery) { return; }\n\n\tvar properties = (\"startX startY pageX pageY distX distY deltaX deltaY velocityX velocityY\").split(' ');\n\n\tfunction enableMove1(e) { e.enableMove(); }\n\tfunction enableMove2(e) { e.enableMove(); }\n\tfunction enableMove3(e) { e.enableMove(); }\n\n\tfunction add(handleObj) {\n\t\tvar handler = handleObj.handler;\n\n\t\thandleObj.handler = function(e) {\n\t\t\t// Copy move properties across from originalEvent\n\t\t\tvar i = properties.length;\n\t\t\tvar property;\n\n\t\t\twhile(i--) {\n\t\t\t\tproperty = properties[i];\n\t\t\t\te[property] = e.originalEvent[property];\n\t\t\t}\n\n\t\t\thandler.apply(this, arguments);\n\t\t};\n\t}\n\n\tjQuery.event.special.movestart = {\n\t\tsetup: function() {\n\t\t\t// Movestart must be enabled to allow other move events\n\t\t\ton(this, 'movestart', enableMove1);\n\n\t\t\t// Do listen to DOM events\n\t\t\treturn false;\n\t\t},\n\n\t\tteardown: function() {\n\t\t\toff(this, 'movestart', enableMove1);\n\t\t\treturn false;\n\t\t},\n\n\t\tadd: add\n\t};\n\n\tjQuery.event.special.move = {\n\t\tsetup: function() {\n\t\t\ton(this, 'movestart', enableMove2);\n\t\t\treturn false;\n\t\t},\n\n\t\tteardown: function() {\n\t\t\toff(this, 'movestart', enableMove2);\n\t\t\treturn false;\n\t\t},\n\n\t\tadd: add\n\t};\n\n\tjQuery.event.special.moveend = {\n\t\tsetup: function() {\n\t\t\ton(this, 'movestart', enableMove3);\n\t\t\treturn false;\n\t\t},\n\n\t\tteardown: function() {\n\t\t\toff(this, 'movestart', enableMove3);\n\t\t\treturn false;\n\t\t},\n\n\t\tadd: add\n\t};\n});\n","(function($){\n\n $.fn.twentytwenty = function(options) {\n var options = $.extend({\n default_offset_pct: 0.5,\n orientation: 'horizontal',\n before_label: 'Before',\n after_label: 'After',\n no_overlay: false,\n move_slider_on_hover: false,\n move_with_handle_only: true,\n click_to_move: false\n }, options);\n\n return this.each(function() {\n\n var sliderPct = options.default_offset_pct;\n var container = $(this);\n var sliderOrientation = options.orientation;\n var beforeDirection = (sliderOrientation === 'vertical') ? 'down' : 'left';\n var afterDirection = (sliderOrientation === 'vertical') ? 'up' : 'right';\n\n\n container.wrap(\"
    \");\n if(!options.no_overlay) {\n container.append(\"
    \");\n var overlay = container.find(\".twentytwenty-overlay\");\n overlay.append(\"
    \");\n overlay.append(\"
    \");\n }\n var beforeImg = container.find(\"img:first\");\n var afterImg = container.find(\"img:last\");\n container.append(\"
    \");\n var slider = container.find(\".twentytwenty-handle\");\n slider.append(\"\");\n slider.append(\"\");\n container.addClass(\"twentytwenty-container\");\n beforeImg.addClass(\"twentytwenty-before\");\n afterImg.addClass(\"twentytwenty-after\");\n \n var calcOffset = function(dimensionPct) {\n var w = beforeImg.width();\n var h = beforeImg.height();\n return {\n w: w+\"px\",\n h: h+\"px\",\n cw: (dimensionPct*w)+\"px\",\n ch: (dimensionPct*h)+\"px\"\n };\n };\n\n var adjustContainer = function(offset) {\n \tif (sliderOrientation === 'vertical') {\n beforeImg.css(\"clip\", \"rect(0,\"+offset.w+\",\"+offset.ch+\",0)\");\n afterImg.css(\"clip\", \"rect(\"+offset.ch+\",\"+offset.w+\",\"+offset.h+\",0)\");\n \t}\n \telse {\n beforeImg.css(\"clip\", \"rect(0,\"+offset.cw+\",\"+offset.h+\",0)\");\n afterImg.css(\"clip\", \"rect(0,\"+offset.w+\",\"+offset.h+\",\"+offset.cw+\")\");\n \t}\n container.css(\"height\", offset.h);\n };\n\n var adjustSlider = function(pct) {\n var offset = calcOffset(pct);\n slider.css((sliderOrientation===\"vertical\") ? \"top\" : \"left\", (sliderOrientation===\"vertical\") ? offset.ch : offset.cw);\n adjustContainer(offset);\n };\n\n // Return the number specified or the min/max number if it outside the range given.\n var minMaxNumber = function(num, min, max) {\n return Math.max(min, Math.min(max, num));\n };\n\n // Calculate the slider percentage based on the position.\n var getSliderPercentage = function(positionX, positionY) {\n var sliderPercentage = (sliderOrientation === 'vertical') ?\n (positionY-offsetY)/imgHeight :\n (positionX-offsetX)/imgWidth;\n\n return minMaxNumber(sliderPercentage, 0, 1);\n };\n\n\n $(window).on(\"resize.twentytwenty\", function(e) {\n adjustSlider(sliderPct);\n });\n\n var offsetX = 0;\n var offsetY = 0;\n var imgWidth = 0;\n var imgHeight = 0;\n var onMoveStart = function(e) {\n if (((e.distX > e.distY && e.distX < -e.distY) || (e.distX < e.distY && e.distX > -e.distY)) && sliderOrientation !== 'vertical') {\n e.preventDefault();\n }\n else if (((e.distX < e.distY && e.distX < -e.distY) || (e.distX > e.distY && e.distX > -e.distY)) && sliderOrientation === 'vertical') {\n e.preventDefault();\n }\n container.addClass(\"active\");\n offsetX = container.offset().left;\n offsetY = container.offset().top;\n imgWidth = beforeImg.width(); \n imgHeight = beforeImg.height(); \n };\n var onMove = function(e) {\n if (container.hasClass(\"active\")) {\n sliderPct = getSliderPercentage(e.pageX, e.pageY);\n adjustSlider(sliderPct);\n }\n };\n var onMoveEnd = function() {\n container.removeClass(\"active\");\n };\n\n var moveTarget = options.move_with_handle_only ? slider : container;\n moveTarget.on(\"movestart\",onMoveStart);\n moveTarget.on(\"move\",onMove);\n moveTarget.on(\"moveend\",onMoveEnd);\n\n if (options.move_slider_on_hover) {\n container.on(\"mouseenter\", onMoveStart);\n container.on(\"mousemove\", onMove);\n container.on(\"mouseleave\", onMoveEnd);\n }\n\n slider.on(\"touchmove\", function(e) {\n e.preventDefault();\n });\n\n container.find(\"img\").on(\"mousedown\", function(event) {\n event.preventDefault();\n });\n\n if (options.click_to_move) {\n container.on('click', function(e) {\n offsetX = container.offset().left;\n offsetY = container.offset().top;\n imgWidth = beforeImg.width();\n imgHeight = beforeImg.height();\n\n sliderPct = getSliderPercentage(e.pageX, e.pageY);\n adjustSlider(sliderPct);\n });\n }\n\n $(window).trigger(\"resize.twentytwenty\");\n });\n };\n\n})(jQuery);\n","'use strict';\n\nrequire('jquery-zoom');\n\n$.fn.doubletap = function (onDoubleTapCallback, onTapCallback) {\n var tapped = false;\n $(this).on('click', function (event) {\n if (!tapped) {\n // tapped within 400ms of last tap. double tap\n tapped = setTimeout(function (e) {\n tapped = null;\n if (onTapCallback != null && typeof onTapCallback === 'function') {\n onTapCallback(e);\n }\n }, 400, event);\n } else {\n // stop single tap callback\n clearTimeout(tapped);\n tapped = null;\n if (onDoubleTapCallback != null && typeof onDoubleTapCallback === 'function') {\n onDoubleTapCallback(event);\n }\n }\n event.preventDefault();\n return false;\n });\n};\n\nvar viewportWidth = {\n mobile: { maxWidth: 767, minWidth: 320 },\n tablet: { maxWidth: 1279, minWidth: 768 }\n};\n\nvar layout = {\n viewports: viewportWidth,\n getMode: function () {\n var windowWidth = $(window).width() === window.outerWidth ? $(window).width() : window.outerWidth;\n if (windowWidth <= viewportWidth.mobile.maxWidth) {\n return 'mobile';\n } else if (windowWidth <= viewportWidth.tablet.maxWidth) {\n return 'tablet';\n }\n return 'desktop';\n },\n isMobile: function () {\n return this.getMode() === 'mobile';\n },\n isTablet: function () {\n return this.getMode() === 'tablet';\n },\n isDesktop: function () {\n return this.getMode() === 'desktop';\n }\n};\n\n\n/**\n* @description Enables the zoom viewer on the product detail page\n*/\nfunction loadZoom() {\n if (layout.isDesktop()) {\n loadDesktopZoom();\n }\n}\n\n/**\n * loadMobileZoom\n */\nfunction loadMobileZoom(event) {\n var $imgZoom = $('.product-wrapper').find('.carousel-item.slick-active .js-main-image');\n var hiresUrl = $imgZoom.find('img').attr('data-largeimage');\n\n if (!hiresUrl) {\n return;\n }\n\n $imgZoom.zoom({\n url: hiresUrl,\n on: 'click',\n onZoomOut: function () {\n $('.product-carousel').slick('slickSetOption', 'swipe', true, false);\n },\n onZoomIn: function () {\n $('.product-carousel').slick('slickSetOption', 'swipe', false, false);\n },\n callback: function () {\n var $zoomedImg = $(this);\n $zoomedImg.addClass('b-product_image-zoom_image');\n $zoomedImg.doubletap(function () {\n $('.b-product_image-zoom_image').remove();\n $('.product-carousel').slick('slickSetOption', 'swipe', true, false);\n $imgZoom.off('touchmove.zoom');\n });\n\n // simulate click event to immediate apply zoom after initialization\n var e = new $.Event('click', {\n originalEvent: event.originalEvent\n });\n\n $imgZoom.off('touchend.zoom');\n $imgZoom.off('touchstart.zoom');\n $imgZoom.trigger(e);\n\n $zoomedImg.one('touchend.zoom', function () {\n $imgZoom.off('zoom.destroy');\n });\n e.preventDefault();\n }\n });\n}\n\n/**\n * loadDesktopZoom\n */\nfunction loadDesktopZoom() {\n var $imgZoom = $('.carousel-item.slick-active .js-main-image');\n var hiresUrl = $imgZoom.find('img').attr('data-largeimage');\n\n if (!hiresUrl) {\n return;\n }\n\n $imgZoom.zoom({\n url: hiresUrl,\n on: 'mouseover',\n onZoomOut: function () {\n $('.product-carousel').slick('slickSetOption', 'swipe', true, false);\n },\n onZoomIn: function () {\n $('.product-carousel').slick('slickSetOption', 'swipe', false, false);\n },\n callback: function () {\n var $zoomedImg = $(this);\n $zoomedImg.addClass('b-product_image-zoom_image');\n }\n });\n}\n\n/**\n * initialize Events\n */\nfunction initializeEvents() {\n var viewMode = layout.getMode();\n $(window).on('resize', function () {\n $(document).trigger('window.resize');\n var layoutView = layout.getMode();\n if (viewMode !== layoutView) {\n viewMode = layoutView;\n $(document).trigger('window.modechanged', { mode: viewMode });\n }\n });\n\n loadZoom();\n initMobileZoomEvent();\n\n $('body').on('product:afterAttributeSelect', function () {\n loadZoom();\n initMobileZoomEvent();\n\n $('.carousel-container .product-carousel').on('afterChange', function () {\n loadZoom();\n initMobileZoomEvent();\n });\n });\n\n $('.carousel-container .product-carousel').on('afterChange', function () {\n loadZoom();\n initMobileZoomEvent();\n });\n\n $(window).on('window.modechanged', function () {\n $('.product-wrapper').find('.carousel-item.slick-active .js-main-image').trigger('zoom.destroy').off('touchmove.zoom');\n $('.product-carousel').slick('slickSetOption', 'swipe', true, false);\n\n $('.b-product_image-zoom_image').remove();\n loadZoom();\n initMobileZoomEvent();\n });\n}\n\n/**\n * @description mobile zoom handler\n */\nfunction initMobileZoomEvent() {\n if (!layout.isDesktop()) {\n $('.product-wrapper .carousel-item.slick-active .js-main-image').off('click').doubletap(function (event) {\n loadMobileZoom(event);\n });\n }\n}\n\nmodule.exports = function () {\n // If zoom is enabled based on Site Preference enableZoom\n if ($('.zoom-enabled').length > 0) {\n initializeEvents();\n }\n};\n","/*!\n\tZoom 1.7.21\n\tlicense: MIT\n\thttp://www.jacklmoore.com/zoom\n*/\n(function ($) {\n\tvar defaults = {\n\t\turl: false,\n\t\tcallback: false,\n\t\ttarget: false,\n\t\tduration: 120,\n\t\ton: 'mouseover', // other options: grab, click, toggle\n\t\ttouch: true, // enables a touch fallback\n\t\tonZoomIn: false,\n\t\tonZoomOut: false,\n\t\tmagnify: 1\n\t};\n\n\t// Core Zoom Logic, independent of event listeners.\n\t$.zoom = function(target, source, img, magnify) {\n\t\tvar targetHeight,\n\t\t\ttargetWidth,\n\t\t\tsourceHeight,\n\t\t\tsourceWidth,\n\t\t\txRatio,\n\t\t\tyRatio,\n\t\t\toffset,\n\t\t\t$target = $(target),\n\t\t\tposition = $target.css('position'),\n\t\t\t$source = $(source);\n\n\t\t// The parent element needs positioning so that the zoomed element can be correctly positioned within.\n\t\ttarget.style.position = /(absolute|fixed)/.test(position) ? position : 'relative';\n\t\ttarget.style.overflow = 'hidden';\n\t\timg.style.width = img.style.height = '';\n\n\t\t$(img)\n\t\t\t.addClass('zoomImg')\n\t\t\t.css({\n\t\t\t\tposition: 'absolute',\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0,\n\t\t\t\topacity: 0,\n\t\t\t\twidth: img.width * magnify,\n\t\t\t\theight: img.height * magnify,\n\t\t\t\tborder: 'none',\n\t\t\t\tmaxWidth: 'none',\n\t\t\t\tmaxHeight: 'none'\n\t\t\t})\n\t\t\t.appendTo(target);\n\n\t\treturn {\n\t\t\tinit: function() {\n\t\t\t\ttargetWidth = $target.outerWidth();\n\t\t\t\ttargetHeight = $target.outerHeight();\n\n\t\t\t\tif (source === target) {\n\t\t\t\t\tsourceWidth = targetWidth;\n\t\t\t\t\tsourceHeight = targetHeight;\n\t\t\t\t} else {\n\t\t\t\t\tsourceWidth = $source.outerWidth();\n\t\t\t\t\tsourceHeight = $source.outerHeight();\n\t\t\t\t}\n\n\t\t\t\txRatio = (img.width - targetWidth) / sourceWidth;\n\t\t\t\tyRatio = (img.height - targetHeight) / sourceHeight;\n\n\t\t\t\toffset = $source.offset();\n\t\t\t},\n\t\t\tmove: function (e) {\n\t\t\t\tvar left = (e.pageX - offset.left),\n\t\t\t\t\ttop = (e.pageY - offset.top);\n\n\t\t\t\ttop = Math.max(Math.min(top, sourceHeight), 0);\n\t\t\t\tleft = Math.max(Math.min(left, sourceWidth), 0);\n\n\t\t\t\timg.style.left = (left * -xRatio) + 'px';\n\t\t\t\timg.style.top = (top * -yRatio) + 'px';\n\t\t\t}\n\t\t};\n\t};\n\n\t$.fn.zoom = function (options) {\n\t\treturn this.each(function () {\n\t\t\tvar\n\t\t\tsettings = $.extend({}, defaults, options || {}),\n\t\t\t//target will display the zoomed image\n\t\t\ttarget = settings.target && $(settings.target)[0] || this,\n\t\t\t//source will provide zoom location info (thumbnail)\n\t\t\tsource = this,\n\t\t\t$source = $(source),\n\t\t\timg = document.createElement('img'),\n\t\t\t$img = $(img),\n\t\t\tmousemove = 'mousemove.zoom',\n\t\t\tclicked = false,\n\t\t\ttouched = false;\n\n\t\t\t// If a url wasn't specified, look for an image element.\n\t\t\tif (!settings.url) {\n\t\t\t\tvar srcElement = source.querySelector('img');\n\t\t\t\tif (srcElement) {\n\t\t\t\t\tsettings.url = srcElement.getAttribute('data-src') || srcElement.currentSrc || srcElement.src;\n\t\t\t\t}\n\t\t\t\tif (!settings.url) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$source.one('zoom.destroy', function(position, overflow){\n\t\t\t\t$source.off(\".zoom\");\n\t\t\t\ttarget.style.position = position;\n\t\t\t\ttarget.style.overflow = overflow;\n\t\t\t\timg.onload = null;\n\t\t\t\t$img.remove();\n\t\t\t}.bind(this, target.style.position, target.style.overflow));\n\n\t\t\timg.onload = function () {\n\t\t\t\tvar zoom = $.zoom(target, source, img, settings.magnify);\n\n\t\t\t\tfunction start(e) {\n\t\t\t\t\tzoom.init();\n\t\t\t\t\tzoom.move(e);\n\n\t\t\t\t\t// Skip the fade-in for IE8 and lower since it chokes on fading-in\n\t\t\t\t\t// and changing position based on mousemovement at the same time.\n\t\t\t\t\t$img.stop()\n\t\t\t\t\t.fadeTo($.support.opacity ? settings.duration : 0, 1, $.isFunction(settings.onZoomIn) ? settings.onZoomIn.call(img) : false);\n\t\t\t\t}\n\n\t\t\t\tfunction stop() {\n\t\t\t\t\t$img.stop()\n\t\t\t\t\t.fadeTo(settings.duration, 0, $.isFunction(settings.onZoomOut) ? settings.onZoomOut.call(img) : false);\n\t\t\t\t}\n\n\t\t\t\t// Mouse events\n\t\t\t\tif (settings.on === 'grab') {\n\t\t\t\t\t$source\n\t\t\t\t\t\t.on('mousedown.zoom',\n\t\t\t\t\t\t\tfunction (e) {\n\t\t\t\t\t\t\t\tif (e.which === 1) {\n\t\t\t\t\t\t\t\t\t$(document).one('mouseup.zoom',\n\t\t\t\t\t\t\t\t\t\tfunction () {\n\t\t\t\t\t\t\t\t\t\t\tstop();\n\n\t\t\t\t\t\t\t\t\t\t\t$(document).off(mousemove, zoom.move);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\tstart(e);\n\n\t\t\t\t\t\t\t\t\t$(document).on(mousemove, zoom.move);\n\n\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t} else if (settings.on === 'click') {\n\t\t\t\t\t$source.on('click.zoom',\n\t\t\t\t\t\tfunction (e) {\n\t\t\t\t\t\t\tif (clicked) {\n\t\t\t\t\t\t\t\t// bubble the event up to the document to trigger the unbind.\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tclicked = true;\n\t\t\t\t\t\t\t\tstart(e);\n\t\t\t\t\t\t\t\t$(document).on(mousemove, zoom.move);\n\t\t\t\t\t\t\t\t$(document).one('click.zoom',\n\t\t\t\t\t\t\t\t\tfunction () {\n\t\t\t\t\t\t\t\t\t\tstop();\n\t\t\t\t\t\t\t\t\t\tclicked = false;\n\t\t\t\t\t\t\t\t\t\t$(document).off(mousemove, zoom.move);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t} else if (settings.on === 'toggle') {\n\t\t\t\t\t$source.on('click.zoom',\n\t\t\t\t\t\tfunction (e) {\n\t\t\t\t\t\t\tif (clicked) {\n\t\t\t\t\t\t\t\tstop();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tstart(e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tclicked = !clicked;\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t} else if (settings.on === 'mouseover') {\n\t\t\t\t\tzoom.init(); // Preemptively call init because IE7 will fire the mousemove handler before the hover handler.\n\n\t\t\t\t\t$source\n\t\t\t\t\t\t.on('mouseenter.zoom', start)\n\t\t\t\t\t\t.on('mouseleave.zoom', stop)\n\t\t\t\t\t\t.on(mousemove, zoom.move);\n\t\t\t\t}\n\n\t\t\t\t// Touch fallback\n\t\t\t\tif (settings.touch) {\n\t\t\t\t\t$source\n\t\t\t\t\t\t.on('touchstart.zoom', function (e) {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\tif (touched) {\n\t\t\t\t\t\t\t\ttouched = false;\n\t\t\t\t\t\t\t\tstop();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttouched = true;\n\t\t\t\t\t\t\t\tstart( e.originalEvent.touches[0] || e.originalEvent.changedTouches[0] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.on('touchmove.zoom', function (e) {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\tzoom.move( e.originalEvent.touches[0] || e.originalEvent.changedTouches[0] );\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.on('touchend.zoom', function (e) {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\tif (touched) {\n\t\t\t\t\t\t\t\ttouched = false;\n\t\t\t\t\t\t\t\tstop();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($.isFunction(settings.callback)) {\n\t\t\t\t\tsettings.callback.call(img);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\timg.setAttribute('role', 'presentation');\n\t\t\timg.alt = '';\n\t\t\timg.src = settings.url;\n\t\t});\n\t};\n\n\t$.fn.zoom.defaults = defaults;\n}(window.jQuery));\n","'use strict';\n\n/**\n * Init/handle prescription filter element\n */\nfunction handlePrescriptionFilter($this) {\n var isFilterPrescriptionActive = $('.toggle-switch', $this).prop('checked');\n let $spans = $this.find('.toggle-text');\n $spans.toggleClass('active');\n $spans.each(function () {\n $this.attr('aria-pressed', $this.hasClass('active'));\n });\n\n var $indicator = $this.parent().find('.background-indicator');\n if (isFilterPrescriptionActive) {\n $indicator.css('left', '47%');\n } else {\n $indicator.css('left', '0');\n }\n\n $('.color-attribute').each(function () {\n var isRx = $(this).attr('data-has-rx-frame') === 'true';\n if (isFilterPrescriptionActive) {\n if (isRx) {\n $(this).removeClass('d-none');\n } else {\n $(this).addClass('d-none');\n }\n } else {\n $(this).removeClass('d-none');\n }\n });\n\n if (isFilterPrescriptionActive) {\n var $currentSwatchSelection = $('#color-variations-wrapper').find('.swatch.selected');\n $currentSwatchSelection.attr('data-non-prescription-selected', true);\n\n var firstPrescriptionSwatch = $('#color-variations-wrapper').find('.swatch:visible').first();\n if (firstPrescriptionSwatch.length > 0) {\n if (firstPrescriptionSwatch.hasClass('selected')) {\n switchPrescriptionCTAs(isFilterPrescriptionActive);\n }\n firstPrescriptionSwatch.trigger('click');\n }\n } else {\n var nonPrescriptionPreviouslySelected = $('#color-variations-wrapper').find('.swatch[data-non-prescription-selected=\"true\"]');\n if (!nonPrescriptionPreviouslySelected.length) {\n nonPrescriptionPreviouslySelected = $('#color-variations-wrapper').find('.swatch:visible').first();\n }\n nonPrescriptionPreviouslySelected.attr('data-non-prescription-selected', false);\n if (nonPrescriptionPreviouslySelected.hasClass('selected')) {\n switchPrescriptionCTAs(isFilterPrescriptionActive);\n }\n nonPrescriptionPreviouslySelected.trigger('click');\n }\n}\n\n/**\n * switch prescription ctas\n * @param {boolean} isFilterPrescriptionActive - true / false\n */\nfunction switchPrescriptionCTAs(isFilterPrescriptionActive) {\n if (isFilterPrescriptionActive) {\n $('.rx-url[data-has-rx-url=\"true\"], .prices-add-to-cart-actions').addClass('d-none');\n $('.rx-add-to-cart').removeClass('d-none');\n $('.js-pdp-reinsurance-asset').addClass('d-none');\n $('.js-pdp-reinsurance-asset-rxb2c').removeClass('d-none');\n } else {\n $('.rx-url[data-has-rx-url=\"true\"], .prices-add-to-cart-actions').removeClass('d-none');\n $('.rx-add-to-cart').addClass('d-none');\n $('.js-pdp-reinsurance-asset').removeClass('d-none');\n $('.js-pdp-reinsurance-asset-rxb2c').addClass('d-none');\n }\n}\n\nmodule.exports = function () {\n $('.rx-prescription-filter').each(function () {\n handlePrescriptionFilter($(this));\n });\n $('.rx-prescription-filter').on('click', function (e) {\n var $target = $(e.target);\n if ($target.hasClass('toggle-text')) {\n return;\n }\n e.stopPropagation();\n\n /** START: data layer */\n var isFilterPrescriptionActive = $('.toggle-switch', $(this)).prop('checked');\n dataLayer.push({\n choixPrescription: isFilterPrescriptionActive ? 'Prescription' : 'Non prescription', // Prescription ou Non prescription\n event: 'OptionPrescription'\n });\n /** END: data layer */\n\n handlePrescriptionFilter($(this));\n });\n\n $('body').on('product:afterAttributeSelect', function (e, response) {\n var isFilterPrescriptionActive = $('.rx-prescription-filter .toggle-switch').prop('checked');\n switchPrescriptionCTAs(response.data.product.RXFrame && isFilterPrescriptionActive);\n });\n\n $('.js-rxb2c-url-link').on('click', function () {\n /** START: data layer */\n dataLayer.push({\n event: 'Etape0'\n });\n /** END: data layer */\n });\n};\n","'use strict';\n\nvar base = require('base/product/base');\n\n/**\n * Displays the message returned in the response\n * @param {string} data - data returned from the server's ajax call\n */\nfunction displayMessage(data) {\n var status;\n if (!data.error) {\n status = 'alert-success';\n } else {\n status = 'alert-danger';\n }\n\n if ($('.add-to-registry-message').length === 0) {\n $('body').append('
    ');\n }\n $('.add-to-registry-message').append(\n '
    ' + data.msg + '
    '\n );\n\n setTimeout(function () {\n $('.add-to-registry-message').remove();\n }, 5000);\n}\n\nmodule.exports = {\n updateAddToRegistry: function () {\n $('body').on('product:updateAddToCart', function (e, response) {\n $('button.add-to-gift-registry', response.$productContainer).attr('disabled',\n (!response.product.readyToOrder || !response.product.available));\n });\n },\n\n updateGiftRegistryURLQuantity: function () {\n $('body').on('product:afterAttributeSelect', function (e, response) {\n $('.add-to-gift-registry', response.container).data('href', response.data.product.giftRegistryLink);\n });\n },\n\n addToGiftRegistry: function () {\n $('.add-to-gift-registry').on('click', function (e) {\n e.preventDefault();\n var element = $(this);\n var url = element.data('href');\n\n $.spinner().start();\n\n var args = {\n pid: base.getPidValue($(this)),\n qty: base.getQuantitySelected($(this)),\n prodSetPid: $('.product-set-detail').data('pid') || ''\n };\n\n var encodedArgs = encodeURIComponent(JSON.stringify(args));\n\n $.ajax({\n url: url,\n type: 'get',\n data: { args: encodedArgs },\n dataType: 'json',\n success: function (data) {\n if (data.redirectUrl) {\n window.location.href = data.redirectUrl;\n } else {\n displayMessage(data, element);\n }\n\n $.spinner().stop();\n },\n error: function (err) {\n $.spinner().stop();\n window.location.href = err.responseJSON.redirectUrl;\n }\n });\n });\n }\n};\n","module.exports = function () {\n $('body').on('product:updateAddToCart', function (e, response) {\n if (response.product.readyToOrder) {\n var applePayButton = $('.apple-pay-pdp', response.$productContainer);\n if (applePayButton.length !== 0) {\n applePayButton.attr('sku', response.product.id);\n } else {\n var showApplePay = true;\n if (typeof $('.cart-and-ipay').data('ipay-enabled') !== 'undefined') {\n showApplePay = $('.cart-and-ipay').data('ipay-enabled');\n }\n if ($('.apple-pay-pdp').length === 0 && showApplePay) {\n // eslint-disable-line no-lonely-if\n var applePayButtonIsmlString = '
    '\n + '';\n $('.cart-and-ipay').append(applePayButtonIsmlString);\n }\n }\n } else {\n $('.pdp-apple-pay-button').remove();\n }\n });\n};\n","'use strict';\n\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 if (data.success) {\n status = 'alert-success';\n } else {\n status = 'alert-danger';\n }\n\n if ($('.add-to-wishlist-messages').length === 0) {\n $('body').append(\n '
    '\n );\n }\n $('.add-to-wishlist-messages')\n .append('
    ' + data.msg + '
    ');\n\n setTimeout(function () {\n $('.add-to-wishlist-messages').remove();\n button.removeAttr('disabled');\n }, 5000);\n}\n\nmodule.exports = {\n addToWishlist: function () {\n $('.add-to-wish-list').on('click', function (e) {\n e.preventDefault();\n var url = $(this).data('href');\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 $.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 });\n }\n};\n","\"use strict\";\n\nvar store = require(\"base/storeLocator/storeLocator\");\n\n/**\n * appends params to a url\n * @param {string} url - Original url\n * @param {Object} params - Parameters to append\n * @returns {string} result url with appended parameters\n */\nfunction appendToUrl(url, params) {\n var newUrl = url;\n newUrl +=\n (newUrl.indexOf(\"?\") !== -1 ? \"&\" : \"?\") +\n Object.keys(params)\n .map(function(key) {\n return key + \"=\" + encodeURIComponent(params[key]);\n })\n .join(\"&\");\n\n return newUrl;\n}\n\n/**\n * Uses google maps api to render a map\n */\nfunction maps() {\n var map;\n var infowindow = new google.maps.InfoWindow();\n\n // Init FR Map in the center of the viewport\n var latlng = new google.maps.LatLng(48.866667, 2.333333);\n var mapOptions = {\n scrollwheel: false,\n zoom: 4,\n center: latlng\n };\n\n map = new google.maps.Map($(\".map-canvas\")[0], mapOptions);\n var mapdiv = $(\".map-canvas\").attr(\"data-locations\");\n\n mapdiv = JSON.parse(mapdiv);\n\n var bounds = new google.maps.LatLngBounds();\n\n // Customized google map marker icon with svg format\n var markerImg = {\n path:\n \"M13.5,30.1460153 L16.8554555,25.5 L20.0024287,25.5 C23.039087,25.5 25.5,\" +\n \"23.0388955 25.5,20.0024287 L25.5,5.99757128 C25.5,2.96091298 23.0388955,0.5 \" +\n \"20.0024287,0.5 L5.99757128,0.5 C2.96091298,0.5 0.5,2.96110446 0.5,5.99757128 \" +\n \"L0.5,20.0024287 C0.5,23.039087 2.96110446,25.5 5.99757128,25.5 L10.1445445,\" +\n \"25.5 L13.5,30.1460153 Z\",\n fillColor: \"#000\",\n fillOpacity: 1,\n scale: 1.1,\n strokeColor: \"white\",\n strokeWeight: 1,\n anchor: new google.maps.Point(13, 30),\n labelOrigin: new google.maps.Point(12, 12)\n };\n\n Object.keys(mapdiv).forEach(function(key) {\n var item = mapdiv[key];\n var lable = parseInt(key, 10) + 1;\n var storeLocation = new google.maps.LatLng(\n item.latitude,\n item.longitude\n );\n var marker = new google.maps.Marker({\n position: storeLocation,\n map: map,\n title: item.name,\n icon: markerImg,\n label: { text: lable.toString(), color: \"white\", fontSize: \"16px\" }\n });\n\n marker.addListener(\"click\", function() {\n infowindow.setOptions({\n content: item.infoWindowHtml\n });\n infowindow.open(map, marker);\n });\n\n // Create a minimum bound based on a set of storeLocations\n bounds.extend(marker.position);\n });\n // Fit the all the store marks in the center of a minimum bounds when any store has been found.\n if (mapdiv && mapdiv.length !== 0) {\n map.fitBounds(bounds);\n }\n\n initAutocomplete(map);\n}\n\n/**\n * Renders the results of the search and updates the map\n * @param {Object} data - Response from the server\n */\nfunction updateStoresResults(data) {\n var $resultsDiv = $(\".results\");\n var $mapDiv = $(\".map-canvas\");\n var hasResults = data.stores.length > 0;\n\n if (!hasResults) {\n $(\".store-locator-no-results\").show();\n } else {\n $(\".store-locator-no-results\").hide();\n }\n\n $resultsDiv\n .empty()\n .data(\"has-results\", hasResults)\n .data(\"radius\", data.radius)\n .data(\"search-key\", data.searchKey);\n\n $mapDiv.attr(\"data-locations\", data.locations);\n\n if ($mapDiv.data(\"has-google-api\")) {\n maps();\n } else {\n $(\".store-locator-no-apiKey\").show();\n }\n\n if (data.storesResultsHtml) {\n $resultsDiv.append(data.storesResultsHtml);\n }\n}\n\n/**\n * Google map autocomplete initialization. Use to get places with longitude and latitude based on user input\n * @param {Object} map - current instance of google.maps.Map\n * @returns {void}\n */\nfunction initAutocomplete() {\n var autocomplete;\n var input = document.getElementById(\"store-geolocation\");\n autocomplete = new google.maps.places.Autocomplete(input, {});\n\n google.maps.event.addListener(autocomplete, \"place_changed\", function() {\n var place = autocomplete.getPlace();\n\n if (typeof place === \"undefined\" || !place.geometry) {\n return;\n }\n\n $(\"#store-geolocation\").attr(\n \"data-geolocation\",\n JSON.stringify({\n lat: place.geometry.location.lat(),\n long: place.geometry.location.lng()\n })\n );\n \n $('.store-locator-container .btn-storelocator-search[type=\"button\"]').click();\n });\n}\n\n/**\n * Search for stores with new geolocation\n * @param {HTMLElement} element - the target html element\n * @returns {boolean} false to prevent default event\n */\nfunction search(element) {\n var dialog = element.closest(\".in-store-inventory-dialog\");\n var spinner = dialog.length ? dialog.spinner() : $.spinner();\n spinner.start();\n var $form = element.closest(\".store-locator\");\n var radius = $(\".results\").data(\"radius\");\n var url = $form.attr(\"action\");\n var urlParams = { radius: radius };\n var category = $(\"input:radio[name='store-locator-category']:checked\").val();\n if (category) {\n urlParams.category = category;\n }\n var $geolocationField = $form.find('[name=\"geolocation\"]');\n var geolocation = $geolocationField.attr(\"data-geolocation\");\n\n try {\n geolocation = JSON.parse(geolocation);\n } catch {\n $geolocationField.focus();\n $.spinner().stop();\n return false;\n }\n\n var payload = $form.is(\"form\") ? $form.serialize() : geolocation;\n\n url = appendToUrl(url, urlParams);\n\n $.ajax({\n url: url,\n type: $form.attr(\"method\"),\n data: payload,\n dataType: \"json\",\n success: function(data) {\n spinner.stop();\n updateStoresResults(data);\n $(\".select-store\").prop(\"disabled\", true);\n }\n });\n return false;\n}\n\nmodule.exports = {\n // Override the whole init and to customize the maps() function\n init: function() {\n if ($(\".map-canvas\").data(\"has-google-api\")) {\n maps();\n } else {\n $(\".store-locator-no-apiKey\").show();\n }\n if (!$(\".results\").data(\"has-results\")) {\n $(\".store-locator-no-results\").show();\n }\n },\n // Overrided to call the customized maps() on updateStoresResults()\n detectLocation: function() {\n // clicking on detect location.\n $(\".detect-location\").on(\"click\", function() {\n $.spinner().start();\n\n if (!navigator.geolocation) {\n $.spinner().stop();\n return;\n }\n\n navigator.geolocation.getCurrentPosition(\n function(position) {\n var $detectLocationButton = $(\".detect-location\");\n var url = $detectLocationButton.data(\"action\");\n var radius = $(\".results\").data(\"radius\");\n var urlParams = {\n radius: radius,\n lat: position.coords.latitude,\n long: position.coords.longitude\n };\n var category = $(\"input:radio[name='store-locator-category']:checked\").val();\n if (category) {\n urlParams.category = category;\n }\n\n url = appendToUrl(url, urlParams);\n $.ajax({\n url: url,\n type: \"get\",\n dataType: \"json\",\n success: function(data) {\n $.spinner().stop();\n updateStoresResults(data);\n $(\".select-store\").prop(\"disabled\", true);\n }\n });\n },\n function() {\n $.spinner().stop();\n }\n );\n });\n },\n // Overrided to call the customized maps() on updateStoresResults()\n search: function() {\n $(\".store-locator-container form.store-locator\").submit(function(e) {\n e.preventDefault();\n search($(this));\n });\n $('.store-locator-container .btn-storelocator-search[type=\"button\"]').click(function(e) {\n if (e.isTrigger) return;\n e.preventDefault();\n search($(this));\n });\n },\n // Overrided to call the customized maps() on updateStoresResults()\n changeRadius: function() {\n $(\".store-locator-container .radius\").change(function() {\n var radius = $(this).val();\n var searchKeys = $(\".results\").data(\"search-key\");\n var url = $(this).data(\"action-url\");\n var urlParams = {};\n\n if (searchKeys.lat && searchKeys.long) {\n urlParams = {\n radius: radius,\n lat: searchKeys.lat,\n long: searchKeys.long\n };\n }\n var category = $(\"input:radio[name='store-locator-category']:checked\").val();\n if (category) {\n urlParams.category = category;\n }\n\n url = appendToUrl(url, urlParams);\n var dialog = $(this).closest(\".in-store-inventory-dialog\");\n var spinner = dialog.length ? dialog.spinner() : $.spinner();\n spinner.start();\n $.ajax({\n url: url,\n type: \"get\",\n dataType: \"json\",\n success: function(data) {\n spinner.stop();\n updateStoresResults(data);\n $(\".select-store\").prop(\"disabled\", true);\n }\n });\n });\n },\n selectStore: store.selectStore,\n updateSelectStoreButton: store.updateSelectStoreButton\n};\n","/* globals google */\n'use strict';\n\n/**\n * appends params to a url\n * @param {string} url - Original url\n * @param {Object} params - Parameters to append\n * @returns {string} result url with appended parameters\n */\nfunction appendToUrl(url, params) {\n var newUrl = url;\n newUrl += (newUrl.indexOf('?') !== -1 ? '&' : '?') + Object.keys(params).map(function (key) {\n return key + '=' + encodeURIComponent(params[key]);\n }).join('&');\n\n return newUrl;\n}\n\n/**\n * Uses google maps api to render a map\n */\nfunction maps() {\n var map;\n var infowindow = new google.maps.InfoWindow();\n\n // Init U.S. Map in the center of the viewport\n var latlng = new google.maps.LatLng(37.09024, -95.712891);\n var mapOptions = {\n scrollwheel: false,\n zoom: 4,\n center: latlng\n };\n\n map = new google.maps.Map($('.map-canvas')[0], mapOptions);\n var mapdiv = $('.map-canvas').attr('data-locations');\n\n mapdiv = JSON.parse(mapdiv);\n\n var bounds = new google.maps.LatLngBounds();\n\n // Customized google map marker icon with svg format\n var markerImg = {\n path: 'M13.5,30.1460153 L16.8554555,25.5 L20.0024287,25.5 C23.039087,25.5 25.5,' +\n '23.0388955 25.5,20.0024287 L25.5,5.99757128 C25.5,2.96091298 23.0388955,0.5 ' +\n '20.0024287,0.5 L5.99757128,0.5 C2.96091298,0.5 0.5,2.96110446 0.5,5.99757128 ' +\n 'L0.5,20.0024287 C0.5,23.039087 2.96110446,25.5 5.99757128,25.5 L10.1445445,' +\n '25.5 L13.5,30.1460153 Z',\n fillColor: '#0070d2',\n fillOpacity: 1,\n scale: 1.1,\n strokeColor: 'white',\n strokeWeight: 1,\n anchor: new google.maps.Point(13, 30),\n labelOrigin: new google.maps.Point(12, 12)\n };\n\n Object.keys(mapdiv).forEach(function (key) {\n var item = mapdiv[key];\n var lable = parseInt(key, 10) + 1;\n var storeLocation = new google.maps.LatLng(item.latitude, item.longitude);\n var marker = new google.maps.Marker({\n position: storeLocation,\n map: map,\n title: item.name,\n icon: markerImg,\n label: { text: lable.toString(), color: 'white', fontSize: '16px' }\n });\n\n marker.addListener('click', function () {\n infowindow.setOptions({\n content: item.infoWindowHtml\n });\n infowindow.open(map, marker);\n });\n\n // Create a minimum bound based on a set of storeLocations\n bounds.extend(marker.position);\n });\n // Fit the all the store marks in the center of a minimum bounds when any store has been found.\n if (mapdiv && mapdiv.length !== 0) {\n map.fitBounds(bounds);\n }\n}\n\n/**\n * Renders the results of the search and updates the map\n * @param {Object} data - Response from the server\n */\nfunction updateStoresResults(data) {\n var $resultsDiv = $('.results');\n var $mapDiv = $('.map-canvas');\n var hasResults = data.stores.length > 0;\n\n if (!hasResults) {\n $('.store-locator-no-results').show();\n } else {\n $('.store-locator-no-results').hide();\n }\n\n $resultsDiv.empty()\n .data('has-results', hasResults)\n .data('radius', data.radius)\n .data('search-key', data.searchKey);\n\n $mapDiv.attr('data-locations', data.locations);\n\n if ($mapDiv.data('has-google-api')) {\n maps();\n } else {\n $('.store-locator-no-apiKey').show();\n }\n\n if (data.storesResultsHtml) {\n $resultsDiv.append(data.storesResultsHtml);\n }\n}\n\n/**\n * Search for stores with new zip code\n * @param {HTMLElement} element - the target html element\n * @returns {boolean} false to prevent default event\n */\nfunction search(element) {\n var dialog = element.closest('.in-store-inventory-dialog');\n var spinner = dialog.length ? dialog.spinner() : $.spinner();\n spinner.start();\n var $form = element.closest('.store-locator');\n var radius = $('.results').data('radius');\n var url = $form.attr('action');\n var urlParams = { radius: radius };\n\n var payload = $form.is('form') ? $form.serialize() : { postalCode: $form.find('[name=\"postalCode\"]').val() };\n\n url = appendToUrl(url, urlParams);\n\n $.ajax({\n url: url,\n type: $form.attr('method'),\n data: payload,\n dataType: 'json',\n success: function (data) {\n spinner.stop();\n updateStoresResults(data);\n $('.select-store').prop('disabled', true);\n }\n });\n return false;\n}\n\nmodule.exports = {\n init: function () {\n if ($('.map-canvas').data('has-google-api')) {\n maps();\n } else {\n $('.store-locator-no-apiKey').show();\n }\n\n if (!$('.results').data('has-results')) {\n $('.store-locator-no-results').show();\n }\n },\n\n detectLocation: function () {\n // clicking on detect location.\n $('.detect-location').on('click', function () {\n $.spinner().start();\n if (!navigator.geolocation) {\n $.spinner().stop();\n return;\n }\n\n navigator.geolocation.getCurrentPosition(function (position) {\n var $detectLocationButton = $('.detect-location');\n var url = $detectLocationButton.data('action');\n var radius = $('.results').data('radius');\n var urlParams = {\n radius: radius,\n lat: position.coords.latitude,\n long: position.coords.longitude\n };\n\n url = appendToUrl(url, urlParams);\n $.ajax({\n url: url,\n type: 'get',\n dataType: 'json',\n success: function (data) {\n $.spinner().stop();\n updateStoresResults(data);\n $('.select-store').prop('disabled', true);\n }\n });\n });\n });\n },\n\n search: function () {\n $('.store-locator-container form.store-locator').submit(function (e) {\n e.preventDefault();\n search($(this));\n });\n $('.store-locator-container .btn-storelocator-search[type=\"button\"]').click(function (e) {\n e.preventDefault();\n search($(this));\n });\n },\n\n changeRadius: function () {\n $('.store-locator-container .radius').change(function () {\n var radius = $(this).val();\n var searchKeys = $('.results').data('search-key');\n var url = $(this).data('action-url');\n var urlParams = {};\n\n if (searchKeys.postalCode) {\n urlParams = {\n radius: radius,\n postalCode: searchKeys.postalCode\n };\n } else if (searchKeys.lat && searchKeys.long) {\n urlParams = {\n radius: radius,\n lat: searchKeys.lat,\n long: searchKeys.long\n };\n }\n\n url = appendToUrl(url, urlParams);\n var dialog = $(this).closest('.in-store-inventory-dialog');\n var spinner = dialog.length ? dialog.spinner() : $.spinner();\n spinner.start();\n $.ajax({\n url: url,\n type: 'get',\n dataType: 'json',\n success: function (data) {\n spinner.stop();\n updateStoresResults(data);\n $('.select-store').prop('disabled', true);\n }\n });\n });\n },\n selectStore: function () {\n $('.store-locator-container').on('click', '.select-store', (function (e) {\n e.preventDefault();\n var selectedStore = $(':checked', '.results-card .results');\n var data = {\n storeID: selectedStore.val(),\n searchRadius: $('#radius').val(),\n searchPostalCode: $('.results').data('search-key').postalCode,\n storeDetailsHtml: selectedStore.siblings('label').find('.store-details').html(),\n event: e\n };\n\n $('body').trigger('store:selected', data);\n }));\n },\n updateSelectStoreButton: function () {\n $('body').on('change', '.select-store-input', (function () {\n $('.select-store').prop('disabled', false);\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"],"sourceRoot":""}