Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tanstack/table-core

Package Overview
Dependencies
Maintainers
1
Versions
195
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tanstack/table-core - npm Package Compare versions

Comparing version 8.0.0-alpha.72 to 8.0.0-alpha.73

4

build/cjs/core.js

@@ -153,3 +153,3 @@ /**

initialState,
queue: cb => {
_queue: cb => {
queued.push(cb);

@@ -212,3 +212,3 @@

},
render: (template, props) => {
_render: (template, props) => {
if (typeof instance.options.render === 'function') {

@@ -215,0 +215,0 @@ return instance.options.render(template, props);

@@ -58,3 +58,3 @@ /**

getValue: () => row.getValue(columnId),
renderCell: () => column.cell ? instance.render(column.cell, {
renderCell: () => column.cell ? instance._render(column.cell, {
instance,

@@ -61,0 +61,0 @@ column,

@@ -39,5 +39,6 @@ /**

if (!registered) {
instance.queue(() => {
instance._queue(() => {
registered = true;
});
return;

@@ -53,3 +54,4 @@ }

queued = true;
instance.queue(() => {
instance._queue(() => {
instance.resetExpanded();

@@ -56,0 +58,0 @@ queued = false;

@@ -139,3 +139,3 @@ /**

const template = (_column$aggregatedCel = column.aggregatedCell) != null ? _column$aggregatedCel : column.cell;
return template ? instance.render(template, {
return template ? instance._render(template, {
instance,

@@ -142,0 +142,0 @@ column,

@@ -50,3 +50,3 @@ /**

},
renderHeader: () => column.header ? instance.render(column.header, {
renderHeader: () => column.header ? instance._render(column.header, {
instance,

@@ -56,3 +56,3 @@ header: header,

}) : null,
renderFooter: () => column.footer ? instance.render(column.footer, {
renderFooter: () => column.footer ? instance._render(column.footer, {
instance,

@@ -59,0 +59,0 @@ header: header,

@@ -36,4 +36,3 @@ /**

return {
onPaginationChange: utils.makeStateUpdater('pagination', instance),
autoResetPageIndex: true
onPaginationChange: utils.makeStateUpdater('pagination', instance)
};

@@ -46,17 +45,17 @@ },

_autoResetPageIndex: () => {
var _ref, _instance$options$aut;
if (!registered) {
instance.queue(() => {
instance._queue(() => {
registered = true;
});
return;
}
if (instance.options.autoResetAll === false) {
return;
}
if (instance.options.autoResetAll === true || instance.options.autoResetPageIndex) {
if ((_ref = (_instance$options$aut = instance.options.autoResetAll) != null ? _instance$options$aut : instance.options.autoResetPageIndex) != null ? _ref : !instance.options.manualPagination) {
if (queued) return;
queued = true;
instance.queue(() => {
instance._queue(() => {
instance.resetPageIndex();

@@ -83,3 +82,3 @@ queued = false;

let pageIndex = utils.functionalUpdate(updater, old.pageIndex);
const maxPageIndex = old.pageCount && old.pageCount > 0 ? old.pageCount - 1 : Number.MAX_SAFE_INTEGER;
const maxPageIndex = typeof old.pageCount !== 'undefined' ? old.pageCount - 1 : Number.MAX_SAFE_INTEGER;
pageIndex = Math.min(Math.max(0, pageIndex), maxPageIndex);

@@ -86,0 +85,0 @@ return { ...old,

@@ -142,3 +142,3 @@ /**

onChange: () => {
instance.queue(() => {
instance._queue(() => {
instance._autoResetExpanded();

@@ -145,0 +145,0 @@

@@ -13,3 +13,3 @@ {

{
"uid": "540e-64",
"uid": "1ed1-64",
"name": "utils.ts"

@@ -21,55 +21,55 @@ },

{
"uid": "540e-66",
"uid": "1ed1-66",
"name": "Columns.ts"
},
{
"uid": "540e-68",
"uid": "1ed1-68",
"name": "Rows.ts"
},
{
"uid": "540e-70",
"uid": "1ed1-70",
"name": "Cells.ts"
},
{
"uid": "540e-72",
"uid": "1ed1-72",
"name": "ColumnSizing.ts"
},
{
"uid": "540e-74",
"uid": "1ed1-74",
"name": "Expanding.ts"
},
{
"uid": "540e-78",
"uid": "1ed1-78",
"name": "Filters.ts"
},
{
"uid": "540e-82",
"uid": "1ed1-82",
"name": "Grouping.ts"
},
{
"uid": "540e-84",
"uid": "1ed1-84",
"name": "Ordering.ts"
},
{
"uid": "540e-86",
"uid": "1ed1-86",
"name": "Pagination.ts"
},
{
"uid": "540e-88",
"uid": "1ed1-88",
"name": "Pinning.ts"
},
{
"uid": "540e-90",
"uid": "1ed1-90",
"name": "RowSelection.ts"
},
{
"uid": "540e-94",
"uid": "1ed1-94",
"name": "Sorting.ts"
},
{
"uid": "540e-96",
"uid": "1ed1-96",
"name": "Visibility.ts"
},
{
"uid": "540e-98",
"uid": "1ed1-98",
"name": "Headers.ts"

@@ -80,19 +80,19 @@ }

{
"uid": "540e-76",
"uid": "1ed1-76",
"name": "filterFns.ts"
},
{
"uid": "540e-80",
"uid": "1ed1-80",
"name": "aggregationFns.ts"
},
{
"uid": "540e-92",
"uid": "1ed1-92",
"name": "sortingFns.ts"
},
{
"uid": "540e-100",
"uid": "1ed1-100",
"name": "core.ts"
},
{
"uid": "540e-102",
"uid": "1ed1-102",
"name": "createTable.ts"

@@ -104,39 +104,39 @@ },

{
"uid": "540e-104",
"uid": "1ed1-104",
"name": "getCoreRowModel.ts"
},
{
"uid": "540e-106",
"uid": "1ed1-106",
"name": "filterRowsUtils.ts"
},
{
"uid": "540e-108",
"uid": "1ed1-108",
"name": "getFilteredRowModel.ts"
},
{
"uid": "540e-110",
"uid": "1ed1-110",
"name": "getFacetedRowModel.ts"
},
{
"uid": "540e-112",
"uid": "1ed1-112",
"name": "getFacetedUniqueValues.ts"
},
{
"uid": "540e-114",
"uid": "1ed1-114",
"name": "getFacetedMinMaxValues.ts"
},
{
"uid": "540e-116",
"uid": "1ed1-116",
"name": "getSortedRowModel.ts"
},
{
"uid": "540e-118",
"uid": "1ed1-118",
"name": "getGroupedRowModel.ts"
},
{
"uid": "540e-120",
"uid": "1ed1-120",
"name": "getExpandedRowModel.ts"
},
{
"uid": "540e-122",
"uid": "1ed1-122",
"name": "getPaginationRowModel.ts"

@@ -147,3 +147,3 @@ }

{
"uid": "540e-124",
"uid": "1ed1-124",
"name": "index.ts"

@@ -159,194 +159,194 @@ }

"nodeParts": {
"540e-64": {
"1ed1-64": {
"renderedLength": 2201,
"gzipLength": 800,
"brotliLength": 0,
"mainUid": "540e-63"
"mainUid": "1ed1-63"
},
"540e-66": {
"1ed1-66": {
"renderedLength": 6485,
"gzipLength": 1337,
"brotliLength": 0,
"mainUid": "540e-65"
"mainUid": "1ed1-65"
},
"540e-68": {
"1ed1-68": {
"renderedLength": 2312,
"gzipLength": 753,
"brotliLength": 0,
"mainUid": "540e-67"
"mainUid": "1ed1-67"
},
"540e-70": {
"renderedLength": 2169,
"gzipLength": 627,
"1ed1-70": {
"renderedLength": 2170,
"gzipLength": 628,
"brotliLength": 0,
"mainUid": "540e-69"
"mainUid": "1ed1-69"
},
"540e-72": {
"1ed1-72": {
"renderedLength": 9977,
"gzipLength": 2210,
"brotliLength": 0,
"mainUid": "540e-71"
"mainUid": "1ed1-71"
},
"540e-74": {
"renderedLength": 5682,
"gzipLength": 1309,
"1ed1-74": {
"renderedLength": 5686,
"gzipLength": 1314,
"brotliLength": 0,
"mainUid": "540e-73"
"mainUid": "1ed1-73"
},
"540e-76": {
"1ed1-76": {
"renderedLength": 2743,
"gzipLength": 666,
"brotliLength": 0,
"mainUid": "540e-75"
"mainUid": "1ed1-75"
},
"540e-78": {
"1ed1-78": {
"renderedLength": 10222,
"gzipLength": 1895,
"brotliLength": 0,
"mainUid": "540e-77"
"mainUid": "1ed1-77"
},
"540e-80": {
"1ed1-80": {
"renderedLength": 2146,
"gzipLength": 642,
"brotliLength": 0,
"mainUid": "540e-79"
"mainUid": "1ed1-79"
},
"540e-82": {
"renderedLength": 5311,
"1ed1-82": {
"renderedLength": 5312,
"gzipLength": 1351,
"brotliLength": 0,
"mainUid": "540e-81"
"mainUid": "1ed1-81"
},
"540e-84": {
"1ed1-84": {
"renderedLength": 2231,
"gzipLength": 767,
"brotliLength": 0,
"mainUid": "540e-83"
"mainUid": "1ed1-83"
},
"540e-86": {
"renderedLength": 6230,
"gzipLength": 1360,
"1ed1-86": {
"renderedLength": 6265,
"gzipLength": 1382,
"brotliLength": 0,
"mainUid": "540e-85"
"mainUid": "1ed1-85"
},
"540e-88": {
"1ed1-88": {
"renderedLength": 7888,
"gzipLength": 1365,
"brotliLength": 0,
"mainUid": "540e-87"
"mainUid": "1ed1-87"
},
"540e-90": {
"1ed1-90": {
"renderedLength": 12833,
"gzipLength": 2446,
"brotliLength": 0,
"mainUid": "540e-89"
"mainUid": "1ed1-89"
},
"540e-92": {
"1ed1-92": {
"renderedLength": 2712,
"gzipLength": 830,
"brotliLength": 0,
"mainUid": "540e-91"
"mainUid": "1ed1-91"
},
"540e-94": {
"1ed1-94": {
"renderedLength": 8530,
"gzipLength": 2017,
"brotliLength": 0,
"mainUid": "540e-93"
"mainUid": "1ed1-93"
},
"540e-96": {
"1ed1-96": {
"renderedLength": 5057,
"gzipLength": 1101,
"brotliLength": 0,
"mainUid": "540e-95"
"mainUid": "1ed1-95"
},
"540e-98": {
"renderedLength": 16052,
"1ed1-98": {
"renderedLength": 16054,
"gzipLength": 2629,
"brotliLength": 0,
"mainUid": "540e-97"
"mainUid": "1ed1-97"
},
"540e-100": {
"renderedLength": 7030,
"gzipLength": 1872,
"1ed1-100": {
"renderedLength": 7032,
"gzipLength": 1875,
"brotliLength": 0,
"mainUid": "540e-99"
"mainUid": "1ed1-99"
},
"540e-102": {
"1ed1-102": {
"renderedLength": 1457,
"gzipLength": 527,
"brotliLength": 0,
"mainUid": "540e-101"
"mainUid": "1ed1-101"
},
"540e-104": {
"1ed1-104": {
"renderedLength": 2153,
"gzipLength": 754,
"brotliLength": 0,
"mainUid": "540e-103"
"mainUid": "1ed1-103"
},
"540e-106": {
"1ed1-106": {
"renderedLength": 2626,
"gzipLength": 639,
"brotliLength": 0,
"mainUid": "540e-105"
"mainUid": "1ed1-105"
},
"540e-108": {
"1ed1-108": {
"renderedLength": 3734,
"gzipLength": 1048,
"brotliLength": 0,
"mainUid": "540e-107"
"mainUid": "1ed1-107"
},
"540e-110": {
"1ed1-110": {
"renderedLength": 1209,
"gzipLength": 506,
"brotliLength": 0,
"mainUid": "540e-109"
"mainUid": "1ed1-109"
},
"540e-112": {
"1ed1-112": {
"renderedLength": 1068,
"gzipLength": 422,
"brotliLength": 0,
"mainUid": "540e-111"
"mainUid": "1ed1-111"
},
"540e-114": {
"1ed1-114": {
"renderedLength": 1238,
"gzipLength": 443,
"brotliLength": 0,
"mainUid": "540e-113"
"mainUid": "1ed1-113"
},
"540e-116": {
"1ed1-116": {
"renderedLength": 3098,
"gzipLength": 1007,
"brotliLength": 0,
"mainUid": "540e-115"
"mainUid": "1ed1-115"
},
"540e-118": {
"renderedLength": 5412,
"1ed1-118": {
"renderedLength": 5413,
"gzipLength": 1484,
"brotliLength": 0,
"mainUid": "540e-117"
"mainUid": "1ed1-117"
},
"540e-120": {
"1ed1-120": {
"renderedLength": 1265,
"gzipLength": 498,
"brotliLength": 0,
"mainUid": "540e-119"
"mainUid": "1ed1-119"
},
"540e-122": {
"1ed1-122": {
"renderedLength": 1030,
"gzipLength": 396,
"brotliLength": 0,
"mainUid": "540e-121"
"mainUid": "1ed1-121"
},
"540e-124": {
"1ed1-124": {
"renderedLength": 0,
"gzipLength": 0,
"brotliLength": 0,
"mainUid": "540e-123"
"mainUid": "1ed1-123"
}
},
"nodeMetas": {
"540e-63": {
"1ed1-63": {
"id": "/packages/table-core/src/utils.ts",
"moduleParts": {
"index.production.js": "540e-64"
"index.production.js": "1ed1-64"
},

@@ -356,86 +356,86 @@ "imported": [],

{
"uid": "540e-123"
"uid": "1ed1-123"
},
{
"uid": "540e-99"
"uid": "1ed1-99"
},
{
"uid": "540e-71"
"uid": "1ed1-71"
},
{
"uid": "540e-73"
"uid": "1ed1-73"
},
{
"uid": "540e-77"
"uid": "1ed1-77"
},
{
"uid": "540e-81"
"uid": "1ed1-81"
},
{
"uid": "540e-97"
"uid": "1ed1-97"
},
{
"uid": "540e-83"
"uid": "1ed1-83"
},
{
"uid": "540e-85"
"uid": "1ed1-85"
},
{
"uid": "540e-87"
"uid": "1ed1-87"
},
{
"uid": "540e-89"
"uid": "1ed1-89"
},
{
"uid": "540e-93"
"uid": "1ed1-93"
},
{
"uid": "540e-95"
"uid": "1ed1-95"
},
{
"uid": "540e-103"
"uid": "1ed1-103"
},
{
"uid": "540e-107"
"uid": "1ed1-107"
},
{
"uid": "540e-109"
"uid": "1ed1-109"
},
{
"uid": "540e-111"
"uid": "1ed1-111"
},
{
"uid": "540e-113"
"uid": "1ed1-113"
},
{
"uid": "540e-115"
"uid": "1ed1-115"
},
{
"uid": "540e-117"
"uid": "1ed1-117"
},
{
"uid": "540e-119"
"uid": "1ed1-119"
},
{
"uid": "540e-121"
"uid": "1ed1-121"
},
{
"uid": "540e-65"
"uid": "1ed1-65"
},
{
"uid": "540e-67"
"uid": "1ed1-67"
},
{
"uid": "540e-69"
"uid": "1ed1-69"
}
]
},
"540e-65": {
"1ed1-65": {
"id": "/packages/table-core/src/features/Columns.ts",
"moduleParts": {
"index.production.js": "540e-66"
"index.production.js": "1ed1-66"
},
"imported": [
{
"uid": "540e-63"
"uid": "1ed1-63"
}

@@ -445,14 +445,14 @@ ],

{
"uid": "540e-99"
"uid": "1ed1-99"
}
]
},
"540e-67": {
"1ed1-67": {
"id": "/packages/table-core/src/features/Rows.ts",
"moduleParts": {
"index.production.js": "540e-68"
"index.production.js": "1ed1-68"
},
"imported": [
{
"uid": "540e-63"
"uid": "1ed1-63"
}

@@ -462,14 +462,14 @@ ],

{
"uid": "540e-99"
"uid": "1ed1-99"
}
]
},
"540e-69": {
"1ed1-69": {
"id": "/packages/table-core/src/features/Cells.ts",
"moduleParts": {
"index.production.js": "540e-70"
"index.production.js": "1ed1-70"
},
"imported": [
{
"uid": "540e-63"
"uid": "1ed1-63"
}

@@ -479,14 +479,14 @@ ],

{
"uid": "540e-99"
"uid": "1ed1-99"
}
]
},
"540e-71": {
"1ed1-71": {
"id": "/packages/table-core/src/features/ColumnSizing.ts",
"moduleParts": {
"index.production.js": "540e-72"
"index.production.js": "1ed1-72"
},
"imported": [
{
"uid": "540e-63"
"uid": "1ed1-63"
}

@@ -496,17 +496,17 @@ ],

{
"uid": "540e-123"
"uid": "1ed1-123"
},
{
"uid": "540e-99"
"uid": "1ed1-99"
}
]
},
"540e-73": {
"1ed1-73": {
"id": "/packages/table-core/src/features/Expanding.ts",
"moduleParts": {
"index.production.js": "540e-74"
"index.production.js": "1ed1-74"
},
"imported": [
{
"uid": "540e-63"
"uid": "1ed1-63"
}

@@ -516,13 +516,13 @@ ],

{
"uid": "540e-123"
"uid": "1ed1-123"
},
{
"uid": "540e-99"
"uid": "1ed1-99"
}
]
},
"540e-75": {
"1ed1-75": {
"id": "/packages/table-core/src/filterFns.ts",
"moduleParts": {
"index.production.js": "540e-76"
"index.production.js": "1ed1-76"
},

@@ -532,17 +532,17 @@ "imported": [],

{
"uid": "540e-77"
"uid": "1ed1-77"
}
]
},
"540e-77": {
"1ed1-77": {
"id": "/packages/table-core/src/features/Filters.ts",
"moduleParts": {
"index.production.js": "540e-78"
"index.production.js": "1ed1-78"
},
"imported": [
{
"uid": "540e-75"
"uid": "1ed1-75"
},
{
"uid": "540e-63"
"uid": "1ed1-63"
}

@@ -552,13 +552,13 @@ ],

{
"uid": "540e-123"
"uid": "1ed1-123"
},
{
"uid": "540e-99"
"uid": "1ed1-99"
}
]
},
"540e-79": {
"1ed1-79": {
"id": "/packages/table-core/src/aggregationFns.ts",
"moduleParts": {
"index.production.js": "540e-80"
"index.production.js": "1ed1-80"
},

@@ -568,17 +568,17 @@ "imported": [],

{
"uid": "540e-81"
"uid": "1ed1-81"
}
]
},
"540e-81": {
"1ed1-81": {
"id": "/packages/table-core/src/features/Grouping.ts",
"moduleParts": {
"index.production.js": "540e-82"
"index.production.js": "1ed1-82"
},
"imported": [
{
"uid": "540e-79"
"uid": "1ed1-79"
},
{
"uid": "540e-63"
"uid": "1ed1-63"
}

@@ -588,23 +588,23 @@ ],

{
"uid": "540e-123"
"uid": "1ed1-123"
},
{
"uid": "540e-99"
"uid": "1ed1-99"
},
{
"uid": "540e-83"
"uid": "1ed1-83"
}
]
},
"540e-83": {
"1ed1-83": {
"id": "/packages/table-core/src/features/Ordering.ts",
"moduleParts": {
"index.production.js": "540e-84"
"index.production.js": "1ed1-84"
},
"imported": [
{
"uid": "540e-63"
"uid": "1ed1-63"
},
{
"uid": "540e-81"
"uid": "1ed1-81"
}

@@ -614,17 +614,17 @@ ],

{
"uid": "540e-123"
"uid": "1ed1-123"
},
{
"uid": "540e-99"
"uid": "1ed1-99"
}
]
},
"540e-85": {
"1ed1-85": {
"id": "/packages/table-core/src/features/Pagination.ts",
"moduleParts": {
"index.production.js": "540e-86"
"index.production.js": "1ed1-86"
},
"imported": [
{
"uid": "540e-63"
"uid": "1ed1-63"
}

@@ -634,17 +634,17 @@ ],

{
"uid": "540e-123"
"uid": "1ed1-123"
},
{
"uid": "540e-99"
"uid": "1ed1-99"
}
]
},
"540e-87": {
"1ed1-87": {
"id": "/packages/table-core/src/features/Pinning.ts",
"moduleParts": {
"index.production.js": "540e-88"
"index.production.js": "1ed1-88"
},
"imported": [
{
"uid": "540e-63"
"uid": "1ed1-63"
}

@@ -654,17 +654,17 @@ ],

{
"uid": "540e-123"
"uid": "1ed1-123"
},
{
"uid": "540e-99"
"uid": "1ed1-99"
}
]
},
"540e-89": {
"1ed1-89": {
"id": "/packages/table-core/src/features/RowSelection.ts",
"moduleParts": {
"index.production.js": "540e-90"
"index.production.js": "1ed1-90"
},
"imported": [
{
"uid": "540e-63"
"uid": "1ed1-63"
}

@@ -674,13 +674,13 @@ ],

{
"uid": "540e-123"
"uid": "1ed1-123"
},
{
"uid": "540e-99"
"uid": "1ed1-99"
}
]
},
"540e-91": {
"1ed1-91": {
"id": "/packages/table-core/src/sortingFns.ts",
"moduleParts": {
"index.production.js": "540e-92"
"index.production.js": "1ed1-92"
},

@@ -690,17 +690,17 @@ "imported": [],

{
"uid": "540e-93"
"uid": "1ed1-93"
}
]
},
"540e-93": {
"1ed1-93": {
"id": "/packages/table-core/src/features/Sorting.ts",
"moduleParts": {
"index.production.js": "540e-94"
"index.production.js": "1ed1-94"
},
"imported": [
{
"uid": "540e-91"
"uid": "1ed1-91"
},
{
"uid": "540e-63"
"uid": "1ed1-63"
}

@@ -710,17 +710,17 @@ ],

{
"uid": "540e-123"
"uid": "1ed1-123"
},
{
"uid": "540e-99"
"uid": "1ed1-99"
}
]
},
"540e-95": {
"1ed1-95": {
"id": "/packages/table-core/src/features/Visibility.ts",
"moduleParts": {
"index.production.js": "540e-96"
"index.production.js": "1ed1-96"
},
"imported": [
{
"uid": "540e-63"
"uid": "1ed1-63"
}

@@ -730,17 +730,17 @@ ],

{
"uid": "540e-123"
"uid": "1ed1-123"
},
{
"uid": "540e-99"
"uid": "1ed1-99"
}
]
},
"540e-97": {
"1ed1-97": {
"id": "/packages/table-core/src/features/Headers.ts",
"moduleParts": {
"index.production.js": "540e-98"
"index.production.js": "1ed1-98"
},
"imported": [
{
"uid": "540e-63"
"uid": "1ed1-63"
}

@@ -750,59 +750,59 @@ ],

{
"uid": "540e-123"
"uid": "1ed1-123"
},
{
"uid": "540e-99"
"uid": "1ed1-99"
}
]
},
"540e-99": {
"1ed1-99": {
"id": "/packages/table-core/src/core.ts",
"moduleParts": {
"index.production.js": "540e-100"
"index.production.js": "1ed1-100"
},
"imported": [
{
"uid": "540e-63"
"uid": "1ed1-63"
},
{
"uid": "540e-65"
"uid": "1ed1-65"
},
{
"uid": "540e-67"
"uid": "1ed1-67"
},
{
"uid": "540e-69"
"uid": "1ed1-69"
},
{
"uid": "540e-71"
"uid": "1ed1-71"
},
{
"uid": "540e-73"
"uid": "1ed1-73"
},
{
"uid": "540e-77"
"uid": "1ed1-77"
},
{
"uid": "540e-81"
"uid": "1ed1-81"
},
{
"uid": "540e-83"
"uid": "1ed1-83"
},
{
"uid": "540e-85"
"uid": "1ed1-85"
},
{
"uid": "540e-87"
"uid": "1ed1-87"
},
{
"uid": "540e-89"
"uid": "1ed1-89"
},
{
"uid": "540e-93"
"uid": "1ed1-93"
},
{
"uid": "540e-95"
"uid": "1ed1-95"
},
{
"uid": "540e-97"
"uid": "1ed1-97"
}

@@ -812,10 +812,10 @@ ],

{
"uid": "540e-123"
"uid": "1ed1-123"
}
]
},
"540e-101": {
"1ed1-101": {
"id": "/packages/table-core/src/createTable.ts",
"moduleParts": {
"index.production.js": "540e-102"
"index.production.js": "1ed1-102"
},

@@ -825,14 +825,14 @@ "imported": [],

{
"uid": "540e-123"
"uid": "1ed1-123"
}
]
},
"540e-103": {
"1ed1-103": {
"id": "/packages/table-core/src/utils/getCoreRowModel.ts",
"moduleParts": {
"index.production.js": "540e-104"
"index.production.js": "1ed1-104"
},
"imported": [
{
"uid": "540e-63"
"uid": "1ed1-63"
}

@@ -842,10 +842,10 @@ ],

{
"uid": "540e-123"
"uid": "1ed1-123"
}
]
},
"540e-105": {
"1ed1-105": {
"id": "/packages/table-core/src/utils/filterRowsUtils.ts",
"moduleParts": {
"index.production.js": "540e-106"
"index.production.js": "1ed1-106"
},

@@ -855,20 +855,20 @@ "imported": [],

{
"uid": "540e-107"
"uid": "1ed1-107"
},
{
"uid": "540e-109"
"uid": "1ed1-109"
}
]
},
"540e-107": {
"1ed1-107": {
"id": "/packages/table-core/src/utils/getFilteredRowModel.ts",
"moduleParts": {
"index.production.js": "540e-108"
"index.production.js": "1ed1-108"
},
"imported": [
{
"uid": "540e-63"
"uid": "1ed1-63"
},
{
"uid": "540e-105"
"uid": "1ed1-105"
}

@@ -878,17 +878,17 @@ ],

{
"uid": "540e-123"
"uid": "1ed1-123"
}
]
},
"540e-109": {
"1ed1-109": {
"id": "/packages/table-core/src/utils/getFacetedRowModel.ts",
"moduleParts": {
"index.production.js": "540e-110"
"index.production.js": "1ed1-110"
},
"imported": [
{
"uid": "540e-63"
"uid": "1ed1-63"
},
{
"uid": "540e-105"
"uid": "1ed1-105"
}

@@ -898,14 +898,14 @@ ],

{
"uid": "540e-123"
"uid": "1ed1-123"
}
]
},
"540e-111": {
"1ed1-111": {
"id": "/packages/table-core/src/utils/getFacetedUniqueValues.ts",
"moduleParts": {
"index.production.js": "540e-112"
"index.production.js": "1ed1-112"
},
"imported": [
{
"uid": "540e-63"
"uid": "1ed1-63"
}

@@ -915,14 +915,14 @@ ],

{
"uid": "540e-123"
"uid": "1ed1-123"
}
]
},
"540e-113": {
"1ed1-113": {
"id": "/packages/table-core/src/utils/getFacetedMinMaxValues.ts",
"moduleParts": {
"index.production.js": "540e-114"
"index.production.js": "1ed1-114"
},
"imported": [
{
"uid": "540e-63"
"uid": "1ed1-63"
}

@@ -932,14 +932,14 @@ ],

{
"uid": "540e-123"
"uid": "1ed1-123"
}
]
},
"540e-115": {
"1ed1-115": {
"id": "/packages/table-core/src/utils/getSortedRowModel.ts",
"moduleParts": {
"index.production.js": "540e-116"
"index.production.js": "1ed1-116"
},
"imported": [
{
"uid": "540e-63"
"uid": "1ed1-63"
}

@@ -949,14 +949,14 @@ ],

{
"uid": "540e-123"
"uid": "1ed1-123"
}
]
},
"540e-117": {
"1ed1-117": {
"id": "/packages/table-core/src/utils/getGroupedRowModel.ts",
"moduleParts": {
"index.production.js": "540e-118"
"index.production.js": "1ed1-118"
},
"imported": [
{
"uid": "540e-63"
"uid": "1ed1-63"
}

@@ -966,14 +966,14 @@ ],

{
"uid": "540e-123"
"uid": "1ed1-123"
}
]
},
"540e-119": {
"1ed1-119": {
"id": "/packages/table-core/src/utils/getExpandedRowModel.ts",
"moduleParts": {
"index.production.js": "540e-120"
"index.production.js": "1ed1-120"
},
"imported": [
{
"uid": "540e-63"
"uid": "1ed1-63"
}

@@ -983,20 +983,20 @@ ],

{
"uid": "540e-123"
"uid": "1ed1-123"
},
{
"uid": "540e-121"
"uid": "1ed1-121"
}
]
},
"540e-121": {
"1ed1-121": {
"id": "/packages/table-core/src/utils/getPaginationRowModel.ts",
"moduleParts": {
"index.production.js": "540e-122"
"index.production.js": "1ed1-122"
},
"imported": [
{
"uid": "540e-63"
"uid": "1ed1-63"
},
{
"uid": "540e-119"
"uid": "1ed1-119"
}

@@ -1006,83 +1006,83 @@ ],

{
"uid": "540e-123"
"uid": "1ed1-123"
}
]
},
"540e-123": {
"1ed1-123": {
"id": "/packages/table-core/src/index.ts",
"moduleParts": {
"index.production.js": "540e-124"
"index.production.js": "1ed1-124"
},
"imported": [
{
"uid": "540e-99"
"uid": "1ed1-99"
},
{
"uid": "540e-125"
"uid": "1ed1-125"
},
{
"uid": "540e-101"
"uid": "1ed1-101"
},
{
"uid": "540e-71"
"uid": "1ed1-71"
},
{
"uid": "540e-73"
"uid": "1ed1-73"
},
{
"uid": "540e-77"
"uid": "1ed1-77"
},
{
"uid": "540e-81"
"uid": "1ed1-81"
},
{
"uid": "540e-97"
"uid": "1ed1-97"
},
{
"uid": "540e-83"
"uid": "1ed1-83"
},
{
"uid": "540e-85"
"uid": "1ed1-85"
},
{
"uid": "540e-87"
"uid": "1ed1-87"
},
{
"uid": "540e-89"
"uid": "1ed1-89"
},
{
"uid": "540e-93"
"uid": "1ed1-93"
},
{
"uid": "540e-95"
"uid": "1ed1-95"
},
{
"uid": "540e-63"
"uid": "1ed1-63"
},
{
"uid": "540e-103"
"uid": "1ed1-103"
},
{
"uid": "540e-107"
"uid": "1ed1-107"
},
{
"uid": "540e-109"
"uid": "1ed1-109"
},
{
"uid": "540e-111"
"uid": "1ed1-111"
},
{
"uid": "540e-113"
"uid": "1ed1-113"
},
{
"uid": "540e-115"
"uid": "1ed1-115"
},
{
"uid": "540e-117"
"uid": "1ed1-117"
},
{
"uid": "540e-119"
"uid": "1ed1-119"
},
{
"uid": "540e-121"
"uid": "1ed1-121"
}

@@ -1093,3 +1093,3 @@ ],

},
"540e-125": {
"1ed1-125": {
"id": "/packages/table-core/src/types.ts",

@@ -1100,3 +1100,3 @@ "moduleParts": {},

{
"uid": "540e-123"
"uid": "1ed1-123"
}

@@ -1103,0 +1103,0 @@ ]

@@ -17,3 +17,2 @@ import { RequiredKeys } from './utils';

mergeOptions?: <T>(defaultOptions: T, options: Partial<T>) => T;
keepPreviousData?: boolean;
meta?: TGenerics['TableMeta'];

@@ -26,8 +25,8 @@ };

setOptions: (newOptions: Updater<TableOptions<TGenerics>>) => void;
queue: (cb: () => void) => void;
getState: () => TableState;
setState: (updater: Updater<TableState>) => void;
render: <TProps>(template: Renderable<TGenerics, TProps>, props: TProps) => string | null | TGenerics['Rendered'];
_queue: (cb: () => void) => void;
_render: <TProps>(template: Renderable<TGenerics, TProps>, props: TProps) => string | null | TGenerics['Rendered'];
_features: readonly TableFeature[];
};
export declare function createTableInstance<TGenerics extends TableGenerics>(options: TableOptions<TGenerics>): TableInstance<TGenerics>;

@@ -21,3 +21,2 @@ import { OnChangeFn, TableGenerics, TableInstance, RowModel, Updater, TableFeature } from '../types';

onPaginationChange: OnChangeFn<PaginationState>;
autoResetPageIndex: boolean;
};

@@ -24,0 +23,0 @@ export declare type PaginationInstance<TGenerics extends TableGenerics> = {

@@ -11,3 +11,3 @@ /**

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TableCore={})}(this,(function(e){"use strict";function t(e,t){return"function"==typeof e?e(t):e}function n(e,n){return l=>{n.setState((n=>({...n,[e]:t(l,n[e])})))}}function l(e){return e instanceof Function}function o(e,t){const n=[],l=e=>{e.forEach((e=>{n.push(e);const o=t(e);null!=o&&o.length&&l(o)}))};return l(e),n}function i(e,t,n){let l,o=[];return()=>{let i;n.key&&n.debug&&(i=Date.now());const r=e();if(!(r.length!==o.length||r.some(((e,t)=>o[t]!==e))))return l;let u;if(o=r,n.key&&n.debug&&(u=Date.now()),l=t(...r),null==n||null==n.onChange||n.onChange(l),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-i))/100,t=Math.round(100*(Date.now()-u))/100,l=t/16,o=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info("%c⏱ "+o(t,5)+" /"+o(e,5)+" ms","\n font-size: .6rem;\n font-weight: bold;\n color: hsl("+Math.max(0,Math.min(120-120*l,120))+"deg 100% 31%);",null==n?void 0:n.key)}return l}}const r={createInstance:e=>({getDefaultColumn:i((()=>[e.options.defaultColumn]),(t=>{var n;return t=null!=(n=t)?n:{},{header:e=>e.header.column.id,footer:e=>e.header.column.id,cell:e=>{var t,n,l;return null!=(t=null==(n=(l=e.getValue()).toString)?void 0:n.call(l))?t:null},...e._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumn?void 0:t.getDefaultColumn())),{}),...t}}),{debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns},key:!1}),getColumnDefs:()=>e.options.columns,createColumn:(t,n,l)=>{var o,r;const u=e.getDefaultColumn();let a,s=null!=(o=null!=(r=t.id)?r:t.accessorKey)?o:"string"==typeof t.header?t.header:void 0;if(t.accessorFn?a=t.accessorFn:t.accessorKey&&(a=e=>e[t.accessorKey]),!s)throw new Error;let g={...u,...t,id:""+s,accessorFn:a,parent:l,depth:n,columnDef:t,columnDefType:t.columnDefType,columns:[],getFlatColumns:i((()=>[!0]),(()=>{var e;return[g,...null==(e=g.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),{key:"column.getFlatColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getLeafColumns:i((()=>[e._getOrderColumnsFn()]),(e=>{var t;if(null!=(t=g.columns)&&t.length){let t=g.columns.flatMap((e=>e.getLeafColumns()));return e(t)}return[g]}),{key:"column.getLeafColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})};return g=e._features.reduce(((t,n)=>Object.assign(t,null==n.createColumn?void 0:n.createColumn(g,e))),g),g},getAllColumns:i((()=>[e.getColumnDefs()]),(t=>{const n=function(t,l,o){return void 0===o&&(o=0),t.map((t=>{const i=e.createColumn(t,o,l);return i.columns=t.columns?n(t.columns,i,o+1):[],i}))};return n(t)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getAllFlatColumns:i((()=>[e.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getAllFlatColumnsById:i((()=>[e.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getAllLeafColumns:i((()=>[e.getAllColumns(),e._getOrderColumnsFn()]),((e,t)=>t(e.flatMap((e=>e.getLeafColumns())))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getColumn:t=>{const n=e.getAllFlatColumnsById()[t];if(!n)throw new Error;return n}})},u={createInstance:e=>({getRowId:(t,n,l)=>{var o;return null!=(o=null==e.options.getRowId?void 0:e.options.getRowId(t,n,l))?o:""+(l?[l.id,n].join("."):n)},createRow:(t,n,l,i,r)=>{let u={id:t,index:l,original:n,depth:i,valuesCache:{},getValue:t=>{if(u.valuesCache.hasOwnProperty(t))return u.valuesCache[t];const n=e.getColumn(t);if(!n.accessorFn)throw new Error;return u.valuesCache[t]=n.accessorFn(u.original,l),u.valuesCache[t]},subRows:null!=r?r:[],getLeafRows:()=>o(u.subRows,(e=>e.subRows))};for(let t=0;t<e._features.length;t++){const n=e._features[t];Object.assign(u,null==n||null==n.createRow?void 0:n.createRow(u,e))}return u},getCoreRowModel:()=>(e._getCoreRowModel||(e._getCoreRowModel=e.options.getCoreRowModel(e)),e._getCoreRowModel()),getRowModel:()=>e.getPaginationRowModel(),getRow:t=>{const n=e.getRowModel().rowsById[t];if(!n)throw new Error;return n}})},a={createRow:(e,t)=>({getAllCells:i((()=>[t.getAllLeafColumns()]),(n=>n.map((n=>t.createCell(e,n,n.id)))),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getAllCellsByColumnId:i((()=>[e.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.columnId]=t,e)),{})),{key:"row.getAllCellsByColumnId",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}),createInstance:e=>({createCell:(t,n,l)=>{const o={id:t.id+"_"+n.id,rowId:t.id,columnId:l,row:t,column:n,getValue:()=>t.getValue(l),renderCell:()=>n.cell?e.render(n.cell,{instance:e,column:n,row:t,cell:o,getValue:o.getValue}):null};return e._features.forEach((l=>{Object.assign(o,null==l.createCell?void 0:l.createCell(o,n,t,e))}),{}),o},getCell:(t,n)=>{const l=e.getRow(t);if(!l)throw new Error;const o=l.getAllCellsByColumnId()[n];if(!o)throw new Error;return o}})},s={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},g={getDefaultColumn:()=>s,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",onColumnSizingChange:n("columnSizing",e),onColumnSizingInfoChange:n("columnSizingInfo",e)}),createColumn:(e,t)=>({getSize:()=>{var n,l,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.minSize)?n:s.minSize,null!=(l=null!=i?i:e.size)?l:s.size),null!=(o=e.maxSize)?o:s.maxSize)},getStart:n=>{const l=n?"left"===n?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns(),o=l.findIndex((t=>t.id===e.id));if(o>0){const e=l[o-1];return e.getStart(n)+e.getSize()}return 0},resetSize:()=>{t.setColumnSizing((t=>{let{[e.id]:n,...l}=t;return l}))},getCanResize:()=>{var n,l;return(null==(n=e.enableResizing)||n)&&(null==(l=t.options.enableColumnResizing)||l)},getIsResizing:()=>t.getState().columnSizingInfo.isResizingColumn===e.id}),createHeader:(e,t)=>({getSize:()=>{let t=0;const n=e=>{var l;e.subHeaders.length?e.subHeaders.forEach(n):t+=null!=(l=e.column.getSize())?l:0};return n(e),t},getStart:()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},getResizeHandler:()=>{const n=t.getColumn(e.column.id),l=n.getCanResize();return o=>{if(!l)return;if(null==o.persist||o.persist(),p(o)&&o.touches&&o.touches.length>1)return;const i=n.getSize(),r=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[n.id,n.getSize()]],u=p(o)?Math.round(o.touches[0].clientX):o.clientX,a=(e,n)=>{if("number"!=typeof n)return;let l={};t.setColumnSizingInfo((e=>{var t,o;const i=n-(null!=(t=null==e?void 0:e.startOffset)?t:0),r=Math.max(i/(null!=(o=null==e?void 0:e.startSize)?o:0),-.999999);return e.columnSizingStart.forEach((e=>{let[t,n]=e;l[t]=Math.round(100*Math.max(n+n*r,0))/100})),{...e,deltaOffset:i,deltaPercentage:r}})),"onChange"!==t.options.columnResizeMode&&"end"!==e||t.setColumnSizing((e=>({...e,...l})))},s={moveHandler:e=>{return t=e.clientX,a("move",t);var t},upHandler:e=>{var n;document.removeEventListener("mousemove",s.moveHandler),document.removeEventListener("mouseup",s.upHandler),n=e.clientX,a("end",n),t.setColumnSizingInfo((e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))}},g=!!c()&&{passive:!1};p(o)||(document.addEventListener("mousemove",s.moveHandler,g),document.addEventListener("mouseup",s.upHandler,g)),t.setColumnSizingInfo((e=>({...e,startOffset:u,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:r,isResizingColumn:n.id})))}}}),createInstance:e=>({setColumnSizing:t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),setColumnSizingInfo:t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),resetColumnSizing:t=>{var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},resetHeaderSizeInfo:t=>{var n;e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},getTotalSize:()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},getLeftTotalSize:()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},getCenterTotalSize:()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},getRightTotalSize:()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0}})};let d=null;function c(){if("boolean"==typeof d)return d;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch(t){e=!1}return d=e,d}function p(e){return"touchstart"===e.type}const f={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:n("expanded",e),autoResetExpanded:!0,expandSubRows:!0,paginateExpandedRows:!0}),createInstance:e=>{let t=!1,n=!1;return{_autoResetExpanded:()=>{if(t){if(!1!==e.options.autoResetAll&&(!0===e.options.autoResetAll||e.options.autoResetExpanded)){if(n)return;n=!0,e.queue((()=>{e.resetExpanded(),n=!1}))}}else e.queue((()=>{t=!0}))},setExpanded:t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),toggleAllRowsExpanded:t=>{(null!=t?t:!e.getIsAllRowsExpanded())?e.setExpanded(!0):e.setExpanded({})},resetExpanded:t=>{var n,l;e.setExpanded(t?{}:null!=(n=null==(l=e.initialState)?void 0:l.expanded)?n:{})},getCanSomeRowsExpand:()=>e.getRowModel().flatRows.some((e=>e.getCanExpand())),getToggleAllRowsExpandedHandler:()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},getIsSomeRowsExpanded:()=>{const t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},getIsAllRowsExpanded:()=>!0===e.getState().expanded||!e.getRowModel().flatRows.some((e=>e.getIsExpanded())),getExpandedDepth:()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach((e=>{const n=e.split(".");t=Math.max(t,n.length)})),t},getPreExpandedRowModel:()=>e.getGroupedRowModel(),getExpandedRowModel:()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())}},createRow:(e,t)=>({toggleExpanded:n=>{t.setExpanded((l=>{var o;const i=!0===l||!(null==l||!l[e.id]);let r={};if(!0===l?Object.keys(t.getRowModel().rowsById).forEach((e=>{r[e]=!0})):r=l,n=null!=(o=n)?o:!i,!i&&n)return{...r,[e.id]:!0};if(i&&!n){const{[e.id]:t,...n}=r;return n}return l}))},getIsExpanded:()=>{var n;const l=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===l||(null==l?void 0:l[e.id]))},getCanExpand:()=>{var n,l,o;return(null==(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))||n)&&(null==(l=t.options.enableExpanding)||l)&&!(null==(o=e.subRows)||!o.length)},getToggleExpandedHandler:()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}})},m=(e,t,n)=>{const l=n.toLowerCase();return e.getValue(t).toLowerCase().includes(l)};m.autoRemove=e=>I(e);const b=(e,t,n)=>e.getValue(t).includes(n);b.autoRemove=e=>I(e);const w=(e,t,n)=>e.getValue(t).toLowerCase()===n.toLowerCase();w.autoRemove=e=>I(e);const C=(e,t,n)=>e.getValue(t).includes(n);C.autoRemove=e=>I(e)||!(null!=e&&e.length);const h=(e,t,n)=>!n.some((n=>!e.getValue(t).includes(n)));h.autoRemove=e=>I(e)||!(null!=e&&e.length);const v=(e,t,n)=>n.some((n=>e.getValue(t).includes(n)));v.autoRemove=e=>I(e)||!(null!=e&&e.length);const S=(e,t,n)=>e.getValue(t)===n;S.autoRemove=e=>I(e);const R=(e,t,n)=>e.getValue(t)==n;R.autoRemove=e=>I(e);const F=(e,t,n)=>{let[l,o]=n;const i=e.getValue(t);return i>=l&&i<=o};F.resolveFilterValue=e=>{let[t,n]=e,l="number"!=typeof t?parseFloat(t):t,o="number"!=typeof n?parseFloat(n):n,i=null===t||Number.isNaN(l)?-1/0:l,r=null===n||Number.isNaN(o)?1/0:o;if(i>r){const e=i;i=r,r=e}return[i,r]},F.autoRemove=e=>I(e)||I(e[0])&&I(e[1]);const M={includesString:m,includesStringSensitive:b,equalsString:w,arrIncludes:C,arrIncludesAll:h,arrIncludesSome:v,equals:S,weakEquals:R,inNumberRange:F};function I(e){return null==e||""===e}const y={getDefaultColumn:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:n("columnFilters",e),onGlobalFilterChange:n("globalFilter",e),filterFromLeafRows:!1,globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n,l;return"string"==typeof(null==(n=e.getCoreRowModel().flatRows[0])||null==(l=n.getAllCellsByColumnId()[t.id])?void 0:l.getValue())}}),createColumn:(e,n)=>({filterFn:e.filterFn,getAutoFilterFn:()=>{const t=n.getCoreRowModel().flatRows[0],l=null==t?void 0:t.getValue(e.id);return"string"==typeof l?M.includesString:"number"==typeof l?M.inNumberRange:null!==l&&"object"==typeof l?M.equals:Array.isArray(l)?M.arrIncludes:M.weakEquals},getFilterFn:()=>{var t;const o=n.options.filterFns;return l(e.filterFn)?e.filterFn:"auto"===e.filterFn?e.getAutoFilterFn():null!=(t=null==o?void 0:o[e.filterFn])?t:M[e.filterFn]},getCanFilter:()=>{var t,l,o;return(null==(t=e.enableColumnFilter)||t)&&(null==(l=n.options.enableColumnFilters)||l)&&(null==(o=n.options.enableFilters)||o)&&!!e.accessorFn},getCanGlobalFilter:()=>{var t,l,o,i;return(null==(t=e.enableGlobalFilter)||t)&&(null==(l=n.options.enableGlobalFilter)||l)&&(null==(o=n.options.enableFilters)||o)&&(null==(i=null==n.options.getColumnCanGlobalFilter?void 0:n.options.getColumnCanGlobalFilter(e))||i)&&!!e.accessorFn},getIsFiltered:()=>e.getFilterIndex()>-1,getFilterValue:()=>{var t,l;return null==(t=n.getState().columnFilters)||null==(l=t.find((t=>t.id===e.id)))?void 0:l.value},getFilterIndex:()=>{var t,l;return null!=(t=null==(l=n.getState().columnFilters)?void 0:l.findIndex((t=>t.id===e.id)))?t:-1},setFilterValue:l=>{n.setColumnFilters((n=>{const o=e.getFilterFn(),i=null==n?void 0:n.find((t=>t.id===e.id)),r=t(l,i?i.value:void 0);var u;if(V(o,r,e))return null!=(u=null==n?void 0:n.filter((t=>t.id!==e.id)))?u:[];const a={id:e.id,value:r};var s;return i?null!=(s=null==n?void 0:n.map((t=>t.id===e.id?a:t)))?s:[]:null!=n&&n.length?[...n,a]:[a]}))},_getFacetedRowModel:n.options.getFacetedRowModel&&n.options.getFacetedRowModel(n,e.id),getFacetedRowModel:()=>e._getFacetedRowModel?e._getFacetedRowModel():n.getPreFilteredRowModel(),_getFacetedUniqueValues:n.options.getFacetedUniqueValues&&n.options.getFacetedUniqueValues(n,e.id),getFacetedUniqueValues:()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,_getFacetedMinMaxValues:n.options.getFacetedMinMaxValues&&n.options.getFacetedMinMaxValues(n,e.id),getFacetedMinMaxValues:()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}),createRow:(e,t)=>({columnFilterMap:{},subRowsByFacetId:{}}),createInstance:e=>({getGlobalAutoFilterFn:()=>M.includesString,getGlobalFilterFn:()=>{var t;const{filterFns:n,globalFilterFn:o}=e.options;return l(o)?o:"auto"===o?e.getGlobalAutoFilterFn():null!=(t=null==n?void 0:n[o])?t:M[o]},setColumnFilters:n=>{const l=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var o;return null==(o=t(n,e))?void 0:o.filter((e=>{const t=l.find((t=>t.id===e.id));if(t){if(V(t.getFilterFn(),e.value,t))return!1}return!0}))}))},setGlobalFilter:t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},resetGlobalFilter:t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)},resetColumnFilters:t=>{var n,l;e.setColumnFilters(t?[]:null!=(n=null==(l=e.initialState)?void 0:l.columnFilters)?n:[])},getPreFilteredRowModel:()=>e.getCoreRowModel(),_getFilteredRowModel:e.options.getFilteredRowModel&&e.options.getFilteredRowModel(e),getFilteredRowModel:()=>e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel(),_getGlobalFacetedRowModel:e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),getGlobalFacetedRowModel:()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),_getGlobalFacetedUniqueValues:e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),getGlobalFacetedUniqueValues:()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,_getGlobalFacetedMinMaxValues:e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),getGlobalFacetedMinMaxValues:()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}})};function V(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}const x={sum:function(e,t){return t().reduce(((e,t)=>e+("number"==typeof t?t:0)),0)},min:function(e,t){let n;for(const e of t())null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);return n},max:function(e,t){let n;for(const e of t())null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);return n},extent:function(e,t){let n,l;for(const e of t())null!=e&&(void 0===n?e>=e&&(n=l=e):(n>e&&(n=e),l<e&&(l=e)));return[n,l]},mean:function(e){let t=0,n=0;for(let l of e())null!=l&&(l=+l)>=l&&(++t,n+=l);return t?n/t:void 0},median:function(e){const t=e();if(!t.length)return;let n=0,l=0;return t.forEach((e=>{"number"==typeof e&&(n=Math.min(n,e),l=Math.max(l,e))})),(n+l)/2},unique:function(e){return Array.from(new Set(e()).values())},uniqueCount:function(e){return new Set(e()).size},count:function(e){return e().length}};const A={getDefaultColumn:()=>({aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:n("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>({toggleGrouping:()=>{t.setGrouping((t=>null!=t&&t.includes(e.id)?t.filter((t=>t!==e.id)):[...null!=t?t:[],e.id]))},getCanGroup:()=>{var n,l,o,i;return null!=(n=null==(l=null!=(o=null==(i=e.enableGrouping)||i)?o:t.options.enableGrouping)||l)?n:!!e.accessorFn},getIsGrouped:()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},getGroupedIndex:()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},getToggleGroupingHandler:()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},getColumnAutoAggregationFn:()=>{const n=t.getCoreRowModel().flatRows[0],l=null==n?void 0:n.getValue(e.id);return"number"==typeof l?x.sum:"[object Date]"===Object.prototype.toString.call(l)?x.extent:x.count},getColumnAggregationFn:()=>{var n;const o=t.options.aggregationFns;if(!e)throw new Error;return l(e.aggregationFn)?e.aggregationFn:"auto"===e.aggregationFn?e.getColumnAutoAggregationFn():null!=(n=null==o?void 0:o[e.aggregationFn])?n:x[e.aggregationFn]}}),createInstance:e=>({setGrouping:t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),resetGrouping:t=>{var n,l;e.setGrouping(t?[]:null!=(n=null==(l=e.initialState)?void 0:l.grouping)?n:[])},getPreGroupedRowModel:()=>e.getSortedRowModel(),getGroupedRowModel:()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())}),createRow:(e,t)=>({getIsGrouped:()=>!!e.groupingColumnId,groupingValuesCache:{}}),createCell:(e,t,n,l)=>({getIsGrouped:()=>t.getIsGrouped()&&t.id===n.groupingColumnId,getIsPlaceholder:()=>!e.getIsGrouped()&&t.getIsGrouped(),getIsAggregated:()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&(null==(t=n.subRows)?void 0:t.length)>1},renderAggregatedCell:()=>{var o;const i=null!=(o=t.aggregatedCell)?o:t.cell;return i?l.render(i,{instance:l,column:t,row:n,cell:e,getValue:e.getValue}):null}})};function P(e,t,n){if(null==t||!t.length||!n)return e;const l=e.filter((e=>!t.includes(e.id)));if("remove"===n)return l;return[...t.map((t=>e.find((e=>e.id===t)))).filter(Boolean),...l]}const E={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:n("columnOrder",e)}),createInstance:e=>({setColumnOrder:t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),resetColumnOrder:t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},_getOrderColumnsFn:i((()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]),((e,t,n)=>l=>{let o=[];if(null!=e&&e.length){const t=[...e],n=[...l];for(;n.length&&t.length;){const e=t.shift(),l=n.findIndex((t=>t.id===e));l>-1&&o.push(n.splice(l,1)[0])}o=[...o,...n]}else o=l;return P(o,t,n)}),{key:!1})})},_={getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:n("pagination",e),autoResetPageIndex:!0}),createInstance:e=>{let n=!1,l=!1;return{_autoResetPageIndex:()=>{if(n){if(!1!==e.options.autoResetAll&&(!0===e.options.autoResetAll||e.options.autoResetPageIndex)){if(l)return;l=!0,e.queue((()=>{e.resetPageIndex(),l=!1}))}}else e.queue((()=>{n=!0}))},setPagination:n=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>t(n,e))),resetPagination:t=>{var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},setPageIndex:n=>{e.setPagination((e=>{let l=t(n,e.pageIndex);const o=e.pageCount&&e.pageCount>0?e.pageCount-1:Number.MAX_SAFE_INTEGER;return l=Math.min(Math.max(0,l),o),{...e,pageIndex:l}}))},resetPageIndex:t=>{var n,l,o;e.setPageIndex(t?0:null!=(n=null==(l=e.initialState)||null==(o=l.pagination)?void 0:o.pageIndex)?n:0)},resetPageSize:t=>{var n,l,o;e.setPageSize(t?10:null!=(n=null==(l=e.initialState)||null==(o=l.pagination)?void 0:o.pageSize)?n:10)},setPageSize:n=>{e.setPagination((e=>{const l=Math.max(1,t(n,e.pageSize)),o=e.pageSize*e.pageIndex,i=Math.floor(o/l);return{...e,pageIndex:i,pageSize:l}}))},setPageCount:n=>e.setPagination((e=>{var l;let o=t(n,null!=(l=e.pageCount)?l:-1);return"number"==typeof o&&(o=Math.max(-1,o)),{...e,pageCount:o}})),getPageOptions:i((()=>[e.getState().pagination.pageSize,e.getState().pagination.pageCount]),((e,t)=>{let n=[];return t&&t>0&&(n=[...new Array(t)].fill(null).map(((e,t)=>t))),n}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getCanPreviousPage:()=>e.getState().pagination.pageIndex>0,getCanNextPage:()=>{const{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return-1===n||0!==n&&t<n-1},previousPage:()=>e.setPageIndex((e=>e-1)),nextPage:()=>e.setPageIndex((e=>e+1)),getPrePaginationRowModel:()=>e.getExpandedRowModel(),getPaginationRowModel:()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),getPageCount:()=>{const{pageCount:t}=e.getState().pagination;return void 0!==t?t:Math.ceil(e.getPrePaginationRowModel().rows.length/e.getState().pagination.pageSize)}}}},G={getInitialState:e=>({columnPinning:{left:[],right:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:n("columnPinning",e)}),createColumn:(e,t)=>({pin:n=>{const l=e.getLeafColumns().map((e=>e.id)).filter(Boolean);t.setColumnPinning((e=>{var t,o,i,r,u,a;return"right"===n?{left:(null!=(i=null==e?void 0:e.left)?i:[]).filter((e=>!(null!=l&&l.includes(e)))),right:[...(null!=(r=null==e?void 0:e.right)?r:[]).filter((e=>!(null!=l&&l.includes(e)))),...l]}:"left"===n?{left:[...(null!=(u=null==e?void 0:e.left)?u:[]).filter((e=>!(null!=l&&l.includes(e)))),...l],right:(null!=(a=null==e?void 0:e.right)?a:[]).filter((e=>!(null!=l&&l.includes(e))))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter((e=>!(null!=l&&l.includes(e)))),right:(null!=(o=null==e?void 0:e.right)?o:[]).filter((e=>!(null!=l&&l.includes(e))))}}))},getCanPin:()=>e.getLeafColumns().some((e=>{var n,l;return(null==(n=e.enablePinning)||n)&&(null==(l=t.options.enablePinning)||l)})),getIsPinned:()=>{const n=e.getLeafColumns().map((e=>e.id)),{left:l,right:o}=t.getState().columnPinning,i=n.some((e=>null==l?void 0:l.includes(e))),r=n.some((e=>null==o?void 0:o.includes(e)));return i?"left":!!r&&"right"},getPinnedIndex:()=>{var n,l,o;const i=e.getIsPinned();return i?null!=(n=null==(l=t.getState().columnPinning)||null==(o=l[i])?void 0:o.indexOf(e.id))?n:-1:0}}),createRow:(e,t)=>({getCenterVisibleCells:i((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,t,n)=>{const l=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!l.includes(e.columnId)))}),{key:"row.getCenterVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getLeftVisibleCells:i((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,,]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.columnId===t)))).filter(Boolean).map((e=>({...e,position:"left"})))),{key:"row.getLeftVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getRightVisibleCells:i((()=>[e._getAllVisibleCells(),t.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.columnId===t)))).filter(Boolean).map((e=>({...e,position:"left"})))),{key:"row.getRightVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}),createInstance:e=>({setColumnPinning:t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),resetColumnPinning:t=>{var n,l;return e.setColumnPinning(t?{left:[],right:[]}:null!=(n=null==(l=e.initialState)?void 0:l.columnPinning)?n:{left:[],right:[]})},getIsSomeColumnsPinned:()=>{const{left:t,right:n}=e.getState().columnPinning;return Boolean((null==t?void 0:t.length)||(null==n?void 0:n.length))},getLeftLeafColumns:i((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getRightLeafColumns:i((()=>[e.getAllLeafColumns(),e.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getCenterLeafColumns:i((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((e,t,n)=>{const l=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!l.includes(e.id)))}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})})},H={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:n("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createInstance:e=>({setRowSelection:t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),resetRowSelection:t=>{var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},toggleAllRowsSelected:t=>{e.setRowSelection((n=>{t=void 0!==t?t:!e.getIsAllRowsSelected();const l={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach((e=>{l[e.id]=!0})):o.forEach((e=>{delete l[e.id]})),l}))},toggleAllPageRowsSelected:t=>e.setRowSelection((n=>{void 0!==t||e.getIsAllPageRowsSelected();const l={...n};return e.getRowModel().rows.forEach((n=>{z(l,n.id,t,e)})),l})),getPreSelectedRowModel:()=>e.getCoreRowModel(),getSelectedRowModel:i((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,n)=>Object.keys(t).length?L(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredSelectedRowModel:i((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,n)=>Object.keys(t).length?L(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"getFilteredSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getGroupedSelectedRowModel:i((()=>[e.getState().rowSelection,e.getGroupedRowModel()]),((t,n)=>Object.keys(t).length?L(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"getGroupedSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getIsAllRowsSelected:()=>{const t=e.getPreFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let l=Boolean(t.length&&Object.keys(n).length);return l&&t.some((e=>!n[e.id]))&&(l=!1),l},getIsAllPageRowsSelected:()=>{const t=e.getPaginationRowModel().flatRows,{rowSelection:n}=e.getState();let l=!!t.length;return l&&t.some((e=>!n[e.id]))&&(l=!1),l},getIsSomeRowsSelected:()=>{var t;return!e.getIsAllRowsSelected()&&!!Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length},getIsSomePageRowsSelected:()=>{const t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&!(null==t||!t.length)},getToggleAllRowsSelectedHandler:()=>t=>{e.toggleAllRowsSelected(t.target.checked)},getToggleAllPageRowsSelectedHandler:()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}}),createRow:(e,t)=>({toggleSelected:n=>{const l=e.getIsSelected();t.setRowSelection((o=>{if(l===(n=void 0!==n?n:!l))return o;const i={...o};return z(i,e.id,n,t),i}))},getIsSelected:()=>{const{rowSelection:n}=t.getState();return!0===k(e,n)},getIsSomeSelected:()=>{const{rowSelection:n}=t.getState();return"some"===k(e,n)},getCanSelect:()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},getCanSelectSubRows:()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},getCanMultiSelect:()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},getToggleSelectedHandler:()=>{const t=e.getCanSelect();return n=>{var l;t&&e.toggleSelected(null==(l=n.target)?void 0:l.checked)}}})},z=(e,t,n,l)=>{var o;const i=l.getRow(t);i.getIsGrouped(),n?e[t]=!0:delete e[t],null!=(o=i.subRows)&&o.length&&i.getCanSelectSubRows()&&i.subRows.forEach((t=>z(e,t.id,n,l)))};function L(e,t){const n=e.getState().rowSelection,l=[],o={},i=function(e,t){return void 0===t&&(t=0),e.map((e=>{var r;const u=!0===k(e,n);if(u&&(l.push(e),o[e.id]=e),null!=(r=e.subRows)&&r.length&&(e={...e,subRows:i(e.subRows,t+1)}),u)return e})).filter(Boolean)};return{rows:i(t.rows),flatRows:l,rowsById:o}}function k(e,t,n){if(t[e.id])return!0;if(e.subRows&&e.subRows.length){let n=!0,l=!1;return e.subRows.forEach((e=>{l&&!n||(k(e,t)?l=!0:n=!1)})),!!n||!!l&&"some"}return!1}const O=/([0-9]+)/gm,T={alphanumeric:function(e,t,n){return D(j(e.getValue(n)).toLowerCase(),j(t.getValue(n)).toLowerCase())},alphanumericCaseSensitive:function(e,t,n){return D(j(e.getValue(n)),j(t.getValue(n)))},text:function(e,t,n){return B(j(e.getValue(n)).toLowerCase(),j(t.getValue(n)).toLowerCase())},textCaseSensitive:function(e,t,n){return B(j(e.getValue(n)),j(t.getValue(n)))},datetime:function(e,t,n){return B(e.getValue(n).getTime(),t.getValue(n).getTime())},basic:function(e,t,n){return B(e.getValue(n),t.getValue(n))}};function D(e,t){const n=e.split(O).filter(Boolean),l=t.split(O).filter(Boolean);for(;n.length&&l.length;){const e=n.shift(),t=l.shift(),o=parseInt(e,10),i=parseInt(t,10),r=[o,i].sort();if(isNaN(r[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(r[1]))return isNaN(o)?-1:1;if(o>i)return 1;if(i>o)return-1}}return n.length-l.length}function B(e,t){return e===t?0:e>t?1:-1}function j(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}const q={getInitialState:e=>({sorting:[],...e}),getDefaultColumn:()=>({sortingFn:"auto"}),getDefaultOptions:e=>({onSortingChange:n("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>({getAutoSortingFn:()=>{const n=t.getFilteredRowModel().flatRows.slice(100);let l=!1;for(const t of n){const n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return T.datetime;if("string"==typeof n&&(l=!0,n.split(O).length>1))return T.alphanumeric}return l?T.text:T.basic},getAutoSortDir:()=>{const n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},getSortingFn:()=>{var n;const o=t.options.sortingFns;if(!e)throw new Error;return l(e.sortingFn)?e.sortingFn:"auto"===e.sortingFn?e.getAutoSortingFn():null!=(n=null==o?void 0:o[e.sortingFn])?n:T[e.sortingFn]},toggleSorting:(n,l)=>{t.setSorting((o=>{var i,r,u,a;const s=null==o?void 0:o.find((t=>t.id===e.id)),g=null==o?void 0:o.findIndex((t=>t.id===e.id)),d=null!=n;let c,p=[];c=e.getCanMultiSort()&&l?s?"toggle":"add":null!=o&&o.length&&g!==o.length-1?"replace":s?"toggle":"replace";const f=null!=(i=null!=(r=e.sortDescFirst)?r:t.options.sortDescFirst)?i:"desc"===e.getAutoSortDir();if("toggle"!==c||null!=(u=t.options.enableSortingRemoval)&&!u||d||l&&null!=(a=t.options.enableMultiRemove)&&!a||(null!=s&&s.desc?f:!f)||(c="remove"),"replace"===c)p=[{id:e.id,desc:d?n:!!f}];else if("add"===c&&null!=o&&o.length){var m;p=[...o,{id:e.id,desc:d?n:!!f}],p.splice(0,p.length-(null!=(m=t.options.maxMultiSortColCount)?m:Number.MAX_SAFE_INTEGER))}else"toggle"===c&&null!=o&&o.length?p=o.map((t=>t.id===e.id?{...t,desc:d?n:!(null!=s&&s.desc)}:t)):"remove"===c&&null!=o&&o.length&&(p=o.filter((t=>t.id!==e.id)));return p}))},getCanSort:()=>{var n,l;return(null==(n=e.enableSorting)||n)&&(null==(l=t.options.enableSorting)||l)&&!!e.accessorFn},getCanMultiSort:()=>{var n,l;return null!=(n=null!=(l=e.enableMultiSort)?l:t.options.enableMultiSort)?n:!!e.accessorFn},getIsSorted:()=>{var n;const l=null==(n=t.getState().sorting)?void 0:n.find((t=>t.id===e.id));return!!l&&(l.desc?"desc":"asc")},getSortIndex:()=>{var n,l;return null!=(n=null==(l=t.getState().sorting)?void 0:l.findIndex((t=>t.id===e.id)))?n:-1},clearSorting:()=>{t.setSorting((t=>null!=t&&t.length?t.filter((t=>t.id!==e.id)):[]))},getToggleSortingHandler:()=>{const n=e.getCanSort();return l=>{n&&(null==l.persist||l.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(l))))}}}),createInstance:e=>({setSorting:t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),resetSorting:t=>{var n,l;e.setSorting(t?[]:null!=(n=null==(l=e.initialState)?void 0:l.sorting)?n:[])},getPreSortedRowModel:()=>e.getFilteredRowModel(),getSortedRowModel:()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())})},N={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:n("columnVisibility",e)}),getDefaultColumn:()=>({defaultIsVisible:!0}),createColumn:(e,t)=>({toggleVisibility:n=>{e.getCanHide()&&t.setColumnVisibility((t=>({...t,[e.id]:null!=n?n:!e.getIsVisible()})))},getIsVisible:()=>{var n,l;return null==(n=null==(l=t.getState().columnVisibility)?void 0:l[e.id])||n},getCanHide:()=>{var n,l;return(null==(n=e.enableHiding)||n)&&(null==(l=t.options.enableHiding)||l)},getToggleVisibilityHandler:()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}}),createRow:(e,t)=>({_getAllVisibleCells:i((()=>[e.getAllCells().filter((e=>e.column.getIsVisible())).map((e=>e.id)).join("_")]),(t=>e.getAllCells().filter((e=>e.column.getIsVisible()))),{key:"row._getAllVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getVisibleCells:i((()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]),((e,t,n)=>[...e,...t,...n]),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}),createInstance:e=>{const t=(t,n)=>i((()=>[n(),n().filter((e=>e.getIsVisible())).map((e=>e.id)).join("_")]),(e=>e.filter((e=>null==e.getIsVisible?void 0:e.getIsVisible()))),{key:t,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}});return{getVisibleFlatColumns:t("getVisibleFlatColumns",(()=>e.getAllFlatColumns())),getVisibleLeafColumns:t("getVisibleLeafColumns",(()=>e.getAllLeafColumns())),getLeftVisibleLeafColumns:t("getLeftVisibleLeafColumns",(()=>e.getLeftLeafColumns())),getRightVisibleLeafColumns:t("getRightVisibleLeafColumns",(()=>e.getRightLeafColumns())),getCenterVisibleLeafColumns:t("getCenterVisibleLeafColumns",(()=>e.getCenterLeafColumns())),setColumnVisibility:t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),resetColumnVisibility:t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},toggleAllColumnsVisible:t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce(((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())})),{}))},getIsAllColumnsVisible:()=>!e.getAllLeafColumns().some((e=>!(null!=e.getIsVisible&&e.getIsVisible()))),getIsSomeColumnsVisible:()=>e.getAllLeafColumns().some((e=>null==e.getIsVisible?void 0:e.getIsVisible())),getToggleAllColumnsVisibilityHandler:()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}}},U={createInstance:e=>({createHeader:(t,n)=>{var l;let o={id:null!=(l=n.id)?l:t.id,column:t,index:n.index,isPlaceholder:n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(o),e},renderHeader:()=>t.header?e.render(t.header,{instance:e,header:o,column:t}):null,renderFooter:()=>t.footer?e.render(t.footer,{instance:e,header:o,column:t}):null};return e._features.forEach((t=>{Object.assign(o,null==t.createHeader?void 0:t.createHeader(o,e))})),o},getHeaderGroups:i((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,l,o)=>{const i=n.filter((e=>null==l?void 0:l.includes(e.id))),r=n.filter((e=>null==o?void 0:o.includes(e.id)));return X(t,[...i,...n.filter((e=>!(null!=l&&l.includes(e.id)||null!=o&&o.includes(e.id)))),...r],e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterHeaderGroups:i((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,l,o)=>X(t,n=n.filter((e=>!(null!=l&&l.includes(e.id)||null!=o&&o.includes(e.id)))),e,"center")),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftHeaderGroups:i((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,n,l)=>X(t,n=n.filter((e=>null==l?void 0:l.includes(e.id))),e,"left")),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightHeaderGroups:i((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,n,l)=>X(t,n=n.filter((e=>null==l?void 0:l.includes(e.id))),e,"right")),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getFooterGroups:i((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftFooterGroups:i((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterFooterGroups:i((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightFooterGroups:i((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getFlatHeaders:i((()=>[e.getHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftFlatHeaders:i((()=>[e.getLeftHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterFlatHeaders:i((()=>[e.getCenterHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightFlatHeaders:i((()=>[e.getRightHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterLeafHeaders:i((()=>[e.getCenterFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftLeafHeaders:i((()=>[e.getLeftFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightLeafHeaders:i((()=>[e.getRightFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeafHeaders:i((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,n)=>{var l,o,i,r,u,a;return[...null!=(l=null==(o=e[0])?void 0:o.headers)?l:[],...null!=(i=null==(r=t[0])?void 0:r.headers)?i:[],...null!=(u=null==(a=n[0])?void 0:a.headers)?u:[]].map((e=>e.getLeafHeaders())).flat()}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getHeader:t=>{const n=[...e.getFlatHeaders(),...e.getCenterFlatHeaders(),...e.getLeftFlatHeaders(),...e.getRightFlatHeaders()].find((e=>e.id===t));if(!n)throw new Error;return n}})};function X(e,t,n,l){var o,i;let r=0;const u=function(e,t){void 0===t&&(t=1),r=Math.max(r,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var n;null!=(n=e.columns)&&n.length&&u(e.columns,t+1)}),0)};u(e);let a=[];const s=(e,t)=>{const o={depth:t,id:[l,""+t].filter(Boolean).join("_"),headers:[]},i=[];e.forEach((e=>{const r=[...i].reverse()[0];let u,a=!1;if(e.column.depth===o.depth&&e.column.parent?u=e.column.parent:(u=e.column,a=!0),(null==r?void 0:r.column)===u)r.subHeaders.push(e);else{const o=n.createHeader(u,{id:[l,t,u.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:a,placeholderId:a?""+i.filter((e=>e.column===u)).length:void 0,depth:t,index:i.length});o.subHeaders.push(e),i.push(o)}o.headers.push(e),e.headerGroup=o})),a.push(o),t>0&&s(i,t-1)},g=t.map(((e,t)=>n.createHeader(e,{depth:r,index:t})));s(g,r-1),a.reverse();const d=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,n=0,l=[0];e.subHeaders&&e.subHeaders.length?(l=[],d(e.subHeaders).forEach((e=>{let{colSpan:n,rowSpan:o}=e;t+=n,l.push(o)}))):t=1;return n+=Math.min(...l),e.colSpan=t>0?t:void 0,e.rowSpan=n>0?n:void 0,{colSpan:t,rowSpan:n}}));return d(null!=(o=null==(i=a[0])?void 0:i.headers)?o:[]),a}function K(e,t,n){const l={generics:void 0,options:null!=n?n:{render:(()=>{throw new Error("")})()},setGenerics:()=>l,setRowType:()=>l,setTableMetaType:()=>l,setColumnMetaType:()=>l,setOptions:l=>K(e,t,{...n,...l}),createDisplayColumn:e=>({...e,columnDefType:"display"}),createGroup:e=>({...e,columnDefType:"group"}),createDataColumn:(e,t)=>{var n;if(t={...t,columnDefType:"data",id:t.id},"string"==typeof e)return{...t,id:null!=(n=t.id)?n:e,accessorKey:e};if("function"==typeof e)return{...t,accessorFn:e};throw new Error("Invalid accessor")}};return l}function J(e,t,n){return n.options.filterFromLeafRows?function(e,t,n){const l=[],o={};let i,r;const u=function(e,l){void 0===l&&(l=0);const a=[];for(let g=0;g<e.length;g++){var s;if(i=e[g],null!=(s=i.subRows)&&s.length){if(r=n.createRow(i.id,i.original,i.index,i.depth),r.columnFilterMap=i.columnFilterMap,r.subRows=u(i.subRows,l+1),!r.subRows.length)continue;i=r}t(i)&&(a.push(i),o[i.id]=i,o[g]=i)}return a};return{rows:u(e),flatRows:l,rowsById:o}}(e,t,n):function(e,t,n){const l=[],o={};let i,r,u;const a=function(e,s){void 0===s&&(s=0),i=[];for(let d=0;d<e.length;d++){r=e[d];var g;if(t(r))null!=(g=r.subRows)&&g.length&&(u=n.createRow(r.id,r.original,r.index,r.depth),u.subRows=a(r.subRows,s+1),r=u),i.push(r),l.push(r),o[r.id]=r}return i};return{rows:a(e),flatRows:l,rowsById:o}}(e,t,n)}function Q(e,t){const n=[],l=e=>{var o;n.push(e),t.options.expandSubRows&&null!=(o=e.subRows)&&o.length&&e.getIsExpanded()&&e.subRows.forEach(l)};return e.rows.forEach(l),{rows:n,flatRows:e.flatRows,rowsById:e.rowsById}}e.ColumnSizing=g,e.Expanding=f,e.Filters=y,e.Grouping=A,e.Headers=U,e.Ordering=E,e.Pagination=_,e.Pinning=G,e.RowSelection=H,e.Sorting=q,e.Visibility=N,e.buildHeaderGroups=X,e.createTableFactory=function(e){return()=>K(void 0,void 0,e)},e.createTableInstance=function(e){var n;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");let l={_features:[r,u,a,U,N,E,G,y,q,A,f,_,H,g]};const o=l._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(l))),{});let i={...null!=(n=e.initialState)?n:{}};l._features.forEach((e=>{var t;i=null!=(t=null==e.getInitialState?void 0:e.getInitialState(i))?t:i}));const s=[];let d=!1;const c={...l,options:{...o,...e},initialState:i,queue:e=>{s.push(e),d||(d=!0,Promise.resolve().then((()=>{for(;s.length;)s.shift()();d=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{l.setState(l.initialState)},setOptions:e=>{const n=t(e,l.options);l.options=(e=>l.options.mergeOptions?l.options.mergeOptions(o,e):{...o,...e})(n)},render:(e,t)=>"function"==typeof l.options.render?l.options.render(e,t):"function"==typeof e?e(t):e,getState:()=>l.options.state,setState:e=>{null==l.options.onStateChange||l.options.onStateChange(e)}};return l=Object.assign(l,c),l._features.forEach((e=>Object.assign(l,null==e.createInstance?void 0:e.createInstance(l)))),l},e.defaultColumnSizing=s,e.expandRows=Q,e.flattenBy=o,e.functionalUpdate=t,e.getCoreRowModel=function(){return e=>i((()=>[e.options.data]),(t=>{const n=[],l=[],o={},i=e.getAllLeafColumns(),r=function(t,n,u,a,s){void 0===u&&(u=0);const g=e.getRowId(t,n,s),d={};for(let e=0;e<i.length;e++){const l=i[e];l&&l.accessorFn&&(d[l.id]=l.accessorFn(t,n))}const c=e.createRow(g,t,n,u);if(a.push(c),l.push(c),o[g]=c,e.options.getSubRows){const l=e.options.getSubRows(t,n);if(null!=l&&l.length){c.originalSubRows=l;const e=[];for(let t=0;t<c.originalSubRows.length;t++)r(c.originalSubRows[t],t,u+1,e,c);c.subRows=e}}};for(let e=0;e<t.length;e++)r(t[e],e,0,n);return{rows:n,flatRows:l,rowsById:o}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})},e.getExpandedRowModel=function(){return e=>i((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((t,n,l)=>n.rows.length&&l&&(!0===t||Object.keys(null!=t?t:{}).length)?Q(n,e):n),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}})},e.getFacetedMinMaxValues=function(){return(e,t)=>i((()=>[e.getColumn(t).getFacetedRowModel()]),(e=>{var n;const l=null==(n=e.flatRows[0])?void 0:n.getValue(t);if(void 0===l)return;let o=[l,l];for(let n=0;n<e.flatRows.length;n++){var i;const l=null==(i=e.flatRows[n])?void 0:i.getValue(t);l<o[0]?o[0]=l:l>o[1]&&(o[1]=l)}return o}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{}})},e.getFacetedRowModel=function(){return(e,t)=>i((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()]),((n,l,o)=>{if(!n.rows.length||(null==l||!l.length)&&!o)return n;const i=[...l.map((e=>e.id)).filter((e=>e!==t)),o?"__global__":void 0].filter(Boolean);return J(n.rows,(e=>{for(let t=0;t<i.length;t++)if(!1===e.columnFilterMap[i[t]])return!1;return!0}),e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{}})},e.getFacetedUniqueValues=function(){return(e,t)=>i((()=>[e.getColumn(t).getFacetedRowModel()]),(e=>{let n=new Map;for(let i=0;i<e.flatRows.length;i++){var l;const r=null==(l=e.flatRows[i])?void 0:l.getValue(t);var o;if(n.has(r))n.set(r,(null!=(o=n.get(r))?o:0)+1);else n.set(r,1)}return n}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{}})},e.getFilteredRowModel=function(){return e=>i((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,l)=>{if(!t.rows.length||(null==n||!n.length)&&!l)return t;const o=[],i=[];(null!=n?n:[]).forEach((t=>{var n;const l=e.getColumn(t.id).getFilterFn();l&&o.push({id:t.id,filterFn:l,resolvedValue:null!=(n=null==l.resolveFilterValue?void 0:l.resolveFilterValue(t.value))?n:t.value})}));const r=n.map((e=>e.id)),u=e.getGlobalFilterFn(),a=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let s,g;l&&u&&a.length&&(r.push("__global__"),a.forEach((e=>{var t;i.push({id:e.id,filterFn:u,resolvedValue:null!=(t=null==u.resolveFilterValue?void 0:u.resolveFilterValue(l))?t:l})})));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilterMap={},o.length)for(let e=0;e<o.length;e++)s=o[e],n.columnFilterMap[s.id]=s.filterFn(n,s.id,s.resolvedValue);if(i.length){for(let e=0;e<i.length;e++)if(g=i[e],g.filterFn(n,g.id,g.resolvedValue)){n.columnFilterMap.__global__=!0;break}!0!==n.columnFilterMap.__global__&&(n.columnFilterMap.__global__=!1)}}return J(t.rows,(e=>{for(let t=0;t<r.length;t++)if(!1===e.columnFilterMap[r[t]])return!1;return!0}),e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})},e.getGroupedRowModel=function(){return e=>i((()=>[e.getState().grouping,e.getPreGroupedRowModel()]),((t,n)=>{if(!n.rows.length||!t.length)return n;const l=t.filter((t=>e.getColumn(t))),i=[],r={},u=function(t,n,a){if(void 0===n&&(n=0),n===l.length)return t;const s=l[n],g=function(e,t){const n=new Map;return e.reduce(((e,n)=>{const l=""+n.getValue(t),o=e.get(l);return o?e.set(l,[...o,n]):e.set(l,[n]),e}),n)}(t,s),d=Array.from(g.entries()).map(((t,g)=>{let[d,c]=t,p=s+":"+d;p=a?a+">"+p:p;const f=u(c,n+1,p),m=n?o(c,(e=>e.subRows)):c,b=e.createRow(p,void 0,g,n);return Object.assign(b,{groupingColumnId:s,groupingValue:d,subRows:f,leafRows:m,getValue:t=>{if(l.includes(t)){if(b.valuesCache.hasOwnProperty(t))return b.valuesCache[t];var o;if(c[0])b.valuesCache[t]=null!=(o=c[0].getValue(t))?o:void 0;return b.valuesCache[t]}if(b.groupingValuesCache.hasOwnProperty(t))return b.groupingValuesCache[t];const i=e.getColumn(t),r=i.getColumnAggregationFn();if(r)return b.groupingValuesCache[t]=r((()=>m.map((e=>{let l=e.getValue(t);return!n&&i.aggregateValue&&(l=i.aggregateValue(l)),l}))),(()=>c.map((e=>e.getValue(t))))),b.groupingValuesCache[t];if(i.aggregationFn)throw console.info({column:i}),new Error("")}}),f.forEach((e=>{i.push(e),r[e.id]=e})),b}));return d},a=u(n.rows,0,"");return a.forEach((e=>{i.push(e),r[e.id]=e})),{rows:a,flatRows:i,rowsById:r}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e.queue((()=>{e._autoResetExpanded(),e._autoResetPageIndex()}))}})},e.getPaginationRowModel=function(e){return e=>i((()=>[e.getState().pagination,e.getPrePaginationRowModel()]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:l,pageIndex:o}=t;let{rows:i,flatRows:r,rowsById:u}=n;const a=l*o,s=a+l;return i=i.slice(a,s),e.options.paginateExpandedRows?{rows:i,flatRows:r,rowsById:u}:Q({rows:i,flatRows:r,rowsById:u},e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}})},e.getSortedRowModel=function(){return e=>i((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const l=e.getState().sorting,o=[],i=l.filter((t=>e.getColumn(t.id).getCanSort())),r={};i.forEach((t=>{const n=e.getColumn(t.id);r[t.id]={sortUndefined:n.sortUndefined,invertSorting:n.invertSorting,sortingFn:n.getSortingFn()}}));const u=e=>{const t=e.slice();return t.sort(((e,t)=>{for(let l=0;l<i.length;l+=1){var n;const o=i[l],u=r[o.id],a=null!=(n=null==o?void 0:o.desc)&&n;if(u.sortUndefined){const n=void 0===e.getValue(o.id),l=void 0===t.getValue(o.id);if(n||l)return n&&l?0:n?u.sortUndefined:-u.sortUndefined}let s=u.sortingFn(e,t,o.id);if(0!==s)return a&&(s*=-1),u.invertSorting&&(s*=-1),s}return e.index-t.index})),t.forEach((e=>{o.push(e),!e.subRows||e.subRows.length<=1||(e.subRows=u(e.subRows))})),t};return{rows:u(n.rows),flatRows:o,rowsById:n.rowsById}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})},e.isFunction=l,e.isRowSelected=k,e.makeStateUpdater=n,e.memo=i,e.noop=function(){},e.orderColumns=P,e.passiveEventSupported=c,e.selectRowsFn=L,e.shouldAutoRemoveFilter=V,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TableCore={})}(this,(function(e){"use strict";function t(e,t){return"function"==typeof e?e(t):e}function n(e,n){return l=>{n.setState((n=>({...n,[e]:t(l,n[e])})))}}function l(e){return e instanceof Function}function o(e,t){const n=[],l=e=>{e.forEach((e=>{n.push(e);const o=t(e);null!=o&&o.length&&l(o)}))};return l(e),n}function i(e,t,n){let l,o=[];return()=>{let i;n.key&&n.debug&&(i=Date.now());const r=e();if(!(r.length!==o.length||r.some(((e,t)=>o[t]!==e))))return l;let u;if(o=r,n.key&&n.debug&&(u=Date.now()),l=t(...r),null==n||null==n.onChange||n.onChange(l),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-i))/100,t=Math.round(100*(Date.now()-u))/100,l=t/16,o=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info("%c⏱ "+o(t,5)+" /"+o(e,5)+" ms","\n font-size: .6rem;\n font-weight: bold;\n color: hsl("+Math.max(0,Math.min(120-120*l,120))+"deg 100% 31%);",null==n?void 0:n.key)}return l}}const r={createInstance:e=>({getDefaultColumn:i((()=>[e.options.defaultColumn]),(t=>{var n;return t=null!=(n=t)?n:{},{header:e=>e.header.column.id,footer:e=>e.header.column.id,cell:e=>{var t,n,l;return null!=(t=null==(n=(l=e.getValue()).toString)?void 0:n.call(l))?t:null},...e._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumn?void 0:t.getDefaultColumn())),{}),...t}}),{debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns},key:!1}),getColumnDefs:()=>e.options.columns,createColumn:(t,n,l)=>{var o,r;const u=e.getDefaultColumn();let a,s=null!=(o=null!=(r=t.id)?r:t.accessorKey)?o:"string"==typeof t.header?t.header:void 0;if(t.accessorFn?a=t.accessorFn:t.accessorKey&&(a=e=>e[t.accessorKey]),!s)throw new Error;let g={...u,...t,id:""+s,accessorFn:a,parent:l,depth:n,columnDef:t,columnDefType:t.columnDefType,columns:[],getFlatColumns:i((()=>[!0]),(()=>{var e;return[g,...null==(e=g.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),{key:"column.getFlatColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getLeafColumns:i((()=>[e._getOrderColumnsFn()]),(e=>{var t;if(null!=(t=g.columns)&&t.length){let t=g.columns.flatMap((e=>e.getLeafColumns()));return e(t)}return[g]}),{key:"column.getLeafColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})};return g=e._features.reduce(((t,n)=>Object.assign(t,null==n.createColumn?void 0:n.createColumn(g,e))),g),g},getAllColumns:i((()=>[e.getColumnDefs()]),(t=>{const n=function(t,l,o){return void 0===o&&(o=0),t.map((t=>{const i=e.createColumn(t,o,l);return i.columns=t.columns?n(t.columns,i,o+1):[],i}))};return n(t)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getAllFlatColumns:i((()=>[e.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getAllFlatColumnsById:i((()=>[e.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getAllLeafColumns:i((()=>[e.getAllColumns(),e._getOrderColumnsFn()]),((e,t)=>t(e.flatMap((e=>e.getLeafColumns())))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getColumn:t=>{const n=e.getAllFlatColumnsById()[t];if(!n)throw new Error;return n}})},u={createInstance:e=>({getRowId:(t,n,l)=>{var o;return null!=(o=null==e.options.getRowId?void 0:e.options.getRowId(t,n,l))?o:""+(l?[l.id,n].join("."):n)},createRow:(t,n,l,i,r)=>{let u={id:t,index:l,original:n,depth:i,valuesCache:{},getValue:t=>{if(u.valuesCache.hasOwnProperty(t))return u.valuesCache[t];const n=e.getColumn(t);if(!n.accessorFn)throw new Error;return u.valuesCache[t]=n.accessorFn(u.original,l),u.valuesCache[t]},subRows:null!=r?r:[],getLeafRows:()=>o(u.subRows,(e=>e.subRows))};for(let t=0;t<e._features.length;t++){const n=e._features[t];Object.assign(u,null==n||null==n.createRow?void 0:n.createRow(u,e))}return u},getCoreRowModel:()=>(e._getCoreRowModel||(e._getCoreRowModel=e.options.getCoreRowModel(e)),e._getCoreRowModel()),getRowModel:()=>e.getPaginationRowModel(),getRow:t=>{const n=e.getRowModel().rowsById[t];if(!n)throw new Error;return n}})},a={createRow:(e,t)=>({getAllCells:i((()=>[t.getAllLeafColumns()]),(n=>n.map((n=>t.createCell(e,n,n.id)))),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getAllCellsByColumnId:i((()=>[e.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.columnId]=t,e)),{})),{key:"row.getAllCellsByColumnId",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}),createInstance:e=>({createCell:(t,n,l)=>{const o={id:t.id+"_"+n.id,rowId:t.id,columnId:l,row:t,column:n,getValue:()=>t.getValue(l),renderCell:()=>n.cell?e._render(n.cell,{instance:e,column:n,row:t,cell:o,getValue:o.getValue}):null};return e._features.forEach((l=>{Object.assign(o,null==l.createCell?void 0:l.createCell(o,n,t,e))}),{}),o},getCell:(t,n)=>{const l=e.getRow(t);if(!l)throw new Error;const o=l.getAllCellsByColumnId()[n];if(!o)throw new Error;return o}})},s={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},g={getDefaultColumn:()=>s,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",onColumnSizingChange:n("columnSizing",e),onColumnSizingInfoChange:n("columnSizingInfo",e)}),createColumn:(e,t)=>({getSize:()=>{var n,l,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.minSize)?n:s.minSize,null!=(l=null!=i?i:e.size)?l:s.size),null!=(o=e.maxSize)?o:s.maxSize)},getStart:n=>{const l=n?"left"===n?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns(),o=l.findIndex((t=>t.id===e.id));if(o>0){const e=l[o-1];return e.getStart(n)+e.getSize()}return 0},resetSize:()=>{t.setColumnSizing((t=>{let{[e.id]:n,...l}=t;return l}))},getCanResize:()=>{var n,l;return(null==(n=e.enableResizing)||n)&&(null==(l=t.options.enableColumnResizing)||l)},getIsResizing:()=>t.getState().columnSizingInfo.isResizingColumn===e.id}),createHeader:(e,t)=>({getSize:()=>{let t=0;const n=e=>{var l;e.subHeaders.length?e.subHeaders.forEach(n):t+=null!=(l=e.column.getSize())?l:0};return n(e),t},getStart:()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},getResizeHandler:()=>{const n=t.getColumn(e.column.id),l=n.getCanResize();return o=>{if(!l)return;if(null==o.persist||o.persist(),p(o)&&o.touches&&o.touches.length>1)return;const i=n.getSize(),r=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[n.id,n.getSize()]],u=p(o)?Math.round(o.touches[0].clientX):o.clientX,a=(e,n)=>{if("number"!=typeof n)return;let l={};t.setColumnSizingInfo((e=>{var t,o;const i=n-(null!=(t=null==e?void 0:e.startOffset)?t:0),r=Math.max(i/(null!=(o=null==e?void 0:e.startSize)?o:0),-.999999);return e.columnSizingStart.forEach((e=>{let[t,n]=e;l[t]=Math.round(100*Math.max(n+n*r,0))/100})),{...e,deltaOffset:i,deltaPercentage:r}})),"onChange"!==t.options.columnResizeMode&&"end"!==e||t.setColumnSizing((e=>({...e,...l})))},s={moveHandler:e=>{return t=e.clientX,a("move",t);var t},upHandler:e=>{var n;document.removeEventListener("mousemove",s.moveHandler),document.removeEventListener("mouseup",s.upHandler),n=e.clientX,a("end",n),t.setColumnSizingInfo((e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))}},g=!!c()&&{passive:!1};p(o)||(document.addEventListener("mousemove",s.moveHandler,g),document.addEventListener("mouseup",s.upHandler,g)),t.setColumnSizingInfo((e=>({...e,startOffset:u,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:r,isResizingColumn:n.id})))}}}),createInstance:e=>({setColumnSizing:t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),setColumnSizingInfo:t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),resetColumnSizing:t=>{var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},resetHeaderSizeInfo:t=>{var n;e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},getTotalSize:()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},getLeftTotalSize:()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},getCenterTotalSize:()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},getRightTotalSize:()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0}})};let d=null;function c(){if("boolean"==typeof d)return d;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch(t){e=!1}return d=e,d}function p(e){return"touchstart"===e.type}const f={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:n("expanded",e),autoResetExpanded:!0,expandSubRows:!0,paginateExpandedRows:!0}),createInstance:e=>{let t=!1,n=!1;return{_autoResetExpanded:()=>{if(t){if(!1!==e.options.autoResetAll&&(!0===e.options.autoResetAll||e.options.autoResetExpanded)){if(n)return;n=!0,e._queue((()=>{e.resetExpanded(),n=!1}))}}else e._queue((()=>{t=!0}))},setExpanded:t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),toggleAllRowsExpanded:t=>{(null!=t?t:!e.getIsAllRowsExpanded())?e.setExpanded(!0):e.setExpanded({})},resetExpanded:t=>{var n,l;e.setExpanded(t?{}:null!=(n=null==(l=e.initialState)?void 0:l.expanded)?n:{})},getCanSomeRowsExpand:()=>e.getRowModel().flatRows.some((e=>e.getCanExpand())),getToggleAllRowsExpandedHandler:()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},getIsSomeRowsExpanded:()=>{const t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},getIsAllRowsExpanded:()=>!0===e.getState().expanded||!e.getRowModel().flatRows.some((e=>e.getIsExpanded())),getExpandedDepth:()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach((e=>{const n=e.split(".");t=Math.max(t,n.length)})),t},getPreExpandedRowModel:()=>e.getGroupedRowModel(),getExpandedRowModel:()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())}},createRow:(e,t)=>({toggleExpanded:n=>{t.setExpanded((l=>{var o;const i=!0===l||!(null==l||!l[e.id]);let r={};if(!0===l?Object.keys(t.getRowModel().rowsById).forEach((e=>{r[e]=!0})):r=l,n=null!=(o=n)?o:!i,!i&&n)return{...r,[e.id]:!0};if(i&&!n){const{[e.id]:t,...n}=r;return n}return l}))},getIsExpanded:()=>{var n;const l=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===l||(null==l?void 0:l[e.id]))},getCanExpand:()=>{var n,l,o;return(null==(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))||n)&&(null==(l=t.options.enableExpanding)||l)&&!(null==(o=e.subRows)||!o.length)},getToggleExpandedHandler:()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}})},m=(e,t,n)=>{const l=n.toLowerCase();return e.getValue(t).toLowerCase().includes(l)};m.autoRemove=e=>I(e);const b=(e,t,n)=>e.getValue(t).includes(n);b.autoRemove=e=>I(e);const w=(e,t,n)=>e.getValue(t).toLowerCase()===n.toLowerCase();w.autoRemove=e=>I(e);const C=(e,t,n)=>e.getValue(t).includes(n);C.autoRemove=e=>I(e)||!(null!=e&&e.length);const h=(e,t,n)=>!n.some((n=>!e.getValue(t).includes(n)));h.autoRemove=e=>I(e)||!(null!=e&&e.length);const v=(e,t,n)=>n.some((n=>e.getValue(t).includes(n)));v.autoRemove=e=>I(e)||!(null!=e&&e.length);const S=(e,t,n)=>e.getValue(t)===n;S.autoRemove=e=>I(e);const R=(e,t,n)=>e.getValue(t)==n;R.autoRemove=e=>I(e);const F=(e,t,n)=>{let[l,o]=n;const i=e.getValue(t);return i>=l&&i<=o};F.resolveFilterValue=e=>{let[t,n]=e,l="number"!=typeof t?parseFloat(t):t,o="number"!=typeof n?parseFloat(n):n,i=null===t||Number.isNaN(l)?-1/0:l,r=null===n||Number.isNaN(o)?1/0:o;if(i>r){const e=i;i=r,r=e}return[i,r]},F.autoRemove=e=>I(e)||I(e[0])&&I(e[1]);const M={includesString:m,includesStringSensitive:b,equalsString:w,arrIncludes:C,arrIncludesAll:h,arrIncludesSome:v,equals:S,weakEquals:R,inNumberRange:F};function I(e){return null==e||""===e}const y={getDefaultColumn:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:n("columnFilters",e),onGlobalFilterChange:n("globalFilter",e),filterFromLeafRows:!1,globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n,l;return"string"==typeof(null==(n=e.getCoreRowModel().flatRows[0])||null==(l=n.getAllCellsByColumnId()[t.id])?void 0:l.getValue())}}),createColumn:(e,n)=>({filterFn:e.filterFn,getAutoFilterFn:()=>{const t=n.getCoreRowModel().flatRows[0],l=null==t?void 0:t.getValue(e.id);return"string"==typeof l?M.includesString:"number"==typeof l?M.inNumberRange:null!==l&&"object"==typeof l?M.equals:Array.isArray(l)?M.arrIncludes:M.weakEquals},getFilterFn:()=>{var t;const o=n.options.filterFns;return l(e.filterFn)?e.filterFn:"auto"===e.filterFn?e.getAutoFilterFn():null!=(t=null==o?void 0:o[e.filterFn])?t:M[e.filterFn]},getCanFilter:()=>{var t,l,o;return(null==(t=e.enableColumnFilter)||t)&&(null==(l=n.options.enableColumnFilters)||l)&&(null==(o=n.options.enableFilters)||o)&&!!e.accessorFn},getCanGlobalFilter:()=>{var t,l,o,i;return(null==(t=e.enableGlobalFilter)||t)&&(null==(l=n.options.enableGlobalFilter)||l)&&(null==(o=n.options.enableFilters)||o)&&(null==(i=null==n.options.getColumnCanGlobalFilter?void 0:n.options.getColumnCanGlobalFilter(e))||i)&&!!e.accessorFn},getIsFiltered:()=>e.getFilterIndex()>-1,getFilterValue:()=>{var t,l;return null==(t=n.getState().columnFilters)||null==(l=t.find((t=>t.id===e.id)))?void 0:l.value},getFilterIndex:()=>{var t,l;return null!=(t=null==(l=n.getState().columnFilters)?void 0:l.findIndex((t=>t.id===e.id)))?t:-1},setFilterValue:l=>{n.setColumnFilters((n=>{const o=e.getFilterFn(),i=null==n?void 0:n.find((t=>t.id===e.id)),r=t(l,i?i.value:void 0);var u;if(V(o,r,e))return null!=(u=null==n?void 0:n.filter((t=>t.id!==e.id)))?u:[];const a={id:e.id,value:r};var s;return i?null!=(s=null==n?void 0:n.map((t=>t.id===e.id?a:t)))?s:[]:null!=n&&n.length?[...n,a]:[a]}))},_getFacetedRowModel:n.options.getFacetedRowModel&&n.options.getFacetedRowModel(n,e.id),getFacetedRowModel:()=>e._getFacetedRowModel?e._getFacetedRowModel():n.getPreFilteredRowModel(),_getFacetedUniqueValues:n.options.getFacetedUniqueValues&&n.options.getFacetedUniqueValues(n,e.id),getFacetedUniqueValues:()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,_getFacetedMinMaxValues:n.options.getFacetedMinMaxValues&&n.options.getFacetedMinMaxValues(n,e.id),getFacetedMinMaxValues:()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}),createRow:(e,t)=>({columnFilterMap:{},subRowsByFacetId:{}}),createInstance:e=>({getGlobalAutoFilterFn:()=>M.includesString,getGlobalFilterFn:()=>{var t;const{filterFns:n,globalFilterFn:o}=e.options;return l(o)?o:"auto"===o?e.getGlobalAutoFilterFn():null!=(t=null==n?void 0:n[o])?t:M[o]},setColumnFilters:n=>{const l=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var o;return null==(o=t(n,e))?void 0:o.filter((e=>{const t=l.find((t=>t.id===e.id));if(t){if(V(t.getFilterFn(),e.value,t))return!1}return!0}))}))},setGlobalFilter:t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},resetGlobalFilter:t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)},resetColumnFilters:t=>{var n,l;e.setColumnFilters(t?[]:null!=(n=null==(l=e.initialState)?void 0:l.columnFilters)?n:[])},getPreFilteredRowModel:()=>e.getCoreRowModel(),_getFilteredRowModel:e.options.getFilteredRowModel&&e.options.getFilteredRowModel(e),getFilteredRowModel:()=>e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel(),_getGlobalFacetedRowModel:e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),getGlobalFacetedRowModel:()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),_getGlobalFacetedUniqueValues:e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),getGlobalFacetedUniqueValues:()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,_getGlobalFacetedMinMaxValues:e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),getGlobalFacetedMinMaxValues:()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}})};function V(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}const x={sum:function(e,t){return t().reduce(((e,t)=>e+("number"==typeof t?t:0)),0)},min:function(e,t){let n;for(const e of t())null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);return n},max:function(e,t){let n;for(const e of t())null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);return n},extent:function(e,t){let n,l;for(const e of t())null!=e&&(void 0===n?e>=e&&(n=l=e):(n>e&&(n=e),l<e&&(l=e)));return[n,l]},mean:function(e){let t=0,n=0;for(let l of e())null!=l&&(l=+l)>=l&&(++t,n+=l);return t?n/t:void 0},median:function(e){const t=e();if(!t.length)return;let n=0,l=0;return t.forEach((e=>{"number"==typeof e&&(n=Math.min(n,e),l=Math.max(l,e))})),(n+l)/2},unique:function(e){return Array.from(new Set(e()).values())},uniqueCount:function(e){return new Set(e()).size},count:function(e){return e().length}};const A={getDefaultColumn:()=>({aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:n("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>({toggleGrouping:()=>{t.setGrouping((t=>null!=t&&t.includes(e.id)?t.filter((t=>t!==e.id)):[...null!=t?t:[],e.id]))},getCanGroup:()=>{var n,l,o,i;return null!=(n=null==(l=null!=(o=null==(i=e.enableGrouping)||i)?o:t.options.enableGrouping)||l)?n:!!e.accessorFn},getIsGrouped:()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},getGroupedIndex:()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},getToggleGroupingHandler:()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},getColumnAutoAggregationFn:()=>{const n=t.getCoreRowModel().flatRows[0],l=null==n?void 0:n.getValue(e.id);return"number"==typeof l?x.sum:"[object Date]"===Object.prototype.toString.call(l)?x.extent:x.count},getColumnAggregationFn:()=>{var n;const o=t.options.aggregationFns;if(!e)throw new Error;return l(e.aggregationFn)?e.aggregationFn:"auto"===e.aggregationFn?e.getColumnAutoAggregationFn():null!=(n=null==o?void 0:o[e.aggregationFn])?n:x[e.aggregationFn]}}),createInstance:e=>({setGrouping:t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),resetGrouping:t=>{var n,l;e.setGrouping(t?[]:null!=(n=null==(l=e.initialState)?void 0:l.grouping)?n:[])},getPreGroupedRowModel:()=>e.getSortedRowModel(),getGroupedRowModel:()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())}),createRow:(e,t)=>({getIsGrouped:()=>!!e.groupingColumnId,groupingValuesCache:{}}),createCell:(e,t,n,l)=>({getIsGrouped:()=>t.getIsGrouped()&&t.id===n.groupingColumnId,getIsPlaceholder:()=>!e.getIsGrouped()&&t.getIsGrouped(),getIsAggregated:()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&(null==(t=n.subRows)?void 0:t.length)>1},renderAggregatedCell:()=>{var o;const i=null!=(o=t.aggregatedCell)?o:t.cell;return i?l._render(i,{instance:l,column:t,row:n,cell:e,getValue:e.getValue}):null}})};function P(e,t,n){if(null==t||!t.length||!n)return e;const l=e.filter((e=>!t.includes(e.id)));if("remove"===n)return l;return[...t.map((t=>e.find((e=>e.id===t)))).filter(Boolean),...l]}const _={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:n("columnOrder",e)}),createInstance:e=>({setColumnOrder:t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),resetColumnOrder:t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},_getOrderColumnsFn:i((()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]),((e,t,n)=>l=>{let o=[];if(null!=e&&e.length){const t=[...e],n=[...l];for(;n.length&&t.length;){const e=t.shift(),l=n.findIndex((t=>t.id===e));l>-1&&o.push(n.splice(l,1)[0])}o=[...o,...n]}else o=l;return P(o,t,n)}),{key:!1})})},E={getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:n("pagination",e)}),createInstance:e=>{let n=!1,l=!1;return{_autoResetPageIndex:()=>{var t,o;if(n){if(null!=(t=null!=(o=e.options.autoResetAll)?o:e.options.autoResetPageIndex)?t:!e.options.manualPagination){if(l)return;l=!0,e._queue((()=>{e.resetPageIndex(),l=!1}))}}else e._queue((()=>{n=!0}))},setPagination:n=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>t(n,e))),resetPagination:t=>{var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},setPageIndex:n=>{e.setPagination((e=>{let l=t(n,e.pageIndex);const o=void 0!==e.pageCount?e.pageCount-1:Number.MAX_SAFE_INTEGER;return l=Math.min(Math.max(0,l),o),{...e,pageIndex:l}}))},resetPageIndex:t=>{var n,l,o;e.setPageIndex(t?0:null!=(n=null==(l=e.initialState)||null==(o=l.pagination)?void 0:o.pageIndex)?n:0)},resetPageSize:t=>{var n,l,o;e.setPageSize(t?10:null!=(n=null==(l=e.initialState)||null==(o=l.pagination)?void 0:o.pageSize)?n:10)},setPageSize:n=>{e.setPagination((e=>{const l=Math.max(1,t(n,e.pageSize)),o=e.pageSize*e.pageIndex,i=Math.floor(o/l);return{...e,pageIndex:i,pageSize:l}}))},setPageCount:n=>e.setPagination((e=>{var l;let o=t(n,null!=(l=e.pageCount)?l:-1);return"number"==typeof o&&(o=Math.max(-1,o)),{...e,pageCount:o}})),getPageOptions:i((()=>[e.getState().pagination.pageSize,e.getState().pagination.pageCount]),((e,t)=>{let n=[];return t&&t>0&&(n=[...new Array(t)].fill(null).map(((e,t)=>t))),n}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getCanPreviousPage:()=>e.getState().pagination.pageIndex>0,getCanNextPage:()=>{const{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return-1===n||0!==n&&t<n-1},previousPage:()=>e.setPageIndex((e=>e-1)),nextPage:()=>e.setPageIndex((e=>e+1)),getPrePaginationRowModel:()=>e.getExpandedRowModel(),getPaginationRowModel:()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),getPageCount:()=>{const{pageCount:t}=e.getState().pagination;return void 0!==t?t:Math.ceil(e.getPrePaginationRowModel().rows.length/e.getState().pagination.pageSize)}}}},G={getInitialState:e=>({columnPinning:{left:[],right:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:n("columnPinning",e)}),createColumn:(e,t)=>({pin:n=>{const l=e.getLeafColumns().map((e=>e.id)).filter(Boolean);t.setColumnPinning((e=>{var t,o,i,r,u,a;return"right"===n?{left:(null!=(i=null==e?void 0:e.left)?i:[]).filter((e=>!(null!=l&&l.includes(e)))),right:[...(null!=(r=null==e?void 0:e.right)?r:[]).filter((e=>!(null!=l&&l.includes(e)))),...l]}:"left"===n?{left:[...(null!=(u=null==e?void 0:e.left)?u:[]).filter((e=>!(null!=l&&l.includes(e)))),...l],right:(null!=(a=null==e?void 0:e.right)?a:[]).filter((e=>!(null!=l&&l.includes(e))))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter((e=>!(null!=l&&l.includes(e)))),right:(null!=(o=null==e?void 0:e.right)?o:[]).filter((e=>!(null!=l&&l.includes(e))))}}))},getCanPin:()=>e.getLeafColumns().some((e=>{var n,l;return(null==(n=e.enablePinning)||n)&&(null==(l=t.options.enablePinning)||l)})),getIsPinned:()=>{const n=e.getLeafColumns().map((e=>e.id)),{left:l,right:o}=t.getState().columnPinning,i=n.some((e=>null==l?void 0:l.includes(e))),r=n.some((e=>null==o?void 0:o.includes(e)));return i?"left":!!r&&"right"},getPinnedIndex:()=>{var n,l,o;const i=e.getIsPinned();return i?null!=(n=null==(l=t.getState().columnPinning)||null==(o=l[i])?void 0:o.indexOf(e.id))?n:-1:0}}),createRow:(e,t)=>({getCenterVisibleCells:i((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,t,n)=>{const l=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!l.includes(e.columnId)))}),{key:"row.getCenterVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getLeftVisibleCells:i((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,,]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.columnId===t)))).filter(Boolean).map((e=>({...e,position:"left"})))),{key:"row.getLeftVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getRightVisibleCells:i((()=>[e._getAllVisibleCells(),t.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.columnId===t)))).filter(Boolean).map((e=>({...e,position:"left"})))),{key:"row.getRightVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}),createInstance:e=>({setColumnPinning:t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),resetColumnPinning:t=>{var n,l;return e.setColumnPinning(t?{left:[],right:[]}:null!=(n=null==(l=e.initialState)?void 0:l.columnPinning)?n:{left:[],right:[]})},getIsSomeColumnsPinned:()=>{const{left:t,right:n}=e.getState().columnPinning;return Boolean((null==t?void 0:t.length)||(null==n?void 0:n.length))},getLeftLeafColumns:i((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getRightLeafColumns:i((()=>[e.getAllLeafColumns(),e.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getCenterLeafColumns:i((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((e,t,n)=>{const l=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!l.includes(e.id)))}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})})},H={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:n("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createInstance:e=>({setRowSelection:t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),resetRowSelection:t=>{var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},toggleAllRowsSelected:t=>{e.setRowSelection((n=>{t=void 0!==t?t:!e.getIsAllRowsSelected();const l={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach((e=>{l[e.id]=!0})):o.forEach((e=>{delete l[e.id]})),l}))},toggleAllPageRowsSelected:t=>e.setRowSelection((n=>{void 0!==t||e.getIsAllPageRowsSelected();const l={...n};return e.getRowModel().rows.forEach((n=>{z(l,n.id,t,e)})),l})),getPreSelectedRowModel:()=>e.getCoreRowModel(),getSelectedRowModel:i((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,n)=>Object.keys(t).length?L(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredSelectedRowModel:i((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,n)=>Object.keys(t).length?L(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"getFilteredSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getGroupedSelectedRowModel:i((()=>[e.getState().rowSelection,e.getGroupedRowModel()]),((t,n)=>Object.keys(t).length?L(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"getGroupedSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getIsAllRowsSelected:()=>{const t=e.getPreFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let l=Boolean(t.length&&Object.keys(n).length);return l&&t.some((e=>!n[e.id]))&&(l=!1),l},getIsAllPageRowsSelected:()=>{const t=e.getPaginationRowModel().flatRows,{rowSelection:n}=e.getState();let l=!!t.length;return l&&t.some((e=>!n[e.id]))&&(l=!1),l},getIsSomeRowsSelected:()=>{var t;return!e.getIsAllRowsSelected()&&!!Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length},getIsSomePageRowsSelected:()=>{const t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&!(null==t||!t.length)},getToggleAllRowsSelectedHandler:()=>t=>{e.toggleAllRowsSelected(t.target.checked)},getToggleAllPageRowsSelectedHandler:()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}}),createRow:(e,t)=>({toggleSelected:n=>{const l=e.getIsSelected();t.setRowSelection((o=>{if(l===(n=void 0!==n?n:!l))return o;const i={...o};return z(i,e.id,n,t),i}))},getIsSelected:()=>{const{rowSelection:n}=t.getState();return!0===k(e,n)},getIsSomeSelected:()=>{const{rowSelection:n}=t.getState();return"some"===k(e,n)},getCanSelect:()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},getCanSelectSubRows:()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},getCanMultiSelect:()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},getToggleSelectedHandler:()=>{const t=e.getCanSelect();return n=>{var l;t&&e.toggleSelected(null==(l=n.target)?void 0:l.checked)}}})},z=(e,t,n,l)=>{var o;const i=l.getRow(t);i.getIsGrouped(),n?e[t]=!0:delete e[t],null!=(o=i.subRows)&&o.length&&i.getCanSelectSubRows()&&i.subRows.forEach((t=>z(e,t.id,n,l)))};function L(e,t){const n=e.getState().rowSelection,l=[],o={},i=function(e,t){return void 0===t&&(t=0),e.map((e=>{var r;const u=!0===k(e,n);if(u&&(l.push(e),o[e.id]=e),null!=(r=e.subRows)&&r.length&&(e={...e,subRows:i(e.subRows,t+1)}),u)return e})).filter(Boolean)};return{rows:i(t.rows),flatRows:l,rowsById:o}}function k(e,t,n){if(t[e.id])return!0;if(e.subRows&&e.subRows.length){let n=!0,l=!1;return e.subRows.forEach((e=>{l&&!n||(k(e,t)?l=!0:n=!1)})),!!n||!!l&&"some"}return!1}const O=/([0-9]+)/gm,T={alphanumeric:function(e,t,n){return D(j(e.getValue(n)).toLowerCase(),j(t.getValue(n)).toLowerCase())},alphanumericCaseSensitive:function(e,t,n){return D(j(e.getValue(n)),j(t.getValue(n)))},text:function(e,t,n){return B(j(e.getValue(n)).toLowerCase(),j(t.getValue(n)).toLowerCase())},textCaseSensitive:function(e,t,n){return B(j(e.getValue(n)),j(t.getValue(n)))},datetime:function(e,t,n){return B(e.getValue(n).getTime(),t.getValue(n).getTime())},basic:function(e,t,n){return B(e.getValue(n),t.getValue(n))}};function D(e,t){const n=e.split(O).filter(Boolean),l=t.split(O).filter(Boolean);for(;n.length&&l.length;){const e=n.shift(),t=l.shift(),o=parseInt(e,10),i=parseInt(t,10),r=[o,i].sort();if(isNaN(r[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(r[1]))return isNaN(o)?-1:1;if(o>i)return 1;if(i>o)return-1}}return n.length-l.length}function B(e,t){return e===t?0:e>t?1:-1}function j(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}const q={getInitialState:e=>({sorting:[],...e}),getDefaultColumn:()=>({sortingFn:"auto"}),getDefaultOptions:e=>({onSortingChange:n("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>({getAutoSortingFn:()=>{const n=t.getFilteredRowModel().flatRows.slice(100);let l=!1;for(const t of n){const n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return T.datetime;if("string"==typeof n&&(l=!0,n.split(O).length>1))return T.alphanumeric}return l?T.text:T.basic},getAutoSortDir:()=>{const n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},getSortingFn:()=>{var n;const o=t.options.sortingFns;if(!e)throw new Error;return l(e.sortingFn)?e.sortingFn:"auto"===e.sortingFn?e.getAutoSortingFn():null!=(n=null==o?void 0:o[e.sortingFn])?n:T[e.sortingFn]},toggleSorting:(n,l)=>{t.setSorting((o=>{var i,r,u,a;const s=null==o?void 0:o.find((t=>t.id===e.id)),g=null==o?void 0:o.findIndex((t=>t.id===e.id)),d=null!=n;let c,p=[];c=e.getCanMultiSort()&&l?s?"toggle":"add":null!=o&&o.length&&g!==o.length-1?"replace":s?"toggle":"replace";const f=null!=(i=null!=(r=e.sortDescFirst)?r:t.options.sortDescFirst)?i:"desc"===e.getAutoSortDir();if("toggle"!==c||null!=(u=t.options.enableSortingRemoval)&&!u||d||l&&null!=(a=t.options.enableMultiRemove)&&!a||(null!=s&&s.desc?f:!f)||(c="remove"),"replace"===c)p=[{id:e.id,desc:d?n:!!f}];else if("add"===c&&null!=o&&o.length){var m;p=[...o,{id:e.id,desc:d?n:!!f}],p.splice(0,p.length-(null!=(m=t.options.maxMultiSortColCount)?m:Number.MAX_SAFE_INTEGER))}else"toggle"===c&&null!=o&&o.length?p=o.map((t=>t.id===e.id?{...t,desc:d?n:!(null!=s&&s.desc)}:t)):"remove"===c&&null!=o&&o.length&&(p=o.filter((t=>t.id!==e.id)));return p}))},getCanSort:()=>{var n,l;return(null==(n=e.enableSorting)||n)&&(null==(l=t.options.enableSorting)||l)&&!!e.accessorFn},getCanMultiSort:()=>{var n,l;return null!=(n=null!=(l=e.enableMultiSort)?l:t.options.enableMultiSort)?n:!!e.accessorFn},getIsSorted:()=>{var n;const l=null==(n=t.getState().sorting)?void 0:n.find((t=>t.id===e.id));return!!l&&(l.desc?"desc":"asc")},getSortIndex:()=>{var n,l;return null!=(n=null==(l=t.getState().sorting)?void 0:l.findIndex((t=>t.id===e.id)))?n:-1},clearSorting:()=>{t.setSorting((t=>null!=t&&t.length?t.filter((t=>t.id!==e.id)):[]))},getToggleSortingHandler:()=>{const n=e.getCanSort();return l=>{n&&(null==l.persist||l.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(l))))}}}),createInstance:e=>({setSorting:t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),resetSorting:t=>{var n,l;e.setSorting(t?[]:null!=(n=null==(l=e.initialState)?void 0:l.sorting)?n:[])},getPreSortedRowModel:()=>e.getFilteredRowModel(),getSortedRowModel:()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())})},N={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:n("columnVisibility",e)}),getDefaultColumn:()=>({defaultIsVisible:!0}),createColumn:(e,t)=>({toggleVisibility:n=>{e.getCanHide()&&t.setColumnVisibility((t=>({...t,[e.id]:null!=n?n:!e.getIsVisible()})))},getIsVisible:()=>{var n,l;return null==(n=null==(l=t.getState().columnVisibility)?void 0:l[e.id])||n},getCanHide:()=>{var n,l;return(null==(n=e.enableHiding)||n)&&(null==(l=t.options.enableHiding)||l)},getToggleVisibilityHandler:()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}}),createRow:(e,t)=>({_getAllVisibleCells:i((()=>[e.getAllCells().filter((e=>e.column.getIsVisible())).map((e=>e.id)).join("_")]),(t=>e.getAllCells().filter((e=>e.column.getIsVisible()))),{key:"row._getAllVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getVisibleCells:i((()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]),((e,t,n)=>[...e,...t,...n]),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}),createInstance:e=>{const t=(t,n)=>i((()=>[n(),n().filter((e=>e.getIsVisible())).map((e=>e.id)).join("_")]),(e=>e.filter((e=>null==e.getIsVisible?void 0:e.getIsVisible()))),{key:t,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}});return{getVisibleFlatColumns:t("getVisibleFlatColumns",(()=>e.getAllFlatColumns())),getVisibleLeafColumns:t("getVisibleLeafColumns",(()=>e.getAllLeafColumns())),getLeftVisibleLeafColumns:t("getLeftVisibleLeafColumns",(()=>e.getLeftLeafColumns())),getRightVisibleLeafColumns:t("getRightVisibleLeafColumns",(()=>e.getRightLeafColumns())),getCenterVisibleLeafColumns:t("getCenterVisibleLeafColumns",(()=>e.getCenterLeafColumns())),setColumnVisibility:t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),resetColumnVisibility:t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},toggleAllColumnsVisible:t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce(((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())})),{}))},getIsAllColumnsVisible:()=>!e.getAllLeafColumns().some((e=>!(null!=e.getIsVisible&&e.getIsVisible()))),getIsSomeColumnsVisible:()=>e.getAllLeafColumns().some((e=>null==e.getIsVisible?void 0:e.getIsVisible())),getToggleAllColumnsVisibilityHandler:()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}}},U={createInstance:e=>({createHeader:(t,n)=>{var l;let o={id:null!=(l=n.id)?l:t.id,column:t,index:n.index,isPlaceholder:n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(o),e},renderHeader:()=>t.header?e._render(t.header,{instance:e,header:o,column:t}):null,renderFooter:()=>t.footer?e._render(t.footer,{instance:e,header:o,column:t}):null};return e._features.forEach((t=>{Object.assign(o,null==t.createHeader?void 0:t.createHeader(o,e))})),o},getHeaderGroups:i((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,l,o)=>{const i=n.filter((e=>null==l?void 0:l.includes(e.id))),r=n.filter((e=>null==o?void 0:o.includes(e.id)));return X(t,[...i,...n.filter((e=>!(null!=l&&l.includes(e.id)||null!=o&&o.includes(e.id)))),...r],e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterHeaderGroups:i((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,l,o)=>X(t,n=n.filter((e=>!(null!=l&&l.includes(e.id)||null!=o&&o.includes(e.id)))),e,"center")),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftHeaderGroups:i((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,n,l)=>X(t,n=n.filter((e=>null==l?void 0:l.includes(e.id))),e,"left")),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightHeaderGroups:i((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,n,l)=>X(t,n=n.filter((e=>null==l?void 0:l.includes(e.id))),e,"right")),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getFooterGroups:i((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftFooterGroups:i((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterFooterGroups:i((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightFooterGroups:i((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getFlatHeaders:i((()=>[e.getHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftFlatHeaders:i((()=>[e.getLeftHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterFlatHeaders:i((()=>[e.getCenterHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightFlatHeaders:i((()=>[e.getRightHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterLeafHeaders:i((()=>[e.getCenterFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftLeafHeaders:i((()=>[e.getLeftFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightLeafHeaders:i((()=>[e.getRightFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeafHeaders:i((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,n)=>{var l,o,i,r,u,a;return[...null!=(l=null==(o=e[0])?void 0:o.headers)?l:[],...null!=(i=null==(r=t[0])?void 0:r.headers)?i:[],...null!=(u=null==(a=n[0])?void 0:a.headers)?u:[]].map((e=>e.getLeafHeaders())).flat()}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getHeader:t=>{const n=[...e.getFlatHeaders(),...e.getCenterFlatHeaders(),...e.getLeftFlatHeaders(),...e.getRightFlatHeaders()].find((e=>e.id===t));if(!n)throw new Error;return n}})};function X(e,t,n,l){var o,i;let r=0;const u=function(e,t){void 0===t&&(t=1),r=Math.max(r,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var n;null!=(n=e.columns)&&n.length&&u(e.columns,t+1)}),0)};u(e);let a=[];const s=(e,t)=>{const o={depth:t,id:[l,""+t].filter(Boolean).join("_"),headers:[]},i=[];e.forEach((e=>{const r=[...i].reverse()[0];let u,a=!1;if(e.column.depth===o.depth&&e.column.parent?u=e.column.parent:(u=e.column,a=!0),(null==r?void 0:r.column)===u)r.subHeaders.push(e);else{const o=n.createHeader(u,{id:[l,t,u.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:a,placeholderId:a?""+i.filter((e=>e.column===u)).length:void 0,depth:t,index:i.length});o.subHeaders.push(e),i.push(o)}o.headers.push(e),e.headerGroup=o})),a.push(o),t>0&&s(i,t-1)},g=t.map(((e,t)=>n.createHeader(e,{depth:r,index:t})));s(g,r-1),a.reverse();const d=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,n=0,l=[0];e.subHeaders&&e.subHeaders.length?(l=[],d(e.subHeaders).forEach((e=>{let{colSpan:n,rowSpan:o}=e;t+=n,l.push(o)}))):t=1;return n+=Math.min(...l),e.colSpan=t>0?t:void 0,e.rowSpan=n>0?n:void 0,{colSpan:t,rowSpan:n}}));return d(null!=(o=null==(i=a[0])?void 0:i.headers)?o:[]),a}function K(e,t,n){const l={generics:void 0,options:null!=n?n:{render:(()=>{throw new Error("")})()},setGenerics:()=>l,setRowType:()=>l,setTableMetaType:()=>l,setColumnMetaType:()=>l,setOptions:l=>K(e,t,{...n,...l}),createDisplayColumn:e=>({...e,columnDefType:"display"}),createGroup:e=>({...e,columnDefType:"group"}),createDataColumn:(e,t)=>{var n;if(t={...t,columnDefType:"data",id:t.id},"string"==typeof e)return{...t,id:null!=(n=t.id)?n:e,accessorKey:e};if("function"==typeof e)return{...t,accessorFn:e};throw new Error("Invalid accessor")}};return l}function J(e,t,n){return n.options.filterFromLeafRows?function(e,t,n){const l=[],o={};let i,r;const u=function(e,l){void 0===l&&(l=0);const a=[];for(let g=0;g<e.length;g++){var s;if(i=e[g],null!=(s=i.subRows)&&s.length){if(r=n.createRow(i.id,i.original,i.index,i.depth),r.columnFilterMap=i.columnFilterMap,r.subRows=u(i.subRows,l+1),!r.subRows.length)continue;i=r}t(i)&&(a.push(i),o[i.id]=i,o[g]=i)}return a};return{rows:u(e),flatRows:l,rowsById:o}}(e,t,n):function(e,t,n){const l=[],o={};let i,r,u;const a=function(e,s){void 0===s&&(s=0),i=[];for(let d=0;d<e.length;d++){r=e[d];var g;if(t(r))null!=(g=r.subRows)&&g.length&&(u=n.createRow(r.id,r.original,r.index,r.depth),u.subRows=a(r.subRows,s+1),r=u),i.push(r),l.push(r),o[r.id]=r}return i};return{rows:a(e),flatRows:l,rowsById:o}}(e,t,n)}function Q(e,t){const n=[],l=e=>{var o;n.push(e),t.options.expandSubRows&&null!=(o=e.subRows)&&o.length&&e.getIsExpanded()&&e.subRows.forEach(l)};return e.rows.forEach(l),{rows:n,flatRows:e.flatRows,rowsById:e.rowsById}}e.ColumnSizing=g,e.Expanding=f,e.Filters=y,e.Grouping=A,e.Headers=U,e.Ordering=_,e.Pagination=E,e.Pinning=G,e.RowSelection=H,e.Sorting=q,e.Visibility=N,e.buildHeaderGroups=X,e.createTableFactory=function(e){return()=>K(void 0,void 0,e)},e.createTableInstance=function(e){var n;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");let l={_features:[r,u,a,U,N,_,G,y,q,A,f,E,H,g]};const o=l._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(l))),{});let i={...null!=(n=e.initialState)?n:{}};l._features.forEach((e=>{var t;i=null!=(t=null==e.getInitialState?void 0:e.getInitialState(i))?t:i}));const s=[];let d=!1;const c={...l,options:{...o,...e},initialState:i,_queue:e=>{s.push(e),d||(d=!0,Promise.resolve().then((()=>{for(;s.length;)s.shift()();d=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{l.setState(l.initialState)},setOptions:e=>{const n=t(e,l.options);l.options=(e=>l.options.mergeOptions?l.options.mergeOptions(o,e):{...o,...e})(n)},_render:(e,t)=>"function"==typeof l.options.render?l.options.render(e,t):"function"==typeof e?e(t):e,getState:()=>l.options.state,setState:e=>{null==l.options.onStateChange||l.options.onStateChange(e)}};return l=Object.assign(l,c),l._features.forEach((e=>Object.assign(l,null==e.createInstance?void 0:e.createInstance(l)))),l},e.defaultColumnSizing=s,e.expandRows=Q,e.flattenBy=o,e.functionalUpdate=t,e.getCoreRowModel=function(){return e=>i((()=>[e.options.data]),(t=>{const n=[],l=[],o={},i=e.getAllLeafColumns(),r=function(t,n,u,a,s){void 0===u&&(u=0);const g=e.getRowId(t,n,s),d={};for(let e=0;e<i.length;e++){const l=i[e];l&&l.accessorFn&&(d[l.id]=l.accessorFn(t,n))}const c=e.createRow(g,t,n,u);if(a.push(c),l.push(c),o[g]=c,e.options.getSubRows){const l=e.options.getSubRows(t,n);if(null!=l&&l.length){c.originalSubRows=l;const e=[];for(let t=0;t<c.originalSubRows.length;t++)r(c.originalSubRows[t],t,u+1,e,c);c.subRows=e}}};for(let e=0;e<t.length;e++)r(t[e],e,0,n);return{rows:n,flatRows:l,rowsById:o}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})},e.getExpandedRowModel=function(){return e=>i((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((t,n,l)=>n.rows.length&&l&&(!0===t||Object.keys(null!=t?t:{}).length)?Q(n,e):n),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}})},e.getFacetedMinMaxValues=function(){return(e,t)=>i((()=>[e.getColumn(t).getFacetedRowModel()]),(e=>{var n;const l=null==(n=e.flatRows[0])?void 0:n.getValue(t);if(void 0===l)return;let o=[l,l];for(let n=0;n<e.flatRows.length;n++){var i;const l=null==(i=e.flatRows[n])?void 0:i.getValue(t);l<o[0]?o[0]=l:l>o[1]&&(o[1]=l)}return o}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{}})},e.getFacetedRowModel=function(){return(e,t)=>i((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()]),((n,l,o)=>{if(!n.rows.length||(null==l||!l.length)&&!o)return n;const i=[...l.map((e=>e.id)).filter((e=>e!==t)),o?"__global__":void 0].filter(Boolean);return J(n.rows,(e=>{for(let t=0;t<i.length;t++)if(!1===e.columnFilterMap[i[t]])return!1;return!0}),e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{}})},e.getFacetedUniqueValues=function(){return(e,t)=>i((()=>[e.getColumn(t).getFacetedRowModel()]),(e=>{let n=new Map;for(let i=0;i<e.flatRows.length;i++){var l;const r=null==(l=e.flatRows[i])?void 0:l.getValue(t);var o;if(n.has(r))n.set(r,(null!=(o=n.get(r))?o:0)+1);else n.set(r,1)}return n}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{}})},e.getFilteredRowModel=function(){return e=>i((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,l)=>{if(!t.rows.length||(null==n||!n.length)&&!l)return t;const o=[],i=[];(null!=n?n:[]).forEach((t=>{var n;const l=e.getColumn(t.id).getFilterFn();l&&o.push({id:t.id,filterFn:l,resolvedValue:null!=(n=null==l.resolveFilterValue?void 0:l.resolveFilterValue(t.value))?n:t.value})}));const r=n.map((e=>e.id)),u=e.getGlobalFilterFn(),a=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let s,g;l&&u&&a.length&&(r.push("__global__"),a.forEach((e=>{var t;i.push({id:e.id,filterFn:u,resolvedValue:null!=(t=null==u.resolveFilterValue?void 0:u.resolveFilterValue(l))?t:l})})));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilterMap={},o.length)for(let e=0;e<o.length;e++)s=o[e],n.columnFilterMap[s.id]=s.filterFn(n,s.id,s.resolvedValue);if(i.length){for(let e=0;e<i.length;e++)if(g=i[e],g.filterFn(n,g.id,g.resolvedValue)){n.columnFilterMap.__global__=!0;break}!0!==n.columnFilterMap.__global__&&(n.columnFilterMap.__global__=!1)}}return J(t.rows,(e=>{for(let t=0;t<r.length;t++)if(!1===e.columnFilterMap[r[t]])return!1;return!0}),e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})},e.getGroupedRowModel=function(){return e=>i((()=>[e.getState().grouping,e.getPreGroupedRowModel()]),((t,n)=>{if(!n.rows.length||!t.length)return n;const l=t.filter((t=>e.getColumn(t))),i=[],r={},u=function(t,n,a){if(void 0===n&&(n=0),n===l.length)return t;const s=l[n],g=function(e,t){const n=new Map;return e.reduce(((e,n)=>{const l=""+n.getValue(t),o=e.get(l);return o?e.set(l,[...o,n]):e.set(l,[n]),e}),n)}(t,s),d=Array.from(g.entries()).map(((t,g)=>{let[d,c]=t,p=s+":"+d;p=a?a+">"+p:p;const f=u(c,n+1,p),m=n?o(c,(e=>e.subRows)):c,b=e.createRow(p,void 0,g,n);return Object.assign(b,{groupingColumnId:s,groupingValue:d,subRows:f,leafRows:m,getValue:t=>{if(l.includes(t)){if(b.valuesCache.hasOwnProperty(t))return b.valuesCache[t];var o;if(c[0])b.valuesCache[t]=null!=(o=c[0].getValue(t))?o:void 0;return b.valuesCache[t]}if(b.groupingValuesCache.hasOwnProperty(t))return b.groupingValuesCache[t];const i=e.getColumn(t),r=i.getColumnAggregationFn();if(r)return b.groupingValuesCache[t]=r((()=>m.map((e=>{let l=e.getValue(t);return!n&&i.aggregateValue&&(l=i.aggregateValue(l)),l}))),(()=>c.map((e=>e.getValue(t))))),b.groupingValuesCache[t];if(i.aggregationFn)throw console.info({column:i}),new Error("")}}),f.forEach((e=>{i.push(e),r[e.id]=e})),b}));return d},a=u(n.rows,0,"");return a.forEach((e=>{i.push(e),r[e.id]=e})),{rows:a,flatRows:i,rowsById:r}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._queue((()=>{e._autoResetExpanded(),e._autoResetPageIndex()}))}})},e.getPaginationRowModel=function(e){return e=>i((()=>[e.getState().pagination,e.getPrePaginationRowModel()]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:l,pageIndex:o}=t;let{rows:i,flatRows:r,rowsById:u}=n;const a=l*o,s=a+l;return i=i.slice(a,s),e.options.paginateExpandedRows?{rows:i,flatRows:r,rowsById:u}:Q({rows:i,flatRows:r,rowsById:u},e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}})},e.getSortedRowModel=function(){return e=>i((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const l=e.getState().sorting,o=[],i=l.filter((t=>e.getColumn(t.id).getCanSort())),r={};i.forEach((t=>{const n=e.getColumn(t.id);r[t.id]={sortUndefined:n.sortUndefined,invertSorting:n.invertSorting,sortingFn:n.getSortingFn()}}));const u=e=>{const t=e.slice();return t.sort(((e,t)=>{for(let l=0;l<i.length;l+=1){var n;const o=i[l],u=r[o.id],a=null!=(n=null==o?void 0:o.desc)&&n;if(u.sortUndefined){const n=void 0===e.getValue(o.id),l=void 0===t.getValue(o.id);if(n||l)return n&&l?0:n?u.sortUndefined:-u.sortUndefined}let s=u.sortingFn(e,t,o.id);if(0!==s)return a&&(s*=-1),u.invertSorting&&(s*=-1),s}return e.index-t.index})),t.forEach((e=>{o.push(e),!e.subRows||e.subRows.length<=1||(e.subRows=u(e.subRows))})),t};return{rows:u(n.rows),flatRows:o,rowsById:n.rowsById}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})},e.isFunction=l,e.isRowSelected=k,e.makeStateUpdater=n,e.memo=i,e.noop=function(){},e.orderColumns=P,e.passiveEventSupported=c,e.selectRowsFn=L,e.shouldAutoRemoveFilter=V,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=index.production.js.map
{
"name": "@tanstack/table-core",
"author": "Tanner Linsley",
"version": "8.0.0-alpha.72",
"version": "8.0.0-alpha.73",
"description": "Hooks for building lightweight, fast and extendable datagrids for React",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -47,4 +47,4 @@ import { functionalUpdate, RequiredKeys } from './utils'

mergeOptions?: <T>(defaultOptions: T, options: Partial<T>) => T
keepPreviousData?: boolean
meta?: TGenerics['TableMeta']
// keepPreviousData?: boolean
}

@@ -58,9 +58,10 @@

setOptions: (newOptions: Updater<TableOptions<TGenerics>>) => void
queue: (cb: () => void) => void
getState: () => TableState
setState: (updater: Updater<TableState>) => void
render: <TProps>(
_queue: (cb: () => void) => void
_render: <TProps>(
template: Renderable<TGenerics, TProps>,
props: TProps
) => string | null | TGenerics['Rendered']
_features: readonly TableFeature[]
// getOverallProgress: () => number

@@ -72,3 +73,2 @@ // getProgressStage: () =>

// | 'facetedRowModel'
_features: readonly TableFeature[]
// createBatch: (priority: keyof CoreBatches) => Batch

@@ -237,3 +237,3 @@ // init: () => void

initialState,
queue: cb => {
_queue: cb => {
queued.push(cb)

@@ -304,3 +304,3 @@

},
render: (template, props) => {
_render: (template, props) => {
if (typeof instance.options.render === 'function') {

@@ -307,0 +307,0 @@ return instance.options.render(template, props)

@@ -78,3 +78,3 @@ import {

column.cell
? instance.render(column.cell, {
? instance._render(column.cell, {
instance,

@@ -81,0 +81,0 @@ column,

@@ -85,3 +85,3 @@ import { RowModel } from '..'

if (!registered) {
instance.queue(() => {
instance._queue(() => {
registered = true

@@ -102,3 +102,3 @@ })

queued = true
instance.queue(() => {
instance._queue(() => {
instance.resetExpanded()

@@ -105,0 +105,0 @@ queued = false

@@ -270,3 +270,3 @@ import { RowModel } from '..'

return template
? instance.render(template, {
? instance._render(template, {
instance,

@@ -273,0 +273,0 @@ column,

@@ -91,3 +91,3 @@ import {

column.header
? instance.render(column.header, {
? instance._render(column.header, {
instance,

@@ -100,3 +100,3 @@ header: header as Header<TGenerics>,

column.footer
? instance.render(column.footer, {
? instance._render(column.footer, {
instance,

@@ -103,0 +103,0 @@ header: header as Header<TGenerics>,

@@ -36,3 +36,2 @@ import {

onPaginationChange: OnChangeFn<PaginationState>
autoResetPageIndex: boolean
}

@@ -86,3 +85,2 @@

onPaginationChange: makeStateUpdater('pagination', instance),
autoResetPageIndex: true,
}

@@ -100,3 +98,3 @@ },

if (!registered) {
instance.queue(() => {
instance._queue(() => {
registered = true

@@ -107,13 +105,10 @@ })

if (instance.options.autoResetAll === false) {
return
}
if (
instance.options.autoResetAll === true ||
instance.options.autoResetPageIndex
instance.options.autoResetAll ??
instance.options.autoResetPageIndex ??
!instance.options.manualPagination
) {
if (queued) return
queued = true
instance.queue(() => {
instance._queue(() => {
instance.resetPageIndex()

@@ -145,3 +140,3 @@ queued = false

const maxPageIndex =
old.pageCount && old.pageCount > 0
typeof old.pageCount !== 'undefined'
? old.pageCount - 1

@@ -148,0 +143,0 @@ : Number.MAX_SAFE_INTEGER

@@ -158,3 +158,3 @@ import { CoreRow } from '../features/Rows'

onChange: () => {
instance.queue(() => {
instance._queue(() => {
instance._autoResetExpanded()

@@ -161,0 +161,0 @@ instance._autoResetPageIndex()

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc