selectly
Version:
Build custom, accessible, select menus for React.
31 lines • 51.9 kB
JavaScript
/*!
* Selectly 0.5.0
* https://github.com/souporserious/selectly
* Copyright (c) 2017 Selectly Authors
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-aria"),require("react"),require("react-dom"),require("react-measure"),require("tabbable")):"function"==typeof define&&define.amd?define(["react-aria","react","react-dom","react-measure","tabbable"],t):"object"==typeof exports?exports.Selectly=t(require("react-aria"),require("react"),require("react-dom"),require("react-measure"),require("tabbable")):e.Selectly=t(e.ReactARIA,e.React,e.ReactDOM,e.Measure,e.tabbable)}(this,function(e,t,n,r,o){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="dist/",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Option=t.OptionList=t.Trigger=t.Select=t.utils=void 0;var o=n(1),i=n(2),a=r(i),u=n(18),s=r(u),f=n(19),p=r(f),c=n(20),l=r(c),d=n(21),h=r(d),y=n(22),b=r(y),m=o.Select.OptionList,v=o.Select.Option;t.utils={buildOptionsLookup:s.default,getCurrentOptions:p.default,getToggledValues:l.default,getAllValues:h.default,isOptionSelected:b.default};t.Select=a.default,t.Trigger=o.Trigger,t.OptionList=m,t.Option=v},function(t,n){t.exports=e},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(3),p=r(f),c=n(4),l=(r(c),n(1)),d=n(5),h=n(13),y=r(h),b=n(14),m=r(b),v=n(16),g=r(v),_=n(17),w=r(_),O=l.Select.Manager,j=function(e){function t(){var e,n,r,a;o(this,t);for(var u=arguments.length,s=Array(u),f=0;f<u;f++)s[f]=arguments[f];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.state={isOpen:!1,width:null,currentOption:{}},r._handleMeasure=function(e){var t=e.width;r.props.autoWidth&&r.setState({width:t})},r._handleTrigger=function(e,t){r.setState(function(e){return{isOpen:!e.isOpen}}),"function"==typeof e.props.onTrigger&&e.props.onTrigger(t)},r._handleTriggerKeyDown=function(e,t){"Tab"===t.key&&r.state.isOpen&&setTimeout(function(){var e=(0,g.default)((0,c.findDOMNode)(r._optionsList));e.length?e[0].focus():r.setOpen(!1)}),"function"==typeof e.props.onKeyDown&&e.props.onKeyDown(t)},a=n,i(r,a)}return a(t,e),s(t,[{key:"componentWillReceiveProps",value:function(e){this.props.disabled!==e.disabled&&e.disabled===!0&&this.setOpen(!1)}},{key:"setOpen",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return null};this.setState({isOpen:e},t)}},{key:"_handleRequestClose",value:function(e){this.setOpen(!1),"function"==typeof e.props.onRequestClose&&e.props.onRequestClose()}},{key:"_handleOptionSelection",value:function(e,t,n){this.props.multiple||this.setOpen(!1),this.props.onChange(t),this.setState({currentOption:t}),"function"==typeof e.props.onOptionSelection&&e.props.onOptionSelection(t,n)}},{key:"render",value:function(){var e=this,t=this.props,n=(t.autoWidth,t.renderOverlayTo),r=t.placement,o=t.children,i=this.state,a=i.isOpen,s=i.width,c=i.currentOption,l=f.Children.toArray(o),h=u(l,2),b=h[0],v=h[1];return p.default.createElement(O,null,p.default.createElement(d.Manager,null,p.default.createElement(y.default,{onMeasure:this._handleMeasure},p.default.createElement(d.Target,{component:!1},(0,f.cloneElement)(b,{isOpen:a,keybindings:[" "],onTrigger:this._handleTrigger.bind(this,b),onKeyDown:this._handleTriggerKeyDown.bind(this,b)}))),a&&p.default.createElement(m.default,{renderTo:n},p.default.createElement(d.Popper,{placement:r,style:{width:s?s+"px":""}},(0,f.cloneElement)(v,{ref:function(t){return e._optionsList=t},initialFocus:c.index,closeOnOutsideClick:!0,onOptionSelection:this._handleOptionSelection.bind(this,v),onRequestClose:this._handleRequestClose.bind(this,v)})))))}},{key:"isOpen",get:function(){return this.state.isOpen}}]),t}(f.Component);j.propTypes={multiple:f.PropTypes.bool,disabled:f.PropTypes.bool,autoWidth:f.PropTypes.bool,placement:f.PropTypes.any,renderOverlayTo:f.PropTypes.any,onChange:f.PropTypes.func,children:w.default},j.defaultProps={multiple:!1,disabled:!1,autoWidth:!0,onChange:function(){return null}},t.default=j,e.exports=t.default},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Arrow=t.Popper=t.Target=t.Manager=void 0;var o=n(6),i=r(o),a=n(7),u=r(a),s=n(8),f=r(s),p=n(12),c=r(p);t.Manager=i.default,t.Target=u.default,t.Popper=f.default,t.Arrow=c.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":s(t))&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":s(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(3),c=(r(p),n(4)),l=(r(c),function(e){function t(){var e,n,r,o;i(this,t);for(var u=arguments.length,s=Array(u),f=0;f<u;f++)s[f]=arguments[f];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r._setTargetNode=function(e){r._targetNode=e},r._getTargetNode=function(){return r._targetNode},o=n,a(r,o)}return u(t,e),f(t,[{key:"getChildContext",value:function(){return{popperManager:{setTargetNode:this._setTargetNode,getTargetNode:this._getTargetNode}}}},{key:"render",value:function(){var e=this.props,t=e.component,n=e.children,r=o(e,["component","children"]);return t?(0,p.createElement)(t,r,n):n}}]),t}(p.Component));l.childContextTypes={popperManager:p.PropTypes.object.isRequired},l.propTypes={component:p.PropTypes.any},l.defaultProps={component:"div"},t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":s(t))&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":s(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(3),c=(r(p),n(4)),l=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),f(t,[{key:"componentDidMount",value:function(){this.context.popperManager.setTargetNode((0,c.findDOMNode)(this))}},{key:"render",value:function(){var e=this.props,t=e.component,n=e.children,r=o(e,["component","children"]);return t?(0,p.createElement)(t,r,n):n}}]),t}(p.Component);l.contextTypes={popperManager:p.PropTypes.object.isRequired},l.propTypes={component:p.PropTypes.any},l.defaultProps={component:"div"},t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":s(t))&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":s(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(3),l=(r(c),n(4)),d=(r(l),n(9)),h=r(d),y=n(10),b=r(y),m=function(e){function t(){var e,n,r,o;i(this,t);for(var u=arguments.length,s=Array(u),p=0;p<u;p++)s[p]=arguments[p];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.state={},r._setArrowNode=function(e){r._arrowNode=e},r._getTargetNode=function(){return r.context.popperManager.getTargetNode()},r._updateStateModifier={enabled:!0,order:900,function:function(e){(r.state.data&&!(0,b.default)(e.offsets,r.state.data.offsets)||!r.state.data)&&r.setState({data:e})}},r._getPopperStyle=function(){var e=r.state.data;if(!r._popper||!e)return{position:"absolute",pointerEvents:"none",opacity:0};var t=e.offsets.popper,n=t.top,o=t.left,i=t.position;return f({position:i,top:0,left:0,transform:"translate3d("+Math.round(o)+"px, "+Math.round(n)+"px, 0px)",willChange:"transform"},e.styles)},r._getPopperPlacement=function(){return r.state.data?r.state.data.placement:void 0},r._getArrowStyle=function(){if(r.state.data&&r.state.data.offsets.arrow){var e=r.state.data.offsets.arrow,t=e.top,n=e.left;return n?{left:+n}:{top:+t}}return{}},o=n,a(r,o)}return u(t,e),p(t,[{key:"getChildContext",value:function(){return{popper:{setArrowNode:this._setArrowNode,getArrowStyle:this._getArrowStyle}}}},{key:"componentDidMount",value:function(){this._updatePopper()}},{key:"componentDidUpdate",value:function(e){e.placement===this.props.placement&&e.eventsEnabled===this.props.eventsEnabled||this._updatePopper()}},{key:"componentWillUnmount",value:function(){this._destroyPopper()}},{key:"_updatePopper",value:function(){this._destroyPopper(),this._createPopper()}},{key:"_createPopper",value:function(){var e=this.props,t=e.placement,n=e.eventsEnabled,r=f({},this.props.modifiers,{applyStyle:{enabled:!1},updateState:this._updateStateModifier});this._arrowNode&&(r.arrow={element:this._arrowNode}),this._popper=new h.default(this._getTargetNode(),(0,l.findDOMNode)(this),{placement:t,eventsEnabled:n,modifiers:r}),this._popper.scheduleUpdate()}},{key:"_destroyPopper",value:function(){this._popper&&this._popper.destroy()}},{key:"_getProps",value:function(){var e=this.props,t=(e.component,e.placement,e.eventsEnabled,e.modifiers,e.style),n=(e.children,o(e,["component","placement","eventsEnabled","modifiers","style","children"]));return f({style:f({},this._getPopperStyle(),t),"data-placement":this._getPopperPlacement()},n)}},{key:"render",value:function(){var e=this.props,t=e.component,n=e.children,r=this._getProps();return"function"==typeof n?n(r):(0,c.createElement)(t,r,n)}}]),t}(c.Component);m.contextTypes={popperManager:c.PropTypes.object.isRequired},m.childContextTypes={popper:c.PropTypes.object.isRequired},m.propTypes={component:c.PropTypes.any,placement:c.PropTypes.oneOf(h.default.placements),eventsEnabled:c.PropTypes.bool,modifiers:c.PropTypes.object},m.defaultProps={component:"div",placement:"bottom",eventsEnabled:!0,modifiers:{},className:"popper"},t.default=m},function(e,t,n){var r,o,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
* @version 1.0.8
* @license
* Copyright (c) 2016 Federico Zivolo and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
!function(a,u){"object"===i(t)&&"undefined"!=typeof e?e.exports=u():(r=u,o="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==o&&(e.exports=o)))}(void 0,function(){"use strict";function e(e){var t=e.offsetParent,n=t&&t.nodeName;return n&&"BODY"!==n&&"HTML"!==n?t:window.document.documentElement}function t(e,t){if(1!==e.nodeType)return[];var n=window.getComputedStyle(e,null);return t?n[t]:n}function n(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function r(e){if(!e||["HTML","BODY","#document"].indexOf(e.nodeName)!==-1)return window.document.body;var o=t(e),i=o.overflow,a=o.overflowX,u=o.overflowY;return/(auto|scroll)/.test(i+u+a)?e:r(n(e))}function o(e){var r=e.nodeName;return"BODY"!==r&&"HTML"!==r&&("fixed"===t(e,"position")||o(n(e)))}function i(t){var n=e(t),r=o(n);return r?"fixed":"absolute"}function a(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return Number(e["border"+n+"Width"].split("px")[0])+Number(e["border"+r+"Width"].split("px")[0])}function u(e){var n=navigator.appVersion.indexOf("MSIE 10")!==-1,r=void 0;if(n)try{r=e.getBoundingClientRect()}catch(e){r={}}else r=e.getBoundingClientRect();var o={left:r.left,top:r.top,right:r.right,bottom:r.bottom,width:r.right-r.left,height:r.bottom-r.top};if("HTML"===e.nodeName&&n){var i=window.document.documentElement,u=i.scrollTop,s=i.scrollLeft;o.top-=u,o.bottom-=u,o.left-=s,o.right-=s}var f=r.width-(e.clientWidth||r.right-r.left),p=r.height-(e.clientHeight||r.bottom-r.top);if(f||p){var c=t(e);f-=a(c,"x"),p-=a(c,"y")}return o.right-=f,o.width-=f,o.bottom-=p,o.height-=p,o}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var o=window.document.documentElement,i=window.document.scrollingElement||o;return i[n]}return e[n]}function f(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=s(t,"top"),o=s(t,"left"),i=n?-1:1;return e.top+=r*i,e.bottom+=r*i,e.left+=o*i,e.right+=o*i,e}function p(n,o){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=r(o),p=u(n),c=u(o),l={top:p.top-c.top,left:p.left-c.left,bottom:p.top-c.top+p.height,right:p.left-c.left+p.width,width:p.width,height:p.height};i&&!a?l=f(l,s,!0):e(n).contains(s)&&"BODY"!==s.nodeName&&(l=f(l,o));var d=t(o),h=Number(d.borderTopWidth.split("px")[0]),y=Number(d.borderLeftWidth.split("px")[0]);return l.top-=h,l.bottom-=h,l.left-=y,l.right-=y,l}function c(){var e=window.document.body,t=window.document.documentElement;return{height:Math.max(e.scrollHeight,e.offsetHeight,t.clientHeight,t.scrollHeight,t.offsetHeight),width:Math.max(e.scrollWidth,e.offsetWidth,t.clientWidth,t.scrollWidth,t.offsetWidth)}}function l(e){var t=void 0;if("HTML"===e.nodeName){var n=c(),r=n.width,o=n.height;t={width:r,height:o,left:0,top:0}}else t={width:e.offsetWidth,height:e.offsetHeight,left:e.offsetLeft,top:e.offsetTop};return t.right=t.left+t.width,t.bottom=t.top+t.height,t}function d(t){var n=l(t);if("HTML"!==t.nodeName){var r=e(t),o=d(r),i={width:n.offsetWidth,height:n.offsetHeight,left:n.left+o.left,top:n.top+o.top,right:n.right-o.right,bottom:n.bottom-o.bottom};return i}return n}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",o=r(e),i=s(o,t);return["BODY","HTML"].indexOf(o.nodeName)===-1?i+h(n(o),t):i}function y(t,a,u){var s={top:0,left:0},f=e(t);if("viewport"===u){var l=d(f),y=l.left,b=l.top,m=window.document.documentElement,v=m.clientWidth,g=m.clientHeight;if("fixed"===i(t))s.right=v,s.bottom=g;else{var _=h(t,"left"),w=h(t,"top");s={top:0-b,right:v-y+_,bottom:g-b+w,left:0-y}}}else{var O=void 0;if(O="scrollParent"===u?r(n(t)):"window"===u?window.document.body:u,"BODY"===O.nodeName){var j=c(),P=j.height,T=j.width;s.right=T,s.bottom=P}else s=p(O,f,o(t))}return s.left+=a,s.top+=a,s.right-=a,s.bottom-=a,s}function b(e,t,n){if(e.indexOf("auto")===-1)return e;var r=y(n,0,"scrollParent"),o={top:t.top-r.top,right:r.right-t.right,bottom:r.bottom-t.bottom,left:t.left-r.left},i=Object.keys(o).sort(function(e,t){return o[t]-o[e]})[0],a=e.split("-")[1];return i+(a?"-"+a:"")}function m(e){var t=!1,n=0,r=document.createElement("span"),o=new MutationObserver(function(){e(),t=!1});return o.observe(r,{attributes:!0}),function(){t||(t=!0,r.setAttribute("x-index",n),n+=1)}}function v(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},Z))}}function g(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function _(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var r=g(e,function(e){return e[t]===n});return e.indexOf(r)}function w(e){return ae({},e,{right:e.left+e.width,bottom:e.top+e.height})}function O(e){var t=window.getComputedStyle(e),n=parseFloat(t.marginTop)+parseFloat(t.marginBottom),r=parseFloat(t.marginLeft)+parseFloat(t.marginRight),o={width:e.offsetWidth+r,height:e.offsetHeight+n};return o}function j(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function P(e,t,n,r){r=r.split("-")[0];var o=O(t),i={position:e,width:o.width,height:o.height},a=["right","left"].indexOf(r)!==-1,u=a?"top":"left",s=a?"left":"top",f=a?"height":"width",p=a?"width":"height";return i[u]=n[u]+n[f]/2-o[f]/2,r===s?i[s]=n[s]-o[p]:i[s]=n[j(s)],i}function T(t,n,r){var o="fixed"===t.position,i=t.isParentTransformed,a=e(o&&i?r:n);return p(r,a,o,i)}function x(e){for(var t=[!1,"ms","webkit","moz","o"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length-1;r++){var o=t[r],i=o?""+o+n:e;if("undefined"!=typeof window.document.body.style[i])return i}return null}function S(e){var t={};return e&&"[object Function]"===t.toString.call(e)}function E(e,t){return e.some(function(e){var n=e.name,r=e.enabled;return r&&n===t})}function M(e,t,n){var r=g(e,function(e){var n=e.name;return n===t});return!!r&&e.some(function(e){return e.name===n&&e.enabled&&e.order<r.order})}function N(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function k(e){return"BODY"!==e.nodeName&&("none"!==t(e,"transform")||(n(e)?k(n(e)):e))}function A(e,t){return window.removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function C(e,t,n){var r=void 0===n?e:e.slice(0,_(e,"name",n));return r.forEach(function(e){e.enabled&&S(e.function)&&(t=e.function(t,e))}),t}function R(e,t){Object.keys(t).forEach(function(n){var r=t[n];r!==!1?e.setAttribute(n,t[n]):e.removeAttribute(n)})}function L(e,t){Object.keys(t).forEach(function(n){var r="";["width","height","top","right","bottom","left"].indexOf(n)!==-1&&N(t[n])&&(r="px"),e.style[n]=t[n]+r})}function D(e,t,n,o){var i="BODY"===e.nodeName,a=i?window:e;a.addEventListener(t,n,{passive:!0}),i||D(r(a.parentNode),t,n,o),o.push(a)}function W(e,t,n,o){n.updateBound=o,window.addEventListener("resize",n.updateBound,{passive:!0});var i=r(e);return D(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}function z(e,t){var n={position:e.offsets.popper.position},r={"x-placement":e.placement},o=Math.round(e.offsets.popper.left),i=Math.round(e.offsets.popper.top),a=x("transform");return t.gpuAcceleration&&a?(n[a]="translate3d("+o+"px, "+i+"px, 0)",n.top=0,n.left=0,n.willChange="transform"):(n.left=o,n.top=i,n.willChange="top, left"),L(e.instance.popper,ae({},n,e.styles)),R(e.instance.popper,ae({},r,e.attributes)),e.offsets.arrow&&L(e.arrowElement,e.offsets.arrow),e}function q(e,t,n,r,o){var i=T(o,t,e);return n.placement=b(n.placement,i,t),t.setAttribute("x-placement",n.placement),n}function B(e,t){if(!M(e.instance.modifiers,"arrow","keepTogether"))return console.warn("WARNING: `keepTogether` modifier is required by arrow modifier in order to work, be sure to include it before `arrow`!"),e;var n=t.element;if("string"==typeof n){if(n=e.instance.popper.querySelector(n),!n)return e}else if(!e.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var r=e.placement.split("-")[0],o=w(e.offsets.popper),i=e.offsets.reference,a=["left","right"].indexOf(r)!==-1,u=a?"height":"width",s=a?"top":"left",f=a?"left":"top",p=a?"bottom":"right",c=O(n)[u];i[p]-c<o[s]&&(e.offsets.popper[s]-=o[s]-(i[p]-c)),i[s]+c>o[p]&&(e.offsets.popper[s]+=i[s]+c-o[p]);var l=i[s]+i[u]/2-c/2,d=l-w(e.offsets.popper)[s];return d=Math.max(Math.min(o[u]-c,d),0),e.arrowElement=n,e.offsets.arrow={},e.offsets.arrow[s]=d,e.offsets.arrow[f]="",e}function U(e){return"end"===e?"start":"start"===e?"end":e}function H(e,t){if(E(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=y(e.instance.popper,t.padding,t.boundariesElement),r=e.placement.split("-")[0],o=j(r),i=e.placement.split("-")[1]||"",a=[];return a="flip"===t.behavior?[r,o]:t.behavior,a.forEach(function(u,s){if(r!==u||a.length===s+1)return e;r=e.placement.split("-")[0],o=j(r);var f=w(e.offsets.popper),p=e.offsets.reference,c=Math.floor,l="left"===r&&c(f.right)>c(p.left)||"right"===r&&c(f.left)<c(p.right)||"top"===r&&c(f.bottom)>c(p.top)||"bottom"===r&&c(f.top)<c(p.bottom),d=c(f.left)<c(n.left),h=c(f.right)>c(n.right),y=c(f.top)<c(n.top),b=c(f.bottom)>c(n.bottom),m="left"===r&&d||"right"===r&&h||"top"===r&&y||"bottom"===r&&b,v=["top","bottom"].indexOf(r)!==-1,g=!!t.flipVariations&&(v&&"start"===i&&d||v&&"end"===i&&h||!v&&"start"===i&&y||!v&&"end"===i&&b);(l||m||g)&&(e.flipped=!0,(l||m)&&(r=a[s+1]),g&&(i=U(i)),e.placement=r+(i?"-"+i:""),e.offsets.popper=P(e.instance.state.position,e.instance.popper,e.offsets.reference,e.placement),e=C(e.instance.modifiers,e,"flip"))}),e}function F(e){var t=w(e.offsets.popper),n=e.offsets.reference,r=e.placement.split("-")[0],o=Math.floor,i=["top","bottom"].indexOf(r)!==-1,a=i?"right":"bottom",u=i?"left":"top",s=i?"width":"height";return t[a]<o(n[u])&&(e.offsets.popper[u]=o(n[u])-t[s]),t[u]>o(n[a])&&(e.offsets.popper[u]=o(n[a])),e}function I(e,t){var n=e.placement,r=e.offsets.popper,o=void 0;return N(t.offset)?o=[t.offset,0]:(o=t.offset.split(" "),o=o.map(function(t,r){var o=t.match(/(\d*\.?\d*)(.*)/),i=+o[1],a=o[2],u=n.indexOf("right")!==-1||n.indexOf("left")!==-1;1===r&&(u=!u);var s=u?"height":"width";if(0===a.indexOf("%")){var f=void 0;switch(a){case"%p":f=e.offsets.popper;break;case"%":case"$r":default:f=e.offsets.reference}var p=w(f),c=p[s];return c/100*i}if("vh"===a||"vw"===a){var l=void 0;return l="vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0),l/100*i}return"px"===a?+i:+t})),e.placement.indexOf("left")!==-1?(r.top+=o[0],r.left-=o[1]||0):e.placement.indexOf("right")!==-1?(r.top+=o[0],r.left+=o[1]||0):e.placement.indexOf("top")!==-1?(r.left+=o[0],r.top-=o[1]||0):e.placement.indexOf("bottom")!==-1&&(r.left+=o[0],r.top+=o[1]||0),e}function Y(t,n){var r=n.boundariesElement||e(t.instance.popper),o=y(t.instance.popper,n.padding,r);n.boundaries=o;var i=n.priority,a=w(t.offsets.popper),u={primary:function(e){var t=a[e];return a[e]<o[e]&&!n.escapeWithReference&&(t=Math.max(a[e],o[e])),ie({},e,t)},secondary:function(e){var t="right"===e?"left":"top",r=a[t];return a[e]>o[e]&&!n.escapeWithReference&&(r=Math.min(a[t],o[e]-("right"===e?a.width:a.height))),ie({},t,r)}};return i.forEach(function(e){var t=["left","top"].indexOf(e)!==-1?"primary":"secondary";a=ae({},a,u[t](e))}),t.offsets.popper=a,t}function $(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var o=e.offsets.reference,i=w(e.offsets.popper),a=["bottom","top"].indexOf(n)!==-1,u=a?"left":"top",s=a?"width":"height",f={start:ie({},u,o[u]),end:ie({},u,o[u]+o[s]-i[s])};e.offsets.popper=ae({},i,f[r])}return e}function V(e){if(!M(e.instance.modifiers,"hide","preventOverflow"))return console.warn("WARNING: preventOverflow modifier is required by hide modifier in order to work, be sure to include it before hide!"),e;var t=e.offsets.reference,n=g(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(e.hide===!0)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(e.hide===!1)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function K(e){var t=e.placement,n=t.split("-")[0],r=w(e.offsets.popper),o=w(e.offsets.reference),i=["left","right"].indexOf(n)!==-1,a=["top","left"].indexOf(n)===-1;return r[i?"left":"top"]=o[t]-(a?r[i?"width":"height"]:0),e.placement=j(t),e.offsets.popper=w(r),e}for(var G=["native code","[object MutationObserverConstructor]"],X=function(e){return G.some(function(t){return(e||"").toString().indexOf(t)>-1})},J="undefined"!=typeof window,Q=["Edge","Trident","Firefox"],Z=0,ee=0;ee<Q.length;ee+=1)if(J&&navigator.userAgent.indexOf(Q[ee])>=0){Z=1;break}var te=J&&X(window.MutationObserver),ne=te?m:v,re=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},oe=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),ie=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ae=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ue={computeAutoPlacement:b,debounce:ne,findIndex:_,getBordersSize:a,getBoundaries:y,getBoundingClientRect:u,getClientRect:w,getOffsetParent:e,getOffsetRect:l,getOffsetRectRelativeToCustomParent:p,getOuterSizes:O,getParentNode:n,getPopperOffsets:P,getPosition:i,getReferenceOffsets:T,getScroll:s,getScrollParent:r,getStyleComputedProperty:t,getSupportedPropertyName:x,getTotalScroll:h,getWindowSizes:c,includeScroll:f,isFixed:o,isFunction:S,isModifierEnabled:E,isModifierRequired:M,isNative:X,isNumeric:N,isTransformed:k,removeEventListeners:A,runModifiers:C,setAttributes:R,setStyles:L,setupEventListeners:W},se={shift:{order:100,enabled:!0,function:$},offset:{order:200,enabled:!0,function:I,offset:0},preventOverflow:{order:300,enabled:!0,function:Y,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,function:F},arrow:{order:500,enabled:!0,function:B,element:"[x-arrow]"},flip:{order:600,enabled:!0,function:H,behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,function:K},hide:{order:800,enabled:!0,function:V},applyStyle:{order:900,enabled:!0,gpuAcceleration:!0,function:z,onLoad:q}},fe={placement:"bottom",eventsEnabled:!0,onCreate:function(){},onUpdate:function(){},modifiers:se},pe=function(){function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};re(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=ne(this.update.bind(this)),this.options=ae({},e.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t.jquery?t[0]:t,this.popper=n.jquery?n[0]:n,this.modifiers=Object.keys(e.Defaults.modifiers).map(function(t){return ae({name:t},e.Defaults.modifiers[t])}),this.modifiers=this.modifiers.map(function(e){var t=o.modifiers&&o.modifiers[e.name]||{};return ae({},e,t)}),o.modifiers&&(this.options.modifiers=ae({},e.Defaults.modifiers,o.modifiers),Object.keys(o.modifiers).forEach(function(t){if(void 0===e.Defaults.modifiers[t]){var n=o.modifiers[t];n.name=t,r.modifiers.push(n)}})),this.state.position=i(this.reference),this.modifiers=this.modifiers.sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&S(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)}),this.state.isParentTransformed=k(this.popper.parentNode),this.update();var a=this.options.eventsEnabled;a&&this.enableEventListeners(),this.state.eventsEnabled=a}return oe(e,[{key:"update",value:function(){if(!this.state.isDestroyed){var e={instance:this,styles:{},attributes:{},flipped:!1,offsets:{}};this.state.position=i(this.reference),L(this.popper,{position:this.state.position}),e.offsets.reference=T(this.state,this.popper,this.reference),e.placement=b(this.options.placement,e.offsets.reference,this.popper),e.originalPlacement=this.options.placement,e.offsets.popper=P(this.state,this.popper,e.offsets.reference,e.placement),e=C(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}},{key:"destroy",value:function(){return this.state.isDestroyed=!0,E(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[x("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}},{key:"enableEventListeners",value:function(){this.state.eventsEnabled||(this.state=W(this.reference,this.options,this.state,this.scheduleUpdate))}},{key:"disableEventListeners",value:function(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=A(this.reference,this.state))}}]),e}();return pe.Utils=ue,pe.placements=["auto","auto-start","auto-end","top","top-start","top-end","right","right-start","right-end","bottom","bottom-start","bottom-end","left","left-start","left-end"],pe.Defaults=fe,pe})},function(e,t,n){(function(e,n){"use strict";function r(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function o(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function i(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function a(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function u(e){return function(t){return e(t)}}function s(e,t){return e.has(t)}function f(e,t){return null==e?void 0:e[t]}function p(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function c(e,t){return function(n){return e(t(n))}}function l(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function d(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function h(){this.__data__=zt?zt(null):{},this.size=0}function y(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function b(e){var t=this.__data__;if(zt){var n=t[e];return n===we?void 0:n}return _t.call(t,e)?t[e]:void 0}function m(e){var t=this.__data__;return zt?void 0!==t[e]:_t.call(t,e)}function v(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=zt&&void 0===t?we:t,this}function g(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function _(){this.__data__=[],this.size=0}function w(e){var t=this.__data__,n=U(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Et.call(t,n,1),--this.size,!0}function O(e){var t=this.__data__,n=U(t,e);return n<0?void 0:t[n][1]}function j(e){return U(this.__data__,e)>-1}function P(e,t){var n=this.__data__,r=U(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function T(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function x(){this.size=0,this.__data__={hash:new d,map:new(Rt||g),string:new d}}function S(e){var t=ee(this,e).delete(e);return this.size-=t?1:0,t}function E(e){return ee(this,e).get(e)}function M(e){return ee(this,e).has(e)}function N(e,t){var n=ee(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function k(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new T;++t<n;)this.add(e[t])}function A(e){return this.__data__.set(e,we),this}function C(e){return this.__data__.has(e)}function R(e){var t=this.__data__=new g(e);this.size=t.size}function L(){this.__data__=new g,this.size=0}function D(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function W(e){return this.__data__.get(e)}function z(e){return this.__data__.has(e)}function q(e,t){var n=this.__data__;if(n instanceof g){var r=n.__data__;if(!Rt||r.length<_e-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new T(r)}return n.set(e,t),this.size=n.size,this}function B(e,t){var n=Gt(e),r=!n&&Kt(e),o=!n&&!r&&Xt(e),i=!n&&!r&&!o&&Jt(e),u=n||r||o||i,s=u?a(e.length,String):[],f=s.length;for(var p in e)!t&&!_t.call(e,p)||u&&("length"==p||o&&("offset"==p||"parent"==p)||i&&("buffer"==p||"byteLength"==p||"byteOffset"==p)||re(p,f))||s.push(p);return s}function U(e,t){for(var n=e.length;n--;)if(fe(e[n][0],t))return n;return-1}function H(e,t,n){var r=t(e);return Gt(e)?r:o(r,n(e))}function F(e){return null==e?void 0===e?Fe:Le:Mt&&Mt in Object(e)?ne(e):ue(e)}function I(e){return ye(e)&&F(e)==Te}function Y(e,t,n,r,o){return e===t||(null==e||null==t||!ye(e)&&!ye(t)?e!==e&&t!==t:$(e,t,n,r,Y,o))}function $(e,t,n,r,o,i){var a=Gt(e),u=Gt(t),s=a?xe:Vt(e),f=u?xe:Vt(t);s=s==Te?De:s,f=f==Te?De:f;var p=s==De,c=f==De,l=s==f;if(l&&Xt(e)){if(!Xt(t))return!1;a=!0,p=!1}if(l&&!p)return i||(i=new R),a||Jt(e)?X(e,t,n,r,o,i):J(e,t,s,n,r,o,i);if(!(n&Oe)){var d=p&&_t.call(e,"__wrapped__"),h=c&&_t.call(t,"__wrapped__");if(d||h){var y=d?e.value():e,b=h?t.value():t;return i||(i=new R),o(y,b,n,r,i)}}return!!l&&(i||(i=new R),Q(e,t,n,r,o,i))}function V(e){if(!he(e)||ie(e))return!1;var t=le(e)?jt:rt;return t.test(se(e))}function K(e){return ye(e)&&de(e.length)&&!!it[F(e)]}function G(e){if(!ae(e))return At(e);var t=[];for(var n in Object(e))_t.call(e,n)&&"constructor"!=n&&t.push(n);return t}function X(e,t,n,r,o,a){var u=n&Oe,f=e.length,p=t.length;if(f!=p&&!(u&&p>f))return!1;var c=a.get(e);if(c&&a.get(t))return c==t;var l=-1,d=!0,h=n&je?new k:void 0;for(a.set(e,t),a.set(t,e);++l<f;){var y=e[l],b=t[l];if(r)var m=u?r(b,y,l,t,e,a):r(y,b,l,e,t,a);if(void 0!==m){if(m)continue;d=!1;break}if(h){if(!i(t,function(e,t){if(!s(h,t)&&(y===e||o(y,e,n,r,a)))return h.push(t)})){d=!1;break}}else if(y!==b&&!o(y,b,n,r,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function J(e,t,n,r,o,i,a){switch(n){case $e:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ye:return!(e.byteLength!=t.byteLength||!i(new xt(e),new xt(t)));case Ee:case Me:case Re:return fe(+e,+t);case Ne:return e.name==t.name&&e.message==t.message;case qe:case Ue:return e==t+"";case Ce:var u=p;case Be:var s=r&Oe;if(u||(u=l),e.size!=t.size&&!s)return!1;var f=a.get(e);if(f)return f==t;r|=je,a.set(e,t);var c=X(u(e),u(t),r,o,i,a);return a.delete(e),c;case He:if(Yt)return Yt.call(e)==Yt.call(t)}return!1}function Q(e,t,n,r,o,i){var a=n&Oe,u=Z(e),s=u.length,f=Z(t),p=f.length;if(s!=p&&!a)return!1;for(var c=s;c--;){var l=u[c];if(!(a?l in t:_t.call(t,l)))return!1}var d=i.get(e);if(d&&i.get(t))return d==t;var h=!0;i.set(e,t),i.set(t,e);for(var y=a;++c<s;){l=u[c];var b=e[l],m=t[l];if(r)var v=a?r(m,b,l,t,e,i):r(b,m,l,e,t,i);if(!(void 0===v?b===m||o(b,m,n,r,i):v)){h=!1;break}y||(y="constructor"==l)}if(h&&!y){var g=e.constructor,_=t.constructor;g!=_&&"constructor"in e&&"constructor"in t&&!("function"==typeof g&&g instanceof g&&"function"==typeof _&&_ instanceof _)&&(h=!1)}return i.delete(e),i.delete(t),h}function Z(e){return H(e,be,$t)}function ee(e,t){var n=e.__data__;return oe(t)?n["string"==typeof t?"string":"hash"]:n.map}function te(e,t){var n=f(e,t);return V(n)?n:void 0}function ne(e){var t=_t.call(e,Mt),n=e[Mt];try{e[Mt]=void 0;var r=!0}catch(e){}var o=Ot.call(e);return r&&(t?e[Mt]=n:delete e[Mt]),o}function re(e,t){return t=null==t?Pe:t,!!t&&("number"==typeof e||ot.test(e))&&e>-1&&e%1==0&&e<t}function oe(e){var t="undefined"==typeof e?"undefined":ge(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function ie(e){return!!wt&&wt in e}function ae(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||mt;return e===n}function ue(e){return Ot.call(e)}function se(e){if(null!=e){try{return gt.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function fe(e,t){return e===t||e!==e&&t!==t}function pe(e){return null!=e&&de(e.length)&&!le(e)}function ce(e,t){return Y(e,t)}function le(e){if(!he(e))return!1;var t=F(e);return t==ke||t==Ae||t==Se||t==ze}function de(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Pe}function he(e){var t="undefined"==typeof e?"undefined":ge(e);return null!=e&&("object"==t||"function"==t)}function ye(e){return null!=e&&"object"==("undefined"==typeof e?"undefined":ge(e))}function be(e){return pe(e)?B(e):G(e)}function me(){return[]}function ve(){return!1}var ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_e=200,we="__lodash_hash_undefined__",Oe=1,je=2,Pe=9007199254740991,Te="[object Arguments]",xe="[object Array]",Se="[object AsyncFunction]",Ee="[object Boolean]",Me="[object Date]",Ne="[object Error]",ke="[object Function]",Ae="[object GeneratorFunction]",Ce="[object Map]",Re="[object Number]",Le="[object Null]",De="[object Object]",We="[object Promise]",ze="[object Proxy]",qe="[object RegExp]",Be="[object Set]",Ue="[object String]",He="[object Symbol]",Fe="[object Undefined]",Ie="[object WeakMap]",Ye="[object ArrayBuffer]",$e="[object DataView]",Ve="[object Float32Array]",Ke="[object Float64Array]",Ge="[object Int8Array]",Xe="[object Int16Array]",Je="[object Int32Array]",Qe="[object Uint8Array]",Ze="[object Uint8ClampedArray]",et="[object Uint16Array]",tt="[object Uint32Array]",nt=/[\\^$.*+?()[\]{}|]/g,rt=/^\[object .+?Constructor\]$/,ot=/^(?:0|[1-9]\d*)$/,it={};it[Ve]=it[Ke]=it[Ge]=it[Xe]=it[Je]=it[Qe]=it[Ze]=it[et]=it[tt]=!0,it[Te]=it[xe]=it[Ye]=it[Ee]=it[$e]=it[Me]=it[Ne]=it[ke]=it[Ce]=it[Re]=it[De]=it[qe]=it[Be]=it[Ue]=it[Ie]=!1;var at="object"==("undefined"==typeof e?"undefined":ge(e))&&e&&e.Object===Object&&e,ut="object"==("undefined"==typeof self?"undefined":ge(self))&&self&&self.Object===Object&&self,st=at||ut||Function("return this")(),ft="object"==ge(t)&&t&&!t.nodeType&&t,pt=ft&&"object"==ge(n)&&n&&!n.nodeType&&n,ct=pt&&pt.exports===ft,lt=ct&&at.process,dt=function(){try{return lt&<.binding&<.binding("util")}catch(e){}}(),ht=dt&&dt.isTypedArray,yt=Array.prototype,bt=Function.prototype,mt=Object.prototype,vt=st["__core-js_shared__"],gt=bt.toString,_t=mt.hasOwnProperty,wt=function(){var e=/[^.]+$/.exec(vt&&vt.keys&&vt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ot=mt.toString,jt=RegExp("^"+gt.call(_t).replace(nt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pt=ct?st.Buffer:void 0,Tt=st.Symbol,xt=st.Uint8Array,St=mt.propertyIsEnumerable,Et=yt.splice,Mt=Tt?Tt.toStringTag:void 0,Nt=Object.getOwnPropertySymbols,kt=Pt?Pt.isBuffer:void 0,At=c(Object.keys,Object),Ct=te(st,"DataView"),Rt=te(st,"Map"),Lt=te(st,"Promise"),Dt=te(st,"Set"),Wt=te(st,"WeakMap"),zt=te(Object,"create"),qt=se(Ct),Bt=se(Rt),Ut=se(Lt),Ht=se(Dt),Ft=se(Wt),It=Tt?Tt.prototype:void 0,Yt=It?It.valueOf:void 0;d.prototype.clear=h,d.prototype.delete=y,d.prototype.get=b,d.prototype.has=m,d.prototype.set=v,g.prototype.clear=_,g.prototype.delete=w,g.prototype.get=O,g.prototype.has=j,g.prototype.set=P,T.prototype.clear=x,T.prototype.delete=S,T.prototype.get=E,T.prototype.has=M,T.prototype.set=N,k.prototype.add=k.prototype.push=A,k.prototype.has=C,R.prototype.clear=L,R.prototype.delete=D,R.prototype.get=W,R.prototype.has=z,R.prototype.set=q;var $t=Nt?function(e){return null==e?[]:(e=Object(e),r(Nt(e),function(t){return St.call(e,t)}))}:me,Vt=F;(Ct&&Vt(new Ct(new ArrayBuffer(1)))!=$e||Rt&&Vt(new Rt)!=Ce||Lt&&Vt(Lt.resolve())!=We||Dt&&Vt(new Dt)!=Be||Wt&&Vt(new Wt)!=Ie)&&(Vt=function(e){var t=F(e),n=t==De?e.constructor:void 0,r=n?se(n):"";if(r)switch(r){case qt:return $e;case Bt:return Ce;case Ut:return We;case Ht:return Be;case Ft:return Ie}return t});var Kt=I(function(){return arguments}())?I:function(e){return ye(e)&&_t.call(e,"callee")&&!St.call(e,"callee")},Gt=Array.isArray,Xt=kt||ve,Jt=ht?u(ht):K;n.exports=ce}).call(t,function(){return this}(),n(11)(e))},function(e,t){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":s(t))&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":s(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(3),l=(r(c),n(4)),d=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),p(t,[{key:"componentDidMount",value:function(){this.context.popper.setArrowNode((0,l.findDOMNode)(this))}},{key:"render",value:function(){var e=this.props,t=e.component,n=e.style,r=o(e,["component","style"]);return(0,c.createElement)(t,f({style:f({},this.context.popper.getArrowStyle(),n)},r))}}]),t}(c.Component);d.contextTypes={popper:c.PropTypes.object.isRequired},d.propTypes={component:c.PropTypes.any},d.defaultProps={component:"span",className:"popper__arrow"},t.default=d},function(e,t){e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(15),i=r(o);t.default=i.default,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":u(t))&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":u(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(3),p=(r(f),n(4)),c=r(p),l=function(){return null},d=function(e){
function t(){var e,n,r,a;o(this,t);for(var u=arguments.length,s=Array(u),f=0;f<u;f++)s[f]=arguments[f];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r._portalNode=null,a=n,i(r,a)}return a(t,e),s(t,[{key:"componentDidMount",value:function(){this._setupPortal(),this._renderPortal()}},{key:"componentDidUpdate",value:function(){this._renderPortal()}},{key:"componentWillUnmount",value:function(){this._destroyPortal()}},{key:"_getRenderToNode",value:function(){var e=this.props.renderTo;return"string"==typeof e?document.querySelector(e):e||document.body}},{key:"_getComponent",value:function(){return 1===f.Children.count(this.props.children)?f.Children.only(this.props.children):f.Children.toArray(this.props.children)[1]}},{key:"_setupPortal",value:function(){var e=this.props,t=e.renderTag,n=e.onMount,r=this._getRenderToNode();this._portalNode=document.createElement(t),r.appendChild(this._portalNode),this._portalInstance="function"==typeof n?n(this._portalNode):this._portalNode}},{key:"_renderPortal",value:function(){var e=this,t=this._getComponent();c.default.unstable_renderSubtreeIntoContainer(this,t,this._portalNode,function(){e._updatePortal()})}},{key:"_updatePortal",value:function(){var e=this,t=this.props,n=t.id,r=t.className,o=t.style,i=t.onUpdate;n&&(this._portalNode.id=n),r&&(this._portalNode.className=r),o&&Object.keys(o).forEach(function(t){e._portalNode.style[t]=o[t]}),"function"==typeof i&&(this._portalInstance=i(this._portalInstance))}},{key:"_destroyPortal",value:function(){this._portalNode&&(c.default.unmountComponentAtNode(this._portalNode),this._portalNode.parentNode.removeChild(this._portalNode)),this._portalNode=null}},{key:"render",value:function(){return null}}]),t}(f.Component);d.propTypes={renderTag:f.PropTypes.string,renderTo:f.PropTypes.any,id:f.PropTypes.string,className:f.PropTypes.any,style:f.PropTypes.object,onMount:f.PropTypes.func,onUpdate:f.PropTypes.func,onUnmount:f.PropTy