mantine-datatable 2.0.2 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- var vr=Object.create;var ie=Object.defineProperty;var Hr=Object.getOwnPropertyDescriptor;var Nr=Object.getOwnPropertyNames;var Er=Object.getPrototypeOf,qr=Object.prototype.hasOwnProperty;var Wr=(o,e)=>()=>(o&&(e=o(o=0)),e);var vo=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports);var zr=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let f of Nr(e))!qr.call(o,f)&&f!==r&&ie(o,f,{get:()=>e[f],enumerable:!(t=Hr(e,f))||t.enumerable});return o};var Vr=(o,e,r)=>(r=o!=null?vr(Er(o)):{},zr(e||!o||!o.__esModule?ie(r,"default",{value:o,enumerable:!0}):r,o));import*as s from"react";var a=Wr(()=>{"use strict"});var Se=vo((Ft,Ce)=>{"use strict";a();var Xr="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Ce.exports=Xr});var ye=vo((At,Be)=>{"use strict";a();var Zr=Se();function he(){}function be(){}be.resetWarningCache=he;Be.exports=function(){function o(t,f,n,d,c,m){if(m!==Zr){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}o.isRequired=o;function e(){return o}var r={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:e,element:o,elementType:o,instanceOf:e,node:o,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:be,resetWarningCache:he};return r.PropTypes=r,r}});var we=vo((vt,Te)=>{a();Te.exports=ye()();var Lt,Mt});a();a();import{Box as gt,createStyles as Ct,packSx as St,Table as ht}from"@mantine/core";import{useElementSize as ho}from"@mantine/hooks";import{useEffect as bt}from"react";a();import{createStyles as Ur}from"@mantine/core";import{jsx as ge}from"react/jsx-runtime";var Gr=Ur({root:{"&&":{background:"transparent",":last-of-type td":{borderBottom:"none"}}}});function Ho(){let{classes:o}=Gr();return ge("tr",{className:o.root,children:ge("td",{})})}a();import{Center as jr,createStyles as oa,Text as ea}from"@mantine/core";a();a();var M=Vr(we());import{forwardRef as Kr,createElement as Oe}from"react";a();var Re={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var $r=Object.defineProperty,_r=Object.defineProperties,Yr=Object.getOwnPropertyDescriptors,lo=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,De=(o,e,r)=>e in o?$r(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Fe=(o,e)=>{for(var r in e||(e={}))ke.call(e,r)&&De(o,r,e[r]);if(lo)for(var r of lo(e))Ae.call(e,r)&&De(o,r,e[r]);return o},Qr=(o,e)=>_r(o,Yr(e)),Jr=(o,e)=>{var r={};for(var t in o)ke.call(o,t)&&e.indexOf(t)<0&&(r[t]=o[t]);if(o!=null&&lo)for(var t of lo(o))e.indexOf(t)<0&&Ae.call(o,t)&&(r[t]=o[t]);return r},V=(o,e,r)=>{let t=Kr((f,n)=>{var d=f,{color:c="currentColor",size:m=24,stroke:p=2,children:l}=d,g=Jr(d,["color","size","stroke","children"]);return Oe("svg",Fe(Qr(Fe({ref:n},Re),{width:m,height:m,stroke:c,strokeWidth:p,className:`tabler-icon tabler-icon-${o}`}),g),[...r.map(([x,u])=>Oe(x,u)),...l||[]])});return t.propTypes={color:M.default.string,size:M.default.oneOfType([M.default.string,M.default.number]),stroke:M.default.oneOfType([M.default.string,M.default.number])},t.displayName=`${e}`,t};a();var No=V("arrow-up","IconArrowUp",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]]);a();var Eo=V("arrows-vertical","IconArrowsVertical",[["path",{d:"M8 7l4 -4l4 4",key:"svg-0"}],["path",{d:"M8 17l4 4l4 -4",key:"svg-1"}],["path",{d:"M12 3l0 18",key:"svg-2"}]]);a();var qo=V("database-off","IconDatabaseOff",[["path",{d:"M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74",key:"svg-0"}],["path",{d:"M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6",key:"svg-1"}],["path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]]);import{Fragment as aa,jsx as so,jsxs as ta}from"react/jsx-runtime";var ra=oa(o=>({root:{position:"absolute",top:0,right:0,bottom:0,left:0,flexDirection:"column",pointerEvents:"none",color:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[6],opacity:0,transition:"opacity .15s ease"},active:{opacity:1},standardIcon:{fontSize:0,borderRadius:"50%",padding:o.spacing.xs,background:o.colorScheme==="dark"?o.colors.dark[5]:o.colors.gray[2]}}));function Wo({icon:o,text:e,pt:r,pb:t,active:f,children:n}){let{classes:d,cx:c}=ra();return so(jr,{pt:r,pb:t,className:c(d.root,{[d.active]:f}),children:n||ta(aa,{children:[o||so("div",{className:d.standardIcon,children:so(qo,{})}),so(ea,{size:"sm",color:"dimmed",children:e})]})})}a();import{Box as la,createStyles as da,Pagination as sa,Text as ca}from"@mantine/core";import{forwardRef as ua}from"react";a();import{Button as fa,Group as na,Menu as co,Text as Pe}from"@mantine/core";import{jsx as U,jsxs as Me}from"react/jsx-runtime";var Le={xs:22,sm:26,md:32,lg:38,xl:44};function zo({size:o,label:e,values:r,value:t,onChange:f,color:n}){return Me(na,{spacing:"xs",children:[U(Pe,{size:o,children:e}),Me(co,{withinPortal:!0,withArrow:!0,children:[U(co.Target,{children:U(fa,{size:o,variant:"default",sx:[{fontWeight:"normal"},d=>({height:Le[o],paddingLeft:d.spacing[o],paddingRight:d.spacing[o]})],children:t})}),U(co.Dropdown,{children:r.map(d=>{let c=d===t;return U(co.Item,{sx:[{height:Le[o]},m=>({"&&":{color:c?m.white:void 0},background:c?m.colors[n||m.primaryColor][6]:void 0})],disabled:c,onClick:()=>f(d),children:U(Pe,{size:o,children:d})},d)})})]})]})}import{jsx as Vo,jsxs as ma}from"react/jsx-runtime";var pa=da((o,{topBorderColor:e,paginationWrapBreakpoint:r})=>({root:{background:o.colorScheme==="dark"?o.colors.dark[7]:o.white,borderTop:`1px solid ${typeof e=="function"?e(o):e}`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",gap:o.spacing.xs,[o.fn.largerThan(r)]:{flexDirection:"row"}},text:{flex:"1 1 auto"},pagination:{opacity:1,transition:"opacity .15s ease"},paginationFetching:{opacity:0}})),ve=ua(function({className:e,style:r,topBorderColor:t,fetching:f,page:n,onPageChange:d,paginationColor:c,paginationSize:m,loadingText:p,noRecordsText:l,paginationText:g,totalRecords:x,recordsPerPage:u,onRecordsPerPageChange:i,recordsPerPageLabel:C,recordsPerPageOptions:h,recordsLength:b,horizontalSpacing:v,paginationWrapBreakpoint:k},T){let w;if(f)w=p;else if(!x)w=l;else{let P=(n-1)*u+1,X=P+b-1;w=g({from:P,to:X,totalRecords:x})}let{classes:R,cx:F}=pa({topBorderColor:t,paginationWrapBreakpoint:k});return ma(la,{ref:T,px:v??"xs",py:"xs",className:F(R.root,e),style:r,children:[Vo(ca,{className:R.text,size:m,children:w}),h&&Vo(zo,{size:m,label:C,values:h,value:u,onChange:i}),Vo(sa,{color:c,className:F(R.pagination,{[R.paginationFetching]:f||!b}),value:n,onChange:d,size:m,total:Math.ceil(x/u)})]})});a();import{Checkbox as ba,createStyles as Ba}from"@mantine/core";import{forwardRef as ya}from"react";a();import{Box as Uo,Center as ia,createStyles as ga,Group as Ca}from"@mantine/core";a();import{useMantineTheme as xa}from"@mantine/core";import{useMediaQuery as Ia}from"@mantine/hooks";function uo(o){let e=xa(),r=typeof o=="function"?o(e):o;return Ia(r||"",!0)}function po(o){let e=o.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${e.charAt(0).toUpperCase()}${e.slice(1)}`}function He(o,e,r){return o.filter(t=>!e.map(r).includes(r(t)))}function mo(o,e){return o.filter((r,t,f)=>t===f.findIndex(n=>e(r)===e(n)))}function S(o,e){return e?e.match(/([^[.\]])+/g).reduce((t,f)=>t&&t[f],o):void 0}import{jsx as G,jsxs as ha}from"react/jsx-runtime";var Sa=ga(o=>({sortableColumnHeader:{cursor:"pointer",transition:"background .15s ease","&:hover":{background:o.colorScheme==="dark"?o.colors.dark[6]:o.colors.gray[0]}},sortableColumnHeaderGroup:{gap:"0.25em"},columnHeaderText:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},sortableColumnHeaderText:{minWidth:0,flexGrow:1},sortableColumnHeaderIcon:{transition:"transform .15s ease"},sortableColumnHeaderIconRotated:{transform:"rotate3d(0, 0, 1, 180deg)"},sortableColumnHeaderNeutralIcon:{color:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[5],transition:"color .15s ease","th:hover &":{color:o.colorScheme==="dark"?o.colors.dark[2]:o.colors.gray[6]}}}));function Go({className:o,sx:e,style:r,accessor:t,visibleMediaQuery:f,title:n,sortable:d,textAlignment:c,width:m,sortStatus:p,onSortStatusChange:l}){let{cx:g,classes:x}=Sa();if(!uo(f))return null;let u=n??po(t),i=typeof u=="string"?u:void 0;return G(Uo,{component:"th",className:g({[x.sortableColumnHeader]:d},o),sx:[{"&&":{textAlign:c},width:m,minWidth:m,maxWidth:m},e],style:r,role:d?"button":void 0,onClick:d&&l?()=>{l({columnAccessor:t,direction:p?.direction==="asc"?"desc":"asc"})}:void 0,children:d||p?.columnAccessor===t?ha(Ca,{className:x.sortableColumnHeaderGroup,position:"apart",noWrap:!0,children:[G(Uo,{className:g(x.columnHeaderText,x.sortableColumnHeaderText),title:i,children:u}),G(ia,{children:p?.columnAccessor===t?G(No,{className:g(x.sortableColumnHeaderIcon,{[x.sortableColumnHeaderIconRotated]:p.direction==="desc"}),size:14}):G(Eo,{className:x.sortableColumnHeaderNeutralIcon,size:14})})]}):G(Uo,{className:x.columnHeaderText,title:i,children:u})})}import{jsx as xo,jsxs as wa}from"react/jsx-runtime";var Ta=Ba(o=>{let e=o.colorScheme==="dark"?.5:.05;return{root:{zIndex:2,position:"sticky",top:0,background:o.colorScheme==="dark"?o.colors.dark[7]:o.white},textSelectionDisabled:{userSelect:"none"},selectorColumnHeader:{position:"sticky",width:0,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-o.spacing.sm,bottom:0,borderLeft:`1px solid ${o.colorScheme==="dark"?o.colors.dark[4]:o.colors.gray[3]}`,width:o.spacing.sm,background:`linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},selectorColumnHeaderWithRightShadow:{"&::after":{opacity:1}},selectionCheckboxInput:{cursor:"pointer"}}}),Ne=ya(function({className:e,style:r,sortStatus:t,onSortStatusChange:f,columns:n,selectionVisible:d,selectionChecked:c,selectionIndeterminate:m,onSelectionChange:p,leftShadowVisible:l},g){let{classes:x,cx:u}=Ta();return xo("thead",{className:u(x.root,e),style:r,ref:g,children:wa("tr",{children:[d&&xo("th",{className:u(x.selectorColumnHeader,{[x.selectorColumnHeaderWithRightShadow]:l}),children:xo(ba,{classNames:{input:x.selectionCheckboxInput},checked:c,indeterminate:m,disabled:!p,onChange:p})}),n.map(({accessor:i,hidden:C,visibleMediaQuery:h,textAlignment:b,width:v,title:k,sortable:T,titleClassName:w,titleStyle:R,titleSx:F})=>C?null:xo(Go,{className:w,style:R,sx:F,accessor:i,visibleMediaQuery:h,textAlignment:b,width:v,title:k,sortable:T,sortStatus:t,onSortStatusChange:f},i))]})})});a();import{Center as Ra,createStyles as Oa,Loader as Da}from"@mantine/core";import{jsx as Ee}from"react/jsx-runtime";var Fa=Oa(o=>({root:{zIndex:3,position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",background:o.fn.rgba(o.colorScheme==="dark"?o.colors.dark[8]:o.white,.75),opacity:0,transition:"opacity .15s ease"},fetching:{pointerEvents:"all",opacity:1}}));function Xo({pt:o,pb:e,fetching:r,customContent:t,backgroundBlur:f,size:n,variant:d,color:c}){let{classes:m,cx:p}=Fa();return Ee(Ra,{pt:o,pb:e,className:p(m.root,{[m.fetching]:r}),sx:f?{backdropFilter:`blur(${f}px)`}:void 0,children:r&&(t||Ee(Da,{size:n,variant:d,color:c}))})}a();import{Box as Va,createStyles as Ua}from"@mantine/core";a();import{Box as ka,createStyles as Aa}from"@mantine/core";import{jsx as La}from"react/jsx-runtime";var Pa=Aa({withPointerCursor:{cursor:"pointer"},noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function Zo({className:o,sx:e,style:r,visibleMediaQuery:t,record:f,recordIndex:n,onClick:d,noWrap:c,ellipsis:m,textAlignment:p,width:l,accessor:g,render:x,defaultRender:u,customCellAttributes:i}){let{cx:C,classes:h}=Pa();return uo(t)?La(ka,{component:"td",className:C({[h.noWrap]:c||m,[h.ellipsis]:m,[h.withPointerCursor]:d},o),sx:[{width:l,minWidth:l,maxWidth:l,textAlign:p},e],style:r,onClick:d,...i?.(f,n),children:x?x(f,n):u?u(f,n,g):S(f,g)}):null}a();import{Collapse as Ma,createStyles as va}from"@mantine/core";a();import{useDebouncedState as Io,useTimeout as qe}from"@mantine/hooks";import{useEffect as Ko,useState as j}from"react";var io=200,go={leading:!0};function We(){let[o,e]=Io(!0,io,go),[r,t]=Io(!0,io,go),[f,n]=Io(!0,io,go),[d,c]=Io(!0,io,go);return{scrolledToTop:o,setScrolledToTop:e,scrolledToBottom:r,setScrolledToBottom:t,scrolledToLeft:f,setScrolledToLeft:n,scrolledToRight:d,setScrolledToRight:c}}function ze(o){let[e,r]=j(null),t=o?.join(":")||"";return Ko(()=>{r(null)},[t]),{lastSelectionChangeIndex:e,setLastSelectionChangeIndex:r}}function Ve(o){let[e,r]=j(null);return Ko(()=>{o&&r(null)},[o]),{rowContextMenuInfo:e,setRowContextMenuInfo:r}}function Ue({rowExpansion:o,records:e,idAccessor:r}){let t=[];if(o&&e){let{trigger:c,allowMultiple:m,initiallyExpanded:p}=o;e&&c==="always"?t=e.map(l=>S(l,r)):p&&(t=e.filter(p).map(l=>S(l,r)),m||(t=[t[0]]))}let f,n,d=j(t);if(o){let{trigger:c,allowMultiple:m,collapseProps:p,content:l}=o;o.expanded?{recordIds:f,onRecordIdsChange:n}=o.expanded:[f,n]=d;let g=x=>n(f.filter(u=>u!==S(x,r)));return{expandOnClick:c!=="always"&&c!=="never",isRowExpanded:x=>c==="always"?!0:f.includes(S(x,r)),expandRow:x=>{let u=S(x,r);n(m?[...f,u]:[u])},collapseRow:g,collapseProps:p,content:(x,u)=>()=>l({record:x,recordIndex:u,collapse:()=>g(x)})}}}function Ge(o,e){let[r,t]=j(o),[f,n]=j(o),d=qe(()=>t(!0),0),c=qe(()=>n(!1),e||200);return Ko(()=>{o?(c.clear(),n(!0),d.start()):(d.clear(),t(!1),c.start())},[d,c,o]),{expanded:r,visible:f}}import{Fragment as Na,jsx as Co,jsxs as Ea}from"react/jsx-runtime";var Ha=va({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function $o({open:o,colSpan:e,content:r,collapseProps:t}){let{expanded:f,visible:n}=Ge(o,t?.transitionDuration),{cx:d,classes:c}=Ha();return n?Ea(Na,{children:[Co("tr",{}),Co("tr",{children:Co("td",{className:d(c.cell,{[c.expandedCell]:f}),colSpan:e,children:Co(Ma,{in:f,...t,children:r()})})})]}):null}a();import{Checkbox as qa,createStyles as Wa}from"@mantine/core";import{jsx as Xe}from"react/jsx-runtime";var za=Wa(o=>{let e=o.colorScheme==="dark"?.5:.05;return{root:{position:"sticky",zIndex:1,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-o.spacing.sm,bottom:0,borderLeft:`1px solid ${o.colorScheme==="dark"?o.colors.dark[4]:o.colors.gray[3]}`,width:o.spacing.sm,background:`linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},withRightShadow:{"&::after":{opacity:1}},checkbox:{cursor:"pointer"}}});function _o({withRightShadow:o,...e}){let{cx:r,classes:t}=za();return Xe("td",{className:r(t.root,{[t.withRightShadow]:o}),children:Xe(qa,{classNames:{input:t.checkbox},...e,onClick:f=>f.stopPropagation()})})}import{Fragment as Xa,jsx as Yo,jsxs as Ze}from"react/jsx-runtime";var Ga=Ua(o=>{let e=o.colors[o.primaryColor][6];return{withPointerCursor:{cursor:"pointer"},selected:{"&&":{"tr&":{background:o.colorScheme==="dark"?o.fn.darken(e,.6):o.fn.lighten(e,.9)},"table[data-striped] tbody &:nth-of-type(odd)":{background:o.colorScheme==="dark"?o.fn.darken(e,.55):o.fn.lighten(e,.85)}}},contextMenuVisible:{"&&":{"tr&":{background:o.colorScheme==="dark"?o.fn.darken(e,.5):o.fn.lighten(e,.7)},"table[data-striped] tbody &:nth-of-type(odd)":{background:o.colorScheme==="dark"?o.fn.darken(e,.45):o.fn.lighten(e,.65)}}}}});function Qo({record:o,recordIndex:e,columns:r,defaultColumnRender:t,selectionVisible:f,selectionChecked:n,onSelectionChange:d,isRecordSelectable:c,onClick:m,onCellClick:p,onContextMenu:l,expansion:g,customRowAttributes:x,className:u,style:i,sx:C,contextMenuVisible:h,leftShadowVisible:b}){let{cx:v,classes:k}=Ga();return Ze(Xa,{children:[Ze(Va,{component:"tr",className:v({[k.withPointerCursor]:m||g?.expandOnClick,[k.selected]:n,[k.contextMenuVisible]:h},typeof u=="function"?u(o,e):u),onClick:T=>{if(g){let{isRowExpanded:w,expandOnClick:R,expandRow:F,collapseRow:P}=g;R&&(w(o)?P(o):F(o))}m?.(T)},style:typeof i=="function"?i(o,e):i,sx:C,...x?.(o,e),onContextMenu:l,children:[f&&Yo(_o,{withRightShadow:b,checked:n,disabled:!d||(c?!c(o,e):!1),onChange:d}),r.map((T,w)=>{let{accessor:R,hidden:F,visibleMediaQuery:P,textAlignment:X,noWrap:bo,ellipsis:Bo,width:yo,render:To,cellsClassName:Z,cellsStyle:K,cellsSx:wo,customCellAttributes:Ro}=T,oo;return p&&(oo=()=>p({record:o,recordIndex:e,column:T,columnIndex:w})),F?null:Yo(Zo,{className:typeof Z=="function"?Z(o,e):Z,style:typeof K=="function"?K(o,e):K,sx:wo,visibleMediaQuery:P,record:o,recordIndex:e,onClick:oo,accessor:R,textAlignment:X,noWrap:bo,ellipsis:Bo,width:yo,render:To,defaultRender:t,customCellAttributes:Ro},R)})]}),g&&Yo($o,{colSpan:r.filter(T=>!T.hidden).length+(f?1:0),open:g.isRowExpanded(o),content:g.content(o,e),collapseProps:g.collapseProps})]})}a();import{createStyles as Za,Paper as Ka,px as $a,useMantineTheme as _a}from"@mantine/core";import{useClickOutside as Ya,useElementSize as Qa,useMergedRef as Ja,useWindowEvent as Ke}from"@mantine/hooks";import{jsx as ot}from"react/jsx-runtime";var ja=Za(o=>({root:{position:"fixed",border:`1px solid ${o.colorScheme==="dark"?o.colors.dark[4]:o.colors.gray[3]}`,overflow:"hidden",transition:"all .15s ease"}}));function Jo({borderRadius:o="xs",shadow:e="sm",zIndex:r=3,y:t,x:f,onDestroy:n,children:d}){Ke("resize",n),Ke("scroll",n);let c=Ya(n),{ref:m,width:p,height:l}=Qa(),g=Ja(c,m),{dir:x,spacing:u}=_a(),i=$a(u.md),{innerWidth:C,innerHeight:h}=window,{classes:b}=ja();return ot(Ka,{ref:g,shadow:e,radius:o,className:b.root,sx:{zIndex:r,top:t+l+i>h?h-l-i:t,left:x==="ltr"?f+p+i>C?C-p-i:f:C-i-(f-p-i<0?p+i:f)},children:d})}a();import{createStyles as et}from"@mantine/core";import{jsx as at}from"react/jsx-runtime";var rt=et(o=>({root:{height:1,background:o.colorScheme==="dark"?o.colors.dark[5]:o.colors.gray[1]}}));function jo(){let{classes:o}=rt();return at("div",{className:o.root})}a();import{Box as tt,createStyles as ft,px as nt,Text as lt,UnstyledButton as dt}from"@mantine/core";import{jsx as $e,jsxs as ct}from"react/jsx-runtime";var st=ft((o,{color:e})=>{let r=nt(o.spacing.sm)/2;return{root:{width:"100%",display:"flex",alignItems:"center",paddingTop:r,paddingBottom:r,paddingLeft:o.spacing.sm,paddingRight:o.spacing.sm,color:e&&o.colors[e][6],transition:"background .15s ease","&[disabled]":{cursor:"not-allowed",color:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[5]},"&:hover:not([disabled])":{background:o.fn.rgba(e?o.colors[e][6]:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[4],e?o.colorScheme==="dark"?.15:.08:.25)},"&:active:not([disabled])":{background:o.fn.rgba(e?o.colors[e][6]:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[4],e?o.colorScheme==="dark"?.3:.2:.5)}},icon:{fontSize:0,marginRight:o.spacing.xs},title:{whiteSpace:"nowrap"}}});function oe({icon:o,title:e,color:r,disabled:t,onClick:f}){let{classes:n}=st({color:r});return ct(dt,{className:n.root,disabled:t,onClick:f,children:[o&&$e(tt,{className:n.icon,children:o}),$e(lt,{className:n.title,size:"sm",children:e})]})}a();import{Box as ut,createStyles as pt,ScrollArea as mt}from"@mantine/core";import{forwardRef as xt}from"react";import{jsx as So,jsxs as it}from"react/jsx-runtime";var It=pt(o=>{let e=o.colorScheme==="dark"?.5:.05;return{root:{flex:"1 1 100%"},scrollbar:{'&[data-state="visible"]':{background:"transparent"},"div::before":{pointerEvents:"none"}},corner:{background:"transparent"},thumb:{zIndex:3},shadow:{position:"absolute",pointerEvents:"none",opacity:0,transition:"opacity .15s ease"},topShadow:{zIndex:2,top:0,left:0,right:0,height:o.spacing.sm,background:`linear-gradient(${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`},leftShadow:{zIndex:3,top:0,left:0,bottom:0,width:o.spacing.sm,background:`linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`},rightShadow:{zIndex:2,top:0,bottom:0,right:0,width:o.spacing.sm,background:`linear-gradient(to left, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(to left, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`},bottomShadow:{zIndex:2,left:0,right:0,bottom:0,height:o.spacing.sm,background:`linear-gradient(${o.fn.rgba(o.black,0)}, ${o.fn.rgba(o.black,e)}), linear-gradient(${o.fn.rgba(o.black,0)} 30%, ${o.fn.rgba(o.black,e)})`},shadowVisible:{opacity:1}}}),_e=xt(function({topShadowVisible:e,leftShadowVisible:r,rightShadowVisible:t,bottomShadowVisible:f,headerHeight:n,onScrollPositionChange:d,children:c},m){let{cx:p,classes:l}=It();return it(mt,{viewportRef:m,classNames:{root:l.root,scrollbar:l.scrollbar,thumb:l.thumb,corner:l.corner},styles:{scrollbar:{marginTop:n}},onScrollPositionChange:d,children:[c,So(ut,{className:p(l.shadow,l.topShadow,{[l.shadowVisible]:e}),sx:{top:n}}),So("div",{className:p(l.shadow,l.leftShadow,{[l.shadowVisible]:r})}),So("div",{className:p(l.shadow,l.rightShadow,{[l.shadowVisible]:t})}),So("div",{className:p(l.shadow,l.bottomShadow,{[l.shadowVisible]:f})})]})});import{jsx as D,jsxs as Qe}from"react/jsx-runtime";var Ye={},Bt=Ct((o,{borderColor:e,rowBorderColor:r})=>{let t=typeof e=="function"?e(o):e,f=typeof r=="function"?r(o):r;return{root:{position:"relative",display:"flex",flexDirection:"column",overflow:"hidden",tr:{backgroundColor:o.colorScheme==="dark"?o.colors.dark[7]:o.white},"&&":{"thead tr th":{borderBottomColor:t},"tbody tr td":{borderTopColor:f}}},lastRowBorderBottomVisible:{"tbody tr:last-of-type td":{borderBottom:`1px solid ${f}`}},textSelectionDisabled:{userSelect:"none"},table:{borderCollapse:"separate",borderSpacing:0},tableWithBorder:{border:`1px solid ${t}`},tableWithColumnBorders:{"&&":{"th, td":{":not(:first-of-type)":{borderLeft:`1px solid ${f}`}}}},verticalAlignmentTop:{td:{verticalAlign:"top"}},verticalAlignmentBottom:{td:{verticalAlign:"bottom"}}}});function Je({withBorder:o,borderRadius:e,borderColor:r=B=>B.colorScheme==="dark"?B.colors.dark[4]:B.colors.gray[3],rowBorderColor:t=B=>B.fn.rgba(B.colorScheme==="dark"?B.colors.dark[4]:B.colors.gray[3],.65),withColumnBorders:f,textSelectionDisabled:n,height:d="100%",minHeight:c,shadow:m,verticalAlignment:p="center",fetching:l,columns:g,defaultColumnRender:x,idAccessor:u="id",records:i,selectedRecords:C,onSelectedRecordsChange:h,isRecordSelectable:b,sortStatus:v,onSortStatusChange:k,horizontalSpacing:T,page:w,onPageChange:R,totalRecords:F,recordsPerPage:P,onRecordsPerPageChange:X,recordsPerPageOptions:bo,recordsPerPageLabel:Bo="Records per page",paginationColor:yo,paginationSize:To="sm",paginationText:Z=({from:B,to:$,totalRecords:q})=>`${B} - ${$} / ${q}`,paginationWrapBreakpoint:K="sm",loaderBackgroundBlur:wo,customLoader:Ro,loaderSize:oo,loaderVariant:je,loaderColor:or,loadingText:er="...",emptyState:rr,noRecordsText:ee="No records",noRecordsIcon:ar,striped:tr,onRowClick:Oo,onCellClick:fr,rowContextMenu:A,rowExpansion:nr,rowClassName:lr,rowStyle:dr,rowSx:sr,customRowAttributes:cr,bodyRef:ur,m:pr,my:mr,mx:xr,mt:Ir,mb:ir,ml:gr,mr:Cr,sx:Sr,className:hr,classNames:Do,style:br,styles:Fo,...Br}){let{ref:B,width:$,height:q}=ho(),{ref:yr,height:ko}=ho(),{ref:Tr,width:Ao,height:eo}=ho(),{ref:wr,height:re}=ho(),{scrolledToTop:Rr,setScrolledToTop:ae,scrolledToBottom:Or,setScrolledToBottom:te,scrolledToLeft:fe,setScrolledToLeft:ne,scrolledToRight:Dr,setScrolledToRight:le}=We(),{rowContextMenuInfo:H,setRowContextMenuInfo:_}=Ve(l),Fr=Ue({rowExpansion:nr,records:i,idAccessor:u}),de=()=>{if(!l&&A&&_(null),l||eo<=q)ae(!0),te(!0);else{let I=B.current.scrollTop;ae(I===0),te(Math.round(eo-I)===Math.round(q))}if(l||Ao===$)ne(!0),le(!0);else{let I=B.current.scrollLeft;ne(I===0),le(Math.round(Ao-I)===Math.round($))}};bt(de,[l,q,B,$,eo,Ao]);let kr=I=>{B.current.scrollTo({top:0,left:0}),R(I)},ro=i?.length,se=i?.map(I=>S(I,u)),Y=C?.map(I=>S(I,u)),ce=se!==void 0&&Y!==void 0&&Y.length>0,ue=b?i?.filter(b):i,Po=ue?.map(I=>S(I,u)),Lo=ce&&Po.every(I=>Y.includes(I)),Ar=ce&&Po.some(I=>Y.includes(I)),pe;h&&(pe=()=>{h(Lo?C.filter(I=>!Po.includes(S(I,u))):mo([...C,...ue],I=>S(I,u)))});let{lastSelectionChangeIndex:ao,setLastSelectionChangeIndex:Pr}=ze(se),me=!!C&&!fe,{cx:xe,classes:L,theme:Lr}=Bt({borderColor:r,rowBorderColor:t}),Mr={m:pr,my:mr,mx:xr,mt:Ir,mb:ir,ml:gr,mr:Cr},Mo=typeof Fo=="function"?Fo(Lr,Ye,Ye):Fo;return Qe(gt,{...Mr,className:xe(L.root,{[L.tableWithBorder]:o},hr,Do?.root),sx:[I=>({borderRadius:I.radius[e]||e,boxShadow:I.shadows[m]||m,height:d,minHeight:c}),...St(Sr)],style:{...Mo?.root,...br},children:[D(_e,{ref:B,topShadowVisible:!Rr,leftShadowVisible:!(C||fe),rightShadowVisible:!Dr,bottomShadowVisible:!Or,headerHeight:ko,onScrollPositionChange:de,children:Qe(ht,{ref:Tr,horizontalSpacing:T,className:xe(L.table,{[L.tableWithColumnBorders]:f,[L.lastRowBorderBottomVisible]:eo<q,[L.textSelectionDisabled]:n,[L.verticalAlignmentTop]:p==="top",[L.verticalAlignmentBottom]:p==="bottom"}),striped:ro?tr:!1,...Br,children:[D(Ne,{ref:yr,className:Do?.header,style:Mo?.header,columns:g,sortStatus:v,onSortStatusChange:k,selectionVisible:!!C,selectionChecked:Lo,selectionIndeterminate:Ar&&!Lo,onSelectionChange:pe,leftShadowVisible:me}),D("tbody",{ref:ur,children:ro?i.map((I,y)=>{let W=S(I,u),Q=Y?.includes(W)||!1,to=!1,fo=!1;if(A){let{hidden:O}=A;(!O||!(typeof O=="function"?O(I,y):O))&&(A.trigger==="click"?to=!0:fo=!0)}let no;h&&(no=O=>{if(O.nativeEvent.shiftKey&&ao!==null){let z=i.filter(y>ao?(N,E)=>E>=ao&&E<=y&&(b?b(N,E):!0):(N,E)=>E>=y&&E<=ao&&(b?b(N,E):!0));h(Q?He(C,z,N=>S(N,u)):mo([...C,...z],N=>S(N,u)))}else h(Q?C.filter(z=>S(z,u)!==W):mo([...C,I],z=>S(z,u)));Pr(y)});let J;to?J=O=>{_({y:O.clientY,x:O.clientX,record:I,recordIndex:y}),Oo?.(I,y)}:Oo&&(J=()=>{Oo(I,y)});let Ie;return fo&&(Ie=O=>{O.preventDefault(),_({y:O.clientY,x:O.clientX,record:I,recordIndex:y})}),D(Qo,{record:I,recordIndex:y,columns:g,defaultColumnRender:x,selectionVisible:!!C,selectionChecked:Q,onSelectionChange:no,isRecordSelectable:b,onClick:J,onCellClick:fr,onContextMenu:Ie,contextMenuVisible:H?S(H.record,u)===W:!1,expansion:Fr,className:lr,style:dr,sx:sr,customRowAttributes:cr,leftShadowVisible:me},W)}):D(Ho,{})})]})}),w&&D(ve,{ref:wr,className:Do?.pagination,style:Mo?.pagination,topBorderColor:r,horizontalSpacing:T,fetching:l,page:w,onPageChange:kr,totalRecords:F,recordsPerPage:P,onRecordsPerPageChange:X,recordsPerPageOptions:bo,recordsPerPageLabel:Bo,paginationColor:yo,paginationSize:To,paginationText:Z,paginationWrapBreakpoint:K,noRecordsText:ee,loadingText:er,recordsLength:ro}),D(Xo,{pt:ko,pb:re,fetching:l,backgroundBlur:wo,customContent:Ro,size:oo,variant:je,color:or}),D(Wo,{pt:ko,pb:re,icon:ar,text:ee,active:!l&&!ro,children:rr}),A&&H&&D(Jo,{zIndex:A.zIndex,borderRadius:A.borderRadius,shadow:A.shadow,y:H.y,x:H.x,onDestroy:()=>_(null),children:A.items(H.record,H.recordIndex).map(({divider:I,key:y,title:W,icon:Q,color:to,hidden:fo,disabled:no,onClick:J})=>I?D(jo,{},y):fo?null:D(oe,{title:W??po(y),icon:Q,color:to,disabled:no,onClick:()=>{_(null),J()}},y))})]})}a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();export{Je as DataTable};
1
+ var Hr=Object.create;var be=Object.defineProperty;var Nr=Object.getOwnPropertyDescriptor;var Er=Object.getOwnPropertyNames;var qr=Object.getPrototypeOf,Wr=Object.prototype.hasOwnProperty;var Ur=(o,e)=>()=>(o&&(e=o(o=0)),e);var No=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports);var zr=(o,e,a,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let f of Er(e))!Wr.call(o,f)&&f!==a&&be(o,f,{get:()=>e[f],enumerable:!(t=Nr(e,f))||t.enumerable});return o};var Vr=(o,e,a)=>(a=o!=null?Hr(qr(o)):{},zr(e||!o||!o.__esModule?be(a,"default",{value:o,enumerable:!0}):a,o));import*as s from"react";var r=Ur(()=>{"use strict"});var ye=No((Ot,De)=>{"use strict";r();var Zr="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";De.exports=Zr});var Me=No((Ft,Pe)=>{"use strict";r();var Qr=ye();function Te(){}function we(){}we.resetWarningCache=Te;Pe.exports=function(){function o(t,f,l,d,u,m){if(m!==Qr){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}o.isRequired=o;function e(){return o}var a={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:e,element:o,elementType:o,instanceOf:e,node:o,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:we,resetWarningCache:Te};return a.PropTypes=a,a}});var Oe=No((Ht,Re)=>{r();Re.exports=Me()();var At,Lt});r();r();import{Box as Ct,createStyles as St,packSx as ht,Table as bt}from"@mantine/core";import{useElementSize as Co}from"@mantine/hooks";import{useEffect as Bt,useState as So}from"react";r();import{createStyles as Gr}from"@mantine/core";import{jsx as Be}from"react/jsx-runtime";var Xr=Gr({root:{"&&":{background:"transparent",":last-of-type td":{borderBottom:"none"}}}});function Eo(){let{classes:o}=Xr();return Be("tr",{className:o.root,children:Be("td",{})})}r();import{Center as oa,createStyles as ea,Text as ra}from"@mantine/core";r();r();var L=Vr(Oe());import{forwardRef as Kr,createElement as Fe}from"react";r();var ke={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var $r=Object.defineProperty,Yr=Object.defineProperties,_r=Object.getOwnPropertyDescriptors,so=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,ve=(o,e,a)=>e in o?$r(o,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):o[e]=a,Ae=(o,e)=>{for(var a in e||(e={}))Le.call(e,a)&&ve(o,a,e[a]);if(so)for(var a of so(e))He.call(e,a)&&ve(o,a,e[a]);return o},jr=(o,e)=>Yr(o,_r(e)),Jr=(o,e)=>{var a={};for(var t in o)Le.call(o,t)&&e.indexOf(t)<0&&(a[t]=o[t]);if(o!=null&&so)for(var t of so(o))e.indexOf(t)<0&&He.call(o,t)&&(a[t]=o[t]);return a},V=(o,e,a)=>{let t=Kr((f,l)=>{var d=f,{color:u="currentColor",size:m=24,stroke:p=2,children:n}=d,g=Jr(d,["color","size","stroke","children"]);return Fe("svg",Ae(jr(Ae({ref:l},ke),{width:m,height:m,stroke:u,strokeWidth:p,className:`tabler-icon tabler-icon-${o}`}),g),[...a.map(([x,c])=>Fe(x,c)),...n||[]])});return t.propTypes={color:L.default.string,size:L.default.oneOfType([L.default.string,L.default.number]),stroke:L.default.oneOfType([L.default.string,L.default.number])},t.displayName=`${e}`,t};r();var qo=V("arrow-up","IconArrowUp",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]]);r();var Wo=V("arrows-vertical","IconArrowsVertical",[["path",{d:"M8 7l4 -4l4 4",key:"svg-0"}],["path",{d:"M8 17l4 4l4 -4",key:"svg-1"}],["path",{d:"M12 3l0 18",key:"svg-2"}]]);r();var Uo=V("database-off","IconDatabaseOff",[["path",{d:"M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74",key:"svg-0"}],["path",{d:"M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6",key:"svg-1"}],["path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]]);import{Fragment as ta,jsx as co,jsxs as fa}from"react/jsx-runtime";var aa=ea(o=>({root:{position:"absolute",top:0,right:0,bottom:0,left:0,flexDirection:"column",pointerEvents:"none",color:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[6],opacity:0,transition:"opacity .15s ease"},active:{opacity:1},standardIcon:{fontSize:0,borderRadius:"50%",padding:o.spacing.xs,background:o.colorScheme==="dark"?o.colors.dark[5]:o.colors.gray[2]}}));function zo({icon:o,text:e,pt:a,pb:t,active:f,children:l}){let{classes:d,cx:u}=aa();return co(oa,{pt:a,pb:t,className:u(d.root,{[d.active]:f}),children:l||fa(ta,{children:[o||co("div",{className:d.standardIcon,children:co(Uo,{})}),co(ra,{size:"sm",color:"dimmed",children:e})]})})}r();import{Box as da,createStyles as sa,Pagination as ca,Text as ua}from"@mantine/core";import{forwardRef as pa}from"react";r();import{Button as na,Group as la,Menu as uo,Text as Ne}from"@mantine/core";import{jsx as G,jsxs as qe}from"react/jsx-runtime";var Ee={xs:22,sm:26,md:32,lg:38,xl:44};function Vo({size:o,label:e,values:a,value:t,onChange:f,color:l}){return qe(la,{spacing:"xs",children:[G(Ne,{size:o,children:e}),qe(uo,{withinPortal:!0,withArrow:!0,children:[G(uo.Target,{children:G(na,{size:o,variant:"default",sx:[{fontWeight:"normal"},d=>({height:Ee[o],paddingLeft:d.spacing[o],paddingRight:d.spacing[o]})],children:t})}),G(uo.Dropdown,{children:a.map(d=>{let u=d===t;return G(uo.Item,{sx:[{height:Ee[o]},m=>({"&&":{color:u?m.white:void 0},background:u?m.colors[l||m.primaryColor][6]:void 0})],disabled:u,onClick:()=>f(d),children:G(Ne,{size:o,children:d})},d)})})]})]})}import{jsx as Go,jsxs as xa}from"react/jsx-runtime";var ma=sa((o,{topBorderColor:e,paginationWrapBreakpoint:a})=>({root:{background:o.colorScheme==="dark"?o.colors.dark[7]:o.white,borderTop:`1px solid ${typeof e=="function"?e(o):e}`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",gap:o.spacing.xs,[o.fn.largerThan(a)]:{flexDirection:"row"}},text:{flex:"1 1 auto"},pagination:{opacity:1,transition:"opacity .15s ease"},paginationFetching:{opacity:0}})),We=pa(function({className:e,style:a,topBorderColor:t,fetching:f,page:l,onPageChange:d,paginationColor:u,paginationSize:m,loadingText:p,noRecordsText:n,paginationText:g,totalRecords:x,recordsPerPage:c,onRecordsPerPageChange:i,recordsPerPageLabel:C,recordsPerPageOptions:b,recordsLength:B,horizontalSpacing:H,paginationWrapBreakpoint:F},T){let w;if(f)w=p;else if(!x)w=n;else{let v=(l-1)*c+1,Z=v+B-1;w=g({from:v,to:Z,totalRecords:x})}let{classes:P,cx:O}=ma({topBorderColor:t,paginationWrapBreakpoint:F});return xa(da,{ref:T,px:H??"xs",py:"xs",className:O(P.root,e),style:a,children:[Go(ua,{className:P.text,size:m,children:w}),b&&Go(Vo,{size:m,label:C,values:b,value:c,onChange:i}),Go(ca,{color:u,className:O(P.pagination,{[P.paginationFetching]:f||!B}),value:l,onChange:d,size:m,total:Math.ceil(x/c)})]})});r();import{Checkbox as Ba,createStyles as Da}from"@mantine/core";import{forwardRef as ya}from"react";r();import{Box as Xo,Center as ga,createStyles as Ca,Group as Sa}from"@mantine/core";r();import{useMantineTheme as Ia}from"@mantine/core";import{useMediaQuery as ia}from"@mantine/hooks";function po(o){let e=Ia(),a=typeof o=="function"?o(e):o;return ia(a||"",!0)}function mo(o){let e=o.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${e.charAt(0).toUpperCase()}${e.slice(1)}`}function Ue(o,e,a){return o.filter(t=>!e.map(a).includes(a(t)))}function xo(o,e){return o.filter((a,t,f)=>t===f.findIndex(l=>e(a)===e(l)))}function h(o,e){return e?e.match(/([^[.\]])+/g).reduce((t,f)=>t&&t[f],o):void 0}import{jsx as X,jsxs as ba}from"react/jsx-runtime";var ha=Ca(o=>({sortableColumnHeader:{cursor:"pointer",transition:"background .15s ease","&:hover":{background:o.colorScheme==="dark"?o.colors.dark[6]:o.colors.gray[0]}},sortableColumnHeaderGroup:{gap:"0.25em"},columnHeaderText:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},sortableColumnHeaderText:{minWidth:0,flexGrow:1},sortableColumnHeaderIcon:{transition:"transform .15s ease"},sortableColumnHeaderIconRotated:{transform:"rotate3d(0, 0, 1, 180deg)"},sortableColumnHeaderNeutralIcon:{color:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[5],transition:"color .15s ease","th:hover &":{color:o.colorScheme==="dark"?o.colors.dark[2]:o.colors.gray[6]}}}));function Zo({className:o,sx:e,style:a,accessor:t,visibleMediaQuery:f,title:l,sortable:d,textAlignment:u,width:m,sortStatus:p,onSortStatusChange:n}){let{cx:g,classes:x}=ha();if(!po(f))return null;let c=l??mo(t),i=typeof c=="string"?c:void 0;return X(Xo,{component:"th",className:g({[x.sortableColumnHeader]:d},o),sx:[{"&&":{textAlign:u},width:m,minWidth:m,maxWidth:m},e],style:a,role:d?"button":void 0,onClick:d&&n?()=>{n({columnAccessor:t,direction:p?.direction==="asc"?"desc":"asc"})}:void 0,children:d||p?.columnAccessor===t?ba(Sa,{className:x.sortableColumnHeaderGroup,position:"apart",noWrap:!0,children:[X(Xo,{className:g(x.columnHeaderText,x.sortableColumnHeaderText),title:i,children:c}),X(ga,{children:p?.columnAccessor===t?X(qo,{className:g(x.sortableColumnHeaderIcon,{[x.sortableColumnHeaderIconRotated]:p.direction==="desc"}),size:14}):X(Wo,{className:x.sortableColumnHeaderNeutralIcon,size:14})})]}):X(Xo,{className:x.columnHeaderText,title:i,children:c})})}import{jsx as Io,jsxs as wa}from"react/jsx-runtime";var Ta=Da(o=>{let e=o.colorScheme==="dark"?.5:.05;return{root:{zIndex:2,position:"sticky",top:0,background:o.colorScheme==="dark"?o.colors.dark[7]:o.white},textSelectionDisabled:{userSelect:"none"},selectorColumnHeader:{position:"sticky",width:0,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-o.spacing.sm,bottom:0,borderLeft:`1px solid ${o.colorScheme==="dark"?o.colors.dark[4]:o.colors.gray[3]}`,width:o.spacing.sm,background:`linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},selectorColumnHeaderWithRightShadow:{"&::after":{opacity:1}},selectionCheckboxInput:{cursor:"pointer"}}}),ze=ya(function({className:e,style:a,sortStatus:t,onSortStatusChange:f,columns:l,selectionVisible:d,selectionChecked:u,selectionIndeterminate:m,onSelectionChange:p,leftShadowVisible:n},g){let{classes:x,cx:c}=Ta();return Io("thead",{className:c(x.root,e),style:a,ref:g,children:wa("tr",{children:[d&&Io("th",{className:c(x.selectorColumnHeader,{[x.selectorColumnHeaderWithRightShadow]:n}),children:Io(Ba,{classNames:{input:x.selectionCheckboxInput},checked:u,indeterminate:m,disabled:!p,onChange:p})}),l.map(({accessor:i,hidden:C,visibleMediaQuery:b,textAlignment:B,width:H,title:F,sortable:T,titleClassName:w,titleStyle:P,titleSx:O})=>C?null:Io(Zo,{className:w,style:P,sx:O,accessor:i,visibleMediaQuery:b,textAlignment:B,width:H,title:F,sortable:T,sortStatus:t,onSortStatusChange:f},i))]})})});r();import{Center as Pa,createStyles as Ma,Loader as Ra}from"@mantine/core";import{jsx as Ve}from"react/jsx-runtime";var Oa=Ma(o=>({root:{zIndex:3,position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",background:o.fn.rgba(o.colorScheme==="dark"?o.colors.dark[8]:o.white,.75),opacity:0,transition:"opacity .15s ease"},fetching:{pointerEvents:"all",opacity:1}}));function Qo({pt:o,pb:e,fetching:a,customContent:t,backgroundBlur:f,size:l,variant:d,color:u}){let{classes:m,cx:p}=Oa();return Ve(Pa,{pt:o,pb:e,className:p(m.root,{[m.fetching]:a}),sx:f?{backdropFilter:`blur(${f}px)`}:void 0,children:a&&(t||Ve(Ra,{size:l,variant:d,color:u}))})}r();import{Box as Va,createStyles as Ga}from"@mantine/core";r();import{Box as ka,createStyles as Fa}from"@mantine/core";import{jsx as Aa}from"react/jsx-runtime";var va=Fa({withPointerCursor:{cursor:"pointer"},noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function Ko({className:o,sx:e,style:a,visibleMediaQuery:t,record:f,recordIndex:l,onClick:d,noWrap:u,ellipsis:m,textAlignment:p,width:n,accessor:g,render:x,defaultRender:c,customCellAttributes:i}){let{cx:C,classes:b}=va();return po(t)?Aa(ka,{component:"td",className:C({[b.noWrap]:u||m,[b.ellipsis]:m,[b.withPointerCursor]:d},o),sx:[{width:n,minWidth:n,maxWidth:n,textAlign:p},e],style:a,onClick:d,...i?.(f,l),children:x?x(f,l):c?c(f,l,g):h(f,g)}):null}r();import{Collapse as La,createStyles as Ha}from"@mantine/core";r();import{useTimeout as Ge}from"@mantine/hooks";import{useEffect as $o,useState as J}from"react";function Xe(o){let[e,a]=J(null),t=o?.join(":")||"";return $o(()=>{a(null)},[t]),{lastSelectionChangeIndex:e,setLastSelectionChangeIndex:a}}function Ze(o){let[e,a]=J(null);return $o(()=>{o&&a(null)},[o]),{rowContextMenuInfo:e,setRowContextMenuInfo:a}}function Qe({rowExpansion:o,records:e,idAccessor:a}){let t=[];if(o&&e){let{trigger:u,allowMultiple:m,initiallyExpanded:p}=o;e&&u==="always"?t=e.map(n=>h(n,a)):p&&(t=e.filter(p).map(n=>h(n,a)),m||(t=[t[0]]))}let f,l,d=J(t);if(o){let{trigger:u,allowMultiple:m,collapseProps:p,content:n}=o;o.expanded?{recordIds:f,onRecordIdsChange:l}=o.expanded:[f,l]=d;let g=x=>l(f.filter(c=>c!==h(x,a)));return{expandOnClick:u!=="always"&&u!=="never",isRowExpanded:x=>u==="always"?!0:f.includes(h(x,a)),expandRow:x=>{let c=h(x,a);l(m?[...f,c]:[c])},collapseRow:g,collapseProps:p,content:(x,c)=>()=>n({record:x,recordIndex:c,collapse:()=>g(x)})}}}function Ke(o,e){let[a,t]=J(o),[f,l]=J(o),d=Ge(()=>t(!0),0),u=Ge(()=>l(!1),e||200);return $o(()=>{o?(u.clear(),l(!0),d.start()):(d.clear(),t(!1),u.start())},[d,u,o]),{expanded:a,visible:f}}import{Fragment as Ea,jsx as io,jsxs as qa}from"react/jsx-runtime";var Na=Ha({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function Yo({open:o,colSpan:e,content:a,collapseProps:t}){let{expanded:f,visible:l}=Ke(o,t?.transitionDuration),{cx:d,classes:u}=Na();return l?qa(Ea,{children:[io("tr",{}),io("tr",{children:io("td",{className:d(u.cell,{[u.expandedCell]:f}),colSpan:e,children:io(La,{in:f,...t,children:a()})})})]}):null}r();import{Checkbox as Wa,createStyles as Ua}from"@mantine/core";import{jsx as $e}from"react/jsx-runtime";var za=Ua(o=>{let e=o.colorScheme==="dark"?.5:.05;return{root:{position:"sticky",zIndex:1,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-o.spacing.sm,bottom:0,borderLeft:`1px solid ${o.colorScheme==="dark"?o.colors.dark[4]:o.colors.gray[3]}`,width:o.spacing.sm,background:`linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},withRightShadow:{"&::after":{opacity:1}},checkbox:{cursor:"pointer"}}});function _o({withRightShadow:o,...e}){let{cx:a,classes:t}=za();return $e("td",{className:a(t.root,{[t.withRightShadow]:o}),children:$e(Wa,{classNames:{input:t.checkbox},...e,onClick:f=>f.stopPropagation()})})}import{Fragment as Za,jsx as jo,jsxs as Ye}from"react/jsx-runtime";var Xa=Ga(o=>{let e=o.colors[o.primaryColor][6];return{withPointerCursor:{cursor:"pointer"},selected:{"&&":{"tr&":{background:o.colorScheme==="dark"?o.fn.darken(e,.6):o.fn.lighten(e,.9)},"table[data-striped] tbody &:nth-of-type(odd)":{background:o.colorScheme==="dark"?o.fn.darken(e,.55):o.fn.lighten(e,.85)}}},contextMenuVisible:{"&&":{"tr&":{background:o.colorScheme==="dark"?o.fn.darken(e,.5):o.fn.lighten(e,.7)},"table[data-striped] tbody &:nth-of-type(odd)":{background:o.colorScheme==="dark"?o.fn.darken(e,.45):o.fn.lighten(e,.65)}}}}});function Jo({record:o,recordIndex:e,columns:a,defaultColumnRender:t,selectionVisible:f,selectionChecked:l,onSelectionChange:d,isRecordSelectable:u,onClick:m,onCellClick:p,onContextMenu:n,expansion:g,customRowAttributes:x,className:c,style:i,sx:C,contextMenuVisible:b,leftShadowVisible:B}){let{cx:H,classes:F}=Xa();return Ye(Za,{children:[Ye(Va,{component:"tr",className:H({[F.withPointerCursor]:m||g?.expandOnClick,[F.selected]:l,[F.contextMenuVisible]:b},typeof c=="function"?c(o,e):c),onClick:T=>{if(g){let{isRowExpanded:w,expandOnClick:P,expandRow:O,collapseRow:v}=g;P&&(w(o)?v(o):O(o))}m?.(T)},style:typeof i=="function"?i(o,e):i,sx:C,...x?.(o,e),onContextMenu:n,children:[f&&jo(_o,{withRightShadow:B,checked:l,disabled:!d||(u?!u(o,e):!1),onChange:d}),a.map((T,w)=>{let{accessor:P,hidden:O,visibleMediaQuery:v,textAlignment:Z,noWrap:ho,ellipsis:bo,width:Bo,render:Do,cellsClassName:Q,cellsStyle:K,cellsSx:yo,customCellAttributes:To}=T,oo;return p&&(oo=()=>p({record:o,recordIndex:e,column:T,columnIndex:w})),O?null:jo(Ko,{className:typeof Q=="function"?Q(o,e):Q,style:typeof K=="function"?K(o,e):K,sx:yo,visibleMediaQuery:v,record:o,recordIndex:e,onClick:oo,accessor:P,textAlignment:Z,noWrap:ho,ellipsis:bo,width:Bo,render:Do,defaultRender:t,customCellAttributes:To},P)})]}),g&&jo(Yo,{colSpan:a.filter(T=>!T.hidden).length+(f?1:0),open:g.isRowExpanded(o),content:g.content(o,e),collapseProps:g.collapseProps})]})}r();import{createStyles as Qa,Paper as Ka,px as $a,useMantineTheme as Ya}from"@mantine/core";import{useClickOutside as _a,useElementSize as ja,useMergedRef as Ja,useWindowEvent as _e}from"@mantine/hooks";import{jsx as et}from"react/jsx-runtime";var ot=Qa(o=>({root:{position:"fixed",border:`1px solid ${o.colorScheme==="dark"?o.colors.dark[4]:o.colors.gray[3]}`,overflow:"hidden",transition:"all .15s ease"}}));function oe({borderRadius:o="xs",shadow:e="sm",zIndex:a=3,y:t,x:f,onDestroy:l,children:d}){_e("resize",l),_e("scroll",l);let u=_a(l),{ref:m,width:p,height:n}=ja(),g=Ja(u,m),{dir:x,spacing:c}=Ya(),i=$a(c.md),{innerWidth:C,innerHeight:b}=window,{classes:B}=ot();return et(Ka,{ref:g,shadow:e,radius:o,className:B.root,sx:{zIndex:a,top:t+n+i>b?b-n-i:t,left:x==="ltr"?f+p+i>C?C-p-i:f:C-i-(f-p-i<0?p+i:f)},children:d})}r();import{createStyles as rt}from"@mantine/core";import{jsx as tt}from"react/jsx-runtime";var at=rt(o=>({root:{height:1,background:o.colorScheme==="dark"?o.colors.dark[5]:o.colors.gray[1]}}));function ee(){let{classes:o}=at();return tt("div",{className:o.root})}r();import{Box as ft,createStyles as nt,px as lt,Text as dt,UnstyledButton as st}from"@mantine/core";import{jsx as je,jsxs as ut}from"react/jsx-runtime";var ct=nt((o,{color:e})=>{let a=lt(o.spacing.sm)/2;return{root:{width:"100%",display:"flex",alignItems:"center",paddingTop:a,paddingBottom:a,paddingLeft:o.spacing.sm,paddingRight:o.spacing.sm,color:e&&o.colors[e][6],transition:"background .15s ease","&[disabled]":{cursor:"not-allowed",color:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[5]},"&:hover:not([disabled])":{background:o.fn.rgba(e?o.colors[e][6]:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[4],e?o.colorScheme==="dark"?.15:.08:.25)},"&:active:not([disabled])":{background:o.fn.rgba(e?o.colors[e][6]:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[4],e?o.colorScheme==="dark"?.3:.2:.5)}},icon:{fontSize:0,marginRight:o.spacing.xs},title:{whiteSpace:"nowrap"}}});function re({icon:o,title:e,color:a,disabled:t,onClick:f}){let{classes:l}=ct({color:a});return ut(st,{className:l.root,disabled:t,onClick:f,children:[o&&je(ft,{className:l.icon,children:o}),je(dt,{className:l.title,size:"sm",children:e})]})}r();import{Box as pt,createStyles as mt,ScrollArea as xt}from"@mantine/core";import{forwardRef as It}from"react";import{jsx as go,jsxs as gt}from"react/jsx-runtime";var it=mt(o=>{let e=o.colorScheme==="dark"?.5:.05;return{root:{flex:"1 1 100%"},scrollbar:{'&[data-state="visible"]':{background:"transparent"},"div::before":{pointerEvents:"none"}},corner:{background:"transparent"},thumb:{zIndex:3},shadow:{position:"absolute",pointerEvents:"none",opacity:0,transition:"opacity .15s ease"},topShadow:{zIndex:2,top:0,left:0,right:0,height:o.spacing.sm,background:`linear-gradient(${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`},leftShadow:{zIndex:3,top:0,left:0,bottom:0,width:o.spacing.sm,background:`linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`},rightShadow:{zIndex:2,top:0,bottom:0,right:0,width:o.spacing.sm,background:`linear-gradient(to left, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(to left, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`},bottomShadow:{zIndex:2,left:0,right:0,bottom:0,height:o.spacing.sm,background:`linear-gradient(${o.fn.rgba(o.black,0)}, ${o.fn.rgba(o.black,e)}), linear-gradient(${o.fn.rgba(o.black,0)} 30%, ${o.fn.rgba(o.black,e)})`},shadowVisible:{opacity:1}}}),Je=It(function({topShadowVisible:e,leftShadowVisible:a,rightShadowVisible:t,bottomShadowVisible:f,headerHeight:l,onScrollPositionChange:d,children:u},m){let{cx:p,classes:n}=it();return gt(xt,{viewportRef:m,classNames:{root:n.root,scrollbar:n.scrollbar,thumb:n.thumb,corner:n.corner},styles:{scrollbar:{marginTop:l}},onScrollPositionChange:d,children:[u,go(pt,{className:p(n.shadow,n.topShadow,{[n.shadowVisible]:e}),sx:{top:l}}),go("div",{className:p(n.shadow,n.leftShadow,{[n.shadowVisible]:a})}),go("div",{className:p(n.shadow,n.rightShadow,{[n.shadowVisible]:t})}),go("div",{className:p(n.shadow,n.bottomShadow,{[n.shadowVisible]:f})})]})});import{jsx as R,jsxs as er}from"react/jsx-runtime";var or={},Dt=St((o,{borderColor:e,rowBorderColor:a})=>{let t=typeof e=="function"?e(o):e,f=typeof a=="function"?a(o):a;return{root:{position:"relative",display:"flex",flexDirection:"column",overflow:"hidden",tr:{backgroundColor:o.colorScheme==="dark"?o.colors.dark[7]:o.white},"&&":{"thead tr th":{borderBottomColor:t},"tbody tr td":{borderTopColor:f}}},lastRowBorderBottomVisible:{"tbody tr:last-of-type td":{borderBottom:`1px solid ${f}`}},textSelectionDisabled:{userSelect:"none"},table:{borderCollapse:"separate",borderSpacing:0},tableWithBorder:{border:`1px solid ${t}`},tableWithColumnBorders:{"&&":{"th, td":{":not(:first-of-type)":{borderLeft:`1px solid ${f}`}}}},verticalAlignmentTop:{td:{verticalAlign:"top"}},verticalAlignmentBottom:{td:{verticalAlign:"bottom"}}}});function rr({withBorder:o,borderRadius:e,borderColor:a=D=>D.colorScheme==="dark"?D.colors.dark[4]:D.colors.gray[3],rowBorderColor:t=D=>D.fn.rgba(D.colorScheme==="dark"?D.colors.dark[4]:D.colors.gray[3],.65),withColumnBorders:f,textSelectionDisabled:l,height:d="100%",minHeight:u,shadow:m,verticalAlignment:p="center",fetching:n,columns:g,defaultColumnRender:x,idAccessor:c="id",records:i,selectedRecords:C,onSelectedRecordsChange:b,isRecordSelectable:B,sortStatus:H,onSortStatusChange:F,horizontalSpacing:T,page:w,onPageChange:P,totalRecords:O,recordsPerPage:v,onRecordsPerPageChange:Z,recordsPerPageOptions:ho,recordsPerPageLabel:bo="Records per page",paginationColor:Bo,paginationSize:Do="sm",paginationText:Q=({from:D,to:$,totalRecords:W})=>`${D} - ${$} / ${W}`,paginationWrapBreakpoint:K="sm",loaderBackgroundBlur:yo,customLoader:To,loaderSize:oo,loaderVariant:ar,loaderColor:tr,loadingText:fr="...",emptyState:nr,noRecordsText:ae="No records",noRecordsIcon:lr,striped:dr,onRowClick:wo,onCellClick:sr,onScrollToTop:te,onScrollToBottom:fe,onScrollToLeft:ne,onScrollToRight:le,rowContextMenu:k,rowExpansion:cr,rowClassName:ur,rowStyle:pr,rowSx:mr,customRowAttributes:xr,bodyRef:Ir,m:ir,my:gr,mx:Cr,mt:Sr,mb:hr,ml:br,mr:Br,sx:Dr,className:yr,classNames:Po,style:Tr,styles:Mo,...wr}){let{ref:D,width:$,height:W}=Co(),{ref:Pr,height:Ro}=Co(),{ref:Mr,width:Oo,height:eo}=Co(),{ref:Rr,height:de}=Co(),[ko,se]=So(!0),[Fo,ce]=So(!0),[ro,ue]=So(!0),[vo,pe]=So(!0),{rowContextMenuInfo:N,setRowContextMenuInfo:U}=Ze(n),Or=Qe({rowExpansion:cr,records:i,idAccessor:c}),me=()=>{if(!n&&k&&U(null),n||eo<=W)se(!0),ce(!0);else{let I=D.current.scrollTop,S=I===0,y=eo-I-W<1;se(S),ce(y),S&&S!==ko&&te?.(),y&&y!==Fo&&fe?.()}if(n||Oo===$)ue(!0),pe(!0);else{let I=D.current.scrollLeft,S=I===0,y=Oo-I-$<1;ue(S),pe(y),S&&S!==ro&&ne?.(),y&&y!==vo&&le?.()}};Bt(me,[n,fe,ne,le,te,k,W,D,$,Fo,ro,vo,ko,U,eo,Oo]);let kr=I=>{D.current.scrollTo({top:0,left:0}),P(I)},ao=i?.length,xe=i?.map(I=>h(I,c)),Y=C?.map(I=>h(I,c)),Ie=xe!==void 0&&Y!==void 0&&Y.length>0,ie=B?i?.filter(B):i,Ao=ie?.map(I=>h(I,c)),Lo=Ie&&Ao.every(I=>Y.includes(I)),Fr=Ie&&Ao.some(I=>Y.includes(I)),ge;b&&(ge=()=>{b(Lo?C.filter(I=>!Ao.includes(h(I,c))):xo([...C,...ie],I=>h(I,c)))});let{lastSelectionChangeIndex:to,setLastSelectionChangeIndex:vr}=Xe(xe),Ce=!!C&&!ro,{cx:Se,classes:A,theme:Ar}=Dt({borderColor:a,rowBorderColor:t}),Lr={m:ir,my:gr,mx:Cr,mt:Sr,mb:hr,ml:br,mr:Br},Ho=typeof Mo=="function"?Mo(Ar,or,or):Mo;return er(Ct,{...Lr,className:Se(A.root,{[A.tableWithBorder]:o},yr,Po?.root),sx:[I=>({borderRadius:I.radius[e]||e,boxShadow:I.shadows[m]||m,height:d,minHeight:u}),...ht(Dr)],style:{...Ho?.root,...Tr},children:[R(Je,{ref:D,topShadowVisible:!ko,leftShadowVisible:!(C||ro),rightShadowVisible:!vo,bottomShadowVisible:!Fo,headerHeight:Ro,onScrollPositionChange:me,children:er(bt,{ref:Mr,horizontalSpacing:T,className:Se(A.table,{[A.tableWithColumnBorders]:f,[A.lastRowBorderBottomVisible]:eo<W,[A.textSelectionDisabled]:l,[A.verticalAlignmentTop]:p==="top",[A.verticalAlignmentBottom]:p==="bottom"}),striped:ao?dr:!1,...wr,children:[R(ze,{ref:Pr,className:Po?.header,style:Ho?.header,columns:g,sortStatus:H,onSortStatusChange:F,selectionVisible:!!C,selectionChecked:Lo,selectionIndeterminate:Fr&&!Lo,onSelectionChange:ge,leftShadowVisible:Ce}),R("tbody",{ref:Ir,children:ao?i.map((I,S)=>{let y=h(I,c),_=Y?.includes(y)||!1,fo=!1,no=!1;if(k){let{hidden:M}=k;(!M||!(typeof M=="function"?M(I,S):M))&&(k.trigger==="click"?fo=!0:no=!0)}let lo;b&&(lo=M=>{if(M.nativeEvent.shiftKey&&to!==null){let z=i.filter(S>to?(E,q)=>q>=to&&q<=S&&(B?B(E,q):!0):(E,q)=>q>=S&&q<=to&&(B?B(E,q):!0));b(_?Ue(C,z,E=>h(E,c)):xo([...C,...z],E=>h(E,c)))}else b(_?C.filter(z=>h(z,c)!==y):xo([...C,I],z=>h(z,c)));vr(S)});let j;fo?j=M=>{U({y:M.clientY,x:M.clientX,record:I,recordIndex:S}),wo?.(I,S)}:wo&&(j=()=>{wo(I,S)});let he;return no&&(he=M=>{M.preventDefault(),U({y:M.clientY,x:M.clientX,record:I,recordIndex:S})}),R(Jo,{record:I,recordIndex:S,columns:g,defaultColumnRender:x,selectionVisible:!!C,selectionChecked:_,onSelectionChange:lo,isRecordSelectable:B,onClick:j,onCellClick:sr,onContextMenu:he,contextMenuVisible:N?h(N.record,c)===y:!1,expansion:Or,className:ur,style:pr,sx:mr,customRowAttributes:xr,leftShadowVisible:Ce},y)}):R(Eo,{})})]})}),w&&R(We,{ref:Rr,className:Po?.pagination,style:Ho?.pagination,topBorderColor:a,horizontalSpacing:T,fetching:n,page:w,onPageChange:kr,totalRecords:O,recordsPerPage:v,onRecordsPerPageChange:Z,recordsPerPageOptions:ho,recordsPerPageLabel:bo,paginationColor:Bo,paginationSize:Do,paginationText:Q,paginationWrapBreakpoint:K,noRecordsText:ae,loadingText:fr,recordsLength:ao}),R(Qo,{pt:Ro,pb:de,fetching:n,backgroundBlur:yo,customContent:To,size:oo,variant:ar,color:tr}),R(zo,{pt:Ro,pb:de,icon:lr,text:ae,active:!n&&!ao,children:nr}),k&&N&&R(oe,{zIndex:k.zIndex,borderRadius:k.borderRadius,shadow:k.shadow,y:N.y,x:N.x,onDestroy:()=>U(null),children:k.items(N.record,N.recordIndex).map(({divider:I,key:S,title:y,icon:_,color:fo,hidden:no,disabled:lo,onClick:j})=>I?R(ee,{},S):no?null:R(re,{title:y??mo(S),icon:_,color:fo,disabled:lo,onClick:()=>{U(null),j()}},S))})]})}r();r();r();r();r();r();r();r();r();r();r();r();r();r();r();r();export{rr as DataTable};
2
2
  //# sourceMappingURL=index.mjs.map