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

react-virtuoso

Package Overview
Dependencies
Maintainers
1
Versions
289
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-virtuoso - npm Package Compare versions

Comparing version 0.19.0 to 0.20.0

CHANGELOG.md

6

dist/EngineCommons.d.ts

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

import * as React from 'react';
import { TObservable } from './tinyrx';

@@ -8,3 +9,8 @@ interface TScrollLocationWithAlign {

export declare type TScrollLocation = number | TScrollLocationWithAlign;
export declare type TContainer = React.ComponentType<{
className: string;
style?: React.CSSProperties;
key?: number;
}> | keyof JSX.IntrinsicElements;
export declare const buildIsScrolling: (scrollTop$: TObservable<number>) => TObservable<boolean>;
export {};

5

dist/GroupedVirtuoso.d.ts
import * as React from 'react';
import { ReactElement } from 'react';
import { TScrollLocation } from './EngineCommons';

@@ -9,6 +10,6 @@ import { VirtuosoProps } from './Virtuoso';

groupCounts: number[];
group: (groupIndex: number) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
item: (index: number, groupIndex?: number | undefined) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
group: (groupIndex: number) => ReactElement;
item: (index: number, groupIndex?: number | undefined) => ReactElement;
groupIndices?: ((indices: number[]) => void) | undefined;
GroupContainer?: React.FC<Pick<import("./VirtuosoList").TRenderProps, "style" | "key" | "data-index" | "data-known-size">> | undefined;
} & React.RefAttributes<GroupedVirtuosoMethods>>;

2

