@ehfuse/mui-virtual-data-table 1.7.3 → 1.8.1
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.
- package/README.md +27 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +3 -3
- package/dist/index.js +2 -2
- package/dist/index.js.map +3 -3
- package/dist/types.d.ts +19 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -154,6 +154,9 @@ function App() {
|
|
|
154
154
|
colorMode={"light" | "dark"} // notion colors independent of the MUI palette mode
|
|
155
155
|
mobile={boolean | { query?, renderRow? }} // 1.6.0 card list on narrow screens (see "Mobile list")
|
|
156
156
|
scrollParent={HTMLElement | null} // 1.7.0 virtualize against an outer (page) scroller
|
|
157
|
+
columnResize={boolean | { minWidth? }} // 1.8.0 drag the header's right edge to resize a column (see "Column resize")
|
|
158
|
+
columnWidths={Record<string, number>} // 1.8.0 resized widths by column id (you store them)
|
|
159
|
+
onColumnWidthsChange={(widths) => void} // 1.8.0 fired once on release / on double-click reset
|
|
157
160
|
|
|
158
161
|
// Optional - 1.4.0 header context menu (right-click on th never shows the browser menu)
|
|
159
162
|
onSortClear={() => void} // adds "정렬 풀기" to the header menu (and re-picking the active direction clears)
|
|
@@ -243,6 +246,30 @@ string `emptyMessage` = one light grey line under the header, footer cells use t
|
|
|
243
246
|
and grows with the page, so things bound to the page scroller (collapsing app bar, scroll-to-top, pull-to-refresh) keep working.
|
|
244
247
|
Pass `null` while the element is not known yet (nothing is drawn until then). Works with `mobile` and `onEndReached`.
|
|
245
248
|
|
|
249
|
+
### Column resize (1.8.0)
|
|
250
|
+
|
|
251
|
+
`columnResize` puts a grip on each header cell's right edge (`col-resize` cursor, a thin line on hover). Drag it to resize that column,
|
|
252
|
+
double-click it to go back to the column's own `width`. The table does not store anything — keep the widths where you like
|
|
253
|
+
(account settings, localStorage …) and pass them back with `columnWidths`. Without `columnWidths` the table only remembers them until it remounts.
|
|
254
|
+
|
|
255
|
+
```tsx
|
|
256
|
+
const [widths, setWidths] = useAccountSetting("customer.list"); // Record<columnId, px>
|
|
257
|
+
<VirtualDataTable
|
|
258
|
+
columnResize // or { minWidth: 60 } — default minimum 48px (a column's own minWidth wins)
|
|
259
|
+
columnWidths={isPhone ? undefined : widths}
|
|
260
|
+
onColumnWidthsChange={setWidths} // once on release; double-click → the key is removed
|
|
261
|
+
...
|
|
262
|
+
/>
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
- While dragging only CSS variables on the table box change — rows are not re-rendered, virtualization and horizontal scroll stay as they are.
|
|
266
|
+
- The click that follows a drag is swallowed, so releasing over a header never sorts / opens the header menu.
|
|
267
|
+
- A flexible column (no `width`) keeps a minimum of its `minWidth` (or the resize minimum) once anything was resized; when every column ends up
|
|
268
|
+
with a pixel width the table is as wide as their sum (no stretching that would make drawn widths differ from the dragged ones).
|
|
269
|
+
If no column is flexible, the first drag captures every column's drawn width (1.8.1) so the other columns do not jump.
|
|
270
|
+
- Works with `pinned: "left"` (sticky offsets follow), `autoHeight`, `framed`, `tableLayout`, `variant="notion"`, `pinnedRows`, footer.
|
|
271
|
+
In the `mobile` card list there is no grip and `columnWidths` is ignored.
|
|
272
|
+
|
|
246
273
|
### Mobile list (1.6.0)
|
|
247
274
|
|
|
248
275
|
`mobile` turns the table into a card list on narrow screens (default query `(max-width:599.95px)`): no header row, one card per row,
|
package/dist/index.d.ts
CHANGED
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
export { VirtualDataTable } from "./VirtualDataTable";
|
|
9
9
|
export { HeaderMenu, HeaderMenuItem, HeaderMenuDivider, HeaderMenuIcon, HeaderFilterIcon, headerMenuAnchor, HEADER_MENU_ICON_PATHS, HEADER_MENU_ITEM_SX, HEADER_MENU_FONT_SIZE, HEADER_MENU_ICON_SIZE, HEADER_MENU_ITEM_HEIGHT, } from "./HeaderMenu";
|
|
10
10
|
export type { HeaderMenuProps, HeaderMenuItemProps, HeaderMenuOption, HeaderMenuSortConfig, HeaderMenuFilterConfig, HeaderMenuSortDirection, } from "./HeaderMenu";
|
|
11
|
-
export type { DataColumn, SortDirection, SortableFilter, VirtualDataTableProps, VDTMobileConfig, VDTMobileSlot, } from "./types";
|
|
11
|
+
export type { DataColumn, SortDirection, SortableFilter, VirtualDataTableProps, VDTMobileConfig, VDTMobileSlot, VDTColumnResizeConfig, VDTColumnWidths, } from "./types";
|
package/dist/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{forwardRef as
|
|
1
|
+
import{forwardRef as $e,useCallback as k,useMemo as ie,useRef as w,useEffect as te,memo as Cr,useState as Me}from"react";import{Box as S,Table as Mr,TableBody as Cn,TableCell as ue,TableContainer as wr,TableHead as Sr,TableFooter as Tr,TableRow as _e,TableSortLabel as zt,Paper as Rr,Typography as Hr,useTheme as Er,useMediaQuery as kr}from"@mui/material";import{TableVirtuoso as Lr}from"react-virtuoso";import{jsx as Lt}from"react/jsx-runtime";import{useRef as mn,useState as ir,useEffect as lr}from"react";import{Box as sr,CircularProgress as dr}from"@mui/material";var Oe=function(){return Oe=Object.assign||function(c){for(var a,m=1,h=arguments.length;m<h;m++){a=arguments[m];for(var p in a)Object.prototype.hasOwnProperty.call(a,p)&&(c[p]=a[p])}return c},Oe.apply(this,arguments)};function bn(o){var c=o.visible,a=o.onComplete,m=o.fadeoutDuration,h=m===void 0?200:m,p=o.exitDelay,_=p===void 0?0:p,ne=o.size,pe=ne===void 0?40:ne,le=o.className,se=o.style,A=o.sx,V=o.indicator,z=o.background,N=z===void 0?{show:!0,color:"255, 255, 255",opacity:.9}:z,T=mn(void 0),D=mn(null),fe=ir(c),j=fe[0],R=fe[1],he=N.show,f=he===void 0?!0:he,E=N.color,P=E===void 0?"255, 255, 255":E,re=N.opacity,de=re===void 0?.9:re;if(lr(function(){var we=T.current;if(we===!0&&c===!1&&D.current){var Xe=D.current;Xe.style.opacity="0",setTimeout(function(){R(!1),a?.()},h+_)}else c===!0&&(R(!0),D.current&&(D.current.style.opacity="1"));T.current=c},[c,a,h,_]),!j)return null;var lt=function(){return typeof V=="string"?Lt("img",{src:V,alt:"Loading",style:{width:pe,height:pe}}):V||Lt(dr,{size:pe})},ce=function(){return f?P.startsWith("rgba")?{backgroundColor:P}:/^\d+,\s*\d+,\s*\d+$/.test(P)?{backgroundColor:"rgba(".concat(P,", ").concat(de,")")}:de!==1?{backgroundColor:P,"&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:P,opacity:de,zIndex:-1}}:{backgroundColor:P}:{backgroundColor:"transparent"}};return Lt(sr,{ref:D,className:le,style:Oe({},se),sx:Oe(Oe({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,opacity:c?1:0,transition:"opacity ".concat(h,"ms ease-out")},ce()),A),children:lt()})}import{Fragment as ur,jsx as xn,jsxs as pr}from"react/jsx-runtime";var cr=`
|
|
2
2
|
.vdt-css-spinner{box-sizing:border-box;border-radius:50%;border:4px solid rgba(28,64,125,0.14);border-top-color:#1c407d;animation:vdt-css-spinner-spin .75s linear infinite}
|
|
3
3
|
@keyframes vdt-css-spinner-spin{to{transform:rotate(360deg)}}
|
|
4
|
-
`;function Gt({size:a=54}){return Fn(Wn,{children:[qt("style",{children:_n}),qt("span",{className:"vdt-css-spinner",role:"progressbar","aria-label":"loading",style:{display:"inline-block",width:a,height:a}})]})}import je,{useMemo as Vn,useState as $n}from"react";import{Box as Be,Divider as Xn,InputBase as Yn,Menu as Un,MenuItem as jn,SvgIcon as Kn}from"@mui/material";import{jsx as h,jsxs as qe}from"react/jsx-runtime";var bt=14,mt=18,xt=34,U={asc:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",desc:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",checked:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z",unchecked:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z",radioOn:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z",radioOff:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z",filter:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z",search:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"};function me({d:a,size:c=mt,color:i}){return h(Kn,{sx:{fontSize:c,flexShrink:0,color:i},children:h("path",{d:a})})}function yt({size:a=14,active:c,color:i}){let C={stroke:"currentColor",strokeWidth:1.8,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"};return qe(Be,{component:"svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,sx:{width:a,height:a,flexShrink:0,color:c?"primary.main":i??"currentColor",verticalAlign:"middle"},children:[h("path",{d:"M2 17.5H7",...C}),h("path",{d:"M22 6.5H17",...C}),h("path",{d:"M13 17.5H22",...C}),h("path",{d:"M11 6.5H2",...C}),h("path",{d:"M10 20.3999C8.34315 20.3999 7 19.0568 7 17.3999C7 15.743 8.34315 14.3999 10 14.3999C11.6569 14.3999 13 15.743 13 17.3999C13 19.0568 11.6569 20.3999 10 20.3999Z",...C}),h("path",{d:"M14 9.3999C15.6569 9.3999 17 8.05676 17 6.3999C17 4.74305 15.6569 3.3999 14 3.3999C12.3431 3.3999 11 4.74305 11 6.3999C11 8.05676 12.3431 9.3999 14 9.3999Z",...C})]})}var Zt={gap:1,fontSize:bt,lineHeight:"20px",minHeight:xt,py:"7px",px:1.5};function q({icon:a,iconSpace:c,selected:i,disabled:C,muted:g,onClick:d,sx:N,children:j}){return qe(jn,{selected:i,disabled:C,onClick:d,sx:[Zt,g?{color:"text.secondary"}:{},...Array.isArray(N)?N:N?[N]:[]],children:[a??(c?h(Be,{component:"span",sx:{width:mt,flexShrink:0}}):null),j]})}function Ke(){return h(Xn,{sx:{my:"4px !important"}})}function qn(a,c){let i=a.getBoundingClientRect();return{left:c??i.left,top:i.bottom}}function Ct({open:a,anchorPosition:c,anchorEl:i,onClose:C,sort:g,filter:d,header:N,children:j,minWidth:oe=180,maxHeight:Z=420}){let[Q,L]=$n(""),O=d?.multiple!==!1,B=d?.value??[],A=Vn(()=>{if(!d)return[];let u=d.options;return d.emptyLabel&&!u.some(R=>R.value==="")?[...u,{value:"",label:d.emptyLabel}]:u},[d]),M=!!d&&(d?.searchable??A.length>10),k=Q.trim().toLowerCase(),ae=k?A.filter(u=>u.label.toLowerCase().includes(k)):A,F=()=>{L(""),C()},v=[];if(N&&v.push(...je.Children.toArray(N).map((u,R)=>je.isValidElement(u)?je.cloneElement(u,{key:`h${R}`}):u)),g){let u=R=>{F(),g.onChange(g.active===R&&g.clearable!==!1?null:R)};v.push(h(q,{selected:g.active==="asc",onClick:()=>u("asc"),icon:h(me,{d:U.asc,color:"text.secondary"}),children:"\uC624\uB984\uCC28\uC21C \uC815\uB82C"},"sort-asc"),h(q,{selected:g.active==="desc",onClick:()=>u("desc"),icon:h(me,{d:U.desc,color:"text.secondary"}),children:"\uB0B4\uB9BC\uCC28\uC21C \uC815\uB82C"},"sort-desc")),g.active&&g.clearable!==!1&&v.push(h(q,{muted:!0,iconSpace:!0,onClick:()=>{F(),g.onChange(null)},children:"\uC815\uB82C \uD480\uAE30"},"sort-clear"))}return g&&d&&v.push(h(Ke,{},"div-sort")),d&&(M&&v.push(qe(Be,{onKeyDown:u=>u.stopPropagation(),sx:{display:"flex",alignItems:"center",gap:1,px:1.5,pb:.5,minHeight:xt},children:[h(me,{d:U.search,color:"text.secondary"}),h(Yn,{autoFocus:!0,value:Q,onChange:u=>L(u.target.value),placeholder:d.searchPlaceholder??"\uCC3E\uAE30",sx:{flex:1,fontSize:bt}})]},"search")),!O&&d.allLabel&&v.push(h(q,{selected:B.length===0,onClick:()=>{F(),d.onChange([])},icon:h(me,{d:B.length===0?U.radioOn:U.radioOff,color:B.length===0?"primary.main":"text.disabled"}),children:d.allLabel},"f-all")),A.length===0&&v.push(h(q,{disabled:!0,iconSpace:!0,children:d.emptyText??"\uACE0\uB97C \uAC12\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},"f-none")),ae.forEach(u=>{let R=B.includes(u.value),E=()=>{if(O){d.onChange(R?B.filter(J=>J!==u.value):[...B,u.value]);return}F(),d.onChange(R?[]:[u.value])},K=O?R?U.checked:U.unchecked:R?U.radioOn:U.radioOff;v.push(qe(q,{selected:!O&&R,onClick:E,icon:h(me,{d:K,color:R?"primary.main":"text.disabled"}),children:[u.icon,h(Be,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:u.render??u.label}),typeof u.count=="number"?h(Be,{component:"span",sx:{color:"text.secondary",ml:1,fontVariantNumeric:"tabular-nums"},children:u.count}):null]},`f:${u.value||"(empty)"}`))}),M&&k&&ae.length===0&&v.push(h(q,{disabled:!0,iconSpace:!0,children:"\uCC3E\uB294 \uAC12\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},"f-nohit")),B.length>0&&v.push(h(Ke,{},"div-filter"),h(q,{muted:!0,iconSpace:!0,onClick:()=>{F(),d.onChange([])},children:d.clearLabel??"\uAC70\uB974\uAE30 \uD480\uAE30"},"f-clear"))),j&&(v.length>0&&v.push(h(Ke,{},"div-children")),v.push(...je.Children.toArray(j))),h(Un,{open:a&&(!!c||!!i),...!c&&!!i?{anchorEl:i}:{anchorReference:"anchorPosition",anchorPosition:c??void 0},onClose:F,transitionDuration:0,disableAutoFocusItem:M,onContextMenu:u=>u.preventDefault(),onClick:u=>u.stopPropagation(),slotProps:{paper:{sx:{maxHeight:Z,minWidth:oe}},list:{sx:{py:.5}}},children:v})}import ir from"@ehfuse/overlay-scrollbar";import{Fragment as Ne,jsx as o,jsxs as I}from"react/jsx-runtime";var lr={alignment:"default",margin:0,radius:0},vt=5,sr={bg:"#ffffff",border:"#e6e6e3",borderStrong:"#dedddb",headerColor:"#787774",hoverBg:"#f8f8f7",emptyColor:"#9b9a97",selectedBg:"#dbeafe",selectedBar:"#3b82f6"},Jt="12px",dr={bg:"#1e1e1e",border:"#2c333c",borderStrong:"#3b434e",headerColor:"#a3adbb",hoverBg:"#272d36",emptyColor:"#7d8590",selectedBg:"rgba(59, 130, 246, 0.22)",selectedBar:"#60a5fa"},en=Oe((a,c)=>o("div",{...a,ref:c}));en.displayName="VdtPlainScroller";var cr="(max-width:599.95px)";function wt(a){return!!(a.filterOptions&&a.onFilterChange)}function ur({data:a,loading:c=!1,columns:i,onRowClick:C,getRowId:g,selectedRowId:d,selectedRowSx:N,rowHeight:j,columnHeight:oe,striped:Z,rowDivider:Q=!0,onSort:L,onSortClear:O,onHeaderContextMenu:B,onLoadMore:A,sortBy:M,sortDirection:k,showPaper:ae=!0,paddingX:F,paddingTop:v=0,paddingBottom:ie=0,rowHoverColor:u,rowHoverOpacity:R,viewportBuffer:E,overscan:K,initialItemCount:J,scrollbars:Ge,emptyMessage:ee="NO DATA",autoHeight:xe=!1,LoadingComponent:ze,showFooter:tn,footerHeight:ye,footerSx:Ce,variant:nn="default",framed:fe=!0,headerTopBorder:rn=!1,rowHeightMode:on="fixed",tableLayout:_e="fixed",renderFullWidthRow:Ze,fullWidthRowSx:Me,onRowContextMenu:St,pinnedRows:ve,pinnedRowsMaxHeight:Qe,pinnedRowsSx:we,resetScrollOnDataChange:Tt=!0,rowKeyFromId:an=!1,onEndReached:Rt,colorMode:ln,mobile:Ht,scrollParent:Je}){let x=nn==="notion",et=rr(),b=(ln??et.palette.mode)==="dark"?dr:sr,kt=(ve?.length??0)>0,le=oe??(x?40:56),V=j??(x?48:50),We=fe?F??(x?"12px":"1rem"):0,Se=Ht===!0?{}:Ht||null,sn=or(Se?.query??cr,{noSsr:!0}),$=!!Se&&sn,Te=!!Je,se=xe||Te,tt=on==="auto"||$,nt=u??(x?b.hoverBg:void 0),Et=R??(x?1:void 0),dn=Math.max(V*12,480),cn=Math.max(V*12,480),un=typeof E=="number"?E:E?.top??dn,pn=typeof E=="number"?E:E?.bottom??cn,fn=Math.max(V*8,420),hn=Math.max(V*10,520),gn=typeof K=="number"?K:{main:K?.main??fn,reverse:K?.reverse??hn},Re=V+(Q?1:0),bn=ne(()=>x?{backgroundColor:b.selectedBg,"& > td:first-of-type":{boxShadow:`inset 3px 0 0 ${b.selectedBar}`},"& > td[data-vdt-pinned]":{backgroundColor:b.selectedBg}}:void 0,[x,b]),X=N??bn,Fe=!X||typeof X!="function",mn=ne(()=>!Fe||d===null||d===void 0||!X?null:{[`& tbody tr[data-row-id="${String(d).replace(/["\\]/g,"\\$&")}"]`]:X},[Fe,d,X]),fr=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),[w]=Ae(()=>typeof window>"u"?!1:window.localStorage.getItem("vdt-perf-debug")==="1"),m=T({wheelEvents:0,wheelInputPx:0,wheelHandlerMs:0,wheelRafFlushes:0,wheelRafMs:0,rangeChangedCalls:0,rangeChangedMs:0,rowContentCalls:0,rowContentMs:0,rowContentMaxMs:0,cellRenderCalls:0,cellRenderMs:0,cellRenderMaxMs:0}),rt=P(t=>{if(!w)return;let e=m.current;if(!(e.wheelEvents>0||e.rangeChangedCalls>0||e.rowContentCalls>0||e.cellRenderCalls>0))return;let s=e.rowContentCalls>0?e.rowContentMs/e.rowContentCalls:0,f=e.cellRenderCalls>0?e.cellRenderMs/e.cellRenderCalls:0;console.log("[VDT perf]",{reason:t,wheel:{events:e.wheelEvents,inputPx:Math.round(e.wheelInputPx),handlerMs:Number(e.wheelHandlerMs.toFixed(2)),rafFlushes:e.wheelRafFlushes,rafMs:Number(e.wheelRafMs.toFixed(2))},rangeChanged:{calls:e.rangeChangedCalls,totalMs:Number(e.rangeChangedMs.toFixed(2))},rowContent:{calls:e.rowContentCalls,totalMs:Number(e.rowContentMs.toFixed(2)),avgMs:Number(s.toFixed(3)),maxMs:Number(e.rowContentMaxMs.toFixed(3))},cellRender:{calls:e.cellRenderCalls,totalMs:Number(e.cellRenderMs.toFixed(2)),avgMs:Number(f.toFixed(3)),maxMs:Number(e.cellRenderMaxMs.toFixed(3))}}),m.current={wheelEvents:0,wheelInputPx:0,wheelHandlerMs:0,wheelRafFlushes:0,wheelRafMs:0,rangeChangedCalls:0,rangeChangedMs:0,rowContentCalls:0,rowContentMs:0,rowContentMaxMs:0,cellRenderCalls:0,cellRenderMs:0,cellRenderMaxMs:0}},[w]);G(()=>{if(!w||typeof window>"u")return;console.log("[VDT perf] enabled (localStorage vdt-perf-debug=1)");let t=window.setInterval(()=>{rt("interval")},1500);return()=>{window.clearInterval(t),rt("cleanup")}},[rt,w]);let Lt=ne(()=>Oe((t,e)=>{let r=T(null),s=T(0),f=T(null);return G(()=>{let n=r.current;if(!n)return;let l=H=>{let p=w?performance.now():0;if(H.shiftKey||Math.abs(H.deltaX)>Math.abs(H.deltaY))return;let D=H.target?.closest?.("[data-vdt-inner-scroll]");if(D&&n.contains(D)&&(H.deltaY<0?D.scrollTop>0:D.scrollTop+D.clientHeight<D.scrollHeight-1))return;H.preventDefault();let te=H.deltaY;H.deltaMode===1?te*=40:H.deltaMode===2&&(te*=n.clientHeight),w&&(m.current.wheelEvents+=1,m.current.wheelInputPx+=te),s.current+=te,f.current===null&&(f.current=requestAnimationFrame(()=>{let ge=w?performance.now():0,S=Math.max(n.clientHeight*.4,160),_=Math.max(-S,Math.min(S,s.current));s.current=0,f.current=null,_!==0&&(n.scrollTop+=_),w&&(m.current.wheelRafFlushes+=1,m.current.wheelRafMs+=performance.now()-ge)}),w&&(m.current.wheelHandlerMs+=performance.now()-p))};return n.addEventListener("wheel",l,{passive:!1}),()=>{n.removeEventListener("wheel",l),f.current!==null&&(cancelAnimationFrame(f.current),f.current=null),s.current=0}},[]),o(ir,{detectInnerScroll:!0,track:lr,...Ge,children:o(Qn,{component:y,...t,ref:n=>{r.current=n,typeof e=="function"?e(n):e&&(e.current=n)},sx:{userSelect:"auto",WebkitUserSelect:"auto",position:"relative",width:"100%",height:"100%",overflow:"auto",display:"flex",flexDirection:"column",scrollbarWidth:"none",msOverflowStyle:"none",transform:"translateZ(0)",backfaceVisibility:"hidden",willChange:"scroll-position","&::-webkit-scrollbar":{display:"none"},"& .MuiTable-root":{paddingRight:x?0:We,paddingTop:typeof v=="number"?`${v}px`:v,paddingBottom:typeof ie=="number"?`${ie}px`:ie}}})})}),[]),ot=ne(()=>{if(Z===!0)return"#f5f5f5";if(typeof Z=="string")return Z},[Z]),[xn,Dt]=Ae(c),[yn,Cn]=Ae(0);G(()=>{c&&Dt(!0)},[c]);let It=P(()=>{Dt(!1)},[]),Mn=xn,hr=c&&a.length>0,at=T(!1),it=T(-1),lt=T(null),st=T(null),[vn,wn]=Ae(!1),Ve=P(()=>{let t=st.current;t&&wn(t.scrollHeight>t.clientHeight+1)},[]);G(()=>{let t=st.current;if(!t||typeof ResizeObserver>"u")return;let e=new ResizeObserver(()=>Ve());return e.observe(t),()=>e.disconnect()},[Ve,xe]);let dt=T(C);dt.current=C;let He=T(g);He.current=g;let ct=T(St);ct.current=St;let Bt=T(Rt);Bt.current=Rt;let At=T(null),$e=ne(()=>{let t=new Map,e=0;return i.forEach(r=>{r.pinned==="left"&&(t.set(String(r.id),e),e+=typeof r.width=="number"?r.width:0)}),t},[i]),ut=ne(()=>{if(i.some(t=>typeof t.minWidth=="number"))return i.reduce((t,e)=>t+(typeof e.width=="number"?e.width:typeof e.minWidth=="number"?e.minWidth:0),0)},[i]),he=P((t,e)=>{let r=$e.get(String(t.id));return r===void 0?{}:{position:"sticky",left:r,zIndex:e?3:1}},[$e]),Xe=!!C,ke=T(!1),de=T({x:0,y:0});G(()=>{let t=e=>{let r=e.clientX-de.current.x,s=e.clientY-de.current.y;Math.sqrt(r*r+s*s)>vt&&(ke.current=!0)};return document.addEventListener("mousemove",t),()=>{document.removeEventListener("mousemove",t)}},[]),G(()=>{let t=document.querySelector('[data-testid="virtuoso-scroller"]');t&&t.querySelectorAll(".MuiTableSortLabel-root").forEach(r=>{let s=new MouseEvent("mouseleave",{bubbles:!0,cancelable:!0});r.dispatchEvent(s)})},[M]);let Ye=P(t=>{if(!L)return;L(t,M===t&&k==="asc"?"desc":"asc")},[L,M,k]),[Ee,Pt]=Ae(null),Nt=T(B);Nt.current=B;let Ot=T(L);Ot.current=L;let Le=P((t,e)=>{if(!t){e.preventDefault();return}t.headerProps?.onContextMenu?.(e);let r=e.defaultPrevented;if(r||(r=Nt.current?.(t,e)===!0||e.defaultPrevented),e.preventDefault(),r||t.headerMenu===!1||!!!((t.sortMenu??t.sortable)&&Ot.current)&&!wt(t))return;let f=e.currentTarget.getBoundingClientRect();Pt({colId:String(t.id),x:e.clientX,y:f.bottom})},[]),ce=P(t=>{if(!wt(t))return t.text;let e=!!(t.filterValues&&t.filterValues.length>0);return I(y,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5,maxWidth:"100%",color:e?"primary.main":void 0,fontWeight:e?600:void 0,verticalAlign:"middle"},children:[o(y,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.text}),o(yt,{active:e})]})},[]),Sn=P(t=>{let e=w?performance.now():0;if(Bt.current?.(),!A){w&&(m.current.rangeChangedCalls+=1,m.current.rangeChangedMs+=performance.now()-e);return}if(c&&a.length===0){w&&(m.current.rangeChangedCalls+=1,m.current.rangeChangedMs+=performance.now()-e);return}let r=a.length>=30,s=t>=a.length-1,f=it.current===a.length;if(s&&r&&!at.current&&!f){at.current=!0,it.current=a.length;let n=a.length;A(n,50)}w&&(m.current.rangeChangedCalls+=1,m.current.rangeChangedMs+=performance.now()-e)},[a.length,c,A,w]);G(()=>{c||(at.current=!1)},[c]),G(()=>{a.length===0&&Cn(t=>t+1)},[a.length]);let zt=T(Tt);zt.current=Tt;let pt=T(a.length),ft=T(void 0);G(()=>{let t=pt.current,e=a.length,r=e>0?He.current?He.current(a[0],0):a[0]:void 0,s=ft.current;if(e>t&&t>0){pt.current=e,ft.current=r;return}let f=e<t||t>0&&r!==s;f&&(it.current=-1),lt.current&&e>0&&f&&zt.current&<.current.scrollToIndex({index:0,align:"start",behavior:"auto"}),pt.current=e,ft.current=r},[a]);let _t=P(()=>{let t={},e=[];if(i.forEach(n=>{n.group?(t[n.group]||(t[n.group]=[]),t[n.group].push(n)):e.push(n)}),!(Object.keys(t).length>0))return o(Pe,{children:i.map(n=>o(re,{align:n.align||"left",title:typeof n.text=="string"?n.text:void 0,...n.headerProps,onContextMenu:l=>Le(n,l),style:{width:n.width,minWidth:n.width??n.minWidth,...n.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px",...he(n,!0),...n.headerProps?.style},children:n.sortable?o("div",{style:{display:"flex",alignItems:"center",justifyContent:n.align==="center"?"center":n.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:I(y,{className:"vdt-sort-box",sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>Ye(String(n.id)),children:[ce(n),o(Mt,{active:M===n.id,direction:M===n.id?k:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:M===n.id?1:0,transition:"opacity 0.2s ease","& .MuiTableSortLabel-icon":{position:"relative",marginLeft:0,marginRight:0,opacity:1,transition:"color 0.2s ease"},"& .MuiTableSortLabel-iconDirectionAsc":{transform:"rotate(180deg)"},"& .MuiTableSortLabel-iconDirectionDesc":{transform:"rotate(0deg)"}}})]})}):ce(n)},String(n.id)))});let s=[...e.map(n=>o(re,{rowSpan:2,align:n.align||"left",title:typeof n.text=="string"?n.text:void 0,...n.headerProps,onContextMenu:l=>Le(n,l),style:{width:n.width,minWidth:n.width,...n.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px",...he(n,!0),...n.headerProps?.style},children:n.sortable&&L?o("div",{style:{display:"flex",alignItems:"center",justifyContent:n.align==="center"?"center":n.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:I(y,{className:"vdt-sort-box",sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>Ye(String(n.id)),children:[ce(n),o(Mt,{active:M===n.id,direction:M===n.id?k:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:M===n.id?1:0,transition:"opacity 0.2s ease","&:hover":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}},"& .MuiTableSortLabel-icon":{position:"relative",marginLeft:0,marginRight:0,opacity:1,transition:"color 0.2s ease"},"& .MuiTableSortLabel-iconDirectionAsc":{transform:"rotate(180deg)"},"& .MuiTableSortLabel-iconDirectionDesc":{transform:"rotate(0deg)"}}})]})}):ce(n)},String(n.id))),...Object.entries(t).map(([n,l])=>o(re,{align:"center",colSpan:l.length,onContextMenu:H=>Le(null,H),style:{fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:n},n))],f=[...Object.values(t).flat().map(n=>o(re,{align:n.align||"left",title:typeof n.text=="string"?n.text:void 0,...n.headerProps,onContextMenu:l=>Le(n,l),style:{width:n.width,minWidth:n.width,...n.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px",...he(n,!0),...n.headerProps?.style},children:n.sortable&&L?o("div",{style:{display:"flex",alignItems:"center",justifyContent:n.align==="center"?"center":n.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:I(y,{className:"vdt-sort-box",sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>Ye(String(n.id)),children:[ce(n),o(Mt,{active:M===n.id,direction:M===n.id?k:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:M===n.id?1:0,transition:"opacity 0.2s ease","&:hover":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}},"& .MuiTableSortLabel-icon":{position:"relative",marginLeft:0,marginRight:0,opacity:1,transition:"color 0.2s ease"},"& .MuiTableSortLabel-iconDirectionAsc":{transform:"rotate(0deg)"},"& .MuiTableSortLabel-iconDirectionDesc":{transform:"rotate(180deg)"}}})]})}):ce(n)},String(n.id)))];return I(Ne,{children:[o(Pe,{children:s}),o(Pe,{children:f})]})},[i,M,k,Ye,L,le,he,Le,ce]),Wt=ne(()=>{let t=i.filter(r=>r.mobile!==!1),e=t.find(r=>r.mobile==="title")??t.find(r=>!r.mobile);return{title:e,thumb:t.filter(r=>r.mobile==="thumb"),badge:t.filter(r=>r.mobile==="badge"),sub:t.filter(r=>r.mobile==="sub"),meta:t.filter(r=>r!==e&&(!r.mobile||r.mobile==="meta"))}},[i]),Ft=P((t,e)=>{if(Se?.renderRow)return Se.renderRow(t,e);let r=p=>p.render?p.render(t,e):String(t[p.id]??""),{title:s,thumb:f,badge:n,sub:l,meta:H}=Wt;return I(y,{sx:{display:"flex",gap:"12px",alignItems:"flex-start",py:"12px",px:"14px",minWidth:0},children:[f.map(p=>o(y,{sx:{flexShrink:0},children:r(p)},String(p.id))),I(y,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:"4px"},children:[(s||n.length>0)&&I(y,{sx:{display:"flex",alignItems:"flex-start",gap:"8px",minWidth:0},children:[o(y,{sx:{flex:1,minWidth:0,fontSize:15,fontWeight:500,overflowWrap:"anywhere"},children:s?r(s):null}),n.map(p=>o(y,{sx:{flexShrink:0},children:r(p)},String(p.id)))]}),l.map(p=>o(y,{sx:{fontSize:13,color:b.headerColor,minWidth:0},children:r(p)},String(p.id))),H.length>0&&o(y,{sx:{display:"flex",flexWrap:"wrap",gap:"2px 12px",fontSize:13,minWidth:0},children:H.map(p=>{let D=p.mobileLabel===!1?null:p.mobileLabel??(typeof p.text=="string"?p.text:null);return I(y,{sx:{display:"inline-flex",alignItems:"center",gap:"4px",minWidth:0,maxWidth:"100%"},children:[D?o(y,{component:"span",sx:{color:b.headerColor,flexShrink:0},children:D}):null,o(y,{component:"span",sx:{minWidth:0,"& > *":{width:"auto !important",textAlign:"left !important"}},children:r(p)})]},String(p.id))})})]})]})},[Se,Wt,b]),Ue=P((t,e)=>{let r=w?performance.now():0;if(!e){if(w){m.current.rowContentCalls+=1;let l=performance.now()-r;m.current.rowContentMs+=l,m.current.rowContentMaxMs=Math.max(m.current.rowContentMaxMs,l)}return null}if($)return o(re,{colSpan:i.length,"data-vdt-pad":"",sx:{padding:0},children:Ft(e,t)});let s=Ze?Ze(e,t):null;if(s!=null)return o(re,{colSpan:i.length,"data-vdt-pad":"",sx:[{padding:x?"0 14px":"8px 16px"},...Array.isArray(Me)?Me:Me?[Me]:[]],children:s});let f=0,n=i.map((l,H)=>{if(f>0)return f-=1,null;let p=l.colSpan?Math.max(1,Math.min(l.colSpan(e,t),i.length-H)):1;f=p-1;let D=w?performance.now():0,te=l.render?l.render(e,t):String(e[l.id]||"");if(w){let W=performance.now()-D;m.current.cellRenderCalls+=1,m.current.cellRenderMs+=W,m.current.cellRenderMaxMs=Math.max(m.current.cellRenderMaxMs,W)}let ge=$e.has(String(l.id)),S=l.cellPadding!==void 0,_=l.rowSpan?l.rowSpan(e,t):1;if(_<=0)return null;let ue=l.onCellClick;return o(re,{align:l.align||"left",rowSpan:_>1?_:void 0,colSpan:p>1?p:void 0,"data-vdt-pad":S?"":void 0,"data-vdt-pinned":ge?"":void 0,"data-vdt-cell-click":ue?"":void 0,onClick:ue?W=>{let be=W.clientX-de.current.x,pe=W.clientY-de.current.y;W.stopPropagation(),!(Math.sqrt(be*be+pe*pe)>vt)&&ue(e,t,W)}:void 0,style:{...p>1?{}:{width:l.width,minWidth:l.width??l.minWidth},...l.primary?{fontSize:15}:{},...l.style,...l.cellStyle?l.cellStyle(e,t):{},padding:S?l.cellPadding:"8px 16px",...he(l,!1)},children:te},String(l.id))});if(w){m.current.rowContentCalls+=1;let l=performance.now()-r;m.current.rowContentMs+=l,m.current.rowContentMaxMs=Math.max(m.current.rowContentMaxMs,l)}return o(Ne,{children:n})},[i,w,Ze,Me,x,$e,he,$,Ft]),Vt=P(()=>{let t=_t();if(!ve||ve.length===0)return t;let e=At.current;return I(Ne,{children:[t,o("tr",{"data-vdt-pinned-area":"",children:o("td",{colSpan:i.length,style:{padding:0,border:0},children:o(y,{"data-vdt-inner-scroll":"",sx:[{maxHeight:Qe,overflowY:Qe?"auto":"visible",overflowX:"hidden",scrollbarWidth:"thin",borderBottom:`1px solid ${x?b.borderStrong:"rgba(224, 224, 224, 1)"}`,"& tbody tr:last-of-type > td":{borderBottom:"none"}},...Array.isArray(we)?we:we?[we]:[]],children:I("table",{style:{width:"100%",tableLayout:_e,borderCollapse:"separate",borderSpacing:0},children:[o("colgroup",{children:i.map(r=>o("col",{style:{width:r.width,minWidth:r.width??r.minWidth}},String(r.id)))}),o(Qt,{children:ve.map((r,s)=>e?o(e,{item:r,"data-index":s,"data-vdt-pinned-row":"",children:Ue(s,r)},g?String(g(r,s)):`p${s}`):null)})]})})})})]})},[_t,ve,Qe,we,i,Ue,_e,g,x,b]),Y=tn??i.some(t=>typeof t.footer=="function"),$t=P(()=>{if(!Y)return null;let t=[];for(let e=0;e<i.length;e+=1){let r=i[e],s=r.footerColSpan&&r.footerColSpan>1?Math.min(r.footerColSpan,i.length-e):1;t.push(o(re,{align:r.align||"left",colSpan:s>1?s:void 0,style:{...s>1?{}:{width:r.width,minWidth:r.width},...r.style,fontWeight:"bold",padding:x?"0 14px":"16px"},children:r.footer?r.footer(a):null},String(r.id))),e+=s-1}return o(Pe,{children:t})},[Y,i,a,x]),ht=ne(()=>({Scroller:Te?en:Lt,Table:t=>o(Zn,{...t,sx:{borderCollapse:"separate",tableLayout:_e,...ut&&!$?{minWidth:ut}:{},marginRight:fe?"16px":0,...Y?{height:"100%"}:{}}}),TableHead:Oe((t,e)=>o(Jn,{...t,ref:e,sx:{userSelect:"none","& > tr":{height:le,"& > th":{padding:"16px",position:"sticky",top:0,zIndex:2,fontWeight:"bold"}}}})),TableRow:t=>{let{item:e,selected:r,"aria-selected":s,className:f,...n}=t,l=n["data-index"]??0,H=l%2===1,p=e&&He.current?He.current(e,l):l,D=!Fe&&d!==null&&d!==void 0&&p===d,te=D&&X?typeof X=="function"?X(e,l):X:void 0,ge=String(f??"").split(/\s+/).filter(S=>S!=="Mui-selected"&&S!=="Mui-focusVisible").join(" ");return o(Pe,{...n,"data-row-id":p!=null?String(p):void 0,className:ge||void 0,selected:D,onMouseDown:S=>{ke.current=!1,de.current={x:S.clientX,y:S.clientY}},onContextMenu:S=>{e&&ct.current&&ct.current(e,l,S)},onClick:S=>{let _=S.clientX-de.current.x,ue=S.clientY-de.current.y;if(Math.sqrt(_*_+ue*ue)>vt||ke.current){S.preventDefault(),S.stopPropagation(),ke.current=!1;return}e&&dt.current&&dt.current(e,l),ke.current=!1},sx:[{userSelect:"none",...tt?{"& > td":{height:Re}}:{height:Re,maxHeight:Re},boxSizing:"border-box",backgroundColor:H&&ot?ot:"transparent","& td:not([data-vdt-pad])":{padding:"8px 16px"},"& td":{boxSizing:"border-box",borderBottom:Q?"1px solid rgba(224, 224, 224, 1)":"none"},"& th":{padding:"8px 16px",borderBottom:"none"},"&:hover":Xe&&!D?{backgroundColor:S=>{let _=S.palette.mode==="dark",W=nt??"#000000",be=Et??.06;if(!nt)return _?`rgba(255, 255, 255, ${be})`:`rgba(0, 0, 0, ${be})`;let pe=W.replace("#","").trim();if(pe.length!==6)return W;let In=parseInt(pe.substring(0,2),16),Bn=parseInt(pe.substring(2,4),16),An=parseInt(pe.substring(4,6),16);return`rgba(${In}, ${Bn}, ${An}, ${be})`}}:void 0,cursor:Xe?"pointer":void 0},te]})},TableBody:Oe((t,e)=>{let{children:r,...s}=t;return I(Qt,{...s,ref:e,sx:Y?{height:"100%"}:void 0,children:[r,Y&&o("tr",{"aria-hidden":!0,style:{height:"100%"},children:o("td",{colSpan:i.length,style:{padding:0,border:0}})})]})}),TableFoot:Oe((t,e)=>o(er,{...t,ref:e,sx:[{"& tr":{height:ye??V,maxHeight:ye??V,boxSizing:"border-box"},"& td":{height:ye??V,boxSizing:"border-box",backgroundColor:r=>r.palette.mode==="dark"?"#1e1e1e":"#ffffff",padding:"0 16px",color:"inherit",fontSize:"0.875rem",border:"none",boxShadow:`inset 0 1px 0 0 ${x?b.borderStrong:"#000000"}`}},...Array.isArray(Ce)?Ce:Ce?[Ce]:[]]}))}),[Xe,Fe?null:d,X,V,ot,Q,le,nt,Et,Lt,ye,Ce,Y,x,b,i,_e,fe,tt,ut,$,Te]);At.current=ht.TableRow;let Tn=ht,De=ht,Rn=De.Table,Hn=De.TableHead,kn=De.TableBody,En=De.TableRow,Ln=De.TableFoot,z=Ee?i.find(t=>String(t.id)===Ee.colId):void 0,Dn=()=>Pt(null),Xt=null;if(Ee&&z){let t=String(z.id),e=!!((z.sortMenu??z.sortable)&&L),r=wt(z),s=M===t?k:void 0;Xt=o(Ct,{open:!0,anchorPosition:{left:Ee.x,top:Ee.y},onClose:Dn,sort:e?{active:s??null,clearable:!!O,onChange:f=>{f?L?.(t,f):O?.()}}:void 0,filter:r?{options:z.filterOptions??[],value:z.filterValues??[],onChange:f=>z.onFilterChange?.(f),multiple:z.filterMultiple!==!1,emptyLabel:z.filterEmptyLabel,searchable:z.filterSearchable}:void 0})}let Yt=I(y,{sx:{position:"relative",height:se?"auto":"100%",width:"100%","& .MuiTableHead-root":{backgroundColor:t=>x?`${b.bg} !important`:t.palette.mode==="dark"?"#1e1e1e !important":"#ffffff !important"},...mn??{},"& tbody td[data-vdt-pinned]":{backgroundColor:x?b.bg:et.palette.background.paper},"& tbody td[data-vdt-cell-click]":{cursor:"pointer"},"& tbody td[data-vdt-cell-click]:hover":{backgroundColor:x?b.hoverBg:et.palette.mode==="dark"?"rgba(255, 255, 255, 0.06)":"rgba(0, 0, 0, 0.04)"},...x&&Xe?{"& tbody tr:hover td[data-vdt-pinned]":{backgroundColor:b.hoverBg}}:{},...x?{...fe?{border:`1px solid ${b.borderStrong}`,borderRadius:"4px"}:{"& table":{backgroundColor:b.bg}},overflow:"hidden","& thead tr th > *":{verticalAlign:"middle"},"& thead > tr > th":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},"& thead > tr > th > *":{maxWidth:"100%"},"& thead .vdt-sort-box":{paddingRight:"20px"},"& thead .vdt-sort-box > .MuiTableSortLabel-root":{left:"auto !important",right:0,marginLeft:"0 !important"},"& thead tr th":{height:le,boxSizing:"border-box",padding:"0 14px !important",fontSize:13,fontWeight:"500 !important",color:b.headerColor,backgroundColor:`${b.bg} !important`,borderTop:!fe&&rn?`1px solid ${b.borderStrong}`:"none",borderBottom:`1px solid ${b.borderStrong}`,borderRight:`1px solid ${b.border}`,"&:last-of-type":{borderRight:"none"}},"& tbody tr td:not([data-vdt-pad])":{padding:"0 14px !important"},"& tbody tr td":{fontSize:14,borderBottom:`1px solid ${b.border}`},...a.length>0&&(se||vn||Y)?{[`& tbody tr[data-index="${a.length-1}"]:not([data-vdt-pinned-row]) td`]:{borderBottom:"none"}}:{}}:{}},children:[xe?o(y,{sx:{overflowX:"auto",width:"100%"},children:I(Rn,{children:[$?null:o(Hn,{children:Vt()}),o(kn,{children:a.map((t,e)=>o(En,{item:t,"data-index":e,children:Ue(e,t)},g?String(g(t,e)):e))}),Y&&!$?o(Ln,{children:$t()}):null]})}):Je===null?null:o(ar,{ref:lt,data:a,totalCount:A?a.length+1:a.length,defaultItemHeight:Re,fixedItemHeight:tt?void 0:Re,fixedHeaderContent:$?void 0:Vt,fixedFooterContent:Y&&!$?$t:void 0,itemContent:Ue,...an&&g?{computeItemKey:(t,e)=>e?g(e,t):`vdt-${t}`}:{},endReached:Sn,scrollerRef:t=>{st.current=t instanceof HTMLElement?t:null,Ve()},totalListHeightChanged:Ve,style:Te?void 0:{height:"100%"},...Te?{customScrollParent:Je}:{},increaseViewportBy:{top:un,bottom:pn},overscan:gn,...J&&a.length>0?{initialItemCount:Math.min(J,a.length)}:{},followOutput:!1,components:Tn},yn),a.length===0&&!c&&!kt&&x&&typeof ee=="string"&&o(y,{sx:{position:se?"static":"absolute",top:$?0:le,left:0,right:0,py:6,px:2,textAlign:"center",fontSize:14,color:b.emptyColor,pointerEvents:"none"},children:ee}),a.length===0&&!c&&!kt&&!(x&&typeof ee=="string")&&o(y,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,px:2,textAlign:"center",pointerEvents:"none","& > *":{pointerEvents:"auto"}},children:typeof ee=="string"?I(Ne,{children:[o(y,{sx:{width:48,height:48,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",backgroundColor:"#f5f5f5",color:"#999"},children:"\u{1F4C4}"}),o(nr,{variant:"body1",sx:{color:"text.secondary"},children:ee})]}):ee}),Xt,Mn&&o(Ne,{children:ze?o(ze,{visible:c,onComplete:It}):o(Kt,{visible:c,onComplete:It,size:40,indicator:o(Gt,{}),sx:{top:`${i.some(t=>t.group)?le*2:le}px`,bottom:`${Y?ye??V:0}px`},background:{show:a.length===0,opacity:.8}})})]}),Ut=x&&fe?{paddingRight:We,paddingTop:Jt,paddingBottom:Jt}:{};return ae?o(tr,{className:"grow",elevation:1,sx:{padding:0,paddingLeft:We,...Ut,boxSizing:"border-box",height:se?"auto":"100%",minHeight:0,flex:se?"none":1,display:"flex",flexDirection:"column"},children:Yt}):o(y,{className:"grow",style:{padding:0,paddingLeft:We,...Ut,boxSizing:"border-box",height:se?"auto":"100%",minHeight:0,flex:se?"none":1,display:"flex",flexDirection:"column"},children:Yt})}var pr=Gn(ur);export{bt as HEADER_MENU_FONT_SIZE,U as HEADER_MENU_ICON_PATHS,mt as HEADER_MENU_ICON_SIZE,xt as HEADER_MENU_ITEM_HEIGHT,Zt as HEADER_MENU_ITEM_SX,yt as HeaderFilterIcon,Ct as HeaderMenu,Ke as HeaderMenuDivider,me as HeaderMenuIcon,q as HeaderMenuItem,pr as VirtualDataTable,qn as headerMenuAnchor};
|
|
4
|
+
`;function yn({size:o=54}){return pr(ur,{children:[xn("style",{children:cr}),xn("span",{className:"vdt-css-spinner",role:"progressbar","aria-label":"loading",style:{display:"inline-block",width:o,height:o}})]})}import ot,{useMemo as fr,useState as hr}from"react";import{Box as Fe,Divider as gr,InputBase as mr,Menu as br,MenuItem as xr,SvgIcon as yr}from"@mui/material";import{jsx as b,jsxs as it}from"react/jsx-runtime";var Dt=14,It=18,Pt=34,ee={asc:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",desc:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",checked:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z",unchecked:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z",radioOn:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z",radioOff:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z",filter:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z",search:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"};function Ce({d:o,size:c=It,color:a}){return b(yr,{sx:{fontSize:c,flexShrink:0,color:a},children:b("path",{d:o})})}function At({size:o=14,active:c,color:a}){let m={stroke:"currentColor",strokeWidth:1.8,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"};return it(Fe,{component:"svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,sx:{width:o,height:o,flexShrink:0,color:c?"primary.main":a??"currentColor",verticalAlign:"middle"},children:[b("path",{d:"M2 17.5H7",...m}),b("path",{d:"M22 6.5H17",...m}),b("path",{d:"M13 17.5H22",...m}),b("path",{d:"M11 6.5H2",...m}),b("path",{d:"M10 20.3999C8.34315 20.3999 7 19.0568 7 17.3999C7 15.743 8.34315 14.3999 10 14.3999C11.6569 14.3999 13 15.743 13 17.3999C13 19.0568 11.6569 20.3999 10 20.3999Z",...m}),b("path",{d:"M14 9.3999C15.6569 9.3999 17 8.05676 17 6.3999C17 4.74305 15.6569 3.3999 14 3.3999C12.3431 3.3999 11 4.74305 11 6.3999C11 8.05676 12.3431 9.3999 14 9.3999Z",...m})]})}var vn={gap:1,fontSize:Dt,lineHeight:"20px",minHeight:Pt,py:"7px",px:1.5};function ae({icon:o,iconSpace:c,selected:a,disabled:m,muted:h,onClick:p,sx:_,children:ne}){return it(xr,{selected:a,disabled:m,onClick:p,sx:[vn,h?{color:"text.secondary"}:{},...Array.isArray(_)?_:_?[_]:[]],children:[o??(c?b(Fe,{component:"span",sx:{width:It,flexShrink:0}}):null),ne]})}function at(){return b(gr,{sx:{my:"4px !important"}})}function vr(o,c){let a=o.getBoundingClientRect();return{left:c??a.left,top:a.bottom}}function Bt({open:o,anchorPosition:c,anchorEl:a,onClose:m,sort:h,filter:p,header:_,children:ne,minWidth:pe=180,maxHeight:le=420}){let[se,A]=hr(""),V=p?.multiple!==!1,z=p?.value??[],N=fr(()=>{if(!p)return[];let f=p.options;return p.emptyLabel&&!f.some(E=>E.value==="")?[...f,{value:"",label:p.emptyLabel}]:f},[p]),T=!!p&&(p?.searchable??N.length>10),D=se.trim().toLowerCase(),fe=D?N.filter(f=>f.label.toLowerCase().includes(D)):N,j=()=>{A(""),m()},R=[];if(_&&R.push(...ot.Children.toArray(_).map((f,E)=>ot.isValidElement(f)?ot.cloneElement(f,{key:`h${E}`}):f)),h){let f=E=>{j(),h.onChange(h.active===E&&h.clearable!==!1?null:E)};R.push(b(ae,{selected:h.active==="asc",onClick:()=>f("asc"),icon:b(Ce,{d:ee.asc,color:"text.secondary"}),children:"\uC624\uB984\uCC28\uC21C \uC815\uB82C"},"sort-asc"),b(ae,{selected:h.active==="desc",onClick:()=>f("desc"),icon:b(Ce,{d:ee.desc,color:"text.secondary"}),children:"\uB0B4\uB9BC\uCC28\uC21C \uC815\uB82C"},"sort-desc")),h.active&&h.clearable!==!1&&R.push(b(ae,{muted:!0,iconSpace:!0,onClick:()=>{j(),h.onChange(null)},children:"\uC815\uB82C \uD480\uAE30"},"sort-clear"))}return h&&p&&R.push(b(at,{},"div-sort")),p&&(T&&R.push(it(Fe,{onKeyDown:f=>f.stopPropagation(),sx:{display:"flex",alignItems:"center",gap:1,px:1.5,pb:.5,minHeight:Pt},children:[b(Ce,{d:ee.search,color:"text.secondary"}),b(mr,{autoFocus:!0,value:se,onChange:f=>A(f.target.value),placeholder:p.searchPlaceholder??"\uCC3E\uAE30",sx:{flex:1,fontSize:Dt}})]},"search")),!V&&p.allLabel&&R.push(b(ae,{selected:z.length===0,onClick:()=>{j(),p.onChange([])},icon:b(Ce,{d:z.length===0?ee.radioOn:ee.radioOff,color:z.length===0?"primary.main":"text.disabled"}),children:p.allLabel},"f-all")),N.length===0&&R.push(b(ae,{disabled:!0,iconSpace:!0,children:p.emptyText??"\uACE0\uB97C \uAC12\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},"f-none")),fe.forEach(f=>{let E=z.includes(f.value),P=()=>{if(V){p.onChange(E?z.filter(de=>de!==f.value):[...z,f.value]);return}j(),p.onChange(E?[]:[f.value])},re=V?E?ee.checked:ee.unchecked:E?ee.radioOn:ee.radioOff;R.push(it(ae,{selected:!V&&E,onClick:P,icon:b(Ce,{d:re,color:E?"primary.main":"text.disabled"}),children:[f.icon,b(Fe,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f.render??f.label}),typeof f.count=="number"?b(Fe,{component:"span",sx:{color:"text.secondary",ml:1,fontVariantNumeric:"tabular-nums"},children:f.count}):null]},`f:${f.value||"(empty)"}`))}),T&&D&&fe.length===0&&R.push(b(ae,{disabled:!0,iconSpace:!0,children:"\uCC3E\uB294 \uAC12\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},"f-nohit")),z.length>0&&R.push(b(at,{},"div-filter"),b(ae,{muted:!0,iconSpace:!0,onClick:()=>{j(),p.onChange([])},children:p.clearLabel??"\uAC70\uB974\uAE30 \uD480\uAE30"},"f-clear"))),ne&&(R.length>0&&R.push(b(at,{},"div-children")),R.push(...ot.Children.toArray(ne))),b(br,{open:o&&(!!c||!!a),...!c&&!!a?{anchorEl:a}:{anchorReference:"anchorPosition",anchorPosition:c??void 0},onClose:j,transitionDuration:0,disableAutoFocusItem:T,onContextMenu:f=>f.preventDefault(),onClick:f=>f.stopPropagation(),slotProps:{paper:{sx:{maxHeight:le,minWidth:pe}},list:{sx:{py:.5}}},children:R})}import Dr from"@ehfuse/overlay-scrollbar";import{Fragment as Ve,jsx as s,jsxs as L}from"react/jsx-runtime";var Ir={alignment:"default",margin:0,radius:0},Nt=5,Mn={},Pr=3;function wn(o){return typeof o=="number"?`${o}px`:o}function Sn(o){let c=window.getComputedStyle(o),a=c.boxSizing==="border-box"?0:(parseFloat(c.paddingLeft)||0)+(parseFloat(c.paddingRight)||0)+(parseFloat(c.borderLeftWidth)||0)+(parseFloat(c.borderRightWidth)||0);return o.getBoundingClientRect().width-a}function Tn(o,c){let a=[];for(let m=0;m<o.style.length;m+=1){let h=o.style[m];h.startsWith("--vdt-")&&!(h in c)&&a.push(h)}a.forEach(m=>o.style.removeProperty(m)),Object.entries(c).forEach(([m,h])=>o.style.setProperty(m,h))}var Ar={bg:"#ffffff",border:"#e6e6e3",borderStrong:"#dedddb",headerColor:"#787774",hoverBg:"#f8f8f7",emptyColor:"#9b9a97",selectedBg:"#dbeafe",selectedBar:"#3b82f6"},Rn="12px",Br={bg:"#1e1e1e",border:"#2c333c",borderStrong:"#3b434e",headerColor:"#a3adbb",hoverBg:"#272d36",emptyColor:"#7d8590",selectedBg:"rgba(59, 130, 246, 0.22)",selectedBar:"#60a5fa"},Hn=$e((o,c)=>s("div",{...o,ref:c}));Hn.displayName="VdtPlainScroller";var zr="(max-width:599.95px)";function Wt(o){return!!(o.filterOptions&&o.onFilterChange)}function Nr({data:o,loading:c=!1,columns:a,onRowClick:m,getRowId:h,selectedRowId:p,selectedRowSx:_,rowHeight:ne,columnHeight:pe,striped:le,rowDivider:se=!0,onSort:A,onSortClear:V,onHeaderContextMenu:z,onLoadMore:N,sortBy:T,sortDirection:D,showPaper:fe=!0,paddingX:j,paddingTop:R=0,paddingBottom:he=0,rowHoverColor:f,rowHoverOpacity:E,viewportBuffer:P,overscan:re,initialItemCount:de,scrollbars:lt,emptyMessage:ce="NO DATA",autoHeight:we=!1,LoadingComponent:Xe,showFooter:En,footerHeight:Se,footerSx:Te,variant:kn="default",framed:ye=!0,headerTopBorder:Ln=!1,rowHeightMode:Dn="fixed",tableLayout:Ye="fixed",renderFullWidthRow:st,fullWidthRowSx:Re,onRowContextMenu:Ot,pinnedRows:He,pinnedRowsMaxHeight:dt,pinnedRowsSx:Ee,resetScrollOnDataChange:Ft=!0,rowKeyFromId:In=!1,onEndReached:_t,colorMode:Pn,mobile:Vt,scrollParent:ct,columnResize:$t,columnWidths:Xt,onColumnWidthsChange:Yt}){let C=kn==="notion",je=Er(),v=(Pn??je.palette.mode)==="dark"?Br:Ar,jt=(He?.length??0)>0,ge=pe??(C?40:56),U=ne??(C?48:50),Ue=ye?j??(C?"12px":"1rem"):0,ke=Vt===!0?{}:Vt||null,An=kr(ke?.query??zr,{noSsr:!0}),X=!!ke&&An,Le=!!ct,me=we||Le,ut=Dn==="auto"||X,pt=f??(C?v.hoverBg:void 0),Ut=E??(C?1:void 0),Bn=Math.max(U*12,480),zn=Math.max(U*12,480),Nn=typeof P=="number"?P:P?.top??Bn,Wn=typeof P=="number"?P:P?.bottom??zn,On=Math.max(U*8,420),Fn=Math.max(U*10,520),_n=typeof re=="number"?re:{main:re?.main??On,reverse:re?.reverse??Fn},De=U+(se?1:0),Vn=ie(()=>C?{backgroundColor:v.selectedBg,"& > td:first-of-type":{boxShadow:`inset 3px 0 0 ${v.selectedBar}`},"& > td[data-vdt-pinned]":{backgroundColor:v.selectedBg}}:void 0,[C,v]),q=_??Vn,qe=!q||typeof q!="function",$n=ie(()=>!qe||p===null||p===void 0||!q?null:{[`& tbody tr[data-row-id="${String(p).replace(/["\\]/g,"\\$&")}"]`]:q},[qe,p,q]),Or=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),[H]=Me(()=>typeof window>"u"?!1:window.localStorage.getItem("vdt-perf-debug")==="1"),M=w({wheelEvents:0,wheelInputPx:0,wheelHandlerMs:0,wheelRafFlushes:0,wheelRafMs:0,rangeChangedCalls:0,rangeChangedMs:0,rowContentCalls:0,rowContentMs:0,rowContentMaxMs:0,cellRenderCalls:0,cellRenderMs:0,cellRenderMaxMs:0}),ft=k(t=>{if(!H)return;let e=M.current;if(!(e.wheelEvents>0||e.rangeChangedCalls>0||e.rowContentCalls>0||e.cellRenderCalls>0))return;let i=e.rowContentCalls>0?e.rowContentMs/e.rowContentCalls:0,d=e.cellRenderCalls>0?e.cellRenderMs/e.cellRenderCalls:0;console.log("[VDT perf]",{reason:t,wheel:{events:e.wheelEvents,inputPx:Math.round(e.wheelInputPx),handlerMs:Number(e.wheelHandlerMs.toFixed(2)),rafFlushes:e.wheelRafFlushes,rafMs:Number(e.wheelRafMs.toFixed(2))},rangeChanged:{calls:e.rangeChangedCalls,totalMs:Number(e.rangeChangedMs.toFixed(2))},rowContent:{calls:e.rowContentCalls,totalMs:Number(e.rowContentMs.toFixed(2)),avgMs:Number(i.toFixed(3)),maxMs:Number(e.rowContentMaxMs.toFixed(3))},cellRender:{calls:e.cellRenderCalls,totalMs:Number(e.cellRenderMs.toFixed(2)),avgMs:Number(d.toFixed(3)),maxMs:Number(e.cellRenderMaxMs.toFixed(3))}}),M.current={wheelEvents:0,wheelInputPx:0,wheelHandlerMs:0,wheelRafFlushes:0,wheelRafMs:0,rangeChangedCalls:0,rangeChangedMs:0,rowContentCalls:0,rowContentMs:0,rowContentMaxMs:0,cellRenderCalls:0,cellRenderMs:0,cellRenderMaxMs:0}},[H]);te(()=>{if(!H||typeof window>"u")return;console.log("[VDT perf] enabled (localStorage vdt-perf-debug=1)");let t=window.setInterval(()=>{ft("interval")},1500);return()=>{window.clearInterval(t),ft("cleanup")}},[ft,H]);let qt=ie(()=>$e((t,e)=>{let r=w(null),i=w(0),d=w(null);return te(()=>{let n=r.current;if(!n)return;let l=x=>{let u=H?performance.now():0;if(x.shiftKey||Math.abs(x.deltaX)>Math.abs(x.deltaY))return;let y=x.target?.closest?.("[data-vdt-inner-scroll]");if(y&&n.contains(y)&&(x.deltaY<0?y.scrollTop>0:y.scrollTop+y.clientHeight<y.scrollHeight-1))return;x.preventDefault();let B=x.deltaY;x.deltaMode===1?B*=40:x.deltaMode===2&&(B*=n.clientHeight),H&&(M.current.wheelEvents+=1,M.current.wheelInputPx+=B),i.current+=B,d.current===null&&(d.current=requestAnimationFrame(()=>{let Z=H?performance.now():0,g=Math.max(n.clientHeight*.4,160),I=Math.max(-g,Math.min(g,i.current));i.current=0,d.current=null,I!==0&&(n.scrollTop+=I),H&&(M.current.wheelRafFlushes+=1,M.current.wheelRafMs+=performance.now()-Z)}),H&&(M.current.wheelHandlerMs+=performance.now()-u))};return n.addEventListener("wheel",l,{passive:!1}),()=>{n.removeEventListener("wheel",l),d.current!==null&&(cancelAnimationFrame(d.current),d.current=null),i.current=0}},[]),s(Dr,{detectInnerScroll:!0,track:Ir,...lt,children:s(wr,{component:S,...t,ref:n=>{r.current=n,typeof e=="function"?e(n):e&&(e.current=n)},sx:{userSelect:"auto",WebkitUserSelect:"auto",position:"relative",width:"100%",height:"100%",overflow:"auto",display:"flex",flexDirection:"column",scrollbarWidth:"none",msOverflowStyle:"none",transform:"translateZ(0)",backfaceVisibility:"hidden",willChange:"scroll-position","&::-webkit-scrollbar":{display:"none"},"& .MuiTable-root":{paddingRight:C?0:Ue,paddingTop:typeof R=="number"?`${R}px`:R,paddingBottom:typeof he=="number"?`${he}px`:he}}})})}),[]),ht=ie(()=>{if(le===!0)return"#f5f5f5";if(typeof le=="string")return le},[le]),[Xn,Kt]=Me(c),[Yn,jn]=Me(0);te(()=>{c&&Kt(!0)},[c]);let Gt=k(()=>{Kt(!1)},[]),Un=Xn,Fr=c&&o.length>0,gt=w(!1),mt=w(-1),bt=w(null),xt=w(null),[qn,Kn]=Me(!1),Ke=k(()=>{let t=xt.current;t&&Kn(t.scrollHeight>t.clientHeight+1)},[]);te(()=>{let t=xt.current;if(!t||typeof ResizeObserver>"u")return;let e=new ResizeObserver(()=>Ke());return e.observe(t),()=>e.disconnect()},[Ke,we]);let yt=w(m);yt.current=m;let Ie=w(h);Ie.current=h;let vt=w(Ot);vt.current=Ot;let Zt=w(_t);Zt.current=_t;let Qt=w(null),Jt=$t===!0?{}:$t||null,$=!!Jt&&!X,Pe=Jt?.minWidth??48,[Gn,Ct]=Me(null);te(()=>{Ct(null)},[Xt]);let Ge=$?Gn??Xt??Mn:Mn,Mt=w(Ge);Mt.current=Ge;let wt=w(Yt);wt.current=Yt;let St=w(a);St.current=a;let Tt=w(null),Ze=k(t=>{let e={},r=!1,i=!0,d=0,n=0;return a.forEach((l,x)=>{let u=t[String(l.id)];if(typeof u=="number"&&Number.isFinite(u)&&u>0){let y=Math.max(l.minWidth??Pe,Math.round(u));e[`--vdt-cw-${x}`]=`${y}px`,r=!0,d+=y,n+=y}else typeof l.width=="number"?(d+=l.width,n+=l.width):(i=!1,d+=l.minWidth??Pe)}),r&&(e["--vdt-tmin"]=`${d}px`,i&&(e["--vdt-tw"]=`${n}px`)),e},[a,Pe]),Rt=w(Ze);Rt.current=Ze;let Zn=ie(()=>$?Ze(Ge):null,[$,Ze,Ge]),K=k((t,e,r)=>{if(!$)return{width:t.width,minWidth:r};let i=`--vdt-cw-${e}`,d=wn(t.width),n=wn(r);return{width:d!==void 0?`var(${i}, ${d})`:`var(${i})`,minWidth:n!==void 0?`var(${i}, ${n})`:`var(${i})`}},[$]),Qe=ie(()=>{let t=new Map,e=0,r=[];return a.forEach((i,d)=>{if(i.pinned!=="left")return;t.set(String(i.id),$&&r.length>0?`calc(${r.join(" + ")})`:e);let n=typeof i.width=="number"?i.width:0;e+=n,r.push(`var(--vdt-cw-${d}, ${n}px)`)}),t},[a,$]),Je=ie(()=>{if(a.some(t=>typeof t.minWidth=="number"))return a.reduce((t,e)=>t+(typeof e.width=="number"?e.width:typeof e.minWidth=="number"?e.minWidth:0),0)},[a]),ve=k((t,e)=>{let r=Qe.get(String(t.id));return r===void 0?{}:{position:"sticky",left:r,zIndex:e?3:1}},[Qe]),et=!!m,Ae=w(!1),be=w({x:0,y:0});te(()=>{let t=e=>{let r=e.clientX-be.current.x,i=e.clientY-be.current.y;Math.sqrt(r*r+i*i)>Nt&&(Ae.current=!0)};return document.addEventListener("mousemove",t),()=>{document.removeEventListener("mousemove",t)}},[]),te(()=>{let t=document.querySelector('[data-testid="virtuoso-scroller"]');t&&t.querySelectorAll(".MuiTableSortLabel-root").forEach(r=>{let i=new MouseEvent("mouseleave",{bubbles:!0,cancelable:!0});r.dispatchEvent(i)})},[T]);let tt=k(t=>{if(!A)return;A(t,T===t&&D==="asc"?"desc":"asc")},[A,T,D]),[Be,en]=Me(null),tn=w(z);tn.current=z;let nn=w(A);nn.current=A;let ze=k((t,e)=>{if(!t){e.preventDefault();return}t.headerProps?.onContextMenu?.(e);let r=e.defaultPrevented;if(r||(r=tn.current?.(t,e)===!0||e.defaultPrevented),e.preventDefault(),r||t.headerMenu===!1||!!!((t.sortMenu??t.sortable)&&nn.current)&&!Wt(t))return;let d=e.currentTarget.getBoundingClientRect();en({colId:String(t.id),x:e.clientX,y:d.bottom})},[]),rn=k((t,e)=>{if(e.button!==0)return;e.preventDefault(),e.stopPropagation();let r=e.currentTarget,i=r.closest("th"),d=Tt.current;if(!i||!d)return;let n=Sn(i),l=e.clientX,x=String(t.id),u=t.minWidth??Pe,y=Mt.current,B=St.current;if(!B.some(F=>!(String(F.id)in y)&&typeof F.width!="number")){let F={...y};d.querySelectorAll("thead th [data-vdt-col]").forEach(J=>{let We=B[Number(J.getAttribute("data-vdt-col"))],gn=J.closest("th");!We||!gn||String(We.id)in F||(F[String(We.id)]=Math.round(Sn(gn)))}),y=F}let g=y,I=!1,W=0;r.setAttribute("data-active","");let O=document.body.style.cursor;document.body.style.cursor="col-resize";let oe=F=>{let J=F.clientX-l;!I&&Math.abs(J)<Pr||(I=!0,g={...y,[x]:Math.max(u,Math.round(n+J))},W||(W=requestAnimationFrame(()=>{W=0,Tn(d,Rt.current(g))})))},Q=()=>{if(document.removeEventListener("mousemove",oe),document.removeEventListener("mouseup",Q),W&&cancelAnimationFrame(W),r.removeAttribute("data-active"),document.body.style.cursor=O,!I)return;Tn(d,Rt.current(g));let F=J=>{J.stopPropagation(),J.preventDefault()};window.addEventListener("click",F,!0),window.setTimeout(()=>window.removeEventListener("click",F,!0),0),Ct(g),wt.current?.(g)};document.addEventListener("mousemove",oe),document.addEventListener("mouseup",Q)},[Pe]),on=k((t,e)=>{e.preventDefault(),e.stopPropagation();let r=String(t.id),i=Mt.current;if(!(r in i))return;let d={...i};delete d[r];let n=St.current,l=Tt.current?.querySelector("table"),x=l?.parentElement;if(l&&x&&n.every(u=>typeof u.width=="number")){let u=n.reduce((g,I)=>g+I.width,0),y=x.clientWidth,B=u>0?Math.max(1,y/u):1,Z=g=>Math.round(g.width*B);B>1&&(d[r]=Z(t)),n.every(g=>!(String(g.id)in d)||Math.abs(d[String(g.id)]-Z(g))<=1)&&(d={})}Ct(d),wt.current?.(d)},[]),nt=k(t=>$?s("span",{"data-vdt-resize":"","data-vdt-col":a.indexOf(t),"aria-hidden":!0,onMouseDown:e=>rn(t,e),onDoubleClick:e=>on(t,e),onClick:e=>e.stopPropagation()}):null,[$,rn,on,a]),xe=k(t=>{if(!Wt(t))return t.text;let e=!!(t.filterValues&&t.filterValues.length>0);return L(S,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5,maxWidth:"100%",color:e?"primary.main":void 0,fontWeight:e?600:void 0,verticalAlign:"middle"},children:[s(S,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.text}),s(At,{active:e})]})},[]),Qn=k(t=>{let e=H?performance.now():0;if(Zt.current?.(),!N){H&&(M.current.rangeChangedCalls+=1,M.current.rangeChangedMs+=performance.now()-e);return}if(c&&o.length===0){H&&(M.current.rangeChangedCalls+=1,M.current.rangeChangedMs+=performance.now()-e);return}let r=o.length>=30,i=t>=o.length-1,d=mt.current===o.length;if(i&&r&&!gt.current&&!d){gt.current=!0,mt.current=o.length;let n=o.length;N(n,50)}H&&(M.current.rangeChangedCalls+=1,M.current.rangeChangedMs+=performance.now()-e)},[o.length,c,N,H]);te(()=>{c||(gt.current=!1)},[c]),te(()=>{o.length===0&&jn(t=>t+1)},[o.length]);let an=w(Ft);an.current=Ft;let Ht=w(o.length),Et=w(void 0);te(()=>{let t=Ht.current,e=o.length,r=e>0?Ie.current?Ie.current(o[0],0):o[0]:void 0,i=Et.current;if(e>t&&t>0){Ht.current=e,Et.current=r;return}let d=e<t||t>0&&r!==i;d&&(mt.current=-1),bt.current&&e>0&&d&&an.current&&bt.current.scrollToIndex({index:0,align:"start",behavior:"auto"}),Ht.current=e,Et.current=r},[o]);let ln=k(()=>{let t={},e=[];if(a.forEach(n=>{n.group?(t[n.group]||(t[n.group]=[]),t[n.group].push(n)):e.push(n)}),!(Object.keys(t).length>0))return s(_e,{children:a.map((n,l)=>L(ue,{align:n.align||"left",title:typeof n.text=="string"?n.text:void 0,...n.headerProps,onContextMenu:x=>ze(n,x),style:{...K(n,l,n.width??n.minWidth),...n.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px",...ve(n,!0),...n.headerProps?.style},children:[n.sortable?s("div",{style:{display:"flex",alignItems:"center",justifyContent:n.align==="center"?"center":n.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:L(S,{className:"vdt-sort-box",sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>tt(String(n.id)),children:[xe(n),s(zt,{active:T===n.id,direction:T===n.id?D:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:T===n.id?1:0,transition:"opacity 0.2s ease","& .MuiTableSortLabel-icon":{position:"relative",marginLeft:0,marginRight:0,opacity:1,transition:"color 0.2s ease"},"& .MuiTableSortLabel-iconDirectionAsc":{transform:"rotate(180deg)"},"& .MuiTableSortLabel-iconDirectionDesc":{transform:"rotate(0deg)"}}})]})}):xe(n),nt(n)]},String(n.id)))});let i=[...e.map(n=>L(ue,{rowSpan:2,align:n.align||"left",title:typeof n.text=="string"?n.text:void 0,...n.headerProps,onContextMenu:l=>ze(n,l),style:{...K(n,a.indexOf(n),n.width),...n.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px",...ve(n,!0),...n.headerProps?.style},children:[n.sortable&&A?s("div",{style:{display:"flex",alignItems:"center",justifyContent:n.align==="center"?"center":n.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:L(S,{className:"vdt-sort-box",sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>tt(String(n.id)),children:[xe(n),s(zt,{active:T===n.id,direction:T===n.id?D:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:T===n.id?1:0,transition:"opacity 0.2s ease","&:hover":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}},"& .MuiTableSortLabel-icon":{position:"relative",marginLeft:0,marginRight:0,opacity:1,transition:"color 0.2s ease"},"& .MuiTableSortLabel-iconDirectionAsc":{transform:"rotate(180deg)"},"& .MuiTableSortLabel-iconDirectionDesc":{transform:"rotate(0deg)"}}})]})}):xe(n),nt(n)]},String(n.id))),...Object.entries(t).map(([n,l])=>s(ue,{align:"center",colSpan:l.length,onContextMenu:x=>ze(null,x),style:{fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px"},children:n},n))],d=[...Object.values(t).flat().map(n=>L(ue,{align:n.align||"left",title:typeof n.text=="string"?n.text:void 0,...n.headerProps,onContextMenu:l=>ze(n,l),style:{...K(n,a.indexOf(n),n.width),...n.style,fontWeight:"bold",position:"sticky",top:0,zIndex:2,padding:"16px",...ve(n,!0),...n.headerProps?.style},children:[n.sortable&&A?s("div",{style:{display:"flex",alignItems:"center",justifyContent:n.align==="center"?"center":n.align==="right"?"flex-end":"flex-start",position:"relative",width:"100%"},children:L(S,{className:"vdt-sort-box",sx:{position:"relative",cursor:"default","&:hover .MuiTableSortLabel-root":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}}},onClick:()=>tt(String(n.id)),children:[xe(n),s(zt,{active:T===n.id,direction:T===n.id?D:"desc",sx:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"4px",minWidth:"auto",width:"16px",height:"16px",cursor:"default",opacity:T===n.id?1:0,transition:"opacity 0.2s ease","&:hover":{opacity:"1 !important","& .MuiSvgIcon-root":{color:"#000",opacity:"1 !important"}},"& .MuiTableSortLabel-icon":{position:"relative",marginLeft:0,marginRight:0,opacity:1,transition:"color 0.2s ease"},"& .MuiTableSortLabel-iconDirectionAsc":{transform:"rotate(0deg)"},"& .MuiTableSortLabel-iconDirectionDesc":{transform:"rotate(180deg)"}}})]})}):xe(n),nt(n)]},String(n.id)))];return L(Ve,{children:[s(_e,{children:i}),s(_e,{children:d})]})},[a,T,D,tt,A,ge,ve,ze,xe,K,nt]),sn=ie(()=>{let t=a.filter(r=>r.mobile!==!1),e=t.find(r=>r.mobile==="title")??t.find(r=>!r.mobile);return{title:e,thumb:t.filter(r=>r.mobile==="thumb"),badge:t.filter(r=>r.mobile==="badge"),sub:t.filter(r=>r.mobile==="sub"),meta:t.filter(r=>r!==e&&(!r.mobile||r.mobile==="meta"))}},[a]),dn=k((t,e)=>{if(ke?.renderRow)return ke.renderRow(t,e);let r=u=>u.render?u.render(t,e):String(t[u.id]??""),{title:i,thumb:d,badge:n,sub:l,meta:x}=sn;return L(S,{sx:{display:"flex",gap:"12px",alignItems:"flex-start",py:"12px",px:"14px",minWidth:0},children:[d.map(u=>s(S,{sx:{flexShrink:0},children:r(u)},String(u.id))),L(S,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:"4px"},children:[(i||n.length>0)&&L(S,{sx:{display:"flex",alignItems:"flex-start",gap:"8px",minWidth:0},children:[s(S,{sx:{flex:1,minWidth:0,fontSize:15,fontWeight:500,overflowWrap:"anywhere"},children:i?r(i):null}),n.map(u=>s(S,{sx:{flexShrink:0},children:r(u)},String(u.id)))]}),l.map(u=>s(S,{sx:{fontSize:13,color:v.headerColor,minWidth:0},children:r(u)},String(u.id))),x.length>0&&s(S,{sx:{display:"flex",flexWrap:"wrap",gap:"2px 12px",fontSize:13,minWidth:0},children:x.map(u=>{let y=u.mobileLabel===!1?null:u.mobileLabel??(typeof u.text=="string"?u.text:null);return L(S,{sx:{display:"inline-flex",alignItems:"center",gap:"4px",minWidth:0,maxWidth:"100%"},children:[y?s(S,{component:"span",sx:{color:v.headerColor,flexShrink:0},children:y}):null,s(S,{component:"span",sx:{minWidth:0,"& > *":{width:"auto !important",textAlign:"left !important"}},children:r(u)})]},String(u.id))})})]})]})},[ke,sn,v]),rt=k((t,e)=>{let r=H?performance.now():0;if(!e){if(H){M.current.rowContentCalls+=1;let l=performance.now()-r;M.current.rowContentMs+=l,M.current.rowContentMaxMs=Math.max(M.current.rowContentMaxMs,l)}return null}if(X)return s(ue,{colSpan:a.length,"data-vdt-pad":"",sx:{padding:0},children:dn(e,t)});let i=st?st(e,t):null;if(i!=null)return s(ue,{colSpan:a.length,"data-vdt-pad":"",sx:[{padding:C?"0 14px":"8px 16px"},...Array.isArray(Re)?Re:Re?[Re]:[]],children:i});let d=0,n=a.map((l,x)=>{if(d>0)return d-=1,null;let u=l.colSpan?Math.max(1,Math.min(l.colSpan(e,t),a.length-x)):1;d=u-1;let y=H?performance.now():0,B=l.render?l.render(e,t):String(e[l.id]||"");if(H){let O=performance.now()-y;M.current.cellRenderCalls+=1,M.current.cellRenderMs+=O,M.current.cellRenderMaxMs=Math.max(M.current.cellRenderMaxMs,O)}let Z=Qe.has(String(l.id)),g=l.cellPadding!==void 0,I=l.rowSpan?l.rowSpan(e,t):1;if(I<=0)return null;let W=l.onCellClick;return s(ue,{align:l.align||"left",rowSpan:I>1?I:void 0,colSpan:u>1?u:void 0,"data-vdt-pad":g?"":void 0,"data-vdt-pinned":Z?"":void 0,"data-vdt-cell-click":W?"":void 0,onClick:W?O=>{let oe=O.clientX-be.current.x,Q=O.clientY-be.current.y;O.stopPropagation(),!(Math.sqrt(oe*oe+Q*Q)>Nt)&&W(e,t,O)}:void 0,style:{...u>1?{}:K(l,x,l.width??l.minWidth),...l.primary?{fontSize:15}:{},...l.style,...l.cellStyle?l.cellStyle(e,t):{},padding:g?l.cellPadding:"8px 16px",...ve(l,!1)},children:B},String(l.id))});if(H){M.current.rowContentCalls+=1;let l=performance.now()-r;M.current.rowContentMs+=l,M.current.rowContentMaxMs=Math.max(M.current.rowContentMaxMs,l)}return s(Ve,{children:n})},[a,H,st,Re,C,Qe,ve,X,dn,K]),cn=k(()=>{let t=ln();if(!He||He.length===0)return t;let e=Qt.current;return L(Ve,{children:[t,s("tr",{"data-vdt-pinned-area":"",children:s("td",{colSpan:a.length,style:{padding:0,border:0},children:s(S,{"data-vdt-inner-scroll":"",sx:[{maxHeight:dt,overflowY:dt?"auto":"visible",overflowX:"hidden",scrollbarWidth:"thin",borderBottom:`1px solid ${C?v.borderStrong:"rgba(224, 224, 224, 1)"}`,"& tbody tr:last-of-type > td":{borderBottom:"none"}},...Array.isArray(Ee)?Ee:Ee?[Ee]:[]],children:L("table",{style:{width:"100%",tableLayout:Ye,borderCollapse:"separate",borderSpacing:0},children:[s("colgroup",{children:a.map((r,i)=>s("col",{style:K(r,i,r.width??r.minWidth)},String(r.id)))}),s(Cn,{children:He.map((r,i)=>e?s(e,{item:r,"data-index":i,"data-vdt-pinned-row":"",children:rt(i,r)},h?String(h(r,i)):`p${i}`):null)})]})})})})]})},[ln,He,dt,Ee,a,rt,Ye,h,C,v,K]),G=En??a.some(t=>typeof t.footer=="function"),un=k(()=>{if(!G)return null;let t=[];for(let e=0;e<a.length;e+=1){let r=a[e],i=r.footerColSpan&&r.footerColSpan>1?Math.min(r.footerColSpan,a.length-e):1;t.push(s(ue,{align:r.align||"left",colSpan:i>1?i:void 0,style:{...i>1?{}:K(r,e,r.width),...r.style,fontWeight:"bold",padding:C?"0 14px":"16px"},children:r.footer?r.footer(o):null},String(r.id))),e+=i-1}return s(_e,{children:t})},[G,a,o,C,K]),kt=ie(()=>({Scroller:Le?Hn:qt,Table:t=>s(Mr,{...t,sx:{borderCollapse:"separate",tableLayout:Ye,...$?{width:"var(--vdt-tw, 100%)",minWidth:`var(--vdt-tmin, ${Je??0}px)`}:Je&&!X?{minWidth:Je}:{},marginRight:ye?"16px":0,...G?{height:"100%"}:{}}}),TableHead:$e((t,e)=>s(Sr,{...t,ref:e,sx:{userSelect:"none","& > tr":{height:ge,"& > th":{padding:"16px",position:"sticky",top:0,zIndex:2,fontWeight:"bold"}}}})),TableRow:t=>{let{item:e,selected:r,"aria-selected":i,className:d,...n}=t,l=n["data-index"]??0,x=l%2===1,u=e&&Ie.current?Ie.current(e,l):l,y=!qe&&p!==null&&p!==void 0&&u===p,B=y&&q?typeof q=="function"?q(e,l):q:void 0,Z=String(d??"").split(/\s+/).filter(g=>g!=="Mui-selected"&&g!=="Mui-focusVisible").join(" ");return s(_e,{...n,"data-row-id":u!=null?String(u):void 0,className:Z||void 0,selected:y,onMouseDown:g=>{Ae.current=!1,be.current={x:g.clientX,y:g.clientY}},onContextMenu:g=>{e&&vt.current&&vt.current(e,l,g)},onClick:g=>{let I=g.clientX-be.current.x,W=g.clientY-be.current.y;if(Math.sqrt(I*I+W*W)>Nt||Ae.current){g.preventDefault(),g.stopPropagation(),Ae.current=!1;return}e&&yt.current&&yt.current(e,l),Ae.current=!1},sx:[{userSelect:"none",...ut?{"& > td":{height:De}}:{height:De,maxHeight:De},boxSizing:"border-box",backgroundColor:x&&ht?ht:"transparent","& td:not([data-vdt-pad])":{padding:"8px 16px"},"& td":{boxSizing:"border-box",borderBottom:se?"1px solid rgba(224, 224, 224, 1)":"none"},"& th":{padding:"8px 16px",borderBottom:"none"},"&:hover":et&&!y?{backgroundColor:g=>{let I=g.palette.mode==="dark",O=pt??"#000000",oe=Ut??.06;if(!pt)return I?`rgba(255, 255, 255, ${oe})`:`rgba(0, 0, 0, ${oe})`;let Q=O.replace("#","").trim();if(Q.length!==6)return O;let F=parseInt(Q.substring(0,2),16),J=parseInt(Q.substring(2,4),16),We=parseInt(Q.substring(4,6),16);return`rgba(${F}, ${J}, ${We}, ${oe})`}}:void 0,cursor:et?"pointer":void 0},B]})},TableBody:$e((t,e)=>{let{children:r,...i}=t;return L(Cn,{...i,ref:e,sx:G?{height:"100%"}:void 0,children:[r,G&&s("tr",{"aria-hidden":!0,style:{height:"100%"},children:s("td",{colSpan:a.length,style:{padding:0,border:0}})})]})}),TableFoot:$e((t,e)=>s(Tr,{...t,ref:e,sx:[{"& tr":{height:Se??U,maxHeight:Se??U,boxSizing:"border-box"},"& td":{height:Se??U,boxSizing:"border-box",backgroundColor:r=>r.palette.mode==="dark"?"#1e1e1e":"#ffffff",padding:"0 16px",color:"inherit",fontSize:"0.875rem",border:"none",boxShadow:`inset 0 1px 0 0 ${C?v.borderStrong:"#000000"}`}},...Array.isArray(Te)?Te:Te?[Te]:[]]}))}),[et,qe?null:p,q,U,ht,se,ge,pt,Ut,qt,Se,Te,G,C,v,a,Ye,ye,ut,Je,X,Le,$]);Qt.current=kt.TableRow;let Jn=kt,Ne=kt,er=Ne.Table,tr=Ne.TableHead,nr=Ne.TableBody,rr=Ne.TableRow,or=Ne.TableFoot,Y=Be?a.find(t=>String(t.id)===Be.colId):void 0,ar=()=>en(null),pn=null;if(Be&&Y){let t=String(Y.id),e=!!((Y.sortMenu??Y.sortable)&&A),r=Wt(Y),i=T===t?D:void 0;pn=s(Bt,{open:!0,anchorPosition:{left:Be.x,top:Be.y},onClose:ar,sort:e?{active:i??null,clearable:!!V,onChange:d=>{d?A?.(t,d):V?.()}}:void 0,filter:r?{options:Y.filterOptions??[],value:Y.filterValues??[],onChange:d=>Y.onFilterChange?.(d),multiple:Y.filterMultiple!==!1,emptyLabel:Y.filterEmptyLabel,searchable:Y.filterSearchable}:void 0})}let fn=L(S,{ref:Tt,style:Zn??void 0,sx:{position:"relative",height:me?"auto":"100%",width:"100%","& .MuiTableHead-root":{backgroundColor:t=>C?`${v.bg} !important`:t.palette.mode==="dark"?"#1e1e1e !important":"#ffffff !important"},...$n??{},...$?{"& thead th [data-vdt-resize]":{position:"absolute",top:0,right:0,bottom:0,width:"7px",cursor:"col-resize",zIndex:1,"&::after":{content:'""',position:"absolute",top:0,bottom:0,right:0,width:"2px",backgroundColor:C?v.selectedBar:je.palette.primary.main,opacity:0,transition:"opacity 0.12s ease"},"&:hover::after, &[data-active]::after":{opacity:1}}}:{},"& tbody td[data-vdt-pinned]":{backgroundColor:C?v.bg:je.palette.background.paper},"& tbody td[data-vdt-cell-click]":{cursor:"pointer"},"& tbody td[data-vdt-cell-click]:hover":{backgroundColor:C?v.hoverBg:je.palette.mode==="dark"?"rgba(255, 255, 255, 0.06)":"rgba(0, 0, 0, 0.04)"},...C&&et?{"& tbody tr:hover td[data-vdt-pinned]":{backgroundColor:v.hoverBg}}:{},...C?{...ye?{border:`1px solid ${v.borderStrong}`,borderRadius:"4px"}:{"& table":{backgroundColor:v.bg}},overflow:"hidden","& thead tr th > *":{verticalAlign:"middle"},"& thead > tr > th":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},"& thead > tr > th > *":{maxWidth:"100%"},"& thead .vdt-sort-box":{paddingRight:"20px"},"& thead .vdt-sort-box > .MuiTableSortLabel-root":{left:"auto !important",right:0,marginLeft:"0 !important"},"& thead tr th":{height:ge,boxSizing:"border-box",padding:"0 14px !important",fontSize:13,fontWeight:"500 !important",color:v.headerColor,backgroundColor:`${v.bg} !important`,borderTop:!ye&&Ln?`1px solid ${v.borderStrong}`:"none",borderBottom:`1px solid ${v.borderStrong}`,borderRight:`1px solid ${v.border}`,"&:last-of-type":{borderRight:"none"}},"& tbody tr td:not([data-vdt-pad])":{padding:"0 14px !important"},"& tbody tr td":{fontSize:14,borderBottom:`1px solid ${v.border}`},...o.length>0&&(me||qn||G)?{[`& tbody tr[data-index="${o.length-1}"]:not([data-vdt-pinned-row]) td`]:{borderBottom:"none"}}:{}}:{}},children:[we?s(S,{sx:{overflowX:"auto",width:"100%"},children:L(er,{children:[X?null:s(tr,{children:cn()}),s(nr,{children:o.map((t,e)=>s(rr,{item:t,"data-index":e,children:rt(e,t)},h?String(h(t,e)):e))}),G&&!X?s(or,{children:un()}):null]})}):ct===null?null:s(Lr,{ref:bt,data:o,totalCount:N?o.length+1:o.length,defaultItemHeight:De,fixedItemHeight:ut?void 0:De,fixedHeaderContent:X?void 0:cn,fixedFooterContent:G&&!X?un:void 0,itemContent:rt,...In&&h?{computeItemKey:(t,e)=>e?h(e,t):`vdt-${t}`}:{},endReached:Qn,scrollerRef:t=>{xt.current=t instanceof HTMLElement?t:null,Ke()},totalListHeightChanged:Ke,style:Le?void 0:{height:"100%"},...Le?{customScrollParent:ct}:{},increaseViewportBy:{top:Nn,bottom:Wn},overscan:_n,...de&&o.length>0?{initialItemCount:Math.min(de,o.length)}:{},followOutput:!1,components:Jn},Yn),o.length===0&&!c&&!jt&&C&&typeof ce=="string"&&s(S,{sx:{position:me?"static":"absolute",top:X?0:ge,left:0,right:0,py:6,px:2,textAlign:"center",fontSize:14,color:v.emptyColor,pointerEvents:"none"},children:ce}),o.length===0&&!c&&!jt&&!(C&&typeof ce=="string")&&s(S,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,px:2,textAlign:"center",pointerEvents:"none","& > *":{pointerEvents:"auto"}},children:typeof ce=="string"?L(Ve,{children:[s(S,{sx:{width:48,height:48,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",backgroundColor:"#f5f5f5",color:"#999"},children:"\u{1F4C4}"}),s(Hr,{variant:"body1",sx:{color:"text.secondary"},children:ce})]}):ce}),pn,Un&&s(Ve,{children:Xe?s(Xe,{visible:c,onComplete:Gt}):s(bn,{visible:c,onComplete:Gt,size:40,indicator:s(yn,{}),sx:{top:`${a.some(t=>t.group)?ge*2:ge}px`,bottom:`${G?Se??U:0}px`},background:{show:o.length===0,opacity:.8}})})]}),hn=C&&ye?{paddingRight:Ue,paddingTop:Rn,paddingBottom:Rn}:{};return fe?s(Rr,{className:"grow",elevation:1,sx:{padding:0,paddingLeft:Ue,...hn,boxSizing:"border-box",height:me?"auto":"100%",minHeight:0,flex:me?"none":1,display:"flex",flexDirection:"column"},children:fn}):s(S,{className:"grow",style:{padding:0,paddingLeft:Ue,...hn,boxSizing:"border-box",height:me?"auto":"100%",minHeight:0,flex:me?"none":1,display:"flex",flexDirection:"column"},children:fn})}var Wr=Cr(Nr);export{Dt as HEADER_MENU_FONT_SIZE,ee as HEADER_MENU_ICON_PATHS,It as HEADER_MENU_ICON_SIZE,Pt as HEADER_MENU_ITEM_HEIGHT,vn as HEADER_MENU_ITEM_SX,At as HeaderFilterIcon,Bt as HeaderMenu,at as HeaderMenuDivider,Ce as HeaderMenuIcon,ae as HeaderMenuItem,Wr as VirtualDataTable,vr as headerMenuAnchor};
|
|
5
5
|
/**
|
|
6
6
|
* Virtual Data Table - A high-performance virtual data table component for React
|
|
7
7
|
*
|