!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("./foundation.core"),require("./foundation.util.box"),require("./foundation.util.keyboard"),require("./foundation.util.motion"),require("./foundation.util.touch"),require("jquery")):"function"==typeof define&&define.amd?define(["./foundation.core","./foundation.util.box","./foundation.util.keyboard","./foundation.util.motion","./foundation.util.touch","jquery"],e):"object"==typeof exports?exports["foundation.dropdown"]=e(require("./foundation.core"),require("./foundation.util.box"),require("./foundation.util.keyboard"),require("./foundation.util.motion"),require("./foundation.util.touch"),require("jquery")):(t.__FOUNDATION_EXTERNAL__=t.__FOUNDATION_EXTERNAL__||{},t.__FOUNDATION_EXTERNAL__["foundation.dropdown"]=e(t.__FOUNDATION_EXTERNAL__["foundation.core"],t.__FOUNDATION_EXTERNAL__["foundation.util.box"],t.__FOUNDATION_EXTERNAL__["foundation.util.keyboard"],t.__FOUNDATION_EXTERNAL__["foundation.util.motion"],t.__FOUNDATION_EXTERNAL__["foundation.util.touch"],t.jQuery))}(window,function(o,n,i,r,s,a){return l={"./foundation.core":function(t,e){t.exports=o},"./foundation.util.box":function(t,e){t.exports=n},"./foundation.util.keyboard":function(t,e){t.exports=i},"./foundation.util.motion":function(t,e){t.exports=r},"./foundation.util.touch":function(t,e){t.exports=s},"./js/entries/plugins/foundation.dropdown.js":function(t,e,o){"use strict";o.r(e);var n=o("./foundation.core");o.d(e,"Foundation",function(){return n.Foundation});var i=o("./js/foundation.dropdown.js");o.d(e,"Dropdown",function(){return i.Dropdown}),n.Foundation.plugin(i.Dropdown,"Dropdown")},"./js/foundation.dropdown.js":function(t,e,o){"use strict";o.r(e),o.d(e,"Dropdown",function(){return n});var e=o("jquery"),r=o.n(e),s=o("./foundation.util.keyboard"),a=o("./foundation.core"),u=o("./js/foundation.positionable.js"),l=o("./js/foundation.util.triggers.js"),c=o("./foundation.util.touch");function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function f(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function d(t,e,o){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,o){t=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=g(t)););return t}(t,e);if(t){e=Object.getOwnPropertyDescriptor(t,e);return e.get?e.get.call(o):e.value}})(t,e,o||t)}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(o){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=g(o);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,n?(t=g(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var n=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(i,u["Positionable"]);var t,e,o,n=p(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),n.apply(this,arguments)}return t=i,(e=[{key:"_setup",value:function(t,e){this.$element=t,this.options=r.a.extend({},i.defaults,this.$element.data(),e),this.className="Dropdown",c.Touch.init(r.a),l.Triggers.init(r.a),this._init(),s.Keyboard.register("Dropdown",{ENTER:"toggle",SPACE:"toggle",ESCAPE:"close"})}},{key:"_init",value:function(){var t=this.$element.attr("id");this.$anchors=r()('[data-toggle="'.concat(t,'"]')).length?r()('[data-toggle="'.concat(t,'"]')):r()('[data-open="'.concat(t,'"]')),this.$anchors.attr({"aria-controls":t,"data-is-focus":!1,"data-yeti-box":t,"aria-haspopup":!0,"aria-expanded":!1}),this._setCurrentAnchor(this.$anchors.first()),this.options.parentClass?this.$parent=this.$element.parents("."+this.options.parentClass):this.$parent=null,void 0===this.$element.attr("aria-labelledby")&&(void 0===this.$currentAnchor.attr("id")&&this.$currentAnchor.attr("id",Object(a.GetYoDigits)(6,"dd-anchor")),this.$element.attr("aria-labelledby",this.$currentAnchor.attr("id"))),this.$element.attr({"aria-hidden":"true","data-yeti-box":t,"data-resize":t}),d(g(i.prototype),"_init",this).call(this),this._events()}},{key:"_getDefaultPosition",value:function(){var t=this.$element[0].className.match(/(top|left|right|bottom)/g);return t?t[0]:"bottom"}},{key:"_getDefaultAlignment",value:function(){var t=/float-(\S+)/.exec(this.$currentAnchor.attr("class"));return t?t[1]:d(g(i.prototype),"_getDefaultAlignment",this).call(this)}},{key:"_setPosition",value:function(){this.$element.removeClass("has-position-".concat(this.position," has-alignment-").concat(this.alignment)),d(g(i.prototype),"_setPosition",this).call(this,this.$currentAnchor,this.$element,this.$parent),this.$element.addClass("has-position-".concat(this.position," has-alignment-").concat(this.alignment))}},{key:"_setCurrentAnchor",value:function(t){this.$currentAnchor=r()(t)}},{key:"_events",value:function(){var o=this,e="ontouchstart"in window||void 0!==window.ontouchstart;this.$element.on({"open.zf.trigger":this.open.bind(this),"close.zf.trigger":this.close.bind(this),"toggle.zf.trigger":this.toggle.bind(this),"resizeme.zf.trigger":this._setPosition.bind(this)}),this.$anchors.off("click.zf.trigger").on("click.zf.trigger",function(t){o._setCurrentAnchor(this),(!1===o.options.forceFollow||e&&o.options.hover&&!1===o.$element.hasClass("is-open"))&&t.preventDefault()}),this.options.hover&&(this.$anchors.off("mouseenter.zf.dropdown mouseleave.zf.dropdown").on("mouseenter.zf.dropdown",function(){o._setCurrentAnchor(this);var t=r()("body").data();void 0!==t.whatinput&&"mouse"!==t.whatinput||(clearTimeout(o.timeout),o.timeout=setTimeout(function(){o.open(),o.$anchors.data("hover",!0)},o.options.hoverDelay))}).on("mouseleave.zf.dropdown",Object(a.ignoreMousedisappear)(function(){clearTimeout(o.timeout),o.timeout=setTimeout(function(){o.close(),o.$anchors.data("hover",!1)},o.options.hoverDelay)})),this.options.hoverPane&&this.$element.off("mouseenter.zf.dropdown mouseleave.zf.dropdown").on("mouseenter.zf.dropdown",function(){clearTimeout(o.timeout)}).on("mouseleave.zf.dropdown",Object(a.ignoreMousedisappear)(function(){clearTimeout(o.timeout),o.timeout=setTimeout(function(){o.close(),o.$anchors.data("hover",!1)},o.options.hoverDelay)}))),this.$anchors.add(this.$element).on("keydown.zf.dropdown",function(t){var e=r()(this);s.Keyboard.handleKey(t,"Dropdown",{open:function(){e.is(o.$anchors)&&!e.is("input, textarea")&&(o.open(),o.$element.attr("tabindex",-1).focus(),t.preventDefault())},close:function(){o.close(),o.$anchors.focus()}})})}},{key:"_addBodyHandler",value:function(){var e=r()(document.body).not(this.$element),o=this;e.off("click.zf.dropdown tap.zf.dropdown").on("click.zf.dropdown tap.zf.dropdown",function(t){o.$anchors.is(t.target)||o.$anchors.find(t.target).length||o.$element.is(t.target)||o.$element.find(t.target).length||(o.close(),e.off("click.zf.dropdown tap.zf.dropdown"))})}},{key:"open",value:function(){var t;this.$element.trigger("closeme.zf.dropdown",this.$element.attr("id")),this.$anchors.addClass("hover").attr({"aria-expanded":!0}),this.$element.addClass("is-opening"),this._setPosition(),this.$element.removeClass("is-opening").addClass("is-open").attr({"aria-hidden":!1}),!this.options.autoFocus||(t=s.Keyboard.findFocusable(this.$element)).length&&t.eq(0).focus(),this.options.closeOnClick&&this._addBodyHandler(),this.options.trapFocus&&s.Keyboard.trapFocus(this.$element),this.$element.trigger("show.zf.dropdown",[this.$element])}},{key:"close",value:function(){if(!this.$element.hasClass("is-open"))return!1;this.$element.removeClass("is-open").attr({"aria-hidden":!0}),this.$anchors.removeClass("hover").attr("aria-expanded",!1),this.$element.trigger("hide.zf.dropdown",[this.$element]),this.options.trapFocus&&s.Keyboard.releaseFocus(this.$element)}},{key:"toggle",value:function(){this.$element.hasClass("is-open")?this.$anchors.data("hover")||this.close():this.open()}},{key:"_destroy",value:function(){this.$element.off(".zf.trigger").hide(),this.$anchors.off(".zf.dropdown"),r()(document.body).off("click.zf.dropdown tap.zf.dropdown")}}])&&f(t.prototype,e),o&&f(t,o),i}();n.defaults={parentClass:null,hoverDelay:250,hover:!1,hoverPane:!1,vOffset:0,hOffset:0,position:"auto",alignment:"auto",allowOverlap:!1,allowBottomOverlap:!0,trapFocus:!1,autoFocus:!1,closeOnClick:!1,forceFollow:!0}},"./js/foundation.positionable.js":function(t,e,o){"use strict";o.r(e),o.d(e,"Positionable",function(){return n});var s=o("./foundation.util.box"),r=o("./foundation.core");function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(o){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=c(o);return function(t,e){{if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined")}return function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t)}(this,n?(t=c(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var f=["left","right","top","bottom"],e=["top","bottom","center"],o=["left","right","center"],d={left:e,right:e,top:o,bottom:o};function h(t,e){t=e.indexOf(t);return t===e.length-1?e[0]:e[t+1]}var n=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(i,r["Plugin"]);var t,e,o,n=l(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),n.apply(this,arguments)}return t=i,(e=[{key:"_init",value:function(){this.triedPositions={},this.position="auto"===this.options.position?this._getDefaultPosition():this.options.position,this.alignment="auto"===this.options.alignment?this._getDefaultAlignment():this.options.alignment,this.originalPosition=this.position,this.originalAlignment=this.alignment}},{key:"_getDefaultPosition",value:function(){return"bottom"}},{key:"_getDefaultAlignment",value:function(){switch(this.position){case"bottom":case"top":return Object(r.rtl)()?"right":"left";case"left":case"right":return"bottom"}}},{key:"_reposition",value:function(){this._alignmentsExhausted(this.position)?(this.position=h(this.position,f),this.alignment=d[this.position][0]):this._realign()}},{key:"_realign",value:function(){this._addTriedPosition(this.position,this.alignment),this.alignment=h(this.alignment,d[this.position])}},{key:"_addTriedPosition",value:function(t,e){this.triedPositions[t]=this.triedPositions[t]||[],this.triedPositions[t].push(e)}},{key:"_positionsExhausted",value:function(){for(var t=!0,e=0;e<f.length;e++)t=t&&this._alignmentsExhausted(f[e]);return t}},{key:"_alignmentsExhausted",value:function(t){return this.triedPositions[t]&&this.triedPositions[t].length===d[t].length}},{key:"_getVOffset",value:function(){return this.options.vOffset}},{key:"_getHOffset",value:function(){return this.options.hOffset}},{key:"_setPosition",value:function(t,e,o){if("false"===t.attr("aria-expanded"))return!1;if(this.options.allowOverlap||(this.position=this.originalPosition,this.alignment=this.originalAlignment),e.offset(s.Box.GetExplicitOffsets(e,t,this.position,this.alignment,this._getVOffset(),this._getHOffset())),!this.options.allowOverlap){for(var n=1e8,i={position:this.position,alignment:this.alignment};!this._positionsExhausted();){var r=s.Box.OverlapArea(e,o,!1,!1,this.options.allowBottomOverlap);if(0===r)return;r<n&&(n=r,i={position:this.position,alignment:this.alignment}),this._reposition(),e.offset(s.Box.GetExplicitOffsets(e,t,this.position,this.alignment,this._getVOffset(),this._getHOffset()))}this.position=i.position,this.alignment=i.alignment,e.offset(s.Box.GetExplicitOffsets(e,t,this.position,this.alignment,this._getVOffset(),this._getHOffset()))}}}])&&a(t.prototype,e),o&&a(t,o),i}();n.defaults={position:"auto",alignment:"auto",allowOverlap:!1,allowBottomOverlap:!0,vOffset:0,hOffset:0}},"./js/foundation.util.triggers.js":function(t,e,o){"use strict";o.r(e),o.d(e,"Triggers",function(){return l});var e=o("jquery"),r=o.n(e),n=o("./foundation.core"),i=o("./foundation.util.motion");function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(e,o){e.data(o).split(" ").forEach(function(t){r()("#".concat(t))["close"===o?"trigger":"triggerHandler"]("".concat(o,".zf.trigger"),[e])})}var u=function(){for(var t=["WebKit","Moz","O","Ms",""],e=0;e<t.length;e++)if("".concat(t[e],"MutationObserver")in window)return window["".concat(t[e],"MutationObserver")];return!1}(),l={Listeners:{Basic:{},Global:{}},Initializers:{}};function c(t,e,o){var n,i=Array.prototype.slice.call(arguments,3);r()(window).on(e,function(){n&&clearTimeout(n),n=setTimeout(function(){o.apply(null,i)},t||10)})}l.Listeners.Basic={openListener:function(){a(r()(this),"open")},closeListener:function(){r()(this).data("close")?a(r()(this),"close"):r()(this).trigger("close.zf.trigger")},toggleListener:function(){r()(this).data("toggle")?a(r()(this),"toggle"):r()(this).trigger("toggle.zf.trigger")},closeableListener:function(t){var e=r()(this).data("closable");t.stopPropagation(),""!==e?i.Motion.animateOut(r()(this),e,function(){r()(this).trigger("closed.zf")}):r()(this).fadeOut().trigger("closed.zf")},toggleFocusListener:function(){var t=r()(this).data("toggle-focus");r()("#".concat(t)).triggerHandler("toggle.zf.trigger",[r()(this)])}},l.Initializers.addOpenListener=function(t){t.off("click.zf.trigger",l.Listeners.Basic.openListener),t.on("click.zf.trigger","[data-open]",l.Listeners.Basic.openListener)},l.Initializers.addCloseListener=function(t){t.off("click.zf.trigger",l.Listeners.Basic.closeListener),t.on("click.zf.trigger","[data-close]",l.Listeners.Basic.closeListener)},l.Initializers.addToggleListener=function(t){t.off("click.zf.trigger",l.Listeners.Basic.toggleListener),t.on("click.zf.trigger","[data-toggle]",l.Listeners.Basic.toggleListener)},l.Initializers.addCloseableListener=function(t){t.off("close.zf.trigger",l.Listeners.Basic.closeableListener),t.on("close.zf.trigger","[data-closeable], [data-closable]",l.Listeners.Basic.closeableListener)},l.Initializers.addToggleFocusListener=function(t){t.off("focus.zf.trigger blur.zf.trigger",l.Listeners.Basic.toggleFocusListener),t.on("focus.zf.trigger blur.zf.trigger","[data-toggle-focus]",l.Listeners.Basic.toggleFocusListener)},l.Listeners.Global={resizeListener:function(t){u||t.each(function(){r()(this).triggerHandler("resizeme.zf.trigger")}),t.attr("data-events","resize")},scrollListener:function(t){u||t.each(function(){r()(this).triggerHandler("scrollme.zf.trigger")}),t.attr("data-events","scroll")},closeMeListener:function(t,e){t=t.namespace.split(".")[0];r()("[data-".concat(t,"]")).not('[data-yeti-box="'.concat(e,'"]')).each(function(){var t=r()(this);t.triggerHandler("close.zf.trigger",[t])})}},l.Initializers.addClosemeListener=function(t){var e=r()("[data-yeti-box]"),o=["dropdown","tooltip","reveal"];t&&("string"==typeof t?o.push(t):"object"===s(t)&&"string"==typeof t[0]?o=o.concat(t):console.error("Plugin names must be strings")),e.length&&(o=o.map(function(t){return"closeme.zf.".concat(t)}).join(" "),r()(window).off(o).on(o,l.Listeners.Global.closeMeListener))},l.Initializers.addResizeListener=function(t){var e=r()("[data-resize]");e.length&&c(t,"resize.zf.trigger",l.Listeners.Global.resizeListener,e)},l.Initializers.addScrollListener=function(t){var e=r()("[data-scroll]");e.length&&c(t,"scroll.zf.trigger",l.Listeners.Global.scrollListener,e)},l.Initializers.addMutationEventsListener=function(t){if(!u)return!1;function e(t){var e=r()(t[0].target);switch(t[0].type){case"attributes":"scroll"===e.attr("data-events")&&"data-events"===t[0].attributeName&&e.triggerHandler("scrollme.zf.trigger",[e,window.pageYOffset]),"resize"===e.attr("data-events")&&"data-events"===t[0].attributeName&&e.triggerHandler("resizeme.zf.trigger",[e]),"style"===t[0].attributeName&&(e.closest("[data-mutate]").attr("data-events","mutate"),e.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[e.closest("[data-mutate]")]));break;case"childList":e.closest("[data-mutate]").attr("data-events","mutate"),e.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[e.closest("[data-mutate]")]);break;default:return!1}}var o=t.find("[data-resize], [data-scroll], [data-mutate]");if(o.length)for(var n=0;n<=o.length-1;n++)new u(e).observe(o[n],{attributes:!0,childList:!0,characterData:!1,subtree:!0,attributeFilter:["data-events","style"]})},l.Initializers.addSimpleListeners=function(){var t=r()(document);l.Initializers.addOpenListener(t),l.Initializers.addCloseListener(t),l.Initializers.addToggleListener(t),l.Initializers.addCloseableListener(t),l.Initializers.addToggleFocusListener(t)},l.Initializers.addGlobalListeners=function(){var t=r()(document);l.Initializers.addMutationEventsListener(t),l.Initializers.addResizeListener(250),l.Initializers.addScrollListener(),l.Initializers.addClosemeListener()},l.init=function(t,e){Object(n.onLoad)(r()(window),function(){!0!==r.a.triggersInitialized&&(l.Initializers.addSimpleListeners(),l.Initializers.addGlobalListeners(),r.a.triggersInitialized=!0)}),e&&(e.Triggers=l,e.IHearYou=l.Initializers.addGlobalListeners)}},4:function(t,e,o){t.exports=o("./js/entries/plugins/foundation.dropdown.js")},jquery:function(t,e){t.exports=a}},c={},u.m=l,u.c=c,u.d=function(t,e,o){u.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},u.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},u.t=function(e,t){if(1&t&&(e=u(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(u.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)u.d(o,n,function(t){return e[t]}.bind(null,n));return o},u.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return u.d(e,"a",e),e},u.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},u.p="",u(u.s=4);function u(t){if(c[t])return c[t].exports;var e=c[t]={i:t,l:!1,exports:{}};return l[t].call(e.exports,e,e.exports,u),e.l=!0,e.exports}var l,c});