{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/js/components/form.js","webpack:///./src/js/components/sticky-phone.js","webpack:///./src/js/index.js","webpack:///./src/scss/styles.scss"],"names":["Form","form","document","querySelector","inputContainer","errorMessage","zip","test","value","addEventListener","e","preventDefault","isValidZip","style","display","classList","remove","submit","add","eventListeners","StickyPhone","stickyPhone","phoneTrigger","bounding","getBoundingClientRect","out","top","left","bottom","window","innerHeight","documentElement","clientHeight","right","innerWidth","clientWidth","any","isOut","isOutOfViewport","togglePhoneNumber","bind","matchMedia","matches","isIE11","Boolean","MSInputMethodContext","documentMode","ready","fn","readyState","init","sticky"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;;;;;;;;AClFA;IACqBA,I;AACjB,kBAAc;AAAA;;AACV,SAAKC,IAAL,GAAYC,QAAQ,CAACC,aAAT,CAAuB,MAAvB,CAAZ;AACA,SAAKC,cAAL,GAAsBF,QAAQ,CAACC,aAAT,CAAuB,wBAAvB,CAAtB;AACA,SAAKE,YAAL,GAAoBH,QAAQ,CAACC,aAAT,CAAuB,gBAAvB,CAApB;AACA,SAAKG,GAAL,GAAW,KAAKL,IAAL,CAAUE,aAAV,C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AAuC;AACnCD,MAAE;AACL,GAFD,MAEO;AACH9C,YAAQ,CAACO,gBAAT,CAA0B,kBAA1B,EAA8CuC,EAA9C;AACH;AACJ;;AAED,SAASE,IAAT,GAAgB;AACZ,MAAMC,MAAM,GAAG,IAAI/B,gEAAJ,EAAf;AACA+B,QAAM,CAACD,IAAP;AACA,MAAMjD,IAAI,GAAG,IAAID,wDAAJ,EAAb;AACAC,MAAI,CAACiD,IAAL;AACH;;AAEDH,KAAK,CAACG,IAAD,CAAL,C;;;;;;;;;;;AC3BA;AACA,OAAO,KAAU,EAAE,kBAKd","file":"js/main.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 = 0);\n","// Form Component\nexport default class Form {\n constructor() {\n this.form = document.querySelector('form');\n this.inputContainer = document.querySelector('#form__input-container');\n this.errorMessage = document.querySelector('#error-message');\n this.zip = this.form.querySelector('#zip');\n }\n\n isValidZip() {\n return /(^\\d{5}$)|(^\\d{5}-\\d{4}$)/.test(this.zip.value);\n }\n\n eventListeners() {\n this.form.addEventListener('submit', (e) => {\n e.preventDefault();\n if (this.isValidZip()) {\n this.errorMessage.style.display = '';\n this.inputContainer.classList.remove('error');\n this.form.submit();\n } else {\n this.errorMessage.style.display = 'block';\n this.inputContainer.classList.add('error');\n }\n });\n }\n\n init() {\n this.eventListeners();\n }\n}\n","// Sticky Phone Component\nexport default class StickyPhone {\n constructor() {\n this.stickyPhone = document.querySelector('[data-sticky-phone]');\n this.phoneTrigger = document.querySelector('[data-phone-trigger]');\n }\n\n isOutOfViewport() {\n // Get element's bounding\n const bounding = this.phoneTrigger.getBoundingClientRect();\n // Check if it's out of the viewport on each side\n const out = {};\n out.top = bounding.top < 0;\n out.left = bounding.left < 0;\n out.bottom = bounding.bottom > (window.innerHeight || document.documentElement.clientHeight);\n out.right = bounding.right > (window.innerWidth || document.documentElement.clientWidth);\n out.any = out.top || out.left || out.bottom || out.right;\n\n return out;\n }\n\n togglePhoneNumber() {\n const isOut = this.isOutOfViewport();\n if (isOut.any) {\n this.stickyPhone.classList.add('show');\n } else {\n this.stickyPhone.classList.remove('show');\n }\n }\n\n eventListeners() {\n window.addEventListener('scroll', this.togglePhoneNumber.bind(this), false);\n }\n\n init() {\n if (window.matchMedia('(max-width: 1023px)').matches) {\n this.eventListeners();\n }\n }\n}\n","// Import SCSS so they get compiled\nimport '../scss/styles.scss';\n// Lazy Load images\n// import 'lazysizes'; // Not needed for only 1 image\nimport StickyPhone from './components/sticky-phone';\nimport Form from './components/form';\n\nconst isIE11 = Boolean(window.MSInputMethodContext) && Boolean(document.documentMode);\nif (isIE11) {\n document.documentElement.classList.add('js-ie11');\n}\n\nfunction ready(fn) {\n if (document.readyState !== 'loading') {\n fn();\n } else {\n document.addEventListener('DOMContentLoaded', fn);\n }\n}\n\nfunction init() {\n const sticky = new StickyPhone();\n sticky.init();\n const form = new Form();\n form.init();\n}\n\nready(init);","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1618605731240\n var cssReload = require(\"/Users/jose.quezada/Sites/aag-landing-pages/node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"hmr\":true,\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n "],"sourceRoot":""}