{"version":3,"file":"js/app.js","sources":["webpack:///webpack/bootstrap","webpack:///./int_QASc/cartridge/js/qas.js","webpack:///./int_elavon/cartridge/js/lightbox.js","webpack:///./int_tealium/cartridge/js/tealium.js","webpack:///./node_modules/ev-emitter/ev-emitter.js","webpack:///(webpack)/buildin/global.js","webpack:///(webpack)/buildin/module.js","webpack:///./org_colony/cartridge/js/ajax.js","webpack:///./org_colony/cartridge/js/app.js","webpack:///./org_colony/cartridge/js/captcha.js","webpack:///./org_colony/cartridge/js/cookieprivacy.js","webpack:///./org_colony/cartridge/js/countries.js","webpack:///./org_colony/cartridge/js/jquery-ext.js","webpack:///./org_colony/cartridge/js/minicart.js","webpack:///./org_colony/cartridge/js/page.js","webpack:///./org_colony/cartridge/js/pages/product/productUtil.js","webpack:///./org_colony/cartridge/js/pages/styleguide.js","webpack:///./org_colony/cartridge/js/progress.js","webpack:///./org_colony/cartridge/js/rating.js","webpack:///./org_colony/cartridge/js/searchplaceholder.js","webpack:///./org_colony/cartridge/js/searchsuggest.js","webpack:///./org_colony/cartridge/js/tls.js","webpack:///./org_colony/cartridge/js/tooltip.js","webpack:///./org_colony/cartridge/js/validator.js"],"sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"js/app\": 0,\n \t\t\"js/ajax\": 0,\n \t\t\"js/bonus-products-view\": 0,\n \t\t\"js/captcha\": 0,\n \t\t\"js/cookieprivacy\": 0,\n \t\t\"js/countries\": 0,\n \t\t\"js/dialog\": 0,\n \t\t\"js/jquery-ext\": 0,\n \t\t\"js/minicart\": 0,\n \t\t\"js/modules\": 0,\n \t\t\"js/page\": 0,\n \t\t\"js/progress\": 0,\n \t\t\"js/rating\": 0,\n \t\t\"js/searchplaceholder\": 0,\n \t\t\"js/searchsuggest\": 0,\n \t\t\"js/tls\": 0,\n \t\t\"js/tooltip\": 0,\n \t\t\"js/validator\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"\" + ({\"js/splits/error\":\"js/splits/error\",\"js/splits/storefront\":\"js/splits/storefront\",\"js/vendors/lodash.includes\":\"js/vendors/lodash.includes\",\"js/vendors/lodash.debounce\":\"js/vendors/lodash.debounce\",\"js/splits/checkout\":\"js/splits/checkout\",\"js/splits/downpayment\":\"js/splits/downpayment\",\"js/vendors/promise\":\"js/vendors/promise\",\"js/vendors/asap\":\"js/vendors/asap\",\"js/vendors/lodash.map\":\"js/vendors/lodash.map\",\"js/chunks/addToCart\":\"js/chunks/addToCart\",\"js/chunks/account\":\"js/chunks/account\",\"js/splits/account\":\"js/splits/account\",\"js/splits/wishlist\":\"js/splits/wishlist\",\"js/vendors/qs\":\"js/vendors/qs\",\"js/vendors/url\":\"js/vendors/url\",\"js/vendors/object-inspect\":\"js/vendors/object-inspect\",\"js/vendors/lodash.assignin\":\"js/vendors/lodash.assignin\",\"js/vendors/node-libs-browser\":\"js/vendors/node-libs-browser\",\"js/vendors/get-intrinsic\":\"js/vendors/get-intrinsic\",\"js/vendors/querystring-es3\":\"js/vendors/querystring-es3\",\"js/vendors/side-channel\":\"js/vendors/side-channel\",\"js/chunks/image\":\"js/chunks/image\",\"js/splits/cart\":\"js/splits/cart\",\"js/splits/compare\":\"js/splits/compare\",\"js/splits/product\":\"js/splits/product\",\"js/splits/registry\":\"js/splits/registry\",\"js/splits/search\":\"js/splits/search\"}[chunkId]||chunkId) + \".js\"\n \t}\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 \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\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 \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([\"./org_colony/cartridge/js/app.js\",\"js/vendors/lodash.foreach\",\"js/vendors/lodash.isstring\",\"js/vendors/lodash.merge\",\"js/vendors/imagesloaded\",\"js/vendors/picturefill\",\"js/chunks/util\",\"js/chunks/dialog\",\"js/chunks/bonus-products-view\",\"js/chunks/modules\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","'use strict';\nvar util = require('org/util');\nvar page = require('org/page');\nvar validator = require('org/validator');\nvar cache = {};\nvar marker = false;\n\nfunction initCache () {\n    var currentForm = '',\n        saveButton = '',\n        source = '',\n        refresh = false,\n        url = Urls.qasVerifyAddress,\n        secondSaveButton = '';\n\n    if ($('[name=\"dwfrm_multishipping_editAddress_save\"]').length > 0) {\n        currentForm = $('#EditAddressForm');\n        source = 'dwfrm_multishipping_editAddress_addressFields';\n        saveButton = 'dwfrm_multishipping_editAddress_save';\n    } else if ($('form.checkout-billing.address').length > 0) {\n        currentForm = $('form.checkout-billing.address');\n        source = 'dwfrm_billing_billingAddress_addressFields';\n        saveButton = $('[name=\"dwfrm_billing_createAccount\"]').length > 0 ? 'dwfrm_billing_createAccount' : 'dwfrm_billing_addAddress';\n        secondSaveButton = 'dwfrm_billingaddress_apply';\n    } else if ($('#EditAddressForm').length > 0) {\n        currentForm = $('#EditAddressForm');\n        source = 'dwfrm_shippingaddress';\n        saveButton = 'dwfrm_shippingaddress_apply';\n    } else if ($('#edit-address-form').length > 0) {\n        currentForm = $('#edit-address-form');\n        source = 'dwfrm_profile_address';\n        saveButton = currentForm.find('.apply-button').attr('name');\n        refresh = true;\n    } else if ($('#CatalogRequestForm').length > 0) {\n        currentForm = $('#CatalogRequestForm');\n        source = 'dwfrm_catalogrequest_addressFields';\n        saveButton = 'dwfrm_catalogrequest_send';\n    } else if ($('.checkout-shipping.address').length > 0) {\n        currentForm = $('.checkout-shipping.address');\n        source = 'dwfrm_singleshipping_shippingAddress_addressFields';\n        saveButton = 'dwfrm_singleshipping_shippingAddress_save';\n    } else if ($('form#RegistrationForm').length > 0) {\n        currentForm = $('form#RegistrationForm');\n        source = 'dwfrm_profile_address';\n        saveButton = 'dwfrm_profile_confirm';\n    }\n\n    cache = {\n        dialog: require('org/dialog'),\n        $form: currentForm, //change to - check the form\n        $source: source,\n        $save: saveButton,\n        $save2: secondSaveButton,\n        $url: url,\n        refresh : refresh\n    }\n}\n\nfunction initEvents () {\n    if (cache.$form.length > 0) {\n        cache.$form.on('click', 'button[name=\"' + cache.$save + '\"]', qas.eventHandlers.validate);\n        if (cache.$save2.length > 0) {\n            cache.$form.on('click', 'button[name=\"' + cache.$save2 + '\"]', qas.eventHandlers.validate);\n        }\n    }\n}\n\nfunction applyEditAddress ($form) {\n    if (!$form.valid()) {\n        return false;\n    }\n\n    $.ajax({\n        url: util.appendParamToURL($form.attr('action'), 'format', 'ajax'),\n        data: $form.serialize() + '&' + $form.find('.apply-button').attr('name') + '=x',\n        type: 'POST'\n    }).done(function () {\n        page.refresh();\n    });\n}\n\nfunction cacheFormSubmit () {\n    if (cache.$source == 'dwfrm_profile_address' && cache.refresh) {\n        applyEditAddress(cache.$form);\n        return;\n    }\n\n    if (cache.$source == 'dwfrm_shippingaddress') {\n        cache.$form.trigger('submit').trigger('submit');\n        setTimeout(function () {\n            initCache();\n        }, 100);\n        return;\n    }\n\n    if (cache.$save == 'dwfrm_billing_save' && !marker) {\n        validation(cache.$form.serialize() + '&source=' + cache.$source, Urls.qasVerifyEmail);\n        return false;\n    }\n\n    cache.$form.append('<input type=\"hidden\" name=\"' + cache.$save + '\"/>');\n    cache.$form.submit();\n}\n\nfunction formAddrUpdate (addr) {\n    var state = addr.state || '';\n    cache.$form.find('input[name$=\"_address1\"]').val(addr.add1);\n    cache.$form.find('input[name$=\"_address2\"]').val(addr.add2);\n    cache.$form.find('select[id$=\"_state\"]').val(state.toUpperCase());\n    cache.$form.find('input[name$=\"_city\"]').val(addr.city);\n    cache.$form.find('input[name$=\"_postal\"]').val(addr.zip);\n}\n\nfunction validation (data, url) {\n    $.ajax({\n        type: 'POST',\n        url: url,\n        data: data,\n        dataType: 'html'\n    }).done(function (content, textStatus, request) {\n        var response = request.getResponseHeader('Content-Type');\n        if (/json/.test(response)) {\n            response = jQuery.parseJSON(content);\n            if (response.action === 'addrVerified') {\n                formAddrUpdate(response.address);\n                cacheFormSubmit();\n            }\n            if (response.action === 'verified') {\n                if (cache.$save == 'dwfrm_billing_save' && url == Urls.qasVerifyEmail) {\n                    marker = true;\n                }\n                cacheFormSubmit();\n            }\n        } else {\n            cache.dialog.create({\n                target: $('#ModalViewDialog'),\n                options: {\n                    width: '768',\n                    height: 'auto',\n                    dialogClass: 'qas-dialog',\n                    open: function() {\n                        $('.addForm').on('click', 'button', qas.eventHandlers.submitAddr);\n                        $('.qas_email_phone_form').on('click', 'button', qas.eventHandlers.submitEmail);\n                        $('.newAddressText').on('click', function (e) {\n                            e.preventDefault();\n                            $('.newAddress').slideToggle('slow');\n                            $('.oldAddress').slideToggle('slow');\n                        });\n                        $('.showHide').on('click', function (e) {\n                            e.preventDefault();\n                            $('.picklist').slideToggle('slow');\n                        });\n                        validator.init();\n                    }\n                }\n            });\n            cache.dialog.openWithContent({\n                content: content\n            });\n        }\n    });\n}\n\nvar qas = {\n\n    init: function () {\n        initCache();\n        initEvents();\n        if (!this.exists()) {\n            this.$container = $('<div/>').attr('id', 'ModalViewDialog').appendTo(document.body);\n        }\n    },\n\n    eventHandlers: {\n\n        submitAddr: function (e) {\n            var form = $(this).parents('form');\n            if (!form.valid()) {\n                e.preventDefault();\n                return;\n            }\n            form.append('<input type=\"hidden\" name=\"' + $(this).attr('name') + '\"/>');\n            var data = form.serialize();\n            $.ajax({\n                type: 'POST',\n                url: Urls.qasUpdateAddress,\n                data: data,\n                dataType: 'html'\n            }).done(function (response) {\n                response = jQuery.parseJSON(response);\n                if (response.action == 'reValidate') {\n                    cache.dialog.close();\n                    qas.eventHandlers.validate('reValidate');\n                } else {\n                    if (response.action != 'useOrig') {\n                        formAddrUpdate(response.address);\n                    }\n                    cacheFormSubmit();\n                }\n            });\n            cache.dialog.close();\n            return false;\n        },\n\n        submitEmail: function () {\n            var form = $(this).parents('form');\n            var email = form.find('input[name=\"Email\"]').val();\n            var useOrig = form.find('input[name=\"Override\"]').val();\n            if (useOrig != 'true') {\n                cache.$form.find('input[name$=\"_email\"]').val(email);\n                cache.$form.find('input[name$=\"_emailconfirm\"]').val(email);\n                if (cache.$save == 'dwfrm_billing_save'){\n                    cache.$form.find('input[name$=\"_emailAddress\"]').val(email);\n                }\n            } else {\n                email = cache.$form.find('input[name$=\"_email\"]').val();\n                cache.$form.find('input[name$=\"_emailconfirm\"]').val(email);\n            }\n            if (cache.$save == 'dwfrm_billing_save') {\n                marker = true;\n            }\n            cacheFormSubmit();\n            cache.dialog.close();\n            return false;\n        },\n\n        validate: function (action) {\n            /*\n             * On the billing page for registered customers, the customer could click 'Continue' or 'Apply',\n             * and the expected outcome is slightly different.  Make sure that the correct button name is\n             * passed here based on the customer's actions.\n             */\n            if (typeof action !== 'string') {\n                let $tmp = $(action.currentTarget);\n                if ($tmp.length > 0 && $tmp.attr('name').length > 0) {\n                    cache.$save = $tmp.attr('name');\n                    if (cache.$save === 'dwfrm_billingaddress_apply') {\n                        cache.$form = $('#EditAddressForm');\n                    }\n                }\n            }\n\n            if (cache.$form.validate().form()) {\n                var data = cache.$form.serialize() + '&source=' + cache.$source;\n                if (typeof action === 'string') {\n                    data += '&dwfrm_addForm_action=' + action;\n                }\n                validation(data, cache.$url);\n                return false;\n            }\n        }\n    },\n\n    show: function () {\n        if (!this.exists()) {\n            this.init();\n        }\n    },\n\n    exists: function () {\n        return this.$container && (this.$container.length > 0);\n    }\n};\n\nmodule.exports = qas;\n","const AVS_CODES = ['M', 'X', 'Y', 'Z', '', null];\nconst ERROR_CODES = ['5000', '5001', '5021', '5022', '5100'];\nconst TRY_AGAIN = Resources.LIGHTBOX_TRYAGAIN + '<br /><br />' + Resources.LIGHTBOX_CONTACTYOURPROVIDER;\nconst LIGHTBOX_ERROR = Resources.LIGHTBOX_ERROR.replace('PHONE#', SitePreferences.CUSTOMER_SERVICE_PHONE);\n\nlet brandPrimary = null;\nlet dpCardAdded = false;\n\nfunction updateStatus (msg) {\n    $('.lightbox-status').html(msg);\n}\n\nfunction openLightbox (tokenUrl, callbacks, postData) {\n    if (!postData) {\n        postData = null;\n    }\n\n    $.ajax({\n        type: 'POST',\n        data: postData,\n        async: false,\n        url: tokenUrl,\n        success: function (data) {\n          \n            if (data && data.location) {\n                window.location.href = data.location;\n            } else if (data && data.sessionToken) {\n                const sessionTokens = data.sessionToken;\n\n                transationToken = data.sessionToken;\n\n                const paymentFields = {\n                    ssl_txn_auth_token: sessionTokens,\n                };\n\n                if (typeof callbacks !== \"object\" || callbacks === null) {\n                    callbacks = {};\n                }\n\n                if (typeof callbacks.afterAll !== \"function\") {\n                    callbacks.afterAll = function () {};\n                }\n\n                const options = {};\n                if (brandPrimary) {\n                    options.cssOverride = `.md-button.md-raised {background-color: ${brandPrimary} !important; color: white !important;}`;\n                }\n\n                PayWithConverge.open(\n                    paymentFields,\n                    {\n                        onError: function (error) {\n                            if (typeof callbacks.beforeOnError === \"function\") {\n                                const proceed = callbacks.beforeOnError(error);\n                                if (proceed === false) {\n                                    callbacks.afterAll(null, false);\n                                    return;\n                                }\n                            }\n\n                            updateStatus(LIGHTBOX_ERROR);\n\n                            if (typeof callbacks.afterOnError === \"function\") {\n                                callbacks.afterOnError(error);\n                            }\n\n                            if (typeof callbacks.afterAll === \"function\") {\n                                callbacks.afterAll(null, false);\n                            }\n                        },\n\n                        onCancelled: function () {\n                            if (\n                                typeof callbacks.beforeOnCancelled ===\n                                \"function\"\n                            ) {\n                                const proceed = callbacks.beforeOnCancelled();\n                                if (proceed === false) {\n                                    callbacks.afterAll(null, false);\n                                    return;\n                                }\n                            }\n\n                            if (\n                                typeof callbacks.afterOnCancelled === \"function\"\n                            ) {\n                                callbacks.afterOnCancelled();\n                            }\n\n                            if (typeof callbacks.afterAll === \"function\") {\n                                callbacks.afterAll(null, false);\n                            }\n                        },\n\n                        onDeclined: function (response) {\n                            if (\n                                typeof callbacks.beforeOnDeclined === \"function\"\n                            ) {\n                                const proceed =\n                                    callbacks.beforeOnDeclined(response);\n                                if (proceed === false) {\n                                    callbacks.afterAll(response, false);\n                                    return;\n                                }\n                            }\n\n                            updateStatus(TRY_AGAIN);\n\n                            if (\n                                typeof callbacks.afterOnDeclined === \"function\"\n                            ) {\n                                callbacks.afterOnDeclined(response);\n                            }\n\n                            if (typeof callbacks.afterAll === \"function\") {\n                                callbacks.afterAll(response, false);\n                            }\n                        },\n\n                        onApproval: function (response) {\n                            if (\n                                typeof callbacks.beforeOnApproval === \"function\"\n                            ) {\n                                const proceed =\n                                    callbacks.beforeOnApproval(response);\n                                if (proceed === false) {\n                                    callbacks.afterAll(response, false);\n                                    return;\n                                }\n                            }\n\n                            let success = false;\n                            if (\n                                typeof response === \"object\" &&\n                                response !== null\n                            ) {\n                                //If the AVS code is not M, X, Y or space - or the Error Codes 5000, 5001, 5021, 5022, 5100\n                                const avsCode =\n                                    typeof response.ssl_avs_response ===\n                                    \"string\"\n                                        ? response.ssl_avs_response\n                                              .trim()\n                                              .toUpperCase()\n                                        : null;\n                                const errorCode =\n                                    typeof response.errorCode !== \"undefined\"\n                                        ? String(response.errorCode).trim()\n                                        : null;\n                                if (\n                                    AVS_CODES.indexOf(avsCode) === -1 ||\n                                    ERROR_CODES.indexOf(errorCode) > -1\n                                ) {\n                                    updateStatus(TRY_AGAIN);\n                                } else {\n                                    updateStatus(\"\");\n                                    success = true;\n                                }\n                            }\n\n                            if (\n                                typeof callbacks.afterOnApproval === \"function\"\n                            ) {\n                                callbacks.afterOnApproval(response, success);\n                            }\n\n                            if (typeof callbacks.afterAll === \"function\") {\n                                callbacks.afterAll(response, success);\n                            }\n                        },\n                    },\n                    options\n                );\n            } else if (data && data.location) {\n                window.location.href = data.location;\n            } else {\n                updateStatus(LIGHTBOX_ERROR);\n            }\n        },\n        error: function(error) {\n            console.log('errors', error);\n        }\n    });\n}\n\nfunction enablePaymentSubmit () {\n    const $btnSubmit = $('button[name=\"dwfrm_accountpayment_submitPayment\"]');\n    if ($('input[name$=\"_accountpayment_paymentMethods_selectedPaymentMethodID\"]:checked').val() === 'CREDIT_CARD') {\n        const $creditCardList = $('input[name$=\"_accountpayment_paymentMethods_creditCardList\"]');\n\n        if ($creditCardList.length === 0 || !$creditCardList.val()) {\n            $btnSubmit.attr('disabled', 'disabled');\n        } else {\n            $btnSubmit.removeAttr('disabled');\n        }\n    } else {\n        $btnSubmit.removeAttr('disabled');\n    }\n}\n\nfunction handleAutopayListUpdate (data) {\n    if (typeof data !== 'string' || data.length === 0) {\n        return;\n    }\n\n    data = data.split('~autopayform~');\n    if (data.length !== 2) {\n        return;\n    }\n    $('.payment-row:not(.autopay-payment-row) [data-method=\"CREDIT_CARD\"]').html(data[0]);\n    $('.autopay-payment-row [data-method=\"CREDIT_CARD\"]').html(data[1]);\n}\n\nfunction initializeEvents () {\n    $('.payment-method.credit-card').on('click', '.lightbox-checkout', function (e) {\n        const $this = $(e.currentTarget);\n        $this.attr('disabled', 'disabled');\n        openLightbox(Urls.lightboxCheckout, {\n            afterOnApproval : function (response, success) {\n                if (success) {\n                    const postData = {\n                        lightboxResponse: JSON.stringify(response)\n                    };\n                    $.post(Urls.lightboxCheckoutAddCard, postData, function (data) {\n                        $('.billing-credit-card-list').html(data);\n                    });\n                }\n            },\n            afterAll : function () {\n                $this.removeAttr('disabled');\n            }\n        });\n        return false;\n    });\n\n    // Auto-payment form initial payment\n    $('.autopayment-wrapper').on('click', '.lightbox-account-payment', function (e) {\n        const $this = $(e.currentTarget);\n        $this.attr('disabled', 'disabled');\n        openLightbox(Urls.lightboxAccountPayment, {\n            afterOnApproval : function (response, success) {\n                if (success) {\n                    const postData = {\n                        lightboxResponse: JSON.stringify(response),\n                        autopay: 'Y'\n                    };\n                    $.post(Urls.lightboxAccountPaymentAdd, postData, function (data) {\n                        handleAutopayListUpdate(data);\n                    });\n                }\n            },\n            afterAll : function () {\n                $this.removeAttr('disabled');\n            }\n        });\n\n        return false;\n    });\n\n    // Auto-payment form card to enroll\n    $('.autopayment-wrapper').on('click', '.lightbox-account-auto-payment', function (e) {\n        const $this = $(e.currentTarget);\n        $this.attr('disabled', 'disabled');\n\n        openLightbox(Urls.lightboxAccountPayment, {\n            afterOnApproval : function (response, success) {\n                if (success) {\n                    var onlyAuto = $('.payment-row:not(.autopay-payment-row) [data-method=\"CREDIT_CARD\"]').length === 0;\n                    const postData = {\n                        lightboxResponse: JSON.stringify(response),\n                        autopay: onlyAuto ? 'only' : 'Y'\n                    };\n                    $.post(Urls.lightboxAccountPaymentAdd, postData, function (data) {\n                        handleAutopayListUpdate(data);\n                    });\n                }\n            },\n            afterAll : function () {\n                $this.removeAttr('disabled');\n            }\n        });\n\n        return false;\n    });\n\n    $('.make-payment').on('click', '.lightbox-account-payment', function (e) {\n        const $this = $(e.currentTarget);\n        $this.attr('disabled', 'disabled');\n\n        openLightbox(Urls.lightboxAccountPayment, {\n            afterOnApproval : function (response, success) {\n                if (success) {\n                    const postData = {\n                        lightboxResponse: JSON.stringify(response)\n                    };\n                    $.post(Urls.lightboxAccountPaymentAdd, postData, function (data) {\n                        $('[data-method=\"CREDIT_CARD\"]').html(data);\n                        enablePaymentSubmit();\n                    });\n                }\n            },\n            afterAll : function () {\n                $this.removeAttr('disabled');\n            }\n        });\n\n        return false;\n    });\n\n    $('.lightbox-manage-cards').on('click', function (e) {\n        const $this = $(e.currentTarget);\n        $this.attr('disabled', 'disabled');\n\n        openLightbox(Urls.lightboxAccountPayment, {\n            afterOnApproval : function (response, success) {\n                if (success) {\n                    const postData = {\n                        lightboxResponse: JSON.stringify(response)\n                    };\n                    $.post(Urls.lightboxAccountAddCard, postData, function (data) {\n                        if (String(data).trim().toLowerCase() !== 'success') {\n                            updateStatus(LIGHTBOX_ERROR);\n                            return;\n                        }\n                        location.reload();\n                    });\n                }\n            },\n            afterAll : function () {\n                $this.removeAttr('disabled');\n            }\n        });\n\n        return false;\n    });\n\n    $('.lightbox-downpayment').on('click', function (e) {\n        const $this = $(e.currentTarget);\n        $this.attr('disabled', 'disabled');\n\n        var postData = {\n            ssl_first_name : $('input[name=\"firstName\"]').val(),\n            ssl_last_name : $('input[name$=\"_lastName\"]').val(),\n            ssl_amount : $('input[name=\"paymentAmount\"]').val(),\n            ssl_orderNumber : $('input[id=\"orderNumber\"]').val()\n        };\n\n        openLightbox(Urls.lightboxDownPaymentAuth, {\n            afterOnApproval : function (response, success) {\n                if (success) {\n                    const postData = {\n                        lightboxResponse: JSON.stringify(response)\n                    };\n                    $.post(Urls.lightboxDownPayment, postData, function (data) {\n                        $('#downPaymentCreditCardList input:checked').prop('checked', false);\n                        if (dpCardAdded) {\n                            $('#downPaymentCreditCardList .form-row:last-child').remove();\n                        }\n                        $('#downPaymentCreditCardList').append(data);\n                        dpCardAdded = true;\n                        $('.downpayment-save-card').removeClass('hide');\n                        $('div.downpayment button:not(.lightbox-downpayment)').removeAttr(\"disabled\");\n                    });\n                }\n            },\n            afterAll : function () {\n                $this.removeAttr('disabled');\n            }\n        }, postData);\n\n        return false;\n    });\n\n    $('input[name$=\"_accountpayment_paymentMethods_selectedPaymentMethodID\"]').on('click', () => {\n        enablePaymentSubmit();\n    });\n\n    if ($('#downPaymentCreditCardList').length > 0) {\n        if ($('#downPaymentCreditCardList input').length === 0) {\n            $('div.downpayment button:not(.lightbox-downpayment)').attr('disabled', 'disabled');\n        }\n    }\n\n    enablePaymentSubmit();\n}\n\nexports.init = function init () {\n    initializeEvents();\n\n    // hack to get brand primary background color\n    const $lightboxStatus = $('.lightbox-status');\n    if ($lightboxStatus.length > 0) {\n        $lightboxStatus.append('<div class=\"brand-primary-bg hidden\"></div>')\n        const $brandPrimary = $lightboxStatus.find('.brand-primary-bg');\n        brandPrimary = $brandPrimary.css('background-color');\n        $brandPrimary.remove();\n    }\n};","'use strict';\n\n/* global utag, utag_data, $, exports */\n\nfunction addToCart(productObject, quantity) {\n    utag.link({\n        'tealium_event': 'cart_add',\n        'product_id': [productObject.id],\n        'product_name': [productObject.name],\n        'product_quantity': [quantity],\n        'product_price': [productObject.price],\n        'category_id': utag_data.category_id\n    });\n}\n\nvar events = {\n    product: function () {\n        $('#main').on('click', 'button.add-to-cart', function () {\n            if ($(this).attr('data-tealium')) {\n                addToCart($.parseJSON($(this).attr('data-tealium')), $(this).closest('form').find('#Quantity, [name=\"Quantity\"]').val());\n            }\n        });\n    }\n};\n\nexports.init = function (nameSpace) {\n    if (nameSpace && events[nameSpace]) {\n        events[nameSpace]();\n    }\n};\n","/**\n * EvEmitter v1.1.0\n * Lil' event emitter\n * MIT License\n */\n\n/* jshint unused: true, undef: true, strict: true */\n\n( function( global, factory ) {\n  // universal module definition\n  /* jshint strict: false */ /* globals define, module, window */\n  if ( typeof define == 'function' && define.amd ) {\n    // AMD - RequireJS\n    define( factory );\n  } else if ( typeof module == 'object' && module.exports ) {\n    // CommonJS - Browserify, Webpack\n    module.exports = factory();\n  } else {\n    // Browser globals\n    global.EvEmitter = factory();\n  }\n\n}( typeof window != 'undefined' ? window : this, function() {\n\n\"use strict\";\n\nfunction EvEmitter() {}\n\nvar proto = EvEmitter.prototype;\n\nproto.on = function( eventName, listener ) {\n  if ( !eventName || !listener ) {\n    return;\n  }\n  // set events hash\n  var events = this._events = this._events || {};\n  // set listeners array\n  var listeners = events[ eventName ] = events[ eventName ] || [];\n  // only add once\n  if ( listeners.indexOf( listener ) == -1 ) {\n    listeners.push( listener );\n  }\n\n  return this;\n};\n\nproto.once = function( eventName, listener ) {\n  if ( !eventName || !listener ) {\n    return;\n  }\n  // add event\n  this.on( eventName, listener );\n  // set once flag\n  // set onceEvents hash\n  var onceEvents = this._onceEvents = this._onceEvents || {};\n  // set onceListeners object\n  var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {};\n  // set flag\n  onceListeners[ listener ] = true;\n\n  return this;\n};\n\nproto.off = function( eventName, listener ) {\n  var listeners = this._events && this._events[ eventName ];\n  if ( !listeners || !listeners.length ) {\n    return;\n  }\n  var index = listeners.indexOf( listener );\n  if ( index != -1 ) {\n    listeners.splice( index, 1 );\n  }\n\n  return this;\n};\n\nproto.emitEvent = function( eventName, args ) {\n  var listeners = this._events && this._events[ eventName ];\n  if ( !listeners || !listeners.length ) {\n    return;\n  }\n  // copy over to avoid interference if .off() in listener\n  listeners = listeners.slice(0);\n  args = args || [];\n  // once stuff\n  var onceListeners = this._onceEvents && this._onceEvents[ eventName ];\n\n  for ( var i=0; i < listeners.length; i++ ) {\n    var listener = listeners[i]\n    var isOnce = onceListeners && onceListeners[ listener ];\n    if ( isOnce ) {\n      // remove listener\n      // remove before trigger to prevent recursion\n      this.off( eventName, listener );\n      // unset once flag\n      delete onceListeners[ listener ];\n    }\n    // trigger listener\n    listener.apply( this, args );\n  }\n\n  return this;\n};\n\nproto.allOff = function() {\n  delete this._events;\n  delete this._onceEvents;\n};\n\nreturn EvEmitter;\n\n}));\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","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","const progress = require('./progress');\nconst util = require('./util');\n\nconst currentRequests = [];\n\n/**\n * @function\n * @description Ajax request to get json response\n * @param {Boolean} async  Asynchronous or not\n * @param {String} url URI for the request\n * @param {Object} data Name/Value pair data request\n * @param {Function} callback  Callback function to be called\n */\nfunction getJson(options) {\n    const url = util.toAbsoluteUrl(options.url);\n    // return if no url exists or url matches a current request\n    if (!url || currentRequests[url]) {\n        return;\n    }\n\n    currentRequests[url] = true;\n\n    $.ajax({\n        url,\n        dataType: 'json',\n        async: (typeof options.async === 'undefined' || options.async === null) ? true : options.async,\n        data: options.data || {},\n    }).done((response) => {\n        if (options.callback) {\n            options.callback(response);\n        }\n    }).fail((xhr, textStatus) => {\n        if (textStatus === 'parsererror') {\n            window.alert(Resources.BAD_RESPONSE);\n        }\n        if (options.callback) {\n            options.callback(null);\n        }\n    }).always(() => {\n        if (currentRequests[url]) {\n            delete currentRequests[url];\n        }\n    });\n}\n\n/**\n * @function\n * @description ajax request to load html response in a given container\n * @param {String} url URI for the request\n * @param {Object} data Name/Value pair data request\n * @param {Function} callback  Callback function to be called\n * @param {Object} target Selector or element that will receive content\n */\nfunction load(options) {\n    const url = util.toAbsoluteUrl(options.url);\n    // return if no url exists or url matches a current request\n    if (!url || currentRequests[url]) {\n        return;\n    }\n\n    currentRequests[url] = true;\n\n    $.ajax({\n        dataType: 'html',\n        url: util.appendParamToURL(url, 'format', 'ajax'),\n        data: options.data,\n        xhrFields: {\n            withCredentials: true,\n        },\n    }).done((response) => {\n        if (options.target) {\n            $(options.target).empty().html(response);\n        }\n        if (options.callback) {\n            options.callback(response);\n        }\n    }).fail((xhr, textStatus) => {\n        if (textStatus === 'parsererror') {\n            window.alert(Resources.BAD_RESPONSE);\n        }\n        options.callback(null, textStatus);\n    }).always(() => {\n        progress.hide();\n        if (currentRequests[url]) {\n            delete currentRequests[url];\n        }\n    });\n}\n\nmodule.exports = {\n    getJson,\n    load,\n};\n","/**\n *    (c) 2009-2014 Demandware Inc.\n *    Subject to standard usage terms and conditions\n *    For all details and documentation:\n *    https://bitbucket.com/demandware/sitegenesis\n */\n\nconst qas = require('../../../int_QASc/cartridge/js/qas');\nconst tealium = require('../../../int_tealium/cartridge/js/tealium');\nconst lightbox = require('../../../int_elavon/cartridge/js/lightbox');\nconst countries = require('./countries');\nconst minicart = require('./minicart');\nconst modules = require('./modules');\nconst page = require('./page');\nconst rating = require('./rating');\nconst searchplaceholder = require('./searchplaceholder');\nconst tooltip = require('./tooltip');\nconst validator = require('./validator');\nconst tls = require('./tls');\nconst styleguide = require('./pages/styleguide');\nconst util = require('./util');\n\n// eslint-disable-next-line\n__webpack_public_path__ = Urls.staticPath;\n\nrequire('./jquery-ext')();\nrequire('./cookieprivacy')();\nrequire('./captcha')();\nrequire('picturefill');\n\nfunction mobileNavInit() {\n    $('.account-menu-select').on('click', () => {\n        $('.account-menu-select').toggleClass('open');\n        $('.account-menu').slideToggle();\n    });\n\n    util.smartResize(() => {\n        if (util.mediaBreakpointUp('md')) {\n            $('.account-menu').show();\n        } else {\n            $('.account-menu-select').removeClass('open');\n            $('.account-menu').hide();\n        }\n    });\n}\n\nfunction tabfocus(event) {\n    if (event.keyCode === 9 || event.which === 9) {\n        document.getElementById('skipToMain').focus();\n        document.removeEventListener('keydown', tabfocus);\n    }\n}\n\nconst app = {\n    init() {\n        if (document.cookie.length === 0) {\n            $('<div/>').addClass('browser-compatibility-alert').append($('<p/>').addClass('browser-error').html(Resources.COOKIES_DISABLED)).appendTo('#browser-check');\n        }\n\n        // add class to html for css targeting\n        $('html').addClass('js');\n\n        // Ensure tab order is enforced if user follows internal link (i.e. 'skip-nav' link)\n        $('.skip-nav').on('click', (e) => {\n            const targetId = $(e.currentTarget).attr('href');\n            if (!targetId) {\n                return;\n            }\n\n            const target = $(targetId);\n            if (target.length === 0) {\n                return;\n            }\n\n            if (!/^(?:a|select|input|button|textarea)$/i.test(target.prop('nodeName'))) {\n                target.attr('tabindex', '-1');\n            }\n\n            target.trigger('focus');\n        });\n\n        if (!SitePreferences.ENABLE_CONTEXT_MENU) {\n            $(document).on('contextmenu', 'img', (e) => {\n                e.preventDefault();\n                return false;\n            });\n        }\n\n        if (SitePreferences.LISTING_INFINITE_SCROLL) {\n            $('html').addClass('infinite-scroll');\n        }\n\n        // Make sure that the SVGs work properly in older browsers\n        svg4everybody();\n\n        // init specific global components\n        modules.init();\n        countries.init();\n        tooltip.init();\n        minicart.init();\n        validator.init();\n        qas.init();\n        rating.init();\n        searchplaceholder.init();\n        mobileNavInit();\n        styleguide.init();\n        document.addEventListener('keydown', tabfocus);\n\n        // execute page specific initializations\n        $.extend(page, window.pageContext);\n\n        if (page.ns === 'account') {\n            require.ensure([], (require) => {\n                require('./pages/account').init();\n            }, 'js/splits/account');\n        } else if (page.ns === 'cart') {\n            require.ensure([], (require) => {\n                require('./pages/cart').init();\n            }, 'js/splits/cart');\n        } else if (page.ns === 'checkout') {\n            require.ensure([], (require) => {\n                require('./pages/checkout').init();\n            }, 'js/splits/checkout');\n        } else if (page.ns === 'compare') {\n            require.ensure([], (require) => {\n                require('./pages/compare').init();\n            }, 'js/splits/compare');\n        } else if (page.ns === 'downpayment') {\n            require.ensure([], (require) => {\n                require('./pages/downpayment').init();\n            }, 'js/splits/downpayment');\n        } else if (page.ns === 'product') {\n            require.ensure([], (require) => {\n                require('./pages/product').init();\n            }, 'js/splits/product');\n        } else if (page.ns === 'registry') {\n            require.ensure([], (require) => {\n                require('./pages/registry').init();\n            }, 'js/splits/registry');\n        } else if (page.ns === 'search') {\n            require.ensure([], (require) => {\n                require('./pages/search').init();\n            }, 'js/splits/search');\n        } else if (page.ns === 'storefront') {\n            require.ensure([], (require) => {\n                require('./pages/storefront').init();\n            }, 'js/splits/storefront');\n        } else if (page.ns === 'wishlist') {\n            require.ensure([], (require) => {\n                require('./pages/wishlist').init();\n            }, 'js/splits/wishlist');\n        } else if (page.ns === 'error') {\n            require.ensure([], (require) => {\n                require('./pages/error').init();\n            }, 'js/splits/error');\n        }\n\n        // initialize Tealium analytics events\n        tealium.init(page.ns);\n\n        // Check TLS status if indicated by site preference\n        if (SitePreferences.CHECK_TLS === true) {\n            tls.getUserAgent();\n        }\n\n        lightbox.init();\n\n        // Addes uncached callout to cached product tiles\n        $('div.product-tile div.product-callout:empty').replaceWith(function getTileCallout() {\n            return $(this).closest('div.product-tile').next('div.product-callout');\n        }).promise().done(() => {\n            $('div.product-tile div.product-callout.hide').fadeIn();\n        });\n    },\n};\n\n// general extension functions\n(function overrideFormat() {\n    String.format = function format(...args) {\n        let [s] = args;\n        const len = args.length - 1;\n        for (let i = 0; i < len; i += 1) {\n            s = s.replace(new RegExp(`\\\\{${i}\\\\}`, 'gm'), args[i + 1]);\n        }\n        return s;\n    };\n}());\n\n// initialize app\n$(document).ready(() => {\n    app.init();\n});\n","const dialog = require('./dialog');\nconst util = require('./util');\n\nconst {SessionAttributes} = window;\n\n/**\n * @function captcha    Used to display/control the scrim containing the simulated captcha code\n * */\nmodule.exports = () => {\n    /**\n     * if the session.privacy.ratelimited element is present then show the notification\n     * NOTE: You will probably want to replace this with a call to an actual CAPTCHA system to replace the simple one here\n     */\n    if (SessionAttributes.SHOW_CAPTCHA) {\n        dialog.open({\n            url: Urls.loginUnsuccessful,\n            options: {\n                closeOnEscape: false,\n                dialogClass: 'no-close',\n                buttons: [{\n                    text: Resources.OK,\n                    click() {\n                        const url = util.appendParamsToUrl(Urls.rateLimiterReset, {format: 'ajax'});\n                        $.ajax({\n                            url,\n                        });\n                        $(this).dialog('close');\n                    },\n                }],\n            },\n        });\n    }\n};\n","const dialog = require('./dialog');\n\nfunction enableCookies() {\n    if (document.cookie.indexOf('dw=1') < 0) {\n        document.cookie = 'dw=1; path=/';\n    }\n    if (document.cookie.indexOf('dw_cookies_accepted') < 0) {\n        document.cookie = 'dw_cookies_accepted=1; path=/';\n    }\n}\n\n/**\n * @function cookiePrivacy    Used to display/control the scrim containing the cookie privacy code\n * */\nmodule.exports = function cookiePrivacy() {\n    /**\n     * If we have not accepted cookies AND we're not on the Privacy Policy page, then show the notification\n     * NOTE: You will probably want to adjust the Privacy Page test to match your site's specific privacy / cookie page\n     */\n    if (SitePreferences.COOKIE_HINT === true && document.cookie.indexOf('dw_cookies_accepted') < 0) {\n        // check for privacy policy page\n        if ($('.privacy-policy').length === 0) {\n            dialog.open({\n                url: Urls.cookieHint,\n                options: {\n                    closeOnEscape: false,\n                    dialogClass: 'no-close',\n                    buttons: [{\n                        text: Resources.I_AGREE,\n                        click() {\n                            $(this).dialog('close');\n                            enableCookies();\n                        },\n                    }],\n                },\n            });\n        }\n    } else {\n        // Otherwise, we don't need to show the asset, just enable the cookies\n        enableCookies();\n    }\n};\n","exports.init = function init() {\n    $('.country-selector .current-country').on('click', (event) => {\n        $('.country-selector .selector').toggleClass('active');\n        $(event.currentTarget).toggleClass('selector-active');\n    });\n    // set currency first before reload\n    $('.country-selector .selector .locale').on('click', (event) => {\n        event.preventDefault();\n        const url = event.currentTarget.href;\n        const currency = event.currentTarget.getAttribute('data-currency');\n        $.ajax({\n            dataType: 'json',\n            url: Urls.setSessionCurrency,\n            data: {\n                format: 'ajax',\n                currencyMnemonic: currency,\n            },\n        }).done((response) => {\n            if (!response.success) {\n                throw new Error('Unable to set currency');\n            }\n            window.location.href = url;\n        });\n    });\n};\n","// jQuery extensions\n\nmodule.exports = function jqueryExt() {\n    // params\n    // toggleClass - required\n    // triggerSelector - optional. the selector for the element that triggers the event handler. defaults to the child elements of the list.\n    // eventName - optional. defaults to 'click'\n    $.fn.toggledList = function toggledList(options) {\n        if (!options.toggleClass) { return this; }\n        const list = this;\n        return list.on(options.eventName || 'click', options.triggerSelector || list.children(), (e) => {\n            e.preventDefault();\n            const classTarget = options.triggerSelector ? $(e.currentTarget).parent() : $(e.currentTarget);\n            classTarget.toggleClass(options.toggleClass);\n            // execute callback if exists\n            if (options.callback) { options.callback(); }\n        });\n    };\n\n    $.fn.syncHeight = function syncHeight() {\n        const arr = $.makeArray(this);\n        arr.sort((a, b) => $(a).height() - $(b).height());\n        return this.height($(arr[arr.length - 1]).height());\n    };\n};\n","const util = require('./util');\nconst productUtil = require('./pages/product/productUtil');\nconst bonusProductsView = require('./bonus-products-view');\n\nconst timer = {\n    id: null,\n    clear() {\n        if (this.id) {\n            window.clearTimeout(this.id);\n            delete this.id;\n        }\n    },\n    start(duration, callback) {\n        this.id = setTimeout(callback, duration);\n    },\n};\n\nconst minicart = {\n    init() {\n        this.$el = $('#mini-cart');\n        this.$content = this.$el.find('.mini-cart-content');\n\n        // events\n        this.$el.find('.mini-cart-total').on('mouseenter', () => {\n            if (this.$content.not(':visible')) {\n                this.slide();\n                $('.mini-cart-link').attr('aria-expanded', 'true');\n            }\n        });\n\n        this.$content.on('mouseenter', () => {\n            timer.clear();\n        }).on('mouseleave', () => {\n            timer.clear();\n            timer.start(30, this.close.bind(this));\n            $('.mini-cart-link').attr('aria-expanded', 'false');\n        });\n    },\n    /**\n     * @function\n     * @description Shows the given content in the mini cart\n     * @param {String} A HTML string with the content which will be shown\n     */\n    show(html) {\n        this.$el.html(html);\n        this.init();\n        this.slide();\n        if ($('.mini-cart-content').hasClass('limit-error')) {\n            util.scrollBrowser(0, () => {\n                productUtil.showLimitErrorDialog();\n            });\n        } else {\n            util.scrollBrowser(0);\n        }\n        $('.mini-cart-link').focus();\n        this.setFocus();\n    },\n    /**\n     * @function\n     * @description Shows the given content in the add to cart dialog\n     * @param {String} A HTML string with the content which will be shown\n     */\n    showmodal(html) {\n        this.$el.html(html);\n        this.openModal();\n    },\n    /**\n     * @function\n     * @description Slides down and show the contents of the mini cart\n     */\n    slide() {\n        timer.clear();\n        // show the item\n        this.$content.slideDown('slow');\n        // after a time out automatically close it\n        timer.start(6000, this.close.bind(this));\n        $('.mini-cart-link').attr('aria-expanded', 'true');\n    },\n    /**\n     * @function\n     * @description Closes the mini cart with given delay\n     * @param {Number} delay The delay in milliseconds\n     */\n    close(delay) {\n        timer.clear();\n        this.$content.slideUp(delay);\n        $('.mini-cart-link').attr('aria-expanded', 'false');\n    },\n    /**\n     * @function\n     * @description Sets up the focus events for the mini cart\n     */\n    setFocus() {\n        /**\n         * @listener\n         * @description Set the aria-expanded value to true, show the mini cart and focus on the mini cart header when the mini cart icon is focused or moused over\n         */\n        $('.mini-cart-link').on('focus mouseenter', (e) => {\n            $(e.currentTarget).attr('aria-expanded', 'true');\n\n            if (!$(e.currentTarget).parent().next('.mini-cart-content').is(':visible')) {\n                $(e.currentTarget).parent().next('.mini-cart-content').show();\n            }\n\n            $('.mini-cart-header').focus();\n        });\n\n        /**\n         * @listener\n         * @description Set the aria-expanded value to false when the mini cart is hidden\n         */\n        $('.mini-cart-link-checkout').on('blur', () => {\n            $('.mini-cart-content').hide();\n            $('.mini-cart-link').attr('aria-expanded', 'false');\n        });\n\n        /**\n         * @listener\n         * @description Allow the user to exit out of the mini cart via keyboard via the escape key\n         */\n        $('.mini-cart-link').on('keyup', (e) => {\n            if (e.keyCode === 27) {\n                $(e.currentTarget).attr('aria-expanded', 'false');\n                $(e.currentTarget).parent().next('.mini-cart-content').hide();\n            }\n        });\n    },\n    /**\n     * @function\n     * @description Open Add to Cart Modal\n     */\n    openModal() {\n        const atcModal = $('.mini-cart-content-modal');\n        atcModal.dialog({\n            width: 820,\n            autoOpen: false,\n            modal: true,\n            dialogClass: 'add-to-cart-dialog',\n            open() {\n                // move the title html into the dialog titlebar element; can't pass in as string\n                $('.ui-dialog-title').html($('.add-to-cart-dialog-title').html());\n                $('.add-to-cart-dialog-title').remove();\n                $('.ui-widget-overlay').addClass('atc-overlay');\n                $(document).on('click', '.atc-overlay', () => {\n                    try {\n                        $('.ui-dialog-content').dialog().dialog('close');\n                    } catch (e) {\n                        // Ignore exceptions thrown if the customer rapidly clicks the overlay\n                    }\n                });\n            },\n            close() {\n                // remove dialog from DOM\n                atcModal.dialog('destroy').remove();\n            },\n            position: {\n                my: 'center top',\n                at: 'center top+3',\n                of: window,\n                collision: 'flipfit',\n            },\n        });\n\n        atcModal.dialog('open');\n        atcModal.find('.close-modal').on('click', () => {\n            $('.ui-dialog-content').dialog().dialog('close');\n        });\n        atcModal.find('.select-bonus').on('click', (e) => {\n            e.preventDefault();\n            bonusProductsView.show(e.currentTarget.href);\n        });\n        util.initDynamicCarousel('.add-to-cart-modal-recommendations [id^=\"cq_recomm_slot\"]', '.tiles-container', 0, 3);\n    },\n};\n\nmodule.exports = minicart;\n","const util = require('./util');\n\nconst page = {\n    title: '',\n    type: '',\n    params: util.getQueryStringParams(window.location.search.substr(1)),\n    redirect(newURL) {\n        setTimeout(() => {\n            window.location.href = newURL;\n        }, 0);\n    },\n    refresh() {\n        setTimeout(() => {\n            window.location.assign(window.location.href);\n        }, 500);\n    },\n};\n\nmodule.exports = page;\n","const dialog = require('../../dialog');\n\nconst productUtil = {\n\n    /**\n     * @function\n     * @description Helper to show quantity limit dialog\n     */\n    showLimitErrorDialog() {\n        dialog.create({\n            target: $('#QuantityPurchaseDialog'),\n            options: {\n                width: '700',\n            },\n        });\n        dialog.open({\n            html: Resources.QUANTITY_RESTRICTION_MSG,\n            options: {\n                title: Resources.QUANTITY_RESTRICTION,\n                buttons: [{\n                    text: Resources.OK,\n                    class: 'button primary',\n                    click() {\n                        $(this).dialog('close');\n                    },\n                }],\n            },\n        });\n    },\n\n    /**\n     * @description Make sure the selected quantities match pack count for Pick 'n Choose products\n     * and display a dialog if quantities don't match\n     * @returns {Boolean}\n     */\n    validatePickNChoose() {\n        const pnc = $('.pnc');\n        if (pnc.length) {\n            const packCount = parseInt(pnc.data('packcount'), 10);\n            let totalQty = 0;\n            pnc.find('.pnc-qty').each((index, element) => {\n                totalQty += parseInt($(element).val(), 10);\n            });\n            // Display an error dialog if pack count doesn't equal summed quantities\n            if (totalQty !== packCount) {\n                dialog.create({\n                    target: $('#PickNChooseDialog'),\n                    options: {\n                        width: '700',\n                    },\n                });\n                dialog.open({\n                    html: Resources.PICK_N_CHOOSE_ERROR,\n                    options: {\n                        title: Resources.PRODUCT_ALERT,\n                        buttons: [{\n                            text: Resources.OK,\n                            class: 'button primary',\n                            click() {\n                                $(this).dialog('close');\n                            },\n                        }],\n                    },\n                });\n                return false;\n            }\n        }\n        return true;\n    },\n\n    checkForOptionProductFee(formID) {\n        if ($('.product-options select').length) {\n            const noCustomization = $('.product-options select option:eq(0)').val();\n            const customization = $('.product-options select option:eq(1)').val();\n            let allFieldsLength = 0;\n            let customerWantsPersonalization;\n            if ($('#personalized-check').length) {\n                customerWantsPersonalization = $('#personalized-check').is(':checked');\n            } else {\n                customerWantsPersonalization = false;\n            }\n\n            $(`#${formID} .personalization-options, #${formID} .ps-personalization-options`).find('input, select').each((index, element) => {\n                if ($(element).prop('type') === 'select-one') {\n                    allFieldsLength += $(element).prop('selectedIndex');\n                } else if ($(element).prop('type') === 'text') {\n                    allFieldsLength += $(element).val().length;\n                }\n            });\n\n            if (allFieldsLength > 0 && customerWantsPersonalization) {\n                $(`.product-options select option[value=${customization}]`).prop('selected', true);\n            } else if (allFieldsLength > 0 && !customerWantsPersonalization) { // if there are values and the checkbox is not checked, set to no custom and clear fields\n                $(`.product-options select option[value=${noCustomization}]`).prop('selected', true);\n                $(`#${formID} .personalization-options, #${formID} .ps-personalization-options`).find('input, select').each((index, element) => {\n                    $(element).val('');\n                });\n            } else {\n                $(`.product-options select option[value=${noCustomization}]`).prop('selected', true);\n            }\n        }\n    },\n};\n\nmodule.exports = productUtil;\n","// Base64 Images for display purposes\nconst heroImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABaAAAAJYAQMAAACuCNNxAAAAA1BMVEVdXV3Z0Y5pAAAAi0lEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOD24EAAAAAAQJC/9SBXAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwEyoRwABkkbxHQAAAABJRU5ErkJggg==';\nconst heroImageMobile = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAGQAQMAAADlYCvGAAAAA1BMVEVdXV3Z0Y5pAAAAJ0lEQVR42u3BMQEAAADCIPuntsYOYAAAAAAAAAAAAAAAAAAAAEDOAUAQAAEsqk39AAAAAElFTkSuQmCC';\nconst bannerImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABaAAAAG4AQMAAACJpNJuAAAAA1BMVEVdXV3Z0Y5pAAAAcElEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOD24IAEAAAAQND/1+0IVAAAAAAAAAAAAAAAAAAAAAAAYCY3JwABtz+iFwAAAABJRU5ErkJggg==';\nconst bannerImageMobile = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAFeAQMAAADOglQCAAAAA1BMVEVdXV3Z0Y5pAAAAJUlEQVRo3u3BMQEAAADCIPuntsYOYAAAAAAAAAAAAAAAAABA3AE4DgABRhPjpwAAAABJRU5ErkJggg==';\nconst bannerVideo = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAFoAQMAAAD9/NgSAAAAA1BMVEW1tbVGVhzfAAAAMklEQVR42u3BAQ0AAADCIPundnsOYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADkcegAAefG1GoAAAAASUVORK5CYII=';\nconst videoSectionMobile = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAHkAQMAAAB102QRAAAAA1BMVEVdXV3Z0Y5pAAAAKUlEQVR42u3BAQEAAACCoP6vbojAAAAAAAAAAAAAAAAAAAAAAAAAAEIOTYQAAbA8/woAAAAASUVORK5CYII=';\nconst twoUpImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAmIAAAH0AQMAAACkT9NmAAAAA1BMVEVdXV3Z0Y5pAAAAPElEQVR42u3BgQAAAADDoPtTX2EA1QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACA7JhYAAH87I4RAAAAAElFTkSuQmCC';\nconst twoUpImageMobile = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAFoAQMAAAAcobCyAAAAA1BMVEVdXV3Z0Y5pAAAAJUlEQVRo3u3BMQEAAADCIPuntsNuYAAAAAAAAAAAAAAAAAAAJAc5qAAByC5E/gAAAABJRU5ErkJggg==';\nconst twoUpLongImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAmIAAAMCAQMAAADwGzhLAAAAA1BMVEVdXV3Z0Y5pAAAAUElEQVR42u3BAQ0AAADCIPuntscHDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACDk6pwAASGxpVIAAAAASUVORK5CYII=';\nconst twoUpLongImageMobile = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAV4AAAGUAQMAAABHltiLAAAAA1BMVEVdXV3Z0Y5pAAAAKElEQVR42u3BMQEAAADCIPunNsYeYAAAAAAAAAAAAAAAAAAAAAAAEDlHBAABYTtXzwAAAABJRU5ErkJggg==';\nconst threeUpImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXwAAAGQAQMAAACXr0lwAAAAA1BMVEVdXV3Z0Y5pAAAAKUlEQVR42u3BAQEAAACCoP6vbojAAAAAAAAAAAAAAAAAAAAAAAAAgKwDTJAAAU9nx3IAAAAASUVORK5CYII=';\nconst threeUpImageMobile = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsAQMAAABDsxw2AAAAA1BMVEVdXV3Z0Y5pAAAAIklEQVRo3u3BMQEAAADCIPunNsU+YAAAAAAAAAAAAAAAZA4ttAABTfPAzgAAAABJRU5ErkJggg==';\nconst threeUpLongImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYoAAAMCAQMAAABNzBPPAAAAA1BMVEVdXV3Z0Y5pAAAAPUlEQVR42u3BMQEAAADCIPuntsNuYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyQGZZgAB1A3MZwAAAABJRU5ErkJggg==';\nconst threeUpLongImageMobile = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAM0AAAGQAQMAAAA3FXa3AAAAA1BMVEVdXV3Z0Y5pAAAAIUlEQVRo3u3BAQ0AAADCIPuntscHDAAAAAAAAAAAAIC0AyowAAGJmq1+AAAAAElFTkSuQmCC';\nconst thirdSplitCard = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAABkAQMAAABelVuzAAAAA1BMVEW1tbVGVhzfAAAAFklEQVQ4y2MYBaNgFIyCUTAKRsGQBwAH0AABC3LNGAAAAABJRU5ErkJggg==';\nconst thirdSplit = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABaAAAAG4AQMAAACJpNJuAAAAA1BMVEVdXV3Z0Y5pAAAAcElEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOD24IAEAAAAQND/1+0IVAAAAAAAAAAAAAAAAAAAAAAAYCY3JwABtz+iFwAAAABJRU5ErkJggg==';\nconst thirdSplitMobile = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAHFAQMAAAC5I7KCAAAAA1BMVEVdXV3Z0Y5pAAAAKElEQVR42u3BAQEAAACCoP6vbojAAAAAAAAAAAAAAAAAAAAAAACAtgNIjQABxSPPRgAAAABJRU5ErkJggg==';\n\nfunction escapeHtml(html) {\n    const entityMap = {\n        '&': '&amp;',\n        '<': '&lt;',\n        '>': '&gt;',\n        '\"': '&quot;',\n        '/': '&#x2F;',\n    };\n    return String(html).replace(/[&<>\"'/]/g, (s) => entityMap[s]);\n}\n\nfunction showCode() {\n    $('.content-output pre code').empty();\n    $('.content-output pre code').append($('.built-content').contents().clone());\n\n    const codeblock = document.querySelectorAll('pre code');\n\n    if (codeblock.length > 0) {\n        for (let i = 0, len = codeblock.length; i < len; i += 1) {\n            codeblock[i].innerHTML = escapeHtml(codeblock[i].innerHTML);\n        }\n    }\n}\n\nfunction getWidth(value) {\n    let widthVar;\n    switch (value) {\n    case '1':\n        widthVar = '';\n        break;\n    case '2':\n        widthVar = 'width-full';\n        break;\n    case '3':\n        widthVar = 'width-third';\n        break;\n    case '4':\n        widthVar = 'width-half';\n        break;\n    case '5':\n        widthVar = 'width-twothird';\n        break;\n    default:\n        widthVar = '';\n        break;\n    }\n    return widthVar;\n}\n\nfunction getPosition(value) {\n    let positionVar;\n    switch (value) {\n    case '1':\n        positionVar = 'align-top-left-pos';\n        break;\n    case '2':\n        positionVar = 'align-top-center-pos';\n        break;\n    case '3':\n        positionVar = 'align-top-right-pos';\n        break;\n    case '4':\n        positionVar = 'align-middle-left-pos';\n        break;\n    case '5':\n        positionVar = 'align-middle-center';\n        break;\n    case '6':\n        positionVar = 'align-middle-center-pos';\n        break;\n    case '7':\n        positionVar = 'align-middle-right-pos';\n        break;\n    case '8':\n        positionVar = 'align-bottom-left-pos';\n        break;\n    case '9':\n        positionVar = 'align-bottom-center-pos';\n        break;\n    case '10':\n        positionVar = 'align-bottom-right-pos';\n        break;\n    default:\n        positionVar = '';\n        break;\n    }\n    return positionVar;\n}\n\nfunction getBackground(value) {\n    let backgroundVar;\n    if (value) {\n        backgroundVar = 'drop-background';\n    } else {\n        backgroundVar = '';\n    }\n    return backgroundVar;\n}\n\nfunction getHeaderStyle(value) {\n    let headStyle;\n    switch (value) {\n    case '1':\n        headStyle = '';\n        break;\n    case '2':\n        headStyle = 'primary';\n        break;\n    case '3':\n        headStyle = 'inverse';\n        break;\n    default:\n        headStyle = '';\n        break;\n    }\n    return headStyle;\n}\n\nfunction getSubHeaderStyle(value) {\n    let subHeadStyle;\n    switch (value) {\n    case '1':\n        subHeadStyle = '';\n        break;\n    case '2':\n        subHeadStyle = 'primary';\n        break;\n    case '3':\n        subHeadStyle = 'inverse';\n        break;\n    default:\n        subHeadStyle = '';\n        break;\n    }\n    return subHeadStyle;\n}\n\nfunction getCtaStyle(value) {\n    let ctaStyle;\n    switch (value) {\n    case '1':\n        ctaStyle = 'primary';\n        break;\n    case '2':\n        ctaStyle = 'secondary';\n        break;\n    case '3':\n        ctaStyle = 'tertiary';\n        break;\n    default:\n        ctaStyle = '';\n        break;\n    }\n    return ctaStyle;\n}\n\nfunction getTileType(value) {\n    let tileTypeValue;\n    switch (value) {\n    case '3':\n        tileTypeValue = 'two-up';\n        break;\n    case '4':\n        tileTypeValue = 'three-up';\n        break;\n    default:\n        tileTypeValue = '';\n        break;\n    }\n    return tileTypeValue;\n}\n\nfunction getTileCount(value) {\n    let tileCountValue;\n    switch (value) {\n    case '3':\n        tileCountValue = 2;\n        break;\n    case '4':\n        tileCountValue = 3;\n        break;\n    default:\n        tileCountValue = '';\n        break;\n    }\n    return tileCountValue;\n}\n\nfunction getSideBySidePos(value) {\n    let sbspos;\n    switch (value) {\n    case '1':\n        sbspos = 'first';\n        break;\n    case '2':\n        sbspos = 'second';\n        break;\n    default:\n        sbspos = '';\n        break;\n    }\n    return sbspos;\n}\n\nfunction buildHero(contentParams) {\n    const cWidth = getWidth(contentParams.width);\n    const cPosition = getPosition(contentParams.position);\n    const cBackground = getBackground(contentParams.background);\n    const cHeaderStyle = getHeaderStyle(contentParams.headerStyle);\n    const cSubHeaderStyle = getSubHeaderStyle(contentParams.subHeaderStyle);\n    const cCtaStyle = getCtaStyle(contentParams.ctaStyle);\n    let cHeroSecondary = '';\n    if (contentParams.heroSecondary) {\n        cHeroSecondary = 'secondary-hero';\n    }\n    let cMobilePrimary = '';\n    if (contentParams.mobilePrimary) {\n        cMobilePrimary = 'mobile-primary';\n    }\n\n    $('.built-content').empty();\n\n    let htmlButtons = '';\n    for (let i = 0; i < contentParams.ctaCount; i += 1) {\n        if (i === 0) {\n            htmlButtons += `<a href=\"\\${#}\" class=\"button ${cCtaStyle}\">${contentParams.button[0]}</a>`;\n        } else if (i === 1) {\n            htmlButtons += `<a href=\"\\${#}\" class=\"button ${cCtaStyle}\">${contentParams.button[1]}</a>`;\n        } else {\n            htmlButtons += `<a href=\"\\${#}\" class=\"button ${cCtaStyle}\">${contentParams.button[2]}</a>`;\n        }\n    }\n\n    const backgroundStyle = contentParams.background ? ' style=\"background-color:rgba(250, 248, 241, 0.94);\"' : '';\n    const html = $([\n        '<!-- Home slot 1 -->',\n        `<div class=\"hero-container ${cHeroSecondary}\">`,\n        '    <picture>',\n        '        <!-- desktop image -->',\n        '        <!-- //For SFCC <source media=\"(min-width: 1025px)\" srcset=\"images/content-assets/homepage/cd-hero1.png?$staticlink$\">-->',\n        `        <source media=\"(min-width: 1025px)\" srcset=\"${heroImage}\">`,\n        '        <!-- tablet image -->',\n        '        <!-- // For SFCC <source media=\"(min-width: 768px)\" srcset=\"images/content-assets/homepage/cd-hero1.png?$staticlink$\">-->',\n        `        <source media=\"(min-width: 768px)\" srcset=\"${heroImage}\">`,\n        '        <!-- default is mobile image -->',\n        '        <!-- // For SFCC <img alt=\"\" src=\"images/content-assets/homepage/cd-hero1-m.png?$staticlink$\"/>-->',\n        `        <img alt=\"\" src=\"${heroImageMobile}\"/>`,\n        '    </picture>',\n        '    <div class=\"hero-content\">',\n        `        <div class=\"hero-content-inner ${cWidth} ${cPosition} ${cBackground} ${cMobilePrimary}\" ${backgroundStyle}>`,\n        `            <span class=\"type-hero ${cHeaderStyle}\">${contentParams.header[0]}</span>`,\n        `            <h3 class=\"${cSubHeaderStyle}\">${contentParams.subHeader}</h3>`,\n        '            <div class=\"cta-container\">',\n        `                ${htmlButtons}`,\n        '            </div>',\n        '        </div>',\n        '    </div>',\n        '</div>',\n    ].join('\\n'));\n\n    $('.built-content').append(html);\n}\n\nfunction buildBanner(contentParams) {\n    const cWidth = getWidth(contentParams.width);\n    const cPosition = getPosition(contentParams.position);\n    const cBackground = getBackground(contentParams.background);\n    const cHeaderStyle = getHeaderStyle(contentParams.headerStyle);\n    const cSubHeaderStyle = getSubHeaderStyle(contentParams.subHeaderStyle);\n    const cCtaStyle = getCtaStyle(contentParams.ctaStyle);\n    let cBannerAlternate = '';\n    if (contentParams.bannerAlternate) {\n        cBannerAlternate = 'alternate';\n    }\n    let cBannerStacked = '';\n    if (contentParams.bannerStacked) {\n        cBannerStacked = 'stacked-banner';\n    }\n    let cBannerSideBySide = '';\n    if (contentParams.bannerSideBySide) {\n        cBannerSideBySide = 'side-by-side';\n    }\n    const cSideBySidePosition = getSideBySidePos(contentParams.sideBySidePosition);\n    let cPos1 = '';\n    if (cSideBySidePosition === 'first') {\n        cPos1 = 'second';\n    } else {\n        cPos1 = 'first';\n    }\n    let cMobilePrimary = '';\n    if (contentParams.mobilePrimary) {\n        cMobilePrimary = 'mobile-primary';\n    }\n\n    let htmlButtons = '';\n    let html;\n    let contentInner;\n    let contentInnerHeader;\n    let contentInnerSubHead;\n    let contentSecondary;\n    let contentSecondaryCallout;\n\n    for (let i = 0; i < contentParams.ctaCount; i += 1) {\n        if (i === 0) {\n            htmlButtons += `<a href=\"\\${#}\" class=\"button ${cCtaStyle}\">${contentParams.button[0]}</a>`;\n        } else if (i === 1) {\n            htmlButtons += `<a href=\"\\${#}\" class=\"button ${cCtaStyle}\">${contentParams.button[1]}</a>`;\n        } else {\n            htmlButtons += `<a href=\"\\${#}\" class=\"button ${cCtaStyle}\">${contentParams.button[2]}</a>`;\n        }\n    }\n\n    $('.built-content').empty();\n\n    if (!contentParams.bannerSideBySide) {\n        const backgroundStyle = contentParams.background ? ' style=\"background-color:rgba(250, 248, 241, 0.94);\"' : '';\n        contentInner = `<div class=\"hero-content-inner ${cWidth} ${cPosition} ${cBackground} ${cMobilePrimary}\" ${backgroundStyle}>`;\n        contentInnerHeader = `<span class=\"type-hero ${cHeaderStyle}\">${contentParams.header[0]}</span>`;\n        contentInnerSubHead = `<h3 class=\"${cSubHeaderStyle}\">${contentParams.subHeader}</h3>`;\n\n        html = $([\n            '<!-- Banner slot -->',\n            `<div class=\"hero-container banner ${cBannerAlternate} ${cBannerSideBySide}\">`,\n            '    <picture>',\n            '        <!-- desktop image -->',\n            '        <!-- //For SFCC <source media=\"(min-width: 1025px)\" srcset=\"images/content-assets/homepage/cd-hero1.png?$staticlink$\">-->',\n            `        <source media=\"(min-width: 1025px)\" srcset=\"${bannerImage}\">`,\n            '        <!-- tablet image -->',\n            '        <!-- // For SFCC <source media=\"(min-width: 768px)\" srcset=\"images/content-assets/homepage/cd-hero1.png?$staticlink$\">-->',\n            `        <source media=\"(min-width: 768px)\" srcset=\"${bannerImage}\">`,\n            '        <!-- default is mobile image -->',\n            '        <!-- // For SFCC <img alt=\"\" src=\"images/content-assets/homepage/cd-hero1-m.png?$staticlink$\"/>-->',\n            `        <img alt=\"\" src=\"${bannerImageMobile}\"/>`,\n            '    </picture>',\n            '    <div class=\"hero-content\">',\n            `        ${contentInner}`,\n            `            ${contentInnerHeader}`,\n            `            ${contentInnerSubHead}`,\n            '            <div class=\"cta-container\">',\n            `                ${htmlButtons}`,\n            '            </div>',\n            '        </div>',\n            '    </div>',\n            '</div>',\n        ].join('\\n'));\n    } else if (!contentParams.bannerStacked) {\n        // Call text content\n        contentInner = `<div class=\"hero-content-inner call-text ${cSideBySidePosition}\">`;\n        contentInnerHeader = `<span class=\"type-hero ${cHeaderStyle}\">${contentParams.header[0]}</span>`;\n        contentInnerSubHead = `<p class=\"${cSubHeaderStyle}\">${contentParams.subHeader}</p>`;\n        // Video content\n        contentSecondary = `<div class=\"hero-content-inner video ${cPos1}\">`;\n        contentSecondaryCallout = `<img alt=\"\" src=\"${bannerVideo}\"/>`;\n\n        html = $([\n            '<!-- Banner slot -->',\n            `<div class=\"hero-container banner ${cBannerAlternate} ${cBannerSideBySide}\">`,\n            '    <picture>',\n            '        <!-- desktop image -->',\n            '        <!-- //For SFCC <source media=\"(min-width: 1025px)\" srcset=\"images/content-assets/homepage/cd-hero1.png?$staticlink$\">-->',\n            `        <source media=\"(min-width: 1025px)\" srcset=\"${bannerImage}\">`,\n            '        <!-- tablet image -->',\n            '        <!-- // For SFCC <source media=\"(min-width: 768px)\" srcset=\"images/content-assets/homepage/cd-hero1.png?$staticlink$\">-->',\n            `        <source media=\"(min-width: 768px)\" srcset=\"${bannerImage}\">`,\n            '        <!-- default is mobile image -->',\n            '        <!-- // For SFCC <img alt=\"\" src=\"images/content-assets/homepage/cd-hero1-m.png?$staticlink$\"/>-->',\n            `        <img alt=\"\" src=\"${videoSectionMobile}\"/>`,\n            '    </picture>',\n            '    <div class=\"hero-content\">',\n            `        ${contentInner}`,\n            `            ${contentInnerHeader}`,\n            `            ${contentInnerSubHead}`,\n            '            <div class=\"cta-container\">',\n            `                ${htmlButtons}`,\n            '            </div>',\n            '        </div>',\n            `        ${contentSecondary}`,\n            `            ${contentSecondaryCallout}`,\n            '        </div>',\n            '    </div>',\n            '</div>',\n        ].join('\\n'));\n    } else {\n        contentInner = `<div class=\"inner-content ${cSideBySidePosition}\">`;\n        contentInnerHeader = `<h2 class=\"${cHeaderStyle}\">${contentParams.header[0]}</h2>`;\n        contentInnerSubHead = `<p class=\"${cSubHeaderStyle}\">${contentParams.subHeader}</p>`;\n        contentSecondary = `<div class=\"inner-content ${cPos1}\">`;\n        contentSecondaryCallout = `<img alt=\"\" src=\"${thirdSplitCard}\"/>`;\n\n        html = $([\n            '<!-- Banner slot -->',\n            `<div class=\"hero-container banner ${cBannerAlternate} ${cBannerSideBySide}\">`,\n            '    <picture>',\n            '        <!-- desktop image -->',\n            '        <!-- //For SFCC <source media=\"(min-width: 1025px)\" srcset=\"images/content-assets/homepage/cd-hero1.png?$staticlink$\">-->',\n            `        <source media=\"(min-width: 1025px)\" srcset=\"${bannerImage}\">`,\n            '        <!-- tablet image -->',\n            '        <!-- // For SFCC <source media=\"(min-width: 768px)\" srcset=\"images/content-assets/homepage/cd-hero1-m.png?$staticlink$\">-->',\n            `        <source media=\"(min-width: 768px)\" srcset=\"${videoSectionMobile}\">`,\n            '        <!-- default is mobile image -->',\n            '        <!-- // For SFCC <img alt=\"\" src=\"images/content-assets/homepage/cd-hero1-m.png?$staticlink$\"/>-->',\n            `        <img alt=\"\" src=\"${videoSectionMobile}\"/>`,\n            '    </picture>',\n            `    <div class=\"hero-content ${cBannerStacked}\">`,\n            `        <div class=\"hero-content-inner mobile-content-inside-middle-center interior-button ${cWidth} ${cPosition}\">`,\n            `            ${contentInner}`,\n            `                ${contentInnerHeader}`,\n            `                ${contentInnerSubHead}`,\n            '                <div class=\"cta-container\">',\n            `                    ${htmlButtons}`,\n            '                </div>',\n            '            </div>',\n            `            ${contentSecondary}`,\n            `                ${contentSecondaryCallout}`,\n            '            </div>',\n            '        </div>',\n            '    </div>',\n            '</div>',\n        ].join('\\n'));\n    }\n\n    $('.built-content').append(html);\n}\n\nfunction buildTiles(contentParams) {\n    const cPosition = getPosition(contentParams.position);\n    const cHeaderStyle = getHeaderStyle(contentParams.headerStyle);\n    const cCtaStyle = getCtaStyle(contentParams.ctaStyle);\n    const cTileType = getTileType(contentParams.tile.type);\n    const cTileCount = getTileCount(contentParams.tile.type);\n    let cTileContentLocation = '';\n    if (contentParams.tile.contentLocation === '1') {\n        cTileContentLocation = 'inner-content';\n    } else {\n        cTileContentLocation = 'outer-content';\n    }\n    let cTileAlternate = '';\n    if (contentParams.tile.alternate) {\n        cTileAlternate = 'alternate';\n    }\n    let cTileTreatment = '';\n    if (contentParams.tile.treatment) {\n        cTileTreatment = 'long-treatment';\n    }\n    let cMobilePrimary = '';\n    if (contentParams.mobilePrimary) {\n        cMobilePrimary = 'mobile-primary';\n    }\n\n    let tileImage;\n    let tileImageMobile;\n    const htmlBuild = [''];\n    let html = [''];\n\n    /// Determine if it's a two or three up\n    if (contentParams.tile.type === '3') {\n        /// Determine what image (long/normal) to use\n        if (cTileTreatment === 'long-treatment') {\n            tileImage = twoUpLongImage;\n            tileImageMobile = twoUpLongImageMobile;\n        } else {\n            tileImage = twoUpImage;\n            tileImageMobile = twoUpImageMobile;\n        }\n    } else if (cTileTreatment === 'long-treatment') {\n        tileImage = threeUpLongImage;\n        tileImageMobile = threeUpLongImageMobile;\n    } else {\n        tileImage = threeUpImage;\n        tileImageMobile = threeUpImageMobile;\n    }\n\n    $('.built-content').empty();\n\n    let tileButtonOne;\n    let tileButtonTwo;\n    let tilesHeader = contentParams.header[0];\n    let tilesButton = contentParams.button[0];\n\n    const tiles1 = [\n        '<!-- Content Tiles -->',\n        `<div class=\"content-tiles ${cTileType} ${cTileContentLocation} ${cTileAlternate} ${cTileTreatment}\">`,\n        `    <div class=\"content-tiles-heading ${cMobilePrimary}\">`,\n        `        <h2 class=\"${cHeaderStyle}\">${contentParams.tile.calloutHeader}</h2>`,\n        `        <p>${contentParams.tile.calloutSubHeader}</p>`,\n        '    </div>',\n        '    <div class=\"content-tiles-wrapper\">',\n    ];\n\n    const tilesContainer = [\n        '        <div class=\"content-tile-container\">',\n    ];\n\n    const tilesContainerEnd = [\n        '        </div>',\n    ];\n\n    const tiles2 = [\n        '    </div>',\n        '</div>',\n    ];\n\n    /// Start the tiles\n    $.merge(htmlBuild, tiles1);\n    for (let j = 0; j < cTileCount; j += 1) {\n        /// Add the tile container\n        $.merge(htmlBuild, tilesContainer);\n\n        /// Determine if the tiles are inside/outside content\n        if (contentParams.tile.contentLocation === '1') {\n            let htmlButtons = '';\n            for (let i = 0; i < contentParams.ctaCount; i += 1) {\n                switch (j) {\n                case 0:\n                    [tileButtonOne, tileButtonTwo] = contentParams.button;\n                    break;\n                case 1:\n                    [tileButtonOne, tileButtonTwo] = contentParams.tile.twoButton;\n                    break;\n                case 2:\n                    [tileButtonOne, tileButtonTwo] = contentParams.tile.threeButton;\n                    break;\n                default:\n                    break;\n                }\n                if (i === 0) {\n                    htmlButtons += `<a href=\"\\${#}\" class=\"button ${cCtaStyle}\">${tileButtonOne}</a>`;\n                } else {\n                    htmlButtons += `<a href=\"\\${#}\" class=\"button ${cCtaStyle}\">${tileButtonTwo}</a>`;\n                }\n            }\n\n            if (j === 0) {\n                [tilesHeader] = contentParams.header;\n            } else if (j === 1) {\n                [, tilesHeader] = contentParams.header;\n            } else {\n                [, , tilesHeader] = contentParams.header;\n            }\n            const tilesInside = [\n                '            <picture>',\n                '                <!-- desktop image -->',\n                '                <!-- //For SFCC <source media=\"(min-width: 1025px)\" srcset=\"images/content-assets/homepage/cd-hero1.png?$staticlink$\">-->',\n                `                <source media=\"(min-width: 1025px)\" srcset=\"${tileImage}\">`,\n                '                <!-- tablet image -->',\n                '                <!-- // For SFCC <source media=\"(min-width: 768px)\" srcset=\"images/content-assets/homepage/cd-hero1.png?$staticlink$\">-->',\n                `                <source media=\"(min-width: 768px)\" srcset=\"${tileImage}\">`,\n                '                <!-- default is mobile image -->',\n                '                <!-- // For SFCC <img alt=\"\" src=\"images/content-assets/homepage/cd-hero1-m.png?$staticlink$\"/>-->',\n                `                <img alt=\"\" src=\"${tileImageMobile}\"/>`,\n                '            </picture>',\n                '            <div class=\"content-tile-inner-wrapper\">',\n                `                <div class=\"content-tile-inner width-full ${cPosition}\">`,\n                `                    <h2 class=\"${cHeaderStyle}\">${tilesHeader}</h2>`,\n                '                    <div class=\"cta-container\">',\n                `                        ${htmlButtons}`,\n                '                    </div>',\n                '                </div>',\n                '            </div>',\n            ];\n            $.merge(htmlBuild, tilesInside);\n        } else {\n            if (j === 0) {\n                [tilesButton] = contentParams.button;\n            } else if (j === 1) {\n                [, tilesButton] = contentParams.button;\n            } else {\n                [, , tilesButton] = contentParams.button;\n            }\n            const tilesOutside = [\n                '            <a href=\"#\">',\n                '                <div class=\"content-tile-inner\">',\n                '                    <picture>',\n                '                        <!-- desktop image -->',\n                '                        <!-- //For SFCC <source media=\"(min-width: 1025px)\" srcset=\"images/content-assets/homepage/cd-hero1.png?$staticlink$\">-->',\n                `                        <source media=\"(min-width: 1025px)\" srcset=\"${tileImage}\">`,\n                '                        <!-- tablet image -->',\n                '                        <!-- // For SFCC <source media=\"(min-width: 768px)\" srcset=\"images/content-assets/homepage/cd-hero1.png?$staticlink$\">-->',\n                `                        <source media=\"(min-width: 768px)\" srcset=\"${tileImage}\">`,\n                '                        <!-- default is mobile image -->',\n                '                        <!-- // For SFCC <img alt=\"\" src=\"images/content-assets/homepage/cd-hero1-m.png?$staticlink$\"/>-->',\n                `                        <img alt=\"\" src=\"${tileImageMobile}\"/>`,\n                '                   </picture>',\n                '                </div>',\n                `                <h3 class=\"link-arrow\">${tilesButton}</h3>`,\n                '            </a>',\n            ];\n            $.merge(htmlBuild, tilesOutside);\n        }\n\n        /// Close the tile container\n        $.merge(htmlBuild, tilesContainerEnd);\n    }\n    /// Close the tiles\n    $.merge(htmlBuild, tiles2);\n\n    html = $(htmlBuild.join('\\n'));\n\n    $('.built-content').append(html);\n}\n\nfunction buildThirdSplit(contentParams) {\n    const cHeaderStyle = getHeaderStyle(contentParams.headerStyle);\n    const cSubHeaderStyle = getSubHeaderStyle(contentParams.subHeaderStyle);\n    const cCtaStyle = getCtaStyle(contentParams.ctaStyle);\n    let cBannerAlternate = '';\n    if (contentParams.bannerAlternate) {\n        cBannerAlternate = 'alternate';\n    }\n    const cSideBySidePosition = getSideBySidePos(contentParams.sideBySidePosition);\n    let cPos1 = '';\n    if (cSideBySidePosition === 'first') {\n        cPos1 = 'second';\n    } else {\n        cPos1 = 'first';\n    }\n\n    $('.built-content').empty();\n\n    let htmlButtons = '';\n    for (let i = 0; i < contentParams.ctaCount; i += 1) {\n        if (i === 0) {\n            htmlButtons += `<a href=\"\\${#}\" class=\"button ${cCtaStyle}\">${contentParams.button[0]}</a>`;\n        } else if (i === 1) {\n            htmlButtons += `<a href=\"\\${#}\" class=\"button ${cCtaStyle}\">${contentParams.button[1]}</a>`;\n        } else {\n            htmlButtons += `<a href=\"\\${#}\" class=\"button ${cCtaStyle}\">${contentParams.button[2]}</a>`;\n        }\n    }\n\n    const html = $([\n        '<!-- Home banner slot side by side -->',\n        `<div class=\"hero-container banner third-split ${cBannerAlternate}\">`,\n        '    <picture>',\n        '        <!-- desktop image -->',\n        '        <!-- //For SFCC <source media=\"(min-width: 1025px)\" srcset=\"images/content-assets/homepage/cd-hero1.png?$staticlink$\">-->',\n        `        <source media=\"(min-width: 1025px)\" srcset=\"${thirdSplit}\">`,\n        '        <!-- tablet image -->',\n        '        <!-- // For SFCC <source media=\"(min-width: 768px)\" srcset=\"images/content-assets/homepage/cd-hero1.png?$staticlink$\">-->',\n        `        <source media=\"(min-width: 768px)\" srcset=\"${thirdSplitMobile}\">`,\n        '        <!-- default is mobile image -->',\n        '        <!-- // For SFCC <img alt=\"\" src=\"images/content-assets/homepage/cd-hero1-m.png?$staticlink$\"/>-->',\n        `        <img alt=\"\" src=\"${thirdSplitMobile}\"/>`,\n        '    </picture>',\n        '    <div class=\"hero-content\">',\n        `        <div class=\"hero-content-inner split-item flex ${cSideBySidePosition}\">`,\n        '            <div class=\"container\">',\n        `                <img alt=\"\" src=\"${thirdSplitCard}\"/>`,\n        '            </div>',\n        '            <div class=\"container\">',\n        `                <span class=\"type-hero ${cHeaderStyle}\">${contentParams.header[0]}</span>`,\n        `                <p class=\"${cSubHeaderStyle}\">${contentParams.subHeader}</p>`,\n        '            </div>',\n        '        </div>',\n        `        <div class=\"hero-content-inner split-item interior-button ${cPos1}\">`,\n        '            <div class=\"cta-container\">',\n        `                ${htmlButtons}`,\n        '            </div>',\n        '        </div>',\n        '    </div',\n        '</div>',\n    ].join('\\n'));\n\n    $('.built-content').append(html);\n}\n\nfunction initializeEvents() {\n    $('[id*=\"_banneralternate\"]').parents('.checkbox').hide();\n    $('[id*=\"_bannersidebyside\"]').parents('.checkbox').hide();\n    $('[id*=\"_bannerstacked\"]').parents('.checkbox').hide();\n    $('[id*=\"_sidebysideposition\"]').parents('.selectbox').hide();\n    $('[id*=\"_tilecontentlocation\"]').parents('.selectbox').hide();\n    $('[id*=\"_tilealternate\"]').parents('.checkbox').hide();\n    $('[id*=\"_tiletreatment\"]').parents('.checkbox').hide();\n    $('[id*=\"_secondheading\"]').parents('.form-row').hide();\n    $('[id*=\"_thirdheading\"]').parents('.form-row').hide();\n    $('[id*=\"_secondbuttontext\"]').parents('.form-row').hide();\n    $('[id*=\"_thirdbuttontext\"]').parents('.form-row').hide();\n    $('[id*=\"_tilessubcallout\"]').parents('.form-row').hide();\n    $('[id*=\"_tilescallout\"]').parents('.form-row').hide();\n    $('.tilesheaderone').hide();\n    $('.tilesheadertwo').hide();\n    $('[id*=\"_t2firstbuttontext\"]').parents('.form-row').hide();\n    $('[id*=\"_t2secondbuttontext\"]').parents('.form-row').hide();\n    $('[id*=\"_t3firstbuttontext\"]').parents('.form-row').hide();\n    $('[id*=\"_t3secondbuttontext\"]').parents('.form-row').hide();\n\n    $('code').click((event) => {\n        $(event.currentTarget).select();\n\n        const doc = document;\n        let range;\n        let selection;\n\n        if (doc.body.createTextRange) {\n            range = document.body.createTextRange();\n            range.moveToElementText(event.currentTarget);\n            range.select();\n        } else if (window.getSelection) {\n            selection = window.getSelection();\n            range = document.createRange();\n            range.selectNodeContents(event.currentTarget);\n            selection.removeAllRanges();\n            selection.addRange(range);\n        }\n    });\n\n    $('body').on('click', '#selectallcode', () => {\n        $('code').trigger('click');\n        document.execCommand('copy');\n    });\n\n    $('body').on('click', '#generatecontent', () => {\n        const contentParams = {\n            type: $('[id*=\"_contenttype\"]').val(),\n            width: $('[id*=\"_contentwidth\"]').val(),\n            position: $('[id*=\"_contentposition\"]').val(),\n            background: $('[id*=\"_contentbackground\"]').is(':checked'),\n            headerStyle: $('[id*=\"_headerstyle\"]').val(),\n            subHeaderStyle: $('[id*=\"_subheaderstyle\"]').val(),\n            ctaCount: $('[id*=\"_ctacount\"]').val(),\n            ctaStyle: $('[id*=\"_ctastyle\"]').val(),\n            heroSecondary: $('[id*=\"_herosecondary\"]').is(':checked'),\n            bannerAlternate: $('[id*=\"_banneralternate\"]').is(':checked'),\n            bannerSideBySide: $('[id*=\"_bannersidebyside\"]').is(':checked'),\n            sideBySidePosition: $('[id*=\"_sidebysideposition\"]').val(),\n            bannerStacked: $('[id*=\"_bannerstacked\"]').is(':checked'),\n            mobilePrimary: $('[id*=\"_mobileprimary\"]').is(':checked'),\n            header: [\n                $('[id*=\"_firstheading\"]').val() !== '' ? $('[id*=\"_firstheading\"]').val() : 'Some Cool<br> Words Here',\n                $('[id*=\"_secondheading\"]').val() !== '' ? $('[id*=\"_secondheading\"]').val() : 'Some Cool<br> Words Here',\n                $('[id*=\"_thirdheading\"]').val() !== '' ? $('[id*=\"_thirdheading\"]').val() : 'Some Cool<br> Words Here',\n            ],\n            subHeader: $('[id*=\"_firstsubheading\"]').val() !== '' ? $('[id*=\"_firstsubheading\"]').val() : 'Some interesting and exciting text.',\n            button: [\n                $('[id*=\"_firstbuttontext\"]').val() !== '' ? $('[id*=\"_firstbuttontext\"]').val() : 'Learn More',\n                $('[id*=\"_secondbuttontext\"]').val() !== '' ? $('[id*=\"_secondbuttontext\"]').val() : 'Learn More',\n                $('[id*=\"_thirdbuttontext\"]').val() !== '' ? $('[id*=\"_thirdbuttontext\"]').val() : 'Learn More',\n            ],\n            tile: {\n                type: $('[id*=\"_contenttype\"]').val(),\n                contentLocation: $('[id*=\"_tilecontentlocation\"]').val(),\n                alternate: $('[id*=\"_tilealternate\"]').is(':checked'),\n                treatment: $('[id*=\"_tiletreatment\"]').is(':checked'),\n                calloutHeader: $('[id*=\"_tilescallout\"]').val() !== '' ? $('[id*=\"_tilescallout\"]').val() : 'Some Stuff Here.',\n                calloutSubHeader: $('[id*=\"_tilessubcallout\"]').val() !== '' ? $('[id*=\"_tilessubcallout\"]').val() : 'More interesting things about this content goes right here.',\n                twoButton: [\n                    $('[id*=\"_t2firstbuttontext\"]').val() !== '' ? $('[id*=\"_t2firstbuttontext\"]').val() : 'Learn More',\n                    $('[id*=\"_t2secondbuttontext\"]').val() !== '' ? $('[id*=\"_t2secondbuttontext\"]').val() : 'Learn More',\n                ],\n                threeButton: [\n                    $('[id*=\"_t3firstbuttontext\"]').val() !== '' ? $('[id*=\"_t3firstbuttontext\"]').val() : 'Learn More',\n                    $('[id*=\"_t3secondbuttontext\"]').val() !== '' ? $('[id*=\"_t3secondbuttontext\"]').val() : 'Learn More',\n                ],\n            },\n        };\n\n        switch (contentParams.type) {\n        case '1':\n            buildHero(contentParams);\n            break;\n        case '2':\n            buildBanner(contentParams);\n            break;\n        case '3':\n            buildTiles(contentParams);\n            break;\n        case '4':\n            buildTiles(contentParams);\n            break;\n        case '5':\n            buildThirdSplit(contentParams);\n            break;\n        default:\n            break;\n        }\n\n        showCode();\n    });\n\n    $('[id*=\"_contenttype\"]').change((event) => {\n        switch ($(event.currentTarget).val()) {\n        case '1':\n            $('[id*=\"_herosecondary\"]').parents('.checkbox').show();\n            $('[id*=\"_contentbackground\"]').parents('.checkbox').show();\n            $('[id*=\"_contentwidth\"]').parents('.selectbox').show();\n            $('[id*=\"_contentposition\"]').parents('.selectbox').show();\n            $('[id*=\"_headerstyle\"]').parents('.selectbox').show();\n            $('[id*=\"_mobileprimary\"]').parents('.checkbox').show();\n            $('[id*=\"_subheaderstyle\"]').parents('.selectbox').show();\n            $('[id*=\"_ctacount\"]').parents('.selectbox').show();\n            $('[id*=\"_ctastyle\"]').parents('.selectbox').show();\n            $('[id*=\"_firstheading\"]').parents('.form-row').show();\n            $('[id*=\"_firstbuttontext\"]').parents('.form-row').show();\n            $('[id*=\"_firstsubheading\"]').parents('.form-row').show();\n\n            $('[id*=\"_banneralternate\"]').parents('.checkbox').hide();\n            $('[id*=\"_bannersidebyside\"]').parents('.checkbox').hide();\n            $('[id*=\"_sidebysideposition\"]').parents('.selectbox').hide();\n            $('[id*=\"_tilealternate\"]').parents('.checkbox').hide();\n            $('[id*=\"_tiletreatment\"]').parents('.checkbox').hide();\n            $('[id*=\"_tilecontentlocation\"]').parents('.selectbox').hide();\n            $('[id*=\"_secondheading\"]').parents('.form-row').hide();\n            $('[id*=\"_thirdheading\"]').parents('.form-row').hide();\n            $('[id*=\"_secondbuttontext\"]').parents('.form-row').hide();\n            $('[id*=\"_thirdbuttontext\"]').parents('.form-row').hide();\n            $('[id*=\"_tilessubcallout\"]').parents('.form-row').hide();\n            $('[id*=\"_tilescallout\"]').parents('.form-row').hide();\n            $('.tilesheaderone').hide();\n            $('.tilesheadertwo').hide();\n            $('[id*=\"_t2firstbuttontext\"]').parents('.form-row').hide();\n            $('[id*=\"_t2secondbuttontext\"]').parents('.form-row').hide();\n            $('[id*=\"_t3firstbuttontext\"]').parents('.form-row').hide();\n            $('[id*=\"_t3secondbuttontext\"]').parents('.form-row').hide();\n\n            if ($('[id*=\"_ctacount\"]').val() === '1') {\n                $('[id*=\"_secondbuttontext\"]').parents('.form-row').hide();\n            } else {\n                $('[id*=\"_secondbuttontext\"]').parents('.form-row').show();\n            }\n            break;\n        case '2':\n            $('[id*=\"_banneralternate\"]').parents('.checkbox').show();\n            $('[id*=\"_bannersidebyside\"]').parents('.checkbox').show();\n            $('[id*=\"_contentwidth\"]').parents('.selectbox').show();\n            $('[id*=\"_contentposition\"]').parents('.selectbox').show();\n            $('[id*=\"_headerstyle\"]').parents('.selectbox').show();\n            $('[id*=\"_mobileprimary\"]').parents('.checkbox').show();\n            $('[id*=\"_subheaderstyle\"]').parents('.selectbox').show();\n            $('[id*=\"_ctacount\"]').parents('.selectbox').show();\n            $('[id*=\"_ctastyle\"]').parents('.selectbox').show();\n            $('[id*=\"_firstheading\"]').parents('.form-row').show();\n            $('[id*=\"_firstbuttontext\"]').parents('.form-row').show();\n            $('[id*=\"_firstsubheading\"]').parents('.form-row').show();\n\n            $('[id*=\"_herosecondary\"]').parents('.checkbox').hide();\n            $('[id*=\"_contentbackground\"]').parents('.checkbox').hide();\n            $('[id*=\"_tilealternate\"]').parents('.checkbox').hide();\n            $('[id*=\"_tilecontentlocation\"]').parents('.selectbox').hide();\n            $('[id*=\"_tiletreatment\"]').parents('.checkbox').hide();\n            $('[id*=\"_secondheading\"]').parents('.form-row').hide();\n            $('[id*=\"_thirdheading\"]').parents('.form-row').hide();\n            $('[id*=\"_secondbuttontext\"]').parents('.form-row').hide();\n            $('[id*=\"_thirdbuttontext\"]').parents('.form-row').hide();\n            $('[id*=\"_tilessubcallout\"]').parents('.form-row').hide();\n            $('[id*=\"_tilescallout\"]').parents('.form-row').hide();\n            $('.tilesheaderone').hide();\n            $('.tilesheadertwo').hide();\n            $('[id*=\"_t2firstbuttontext\"]').parents('.form-row').hide();\n            $('[id*=\"_t2secondbuttontext\"]').parents('.form-row').hide();\n            $('[id*=\"_t3firstbuttontext\"]').parents('.form-row').hide();\n            $('[id*=\"_t3secondbuttontext\"]').parents('.form-row').hide();\n\n            if ($('[id*=\"_bannersidebyside\"]').is(':checked')) {\n                $('[id*=\"_sidebysideposition\"]').parents('.selectbox').show();\n                $('[id*=\"_bannerstacked\"]').parents('.checkbox').show();\n                if (!$('[id*=\"_bannerstacked\"]').is(':checked')) {\n                    $('[id*=\"_contentwidth\"]').parents('.selectbox').hide();\n                    $('[id*=\"_contentposition\"]').parents('.selectbox').hide();\n                }\n            } else {\n                $('[id*=\"_sidebysideposition\"]').parents('.selectbox').hide();\n                $('[id*=\"_contentwidth\"]').parents('.selectbox').show();\n                $('[id*=\"_contentposition\"]').parents('.selectbox').show();\n                $('[id*=\"_bannerstacked\"]').parents('.checkbox').hide();\n            }\n            if ($('[id*=\"_ctacount\"]').val() === '1') {\n                $('[id*=\"_secondbuttontext\"]').parents('.form-row').hide();\n            } else {\n                $('[id*=\"_secondbuttontext\"]').parents('.form-row').show();\n            }\n            break;\n        case '3':\n            $('[id*=\"_tilealternate\"]').parents('.checkbox').show();\n            $('[id*=\"_tiletreatment\"]').parents('.checkbox').show();\n            $('[id*=\"_tilecontentlocation\"]').parents('.selectbox').show();\n            $('[id*=\"_contentposition\"]').parents('.selectbox').show();\n            $('[id*=\"_headerstyle\"]').parents('.selectbox').show();\n            $('[id*=\"_mobileprimary\"]').parents('.checkbox').show();\n            $('[id*=\"_ctacount\"]').parents('.selectbox').show();\n            $('[id*=\"_ctastyle\"]').parents('.selectbox').show();\n            $('[id*=\"_tilessubcallout\"]').parents('.form-row').show();\n            $('[id*=\"_tilescallout\"]').parents('.form-row').show();\n            $('[id*=\"_secondheading\"]').parents('.form-row').show();\n            $('.tilesheaderone').show();\n            $('[id*=\"_t2firstbuttontext\"]').parents('.form-row').show();\n\n            $('[id*=\"_subheaderstyle\"]').parents('.selectbox').hide();\n            $('[id*=\"_contentwidth\"]').parents('.selectbox').hide();\n            $('[id*=\"_herosecondary\"]').parents('.checkbox').hide();\n            $('[id*=\"_contentbackground\"]').parents('.checkbox').hide();\n            $('[id*=\"_banneralternate\"]').parents('.checkbox').hide();\n            $('[id*=\"_bannersidebyside\"]').parents('.checkbox').hide();\n            $('[id*=\"_sidebysideposition\"]').parents('.selectbox').hide();\n            $('[id*=\"_bannerstacked\"]').parents('.checkbox').hide();\n            $('[id*=\"_firstsubheading\"]').parents('.form-row').hide();\n            $('[id*=\"_thirdbuttontext\"]').parents('.form-row').hide();\n            $('[id*=\"_t3firstbuttontext\"]').parents('.form-row').hide();\n            $('[id*=\"_t3secondbuttontext\"]').parents('.form-row').hide();\n            $('.tilesheadertwo').hide();\n\n            if ($('[id*=\"_ctacount\"]').val() === '1') {\n                $('[id*=\"_secondbuttontext\"]').parents('.form-row').hide();\n                $('[id*=\"_t2secondbuttontext\"]').parents('.form-row').hide();\n            } else {\n                $('[id*=\"_secondbuttontext\"]').parents('.form-row').show();\n                $('[id*=\"_t2secondbuttontext\"]').parents('.form-row').show();\n            }\n            break;\n        case '4':\n            $('[id*=\"_tilealternate\"]').parents('.checkbox').show();\n            $('[id*=\"_tiletreatment\"]').parents('.checkbox').show();\n            $('[id*=\"_tilecontentlocation\"]').parents('.selectbox').show();\n            $('[id*=\"_contentposition\"]').parents('.selectbox').show();\n            $('[id*=\"_headerstyle\"]').parents('.selectbox').show();\n            $('[id*=\"_mobileprimary\"]').parents('.checkbox').show();\n            $('[id*=\"_ctacount\"]').parents('.selectbox').show();\n            $('[id*=\"_ctastyle\"]').parents('.selectbox').show();\n            $('[id*=\"_tilessubcallout\"]').parents('.form-row').show();\n            $('[id*=\"_tilescallout\"]').parents('.form-row').show();\n            $('[id*=\"_secondheading\"]').parents('.form-row').show();\n            $('[id*=\"_thirdheading\"]').parents('.form-row').show();\n            $('.tilesheaderone').show();\n            $('.tilesheadertwo').show();\n            $('[id*=\"_t2firstbuttontext\"]').parents('.form-row').show();\n            $('[id*=\"_t3firstbuttontext\"]').parents('.form-row').show();\n\n            $('[id*=\"_subheaderstyle\"]').parents('.selectbox').hide();\n            $('[id*=\"_contentwidth\"]').parents('.selectbox').hide();\n            $('[id*=\"_herosecondary\"]').parents('.checkbox').hide();\n            $('[id*=\"_contentbackground\"]').parents('.checkbox').hide();\n            $('[id*=\"_banneralternate\"]').parents('.checkbox').hide();\n            $('[id*=\"_bannersidebyside\"]').parents('.checkbox').hide();\n            $('[id*=\"_sidebysideposition\"]').parents('.selectbox').hide();\n            $('[id*=\"_bannerstacked\"]').parents('.checkbox').hide();\n            $('[id*=\"_firstsubheading\"]').parents('.form-row').hide();\n            $('[id*=\"_thirdbuttontext\"]').parents('.form-row').hide();\n\n            if ($('[id*=\"_ctacount\"]').val() === '1') {\n                $('[id*=\"_secondbuttontext\"]').parents('.form-row').hide();\n                $('[id*=\"_t2secondbuttontext\"]').parents('.form-row').hide();\n                $('[id*=\"_t3secondbuttontext\"]').parents('.form-row').hide();\n            } else {\n                $('[id*=\"_secondbuttontext\"]').parents('.form-row').show();\n                $('[id*=\"_t2secondbuttontext\"]').parents('.form-row').show();\n                $('[id*=\"_t3secondbuttontext\"]').parents('.form-row').show();\n            }\n            break;\n        case '5':\n            $('[id*=\"_sidebysideposition\"]').parents('.selectbox').show();\n            $('[id*=\"_headerstyle\"]').parents('.selectbox').show();\n            $('[id*=\"_mobileprimary\"]').parents('.checkbox').show();\n            $('[id*=\"_subheaderstyle\"]').parents('.selectbox').show();\n            $('[id*=\"_ctacount\"]').parents('.selectbox').show();\n            $('[id*=\"_ctastyle\"]').parents('.selectbox').show();\n            $('[id*=\"_secondheading\"]').parents('.form-row').show();\n            $('[id*=\"_firstheading\"]').parents('.form-row').show();\n            $('[id*=\"_firstsubheading\"]').parents('.form-row').show();\n\n            $('[id*=\"_banneralternate\"]').parents('.checkbox').hide();\n            $('[id*=\"_bannersidebyside\"]').parents('.checkbox').hide();\n            $('[id*=\"_tilealternate\"]').parents('.checkbox').hide();\n            $('[id*=\"_tiletreatment\"]').parents('.checkbox').hide();\n            $('[id*=\"_herosecondary\"]').parents('.checkbox').hide();\n            $('[id*=\"_contentwidth\"]').parents('.selectbox').hide();\n            $('[id*=\"_contentbackground\"]').parents('.checkbox').hide();\n            $('[id*=\"_contentposition\"]').parents('.selectbox').hide();\n            $('[id*=\"_tilecontentlocation\"]').parents('.selectbox').hide();\n            $('[id*=\"_bannerstacked\"]').parents('.checkbox').hide();\n            $('[id*=\"_secondheading\"]').parents('.form-row').hide();\n            $('[id*=\"_thirdheading\"]').parents('.form-row').hide();\n            $('[id*=\"_secondbuttontext\"]').parents('.form-row').hide();\n            $('[id*=\"_thirdbuttontext\"]').parents('.form-row').hide();\n            $('[id*=\"_tilessubcallout\"]').parents('.form-row').hide();\n            $('[id*=\"_tilescallout\"]').parents('.form-row').hide();\n            $('[id*=\"_mobileprimary\"]').parents('.checkbox').hide();\n            $('.tilesheaderone').hide();\n            $('.tilesheadertwo').hide();\n            $('[id*=\"_t2firstbuttontext\"]').parents('.form-row').hide();\n            $('[id*=\"_t2secondbuttontext\"]').parents('.form-row').hide();\n            $('[id*=\"_t3firstbuttontext\"]').parents('.form-row').hide();\n            $('[id*=\"_t3secondbuttontext\"]').parents('.form-row').hide();\n            break;\n        default:\n            break;\n        }\n    });\n    $('[id*=\"_bannersidebyside\"]').change(() => {\n        if ($('[id*=\"_bannersidebyside\"]').is(':checked')) {\n            $('[id*=\"_sidebysideposition\"]').parents('.selectbox').show();\n            $('[id*=\"_bannerstacked\"]').parents('.checkbox').show();\n            if (!$('[id*=\"_bannerstacked\"]').is(':checked')) {\n                $('[id*=\"_contentwidth\"]').parents('.selectbox').hide();\n                $('[id*=\"_contentposition\"]').parents('.selectbox').hide();\n            }\n        } else {\n            $('[id*=\"_sidebysideposition\"]').parents('.selectbox').hide();\n            $('[id*=\"_contentwidth\"]').parents('.selectbox').show();\n            $('[id*=\"_contentposition\"]').parents('.selectbox').show();\n            $('[id*=\"_bannerstacked\"]').parents('.checkbox').hide();\n            $('[id*=\"_bannerstacked\"]').prop('checked', false);\n        }\n    });\n    $('[id*=\"_bannerstacked\"]').change(() => {\n        if ($('[id*=\"_bannerstacked\"]').is(':checked')) {\n            $('[id*=\"_contentwidth\"]').parents('.selectbox').show();\n            $('[id*=\"_contentposition\"]').parents('.selectbox').show();\n        } else {\n            $('[id*=\"_contentwidth\"]').parents('.selectbox').hide();\n            $('[id*=\"_contentposition\"]').parents('.selectbox').hide();\n        }\n    });\n    $('[id*=\"_tilecontentlocation\"]').on('change', (event) => {\n        if ($(event.currentTarget).val() === '2') {\n            $('[id*=\"_contentposition\"]').parents('.selectbox').hide();\n            $('[id*=\"_ctacount\"]').parents('.selectbox').hide();\n            $('[id*=\"_ctastyle\"]').parents('.selectbox').hide();\n            $('.tilesheaderone').hide();\n            $('.tilesheadertwo').hide();\n            $('[id*=\"_t2firstbuttontext\"]').parents('.form-row').hide();\n            $('[id*=\"_t2secondbuttontext\"]').parents('.form-row').hide();\n            $('[id*=\"_t3firstbuttontext\"]').parents('.form-row').hide();\n            $('[id*=\"_t3secondbuttontext\"]').parents('.form-row').hide();\n\n            if ($('[id*=\"_contenttype\"]').val() === '3') {\n                $('[id*=\"_secondbuttontext\"]').parents('.form-row').show();\n                $('[id*=\"_firstheading\"]').parents('.form-row').hide();\n                $('[id*=\"_secondheading\"]').parents('.form-row').hide();\n                $('[id*=\"_thirdheading\"]').parents('.form-row').hide();\n            } else if ($('[id*=\"_contenttype\"]').val() === '4') {\n                $('[id*=\"_secondbuttontext\"]').parents('.form-row').show();\n                $('[id*=\"_thirdbuttontext\"]').parents('.form-row').show();\n                $('[id*=\"_firstheading\"]').parents('.form-row').hide();\n                $('[id*=\"_secondheading\"]').parents('.form-row').hide();\n                $('[id*=\"_thirdheading\"]').parents('.form-row').hide();\n            }\n        } else {\n            $('[id*=\"_contentposition\"]').parents('.selectbox').show();\n            $('[id*=\"_ctacount\"]').parents('.selectbox').show();\n            $('[id*=\"_ctastyle\"]').parents('.selectbox').show();\n\n            if ($('[id*=\"_contenttype\"]').val() === '3') {\n                $('[id*=\"_secondbuttontext\"]').parents('.form-row').hide();\n                $('[id*=\"_firstheading\"]').parents('.form-row').show();\n                $('[id*=\"_secondheading\"]').parents('.form-row').show();\n                $('.tilesheaderone').show();\n                $('[id*=\"_t2firstbuttontext\"]').parents('.form-row').show();\n            } else if ($('[id*=\"_contenttype\"]').val() === '4') {\n                $('[id*=\"_secondbuttontext\"]').parents('.form-row').hide();\n                $('[id*=\"_thirdbuttontext\"]').parents('.form-row').hide();\n                $('[id*=\"_firstheading\"]').parents('.form-row').show();\n                $('[id*=\"_secondheading\"]').parents('.form-row').show();\n                $('[id*=\"_thirdheading\"]').parents('.form-row').show();\n                $('.tilesheaderone').show();\n                $('.tilesheadertwo').show();\n                $('[id*=\"_t2firstbuttontext\"]').parents('.form-row').show();\n                $('[id*=\"_t3firstbuttontext\"]').parents('.form-row').show();\n            }\n\n            if ($('[id*=\"_ctacount\"]').val() === '1') {\n                $('[id*=\"_secondbuttontext\"]').parents('.form-row').hide();\n            } else {\n                $('[id*=\"_secondbuttontext\"]').parents('.form-row').show();\n            }\n        }\n    });\n    $('[id*=\"_ctacount\"]').change((event) => {\n        if ($(event.currentTarget).val() === '1') {\n            $('[id*=\"_secondbuttontext\"]').parents('.form-row').hide();\n        } else {\n            $('[id*=\"_secondbuttontext\"]').parents('.form-row').show();\n        }\n        if ($('[id*=\"_contenttype\"]').val() === '3') {\n            if ($('[id*=\"_ctacount\"]').val() === '1') {\n                $('[id*=\"_secondbuttontext\"]').parents('.form-row').hide();\n                $('[id*=\"_t2secondbuttontext\"]').parents('.form-row').hide();\n            } else {\n                $('[id*=\"_secondbuttontext\"]').parents('.form-row').show();\n                $('[id*=\"_t2secondbuttontext\"]').parents('.form-row').show();\n            }\n        }\n        if ($('[id*=\"_contenttype\"]').val() === '4') {\n            if ($('[id*=\"_ctacount\"]').val() === '1') {\n                $('[id*=\"_secondbuttontext\"]').parents('.form-row').hide();\n                $('[id*=\"_t2secondbuttontext\"]').parents('.form-row').hide();\n                $('[id*=\"_t3secondbuttontext\"]').parents('.form-row').hide();\n            } else {\n                $('[id*=\"_secondbuttontext\"]').parents('.form-row').show();\n                $('[id*=\"_t2secondbuttontext\"]').parents('.form-row').show();\n                $('[id*=\"_t3secondbuttontext\"]').parents('.form-row').show();\n            }\n        }\n    });\n    $('.ebbo-membership-modal').trigger('click');\n}\n\nmodule.exports = {\n    init() {\n        initializeEvents();\n    },\n};\n","let $loader;\n\n/**\n * @function\n * @description Shows an AJAX-loader on top of a given container\n * @param {Element} container The Element on top of which the AJAX-Loader will be shown\n */\nconst show = (container) => {\n    const target = (!container || $(container).length === 0) ? $('body') : $(container);\n    $loader = $loader || $('.loader');\n\n    if ($loader.length === 0) {\n        $loader = $('<div/>').addClass('loader')\n            .append($('<div/>').addClass('loader-indicator'), $('<div/>').addClass('loader-bg'));\n    }\n    return $loader.appendTo(target).show();\n};\n/**\n * @function\n * @description Hides an AJAX-loader\n */\nconst hide = () => {\n    if ($loader) {\n        $loader.hide();\n    }\n};\n\nexports.show = show;\nexports.hide = hide;\n","const util = require('./util');\n\n/**\n * copied from https://github.com/darkskyapp/string-hash\n */\nfunction hashFn(str) {\n    let hash = 5381;\n    let i = str.length;\n\n    while (i) {\n        // eslint-disable-next-line no-bitwise\n        hash = (hash * 33) ^ str.charCodeAt(i -= 1);\n    }\n    /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed\n    * integers. Since we want the results to be always positive, convert the\n    * signed int to an unsigned by doing an unsigned bitshift. */\n    // eslint-disable-next-line no-bitwise\n    return hash >>> 0;\n}\n\n/**\n * Create rating based on hash ranging from 2-5\n * @param pid\n */\nfunction getRating(pid) {\n    return (hashFn(pid.toString()) % 30) / 10 + 2;\n}\n\nmodule.exports = {\n    init() {\n        $('.product-review').each((index, review) => {\n            const pid = $(review).data('pid');\n            if (!pid) {\n                return;\n            }\n            // rating range from 2 - 5\n            const rating = getRating(pid);\n            const baseRating = Math.floor(rating);\n            let starsCount = 0;\n            for (let i = 0; i < baseRating; i += 1) {\n                $('.rating', review).append(util.svg('ratings-full'));\n                starsCount += 1;\n            }\n            // give half star for anything in between\n            if (rating > baseRating) {\n                $('.rating', review).append(util.svg('ratings-half'));\n                starsCount += 1;\n            }\n            if (starsCount < 5) {\n                for (let j = 0; j < 5 - starsCount; j += 1) {\n                    $('.rating', review).append(util.svg('ratings-empty'));\n                }\n            }\n        });\n    },\n};\n","/**\n * @private\n * @function\n * @description Binds event to the place holder (.blur)\n */\nfunction init() {\n    $('#q').focus((event) => {\n        const input = $(event.currentTarget);\n        if (input.val() === input.attr('placeholder')) {\n            input.val('');\n        }\n    }).blur((event) => {\n        const input = $(event.currentTarget);\n        if (input.val() === '' || input.val() === input.attr('placeholder')) {\n            input.val(input.attr('placeholder'));\n        }\n    }).blur();\n}\n\nmodule.exports = {\n    init,\n};\n","const util = require('./util');\n\nlet currentQuery = null;\nlet lastQuery = null;\nlet runningQuery = null;\nconst listTotal = -1;\nlet listCurrent = -1;\nconst delay = 30;\nlet $resultsContainer;\n/**\n * @function\n * @description Handles keyboard's arrow keys\n * @param keyCode Code of an arrow key to be handled\n */\nfunction handleArrowKeys(keyCode) {\n    switch (keyCode) {\n    case 38:\n        // keyUp\n        listCurrent = (listCurrent <= 0) ? (listTotal - 1) : (listCurrent - 1);\n        break;\n    case 40:\n        // keyDown\n        listCurrent = (listCurrent >= listTotal - 1) ? 0 : listCurrent + 1;\n        break;\n    default:\n        // reset\n        listCurrent = -1;\n        return false;\n    }\n\n    $resultsContainer.children().removeClass('selected').eq(listCurrent).addClass('selected');\n    $('input[name=\"q\"]').val($resultsContainer.find('.selected .suggestionterm').first().text());\n    return true;\n}\n\nconst searchsuggest = {\n    /**\n     * @function\n     * @description Configures parameters and required object instances\n     */\n    init(container, defaultValue) {\n        const $searchContainer = $(container);\n        const $searchForm = $searchContainer.find('form[name=\"simpleSearch\"]');\n        const $searchField = $searchForm.find('input[name=\"q\"]');\n\n        // disable browser auto complete\n        $searchField.attr('autocomplete', 'off');\n\n        // on focus listener (clear default value)\n        $searchField.focus(() => {\n            if (!$resultsContainer) {\n                // create results container if needed\n                $resultsContainer = $('<div/>').attr('id', 'search-suggestions').appendTo($searchContainer);\n            }\n            if ($searchField.val() === defaultValue) {\n                $searchField.val('');\n            }\n        });\n\n        $(document).on('click', (e) => {\n            if (!$searchContainer.is(e.target)) {\n                setTimeout(this.clearResults, 200);\n            }\n        });\n        // on key up listener\n        $searchField.keyup((e) => {\n            // get keyCode (window.event is for IE)\n            const keyCode = e.keyCode || window.event.keyCode;\n\n            // check and treat up and down arrows\n            if (handleArrowKeys(keyCode)) {\n                return;\n            }\n            // check for an ENTER or ESC\n            if (keyCode === 13 || keyCode === 27) {\n                this.clearResults();\n                return;\n            }\n\n            currentQuery = $searchField.val().trim();\n\n            // no query currently running, init an update\n            if (!runningQuery) {\n                runningQuery = currentQuery;\n                setTimeout(this.suggest.bind(this), delay);\n            }\n        });\n        // on submit listener\n        $('.search-form').on('submit', (event) => {\n            event.preventDefault();\n            const searchField = $(event.currentTarget).find('input[name=\"q\"]');\n            const searchTerm = searchField.val();\n            if (searchTerm !== searchField.attr('placeholder') && searchTerm.length > 0) {\n                window.location = util.appendParamToURL($(event.currentTarget).attr('action'), 'q', searchTerm);\n            }\n        }).bind(this);\n    },\n\n    /**\n     * @function\n     * @description trigger suggest action\n     */\n    suggest() {\n        // check whether query to execute (runningQuery) is still up to date and had not changed in the meanwhile\n        // (we had a little delay)\n        if (runningQuery !== currentQuery) {\n            // update running query to the most recent search phrase\n            runningQuery = currentQuery;\n        }\n\n        // if it's empty clear the results box and return\n        if (runningQuery.length === 0) {\n            this.clearResults();\n            runningQuery = null;\n            return;\n        }\n\n        // if the current search phrase is the same as for the last suggestion call, just return\n        if (lastQuery === runningQuery) {\n            runningQuery = null;\n            return;\n        }\n\n        // build the request url\n        const reqUrl = util.appendParamToURL(Urls.searchsuggest, 'q', runningQuery);\n        // execute server call\n        $.get(reqUrl, (data) => {\n            const suggestionHTML = data;\n            const ansLength = suggestionHTML.trim().length;\n\n            // if there are results populate the results div\n            if (ansLength === 0) {\n                this.clearResults();\n            } else {\n                // update the results div\n                $resultsContainer.html(suggestionHTML).fadeIn(200);\n            }\n\n            // record the query that has been executed\n            lastQuery = runningQuery;\n            // reset currently running query\n            runningQuery = null;\n\n            // check for another required update (if current search phrase is different from just executed call)\n            if (currentQuery !== lastQuery) {\n                // ... and execute immediately if search has changed while this server call was in transit\n                runningQuery = currentQuery;\n                setTimeout(this.suggest.bind(this), delay);\n            }\n            this.hideLeftPanel();\n        });\n    },\n    /**\n     * @function\n     * @description\n     */\n    clearResults() {\n        if (!$resultsContainer) { return; }\n        $resultsContainer.fadeOut(200, () => { $resultsContainer.empty(); });\n    },\n    /**\n     * @function\n     * @description\n     */\n    hideLeftPanel() {\n        // hide left panel if there is only a matching suggested custom phrase\n        if ($('.search-suggestion-left-panel-hit').length === 1 && $('.search-phrase-suggestion a').text().replace(/(^[\\s]+|[\\s]+$)/g, '').toUpperCase() === $('.search-suggestion-left-panel-hit a').text().toUpperCase()) {\n            $('.search-suggestion-left-panel').css('display', 'none');\n            $('.search-suggestion-wrapper-full').addClass('search-suggestion-wrapper');\n            $('.search-suggestion-wrapper').removeClass('search-suggestion-wrapper-full');\n        }\n    },\n};\n\nmodule.exports = searchsuggest;\n","/**\n * Calls out to the TLS service and calls the callback with a message (if necessary)\n * @function getTLS\n *\n * @param {string} url - URL of external TLS-checking API\n * @param {function} callback - function to call with response\n * */\nfunction getTLS(url, callback) {\n    const message = [];\n\n    // First, see if the browser is among the suspect browsers to see if a TLS check is necessary\n    const {userAgent} = navigator;\n\n    /** This list derived from https://www.ssllabs.com/ssltest/clients.html * */\n    const badBrowsers = ['MSIE 6.0', 'MSIE 7.0', 'MSIE 8.0', 'MSIE 9.0', 'MSIE 10.0',\n        'Android 2.3.7', 'Android 4.0.4', 'Android 4.1.1', 'Android 4.2.2', 'Android 4.3',\n        'Safari 5.1.9 / OS X 10.6.8', 'Safari 6.0.4 / OS X 10.8.4 '];\n    function checkTLSLevel(data) {\n        // If we can determine the TLS level, check to see if it's less than 1.2\n        if (parseFloat(data.tls_version.split(' ')[1]) < 1.1) {\n            message.push(Resources.TLS_WARNING);\n            callback(message);\n\n            // If you want to track statistics on bad TLS hits, include this call\n            $.ajax({url: Urls.TLSBadTLS});\n        }\n    }\n\n    function reportBadBrowser() {\n        // If the TLS level cannot be determined just report that this browser is suspect\n        message.push(Resources.TLS_WARNING);\n        callback(message);\n\n        // If you want to track statistics on deprecated browsers, include this call\n        $.ajax({url: Urls.TLSBadBrowser});\n    }\n\n    for (let i = 0; i < badBrowsers.length; i += 1) {\n        if (userAgent.match(badBrowsers[i])) {\n            // It's a suspect browser, let's see what it's TLS level is\n            $.ajax({\n                url,\n            }).done(checkTLSLevel).fail(reportBadBrowser);\n            break;\n        }\n    }\n\n    /** For testing purposes, uncomment this block\n        message.push(Resources.TLS_WARNING);\n    * */\n    callback(message);\n}\n\n/**\n * @function showWarning turns on the browser-compatibility-alert and sets the message\n *\n * @param {string} message - the message that will be shown upon detection of a bad browser\n * */\nfunction showWarning(message) {\n    $('<div/>').addClass('browser-compatibility-alert').append($('<p/>').addClass('browser-error').html(message)).appendTo('#browser-check');\n}\n\n/**\n * @function getCookie\n *\n * @param {string} key - The cookie name\n * @returns {string} value - the value of the cookie if found, null otherwise\n * */\nfunction getCookie(key) {\n    const cookies = document.cookie.split(';');\n    for (let i = 0; i < cookies.length; i += 1) {\n        const tokens = cookies[i].split('=');\n        const cookieKey = tokens[0].trim();\n        if (cookieKey === key) {\n            return tokens[1];\n        }\n    }\n    return '';\n}\n\n/**\n * @function setCookie\n *\n * @param {string} key - The cookie name\n * @param {string} value - The cookie value\n * @param {integer} minutes - The number of minutes to expire the cookie\n * */\nfunction setCookie(key, value, minutes) {\n    const date = new Date();\n    date.setTime(date + (minutes * 60 * 1000));\n\n    document.cookie = `${key}=${value}; expires=${date.toGMTString()}; path=/`;\n}\n\n/**\n * Checks the TLS and displays a warning if appropriate\n * @function getUserAgent Checks the TLS and displays a warning if appropriate\n * */\nfunction getUserAgent() {\n    // Use an external service to check the TLS of the browser\n    // NOTE: this implementation uses https://www.howsmyssl.com\n    //     you may also wish to consider the API available at https://www.ssllabs.com/projects/ssllabs-apis/index.html\n    const url = 'https://www.howsmyssl.com/a/check';\n    const cookieName = 'dw_TLSWarning';\n    const cookieValue = getCookie(cookieName);\n\n    // Test to see if this browser has already been flagged by looking at its cookies\n    if (!cookieValue) {\n        getTLS(url, (message) => {\n            if (message.length > 0) {\n                showWarning(message[0]);\n\n                // the browser is bad - set the cookie to true (for 15 minutes)\n                setCookie(cookieName, 'true', 15);\n            } else {\n                // else the browser is good, set the cookie to false (for 30 days) so we don't check again\n                setCookie(cookieName, 'false', 60 * 24 * 30);\n            }\n        });\n    } else if (cookieValue === 'true') {\n        // if we already know that this is an invalid browser, show the warning\n        showWarning(Resources.TLS_WARNING);\n    }\n}\n\n/**\n * Export the getUserAgent function\n */\nmodule.exports = {\n    getUserAgent,\n};\n","/**\n * @function\n * @description Initializes the tooltip-content and layout\n */\nmodule.exports = {\n    init() {\n        $(document).tooltip({\n            items: '.tooltip',\n            track: true,\n            content() {\n                return $(this).find('.tooltip-content').html();\n            },\n        });\n\n        $('.share-link').on('click', (event) => {\n            event.preventDefault();\n            const target = $(event.currentTarget).data('target');\n            if (!target) {\n                return;\n            }\n            $(target).toggleClass('active');\n        });\n    },\n};\n","const naPhone = /^\\(?([2-9][0-8][0-9])\\)?[-. ]?([2-9][0-9]{2})[-. ]?([0-9]{4})(\\s*x[0-9]+)?$/;\nconst regex = {\n    phone: {\n        us: naPhone,\n        ca: naPhone,\n        fr: /^0[1-6]{1}(([0-9]{2}){4})|((\\s[0-9]{2}){4})|((-[0-9]{2}){4})$/,\n        it: /^(([0-9]{2,4})([-\\s/]{0,1})([0-9]{4,8}))?$/,\n        jp: /^(0\\d{1,4}- ?)?\\d{1,4}-\\d{4}$/,\n        cn: /.*/,\n        gb: /^((\\(?0\\d{4}\\)?\\s?\\d{3}\\s?\\d{3})|(\\(?0\\d{3}\\)?\\s?\\d{3}\\s?\\d{4})|(\\(?0\\d{2}\\)?\\s?\\d{4}\\s?\\d{4}))(\\s?#(\\d{4}|\\d{3}))?$/,\n    },\n    postal: {\n        us: /^\\d{5}(-\\d{4})?$/,\n        ca: /^[ABCEGHJKLMNPRSTVXY]{1}\\d{1}[A-Z]{1} *\\d{1}[A-Z]{1}\\d{1}$/,\n        fr: /^(F-)?((2[A|B])|[0-9]{2})[0-9]{3}$/,\n        it: /^([0-9]){5}$/,\n        jp: /^([0-9]){3}[-]([0-9]){4}$/,\n        cn: /^([0-9]){6}$/,\n        gb: /^([A-PR-UWYZ0-9][A-HK-Y0-9][AEHMNPRTVXY0-9]?[ABEHMNPRVWXY0-9]? {1,2}[0-9][ABD-HJLN-UW-Z]{2}|GIR 0AA)$/,\n        xx: /^\\d{5}(-\\d{4})?$/,\n    },\n    notCC: /^(?!(([0-9 -]){13,19})).*$/,\n    email: /^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,7}$/,\n    nameAndAddress: /^[A-Za-z0-9&#/& -]+$/,\n    personalizationMsg: /^[A-Za-z0-9&#/&!, .-]+$/,\n\n};\nconst requiredLengths = {\n    password: {\n        min: 6,\n        max: 255,\n    },\n};\n\nfunction checkBilling() {\n    /* Loop through form fields to see if an error exists */\n    $('#dwfrm_billing input').each((index, element) => {\n        if ($(element).hasClass('error') || $('#dwfrm_billing_billingAddress_addressFields_states_state').hasClass('error')) {\n            $('#dwfrm_billing button[name=\"dwfrm_billing_createAccount\"]').attr('disabled', 'disabled');\n            $('#dwfrm_billing button[name=\"dwfrm_billingaddress_apply\"]').attr('disabled', 'disabled');\n            $('#dwfrm_billing button[name=\"dwfrm_billing_addAddress\"]').attr('disabled', 'disabled');\n            return false; /* Found Error, stop loop, no need to check more */\n        }\n        $('#dwfrm_billing button[name=\"dwfrm_billing_createAccount\"]').removeAttr('disabled');\n        $('#dwfrm_billing button[name=\"dwfrm_billingaddress_apply\"]').removeAttr('disabled');\n        $('#dwfrm_billing button[name=\"dwfrm_billing_addAddress\"]').removeAttr('disabled');\n        return true;\n    });\n}\n\nfunction checkShipping() {\n    /* Loop through form fields to see if an error exists */\n    $('#EditAddressForm input').each((index, element) => {\n        if ($(element).hasClass('error') || $('#dwfrm_shippingaddress_states_state').hasClass('error')) {\n            $('#dwfrm_singleshipping_shippingAddress button[name=\"dwfrm_singleshipping_shippingAddress_save\"]').attr('disabled', 'disabled');\n            $('#dwfrm_singleshipping_shippingAddress button[name=\"dwfrm_shippingaddress_apply\"]').attr('disabled', 'disabled');\n            return false; /* Found Error, stop loop, no need to check more */\n        }\n        $('#dwfrm_singleshipping_shippingAddress button[name=\"dwfrm_singleshipping_shippingAddress_save\"]').removeAttr('disabled');\n        $('#dwfrm_singleshipping_shippingAddress button[name=\"dwfrm_shippingaddress_apply\"]').removeAttr('disabled');\n        return true;\n    });\n}\n\nfunction checkCreateAccount() {\n    /* Loop through form fields to see if an error exists */\n    $('#RegistrationForm input').each((index, element) => {\n        if ($(element).hasClass('error') || $('#dwfrm_profile_address_states_state').hasClass('error')) {\n            $('button[name=\"dwfrm_profile_confirm\"]').attr('disabled', 'disabled');\n            return false; /* Found Error, stop loop, no need to check more */\n        }\n        $('button[name=\"dwfrm_profile_confirm\"]').removeAttr('disabled');\n        return true;\n    });\n}\nfunction checkAddAddress() {\n    /* Loop through form fields to see if an error exists */\n    $('#edit-address-form input').each((index, element) => {\n        if ($(element).hasClass('error') || $('#dwfrm_profile_address_states_state').hasClass('error')) {\n            $('button[name=\"dwfrm_profile_address_create\"]').attr('disabled', 'disabled');\n            return false; /* Found Error, stop loop, no need to check more */\n        }\n        $('button[name=\"dwfrm_profile_address_create\"]').removeAttr('disabled');\n        return true;\n    });\n}\nfunction checkCatalogRequest() {\n    /* Loop through form fields to see if an error exists */\n    $('#CatalogRequestForm input').each((index, element) => {\n        if ($(element).hasClass('error') || $('#dwfrm_catalogrequest_addressFields_states_state').hasClass('error')) {\n            $('button[name=\"dwfrm_catalogrequest_send\"]').attr('disabled', 'disabled');\n            return false; /* Found Error, stop loop, no need to check more */\n        }\n        $('button[name=\"dwfrm_catalogrequest_send\"]').removeAttr('disabled');\n        return true;\n    });\n}\n\nfunction checkMultiship() {\n    /* Loop through form fields to see if an error exists */\n    $('#EditAddressForm input').each((index, element) => {\n        if ($(element).hasClass('error') || $('#dwfrm_multishipping_editAddress_addressFields_states_state').hasClass('error')) {\n            $('#dwfrm_multishipping_addressSelection button[name=\"dwfrm_multishipping_editAddress_save\"]').attr('disabled', 'disabled');\n            $('#dwfrm_multishipping_addressSelection button[name=\"dwfrm_multishipping_addressSelection_save\"]').attr('disabled', 'disabled');\n            return false; /* Found Error, stop loop, no need to check more */\n        }\n        $('#dwfrm_multishipping_addressSelection button[name=\"dwfrm_multishipping_editAddress_save\"]').removeAttr('disabled');\n        $('#dwfrm_multishipping_addressSelection button[name=\"dwfrm_multishipping_addressSelection_save\"]').removeAttr('disabled');\n        return true;\n    });\n}\n\n// global form validator settings\nconst settings = {\n    errorClass: 'error',\n    errorElement: 'span',\n    errorPlacement($error, $element) {\n        const $selectStyle = $element.parent('.select-style');\n        const $label = $element.next('label');\n\n        if ($selectStyle.length > 0) {\n            $selectStyle.after($error);\n        } else if ($element.attr('type') === 'checkbox' || $element.attr('type') === 'radio') {\n            if ($label.length > 0) {\n                $label.after($error);\n            } else {\n                $element.after($error);\n            }\n        } else {\n            $element.after($error);\n        }\n    },\n    ignore: '.suppress, :hidden',\n    onkeyup: false,\n    onfocusout(element) {\n        if (!this.checkable(element) && !$(element).hasClass('hasDatepicker')) {\n            this.element(element);\n        }\n        checkBilling();\n        checkShipping();\n        checkCreateAccount();\n        checkAddAddress();\n        checkCatalogRequest();\n        checkMultiship();\n    },\n    highlight(element, errorClass) {\n        $(element).addClass(errorClass);\n        $(element.form).find(`label[for=${element.id}]`).addClass(errorClass);\n    },\n    unhighlight(element, errorClass) {\n        $(element).removeClass(errorClass);\n        $(element.form).find(`label[for=${element.id}]`).removeClass(errorClass);\n    },\n};\n\n/**\n * @function\n * @description Validates the given email address\n * @param {String} value The email field which will be validated\n * @param {String} el The input field\n */\nfunction validateEmail(value, el) {\n    let isValid = true;\n    if ($(el).hasClass('required') || value.length > 0) {\n        isValid = regex.email.test($.trim(value));\n    }\n    return isValid;\n}\n\n/**\n * @function\n * @description Validates the given email address\n * @param {String} value The email field which will be validated\n * @param {String} el The input field\n */\nfunction validateConfirmEmail(value, el) {\n    let isValid = regex.email.test($.trim(value));\n    const buttons = $(el).closest('form').find('*[type=\"submit\"]');\n    if (isValid) {\n        const sourceElement = $('input[name*=\"dwfrm_profile_customer_emailconfirm\"]');\n        const sourceValue = sourceElement.val();\n        isValid = value.trim().toLowerCase() === sourceValue.trim().toLowerCase();\n    }\n\n    if (isValid) {\n        buttons.removeAttr('disabled');\n    } else {\n        buttons.attr('disabled', 'disabled');\n    }\n\n    return isValid;\n}\n\n/**\n * @function\n * @description Validates the given email address\n * @param {String} value The email field which will be validated\n * @param {String} el The input field\n */\nfunction validateNewsletterEmail(value, el) {\n    let isValid = true;\n    if ($(el).length > 0) {\n        isValid = regex.email.test($.trim(value));\n    }\n    return isValid;\n}\n\n/**\n * @function\n * @description Validates a given phone number against the countries phone regex\n * @param {String} value The phone number which will be validated\n * @param {String} el The input field\n */\nfunction validatePhone(value, el) {\n    const country = $(el).closest('form').find('.country');\n    let countryValue = 'us';\n\n    if (country.size() !== 0 && country.val()) {\n        countryValue = country.val().toLowerCase();\n    }\n\n    return this.optional(el) || regex.phone[countryValue].test($.trim(value));\n}\n\n/**\n * @function\n * @description Validates that a credit card owner is not a Credit card number\n * @param {String} value The owner field which will be validated\n * @param {String} el The input field\n */\nfunction validateOwner(value) {\n    return regex.notCC.test($.trim(value));\n}\n\n/**\n * @function\n * @description Validates a given postal code against the countries postal code regex\n * @param {String} value The postal code which will be validated\n * @param {String} el The input field\n */\nfunction validatePostalCode(value, el) {\n    const postalCode = $(el).closest('form').find('.postal');\n    const country = $(el).closest('form').find('.country');\n    let rgx;\n    const rgxXX = 'xx';\n    if (country.length > 0 && !regex.postal[country.val().toLowerCase()]) {\n        rgx = regex.postal[rgxXX];\n    } else if (country.length > 0) {\n        rgx = regex.postal[country.val().toLowerCase()];\n    } else {\n        rgx = regex.postal[rgxXX];\n    }\n    const isValid = rgx.test($.trim(value));\n\n    if (isValid && (postalCode.length === 0 || postalCode.val().length === 0)) {\n        return true;\n    }\n\n    return isValid;\n}\n\nfunction validateNameAndAddress(value, el) {\n    let isValid = regex.nameAndAddress.test($.trim(value));\n\n    if (!$(el).hasClass('required') && value.length === 0) {\n        isValid = true;\n    }\n\n    return isValid;\n}\n\nfunction validatePersonalizationMsg(value, el) {\n    let isValid = regex.personalizationMsg.test($.trim(value));\n\n    if (!$(el).hasClass('required') && value.length === 0) {\n        isValid = true;\n    }\n\n    return isValid;\n}\n\n/**\n * @function\n * @description Validates personalization input based on punctuation data attribute\n * example: \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\"\n * @param {String} value The owner field which will be validated\n * @param {String} el The input field\n */\nfunction validatePersonalization(value, el) {\n    let isValid = true;\n    let punctuation = $(el).data('punctuation');\n    // Data attributes will always make every attempt to convert to a JS value (booleans, numbers, objects, arrays, and null)\n    // in order to use the methods below it needs to be a string so we always attempt to convert back to a string in case it has been altered.\n    punctuation = punctuation.toString();\n    if (punctuation != null && punctuation !== '' && value) {\n        punctuation = punctuation.replace(/[^a-z\\d\\s]/gi, (specialChar) => `\\\\${specialChar}`);\n        const rgx = new RegExp(`^[${punctuation}]+$`, 'gi');\n        isValid = value.match(rgx);\n\n        if (isValid) {\n            $(el).removeAttr('invalidChars', '');\n        } else {\n            // Regex to find invalid characters\n            const invalidCharsRgx = new RegExp(`[^${punctuation}]`, 'gi');\n            // Regex to match invalid characters, to return array of chars\n            const invalidChars = value.match(invalidCharsRgx);\n            // Remove duplicates\n            const uniqueInvalidChars = [...new Set(invalidChars)];\n\n            if (uniqueInvalidChars.length) {\n                $(el).attr('invalidChars', uniqueInvalidChars.join(','));\n            }\n        }\n    }\n    if (isValid && value && $(el).data('fieldname') === 'date') {\n        isValid = value.match(/^(0?[1-9]|1[012]).(0?[1-9]|[12][0-9]|3[01]).(?:[0-9]{2})?[0-9]{2}$/);\n    }\n\n    return isValid;\n}\n\n/**\n * @function\n * @description Validates length range\n * @param {String} value The owner field which will be validated\n */\nfunction validatePasswordLengthRange(value, el) {\n    let isValid = true;\n    if ($(el).hasClass('required') && el.getAttribute('name').indexOf('ssn') < 0 && (value.length < requiredLengths.password.min || value.length > requiredLengths.password.max)) {\n        isValid = false;\n    }\n    return isValid;\n}\n\nfunction validateGiftCertAmount(value, el) {\n    return this.optional(el) || (!Number.isNaN(Number(value)) && parseFloat(value) >= 5 && parseFloat(value) <= 5000);\n}\n\nfunction validatePositiveNumber(value) {\n    return $.trim(value).length === 0 || (!Number.isNaN(Number(value)) && Number(value) >= 0);\n}\n\n/**\n * Add phone validation method to jQuery validation plugin.\n * Text fields must have 'phone' css class to be validated as phone\n */\n$.validator.addMethod('phone', validatePhone, Resources.INVALID_PHONE);\n\n/**\n * Add CCOwner validation method to jQuery validation plugin.\n * Text fields must have 'owner' css class to be validated as not a credit card\n */\n$.validator.addMethod('owner', validateOwner, Resources.INVALID_OWNER);\n\n/**\n * Add gift cert amount validation method to jQuery validation plugin.\n * Text fields must have 'gift-cert-amont' css class to be validated\n */\n$.validator.addMethod('gift-cert-amount', validateGiftCertAmount, Resources.GIFT_CERT_AMOUNT_INVALID);\n\n/**\n * Add positive number validation method to jQuery validation plugin.\n * Text fields must have 'positivenumber' css class to be validated as positivenumber\n */\n$.validator.addMethod('positivenumber', validatePositiveNumber, ''); // '' should be replaced with error message if needed\n\n/**\n * Add Email validation method to jQuery validation plugin.\n * Text fields must have 'email' css class to be validated\n */\n$.validator.addMethod('email', validateEmail, Resources.VALIDATE_EMAIL);\n/**\n * Add Email Confirm validation method to jQuery validation plugin.\n * Text fields must have 'emailconfirm' css class to be validated\n */\n$.validator.addMethod('emailconfirm', validateConfirmEmail, Resources.VALIDATE_EQUAL_EMAIL);\n\n/**\n * Newsletter signup validation method to jQuery validation plugin.\n * Text field when empty renders appropriate message as validation.\n */\n$.validator.addMethod('newsletterSignup', validateNewsletterEmail, Resources.VALIDATE_NEWSLETTER_SIGNUP);\n\n/**\n * Add Personalization validation method to jQuery validation plugin.\n * Text fields must have 'personalization-input' css class to be validated\n */\n$.validator.addMethod('personalization-input', validatePersonalization, (params, element) => {\n    const invalidChars = $(element).attr('invalidChars') || '';\n    let errorMessage = Resources.VALIDATE_PERSONALIZATION_NOTALLOWED;\n    if (!invalidChars) {\n        errorMessage = errorMessage.replace(':', '');\n    }\n    return `${errorMessage} ${invalidChars}`;\n});\n\n/**\n * Add postal validation method to jQuery validation plugin.\n * Text fields must have 'postal' css class to be validated as a postal code\n */\n$.validator.addMethod('postal', validatePostalCode, Resources.INVALID_POSTALCODE);\n\n/**\n * Add Name and Address validation method to jQuery validation plugin.\n * Text fields must have the following classes to be validated as Name And Address\n * firstName, lastName, addressOne, addressTwo, or city\n */\n$.validator.addMethod('firstName', validateNameAndAddress, `${Resources.VALIDATE_PERSONALIZATION} Letters, Numbers, &amp; - # &#47;`);\n$.validator.addMethod('lastName', validateNameAndAddress, `${Resources.VALIDATE_PERSONALIZATION} Letters, Numbers, &amp; - # &#47;`);\n$.validator.addMethod('addressOne', validateNameAndAddress, `${Resources.VALIDATE_PERSONALIZATION} Letters, Numbers, &amp; - # &#47;`);\n$.validator.addMethod('addressTwo', validateNameAndAddress, `${Resources.VALIDATE_PERSONALIZATION} Letters, Numbers, &amp; - # &#47;`);\n$.validator.addMethod('city', validateNameAndAddress, `${Resources.VALIDATE_PERSONALIZATION} Letters, Numbers, &amp; - # &#47;`);\n$.validator.addMethod('company', validateNameAndAddress, `${Resources.VALIDATE_PERSONALIZATION} Letters, Numbers, &amp; - # &#47;`);\n$.validator.addMethod('message', validatePersonalizationMsg, `${Resources.VALIDATE_PERSONALIZATION} Letters, Numbers, &amp; . - # &#47;`);\n\n/**\n * Add password length validation method to jQuery validation plugin.\n * Text fields must have 'password' css class to be validated as a postal code\n */\n$.validator.addMethod('password', validatePasswordLengthRange, $.validator.messages.rangelength(requiredLengths.password.min, requiredLengths.password.max));\n\n$.extend($.validator.messages, {\n    required: Resources.VALIDATE_REQUIRED,\n    remote: Resources.VALIDATE_REMOTE,\n    email: Resources.VALIDATE_EMAIL,\n    url: Resources.VALIDATE_URL,\n    date: Resources.VALIDATE_DATE,\n    dateISO: Resources.VALIDATE_DATEISO,\n    number: Resources.VALIDATE_NUMBER,\n    digits: Resources.VALIDATE_DIGITS,\n    creditcard: Resources.VALIDATE_CREDITCARD,\n    equalTo: Resources.VALIDATE_EQUALTO,\n    maxlength: $.validator.format(Resources.VALIDATE_MAXLENGTH),\n    minlength: $.validator.format(Resources.VALIDATE_MINLENGTH),\n    rangelength: $.validator.format(Resources.VALIDATE_RANGELENGTH),\n    range: $.validator.format(Resources.VALIDATE_RANGE),\n    max: $.validator.format(Resources.VALIDATE_MAX),\n    min: $.validator.format(Resources.VALIDATE_MIN),\n    newsletterSignUp: Resources.VALIDATE_NEWSLETTER_SIGNUP,\n});\n\nmodule.exports = {\n    regex,\n    settings,\n    init() {\n        $('form:not(.suppress)').each((index, element) => {\n            $(element).validate(settings);\n        });\n    },\n    initForm(f) {\n        $(f).validate(settings);\n    },\n};\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC7OA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;ACxQA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AAEA;AAGA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAGA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAGA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAGA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAIA;AACA;AAOA;AAIA;AAIA;AACA;AACA;AACA;AACA;AACA;AAEA;AAGA;AACA;AAEA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5YA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA,WAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrBA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;;;;;;;;;;;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/LA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;;AC/KA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;;AClBA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AA0BA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAyBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AA4BA;AACA;AACA;AACA;AACA;AACA;AAEA;AA8BA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AAEA;AAUA;AAIA;AAIA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AAqBA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AAkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAiCA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AAIA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/lCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;;;;;;;;;;ACrBA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;;AC9KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""}