Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-sizeme

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-sizeme - npm Package Compare versions

Comparing version 2.3.1 to 2.3.2

26

commonjs/sizeMe.js

@@ -15,2 +15,6 @@ 'use strict';

var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _reactDom = require('react-dom');

@@ -86,3 +90,3 @@

ReferenceWrapper.propTypes = { children: _react.PropTypes.element.isRequired };
ReferenceWrapper.propTypes = { children: _propTypes2.default.element.isRequired };

@@ -113,4 +117,4 @@ function Placeholder(_ref) {

Placeholder.propTypes = {
className: _react.PropTypes.string,
style: _react.PropTypes.object
className: _propTypes2.default.string,
style: _propTypes2.default.object
};

@@ -160,9 +164,9 @@

SizeMeRenderer.propTypes = {
explicitRef: _react.PropTypes.func.isRequired,
className: _react.PropTypes.string,
style: _react.PropTypes.object, // eslint-disable-line react/forbid-prop-types
size: _react.PropTypes.shape({
width: _react.PropTypes.number, // eslint-disable-line react/no-unused-prop-types
height: _react.PropTypes.number }),
disablePlaceholder: _react.PropTypes.bool
explicitRef: _propTypes2.default.func.isRequired,
className: _propTypes2.default.string,
style: _propTypes2.default.object, // eslint-disable-line react/forbid-prop-types
size: _propTypes2.default.shape({
width: _propTypes2.default.number, // eslint-disable-line react/no-unused-prop-types
height: _propTypes2.default.number }),
disablePlaceholder: _propTypes2.default.bool
};

@@ -349,3 +353,3 @@

SizeAwareComponent.propTypes = {
onSize: _react.PropTypes.func
onSize: _propTypes2.default.func
};

@@ -352,0 +356,0 @@

{
"name": "react-sizeme",
"version": "2.3.1",
"version": "2.3.2",
"description": "Make your React Components aware of their dimensions and position.",

@@ -18,14 +18,6 @@ "license": "MIT",

"keywords": [
"react",
"component",
"element-queries",
"element-query",
"size",
"dimensions"
"library"
],
"homepage": "https://github.com/ctrlplusb/react-sizeme#readme",
"author": "Sean Matheson <sean@ctrlplusb.com>",
"keywords": [
"library"
],
"scripts": {

@@ -58,3 +50,3 @@ "build": "babel-node ./tools/scripts/build.js",

"dependencies": {
"element-resize-detector": "^1.1.11",
"element-resize-detector": "^1.1.12",
"invariant": "^2.2.2",

@@ -64,2 +56,3 @@ "lodash": "^4.17.4"

"peerDependencies": {
"prop-types": "^15.0.0-0",
"react": "^0.14.0 || ^15.0.0-0",

@@ -70,21 +63,21 @@ "react-dom": "^0.14.0 || ^15.0.0-0"

"app-root-dir": "1.0.2",
"babel-cli": "6.24.0",
"babel-core": "6.24.0",
"babel-eslint": "7.2.1",
"babel-jest": "19.0.0",
"babel-loader": "6.4.1",
"babel-cli": "6.24.1",
"babel-core": "6.24.1",
"babel-eslint": "7.2.3",
"babel-jest": "20.0.0",
"babel-loader": "7.0.0",
"babel-plugin-lodash": "3.2.11",
"babel-plugin-rewire": "1.0.0",
"babel-plugin-transform-class-properties": "6.23.0",
"babel-plugin-rewire": "1.1.0",
"babel-plugin-transform-class-properties": "6.24.1",
"babel-polyfill": "6.23.0",
"babel-preset-env": "1.2.2",
"babel-preset-latest": "6.24.0",
"babel-preset-react": "6.23.0",
"babel-preset-stage-3": "6.22.0",
"babel-register": "6.24.0",
"codecov": "2.1.0",
"cross-env": "3.2.4",
"enzyme": "2.8.0",
"enzyme-to-json": "1.5.0",
"eslint": "3.18.0",
"babel-preset-env": "1.4.0",
"babel-preset-latest": "6.24.1",
"babel-preset-react": "6.24.1",
"babel-preset-stage-3": "6.24.1",
"babel-register": "6.24.1",
"codecov": "2.2.0",
"cross-env": "4.0.0",
"enzyme": "2.8.2",
"enzyme-to-json": "1.5.1",
"eslint": "3.19.0",
"eslint-config-airbnb": "14.1.0",

@@ -97,20 +90,22 @@ "eslint-plugin-import": "2.2.0",

"in-publish": "2.0.0",
"jest": "19.0.2",
"lint-staged": "3.4.0",
"lodash-webpack-plugin": "0.11.2",
"prettier": "0.22.0",
"prettier-eslint": "4.3.2",
"prettier-eslint-cli": "3.1.3",
"jest": "20.0.0",
"lint-staged": "3.4.1",
"lodash-webpack-plugin": "0.11.3",
"prettier": "1.3.1",
"prettier-eslint": "6.2.1",
"prettier-eslint-cli": "3.4.3",
"pretty-bytes": "4.0.2",
"prop-types": "15.5.9",
"ramda": "0.23.0",
"react": "15.4.2",
"react-addons-test-utils": "15.4.2",
"react-dom": "15.4.2",
"react": "15.5.4",
"react-addons-test-utils": "15.5.1",
"react-dom": "15.5.4",
"react-test-renderer": "15.5.4",
"readline-sync": "1.4.7",
"rimraf": "2.6.1",
"sinon": "2.1.0",
"webpack": "2.3.2",
"webpack-dev-middleware": "1.10.1",
"webpack-hot-middleware": "2.17.1"
"sinon": "2.2.0",
"webpack": "2.5.1",
"webpack-dev-middleware": "1.10.2",
"webpack-hot-middleware": "2.18.0"
}
}

@@ -158,3 +158,4 @@ <p align='center'>

```javascript
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import LargeChildComponent from './LargeChildComponent';

@@ -161,0 +162,0 @@ import SmallChildComponent from './SmallChildComponent';

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.ReactSizeMe=t(require("react"),require("react-dom")):e.ReactSizeMe=t(e.React,e.ReactDOM)}(this,function(e,t){return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=7)}([function(e,t){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=n},function(e,t,n){"use strict";var i=e.exports={};i.isIE=function(e){return!!function(){var e=navigator.userAgent.toLowerCase();return e.indexOf("msie")!==-1||e.indexOf("trident")!==-1||e.indexOf(" edge/")!==-1}()&&(!e||e===function(){var e=3,t=document.createElement("div"),n=t.getElementsByTagName("i");do{t.innerHTML="<!--[if gt IE "+ ++e+"]><i></i><![endif]-->"}while(n[0]);return e>4?e:void 0}())},i.isLegacyOpera=function(){return!!window.opera}},function(e,t,n){"use strict";(e.exports={}).forEach=function(e,t){for(var n=0;n<e.length;n++){var i=t(e[n]);if(i)return i}}},function(e,t,n){var i=n(4),o=i.Symbol;e.exports=o},function(e,t,n){var i=n(22),o="object"==typeof self&&self&&self.Object===Object&&self,r=i||o||Function("return this")();e.exports=r},function(e,t,n){function i(e,t,n){function i(t){var n=y,i=b;return y=b=void 0,z=t,x=e.apply(i,n)}function u(e){return z=e,S=setTimeout(h,t),O?i(e):x}function d(e){var n=e-E,i=e-z,o=t-n;return k?c(o,w-i):o}function f(e){var n=e-E,i=e-z;return void 0===E||n>=t||n<0||k&&i>=w}function h(){var e=r();if(f(e))return p(e);S=setTimeout(h,d(e))}function p(e){return S=void 0,T&&y?i(e):(y=b=void 0,x)}function v(){void 0!==S&&clearTimeout(S),z=0,y=E=b=S=void 0}function g(){return void 0===S?x:p(r())}function m(){var e=r(),n=f(e);if(y=arguments,b=this,E=e,n){if(void 0===S)return u(E);if(k)return S=setTimeout(h,t),i(E)}return void 0===S&&(S=setTimeout(h,t)),x}var y,b,w,x,S,E,z=0,O=!1,k=!1,T=!0;if("function"!=typeof e)throw new TypeError(l);return t=a(t)||0,o(n)&&(O=!!n.leading,k="maxWait"in n,w=k?s(a(n.maxWait)||0,t):w,T="trailing"in n?!!n.trailing:T),m.cancel=v,m.flush=g,m}var o=n(0),r=n(27),a=n(29),l="Expected a function",s=Math.max,c=Math.min;e.exports=i},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}function r(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 l(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)}function s(e){return e.displayName||e.name||"Component"}function c(e){var t=e.className,n=e.style,i={};return t||n?(t&&(i.className=t),n&&(i.style=n)):i.style={width:"100%",height:"100%"},p.default.createElement("div",i)}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,t=e.monitorWidth,n=void 0===t?O.monitorWidth:t,i=e.monitorHeight,o=void 0===i?O.monitorHeight:i,c=e.monitorPosition,v=void 0===c?O.monitorPosition:c,m=e.refreshRate,b=void 0===m?O.refreshRate:m,x=e.refreshMode,E=void 0===x?O.refreshMode:x,k=e.noPlaceholder,j=void 0===k?O.noPlaceholder:k;(0,y.default)(n||o||v,'You have to monitor at least one of the width, height, or position when using "sizeMe"'),(0,y.default)(b>=16,"It is highly recommended that you don't put your refreshRate lower than 16 as this may cause layout thrashing."),(0,y.default)("throttle"===E||"debounce"===E,'The refreshMode should have a value of "throttle" or "debounce"');var P="throttle"===E?w.default:S.default;return function(e){var t=T(e),i=function(e){function i(){var e,t,l,s;r(this,i);for(var c=arguments.length,u=Array(c),d=0;d<c;d++)u[d]=arguments[d];return t=l=a(this,(e=i.__proto__||Object.getPrototypeOf(i)).call.apply(e,[this].concat(u))),l.state={width:void 0,height:void 0,position:void 0},l.determineStrategy=function(e){l.strategy=e.onSize?"callback":"render"},l.strategisedSetState=function(e){"callback"===l.strategy?(l.callbackState=e,l.props.onSize(e)):l.setState(e)},l.strategisedGetState=function(){return"callback"===l.strategy?l.callbackState:l.state},l.refCallback=function(e){l.element=e},l.hasSizeChanged=function(e,t){var i=e,r=t,a=i.position||{},l=r.position||{};return o&&i.height!==r.height||v&&(a.top!==l.top||a.left!==l.left||a.bottom!==l.bottom||a.right!==l.right)||n&&i.width!==r.width},l.checkIfSizeChanged=P(function(e){var t=e.getBoundingClientRect(),i=t.width,r=t.height,a=t.right,s=t.left,c=t.top,u=t.bottom,d={width:n?i:null,height:o?r:null,position:v?{right:a,left:s,top:c,bottom:u}:null};l.hasSizeChanged(l.state,d)&&l.strategisedSetState(d)},b),s=t,a(l,s)}return l(i,e),f(i,[{key:"componentDidMount",value:function(){this.determineStrategy(this.props),this.handleDOMNode()}},{key:"componentWillReceiveProps",value:function(e){this.determineStrategy(e)}},{key:"componentDidUpdate",value:function(){this.handleDOMNode()}},{key:"componentWillUnmount",value:function(){this.hasSizeChanged=function(){},this.checkIfSizeChanged=function(){},this.domEl&&((0,z.default)().removeAllListeners(this.domEl),this.domEl=null)}},{key:"handleDOMNode",value:function(){var e=this.element&&g.default.findDOMNode(this.element);if(!e)return void(this.domEl&&((0,z.default)().removeAllListeners(this.domEl),this.domEl=null));this.domEl&&(0,z.default)().removeAllListeners(this.domEl),this.domEl=e,(0,z.default)().listenTo(this.domEl,this.checkIfSizeChanged)}},{key:"render",value:function(){var e=u.enableSSRBehaviour||u.noPlaceholders||j||"callback"===this.strategy;return p.default.createElement(t,d({explicitRef:this.refCallback,size:"callback"===this.strategy?null:this.state,disablePlaceholder:e},this.props))}}]),i}(p.default.Component);return i.displayName="SizeMe("+s(e)+")",i.propTypes={onSize:h.PropTypes.func},i.WrappedComponent=e,i}}Object.defineProperty(t,"__esModule",{value:!0});var d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),h=n(31),p=i(h),v=n(32),g=i(v),m=n(20),y=i(m),b=n(28),w=i(b),x=n(5),S=i(x),E=n(8),z=i(E),O={monitorWidth:!0,monitorHeight:!1,monitorPosition:!1,refreshRate:16,refreshMode:"throttle",noPlaceholder:!1},k=function(e){function t(){return r(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),f(t,[{key:"render",value:function(){return h.Children.only(this.props.children)}}]),t}(h.Component);k.displayName="SizeMeReferenceWrapper",k.propTypes={children:h.PropTypes.element.isRequired},c.displayName="SizeMePlaceholder",c.propTypes={className:h.PropTypes.string,style:h.PropTypes.object};var T=function(e){function t(t){var n=t.explicitRef,i=t.className,r=t.style,a=t.size,l=t.disablePlaceholder,s=(t.onSize,o(t,["explicitRef","className","style","size","disablePlaceholder","onSize"])),u=null==a||null==a.width&&null==a.height&&null==a.position,f=u&&!l,h={className:i,style:r};null!=a&&(h.size=a);var v=f?p.default.createElement(c,{className:i,style:r}):p.default.createElement(e,d({},h,s));return p.default.createElement(k,{ref:n},v)}return t.displayName="SizeMeRenderer("+s(e)+")",t.propTypes={explicitRef:h.PropTypes.func.isRequired,className:h.PropTypes.string,style:h.PropTypes.object,size:h.PropTypes.shape({width:h.PropTypes.number,height:h.PropTypes.number}),disablePlaceholder:h.PropTypes.bool},t};u.enableSSRBehaviour=!1,u.noPlaceholders=!1,t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sizeMe=void 0;var i=n(6),o=function(e){return e&&e.__esModule?e:{default:e}}(i);t.sizeMe=o.default,t.default=o.default},function(e,t,n){"use strict";function i(){return a||(a=(0,r.default)({strategy:"scroll"})),a}Object.defineProperty(t,"__esModule",{value:!0});var o=n(13),r=function(e){return e&&e.__esModule?e:{default:e}}(o),a=void 0;t.default=i},function(e,t,n){"use strict";function i(){function e(e,t){t||(t=e,e=0),e>r?r=e:e<a&&(a=e),i[e]||(i[e]=[]),i[e].push(t),o++}function t(){for(var e=a;e<=r;e++)for(var t=i[e],n=0;n<t.length;n++){var o=t[n];o()}}function n(){return o}var i={},o=0,r=0,a=0;return{add:e,process:t,size:n}}var o=n(10);e.exports=function(e){function t(e,t){!p&&d&&u&&0===h.size()&&a(),h.add(e,t)}function n(){for(p=!0;h.size();){var e=h;h=i(),e.process()}p=!1}function r(e){p||(void 0===e&&(e=u),f&&(l(f),f=null),e?a():n())}function a(){f=s(n)}function l(e){return clearTimeout(e)}function s(e){return function(e){return setTimeout(e,0)}(e)}e=e||{};var c=e.reporter,u=o.getOption(e,"async",!0),d=o.getOption(e,"auto",!0);d&&!u&&(c&&c.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),u=!0);var f,h=i(),p=!1;return{add:t,force:r}}},function(e,t,n){"use strict";function i(e,t,n){var i=e[t];return void 0!==i&&null!==i||void 0===n?i:n}(e.exports={}).getOption=i},function(e,t,n){"use strict";var i=n(1);e.exports=function(e){function t(e,t){function n(){t(e)}if(!o(e))throw new Error("Element is not detectable by this strategy.");if(i.isIE(8))s(e).object={proxy:n},e.attachEvent("onresize",n);else{o(e).contentDocument.defaultView.addEventListener("resize",n)}}function n(e,t,n){n||(n=t,t=e,e=null),e=e||{};e.debug;i.isIE(8)?n(t):function(e,t){function n(){function n(){if("static"===c.position){e.style.position="relative";var t=function(e,t,n,i){var o=n[i];"auto"!==o&&"0"!==function(e){return e.replace(/[^-\d\.]/g,"")}(o)&&(e.warn("An element that is positioned static has style."+i+"="+o+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+i+" will be set to 0. Element: ",t),t.style[i]=0)};t(a,e,c,"top"),t(a,e,c,"right"),t(a,e,c,"bottom"),t(a,e,c,"left")}}function l(){function i(e,t){if(!e.contentDocument)return void setTimeout(function(){i(e,t)},100);t(e.contentDocument)}r||n(),i(this,function(n){t(e)})}""!==c.position&&(n(c),r=!0);var u=document.createElement("object");u.style.cssText=o,u.tabIndex=-1,u.type="text/html",u.onload=l,i.isIE()||(u.data="about:blank"),e.appendChild(u),s(e).object=u,i.isIE()&&(u.data="about:blank")}var o="display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; padding: 0; margin: 0; opacity: 0; z-index: -1000; pointer-events: none;",r=!1,c=window.getComputedStyle(e),u=e.offsetWidth,d=e.offsetHeight;s(e).startSize={width:u,height:d},l?l.add(n):n()}(t,n)}function o(e){return s(e).object}function r(e){i.isIE(8)?e.detachEvent("onresize",s(e).object.proxy):e.removeChild(o(e)),delete s(e).object}e=e||{};var a=e.reporter,l=e.batchProcessor,s=e.stateHandler.getState;if(!a)throw new Error("Missing required dependency: reporter.");return{makeDetectable:n,addListener:t,uninstall:r}}},function(e,t,n){"use strict";var i=n(2).forEach;e.exports=function(e){function t(e){e.className+=" "+v+"_animation_active"}function n(e,t,n){if(e.addEventListener)e.addEventListener(t,n);else{if(!e.attachEvent)return u.error("[scroll] Don't know how to add event listeners.");e.attachEvent("on"+t,n)}}function o(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n);else{if(!e.detachEvent)return u.error("[scroll] Don't know how to remove event listeners.");e.detachEvent("on"+t,n)}}function r(e){return f(e).container.childNodes[0].childNodes[0].childNodes[0]}function a(e){return f(e).container.childNodes[0].childNodes[0].childNodes[1]}function l(e,t){if(!f(e).listeners.push)throw new Error("Cannot add listener to an element that is not detectable.");f(e).listeners.push(t)}function s(e,o,l){function s(){if(e.debug){var t=Array.prototype.slice.call(arguments);if(t.unshift(h.get(o),"Scroll: "),u.log.apply)u.log.apply(null,t);else for(var n=0;n<t.length;n++)u.log(t[n])}}function c(e){var t=f(e).container.childNodes[0];return getComputedStyle(t).width.indexOf("px")===-1}function g(){var e=getComputedStyle(o),t={};return t.position=e.position,t.width=o.offsetWidth,t.height=o.offsetHeight,t.top=e.top,t.right=e.right,t.bottom=e.bottom,t.left=e.left,t.widthCSS=e.width,t.heightCSS=e.height,t}function m(){var e=g();f(o).startSize={width:e.width,height:e.height},s("Element start size",f(o).startSize)}function y(){f(o).listeners=[]}function b(){if(s("storeStyle invoked."),!f(o))return void s("Aborting because element has been uninstalled");var e=g();f(o).style=e}function w(e,t,n){f(e).lastWidth=t,f(e).lastHeight=n}function x(e){return r(e).childNodes[0]}function S(){return 2*p.width+1}function E(){return 2*p.height+1}function z(e){return e+10+S()}function O(e){return e+10+E()}function k(e){return 2*e+S()}function T(e){return 2*e+E()}function j(e,t,n){var i=r(e),o=a(e),l=z(t),s=O(n),c=k(t),u=T(n);i.scrollLeft=l,i.scrollTop=s,o.scrollLeft=c,o.scrollTop=u}function P(){var e=f(o).container;if(!e){e=document.createElement("div"),e.className=v,e.style.cssText="visibility: hidden; display: inline; width: 0px; height: 0px; z-index: -1; overflow: hidden; margin: 0; padding: 0;",f(o).container=e,t(e),o.appendChild(e);var i=function(){f(o).onRendered&&f(o).onRendered()};n(e,"animationstart",i),f(o).onAnimationStart=i}return e}function M(){function e(){f(o).onExpand&&f(o).onExpand()}function t(){f(o).onShrink&&f(o).onShrink()}if(s("Injecting elements"),!f(o))return void s("Aborting because element has been uninstalled");!function(){var e=f(o).style;if("static"===e.position){o.style.position="relative";var t=function(e,t,n,i){var o=n[i];"auto"!==o&&"0"!==function(e){return e.replace(/[^-\d\.]/g,"")}(o)&&(e.warn("An element that is positioned static has style."+i+"="+o+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+i+" will be set to 0. Element: ",t),t.style[i]=0)};t(u,o,e,"top"),t(u,o,e,"right"),t(u,o,e,"bottom"),t(u,o,e,"left")}}();var i=f(o).container;i||(i=P());var r=p.width,a=p.height,l="position: absolute; flex: none; overflow: hidden; z-index: -1; visibility: hidden; "+function(e,t,n,i){return e=e?e+"px":"0",t=t?t+"px":"0",n=n?n+"px":"0",i=i?i+"px":"0","left: "+e+"; top: "+t+"; right: "+i+"; bottom: "+n+";"}(-(1+r),-(1+a),-a,-r),c=document.createElement("div"),d=document.createElement("div"),h=document.createElement("div"),g=document.createElement("div"),m=document.createElement("div"),y=document.createElement("div");c.dir="ltr",c.style.cssText="position: absolute; flex: none; overflow: hidden; z-index: -1; visibility: hidden; width: 100%; height: 100%; left: 0px; top: 0px;",c.className=v,d.className=v,d.style.cssText=l,h.style.cssText="position: absolute; flex: none; overflow: scroll; z-index: -1; visibility: hidden; width: 100%; height: 100%;",g.style.cssText="position: absolute; left: 0; top: 0;",m.style.cssText="position: absolute; flex: none; overflow: scroll; z-index: -1; visibility: hidden; width: 100%; height: 100%;",y.style.cssText="position: absolute; width: 200%; height: 200%;",h.appendChild(g),m.appendChild(y),d.appendChild(h),d.appendChild(m),c.appendChild(d),i.appendChild(c),n(h,"scroll",e),n(m,"scroll",t),f(o).onExpandScroll=e,f(o).onShrinkScroll=t}function N(){function t(e,t,n){var i=x(e),o=z(t),r=O(n);i.style.width=o+"px",i.style.height=r+"px"}function n(n){var i=o.offsetWidth,r=o.offsetHeight;s("Storing current size",i,r),w(o,i,r),d.add(0,function(){if(!f(o))return void s("Aborting because element has been uninstalled");if(!l())return void s("Aborting because element container has not been initialized");if(e.debug){var n=o.offsetWidth,a=o.offsetHeight;n===i&&a===r||u.warn(h.get(o),"Scroll: Size changed before updating detector elements.")}t(o,i,r)}),d.add(1,function(){return f(o)?l()?void j(o,i,r):void s("Aborting because element container has not been initialized"):void s("Aborting because element has been uninstalled")}),n&&d.add(2,function(){return f(o)?l()?void n():void s("Aborting because element container has not been initialized"):void s("Aborting because element has been uninstalled")})}function l(){return!!f(o).container}function p(){s("notifyListenersIfNeeded invoked");var e=f(o);return function(){return void 0===f(o).lastNotifiedWidth}()&&e.lastWidth===e.startSize.width&&e.lastHeight===e.startSize.height?s("Not notifying: Size is the same as the start size, and there has been no notification yet."):e.lastWidth===e.lastNotifiedWidth&&e.lastHeight===e.lastNotifiedHeight?s("Not notifying: Size already notified"):(s("Current size not notified, notifying..."),e.lastNotifiedWidth=e.lastWidth,e.lastNotifiedHeight=e.lastHeight,void i(f(o).listeners,function(e){e(o)}))}function v(){if(s("startanimation triggered."),c(o))return void s("Ignoring since element is still unrendered...");s("Element rendered.");var e=r(o),t=a(o);0!==e.scrollLeft&&0!==e.scrollTop&&0!==t.scrollLeft&&0!==t.scrollTop||(s("Scrollbars out of sync. Updating detector elements..."),n(p))}function g(){if(s("Scroll detected."),c(o))return void s("Scroll event fired while unrendered. Ignoring...");var e=o.offsetWidth,t=o.offsetHeight;e!==o.lastWidth||t!==o.lastHeight?(s("Element size changed."),n(p)):s("Element size has not changed ("+e+"x"+t+").")}if(s("registerListenersAndPositionElements invoked."),!f(o))return void s("Aborting because element has been uninstalled");f(o).onRendered=v,f(o).onExpand=g,f(o).onShrink=g;var m=f(o).style;t(o,m.width,m.height)}function A(){if(s("finalizeDomMutation invoked."),!f(o))return void s("Aborting because element has been uninstalled");var e=f(o).style;w(o,e.width,e.height),j(o,e.width,e.height)}function C(){l(o)}function _(){s("Installing..."),y(),m(),d.add(0,b),d.add(1,M),d.add(2,N),d.add(3,A),d.add(4,C)}l||(l=o,o=e,e=null),e=e||{},s("Making detectable..."),!function(e){return!function(e){return e===e.ownerDocument.body||e.ownerDocument.body.contains(e)}(e)}(o)?_():(s("Element is detached"),P(),s("Waiting until element is attached..."),f(o).onRendered=function(){s("Element is now attached"),_()})}function c(e){var t=f(e);t&&(t.onExpandScroll&&o(r(e),"scroll",t.onExpandScroll),t.onShrinkScroll&&o(a(e),"scroll",t.onShrinkScroll),t.onAnimationStart&&o(t.container,"animationstart",t.onAnimationStart),t.container&&e.removeChild(t.container))}e=e||{};var u=e.reporter,d=e.batchProcessor,f=e.stateHandler.getState,h=(e.stateHandler.hasState,e.idHandler);if(!d)throw new Error("Missing required dependency: batchProcessor");if(!u)throw new Error("Missing required dependency: reporter.");var p=function(){var e=document.createElement("div");e.style.cssText="position: absolute; width: 1000px; height: 1000px; visibility: hidden; margin: 0; padding: 0;";var t=document.createElement("div");t.style.cssText="position: absolute; width: 500px; height: 500px; overflow: scroll; visibility: none; top: -1500px; left: -1500px; visibility: hidden; margin: 0; padding: 0;",t.appendChild(e),document.body.insertBefore(t,document.body.firstChild);var n=500-t.clientWidth,i=500-t.clientHeight;return document.body.removeChild(t),{width:n,height:i}}(),v="erd_scroll_detection_container";return function(e,t){if(!document.getElementById(e)){var n=t+"_animation",i=t+"_animation_active",o="/* Created by the element-resize-detector library. */\n";o+="."+t+" > div::-webkit-scrollbar { display: none; }\n\n",o+="."+i+" { -webkit-animation-duration: 0.1s; animation-duration: 0.1s; -webkit-animation-name: "+n+"; animation-name: "+n+"; }\n",o+="@-webkit-keyframes "+n+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n",o+="@keyframes "+n+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }",function(t,n){n=n||function(e){document.head.appendChild(e)};var i=document.createElement("style");i.innerHTML=t,i.id=e,n(i)}(o)}}("erd_scroll_detection_scrollbar_style",v),{makeDetectable:s,addListener:l,uninstall:c}}},function(e,t,n){"use strict";function i(e){return Array.isArray(e)||void 0!==e.length}function o(e){if(Array.isArray(e))return e;var t=[];return l(e,function(e){t.push(e)}),t}function r(e){return e&&1===e.nodeType}function a(e,t,n){var i=e[t];return void 0!==i&&null!==i||void 0===n?i:n}var l=n(2).forEach,s=n(14),c=n(17),u=n(15),d=n(16),f=n(18),h=n(1),p=n(9),v=n(19),g=n(11),m=n(12);e.exports=function(e){function t(e,t,n){function s(e){var t=O.get(e);l(t,function(t){t(e)})}function c(e,t,n){O.add(t,n),e&&n(t)}if(n||(n=t,t=e,e={}),!t)throw new Error("At least one element required.");if(!n)throw new Error("Listener required.");if(r(t))t=[t];else{if(!i(t))return x.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");t=o(t)}var u=0,d=a(e,"callOnAdd",E.callOnAdd),f=a(e,"onReady",function(){}),h=a(e,"debug",E.debug);l(t,function(e){v.getState(e)||(v.initState(e),y.set(e));var i=y.get(e);if(h&&x.log("Attaching listener to element",i,e),!k.isDetectable(e))return h&&x.log(i,"Not detectable."),k.isBusy(e)?(h&&x.log(i,"System busy making it detectable"),c(d,e,n),P[i]=P[i]||[],void P[i].push(function(){++u===t.length&&f()})):(h&&x.log(i,"Making detectable..."),k.markBusy(e,!0),z.makeDetectable({debug:h},e,function(e){if(h&&x.log(i,"onElementDetectable"),v.getState(e)){k.markAsDetectable(e),k.markBusy(e,!1),z.addListener(e,s),c(d,e,n);var o=v.getState(e);if(o&&o.startSize){var r=e.offsetWidth,a=e.offsetHeight;o.startSize.width===r&&o.startSize.height===a||s(e)}P[i]&&l(P[i],function(e){e()})}else h&&x.log(i,"Element uninstalled before being detectable.");delete P[i],++u===t.length&&f()}));h&&x.log(i,"Already detecable, adding listener."),c(d,e,n),u++}),u===t.length&&f()}function n(e){if(!e)return x.error("At least one element is required.");if(r(e))e=[e];else{if(!i(e))return x.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");e=o(e)}l(e,function(e){O.removeAllListeners(e),z.uninstall(e),v.cleanState(e)})}e=e||{};var y;if(e.idHandler)y={get:function(t){return e.idHandler.get(t,!0)},set:e.idHandler.set};else{var b=u(),w=d({idGenerator:b,stateHandler:v});y=w}var x=e.reporter;if(!x){x=f(x===!1)}var S=a(e,"batchProcessor",p({reporter:x})),E={};E.callOnAdd=!!a(e,"callOnAdd",!0),E.debug=!!a(e,"debug",!1);var z,O=c(y),k=s({stateHandler:v}),T=a(e,"strategy","object"),j={reporter:x,batchProcessor:S,stateHandler:v,idHandler:y};if("scroll"===T&&(h.isLegacyOpera()?(x.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),T="object"):h.isIE(9)&&(x.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),T="object")),"scroll"===T)z=m(j);else{if("object"!==T)throw new Error("Invalid strategy name: "+T);z=g(j)}var P={};return{listenTo:t,removeListener:O.removeListener,removeAllListeners:O.removeAllListeners,uninstall:n}}},function(e,t,n){"use strict";e.exports=function(e){function t(e){var t=r(e);return t&&!!t.isDetectable}function n(e){r(e).isDetectable=!0}function i(e){return!!r(e).busy}function o(e,t){r(e).busy=!!t}var r=e.stateHandler.getState;return{isDetectable:t,markAsDetectable:n,isBusy:i,markBusy:o}}},function(e,t,n){"use strict";e.exports=function(){function e(){return t++}var t=1;return{generate:e}}},function(e,t,n){"use strict";e.exports=function(e){function t(e){var t=o(e);return t&&void 0!==t.id?t.id:null}function n(e){var t=o(e);if(!t)throw new Error("setId required the element to have a resize detection state.");var n=i.generate();return t.id=n,n}var i=e.idGenerator,o=e.stateHandler.getState;return{get:t,set:n}}},function(e,t,n){"use strict";e.exports=function(e){function t(t){var n=e.get(t);return void 0===n?[]:r[n]||[]}function n(t,n){var i=e.get(t);r[i]||(r[i]=[]),r[i].push(n)}function i(e,n){for(var i=t(e),o=0,r=i.length;o<r;++o)if(i[o]===n){i.splice(o,1);break}}function o(e){var n=t(e);n&&(n.length=0)}var r={};return{get:t,add:n,removeListener:i,removeAllListeners:o}}},function(e,t,n){"use strict";e.exports=function(e){function t(){}var n={log:t,warn:t,error:t};if(!e&&window.console){var i=function(e,t){e[t]=function(){var e=console[t];if(e.apply)e.apply(console,arguments);else for(var n=0;n<arguments.length;n++)e(arguments[n])}};i(n,"log"),i(n,"warn"),i(n,"error")}return n}},function(e,t,n){"use strict";function i(e){return e[a]={},o(e)}function o(e){return e[a]}function r(e){delete e[a]}var a="_erd";e.exports={initState:i,getState:o,cleanState:r}},function(e,t,n){"use strict";var i=function(e,t,n,i,o,r,a,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,i,o,r,a,l],u=0;s=new Error(t.replace(/%s/g,function(){return c[u++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}};e.exports=i},function(e,t,n){function i(e){return null==e?void 0===e?s:l:c&&c in Object(e)?r(e):a(e)}var o=n(3),r=n(23),a=n(24),l="[object Null]",s="[object Undefined]",c=o?o.toStringTag:void 0;e.exports=i},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(t,n(30))},function(e,t,n){function i(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0}catch(e){}var i=l.call(e);return t?e[s]=n:delete e[s],i}var o=n(3),r=Object.prototype,a=r.hasOwnProperty,l=r.toString,s=o?o.toStringTag:void 0;e.exports=i},function(e,t){function n(e){return o.call(e)}var i=Object.prototype,o=i.toString;e.exports=n},function(e,t){function n(e){return null!=e&&"object"==typeof e}e.exports=n},function(e,t,n){function i(e){return"symbol"==typeof e||r(e)&&o(e)==a}var o=n(21),r=n(25),a="[object Symbol]";e.exports=i},function(e,t,n){var i=n(4),o=function(){return i.Date.now()};e.exports=o},function(e,t,n){function i(e,t,n){var i=!0,l=!0;if("function"!=typeof e)throw new TypeError(a);return r(n)&&(i="leading"in n?!!n.leading:i,l="trailing"in n?!!n.trailing:l),o(e,t,{leading:i,maxWait:t,trailing:l})}var o=n(5),r=n(0),a="Expected a function";e.exports=i},function(e,t,n){function i(e){if("number"==typeof e)return e;if(r(e))return a;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(l,"");var n=c.test(e);return n||u.test(e)?d(e.slice(2),n?2:8):s.test(e)?a:+e}var o=n(0),r=n(26),a=NaN,l=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,u=/^0o[0-7]+$/i,d=parseInt;e.exports=i},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(t,n){t.exports=e},function(e,n){e.exports=t}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.ReactSizeMe=t(require("react"),require("react-dom")):e.ReactSizeMe=t(e.React,e.ReactDOM)}(this,function(e,t){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=7)}([function(e,t){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=n},function(e,t,n){"use strict";var i=e.exports={};i.isIE=function(e){return!!function(){var e=navigator.userAgent.toLowerCase();return e.indexOf("msie")!==-1||e.indexOf("trident")!==-1||e.indexOf(" edge/")!==-1}()&&(!e||e===function(){var e=3,t=document.createElement("div"),n=t.getElementsByTagName("i");do{t.innerHTML="<!--[if gt IE "+ ++e+"]><i></i><![endif]-->"}while(n[0]);return e>4?e:void 0}())},i.isLegacyOpera=function(){return!!window.opera}},function(e,t,n){"use strict";(e.exports={}).forEach=function(e,t){for(var n=0;n<e.length;n++){var i=t(e[n]);if(i)return i}}},function(e,t,n){var i=n(4),r=i.Symbol;e.exports=r},function(e,t,n){var i=n(24),r="object"==typeof self&&self&&self.Object===Object&&self,o=i||r||Function("return this")();e.exports=o},function(e,t,n){function i(e,t,n){function i(t){var n=y,i=b;return y=b=void 0,z=t,x=e.apply(i,n)}function c(e){return z=e,S=setTimeout(h,t),O?i(e):x}function d(e){var n=e-E,i=e-z,r=t-n;return k?u(r,w-i):r}function f(e){var n=e-E,i=e-z;return void 0===E||n>=t||n<0||k&&i>=w}function h(){var e=o();if(f(e))return p(e);S=setTimeout(h,d(e))}function p(e){return S=void 0,T&&y?i(e):(y=b=void 0,x)}function v(){void 0!==S&&clearTimeout(S),z=0,y=E=b=S=void 0}function m(){return void 0===S?x:p(o())}function g(){var e=o(),n=f(e);if(y=arguments,b=this,E=e,n){if(void 0===S)return c(E);if(k)return S=setTimeout(h,t),i(E)}return void 0===S&&(S=setTimeout(h,t)),x}var y,b,w,x,S,E,z=0,O=!1,k=!1,T=!0;if("function"!=typeof e)throw new TypeError(l);return t=a(t)||0,r(n)&&(O=!!n.leading,k="maxWait"in n,w=k?s(a(n.maxWait)||0,t):w,T="trailing"in n?!!n.trailing:T),g.cancel=v,g.flush=m,g}var r=n(0),o=n(29),a=n(31),l="Expected a function",s=Math.max,u=Math.min;e.exports=i},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}function o(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 l(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)}function s(e){return e.displayName||e.name||"Component"}function u(e){var t=e.className,n=e.style,i={};return t||n?(t&&(i.className=t),n&&(i.style=n)):i.style={width:"100%",height:"100%"},p.default.createElement("div",i)}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:T,t=e.monitorWidth,n=void 0===t?T.monitorWidth:t,i=e.monitorHeight,r=void 0===i?T.monitorHeight:i,u=e.monitorPosition,h=void 0===u?T.monitorPosition:u,v=e.refreshRate,g=void 0===v?T.refreshRate:v,b=e.refreshMode,x=void 0===b?T.refreshMode:b,E=e.noPlaceholder,O=void 0===E?T.noPlaceholder:E;(0,w.default)(n||r||h,'You have to monitor at least one of the width, height, or position when using "sizeMe"'),(0,w.default)(g>=16,"It is highly recommended that you don't put your refreshRate lower than 16 as this may cause layout thrashing."),(0,w.default)("throttle"===x||"debounce"===x,'The refreshMode should have a value of "throttle" or "debounce"');var j="throttle"===x?S.default:z.default;return function(e){var t=M(e),i=function(e){function i(){var e,t,l,s;o(this,i);for(var u=arguments.length,c=Array(u),d=0;d<u;d++)c[d]=arguments[d];return t=l=a(this,(e=i.__proto__||Object.getPrototypeOf(i)).call.apply(e,[this].concat(c))),l.state={width:void 0,height:void 0,position:void 0},l.determineStrategy=function(e){l.strategy=e.onSize?"callback":"render"},l.strategisedSetState=function(e){"callback"===l.strategy?(l.callbackState=e,l.props.onSize(e)):l.setState(e)},l.strategisedGetState=function(){return"callback"===l.strategy?l.callbackState:l.state},l.refCallback=function(e){l.element=e},l.hasSizeChanged=function(e,t){var i=e,o=t,a=i.position||{},l=o.position||{};return r&&i.height!==o.height||h&&(a.top!==l.top||a.left!==l.left||a.bottom!==l.bottom||a.right!==l.right)||n&&i.width!==o.width},l.checkIfSizeChanged=j(function(e){var t=e.getBoundingClientRect(),i=t.width,o=t.height,a=t.right,s=t.left,u=t.top,c=t.bottom,d={width:n?i:null,height:r?o:null,position:h?{right:a,left:s,top:u,bottom:c}:null};l.hasSizeChanged(l.state,d)&&l.strategisedSetState(d)},g),s=t,a(l,s)}return l(i,e),f(i,[{key:"componentDidMount",value:function(){this.determineStrategy(this.props),this.handleDOMNode()}},{key:"componentWillReceiveProps",value:function(e){this.determineStrategy(e)}},{key:"componentDidUpdate",value:function(){this.handleDOMNode()}},{key:"componentWillUnmount",value:function(){this.hasSizeChanged=function(){},this.checkIfSizeChanged=function(){},this.domEl&&((0,k.default)().removeAllListeners(this.domEl),this.domEl=null)}},{key:"handleDOMNode",value:function(){var e=this.element&&y.default.findDOMNode(this.element);if(!e)return void(this.domEl&&((0,k.default)().removeAllListeners(this.domEl),this.domEl=null));this.domEl&&(0,k.default)().removeAllListeners(this.domEl),this.domEl=e,(0,k.default)().listenTo(this.domEl,this.checkIfSizeChanged)}},{key:"render",value:function(){var e=c.enableSSRBehaviour||c.noPlaceholders||O||"callback"===this.strategy;return p.default.createElement(t,d({explicitRef:this.refCallback,size:"callback"===this.strategy?null:this.state,disablePlaceholder:e},this.props))}}]),i}(p.default.Component);return i.displayName="SizeMe("+s(e)+")",i.propTypes={onSize:m.default.func},i.WrappedComponent=e,i}}Object.defineProperty(t,"__esModule",{value:!0});var d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),h=n(35),p=i(h),v=n(33),m=i(v),g=n(36),y=i(g),b=n(22),w=i(b),x=n(30),S=i(x),E=n(5),z=i(E),O=n(8),k=i(O),T={monitorWidth:!0,monitorHeight:!1,monitorPosition:!1,refreshRate:16,refreshMode:"throttle",noPlaceholder:!1},j=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),f(t,[{key:"render",value:function(){return h.Children.only(this.props.children)}}]),t}(h.Component);j.displayName="SizeMeReferenceWrapper",j.propTypes={children:m.default.element.isRequired},u.displayName="SizeMePlaceholder",u.propTypes={className:m.default.string,style:m.default.object};var M=function(e){function t(t){var n=t.explicitRef,i=t.className,o=t.style,a=t.size,l=t.disablePlaceholder,s=(t.onSize,r(t,["explicitRef","className","style","size","disablePlaceholder","onSize"])),c=null==a||null==a.width&&null==a.height&&null==a.position,f=c&&!l,h={className:i,style:o};null!=a&&(h.size=a);var v=f?p.default.createElement(u,{className:i,style:o}):p.default.createElement(e,d({},h,s));return p.default.createElement(j,{ref:n},v)}return t.displayName="SizeMeRenderer("+s(e)+")",t.propTypes={explicitRef:m.default.func.isRequired,className:m.default.string,style:m.default.object,size:m.default.shape({width:m.default.number,height:m.default.number}),disablePlaceholder:m.default.bool},t};c.enableSSRBehaviour=!1,c.noPlaceholders=!1,t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sizeMe=void 0;var i=n(6),r=function(e){return e&&e.__esModule?e:{default:e}}(i);t.sizeMe=r.default,t.default=r.default},function(e,t,n){"use strict";function i(){return a||(a=(0,o.default)({strategy:"scroll"})),a}Object.defineProperty(t,"__esModule",{value:!0});var r=n(13),o=function(e){return e&&e.__esModule?e:{default:e}}(r),a=void 0;t.default=i},function(e,t,n){"use strict";function i(){function e(e,t){t||(t=e,e=0),e>o?o=e:e<a&&(a=e),i[e]||(i[e]=[]),i[e].push(t),r++}function t(){for(var e=a;e<=o;e++)for(var t=i[e],n=0;n<t.length;n++){var r=t[n];r()}}function n(){return r}var i={},r=0,o=0,a=0;return{add:e,process:t,size:n}}var r=n(10);e.exports=function(e){function t(e,t){!p&&d&&c&&0===h.size()&&a(),h.add(e,t)}function n(){for(p=!0;h.size();){var e=h;h=i(),e.process()}p=!1}function o(e){p||(void 0===e&&(e=c),f&&(l(f),f=null),e?a():n())}function a(){f=s(n)}function l(e){return clearTimeout(e)}function s(e){return function(e){return setTimeout(e,0)}(e)}e=e||{};var u=e.reporter,c=r.getOption(e,"async",!0),d=r.getOption(e,"auto",!0);d&&!c&&(u&&u.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),c=!0);var f,h=i(),p=!1;return{add:t,force:o}}},function(e,t,n){"use strict";function i(e,t,n){var i=e[t];return void 0!==i&&null!==i||void 0===n?i:n}(e.exports={}).getOption=i},function(e,t,n){"use strict";var i=n(1);e.exports=function(e){function t(e,t){function n(){t(e)}if(!r(e))throw new Error("Element is not detectable by this strategy.");if(i.isIE(8))s(e).object={proxy:n},e.attachEvent("onresize",n);else{r(e).contentDocument.defaultView.addEventListener("resize",n)}}function n(e,t,n){n||(n=t,t=e,e=null),e=e||{};e.debug;i.isIE(8)?n(t):function(e,t){function n(){function n(){if("static"===u.position){e.style.position="relative";var t=function(e,t,n,i){var r=n[i];"auto"!==r&&"0"!==function(e){return e.replace(/[^-\d\.]/g,"")}(r)&&(e.warn("An element that is positioned static has style."+i+"="+r+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+i+" will be set to 0. Element: ",t),t.style[i]=0)};t(a,e,u,"top"),t(a,e,u,"right"),t(a,e,u,"bottom"),t(a,e,u,"left")}}function l(){function i(e,t){if(!e.contentDocument)return void setTimeout(function(){i(e,t)},100);t(e.contentDocument)}o||n(),i(this,function(n){t(e)})}""!==u.position&&(n(u),o=!0);var c=document.createElement("object");c.style.cssText=r,c.tabIndex=-1,c.type="text/html",c.onload=l,i.isIE()||(c.data="about:blank"),e.appendChild(c),s(e).object=c,i.isIE()&&(c.data="about:blank")}var r="display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; padding: 0; margin: 0; opacity: 0; z-index: -1000; pointer-events: none;",o=!1,u=window.getComputedStyle(e),c=e.offsetWidth,d=e.offsetHeight;s(e).startSize={width:c,height:d},l?l.add(n):n()}(t,n)}function r(e){return s(e).object}function o(e){i.isIE(8)?e.detachEvent("onresize",s(e).object.proxy):e.removeChild(r(e)),delete s(e).object}e=e||{};var a=e.reporter,l=e.batchProcessor,s=e.stateHandler.getState;if(!a)throw new Error("Missing required dependency: reporter.");return{makeDetectable:n,addListener:t,uninstall:o}}},function(e,t,n){"use strict";var i=n(2).forEach;e.exports=function(e){function t(e){e.className+=" "+v+"_animation_active"}function n(e,t,n){if(e.addEventListener)e.addEventListener(t,n);else{if(!e.attachEvent)return c.error("[scroll] Don't know how to add event listeners.");e.attachEvent("on"+t,n)}}function r(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n);else{if(!e.detachEvent)return c.error("[scroll] Don't know how to remove event listeners.");e.detachEvent("on"+t,n)}}function o(e){return f(e).container.childNodes[0].childNodes[0].childNodes[0]}function a(e){return f(e).container.childNodes[0].childNodes[0].childNodes[1]}function l(e,t){if(!f(e).listeners.push)throw new Error("Cannot add listener to an element that is not detectable.");f(e).listeners.push(t)}function s(e,r,l){function s(){if(e.debug){var t=Array.prototype.slice.call(arguments);if(t.unshift(h.get(r),"Scroll: "),c.log.apply)c.log.apply(null,t);else for(var n=0;n<t.length;n++)c.log(t[n])}}function u(e){var t=f(e).container.childNodes[0],n=getComputedStyle(t);return!n.width||n.width.indexOf("px")===-1}function m(){var e=getComputedStyle(r),t={};return t.position=e.position,t.width=r.offsetWidth,t.height=r.offsetHeight,t.top=e.top,t.right=e.right,t.bottom=e.bottom,t.left=e.left,t.widthCSS=e.width,t.heightCSS=e.height,t}function g(){var e=m();f(r).startSize={width:e.width,height:e.height},s("Element start size",f(r).startSize)}function y(){f(r).listeners=[]}function b(){if(s("storeStyle invoked."),!f(r))return void s("Aborting because element has been uninstalled");var e=m();f(r).style=e}function w(e,t,n){f(e).lastWidth=t,f(e).lastHeight=n}function x(e){return o(e).childNodes[0]}function S(){return 2*p.width+1}function E(){return 2*p.height+1}function z(e){return e+10+S()}function O(e){return e+10+E()}function k(e){return 2*e+S()}function T(e){return 2*e+E()}function j(e,t,n){var i=o(e),r=a(e),l=z(t),s=O(n),u=k(t),c=T(n);i.scrollLeft=l,i.scrollTop=s,r.scrollLeft=u,r.scrollTop=c}function M(){var e=f(r).container;if(!e){e=document.createElement("div"),e.className=v,e.style.cssText="visibility: hidden; display: inline; width: 0px; height: 0px; z-index: -1; overflow: hidden; margin: 0; padding: 0;",f(r).container=e,t(e),r.appendChild(e);var i=function(){f(r).onRendered&&f(r).onRendered()};n(e,"animationstart",i),f(r).onAnimationStart=i}return e}function N(){function e(){f(r).onExpand&&f(r).onExpand()}function t(){f(r).onShrink&&f(r).onShrink()}if(s("Injecting elements"),!f(r))return void s("Aborting because element has been uninstalled");!function(){var e=f(r).style;if("static"===e.position){r.style.position="relative";var t=function(e,t,n,i){var r=n[i];"auto"!==r&&"0"!==function(e){return e.replace(/[^-\d\.]/g,"")}(r)&&(e.warn("An element that is positioned static has style."+i+"="+r+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+i+" will be set to 0. Element: ",t),t.style[i]=0)};t(c,r,e,"top"),t(c,r,e,"right"),t(c,r,e,"bottom"),t(c,r,e,"left")}}();var i=f(r).container;i||(i=M());var o=p.width,a=p.height,l="position: absolute; flex: none; overflow: hidden; z-index: -1; visibility: hidden; "+function(e,t,n,i){return e=e?e+"px":"0",t=t?t+"px":"0",n=n?n+"px":"0",i=i?i+"px":"0","left: "+e+"; top: "+t+"; right: "+i+"; bottom: "+n+";"}(-(1+o),-(1+a),-a,-o),u=document.createElement("div"),d=document.createElement("div"),h=document.createElement("div"),m=document.createElement("div"),g=document.createElement("div"),y=document.createElement("div");u.dir="ltr",u.style.cssText="position: absolute; flex: none; overflow: hidden; z-index: -1; visibility: hidden; width: 100%; height: 100%; left: 0px; top: 0px;",u.className=v,d.className=v,d.style.cssText=l,h.style.cssText="position: absolute; flex: none; overflow: scroll; z-index: -1; visibility: hidden; width: 100%; height: 100%;",m.style.cssText="position: absolute; left: 0; top: 0;",g.style.cssText="position: absolute; flex: none; overflow: scroll; z-index: -1; visibility: hidden; width: 100%; height: 100%;",y.style.cssText="position: absolute; width: 200%; height: 200%;",h.appendChild(m),g.appendChild(y),d.appendChild(h),d.appendChild(g),u.appendChild(d),i.appendChild(u),n(h,"scroll",e),n(g,"scroll",t),f(r).onExpandScroll=e,f(r).onShrinkScroll=t}function C(){function t(e,t,n){var i=x(e),r=z(t),o=O(n);i.style.width=r+"px",i.style.height=o+"px"}function n(n){var i=r.offsetWidth,o=r.offsetHeight;s("Storing current size",i,o),w(r,i,o),d.add(0,function(){if(!f(r))return void s("Aborting because element has been uninstalled");if(!l())return void s("Aborting because element container has not been initialized");if(e.debug){var n=r.offsetWidth,a=r.offsetHeight;n===i&&a===o||c.warn(h.get(r),"Scroll: Size changed before updating detector elements.")}t(r,i,o)}),d.add(1,function(){return f(r)?l()?void j(r,i,o):void s("Aborting because element container has not been initialized"):void s("Aborting because element has been uninstalled")}),n&&d.add(2,function(){return f(r)?l()?void n():void s("Aborting because element container has not been initialized"):void s("Aborting because element has been uninstalled")})}function l(){return!!f(r).container}function p(){s("notifyListenersIfNeeded invoked");var e=f(r);return function(){return void 0===f(r).lastNotifiedWidth}()&&e.lastWidth===e.startSize.width&&e.lastHeight===e.startSize.height?s("Not notifying: Size is the same as the start size, and there has been no notification yet."):e.lastWidth===e.lastNotifiedWidth&&e.lastHeight===e.lastNotifiedHeight?s("Not notifying: Size already notified"):(s("Current size not notified, notifying..."),e.lastNotifiedWidth=e.lastWidth,e.lastNotifiedHeight=e.lastHeight,void i(f(r).listeners,function(e){e(r)}))}function v(){if(s("startanimation triggered."),u(r))return void s("Ignoring since element is still unrendered...");s("Element rendered.");var e=o(r),t=a(r);0!==e.scrollLeft&&0!==e.scrollTop&&0!==t.scrollLeft&&0!==t.scrollTop||(s("Scrollbars out of sync. Updating detector elements..."),n(p))}function m(){if(s("Scroll detected."),u(r))return void s("Scroll event fired while unrendered. Ignoring...");var e=r.offsetWidth,t=r.offsetHeight;e!==r.lastWidth||t!==r.lastHeight?(s("Element size changed."),n(p)):s("Element size has not changed ("+e+"x"+t+").")}if(s("registerListenersAndPositionElements invoked."),!f(r))return void s("Aborting because element has been uninstalled");f(r).onRendered=v,f(r).onExpand=m,f(r).onShrink=m;var g=f(r).style;t(r,g.width,g.height)}function A(){if(s("finalizeDomMutation invoked."),!f(r))return void s("Aborting because element has been uninstalled");var e=f(r).style;w(r,e.width,e.height),j(r,e.width,e.height)}function P(){l(r)}function _(){s("Installing..."),y(),g(),d.add(0,b),d.add(1,N),d.add(2,C),d.add(3,A),d.add(4,P)}l||(l=r,r=e,e=null),e=e||{},s("Making detectable..."),!function(e){return!function(e){return e===e.ownerDocument.body||e.ownerDocument.body.contains(e)}(e)||null===getComputedStyle(e)}(r)?_():(s("Element is detached"),M(),s("Waiting until element is attached..."),f(r).onRendered=function(){s("Element is now attached"),_()})}function u(e){var t=f(e);t&&(t.onExpandScroll&&r(o(e),"scroll",t.onExpandScroll),t.onShrinkScroll&&r(a(e),"scroll",t.onShrinkScroll),t.onAnimationStart&&r(t.container,"animationstart",t.onAnimationStart),t.container&&e.removeChild(t.container))}e=e||{};var c=e.reporter,d=e.batchProcessor,f=e.stateHandler.getState,h=(e.stateHandler.hasState,e.idHandler);if(!d)throw new Error("Missing required dependency: batchProcessor");if(!c)throw new Error("Missing required dependency: reporter.");var p=function(){var e=document.createElement("div");e.style.cssText="position: absolute; width: 1000px; height: 1000px; visibility: hidden; margin: 0; padding: 0;";var t=document.createElement("div");t.style.cssText="position: absolute; width: 500px; height: 500px; overflow: scroll; visibility: none; top: -1500px; left: -1500px; visibility: hidden; margin: 0; padding: 0;",t.appendChild(e),document.body.insertBefore(t,document.body.firstChild);var n=500-t.clientWidth,i=500-t.clientHeight;return document.body.removeChild(t),{width:n,height:i}}(),v="erd_scroll_detection_container";return function(e,t){if(!document.getElementById(e)){var n=t+"_animation",i=t+"_animation_active",r="/* Created by the element-resize-detector library. */\n";r+="."+t+" > div::-webkit-scrollbar { display: none; }\n\n",r+="."+i+" { -webkit-animation-duration: 0.1s; animation-duration: 0.1s; -webkit-animation-name: "+n+"; animation-name: "+n+"; }\n",r+="@-webkit-keyframes "+n+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n",r+="@keyframes "+n+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }",function(t,n){n=n||function(e){document.head.appendChild(e)};var i=document.createElement("style");i.innerHTML=t,i.id=e,n(i)}(r)}}("erd_scroll_detection_scrollbar_style",v),{makeDetectable:s,addListener:l,uninstall:u}}},function(e,t,n){"use strict";function i(e){return Array.isArray(e)||void 0!==e.length}function r(e){if(Array.isArray(e))return e;var t=[];return l(e,function(e){t.push(e)}),t}function o(e){return e&&1===e.nodeType}function a(e,t,n){var i=e[t];return void 0!==i&&null!==i||void 0===n?i:n}var l=n(2).forEach,s=n(14),u=n(17),c=n(15),d=n(16),f=n(18),h=n(1),p=n(9),v=n(19),m=n(11),g=n(12);e.exports=function(e){function t(e,t,n){function s(e){var t=O.get(e);l(t,function(t){t(e)})}function u(e,t,n){O.add(t,n),e&&n(t)}if(n||(n=t,t=e,e={}),!t)throw new Error("At least one element required.");if(!n)throw new Error("Listener required.");if(o(t))t=[t];else{if(!i(t))return x.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");t=r(t)}var c=0,d=a(e,"callOnAdd",E.callOnAdd),f=a(e,"onReady",function(){}),h=a(e,"debug",E.debug);l(t,function(e){v.getState(e)||(v.initState(e),y.set(e));var i=y.get(e);if(h&&x.log("Attaching listener to element",i,e),!k.isDetectable(e))return h&&x.log(i,"Not detectable."),k.isBusy(e)?(h&&x.log(i,"System busy making it detectable"),u(d,e,n),M[i]=M[i]||[],void M[i].push(function(){++c===t.length&&f()})):(h&&x.log(i,"Making detectable..."),k.markBusy(e,!0),z.makeDetectable({debug:h},e,function(e){if(h&&x.log(i,"onElementDetectable"),v.getState(e)){k.markAsDetectable(e),k.markBusy(e,!1),z.addListener(e,s),u(d,e,n);var r=v.getState(e);if(r&&r.startSize){var o=e.offsetWidth,a=e.offsetHeight;r.startSize.width===o&&r.startSize.height===a||s(e)}M[i]&&l(M[i],function(e){e()})}else h&&x.log(i,"Element uninstalled before being detectable.");delete M[i],++c===t.length&&f()}));h&&x.log(i,"Already detecable, adding listener."),u(d,e,n),c++}),c===t.length&&f()}function n(e){if(!e)return x.error("At least one element is required.");if(o(e))e=[e];else{if(!i(e))return x.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");e=r(e)}l(e,function(e){O.removeAllListeners(e),z.uninstall(e),v.cleanState(e)})}e=e||{};var y;if(e.idHandler)y={get:function(t){return e.idHandler.get(t,!0)},set:e.idHandler.set};else{var b=c(),w=d({idGenerator:b,stateHandler:v});y=w}var x=e.reporter;if(!x){x=f(x===!1)}var S=a(e,"batchProcessor",p({reporter:x})),E={};E.callOnAdd=!!a(e,"callOnAdd",!0),E.debug=!!a(e,"debug",!1);var z,O=u(y),k=s({stateHandler:v}),T=a(e,"strategy","object"),j={reporter:x,batchProcessor:S,stateHandler:v,idHandler:y};if("scroll"===T&&(h.isLegacyOpera()?(x.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),T="object"):h.isIE(9)&&(x.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),T="object")),"scroll"===T)z=g(j);else{if("object"!==T)throw new Error("Invalid strategy name: "+T);z=m(j)}var M={};return{listenTo:t,removeListener:O.removeListener,removeAllListeners:O.removeAllListeners,uninstall:n}}},function(e,t,n){"use strict";e.exports=function(e){function t(e){var t=o(e);return t&&!!t.isDetectable}function n(e){o(e).isDetectable=!0}function i(e){return!!o(e).busy}function r(e,t){o(e).busy=!!t}var o=e.stateHandler.getState;return{isDetectable:t,markAsDetectable:n,isBusy:i,markBusy:r}}},function(e,t,n){"use strict";e.exports=function(){function e(){return t++}var t=1;return{generate:e}}},function(e,t,n){"use strict";e.exports=function(e){function t(e){var t=r(e);return t&&void 0!==t.id?t.id:null}function n(e){var t=r(e);if(!t)throw new Error("setId required the element to have a resize detection state.");var n=i.generate();return t.id=n,n}var i=e.idGenerator,r=e.stateHandler.getState;return{get:t,set:n}}},function(e,t,n){"use strict";e.exports=function(e){function t(t){var n=e.get(t);return void 0===n?[]:o[n]||[]}function n(t,n){var i=e.get(t);o[i]||(o[i]=[]),o[i].push(n)}function i(e,n){for(var i=t(e),r=0,o=i.length;r<o;++r)if(i[r]===n){i.splice(r,1);break}}function r(e){var n=t(e);n&&(n.length=0)}var o={};return{get:t,add:n,removeListener:i,removeAllListeners:r}}},function(e,t,n){"use strict";e.exports=function(e){function t(){}var n={log:t,warn:t,error:t};if(!e&&window.console){var i=function(e,t){e[t]=function(){var e=console[t];if(e.apply)e.apply(console,arguments);else for(var n=0;n<arguments.length;n++)e(arguments[n])}};i(n,"log"),i(n,"warn"),i(n,"error")}return n}},function(e,t,n){"use strict";function i(e){return e[a]={},r(e)}function r(e){return e[a]}function o(e){delete e[a]}var a="_erd";e.exports={initState:i,getState:r,cleanState:o}},function(e,t,n){"use strict";function i(e){return function(){return e}}var r=function(){};r.thatReturns=i,r.thatReturnsFalse=i(!1),r.thatReturnsTrue=i(!0),r.thatReturnsNull=i(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){"use strict";function i(e,t,n,i,o,a,l,s){if(r(t),!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,i,o,a,l,s],d=0;u=new Error(t.replace(/%s/g,function(){return c[d++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}}var r=function(e){};e.exports=i},function(e,t,n){"use strict";var i=function(e,t,n,i,r,o,a,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,i,r,o,a,l],c=0;s=new Error(t.replace(/%s/g,function(){return u[c++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}};e.exports=i},function(e,t,n){function i(e){return null==e?void 0===e?s:l:u&&u in Object(e)?o(e):a(e)}var r=n(3),o=n(25),a=n(26),l="[object Null]",s="[object Undefined]",u=r?r.toStringTag:void 0;e.exports=i},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(t,n(34))},function(e,t,n){function i(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0}catch(e){}var i=l.call(e);return t?e[s]=n:delete e[s],i}var r=n(3),o=Object.prototype,a=o.hasOwnProperty,l=o.toString,s=r?r.toStringTag:void 0;e.exports=i},function(e,t){function n(e){return r.call(e)}var i=Object.prototype,r=i.toString;e.exports=n},function(e,t){function n(e){return null!=e&&"object"==typeof e}e.exports=n},function(e,t,n){function i(e){return"symbol"==typeof e||o(e)&&r(e)==a}var r=n(23),o=n(27),a="[object Symbol]";e.exports=i},function(e,t,n){var i=n(4),r=function(){return i.Date.now()};e.exports=r},function(e,t,n){function i(e,t,n){var i=!0,l=!0;if("function"!=typeof e)throw new TypeError(a);return o(n)&&(i="leading"in n?!!n.leading:i,l="trailing"in n?!!n.trailing:l),r(e,t,{leading:i,maxWait:t,trailing:l})}var r=n(5),o=n(0),a="Expected a function";e.exports=i},function(e,t,n){function i(e){if("number"==typeof e)return e;if(o(e))return a;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(l,"");var n=u.test(e);return n||c.test(e)?d(e.slice(2),n?2:8):s.test(e)?a:+e}var r=n(0),o=n(28),a=NaN,l=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;e.exports=i},function(e,t,n){"use strict";var i=n(20),r=n(21);e.exports=function(){function e(){r(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return n.checkPropTypes=i,n.PropTypes=n,n}},function(e,t,n){e.exports=n(32)()},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(t,n){t.exports=e},function(e,n){e.exports=t}])});

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