react-sizeme
Advanced tools
Comparing version 2.3.3 to 2.3.4
{ | ||
"name": "react-sizeme", | ||
"version": "2.3.3", | ||
"version": "2.3.4", | ||
"description": "Make your React Components aware of their dimensions and position.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -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 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-1!==e.indexOf("msie")||-1!==e.indexOf("trident")||-1!==e.indexOf(" edge/")}()&&(!e||e===function(){var e=3,t=document.createElement("div"),n=t.getElementsByTagName("i");do{t.innerHTML="\x3c!--[if gt IE "+ ++e+"]><i></i><![endif]--\x3e"}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,O=t,x=e.apply(i,n)}function u(e){return O=e,S=setTimeout(h,t),z?i(e):x}function d(e){var n=e-E,i=e-O,r=t-n;return k?c(r,w-i):r}function f(e){var n=e-E,i=e-O;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),O=0,y=E=b=S=void 0}function g(){return void 0===S?x:p(o())}function m(){var e=o(),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,O=0,z=!1,k=!1,T=!0;if("function"!=typeof e)throw new TypeError(l);return t=a(t)||0,r(n)&&(z=!!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 r=n(0),o=n(29),a=n(31),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 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 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]:T,t=e.monitorWidth,n=void 0===t?T.monitorWidth:t,i=e.monitorHeight,r=void 0===i?T.monitorHeight:i,c=e.monitorPosition,h=void 0===c?T.monitorPosition:c,v=e.refreshRate,m=void 0===v?T.refreshRate:v,b=e.refreshMode,x=void 0===b?T.refreshMode:b,E=e.noPlaceholder,z=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)(m>=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:O.default;return function(e){var t=_(e),i=function(e){function i(){var e,t,l,s;o(this,i);for(var c=arguments.length,u=Array(c),f=0;f<c;f++)u[f]=arguments[f];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){e.onSize?(l.callbackState||(l.callbackState=d({},l.state)),l.strategy="callback"):l.strategy="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,c=t.top,u=t.bottom,d={width:n?i:null,height:r?o:null,position:h?{right:a,left:s,top:c,bottom:u}:null};l.hasSizeChanged(l.strategisedGetState(),d)&&l.strategisedSetState(d)},m),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=u.enableSSRBehaviour||u.noPlaceholders||z||"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:g.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(36),p=i(h),v=n(33),g=i(v),m=n(37),y=i(m),b=n(22),w=i(b),x=n(30),S=i(x),E=n(5),O=i(E),z=n(8),k=i(z),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:g.default.element.isRequired},c.displayName="SizeMePlaceholder",c.propTypes={className:g.default.string,style:g.default.object};var _=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"])),u=null==a||null==a.width&&null==a.height&&null==a.position,f=u&&!l,h={className:i,style:o};null!=a&&(h.size=a);var v=f?p.default.createElement(c,{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:g.default.func.isRequired,className:g.default.string,style:g.default.object,size:g.default.shape({width:g.default.number,height:g.default.number}),disablePlaceholder:g.default.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),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&&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 o(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=r.getOption(e,"async",!0),d=r.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: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"===c.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,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)}o||n(),i(this,function(n){t(e)})}""!==c.position&&(n(c),o=!0);var u=document.createElement("object");u.style.cssText=r,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 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,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 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 u.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 u.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: "),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],n=getComputedStyle(t);return!n.width||-1===n.width.indexOf("px")}function g(){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 m(){var e=g();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=g();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 O(e){return e+10+S()}function z(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=O(t),s=z(n),c=k(t),u=T(n);i.scrollLeft=l,i.scrollTop=s,r.scrollLeft=c,r.scrollTop=u}function _(){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 M(){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(u,r,e,"top"),t(u,r,e,"right"),t(u,r,e,"bottom"),t(u,r,e,"left")}}();var i=f(r).container;i||(i=_());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),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(r).onExpandScroll=e,f(r).onShrinkScroll=t}function N(){function t(e,t,n){var i=x(e),r=O(t),o=z(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||u.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."),c(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 g(){if(s("Scroll detected."),c(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=g,f(r).onShrink=g;var m=f(r).style;t(r,m.width,m.height)}function C(){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 A(){l(r)}function P(){s("Installing..."),y(),m(),d.add(0,b),d.add(1,M),d.add(2,N),d.add(3,C),d.add(4,A)}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)?P():(s("Element is detached"),_(),s("Waiting until element is attached..."),f(r).onRendered=function(){s("Element is now attached"),P()})}function c(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 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",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:c}}},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),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=z.get(e);l(t,function(t){t(e)})}function c(e,t,n){z.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 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),_[i]=_[i]||[],void _[i].push(function(){++u===t.length&&f()})):(h&&x.log(i,"Making detectable..."),k.markBusy(e,!0),O.makeDetectable({debug:h},e,function(e){if(h&&x.log(i,"onElementDetectable"),v.getState(e)){k.markAsDetectable(e),k.markBusy(e,!1),O.addListener(e,s),c(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)}_[i]&&l(_[i],function(e){e()})}else h&&x.log(i,"Element uninstalled before being detectable.");delete _[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(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){z.removeAllListeners(e),O.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(!1===x)}var S=a(e,"batchProcessor",p({reporter:x})),E={};E.callOnAdd=!!a(e,"callOnAdd",!0),E.debug=!!a(e,"debug",!1);var O,z=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)O=m(j);else{if("object"!==T)throw new Error("Invalid strategy name: "+T);O=g(j)}var _={};return{listenTo:t,removeListener:z.removeListener,removeAllListeners:z.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 c;if(void 0===t)c=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,o,a,l,s],d=0;c=new Error(t.replace(/%s/g,function(){return u[d++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}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 c=[n,i,r,o,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)?o(e):a(e)}var r=n(3),o=n(25),a=n(26),l="[object Null]",s="[object Undefined]",c=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(35))},function(e,t,n){function i(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var i=!0}catch(e){}var r=l.call(e);return i&&(t?e[s]=n:delete e[s]),r}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=c.test(e);return n||u.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,c=/^0b[01]+$/i,u=/^0o[0-7]+$/i,d=parseInt;e.exports=i},function(e,t,n){"use strict";var i=n(20),r=n(21),o=n(34);e.exports=function(){function e(e,t,n,i,a,l){l!==o&&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,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},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("prop-types"),require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["prop-types","react","react-dom"],t):"object"==typeof exports?exports.ReactSizeMe=t(require("prop-types"),require("react"),require("react-dom")):e.ReactSizeMe=t(e.PropTypes,e.React,e.ReactDOM)}(this,function(e,t,n){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-1!==e.indexOf("msie")||-1!==e.indexOf("trident")||-1!==e.indexOf(" edge/")}()&&(!e||e===function(){var e=3,t=document.createElement("div"),n=t.getElementsByTagName("i");do{t.innerHTML="\x3c!--[if gt IE "+ ++e+"]><i></i><![endif]--\x3e"}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=b,i=y;return b=y=void 0,z=t,x=e.apply(i,n)}function u(e){return z=e,S=setTimeout(h,t),k?i(e):x}function d(e){var n=e-E,i=e-z,o=t-n;return O?c(o,w-i):o}function f(e){var n=e-E,i=e-z;return void 0===E||n>=t||n<0||O&&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,j&&b?i(e):(b=y=void 0,x)}function v(){void 0!==S&&clearTimeout(S),z=0,b=E=y=S=void 0}function g(){return void 0===S?x:p(r())}function m(){var e=r(),n=f(e);if(b=arguments,y=this,E=e,n){if(void 0===S)return u(E);if(O)return S=setTimeout(h,t),i(E)}return void 0===S&&(S=setTimeout(h,t)),x}var b,y,w,x,S,E,z=0,k=!1,O=!1,j=!0;if("function"!=typeof e)throw new TypeError(l);return t=a(t)||0,o(n)&&(k=!!n.leading,O="maxWait"in n,w=O?s(a(n.maxWait)||0,t):w,j="trailing"in n?!!n.trailing:j),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]:j,t=e.monitorWidth,n=void 0===t?j.monitorWidth:t,i=e.monitorHeight,o=void 0===i?j.monitorHeight:i,c=e.monitorPosition,h=void 0===c?j.monitorPosition:c,v=e.refreshRate,m=void 0===v?j.refreshRate:v,y=e.refreshMode,x=void 0===y?j.refreshMode:y,E=e.noPlaceholder,k=void 0===E?j.noPlaceholder:E;(0,w.default)(n||o||h,'You have to monitor at least one of the width, height, or position when using "sizeMe"'),(0,w.default)(m>=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 M="throttle"===x?S.default:z.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),f=0;f<c;f++)u[f]=arguments[f];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){e.onSize?(l.callbackState||(l.callbackState=d({},l.state)),l.strategy="callback"):l.strategy="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||h&&(a.top!==l.top||a.left!==l.left||a.bottom!==l.bottom||a.right!==l.right)||n&&i.width!==r.width},l.checkIfSizeChanged=M(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:h?{right:a,left:s,top:c,bottom:u}:null};l.hasSizeChanged(l.strategisedGetState(),d)&&l.strategisedSetState(d)},m),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,O.default)().removeAllListeners(this.domEl),this.domEl=null)}},{key:"handleDOMNode",value:function(){var e=this.element&&b.default.findDOMNode(this.element);if(!e)return void(this.domEl&&((0,O.default)().removeAllListeners(this.domEl),this.domEl=null));this.domEl&&(0,O.default)().removeAllListeners(this.domEl),this.domEl=e,(0,O.default)().listenTo(this.domEl,this.checkIfSizeChanged)}},{key:"render",value:function(){var e=u.enableSSRBehaviour||u.noPlaceholders||k||"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:g.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(32),p=i(h),v=n(31),g=i(v),m=n(33),b=i(m),y=n(20),w=i(y),x=n(28),S=i(x),E=n(5),z=i(E),k=n(8),O=i(k),j={monitorWidth:!0,monitorHeight:!1,monitorPosition:!1,refreshRate:16,refreshMode:"throttle",noPlaceholder:!1},M=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);M.displayName="SizeMeReferenceWrapper",M.propTypes={children:g.default.element.isRequired},c.displayName="SizeMePlaceholder",c.propTypes={className:g.default.string,style:g.default.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(M,{ref:n},v)}return t.displayName="SizeMeRenderer("+s(e)+")",t.propTypes={explicitRef:g.default.func.isRequired,className:g.default.string,style:g.default.object,size:g.default.shape({width:g.default.number,height:g.default.number}),disablePlaceholder:g.default.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],n=getComputedStyle(t);return!n.width||-1===n.width.indexOf("px")}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 b(){f(o).listeners=[]}function y(){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 k(e){return e+10+E()}function O(e){return 2*e+S()}function j(e){return 2*e+E()}function M(e,t,n){var i=r(e),o=a(e),l=z(t),s=k(n),c=O(t),u=j(n);i.scrollLeft=l,i.scrollTop=s,o.scrollLeft=c,o.scrollTop=u}function T(){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 N(){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=T());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"),b=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%;",b.style.cssText="position: absolute; width: 200%; height: 200%;",h.appendChild(g),m.appendChild(b),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 C(){function t(e,t,n){var i=x(e),o=z(t),r=k(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 M(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),M(o,e.width,e.height)}function _(){l(o)}function P(){s("Installing..."),b(),m(),d.add(0,y),d.add(1,N),d.add(2,C),d.add(3,A),d.add(4,_)}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)||null===getComputedStyle(e)}(o)?P():(s("Element is detached"),T(),s("Waiting until element is attached..."),f(o).onRendered=function(){s("Element is now attached"),P()})}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=k.get(e);l(t,function(t){t(e)})}function c(e,t,n){k.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),b.set(e));var i=b.get(e);if(h&&x.log("Attaching listener to element",i,e),!O.isDetectable(e))return h&&x.log(i,"Not detectable."),O.isBusy(e)?(h&&x.log(i,"System busy making it detectable"),c(d,e,n),T[i]=T[i]||[],void T[i].push(function(){++u===t.length&&f()})):(h&&x.log(i,"Making detectable..."),O.markBusy(e,!0),z.makeDetectable({debug:h},e,function(e){if(h&&x.log(i,"onElementDetectable"),v.getState(e)){O.markAsDetectable(e),O.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)}T[i]&&l(T[i],function(e){e()})}else h&&x.log(i,"Element uninstalled before being detectable.");delete T[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){k.removeAllListeners(e),z.uninstall(e),v.cleanState(e)})}e=e||{};var b;if(e.idHandler)b={get:function(t){return e.idHandler.get(t,!0)},set:e.idHandler.set};else{var y=u(),w=d({idGenerator:y,stateHandler:v});b=w}var x=e.reporter;if(!x){x=f(!1===x)}var S=a(e,"batchProcessor",p({reporter:x})),E={};E.callOnAdd=!!a(e,"callOnAdd",!0),E.debug=!!a(e,"debug",!1);var z,k=c(b),O=s({stateHandler:v}),j=a(e,"strategy","object"),M={reporter:x,batchProcessor:S,stateHandler:v,idHandler:b};if("scroll"===j&&(h.isLegacyOpera()?(x.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),j="object"):h.isIE(9)&&(x.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),j="object")),"scroll"===j)z=m(M);else{if("object"!==j)throw new Error("Invalid strategy name: "+j);z=g(M)}var T={};return{listenTo:t,removeListener:k.removeListener,removeAllListeners:k.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;var i=!0}catch(e){}var o=l.call(e);return i&&(t?e[s]=n:delete e[s]),o}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){e.exports=n}])}); |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
168522
2753