dist/react-virtuoso.cjs.production.min.js

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),n=(e=require("resize-observer-polyfill"))&&"object"==typeof e&&"default"in e?e.default:e,r=t.createContext(void 0);function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function l(e,t,n){return(l=u()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&a(i,n.prototype),i}).apply(null,arguments)}function f(e){var t="function"==typeof Map?new Map:void 0;return(f=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return l(e,arguments,s(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),a(n,e)})(e)}function c(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e,t){return t(e)}:1===t.length?t[0]:function(e,n){var r=function(e){return n(e)};t.slice().reverse().forEach((function(e){var t=r;r=function(n){return e(n,t)}})),r(e)}}function h(e){return function(){var t=c.apply(void 0,arguments);return d(e,t)}}function d(e,t){var n=function(n){return e((function(e){return t(e,n)}))};return{subscribe:n,pipe:h(n)}}function p(e,t){void 0===t&&(t=!0);var n=[],r=e,i=function(e){return n.push(e),void 0!==r&&e(r),function(){n=n.filter((function(t){return t!==e}))}};return{next:function(e){t&&e===r||(r=e,n.forEach((function(t){return t(e)})))},subscribe:i,pipe:h(i),subscribers:n}}function v(){var e=[],t=function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}};return{next:function(t){e.forEach((function(e){return e(t)}))},subscribe:t,pipe:h(t),subscribers:e}}function g(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Array(t.length).fill(!1),i=Array(t.length),o=[],s=function(e){r.every((function(e){return e}))&&e.forEach((function(e){return e(i)}))};t.forEach((function(e,t){e.subscribe((function(e){r[t]=!0,i[t]=e,s(o)}))}));var a=function(e){return o.push(e),s([e]),function(){o=o.filter((function(t){return t!==e}))}};return{subscribe:a,pipe:h(a)}}function m(e){return function(t,n){n(e(t))}}function x(e){return function(t,n){return n(e)}}function y(e){return function(t,n){e>0?e--:n(t)}}function $(e){return function(t,n){e(t)&&n(t)}}function I(e){var t;return void 0===e&&(e=function(e,t){return e!==t}),function(n,r){e(t,n)&&(t=n,r(n))}}function b(e,t){var n=t;return function(t,r){r(n=e(n,t))}}function C(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Array(t.length).fill(!1),i=Array(t.length);return t.forEach((function(e,t){e.subscribe((function(e){i[t]=e,r[t]=!0}))})),function(e,t){r.every((function(e){return e}))&&t([e].concat(i))}}var T=function(e){var t,n,r=p(!1);return e.pipe(y(1),I(),x(!0)).subscribe(r.next),e.pipe(y(1),x(!1),(function(e,r){t=e,n&&clearTimeout(n),n=setTimeout((function(){r(t)}),200)})).subscribe(r.next),r},k=new(function(){function e(){this.level=0}var t=e.prototype;return t.rebalance=function(){return this},t.adjust=function(){return this},t.shift=function(){return this},t.remove=function(){return this},t.find=function(){},t.findWith=function(){},t.findMax=function(){return-Infinity},t.findMaxValue=function(){},t.insert=function(e,t){return new H({key:e,value:t,level:1})},t.walkWithin=function(){return[]},t.walk=function(){return[]},t.ranges=function(){return[]},t.rangesWithin=function(){return[]},t.empty=function(){return!0},t.isSingle=function(){return!0},t.isInvariant=function(){return!0},t.keys=function(){return[]},e}());Object.freeze(k);var w=function(e){function t(t){return e.call(this,"Unreachable case: "+t)||this}return o(t,e),t}(f(Error)),H=function(){function e(e){var t=e.value,n=e.level,r=e.left,i=void 0===r?k:r,o=e.right,s=void 0===o?k:o;this.key=e.key,this.value=t,this.level=n,this.left=i,this.right=s}var t=e.prototype;return t.shift=function(e){return this.clone({key:this.key+e,left:this.left.shift(e),right:this.right.shift(e)})},t.remove=function(e){var t=this.left,n=this.right;if(e===this.key){if(t.empty())return n;if(n.empty())return t;var r=t.last();return this.clone({key:r[0],value:r[1],left:t.deleteLast()}).adjust()}return e<this.key?this.clone({left:t.remove(e)}).adjust():this.clone({right:n.remove(e)}).adjust()},t.empty=function(){return!1},t.find=function(e){return e===this.key?this.value:e<this.key?this.left.find(e):this.right.find(e)},t.findWith=function(e){var t=e(this.value);switch(t){case-1:return this.left.findWith(e);case 0:return[this.key,this.value];case 1:return this.right.findWith(e);default:throw new w(t)}},t.findMax=function(e){if(this.key===e)return e;if(this.key<e){var t=this.right.findMax(e);return-Infinity===t?this.key:t}return this.left.findMax(e)},t.findMaxValue=function(e){if(this.key===e)return this.value;if(this.key<e){var t=this.right.findMaxValue(e);return void 0===t?this.value:t}return this.left.findMaxValue(e)},t.insert=function(e,t){return e===this.key?this.clone({key:e,value:t}):e<this.key?this.clone({left:this.left.insert(e,t)}).rebalance():this.clone({right:this.right.insert(e,t)}).rebalance()},t.walkWithin=function(e,t){var n=this.key,r=this.value,i=[];return n>e&&(i=i.concat(this.left.walkWithin(e,t))),n>=e&&n<=t&&i.push({key:n,value:r}),n<=t&&(i=i.concat(this.right.walkWithin(e,t))),i},t.walk=function(){return[].concat(this.left.walk(),[{key:this.key,value:this.value}],this.right.walk())},t.last=function(){return this.right.empty()?[this.key,this.value]:this.right.last()},t.deleteLast=function(){return this.right.empty()?this.left:this.clone({right:this.right.deleteLast()}).adjust()},t.clone=function(t){return new e({key:void 0!==t.key?t.key:this.key,value:void 0!==t.value?t.value:this.value,level:void 0!==t.level?t.level:this.level,left:void 0!==t.left?t.left:this.left,right:void 0!==t.right?t.right:this.right})},t.isSingle=function(){return this.level>this.right.level},t.rebalance=function(){return this.skew().split()},t.adjust=function(){var e=this.left,t=this.right,n=this.level;if(t.level>=n-1&&e.level>=n-1)return this;if(n>t.level+1){if(e.isSingle())return this.clone({level:n-1}).skew();if(e.empty()||e.right.empty())throw new Error("Unexpected empty nodes");return e.right.clone({left:e.clone({right:e.right.left}),right:this.clone({left:e.right.right,level:n-1}),level:n})}if(this.isSingle())return this.clone({level:n-1}).split();if(t.empty()||t.left.empty())throw new Error("Unexpected empty nodes");var r=t.left,i=r.isSingle()?t.level-1:t.level;return r.clone({left:this.clone({right:r.left,level:n-1}),right:t.clone({left:r.right,level:i}).split(),level:r.level+1})},t.isInvariant=function(){var e=this.left,t=this.right,n=this.level;return n===e.level+1&&(n===t.level||n===t.level+1)&&!(!t.empty()&&n<=t.right.level)&&e.isInvariant()&&t.isInvariant()},t.keys=function(){return[].concat(this.left.keys(),[this.key],this.right.keys())},t.ranges=function(){return this.toRanges(this.walk())},t.rangesWithin=function(e,t){return this.toRanges(this.walkWithin(e,t))},t.toRanges=function(e){if(0===e.length)return[];for(var t=e[0],n=t.key,r=t.value,i=[],o=1;o<=e.length;o++){var s=e[o];i.push({start:n,end:s?s.key-1:Infinity,value:r}),s&&(n=s.key,r=s.value)}return i},t.split=function(){var e=this.right,t=this.level;return e.empty()||e.right.empty()||e.level!==t||e.right.level!==t?this:e.clone({left:this.clone({right:e.left}),level:t+1})},t.skew=function(){var e=this.left;return e.empty()||e.level!==this.level?this:e.clone({right:this.clone({left:e.right})})},e}(),S=function(){function e(e){this.root=e}e.empty=function(){return new e(k)};var t=e.prototype;return t.find=function(e){return this.root.find(e)},t.findMax=function(e){return this.root.findMax(e)},t.findMaxValue=function(e){if(this.empty())throw new Error("Searching for max value in an empty tree");return this.root.findMaxValue(e)},t.findWith=function(e){return this.root.findWith(e)},t.insert=function(t,n){return new e(this.root.insert(t,n))},t.remove=function(t){return new e(this.root.remove(t))},t.shift=function(t){if(this.empty())return this;var n=this.root.findMaxValue(Infinity);return new e(this.root.shift(t).insert(0,n))},t.empty=function(){return this.root.empty()},t.keys=function(){return this.root.keys()},t.walk=function(){return this.root.walk()},t.walkWithin=function(e,t){var n=this.root.findMax(e);return this.root.walkWithin(n,t)},t.ranges=function(){return this.root.ranges()},t.rangesWithin=function(e,t){var n=this.root.findMax(e);return this.root.rangesWithin(n,t)},t.isInvariant=function(){return this.root.isInvariant()},e}(),R=function(){function e(){}return e.prototype.transpose=function(e){return e.map((function(e){return{groupIndex:0,index:e.index,offset:e.offset,size:e.size,transposedIndex:e.index,type:"item"}}))},e}(),M=function(){function e(e){this.count=e.reduce((function(e,t){return e+t+1}),0);var t=S.empty(),n=0,r=0,i=e,o=Array.isArray(i),s=0;for(i=o?i:i[Symbol.iterator]();;){var a;if(o){if(s>=i.length)break;a=i[s++]}else{if((s=i.next()).done)break;a=s.value}var u=a;t=t.insert(r,[n,r]),n++,r+=u+1}this.tree=t}var t=e.prototype;return t.totalCount=function(){return this.count},t.transpose=function(e){var t=this;return e.map((function(e){var n=t.tree.find(e.index);if(n)return{groupIndex:n[0],index:e.index,offset:e.offset,size:e.size,type:"group"};var r=t.tree.findMaxValue(e.index)[0];return{groupIndex:r,index:e.index,offset:e.offset,size:e.size,transposedIndex:e.index-r-1,type:"item"}}))},t.groupIndices=function(){return this.tree.keys()},e}(),L=function(e){return e.length>0?e[0].offset:0},E=function(){function e(e,t,n,r){if(void 0===t&&(t=S.empty()),void 0===n&&(n=[]),void 0===r&&(r=0),this.initialTopMostItemIndex=0,this.rangeSize=0,this.maxRangeSize=Infinity,this.rangeSizeExceededCallback=function(){},this.rangeTree=e,this.nanIndices=n,this.initialTopMostItemIndex=r,t.empty()){var i=0,o=!1,s=e.ranges(),a=Array.isArray(s),u=0;for(s=a?s:s[Symbol.iterator]();;){var l;if(a){if(u>=s.length)break;l=s[u++]}else{if((u=s.next()).done)break;l=u.value}var f=l.start,c=l.end,h=l.value;this.rangeSize++,isNaN(h)?(this.nanIndices.push(f),o||(t=t.insert(i,{startIndex:f,endIndex:Infinity,size:h})),o=!0):o||(t=t.insert(i,{startIndex:f,endIndex:c,size:h}),i+=(c-f+1)*h)}}this.offsetTree=t}e.create=function(){return new e(S.empty())};var t=e.prototype;return t.empty=function(){return this.rangeTree.empty()},t.fromTree=function(t){return new e(t,void 0,void 0,this.initialTopMostItemIndex)},t.insert=function(e,t,n){var r=this.rangeTree;if(r.empty())return this.fromTree(r.insert(0,n));if(this.rangeSize>this.maxRangeSize)return this.rangeSizeExceededCallback(),this.fromTree(S.empty().insert(0,this.getDefaultSize()));if(this.nanIndices.length&&this.nanIndices.indexOf(t)>-1){if(r.find(this.nanIndices[0]-1)===n)return this.fromTree(S.empty().insert(0,n));var i=this.nanIndices,o=Array.isArray(i),s=0;for(i=o?i:i[Symbol.iterator]();;){var a;if(o){if(s>=i.length)break;a=i[s++]}else{if((s=i.next()).done)break;a=s.value}r=r.insert(a,n)}return this.fromTree(r)}var u=r.rangesWithin(e-1,t+1);if(u.some((function(r){return r.start===e&&(r.end===t||Infinity===r.end)&&r.value===n})))return this;var l=!1,f=!1,c=u,h=Array.isArray(c),d=0;for(c=h?c:c[Symbol.iterator]();;){var p;if(h){if(d>=c.length)break;p=c[d++]}else{if((d=c.next()).done)break;p=d.value}var v=p.start,g=p.end,m=p.value;l?(t>=v||n===m)&&(r=r.remove(v)):(f=m!==n,l=!0),g>t&&t>=v&&(m===n||isNaN(m)||(r=r.insert(t+1,m)))}return f&&(r=r.insert(e,n)),r===this.rangeTree?this:this.fromTree(r)},t.insertSpots=function(t,n){if(this.empty()){var r=this.rangeTree,i=t,o=Array.isArray(i),s=0;for(i=o?i:i[Symbol.iterator]();;){var a;if(o){if(s>=i.length)break;a=i[s++]}else{if((s=i.next()).done)break;a=s.value}var u=a;r=r.insert(u,n).insert(u+1,NaN)}return new e(r)}throw new Error("attempting to overwrite non-empty tree")},t.offsetOf=function(e){if(this.offsetTree.empty())return 0;var t=this.offsetTree.findWith((function(t){return t.startIndex>e?-1:t.endIndex<e?1:0}));if(t){var n=t[1];return t[0]+(e-n.startIndex)*n.size}throw new Error("Requested offset outside of the known ones, index: "+e)},t.itemAt=function(e){return{index:e,size:this.rangeTree.findMaxValue(e),offset:NaN}},t.indexRange=function(e,t){if(this.rangeTree.empty())return[{index:this.initialTopMostItemIndex,size:0,offset:NaN}];var n=[],r=this.rangeTree.rangesWithin(e,t),i=Array.isArray(r),o=0;for(r=i?r:r[Symbol.iterator]();;){var s;if(i){if(o>=r.length)break;s=r[o++]}else{if((o=r.next()).done)break;s=o.value}for(var a=s,u=Math.max(e,a.start),l=Math.min(t,void 0===a.end?Infinity:a.end),f=u;f<=l;f++)n.push({index:f,size:a.value,offset:NaN})}return n},t.range=function(e,t,n,r){if(void 0===n&&(n=0),void 0===r&&(r=Infinity),this.offsetTree.empty())return[{index:this.initialTopMostItemIndex,size:0,offset:0}];var i=[],o=this.offsetTree.rangesWithin(e,t),s=Array.isArray(o),a=0;for(o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{if((a=o.next()).done)break;u=a.value}var l=u.start,f=u.value,c=f.startIndex,h=f.endIndex,d=f.size,p=l,v=c;if(l<e&&(p+=((v+=Math.floor((e-l)/d))-c)*d),v<n&&(p+=(n-v)*d,v=n),isNaN(d))return i.push({index:v,size:0,offset:p}),i;h=Math.min(h,r);for(var g=v;g<=h&&!(p>t);g++)i.push({index:g,size:d,offset:p}),p+=d}return i},t.total=function(e){var t=0,n=this.rangeTree.rangesWithin(0,e),r=Array.isArray(n),i=0;for(n=r?n:n[Symbol.iterator]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var s=o.start,a=o.end,u=o.value;t+=((a=Math.min(a,e))-s+1)*(isNaN(u)?0:u)}return t},t.getOffsets=function(e){var t=this,n=S.empty();return e.forEach((function(e){var r=t.offsetOf(e);n=n.insert(r,e)})),new z(n)},t.setInitialIndex=function(t){return new e(this.rangeTree,this.offsetTree,this.nanIndices,t)},t.getDefaultSize=function(){return this.rangeTree.findMaxValue(Infinity)},t.adjustForPrependedItems=function(e){return this.fromTree(this.rangeTree.shift(e))},t.configureMaxRangeSize=function(e,t){this.maxRangeSize=e,this.rangeSizeExceededCallback=t},e}(),z=function(){function e(e){this.tree=e}var t=e.prototype;return t.findMaxValue=function(e){return this.tree.findMaxValue(e)},t.empty=function(){return this.tree.empty()},e}();function O(e){var t;return function(n){t&&t(),n&&(t=e.subscribe(n))}}function N(e){return e.next}var A=function(e){var n=e.overscan,r=void 0===n?0:n,o=e.totalCount,s=void 0===o?0:o,a=e.itemHeight,u=e.initialTopMostItemIndex,l=e.defaultItemHeight,f=p(new R),c=p(0),h=p(0,!1),d=T(h),y=function(){var e=p([]),t=e.pipe(m((function(e){return e.reduce((function(e,t){return e+t.size}),0)}))),n=e.pipe(m((function(e){return e.length&&e[e.length-1].index+1})));return{topList$:e,topListHeight$:t,minListIndex$:n}}(),k=y.topList$,w=y.minListIndex$,H=y.topListHeight$,S=function(e){var t=e.totalCount,n=e.itemHeight,r=e.defaultItemHeight,i=e.initialTopMostItemIndex,o=e.viewportHeight$,s=e.scrollTop$,a=e.topList$,u=e.transposer$,l=p(0),f=p(0),c=p(t),h=p(),d=function(e){var t=e.itemHeights$,n=e.viewportHeight$,r=p(),i=p(!1),o=r.subscribe((function(e){t.next([{start:0,end:0,size:30}]),n.next(30*e),i.next(!0),o()}));return{initialItemCount$:r,pendingRenderAfterInitial$:i}}({itemHeights$:h,viewportHeight$:o}),x=d.pendingRenderAfterInitial$,y=d.initialItemCount$,I=v(),b=E.create();n&&(b=b.insert(0,0,n)),r&&(b=b.insert(0,0,r)),i&&(b=b.setInitialIndex(i));var T=p(b),k=function(e){var t=e.offsetList$,n=e.scrollTop$,r=e.topList$,i=e.transposer$,o=p([]),s=g(t,o).pipe(m((function(e){return e[0].getOffsets(e[1])})));return g(t,s,n).pipe($((function(e){return!e[1].empty()&&!e[0].empty()})),C(r,i),m((function(e){var t=e[0],n=t[0],r=e[1],i=e[2],o=t[1].findMaxValue(Math.max(t[2],0));if(1===r.length&&r[0].index===o)return r;var s=n.itemAt(o);return i.transpose([s])}))).subscribe(r.next),{stickyItems$:o}}({offsetList$:T,scrollTop$:s,topList$:a,transposer$:u}).stickyItems$,w=g(T,c,l,f).pipe(m((function(e){var t=e[2],n=e[3];return e[0].total(e[1]-1)+t+n})));return n||h.pipe(C(T,k,x)).subscribe((function(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=n;i&&(o=E.create(),i=!1);var s=t,a=Array.isArray(s),u=0;for(s=a?s:s[Symbol.iterator]();;){var l;if(a){if(u>=s.length)break;l=s[u++]}else{if((u=s.next()).done)break;l=u.value}var f=l.start,c=l.end,h=l.size;o=o.empty()&&f===c&&r.indexOf(f)>-1?o.insertSpots(r,h):o.insert(f,c,h)}o!==n?(T.next(o),I.next([!0,o])):I.next([!1,o])})),{totalCount$:c,offsetList$:T,totalHeight$:w,headerHeight$:l,footerHeight$:f,initialItemCount$:y,itemHeights$:h,stickyItems$:k,heightsChanged$:I}}({totalCount:s,itemHeight:a,defaultItemHeight:l,initialTopMostItemIndex:u,viewportHeight$:c,scrollTop$:h,transposer$:f,topList$:k}),z=S.stickyItems$,A=S.initialItemCount$,P=S.itemHeights$,j=S.offsetList$,V=S.totalCount$,W=S.headerHeight$,F=S.footerHeight$,_=S.totalHeight$,B=S.heightsChanged$,K=function(e){var t=e.transposer$,n=e.stickyItems$,r=e.totalCount$,i=p(),o=n.pipe();return i.subscribe((function(e){var i=new M(e);t.next(i),r.next(i.totalCount()),n.next(i.groupIndices())})),{groupCounts$:i,groupIndices$:o}}({totalCount$:V,transposer$:f,stickyItems$:z}),D=K.groupCounts$,G=K.groupIndices$,q=function(e){var t,n=e.totalHeight$,r=e.viewportHeight$,i=e.scrollTop$,o=p(!1);return g(i,r,n).pipe(m((function(e){var t=e[1],n=e[2];return 0!==t&&(e[0]===n-t||n<=t)}))).subscribe((function(e){clearTimeout(t),e?o.next(!0):t=setTimeout((function(){return o.next(!1)}))})),{scrolledToBottom$:o}}({totalHeight$:_,viewportHeight$:c,scrollTop$:h}).scrolledToBottom$,U=function(e){var t=e.offsetList$,n=e.topListHeight$,r=e.stickyItems$,i=e.viewportHeight$,o=e.totalCount$,s=e.totalHeight$,a=e.initialTopMostItemIndex,u=e.heightsChanged$,l=e.scrollTop$,f=v(),c=p(!1),h=p(!0),d=v(),g=function(e){var t=e.initialTopMostItemIndex,n=e.scrollToIndex$,r=e.scrollTop$,i=e.scrollTo$,o=e.offsetList$,s=p(!t);return r.pipe(C(i,s)).subscribe((function(e){e[0]!==e[1].top||e[2]||setTimeout((function(){s.next(!0)}))})),o.pipe(C(s)).subscribe((function(e){e[1]||setTimeout((function(){n.next(t)}))})),{scrolledToTopMostItem$:s}}({scrollTo$:d,offsetList$:t,scrollToIndex$:f,scrollTop$:l,initialTopMostItemIndex:a}).scrolledToTopMostItem$;return u.pipe(C(g)).subscribe((function(e){!e[0][0]&&e[1]&&(c.next(!1),h.next(!0))})),f.pipe(C(t,n,r,i,o,s),m((function(e){var t,n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[6];"number"==typeof n&&(n={index:n,align:"start",behavior:"auto"});var u=n.index,l=n.align,f=void 0===l?"start":l;u=Math.max(0,u,Math.min(e[5]-1,u));var c=r.offsetOf(u);return"end"===f?c=c-s+r.itemAt(u).size:"center"===f?c=Math.round(c-s/2+r.itemAt(u).size/2):-1===o.indexOf(u)&&(c-=i),h.next(!1),{top:Math.max(0,Math.min(c,Math.floor(a-s))),behavior:null!==(t=n.behavior)&&void 0!==t?t:"auto"}}))).subscribe(d.next),l.pipe(C(h)).subscribe((function(e){e[1]||(h.next(!0),c.next(!0))})),t.pipe(C(c,f)).subscribe((function(e){e[1]&&f.next(e[2])})),{scrollToIndex$:f,scrollTo$:d,scrolledToTopMostItem$:g}}({initialTopMostItemIndex:u,scrollTop$:h,offsetList$:j,viewportHeight$:c,totalHeight$:_,stickyItems$:z,totalCount$:V,topListHeight$:H,heightsChanged$:B}),Y=U.scrollToIndex$,J=U.scrollTo$,Q=function(e){var t=e.overscan,n=e.defaultItemHeight,r=e.viewportHeight$,i=e.scrollTop$,o=e.topListHeight$,s=e.headerHeight$,a=e.footerHeight$,u=e.minListIndex$,l=e.totalCount$,f=e.offsetList$,c=e.scrolledToTopMostItem$,h=e.transposer$,d=e.totalHeight$,x=p(0),y=v(),$=v(),T=p([]),k=p(0);g(i,d,r).pipe(m((function(e){return Math.max(0,Math.min(e[0],e[1]-e[2]))}))).subscribe(k.next),g(r,k,o,x,s,a,u,l,f,c,h).pipe(b((function(e,r){var i=r[0],o=r[1],s=r[2],a=r[3],u=r[4],l=r[5],f=r[6],c=r[7],h=r[8],d=r[9],p=r[10],v=e.length;if(0===c)return[];var g=L(e),m=g-o+a-u-l-s,x=Math.max(c-1,0);if((m<i||v>0&&(e[0].index<f||e[v-1].index>x))&&(e=p.transpose(h.range(o,o+i+2*t-1,f,x))),g>o){var y=Math.max(o-2*t,0);e=p.transpose(h.range(y,o+i-1,f,x))}return e.length>1&&!d&&!n?[]:e}),[]),I()).subscribe(T.next);var w=g(T,i,o).pipe(m((function(e){return L(e[0])})));k.subscribe((function(e){0===e&&y.next(e)}));var H=0;return T.pipe(m((function(e){return e.length?e[e.length-1].index:0}))).pipe(C(l)).subscribe((function(e){var t=e[0],n=e[1];0!==n&&t===n-1&&H!==t&&(H=t,$.next(t))})),{list$:T,listOffset$:w,listHeight$:x,startReached$:y,endReached$:$}}({overscan:r,defaultItemHeight:l,viewportHeight$:c,scrollTop$:h,totalHeight$:_,topListHeight$:H,headerHeight$:W,footerHeight$:F,minListIndex$:w,totalCount$:V,offsetList$:j,scrolledToTopMostItem$:U.scrolledToTopMostItem$,transposer$:f}),X=Q.listHeight$,Z=Q.list$,ee=Q.listOffset$,te=Q.startReached$,ne=Q.endReached$,re=function(e){var t=e.offsetList$,n=e.scrollTop$,r=e.scrollTo$,i=v(),o=p(!1);return i.pipe(C(t,n,o)).subscribe((function(e){var n=e[0],i=e[1],s=e[2];e[3]||i.empty()||(o.next(!0),t.next(i.adjustForPrependedItems(n)),setTimeout((function(){r.next({top:n*i.getDefaultSize()+s}),o.next(!1)})))})),{adjustForPrependedItems$:i,adjustmentInProgress$:o}}({offsetList$:j,scrollTop$:h,scrollTo$:J}),ie=re.adjustForPrependedItems$,oe=re.adjustmentInProgress$,se=function(e){var t=e.list$,n=e.offsetList$,r=e.scrollTop$,i=e.scrollTo$,o=p(null),s=p(Infinity);return n.pipe(C(s,r,t)).subscribe((function(e){var t=e[2],n=e[3];return e[0].configureMaxRangeSize(e[1],(function(){o.next({index:n[0].index,offset:t-n[0].offset})}))})),n.pipe(C(o)).subscribe((function(e){var t=e[1];if(null!==t){var n=e[0].offsetOf(t.index)+t.offset;i.next({top:n}),o.next(null)}})),{maxRangeSize$:s}}({scrollTo$:J,offsetList$:j,scrollTop$:h,list$:Z}).maxRangeSize$,ae=function(e){var t=e.topList$,n=e.transposer$,r=e.viewportHeight$,i=e.totalCount$,o=e.offsetList$,s=p();return g(o,s,i,r).pipe($((function(e){return e[1]>0&&e[3]>0})),C(n),m((function(e){var t=e[0],n=t[0],r=e[1],i=Math.max(0,Math.min(t[1]-1,t[2]));return r.transpose(n.indexRange(0,i))}))).subscribe(t.next),{topItemCount$:s}}({offsetList$:j,totalCount$:V,transposer$:f,viewportHeight$:c,topList$:k}).topItemCount$,ue=function(e){var t=e.scrollToIndex$,n=e.scrolledToBottom$,r=e.totalCount$,i=p(!1);return g(i,r).pipe(C(n)).subscribe((function(e){var n=e[0],r=n[1];n[0]&&e[1]&&setTimeout((function(){t.next({index:r-1,align:"end",behavior:"auto"})}))})),{followOutput$:i}}({totalCount$:V,scrollToIndex$:Y,scrolledToBottom$:q}).followOutput$,le=ee.pipe(m((function(e){return-e}))),fe=v();Z.pipe(C(oe),$((function(e){return 0!==e[0].length&&!e[1]})),m((function(e){var t=e[0];return{startIndex:t[0].index,endIndex:t[t.length-1].index}})),I((function(e,t){return!e||e.startIndex!==t.startIndex||e.endIndex!==t.endIndex}))).subscribe(fe.next);var ce=function(e){var t,n,r=e.isScrolling$,i=e.scrollTop$,o=e.rangeChanged$,s=p(0),a=p(!1),u=p(!1);return r.pipe($((function(e){return!e})),x(0)).subscribe(s.next),i.pipe((function(e,r){t=e,n||(n=setTimeout((function(){n=void 0,r(t)}),100))}),b((function(e,t){return[e[1],t]}),[0,0]),m((function(e){return e[1]-e[0]}))).subscribe(s.next),s.pipe(C(u,a,o),$((function(e){return!!e[1]})),m((function(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=n.enter;if(r){if((0,n.exit)(t,i))return!1}else if(o(t,i))return!0;return r})),I()).subscribe(a.next),g(a,s,o).pipe(C(u)).subscribe((function(e){var t=e[0],n=e[1];return t[0]&&n&&n.change(t[1],t[2])})),{isSeeking$:a,scrollSeekConfiguration$:u,scrollVelocity$:s}}({scrollTop$:h,isScrolling$:d,rangeChanged$:fe}),he=ce.isSeeking$,de=ce.scrollVelocity$,pe=ce.scrollSeekConfiguration$,ve=_.pipe(m((function(e){return Math.min(e,15e6)}))),ge=g(_,ve,c).pipe(m((function(e){var t=e[0],n=e[1],r=e[2];return t===n||n===r?1:(t-r)/(n-r)}))),me=p(0,!1),xe=g(ee,ge).pipe(m((function(e){return e[0]/e[1]})));g(me,ge).pipe(m((function(e){return e[0]*e[1]}))).subscribe(h.next);var ye=p((function(e){return e})),$e=p((function(e,t){return e})),Ie=p((function(e){return e})),be=p("div"),Ce=p("div"),Te=p(!1),ke=p(Symbol("data-key"));return g($e,Ie,pe,ye,be,Ce,ke).pipe(m((function(e){var n=e[0],r=e[1],o=e[2],s=e[3],a=e[4],u=e[5];return{render:function(e,l){var f,c=l.key,h=l.renderPlaceholder,d=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}(l,["key","renderPlaceholder"]);return s&&(c=s(e.index)),"group"===e.type?t.createElement(u,i({key:c},d),r(e.groupIndex)):(f=o&&h?t.createElement(o.placeholder,{height:d["data-known-size"],index:e.index}):n(e.transposedIndex,e.groupIndex),t.createElement(a,i({},d,{key:c}),f))}}}))).subscribe(Te.next),{groupCounts:N(D),itemHeights:N(P),headerHeight:N(W),footerHeight:N(F),listHeight:N(X),viewportHeight:N(c),scrollTop:N(me),topItemCount:N(ae),totalCount:N(V),scrollToIndex:N(Y),initialItemCount:N(A),followOutput:N(ue),adjustForPrependedItems:N(ie),maxRangeSize:N(se),scrollSeekConfiguration:N(pe),renderProp:N($e),groupRenderProp:N(Ie),computeItemKey:N(ye),itemContainer:N(be),groupContainer:N(Ce),dataKey:N(ke),itemRender:O(Te),list:O(Z),isSeeking:O(he),scrollVelocity:O(de),itemsRendered:O(Z),topList:O(k),listOffset:O(xe),totalHeight:O(ve),startReached:O(te),endReached:O(ne),atBottomStateChange:O(q),totalListHeightChanged:O(_),rangeChanged:O(fe),isScrolling:O(d),stickyItems:O(z),groupIndices:O(G),stickyItemsOffset:O(le),scrollTo:O(J)}},P={top:0,position:"absolute",height:"100%",width:"100%"},j=function(e,r,i){var o=t.useRef(null),s=t.useRef(0),a=new n((function(t){var n=Math.round(t[0].contentRect.height);i&&(s.current=window.requestAnimationFrame((function(){var e=t[0].target;document.body.contains(e)&&i(e)}))),e(n)}));return t.useEffect((function(){return function(){return window.cancelAnimationFrame(s.current)}}),[]),function(e){e?(a.observe(e),r&&r(e),o.current=e):(a.unobserve(o.current),o.current=null)}};function V(e,n){var r=t.useState(function(e,t){return function(){var n=t;return e((function(e){n=e})),n}}(e,n)),i=r[0],o=r[1];return t.useEffect((function(){return e(o),function(){return e(void 0)}}),[e]),i}function W(e){var t,n=!1;return function(){return n||(n=!0,t=e()),t}}var F=W((function(){var e=document.createElement("div");return e.style.position="-webkit-sticky","-webkit-sticky"===e.style.position?"-webkit-sticky":"sticky"})),_=function(e){return t.createElement("div",{style:{height:e.height+"px",position:"absolute",top:0}}," ")},B=t.memo((function(){var e=t.useContext(r),n=e.isSeeking,i=e.topList,o=e.itemRender,s=V(e.list,[]),a=V(i,[]),u=V(o,!1),l=V(n,!1),f=[],c=0,h=[],d=a.reduce((function(e,t){return e+t.size}),0);return a.forEach((function(e,t){var n=e.index;h.push(n);var r={top:c+"px",marginTop:0===t?-d+"px":void 0,zIndex:2,position:F()};u&&f.push(u.render(e,{key:n,"data-index":n,"data-known-size":e.size,renderPlaceholder:l,style:r})),c+=e.size})),s.forEach((function(e){h.indexOf(e.index)>-1||u&&f.push(u.render(e,{key:e.index,"data-index":e.index,"data-known-size":e.size,renderPlaceholder:l}))})),t.createElement(t.Fragment,null,f)})),K={height:"40rem",overflowY:"auto",WebkitOverflowScrolling:"touch",position:"relative",outline:"none"},D=function(e){var n=e.className,r=e.style,i=e.reportScrollTop,o=e.scrollTo,s=e.children,a=t.useRef(null),u=t.useRef(null),l=t.useRef(),f=t.useCallback((function(e){var t=e.target.scrollTop;l.current=t,null!==u.current?u.current===t&&(u.current=null,i(t)):i(t)}),[i]),c=t.useCallback((function(e){e?(e.addEventListener("scroll",f,{passive:!0}),a.current=e):a.current&&a.current.removeEventListener("scroll",f)}),[f]);return o((function(e){l.current!==e.top&&("smooth"===e.behavior&&(u.current=e.top),a.current&&a.current.scrollTo(e))})),t.createElement("div",{ref:c,style:r,tabIndex:0,className:n},s)},G=function(e){var n=e.children,r=e.className,o=e.ScrollContainer,s=e.scrollTop,a=e.scrollTo;return t.createElement(void 0===o?D:o,{style:i({},K,{},e.style),reportScrollTop:s,scrollTo:a,className:r},n)},q=function(e){return t.createElement("header",{ref:e.headerRef},e.children)},U=function(e){return t.createElement("footer",{ref:e.footerRef},e.children)},Y=function(e){return t.createElement("div",{ref:e.listRef,style:e.style},e.children)},J=function(e){var n=e.header,i=e.HeaderContainer,o=void 0===i?q:i,s=j(t.useContext(r).headerHeight);return t.createElement(o,{headerRef:s},n())},Q=function(e){var n=e.footer,i=e.FooterContainer,o=void 0===i?U:i,s=j(t.useContext(r).footerHeight);return t.createElement(o,{footerRef:s},n())},X=function(e){var n=e.fixedItemHeight,i=e.children,o=e.ListContainer,s=t.useContext(r),a=s.listHeight,u=s.itemHeights,l={marginTop:V(s.listOffset,0)+"px"},f=j(a,(function(){}),(function(e){if(!n){var t=function(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e.item(n);if(i&&void 0!==i.dataset.index){var o=parseInt(i.dataset.index),s=parseInt(i.dataset.knownSize),a=i.offsetHeight;if(a!==s&&0!==a){var u=t[t.length-1];0===t.length||u.size!==a||u.end!==o-1?t.push({start:o,end:o,size:a}):t[t.length-1].end++}}}return t}(e.children);u(t)}}));return t.createElement(o,{listRef:f,style:l},i)},Z=function(e){var n=e.style,i=e.header,o=e.footer,s=e.fixedItemHeight,a=e.ScrollContainer,u=e.ListContainer,l=e.HeaderContainer,f=e.FooterContainer,c=e.className,h=t.useContext(r),d=h.scrollTo,p=h.scrollTop,v=h.viewportHeight,g=V(h.totalHeight,0),m=j(v);return t.createElement(G,{style:n,ScrollContainer:a,className:c,scrollTo:d,scrollTop:function(e){p(Math.max(e,0))}},t.createElement("div",{ref:m,style:P},t.createElement(X,{fixedItemHeight:s,ListContainer:u},i&&t.createElement(J,{header:i,HeaderContainer:l}),t.createElement(B,null),o&&t.createElement(Q,{footer:o,FooterContainer:f}))),t.createElement(_,{height:g}))},ee={},te=t.memo((function(e){return t.createElement(r.Provider,{value:e.contextValue},t.createElement(Z,{style:e.style||ee,className:e.className,header:e.header,footer:e.footer,fixedItemHeight:void 0!==e.itemHeight,ScrollContainer:e.ScrollContainer,HeaderContainer:e.HeaderContainer,FooterContainer:e.FooterContainer,ListContainer:e.ListContainer||Y}))})),ne=t.forwardRef((function(e,n){var r=t.useState((function(){return A(e)}))[0];return t.useImperativeHandle(n,(function(){return{scrollToIndex:function(e){r.scrollToIndex(e)},adjustForPrependedItems:function(e){r.adjustForPrependedItems(e)}}}),[r]),t.useEffect((function(){return r.isScrolling(e.scrollingStateChange),r.atBottomStateChange(e.atBottomStateChange),r.startReached(e.startReached),r.endReached(e.endReached),r.topItemCount(e.topItems||0),r.totalCount(e.totalCount),e.initialItemCount&&r.initialItemCount(e.initialItemCount),r.itemsRendered(e.itemsRendered),r.totalListHeightChanged(e.totalListHeightChanged),r.followOutput(!!e.followOutput),r.maxRangeSize(e.maxHeightCacheSize||Infinity),r.rangeChanged(e.rangeChanged),r.scrollSeekConfiguration(e.scrollSeek),r.computeItemKey(e.computeItemKey||function(e){return e}),r.itemContainer(e.ItemContainer||"div"),r.renderProp(e.item),r.dataKey(e.dataKey),function(){r.itemsRendered(void 0),r.totalListHeightChanged(void 0)}}),[r,e.scrollingStateChange,e.atBottomStateChange,e.startReached,e.endReached,e.topItems,e.totalCount,e.initialItemCount,e.itemsRendered,e.totalListHeightChanged,e.followOutput,e.maxHeightCacheSize,e.rangeChanged,e.scrollSeek,e.item,e.ItemContainer,e.computeItemKey,e.dataKey]),t.createElement(te,{contextValue:r,style:e.style,className:e.className,header:e.header,footer:e.footer,itemHeight:e.itemHeight,ScrollContainer:e.ScrollContainer,HeaderContainer:e.HeaderContainer,FooterContainer:e.FooterContainer,ListContainer:e.ListContainer})}));ne.displayName="Virtuoso";var re=t.forwardRef((function(e,n){var r=t.useState(A(e))[0];return t.useImperativeHandle(n,(function(){return{scrollToIndex:function(e){r.scrollToIndex(e)}}}),[r]),t.useEffect((function(){return r.startReached(e.startReached),r.endReached(e.endReached),r.rangeChanged(e.rangeChanged),r.atBottomStateChange(e.atBottomStateChange),r.isScrolling(e.scrollingStateChange),r.groupCounts(e.groupCounts),r.groupIndices(e.groupIndices),r.itemsRendered(e.itemsRendered),r.totalListHeightChanged(e.totalListHeightChanged),r.renderProp(e.item),r.groupRenderProp(e.group),r.itemContainer(e.ItemContainer||"div"),r.groupContainer(e.GroupContainer||"div"),r.scrollSeekConfiguration(e.scrollSeek),function(){r.itemsRendered(void 0),r.totalListHeightChanged(void 0)}}),[r,e.startReached,e.endReached,e.rangeChanged,e.atBottomStateChange,e.scrollingStateChange,e.groupCounts,e.groupIndices,e.itemsRendered,e.totalListHeightChanged,e.item,e.group,e.GroupContainer,e.ItemContainer,e.scrollSeek]),t.createElement(te,{contextValue:r,style:e.style,className:e.className,header:e.header,footer:e.footer,itemHeight:e.itemHeight,ScrollContainer:e.ScrollContainer,HeaderContainer:e.HeaderContainer,FooterContainer:e.FooterContainer,ListContainer:e.ListContainer})}));re.displayName="GroupedVirtuoso";var ie=Math.ceil,oe=Math.floor,se=Math.min,ae=Math.max,ue=function(e){return ie(e)-e<.03?ie(e):oe(e)},le=function(e){void 0===e&&(e=0);var t=p([0,0,void 0,void 0]),n=p(0),r=p(0),i=p(0),o=p([0,ae(e-1,0)]),s=p(0),a=p(0),u=v(),l=v();g(t,r,i,n).pipe(C(o)).subscribe((function(e){var t=e[0],n=t[0],r=n[0],i=n[1],u=n[2],f=n[3],c=t[1],h=t[2],d=t[3],p=e[1];if(void 0!==u&&void 0!==f){if(0===d)return o.next([0,-1]),a.next(0),void l.next({startIndex:0,endIndex:-1});var v=p[0],g=p[1],m=ue(r/u),x=function(e,t){return void 0===t&&(t=oe),t(e/m)},y=function(e){var t=e?[0,h]:[h,0],n=t[1],r=m*oe((c-t[0])/f),s=m*ie((c+i+n)/f)-1;s=se(d-1,s),r=se(s,ae(0,r)),o.next([r,s]),a.next(x(r)*f),l.next({startIndex:r,endIndex:s})},$=f*x(v),I=f*x(g)+f;d<g-1?y(!0):$>c?y(!1):I<c+i&&y(!0),s.next(f*x(d-g-1,ie))}}));var f=u.pipe(C(t,n),m((function(e){var t=e[0],n=e[1],r=n[0],i=n[1],o=n[2],s=n[3];if(void 0===o||void 0===s)return{top:0,behavior:"auto"};"number"==typeof t&&(t={index:t,align:"start"});var a=t.index,u=t.align,l=void 0===u?"start":u;a=Math.max(0,a,Math.min(e[2]-1,a));var f=ue(r/o),c=oe(a/f)*s;return"end"===l?c=c-i+s:"center"===l&&(c=Math.round(c-i/2+s/2)),{top:c,behavior:"auto"}}))),c=T(r),h=v(),d=0;return o.pipe(C(n)).subscribe((function(e){var t=e[0][1],n=e[1];0!==n&&t===n-1&&d!==t&&(d=t,h.next(t))})),{gridDimensions:N(t),totalCount:N(n),scrollTop:N(r),overscan:N(i),scrollToIndex:N(u),itemRange:O(o),remainingHeight:O(s),listOffset:O(a),scrollTo:O(f),isScrolling:O(c),endReached:O(h),rangeChanged:O(l)}},fe=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).state=le(t.props.initialItemCount),t}o(n,e),n.getDerivedStateFromProps=function(e,t){return t.overscan(e.overscan||0),t.totalCount(e.totalCount),t.isScrolling(e.scrollingStateChange),t.endReached(e.endReached),t.rangeChanged(e.rangeChanged),null};var r=n.prototype;return r.scrollToIndex=function(e){this.state.scrollToIndex(e)},r.render=function(){return t.createElement(ce,Object.assign({},this.props,{engine:this.state}))},n}(t.PureComponent),ce=function(e){var r,i,o,s,a=e.ScrollContainer,u=e.ItemContainer,l=void 0===u?"div":u,f=e.ListContainer,c=void 0===f?"div":f,h=e.className,d=e.item,p=e.itemClassName,v=void 0===p?"virtuoso-grid-item":p,g=e.listClassName,m=void 0===g?"virtuoso-grid-list":g,x=e.engine,y=e.style,$=void 0===y?{height:"40rem"}:y,I=e.computeItemKey,b=void 0===I?function(e){return e}:I,C=x.itemRange,T=x.listOffset,k=x.gridDimensions,w=x.scrollTo,H=x.scrollTop,S=V(x.remainingHeight,0),R={paddingTop:V(T,0)+"px",paddingBottom:S+"px"},M=V(C,[0,0]),L=(r=function(e){var t=e.element.firstChild.firstChild;k([e.width,e.height,t.offsetWidth,t.offsetHeight])},i=t.useRef(null),o=t.useRef([0,0]),s=new n((function(e){var t=e[0].contentRect,n=t.width,i=t.height;o.current[0]===n&&o.current[1]===i||(o.current=[n,i],r({element:e[0].target,width:Math.round(n),height:Math.round(i)}))})),function(e){e?(s.observe(e),i.current=e):(s.unobserve(i.current),i.current=null)});return t.createElement(G,{style:$,ScrollContainer:a,className:h,scrollTo:w,scrollTop:H},t.createElement("div",{ref:L,style:P},t.createElement(c,{style:R,className:m},function(e,n,r,i,o){for(var s=e[1],a=[],u=e[0];u<=s;u++){var l=o(u);a.push(t.createElement(i,{key:l,className:r},n(u)))}return a}(M,d,v,l,b))))};exports.GroupedVirtuoso=re,exports.Virtuoso=ne,exports.VirtuosoGrid=fe,exports.VirtuosoPresentation=te;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),n=(e=require("resize-observer-polyfill"))&&"object"==typeof e&&"default"in e?e.default:e,r=t.createContext(void 0);function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function l(e,t,n){return(l=u()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&a(i,n.prototype),i}).apply(null,arguments)}function c(e){var t="function"==typeof Map?new Map:void 0;return(c=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return l(e,arguments,s(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),a(n,e)})(e)}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return f(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function d(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e,t){return t(e)}:1===t.length?t[0]:function(e,n){var r=function(e){return n(e)};t.slice().reverse().forEach((function(e){var t=r;r=function(n){return e(n,t)}})),r(e)}}function p(e){return function(){var t=d.apply(void 0,arguments);return v(e,t)}}function v(e,t){var n=function(n){return e((function(e){return t(e,n)}))};return{subscribe:n,pipe:p(n)}}function g(e,t){void 0===t&&(t=!0);var n=[],r=e,i=function(e){return n.push(e),void 0!==r&&e(r),function(){n=n.filter((function(t){return t!==e}))}};return{next:function(e){t&&e===r||(r=e,n.forEach((function(t){return t(e)})))},subscribe:i,pipe:p(i),subscribers:n}}function m(){var e=[],t=function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}};return{next:function(t){e.forEach((function(e){return e(t)}))},subscribe:t,pipe:p(t),subscribers:e}}function x(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Array(t.length).fill(!1),i=Array(t.length),o=[],s=function(e){r.every((function(e){return e}))&&e.forEach((function(e){return e(i)}))};t.forEach((function(e,t){e.subscribe((function(e){r[t]=!0,i[t]=e,s(o)}))}));var a=function(e){return o.push(e),s([e]),function(){o=o.filter((function(t){return t!==e}))}};return{subscribe:a,pipe:p(a)}}function y(e){return function(t,n){n(e(t))}}function $(e){return function(t,n){return n(e)}}function I(e){return function(t,n){e>0?e--:n(t)}}function C(e){return function(t,n){e(t)&&n(t)}}function b(e){var t;return void 0===e&&(e=function(e,t){return e!==t}),function(n,r){e(t,n)&&(t=n,r(n))}}function T(e,t){var n=t;return function(t,r){r(n=e(n,t))}}function k(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Array(t.length).fill(!1),i=Array(t.length);return t.forEach((function(e,t){e.subscribe((function(e){i[t]=e,r[t]=!0}))})),function(e,t){r.every((function(e){return e}))&&t([e].concat(i))}}var w=function(e){var t,n,r=g(!1);return e.pipe(I(1),b(),$(!0)).subscribe(r.next),e.pipe(I(1),$(!1),(function(e,r){t=e,n&&clearTimeout(n),n=setTimeout((function(){r(t)}),200)})).subscribe(r.next),r},H=new(function(){function e(){this.level=0}var t=e.prototype;return t.rebalance=function(){return this},t.adjust=function(){return this},t.shift=function(){return this},t.remove=function(){return this},t.find=function(){},t.findWith=function(){},t.findMax=function(){return-Infinity},t.findMaxValue=function(){},t.insert=function(e,t){return new R({key:e,value:t,level:1})},t.walkWithin=function(){return[]},t.walk=function(){return[]},t.ranges=function(){return[]},t.rangesWithin=function(){return[]},t.empty=function(){return!0},t.isSingle=function(){return!0},t.isInvariant=function(){return!0},t.keys=function(){return[]},e}());Object.freeze(H);var S=function(e){function t(t){return e.call(this,"Unreachable case: "+t)||this}return o(t,e),t}(c(Error)),R=function(){function e(e){var t=e.value,n=e.level,r=e.left,i=void 0===r?H:r,o=e.right,s=void 0===o?H:o;this.key=e.key,this.value=t,this.level=n,this.left=i,this.right=s}var t=e.prototype;return t.shift=function(e){return this.clone({key:this.key+e,left:this.left.shift(e),right:this.right.shift(e)})},t.remove=function(e){var t=this.left,n=this.right;if(e===this.key){if(t.empty())return n;if(n.empty())return t;var r=t.last();return this.clone({key:r[0],value:r[1],left:t.deleteLast()}).adjust()}return e<this.key?this.clone({left:t.remove(e)}).adjust():this.clone({right:n.remove(e)}).adjust()},t.empty=function(){return!1},t.find=function(e){return e===this.key?this.value:e<this.key?this.left.find(e):this.right.find(e)},t.findWith=function(e){var t=e(this.value);switch(t){case-1:return this.left.findWith(e);case 0:return[this.key,this.value];case 1:return this.right.findWith(e);default:throw new S(t)}},t.findMax=function(e){if(this.key===e)return e;if(this.key<e){var t=this.right.findMax(e);return-Infinity===t?this.key:t}return this.left.findMax(e)},t.findMaxValue=function(e){if(this.key===e)return this.value;if(this.key<e){var t=this.right.findMaxValue(e);return void 0===t?this.value:t}return this.left.findMaxValue(e)},t.insert=function(e,t){return e===this.key?this.clone({key:e,value:t}):e<this.key?this.clone({left:this.left.insert(e,t)}).rebalance():this.clone({right:this.right.insert(e,t)}).rebalance()},t.walkWithin=function(e,t){var n=this.key,r=this.value,i=[];return n>e&&(i=i.concat(this.left.walkWithin(e,t))),n>=e&&n<=t&&i.push({key:n,value:r}),n<=t&&(i=i.concat(this.right.walkWithin(e,t))),i},t.walk=function(){return[].concat(this.left.walk(),[{key:this.key,value:this.value}],this.right.walk())},t.last=function(){return this.right.empty()?[this.key,this.value]:this.right.last()},t.deleteLast=function(){return this.right.empty()?this.left:this.clone({right:this.right.deleteLast()}).adjust()},t.clone=function(t){return new e({key:void 0!==t.key?t.key:this.key,value:void 0!==t.value?t.value:this.value,level:void 0!==t.level?t.level:this.level,left:void 0!==t.left?t.left:this.left,right:void 0!==t.right?t.right:this.right})},t.isSingle=function(){return this.level>this.right.level},t.rebalance=function(){return this.skew().split()},t.adjust=function(){var e=this.left,t=this.right,n=this.level;if(t.level>=n-1&&e.level>=n-1)return this;if(n>t.level+1){if(e.isSingle())return this.clone({level:n-1}).skew();if(e.empty()||e.right.empty())throw new Error("Unexpected empty nodes");return e.right.clone({left:e.clone({right:e.right.left}),right:this.clone({left:e.right.right,level:n-1}),level:n})}if(this.isSingle())return this.clone({level:n-1}).split();if(t.empty()||t.left.empty())throw new Error("Unexpected empty nodes");var r=t.left,i=r.isSingle()?t.level-1:t.level;return r.clone({left:this.clone({right:r.left,level:n-1}),right:t.clone({left:r.right,level:i}).split(),level:r.level+1})},t.isInvariant=function(){var e=this.left,t=this.right,n=this.level;return n===e.level+1&&(n===t.level||n===t.level+1)&&!(!t.empty()&&n<=t.right.level)&&e.isInvariant()&&t.isInvariant()},t.keys=function(){return[].concat(this.left.keys(),[this.key],this.right.keys())},t.ranges=function(){return this.toRanges(this.walk())},t.rangesWithin=function(e,t){return this.toRanges(this.walkWithin(e,t))},t.toRanges=function(e){if(0===e.length)return[];for(var t=e[0],n=t.key,r=t.value,i=[],o=1;o<=e.length;o++){var s=e[o];i.push({start:n,end:s?s.key-1:Infinity,value:r}),s&&(n=s.key,r=s.value)}return i},t.split=function(){var e=this.right,t=this.level;return e.empty()||e.right.empty()||e.level!==t||e.right.level!==t?this:e.clone({left:this.clone({right:e.left}),level:t+1})},t.skew=function(){var e=this.left;return e.empty()||e.level!==this.level?this:e.clone({right:this.clone({left:e.right})})},e}(),M=function(){function e(e){this.root=e}e.empty=function(){return new e(H)};var t=e.prototype;return t.find=function(e){return this.root.find(e)},t.findMax=function(e){return this.root.findMax(e)},t.findMaxValue=function(e){if(this.empty())throw new Error("Searching for max value in an empty tree");return this.root.findMaxValue(e)},t.findWith=function(e){return this.root.findWith(e)},t.insert=function(t,n){return new e(this.root.insert(t,n))},t.remove=function(t){return new e(this.root.remove(t))},t.shift=function(t){if(this.empty())return this;var n=this.root.findMaxValue(Infinity);return new e(this.root.shift(t).insert(0,n))},t.empty=function(){return this.root.empty()},t.keys=function(){return this.root.keys()},t.walk=function(){return this.root.walk()},t.walkWithin=function(e,t){var n=this.root.findMax(e);return this.root.walkWithin(n,t)},t.ranges=function(){return this.root.ranges()},t.rangesWithin=function(e,t){var n=this.root.findMax(e);return this.root.rangesWithin(n,t)},t.isInvariant=function(){return this.root.isInvariant()},e}(),L=function(){function e(){}return e.prototype.transpose=function(e){return e.map((function(e){return{groupIndex:0,index:e.index,offset:e.offset,size:e.size,transposedIndex:e.index,type:"item"}}))},e}(),E=function(){function e(e){this.count=e.reduce((function(e,t){return e+t+1}),0);for(var t,n=M.empty(),r=0,i=0,o=h(e);!(t=o()).done;){var s=t.value;n=n.insert(i,[r,i]),r++,i+=s+1}this.tree=n}var t=e.prototype;return t.totalCount=function(){return this.count},t.transpose=function(e){var t=this;return e.map((function(e){var n=t.tree.find(e.index);if(n)return{groupIndex:n[0],index:e.index,offset:e.offset,size:e.size,type:"group"};var r=t.tree.findMaxValue(e.index)[0];return{groupIndex:r,index:e.index,offset:e.offset,size:e.size,transposedIndex:e.index-r-1,type:"item"}}))},t.groupIndices=function(){return this.tree.keys()},e}(),z=function(e){return e.length>0?e[0].offset:0},O=function(){function e(e,t,n,r){if(void 0===t&&(t=M.empty()),void 0===n&&(n=[]),void 0===r&&(r=0),this.initialTopMostItemIndex=0,this.rangeSize=0,this.maxRangeSize=Infinity,this.rangeSizeExceededCallback=function(){},this.rangeTree=e,this.nanIndices=n,this.initialTopMostItemIndex=r,t.empty())for(var i,o=0,s=!1,a=h(e.ranges());!(i=a()).done;){var u=i.value,l=u.start,c=u.end,f=u.value;this.rangeSize++,isNaN(f)?(this.nanIndices.push(l),s||(t=t.insert(o,{startIndex:l,endIndex:Infinity,size:f})),s=!0):s||(t=t.insert(o,{startIndex:l,endIndex:c,size:f}),o+=(c-l+1)*f)}this.offsetTree=t}e.create=function(){return new e(M.empty())};var t=e.prototype;return t.empty=function(){return this.rangeTree.empty()},t.fromTree=function(t){return new e(t,void 0,void 0,this.initialTopMostItemIndex)},t.insert=function(e,t,n){var r=this.rangeTree;if(r.empty())return this.fromTree(r.insert(0,n));if(this.rangeSize>this.maxRangeSize)return this.rangeSizeExceededCallback(),this.fromTree(M.empty().insert(0,this.getDefaultSize()));if(this.nanIndices.length&&this.nanIndices.indexOf(t)>-1){if(r.find(this.nanIndices[0]-1)===n)return this.fromTree(M.empty().insert(0,n));for(var i,o=h(this.nanIndices);!(i=o()).done;)r=r.insert(i.value,n);return this.fromTree(r)}var s=r.rangesWithin(e-1,t+1);if(s.some((function(r){return r.start===e&&(r.end===t||Infinity===r.end)&&r.value===n})))return this;for(var a,u=!1,l=!1,c=h(s);!(a=c()).done;){var f=a.value,d=f.start,p=f.end,v=f.value;u?(t>=d||n===v)&&(r=r.remove(d)):(l=v!==n,u=!0),p>t&&t>=d&&(v===n||isNaN(v)||(r=r.insert(t+1,v)))}return l&&(r=r.insert(e,n)),r===this.rangeTree?this:this.fromTree(r)},t.insertSpots=function(t,n){if(this.empty()){for(var r,i=this.rangeTree,o=h(t);!(r=o()).done;){var s=r.value;i=i.insert(s,n).insert(s+1,NaN)}return new e(i)}throw new Error("attempting to overwrite non-empty tree")},t.offsetOf=function(e){if(this.offsetTree.empty())return 0;var t=this.offsetTree.findWith((function(t){return t.startIndex>e?-1:t.endIndex<e?1:0}));if(t){var n=t[1];return t[0]+(e-n.startIndex)*n.size}throw new Error("Requested offset outside of the known ones, index: "+e)},t.itemAt=function(e){return{index:e,size:this.rangeTree.findMaxValue(e),offset:NaN}},t.indexRange=function(e,t){if(this.rangeTree.empty())return[{index:this.initialTopMostItemIndex,size:0,offset:NaN}];for(var n,r=[],i=h(this.rangeTree.rangesWithin(e,t));!(n=i()).done;)for(var o=n.value,s=Math.max(e,o.start),a=Math.min(t,void 0===o.end?Infinity:o.end),u=s;u<=a;u++)r.push({index:u,size:o.value,offset:NaN});return r},t.range=function(e,t,n,r){if(void 0===n&&(n=0),void 0===r&&(r=Infinity),this.offsetTree.empty())return[{index:this.initialTopMostItemIndex,size:0,offset:0}];for(var i,o=[],s=h(this.offsetTree.rangesWithin(e,t));!(i=s()).done;){var a=i.value,u=a.start,l=a.value,c=l.startIndex,f=l.endIndex,d=l.size,p=u,v=c;if(u<e&&(p+=((v+=Math.floor((e-u)/d))-c)*d),v<n&&(p+=(n-v)*d,v=n),isNaN(d))return o.push({index:v,size:0,offset:p}),o;f=Math.min(f,r);for(var g=v;g<=f&&!(p>t);g++)o.push({index:g,size:d,offset:p}),p+=d}return o},t.total=function(e){for(var t,n=0,r=h(this.rangeTree.rangesWithin(0,e));!(t=r()).done;){var i=t.value,o=i.start,s=i.end,a=i.value;n+=((s=Math.min(s,e))-o+1)*(isNaN(a)?0:a)}return n},t.getOffsets=function(e){var t=this,n=M.empty();return e.forEach((function(e){var r=t.offsetOf(e);n=n.insert(r,e)})),new N(n)},t.setInitialIndex=function(t){return new e(this.rangeTree,this.offsetTree,this.nanIndices,t)},t.getDefaultSize=function(){return this.rangeTree.findMaxValue(Infinity)},t.adjustForPrependedItems=function(e){return this.fromTree(this.rangeTree.shift(e))},t.configureMaxRangeSize=function(e,t){this.maxRangeSize=e,this.rangeSizeExceededCallback=t},e}(),N=function(){function e(e){this.tree=e}var t=e.prototype;return t.findMaxValue=function(e){return this.tree.findMaxValue(e)},t.empty=function(){return this.tree.empty()},e}();function j(e){var t,n,r=e.isScrolling$,i=e.scrollTop$,o=e.rangeChanged$,s=g(0),a=g(!1),u=g(!1);return r.pipe(C((function(e){return!e})),$(0)).subscribe(s.next),i.pipe((function(e,r){t=e,n||(n=setTimeout((function(){n=void 0,r(t)}),100))}),T((function(e,t){return[e[1],t]}),[0,0]),y((function(e){return e[1]-e[0]}))).subscribe(s.next),s.pipe(k(u,a,o),C((function(e){return!!e[1]})),y((function(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=n.enter;if(r){if((0,n.exit)(t,i))return!1}else if(o(t,i))return!0;return r})),b()).subscribe(a.next),x(a,s,o).pipe(k(u)).subscribe((function(e){var t=e[0],n=e[1];return t[0]&&n&&n.change(t[1],t[2])})),{isSeeking$:a,scrollSeekConfiguration$:u,scrollVelocity$:s}}function P(e){var t;return function(n){t&&t(),n&&(t=e.subscribe(n))}}function V(e){return e.next}var W=function(e){var n=e.overscan,r=void 0===n?0:n,o=e.totalCount,s=void 0===o?0:o,a=e.itemHeight,u=e.initialTopMostItemIndex,l=e.defaultItemHeight,c=g(new L),f=g(0),d=g(0,!1),p=w(d),v=function(){var e=g([]),t=e.pipe(y((function(e){return e.reduce((function(e,t){return e+t.size}),0)}))),n=e.pipe(y((function(e){return e.length&&e[e.length-1].index+1})));return{topList$:e,topListHeight$:t,minListIndex$:n}}(),$=v.topList$,I=v.minListIndex$,H=v.topListHeight$,S=function(e){var t=e.totalCount,n=e.itemHeight,r=e.defaultItemHeight,i=e.initialTopMostItemIndex,o=e.viewportHeight$,s=e.scrollTop$,a=e.topList$,u=e.transposer$,l=g(0),c=g(0),f=g(t),d=g(),p=function(e){var t=e.itemHeights$,n=e.viewportHeight$,r=g(),i=g(!1),o=r.subscribe((function(e){t.next([{start:0,end:0,size:30}]),n.next(30*e),i.next(!0),o()}));return{initialItemCount$:r,pendingRenderAfterInitial$:i}}({itemHeights$:d,viewportHeight$:o}),v=p.pendingRenderAfterInitial$,$=p.initialItemCount$,I=m(),b=O.create();n&&(b=b.insert(0,0,n)),r&&(b=b.insert(0,0,r)),i&&(b=b.setInitialIndex(i));var T=g(b),w=function(e){var t=e.offsetList$,n=e.scrollTop$,r=e.topList$,i=e.transposer$,o=g([]),s=x(t,o).pipe(y((function(e){return e[0].getOffsets(e[1])})));return x(t,s,n).pipe(C((function(e){return!e[1].empty()&&!e[0].empty()})),k(r,i),y((function(e){var t=e[0],n=t[0],r=e[1],i=e[2],o=t[1].findMaxValue(Math.max(t[2],0));if(1===r.length&&r[0].index===o)return r;var s=n.itemAt(o);return i.transpose([s])}))).subscribe(r.next),{stickyItems$:o}}({offsetList$:T,scrollTop$:s,topList$:a,transposer$:u}).stickyItems$,H=x(T,f,l,c).pipe(y((function(e){var t=e[2],n=e[3];return e[0].total(e[1]-1)+t+n})));return n||d.pipe(k(T,w,v)).subscribe((function(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=n;i&&(o=O.create(),i=!1);for(var s,a=h(t);!(s=a()).done;){var u=s.value,l=u.start,c=u.end,f=u.size;o=o.empty()&&l===c&&r.indexOf(l)>-1?o.insertSpots(r,f):o.insert(l,c,f)}o!==n?(T.next(o),I.next([!0,o])):I.next([!1,o])})),{totalCount$:f,offsetList$:T,totalHeight$:H,headerHeight$:l,footerHeight$:c,initialItemCount$:$,itemHeights$:d,stickyItems$:w,heightsChanged$:I}}({totalCount:s,itemHeight:a,defaultItemHeight:l,initialTopMostItemIndex:u,viewportHeight$:f,scrollTop$:d,transposer$:c,topList$:$}),R=S.stickyItems$,M=S.initialItemCount$,N=S.itemHeights$,W=S.offsetList$,F=S.totalCount$,A=S.headerHeight$,_=S.footerHeight$,B=S.totalHeight$,K=S.heightsChanged$,D=function(e){var t=e.transposer$,n=e.stickyItems$,r=e.totalCount$,i=g(),o=n.pipe();return i.subscribe((function(e){var i=new E(e);t.next(i),r.next(i.totalCount()),n.next(i.groupIndices())})),{groupCounts$:i,groupIndices$:o}}({totalCount$:F,transposer$:c,stickyItems$:R}),G=D.groupCounts$,q=D.groupIndices$,U=function(e){var t,n=e.totalHeight$,r=e.viewportHeight$,i=e.scrollTop$,o=g(!1);return x(i,r,n).pipe(y((function(e){var t=e[1],n=e[2];return 0!==t&&(e[0]===n-t||n<=t)}))).subscribe((function(e){clearTimeout(t),e?o.next(!0):t=setTimeout((function(){return o.next(!1)}))})),{scrolledToBottom$:o}}({totalHeight$:B,viewportHeight$:f,scrollTop$:d}).scrolledToBottom$,Y=function(e){var t=e.offsetList$,n=e.topListHeight$,r=e.stickyItems$,i=e.viewportHeight$,o=e.totalCount$,s=e.totalHeight$,a=e.initialTopMostItemIndex,u=e.heightsChanged$,l=e.scrollTop$,c=m(),f=g(!1),h=g(!0),d=m(),p=function(e){var t=e.initialTopMostItemIndex,n=e.scrollToIndex$,r=e.scrollTop$,i=e.scrollTo$,o=e.offsetList$,s=g(!t);return r.pipe(k(i,s)).subscribe((function(e){e[0]!==e[1].top||e[2]||setTimeout((function(){s.next(!0)}))})),o.pipe(k(s)).subscribe((function(e){e[1]||setTimeout((function(){n.next(t)}))})),{scrolledToTopMostItem$:s}}({scrollTo$:d,offsetList$:t,scrollToIndex$:c,scrollTop$:l,initialTopMostItemIndex:a}).scrolledToTopMostItem$;return u.pipe(k(p)).subscribe((function(e){!e[0][0]&&e[1]&&(f.next(!1),h.next(!0))})),c.pipe(k(t,n,r,i,o,s),y((function(e){var t,n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],u=e[6];if(!r.empty()){"number"==typeof n&&(n={index:n,align:"start",behavior:"auto"});var l=n.index,f=n.align,d=void 0===f?"start":f;l=Math.max(0,l,Math.min(a-1,l));var p=r.offsetOf(l);return"end"===d?p=p-s+r.itemAt(l).size:"center"===d?p=Math.round(p-s/2+r.itemAt(l).size/2):-1===o.indexOf(l)&&(p-=i),h.next(!1),{top:Math.max(0,Math.min(p,Math.floor(u-s))),behavior:null!==(t=n.behavior)&&void 0!==t?t:"auto"}}setTimeout((function(){return c.next(n)}))})),C((function(e){return void 0!==e}))).subscribe(d.next),l.pipe(k(h)).subscribe((function(e){e[1]||(h.next(!0),f.next(!0))})),t.pipe(k(f,c)).subscribe((function(e){e[1]&&c.next(e[2])})),{scrollToIndex$:c,scrollTo$:d,scrolledToTopMostItem$:p}}({initialTopMostItemIndex:u,scrollTop$:d,offsetList$:W,viewportHeight$:f,totalHeight$:B,stickyItems$:R,totalCount$:F,topListHeight$:H,heightsChanged$:K}),J=Y.scrollToIndex$,Q=Y.scrollTo$,X=function(e){var t=e.overscan,n=e.defaultItemHeight,r=e.viewportHeight$,i=e.scrollTop$,o=e.topListHeight$,s=e.headerHeight$,a=e.footerHeight$,u=e.minListIndex$,l=e.totalCount$,c=e.offsetList$,f=e.scrolledToTopMostItem$,h=e.transposer$,d=e.totalHeight$,p=g(0),v=m(),$=m(),I=g([]),C=g(0);x(i,d,r).pipe(y((function(e){return Math.max(0,Math.min(e[0],e[1]-e[2]))}))).subscribe(C.next),x(r,C,o,p,s,a,u,l,c,f,h).pipe(T((function(e,r){var i=r[0],o=r[1],s=r[2],a=r[3],u=r[4],l=r[5],c=r[6],f=r[7],h=r[8],d=r[9],p=r[10],v=e.length;if(0===f)return[];var g=z(e),m=g-o+a-u-l-s,x=Math.max(f-1,0);if((m<i||v>0&&(e[0].index<c||e[v-1].index>x))&&(e=p.transpose(h.range(o,o+i+2*t-1,c,x))),g>o){var y=Math.max(o-2*t,0);e=p.transpose(h.range(y,o+i-1,c,x))}return e.length>1&&!d&&!n?[]:e}),[]),b()).subscribe(I.next);var w=x(I,i,o).pipe(y((function(e){return z(e[0])})));C.subscribe((function(e){0===e&&v.next(e)}));var H=0;return I.pipe(y((function(e){return e.length?e[e.length-1].index:0}))).pipe(k(l)).subscribe((function(e){var t=e[0],n=e[1];0!==n&&t===n-1&&H!==t&&(H=t,$.next(t))})),{list$:I,listOffset$:w,listHeight$:p,startReached$:v,endReached$:$}}({overscan:r,defaultItemHeight:l,viewportHeight$:f,scrollTop$:d,totalHeight$:B,topListHeight$:H,headerHeight$:A,footerHeight$:_,minListIndex$:I,totalCount$:F,offsetList$:W,scrolledToTopMostItem$:Y.scrolledToTopMostItem$,transposer$:c}),Z=X.listHeight$,ee=X.list$,te=X.listOffset$,ne=X.startReached$,re=X.endReached$,ie=function(e){var t=e.offsetList$,n=e.scrollTop$,r=e.scrollTo$,i=m(),o=g(!1);return i.pipe(k(t,n,o)).subscribe((function(e){var n=e[0],i=e[1],s=e[2];e[3]||i.empty()||(o.next(!0),t.next(i.adjustForPrependedItems(n)),setTimeout((function(){r.next({top:n*i.getDefaultSize()+s}),o.next(!1)})))})),{adjustForPrependedItems$:i,adjustmentInProgress$:o}}({offsetList$:W,scrollTop$:d,scrollTo$:Q}),oe=ie.adjustForPrependedItems$,se=ie.adjustmentInProgress$,ae=function(e){var t=e.list$,n=e.offsetList$,r=e.scrollTop$,i=e.scrollTo$,o=g(null),s=g(Infinity);return n.pipe(k(s,r,t)).subscribe((function(e){var t=e[2],n=e[3];return e[0].configureMaxRangeSize(e[1],(function(){o.next({index:n[0].index,offset:t-n[0].offset})}))})),n.pipe(k(o)).subscribe((function(e){var t=e[1];if(null!==t){var n=e[0].offsetOf(t.index)+t.offset;i.next({top:n}),o.next(null)}})),{maxRangeSize$:s}}({scrollTo$:Q,offsetList$:W,scrollTop$:d,list$:ee}).maxRangeSize$,ue=function(e){var t=e.topList$,n=e.transposer$,r=e.viewportHeight$,i=e.totalCount$,o=e.offsetList$,s=g();return x(o,s,i,r).pipe(C((function(e){return e[1]>0&&e[3]>0})),k(n),y((function(e){var t=e[0],n=t[0],r=e[1],i=Math.max(0,Math.min(t[1]-1,t[2]));return r.transpose(n.indexRange(0,i))}))).subscribe(t.next),{topItemCount$:s}}({offsetList$:W,totalCount$:F,transposer$:c,viewportHeight$:f,topList$:$}).topItemCount$,le=function(e){var t=e.scrollToIndex$,n=e.scrolledToBottom$,r=e.totalCount$,i=g(!1);return x(i,r).pipe(k(n)).subscribe((function(e){var n=e[0],r=n[1];n[0]&&e[1]&&setTimeout((function(){t.next({index:r-1,align:"end",behavior:"auto"})}))})),{followOutput$:i}}({totalCount$:F,scrollToIndex$:J,scrolledToBottom$:U}).followOutput$,ce=te.pipe(y((function(e){return-e}))),fe=m();ee.pipe(k(se),C((function(e){return 0!==e[0].length&&!e[1]})),y((function(e){var t=e[0];return{startIndex:t[0].index,endIndex:t[t.length-1].index}})),b((function(e,t){return!e||e.startIndex!==t.startIndex||e.endIndex!==t.endIndex}))).subscribe(fe.next);var he=j({scrollTop$:d,isScrolling$:p,rangeChanged$:fe}),de=he.isSeeking$,pe=he.scrollVelocity$,ve=he.scrollSeekConfiguration$,ge=B.pipe(y((function(e){return Math.min(e,15e6)}))),me=x(B,ge,f).pipe(y((function(e){var t=e[0],n=e[1],r=e[2];return t===n||n===r?1:(t-r)/(n-r)}))),xe=g(0,!1),ye=x(te,me).pipe(y((function(e){return e[0]/e[1]})));x(xe,me).pipe(y((function(e){return e[0]*e[1]}))).subscribe(d.next);var $e=g((function(e){return e})),Ie=g((function(e,t){return e})),Ce=g((function(e){return e})),be=g("div"),Te=g("div"),ke=g(!1),we=g(Symbol("data-key"));return x(Ie,Ce,ve,$e,be,Te,we).pipe(y((function(e){var n=e[0],r=e[1],o=e[2],s=e[3],a=e[4],u=e[5];return{render:function(e,l){var c,f=l.key,h=l.renderPlaceholder,d=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}(l,["key","renderPlaceholder"]);return s&&(f=s(e.index)),"group"===e.type?t.createElement(u,i({key:f},d),r(e.groupIndex)):(c=o&&h?t.createElement(o.placeholder,{height:d["data-known-size"],index:e.index}):n(e.transposedIndex,e.groupIndex),t.createElement(a,i({},d,{key:f}),c))}}}))).subscribe(ke.next),{groupCounts:V(G),itemHeights:V(N),headerHeight:V(A),footerHeight:V(_),listHeight:V(Z),viewportHeight:V(f),scrollTop:V(xe),topItemCount:V(ue),totalCount:V(F),scrollToIndex:V(J),initialItemCount:V(M),followOutput:V(le),adjustForPrependedItems:V(oe),maxRangeSize:V(ae),scrollSeekConfiguration:V(ve),renderProp:V(Ie),groupRenderProp:V(Ce),computeItemKey:V($e),itemContainer:V(be),groupContainer:V(Te),dataKey:V(we),itemRender:P(ke),list:P(ee),isSeeking:P(de),scrollVelocity:P(pe),itemsRendered:P(ee),topList:P($),listOffset:P(ye),totalHeight:P(ge),startReached:P(ne),endReached:P(re),atBottomStateChange:P(U),totalListHeightChanged:P(B),rangeChanged:P(fe),isScrolling:P(p),stickyItems:P(R),groupIndices:P(q),stickyItemsOffset:P(ce),scrollTo:P(Q)}},F={top:0,position:"absolute",height:"100%",width:"100%"},A=function(e,r,i){var o=t.useRef(null),s=t.useRef(0),a=new n((function(t){var n=Math.round(t[0].contentRect.height);i&&(s.current=window.requestAnimationFrame((function(){var e=t[0].target;document.body.contains(e)&&i(e)}))),e(n)}));return t.useEffect((function(){return function(){return window.cancelAnimationFrame(s.current)}}),[]),function(e){e?(a.observe(e),r&&r(e),o.current=e):(a.unobserve(o.current),o.current=null)}};function _(e,n){var r=t.useState(function(e,t){return function(){var n=t;return e((function(e){n=e})),n}}(e,n)),i=r[0],o=r[1];return t.useEffect((function(){return e(o),function(){return e(void 0)}}),[e]),i}function B(e){var t,n=!1;return function(){return n||(n=!0,t=e()),t}}var K=B((function(){var e=document.createElement("div");return e.style.position="-webkit-sticky","-webkit-sticky"===e.style.position?"-webkit-sticky":"sticky"})),D=function(e){return t.createElement("div",{style:{height:e.height+"px",position:"absolute",top:0}}," ")},G=t.memo((function(e){var n=e.emptyComponent,i=t.useContext(r),o=i.isSeeking,s=i.topList,a=i.itemRender,u=_(i.list,[]),l=_(s,[]),c=_(a,!1),f=_(o,!1),h=[],d=0,p=[],v=l.reduce((function(e,t){return e+t.size}),0);return l.forEach((function(e,t){var n=e.index;p.push(n);var r={top:d+"px",marginTop:0===t?-v+"px":void 0,zIndex:2,position:K()};c&&h.push(c.render(e,{key:n,"data-index":n,"data-known-size":e.size,renderPlaceholder:f,style:r})),d+=e.size})),u.forEach((function(e){p.indexOf(e.index)>-1||c&&h.push(c.render(e,{key:e.index,"data-index":e.index,"data-known-size":e.size,renderPlaceholder:f}))})),0===h.length&&n?t.createElement(n):t.createElement(t.Fragment,null,h)})),q={height:"100%",overflowY:"auto",WebkitOverflowScrolling:"touch",position:"relative",outline:"none"},U=function(e){var n=e.className,r=e.style,i=e.reportScrollTop,o=e.scrollTo,s=e.children,a=t.useRef(null),u=t.useRef(null),l=t.useRef(),c=t.useCallback((function(e){var t=e.target.scrollTop;l.current=t,null!==u.current?u.current===t&&(u.current=null,i(t)):i(t)}),[i]),f=t.useCallback((function(e){e?(e.addEventListener("scroll",c,{passive:!0}),a.current=e):a.current&&a.current.removeEventListener("scroll",c)}),[c]);return o((function(e){l.current!==e.top&&("smooth"===e.behavior&&(u.current=e.top),a.current&&a.current.scrollTo(e))})),t.createElement("div",{ref:f,style:r,tabIndex:0,className:n},s)},Y=function(e){var n=e.children,r=e.className,o=e.ScrollContainer,s=e.scrollTop,a=e.scrollTo;return t.createElement(void 0===o?U:o,{style:i({},q,e.style),reportScrollTop:s,scrollTo:a,className:r},n)},J=function(e){return t.createElement("header",{ref:e.headerRef},e.children)},Q=function(e){return t.createElement("footer",{ref:e.footerRef},e.children)},X=function(e){return t.createElement("div",{ref:e.listRef,style:e.style},e.children)},Z=function(e){var n=e.header,i=e.HeaderContainer,o=void 0===i?J:i,s=A(t.useContext(r).headerHeight);return t.createElement(o,{headerRef:s},n())},ee=function(e){var n=e.footer,i=e.FooterContainer,o=void 0===i?Q:i,s=A(t.useContext(r).footerHeight);return t.createElement(o,{footerRef:s},n())},te=function(e){var n=e.fixedItemHeight,i=e.children,o=e.ListContainer,s=t.useContext(r),a=s.listHeight,u=s.itemHeights,l={marginTop:_(s.listOffset,0)+"px"},c=A(a,(function(){}),(function(e){if(!n){var t=function(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e.item(n);if(i&&void 0!==i.dataset.index){var o=parseInt(i.dataset.index),s=parseInt(i.dataset.knownSize),a=i.offsetHeight;if(a!==s&&0!==a){var u=t[t.length-1];0===t.length||u.size!==a||u.end!==o-1?t.push({start:o,end:o,size:a}):t[t.length-1].end++}}}return t}(e.children);u(t)}}));return t.createElement(o,{listRef:c,style:l},i)},ne=function(e){var n=e.style,i=e.header,o=e.footer,s=e.fixedItemHeight,a=e.ScrollContainer,u=e.ListContainer,l=e.HeaderContainer,c=e.FooterContainer,f=e.className,h=e.emptyComponent,d=t.useContext(r),p=d.scrollTo,v=d.scrollTop,g=d.viewportHeight,m=_(d.totalHeight,0),x=A(g);return t.createElement(Y,{style:n,ScrollContainer:a,className:f,scrollTo:p,scrollTop:function(e){v(Math.max(e,0))}},t.createElement("div",{ref:x,style:F},t.createElement(te,{fixedItemHeight:s,ListContainer:u},i&&t.createElement(Z,{header:i,HeaderContainer:l}),t.createElement(G,{emptyComponent:h}),o&&t.createElement(ee,{footer:o,FooterContainer:c}))),t.createElement(D,{height:m}))},re={},ie=t.memo((function(e){return t.createElement(r.Provider,{value:e.contextValue},t.createElement(ne,{style:e.style||re,className:e.className,header:e.header,footer:e.footer,fixedItemHeight:void 0!==e.itemHeight,ScrollContainer:e.ScrollContainer,HeaderContainer:e.HeaderContainer,FooterContainer:e.FooterContainer,ListContainer:e.ListContainer||X,emptyComponent:e.emptyComponent}))})),oe=t.forwardRef((function(e,n){var r=t.useState((function(){return W(e)}))[0];return t.useImperativeHandle(n,(function(){return{scrollToIndex:function(e){r.scrollToIndex(e)},adjustForPrependedItems:function(e){r.adjustForPrependedItems(e)}}}),[r]),t.useEffect((function(){return r.isScrolling(e.scrollingStateChange),r.atBottomStateChange(e.atBottomStateChange),r.startReached(e.startReached),r.endReached(e.endReached),r.topItemCount(e.topItems||0),r.totalCount(e.totalCount),e.initialItemCount&&r.initialItemCount(e.initialItemCount),r.itemsRendered(e.itemsRendered),r.totalListHeightChanged(e.totalListHeightChanged),r.followOutput(!!e.followOutput),r.maxRangeSize(e.maxHeightCacheSize||Infinity),r.rangeChanged(e.rangeChanged),r.scrollSeekConfiguration(e.scrollSeek),r.computeItemKey(e.computeItemKey||function(e){return e}),r.itemContainer(e.ItemContainer||"div"),r.renderProp(e.item),r.dataKey(e.dataKey),function(){r.itemsRendered(void 0),r.totalListHeightChanged(void 0)}}),[r,e.scrollingStateChange,e.atBottomStateChange,e.startReached,e.endReached,e.topItems,e.totalCount,e.initialItemCount,e.itemsRendered,e.totalListHeightChanged,e.followOutput,e.maxHeightCacheSize,e.rangeChanged,e.scrollSeek,e.item,e.ItemContainer,e.computeItemKey,e.dataKey]),t.createElement(ie,{contextValue:r,style:e.style,className:e.className,header:e.header,footer:e.footer,itemHeight:e.itemHeight,ScrollContainer:e.ScrollContainer,HeaderContainer:e.HeaderContainer,FooterContainer:e.FooterContainer,ListContainer:e.ListContainer,emptyComponent:e.emptyComponent})}));oe.displayName="Virtuoso";var se=t.forwardRef((function(e,n){var r=t.useState(W(e))[0];return t.useImperativeHandle(n,(function(){return{scrollToIndex:function(e){r.scrollToIndex(e)}}}),[r]),t.useEffect((function(){return r.startReached(e.startReached),r.endReached(e.endReached),r.rangeChanged(e.rangeChanged),r.atBottomStateChange(e.atBottomStateChange),r.isScrolling(e.scrollingStateChange),r.groupCounts(e.groupCounts),r.groupIndices(e.groupIndices),r.itemsRendered(e.itemsRendered),r.totalListHeightChanged(e.totalListHeightChanged),r.renderProp(e.item),r.groupRenderProp(e.group),r.itemContainer(e.ItemContainer||"div"),r.groupContainer(e.GroupContainer||"div"),r.scrollSeekConfiguration(e.scrollSeek),function(){r.itemsRendered(void 0),r.totalListHeightChanged(void 0)}}),[r,e.startReached,e.endReached,e.rangeChanged,e.atBottomStateChange,e.scrollingStateChange,e.groupCounts,e.groupIndices,e.itemsRendered,e.totalListHeightChanged,e.item,e.group,e.GroupContainer,e.ItemContainer,e.scrollSeek]),t.createElement(ie,{contextValue:r,style:e.style,className:e.className,header:e.header,footer:e.footer,itemHeight:e.itemHeight,ScrollContainer:e.ScrollContainer,HeaderContainer:e.HeaderContainer,FooterContainer:e.FooterContainer,ListContainer:e.ListContainer})}));se.displayName="GroupedVirtuoso";var ae=Math.ceil,ue=Math.floor,le=Math.min,ce=Math.max,fe=function(e){return ae(e)-e<.03?ae(e):ue(e)},he=function(e){void 0===e&&(e=0);var n=g(!1),r=g([0,0,void 0,void 0,void 0,void 0]),i=g(0),o=g(0),s=g(0),a=g([0,ce(e-1,0)]),u=g(0),l=g(0),c=m(),f=m();x(r,o,s,i).pipe(k(a)).subscribe((function(e){var t=e[0],n=t[0],r=n[0],i=n[1],o=n[2],s=n[3],c=t[1],h=t[2],d=t[3],p=e[1];if(void 0!==o&&void 0!==s){if(0===d)return a.next([0,-1]),l.next(0),void f.next({startIndex:0,endIndex:-1});var v=p[0],g=p[1],m=fe(r/o),x=function(e,t){return void 0===t&&(t=ue),t(e/m)},y=function(e){var t=e?[0,h]:[h,0],n=t[1],r=m*ue((c-t[0])/s),o=m*ae((c+i+n)/s)-1;o=le(d-1,o),r=le(o,ce(0,r)),a.next([r,o]),l.next(x(r)*s),f.next({startIndex:r,endIndex:o})},$=s*x(v),I=s*x(g)+s;d<g-1?y(!0):$>c?y(!1):I<c+i&&y(!0),u.next(s*x(d-g-1,ae))}}));var h=c.pipe(k(r,i),y((function(e){var t=e[0],n=e[1],r=n[0],i=n[1],o=n[2],s=n[3];if(void 0===o||void 0===s)return{top:0,behavior:"auto"};"number"==typeof t&&(t={index:t,align:"start"});var a=t.index,u=t.align,l=void 0===u?"start":u,c=t.behavior,f=void 0===c?"auto":c;a=Math.max(0,a,Math.min(e[2]-1,a));var h=fe(r/o),d=ue(a/h)*s;return"end"===l?d=d-i+s:"center"===l&&(d=Math.round(d-i/2+s/2)),{top:d,behavior:f}}))),d=w(o),p=m(),v=0;a.pipe(k(i)).subscribe((function(e){var t=e[0][1],n=e[1];0!==n&&t===n-1&&v!==t&&(v=t,p.next(t))}));var $=j({scrollTop$:o,isScrolling$:d,rangeChanged$:f}),I=$.scrollSeekConfiguration$;return x(a,$.isSeeking$,I,r).pipe(y((function(e){var n=e[0],r=n[0],i=n[1],o=e[1],s=e[2],a=e[3][5];return{render:function(e,n,u,l){for(var c=[],f=r;f<=i;f++){var h,d=l(f);h=s&&o&&a?t.createElement(s.placeholder,{height:a,index:f}):e(f),c.push(t.createElement(u,{key:d,className:n},h))}return c}}}))).subscribe(n.next),{gridDimensions:V(r),totalCount:V(i),scrollTop:V(o),overscan:V(s),scrollToIndex:V(c),scrollSeekConfiguration:V(I),itemsRender:P(n),itemRange:P(a),remainingHeight:P(u),listOffset:P(l),scrollTo:P(h),isScrolling:P(d),endReached:P(p),rangeChanged:P(f)}},de=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).state=he(t.props.initialItemCount),t}o(n,e),n.getDerivedStateFromProps=function(e,t){return t.overscan(e.overscan||0),t.totalCount(e.totalCount),t.isScrolling(e.scrollingStateChange),t.endReached(e.endReached),t.rangeChanged(e.rangeChanged),t.scrollSeekConfiguration(e.scrollSeek),null};var r=n.prototype;return r.scrollToIndex=function(e){this.state.scrollToIndex(e)},r.render=function(){return t.createElement(pe,Object.assign({},this.props,{engine:this.state}))},n}(t.PureComponent),pe=function(e){var r,i,o,s,a=e.ScrollContainer,u=e.ItemContainer,l=void 0===u?"div":u,c=e.ListContainer,f=void 0===c?"div":c,h=e.className,d=e.item,p=e.itemClassName,v=void 0===p?"virtuoso-grid-item":p,g=e.listClassName,m=void 0===g?"virtuoso-grid-list":g,x=e.engine,y=e.style,$=void 0===y?{height:"100%"}:y,I=e.computeItemKey,C=void 0===I?function(e){return e}:I,b=x.listOffset,T=x.gridDimensions,k=x.scrollTo,w=x.scrollTop,H=x.itemsRender,S=_(x.remainingHeight,0),R={paddingTop:_(b,0)+"px",paddingBottom:S+"px"},M=_(H,!1),L=(r=function(e){var t=e.element.firstChild.firstChild,n=t.firstChild;T([e.width,e.height,t.offsetWidth,t.offsetHeight,n.offsetWidth,n.offsetHeight])},i=t.useRef(null),o=t.useRef([0,0]),s=new n((function(e){var t=e[0].contentRect,n=t.width,i=t.height;o.current[0]===n&&o.current[1]===i||(o.current=[n,i],r({element:e[0].target,width:Math.round(n),height:Math.round(i)}))})),function(e){e?(s.observe(e),i.current=e):(s.unobserve(i.current),i.current=null)});return t.createElement(Y,{style:$,ScrollContainer:a,className:h,scrollTo:k,scrollTop:w},t.createElement("div",{ref:L,style:F},t.createElement(f,{style:R,className:m},M.render(d,v,l,C))))};exports.GroupedVirtuoso=se,exports.Virtuoso=oe,exports.VirtuosoGrid=de,exports.VirtuosoPresentation=ie;
//# sourceMappingURL=react-virtuoso.cjs.production.min.js.map
import * as React from 'react';
import { CSSProperties, FC, ReactElement } from 'react';
import { CSSProperties, FC, ReactElement, ComponentType } from 'react';
import { TScrollLocation } from './EngineCommons';

