{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///(webpack)/buildin/global.js","webpack:///./node_modules/dom-to-image/src/dom-to-image.js","webpack:///./node_modules/file-saver/dist/FileSaver.min.js","webpack:///./common/scripts/modules/dataLayer/dataLayerProductPage.js","webpack:///./common/scripts/modules/productPopup.js","webpack:///./common/scripts/modules/specificationDropdown.js","webpack:///./common/scripts/modules/productCta.js","webpack:///./common/scripts/modules/productColourTool.js","webpack:///./common/scripts/pages/productDetail.js","webpack:///./common/scripts/modules/dataLayer/dataLayerProductListings.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","g","this","Function","e","window","global","util","escape","string","replace","parseExtension","mimeType","url","extension","toLowerCase","WOFF","dataAsUrl","content","type","isDataUrl","search","canvasToBlob","canvas","toBlob","Promise","resolve","binaryString","atob","toDataURL","split","length","binaryArray","Uint8Array","charCodeAt","Blob","resolveUrl","baseUrl","doc","document","implementation","createHTMLDocument","base","createElement","head","appendChild","a","body","href","getAndEncode","domtoimage","impl","options","cacheBust","test","Date","getTime","placeholder","request","XMLHttpRequest","onreadystatechange","readyState","status","fail","encoder","FileReader","onloadend","result","readAsDataURL","response","ontimeout","responseType","timeout","open","send","imagePlaceholder","message","console","error","uid","index","Math","random","pow","toString","slice","delay","ms","arg","setTimeout","asArray","arrayLike","array","push","escapeXhtml","makeImage","uri","reject","image","Image","onload","onerror","src","width","node","leftBorder","px","rightBorder","scrollWidth","height","topBorder","bottomBorder","scrollHeight","match","exec","styleProperty","getComputedStyle","getPropertyValue","parseFloat","newUtil","inliner","URL_REGEX","inlineAll","shouldProcess","nothingToInline","then","readUrls","urls","done","forEach","inline","filter","data","dataUrl","RegExp","urlAsRegex","newInliner","fontFaces","resolveAll","readAll","webFonts","all","map","webFont","cssStrings","join","styleSheets","cssRules","sheet","log","rule","CSSRule","FONT_FACE_RULE","style","rules","newWebFont","webFontRule","parentStyleSheet","cssText","newFontFaces","images","Element","background","inlined","setProperty","getPropertyPriority","inlineBackground","HTMLImageElement","newImage","childNodes","child","element","newImages","defaultOptions","undefined","toSvg","toPng","draw","toJpeg","quality","toPixelData","getContext","getImageData","copyOptions","cloneNode","root","HTMLCanvasElement","clone","cloneChildren","original","cloneStyle","clonePseudoElements","copyUserInput","fixSvg","source","target","copyProperties","className","styleElement","selector","formatCssText","formatCssProperties","createTextNode","formatPseudoElementStyle","clonePseudoElement","HTMLTextAreaElement","innerHTML","HTMLInputElement","setAttribute","SVGElement","SVGRectElement","attribute","getAttribute","processClone","children","cloneChildrenInOrder","parent","childClone","embedFonts","inlineImages","bgcolor","backgroundColor","keys","XMLSerializer","serializeToString","xhtml","foreignObject","svg","makeSvgDataUri","domNode","ctx","fillStyle","fillRect","newCanvas","drawImage","styleNode","b","dispatchEvent","MouseEvent","createEvent","initMouseEvent","f","self","navigator","userAgent","saveAs","HTMLAnchorElement","h","URL","webkitURL","j","download","rel","origin","location","createObjectURL","revokeObjectURL","msSaveOrOpenBlob","autoBom","warn","title","innerText","HTMLElement","safari","k","product","updatePrice","optionIds","Array","$","each","elem","val","ajax","enctype","productRef","hasRalFinish","qty","dataType","traditional","success","html","price","removeClass","dropdownBtns","getElementsByClassName","item","onclick","current","dropdown","preventDefault","getElementById","classList","toggle","init","productDetails","querySelector","clientHeight","onresize","productCta","onscroll","scrollTop","documentElement","add","remove","on","animate","offset","top","currentLang","language","userLanguage","hostname","container","overlay","getElementsByTagName","colourCode","changeColor","picker","colour","fill","addEventListener","blob","b64Data","contentType","sliceSize","byteCharacters","byteArrays","byteNumbers","byteArray","b64toBlob","blobUrl","link","click","swatches","popupcontainer","buyNowButton","querySelectorAll","buyNowButtonWrapper","event","colourText","trim","contains","prop","change","selectric","find","trigger","toggleClass","formData","formValues","selectQty","attr","is","parseInt","text","formatUnitPrice","unitPrice","item_id","dataset","sku","item_name","affiliation","currency","item_brand","item_category","category","quantity","formValuesToJson","JSON","parse","DataLayerProductListings","processData","FormData","totalAmount","dataLayer","x","ecommerce","items","DataLayerProduct","$basketTrigger","magnificPopup","close","orderQty","replaceWith","headerBasket","errorMessage","exceptionMessage","xhr","GetProducts","formFilters","products","productList","MergeObjects","obj1","obj2","obj3","attrname","ElementsToString","elements"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAA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,KAC3BkY,YAAa,0BACbC,SAAUlG,EAAQ8F,QAAQI,SAC1B3R,MAAOA,EACP4R,WAAYnG,EAAQ8F,QAAQ/X,KAC5BqY,cAAepG,EAAQ8F,QAAQO,SAC/BpF,MAAOpK,WAAWmJ,EAAQ8F,QAAQ7E,OAClCqF,SAAU,GAGI,MAAfuB,GAAsCxN,MAAfwN,IACtBxG,EAAO2G,EAAa3G,EAAMwG,IAG9BE,EAAY3S,KAAKiM,MAGrByF,UAAYA,UAAUpP,OAAOqP,IAAMA,EAAEC,WACrCF,UAAU1R,KAAK,CACXsP,MAAO,iBACPsC,UAAW,CACPC,MAAOc,MA0BhB,SAASC,EAAaC,EAAKC,GAC9B,IAAIC,EAAO,GACX,IAAK,IAAIC,KAAYH,EAAQE,EAAKC,GAAYH,EAAKG,GACnD,IAAK,IAAIA,KAAYF,EAAQC,EAAKC,GAAYF,EAAKE,GACnD,OAAOD,EAWJ,SAASE,EAAiBC,GAE7B,IAAInT,EAAQ,GAEZ,IAAK,IAAIZ,EAAQ,EAAGA,EAAQ+T,EAAShX,OAAQiD,IACzCY,EAAMC,KAAKkT,EAAS/T,GAAOqL,WAG/B,OAAOzK,EAAMR,WAlFjB","file":"productDetail.bundle.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 = 140);\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","(function (global) {\n 'use strict';\n\n var util = newUtil();\n var inliner = newInliner();\n var fontFaces = newFontFaces();\n var images = newImages();\n\n // Default impl options\n var defaultOptions = {\n // Default is to fail on error, no placeholder\n imagePlaceholder: undefined,\n // Default cache bust is false, it will use the cache\n cacheBust: false\n };\n\n var domtoimage = {\n toSvg: toSvg,\n toPng: toPng,\n toJpeg: toJpeg,\n toBlob: toBlob,\n toPixelData: toPixelData,\n impl: {\n fontFaces: fontFaces,\n images: images,\n util: util,\n inliner: inliner,\n options: {}\n }\n };\n\n if (typeof module !== 'undefined')\n module.exports = domtoimage;\n else\n global.domtoimage = domtoimage;\n\n\n /**\n * @param {Node} node - The DOM Node object to render\n * @param {Object} options - Rendering options\n * @param {Function} options.filter - Should return true if passed node should be included in the output\n * (excluding node means excluding it's children as well). Not called on the root node.\n * @param {String} options.bgcolor - color for the background, any valid CSS color value.\n * @param {Number} options.width - width to be applied to node before rendering.\n * @param {Number} options.height - height to be applied to node before rendering.\n * @param {Object} options.style - an object whose properties to be copied to node's style before rendering.\n * @param {Number} options.quality - a Number between 0 and 1 indicating image quality (applicable to JPEG only),\n defaults to 1.0.\n * @param {String} options.imagePlaceholder - dataURL to use as a placeholder for failed images, default behaviour is to fail fast on images we can't fetch\n * @param {Boolean} options.cacheBust - set to true to cache bust by appending the time to the request url\n * @return {Promise} - A promise that is fulfilled with a SVG image data URL\n * */\n function toSvg(node, options) {\n options = options || {};\n copyOptions(options);\n return Promise.resolve(node)\n .then(function (node) {\n return cloneNode(node, options.filter, true);\n })\n .then(embedFonts)\n .then(inlineImages)\n .then(applyOptions)\n .then(function (clone) {\n return makeSvgDataUri(clone,\n options.width || util.width(node),\n options.height || util.height(node)\n );\n });\n\n function applyOptions(clone) {\n if (options.bgcolor) clone.style.backgroundColor = options.bgcolor;\n\n if (options.width) clone.style.width = options.width + 'px';\n if (options.height) clone.style.height = options.height + 'px';\n\n if (options.style)\n Object.keys(options.style).forEach(function (property) {\n clone.style[property] = options.style[property];\n });\n\n return clone;\n }\n }\n\n /**\n * @param {Node} node - The DOM Node object to render\n * @param {Object} options - Rendering options, @see {@link toSvg}\n * @return {Promise} - A promise that is fulfilled with a Uint8Array containing RGBA pixel data.\n * */\n function toPixelData(node, options) {\n return draw(node, options || {})\n .then(function (canvas) {\n return canvas.getContext('2d').getImageData(\n 0,\n 0,\n util.width(node),\n util.height(node)\n ).data;\n });\n }\n\n /**\n * @param {Node} node - The DOM Node object to render\n * @param {Object} options - Rendering options, @see {@link toSvg}\n * @return {Promise} - A promise that is fulfilled with a PNG image data URL\n * */\n function toPng(node, options) {\n return draw(node, options || {})\n .then(function (canvas) {\n return canvas.toDataURL();\n });\n }\n\n /**\n * @param {Node} node - The DOM Node object to render\n * @param {Object} options - Rendering options, @see {@link toSvg}\n * @return {Promise} - A promise that is fulfilled with a JPEG image data URL\n * */\n function toJpeg(node, options) {\n options = options || {};\n return draw(node, options)\n .then(function (canvas) {\n return canvas.toDataURL('image/jpeg', options.quality || 1.0);\n });\n }\n\n /**\n * @param {Node} node - The DOM Node object to render\n * @param {Object} options - Rendering options, @see {@link toSvg}\n * @return {Promise} - A promise that is fulfilled with a PNG image blob\n * */\n function toBlob(node, options) {\n return draw(node, options || {})\n .then(util.canvasToBlob);\n }\n\n function copyOptions(options) {\n // Copy options to impl options for use in impl\n if(typeof(options.imagePlaceholder) === 'undefined') {\n domtoimage.impl.options.imagePlaceholder = defaultOptions.imagePlaceholder;\n } else {\n domtoimage.impl.options.imagePlaceholder = options.imagePlaceholder;\n }\n\n if(typeof(options.cacheBust) === 'undefined') {\n domtoimage.impl.options.cacheBust = defaultOptions.cacheBust;\n } else {\n domtoimage.impl.options.cacheBust = options.cacheBust;\n }\n }\n\n function draw(domNode, options) {\n return toSvg(domNode, options)\n .then(util.makeImage)\n .then(util.delay(100))\n .then(function (image) {\n var canvas = newCanvas(domNode);\n canvas.getContext('2d').drawImage(image, 0, 0);\n return canvas;\n });\n\n function newCanvas(domNode) {\n var canvas = document.createElement('canvas');\n canvas.width = options.width || util.width(domNode);\n canvas.height = options.height || util.height(domNode);\n\n if (options.bgcolor) {\n var ctx = canvas.getContext('2d');\n ctx.fillStyle = options.bgcolor;\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n }\n\n return canvas;\n }\n }\n\n function cloneNode(node, filter, root) {\n if (!root && filter && !filter(node)) return Promise.resolve();\n\n return Promise.resolve(node)\n .then(makeNodeCopy)\n .then(function (clone) {\n return cloneChildren(node, clone, filter);\n })\n .then(function (clone) {\n return processClone(node, clone);\n });\n\n function makeNodeCopy(node) {\n if (node instanceof HTMLCanvasElement) return util.makeImage(node.toDataURL());\n return node.cloneNode(false);\n }\n\n function cloneChildren(original, clone, filter) {\n var children = original.childNodes;\n if (children.length === 0) return Promise.resolve(clone);\n\n return cloneChildrenInOrder(clone, util.asArray(children), filter)\n .then(function () {\n return clone;\n });\n\n function cloneChildrenInOrder(parent, children, filter) {\n var done = Promise.resolve();\n children.forEach(function (child) {\n done = done\n .then(function () {\n return cloneNode(child, filter);\n })\n .then(function (childClone) {\n if (childClone) parent.appendChild(childClone);\n });\n });\n return done;\n }\n }\n\n function processClone(original, clone) {\n if (!(clone instanceof Element)) return clone;\n\n return Promise.resolve()\n .then(cloneStyle)\n .then(clonePseudoElements)\n .then(copyUserInput)\n .then(fixSvg)\n .then(function () {\n return clone;\n });\n\n function cloneStyle() {\n copyStyle(window.getComputedStyle(original), clone.style);\n\n function copyStyle(source, target) {\n if (source.cssText) target.cssText = source.cssText;\n else copyProperties(source, target);\n\n function copyProperties(source, target) {\n util.asArray(source).forEach(function (name) {\n target.setProperty(\n name,\n source.getPropertyValue(name),\n source.getPropertyPriority(name)\n );\n });\n }\n }\n }\n\n function clonePseudoElements() {\n [':before', ':after'].forEach(function (element) {\n clonePseudoElement(element);\n });\n\n function clonePseudoElement(element) {\n var style = window.getComputedStyle(original, element);\n var content = style.getPropertyValue('content');\n\n if (content === '' || content === 'none') return;\n\n var className = util.uid();\n clone.className = clone.className + ' ' + className;\n var styleElement = document.createElement('style');\n styleElement.appendChild(formatPseudoElementStyle(className, element, style));\n clone.appendChild(styleElement);\n\n function formatPseudoElementStyle(className, element, style) {\n var selector = '.' + className + ':' + element;\n var cssText = style.cssText ? formatCssText(style) : formatCssProperties(style);\n return document.createTextNode(selector + '{' + cssText + '}');\n\n function formatCssText(style) {\n var content = style.getPropertyValue('content');\n return style.cssText + ' content: ' + content + ';';\n }\n\n function formatCssProperties(style) {\n\n return util.asArray(style)\n .map(formatProperty)\n .join('; ') + ';';\n\n function formatProperty(name) {\n return name + ': ' +\n style.getPropertyValue(name) +\n (style.getPropertyPriority(name) ? ' !important' : '');\n }\n }\n }\n }\n }\n\n function copyUserInput() {\n if (original instanceof HTMLTextAreaElement) clone.innerHTML = original.value;\n if (original instanceof HTMLInputElement) clone.setAttribute(\"value\", original.value);\n }\n\n function fixSvg() {\n if (!(clone instanceof SVGElement)) return;\n clone.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n\n if (!(clone instanceof SVGRectElement)) return;\n ['width', 'height'].forEach(function (attribute) {\n var value = clone.getAttribute(attribute);\n if (!value) return;\n\n clone.style.setProperty(attribute, value);\n });\n }\n }\n }\n\n function embedFonts(node) {\n return fontFaces.resolveAll()\n .then(function (cssText) {\n var styleNode = document.createElement('style');\n node.appendChild(styleNode);\n styleNode.appendChild(document.createTextNode(cssText));\n return node;\n });\n }\n\n function inlineImages(node) {\n return images.inlineAll(node)\n .then(function () {\n return node;\n });\n }\n\n function makeSvgDataUri(node, width, height) {\n return Promise.resolve(node)\n .then(function (node) {\n node.setAttribute('xmlns', 'http://www.w3.org/1999/xhtml');\n return new XMLSerializer().serializeToString(node);\n })\n .then(util.escapeXhtml)\n .then(function (xhtml) {\n return '' + xhtml + '';\n })\n .then(function (foreignObject) {\n return '';\n })\n .then(function (svg) {\n return 'data:image/svg+xml;charset=utf-8,' + svg;\n });\n }\n\n function newUtil() {\n return {\n escape: escape,\n parseExtension: parseExtension,\n mimeType: mimeType,\n dataAsUrl: dataAsUrl,\n isDataUrl: isDataUrl,\n canvasToBlob: canvasToBlob,\n resolveUrl: resolveUrl,\n getAndEncode: getAndEncode,\n uid: uid(),\n delay: delay,\n asArray: asArray,\n escapeXhtml: escapeXhtml,\n makeImage: makeImage,\n width: width,\n height: height\n };\n\n function mimes() {\n /*\n * Only WOFF and EOT mime types for fonts are 'real'\n * see http://www.iana.org/assignments/media-types/media-types.xhtml\n */\n var WOFF = 'application/font-woff';\n var JPEG = 'image/jpeg';\n\n return {\n 'woff': WOFF,\n 'woff2': WOFF,\n 'ttf': 'application/font-truetype',\n 'eot': 'application/vnd.ms-fontobject',\n 'png': 'image/png',\n 'jpg': JPEG,\n 'jpeg': JPEG,\n 'gif': 'image/gif',\n 'tiff': 'image/tiff',\n 'svg': 'image/svg+xml'\n };\n }\n\n function parseExtension(url) {\n var match = /\\.([^\\.\\/]*?)$/g.exec(url);\n if (match) return match[1];\n else return '';\n }\n\n function mimeType(url) {\n var extension = parseExtension(url).toLowerCase();\n return mimes()[extension] || '';\n }\n\n function isDataUrl(url) {\n return url.search(/^(data:)/) !== -1;\n }\n\n function toBlob(canvas) {\n return new Promise(function (resolve) {\n var binaryString = window.atob(canvas.toDataURL().split(',')[1]);\n var length = binaryString.length;\n var binaryArray = new Uint8Array(length);\n\n for (var i = 0; i < length; i++)\n binaryArray[i] = binaryString.charCodeAt(i);\n\n resolve(new Blob([binaryArray], {\n type: 'image/png'\n }));\n });\n }\n\n function canvasToBlob(canvas) {\n if (canvas.toBlob)\n return new Promise(function (resolve) {\n canvas.toBlob(resolve);\n });\n\n return toBlob(canvas);\n }\n\n function resolveUrl(url, baseUrl) {\n var doc = document.implementation.createHTMLDocument();\n var base = doc.createElement('base');\n doc.head.appendChild(base);\n var a = doc.createElement('a');\n doc.body.appendChild(a);\n base.href = baseUrl;\n a.href = url;\n return a.href;\n }\n\n function uid() {\n var index = 0;\n\n return function () {\n return 'u' + fourRandomChars() + index++;\n\n function fourRandomChars() {\n /* see http://stackoverflow.com/a/6248722/2519373 */\n return ('0000' + (Math.random() * Math.pow(36, 4) << 0).toString(36)).slice(-4);\n }\n };\n }\n\n function makeImage(uri) {\n return new Promise(function (resolve, reject) {\n var image = new Image();\n image.onload = function () {\n resolve(image);\n };\n image.onerror = reject;\n image.src = uri;\n });\n }\n\n function getAndEncode(url) {\n var TIMEOUT = 30000;\n if(domtoimage.impl.options.cacheBust) {\n // Cache bypass so we dont have CORS issues with cached images\n // Source: https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest#Bypassing_the_cache\n url += ((/\\?/).test(url) ? \"&\" : \"?\") + (new Date()).getTime();\n }\n\n return new Promise(function (resolve) {\n var request = new XMLHttpRequest();\n\n request.onreadystatechange = done;\n request.ontimeout = timeout;\n request.responseType = 'blob';\n request.timeout = TIMEOUT;\n request.open('GET', url, true);\n request.send();\n\n var placeholder;\n if(domtoimage.impl.options.imagePlaceholder) {\n var split = domtoimage.impl.options.imagePlaceholder.split(/,/);\n if(split && split[1]) {\n placeholder = split[1];\n }\n }\n\n function done() {\n if (request.readyState !== 4) return;\n\n if (request.status !== 200) {\n if(placeholder) {\n resolve(placeholder);\n } else {\n fail('cannot fetch resource: ' + url + ', status: ' + request.status);\n }\n\n return;\n }\n\n var encoder = new FileReader();\n encoder.onloadend = function () {\n var content = encoder.result.split(/,/)[1];\n resolve(content);\n };\n encoder.readAsDataURL(request.response);\n }\n\n function timeout() {\n if(placeholder) {\n resolve(placeholder);\n } else {\n fail('timeout of ' + TIMEOUT + 'ms occured while fetching resource: ' + url);\n }\n }\n\n function fail(message) {\n console.error(message);\n resolve('');\n }\n });\n }\n\n function dataAsUrl(content, type) {\n return 'data:' + type + ';base64,' + content;\n }\n\n function escape(string) {\n return string.replace(/([.*+?^${}()|\\[\\]\\/\\\\])/g, '\\\\$1');\n }\n\n function delay(ms) {\n return function (arg) {\n return new Promise(function (resolve) {\n setTimeout(function () {\n resolve(arg);\n }, ms);\n });\n };\n }\n\n function asArray(arrayLike) {\n var array = [];\n var length = arrayLike.length;\n for (var i = 0; i < length; i++) array.push(arrayLike[i]);\n return array;\n }\n\n function escapeXhtml(string) {\n return string.replace(/#/g, '%23').replace(/\\n/g, '%0A');\n }\n\n function width(node) {\n var leftBorder = px(node, 'border-left-width');\n var rightBorder = px(node, 'border-right-width');\n return node.scrollWidth + leftBorder + rightBorder;\n }\n\n function height(node) {\n var topBorder = px(node, 'border-top-width');\n var bottomBorder = px(node, 'border-bottom-width');\n return node.scrollHeight + topBorder + bottomBorder;\n }\n\n function px(node, styleProperty) {\n var value = window.getComputedStyle(node).getPropertyValue(styleProperty);\n return parseFloat(value.replace('px', ''));\n }\n }\n\n function newInliner() {\n var URL_REGEX = /url\\(['\"]?([^'\"]+?)['\"]?\\)/g;\n\n return {\n inlineAll: inlineAll,\n shouldProcess: shouldProcess,\n impl: {\n readUrls: readUrls,\n inline: inline\n }\n };\n\n function shouldProcess(string) {\n return string.search(URL_REGEX) !== -1;\n }\n\n function readUrls(string) {\n var result = [];\n var match;\n while ((match = URL_REGEX.exec(string)) !== null) {\n result.push(match[1]);\n }\n return result.filter(function (url) {\n return !util.isDataUrl(url);\n });\n }\n\n function inline(string, url, baseUrl, get) {\n return Promise.resolve(url)\n .then(function (url) {\n return baseUrl ? util.resolveUrl(url, baseUrl) : url;\n })\n .then(get || util.getAndEncode)\n .then(function (data) {\n return util.dataAsUrl(data, util.mimeType(url));\n })\n .then(function (dataUrl) {\n return string.replace(urlAsRegex(url), '$1' + dataUrl + '$3');\n });\n\n function urlAsRegex(url) {\n return new RegExp('(url\\\\([\\'\"]?)(' + util.escape(url) + ')([\\'\"]?\\\\))', 'g');\n }\n }\n\n function inlineAll(string, baseUrl, get) {\n if (nothingToInline()) return Promise.resolve(string);\n\n return Promise.resolve(string)\n .then(readUrls)\n .then(function (urls) {\n var done = Promise.resolve(string);\n urls.forEach(function (url) {\n done = done.then(function (string) {\n return inline(string, url, baseUrl, get);\n });\n });\n return done;\n });\n\n function nothingToInline() {\n return !shouldProcess(string);\n }\n }\n }\n\n function newFontFaces() {\n return {\n resolveAll: resolveAll,\n impl: {\n readAll: readAll\n }\n };\n\n function resolveAll() {\n return readAll(document)\n .then(function (webFonts) {\n return Promise.all(\n webFonts.map(function (webFont) {\n return webFont.resolve();\n })\n );\n })\n .then(function (cssStrings) {\n return cssStrings.join('\\n');\n });\n }\n\n function readAll() {\n return Promise.resolve(util.asArray(document.styleSheets))\n .then(getCssRules)\n .then(selectWebFontRules)\n .then(function (rules) {\n return rules.map(newWebFont);\n });\n\n function selectWebFontRules(cssRules) {\n return cssRules\n .filter(function (rule) {\n return rule.type === CSSRule.FONT_FACE_RULE;\n })\n .filter(function (rule) {\n return inliner.shouldProcess(rule.style.getPropertyValue('src'));\n });\n }\n\n function getCssRules(styleSheets) {\n var cssRules = [];\n styleSheets.forEach(function (sheet) {\n try {\n util.asArray(sheet.cssRules || []).forEach(cssRules.push.bind(cssRules));\n } catch (e) {\n console.log('Error while reading CSS rules from ' + sheet.href, e.toString());\n }\n });\n return cssRules;\n }\n\n function newWebFont(webFontRule) {\n return {\n resolve: function resolve() {\n var baseUrl = (webFontRule.parentStyleSheet || {}).href;\n return inliner.inlineAll(webFontRule.cssText, baseUrl);\n },\n src: function () {\n return webFontRule.style.getPropertyValue('src');\n }\n };\n }\n }\n }\n\n function newImages() {\n return {\n inlineAll: inlineAll,\n impl: {\n newImage: newImage\n }\n };\n\n function newImage(element) {\n return {\n inline: inline\n };\n\n function inline(get) {\n if (util.isDataUrl(element.src)) return Promise.resolve();\n\n return Promise.resolve(element.src)\n .then(get || util.getAndEncode)\n .then(function (data) {\n return util.dataAsUrl(data, util.mimeType(element.src));\n })\n .then(function (dataUrl) {\n return new Promise(function (resolve, reject) {\n element.onload = resolve;\n element.onerror = reject;\n element.src = dataUrl;\n });\n });\n }\n }\n\n function inlineAll(node) {\n if (!(node instanceof Element)) return Promise.resolve(node);\n\n return inlineBackground(node)\n .then(function () {\n if (node instanceof HTMLImageElement)\n return newImage(node).inline();\n else\n return Promise.all(\n util.asArray(node.childNodes).map(function (child) {\n return inlineAll(child);\n })\n );\n });\n\n function inlineBackground(node) {\n var background = node.style.getPropertyValue('background');\n\n if (!background) return Promise.resolve(node);\n\n return inliner.inlineAll(background)\n .then(function (inlined) {\n node.style.setProperty(\n 'background',\n inlined,\n node.style.getPropertyPriority('background')\n );\n })\n .then(function () {\n return node;\n });\n }\n }\n }\n})(this);\n","(function(a,b){if(\"function\"==typeof define&&define.amd)define([],b);else if(\"undefined\"!=typeof exports)b();else{b(),a.FileSaver={exports:{}}.exports}})(this,function(){\"use strict\";function b(a,b){return\"undefined\"==typeof b?b={autoBom:!1}:\"object\"!=typeof b&&(console.warn(\"Deprecated: Expected third argument to be a object\"),b={autoBom:!b}),b.autoBom&&/^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(a.type)?new Blob([\"\\uFEFF\",a],{type:a.type}):a}function c(a,b,c){var d=new XMLHttpRequest;d.open(\"GET\",a),d.responseType=\"blob\",d.onload=function(){g(d.response,b,c)},d.onerror=function(){console.error(\"could not download file\")},d.send()}function d(a){var b=new XMLHttpRequest;b.open(\"HEAD\",a,!1);try{b.send()}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent(\"click\"))}catch(c){var b=document.createEvent(\"MouseEvents\");b.initMouseEvent(\"click\",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f=\"object\"==typeof window&&window.window===window?window:\"object\"==typeof self&&self.self===self?self:\"object\"==typeof global&&global.global===global?global:void 0,a=f.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=f.saveAs||(\"object\"!=typeof window||window!==f?function(){}:\"download\"in HTMLAnchorElement.prototype&&!a?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement(\"a\");g=g||b.name||\"download\",j.download=g,j.rel=\"noopener\",\"string\"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target=\"_blank\")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:\"msSaveOrOpenBlob\"in navigator?function(f,g,h){if(g=g||f.name||\"download\",\"string\"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement(\"a\");i.href=f,i.target=\"_blank\",setTimeout(function(){e(i)})}}:function(b,d,e,g){if(g=g||open(\"\",\"_blank\"),g&&(g.document.title=g.document.body.innerText=\"downloading...\"),\"string\"==typeof b)return c(b,d,e);var h=\"application/octet-stream\"===b.type,i=/constructor/i.test(f.HTMLElement)||f.safari,j=/CriOS\\/[\\d]+/.test(navigator.userAgent);if((j||h&&i||a)&&\"undefined\"!=typeof FileReader){var k=new FileReader;k.onloadend=function(){var a=k.result;a=j?a:a.replace(/^data:[^;]*;/,\"data:attachment/file;\"),g?g.location.href=a:location=a,g=null},k.readAsDataURL(b)}else{var l=f.URL||f.webkitURL,m=l.createObjectURL(b);g?g.location=m:location.href=m,g=null,setTimeout(function(){l.revokeObjectURL(m)},4E4)}});f.saveAs=g.saveAs=g,\"undefined\"!=typeof module&&(module.exports=g)});\n\n//# sourceMappingURL=FileSaver.min.js.map","export function AddProductToBasket(product) {\r\n\r\n var totalAmount = product.price * product.quantity;\r\n\r\n dataLayer = dataLayer.filter(x => !x.ecommerce); // Clear the previous ecommerce object.\r\n dataLayer.push({\r\n event: \"add_to_cart\",\r\n currency: product.currency,\r\n value: totalAmount,\r\n ecommerce: {\r\n items: [product]\r\n }\r\n });\r\n}\r\n\r\nexport function ViewProductDetail(product) {\r\n\r\n dataLayer = dataLayer.filter(x => !x.ecommerce); // Clear the previous ecommerce object.\r\n dataLayer.push({\r\n event: \"view_item\",\r\n currency: product.currency,\r\n value: parseFloat(product.price),\r\n ecommerce: {\r\n items: [product]\r\n }\r\n });\r\n}","import * as DataLayerProduct from '../modules/dataLayer/dataLayerProductPage';\r\nimport * as DataLayerProductListings from '../modules/dataLayer/dataLayerProductListings';\r\n\r\nexport default function ProductPopup() {\r\n RALFinishSelects()\r\n UpdatePopupPrice()\r\n AddToBasket()\r\n}\r\n\r\nfunction RALFinishSelects() {\r\n $(document).on(\"change\", \".select-box.ral-colour-finish\", function () {\r\n $(\".ral-colour-choice-wrapper\").toggleClass(\"hidden\", $(this).val() == \"None\");\r\n updatePrice();\r\n });\r\n}\r\n\r\nfunction UpdatePopupPrice() {\r\n $(document).on(\"change\", \".select-box.price-update, .select-box.select-qty, .select-box.product-ref\", updatePrice);\r\n}\r\n\r\nfunction updatePrice() {\r\n var optionIds = new Array();\r\n\r\n $(\".select-box.price-update\").each(function (i, elem) {\r\n optionIds[i] = $(elem).val();\r\n });\r\n\r\n if ($(\"[name='ProductReference']\").val()) {\r\n $.ajax({\r\n url: \"/umbraco/Surface/Product/GetProductPrice\",\r\n type: \"POST\",\r\n enctype: 'multipart/form-data',\r\n data: {\r\n productRef: $(\"[name='ProductReference']\").val(),\r\n optionIds: optionIds,\r\n hasRalFinish: $(\".select-box.ral-colour-finish\").val() != \"None\",\r\n qty: $(\".select-box.select-qty\").val()\r\n },\r\n dataType: \"json\",\r\n traditional: true,\r\n success: function (data) {\r\n $(\".subtotal-price\").html(data.price);\r\n }\r\n });\r\n }\r\n}\r\n\r\nupdatePrice()\r\n\r\nif ($(\".ral-colour-finish\").val() != \"None\") {\r\n $(\".ral-colour-choice-wrapper\").removeClass(\"hidden\");\r\n}\r\n\r\nfunction AddToBasket() {\r\n\r\n $(\".customise-buy-form button.clear\").on(\"click\", function (e) {\r\n $('.customise-buy-form select').prop('selectedIndex', 0).change().selectric('refresh');\r\n });\r\n\r\n $(\".customise-buy-form\").on(\"submit\", function (e) {\r\n e.preventDefault();\r\n\r\n var formData = $(this)[0];\r\n var formValues = [];\r\n var selectQty = 0;\r\n\r\n $(this).find(\"select\").each(function (index) {\r\n\r\n var name = $(this).attr(\"data-name\").split(\" \").join(\"_\").toLowerCase();\r\n\r\n if ($(this).val() != \"\" && $(this).is(\":visible\")) {\r\n\r\n if (name == \"quantity\") {\r\n selectQty = parseInt($(this).find(\"option:selected\").text());\r\n }\r\n else {\r\n formValues.push('\"item_' + name + '\":\"' + $(this).find(\"option:selected\").text() + '\"');\r\n }\r\n }\r\n\r\n });\r\n\r\n var formatUnitPrice = document.querySelector(\".subtotal-price\").innerHTML.replace(/[^0-9.]/g, '');\r\n var unitPrice = parseFloat(formatUnitPrice) / selectQty;\r\n\r\n var product = {\r\n item_id: document.querySelector(\".product-details\").dataset.sku,\r\n item_name: document.querySelector(\".product-details h1\").innerHTML,\r\n affiliation: \"Victoria + Albert Baths\",\r\n currency: document.querySelector(\".subtotal-price\").dataset.currency,\r\n index: 0,\r\n item_brand: document.querySelector(\".product-details h1\").innerHTML,\r\n item_category: document.querySelector(\".product-details\").dataset.category,\r\n price: parseFloat(unitPrice),\r\n quantity: selectQty\r\n }\r\n\r\n var formValuesToJson = JSON.parse(\"{\" + formValues.join(\",\") + \"}\");\r\n product = DataLayerProductListings.MergeObjects(product, formValuesToJson);\r\n\r\n $.ajax({\r\n url: $(this).prop('action'),\r\n type: \"POST\",\r\n processData: false,\r\n contentType: false,\r\n enctype: 'multipart/form-data',\r\n data: new FormData(formData),\r\n dataType: \"json\",\r\n success: function (data) {\r\n if (data.response == \"success\") {\r\n\r\n DataLayerProduct.AddProductToBasket(product);\r\n\r\n var $basketTrigger = $(\".site-header .header-icons .shopping-basket\");\r\n\r\n //Close popup\r\n $.magnificPopup.close();\r\n\r\n //Update and display header basket\r\n $basketTrigger.find(\".items\").html(data.orderQty);\r\n $basketTrigger.data(\"qty\", data.orderQty);\r\n $(\".site-header .basket-wrapper\").replaceWith(data.headerBasket);\r\n\r\n setTimeout(function () {\r\n $basketTrigger.click();\r\n }, 1500);\r\n }\r\n else {\r\n $(\".customise-buy-error\").html(data.errorMessage);\r\n\r\n console.log(data.exceptionMessage);\r\n }\r\n },\r\n error: function (xhr) {\r\n console.log(xhr);\r\n }\r\n });\r\n });\r\n}\r\n","export default function specificationDropdown() {\r\n init()\r\n}\r\n\r\nfunction init() {\r\n\r\n var dropdownBtns = document.getElementsByClassName(\"specification-dropdown-button\");\r\n\r\n if(dropdownBtns.length != 0) {\r\n for (var i = 0; i < dropdownBtns.length; i++) {\r\n dropdownBtns.item(i).onclick = function(e) { \r\n e.preventDefault()\r\n filterToggle(this) \r\n };\r\n }\r\n }\r\n\r\n function filterToggle(current) {\r\n \r\n var dropdown = current.getAttribute('data-toggle');\r\n document.getElementById(dropdown).classList.toggle('dropdown-listing');\r\n current.classList.toggle('dropdown-active');\r\n }\r\n}","export default function productCta() {\r\n init()\r\n}\r\n\r\nfunction init() {\r\n \r\n var productDetails = document.querySelector('.product-details-container').clientHeight;\r\n\r\n window.onresize = function() {\r\n productDetails = document.querySelector('.product-details-container').clientHeight;\r\n };\r\n\r\n var productCta = document.querySelector('.product-cta-container');\r\n\r\n if(productCta != null) {\r\n window.onscroll = function() {productCtaToggle()};\r\n }\r\n\r\n function productCtaToggle() {\r\n\r\n if (document.body.scrollTop > productDetails || document.documentElement.scrollTop > productDetails) {\r\n productCta.classList.add('product-cta-active');\r\n } else {\r\n productCta.classList.remove('product-cta-active');\r\n }\r\n }\r\n\r\n $(\".popular-cta-scroll\").on(\"click\", function () {\r\n if ($(\".colour-tool-container\").length != 0) {\r\n $('html, body').animate({\r\n scrollTop: $(\".colour-tool-container\").offset().top - 100\r\n }, 1000);\r\n }\r\n else {\r\n var lang = navigator.language || navigator.userLanguage;\r\n var currentLang = lang.toLowerCase();\r\n window.location.replace(\"//\" + location.hostname + '/' + currentLang + '/our-material/colour-finishes/');\r\n }\r\n });\r\n}\r\n","import domtoimage from 'dom-to-image';\r\nimport { saveAs } from 'file-saver';\r\n\r\nexport default function productColourTool() {\r\n init()\r\n}\r\n\r\nfunction updatePrice() {\r\n var optionIds = new Array();\r\n\r\n $(\".select-box.price-update\").each(function (i, elem) {\r\n optionIds[i] = $(elem).val();\r\n });\r\n\r\n if ($(\"[name='ProductReference']\").val()) {\r\n $.ajax({\r\n url: \"/umbraco/Surface/Product/GetProductPrice\",\r\n type: \"POST\",\r\n enctype: 'multipart/form-data',\r\n data: {\r\n productRef: $(\"[name='ProductReference']\").val(),\r\n optionIds: optionIds,\r\n hasRalFinish: $(\".select-box.ral-colour-finish\").val() != \"None\",\r\n qty: $(\".select-box.select-qty\").val()\r\n },\r\n dataType: \"json\",\r\n traditional: true,\r\n success: function (data) {\r\n $(\".subtotal-price\").html(data.price);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction init() {\r\n\r\n const b64toBlob = function (b64Data, contentType = '', sliceSize = 512) {\r\n const byteCharacters = atob(b64Data);\r\n const byteArrays = [];\r\n\r\n for (let offset = 0; offset < byteCharacters.length; offset += sliceSize) {\r\n const slice = byteCharacters.slice(offset, offset + sliceSize);\r\n\r\n const byteNumbers = new Array(slice.length);\r\n for (let i = 0; i < slice.length; i++) {\r\n byteNumbers[i] = slice.charCodeAt(i);\r\n }\r\n\r\n const byteArray = new Uint8Array(byteNumbers);\r\n byteArrays.push(byteArray);\r\n }\r\n\r\n const blob = new Blob(byteArrays, { type: contentType });\r\n\r\n return blob;\r\n };\r\n\r\n const container = document.getElementById(\"popup-image-container\");\r\n\r\n if (container != undefined) {\r\n const overlay = container.getElementsByTagName(\"path\")[0];\r\n if (overlay != undefined) {\r\n const colourCode = document.getElementById(\"colour-code\");\r\n\r\n document.getElementById(\"download-image\").addEventListener(\"click\", function () {\r\n\r\n domtoimage.toPng(document.getElementById('popup-image-container'), {\r\n quality: 1\r\n })\r\n .then(function (dataUrl) {\r\n\r\n const blob = b64toBlob(dataUrl.replace(\"data:image/png;base64,\", \"\"), \"image/png\");\r\n const blobUrl = URL.createObjectURL(blob);\r\n\r\n var link = document.createElement('a');\r\n link.download = document.getElementById(\"colour-code\").innerHTML.replace(\", \", \"-\") + \".png\";\r\n link.href = blobUrl;\r\n link.click();\r\n link.remove()\r\n\r\n });\r\n });\r\n\r\n function changeColor(picker, colour) {\r\n overlay.style.fill = picker;\r\n colourCode.innerHTML = colour;\r\n }\r\n\r\n const swatches = document.getElementsByClassName(\"colour-swatch\");\r\n\r\n if (swatches.length != 0) {\r\n for (var i = 0; i < swatches.length; i++) {\r\n swatches.item(i).onclick = function () {\r\n changeColor(this.getAttribute(\"data-hex\"), this.getAttribute(\"data-colour\"))\r\n };\r\n }\r\n }\r\n\r\n var popupcontainer = document.getElementById(\"popup-image-container\");\r\n\r\n if (popupcontainer.getAttribute(\"data-hex\").length > 0) {\r\n changeColor(popupcontainer.getAttribute(\"data-hex\"), popupcontainer.getAttribute(\"data-name\"))\r\n }\r\n }\r\n }\r\n\r\n var buyNowButton = document.querySelectorAll('.buy-now-button'),\r\n buyNowButtonWrapper = document.querySelector('.buy-now-button-dropdown');\r\n\r\n buyNowButton.forEach(element => {\r\n element.addEventListener(\"click\", function (e) {\r\n buyNowButtonWrapper.classList.toggle('open');\r\n });\r\n });\r\n\r\n document.querySelectorAll('.btn-auto-fill').forEach(item => {\r\n item.addEventListener('click', event => {\r\n var colourCode = document.getElementById(\"colour-code\");\r\n var colourCodeValue = colourCode.innerHTML;\r\n var colourText = colourCodeValue.split(',')[0].trim();\r\n \r\n if (item.classList.contains('matt-finish')) {\r\n $('.customise-buy-form .selectric-ral-colour-finish select').prop('selectedIndex', 2).change().selectric('refresh');\r\n }\r\n else {\r\n $('.customise-buy-form .selectric-ral-colour-finish select').prop('selectedIndex', 1).change().selectric('refresh');\r\n }\r\n\r\n $('.ral-colour-choice-wrapper').removeClass('hidden');\r\n\r\n updatePrice();\r\n\r\n //set the colour option\r\n if ($('.ral-colour-choice-wrapper select option:contains(' + colourText + ')')) {\r\n $('.selectric-price-update .selectric-items ul').find('li:contains(' + colourText + ')').trigger('click');\r\n }\r\n })\r\n });\r\n}\r\n","import specificationDropdown from '../modules/specificationDropdown'\r\nimport productCta from '../modules/productCta'\r\nimport productColourTool from '../modules/productColourTool'\r\nimport ProductPopup from '../modules/productPopup';\r\nimport * as DataLayerProduct from '../modules/dataLayer/dataLayerProductPage';\r\n\r\nspecificationDropdown();\r\nproductCta();\r\nproductColourTool();\r\nProductPopup();\r\n\r\nDataLayerProduct.ViewProductDetail({\r\n item_id: document.querySelector(\".product-details\").dataset.sku,\r\n item_name: document.querySelector(\".product-details h1\").innerHTML,\r\n affiliation: \"Victoria + Albert Baths\",\r\n currency: document.querySelector(\".product-details\").dataset.currency,\r\n index: 0,\r\n item_brand: document.querySelector(\".product-details h1\").innerHTML,\r\n item_category: document.querySelector(\".product-details\").dataset.category,\r\n price: parseFloat(document.querySelector(\".product-price\").dataset.price),\r\n quantity: 1\r\n});\r\n","\r\nexport function GetProducts(formFilters) {\r\n\r\n var products = document.querySelectorAll(\".product-listing\");\r\n\r\n if(products.length > 0) {\r\n\r\n var productList = [];\r\n\r\n products.forEach(function callback(product, index) {\r\n\r\n var item = {\r\n item_id: product.dataset.sku,\r\n item_name: product.dataset.name,\r\n affiliation: \"Victoria + Albert Baths\",\r\n currency: product.dataset.currency,\r\n index: index,\r\n item_brand: product.dataset.name,\r\n item_category: product.dataset.category,\r\n price: parseFloat(product.dataset.price),\r\n quantity: 1\r\n };\r\n\r\n if(formFilters != null && formFilters != undefined) {\r\n item = MergeObjects(item, formFilters);\r\n }\r\n\r\n productList.push(item);\r\n });\r\n\r\n dataLayer = dataLayer.filter(x => !x.ecommerce); // Clear the previous ecommerce object.\r\n dataLayer.push({\r\n event: \"view_item_list\",\r\n ecommerce: {\r\n items: productList\r\n }\r\n });\r\n }\r\n}\r\n\r\n//export function OnProductClick(product) {\r\n\r\n// var item = {\r\n// item_name: product.dataset.name,\r\n// item_id: product.dataset.sku,\r\n// item_price: product.dataset.price,\r\n// item_category: product.dataset.category,\r\n// index: product.dataset.index,\r\n// item_page: GetCurrentPage(),\r\n// };\r\n \r\n// dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object.\r\n// dataLayer.push({\r\n// event: \"select_item\",\r\n// ecommerce: {\r\n// items: [item]\r\n// }\r\n// });\r\n//}\r\n\r\nexport function MergeObjects(obj1,obj2){\r\n var obj3 = {};\r\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\r\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\r\n return obj3;\r\n}\r\n\r\nfunction GetCurrentPage() {\r\n if(document.querySelector(\".pag-number.active\") != null) {\r\n return parseInt(document.querySelector(\".pag-number.active\").innerHTML);\r\n }\r\n \r\n return 1;\r\n}\r\n\r\nexport function ElementsToString(elements) {\r\n \r\n var array = [];\r\n\r\n for (let index = 0; index < elements.length; index++) {\r\n array.push(elements[index].innerText);\r\n }\r\n\r\n return array.toString();\r\n}\r\n "],"sourceRoot":""}