mantine-datatable 7.10.3 → 7.11.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
- "use client";import{Box as Fr,Table as _r}from"@mantine/core";import{useDebouncedCallback as Br,useMergedRef as Io}from"@mantine/hooks";import Ho from"clsx";import{useCallback as _e,useMemo as Gr,useState as Be}from"react";import{useState as Mt}from"react";import{createSafeContext as Fa}from"@mantine/core";var[xt,se]=Fa("useDataTableColumnsContext must be used within DataTableColumnProvider");import{jsx as _a}from"react/jsx-runtime";var et=e=>{let{children:t,columnsOrder:o,setColumnsOrder:a,columnsToggle:n,setColumnsToggle:l,resetColumnsOrder:r,resetColumnsToggle:i,setColumnWidth:d,resetColumnsWidth:u}=e,[f,p]=Mt(""),[b,T]=Mt("");return _a(xt,{value:{sourceColumn:f,setSourceColumn:p,targetColumn:b,setTargetColumn:T,columnsToggle:n,setColumnsToggle:l,swapColumns:()=>{if(!o||!a||!f||!b)return;let M=o.indexOf(f),D=o.indexOf(b);if(M!==-1&&D!==-1){let w=o.splice(M,1)[0];o.splice(D,0,w),a([...o])}},resetColumnsOrder:r,resetColumnsToggle:i,setColumnWidth:d,resetColumnsWidth:u},children:t})};import{jsx as kt}from"react/jsx-runtime";function Rt(){return kt("tr",{className:"mantine-datatable-empty-row",children:kt("td",{})})}import{Center as Ga,Text as Xa}from"@mantine/core";import{jsx as De,jsxs as Ba}from"react/jsx-runtime";function Et(){return Ba("svg",{width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[De("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),De("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"}),De("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"}),De("path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4"}),De("path",{d:"M3 3l18 18"})]})}import{Fragment as Qa,jsx as Re,jsxs as Ua}from"react/jsx-runtime";function Nt({icon:e,text:t,pt:o,pb:a,active:n,children:l}){return Re(Ga,{pt:o,pb:a,className:"mantine-datatable-empty-state","data-active":n||void 0,children:l||Ua(Qa,{children:[e||Re("div",{className:"mantine-datatable-empty-state-icon",children:Re(Et,{})}),Re(Xa,{component:"div",size:"sm",c:"dimmed",children:t})]})})}import{TableTfoot as bn,TableTr as Tn,rem as gn}from"@mantine/core";import hn from"clsx";import{forwardRef as Cn}from"react";import{TableTh as cn}from"@mantine/core";import un from"clsx";import{useLocalStorage as tt}from"@mantine/hooks";import{useMemo as $a}from"react";var Lt=({key:e,columns:t=[],getInitialValueInEffect:o=!0})=>{function a(c,C){let s=[];return c.forEach(m=>{C.find(S=>S.accessor===m)&&s.push(m)}),C.forEach(m=>{s.includes(m.accessor)||s.push(m.accessor)}),s}function n(c,C){let s=[];return c.forEach(m=>{C.find(S=>S.accessor===m.accessor)&&s.push(m)}),C.forEach(m=>{s.find(S=>S.accessor===m.accessor)||s.push({accessor:m.accessor,defaultToggle:m.defaultToggle||!0,toggleable:m.toggleable,toggled:m.defaultToggle===void 0?!0:m.defaultToggle})}),s}function l(c,C){let s=[];return c.forEach(m=>{let S=Object.keys(m)[0];C.find(g=>g.accessor===S)&&s.push(m)}),C.forEach(m=>{let S=m.accessor;if(!s.find(g=>Object.keys(g)[0]===S)){let g={};g[S]="",s.push(g)}}),s}function r(){let[c,C]=tt({key:`${e}-columns-order`,defaultValue:u,getInitialValueInEffect:o}),s=a(c,t),m=JSON.stringify(c);return JSON.stringify(s)!==m&&C(s),[s,C]}function i(){let[c,C]=tt({key:`${e}-columns-toggle`,defaultValue:p,getInitialValueInEffect:o}),s=n(c,t),m=JSON.stringify(c);return JSON.stringify(s)!==m&&C(s),[n(c,t),C]}function d(){let[c,C]=tt({key:`${e}-columns-width`,defaultValue:f,getInitialValueInEffect:o}),s=l(c,t),m=JSON.stringify(c);return JSON.stringify(s)!==m&&C(s),[l(c,t),C]}let u=t&&t.map(c=>c.accessor)||[],f=t&&t.map(c=>({[c.accessor]:c.width??"initial"}))||[],p=t&&t.map(c=>({accessor:c.accessor,defaultToggle:c.defaultToggle||!0,toggleable:c.toggleable,toggled:c.defaultToggle===void 0?!0:c.defaultToggle})),[b,T]=r(),[h,M]=i(),[D,w]=d(),P=()=>T(u),v=()=>{M(p)},x=()=>w(f);return{effectiveColumns:$a(()=>b?b.map(s=>t.find(m=>m.accessor===s)).map(s=>({...s,hidden:!h.find(m=>m.accessor===s?.accessor)?.toggled})).map(s=>({...s,width:D.find(m=>m[s?.accessor])?.[s?.accessor]})):t,[t,b,h,D]),setColumnsOrder:T,columnsOrder:b,resetColumnsOrder:P,columnsToggle:h,setColumnsToggle:M,resetColumnsToggle:v,columnsWidth:D,setColumnsWidth:w,setColumnWidth:(c,C)=>{let s=D.map(m=>m[c]?{[c]:C}:m);w(s)},resetColumnsWidth:x}};import{useResizeObserver as Ka}from"@mantine/hooks";function ae(){let[e]=Ka(),{width:t,height:o}=e.current?.getBoundingClientRect()||{width:0,height:0};return{ref:e,width:t,height:o}}import{useEffect as Ja,useLayoutEffect as Za}from"react";var It=typeof window<"u"?Za:Ja;import{useEffect as Ya,useState as qa}from"react";function Ht(e){let[t,o]=qa(null),a=e?.join(":")||"";return Ya(()=>{o(null)},[a]),{lastSelectionChangeIndex:t,setLastSelectionChangeIndex:o}}import{useEffect as ja,useRef as en,useState as tn}from"react";function on(e,t){let o=()=>{t(e.map(n=>n.matches))},a=e.map(n=>{try{return n.addEventListener("change",o),()=>n.removeEventListener("change",o)}catch{return n.addListener(o),()=>n.removeListener(o)}});return()=>{a.forEach(n=>n())}}function an(e,t){return t||(typeof window<"u"&&"matchMedia"in window?e.map(o=>window.matchMedia(o).matches):e.map(()=>!1))}function Ot(e,t,{getInitialValueInEffect:o}={getInitialValueInEffect:!0}){let[a,n]=tn(o?t:an(e,t)),l=en();return ja(()=>{if("matchMedia"in window)return l.current=e.map(r=>window.matchMedia(r)),n(l.current.map(r=>r.matches)),on(l.current,r=>{n(r)})},[e]),a}import{useMantineTheme as nn}from"@mantine/core";import{useMemo as Wt}from"react";function At(e){let t=nn(),o=Wt(()=>e.map(n=>(typeof n=="function"?n(t):n)??""),[e,t]),a=Wt(()=>e.map(()=>!0),[e]);return Ot(o,a)}import{useMantineTheme as rn}from"@mantine/core";import{useMediaQuery as ln}from"@mantine/hooks";function U(e){let t=rn(),o=typeof e=="function"?e(t):e;return ln(o||"",!0)}import{useState as sn}from"react";function de(e){let t=e.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${t.charAt(0).toUpperCase()}${t.slice(1)}`}function zt(e,t,o){return e.filter(a=>!t.map(o).includes(o(a)))}function Ee(e,t){return e.filter((o,a,n)=>a===n.findIndex(l=>t(o)===t(l)))}function ot(e,t){return t?t.match(/([^[.\]])+/g).reduce((a,n)=>a&&a[n],e):void 0}function L(e,t){return typeof t=="string"?ot(e,t):t(e)}function Vt({rowExpansion:e,records:t,idAccessor:o}){let a=[];if(e&&t){let{trigger:i,allowMultiple:d,initiallyExpanded:u}=e;t&&i==="always"?a=t.map(f=>L(f,o)):u&&(a=t.filter((f,p)=>u({record:f,index:p})).map(f=>L(f,o)),d||(a=[a[0]]))}let n,l,r=sn(a);if(e){let{expandable:i,trigger:d,allowMultiple:u,collapseProps:f,content:p}=e;e.expanded?{recordIds:n,onRecordIdsChange:l}=e.expanded:[n,l]=r;let b=T=>l?.(n.filter(h=>h!==L(T,o)));return{expandOnClick:d!=="always"&&d!=="never",isRowExpanded:T=>d==="always"?!0:n.includes(L(T,o)),isExpandable:({record:T,index:h})=>i?i({record:T,index:h}):!0,expandRow:T=>{let h=L(T,o);l?.(u?[...n,h]:[h])},collapseRow:b,collapseProps:f,content:({record:T,index:h})=>()=>p({record:T,index:h,collapse:()=>b(T)})}}}import{useTimeout as Ft}from"@mantine/hooks";import{useEffect as dn,useState as _t}from"react";function Bt(e,t){let[o,a]=_t(e),[n,l]=_t(e),r=Ft(()=>a(!0),0),i=Ft(()=>l(!1),t||200);return dn(()=>{e?(i.clear(),l(!0),r.start()):(r.clear(),a(!1),i.start())},[r,i,e]),{expanded:o,visible:n}}var ce="mantine-datatable-nowrap",ue="mantine-datatable-ellipsis",B="mantine-datatable-pointer-cursor",Ne="mantine-datatable-context-menu-cursor",Gt="mantine-datatable-text-selection-disabled",$="mantine-datatable-text-align-left",K="mantine-datatable-text-align-center",J="mantine-datatable-text-align-right";import{jsx as mn}from"react/jsx-runtime";function Xt({className:e,style:t,visibleMediaQuery:o,title:a,noWrap:n,ellipsis:l,textAlign:r,width:i}){return U(o)?mn(cn,{className:un({[ce]:n||l,[ue]:l,[$]:r==="left",[K]:r==="center",[J]:r==="right"},e),style:[{width:i,minWidth:i,maxWidth:i},t],children:a}):null}import{TableTh as pn}from"@mantine/core";import{jsx as fn}from"react/jsx-runtime";function Qt({shadowVisible:e}){return fn(pn,{className:"mantine-datatable-footer-selector-placeholder-cell","data-shadow-visible":e||void 0})}import{jsx as at,jsxs as yn}from"react/jsx-runtime";var Ut=Cn(function({className:t,style:o,columns:a,defaultColumnProps:n,selectionVisible:l,selectorCellShadowVisible:r,scrollDiff:i},d){let u=i<0;return at(bn,{ref:d,className:hn("mantine-datatable-footer",t),style:[{position:u?"relative":"sticky",bottom:gn(u?i:0)},o],children:yn(Tn,{children:[l&&at(Qt,{shadowVisible:r}),a.map(({hidden:f,...p})=>{if(f)return null;let{accessor:b,visibleMediaQuery:T,textAlign:h,width:M,footer:D,footerClassName:w,footerStyle:P,noWrap:v,ellipsis:x}={...n,...p};return at(Xt,{className:w,style:P,visibleMediaQuery:T,textAlign:h,width:M,title:D,noWrap:v,ellipsis:x},b)})]})})});import{Checkbox as Yn,Group as qn,Popover as jn,PopoverDropdown as er,PopoverTarget as tr,Stack as or,TableThead as ar,TableTr as co}from"@mantine/core";import nr from"clsx";import{forwardRef as rr,useState as lr}from"react";import{TableTh as Dn}from"@mantine/core";import Sn from"clsx";import{useMemo as $t}from"react";import{jsx as wn}from"react/jsx-runtime";function Kt({group:{id:e,columns:t,title:o,textAlign:a,className:n,style:l}}){let r=$t(()=>t.map(({visibleMediaQuery:u})=>u),[t]),i=At(r),d=$t(()=>t.filter(({hidden:u},f)=>!u&&i?.[f]).length,[t,i]);return d>0?wn(Dn,{colSpan:d,className:Sn("mantine-datatable-column-group-header-cell",{[$]:a==="left",[K]:a==="center",[J]:a==="right"},n),style:l,children:o??de(e)}):null}import{ActionIcon as ro,Box as Fn,Center as Oe,Flex as _n,Group as Bn,TableTh as Gn}from"@mantine/core";import We from"clsx";import{useRef as Xn,useState as Qn}from"react";import{ActionIcon as xn,Popover as Mn,PopoverDropdown as kn,PopoverTarget as Rn}from"@mantine/core";import{useDisclosure as En}from"@mantine/hooks";import{jsx as Jt,jsxs as Pn}from"react/jsx-runtime";function Zt(){return Pn("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[Jt("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Jt("path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"})]})}import{jsx as Yt,jsxs as vn}from"react/jsx-runtime";function qt(){return vn("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[Yt("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Yt("path",{d:"M20 3h-16a1 1 0 0 0 -1 1v2.227l.008 .223a3 3 0 0 0 .772 1.795l4.22 4.641v8.114a1 1 0 0 0 1.316 .949l6 -2l.108 -.043a1 1 0 0 0 .576 -.906v-6.586l4.121 -4.12a3 3 0 0 0 .879 -2.123v-2.171a1 1 0 0 0 -1 -1z",strokeWidth:"0",fill:"currentColor"})]})}import{jsx as Le,jsxs as Nn}from"react/jsx-runtime";function jt({children:e,isActive:t}){let[o,{close:a,toggle:n}]=En(!1);return Nn(Mn,{withArrow:!0,withinPortal:!0,shadow:"md",opened:o,onClose:a,trapFocus:!0,children:[Le(Rn,{children:Le(xn,{className:"mantine-datatable-header-cell-filter-action-icon","data-active":t||void 0,size:"sm",variant:"default",onClick:r=>{r.preventDefault(),n()},children:Le(t?qt:Zt,{})})}),Le(kn,{onClick:r=>r.stopPropagation(),children:typeof e=="function"?e({close:a}):e})]})}import{rem as Ln}from"@mantine/core";import{useRef as In,useState as Hn}from"react";import{jsx as On}from"react/jsx-runtime";var eo=e=>{let{accessor:t,columnRef:o}=e,a=In(null),[n,l]=Hn(0),{setColumnWidth:r}=se(),i=p=>{p.preventDefault(),p.stopPropagation(),document.addEventListener("mousemove",d),document.addEventListener("mouseup",u),document.body.style.cursor="col-resize"},d=p=>{if(!o.current)return;let b=p.clientX-o.current.getBoundingClientRect().right,h=`${o.current.getBoundingClientRect().width+b}px`;o.current.style.width=h,r(t,o.current.style.width),l(-b)},u=()=>{o.current&&(document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",u),document.body.style.cursor="initial",r(t,o.current.style.width),l(0))};return On("div",{ref:a,onClick:p=>p.stopPropagation(),onMouseDown:i,onDoubleClick:()=>{o.current&&(o.current.style.maxWidth="initial",o.current.style.minWidth="initial",o.current.style.width="initial",r(t,"initial"))},className:"mantine-datatable-header-resizable-handle",style:{right:Ln(n)}})};import{jsx as Ie,jsxs as Wn}from"react/jsx-runtime";function to(){return Wn("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[Ie("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Ie("path",{d:"M12 5l0 14"}),Ie("path",{d:"M16 9l-4 -4"}),Ie("path",{d:"M8 9l4 -4"})]})}import{jsx as He,jsxs as An}from"react/jsx-runtime";function oo(){return An("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[He("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),He("path",{d:"M8 7l4 -4l4 4"}),He("path",{d:"M8 17l4 4l4 -4"}),He("path",{d:"M12 3l0 18"})]})}import{jsx as ne,jsxs as zn}from"react/jsx-runtime";function ao(){return zn("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[ne("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),ne("path",{d:"M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),ne("path",{d:"M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),ne("path",{d:"M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),ne("path",{d:"M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),ne("path",{d:"M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),ne("path",{d:"M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]})}import{jsx as nt,jsxs as Vn}from"react/jsx-runtime";function no(){return Vn("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[nt("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),nt("path",{d:"M18 6l-12 12"}),nt("path",{d:"M6 6l12 12"})]})}import{Fragment as Un,jsx as H,jsxs as rt}from"react/jsx-runtime";function lo({className:e,style:t,accessor:o,visibleMediaQuery:a,title:n,sortable:l,draggable:r,toggleable:i,resizable:d,sortIcons:u,textAlign:f,width:p,sortStatus:b,onSortStatusChange:T,filter:h,filtering:M,sortKey:D}){let{setSourceColumn:w,setTargetColumn:P,swapColumns:v,setColumnsToggle:x}=se(),[O,E]=Qn(!1),c=Xn(null);if(!U(a))return null;let C=n??de(o),s=typeof C=="string"?C:void 0,m=l&&T?N=>{N?.defaultPrevented||T({sortKey:D,columnAccessor:o,direction:b?.columnAccessor===o?b.direction==="asc"?"desc":"asc":b?.direction??"asc"})}:void 0,S=N=>{N.stopPropagation(),w(o),E(!1)},g=N=>{N.preventDefault(),P(o),E(!0)},R=()=>{P(o),E(!1),v()},I=()=>{E(!0)},A=()=>{E(!1)},_=N=>{N.stopPropagation(),x(Y=>Y.map(G=>G.accessor===o?{...G,toggled:!1}:G))};return rt(Gn,{className:We({"mantine-datatable-header-cell-sortable":l,"mantine-datatable-header-cell-toggleable":i,"mantine-datatable-header-cell-resizable":d},e),style:[{width:p,...d?{minWidth:"1px"}:{minWidth:p,maxWidth:p}},t],role:l?"button":void 0,tabIndex:l?0:void 0,onClick:m,onKeyDown:N=>N.key==="Enter"&&m?.(),ref:c,children:[rt(Bn,{className:"mantine-datatable-header-cell-sortable-group",justify:"space-between",wrap:"nowrap",children:[rt(_n,{align:"center",w:"100%",className:We({"mantine-datatable-header-cell-draggable":r,"mantine-datatable-header-cell-drag-over":O}),draggable:r,onDragStart:r?S:void 0,onDragEnter:r?I:void 0,onDragOver:r?g:void 0,onDrop:r?R:void 0,onDragLeave:r?A:void 0,children:[r?H(Oe,{role:"img","aria-label":"Drag column",children:H(ro,{className:"mantine-datatable-header-cell-draggable-action-icon",variant:"subtle",size:"xs",onClick:N=>{N.stopPropagation()},children:H(ao,{})})}):null,H(Fn,{className:We("mantine-datatable-header-cell-sortable-text",{[$]:f==="left",[K]:f==="center",[J]:f==="right"},ce,ue),title:s,children:C})]}),i?H(Oe,{className:"mantine-datatable-header-cell-toggleable-icon",role:"img","aria-label":"Toggle column",children:H(ro,{size:"xs",variant:"light",onClick:_,children:H(no,{})})}):null,l||b?.columnAccessor===o?H(Un,{children:b?.columnAccessor===o?H(Oe,{className:We("mantine-datatable-header-cell-sortable-icon",{"mantine-datatable-header-cell-sortable-icon-reversed":b.direction==="desc"}),role:"img","aria-label":`Sorted ${b.direction==="desc"?"descending":"ascending"}`,children:u?.sorted||H(to,{})}):H(Oe,{className:"mantine-datatable-header-cell-sortable-unsorted-icon",role:"img","aria-label":"Not sorted",children:u?.unsorted||H(oo,{})})}):null,h?H(jt,{isActive:!!M,children:h}):null]}),d?H(eo,{accessor:o,columnRef:c}):null]})}import{Checkbox as $n,TableTh as Kn}from"@mantine/core";import Jn from"clsx";import{forwardRef as Zn}from"react";import{jsx as io}from"react/jsx-runtime";var so=Zn(function({className:t,style:o,trigger:a,shadowVisible:n,checked:l,indeterminate:r,checkboxProps:i,onChange:d,rowSpan:u},f){let p=!i.disabled;return io(Kn,{ref:f,className:Jn("mantine-datatable-header-selector-cell",{[B]:a==="cell"&&p},t),style:o,rowSpan:u,"data-shadow-visible":n||void 0,onClick:a==="cell"&&p?d:void 0,children:io($n,{classNames:p?{input:B}:void 0,checked:l,indeterminate:r,onChange:d,...i,disabled:!(d||i.onChange)||i.disabled})})});import{jsx as Z,jsxs as Ae}from"react/jsx-runtime";var uo=rr(function({selectionColumnHeaderRef:t,className:o,style:a,sortStatus:n,sortIcons:l,onSortStatusChange:r,columns:i,defaultColumnProps:d,groups:u,selectionTrigger:f,selectionVisible:p,selectionChecked:b,selectionIndeterminate:T,onSelectionChange:h,selectionCheckboxProps:M,selectorCellShadowVisible:D,selectionColumnClassName:w,selectionColumnStyle:P},v){let x=p?Z(so,{ref:t,className:w,style:P,trigger:f,shadowVisible:D,checked:b,indeterminate:T,checkboxProps:M,onChange:h,rowSpan:u?2:void 0}):null,{columnsToggle:O,setColumnsToggle:E}=se(),[c,C]=lr(!1),s=i.some(g=>g.toggleable),m=s?Object.fromEntries(i.map(({accessor:g,title:R})=>[g,R??de(String(g))])):void 0,S=Ae(ar,{className:nr("mantine-datatable-header",o),style:a,ref:v,onContextMenu:s?g=>{g.preventDefault(),C(R=>!R)}:void 0,children:[u&&Ae(co,{children:[x,u.map(g=>Z(Kt,{group:g},g.id))]}),Ae(co,{children:[!u&&x,i.map(({hidden:g,...R},I)=>{if(g)return null;let{accessor:A,visibleMediaQuery:_,textAlign:N,width:Y,title:G,sortable:me,draggable:q,toggleable:pe,resizable:fe,titleClassName:X,titleStyle:Ge,filter:Xe,filtering:Qe,sortKey:Ue}={...d,...R};return Z(lo,{accessor:A,className:X,style:Ge,visibleMediaQuery:_,textAlign:N,width:Y,title:G,sortable:me,draggable:q,toggleable:pe,resizable:fe&&I<i.length-1,sortStatus:n,sortIcons:l,sortKey:Ue,onSortStatusChange:r,filter:Xe,filtering:Qe},A)})]})]});return s?Ae(jn,{position:"bottom",withArrow:!0,shadow:"md",opened:c,onChange:C,children:[Z(tr,{children:S}),Z(er,{children:Z(or,{children:O.filter(g=>g.toggleable).map(g=>Z(qn,{children:Z(Yn,{classNames:{label:"mantine-datatable-header-column-toggle-checkbox-label"},size:"xs",label:m[g.accessor],checked:g.toggled,onChange:R=>{E(O.map(I=>I.accessor===g.accessor?{...I,toggled:R.currentTarget.checked}:I))}})},g.accessor))})})]}):S});import{Center as ir,Loader as sr}from"@mantine/core";import dr from"clsx";import{jsx as mo}from"react/jsx-runtime";function po({pt:e,pb:t,fetching:o,customContent:a,backgroundBlur:n,size:l,type:r,color:i}){return mo(ir,{pt:e,pb:t,className:dr("mantine-datatable-loader",{"mantine-datatable-loader-fetching":o}),style:[{backdropFilter:n?`blur(${n}px)`:void 0}],children:o&&(a||mo(sr,{size:l,type:r,color:i}))})}import{Box as Cr,Pagination as yr,Text as Dr,rem as Sr}from"@mantine/core";import Do from"clsx";import{forwardRef as wr}from"react";import{Button as mr,Group as pr,Menu as fr,MenuDropdown as br,MenuItem as Tr,MenuTarget as gr,Text as go,rem as Se}from"@mantine/core";import hr from"clsx";import{parseThemeColor as cr}from"@mantine/core";function k(e,t,o){return e?cr({color:typeof e=="object"?e[o]:e,theme:t}).value:void 0}function fo({theme:e,c:t,backgroundColor:o,borderColor:a,rowBorderColor:n,stripedColor:l,highlightOnHoverColor:r}){return{"--mantine-datatable-color-light":k(t,e,"light"),"--mantine-datatable-color-dark":k(t,e,"dark"),"--mantine-datatable-background-color-light":k(o,e,"light"),"--mantine-datatable-background-color-dark":k(o,e,"dark"),"--mantine-datatable-border-color-light":k(a,e,"light"),"--mantine-datatable-border-color-dark":k(a,e,"dark"),"--mantine-datatable-row-border-color-light":k(n,e,"light"),"--mantine-datatable-row-border-color-dark":k(n,e,"dark"),"--mantine-datatable-striped-color-light":k(l,e,"light"),"--mantine-datatable-striped-color-dark":k(l,e,"dark"),"--mantine-datatable-highlight-on-hover-color-light":k(r,e,"light"),"--mantine-datatable-highlight-on-hover-color-dark":k(r,e,"dark")}}function ze({theme:e,paginationActiveTextColor:t,paginationActiveBackgroundColor:o}){return{"--mantine-datatable-pagination-active-text-color-light":k(t,e,"light"),"--mantine-datatable-pagination-active-text-color-dark":k(t,e,"dark"),"--mantine-datatable-pagination-active-background-color-light":k(o,e,"light"),"--mantine-datatable-pagination-active-background-color-dark":k(o,e,"dark")}}function bo({theme:e,color:t,backgroundColor:o}){return{"--mantine-datatable-row-color-light":k(t,e,"light"),"--mantine-datatable-row-color-dark":k(t,e,"dark"),"--mantine-datatable-row-background-color-light":k(o,e,"light"),"--mantine-datatable-row-background-color-dark":k(o,e,"dark")}}import{jsx as lt,jsxs as ur}from"react/jsx-runtime";function To(){return ur("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[lt("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),lt("path",{d:"M8 9l4 -4l4 4"}),lt("path",{d:"M16 15l-4 4l-4 -4"})]})}import{jsx as re,jsxs as Co}from"react/jsx-runtime";var ho={xs:Se(22),sm:Se(26),md:Se(32),lg:Se(38),xl:Se(44)};function yo({size:e,label:t,values:o,value:a,activeTextColor:n,activeBackgroundColor:l,onChange:r}){return Co(pr,{gap:"xs",children:[re(go,{component:"div",size:e,children:t}),Co(fr,{withinPortal:!0,withArrow:!0,classNames:{arrow:"mantine-datatable-page-size-selector-menu-arrow"},children:[re(gr,{children:re(mr,{size:e,variant:"default",classNames:{section:"mantine-datatable-page-size-selector-button-icon"},rightSection:re(To,{}),style:[{fontWeight:"normal"},i=>({height:ho[e],paddingLeft:i.spacing[e],paddingRight:i.spacing[e]})],children:a})}),re(br,{children:o.map(i=>{let d=i===a;return re(Tr,{className:hr({"mantine-datatable-page-size-selector-active":d}),style:[{height:ho[e]},d&&(n||l)?u=>ze({theme:u,paginationActiveTextColor:n,paginationActiveBackgroundColor:l}):void 0],disabled:d,onClick:()=>r(i),children:re(go,{component:"div",size:e,children:i})},i)})})]})]})}import{jsx as it,jsxs as Pr}from"react/jsx-runtime";var So=wr(function({className:t,style:o,fetching:a,page:n,onPageChange:l,paginationWithEdges:r,paginationActiveTextColor:i,paginationActiveBackgroundColor:d,paginationSize:u,loadingText:f,noRecordsText:p,paginationText:b,totalRecords:T,recordsPerPage:h,onRecordsPerPageChange:M,recordsPerPageLabel:D,recordsPerPageOptions:w,recordsLength:P,horizontalSpacing:v,paginationWrapBreakpoint:x,getPaginationControlProps:O},E){let c;if(a)c=f;else if(!T)c=p;else{let s=(n-1)*h+1,m=s+P-1;c=b({from:s,to:m,totalRecords:T})}let C=U(({breakpoints:s})=>`(min-width: ${typeof x=="number"?`${Sr(x)}rem`:s[x]||x})`);return Pr(Cr,{ref:E,px:v??"xs",py:"xs",className:Do("mantine-datatable-pagination",t),style:[{flexDirection:C?"row":"column"},o],children:[it(Dr,{component:"div",className:"mantine-datatable-pagination-text",size:u,children:c}),w&&it(yo,{activeTextColor:i,activeBackgroundColor:d,size:u,label:D,values:w,value:h,onChange:M}),it(yr,{classNames:{root:Do("mantine-datatable-pagination-pages",{"mantine-datatable-pagination-pages-fetching":a||!P}),control:"mantine-datatable-pagination-pages-control"},style:i||d?s=>ze({theme:s,paginationActiveTextColor:i,paginationActiveBackgroundColor:d}):void 0,withEdges:r,value:n,onChange:l,size:u,total:Math.ceil(T/h),getControlProps:O})]})});import{TableTr as Or}from"@mantine/core";import Wr from"clsx";import{TableTd as vr}from"@mantine/core";import xr from"clsx";import{jsx as Mr}from"react/jsx-runtime";function wo({className:e,style:t,visibleMediaQuery:o,record:a,index:n,onClick:l,onDoubleClick:r,onContextMenu:i,noWrap:d,ellipsis:u,textAlign:f,width:p,accessor:b,render:T,defaultRender:h,customCellAttributes:M}){return U(o)?Mr(vr,{className:xr({[ce]:d||u,[ue]:u,[B]:l||r,[Ne]:i,[$]:f==="left",[K]:f==="center",[J]:f==="right"},e),style:[{width:p,minWidth:p,maxWidth:p},t],onClick:l,onDoubleClick:r,onContextMenu:i,...M?.(a,n),children:T?T(a,n):h?h(a,n,b):ot(a,b)}):null}import{Collapse as kr,TableTd as Rr,TableTr as Po}from"@mantine/core";import{Fragment as Er,jsx as we,jsxs as Nr}from"react/jsx-runtime";function vo({open:e,colSpan:t,content:o,collapseProps:a}){let{expanded:n,visible:l}=Bt(e,a?.transitionDuration);return l?Nr(Er,{children:[we(Po,{}),we(Po,{children:we(Rr,{className:"mantine-datatable-row-expansion-cell",colSpan:t,children:we(kr,{in:n,...a,children:we("div",{className:"mantine-datatable-row-expansion-cell-content",children:o()})})})})]}):null}import{Checkbox as Lr,TableTd as Ir}from"@mantine/core";import Hr from"clsx";import{jsx as xo}from"react/jsx-runtime";function Mo({className:e,style:t,record:o,index:a,trigger:n,onChange:l,withRightShadow:r,checkboxProps:i,getCheckboxProps:d,...u}){let f={...i,...d(o,a)},p=!u.disabled&&!f.disabled,b=T=>{T.stopPropagation(),n==="cell"&&p&&l?.(T)};return xo(Ir,{className:Hr("mantine-datatable-row-selector-cell",{[B]:n==="cell"&&p},e),style:t,"data-shadow-visible":r||void 0,onClick:b,children:xo(Lr,{classNames:p?{input:B}:void 0,onChange:l,...u,...f})})}import{Fragment as Ar,jsx as st,jsxs as ko}from"react/jsx-runtime";function Ro({record:e,index:t,columns:o,defaultColumnProps:a,defaultColumnRender:n,selectionTrigger:l,selectionVisible:r,selectionChecked:i,onSelectionChange:d,isRecordSelectable:u,selectionCheckboxProps:f,getSelectionCheckboxProps:p,onClick:b,onDoubleClick:T,onContextMenu:h,onCellClick:M,onCellDoubleClick:D,onCellContextMenu:w,expansion:P,customAttributes:v,color:x,backgroundColor:O,className:E,style:c,selectorCellShadowVisible:C,selectionColumnClassName:s,selectionColumnStyle:m}){return ko(Ar,{children:[ko(Or,{className:Wr("mantine-datatable-row",{[B]:b||T||P?.isExpandable({record:e,index:t})&&P?.expandOnClick},{[Ne]:h},typeof E=="function"?E(e,t):E),"data-selected":i||void 0,onClick:S=>{if(P){let{isExpandable:g,isRowExpanded:R,expandOnClick:I,expandRow:A,collapseRow:_}=P;g({record:e,index:t})&&I&&(R(e)?_(e):A(e))}b?.({event:S,record:e,index:t})},onDoubleClick:T?S=>T({event:S,record:e,index:t}):void 0,onContextMenu:h?S=>h({event:S,record:e,index:t}):void 0,style:[x||O?S=>{let g=x?.(e,t),R=O?.(e,t);return bo({theme:S,color:g,backgroundColor:R})}:void 0,c?.(e,t)],...v?.(e,t),children:[r&&st(Mo,{className:s,style:m,record:e,index:t,trigger:l,withRightShadow:C,checked:i,disabled:!d||(u?!u(e,t):!1),onChange:d,checkboxProps:f,getCheckboxProps:p}),o.map(({hidden:S,...g},R)=>{if(S)return null;let{accessor:I,visibleMediaQuery:A,textAlign:_,noWrap:N,ellipsis:Y,width:G,render:me,cellsClassName:q,cellsStyle:pe,customCellAttributes:fe}={...a,...g};return st(wo,{className:typeof q=="function"?q(e,t):q,style:pe?.(e,t),visibleMediaQuery:A,record:e,index:t,onClick:M?X=>M({event:X,record:e,index:t,column:g,columnIndex:R}):void 0,onDoubleClick:D?X=>D({event:X,record:e,index:t,column:g,columnIndex:R}):void 0,onContextMenu:w?X=>w({event:X,record:e,index:t,column:g,columnIndex:R}):void 0,accessor:I,textAlign:_,noWrap:N,ellipsis:Y,width:G,render:me,defaultRender:n,customCellAttributes:fe},I)})]}),P&&st(vo,{colSpan:o.filter(({hidden:S})=>!S).length+(r?1:0),open:P.isRowExpanded(e),content:P.content({record:e,index:t}),collapseProps:P.collapseProps})]})}import{Box as Eo,ScrollArea as zr,rem as No}from"@mantine/core";import Ve from"clsx";import{jsx as Fe,jsxs as Vr}from"react/jsx-runtime";function Lo({topShadowVisible:e,leftShadowVisible:t,leftShadowBehind:o,rightShadowVisible:a,rightShadowBehind:n,bottomShadowVisible:l,headerHeight:r,footerHeight:i,onScrollPositionChange:d,children:u,viewportRef:f,scrollAreaProps:p}){return Vr(zr,{...p,viewportRef:f,classNames:{root:"mantine-datatable-scroll-area",scrollbar:"mantine-datatable-scroll-area-scrollbar",thumb:"mantine-datatable-scroll-area-thumb",corner:"mantine-datatable-scroll-area-corner"},onScrollPositionChange:d,children:[u,Fe(Eo,{className:Ve("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-top-shadow",{"mantine-datatable-scroll-area-shadow-visible":e}),style:{top:r?No(r):0}}),Fe("div",{className:Ve("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-left-shadow",{"mantine-datatable-scroll-area-shadow-visible":t,"mantine-datatable-scroll-area-shadow-behind":o})}),Fe("div",{className:Ve("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-right-shadow",{"mantine-datatable-scroll-area-shadow-visible":a,"mantine-datatable-scroll-area-shadow-behind":n})}),Fe(Eo,{className:Ve("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-bottom-shadow",{"mantine-datatable-scroll-area-shadow-visible":l}),style:{bottom:i?No(i+1):0}})]})}import{jsx as F,jsxs as Oo}from"react/jsx-runtime";function Xr({withTableBorder:e,borderRadius:t,textSelectionDisabled:o,height:a="100%",minHeight:n,maxHeight:l,shadow:r,verticalAlign:i="center",fetching:d,columns:u,storeColumnsKey:f="mantine-datatable",groups:p,pinFirstColumn:b,pinLastColumn:T,defaultColumnProps:h,defaultColumnRender:M,idAccessor:D="id",records:w,selectionTrigger:P="checkbox",selectedRecords:v,onSelectedRecordsChange:x,selectionColumnClassName:O,selectionColumnStyle:E,isRecordSelectable:c,selectionCheckboxProps:C,allRecordsSelectionCheckboxProps:s={"aria-label":"Select all records"},getRecordSelectionCheckboxProps:m=(W,j)=>({"aria-label":`Select record ${j+1}`}),sortStatus:S,sortIcons:g,onSortStatusChange:R,horizontalSpacing:I,page:A,onPageChange:_,totalRecords:N,recordsPerPage:Y,onRecordsPerPageChange:G,recordsPerPageOptions:me,recordsPerPageLabel:q="Records per page",paginationWithEdges:pe,paginationActiveTextColor:fe,paginationActiveBackgroundColor:X,paginationSize:Ge="sm",paginationText:Xe=({from:W,to:j,totalRecords:ee})=>`${W} - ${j} / ${ee}`,paginationWrapBreakpoint:Qe="sm",getPaginationControlProps:Ue=W=>W==="previous"?{"aria-label":"Previous page"}:W==="next"?{"aria-label":"Next page"}:{},loaderBackgroundBlur:Wo,customLoader:Ao,loaderSize:zo,loaderType:Vo,loaderColor:Fo,loadingText:_o="...",emptyState:Bo,noRecordsText:dt="No records",noRecordsIcon:Go,highlightOnHover:Xo,striped:Qo,noHeader:Uo,onRowClick:$o,onRowDoubleClick:Ko,onRowContextMenu:Jo,onCellClick:Zo,onCellDoubleClick:Yo,onCellContextMenu:qo,onScroll:ct,onScrollToTop:ut,onScrollToBottom:mt,onScrollToLeft:pt,onScrollToRight:ft,c:jo,backgroundColor:ea,borderColor:ta,rowBorderColor:oa,stripedColor:aa,highlightOnHoverColor:na,rowColor:ra,rowBackgroundColor:la,rowExpansion:ia,rowClassName:sa,rowStyle:da,customRowAttributes:ca,scrollViewportRef:ua,scrollAreaProps:ma,tableRef:pa,bodyRef:fa,m:ba,my:Ta,mx:ga,mt:ha,mb:Ca,ml:ya,mr:Da,className:Sa,classNames:be,style:wa,styles:Te,...bt}){let{ref:W,width:j,height:ee}=ae(),ge=Gr(()=>p?.flatMap(y=>y.columns)??u,[u,p]),Tt=Lt({key:f,columns:ge}),{ref:Pa,height:$e}=ae(),{ref:va,width:Ke,height:he}=ae(),{ref:xa,height:Ma}=ae(),{ref:ka,height:gt}=ae(),{ref:Ra,width:Ea}=ae(),Na=Io(va,pa),La=Io(W,ua),[Je,ht]=Be(!0),[Ze,Ct]=Be(!0),[Ce,yt]=Be(!0),[Pe,Dt]=Be(!0),Ia=Vt({rowExpansion:ia,records:w,idAccessor:D}),Ye=_e(()=>{let y=W.current?.scrollTop||0,Q=W.current?.scrollLeft||0;if(d||he<=ee)ht(!0),Ct(!0);else{let z=y===0,V=he-y-ee<1;ht(z),Ct(V),z&&z!==Je&&ut?.(),V&&V!==Ze&&mt?.()}if(d||Ke===j)yt(!0),Dt(!0);else{let z=Q===0,V=Ke-Q-j<1;yt(z),Dt(V),z&&z!==Ce&&pt?.(),V&&V!==Pe&&ft?.()}},[d,mt,pt,ft,ut,ee,W,j,Ze,Ce,Pe,Je,he,Ke]);It(Ye,[Ye]);let St=Br(Ye,50),Ha=_e(y=>{ct?.(y),St()},[St,ct]),Oa=_e(y=>{W.current?.scrollTo({top:0,left:0}),_(y)},[_,W]),ve=w?.length,wt=w?.map(y=>L(y,D)),le=!!v,ye=v?.map(y=>L(y,D)),Pt=wt!==void 0&&ye!==void 0&&ye.length>0,qe=c?w?.filter(c):w,xe=qe?.map(y=>L(y,D)),Me=Pt&&xe.every(y=>ye.includes(y)),Wa=Pt&&xe.some(y=>ye.includes(y)),Aa=_e(()=>{v&&x&&x(Me?v.filter(y=>!xe.includes(L(y,D))):Ee([...v,...qe],y=>L(y,D)))},[Me,D,x,xe,qe,v]),{lastSelectionChangeIndex:ke,setLastSelectionChangeIndex:za}=Ht(wt),je=le&&!Ce&&!b;return F(et,{...Tt,children:Oo(Fr,{...{m:ba,my:Ta,mx:ga,mt:ha,mb:Ca,ml:ya,mr:Da},className:Ho("mantine-datatable",{"mantine-datatable-with-border":e},Sa,be?.root),style:[y=>({...fo({theme:y,c:jo,backgroundColor:ea,borderColor:ta,rowBorderColor:oa,stripedColor:aa,highlightOnHoverColor:na}),borderRadius:y.radius[t]||t,boxShadow:y.shadows[r]||r,height:a,minHeight:n,maxHeight:l}),wa,Te?.root],children:[F(Lo,{viewportRef:La,topShadowVisible:!Je,leftShadowVisible:!Ce,leftShadowBehind:le||!!b,rightShadowVisible:!Pe,rightShadowBehind:T,bottomShadowVisible:!Ze,headerHeight:$e,footerHeight:Ma,onScrollPositionChange:Ha,scrollAreaProps:ma,children:Oo(_r,{ref:Na,horizontalSpacing:I,className:Ho("mantine-datatable-table",{[Gt]:o,"mantine-datatable-vertical-align-top":i==="top","mantine-datatable-vertical-align-bottom":i==="bottom","mantine-datatable-last-row-border-bottom-visible":bt.withRowBorders&&he<ee,"mantine-datatable-pin-last-column":T,"mantine-datatable-pin-last-column-scrolled":!Pe&&T,"mantine-datatable-selection-column-visible":le,"mantine-datatable-pin-first-column":b,"mantine-datatable-pin-first-column-scrolled":!Ce&&b},be?.table),style:{...Te?.table,"--mantine-datatable-selection-column-width":`${Ea}px`},"data-striped":ve&&Qo||void 0,"data-highlight-on-hover":Xo||void 0,...bt,children:[Uo?null:F(et,{...Tt,children:F(uo,{ref:Pa,selectionColumnHeaderRef:Ra,className:be?.header,style:Te?.header,columns:ge,defaultColumnProps:h,groups:p,sortStatus:S,sortIcons:g,onSortStatusChange:R,selectionTrigger:P,selectionVisible:le,selectionChecked:Me,selectionIndeterminate:Wa&&!Me,onSelectionChange:Aa,selectionCheckboxProps:{...C,...s},selectorCellShadowVisible:je,selectionColumnClassName:O,selectionColumnStyle:E})}),F("tbody",{ref:fa,children:ve?w.map((y,Q)=>{let z=L(y,D),V=ye?.includes(z)||!1,vt;return x&&v&&(vt=Va=>{if(Va.nativeEvent.shiftKey&&ke!==null){let ie=w.filter(Q>ke?(te,oe)=>oe>=ke&&oe<=Q&&(c?c(te,oe):!0):(te,oe)=>oe>=Q&&oe<=ke&&(c?c(te,oe):!0));x(V?zt(v,ie,te=>L(te,D)):Ee([...v,...ie],te=>L(te,D)))}else x(V?v.filter(ie=>L(ie,D)!==z):Ee([...v,y],ie=>L(ie,D)));za(Q)}),F(Ro,{record:y,index:Q,columns:ge,defaultColumnProps:h,defaultColumnRender:M,selectionTrigger:P,selectionVisible:le,selectionChecked:V,onSelectionChange:vt,isRecordSelectable:c,selectionCheckboxProps:C,getSelectionCheckboxProps:m,onClick:$o,onDoubleClick:Ko,onCellClick:Zo,onCellDoubleClick:Yo,onContextMenu:Jo,onCellContextMenu:qo,expansion:Ia,color:ra,backgroundColor:la,className:sa,style:da,customAttributes:ca,selectorCellShadowVisible:je,selectionColumnClassName:O,selectionColumnStyle:E},z)}):F(Rt,{})}),ge.some(({footer:y})=>y)&&F(Ut,{ref:xa,className:be?.footer,style:Te?.footer,columns:ge,defaultColumnProps:h,selectionVisible:le,selectorCellShadowVisible:je,scrollDiff:he-ee})]})}),A&&F(So,{ref:ka,className:be?.pagination,style:Te?.pagination,horizontalSpacing:I,fetching:d,page:A,onPageChange:Oa,totalRecords:N,recordsPerPage:Y,onRecordsPerPageChange:G,recordsPerPageOptions:me,recordsPerPageLabel:q,paginationWithEdges:pe,paginationActiveTextColor:fe,paginationActiveBackgroundColor:X,paginationSize:Ge,paginationText:Xe,paginationWrapBreakpoint:Qe,getPaginationControlProps:Ue,noRecordsText:dt,loadingText:_o,recordsLength:ve}),F(po,{pt:$e,pb:gt,fetching:d,backgroundBlur:Wo,customContent:Ao,size:zo,type:Vo,color:Fo}),F(Nt,{pt:$e,pb:gt,icon:Go,text:dt,active:!d&&!ve,children:Bo})]})})}export{Xr as DataTable,zt as differenceBy,L as getRecordId,ot as getValueAtPath,de as humanize,Ee as uniqBy,Lt as useDataTableColumns};
1
+ "use client";import{Box as _r,Table as Fr}from"@mantine/core";import{useDebouncedCallback as Br,useMergedRef as Io}from"@mantine/hooks";import Ho from"clsx";import{useCallback as Fe,useMemo as Gr,useState as Be}from"react";import{useState as Mt}from"react";import{createSafeContext as _a}from"@mantine/core";var[xt,se]=_a("useDataTableColumnsContext must be used within DataTableColumnProvider");import{jsx as Fa}from"react/jsx-runtime";var et=e=>{let{children:t,columnsOrder:o,setColumnsOrder:a,columnsToggle:n,setColumnsToggle:l,resetColumnsOrder:r,resetColumnsToggle:i,setColumnWidth:c,resetColumnsWidth:m}=e,[b,p]=Mt(""),[T,g]=Mt("");return Fa(xt,{value:{sourceColumn:b,setSourceColumn:p,targetColumn:T,setTargetColumn:g,columnsToggle:n,setColumnsToggle:l,swapColumns:()=>{if(!o||!a||!b||!T)return;let M=o.indexOf(b),y=o.indexOf(T);if(M!==-1&&y!==-1){let w=o.splice(M,1)[0];o.splice(y,0,w),a([...o])}},resetColumnsOrder:r,resetColumnsToggle:i,setColumnWidth:c,resetColumnsWidth:m},children:t})};import{jsx as Rt}from"react/jsx-runtime";function kt(){return Rt("tr",{className:"mantine-datatable-empty-row",children:Rt("td",{})})}import{Center as Ga,Text as Xa}from"@mantine/core";import{jsx as ye,jsxs as Ba}from"react/jsx-runtime";function Et(){return Ba("svg",{width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[ye("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),ye("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"}),ye("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"}),ye("path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4"}),ye("path",{d:"M3 3l18 18"})]})}import{Fragment as Qa,jsx as ke,jsxs as Ua}from"react/jsx-runtime";function Nt({icon:e,text:t,pt:o,pb:a,active:n,children:l}){return ke(Ga,{pt:o,pb:a,className:"mantine-datatable-empty-state","data-active":n||void 0,children:l||Ua(Qa,{children:[e||ke("div",{className:"mantine-datatable-empty-state-icon",children:ke(Et,{})}),ke(Xa,{component:"div",size:"sm",c:"dimmed",children:t})]})})}import{TableTfoot as bn,TableTr as Tn,rem as gn}from"@mantine/core";import hn from"clsx";import{forwardRef as Cn}from"react";import{TableTh as cn}from"@mantine/core";import un from"clsx";import{useLocalStorage as tt}from"@mantine/hooks";import{useMemo as $a}from"react";var Lt=({key:e,columns:t=[],getInitialValueInEffect:o=!0})=>{function a(s,S){let d=[];return s.forEach(u=>{S.find(C=>C.accessor===u)&&d.push(u)}),S.forEach(u=>{d.includes(u.accessor)||d.push(u.accessor)}),d}function n(s,S){let d=[];return s.forEach(u=>{S.find(C=>C.accessor===u.accessor)&&d.push(u)}),S.forEach(u=>{d.find(C=>C.accessor===u.accessor)||d.push({accessor:u.accessor,defaultToggle:u.defaultToggle||!0,toggleable:u.toggleable,toggled:u.defaultToggle===void 0?!0:u.defaultToggle})}),d}function l(s,S){let d=[];return s.forEach(u=>{let C=Object.keys(u)[0];S.find(f=>f.accessor===C)&&d.push(u)}),S.forEach(u=>{let C=u.accessor;if(!d.find(f=>Object.keys(f)[0]===C)){let f={};f[C]="",d.push(f)}}),d}function r(){let[s,S]=tt({key:e?`${e}-columns-order`:"",defaultValue:e?m:void 0,getInitialValueInEffect:o});function d(f){e&&S(f)}if(!e)return[s,d];let u=a(s,t),C=JSON.stringify(s);return JSON.stringify(u)!==C&&d(u),[u,d]}function i(){let[s,S]=tt({key:e?`${e}-columns-toggle`:"",defaultValue:e?p:void 0,getInitialValueInEffect:o});function d(f){e&&S(f)}if(!e)return[s,d];let u=n(s,t),C=JSON.stringify(s);return JSON.stringify(u)!==C&&d(u),[n(s,t),d]}function c(){let[s,S]=tt({key:e?`${e}-columns-width`:"",defaultValue:e?b:void 0,getInitialValueInEffect:o});function d(f){e&&S(f)}if(!e)return[s,d];let u=l(s,t),C=JSON.stringify(s);return JSON.stringify(u)!==C&&d(u),[l(s,t),d]}let m=t&&t.map(s=>s.accessor)||[],b=t&&t.map(s=>({[s.accessor]:s.width??"initial"}))||[],p=t&&t.map(s=>({accessor:s.accessor,defaultToggle:s.defaultToggle||!0,toggleable:s.toggleable,toggled:s.defaultToggle===void 0?!0:s.defaultToggle})),[T,g]=r(),[h,M]=i(),[y,w]=c(),P=()=>g(m),v=()=>{M(p)},x=()=>w(b);return{effectiveColumns:$a(()=>T?T.map(d=>t.find(u=>u.accessor===d)).map(d=>({...d,hidden:!h.find(u=>u.accessor===d?.accessor)?.toggled})).map(d=>({...d,width:y.find(u=>u[d?.accessor])?.[d?.accessor]})):t,[t,T,h,y]),setColumnsOrder:g,columnsOrder:T,resetColumnsOrder:P,columnsToggle:h,setColumnsToggle:M,resetColumnsToggle:v,columnsWidth:y,setColumnsWidth:w,setColumnWidth:(s,S)=>{let d=y.map(u=>u[s]?{[s]:S}:u);w(d)},resetColumnsWidth:x}};import{useResizeObserver as Ka}from"@mantine/hooks";function ae(){let[e]=Ka(),{width:t,height:o}=e.current?.getBoundingClientRect()||{width:0,height:0};return{ref:e,width:t,height:o}}import{useEffect as Ja,useLayoutEffect as Za}from"react";var It=typeof window<"u"?Za:Ja;import{useEffect as Ya,useState as qa}from"react";function Ht(e){let[t,o]=qa(null),a=e?.join(":")||"";return Ya(()=>{o(null)},[a]),{lastSelectionChangeIndex:t,setLastSelectionChangeIndex:o}}import{useEffect as ja,useRef as en,useState as tn}from"react";function on(e,t){let o=()=>{t(e.map(n=>n.matches))},a=e.map(n=>{try{return n.addEventListener("change",o),()=>n.removeEventListener("change",o)}catch{return n.addListener(o),()=>n.removeListener(o)}});return()=>{a.forEach(n=>n())}}function an(e,t){return t||(typeof window<"u"&&"matchMedia"in window?e.map(o=>window.matchMedia(o).matches):e.map(()=>!1))}function Ot(e,t,{getInitialValueInEffect:o}={getInitialValueInEffect:!0}){let[a,n]=tn(o?t:an(e,t)),l=en();return ja(()=>{if("matchMedia"in window)return l.current=e.map(r=>window.matchMedia(r)),n(l.current.map(r=>r.matches)),on(l.current,r=>{n(r)})},[e]),a}import{useMantineTheme as nn}from"@mantine/core";import{useMemo as Wt}from"react";function At(e){let t=nn(),o=Wt(()=>e.map(n=>(typeof n=="function"?n(t):n)??""),[e,t]),a=Wt(()=>e.map(()=>!0),[e]);return Ot(o,a)}import{useMantineTheme as rn}from"@mantine/core";import{useMediaQuery as ln}from"@mantine/hooks";function U(e){let t=rn(),o=typeof e=="function"?e(t):e;return ln(o||"",!0)}import{useState as sn}from"react";function de(e){let t=e.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${t.charAt(0).toUpperCase()}${t.slice(1)}`}function zt(e,t,o){return e.filter(a=>!t.map(o).includes(o(a)))}function Ee(e,t){return e.filter((o,a,n)=>a===n.findIndex(l=>t(o)===t(l)))}function ot(e,t){return t?t.match(/([^[.\]])+/g).reduce((a,n)=>a&&a[n],e):void 0}function L(e,t){return typeof t=="string"?ot(e,t):t(e)}function Vt({rowExpansion:e,records:t,idAccessor:o}){let a=[];if(e&&t){let{trigger:i,allowMultiple:c,initiallyExpanded:m}=e;t&&i==="always"?a=t.map(b=>L(b,o)):m&&(a=t.filter((b,p)=>m({record:b,index:p})).map(b=>L(b,o)),c||(a=[a[0]]))}let n,l,r=sn(a);if(e){let{expandable:i,trigger:c,allowMultiple:m,collapseProps:b,content:p}=e;e.expanded?{recordIds:n,onRecordIdsChange:l}=e.expanded:[n,l]=r;let T=g=>l?.(n.filter(h=>h!==L(g,o)));return{expandOnClick:c!=="always"&&c!=="never",isRowExpanded:g=>c==="always"?!0:n.includes(L(g,o)),isExpandable:({record:g,index:h})=>i?i({record:g,index:h}):!0,expandRow:g=>{let h=L(g,o);l?.(m?[...n,h]:[h])},collapseRow:T,collapseProps:b,content:({record:g,index:h})=>()=>p({record:g,index:h,collapse:()=>T(g)})}}}import{useTimeout as _t}from"@mantine/hooks";import{useEffect as dn,useState as Ft}from"react";function Bt(e,t){let[o,a]=Ft(e),[n,l]=Ft(e),r=_t(()=>a(!0),0),i=_t(()=>l(!1),t||200);return dn(()=>{e?(i.clear(),l(!0),r.start()):(r.clear(),a(!1),i.start())},[r,i,e]),{expanded:o,visible:n}}var ce="mantine-datatable-nowrap",ue="mantine-datatable-ellipsis",B="mantine-datatable-pointer-cursor",Ne="mantine-datatable-context-menu-cursor",Gt="mantine-datatable-text-selection-disabled",$="mantine-datatable-text-align-left",K="mantine-datatable-text-align-center",J="mantine-datatable-text-align-right";import{jsx as mn}from"react/jsx-runtime";function Xt({className:e,style:t,visibleMediaQuery:o,title:a,noWrap:n,ellipsis:l,textAlign:r,width:i}){return U(o)?mn(cn,{className:un({[ce]:n||l,[ue]:l,[$]:r==="left",[K]:r==="center",[J]:r==="right"},e),style:[{width:i,minWidth:i,maxWidth:i},t],children:a}):null}import{TableTh as pn}from"@mantine/core";import{jsx as fn}from"react/jsx-runtime";function Qt({shadowVisible:e}){return fn(pn,{className:"mantine-datatable-footer-selector-placeholder-cell","data-shadow-visible":e||void 0})}import{jsx as at,jsxs as Dn}from"react/jsx-runtime";var Ut=Cn(function({className:t,style:o,columns:a,defaultColumnProps:n,selectionVisible:l,selectorCellShadowVisible:r,scrollDiff:i},c){let m=i<0;return at(bn,{ref:c,className:hn("mantine-datatable-footer",t),style:[{position:m?"relative":"sticky",bottom:gn(m?i:0)},o],children:Dn(Tn,{children:[l&&at(Qt,{shadowVisible:r}),a.map(({hidden:b,...p})=>{if(b)return null;let{accessor:T,visibleMediaQuery:g,textAlign:h,width:M,footer:y,footerClassName:w,footerStyle:P,noWrap:v,ellipsis:x}={...n,...p};return at(Xt,{className:w,style:P,visibleMediaQuery:g,textAlign:h,width:M,title:y,noWrap:v,ellipsis:x},T)})]})})});import{Checkbox as Yn,Group as qn,Popover as jn,PopoverDropdown as er,PopoverTarget as tr,Stack as or,TableThead as ar,TableTr as co}from"@mantine/core";import nr from"clsx";import{forwardRef as rr,useState as lr}from"react";import{TableTh as yn}from"@mantine/core";import Sn from"clsx";import{useMemo as $t}from"react";import{jsx as wn}from"react/jsx-runtime";function Kt({group:{id:e,columns:t,title:o,textAlign:a,className:n,style:l}}){let r=$t(()=>t.map(({visibleMediaQuery:m})=>m),[t]),i=At(r),c=$t(()=>t.filter(({hidden:m},b)=>!m&&i?.[b]).length,[t,i]);return c>0?wn(yn,{colSpan:c,className:Sn("mantine-datatable-column-group-header-cell",{[$]:a==="left",[K]:a==="center",[J]:a==="right"},n),style:l,children:o??de(e)}):null}import{ActionIcon as ro,Box as _n,Center as Oe,Flex as Fn,Group as Bn,TableTh as Gn}from"@mantine/core";import We from"clsx";import{useRef as Xn,useState as Qn}from"react";import{ActionIcon as xn,Popover as Mn,PopoverDropdown as Rn,PopoverTarget as kn}from"@mantine/core";import{useDisclosure as En}from"@mantine/hooks";import{jsx as Jt,jsxs as Pn}from"react/jsx-runtime";function Zt(){return Pn("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[Jt("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Jt("path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"})]})}import{jsx as Yt,jsxs as vn}from"react/jsx-runtime";function qt(){return vn("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[Yt("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Yt("path",{d:"M20 3h-16a1 1 0 0 0 -1 1v2.227l.008 .223a3 3 0 0 0 .772 1.795l4.22 4.641v8.114a1 1 0 0 0 1.316 .949l6 -2l.108 -.043a1 1 0 0 0 .576 -.906v-6.586l4.121 -4.12a3 3 0 0 0 .879 -2.123v-2.171a1 1 0 0 0 -1 -1z",strokeWidth:"0",fill:"currentColor"})]})}import{jsx as Le,jsxs as Nn}from"react/jsx-runtime";function jt({children:e,isActive:t}){let[o,{close:a,toggle:n}]=En(!1);return Nn(Mn,{withArrow:!0,withinPortal:!0,shadow:"md",opened:o,onClose:a,trapFocus:!0,children:[Le(kn,{children:Le(xn,{className:"mantine-datatable-header-cell-filter-action-icon","data-active":t||void 0,size:"sm",variant:"default",onClick:r=>{r.preventDefault(),n()},children:Le(t?qt:Zt,{})})}),Le(Rn,{onClick:r=>r.stopPropagation(),children:typeof e=="function"?e({close:a}):e})]})}import{rem as Ln}from"@mantine/core";import{useRef as In,useState as Hn}from"react";import{jsx as On}from"react/jsx-runtime";var eo=e=>{let{accessor:t,columnRef:o}=e,a=In(null),[n,l]=Hn(0),{setColumnWidth:r}=se(),i=p=>{p.preventDefault(),p.stopPropagation(),document.addEventListener("mousemove",c),document.addEventListener("mouseup",m),document.body.style.cursor="col-resize"},c=p=>{if(!o.current)return;let T=p.clientX-o.current.getBoundingClientRect().right,h=`${o.current.getBoundingClientRect().width+T}px`;o.current.style.width=h,r(t,o.current.style.width),l(-T)},m=()=>{o.current&&(document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",m),document.body.style.cursor="initial",r(t,o.current.style.width),l(0))};return On("div",{ref:a,onClick:p=>p.stopPropagation(),onMouseDown:i,onDoubleClick:()=>{o.current&&(o.current.style.maxWidth="initial",o.current.style.minWidth="initial",o.current.style.width="initial",r(t,"initial"))},className:"mantine-datatable-header-resizable-handle",style:{right:Ln(n)}})};import{jsx as Ie,jsxs as Wn}from"react/jsx-runtime";function to(){return Wn("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[Ie("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Ie("path",{d:"M12 5l0 14"}),Ie("path",{d:"M16 9l-4 -4"}),Ie("path",{d:"M8 9l4 -4"})]})}import{jsx as He,jsxs as An}from"react/jsx-runtime";function oo(){return An("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[He("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),He("path",{d:"M8 7l4 -4l4 4"}),He("path",{d:"M8 17l4 4l4 -4"}),He("path",{d:"M12 3l0 18"})]})}import{jsx as ne,jsxs as zn}from"react/jsx-runtime";function ao(){return zn("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[ne("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),ne("path",{d:"M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),ne("path",{d:"M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),ne("path",{d:"M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),ne("path",{d:"M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),ne("path",{d:"M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),ne("path",{d:"M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]})}import{jsx as nt,jsxs as Vn}from"react/jsx-runtime";function no(){return Vn("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[nt("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),nt("path",{d:"M18 6l-12 12"}),nt("path",{d:"M6 6l12 12"})]})}import{Fragment as Un,jsx as H,jsxs as rt}from"react/jsx-runtime";function lo({className:e,style:t,accessor:o,visibleMediaQuery:a,title:n,sortable:l,draggable:r,toggleable:i,resizable:c,sortIcons:m,textAlign:b,width:p,sortStatus:T,onSortStatusChange:g,filter:h,filtering:M,sortKey:y}){let{setSourceColumn:w,setTargetColumn:P,swapColumns:v,setColumnsToggle:x}=se(),[O,E]=Qn(!1),s=Xn(null);if(!U(a))return null;let S=n??de(o),d=typeof S=="string"?S:void 0,u=l&&g?N=>{N?.defaultPrevented||g({sortKey:y,columnAccessor:o,direction:T?.columnAccessor===o?T.direction==="asc"?"desc":"asc":T?.direction??"asc"})}:void 0,C=N=>{N.stopPropagation(),w(o),E(!1)},f=N=>{N.preventDefault(),P(o),E(!0)},k=()=>{P(o),E(!1),v()},I=()=>{E(!0)},A=()=>{E(!1)},F=N=>{N.stopPropagation(),x(Y=>Y.map(G=>G.accessor===o?{...G,toggled:!1}:G))};return rt(Gn,{className:We({"mantine-datatable-header-cell-sortable":l,"mantine-datatable-header-cell-toggleable":i,"mantine-datatable-header-cell-resizable":c},e),style:[{width:p,...c?{minWidth:"1px"}:{minWidth:p,maxWidth:p}},t],role:l?"button":void 0,tabIndex:l?0:void 0,onClick:u,onKeyDown:N=>N.key==="Enter"&&u?.(),ref:s,children:[rt(Bn,{className:"mantine-datatable-header-cell-sortable-group",justify:"space-between",wrap:"nowrap",children:[rt(Fn,{align:"center",w:"100%",className:We({"mantine-datatable-header-cell-draggable":r,"mantine-datatable-header-cell-drag-over":O}),draggable:r,onDragStart:r?C:void 0,onDragEnter:r?I:void 0,onDragOver:r?f:void 0,onDrop:r?k:void 0,onDragLeave:r?A:void 0,children:[r?H(Oe,{role:"img","aria-label":"Drag column",children:H(ro,{className:"mantine-datatable-header-cell-draggable-action-icon",variant:"subtle",size:"xs",onClick:N=>{N.stopPropagation()},children:H(ao,{})})}):null,H(_n,{className:We("mantine-datatable-header-cell-sortable-text",{[$]:b==="left",[K]:b==="center",[J]:b==="right"},ce,ue),title:d,children:S})]}),i?H(Oe,{className:"mantine-datatable-header-cell-toggleable-icon",role:"img","aria-label":"Toggle column",children:H(ro,{size:"xs",variant:"light",onClick:F,children:H(no,{})})}):null,l||T?.columnAccessor===o?H(Un,{children:T?.columnAccessor===o?H(Oe,{className:We("mantine-datatable-header-cell-sortable-icon",{"mantine-datatable-header-cell-sortable-icon-reversed":T.direction==="desc"}),role:"img","aria-label":`Sorted ${T.direction==="desc"?"descending":"ascending"}`,children:m?.sorted||H(to,{})}):H(Oe,{className:"mantine-datatable-header-cell-sortable-unsorted-icon",role:"img","aria-label":"Not sorted",children:m?.unsorted||H(oo,{})})}):null,h?H(jt,{isActive:!!M,children:h}):null]}),c?H(eo,{accessor:o,columnRef:s}):null]})}import{Checkbox as $n,TableTh as Kn}from"@mantine/core";import Jn from"clsx";import{forwardRef as Zn}from"react";import{jsx as io}from"react/jsx-runtime";var so=Zn(function({className:t,style:o,trigger:a,shadowVisible:n,checked:l,indeterminate:r,checkboxProps:i,onChange:c,rowSpan:m},b){let p=!i.disabled;return io(Kn,{ref:b,className:Jn("mantine-datatable-header-selector-cell",{[B]:a==="cell"&&p},t),style:o,rowSpan:m,"data-shadow-visible":n||void 0,onClick:a==="cell"&&p?c:void 0,children:io($n,{classNames:p?{input:B}:void 0,checked:l,indeterminate:r,onChange:c,...i,disabled:!(c||i.onChange)||i.disabled})})});import{jsx as Z,jsxs as Ae}from"react/jsx-runtime";var uo=rr(function({selectionColumnHeaderRef:t,className:o,style:a,sortStatus:n,sortIcons:l,onSortStatusChange:r,columns:i,defaultColumnProps:c,groups:m,selectionTrigger:b,selectionVisible:p,selectionChecked:T,selectionIndeterminate:g,onSelectionChange:h,selectionCheckboxProps:M,selectorCellShadowVisible:y,selectionColumnClassName:w,selectionColumnStyle:P},v){let x=p?Z(so,{ref:t,className:w,style:P,trigger:b,shadowVisible:y,checked:T,indeterminate:g,checkboxProps:M,onChange:h,rowSpan:m?2:void 0}):null,{columnsToggle:O,setColumnsToggle:E}=se(),[s,S]=lr(!1),d=i.some(f=>f.toggleable),u=d?Object.fromEntries(i.map(({accessor:f,title:k})=>[f,k??de(String(f))])):void 0,C=Ae(ar,{className:nr("mantine-datatable-header",o),style:a,ref:v,onContextMenu:d?f=>{f.preventDefault(),S(k=>!k)}:void 0,children:[m&&Ae(co,{children:[x,m.map(f=>Z(Kt,{group:f},f.id))]}),Ae(co,{children:[!m&&x,i.map(({hidden:f,...k},I)=>{if(f)return null;let{accessor:A,visibleMediaQuery:F,textAlign:N,width:Y,title:G,sortable:me,draggable:q,toggleable:pe,resizable:fe,titleClassName:X,titleStyle:Ge,filter:Xe,filtering:Qe,sortKey:Ue}={...c,...k};return Z(lo,{accessor:A,className:X,style:Ge,visibleMediaQuery:F,textAlign:N,width:Y,title:G,sortable:me,draggable:q,toggleable:pe,resizable:fe&&I<i.length-1,sortStatus:n,sortIcons:l,sortKey:Ue,onSortStatusChange:r,filter:Xe,filtering:Qe},A)})]})]});return d?Ae(jn,{position:"bottom",withArrow:!0,shadow:"md",opened:s,onChange:S,children:[Z(tr,{children:C}),Z(er,{children:Z(or,{children:O.filter(f=>f.toggleable).map(f=>Z(qn,{children:Z(Yn,{classNames:{label:"mantine-datatable-header-column-toggle-checkbox-label"},size:"xs",label:u[f.accessor],checked:f.toggled,onChange:k=>{E(O.map(I=>I.accessor===f.accessor?{...I,toggled:k.currentTarget.checked}:I))}})},f.accessor))})})]}):C});import{Center as ir,Loader as sr}from"@mantine/core";import dr from"clsx";import{jsx as mo}from"react/jsx-runtime";function po({pt:e,pb:t,fetching:o,customContent:a,backgroundBlur:n,size:l,type:r,color:i}){return mo(ir,{pt:e,pb:t,className:dr("mantine-datatable-loader",{"mantine-datatable-loader-fetching":o}),style:[{backdropFilter:n?`blur(${n}px)`:void 0}],children:o&&(a||mo(sr,{size:l,type:r,color:i}))})}import{Box as Cr,Pagination as Dr,Text as yr,rem as Sr}from"@mantine/core";import yo from"clsx";import{forwardRef as wr}from"react";import{Button as mr,Group as pr,Menu as fr,MenuDropdown as br,MenuItem as Tr,MenuTarget as gr,Text as go,rem as Se}from"@mantine/core";import hr from"clsx";import{parseThemeColor as cr}from"@mantine/core";function R(e,t,o){return e?cr({color:typeof e=="object"?e[o]:e,theme:t}).value:void 0}function fo({theme:e,c:t,backgroundColor:o,borderColor:a,rowBorderColor:n,stripedColor:l,highlightOnHoverColor:r}){return{"--mantine-datatable-color-light":R(t,e,"light"),"--mantine-datatable-color-dark":R(t,e,"dark"),"--mantine-datatable-background-color-light":R(o,e,"light"),"--mantine-datatable-background-color-dark":R(o,e,"dark"),"--mantine-datatable-border-color-light":R(a,e,"light"),"--mantine-datatable-border-color-dark":R(a,e,"dark"),"--mantine-datatable-row-border-color-light":R(n,e,"light"),"--mantine-datatable-row-border-color-dark":R(n,e,"dark"),"--mantine-datatable-striped-color-light":R(l,e,"light"),"--mantine-datatable-striped-color-dark":R(l,e,"dark"),"--mantine-datatable-highlight-on-hover-color-light":R(r,e,"light"),"--mantine-datatable-highlight-on-hover-color-dark":R(r,e,"dark")}}function ze({theme:e,paginationActiveTextColor:t,paginationActiveBackgroundColor:o}){return{"--mantine-datatable-pagination-active-text-color-light":R(t,e,"light"),"--mantine-datatable-pagination-active-text-color-dark":R(t,e,"dark"),"--mantine-datatable-pagination-active-background-color-light":R(o,e,"light"),"--mantine-datatable-pagination-active-background-color-dark":R(o,e,"dark")}}function bo({theme:e,color:t,backgroundColor:o}){return{"--mantine-datatable-row-color-light":R(t,e,"light"),"--mantine-datatable-row-color-dark":R(t,e,"dark"),"--mantine-datatable-row-background-color-light":R(o,e,"light"),"--mantine-datatable-row-background-color-dark":R(o,e,"dark")}}import{jsx as lt,jsxs as ur}from"react/jsx-runtime";function To(){return ur("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[lt("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),lt("path",{d:"M8 9l4 -4l4 4"}),lt("path",{d:"M16 15l-4 4l-4 -4"})]})}import{jsx as re,jsxs as Co}from"react/jsx-runtime";var ho={xs:Se(22),sm:Se(26),md:Se(32),lg:Se(38),xl:Se(44)};function Do({size:e,label:t,values:o,value:a,activeTextColor:n,activeBackgroundColor:l,onChange:r}){return Co(pr,{gap:"xs",children:[re(go,{component:"div",size:e,children:t}),Co(fr,{withinPortal:!0,withArrow:!0,classNames:{arrow:"mantine-datatable-page-size-selector-menu-arrow"},children:[re(gr,{children:re(mr,{size:e,variant:"default",classNames:{section:"mantine-datatable-page-size-selector-button-icon"},rightSection:re(To,{}),style:[{fontWeight:"normal"},i=>({height:ho[e],paddingLeft:i.spacing[e],paddingRight:i.spacing[e]})],children:a})}),re(br,{children:o.map(i=>{let c=i===a;return re(Tr,{className:hr({"mantine-datatable-page-size-selector-active":c}),style:[{height:ho[e]},c&&(n||l)?m=>ze({theme:m,paginationActiveTextColor:n,paginationActiveBackgroundColor:l}):void 0],disabled:c,onClick:()=>r(i),children:re(go,{component:"div",size:e,children:i})},i)})})]})]})}import{jsx as it,jsxs as Pr}from"react/jsx-runtime";var So=wr(function({className:t,style:o,fetching:a,page:n,onPageChange:l,paginationWithEdges:r,paginationActiveTextColor:i,paginationActiveBackgroundColor:c,paginationSize:m,loadingText:b,noRecordsText:p,paginationText:T,totalRecords:g,recordsPerPage:h,onRecordsPerPageChange:M,recordsPerPageLabel:y,recordsPerPageOptions:w,recordsLength:P,horizontalSpacing:v,paginationWrapBreakpoint:x,getPaginationControlProps:O},E){let s;if(a)s=b;else if(!g)s=p;else{let d=(n-1)*h+1,u=d+P-1;s=T({from:d,to:u,totalRecords:g})}let S=U(({breakpoints:d})=>`(min-width: ${typeof x=="number"?`${Sr(x)}rem`:d[x]||x})`);return Pr(Cr,{ref:E,px:v??"xs",py:"xs",className:yo("mantine-datatable-pagination",t),style:[{flexDirection:S?"row":"column"},o],children:[it(yr,{component:"div",className:"mantine-datatable-pagination-text",size:m,children:s}),w&&it(Do,{activeTextColor:i,activeBackgroundColor:c,size:m,label:y,values:w,value:h,onChange:M}),it(Dr,{classNames:{root:yo("mantine-datatable-pagination-pages",{"mantine-datatable-pagination-pages-fetching":a||!P}),control:"mantine-datatable-pagination-pages-control"},style:i||c?d=>ze({theme:d,paginationActiveTextColor:i,paginationActiveBackgroundColor:c}):void 0,withEdges:r,value:n,onChange:l,size:m,total:Math.ceil(g/h),getControlProps:O})]})});import{TableTr as Or}from"@mantine/core";import Wr from"clsx";import{TableTd as vr}from"@mantine/core";import xr from"clsx";import{jsx as Mr}from"react/jsx-runtime";function wo({className:e,style:t,visibleMediaQuery:o,record:a,index:n,onClick:l,onDoubleClick:r,onContextMenu:i,noWrap:c,ellipsis:m,textAlign:b,width:p,accessor:T,render:g,defaultRender:h,customCellAttributes:M}){return U(o)?Mr(vr,{className:xr({[ce]:c||m,[ue]:m,[B]:l||r,[Ne]:i,[$]:b==="left",[K]:b==="center",[J]:b==="right"},e),style:[{width:p,minWidth:p,maxWidth:p},t],onClick:l,onDoubleClick:r,onContextMenu:i,...M?.(a,n),children:g?g(a,n):h?h(a,n,T):ot(a,T)}):null}import{Collapse as Rr,TableTd as kr,TableTr as Po}from"@mantine/core";import{Fragment as Er,jsx as we,jsxs as Nr}from"react/jsx-runtime";function vo({open:e,colSpan:t,content:o,collapseProps:a}){let{expanded:n,visible:l}=Bt(e,a?.transitionDuration);return l?Nr(Er,{children:[we(Po,{}),we(Po,{children:we(kr,{className:"mantine-datatable-row-expansion-cell",colSpan:t,children:we(Rr,{in:n,...a,children:we("div",{className:"mantine-datatable-row-expansion-cell-content",children:o()})})})})]}):null}import{Checkbox as Lr,TableTd as Ir}from"@mantine/core";import Hr from"clsx";import{jsx as xo}from"react/jsx-runtime";function Mo({className:e,style:t,record:o,index:a,trigger:n,onChange:l,withRightShadow:r,checkboxProps:i,getCheckboxProps:c,...m}){let b={...i,...c(o,a)},p=!m.disabled&&!b.disabled,T=g=>{g.stopPropagation(),n==="cell"&&p&&l?.(g)};return xo(Ir,{className:Hr("mantine-datatable-row-selector-cell",{[B]:n==="cell"&&p},e),style:t,"data-shadow-visible":r||void 0,onClick:T,children:xo(Lr,{classNames:p?{input:B}:void 0,onChange:l,...m,...b})})}import{Fragment as Ar,jsx as st,jsxs as Ro}from"react/jsx-runtime";function ko({record:e,index:t,columns:o,defaultColumnProps:a,defaultColumnRender:n,selectionTrigger:l,selectionVisible:r,selectionChecked:i,onSelectionChange:c,isRecordSelectable:m,selectionCheckboxProps:b,getSelectionCheckboxProps:p,onClick:T,onDoubleClick:g,onContextMenu:h,onCellClick:M,onCellDoubleClick:y,onCellContextMenu:w,expansion:P,customAttributes:v,color:x,backgroundColor:O,className:E,style:s,selectorCellShadowVisible:S,selectionColumnClassName:d,selectionColumnStyle:u}){return Ro(Ar,{children:[Ro(Or,{className:Wr("mantine-datatable-row",{[B]:T||g||P?.isExpandable({record:e,index:t})&&P?.expandOnClick},{[Ne]:h},typeof E=="function"?E(e,t):E),"data-selected":i||void 0,onClick:C=>{if(P){let{isExpandable:f,isRowExpanded:k,expandOnClick:I,expandRow:A,collapseRow:F}=P;f({record:e,index:t})&&I&&(k(e)?F(e):A(e))}T?.({event:C,record:e,index:t})},onDoubleClick:g?C=>g({event:C,record:e,index:t}):void 0,onContextMenu:h?C=>h({event:C,record:e,index:t}):void 0,style:[x||O?C=>{let f=x?.(e,t),k=O?.(e,t);return bo({theme:C,color:f,backgroundColor:k})}:void 0,s?.(e,t)],...v?.(e,t),children:[r&&st(Mo,{className:d,style:u,record:e,index:t,trigger:l,withRightShadow:S,checked:i,disabled:!c||(m?!m(e,t):!1),onChange:c,checkboxProps:b,getCheckboxProps:p}),o.map(({hidden:C,...f},k)=>{if(C)return null;let{accessor:I,visibleMediaQuery:A,textAlign:F,noWrap:N,ellipsis:Y,width:G,render:me,cellsClassName:q,cellsStyle:pe,customCellAttributes:fe}={...a,...f};return st(wo,{className:typeof q=="function"?q(e,t):q,style:pe?.(e,t),visibleMediaQuery:A,record:e,index:t,onClick:M?X=>M({event:X,record:e,index:t,column:f,columnIndex:k}):void 0,onDoubleClick:y?X=>y({event:X,record:e,index:t,column:f,columnIndex:k}):void 0,onContextMenu:w?X=>w({event:X,record:e,index:t,column:f,columnIndex:k}):void 0,accessor:I,textAlign:F,noWrap:N,ellipsis:Y,width:G,render:me,defaultRender:n,customCellAttributes:fe},I)})]}),P&&st(vo,{colSpan:o.filter(({hidden:C})=>!C).length+(r?1:0),open:P.isRowExpanded(e),content:P.content({record:e,index:t}),collapseProps:P.collapseProps})]})}import{Box as Eo,ScrollArea as zr,rem as No}from"@mantine/core";import Ve from"clsx";import{jsx as _e,jsxs as Vr}from"react/jsx-runtime";function Lo({topShadowVisible:e,leftShadowVisible:t,leftShadowBehind:o,rightShadowVisible:a,rightShadowBehind:n,bottomShadowVisible:l,headerHeight:r,footerHeight:i,onScrollPositionChange:c,children:m,viewportRef:b,scrollAreaProps:p}){return Vr(zr,{...p,viewportRef:b,classNames:{root:"mantine-datatable-scroll-area",scrollbar:"mantine-datatable-scroll-area-scrollbar",thumb:"mantine-datatable-scroll-area-thumb",corner:"mantine-datatable-scroll-area-corner"},onScrollPositionChange:c,children:[m,_e(Eo,{className:Ve("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-top-shadow",{"mantine-datatable-scroll-area-shadow-visible":e}),style:{top:r?No(r):0}}),_e("div",{className:Ve("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-left-shadow",{"mantine-datatable-scroll-area-shadow-visible":t,"mantine-datatable-scroll-area-shadow-behind":o})}),_e("div",{className:Ve("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-right-shadow",{"mantine-datatable-scroll-area-shadow-visible":a,"mantine-datatable-scroll-area-shadow-behind":n})}),_e(Eo,{className:Ve("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-bottom-shadow",{"mantine-datatable-scroll-area-shadow-visible":l}),style:{bottom:i?No(i+1):0}})]})}import{jsx as _,jsxs as Oo}from"react/jsx-runtime";function Xr({withTableBorder:e,borderRadius:t,textSelectionDisabled:o,height:a="100%",minHeight:n,maxHeight:l,shadow:r,verticalAlign:i="center",fetching:c,columns:m,storeColumnsKey:b,groups:p,pinFirstColumn:T,pinLastColumn:g,defaultColumnProps:h,defaultColumnRender:M,idAccessor:y="id",records:w,selectionTrigger:P="checkbox",selectedRecords:v,onSelectedRecordsChange:x,selectionColumnClassName:O,selectionColumnStyle:E,isRecordSelectable:s,selectionCheckboxProps:S,allRecordsSelectionCheckboxProps:d={"aria-label":"Select all records"},getRecordSelectionCheckboxProps:u=(W,j)=>({"aria-label":`Select record ${j+1}`}),sortStatus:C,sortIcons:f,onSortStatusChange:k,horizontalSpacing:I,page:A,onPageChange:F,totalRecords:N,recordsPerPage:Y,onRecordsPerPageChange:G,recordsPerPageOptions:me,recordsPerPageLabel:q="Records per page",paginationWithEdges:pe,paginationActiveTextColor:fe,paginationActiveBackgroundColor:X,paginationSize:Ge="sm",paginationText:Xe=({from:W,to:j,totalRecords:ee})=>`${W} - ${j} / ${ee}`,paginationWrapBreakpoint:Qe="sm",getPaginationControlProps:Ue=W=>W==="previous"?{"aria-label":"Previous page"}:W==="next"?{"aria-label":"Next page"}:{},loaderBackgroundBlur:Wo,customLoader:Ao,loaderSize:zo,loaderType:Vo,loaderColor:_o,loadingText:Fo="...",emptyState:Bo,noRecordsText:dt="No records",noRecordsIcon:Go,highlightOnHover:Xo,striped:Qo,noHeader:Uo,onRowClick:$o,onRowDoubleClick:Ko,onRowContextMenu:Jo,onCellClick:Zo,onCellDoubleClick:Yo,onCellContextMenu:qo,onScroll:ct,onScrollToTop:ut,onScrollToBottom:mt,onScrollToLeft:pt,onScrollToRight:ft,c:jo,backgroundColor:ea,borderColor:ta,rowBorderColor:oa,stripedColor:aa,highlightOnHoverColor:na,rowColor:ra,rowBackgroundColor:la,rowExpansion:ia,rowClassName:sa,rowStyle:da,customRowAttributes:ca,scrollViewportRef:ua,scrollAreaProps:ma,tableRef:pa,bodyRef:fa,m:ba,my:Ta,mx:ga,mt:ha,mb:Ca,ml:Da,mr:ya,className:Sa,classNames:be,style:wa,styles:Te,...bt}){let{ref:W,width:j,height:ee}=ae(),ge=Gr(()=>p?.flatMap(D=>D.columns)??m,[m,p]),Tt=Lt({key:b,columns:ge}),{ref:Pa,height:$e}=ae(),{ref:va,width:Ke,height:he}=ae(),{ref:xa,height:Ma}=ae(),{ref:Ra,height:gt}=ae(),{ref:ka,width:Ea}=ae(),Na=Io(va,pa),La=Io(W,ua),[Je,ht]=Be(!0),[Ze,Ct]=Be(!0),[Ce,Dt]=Be(!0),[Pe,yt]=Be(!0),Ia=Vt({rowExpansion:ia,records:w,idAccessor:y}),Ye=Fe(()=>{let D=W.current?.scrollTop||0,Q=W.current?.scrollLeft||0;if(c||he<=ee)ht(!0),Ct(!0);else{let z=D===0,V=he-D-ee<1;ht(z),Ct(V),z&&z!==Je&&ut?.(),V&&V!==Ze&&mt?.()}if(c||Ke===j)Dt(!0),yt(!0);else{let z=Q===0,V=Ke-Q-j<1;Dt(z),yt(V),z&&z!==Ce&&pt?.(),V&&V!==Pe&&ft?.()}},[c,mt,pt,ft,ut,ee,W,j,Ze,Ce,Pe,Je,he,Ke]);It(Ye,[Ye]);let St=Br(Ye,50),Ha=Fe(D=>{ct?.(D),St()},[St,ct]),Oa=Fe(D=>{W.current?.scrollTo({top:0,left:0}),F(D)},[F,W]),ve=w?.length,wt=w?.map(D=>L(D,y)),le=!!v,De=v?.map(D=>L(D,y)),Pt=wt!==void 0&&De!==void 0&&De.length>0,qe=s?w?.filter(s):w,xe=qe?.map(D=>L(D,y)),Me=Pt&&xe.every(D=>De.includes(D)),Wa=Pt&&xe.some(D=>De.includes(D)),Aa=Fe(()=>{v&&x&&x(Me?v.filter(D=>!xe.includes(L(D,y))):Ee([...v,...qe],D=>L(D,y)))},[Me,y,x,xe,qe,v]),{lastSelectionChangeIndex:Re,setLastSelectionChangeIndex:za}=Ht(wt),je=le&&!Ce&&!T;return _(et,{...Tt,children:Oo(_r,{...{m:ba,my:Ta,mx:ga,mt:ha,mb:Ca,ml:Da,mr:ya},className:Ho("mantine-datatable",{"mantine-datatable-with-border":e},Sa,be?.root),style:[D=>({...fo({theme:D,c:jo,backgroundColor:ea,borderColor:ta,rowBorderColor:oa,stripedColor:aa,highlightOnHoverColor:na}),borderRadius:D.radius[t]||t,boxShadow:D.shadows[r]||r,height:a,minHeight:n,maxHeight:l}),wa,Te?.root],children:[_(Lo,{viewportRef:La,topShadowVisible:!Je,leftShadowVisible:!Ce,leftShadowBehind:le||!!T,rightShadowVisible:!Pe,rightShadowBehind:g,bottomShadowVisible:!Ze,headerHeight:$e,footerHeight:Ma,onScrollPositionChange:Ha,scrollAreaProps:ma,children:Oo(Fr,{ref:Na,horizontalSpacing:I,className:Ho("mantine-datatable-table",{[Gt]:o,"mantine-datatable-vertical-align-top":i==="top","mantine-datatable-vertical-align-bottom":i==="bottom","mantine-datatable-last-row-border-bottom-visible":bt.withRowBorders&&he<ee,"mantine-datatable-pin-last-column":g,"mantine-datatable-pin-last-column-scrolled":!Pe&&g,"mantine-datatable-selection-column-visible":le,"mantine-datatable-pin-first-column":T,"mantine-datatable-pin-first-column-scrolled":!Ce&&T},be?.table),style:{...Te?.table,"--mantine-datatable-selection-column-width":`${Ea}px`},"data-striped":ve&&Qo||void 0,"data-highlight-on-hover":Xo||void 0,...bt,children:[Uo?null:_(et,{...Tt,children:_(uo,{ref:Pa,selectionColumnHeaderRef:ka,className:be?.header,style:Te?.header,columns:ge,defaultColumnProps:h,groups:p,sortStatus:C,sortIcons:f,onSortStatusChange:k,selectionTrigger:P,selectionVisible:le,selectionChecked:Me,selectionIndeterminate:Wa&&!Me,onSelectionChange:Aa,selectionCheckboxProps:{...S,...d},selectorCellShadowVisible:je,selectionColumnClassName:O,selectionColumnStyle:E})}),_("tbody",{ref:fa,children:ve?w.map((D,Q)=>{let z=L(D,y),V=De?.includes(z)||!1,vt;return x&&v&&(vt=Va=>{if(Va.nativeEvent.shiftKey&&Re!==null){let ie=w.filter(Q>Re?(te,oe)=>oe>=Re&&oe<=Q&&(s?s(te,oe):!0):(te,oe)=>oe>=Q&&oe<=Re&&(s?s(te,oe):!0));x(V?zt(v,ie,te=>L(te,y)):Ee([...v,...ie],te=>L(te,y)))}else x(V?v.filter(ie=>L(ie,y)!==z):Ee([...v,D],ie=>L(ie,y)));za(Q)}),_(ko,{record:D,index:Q,columns:ge,defaultColumnProps:h,defaultColumnRender:M,selectionTrigger:P,selectionVisible:le,selectionChecked:V,onSelectionChange:vt,isRecordSelectable:s,selectionCheckboxProps:S,getSelectionCheckboxProps:u,onClick:$o,onDoubleClick:Ko,onCellClick:Zo,onCellDoubleClick:Yo,onContextMenu:Jo,onCellContextMenu:qo,expansion:Ia,color:ra,backgroundColor:la,className:sa,style:da,customAttributes:ca,selectorCellShadowVisible:je,selectionColumnClassName:O,selectionColumnStyle:E},z)}):_(kt,{})}),ge.some(({footer:D})=>D)&&_(Ut,{ref:xa,className:be?.footer,style:Te?.footer,columns:ge,defaultColumnProps:h,selectionVisible:le,selectorCellShadowVisible:je,scrollDiff:he-ee})]})}),A&&_(So,{ref:Ra,className:be?.pagination,style:Te?.pagination,horizontalSpacing:I,fetching:c,page:A,onPageChange:Oa,totalRecords:N,recordsPerPage:Y,onRecordsPerPageChange:G,recordsPerPageOptions:me,recordsPerPageLabel:q,paginationWithEdges:pe,paginationActiveTextColor:fe,paginationActiveBackgroundColor:X,paginationSize:Ge,paginationText:Xe,paginationWrapBreakpoint:Qe,getPaginationControlProps:Ue,noRecordsText:dt,loadingText:Fo,recordsLength:ve}),_(po,{pt:$e,pb:gt,fetching:c,backgroundBlur:Wo,customContent:Ao,size:zo,type:Vo,color:_o}),_(Nt,{pt:$e,pb:gt,icon:Go,text:dt,active:!c&&!ve,children:Bo})]})})}export{Xr as DataTable,zt as differenceBy,L as getRecordId,ot as getValueAtPath,de as humanize,Ee as uniqBy,Lt as useDataTableColumns};
2
2
  //# sourceMappingURL=index.mjs.map