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,EAAG;MACT,IAAI,CAACvB,aAAa,CAACsB,OAAO,CAAC,CAAC;MAC5BlD,6CAAC,CAAC2C,MAAM,CAAC,CAACS,GAAG,CAAC,oBAAoB,CAAC;IACrC;EAAC;AAAA,EAhH0BjD,0DAAM;AAmHnCU,cAAc,CAACwC,QAAQ,GAAG,CAAC,CAAC;;;;;;;;;;;ACtJ5B;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,eAAe,4BAA4B;WAC3C,eAAe;WACf,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;ACN+C;AAEkB;AACjEC,wDAAU,CAAC5C,MAAM,CAACG,sEAAc,EAAE,gBAAgB,CAAC","sources":["webpack://__FOUNDATION_EXTERNAL__/webpack/universalModuleDefinition","webpack://__FOUNDATION_EXTERNAL__/./js/foundation.responsiveMenu.js","webpack://__FOUNDATION_EXTERNAL__/external umd {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.accordionMenu\"],\"amd\":\"./foundation.accordionMenu\",\"commonjs\":\"./foundation.accordionMenu\",\"commonjs2\":\"./foundation.accordionMenu\"}","webpack://__FOUNDATION_EXTERNAL__/external umd {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.core\"],\"amd\":\"./foundation.core\",\"commonjs\":\"./foundation.core\",\"commonjs2\":\"./foundation.core\"}","webpack://__FOUNDATION_EXTERNAL__/external umd {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.drilldown\"],\"amd\":\"./foundation.drilldown\",\"commonjs\":\"./foundation.drilldown\",\"commonjs2\":\"./foundation.drilldown\"}","webpack://__FOUNDATION_EXTERNAL__/external umd {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.dropdownMenu\"],\"amd\":\"./foundation.dropdownMenu\",\"commonjs\":\"./foundation.dropdownMenu\",\"commonjs2\":\"./foundation.dropdownMenu\"}","webpack://__FOUNDATION_EXTERNAL__/external umd {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.util.mediaQuery\"],\"amd\":\"./foundation.util.mediaQuery\",\"commonjs\":\"./foundation.util.mediaQuery\",\"commonjs2\":\"./foundation.util.mediaQuery\"}","webpack://__FOUNDATION_EXTERNAL__/external umd {\"root\":[\"jQuery\"],\"amd\":\"jquery\",\"commonjs\":\"jquery\",\"commonjs2\":\"jquery\"}","webpack://__FOUNDATION_EXTERNAL__/webpack/bootstrap","webpack://__FOUNDATION_EXTERNAL__/webpack/runtime/compat get default export","webpack://__FOUNDATION_EXTERNAL__/webpack/runtime/define property getters","webpack://__FOUNDATION_EXTERNAL__/webpack/runtime/hasOwnProperty shorthand","webpack://__FOUNDATION_EXTERNAL__/webpack/runtime/make namespace object","webpack://__FOUNDATION_EXTERNAL__/./js/entries/plugins/foundation.responsiveMenu.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"./foundation.core\"), require(\"jquery\"), require(\"./foundation.util.mediaQuery\"), require(\"./foundation.dropdownMenu\"), require(\"./foundation.drilldown\"), require(\"./foundation.accordionMenu\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"./foundation.core\", \"jquery\", \"./foundation.util.mediaQuery\", \"./foundation.dropdownMenu\", \"./foundation.drilldown\", \"./foundation.accordionMenu\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"__FOUNDATION_EXTERNAL__\"] = factory(require(\"./foundation.core\"), require(\"jquery\"), require(\"./foundation.util.mediaQuery\"), require(\"./foundation.dropdownMenu\"), require(\"./foundation.drilldown\"), require(\"./foundation.accordionMenu\"));\n\telse\n\t\troot[\"__FOUNDATION_EXTERNAL__\"] = root[\"__FOUNDATION_EXTERNAL__\"] || {}, root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.responsiveMenu\"] = factory(root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"], root[\"jQuery\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.util.mediaQuery\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.dropdownMenu\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.drilldown\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.accordionMenu\"]);\n})(self, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__, __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__, __WEBPACK_EXTERNAL_MODULE__foundation_dropdownMenu__, __WEBPACK_EXTERNAL_MODULE__foundation_drilldown__, __WEBPACK_EXTERNAL_MODULE__foundation_accordionMenu__) {\nreturn ","import $ from 'jquery';\n\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { GetYoDigits } from './foundation.core.utils';\nimport { Plugin } from './foundation.core.plugin';\n\nimport { DropdownMenu } from './foundation.dropdownMenu';\nimport { Drilldown } from './foundation.drilldown';\nimport { AccordionMenu } from './foundation.accordionMenu';\n\nlet MenuPlugins = {\n dropdown: {\n cssClass: 'dropdown',\n plugin: DropdownMenu\n },\n drilldown: {\n cssClass: 'drilldown',\n plugin: Drilldown\n },\n accordion: {\n cssClass: 'accordion-menu',\n plugin: AccordionMenu\n }\n};\n\n // import \"foundation.util.triggers.js\";\n\n\n/**\n * ResponsiveMenu module.\n * @module foundation.responsiveMenu\n * @requires foundation.util.triggers\n * @requires foundation.util.mediaQuery\n */\n\nclass ResponsiveMenu extends Plugin {\n /**\n * Creates a new instance of a responsive menu.\n * @class\n * @name ResponsiveMenu\n * @fires ResponsiveMenu#init\n * @param {jQuery} element - jQuery object to make into a dropdown menu.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element) {\n this.$element = $(element);\n this.rules = this.$element.data('responsive-menu');\n this.currentMq = null;\n this.currentPlugin = null;\n this.className = 'ResponsiveMenu'; // ie9 back compat\n\n this._init();\n this._events();\n }\n\n /**\n * Initializes the Menu by parsing the classes from the 'data-ResponsiveMenu' attribute on the element.\n * @function\n * @private\n */\n _init() {\n\n MediaQuery._init();\n // The first time an Interchange plugin is initialized, this.rules is converted from a string of \"classes\" to an object of rules\n if (typeof this.rules === 'string') {\n let rulesTree = {};\n\n // Parse rules from \"classes\" pulled from data attribute\n let rules = this.rules.split(' ');\n\n // Iterate through every rule found\n for (let i = 0; i < rules.length; i++) {\n let rule = rules[i].split('-');\n let ruleSize = rule.length > 1 ? rule[0] : 'small';\n let rulePlugin = rule.length > 1 ? rule[1] : rule[0];\n\n if (MenuPlugins[rulePlugin] !== null) {\n rulesTree[ruleSize] = MenuPlugins[rulePlugin];\n }\n }\n\n this.rules = rulesTree;\n }\n\n if (!$.isEmptyObject(this.rules)) {\n this._checkMediaQueries();\n }\n // Add data-mutate since children may need it.\n this.$element.attr('data-mutate', (this.$element.attr('data-mutate') || GetYoDigits(6, 'responsive-menu')));\n }\n\n /**\n * Initializes events for the Menu.\n * @function\n * @private\n */\n _events() {\n var _this = this;\n\n $(window).on('changed.zf.mediaquery', function() {\n _this._checkMediaQueries();\n });\n // $(window).on('resize.zf.ResponsiveMenu', function() {\n // _this._checkMediaQueries();\n // });\n }\n\n /**\n * Checks the current screen width against available media queries. If the media query has changed, and the plugin needed has changed, the plugins will swap out.\n * @function\n * @private\n */\n _checkMediaQueries() {\n var matchedMq, _this = this;\n // Iterate through each rule and find the last matching rule\n $.each(this.rules, function(key) {\n if (MediaQuery.atLeast(key)) {\n matchedMq = key;\n }\n });\n\n // No match? No dice\n if (!matchedMq) return;\n\n // Plugin already initialized? We good\n if (this.currentPlugin instanceof this.rules[matchedMq].plugin) return;\n\n // Remove existing plugin-specific CSS classes\n $.each(MenuPlugins, function(key, value) {\n _this.$element.removeClass(value.cssClass);\n });\n\n // Add the CSS class for the new plugin\n this.$element.addClass(this.rules[matchedMq].cssClass);\n\n // Create an instance of the new plugin\n if (this.currentPlugin) this.currentPlugin.destroy();\n this.currentPlugin = new this.rules[matchedMq].plugin(this.$element, {});\n }\n\n /**\n * Destroys the instance of the current plugin on this element, as well as the window resize handler that switches the plugins out.\n * @function\n */\n _destroy() {\n this.currentPlugin.destroy();\n $(window).off('.zf.ResponsiveMenu');\n }\n}\n\nResponsiveMenu.defaults = {};\n\nexport {ResponsiveMenu};\n","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_accordionMenu__;","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_drilldown__;","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_dropdownMenu__;","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__;","module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { Foundation } from './foundation.core';\n\nimport { ResponsiveMenu } from '../../foundation.responsiveMenu';\nFoundation.plugin(ResponsiveMenu, 'ResponsiveMenu');\n\nexport { Foundation, ResponsiveMenu };\n"],"names":["$","MediaQuery","GetYoDigits","Plugin","DropdownMenu","Drilldown","AccordionMenu","MenuPlugins","dropdown","cssClass","plugin","drilldown","accordion","ResponsiveMenu","_Plugin","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","value","_setup","element","$element","rules","data","currentMq","currentPlugin","className","_init","_events","rulesTree","split","i","length","rule","ruleSize","rulePlugin","isEmptyObject","_checkMediaQueries","attr","_this","window","on","matchedMq","each","atLeast","removeClass","addClass","destroy","_destroy","off","defaults","Foundation"],"sourceRoot":""}