Files
pgsql-jellyfin/publish_test4/wwwroot/node_modules.material-react-table.1b44fb088e2188e27421.chunk.js
T
2026-07-08 13:46:27 -04:00

1 line
139 KiB
JavaScript

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[71187],{51602:function(e,n,t){t.d(n,{Up:function(){return xt},Zs:function(){return nl},zp:function(){return Ol}}),t(29305),t(32733),t(84701),t(81678),t(24776),t(86765),t(14382),t(69703),t(68854),t(69892),t(76281),t(84734),t(44962),t(86584),t(87324),t(89336),t(26448),t(74576),t(4754),t(94),t(77575),t(36947),t(83810),t(78557),t(64628),t(96054),t(95021),t(73687),t(92745),t(50987),t(99425),t(83994),t(53819),t(93062),t(97456),t(64062),t(46968),t(23630),t(82367),t(89612);var l=t(50637),o=t(23009),i=t(63696),r=t(67272),a=t(62540),s=t(75487),u=t(72073),c=t(92779),d=t(63703),g=t(54954),b=t(46204),p=t(96156),m=t(48402),v=t(44790),f=t(85637),h=t(70140),x=t(70564),j=t(38780),w=t(46342),C=t(72836),y=t(21315),O=t(74971),S=t(65090),A=t(5517),R=t(10301),F=t(27529),I=t(97758),P=t(69442),D=t(64650),T=t(34377),z=t(42644),M=t(17997),k=t(91480),E=t(13184),V=t(86927),B=t(98022),H=t(17740),L=t(43192),G=t(888),W=t(5068),N=t(99538),q=t(87196),K=t(15723),U=t(52150),_=t(22487),X=t(8112),Z=t(43361),$=t(19704),Q=t(30617),Y=t(23227),J=t(43089),ee=t(70888),ne=t(58156),te=t(53735),le=t(69856),oe=t(76110),ie=t(40181),re=t(58164),ae=t(89348),se=t(27778),ue=t(90158),ce=t(48007),de=t(94577),ge=t(57836),be=t(11041),pe=t(699),me=t(64384),ve=t(96441),fe=t(96318),he=t(71350),xe=t(6725),je=t(63738),we=t(70015),Ce=t(74569),ye=t(11860),Oe=t(26523),Se=t(16822),Ae=t(9308),Re=t(4579),Fe=t(74156),Ie=t(56374),Pe=t(29644),De=t(47891),Te=t(4391),ze=t(62010),Me=t(98756),ke=t(37793),Ee=t(9042),Ve=t(25295),Be=t(10822),He=t(82670),Le=t(81605),Ge=t(17173),We=t(76745),Ne=t(45318),qe=t(67854);function Ke(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var l,o,i,r,a=[],s=!0,u=!1;try{if(i=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;s=!1}else for(;!(s=(l=i.call(t)).done)&&(a.push(l.value),a.length!==n);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=t.return&&(r=t.return(),Object(r)!==r))return}finally{if(u)throw o}}return a}}(e,n)||Ze(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ue(e){return Ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ue(e)}function _e(e,n,t){return(n=function(e){var n=function(e){if("object"!=Ue(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=Ue(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ue(n)?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Xe(e){return function(e){if(Array.isArray(e))return $e(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ze(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ze(e,n){if(e){if("string"==typeof e)return $e(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?$e(e,n):void 0}}function $e(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,l=Array(n);t<n;t++)l[t]=e[t];return l}var Qe=function(e){var n,t,l,o;return null!==(o=null!==(n=e.id)&&void 0!==n?n:null===(l=null===(t=e.accessorKey)||void 0===t?void 0:t.toString)||void 0===l?void 0:l.call(t))&&void 0!==o?o:e.header},Ye=function(e){var n=[],t=function(e){e.forEach((function(e){e.columns?t(e.columns):n.push(e)}))};return t(e),n},Je=function(e){var n=e.columnDefs,t=e.tableOptions,l=t.aggregationFns,o=void 0===l?{}:l,i=t.defaultDisplayColumn,r=t.filterFns,a=void 0===r?{}:r,s=t.sortingFns,u=void 0===s?{}:s,c=t.state,d=(void 0===c?{}:c).columnFilterFns,g=void 0===d?{}:d;return n.map((function(e){var n,l;if(e.id||(e.id=Qe(e)),e.columnDefType||(e.columnDefType="data"),null===(n=e.columns)||void 0===n?void 0:n.length)e.columnDefType="group",e.columns=Je({columnDefs:e.columns,tableOptions:t});else if("data"===e.columnDefType){if(Array.isArray(e.aggregationFn)){var r=e.aggregationFn;e.aggregationFn=function(e,n,t){return r.map((function(l){var i;return null===(i=o[l])||void 0===i?void 0:i.call(o,e,n,t)}))}}Object.keys(a).includes(g[e.id])&&(e.filterFn=null!==(l=a[g[e.id]])&&void 0!==l?l:a.fuzzy,e._filterFn=g[e.id]),Object.keys(u).includes(e.sortingFn)&&(e.sortingFn=u[e.sortingFn])}else"display"===e.columnDefType&&(e=Object.assign(Object.assign({},i),e));return e}))},en=function(e,n,t){e.getCanPin()&&e.pin(n.getIsPinned());var l=Xe(t);return l.splice(l.indexOf(n.id),0,l.splice(l.indexOf(e.id),1)[0]),l},nn=function(e){var n,t=e.header,l=e.table.options.columnFilterModeOptions,o=t.column,i=o.columnDef,r=i.filterVariant,a=!(!(null==r?void 0:r.startsWith("date"))&&!(null==r?void 0:r.startsWith("time"))),s="autocomplete"===r,u=(null==r?void 0:r.includes("range"))||["between","betweenInclusive","inNumberRange"].includes(i._filterFn),c="select"===r,d="multi-select"===r,g=["autocomplete","text"].includes(r)||!c&&!d,b=i._filterFn;return{allowedColumnFilterOptions:null!==(n=null==i?void 0:i.columnFilterModeOptions)&&void 0!==n?n:l,currentFilterOption:b,facetedUniqueValues:o.getFacetedUniqueValues(),isAutocompleteFilter:s,isDateFilter:a,isMultiSelectFilter:d,isRangeFilter:u,isSelectFilter:c,isTextboxFilter:g}},tn=function(e){var n=e.header,t=e.table,l=n.column.columnDef,o=nn({header:n,table:t}),r=o.facetedUniqueValues,a=o.isAutocompleteFilter,s=o.isMultiSelectFilter,u=o.isSelectFilter;return(0,i.useMemo)((function(){var e;return null!==(e=l.filterSelectOptions)&&void 0!==e?e:(u||s||a)&&r?Array.from(r.keys()).filter((function(e){return null!=e})).sort((function(e,n){return e.localeCompare(n)})):void 0}),[l.filterSelectOptions,r,s,u])},ln=Object.assign(Object.assign({},l.Si),{fuzzy:function(e,n,t){var o=0;return e.columnFiltersMeta[t]&&(o=(0,r.Q9)(e.columnFiltersMeta[t],n.columnFiltersMeta[t])),0===o?l.Si.alphanumeric(e,n,t):o}}),on=function(e,n){return e instanceof Function?e(n):e},rn=function(e){var n,t,l="",o="";return e&&("object"!==Ue(e)?(l=e,o=e):(l=null!==(n=e.label)&&void 0!==n?n:e.value,o=null!==(t=e.value)&&void 0!==t?t:l)),{label:l,value:o}},an=function(e,n){var t=e.getCenterRows,l=e.getPrePaginationRowModel,o=e.getRowModel,i=e.getState,r=e.getTopRows,a=e.options,s=a.createDisplayMode,u=a.enablePagination,c=a.enableRowPinning,d=a.manualPagination,g=a.positionCreatingRow,b=a.rowPinningDisplayMode,p=i(),m=p.creatingRow,v=p.pagination,f=[];if(un(e)){if(f=l().rows.sort((function(e,n){return t=e,l=n,Math.max.apply(Math,Xe(Object.values(l.columnFiltersMeta).map((function(e){return e.rank}))))-Math.max.apply(Math,Xe(Object.values(t.columnFiltersMeta).map((function(e){return e.rank}))));var t,l})),u&&!d&&!n){var h=v.pageIndex*v.pageSize;f=f.slice(h,h+v.pageSize)}c&&!(null==b?void 0:b.includes("sticky"))&&(f=f.filter((function(e){return!e.getIsPinned()})))}else f=!c||(null==b?void 0:b.includes("sticky"))?n?l().rows:o().rows:t();if(c&&(null==b?void 0:b.includes("sticky"))){var x=f.filter((function(e){return e.getIsPinned()})).map((function(e){return e.id}));f=[].concat(Xe(r().filter((function(e){return!x.includes(e.id)}))),Xe(f))}if(void 0!==g&&m&&"row"===s){var j=isNaN(+g)?"top"===g?0:f.length:+g;f=[].concat(Xe(f.slice(0,j)),[m],Xe(f.slice(j)))}return f},sn=function(e){var n=e.getState,t=e.options,l=t.enableGlobalFilterRankedResults,o=t.manualExpanding,i=t.manualFiltering,r=t.manualGrouping,a=t.manualSorting,s=n(),u=s.expanded,c=s.globalFilterFn;return!o&&!i&&!r&&!a&&l&&"fuzzy"===c&&!0!==u&&!Object.values(u).some(Boolean)},un=function(e){var n=e.getState(),t=n.globalFilter,l=n.sorting;return sn(e)&&t&&!Object.values(l).some(Boolean)},cn=function(e){var n=e.row,t=e.table.options.enableRowSelection;return n.getIsSelected()||on(t,n)&&n.getCanSelectSubRows()&&n.getIsAllSubRowsSelected()},dn=function(e){var n=e.row,t=e.staticRowIndex,l=void 0===t?0:t,o=e.table;return function(e,t){var i,r=o.getState,a=o.options,s=a.enableBatchRowSelection,u=a.enableMultiRowSelection,c=a.enableRowPinning,d=a.manualPagination,g=a.rowPinningDisplayMode,b=o.refs.lastSelectedRowId,p=r().pagination,m=p.pageIndex,v=p.pageSize,f=d?0:v*m,h=cn({row:n,table:o});n.toggleSelected(null!=t?t:!h);var x=new Set([n.id]);if(s&&u&&e.nativeEvent.shiftKey&&null!==b.current){var j=an(o,!0),w=j.findIndex((function(e){return e.id===b.current}));if(-1!==w){var C=cn({row:null==j?void 0:j[w],table:o}),y=l+f,O=Ke(w<y?[w,y]:[y,w],2),S=O[0],A=O[1];if(h!==C)for(var R=S;R<=A;R++)j[R].toggleSelected(!h),x.add(j[R].id)}}b.current=n.id,n.getCanSelectSubRows()&&n.getIsAllSubRowsSelected()&&(null===(i=n.subRows)||void 0===i||i.forEach((function(e){return e.toggleSelected(!1)}))),c&&(null==g?void 0:g.includes("select"))&&x.forEach((function(e){o.getRow(e).pin(!h&&((null==g?void 0:g.includes("bottom"))?"bottom":"top"))}))}},gn=function(e){var n=e.table;return function(e,t,l){var o=n.options,i=o.enableRowPinning,r=o.rowPinningDisplayMode,a=o.selectAllMode,s=n.refs.lastSelectedRowId;"all"===a||l?n.toggleAllRowsSelected(null!=t?t:e.target.checked):n.toggleAllPageRowsSelected(null!=t?t:e.target.checked),i&&(null==r?void 0:r.includes("select"))&&n.setRowPinning({bottom:[],top:[]}),s.current=null}},bn=function(e){return e.ctrlKey&&navigator.platform.toLowerCase().includes("win")||e.metaKey&&navigator.platform.toLowerCase().includes("mac")},pn=function(e){var n=e.cell,t=e.table.options.enableEditing,l=n.column.columnDef,o=n.row;return!n.getIsPlaceholder()&&on(t,o)&&!1!==on(l.enableEditing,o)},mn=function(e){var n=e.cell,t=e.table,l=t.options.editDisplayMode,o=t.refs.editInputRefs,i=n.column;pn({cell:n,table:t})&&"cell"===l&&(t.setEditingCell(n),queueMicrotask((function(){var e,n,t=null===(e=o.current)||void 0===e?void 0:e[i.id];t&&(t.focus(),null===(n=t.select)||void 0===n||n.call(t))})))},vn=function(e){var n,t,l,o,i,r,a,s,u=e.cell,c=e.cellElements,d=e.cellValue,g=e.containerElement,b=e.event,p=e.header,m=e.parentElement,v=e.table;if(v.options.enableKeyboardShortcuts&&!b.isPropagationStopped()){var f=b.currentTarget;if(d&&bn(b)&&"c"===b.key)navigator.clipboard.writeText(d);else if(["Enter"," "].includes(b.key))if("mrt-row-select"===(null===(n=null==u?void 0:u.column)||void 0===n?void 0:n.id))b.preventDefault(),dn({row:u.row,table:v,staticRowIndex:+b.target.getAttribute("data-index")})(b);else if("mrt-row-select"===(null===(t=null==p?void 0:p.column)||void 0===t?void 0:t.id)&&v.options.enableSelectAll)b.preventDefault(),gn({table:v})(b);else if("mrt-row-expand"===(null===(l=null==u?void 0:u.column)||void 0===l?void 0:l.id)&&(u.row.getCanExpand()||(null===(i=(o=v.options).renderDetailPanel)||void 0===i?void 0:i.call(o,{row:u.row,table:v}))))b.preventDefault(),u.row.toggleExpanded();else if("mrt-row-expand"===(null===(r=null==p?void 0:p.column)||void 0===r?void 0:r.id)&&v.options.enableExpandAll)b.preventDefault(),v.toggleAllRowsExpanded();else if("mrt-row-pin"===(null==u?void 0:u.column.id))b.preventDefault(),u.row.getIsPinned()?u.row.pin(!1):u.row.pin((null===(a=v.options.rowPinningDisplayMode)||void 0===a?void 0:a.includes("bottom"))?"bottom":"top");else if(p&&bn(b)){var h=f.querySelector('button[aria-label="'.concat(v.options.localization.columnActions,'"]'));h&&h.click()}else(null===(s=null==p?void 0:p.column)||void 0===s?void 0:s.getCanSort())&&(b.preventDefault(),p.column.toggleSorting());else if(["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(b.key)){b.preventDefault();var x=m||f.closest("tr"),j=g||f.closest("table"),w=c||Array.from((null==j?void 0:j.querySelectorAll("th, td"))||[]),C=w.indexOf(f),y=parseInt(f.getAttribute("data-index")||"0"),O=void 0,S=function(e,n){var t,l="c"===e?x:"f"===e?null==j?void 0:j.querySelector("tr"):null===(t=null==j?void 0:j.lastElementChild)||void 0===t?void 0:t.lastElementChild,o=Array.from((null==l?void 0:l.children)||[]);return"f"===n?o[0]:o[o.length-1]},A=function(e,n){var t,l="t"===n?null==j?void 0:j.querySelector("tr"):null===(t=null==j?void 0:j.lastElementChild)||void 0===t?void 0:t.lastElementChild;return Array.from((null==l?void 0:l.children)||[])[e]},R=function(e,n){return("f"===n?w.slice(C+1):w.slice(0,C).reverse()).find((function(n){return n.matches('[data-index="'.concat(e,'"]'))}))};switch(b.key){case"ArrowRight":O=R(y+1,"f");break;case"ArrowLeft":O=R(y-1,"b");break;case"ArrowUp":O=R(y,"b");break;case"ArrowDown":O=R(y,"f");break;case"Home":O=S(bn(b)?"f":"c","f");break;case"End":O=S(bn(b)?"l":"c","l");break;case"PageUp":O=A(y,"t");break;case"PageDown":O=A(y,"b")}O&&O.focus()}}};function fn(e){var n=e.header,t=e.id,l=e.size,o=e.tableOptions,i=o.defaultDisplayColumn,r=o.displayColumnDefOptions,a=o.localization;return Object.assign(Object.assign(Object.assign(Object.assign({},i),{header:n?a[n]:"",size:l}),null==r?void 0:r[t]),{id:t})}var hn=function(e){var n=e.enableRowPinning,t=e.rowPinningDisplayMode;return!(!n||(null==t?void 0:t.startsWith("select")))},xn=function(e){var n=e.enableRowDragging,t=e.enableRowOrdering;return!(!n&&!t)},jn=function(e){var n=e.enableExpanding,t=e.enableGrouping,l=e.renderDetailPanel,o=e.state.grouping;return!!(n||t&&(null==o?void 0:o.length)||l)},wn=function(e){var n=e.createDisplayMode,t=e.editDisplayMode,l=e.enableEditing,o=e.enableRowActions,i=e.state.creatingRow;return!!(o||i&&"row"===n||l&&["modal","row"].includes(null!=t?t:""))},Cn=function(e){return!!e.enableRowSelection},yn=function(e){return!!e.enableRowNumbers},On=function(e){return"grid-no-grow"===e.layoutMode},Sn=function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=e.state.columnOrder,l=void 0===t?[]:t,o=function(e){return[hn(e)&&"mrt-row-pin",xn(e)&&"mrt-row-drag","first"===e.positionActionsColumn&&wn(e)&&"mrt-row-actions","first"===e.positionExpandColumn&&jn(e)&&"mrt-row-expand",Cn(e)&&"mrt-row-select",yn(e)&&"mrt-row-numbers"].filter(Boolean)}(e),i=function(e){return["last"===e.positionActionsColumn&&wn(e)&&"mrt-row-actions","last"===e.positionExpandColumn&&jn(e)&&"mrt-row-expand",On(e)&&"mrt-row-spacer"].filter(Boolean)}(e),r=Ye(e.columns).map((function(e){return Qe(e)})),a=n?r:Array.from(new Set([].concat(Xe(l),Xe(r))));return a=a.filter((function(e){return!o.includes(e)&&!i.includes(e)})),[].concat(Xe(o),Xe(a),Xe(i))},An=Object.assign({},l.E8),Rn=function(e,n,t,l){var o=(0,r.IL)(e.getValue(n),t,{threshold:r.cG.MATCHES});return l(o),o.passed};Rn.autoRemove=function(e){return!e};var Fn=function(e,n,t){var l;return!!(null===(l=e.getValue(n))||void 0===l?void 0:l.toString().toLowerCase().trim().includes(t.toString().toLowerCase().trim()))};Fn.autoRemove=function(e){return!e};var In=function(e,n,t){var l;return!!(null===(l=e.getValue(n))||void 0===l?void 0:l.toString().toLowerCase().trim().startsWith(t.toString().toLowerCase().trim()))};In.autoRemove=function(e){return!e};var Pn=function(e,n,t){var l;return!!(null===(l=e.getValue(n))||void 0===l?void 0:l.toString().toLowerCase().trim().endsWith(t.toString().toLowerCase().trim()))};Pn.autoRemove=function(e){return!e};var Dn=function(e,n,t){var l;return(null===(l=e.getValue(n))||void 0===l?void 0:l.toString().toLowerCase().trim())===t.toString().toLowerCase().trim()};Dn.autoRemove=function(e){return!e};var Tn=function(e,n,t){var l;return(null===(l=e.getValue(n))||void 0===l?void 0:l.toString().toLowerCase().trim())!==t.toString().toLowerCase().trim()};Tn.autoRemove=function(e){return!e};var zn=function(e,n,t){var l,o,i;return isNaN(+t)||isNaN(+e.getValue(n))?(null===(i=null!==(o=e.getValue(n))&&void 0!==o?o:"")||void 0===i?void 0:i.toString().toLowerCase().trim())>t.toString().toLowerCase().trim():+(null!==(l=e.getValue(n))&&void 0!==l?l:0)>+t};zn.autoRemove=function(e){return!e};var Mn=function(e,n,t){return Dn(e,n,t)||zn(e,n,t)};Mn.autoRemove=function(e){return!e};var kn=function(e,n,t){var l,o,i;return isNaN(+t)||isNaN(+e.getValue(n))?(null===(i=null!==(o=e.getValue(n))&&void 0!==o?o:"")||void 0===i?void 0:i.toString().toLowerCase().trim())<t.toString().toLowerCase().trim():+(null!==(l=e.getValue(n))&&void 0!==l?l:0)<+t};kn.autoRemove=function(e){return!e};var En=function(e,n,t){return Dn(e,n,t)||kn(e,n,t)};En.autoRemove=function(e){return!e};var Vn=function(e,n,t){return(["",void 0].includes(t[0])||zn(e,n,t[0]))&&(!isNaN(+t[0])&&!isNaN(+t[1])&&+t[0]>+t[1]||["",void 0].includes(t[1])||kn(e,n,t[1]))};Vn.autoRemove=function(e){return!e};var Bn=function(e,n,t){return(["",void 0].includes(t[0])||Mn(e,n,t[0]))&&(!isNaN(+t[0])&&!isNaN(+t[1])&&+t[0]>+t[1]||["",void 0].includes(t[1])||En(e,n,t[1]))};Bn.autoRemove=function(e){return!e};var Hn=function(e,n,t){var l;return!(null===(l=e.getValue(n))||void 0===l?void 0:l.toString().trim())};Hn.autoRemove=function(e){return!e};var Ln=function(e,n,t){var l;return!!(null===(l=e.getValue(n))||void 0===l?void 0:l.toString().trim())};Ln.autoRemove=function(e){return!e};var Gn=Object.assign(Object.assign({},l._G),{between:Vn,betweenInclusive:Bn,contains:Fn,empty:Hn,endsWith:Pn,equals:Dn,fuzzy:Rn,greaterThan:zn,greaterThanOrEqualTo:Mn,lessThan:kn,lessThanOrEqualTo:En,notEmpty:Ln,notEquals:Tn,startsWith:In});function Wn(e,n){var t={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&n.indexOf(l)<0&&(t[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(l=Object.getOwnPropertySymbols(e);o<l.length;o++)n.indexOf(l[o])<0&&Object.prototype.propertyIsEnumerable.call(e,l[o])&&(t[l[o]]=e[l[o]])}return t}"function"==typeof SuppressedError&&SuppressedError;var Nn=function(e){var n=e.row,t=e.table,l=e.variant,o=void 0===l?"icon":l,i=Wn(e,["row","table","variant"]),r=t.getState,b=t.options,p=b.icons,m=p.CancelIcon,v=p.SaveIcon,f=b.localization,h=b.onCreatingRowCancel,x=b.onCreatingRowSave,j=b.onEditingRowCancel,w=b.onEditingRowSave,C=t.refs.editInputRefs,y=t.setCreatingRow,O=t.setEditingRow,S=r(),A=S.creatingRow,R=S.editingRow,F=S.isSaving,I=(null==A?void 0:A.id)===n.id,P=(null==R?void 0:R.id)===n.id,D=function(){I?(null==h||h({row:n,table:t}),y(null)):P&&(null==j||j({row:n,table:t}),O(null)),n._valuesCache={}},T=function(){var e,l;null===(l=Object.values(null!==(e=C.current)&&void 0!==e?e:{}).filter((function(e){var t,l;return n.id===(null===(l=null===(t=null==e?void 0:e.name)||void 0===t?void 0:t.split("_"))||void 0===l?void 0:l[0])})))||void 0===l||l.forEach((function(e){void 0!==e.value&&Object.hasOwn(null==n?void 0:n._valuesCache,e.name)&&(n._valuesCache[e.name]=e.value)})),I?null==x||x({exitCreatingMode:function(){return y(null)},row:n,table:t,values:n._valuesCache}):P&&(null==w||w({exitEditingMode:function(){return O(null)},row:n,table:t,values:null==n?void 0:n._valuesCache}))};return(0,a.jsx)(c.A,{onClick:function(e){return e.stopPropagation()},sx:function(e){return Object.assign({display:"flex",gap:"0.75rem"},on(null==i?void 0:i.sx,e))},children:"icon"===o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.A,{title:f.cancel,children:(0,a.jsx)(s.A,{"aria-label":f.cancel,onClick:D,children:(0,a.jsx)(m,{})})}),(I&&x||P&&w)&&(0,a.jsx)(u.A,{title:f.save,children:(0,a.jsx)(s.A,{"aria-label":f.save,color:"info",disabled:F,onClick:T,children:F?(0,a.jsx)(g.A,{size:18}):(0,a.jsx)(v,{})})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.A,{onClick:D,sx:{minWidth:"100px"},children:f.cancel}),(0,a.jsxs)(d.A,{disabled:F,onClick:T,sx:{minWidth:"100px"},variant:"contained",children:[F&&(0,a.jsx)(g.A,{color:"inherit",size:18}),f.save]})]})})},qn=function(e){return e.replace(/[^a-zA-Z0-9]/g,"_")},Kn={content:'""',height:"100%",left:0,position:"absolute",top:0,width:"100%",zIndex:-1},Un=function(e){var n=e.column,t=e.table,l=e.theme,o=t.options.mrtTheme.baseBackgroundColor,i=null==n?void 0:n.getIsPinned();return{'&[data-pinned="true"]':{"&:before":Object.assign({backgroundColor:(0,b.X4)((0,b.e$)(o,"dark"===l.palette.mode?.05:.01),.97),boxShadow:n?"left"===i&&n.getIsLastColumn(i)?"-4px 0 4px -4px ".concat((0,b.X4)(l.palette.grey[700],.5)," inset"):"right"===i&&n.getIsFirstColumn(i)?"4px 0 4px -4px ".concat((0,b.X4)(l.palette.grey[700],.5)," inset"):void 0:void 0},Kn)}}},_n=function(e){var n,t,l,o,i,r,a=e.column,s=e.header,u=e.table,c=e.tableCellProps,d=e.theme,g=u.getState,b=u.options,p=b.enableColumnVirtualization,m=b.layoutMode,v=g().draggingColumn,f=a.columnDef,h=f.columnDefType,x="group"!==f.columnDefType&&a.getIsPinned(),j={minWidth:"max(calc(var(--".concat(s?"header":"col","-").concat(qn(null!==(n=null==s?void 0:s.id)&&void 0!==n?n:a.id),"-size) * 1px), ").concat(null!==(t=f.minSize)&&void 0!==t?t:30,"px)"),width:"calc(var(--".concat(s?"header":"col","-").concat(qn(null!==(l=null==s?void 0:s.id)&&void 0!==l?l:a.id),"-size) * 1px)")};"grid"===m?j.flex="".concat([0,!1].includes(f.grow)?0:"var(--".concat(s?"header":"col","-").concat(qn(null!==(o=null==s?void 0:s.id)&&void 0!==o?o:a.id),"-size)")," 0 auto"):"grid-no-grow"===m&&(j.flex="".concat(+(f.grow||0)," 0 auto"));var w=x?Object.assign(Object.assign({},Un({column:a,table:u,theme:d})),{left:"left"===x?"".concat(a.getStart("left"),"px"):void 0,opacity:.97,position:"sticky",right:"right"===x?"".concat(a.getAfter("right"),"px"):void 0}):{};return Object.assign(Object.assign(Object.assign({backgroundColor:"inherit",backgroundImage:"inherit",display:(null==m?void 0:m.startsWith("grid"))?"flex":void 0,justifyContent:"group"===h?"center":(null==m?void 0:m.startsWith("grid"))?c.align:void 0,opacity:(null===(i=u.getState().draggingColumn)||void 0===i?void 0:i.id)===a.id||(null===(r=u.getState().hoveredColumn)||void 0===r?void 0:r.id)===a.id?.5:1,position:"relative",transition:p?"none":"padding 150ms ease-in-out",zIndex:a.getIsResizing()||(null==v?void 0:v.id)===a.id?2:"group"!==h&&x?1:0,"&:focus-visible":{outline:"2px solid ".concat(u.options.mrtTheme.cellNavigationOutlineColor),outlineOffset:"-2px"}},w),j),on(null==c?void 0:c.sx,d))},Xn=function(e){return{alignItems:"flex-start",backgroundColor:e.table.options.mrtTheme.baseBackgroundColor,display:"grid",flexWrap:"wrap-reverse",minHeight:"3.5rem",overflow:"hidden",position:"relative",transition:"all 150ms ease-in-out",zIndex:1}},Zn=function(e){return"rtl"===e.direction?{style:{transform:"scaleX(-1)"}}:void 0},$n=function(e){return{disableInteractive:!0,enterDelay:1e3,enterNextDelay:1e3,placement:e}},Qn=function(e){var n=e.icon,t=e.label,l=e.onOpenSubMenu,o=e.table,i=Wn(e,["icon","label","onOpenSubMenu","table"]),r=o.options.icons.ArrowRightIcon;return(0,a.jsxs)(f.A,Object.assign({sx:{alignItems:"center",justifyContent:"space-between",minWidth:"120px",my:0,py:"6px"},tabIndex:0},i,{children:[(0,a.jsxs)(c.A,{sx:{alignItems:"center",display:"flex"},children:[(0,a.jsx)(v.A,{children:n}),t]}),l&&(0,a.jsx)(s.A,{onClick:l,onMouseEnter:l,size:"small",sx:{p:0},children:(0,a.jsx)(r,{})})]}))},Yn=function(e){var n=e.anchorEl,t=e.handleEdit,l=e.row,o=e.setAnchorEl,r=e.staticRowIndex,s=e.table,u=Wn(e,["anchorEl","handleEdit","row","setAnchorEl","staticRowIndex","table"]),c=s.getState,d=s.options,g=d.editDisplayMode,b=d.enableEditing,p=d.icons.EditIcon,v=d.localization,f=d.mrtTheme.menuBackgroundColor,h=d.renderRowActionMenuItems,x=c().density,j=(0,i.useMemo)((function(){var e=[],n=on(b,l)&&["modal","row"].includes(g)&&(0,a.jsx)(Qn,{icon:(0,a.jsx)(p,{}),label:v.edit,onClick:t,table:s},"edit");n&&e.push(n);var i=null==h?void 0:h({closeMenu:function(){return o(null)},row:l,staticRowIndex:r,table:s});return(null==i?void 0:i.length)&&e.push.apply(e,Xe(i)),e}),[h,l,r,s]);return j.length?(0,a.jsx)(m.A,Object.assign({MenuListProps:{dense:"compact"===x,sx:{backgroundColor:f}},anchorEl:n,disableScrollLock:!0,onClick:function(e){return e.stopPropagation()},onClose:function(){return o(null)},open:!!n},u,{children:j})):null},Jn={"&:hover":{opacity:1},height:"2rem",ml:"10px",opacity:.5,transition:"opacity 150ms",width:"2rem"},et=function(e){var n,t=e.cell,l=e.row,o=e.staticRowIndex,r=e.table,c=Wn(e,["cell","row","staticRowIndex","table"]),d=r.getState,g=r.options,b=g.createDisplayMode,p=g.editDisplayMode,m=g.enableEditing,v=g.icons,f=v.EditIcon,h=v.MoreHorizIcon,x=g.localization,j=g.renderRowActionMenuItems,w=g.renderRowActions,C=r.setEditingRow,y=d(),O=y.creatingRow,S=y.editingRow,A=(null==O?void 0:O.id)===l.id,R=(null==S?void 0:S.id)===l.id,F=A&&"row"===b||R&&"row"===p,I=Ke((0,i.useState)(null),2),P=I[0],D=I[1],T=function(e){e.stopPropagation(),C(Object.assign({},l)),D(null)};return(0,a.jsx)(a.Fragment,{children:w&&!F?w({cell:t,row:l,staticRowIndex:o,table:r}):F?(0,a.jsx)(Nn,{row:l,table:r}):!j&&on(m,l)&&["modal","row"].includes(p)?(0,a.jsx)(u.A,{placement:"right",title:x.edit,children:(0,a.jsx)(s.A,Object.assign({"aria-label":x.edit,onClick:T,sx:Jn},c,{children:(0,a.jsx)(f,{})}))}):(null===(n=null==j?void 0:j({row:l,staticRowIndex:o,table:r}))||void 0===n?void 0:n.length)?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.A,Object.assign({},$n(),{title:x.rowActions,children:(0,a.jsx)(s.A,Object.assign({"aria-label":x.rowActions,onClick:function(e){e.stopPropagation(),e.preventDefault(),D(e.currentTarget)},size:"small",sx:Jn},c,{children:(0,a.jsx)(h,{})}))})),(0,a.jsx)(Yn,{anchorEl:P,handleEdit:T,row:l,setAnchorEl:D,staticRowIndex:o,table:r})]}):null})},nt=function(e){return Object.assign({Cell:function(e){var n=e.cell,t=e.row,l=e.staticRowIndex,o=e.table;return(0,a.jsx)(et,{cell:n,row:t,staticRowIndex:l,table:o})}},fn({header:"actions",id:"mrt-row-actions",size:70,tableOptions:e}))},tt=function(e){var n,t,l=e.location,o=e.table,i=Wn(e,["location","table"]),r=o.options,c=r.icons.DragHandleIcon,d=r.localization;return(0,a.jsx)(u.A,Object.assign({},$n("top"),{title:null!==(n=null==i?void 0:i.title)&&void 0!==n?n:d.move,children:(0,a.jsx)(s.A,Object.assign({"aria-label":null!==(t=i.title)&&void 0!==t?t:d.move,disableRipple:!0,draggable:"true",size:"small"},i,{onClick:function(e){var n;e.stopPropagation(),null===(n=null==i?void 0:i.onClick)||void 0===n||n.call(i,e)},sx:function(e){return Object.assign({"&:active":{cursor:"grabbing"},"&:hover":{backgroundColor:"transparent",opacity:1},cursor:"grab",m:"0 -0.1rem",opacity:"row"===l?1:.5,p:"2px",transition:"all 150ms ease-in-out"},on(null==i?void 0:i.sx,e))},title:void 0,children:(0,a.jsx)(c,{})}))}))},lt=function(e){var n=e.row,t=e.rowRef,l=e.table,o=Wn(e,["row","rowRef","table"]),i=l.options.muiRowDragHandleProps,r=Object.assign(Object.assign({},on(i,{row:n,table:l})),o);return(0,a.jsx)(tt,Object.assign({},r,{location:"row",onDragEnd:function(e){var n;null===(n=null==r?void 0:r.onDragEnd)||void 0===n||n.call(r,e),l.setDraggingRow(null),l.setHoveredRow(null)},onDragStart:function(e){var o;null===(o=null==r?void 0:r.onDragStart)||void 0===o||o.call(r,e);try{e.dataTransfer.setDragImage(t.current,0,0)}catch(e){console.error(e)}l.setDraggingRow(n)},table:l}))},ot=function(e){return Object.assign({Cell:function(e){var n=e.row,t=e.rowRef,l=e.table;return(0,a.jsx)(lt,{row:n,rowRef:t,table:l})},grow:!1},fn({header:"move",id:"mrt-row-drag",size:60,tableOptions:e}))},it=function(e){var n,t,l=e.table,o=Wn(e,["table"]),i=l.getCanSomeRowsExpand,r=l.getIsAllRowsExpanded,c=l.getIsSomeRowsExpanded,d=l.getState,g=l.options,b=g.icons.KeyboardDoubleArrowDownIcon,p=g.localization,m=g.muiExpandAllButtonProps,v=g.renderDetailPanel,f=l.toggleAllRowsExpanded,h=d(),x=h.density,j=h.isLoading,w=Object.assign(Object.assign({},on(m,{table:l})),o),C=r();return(0,a.jsx)(u.A,Object.assign({},$n(),{title:null!==(n=null==w?void 0:w.title)&&void 0!==n?n:C?p.collapseAll:p.expandAll,children:(0,a.jsx)("span",{children:(0,a.jsx)(s.A,Object.assign({"aria-label":p.expandAll,disabled:j||!v&&!i(),onClick:function(){return f(!C)}},w,{sx:function(e){return Object.assign({height:"compact"===x?"1.75rem":"2.25rem",mt:"compact"!==x?"-0.25rem":void 0,width:"compact"===x?"1.75rem":"2.25rem"},on(null==w?void 0:w.sx,e))},title:void 0,children:null!==(t=null==w?void 0:w.children)&&void 0!==t?t:(0,a.jsx)(b,{style:{transform:"rotate(".concat(C?-180:c()?-90:0,"deg)"),transition:"transform 150ms"}})}))})}))},rt=function(e){var n,t,l=e.row,o=e.staticRowIndex,i=e.table,r=(0,p.A)(),c=i.getState,d=i.options,g=d.icons.ExpandMoreIcon,b=d.localization,m=d.muiExpandButtonProps,v=d.positionExpandColumn,f=d.renderDetailPanel,h=c().density,x=on(m,{row:l,staticRowIndex:o,table:i}),j=l.getCanExpand(),w=l.getIsExpanded(),C=!!(null==f?void 0:f({row:l,table:i}));return(0,a.jsx)(u.A,Object.assign({disableHoverListener:!j&&!C},$n(),{title:null!==(n=null==x?void 0:x.title)&&void 0!==n?n:w?b.collapse:b.expand,children:(0,a.jsx)("span",{children:(0,a.jsx)(s.A,Object.assign({"aria-label":b.expand,disabled:!j&&!C},x,{onClick:function(e){var n;e.stopPropagation(),l.toggleExpanded(),null===(n=null==x?void 0:x.onClick)||void 0===n||n.call(x,e)},sx:function(e){return Object.assign(_e(_e({height:"compact"===h?"1.75rem":"2.25rem",opacity:j||C?1:.3},"rtl"===e.direction||"last"===v?"mr":"ml","".concat(16*l.depth,"px")),"width","compact"===h?"1.75rem":"2.25rem"),on(null==x?void 0:x.sx,e))},title:void 0,children:null!==(t=null==x?void 0:x.children)&&void 0!==t?t:(0,a.jsx)(g,{style:{transform:"rotate(".concat(j||f?w?-180:0:"last"===v||"rtl"===r.direction?90:-90,"deg)"),transition:"transform 150ms"}})}))})}))},at=function(e){var n,t=e.defaultColumn,l=e.enableExpandAll,o=e.groupedColumnMode,i=e.positionExpandColumn,r=e.renderDetailPanel,s=e.state.grouping,c="last"===i?{align:"right"}:void 0;return Object.assign({Cell:function(e){var n,t,l,i=e.cell,r=e.column,s=e.row,c=e.staticRowIndex,d=e.table,g={row:s,staticRowIndex:c,table:d},b=null===(n=s.subRows)||void 0===n?void 0:n.length;return"remove"===o&&s.groupingColumnId?(0,a.jsxs)(h.A,{alignItems:"center",flexDirection:"row",gap:"0.25rem",children:[(0,a.jsx)(rt,Object.assign({},g)),(0,a.jsx)(u.A,Object.assign({},$n("right"),{title:d.getColumn(s.groupingColumnId).columnDef.header,children:(0,a.jsx)("span",{children:s.groupingValue})})),!!b&&(0,a.jsxs)("span",{children:["(",b,")"]})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(rt,Object.assign({},g)),null===(l=(t=r.columnDef).GroupedCell)||void 0===l?void 0:l.call(t,{cell:i,column:r,row:s,table:d})]})},Header:l?function(e){var n,t=e.table;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(it,{table:t}),"remove"===o&&(null===(n=null==s?void 0:s.map((function(e){return t.getColumn(e).columnDef.header})))||void 0===n?void 0:n.join(", "))]})}:void 0,muiTableBodyCellProps:c,muiTableHeadCellProps:c},fn({header:"expand",id:"mrt-row-expand",size:"remove"===o?null!==(n=null==t?void 0:t.size)&&void 0!==n?n:180:r?l?60:70:100,tableOptions:e}))},st=function(e){var n=e.localization,t=e.rowNumberDisplayMode,l=e.state.pagination,o=l.pageIndex,i=l.pageSize;return Object.assign({Cell:function(e){var n,l=e.row,r=e.staticRowIndex;return(null!==(n="static"===t?(r||0)+(i||0)*(o||0):l.index)&&void 0!==n?n:0)+1},Header:function(){return n.rowNumber},grow:!1},fn({header:"rowNumbers",id:"mrt-row-numbers",size:50,tableOptions:e}))},ut=function(e){var n=e.pinningPosition,t=e.row,l=e.table,o=Wn(e,["pinningPosition","row","table"]),r=l.options,c=r.icons,d=c.CloseIcon,g=c.PushPinIcon,b=r.localization,p=r.rowPinningDisplayMode,m=t.getIsPinned(),v=Ke((0,i.useState)(!1),2),f=v[0],h=v[1];return(0,a.jsx)(u.A,Object.assign({},$n(),{open:f,title:m?b.unpin:b.pin,children:(0,a.jsx)(s.A,Object.assign({"aria-label":b.pin,onBlur:function(){return h(!1)},onClick:function(e){h(!1),e.stopPropagation(),t.pin(!m&&n)},onFocus:function(){return h(!0)},onMouseEnter:function(){return h(!0)},onMouseLeave:function(){return h(!1)},size:"small"},o,{sx:function(e){return Object.assign({height:"24px",width:"24px"},on(null==o?void 0:o.sx,e))},children:m?(0,a.jsx)(d,{}):(0,a.jsx)(g,{fontSize:"small",style:{transform:"rotate(".concat("sticky"===p?135:"top"===n?180:0,"deg)")}})}))}))},ct=function(e){var n=e.row,t=e.table,l=Wn(e,["row","table"]),o=t.getState,i=t.options,r=i.enableRowPinning,s=i.rowPinningDisplayMode,u=o().density;if(!on(r,n))return null;var d=Object.assign({row:n,table:t},l);return"top-and-bottom"!==s||n.getIsPinned()?(0,a.jsx)(ut,Object.assign({pinningPosition:"bottom"===s?"bottom":"top"},d)):(0,a.jsxs)(c.A,{sx:{display:"flex",flexDirection:"compact"===u?"row":"column"},children:[(0,a.jsx)(ut,Object.assign({pinningPosition:"top"},d)),(0,a.jsx)(ut,Object.assign({pinningPosition:"bottom"},d))]})},dt=function(e){var n,t=e.row,l=e.staticRowIndex,o=e.table,i=Wn(e,["row","staticRowIndex","table"]),r=o.getState,s=o.options,c=s.enableMultiRowSelection,d=s.localization,g=s.muiSelectAllCheckboxProps,b=s.muiSelectCheckboxProps,p=s.selectAllMode,m=r(),v=m.density,f=m.isLoading,h=!t,w=h?"page"===p?o.getIsAllPageRowsSelected():o.getIsAllRowsSelected():void 0,C=h?w:cn({row:t,table:o}),y=Object.assign(Object.assign({},h?on(g,{table:o}):on(b,{row:t,staticRowIndex:l,table:o})),i),O=t?dn({row:t,staticRowIndex:l,table:o}):void 0,S=gn({table:o}),A=Object.assign(Object.assign({"aria-label":h?d.toggleSelectAll:d.toggleSelectRow,checked:C,disabled:f||t&&!t.getCanSelect()||"mrt-row-create"===(null==t?void 0:t.id),inputProps:{"aria-label":h?d.toggleSelectAll:d.toggleSelectRow},onChange:function(e){e.stopPropagation(),h?S(e):O(e)},size:"compact"===v?"small":"medium"},y),{onClick:function(e){var n;e.stopPropagation(),null===(n=null==y?void 0:y.onClick)||void 0===n||n.call(y,e)},sx:function(e){return Object.assign({height:"compact"===v?"1.75rem":"2.5rem",m:"compact"!==v?"-0.4rem":void 0,width:"compact"===v?"1.75rem":"2.5rem",zIndex:0},on(null==y?void 0:y.sx,e))},title:void 0});return(0,a.jsx)(u.A,Object.assign({},$n(),{title:null!==(n=null==y?void 0:y.title)&&void 0!==n?n:h?d.toggleSelectAll:d.toggleSelectRow,children:!1===c?(0,a.jsx)(j.A,Object.assign({},A)):(0,a.jsx)(x.A,Object.assign({indeterminate:!C&&h?o.getIsSomeRowsSelected():(null==t?void 0:t.getIsSomeSelected())&&t.getCanSelectSubRows()},A))}))},gt=function(e){var n=e.enableMultiRowSelection,t=e.enableSelectAll;return Object.assign({Cell:function(e){var n=e.row,t=e.staticRowIndex,l=e.table;return(0,a.jsx)(dt,{row:n,staticRowIndex:t,table:l})},Header:t&&n?function(e){var n=e.table;return(0,a.jsx)(dt,{table:n})}:void 0,grow:!1},fn({header:"select",id:"mrt-row-select",size:t?60:70,tableOptions:e}))},bt={ArrowDownwardIcon:w.A,ArrowRightIcon:C.A,CancelIcon:y.A,ChevronLeftIcon:O.A,ChevronRightIcon:S.A,ClearAllIcon:A.A,CloseIcon:R.A,ContentCopy:F.A,DensityLargeIcon:I.A,DensityMediumIcon:P.A,DensitySmallIcon:D.A,DragHandleIcon:T.A,DynamicFeedIcon:z.A,EditIcon:M.A,ExpandMoreIcon:k.A,FilterAltIcon:E.A,FilterListIcon:V.A,FilterListOffIcon:B.A,FirstPageIcon:H.A,FullscreenExitIcon:G.A,FullscreenIcon:L.A,KeyboardDoubleArrowDownIcon:W.A,LastPageIcon:N.A,MoreHorizIcon:q.A,MoreVertIcon:K.A,PushPinIcon:U.A,RestartAltIcon:_.A,SaveIcon:X.A,SearchIcon:Z.A,SearchOffIcon:$.A,SortIcon:Q.A,SyncAltIcon:Y.A,ViewColumnIcon:J.A,VisibilityOffIcon:ee.A},pt={language:"en",actions:"Actions",and:"and",cancel:"Cancel",changeFilterMode:"Change filter mode",changeSearchMode:"Change search mode",clearFilter:"Clear filter",clearSearch:"Clear search",clearSelection:"Clear selection",clearSort:"Clear sort",clickToCopy:"Click to copy",copy:"Copy",collapse:"Collapse",collapseAll:"Collapse all",columnActions:"Column Actions",copiedToClipboard:"Copied to clipboard",dropToGroupBy:"Drop to group by {column}",edit:"Edit",expand:"Expand",expandAll:"Expand all",filterArrIncludes:"Includes",filterArrIncludesAll:"Includes all",filterArrIncludesSome:"Includes",filterBetween:"Between",filterBetweenInclusive:"Between Inclusive",filterByColumn:"Filter by {column}",filterContains:"Contains",filterEmpty:"Empty",filterEndsWith:"Ends With",filterEquals:"Equals",filterEqualsString:"Equals",filterFuzzy:"Fuzzy",filterGreaterThan:"Greater Than",filterGreaterThanOrEqualTo:"Greater Than Or Equal To",filterInNumberRange:"Between",filterIncludesString:"Contains",filterIncludesStringSensitive:"Contains",filterLessThan:"Less Than",filterLessThanOrEqualTo:"Less Than Or Equal To",filterMode:"Filter Mode: {filterType}",filterNotEmpty:"Not Empty",filterNotEquals:"Not Equals",filterStartsWith:"Starts With",filterWeakEquals:"Equals",filteringByColumn:"Filtering by {column} - {filterType} {filterValue}",goToFirstPage:"Go to first page",goToLastPage:"Go to last page",goToNextPage:"Go to next page",goToPreviousPage:"Go to previous page",grab:"Grab",groupByColumn:"Group by {column}",groupedBy:"Grouped by ",hideAll:"Hide all",hideColumn:"Hide {column} column",max:"Max",min:"Min",move:"Move",noRecordsToDisplay:"No records to display",noResultsFound:"No results found",of:"of",or:"or",pin:"Pin",pinToLeft:"Pin to left",pinToRight:"Pin to right",resetColumnSize:"Reset column size",resetOrder:"Reset order",rowActions:"Row Actions",rowNumber:"#",rowNumbers:"Row Numbers",rowsPerPage:"Rows per page",save:"Save",search:"Search",selectedCountOfRowCountRowsSelected:"{selectedCount} of {rowCount} row(s) selected",select:"Select",showAll:"Show all",showAllColumns:"Show all columns",showHideColumns:"Show/Hide columns",showHideFilters:"Show/Hide filters",showHideSearch:"Show/Hide search",sortByColumnAsc:"Sort by {column} ascending",sortByColumnDesc:"Sort by {column} descending",sortedByColumnAsc:"Sorted by {column} ascending",sortedByColumnDesc:"Sorted by {column} descending",thenBy:", then by ",toggleDensity:"Toggle density",toggleFullScreen:"Toggle full screen",toggleSelectAll:"Toggle select all",toggleSelectRow:"Toggle select row",toggleVisibility:"Toggle visibility",ungroupByColumn:"Ungroup by {column}",unpin:"Unpin",unpinAll:"Unpin all"},mt={filterVariant:"text",maxSize:1e3,minSize:40,size:180},vt={columnDefType:"display",enableClickToCopy:!1,enableColumnActions:!1,enableColumnDragging:!1,enableColumnFilter:!1,enableColumnOrdering:!1,enableEditing:!1,enableGlobalFilter:!1,enableGrouping:!1,enableHiding:!1,enableResizing:!1,enableSorting:!1},ft={children:null,sx:{minWidth:0,p:0,width:0}},ht=function(e){return Object.assign(Object.assign(Object.assign(Object.assign({},fn({id:"mrt-row-spacer",size:0,tableOptions:e})),{grow:!0}),vt),{muiTableBodyCellProps:ft,muiTableFooterCellProps:ft,muiTableHeadCellProps:ft})},xt=function(e){return function(e){var n,t,r,s,u,c,d,g,b,p,m,v,f,h,x,j,w,C,y,O,S,A,R,F,I,P,D,T,z,M,k,E,V,B,H,L=(0,i.useRef)(null),G=(0,i.useRef)(null),W=(0,i.useRef)(null),N=(0,i.useRef)({}),q=(0,i.useRef)({}),K=(0,i.useRef)(null),U=(0,i.useRef)(null),_=(0,i.useRef)({}),X=(0,i.useRef)(null),Z=(0,i.useRef)(null),$=(0,i.useRef)(null),Q=(0,i.useRef)(null),Y=(0,i.useMemo)((function(){var n,t,l,o=null!==(n=e.initialState)&&void 0!==n?n:{};return o.columnOrder=null!==(t=o.columnOrder)&&void 0!==t?t:Sn(Object.assign(Object.assign({},e),{state:Object.assign(Object.assign({},e.initialState),e.state)})),o.globalFilterFn=null!==(l=e.globalFilterFn)&&void 0!==l?l:"fuzzy",o}),[]);e.initialState=Y;var J=Ke((0,i.useState)(null!==(n=Y.actionCell)&&void 0!==n?n:null),2),ee=J[0],ne=J[1],te=Ke((0,i.useState)(null!==(t=Y.creatingRow)&&void 0!==t?t:null),2),le=te[0],oe=te[1],ie=Ke((0,i.useState)((function(){return Object.assign.apply(Object,[{}].concat(Xe(Ye(e.columns).map((function(e){var n,t,l,o,i;return _e({},Qe(e),e.filterFn instanceof Function?null!==(n=e.filterFn.name)&&void 0!==n?n:"custom":null!==(o=null!==(t=e.filterFn)&&void 0!==t?t:null===(l=null==Y?void 0:Y.columnFilterFns)||void 0===l?void 0:l[Qe(e)])&&void 0!==o?o:"multi-select"===(i=e.filterVariant)?"arrIncludesSome":(null==i?void 0:i.includes("range"))?"betweenInclusive":"select"===i||"checkbox"===i?"equals":"fuzzy")})))))})),2),re=ie[0],ae=ie[1],se=Ke((0,i.useState)(null!==(r=Y.columnOrder)&&void 0!==r?r:[]),2),ue=se[0],ce=se[1],de=Ke((0,i.useState)(null!==(s=Y.columnSizingInfo)&&void 0!==s?s:{}),2),ge=de[0],be=de[1],pe=Ke((0,i.useState)(null!==(u=null==Y?void 0:Y.density)&&void 0!==u?u:"comfortable"),2),me=pe[0],ve=pe[1],fe=Ke((0,i.useState)(null!==(c=Y.draggingColumn)&&void 0!==c?c:null),2),he=fe[0],xe=fe[1],je=Ke((0,i.useState)(null!==(d=Y.draggingRow)&&void 0!==d?d:null),2),we=je[0],Ce=je[1],ye=Ke((0,i.useState)(null!==(g=Y.editingCell)&&void 0!==g?g:null),2),Oe=ye[0],Se=ye[1],Ae=Ke((0,i.useState)(null!==(b=Y.editingRow)&&void 0!==b?b:null),2),Re=Ae[0],Fe=Ae[1],Ie=Ke((0,i.useState)(null!==(p=Y.globalFilterFn)&&void 0!==p?p:"fuzzy"),2),Pe=Ie[0],De=Ie[1],Te=Ke((0,i.useState)(null!==(m=Y.grouping)&&void 0!==m?m:[]),2),ze=Te[0],Me=Te[1],ke=Ke((0,i.useState)(null!==(v=Y.hoveredColumn)&&void 0!==v?v:null),2),Ee=ke[0],Ve=ke[1],Be=Ke((0,i.useState)(null!==(f=Y.hoveredRow)&&void 0!==f?f:null),2),He=Be[0],Le=Be[1],Ge=Ke((0,i.useState)(null!==(h=null==Y?void 0:Y.isFullScreen)&&void 0!==h&&h),2),We=Ge[0],Ne=Ge[1],qe=Ke((0,i.useState)(null!==(x=null==Y?void 0:Y.pagination)&&void 0!==x?x:{pageIndex:0,pageSize:10}),2),Ue=qe[0],Ze=qe[1],$e=Ke((0,i.useState)(null!==(j=null==Y?void 0:Y.showAlertBanner)&&void 0!==j&&j),2),en=$e[0],nn=$e[1],tn=Ke((0,i.useState)(null!==(w=null==Y?void 0:Y.showColumnFilters)&&void 0!==w&&w),2),ln=tn[0],on=tn[1],rn=Ke((0,i.useState)(null!==(C=null==Y?void 0:Y.showGlobalFilter)&&void 0!==C&&C),2),an=rn[0],un=rn[1],cn=Ke((0,i.useState)(null!==(y=null==Y?void 0:Y.showToolbarDropZone)&&void 0!==y&&y),2),dn=cn[0],gn=cn[1];e.state=Object.assign({actionCell:ee,columnFilterFns:re,columnOrder:ue,columnSizingInfo:ge,creatingRow:le,density:me,draggingColumn:he,draggingRow:we,editingCell:Oe,editingRow:Re,globalFilterFn:Pe,grouping:ze,hoveredColumn:Ee,hoveredRow:He,isFullScreen:We,pagination:Ue,showAlertBanner:en,showColumnFilters:ln,showGlobalFilter:an,showToolbarDropZone:dn},e.state);var bn,pn=e,mn=(0,i.useRef)([]);pn.columns=pn.state.columnSizingInfo.isResizingColumn||pn.state.draggingColumn||pn.state.draggingRow?mn.current:Je({columnDefs:[].concat(Xe([hn(pn)&&(bn=pn,Object.assign({Cell:function(e){var n=e.row,t=e.table;return(0,a.jsx)(ct,{row:n,table:t})},grow:!1},fn({header:"pin",id:"mrt-row-pin",size:60,tableOptions:bn}))),xn(pn)&&ot(pn),wn(pn)&&nt(pn),jn(pn)&&at(pn),Cn(pn)&&gt(pn),yn(pn)&&st(pn)].filter(Boolean)),Xe(pn.columns),Xe([On(pn)&&ht(pn)].filter(Boolean))),tableOptions:pn}),mn.current=pn.columns,pn.data=(0,i.useMemo)((function(){return!pn.state.isLoading&&!pn.state.showSkeletons||pn.data.length?pn.data:Xe(Array(Math.min(pn.state.pagination.pageSize,20)).fill(null)).map((function(){return Object.assign.apply(Object,[{}].concat(Xe(Ye(pn.columns).map((function(e){return _e({},Qe(e),null)})))))}))}),[pn.data,pn.state.isLoading,pn.state.showSkeletons]);var vn=(0,o.N4)(Object.assign(Object.assign({onColumnOrderChange:ce,onColumnSizingInfoChange:be,onGroupingChange:Me,onPaginationChange:Ze},pn),{globalFilterFn:null===(O=pn.filterFns)||void 0===O?void 0:O[null!=Pe?Pe:"fuzzy"]}));return vn.refs={actionCellRef:G,bottomToolbarRef:W,editInputRefs:N,filterInputRefs:q,lastSelectedRowId:L,searchInputRef:K,tableContainerRef:U,tableFooterRef:Q,tableHeadCellRefs:_,tableHeadRef:$,tablePaperRef:X,topToolbarRef:Z},vn.setActionCell=null!==(S=pn.onActionCellChange)&&void 0!==S?S:ne,vn.setCreatingRow=function(e){var n,t,o=e;!0===e&&(o=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4?arguments[4]:void 0,r=arguments.length>5?arguments[5]:void 0;return(0,l.Rv)(e,"mrt-row-create",null!=n?n:Object.assign.apply(Object,[{}].concat(Xe(Ye(e.options.columns).map((function(e){return _e({},Qe(e),"")}))))),t,o,i,r)}(vn)),null!==(t=null===(n=null==pn?void 0:pn.onCreatingRowChange)||void 0===n?void 0:n.call(pn,o))&&void 0!==t||oe(o)},vn.setColumnFilterFns=null!==(A=pn.onColumnFilterFnsChange)&&void 0!==A?A:ae,vn.setDensity=null!==(R=pn.onDensityChange)&&void 0!==R?R:ve,vn.setDraggingColumn=null!==(F=pn.onDraggingColumnChange)&&void 0!==F?F:xe,vn.setDraggingRow=null!==(I=pn.onDraggingRowChange)&&void 0!==I?I:Ce,vn.setEditingCell=null!==(P=pn.onEditingCellChange)&&void 0!==P?P:Se,vn.setEditingRow=null!==(D=pn.onEditingRowChange)&&void 0!==D?D:Fe,vn.setGlobalFilterFn=null!==(T=pn.onGlobalFilterFnChange)&&void 0!==T?T:De,vn.setHoveredColumn=null!==(z=pn.onHoveredColumnChange)&&void 0!==z?z:Ve,vn.setHoveredRow=null!==(M=pn.onHoveredRowChange)&&void 0!==M?M:Le,vn.setIsFullScreen=null!==(k=pn.onIsFullScreenChange)&&void 0!==k?k:Ne,vn.setShowAlertBanner=null!==(E=pn.onShowAlertBannerChange)&&void 0!==E?E:nn,vn.setShowColumnFilters=null!==(V=pn.onShowColumnFiltersChange)&&void 0!==V?V:on,vn.setShowGlobalFilter=null!==(B=pn.onShowGlobalFilterChange)&&void 0!==B?B:un,vn.setShowToolbarDropZone=null!==(H=pn.onShowToolbarDropZoneChange)&&void 0!==H?H:gn,function(e){var n=e.getIsSomeRowsPinned,t=e.getPrePaginationRowModel,l=e.getState,o=e.options,r=o.enablePagination,a=o.enableRowPinning,s=o.rowCount,u=l(),c=u.columnOrder,d=u.density,g=u.globalFilter,b=u.isFullScreen,p=u.isLoading,m=u.pagination,v=u.showSkeletons,f=u.sorting,h=e.options.columns.length,x=null!=s?s:t().rows.length,j=(0,i.useReducer)((function(){return{}}),{})[1],w=(0,i.useRef)(null),C=(0,i.useRef)(null);(0,i.useEffect)((function(){"undefined"!=typeof window&&(w.current=document.body.style.height)}),[]),(0,i.useEffect)((function(){if("undefined"!=typeof window)if(b)C.current=document.body.getBoundingClientRect().top,document.body.style.height="100dvh";else{if(document.body.style.height=w.current,!C.current)return;window.scrollTo({behavior:"instant",top:-1*C.current})}}),[b]),(0,i.useEffect)((function(){h!==c.length&&e.setColumnOrder(Sn(e.options))}),[h]),(0,i.useEffect)((function(){if(r&&!p&&!v){var n=m.pageIndex,t=m.pageSize,l=x>0?Math.ceil(x/t):1;(n<0||n>=l)&&e.setPageIndex(l-1)}}),[x,r,p,v]);var y=(0,i.useRef)(f);(0,i.useEffect)((function(){f.length&&(y.current=f)}),[f]),(0,i.useEffect)((function(){sn(e)&&(g?e.setSorting([]):e.setSorting((function(){return y.current||[]})))}),[g]),(0,i.useEffect)((function(){a&&n()&&setTimeout((function(){j()}),150)}),[d])}(vn),vn}(function(e){var n,t=e.aggregationFns,o=e.autoResetExpanded,r=void 0!==o&&o,a=e.columnFilterDisplayMode,s=void 0===a?"subheader":a,u=e.columnResizeDirection,c=e.columnResizeMode,d=void 0===c?"onChange":c,g=e.createDisplayMode,m=void 0===g?"modal":g,v=e.defaultColumn,f=e.defaultDisplayColumn,h=e.editDisplayMode,x=void 0===h?"modal":h,j=e.enableBatchRowSelection,w=void 0===j||j,C=e.enableBottomToolbar,y=void 0===C||C,O=e.enableColumnActions,S=void 0===O||O,A=e.enableColumnFilters,R=void 0===A||A,F=e.enableColumnOrdering,I=void 0!==F&&F,P=e.enableColumnPinning,D=void 0!==P&&P,T=e.enableColumnResizing,z=void 0!==T&&T,M=e.enableColumnVirtualization,k=e.enableDensityToggle,E=void 0===k||k,V=e.enableExpandAll,B=void 0===V||V,H=e.enableExpanding,L=e.enableFacetedValues,G=void 0!==L&&L,W=e.enableFilterMatchHighlighting,N=void 0===W||W,q=e.enableFilters,K=void 0===q||q,U=e.enableFullScreenToggle,_=void 0===U||U,X=e.enableGlobalFilter,Z=void 0===X||X,$=e.enableGlobalFilterRankedResults,Q=void 0===$||$,Y=e.enableGrouping,J=void 0!==Y&&Y,ee=e.enableHiding,ne=void 0===ee||ee,te=e.enableKeyboardShortcuts,le=void 0===te||te,oe=e.enableMultiRowSelection,ie=void 0===oe||oe,re=e.enableMultiSort,ae=void 0===re||re,se=e.enablePagination,ue=void 0===se||se,ce=e.enableRowPinning,de=void 0!==ce&&ce,ge=e.enableRowSelection,be=void 0!==ge&&ge,pe=e.enableRowVirtualization,me=e.enableSelectAll,ve=void 0===me||me,fe=e.enableSorting,he=void 0===fe||fe,xe=e.enableStickyHeader,je=void 0!==xe&&xe,we=e.enableTableFooter,Ce=void 0===we||we,ye=e.enableTableHead,Oe=void 0===ye||ye,Se=e.enableToolbarInternalActions,Ae=void 0===Se||Se,Re=e.enableTopToolbar,Fe=void 0===Re||Re,Ie=e.filterFns,Pe=e.icons,De=e.id,Te=void 0===De?(0,i.useId)():De,ze=e.layoutMode,Me=e.localization,ke=e.manualFiltering,Ee=e.manualGrouping,Ve=e.manualPagination,Be=e.manualSorting,He=e.mrtTheme,Le=e.paginationDisplayMode,Ge=void 0===Le?"default":Le,We=e.positionActionsColumn,Ne=void 0===We?"first":We,qe=e.positionCreatingRow,Ue=void 0===qe?"top":qe,_e=e.positionExpandColumn,Xe=void 0===_e?"first":_e,Ze=e.positionGlobalFilter,$e=void 0===Ze?"right":Ze,Qe=e.positionPagination,Ye=void 0===Qe?"bottom":Qe,Je=e.positionToolbarAlertBanner,en=void 0===Je?"top":Je,nn=e.positionToolbarDropZone,tn=void 0===nn?"top":nn,rn=e.rowNumberDisplayMode,an=void 0===rn?"static":rn,sn=e.rowPinningDisplayMode,un=void 0===sn?"sticky":sn,cn=e.selectAllMode,dn=void 0===cn?"page":cn,gn=e.sortingFns,bn=Wn(e,["aggregationFns","autoResetExpanded","columnFilterDisplayMode","columnResizeDirection","columnResizeMode","createDisplayMode","defaultColumn","defaultDisplayColumn","editDisplayMode","enableBatchRowSelection","enableBottomToolbar","enableColumnActions","enableColumnFilters","enableColumnOrdering","enableColumnPinning","enableColumnResizing","enableColumnVirtualization","enableDensityToggle","enableExpandAll","enableExpanding","enableFacetedValues","enableFilterMatchHighlighting","enableFilters","enableFullScreenToggle","enableGlobalFilter","enableGlobalFilterRankedResults","enableGrouping","enableHiding","enableKeyboardShortcuts","enableMultiRowSelection","enableMultiSort","enablePagination","enableRowPinning","enableRowSelection","enableRowVirtualization","enableSelectAll","enableSorting","enableStickyHeader","enableTableFooter","enableTableHead","enableToolbarInternalActions","enableTopToolbar","filterFns","icons","id","layoutMode","localization","manualFiltering","manualGrouping","manualPagination","manualSorting","mrtTheme","paginationDisplayMode","positionActionsColumn","positionCreatingRow","positionExpandColumn","positionGlobalFilter","positionPagination","positionToolbarAlertBanner","positionToolbarDropZone","rowNumberDisplayMode","rowPinningDisplayMode","selectAllMode","sortingFns"]),pn=(0,p.A)();Pe=(0,i.useMemo)((function(){return Object.assign(Object.assign({},bt),Pe)}),[Pe]),Me=(0,i.useMemo)((function(){return Object.assign(Object.assign({},pt),Me)}),[Me]),He=(0,i.useMemo)((function(){return function(e,n){var t,l=on(e,n),o=null!==(t=null==l?void 0:l.baseBackgroundColor)&&void 0!==t?t:"dark"===n.palette.mode?(0,b.a)(n.palette.background.default,.05):n.palette.background.default;return Object.assign({baseBackgroundColor:o,cellNavigationOutlineColor:n.palette.primary.main,draggingBorderColor:n.palette.primary.main,matchHighlightColor:"dark"===n.palette.mode?(0,b.e$)(n.palette.warning.dark,.25):(0,b.a)(n.palette.warning.light,.5),menuBackgroundColor:(0,b.a)(o,.07),pinnedRowBackgroundColor:(0,b.X4)(n.palette.primary.main,.1),selectedRowBackgroundColor:(0,b.X4)(n.palette.primary.main,.2)},l)}(He,pn)}),[He,pn]),t=(0,i.useMemo)((function(){return Object.assign(Object.assign({},An),t)}),[]),Ie=(0,i.useMemo)((function(){return Object.assign(Object.assign({},Gn),Ie)}),[]),gn=(0,i.useMemo)((function(){return Object.assign(Object.assign({},ln),gn)}),[]),v=(0,i.useMemo)((function(){return Object.assign(Object.assign({},mt),v)}),[v]),f=(0,i.useMemo)((function(){return Object.assign(Object.assign({},vt),f)}),[f]);var mn=Ke((0,i.useMemo)((function(){return[M,pe]}),[]),2);return M=mn[0],pe=mn[1],u||(u=pn.direction||"ltr"),"semantic"===(ze=ze||(z?"grid-no-grow":"semantic"))&&(pe||M)&&(ze="grid"),pe&&(je=!0),!1===ue&&void 0===Ve&&(Ve=!0),(null===(n=bn.data)||void 0===n?void 0:n.length)||(ke=!0,Ee=!0,Ve=!0,Be=!0),Object.assign({aggregationFns:t,autoResetExpanded:r,columnFilterDisplayMode:s,columnResizeDirection:u,columnResizeMode:d,createDisplayMode:m,defaultColumn:v,defaultDisplayColumn:f,editDisplayMode:x,enableBatchRowSelection:w,enableBottomToolbar:y,enableColumnActions:S,enableColumnFilters:R,enableColumnOrdering:I,enableColumnPinning:D,enableColumnResizing:z,enableColumnVirtualization:M,enableDensityToggle:E,enableExpandAll:B,enableExpanding:H,enableFacetedValues:G,enableFilterMatchHighlighting:N,enableFilters:K,enableFullScreenToggle:_,enableGlobalFilter:Z,enableGlobalFilterRankedResults:Q,enableGrouping:J,enableHiding:ne,enableKeyboardShortcuts:le,enableMultiRowSelection:ie,enableMultiSort:ae,enablePagination:ue,enableRowPinning:de,enableRowSelection:be,enableRowVirtualization:pe,enableSelectAll:ve,enableSorting:he,enableStickyHeader:je,enableTableFooter:Ce,enableTableHead:Oe,enableToolbarInternalActions:Ae,enableTopToolbar:Fe,filterFns:Ie,getCoreRowModel:(0,l.HT)(),getExpandedRowModel:H||J?(0,l.D0)():void 0,getFacetedMinMaxValues:G?(0,l.tX)():void 0,getFacetedRowModel:G?(0,l.kQ)():void 0,getFacetedUniqueValues:G?(0,l.oS)():void 0,getFilteredRowModel:(R||Z||K)&&!ke?(0,l.hM)():void 0,getGroupedRowModel:J&&!Ee?(0,l.cU)():void 0,getPaginationRowModel:ue&&!Ve?(0,l.kW)():void 0,getSortedRowModel:he&&!Be?(0,l.h5)():void 0,getSubRows:function(e){return null==e?void 0:e.subRows},icons:Pe,id:Te,layoutMode:ze,localization:Me,manualFiltering:ke,manualGrouping:Ee,manualPagination:Ve,manualSorting:Be,mrtTheme:He,paginationDisplayMode:Ge,positionActionsColumn:Ne,positionCreatingRow:Ue,positionExpandColumn:Xe,positionGlobalFilter:$e,positionPagination:Ye,positionToolbarAlertBanner:en,positionToolbarDropZone:tn,rowNumberDisplayMode:an,rowPinningDisplayMode:un,selectAllMode:dn,sortingFns:gn},bn)}(e))},jt=function(e,n){var t=(0,ne.vp)(e);return void 0===n||(n>=0&&n<Math.max(e.startIndex-e.overscan,0)&&t.unshift(n),n>=0&&n>e.endIndex+e.overscan&&t.push(n)),t},wt=["string","number"],Ct=function(e){var n,t,l,o=e.cell,i=e.rowRef,r=e.staticColumnIndex,s=e.staticRowIndex,u=e.table,d=u.getState,g=u.options,b=g.enableFilterMatchHighlighting,p=g.mrtTheme.matchHighlightColor,m=o.column,v=o.row,f=m.columnDef,h=d(),x=h.globalFilter,j=h.globalFilterFn,w=m.getFilterValue(),C=o.getIsAggregated()&&f.AggregatedCell?f.AggregatedCell({cell:o,column:m,row:v,table:u,staticColumnIndex:r,staticRowIndex:s}):v.getIsGrouped()&&!o.getIsGrouped()?null:o.getIsGrouped()&&f.GroupedCell?f.GroupedCell({cell:o,column:m,row:v,table:u,staticColumnIndex:r,staticRowIndex:s}):void 0,y=void 0!==C;if(y||(C=o.renderValue()),b&&!1!==f.enableFilterMatchHighlighting&&String(C)&&wt.includes(Ue(C))&&(w&&wt.includes(Ue(w))&&["autocomplete","text"].includes(f.filterVariant)||x&&wt.includes(Ue(x))&&m.getCanGlobalFilter())){var O=null===de.A||void 0===de.A?void 0:(0,de.A)({matchExactly:"fuzzy"!==(w?f._filterFn:j),query:(null!==(n=null!=w?w:x)&&void 0!==n?n:"").toString(),text:null==C?void 0:C.toString()});((null==O?void 0:O.length)>1||(null===(t=null==O?void 0:O[0])||void 0===t?void 0:t.match))&&(C=(0,a.jsx)("span",{"aria-label":C,role:"note",children:null!==(l=null==O?void 0:O.map((function(e){var n=e.key,t=e.match,l=e.text;return(0,a.jsx)(c.A,{"aria-hidden":"true",component:"span",sx:t?{backgroundColor:p,borderRadius:"2px",color:function(e){return"dark"===e.palette.mode?e.palette.common.white:e.palette.common.black},padding:"2px 1px"}:void 0,children:l},n)})))&&void 0!==l?l:C}))}return f.Cell&&!y&&(C=f.Cell({cell:o,column:m,renderedCellValue:C,row:v,rowRef:i,staticColumnIndex:r,staticRowIndex:s,table:u})),C},yt=function(e){var n,t=e.cell,l=e.table,o=Wn(e,["cell","table"]),r=l.options,s=r.localization,c=r.muiCopyButtonProps,g=t.column,b=t.row,p=g.columnDef,m=Ke((0,i.useState)(!1),2),v=m[0],f=m[1],h=Object.assign(Object.assign(Object.assign({},on(c,{cell:t,column:g,row:b,table:l})),on(p.muiCopyButtonProps,{cell:t,column:g,row:b,table:l})),o);return(0,a.jsx)(u.A,Object.assign({},$n("top"),{title:null!==(n=null==h?void 0:h.title)&&void 0!==n?n:v?s.copiedToClipboard:s.clickToCopy,children:(0,a.jsx)(d.A,Object.assign({onClick:function(e){return n=e,l=t.getValue(),n.stopPropagation(),navigator.clipboard.writeText(l),f(!0),void setTimeout((function(){return f(!1)}),4e3);var n,l},size:"small",type:"button",variant:"text"},h,{sx:function(e){return Object.assign({backgroundColor:"transparent",border:"none",color:"inherit",cursor:"copy",fontFamily:"inherit",fontSize:"inherit",letterSpacing:"inherit",m:"-0.25rem",minWidth:"unset",py:0,textAlign:"inherit",textTransform:"inherit"},on(null==h?void 0:h.sx,e))},title:void 0}))}))},Ot=function(e){var n,t,l=e.cell,o=e.table,r=Wn(e,["cell","table"]),s=o.getState,u=o.options,c=u.createDisplayMode,d=u.editDisplayMode,g=u.muiEditTextFieldProps,b=o.refs.editInputRefs,p=o.setCreatingRow,m=o.setEditingCell,v=o.setEditingRow,h=l.column,x=l.row,j=h.columnDef,w=s(),C=w.creatingRow,y=w.editingRow,O=j.editSelectOptions,S=j.editVariant,A=(null==C?void 0:C.id)===x.id,R=(null==y?void 0:y.id)===x.id,F=Ke((0,i.useState)((function(){return l.getValue()})),2),I=F[0],P=F[1],D=Ke((0,i.useState)(!0),2),T=D[0],z=D[1],M=Object.assign(Object.assign(Object.assign({},on(g,{cell:l,column:h,row:x,table:o})),on(j.muiEditTextFieldProps,{cell:l,column:h,row:x,table:o})),r),k=on(O,{cell:l,column:h,row:x,table:o}),E="select"===S||(null==M?void 0:M.select),V=function(e){x._valuesCache[h.id]=e,A?p(x):R&&v(x)};return j.Edit?(0,a.jsx)(a.Fragment,{children:null===(n=j.Edit)||void 0===n?void 0:n.call(j,{cell:l,column:h,row:x,table:o})}):(0,a.jsx)(ge.A,Object.assign({disabled:!1===on(j.enableEditing,x),fullWidth:!0,inputRef:function(e){e&&(b.current[h.id]=E?e.node:e,M.inputRef&&(M.inputRef=e))},label:["custom","modal"].includes(A?c:d)?j.header:void 0,margin:"none",name:h.id,placeholder:["custom","modal"].includes(A?c:d)?void 0:j.header,select:E,size:"small",value:null!=I?I:"",variant:"standard"},M,{InputProps:Object.assign(Object.assign(Object.assign({},"outlined"!==M.variant?{disableUnderline:"table"===d}:{}),M.InputProps),{sx:function(e){var n;return Object.assign({mb:0},on(null===(n=null==M?void 0:M.InputProps)||void 0===n?void 0:n.sx,e))}}),SelectProps:Object.assign({MenuProps:{disableScrollLock:!0}},M.SelectProps),inputProps:Object.assign({autoComplete:"off"},M.inputProps),onBlur:function(e){var n;null===(n=M.onBlur)||void 0===n||n.call(M,e),V(I),m(null)},onChange:function(e){var n;null===(n=M.onChange)||void 0===n||n.call(M,e),P(e.target.value),E&&V(e.target.value)},onClick:function(e){var n;e.stopPropagation(),null===(n=null==M?void 0:M.onClick)||void 0===n||n.call(M,e)},onKeyDown:function(e){var n,t,l;null===(n=M.onKeyDown)||void 0===n||n.call(M,e),"Enter"===e.key&&!e.shiftKey&&T&&(null===(l=null===(t=b.current)||void 0===t?void 0:t[h.id])||void 0===l||l.blur())},onCompositionStart:function(){return z(!1)},onCompositionEnd:function(){return z(!0)},children:null!==(t=M.children)&&void 0!==t?t:null==k?void 0:k.map((function(e){var n=rn(e),t=n.label,l=n.value;return(0,a.jsx)(f.A,{sx:{alignItems:"center",display:"flex",gap:"0.5rem",m:0},value:l,children:t},l)}))}))},St=function(e){var n,t,l,o,r,s=e.cell,u=e.numRows,c=e.rowRef,d=e.staticColumnIndex,g=e.staticRowIndex,b=e.table,m=Wn(e,["cell","numRows","rowRef","staticColumnIndex","staticRowIndex","table"]),v=(0,p.A)(),f=b.getState,h=b.options,x=h.columnResizeDirection,j=h.columnResizeMode,w=h.createDisplayMode,C=h.editDisplayMode,y=h.enableCellActions,O=h.enableClickToCopy,S=h.enableColumnOrdering,A=h.enableColumnPinning,R=h.enableGrouping,F=h.enableKeyboardShortcuts,I=h.layoutMode,P=h.mrtTheme.draggingBorderColor,D=h.muiSkeletonProps,T=h.muiTableBodyCellProps,z=b.setHoveredColumn,M=f(),k=M.actionCell,E=M.columnSizingInfo,V=M.creatingRow,B=M.density,H=M.draggingColumn,L=M.draggingRow,G=M.editingCell,W=M.editingRow,N=M.hoveredColumn,q=M.hoveredRow,K=M.isLoading,U=M.showSkeletons,_=s.column,X=s.row,Z=_.columnDef,$=Z.columnDefType,Q={cell:s,column:_,row:X,table:b},Y=Object.assign(Object.assign(Object.assign({},on(T,Q)),on(Z.muiTableBodyCellProps,Q)),m),J=on(D,{cell:s,column:_,row:X,table:b}),ee=Ke((0,i.useState)(100),2),ne=ee[0],te=ee[1];(0,i.useEffect)((function(){if((K||U)&&100===ne){var e=_.getSize();te("display"===$?e/2:Math.round(Math.random()*(e-e/3)+e/3))}}),[K,U]);var le=(0,i.useMemo)((function(){var e=(null==H?void 0:H.id)===_.id,n=(null==N?void 0:N.id)===_.id,t=(null==L?void 0:L.id)===X.id,l=(null==q?void 0:q.id)===X.id,o=_.getIsFirstColumn(),i=_.getIsLastColumn(),r=u&&g===u-1,a=E.isResizingColumn===_.id,s=a&&"onChange"===j,c=s?"2px solid ".concat(P," !important"):e||t?"1px dashed ".concat(v.palette.grey[500]," !important"):n||l||a?"2px dashed ".concat(P," !important"):void 0;return s?"ltr"===x?{borderRight:c}:{borderLeft:c}:c?{borderBottom:t||l||r&&!a?c:void 0,borderLeft:e||n||(t||l)&&o?c:void 0,borderRight:e||n||(t||l)&&i?c:void 0,borderTop:t||l?c:void 0}:void 0}),[E.isResizingColumn,H,L,N,q,g]),oe=A&&"group"!==Z.columnDefType&&_.getIsPinned(),ie=pn({cell:s,table:b}),re=ie&&!["custom","modal"].includes(C)&&("table"===C||(null==W?void 0:W.id)===X.id||(null==G?void 0:G.id)===s.id)&&!X.getIsGrouped(),ae=ie&&"row"===w&&(null==V?void 0:V.id)===X.id,se=(!0===on(O,s)||!0===on(Z.enableClickToCopy,s))&&!["context-menu",!1].includes(on(Z.enableClickToCopy,s)),de=on(y,s),ge={cell:s,table:b,staticColumnIndex:d,staticRowIndex:g};return(0,a.jsx)(ce.A,Object.assign({align:"rtl"===v.direction?"right":"left","data-index":d,"data-pinned":!!oe||void 0,tabIndex:F?0:void 0},Y,{onKeyDown:function(e){var n;null===(n=null==Y?void 0:Y.onKeyDown)||void 0===n||n.call(Y,e),vn({cell:s,cellValue:s.getValue(),event:e,table:b})},onContextMenu:function(e){var n;null===(n=null==Y?void 0:Y.onContextMenu)||void 0===n||n.call(Y,e),de&&(e.preventDefault(),b.setActionCell(s),b.refs.actionCellRef.current=e.currentTarget)},onDoubleClick:function(e){var n;null===(n=null==Y?void 0:Y.onDoubleClick)||void 0===n||n.call(Y,e),mn({cell:s,table:b})},onDragEnter:function(e){var n;null===(n=null==Y?void 0:Y.onDragEnter)||void 0===n||n.call(Y,e),R&&"drop-zone"===(null==N?void 0:N.id)&&z(null),S&&H&&z(!1!==Z.enableColumnOrdering?_:null)},onDragOver:function(e){!1!==Z.enableColumnOrdering&&e.preventDefault()},sx:function(e){return Object.assign(Object.assign({"&:hover":{outline:(null==k?void 0:k.id)===s.id||"cell"===C&&ie||"table"===C&&(ae||re)?"1px solid ".concat(e.palette.grey[500]):void 0,textOverflow:"clip"},alignItems:(null==I?void 0:I.startsWith("grid"))?"center":void 0,cursor:de?"context-menu":ie&&"cell"===C?"pointer":"inherit",outline:(null==k?void 0:k.id)===s.id?"1px solid ".concat(e.palette.grey[500]):void 0,outlineOffset:"-1px",overflow:"hidden",p:"compact"===B?"display"===$?"0 0.5rem":"0.5rem":"comfortable"===B?"display"===$?"0.5rem 0.75rem":"1rem":"display"===$?"1rem 1.25rem":"1.5rem",textOverflow:"display"!==$?"ellipsis":void 0,whiteSpace:X.getIsPinned()||"compact"===B?"nowrap":"normal"},_n({column:_,table:b,tableCellProps:Y,theme:e})),le)},children:null!==(n=Y.children)&&void 0!==n?n:(0,a.jsxs)(a.Fragment,{children:[s.getIsPlaceholder()?null!==(l=null===(t=Z.PlaceholderCell)||void 0===t?void 0:t.call(Z,{cell:s,column:_,row:X,table:b}))&&void 0!==l?l:null:!1!==U&&(K||U)?(0,a.jsx)(ue.A,Object.assign({animation:"wave",height:20,width:ne},J)):"display"!==$||!["mrt-row-expand","mrt-row-numbers","mrt-row-select"].includes(_.id)&&X.getIsGrouped()?ae||re?(0,a.jsx)(Ot,{cell:s,table:b}):se&&!1!==Z.enableClickToCopy?(0,a.jsx)(yt,{cell:s,table:b,children:(0,a.jsx)(Ct,Object.assign({},ge))}):(0,a.jsx)(Ct,Object.assign({},ge)):null===(o=Z.Cell)||void 0===o?void 0:o.call(Z,{cell:s,column:_,renderedCellValue:s.renderValue(),row:X,rowRef:c,staticColumnIndex:d,staticRowIndex:g,table:b}),s.getIsGrouped()&&!Z.GroupedCell&&(0,a.jsxs)(a.Fragment,{children:[" (",null===(r=X.subRows)||void 0===r?void 0:r.length,")"]})]})}))},At=(0,i.memo)(St,(function(e,n){return n.cell===e.cell})),Rt=function(e){var n=e.parentRowRef,t=e.row,l=e.rowVirtualizer,o=e.staticRowIndex,i=e.table,r=e.virtualRow,s=Wn(e,["parentRowRef","row","rowVirtualizer","staticRowIndex","table","virtualRow"]),u=i.getState,c=i.getVisibleLeafColumns,d=i.options,g=d.layoutMode,b=d.mrtTheme.baseBackgroundColor,p=d.muiDetailPanelProps,m=d.muiTableBodyRowProps,v=d.renderDetailPanel,f=u().isLoading,h=on(m,{isDetailPanel:!0,row:t,staticRowIndex:o,table:i}),x=Object.assign(Object.assign({},on(p,{row:t,table:i})),s),j=!f&&(null==v?void 0:v({row:t,table:i}));return(0,a.jsx)(se.A,Object.assign({className:"Mui-TableBodyCell-DetailPanel","data-index":v?2*o+1:o,ref:function(e){var n;e&&(null===(n=null==l?void 0:l.measureElement)||void 0===n||n.call(l,e))}},h,{sx:function(e){var t,l;return Object.assign({display:(null==g?void 0:g.startsWith("grid"))?"flex":void 0,position:r?"absolute":void 0,top:r?"".concat(null===(l=null===(t=n.current)||void 0===t?void 0:t.getBoundingClientRect())||void 0===l?void 0:l.height,"px"):void 0,transform:r?"translateY(".concat(null==r?void 0:r.start,"px)"):void 0,width:"100%"},on(null==h?void 0:h.sx,e))},children:(0,a.jsx)(ce.A,Object.assign({className:"Mui-TableBodyCell-DetailPanel",colSpan:c().length},x,{sx:function(e){return Object.assign({backgroundColor:r?b:void 0,borderBottom:t.getIsExpanded()?void 0:"none",display:(null==g?void 0:g.startsWith("grid"))?"flex":void 0,py:j&&t.getIsExpanded()?"1rem":0,transition:r?void 0:"all 150ms ease-in-out",width:"100%"},on(null==x?void 0:x.sx,e))},children:r?t.getIsExpanded()&&j:(0,a.jsx)(be.A,{in:t.getIsExpanded(),mountOnEnter:!0,unmountOnExit:!0,children:j})}))}))},Ft=function(e){var n,t,l,o,r=e.columnVirtualizer,s=e.numRows,u=e.pinnedRowIds,c=e.row,d=e.rowVirtualizer,g=e.staticRowIndex,m=e.table,v=e.virtualRow,f=Wn(e,["columnVirtualizer","numRows","pinnedRowIds","row","rowVirtualizer","staticRowIndex","table","virtualRow"]),h=(0,p.A)(),x=m.getState,j=m.options,w=j.enableRowOrdering,C=j.enableRowPinning,y=j.enableStickyFooter,O=j.enableStickyHeader,S=j.layoutMode,A=j.memoMode,R=j.mrtTheme,F=R.baseBackgroundColor,I=R.pinnedRowBackgroundColor,P=R.selectedRowBackgroundColor,D=j.muiTableBodyRowProps,T=j.renderDetailPanel,z=j.rowPinningDisplayMode,M=m.refs,k=M.tableFooterRef,E=M.tableHeadRef,V=m.setHoveredRow,B=x(),H=B.density,L=B.draggingColumn,G=B.draggingRow,W=B.editingCell,N=B.editingRow,q=B.hoveredRow,K=B.isFullScreen,U=B.rowPinning,_=c.getVisibleCells(),X=null!=r?r:{},Z=X.virtualColumns,$=X.virtualPaddingLeft,Q=X.virtualPaddingRight,Y=cn({row:c,table:m}),J=C&&c.getIsPinned(),ee=(null==G?void 0:G.id)===c.id,ne=(null==q?void 0:q.id)===c.id,te=Object.assign(Object.assign({},on(D,{row:c,staticRowIndex:g,table:m})),f),le=Ke((0,i.useMemo)((function(){return C&&(null==z?void 0:z.includes("sticky"))&&u&&c.getIsPinned()?[Xe(u).reverse().indexOf(c.id),u.indexOf(c.id)]:[]}),[u,U]),2),oe=le[0],ie=le[1],re=(O||K)&&(null===(n=E.current)||void 0===n?void 0:n.clientHeight)||0,ae=y&&(null===(t=k.current)||void 0===t?void 0:t.clientHeight)||0,ue=on(null==te?void 0:te.sx,h),ce="compact"===H?37:"comfortable"===H?53:69,de=parseInt(null!==(o=null===(l=null==te?void 0:te.style)||void 0===l?void 0:l.height)&&void 0!==o?o:null==ue?void 0:ue.height,10)||ce,ge=(0,i.useRef)(null),be=Y?P:J?I:void 0,pe=!1!==(null==te?void 0:te.hover)?Y?be:"dark"===h.palette.mode?"".concat((0,b.a)(F,.3)):"".concat((0,b.e$)(F,.3)):void 0;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(se.A,Object.assign({"data-index":T?2*g:g,"data-pinned":!!J||void 0,"data-selected":Y||void 0,onDragEnter:function(e){w&&G&&V(c)},onDragOver:function(e){e.preventDefault()},ref:function(e){e&&(ge.current=e,null==d||d.measureElement(e))},selected:Y},te,{style:Object.assign({transform:v?"translateY(".concat(v.start,"px)"):void 0},null==te?void 0:te.style),sx:function(e){return Object.assign({"&:hover td:after":pe?Object.assign({backgroundColor:(0,b.X4)(pe,.3)},Kn):void 0,backgroundColor:"".concat(F," !important"),bottom:!v&&void 0!==oe&&J?"".concat(oe*de+(y?ae-1:0),"px"):void 0,boxSizing:"border-box",display:(null==S?void 0:S.startsWith("grid"))?"flex":void 0,opacity:J?.97:ee||ne?.5:1,position:v?"absolute":(null==z?void 0:z.includes("sticky"))&&J?"sticky":"relative",td:Object.assign({},Un({table:m,theme:e})),"td:after":be?Object.assign({backgroundColor:be},Kn):void 0,top:v?0:void 0!==ie&&J?"".concat(ie*de+(O||K?re-1:0),"px"):void 0,transition:v?"none":"all 150ms ease-in-out",width:"100%",zIndex:(null==z?void 0:z.includes("sticky"))&&J?2:0},ue)},children:[$?(0,a.jsx)("td",{style:{display:"flex",width:$}}):null,(null!=Z?Z:_).map((function(e,n){var t=e;r&&(n=e.index,t=_[n]);var l={cell:t,numRows:s,rowRef:ge,staticColumnIndex:n,staticRowIndex:g,table:m},o="".concat(t.id,"-").concat(g);return t?"cells"!==A||"data"!==t.column.columnDef.columnDefType||L||G||(null==W?void 0:W.id)===t.id||(null==N?void 0:N.id)===c.id?(0,a.jsx)(St,Object.assign({},l),o):(0,a.jsx)(At,Object.assign({},l),o):null})),Q?(0,a.jsx)("td",{style:{display:"flex",width:Q}}):null]})),T&&!c.getIsGrouped()&&(0,a.jsx)(Rt,{parentRowRef:ge,row:c,rowVirtualizer:d,staticRowIndex:g,table:m,virtualRow:v})]})},It=(0,i.memo)(Ft,(function(e,n){return e.row===n.row&&e.staticRowIndex===n.staticRowIndex})),Pt=function(e){var n,t,l,o,r,s,u=e.columnVirtualizer,c=e.table,d=Wn(e,["columnVirtualizer","table"]),g=c.getBottomRows,b=c.getIsSomeRowsPinned,p=c.getRowModel,m=c.getState,v=c.getTopRows,f=c.options,h=f.enableStickyFooter,x=f.enableStickyHeader,j=f.layoutMode,w=f.localization,C=f.memoMode,y=f.muiTableBodyProps,O=f.renderDetailPanel,S=f.renderEmptyRowsFallback,A=f.rowPinningDisplayMode,R=c.refs,F=R.tableFooterRef,I=R.tableHeadRef,P=R.tablePaperRef,D=m(),T=D.columnFilters,z=D.globalFilter,M=D.isFullScreen,k=D.rowPinning,E=Object.assign(Object.assign({},on(y,{table:c})),d),V=(x||M)&&(null===(n=I.current)||void 0===n?void 0:n.clientHeight)||0,B=h&&(null===(t=F.current)||void 0===t?void 0:t.clientHeight)||0,H=(0,i.useMemo)((function(){var e,n;return(null===(e=k.bottom)||void 0===e?void 0:e.length)||(null===(n=k.top)||void 0===n?void 0:n.length)?p().rows.filter((function(e){return e.getIsPinned()})).map((function(e){return e.id})):[]}),[k,p().rows]),L=function(e){var n=e.getRowModel,t=e.getState,l=e.options,o=l.data,r=l.enableGlobalFilterRankedResults,a=l.positionCreatingRow,s=t(),u=s.creatingRow,c=s.expanded,d=s.globalFilter,g=s.pagination,b=s.rowPinning,p=s.sorting;return(0,i.useMemo)((function(){return an(e)}),[u,o,r,c,n().rows,d,g.pageIndex,g.pageSize,a,b,p])}(c),G=function(e,n){var t=e.getRowModel,l=e.getState,o=e.options,r=o.enableRowVirtualization,a=o.renderDetailPanel,s=o.rowVirtualizerInstanceRef,u=o.rowVirtualizerOptions,c=e.refs.tableContainerRef,d=l(),g=d.density,b=d.draggingRow,p=d.expanded;if(r){var m=on(u,{table:e}),v=null!=n?n:t().rows,f=(0,i.useMemo)((function(){return(null==b?void 0:b.id)?v.findIndex((function(e){return e.id===(null==b?void 0:b.id)})):void 0}),[v,null==b?void 0:b.id]),h=v.length,x="compact"===g?37:"comfortable"===g?58:73,j=(0,te.Te)(Object.assign({count:a?2*h:h,estimateSize:function(e){return a&&e%2==1?!0===p?100:0:x},getScrollElement:function(){return c.current},measureElement:"undefined"!=typeof window&&-1===navigator.userAgent.indexOf("Firefox")?function(e){return null==e?void 0:e.getBoundingClientRect().height}:void 0,overscan:4,rangeExtractor:(0,i.useCallback)((function(e){return jt(e,f)}),[f])},m));return j.virtualRows=j.getVirtualItems(),s&&(s.current=j),j}}(c,L),W=(null!=G?G:{}).virtualRows,N={columnVirtualizer:u,numRows:L.length,table:c};return(0,a.jsxs)(a.Fragment,{children:[!(null==A?void 0:A.includes("sticky"))&&b("top")&&(0,a.jsx)(re.A,Object.assign({},E,{sx:function(e){return Object.assign({display:(null==j?void 0:j.startsWith("grid"))?"grid":void 0,position:"sticky",top:V-1,zIndex:1},on(null==E?void 0:E.sx,e))},children:v().map((function(e,n){var t=Object.assign(Object.assign({},N),{row:e,staticRowIndex:n});return"rows"===C?(0,a.jsx)(It,Object.assign({},t),e.id):(0,a.jsx)(Ft,Object.assign({},t),e.id)}))})),(0,a.jsx)(re.A,Object.assign({},E,{sx:function(e){return Object.assign({display:(null==j?void 0:j.startsWith("grid"))?"grid":void 0,height:G?"".concat(G.getTotalSize(),"px"):void 0,minHeight:L.length?void 0:"100px",position:"relative"},on(null==E?void 0:E.sx,e))},children:null!==(l=null==E?void 0:E.children)&&void 0!==l?l:L.length?(0,a.jsx)(a.Fragment,{children:(null!=W?W:L).map((function(e,n){var t=e;if(G){if(O){if(e.index%2==1)return null;n=e.index/2}else n=e.index;t=L[n]}var l=Object.assign(Object.assign({},N),{pinnedRowIds:H,row:t,rowVirtualizer:G,staticRowIndex:n,virtualRow:G?e:void 0}),o="".concat(t.id,"-").concat(t.index);return"rows"===C?(0,a.jsx)(It,Object.assign({},l),o):(0,a.jsx)(Ft,Object.assign({},l),o)}))}):(0,a.jsx)("tr",{style:{display:(null==j?void 0:j.startsWith("grid"))?"grid":void 0},children:(0,a.jsx)("td",{colSpan:c.getVisibleLeafColumns().length,style:{display:(null==j?void 0:j.startsWith("grid"))?"grid":void 0},children:null!==(o=null==S?void 0:S({table:c}))&&void 0!==o?o:(0,a.jsx)(ae.A,{sx:{color:"text.secondary",fontStyle:"italic",maxWidth:"min(100vw, ".concat(null!==(s=null===(r=P.current)||void 0===r?void 0:r.clientWidth)&&void 0!==s?s:360,"px)"),py:"2rem",textAlign:"center",width:"100%"},children:z||T.length?w.noResultsFound:w.noRecordsToDisplay})})})})),!(null==A?void 0:A.includes("sticky"))&&b("bottom")&&(0,a.jsx)(re.A,Object.assign({},E,{sx:function(e){return Object.assign({bottom:B-1,display:(null==j?void 0:j.startsWith("grid"))?"grid":void 0,position:"sticky",zIndex:1},on(null==E?void 0:E.sx,e))},children:g().map((function(e,n){var t=Object.assign(Object.assign({},N),{row:e,staticRowIndex:n});return"rows"===C?(0,a.jsx)(It,Object.assign({},t),e.id):(0,a.jsx)(Ft,Object.assign({},t),e.id)}))}))]})},Dt=(0,i.memo)(Pt,(function(e,n){return e.table.options.data===n.table.options.data})),Tt=function(e){var n,t,l,o=e.footer,i=e.staticColumnIndex,r=e.table,s=Wn(e,["footer","staticColumnIndex","table"]),u=(0,p.A)(),c=r.getState,d=r.options,g=d.enableColumnPinning,b=d.muiTableFooterCellProps,m=d.enableKeyboardShortcuts,v=c().density,f=o.column,h=f.columnDef,x=h.columnDefType,j=g&&"group"!==h.columnDefType&&f.getIsPinned(),w={column:f,table:r},C=Object.assign(Object.assign(Object.assign({},on(b,w)),on(h.muiTableFooterCellProps,w)),s);return(0,a.jsx)(ce.A,Object.assign({align:"group"===x?"center":"rtl"===u.direction?"right":"left",colSpan:o.colSpan,"data-index":i,"data-pinned":!!j||void 0,tabIndex:m?0:void 0,variant:"footer"},C,{onKeyDown:function(e){var n;null===(n=null==C?void 0:C.onKeyDown)||void 0===n||n.call(C,e),vn({event:e,cellValue:o.column.columnDef.footer,table:r})},sx:function(e){return Object.assign(Object.assign({fontWeight:"bold",p:"compact"===v?"0.5rem":"comfortable"===v?"1rem":"1.5rem",verticalAlign:"top"},_n({column:f,header:o,table:r,tableCellProps:C,theme:e})),on(null==C?void 0:C.sx,e))},children:null!==(n=C.children)&&void 0!==n?n:o.isPlaceholder?null:null!==(l=null!==(t=on(h.Footer,{column:f,footer:o,table:r}))&&void 0!==t?t:h.footer)&&void 0!==l?l:null}))},zt=function(e){var n,t=e.columnVirtualizer,l=e.footerGroup,o=e.table,i=Wn(e,["columnVirtualizer","footerGroup","table"]),r=o.options,s=r.layoutMode,u=r.mrtTheme.baseBackgroundColor,c=r.muiTableFooterRowProps,d=null!=t?t:{},g=d.virtualColumns,b=d.virtualPaddingLeft,p=d.virtualPaddingRight;if(!(null===(n=l.headers)||void 0===n?void 0:n.some((function(e){return"string"==typeof e.column.columnDef.footer&&!!e.column.columnDef.footer||e.column.columnDef.Footer}))))return null;var m=Object.assign(Object.assign({},on(c,{footerGroup:l,table:o})),i);return(0,a.jsxs)(se.A,Object.assign({},m,{sx:function(e){return Object.assign({backgroundColor:u,display:(null==s?void 0:s.startsWith("grid"))?"flex":void 0,position:"relative",width:"100%"},on(null==m?void 0:m.sx,e))},children:[b?(0,a.jsx)("th",{style:{display:"flex",width:b}}):null,(null!=g?g:l.headers).map((function(e,n){var i=e;return t&&(n=e.index,i=l.headers[n]),i?(0,a.jsx)(Tt,{footer:i,staticColumnIndex:n,table:o},i.id):null})),p?(0,a.jsx)("th",{style:{display:"flex",width:p}}):null]}))},Mt=function(e){var n=e.columnVirtualizer,t=e.table,l=Wn(e,["columnVirtualizer","table"]),o=t.getState,i=t.options,r=i.enableStickyFooter,s=i.layoutMode,u=i.muiTableFooterProps,c=t.refs.tableFooterRef,d=o().isFullScreen,g=Object.assign(Object.assign({},on(u,{table:t})),l),b=(d||r)&&!1!==r,p=t.getFooterGroups();return p.some((function(e){var n;return null===(n=e.headers)||void 0===n?void 0:n.some((function(e){return"string"==typeof e.column.columnDef.footer&&!!e.column.columnDef.footer||e.column.columnDef.Footer}))}))?(0,a.jsx)(pe.A,Object.assign({},g,{ref:function(e){c.current=e,(null==g?void 0:g.ref)&&(g.ref.current=e)},sx:function(e){return Object.assign({bottom:b?0:void 0,display:(null==s?void 0:s.startsWith("grid"))?"grid":void 0,opacity:b?.97:void 0,outline:b?"light"===e.palette.mode?"1px solid ".concat(e.palette.grey[300]):"1px solid ".concat(e.palette.grey[700]):void 0,position:b?"sticky":"relative",zIndex:b?1:void 0},on(null==g?void 0:g.sx,e))},children:p.map((function(e){return(0,a.jsx)(zt,{columnVirtualizer:n,footerGroup:e,table:t},e.id)}))})):null},kt=["between","betweenInclusive","inNumberRange"],Et=["empty","notEmpty"],Vt=["arrIncludesSome","arrIncludesAll","arrIncludes"],Bt=["range-slider","date-range","datetime-range","range"],Ht=function(e){var n,t,l,o,r=e.anchorEl,s=e.header,u=e.onSelect,c=e.setAnchorEl,d=e.setFilterValue,g=e.table,b=Wn(e,["anchorEl","header","onSelect","setAnchorEl","setFilterValue","table"]),p=g.getState,v=g.options,f=v.columnFilterModeOptions,h=v.globalFilterModeOptions,x=v.localization,j=v.mrtTheme.menuBackgroundColor,w=v.renderColumnFilterModeMenuItems,C=v.renderGlobalFilterModeMenuItems,y=g.setColumnFilterFns,O=g.setGlobalFilterFn,S=p(),A=S.density,R=S.globalFilterFn,F=(null!=s?s:{}).column,I=(null!=F?F:{}).columnDef,P=null==F?void 0:F.getFilterValue(),D=null!==(n=null==I?void 0:I.columnFilterModeOptions)&&void 0!==n?n:f;Bt.includes(null==I?void 0:I.filterVariant)&&(D=[].concat(kt,Xe(null!=D?D:[])).filter((function(e){return kt.includes(e)})));var T=(0,i.useMemo)((function(){return function(e){return[{divider:!1,label:e.filterFuzzy,option:"fuzzy",symbol:"≈"},{divider:!1,label:e.filterContains,option:"contains",symbol:"*"},{divider:!1,label:e.filterStartsWith,option:"startsWith",symbol:"a"},{divider:!0,label:e.filterEndsWith,option:"endsWith",symbol:"z"},{divider:!1,label:e.filterEquals,option:"equals",symbol:"="},{divider:!0,label:e.filterNotEquals,option:"notEquals",symbol:"≠"},{divider:!1,label:e.filterBetween,option:"between",symbol:"⇿"},{divider:!0,label:e.filterBetweenInclusive,option:"betweenInclusive",symbol:"⬌"},{divider:!1,label:e.filterGreaterThan,option:"greaterThan",symbol:">"},{divider:!1,label:e.filterGreaterThanOrEqualTo,option:"greaterThanOrEqualTo",symbol:"≥"},{divider:!1,label:e.filterLessThan,option:"lessThan",symbol:"<"},{divider:!0,label:e.filterLessThanOrEqualTo,option:"lessThanOrEqualTo",symbol:"≤"},{divider:!1,label:e.filterEmpty,option:"empty",symbol:"∅"},{divider:!1,label:e.filterNotEmpty,option:"notEmpty",symbol:"!∅"}]}(x).filter((function(e){return I?void 0===D||(null==D?void 0:D.includes(e.option)):(!h||h.includes(e.option))&&["contains","fuzzy","startsWith"].includes(e.option)}))}),[]),z=function(e){var n,t,l=null!==(n=null==I?void 0:I._filterFn)&&void 0!==n?n:"";s&&F?e!==l&&(y((function(n){return Object.assign(Object.assign({},n),_e({},s.id,e))})),Et.includes(e)?" "===P||Et.includes(l)?P&&F.setFilterValue(P):F.setFilterValue(" "):"multi-select"===(null==I?void 0:I.filterVariant)||Vt.includes(e)?P instanceof String||(null==P?void 0:P.length)?(F.setFilterValue([]),null==d||d([])):P&&F.setFilterValue(P):(null===(t=null==I?void 0:I.filterVariant)||void 0===t?void 0:t.includes("range"))||kt.includes(e)?Array.isArray(P)&&((null==P?void 0:P.every((function(e){return""===e})))||kt.includes(l))?F.setFilterValue(P):(F.setFilterValue(["",""]),null==d||d("")):Array.isArray(P)?(F.setFilterValue(""),null==d||d("")):" "===P&&Et.includes(l)?F.setFilterValue(void 0):F.setFilterValue(P)):O(e),c(null),null==u||u()},M=s&&I?I._filterFn:R;return(0,a.jsx)(m.A,Object.assign({MenuListProps:{dense:"compact"===A,sx:{backgroundColor:j}},anchorEl:r,anchorOrigin:{horizontal:"right",vertical:"center"},disableScrollLock:!0,onClose:function(){return c(null)},open:!!r},b,{children:null!==(o=s&&F&&I?null!==(l=null===(t=I.renderColumnFilterModeMenuItems)||void 0===t?void 0:t.call(I,{column:F,internalFilterOptions:T,onSelectFilterMode:z,table:g}))&&void 0!==l?l:null==w?void 0:w({column:F,internalFilterOptions:T,onSelectFilterMode:z,table:g}):null==C?void 0:C({internalFilterOptions:T,onSelectFilterMode:z,table:g}))&&void 0!==o?o:T.map((function(e,n){var t=e.divider,l=e.label,o=e.option,i=e.symbol;return(0,a.jsx)(Qn,{divider:t,icon:i,label:l,onClick:function(){return z(o)},selected:o===M,table:g,value:o},n)}))}))},Lt=function(e){var n,t,l,o,r,s,u,c,d,g,b=e.anchorEl,p=e.header,v=e.setAnchorEl,f=e.table,h=Wn(e,["anchorEl","header","setAnchorEl","table"]),x=f.getAllLeafColumns,j=f.getState,w=f.options,C=w.columnFilterDisplayMode,y=w.columnFilterModeOptions,O=w.enableColumnFilterModes,S=w.enableColumnFilters,A=w.enableColumnPinning,R=w.enableColumnResizing,F=w.enableGrouping,I=w.enableHiding,P=w.enableSorting,D=w.enableSortingRemoval,T=w.icons,z=T.ClearAllIcon,M=T.DynamicFeedIcon,k=T.FilterListIcon,E=T.FilterListOffIcon,V=T.PushPinIcon,B=T.RestartAltIcon,H=T.SortIcon,L=T.ViewColumnIcon,G=T.VisibilityOffIcon,W=w.localization,N=w.mrtTheme.menuBackgroundColor,q=w.renderColumnActionsMenuItems,K=f.refs.filterInputRefs,U=f.setColumnFilterFns,_=f.setColumnOrder,X=f.setColumnSizingInfo,Z=f.setShowColumnFilters,$=p.column,Q=$.columnDef,Y=j(),J=Y.columnSizing,ee=Y.columnVisibility,ne=Y.density,te=Y.showColumnFilters,le=$.getFilterValue(),oe=Ke((0,i.useState)(null),2),ie=oe[0],re=oe[1],ae=function(e){$.pin(e),v(null)},se=function(){Z(!0),queueMicrotask((function(){var e,n;return null===(n=null===(e=K.current)||void 0===e?void 0:e["".concat($.id,"-0")])||void 0===n?void 0:n.focus()})),v(null)},ue=function(e){e.stopPropagation(),re(e.currentTarget)},ce=!!Q.filterSelectOptions,de=null!==(n=null==Q?void 0:Q.columnFilterModeOptions)&&void 0!==n?n:y,ge=O&&!1!==Q.enableColumnFilterModes&&!ce&&(void 0===de||!!(null==de?void 0:de.length)),be=[].concat(Xe(P&&$.getCanSort()?[!1!==D&&(0,a.jsx)(Qn,{disabled:!1===$.getIsSorted(),icon:(0,a.jsx)(z,{}),label:W.clearSort,onClick:function(){$.clearSorting(),v(null)},table:f},0),(0,a.jsx)(Qn,{disabled:"asc"===$.getIsSorted(),icon:(0,a.jsx)(H,{style:{transform:"rotate(180deg) scaleX(-1)"}}),label:null===(t=W.sortByColumnAsc)||void 0===t?void 0:t.replace("{column}",String(Q.header)),onClick:function(){$.toggleSorting(!1),v(null)},table:f},1),(0,a.jsx)(Qn,{disabled:"desc"===$.getIsSorted(),divider:S||F||I,icon:(0,a.jsx)(H,{}),label:null===(l=W.sortByColumnDesc)||void 0===l?void 0:l.replace("{column}",String(Q.header)),onClick:function(){$.toggleSorting(!0),v(null)},table:f},2)]:[]),Xe(S&&$.getCanFilter()?[(0,a.jsx)(Qn,{disabled:!le||Array.isArray(le)&&!le.filter((function(e){return e})).length,icon:(0,a.jsx)(E,{}),label:W.clearFilter,onClick:function(){$.setFilterValue(void 0),v(null),["empty","notEmpty"].includes(Q._filterFn)&&U((function(e){var n;return Object.assign(Object.assign({},e),_e({},p.id,null!==(n=null==de?void 0:de[0])&&void 0!==n?n:"fuzzy"))}))},table:f},3),"subheader"===C&&(0,a.jsx)(Qn,{disabled:te&&!O,divider:F||I,icon:(0,a.jsx)(k,{}),label:null===(o=W.filterByColumn)||void 0===o?void 0:o.replace("{column}",String(Q.header)),onClick:te?ue:se,onOpenSubMenu:ge?ue:void 0,table:f},4),ge&&(0,a.jsx)(Ht,{anchorEl:ie,header:p,onSelect:se,setAnchorEl:re,table:f},5)].filter(Boolean):[]),Xe(F&&$.getCanGroup()?[(0,a.jsx)(Qn,{divider:A,icon:(0,a.jsx)(M,{}),label:null===(r=W[$.getIsGrouped()?"ungroupByColumn":"groupByColumn"])||void 0===r?void 0:r.replace("{column}",String(Q.header)),onClick:function(){$.toggleGrouping(),_((function(e){return["mrt-row-expand"].concat(Xe(e))})),v(null)},table:f},6)]:[]),Xe(A&&$.getCanPin()?[(0,a.jsx)(Qn,{disabled:"left"===$.getIsPinned()||!$.getCanPin(),icon:(0,a.jsx)(V,{style:{transform:"rotate(90deg)"}}),label:W.pinToLeft,onClick:function(){return ae("left")},table:f},7),(0,a.jsx)(Qn,{disabled:"right"===$.getIsPinned()||!$.getCanPin(),icon:(0,a.jsx)(V,{style:{transform:"rotate(-90deg)"}}),label:W.pinToRight,onClick:function(){return ae("right")},table:f},8),(0,a.jsx)(Qn,{disabled:!$.getIsPinned(),divider:I,icon:(0,a.jsx)(V,{}),label:W.unpin,onClick:function(){return ae(!1)},table:f},9)]:[]),Xe(R&&$.getCanResize()?[(0,a.jsx)(Qn,{disabled:void 0===J[$.id],icon:(0,a.jsx)(B,{}),label:W.resetColumnSize,onClick:function(){X((function(e){return Object.assign(Object.assign({},e),{isResizingColumn:!1})})),$.resetSize(),v(null)},table:f},10)]:[]),Xe(I?[(0,a.jsx)(Qn,{disabled:!$.getCanHide(),icon:(0,a.jsx)(G,{}),label:null===(s=W.hideColumn)||void 0===s?void 0:s.replace("{column}",String(Q.header)),onClick:function(){$.toggleVisibility(!1),v(null)},table:f},11),(0,a.jsx)(Qn,{disabled:!Object.values(ee).filter((function(e){return!e})).length,icon:(0,a.jsx)(L,{}),label:null===(u=W.showAllColumns)||void 0===u?void 0:u.replace("{column}",String(Q.header)),onClick:function(){x().filter((function(e){return!1!==e.columnDef.enableHiding})).forEach((function(e){return e.toggleVisibility(!0)})),v(null)},table:f},12)]:[])).filter(Boolean);return(0,a.jsx)(m.A,Object.assign({MenuListProps:{dense:"compact"===ne,sx:{backgroundColor:N}},anchorEl:b,disableScrollLock:!0,onClose:function(){return v(null)},open:!!b},h,{children:null!==(g=null!==(d=null===(c=Q.renderColumnActionsMenuItems)||void 0===c?void 0:c.call(Q,{closeMenu:function(){return v(null)},column:$,internalColumnMenuItems:be,table:f}))&&void 0!==d?d:null==q?void 0:q({closeMenu:function(){return v(null)},column:$,internalColumnMenuItems:be,table:f}))&&void 0!==g?g:be}))},Gt=function(e){var n,t,l=e.header,o=e.table,r=Wn(e,["header","table"]),c=o.options,d=c.icons.MoreVertIcon,g=c.localization,b=c.muiColumnActionsButtonProps,p=l.column,m=p.columnDef,v=Ke((0,i.useState)(null),2),f=v[0],h=v[1],x=Object.assign(Object.assign(Object.assign({},on(b,{column:p,table:o})),on(m.muiColumnActionsButtonProps,{column:p,table:o})),r);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.A,Object.assign({},$n("top"),{title:null!==(n=null==x?void 0:x.title)&&void 0!==n?n:g.columnActions,children:(0,a.jsx)(s.A,Object.assign({"aria-label":g.columnActions,onClick:function(e){e.stopPropagation(),e.preventDefault(),h(e.currentTarget)},size:"small"},x,{sx:function(e){return Object.assign({"&:hover":{opacity:1},height:"2rem",m:"-8px -4px",opacity:.3,transition:"all 150ms",width:"2rem"},on(null==x?void 0:x.sx,e))},title:void 0,children:null!==(t=null==x?void 0:x.children)&&void 0!==t?t:(0,a.jsx)(d,{style:{transform:"scale(0.9)"}})}))})),f&&(0,a.jsx)(Lt,{anchorEl:f,header:l,setAnchorEl:h,table:o})]})},Wt=function(e){var n,t,l,o=e.column,i=e.table,r=Wn(e,["column","table"]),s=i.getState,c=i.options,d=c.localization,g=c.muiFilterCheckboxProps,b=s().density,p=o.columnDef,m=Object.assign(Object.assign(Object.assign({},on(g,{column:o,table:i})),on(p.muiFilterCheckboxProps,{column:o,table:i})),r),v=null===(n=d.filterByColumn)||void 0===n?void 0:n.replace("{column}",p.header);return(0,a.jsx)(u.A,Object.assign({},$n(),{title:null!==(t=null==m?void 0:m.title)&&void 0!==t?t:v,children:(0,a.jsx)(ve.A,{control:(0,a.jsx)(x.A,Object.assign({checked:"true"===o.getFilterValue(),color:void 0===o.getFilterValue()?"default":"primary",indeterminate:void 0===o.getFilterValue(),size:"compact"===b?"small":"medium"},m,{onChange:function(e,n){var t;o.setFilterValue(void 0===o.getFilterValue()?"true":"true"===o.getFilterValue()?"false":void 0),null===(t=null==m?void 0:m.onChange)||void 0===t||t.call(m,e,n)},onClick:function(e){var n;e.stopPropagation(),null===(n=null==m?void 0:m.onClick)||void 0===n||n.call(m,e)},sx:function(e){return Object.assign({height:"2.5rem",width:"2.5rem"},on(null==m?void 0:m.sx,e))}})),disableTypography:!0,label:null!==(l=m.title)&&void 0!==l?l:v,sx:{color:"text.secondary",fontWeight:"normal",mt:"-4px"},title:void 0})}))},Nt=function(e){var n,t,l,o,r,d,g,b,p,m,v,h,j,w,C,y,O,S,A,R,F,I,P,D=e.header,T=e.rangeFilterIndex,z=e.table,M=Wn(e,["header","rangeFilterIndex","table"]),k=z.options,E=k.enableColumnFilterModes,V=k.icons,B=V.CloseIcon,H=V.FilterListIcon,L=k.localization,G=k.manualFiltering,W=k.muiFilterAutocompleteProps,N=k.muiFilterDatePickerProps,q=k.muiFilterDateTimePickerProps,K=k.muiFilterTextFieldProps,U=k.muiFilterTimePickerProps,_=z.refs.filterInputRefs,X=z.setColumnFilterFns,Z=D.column,$=Z.columnDef,Q=$.filterVariant,Y={column:Z,rangeFilterIndex:T,table:z},J=Object.assign(Object.assign(Object.assign({},on(K,Y)),on($.muiFilterTextFieldProps,Y)),M),ee=Object.assign(Object.assign({},on(W,Y)),on($.muiFilterAutocompleteProps,Y)),ne=Object.assign(Object.assign({},on(N,Y)),on($.muiFilterDatePickerProps,Y)),te=Object.assign(Object.assign({},on(q,Y)),on($.muiFilterDateTimePickerProps,Y)),le=Object.assign(Object.assign({},on(U,Y)),on($.muiFilterTimePickerProps,Y)),oe=nn({header:D,table:z}),ie=oe.allowedColumnFilterOptions,re=oe.currentFilterOption,ae=oe.facetedUniqueValues,se=oe.isAutocompleteFilter,ue=oe.isDateFilter,ce=oe.isMultiSelectFilter,de=oe.isRangeFilter,be=oe.isSelectFilter,pe=oe.isTextboxFilter,me=tn({header:D,table:z}),ve=["empty","notEmpty"].includes(re)?L["filter".concat((null===(t=null===(n=null==re?void 0:re.charAt)||void 0===n?void 0:n.call(re,0))||void 0===t?void 0:t.toUpperCase())+(null==re?void 0:re.slice(1)))]:"",Oe=de?0===T?L.min:1===T?L.max:"":null!==(l=null==J?void 0:J.placeholder)&&void 0!==l?l:null===(o=L.filterByColumn)||void 0===o?void 0:o.replace("{column}",String($.header)),Se=!(!E||!1===$.enableColumnFilterModes||T||void 0!==ie&&!(null==ie?void 0:ie.length)),Ae=Ke((0,i.useState)(null),2),Re=Ae[0],Fe=Ae[1],Ie=(0,i.useState)((function(){var e,n;return ce?Z.getFilterValue()||[]:de?(null===(e=Z.getFilterValue())||void 0===e?void 0:e[T])||"":se?"string"==typeof Z.getFilterValue()?Z.getFilterValue():"":null!==(n=Z.getFilterValue())&&void 0!==n?n:""})),Pe=Ke(Ie,2),De=Pe[0],Te=Pe[1],ze=Ke((0,i.useState)((function(){return se&&Z.getFilterValue()||null})),2),Me=ze[0],ke=ze[1],Ee=(0,i.useCallback)((0,je.A)((function(e){de?Z.setFilterValue((function(n){var t=null!=n?n:["",""];return t[T]=null!=e?e:void 0,t})):Z.setFilterValue(null!=e?e:void 0)}),pe?G?400:200:1),[]),Ve=function(e){Te(null!=e?e:""),Ee(e)},Be=function(){ce?(Te([]),Z.setFilterValue([])):de?(Te(""),Z.setFilterValue((function(e){var n=Array.isArray(e)&&e||["",""];return n[T]=void 0,n}))):se?(ke(null),Te("")):(Te(""),Z.setFilterValue(void 0))},He=(0,i.useRef)(!1);if((0,i.useEffect)((function(){if(He.current){var e=Z.getFilterValue();void 0===e?Be():Te(de&&void 0!==T?e[T]:e)}He.current=!0}),[Z.getFilterValue()]),$.Filter)return(0,a.jsx)(a.Fragment,{children:null===(r=$.Filter)||void 0===r?void 0:r.call($,{column:Z,header:D,rangeFilterIndex:T,table:z})});var Le=se||ue||ve?null:(0,a.jsx)(xe.A,{position:"end",sx:{mr:be||ce?"20px":void 0,visibility:(null!==(d=null==De?void 0:De.length)&&void 0!==d?d:0)>0?"visible":"hidden"},children:(0,a.jsx)(u.A,{placement:"right",title:null!==(g=L.clearFilter)&&void 0!==g?g:"",children:(0,a.jsx)("span",{children:(0,a.jsx)(s.A,{"aria-label":L.clearFilter,disabled:!(null===(b=null==De?void 0:De.toString())||void 0===b?void 0:b.length),onClick:Be,size:"small",sx:{height:"2rem",transform:"scale(0.9)",width:"2rem"},children:(0,a.jsx)(B,{})})})})}),Ge=Se?(0,a.jsxs)(xe.A,{position:"start",children:[(0,a.jsx)(u.A,{title:L.changeFilterMode,children:(0,a.jsx)("span",{children:(0,a.jsx)(s.A,{"aria-label":L.changeFilterMode,onClick:function(e){Fe(e.currentTarget)},size:"small",sx:{height:"1.75rem",width:"1.75rem"},children:(0,a.jsx)(H,{})})})}),ve&&(0,a.jsx)(he.A,{label:ve,onDelete:function(){Te(""),Z.setFilterValue(void 0),X((function(e){var n;return Object.assign(Object.assign({},e),_e({},D.id,null!==(n=null==ie?void 0:ie[0])&&void 0!==n?n:"fuzzy"))}))}})]}):null,We=Object.assign(Object.assign({fullWidth:!0,helperText:Se?(0,a.jsx)("label",{children:L.filterMode.replace("{filterType}",L["filter".concat((null===(p=null==re?void 0:re.charAt(0))||void 0===p?void 0:p.toUpperCase())+(null==re?void 0:re.slice(1)))])}):null,inputRef:function(e){_.current["".concat(Z.id,"-").concat(null!=T?T:0)]=e,J.inputRef&&(J.inputRef=e)},margin:"none",placeholder:ve||be||ce?void 0:Oe,variant:"standard"},J),{slotProps:Object.assign(Object.assign({},J.slotProps),{formHelperText:Object.assign({sx:{fontSize:"0.75rem",lineHeight:"0.8rem",whiteSpace:"nowrap"}},null===(m=J.slotProps)||void 0===m?void 0:m.formHelperText),input:Le?Object.assign({endAdornment:Le,startAdornment:Ge},null===(v=J.slotProps)||void 0===v?void 0:v.input):Object.assign({startAdornment:Ge},null===(h=J.slotProps)||void 0===h?void 0:h.input),htmlInput:Object.assign({"aria-label":Oe,autoComplete:"off",disabled:!!ve,sx:{textOverflow:"ellipsis",width:ve?0:void 0},title:Oe},null===(j=J.slotProps)||void 0===j?void 0:j.htmlInput)}),onKeyDown:function(e){var n;e.stopPropagation(),null===(n=J.onKeyDown)||void 0===n||n.call(J,e)},sx:function(e){return Object.assign({minWidth:ue?"160px":E&&0===T?"110px":de?"100px":ve?"auto":"120px",mx:"-2px",p:0,width:"calc(100% + 4px)"},on(null==J?void 0:J.sx,e))}}),Ne={onChange:function(e){Ve(e)},value:De||null};return(0,a.jsxs)(a.Fragment,{children:[(null==Q?void 0:Q.startsWith("time"))?(0,a.jsx)(ye.A,Object.assign({},Ne,le,{slotProps:{field:Object.assign({clearable:!0,onClear:function(){return Be()}},null===(w=null==le?void 0:le.slotProps)||void 0===w?void 0:w.field),textField:Object.assign(Object.assign({},We),null===(C=null==le?void 0:le.slotProps)||void 0===C?void 0:C.textField)}})):(null==Q?void 0:Q.startsWith("datetime"))?(0,a.jsx)(Ce.K,Object.assign({},Ne,te,{slotProps:{field:Object.assign({clearable:!0,onClear:function(){return Be()}},null===(y=null==te?void 0:te.slotProps)||void 0===y?void 0:y.field),textField:Object.assign(Object.assign({},We),null===(O=null==te?void 0:te.slotProps)||void 0===O?void 0:O.textField)}})):(null==Q?void 0:Q.startsWith("date"))?(0,a.jsx)(we.l,Object.assign({},Ne,ne,{slotProps:{field:Object.assign({clearable:!0,onClear:function(){return Be()}},null===(S=null==ne?void 0:ne.slotProps)||void 0===S?void 0:S.field),textField:Object.assign(Object.assign({},We),null===(A=null==ne?void 0:ne.slotProps)||void 0===A?void 0:A.textField)}})):se?(0,a.jsx)(fe.A,Object.assign({freeSolo:!0,getOptionLabel:function(e){return rn(e).label},onChange:function(e,n){return function(e){ke(e),Ee(rn(e).value)}(n)},options:null!==(R=null==me?void 0:me.map((function(e){return rn(e)})))&&void 0!==R?R:[],inputValue:De,onInputChange:function(e,n,t){Ve(n)}},ee,{renderInput:function(e){var n,t,l,o,i;return(0,a.jsx)(ge.A,Object.assign({},We,e,{slotProps:Object.assign(Object.assign(Object.assign({},e.slotProps),We.slotProps),{input:Object.assign(Object.assign(Object.assign({},e.InputProps),null===(n=e.slotProps)||void 0===n?void 0:n.input),{startAdornment:null===(l=null===(t=null==We?void 0:We.slotProps)||void 0===t?void 0:t.input)||void 0===l?void 0:l.startAdornment}),htmlInput:Object.assign(Object.assign(Object.assign({},e.inputProps),null===(o=e.slotProps)||void 0===o?void 0:o.htmlInput),null===(i=null==We?void 0:We.slotProps)||void 0===i?void 0:i.htmlInput)}),onClick:function(e){return e.stopPropagation()}}))},value:Me})):(0,a.jsx)(ge.A,Object.assign({select:be||ce},We,{slotProps:Object.assign(Object.assign({},We.slotProps),{inputLabel:Object.assign({shrink:be||ce},null===(F=We.slotProps)||void 0===F?void 0:F.inputLabel),select:Object.assign({MenuProps:{disableScrollLock:!0},displayEmpty:!0,multiple:ce,renderValue:ce?function(e){return Array.isArray(e)&&0!==(null==e?void 0:e.length)?(0,a.jsx)(c.A,{sx:{display:"flex",flexWrap:"wrap",gap:"2px"},children:e.map((function(e){var n=null==me?void 0:me.find((function(n){return rn(n).value===e}));return(0,a.jsx)(he.A,{label:rn(n).label},e)}))}):(0,a.jsx)(c.A,{sx:{opacity:.5},children:Oe})}:void 0},null===(I=We.slotProps)||void 0===I?void 0:I.select)}),onChange:function(e){var n,t="date"===J.type?e.target.valueAsDate:"number"===J.type?e.target.valueAsNumber:e.target.value;Ve(t),null===(n=null==J?void 0:J.onChange)||void 0===n||n.call(J,e)},onClick:function(e){return e.stopPropagation()},value:ce?Array.isArray(De)?De:[]:De,children:(be||ce)&&[(0,a.jsx)(f.A,{disabled:!0,divider:!0,hidden:!0,value:"",children:(0,a.jsx)(c.A,{sx:{opacity:.5},children:Oe})},"p")].concat([null!==(P=J.children)&&void 0!==P?P:null==me?void 0:me.map((function(e,n){var t,l=rn(e),o=l.label,i=l.value;return(0,a.jsxs)(f.A,{sx:{alignItems:"center",display:"flex",gap:"0.5rem",m:0},value:i,children:[ce&&(0,a.jsx)(x.A,{checked:(null!==(t=Z.getFilterValue())&&void 0!==t?t:[]).includes(i),sx:{mr:"0.5rem"}}),o," ",!$.filterSelectOptions&&"(".concat(ae.get(i),")")]},"".concat(n,"-").concat(i))}))])})),(0,a.jsx)(Ht,{anchorEl:Re,header:D,setAnchorEl:Fe,setFilterValue:Te,table:z})]})},qt=function(e){var n=e.header,t=e.table,l=Wn(e,["header","table"]);return(0,a.jsx)(c.A,Object.assign({},l,{sx:function(e){return Object.assign({display:"grid",gap:"1rem",gridTemplateColumns:"1fr 1fr"},on(null==l?void 0:l.sx,e))},children:[0,1].map((function(e){return(0,a.jsx)(Nt,{header:n,rangeFilterIndex:e,table:t},e)}))}))},Kt=function(e){var n,t,l=e.header,o=e.table,r=Wn(e,["header","table"]),s=o.options,u=s.enableColumnFilterModes,c=s.localization,d=s.muiFilterSliderProps,g=o.refs.filterInputRefs,b=l.column,p=b.columnDef,m=p._filterFn,v=u&&!1!==p.enableColumnFilterModes,f=Object.assign(Object.assign(Object.assign({},on(d,{column:b,table:o})),on(p.muiFilterSliderProps,{column:b,table:o})),r),x=Ke(void 0!==f.min&&void 0!==f.max?[f.min,f.max]:null!==(n=b.getFacetedMinMaxValues())&&void 0!==n?n:[0,1],2),j=x[0],w=x[1];Array.isArray(j)&&(j=j[0]),Array.isArray(w)&&(w=w[0]),null===j&&(j=0),null===w&&(w=1);var C=Ke((0,i.useState)([j,w]),2),y=C[0],O=C[1],S=b.getFilterValue(),A=(0,i.useRef)(!1);return(0,i.useEffect)((function(){A.current&&(void 0===S?O([j,w]):Array.isArray(S)&&O(S)),A.current=!0}),[S,j,w]),(0,a.jsxs)(h.A,{children:[(0,a.jsx)(Se.Ay,Object.assign({disableSwap:!0,max:w,min:j,onChange:function(e,n){O(n)},onChangeCommitted:function(e,n){Array.isArray(n)&&(n[0]<=j&&n[1]>=w?b.setFilterValue(void 0):b.setFilterValue(n))},onKeyDown:function(e){"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.stopPropagation()},value:y,valueLabelDisplay:"auto"},f,{slotProps:{input:{ref:function(e){var n,t;e&&(g.current["".concat(b.id,"-0")]=e,(null===(t=null===(n=null==f?void 0:f.slotProps)||void 0===n?void 0:n.input)||void 0===t?void 0:t.ref)&&(f.slotProps.input.ref=e))}}},sx:function(e){return Object.assign({m:"auto",minWidth:"".concat(b.getSize()-50,"px"),mt:v?"6px":"10px",px:"4px",width:"calc(100% - 8px)"},on(null==f?void 0:f.sx,e))}})),v?(0,a.jsx)(Oe.A,{sx:{fontSize:"0.75rem",lineHeight:"0.8rem",m:"-3px -6px",whiteSpace:"nowrap"},children:c.filterMode.replace("{filterType}",c["filter".concat((null===(t=null==m?void 0:m.charAt(0))||void 0===t?void 0:t.toUpperCase())+(null==m?void 0:m.slice(1)))])}):null]})},Ut=function(e){var n=e.header,t=e.table,l=Wn(e,["header","table"]),o=t.getState,i=t.options.columnFilterDisplayMode,r=o().showColumnFilters,s=n.column,u=s.columnDef,c=nn({header:n,table:t}).isRangeFilter;return(0,a.jsx)(be.A,Object.assign({in:r||"popover"===i,mountOnEnter:!0,unmountOnExit:!0},l,{children:"checkbox"===u.filterVariant?(0,a.jsx)(Wt,{column:s,table:t}):"range-slider"===u.filterVariant?(0,a.jsx)(Kt,{header:n,table:t}):c?(0,a.jsx)(qt,{header:n,table:t}):(0,a.jsx)(Nt,{header:n,table:t})}))},_t=function(e){var n,t=e.header,l=e.table,o=Wn(e,["header","table"]),r=l.options,d=r.columnFilterDisplayMode,g=r.icons.FilterAltIcon,b=r.localization,p=l.refs.filterInputRefs,m=l.setShowColumnFilters,v=t.column,f=v.columnDef,h=v.getFilterValue(),x=Ke((0,i.useState)(null),2),j=x[0],w=x[1],C=nn({header:t,table:l}),y=C.currentFilterOption,O=C.isMultiSelectFilter,S=C.isRangeFilter,A=C.isSelectFilter,R=tn({header:t,table:l}),F=function(e){return rn(null==R?void 0:R.find((function(n){return rn(n).value===(void 0!==e?h[e]:h)}))).label},I=Array.isArray(h)&&h.some(Boolean)||!!h&&!Array.isArray(h),P="popover"!==d||I?b.filteringByColumn.replace("{column}",String(f.header)).replace("{filterType}",y?b["filter".concat(y.charAt(0).toUpperCase()+y.slice(1))]:"").replace("{filterValue}",'"'.concat(Array.isArray(h)?h.map((function(e,n){return O?F(n):e})).join('" '.concat(S?b.and:b.or,' "')):A?F():h,'"')).replace('" "',""):null===(n=b.filterByColumn)||void 0===n?void 0:n.replace("{column}",String(f.header));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Ae.A,{in:"popover"===d||!!h&&!S||S&&(!!(null==h?void 0:h[0])||!!(null==h?void 0:h[1])),unmountOnExit:!0,children:(0,a.jsx)(c.A,{component:"span",sx:{flex:"0 0"},children:(0,a.jsx)(u.A,{placement:"top",title:P,children:(0,a.jsx)(s.A,Object.assign({disableRipple:!0,onClick:function(e){"popover"===d?w(e.currentTarget):m(!0),queueMicrotask((function(){var e,n,t,l,o,i;null===(t=null===(n=null===(e=p.current)||void 0===e?void 0:e["".concat(v.id,"-0")])||void 0===n?void 0:n.focus)||void 0===t||t.call(n),null===(i=null===(o=null===(l=p.current)||void 0===l?void 0:l["".concat(v.id,"-0")])||void 0===o?void 0:o.select)||void 0===i||i.call(o)})),e.stopPropagation()},size:"small"},o,{sx:function(e){return Object.assign({height:"16px",ml:"4px",opacity:I?1:.3,p:"8px",transform:"scale(0.75)",transition:"all 150ms ease-in-out",width:"16px"},on(null==o?void 0:o.sx,e))},children:(0,a.jsx)(g,{})}))})})}),"popover"===d&&(0,a.jsx)(Re.Ay,{anchorEl:j,anchorOrigin:{horizontal:"center",vertical:"top"},disableScrollLock:!0,onClick:function(e){return e.stopPropagation()},onClose:function(e){e.stopPropagation(),w(null)},onKeyDown:function(e){return"Enter"===e.key&&w(null)},open:!!j,slotProps:{paper:{sx:{overflow:"visible"}}},transformOrigin:{horizontal:"center",vertical:"bottom"},children:(0,a.jsx)(c.A,{sx:{p:"1rem"},children:(0,a.jsx)(Ut,{header:t,table:l})})})]})},Xt=function(e){var n=e.column,t=e.table,l=e.tableHeadCellRef,o=Wn(e,["column","table","tableHeadCellRef"]),i=t.getState,r=t.options,s=r.enableColumnOrdering,u=r.muiColumnDragHandleProps,c=t.setColumnOrder,d=t.setColumnPinning,g=t.setDraggingColumn,b=t.setHoveredColumn,p=n.columnDef,m=i(),v=m.columnOrder,f=m.draggingColumn,h=m.hoveredColumn,x=Object.assign(Object.assign(Object.assign({},on(u,{column:n,table:t})),on(p.muiColumnDragHandleProps,{column:n,table:t})),o);return(0,a.jsx)(tt,Object.assign({},x,{onDragEnd:function(e){var t;if(null===(t=null==x?void 0:x.onDragEnd)||void 0===t||t.call(x,e),"drop-zone"===(null==h?void 0:h.id))n.toggleGrouping();else if(s&&h&&(null==h?void 0:h.id)!==(null==f?void 0:f.id)){var l=en(n,h,v);c(l),d((function(e){var n=e.left,t=void 0===n?[]:n,o=e.right,i=void 0===o?[]:o;return{left:l.filter((function(e){return t.includes(e)})),right:l.filter((function(e){return i.includes(e)}))}}))}g(null),b(null)},onDragStart:function(e){var t;null===(t=null==x?void 0:x.onDragStart)||void 0===t||t.call(x,e),g(n);try{e.dataTransfer.setDragImage(l.current,0,0)}catch(e){console.error(e)}},table:t}))},Zt=function(e){var n,t=e.header,l=e.table,o=Wn(e,["header","table"]),i=l.getState,r=l.options,s=r.columnResizeDirection,u=r.columnResizeMode,d=l.setColumnSizingInfo,g=i().density,b=t.column,p=t.getResizeHandler(),m="compact"===g?"-8px":"comfortable"===g?"-16px":"-24px",v="display"===b.columnDef.columnDefType?"4px":"0";return(0,a.jsx)(c.A,{className:"Mui-TableHeadCell-ResizeHandle-Wrapper",onDoubleClick:function(){d((function(e){return Object.assign(Object.assign({},e),{isResizingColumn:!1})})),b.resetSize()},onMouseDown:p,onTouchStart:p,style:{transform:b.getIsResizing()&&"onEnd"===u?"translateX(".concat(("rtl"===s?-1:1)*(null!==(n=i().columnSizingInfo.deltaOffset)&&void 0!==n?n:0),"px)"):void 0},sx:function(e){return{"&:active > hr":{backgroundColor:e.palette.info.main,opacity:t.subHeaders.length||"onEnd"===u?1:0},cursor:"col-resize",left:"rtl"===s?v:void 0,ml:"rtl"===s?m:void 0,mr:"ltr"===s?m:void 0,position:"absolute",px:"4px",right:"ltr"===s?v:void 0}},children:(0,a.jsx)(Fe.A,{className:"Mui-TableHeadCell-ResizeHandle-Divider",flexItem:!0,orientation:"vertical",sx:function(e){return Object.assign({borderRadius:"2px",borderWidth:"2px",height:"24px",touchAction:"none",transform:"translateX(4px)",transition:b.getIsResizing()?void 0:"all 150ms ease-in-out",userSelect:"none",zIndex:4},on(null==o?void 0:o.sx,e))}})})},$t=function(e){var n=e.header,t=e.table,l=Wn(e,["header","table"]),o=t.getState,i=t.options,r=i.icons,s=r.ArrowDownwardIcon,c=r.SyncAltIcon,d=i.localization,g=n.column,b=g.columnDef,p=o(),m=p.isLoading,v=p.showSkeletons,f=p.sorting,h=!!g.getIsSorted(),x=m||v?"":g.getIsSorted()?"desc"===g.getIsSorted()?d.sortedByColumnDesc.replace("{column}",b.header):d.sortedByColumnAsc.replace("{column}",b.header):"desc"===g.getNextSortingOrder()?d.sortByColumnDesc.replace("{column}",b.header):d.sortByColumnAsc.replace("{column}",b.header),j=h?g.getIsSorted():void 0;return(0,a.jsx)(u.A,{placement:"top",title:x,children:(0,a.jsx)(Ie.A,{badgeContent:f.length>1?g.getSortIndex()+1:0,overlap:"circular",children:(0,a.jsx)(Pe.A,Object.assign({IconComponent:h?s:function(e){return(0,a.jsx)(c,Object.assign({},e,{direction:j,style:{transform:"rotate(-90deg) scaleX(0.9) translateX(-1px)"}}))},active:!0,"aria-label":x,direction:j,onClick:function(e){var t;e.stopPropagation(),null===(t=n.column.getToggleSortingHandler())||void 0===t||t(e)}},l,{sx:function(e){return Object.assign({".MuiTableSortLabel-icon":{color:"".concat("dark"===e.palette.mode?e.palette.text.primary:e.palette.text.secondary," !important")},flex:"0 0",opacity:h?1:.3,transition:"all 150ms ease-in-out",width:"3ch"},on(null==l?void 0:l.sx,e))}}))})})},Qt=function(e){var n,t,l,o,r,s,u,d=e.columnVirtualizer,g=e.header,b=e.staticColumnIndex,m=e.table,v=Wn(e,["columnVirtualizer","header","staticColumnIndex","table"]),f=(0,p.A)(),h=m.getState,x=m.options,j=x.columnFilterDisplayMode,w=x.columnResizeDirection,C=x.columnResizeMode,y=x.enableKeyboardShortcuts,O=x.enableColumnActions,S=x.enableColumnDragging,A=x.enableColumnOrdering,R=x.enableColumnPinning,F=x.enableGrouping,I=x.enableMultiSort,P=x.layoutMode,D=x.mrtTheme.draggingBorderColor,T=x.muiTableHeadCellProps,z=m.refs.tableHeadCellRefs,M=m.setHoveredColumn,k=h(),E=k.columnSizingInfo,V=k.density,B=k.draggingColumn,H=k.grouping,L=k.hoveredColumn,G=k.showColumnFilters,W=g.column,N=W.columnDef,q=N.columnDefType,K=Object.assign(Object.assign(Object.assign({},on(T,{column:W,table:m})),on(N.muiTableHeadCellProps,{column:W,table:m})),v),U=R&&"group"!==N.columnDefType&&W.getIsPinned(),_=(O||N.enableColumnActions)&&!1!==N.enableColumnActions,X=!1!==S&&!1!==N.enableColumnDragging&&(S||A&&!1!==N.enableColumnOrdering||F&&!1!==N.enableGrouping&&!H.includes(W.id)),Z=(0,i.useMemo)((function(){var e=0;return W.getCanSort()&&(e+=1),_&&(e+=1.75),X&&(e+=1.5),e}),[_,X]),$=(0,i.useMemo)((function(){var e=E.isResizingColumn===W.id&&"onChange"===C&&!g.subHeaders.length,n=e?"2px solid ".concat(D," !important"):(null==B?void 0:B.id)===W.id?"1px dashed ".concat(f.palette.grey[500]):(null==L?void 0:L.id)===W.id?"2px dashed ".concat(D):void 0;return e?"ltr"===w?{borderRight:n}:{borderLeft:n}:n?{borderLeft:n,borderRight:n,borderTop:n}:void 0}),[B,L,E.isResizingColumn]),Q=null!==(n=on(N.Header,{column:W,header:g,table:m}))&&void 0!==n?n:N.header;return(0,a.jsxs)(ce.A,Object.assign({align:"group"===q?"center":"rtl"===f.direction?"right":"left","aria-sort":W.getIsSorted()?"asc"===W.getIsSorted()?"ascending":"descending":"none",colSpan:g.colSpan,"data-can-sort":W.getCanSort()||void 0,"data-index":b,"data-pinned":!!U||void 0,"data-sort":W.getIsSorted()||void 0,onDragEnter:function(e){F&&"drop-zone"===(null==L?void 0:L.id)&&M(null),A&&B&&"group"!==q&&M(!1!==N.enableColumnOrdering?W:null)},onDragOver:function(e){!1!==N.enableColumnOrdering&&e.preventDefault()},ref:function(e){var n;e&&(z.current[W.id]=e,"group"!==q&&(null===(n=null==d?void 0:d.measureElement)||void 0===n||n.call(d,e)))},tabIndex:y?0:void 0},K,{onKeyDown:function(e){var n;null===(n=null==K?void 0:K.onKeyDown)||void 0===n||n.call(K,e),vn({event:e,cellValue:g.column.columnDef.header,table:m,header:g})},sx:function(e){return Object.assign(Object.assign({"& :hover":{".MuiButtonBase-root":{opacity:1}},flexDirection:(null==P?void 0:P.startsWith("grid"))?"column":void 0,fontWeight:"bold",overflow:"visible",p:"compact"===V?"0.5rem":"comfortable"===V?"display"===q?"0.75rem":"1rem":"display"===q?"1rem 1.25rem":"1.5rem",pb:"display"===q?0:G||"compact"===V?"0.4rem":"0.6rem",pt:"group"===q||"compact"===V?"0.25rem":"comfortable"===V?".75rem":"1.25rem",userSelect:I&&W.getCanSort()?"none":void 0,verticalAlign:"top"},_n({column:W,header:g,table:m,tableCellProps:K,theme:e})),$)},children:[g.isPlaceholder?null:null!==(t=K.children)&&void 0!==t?t:(0,a.jsxs)(c.A,{className:"Mui-TableHeadCell-Content",sx:{alignItems:"center",display:"flex",flexDirection:"right"===(null==K?void 0:K.align)?"row-reverse":"row",justifyContent:"group"===q||"center"===(null==K?void 0:K.align)?"center":W.getCanResize()?"space-between":"flex-start",position:"relative",width:"100%"},children:[(0,a.jsxs)(c.A,{className:"Mui-TableHeadCell-Content-Labels",onClick:W.getToggleSortingHandler(),sx:{alignItems:"center",cursor:W.getCanSort()&&"group"!==q?"pointer":void 0,display:"flex",flexDirection:"right"===(null==K?void 0:K.align)?"row-reverse":"row",overflow:"data"===q?"hidden":void 0,pl:"center"===(null==K?void 0:K.align)?"".concat(Z,"rem"):void 0},children:[(0,a.jsx)(c.A,{className:"Mui-TableHeadCell-Content-Wrapper",sx:{"&:hover":{textOverflow:"clip"},minWidth:"".concat(Math.min(null!==(o=null===(l=N.header)||void 0===l?void 0:l.length)&&void 0!==o?o:0,4),"ch"),overflow:"data"===q?"hidden":void 0,textOverflow:"ellipsis",whiteSpace:(null!==(s=null===(r=N.header)||void 0===r?void 0:r.length)&&void 0!==s?s:0)<20?"nowrap":"normal"},children:Q}),W.getCanFilter()&&(0,a.jsx)(_t,{header:g,table:m}),W.getCanSort()&&(0,a.jsx)($t,{header:g,table:m})]}),"group"!==q&&(0,a.jsxs)(c.A,{className:"Mui-TableHeadCell-Content-Actions",sx:{whiteSpace:"nowrap"},children:[X&&(0,a.jsx)(Xt,{column:W,table:m,tableHeadCellRef:{current:null===(u=z.current)||void 0===u?void 0:u[W.id]}}),_&&(0,a.jsx)(Gt,{header:g,table:m})]}),W.getCanResize()&&(0,a.jsx)(Zt,{header:g,table:m})]}),"subheader"===j&&W.getCanFilter()&&(0,a.jsx)(Ut,{header:g,table:m})]}))},Yt=function(e){var n=e.columnVirtualizer,t=e.headerGroup,l=e.table,o=Wn(e,["columnVirtualizer","headerGroup","table"]),i=l.options,r=i.enableStickyHeader,s=i.layoutMode,u=i.mrtTheme.baseBackgroundColor,c=i.muiTableHeadRowProps,d=null!=n?n:{},g=d.virtualColumns,p=d.virtualPaddingLeft,m=d.virtualPaddingRight,v=Object.assign(Object.assign({},on(c,{headerGroup:t,table:l})),o);return(0,a.jsxs)(se.A,Object.assign({},v,{sx:function(e){return Object.assign({backgroundColor:u,boxShadow:"4px 0 8px ".concat((0,b.X4)(e.palette.common.black,.1)),display:(null==s?void 0:s.startsWith("grid"))?"flex":void 0,position:r&&"semantic"===s?"sticky":"relative",top:0},on(null==v?void 0:v.sx,e))},children:[p?(0,a.jsx)("th",{style:{display:"flex",width:p}}):null,(null!=g?g:t.headers).map((function(e,o){var i=e;return n&&(o=e.index,i=t.headers[o]),i?(0,a.jsx)(Qt,{columnVirtualizer:n,header:i,staticColumnIndex:o,table:l},i.id):null})),m?(0,a.jsx)("th",{style:{display:"flex",width:m}}):null]}))},Jt=function(e){var n,t,l,o=e.stackAlertBanner,r=e.table,s=Wn(e,["stackAlertBanner","table"]),u=r.getFilteredSelectedRowModel,g=r.getCoreRowModel,b=r.getState,p=r.options,m=p.enableRowSelection,v=p.enableSelectAll,f=p.localization,x=p.manualPagination,j=p.muiToolbarAlertBannerChipProps,w=p.muiToolbarAlertBannerProps,C=p.positionToolbarAlertBanner,y=p.renderToolbarAlertBannerContent,O=p.rowCount,S=r.refs.tablePaperRef,A=b(),R=A.density,F=A.grouping,I=A.rowSelection,P=A.showAlertBanner,D=Object.assign(Object.assign({},on(w,{table:r})),s),T=on(j,{table:r}),z=null!=O?O:g().rows.length,M=u().rows.length,k=(0,i.useMemo)((function(){return x?Object.values(I).filter(Boolean).length:M}),[I,z,x,M]),E=k>0?(0,a.jsxs)(h.A,{alignItems:"center",direction:"row",gap:"16px",children:[null===(t=null===(n=f.selectedCountOfRowCountRowsSelected)||void 0===n?void 0:n.replace("{selectedCount}",k.toLocaleString(f.language)))||void 0===t?void 0:t.replace("{rowCount}",z.toLocaleString(f.language)),(0,a.jsx)(d.A,{onClick:function(e){return gn({table:r})(e,!1,!0)},size:"small",sx:{p:"2px"},children:f.clearSelection})]}):null,V=F.length>0?(0,a.jsxs)("span",{children:[f.groupedBy," ",F.map((function(e,n){return(0,a.jsxs)(i.Fragment,{children:[n>0?f.thenBy:"",(0,a.jsx)(he.A,Object.assign({label:r.getColumn(e).columnDef.header,onDelete:function(){return r.getColumn(e).toggleGrouping()}},T))]},"".concat(n,"-").concat(e))}))]}):null;return(0,a.jsx)(be.A,{in:P||!!E||!!V,timeout:o?200:0,children:(0,a.jsx)(De.A,Object.assign({color:"info",icon:!1},D,{sx:function(e){var n,t;return Object.assign({"& .MuiAlert-message":{maxWidth:"calc(".concat(null!==(t=null===(n=S.current)||void 0===n?void 0:n.clientWidth)&&void 0!==t?t:360,"px - 1rem)"),width:"100%"},borderRadius:0,fontSize:"1rem",left:0,mb:o?0:"bottom"===C?"-1rem":void 0,p:0,position:"relative",right:0,top:0,width:"100%",zIndex:2},on(null==D?void 0:D.sx,e))},children:null!==(l=null==y?void 0:y({groupedAlert:V,selectedAlert:E,table:r}))&&void 0!==l?l:(0,a.jsxs)(a.Fragment,{children:[(null==D?void 0:D.title)&&(0,a.jsx)(Te.A,{children:D.title}),(0,a.jsxs)(h.A,{sx:{p:"head-overlay"!==C?"0.5rem 1rem":"spacious"===R?"0.75rem 1.25rem":"comfortable"===R?"0.5rem 0.75rem":"0.25rem 0.5rem"},children:[null==D?void 0:D.children,(null==D?void 0:D.children)&&(E||V)&&(0,a.jsx)("br",{}),(0,a.jsxs)(c.A,{sx:{display:"flex"},children:[m&&v&&"head-overlay"===C&&(0,a.jsx)(dt,{table:r})," ",E]}),E&&V&&(0,a.jsx)("br",{}),V]})]})}))})},el=function(e){var n=e.columnVirtualizer,t=e.table,l=Wn(e,["columnVirtualizer","table"]),o=t.getState,i=t.options,r=i.enableStickyHeader,s=i.layoutMode,u=i.muiTableHeadProps,c=i.positionToolbarAlertBanner,d=t.refs.tableHeadRef,g=o(),b=g.isFullScreen,p=g.showAlertBanner,m=Object.assign(Object.assign({},on(u,{table:t})),l),v=r||b;return(0,a.jsx)(me.A,Object.assign({},m,{ref:function(e){d.current=e,(null==m?void 0:m.ref)&&(m.ref.current=e)},sx:function(e){return Object.assign({display:(null==s?void 0:s.startsWith("grid"))?"grid":void 0,opacity:.97,position:v?"sticky":"relative",top:v&&(null==s?void 0:s.startsWith("grid"))?0:void 0,zIndex:v?2:void 0},on(null==m?void 0:m.sx,e))},children:"head-overlay"===c&&(p||t.getSelectedRowModel().rows.length>0)?(0,a.jsx)("tr",{style:{display:(null==s?void 0:s.startsWith("grid"))?"grid":void 0},children:(0,a.jsx)("th",{colSpan:t.getVisibleLeafColumns().length,style:{display:(null==s?void 0:s.startsWith("grid"))?"grid":void 0,padding:0},children:(0,a.jsx)(Jt,{table:t})})}):t.getHeaderGroups().map((function(e){return(0,a.jsx)(Yt,{columnVirtualizer:n,headerGroup:e,table:t},e.id)}))}))},nl=function(e){var n=e.table,t=Wn(e,["table"]),l=n.getFlatHeaders,o=n.getState,r=n.options,s=r.columns,u=r.enableStickyHeader,c=r.enableTableFooter,d=r.enableTableHead,g=r.layoutMode,b=r.memoMode,p=r.muiTableProps,m=r.renderCaption,v=o(),f=v.columnSizing,h=v.columnSizingInfo,x=v.columnVisibility,j=v.isFullScreen,w=Object.assign(Object.assign({},on(p,{table:n})),t),C=on(m,{table:n}),y=(0,i.useMemo)((function(){for(var e=l(),n={},t=0;t<e.length;t++){var o=e[t],i=o.getSize();n["--header-".concat(qn(o.id),"-size")]=i,n["--col-".concat(qn(o.column.id),"-size")]=i}return n}),[s,f,h,x]),O=function(e){var n,t,l,o,r=e.getState,a=e.options,s=a.columnVirtualizerInstanceRef,u=a.columnVirtualizerOptions,c=a.enableColumnPinning,d=a.enableColumnVirtualization,g=e.refs.tableContainerRef,b=r(),p=b.columnPinning,m=b.columnVisibility,v=b.draggingColumn;if(d){var f=on(u,{table:e}),h=e.getVisibleLeafColumns(),x=Ke((0,i.useMemo)((function(){return c?[e.getLeftVisibleLeafColumns().map((function(e){return e.getPinnedIndex()})),e.getRightVisibleLeafColumns().map((function(e){return h.length-e.getPinnedIndex()-1})).sort((function(e,n){return e-n}))]:[[],[]]}),[p,m,c]),2),j=x[0],w=x[1],C=j.length,y=w.length,O=(0,i.useMemo)((function(){return(null==v?void 0:v.id)?h.findIndex((function(e){return e.id===(null==v?void 0:v.id)})):void 0}),[null==v?void 0:v.id]),S=(0,te.Te)(Object.assign({count:h.length,estimateSize:function(e){return h[e].getSize()},getScrollElement:function(){return g.current},horizontal:!0,overscan:3,rangeExtractor:(0,i.useCallback)((function(e){var n=jt(e,O);return C||y?Xe(new Set([].concat(Xe(j),Xe(n),Xe(w)))):n}),[j,w,O])},f)),A=S.getVirtualItems();S.virtualColumns=A;var R=A.length;if(R){var F=S.getTotalSize(),I=(null===(n=A[C])||void 0===n?void 0:n.start)||0,P=(null===(t=A[j.length-1])||void 0===t?void 0:t.end)||0,D=(null===(l=A[R-y])||void 0===l?void 0:l.start)||0,T=(null===(o=A[R-y-1])||void 0===o?void 0:o.end)||0;S.virtualPaddingLeft=I-P,S.virtualPaddingRight=F-T-(y?F-D:0)}return s&&(s.current=S),S}}(n),S={columnVirtualizer:O,table:n};return(0,a.jsxs)(ie.A,Object.assign({stickyHeader:u||j},w,{style:Object.assign(Object.assign({},y),null==w?void 0:w.style),sx:function(e){return Object.assign({borderCollapse:"separate",display:(null==g?void 0:g.startsWith("grid"))?"grid":void 0,position:"relative"},on(null==w?void 0:w.sx,e))},children:[!!C&&(0,a.jsx)("caption",{children:C}),d&&(0,a.jsx)(el,Object.assign({},S)),"table-body"===b||h.isResizingColumn?(0,a.jsx)(Dt,Object.assign({},S)):(0,a.jsx)(Pt,Object.assign({},S)),c&&(0,a.jsx)(Mt,Object.assign({},S))]}))},tl=function(e){var n,t=e.table,l=Wn(e,["table"]),o=t.options,i=o.id,r=o.localization,s=o.mrtTheme.baseBackgroundColor,u=o.muiCircularProgressProps,d=Object.assign(Object.assign({},on(u,{table:t})),l);return(0,a.jsx)(c.A,{sx:{alignItems:"center",backgroundColor:(0,b.X4)(s,.5),bottom:0,display:"flex",justifyContent:"center",left:0,maxHeight:"100vh",position:"absolute",right:0,top:0,width:"100%",zIndex:3},children:null!==(n=null==d?void 0:d.Component)&&void 0!==n?n:(0,a.jsx)(g.A,Object.assign({"aria-label":r.noRecordsToDisplay,id:"mrt-progress-".concat(i)},d))})},ll=function(e){var n,t,l=e.table,o=Wn(e,["table"]),i=l.getState,r=l.options,s=r.editDisplayMode,u=r.enableClickToCopy,c=r.enableEditing,d=r.icons,g=d.ContentCopy,b=d.EditIcon,p=r.localization,v=r.mrtTheme.menuBackgroundColor,f=r.renderCellActionMenuItems,h=l.refs.actionCellRef,x=i(),j=x.actionCell,w=x.density,C=j,y=C.row,O=C.column,S=O.columnDef,A=function(e){null==e||e.stopPropagation(),l.setActionCell(null),h.current=null},R=[("context-menu"===on(u,C)||"context-menu"===on(S.enableClickToCopy,C))&&(0,a.jsx)(Qn,{icon:(0,a.jsx)(g,{}),label:p.copy,onClick:function(e){e.stopPropagation(),navigator.clipboard.writeText(C.getValue()),A()},table:l},"mrt-copy"),on(c,y)&&"cell"===s&&(0,a.jsx)(Qn,{icon:(0,a.jsx)(b,{}),label:p.edit,onClick:function(){mn({cell:C,table:l}),A()},table:l},"mrt-edit")].filter(Boolean),F={cell:C,closeMenu:A,column:O,internalMenuItems:R,row:y,table:l},I=null!==(t=null===(n=S.renderCellActionMenuItems)||void 0===n?void 0:n.call(S,F))&&void 0!==t?t:null==f?void 0:f(F);return(!!(null==I?void 0:I.length)||!!(null==R?void 0:R.length))&&(0,a.jsx)(m.A,Object.assign({MenuListProps:{dense:"compact"===w,sx:{backgroundColor:v}},anchorEl:h.current,disableScrollLock:!0,onClick:function(e){return e.stopPropagation()},onClose:A,open:!!C,transformOrigin:{horizontal:-100,vertical:8}},o,{children:null!=I?I:R}))},ol=function(e){var n,t=e.open,l=e.table,o=Wn(e,["open","table"]),i=l.getState,r=l.options,s=r.localization,u=r.muiCreateRowModalProps,c=r.muiEditRowDialogProps,d=r.onCreatingRowCancel,g=r.onEditingRowCancel,b=r.renderCreateRowDialogContent,p=r.renderEditRowDialogContent,m=l.setCreatingRow,v=l.setEditingRow,f=i(),x=f.creatingRow,j=f.editingRow,w=null!=x?x:j,C=Object.assign(Object.assign(Object.assign({},on(c,{row:w,table:l})),x&&on(u,{row:w,table:l})),o),y=w.getAllCells().filter((function(e){return"data"===e.column.columnDef.columnDefType})).map((function(e){return(0,a.jsx)(Ot,{cell:e,table:l},e.id)}));return(0,a.jsx)(ze.A,Object.assign({fullWidth:!0,maxWidth:"xs",onClose:function(e,n){var t;x?(null==d||d({row:w,table:l}),m(null)):(null==g||g({row:w,table:l}),v(null)),w._valuesCache={},null===(t=C.onClose)||void 0===t||t.call(C,e,n)},open:t},C,{children:null!==(n=x&&(null==b?void 0:b({internalEditComponents:y,row:w,table:l}))||(null==p?void 0:p({internalEditComponents:y,row:w,table:l})))&&void 0!==n?n:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Ee.A,{sx:{textAlign:"center"},children:s.edit}),(0,a.jsx)(ke.A,{children:(0,a.jsx)("form",{onSubmit:function(e){return e.preventDefault()},children:(0,a.jsx)(h.A,{sx:{gap:"32px",paddingTop:"16px",width:"100%"},children:y})})}),(0,a.jsx)(Me.A,{sx:{p:"1.25rem"},children:(0,a.jsx)(Nn,{row:w,table:l,variant:"text"})})]})}))},il="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,rl=function(e){var n=e.table,t=Wn(e,["table"]),l=n.getState,o=n.options,r=o.createDisplayMode,s=o.editDisplayMode,u=o.enableCellActions,c=o.enableStickyHeader,d=o.muiTableContainerProps,g=n.refs,b=g.bottomToolbarRef,p=g.tableContainerRef,m=g.topToolbarRef,v=l(),f=v.actionCell,h=v.creatingRow,x=v.editingRow,j=v.isFullScreen,w=v.isLoading,C=v.showLoadingOverlay,y=!1!==C&&(w||C),O=Ke((0,i.useState)(0),2),S=O[0],A=O[1],R=Object.assign(Object.assign({},on(d,{table:n})),t);il((function(){var e,n,t,l,o="undefined"!=typeof document&&null!==(n=null===(e=m.current)||void 0===e?void 0:e.offsetHeight)&&void 0!==n?n:0,i="undefined"!=typeof document&&null!==(l=null===(t=null==b?void 0:b.current)||void 0===t?void 0:t.offsetHeight)&&void 0!==l?l:0;A(o+i)}));var F="modal"===r&&h,I="modal"===s&&x;return(0,a.jsxs)(oe.A,Object.assign({"aria-busy":y,"aria-describedby":y?"mrt-progress":void 0},R,{ref:function(e){e&&(p.current=e,(null==R?void 0:R.ref)&&(R.ref.current=e))},style:Object.assign({maxHeight:j?"calc(100vh - ".concat(S,"px)"):void 0},null==R?void 0:R.style),sx:function(e){return Object.assign({maxHeight:c?"clamp(350px, calc(100vh - ".concat(S,"px), 9999px)"):void 0,maxWidth:"100%",overflow:"auto",position:"relative"},on(null==R?void 0:R.sx,e))},children:[y?(0,a.jsx)(tl,{table:n}):null,(0,a.jsx)(nl,{table:n}),(F||I)&&(0,a.jsx)(ol,{open:!0,table:n}),u&&f&&(0,a.jsx)(ll,{table:n})]}))},al=function(e){var n=e.isTopToolbar,t=e.table,l=Wn(e,["isTopToolbar","table"]),o=t.getState,i=t.options.muiLinearProgressProps,r=o(),s=r.isSaving,u=r.showProgressBars,c=Object.assign(Object.assign({},on(i,{isTopToolbar:n,table:t})),l);return(0,a.jsx)(be.A,{in:!1!==u&&(u||s),mountOnEnter:!0,sx:{bottom:n?0:void 0,position:"absolute",top:n?void 0:0,width:"100%"},unmountOnExit:!0,children:(0,a.jsx)(Be.A,Object.assign({"aria-busy":"true","aria-label":"Loading",sx:{position:"relative"}},c))})},sl=[5,10,15,20,25,30,50,100],ul=function(e){var n=e.position,t=void 0===n?"bottom":n,l=e.table,o=Wn(e,["position","table"]),i=(0,p.A)(),r=(0,Ve.A)("(max-width: 720px)"),d=l.getState,g=l.options,b=g.enableToolbarInternalActions,m=g.icons,v=m.ChevronLeftIcon,h=m.ChevronRightIcon,x=m.FirstPageIcon,j=m.LastPageIcon,w=g.id,C=g.localization,y=g.muiPaginationProps,O=g.paginationDisplayMode,S=d().pagination,A=S.pageIndex,R=void 0===A?0:A,F=S.pageSize,I=void 0===F?10:F,P=Object.assign(Object.assign({},on(y,{table:l})),o),D=l.getRowCount(),T=l.getPageCount(),z=T>2,M=R*I,k=Math.min(R*I+I,D),E=null!=P?P:{},V=E.SelectProps,B=void 0===V?{}:V,H=E.disabled,L=void 0!==H&&H,G=E.rowsPerPageOptions,W=void 0===G?sl:G,N=E.showFirstButton,q=void 0===N?z:N,K=E.showLastButton,U=void 0===K?z:K,_=E.showRowsPerPage,X=void 0===_||_,Z=Wn(E,["SelectProps","disabled","rowsPerPageOptions","showFirstButton","showLastButton","showRowsPerPage"]),$=R<=0||L,Q=k>=D||L;r&&!1!==(null==B?void 0:B.native)&&(B.native=!0);var Y=$n();return(0,a.jsxs)(c.A,{className:"MuiTablePagination-root",sx:{alignItems:"center",display:"flex",flexWrap:"wrap",gap:"8px",justifyContent:{md:"space-between",sm:"center"},justifySelf:"flex-end",mt:"top"===t&&b?"3rem":void 0,position:"relative",px:"8px",py:"12px",zIndex:2},children:[X&&(0,a.jsxs)(c.A,{sx:{alignItems:"center",display:"flex",gap:"8px"},children:[(0,a.jsx)(He.A,{htmlFor:"mrt-rows-per-page-".concat(w),sx:{mb:0},children:C.rowsPerPage}),(0,a.jsx)(We.A,Object.assign({MenuProps:{disableScrollLock:!0},disableUnderline:!0,disabled:L,inputProps:{"aria-label":C.rowsPerPage,id:"mrt-rows-per-page-".concat(w)},label:C.rowsPerPage,onChange:function(e){return l.setPageSize(+e.target.value)},sx:{mb:0},value:I,variant:"standard"},B,{children:W.map((function(e){var n,t="number"!=typeof e?e.value:e,l="number"!=typeof e?e.label:"".concat(e);return null!==(n=null==B?void 0:B.children)&&void 0!==n?n:(null==B?void 0:B.native)?(0,a.jsx)("option",{value:t,children:l},t):(0,a.jsx)(f.A,{sx:{m:0},value:t,children:l},t)}))}))]}),"pages"===O?(0,a.jsx)(Le.A,Object.assign({count:T,disabled:L,onChange:function(e,n){return l.setPageIndex(n-1)},page:R+1,renderItem:function(e){return(0,a.jsx)(Ge.A,Object.assign({slots:{first:x,last:j,next:h,previous:v}},e))},showFirstButton:q,showLastButton:U},Z)):"default"===O?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ae.A,{align:"center",component:"span",sx:{m:"0 4px",minWidth:"8ch"},variant:"body2",children:"".concat(0===k?0:(M+1).toLocaleString(C.language),"-").concat(k.toLocaleString(C.language)," ").concat(C.of," ").concat(D.toLocaleString(C.language))}),(0,a.jsxs)(c.A,{gap:"xs",children:[q&&(0,a.jsx)(u.A,Object.assign({},Y,{title:C.goToFirstPage,children:(0,a.jsx)("span",{children:(0,a.jsx)(s.A,{"aria-label":C.goToFirstPage,disabled:$,onClick:function(){return l.firstPage()},size:"small",children:(0,a.jsx)(x,Object.assign({},Zn(i)))})})})),(0,a.jsx)(u.A,Object.assign({},Y,{title:C.goToPreviousPage,children:(0,a.jsx)("span",{children:(0,a.jsx)(s.A,{"aria-label":C.goToPreviousPage,disabled:$,onClick:function(){return l.previousPage()},size:"small",children:(0,a.jsx)(v,Object.assign({},Zn(i)))})})})),(0,a.jsx)(u.A,Object.assign({},Y,{title:C.goToNextPage,children:(0,a.jsx)("span",{children:(0,a.jsx)(s.A,{"aria-label":C.goToNextPage,disabled:Q,onClick:function(){return l.nextPage()},size:"small",children:(0,a.jsx)(h,Object.assign({},Zn(i)))})})})),U&&(0,a.jsx)(u.A,Object.assign({},Y,{title:C.goToLastPage,children:(0,a.jsx)("span",{children:(0,a.jsx)(s.A,{"aria-label":C.goToLastPage,disabled:Q,onClick:function(){return l.lastPage()},size:"small",children:(0,a.jsx)(j,Object.assign({},Zn(i)))})})}))]})]}):null]})},cl=function(e){var n,t,l=e.table,o=Wn(e,["table"]),r=l.getState,s=l.options,u=s.enableGrouping,d=s.localization,g=l.setHoveredColumn,p=l.setShowToolbarDropZone,m=r(),v=m.draggingColumn,f=m.grouping,h=m.hoveredColumn,x=m.showToolbarDropZone;return(0,i.useEffect)((function(){var e;void 0!==(null===(e=l.options.state)||void 0===e?void 0:e.showToolbarDropZone)&&p(!!u&&!!v&&!1!==v.columnDef.enableGrouping&&!f.includes(v.id))}),[u,v,f]),(0,a.jsx)(Ne.A,{in:x,children:(0,a.jsx)(c.A,Object.assign({className:"Mui-ToolbarDropZone",onDragEnter:function(e){g({id:"drop-zone"})},onDragOver:function(e){e.preventDefault()}},o,{sx:function(e){return Object.assign({alignItems:"center",backdropFilter:"blur(4px)",backgroundColor:(0,b.X4)(e.palette.info.main,"drop-zone"===(null==h?void 0:h.id)?.2:.1),border:"dashed ".concat(e.palette.info.main," 2px"),boxSizing:"border-box",display:"flex",height:"100%",justifyContent:"center",position:"absolute",width:"100%",zIndex:4},on(null==o?void 0:o.sx,e))},children:(0,a.jsx)(ae.A,{fontStyle:"italic",children:d.dropToGroupBy.replace("{column}",null!==(t=null===(n=null==v?void 0:v.columnDef)||void 0===n?void 0:n.header)&&void 0!==t?t:"")})}))})},dl=function(e){var n=e.table,t=Wn(e,["table"]),l=n.getState,o=n.options,i=o.enablePagination,r=o.muiBottomToolbarProps,s=o.positionPagination,u=o.positionToolbarAlertBanner,d=o.positionToolbarDropZone,g=o.renderBottomToolbarCustomActions,p=n.refs.bottomToolbarRef,m=l().isFullScreen,v=(0,Ve.A)("(max-width:720px)"),f=Object.assign(Object.assign({},on(r,{table:n})),t),h=v||!!g;return(0,a.jsxs)(c.A,Object.assign({},f,{ref:function(e){e&&(p.current=e,(null==f?void 0:f.ref)&&(f.ref.current=e))},sx:function(e){return Object.assign(Object.assign(Object.assign({},Xn({table:n,theme:e})),{bottom:m?"0":void 0,boxShadow:"0 1px 2px -1px ".concat((0,b.X4)(e.palette.grey[700],.5)," inset"),left:0,position:m?"fixed":"relative",right:0}),on(null==f?void 0:f.sx,e))},children:[(0,a.jsx)(al,{isTopToolbar:!1,table:n}),"bottom"===u&&(0,a.jsx)(Jt,{stackAlertBanner:h,table:n}),["both","bottom"].includes(null!=d?d:"")&&(0,a.jsx)(cl,{table:n}),(0,a.jsxs)(c.A,{sx:{alignItems:"center",boxSizing:"border-box",display:"flex",justifyContent:"space-between",p:"0.5rem",width:"100%"},children:[g?g({table:n}):(0,a.jsx)("span",{}),(0,a.jsx)(c.A,{sx:{display:"flex",justifyContent:"flex-end",position:h?"relative":"absolute",right:0,top:0},children:i&&["both","bottom"].includes(null!=s?s:"")&&(0,a.jsx)(ul,{position:"bottom",table:n})})]})]}))},gl=function(e){var n=e.column,t=e.table,l=Wn(e,["column","table"]),o=t.options,i=o.icons.PushPinIcon,r=o.localization,d=function(e){n.pin(e)};return(0,a.jsx)(c.A,Object.assign({},l,{sx:function(e){return Object.assign({minWidth:"70px",textAlign:"center"},on(null==l?void 0:l.sx,e))},children:n.getIsPinned()?(0,a.jsx)(u.A,{title:r.unpin,children:(0,a.jsx)(s.A,{onClick:function(){return d(!1)},size:"small",children:(0,a.jsx)(i,{})})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.A,{title:r.pinToLeft,children:(0,a.jsx)(s.A,{onClick:function(){return d("left")},size:"small",children:(0,a.jsx)(i,{style:{transform:"rotate(90deg)"}})})}),(0,a.jsx)(u.A,{title:r.pinToRight,children:(0,a.jsx)(s.A,{onClick:function(){return d("right")},size:"small",children:(0,a.jsx)(i,{style:{transform:"rotate(-90deg)"}})})})]})}))},bl=function(e){var n,t=e.allColumns,l=e.column,o=e.hoveredColumn,r=e.isNestedColumns,s=e.setHoveredColumn,d=e.table,g=Wn(e,["allColumns","column","hoveredColumn","isNestedColumns","setHoveredColumn","table"]),b=d.getState,p=d.options,m=p.enableColumnOrdering,v=p.enableColumnPinning,h=p.enableHiding,x=p.localization,j=p.mrtTheme.draggingBorderColor,w=d.setColumnOrder,C=d.setColumnPinning,y=b().columnOrder,O=l.columnDef,S=O.columnDefType,A=l.getIsVisible(),R=(0,i.useRef)(null),F=Ke((0,i.useState)(!1),2),I=F[0],P=F[1];return O.header&&!1!==O.visibleInShowHideMenu?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.A,Object.assign({disableRipple:!0,onDragEnter:function(e){I||!1===O.enableColumnOrdering||s(l)},ref:R},g,{sx:function(e){return Object.assign({alignItems:"center",justifyContent:"flex-start",my:0,opacity:I?.5:1,outline:I?"2px dashed ".concat(e.palette.grey[500]):(null==o?void 0:o.id)===l.id?"2px dashed ".concat(j):"none",outlineOffset:"-2px",pl:"".concat(2*(l.depth+.5),"rem"),py:"6px"},on(null==g?void 0:g.sx,e))},children:(0,a.jsxs)(c.A,{sx:{display:"flex",flexWrap:"nowrap",gap:"8px"},children:["group"!==S&&m&&!r&&(!1!==O.enableColumnOrdering?(0,a.jsx)(tt,{onDragEnd:function(e){if(P(!1),s(null),o){var n=en(l,o,y);w(n),C((function(e){var t=e.left,l=void 0===t?[]:t,o=e.right,i=void 0===o?[]:o;return{left:n.filter((function(e){return l.includes(e)})),right:n.filter((function(e){return i.includes(e)}))}}))}},onDragStart:function(e){P(!0);try{e.dataTransfer.setDragImage(R.current,0,0)}catch(e){console.error(e)}},table:d}):(0,a.jsx)(c.A,{sx:{width:"28px"}})),v&&(l.getCanPin()?(0,a.jsx)(gl,{column:l,table:d}):(0,a.jsx)(c.A,{sx:{width:"70px"}})),h?(0,a.jsx)(ve.A,{checked:A,componentsProps:{typography:{sx:{mb:0,opacity:"display"!==S?1:.5}}},control:(0,a.jsx)(u.A,Object.assign({},$n(),{title:x.toggleVisibility,children:(0,a.jsx)(qe.A,{})})),disabled:!l.getCanHide(),label:O.header,onChange:function(){return function(e){var n,t;"group"===S?null===(t=null===(n=null==e?void 0:e.columns)||void 0===n?void 0:n.forEach)||void 0===t||t.call(n,(function(e){e.toggleVisibility(!A)})):e.toggleVisibility()}(l)}}):(0,a.jsx)(ae.A,{sx:{alignSelf:"center"},children:O.header})]})})),null===(n=l.columns)||void 0===n?void 0:n.map((function(e,n){return(0,a.jsx)(bl,{allColumns:t,column:e,hoveredColumn:o,isNestedColumns:r,setHoveredColumn:s,table:d},"".concat(n,"-").concat(e.id))}))]}):null},pl=function(e){var n=e.anchorEl,t=e.setAnchorEl,l=e.table,o=Wn(e,["anchorEl","setAnchorEl","table"]),r=l.getAllColumns,s=l.getAllLeafColumns,u=l.getCenterLeafColumns,g=l.getIsAllColumnsVisible,b=l.getIsSomeColumnsPinned,p=l.getIsSomeColumnsVisible,v=l.getLeftLeafColumns,f=l.getRightLeafColumns,h=l.getState,x=l.initialState,j=l.options,w=j.enableColumnOrdering,C=j.enableColumnPinning,y=j.enableHiding,O=j.localization,S=j.mrtTheme.menuBackgroundColor,A=h(),R=A.columnOrder,F=A.columnPinning,I=A.density,P=function(e){s().filter((function(e){return!1!==e.columnDef.enableHiding})).forEach((function(n){return n.toggleVisibility(e)}))},D=(0,i.useMemo)((function(){var e=r();return R.length>0&&!e.some((function(e){return"group"===e.columnDef.columnDefType}))?[].concat(Xe(v()),Xe(Array.from(new Set(R)).map((function(e){return u().find((function(n){return(null==n?void 0:n.id)===e}))}))),Xe(f())).filter(Boolean):e}),[R,F,r(),u(),v(),f()]),T=D.some((function(e){return"group"===e.columnDef.columnDefType})),z=(0,i.useMemo)((function(){return R.length!==x.columnOrder.length||!R.every((function(e,n){return e===x.columnOrder[n]}))}),[R,x.columnOrder]),M=Ke((0,i.useState)(null),2),k=M[0],E=M[1];return(0,a.jsxs)(m.A,Object.assign({MenuListProps:{dense:"compact"===I,sx:{backgroundColor:S}},anchorEl:n,disableScrollLock:!0,onClose:function(){return t(null)},open:!!n},o,{children:[(0,a.jsxs)(c.A,{sx:{display:"flex",justifyContent:"space-between",p:"0.5rem",pt:0},children:[y&&(0,a.jsx)(d.A,{disabled:!p(),onClick:function(){return P(!1)},children:O.hideAll}),w&&(0,a.jsx)(d.A,{onClick:function(){return l.setColumnOrder(Sn(l.options,!0))},disabled:!z,children:O.resetOrder}),C&&(0,a.jsx)(d.A,{disabled:!b(),onClick:function(){return l.resetColumnPinning(!0)},children:O.unpinAll}),y&&(0,a.jsx)(d.A,{disabled:g(),onClick:function(){return P(!0)},children:O.showAll})]}),(0,a.jsx)(Fe.A,{}),D.map((function(e,n){return(0,a.jsx)(bl,{allColumns:D,column:e,hoveredColumn:k,isNestedColumns:T,setHoveredColumn:E,table:l},"".concat(n,"-").concat(e.id))}))]}))},ml=function(e){var n,t=e.table,l=Wn(e,["table"]),o=t.options,r=o.icons.ViewColumnIcon,c=o.localization,d=Ke((0,i.useState)(null),2),g=d[0],b=d[1];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.A,{title:null!==(n=null==l?void 0:l.title)&&void 0!==n?n:c.showHideColumns,children:(0,a.jsx)(s.A,Object.assign({"aria-label":c.showHideColumns,onClick:function(e){b(e.currentTarget)}},l,{title:void 0,children:(0,a.jsx)(r,{})}))}),g&&(0,a.jsx)(pl,{anchorEl:g,setAnchorEl:b,table:t})]})},vl=function(e){var n,t=e.table,l=Wn(e,["table"]),o=t.getState,i=t.options,r=i.icons,c=r.DensityLargeIcon,d=r.DensityMediumIcon,g=r.DensitySmallIcon,b=i.localization,p=t.setDensity,m=o().density;return(0,a.jsx)(u.A,{title:null!==(n=null==l?void 0:l.title)&&void 0!==n?n:b.toggleDensity,children:(0,a.jsx)(s.A,Object.assign({"aria-label":b.toggleDensity,onClick:function(){p("comfortable"===m?"compact":"compact"===m?"spacious":"comfortable")}},l,{title:void 0,children:"compact"===m?(0,a.jsx)(g,{}):"comfortable"===m?(0,a.jsx)(d,{}):(0,a.jsx)(c,{})}))})},fl=function(e){var n,t=e.table,l=Wn(e,["table"]),o=t.getState,i=t.options,r=i.icons,c=r.FilterListIcon,d=r.FilterListOffIcon,g=i.localization,b=t.setShowColumnFilters,p=o().showColumnFilters;return(0,a.jsx)(u.A,{title:null!==(n=null==l?void 0:l.title)&&void 0!==n?n:g.showHideFilters,children:(0,a.jsx)(s.A,Object.assign({"aria-label":g.showHideFilters,onClick:function(){b(!p)}},l,{title:void 0,children:p?(0,a.jsx)(d,{}):(0,a.jsx)(c,{})}))})},hl=function(e){var n,t=e.table,l=Wn(e,["table"]),o=t.getState,r=t.options,c=r.icons,d=c.FullscreenExitIcon,g=c.FullscreenIcon,b=r.localization,p=t.setIsFullScreen,m=o().isFullScreen,v=Ke((0,i.useState)(!1),2),f=v[0],h=v[1];return(0,a.jsx)(u.A,{open:f,title:null!==(n=null==l?void 0:l.title)&&void 0!==n?n:b.toggleFullScreen,children:(0,a.jsx)(s.A,Object.assign({"aria-label":b.toggleFullScreen,onBlur:function(){return h(!1)},onClick:function(){h(!1),p(!m)},onFocus:function(){return h(!0)},onMouseEnter:function(){return h(!0)},onMouseLeave:function(){return h(!1)}},l,{title:void 0,children:m?(0,a.jsx)(d,{}):(0,a.jsx)(g,{})}))})},xl=function(e){var n,t,l=e.table,o=Wn(e,["table"]),i=l.getState,r=l.options,c=r.icons,d=c.SearchIcon,g=c.SearchOffIcon,b=r.localization,p=l.refs.searchInputRef,m=l.setShowGlobalFilter,v=i(),f=v.globalFilter,h=v.showGlobalFilter;return(0,a.jsx)(u.A,{title:null!==(n=null==o?void 0:o.title)&&void 0!==n?n:b.showHideSearch,children:(0,a.jsx)(s.A,Object.assign({"aria-label":null!==(t=null==o?void 0:o.title)&&void 0!==t?t:b.showHideSearch,disabled:!!f&&h,onClick:function(){m(!h),queueMicrotask((function(){var e;return null===(e=p.current)||void 0===e?void 0:e.focus()}))}},o,{title:void 0,children:h?(0,a.jsx)(g,{}):(0,a.jsx)(d,{})}))})},jl=function(e){var n,t=e.table,l=Wn(e,["table"]),o=t.options,i=o.columnFilterDisplayMode,r=o.enableColumnFilters,s=o.enableColumnOrdering,u=o.enableColumnPinning,d=o.enableDensityToggle,g=o.enableFilters,b=o.enableFullScreenToggle,p=o.enableGlobalFilter,m=o.enableHiding,v=o.initialState,f=o.renderToolbarInternalActions;return(0,a.jsx)(c.A,Object.assign({},l,{sx:function(e){return Object.assign({alignItems:"center",display:"flex",zIndex:3},on(null==l?void 0:l.sx,e))},children:null!==(n=null==f?void 0:f({table:t}))&&void 0!==n?n:(0,a.jsxs)(a.Fragment,{children:[g&&p&&!(null==v?void 0:v.showGlobalFilter)&&(0,a.jsx)(xl,{table:t}),g&&r&&"popover"!==i&&(0,a.jsx)(fl,{table:t}),(m||s||u)&&(0,a.jsx)(ml,{table:t}),d&&(0,a.jsx)(vl,{table:t}),b&&(0,a.jsx)(hl,{table:t})]})}))},wl=function(e){var n,t=e.table,l=Wn(e,["table"]),o=t.getState,r=t.options,c=r.enableGlobalFilterModes,d=r.icons,g=d.CloseIcon,b=d.SearchIcon,p=r.localization,m=r.manualFiltering,v=r.muiSearchTextFieldProps,f=t.refs.searchInputRef,h=t.setGlobalFilter,x=o(),j=x.globalFilter,w=x.showGlobalFilter,C=Object.assign(Object.assign({},on(v,{table:t})),l),y=(0,i.useRef)(!1),O=Ke((0,i.useState)(null),2),S=O[0],A=O[1],R=Ke((0,i.useState)(null!=j?j:""),2),F=R[0],I=R[1],P=(0,i.useCallback)((0,je.A)((function(e){var n;h(null!==(n=e.target.value)&&void 0!==n?n:void 0)}),m?500:250),[]),D=function(){I(""),h(void 0)};return(0,i.useEffect)((function(){y.current&&(void 0===j?D():I(j)),y.current=!0}),[j]),(0,a.jsxs)(be.A,{in:w,mountOnEnter:!0,orientation:"horizontal",unmountOnExit:!0,children:[(0,a.jsx)(ge.A,Object.assign({inputProps:Object.assign({autoComplete:"off"},C.inputProps),onChange:function(e){I(e.target.value),P(e)},placeholder:p.search,size:"small",value:null!=F?F:"",variant:"outlined"},C,{InputProps:Object.assign(Object.assign({endAdornment:(0,a.jsx)(xe.A,{position:"end",children:(0,a.jsx)(u.A,{title:null!==(n=p.clearSearch)&&void 0!==n?n:"",children:(0,a.jsx)("span",{children:(0,a.jsx)(s.A,{"aria-label":p.clearSearch,disabled:!(null==F?void 0:F.length),onClick:D,size:"small",children:(0,a.jsx)(g,{})})})})}),startAdornment:c?(0,a.jsx)(xe.A,{position:"start",children:(0,a.jsx)(u.A,{title:p.changeSearchMode,children:(0,a.jsx)(s.A,{"aria-label":p.changeSearchMode,onClick:function(e){A(e.currentTarget)},size:"small",sx:{height:"1.75rem",width:"1.75rem"},children:(0,a.jsx)(b,{})})})}):(0,a.jsx)(b,{style:{marginRight:"4px"}})},C.InputProps),{sx:function(e){var n;return Object.assign({mb:0},on(null===(n=null==C?void 0:C.InputProps)||void 0===n?void 0:n.sx,e))}}),inputRef:function(e){f.current=e,(null==C?void 0:C.inputRef)&&(C.inputRef=e)}})),(0,a.jsx)(Ht,{anchorEl:S,onSelect:D,setAnchorEl:A,table:t})]})},Cl=function(e){var n,t=e.table,l=t.getState,o=t.options,i=o.enableGlobalFilter,r=o.enablePagination,s=o.enableToolbarInternalActions,u=o.muiTopToolbarProps,d=o.positionGlobalFilter,g=o.positionPagination,b=o.positionToolbarAlertBanner,p=o.positionToolbarDropZone,m=o.renderTopToolbarCustomActions,v=t.refs.topToolbarRef,f=l(),h=f.isFullScreen,x=f.showGlobalFilter,j=(0,Ve.A)("(max-width:720px)"),w=(0,Ve.A)("(max-width:1024px)"),C=on(u,{table:t}),y=j||!!m||x&&w,O={sx:w?void 0:{zIndex:2},table:t};return(0,a.jsxs)(c.A,Object.assign({},C,{ref:function(e){v.current=e,(null==C?void 0:C.ref)&&(C.ref.current=e)},sx:function(e){return Object.assign(Object.assign(Object.assign({},Xn({table:t,theme:e})),{position:h?"sticky":"relative",top:h?"0":void 0}),on(null==C?void 0:C.sx,e))},children:["top"===b&&(0,a.jsx)(Jt,{stackAlertBanner:y,table:t}),["both","top"].includes(null!=p?p:"")&&(0,a.jsx)(cl,{table:t}),(0,a.jsxs)(c.A,{sx:{alignItems:"flex-start",boxSizing:"border-box",display:"flex",gap:"0.5rem",justifyContent:"space-between",p:"0.5rem",position:y?"relative":"absolute",right:0,top:0,width:"100%"},children:[i&&"left"===d&&(0,a.jsx)(wl,Object.assign({},O)),null!==(n=null==m?void 0:m({table:t}))&&void 0!==n?n:(0,a.jsx)("span",{}),s?(0,a.jsxs)(c.A,{sx:{alignItems:"center",display:"flex",flexWrap:"wrap-reverse",gap:"0.5rem",justifyContent:"flex-end"},children:[i&&"right"===d&&(0,a.jsx)(wl,Object.assign({},O)),(0,a.jsx)(jl,{table:t})]}):i&&"right"===d&&(0,a.jsx)(wl,Object.assign({},O))]}),r&&["both","top"].includes(null!=g?g:"")&&(0,a.jsx)(ul,{position:"top",table:t}),(0,a.jsx)(al,{isTopToolbar:!0,table:t})]}))},yl=function(e){var n,t,l=e.table,o=Wn(e,["table"]),i=l.getState,r=l.options,s=r.enableBottomToolbar,u=r.enableTopToolbar,c=r.mrtTheme.baseBackgroundColor,d=r.muiTablePaperProps,g=r.renderBottomToolbar,b=r.renderTopToolbar,m=l.refs.tablePaperRef,v=i().isFullScreen,f=Object.assign(Object.assign({},on(d,{table:l})),o),h=(0,p.A)();return(0,a.jsxs)(le.A,Object.assign({elevation:2,onKeyDown:function(e){return"Escape"===e.key&&l.setIsFullScreen(!1)}},f,{ref:function(e){m.current=e,(null==f?void 0:f.ref)&&(f.ref.current=e)},style:Object.assign(Object.assign({},v?{bottom:0,height:"100dvh",left:0,margin:0,maxHeight:"100dvh",maxWidth:"100dvw",padding:0,position:"fixed",right:0,top:0,width:"100dvw",zIndex:h.zIndex.modal}:{}),null==f?void 0:f.style),sx:function(e){return Object.assign({backgroundColor:c,backgroundImage:"unset",overflow:"hidden",transition:"all 100ms ease-in-out"},on(null==f?void 0:f.sx,e))},children:[u&&(null!==(n=on(b,{table:l}))&&void 0!==n?n:(0,a.jsx)(Cl,{table:l})),(0,a.jsx)(rl,{table:l}),s&&(null!==(t=on(g,{table:l}))&&void 0!==t?t:(0,a.jsx)(dl,{table:l}))]}))},Ol=function(e){var n;return n=function(e){return void 0!==e.table}(e)?e.table:xt(e),(0,a.jsx)(yl,{table:n})}}}]);