{"version":3,"names":[],"mappings":"","sources":["libs.js"],"sourcesContent":["/**\n * what-input - A global utility for tracking the current input method (mouse, keyboard or touch).\n * @version v4.3.1\n * @link https://github.com/ten1seven/what-input\n * @license MIT\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"whatInput\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"whatInput\"] = factory();\n\telse\n\t\troot[\"whatInput\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \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\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\n\tmodule.exports = function () {\n\t /*\n\t * variables\n\t */\n\n\t // last used input type\n\t var currentInput = 'initial';\n\n\t // last used input intent\n\t var currentIntent = null;\n\n\t // cache document.documentElement\n\t var doc = document.documentElement;\n\n\t // form input types\n\t var formInputs = ['input', 'select', 'textarea'];\n\n\t var functionList = [];\n\n\t // list of modifier keys commonly used with the mouse and\n\t // can be safely ignored to prevent false keyboard detection\n\t var ignoreMap = [16, // shift\n\t 17, // control\n\t 18, // alt\n\t 91, // Windows key / left Apple cmd\n\t 93 // Windows menu / right Apple cmd\n\t ];\n\n\t // list of keys for which we change intent even for form inputs\n\t var changeIntentMap = [9 // tab\n\t ];\n\n\t // mapping of events to input types\n\t var inputMap = {\n\t keydown: 'keyboard',\n\t keyup: 'keyboard',\n\t mousedown: 'mouse',\n\t mousemove: 'mouse',\n\t MSPointerDown: 'pointer',\n\t MSPointerMove: 'pointer',\n\t pointerdown: 'pointer',\n\t pointermove: 'pointer',\n\t touchstart: 'touch'\n\t };\n\n\t // array of all used input types\n\t var inputTypes = [];\n\n\t // boolean: true if touch buffer is active\n\t var isBuffering = false;\n\n\t // boolean: true if the page is being scrolled\n\t var isScrolling = false;\n\n\t // store current mouse position\n\t var mousePos = {\n\t x: null,\n\t y: null\n\t };\n\n\t // map of IE 10 pointer events\n\t var pointerMap = {\n\t 2: 'touch',\n\t 3: 'touch', // treat pen like touch\n\t 4: 'mouse'\n\t };\n\n\t var supportsPassive = false;\n\n\t try {\n\t var opts = Object.defineProperty({}, 'passive', {\n\t get: function get() {\n\t supportsPassive = true;\n\t }\n\t });\n\n\t window.addEventListener('test', null, opts);\n\t } catch (e) {}\n\n\t /*\n\t * set up\n\t */\n\n\t var setUp = function setUp() {\n\t // add correct mouse wheel event mapping to `inputMap`\n\t inputMap[detectWheel()] = 'mouse';\n\n\t addListeners();\n\t setInput();\n\t };\n\n\t /*\n\t * events\n\t */\n\n\t var addListeners = function addListeners() {\n\t // `pointermove`, `MSPointerMove`, `mousemove` and mouse wheel event binding\n\t // can only demonstrate potential, but not actual, interaction\n\t // and are treated separately\n\t var options = supportsPassive ? { passive: true } : false;\n\n\t // pointer events (mouse, pen, touch)\n\t if (window.PointerEvent) {\n\t doc.addEventListener('pointerdown', updateInput);\n\t doc.addEventListener('pointermove', setIntent);\n\t } else if (window.MSPointerEvent) {\n\t doc.addEventListener('MSPointerDown', updateInput);\n\t doc.addEventListener('MSPointerMove', setIntent);\n\t } else {\n\t // mouse events\n\t doc.addEventListener('mousedown', updateInput);\n\t doc.addEventListener('mousemove', setIntent);\n\n\t // touch events\n\t if ('ontouchstart' in window) {\n\t doc.addEventListener('touchstart', touchBuffer, options);\n\t doc.addEventListener('touchend', touchBuffer);\n\t }\n\t }\n\n\t // mouse wheel\n\t doc.addEventListener(detectWheel(), setIntent, options);\n\n\t // keyboard events\n\t doc.addEventListener('keydown', updateInput);\n\t doc.addEventListener('keyup', updateInput);\n\t };\n\n\t // checks conditions before updating new input\n\t var updateInput = function updateInput(event) {\n\t // only execute if the touch buffer timer isn't running\n\t if (!isBuffering) {\n\t var eventKey = event.which;\n\t var value = inputMap[event.type];\n\t if (value === 'pointer') value = pointerType(event);\n\n\t if (currentInput !== value || currentIntent !== value) {\n\t var activeElem = document.activeElement;\n\t var activeInput = false;\n\t var notFormInput = activeElem && activeElem.nodeName && formInputs.indexOf(activeElem.nodeName.toLowerCase()) === -1;\n\n\t if (notFormInput || changeIntentMap.indexOf(eventKey) !== -1) {\n\t activeInput = true;\n\t }\n\n\t if (value === 'touch' ||\n\t // ignore mouse modifier keys\n\t value === 'mouse' ||\n\t // don't switch if the current element is a form input\n\t value === 'keyboard' && eventKey && activeInput && ignoreMap.indexOf(eventKey) === -1) {\n\t // set the current and catch-all variable\n\t currentInput = currentIntent = value;\n\n\t setInput();\n\t }\n\t }\n\t }\n\t };\n\n\t // updates the doc and `inputTypes` array with new input\n\t var setInput = function setInput() {\n\t doc.setAttribute('data-whatinput', currentInput);\n\t doc.setAttribute('data-whatintent', currentInput);\n\n\t if (inputTypes.indexOf(currentInput) === -1) {\n\t inputTypes.push(currentInput);\n\t doc.className += ' whatinput-types-' + currentInput;\n\t }\n\n\t fireFunctions('input');\n\t };\n\n\t // updates input intent for `mousemove` and `pointermove`\n\t var setIntent = function setIntent(event) {\n\t // test to see if `mousemove` happened relative to the screen\n\t // to detect scrolling versus mousemove\n\t if (mousePos['x'] !== event.screenX || mousePos['y'] !== event.screenY) {\n\t isScrolling = false;\n\n\t mousePos['x'] = event.screenX;\n\t mousePos['y'] = event.screenY;\n\t } else {\n\t isScrolling = true;\n\t }\n\n\t // only execute if the touch buffer timer isn't running\n\t // or scrolling isn't happening\n\t if (!isBuffering && !isScrolling) {\n\t var value = inputMap[event.type];\n\t if (value === 'pointer') value = pointerType(event);\n\n\t if (currentIntent !== value) {\n\t currentIntent = value;\n\n\t doc.setAttribute('data-whatintent', currentIntent);\n\n\t fireFunctions('intent');\n\t }\n\t }\n\t };\n\n\t // buffers touch events because they frequently also fire mouse events\n\t var touchBuffer = function touchBuffer(event) {\n\t if (event.type === 'touchstart') {\n\t isBuffering = false;\n\n\t // set the current input\n\t updateInput(event);\n\t } else {\n\t isBuffering = true;\n\t }\n\t };\n\n\t var fireFunctions = function fireFunctions(type) {\n\t for (var i = 0, len = functionList.length; i < len; i++) {\n\t if (functionList[i].type === type) {\n\t functionList[i].fn.call(undefined, currentIntent);\n\t }\n\t }\n\t };\n\n\t /*\n\t * utilities\n\t */\n\n\t var pointerType = function pointerType(event) {\n\t if (typeof event.pointerType === 'number') {\n\t return pointerMap[event.pointerType];\n\t } else {\n\t // treat pen like touch\n\t return event.pointerType === 'pen' ? 'touch' : event.pointerType;\n\t }\n\t };\n\n\t // detect version of mouse wheel event to use\n\t // via https://developer.mozilla.org/en-US/docs/Web/Events/wheel\n\t var detectWheel = function detectWheel() {\n\t var wheelType = void 0;\n\n\t // Modern browsers support \"wheel\"\n\t if ('onwheel' in document.createElement('div')) {\n\t wheelType = 'wheel';\n\t } else {\n\t // Webkit and IE support at least \"mousewheel\"\n\t // or assume that remaining browsers are older Firefox\n\t wheelType = document.onmousewheel !== undefined ? 'mousewheel' : 'DOMMouseScroll';\n\t }\n\n\t return wheelType;\n\t };\n\n\t var objPos = function objPos(match) {\n\t for (var i = 0, len = functionList.length; i < len; i++) {\n\t if (functionList[i].fn === match) {\n\t return i;\n\t }\n\t }\n\t };\n\n\t /*\n\t * init\n\t */\n\n\t // don't start script unless browser cuts the mustard\n\t // (also passes if polyfills are used)\n\t if ('addEventListener' in window && Array.prototype.indexOf) {\n\t setUp();\n\t }\n\n\t /*\n\t * api\n\t */\n\n\t return {\n\t // returns string: the current input type\n\t // opt: 'loose'|'strict'\n\t // 'strict' (default): returns the same value as the `data-whatinput` attribute\n\t // 'loose': includes `data-whatintent` value if it's more current than `data-whatinput`\n\t ask: function ask(opt) {\n\t return opt === 'loose' ? currentIntent : currentInput;\n\t },\n\n\t // returns array: all the detected input types\n\t types: function types() {\n\t return inputTypes;\n\t },\n\n\t // overwrites ignored keys with provided array\n\t ignoreKeys: function ignoreKeys(arr) {\n\t ignoreMap = arr;\n\t },\n\n\t // attach functions to input and intent \"events\"\n\t // funct: function to fire on change\n\t // eventType: 'input'|'intent'\n\t registerOnChange: function registerOnChange(fn, eventType) {\n\t functionList.push({\n\t fn: fn,\n\t type: eventType || 'input'\n\t });\n\t },\n\n\t unRegisterOnChange: function unRegisterOnChange(fn) {\n\t var position = objPos(fn);\n\n\t if (position) {\n\t functionList.splice(position, 1);\n\t }\n\t }\n\t };\n\t}();\n\n/***/ }\n/******/ ])\n});\n;\n/******/ (function(modules) { // webpackBootstrap\n/******/ \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// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\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, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\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// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 36);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = jQuery;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return rtl; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return GetYoDigits; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return transitionend; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);\n\n\n\n\n// Core Foundation Utilities, utilized in a number of places.\n\n/**\n * Returns a boolean for RTL support\n */\nfunction rtl() {\n return __WEBPACK_IMPORTED_MODULE_0_jquery___default()('html').attr('dir') === 'rtl';\n}\n\n/**\n * returns a random base-36 uid with namespacing\n * @function\n * @param {Number} length - number of random base-36 digits desired. Increase for more random strings.\n * @param {String} namespace - name of plugin to be incorporated in uid, optional.\n * @default {String} '' - if no plugin name is provided, nothing is appended to the uid.\n * @returns {String} - unique id\n */\nfunction GetYoDigits(length, namespace) {\n length = length || 6;\n return Math.round(Math.pow(36, length + 1) - Math.random() * Math.pow(36, length)).toString(36).slice(1) + (namespace ? '-' + namespace : '');\n}\n\nfunction transitionend($elem) {\n var transitions = {\n 'transition': 'transitionend',\n 'WebkitTransition': 'webkitTransitionEnd',\n 'MozTransition': 'transitionend',\n 'OTransition': 'otransitionend'\n };\n var elem = document.createElement('div'),\n end;\n\n for (var t in transitions) {\n if (typeof elem.style[t] !== 'undefined') {\n end = transitions[t];\n }\n }\n if (end) {\n return end;\n } else {\n end = setTimeout(function () {\n $elem.triggerHandler('transitionend', [$elem]);\n }, 1);\n return 'transitionend';\n }\n}\n\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Plugin; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_core__ = __webpack_require__(1);\n\n\nvar _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; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n\n\n\n// Abstract class for providing lifecycle hooks. Expect plugins to define AT LEAST\n// {function} _setup (replaces previous constructor),\n// {function} _destroy (replaces previous destroy)\n\nvar Plugin = function () {\n function Plugin(element, options) {\n _classCallCheck(this, Plugin);\n\n this._setup(element, options);\n var pluginName = getPluginName(this);\n this.uuid = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__foundation_util_core__[\"b\" /* GetYoDigits */])(6, pluginName);\n\n if (!this.$element.attr('data-' + pluginName)) {\n this.$element.attr('data-' + pluginName, this.uuid);\n }\n if (!this.$element.data('zfPlugin')) {\n this.$element.data('zfPlugin', this);\n }\n /**\n * Fires when the plugin has initialized.\n * @event Plugin#init\n */\n this.$element.trigger('init.zf.' + pluginName);\n }\n\n _createClass(Plugin, [{\n key: 'destroy',\n value: function destroy() {\n this._destroy();\n var pluginName = getPluginName(this);\n this.$element.removeAttr('data-' + pluginName).removeData('zfPlugin')\n /**\n * Fires when the plugin has been destroyed.\n * @event Plugin#destroyed\n */\n .trigger('destroyed.zf.' + pluginName);\n for (var prop in this) {\n this[prop] = null; //clean up script to prep for garbage collection.\n }\n }\n }]);\n\n return Plugin;\n}();\n\n// Convert PascalCase to kebab-case\n// Thank you: http://stackoverflow.com/a/8955580\n\n\nfunction hyphenate(str) {\n return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\n\nfunction getPluginName(obj) {\n if (typeof obj.constructor.name !== 'undefined') {\n return hyphenate(obj.constructor.name);\n } else {\n return hyphenate(obj.className);\n }\n}\n\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Keyboard; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_core__ = __webpack_require__(1);\n/*******************************************\n * *\n * This util was created by Marius Olbertz *\n * Please thank Marius on GitHub /owlbertz *\n * or the web http://www.mariusolbertz.de/ *\n * *\n ******************************************/\n\n\n\n\n\n\nvar keyCodes = {\n 9: 'TAB',\n 13: 'ENTER',\n 27: 'ESCAPE',\n 32: 'SPACE',\n 35: 'END',\n 36: 'HOME',\n 37: 'ARROW_LEFT',\n 38: 'ARROW_UP',\n 39: 'ARROW_RIGHT',\n 40: 'ARROW_DOWN'\n};\n\nvar commands = {};\n\n// Functions pulled out to be referenceable from internals\nfunction findFocusable($element) {\n if (!$element) {\n return false;\n }\n return $element.find('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]').filter(function () {\n if (!__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).is(':visible') || __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).attr('tabindex') < 0) {\n return false;\n } //only have visible elements and those that have a tabindex greater or equal 0\n return true;\n });\n}\n\nfunction parseKey(event) {\n var key = keyCodes[event.which || event.keyCode] || String.fromCharCode(event.which).toUpperCase();\n\n // Remove un-printable characters, e.g. for `fromCharCode` calls for CTRL only events\n key = key.replace(/\\W+/, '');\n\n if (event.shiftKey) key = 'SHIFT_' + key;\n if (event.ctrlKey) key = 'CTRL_' + key;\n if (event.altKey) key = 'ALT_' + key;\n\n // Remove trailing underscore, in case only modifiers were used (e.g. only `CTRL_ALT`)\n key = key.replace(/_$/, '');\n\n return key;\n}\n\nvar Keyboard = {\n keys: getKeyCodes(keyCodes),\n\n /**\n * Parses the (keyboard) event and returns a String that represents its key\n * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE\n * @param {Event} event - the event generated by the event handler\n * @return String key - String that represents the key pressed\n */\n parseKey: parseKey,\n\n /**\n * Handles the given (keyboard) event\n * @param {Event} event - the event generated by the event handler\n * @param {String} component - Foundation component's name, e.g. Slider or Reveal\n * @param {Objects} functions - collection of functions that are to be executed\n */\n handleKey: function (event, component, functions) {\n var commandList = commands[component],\n keyCode = this.parseKey(event),\n cmds,\n command,\n fn;\n\n if (!commandList) return console.warn('Component not defined!');\n\n if (typeof commandList.ltr === 'undefined') {\n // this component does not differentiate between ltr and rtl\n cmds = commandList; // use plain list\n } else {\n // merge ltr and rtl: if document is rtl, rtl overwrites ltr and vice versa\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__foundation_util_core__[\"a\" /* rtl */])()) cmds = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend({}, commandList.ltr, commandList.rtl);else cmds = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend({}, commandList.rtl, commandList.ltr);\n }\n command = cmds[keyCode];\n\n fn = functions[command];\n if (fn && typeof fn === 'function') {\n // execute function if exists\n var returnValue = fn.apply();\n if (functions.handled || typeof functions.handled === 'function') {\n // execute function when event was handled\n functions.handled(returnValue);\n }\n } else {\n if (functions.unhandled || typeof functions.unhandled === 'function') {\n // execute function when event was not handled\n functions.unhandled();\n }\n }\n },\n\n\n /**\n * Finds all focusable elements within the given `$element`\n * @param {jQuery} $element - jQuery object to search within\n * @return {jQuery} $focusable - all focusable elements within `$element`\n */\n\n findFocusable: findFocusable,\n\n /**\n * Returns the component name name\n * @param {Object} component - Foundation component, e.g. Slider or Reveal\n * @return String componentName\n */\n\n register: function (componentName, cmds) {\n commands[componentName] = cmds;\n },\n\n\n // TODO9438: These references to Keyboard need to not require global. Will 'this' work in this context?\n //\n /**\n * Traps the focus in the given element.\n * @param {jQuery} $element jQuery object to trap the foucs into.\n */\n trapFocus: function ($element) {\n var $focusable = findFocusable($element),\n $firstFocusable = $focusable.eq(0),\n $lastFocusable = $focusable.eq(-1);\n\n $element.on('keydown.zf.trapfocus', function (event) {\n if (event.target === $lastFocusable[0] && parseKey(event) === 'TAB') {\n event.preventDefault();\n $firstFocusable.focus();\n } else if (event.target === $firstFocusable[0] && parseKey(event) === 'SHIFT_TAB') {\n event.preventDefault();\n $lastFocusable.focus();\n }\n });\n },\n\n /**\n * Releases the trapped focus from the given element.\n * @param {jQuery} $element jQuery object to release the focus for.\n */\n releaseFocus: function ($element) {\n $element.off('keydown.zf.trapfocus');\n }\n};\n\n/*\n * Constants for easier comparing.\n * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE\n */\nfunction getKeyCodes(kcs) {\n var k = {};\n for (var kc in kcs) {\n k[kcs[kc]] = kcs[kc];\n }return k;\n}\n\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MediaQuery; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);\n\n\n\n\n// Default set of media queries\nvar defaultQueries = {\n 'default': 'only screen',\n landscape: 'only screen and (orientation: landscape)',\n portrait: 'only screen and (orientation: portrait)',\n retina: 'only screen and (-webkit-min-device-pixel-ratio: 2),' + 'only screen and (min--moz-device-pixel-ratio: 2),' + 'only screen and (-o-min-device-pixel-ratio: 2/1),' + 'only screen and (min-device-pixel-ratio: 2),' + 'only screen and (min-resolution: 192dpi),' + 'only screen and (min-resolution: 2dppx)'\n};\n\n// matchMedia() polyfill - Test a CSS media type/query in JS.\n// Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license\nvar matchMedia = window.matchMedia || function () {\n 'use strict';\n\n // For browsers that support matchMedium api such as IE 9 and webkit\n\n var styleMedia = window.styleMedia || window.media;\n\n // For those that don't support matchMedium\n if (!styleMedia) {\n var style = document.createElement('style'),\n script = document.getElementsByTagName('script')[0],\n info = null;\n\n style.type = 'text/css';\n style.id = 'matchmediajs-test';\n\n script && script.parentNode && script.parentNode.insertBefore(style, script);\n\n // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers\n info = 'getComputedStyle' in window && window.getComputedStyle(style, null) || style.currentStyle;\n\n styleMedia = {\n matchMedium: function (media) {\n var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }';\n\n // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers\n if (style.styleSheet) {\n style.styleSheet.cssText = text;\n } else {\n style.textContent = text;\n }\n\n // Test if media query is true or false\n return info.width === '1px';\n }\n };\n }\n\n return function (media) {\n return {\n matches: styleMedia.matchMedium(media || 'all'),\n media: media || 'all'\n };\n };\n}();\n\nvar MediaQuery = {\n queries: [],\n\n current: '',\n\n /**\n * Initializes the media query helper, by extracting the breakpoint list from the CSS and activating the breakpoint watcher.\n * @function\n * @private\n */\n _init: function () {\n var self = this;\n var $meta = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('meta.foundation-mq');\n if (!$meta.length) {\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()('').appendTo(document.head);\n }\n\n var extractedStyles = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('.foundation-mq').css('font-family');\n var namedQueries;\n\n namedQueries = parseStyleToObject(extractedStyles);\n\n for (var key in namedQueries) {\n if (namedQueries.hasOwnProperty(key)) {\n self.queries.push({\n name: key,\n value: 'only screen and (min-width: ' + namedQueries[key] + ')'\n });\n }\n }\n\n this.current = this._getCurrentSize();\n\n this._watcher();\n },\n\n\n /**\n * Checks if the screen is at least as wide as a breakpoint.\n * @function\n * @param {String} size - Name of the breakpoint to check.\n * @returns {Boolean} `true` if the breakpoint matches, `false` if it's smaller.\n */\n atLeast: function (size) {\n var query = this.get(size);\n\n if (query) {\n return matchMedia(query).matches;\n }\n\n return false;\n },\n\n\n /**\n * Checks if the screen matches to a breakpoint.\n * @function\n * @param {String} size - Name of the breakpoint to check, either 'small only' or 'small'. Omitting 'only' falls back to using atLeast() method.\n * @returns {Boolean} `true` if the breakpoint matches, `false` if it does not.\n */\n is: function (size) {\n size = size.trim().split(' ');\n if (size.length > 1 && size[1] === 'only') {\n if (size[0] === this._getCurrentSize()) return true;\n } else {\n return this.atLeast(size[0]);\n }\n return false;\n },\n\n\n /**\n * Gets the media query of a breakpoint.\n * @function\n * @param {String} size - Name of the breakpoint to get.\n * @returns {String|null} - The media query of the breakpoint, or `null` if the breakpoint doesn't exist.\n */\n get: function (size) {\n for (var i in this.queries) {\n if (this.queries.hasOwnProperty(i)) {\n var query = this.queries[i];\n if (size === query.name) return query.value;\n }\n }\n\n return null;\n },\n\n\n /**\n * Gets the current breakpoint name by testing every breakpoint and returning the last one to match (the biggest one).\n * @function\n * @private\n * @returns {String} Name of the current breakpoint.\n */\n _getCurrentSize: function () {\n var matched;\n\n for (var i = 0; i < this.queries.length; i++) {\n var query = this.queries[i];\n\n if (matchMedia(query.value).matches) {\n matched = query;\n }\n }\n\n if (typeof matched === 'object') {\n return matched.name;\n } else {\n return matched;\n }\n },\n\n\n /**\n * Activates the breakpoint watcher, which fires an event on the window whenever the breakpoint changes.\n * @function\n * @private\n */\n _watcher: function () {\n var _this = this;\n\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).off('resize.zf.mediaquery').on('resize.zf.mediaquery', function () {\n var newSize = _this._getCurrentSize(),\n currentSize = _this.current;\n\n if (newSize !== currentSize) {\n // Change the current media query\n _this.current = newSize;\n\n // Broadcast the media query change on the window\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).trigger('changed.zf.mediaquery', [newSize, currentSize]);\n }\n });\n }\n};\n\n// Thank you: https://github.com/sindresorhus/query-string\nfunction parseStyleToObject(str) {\n var styleObject = {};\n\n if (typeof str !== 'string') {\n return styleObject;\n }\n\n str = str.trim().slice(1, -1); // browsers re-quote string style values\n\n if (!str) {\n return styleObject;\n }\n\n styleObject = str.split('&').reduce(function (ret, param) {\n var parts = param.replace(/\\+/g, ' ').split('=');\n var key = parts[0];\n var val = parts[1];\n key = decodeURIComponent(key);\n\n // missing `=` should be `null`:\n // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n val = val === undefined ? null : decodeURIComponent(val);\n\n if (!ret.hasOwnProperty(key)) {\n ret[key] = val;\n } else if (Array.isArray(ret[key])) {\n ret[key].push(val);\n } else {\n ret[key] = [ret[key], val];\n }\n return ret;\n }, {});\n\n return styleObject;\n}\n\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Triggers; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_motion__ = __webpack_require__(6);\n\n\n\n\n\nvar MutationObserver = function () {\n var prefixes = ['WebKit', 'Moz', 'O', 'Ms', ''];\n for (var i = 0; i < prefixes.length; i++) {\n if (prefixes[i] + 'MutationObserver' in window) {\n return window[prefixes[i] + 'MutationObserver'];\n }\n }\n return false;\n}();\n\nvar triggers = function (el, type) {\n el.data(type).split(' ').forEach(function (id) {\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()('#' + id)[type === 'close' ? 'trigger' : 'triggerHandler'](type + '.zf.trigger', [el]);\n });\n};\n\nvar Triggers = {\n Listeners: {\n Basic: {},\n Global: {}\n },\n Initializers: {}\n};\n\nTriggers.Listeners.Basic = {\n openListener: function () {\n triggers(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), 'open');\n },\n closeListener: function () {\n var id = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('close');\n if (id) {\n triggers(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), 'close');\n } else {\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).trigger('close.zf.trigger');\n }\n },\n toggleListener: function () {\n var id = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('toggle');\n if (id) {\n triggers(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), 'toggle');\n } else {\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).trigger('toggle.zf.trigger');\n }\n },\n closeableListener: function (e) {\n e.stopPropagation();\n var animation = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('closable');\n\n if (animation !== '') {\n __WEBPACK_IMPORTED_MODULE_1__foundation_util_motion__[\"a\" /* Motion */].animateOut(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), animation, function () {\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).trigger('closed.zf');\n });\n } else {\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).fadeOut().trigger('closed.zf');\n }\n },\n toggleFocusListener: function () {\n var id = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('toggle-focus');\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()('#' + id).triggerHandler('toggle.zf.trigger', [__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this)]);\n }\n};\n\n// Elements with [data-open] will reveal a plugin that supports it when clicked.\nTriggers.Initializers.addOpenListener = function ($elem) {\n $elem.off('click.zf.trigger', Triggers.Listeners.Basic.openListener);\n $elem.on('click.zf.trigger', '[data-open]', Triggers.Listeners.Basic.openListener);\n};\n\n// Elements with [data-close] will close a plugin that supports it when clicked.\n// If used without a value on [data-close], the event will bubble, allowing it to close a parent component.\nTriggers.Initializers.addCloseListener = function ($elem) {\n $elem.off('click.zf.trigger', Triggers.Listeners.Basic.closeListener);\n $elem.on('click.zf.trigger', '[data-close]', Triggers.Listeners.Basic.closeListener);\n};\n\n// Elements with [data-toggle] will toggle a plugin that supports it when clicked.\nTriggers.Initializers.addToggleListener = function ($elem) {\n $elem.off('click.zf.trigger', Triggers.Listeners.Basic.toggleListener);\n $elem.on('click.zf.trigger', '[data-toggle]', Triggers.Listeners.Basic.toggleListener);\n};\n\n// Elements with [data-closable] will respond to close.zf.trigger events.\nTriggers.Initializers.addCloseableListener = function ($elem) {\n $elem.off('close.zf.trigger', Triggers.Listeners.Basic.closeableListener);\n $elem.on('close.zf.trigger', '[data-closeable], [data-closable]', Triggers.Listeners.Basic.closeableListener);\n};\n\n// Elements with [data-toggle-focus] will respond to coming in and out of focus\nTriggers.Initializers.addToggleFocusListener = function ($elem) {\n $elem.off('focus.zf.trigger blur.zf.trigger', Triggers.Listeners.Basic.toggleFocusListener);\n $elem.on('focus.zf.trigger blur.zf.trigger', '[data-toggle-focus]', Triggers.Listeners.Basic.toggleFocusListener);\n};\n\n// More Global/complex listeners and triggers\nTriggers.Listeners.Global = {\n resizeListener: function ($nodes) {\n if (!MutationObserver) {\n //fallback for IE 9\n $nodes.each(function () {\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).triggerHandler('resizeme.zf.trigger');\n });\n }\n //trigger all listening elements and signal a resize event\n $nodes.attr('data-events', \"resize\");\n },\n scrollListener: function ($nodes) {\n if (!MutationObserver) {\n //fallback for IE 9\n $nodes.each(function () {\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).triggerHandler('scrollme.zf.trigger');\n });\n }\n //trigger all listening elements and signal a scroll event\n $nodes.attr('data-events', \"scroll\");\n },\n closeMeListener: function (e, pluginId) {\n var plugin = e.namespace.split('.')[0];\n var plugins = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-' + plugin + ']').not('[data-yeti-box=\"' + pluginId + '\"]');\n\n plugins.each(function () {\n var _this = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this);\n _this.triggerHandler('close.zf.trigger', [_this]);\n });\n }\n\n // Global, parses whole document.\n};Triggers.Initializers.addClosemeListener = function (pluginName) {\n var yetiBoxes = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-yeti-box]'),\n plugNames = ['dropdown', 'tooltip', 'reveal'];\n\n if (pluginName) {\n if (typeof pluginName === 'string') {\n plugNames.push(pluginName);\n } else if (typeof pluginName === 'object' && typeof pluginName[0] === 'string') {\n plugNames.concat(pluginName);\n } else {\n console.error('Plugin names must be strings');\n }\n }\n if (yetiBoxes.length) {\n var listeners = plugNames.map(function (name) {\n return 'closeme.zf.' + name;\n }).join(' ');\n\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).off(listeners).on(listeners, Triggers.Listeners.Global.closeMeListener);\n }\n};\n\nfunction debounceGlobalListener(debounce, trigger, listener) {\n var timer = void 0,\n args = Array.prototype.slice.call(arguments, 3);\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).off(trigger).on(trigger, function (e) {\n if (timer) {\n clearTimeout(timer);\n }\n timer = setTimeout(function () {\n listener.apply(null, args);\n }, debounce || 10); //default time to emit scroll event\n });\n}\n\nTriggers.Initializers.addResizeListener = function (debounce) {\n var $nodes = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-resize]');\n if ($nodes.length) {\n debounceGlobalListener(debounce, 'resize.zf.trigger', Triggers.Listeners.Global.resizeListener, $nodes);\n }\n};\n\nTriggers.Initializers.addScrollListener = function (debounce) {\n var $nodes = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-scroll]');\n if ($nodes.length) {\n debounceGlobalListener(debounce, 'scroll.zf.trigger', Triggers.Listeners.Global.scrollListener, $nodes);\n }\n};\n\nTriggers.Initializers.addMutationEventsListener = function ($elem) {\n if (!MutationObserver) {\n return false;\n }\n var $nodes = $elem.find('[data-resize], [data-scroll], [data-mutate]');\n\n //element callback\n var listeningElementsMutation = function (mutationRecordsList) {\n var $target = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(mutationRecordsList[0].target);\n\n //trigger the event handler for the element depending on type\n switch (mutationRecordsList[0].type) {\n case \"attributes\":\n if ($target.attr(\"data-events\") === \"scroll\" && mutationRecordsList[0].attributeName === \"data-events\") {\n $target.triggerHandler('scrollme.zf.trigger', [$target, window.pageYOffset]);\n }\n if ($target.attr(\"data-events\") === \"resize\" && mutationRecordsList[0].attributeName === \"data-events\") {\n $target.triggerHandler('resizeme.zf.trigger', [$target]);\n }\n if (mutationRecordsList[0].attributeName === \"style\") {\n $target.closest(\"[data-mutate]\").attr(\"data-events\", \"mutate\");\n $target.closest(\"[data-mutate]\").triggerHandler('mutateme.zf.trigger', [$target.closest(\"[data-mutate]\")]);\n }\n break;\n\n case \"childList\":\n $target.closest(\"[data-mutate]\").attr(\"data-events\", \"mutate\");\n $target.closest(\"[data-mutate]\").triggerHandler('mutateme.zf.trigger', [$target.closest(\"[data-mutate]\")]);\n break;\n\n default:\n return false;\n //nothing\n }\n };\n\n if ($nodes.length) {\n //for each element that needs to listen for resizing, scrolling, or mutation add a single observer\n for (var i = 0; i <= $nodes.length - 1; i++) {\n var elementObserver = new MutationObserver(listeningElementsMutation);\n elementObserver.observe($nodes[i], { attributes: true, childList: true, characterData: false, subtree: true, attributeFilter: [\"data-events\", \"style\"] });\n }\n }\n};\n\nTriggers.Initializers.addSimpleListeners = function () {\n var $document = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(document);\n\n Triggers.Initializers.addOpenListener($document);\n Triggers.Initializers.addCloseListener($document);\n Triggers.Initializers.addToggleListener($document);\n Triggers.Initializers.addCloseableListener($document);\n Triggers.Initializers.addToggleFocusListener($document);\n};\n\nTriggers.Initializers.addGlobalListeners = function () {\n var $document = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(document);\n Triggers.Initializers.addMutationEventsListener($document);\n Triggers.Initializers.addResizeListener();\n Triggers.Initializers.addScrollListener();\n Triggers.Initializers.addClosemeListener();\n};\n\nTriggers.init = function ($, Foundation) {\n if (typeof $.triggersInitialized === 'undefined') {\n var $document = $(document);\n\n if (document.readyState === \"complete\") {\n Triggers.Initializers.addSimpleListeners();\n Triggers.Initializers.addGlobalListeners();\n } else {\n $(window).on('load', function () {\n Triggers.Initializers.addSimpleListeners();\n Triggers.Initializers.addGlobalListeners();\n });\n }\n\n $.triggersInitialized = true;\n }\n\n if (Foundation) {\n Foundation.Triggers = Triggers;\n // Legacy included to be backwards compatible for now.\n Foundation.IHearYou = Triggers.Initializers.addGlobalListeners;\n }\n};\n\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return Move; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Motion; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_core__ = __webpack_require__(1);\n\n\n\n\n\n/**\n * Motion module.\n * @module foundation.motion\n */\n\nvar initClasses = ['mui-enter', 'mui-leave'];\nvar activeClasses = ['mui-enter-active', 'mui-leave-active'];\n\nvar Motion = {\n animateIn: function (element, animation, cb) {\n animate(true, element, animation, cb);\n },\n\n animateOut: function (element, animation, cb) {\n animate(false, element, animation, cb);\n }\n};\n\nfunction Move(duration, elem, fn) {\n var anim,\n prog,\n start = null;\n // console.log('called');\n\n if (duration === 0) {\n fn.apply(elem);\n elem.trigger('finished.zf.animate', [elem]).triggerHandler('finished.zf.animate', [elem]);\n return;\n }\n\n function move(ts) {\n if (!start) start = ts;\n // console.log(start, ts);\n prog = ts - start;\n fn.apply(elem);\n\n if (prog < duration) {\n anim = window.requestAnimationFrame(move, elem);\n } else {\n window.cancelAnimationFrame(anim);\n elem.trigger('finished.zf.animate', [elem]).triggerHandler('finished.zf.animate', [elem]);\n }\n }\n anim = window.requestAnimationFrame(move);\n}\n\n/**\n * Animates an element in or out using a CSS transition class.\n * @function\n * @private\n * @param {Boolean} isIn - Defines if the animation is in or out.\n * @param {Object} element - jQuery or HTML object to animate.\n * @param {String} animation - CSS class to use.\n * @param {Function} cb - Callback to run when animation is finished.\n */\nfunction animate(isIn, element, animation, cb) {\n element = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(element).eq(0);\n\n if (!element.length) return;\n\n var initClass = isIn ? initClasses[0] : initClasses[1];\n var activeClass = isIn ? activeClasses[0] : activeClasses[1];\n\n // Set up the animation\n reset();\n\n element.addClass(animation).css('transition', 'none');\n\n requestAnimationFrame(function () {\n element.addClass(initClass);\n if (isIn) element.show();\n });\n\n // Start the animation\n requestAnimationFrame(function () {\n element[0].offsetWidth;\n element.css('transition', '').addClass(activeClass);\n });\n\n // Clean up the animation when it finishes\n element.one(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__foundation_util_core__[\"c\" /* transitionend */])(element), finish);\n\n // Hides the element (for out animations), resets the element, and runs a callback\n function finish() {\n if (!isIn) element.hide();\n reset();\n if (cb) cb.apply(element);\n }\n\n // Resets transitions and removes motion-specific classes\n function reset() {\n element[0].style.transitionDuration = 0;\n element.removeClass(initClass + ' ' + activeClass + ' ' + animation);\n }\n}\n\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Box; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_util_core__ = __webpack_require__(1);\n\n\n\n\nvar Box = {\n ImNotTouchingYou: ImNotTouchingYou,\n OverlapArea: OverlapArea,\n GetDimensions: GetDimensions,\n GetOffsets: GetOffsets,\n GetExplicitOffsets: GetExplicitOffsets\n\n /**\n * Compares the dimensions of an element to a container and determines collision events with container.\n * @function\n * @param {jQuery} element - jQuery object to test for collisions.\n * @param {jQuery} parent - jQuery object to use as bounding container.\n * @param {Boolean} lrOnly - set to true to check left and right values only.\n * @param {Boolean} tbOnly - set to true to check top and bottom values only.\n * @default if no parent object passed, detects collisions with `window`.\n * @returns {Boolean} - true if collision free, false if a collision in any direction.\n */\n};function ImNotTouchingYou(element, parent, lrOnly, tbOnly, ignoreBottom) {\n return OverlapArea(element, parent, lrOnly, tbOnly, ignoreBottom) === 0;\n};\n\nfunction OverlapArea(element, parent, lrOnly, tbOnly, ignoreBottom) {\n var eleDims = GetDimensions(element),\n topOver,\n bottomOver,\n leftOver,\n rightOver;\n if (parent) {\n var parDims = GetDimensions(parent);\n\n bottomOver = parDims.height + parDims.offset.top - (eleDims.offset.top + eleDims.height);\n topOver = eleDims.offset.top - parDims.offset.top;\n leftOver = eleDims.offset.left - parDims.offset.left;\n rightOver = parDims.width + parDims.offset.left - (eleDims.offset.left + eleDims.width);\n } else {\n bottomOver = eleDims.windowDims.height + eleDims.windowDims.offset.top - (eleDims.offset.top + eleDims.height);\n topOver = eleDims.offset.top - eleDims.windowDims.offset.top;\n leftOver = eleDims.offset.left - eleDims.windowDims.offset.left;\n rightOver = eleDims.windowDims.width - (eleDims.offset.left + eleDims.width);\n }\n\n bottomOver = ignoreBottom ? 0 : Math.min(bottomOver, 0);\n topOver = Math.min(topOver, 0);\n leftOver = Math.min(leftOver, 0);\n rightOver = Math.min(rightOver, 0);\n\n if (lrOnly) {\n return leftOver + rightOver;\n }\n if (tbOnly) {\n return topOver + bottomOver;\n }\n\n // use sum of squares b/c we care about overlap area.\n return Math.sqrt(topOver * topOver + bottomOver * bottomOver + leftOver * leftOver + rightOver * rightOver);\n}\n\n/**\n * Uses native methods to return an object of dimension values.\n * @function\n * @param {jQuery || HTML} element - jQuery object or DOM element for which to get the dimensions. Can be any element other that document or window.\n * @returns {Object} - nested object of integer pixel values\n * TODO - if element is window, return only those values.\n */\nfunction GetDimensions(elem) {\n elem = elem.length ? elem[0] : elem;\n\n if (elem === window || elem === document) {\n throw new Error(\"I'm sorry, Dave. I'm afraid I can't do that.\");\n }\n\n var rect = elem.getBoundingClientRect(),\n parRect = elem.parentNode.getBoundingClientRect(),\n winRect = document.body.getBoundingClientRect(),\n winY = window.pageYOffset,\n winX = window.pageXOffset;\n\n return {\n width: rect.width,\n height: rect.height,\n offset: {\n top: rect.top + winY,\n left: rect.left + winX\n },\n parentDims: {\n width: parRect.width,\n height: parRect.height,\n offset: {\n top: parRect.top + winY,\n left: parRect.left + winX\n }\n },\n windowDims: {\n width: winRect.width,\n height: winRect.height,\n offset: {\n top: winY,\n left: winX\n }\n }\n };\n}\n\n/**\n * Returns an object of top and left integer pixel values for dynamically rendered elements,\n * such as: Tooltip, Reveal, and Dropdown. Maintained for backwards compatibility, and where\n * you don't know alignment, but generally from\n * 6.4 forward you should use GetExplicitOffsets, as GetOffsets conflates position and alignment.\n * @function\n * @param {jQuery} element - jQuery object for the element being positioned.\n * @param {jQuery} anchor - jQuery object for the element's anchor point.\n * @param {String} position - a string relating to the desired position of the element, relative to it's anchor\n * @param {Number} vOffset - integer pixel value of desired vertical separation between anchor and element.\n * @param {Number} hOffset - integer pixel value of desired horizontal separation between anchor and element.\n * @param {Boolean} isOverflow - if a collision event is detected, sets to true to default the element to full width - any desired offset.\n * TODO alter/rewrite to work with `em` values as well/instead of pixels\n */\nfunction GetOffsets(element, anchor, position, vOffset, hOffset, isOverflow) {\n console.log(\"NOTE: GetOffsets is deprecated in favor of GetExplicitOffsets and will be removed in 6.5\");\n switch (position) {\n case 'top':\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__foundation_util_core__[\"a\" /* rtl */])() ? GetExplicitOffsets(element, anchor, 'top', 'left', vOffset, hOffset, isOverflow) : GetExplicitOffsets(element, anchor, 'top', 'right', vOffset, hOffset, isOverflow);\n case 'bottom':\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__foundation_util_core__[\"a\" /* rtl */])() ? GetExplicitOffsets(element, anchor, 'bottom', 'left', vOffset, hOffset, isOverflow) : GetExplicitOffsets(element, anchor, 'bottom', 'right', vOffset, hOffset, isOverflow);\n case 'center top':\n return GetExplicitOffsets(element, anchor, 'top', 'center', vOffset, hOffset, isOverflow);\n case 'center bottom':\n return GetExplicitOffsets(element, anchor, 'bottom', 'center', vOffset, hOffset, isOverflow);\n case 'center left':\n return GetExplicitOffsets(element, anchor, 'left', 'center', vOffset, hOffset, isOverflow);\n case 'center right':\n return GetExplicitOffsets(element, anchor, 'right', 'center', vOffset, hOffset, isOverflow);\n case 'left bottom':\n return GetExplicitOffsets(element, anchor, 'bottom', 'left', vOffset, hOffset, isOverflow);\n case 'right bottom':\n return GetExplicitOffsets(element, anchor, 'bottom', 'right', vOffset, hOffset, isOverflow);\n // Backwards compatibility... this along with the reveal and reveal full\n // classes are the only ones that didn't reference anchor\n case 'center':\n return {\n left: $eleDims.windowDims.offset.left + $eleDims.windowDims.width / 2 - $eleDims.width / 2 + hOffset,\n top: $eleDims.windowDims.offset.top + $eleDims.windowDims.height / 2 - ($eleDims.height / 2 + vOffset)\n };\n case 'reveal':\n return {\n left: ($eleDims.windowDims.width - $eleDims.width) / 2 + hOffset,\n top: $eleDims.windowDims.offset.top + vOffset\n };\n case 'reveal full':\n return {\n left: $eleDims.windowDims.offset.left,\n top: $eleDims.windowDims.offset.top\n };\n break;\n default:\n return {\n left: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__foundation_util_core__[\"a\" /* rtl */])() ? $anchorDims.offset.left - $eleDims.width + $anchorDims.width - hOffset : $anchorDims.offset.left + hOffset,\n top: $anchorDims.offset.top + $anchorDims.height + vOffset\n };\n\n }\n}\n\nfunction GetExplicitOffsets(element, anchor, position, alignment, vOffset, hOffset, isOverflow) {\n var $eleDims = GetDimensions(element),\n $anchorDims = anchor ? GetDimensions(anchor) : null;\n\n var topVal, leftVal;\n\n // set position related attribute\n\n switch (position) {\n case 'top':\n topVal = $anchorDims.offset.top - ($eleDims.height + vOffset);\n break;\n case 'bottom':\n topVal = $anchorDims.offset.top + $anchorDims.height + vOffset;\n break;\n case 'left':\n leftVal = $anchorDims.offset.left - ($eleDims.width + hOffset);\n break;\n case 'right':\n leftVal = $anchorDims.offset.left + $anchorDims.width + hOffset;\n break;\n }\n\n // set alignment related attribute\n switch (position) {\n case 'top':\n case 'bottom':\n switch (alignment) {\n case 'left':\n leftVal = $anchorDims.offset.left + hOffset;\n break;\n case 'right':\n leftVal = $anchorDims.offset.left - $eleDims.width + $anchorDims.width - hOffset;\n break;\n case 'center':\n leftVal = isOverflow ? hOffset : $anchorDims.offset.left + $anchorDims.width / 2 - $eleDims.width / 2 + hOffset;\n break;\n }\n break;\n case 'right':\n case 'left':\n switch (alignment) {\n case 'bottom':\n topVal = $anchorDims.offset.top - vOffset + $anchorDims.height - $eleDims.height;\n break;\n case 'top':\n topVal = $anchorDims.offset.top + vOffset;\n break;\n case 'center':\n topVal = $anchorDims.offset.top + vOffset + $anchorDims.height / 2 - $eleDims.height / 2;\n break;\n }\n break;\n }\n return { top: topVal, left: leftVal };\n}\n\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return onImagesLoaded; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);\n\n\n\n\n/**\n * Runs a callback function when images are fully loaded.\n * @param {Object} images - Image(s) to check if loaded.\n * @param {Func} callback - Function to execute when image is fully loaded.\n */\nfunction onImagesLoaded(images, callback) {\n var self = this,\n unloaded = images.length;\n\n if (unloaded === 0) {\n callback();\n }\n\n images.each(function () {\n // Check if image is loaded\n if (this.complete && this.naturalWidth !== undefined) {\n singleImageLoaded();\n } else {\n // If the above check failed, simulate loading on detached element.\n var image = new Image();\n // Still count image as loaded if it finalizes with an error.\n var events = \"load.zf.images error.zf.images\";\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()(image).one(events, function me(event) {\n // Unbind the event listeners. We're using 'one' but only one of the two events will have fired.\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).off(events, me);\n singleImageLoaded();\n });\n image.src = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).attr('src');\n }\n });\n\n function singleImageLoaded() {\n unloaded--;\n if (unloaded === 0) {\n callback();\n }\n }\n}\n\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Nest; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);\n\n\n\n\nvar Nest = {\n Feather: function (menu) {\n var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'zf';\n\n menu.attr('role', 'menubar');\n\n var items = menu.find('li').attr({ 'role': 'menuitem' }),\n subMenuClass = 'is-' + type + '-submenu',\n subItemClass = subMenuClass + '-item',\n hasSubClass = 'is-' + type + '-submenu-parent',\n applyAria = type !== 'accordion'; // Accordions handle their own ARIA attriutes.\n\n items.each(function () {\n var $item = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this),\n $sub = $item.children('ul');\n\n if ($sub.length) {\n $item.addClass(hasSubClass);\n $sub.addClass('submenu ' + subMenuClass).attr({ 'data-submenu': '' });\n if (applyAria) {\n $item.attr({\n 'aria-haspopup': true,\n 'aria-label': $item.children('a:first').text()\n });\n // Note: Drilldowns behave differently in how they hide, and so need\n // additional attributes. We should look if this possibly over-generalized\n // utility (Nest) is appropriate when we rework menus in 6.4\n if (type === 'drilldown') {\n $item.attr({ 'aria-expanded': false });\n }\n }\n $sub.addClass('submenu ' + subMenuClass).attr({\n 'data-submenu': '',\n 'role': 'menu'\n });\n if (type === 'drilldown') {\n $sub.attr({ 'aria-hidden': true });\n }\n }\n\n if ($item.parent('[data-submenu]').length) {\n $item.addClass('is-submenu-item ' + subItemClass);\n }\n });\n\n return;\n },\n Burn: function (menu, type) {\n var //items = menu.find('li'),\n subMenuClass = 'is-' + type + '-submenu',\n subItemClass = subMenuClass + '-item',\n hasSubClass = 'is-' + type + '-submenu-parent';\n\n menu.find('>li, .menu, .menu > li').removeClass(subMenuClass + ' ' + subItemClass + ' ' + hasSubClass + ' is-submenu-item submenu is-active').removeAttr('data-submenu').css('display', '');\n }\n};\n\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Touch; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);\nvar _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; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n//**************************************************\n//**Work inspired by multiple jquery swipe plugins**\n//**Done by Yohai Ararat ***************************\n//**************************************************\n\n\n\nvar Touch = {};\n\nvar startPosX,\n startPosY,\n startTime,\n elapsedTime,\n isMoving = false;\n\nfunction onTouchEnd() {\n // alert(this);\n this.removeEventListener('touchmove', onTouchMove);\n this.removeEventListener('touchend', onTouchEnd);\n isMoving = false;\n}\n\nfunction onTouchMove(e) {\n if (__WEBPACK_IMPORTED_MODULE_0_jquery___default.a.spotSwipe.preventDefault) {\n e.preventDefault();\n }\n if (isMoving) {\n var x = e.touches[0].pageX;\n var y = e.touches[0].pageY;\n var dx = startPosX - x;\n var dy = startPosY - y;\n var dir;\n elapsedTime = new Date().getTime() - startTime;\n if (Math.abs(dx) >= __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.spotSwipe.moveThreshold && elapsedTime <= __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.spotSwipe.timeThreshold) {\n dir = dx > 0 ? 'left' : 'right';\n }\n // else if(Math.abs(dy) >= $.spotSwipe.moveThreshold && elapsedTime <= $.spotSwipe.timeThreshold) {\n // dir = dy > 0 ? 'down' : 'up';\n // }\n if (dir) {\n e.preventDefault();\n onTouchEnd.call(this);\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).trigger('swipe', dir).trigger('swipe' + dir);\n }\n }\n}\n\nfunction onTouchStart(e) {\n if (e.touches.length == 1) {\n startPosX = e.touches[0].pageX;\n startPosY = e.touches[0].pageY;\n isMoving = true;\n startTime = new Date().getTime();\n this.addEventListener('touchmove', onTouchMove, false);\n this.addEventListener('touchend', onTouchEnd, false);\n }\n}\n\nfunction init() {\n this.addEventListener && this.addEventListener('touchstart', onTouchStart, false);\n}\n\nfunction teardown() {\n this.removeEventListener('touchstart', onTouchStart);\n}\n\nvar SpotSwipe = function () {\n function SpotSwipe($) {\n _classCallCheck(this, SpotSwipe);\n\n this.version = '1.0.0';\n this.enabled = 'ontouchstart' in document.documentElement;\n this.preventDefault = false;\n this.moveThreshold = 75;\n this.timeThreshold = 200;\n this.$ = $;\n this._init();\n }\n\n _createClass(SpotSwipe, [{\n key: '_init',\n value: function _init() {\n var $ = this.$;\n $.event.special.swipe = { setup: init };\n\n $.each(['left', 'up', 'down', 'right'], function () {\n $.event.special['swipe' + this] = { setup: function () {\n $(this).on('swipe', $.noop);\n } };\n });\n }\n }]);\n\n return SpotSwipe;\n}();\n\n/****************************************************\n * As far as I can tell, both setupSpotSwipe and *\n * setupTouchHandler should be idempotent, *\n * because they directly replace functions & *\n * values, and do not add event handlers directly. *\n ****************************************************/\n\nTouch.setupSpotSwipe = function ($) {\n $.spotSwipe = new SpotSwipe($);\n};\n\n/****************************************************\n * Method for adding pseudo drag events to elements *\n ***************************************************/\nTouch.setupTouchHandler = function ($) {\n $.fn.addTouch = function () {\n this.each(function (i, el) {\n $(el).bind('touchstart touchmove touchend touchcancel', function () {\n //we pass the original event object because the jQuery event\n //object is normalized to w3c specs and does not provide the TouchList\n handleTouch(event);\n });\n });\n\n var handleTouch = function (event) {\n var touches = event.changedTouches,\n first = touches[0],\n eventTypes = {\n touchstart: 'mousedown',\n touchmove: 'mousemove',\n touchend: 'mouseup'\n },\n type = eventTypes[event.type],\n simulatedEvent;\n\n if ('MouseEvent' in window && typeof window.MouseEvent === 'function') {\n simulatedEvent = new window.MouseEvent(type, {\n 'bubbles': true,\n 'cancelable': true,\n 'screenX': first.screenX,\n 'screenY': first.screenY,\n 'clientX': first.clientX,\n 'clientY': first.clientY\n });\n } else {\n simulatedEvent = document.createEvent('MouseEvent');\n simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0 /*left*/, null);\n }\n first.target.dispatchEvent(simulatedEvent);\n };\n };\n};\n\nTouch.init = function ($) {\n if (typeof $.spotSwipe === 'undefined') {\n Touch.setupSpotSwipe($);\n Touch.setupTouchHandler($);\n }\n};\n\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Accordion; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_core__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_plugin__ = __webpack_require__(2);\n\n\nvar _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; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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; }\n\nfunction _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; }\n\n\n\n\n\n\n/**\n * Accordion module.\n * @module foundation.accordion\n * @requires foundation.util.keyboard\n */\n\nvar Accordion = function (_Plugin) {\n _inherits(Accordion, _Plugin);\n\n function Accordion() {\n _classCallCheck(this, Accordion);\n\n return _possibleConstructorReturn(this, (Accordion.__proto__ || Object.getPrototypeOf(Accordion)).apply(this, arguments));\n }\n\n _createClass(Accordion, [{\n key: '_setup',\n\n /**\n * Creates a new instance of an accordion.\n * @class\n * @name Accordion\n * @fires Accordion#init\n * @param {jQuery} element - jQuery object to make into an accordion.\n * @param {Object} options - a plain object with settings to override the default options.\n */\n value: function _setup(element, options) {\n this.$element = element;\n this.options = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend({}, Accordion.defaults, this.$element.data(), options);\n\n this.className = 'Accordion'; // ie9 back compat\n this._init();\n\n __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__[\"a\" /* Keyboard */].register('Accordion', {\n 'ENTER': 'toggle',\n 'SPACE': 'toggle',\n 'ARROW_DOWN': 'next',\n 'ARROW_UP': 'previous'\n });\n }\n\n /**\n * Initializes the accordion by animating the preset active pane(s).\n * @private\n */\n\n }, {\n key: '_init',\n value: function _init() {\n var _this3 = this;\n\n this.$element.attr('role', 'tablist');\n this.$tabs = this.$element.children('[data-accordion-item]');\n\n this.$tabs.each(function (idx, el) {\n var $el = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(el),\n $content = $el.children('[data-tab-content]'),\n id = $content[0].id || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__foundation_util_core__[\"b\" /* GetYoDigits */])(6, 'accordion'),\n linkId = el.id || id + '-label';\n\n $el.find('a:first').attr({\n 'aria-controls': id,\n 'role': 'tab',\n 'id': linkId,\n 'aria-expanded': false,\n 'aria-selected': false\n });\n\n $content.attr({ 'role': 'tabpanel', 'aria-labelledby': linkId, 'aria-hidden': true, 'id': id });\n });\n var $initActive = this.$element.find('.is-active').children('[data-tab-content]');\n this.firstTimeInit = true;\n if ($initActive.length) {\n this.down($initActive, this.firstTimeInit);\n this.firstTimeInit = false;\n }\n\n this._checkDeepLink = function () {\n var anchor = window.location.hash;\n //need a hash and a relevant anchor in this tabset\n if (anchor.length) {\n var $link = _this3.$element.find('[href$=\"' + anchor + '\"]'),\n $anchor = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(anchor);\n\n if ($link.length && $anchor) {\n if (!$link.parent('[data-accordion-item]').hasClass('is-active')) {\n _this3.down($anchor, _this3.firstTimeInit);\n _this3.firstTimeInit = false;\n };\n\n //roll up a little to show the titles\n if (_this3.options.deepLinkSmudge) {\n var _this = _this3;\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).load(function () {\n var offset = _this.$element.offset();\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()('html, body').animate({ scrollTop: offset.top }, _this.options.deepLinkSmudgeDelay);\n });\n }\n\n /**\n * Fires when the zplugin has deeplinked at pageload\n * @event Accordion#deeplink\n */\n _this3.$element.trigger('deeplink.zf.accordion', [$link, $anchor]);\n }\n }\n };\n\n //use browser to open a tab, if it exists in this tabset\n if (this.options.deepLink) {\n this._checkDeepLink();\n }\n\n this._events();\n }\n\n /**\n * Adds event handlers for items within the accordion.\n * @private\n */\n\n }, {\n key: '_events',\n value: function _events() {\n var _this = this;\n\n this.$tabs.each(function () {\n var $elem = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this);\n var $tabContent = $elem.children('[data-tab-content]');\n if ($tabContent.length) {\n $elem.children('a').off('click.zf.accordion keydown.zf.accordion').on('click.zf.accordion', function (e) {\n e.preventDefault();\n _this.toggle($tabContent);\n }).on('keydown.zf.accordion', function (e) {\n __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__[\"a\" /* Keyboard */].handleKey(e, 'Accordion', {\n toggle: function () {\n _this.toggle($tabContent);\n },\n next: function () {\n var $a = $elem.next().find('a').focus();\n if (!_this.options.multiExpand) {\n $a.trigger('click.zf.accordion');\n }\n },\n previous: function () {\n var $a = $elem.prev().find('a').focus();\n if (!_this.options.multiExpand) {\n $a.trigger('click.zf.accordion');\n }\n },\n handled: function () {\n e.preventDefault();\n e.stopPropagation();\n }\n });\n });\n }\n });\n if (this.options.deepLink) {\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).on('popstate', this._checkDeepLink);\n }\n }\n\n /**\n * Toggles the selected content pane's open/close state.\n * @param {jQuery} $target - jQuery object of the pane to toggle (`.accordion-content`).\n * @function\n */\n\n }, {\n key: 'toggle',\n value: function toggle($target) {\n if ($target.closest('[data-accordion]').is('[disabled]')) {\n console.info('Cannot toggle an accordion that is disabled.');\n return;\n }\n if ($target.parent().hasClass('is-active')) {\n this.up($target);\n } else {\n this.down($target);\n }\n //either replace or update browser history\n if (this.options.deepLink) {\n var anchor = $target.prev('a').attr('href');\n\n if (this.options.updateHistory) {\n history.pushState({}, '', anchor);\n } else {\n history.replaceState({}, '', anchor);\n }\n }\n }\n\n /**\n * Opens the accordion tab defined by `$target`.\n * @param {jQuery} $target - Accordion pane to open (`.accordion-content`).\n * @param {Boolean} firstTime - flag to determine if reflow should happen.\n * @fires Accordion#down\n * @function\n */\n\n }, {\n key: 'down',\n value: function down($target, firstTime) {\n var _this4 = this;\n\n /**\n * checking firstTime allows for initial render of the accordion\n * to render preset is-active panes.\n */\n if ($target.closest('[data-accordion]').is('[disabled]') && !firstTime) {\n console.info('Cannot call down on an accordion that is disabled.');\n return;\n }\n $target.attr('aria-hidden', false).parent('[data-tab-content]').addBack().parent().addClass('is-active');\n\n if (!this.options.multiExpand && !firstTime) {\n var $currentActive = this.$element.children('.is-active').children('[data-tab-content]');\n if ($currentActive.length) {\n this.up($currentActive.not($target));\n }\n }\n\n $target.slideDown(this.options.slideSpeed, function () {\n /**\n * Fires when the tab is done opening.\n * @event Accordion#down\n */\n _this4.$element.trigger('down.zf.accordion', [$target]);\n });\n\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()('#' + $target.attr('aria-labelledby')).attr({\n 'aria-expanded': true,\n 'aria-selected': true\n });\n }\n\n /**\n * Closes the tab defined by `$target`.\n * @param {jQuery} $target - Accordion tab to close (`.accordion-content`).\n * @fires Accordion#up\n * @function\n */\n\n }, {\n key: 'up',\n value: function up($target) {\n if ($target.closest('[data-accordion]').is('[disabled]')) {\n console.info('Cannot call up on an accordion that is disabled.');\n return;\n }\n\n var $aunts = $target.parent().siblings(),\n _this = this;\n\n if (!this.options.allowAllClosed && !$aunts.hasClass('is-active') || !$target.parent().hasClass('is-active')) {\n return;\n }\n\n $target.slideUp(_this.options.slideSpeed, function () {\n /**\n * Fires when the tab is done collapsing up.\n * @event Accordion#up\n */\n _this.$element.trigger('up.zf.accordion', [$target]);\n });\n\n $target.attr('aria-hidden', true).parent().removeClass('is-active');\n\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()('#' + $target.attr('aria-labelledby')).attr({\n 'aria-expanded': false,\n 'aria-selected': false\n });\n }\n\n /**\n * Destroys an instance of an accordion.\n * @fires Accordion#destroyed\n * @function\n */\n\n }, {\n key: '_destroy',\n value: function _destroy() {\n this.$element.find('[data-tab-content]').stop(true).slideUp(0).css('display', '');\n this.$element.find('a').off('.zf.accordion');\n if (this.options.deepLink) {\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).off('popstate', this._checkDeepLink);\n }\n }\n }]);\n\n return Accordion;\n}(__WEBPACK_IMPORTED_MODULE_3__foundation_plugin__[\"a\" /* Plugin */]);\n\nAccordion.defaults = {\n /**\n * Amount of time to animate the opening of an accordion pane.\n * @option\n * @type {number}\n * @default 250\n */\n slideSpeed: 250,\n /**\n * Allow the accordion to have multiple open panes.\n * @option\n * @type {boolean}\n * @default false\n */\n multiExpand: false,\n /**\n * Allow the accordion to close all panes.\n * @option\n * @type {boolean}\n * @default false\n */\n allowAllClosed: false,\n /**\n * Allows the window to scroll to content of pane specified by hash anchor\n * @option\n * @type {boolean}\n * @default false\n */\n deepLink: false,\n\n /**\n * Adjust the deep link scroll to make sure the top of the accordion panel is visible\n * @option\n * @type {boolean}\n * @default false\n */\n deepLinkSmudge: false,\n\n /**\n * Animation time (ms) for the deep link adjustment\n * @option\n * @type {number}\n * @default 300\n */\n deepLinkSmudgeDelay: 300,\n\n /**\n * Update the browser history with the open accordion\n * @option\n * @type {boolean}\n * @default false\n */\n updateHistory: false\n};\n\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AccordionMenu; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_nest__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_util_core__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__foundation_plugin__ = __webpack_require__(2);\n\n\nvar _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; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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; }\n\nfunction _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; }\n\n\n\n\n\n\n\n/**\n * AccordionMenu module.\n * @module foundation.accordionMenu\n * @requires foundation.util.keyboard\n * @requires foundation.util.nest\n */\n\nvar AccordionMenu = function (_Plugin) {\n _inherits(AccordionMenu, _Plugin);\n\n function AccordionMenu() {\n _classCallCheck(this, AccordionMenu);\n\n return _possibleConstructorReturn(this, (AccordionMenu.__proto__ || Object.getPrototypeOf(AccordionMenu)).apply(this, arguments));\n }\n\n _createClass(AccordionMenu, [{\n key: '_setup',\n\n /**\n * Creates a new instance of an accordion menu.\n * @class\n * @name AccordionMenu\n * @fires AccordionMenu#init\n * @param {jQuery} element - jQuery object to make into an accordion menu.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n value: function _setup(element, options) {\n this.$element = element;\n this.options = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend({}, AccordionMenu.defaults, this.$element.data(), options);\n this.className = 'AccordionMenu'; // ie9 back compat\n\n this._init();\n\n __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__[\"a\" /* Keyboard */].register('AccordionMenu', {\n 'ENTER': 'toggle',\n 'SPACE': 'toggle',\n 'ARROW_RIGHT': 'open',\n 'ARROW_UP': 'up',\n 'ARROW_DOWN': 'down',\n 'ARROW_LEFT': 'close',\n 'ESCAPE': 'closeAll'\n });\n }\n\n /**\n * Initializes the accordion menu by hiding all nested menus.\n * @private\n */\n\n }, {\n key: '_init',\n value: function _init() {\n __WEBPACK_IMPORTED_MODULE_2__foundation_util_nest__[\"a\" /* Nest */].Feather(this.$element, 'accordion');\n\n var _this = this;\n\n this.$element.find('[data-submenu]').not('.is-active').slideUp(0); //.find('a').css('padding-left', '1rem');\n this.$element.attr({\n 'role': 'tree',\n 'aria-multiselectable': this.options.multiOpen\n });\n\n this.$menuLinks = this.$element.find('.is-accordion-submenu-parent');\n this.$menuLinks.each(function () {\n var linkId = this.id || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__foundation_util_core__[\"b\" /* GetYoDigits */])(6, 'acc-menu-link'),\n $elem = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this),\n $sub = $elem.children('[data-submenu]'),\n subId = $sub[0].id || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__foundation_util_core__[\"b\" /* GetYoDigits */])(6, 'acc-menu'),\n isActive = $sub.hasClass('is-active');\n\n if (_this.options.submenuToggle) {\n $elem.addClass('has-submenu-toggle');\n $elem.children('a').after('');\n } else {\n $elem.attr({\n 'aria-controls': subId,\n 'aria-expanded': isActive,\n 'id': linkId\n });\n }\n $sub.attr({\n 'aria-labelledby': linkId,\n 'aria-hidden': !isActive,\n 'role': 'group',\n 'id': subId\n });\n });\n this.$element.find('li').attr({\n 'role': 'treeitem'\n });\n var initPanes = this.$element.find('.is-active');\n if (initPanes.length) {\n var _this = this;\n initPanes.each(function () {\n _this.down(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this));\n });\n }\n this._events();\n }\n\n /**\n * Adds event handlers for items within the menu.\n * @private\n */\n\n }, {\n key: '_events',\n value: function _events() {\n var _this = this;\n\n this.$element.find('li').each(function () {\n var $submenu = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).children('[data-submenu]');\n\n if ($submenu.length) {\n if (_this.options.submenuToggle) {\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).children('.submenu-toggle').off('click.zf.accordionMenu').on('click.zf.accordionMenu', function (e) {\n _this.toggle($submenu);\n });\n } else {\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).children('a').off('click.zf.accordionMenu').on('click.zf.accordionMenu', function (e) {\n e.preventDefault();\n _this.toggle($submenu);\n });\n }\n }\n }).on('keydown.zf.accordionmenu', function (e) {\n var $element = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this),\n $elements = $element.parent('ul').children('li'),\n $prevElement,\n $nextElement,\n $target = $element.children('[data-submenu]');\n\n $elements.each(function (i) {\n if (__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).is($element)) {\n $prevElement = $elements.eq(Math.max(0, i - 1)).find('a').first();\n $nextElement = $elements.eq(Math.min(i + 1, $elements.length - 1)).find('a').first();\n\n if (__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).children('[data-submenu]:visible').length) {\n // has open sub menu\n $nextElement = $element.find('li:first-child').find('a').first();\n }\n if (__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).is(':first-child')) {\n // is first element of sub menu\n $prevElement = $element.parents('li').first().find('a').first();\n } else if ($prevElement.parents('li').first().children('[data-submenu]:visible').length) {\n // if previous element has open sub menu\n $prevElement = $prevElement.parents('li').find('li:last-child').find('a').first();\n }\n if (__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).is(':last-child')) {\n // is last element of sub menu\n $nextElement = $element.parents('li').first().next('li').find('a').first();\n }\n\n return;\n }\n });\n\n __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__[\"a\" /* Keyboard */].handleKey(e, 'AccordionMenu', {\n open: function () {\n if ($target.is(':hidden')) {\n _this.down($target);\n $target.find('li').first().find('a').first().focus();\n }\n },\n close: function () {\n if ($target.length && !$target.is(':hidden')) {\n // close active sub of this item\n _this.up($target);\n } else if ($element.parent('[data-submenu]').length) {\n // close currently open sub\n _this.up($element.parent('[data-submenu]'));\n $element.parents('li').first().find('a').first().focus();\n }\n },\n up: function () {\n $prevElement.focus();\n return true;\n },\n down: function () {\n $nextElement.focus();\n return true;\n },\n toggle: function () {\n if (_this.options.submenuToggle) {\n return false;\n }\n if ($element.children('[data-submenu]').length) {\n _this.toggle($element.children('[data-submenu]'));\n return true;\n }\n },\n closeAll: function () {\n _this.hideAll();\n },\n handled: function (preventDefault) {\n if (preventDefault) {\n e.preventDefault();\n }\n e.stopImmediatePropagation();\n }\n });\n }); //.attr('tabindex', 0);\n }\n\n /**\n * Closes all panes of the menu.\n * @function\n */\n\n }, {\n key: 'hideAll',\n value: function hideAll() {\n this.up(this.$element.find('[data-submenu]'));\n }\n\n /**\n * Opens all panes of the menu.\n * @function\n */\n\n }, {\n key: 'showAll',\n value: function showAll() {\n this.down(this.$element.find('[data-submenu]'));\n }\n\n /**\n * Toggles the open/close state of a submenu.\n * @function\n * @param {jQuery} $target - the submenu to toggle\n */\n\n }, {\n key: 'toggle',\n value: function toggle($target) {\n if (!$target.is(':animated')) {\n if (!$target.is(':hidden')) {\n this.up($target);\n } else {\n this.down($target);\n }\n }\n }\n\n /**\n * Opens the sub-menu defined by `$target`.\n * @param {jQuery} $target - Sub-menu to open.\n * @fires AccordionMenu#down\n */\n\n }, {\n key: 'down',\n value: function down($target) {\n var _this = this;\n\n if (!this.options.multiOpen) {\n this.up(this.$element.find('.is-active').not($target.parentsUntil(this.$element).add($target)));\n }\n\n $target.addClass('is-active').attr({ 'aria-hidden': false });\n\n if (this.options.submenuToggle) {\n $target.prev('.submenu-toggle').attr({ 'aria-expanded': true });\n } else {\n $target.parent('.is-accordion-submenu-parent').attr({ 'aria-expanded': true });\n }\n\n $target.slideDown(_this.options.slideSpeed, function () {\n /**\n * Fires when the menu is done opening.\n * @event AccordionMenu#down\n */\n _this.$element.trigger('down.zf.accordionMenu', [$target]);\n });\n }\n\n /**\n * Closes the sub-menu defined by `$target`. All sub-menus inside the target will be closed as well.\n * @param {jQuery} $target - Sub-menu to close.\n * @fires AccordionMenu#up\n */\n\n }, {\n key: 'up',\n value: function up($target) {\n var _this = this;\n $target.slideUp(_this.options.slideSpeed, function () {\n /**\n * Fires when the menu is done collapsing up.\n * @event AccordionMenu#up\n */\n _this.$element.trigger('up.zf.accordionMenu', [$target]);\n });\n\n var $menus = $target.find('[data-submenu]').slideUp(0).addBack().attr('aria-hidden', true);\n\n if (this.options.submenuToggle) {\n $menus.prev('.submenu-toggle').attr('aria-expanded', false);\n } else {\n $menus.parent('.is-accordion-submenu-parent').attr('aria-expanded', false);\n }\n }\n\n /**\n * Destroys an instance of accordion menu.\n * @fires AccordionMenu#destroyed\n */\n\n }, {\n key: '_destroy',\n value: function _destroy() {\n this.$element.find('[data-submenu]').slideDown(0).css('display', '');\n this.$element.find('a').off('click.zf.accordionMenu');\n\n if (this.options.submenuToggle) {\n this.$element.find('.has-submenu-toggle').removeClass('has-submenu-toggle');\n this.$element.find('.submenu-toggle').remove();\n }\n\n __WEBPACK_IMPORTED_MODULE_2__foundation_util_nest__[\"a\" /* Nest */].Burn(this.$element, 'accordion');\n }\n }]);\n\n return AccordionMenu;\n}(__WEBPACK_IMPORTED_MODULE_4__foundation_plugin__[\"a\" /* Plugin */]);\n\nAccordionMenu.defaults = {\n /**\n * Amount of time to animate the opening of a submenu in ms.\n * @option\n * @type {number}\n * @default 250\n */\n slideSpeed: 250,\n /**\n * Adds a separate submenu toggle button. This allows the parent item to have a link.\n * @option\n * @example true\n */\n submenuToggle: false,\n /**\n * The text used for the submenu toggle if enabled. This is used for screen readers only.\n * @option\n * @example true\n */\n submenuToggleText: 'Toggle menu',\n /**\n * Allow the menu to have multiple open panes.\n * @option\n * @type {boolean}\n * @default true\n */\n multiOpen: true\n};\n\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Drilldown; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_nest__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_util_core__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__foundation_util_box__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__foundation_plugin__ = __webpack_require__(2);\n\n\nvar _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; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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; }\n\nfunction _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; }\n\n\n\n\n\n\n\n\n/**\n * Drilldown module.\n * @module foundation.drilldown\n * @requires foundation.util.keyboard\n * @requires foundation.util.nest\n * @requires foundation.util.box\n */\n\nvar Drilldown = function (_Plugin) {\n _inherits(Drilldown, _Plugin);\n\n function Drilldown() {\n _classCallCheck(this, Drilldown);\n\n return _possibleConstructorReturn(this, (Drilldown.__proto__ || Object.getPrototypeOf(Drilldown)).apply(this, arguments));\n }\n\n _createClass(Drilldown, [{\n key: '_setup',\n\n /**\n * Creates a new instance of a drilldown menu.\n * @class\n * @name Drilldown\n * @param {jQuery} element - jQuery object to make into an accordion menu.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n value: function _setup(element, options) {\n this.$element = element;\n this.options = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend({}, Drilldown.defaults, this.$element.data(), options);\n this.className = 'Drilldown'; // ie9 back compat\n\n this._init();\n\n __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__[\"a\" /* Keyboard */].register('Drilldown', {\n 'ENTER': 'open',\n 'SPACE': 'open',\n 'ARROW_RIGHT': 'next',\n 'ARROW_UP': 'up',\n 'ARROW_DOWN': 'down',\n 'ARROW_LEFT': 'previous',\n 'ESCAPE': 'close',\n 'TAB': 'down',\n 'SHIFT_TAB': 'up'\n });\n }\n\n /**\n * Initializes the drilldown by creating jQuery collections of elements\n * @private\n */\n\n }, {\n key: '_init',\n value: function _init() {\n __WEBPACK_IMPORTED_MODULE_2__foundation_util_nest__[\"a\" /* Nest */].Feather(this.$element, 'drilldown');\n\n if (this.options.autoApplyClass) {\n this.$element.addClass('drilldown');\n }\n\n this.$element.attr({\n 'role': 'tree',\n 'aria-multiselectable': false\n });\n this.$submenuAnchors = this.$element.find('li.is-drilldown-submenu-parent').children('a');\n this.$submenus = this.$submenuAnchors.parent('li').children('[data-submenu]').attr('role', 'group');\n this.$menuItems = this.$element.find('li').not('.js-drilldown-back').attr('role', 'treeitem').find('a');\n this.$element.attr('data-mutate', this.$element.attr('data-drilldown') || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__foundation_util_core__[\"b\" /* GetYoDigits */])(6, 'drilldown'));\n\n this._prepareMenu();\n this._registerEvents();\n\n this._keyboardEvents();\n }\n\n /**\n * prepares drilldown menu by setting attributes to links and elements\n * sets a min height to prevent content jumping\n * wraps the element if not already wrapped\n * @private\n * @function\n */\n\n }, {\n key: '_prepareMenu',\n value: function _prepareMenu() {\n var _this = this;\n // if(!this.options.holdOpen){\n // this._menuLinkEvents();\n // }\n this.$submenuAnchors.each(function () {\n var $link = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this);\n var $sub = $link.parent();\n if (_this.options.parentLink) {\n $link.clone().prependTo($sub.children('[data-submenu]')).wrap('
');\n }\n $link.data('savedHref', $link.attr('href')).removeAttr('href').attr('tabindex', 0);\n $link.children('[data-submenu]').attr({\n 'aria-hidden': true,\n 'tabindex': 0,\n 'role': 'group'\n });\n _this._events($link);\n });\n this.$submenus.each(function () {\n var $menu = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this),\n $back = $menu.find('.js-drilldown-back');\n if (!$back.length) {\n switch (_this.options.backButtonPosition) {\n case \"bottom\":\n $menu.append(_this.options.backButton);\n break;\n case \"top\":\n $menu.prepend(_this.options.backButton);\n break;\n default:\n console.error(\"Unsupported backButtonPosition value '\" + _this.options.backButtonPosition + \"'\");\n }\n }\n _this._back($menu);\n });\n\n this.$submenus.addClass('invisible');\n if (!this.options.autoHeight) {\n this.$submenus.addClass('drilldown-submenu-cover-previous');\n }\n\n // create a wrapper on element if it doesn't exist.\n if (!this.$element.parent().hasClass('is-drilldown')) {\n this.$wrapper = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this.options.wrapper).addClass('is-drilldown');\n if (this.options.animateHeight) this.$wrapper.addClass('animate-height');\n this.$element.wrap(this.$wrapper);\n }\n // set wrapper\n this.$wrapper = this.$element.parent();\n this.$wrapper.css(this._getMaxDims());\n }\n }, {\n key: '_resize',\n value: function _resize() {\n this.$wrapper.css({ 'max-width': 'none', 'min-height': 'none' });\n // _getMaxDims has side effects (boo) but calling it should update all other necessary heights & widths\n this.$wrapper.css(this._getMaxDims());\n }\n\n /**\n * Adds event handlers to elements in the menu.\n * @function\n * @private\n * @param {jQuery} $elem - the current menu item to add handlers to.\n */\n\n }, {\n key: '_events',\n value: function _events($elem) {\n var _this = this;\n\n $elem.off('click.zf.drilldown').on('click.zf.drilldown', function (e) {\n if (__WEBPACK_IMPORTED_MODULE_0_jquery___default()(e.target).parentsUntil('ul', 'li').hasClass('is-drilldown-submenu-parent')) {\n e.stopImmediatePropagation();\n e.preventDefault();\n }\n\n // if(e.target !== e.currentTarget.firstElementChild){\n // return false;\n // }\n _this._show($elem.parent('li'));\n\n if (_this.options.closeOnClick) {\n var $body = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('body');\n $body.off('.zf.drilldown').on('click.zf.drilldown', function (e) {\n if (e.target === _this.$element[0] || __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.contains(_this.$element[0], e.target)) {\n return;\n }\n e.preventDefault();\n _this._hideAll();\n $body.off('.zf.drilldown');\n });\n }\n });\n }\n\n /**\n * Adds event handlers to the menu element.\n * @function\n * @private\n */\n\n }, {\n key: '_registerEvents',\n value: function _registerEvents() {\n if (this.options.scrollTop) {\n this._bindHandler = this._scrollTop.bind(this);\n this.$element.on('open.zf.drilldown hide.zf.drilldown closed.zf.drilldown', this._bindHandler);\n }\n this.$element.on('mutateme.zf.trigger', this._resize.bind(this));\n }\n\n /**\n * Scroll to Top of Element or data-scroll-top-element\n * @function\n * @fires Drilldown#scrollme\n */\n\n }, {\n key: '_scrollTop',\n value: function _scrollTop() {\n var _this = this;\n var $scrollTopElement = _this.options.scrollTopElement != '' ? __WEBPACK_IMPORTED_MODULE_0_jquery___default()(_this.options.scrollTopElement) : _this.$element,\n scrollPos = parseInt($scrollTopElement.offset().top + _this.options.scrollTopOffset, 10);\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()('html, body').stop(true).animate({ scrollTop: scrollPos }, _this.options.animationDuration, _this.options.animationEasing, function () {\n /**\n * Fires after the menu has scrolled\n * @event Drilldown#scrollme\n */\n if (this === __WEBPACK_IMPORTED_MODULE_0_jquery___default()('html')[0]) _this.$element.trigger('scrollme.zf.drilldown');\n });\n }\n\n /**\n * Adds keydown event listener to `li`'s in the menu.\n * @private\n */\n\n }, {\n key: '_keyboardEvents',\n value: function _keyboardEvents() {\n var _this = this;\n\n this.$menuItems.add(this.$element.find('.js-drilldown-back > a, .is-submenu-parent-item > a')).on('keydown.zf.drilldown', function (e) {\n var $element = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this),\n $elements = $element.parent('li').parent('ul').children('li').children('a'),\n $prevElement,\n $nextElement;\n\n $elements.each(function (i) {\n if (__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).is($element)) {\n $prevElement = $elements.eq(Math.max(0, i - 1));\n $nextElement = $elements.eq(Math.min(i + 1, $elements.length - 1));\n return;\n }\n });\n\n __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__[\"a\" /* Keyboard */].handleKey(e, 'Drilldown', {\n next: function () {\n if ($element.is(_this.$submenuAnchors)) {\n _this._show($element.parent('li'));\n $element.parent('li').one(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__foundation_util_core__[\"c\" /* transitionend */])($element), function () {\n $element.parent('li').find('ul li a').filter(_this.$menuItems).first().focus();\n });\n return true;\n }\n },\n previous: function () {\n _this._hide($element.parent('li').parent('ul'));\n $element.parent('li').parent('ul').one(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__foundation_util_core__[\"c\" /* transitionend */])($element), function () {\n setTimeout(function () {\n $element.parent('li').parent('ul').parent('li').children('a').first().focus();\n }, 1);\n });\n return true;\n },\n up: function () {\n $prevElement.focus();\n // Don't tap focus on first element in root ul\n return !$element.is(_this.$element.find('> li:first-child > a'));\n },\n down: function () {\n $nextElement.focus();\n // Don't tap focus on last element in root ul\n return !$element.is(_this.$element.find('> li:last-child > a'));\n },\n close: function () {\n // Don't close on element in root ul\n if (!$element.is(_this.$element.find('> li > a'))) {\n _this._hide($element.parent().parent());\n $element.parent().parent().siblings('a').focus();\n }\n },\n open: function () {\n if (!$element.is(_this.$menuItems)) {\n // not menu item means back button\n _this._hide($element.parent('li').parent('ul'));\n $element.parent('li').parent('ul').one(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__foundation_util_core__[\"c\" /* transitionend */])($element), function () {\n setTimeout(function () {\n $element.parent('li').parent('ul').parent('li').children('a').first().focus();\n }, 1);\n });\n return true;\n } else if ($element.is(_this.$submenuAnchors)) {\n _this._show($element.parent('li'));\n $element.parent('li').one(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__foundation_util_core__[\"c\" /* transitionend */])($element), function () {\n $element.parent('li').find('ul li a').filter(_this.$menuItems).first().focus();\n });\n return true;\n }\n },\n handled: function (preventDefault) {\n if (preventDefault) {\n e.preventDefault();\n }\n e.stopImmediatePropagation();\n }\n });\n }); // end keyboardAccess\n }\n\n /**\n * Closes all open elements, and returns to root menu.\n * @function\n * @fires Drilldown#closed\n */\n\n }, {\n key: '_hideAll',\n value: function _hideAll() {\n var $elem = this.$element.find('.is-drilldown-submenu.is-active').addClass('is-closing');\n if (this.options.autoHeight) this.$wrapper.css({ height: $elem.parent().closest('ul').data('calcHeight') });\n $elem.one(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__foundation_util_core__[\"c\" /* transitionend */])($elem), function (e) {\n $elem.removeClass('is-active is-closing');\n });\n /**\n * Fires when the menu is fully closed.\n * @event Drilldown#closed\n */\n this.$element.trigger('closed.zf.drilldown');\n }\n\n /**\n * Adds event listener for each `back` button, and closes open menus.\n * @function\n * @fires Drilldown#back\n * @param {jQuery} $elem - the current sub-menu to add `back` event.\n */\n\n }, {\n key: '_back',\n value: function _back($elem) {\n var _this = this;\n $elem.off('click.zf.drilldown');\n $elem.children('.js-drilldown-back').on('click.zf.drilldown', function (e) {\n e.stopImmediatePropagation();\n // console.log('mouseup on back');\n _this._hide($elem);\n\n // If there is a parent submenu, call show\n var parentSubMenu = $elem.parent('li').parent('ul').parent('li');\n if (parentSubMenu.length) {\n _this._show(parentSubMenu);\n }\n });\n }\n\n /**\n * Adds event listener to menu items w/o submenus to close open menus on click.\n * @function\n * @private\n */\n\n }, {\n key: '_menuLinkEvents',\n value: function _menuLinkEvents() {\n var _this = this;\n this.$menuItems.not('.is-drilldown-submenu-parent').off('click.zf.drilldown').on('click.zf.drilldown', function (e) {\n // e.stopImmediatePropagation();\n setTimeout(function () {\n _this._hideAll();\n }, 0);\n });\n }\n\n /**\n * Opens a submenu.\n * @function\n * @fires Drilldown#open\n * @param {jQuery} $elem - the current element with a submenu to open, i.e. the `li` tag.\n */\n\n }, {\n key: '_show',\n value: function _show($elem) {\n if (this.options.autoHeight) this.$wrapper.css({ height: $elem.children('[data-submenu]').data('calcHeight') });\n $elem.attr('aria-expanded', true);\n $elem.children('[data-submenu]').addClass('is-active').removeClass('invisible').attr('aria-hidden', false);\n /**\n * Fires when the submenu has opened.\n * @event Drilldown#open\n */\n this.$element.trigger('open.zf.drilldown', [$elem]);\n }\n }, {\n key: '_hide',\n\n\n /**\n * Hides a submenu\n * @function\n * @fires Drilldown#hide\n * @param {jQuery} $elem - the current sub-menu to hide, i.e. the `ul` tag.\n */\n value: function _hide($elem) {\n if (this.options.autoHeight) this.$wrapper.css({ height: $elem.parent().closest('ul').data('calcHeight') });\n var _this = this;\n $elem.parent('li').attr('aria-expanded', false);\n $elem.attr('aria-hidden', true).addClass('is-closing');\n $elem.addClass('is-closing').one(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__foundation_util_core__[\"c\" /* transitionend */])($elem), function () {\n $elem.removeClass('is-active is-closing');\n $elem.blur().addClass('invisible');\n });\n /**\n * Fires when the submenu has closed.\n * @event Drilldown#hide\n */\n $elem.trigger('hide.zf.drilldown', [$elem]);\n }\n\n /**\n * Iterates through the nested menus to calculate the min-height, and max-width for the menu.\n * Prevents content jumping.\n * @function\n * @private\n */\n\n }, {\n key: '_getMaxDims',\n value: function _getMaxDims() {\n var maxHeight = 0,\n result = {},\n _this = this;\n this.$submenus.add(this.$element).each(function () {\n var numOfElems = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).children('li').length;\n var height = __WEBPACK_IMPORTED_MODULE_4__foundation_util_box__[\"a\" /* Box */].GetDimensions(this).height;\n maxHeight = height > maxHeight ? height : maxHeight;\n if (_this.options.autoHeight) {\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('calcHeight', height);\n if (!__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).hasClass('is-drilldown-submenu')) result['height'] = height;\n }\n });\n\n if (!this.options.autoHeight) result['min-height'] = maxHeight + 'px';\n\n result['max-width'] = this.$element[0].getBoundingClientRect().width + 'px';\n\n return result;\n }\n\n /**\n * Destroys the Drilldown Menu\n * @function\n */\n\n }, {\n key: '_destroy',\n value: function _destroy() {\n if (this.options.scrollTop) this.$element.off('.zf.drilldown', this._bindHandler);\n this._hideAll();\n this.$element.off('mutateme.zf.trigger');\n __WEBPACK_IMPORTED_MODULE_2__foundation_util_nest__[\"a\" /* Nest */].Burn(this.$element, 'drilldown');\n this.$element.unwrap().find('.js-drilldown-back, .is-submenu-parent-item').remove().end().find('.is-active, .is-closing, .is-drilldown-submenu').removeClass('is-active is-closing is-drilldown-submenu').end().find('[data-submenu]').removeAttr('aria-hidden tabindex role');\n this.$submenuAnchors.each(function () {\n __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).off('.zf.drilldown');\n });\n\n this.$submenus.removeClass('drilldown-submenu-cover-previous invisible');\n\n this.$element.find('a').each(function () {\n var $link = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this);\n $link.removeAttr('tabindex');\n if ($link.data('savedHref')) {\n $link.attr('href', $link.data('savedHref')).removeData('savedHref');\n } else {\n return;\n }\n });\n }\n }]);\n\n return Drilldown;\n}(__WEBPACK_IMPORTED_MODULE_5__foundation_plugin__[\"a\" /* Plugin */]);\n\nDrilldown.defaults = {\n /**\n * Drilldowns depend on styles in order to function properly; in the default build of Foundation these are\n * on the `drilldown` class. This option auto-applies this class to the drilldown upon initialization.\n * @option\n * @type {boolian}\n * @default true\n */\n autoApplyClass: true,\n /**\n * Markup used for JS generated back button. Prepended or appended (see backButtonPosition) to submenu lists and deleted on `destroy` method, 'js-drilldown-back' class required. Remove the backslash (`\\`) if copy and pasting.\n * @option\n * @type {string}\n * @default '