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

react-pannable

Package Overview
Dependencies
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-pannable - npm Package Compare versions

Comparing version 6.1.4 to 6.1.5

4

cjs/pad/ListContent.js
"use strict";
exports.__esModule = true;
exports.default = exports.ListContent = void 0;
exports.default = exports.ListContent = exports.ListItem = void 0;

@@ -38,2 +38,4 @@ var _PadContext = _interopRequireDefault(require("./PadContext"));

exports.ListItem = ListItem;
var ListContent = _react.default.memo(function (props) {

@@ -40,0 +42,0 @@ var itemCount = props.itemCount,

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactPannable={},e.React)}(this,(function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(t),i={exports:{}};(i.exports={}).forEach=function(e,t){for(var n=0;e.length>n;n++){var r=t(e[n]);if(r)return r}};var o={exports:{}},a=o.exports={};a.isIE=function(e){return(-1!==(t=navigator.userAgent.toLowerCase()).indexOf("msie")||-1!==t.indexOf("trident")||-1!==t.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:undefined}());var t},a.isLegacyOpera=function(){return!!window.opera};var c={exports:{}};(c.exports={}).getOption=function(e,t,n){var r=e[t];if(null==r&&void 0!==n)return n;return r};var l=c.exports;function u(){var e={},t=0,n=0,r=0;return{add:function(i,o){o||(o=i,i=0),i>n?n=i:r>i&&(r=i),e[i]||(e[i]=[]),e[i].push(o),t++},process:function(){for(var t=r;n>=t;t++)for(var i=e[t],o=0;i.length>o;o++){(0,i[o])()}},size:function(){return t}}}function s(e){return e._erd}var d=o.exports,f=i.exports.forEach,h=i.exports.forEach,p=function(e){var t=e.stateHandler.getState;return{isDetectable:function(e){var n=t(e);return n&&!!n.isDetectable},markAsDetectable:function(e){t(e).isDetectable=!0},isBusy:function(e){return!!t(e).busy},markBusy:function(e,n){t(e).busy=!!n}}},y=function(e){var t={};function n(n){var r=e.get(n);return void 0===r?[]:t[r]||[]}return{get:n,add:function(n,r){var i=e.get(n);t[i]||(t[i]=[]),t[i].push(r)},removeListener:function(e,t){for(var r=n(e),i=0,o=r.length;o>i;++i)if(r[i]===t){r.splice(i,1);break}},removeAllListeners:function(e){var t=n(e);t&&(t.length=0)}}},v=function(){var e=1;return{generate:function(){return e++}}},g=function(e){var t=e.idGenerator,n=e.stateHandler.getState;return{get:function(e){var t=n(e);return t&&void 0!==t.id?t.id:null},set:function(e){var r=n(e);if(!r)throw Error("setId required the element to have a resize detection state.");var i=t.generate();return r.id=i,i}}},b=function(e){function t(){}var n={log:t,warn:t,error:t};if(!e&&window.console){var r=function(e,t){e[t]=function(){var e=console[t];if(e.apply)e.apply(console,arguments);else for(var n=0;arguments.length>n;n++)e(arguments[n])}};r(n,"log"),r(n,"warn"),r(n,"error")}return n},m=o.exports,O=function(e){var t=(e=e||{}).reporter,n=l.getOption(e,"async",!0),r=l.getOption(e,"auto",!0);r&&!n&&(t&&t.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),n=!0);var i,o=u(),a=!1;function c(){for(a=!0;o.size();){var e=o;o=u(),e.process()}a=!1}function s(){i=setTimeout(c,0)}return{add:function(e,t){!a&&r&&n&&0===o.size()&&s(),o.add(e,t)},force:function(e){a||(void 0===e&&(e=n),i&&(clearTimeout(i),i=null),e?s():c())}}},w={initState:function(e){return e._erd={},s(e)},getState:s,cleanState:function(e){delete e._erd}},x=function(e){var t=(e=e||{}).reporter,n=e.batchProcessor,r=e.stateHandler.getState;if(!t)throw Error("Missing required dependency: reporter.");function i(t){var n=e.important?" !important; ":"; ";return(t.join(n)+n).trim()}function o(e){return r(e).object}return{makeDetectable:function(e,o,a){a||(a=o,o=e,e=null),e=e||{},d.isIE(8)?a(o):function(o,a){var c=i(["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"]),l=!1,u=window.getComputedStyle(o),s=o.offsetWidth,f=o.offsetHeight;function h(){function n(){if("static"===u.position){o.style.setProperty("position","relative",e.important?"important":"");var n=function(t,n,r,i){var o=r[i];"auto"!==o&&"0"!==function(e){return e.replace(/[^-\d\.]/g,"")}(o)&&(t.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: ",n),n.style.setProperty(i,"0",e.important?"important":""))};n(t,o,u,"top"),n(t,o,u,"right"),n(t,o,u,"bottom"),n(t,o,u,"left")}}""!==u.position&&(n(),l=!0);var i=document.createElement("object");i.style.cssText=c,i.tabIndex=-1,i.type="text/html",i.setAttribute("aria-hidden","true"),i.onload=function(){l||n(),function e(t,n){if(!t.contentDocument){var i=r(t);return i.checkForObjectDocumentTimeoutId&&window.clearTimeout(i.checkForObjectDocumentTimeoutId),void(i.checkForObjectDocumentTimeoutId=setTimeout((function(){i.checkForObjectDocumentTimeoutId=0,e(t,n)}),100))}n(t.contentDocument)}(this,(function(e){a(o)}))},d.isIE()||(i.data="about:blank"),r(o)&&(o.appendChild(i),r(o).object=i,d.isIE()&&(i.data="about:blank"))}r(o).startSize={width:s,height:f},n?n.add(h):h()}(o,a)},addListener:function(e,t){function n(){t(e)}if(d.isIE(8))r(e).object={proxy:n},e.attachEvent("onresize",n);else{var i=o(e);if(!i)throw Error("Element is not detectable by this strategy.");i.contentDocument.defaultView.addEventListener("resize",n)}},uninstall:function(e){if(r(e)){var t=o(e);t&&(d.isIE(8)?e.detachEvent("onresize",t.proxy):e.removeChild(t),r(e).checkForObjectDocumentTimeoutId&&window.clearTimeout(r(e).checkForObjectDocumentTimeoutId),delete r(e).object)}}}},j=function(e){var t=(e=e||{}).reporter,n=e.batchProcessor,r=e.stateHandler.getState,i=e.idHandler;if(!n)throw Error("Missing required dependency: batchProcessor");if(!t)throw Error("Missing required dependency: reporter.");var o=function(){var e=500,t=500,n=document.createElement("div");n.style.cssText=l(["position: absolute","width: 1000px","height: 1000px","visibility: hidden","margin: 0","padding: 0"]);var r=document.createElement("div");r.style.cssText=l(["position: absolute","width: 500px","height: 500px","overflow: scroll","visibility: none","top: -1500px","left: -1500px","visibility: hidden","margin: 0","padding: 0"]),r.appendChild(n),document.body.insertBefore(r,document.body.firstChild);var i=e-r.clientWidth,o=t-r.clientHeight;return document.body.removeChild(r),{width:i,height:o}}(),a="erd_scroll_detection_container";function c(e){!function(e,t,n){function r(n,r){r=r||function(t){e.head.appendChild(t)};var i=e.createElement("style");return i.innerHTML=n,i.id=t,r(i),i}if(!e.getElementById(t)){var i=n+"_animation",o=n+"_animation_active",a="/* Created by the element-resize-detector library. */\n";a+="."+n+" > div::-webkit-scrollbar { "+l(["display: none"])+" }\n\n",a+="."+o+" { "+l(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+i,"animation-name: "+i])+" }\n",a+="@-webkit-keyframes "+i+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n",r(a+="@keyframes "+i+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }")}}(e,"erd_scroll_detection_scrollbar_style",a)}function l(t){var n=e.important?" !important; ":"; ";return(t.join(n)+n).trim()}function u(e,n,r){if(e.addEventListener)e.addEventListener(n,r);else{if(!e.attachEvent)return t.error("[scroll] Don't know how to add event listeners.");e.attachEvent("on"+n,r)}}function s(e,n,r){if(e.removeEventListener)e.removeEventListener(n,r);else{if(!e.detachEvent)return t.error("[scroll] Don't know how to remove event listeners.");e.detachEvent("on"+n,r)}}function d(e){return r(e).container.childNodes[0].childNodes[0].childNodes[0]}function h(e){return r(e).container.childNodes[0].childNodes[0].childNodes[1]}return c(window.document),{makeDetectable:function(e,c,s){function p(){if(e.debug){var n=Array.prototype.slice.call(arguments);if(n.unshift(i.get(c),"Scroll: "),t.log.apply)t.log.apply(null,n);else for(var r=0;n.length>r;r++)t.log(n[r])}}function y(e){var t=r(e).container.childNodes[0],n=window.getComputedStyle(t);return!n.width||-1===n.width.indexOf("px")}function v(){var e=window.getComputedStyle(c),t={};return t.position=e.position,t.width=c.offsetWidth,t.height=c.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(){if(p("storeStyle invoked."),r(c)){var e=v();r(c).style=e}else p("Aborting because element has been uninstalled")}function b(e,t,n){r(e).lastWidth=t,r(e).lastHeight=n}function m(){return 2*o.width+1}function O(){return 2*o.height+1}function w(e){return e+10+m()}function x(e){return e+10+O()}function j(e,t,n){var r=d(e),i=h(e),o=w(t),a=x(n),c=function(e){return 2*e+m()}(t),l=function(e){return 2*e+O()}(n);r.scrollLeft=o,r.scrollTop=a,i.scrollLeft=c,i.scrollTop=l}function E(){var e=r(c).container;if(!e){(e=document.createElement("div")).className=a,e.style.cssText=l(["visibility: hidden","display: inline","width: 0px","height: 0px","z-index: -1","overflow: hidden","margin: 0","padding: 0"]),r(c).container=e,function(e){e.className+=" "+a+"_animation_active"}(e),c.appendChild(e);var t=function(){r(c).onRendered&&r(c).onRendered()};u(e,"animationstart",t),r(c).onAnimationStart=t}return e}function P(){if(p("Injecting elements"),r(c)){!function(){var n=r(c).style;if("static"===n.position){c.style.setProperty("position","relative",e.important?"important":"");var i=function(e,t,n,r){var i=n[r];"auto"!==i&&"0"!==function(e){return e.replace(/[^-\d\.]/g,"")}(i)&&(e.warn("An element that is positioned static has style."+r+"="+i+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+r+" will be set to 0. Element: ",t),t.style[r]=0)};i(t,c,n,"top"),i(t,c,n,"right"),i(t,c,n,"bottom"),i(t,c,n,"left")}}();var n=r(c).container;n||(n=E());var i,s,d,f,h=o.width,y=o.height,v=l(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden","width: 100%","height: 100%","left: 0px","top: 0px"]),g=l(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden"].concat(["left: "+(i=(i=-(1+h))?i+"px":"0"),"top: "+(s=(s=-(1+y))?s+"px":"0"),"right: "+(f=(f=-h)?f+"px":"0"),"bottom: "+(d=(d=-y)?d+"px":"0")])),b=l(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),m=l(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),O=l(["position: absolute","left: 0","top: 0"]),w=l(["position: absolute","width: 200%","height: 200%"]),x=document.createElement("div"),j=document.createElement("div"),P=document.createElement("div"),S=document.createElement("div"),z=document.createElement("div"),D=document.createElement("div");x.dir="ltr",x.style.cssText=v,x.className=a,j.className=a,j.style.cssText=g,P.style.cssText=b,S.style.cssText=O,z.style.cssText=m,D.style.cssText=w,P.appendChild(S),z.appendChild(D),j.appendChild(P),j.appendChild(z),x.appendChild(j),n.appendChild(x),u(P,"scroll",I),u(z,"scroll",T),r(c).onExpandScroll=I,r(c).onShrinkScroll=T}else p("Aborting because element has been uninstalled");function I(){r(c).onExpand&&r(c).onExpand()}function T(){r(c).onShrink&&r(c).onShrink()}}function S(){function o(t,n,r){var i=function(e){return d(e).childNodes[0]}(t),o=w(n),a=x(r);i.style.setProperty("width",o+"px",e.important?"important":""),i.style.setProperty("height",a+"px",e.important?"important":"")}function a(a){var u=c.offsetWidth,s=c.offsetHeight,d=u!==r(c).lastWidth||s!==r(c).lastHeight;p("Storing current size",u,s),b(c,u,s),n.add(0,(function(){if(d)if(r(c))if(l()){if(e.debug)c.offsetWidth===u&&c.offsetHeight===s||t.warn(i.get(c),"Scroll: Size changed before updating detector elements.");o(c,u,s)}else p("Aborting because element container has not been initialized");else p("Aborting because element has been uninstalled")})),n.add(1,(function(){r(c)?l()?j(c,u,s):p("Aborting because element container has not been initialized"):p("Aborting because element has been uninstalled")})),d&&a&&n.add(2,(function(){r(c)?l()?a():p("Aborting because element container has not been initialized"):p("Aborting because element has been uninstalled")}))}function l(){return!!r(c).container}function u(){p("notifyListenersIfNeeded invoked");var e=r(c);return void 0===r(c).lastNotifiedWidth&&e.lastWidth===e.startSize.width&&e.lastHeight===e.startSize.height?p("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?p("Not notifying: Size already notified"):(p("Current size not notified, notifying..."),e.lastNotifiedWidth=e.lastWidth,e.lastNotifiedHeight=e.lastHeight,void f(r(c).listeners,(function(e){e(c)})))}function s(){p("Scroll detected."),y(c)?p("Scroll event fired while unrendered. Ignoring..."):a(u)}if(p("registerListenersAndPositionElements invoked."),r(c)){r(c).onRendered=function(){if(p("startanimation triggered."),y(c))p("Ignoring since element is still unrendered...");else{p("Element rendered.");var e=d(c),t=h(c);0!==e.scrollLeft&&0!==e.scrollTop&&0!==t.scrollLeft&&0!==t.scrollTop||(p("Scrollbars out of sync. Updating detector elements..."),a(u))}},r(c).onExpand=s,r(c).onShrink=s;var v=r(c).style;o(c,v.width,v.height)}else p("Aborting because element has been uninstalled")}function z(){if(p("finalizeDomMutation invoked."),r(c)){var e=r(c).style;b(c,e.width,e.height),j(c,e.width,e.height)}else p("Aborting because element has been uninstalled")}function D(){s(c)}function I(){var e;p("Installing..."),r(c).listeners=[],e=v(),r(c).startSize={width:e.width,height:e.height},p("Element start size",r(c).startSize),n.add(0,g),n.add(1,P),n.add(2,S),n.add(3,z),n.add(4,D)}s||(s=c,c=e,e=null),e=e||{},p("Making detectable..."),!function(e){return!function(e){var t=e.getRootNode&&e.getRootNode().contains(e);return e===e.ownerDocument.body||e.ownerDocument.body.contains(e)||t}(e)||null===window.getComputedStyle(e)}(c)?I():(p("Element is detached"),E(),p("Waiting until element is attached..."),r(c).onRendered=function(){p("Element is now attached"),I()})},addListener:function(e,t){if(!r(e).listeners.push)throw Error("Cannot add listener to an element that is not detectable.");r(e).listeners.push(t)},uninstall:function(e){var t=r(e);t&&(t.onExpandScroll&&s(d(e),"scroll",t.onExpandScroll),t.onShrinkScroll&&s(h(e),"scroll",t.onShrinkScroll),t.onAnimationStart&&s(t.container,"animationstart",t.onAnimationStart),t.container&&e.removeChild(t.container))},initDocument:c}};function E(e){return Array.isArray(e)||void 0!==e.length}function P(e){if(Array.isArray(e))return e;var t=[];return h(e,(function(e){t.push(e)})),t}function S(e){return e&&1===e.nodeType}var z;function D(e,t,n){var r=e[t];return null==r&&void 0!==n?n:r}function I(){return"undefined"==typeof window?null:(z||(z=function(e){var t;if((e=e||{}).idHandler)t={get:function(t){return e.idHandler.get(t,!0)},set:e.idHandler.set};else{var n=v(),r=g({idGenerator:n,stateHandler:w});t=r}var i=e.reporter;i||(i=b(!1===i));var o=D(e,"batchProcessor",O({reporter:i})),a={};a.callOnAdd=!!D(e,"callOnAdd",!0),a.debug=!!D(e,"debug",!1);var c,l=y(t),u=p({stateHandler:w}),s=D(e,"strategy","object"),d=D(e,"important",!1),f={reporter:i,batchProcessor:o,stateHandler:w,idHandler:t,important:d};if("scroll"===s&&(m.isLegacyOpera()?(i.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),s="object"):m.isIE(9)&&(i.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),s="object")),"scroll"===s)c=j(f);else{if("object"!==s)throw Error("Invalid strategy name: "+s);c=x(f)}var z={};return{listenTo:function(e,n,r){function o(e){var t=l.get(e);h(t,(function(t){t(e)}))}function s(e,t,n){l.add(t,n),e&&n(t)}if(r||(r=n,n=e,e={}),!n)throw Error("At least one element required.");if(!r)throw Error("Listener required.");if(S(n))n=[n];else{if(!E(n))return i.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");n=P(n)}var f=0,p=D(e,"callOnAdd",a.callOnAdd),y=D(e,"onReady",(function(){})),v=D(e,"debug",a.debug);h(n,(function(e){w.getState(e)||(w.initState(e),t.set(e));var a=t.get(e);if(v&&i.log("Attaching listener to element",a,e),!u.isDetectable(e))return v&&i.log(a,"Not detectable."),u.isBusy(e)?(v&&i.log(a,"System busy making it detectable"),s(p,e,r),z[a]=z[a]||[],void z[a].push((function(){++f===n.length&&y()}))):(v&&i.log(a,"Making detectable..."),u.markBusy(e,!0),c.makeDetectable({debug:v,important:d},e,(function(e){if(v&&i.log(a,"onElementDetectable"),w.getState(e)){u.markAsDetectable(e),u.markBusy(e,!1),c.addListener(e,o),s(p,e,r);var t=w.getState(e);t&&t.startSize&&(t.startSize.width===e.offsetWidth&&t.startSize.height===e.offsetHeight||o(e)),z[a]&&h(z[a],(function(e){e()}))}else v&&i.log(a,"Element uninstalled before being detectable.");delete z[a],++f===n.length&&y()})));v&&i.log(a,"Already detecable, adding listener."),s(p,e,r),f++})),f===n.length&&y()},removeListener:l.removeListener,removeAllListeners:l.removeAllListeners,uninstall:function(e){if(!e)return i.error("At least one element is required.");if(S(e))e=[e];else{if(!E(e))return i.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");e=P(e)}h(e,(function(e){l.removeAllListeners(e),c.uninstall(e),w.cleanState(e)}))},initDocument:function(e){c.initDocument&&c.initDocument(e)}}}({strategy:"scroll"})),z)}function T(e,t){return!(!e||!t)&&(e===t||e.width===t.width&&e.height===t.height)}var k="undefined"==typeof window?t.useEffect:t.useLayoutEffect,R=["width","height","onResize","render","children"];function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){L(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function L(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A(){return(A=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var H=r.default.memo((function(e){var n=e.width,i=e.height,o=e.onResize,a=e.render,c=e.children,l=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;o.length>r;r++)0>t.indexOf(n=o[r])&&(i[n]=e[n]);return i}(e,R),u=t.useMemo((function(){return void 0!==n&&void 0!==i?{width:n,height:i}:null}),[n,i]),s=t.useState(),d=s[0],f=s[1],h=t.useRef(d),p=t.useRef(null),y={onResize:o},v=t.useRef(y);v.current=y;var g=t.useCallback((function(){var e=p.current;if(e){var t={width:e.offsetWidth,height:e.offsetHeight};f((function(e){return T(e,t)?e:t}))}}),[]);k((function(){var e=h.current;h.current=d,d&&!T(e,d)&&v.current.onResize&&v.current.onResize(d)}),[d]),k((function(){if(u)f((function(e){return T(e,u)?e:u}));else{g();var e=I(),t=p.current;if(e&&t)return e.listenTo(t,g),function(){e.uninstall(t)}}}),[u,g]);var b=t.useMemo((function(){var e={width:"100%",height:"100%"};return l.style&&A(e,l.style),void 0!==n&&(e.width=n),void 0!==i&&(e.height=i),e}),[n,i,l.style]);l.style=b;var m=c;return d?a&&(m=a(d)):m=null,r.default.createElement("div",M(M({},l),{},{ref:p}),m)}));function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function N(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){F(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var V={target:null,translation:null,velocity:{x:0,y:0},interval:0,startPoint:{x:0,y:0},movePoint:{x:0,y:0},moveTime:0,cancelled:!0},_=function(e,t){switch(t.type){case"reset":return V;case"track":return q(e,t);case"move":return B(e,t);case"start":return X(e);case"end":return Y(e);default:return e}},q=function(e,t){var n=t.payload,r=n.target,i=n.point,o=(new Date).getTime();return N(N({},e),{},{target:r,translation:null,velocity:{x:0,y:0},interval:0,startPoint:i,movePoint:i,moveTime:o})},B=function(e,t){var n=t.payload.point,r=e.startPoint,i=e.movePoint,o=e.moveTime,a=e.translation;if(!e.target)return e;var c=(new Date).getTime(),l=c-o,u={x:(n.x-i.x)/l,y:(n.y-i.y)/l};if(!a)return N(N({},e),{},{velocity:u,interval:l,movePoint:n,moveTime:c});var s={x:n.x-r.x,y:n.y-r.y};return N(N({},e),{},{translation:s,velocity:u,interval:l,movePoint:n,moveTime:c})},X=function(e){var t=e.movePoint;return!e.target||e.translation?e:N(N({},e),{},{translation:{x:0,y:0},startPoint:t,cancelled:!0})},Y=function(e){return e.target?N(N({},e),{},{target:null,translation:null,cancelled:!1}):e};function G(e,t,n,r){var i=function(){};return e&&e.addEventListener&&(e.addEventListener(t,n,r),i=function(){e.removeEventListener(t,n,r)}),i}var U=["disabled","shouldStart","onTrackStart","onTrackEnd","onTrackCancel","onStart","onMove","onEnd","onCancel","render","children"];function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){Q(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z(){return(Z=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var $="undefined"!=typeof window&&"ontouchstart"in window,ee=r.default.memo((function(e){var n=e.disabled,i=e.shouldStart,o=e.onTrackStart,a=e.onTrackEnd,c=e.onTrackCancel,l=e.onStart,u=e.onMove,s=e.onEnd,d=e.onCancel,f=e.render,h=e.children,p=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;o.length>r;r++)0>t.indexOf(n=o[r])&&(i[n]=e[n]);return i}(e,U),y=t.useReducer(_,V),v=y[0],g=y[1],b=t.useRef(v),m=t.useRef(null),O=!!v.target,w=!!v.translation;k((function(){var e=b.current;b.current=v;var t=m.current;if(t)if(null===v.target){if(e.target){if(e.translation){var n={currentTarget:t,target:e.target,translation:e.translation,velocity:e.velocity,interval:e.interval};v.cancelled?d&&d(n):s&&s(n)}var r={currentTarget:t,target:e.target,translation:e.translation,velocity:e.velocity,interval:e.interval};v.cancelled?c&&c(r):a&&a(r)}}else{if(null===e.target)o&&o({currentTarget:t,target:v.target,translation:v.translation,velocity:v.velocity,interval:v.interval});if(null===v.translation){var f={x:v.movePoint.x-v.startPoint.x,y:v.movePoint.y-v.startPoint.y};if(Math.sqrt(Math.pow(f.x,2)+Math.pow(f.y,2))>0)i?i({currentTarget:t,target:v.target,translation:f,velocity:v.velocity,interval:v.interval})&&g({type:"start"}):g({type:"start"})}else{var h={currentTarget:t,target:v.target,translation:v.translation,velocity:v.velocity,interval:v.interval};null===e.translation?l&&l(h):e.translation!==v.translation&&u&&u(h)}}})),k((function(){if(n)O&&g({type:"reset"});else{var e=m.current;if(e){var t=function(e,t){g({type:"track",payload:{target:e,point:t}})},r=function(e){g({type:"move",payload:{point:e}})},i=function(){g({type:"end",payload:null})};if(O){if($){var o=function(e){w&&e.cancelable&&e.stopImmediatePropagation(),i()},a=document.body,c=G(a,"touchmove",(function(e){if(w&&e.cancelable&&e.stopImmediatePropagation(),1===e.touches.length){var t=e.touches[0];r({x:t.pageX,y:t.pageY})}else i()})),l=G(a,"touchend",o),u=G(a,"touchcancel",o);return function(){c(),l(),u()}}var s=document.body,d=G(s,"mousemove",(function(e){w&&(e.preventDefault(),e.stopImmediatePropagation()),void 0===e.buttons||1===e.buttons?r({x:e.pageX,y:e.pageY}):i()})),f=G(s,"mouseup",(function(e){w&&(e.preventDefault(),e.stopImmediatePropagation()),i()}));return function(){d(),f()}}if($){var h=function(e){e.preventDefault()},p=G(e,"touchstart",(function(e){if(1===e.touches.length){var n=e.touches[0];t(n.target,{x:n.pageX,y:n.pageY})}}));return window.addEventListener("contextmenu",h),function(){p(),window.removeEventListener("contextmenu",h)}}var y=G(e,"mousedown",(function(e){!e.target||void 0!==e.buttons&&1!==e.buttons||t(e.target,{x:e.pageX,y:e.pageY})}));return function(){y()}}}}),[n,O,w]);var x=t.useMemo((function(){var e={};return w&&Z(e,{touchAction:"none",pointerEvents:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"}),p.style&&Z(e,p.style),e}),[w,p.style]);return p.style=x,r.default.createElement("div",K(K({},p),{},{ref:m}),f?f(v):h)}));function te(e){function t(t){return Math.max(-2.5,Math.min(e[t],2.5))}var n={x:t("x"),y:t("y")};return n.x===e.x&&n.y===e.y?e:n}function ne(e,t,n,r,i,o){function a(a){var c="x"===a?["width","left","right"]:["height","top","bottom"],l=c[0],u=t[l],s=e[a];if(-1===i[a])return s;var d=Math.min(u-(r[c[1]]+n[l]+r[c[2]]),0);return o&&u>0&&(d=u*Math.ceil(d/u)),Math.max(d,Math.min(s,0))}var c={x:a("x"),y:a("y")};return c.x===e.x&&c.y===e.y?e:c}function re(e,t,n,r,i){var o,a,c,l="number"==typeof i?(o=i,0===(c=Math.sqrt((a=t).x*a.x+a.y*a.y))?{x:0,y:0}:{x:o*(a.x/c),y:o*(a.y/c)}):i;function u(i){var o="x"===i?"width":"height",a=e[i],c=t[i];if(r&&n[o]>0){var u=a/n[o];a=n[o]*(u=c>.5?Math.ceil(u):-.5>c?Math.floor(u):Math.round(u))}else l[i]&&(a+=c*(c/l[i])/2);return a}return{x:u("x"),y:u("y")}}function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oe(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(n),!0).forEach((function(t){ae(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ae(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ce=.025,le={size:{width:0,height:0},contentSize:{width:0,height:0},contentInset:{top:0,right:0,bottom:0,left:0},contentOffset:{x:0,y:0},contentVelocity:{x:0,y:0},drag:null,deceleration:null,bound:{x:1,y:1},pagingEnabled:!1,directionalLockEnabled:!1,pannable:V},ue=function(e,t){switch(t.type){case"setState":return de(se(e,t));case"dragStart":return fe(e);case"dragMove":return he(e);case"dragEnd":return pe(e);case"dragCancel":return ye(e);case"decelerate":return de(ve(e));case"scrollTo":return de(ge(e,t));default:return e}},se=function(e,t){return oe(oe({},e),t.payload)},de=function(e){var t=e.size,n=e.contentSize,r=e.contentInset,i=e.contentOffset,o=e.contentVelocity,a=e.drag,c=e.deceleration,l=e.pagingEnabled,u=e.bound,s=ce;if(c){var d=c.endOffset,f=ne(i,t,n,r,u,l);if(d!==ne(d,t,n,r,u,l)&&i!==f){var h=i,p=te(o);return 0===u.x&&(p=oe(oe({},p),{},{x:0}),h=oe(oe({},h),{},{x:f.x})),0===u.y&&(p=oe(oe({},p),{},{y:0}),h=oe(oe({},h),{},{y:f.y})),c.rate!==s&&(d=re(h,p,t,l,s)),d=ne(d,t,n,r,u,l),oe(oe({},e),{},{contentOffset:h,contentVelocity:p,drag:null,deceleration:Oe(d,s,h,p)})}}else if(!a){var y=re(i,o,t,l,s);if((y=ne(y,t,n,r,u,l)).x!==i.x||y.y!==i.y)return oe(oe({},e),{},{drag:null,deceleration:Oe(y,s,i,o)})}return e},fe=function(e){var t=e.contentOffset,n=e.pannable.velocity;if(!n)return e;var r={x:1,y:1};e.directionalLockEnabled&&(Math.abs(n.x)>Math.abs(n.y)?r.y=0:r.x=0);var i={x:r.x*n.x,y:r.y*n.y};return oe(oe({},e),{},{contentVelocity:i,drag:{direction:r,startOffset:t},deceleration:null})},he=function(e){var t=e.contentOffset,n=e.drag,r=e.pannable,i=r.translation,o=r.interval;if(!n||!i||!o)return e;var a={x:n.startOffset.x+n.direction.x*i.x,y:n.startOffset.y+n.direction.y*i.y},c={x:((a=function(e,t,n,r,i){function o(o){var a="x"===o?["width","height","left","right"]:["height","width","top","bottom"],c=a[0],l=a[1],u=e[o],s=i[o];if(-1===s)return u;var d=Math.min(t[c]-(r[a[2]]+n[c]+r[a[3]]),0),f=Math.min(t[c],t[l])/2;return u>0?0===s?0:f*(1-f/(f+u)):d>u?0===s?d:d-f*(1-f/(f-u+d)):u}var a={x:o("x"),y:o("y")};return a.x===e.x&&a.y===e.y?e:a}(a,e.size,e.contentSize,e.contentInset,e.bound)).x-t.x)/o,y:(a.y-t.y)/o};return oe(oe({},e),{},{contentOffset:a,contentVelocity:c})},pe=function(e){var t=e.contentOffset,n=e.size,r=e.pagingEnabled,i=r?ce:.0025,o=te(e.contentVelocity),a=re(t,o,n,r,i);return oe(oe({},e),{},{contentVelocity:o,drag:null,deceleration:Oe(a,i,t,o)})},ye=function(e){var t=e.contentOffset,n=e.drag,r=e.size,i=e.pagingEnabled;if(!n)return e;var o=te(e.contentVelocity),a=re(n.startOffset,{x:0,y:0},r,i,.025);return oe(oe({},e),{},{contentVelocity:o,drag:null,deceleration:Oe(a,.025,t,o)})},ve=function(e){var t=e.deceleration;if(!t)return e;var n=me(t),r=n.offset,i=n.velocity,o=n.didEnd;return oe(oe({},e),{},{contentOffset:r,contentVelocity:i,drag:null,deceleration:o?null:t})},ge=function(e,t){var n=e.contentOffset,r=e.size,i=t.payload,o=i.offset,a=void 0===o?{x:0,y:0}:o,c=i.point,l=i.align,u=void 0===l?0:l,s=i.animated,d=i.rect,f=void 0===s?-1:s;"boolean"==typeof f&&(f=f?1:-1),e.drag&&(f=-1),d||(d=c?oe(oe({},c),{},{width:0,height:0}):{x:-a.x,y:-a.y,width:0,height:0});var h=function(e,t,n,r){var i="object"==typeof t?t:{x:t,y:t};function o(t){var o="x"===t?"width":"height",a=-e[t],c=i[t],l=r[o]-e[o];if("auto"===c){var u=0>l?-1:1;a+=u*Math.max(0,Math.min(u*(n[t]-a),u*l))}else"start"===c?c=0:"center"===c?c=.5:"end"===c&&(c=1),a+=c*l;return a}return{x:o("x"),y:o("y")}}(d,u,n,r);return be(e,{type:"setContentOffset",payload:{offset:h,animated:f}})},be=function(e,t){var n=e.contentOffset,r=e.contentVelocity,i=e.drag,o=e.deceleration,a=e.size,c=e.pagingEnabled,l=t.payload,u=l.offset,s=l.animated;if(1===s){var d=re(u,{x:0,y:0},a,c,ce);return oe(oe({},e),{},{drag:null,deceleration:Oe(d,ce,n,r)})}if(i)return oe(oe({},e),{},{contentOffset:u,drag:oe(oe({},i),{},{startOffset:{x:i.startOffset.x+u.x-n.x,y:i.startOffset.y+u.y-n.y}})});if(o){if(0===s)return oe(oe({},e),{},{contentOffset:u,contentVelocity:{x:0,y:0},deceleration:null});var f=re({x:o.endOffset.x+u.x-n.x,y:o.endOffset.y+u.y-n.y},{x:0,y:0},a,c,o.rate);return oe(oe({},e),{},{contentOffset:u,deceleration:Oe(f,o.rate,u,r)})}return oe(oe({},e),{},{contentOffset:u})};function me(e){var t=e.points,n=e.duration,r=e.startTime,i=e.endOffset;function o(e,r){var i=t[e],o=i[0],a=i[1],c=i[2],l=i[3];return[o-3*(o-a)*r+3*(o-2*a+c)*Math.pow(r,2)-(o-3*a+3*c-l)*Math.pow(r,3),(-3*(o-a)+6*(o-2*a+c)*r-3*(o-3*a+3*c-l)*Math.pow(r,2))/n]}var a=(new Date).getTime(),c=1;if(n>0&&(c=(a-r)/n),0>c||c>=1)return{offset:i,velocity:{x:0,y:0},didEnd:!0};var l=o("x",c),u=l[0],s=l[1],d=o("y",c);return{offset:{x:u,y:d[0]},velocity:{x:s,y:d[1]},didEnd:!1}}function Oe(e,t,n,r){var i=(new Date).getTime(),o=0;if(0>=t)throw Error("Rate needs more than 0.");var a,c={x:e.x-n.x,y:e.y-n.y},l=Math.sqrt(Math.pow(c.x,2)+Math.pow(c.y,2));if(l){var u=Math.sqrt(Math.pow(a=(r.x*c.x+r.y*c.y)/l,2)/2+t*l),s=(u-a)/t;0>s&&(u=a,s=0),o=s+u/t}else a=Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2)),o=(Math.sqrt(2)+1)*a/t;return{endOffset:e,rate:t,duration:o,startTime:i,points:{x:[n.x,n.x+r.x*(o/3),e.x,e.x],y:[n.y,n.y+r.y*(o/3),e.y,e.y]}}}var we,xe,je=r.default.createContext({visibleRect:{x:0,y:0,width:0,height:0},onResize:function(){}});if("undefined"!=typeof window){we=window.requestAnimationFrame,xe=window.cancelAnimationFrame;for(var Ee=["ms","moz","webkit","o"],Pe=window,Se=0;!we&&4>Se;)we=Pe[Ee[Se]+"RequestAnimationFrame"],xe=Pe[Ee[Se]+"CancelAnimationFrame"]||Pe[Ee[Se]+"CancelRequestAnimationFrame"],Se++;if(!we){var ze=0;we=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-ze)),r=window.setTimeout((function(){e(t+n)}),n);return ze=t+n,r},xe=function(e){window.clearTimeout(e)}}}function De(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ie(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?De(Object(n),!0).forEach((function(t){Te(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):De(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Te(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ke=r.default.memo((function(e){var n=e.pannable,i=e.size,o=e.pagingEnabled,a=e.directionalLockEnabled,c=e.bound,l=e.contentInset,u=e.contentStyle,s=e.onScroll,d=e.onStartDragging,f=e.onEndDragging,h=e.onStartDecelerating,p=e.onEndDecelerating,y=e.onResizeContent,v=e.renderBackground,g=e.renderOverlay,b=e.render,m=t.useReducer(ue,le),O=m[0],w=m[1],x=t.useRef(O),j={onScroll:s,onStartDragging:d,onEndDragging:f,onStartDecelerating:h,onEndDecelerating:p,onResizeContent:y},E=t.useRef(j);E.current=j;var P=t.useRef({scrollTo:function(e){w({type:"scrollTo",payload:e})}}),S=t.useCallback((function(e){w({type:"setState",payload:{contentSize:e}})}),[]);k((function(){w({type:"setState",payload:{pannable:n}})}),[n]),k((function(){w({type:"setState",payload:{size:i,bound:c,contentInset:l,pagingEnabled:o,directionalLockEnabled:a}})}),[i,c,l,o,a]),k((function(){var e=x.current;x.current=O,e.pannable.translation!==O.pannable.translation&&w(O.pannable.translation?e.pannable.translation?{type:"dragMove"}:{type:"dragStart"}:O.pannable.cancelled?{type:"dragCancel"}:{type:"dragEnd"}),e.contentSize!==O.contentSize&&E.current.onResizeContent&&E.current.onResizeContent(O.contentSize);var t={size:O.size,contentSize:O.contentSize,contentInset:O.contentInset,contentOffset:O.contentOffset,contentVelocity:O.contentVelocity,dragging:!!O.drag,decelerating:!!O.deceleration};if(e.contentOffset!==O.contentOffset&&E.current.onScroll&&E.current.onScroll(t),e.drag!==O.drag&&(e.drag?O.drag||E.current.onEndDragging&&E.current.onEndDragging(t):E.current.onStartDragging&&E.current.onStartDragging(t)),e.deceleration!==O.deceleration&&(e.deceleration?O.deceleration||E.current.onEndDecelerating&&E.current.onEndDecelerating(t):E.current.onStartDecelerating&&E.current.onStartDecelerating(t)),O.deceleration){var n=we((function(){w({type:"decelerate"})}));return function(){xe(n)}}}),[O]);var z=v?v(O,P.current):null,D=g?g(O,P.current):null,I=b(O,P.current),T=t.useMemo((function(){return Ie(Ie({willChange:"transform",overflow:"hidden",position:"absolute",left:O.contentInset.left,top:O.contentInset.top,width:O.contentSize.width,height:O.contentSize.height},{WebkitTransform:"translate3d("+(e=O.contentOffset).x+"px, "+e.y+"px, 0)",msTransform:"translate("+e.x+"px, "+e.y+"px)",transform:"translate3d("+e.x+"px, "+e.y+"px, 0)"}),u);var e}),[O.contentOffset,O.contentSize,O.contentInset,u]),R=t.useMemo((function(){return{visibleRect:{x:-O.contentOffset.x,y:-O.contentOffset.y,width:O.size.width,height:O.size.height},onResize:S}}),[O.contentOffset,O.size,S]);return r.default.createElement(r.default.Fragment,null,z,r.default.createElement("div",{style:T},r.default.createElement(je.Provider,{value:R},I)),D)})),Re=["width","height","pagingEnabled","directionalLockEnabled","boundX","boundY","contentInsetTop","contentInsetRight","contentInsetBottom","contentInsetLeft","contentStyle","onScroll","onStartDragging","onEndDragging","onStartDecelerating","onEndDecelerating","onResizeContent","renderBackground","renderOverlay","render","scrollTo","children"];function Ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Me(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ce(Object(n),!0).forEach((function(t){Le(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ae(){return(Ae=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var He=r.default.memo((function(e){var n=e.width,i=e.height,o=e.pagingEnabled,a=void 0!==o&&o,c=e.directionalLockEnabled,l=void 0!==c&&c,u=e.boundX,s=void 0===u?1:u,d=e.boundY,f=void 0===d?1:d,h=e.contentInsetTop,p=void 0===h?0:h,y=e.contentInsetRight,v=void 0===y?0:y,g=e.contentInsetBottom,b=void 0===g?0:g,m=e.contentInsetLeft,O=void 0===m?0:m,w=e.contentStyle,x=e.onScroll,j=e.onStartDragging,E=e.onEndDragging,P=e.onStartDecelerating,S=e.onEndDecelerating,z=e.onResizeContent,D=e.renderBackground,I=e.renderOverlay,T=e.render,R=e.scrollTo,C=e.children,M=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;o.length>r;r++)0>t.indexOf(n=o[r])&&(i[n]=e[n]);return i}(e,Re),L=t.useMemo((function(){return{width:n,height:i}}),[n,i]),A=t.useMemo((function(){return{x:s,y:f}}),[s,f]),H=t.useMemo((function(){return{top:p,right:v,bottom:b,left:O}}),[p,v,b,O]),W=t.useRef(),N=t.useRef(),F={shouldStart:M.shouldStart},V=t.useRef(F);V.current=F;var _=t.useCallback((function(e){var t=!0;if(V.current.shouldStart&&(t=V.current.shouldStart(e)),t){var n=W.current;t=!!n&&function(e,t,n,r,i){var o=Math.abs(e.x)>Math.abs(e.y)?["x","width","left","right"]:["y","height","top","bottom"],a=o[1],c=o[2],l=o[3];if(0!==i[o[0]])return!0;return r[c]+n[a]+r[l]>t[a]}(e.velocity,n.size,n.contentSize,n.contentInset,n.bound)}return t}),[]);k((function(){if(R){var e=N.current;e&&e.scrollTo(R)}}),[R]);var q=t.useMemo((function(){var e={overflow:"hidden",position:"relative",width:L.width,height:L.height};return M.style&&Ae(e,M.style),e}),[L,M.style]);return M.style=q,M.shouldStart=_,r.default.createElement(ee,Me(Me({},M),{},{render:function(e){return r.default.createElement(ke,{pannable:e,size:L,pagingEnabled:a,directionalLockEnabled:l,bound:A,contentInset:H,contentStyle:w,onScroll:x,onStartDragging:j,onEndDragging:E,onStartDecelerating:P,onEndDecelerating:S,onResizeContent:z,renderBackground:D,renderOverlay:I,render:function(e,t){return W.current=e,N.current=t,T?T(e,t):C}})}}))}));var We=["width","height","autoResizing","render","children"];function Ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fe(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ne(Object(n),!0).forEach((function(t){Ve(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _e(){return(_e=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function qe(){}var Be={position:"absolute",top:0,left:0},Xe=r.default.memo((function(e){var n=e.width,i=e.height,o=e.autoResizing,a=void 0!==o&&o,c=e.render,l=e.children,u=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;o.length>r;r++)0>t.indexOf(n=o[r])&&(i[n]=e[n]);return i}(e,We),s=t.useContext(je),d=null!=n?n:s.width,f=null!=i?i:s.height,h=t.useMemo((function(){return void 0!==d&&void 0!==f?{width:d,height:f}:null}),[d,f]),p=t.useState(null),y=p[0],v=p[1],g=t.useRef(y),b=t.useRef(null),m={onResize:s.onResize},O=t.useRef(m);O.current=m;var w=t.useCallback((function(){var e=b.current;if(e){var t={width:e.offsetWidth,height:e.offsetHeight};v((function(e){return T(e,t)?e:t}))}}),[]);k((function(){var e=g.current;g.current=y,y&&!T(e,y)&&O.current.onResize(y)}),[y]),k((function(){if(h)v((function(e){return T(e,h)?e:h}));else if(w(),a){var e=I(),t=b.current;if(e&&t)return e.listenTo(t,w),function(){e.uninstall(t)}}}),[h,a,w]);var x=t.useMemo((function(){var e={position:"absolute"};return void 0!==d&&(e.width=d),void 0!==f&&(e.height=f),e}),[d,f]),j=l;c&&(j=c()),h||(j=r.default.createElement("div",{style:Be},r.default.createElement("div",{style:x,ref:b},j)));var E=t.useMemo((function(){var e={position:"relative"};return y&&(e.width=y.width,e.height=y.height),u.style&&_e(e,u.style),e}),[y,u.style]);return u.style=E,r.default.createElement("div",Fe({},u),r.default.createElement(je.Provider,{value:Fe(Fe({},s),{},{width:d,height:f,onResize:qe})},j))}));function Ye(e,t){function n(n){var r,i="x"===n?"width":"height";return(r={})[n]=t[n]-e[n],r[i]=t[i],r}var r=n("x"),i=r.x,o=r.width,a=n("y");return{x:i,y:a.y,width:o,height:a.height}}function Ge(e,t){if(!t)return!0;function n(n){var r="x"===n?"width":"height";return e[n]+e[r]>=t[n]-t[r]/4&&t[n]+5*t[r]/4>=e[n]}return n("x")&&n("y")}var Ue=["itemWidth","itemHeight","itemCount","renderItem","direction","rowSpacing","columnSpacing","width","height","render","children"];function Je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ke(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Je(Object(n),!0).forEach((function(t){Qe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Je(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Qe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ze(){return(Ze=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function $e(){}var et=function(e){return r.default.isValidElement(e.children)?e.children:r.default.createElement(r.default.Fragment,null,e.children)},tt=r.default.memo((function(e){var n=e.itemWidth,i=e.itemHeight,o=e.itemCount,a=e.renderItem,c=e.direction,l=void 0===c?"y":c,u=e.rowSpacing,s=void 0===u?0:u,d=e.columnSpacing,f=void 0===d?0:d,h=e.width,p=e.height,y=e.render,v=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;o.length>r;r++)0>t.indexOf(n=o[r])&&(i[n]=e[n]);return i}(e,Ue),g=t.useContext(je),b=null!=h?h:g.width,m=null!=p?p:g.height,O=t.useMemo((function(){return function(e){var t,n,r=e.spacing,i=e.itemSize,o=e.itemCount,a="x"===e.direction?["y","x","height","width","column","row"]:["x","y","width","height","row","column"],c=a[0],l=a[1],u=a[2],s=a[3],d=a[4],f=a[5],h=e.size[u],p=0,y=0,v=0,g=[];void 0===h?(v=o,0===i[u]?h=0:(h=o*i[u],o>1&&(h+=(o-1)*r[f]))):0===i[u]?v=o:(v=1,h>i[u]&&(v+=Math.floor((h-i[u])/(i[u]+r[f]))));v>0&&(y=Math.ceil(o/v));for(var b=0;y>b;b++){b>0&&(p+=r[d]);for(var m=0;v>m;m++){var O,w,x=m+b*v,j=0;if(v>1&&(j+=Math.round(m*((h-i[u])/(v-1)))),x>=o)break;g.push(((w={rect:(O={},O[c]=j,O[l]=p,O[u]=i[u],O[s]=i[s],O)})[d+"Index"]=b,w[f+"Index"]=m,w.itemIndex=x,w))}p+=i[s]}return{size:(t={},t[u]=h,t[s]=p,t),count:(n={},n[d]=y,n[f]=v,n),layoutList:g}}({direction:l,size:{width:b,height:m},spacing:{row:s,column:f},itemSize:{width:n,height:i},itemCount:o})}),[l,b,m,s,f,n,i,o]),w=t.useRef(),x={onResize:g.onResize},j=t.useRef(x);j.current=x,k((function(){var e=w.current;w.current=O.size,T(e,O.size)||j.current.onResize(O.size)}),[O.size]);var E=O.layoutList.map((function(e){return function(e){var t=e.rect,o=e.itemIndex,c=e.visibleRect,l=e.needsRender,u=e.Item,s=!1,d=a(e),f="GridContent_"+o,h={position:"absolute",left:t.x,top:t.y,width:t.width,height:t.height};if(r.default.isValidElement(d)&&d.type===u){d.key&&(f=d.key);var p=d.props;void 0!==p.forceRender&&(s=p.forceRender),void 0!==p.style&&Ze(h,p.style),d=d.props.children}return l||s?r.default.createElement("div",{key:f,style:h},r.default.createElement(je.Provider,{value:Ke(Ke({},g),{},{width:n,height:i,visibleRect:c,onResize:$e})},d)):null}(Ke(Ke({},e),{},{visibleRect:Ye(e.rect,g.visibleRect),needsRender:Ge(e.rect,g.visibleRect),Item:et}))}));y&&y(O);var P=t.useMemo((function(){var e={position:"relative",overflow:"hidden"};return O.size&&(e.width=O.size.width,e.height=O.size.height),v.style&&Ze(e,v.style),e}),[O.size,v.style]);return v.style=P,r.default.createElement("div",Ke({},v),E)}));var nt=["itemCount","renderItem","direction","width","height","spacing","estimatedItemWidth","estimatedItemHeight","render","children"];function rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function it(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rt(Object(n),!0).forEach((function(t){ot(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ot(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function at(){return(at=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ct=function(e){return r.default.isValidElement(e.children)?e.children:r.default.createElement(r.default.Fragment,null,e.children)},lt=r.default.memo((function(e){var n=e.itemCount,i=e.renderItem,o=e.direction,a=void 0===o?"y":o,c=e.width,l=e.height,u=e.spacing,s=void 0===u?0:u,d=e.estimatedItemWidth,f=void 0===d?0:d,h=e.estimatedItemHeight,p=void 0===h?0:h,y=e.render,v=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;o.length>r;r++)0>t.indexOf(n=o[r])&&(i[n]=e[n]);return i}(e,nt),g=t.useContext(je),b=null!=c?c:g.width,m=null!=l?l:g.height,O=t.useState([]),w=O[0],x=O[1],j=t.useState({}),E=j[0],P=j[1],S=t.useMemo((function(){return function(e,t,n){var r,i,o,a=e.size,c=e.spacing,l=e.estimatedItemSize,u=e.itemCount,s="x"===e.direction?["y","x","height","width"]:["x","y","width","height"],d=s[0],f=s[1],h=s[2],p=s[3],y=0,v=0,g=[],b={};void 0!==a[h]&&(b[h]=a[h]);for(var m=0;u>m;m++){var O,w=t[m]||null,x=w&&n[w]||null,j=((O={})[d]=0,O[f]=v,O);if(x)at(j,x);else{var E,P=l[h],S=l[p];j[h]=null!==(E=b[h])&&void 0!==E?E:"function"==typeof P?P(m):P,j[p]="function"==typeof S?S(m):S}g.push({rect:j,itemIndex:m,itemHash:w,itemSize:x}),j[p]>0&&(v+=j[p],u-1>m&&(v+=c)),j[h]>y&&(y=j[h])}return{size:(o={},o[h]=null!==(r=b[h])&&void 0!==r?r:y,o[p]=null!==(i=b[p])&&void 0!==i?i:v,o),layoutList:g}}({direction:a,size:{width:b,height:m},spacing:s,estimatedItemSize:{width:f,height:p},itemCount:n},w,E)}),[b,m,a,s,f,p,n,w,E]),z=t.useRef(),D={onResize:g.onResize},I=t.useRef(D);I.current=D,k((function(){var e=z.current;z.current=S.size,T(e,S.size)||I.current.onResize(S.size)}),[S.size]);var R=[];var C=S.layoutList.map((function(e){return function(e){var t=e.rect,n=e.itemIndex,o=e.itemSize,c=e.visibleRect,l=e.needsRender,u=e.Item,s=!1,d=i(e),f="ListContent_"+n,h=null,p={position:"absolute",left:t.x,top:t.y,width:t.width,height:t.height};if(r.default.isValidElement(d)&&d.type===u){d.key&&(f=d.key);var y=d.props;void 0!==y.forceRender&&(s=y.forceRender),void 0!==y.hash&&(h=y.hash),void 0!==y.style&&at(p,y.style),d=d.props.children}null===h&&(h=f);var v=!l&&!s;if(o||-1===R.indexOf(h)||(v=!0),R[n]=h,v)return null;var b=it({},g);return b.visibleRect=c,b.onResize=function(e){P((function(t){var n;return h?T(t[h],e)?t:it(it({},t),{},((n={})[h]=e,n)):t}))},"x"===a?b.height=S.size.height:b.width=S.size.width,r.default.createElement("div",{key:f,style:p},r.default.createElement(je.Provider,{value:b},d))}(it(it({},e),{},{visibleRect:Ye(e.rect,g.visibleRect),needsRender:Ge(e.rect,g.visibleRect),Item:ct}))}));(function(e,t){if(!e||!t)return!1;if(e===t)return!0;if(e.length!==t.length)return!1;for(var n=0;e.length>n;n++)if(e[n]!==t[n])return!1;return!0})(w,R)||x(R),y&&y(S);var M=t.useMemo((function(){var e={position:"relative",overflow:"hidden"};return S.size&&(e.width=S.size.width,e.height=S.size.height),v.style&&at(e,v.style),e}),[S.size,v.style]);return v.style=M,r.default.createElement("div",it({},v),C)}));function ut(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function st(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(n),!0).forEach((function(t){dt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ut(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function dt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ft={loopCount:2,loopOffset:0,loopWidth:0,direction:"x",pad:le,scrollTo:null},ht=function(e,t){switch(t.type){case"setState":return yt(pt(e,t));default:return e}},pt=function(e,t){return st(st({},e),t.payload)},yt=function(e){var t=e.loopCount,n=e.loopWidth,r=e.loopOffset,i=e.direction,o=e.pad,a=o.size,c=o.contentOffset,l="y"===i?"height":"width",u=o.contentSize[l]/t,s=2;if(0!==u&&(s+=Math.floor(a[l]/u)),n!==u||t!==s)return st(st({},e),{},{loopCount:s,loopWidth:u});var d=function(e,t,n,r,i){var o;if(1===r||0===n)return[e,0];var a="y"===i?["height","y","x"]:["width","x","y"],c=a[1],l=a[2],u=t[a[0]],s=(u-n*(r-1))/2,d=(u-n*(r+1))/2,f=e[c],h=0;if(f>=d&&s>=f)return[e,0];d>f?h=Math.floor((s-f)/n):f>s&&(h=-Math.floor((f-d)/n));return[(o={},o[c]=f+=n*h,o[l]=e[l],o),h]}(c,a,n,t,i),f=d[0],h=d[1];return c!==f?st(st({},e),{},{loopOffset:r+h,scrollTo:{offset:f,animated:!1}}):e};var vt=r.default.memo((function(e){var n=e.pad,i=e.padMethods,o=e.direction,a=e.render,c=t.useReducer(ht,ft),l=c[0],u=c[1],s={scrollTo:i.scrollTo},d=t.useRef(s);return d.current=s,k((function(){u({type:"setState",payload:{pad:n}})}),[n]),k((function(){u({type:"setState",payload:{direction:o}})}),[o]),k((function(){l.scrollTo&&d.current.scrollTo(l.scrollTo)}),[l.scrollTo]),r.default.createElement(lt,{direction:o,width:l.pad.size.width,height:l.pad.size.height,itemCount:l.loopCount,renderItem:function(e){return r.default.createElement(e.Item,{key:e.itemIndex+l.loopOffset,hash:"Loop",forceRender:!0},a(l))}})})),gt=["direction","render","children"];function bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mt(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(n),!0).forEach((function(t){Ot(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ot(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wt=r.default.memo((function(e){var t,n,i=e.direction,o=void 0===i?"x":i,a=e.render,c=e.children,l=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;o.length>r;r++)0>t.indexOf(n=o[r])&&(i[n]=e[n]);return i}(e,gt),u=l.directionalLockEnabled;(l.directionalLockEnabled=void 0===u||u,"x"===o)?l.boundX=null!==(t=l.boundX)&&void 0!==t?t:-1:l.boundY=null!==(n=l.boundY)&&void 0!==n?n:-1;return r.default.createElement(He,mt(mt({},l),{},{render:function(e,t){return r.default.createElement(vt,{pad:e,padMethods:t,direction:o,render:function(e){return a?a(e):c}})}}))}));function xt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jt(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xt(Object(n),!0).forEach((function(t){Et(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pt={pad:le,activeIndex:0,direction:"x",loop:!0,itemCount:0,scrollTo:null,playing:!1},St=function(e,t){switch(t.type){case"setState":return Dt(zt(e,t));case"scrollToIndex":return It(e,t);case"next":return Tt(e,t);case"play":return kt(e,t);default:return e}},zt=function(e,t){return jt(jt({},e),t.payload)},Dt=function(e,t){var n=e.activeIndex,r=e.pad,i=function(e,t,n,r){var i="y"===r?["height","y"]:["width","x"],o=i[1],a=t[i[0]],c=0;a>0&&(c=Math.round(-e[o]/a));return c%n}(r.contentOffset,r.size,e.itemCount,e.direction);return n===i?e:jt(jt({},e),{},{activeIndex:i})},It=function(e,t){var n=e.activeIndex,r=e.itemCount,i=e.direction,o=e.loop,a=e.pad,c=a.contentOffset,l=a.size,u=t.payload.animated,s=t.payload.index;"function"==typeof s&&(s=s({activeIndex:n,itemCount:r})),o||(s=Math.max(0,Math.min(s,r-1)));var d=function(e,t,n,r){var i,o="y"===r?["height","y","x"]:["width","x","y"],a=o[1],c=o[2];return(i={})[a]=t[a]-e*n[o[0]],i[c]=t[c],i}(s-n,c,l,i);return jt(jt({},e),{},{scrollTo:{offset:d,animated:u}})},Tt=function(e,t){var n=e.activeIndex+1;return e.loop||(n%=e.itemCount),It(e,{type:"scrollToIndex",payload:{index:n,animated:t.payload.animated}})},kt=function(e,t){return jt(jt({},e),{},{playing:t.payload})};var Rt=r.default.memo((function(e){var n=e.pad,i=e.padMethods,o=e.direction,a=e.loop,c=e.autoplayEnabled,l=e.autoplayInterval,u=e.itemCount,s=e.onActiveIndexChange,d=e.render,f=t.useReducer(St,Pt),h=f[0],p=f[1],y=t.useRef(h),v={onActiveIndexChange:s,scrollTo:i.scrollTo},g=t.useRef(v);g.current=v;var b=t.useRef({scrollToIndex:function(e){p({type:"scrollToIndex",payload:e})},play:function(e){p({type:"play",payload:e})}});return k((function(){p({type:"setState",payload:{pad:n}})}),[n]),k((function(){p({type:"setState",payload:{direction:o,loop:a,itemCount:u}})}),[o,a,u]),k((function(){var e=y.current;(y.current=h,e.activeIndex!==h.activeIndex)&&(g.current.onActiveIndexChange&&g.current.onActiveIndexChange({activeIndex:h.activeIndex,itemCount:h.itemCount}))}),[h]),k((function(){h.scrollTo&&g.current.scrollTo(h.scrollTo)}),[h.scrollTo]),k((function(){if(h.playing){var e=setInterval((function(){p({type:"next",payload:{animated:!0}})}),l);return function(){clearInterval(e)}}}),[h.playing,l]),k((function(){b.current.play(c&&!h.pad.drag)}),[c,h.pad.drag]),r.default.createElement(r.default.Fragment,null,d(h,b.current))})),Ct=["itemCount","renderItem","direction","loop","autoplayEnabled","autoplayInterval","onActiveIndexChange","scrollToIndex","render","children"];function Mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lt(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mt(Object(n),!0).forEach((function(t){At(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function At(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ht=r.default.memo((function(e){var n=e.itemCount,i=e.renderItem,o=e.direction,a=void 0===o?"x":o,c=e.loop,l=void 0===c||c,u=e.autoplayEnabled,s=void 0===u||u,d=e.autoplayInterval,f=void 0===d?5e3:d,h=e.onActiveIndexChange,p=e.scrollToIndex,y=e.render,v=e.children,g=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;o.length>r;r++)0>t.indexOf(n=o[r])&&(i[n]=e[n]);return i}(e,Ct),b=g.width,m=g.height,O=g.pagingEnabled,w=void 0===O||O,x=g.directionalLockEnabled,j=void 0===x||x,E=g.renderOverlay,P=g.onMouseEnter,S=g.onMouseLeave,z=t.useRef(),D={onMouseEnter:P,onMouseLeave:S},I=t.useRef(D);I.current=D;var T,R,C=t.useCallback((function(e){var t=z.current;t&&t.play(!1),I.current.onMouseEnter&&I.current.onMouseEnter(e)}),[]),M=t.useCallback((function(e){var t=z.current;t&&t.play(!0),I.current.onMouseLeave&&I.current.onMouseLeave(e)}),[]);(k((function(){if(p){var e=z.current;e&&e.scrollToIndex(p)}}),[p]),g.pagingEnabled=w,g.directionalLockEnabled=j,s&&(g.onMouseEnter=C,g.onMouseLeave=M),"x"===a)?g.boundY=null!==(T=g.boundY)&&void 0!==T?T:0:g.boundX=null!==(R=g.boundX)&&void 0!==R?R:0;g.renderOverlay=function(e,t){return r.default.createElement(r.default.Fragment,null,r.default.createElement(Rt,{pad:e,padMethods:t,direction:a,loop:l,autoplayEnabled:s,autoplayInterval:f,itemCount:n,onActiveIndexChange:h,render:function(e,t){return z.current=t,y?y(e,t):v}}),E?E(e,t):null)};var L=r.default.createElement(tt,{width:b,height:m,itemWidth:b,itemHeight:m,direction:a,itemCount:n,renderItem:i});return l?r.default.createElement(wt,Lt({direction:a},g),L):r.default.createElement(He,Lt({},g),L)}));function Wt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nt(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wt(Object(n),!0).forEach((function(t){Ft(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ft(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vt={pad:le,scroll:null,scrollTo:null},_t=function(e,t){switch(t.type){case"setState":return qt(e,t);case"scrollTo":return Bt(e,t);case"scrollEnd":return Xt(e);case"scrollRecalculate":return Yt(e,t);default:return e}},qt=function(e,t){return Nt(Nt({},e),t.payload)},Bt=function(e,t){var n=t.payload,r=n.params,i=n.layout,o=Nt({},r),a=r.index,c=r.reverseRect;return void 0!==a?o.rect=function(e,t){var n=t.box,r=t.body,i={x:0,y:0,width:0,height:0};n&&n.layoutList[1]&&(i=n.layoutList[1].rect);if(r&&(e=Math.min(e,r.layoutList.length-1))>=0){var o=r.layoutList[e];i={x:i.x+o.rect.x,y:i.y+o.rect.y,width:o.rect.width,height:o.rect.height}}return i}(a,i):void 0!==c&&(o.rect=function(e,t){var n=t.box,r={x:0,y:0,width:e.width,height:e.height};n&&(r.x=n.size.width-r.width-e.x,r.y=n.size.height-r.height-e.y);return r}(c,i)),Nt(Nt({},e),{},{scrollTo:o,scroll:e.scroll||r})},Xt=function(e,t){return Nt(Nt({},e),{},{scroll:null})},Yt=function(e,t){var n=e.scroll;return n?Bt(e,{type:"scrollTo",payload:{params:n,layout:t.payload.layout}}):e};var Gt=r.default.memo((function(e){var n=e.pad,i=e.padMethods,o=e.layout,a=e.render,c=t.useReducer(_t,Vt),l=c[0],u=c[1],s=t.useRef(l),d=t.useRef(o),f=t.useRef(i);f.current=i;var h=t.useRef({scrollTo:function(e){u({type:"scrollTo",payload:{params:e,layout:d.current}})}});return t.useMemo((function(){u({type:"setState",payload:{pad:n}})}),[n]),k((function(){var e=s.current;s.current=l,l.scroll&&(e.pad.contentSize!==l.pad.contentSize?u({type:"scrollRecalculate",payload:{layout:d.current}}):(1!==l.scroll.animated&&!0!==l.scroll.animated||e.pad.deceleration&&!l.pad.deceleration)&&setTimeout((function(){u({type:"scrollEnd"})}),0))}),[l]),k((function(){l.scrollTo&&f.current.scrollTo(l.scrollTo)}),[l.scrollTo]),r.default.createElement(r.default.Fragment,null,a(l,h.current))})),Ut=["itemCount","renderItem","direction","spacing","estimatedItemWidth","estimatedItemHeight","renderHeader","renderFooter","scrollTo","render","infiniteStyle","bodyStyle","children"];function Jt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qt=r.default.memo((function(e){var n,i,o=e.itemCount,a=e.renderItem,c=e.direction,l=void 0===c?"y":c,u=e.spacing,s=void 0===u?0:u,d=e.estimatedItemWidth,f=void 0===d?0:d,h=e.estimatedItemHeight,p=void 0===h?0:h,y=e.renderHeader,v=e.renderFooter,g=e.scrollTo,b=e.render,m=e.infiniteStyle,O=e.bodyStyle,w=e.children,x=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;o.length>r;r++)0>t.indexOf(n=o[r])&&(i[n]=e[n]);return i}(e,Ut),j=x.width,E=x.height,P=x.renderOverlay,S=x.directionalLockEnabled,z=void 0===S||S,D=t.useRef({}),I=t.useRef();(k((function(){if(g){var e=I.current;e&&e.scrollTo(g)}}),[g]),x.directionalLockEnabled=z,"x"===l)?x.boundY=null!==(n=x.boundY)&&void 0!==n?n:0:x.boundX=null!==(i=x.boundX)&&void 0!==i?i:0;return x.renderOverlay=function(e,t){return r.default.createElement(r.default.Fragment,null,r.default.createElement(Gt,{direction:l,pad:e,padMethods:t,layout:D.current,render:function(e,t){return I.current=t,b?b(e,t):w}}),P?P(e,t):null)},r.default.createElement(He,function(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jt(Object(n),!0).forEach((function(t){Kt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},x),r.default.createElement(lt,{width:j,height:E,direction:l,itemCount:3,style:m,renderItem:function(e){var t=e.itemIndex,n=e.Item;return 0===t?y?y(e):null:2===t?v?v(e):null:r.default.createElement(n,{forceRender:!0,style:O},r.default.createElement(lt,{width:j,height:E,direction:l,spacing:s,itemCount:o,estimatedItemWidth:f,estimatedItemHeight:p,style:O,renderItem:a,render:function(e){return D.current.body=e,null}}))},render:function(e){return D.current.box=e,null}}))}));e.AutoResizing=H,e.Carousel=Ht,e.GridContent=tt,e.GridItem=et,e.Infinite=Qt,e.ItemContent=Xe,e.ListContent=lt,e.Loop=wt,e.Pad=He,e.Pannable=ee,e.calculateDeceleration=me,e.context=je,e.createDeceleration=Oe,e.initialCarouselState=Pt,e.initialInfiniteState=Vt,e.initialLoopState=ft,e.initialPadState=le,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactPannable={},e.React)}(this,(function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(t),i={exports:{}};(i.exports={}).forEach=function(e,t){for(var n=0;e.length>n;n++){var r=t(e[n]);if(r)return r}};var o={exports:{}},a=o.exports={};a.isIE=function(e){return(-1!==(t=navigator.userAgent.toLowerCase()).indexOf("msie")||-1!==t.indexOf("trident")||-1!==t.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:undefined}());var t},a.isLegacyOpera=function(){return!!window.opera};var c={exports:{}};(c.exports={}).getOption=function(e,t,n){var r=e[t];if(null==r&&void 0!==n)return n;return r};var l=c.exports;function u(){var e={},t=0,n=0,r=0;return{add:function(i,o){o||(o=i,i=0),i>n?n=i:r>i&&(r=i),e[i]||(e[i]=[]),e[i].push(o),t++},process:function(){for(var t=r;n>=t;t++)for(var i=e[t],o=0;i.length>o;o++){(0,i[o])()}},size:function(){return t}}}function s(e){return e._erd}var d=o.exports,f=i.exports.forEach,h=i.exports.forEach,p=function(e){var t=e.stateHandler.getState;return{isDetectable:function(e){var n=t(e);return n&&!!n.isDetectable},markAsDetectable:function(e){t(e).isDetectable=!0},isBusy:function(e){return!!t(e).busy},markBusy:function(e,n){t(e).busy=!!n}}},y=function(e){var t={};function n(n){var r=e.get(n);return void 0===r?[]:t[r]||[]}return{get:n,add:function(n,r){var i=e.get(n);t[i]||(t[i]=[]),t[i].push(r)},removeListener:function(e,t){for(var r=n(e),i=0,o=r.length;o>i;++i)if(r[i]===t){r.splice(i,1);break}},removeAllListeners:function(e){var t=n(e);t&&(t.length=0)}}},v=function(){var e=1;return{generate:function(){return e++}}},g=function(e){var t=e.idGenerator,n=e.stateHandler.getState;return{get:function(e){var t=n(e);return t&&void 0!==t.id?t.id:null},set:function(e){var r=n(e);if(!r)throw Error("setId required the element to have a resize detection state.");var i=t.generate();return r.id=i,i}}},b=function(e){function t(){}var n={log:t,warn:t,error:t};if(!e&&window.console){var r=function(e,t){e[t]=function(){var e=console[t];if(e.apply)e.apply(console,arguments);else for(var n=0;arguments.length>n;n++)e(arguments[n])}};r(n,"log"),r(n,"warn"),r(n,"error")}return n},m=o.exports,O=function(e){var t=(e=e||{}).reporter,n=l.getOption(e,"async",!0),r=l.getOption(e,"auto",!0);r&&!n&&(t&&t.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),n=!0);var i,o=u(),a=!1;function c(){for(a=!0;o.size();){var e=o;o=u(),e.process()}a=!1}function s(){i=setTimeout(c,0)}return{add:function(e,t){!a&&r&&n&&0===o.size()&&s(),o.add(e,t)},force:function(e){a||(void 0===e&&(e=n),i&&(clearTimeout(i),i=null),e?s():c())}}},w={initState:function(e){return e._erd={},s(e)},getState:s,cleanState:function(e){delete e._erd}},x=function(e){var t=(e=e||{}).reporter,n=e.batchProcessor,r=e.stateHandler.getState;if(!t)throw Error("Missing required dependency: reporter.");function i(t){var n=e.important?" !important; ":"; ";return(t.join(n)+n).trim()}function o(e){return r(e).object}return{makeDetectable:function(e,o,a){a||(a=o,o=e,e=null),e=e||{},d.isIE(8)?a(o):function(o,a){var c=i(["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"]),l=!1,u=window.getComputedStyle(o),s=o.offsetWidth,f=o.offsetHeight;function h(){function n(){if("static"===u.position){o.style.setProperty("position","relative",e.important?"important":"");var n=function(t,n,r,i){var o=r[i];"auto"!==o&&"0"!==function(e){return e.replace(/[^-\d\.]/g,"")}(o)&&(t.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: ",n),n.style.setProperty(i,"0",e.important?"important":""))};n(t,o,u,"top"),n(t,o,u,"right"),n(t,o,u,"bottom"),n(t,o,u,"left")}}""!==u.position&&(n(),l=!0);var i=document.createElement("object");i.style.cssText=c,i.tabIndex=-1,i.type="text/html",i.setAttribute("aria-hidden","true"),i.onload=function(){l||n(),function e(t,n){if(!t.contentDocument){var i=r(t);return i.checkForObjectDocumentTimeoutId&&window.clearTimeout(i.checkForObjectDocumentTimeoutId),void(i.checkForObjectDocumentTimeoutId=setTimeout((function(){i.checkForObjectDocumentTimeoutId=0,e(t,n)}),100))}n(t.contentDocument)}(this,(function(e){a(o)}))},d.isIE()||(i.data="about:blank"),r(o)&&(o.appendChild(i),r(o).object=i,d.isIE()&&(i.data="about:blank"))}r(o).startSize={width:s,height:f},n?n.add(h):h()}(o,a)},addListener:function(e,t){function n(){t(e)}if(d.isIE(8))r(e).object={proxy:n},e.attachEvent("onresize",n);else{var i=o(e);if(!i)throw Error("Element is not detectable by this strategy.");i.contentDocument.defaultView.addEventListener("resize",n)}},uninstall:function(e){if(r(e)){var t=o(e);t&&(d.isIE(8)?e.detachEvent("onresize",t.proxy):e.removeChild(t),r(e).checkForObjectDocumentTimeoutId&&window.clearTimeout(r(e).checkForObjectDocumentTimeoutId),delete r(e).object)}}}},j=function(e){var t=(e=e||{}).reporter,n=e.batchProcessor,r=e.stateHandler.getState,i=e.idHandler;if(!n)throw Error("Missing required dependency: batchProcessor");if(!t)throw Error("Missing required dependency: reporter.");var o=function(){var e=500,t=500,n=document.createElement("div");n.style.cssText=l(["position: absolute","width: 1000px","height: 1000px","visibility: hidden","margin: 0","padding: 0"]);var r=document.createElement("div");r.style.cssText=l(["position: absolute","width: 500px","height: 500px","overflow: scroll","visibility: none","top: -1500px","left: -1500px","visibility: hidden","margin: 0","padding: 0"]),r.appendChild(n),document.body.insertBefore(r,document.body.firstChild);var i=e-r.clientWidth,o=t-r.clientHeight;return document.body.removeChild(r),{width:i,height:o}}(),a="erd_scroll_detection_container";function c(e){!function(e,t,n){function r(n,r){r=r||function(t){e.head.appendChild(t)};var i=e.createElement("style");return i.innerHTML=n,i.id=t,r(i),i}if(!e.getElementById(t)){var i=n+"_animation",o=n+"_animation_active",a="/* Created by the element-resize-detector library. */\n";a+="."+n+" > div::-webkit-scrollbar { "+l(["display: none"])+" }\n\n",a+="."+o+" { "+l(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+i,"animation-name: "+i])+" }\n",a+="@-webkit-keyframes "+i+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n",r(a+="@keyframes "+i+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }")}}(e,"erd_scroll_detection_scrollbar_style",a)}function l(t){var n=e.important?" !important; ":"; ";return(t.join(n)+n).trim()}function u(e,n,r){if(e.addEventListener)e.addEventListener(n,r);else{if(!e.attachEvent)return t.error("[scroll] Don't know how to add event listeners.");e.attachEvent("on"+n,r)}}function s(e,n,r){if(e.removeEventListener)e.removeEventListener(n,r);else{if(!e.detachEvent)return t.error("[scroll] Don't know how to remove event listeners.");e.detachEvent("on"+n,r)}}function d(e){return r(e).container.childNodes[0].childNodes[0].childNodes[0]}function h(e){return r(e).container.childNodes[0].childNodes[0].childNodes[1]}return c(window.document),{makeDetectable:function(e,c,s){function p(){if(e.debug){var n=Array.prototype.slice.call(arguments);if(n.unshift(i.get(c),"Scroll: "),t.log.apply)t.log.apply(null,n);else for(var r=0;n.length>r;r++)t.log(n[r])}}function y(e){var t=r(e).container.childNodes[0],n=window.getComputedStyle(t);return!n.width||-1===n.width.indexOf("px")}function v(){var e=window.getComputedStyle(c),t={};return t.position=e.position,t.width=c.offsetWidth,t.height=c.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(){if(p("storeStyle invoked."),r(c)){var e=v();r(c).style=e}else p("Aborting because element has been uninstalled")}function b(e,t,n){r(e).lastWidth=t,r(e).lastHeight=n}function m(){return 2*o.width+1}function O(){return 2*o.height+1}function w(e){return e+10+m()}function x(e){return e+10+O()}function j(e,t,n){var r=d(e),i=h(e),o=w(t),a=x(n),c=function(e){return 2*e+m()}(t),l=function(e){return 2*e+O()}(n);r.scrollLeft=o,r.scrollTop=a,i.scrollLeft=c,i.scrollTop=l}function E(){var e=r(c).container;if(!e){(e=document.createElement("div")).className=a,e.style.cssText=l(["visibility: hidden","display: inline","width: 0px","height: 0px","z-index: -1","overflow: hidden","margin: 0","padding: 0"]),r(c).container=e,function(e){e.className+=" "+a+"_animation_active"}(e),c.appendChild(e);var t=function(){r(c).onRendered&&r(c).onRendered()};u(e,"animationstart",t),r(c).onAnimationStart=t}return e}function P(){if(p("Injecting elements"),r(c)){!function(){var n=r(c).style;if("static"===n.position){c.style.setProperty("position","relative",e.important?"important":"");var i=function(e,t,n,r){var i=n[r];"auto"!==i&&"0"!==function(e){return e.replace(/[^-\d\.]/g,"")}(i)&&(e.warn("An element that is positioned static has style."+r+"="+i+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+r+" will be set to 0. Element: ",t),t.style[r]=0)};i(t,c,n,"top"),i(t,c,n,"right"),i(t,c,n,"bottom"),i(t,c,n,"left")}}();var n=r(c).container;n||(n=E());var i,s,d,f,h=o.width,y=o.height,v=l(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden","width: 100%","height: 100%","left: 0px","top: 0px"]),g=l(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden"].concat(["left: "+(i=(i=-(1+h))?i+"px":"0"),"top: "+(s=(s=-(1+y))?s+"px":"0"),"right: "+(f=(f=-h)?f+"px":"0"),"bottom: "+(d=(d=-y)?d+"px":"0")])),b=l(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),m=l(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),O=l(["position: absolute","left: 0","top: 0"]),w=l(["position: absolute","width: 200%","height: 200%"]),x=document.createElement("div"),j=document.createElement("div"),P=document.createElement("div"),S=document.createElement("div"),z=document.createElement("div"),D=document.createElement("div");x.dir="ltr",x.style.cssText=v,x.className=a,j.className=a,j.style.cssText=g,P.style.cssText=b,S.style.cssText=O,z.style.cssText=m,D.style.cssText=w,P.appendChild(S),z.appendChild(D),j.appendChild(P),j.appendChild(z),x.appendChild(j),n.appendChild(x),u(P,"scroll",I),u(z,"scroll",T),r(c).onExpandScroll=I,r(c).onShrinkScroll=T}else p("Aborting because element has been uninstalled");function I(){r(c).onExpand&&r(c).onExpand()}function T(){r(c).onShrink&&r(c).onShrink()}}function S(){function o(t,n,r){var i=function(e){return d(e).childNodes[0]}(t),o=w(n),a=x(r);i.style.setProperty("width",o+"px",e.important?"important":""),i.style.setProperty("height",a+"px",e.important?"important":"")}function a(a){var u=c.offsetWidth,s=c.offsetHeight,d=u!==r(c).lastWidth||s!==r(c).lastHeight;p("Storing current size",u,s),b(c,u,s),n.add(0,(function(){if(d)if(r(c))if(l()){if(e.debug)c.offsetWidth===u&&c.offsetHeight===s||t.warn(i.get(c),"Scroll: Size changed before updating detector elements.");o(c,u,s)}else p("Aborting because element container has not been initialized");else p("Aborting because element has been uninstalled")})),n.add(1,(function(){r(c)?l()?j(c,u,s):p("Aborting because element container has not been initialized"):p("Aborting because element has been uninstalled")})),d&&a&&n.add(2,(function(){r(c)?l()?a():p("Aborting because element container has not been initialized"):p("Aborting because element has been uninstalled")}))}function l(){return!!r(c).container}function u(){p("notifyListenersIfNeeded invoked");var e=r(c);return void 0===r(c).lastNotifiedWidth&&e.lastWidth===e.startSize.width&&e.lastHeight===e.startSize.height?p("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?p("Not notifying: Size already notified"):(p("Current size not notified, notifying..."),e.lastNotifiedWidth=e.lastWidth,e.lastNotifiedHeight=e.lastHeight,void f(r(c).listeners,(function(e){e(c)})))}function s(){p("Scroll detected."),y(c)?p("Scroll event fired while unrendered. Ignoring..."):a(u)}if(p("registerListenersAndPositionElements invoked."),r(c)){r(c).onRendered=function(){if(p("startanimation triggered."),y(c))p("Ignoring since element is still unrendered...");else{p("Element rendered.");var e=d(c),t=h(c);0!==e.scrollLeft&&0!==e.scrollTop&&0!==t.scrollLeft&&0!==t.scrollTop||(p("Scrollbars out of sync. Updating detector elements..."),a(u))}},r(c).onExpand=s,r(c).onShrink=s;var v=r(c).style;o(c,v.width,v.height)}else p("Aborting because element has been uninstalled")}function z(){if(p("finalizeDomMutation invoked."),r(c)){var e=r(c).style;b(c,e.width,e.height),j(c,e.width,e.height)}else p("Aborting because element has been uninstalled")}function D(){s(c)}function I(){var e;p("Installing..."),r(c).listeners=[],e=v(),r(c).startSize={width:e.width,height:e.height},p("Element start size",r(c).startSize),n.add(0,g),n.add(1,P),n.add(2,S),n.add(3,z),n.add(4,D)}s||(s=c,c=e,e=null),e=e||{},p("Making detectable..."),!function(e){return!function(e){var t=e.getRootNode&&e.getRootNode().contains(e);return e===e.ownerDocument.body||e.ownerDocument.body.contains(e)||t}(e)||null===window.getComputedStyle(e)}(c)?I():(p("Element is detached"),E(),p("Waiting until element is attached..."),r(c).onRendered=function(){p("Element is now attached"),I()})},addListener:function(e,t){if(!r(e).listeners.push)throw Error("Cannot add listener to an element that is not detectable.");r(e).listeners.push(t)},uninstall:function(e){var t=r(e);t&&(t.onExpandScroll&&s(d(e),"scroll",t.onExpandScroll),t.onShrinkScroll&&s(h(e),"scroll",t.onShrinkScroll),t.onAnimationStart&&s(t.container,"animationstart",t.onAnimationStart),t.container&&e.removeChild(t.container))},initDocument:c}};function E(e){return Array.isArray(e)||void 0!==e.length}function P(e){if(Array.isArray(e))return e;var t=[];return h(e,(function(e){t.push(e)})),t}function S(e){return e&&1===e.nodeType}var z;function D(e,t,n){var r=e[t];return null==r&&void 0!==n?n:r}function I(){return"undefined"==typeof window?null:(z||(z=function(e){var t;if((e=e||{}).idHandler)t={get:function(t){return e.idHandler.get(t,!0)},set:e.idHandler.set};else{var n=v(),r=g({idGenerator:n,stateHandler:w});t=r}var i=e.reporter;i||(i=b(!1===i));var o=D(e,"batchProcessor",O({reporter:i})),a={};a.callOnAdd=!!D(e,"callOnAdd",!0),a.debug=!!D(e,"debug",!1);var c,l=y(t),u=p({stateHandler:w}),s=D(e,"strategy","object"),d=D(e,"important",!1),f={reporter:i,batchProcessor:o,stateHandler:w,idHandler:t,important:d};if("scroll"===s&&(m.isLegacyOpera()?(i.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),s="object"):m.isIE(9)&&(i.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),s="object")),"scroll"===s)c=j(f);else{if("object"!==s)throw Error("Invalid strategy name: "+s);c=x(f)}var z={};return{listenTo:function(e,n,r){function o(e){var t=l.get(e);h(t,(function(t){t(e)}))}function s(e,t,n){l.add(t,n),e&&n(t)}if(r||(r=n,n=e,e={}),!n)throw Error("At least one element required.");if(!r)throw Error("Listener required.");if(S(n))n=[n];else{if(!E(n))return i.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");n=P(n)}var f=0,p=D(e,"callOnAdd",a.callOnAdd),y=D(e,"onReady",(function(){})),v=D(e,"debug",a.debug);h(n,(function(e){w.getState(e)||(w.initState(e),t.set(e));var a=t.get(e);if(v&&i.log("Attaching listener to element",a,e),!u.isDetectable(e))return v&&i.log(a,"Not detectable."),u.isBusy(e)?(v&&i.log(a,"System busy making it detectable"),s(p,e,r),z[a]=z[a]||[],void z[a].push((function(){++f===n.length&&y()}))):(v&&i.log(a,"Making detectable..."),u.markBusy(e,!0),c.makeDetectable({debug:v,important:d},e,(function(e){if(v&&i.log(a,"onElementDetectable"),w.getState(e)){u.markAsDetectable(e),u.markBusy(e,!1),c.addListener(e,o),s(p,e,r);var t=w.getState(e);t&&t.startSize&&(t.startSize.width===e.offsetWidth&&t.startSize.height===e.offsetHeight||o(e)),z[a]&&h(z[a],(function(e){e()}))}else v&&i.log(a,"Element uninstalled before being detectable.");delete z[a],++f===n.length&&y()})));v&&i.log(a,"Already detecable, adding listener."),s(p,e,r),f++})),f===n.length&&y()},removeListener:l.removeListener,removeAllListeners:l.removeAllListeners,uninstall:function(e){if(!e)return i.error("At least one element is required.");if(S(e))e=[e];else{if(!E(e))return i.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");e=P(e)}h(e,(function(e){l.removeAllListeners(e),c.uninstall(e),w.cleanState(e)}))},initDocument:function(e){c.initDocument&&c.initDocument(e)}}}({strategy:"scroll"})),z)}function T(e,t){return!(!e||!t)&&(e===t||e.width===t.width&&e.height===t.height)}var k="undefined"==typeof window?t.useEffect:t.useLayoutEffect,R=["width","height","onResize","render","children"];function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){L(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function L(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A(){return(A=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var H=r.default.memo((function(e){var n=e.width,i=e.height,o=e.onResize,a=e.render,c=e.children,l=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;o.length>r;r++)0>t.indexOf(n=o[r])&&(i[n]=e[n]);return i}(e,R),u=t.useMemo((function(){return void 0!==n&&void 0!==i?{width:n,height:i}:null}),[n,i]),s=t.useState(),d=s[0],f=s[1],h=t.useRef(d),p=t.useRef(null),y={onResize:o},v=t.useRef(y);v.current=y;var g=t.useCallback((function(){var e=p.current;if(e){var t={width:e.offsetWidth,height:e.offsetHeight};f((function(e){return T(e,t)?e:t}))}}),[]);k((function(){var e=h.current;h.current=d,d&&!T(e,d)&&v.current.onResize&&v.current.onResize(d)}),[d]),k((function(){if(u)f((function(e){return T(e,u)?e:u}));else{g();var e=I(),t=p.current;if(e&&t)return e.listenTo(t,g),function(){e.uninstall(t)}}}),[u,g]);var b=t.useMemo((function(){var e={width:"100%",height:"100%"};return l.style&&A(e,l.style),void 0!==n&&(e.width=n),void 0!==i&&(e.height=i),e}),[n,i,l.style]);l.style=b;var m=c;return d?a&&(m=a(d)):m=null,r.default.createElement("div",M(M({},l),{},{ref:p}),m)}));function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function N(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){F(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var V={target:null,translation:null,velocity:{x:0,y:0},interval:0,startPoint:{x:0,y:0},movePoint:{x:0,y:0},moveTime:0,cancelled:!0},_=function(e,t){switch(t.type){case"reset":return V;case"track":return q(e,t);case"move":return B(e,t);case"start":return X(e);case"end":return Y(e);default:return e}},q=function(e,t){var n=t.payload,r=n.target,i=n.point,o=(new Date).getTime();return N(N({},e),{},{target:r,translation:null,velocity:{x:0,y:0},interval:0,startPoint:i,movePoint:i,moveTime:o})},B=function(e,t){var n=t.payload.point,r=e.startPoint,i=e.movePoint,o=e.moveTime,a=e.translation;if(!e.target)return e;var c=(new Date).getTime(),l=c-o,u={x:(n.x-i.x)/l,y:(n.y-i.y)/l};if(!a)return N(N({},e),{},{velocity:u,interval:l,movePoint:n,moveTime:c});var s={x:n.x-r.x,y:n.y-r.y};return N(N({},e),{},{translation:s,velocity:u,interval:l,movePoint:n,moveTime:c})},X=function(e){var t=e.movePoint;return!e.target||e.translation?e:N(N({},e),{},{translation:{x:0,y:0},startPoint:t,cancelled:!0})},Y=function(e){return e.target?N(N({},e),{},{target:null,translation:null,cancelled:!1}):e};function G(e,t,n,r){var i=function(){};return e&&e.addEventListener&&(e.addEventListener(t,n,r),i=function(){e.removeEventListener(t,n,r)}),i}var U=["disabled","shouldStart","onTrackStart","onTrackEnd","onTrackCancel","onStart","onMove","onEnd","onCancel","render","children"];function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){Q(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z(){return(Z=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var $="undefined"!=typeof window&&"ontouchstart"in window,ee=r.default.memo((function(e){var n=e.disabled,i=e.shouldStart,o=e.onTrackStart,a=e.onTrackEnd,c=e.onTrackCancel,l=e.onStart,u=e.onMove,s=e.onEnd,d=e.onCancel,f=e.render,h=e.children,p=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;o.length>r;r++)0>t.indexOf(n=o[r])&&(i[n]=e[n]);return i}(e,U),y=t.useReducer(_,V),v=y[0],g=y[1],b=t.useRef(v),m=t.useRef(null),O=!!v.target,w=!!v.translation;k((function(){var e=b.current;b.current=v;var t=m.current;if(t)if(null===v.target){if(e.target){if(e.translation){var n={currentTarget:t,target:e.target,translation:e.translation,velocity:e.velocity,interval:e.interval};v.cancelled?d&&d(n):s&&s(n)}var r={currentTarget:t,target:e.target,translation:e.translation,velocity:e.velocity,interval:e.interval};v.cancelled?c&&c(r):a&&a(r)}}else{if(null===e.target)o&&o({currentTarget:t,target:v.target,translation:v.translation,velocity:v.velocity,interval:v.interval});if(null===v.translation){var f={x:v.movePoint.x-v.startPoint.x,y:v.movePoint.y-v.startPoint.y};if(Math.sqrt(Math.pow(f.x,2)+Math.pow(f.y,2))>0)i?i({currentTarget:t,target:v.target,translation:f,velocity:v.velocity,interval:v.interval})&&g({type:"start"}):g({type:"start"})}else{var h={currentTarget:t,target:v.target,translation:v.translation,velocity:v.velocity,interval:v.interval};null===e.translation?l&&l(h):e.translation!==v.translation&&u&&u(h)}}})),k((function(){if(n)O&&g({type:"reset"});else{var e=m.current;if(e){var t=function(e,t){g({type:"track",payload:{target:e,point:t}})},r=function(e){g({type:"move",payload:{point:e}})},i=function(){g({type:"end",payload:null})};if(O){if($){var o=function(e){w&&e.cancelable&&e.stopImmediatePropagation(),i()},a=document.body,c=G(a,"touchmove",(function(e){if(w&&e.cancelable&&e.stopImmediatePropagation(),1===e.touches.length){var t=e.touches[0];r({x:t.pageX,y:t.pageY})}else i()})),l=G(a,"touchend",o),u=G(a,"touchcancel",o);return function(){c(),l(),u()}}var s=document.body,d=G(s,"mousemove",(function(e){w&&(e.preventDefault(),e.stopImmediatePropagation()),void 0===e.buttons||1===e.buttons?r({x:e.pageX,y:e.pageY}):i()})),f=G(s,"mouseup",(function(e){w&&(e.preventDefault(),e.stopImmediatePropagation()),i()}));return function(){d(),f()}}if($){var h=function(e){e.preventDefault()},p=G(e,"touchstart",(function(e){if(1===e.touches.length){var n=e.touches[0];t(n.target,{x:n.pageX,y:n.pageY})}}));return window.addEventListener("contextmenu",h),function(){p(),window.removeEventListener("contextmenu",h)}}var y=G(e,"mousedown",(function(e){!e.target||void 0!==e.buttons&&1!==e.buttons||t(e.target,{x:e.pageX,y:e.pageY})}));return function(){y()}}}}),[n,O,w]);var x=t.useMemo((function(){var e={};return w&&Z(e,{touchAction:"none",pointerEvents:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"}),p.style&&Z(e,p.style),e}),[w,p.style]);return p.style=x,r.default.createElement("div",K(K({},p),{},{ref:m}),f?f(v):h)}));function te(e){function t(t){return Math.max(-2.5,Math.min(e[t],2.5))}var n={x:t("x"),y:t("y")};return n.x===e.x&&n.y===e.y?e:n}function ne(e,t,n,r,i,o){function a(a){var c="x"===a?["width","left","right"]:["height","top","bottom"],l=c[0],u=t[l],s=e[a];if(-1===i[a])return s;var d=Math.min(u-(r[c[1]]+n[l]+r[c[2]]),0);return o&&u>0&&(d=u*Math.ceil(d/u)),Math.max(d,Math.min(s,0))}var c={x:a("x"),y:a("y")};return c.x===e.x&&c.y===e.y?e:c}function re(e,t,n,r,i){var o,a,c,l="number"==typeof i?(o=i,0===(c=Math.sqrt((a=t).x*a.x+a.y*a.y))?{x:0,y:0}:{x:o*(a.x/c),y:o*(a.y/c)}):i;function u(i){var o="x"===i?"width":"height",a=e[i],c=t[i];if(r&&n[o]>0){var u=a/n[o];a=n[o]*(u=c>.5?Math.ceil(u):-.5>c?Math.floor(u):Math.round(u))}else l[i]&&(a+=c*(c/l[i])/2);return a}return{x:u("x"),y:u("y")}}function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oe(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(n),!0).forEach((function(t){ae(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ae(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ce=.025,le={size:{width:0,height:0},contentSize:{width:0,height:0},contentInset:{top:0,right:0,bottom:0,left:0},contentOffset:{x:0,y:0},contentVelocity:{x:0,y:0},drag:null,deceleration:null,bound:{x:1,y:1},pagingEnabled:!1,directionalLockEnabled:!1,pannable:V},ue=function(e,t){switch(t.type){case"setState":return de(se(e,t));case"dragStart":return fe(e);case"dragMove":return he(e);case"dragEnd":return pe(e);case"dragCancel":return ye(e);case"decelerate":return de(ve(e));case"scrollTo":return de(ge(e,t));default:return e}},se=function(e,t){return oe(oe({},e),t.payload)},de=function(e){var t=e.size,n=e.contentSize,r=e.contentInset,i=e.contentOffset,o=e.contentVelocity,a=e.drag,c=e.deceleration,l=e.pagingEnabled,u=e.bound,s=ce;if(c){var d=c.endOffset,f=ne(i,t,n,r,u,l);if(d!==ne(d,t,n,r,u,l)&&i!==f){var h=i,p=te(o);return 0===u.x&&(p=oe(oe({},p),{},{x:0}),h=oe(oe({},h),{},{x:f.x})),0===u.y&&(p=oe(oe({},p),{},{y:0}),h=oe(oe({},h),{},{y:f.y})),c.rate!==s&&(d=re(h,p,t,l,s)),d=ne(d,t,n,r,u,l),oe(oe({},e),{},{contentOffset:h,contentVelocity:p,drag:null,deceleration:Oe(d,s,h,p)})}}else if(!a){var y=re(i,o,t,l,s);if((y=ne(y,t,n,r,u,l)).x!==i.x||y.y!==i.y)return oe(oe({},e),{},{drag:null,deceleration:Oe(y,s,i,o)})}return e},fe=function(e){var t=e.contentOffset,n=e.pannable.velocity;if(!n)return e;var r={x:1,y:1};e.directionalLockEnabled&&(Math.abs(n.x)>Math.abs(n.y)?r.y=0:r.x=0);var i={x:r.x*n.x,y:r.y*n.y};return oe(oe({},e),{},{contentVelocity:i,drag:{direction:r,startOffset:t},deceleration:null})},he=function(e){var t=e.contentOffset,n=e.drag,r=e.pannable,i=r.translation,o=r.interval;if(!n||!i||!o)return e;var a={x:n.startOffset.x+n.direction.x*i.x,y:n.startOffset.y+n.direction.y*i.y},c={x:((a=function(e,t,n,r,i){function o(o){var a="x"===o?["width","height","left","right"]:["height","width","top","bottom"],c=a[0],l=a[1],u=e[o],s=i[o];if(-1===s)return u;var d=Math.min(t[c]-(r[a[2]]+n[c]+r[a[3]]),0),f=Math.min(t[c],t[l])/2;return u>0?0===s?0:f*(1-f/(f+u)):d>u?0===s?d:d-f*(1-f/(f-u+d)):u}var a={x:o("x"),y:o("y")};return a.x===e.x&&a.y===e.y?e:a}(a,e.size,e.contentSize,e.contentInset,e.bound)).x-t.x)/o,y:(a.y-t.y)/o};return oe(oe({},e),{},{contentOffset:a,contentVelocity:c})},pe=function(e){var t=e.contentOffset,n=e.size,r=e.pagingEnabled,i=r?ce:.0025,o=te(e.contentVelocity),a=re(t,o,n,r,i);return oe(oe({},e),{},{contentVelocity:o,drag:null,deceleration:Oe(a,i,t,o)})},ye=function(e){var t=e.contentOffset,n=e.drag,r=e.size,i=e.pagingEnabled;if(!n)return e;var o=te(e.contentVelocity),a=re(n.startOffset,{x:0,y:0},r,i,.025);return oe(oe({},e),{},{contentVelocity:o,drag:null,deceleration:Oe(a,.025,t,o)})},ve=function(e){var t=e.deceleration;if(!t)return e;var n=me(t),r=n.offset,i=n.velocity,o=n.didEnd;return oe(oe({},e),{},{contentOffset:r,contentVelocity:i,drag:null,deceleration:o?null:t})},ge=function(e,t){var n=e.contentOffset,r=e.size,i=t.payload,o=i.offset,a=void 0===o?{x:0,y:0}:o,c=i.point,l=i.align,u=void 0===l?0:l,s=i.animated,d=i.rect,f=void 0===s?-1:s;"boolean"==typeof f&&(f=f?1:-1),e.drag&&(f=-1),d||(d=c?oe(oe({},c),{},{width:0,height:0}):{x:-a.x,y:-a.y,width:0,height:0});var h=function(e,t,n,r){var i="object"==typeof t?t:{x:t,y:t};function o(t){var o="x"===t?"width":"height",a=-e[t],c=i[t],l=r[o]-e[o];if("auto"===c){var u=0>l?-1:1;a+=u*Math.max(0,Math.min(u*(n[t]-a),u*l))}else"start"===c?c=0:"center"===c?c=.5:"end"===c&&(c=1),a+=c*l;return a}return{x:o("x"),y:o("y")}}(d,u,n,r);return be(e,{type:"setContentOffset",payload:{offset:h,animated:f}})},be=function(e,t){var n=e.contentOffset,r=e.contentVelocity,i=e.drag,o=e.deceleration,a=e.size,c=e.pagingEnabled,l=t.payload,u=l.offset,s=l.animated;if(1===s){var d=re(u,{x:0,y:0},a,c,ce);return oe(oe({},e),{},{drag:null,deceleration:Oe(d,ce,n,r)})}if(i)return oe(oe({},e),{},{contentOffset:u,drag:oe(oe({},i),{},{startOffset:{x:i.startOffset.x+u.x-n.x,y:i.startOffset.y+u.y-n.y}})});if(o){if(0===s)return oe(oe({},e),{},{contentOffset:u,contentVelocity:{x:0,y:0},deceleration:null});var f=re({x:o.endOffset.x+u.x-n.x,y:o.endOffset.y+u.y-n.y},{x:0,y:0},a,c,o.rate);return oe(oe({},e),{},{contentOffset:u,deceleration:Oe(f,o.rate,u,r)})}return oe(oe({},e),{},{contentOffset:u})};function me(e){var t=e.points,n=e.duration,r=e.startTime,i=e.endOffset;function o(e,r){var i=t[e],o=i[0],a=i[1],c=i[2],l=i[3];return[o-3*(o-a)*r+3*(o-2*a+c)*Math.pow(r,2)-(o-3*a+3*c-l)*Math.pow(r,3),(-3*(o-a)+6*(o-2*a+c)*r-3*(o-3*a+3*c-l)*Math.pow(r,2))/n]}var a=(new Date).getTime(),c=1;if(n>0&&(c=(a-r)/n),0>c||c>=1)return{offset:i,velocity:{x:0,y:0},didEnd:!0};var l=o("x",c),u=l[0],s=l[1],d=o("y",c);return{offset:{x:u,y:d[0]},velocity:{x:s,y:d[1]},didEnd:!1}}function Oe(e,t,n,r){var i=(new Date).getTime(),o=0;if(0>=t)throw Error("Rate needs more than 0.");var a,c={x:e.x-n.x,y:e.y-n.y},l=Math.sqrt(Math.pow(c.x,2)+Math.pow(c.y,2));if(l){var u=Math.sqrt(Math.pow(a=(r.x*c.x+r.y*c.y)/l,2)/2+t*l),s=(u-a)/t;0>s&&(u=a,s=0),o=s+u/t}else a=Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2)),o=(Math.sqrt(2)+1)*a/t;return{endOffset:e,rate:t,duration:o,startTime:i,points:{x:[n.x,n.x+r.x*(o/3),e.x,e.x],y:[n.y,n.y+r.y*(o/3),e.y,e.y]}}}var we,xe,je=r.default.createContext({visibleRect:{x:0,y:0,width:0,height:0},onResize:function(){}});if("undefined"!=typeof window){we=window.requestAnimationFrame,xe=window.cancelAnimationFrame;for(var Ee=["ms","moz","webkit","o"],Pe=window,Se=0;!we&&4>Se;)we=Pe[Ee[Se]+"RequestAnimationFrame"],xe=Pe[Ee[Se]+"CancelAnimationFrame"]||Pe[Ee[Se]+"CancelRequestAnimationFrame"],Se++;if(!we){var ze=0;we=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-ze)),r=window.setTimeout((function(){e(t+n)}),n);return ze=t+n,r},xe=function(e){window.clearTimeout(e)}}}function De(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ie(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?De(Object(n),!0).forEach((function(t){Te(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):De(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Te(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ke=r.default.memo((function(e){var n=e.pannable,i=e.size,o=e.pagingEnabled,a=e.directionalLockEnabled,c=e.bound,l=e.contentInset,u=e.contentStyle,s=e.onScroll,d=e.onStartDragging,f=e.onEndDragging,h=e.onStartDecelerating,p=e.onEndDecelerating,y=e.onResizeContent,v=e.renderBackground,g=e.renderOverlay,b=e.render,m=t.useReducer(ue,le),O=m[0],w=m[1],x=t.useRef(O),j={onScroll:s,onStartDragging:d,onEndDragging:f,onStartDecelerating:h,onEndDecelerating:p,onResizeContent:y},E=t.useRef(j);E.current=j;var P=t.useRef({scrollTo:function(e){w({type:"scrollTo",payload:e})}}),S=t.useCallback((function(e){w({type:"setState",payload:{contentSize:e}})}),[]);k((function(){w({type:"setState",payload:{pannable:n}})}),[n]),k((function(){w({type:"setState",payload:{size:i,bound:c,contentInset:l,pagingEnabled:o,directionalLockEnabled:a}})}),[i,c,l,o,a]),k((function(){var e=x.current;x.current=O,e.pannable.translation!==O.pannable.translation&&w(O.pannable.translation?e.pannable.translation?{type:"dragMove"}:{type:"dragStart"}:O.pannable.cancelled?{type:"dragCancel"}:{type:"dragEnd"}),e.contentSize!==O.contentSize&&E.current.onResizeContent&&E.current.onResizeContent(O.contentSize);var t={size:O.size,contentSize:O.contentSize,contentInset:O.contentInset,contentOffset:O.contentOffset,contentVelocity:O.contentVelocity,dragging:!!O.drag,decelerating:!!O.deceleration};if(e.contentOffset!==O.contentOffset&&E.current.onScroll&&E.current.onScroll(t),e.drag!==O.drag&&(e.drag?O.drag||E.current.onEndDragging&&E.current.onEndDragging(t):E.current.onStartDragging&&E.current.onStartDragging(t)),e.deceleration!==O.deceleration&&(e.deceleration?O.deceleration||E.current.onEndDecelerating&&E.current.onEndDecelerating(t):E.current.onStartDecelerating&&E.current.onStartDecelerating(t)),O.deceleration){var n=we((function(){w({type:"decelerate"})}));return function(){xe(n)}}}),[O]);var z=v?v(O,P.current):null,D=g?g(O,P.current):null,I=b(O,P.current),T=t.useMemo((function(){return Ie(Ie({willChange:"transform",overflow:"hidden",position:"absolute",left:O.contentInset.left,top:O.contentInset.top,width:O.contentSize.width,height:O.contentSize.height},{WebkitTransform:"translate3d("+(e=O.contentOffset).x+"px, "+e.y+"px, 0)",msTransform:"translate("+e.x+"px, "+e.y+"px)",transform:"translate3d("+e.x+"px, "+e.y+"px, 0)"}),u);var e}),[O.contentOffset,O.contentSize,O.contentInset,u]),R=t.useMemo((function(){return{visibleRect:{x:-O.contentOffset.x,y:-O.contentOffset.y,width:O.size.width,height:O.size.height},onResize:S}}),[O.contentOffset,O.size,S]);return r.default.createElement(r.default.Fragment,null,z,r.default.createElement("div",{style:T},r.default.createElement(je.Provider,{value:R},I)),D)})),Re=["width","height","pagingEnabled","directionalLockEnabled","boundX","boundY","contentInsetTop","contentInsetRight","contentInsetBottom","contentInsetLeft","contentStyle","onScroll","onStartDragging","onEndDragging","onStartDecelerating","onEndDecelerating","onResizeContent","renderBackground","renderOverlay","render","scrollTo","children"];function Ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Me(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ce(Object(n),!0).forEach((function(t){Le(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ae(){return(Ae=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var He=r.default.memo((function(e){var n=e.width,i=e.height,o=e.pagingEnabled,a=void 0!==o&&o,c=e.directionalLockEnabled,l=void 0!==c&&c,u=e.boundX,s=void 0===u?1:u,d=e.boundY,f=void 0===d?1:d,h=e.contentInsetTop,p=void 0===h?0:h,y=e.contentInsetRight,v=void 0===y?0:y,g=e.contentInsetBottom,b=void 0===g?0:g,m=e.contentInsetLeft,O=void 0===m?0:m,w=e.contentStyle,x=e.onScroll,j=e.onStartDragging,E=e.onEndDragging,P=e.onStartDecelerating,S=e.onEndDecelerating,z=e.onResizeContent,D=e.renderBackground,I=e.renderOverlay,T=e.render,R=e.scrollTo,C=e.children,M=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;o.length>r;r++)0>t.indexOf(n=o[r])&&(i[n]=e[n]);return i}(e,Re),L=t.useMemo((function(){return{width:n,height:i}}),[n,i]),A=t.useMemo((function(){return{x:s,y:f}}),[s,f]),H=t.useMemo((function(){return{top:p,right:v,bottom:b,left:O}}),[p,v,b,O]),W=t.useRef(),N=t.useRef(),F={shouldStart:M.shouldStart},V=t.useRef(F);V.current=F;var _=t.useCallback((function(e){var t=!0;if(V.current.shouldStart&&(t=V.current.shouldStart(e)),t){var n=W.current;t=!!n&&function(e,t,n,r,i){var o=Math.abs(e.x)>Math.abs(e.y)?["x","width","left","right"]:["y","height","top","bottom"],a=o[1],c=o[2],l=o[3];if(0!==i[o[0]])return!0;return r[c]+n[a]+r[l]>t[a]}(e.velocity,n.size,n.contentSize,n.contentInset,n.bound)}return t}),[]);k((function(){if(R){var e=N.current;e&&e.scrollTo(R)}}),[R]);var q=t.useMemo((function(){var e={overflow:"hidden",position:"relative",width:L.width,height:L.height};return M.style&&Ae(e,M.style),e}),[L,M.style]);return M.style=q,M.shouldStart=_,r.default.createElement(ee,Me(Me({},M),{},{render:function(e){return r.default.createElement(ke,{pannable:e,size:L,pagingEnabled:a,directionalLockEnabled:l,bound:A,contentInset:H,contentStyle:w,onScroll:x,onStartDragging:j,onEndDragging:E,onStartDecelerating:P,onEndDecelerating:S,onResizeContent:z,renderBackground:D,renderOverlay:I,render:function(e,t){return W.current=e,N.current=t,T?T(e,t):C}})}}))}));var We=["width","height","autoResizing","render","children"];function Ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fe(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ne(Object(n),!0).forEach((function(t){Ve(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _e(){return(_e=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function qe(){}var Be={position:"absolute",top:0,left:0},Xe=r.default.memo((function(e){var n=e.width,i=e.height,o=e.autoResizing,a=void 0!==o&&o,c=e.render,l=e.children,u=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;o.length>r;r++)0>t.indexOf(n=o[r])&&(i[n]=e[n]);return i}(e,We),s=t.useContext(je),d=null!=n?n:s.width,f=null!=i?i:s.height,h=t.useMemo((function(){return void 0!==d&&void 0!==f?{width:d,height:f}:null}),[d,f]),p=t.useState(null),y=p[0],v=p[1],g=t.useRef(y),b=t.useRef(null),m={onResize:s.onResize},O=t.useRef(m);O.current=m;var w=t.useCallback((function(){var e=b.current;if(e){var t={width:e.offsetWidth,height:e.offsetHeight};v((function(e){return T(e,t)?e:t}))}}),[]);k((function(){var e=g.current;g.current=y,y&&!T(e,y)&&O.current.onResize(y)}),[y]),k((function(){if(h)v((function(e){return T(e,h)?e:h}));else if(w(),a){var e=I(),t=b.current;if(e&&t)return e.listenTo(t,w),function(){e.uninstall(t)}}}),[h,a,w]);var x=t.useMemo((function(){var e={position:"absolute"};return void 0!==d&&(e.width=d),void 0!==f&&(e.height=f),e}),[d,f]),j=l;c&&(j=c()),h||(j=r.default.createElement("div",{style:Be},r.default.createElement("div",{style:x,ref:b},j)));var E=t.useMemo((function(){var e={position:"relative"};return y&&(e.width=y.width,e.height=y.height),u.style&&_e(e,u.style),e}),[y,u.style]);return u.style=E,r.default.createElement("div",Fe({},u),r.default.createElement(je.Provider,{value:Fe(Fe({},s),{},{width:d,height:f,onResize:qe})},j))}));function Ye(e,t){function n(n){var r,i="x"===n?"width":"height";return(r={})[n]=t[n]-e[n],r[i]=t[i],r}var r=n("x"),i=r.x,o=r.width,a=n("y");return{x:i,y:a.y,width:o,height:a.height}}function Ge(e,t){if(!t)return!0;function n(n){var r="x"===n?"width":"height";return e[n]+e[r]>=t[n]-t[r]/4&&t[n]+5*t[r]/4>=e[n]}return n("x")&&n("y")}var Ue=["itemWidth","itemHeight","itemCount","renderItem","direction","rowSpacing","columnSpacing","width","height","render","children"];function Je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ke(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Je(Object(n),!0).forEach((function(t){Qe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Je(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Qe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ze(){return(Ze=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function $e(){}var et=function(e){return r.default.isValidElement(e.children)?e.children:r.default.createElement(r.default.Fragment,null,e.children)},tt=r.default.memo((function(e){var n=e.itemWidth,i=e.itemHeight,o=e.itemCount,a=e.renderItem,c=e.direction,l=void 0===c?"y":c,u=e.rowSpacing,s=void 0===u?0:u,d=e.columnSpacing,f=void 0===d?0:d,h=e.width,p=e.height,y=e.render,v=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;o.length>r;r++)0>t.indexOf(n=o[r])&&(i[n]=e[n]);return i}(e,Ue),g=t.useContext(je),b=null!=h?h:g.width,m=null!=p?p:g.height,O=t.useMemo((function(){return function(e){var t,n,r=e.spacing,i=e.itemSize,o=e.itemCount,a="x"===e.direction?["y","x","height","width","column","row"]:["x","y","width","height","row","column"],c=a[0],l=a[1],u=a[2],s=a[3],d=a[4],f=a[5],h=e.size[u],p=0,y=0,v=0,g=[];void 0===h?(v=o,0===i[u]?h=0:(h=o*i[u],o>1&&(h+=(o-1)*r[f]))):0===i[u]?v=o:(v=1,h>i[u]&&(v+=Math.floor((h-i[u])/(i[u]+r[f]))));v>0&&(y=Math.ceil(o/v));for(var b=0;y>b;b++){b>0&&(p+=r[d]);for(var m=0;v>m;m++){var O,w,x=m+b*v,j=0;if(v>1&&(j+=Math.round(m*((h-i[u])/(v-1)))),x>=o)break;g.push(((w={rect:(O={},O[c]=j,O[l]=p,O[u]=i[u],O[s]=i[s],O)})[d+"Index"]=b,w[f+"Index"]=m,w.itemIndex=x,w))}p+=i[s]}return{size:(t={},t[u]=h,t[s]=p,t),count:(n={},n[d]=y,n[f]=v,n),layoutList:g}}({direction:l,size:{width:b,height:m},spacing:{row:s,column:f},itemSize:{width:n,height:i},itemCount:o})}),[l,b,m,s,f,n,i,o]),w=t.useRef(),x={onResize:g.onResize},j=t.useRef(x);j.current=x,k((function(){var e=w.current;w.current=O.size,T(e,O.size)||j.current.onResize(O.size)}),[O.size]);var E=O.layoutList.map((function(e){return function(e){var t=e.rect,o=e.itemIndex,c=e.visibleRect,l=e.needsRender,u=e.Item,s=!1,d=a(e),f="GridContent_"+o,h={position:"absolute",left:t.x,top:t.y,width:t.width,height:t.height};if(r.default.isValidElement(d)&&d.type===u){d.key&&(f=d.key);var p=d.props;void 0!==p.forceRender&&(s=p.forceRender),void 0!==p.style&&Ze(h,p.style),d=d.props.children}return l||s?r.default.createElement("div",{key:f,style:h},r.default.createElement(je.Provider,{value:Ke(Ke({},g),{},{width:n,height:i,visibleRect:c,onResize:$e})},d)):null}(Ke(Ke({},e),{},{visibleRect:Ye(e.rect,g.visibleRect),needsRender:Ge(e.rect,g.visibleRect),Item:et}))}));y&&y(O);var P=t.useMemo((function(){var e={position:"relative",overflow:"hidden"};return O.size&&(e.width=O.size.width,e.height=O.size.height),v.style&&Ze(e,v.style),e}),[O.size,v.style]);return v.style=P,r.default.createElement("div",Ke({},v),E)}));var nt=["itemCount","renderItem","direction","width","height","spacing","estimatedItemWidth","estimatedItemHeight","render","children"];function rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function it(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rt(Object(n),!0).forEach((function(t){ot(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ot(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function at(){return(at=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ct=function(e){return r.default.isValidElement(e.children)?e.children:r.default.createElement(r.default.Fragment,null,e.children)},lt=r.default.memo((function(e){var n=e.itemCount,i=e.renderItem,o=e.direction,a=void 0===o?"y":o,c=e.width,l=e.height,u=e.spacing,s=void 0===u?0:u,d=e.estimatedItemWidth,f=void 0===d?0:d,h=e.estimatedItemHeight,p=void 0===h?0:h,y=e.render,v=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;o.length>r;r++)0>t.indexOf(n=o[r])&&(i[n]=e[n]);return i}(e,nt),g=t.useContext(je),b=null!=c?c:g.width,m=null!=l?l:g.height,O=t.useState([]),w=O[0],x=O[1],j=t.useState({}),E=j[0],P=j[1],S=t.useMemo((function(){return function(e,t,n){var r,i,o,a=e.size,c=e.spacing,l=e.estimatedItemSize,u=e.itemCount,s="x"===e.direction?["y","x","height","width"]:["x","y","width","height"],d=s[0],f=s[1],h=s[2],p=s[3],y=0,v=0,g=[],b={};void 0!==a[h]&&(b[h]=a[h]);for(var m=0;u>m;m++){var O,w=t[m]||null,x=w&&n[w]||null,j=((O={})[d]=0,O[f]=v,O);if(x)at(j,x);else{var E,P=l[h],S=l[p];j[h]=null!==(E=b[h])&&void 0!==E?E:"function"==typeof P?P(m):P,j[p]="function"==typeof S?S(m):S}g.push({rect:j,itemIndex:m,itemHash:w,itemSize:x}),j[p]>0&&(v+=j[p],u-1>m&&(v+=c)),j[h]>y&&(y=j[h])}return{size:(o={},o[h]=null!==(r=b[h])&&void 0!==r?r:y,o[p]=null!==(i=b[p])&&void 0!==i?i:v,o),layoutList:g}}({direction:a,size:{width:b,height:m},spacing:s,estimatedItemSize:{width:f,height:p},itemCount:n},w,E)}),[b,m,a,s,f,p,n,w,E]),z=t.useRef(),D={onResize:g.onResize},I=t.useRef(D);I.current=D,k((function(){var e=z.current;z.current=S.size,T(e,S.size)||I.current.onResize(S.size)}),[S.size]);var R=[];var C=S.layoutList.map((function(e){return function(e){var t=e.rect,n=e.itemIndex,o=e.itemSize,c=e.visibleRect,l=e.needsRender,u=e.Item,s=!1,d=i(e),f="ListContent_"+n,h=null,p={position:"absolute",left:t.x,top:t.y,width:t.width,height:t.height};if(r.default.isValidElement(d)&&d.type===u){d.key&&(f=d.key);var y=d.props;void 0!==y.forceRender&&(s=y.forceRender),void 0!==y.hash&&(h=y.hash),void 0!==y.style&&at(p,y.style),d=d.props.children}null===h&&(h=f);var v=!l&&!s;if(o||-1===R.indexOf(h)||(v=!0),R[n]=h,v)return null;var b=it({},g);return b.visibleRect=c,b.onResize=function(e){P((function(t){var n;return h?T(t[h],e)?t:it(it({},t),{},((n={})[h]=e,n)):t}))},"x"===a?b.height=S.size.height:b.width=S.size.width,r.default.createElement("div",{key:f,style:p},r.default.createElement(je.Provider,{value:b},d))}(it(it({},e),{},{visibleRect:Ye(e.rect,g.visibleRect),needsRender:Ge(e.rect,g.visibleRect),Item:ct}))}));(function(e,t){if(!e||!t)return!1;if(e===t)return!0;if(e.length!==t.length)return!1;for(var n=0;e.length>n;n++)if(e[n]!==t[n])return!1;return!0})(w,R)||x(R),y&&y(S);var M=t.useMemo((function(){var e={position:"relative",overflow:"hidden"};return S.size&&(e.width=S.size.width,e.height=S.size.height),v.style&&at(e,v.style),e}),[S.size,v.style]);return v.style=M,r.default.createElement("div",it({},v),C)}));function ut(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function st(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(n),!0).forEach((function(t){dt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ut(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function dt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ft={loopCount:2,loopOffset:0,loopWidth:0,direction:"x",pad:le,scrollTo:null},ht=function(e,t){switch(t.type){case"setState":return yt(pt(e,t));default:return e}},pt=function(e,t){return st(st({},e),t.payload)},yt=function(e){var t=e.loopCount,n=e.loopWidth,r=e.loopOffset,i=e.direction,o=e.pad,a=o.size,c=o.contentOffset,l="y"===i?"height":"width",u=o.contentSize[l]/t,s=2;if(0!==u&&(s+=Math.floor(a[l]/u)),n!==u||t!==s)return st(st({},e),{},{loopCount:s,loopWidth:u});var d=function(e,t,n,r,i){var o;if(1===r||0===n)return[e,0];var a="y"===i?["height","y","x"]:["width","x","y"],c=a[1],l=a[2],u=t[a[0]],s=(u-n*(r-1))/2,d=(u-n*(r+1))/2,f=e[c],h=0;if(f>=d&&s>=f)return[e,0];d>f?h=Math.floor((s-f)/n):f>s&&(h=-Math.floor((f-d)/n));return[(o={},o[c]=f+=n*h,o[l]=e[l],o),h]}(c,a,n,t,i),f=d[0],h=d[1];return c!==f?st(st({},e),{},{loopOffset:r+h,scrollTo:{offset:f,animated:!1}}):e};var vt=r.default.memo((function(e){var n=e.pad,i=e.padMethods,o=e.direction,a=e.render,c=t.useReducer(ht,ft),l=c[0],u=c[1],s={scrollTo:i.scrollTo},d=t.useRef(s);return d.current=s,k((function(){u({type:"setState",payload:{pad:n}})}),[n]),k((function(){u({type:"setState",payload:{direction:o}})}),[o]),k((function(){l.scrollTo&&d.current.scrollTo(l.scrollTo)}),[l.scrollTo]),r.default.createElement(lt,{direction:o,width:l.pad.size.width,height:l.pad.size.height,itemCount:l.loopCount,renderItem:function(e){return r.default.createElement(e.Item,{key:e.itemIndex+l.loopOffset,hash:"Loop",forceRender:!0},a(l))}})})),gt=["direction","render","children"];function bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mt(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(n),!0).forEach((function(t){Ot(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ot(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wt=r.default.memo((function(e){var t,n,i=e.direction,o=void 0===i?"x":i,a=e.render,c=e.children,l=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;o.length>r;r++)0>t.indexOf(n=o[r])&&(i[n]=e[n]);return i}(e,gt),u=l.directionalLockEnabled;(l.directionalLockEnabled=void 0===u||u,"x"===o)?l.boundX=null!==(t=l.boundX)&&void 0!==t?t:-1:l.boundY=null!==(n=l.boundY)&&void 0!==n?n:-1;return r.default.createElement(He,mt(mt({},l),{},{render:function(e,t){return r.default.createElement(vt,{pad:e,padMethods:t,direction:o,render:function(e){return a?a(e):c}})}}))}));function xt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jt(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xt(Object(n),!0).forEach((function(t){Et(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pt={pad:le,activeIndex:0,direction:"x",loop:!0,itemCount:0,scrollTo:null,playing:!1},St=function(e,t){switch(t.type){case"setState":return Dt(zt(e,t));case"scrollToIndex":return It(e,t);case"next":return Tt(e,t);case"play":return kt(e,t);default:return e}},zt=function(e,t){return jt(jt({},e),t.payload)},Dt=function(e,t){var n=e.activeIndex,r=e.pad,i=function(e,t,n,r){var i="y"===r?["height","y"]:["width","x"],o=i[1],a=t[i[0]],c=0;a>0&&(c=Math.round(-e[o]/a));return c%n}(r.contentOffset,r.size,e.itemCount,e.direction);return n===i?e:jt(jt({},e),{},{activeIndex:i})},It=function(e,t){var n=e.activeIndex,r=e.itemCount,i=e.direction,o=e.loop,a=e.pad,c=a.contentOffset,l=a.size,u=t.payload.animated,s=t.payload.index;"function"==typeof s&&(s=s({activeIndex:n,itemCount:r})),o||(s=Math.max(0,Math.min(s,r-1)));var d=function(e,t,n,r){var i,o="y"===r?["height","y","x"]:["width","x","y"],a=o[1],c=o[2];return(i={})[a]=t[a]-e*n[o[0]],i[c]=t[c],i}(s-n,c,l,i);return jt(jt({},e),{},{scrollTo:{offset:d,animated:u}})},Tt=function(e,t){var n=e.activeIndex+1;return e.loop||(n%=e.itemCount),It(e,{type:"scrollToIndex",payload:{index:n,animated:t.payload.animated}})},kt=function(e,t){return jt(jt({},e),{},{playing:t.payload})};var Rt=r.default.memo((function(e){var n=e.pad,i=e.padMethods,o=e.direction,a=e.loop,c=e.autoplayEnabled,l=e.autoplayInterval,u=e.itemCount,s=e.onActiveIndexChange,d=e.render,f=t.useReducer(St,Pt),h=f[0],p=f[1],y=t.useRef(h),v={onActiveIndexChange:s,scrollTo:i.scrollTo},g=t.useRef(v);g.current=v;var b=t.useRef({scrollToIndex:function(e){p({type:"scrollToIndex",payload:e})},play:function(e){p({type:"play",payload:e})}});return k((function(){p({type:"setState",payload:{pad:n}})}),[n]),k((function(){p({type:"setState",payload:{direction:o,loop:a,itemCount:u}})}),[o,a,u]),k((function(){var e=y.current;(y.current=h,e.activeIndex!==h.activeIndex)&&(g.current.onActiveIndexChange&&g.current.onActiveIndexChange({activeIndex:h.activeIndex,itemCount:h.itemCount}))}),[h]),k((function(){h.scrollTo&&g.current.scrollTo(h.scrollTo)}),[h.scrollTo]),k((function(){if(h.playing){var e=setInterval((function(){p({type:"next",payload:{animated:!0}})}),l);return function(){clearInterval(e)}}}),[h.playing,l]),k((function(){b.current.play(c&&!h.pad.drag)}),[c,h.pad.drag]),r.default.createElement(r.default.Fragment,null,d(h,b.current))})),Ct=["itemCount","renderItem","direction","loop","autoplayEnabled","autoplayInterval","onActiveIndexChange","scrollToIndex","render","children"];function Mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lt(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mt(Object(n),!0).forEach((function(t){At(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function At(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ht=r.default.memo((function(e){var n=e.itemCount,i=e.renderItem,o=e.direction,a=void 0===o?"x":o,c=e.loop,l=void 0===c||c,u=e.autoplayEnabled,s=void 0===u||u,d=e.autoplayInterval,f=void 0===d?5e3:d,h=e.onActiveIndexChange,p=e.scrollToIndex,y=e.render,v=e.children,g=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;o.length>r;r++)0>t.indexOf(n=o[r])&&(i[n]=e[n]);return i}(e,Ct),b=g.width,m=g.height,O=g.pagingEnabled,w=void 0===O||O,x=g.directionalLockEnabled,j=void 0===x||x,E=g.renderOverlay,P=g.onMouseEnter,S=g.onMouseLeave,z=t.useRef(),D={onMouseEnter:P,onMouseLeave:S},I=t.useRef(D);I.current=D;var T,R,C=t.useCallback((function(e){var t=z.current;t&&t.play(!1),I.current.onMouseEnter&&I.current.onMouseEnter(e)}),[]),M=t.useCallback((function(e){var t=z.current;t&&t.play(!0),I.current.onMouseLeave&&I.current.onMouseLeave(e)}),[]);(k((function(){if(p){var e=z.current;e&&e.scrollToIndex(p)}}),[p]),g.pagingEnabled=w,g.directionalLockEnabled=j,s&&(g.onMouseEnter=C,g.onMouseLeave=M),"x"===a)?g.boundY=null!==(T=g.boundY)&&void 0!==T?T:0:g.boundX=null!==(R=g.boundX)&&void 0!==R?R:0;g.renderOverlay=function(e,t){return r.default.createElement(r.default.Fragment,null,r.default.createElement(Rt,{pad:e,padMethods:t,direction:a,loop:l,autoplayEnabled:s,autoplayInterval:f,itemCount:n,onActiveIndexChange:h,render:function(e,t){return z.current=t,y?y(e,t):v}}),E?E(e,t):null)};var L=r.default.createElement(tt,{width:b,height:m,itemWidth:b,itemHeight:m,direction:a,itemCount:n,renderItem:i});return l?r.default.createElement(wt,Lt({direction:a},g),L):r.default.createElement(He,Lt({},g),L)}));function Wt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nt(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wt(Object(n),!0).forEach((function(t){Ft(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ft(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vt={pad:le,scroll:null,scrollTo:null},_t=function(e,t){switch(t.type){case"setState":return qt(e,t);case"scrollTo":return Bt(e,t);case"scrollEnd":return Xt(e);case"scrollRecalculate":return Yt(e,t);default:return e}},qt=function(e,t){return Nt(Nt({},e),t.payload)},Bt=function(e,t){var n=t.payload,r=n.params,i=n.layout,o=Nt({},r),a=r.index,c=r.reverseRect;return void 0!==a?o.rect=function(e,t){var n=t.box,r=t.body,i={x:0,y:0,width:0,height:0};n&&n.layoutList[1]&&(i=n.layoutList[1].rect);if(r&&(e=Math.min(e,r.layoutList.length-1))>=0){var o=r.layoutList[e];i={x:i.x+o.rect.x,y:i.y+o.rect.y,width:o.rect.width,height:o.rect.height}}return i}(a,i):void 0!==c&&(o.rect=function(e,t){var n=t.box,r={x:0,y:0,width:e.width,height:e.height};n&&(r.x=n.size.width-r.width-e.x,r.y=n.size.height-r.height-e.y);return r}(c,i)),Nt(Nt({},e),{},{scrollTo:o,scroll:e.scroll||r})},Xt=function(e,t){return Nt(Nt({},e),{},{scroll:null})},Yt=function(e,t){var n=e.scroll;return n?Bt(e,{type:"scrollTo",payload:{params:n,layout:t.payload.layout}}):e};var Gt=r.default.memo((function(e){var n=e.pad,i=e.padMethods,o=e.layout,a=e.render,c=t.useReducer(_t,Vt),l=c[0],u=c[1],s=t.useRef(l),d=t.useRef(o),f=t.useRef(i);f.current=i;var h=t.useRef({scrollTo:function(e){u({type:"scrollTo",payload:{params:e,layout:d.current}})}});return t.useMemo((function(){u({type:"setState",payload:{pad:n}})}),[n]),k((function(){var e=s.current;s.current=l,l.scroll&&(e.pad.contentSize!==l.pad.contentSize?u({type:"scrollRecalculate",payload:{layout:d.current}}):(1!==l.scroll.animated&&!0!==l.scroll.animated||e.pad.deceleration&&!l.pad.deceleration)&&setTimeout((function(){u({type:"scrollEnd"})}),0))}),[l]),k((function(){l.scrollTo&&f.current.scrollTo(l.scrollTo)}),[l.scrollTo]),r.default.createElement(r.default.Fragment,null,a(l,h.current))})),Ut=["itemCount","renderItem","direction","spacing","estimatedItemWidth","estimatedItemHeight","renderHeader","renderFooter","scrollTo","render","infiniteStyle","bodyStyle","children"];function Jt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qt=r.default.memo((function(e){var n,i,o=e.itemCount,a=e.renderItem,c=e.direction,l=void 0===c?"y":c,u=e.spacing,s=void 0===u?0:u,d=e.estimatedItemWidth,f=void 0===d?0:d,h=e.estimatedItemHeight,p=void 0===h?0:h,y=e.renderHeader,v=e.renderFooter,g=e.scrollTo,b=e.render,m=e.infiniteStyle,O=e.bodyStyle,w=e.children,x=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;o.length>r;r++)0>t.indexOf(n=o[r])&&(i[n]=e[n]);return i}(e,Ut),j=x.width,E=x.height,P=x.renderOverlay,S=x.directionalLockEnabled,z=void 0===S||S,D=t.useRef({}),I=t.useRef();(k((function(){if(g){var e=I.current;e&&e.scrollTo(g)}}),[g]),x.directionalLockEnabled=z,"x"===l)?x.boundY=null!==(n=x.boundY)&&void 0!==n?n:0:x.boundX=null!==(i=x.boundX)&&void 0!==i?i:0;return x.renderOverlay=function(e,t){return r.default.createElement(r.default.Fragment,null,r.default.createElement(Gt,{direction:l,pad:e,padMethods:t,layout:D.current,render:function(e,t){return I.current=t,b?b(e,t):w}}),P?P(e,t):null)},r.default.createElement(He,function(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jt(Object(n),!0).forEach((function(t){Kt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},x),r.default.createElement(lt,{width:j,height:E,direction:l,itemCount:3,style:m,renderItem:function(e){var t=e.itemIndex,n=e.Item;return 0===t?y?y(e):null:2===t?v?v(e):null:r.default.createElement(n,{forceRender:!0,style:O},r.default.createElement(lt,{width:j,height:E,direction:l,spacing:s,itemCount:o,estimatedItemWidth:f,estimatedItemHeight:p,style:O,renderItem:a,render:function(e){return D.current.body=e,null}}))},render:function(e){return D.current.box=e,null}}))}));e.AutoResizing=H,e.Carousel=Ht,e.GridContent=tt,e.GridItem=et,e.Infinite=Qt,e.ItemContent=Xe,e.ListContent=lt,e.ListItem=ct,e.Loop=wt,e.Pad=He,e.Pannable=ee,e.calculateDeceleration=me,e.context=je,e.createDeceleration=Oe,e.initialCarouselState=Pt,e.initialInfiniteState=Vt,e.initialLoopState=ft,e.initialPadState=le,Object.defineProperty(e,"__esModule",{value:!0})}));

@@ -18,7 +18,5 @@ var _excluded = ["itemCount", "renderItem", "direction", "width", "height", "spacing", "estimatedItemWidth", "estimatedItemHeight", "render", "children"];

import React, { useContext, useMemo, useRef, useState } from 'react';
var ListItem = function ListItem(props) {
export var ListItem = function ListItem(props) {
return React.isValidElement(props.children) ? props.children : React.createElement(React.Fragment, null, props.children);
};
export var ListContent = React.memo(function (props) {

@@ -25,0 +23,0 @@ var itemCount = props.itemCount,

@@ -6,3 +6,3 @@ import PadContext from './PadContext';

import React, { useContext, useMemo, useRef, useState } from 'react';
const ListItem = (props) => React.isValidElement(props.children) ? props.children : React.createElement(React.Fragment, null, props.children);
export const ListItem = (props) => React.isValidElement(props.children) ? props.children : React.createElement(React.Fragment, null, props.children);
export const ListContent = React.memo((props) => {

@@ -9,0 +9,0 @@ const { itemCount, renderItem, direction = 'y', width, height, spacing = 0, estimatedItemWidth = 0, estimatedItemHeight = 0, render, children, ...divProps } = props;

{
"name": "react-pannable",
"version": "6.1.4",
"version": "6.1.5",
"description": "Flexible and Customizable Layouts for Scrolling Content with React",

@@ -5,0 +5,0 @@ "keywords": [

@@ -9,2 +9,3 @@ import { XY, Rect, Size } from '../interfaces';

}
export declare const ListItem: React.FC<ListItemProps>;
export declare type ListLayoutItem = {

@@ -11,0 +12,0 @@ rect: Rect;

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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