"use strict";(self.webpackChunkalvanon_analytics_platform_frontend=self.webpackChunkalvanon_analytics_platform_frontend||[]).push([[1337],{71163(e,t,o){o.d(t,{aY:()=>uo});var n=o(74848),r=o(96540),i=o(40961);function l(e){return()=>e}function s(e){e()}function c(e,t){return o=>e(t(o))}function a(e,t){return()=>e(t)}function u(e){return void 0!==e}function d(){}function h(e,t){return t(e),e}function m(e,t){return t(e)}function f(...e){return e}function g(e,t){return e(1,t)}function p(e,t){e(0,t)}function x(e){e(2)}function v(e){return e(4)}function I(e,t){return g(e,function(e){return t=>e(0,t)}(t))}function T(e,t){const o=e(1,e=>{o(),t(e)});return o}function C(e){let t,o;return n=>r=>{t=r,o&&clearTimeout(o),o=setTimeout(()=>{n(t)},e)}}function S(e,t){return e===t}function w(e=S){let t;return o=>n=>{e(t,n)||(t=n,o(n))}}function H(e){return t=>o=>{e(o)&&t(o)}}function y(e){return t=>c(t,e)}function z(e){return t=>()=>{t(e)}}function b(e,...t){const o=function(...e){return t=>e.reduceRight(m,t)}(...t);return(t,n)=>{switch(t){case 2:return void x(e);case 1:return g(e,o(n))}}}function R(e,t){return o=>n=>{o(t=e(t,n))}}function E(e){return t=>o=>{e>0?e--:t(o)}}function B(e){let t,o=null;return n=>r=>{o=r,!t&&(t=setTimeout(()=>{t=void 0,n(o)},e))}}function k(...e){const t=new Array(e.length);let o=0,n=null;const r=Math.pow(2,e.length)-1;return e.forEach((e,i)=>{const l=Math.pow(2,i);g(e,e=>{const s=o;o|=l,t[i]=e,s!==r&&o===r&&n&&(n(),n=null)})}),e=>i=>{const l=()=>{e([i].concat(t))};o===r?l():n=l}}function O(e){let t=e;const o=L();return(e,n)=>{switch(e){case 0:t=n;break;case 1:n(t);break;case 4:return t}return o(e,n)}}function F(e,t){return h(O(t),t=>I(e,t))}function L(){const e=[];return(t,o)=>{switch(t){case 0:return void e.slice().forEach(e=>{e(o)});case 2:return void e.splice(0,e.length);case 1:return e.push(o),()=>{const t=e.indexOf(o);t>-1&&e.splice(t,1)}}}}function M(e){return h(L(),t=>I(e,t))}function j(e,t=[],{singleton:o}={singleton:!0}){return{constructor:e,dependencies:t,id:P(),singleton:o}}const P=()=>Symbol();function W(...e){const t=L(),o=new Array(e.length);let n=0;const r=Math.pow(2,e.length)-1;return e.forEach((e,i)=>{const l=Math.pow(2,i);g(e,e=>{o[i]=e,n|=l,n===r&&p(t,o)})}),function(e,i){switch(e){case 2:return void x(t);case 1:return n===r&&i(o),g(t,i)}}}function A(e,t=S){return b(e,w(t))}function V(...e){return function(t,o){switch(t){case 2:return;case 1:return function(...e){return()=>{e.map(s)}}(...e.map(e=>g(e,o)))}}}var D=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(D||{});const G={0:"debug",3:"error",1:"log",2:"warn"},N=j(()=>{const e=O(3);return{log:O((t,o,n=1)=>{var r;n>=(null!=(r=(typeof globalThis>"u"?window:globalThis).VIRTUOSO_LOG_LEVEL)?r:v(e))&&console[G[n]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,o)}),logLevel:e}},[],{singleton:!0});function _(e,t,o){return U(e,t,o).callbackRef}function U(e,t,o){const n=r.useRef(null);let i=e=>{};const l=r.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(t=>{const n=()=>{const o=t[0].target;null!==o.offsetParent&&e(o)};o?n():requestAnimationFrame(n)}):null,[e,o]);return i=e=>{e&&t?(null==l||l.observe(e),n.current=e):(n.current&&(null==l||l.unobserve(n.current)),n.current=null)},{callbackRef:i,ref:n}}function K(e,t,o,n,i,l,s,c,a){const u=r.useCallback(o=>{const r=function(e,t,o,n){const r=e.length;if(0===r)return null;const i=[];for(let l=0;l{if(null==o||!o.offsetParent)return;const r=o.getBoundingClientRect(),i=r.width;let l,c;if(t){const e=t.getBoundingClientRect(),o=r.top-e.top;c=e.height-Math.max(0,o),l=o+t.scrollTop}else{const e=s.current.ownerDocument.defaultView;c=e.innerHeight-Math.max(0,r.top),l=r.top+e.scrollY}n.current={offsetTop:l,visibleHeight:c,visibleWidth:i},e(n.current)},[e,t]),{callbackRef:l,ref:s}=U(i,!0,o),c=r.useCallback(()=>{i(s.current)},[i,s]);return r.useEffect(()=>{var e;if(t){t.addEventListener("scroll",c);const e=new ResizeObserver(()=>{requestAnimationFrame(c)});return e.observe(t),()=>{t.removeEventListener("scroll",c),e.unobserve(t)}}{const t=null==(e=s.current)?void 0:e.ownerDocument.defaultView;return null==t||t.addEventListener("scroll",c),null==t||t.addEventListener("resize",c),()=>{null==t||t.removeEventListener("scroll",c),null==t||t.removeEventListener("resize",c)}}},[c,t,s]),l}const Y=j(()=>{const e=L(),t=L(),o=O(0),n=L(),r=O(0),i=L(),l=L(),s=O(0),c=O(0),a=O(0),u=O(0),d=L(),h=L(),m=O(!1),f=O(!1),g=O(!1);return I(b(e,y(({scrollTop:e})=>e)),t),I(b(e,y(({scrollHeight:e})=>e)),l),I(t,r),{deviation:o,fixedFooterHeight:a,fixedHeaderHeight:c,footerHeight:u,headerHeight:s,horizontalDirection:f,scrollBy:h,scrollContainerState:e,scrollHeight:l,scrollingInProgress:m,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:n,statefulScrollTop:r,viewportHeight:i}},[],{singleton:!0}),X={lvl:0};function Z(e,t){const o=e.length;if(0===o)return[];let{index:n,value:r}=t(e[0]);const i=[];for(let l=1;l({index:e,value:t}))}(le(e,ee(e,t)[0],o))}function re(e,t){if(J(e))return X;const{k:o,l:n,r}=e;if(t===o){if(J(n))return r;if(J(r))return n;{const[t,o]=de(n);return se(ce(e,{k:t,l:ae(n),v:o}))}}return se(ce(e,tt&&(s=s.concat(le(r,t,o))),n>=t&&n<=o&&s.push({k:n,v:l}),n<=o&&(s=s.concat(le(i,t,o))),s}function se(e){const{l:t,lvl:o,r:n}=e;if(n.lvl>=o-1&&t.lvl>=o-1)return e;if(o>n.lvl+1){if(ue(t))return fe(ce(e,{lvl:o-1}));if(!J(t)&&!J(t.r))return ce(t.r,{l:ce(t,{r:t.r.l}),lvl:o,r:ce(e,{l:t.r.r,lvl:o-1})});throw new Error("Unexpected empty nodes")}if(ue(e))return ge(ce(e,{lvl:o-1}));if(J(n)||J(n.l))throw new Error("Unexpected empty nodes");{const t=n.l,r=ue(t)?n.lvl-1:n.lvl;return ce(t,{l:ce(e,{lvl:o-1,r:t.l}),lvl:t.lvl+1,r:ge(ce(n,{l:t.r,lvl:r}))})}}function ce(e,t){return he(void 0!==t.k?t.k:e.k,void 0!==t.v?t.v:e.v,void 0!==t.lvl?t.lvl:e.lvl,void 0!==t.l?t.l:e.l,void 0!==t.r?t.r:e.r)}function ae(e){return J(e.r)?e.l:se(ce(e,{r:ae(e.r)}))}function ue(e){return J(e)||e.lvl>e.r.lvl}function de(e){return J(e.r)?[e.k,e.v]:de(e.r)}function he(e,t,o,n=X,r=X){return{k:e,l:n,lvl:o,r,v:t}}function me(e){return ge(fe(e))}function fe(e){const{l:t}=e;return J(t)||t.lvl!==e.lvl?e:ce(t,{r:ce(e,{l:t.r})})}function ge(e){const{lvl:t,r:o}=e;return J(o)||J(o.r)||o.lvl!==t||o.r.lvl!==t?e:ce(o,{l:ce(e,{r:o.l}),lvl:t+1})}function pe(e,t){return!(!e||e.startIndex!==t.startIndex||e.endIndex!==t.endIndex)}function xe(e,t){return!(!e||e[0]!==t[0]||e[1]!==t[1])}const ve=j(()=>({recalcInProgress:O(!1)}),[],{singleton:!0});function Ie(e,t,o){return e[Te(e,t,o)]}function Te(e,t,o,n=0){let r=e.length-1;for(;n<=r;){const i=Math.floor((n+r)/2),l=o(e[i],t);if(0===l)return i;if(-1===l){if(r-n<2)return i-1;r=i-1}else{if(r===n)return i;n=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function Ce(e,t){return Math.round(e.getBoundingClientRect()[t])}function Se(e){return!J(e.groupOffsetTree)}function we({index:e},t){return t===e?0:t0?s+o:s}function ze(e,t){if(!Se(t))return e;let o=0;for(;t.groupIndices[o]<=e+o;)o++;return e+o}function be(e,t,o){if(function(e){return typeof e.groupIndex<"u"}(e))return t.groupIndices[e.groupIndex]+1;{let n=ze("LAST"===e.index?o:e.index,t);return n=Math.max(0,n,Math.min(o,n)),n}}function Re(e,[t,o,n,r]){t.length>0&&n("received item sizes",t,D.DEBUG);const i=e.sizeTree;let l=i,s=0;if(o.length>0&&J(i)&&2===t.length){const e=t[0].size,n=t[1].size;l=o.reduce((t,o)=>te(te(t,o,e),o+1,n),l)}else[l,s]=function(e,t){let o=J(e)?0:1/0;for(const n of t){const{endIndex:t,size:r,startIndex:i}=n;if(o=Math.min(o,i),J(e)){e=te(e,0,r);continue}const l=ne(e,i-1,t+1);if(l.some(Oe(n)))continue;let s=!1,c=!1;for(const{end:o,start:n,value:i}of l)s?(t>=n||r===i)&&(e=re(e,n)):(c=i!==r,s=!0),o>t&&t>=n&&i!==r&&(e=te(e,t+1,i));c&&(e=te(e,i,r))}return[e,o]}(l,t);if(l===i)return e;const{lastIndex:c,lastOffset:a,lastSize:u,offsetTree:d}=Be(e.offsetTree,s,l,r);return{groupIndices:o,groupOffsetTree:o.reduce((e,t)=>te(e,t,ye(t,d,r)),oe()),lastIndex:c,lastOffset:a,lastSize:u,offsetTree:d,sizeTree:l}}function Ee(e,t){let o=0,n=0;for(;oe.start===n&&(e.end===t||e.end===1/0)&&e.value===o}const Fe={offsetHeight:"height",offsetWidth:"width"},Le=j(([{log:e},{recalcInProgress:t}])=>{const o=L(),n=L(),r=F(n,0),i=L(),l=L(),s=O(0),c=O([]),a=O(void 0),u=O(void 0),d=O(void 0),h=O(void 0),m=O((e,t)=>Ce(e,Fe[t])),f=O(void 0),x=O(0),T={groupIndices:[],groupOffsetTree:oe(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:oe()},C=F(b(o,k(c,e,x),R(Re,T),w()),T),S=F(b(c,w(),R((e,t)=>({current:t,prev:e.current}),{current:[],prev:[]}),y(({prev:e})=>e)),[]);I(b(c,H(e=>e.length>0),k(C,x),y(([e,t,o])=>{const n=e.reduce((e,n,r)=>te(e,n,ye(n,t.offsetTree,o)||r),oe());return{...t,groupIndices:e,groupOffsetTree:n}})),C),I(b(n,k(C),H(([e,{lastIndex:t}])=>e[{endIndex:t,size:o,startIndex:e}])),o),I(a,u);const z=F(b(a,y(e=>void 0===e)),!0);I(b(u,H(e=>void 0!==e&&J(v(C).sizeTree)),y(e=>{const t=v(d),o=v(c).length>0;return t?o?[{endIndex:0,size:t,startIndex:0},{endIndex:1,size:e,startIndex:1}]:[]:[{endIndex:0,size:e,startIndex:0}]})),o),I(b(h,H(e=>void 0!==e&&e.length>0&&J(v(C).sizeTree)),y(e=>{const t=[];let o=e[0],n=0;for(let r=1;rvoid 0!==e&&void 0!==t),y(([e,t,o])=>{const n=[];for(let r=0;r({changed:o!==e,sizes:o}),{changed:!1,sizes:T}),y(e=>e.changed)));g(b(s,R((e,t)=>({diff:e.prev-t,prev:t}),{diff:0,prev:0}),y(e=>e.diff)),e=>{const{groupIndices:o}=v(C);if(e>0)p(t,!0),p(i,e+Ee(e,o));else if(e<0){const t=v(S);t.length>0&&(e-=Ee(-e,t)),p(l,e)}}),g(b(s,k(e)),([e,t])=>{e<0&&t("`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:s},D.ERROR)});const B=M(i);I(b(i,k(C),y(([e,t])=>{const o=t.groupIndices.length>0,n=[],r=t.lastSize;if(o){const o=Q(t.sizeTree,0);let i=0,l=0;for(;i{let r=t.ranges;return 0!==t.prevSize&&(r=[...t.ranges,{endIndex:o+e-1,size:t.prevSize,startIndex:t.prevIndex}]),{prevIndex:o+e,prevSize:n,ranges:r}},{prevIndex:e,prevSize:0,ranges:n}).ranges}return ie(t.sizeTree).reduce((t,{k:o,v:n})=>({prevIndex:o+e,prevSize:n,ranges:[...t.ranges,{endIndex:o+e-1,size:t.prevSize,startIndex:t.prevIndex}]}),{prevIndex:0,prevSize:r,ranges:[]}).ranges})),o);const j=M(b(l,k(C,x),y(([e,{offsetTree:t},o])=>ye(-e,t,o))));return I(b(l,k(C,x),y(([e,t,o])=>{if(t.groupIndices.length>0){if(J(t.sizeTree))return t;let n=oe();const r=v(S);let i=0,l=0,s=0;for(;i<-e;){s=r[l];const e=r[l+1]-s-1;l++,i+=e+1}return n=ie(t.sizeTree).reduce((t,{k:o,v:n})=>te(t,Math.max(0,o+e),n),n),i!==-e&&(n=te(n,0,Q(t.sizeTree,s)),n=te(n,1,ee(t.sizeTree,1-e)[1])),{...t,sizeTree:n,...Be(t.offsetTree,0,n,o)}}{const n=ie(t.sizeTree).reduce((t,{k:o,v:n})=>te(t,Math.max(0,o+e),n),oe());return{...t,sizeTree:n,...Be(t.offsetTree,0,n,o)}}})),C),{beforeUnshiftWith:B,data:f,defaultItemSize:u,firstItemIndex:s,fixedItemSize:a,fixedGroupSize:d,gap:x,groupIndices:c,heightEstimates:h,itemSize:m,listRefresh:E,shiftWith:l,shiftWithOffset:j,sizeRanges:o,sizes:C,statefulTotalCount:r,totalCount:n,trackItemSizes:z,unshiftWith:i}},f(N,ve),{singleton:!0});function Me(e){return e.reduce((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e),{groupIndices:[],totalCount:0})}const je=j(([{groupIndices:e,sizes:t,totalCount:o},{headerHeight:n,scrollTop:r}])=>{const i=L(),l=L(),s=M(b(i,y(Me)));return I(b(s,y(e=>e.totalCount)),o),I(b(s,y(e=>e.groupIndices)),e),I(b(W(r,t,n),H(([e,t])=>Se(t)),y(([e,t,o])=>ee(t.groupOffsetTree,Math.max(e-o,0),"v")[0]),w(),y(e=>[e])),l),{groupCounts:i,topItemsIndexes:l}},f(Le,Y)),Pe=j(([{log:e}])=>{const t=O(!1),o=M(b(t,H(e=>e),w()));return g(t,t=>{t&&v(e)("props updated",{},D.DEBUG)}),{didMount:o,propsReady:t}},f(N),{singleton:!0}),We=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Ae(e){const t="number"==typeof e?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!We)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ve=j(([{gap:e,listRefresh:t,sizes:o,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,footerHeight:l,headerHeight:s,scrollingInProgress:c,scrollTo:a,smoothScrollTargetReached:u,viewportHeight:d},{log:h}])=>{const m=L(),f=L(),x=O(0);let v=null,C=null,S=null;function w(){v&&(v(),v=null),S&&(S(),S=null),C&&(clearTimeout(C),C=null),p(c,!1)}return I(b(m,k(o,d,n,x,s,l,h),k(e,i,r),y(([[e,o,n,r,i,l,s,a],d,h,x])=>{const I=Ae(e),{align:H,behavior:y,offset:z}=I,R=r-1,E=be(I,o,R);let B=ye(E,o.offsetTree,d)+l;"end"===H?(B+=h+ee(o.sizeTree,E)[1]-n+x,E===R&&(B+=s)):"center"===H?B+=(h+ee(o.sizeTree,E)[1]-n+x)/2:B-=i,z&&(B+=z);const k=t=>{w(),t?(a("retrying to scroll to",{location:e},D.DEBUG),p(m,e)):(p(f,!0),a("list did not change, scroll successful",{},D.DEBUG))};if(w(),"smooth"===y){let e=!1;S=g(t,t=>{e=e||t}),v=T(u,()=>{k(e)})}else v=T(b(t,e=>{const t=setTimeout(()=>{e(!1)},150);return o=>{o&&(e(!0),clearTimeout(t))}}),k);return C=setTimeout(()=>{w()},1200),p(c,!0),a("scrolling from index to",{behavior:y,index:E,top:B},D.DEBUG),{behavior:y,top:B}})),a),{scrollTargetReached:f,scrollToIndex:m,topListHeight:x}},f(Le,Y,N),{singleton:!0});function De(e,t){0==e?t():requestAnimationFrame(()=>{De(e-1,t)})}function Ge(e,t){const o=t-1;return"number"==typeof e?e:"LAST"===e.index?o:e.index}const Ne=j(([{defaultItemSize:e,listRefresh:t,sizes:o},{scrollTop:n},{scrollTargetReached:r,scrollToIndex:i},{didMount:l}])=>{const s=O(!0),c=O(0),a=O(!0);return I(b(l,k(c),H(([e,t])=>!!t),z(!1)),s),I(b(l,k(c),H(([e,t])=>!!t),z(!1)),a),g(b(W(t,l),k(s,o,e,a),H(([[,e],t,{sizeTree:o},n,r])=>e&&(!J(o)||u(n))&&!t&&!r),k(c)),([,e])=>{T(r,()=>{p(a,!0)}),De(4,()=>{T(n,()=>{p(s,!0)}),p(i,e)})}),{initialItemFinalLocationReached:a,initialTopMostItemIndex:c,scrolledToInitialItem:s}},f(Le,Y,Ve,Pe),{singleton:!0});function _e(e,t){return Math.abs(e-t)<1.01}const Ue="up",Ke="down",qe={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},$e=j(([{footerHeight:e,headerHeight:t,scrollBy:o,scrollContainerState:n,scrollTop:r,viewportHeight:i}])=>{const l=O(!1),s=O(!0),c=L(),a=L(),u=O(4),d=O(0),h=F(b(V(b(A(r),E(1),z(!0)),b(A(r),E(1),z(!1),C(100))),w()),!1),m=F(b(V(b(o,z(!0)),b(o,z(!1),C(200))),w()),!1);I(b(W(A(r),A(d)),y(([e,t])=>e<=t),w()),s),I(b(s,B(50)),a);const f=M(b(W(n,A(i),A(t),A(e),A(u)),R((e,[{scrollHeight:t,scrollTop:o},n,r,i,l])=>{const s={scrollHeight:t,scrollTop:o,viewportHeight:n};if(o+n-t>-l){let t,n;return o>e.state.scrollTop?(t="SCROLLED_DOWN",n=e.state.scrollTop-o):(t="SIZE_DECREASED",n=e.state.scrollTop-o||e.scrollTopDelta),{atBottom:!0,atBottomBecause:t,scrollTopDelta:n,state:s}}let c;return c=s.scrollHeight>e.state.scrollHeight?"SIZE_INCREASED":ne&&e.atBottom===t.atBottom))),g=F(b(n,R((e,{scrollHeight:t,scrollTop:o,viewportHeight:n})=>{if(_e(e.scrollHeight,t))return{changed:!1,jump:0,scrollHeight:t,scrollTop:o};{const r=t-(o+n)<1;return e.scrollTop!==o&&r?{changed:!0,jump:e.scrollTop-o,scrollHeight:t,scrollTop:o}:{changed:!0,jump:0,scrollHeight:t,scrollTop:o}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),H(e=>e.changed),y(e=>e.jump)),0);I(b(f,y(e=>e.atBottom)),l),I(b(l,B(50)),c);const p=O(Ke);I(b(n,y(({scrollTop:e})=>e),w(),R((e,t)=>v(m)?{direction:e.direction,prevScrollTop:t}:{direction:te.direction)),p),I(b(n,B(50),z("none")),p);const x=O(0);return I(b(h,H(e=>!e),z(0)),x),I(b(r,B(100),k(h),H(([e,t])=>t),R(([e,t],[o])=>[t,o],[0,0]),y(([e,t])=>t-e)),x),{atBottomState:f,atBottomStateChange:c,atBottomThreshold:u,atTopStateChange:a,atTopThreshold:d,isAtBottom:l,isAtTop:s,isScrolling:h,lastJumpDueToItemResize:g,scrollDirection:p,scrollVelocity:x}},f(Y)),Ye="top",Xe="bottom",Ze="none";function Je(e,t,o){return"number"==typeof e?o===Ue&&t===Ye||o===Ke&&t===Xe?e:0:o===Ue?t===Ye?e.main:e.reverse:t===Xe?e.main:e.reverse}function Qe(e,t){var o;return"number"==typeof e?e:null!=(o=e[t])?o:0}const et=j(([{deviation:e,fixedHeaderHeight:t,headerHeight:o,scrollTop:n,viewportHeight:r}])=>{const i=L(),l=O(0),s=O(0),c=O(0);return{increaseViewportBy:s,listBoundary:i,overscan:c,topListHeight:l,visibleRange:F(b(W(A(n),A(r),A(o),A(i,xe),A(c),A(l),A(t),A(e),A(s)),y(([e,t,o,[n,r],i,l,s,c,a])=>{const u=e-c,d=l+s,h=Math.max(o-u,0);let m=Ze;const f=Qe(a,Ye),g=Qe(a,Xe);return n-=c,r+=o+s,(n+=o+s)>e+d-f&&(m=Ue),(r-=c)null!=e),w(xe)),[0,0])}},f(Y),{singleton:!0}),tt={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function ot(e,t,o,n,r,i){const{lastIndex:l,lastOffset:s,lastSize:c}=r;let a=0,u=0;if(e.length>0){a=e[0].offset;const t=e[e.length-1];u=t.offset+t.size}const d=o-l,h=a,m=s+d*c+(d-1)*n-u;return{bottom:u,firstItemIndex:i,items:rt(e,r,i),offsetBottom:m,offsetTop:a,top:h,topItems:rt(t,r,i),topListHeight:t.reduce((e,t)=>t.size+e,0),totalCount:o}}function nt(e,t,o,n,r,i){let l=0;if(o.groupIndices.length>0)for(const t of o.groupIndices){if(t-l>=e)break;l++}const s=e+l,c=Ge(t,s);return ot(Array.from({length:s}).map((e,t)=>({data:i[t+c],index:t+c,offset:0,size:0})),[],s,r,o,n)}function rt(e,t,o){if(0===e.length)return[];if(!Se(t))return e.map(e=>({...e,index:e.index+o,originalIndex:e.index}));const n=e[0].index,r=e[e.length-1].index,i=[],l=ne(t.groupOffsetTree,n,r);let s,c=0;for(const n of e){let e;(!s||s.end{const x=O([]),T=O(0),C=L(),S=O(0);I(i.topItemsIndexes,x);const z=F(b(W(g,p,A(c,xe),A(r),A(n),A(a),d,A(x),A(t),A(o),A(S),e),H(([e,t,,o,,,,,,,,n])=>{const r=n&&n.length!==o;return e&&!t&&!r}),y(([,,[e,t],o,n,r,i,l,s,c,a,u])=>{var d,m,f,g;const p=n,{offsetTree:x,sizeTree:I}=p,C=v(T);if(0===o)return{...tt,totalCount:o};if(0===e&&0===t)return 0===C?{...tt,totalCount:o}:nt(C,r,n,s,c,u||[]);if(J(I))return C>0?null:ot(function(e,t,o){if(Se(t)){const n=ze(e,t);return[{index:ee(t.groupOffsetTree,n)[0],offset:0,size:0},{data:null==o?void 0:o[0],index:n,offset:0,size:0}]}return[{data:null==o?void 0:o[0],index:e,offset:0,size:0}]}(Ge(r,o),p,u),[],o,c,p,s);const S=[];if(l.length>0){const e=l[0],t=l[l.length-1];let o=0;for(const n of ne(I,e,t)){const r=n.value,i=Math.max(n.start,e),l=Math.min(n.end,t);for(let e=i;e<=l;e++)S.push({data:null==u?void 0:u[e],index:e,offset:o,size:r}),o+=r}}if(!i)return ot([],S,o,c,p,s);const w=l.length>0?l[l.length-1]+1:0,H=function(e,t,o,n=0){return n>0&&(t=Math.max(t,Ie(e,n,we).offset)),Z(function(e,t,o,n){const r=Te(e,t,n),i=Te(e,o,n,r);return e.slice(r,i+1)}(e,t,o,He),ke)}(x,e,t,w);if(0===H.length)return null;const y=o-1,z=h([],o=>{for(const n of H){const r=n.value;let i=r.offset,l=n.start;const s=r.size;if(r.offset=t);e++)o.push({data:null==u?void 0:u[e],index:e,offset:i,size:s}),i+=s+c}}),b=it(a,Ye),R=it(a,Xe);if(z.length>0&&(b>0||R>0)){const e=z[0],t=z[z.length-1];if(b>0&&e.index>w){const t=Math.min(b,e.index-w),o=[];let n=e.offset;for(let r=e.index-1;r>=e.index-t;r--){const t=null!=(m=null==(d=ne(I,r,r)[0])?void 0:d.value)?m:e.size;n-=t+c,o.unshift({data:null==u?void 0:u[r],index:r,offset:n,size:t})}z.unshift(...o)}if(R>0&&t.indexnull!==e),w()),tt);I(b(e,H(u),y(e=>null==e?void 0:e.length)),r),I(b(z,y(e=>e.topListHeight)),m),I(m,s),I(b(z,y(e=>[e.top,e.bottom])),l),I(b(z,y(e=>e.items)),C);const R=M(b(z,H(({items:e})=>e.length>0),k(r,e),H(([{items:e},t])=>e[e.length-1].originalIndex===t-1),y(([,e,t])=>[e-1,t]),w(xe),y(([e])=>e))),E=M(b(z,B(200),H(({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length),y(({items:e})=>e[0].index),w())),j=M(b(z,H(({items:e})=>e.length>0),y(({items:e})=>{let t=0,o=e.length-1;for(;"group"===e[t].type&&tt;)o--;return{endIndex:e[o].index,startIndex:e[t].index}}),w(pe)));return{endReached:R,initialItemCount:T,itemsRendered:C,listState:z,minOverscanItemCount:S,rangeChanged:j,startReached:E,topItemsIndexes:x,...f}},f(Le,je,et,Ne,Ve,$e,Pe,ve),{singleton:!0}),st=j(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:o,headerHeight:n},{listState:r}])=>{const i=L(),l=F(b(W(o,e,n,t,r),y(([e,t,o,n,r])=>e+t+o+n+r.offsetBottom+r.bottom)),0);return I(A(l),i),{totalListHeight:l,totalListHeightChanged:i}},f(Y,lt),{singleton:!0}),ct=j(([{viewportHeight:e},{totalListHeight:t}])=>{const o=O(!1);return{alignToBottom:o,paddingTopAddition:F(b(W(o,e,t),H(([e])=>e),y(([,e,t])=>Math.max(0,e-t)),B(0),w()),0)}},f(Y,st),{singleton:!0}),at=j(()=>({context:O(null)})),ut=({itemBottom:e,itemTop:t,locationParams:{align:o,behavior:n,...r},viewportBottom:i,viewportTop:l})=>ti?{...r,align:null!=o?o:"end",behavior:n}:null,dt=j(([{gap:e,sizes:t,totalCount:o},{fixedFooterHeight:n,fixedHeaderHeight:r,headerHeight:i,scrollingInProgress:l,scrollTop:s,viewportHeight:c},{scrollToIndex:a}])=>{const u=L();return I(b(u,k(t,c,o,i,r,n,s),k(e),y(([[e,t,o,n,r,i,s,c],a])=>{const{align:u,behavior:d,calculateViewLocation:h=ut,done:m,...f}=e,g=be(e,t,n-1),p=ye(g,t.offsetTree,a)+r+i,x=h({itemBottom:p+ee(t.sizeTree,g)[1],itemTop:p,locationParams:{align:u,behavior:d,...f},viewportBottom:c+o-s,viewportTop:c+i});return x?m&&T(b(l,H(e=>!e),E(v(l)?1:2)),m):null==m||m(),x}),H(e=>null!==e)),a),{scrollIntoView:u}},f(Le,Y,Ve,lt,N),{singleton:!0});function ht(e){return!!e&&("smooth"===e?"smooth":"auto")}const mt=j(([{listRefresh:e,totalCount:t,fixedItemSize:o,data:n},{atBottomState:r,isAtBottom:i},{scrollToIndex:l},{scrolledToInitialItem:s},{didMount:c,propsReady:a},{log:u},{scrollingInProgress:d},{context:h},{scrollIntoView:m}])=>{const f=O(!1),x=L();let C=null;function S(e){p(l,{align:"end",behavior:e,index:"LAST"})}function w(e){const t=T(r,t=>{e&&!t.atBottom&&"SIZE_INCREASED"===t.notAtBottomBecause&&!C&&(v(u)("scrolling to bottom due to increased size",{},D.DEBUG),S("auto"))});setTimeout(t,100)}g(b(W(b(A(t),E(1)),c),k(A(f),i,s,d),y(([[e,t],o,n,r,i])=>{let l=t&&r,s="auto";return l&&(s=((e,t)=>"function"==typeof e?ht(e(t)):t&&ht(e))(o,n||i),l=l&&!!s),{followOutputBehavior:s,shouldFollow:l,totalCount:e}}),H(({shouldFollow:e})=>e)),({followOutputBehavior:t,totalCount:n})=>{C&&(C(),C=null),v(o)?requestAnimationFrame(()=>{v(u)("following output to ",{totalCount:n},D.DEBUG),S(t)}):C=T(e,()=>{v(u)("following output to ",{totalCount:n},D.DEBUG),S(t),C=null})}),g(b(W(A(f),t,a),H(([e,,t])=>e&&t),R(({value:e},[,t])=>({refreshed:e===t,value:t}),{refreshed:!1,value:0}),H(({refreshed:e})=>e),k(f,t)),([,e])=>{v(s)&&w(!1!==e)}),g(x,()=>{w(!1!==v(f))}),g(W(A(f),r),([e,t])=>{e&&!t.atBottom&&"VIEWPORT_HEIGHT_DECREASING"===t.notAtBottomBecause&&S("auto")});const z=O(null),F=L();return I(V(b(A(n),y(e=>{var t;return null!=(t=null==e?void 0:e.length)?t:0})),b(A(t))),F),g(b(W(b(F,E(1)),c),k(A(z),s,d,h),y(([[e,t],o,n,r,i])=>t&&n&&(null==o?void 0:o({context:i,totalCount:e,scrollingInProgress:r}))),H(e=>!!e),B(0)),t=>{C&&(C(),C=null),v(o)?requestAnimationFrame(()=>{v(u)("scrolling into view",{}),p(m,t)}):C=T(e,()=>{v(u)("scrolling into view",{}),p(m,t),C=null})}),{autoscrollToBottom:x,followOutput:f,scrollIntoViewOnChange:z}},f(Le,$e,Ve,Ne,Pe,N,Y,at,dt)),ft=j(([{data:e,firstItemIndex:t,gap:o,sizes:n},{initialTopMostItemIndex:r},{initialItemCount:i,listState:l},{didMount:s}])=>(I(b(s,k(i),H(([,e])=>0!==e),k(r,n,t,o,e),y(([[,e],t,o,n,r,i=[]])=>nt(e,t,o,n,r,i))),l),{}),f(Le,Ne,lt,Pe),{singleton:!0}),gt=j(([{didMount:e},{scrollTo:t},{listState:o}])=>{const n=O(0);return g(b(e,k(n),H(([,e])=>0!==e),y(([,e])=>({top:e}))),e=>{T(b(o,E(1),H(e=>e.items.length>1)),()=>{requestAnimationFrame(()=>{p(t,e)})})}),{initialScrollTop:n}},f(Pe,Y,lt),{singleton:!0}),pt=j(([{scrollVelocity:e}])=>{const t=O(!1),o=L(),n=O(!1);return I(b(e,k(n,t,o),H(([e,t])=>!!t),y(([e,t,o,n])=>{const{enter:r,exit:i}=t;if(o){if(i(e,n))return!1}else if(r(e,n))return!0;return o}),w()),t),g(b(W(t,e,o),k(n)),([[e,t,o],n])=>{e&&n&&n.change&&n.change(t,o)}),{isSeeking:t,scrollSeekConfiguration:n,scrollSeekRangeChanged:o,scrollVelocity:e}},f($e),{singleton:!0}),xt=j(([{scrollContainerState:e,scrollTo:t}])=>{const o=L(),n=L(),r=L(),i=O(!1),l=O(void 0);return I(b(W(o,n),y(([{scrollHeight:e,scrollTop:t,viewportHeight:o},{offsetTop:n}])=>({scrollHeight:e,scrollTop:Math.max(0,t-n),viewportHeight:o}))),e),I(b(t,k(n),y(([e,{offsetTop:t}])=>({...e,top:e.top+t}))),r),{customScrollParent:l,useWindowScroll:i,windowScrollContainerState:o,windowScrollTo:r,windowViewportRect:n}},f(Y)),vt=j(([{sizeRanges:e,sizes:t},{headerHeight:o,scrollTop:n},{initialTopMostItemIndex:r},{didMount:i},{useWindowScroll:l,windowScrollContainerState:s,windowViewportRect:c}])=>{const a=L(),d=O(void 0),h=O(null),m=O(null);return I(s,h),I(c,m),g(b(a,k(t,n,l,h,m,o)),([e,t,o,n,r,i,l])=>{const s=function(e){return ie(e).map(({k:e,v:t},o,n)=>{const r=n[o+1];return{endIndex:r?r.k-1:1/0,size:t,startIndex:e}})}(t.sizeTree);n&&null!==r&&null!==i&&(o=r.scrollTop-i.offsetTop),e({ranges:s,scrollTop:o-=l})}),I(b(d,H(u),y(It)),r),I(b(i,k(d),H(([,e])=>void 0!==e),w(),y(([,e])=>e.ranges)),e),{getState:a,restoreStateFrom:d}},f(Le,Y,Ne,Pe,xt));function It(e){return{align:"start",index:0,offset:e.scrollTop}}const Tt=j(([{topItemsIndexes:e}])=>{const t=O(0);return I(b(t,H(e=>e>=0),y(e=>Array.from({length:e}).map((e,t)=>t))),e),{topItemCount:t}},f(lt));function Ct(e){let t,o=!1;return()=>(o||(o=!0,t=e()),t)}const St=Ct(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),wt=j(([{deviation:e,scrollBy:t,scrollingInProgress:o,scrollTop:n},{isAtBottom:r,isScrolling:i,lastJumpDueToItemResize:l,scrollDirection:s},{listState:c},{beforeUnshiftWith:a,gap:u,shiftWithOffset:d,sizes:h},{log:m},{recalcInProgress:f}])=>{const x=M(b(c,k(l),R(([,e,t,o],[{bottom:n,items:r,offsetBottom:i,totalCount:l},s])=>{const c=n+i;let a=0;return t===l&&e.length>0&&r.length>0&&(0===r[0].originalIndex&&0===e[0].originalIndex||(a=c-o,0!==a&&(a+=s))),[a,r,l,c]},[0,[],0,0]),H(([e])=>0!==e),k(n,s,o,r,m,f),H(([,e,t,o,,,n])=>!n&&!o&&0!==e&&t===Ue),y(([[e],,,,,t])=>(t("Upward scrolling compensation",{amount:e},D.DEBUG),e))));function v(o){o>0?(p(t,{behavior:"auto",top:-o}),p(e,0)):(p(e,0),p(t,{behavior:"auto",top:-o}))}return g(b(x,k(e,i)),([t,o,n])=>{n&&St()?p(e,o-t):v(-t)}),g(b(W(F(i,!1),e,f),H(([e,t,o])=>!e&&!o&&0!==t),y(([e,t])=>t),B(1)),v),I(b(d,y(e=>({top:-e}))),t),g(b(a,k(h,u),y(([e,{groupIndices:t,lastSize:o,sizeTree:n},r])=>{function i(e){return e*(o+r)}if(0===t.length)return i(e);{let o=0;const r=Q(n,0);let l=0,s=0;for(;le&&(o-=r,n=e-l+1),l+=n,o+=i(n),s++}return o}})),o=>{p(e,o),requestAnimationFrame(()=>{p(t,{top:o}),requestAnimationFrame(()=>{p(e,0),p(f,!1)})})}),{deviation:e}},f(Y,$e,lt,Le,N,ve)),Ht=j(([e,t,o,n,r,i,l,s,c,a,u])=>({...e,...t,...o,...n,...r,...i,...l,...s,...c,...a,...u}),f(et,ft,Pe,pt,st,gt,ct,xt,dt,N,at)),yt=j(([{data:e,defaultItemSize:t,firstItemIndex:o,fixedItemSize:n,fixedGroupSize:r,gap:i,groupIndices:l,heightEstimates:s,itemSize:c,sizeRanges:a,sizes:u,statefulTotalCount:d,totalCount:h,trackItemSizes:m},{initialItemFinalLocationReached:f,initialTopMostItemIndex:g,scrolledToInitialItem:p},x,v,T,C,{scrollToIndex:S},w,{topItemCount:H},{groupCounts:z},R])=>{const{listState:E,minOverscanItemCount:B,topItemsIndexes:k,rangeChanged:O,...F}=C;return I(O,R.scrollSeekRangeChanged),I(b(R.windowViewportRect,y(e=>e.visibleHeight)),x.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:o,fixedItemHeight:n,fixedGroupHeight:r,gap:i,groupCounts:z,heightEstimates:s,initialItemFinalLocationReached:f,initialTopMostItemIndex:g,scrolledToInitialItem:p,sizeRanges:a,topItemCount:H,topItemsIndexes:k,totalCount:h,...T,groupIndices:l,itemSize:c,listState:E,minOverscanItemCount:B,scrollToIndex:S,statefulTotalCount:d,trackItemSizes:m,rangeChanged:O,...F,...R,...x,sizes:u,...v}},f(Le,Ne,Y,vt,mt,lt,Ve,wt,Tt,je,Ht));function zt(e,t){const o={},n={};let r=0;const i=e.length;for(;r(o[n]=function(e){let t,o;const n=()=>null==t?void 0:t();return function(r,i){switch(r){case 1:return i?o===i?void 0:(n(),o=i,t=g(e,i),t):(n(),d);case 2:return n(),void(o=null)}}}(e[t.events[n]]),o),{})}const T=r.forwardRef((d,v)=>{const{children:T,...C}=d,[S]=r.useState(()=>h(function(e){const t=new Map,o=({constructor:e,dependencies:n,id:r,singleton:i})=>{if(i&&t.has(r))return t.get(r);const l=e(n.map(e=>o(e)));return i&&t.set(r,l),l};return o(e)}(e),e=>{f(e,C)})),[w]=r.useState(a(I,S));bt(()=>{for(const e of u)e in C&&g(w[e],C[e]);return()=>{Object.values(w).map(x)}},[C,w,S]),bt(()=>{f(S,C)}),r.useImperativeHandle(v,l(function(e){return c.reduce((o,n)=>(o[n]=o=>{p(e[t.methods[n]],o)},o),{})}(S)));const H=o;return(0,n.jsx)(m.Provider,{value:S,children:o?(0,n.jsx)(H,{...zt([...i,...s,...u],C),children:T}):T})});return{Component:T,useEmitter:(e,t)=>{const o=r.useContext(m)[e];bt(()=>g(o,t),[t,o])},useEmitterValue:r.version.startsWith("18")?e=>{const t=r.useContext(m)[e],o=r.useCallback(e=>g(t,e),[t]);return r.useSyncExternalStore(o,()=>v(t),()=>v(t))}:e=>{const t=r.useContext(m)[e],[o,n]=r.useState(a(v,t));return bt(()=>g(t,e=>{e!==o&&n(l(e))}),[t,o]),o},usePublisher:e=>{const t=r.useContext(m);return r.useCallback(o=>{p(t[e],o)},[t,e])}}}const Et=r.createContext(void 0),Bt=r.createContext(void 0),kt=typeof document<"u"?r.useLayoutEffect:r.useEffect;function Ot(e){return"self"in e}function Ft(e,t,o,n=d,l,s){const c=r.useRef(null),a=r.useRef(null),u=r.useRef(null),h=r.useCallback(o=>{let n,r,l;const c=o.target;if(function(e){return"body"in e}(c)||Ot(c)){const e=Ot(c)?c:c.defaultView;l=s?e.scrollX:e.scrollY,n=s?e.document.documentElement.scrollWidth:e.document.documentElement.scrollHeight,r=s?e.innerWidth:e.innerHeight}else l=s?c.scrollLeft:c.scrollTop,n=s?c.scrollWidth:c.scrollHeight,r=s?c.offsetWidth:c.offsetHeight;const d=()=>{e({scrollHeight:n,scrollTop:Math.max(l,0),viewportHeight:r})};o.suppressFlushSync?d():i.flushSync(d),null!==a.current&&(l===a.current||l<=0||l===n-r)&&(a.current=null,t(!0),u.current&&(clearTimeout(u.current),u.current=null))},[e,t,s]);return r.useEffect(()=>{const e=l||c.current;return n(l||c.current),h({suppressFlushSync:!0,target:e}),e.addEventListener("scroll",h,{passive:!0}),()=>{n(null),e.removeEventListener("scroll",h)}},[c,h,o,n,l]),{scrollByCallback:function(e){s&&(e={behavior:e.behavior,left:e.top}),c.current.scrollBy(e)},scrollerRef:c,scrollToCallback:function(o){const n=c.current;if(!n||(s?"offsetWidth"in n&&0===n.offsetWidth:"offsetHeight"in n&&0===n.offsetHeight))return;const r="smooth"===o.behavior;let i,l,d;Ot(n)?(l=Math.max(Ce(n.document.documentElement,s?"width":"height"),s?n.document.documentElement.scrollWidth:n.document.documentElement.scrollHeight),i=s?n.innerWidth:n.innerHeight,d=s?window.scrollX:window.scrollY):(l=n[s?"scrollWidth":"scrollHeight"],i=Ce(n,s?"width":"height"),d=n[s?"scrollLeft":"scrollTop"]);const h=l-i;if(o.top=Math.ceil(Math.max(Math.min(h,o.top),0)),_e(i,l)||o.top===d)return e({scrollHeight:l,scrollTop:d,viewportHeight:i}),void(r&&t(!0));r?(a.current=o.top,u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{u.current=null,a.current=null,t(!0)},1e3)):a.current=null,s&&(o={behavior:o.behavior,left:o.top}),n.scrollTo(o)}}}const Lt="-webkit-sticky",Mt="sticky",jt=Ct(()=>{if(typeof document>"u")return Mt;const e=document.createElement("div");return e.style.position=Lt,e.style.position===Lt?Lt:Mt});function Pt(e){return e}const Wt=j(([e,t])=>({...e,...t}),f(yt,j(()=>{const e=O(e=>`Item ${e}`),t=O(e=>`Group ${e}`),o=O({}),n=O(Pt),r=O("div"),i=O(d),l=(e,t=null)=>F(b(o,y(t=>t[e]),w()),t);return{components:o,computeItemKey:n,EmptyPlaceholder:l("EmptyPlaceholder"),FooterComponent:l("Footer"),GroupComponent:l("Group","div"),groupContent:t,HeaderComponent:l("Header"),HeaderFooterTag:r,ItemComponent:l("Item","div"),itemContent:e,ListComponent:l("List","div"),ScrollerComponent:l("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TopItemListComponent:l("TopItemList")}}))),At=({height:e})=>(0,n.jsx)("div",{style:{height:e}}),Vt={overflowAnchor:"none",position:jt(),zIndex:1},Dt={overflowAnchor:"none"},Gt={...Dt,display:"inline-block",height:"100%"},Nt=r.memo(function({showTopList:e=!1}){const t=lo("listState"),o=so("sizeRanges"),i=lo("useWindowScroll"),l=lo("customScrollParent"),s=so("windowScrollContainerState"),c=so("scrollContainerState"),a=l||i?s:c,u=lo("itemContent"),h=lo("context"),m=lo("groupContent"),f=lo("trackItemSizes"),g=lo("itemSize"),p=lo("log"),x=so("gap"),v=lo("horizontalDirection"),{callbackRef:I}=K(o,g,f,e?d:a,p,x,l,v,lo("skipAnimationFrameInResizeObserver")),[T,C]=r.useState(0);io("deviation",e=>{T!==e&&C(e)});const S=lo("EmptyPlaceholder"),w=lo("ScrollSeekPlaceholder")||At,H=lo("ListComponent"),y=lo("ItemComponent"),z=lo("GroupComponent"),b=lo("computeItemKey"),R=lo("isSeeking"),E=lo("groupIndices").length>0,B=lo("alignToBottom"),k=lo("initialItemFinalLocationReached"),O=e?{}:{boxSizing:"border-box",...v?{display:"inline-block",height:"100%",marginLeft:0!==T?T:B?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:0!==T?T:B?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...k?{}:{visibility:"hidden"}};return!e&&0===t.totalCount&&S?(0,n.jsx)(S,{...$t(S,h)}):(0,n.jsx)(H,{...$t(H,h),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:I,style:O,children:(e?t.topItems:t.items).map(e=>{const o=e.originalIndex,n=b(o+t.firstItemIndex,e.data,h);return R?(0,r.createElement)(w,{...$t(w,h),height:e.size,index:e.index,key:n,type:e.type||"item",..."group"===e.type?{}:{groupIndex:e.groupIndex}}):"group"===e.type?(0,r.createElement)(z,{...$t(z,h),"data-index":o,"data-item-index":e.index,"data-known-size":e.size,key:n,style:Vt},m(e.index,h)):(0,r.createElement)(y,{...$t(y,h),...Yt(y,e.data),"data-index":o,"data-item-group-index":e.groupIndex,"data-item-index":e.index,"data-known-size":e.size,key:n,style:v?Gt:Dt},E?u(e.index,e.groupIndex,e.data,h):u(e.index,e.data,h))})})}),_t={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Ut={outline:"none",overflowX:"auto",position:"relative"},Kt=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),qt={position:jt(),top:0,width:"100%",zIndex:1};function $t(e,t){if("string"!=typeof e)return{context:t}}function Yt(e,t){return{item:"string"==typeof e?void 0:t}}const Xt=r.memo(function(){const e=lo("HeaderComponent"),t=so("headerHeight"),o=lo("HeaderFooterTag"),i=_(r.useMemo(()=>e=>{t(Ce(e,"height"))},[t]),!0,lo("skipAnimationFrameInResizeObserver")),l=lo("context");return e?(0,n.jsx)(o,{ref:i,children:(0,n.jsx)(e,{...$t(e,l)})}):null}),Zt=r.memo(function(){const e=lo("FooterComponent"),t=so("footerHeight"),o=lo("HeaderFooterTag"),i=_(r.useMemo(()=>e=>{t(Ce(e,"height"))},[t]),!0,lo("skipAnimationFrameInResizeObserver")),l=lo("context");return e?(0,n.jsx)(o,{ref:i,children:(0,n.jsx)(e,{...$t(e,l)})}):null});function Jt({useEmitter:e,useEmitterValue:t,usePublisher:o}){return r.memo(function({children:r,style:i,context:l,...s}){const c=o("scrollContainerState"),a=t("ScrollerComponent"),u=o("smoothScrollTargetReached"),d=t("scrollerRef"),h=t("horizontalDirection")||!1,{scrollByCallback:m,scrollerRef:f,scrollToCallback:g}=Ft(c,u,a,d,void 0,h);return e("scrollTo",g),e("scrollBy",m),(0,n.jsx)(a,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...h?Ut:_t,...i},tabIndex:0,...s,...$t(a,l),children:r})})}function Qt({useEmitter:e,useEmitterValue:t,usePublisher:o}){return r.memo(function({children:i,style:l,context:s,...c}){const a=o("windowScrollContainerState"),u=t("ScrollerComponent"),d=o("smoothScrollTargetReached"),h=t("totalListHeight"),m=t("deviation"),f=t("customScrollParent"),g=r.useRef(null),p=t("scrollerRef"),{scrollByCallback:x,scrollerRef:v,scrollToCallback:I}=Ft(a,d,u,p,f);return kt(()=>{var e;return v.current=f||(null==(e=g.current)?void 0:e.ownerDocument.defaultView),()=>{v.current=null}},[v,f]),e("windowScrollTo",I),e("scrollBy",x),(0,n.jsx)(u,{ref:g,"data-virtuoso-scroller":!0,style:{position:"relative",...l,...0!==h?{height:h+m}:{}},...c,...$t(u,s),children:i})})}const eo=({children:e})=>{const t=r.useContext(Et),o=so("viewportHeight"),i=so("fixedItemHeight"),l=lo("alignToBottom"),s=lo("horizontalDirection"),a=_(r.useMemo(()=>c(o,e=>Ce(e,s?"width":"height")),[o,s]),!0,lo("skipAnimationFrameInResizeObserver"));return r.useEffect(()=>{t&&(o(t.viewportHeight),i(t.itemHeight))},[t,o,i]),(0,n.jsx)("div",{"data-viewport-type":"element",ref:a,style:Kt(l),children:e})},to=({children:e})=>{const t=r.useContext(Et),o=so("windowViewportRect"),i=so("fixedItemHeight"),l=lo("customScrollParent"),s=$(o,l,lo("skipAnimationFrameInResizeObserver")),c=lo("alignToBottom");return r.useEffect(()=>{t&&(i(t.itemHeight),o({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,o,i]),(0,n.jsx)("div",{"data-viewport-type":"window",ref:s,style:Kt(c),children:e})},oo=({children:e})=>{const t=lo("TopItemListComponent")||"div",o=lo("headerHeight"),r={...qt,marginTop:`${o}px`},i=lo("context");return(0,n.jsx)(t,{style:r,...$t(t,i),children:e})},no=r.memo(function(e){const t=lo("useWindowScroll"),o=lo("topItemsIndexes").length>0,r=lo("customScrollParent"),i=lo("context");return(0,n.jsxs)(r||t?ao:co,{...e,context:i,children:[o&&(0,n.jsx)(oo,{children:(0,n.jsx)(Nt,{showTopList:!0})}),(0,n.jsxs)(r||t?to:eo,{children:[(0,n.jsx)(Xt,{}),(0,n.jsx)(Nt,{}),(0,n.jsx)(Zt,{})]})]})}),{Component:ro,useEmitter:io,useEmitterValue:lo,usePublisher:so}=Rt(Wt,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},no),co=Jt({useEmitter:io,useEmitterValue:lo,usePublisher:so}),ao=Qt({useEmitter:io,useEmitterValue:lo,usePublisher:so}),uo=ro,ho=j(([e,t])=>({...e,...t}),f(yt,j(()=>{const e=O(e=>(0,n.jsxs)("td",{children:["Item $",e]})),t=O(null),o=O(e=>(0,n.jsxs)("td",{colSpan:1e3,children:["Group ",e]})),r=O(null),i=O(null),l=O({}),s=O(Pt),c=O(d),a=(e,t=null)=>F(b(l,y(t=>t[e]),w()),t);return{components:l,computeItemKey:s,context:t,EmptyPlaceholder:a("EmptyPlaceholder"),FillerRow:a("FillerRow"),fixedFooterContent:i,fixedHeaderContent:r,itemContent:e,groupContent:o,ScrollerComponent:a("Scroller","div"),scrollerRef:c,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TableBodyComponent:a("TableBody","tbody"),TableComponent:a("Table","table"),TableFooterComponent:a("TableFoot","tfoot"),TableHeadComponent:a("TableHead","thead"),TableRowComponent:a("TableRow","tr"),GroupComponent:a("Group","tr")}}))),mo=({height:e})=>(0,n.jsx)("tr",{children:(0,n.jsx)("td",{style:{height:e}})}),fo=({height:e})=>(0,n.jsx)("tr",{children:(0,n.jsx)("td",{style:{border:0,height:e,padding:0}})}),go={overflowAnchor:"none"},po={position:jt(),zIndex:2,overflowAnchor:"none"},xo=r.memo(function({showTopList:e=!1}){const t=Ho("listState"),o=Ho("computeItemKey"),i=Ho("firstItemIndex"),l=Ho("context"),s=Ho("isSeeking"),c=Ho("fixedHeaderHeight"),a=Ho("groupIndices").length>0,u=Ho("itemContent"),d=Ho("groupContent"),h=Ho("ScrollSeekPlaceholder")||mo,m=Ho("GroupComponent"),f=Ho("TableRowComponent"),g=(e?t.topItems:[]).reduce((e,t,o)=>(0===o?e.push(t.size):e.push(e[o-1]+t.size),e),[]),p=(e?t.topItems:t.items).map(t=>{const n=t.originalIndex,p=o(n+i,t.data,l),x=e?0===n?0:g[n-1]:0;return s?(0,r.createElement)(h,{...$t(h,l),height:t.size,index:t.index,key:p,type:t.type||"item"}):"group"===t.type?(0,r.createElement)(m,{...$t(m,l),"data-index":n,"data-item-index":t.index,"data-known-size":t.size,key:p,style:{...po,top:c}},d(t.index,l)):(0,r.createElement)(f,{...$t(f,l),...Yt(f,t.data),"data-index":n,"data-item-index":t.index,"data-known-size":t.size,"data-item-group-index":t.groupIndex,key:p,style:e?{...po,top:c+x}:go},a?u(t.index,t.groupIndex,t.data,l):u(t.index,t.data,l))});return(0,n.jsx)(n.Fragment,{children:p})}),vo=r.memo(function(){const e=Ho("listState"),t=Ho("topItemsIndexes").length>0,o=yo("sizeRanges"),i=Ho("useWindowScroll"),l=Ho("customScrollParent"),s=yo("windowScrollContainerState"),c=yo("scrollContainerState"),a=l||i?s:c,u=Ho("trackItemSizes"),d=Ho("itemSize"),h=Ho("log"),{callbackRef:m,ref:f}=K(o,d,u,a,h,void 0,l,!1,Ho("skipAnimationFrameInResizeObserver")),[g,p]=r.useState(0);wo("deviation",e=>{g!==e&&(f.current.style.marginTop=`${e}px`,p(e))});const x=Ho("EmptyPlaceholder"),v=Ho("FillerRow")||fo,I=Ho("TableBodyComponent"),T=Ho("paddingTopAddition"),C=Ho("statefulTotalCount"),S=Ho("context");if(0===C&&x)return(0,n.jsx)(x,{...$t(x,S)});const w=(t?e.topItems:[]).reduce((e,t)=>e+t.size,0),H=e.offsetTop+T+g-w,y=e.offsetBottom,z=H>0?(0,n.jsx)(v,{context:S,height:H},"padding-top"):null,b=y>0?(0,n.jsx)(v,{context:S,height:y},"padding-bottom"):null;return(0,n.jsxs)(I,{"data-testid":"virtuoso-item-list",ref:m,...$t(I,S),children:[z,t&&(0,n.jsx)(xo,{showTopList:!0}),(0,n.jsx)(xo,{}),b]})}),Io=({children:e})=>{const t=r.useContext(Et),o=yo("viewportHeight"),i=yo("fixedItemHeight"),l=_(r.useMemo(()=>c(o,e=>Ce(e,"height")),[o]),!0,Ho("skipAnimationFrameInResizeObserver"));return r.useEffect(()=>{t&&(o(t.viewportHeight),i(t.itemHeight))},[t,o,i]),(0,n.jsx)("div",{"data-viewport-type":"element",ref:l,style:Kt(!1),children:e})},To=({children:e})=>{const t=r.useContext(Et),o=yo("windowViewportRect"),i=yo("fixedItemHeight"),l=Ho("customScrollParent"),s=$(o,l,Ho("skipAnimationFrameInResizeObserver"));return r.useEffect(()=>{t&&(i(t.itemHeight),o({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,o,i]),(0,n.jsx)("div",{"data-viewport-type":"window",ref:s,style:Kt(!1),children:e})},Co=r.memo(function(e){const t=Ho("useWindowScroll"),o=Ho("customScrollParent"),i=yo("fixedHeaderHeight"),l=yo("fixedFooterHeight"),s=Ho("fixedHeaderContent"),a=Ho("fixedFooterContent"),u=Ho("context"),d=_(r.useMemo(()=>c(i,e=>Ce(e,"height")),[i]),!0,Ho("skipAnimationFrameInResizeObserver")),h=_(r.useMemo(()=>c(l,e=>Ce(e,"height")),[l]),!0,Ho("skipAnimationFrameInResizeObserver")),m=o||t?bo:zo,f=o||t?To:Io,g=Ho("TableComponent"),p=Ho("TableHeadComponent"),x=Ho("TableFooterComponent"),v=s?(0,n.jsx)(p,{ref:d,style:{position:"sticky",top:0,zIndex:2},...$t(p,u),children:s()},"TableHead"):null,I=a?(0,n.jsx)(x,{ref:h,style:{bottom:0,position:"sticky",zIndex:1},...$t(x,u),children:a()},"TableFoot"):null;return(0,n.jsx)(m,{...e,...$t(m,u),children:(0,n.jsx)(f,{children:(0,n.jsxs)(g,{style:{borderSpacing:0,overflowAnchor:"none"},...$t(g,u),children:[v,(0,n.jsx)(vo,{},"TableBody"),I]})})})}),{Component:So,useEmitter:wo,useEmitterValue:Ho,usePublisher:yo}=Rt(ho,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},Co),zo=Jt({useEmitter:wo,useEmitterValue:Ho,usePublisher:yo}),bo=Qt({useEmitter:wo,useEmitterValue:Ho,usePublisher:yo}),Ro={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},Eo={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:Bo,floor:ko,max:Oo,min:Fo,round:Lo}=Math;function Mo(e,t,o){return Array.from({length:t-e+1}).map((t,n)=>({data:null===o?null:o[n+e],index:n+e}))}function jo(e,t){return e&&e.width===t.width&&e.height===t.height}function Po(e,t){return e&&e.column===t.column&&e.row===t.row}const Wo=j(([{increaseViewportBy:e,listBoundary:t,overscan:o,visibleRange:n},{footerHeight:r,headerHeight:i,scrollBy:l,scrollContainerState:s,scrollTo:c,scrollTop:a,smoothScrollTargetReached:u,viewportHeight:d},h,m,{didMount:f,propsReady:x},{customScrollParent:v,useWindowScroll:C,windowScrollContainerState:S,windowScrollTo:R,windowViewportRect:j},P])=>{const V=O(0),D=O(0),G=O(Ro),N=O({height:0,width:0}),_=O({height:0,width:0}),U=L(),K=L(),q=O(0),$=O(null),Y=O({column:0,row:0}),X=L(),Z=L(),J=O(!1),Q=O(0),ee=O(!0),te=O(!1),oe=O(!1);g(b(f,k(Q),H(([e,t])=>!!t)),()=>{p(ee,!1)}),g(b(W(f,ee,_,N,Q,te),H(([e,t,o,n,,r])=>e&&!t&&0!==o.height&&0!==n.height&&!r)),([,,,,e])=>{p(te,!0),De(1,()=>{p(U,e)}),T(b(a),()=>{p(t,[0,0]),p(ee,!0)})}),I(b(Z,H(e=>null!=e&&e.scrollTop>0),z(0)),D),g(b(f,k(Z),H(([,e])=>null!=e)),([,e])=>{e&&(p(N,e.viewport),p(_,e.item),p(Y,e.gap),e.scrollTop>0&&(p(J,!0),T(b(a,E(1)),e=>{p(J,!1)}),p(c,{top:e.scrollTop})))}),I(b(N,y(({height:e})=>e)),d),I(b(W(A(N,jo),A(_,jo),A(Y,(e,t)=>e&&e.column===t.column&&e.row===t.row),A(a)),y(([e,t,o,n])=>({gap:o,item:t,scrollTop:n,viewport:e}))),X),I(b(W(A(V),n,A(Y,Po),A(_,jo),A(N,jo),A($),A(D),A(J),A(ee),A(Q)),H(([,,,,,,,e])=>!e),y(([e,[t,o],n,r,i,l,s,,c,a])=>{const{column:u,row:d}=n,{height:h,width:m}=r,{width:f}=i;if(0===s&&(0===e||0===f))return Ro;if(0===m){const t=Ge(a,e);return function(e){return{...Eo,items:e}}(Mo(t,t+Math.max(s-1,0),l))}const g=Ao(f,m,u);let p,x;c?0===t&&0===o&&s>0?(p=0,x=s-1):(p=g*ko((t+d)/(h+d)),x=g*Bo((o+d)/(h+d))-1,x=Fo(e-1,Oo(x,g-1)),p=Fo(x,Oo(0,p))):(p=0,x=-1);const v=Mo(p,x,l),{bottom:I,top:T}=Vo(i,n,r,v),C=Bo(e/g);return{bottom:I,itemHeight:h,items:v,itemWidth:m,offsetBottom:C*h+(C-1)*d-I,offsetTop:T,top:T}})),G),I(b($,H(e=>null!==e),y(e=>e.length)),V),I(b(W(N,_,G,Y),H(([e,t,{items:o}])=>o.length>0&&0!==t.height&&0!==e.height),y(([e,t,{items:o},n])=>{const{bottom:r,top:i}=Vo(e,n,t,o);return[i,r]}),w(xe)),t);const ne=O(!1);I(b(a,k(ne),y(([e,t])=>t||0!==e)),ne);const re=M(b(W(G,V),H(([{items:e}])=>e.length>0),k(ne),H(([[e,t],o])=>{const n=e.items[e.items.length-1].index===t-1;return(o||e.bottom>0&&e.itemHeight>0&&0===e.offsetBottom&&e.items.length===t)&&n}),y(([[,e]])=>e-1),w())),ie=M(b(A(G),H(({items:e})=>e.length>0&&0===e[0].index),z(0),w())),le=M(b(A(G),k(J),H(([{items:e},t])=>e.length>0&&!t),y(([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index})),w(pe),B(0)));I(le,m.scrollSeekRangeChanged),I(b(U,k(N,_,V,Y),y(([e,t,o,n,r])=>{const i=Ae(e),{align:l,behavior:s,offset:c}=i;let a=i.index;"LAST"===a&&(a=n-1),a=Oo(0,a,Fo(n-1,a));let u=Do(t,r,o,a);return"end"===l?u=Lo(u-t.height+o.height):"center"===l&&(u=Lo(u-t.height/2+o.height/2)),c&&(u+=c),{behavior:s,top:u}})),c);const se=F(b(G,y(e=>e.offsetBottom+e.bottom)),0);return I(b(j,y(e=>({height:e.visibleHeight,width:e.visibleWidth}))),N),{customScrollParent:v,data:$,deviation:q,footerHeight:r,gap:Y,headerHeight:i,increaseViewportBy:e,initialItemCount:D,itemDimensions:_,overscan:o,restoreStateFrom:Z,scrollBy:l,scrollContainerState:s,scrollHeight:K,scrollTo:c,scrollToIndex:U,scrollTop:a,smoothScrollTargetReached:u,totalCount:V,useWindowScroll:C,viewportDimensions:N,windowScrollContainerState:S,windowScrollTo:R,windowViewportRect:j,...m,gridState:G,horizontalDirection:oe,initialTopMostItemIndex:Q,totalListHeight:se,...h,endReached:re,propsReady:x,rangeChanged:le,startReached:ie,stateChanged:X,stateRestoreInProgress:J,...P}},f(et,Y,$e,pt,Pe,xt,N));function Ao(e,t,o){return Oo(1,ko((e+o)/(ko(t)+o)))}function Vo(e,t,o,n){const{height:r}=o;if(void 0===r||0===n.length)return{bottom:0,top:0};const i=Do(e,t,o,n[0].index);return{bottom:Do(e,t,o,n[n.length-1].index)+r,top:i}}function Do(e,t,o,n){const r=Ao(e.width,o.width,t.column),i=ko(n/r),l=i*o.height+Oo(0,i-1)*t.row;return l>0?l+t.row:l}const Go=j(([e,t])=>({...e,...t}),f(Wo,j(()=>{const e=O(e=>`Item ${e}`),t=O({}),o=O(null),n=O("virtuoso-grid-item"),r=O("virtuoso-grid-list"),i=O(Pt),l=O("div"),s=O(d),c=(e,o=null)=>F(b(t,y(t=>t[e]),w()),o),a=O(!1),u=O(!1);return I(A(u),a),{components:t,computeItemKey:i,context:o,FooterComponent:c("Footer"),HeaderComponent:c("Header"),headerFooterTag:l,itemClassName:n,ItemComponent:c("Item","div"),itemContent:e,listClassName:r,ListComponent:c("List","div"),readyStateChanged:a,reportReadyState:u,ScrollerComponent:c("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}))),No=r.memo(function(){const e=Zo("gridState"),t=Zo("listClassName"),o=Zo("itemClassName"),i=Zo("itemContent"),l=Zo("computeItemKey"),s=Zo("isSeeking"),c=Jo("scrollHeight"),a=Zo("ItemComponent"),u=Zo("ListComponent"),d=Zo("ScrollSeekPlaceholder"),h=Zo("context"),m=Jo("itemDimensions"),f=Jo("gap"),g=Zo("log"),p=Zo("stateRestoreInProgress"),x=Jo("reportReadyState"),v=_(r.useMemo(()=>e=>{const t=e.parentElement.parentElement.scrollHeight;c(t);const o=e.firstChild;if(o){const{height:e,width:t}=o.getBoundingClientRect();m({height:e,width:t})}f({column:tn("column-gap",getComputedStyle(e).columnGap,g),row:tn("row-gap",getComputedStyle(e).rowGap,g)})},[c,m,f,g]),!0,!1);return kt(()=>{e.itemHeight>0&&e.itemWidth>0&&x(!0)},[e]),p?null:(0,n.jsx)(u,{className:t,ref:v,...$t(u,h),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(t=>{const c=l(t.index,t.data,h);return s?(0,n.jsx)(d,{...$t(d,h),height:e.itemHeight,index:t.index,width:e.itemWidth},c):(0,r.createElement)(a,{...$t(a,h),className:o,"data-index":t.index,key:c},i(t.index,t.data,h))})})}),_o=r.memo(function(){const e=Zo("HeaderComponent"),t=Jo("headerHeight"),o=Zo("headerFooterTag"),i=_(r.useMemo(()=>e=>{t(Ce(e,"height"))},[t]),!0,!1),l=Zo("context");return e?(0,n.jsx)(o,{ref:i,children:(0,n.jsx)(e,{...$t(e,l)})}):null}),Uo=r.memo(function(){const e=Zo("FooterComponent"),t=Jo("footerHeight"),o=Zo("headerFooterTag"),i=_(r.useMemo(()=>e=>{t(Ce(e,"height"))},[t]),!0,!1),l=Zo("context");return e?(0,n.jsx)(o,{ref:i,children:(0,n.jsx)(e,{...$t(e,l)})}):null}),Ko=({children:e})=>{const t=r.useContext(Bt),o=Jo("itemDimensions"),i=Jo("viewportDimensions"),l=_(r.useMemo(()=>e=>{i(e.getBoundingClientRect())},[i]),!0,!1);return r.useEffect(()=>{t&&(i({height:t.viewportHeight,width:t.viewportWidth}),o({height:t.itemHeight,width:t.itemWidth}))},[t,i,o]),(0,n.jsx)("div",{ref:l,style:Kt(!1),children:e})},qo=({children:e})=>{const t=r.useContext(Bt),o=Jo("windowViewportRect"),i=Jo("itemDimensions"),l=Zo("customScrollParent"),s=$(o,l,!1);return r.useEffect(()=>{t&&(i({height:t.itemHeight,width:t.itemWidth}),o({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,o,i]),(0,n.jsx)("div",{ref:s,style:Kt(!1),children:e})},$o=r.memo(function({...e}){const t=Zo("useWindowScroll"),o=Zo("customScrollParent"),r=o||t?en:Qo,i=o||t?qo:Ko,l=Zo("context");return(0,n.jsx)(r,{...e,...$t(r,l),children:(0,n.jsxs)(i,{children:[(0,n.jsx)(_o,{}),(0,n.jsx)(No,{}),(0,n.jsx)(Uo,{})]})})}),{Component:Yo,useEmitter:Xo,useEmitterValue:Zo,usePublisher:Jo}=Rt(Go,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},$o),Qo=Jt({useEmitter:Xo,useEmitterValue:Zo,usePublisher:Jo}),en=Qt({useEmitter:Xo,useEmitterValue:Zo,usePublisher:Jo});function tn(e,t,o){return"normal"!==t&&!(null!=t&&t.endsWith("px"))&&o(`${e} was not resolved to pixel value correctly`,t,D.WARN),"normal"===t?0:parseInt(null!=t?t:"0",10)}}}]);