@@ -43,2 +43,3 @@ import { ListRange, ScrollSeekConfiguration } from './engines/scrollSeekEngine';

scrollSeek?: ScrollSeekConfiguration;
emptyComponent?: ComponentType;
}

@@ -56,2 +57,3 @@ export interface TVirtuosoPresentationProps {

ListContainer?: TListContainer;
emptyComponent?: ComponentType;
}

@@ -58,0 +60,0 @@ export { TScrollContainer, TListContainer };

@@ -5,2 +5,3 @@ /// <reference types="react" />

itemHeights: import("./rxio").TInput<import("./VirtuosoStore").ItemHeight[]>;
headerHeight: import("./rxio").TInput<number>;
footerHeight: import("./rxio").TInput<number>;

@@ -32,2 +33,3 @@ listHeight: import("./rxio").TInput<number>;

totalHeight: import("./rxio").TOutput<number>;
startReached: import("./rxio").TOutput<number>;
endReached: import("./rxio").TOutput<number>;

@@ -34,0 +36,0 @@ atBottomStateChange: import("./rxio").TOutput<boolean>;

@@ -6,9 +6,4 @@ import * as React from 'react';

import { TScrollContainer } from './VirtuosoScroller';
import { TScrollLocation } from './EngineCommons';
import { ListRange } from './engines/scrollSeekEngine';
declare type TContainer = React.ComponentType<{
className: string;
style?: CSSProperties;
key?: number;
}> | keyof JSX.IntrinsicElements;
import { TScrollLocation, TContainer } from './EngineCommons';
import { ListRange, ScrollSeekConfiguration } from './engines/scrollSeekEngine';
export interface VirtuosoGridProps {

@@ -30,2 +25,3 @@ totalCount: number;

computeItemKey?: (index: number) => number;
scrollSeek?: ScrollSeekConfiguration;
}

