Socket
Socket
Sign inDemoInstall

react-popper

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-popper - npm Package Compare versions

Comparing version 0.6.4 to 0.6.5

3

CHANGELOG.md
## CHANGELOG
### 0.6.5
Call `innerRef` in _all_ component child functions
### 0.6.4

@@ -3,0 +6,0 @@ Call `innerRef` in child function as well

6

dist/react-popper.min.js
/*!
* React Popper 0.6.4
* React Popper 0.6.5
* https://github.com/souporserious/react-popper
* Copyright (c) 2017 React Popper Authors
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","prop-types"],t):"object"==typeof exports?exports.ReactPopper=t(require("react"),require("prop-types")):e.ReactPopper=t(e.React,e.PropTypes)}(this,function(e,t){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.Arrow=t.Popper=t.Target=t.Manager=void 0;var o=n(1),i=r(o),a=n(4),f=r(a),s=n(5),p=r(s),u=n(9),l=r(u);t.Manager=i.default,t.Target=f.default,t.Popper=p.default,t.Arrow=l.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"!=typeof t&&"function"!=typeof t?e:t}function f(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 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}}(),p=n(2),u=(r(p),n(3)),l=r(u),c=function(e){function t(){var e,n,r,o;i(this,t);for(var f=arguments.length,s=Array(f),p=0;p<f;p++)s[p]=arguments[p];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 f(t,e),s(t,[{key:"getChildContext",value:function(){return{popperManager:{setTargetNode:this._setTargetNode,getTargetNode:this._getTargetNode}}}},{key:"render",value:function(){var e=this.props,t=e.tag,n=e.children,r=o(e,["tag","children"]);return t!==!1?(0,p.createElement)(t,r,n):n}}]),t}(p.Component);c.childContextTypes={popperManager:l.default.object.isRequired},c.propTypes={tag:l.default.oneOfType([l.default.string,l.default.bool])},c.defaultProps={tag:"div"},t.default=c},function(t,n){t.exports=e},function(e,n){e.exports=t},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}Object.defineProperty(t,"__esModule",{value:!0});var i=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},a=n(2),f=(r(a),n(3)),s=r(f),p=function(e,t){var n=e.tag,r=void 0===n?"div":n,f=e.innerRef,s=e.children,p=o(e,["tag","innerRef","children"]),u=t.popperManager,l=function(e){return u.setTargetNode(e)};if("function"==typeof s){var c={ref:l};return s({targetProps:c,restProps:p})}return(0,a.createElement)(r,i({ref:function(e){l(e),"function"==typeof f&&f(e)}},p),s)};p.contextTypes={popperManager:s.default.object.isRequired},p.propTypes={tag:s.default.string,innerRef:s.default.func,children:s.default.oneOfType([s.default.node,s.default.func])},t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(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 a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(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 s(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 p=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},u=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}}(),l=n(2),c=(r(l),n(3)),d=r(c),h=n(6),m=r(h),v=n(7),b=r(v),Popper=function(e){function Popper(){var e,t,n,r;a(this,Popper);for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];return t=n=f(this,(e=Popper.__proto__||Object.getPrototypeOf(Popper)).call.apply(e,[this].concat(i))),n.state={},n._setArrowNode=function(e){n._arrowNode=e},n._getTargetNode=function(){return n.context.popperManager.getTargetNode()},n._updateStateModifier={enabled:!0,order:900,fn:function(e){return(n.state.data&&!(0,b.default)(e.offsets,n.state.data.offsets)||!n.state.data)&&n.setState({data:e}),e}},n._getPopperStyle=function(){var e=n.state.data;if(!n._popper||!e)return{position:"absolute",pointerEvents:"none",opacity:0};var t=e.offsets.popper,r=t.top,o=t.left,i=t.position;return p({position:i,top:0,left:0,transform:"translate3d("+Math.round(o)+"px, "+Math.round(r)+"px, 0px)",willChange:"transform"},e.styles)},n._getPopperPlacement=function(){return n.state.data?n.state.data.placement:void 0},n._getArrowStyle=function(){if(n.state.data&&n.state.data.offsets.arrow){var e=n.state.data.offsets.arrow,t=e.top,r=e.left;return r?{left:+r}:{top:+t}}return{}},r=t,f(n,r)}return s(Popper,e),u(Popper,[{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(),e.children!==this.props.children&&this._popper.scheduleUpdate()}},{key:"componentWillUnmount",value:function(){this._destroyPopper()}},{key:"_updatePopper",value:function(){this._destroyPopper(),this._node&&this._createPopper()}},{key:"_createPopper",value:function(){var e=this.props,t=e.placement,n=e.eventsEnabled,r=p({},this.props.modifiers,{applyStyle:{enabled:!1},updateState:this._updateStateModifier});this._arrowNode&&(r.arrow={element:this._arrowNode}),this._popper=new m.default(this._getTargetNode(),this._node,{placement:t,eventsEnabled:n,modifiers:r}),this._popper.scheduleUpdate()}},{key:"_destroyPopper",value:function(){this._popper&&this._popper.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.tag,r=t.innerRef,a=(t.placement,t.eventsEnabled,t.modifiers,t.children),f=i(t,["tag","innerRef","placement","eventsEnabled","modifiers","children"]),s=function(t){e._node=t,"function"==typeof r&&r(t)},u=this._getPopperStyle(),c=this._getPopperPlacement();if("function"==typeof a){var d=o({ref:s,style:u},"data-placement",c);return a({popperProps:d,restProps:f,scheduleUpdate:this._popper&&this._popper.scheduleUpdate})}return(0,l.createElement)(n,p({},f,{ref:s,style:p({},f.style,u),"data-placement":c}),a)}}]),Popper}(l.Component);Popper.contextTypes={popperManager:d.default.object.isRequired},Popper.childContextTypes={popper:d.default.object.isRequired},Popper.propTypes={tag:d.default.string,innerRef:d.default.func,placement:d.default.oneOf(m.default.placements),eventsEnabled:d.default.bool,modifiers:d.default.object,children:d.default.oneOfType([d.default.node,d.default.func])},Popper.defaultProps={tag:"div",placement:"bottom",eventsEnabled:!0,modifiers:{}},t.default=Popper},function(e,t,n){var r,o;(function(i){"use strict";var a="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};!function(i,f){"object"===a(t)&&"undefined"!=typeof e?e.exports=f():(r=f,o="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==o&&(e.exports=o)))}(void 0,function(){function e(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 t(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},fe))}}function n(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function r(e,t){Object.keys(t).forEach(function(r){var o="";["width","height","top","right","bottom","left"].indexOf(r)!==-1&&n(t[r])&&(o="px"),e.style[r]=t[r]+o})}function o(e){var t={};return e&&"[object Function]"===t.toString.call(e)}function a(e,t){if(1!==e.nodeType)return[];var n=window.getComputedStyle(e,null);return t?n[t]:n}function f(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function s(e){if(!e||["HTML","BODY","#document"].indexOf(e.nodeName)!==-1)return window.document.body;var t=a(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/(auto|scroll)/.test(n+o+r)?e:s(f(e))}function p(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||e.firstElementChild.offsetParent===e)}function u(e){return null!==e.parentNode?u(e.parentNode):e}function l(e){var t=e&&e.offsetParent,n=t&&t.nodeName;return n&&"BODY"!==n&&"HTML"!==n?t:window.document.documentElement}function c(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return window.document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,o=n?t:e,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var a=i.commonAncestorContainer;if(e!==a&&t!==a||r.contains(o))return p(a)?a:l(a);var f=u(e);return f.host?c(f.host,t):c(e,u(t).host)}function d(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 h(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=d(t,"top"),o=d(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 m(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return+e["border"+n+"Width"].split("px")[0]+ +e["border"+r+"Width"].split("px")[0]}function v(e,t,n,r){return Math.max(t["offset"+e],n["client"+e],n["offset"+e],ce()?n["offset"+e]+r["margin"+("Height"===e?"Top":"Left")]+r["margin"+("Height"===e?"Bottom":"Right")]:0)}function b(){var e=window.document.body,t=window.document.documentElement,n=ce()&&window.getComputedStyle(t);return{height:v("Height",e,t,n),width:v("Width",e,t,n)}}function y(e){return ve({},e,{right:e.left+e.width,bottom:e.top+e.height})}function g(e){var t={};if(ce())try{t=e.getBoundingClientRect();var n=d(e,"top"),r=d(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}catch(e){}else t=e.getBoundingClientRect();var o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},i="HTML"===e.nodeName?b():{},f=i.width||e.clientWidth||o.right-o.left,s=i.height||e.clientHeight||o.bottom-o.top,p=e.offsetWidth-f,u=e.offsetHeight-s;if(p||u){var l=a(e);p-=m(l,"x"),u-=m(l,"y"),o.width-=p,o.height-=u}return y(o)}function w(e,t){var n=ce(),r="HTML"===t.nodeName,o=g(e),i=g(t),f=s(e),p=y({top:o.top-i.top,left:o.left-i.left,width:o.width,height:o.height});if(r||"BODY"===t.nodeName){var u=a(t),l=n&&r?0:+u.borderTopWidth.split("px")[0],c=n&&r?0:+u.borderLeftWidth.split("px")[0],d=n&&r?0:+u.marginTop.split("px")[0],m=n&&r?0:+u.marginLeft.split("px")[0];p.top-=l-d,p.bottom-=l-d,p.left-=c-m,p.right-=c-m,p.marginTop=d,p.marginLeft=m}return t.contains(f)&&(n||"BODY"!==f.nodeName)&&(p=h(p,t)),p}function O(e){var t=window.document.documentElement,n=w(e,t),r=Math.max(t.clientWidth,window.innerWidth||0),o=Math.max(t.clientHeight,window.innerHeight||0),i=d(t),a=d(t,"left"),f={top:i-n.top+n.marginTop,left:a-n.left+n.marginLeft,width:r,height:o};return y(f)}function x(e){var t=e.nodeName;return"BODY"!==t&&"HTML"!==t&&("fixed"===a(e,"position")||x(f(e)))}function _(e,t,n,r){var o={top:0,left:0},i=c(e,t);if("viewport"===r)o=O(i);else{var a=void 0;"scrollParent"===r?(a=s(f(e)),"BODY"===a.nodeName&&(a=window.document.documentElement)):a="window"===r?window.document.documentElement:r;var p=w(a,i);if("HTML"!==a.nodeName||x(i))o=p;else{var u=b(),l=u.height,d=u.width;o.top+=p.top-p.marginTop,o.bottom=l+p.top,o.left+=p.left-p.marginLeft,o.right=d+p.left}}return o.left+=n,o.top+=n,o.right-=n,o.bottom-=n,o}function E(e,t,n,r,o){if(e.indexOf("auto")===-1)return e;var i=_(n,r,0,o),a={top:t.top-i.top,right:i.right-t.right,bottom:i.bottom-t.bottom,left:t.left-i.left},f=Object.keys(a).sort(function(e,t){return a[t]-a[e]})[0],s=e.split("-")[1];return f+(s?"-"+s:"")}function P(e,t,n){var r=c(t,n);return w(n,r)}function T(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 M(e,t,n){n=n.split("-")[0];var r=T(e),o={width:r.width,height:r.height},i=["right","left"].indexOf(n)!==-1,a=i?"top":"left",f=i?"left":"top",s=i?"height":"width",p=i?"width":"height";return o[a]=t[a]+t[s]/2-r[s]/2,n===f?o[f]=t[f]-r[p]:o[f]=t[j(f)],o}function N(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function C(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var r=N(e,function(e){return e[t]===n});return e.indexOf(r)}function L(e,t,n){var r=void 0===n?e:e.slice(0,C(e,"name",n));return r.forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&o(n)&&(t=n(t,e))}),t}function S(){if(!this.state.isDestroyed){var e={instance:this,styles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=P(this.state,this.popper,this.reference),e.placement=E(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement),e.originalPlacement=e.placement,e.offsets.popper=M(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position="absolute",e=L(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function k(e,t){return e.some(function(e){var n=e.name,r=e.enabled;return r&&n===t})}function R(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 A(){return this.state.isDestroyed=!0,k(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[R("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function D(e,t,n,r){var o="BODY"===e.nodeName,i=o?window:e;i.addEventListener(t,n,{passive:!0}),o||D(s(i.parentNode),t,n,r),r.push(i)}function W(e,t,n,r){n.updateBound=r,window.addEventListener("resize",n.updateBound,{passive:!0});var o=s(e);return D(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function B(){this.state.eventsEnabled||(this.state=W(this.reference,this.options,this.state,this.scheduleUpdate))}function H(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 U(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=H(this.reference,this.state))}function q(e,t){Object.keys(t).forEach(function(n){var r=t[n];r!==!1?e.setAttribute(n,t[n]):e.removeAttribute(n)})}function F(e,t){var n={position:e.offsets.popper.position},o={"x-placement":e.placement},i=Math.round(e.offsets.popper.left),a=Math.round(e.offsets.popper.top),f=R("transform");return t.gpuAcceleration&&f?(n[f]="translate3d("+i+"px, "+a+"px, 0)",n.top=0,n.left=0,n.willChange="transform"):(n.left=i,n.top=a,n.willChange="top, left"),r(e.instance.popper,ve({},n,e.styles)),q(e.instance.popper,ve({},o,e.attributes)),e.offsets.arrow&&r(e.arrowElement,e.offsets.arrow),e}function I(e,t,n,r,o){var i=P(o,t,e),a=E(n.placement,i,t,e,n.modifiers.flip.boundariesElement);return t.setAttribute("x-placement",a),n}function Y(e,t,n){var r=N(e,function(e){var n=e.name;return n===t}),o=!!r&&e.some(function(e){return e.name===n&&e.enabled&&e.order<r.order});if(!o){var i="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return o}function K(e,t){if(!Y(e.instance.modifiers,"arrow","keepTogether"))return 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=y(e.offsets.popper),i=e.offsets.reference,a=["left","right"].indexOf(r)!==-1,f=a?"height":"width",s=a?"top":"left",p=a?"left":"top",u=a?"bottom":"right",l=T(n)[f];i[u]-l<o[s]&&(e.offsets.popper[s]-=o[s]-(i[u]-l)),i[s]+l>o[u]&&(e.offsets.popper[s]+=i[s]+l-o[u]);var c=i[s]+i[f]/2-l/2,d=c-y(e.offsets.popper)[s];return d=Math.max(Math.min(o[f]-l,d),0),e.arrowElement=n,e.offsets.arrow={},e.offsets.arrow[s]=d,e.offsets.arrow[p]="",e}function z(e){return"end"===e?"start":"start"===e?"end":e}function G(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=ye.indexOf(e),r=ye.slice(n+1).concat(ye.slice(0,n));return t?r.reverse():r}function V(e,t){if(k(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=_(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),r=e.placement.split("-")[0],o=j(r),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case ge.FLIP:a=[r,o];break;case ge.CLOCKWISE:a=G(r);break;case ge.COUNTERCLOCKWISE:a=G(r,!0);break;default:a=t.behavior}return a.forEach(function(f,s){if(r!==f||a.length===s+1)return e;r=e.placement.split("-")[0],o=j(r);var p=y(e.offsets.popper),u=e.offsets.reference,l=Math.floor,c="left"===r&&l(p.right)>l(u.left)||"right"===r&&l(p.left)<l(u.right)||"top"===r&&l(p.bottom)>l(u.top)||"bottom"===r&&l(p.top)<l(u.bottom),d=l(p.left)<l(n.left),h=l(p.right)>l(n.right),m=l(p.top)<l(n.top),v=l(p.bottom)>l(n.bottom),b="left"===r&&d||"right"===r&&h||"top"===r&&m||"bottom"===r&&v,g=["top","bottom"].indexOf(r)!==-1,w=!!t.flipVariations&&(g&&"start"===i&&d||g&&"end"===i&&h||!g&&"start"===i&&m||!g&&"end"===i&&v);(c||b||w)&&(e.flipped=!0,(c||b)&&(r=a[s+1]),w&&(i=z(i)),e.placement=r+(i?"-"+i:""),e.offsets.popper=ve({},e.offsets.popper,M(e.instance.popper,e.offsets.reference,e.placement)),e=L(e.instance.modifiers,e,"flip"))}),e}function X(e){var t=y(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",f=i?"left":"top",s=i?"width":"height";return t[a]<o(n[f])&&(e.offsets.popper[f]=o(n[f])-t[s]),t[f]>o(n[a])&&(e.offsets.popper[f]=o(n[a])),e}function J(e,t,n,r){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+o[1],a=o[2];if(!i)return e;if(0===a.indexOf("%")){var f=void 0;switch(a){case"%p":f=n;break;case"%":case"%r":default:f=r}var s=y(f);return s[t]/100*i}if("vh"===a||"vw"===a){var p=void 0;return p="vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0),p/100*i}return i}function Q(e,t,r,o){var i=[0,0],a=["right","left"].indexOf(o)!==-1,f=e.split(/(\+|\-)/).map(function(e){return e.trim()}),s=f.indexOf(N(f,function(e){return e.search(/,|\s/)!==-1}));f[s]&&f[s].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var p=/\s*,\s*|\s+/,u=s!==-1?[f.slice(0,s).concat([f[s].split(p)[0]]),[f[s].split(p)[1]].concat(f.slice(s+1))]:[f];return u=u.map(function(e,n){var o=(1===n?!a:a)?"height":"width",i=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&["+","-"].indexOf(t)!==-1?(e[e.length-1]=t,i=!0,e):i?(e[e.length-1]+=t,i=!1,e):e.concat(t)},[]).map(function(e){return J(e,o,t,r)})}),u.forEach(function(e,t){e.forEach(function(r,o){n(r)&&(i[t]+=r*("-"===e[o-1]?-1:1))})}),i}function Z(e,t){var r=t.offset,o=e.placement,i=e.offsets,a=i.popper,f=i.reference,s=o.split("-")[0],p=void 0;return p=n(+r)?[+r,0]:Q(r,a,f,s),"left"===s?(a.top+=p[0],a.left-=p[1]):"right"===s?(a.top+=p[0],a.left+=p[1]):"top"===s?(a.left+=p[0],a.top-=p[1]):"bottom"===s&&(a.left+=p[0],a.top+=p[1]),e.popper=a,e}function $(e,t){var n=t.boundariesElement||l(e.instance.popper),r=_(e.instance.popper,e.instance.reference,t.padding,n);t.boundaries=r;var o=t.priority,i=y(e.offsets.popper),a={primary:function(e){var n=i[e];return i[e]<r[e]&&!t.escapeWithReference&&(n=Math.max(i[e],r[e])),me({},e,n)},secondary:function(e){var n="right"===e?"left":"top",o=i[n];return i[e]>r[e]&&!t.escapeWithReference&&(o=Math.min(i[n],r[e]-("right"===e?i.width:i.height))),me({},n,o)}};return o.forEach(function(e){var t=["left","top"].indexOf(e)!==-1?"primary":"secondary";i=ve({},i,a[t](e))}),e.offsets.popper=i,e}function ee(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var o=e.offsets.reference,i=y(e.offsets.popper),a=["bottom","top"].indexOf(n)!==-1,f=a?"left":"top",s=a?"width":"height",p={start:me({},f,o[f]),end:me({},f,o[f]+o[s]-i[s])};e.offsets.popper=ve({},i,p[r])}return e}function te(e){if(!Y(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=N(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 ne(e){var t=e.placement,n=t.split("-")[0],r=y(e.offsets.popper),o=y(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=y(r),e}for(var re=["native code","[object MutationObserverConstructor]"],oe=function(e){return re.some(function(t){return(e||"").toString().indexOf(t)>-1})},ie="undefined"!=typeof window,ae=["Edge","Trident","Firefox"],fe=0,se=0;se<ae.length;se+=1)if(ie&&navigator.userAgent.indexOf(ae[se])>=0){fe=1;break}var pe=ie&&oe(window.MutationObserver),ue=pe?e:t,le=void 0,ce=function(){return void 0===le&&(le=navigator.appVersion.indexOf("MSIE 10")!==-1),le},de=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},he=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}}(),me=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ve=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},be=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],ye=be.slice(3),ge={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},we={shift:{order:100,enabled:!0,fn:ee},offset:{order:200,enabled:!0,fn:Z,offset:0},preventOverflow:{order:300,enabled:!0,fn:$,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:X},arrow:{order:500,enabled:!0,fn:K,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:V,behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:ne},hide:{order:800,enabled:!0,fn:te},applyStyle:{order:900,enabled:!0,fn:F,onLoad:I,gpuAcceleration:!0}},Oe={placement:"bottom",eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:we},Popper=function(){function Popper(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};de(this,Popper),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=ue(this.update.bind(this)),this.options=ve({},Popper.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e.jquery?e[0]:e,this.popper=t.jquery?t[0]:t,r(this.popper,{position:"absolute"}),this.modifiers=Object.keys(Popper.Defaults.modifiers).map(function(e){return ve({name:e},Popper.Defaults.modifiers[e])}),this.modifiers=this.modifiers.map(function(e){var t=i.modifiers&&i.modifiers[e.name]||{};return ve({},e,t)}),i.modifiers&&(this.options.modifiers=ve({},Popper.Defaults.modifiers,i.modifiers),Object.keys(i.modifiers).forEach(function(e){if(void 0===Popper.Defaults.modifiers[e]){var t=i.modifiers[e];t.name=e,n.modifiers.push(t)}})),this.modifiers=this.modifiers.sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&o(e.onLoad)&&e.onLoad(n.reference,n.popper,n.options,e,n.state)}),this.update();var a=this.options.eventsEnabled;a&&this.enableEventListeners(),this.state.eventsEnabled=a}return he(Popper,[{key:"update",value:function(){return S.call(this)}},{key:"destroy",value:function(){return A.call(this)}},{key:"enableEventListeners",value:function(){return B.call(this)}},{key:"disableEventListeners",value:function(){return U.call(this)}}]),Popper}();return Popper.Utils=("undefined"!=typeof window?window:i).PopperUtils,Popper.placements=be,Popper.Defaults=Oe,Popper})}).call(t,function(){return this}())},function(e,t,n){/*!
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","prop-types"],t):"object"==typeof exports?exports.ReactPopper=t(require("react"),require("prop-types")):e.ReactPopper=t(e.React,e.PropTypes)}(this,function(e,t){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.Arrow=t.Popper=t.Target=t.Manager=void 0;var o=n(1),i=r(o),a=n(4),f=r(a),s=n(5),p=r(s),u=n(9),l=r(u);t.Manager=i.default,t.Target=f.default,t.Popper=p.default,t.Arrow=l.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"!=typeof t&&"function"!=typeof t?e:t}function f(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 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}}(),p=n(2),u=(r(p),n(3)),l=r(u),c=function(e){function t(){var e,n,r,o;i(this,t);for(var f=arguments.length,s=Array(f),p=0;p<f;p++)s[p]=arguments[p];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 f(t,e),s(t,[{key:"getChildContext",value:function(){return{popperManager:{setTargetNode:this._setTargetNode,getTargetNode:this._getTargetNode}}}},{key:"render",value:function(){var e=this.props,t=e.tag,n=e.children,r=o(e,["tag","children"]);return t!==!1?(0,p.createElement)(t,r,n):n}}]),t}(p.Component);c.childContextTypes={popperManager:l.default.object.isRequired},c.propTypes={tag:l.default.oneOfType([l.default.string,l.default.bool])},c.defaultProps={tag:"div"},t.default=c},function(t,n){t.exports=e},function(e,n){e.exports=t},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}Object.defineProperty(t,"__esModule",{value:!0});var i=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},a=n(2),f=(r(a),n(3)),s=r(f),p=function(e,t){var n=e.tag,r=void 0===n?"div":n,f=e.innerRef,s=e.children,p=o(e,["tag","innerRef","children"]),u=t.popperManager,l=function(e){u.setTargetNode(e),"function"==typeof f&&f(e)};if("function"==typeof s){var c={ref:l};return s({targetProps:c,restProps:p})}return(0,a.createElement)(r,i({ref:l},p),s)};p.contextTypes={popperManager:s.default.object.isRequired},p.propTypes={tag:s.default.string,innerRef:s.default.func,children:s.default.oneOfType([s.default.node,s.default.func])},t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(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 a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(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 s(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 p=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},u=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}}(),l=n(2),c=(r(l),n(3)),d=r(c),h=n(6),m=r(h),v=n(7),b=r(v),Popper=function(e){function Popper(){var e,t,n,r;a(this,Popper);for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];return t=n=f(this,(e=Popper.__proto__||Object.getPrototypeOf(Popper)).call.apply(e,[this].concat(i))),n.state={},n._setArrowNode=function(e){n._arrowNode=e},n._getTargetNode=function(){return n.context.popperManager.getTargetNode()},n._updateStateModifier={enabled:!0,order:900,fn:function(e){return(n.state.data&&!(0,b.default)(e.offsets,n.state.data.offsets)||!n.state.data)&&n.setState({data:e}),e}},n._getPopperStyle=function(){var e=n.state.data;if(!n._popper||!e)return{position:"absolute",pointerEvents:"none",opacity:0};var t=e.offsets.popper,r=t.top,o=t.left,i=t.position;return p({position:i,top:0,left:0,transform:"translate3d("+Math.round(o)+"px, "+Math.round(r)+"px, 0px)",willChange:"transform"},e.styles)},n._getPopperPlacement=function(){return n.state.data?n.state.data.placement:void 0},n._getArrowStyle=function(){if(n.state.data&&n.state.data.offsets.arrow){var e=n.state.data.offsets.arrow,t=e.top,r=e.left;return r?{left:+r}:{top:+t}}return{}},r=t,f(n,r)}return s(Popper,e),u(Popper,[{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(),e.children!==this.props.children&&this._popper.scheduleUpdate()}},{key:"componentWillUnmount",value:function(){this._destroyPopper()}},{key:"_updatePopper",value:function(){this._destroyPopper(),this._node&&this._createPopper()}},{key:"_createPopper",value:function(){var e=this.props,t=e.placement,n=e.eventsEnabled,r=p({},this.props.modifiers,{applyStyle:{enabled:!1},updateState:this._updateStateModifier});this._arrowNode&&(r.arrow={element:this._arrowNode}),this._popper=new m.default(this._getTargetNode(),this._node,{placement:t,eventsEnabled:n,modifiers:r}),this._popper.scheduleUpdate()}},{key:"_destroyPopper",value:function(){this._popper&&this._popper.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.tag,r=t.innerRef,a=(t.placement,t.eventsEnabled,t.modifiers,t.children),f=i(t,["tag","innerRef","placement","eventsEnabled","modifiers","children"]),s=function(t){e._node=t,"function"==typeof r&&r(t)},u=this._getPopperStyle(),c=this._getPopperPlacement();if("function"==typeof a){var d=o({ref:s,style:u},"data-placement",c);return a({popperProps:d,restProps:f,scheduleUpdate:this._popper&&this._popper.scheduleUpdate})}return(0,l.createElement)(n,p({},f,{ref:s,style:p({},f.style,u),"data-placement":c}),a)}}]),Popper}(l.Component);Popper.contextTypes={popperManager:d.default.object.isRequired},Popper.childContextTypes={popper:d.default.object.isRequired},Popper.propTypes={tag:d.default.string,innerRef:d.default.func,placement:d.default.oneOf(m.default.placements),eventsEnabled:d.default.bool,modifiers:d.default.object,children:d.default.oneOfType([d.default.node,d.default.func])},Popper.defaultProps={tag:"div",placement:"bottom",eventsEnabled:!0,modifiers:{}},t.default=Popper},function(e,t,n){var r,o;(function(i){"use strict";var a="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};!function(i,f){"object"===a(t)&&"undefined"!=typeof e?e.exports=f():(r=f,o="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==o&&(e.exports=o)))}(void 0,function(){function e(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 t(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},fe))}}function n(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function r(e,t){Object.keys(t).forEach(function(r){var o="";["width","height","top","right","bottom","left"].indexOf(r)!==-1&&n(t[r])&&(o="px"),e.style[r]=t[r]+o})}function o(e){var t={};return e&&"[object Function]"===t.toString.call(e)}function a(e,t){if(1!==e.nodeType)return[];var n=window.getComputedStyle(e,null);return t?n[t]:n}function f(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function s(e){if(!e||["HTML","BODY","#document"].indexOf(e.nodeName)!==-1)return window.document.body;var t=a(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/(auto|scroll)/.test(n+o+r)?e:s(f(e))}function p(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||e.firstElementChild.offsetParent===e)}function u(e){return null!==e.parentNode?u(e.parentNode):e}function l(e){var t=e&&e.offsetParent,n=t&&t.nodeName;return n&&"BODY"!==n&&"HTML"!==n?t:window.document.documentElement}function c(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return window.document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,o=n?t:e,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var a=i.commonAncestorContainer;if(e!==a&&t!==a||r.contains(o))return p(a)?a:l(a);var f=u(e);return f.host?c(f.host,t):c(e,u(t).host)}function d(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 h(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=d(t,"top"),o=d(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 m(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return+e["border"+n+"Width"].split("px")[0]+ +e["border"+r+"Width"].split("px")[0]}function v(e,t,n,r){return Math.max(t["offset"+e],n["client"+e],n["offset"+e],ce()?n["offset"+e]+r["margin"+("Height"===e?"Top":"Left")]+r["margin"+("Height"===e?"Bottom":"Right")]:0)}function b(){var e=window.document.body,t=window.document.documentElement,n=ce()&&window.getComputedStyle(t);return{height:v("Height",e,t,n),width:v("Width",e,t,n)}}function y(e){return ve({},e,{right:e.left+e.width,bottom:e.top+e.height})}function g(e){var t={};if(ce())try{t=e.getBoundingClientRect();var n=d(e,"top"),r=d(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}catch(e){}else t=e.getBoundingClientRect();var o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},i="HTML"===e.nodeName?b():{},f=i.width||e.clientWidth||o.right-o.left,s=i.height||e.clientHeight||o.bottom-o.top,p=e.offsetWidth-f,u=e.offsetHeight-s;if(p||u){var l=a(e);p-=m(l,"x"),u-=m(l,"y"),o.width-=p,o.height-=u}return y(o)}function w(e,t){var n=ce(),r="HTML"===t.nodeName,o=g(e),i=g(t),f=s(e),p=y({top:o.top-i.top,left:o.left-i.left,width:o.width,height:o.height});if(r||"BODY"===t.nodeName){var u=a(t),l=n&&r?0:+u.borderTopWidth.split("px")[0],c=n&&r?0:+u.borderLeftWidth.split("px")[0],d=n&&r?0:+u.marginTop.split("px")[0],m=n&&r?0:+u.marginLeft.split("px")[0];p.top-=l-d,p.bottom-=l-d,p.left-=c-m,p.right-=c-m,p.marginTop=d,p.marginLeft=m}return t.contains(f)&&(n||"BODY"!==f.nodeName)&&(p=h(p,t)),p}function O(e){var t=window.document.documentElement,n=w(e,t),r=Math.max(t.clientWidth,window.innerWidth||0),o=Math.max(t.clientHeight,window.innerHeight||0),i=d(t),a=d(t,"left"),f={top:i-n.top+n.marginTop,left:a-n.left+n.marginLeft,width:r,height:o};return y(f)}function x(e){var t=e.nodeName;return"BODY"!==t&&"HTML"!==t&&("fixed"===a(e,"position")||x(f(e)))}function _(e,t,n,r){var o={top:0,left:0},i=c(e,t);if("viewport"===r)o=O(i);else{var a=void 0;"scrollParent"===r?(a=s(f(e)),"BODY"===a.nodeName&&(a=window.document.documentElement)):a="window"===r?window.document.documentElement:r;var p=w(a,i);if("HTML"!==a.nodeName||x(i))o=p;else{var u=b(),l=u.height,d=u.width;o.top+=p.top-p.marginTop,o.bottom=l+p.top,o.left+=p.left-p.marginLeft,o.right=d+p.left}}return o.left+=n,o.top+=n,o.right-=n,o.bottom-=n,o}function E(e,t,n,r,o){if(e.indexOf("auto")===-1)return e;var i=_(n,r,0,o),a={top:t.top-i.top,right:i.right-t.right,bottom:i.bottom-t.bottom,left:t.left-i.left},f=Object.keys(a).sort(function(e,t){return a[t]-a[e]})[0],s=e.split("-")[1];return f+(s?"-"+s:"")}function P(e,t,n){var r=c(t,n);return w(n,r)}function T(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 M(e,t,n){n=n.split("-")[0];var r=T(e),o={width:r.width,height:r.height},i=["right","left"].indexOf(n)!==-1,a=i?"top":"left",f=i?"left":"top",s=i?"height":"width",p=i?"width":"height";return o[a]=t[a]+t[s]/2-r[s]/2,n===f?o[f]=t[f]-r[p]:o[f]=t[j(f)],o}function N(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function C(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var r=N(e,function(e){return e[t]===n});return e.indexOf(r)}function L(e,t,n){var r=void 0===n?e:e.slice(0,C(e,"name",n));return r.forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&o(n)&&(t=n(t,e))}),t}function S(){if(!this.state.isDestroyed){var e={instance:this,styles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=P(this.state,this.popper,this.reference),e.placement=E(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement),e.originalPlacement=e.placement,e.offsets.popper=M(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position="absolute",e=L(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function k(e,t){return e.some(function(e){var n=e.name,r=e.enabled;return r&&n===t})}function R(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 A(){return this.state.isDestroyed=!0,k(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[R("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function D(e,t,n,r){var o="BODY"===e.nodeName,i=o?window:e;i.addEventListener(t,n,{passive:!0}),o||D(s(i.parentNode),t,n,r),r.push(i)}function W(e,t,n,r){n.updateBound=r,window.addEventListener("resize",n.updateBound,{passive:!0});var o=s(e);return D(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function B(){this.state.eventsEnabled||(this.state=W(this.reference,this.options,this.state,this.scheduleUpdate))}function H(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 U(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=H(this.reference,this.state))}function q(e,t){Object.keys(t).forEach(function(n){var r=t[n];r!==!1?e.setAttribute(n,t[n]):e.removeAttribute(n)})}function F(e,t){var n={position:e.offsets.popper.position},o={"x-placement":e.placement},i=Math.round(e.offsets.popper.left),a=Math.round(e.offsets.popper.top),f=R("transform");return t.gpuAcceleration&&f?(n[f]="translate3d("+i+"px, "+a+"px, 0)",n.top=0,n.left=0,n.willChange="transform"):(n.left=i,n.top=a,n.willChange="top, left"),r(e.instance.popper,ve({},n,e.styles)),q(e.instance.popper,ve({},o,e.attributes)),e.offsets.arrow&&r(e.arrowElement,e.offsets.arrow),e}function I(e,t,n,r,o){var i=P(o,t,e),a=E(n.placement,i,t,e,n.modifiers.flip.boundariesElement);return t.setAttribute("x-placement",a),n}function Y(e,t,n){var r=N(e,function(e){var n=e.name;return n===t}),o=!!r&&e.some(function(e){return e.name===n&&e.enabled&&e.order<r.order});if(!o){var i="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return o}function K(e,t){if(!Y(e.instance.modifiers,"arrow","keepTogether"))return 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=y(e.offsets.popper),i=e.offsets.reference,a=["left","right"].indexOf(r)!==-1,f=a?"height":"width",s=a?"top":"left",p=a?"left":"top",u=a?"bottom":"right",l=T(n)[f];i[u]-l<o[s]&&(e.offsets.popper[s]-=o[s]-(i[u]-l)),i[s]+l>o[u]&&(e.offsets.popper[s]+=i[s]+l-o[u]);var c=i[s]+i[f]/2-l/2,d=c-y(e.offsets.popper)[s];return d=Math.max(Math.min(o[f]-l,d),0),e.arrowElement=n,e.offsets.arrow={},e.offsets.arrow[s]=d,e.offsets.arrow[p]="",e}function z(e){return"end"===e?"start":"start"===e?"end":e}function G(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=ye.indexOf(e),r=ye.slice(n+1).concat(ye.slice(0,n));return t?r.reverse():r}function V(e,t){if(k(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=_(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),r=e.placement.split("-")[0],o=j(r),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case ge.FLIP:a=[r,o];break;case ge.CLOCKWISE:a=G(r);break;case ge.COUNTERCLOCKWISE:a=G(r,!0);break;default:a=t.behavior}return a.forEach(function(f,s){if(r!==f||a.length===s+1)return e;r=e.placement.split("-")[0],o=j(r);var p=y(e.offsets.popper),u=e.offsets.reference,l=Math.floor,c="left"===r&&l(p.right)>l(u.left)||"right"===r&&l(p.left)<l(u.right)||"top"===r&&l(p.bottom)>l(u.top)||"bottom"===r&&l(p.top)<l(u.bottom),d=l(p.left)<l(n.left),h=l(p.right)>l(n.right),m=l(p.top)<l(n.top),v=l(p.bottom)>l(n.bottom),b="left"===r&&d||"right"===r&&h||"top"===r&&m||"bottom"===r&&v,g=["top","bottom"].indexOf(r)!==-1,w=!!t.flipVariations&&(g&&"start"===i&&d||g&&"end"===i&&h||!g&&"start"===i&&m||!g&&"end"===i&&v);(c||b||w)&&(e.flipped=!0,(c||b)&&(r=a[s+1]),w&&(i=z(i)),e.placement=r+(i?"-"+i:""),e.offsets.popper=ve({},e.offsets.popper,M(e.instance.popper,e.offsets.reference,e.placement)),e=L(e.instance.modifiers,e,"flip"))}),e}function X(e){var t=y(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",f=i?"left":"top",s=i?"width":"height";return t[a]<o(n[f])&&(e.offsets.popper[f]=o(n[f])-t[s]),t[f]>o(n[a])&&(e.offsets.popper[f]=o(n[a])),e}function J(e,t,n,r){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+o[1],a=o[2];if(!i)return e;if(0===a.indexOf("%")){var f=void 0;switch(a){case"%p":f=n;break;case"%":case"%r":default:f=r}var s=y(f);return s[t]/100*i}if("vh"===a||"vw"===a){var p=void 0;return p="vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0),p/100*i}return i}function Q(e,t,r,o){var i=[0,0],a=["right","left"].indexOf(o)!==-1,f=e.split(/(\+|\-)/).map(function(e){return e.trim()}),s=f.indexOf(N(f,function(e){return e.search(/,|\s/)!==-1}));f[s]&&f[s].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var p=/\s*,\s*|\s+/,u=s!==-1?[f.slice(0,s).concat([f[s].split(p)[0]]),[f[s].split(p)[1]].concat(f.slice(s+1))]:[f];return u=u.map(function(e,n){var o=(1===n?!a:a)?"height":"width",i=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&["+","-"].indexOf(t)!==-1?(e[e.length-1]=t,i=!0,e):i?(e[e.length-1]+=t,i=!1,e):e.concat(t)},[]).map(function(e){return J(e,o,t,r)})}),u.forEach(function(e,t){e.forEach(function(r,o){n(r)&&(i[t]+=r*("-"===e[o-1]?-1:1))})}),i}function Z(e,t){var r=t.offset,o=e.placement,i=e.offsets,a=i.popper,f=i.reference,s=o.split("-")[0],p=void 0;return p=n(+r)?[+r,0]:Q(r,a,f,s),"left"===s?(a.top+=p[0],a.left-=p[1]):"right"===s?(a.top+=p[0],a.left+=p[1]):"top"===s?(a.left+=p[0],a.top-=p[1]):"bottom"===s&&(a.left+=p[0],a.top+=p[1]),e.popper=a,e}function $(e,t){var n=t.boundariesElement||l(e.instance.popper),r=_(e.instance.popper,e.instance.reference,t.padding,n);t.boundaries=r;var o=t.priority,i=y(e.offsets.popper),a={primary:function(e){var n=i[e];return i[e]<r[e]&&!t.escapeWithReference&&(n=Math.max(i[e],r[e])),me({},e,n)},secondary:function(e){var n="right"===e?"left":"top",o=i[n];return i[e]>r[e]&&!t.escapeWithReference&&(o=Math.min(i[n],r[e]-("right"===e?i.width:i.height))),me({},n,o)}};return o.forEach(function(e){var t=["left","top"].indexOf(e)!==-1?"primary":"secondary";i=ve({},i,a[t](e))}),e.offsets.popper=i,e}function ee(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var o=e.offsets.reference,i=y(e.offsets.popper),a=["bottom","top"].indexOf(n)!==-1,f=a?"left":"top",s=a?"width":"height",p={start:me({},f,o[f]),end:me({},f,o[f]+o[s]-i[s])};e.offsets.popper=ve({},i,p[r])}return e}function te(e){if(!Y(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=N(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 ne(e){var t=e.placement,n=t.split("-")[0],r=y(e.offsets.popper),o=y(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=y(r),e}for(var re=["native code","[object MutationObserverConstructor]"],oe=function(e){return re.some(function(t){return(e||"").toString().indexOf(t)>-1})},ie="undefined"!=typeof window,ae=["Edge","Trident","Firefox"],fe=0,se=0;se<ae.length;se+=1)if(ie&&navigator.userAgent.indexOf(ae[se])>=0){fe=1;break}var pe=ie&&oe(window.MutationObserver),ue=pe?e:t,le=void 0,ce=function(){return void 0===le&&(le=navigator.appVersion.indexOf("MSIE 10")!==-1),le},de=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},he=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}}(),me=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ve=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},be=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],ye=be.slice(3),ge={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},we={shift:{order:100,enabled:!0,fn:ee},offset:{order:200,enabled:!0,fn:Z,offset:0},preventOverflow:{order:300,enabled:!0,fn:$,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:X},arrow:{order:500,enabled:!0,fn:K,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:V,behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:ne},hide:{order:800,enabled:!0,fn:te},applyStyle:{order:900,enabled:!0,fn:F,onLoad:I,gpuAcceleration:!0}},Oe={placement:"bottom",eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:we},Popper=function(){function Popper(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};de(this,Popper),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=ue(this.update.bind(this)),this.options=ve({},Popper.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e.jquery?e[0]:e,this.popper=t.jquery?t[0]:t,r(this.popper,{position:"absolute"}),this.modifiers=Object.keys(Popper.Defaults.modifiers).map(function(e){return ve({name:e},Popper.Defaults.modifiers[e])}),this.modifiers=this.modifiers.map(function(e){var t=i.modifiers&&i.modifiers[e.name]||{};return ve({},e,t)}),i.modifiers&&(this.options.modifiers=ve({},Popper.Defaults.modifiers,i.modifiers),Object.keys(i.modifiers).forEach(function(e){if(void 0===Popper.Defaults.modifiers[e]){var t=i.modifiers[e];t.name=e,n.modifiers.push(t)}})),this.modifiers=this.modifiers.sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&o(e.onLoad)&&e.onLoad(n.reference,n.popper,n.options,e,n.state)}),this.update();var a=this.options.eventsEnabled;a&&this.enableEventListeners(),this.state.eventsEnabled=a}return he(Popper,[{key:"update",value:function(){return S.call(this)}},{key:"destroy",value:function(){return A.call(this)}},{key:"enableEventListeners",value:function(){return B.call(this)}},{key:"disableEventListeners",value:function(){return U.call(this)}}]),Popper}();return Popper.Utils=("undefined"!=typeof window?window:i).PopperUtils,Popper.placements=be,Popper.Defaults=Oe,Popper})}).call(t,function(){return this}())},function(e,t,n){/*!
* is-equal-shallow <https://github.com/jonschlinkert/is-equal-shallow>

@@ -18,2 +18,2 @@ *

*/
"use strict";var n="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.exports=function(e){return null==e||"function"!=typeof e&&"object"!==("undefined"==typeof e?"undefined":n(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}Object.defineProperty(t,"__esModule",{value:!0});var i=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},a=n(2),f=(r(a),n(3)),s=r(f),p=function(e,t){var n=e.tag,r=void 0===n?"span":n,f=e.innerRef,s=e.children,p=o(e,["tag","innerRef","children"]),u=t.popper,l=function(e){return u.setArrowNode(e)},c=u.getArrowStyle();if("function"==typeof s){var d={ref:l,style:c};return s({arrowProps:d,restProps:p})}return(0,a.createElement)(r,i({},p,{ref:function(e){l(e),"function"==typeof f&&f(e)},style:i({},c,p.style)}),s)};p.contextTypes={popper:s.default.object.isRequired},p.propTypes={tag:s.default.string,innerRef:s.default.func,children:s.default.oneOfType([s.default.node,s.default.func])},t.default=p}])});
"use strict";var n="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.exports=function(e){return null==e||"function"!=typeof e&&"object"!==("undefined"==typeof e?"undefined":n(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}Object.defineProperty(t,"__esModule",{value:!0});var i=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},a=n(2),f=(r(a),n(3)),s=r(f),p=function(e,t){var n=e.tag,r=void 0===n?"span":n,f=e.innerRef,s=e.children,p=o(e,["tag","innerRef","children"]),u=t.popper,l=function(e){u.setArrowNode(e),"function"==typeof f&&f(e)},c=u.getArrowStyle();if("function"==typeof s){var d={ref:l,style:c};return s({arrowProps:d,restProps:p})}return(0,a.createElement)(r,i({},p,{ref:l,style:i({},c,p.style)}),s)};p.contextTypes={popper:s.default.object.isRequired},p.propTypes={tag:s.default.string,innerRef:s.default.func,children:s.default.oneOfType([s.default.node,s.default.func])},t.default=p}])});

