stream-chat-react 9.1.5 → 9.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14759,7 +14759,7 @@ var StreamChatReact = (function (exports, React, streamChat, reactDom) {
14759
14759
 
14760
14760
  function noop$2() {}
14761
14761
 
14762
- var on$1 = noop$2;
14762
+ var on$2 = noop$2;
14763
14763
  var addListener = noop$2;
14764
14764
  var once = noop$2;
14765
14765
  var off = noop$2;
@@ -14818,7 +14818,7 @@ var StreamChatReact = (function (exports, React, streamChat, reactDom) {
14818
14818
  argv: argv,
14819
14819
  version: version$1,
14820
14820
  versions: versions,
14821
- on: on$1,
14821
+ on: on$2,
14822
14822
  addListener: addListener,
14823
14823
  once: once,
14824
14824
  off: off,
@@ -45141,7 +45141,7 @@ var StreamChatReact = (function (exports, React, streamChat, reactDom) {
45141
45141
 
45142
45142
  window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};
45143
45143
 
45144
- window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var version = '9.1.5';
45144
+ window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var version = '9.2.0';
45145
45145
 
45146
45146
  window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var useChat = function (_a) {
45147
45147
  var _b, _c;
@@ -45608,7 +45608,7 @@ var StreamChatReact = (function (exports, React, streamChat, reactDom) {
45608
45608
  }), canPin = _d.canPin, handlePin = _d.handlePin;
45609
45609
  var _e = useReactionClick(message, reactionSelectorRef, undefined, closeReactionSelectorOnClick), isReactionEnabled = _e.isReactionEnabled, onReactionListClick = _e.onReactionListClick, showDetailedReactions = _e.showDetailedReactions;
45610
45610
  var highlighted = highlightedMessageId === message.id;
45611
- return (React__default['default'].createElement(MemoizedMessage, { additionalMessageInputProps: props.additionalMessageInputProps, canPin: canPin, customMessageActions: props.customMessageActions, disableQuotedMessages: props.disableQuotedMessages, endOfGroup: props.endOfGroup, firstOfGroup: props.firstOfGroup, formatDate: props.formatDate, groupedByUser: props.groupedByUser, groupStyles: props.groupStyles, handleAction: handleAction, handleDelete: handleDelete, handleFlag: handleFlag, handleMute: handleMute, handleOpenThread: handleOpenThread, handlePin: handlePin, handleReaction: handleReaction, handleRetry: handleRetry, highlighted: highlighted, initialMessage: props.initialMessage, isReactionEnabled: isReactionEnabled, lastReceivedId: props.lastReceivedId, message: message, Message: props.Message, messageActions: props.messageActions, messageListRect: props.messageListRect, mutes: mutes, onMentionsClickMessage: onMentionsClick, onMentionsHoverMessage: onMentionsHover, onReactionListClick: onReactionListClick, onUserClick: props.onUserClick, onUserHover: props.onUserHover, pinPermissions: props.pinPermissions, reactionSelectorRef: reactionSelectorRef, readBy: props.readBy, renderText: props.renderText, showDetailedReactions: showDetailedReactions, threadList: props.threadList, unsafeHTML: props.unsafeHTML, userRoles: userRoles }));
45611
+ return (React__default['default'].createElement(MemoizedMessage, { additionalMessageInputProps: props.additionalMessageInputProps, autoscrollToBottom: props.autoscrollToBottom, canPin: canPin, customMessageActions: props.customMessageActions, disableQuotedMessages: props.disableQuotedMessages, endOfGroup: props.endOfGroup, firstOfGroup: props.firstOfGroup, formatDate: props.formatDate, groupedByUser: props.groupedByUser, groupStyles: props.groupStyles, handleAction: handleAction, handleDelete: handleDelete, handleFlag: handleFlag, handleMute: handleMute, handleOpenThread: handleOpenThread, handlePin: handlePin, handleReaction: handleReaction, handleRetry: handleRetry, highlighted: highlighted, initialMessage: props.initialMessage, isReactionEnabled: isReactionEnabled, lastReceivedId: props.lastReceivedId, message: message, Message: props.Message, messageActions: props.messageActions, messageListRect: props.messageListRect, mutes: mutes, onMentionsClickMessage: onMentionsClick, onMentionsHoverMessage: onMentionsHover, onReactionListClick: onReactionListClick, onUserClick: props.onUserClick, onUserHover: props.onUserHover, pinPermissions: props.pinPermissions, reactionSelectorRef: reactionSelectorRef, readBy: props.readBy, renderText: props.renderText, showDetailedReactions: showDetailedReactions, threadList: props.threadList, unsafeHTML: props.unsafeHTML, userRoles: userRoles }));
45612
45612
  };
45613
45613
 
45614
45614
  window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var MessageCommerceWithContext = function (props) {
@@ -48237,7 +48237,7 @@ var StreamChatReact = (function (exports, React, streamChat, reactDom) {
48237
48237
  };
48238
48238
  }
48239
48239
 
48240
- window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};function u(){return u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);}return t},u.apply(this,arguments)}function c(t,e){if(null==t)return {};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)e.indexOf(n=i[r])>=0||(o[n]=t[n]);return o}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function d(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return (n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return m(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return "Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[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.")}var f,p,h="undefined"!=typeof document?React.useLayoutEffect:React.useEffect;!function(t){t[t.DEBUG=0]="DEBUG",t[t.INFO=1]="INFO",t[t.WARN=2]="WARN",t[t.ERROR=3]="ERROR";}(p||(p={}));var g=((f={})[p.DEBUG]="debug",f[p.INFO]="log",f[p.WARN]="warn",f[p.ERROR]="error",f),v=system(function(){var t=statefulStream(p.ERROR);return {log:statefulStream(function(n,r,o){var i;void 0===o&&(o=p.INFO),o>=(null!=(i=("undefined"==typeof globalThis?window:globalThis).VIRTUOSO_LOG_LEVEL)?i:getValue(t))&&console[g[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r);}),logLevel:t}},[],{singleton:!0});function S(t,e){void 0===e&&(e=!0);var n=React.useRef(null),r=function(t){};if("undefined"!=typeof ResizeObserver){var o=new ResizeObserver(function(e){var n=e[0].target;null!==n.offsetParent&&t(n);});r=function(t){t&&e?(o.observe(t),n.current=t):(n.current&&o.unobserve(n.current),n.current=null);};}return {ref:n,callbackRef:r}}function I(t,e){return void 0===e&&(e=!0),S(t,e).callbackRef}function C(t,e,n,r,o,i){return S(function(n){for(var a=function(t,e,n,r){var o=t.length;if(0===o)return null;for(var i=[],a=0;a<o;a++){var l=t.item(a);if(l&&void 0!==l.dataset.index){var s=parseInt(l.dataset.index),u=parseFloat(l.dataset.knownSize),c=e(l,"offsetHeight");if(0===c&&r("Zero-sized element, this should not happen",{child:l},p.ERROR),c!==u){var m=i[i.length-1];0===i.length||m.size!==c||m.endIndex!==s-1?i.push({startIndex:s,endIndex:s,size:c}):i[i.length-1].endIndex++;}}}return i}(n.children,e,0,o),l=n.parentElement;!l.dataset.virtuosoScroller;)l=l.parentElement;var s=i?i.scrollTop:"window"===l.firstElementChild.dataset.viewportType?window.pageYOffset||document.documentElement.scrollTop:l.scrollTop;r({scrollTop:Math.max(s,0),scrollHeight:(null!=i?i:l).scrollHeight,viewportHeight:(null!=i?i:l).offsetHeight}),null!==a&&t(a);},n)}function T(t,e){return Math.round(t.getBoundingClientRect()[e])}function w(t,e){return Math.abs(t-e)<1.01}function x(t,n,r,l,u){void 0===l&&(l=noop);var c=React.useRef(null),m=React.useRef(null),d=React.useRef(null),f=React.useRef(!1),p=React.useCallback(function(e){var r=e.target,o=r===window||r===document?window.pageYOffset||document.documentElement.scrollTop:r.scrollTop,i=r===window?document.documentElement.scrollHeight:r.scrollHeight,a=r===window?window.innerHeight:r.offsetHeight,l=function(){t({scrollTop:Math.max(o,0),scrollHeight:i,viewportHeight:a});};f.current?reactDom.flushSync(l):l(),f.current=!1,null!==m.current&&(o===m.current||o<=0||o===r.scrollHeight-T(r,"height"))&&(m.current=null,n(!0),d.current&&(clearTimeout(d.current),d.current=null));},[t,n]);return React.useEffect(function(){var t=u||c.current;return l(u||c.current),p({target:t}),t.addEventListener("scroll",p,{passive:!0}),function(){l(null),t.removeEventListener("scroll",p);}},[c,p,r,l,u]),{scrollerRef:c,scrollByCallback:function(t){f.current=!0,c.current.scrollBy(t);},scrollToCallback:function(e){var r=c.current;if(r&&(!("offsetHeight"in r)||0!==r.offsetHeight)){var o,i,a,l="smooth"===e.behavior;if(r===window?(i=Math.max(T(document.documentElement,"height"),document.documentElement.scrollHeight),o=window.innerHeight,a=document.documentElement.scrollTop):(i=r.scrollHeight,o=T(r,"height"),a=r.scrollTop),e.top=Math.ceil(Math.max(Math.min(i-o,e.top),0)),w(o,i)||e.top===a)return t({scrollTop:a,scrollHeight:i,viewportHeight:o}),void(l&&n(!0));l?(m.current=e.top,d.current&&clearTimeout(d.current),d.current=setTimeout(function(){d.current=null,m.current=null,n(!0);},1e3)):m.current=null,r.scrollTo(e);}}}}var b=system(function(){var t=stream(),n=stream(),r=statefulStream(0),o=stream(),i=statefulStream(0),a=stream(),l=stream(),s=statefulStream(0),u=statefulStream(0),c=statefulStream(0),m=stream(),d=stream(),f=statefulStream(!1),p=statefulStream(!1);return connect(pipe(t,map(function(t){return t.scrollTop})),n),connect(pipe(t,map(function(t){return t.scrollHeight})),l),connect(n,i),{scrollContainerState:t,scrollTop:n,viewportHeight:a,headerHeight:s,fixedHeaderHeight:u,footerHeight:c,scrollHeight:l,smoothScrollTargetReached:o,react18ConcurrentRendering:p,scrollTo:m,scrollBy:d,statefulScrollTop:i,deviation:r,scrollingInProgress:f}},[],{singleton:!0}),y={lvl:0};function E(t,e,n,r,o){return void 0===r&&(r=y),void 0===o&&(o=y),{k:t,v:e,lvl:n,l:r,r:o}}function H$1(t){return t===y}function R$1(){return y}function L$1(t,e){if(H$1(t))return y;var n=t.k,r=t.l,o=t.r;if(e===n){if(H$1(r))return o;if(H$1(o))return r;var i=P$1(r);return U$1(M$1(t,{k:i[0],v:i[1],l:O$1(r)}))}return U$1(M$1(t,e<n?{l:L$1(r,e)}:{r:L$1(o,e)}))}function k$1(t,e,n){if(void 0===n&&(n="k"),H$1(t))return [-Infinity,void 0];if(t[n]===e)return [t.k,t.v];if(t[n]<e){var r=k$1(t.r,e,n);return -Infinity===r[0]?[t.k,t.v]:r}return k$1(t.l,e,n)}function z$1(t,e,n){return H$1(t)?E(e,n,1):e===t.k?M$1(t,{k:e,v:n}):function(t){return N$1(D$1(t))}(M$1(t,e<t.k?{l:z$1(t.l,e,n)}:{r:z$1(t.r,e,n)}))}function B$1(t,e,n){if(H$1(t))return [];var r=t.k,o=t.v,i=t.r,a=[];return r>e&&(a=a.concat(B$1(t.l,e,n))),r>=e&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(B$1(i,e,n))),a}function F$1(t){return H$1(t)?[]:[].concat(F$1(t.l),[{k:t.k,v:t.v}],F$1(t.r))}function P$1(t){return H$1(t.r)?[t.k,t.v]:P$1(t.r)}function O$1(t){return H$1(t.r)?t.l:U$1(M$1(t,{r:O$1(t.r)}))}function M$1(t,e){return E(void 0!==e.k?e.k:t.k,void 0!==e.v?e.v:t.v,void 0!==e.lvl?e.lvl:t.lvl,void 0!==e.l?e.l:t.l,void 0!==e.r?e.r:t.r)}function V$1(t){return H$1(t)||t.lvl>t.r.lvl}function U$1(t){var e=t.l,n=t.r,r=t.lvl;if(n.lvl>=r-1&&e.lvl>=r-1)return t;if(r>n.lvl+1){if(V$1(e))return D$1(M$1(t,{lvl:r-1}));if(H$1(e)||H$1(e.r))throw new Error("Unexpected empty nodes");return M$1(e.r,{l:M$1(e,{r:e.r.l}),r:M$1(t,{l:e.r.r,lvl:r-1}),lvl:r})}if(V$1(t))return N$1(M$1(t,{lvl:r-1}));if(H$1(n)||H$1(n.l))throw new Error("Unexpected empty nodes");var o=n.l,i=V$1(o)?n.lvl-1:n.lvl;return M$1(o,{l:M$1(t,{r:o.l,lvl:r-1}),r:N$1(M$1(n,{l:o.r,lvl:i})),lvl:o.lvl+1})}function A$1(t,e,n){return H$1(t)?[]:W$1(B$1(t,k$1(t,e)[0],n),function(t){return {index:t.k,value:t.v}})}function W$1(t,e){var n=t.length;if(0===n)return [];for(var r=e(t[0]),o=r.index,i=r.value,a=[],l=1;l<n;l++){var s=e(t[l]),u=s.index,c=s.value;a.push({start:o,end:u-1,value:i}),o=u,i=c;}return a.push({start:o,end:Infinity,value:i}),a}function N$1(t){var e=t.r,n=t.lvl;return H$1(e)||H$1(e.r)||e.lvl!==n||e.r.lvl!==n?t:M$1(e,{l:M$1(t,{r:e.l}),lvl:n+1})}function D$1(t){var e=t.l;return H$1(e)||e.lvl!==t.lvl?t:M$1(e,{r:M$1(t,{l:e.r})})}function G$1(t,e,n,r){void 0===r&&(r=0);for(var o=t.length-1;r<=o;){var i=Math.floor((r+o)/2),a=n(t[i],e);if(0===a)return i;if(-1===a){if(o-r<2)return i-1;o=i-1;}else {if(o===r)return i;r=i+1;}}throw new Error("Failed binary finding record in array - "+t.join(",")+", searched for "+e)}function _$1(t,e,n){return t[G$1(t,e,n)]}var j$1=system(function(){return {recalcInProgress:statefulStream(!1)}},[],{singleton:!0});function K$1(t){var e=t.size,n=t.startIndex,r=t.endIndex;return function(t){return t.start===n&&(t.end===r||Infinity===t.end)&&t.value===e}}function Y$1(t,e){var n=t.index;return e===n?0:e<n?-1:1}function q$1(t,e){var n=t.offset;return e===n?0:e<n?-1:1}function Z$1(t){return {index:t.index,value:t}}function J$1(t,e,n){var r=t,o=0,i=0,a=0,l=0;if(0!==e){a=r[l=G$1(r,e-1,Y$1)].offset;var s=k$1(n,e-1);o=s[0],i=s[1],r.length&&r[l].size===k$1(n,e)[1]&&(l-=1),r=r.slice(0,l+1);}else r=[];for(var u,c=d(A$1(n,e,Infinity));!(u=c()).done;){var m=u.value,f=m.start,p=m.value,h=(f-o)*i+a;r.push({offset:h,size:p,index:f}),o=f,a=h,i=p;}return {offsetTree:r,lastIndex:o,lastOffset:a,lastSize:i}}function $$1(t,e){var n=e[0],r=e[1];n.length>0&&(0, e[2])("received item sizes",n,p.DEBUG);var o=t.sizeTree,i=o,a=0;if(r.length>0&&H$1(o)&&2===n.length){var l=n[0].size,s=n[1].size;i=r.reduce(function(t,e){return z$1(z$1(t,e,l),e+1,s)},i);}else {var u=function(t,e){for(var n,r=H$1(t)?0:Infinity,o=d(e);!(n=o()).done;){var i=n.value,a=i.size,l=i.startIndex,s=i.endIndex;if(r=Math.min(r,l),H$1(t))t=z$1(t,0,a);else {var u=A$1(t,l-1,s+1);if(!u.some(K$1(i))){for(var c,m=!1,f=!1,p=d(u);!(c=p()).done;){var h=c.value,g=h.start,v=h.end,S=h.value;m?(s>=g||a===S)&&(t=L$1(t,g)):(f=S!==a,m=!0),v>s&&s>=g&&S!==a&&(t=z$1(t,s+1,S));}f&&(t=z$1(t,l,a));}}}return [t,r]}(i,n);i=u[0],a=u[1];}if(i===o)return t;var c=J$1(t.offsetTree,a,i),m=c.offsetTree;return {sizeTree:i,offsetTree:m,lastIndex:c.lastIndex,lastOffset:c.lastOffset,lastSize:c.lastSize,groupOffsetTree:r.reduce(function(t,e){return z$1(t,e,Q$1(e,m))},R$1()),groupIndices:r}}function Q$1(t,e){if(0===e.length)return 0;var n=_$1(e,t,Y$1);return n.size*(t-n.index)+n.offset}function X$1(t,e,n){if(function(t){return void 0!==t.groupIndex}(t))return e.groupIndices[t.groupIndex]+1;var r=tt$1("LAST"===t.index?n:t.index,e);return Math.max(0,r,Math.min(n,r))}function tt$1(t,e){if(!et$1(e))return t;for(var n=0;e.groupIndices[n]<=t+n;)n++;return t+n}function et$1(t){return !H$1(t.groupOffsetTree)}var nt$1={offsetHeight:"height",offsetWidth:"width"},rt$1=system(function(t){var n=t[0].log,r=t[1].recalcInProgress,o=stream(),i=stream(),a=statefulStreamFromEmitter(i,0),l=stream(),s=stream(),c=statefulStream(0),m=statefulStream([]),d=statefulStream(void 0),f=statefulStream(void 0),h=statefulStream(function(t,e){return T(t,nt$1[e])}),g=statefulStream(void 0),v={offsetTree:[],sizeTree:R$1(),groupOffsetTree:R$1(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]},S=statefulStreamFromEmitter(pipe(o,withLatestFrom(m,n),scan($$1,v),distinctUntilChanged()),v);connect(pipe(m,filter(function(t){return t.length>0}),withLatestFrom(S),map(function(t){var e=t[0],n=t[1],r=e.reduce(function(t,e,r){return z$1(t,e,Q$1(e,n.offsetTree)||r)},R$1());return u({},n,{groupIndices:e,groupOffsetTree:r})})),S),connect(pipe(i,withLatestFrom(S),filter(function(t){return t[0]<t[1].lastIndex}),map(function(t){var e=t[1];return [{startIndex:t[0],endIndex:e.lastIndex,size:e.lastSize}]})),o),connect(d,f);var I=statefulStreamFromEmitter(pipe(d,map(function(t){return void 0===t})),!0);connect(pipe(f,filter(function(t){return void 0!==t&&H$1(getValue(S).sizeTree)}),map(function(t){return [{startIndex:0,endIndex:0,size:t}]})),o);var C=streamFromEmitter(pipe(o,withLatestFrom(S),scan(function(t,e){var n=e[1];return {changed:n!==t.sizes,sizes:n}},{changed:!1,sizes:v}),map(function(t){return t.changed})));subscribe(pipe(c,scan(function(t,e){return {diff:t.prev-e,prev:e}},{diff:0,prev:0}),map(function(t){return t.diff})),function(t){t>0?(publish(r,!0),publish(l,t)):t<0&&publish(s,t);}),subscribe(pipe(c,withLatestFrom(n)),function(t){t[0]<0&&(0, t[1])("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:c},p.ERROR);});var w=streamFromEmitter(l);connect(pipe(l,withLatestFrom(S),map(function(t){var e=t[0],n=t[1];if(n.groupIndices.length>0)throw new Error("Virtuoso: prepending items does not work with groups");return F$1(n.sizeTree).reduce(function(t,n){var r=n.k,o=n.v;return {ranges:[].concat(t.ranges,[{startIndex:t.prevIndex,endIndex:r+e-1,size:t.prevSize}]),prevIndex:r+e,prevSize:o}},{ranges:[],prevIndex:0,prevSize:n.lastSize}).ranges})),o);var x=streamFromEmitter(pipe(s,withLatestFrom(S),map(function(t){return Q$1(-t[0],t[1].offsetTree)})));return connect(pipe(s,withLatestFrom(S),map(function(t){var e=t[0],n=t[1];if(n.groupIndices.length>0)throw new Error("Virtuoso: shifting items does not work with groups");var r=F$1(n.sizeTree).reduce(function(t,n){var r=n.v;return z$1(t,Math.max(0,n.k+e),r)},R$1());return u({},n,{sizeTree:r},J$1(n.offsetTree,0,r))})),S),{data:g,totalCount:i,sizeRanges:o,groupIndices:m,defaultItemSize:f,fixedItemSize:d,unshiftWith:l,shiftWith:s,shiftWithOffset:x,beforeUnshiftWith:w,firstItemIndex:c,sizes:S,listRefresh:C,statefulTotalCount:a,trackItemSizes:I,itemSize:h}},tup(v,j$1),{singleton:!0}),ot$1="undefined"!=typeof document&&"scrollBehavior"in document.documentElement.style;function it$1(t){var e="number"==typeof t?{index:t}:t;return e.align||(e.align="start"),e.behavior&&ot$1||(e.behavior="auto"),e.offset||(e.offset=0),e}var at$1=system(function(t){var n=t[0],r=n.sizes,o=n.totalCount,i=n.listRefresh,a=t[1],l=a.scrollingInProgress,s=a.viewportHeight,u=a.scrollTo,c=a.smoothScrollTargetReached,m=a.headerHeight,d=a.footerHeight,f=t[2].log,h=stream(),g=statefulStream(0),v=null,S=null,I=null;function C(){v&&(v(),v=null),I&&(I(),I=null),S&&(clearTimeout(S),S=null),publish(l,!1);}return connect(pipe(h,withLatestFrom(r,s,o,g,m,d,f),map(function(t){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],u=t[5],m=t[6],d=t[7],f=it$1(n),g=f.align,T=f.behavior,w=f.offset,x=a-1,b=X$1(f,r,x),y=Q$1(b,r.offsetTree)+u;"end"===g?(y=y-o+k$1(r.sizeTree,b)[1],b===x&&(y+=m)):"center"===g?y=y-o/2+k$1(r.sizeTree,b)[1]/2:y-=s,w&&(y+=w);var E=function(t){C(),t?(d("retrying to scroll to",{location:n},p.DEBUG),publish(h,n)):d("list did not change, scroll successful",{},p.DEBUG);};if(C(),"smooth"===T){var H=!1;I=subscribe(i,function(t){H=H||t;}),v=handleNext(c,function(){E(H);});}else v=handleNext(pipe(i,function(t){var e=setTimeout(function(){t(!1);},150);return function(n){n&&(t(!0),clearTimeout(e));}}),E);return S=setTimeout(function(){C();},1200),publish(l,!0),d("scrolling from index to",{index:b,top:y,behavior:T},p.DEBUG),{top:y,behavior:T}})),u),{scrollToIndex:h,topListHeight:g}},tup(rt$1,b,v),{singleton:!0}),lt$1="up",st$1={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},ut$1=system(function(t){var n=t[0],r=n.scrollContainerState,o=n.scrollTop,i=n.viewportHeight,a=n.headerHeight,l=n.footerHeight,s=n.scrollBy,u=statefulStream(!1),c=statefulStream(!0),m=stream(),d=stream(),f=statefulStream(4),p=statefulStream(0),h=statefulStreamFromEmitter(pipe(merge(pipe(duc(o),skip(1),mapTo(!0)),pipe(duc(o),skip(1),mapTo(!1),debounceTime(100))),distinctUntilChanged()),!1),g=statefulStreamFromEmitter(pipe(merge(pipe(s,mapTo(!0)),pipe(s,mapTo(!1),debounceTime(200))),distinctUntilChanged()),!1);connect(pipe(combineLatest(duc(o),duc(p)),map(function(t){return t[0]<=t[1]}),distinctUntilChanged()),c),connect(pipe(c,throttleTime(50)),d);var v=streamFromEmitter(pipe(combineLatest(r,duc(i),duc(a),duc(l),duc(f)),scan(function(t,e){var n,r,o=e[0],i=o.scrollTop,a=o.scrollHeight,l=e[1],s={viewportHeight:l,scrollTop:i,scrollHeight:a};return i+l-a>-e[4]?(i>t.state.scrollTop?(n="SCROLLED_DOWN",r=t.state.scrollTop-i):(n="SIZE_DECREASED",r=t.state.scrollTop-i||t.scrollTopDelta),{atBottom:!0,state:s,atBottomBecause:n,scrollTopDelta:r}):{atBottom:!1,notAtBottomBecause:s.scrollHeight>t.state.scrollHeight?"SIZE_INCREASED":l<t.state.viewportHeight?"VIEWPORT_HEIGHT_DECREASING":i<t.state.scrollTop?"SCROLLING_UPWARDS":"NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",state:s}},st$1),distinctUntilChanged(function(t,e){return t&&t.atBottom===e.atBottom}))),S=statefulStreamFromEmitter(pipe(r,scan(function(t,e){var n=e.scrollTop,r=e.scrollHeight,o=e.viewportHeight;return w(t.scrollHeight,r)?{scrollTop:n,scrollHeight:r,jump:0,changed:!1}:t.scrollTop!==n&&r-(n+o)<1?{scrollHeight:r,scrollTop:n,jump:t.scrollTop-n,changed:!0}:{scrollHeight:r,scrollTop:n,jump:0,changed:!0}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),filter(function(t){return t.changed}),map(function(t){return t.jump})),0);connect(pipe(v,map(function(t){return t.atBottom})),u),connect(pipe(u,throttleTime(50)),m);var I=statefulStream("down");connect(pipe(r,map(function(t){return t.scrollTop}),distinctUntilChanged(),scan(function(t,n){return getValue(g)?{direction:t.direction,prevScrollTop:n}:{direction:n<t.prevScrollTop?lt$1:"down",prevScrollTop:n}},{direction:"down",prevScrollTop:0}),map(function(t){return t.direction})),I),connect(pipe(r,throttleTime(50),mapTo("none")),I);var C=statefulStream(0);return connect(pipe(h,filter(function(t){return !t}),mapTo(0)),C),connect(pipe(o,throttleTime(100),withLatestFrom(h),filter(function(t){return !!t[1]}),scan(function(t,e){return [t[1],e[0]]},[0,0]),map(function(t){return t[1]-t[0]})),C),{isScrolling:h,isAtTop:c,isAtBottom:u,atBottomState:v,atTopStateChange:d,atBottomStateChange:m,scrollDirection:I,atBottomThreshold:f,atTopThreshold:p,scrollVelocity:C,lastJumpDueToItemResize:S}},tup(b)),ct$1=system(function(t){var n=t[0].log,r=statefulStream(!1),o=streamFromEmitter(pipe(r,filter(function(t){return t}),distinctUntilChanged()));return subscribe(r,function(t){t&&getValue(n)("props updated",{},p.DEBUG);}),{propsReady:r,didMount:o}},tup(v),{singleton:!0}),mt$1=system(function(t){var n=t[0],r=n.sizes,o=n.listRefresh,i=n.defaultItemSize,a=t[1].scrollTop,l=t[2].scrollToIndex,s=t[3].didMount,u=statefulStream(!0),c=statefulStream(0);return connect(pipe(s,withLatestFrom(c),filter(function(t){return !!t[1]}),mapTo(!1)),u),subscribe(pipe(combineLatest(o,s),withLatestFrom(u,r,i),filter(function(t){var e=t[1],n=t[3];return t[0][1]&&(!H$1(t[2].sizeTree)||void 0!==n)&&!e}),withLatestFrom(c)),function(t){var n=t[1];setTimeout(function(){handleNext(a,function(){publish(u,!0);}),publish(l,n);});}),{scrolledToInitialItem:u,initialTopMostItemIndex:c}},tup(rt$1,b,at$1,ct$1),{singleton:!0});function dt$1(t){return !!t&&("smooth"===t?"smooth":"auto")}var ft$1=system(function(t){var n=t[0],r=n.totalCount,o=n.listRefresh,i=t[1],a=i.isAtBottom,l=i.atBottomState,s=t[2].scrollToIndex,u=t[3].scrolledToInitialItem,c=t[4],m=c.propsReady,d=c.didMount,f=t[5].log,h=t[6].scrollingInProgress,g=statefulStream(!1),v=null;function S(t){publish(s,{index:"LAST",align:"end",behavior:t});}return subscribe(pipe(combineLatest(pipe(duc(r),skip(1)),d),withLatestFrom(duc(g),a,u,h),map(function(t){var e=t[0],n=e[0],r=e[1]&&t[3],o="auto";return r&&(o=function(t,e){return "function"==typeof t?dt$1(t(e)):e&&dt$1(t)}(t[1],t[2]||t[4]),r=r&&!!o),{totalCount:n,shouldFollow:r,followOutputBehavior:o}}),filter(function(t){return t.shouldFollow})),function(t){var n=t.totalCount,r=t.followOutputBehavior;v&&(v(),v=null),v=handleNext(o,function(){getValue(f)("following output to ",{totalCount:n},p.DEBUG),S(r),v=null;});}),subscribe(pipe(combineLatest(duc(g),r,m),filter(function(t){return t[0]&&t[2]}),scan(function(t,e){var n=e[1];return {refreshed:t.value===n,value:n}},{refreshed:!1,value:0}),filter(function(t){return t.refreshed}),withLatestFrom(g,r)),function(t){var n=t[1],r=handleNext(l,function(t){!n||t.atBottom||"SIZE_INCREASED"!==t.notAtBottomBecause||v||(getValue(f)("scrolling to bottom due to increased size",{},p.DEBUG),S("auto"));});setTimeout(r,100);}),subscribe(combineLatest(duc(g),l),function(t){var e=t[1];t[0]&&!e.atBottom&&"VIEWPORT_HEIGHT_DECREASING"===e.notAtBottomBecause&&S("auto");}),{followOutput:g}},tup(rt$1,ut$1,at$1,mt$1,ct$1,v,b));function pt$1(t){return t.reduce(function(t,e){return t.groupIndices.push(t.totalCount),t.totalCount+=e+1,t},{totalCount:0,groupIndices:[]})}var ht$1=system(function(t){var n=t[0],r=n.totalCount,o=n.groupIndices,i=n.sizes,a=t[1],l=a.scrollTop,s=a.headerHeight,u=stream(),c=stream(),m=streamFromEmitter(pipe(u,map(pt$1)));return connect(pipe(m,map(function(t){return t.totalCount})),r),connect(pipe(m,map(function(t){return t.groupIndices})),o),connect(pipe(combineLatest(l,i,s),filter(function(t){return et$1(t[1])}),map(function(t){return k$1(t[1].groupOffsetTree,Math.max(t[0]-t[2],0),"v")[0]}),distinctUntilChanged(),map(function(t){return [t]})),c),{groupCounts:u,topItemsIndexes:c}},tup(rt$1,b));function gt$1(t,e){return !(!t||t[0]!==e[0]||t[1]!==e[1])}function vt$1(t,e){return !(!t||t.startIndex!==e.startIndex||t.endIndex!==e.endIndex)}function St$1(t,e,n){return "number"==typeof t?n===lt$1&&"top"===e||"down"===n&&"bottom"===e?t:0:n===lt$1?"top"===e?t.main:t.reverse:"bottom"===e?t.main:t.reverse}function It$1(t,e){return "number"==typeof t?t:t[e]||0}var Ct$1=system(function(t){var n=t[0],r=n.scrollTop,o=n.viewportHeight,i=n.deviation,a=n.headerHeight,l=n.fixedHeaderHeight,s=stream(),u=statefulStream(0),c=statefulStream(0),m=statefulStream(0),d=statefulStreamFromEmitter(pipe(combineLatest(duc(r),duc(o),duc(a),duc(s,gt$1),duc(m),duc(u),duc(l),duc(i),duc(c)),map(function(t){var e=t[0],n=t[1],r=t[2],o=t[3],i=o[0],a=o[1],l=t[4],s=t[6],u=t[7],c=t[8],m=e-u,d=t[5]+s,f=Math.max(r-m,0),p="none",h=It$1(c,"top"),g=It$1(c,"bottom");return i-=u,a+=r+s,(i+=r+s)>e+d-h&&(p=lt$1),(a-=u)<e-f+n+g&&(p="down"),"none"!==p?[Math.max(m-r-St$1(l,"top",p)-h,0),m-f-s+n+St$1(l,"bottom",p)+g]:null}),filter(function(t){return null!=t}),distinctUntilChanged(gt$1)),[0,0]);return {listBoundary:s,overscan:m,topListHeight:u,increaseViewportBy:c,visibleRange:d}},tup(b),{singleton:!0}),Tt$1={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function wt$1(t,e,n){if(0===t.length)return [];if(!et$1(e))return t.map(function(t){return u({},t,{index:t.index+n,originalIndex:t.index})});for(var r,o=[],i=A$1(e.groupOffsetTree,t[0].index,t[t.length-1].index),a=void 0,l=0,s=d(t);!(r=s()).done;){var c=r.value;(!a||a.end<c.index)&&(a=i.shift(),l=e.groupIndices.indexOf(a.start)),o.push(u({},c.index===a.start?{type:"group",index:l}:{index:c.index-(l+1)+n,groupIndex:l},{size:c.size,offset:c.offset,originalIndex:c.index,data:c.data}));}return o}function xt$1(t,e,n,r,o){var i=0,a=0;if(t.length>0){i=t[0].offset;var l=t[t.length-1];a=l.offset+l.size;}var s=i,u=r.lastOffset+(n-r.lastIndex)*r.lastSize-a;return {items:wt$1(t,r,o),topItems:wt$1(e,r,o),topListHeight:e.reduce(function(t,e){return e.size+t},0),offsetTop:i,offsetBottom:u,top:s,bottom:a,totalCount:n,firstItemIndex:o}}var bt$1=system(function(t){var n=t[0],r=n.sizes,o=n.totalCount,i=n.data,a=n.firstItemIndex,l=t[1],s=t[2],c=s.visibleRange,m=s.listBoundary,f=s.topListHeight,p=t[3],h=p.scrolledToInitialItem,g=p.initialTopMostItemIndex,v=t[4].topListHeight,S=t[5],I=t[6].didMount,C=t[7].recalcInProgress,T=statefulStream([]),w=stream();connect(l.topItemsIndexes,T);var x=statefulStreamFromEmitter(pipe(combineLatest(I,C,duc(c,gt$1),duc(o),duc(r),duc(g),h,duc(T),duc(a),i),filter(function(t){return t[0]&&!t[1]}),map(function(t){var n=t[2],r=n[0],o=n[1],i=t[3],a=t[5],l=t[6],s=t[7],u=t[8],c=t[9],m=t[4],f=m.sizeTree,p=m.offsetTree;if(0===i||0===r&&0===o)return Tt$1;if(H$1(f))return xt$1(function(t,e,n){if(et$1(e)){var r=tt$1(t,e);return [{index:k$1(e.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return [{index:t,size:0,offset:0,data:n&&n[0]}]}(function(t,e){return "number"==typeof t?t:"LAST"===t.index?e-1:t.index}(a,i),m,c),[],i,m,u);var h=[];if(s.length>0)for(var g,v=s[0],S=s[s.length-1],I=0,C=d(A$1(f,v,S));!(g=C()).done;)for(var T=g.value,w=T.value,x=Math.max(T.start,v),b=Math.min(T.end,S),y=x;y<=b;y++)h.push({index:y,size:w,offset:I,data:c&&c[y]}),I+=w;if(!l)return xt$1([],h,i,m,u);var E=s.length>0?s[s.length-1]+1:0,R=function(t,e,n,r){return void 0===r&&(r=0),r>0&&(e=Math.max(e,_$1(t,r,Y$1).offset)),W$1((i=n,l=G$1(o=t,e,a=q$1),s=G$1(o,i,a,l),o.slice(l,s+1)),Z$1);var o,i,a,l,s;}(p,r,o,E);if(0===R.length)return null;var L=i-1;return xt$1(tap([],function(t){for(var e,n=d(R);!(e=n()).done;){var i=e.value,a=i.value,l=a.offset,s=i.start,u=a.size;a.offset<r&&(l+=((s+=Math.floor((r-a.offset)/u))-i.start)*u),s<E&&(l+=(E-s)*u,s=E);for(var m=Math.min(i.end,L),f=s;f<=m&&!(l>=o);f++)t.push({index:f,size:u,offset:l,data:c&&c[f]}),l+=u;}}),h,i,m,u)}),filter(function(t){return null!==t}),distinctUntilChanged()),Tt$1);return connect(pipe(i,filter(function(t){return void 0!==t}),map(function(t){return t.length})),o),connect(pipe(x,map(function(t){return t.topListHeight})),v),connect(v,f),connect(pipe(x,map(function(t){return [t.top,t.bottom]})),m),connect(pipe(x,map(function(t){return t.items})),w),u({listState:x,topItemsIndexes:T,endReached:streamFromEmitter(pipe(x,filter(function(t){return t.items.length>0}),withLatestFrom(o,i),filter(function(t){var e=t[0].items;return e[e.length-1].originalIndex===t[1]-1}),map(function(t){return [t[1]-1,t[2]]}),distinctUntilChanged(gt$1),map(function(t){return t[0]}))),startReached:streamFromEmitter(pipe(x,throttleTime(200),filter(function(t){var e=t.items;return e.length>0&&e[0].originalIndex===t.topItems.length}),map(function(t){return t.items[0].index}),distinctUntilChanged())),rangeChanged:streamFromEmitter(pipe(x,filter(function(t){return t.items.length>0}),map(function(t){var e=t.items;return {startIndex:e[0].index,endIndex:e[e.length-1].index}}),distinctUntilChanged(vt$1))),itemsRendered:w},S)},tup(rt$1,ht$1,Ct$1,mt$1,at$1,ut$1,ct$1,j$1),{singleton:!0}),yt$1=system(function(t){var n=t[0],r=n.sizes,o=n.firstItemIndex,i=n.data,a=t[1].listState,l=t[2].didMount,s=statefulStream(0);return connect(pipe(l,withLatestFrom(s),filter(function(t){return 0!==t[1]}),withLatestFrom(r,o,i),map(function(t){var e=t[0][1],n=t[1],r=t[2],o=t[3],i=void 0===o?[]:o,a=0;if(n.groupIndices.length>0)for(var l,s=d(n.groupIndices);!((l=s()).done||l.value-a>=e);)a++;var u=e+a;return xt$1(Array.from({length:u}).map(function(t,e){return {index:e,size:0,offset:0,data:i[e]}}),[],u,n,r)})),a),{initialItemCount:s}},tup(rt$1,bt$1,ct$1),{singleton:!0}),Et$1=system(function(t){var n=t[0].scrollVelocity,r=statefulStream(!1),o=stream(),i=statefulStream(!1);return connect(pipe(n,withLatestFrom(i,r,o),filter(function(t){return !!t[1]}),map(function(t){var e=t[0],n=t[1],r=t[2],o=t[3],i=n.enter;if(r){if((0, n.exit)(e,o))return !1}else if(i(e,o))return !0;return r}),distinctUntilChanged()),r),subscribe(pipe(combineLatest(r,n,o),withLatestFrom(i)),function(t){var e=t[0],n=t[1];return e[0]&&n&&n.change&&n.change(e[1],e[2])}),{isSeeking:r,scrollSeekConfiguration:i,scrollVelocity:n,scrollSeekRangeChanged:o}},tup(ut$1),{singleton:!0}),Ht$1=system(function(t){var n=t[0].topItemsIndexes,r=statefulStream(0);return connect(pipe(r,filter(function(t){return t>0}),map(function(t){return Array.from({length:t}).map(function(t,e){return e})})),n),{topItemCount:r}},tup(bt$1)),Rt$1=system(function(t){var n=t[0],r=n.footerHeight,o=n.headerHeight,i=n.fixedHeaderHeight,a=t[1].listState,l=stream(),s=statefulStreamFromEmitter(pipe(combineLatest(r,o,i,a),map(function(t){var e=t[3];return t[0]+t[1]+t[2]+e.offsetBottom+e.bottom})),0);return connect(duc(s),l),{totalListHeight:s,totalListHeightChanged:l}},tup(b,bt$1),{singleton:!0});function Lt$1(t){var e,n=!1;return function(){return n||(n=!0,e=t()),e}}var kt$1=Lt$1(function(){return /iP(ad|hone|od).+Version\/[\d.]+.*Safari/i.test(navigator.userAgent)}),zt$1=system(function(t){var n=t[0],r=n.scrollBy,o=n.scrollTop,i=n.deviation,a=n.scrollingInProgress,l=t[1],s=l.isScrolling,u=l.isAtBottom,c=l.scrollDirection,m=t[3],d=m.beforeUnshiftWith,f=m.shiftWithOffset,h=m.sizes,g=t[4].log,v=t[5].recalcInProgress,S=streamFromEmitter(pipe(t[2].listState,withLatestFrom(l.lastJumpDueToItemResize),scan(function(t,e){var n=t[1],r=e[0],o=r.items,i=r.totalCount,a=r.bottom+r.offsetBottom,l=0;return t[2]===i&&n.length>0&&o.length>0&&(0===o[0].originalIndex&&0===n[0].originalIndex||0!=(l=a-t[3])&&(l+=e[1])),[l,o,i,a]},[0,[],0,0]),filter(function(t){return 0!==t[0]}),withLatestFrom(o,c,a,u,g),filter(function(t){return !t[3]&&0!==t[1]&&t[2]===lt$1}),map(function(t){var e=t[0][0];return (0, t[5])("Upward scrolling compensation",{amount:e},p.DEBUG),e})));function I(t){t>0?(publish(r,{top:-t,behavior:"auto"}),publish(i,0)):(publish(i,0),publish(r,{top:-t,behavior:"auto"}));}return subscribe(pipe(S,withLatestFrom(i,s)),function(t){var n=t[0],r=t[1];t[2]&&kt$1()?publish(i,r-n):I(-n);}),subscribe(pipe(combineLatest(statefulStreamFromEmitter(s,!1),i,v),filter(function(t){return !t[0]&&!t[2]&&0!==t[1]}),map(function(t){return t[1]}),throttleTime(1)),I),connect(pipe(f,map(function(t){return {top:-t}})),r),subscribe(pipe(d,withLatestFrom(h),map(function(t){return t[0]*t[1].lastSize})),function(t){publish(i,t),requestAnimationFrame(function(){publish(r,{top:t}),requestAnimationFrame(function(){publish(i,0),publish(v,!1);});});}),{deviation:i}},tup(b,ut$1,bt$1,rt$1,v,j$1)),Bt$1=system(function(t){var n=t[0].totalListHeight,r=t[1].didMount,o=t[2].scrollTo,i=statefulStream(0);return subscribe(pipe(r,withLatestFrom(i),filter(function(t){return 0!==t[1]}),map(function(t){return {top:t[1]}})),function(t){handleNext(pipe(n,filter(function(t){return 0!==t})),function(){setTimeout(function(){publish(o,t);});});}),{initialScrollTop:i}},tup(Rt$1,ct$1,b),{singleton:!0}),Ft$1=system(function(t){var n=t[0].viewportHeight,r=t[1].totalListHeight,o=statefulStream(!1);return {alignToBottom:o,paddingTopAddition:statefulStreamFromEmitter(pipe(combineLatest(o,n,r),filter(function(t){return t[0]}),map(function(t){return Math.max(0,t[1]-t[2])}),distinctUntilChanged()),0)}},tup(b,Rt$1),{singleton:!0}),Pt$1=system(function(t){var n=t[0],r=n.scrollTo,o=n.scrollContainerState,i=stream(),a=stream(),l=stream(),s=statefulStream(!1),c=statefulStream(void 0);return connect(pipe(combineLatest(i,a),map(function(t){var e=t[0],n=e.viewportHeight,r=e.scrollHeight;return {scrollTop:Math.max(0,e.scrollTop-t[1].offsetTop),scrollHeight:r,viewportHeight:n}})),o),connect(pipe(r,withLatestFrom(a),map(function(t){var e=t[0];return u({},e,{top:e.top+t[1].offsetTop})})),l),{useWindowScroll:s,customScrollParent:c,windowScrollContainerState:i,windowViewportRect:a,windowScrollTo:l}},tup(b)),Ot$1=["done","behavior"],Mt$1=system(function(t){var n=t[0],r=n.sizes,o=n.totalCount,i=t[1],a=i.scrollTop,l=i.viewportHeight,s=i.headerHeight,m=i.scrollingInProgress,d=t[2].scrollToIndex,f=stream();return connect(pipe(f,withLatestFrom(r,l,o,s,a),map(function(t){var n=t[0],r=t[1],o=t[2],i=t[3],a=t[4],l=t[5],s=n.done,d=n.behavior,f=c(n,Ot$1),p=null,h=X$1(n,r,i-1),g=Q$1(h,r.offsetTree)+a;return g<l?p=u({},f,{behavior:d,align:"start"}):g+k$1(r.sizeTree,h)[1]>l+o&&(p=u({},f,{behavior:d,align:"end"})),p?s&&handleNext(pipe(m,skip(1),filter(function(t){return !1===t})),s):s&&s(),p}),filter(function(t){return null!==t})),d),{scrollIntoView:f}},tup(rt$1,b,at$1,bt$1,v),{singleton:!0}),Vt$1=["listState","topItemsIndexes"],Ut$1=system(function(t){return u({},t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])},tup(Ct$1,yt$1,ct$1,Et$1,Rt$1,Bt$1,Ft$1,Pt$1,Mt$1)),At$1=system(function(t){var n=t[0],r=n.totalCount,o=n.sizeRanges,i=n.fixedItemSize,a=n.defaultItemSize,l=n.trackItemSizes,s=n.itemSize,m=n.data,d=n.firstItemIndex,f=n.groupIndices,p=n.statefulTotalCount,h=t[1],g=h.initialTopMostItemIndex,v=h.scrolledToInitialItem,S=t[2],I=t[3],C=t[4],T=C.listState,w=C.topItemsIndexes,x=c(C,Vt$1),b=t[5].scrollToIndex,y=t[7].topItemCount,E=t[8].groupCounts,H=t[9],R=t[10];return connect(x.rangeChanged,H.scrollSeekRangeChanged),connect(pipe(H.windowViewportRect,map(function(t){return t.visibleHeight})),S.viewportHeight),u({totalCount:r,data:m,firstItemIndex:d,sizeRanges:o,initialTopMostItemIndex:g,scrolledToInitialItem:v,topItemsIndexes:w,topItemCount:y,groupCounts:E,fixedItemHeight:i,defaultItemHeight:a},I,{statefulTotalCount:p,listState:T,scrollToIndex:b,trackItemSizes:l,itemSize:s,groupIndices:f},x,H,S,R)},tup(rt$1,mt$1,b,ft$1,bt$1,at$1,zt$1,Ht$1,ht$1,Ut$1,v)),Wt$1=Lt$1(function(){if("undefined"==typeof document)return "sticky";var t=document.createElement("div");return t.style.position="-webkit-sticky","-webkit-sticky"===t.style.position?"-webkit-sticky":"sticky"});function Nt$1(t,e){var n=React.useRef(null),r=React.useCallback(function(r){if(null!==r&&r.offsetParent){var o,i,a=r.getBoundingClientRect(),l=a.width;if(e){var s=e.getBoundingClientRect(),u=a.top-s.top;o=s.height-Math.max(0,u),i=u+e.scrollTop;}else o=window.innerHeight-Math.max(0,a.top),i=a.top+window.pageYOffset;n.current={offsetTop:i,visibleHeight:o,visibleWidth:l},t(n.current);}},[t,e]),l=S(r),s=l.callbackRef,u=l.ref,c=React.useCallback(function(){r(u.current);},[r,u]);return React.useEffect(function(){if(e){e.addEventListener("scroll",c);var t=new ResizeObserver(c);return t.observe(e),function(){e.removeEventListener("scroll",c),t.unobserve(e);}}return window.addEventListener("scroll",c),window.addEventListener("resize",c),function(){window.removeEventListener("scroll",c),window.removeEventListener("resize",c);}},[c,e]),s}var Dt$1=["placeholder"],Gt$1=["style","children"],_t$1=["style","children"];function jt$1(t){return t}var Kt$1=system(function(){var t=statefulStream(function(t){return "Item "+t}),n=statefulStream(null),r=statefulStream(function(t){return "Group "+t}),o=statefulStream({}),i=statefulStream(jt$1),a=statefulStream("div"),l=statefulStream(noop),s=function(t,n){return void 0===n&&(n=null),statefulStreamFromEmitter(pipe(o,map(function(e){return e[t]}),distinctUntilChanged()),n)};return {context:n,itemContent:t,groupContent:r,components:o,computeItemKey:i,headerFooterTag:a,scrollerRef:l,FooterComponent:s("Footer"),HeaderComponent:s("Header"),TopItemListComponent:s("TopItemList"),ListComponent:s("List","div"),ItemComponent:s("Item","div"),GroupComponent:s("Group","div"),ScrollerComponent:s("Scroller","div"),EmptyPlaceholder:s("EmptyPlaceholder"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder")}});function Yt$1(t,n){var r=stream();return subscribe(r,function(){return console.warn("react-virtuoso: You are using a deprecated property. "+n,"color: red;","color: inherit;","color: blue;")}),connect(r,t),r}var qt$1=system(function(t){var n=t[0],r=t[1],o={item:Yt$1(r.itemContent,"Rename the %citem%c prop to %citemContent."),group:Yt$1(r.groupContent,"Rename the %cgroup%c prop to %cgroupContent."),topItems:Yt$1(n.topItemCount,"Rename the %ctopItems%c prop to %ctopItemCount."),itemHeight:Yt$1(n.fixedItemHeight,"Rename the %citemHeight%c prop to %cfixedItemHeight."),scrollingStateChange:Yt$1(n.isScrolling,"Rename the %cscrollingStateChange%c prop to %cisScrolling."),adjustForPrependedItems:stream(),maxHeightCacheSize:stream(),footer:stream(),header:stream(),HeaderContainer:stream(),FooterContainer:stream(),ItemContainer:stream(),ScrollContainer:stream(),GroupContainer:stream(),ListContainer:stream(),emptyComponent:stream(),scrollSeek:stream()};function i(t,n,o){connect(pipe(t,withLatestFrom(r.components),map(function(t){var e,r=t[0],i=t[1];return console.warn("react-virtuoso: "+o+" property is deprecated. Pass components."+n+" instead."),u({},i,((e={})[n]=r,e))})),r.components);}return subscribe(o.adjustForPrependedItems,function(){console.warn("react-virtuoso: adjustForPrependedItems is no longer supported. Use the firstItemIndex property instead - https://virtuoso.dev/prepend-items.","color: red;","color: inherit;","color: blue;");}),subscribe(o.maxHeightCacheSize,function(){console.warn("react-virtuoso: maxHeightCacheSize is no longer necessary. Setting it has no effect - remove it from your code.");}),subscribe(o.HeaderContainer,function(){console.warn("react-virtuoso: HeaderContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the header component and pass components.Header to change its contents.");}),subscribe(o.FooterContainer,function(){console.warn("react-virtuoso: FooterContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the footer component and pass components.Footer to change its contents.");}),subscribe(o.scrollSeek,function(t){var o=t.placeholder,i=c(t,Dt$1);console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead."),publish(r.components,u({},getValue(r.components),{ScrollSeekPlaceholder:o})),publish(n.scrollSeekConfiguration,i);}),i(o.footer,"Footer","footer"),i(o.header,"Header","header"),i(o.ItemContainer,"Item","ItemContainer"),i(o.ListContainer,"List","ListContainer"),i(o.ScrollContainer,"Scroller","ScrollContainer"),i(o.emptyComponent,"EmptyPlaceholder","emptyComponent"),i(o.GroupContainer,"Group","GroupContainer"),u({},n,r,o)},tup(At$1,Kt$1)),Zt$1=function(t){return React__namespace.createElement("div",{style:{height:t.height}})},Jt$1={position:Wt$1(),zIndex:1,overflowAnchor:"none"},$t$1={overflowAnchor:"none"},Qt$1=React__namespace.memo(function(t){var r=t.showTopList,o=void 0!==r&&r,i=fe$1("listState"),a=de$1("sizeRanges"),s=fe$1("useWindowScroll"),c=fe$1("customScrollParent"),m=de$1("windowScrollContainerState"),d=de$1("scrollContainerState"),f=c||s?m:d,p=fe$1("itemContent"),h=fe$1("context"),g=fe$1("groupContent"),v=fe$1("trackItemSizes"),S=fe$1("itemSize"),I=fe$1("log"),T=C(a,S,v,o?noop:f,I,c).callbackRef,w=React__namespace.useState(0),x=w[0],b=w[1];pe$1("deviation",function(t){x!==t&&b(t);});var y=fe$1("EmptyPlaceholder"),E=fe$1("ScrollSeekPlaceholder")||Zt$1,H=fe$1("ListComponent"),R=fe$1("ItemComponent"),L=fe$1("GroupComponent"),k=fe$1("computeItemKey"),z=fe$1("isSeeking"),B=fe$1("groupIndices").length>0,F=fe$1("paddingTopAddition"),P=o?{}:{boxSizing:"border-box",paddingTop:i.offsetTop+F,paddingBottom:i.offsetBottom,marginTop:x};return !o&&0===i.totalCount&&y?React.createElement(y,ne$1(y,h)):React.createElement(H,u({},ne$1(H,h),{ref:T,style:P,"data-test-id":o?"virtuoso-top-item-list":"virtuoso-item-list"}),(o?i.topItems:i.items).map(function(t){var e=t.originalIndex,n=k(e+i.firstItemIndex,t.data,h);return z?React.createElement(E,u({},ne$1(E,h),{key:n,index:t.index,height:t.size,type:t.type||"item"},"group"===t.type?{}:{groupIndex:t.groupIndex})):"group"===t.type?React.createElement(L,u({},ne$1(L,h),{key:n,"data-index":e,"data-known-size":t.size,"data-item-index":t.index,style:Jt$1}),g(t.index)):React.createElement(R,u({},ne$1(R,h),{key:n,"data-index":e,"data-known-size":t.size,"data-item-index":t.index,"data-item-group-index":t.groupIndex,style:$t$1}),B?p(t.index,t.groupIndex,t.data,h):p(t.index,t.data,h))}))}),Xt$1={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch",willChange:"transform"},te$1={width:"100%",height:"100%",position:"absolute",top:0},ee$1={width:"100%",position:Wt$1(),top:0};function ne$1(t,e){if("string"!=typeof t)return {context:e}}var re$1=React__namespace.memo(function(){var t=fe$1("HeaderComponent"),e=de$1("headerHeight"),n=fe$1("headerFooterTag"),r=I(function(t){return e(T(t,"height"))}),o=fe$1("context");return t?React.createElement(n,{ref:r},React.createElement(t,ne$1(t,o))):null}),oe$1=React__namespace.memo(function(){var t=fe$1("FooterComponent"),e=de$1("footerHeight"),n=fe$1("headerFooterTag"),r=I(function(t){return e(T(t,"height"))}),o=fe$1("context");return t?React.createElement(n,{ref:r},React.createElement(t,ne$1(t,o))):null});function ie$1(t){var e=t.usePublisher,r=t.useEmitter,o=t.useEmitterValue;return React__namespace.memo(function(t){var n=t.style,i=t.children,a=c(t,Gt$1),s=e("scrollContainerState"),m=o("ScrollerComponent"),d=e("smoothScrollTargetReached"),f=o("scrollerRef"),p=o("context"),h=x(s,d,m,f),g=h.scrollerRef,v=h.scrollByCallback;return r("scrollTo",h.scrollToCallback),r("scrollBy",v),React.createElement(m,u({ref:g,style:u({},Xt$1,n),"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0},a,ne$1(m,p)),i)})}function ae$1(t){var r=t.usePublisher,o=t.useEmitter,i=t.useEmitterValue;return React__namespace.memo(function(t){var n=t.style,a=t.children,s=c(t,_t$1),m=r("windowScrollContainerState"),d=i("ScrollerComponent"),f=r("smoothScrollTargetReached"),p=i("totalListHeight"),g=i("deviation"),v=i("customScrollParent"),S=i("context"),I=x(m,f,d,noop,v),C=I.scrollerRef,T=I.scrollByCallback,w=I.scrollToCallback;return h(function(){return C.current=v||window,function(){C.current=null;}},[C,v]),o("windowScrollTo",w),o("scrollBy",T),React.createElement(d,u({style:u({position:"relative"},n,0!==p?{height:p+g}:{}),"data-virtuoso-scroller":!0},s,ne$1(d,S)),a)})}var le$1=function(t){var r=t.children,o=de$1("viewportHeight"),i=I(compose(o,function(t){return T(t,"height")}));return React__namespace.createElement("div",{style:te$1,ref:i,"data-viewport-type":"element"},r)},se$1=function(t){var e=t.children,r=Nt$1(de$1("windowViewportRect"),fe$1("customScrollParent"));return React__namespace.createElement("div",{ref:r,style:te$1,"data-viewport-type":"window"},e)},ue$1=function(t){var e=t.children,n=fe$1("TopItemListComponent"),r=fe$1("headerHeight"),o=u({},ee$1,{marginTop:r+"px"}),i=fe$1("context");return React.createElement(n||"div",{style:o,context:i},e)},ce$1=systemToComponent(qt$1,{required:{},optional:{context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",react18ConcurrentRendering:"react18ConcurrentRendering",item:"item",group:"group",topItems:"topItems",itemHeight:"itemHeight",scrollingStateChange:"scrollingStateChange",maxHeightCacheSize:"maxHeightCacheSize",footer:"footer",header:"header",ItemContainer:"ItemContainer",ScrollContainer:"ScrollContainer",ListContainer:"ListContainer",GroupContainer:"GroupContainer",emptyComponent:"emptyComponent",HeaderContainer:"HeaderContainer",FooterContainer:"FooterContainer",scrollSeek:"scrollSeek"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",adjustForPrependedItems:"adjustForPrependedItems"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},React__namespace.memo(function(t){var e=fe$1("useWindowScroll"),r=fe$1("topItemsIndexes").length>0,o=fe$1("customScrollParent"),i=o||e?se$1:le$1;return React__namespace.createElement(o||e?ge$1:he$1,u({},t),React__namespace.createElement(i,null,React__namespace.createElement(re$1,null),React__namespace.createElement(Qt$1,null),React__namespace.createElement(oe$1,null)),r&&React__namespace.createElement(ue$1,null,React__namespace.createElement(Qt$1,{showTopList:!0})))})),me$1=ce$1.Component,de$1=ce$1.usePublisher,fe$1=ce$1.useEmitterValue,pe$1=ce$1.useEmitter,he$1=ie$1({usePublisher:de$1,useEmitterValue:fe$1,useEmitter:pe$1}),ge$1=ae$1({usePublisher:de$1,useEmitterValue:fe$1,useEmitter:pe$1}),ve$1={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},Se$1={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},Ie$1=Math.round,Ce$1=Math.ceil,Te$1=Math.floor,we$1=Math.min,xe$1=Math.max;function be$1(t,e){return Array.from({length:e-t+1}).map(function(e,n){return {index:n+t}})}var ye$1=system(function(t){var n=t[0],r=n.overscan,o=n.visibleRange,i=n.listBoundary,a=t[1],l=a.scrollTop,s=a.viewportHeight,c=a.scrollBy,m=a.scrollTo,d=a.smoothScrollTargetReached,f=a.scrollContainerState,p=t[2],h=t[3],g=t[4],v=g.propsReady,S=g.didMount,I=t[5],C=I.windowViewportRect,T=I.windowScrollTo,w=I.useWindowScroll,x=I.customScrollParent,b=I.windowScrollContainerState,y=statefulStream(0),E=statefulStream(0),H=statefulStream(ve$1),R=statefulStream({height:0,width:0}),L=statefulStream({height:0,width:0}),k=stream(),z=stream(),B=statefulStream(0);connect(pipe(S,withLatestFrom(E),filter(function(t){return 0!==t[1]}),map(function(t){return {items:be$1(0,t[1]-1),top:0,bottom:0,offsetBottom:0,offsetTop:0,itemHeight:0,itemWidth:0}})),H),connect(pipe(combineLatest(duc(y),o,duc(L,function(t,e){return t&&t.width===e.width&&t.height===e.height})),withLatestFrom(R),map(function(t){var e=t[0],n=e[0],r=e[1],o=r[0],i=r[1],a=e[2],l=t[1],s=a.height,u=a.width,c=l.width;if(0===n||0===c)return ve$1;if(0===u)return Se$1;var m=Re$1(c,u),d=m*Te$1(o/s),f=m*Ce$1(i/s)-1;f=xe$1(0,we$1(n-1,f));var p=be$1(d=we$1(f,xe$1(0,d)),f),h=Ee$1(l,a,p),g=h.top,v=h.bottom;return {items:p,offsetTop:g,offsetBottom:Ce$1(n/m)*s-v,top:g,bottom:v,itemHeight:s,itemWidth:u}})),H),connect(pipe(R,map(function(t){return t.height})),s),connect(pipe(combineLatest(R,L,H),map(function(t){var e=Ee$1(t[0],t[1],t[2].items);return [e.top,e.bottom]}),distinctUntilChanged(gt$1)),i);var F=streamFromEmitter(pipe(duc(H),filter(function(t){return t.items.length>0}),withLatestFrom(y),filter(function(t){var e=t[0].items;return e[e.length-1].index===t[1]-1}),map(function(t){return t[1]-1}),distinctUntilChanged())),P=streamFromEmitter(pipe(duc(H),filter(function(t){var e=t.items;return e.length>0&&0===e[0].index}),mapTo(0),distinctUntilChanged())),O=streamFromEmitter(pipe(duc(H),filter(function(t){return t.items.length>0}),map(function(t){var e=t.items;return {startIndex:e[0].index,endIndex:e[e.length-1].index}}),distinctUntilChanged(vt$1)));connect(O,h.scrollSeekRangeChanged),connect(pipe(k,withLatestFrom(R,L,y),map(function(t){var e=t[1],n=t[2],r=t[3],o=it$1(t[0]),i=o.align,a=o.behavior,l=o.offset,s=o.index;"LAST"===s&&(s=r-1);var u=He$1(e,n,s=xe$1(0,s,we$1(r-1,s)));return "end"===i?u=Ie$1(u-e.height+n.height):"center"===i&&(u=Ie$1(u-e.height/2+n.height/2)),l&&(u+=l),{top:u,behavior:a}})),m);var M=statefulStreamFromEmitter(pipe(H,map(function(t){return t.offsetBottom+t.bottom})),0);return connect(pipe(C,map(function(t){return {width:t.visibleWidth,height:t.visibleHeight}})),R),u({totalCount:y,viewportDimensions:R,itemDimensions:L,scrollTop:l,scrollHeight:z,overscan:r,scrollBy:c,scrollTo:m,scrollToIndex:k,smoothScrollTargetReached:d,windowViewportRect:C,windowScrollTo:T,useWindowScroll:w,customScrollParent:x,windowScrollContainerState:b,deviation:B,scrollContainerState:f,initialItemCount:E},h,{gridState:H,totalListHeight:M},p,{startReached:P,endReached:F,rangeChanged:O,propsReady:v})},tup(Ct$1,b,ut$1,Et$1,ct$1,Pt$1));function Ee$1(t,e,n){var r=e.height;return void 0===r||0===n.length?{top:0,bottom:0}:{top:He$1(t,e,n[0].index),bottom:He$1(t,e,n[n.length-1].index)+r}}function He$1(t,e,n){var r=Re$1(t.width,e.width);return Te$1(n/r)*e.height}function Re$1(t,e){return xe$1(1,Te$1(t/e))}var Le$1=["placeholder"],ke$1=system(function(){var t=statefulStream(function(t){return "Item "+t}),n=statefulStream({}),r=statefulStream(null),o=statefulStream("virtuoso-grid-item"),i=statefulStream("virtuoso-grid-list"),a=statefulStream(jt$1),l=statefulStream(noop),s=function(t,r){return void 0===r&&(r=null),statefulStreamFromEmitter(pipe(n,map(function(e){return e[t]}),distinctUntilChanged()),r)};return {context:r,itemContent:t,components:n,computeItemKey:a,itemClassName:o,listClassName:i,scrollerRef:l,ListComponent:s("List","div"),ItemComponent:s("Item","div"),ScrollerComponent:s("Scroller","div"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder","div")}}),ze$1=system(function(t){var n=t[0],r=t[1],o={item:Yt$1(r.itemContent,"Rename the %citem%c prop to %citemContent."),ItemContainer:stream(),ScrollContainer:stream(),ListContainer:stream(),emptyComponent:stream(),scrollSeek:stream()};function i(t,n,o){connect(pipe(t,withLatestFrom(r.components),map(function(t){var e,r=t[0],i=t[1];return console.warn("react-virtuoso: "+o+" property is deprecated. Pass components."+n+" instead."),u({},i,((e={})[n]=r,e))})),r.components);}return subscribe(o.scrollSeek,function(t){var o=t.placeholder,i=c(t,Le$1);console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead."),publish(r.components,u({},getValue(r.components),{ScrollSeekPlaceholder:o})),publish(n.scrollSeekConfiguration,i);}),i(o.ItemContainer,"Item","ItemContainer"),i(o.ListContainer,"List","ListContainer"),i(o.ScrollContainer,"Scroller","ScrollContainer"),u({},n,r,o)},tup(ye$1,ke$1)),Be$1=React__namespace.memo(function(){var t=Ue$1("gridState"),e=Ue$1("listClassName"),n=Ue$1("itemClassName"),r=Ue$1("itemContent"),o=Ue$1("computeItemKey"),i=Ue$1("isSeeking"),a=Ve$1("scrollHeight"),s=Ue$1("ItemComponent"),c=Ue$1("ListComponent"),m=Ue$1("ScrollSeekPlaceholder"),d=Ue$1("context"),f=Ve$1("itemDimensions"),p=I(function(t){a(t.parentElement.parentElement.scrollHeight);var e=t.firstChild;e&&f(e.getBoundingClientRect());});return React.createElement(c,u({ref:p,className:e},ne$1(c,d),{style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom}}),t.items.map(function(e){var a=o(e.index);return i?React.createElement(m,u({key:a},ne$1(m,d),{index:e.index,height:t.itemHeight,width:t.itemWidth})):React.createElement(s,u({},ne$1(s,d),{className:n,"data-index":e.index,key:a}),r(e.index,d))}))}),Fe$1=function(t){var e=t.children,r=Ve$1("viewportDimensions"),o=I(function(t){r(t.getBoundingClientRect());});return React__namespace.createElement("div",{style:te$1,ref:o},e)},Pe$1=function(t){var e=t.children,r=Nt$1(Ve$1("windowViewportRect"),Ue$1("customScrollParent"));return React__namespace.createElement("div",{ref:r,style:te$1},e)},Oe$1=systemToComponent(ze$1,{optional:{totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",item:"item",ItemContainer:"ItemContainer",ScrollContainer:"ScrollContainer",ListContainer:"ListContainer",scrollSeek:"scrollSeek"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange"}},React__namespace.memo(function(t){var e=u({},t),r=Ue$1("useWindowScroll"),o=Ue$1("customScrollParent"),i=o||r?Pe$1:Fe$1;return React__namespace.createElement(o||r?Ne$1:We$1,u({},e),React__namespace.createElement(i,null,React__namespace.createElement(Be$1,null)))})),Ve$1=Oe$1.usePublisher,Ue$1=Oe$1.useEmitterValue,Ae$1=Oe$1.useEmitter,We$1=ie$1({usePublisher:Ve$1,useEmitterValue:Ue$1,useEmitter:Ae$1}),Ne$1=ae$1({usePublisher:Ve$1,useEmitterValue:Ue$1,useEmitter:Ae$1}),De$1=system(function(){var t=statefulStream(function(t){return React__namespace.createElement("td",null,"Item $",t)}),r=statefulStream(null),o=statefulStream(null),i=statefulStream({}),a=statefulStream(jt$1),l=statefulStream(noop),s=function(t,n){return void 0===n&&(n=null),statefulStreamFromEmitter(pipe(i,map(function(e){return e[t]}),distinctUntilChanged()),n)};return {context:r,itemContent:t,fixedHeaderContent:o,components:i,computeItemKey:a,scrollerRef:l,TableComponent:s("Table","table"),TableHeadComponent:s("TableHead","thead"),TableBodyComponent:s("TableBody","tbody"),TableRowComponent:s("TableRow","tr"),ScrollerComponent:s("Scroller","div"),EmptyPlaceholder:s("EmptyPlaceholder"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),FillerRow:s("FillerRow")}}),Ge$1=system(function(t){return u({},t[0],t[1])},tup(At$1,De$1)),_e$1=function(t){return React__namespace.createElement("tr",null,React__namespace.createElement("td",{style:{height:t.height}}))},je$1=function(t){return React__namespace.createElement("tr",null,React__namespace.createElement("td",{style:{height:t.height,padding:0,border:0}}))},Ke$1=React__namespace.memo(function(){var t=Qe$1("listState"),e=$e("sizeRanges"),r=Qe$1("useWindowScroll"),o=Qe$1("customScrollParent"),i=$e("windowScrollContainerState"),a=$e("scrollContainerState"),s=o||r?i:a,c=Qe$1("itemContent"),m=Qe$1("trackItemSizes"),d=C(e,Qe$1("itemSize"),m,s,Qe$1("log"),o),f=d.callbackRef,p=d.ref,h=React__namespace.useState(0),g=h[0],v=h[1];Xe$1("deviation",function(t){g!==t&&(p.current.style.marginTop=t+"px",v(t));});var S=Qe$1("EmptyPlaceholder"),I=Qe$1("ScrollSeekPlaceholder")||_e$1,T=Qe$1("FillerRow")||je$1,w=Qe$1("TableBodyComponent"),x=Qe$1("TableRowComponent"),b=Qe$1("computeItemKey"),y=Qe$1("isSeeking"),E=Qe$1("paddingTopAddition"),H=Qe$1("firstItemIndex"),R=Qe$1("statefulTotalCount"),L=Qe$1("context");if(0===R&&S)return React.createElement(S,ne$1(S,L));var k=t.offsetTop+E+g,z=t.offsetBottom,B=k>0?React__namespace.createElement(T,{height:k,key:"padding-top"}):null,F=z>0?React__namespace.createElement(T,{height:z,key:"padding-bottom"}):null,P=t.items.map(function(t){var e=t.originalIndex,n=b(e+H,t.data,L);return y?React.createElement(I,u({},ne$1(I,L),{key:n,index:t.index,height:t.size,type:t.type||"item"})):React.createElement(x,u({},ne$1(x,L),{key:n,"data-index":e,"data-known-size":t.size,"data-item-index":t.index,style:{overflowAnchor:"none"}}),c(t.index,t.data,L))});return React.createElement(w,u({ref:f,"data-test-id":"virtuoso-item-list"},ne$1(w,L)),[B].concat(P,[F]))}),Ye$1=function(t){var r=t.children,o=$e("viewportHeight"),i=I(compose(o,function(t){return T(t,"height")}));return React__namespace.createElement("div",{style:te$1,ref:i,"data-viewport-type":"element"},r)},qe$1=function(t){var e=t.children,r=Nt$1($e("windowViewportRect"),Qe$1("customScrollParent"));return React__namespace.createElement("div",{ref:r,style:te$1,"data-viewport-type":"window"},e)},Ze$1=systemToComponent(Ge$1,{required:{},optional:{context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",react18ConcurrentRendering:"react18ConcurrentRendering"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},React__namespace.memo(function(t){var r=Qe$1("useWindowScroll"),o=Qe$1("customScrollParent"),i=$e("fixedHeaderHeight"),a=Qe$1("fixedHeaderContent"),l=Qe$1("context"),s=I(compose(i,function(t){return T(t,"height")})),c=o||r?en$1:tn$1,m=o||r?qe$1:Ye$1,d=Qe$1("TableComponent"),f=Qe$1("TableHeadComponent"),p=a?React__namespace.createElement(f,u({key:"TableHead",style:{zIndex:1,position:"sticky",top:0},ref:s},ne$1(f,l)),a()):null;return React__namespace.createElement(c,u({},t),React__namespace.createElement(m,null,React__namespace.createElement(d,u({style:{borderSpacing:0}},ne$1(d,l)),[p,React__namespace.createElement(Ke$1,{key:"TableBody"})])))})),$e=Ze$1.usePublisher,Qe$1=Ze$1.useEmitterValue,Xe$1=Ze$1.useEmitter,tn$1=ie$1({usePublisher:$e,useEmitterValue:Qe$1,useEmitter:Xe$1}),en$1=ae$1({usePublisher:$e,useEmitterValue:Qe$1,useEmitter:Xe$1}),nn$1=me$1;
48240
+ window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};function u(){return u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);}return t},u.apply(this,arguments)}function c(t,e){if(null==t)return {};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)e.indexOf(n=i[r])>=0||(o[n]=t[n]);return o}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function d(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return (n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return m(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return "Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[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.")}var f,p,h="undefined"!=typeof document?React.useLayoutEffect:React.useEffect;!function(t){t[t.DEBUG=0]="DEBUG",t[t.INFO=1]="INFO",t[t.WARN=2]="WARN",t[t.ERROR=3]="ERROR";}(p||(p={}));var g=((f={})[p.DEBUG]="debug",f[p.INFO]="log",f[p.WARN]="warn",f[p.ERROR]="error",f),v=system(function(){var t=statefulStream(p.ERROR);return {log:statefulStream(function(n,r,o){var i;void 0===o&&(o=p.INFO),o>=(null!=(i=("undefined"==typeof globalThis?window:globalThis).VIRTUOSO_LOG_LEVEL)?i:getValue(t))&&console[g[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r);}),logLevel:t}},[],{singleton:!0});function S(t,e){void 0===e&&(e=!0);var n=React.useRef(null),r=function(t){};if("undefined"!=typeof ResizeObserver){var o=new ResizeObserver(function(e){var n=e[0].target;null!==n.offsetParent&&t(n);});r=function(t){t&&e?(o.observe(t),n.current=t):(n.current&&o.unobserve(n.current),n.current=null);};}return {ref:n,callbackRef:r}}function I(t,e){return void 0===e&&(e=!0),S(t,e).callbackRef}function C(t,e,n,r,o,i,a){return S(function(n){for(var l=function(t,e,n,r){var o=t.length;if(0===o)return null;for(var i=[],a=0;a<o;a++){var l=t.item(a);if(l&&void 0!==l.dataset.index){var s=parseInt(l.dataset.index),u=parseFloat(l.dataset.knownSize),c=e(l,"offsetHeight");if(0===c&&r("Zero-sized element, this should not happen",{child:l},p.ERROR),c!==u){var m=i[i.length-1];0===i.length||m.size!==c||m.endIndex!==s-1?i.push({startIndex:s,endIndex:s,size:c}):i[i.length-1].endIndex++;}}}return i}(n.children,e,0,o),s=n.parentElement;!s.dataset.virtuosoScroller;)s=s.parentElement;var u=a?a.scrollTop:"window"===s.firstElementChild.dataset.viewportType?window.pageYOffset||document.documentElement.scrollTop:s.scrollTop;r({scrollTop:Math.max(u,0),scrollHeight:(null!=a?a:s).scrollHeight,viewportHeight:(null!=a?a:s).offsetHeight}),null==i||i(function(t,e,n){return "normal"===e||e.endsWith("px")||n("row-gap was not resolved to pixel value correctly",e,p.WARN),"normal"===e?0:parseInt(e,10)}(0,getComputedStyle(n).rowGap,o)),null!==l&&t(l);},n)}function T(t,e){return Math.round(t.getBoundingClientRect()[e])}function w(t,e){return Math.abs(t-e)<1.01}function x(t,n,r,l,u){void 0===l&&(l=noop);var c=React.useRef(null),m=React.useRef(null),d=React.useRef(null),f=React.useRef(!1),p=React.useCallback(function(e){var r=e.target,o=r===window||r===document,i=o?window.pageYOffset||document.documentElement.scrollTop:r.scrollTop,a=o?document.documentElement.scrollHeight:r.scrollHeight,l=o?window.innerHeight:r.offsetHeight,u=function(){t({scrollTop:Math.max(i,0),scrollHeight:a,viewportHeight:l});};f.current?reactDom.flushSync(u):u(),f.current=!1,null!==m.current&&(i===m.current||i<=0||i===a-l)&&(m.current=null,n(!0),d.current&&(clearTimeout(d.current),d.current=null));},[t,n]);return React.useEffect(function(){var t=u||c.current;return l(u||c.current),p({target:t}),t.addEventListener("scroll",p,{passive:!0}),function(){l(null),t.removeEventListener("scroll",p);}},[c,p,r,l,u]),{scrollerRef:c,scrollByCallback:function(t){f.current=!0,c.current.scrollBy(t);},scrollToCallback:function(e){var r=c.current;if(r&&(!("offsetHeight"in r)||0!==r.offsetHeight)){var o,i,a,l="smooth"===e.behavior;if(r===window?(i=Math.max(T(document.documentElement,"height"),document.documentElement.scrollHeight),o=window.innerHeight,a=document.documentElement.scrollTop):(i=r.scrollHeight,o=T(r,"height"),a=r.scrollTop),e.top=Math.ceil(Math.max(Math.min(i-o,e.top),0)),w(o,i)||e.top===a)return t({scrollTop:a,scrollHeight:i,viewportHeight:o}),void(l&&n(!0));l?(m.current=e.top,d.current&&clearTimeout(d.current),d.current=setTimeout(function(){d.current=null,m.current=null,n(!0);},1e3)):m.current=null,r.scrollTo(e);}}}}var b=system(function(){var t=stream(),n=stream(),r=statefulStream(0),o=stream(),i=statefulStream(0),a=stream(),l=stream(),s=statefulStream(0),u=statefulStream(0),c=statefulStream(0),m=stream(),d=stream(),f=statefulStream(!1),p=statefulStream(!1);return connect(pipe(t,map(function(t){return t.scrollTop})),n),connect(pipe(t,map(function(t){return t.scrollHeight})),l),connect(n,i),{scrollContainerState:t,scrollTop:n,viewportHeight:a,headerHeight:s,fixedHeaderHeight:u,footerHeight:c,scrollHeight:l,smoothScrollTargetReached:o,react18ConcurrentRendering:p,scrollTo:m,scrollBy:d,statefulScrollTop:i,deviation:r,scrollingInProgress:f}},[],{singleton:!0}),y={lvl:0};function E(t,e,n,r,o){return void 0===r&&(r=y),void 0===o&&(o=y),{k:t,v:e,lvl:n,l:r,r:o}}function H$1(t){return t===y}function R$1(){return y}function L$1(t,e){if(H$1(t))return y;var n=t.k,r=t.l,o=t.r;if(e===n){if(H$1(r))return o;if(H$1(o))return r;var i=P$1(r);return U$1(M$1(t,{k:i[0],v:i[1],l:O$1(r)}))}return U$1(M$1(t,e<n?{l:L$1(r,e)}:{r:L$1(o,e)}))}function k$1(t,e,n){if(void 0===n&&(n="k"),H$1(t))return [-Infinity,void 0];if(t[n]===e)return [t.k,t.v];if(t[n]<e){var r=k$1(t.r,e,n);return -Infinity===r[0]?[t.k,t.v]:r}return k$1(t.l,e,n)}function z$1(t,e,n){return H$1(t)?E(e,n,1):e===t.k?M$1(t,{k:e,v:n}):function(t){return N$1(D$1(t))}(M$1(t,e<t.k?{l:z$1(t.l,e,n)}:{r:z$1(t.r,e,n)}))}function B$1(t,e,n){if(H$1(t))return [];var r=t.k,o=t.v,i=t.r,a=[];return r>e&&(a=a.concat(B$1(t.l,e,n))),r>=e&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(B$1(i,e,n))),a}function F$1(t){return H$1(t)?[]:[].concat(F$1(t.l),[{k:t.k,v:t.v}],F$1(t.r))}function P$1(t){return H$1(t.r)?[t.k,t.v]:P$1(t.r)}function O$1(t){return H$1(t.r)?t.l:U$1(M$1(t,{r:O$1(t.r)}))}function M$1(t,e){return E(void 0!==e.k?e.k:t.k,void 0!==e.v?e.v:t.v,void 0!==e.lvl?e.lvl:t.lvl,void 0!==e.l?e.l:t.l,void 0!==e.r?e.r:t.r)}function V$1(t){return H$1(t)||t.lvl>t.r.lvl}function U$1(t){var e=t.l,n=t.r,r=t.lvl;if(n.lvl>=r-1&&e.lvl>=r-1)return t;if(r>n.lvl+1){if(V$1(e))return D$1(M$1(t,{lvl:r-1}));if(H$1(e)||H$1(e.r))throw new Error("Unexpected empty nodes");return M$1(e.r,{l:M$1(e,{r:e.r.l}),r:M$1(t,{l:e.r.r,lvl:r-1}),lvl:r})}if(V$1(t))return N$1(M$1(t,{lvl:r-1}));if(H$1(n)||H$1(n.l))throw new Error("Unexpected empty nodes");var o=n.l,i=V$1(o)?n.lvl-1:n.lvl;return M$1(o,{l:M$1(t,{r:o.l,lvl:r-1}),r:N$1(M$1(n,{l:o.r,lvl:i})),lvl:o.lvl+1})}function A$1(t,e,n){return H$1(t)?[]:W$1(B$1(t,k$1(t,e)[0],n),function(t){return {index:t.k,value:t.v}})}function W$1(t,e){var n=t.length;if(0===n)return [];for(var r=e(t[0]),o=r.index,i=r.value,a=[],l=1;l<n;l++){var s=e(t[l]),u=s.index,c=s.value;a.push({start:o,end:u-1,value:i}),o=u,i=c;}return a.push({start:o,end:Infinity,value:i}),a}function N$1(t){var e=t.r,n=t.lvl;return H$1(e)||H$1(e.r)||e.lvl!==n||e.r.lvl!==n?t:M$1(e,{l:M$1(t,{r:e.l}),lvl:n+1})}function D$1(t){var e=t.l;return H$1(e)||e.lvl!==t.lvl?t:M$1(e,{r:M$1(t,{l:e.r})})}function G$1(t,e,n,r){void 0===r&&(r=0);for(var o=t.length-1;r<=o;){var i=Math.floor((r+o)/2),a=n(t[i],e);if(0===a)return i;if(-1===a){if(o-r<2)return i-1;o=i-1;}else {if(o===r)return i;r=i+1;}}throw new Error("Failed binary finding record in array - "+t.join(",")+", searched for "+e)}function _$1(t,e,n){return t[G$1(t,e,n)]}var j$1=system(function(){return {recalcInProgress:statefulStream(!1)}},[],{singleton:!0});function K$1(t){var e=t.size,n=t.startIndex,r=t.endIndex;return function(t){return t.start===n&&(t.end===r||Infinity===t.end)&&t.value===e}}function Y$1(t,e){var n=t.index;return e===n?0:e<n?-1:1}function q$1(t,e){var n=t.offset;return e===n?0:e<n?-1:1}function Z$1(t){return {index:t.index,value:t}}function J$1(t,e,n,r){var o=t,i=0,a=0,l=0,s=0;if(0!==e){l=o[s=G$1(o,e-1,Y$1)].offset;var u=k$1(n,e-1);i=u[0],a=u[1],o.length&&o[s].size===k$1(n,e)[1]&&(s-=1),o=o.slice(0,s+1);}else o=[];for(var c,m=d(A$1(n,e,Infinity));!(c=m()).done;){var f=c.value,p=f.start,h=f.value,g=p-i,v=g*a+l+g*r;o.push({offset:v,size:h,index:p}),i=p,l=v,a=h;}return {offsetTree:o,lastIndex:i,lastOffset:l,lastSize:a}}function $$1(t,e){var n=e[0],r=e[1],o=e[3];n.length>0&&(0, e[2])("received item sizes",n,p.DEBUG);var i=t.sizeTree,a=i,l=0;if(r.length>0&&H$1(i)&&2===n.length){var s=n[0].size,u=n[1].size;a=r.reduce(function(t,e){return z$1(z$1(t,e,s),e+1,u)},a);}else {var c=function(t,e){for(var n,r=H$1(t)?0:Infinity,o=d(e);!(n=o()).done;){var i=n.value,a=i.size,l=i.startIndex,s=i.endIndex;if(r=Math.min(r,l),H$1(t))t=z$1(t,0,a);else {var u=A$1(t,l-1,s+1);if(!u.some(K$1(i))){for(var c,m=!1,f=!1,p=d(u);!(c=p()).done;){var h=c.value,g=h.start,v=h.end,S=h.value;m?(s>=g||a===S)&&(t=L$1(t,g)):(f=S!==a,m=!0),v>s&&s>=g&&S!==a&&(t=z$1(t,s+1,S));}f&&(t=z$1(t,l,a));}}}return [t,r]}(a,n);a=c[0],l=c[1];}if(a===i)return t;var m=J$1(t.offsetTree,l,a,o),f=m.offsetTree;return {sizeTree:a,offsetTree:f,lastIndex:m.lastIndex,lastOffset:m.lastOffset,lastSize:m.lastSize,groupOffsetTree:r.reduce(function(t,e){return z$1(t,e,Q$1(e,f,o))},R$1()),groupIndices:r}}function Q$1(t,e,n){if(0===e.length)return 0;var r=_$1(e,t,Y$1),o=t-r.index,i=r.size*o+(o-1)*n+r.offset;return i>0?i+n:i}function X$1(t,e,n){if(function(t){return void 0!==t.groupIndex}(t))return e.groupIndices[t.groupIndex]+1;var r=tt$1("LAST"===t.index?n:t.index,e);return Math.max(0,r,Math.min(n,r))}function tt$1(t,e){if(!et$1(e))return t;for(var n=0;e.groupIndices[n]<=t+n;)n++;return t+n}function et$1(t){return !H$1(t.groupOffsetTree)}var nt$1={offsetHeight:"height",offsetWidth:"width"},rt$1=system(function(t){var n=t[0].log,r=t[1].recalcInProgress,o=stream(),i=stream(),a=statefulStreamFromEmitter(i,0),l=stream(),s=stream(),c=statefulStream(0),m=statefulStream([]),d=statefulStream(void 0),f=statefulStream(void 0),h=statefulStream(function(t,e){return T(t,nt$1[e])}),g=statefulStream(void 0),v=statefulStream(0),S={offsetTree:[],sizeTree:R$1(),groupOffsetTree:R$1(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]},I=statefulStreamFromEmitter(pipe(o,withLatestFrom(m,n,v),scan($$1,S),distinctUntilChanged()),S);connect(pipe(m,filter(function(t){return t.length>0}),withLatestFrom(I,v),map(function(t){var e=t[0],n=t[1],r=t[2],o=e.reduce(function(t,e,o){return z$1(t,e,Q$1(e,n.offsetTree,r)||o)},R$1());return u({},n,{groupIndices:e,groupOffsetTree:o})})),I),connect(pipe(i,withLatestFrom(I),filter(function(t){return t[0]<t[1].lastIndex}),map(function(t){var e=t[1];return [{startIndex:t[0],endIndex:e.lastIndex,size:e.lastSize}]})),o),connect(d,f);var C=statefulStreamFromEmitter(pipe(d,map(function(t){return void 0===t})),!0);connect(pipe(f,filter(function(t){return void 0!==t&&H$1(getValue(I).sizeTree)}),map(function(t){return [{startIndex:0,endIndex:0,size:t}]})),o);var w=streamFromEmitter(pipe(o,withLatestFrom(I),scan(function(t,e){var n=e[1];return {changed:n!==t.sizes,sizes:n}},{changed:!1,sizes:S}),map(function(t){return t.changed})));subscribe(pipe(c,scan(function(t,e){return {diff:t.prev-e,prev:e}},{diff:0,prev:0}),map(function(t){return t.diff})),function(t){t>0?(publish(r,!0),publish(l,t)):t<0&&publish(s,t);}),subscribe(pipe(c,withLatestFrom(n)),function(t){t[0]<0&&(0, t[1])("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:c},p.ERROR);});var x=streamFromEmitter(l);connect(pipe(l,withLatestFrom(I),map(function(t){var e=t[0],n=t[1];if(n.groupIndices.length>0)throw new Error("Virtuoso: prepending items does not work with groups");return F$1(n.sizeTree).reduce(function(t,n){var r=n.k,o=n.v;return {ranges:[].concat(t.ranges,[{startIndex:t.prevIndex,endIndex:r+e-1,size:t.prevSize}]),prevIndex:r+e,prevSize:o}},{ranges:[],prevIndex:0,prevSize:n.lastSize}).ranges})),o);var b=streamFromEmitter(pipe(s,withLatestFrom(I,v),map(function(t){return Q$1(-t[0],t[1].offsetTree,t[2])})));return connect(pipe(s,withLatestFrom(I,v),map(function(t){var e=t[0],n=t[1],r=t[2];if(n.groupIndices.length>0)throw new Error("Virtuoso: shifting items does not work with groups");var o=F$1(n.sizeTree).reduce(function(t,n){var r=n.v;return z$1(t,Math.max(0,n.k+e),r)},R$1());return u({},n,{sizeTree:o},J$1(n.offsetTree,0,o,r))})),I),{data:g,totalCount:i,sizeRanges:o,groupIndices:m,defaultItemSize:f,fixedItemSize:d,unshiftWith:l,shiftWith:s,shiftWithOffset:b,beforeUnshiftWith:x,firstItemIndex:c,gap:v,sizes:I,listRefresh:w,statefulTotalCount:a,trackItemSizes:C,itemSize:h}},tup(v,j$1),{singleton:!0}),ot$1="undefined"!=typeof document&&"scrollBehavior"in document.documentElement.style;function it$1(t){var e="number"==typeof t?{index:t}:t;return e.align||(e.align="start"),e.behavior&&ot$1||(e.behavior="auto"),e.offset||(e.offset=0),e}var at$1=system(function(t){var n=t[0],r=n.sizes,o=n.totalCount,i=n.listRefresh,a=n.gap,l=t[1],s=l.scrollingInProgress,u=l.viewportHeight,c=l.scrollTo,m=l.smoothScrollTargetReached,d=l.headerHeight,f=l.footerHeight,h=t[2].log,g=stream(),v=statefulStream(0),S=null,I=null,C=null;function T(){S&&(S(),S=null),C&&(C(),C=null),I&&(clearTimeout(I),I=null),publish(s,!1);}return connect(pipe(g,withLatestFrom(r,u,o,v,d,f,h),withLatestFrom(a),map(function(t){var n=t[0],r=n[0],o=n[1],a=n[2],l=n[3],u=n[4],c=n[5],d=n[6],f=n[7],h=t[1],v=it$1(r),w=v.align,x=v.behavior,b=v.offset,y=l-1,E=X$1(v,o,y),H=Q$1(E,o.offsetTree,h)+c;"end"===w?(H=H-a+k$1(o.sizeTree,E)[1],E===y&&(H+=d)):"center"===w?H=H-a/2+k$1(o.sizeTree,E)[1]/2:H-=u,b&&(H+=b);var R=function(t){T(),t?(f("retrying to scroll to",{location:r},p.DEBUG),publish(g,r)):f("list did not change, scroll successful",{},p.DEBUG);};if(T(),"smooth"===x){var L=!1;C=subscribe(i,function(t){L=L||t;}),S=handleNext(m,function(){R(L);});}else S=handleNext(pipe(i,function(t){var e=setTimeout(function(){t(!1);},150);return function(n){n&&(t(!0),clearTimeout(e));}}),R);return I=setTimeout(function(){T();},1200),publish(s,!0),f("scrolling from index to",{index:E,top:H,behavior:x},p.DEBUG),{top:H,behavior:x}})),c),{scrollToIndex:g,topListHeight:v}},tup(rt$1,b,v),{singleton:!0}),lt$1="up",st$1={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},ut$1=system(function(t){var n=t[0],r=n.scrollContainerState,o=n.scrollTop,i=n.viewportHeight,a=n.headerHeight,l=n.footerHeight,s=n.scrollBy,u=statefulStream(!1),c=statefulStream(!0),m=stream(),d=stream(),f=statefulStream(4),p=statefulStream(0),h=statefulStreamFromEmitter(pipe(merge(pipe(duc(o),skip(1),mapTo(!0)),pipe(duc(o),skip(1),mapTo(!1),debounceTime(100))),distinctUntilChanged()),!1),g=statefulStreamFromEmitter(pipe(merge(pipe(s,mapTo(!0)),pipe(s,mapTo(!1),debounceTime(200))),distinctUntilChanged()),!1);connect(pipe(combineLatest(duc(o),duc(p)),map(function(t){return t[0]<=t[1]}),distinctUntilChanged()),c),connect(pipe(c,throttleTime(50)),d);var v=streamFromEmitter(pipe(combineLatest(r,duc(i),duc(a),duc(l),duc(f)),scan(function(t,e){var n,r,o=e[0],i=o.scrollTop,a=o.scrollHeight,l=e[1],s={viewportHeight:l,scrollTop:i,scrollHeight:a};return i+l-a>-e[4]?(i>t.state.scrollTop?(n="SCROLLED_DOWN",r=t.state.scrollTop-i):(n="SIZE_DECREASED",r=t.state.scrollTop-i||t.scrollTopDelta),{atBottom:!0,state:s,atBottomBecause:n,scrollTopDelta:r}):{atBottom:!1,notAtBottomBecause:s.scrollHeight>t.state.scrollHeight?"SIZE_INCREASED":l<t.state.viewportHeight?"VIEWPORT_HEIGHT_DECREASING":i<t.state.scrollTop?"SCROLLING_UPWARDS":"NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",state:s}},st$1),distinctUntilChanged(function(t,e){return t&&t.atBottom===e.atBottom}))),S=statefulStreamFromEmitter(pipe(r,scan(function(t,e){var n=e.scrollTop,r=e.scrollHeight,o=e.viewportHeight;return w(t.scrollHeight,r)?{scrollTop:n,scrollHeight:r,jump:0,changed:!1}:t.scrollTop!==n&&r-(n+o)<1?{scrollHeight:r,scrollTop:n,jump:t.scrollTop-n,changed:!0}:{scrollHeight:r,scrollTop:n,jump:0,changed:!0}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),filter(function(t){return t.changed}),map(function(t){return t.jump})),0);connect(pipe(v,map(function(t){return t.atBottom})),u),connect(pipe(u,throttleTime(50)),m);var I=statefulStream("down");connect(pipe(r,map(function(t){return t.scrollTop}),distinctUntilChanged(),scan(function(t,n){return getValue(g)?{direction:t.direction,prevScrollTop:n}:{direction:n<t.prevScrollTop?lt$1:"down",prevScrollTop:n}},{direction:"down",prevScrollTop:0}),map(function(t){return t.direction})),I),connect(pipe(r,throttleTime(50),mapTo("none")),I);var C=statefulStream(0);return connect(pipe(h,filter(function(t){return !t}),mapTo(0)),C),connect(pipe(o,throttleTime(100),withLatestFrom(h),filter(function(t){return !!t[1]}),scan(function(t,e){return [t[1],e[0]]},[0,0]),map(function(t){return t[1]-t[0]})),C),{isScrolling:h,isAtTop:c,isAtBottom:u,atBottomState:v,atTopStateChange:d,atBottomStateChange:m,scrollDirection:I,atBottomThreshold:f,atTopThreshold:p,scrollVelocity:C,lastJumpDueToItemResize:S}},tup(b)),ct$1=system(function(t){var n=t[0].log,r=statefulStream(!1),o=streamFromEmitter(pipe(r,filter(function(t){return t}),distinctUntilChanged()));return subscribe(r,function(t){t&&getValue(n)("props updated",{},p.DEBUG);}),{propsReady:r,didMount:o}},tup(v),{singleton:!0}),mt$1=system(function(t){var n=t[0],r=n.sizes,o=n.listRefresh,i=n.defaultItemSize,a=t[1].scrollTop,l=t[2].scrollToIndex,s=t[3].didMount,u=statefulStream(!0),c=statefulStream(0);return connect(pipe(s,withLatestFrom(c),filter(function(t){return !!t[1]}),mapTo(!1)),u),subscribe(pipe(combineLatest(o,s),withLatestFrom(u,r,i),filter(function(t){var e=t[1],n=t[3];return t[0][1]&&(!H$1(t[2].sizeTree)||void 0!==n)&&!e}),withLatestFrom(c)),function(t){var n=t[1];setTimeout(function(){handleNext(a,function(){publish(u,!0);}),publish(l,n);});}),{scrolledToInitialItem:u,initialTopMostItemIndex:c}},tup(rt$1,b,at$1,ct$1),{singleton:!0});function dt$1(t){return !!t&&("smooth"===t?"smooth":"auto")}var ft$1=system(function(t){var n=t[0],r=n.totalCount,o=n.listRefresh,i=t[1],a=i.isAtBottom,l=i.atBottomState,s=t[2].scrollToIndex,u=t[3].scrolledToInitialItem,c=t[4],m=c.propsReady,d=c.didMount,f=t[5].log,h=t[6].scrollingInProgress,g=statefulStream(!1),v=stream(),S=null;function I(t){publish(s,{index:"LAST",align:"end",behavior:t});}function C(t){var n=handleNext(l,function(n){!t||n.atBottom||"SIZE_INCREASED"!==n.notAtBottomBecause||S||(getValue(f)("scrolling to bottom due to increased size",{},p.DEBUG),I("auto"));});setTimeout(n,100);}return subscribe(pipe(combineLatest(pipe(duc(r),skip(1)),d),withLatestFrom(duc(g),a,u,h),map(function(t){var e=t[0],n=e[0],r=e[1]&&t[3],o="auto";return r&&(o=function(t,e){return "function"==typeof t?dt$1(t(e)):e&&dt$1(t)}(t[1],t[2]||t[4]),r=r&&!!o),{totalCount:n,shouldFollow:r,followOutputBehavior:o}}),filter(function(t){return t.shouldFollow})),function(t){var n=t.totalCount,r=t.followOutputBehavior;S&&(S(),S=null),S=handleNext(o,function(){getValue(f)("following output to ",{totalCount:n},p.DEBUG),I(r),S=null;});}),subscribe(pipe(combineLatest(duc(g),r,m),filter(function(t){return t[0]&&t[2]}),scan(function(t,e){var n=e[1];return {refreshed:t.value===n,value:n}},{refreshed:!1,value:0}),filter(function(t){return t.refreshed}),withLatestFrom(g,r)),function(t){C(!1!==t[1]);}),subscribe(v,function(){C(!1!==getValue(g));}),subscribe(combineLatest(duc(g),l),function(t){var e=t[1];t[0]&&!e.atBottom&&"VIEWPORT_HEIGHT_DECREASING"===e.notAtBottomBecause&&I("auto");}),{followOutput:g,autoscrollToBottom:v}},tup(rt$1,ut$1,at$1,mt$1,ct$1,v,b));function pt$1(t){return t.reduce(function(t,e){return t.groupIndices.push(t.totalCount),t.totalCount+=e+1,t},{totalCount:0,groupIndices:[]})}var ht$1=system(function(t){var n=t[0],r=n.totalCount,o=n.groupIndices,i=n.sizes,a=t[1],l=a.scrollTop,s=a.headerHeight,u=stream(),c=stream(),m=streamFromEmitter(pipe(u,map(pt$1)));return connect(pipe(m,map(function(t){return t.totalCount})),r),connect(pipe(m,map(function(t){return t.groupIndices})),o),connect(pipe(combineLatest(l,i,s),filter(function(t){return et$1(t[1])}),map(function(t){return k$1(t[1].groupOffsetTree,Math.max(t[0]-t[2],0),"v")[0]}),distinctUntilChanged(),map(function(t){return [t]})),c),{groupCounts:u,topItemsIndexes:c}},tup(rt$1,b));function gt$1(t,e){return !(!t||t[0]!==e[0]||t[1]!==e[1])}function vt$1(t,e){return !(!t||t.startIndex!==e.startIndex||t.endIndex!==e.endIndex)}function St$1(t,e,n){return "number"==typeof t?n===lt$1&&"top"===e||"down"===n&&"bottom"===e?t:0:n===lt$1?"top"===e?t.main:t.reverse:"bottom"===e?t.main:t.reverse}function It$1(t,e){return "number"==typeof t?t:t[e]||0}var Ct$1=system(function(t){var n=t[0],r=n.scrollTop,o=n.viewportHeight,i=n.deviation,a=n.headerHeight,l=n.fixedHeaderHeight,s=stream(),u=statefulStream(0),c=statefulStream(0),m=statefulStream(0),d=statefulStreamFromEmitter(pipe(combineLatest(duc(r),duc(o),duc(a),duc(s,gt$1),duc(m),duc(u),duc(l),duc(i),duc(c)),map(function(t){var e=t[0],n=t[1],r=t[2],o=t[3],i=o[0],a=o[1],l=t[4],s=t[6],u=t[7],c=t[8],m=e-u,d=t[5]+s,f=Math.max(r-m,0),p="none",h=It$1(c,"top"),g=It$1(c,"bottom");return i-=u,a+=r+s,(i+=r+s)>e+d-h&&(p=lt$1),(a-=u)<e-f+n+g&&(p="down"),"none"!==p?[Math.max(m-r-St$1(l,"top",p)-h,0),m-f-s+n+St$1(l,"bottom",p)+g]:null}),filter(function(t){return null!=t}),distinctUntilChanged(gt$1)),[0,0]);return {listBoundary:s,overscan:m,topListHeight:u,increaseViewportBy:c,visibleRange:d}},tup(b),{singleton:!0}),Tt$1={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function wt$1(t,e,n){if(0===t.length)return [];if(!et$1(e))return t.map(function(t){return u({},t,{index:t.index+n,originalIndex:t.index})});for(var r,o=[],i=A$1(e.groupOffsetTree,t[0].index,t[t.length-1].index),a=void 0,l=0,s=d(t);!(r=s()).done;){var c=r.value;(!a||a.end<c.index)&&(a=i.shift(),l=e.groupIndices.indexOf(a.start)),o.push(u({},c.index===a.start?{type:"group",index:l}:{index:c.index-(l+1)+n,groupIndex:l},{size:c.size,offset:c.offset,originalIndex:c.index,data:c.data}));}return o}function xt$1(t,e,n,r,o,i){var a=0,l=0;if(t.length>0){a=t[0].offset;var s=t[t.length-1];l=s.offset+s.size;}var u=n-o.lastIndex,c=a,m=o.lastOffset+u*o.lastSize+(u-1)*r-l;return {items:wt$1(t,o,i),topItems:wt$1(e,o,i),topListHeight:e.reduce(function(t,e){return e.size+t},0),offsetTop:a,offsetBottom:m,top:c,bottom:l,totalCount:n,firstItemIndex:i}}var bt$1=system(function(t){var n=t[0],r=n.sizes,o=n.totalCount,i=n.data,a=n.firstItemIndex,l=n.gap,s=t[1],c=t[2],m=c.visibleRange,f=c.listBoundary,p=c.topListHeight,h=t[3],g=h.scrolledToInitialItem,v=h.initialTopMostItemIndex,S=t[4].topListHeight,I=t[5],C=t[6].didMount,T=t[7].recalcInProgress,w=statefulStream([]),x=stream();connect(s.topItemsIndexes,w);var b=statefulStreamFromEmitter(pipe(combineLatest(C,T,duc(m,gt$1),duc(o),duc(r),duc(v),g,duc(w),duc(a),duc(l),i),filter(function(t){return t[0]&&!t[1]}),map(function(t){var n=t[2],r=n[0],o=n[1],i=t[3],a=t[5],l=t[6],s=t[7],u=t[8],c=t[9],m=t[10],f=t[4],p=f.sizeTree,h=f.offsetTree;if(0===i||0===r&&0===o)return Tt$1;if(H$1(p))return xt$1(function(t,e,n){if(et$1(e)){var r=tt$1(t,e);return [{index:k$1(e.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return [{index:t,size:0,offset:0,data:n&&n[0]}]}(function(t,e){return "number"==typeof t?t:"LAST"===t.index?e-1:t.index}(a,i),f,m),[],i,c,f,u);var g=[];if(s.length>0)for(var v,S=s[0],I=s[s.length-1],C=0,T=d(A$1(p,S,I));!(v=T()).done;)for(var w=v.value,x=w.value,b=Math.max(w.start,S),y=Math.min(w.end,I),E=b;E<=y;E++)g.push({index:E,size:x,offset:C,data:m&&m[E]}),C+=x;if(!l)return xt$1([],g,i,c,f,u);var R=s.length>0?s[s.length-1]+1:0,L=function(t,e,n,r){return void 0===r&&(r=0),r>0&&(e=Math.max(e,_$1(t,r,Y$1).offset)),W$1((i=n,l=G$1(o=t,e,a=q$1),s=G$1(o,i,a,l),o.slice(l,s+1)),Z$1);var o,i,a,l,s;}(h,r,o,R);if(0===L.length)return null;var z=i-1;return xt$1(tap([],function(t){for(var e,n=d(L);!(e=n()).done;){var i=e.value,a=i.value,l=a.offset,s=i.start,u=a.size;if(a.offset<r){var f=(s+=Math.floor((r-a.offset+c)/(u+c)))-i.start;l+=f*u+f*c;}s<R&&(l+=(R-s)*u,s=R);for(var p=Math.min(i.end,z),h=s;h<=p&&!(l>=o);h++)t.push({index:h,size:u,offset:l,data:m&&m[h]}),l+=u+c;}}),g,i,c,f,u)}),filter(function(t){return null!==t}),distinctUntilChanged()),Tt$1);return connect(pipe(i,filter(function(t){return void 0!==t}),map(function(t){return t.length})),o),connect(pipe(b,map(function(t){return t.topListHeight})),S),connect(S,p),connect(pipe(b,map(function(t){return [t.top,t.bottom]})),f),connect(pipe(b,map(function(t){return t.items})),x),u({listState:b,topItemsIndexes:w,endReached:streamFromEmitter(pipe(b,filter(function(t){return t.items.length>0}),withLatestFrom(o,i),filter(function(t){var e=t[0].items;return e[e.length-1].originalIndex===t[1]-1}),map(function(t){return [t[1]-1,t[2]]}),distinctUntilChanged(gt$1),map(function(t){return t[0]}))),startReached:streamFromEmitter(pipe(b,throttleTime(200),filter(function(t){var e=t.items;return e.length>0&&e[0].originalIndex===t.topItems.length}),map(function(t){return t.items[0].index}),distinctUntilChanged())),rangeChanged:streamFromEmitter(pipe(b,filter(function(t){return t.items.length>0}),map(function(t){for(var e=t.items,n=0,r=e.length-1;"group"===e[n].type&&n<r;)n++;for(;"group"===e[r].type&&r>n;)r--;return {startIndex:e[n].index,endIndex:e[r].index}}),distinctUntilChanged(vt$1))),itemsRendered:x},I)},tup(rt$1,ht$1,Ct$1,mt$1,at$1,ut$1,ct$1,j$1),{singleton:!0}),yt$1=system(function(t){var n=t[0],r=n.sizes,o=n.firstItemIndex,i=n.data,a=n.gap,l=t[1].listState,s=t[2].didMount,u=statefulStream(0);return connect(pipe(s,withLatestFrom(u),filter(function(t){return 0!==t[1]}),withLatestFrom(r,o,a,i),map(function(t){var e=t[0][1],n=t[1],r=t[2],o=t[3],i=t[4],a=void 0===i?[]:i,l=0;if(n.groupIndices.length>0)for(var s,u=d(n.groupIndices);!((s=u()).done||s.value-l>=e);)l++;var c=e+l;return xt$1(Array.from({length:c}).map(function(t,e){return {index:e,size:0,offset:0,data:a[e]}}),[],c,o,n,r)})),l),{initialItemCount:u}},tup(rt$1,bt$1,ct$1),{singleton:!0}),Et$1=system(function(t){var n=t[0].scrollVelocity,r=statefulStream(!1),o=stream(),i=statefulStream(!1);return connect(pipe(n,withLatestFrom(i,r,o),filter(function(t){return !!t[1]}),map(function(t){var e=t[0],n=t[1],r=t[2],o=t[3],i=n.enter;if(r){if((0, n.exit)(e,o))return !1}else if(i(e,o))return !0;return r}),distinctUntilChanged()),r),subscribe(pipe(combineLatest(r,n,o),withLatestFrom(i)),function(t){var e=t[0],n=t[1];return e[0]&&n&&n.change&&n.change(e[1],e[2])}),{isSeeking:r,scrollSeekConfiguration:i,scrollVelocity:n,scrollSeekRangeChanged:o}},tup(ut$1),{singleton:!0}),Ht$1=system(function(t){var n=t[0].topItemsIndexes,r=statefulStream(0);return connect(pipe(r,filter(function(t){return t>0}),map(function(t){return Array.from({length:t}).map(function(t,e){return e})})),n),{topItemCount:r}},tup(bt$1)),Rt$1=system(function(t){var n=t[0],r=n.footerHeight,o=n.headerHeight,i=n.fixedHeaderHeight,a=t[1].listState,l=stream(),s=statefulStreamFromEmitter(pipe(combineLatest(r,o,i,a),map(function(t){var e=t[3];return t[0]+t[1]+t[2]+e.offsetBottom+e.bottom})),0);return connect(duc(s),l),{totalListHeight:s,totalListHeightChanged:l}},tup(b,bt$1),{singleton:!0});function Lt$1(t){var e,n=!1;return function(){return n||(n=!0,e=t()),e}}var kt$1=Lt$1(function(){return /iP(ad|hone|od).+Version\/[\d.]+.*Safari/i.test(navigator.userAgent)}),zt$1=system(function(t){var n=t[0],r=n.scrollBy,o=n.scrollTop,i=n.deviation,a=n.scrollingInProgress,l=t[1],s=l.isScrolling,u=l.isAtBottom,c=l.scrollDirection,m=t[3],d=m.beforeUnshiftWith,f=m.shiftWithOffset,h=m.sizes,g=m.gap,v=t[4].log,S=t[5].recalcInProgress,I=streamFromEmitter(pipe(t[2].listState,withLatestFrom(l.lastJumpDueToItemResize),scan(function(t,e){var n=t[1],r=e[0],o=r.items,i=r.totalCount,a=r.bottom+r.offsetBottom,l=0;return t[2]===i&&n.length>0&&o.length>0&&(0===o[0].originalIndex&&0===n[0].originalIndex||0!=(l=a-t[3])&&(l+=e[1])),[l,o,i,a]},[0,[],0,0]),filter(function(t){return 0!==t[0]}),withLatestFrom(o,c,a,u,v),filter(function(t){return !t[3]&&0!==t[1]&&t[2]===lt$1}),map(function(t){var e=t[0][0];return (0, t[5])("Upward scrolling compensation",{amount:e},p.DEBUG),e})));function C(t){t>0?(publish(r,{top:-t,behavior:"auto"}),publish(i,0)):(publish(i,0),publish(r,{top:-t,behavior:"auto"}));}return subscribe(pipe(I,withLatestFrom(i,s)),function(t){var n=t[0],r=t[1];t[2]&&kt$1()?publish(i,r-n):C(-n);}),subscribe(pipe(combineLatest(statefulStreamFromEmitter(s,!1),i,S),filter(function(t){return !t[0]&&!t[2]&&0!==t[1]}),map(function(t){return t[1]}),throttleTime(1)),C),connect(pipe(f,map(function(t){return {top:-t}})),r),subscribe(pipe(d,withLatestFrom(h,g),map(function(t){var e=t[0];return e*t[1].lastSize+e*t[2]})),function(t){publish(i,t),requestAnimationFrame(function(){publish(r,{top:t}),requestAnimationFrame(function(){publish(i,0),publish(S,!1);});});}),{deviation:i}},tup(b,ut$1,bt$1,rt$1,v,j$1)),Bt$1=system(function(t){var n=t[0].totalListHeight,r=t[1].didMount,o=t[2].scrollTo,i=statefulStream(0);return subscribe(pipe(r,withLatestFrom(i),filter(function(t){return 0!==t[1]}),map(function(t){return {top:t[1]}})),function(t){handleNext(pipe(n,filter(function(t){return 0!==t})),function(){setTimeout(function(){publish(o,t);});});}),{initialScrollTop:i}},tup(Rt$1,ct$1,b),{singleton:!0}),Ft$1=system(function(t){var n=t[0].viewportHeight,r=t[1].totalListHeight,o=statefulStream(!1);return {alignToBottom:o,paddingTopAddition:statefulStreamFromEmitter(pipe(combineLatest(o,n,r),filter(function(t){return t[0]}),map(function(t){return Math.max(0,t[1]-t[2])}),distinctUntilChanged()),0)}},tup(b,Rt$1),{singleton:!0}),Pt$1=system(function(t){var n=t[0],r=n.scrollTo,o=n.scrollContainerState,i=stream(),a=stream(),l=stream(),s=statefulStream(!1),c=statefulStream(void 0);return connect(pipe(combineLatest(i,a),map(function(t){var e=t[0],n=e.viewportHeight,r=e.scrollHeight;return {scrollTop:Math.max(0,e.scrollTop-t[1].offsetTop),scrollHeight:r,viewportHeight:n}})),o),connect(pipe(r,withLatestFrom(a),map(function(t){var e=t[0];return u({},e,{top:e.top+t[1].offsetTop})})),l),{useWindowScroll:s,customScrollParent:c,windowScrollContainerState:i,windowViewportRect:a,windowScrollTo:l}},tup(b)),Ot$1=["done","behavior"],Mt$1=system(function(t){var n=t[0],r=n.sizes,o=n.totalCount,i=n.gap,a=t[1],l=a.scrollTop,s=a.viewportHeight,m=a.headerHeight,d=a.scrollingInProgress,f=t[2].scrollToIndex,p=stream();return connect(pipe(p,withLatestFrom(r,s,o,m,l,i),map(function(t){var n=t[0],r=t[1],o=t[2],i=t[3],a=t[4],l=t[5],s=t[6],m=n.done,f=n.behavior,p=c(n,Ot$1),h=null,g=X$1(n,r,i-1),v=Q$1(g,r.offsetTree,s)+a;return v<l?h=u({},p,{behavior:f,align:"start"}):v+k$1(r.sizeTree,g)[1]>l+o&&(h=u({},p,{behavior:f,align:"end"})),h?m&&handleNext(pipe(d,skip(1),filter(function(t){return !1===t})),m):m&&m(),h}),filter(function(t){return null!==t})),f),{scrollIntoView:p}},tup(rt$1,b,at$1,bt$1,v),{singleton:!0}),Vt$1=["listState","topItemsIndexes"],Ut$1=system(function(t){return u({},t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])},tup(Ct$1,yt$1,ct$1,Et$1,Rt$1,Bt$1,Ft$1,Pt$1,Mt$1)),At$1=system(function(t){var n=t[0],r=n.totalCount,o=n.sizeRanges,i=n.fixedItemSize,a=n.defaultItemSize,l=n.trackItemSizes,s=n.itemSize,m=n.data,d=n.firstItemIndex,f=n.groupIndices,p=n.statefulTotalCount,h=n.gap,g=t[1],v=g.initialTopMostItemIndex,S=g.scrolledToInitialItem,I=t[2],C=t[3],T=t[4],w=T.listState,x=T.topItemsIndexes,b=c(T,Vt$1),y=t[5].scrollToIndex,E=t[7].topItemCount,H=t[8].groupCounts,R=t[9],L=t[10];return connect(b.rangeChanged,R.scrollSeekRangeChanged),connect(pipe(R.windowViewportRect,map(function(t){return t.visibleHeight})),I.viewportHeight),u({totalCount:r,data:m,firstItemIndex:d,sizeRanges:o,initialTopMostItemIndex:v,scrolledToInitialItem:S,topItemsIndexes:x,topItemCount:E,groupCounts:H,fixedItemHeight:i,defaultItemHeight:a,gap:h},C,{statefulTotalCount:p,listState:w,scrollToIndex:y,trackItemSizes:l,itemSize:s,groupIndices:f},b,R,I,L)},tup(rt$1,mt$1,b,ft$1,bt$1,at$1,zt$1,Ht$1,ht$1,Ut$1,v)),Wt$1=Lt$1(function(){if("undefined"==typeof document)return "sticky";var t=document.createElement("div");return t.style.position="-webkit-sticky","-webkit-sticky"===t.style.position?"-webkit-sticky":"sticky"});function Nt$1(t,e){var n=React.useRef(null),r=React.useCallback(function(r){if(null!==r&&r.offsetParent){var o,i,a=r.getBoundingClientRect(),l=a.width;if(e){var s=e.getBoundingClientRect(),u=a.top-s.top;o=s.height-Math.max(0,u),i=u+e.scrollTop;}else o=window.innerHeight-Math.max(0,a.top),i=a.top+window.pageYOffset;n.current={offsetTop:i,visibleHeight:o,visibleWidth:l},t(n.current);}},[t,e]),l=S(r),s=l.callbackRef,u=l.ref,c=React.useCallback(function(){r(u.current);},[r,u]);return React.useEffect(function(){if(e){e.addEventListener("scroll",c);var t=new ResizeObserver(c);return t.observe(e),function(){e.removeEventListener("scroll",c),t.unobserve(e);}}return window.addEventListener("scroll",c),window.addEventListener("resize",c),function(){window.removeEventListener("scroll",c),window.removeEventListener("resize",c);}},[c,e]),s}var Dt$1=["placeholder"],Gt$1=["style","children"],_t$1=["style","children"];function jt$1(t){return t}var Kt$1=system(function(){var t=statefulStream(function(t){return "Item "+t}),n=statefulStream(null),r=statefulStream(function(t){return "Group "+t}),o=statefulStream({}),i=statefulStream(jt$1),a=statefulStream("div"),l=statefulStream(noop),s=function(t,n){return void 0===n&&(n=null),statefulStreamFromEmitter(pipe(o,map(function(e){return e[t]}),distinctUntilChanged()),n)};return {context:n,itemContent:t,groupContent:r,components:o,computeItemKey:i,headerFooterTag:a,scrollerRef:l,FooterComponent:s("Footer"),HeaderComponent:s("Header"),TopItemListComponent:s("TopItemList"),ListComponent:s("List","div"),ItemComponent:s("Item","div"),GroupComponent:s("Group","div"),ScrollerComponent:s("Scroller","div"),EmptyPlaceholder:s("EmptyPlaceholder"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder")}});function Yt$1(t,n){var r=stream();return subscribe(r,function(){return console.warn("react-virtuoso: You are using a deprecated property. "+n,"color: red;","color: inherit;","color: blue;")}),connect(r,t),r}var qt$1=system(function(t){var n=t[0],r=t[1],o={item:Yt$1(r.itemContent,"Rename the %citem%c prop to %citemContent."),group:Yt$1(r.groupContent,"Rename the %cgroup%c prop to %cgroupContent."),topItems:Yt$1(n.topItemCount,"Rename the %ctopItems%c prop to %ctopItemCount."),itemHeight:Yt$1(n.fixedItemHeight,"Rename the %citemHeight%c prop to %cfixedItemHeight."),scrollingStateChange:Yt$1(n.isScrolling,"Rename the %cscrollingStateChange%c prop to %cisScrolling."),adjustForPrependedItems:stream(),maxHeightCacheSize:stream(),footer:stream(),header:stream(),HeaderContainer:stream(),FooterContainer:stream(),ItemContainer:stream(),ScrollContainer:stream(),GroupContainer:stream(),ListContainer:stream(),emptyComponent:stream(),scrollSeek:stream()};function i(t,n,o){connect(pipe(t,withLatestFrom(r.components),map(function(t){var e,r=t[0],i=t[1];return console.warn("react-virtuoso: "+o+" property is deprecated. Pass components."+n+" instead."),u({},i,((e={})[n]=r,e))})),r.components);}return subscribe(o.adjustForPrependedItems,function(){console.warn("react-virtuoso: adjustForPrependedItems is no longer supported. Use the firstItemIndex property instead - https://virtuoso.dev/prepend-items.","color: red;","color: inherit;","color: blue;");}),subscribe(o.maxHeightCacheSize,function(){console.warn("react-virtuoso: maxHeightCacheSize is no longer necessary. Setting it has no effect - remove it from your code.");}),subscribe(o.HeaderContainer,function(){console.warn("react-virtuoso: HeaderContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the header component and pass components.Header to change its contents.");}),subscribe(o.FooterContainer,function(){console.warn("react-virtuoso: FooterContainer is deprecated. Use headerFooterTag if you want to change the wrapper of the footer component and pass components.Footer to change its contents.");}),subscribe(o.scrollSeek,function(t){var o=t.placeholder,i=c(t,Dt$1);console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead."),publish(r.components,u({},getValue(r.components),{ScrollSeekPlaceholder:o})),publish(n.scrollSeekConfiguration,i);}),i(o.footer,"Footer","footer"),i(o.header,"Header","header"),i(o.ItemContainer,"Item","ItemContainer"),i(o.ListContainer,"List","ListContainer"),i(o.ScrollContainer,"Scroller","ScrollContainer"),i(o.emptyComponent,"EmptyPlaceholder","emptyComponent"),i(o.GroupContainer,"Group","GroupContainer"),u({},n,r,o)},tup(At$1,Kt$1)),Zt$1=function(t){return React__namespace.createElement("div",{style:{height:t.height}})},Jt$1={position:Wt$1(),zIndex:1,overflowAnchor:"none"},$t$1={overflowAnchor:"none"},Qt$1=React__namespace.memo(function(t){var r=t.showTopList,o=void 0!==r&&r,i=fe$1("listState"),a=de$1("sizeRanges"),s=fe$1("useWindowScroll"),c=fe$1("customScrollParent"),m=de$1("windowScrollContainerState"),d=de$1("scrollContainerState"),f=c||s?m:d,p=fe$1("itemContent"),h=fe$1("context"),g=fe$1("groupContent"),v=fe$1("trackItemSizes"),S=fe$1("itemSize"),I=fe$1("log"),T=de$1("gap"),w=C(a,S,v,o?noop:f,I,T,c).callbackRef,x=React__namespace.useState(0),b=x[0],y=x[1];pe$1("deviation",function(t){b!==t&&y(t);});var E=fe$1("EmptyPlaceholder"),H=fe$1("ScrollSeekPlaceholder")||Zt$1,R=fe$1("ListComponent"),L=fe$1("ItemComponent"),k=fe$1("GroupComponent"),z=fe$1("computeItemKey"),B=fe$1("isSeeking"),F=fe$1("groupIndices").length>0,P=fe$1("paddingTopAddition"),O=o?{}:{boxSizing:"border-box",paddingTop:i.offsetTop+P,paddingBottom:i.offsetBottom,marginTop:b};return !o&&0===i.totalCount&&E?React.createElement(E,ne$1(E,h)):React.createElement(R,u({},ne$1(R,h),{ref:w,style:O,"data-test-id":o?"virtuoso-top-item-list":"virtuoso-item-list"}),(o?i.topItems:i.items).map(function(t){var e=t.originalIndex,n=z(e+i.firstItemIndex,t.data,h);return B?React.createElement(H,u({},ne$1(H,h),{key:n,index:t.index,height:t.size,type:t.type||"item"},"group"===t.type?{}:{groupIndex:t.groupIndex})):"group"===t.type?React.createElement(k,u({},ne$1(k,h),{key:n,"data-index":e,"data-known-size":t.size,"data-item-index":t.index,style:Jt$1}),g(t.index)):React.createElement(L,u({},ne$1(L,h),{key:n,"data-index":e,"data-known-size":t.size,"data-item-index":t.index,"data-item-group-index":t.groupIndex,style:$t$1}),F?p(t.index,t.groupIndex,t.data,h):p(t.index,t.data,h))}))}),Xt$1={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},te$1={width:"100%",height:"100%",position:"absolute",top:0},ee$1={width:"100%",position:Wt$1(),top:0};function ne$1(t,e){if("string"!=typeof t)return {context:e}}var re$1=React__namespace.memo(function(){var t=fe$1("HeaderComponent"),e=de$1("headerHeight"),n=fe$1("headerFooterTag"),r=I(function(t){return e(T(t,"height"))}),o=fe$1("context");return t?React.createElement(n,{ref:r},React.createElement(t,ne$1(t,o))):null}),oe$1=React__namespace.memo(function(){var t=fe$1("FooterComponent"),e=de$1("footerHeight"),n=fe$1("headerFooterTag"),r=I(function(t){return e(T(t,"height"))}),o=fe$1("context");return t?React.createElement(n,{ref:r},React.createElement(t,ne$1(t,o))):null});function ie$1(t){var e=t.usePublisher,r=t.useEmitter,o=t.useEmitterValue;return React__namespace.memo(function(t){var n=t.style,i=t.children,a=c(t,Gt$1),s=e("scrollContainerState"),m=o("ScrollerComponent"),d=e("smoothScrollTargetReached"),f=o("scrollerRef"),p=o("context"),h=x(s,d,m,f),g=h.scrollerRef,v=h.scrollByCallback;return r("scrollTo",h.scrollToCallback),r("scrollBy",v),React.createElement(m,u({ref:g,style:u({},Xt$1,n),"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0},a,ne$1(m,p)),i)})}function ae$1(t){var r=t.usePublisher,o=t.useEmitter,i=t.useEmitterValue;return React__namespace.memo(function(t){var n=t.style,a=t.children,s=c(t,_t$1),m=r("windowScrollContainerState"),d=i("ScrollerComponent"),f=r("smoothScrollTargetReached"),p=i("totalListHeight"),g=i("deviation"),v=i("customScrollParent"),S=i("context"),I=x(m,f,d,noop,v),C=I.scrollerRef,T=I.scrollByCallback,w=I.scrollToCallback;return h(function(){return C.current=v||window,function(){C.current=null;}},[C,v]),o("windowScrollTo",w),o("scrollBy",T),React.createElement(d,u({style:u({position:"relative"},n,0!==p?{height:p+g}:{}),"data-virtuoso-scroller":!0},s,ne$1(d,S)),a)})}var le$1=function(t){var r=t.children,o=de$1("viewportHeight"),i=I(compose(o,function(t){return T(t,"height")}));return React__namespace.createElement("div",{style:te$1,ref:i,"data-viewport-type":"element"},r)},se$1=function(t){var e=t.children,r=Nt$1(de$1("windowViewportRect"),fe$1("customScrollParent"));return React__namespace.createElement("div",{ref:r,style:te$1,"data-viewport-type":"window"},e)},ue$1=function(t){var e=t.children,n=fe$1("TopItemListComponent"),r=fe$1("headerHeight"),o=u({},ee$1,{marginTop:r+"px"}),i=fe$1("context");return React.createElement(n||"div",{style:o,context:i},e)},ce$1=systemToComponent(qt$1,{required:{},optional:{context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",react18ConcurrentRendering:"react18ConcurrentRendering",item:"item",group:"group",topItems:"topItems",itemHeight:"itemHeight",scrollingStateChange:"scrollingStateChange",maxHeightCacheSize:"maxHeightCacheSize",footer:"footer",header:"header",ItemContainer:"ItemContainer",ScrollContainer:"ScrollContainer",ListContainer:"ListContainer",GroupContainer:"GroupContainer",emptyComponent:"emptyComponent",HeaderContainer:"HeaderContainer",FooterContainer:"FooterContainer",scrollSeek:"scrollSeek"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",adjustForPrependedItems:"adjustForPrependedItems",autoscrollToBottom:"autoscrollToBottom"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},React__namespace.memo(function(t){var e=fe$1("useWindowScroll"),r=fe$1("topItemsIndexes").length>0,o=fe$1("customScrollParent"),i=o||e?se$1:le$1;return React__namespace.createElement(o||e?ge$1:he$1,u({},t),React__namespace.createElement(i,null,React__namespace.createElement(re$1,null),React__namespace.createElement(Qt$1,null),React__namespace.createElement(oe$1,null)),r&&React__namespace.createElement(ue$1,null,React__namespace.createElement(Qt$1,{showTopList:!0})))})),me$1=ce$1.Component,de$1=ce$1.usePublisher,fe$1=ce$1.useEmitterValue,pe$1=ce$1.useEmitter,he$1=ie$1({usePublisher:de$1,useEmitterValue:fe$1,useEmitter:pe$1}),ge$1=ae$1({usePublisher:de$1,useEmitterValue:fe$1,useEmitter:pe$1}),ve$1={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},Se$1={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},Ie$1=Math.round,Ce$1=Math.ceil,Te$1=Math.floor,we$1=Math.min,xe$1=Math.max;function be$1(t,e){return Array.from({length:e-t+1}).map(function(e,n){return {index:n+t}})}function ye$1(t,e){return t&&t.column===e.column&&t.row===e.row}var Ee$1=system(function(t){var n=t[0],r=n.overscan,o=n.visibleRange,i=n.listBoundary,a=t[1],l=a.scrollTop,s=a.viewportHeight,c=a.scrollBy,m=a.scrollTo,d=a.smoothScrollTargetReached,f=a.scrollContainerState,p=t[2],h=t[3],g=t[4],v=g.propsReady,S=g.didMount,I=t[5],C=I.windowViewportRect,T=I.windowScrollTo,w=I.useWindowScroll,x=I.customScrollParent,b=I.windowScrollContainerState,y=t[6],E=statefulStream(0),H=statefulStream(0),R=statefulStream(ve$1),L=statefulStream({height:0,width:0}),k=statefulStream({height:0,width:0}),z=stream(),B=stream(),F=statefulStream(0),P=statefulStream({row:0,column:0});connect(pipe(S,withLatestFrom(H),filter(function(t){return 0!==t[1]}),map(function(t){return {items:be$1(0,t[1]-1),top:0,bottom:0,offsetBottom:0,offsetTop:0,itemHeight:0,itemWidth:0}})),R),connect(pipe(combineLatest(duc(E),o,duc(P,ye$1),duc(k,function(t,e){return t&&t.width===e.width&&t.height===e.height})),withLatestFrom(L),map(function(t){var e=t[0],n=e[0],r=e[1],o=r[0],i=r[1],a=e[2],l=e[3],s=t[1],u=a.row,c=l.height,m=l.width,d=s.width;if(0===n||0===d)return ve$1;if(0===m)return Se$1;var f=Le$1(d,m,a.column),p=f*Te$1((o+u)/(c+u)),h=f*Ce$1((i+u)/(c+u))-1;h=xe$1(0,we$1(n-1,h));var g=be$1(p=we$1(h,xe$1(0,p)),h),v=He$1(s,a,l,g),S=v.top,I=v.bottom,C=Ce$1(n/f);return {items:g,offsetTop:S,offsetBottom:C*c+(C-1)*u-I,top:S,bottom:I,itemHeight:c,itemWidth:m}})),R),connect(pipe(L,map(function(t){return t.height})),s),connect(pipe(combineLatest(L,k,R,P),map(function(t){var e=He$1(t[0],t[3],t[1],t[2].items);return [e.top,e.bottom]}),distinctUntilChanged(gt$1)),i);var O=streamFromEmitter(pipe(duc(R),filter(function(t){return t.items.length>0}),withLatestFrom(E),filter(function(t){var e=t[0].items;return e[e.length-1].index===t[1]-1}),map(function(t){return t[1]-1}),distinctUntilChanged())),M=streamFromEmitter(pipe(duc(R),filter(function(t){var e=t.items;return e.length>0&&0===e[0].index}),mapTo(0),distinctUntilChanged())),V=streamFromEmitter(pipe(duc(R),filter(function(t){return t.items.length>0}),map(function(t){var e=t.items;return {startIndex:e[0].index,endIndex:e[e.length-1].index}}),distinctUntilChanged(vt$1)));connect(V,h.scrollSeekRangeChanged),connect(pipe(z,withLatestFrom(L,k,E,P),map(function(t){var e=t[1],n=t[2],r=t[3],o=t[4],i=it$1(t[0]),a=i.align,l=i.behavior,s=i.offset,u=i.index;"LAST"===u&&(u=r-1);var c=Re$1(e,o,n,u=xe$1(0,u,we$1(r-1,u)));return "end"===a?c=Ie$1(c-e.height+n.height):"center"===a&&(c=Ie$1(c-e.height/2+n.height/2)),s&&(c+=s),{top:c,behavior:l}})),m);var U=statefulStreamFromEmitter(pipe(R,map(function(t){return t.offsetBottom+t.bottom})),0);return connect(pipe(C,map(function(t){return {width:t.visibleWidth,height:t.visibleHeight}})),L),u({totalCount:E,viewportDimensions:L,itemDimensions:k,scrollTop:l,scrollHeight:B,overscan:r,scrollBy:c,scrollTo:m,scrollToIndex:z,smoothScrollTargetReached:d,windowViewportRect:C,windowScrollTo:T,useWindowScroll:w,customScrollParent:x,windowScrollContainerState:b,deviation:F,scrollContainerState:f,initialItemCount:H,gap:P},h,{gridState:R,totalListHeight:U},p,{startReached:M,endReached:O,rangeChanged:V,propsReady:v},y)},tup(Ct$1,b,ut$1,Et$1,ct$1,Pt$1,v));function He$1(t,e,n,r){var o=n.height;return void 0===o||0===r.length?{top:0,bottom:0}:{top:Re$1(t,e,n,r[0].index),bottom:Re$1(t,e,n,r[r.length-1].index)+o}}function Re$1(t,e,n,r){var o=Le$1(t.width,n.width,e.column),i=Te$1(r/o),a=i*n.height+xe$1(0,i-1)*e.row;return a>0?a+e.row:a}function Le$1(t,e,n){return xe$1(1,Te$1((t+n)/(e+n)))}var ke$1=["placeholder"],ze$1=system(function(){var t=statefulStream(function(t){return "Item "+t}),n=statefulStream({}),r=statefulStream(null),o=statefulStream("virtuoso-grid-item"),i=statefulStream("virtuoso-grid-list"),a=statefulStream(jt$1),l=statefulStream(noop),s=function(t,r){return void 0===r&&(r=null),statefulStreamFromEmitter(pipe(n,map(function(e){return e[t]}),distinctUntilChanged()),r)};return {context:r,itemContent:t,components:n,computeItemKey:a,itemClassName:o,listClassName:i,scrollerRef:l,ListComponent:s("List","div"),ItemComponent:s("Item","div"),ScrollerComponent:s("Scroller","div"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder","div")}}),Be$1=system(function(t){var n=t[0],r=t[1],o={item:Yt$1(r.itemContent,"Rename the %citem%c prop to %citemContent."),ItemContainer:stream(),ScrollContainer:stream(),ListContainer:stream(),emptyComponent:stream(),scrollSeek:stream()};function i(t,n,o){connect(pipe(t,withLatestFrom(r.components),map(function(t){var e,r=t[0],i=t[1];return console.warn("react-virtuoso: "+o+" property is deprecated. Pass components."+n+" instead."),u({},i,((e={})[n]=r,e))})),r.components);}return subscribe(o.scrollSeek,function(t){var o=t.placeholder,i=c(t,ke$1);console.warn("react-virtuoso: scrollSeek property is deprecated. Pass scrollSeekConfiguration and specify the placeholder in components.ScrollSeekPlaceholder instead."),publish(r.components,u({},getValue(r.components),{ScrollSeekPlaceholder:o})),publish(n.scrollSeekConfiguration,i);}),i(o.ItemContainer,"Item","ItemContainer"),i(o.ListContainer,"List","ListContainer"),i(o.ScrollContainer,"Scroller","ScrollContainer"),u({},n,r,o)},tup(Ee$1,ze$1)),Fe$1=React__namespace.memo(function(){var t=Ae$1("gridState"),e=Ae$1("listClassName"),n=Ae$1("itemClassName"),r=Ae$1("itemContent"),o=Ae$1("computeItemKey"),i=Ae$1("isSeeking"),a=Ue$1("scrollHeight"),s=Ae$1("ItemComponent"),c=Ae$1("ListComponent"),m=Ae$1("ScrollSeekPlaceholder"),d=Ae$1("context"),f=Ue$1("itemDimensions"),p=Ue$1("gap"),h=Ae$1("log"),g=I(function(t){a(t.parentElement.parentElement.scrollHeight);var e=t.firstChild;e&&f(e.getBoundingClientRect()),p({row:Ge$1("row-gap",getComputedStyle(t).rowGap,h),column:Ge$1("column-gap",getComputedStyle(t).columnGap,h)});});return React.createElement(c,u({ref:g,className:e},ne$1(c,d),{style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom}}),t.items.map(function(e){var a=o(e.index);return i?React.createElement(m,u({key:a},ne$1(m,d),{index:e.index,height:t.itemHeight,width:t.itemWidth})):React.createElement(s,u({},ne$1(s,d),{className:n,"data-index":e.index,key:a}),r(e.index,d))}))}),Pe$1=function(t){var e=t.children,r=Ue$1("viewportDimensions"),o=I(function(t){r(t.getBoundingClientRect());});return React__namespace.createElement("div",{style:te$1,ref:o},e)},Oe$1=function(t){var e=t.children,r=Nt$1(Ue$1("windowViewportRect"),Ae$1("customScrollParent"));return React__namespace.createElement("div",{ref:r,style:te$1},e)},Me$1=systemToComponent(Be$1,{optional:{totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",item:"item",ItemContainer:"ItemContainer",ScrollContainer:"ScrollContainer",ListContainer:"ListContainer",scrollSeek:"scrollSeek"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange"}},React__namespace.memo(function(t){var e=u({},t),r=Ae$1("useWindowScroll"),o=Ae$1("customScrollParent"),i=o||r?Oe$1:Pe$1;return React__namespace.createElement(o||r?De$1:Ne$1,u({},e),React__namespace.createElement(i,null,React__namespace.createElement(Fe$1,null)))})),Ue$1=Me$1.usePublisher,Ae$1=Me$1.useEmitterValue,We$1=Me$1.useEmitter,Ne$1=ie$1({usePublisher:Ue$1,useEmitterValue:Ae$1,useEmitter:We$1}),De$1=ae$1({usePublisher:Ue$1,useEmitterValue:Ae$1,useEmitter:We$1});function Ge$1(t,e,n){return "normal"===e||null!=e&&e.endsWith("px")||n(t+" was not resolved to pixel value correctly",e,p.WARN),"normal"===e?0:parseInt(null!=e?e:"0",10)}var _e$1=system(function(){var t=statefulStream(function(t){return React__namespace.createElement("td",null,"Item $",t)}),r=statefulStream(null),o=statefulStream(null),i=statefulStream({}),a=statefulStream(jt$1),l=statefulStream(noop),s=function(t,n){return void 0===n&&(n=null),statefulStreamFromEmitter(pipe(i,map(function(e){return e[t]}),distinctUntilChanged()),n)};return {context:r,itemContent:t,fixedHeaderContent:o,components:i,computeItemKey:a,scrollerRef:l,TableComponent:s("Table","table"),TableHeadComponent:s("TableHead","thead"),TableBodyComponent:s("TableBody","tbody"),TableRowComponent:s("TableRow","tr"),ScrollerComponent:s("Scroller","div"),EmptyPlaceholder:s("EmptyPlaceholder"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),FillerRow:s("FillerRow")}}),je$1=system(function(t){return u({},t[0],t[1])},tup(At$1,_e$1)),Ke$1=function(t){return React__namespace.createElement("tr",null,React__namespace.createElement("td",{style:{height:t.height}}))},Ye$1=function(t){return React__namespace.createElement("tr",null,React__namespace.createElement("td",{style:{height:t.height,padding:0,border:0}}))},qe$1=React__namespace.memo(function(){var t=tn$1("listState"),e=Xe$1("sizeRanges"),r=tn$1("useWindowScroll"),o=tn$1("customScrollParent"),i=Xe$1("windowScrollContainerState"),a=Xe$1("scrollContainerState"),s=o||r?i:a,c=tn$1("itemContent"),m=tn$1("trackItemSizes"),d=C(e,tn$1("itemSize"),m,s,tn$1("log"),void 0,o),f=d.callbackRef,p=d.ref,h=React__namespace.useState(0),g=h[0],v=h[1];en$1("deviation",function(t){g!==t&&(p.current.style.marginTop=t+"px",v(t));});var S=tn$1("EmptyPlaceholder"),I=tn$1("ScrollSeekPlaceholder")||Ke$1,T=tn$1("FillerRow")||Ye$1,w=tn$1("TableBodyComponent"),x=tn$1("TableRowComponent"),b=tn$1("computeItemKey"),y=tn$1("isSeeking"),E=tn$1("paddingTopAddition"),H=tn$1("firstItemIndex"),R=tn$1("statefulTotalCount"),L=tn$1("context");if(0===R&&S)return React.createElement(S,ne$1(S,L));var k=t.offsetTop+E+g,z=t.offsetBottom,B=k>0?React__namespace.createElement(T,{height:k,key:"padding-top"}):null,F=z>0?React__namespace.createElement(T,{height:z,key:"padding-bottom"}):null,P=t.items.map(function(t){var e=t.originalIndex,n=b(e+H,t.data,L);return y?React.createElement(I,u({},ne$1(I,L),{key:n,index:t.index,height:t.size,type:t.type||"item"})):React.createElement(x,u({},ne$1(x,L),{key:n,"data-index":e,"data-known-size":t.size,"data-item-index":t.index,style:{overflowAnchor:"none"}}),c(t.index,t.data,L))});return React.createElement(w,u({ref:f,"data-test-id":"virtuoso-item-list"},ne$1(w,L)),[B].concat(P,[F]))}),Ze$1=function(t){var r=t.children,o=Xe$1("viewportHeight"),i=I(compose(o,function(t){return T(t,"height")}));return React__namespace.createElement("div",{style:te$1,ref:i,"data-viewport-type":"element"},r)},Je$1=function(t){var e=t.children,r=Nt$1(Xe$1("windowViewportRect"),tn$1("customScrollParent"));return React__namespace.createElement("div",{ref:r,style:te$1,"data-viewport-type":"window"},e)},$e=systemToComponent(je$1,{required:{},optional:{context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",react18ConcurrentRendering:"react18ConcurrentRendering"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},React__namespace.memo(function(t){var r=tn$1("useWindowScroll"),o=tn$1("customScrollParent"),i=Xe$1("fixedHeaderHeight"),a=tn$1("fixedHeaderContent"),l=tn$1("context"),s=I(compose(i,function(t){return T(t,"height")})),c=o||r?rn$1:nn$1,m=o||r?Je$1:Ze$1,d=tn$1("TableComponent"),f=tn$1("TableHeadComponent"),p=a?React__namespace.createElement(f,u({key:"TableHead",style:{zIndex:1,position:"sticky",top:0},ref:s},ne$1(f,l)),a()):null;return React__namespace.createElement(c,u({},t),React__namespace.createElement(m,null,React__namespace.createElement(d,u({style:{borderSpacing:0}},ne$1(d,l)),[p,React__namespace.createElement(qe$1,{key:"TableBody"})])))})),Xe$1=$e.usePublisher,tn$1=$e.useEmitterValue,en$1=$e.useEmitter,nn$1=ie$1({usePublisher:Xe$1,useEmitterValue:tn$1,useEmitter:en$1}),rn$1=ae$1({usePublisher:Xe$1,useEmitterValue:tn$1,useEmitter:en$1}),on$1=me$1;
48241
48241
 
48242
48242
  window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var useGiphyPreview = function (separateGiphyPreview) {
48243
48243
  var _a = React.useState(), giphyPreviewMessage = _a[0], setGiphyPreviewMessage = _a[1];
@@ -48501,7 +48501,7 @@ var StreamChatReact = (function (exports, React, streamChat, reactDom) {
48501
48501
  return isAtBottom ? stickToBottomScrollBehavior : false;
48502
48502
  };
48503
48503
  var messageRenderer = React.useCallback(function (messageList, virtuosoIndex) {
48504
- var _a, _b, _c, _d, _e, _f, _g, _h;
48504
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
48505
48505
  var streamMessageIndex = virtuosoIndex + numItemsPrepended - PREPEND_OFFSET;
48506
48506
  // use custom renderer supplied by client if present and skip the rest
48507
48507
  if (customMessageRenderer) {
@@ -48521,7 +48521,7 @@ var StreamChatReact = (function (exports, React, streamChat, reactDom) {
48521
48521
  ((_a = message.user) === null || _a === void 0 ? void 0 : _a.id) === ((_b = messageList[streamMessageIndex - 1].user) === null || _b === void 0 ? void 0 : _b.id);
48522
48522
  var firstOfGroup = shouldGroupByUser && ((_c = message.user) === null || _c === void 0 ? void 0 : _c.id) !== ((_e = (_d = messageList[streamMessageIndex - 1]) === null || _d === void 0 ? void 0 : _d.user) === null || _e === void 0 ? void 0 : _e.id);
48523
48523
  var endOfGroup = shouldGroupByUser && ((_f = message.user) === null || _f === void 0 ? void 0 : _f.id) !== ((_h = (_g = messageList[streamMessageIndex + 1]) === null || _g === void 0 ? void 0 : _g.user) === null || _h === void 0 ? void 0 : _h.id);
48524
- return (React__default['default'].createElement(Message, { closeReactionSelectorOnClick: closeReactionSelectorOnClick, customMessageActions: props.customMessageActions, endOfGroup: endOfGroup, firstOfGroup: firstOfGroup, groupedByUser: groupedByUser, message: message, Message: MessageUIComponent, messageActions: props.messageActions }));
48524
+ return (React__default['default'].createElement(Message, { autoscrollToBottom: (_j = virtuoso.current) === null || _j === void 0 ? void 0 : _j.autoscrollToBottom, closeReactionSelectorOnClick: closeReactionSelectorOnClick, customMessageActions: props.customMessageActions, endOfGroup: endOfGroup, firstOfGroup: firstOfGroup, groupedByUser: groupedByUser, message: message, Message: MessageUIComponent, messageActions: props.messageActions }));
48525
48525
  }, [customMessageRenderer, shouldGroupByUser, numItemsPrepended]);
48526
48526
  var Item = React.useMemo(function () {
48527
48527
  // using 'display: inline-block'
@@ -48574,7 +48574,7 @@ var StreamChatReact = (function (exports, React, streamChat, reactDom) {
48574
48574
  return null;
48575
48575
  return (React__default['default'].createElement(React__default['default'].Fragment, null,
48576
48576
  React__default['default'].createElement("div", { className: (customClasses === null || customClasses === void 0 ? void 0 : customClasses.virtualizedMessageList) || 'str-chat__virtual-list' },
48577
- React__default['default'].createElement(nn$1, __assign$2({ atBottomStateChange: atBottomStateChange, components: virtuosoComponents, computeItemKey: function (index) {
48577
+ React__default['default'].createElement(on$1, __assign$2({ atBottomStateChange: atBottomStateChange, components: virtuosoComponents, computeItemKey: function (index) {
48578
48578
  return processedMessages[numItemsPrepended + index - PREPEND_OFFSET].id;
48579
48579
  }, endReached: endReached, firstItemIndex: PREPEND_OFFSET - numItemsPrepended, followOutput: followOutput, increaseViewportBy: { bottom: 200, top: 0 }, initialTopMostItemIndex: calculateInitialTopMostItemIndex(processedMessages, highlightedMessageId), itemContent: function (i) { return messageRenderer(processedMessages, i); }, itemSize: fractionalItemSize, key: messageSetKey, overscan: overscan, ref: virtuoso, startReached: startReached, style: { overflowX: 'hidden' }, totalCount: processedMessages.length }, additionalVirtuosoProps, (scrollSeekPlaceHolder ? { scrollSeek: scrollSeekPlaceHolder } : {}), (defaultItemHeight ? { defaultItemHeight: defaultItemHeight } : {})))),
48580
48580
  React__default['default'].createElement(MessageListNotifications$1, { hasNewMessages: newMessagesNotification, isNotAtLatestMessageSet: hasMoreNewer, MessageNotification: MessageNotification$1, notifications: notifications, scrollToBottom: scrollToBottom }),