/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // identity function for calling harmony imports with the correct context /******/ __webpack_require__.i = function(value) { return value; }; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 80); /******/ }) /************************************************************************/ /******/ ({ /***/ 0: /***/ (function(module, exports) { module.exports = jQuery; /***/ }), /***/ 1: /***/ (function(module, exports) { module.exports = {Foundation: window.Foundation}; /***/ }), /***/ 14: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__foundation_core__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_accordion__ = __webpack_require__(44); __WEBPACK_IMPORTED_MODULE_0__foundation_core__["Foundation"].plugin(__WEBPACK_IMPORTED_MODULE_1__foundation_accordion__["a" /* Accordion */], 'Accordion'); /***/ }), /***/ 2: /***/ (function(module, exports) { module.exports = {Plugin: window.Foundation.Plugin}; /***/ }), /***/ 3: /***/ (function(module, exports) { module.exports = {rtl: window.Foundation.rtl, GetYoDigits: window.Foundation.GetYoDigits, transitionend: window.Foundation.transitionend}; /***/ }), /***/ 44: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Accordion; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_core__ = __webpack_require__(3); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__foundation_util_core__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_plugin__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_plugin___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__foundation_plugin__); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** * Accordion module. * @module foundation.accordion * @requires foundation.util.keyboard */ var Accordion = function (_Plugin) { _inherits(Accordion, _Plugin); function Accordion() { _classCallCheck(this, Accordion); return _possibleConstructorReturn(this, (Accordion.__proto__ || Object.getPrototypeOf(Accordion)).apply(this, arguments)); } _createClass(Accordion, [{ key: '_setup', /** * Creates a new instance of an accordion. * @class * @name Accordion * @fires Accordion#init * @param {jQuery} element - jQuery object to make into an accordion. * @param {Object} options - a plain object with settings to override the default options. */ value: function _setup(element, options) { this.$element = element; this.options = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend({}, Accordion.defaults, this.$element.data(), options); this.className = 'Accordion'; // ie9 back compat this._init(); __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["Keyboard"].register('Accordion', { 'ENTER': 'toggle', 'SPACE': 'toggle', 'ARROW_DOWN': 'next', 'ARROW_UP': 'previous' }); } /** * Initializes the accordion by animating the preset active pane(s). * @private */ }, { key: '_init', value: function _init() { var _this3 = this; this.$element.attr('role', 'tablist'); this.$tabs = this.$element.children('[data-accordion-item]'); this.$tabs.each(function (idx, el) { var $el = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(el), $content = $el.children('[data-tab-content]'), id = $content[0].id || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__foundation_util_core__["GetYoDigits"])(6, 'accordion'), linkId = el.id || id + '-label'; $el.find('a:first').attr({ 'aria-controls': id, 'role': 'tab', 'id': linkId, 'aria-expanded': false, 'aria-selected': false }); $content.attr({ 'role': 'tabpanel', 'aria-labelledby': linkId, 'aria-hidden': true, 'id': id }); }); var $initActive = this.$element.find('.is-active').children('[data-tab-content]'); this.firstTimeInit = true; if ($initActive.length) { this.down($initActive, this.firstTimeInit); this.firstTimeInit = false; } this._checkDeepLink = function () { var anchor = window.location.hash; //need a hash and a relevant anchor in this tabset if (anchor.length) { var $link = _this3.$element.find('[href$="' + anchor + '"]'), $anchor = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(anchor); if ($link.length && $anchor) { if (!$link.parent('[data-accordion-item]').hasClass('is-active')) { _this3.down($anchor, _this3.firstTimeInit); _this3.firstTimeInit = false; }; //roll up a little to show the titles if (_this3.options.deepLinkSmudge) { var _this = _this3; __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).load(function () { var offset = _this.$element.offset(); __WEBPACK_IMPORTED_MODULE_0_jquery___default()('html, body').animate({ scrollTop: offset.top }, _this.options.deepLinkSmudgeDelay); }); } /** * Fires when the zplugin has deeplinked at pageload * @event Accordion#deeplink */ _this3.$element.trigger('deeplink.zf.accordion', [$link, $anchor]); } } }; //use browser to open a tab, if it exists in this tabset if (this.options.deepLink) { this._checkDeepLink(); } this._events(); } /** * Adds event handlers for items within the accordion. * @private */ }, { key: '_events', value: function _events() { var _this = this; this.$tabs.each(function () { var $elem = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this); var $tabContent = $elem.children('[data-tab-content]'); if ($tabContent.length) { $elem.children('a').off('click.zf.accordion keydown.zf.accordion').on('click.zf.accordion', function (e) { e.preventDefault(); _this.toggle($tabContent); }).on('keydown.zf.accordion', function (e) { __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["Keyboard"].handleKey(e, 'Accordion', { toggle: function () { _this.toggle($tabContent); }, next: function () { var $a = $elem.next().find('a').focus(); if (!_this.options.multiExpand) { $a.trigger('click.zf.accordion'); } }, previous: function () { var $a = $elem.prev().find('a').focus(); if (!_this.options.multiExpand) { $a.trigger('click.zf.accordion'); } }, handled: function () { e.preventDefault(); e.stopPropagation(); } }); }); } }); if (this.options.deepLink) { __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).on('popstate', this._checkDeepLink); } } /** * Toggles the selected content pane's open/close state. * @param {jQuery} $target - jQuery object of the pane to toggle (`.accordion-content`). * @function */ }, { key: 'toggle', value: function toggle($target) { if ($target.closest('[data-accordion]').is('[disabled]')) { console.info('Cannot toggle an accordion that is disabled.'); return; } if ($target.parent().hasClass('is-active')) { this.up($target); } else { this.down($target); } //either replace or update browser history if (this.options.deepLink) { var anchor = $target.prev('a').attr('href'); if (this.options.updateHistory) { history.pushState({}, '', anchor); } else { history.replaceState({}, '', anchor); } } } /** * Opens the accordion tab defined by `$target`. * @param {jQuery} $target - Accordion pane to open (`.accordion-content`). * @param {Boolean} firstTime - flag to determine if reflow should happen. * @fires Accordion#down * @function */ }, { key: 'down', value: function down($target, firstTime) { var _this4 = this; /** * checking firstTime allows for initial render of the accordion * to render preset is-active panes. */ if ($target.closest('[data-accordion]').is('[disabled]') && !firstTime) { console.info('Cannot call down on an accordion that is disabled.'); return; } $target.attr('aria-hidden', false).parent('[data-tab-content]').addBack().parent().addClass('is-active'); if (!this.options.multiExpand && !firstTime) { var $currentActive = this.$element.children('.is-active').children('[data-tab-content]'); if ($currentActive.length) { this.up($currentActive.not($target)); } } $target.slideDown(this.options.slideSpeed, function () { /** * Fires when the tab is done opening. * @event Accordion#down */ _this4.$element.trigger('down.zf.accordion', [$target]); }); __WEBPACK_IMPORTED_MODULE_0_jquery___default()('#' + $target.attr('aria-labelledby')).attr({ 'aria-expanded': true, 'aria-selected': true }); } /** * Closes the tab defined by `$target`. * @param {jQuery} $target - Accordion tab to close (`.accordion-content`). * @fires Accordion#up * @function */ }, { key: 'up', value: function up($target) { if ($target.closest('[data-accordion]').is('[disabled]')) { console.info('Cannot call up on an accordion that is disabled.'); return; } var $aunts = $target.parent().siblings(), _this = this; if (!this.options.allowAllClosed && !$aunts.hasClass('is-active') || !$target.parent().hasClass('is-active')) { return; } $target.slideUp(_this.options.slideSpeed, function () { /** * Fires when the tab is done collapsing up. * @event Accordion#up */ _this.$element.trigger('up.zf.accordion', [$target]); }); $target.attr('aria-hidden', true).parent().removeClass('is-active'); __WEBPACK_IMPORTED_MODULE_0_jquery___default()('#' + $target.attr('aria-labelledby')).attr({ 'aria-expanded': false, 'aria-selected': false }); } /** * Destroys an instance of an accordion. * @fires Accordion#destroyed * @function */ }, { key: '_destroy', value: function _destroy() { this.$element.find('[data-tab-content]').stop(true).slideUp(0).css('display', ''); this.$element.find('a').off('.zf.accordion'); if (this.options.deepLink) { __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).off('popstate', this._checkDeepLink); } } }]); return Accordion; }(__WEBPACK_IMPORTED_MODULE_3__foundation_plugin__["Plugin"]); Accordion.defaults = { /** * Amount of time to animate the opening of an accordion pane. * @option * @type {number} * @default 250 */ slideSpeed: 250, /** * Allow the accordion to have multiple open panes. * @option * @type {boolean} * @default false */ multiExpand: false, /** * Allow the accordion to close all panes. * @option * @type {boolean} * @default false */ allowAllClosed: false, /** * Allows the window to scroll to content of pane specified by hash anchor * @option * @type {boolean} * @default false */ deepLink: false, /** * Adjust the deep link scroll to make sure the top of the accordion panel is visible * @option * @type {boolean} * @default false */ deepLinkSmudge: false, /** * Animation time (ms) for the deep link adjustment * @option * @type {number} * @default 300 */ deepLinkSmudgeDelay: 300, /** * Update the browser history with the open accordion * @option * @type {boolean} * @default false */ updateHistory: false }; /***/ }), /***/ 5: /***/ (function(module, exports) { module.exports = {Keyboard: window.Foundation.Keyboard}; /***/ }), /***/ 80: /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(14); /***/ }) /******/ });