text: (window["webpackJsonp"] = window["webpackJsonp"] || []).push([[26],{
  
  /***/ 24:
  /***/ (function(module, exports) {
  
  module.exports = debounce
  
  function debounce (fn, delay, at_start, guarantee) {
    var timeout
    var args
    var self
  
    return function debounced () {
      self = this
      args = Array.prototype.slice.call(arguments)
  
      if (timeout && (at_start || guarantee)) {
        return
      } else if (!at_start) {
        clear()
  
        timeout = setTimeout(run, delay)
        return timeout
      }
  
      timeout = setTimeout(clear, delay)
      fn.apply(self, args)
  
      function run () {
        clear()
        fn.apply(self, args)
      }
  
      function clear () {
        clearTimeout(timeout)
        timeout = null
      }
    }
  }
  
  
  /***/ }),
  
  /***/ 25:
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  
  "use strict";
  
  // EXTERNAL MODULE: ./node_modules/jquery/dist/jquery.js
  var jquery = __webpack_require__(2);
  var jquery_default = /*#__PURE__*/__webpack_require__.n(jquery);
  
  // CONCATENATED MODULE: ./source/scripts/helpers/Quantity.js
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
  
  var Quantity =
  /*#__PURE__*/
  function () {
    function Quantity(el) {
      _classCallCheck(this, Quantity);
  
      this.$el = $(el);
      this.$inputParent = this.$el.find('.form-field--qty-input');
      this.$input = this.$el.find('[data-quantity-input]');
      this.$selectParent = this.$el.find('.form-field--qty-select');
      this.$select = this.$el.find('[data-quantity-select]');
      this._watchSelect = this._watchSelect.bind(this);
      this._watchInput = this._watchInput.bind(this);
      this.$select.on('change.quantity', this._watchSelect);
      this.$input.on('change.quantity', this._watchInput);
    }
  
    _createClass(Quantity, [{
      key: "unload",
      value: function unload() {
        this.$el.off('.quantity');
      }
    }, {
      key: "_validateValue",
      value: function _validateValue(event) {
        var baseValue = parseInt(event.currentTarget.value, 10);
        return isNaN(baseValue) ? 1 : baseValue;
      }
    }, {
      key: "_watchSelect",
      value: function _watchSelect(event) {
        var value = this._validateValue(event); // Update input to match select
  
  
        this.$input.val(value).trigger('change'); // Switch to quantity input when 10 or more
  
        if (value >= 10) {
          this.$inputParent.removeClass('hidden').addClass('visible');
          this.$input.focus().removeAttr('tabindex').select();
          this.$selectParent.removeClass('visible').addClass('hidden');
          this.$select.attr('tabindex', '-1');
        }
      }
    }, {
      key: "_watchInput",
      value: function _watchInput(event) {
        this.$input.val(this._validateValue(event));
      }
    }]);
  
    return Quantity;
  }();
  
  
  // CONCATENATED MODULE: ./source/scripts/Forms.js
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Forms_Forms; });
  function Forms_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  
  function Forms_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  
  function Forms_createClass(Constructor, protoProps, staticProps) { if (protoProps) Forms_defineProperties(Constructor.prototype, protoProps); if (staticProps) Forms_defineProperties(Constructor, staticProps); return Constructor; }
  
  
  
  
  var Forms_Forms =
  /*#__PURE__*/
  function () {
    function Forms($el) {
      var _this = this;
  
      var selector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '.form-field-input';
  
      Forms_classCallCheck(this, Forms);
  
      this.$el = $el;
      this.filledClass = 'form-field-filled';
      this.fieldSelector = selector;
      this.quantityItems = [];
      this.$quantityWrapper = this.$el.find('[data-quantity-wrapper]');
      this._toggleFilled = this._toggleFilled.bind(this);
      this.$el.on('focus.forms', this.fieldSelector, this._toggleFilled);
      this.$el.on('blur.forms', this.fieldSelector, this._toggleFilled);
  
      this._checkFilled();
  
      if (this.$quantityWrapper.length) {
        this.$quantityWrapper.each(function (i, el) {
          _this.quantityItems.push(new Quantity(el));
        });
      }
    }
  
    Forms_createClass(Forms, [{
      key: "unload",
      value: function unload() {
        this.$el.off('.forms');
        this.quantityItems.forEach(function (quantityItem) {
          quantityItem.unload();
        });
      }
    }, {
      key: "_checkFilled",
      value: function _checkFilled() {
        var _this2 = this;
  
        this.$el.find(this.fieldSelector).each(function (i, el) {
          if (jquery_default()(el).hasClass(_this2.filledClass)) return;
  
          _this2._toggleFilled(null, el);
        });
      }
    }, {
      key: "_toggleFilled",
      value: function _toggleFilled() {
        var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
        var el = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
        var target = event ? event.currentTarget : el;
        var $target = jquery_default()(target);
        var value = target.value;
        var isFilled = value.length > 0;
  
        try {
          isFilled = isFilled || $target.is(':-webkit-autofill');
          $target.toggleClass(this.filledClass, isFilled);
        } catch (e) {
          $target.toggleClass(this.filledClass, isFilled);
        }
      }
    }]);
  
    return Forms;
  }();
  
  
  
  /***/ }),
  
  /***/ 33:
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  
  "use strict";
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Modal; });
  /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
  /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
  /* harmony import */ var just_debounce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(24);
  /* harmony import */ var just_debounce__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(just_debounce__WEBPACK_IMPORTED_MODULE_1__);
  /* harmony import */ var vanilla_modal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38);
  /* harmony import */ var vanilla_modal__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(vanilla_modal__WEBPACK_IMPORTED_MODULE_2__);
  /* harmony import */ var _shopify_theme_a11y__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(34);
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
  
  
  
  
  
  
  var Modal =
  /*#__PURE__*/
  function () {
    function Modal() {
      var callbacks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  
      _classCallCheck(this, Modal);
  
      this.$body = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document.body);
      this.$window = jquery__WEBPACK_IMPORTED_MODULE_0___default()(window);
      this.modal = null;
      this.$modal = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-modal-container]');
      this.$modalInner = this.$modal.find('[data-modal-inner]');
      this.trigger = null; // Extend default vanilla-modal callbacks back to instantiator of Modal
  
      this.defaultCallbacks = {
        onOpen: function onOpen() {},
        onClose: function onClose() {},
        onBeforeOpen: function onBeforeOpen() {},
        onBeforeClose: function onBeforeClose() {}
      };
      this.callbacks = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, this.defaultCallbacks, callbacks);
      this.finishedLoading = this.finishedLoading.bind(this);
      this._onOpen = this._onOpen.bind(this);
      this._onBeforeOpen = this._onBeforeOpen.bind(this);
      this._onClose = this._onClose.bind(this);
      this._onBeforeClose = this._onBeforeClose.bind(this);
      this._closeEsc = this._closeEsc.bind(this);
      this.position = this.position.bind(this);
      this.modalOptions = {
        loadClass: '',
        class: 'modal-loaded',
        onOpen: this._onOpen,
        onClose: this._onClose,
        onBeforeOpen: this._onBeforeOpen,
        onBeforeClose: this._onBeforeClose,
        transitions: false
      };
    }
  
    _createClass(Modal, [{
      key: "unload",
      value: function unload() {
        if (!this.modal || !this.modal.isOpen) return;
        this.modal.destroy();
      }
      /**
       * Open a modal with contents from selector
       *
       * @param selector
       * @param handle
       */
  
    }, {
      key: "open",
      value: function open(selector) {
        var handle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'general';
        var trigger = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  
        this._addModalClass(handle);
  
        this.modal = new vanilla_modal__WEBPACK_IMPORTED_MODULE_2___default.a(this.modalOptions);
        this.modal.open(selector);
        this.trigger = trigger;
        window.addEventListener('keydown', this.closeEsc);
      }
    }, {
      key: "close",
      value: function close() {
        this.modal.close();
        window.removeEventListener('keydown', this.closeEsc);
      }
    }, {
      key: "finishedLoading",
      value: function finishedLoading() {
        Object(_shopify_theme_a11y__WEBPACK_IMPORTED_MODULE_3__[/* trapFocus */ "b"])(this.$modal[0]);
      }
    }, {
      key: "_closeEsc",
      value: function _closeEsc(e) {
        if (e.key === 'Escape') {
          this.close();
        }
      }
    }, {
      key: "isOpen",
      value: function isOpen() {
        return this.modal && this.modal.isOpen;
      }
      /**
       * Update the vertical positioning of modal
       */
  
    }, {
      key: "position",
      value: function position() {
        var windowHeight = window.innerHeight;
        var modalHeight = this.$modalInner.outerHeight();
        var modalPadding = parseInt(this.$modal.css('padding-top'), 10) * 2;
        var offset = (windowHeight - modalPadding - modalHeight) / 2;
        var marginTop = offset > 0 ? offset : 0;
        this.$modalInner.css({
          marginTop: marginTop
        });
      }
      /**
       * Add a class to the modal for individual styling
       * @param handle
       * @private
       */
  
    }, {
      key: "_addModalClass",
      value: function _addModalClass(handle) {
        this.$modal.addClass("modal--".concat(handle));
      }
      /**
       * Remove modal class based on the handle
       * @private
       */
  
    }, {
      key: "_removeModalClass",
      value: function _removeModalClass() {
        var modalClass = this.$modal.attr('class').match(/modal--[\w-]*\b/);
  
        if (!modalClass) {
          return;
        }
  
        this.$modal.removeClass(modalClass[0]);
      }
    }, {
      key: "_onClose",
      value: function _onClose() {
        this._removeModalClass();
  
        this.$body.removeClass('scroll-lock').removeClass('modal-visible');
        this.$window.off('resize.modal');
        this.$modalInner.css({
          marginTop: ''
        });
        this.callbacks.onClose();
        Object(_shopify_theme_a11y__WEBPACK_IMPORTED_MODULE_3__[/* removeTrapFocus */ "a"])(this.$modal[0]);
  
        if (this.activeElement) {
          this.activeElement.focus();
        }
      }
    }, {
      key: "_onOpen",
      value: function _onOpen() {
        var _this = this;
  
        this.activeElement = document.activeElement;
        this.position();
        this.$body.addClass('scroll-lock').addClass('modal-visible');
        this.$window.on('resize.modal', just_debounce__WEBPACK_IMPORTED_MODULE_1___default()(function () {
          return _this.position();
        }, 16, true, true));
        this.callbacks.onOpen();
        Object(_shopify_theme_a11y__WEBPACK_IMPORTED_MODULE_3__[/* trapFocus */ "b"])(this.$modal[0]);
      }
    }, {
      key: "_onBeforeClose",
      value: function _onBeforeClose() {
        this.callbacks.onBeforeClose();
      }
    }, {
      key: "_onBeforeOpen",
      value: function _onBeforeOpen() {
        this.callbacks.onBeforeOpen();
      }
    }]);
  
    return Modal;
  }();
  
  
  
  /***/ }),
  
  /***/ 34:
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  
  "use strict";
  /* unused harmony export forceFocus */
  /* unused harmony export focusHash */
  /* unused harmony export bindInPageLinks */
  /* unused harmony export focusable */
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return trapFocus; });
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return removeTrapFocus; });
  /* unused harmony export accessibleLinks */
  /**
   * A11y Helpers
   * -----------------------------------------------------------------------------
   * A collection of useful functions that help make your theme more accessible
   */
  
  /**
   * Moves focus to an HTML element
   * eg for In-page links, after scroll, focus shifts to content area so that
   * next `tab` is where user expects. Used in bindInPageLinks()
   * eg move focus to a modal that is opened. Used in trapFocus()
   *
   * @param {Element} container - Container DOM element to trap focus inside of
   * @param {Object} options - Settings unique to your theme
   * @param {string} options.className - Class name to apply to element on focus.
   */
  function forceFocus(element, options) {
    options = options || {};
  
    var savedTabIndex = element.tabIndex;
  
    element.tabIndex = -1;
    element.dataset.tabIndex = savedTabIndex;
    element.focus();
    if (typeof options.className !== 'undefined') {
      element.classList.add(options.className);
    }
    element.addEventListener('blur', callback);
  
    function callback(event) {
      event.target.removeEventListener(event.type, callback);
  
      element.tabIndex = savedTabIndex;
      delete element.dataset.tabIndex;
      if (typeof options.className !== 'undefined') {
        element.classList.remove(options.className);
      }
    }
  }
  
  /**
   * If there's a hash in the url, focus the appropriate element
   * This compensates for older browsers that do not move keyboard focus to anchor links.
   * Recommendation: To be called once the page in loaded.
   *
   * @param {Object} options - Settings unique to your theme
   * @param {string} options.className - Class name to apply to element on focus.
   * @param {string} options.ignore - Selector for elements to not include.
   */
  
  function focusHash(options) {
    options = options || {};
    var hash = window.location.hash;
    var element = document.getElementById(hash.slice(1));
  
    // if we are to ignore this element, early return
    if (element && options.ignore && element.matches(options.ignore)) {
      return false;
    }
  
    if (hash && element) {
      forceFocus(element, options);
    }
  }
  
  /**
   * When an in-page (url w/hash) link is clicked, focus the appropriate element
   * This compensates for older browsers that do not move keyboard focus to anchor links.
   * Recommendation: To be called once the page in loaded.
   *
   * @param {Object} options - Settings unique to your theme
   * @param {string} options.className - Class name to apply to element on focus.
   * @param {string} options.ignore - CSS selector for elements to not include.
   */
  
  function bindInPageLinks(options) {
    options = options || {};
    var links = Array.prototype.slice.call(
      document.querySelectorAll('a[href^="#"]')
    );
  
    return links.filter(function(link) {
      if (link.hash === '#' || link.hash === '') {
        return false;
      }
  
      if (options.ignore && link.matches(options.ignore)) {
        return false;
      }
  
      var element = document.querySelector(link.hash);
  
      if (!element) {
        return false;
      }
  
      link.addEventListener('click', function() {
        forceFocus(element, options);
      });
  
      return true;
    });
  }
  
  function focusable(container) {
    var elements = Array.prototype.slice.call(
      container.querySelectorAll(
        '[tabindex],' +
          '[draggable],' +
          'a[href],' +
          'area,' +
          'button:enabled,' +
          'input:not([type=hidden]):enabled,' +
          'object,' +
          'select:enabled,' +
          'textarea:enabled'
      )
    );
  
    // Filter out elements that are not visible.
    // Copied from jQuery https://github.com/jquery/jquery/blob/2d4f53416e5f74fa98e0c1d66b6f3c285a12f0ce/src/css/hiddenVisibleSelectors.js
    return elements.filter(function(element) {
      return !!(
        element.offsetWidth ||
        element.offsetHeight ||
        element.getClientRects().length
      );
    });
  }
  
  /**
   * Traps the focus in a particular container
   *
   * @param {Element} container - Container DOM element to trap focus inside of
   * @param {Element} elementToFocus - Element to be focused on first
   * @param {Object} options - Settings unique to your theme
   * @param {string} options.className - Class name to apply to element on focus.
   */
  
  var trapFocusHandlers = {};
  
  function trapFocus(container, options) {
    options = options || {};
    var elements = focusable(container);
    var elementToFocus = options.elementToFocus || container;
    var first = elements[0];
    var last = elements[elements.length - 1];
  
    removeTrapFocus();
  
    trapFocusHandlers.focusin = function(event) {
      if (container !== event.target && !container.contains(event.target)) {
        first.focus();
      }
  
      if (
        event.target !== container &&
        event.target !== last &&
        event.target !== first
      )
        return;
      document.addEventListener('keydown', trapFocusHandlers.keydown);
    };
  
    trapFocusHandlers.focusout = function() {
      document.removeEventListener('keydown', trapFocusHandlers.keydown);
    };
  
    trapFocusHandlers.keydown = function(event) {
      if (event.keyCode !== 9) return; // If not TAB key
  
      // On the last focusable element and tab forward, focus the first element.
      if (event.target === last && !event.shiftKey) {
        event.preventDefault();
        first.focus();
      }
  
      //  On the first focusable element and tab backward, focus the last element.
      if (
        (event.target === container || event.target === first) &&
        event.shiftKey
      ) {
        event.preventDefault();
        last.focus();
      }
    };
  
    document.addEventListener('focusout', trapFocusHandlers.focusout);
    document.addEventListener('focusin', trapFocusHandlers.focusin);
  
    forceFocus(elementToFocus, options);
  }
  
  /**
   * Removes the trap of focus from the page
   */
  function removeTrapFocus() {
    document.removeEventListener('focusin', trapFocusHandlers.focusin);
    document.removeEventListener('focusout', trapFocusHandlers.focusout);
    document.removeEventListener('keydown', trapFocusHandlers.keydown);
  }
  
  /**
   * Add a preventive message to external links and links that open to a new window.
   * @param {string} elements - Specific elements to be targeted
   * @param {object} options.messages - Custom messages to overwrite with keys: newWindow, external, newWindowExternal
   * @param {string} options.messages.newWindow - When the link opens in a new window (e.g. target="_blank")
   * @param {string} options.messages.external - When the link is to a different host domain.
   * @param {string} options.messages.newWindowExternal - When the link is to a different host domain and opens in a new window.
   * @param {object} options.prefix - Prefix to namespace "id" of the messages
   */
  function accessibleLinks(elements, options) {
    if (typeof elements !== 'string') {
      throw new TypeError(elements + ' is not a String.');
    }
  
    elements = document.querySelectorAll(elements);
  
    if (elements.length === 0) {
      return;
    }
  
    options = options || {};
    options.messages = options.messages || {};
  
    var messages = {
      newWindow: options.messages.newWindow || 'Opens in a new window.',
      external: options.messages.external || 'Opens external website.',
      newWindowExternal:
        options.messages.newWindowExternal ||
        'Opens external website in a new window.'
    };
  
    var prefix = options.prefix || 'a11y';
  
    var messageSelectors = {
      newWindow: prefix + '-new-window-message',
      external: prefix + '-external-message',
      newWindowExternal: prefix + '-new-window-external-message'
    };
  
    function generateHTML(messages) {
      var container = document.createElement('ul');
      var htmlMessages = Object.keys(messages).reduce(function(html, key) {
        return (html +=
          '<li id=' + messageSelectors[key] + '>' + messages[key] + '</li>');
      }, '');
  
      container.setAttribute('hidden', true);
      container.innerHTML = htmlMessages;
  
      document.body.appendChild(container);
    }
  
    function externalSite(link) {
      return link.hostname !== window.location.hostname;
    }
  
    elements.forEach(function(link) {
      var target = link.getAttribute('target');
      var rel = link.getAttribute('rel');
      var isExternal = externalSite(link);
      var isTargetBlank = target === '_blank';
      var isRelNoopenerEmpty = rel === null || rel.indexOf('noopener') === -1;
  
      if (isTargetBlank && isRelNoopenerEmpty) {
        link.setAttribute('rel', 'noopener');
      }
  
      if (isExternal && isTargetBlank) {
        link.setAttribute('aria-describedby', messageSelectors.newWindowExternal);
      } else if (isExternal) {
        link.setAttribute('aria-describedby', messageSelectors.external);
      } else if (isTargetBlank) {
        link.setAttribute('aria-describedby', messageSelectors.newWindow);
      }
    });
  
    generateHTML(messages);
  }
  
  /***/ }),
  
  /***/ 38:
  /***/ (function(module, exports, __webpack_require__) {
  
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
    if (true) {
      !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
    } else { var mod; }
  })(this, function (exports) {
    'use strict';
  
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
  
    function _classCallCheck(instance, Constructor) {
      if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
      }
    }
  
    var _createClass = function () {
      function defineProperties(target, props) {
        for (var i = 0; i < props.length; i++) {
          var descriptor = props[i];
          descriptor.enumerable = descriptor.enumerable || false;
          descriptor.configurable = true;
          if ("value" in descriptor) descriptor.writable = true;
          Object.defineProperty(target, descriptor.key, descriptor);
        }
      }
  
      return function (Constructor, protoProps, staticProps) {
        if (protoProps) defineProperties(Constructor.prototype, protoProps);
        if (staticProps) defineProperties(Constructor, staticProps);
        return Constructor;
      };
    }();
  
    var _extends = Object.assign || function (target) {
      for (var i = 1; i < arguments.length; i++) {
        var source = arguments[i];
  
        for (var key in source) {
          if (Object.prototype.hasOwnProperty.call(source, key)) {
            target[key] = source[key];
          }
        }
      }
  
      return target;
    };
  
    var defaults = {
      modal: '.modal',
      modalInner: '.modal-inner',
      modalContent: '.modal-content',
      open: '[data-modal-open]',
      close: '[data-modal-close]',
      page: 'body',
      class: 'modal-visible',
      loadClass: 'vanilla-modal',
      clickOutside: true,
      closeKeys: [27],
      transitions: true,
      transitionEnd: null,
      onBeforeOpen: null,
      onBeforeClose: null,
      onOpen: null,
      onClose: null
    };
  
    function throwError(message) {
      // eslint-disable-next-line no-console
      console.error('VanillaModal: ' + message);
    }
  
    function find(arr, callback) {
      return function (key) {
        var filteredArray = arr.filter(callback);
        return filteredArray[0] ? filteredArray[0][key] : undefined;
      };
    }
  
    function transitionEndVendorSniff() {
      var el = document.createElement('div');
      var transitions = [{ key: 'transition', value: 'transitionend' }, { key: 'OTransition', value: 'otransitionend' }, { key: 'MozTransition', value: 'transitionend' }, { key: 'WebkitTransition', value: 'webkitTransitionEnd' }];
      return find(transitions, function (_ref) {
        var key = _ref.key;
        return typeof el.style[key] !== 'undefined';
      })('value');
    }
  
    function isPopulatedArray(arr) {
      return Object.prototype.toString.call(arr) === '[object Array]' && arr.length;
    }
  
    function getNode(selector, parent) {
      var targetNode = parent || document;
      var node = targetNode.querySelector(selector);
      if (!node) {
        throwError(selector + ' not found in document.');
      }
      return node;
    }
  
    function addClass(el, className) {
      if (!(el instanceof HTMLElement)) {
        throwError('Not a valid HTML element.');
      }
      el.setAttribute('class', el.className.split(' ').filter(function (cn) {
        return cn !== className;
      }).concat(className).join(' '));
    }
  
    function removeClass(el, className) {
      if (!(el instanceof HTMLElement)) {
        throwError('Not a valid HTML element.');
      }
      el.setAttribute('class', el.className.split(' ').filter(function (cn) {
        return cn !== className;
      }).join(' '));
    }
  
    function getElementContext(e) {
      if (e && typeof e.hash === 'string') {
        return document.querySelector(e.hash);
      } else if (typeof e === 'string') {
        return document.querySelector(e);
      }
      throwError('No selector supplied to open()');
      return null;
    }
  
    function applyUserSettings(settings) {
      return _extends({}, defaults, settings, {
        transitionEnd: transitionEndVendorSniff()
      });
    }
  
    function matches(e, selector) {
      var allMatches = (e.target.document || e.target.ownerDocument).querySelectorAll(selector);
      for (var i = 0; i < allMatches.length; i += 1) {
        var node = e.target;
        while (node && node !== document.body) {
          if (node === allMatches[i]) {
            return node;
          }
          node = node.parentNode;
        }
      }
      return null;
    }
  
    var VanillaModal = function () {
      function VanillaModal(settings) {
        _classCallCheck(this, VanillaModal);
  
        this.isOpen = false;
        this.current = null;
        this.isListening = false;
  
        this.settings = applyUserSettings(settings);
        this.dom = this.getDomNodes();
  
        this.open = this.open.bind(this);
        this.close = this.close.bind(this);
        this.closeKeyHandler = this.closeKeyHandler.bind(this);
        this.outsideClickHandler = this.outsideClickHandler.bind(this);
        this.delegateOpen = this.delegateOpen.bind(this);
        this.delegateClose = this.delegateClose.bind(this);
        this.listen = this.listen.bind(this);
        this.destroy = this.destroy.bind(this);
  
        this.addLoadedCssClass();
        this.listen();
      }
  
      _createClass(VanillaModal, [{
        key: 'getDomNodes',
        value: function getDomNodes() {
          var _settings = this.settings,
              modal = _settings.modal,
              page = _settings.page,
              modalInner = _settings.modalInner,
              modalContent = _settings.modalContent;
  
          return {
            modal: getNode(modal),
            page: getNode(page),
            modalInner: getNode(modalInner, getNode(modal)),
            modalContent: getNode(modalContent, getNode(modal))
          };
        }
      }, {
        key: 'addLoadedCssClass',
        value: function addLoadedCssClass() {
          addClass(this.dom.page, this.settings.loadClass);
        }
      }, {
        key: 'setOpenId',
        value: function setOpenId(id) {
          var page = this.dom.page;
  
          page.setAttribute('data-current-modal', id || 'anonymous');
        }
      }, {
        key: 'removeOpenId',
        value: function removeOpenId() {
          var page = this.dom.page;
  
          page.removeAttribute('data-current-modal');
        }
      }, {
        key: 'open',
        value: function open(allMatches, e) {
          var page = this.dom.page;
          var _settings2 = this.settings,
              onBeforeOpen = _settings2.onBeforeOpen,
              onOpen = _settings2.onOpen;
  
          if (!(this.current instanceof HTMLElement === false)) {
            throwError('VanillaModal target must exist on page.');
            return;
          }
          this.releaseNode(this.current);
          this.current = getElementContext(allMatches);
          if (typeof onBeforeOpen === 'function') {
            onBeforeOpen.call(this, e);
          }
          this.captureNode(this.current);
          addClass(page, this.settings.class);
          this.setOpenId(this.current.id);
          this.isOpen = true;
          if (typeof onOpen === 'function') {
            onOpen.call(this, e);
          }
        }
      }, {
        key: 'detectTransition',
        value: function detectTransition() {
          var modal = this.dom.modal;
  
          var css = window.getComputedStyle(modal, null);
          return Boolean(['transitionDuration', 'oTransitionDuration', 'MozTransitionDuration', 'webkitTransitionDuration'].filter(function (i) {
            return typeof css[i] === 'string' && parseFloat(css[i]) > 0;
          }).length);
        }
      }, {
        key: 'close',
        value: function close(e) {
          var _settings3 = this.settings,
              transitions = _settings3.transitions,
              transitionEnd = _settings3.transitionEnd,
              onBeforeClose = _settings3.onBeforeClose;
  
          var hasTransition = this.detectTransition();
          if (this.isOpen) {
            this.isOpen = false;
            if (typeof onBeforeClose === 'function') {
              onBeforeClose.call(this, e);
            }
            removeClass(this.dom.page, this.settings.class);
            if (transitions && transitionEnd && hasTransition) {
              this.closeModalWithTransition(e);
            } else {
              this.closeModal(e);
            }
          }
        }
      }, {
        key: 'closeModal',
        value: function closeModal(e) {
          var onClose = this.settings.onClose;
  
          this.removeOpenId(this.dom.page);
          this.releaseNode(this.current);
          this.isOpen = false;
          this.current = null;
          if (typeof onClose === 'function') {
            onClose.call(this, e);
          }
        }
      }, {
        key: 'closeModalWithTransition',
        value: function closeModalWithTransition(e) {
          var _this = this;
  
          var modal = this.dom.modal;
          var transitionEnd = this.settings.transitionEnd;
  
          var closeTransitionHandler = function closeTransitionHandler() {
            modal.removeEventListener(transitionEnd, closeTransitionHandler);
            _this.closeModal(e);
          };
          modal.addEventListener(transitionEnd, closeTransitionHandler);
        }
      }, {
        key: 'captureNode',
        value: function captureNode(node) {
          var modalContent = this.dom.modalContent;
  
          while (node.childNodes.length) {
            modalContent.appendChild(node.childNodes[0]);
          }
        }
      }, {
        key: 'releaseNode',
        value: function releaseNode(node) {
          var modalContent = this.dom.modalContent;
  
          while (modalContent.childNodes.length) {
            node.appendChild(modalContent.childNodes[0]);
          }
        }
      }, {
        key: 'closeKeyHandler',
        value: function closeKeyHandler(e) {
          var closeKeys = this.settings.closeKeys;
  
          if (isPopulatedArray(closeKeys) && closeKeys.indexOf(e.which) > -1 && this.isOpen === true) {
            e.preventDefault();
            this.close(e);
          }
        }
      }, {
        key: 'outsideClickHandler',
        value: function outsideClickHandler(e) {
          var clickOutside = this.settings.clickOutside;
          var modalInner = this.dom.modalInner;
  
          if (clickOutside) {
            var node = e.target;
            while (node && node !== document.body) {
              if (node === modalInner) {
                return;
              }
              node = node.parentNode;
            }
            this.close(e);
          }
        }
      }, {
        key: 'delegateOpen',
        value: function delegateOpen(e) {
          var open = this.settings.open;
  
          var matchedNode = matches(e, open);
          if (matchedNode) {
            e.preventDefault();
            this.open(matchedNode, e);
          }
        }
      }, {
        key: 'delegateClose',
        value: function delegateClose(e) {
          var close = this.settings.close;
  
          if (matches(e, close)) {
            e.preventDefault();
            this.close(e);
          }
        }
      }, {
        key: 'listen',
        value: function listen() {
          var modal = this.dom.modal;
  
          if (!this.isListening) {
            modal.addEventListener('click', this.outsideClickHandler, false);
            document.addEventListener('keydown', this.closeKeyHandler, false);
            document.addEventListener('click', this.delegateOpen, false);
            document.addEventListener('click', this.delegateClose, false);
            this.isListening = true;
          } else {
            throwError('Event listeners already applied.');
          }
        }
      }, {
        key: 'destroy',
        value: function destroy() {
          var modal = this.dom.modal;
  
          if (this.isListening) {
            this.close();
            modal.removeEventListener('click', this.outsideClickHandler);
            document.removeEventListener('keydown', this.closeKeyHandler);
            document.removeEventListener('click', this.delegateOpen);
            document.removeEventListener('click', this.delegateClose);
            this.isListening = false;
          } else {
            throwError('Event listeners already removed.');
          }
        }
      }]);
  
      return VanillaModal;
    }();
  
    exports.default = VanillaModal;
  });
  
  
  /***/ }),
  
  /***/ 56:
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  
  "use strict";
  __webpack_require__.r(__webpack_exports__);
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return StaticPassword; });
  /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
  /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
  /* harmony import */ var _components_Modal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(33);
  /* harmony import */ var _Forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25);
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
  
  
  
  
  
  var StaticPassword =
  /*#__PURE__*/
  function () {
    function StaticPassword(section) {
      _classCallCheck(this, StaticPassword);
  
      this.$el = jquery__WEBPACK_IMPORTED_MODULE_0___default()(section.el);
      this.modalForms = null;
      this.newsletterForm = null;
      this.modalContents = '[data-passwordentry]';
      this.$newsletterForm = this.$el.find('[data-password-newsletter]');
      this.modalOpen = this.onModalOpen.bind(this);
      this.modalClose = this.onModalClose.bind(this);
      this._openModal = this._openModal.bind(this);
      this.modal = new _components_Modal__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]({
        onOpen: this.modalOpen,
        onClose: this.modalClose
      });
  
      if (this.$newsletterForm) {
        this.newsletterForm = new _Forms__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"](this.$newsletterForm);
      }
  
      this._checkForPasswordAttempt();
  
      this._bindEvents();
    }
  
    _createClass(StaticPassword, [{
      key: "onSectionUnload",
      value: function onSectionUnload() {
        this.$el.off('.static-password');
  
        if (this.newsletterForm) {
          this.newsletterForm.unload();
        }
  
        if (this.modalForms) {
          this.modalForms.unload();
        }
      }
    }, {
      key: "onModalOpen",
      value: function onModalOpen() {
        var $contents = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-passwordentry-contents]');
        this.modalForms = new _Forms__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"]($contents);
      }
    }, {
      key: "onModalClose",
      value: function onModalClose() {
        this.modalForms.unload();
        this.modalForms = null;
      }
    }, {
      key: "_bindEvents",
      value: function _bindEvents() {
        this.$el.on('click.static-password', '[data-passwordentry-toggle]', this._openModal);
      }
    }, {
      key: "_openModal",
      value: function _openModal() {
        this.modal.open(this.modalContents, 'passwordentry');
      }
    }, {
      key: "_checkForPasswordAttempt",
      value: function _checkForPasswordAttempt() {
        if (!jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-passwordentry-errors]').length) {
          return;
        }
  
        this._openModal();
      }
    }]);
  
    return StaticPassword;
  }();
  
  
  
  /***/ })
  
  }]);
  //# sourceMappingURL=StaticPassword.bundle.js.map?1565631014304