@@ -35,3 +31,3 @@ declare type VirtuosoGridState = ReturnType<typeof VirtuosoGridEngine>;

state: {
gridDimensions: import("./rxio").TInput<[number, number, number | undefined, number | undefined]>;
gridDimensions: import("./rxio").TInput<[number, number, number | undefined, number | undefined, number | undefined, number | undefined]>;
totalCount: import("./rxio").TInput<number>;

@@ -41,2 +37,4 @@ scrollTop: import("./rxio").TInput<number>;

scrollToIndex: import("./rxio").TInput<TScrollLocation>;
scrollSeekConfiguration: import("./rxio").TInput<false | ScrollSeekConfiguration | undefined>;
itemsRender: import("./rxio").TOutput<any>;
itemRange: import("./rxio").TOutput<[number, number]>;

@@ -43,0 +41,0 @@ remainingHeight: import("./rxio").TOutput<number>;

@@ -6,4 +6,8 @@ import { TScrollLocation } from './EngineCommons';

// container height,
number | undefined, // item width,
// item width,
number | undefined, // item container width,
// item container width,
number | undefined, // item container height
// item container height
number | undefined, // item content width
// item content width
number | undefined];

@@ -18,2 +22,4 @@ declare type GridItemRange = [number, // start index

scrollToIndex: import("./rxio").TInput<TScrollLocation>;
scrollSeekConfiguration: import("./rxio").TInput<false | import("./engines/scrollSeekEngine").ScrollSeekConfiguration | undefined>;
itemsRender: import("./rxio").TOutput<any>;
itemRange: import("./rxio").TOutput<GridItemRange>;

@@ -20,0 +26,0 @@ remainingHeight: import("./rxio").TOutput<number>;

import * as React from 'react';
import { ReactElement, CSSProperties } from 'react';
import { ReactElement, CSSProperties, ComponentType } from 'react';
import { ListItem } from './GroupIndexTransposer';

@@ -12,2 +12,5 @@ export interface TRenderProps {

export declare type TRender = (item: ListItem, props: TRenderProps) => ReactElement;
export declare const VirtuosoList: React.FC<{}>;
export interface VirtuosoListProps {
emptyComponent?: ComponentType;
}
export declare const VirtuosoList: React.FC<VirtuosoListProps>;
import * as React from 'react';
import { CSSProperties, ReactElement } from 'react';
import { CSSProperties, ReactElement, ComponentType } from 'react';
import { CallbackRef } from './Utils';

@@ -29,2 +29,3 @@ import { TScrollContainer } from './VirtuosoScroller';

fixedItemHeight: boolean;
emptyComponent?: ComponentType;
}>;
{
"name": "react-virtuoso",
"sideEffects": false,
"version": "0.19.0",
"version": "0.20.0",
"homepage": "https://virtuoso.dev",

@@ -35,2 +35,4 @@ "license": "MIT",

"@types/react-test-renderer": "^16.9.2",
"eslint-plugin-html": "^6.0.2",
"eslint-plugin-json": "^2.1.1",
"faker": "^4.1.0",

@@ -37,0 +39,0 @@ "husky": "^4.2.5",

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

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

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