UNPKG

22.4 kBJavaScriptView Raw
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.ReactContainerQuery=t(require("react"),require("react-dom")):e.ReactContainerQuery=t(e.React,e.ReactDOM)}("undefined"!=typeof self?self: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.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=4)}([function(e,t,n){"use strict";function i(e){for(var t=[],n=0,i=Object.keys(e);n<i.length;n++){var r=i[n],o=e[r];t.push({minWidth:null!=o.minWidth?o.minWidth:0,maxWidth:null!=o.maxWidth?o.maxWidth:1/0,minHeight:null!=o.minHeight?o.minHeight:0,maxHeight:null!=o.maxHeight?o.maxHeight:1/0,className:r})}return function(e){for(var n=e.height,i=e.width,r={},o=0,a=t;o<a.length;o++){var s=a[o],l=s.className,c=s.minWidth,u=s.maxWidth,d=s.minHeight,f=s.maxHeight;r[l]=null!=n&&null!=i?c<=i&&i<=u&&d<=n&&n<=f:null==n&&null!=i?c<=i&&i<=u:null==n||null!=i||d<=n&&n<=f}return r}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},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){"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";function i(e,t){var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var o=0;o<n.length;o++)if(!r.call(t,n[o])||e[n[o]]!==t[n[o]])return!1;return!0}Object.defineProperty(t,"__esModule",{value:!0});var r=Object.prototype.hasOwnProperty;t.default=i},function(e,t,n){"use strict";function i(e,t,n){return i=function(i){function r(e){var r=i.call(this,e)||this;return r.cqCore=null,r.state={params:n?c.default(t)(n):{}},r}return o(r,i),r.prototype.componentDidMount=function(){var e=this;this.cqCore=new u.default(t,function(t){e.setState({params:t})}),this.cqCore.observe(l.findDOMNode(this))},r.prototype.componentDidUpdate=function(){this.cqCore.observe(l.findDOMNode(this))},r.prototype.componentWillUnmount=function(){this.cqCore.disconnect(),this.cqCore=null},r.prototype.render=function(){return s.createElement(e,a({},this.props,{containerQuery:this.state.params}))},r}(s.Component),i.displayName=e.displayName?"ContainerQuery("+e.displayName+")":"ContainerQuery",i;var i}function r(e,t){var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var r=0;r<n.length;r++)if(!h.call(t,n[r])||!d.default(e[n[r]],t[n[r]]))return!1;return!0}var o=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),a=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e};Object.defineProperty(t,"__esModule",{value:!0});var s=n(5),l=n(6),c=n(0),u=n(7),d=n(3),f=function(e){function t(t){var n=e.call(this,t)||this;return n.cqCore=null,n.state={params:t.initialSize?c.default(t.query)(t.initialSize):{}},n}return o(t,e),t.prototype.componentDidMount=function(){this._startObserving(this.props.query)},t.prototype.componentWillReceiveProps=function(e){this.cqCore&&!r(this.props.query,e.query)&&(this.cqCore.disconnect(),this.cqCore=null,this._startObserving(e.query))},t.prototype.componentDidUpdate=function(){this.cqCore.observe(l.findDOMNode(this))},t.prototype.componentWillUnmount=function(){this.cqCore.disconnect(),this.cqCore=null},t.prototype.render=function(){return this.props.children(this.state.params)},t.prototype._startObserving=function(e){var t=this;this.cqCore=new u.default(e,function(e){t.setState({params:e})}),this.cqCore.observe(l.findDOMNode(this))},t}(s.Component);t.ContainerQuery=f,t.applyContainerQuery=i;var h=Object.prototype.hasOwnProperty},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(8),r=n(0),o=n(3),a=function(){function e(e,t){var n=this;this.result={},this.rol=new i.default(function(i){var a=r.default(e)(i);o.default(n.result,a)||(t(a),n.result=a)})}return e.prototype.observe=function(e){this.rol.observe(e)},e.prototype.disconnect=function(){this.rol.disconnect()},e}();t.default=a},function(e,t,n){"use strict";function i(e){return{width:r(window.getComputedStyle(e).width),height:r(window.getComputedStyle(e).height)}}function r(e){var t=/^([0-9\.]+)px$/.exec(e);return t?parseFloat(t[1]):0}Object.defineProperty(t,"__esModule",{value:!0});var o=n(9),a=function(){function e(e){var t=this;this.handler=e,this.listenedElement=null,this.hasResizeObserver=void 0!==window.ResizeObserver,this.hasResizeObserver?this.rz=new ResizeObserver(function(e){t.handler(i(e[0].target))}):this.erd=o({strategy:"scroll"})}return e.prototype.observe=function(e){var t=this;this.listenedElement!==e&&(this.listenedElement&&this.disconnect(),e&&(this.hasResizeObserver?this.rz.observe(e):this.erd.listenTo(e,function(e){t.handler(i(e))})),this.listenedElement=e)},e.prototype.disconnect=function(){this.listenedElement&&(this.hasResizeObserver?this.rz.disconnect():this.erd.uninstall(this.listenedElement),this.listenedElement=null)},e}();t.default=a},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 s(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 s=n(1).forEach,l=n(10),c=n(11),u=n(12),d=n(13),f=n(14),h=n(2),p=n(15),v=n(17),g=n(18),m=n(19);e.exports=function(e){function t(e,t,n){function l(e){var t=C.get(e);s(t,function(t){t(e)})}function c(e,t,n){C.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",S.callOnAdd),f=a(e,"onReady",function(){}),h=a(e,"debug",S.debug);s(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),!z.isDetectable(e))return h&&x.log(i,"Not detectable."),z.isBusy(e)?(h&&x.log(i,"System busy making it detectable"),c(d,e,n),H[i]=H[i]||[],void H[i].push(function(){++u===t.length&&f()})):(h&&x.log(i,"Making detectable..."),z.markBusy(e,!0),O.makeDetectable({debug:h},e,function(e){if(h&&x.log(i,"onElementDetectable"),v.getState(e)){z.markAsDetectable(e),z.markBusy(e,!1),O.addListener(e,l),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||l(e)}H[i]&&s(H[i],function(e){e()})}else h&&x.log(i,"Element uninstalled before being detectable.");delete H[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)}s(e,function(e){C.removeAllListeners(e),O.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 E=a(e,"batchProcessor",p({reporter:x})),S={};S.callOnAdd=!!a(e,"callOnAdd",!0),S.debug=!!a(e,"debug",!1);var O,C=c(b),z=l({stateHandler:v}),k=a(e,"strategy","object"),A={reporter:x,batchProcessor:E,stateHandler:v,idHandler:b};if("scroll"===k&&(h.isLegacyOpera()?(x.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),k="object"):h.isIE(9)&&(x.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),k="object")),"scroll"===k)O=m(A);else{if("object"!==k)throw new Error("Invalid strategy name: "+k);O=g(A)}var H={};return{listenTo:t,removeListener:C.removeListener,removeAllListeners:C.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(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(){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(){}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(){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(16);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&&(s(f),f=null),e?a():n())}function a(){f=l(n)}function s(e){return clearTimeout(e)}function l(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";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";var i=n(2);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))l(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 s(){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=s,i.isIE()||(u.data="about:blank"),e.appendChild(u),l(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;l(e).startSize={width:u,height:d},s?s.add(n):n()}(t,n)}function r(e){return l(e).object}function o(e){i.isIE(8)?e.detachEvent("onresize",l(e).object.proxy):e.removeChild(r(e)),delete l(e).object}e=e||{};var a=e.reporter,s=e.batchProcessor,l=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(1).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 s(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 l(e,r,s){function l(){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},l("Element start size",f(r).startSize)}function b(){f(r).listeners=[]}function y(){if(l("storeStyle invoked."),!f(r))return void l("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 E(){return 2*p.width+1}function S(){return 2*p.height+1}function O(e){return e+10+E()}function C(e){return e+10+S()}function z(e){return 2*e+E()}function k(e){return 2*e+S()}function A(e,t,n){var i=o(e),r=a(e),s=O(t),l=C(n),c=z(t),u=k(n);i.scrollLeft=s,i.scrollTop=l,r.scrollLeft=c,r.scrollTop=u}function H(){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 _(){function e(){f(r).onExpand&&f(r).onExpand()}function t(){f(r).onShrink&&f(r).onShrink()}if(l("Injecting elements"),!f(r))return void l("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=H());var o=p.width,a=p.height,s="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"),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=s,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(r).onExpandScroll=e,f(r).onShrinkScroll=t}function j(){function t(e,t,n){var i=x(e),r=O(t),o=C(n);i.style.width=r+"px",i.style.height=o+"px"}function n(n){var i=r.offsetWidth,o=r.offsetHeight;l("Storing current size",i,o),w(r,i,o),d.add(0,function(){if(!f(r))return void l("Aborting because element has been uninstalled");if(!s())return void l("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)?s()?void A(r,i,o):void l("Aborting because element container has not been initialized"):void l("Aborting because element has been uninstalled")}),n&&d.add(2,function(){return f(r)?s()?void n():void l("Aborting because element container has not been initialized"):void l("Aborting because element has been uninstalled")})}function s(){return!!f(r).container}function p(){l("notifyListenersIfNeeded invoked");var e=f(r);return function(){return void 0===f(r).lastNotifiedWidth}()&&e.lastWidth===e.startSize.width&&e.lastHeight===e.startSize.height?l("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?l("Not notifying: Size already notified"):(l("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(l("startanimation triggered."),c(r))return void l("Ignoring since element is still unrendered...");l("Element rendered.");var e=o(r),t=a(r);0!==e.scrollLeft&&0!==e.scrollTop&&0!==t.scrollLeft&&0!==t.scrollTop||(l("Scrollbars out of sync. Updating detector elements..."),n(p))}function g(){if(l("Scroll detected."),c(r))return void l("Scroll event fired while unrendered. Ignoring...");var e=r.offsetWidth,t=r.offsetHeight;e!==f(r).lastWidth||t!==f(r).lastHeight?(l("Element size changed."),n(p)):l("Element size has not changed ("+e+"x"+t+").")}if(l("registerListenersAndPositionElements invoked."),!f(r))return void l("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 q(){if(l("finalizeDomMutation invoked."),!f(r))return void l("Aborting because element has been uninstalled");var e=f(r).style;w(r,e.width,e.height),A(r,e.width,e.height)}function D(){s(r)}function N(){l("Installing..."),b(),m(),d.add(0,y),d.add(1,_),d.add(2,j),d.add(3,q),d.add(4,D)}s||(s=r,r=e,e=null),e=e||{},l("Making detectable..."),!function(e){return!function(e){return e===e.ownerDocument.body||e.ownerDocument.body.contains(e)}(e)||null===getComputedStyle(e)}(r)?N():(l("Element is detached"),H(),l("Waiting until element is attached..."),f(r).onRendered=function(){l("Element is now attached"),N()})}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:l,addListener:s,uninstall:c}}}])});
\No newline at end of file