Module 511205

1,405 characters · in aa8f8d1dac61a394.js
Dependencies
Required by (1)
Lazily required by (0)none
Lazily requires (0)none
Source Raw
function(e,t,n){n.d(t,{A:()=>h});var i=n(477900),l=n(582128),a=n(503698),s=n.n(a),r=n(962125),o=n(265287);let c=16/9;function d(e,t){return Math.max(1,Math.floor((t-e)/(8+e))+1)}function u(e,t,n){let i=t-e;for(;i>0;){let t=e,l=Math.floor(i/2);n(t+=l)?(e=t+1,i-=l+1):i=l}return e}function h(e){let{className:t,children:n,keyExtractor:a,paddingTop:h=0,paddingBottom:p=0}=e,[m,A]=l.useState({width:0,height:0}),{width:f,height:x}=m,g=n?.length??0,C=f-16,y=x-(h+p),{tileStyle:j,tileWidth:I,rows:N,columns:v}=l.useMemo(()=>(function(e,t,n){var i,l,a;let s,r,o,h,{rows:p,columns:m,tileWidth:A}=(i=e,l=t,a=n,r=Math.floor(l/25),s=i>25?u(r,l,e=>{let t;return d(e,l)*(Math.ceil((a-(t=e/c))/(8+t))+1)>25}):u(r,l,e=>{let t;return d(e,l)*(Math.floor((a-(t=e/c))/(8+t))+1)>=i})-1,h=Math.ceil(i/(o=d(s,l))),{tileWidth:s,columns:Math.max(1,o),rows:h});return{tileStyle:{width:A},tileWidth:A,rows:p,columns:m}})(g,C,y),[g,C,y]),E=v+1,b=E*I+(E-1)*8<=f,_=Math.floor(I/c)+8,T=Math.max(0,y-_*N)/2;return(0,i.jsx)(r.A,{fade:!0,className:t,listPadding:[h+T,0,p+T-8,8],renderRow:function(e){let t=e*v;return(0,i.jsx)("div",{className:o.nM,children:n?.slice(t,t+v)?.map((e,n)=>{let l=t+n;return(0,i.jsx)("div",{style:j,className:s()(o.Vs,{[o.E3]:b,[o.k4]:l>=(N-1)*v,[o.Kk]:(l+1)%v==0||l===g-1}),children:(0,i.jsx)("div",{className:o.eP,children:e(I)})},a?.(l)??l)})},e)},rowCount:N,rowCountBySection:[N],rowHeight:_,onResize:A})}}