{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///../storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/util.js","webpack:///../sfcc-shared-cartridges/cartridges/org_dynamicyield/cartridge/client/default/js/util/helpers.js","webpack:///./cartridges/storefront_w3llpeople_base/cartridge/client/default/js/homepage.js","webpack:///./cartridges/storefront_w3llpeople_base/cartridge/client/default/js/components/globalErrorModal.js","webpack:///../sfcc-shared-cartridges/cartridges/org_dynamicyield/cartridge/client/default/js/components/account.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","include","keys","forEach","triggerIdentifyEvent","email","identifyEventData","detail","uid","window","DYO","dyhash","sha256","type","document","body","dispatchEvent","CustomEvent","triggerNewsletterSignup","subscriptionEventData","properties","dyType","hashedEmail","optinEvent","cuidType","plainTextEmail","triggerSignUpEvent","registerEventData","processInclude","$","ready","init","URLSearchParams","location","search","closeGlobalErrorModal","this","triggerGlobalErrorModal","error","globalErrorMsgs","sessionError","continue","history","replaceState","title","href","substring","lastIndexOf","split","modal","data","length","remove","htmlString","append","helper","on","e","target","serializeArray","find","field","match","eventData","_","emailConfirm","isSignUp","form","customer","addtoemaillist","selected","console"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAA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AqBuB,SAG3B,IAAIC,EAAa,wSAOyDH,EAAKZ,MAC3EY,EAAKT,WACLY,GAAc,sGAAwGH,EAAKT,SAAW,aAE1IY,GAAc,2DAKdxB,EAAE,QAAQyB,OAAOD,GAEjBxB,EAAE,qBAAqBoB,MAAM,W,+BC5CrC,MAAMM,EAAS,EAAQ,GAEvBvF,EAAOD,QAAU,KACR0C,OAAOC,KAIZmB,EAAE,cAAc2B,GAAG,gBAAkBC,IACjC,MACMpD,EADWwB,EAAE4B,EAAEC,QAAQC,iBACNC,KAAKC,GAASA,EAAMrF,KAAKsF,MAAM,gBAAgB5E,MAEhE6E,EAAY,CACdxD,OAAQ,CACJ/B,KAAM,QACN4C,WAAY,CACRC,OAAQ,WACRC,YANQb,OAAOC,IAAIC,OAAOC,OAAOP,MAU7CkD,EAAOnD,qBAAqBC,GAC5BS,SAASC,KAAKC,cAAc,IAAIC,YAAY,oBAAqB8C,MAErElC,EAAE,qBAAqB2B,GAAG,yBAA0B,CAACQ,EAAGd,KAChD,MAAM7C,EAAQ6C,EAAKe,aACbC,EAAWhB,EAAKiB,KAAKC,SAASC,eAAeC,SACnDf,EAAO7B,mBAAmBrB,GAC1BkD,EAAOnD,qBAAqBC,GAEvB6D,GAILX,EAAOrC,wBAAwBb,KAEvCwB,EAAE,QAAQ2B,GAAG,2BAA4B,CAACQ,EAAGd,KACzCK,EAAOrC,wBAAwBgC,EAAK7C,MAAMnB,OAC1CqE,EAAOnD,qBAAqB8C,EAAK7C,MAAMnB,UAjCvCqF,QAAQjC,MAAM","file":"default/js/homepage.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 41);\n","'use strict';\n\nmodule.exports = function (include) {\n if (typeof include === 'function') {\n include();\n } else if (typeof include === 'object') {\n Object.keys(include).forEach(function (key) {\n if (typeof include[key] === 'function') {\n include[key]();\n }\n });\n }\n};\n","module.exports = {\n triggerIdentifyEvent : (email) => {\n const hashedEmail = window.DYO.dyhash.sha256(email);\n const identifyEventData = {\n detail: {\n uid: hashedEmail,\n type: \"he\"\n }\n }\n document.body.dispatchEvent(new CustomEvent('dynamicYieldIdentify', identifyEventData));\n },\n triggerNewsletterSignup : (email) => {\n const hashedEmail = window.DYO.dyhash.sha256(email);\n const subscriptionEventData = {\n detail: {\n name: 'Newsletter Subscription',\n properties: {\n dyType: 'newsletter-subscription-v1',\n hashedEmail\n }\n }\n };\n \n const optinEvent = {\n detail: {\n name: 'message opt in',\n properties: {\n dyType: 'message-optin-v1',\n cuidType: 'email',\n plainTextEmail: email\n }\n }\n };\n document.body.dispatchEvent(new CustomEvent('dynamicYieldEvent', subscriptionEventData));\n document.body.dispatchEvent(new CustomEvent('dynamicYieldEvent', optinEvent));\n },\n triggerSignUpEvent : (email) => {\n const hashedEmail = window.DYO.dyhash.sha256(email);\n const registerEventData = {\n detail: {\n name: 'Signup',\n properties: {\n dyType: 'signup-v1',\n hashedEmail\n }\n }\n };\n document.body.dispatchEvent(new CustomEvent('dynamicYieldEvent', registerEventData));\n }\n}","'use strict';\n\nvar processInclude = require('base/util');\n\n$(document).ready(function () {\n processInclude(require('dynamicYield/components/account'));\n\n // Trigger check for session error\n var globalErrorModal = require('./components/globalErrorModal');\n globalErrorModal.init();\n});\n","'use strict';\n\nmodule.exports = {\n init: function() {\n var urlParams = new URLSearchParams(window.location.search);\n var sessionError = urlParams.get('SessionError');\n if (sessionError) {\n window.closeGlobalErrorModal = this.closeGlobalErrorModal;\n this.triggerGlobalErrorModal({ error: window.globalErrorMsgs.sessionError, continue: window.globalErrorMsgs.continue });\n }\n },\n /**\n * closes modal and removed querystring from URL\n */\n closeGlobalErrorModal: function() {\n window.history.replaceState({}, document.title, '/' + window.location.href.substring(window.location.href.lastIndexOf('/') + 1).split('?')[0]);\n $('#globalErrorModal').modal('hide');\n },\n\n /**\n * Sets up and opens global error msg modal\n * @param {Object} data - data.error is the msg string\n */\n triggerGlobalErrorModal: function(data) {\n if ($('#globalErrorModal').length > 0) {\n $('#globalErrorModal').remove();\n }\n\n var htmlString = ''\n + '
'\n + '
'\n + ''\n + '
'\n + '
'\n + '
'\n + '
' + data.error;\n if (data.continue) {\n htmlString += ' ';\n }\n htmlString += '
'\n + '
'\n + '
'\n + '
'\n + '
';\n $('body').append(htmlString);\n\n $('#globalErrorModal').modal('show');\n }\n};\n","'use strict';\n\nconst helper = require('../util/helpers');\n\nmodule.exports = () => {\n if (!window.DYO) {\n console.error('no window.DYO');\n return;\n }\n $('form.login').on('login:success', (e) => {\n const formData = $(e.target).serializeArray();\n const email = formData.find(field => field.name.match(/loginEmail$/)).value;\n const hashedEmail = window.DYO.dyhash.sha256(email);\n const eventData = {\n detail: {\n name: 'Login',\n properties: {\n dyType: 'login-v1',\n hashedEmail\n }\n }\n }\n helper.triggerIdentifyEvent(email);\n document.body.dispatchEvent(new CustomEvent('dynamicYieldEvent', eventData));\n });\n $('form.registration').on('login:register:success', (_, data) => {\n const email = data.emailConfirm;\n const isSignUp = data.form.customer.addtoemaillist.selected;\n helper.triggerSignUpEvent(email);\n helper.triggerIdentifyEvent(email);\n\n if (!isSignUp) {\n return;\n }\n\n helper.triggerNewsletterSignup(email);\n });\n $('body').on('checkout:paymentAccepted', (_, data) => {\n helper.triggerNewsletterSignup(data.email.value);\n helper.triggerIdentifyEvent(data.email.value);\n });\n};\n"],"sourceRoot":""}