@@ -31,3 +31,6 @@ 'use strict';

var arrowRef = function arrowRef(node) {
return popper.setArrowNode(node);
popper.setArrowNode(node);
if (typeof innerRef === 'function') {
innerRef(node);
}
};

@@ -45,8 +48,3 @@ var arrowStyle = popper.getArrowStyle();

return (0, _react.createElement)(tag, _extends({}, restProps, {
ref: function ref(node) {
arrowRef(node);
if (typeof innerRef === 'function') {
innerRef(node);
}
},
ref: arrowRef,
style: _extends({}, arrowStyle, restProps.style)

@@ -53,0 +51,0 @@ }), children);

@@ -31,3 +31,6 @@ 'use strict';

var targetRef = function targetRef(node) {
return popperManager.setTargetNode(node);
popperManager.setTargetNode(node);
if (typeof innerRef === 'function') {
innerRef(node);
}
};

@@ -41,8 +44,3 @@

return (0, _react.createElement)(tag, _extends({
ref: function ref(node) {
targetRef(node);
if (typeof innerRef === 'function') {
innerRef(node);
}
}
ref: targetRef
}, restProps), children);

@@ -49,0 +47,0 @@ };

{
"name": "react-popper",
"version": "0.6.4",
"version": "0.6.5",
"description": "React wrapper around PopperJS.",

@@ -5,0 +5,0 @@ "main": "lib/react-popper.js",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc