/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // identity function for calling harmony imports with the correct context /******/ __webpack_require__.i = function(value) { return value; }; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 98); /******/ }) /************************************************************************/ /******/ ({ /***/ 0: /***/ (function(module, exports) { module.exports = jQuery; /***/ }), /***/ 1: /***/ (function(module, exports) { module.exports = {Foundation: window.Foundation}; /***/ }), /***/ 2: /***/ (function(module, exports) { module.exports = {Plugin: window.Foundation.Plugin}; /***/ }), /***/ 32: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__foundation_core__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_toggler__ = __webpack_require__(62); __WEBPACK_IMPORTED_MODULE_0__foundation_core__["Foundation"].plugin(__WEBPACK_IMPORTED_MODULE_1__foundation_toggler__["a" /* Toggler */], 'Toggler'); /***/ }), /***/ 4: /***/ (function(module, exports) { module.exports = {Motion: window.Foundation.Motion, Move: window.Foundation.Move}; /***/ }), /***/ 62: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Toggler; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_motion__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_motion___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__foundation_util_motion__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_plugin__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_plugin___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__foundation_plugin__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_util_triggers__ = __webpack_require__(7); 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; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** * Toggler module. * @module foundation.toggler * @requires foundation.util.motion * @requires foundation.util.triggers */ var Toggler = function (_Plugin) { _inherits(Toggler, _Plugin); function Toggler() { _classCallCheck(this, Toggler); return _possibleConstructorReturn(this, (Toggler.__proto__ || Object.getPrototypeOf(Toggler)).apply(this, arguments)); } _createClass(Toggler, [{ key: '_setup', /** * Creates a new instance of Toggler. * @class * @name Toggler * @fires Toggler#init * @param {Object} element - jQuery object to add the trigger to. * @param {Object} options - Overrides to the default plugin settings. */ value: function _setup(element, options) { this.$element = element; this.options = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend({}, Toggler.defaults, element.data(), options); this.className = ''; this.className = 'Toggler'; // ie9 back compat // Triggers init is idempotent, just need to make sure it is initialized __WEBPACK_IMPORTED_MODULE_3__foundation_util_triggers__["a" /* Triggers */].init(__WEBPACK_IMPORTED_MODULE_0_jquery___default.a); this._init(); this._events(); } /** * Initializes the Toggler plugin by parsing the toggle class from data-toggler, or animation classes from data-animate. * @function * @private */ }, { key: '_init', value: function _init() { var input; // Parse animation classes if they were set if (this.options.animate) { input = this.options.animate.split(' '); this.animationIn = input[0]; this.animationOut = input[1] || null; } // Otherwise, parse toggle class else { input = this.$element.data('toggler'); // Allow for a . at the beginning of the string this.className = input[0] === '.' ? input.slice(1) : input; } // Add ARIA attributes to triggers var id = this.$element[0].id; __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-open="' + id + '"], [data-close="' + id + '"], [data-toggle="' + id + '"]').attr('aria-controls', id); // If the target is hidden, add aria-hidden this.$element.attr('aria-expanded', this.$element.is(':hidden') ? false : true); } /** * Initializes events for the toggle trigger. * @function * @private */ }, { key: '_events', value: function _events() { this.$element.off('toggle.zf.trigger').on('toggle.zf.trigger', this.toggle.bind(this)); } /** * Toggles the target class on the target element. An event is fired from the original trigger depending on if the resultant state was "on" or "off". * @function * @fires Toggler#on * @fires Toggler#off */ }, { key: 'toggle', value: function toggle() { this[this.options.animate ? '_toggleAnimate' : '_toggleClass'](); } }, { key: '_toggleClass', value: function _toggleClass() { this.$element.toggleClass(this.className); var isOn = this.$element.hasClass(this.className); if (isOn) { /** * Fires if the target element has the class after a toggle. * @event Toggler#on */ this.$element.trigger('on.zf.toggler'); } else { /** * Fires if the target element does not have the class after a toggle. * @event Toggler#off */ this.$element.trigger('off.zf.toggler'); } this._updateARIA(isOn); this.$element.find('[data-mutate]').trigger('mutateme.zf.trigger'); } }, { key: '_toggleAnimate', value: function _toggleAnimate() { var _this = this; if (this.$element.is(':hidden')) { __WEBPACK_IMPORTED_MODULE_1__foundation_util_motion__["Motion"].animateIn(this.$element, this.animationIn, function () { _this._updateARIA(true); this.trigger('on.zf.toggler'); this.find('[data-mutate]').trigger('mutateme.zf.trigger'); }); } else { __WEBPACK_IMPORTED_MODULE_1__foundation_util_motion__["Motion"].animateOut(this.$element, this.animationOut, function () { _this._updateARIA(false); this.trigger('off.zf.toggler'); this.find('[data-mutate]').trigger('mutateme.zf.trigger'); }); } } }, { key: '_updateARIA', value: function _updateARIA(isOn) { this.$element.attr('aria-expanded', isOn ? true : false); } /** * Destroys the instance of Toggler on the element. * @function */ }, { key: '_destroy', value: function _destroy() { this.$element.off('.zf.toggler'); } }]); return Toggler; }(__WEBPACK_IMPORTED_MODULE_2__foundation_plugin__["Plugin"]); Toggler.defaults = { /** * Tells the plugin if the element should animated when toggled. * @option * @type {boolean} * @default false */ animate: false }; /***/ }), /***/ 7: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Triggers; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_motion__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_motion___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__foundation_util_motion__); var MutationObserver = function () { var prefixes = ['WebKit', 'Moz', 'O', 'Ms', '']; for (var i = 0; i < prefixes.length; i++) { if (prefixes[i] + 'MutationObserver' in window) { return window[prefixes[i] + 'MutationObserver']; } } return false; }(); var triggers = function (el, type) { el.data(type).split(' ').forEach(function (id) { __WEBPACK_IMPORTED_MODULE_0_jquery___default()('#' + id)[type === 'close' ? 'trigger' : 'triggerHandler'](type + '.zf.trigger', [el]); }); }; var Triggers = { Listeners: { Basic: {}, Global: {} }, Initializers: {} }; Triggers.Listeners.Basic = { openListener: function () { triggers(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), 'open'); }, closeListener: function () { var id = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('close'); if (id) { triggers(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), 'close'); } else { __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).trigger('close.zf.trigger'); } }, toggleListener: function () { var id = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('toggle'); if (id) { triggers(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), 'toggle'); } else { __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).trigger('toggle.zf.trigger'); } }, closeableListener: function (e) { e.stopPropagation(); var animation = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('closable'); if (animation !== '') { __WEBPACK_IMPORTED_MODULE_1__foundation_util_motion__["Motion"].animateOut(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), animation, function () { __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).trigger('closed.zf'); }); } else { __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).fadeOut().trigger('closed.zf'); } }, toggleFocusListener: function () { var id = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('toggle-focus'); __WEBPACK_IMPORTED_MODULE_0_jquery___default()('#' + id).triggerHandler('toggle.zf.trigger', [__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this)]); } }; // Elements with [data-open] will reveal a plugin that supports it when clicked. Triggers.Initializers.addOpenListener = function ($elem) { $elem.off('click.zf.trigger', Triggers.Listeners.Basic.openListener); $elem.on('click.zf.trigger', '[data-open]', Triggers.Listeners.Basic.openListener); }; // Elements with [data-close] will close a plugin that supports it when clicked. // If used without a value on [data-close], the event will bubble, allowing it to close a parent component. Triggers.Initializers.addCloseListener = function ($elem) { $elem.off('click.zf.trigger', Triggers.Listeners.Basic.closeListener); $elem.on('click.zf.trigger', '[data-close]', Triggers.Listeners.Basic.closeListener); }; // Elements with [data-toggle] will toggle a plugin that supports it when clicked. Triggers.Initializers.addToggleListener = function ($elem) { $elem.off('click.zf.trigger', Triggers.Listeners.Basic.toggleListener); $elem.on('click.zf.trigger', '[data-toggle]', Triggers.Listeners.Basic.toggleListener); }; // Elements with [data-closable] will respond to close.zf.trigger events. Triggers.Initializers.addCloseableListener = function ($elem) { $elem.off('close.zf.trigger', Triggers.Listeners.Basic.closeableListener); $elem.on('close.zf.trigger', '[data-closeable], [data-closable]', Triggers.Listeners.Basic.closeableListener); }; // Elements with [data-toggle-focus] will respond to coming in and out of focus Triggers.Initializers.addToggleFocusListener = function ($elem) { $elem.off('focus.zf.trigger blur.zf.trigger', Triggers.Listeners.Basic.toggleFocusListener); $elem.on('focus.zf.trigger blur.zf.trigger', '[data-toggle-focus]', Triggers.Listeners.Basic.toggleFocusListener); }; // More Global/complex listeners and triggers Triggers.Listeners.Global = { resizeListener: function ($nodes) { if (!MutationObserver) { //fallback for IE 9 $nodes.each(function () { __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).triggerHandler('resizeme.zf.trigger'); }); } //trigger all listening elements and signal a resize event $nodes.attr('data-events', "resize"); }, scrollListener: function ($nodes) { if (!MutationObserver) { //fallback for IE 9 $nodes.each(function () { __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).triggerHandler('scrollme.zf.trigger'); }); } //trigger all listening elements and signal a scroll event $nodes.attr('data-events', "scroll"); }, closeMeListener: function (e, pluginId) { var plugin = e.namespace.split('.')[0]; var plugins = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-' + plugin + ']').not('[data-yeti-box="' + pluginId + '"]'); plugins.each(function () { var _this = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this); _this.triggerHandler('close.zf.trigger', [_this]); }); } // Global, parses whole document. };Triggers.Initializers.addClosemeListener = function (pluginName) { var yetiBoxes = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-yeti-box]'), plugNames = ['dropdown', 'tooltip', 'reveal']; if (pluginName) { if (typeof pluginName === 'string') { plugNames.push(pluginName); } else if (typeof pluginName === 'object' && typeof pluginName[0] === 'string') { plugNames.concat(pluginName); } else { console.error('Plugin names must be strings'); } } if (yetiBoxes.length) { var listeners = plugNames.map(function (name) { return 'closeme.zf.' + name; }).join(' '); __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).off(listeners).on(listeners, Triggers.Listeners.Global.closeMeListener); } }; function debounceGlobalListener(debounce, trigger, listener) { var timer = void 0, args = Array.prototype.slice.call(arguments, 3); __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).off(trigger).on(trigger, function (e) { if (timer) { clearTimeout(timer); } timer = setTimeout(function () { listener.apply(null, args); }, debounce || 10); //default time to emit scroll event }); } Triggers.Initializers.addResizeListener = function (debounce) { var $nodes = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-resize]'); if ($nodes.length) { debounceGlobalListener(debounce, 'resize.zf.trigger', Triggers.Listeners.Global.resizeListener, $nodes); } }; Triggers.Initializers.addScrollListener = function (debounce) { var $nodes = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-scroll]'); if ($nodes.length) { debounceGlobalListener(debounce, 'scroll.zf.trigger', Triggers.Listeners.Global.scrollListener, $nodes); } }; Triggers.Initializers.addMutationEventsListener = function ($elem) { if (!MutationObserver) { return false; } var $nodes = $elem.find('[data-resize], [data-scroll], [data-mutate]'); //element callback var listeningElementsMutation = function (mutationRecordsList) { var $target = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(mutationRecordsList[0].target); //trigger the event handler for the element depending on type switch (mutationRecordsList[0].type) { case "attributes": if ($target.attr("data-events") === "scroll" && mutationRecordsList[0].attributeName === "data-events") { $target.triggerHandler('scrollme.zf.trigger', [$target, window.pageYOffset]); } if ($target.attr("data-events") === "resize" && mutationRecordsList[0].attributeName === "data-events") { $target.triggerHandler('resizeme.zf.trigger', [$target]); } if (mutationRecordsList[0].attributeName === "style") { $target.closest("[data-mutate]").attr("data-events", "mutate"); $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]); } break; case "childList": $target.closest("[data-mutate]").attr("data-events", "mutate"); $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]); break; default: return false; //nothing } }; if ($nodes.length) { //for each element that needs to listen for resizing, scrolling, or mutation add a single observer for (var i = 0; i <= $nodes.length - 1; i++) { var elementObserver = new MutationObserver(listeningElementsMutation); elementObserver.observe($nodes[i], { attributes: true, childList: true, characterData: false, subtree: true, attributeFilter: ["data-events", "style"] }); } } }; Triggers.Initializers.addSimpleListeners = function () { var $document = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(document); Triggers.Initializers.addOpenListener($document); Triggers.Initializers.addCloseListener($document); Triggers.Initializers.addToggleListener($document); Triggers.Initializers.addCloseableListener($document); Triggers.Initializers.addToggleFocusListener($document); }; Triggers.Initializers.addGlobalListeners = function () { var $document = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(document); Triggers.Initializers.addMutationEventsListener($document); Triggers.Initializers.addResizeListener(); Triggers.Initializers.addScrollListener(); Triggers.Initializers.addClosemeListener(); }; Triggers.init = function ($, Foundation) { if (typeof $.triggersInitialized === 'undefined') { var $document = $(document); if (document.readyState === "complete") { Triggers.Initializers.addSimpleListeners(); Triggers.Initializers.addGlobalListeners(); } else { $(window).on('load', function () { Triggers.Initializers.addSimpleListeners(); Triggers.Initializers.addGlobalListeners(); }); } $.triggersInitialized = true; } if (Foundation) { Foundation.Triggers = Triggers; // Legacy included to be backwards compatible for now. Foundation.IHearYou = Triggers.Initializers.addGlobalListeners; } }; /***/ }), /***/ 98: /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(32); /***/ }) /******/ });