@soft-stech/bootsman-ui-shadcn 1.0.5-beta.2 → 1.0.5-beta.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (236) hide show
  1. package/dist/bootsman-ui-shadcn100.js +1 -1
  2. package/dist/bootsman-ui-shadcn106.js +1 -1
  3. package/dist/bootsman-ui-shadcn122.js +2 -2
  4. package/dist/bootsman-ui-shadcn127.js +1 -1
  5. package/dist/bootsman-ui-shadcn139.js +1 -1
  6. package/dist/bootsman-ui-shadcn140.js +3 -3
  7. package/dist/bootsman-ui-shadcn141.js +1 -1
  8. package/dist/bootsman-ui-shadcn142.js +1 -1
  9. package/dist/bootsman-ui-shadcn143.js +1 -1
  10. package/dist/bootsman-ui-shadcn144.js +1 -1
  11. package/dist/bootsman-ui-shadcn145.js +1 -1
  12. package/dist/bootsman-ui-shadcn148.js +1 -1
  13. package/dist/bootsman-ui-shadcn150.js +1 -1
  14. package/dist/bootsman-ui-shadcn153.js +1 -1
  15. package/dist/bootsman-ui-shadcn158.js +1 -1
  16. package/dist/bootsman-ui-shadcn164.js +2 -2
  17. package/dist/bootsman-ui-shadcn165.js +1 -1
  18. package/dist/bootsman-ui-shadcn166.js +1 -1
  19. package/dist/bootsman-ui-shadcn167.js +1 -1
  20. package/dist/bootsman-ui-shadcn168.js +1 -1
  21. package/dist/bootsman-ui-shadcn169.js +1 -1
  22. package/dist/bootsman-ui-shadcn170.js +1 -1
  23. package/dist/bootsman-ui-shadcn171.js +1 -1
  24. package/dist/bootsman-ui-shadcn172.js +1 -1
  25. package/dist/bootsman-ui-shadcn173.js +1 -1
  26. package/dist/bootsman-ui-shadcn174.js +1 -1
  27. package/dist/bootsman-ui-shadcn175.js +1 -1
  28. package/dist/bootsman-ui-shadcn176.js +1 -1
  29. package/dist/bootsman-ui-shadcn177.js +1 -1
  30. package/dist/bootsman-ui-shadcn178.js +2 -20
  31. package/dist/bootsman-ui-shadcn179.js +1 -1
  32. package/dist/bootsman-ui-shadcn180.js +1 -1
  33. package/dist/bootsman-ui-shadcn181.js +1 -1
  34. package/dist/bootsman-ui-shadcn182.js +124 -2
  35. package/dist/bootsman-ui-shadcn183.js +519 -2
  36. package/dist/bootsman-ui-shadcn184.js +361 -2
  37. package/dist/bootsman-ui-shadcn185.js +2 -124
  38. package/dist/bootsman-ui-shadcn186.js +2 -519
  39. package/dist/bootsman-ui-shadcn187.js +2 -361
  40. package/dist/bootsman-ui-shadcn188.js +1 -1
  41. package/dist/bootsman-ui-shadcn189.js +1 -1
  42. package/dist/bootsman-ui-shadcn19.js +1 -1
  43. package/dist/bootsman-ui-shadcn190.js +1 -1
  44. package/dist/bootsman-ui-shadcn191.js +1 -1
  45. package/dist/bootsman-ui-shadcn192.js +1 -1
  46. package/dist/bootsman-ui-shadcn193.js +1 -1
  47. package/dist/bootsman-ui-shadcn194.js +1 -1
  48. package/dist/bootsman-ui-shadcn195.js +1 -1
  49. package/dist/bootsman-ui-shadcn196.js +1 -1
  50. package/dist/bootsman-ui-shadcn197.js +1 -1
  51. package/dist/bootsman-ui-shadcn198.js +1 -1
  52. package/dist/bootsman-ui-shadcn199.js +1 -1
  53. package/dist/bootsman-ui-shadcn200.js +1 -1
  54. package/dist/bootsman-ui-shadcn201.js +20 -2
  55. package/dist/bootsman-ui-shadcn202.js +1 -1
  56. package/dist/bootsman-ui-shadcn203.js +1 -1
  57. package/dist/bootsman-ui-shadcn204.js +1 -1
  58. package/dist/bootsman-ui-shadcn205.js +3 -2
  59. package/dist/bootsman-ui-shadcn206.js +1 -1
  60. package/dist/bootsman-ui-shadcn207.js +1 -1
  61. package/dist/bootsman-ui-shadcn208.js +1 -1
  62. package/dist/bootsman-ui-shadcn209.js +1 -1
  63. package/dist/bootsman-ui-shadcn210.js +1 -1
  64. package/dist/bootsman-ui-shadcn211.js +1 -1
  65. package/dist/bootsman-ui-shadcn212.js +1 -1
  66. package/dist/bootsman-ui-shadcn213.js +1 -1
  67. package/dist/bootsman-ui-shadcn214.js +1 -1
  68. package/dist/bootsman-ui-shadcn215.js +1 -1
  69. package/dist/bootsman-ui-shadcn216.js +1 -1
  70. package/dist/bootsman-ui-shadcn217.js +1 -1
  71. package/dist/bootsman-ui-shadcn218.js +1 -1
  72. package/dist/bootsman-ui-shadcn219.js +1 -1
  73. package/dist/bootsman-ui-shadcn220.js +1 -1
  74. package/dist/bootsman-ui-shadcn221.js +1 -1
  75. package/dist/bootsman-ui-shadcn222.js +1 -1
  76. package/dist/bootsman-ui-shadcn223.js +1 -1
  77. package/dist/bootsman-ui-shadcn224.js +17 -2
  78. package/dist/bootsman-ui-shadcn225.js +4 -2
  79. package/dist/bootsman-ui-shadcn226.js +1 -1
  80. package/dist/bootsman-ui-shadcn227.js +1 -1
  81. package/dist/bootsman-ui-shadcn228.js +1 -1
  82. package/dist/bootsman-ui-shadcn229.js +1 -1
  83. package/dist/bootsman-ui-shadcn230.js +2 -17
  84. package/dist/bootsman-ui-shadcn231.js +2 -4
  85. package/dist/bootsman-ui-shadcn232.js +1 -1
  86. package/dist/bootsman-ui-shadcn233.js +1 -1
  87. package/dist/bootsman-ui-shadcn234.js +1 -1
  88. package/dist/bootsman-ui-shadcn235.js +1 -1
  89. package/dist/bootsman-ui-shadcn236.js +2 -3
  90. package/dist/bootsman-ui-shadcn237.js +1 -1
  91. package/dist/bootsman-ui-shadcn238.js +1 -1
  92. package/dist/bootsman-ui-shadcn239.js +1 -1
  93. package/dist/bootsman-ui-shadcn240.js +1 -1
  94. package/dist/bootsman-ui-shadcn241.js +1 -1
  95. package/dist/bootsman-ui-shadcn242.js +1 -1
  96. package/dist/bootsman-ui-shadcn243.js +1 -1
  97. package/dist/bootsman-ui-shadcn244.js +1 -1
  98. package/dist/bootsman-ui-shadcn245.js +1 -1
  99. package/dist/bootsman-ui-shadcn246.js +1 -1
  100. package/dist/bootsman-ui-shadcn247.js +1 -1
  101. package/dist/bootsman-ui-shadcn248.js +1 -1
  102. package/dist/bootsman-ui-shadcn249.js +1 -1
  103. package/dist/bootsman-ui-shadcn250.js +1 -1
  104. package/dist/bootsman-ui-shadcn251.js +1 -1
  105. package/dist/bootsman-ui-shadcn252.js +1 -1
  106. package/dist/bootsman-ui-shadcn253.js +1 -1
  107. package/dist/bootsman-ui-shadcn254.js +1 -1
  108. package/dist/bootsman-ui-shadcn255.js +1 -1
  109. package/dist/bootsman-ui-shadcn256.js +1 -1
  110. package/dist/bootsman-ui-shadcn257.js +1 -1
  111. package/dist/bootsman-ui-shadcn258.js +1 -1
  112. package/dist/bootsman-ui-shadcn259.js +1 -1
  113. package/dist/bootsman-ui-shadcn260.js +1 -1
  114. package/dist/bootsman-ui-shadcn263.js +1 -1
  115. package/dist/bootsman-ui-shadcn264.js +1 -1
  116. package/dist/bootsman-ui-shadcn265.js +1 -1
  117. package/dist/bootsman-ui-shadcn266.js +1 -1
  118. package/dist/bootsman-ui-shadcn267.js +1 -1
  119. package/dist/bootsman-ui-shadcn268.js +2 -4
  120. package/dist/bootsman-ui-shadcn269.js +2 -5
  121. package/dist/bootsman-ui-shadcn270.js +1 -1
  122. package/dist/bootsman-ui-shadcn271.js +1 -1
  123. package/dist/bootsman-ui-shadcn272.js +1 -1
  124. package/dist/bootsman-ui-shadcn273.js +1 -1
  125. package/dist/bootsman-ui-shadcn274.js +1 -1
  126. package/dist/bootsman-ui-shadcn275.js +1 -1
  127. package/dist/bootsman-ui-shadcn276.js +1 -1
  128. package/dist/bootsman-ui-shadcn277.js +1 -1
  129. package/dist/bootsman-ui-shadcn278.js +1 -1
  130. package/dist/bootsman-ui-shadcn279.js +1 -1
  131. package/dist/bootsman-ui-shadcn280.js +1 -1
  132. package/dist/bootsman-ui-shadcn281.js +1 -1
  133. package/dist/bootsman-ui-shadcn282.js +1 -1
  134. package/dist/bootsman-ui-shadcn283.js +1 -1
  135. package/dist/bootsman-ui-shadcn284.js +1 -1
  136. package/dist/bootsman-ui-shadcn285.js +1 -1
  137. package/dist/bootsman-ui-shadcn286.js +1 -1
  138. package/dist/bootsman-ui-shadcn287.js +4 -2
  139. package/dist/bootsman-ui-shadcn288.js +5 -2
  140. package/dist/bootsman-ui-shadcn289.js +1 -1
  141. package/dist/bootsman-ui-shadcn290.js +1 -1
  142. package/dist/bootsman-ui-shadcn291.js +1 -1
  143. package/dist/bootsman-ui-shadcn292.js +1 -1
  144. package/dist/bootsman-ui-shadcn293.js +1 -1
  145. package/dist/bootsman-ui-shadcn294.js +1 -1
  146. package/dist/bootsman-ui-shadcn295.js +1 -1
  147. package/dist/bootsman-ui-shadcn296.js +1 -1
  148. package/dist/bootsman-ui-shadcn297.js +1 -1
  149. package/dist/bootsman-ui-shadcn298.js +1 -1
  150. package/dist/bootsman-ui-shadcn299.js +1 -1
  151. package/dist/bootsman-ui-shadcn308.js +2 -11
  152. package/dist/bootsman-ui-shadcn309.js +106 -2
  153. package/dist/bootsman-ui-shadcn310.js +11 -2
  154. package/dist/bootsman-ui-shadcn311.js +2 -12
  155. package/dist/bootsman-ui-shadcn312.js +4 -4
  156. package/dist/bootsman-ui-shadcn313.js +5 -4
  157. package/dist/bootsman-ui-shadcn314.js +4 -6
  158. package/dist/bootsman-ui-shadcn315.js +4 -4
  159. package/dist/bootsman-ui-shadcn316.js +6 -4
  160. package/dist/bootsman-ui-shadcn317.js +9 -106
  161. package/dist/bootsman-ui-shadcn318.js +5 -2
  162. package/dist/bootsman-ui-shadcn319.js +4 -4
  163. package/dist/bootsman-ui-shadcn320.js +46 -8
  164. package/dist/bootsman-ui-shadcn321.js +5779 -3
  165. package/dist/bootsman-ui-shadcn322.js +11 -65
  166. package/dist/bootsman-ui-shadcn323.js +9 -22
  167. package/dist/bootsman-ui-shadcn324.js +3 -48
  168. package/dist/bootsman-ui-shadcn325.js +54 -5768
  169. package/dist/bootsman-ui-shadcn326.js +23 -12
  170. package/dist/bootsman-ui-shadcn327.js +143 -18
  171. package/dist/bootsman-ui-shadcn328.js +1965 -2
  172. package/dist/bootsman-ui-shadcn329.js +18 -143
  173. package/dist/bootsman-ui-shadcn330.js +2 -1965
  174. package/dist/bootsman-ui-shadcn334.js +116 -8
  175. package/dist/bootsman-ui-shadcn335.js +8 -116
  176. package/dist/bootsman-ui-shadcn337.js +25 -4
  177. package/dist/bootsman-ui-shadcn338.js +4 -25
  178. package/dist/bootsman-ui-shadcn341.js +3 -3
  179. package/dist/bootsman-ui-shadcn343.js +1 -1
  180. package/dist/bootsman-ui-shadcn344.js +3 -3
  181. package/dist/bootsman-ui-shadcn348.js +1 -1
  182. package/dist/bootsman-ui-shadcn349.js +1 -1
  183. package/dist/bootsman-ui-shadcn350.js +1 -1
  184. package/dist/bootsman-ui-shadcn351.js +6 -6
  185. package/dist/bootsman-ui-shadcn352.js +1 -1
  186. package/dist/bootsman-ui-shadcn353.js +1 -1
  187. package/dist/bootsman-ui-shadcn354.js +6 -6
  188. package/dist/bootsman-ui-shadcn355.js +8 -8
  189. package/dist/bootsman-ui-shadcn356.js +6 -6
  190. package/dist/bootsman-ui-shadcn357.js +1 -1
  191. package/dist/bootsman-ui-shadcn358.js +3 -9
  192. package/dist/bootsman-ui-shadcn359.js +3 -51
  193. package/dist/bootsman-ui-shadcn36.js +1 -1
  194. package/dist/bootsman-ui-shadcn360.js +15 -7
  195. package/dist/bootsman-ui-shadcn361.js +3 -4
  196. package/dist/bootsman-ui-shadcn362.js +9 -3
  197. package/dist/bootsman-ui-shadcn363.js +4 -3
  198. package/dist/bootsman-ui-shadcn364.js +6 -4
  199. package/dist/bootsman-ui-shadcn365.js +9 -3
  200. package/dist/bootsman-ui-shadcn366.js +7 -11
  201. package/dist/bootsman-ui-shadcn367.js +4 -9
  202. package/dist/bootsman-ui-shadcn368.js +3 -31
  203. package/dist/bootsman-ui-shadcn369.js +4 -25
  204. package/dist/bootsman-ui-shadcn37.js +4 -4
  205. package/dist/bootsman-ui-shadcn370.js +11 -3
  206. package/dist/bootsman-ui-shadcn371.js +9 -3
  207. package/dist/bootsman-ui-shadcn372.js +31 -9
  208. package/dist/bootsman-ui-shadcn373.js +24 -8
  209. package/dist/bootsman-ui-shadcn374.js +50 -14
  210. package/dist/bootsman-ui-shadcn375.js +3 -4
  211. package/dist/bootsman-ui-shadcn376.js +8 -5
  212. package/dist/bootsman-ui-shadcn377.js +2 -2
  213. package/dist/bootsman-ui-shadcn378.js +1 -1
  214. package/dist/bootsman-ui-shadcn379.js +1 -1
  215. package/dist/bootsman-ui-shadcn380.js +1 -1
  216. package/dist/bootsman-ui-shadcn381.js +1 -1
  217. package/dist/bootsman-ui-shadcn382.js +2 -2
  218. package/dist/bootsman-ui-shadcn383.js +1 -1
  219. package/dist/bootsman-ui-shadcn385.js +5 -5
  220. package/dist/bootsman-ui-shadcn388.js +1 -1
  221. package/dist/bootsman-ui-shadcn390.js +2 -2
  222. package/dist/bootsman-ui-shadcn391.js +3 -3
  223. package/dist/bootsman-ui-shadcn45.js +1 -1
  224. package/dist/bootsman-ui-shadcn50.js +1 -1
  225. package/dist/bootsman-ui-shadcn61.js +1 -1
  226. package/dist/bootsman-ui-shadcn62.js +1 -1
  227. package/dist/bootsman-ui-shadcn67.js +1 -1
  228. package/dist/bootsman-ui-shadcn81.js +1 -1
  229. package/dist/bootsman-ui-shadcn82.js +1 -1
  230. package/dist/bootsman-ui-shadcn87.js +1 -1
  231. package/dist/bootsman-ui-shadcn90.js +1 -1
  232. package/dist/bootsman-ui-shadcn91.js +1 -1
  233. package/dist/bootsman-ui-shadcn92.js +1 -1
  234. package/dist/bootsman-ui-shadcn93.js +1 -1
  235. package/dist/bootsman-ui-shadcn97.js +1 -1
  236. package/package.json +2 -2
@@ -1,4 +1,1967 @@
1
- var e = {};
1
+ /**
2
+ * table-core
3
+ *
4
+ * Copyright (c) TanStack
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE.md file in the root directory of this source tree.
8
+ *
9
+ * @license MIT
10
+ */
11
+ function E(e, t) {
12
+ return typeof e == "function" ? e(t) : e;
13
+ }
14
+ function _(e, t) {
15
+ return (n) => {
16
+ t.setState((o) => ({
17
+ ...o,
18
+ [e]: E(n, o[e])
19
+ }));
20
+ };
21
+ }
22
+ function D(e) {
23
+ return e instanceof Function;
24
+ }
25
+ function pe(e) {
26
+ return Array.isArray(e) && e.every((t) => typeof t == "number");
27
+ }
28
+ function ce(e, t) {
29
+ const n = [], o = (r) => {
30
+ r.forEach((i) => {
31
+ n.push(i);
32
+ const l = t(i);
33
+ l != null && l.length && o(l);
34
+ });
35
+ };
36
+ return o(e), n;
37
+ }
38
+ function S(e, t, n) {
39
+ let o = [], r;
40
+ return () => {
41
+ let i;
42
+ n.key && n.debug && (i = Date.now());
43
+ const l = e();
44
+ if (!(l.length !== o.length || l.some((a, s) => o[s] !== a)))
45
+ return r;
46
+ o = l;
47
+ let g;
48
+ if (n.key && n.debug && (g = Date.now()), r = t(...l), n == null || n.onChange == null || n.onChange(r), n.key && n.debug && n != null && n.debug()) {
49
+ const a = Math.round((Date.now() - i) * 100) / 100, s = Math.round((Date.now() - g) * 100) / 100, d = s / 16, c = (p, f) => {
50
+ for (p = String(p); p.length < f; )
51
+ p = " " + p;
52
+ return p;
53
+ };
54
+ console.info(`%c⏱ ${c(s, 5)} /${c(a, 5)} ms`, `
55
+ font-size: .6rem;
56
+ font-weight: bold;
57
+ color: hsl(${Math.max(0, Math.min(120 - 120 * d, 120))}deg 100% 31%);`, n?.key);
58
+ }
59
+ return r;
60
+ };
61
+ }
62
+ function fe(e, t, n, o) {
63
+ var r, i;
64
+ const u = {
65
+ ...e._getDefaultColumnDef(),
66
+ ...t
67
+ }, g = u.accessorKey;
68
+ let a = (r = (i = u.id) != null ? i : g ? g.replace(".", "_") : void 0) != null ? r : typeof u.header == "string" ? u.header : void 0, s;
69
+ if (u.accessorFn ? s = u.accessorFn : g && (g.includes(".") ? s = (c) => {
70
+ let p = c;
71
+ for (const m of g.split(".")) {
72
+ var f;
73
+ p = (f = p) == null ? void 0 : f[m], process.env.NODE_ENV !== "production" && p === void 0 && console.warn(`"${m}" in deeply nested key "${g}" returned undefined.`);
74
+ }
75
+ return p;
76
+ } : s = (c) => c[u.accessorKey]), !a)
77
+ throw process.env.NODE_ENV !== "production" ? new Error(u.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
78
+ let d = {
79
+ id: `${String(a)}`,
80
+ accessorFn: s,
81
+ parent: o,
82
+ depth: n,
83
+ columnDef: u,
84
+ columns: [],
85
+ getFlatColumns: S(() => [!0], () => {
86
+ var c;
87
+ return [d, ...(c = d.columns) == null ? void 0 : c.flatMap((p) => p.getFlatColumns())];
88
+ }, {
89
+ key: process.env.NODE_ENV === "production" && "column.getFlatColumns",
90
+ debug: () => {
91
+ var c;
92
+ return (c = e.options.debugAll) != null ? c : e.options.debugColumns;
93
+ }
94
+ }),
95
+ getLeafColumns: S(() => [e._getOrderColumnsFn()], (c) => {
96
+ var p;
97
+ if ((p = d.columns) != null && p.length) {
98
+ let f = d.columns.flatMap((m) => m.getLeafColumns());
99
+ return c(f);
100
+ }
101
+ return [d];
102
+ }, {
103
+ key: process.env.NODE_ENV === "production" && "column.getLeafColumns",
104
+ debug: () => {
105
+ var c;
106
+ return (c = e.options.debugAll) != null ? c : e.options.debugColumns;
107
+ }
108
+ })
109
+ };
110
+ for (const c of e._features)
111
+ c.createColumn == null || c.createColumn(d, e);
112
+ return d;
113
+ }
114
+ function Y(e, t, n) {
115
+ var o;
116
+ let i = {
117
+ id: (o = n.id) != null ? o : t.id,
118
+ column: t,
119
+ index: n.index,
120
+ isPlaceholder: !!n.isPlaceholder,
121
+ placeholderId: n.placeholderId,
122
+ depth: n.depth,
123
+ subHeaders: [],
124
+ colSpan: 0,
125
+ rowSpan: 0,
126
+ headerGroup: null,
127
+ getLeafHeaders: () => {
128
+ const l = [], u = (g) => {
129
+ g.subHeaders && g.subHeaders.length && g.subHeaders.map(u), l.push(g);
130
+ };
131
+ return u(i), l;
132
+ },
133
+ getContext: () => ({
134
+ table: e,
135
+ header: i,
136
+ column: t
137
+ })
138
+ };
139
+ return e._features.forEach((l) => {
140
+ l.createHeader == null || l.createHeader(i, e);
141
+ }), i;
142
+ }
143
+ const Se = {
144
+ createTable: (e) => {
145
+ e.getHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (t, n, o, r) => {
146
+ var i, l;
147
+ const u = (i = o?.map((d) => n.find((c) => c.id === d)).filter(Boolean)) != null ? i : [], g = (l = r?.map((d) => n.find((c) => c.id === d)).filter(Boolean)) != null ? l : [], a = n.filter((d) => !(o != null && o.includes(d.id)) && !(r != null && r.includes(d.id)));
148
+ return P(t, [...u, ...a, ...g], e);
149
+ }, {
150
+ key: process.env.NODE_ENV === "development" && "getHeaderGroups",
151
+ debug: () => {
152
+ var t;
153
+ return (t = e.options.debugAll) != null ? t : e.options.debugHeaders;
154
+ }
155
+ }), e.getCenterHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (t, n, o, r) => (n = n.filter((i) => !(o != null && o.includes(i.id)) && !(r != null && r.includes(i.id))), P(t, n, e, "center")), {
156
+ key: process.env.NODE_ENV === "development" && "getCenterHeaderGroups",
157
+ debug: () => {
158
+ var t;
159
+ return (t = e.options.debugAll) != null ? t : e.options.debugHeaders;
160
+ }
161
+ }), e.getLeftHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (t, n, o) => {
162
+ var r;
163
+ const i = (r = o?.map((l) => n.find((u) => u.id === l)).filter(Boolean)) != null ? r : [];
164
+ return P(t, i, e, "left");
165
+ }, {
166
+ key: process.env.NODE_ENV === "development" && "getLeftHeaderGroups",
167
+ debug: () => {
168
+ var t;
169
+ return (t = e.options.debugAll) != null ? t : e.options.debugHeaders;
170
+ }
171
+ }), e.getRightHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (t, n, o) => {
172
+ var r;
173
+ const i = (r = o?.map((l) => n.find((u) => u.id === l)).filter(Boolean)) != null ? r : [];
174
+ return P(t, i, e, "right");
175
+ }, {
176
+ key: process.env.NODE_ENV === "development" && "getRightHeaderGroups",
177
+ debug: () => {
178
+ var t;
179
+ return (t = e.options.debugAll) != null ? t : e.options.debugHeaders;
180
+ }
181
+ }), e.getFooterGroups = S(() => [e.getHeaderGroups()], (t) => [...t].reverse(), {
182
+ key: process.env.NODE_ENV === "development" && "getFooterGroups",
183
+ debug: () => {
184
+ var t;
185
+ return (t = e.options.debugAll) != null ? t : e.options.debugHeaders;
186
+ }
187
+ }), e.getLeftFooterGroups = S(() => [e.getLeftHeaderGroups()], (t) => [...t].reverse(), {
188
+ key: process.env.NODE_ENV === "development" && "getLeftFooterGroups",
189
+ debug: () => {
190
+ var t;
191
+ return (t = e.options.debugAll) != null ? t : e.options.debugHeaders;
192
+ }
193
+ }), e.getCenterFooterGroups = S(() => [e.getCenterHeaderGroups()], (t) => [...t].reverse(), {
194
+ key: process.env.NODE_ENV === "development" && "getCenterFooterGroups",
195
+ debug: () => {
196
+ var t;
197
+ return (t = e.options.debugAll) != null ? t : e.options.debugHeaders;
198
+ }
199
+ }), e.getRightFooterGroups = S(() => [e.getRightHeaderGroups()], (t) => [...t].reverse(), {
200
+ key: process.env.NODE_ENV === "development" && "getRightFooterGroups",
201
+ debug: () => {
202
+ var t;
203
+ return (t = e.options.debugAll) != null ? t : e.options.debugHeaders;
204
+ }
205
+ }), e.getFlatHeaders = S(() => [e.getHeaderGroups()], (t) => t.map((n) => n.headers).flat(), {
206
+ key: process.env.NODE_ENV === "development" && "getFlatHeaders",
207
+ debug: () => {
208
+ var t;
209
+ return (t = e.options.debugAll) != null ? t : e.options.debugHeaders;
210
+ }
211
+ }), e.getLeftFlatHeaders = S(() => [e.getLeftHeaderGroups()], (t) => t.map((n) => n.headers).flat(), {
212
+ key: process.env.NODE_ENV === "development" && "getLeftFlatHeaders",
213
+ debug: () => {
214
+ var t;
215
+ return (t = e.options.debugAll) != null ? t : e.options.debugHeaders;
216
+ }
217
+ }), e.getCenterFlatHeaders = S(() => [e.getCenterHeaderGroups()], (t) => t.map((n) => n.headers).flat(), {
218
+ key: process.env.NODE_ENV === "development" && "getCenterFlatHeaders",
219
+ debug: () => {
220
+ var t;
221
+ return (t = e.options.debugAll) != null ? t : e.options.debugHeaders;
222
+ }
223
+ }), e.getRightFlatHeaders = S(() => [e.getRightHeaderGroups()], (t) => t.map((n) => n.headers).flat(), {
224
+ key: process.env.NODE_ENV === "development" && "getRightFlatHeaders",
225
+ debug: () => {
226
+ var t;
227
+ return (t = e.options.debugAll) != null ? t : e.options.debugHeaders;
228
+ }
229
+ }), e.getCenterLeafHeaders = S(() => [e.getCenterFlatHeaders()], (t) => t.filter((n) => {
230
+ var o;
231
+ return !((o = n.subHeaders) != null && o.length);
232
+ }), {
233
+ key: process.env.NODE_ENV === "development" && "getCenterLeafHeaders",
234
+ debug: () => {
235
+ var t;
236
+ return (t = e.options.debugAll) != null ? t : e.options.debugHeaders;
237
+ }
238
+ }), e.getLeftLeafHeaders = S(() => [e.getLeftFlatHeaders()], (t) => t.filter((n) => {
239
+ var o;
240
+ return !((o = n.subHeaders) != null && o.length);
241
+ }), {
242
+ key: process.env.NODE_ENV === "development" && "getLeftLeafHeaders",
243
+ debug: () => {
244
+ var t;
245
+ return (t = e.options.debugAll) != null ? t : e.options.debugHeaders;
246
+ }
247
+ }), e.getRightLeafHeaders = S(() => [e.getRightFlatHeaders()], (t) => t.filter((n) => {
248
+ var o;
249
+ return !((o = n.subHeaders) != null && o.length);
250
+ }), {
251
+ key: process.env.NODE_ENV === "development" && "getRightLeafHeaders",
252
+ debug: () => {
253
+ var t;
254
+ return (t = e.options.debugAll) != null ? t : e.options.debugHeaders;
255
+ }
256
+ }), e.getLeafHeaders = S(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (t, n, o) => {
257
+ var r, i, l, u, g, a;
258
+ return [...(r = (i = t[0]) == null ? void 0 : i.headers) != null ? r : [], ...(l = (u = n[0]) == null ? void 0 : u.headers) != null ? l : [], ...(g = (a = o[0]) == null ? void 0 : a.headers) != null ? g : []].map((s) => s.getLeafHeaders()).flat();
259
+ }, {
260
+ key: process.env.NODE_ENV === "development" && "getLeafHeaders",
261
+ debug: () => {
262
+ var t;
263
+ return (t = e.options.debugAll) != null ? t : e.options.debugHeaders;
264
+ }
265
+ });
266
+ }
267
+ };
268
+ function P(e, t, n, o) {
269
+ var r, i;
270
+ let l = 0;
271
+ const u = function(c, p) {
272
+ p === void 0 && (p = 1), l = Math.max(l, p), c.filter((f) => f.getIsVisible()).forEach((f) => {
273
+ var m;
274
+ (m = f.columns) != null && m.length && u(f.columns, p + 1);
275
+ }, 0);
276
+ };
277
+ u(e);
278
+ let g = [];
279
+ const a = (c, p) => {
280
+ const f = {
281
+ depth: p,
282
+ id: [o, `${p}`].filter(Boolean).join("_"),
283
+ headers: []
284
+ }, m = [];
285
+ c.forEach((C) => {
286
+ const v = [...m].reverse()[0], w = C.column.depth === f.depth;
287
+ let R, h = !1;
288
+ if (w && C.column.parent ? R = C.column.parent : (R = C.column, h = !0), v && v?.column === R)
289
+ v.subHeaders.push(C);
290
+ else {
291
+ const F = Y(n, R, {
292
+ id: [o, p, R.id, C?.id].filter(Boolean).join("_"),
293
+ isPlaceholder: h,
294
+ placeholderId: h ? `${m.filter((I) => I.column === R).length}` : void 0,
295
+ depth: p,
296
+ index: m.length
297
+ });
298
+ F.subHeaders.push(C), m.push(F);
299
+ }
300
+ f.headers.push(C), C.headerGroup = f;
301
+ }), g.push(f), p > 0 && a(m, p - 1);
302
+ }, s = t.map((c, p) => Y(n, c, {
303
+ depth: l,
304
+ index: p
305
+ }));
306
+ a(s, l - 1), g.reverse();
307
+ const d = (c) => c.filter((f) => f.column.getIsVisible()).map((f) => {
308
+ let m = 0, C = 0, v = [0];
309
+ f.subHeaders && f.subHeaders.length ? (v = [], d(f.subHeaders).forEach((R) => {
310
+ let {
311
+ colSpan: h,
312
+ rowSpan: F
313
+ } = R;
314
+ m += h, v.push(F);
315
+ })) : m = 1;
316
+ const w = Math.min(...v);
317
+ return C = C + w, f.colSpan = m, f.rowSpan = C, {
318
+ colSpan: m,
319
+ rowSpan: C
320
+ };
321
+ });
322
+ return d((r = (i = g[0]) == null ? void 0 : i.headers) != null ? r : []), g;
323
+ }
324
+ const x = {
325
+ size: 150,
326
+ minSize: 20,
327
+ maxSize: Number.MAX_SAFE_INTEGER
328
+ }, H = () => ({
329
+ startOffset: null,
330
+ startSize: null,
331
+ deltaOffset: null,
332
+ deltaPercentage: null,
333
+ isResizingColumn: !1,
334
+ columnSizingStart: []
335
+ }), me = {
336
+ getDefaultColumnDef: () => x,
337
+ getInitialState: (e) => ({
338
+ columnSizing: {},
339
+ columnSizingInfo: H(),
340
+ ...e
341
+ }),
342
+ getDefaultOptions: (e) => ({
343
+ columnResizeMode: "onEnd",
344
+ columnResizeDirection: "ltr",
345
+ onColumnSizingChange: _("columnSizing", e),
346
+ onColumnSizingInfoChange: _("columnSizingInfo", e)
347
+ }),
348
+ createColumn: (e, t) => {
349
+ e.getSize = () => {
350
+ var n, o, r;
351
+ const i = t.getState().columnSizing[e.id];
352
+ return Math.min(Math.max((n = e.columnDef.minSize) != null ? n : x.minSize, (o = i ?? e.columnDef.size) != null ? o : x.size), (r = e.columnDef.maxSize) != null ? r : x.maxSize);
353
+ }, e.getStart = (n) => {
354
+ const o = n ? n === "left" ? t.getLeftVisibleLeafColumns() : t.getRightVisibleLeafColumns() : t.getVisibleLeafColumns(), r = o.findIndex((i) => i.id === e.id);
355
+ if (r > 0) {
356
+ const i = o[r - 1];
357
+ return i.getStart(n) + i.getSize();
358
+ }
359
+ return 0;
360
+ }, e.resetSize = () => {
361
+ t.setColumnSizing((n) => {
362
+ let {
363
+ [e.id]: o,
364
+ ...r
365
+ } = n;
366
+ return r;
367
+ });
368
+ }, e.getCanResize = () => {
369
+ var n, o;
370
+ return ((n = e.columnDef.enableResizing) != null ? n : !0) && ((o = t.options.enableColumnResizing) != null ? o : !0);
371
+ }, e.getIsResizing = () => t.getState().columnSizingInfo.isResizingColumn === e.id;
372
+ },
373
+ createHeader: (e, t) => {
374
+ e.getSize = () => {
375
+ let n = 0;
376
+ const o = (r) => {
377
+ if (r.subHeaders.length)
378
+ r.subHeaders.forEach(o);
379
+ else {
380
+ var i;
381
+ n += (i = r.column.getSize()) != null ? i : 0;
382
+ }
383
+ };
384
+ return o(e), n;
385
+ }, e.getStart = () => {
386
+ if (e.index > 0) {
387
+ const n = e.headerGroup.headers[e.index - 1];
388
+ return n.getStart() + n.getSize();
389
+ }
390
+ return 0;
391
+ }, e.getResizeHandler = (n) => {
392
+ const o = t.getColumn(e.column.id), r = o?.getCanResize();
393
+ return (i) => {
394
+ if (!o || !r || (i.persist == null || i.persist(), N(i) && i.touches && i.touches.length > 1))
395
+ return;
396
+ const l = e.getSize(), u = e ? e.getLeafHeaders().map((v) => [v.column.id, v.column.getSize()]) : [[o.id, o.getSize()]], g = N(i) ? Math.round(i.touches[0].clientX) : i.clientX, a = {}, s = (v, w) => {
397
+ typeof w == "number" && (t.setColumnSizingInfo((R) => {
398
+ var h, F;
399
+ const I = t.options.columnResizeDirection === "rtl" ? -1 : 1, J = (w - ((h = R?.startOffset) != null ? h : 0)) * I, Q = Math.max(J / ((F = R?.startSize) != null ? F : 0), -0.999999);
400
+ return R.columnSizingStart.forEach((ae) => {
401
+ let [de, W] = ae;
402
+ a[de] = Math.round(Math.max(W + W * Q, 0) * 100) / 100;
403
+ }), {
404
+ ...R,
405
+ deltaOffset: J,
406
+ deltaPercentage: Q
407
+ };
408
+ }), (t.options.columnResizeMode === "onChange" || v === "end") && t.setColumnSizing((R) => ({
409
+ ...R,
410
+ ...a
411
+ })));
412
+ }, d = (v) => s("move", v), c = (v) => {
413
+ s("end", v), t.setColumnSizingInfo((w) => ({
414
+ ...w,
415
+ isResizingColumn: !1,
416
+ startOffset: null,
417
+ startSize: null,
418
+ deltaOffset: null,
419
+ deltaPercentage: null,
420
+ columnSizingStart: []
421
+ }));
422
+ }, p = n || typeof document < "u" ? document : null, f = {
423
+ moveHandler: (v) => d(v.clientX),
424
+ upHandler: (v) => {
425
+ p?.removeEventListener("mousemove", f.moveHandler), p?.removeEventListener("mouseup", f.upHandler), c(v.clientX);
426
+ }
427
+ }, m = {
428
+ moveHandler: (v) => (v.cancelable && (v.preventDefault(), v.stopPropagation()), d(v.touches[0].clientX), !1),
429
+ upHandler: (v) => {
430
+ var w;
431
+ p?.removeEventListener("touchmove", m.moveHandler), p?.removeEventListener("touchend", m.upHandler), v.cancelable && (v.preventDefault(), v.stopPropagation()), c((w = v.touches[0]) == null ? void 0 : w.clientX);
432
+ }
433
+ }, C = ve() ? {
434
+ passive: !1
435
+ } : !1;
436
+ N(i) ? (p?.addEventListener("touchmove", m.moveHandler, C), p?.addEventListener("touchend", m.upHandler, C)) : (p?.addEventListener("mousemove", f.moveHandler, C), p?.addEventListener("mouseup", f.upHandler, C)), t.setColumnSizingInfo((v) => ({
437
+ ...v,
438
+ startOffset: g,
439
+ startSize: l,
440
+ deltaOffset: 0,
441
+ deltaPercentage: 0,
442
+ columnSizingStart: u,
443
+ isResizingColumn: o.id
444
+ }));
445
+ };
446
+ };
447
+ },
448
+ createTable: (e) => {
449
+ e.setColumnSizing = (t) => e.options.onColumnSizingChange == null ? void 0 : e.options.onColumnSizingChange(t), e.setColumnSizingInfo = (t) => e.options.onColumnSizingInfoChange == null ? void 0 : e.options.onColumnSizingInfoChange(t), e.resetColumnSizing = (t) => {
450
+ var n;
451
+ e.setColumnSizing(t ? {} : (n = e.initialState.columnSizing) != null ? n : {});
452
+ }, e.resetHeaderSizeInfo = (t) => {
453
+ var n;
454
+ e.setColumnSizingInfo(t ? H() : (n = e.initialState.columnSizingInfo) != null ? n : H());
455
+ }, e.getTotalSize = () => {
456
+ var t, n;
457
+ return (t = (n = e.getHeaderGroups()[0]) == null ? void 0 : n.headers.reduce((o, r) => o + r.getSize(), 0)) != null ? t : 0;
458
+ }, e.getLeftTotalSize = () => {
459
+ var t, n;
460
+ return (t = (n = e.getLeftHeaderGroups()[0]) == null ? void 0 : n.headers.reduce((o, r) => o + r.getSize(), 0)) != null ? t : 0;
461
+ }, e.getCenterTotalSize = () => {
462
+ var t, n;
463
+ return (t = (n = e.getCenterHeaderGroups()[0]) == null ? void 0 : n.headers.reduce((o, r) => o + r.getSize(), 0)) != null ? t : 0;
464
+ }, e.getRightTotalSize = () => {
465
+ var t, n;
466
+ return (t = (n = e.getRightHeaderGroups()[0]) == null ? void 0 : n.headers.reduce((o, r) => o + r.getSize(), 0)) != null ? t : 0;
467
+ };
468
+ }
469
+ };
470
+ let y = null;
471
+ function ve() {
472
+ if (typeof y == "boolean")
473
+ return y;
474
+ let e = !1;
475
+ try {
476
+ const t = {
477
+ get passive() {
478
+ return e = !0, !1;
479
+ }
480
+ }, n = () => {
481
+ };
482
+ window.addEventListener("test", n, t), window.removeEventListener("test", n);
483
+ } catch {
484
+ e = !1;
485
+ }
486
+ return y = e, y;
487
+ }
488
+ function N(e) {
489
+ return e.type === "touchstart";
490
+ }
491
+ const Ce = {
492
+ getInitialState: (e) => ({
493
+ expanded: {},
494
+ ...e
495
+ }),
496
+ getDefaultOptions: (e) => ({
497
+ onExpandedChange: _("expanded", e),
498
+ paginateExpandedRows: !0
499
+ }),
500
+ createTable: (e) => {
501
+ let t = !1, n = !1;
502
+ e._autoResetExpanded = () => {
503
+ var o, r;
504
+ if (!t) {
505
+ e._queue(() => {
506
+ t = !0;
507
+ });
508
+ return;
509
+ }
510
+ if ((o = (r = e.options.autoResetAll) != null ? r : e.options.autoResetExpanded) != null ? o : !e.options.manualExpanding) {
511
+ if (n)
512
+ return;
513
+ n = !0, e._queue(() => {
514
+ e.resetExpanded(), n = !1;
515
+ });
516
+ }
517
+ }, e.setExpanded = (o) => e.options.onExpandedChange == null ? void 0 : e.options.onExpandedChange(o), e.toggleAllRowsExpanded = (o) => {
518
+ o ?? !e.getIsAllRowsExpanded() ? e.setExpanded(!0) : e.setExpanded({});
519
+ }, e.resetExpanded = (o) => {
520
+ var r, i;
521
+ e.setExpanded(o ? {} : (r = (i = e.initialState) == null ? void 0 : i.expanded) != null ? r : {});
522
+ }, e.getCanSomeRowsExpand = () => e.getPrePaginationRowModel().flatRows.some((o) => o.getCanExpand()), e.getToggleAllRowsExpandedHandler = () => (o) => {
523
+ o.persist == null || o.persist(), e.toggleAllRowsExpanded();
524
+ }, e.getIsSomeRowsExpanded = () => {
525
+ const o = e.getState().expanded;
526
+ return o === !0 || Object.values(o).some(Boolean);
527
+ }, e.getIsAllRowsExpanded = () => {
528
+ const o = e.getState().expanded;
529
+ return typeof o == "boolean" ? o === !0 : !(!Object.keys(o).length || e.getRowModel().flatRows.some((r) => !r.getIsExpanded()));
530
+ }, e.getExpandedDepth = () => {
531
+ let o = 0;
532
+ return (e.getState().expanded === !0 ? Object.keys(e.getRowModel().rowsById) : Object.keys(e.getState().expanded)).forEach((i) => {
533
+ const l = i.split(".");
534
+ o = Math.max(o, l.length);
535
+ }), o;
536
+ }, e.getPreExpandedRowModel = () => e.getSortedRowModel(), e.getExpandedRowModel = () => (!e._getExpandedRowModel && e.options.getExpandedRowModel && (e._getExpandedRowModel = e.options.getExpandedRowModel(e)), e.options.manualExpanding || !e._getExpandedRowModel ? e.getPreExpandedRowModel() : e._getExpandedRowModel());
537
+ },
538
+ createRow: (e, t) => {
539
+ e.toggleExpanded = (n) => {
540
+ t.setExpanded((o) => {
541
+ var r;
542
+ const i = o === !0 ? !0 : !!(o != null && o[e.id]);
543
+ let l = {};
544
+ if (o === !0 ? Object.keys(t.getRowModel().rowsById).forEach((u) => {
545
+ l[u] = !0;
546
+ }) : l = o, n = (r = n) != null ? r : !i, !i && n)
547
+ return {
548
+ ...l,
549
+ [e.id]: !0
550
+ };
551
+ if (i && !n) {
552
+ const {
553
+ [e.id]: u,
554
+ ...g
555
+ } = l;
556
+ return g;
557
+ }
558
+ return o;
559
+ });
560
+ }, e.getIsExpanded = () => {
561
+ var n;
562
+ const o = t.getState().expanded;
563
+ return !!((n = t.options.getIsRowExpanded == null ? void 0 : t.options.getIsRowExpanded(e)) != null ? n : o === !0 || o?.[e.id]);
564
+ }, e.getCanExpand = () => {
565
+ var n, o, r;
566
+ return (n = t.options.getRowCanExpand == null ? void 0 : t.options.getRowCanExpand(e)) != null ? n : ((o = t.options.enableExpanding) != null ? o : !0) && !!((r = e.subRows) != null && r.length);
567
+ }, e.getIsAllParentsExpanded = () => {
568
+ let n = !0, o = e;
569
+ for (; n && o.parentId; )
570
+ o = t.getRow(o.parentId, !0), n = o.getIsExpanded();
571
+ return n;
572
+ }, e.getToggleExpandedHandler = () => {
573
+ const n = e.getCanExpand();
574
+ return () => {
575
+ n && e.toggleExpanded();
576
+ };
577
+ };
578
+ }
579
+ }, ne = (e, t, n) => {
580
+ var o;
581
+ const r = n.toLowerCase();
582
+ return !!(!((o = e.getValue(t)) == null || (o = o.toString()) == null || (o = o.toLowerCase()) == null) && o.includes(r));
583
+ };
584
+ ne.autoRemove = (e) => $(e);
585
+ const te = (e, t, n) => {
586
+ var o;
587
+ return !!(!((o = e.getValue(t)) == null || (o = o.toString()) == null) && o.includes(n));
588
+ };
589
+ te.autoRemove = (e) => $(e);
590
+ const oe = (e, t, n) => {
591
+ var o;
592
+ return ((o = e.getValue(t)) == null || (o = o.toString()) == null ? void 0 : o.toLowerCase()) === n?.toLowerCase();
593
+ };
594
+ oe.autoRemove = (e) => $(e);
595
+ const re = (e, t, n) => {
596
+ var o;
597
+ return (o = e.getValue(t)) == null ? void 0 : o.includes(n);
598
+ };
599
+ re.autoRemove = (e) => $(e) || !(e != null && e.length);
600
+ const ie = (e, t, n) => !n.some((o) => {
601
+ var r;
602
+ return !((r = e.getValue(t)) != null && r.includes(o));
603
+ });
604
+ ie.autoRemove = (e) => $(e) || !(e != null && e.length);
605
+ const le = (e, t, n) => n.some((o) => {
606
+ var r;
607
+ return (r = e.getValue(t)) == null ? void 0 : r.includes(o);
608
+ });
609
+ le.autoRemove = (e) => $(e) || !(e != null && e.length);
610
+ const ue = (e, t, n) => e.getValue(t) === n;
611
+ ue.autoRemove = (e) => $(e);
612
+ const se = (e, t, n) => e.getValue(t) == n;
613
+ se.autoRemove = (e) => $(e);
614
+ const j = (e, t, n) => {
615
+ let [o, r] = n;
616
+ const i = e.getValue(t);
617
+ return i >= o && i <= r;
618
+ };
619
+ j.resolveFilterValue = (e) => {
620
+ let [t, n] = e, o = typeof t != "number" ? parseFloat(t) : t, r = typeof n != "number" ? parseFloat(n) : n, i = t === null || Number.isNaN(o) ? -1 / 0 : o, l = n === null || Number.isNaN(r) ? 1 / 0 : r;
621
+ if (i > l) {
622
+ const u = i;
623
+ i = l, l = u;
624
+ }
625
+ return [i, l];
626
+ };
627
+ j.autoRemove = (e) => $(e) || $(e[0]) && $(e[1]);
628
+ const V = {
629
+ includesString: ne,
630
+ includesStringSensitive: te,
631
+ equalsString: oe,
632
+ arrIncludes: re,
633
+ arrIncludesAll: ie,
634
+ arrIncludesSome: le,
635
+ equals: ue,
636
+ weakEquals: se,
637
+ inNumberRange: j
638
+ };
639
+ function $(e) {
640
+ return e == null || e === "";
641
+ }
642
+ const Re = {
643
+ getDefaultColumnDef: () => ({
644
+ filterFn: "auto"
645
+ }),
646
+ getInitialState: (e) => ({
647
+ columnFilters: [],
648
+ globalFilter: void 0,
649
+ // filtersProgress: 1,
650
+ // facetProgress: {},
651
+ ...e
652
+ }),
653
+ getDefaultOptions: (e) => ({
654
+ onColumnFiltersChange: _("columnFilters", e),
655
+ onGlobalFilterChange: _("globalFilter", e),
656
+ filterFromLeafRows: !1,
657
+ maxLeafRowFilterDepth: 100,
658
+ globalFilterFn: "auto",
659
+ getColumnCanGlobalFilter: (t) => {
660
+ var n;
661
+ const o = (n = e.getCoreRowModel().flatRows[0]) == null || (n = n._getAllCellsByColumnId()[t.id]) == null ? void 0 : n.getValue();
662
+ return typeof o == "string" || typeof o == "number";
663
+ }
664
+ }),
665
+ createColumn: (e, t) => {
666
+ e.getAutoFilterFn = () => {
667
+ const n = t.getCoreRowModel().flatRows[0], o = n?.getValue(e.id);
668
+ return typeof o == "string" ? V.includesString : typeof o == "number" ? V.inNumberRange : typeof o == "boolean" || o !== null && typeof o == "object" ? V.equals : Array.isArray(o) ? V.arrIncludes : V.weakEquals;
669
+ }, e.getFilterFn = () => {
670
+ var n, o;
671
+ return D(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
672
+ // @ts-ignore
673
+ (n = (o = t.options.filterFns) == null ? void 0 : o[e.columnDef.filterFn]) != null ? n : V[e.columnDef.filterFn]
674
+ );
675
+ }, e.getCanFilter = () => {
676
+ var n, o, r;
677
+ return ((n = e.columnDef.enableColumnFilter) != null ? n : !0) && ((o = t.options.enableColumnFilters) != null ? o : !0) && ((r = t.options.enableFilters) != null ? r : !0) && !!e.accessorFn;
678
+ }, e.getCanGlobalFilter = () => {
679
+ var n, o, r, i;
680
+ return ((n = e.columnDef.enableGlobalFilter) != null ? n : !0) && ((o = t.options.enableGlobalFilter) != null ? o : !0) && ((r = t.options.enableFilters) != null ? r : !0) && ((i = t.options.getColumnCanGlobalFilter == null ? void 0 : t.options.getColumnCanGlobalFilter(e)) != null ? i : !0) && !!e.accessorFn;
681
+ }, e.getIsFiltered = () => e.getFilterIndex() > -1, e.getFilterValue = () => {
682
+ var n;
683
+ return (n = t.getState().columnFilters) == null || (n = n.find((o) => o.id === e.id)) == null ? void 0 : n.value;
684
+ }, e.getFilterIndex = () => {
685
+ var n, o;
686
+ return (n = (o = t.getState().columnFilters) == null ? void 0 : o.findIndex((r) => r.id === e.id)) != null ? n : -1;
687
+ }, e.setFilterValue = (n) => {
688
+ t.setColumnFilters((o) => {
689
+ const r = e.getFilterFn(), i = o?.find((s) => s.id === e.id), l = E(n, i ? i.value : void 0);
690
+ if (Z(r, l, e)) {
691
+ var u;
692
+ return (u = o?.filter((s) => s.id !== e.id)) != null ? u : [];
693
+ }
694
+ const g = {
695
+ id: e.id,
696
+ value: l
697
+ };
698
+ if (i) {
699
+ var a;
700
+ return (a = o?.map((s) => s.id === e.id ? g : s)) != null ? a : [];
701
+ }
702
+ return o != null && o.length ? [...o, g] : [g];
703
+ });
704
+ }, e._getFacetedRowModel = t.options.getFacetedRowModel && t.options.getFacetedRowModel(t, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : t.getPreFilteredRowModel(), e._getFacetedUniqueValues = t.options.getFacetedUniqueValues && t.options.getFacetedUniqueValues(t, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = t.options.getFacetedMinMaxValues && t.options.getFacetedMinMaxValues(t, e.id), e.getFacetedMinMaxValues = () => {
705
+ if (e._getFacetedMinMaxValues)
706
+ return e._getFacetedMinMaxValues();
707
+ };
708
+ },
709
+ createRow: (e, t) => {
710
+ e.columnFilters = {}, e.columnFiltersMeta = {};
711
+ },
712
+ createTable: (e) => {
713
+ e.getGlobalAutoFilterFn = () => V.includesString, e.getGlobalFilterFn = () => {
714
+ var t, n;
715
+ const {
716
+ globalFilterFn: o
717
+ } = e.options;
718
+ return D(o) ? o : o === "auto" ? e.getGlobalAutoFilterFn() : (
719
+ // @ts-ignore
720
+ (t = (n = e.options.filterFns) == null ? void 0 : n[o]) != null ? t : V[o]
721
+ );
722
+ }, e.setColumnFilters = (t) => {
723
+ const n = e.getAllLeafColumns(), o = (r) => {
724
+ var i;
725
+ return (i = E(t, r)) == null ? void 0 : i.filter((l) => {
726
+ const u = n.find((g) => g.id === l.id);
727
+ if (u) {
728
+ const g = u.getFilterFn();
729
+ if (Z(g, l.value, u))
730
+ return !1;
731
+ }
732
+ return !0;
733
+ });
734
+ };
735
+ e.options.onColumnFiltersChange == null || e.options.onColumnFiltersChange(o);
736
+ }, e.setGlobalFilter = (t) => {
737
+ e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(t);
738
+ }, e.resetGlobalFilter = (t) => {
739
+ e.setGlobalFilter(t ? void 0 : e.initialState.globalFilter);
740
+ }, e.resetColumnFilters = (t) => {
741
+ var n, o;
742
+ e.setColumnFilters(t ? [] : (n = (o = e.initialState) == null ? void 0 : o.columnFilters) != null ? n : []);
743
+ }, e.getPreFilteredRowModel = () => e.getCoreRowModel(), e.getFilteredRowModel = () => (!e._getFilteredRowModel && e.options.getFilteredRowModel && (e._getFilteredRowModel = e.options.getFilteredRowModel(e)), e.options.manualFiltering || !e._getFilteredRowModel ? e.getPreFilteredRowModel() : e._getFilteredRowModel()), e._getGlobalFacetedRowModel = e.options.getFacetedRowModel && e.options.getFacetedRowModel(e, "__global__"), e.getGlobalFacetedRowModel = () => e.options.manualFiltering || !e._getGlobalFacetedRowModel ? e.getPreFilteredRowModel() : e._getGlobalFacetedRowModel(), e._getGlobalFacetedUniqueValues = e.options.getFacetedUniqueValues && e.options.getFacetedUniqueValues(e, "__global__"), e.getGlobalFacetedUniqueValues = () => e._getGlobalFacetedUniqueValues ? e._getGlobalFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getGlobalFacetedMinMaxValues = e.options.getFacetedMinMaxValues && e.options.getFacetedMinMaxValues(e, "__global__"), e.getGlobalFacetedMinMaxValues = () => {
744
+ if (e._getGlobalFacetedMinMaxValues)
745
+ return e._getGlobalFacetedMinMaxValues();
746
+ };
747
+ }
748
+ };
749
+ function Z(e, t, n) {
750
+ return (e && e.autoRemove ? e.autoRemove(t, n) : !1) || typeof t > "u" || typeof t == "string" && !t;
751
+ }
752
+ const we = (e, t, n) => n.reduce((o, r) => {
753
+ const i = r.getValue(e);
754
+ return o + (typeof i == "number" ? i : 0);
755
+ }, 0), _e = (e, t, n) => {
756
+ let o;
757
+ return n.forEach((r) => {
758
+ const i = r.getValue(e);
759
+ i != null && (o > i || o === void 0 && i >= i) && (o = i);
760
+ }), o;
761
+ }, he = (e, t, n) => {
762
+ let o;
763
+ return n.forEach((r) => {
764
+ const i = r.getValue(e);
765
+ i != null && (o < i || o === void 0 && i >= i) && (o = i);
766
+ }), o;
767
+ }, $e = (e, t, n) => {
768
+ let o, r;
769
+ return n.forEach((i) => {
770
+ const l = i.getValue(e);
771
+ l != null && (o === void 0 ? l >= l && (o = r = l) : (o > l && (o = l), r < l && (r = l)));
772
+ }), [o, r];
773
+ }, Fe = (e, t) => {
774
+ let n = 0, o = 0;
775
+ if (t.forEach((r) => {
776
+ let i = r.getValue(e);
777
+ i != null && (i = +i) >= i && (++n, o += i);
778
+ }), n)
779
+ return o / n;
780
+ }, Ve = (e, t) => {
781
+ if (!t.length)
782
+ return;
783
+ const n = t.map((i) => i.getValue(e));
784
+ if (!pe(n))
785
+ return;
786
+ if (n.length === 1)
787
+ return n[0];
788
+ const o = Math.floor(n.length / 2), r = n.sort((i, l) => i - l);
789
+ return n.length % 2 !== 0 ? r[o] : (r[o - 1] + r[o]) / 2;
790
+ }, Ee = (e, t) => Array.from(new Set(t.map((n) => n.getValue(e))).values()), Ae = (e, t) => new Set(t.map((n) => n.getValue(e))).size, Me = (e, t) => t.length, O = {
791
+ sum: we,
792
+ min: _e,
793
+ max: he,
794
+ extent: $e,
795
+ mean: Fe,
796
+ median: Ve,
797
+ unique: Ee,
798
+ uniqueCount: Ae,
799
+ count: Me
800
+ }, Pe = {
801
+ getDefaultColumnDef: () => ({
802
+ aggregatedCell: (e) => {
803
+ var t, n;
804
+ return (t = (n = e.getValue()) == null || n.toString == null ? void 0 : n.toString()) != null ? t : null;
805
+ },
806
+ aggregationFn: "auto"
807
+ }),
808
+ getInitialState: (e) => ({
809
+ grouping: [],
810
+ ...e
811
+ }),
812
+ getDefaultOptions: (e) => ({
813
+ onGroupingChange: _("grouping", e),
814
+ groupedColumnMode: "reorder"
815
+ }),
816
+ createColumn: (e, t) => {
817
+ e.toggleGrouping = () => {
818
+ t.setGrouping((n) => n != null && n.includes(e.id) ? n.filter((o) => o !== e.id) : [...n ?? [], e.id]);
819
+ }, e.getCanGroup = () => {
820
+ var n, o, r, i;
821
+ return (n = (o = (r = (i = e.columnDef.enableGrouping) != null ? i : !0) != null ? r : t.options.enableGrouping) != null ? o : !0) != null ? n : !!e.accessorFn;
822
+ }, e.getIsGrouped = () => {
823
+ var n;
824
+ return (n = t.getState().grouping) == null ? void 0 : n.includes(e.id);
825
+ }, e.getGroupedIndex = () => {
826
+ var n;
827
+ return (n = t.getState().grouping) == null ? void 0 : n.indexOf(e.id);
828
+ }, e.getToggleGroupingHandler = () => {
829
+ const n = e.getCanGroup();
830
+ return () => {
831
+ n && e.toggleGrouping();
832
+ };
833
+ }, e.getAutoAggregationFn = () => {
834
+ const n = t.getCoreRowModel().flatRows[0], o = n?.getValue(e.id);
835
+ if (typeof o == "number")
836
+ return O.sum;
837
+ if (Object.prototype.toString.call(o) === "[object Date]")
838
+ return O.extent;
839
+ }, e.getAggregationFn = () => {
840
+ var n, o;
841
+ if (!e)
842
+ throw new Error();
843
+ return D(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (n = (o = t.options.aggregationFns) == null ? void 0 : o[e.columnDef.aggregationFn]) != null ? n : O[e.columnDef.aggregationFn];
844
+ };
845
+ },
846
+ createTable: (e) => {
847
+ e.setGrouping = (t) => e.options.onGroupingChange == null ? void 0 : e.options.onGroupingChange(t), e.resetGrouping = (t) => {
848
+ var n, o;
849
+ e.setGrouping(t ? [] : (n = (o = e.initialState) == null ? void 0 : o.grouping) != null ? n : []);
850
+ }, e.getPreGroupedRowModel = () => e.getFilteredRowModel(), e.getGroupedRowModel = () => (!e._getGroupedRowModel && e.options.getGroupedRowModel && (e._getGroupedRowModel = e.options.getGroupedRowModel(e)), e.options.manualGrouping || !e._getGroupedRowModel ? e.getPreGroupedRowModel() : e._getGroupedRowModel());
851
+ },
852
+ createRow: (e, t) => {
853
+ e.getIsGrouped = () => !!e.groupingColumnId, e.getGroupingValue = (n) => {
854
+ if (e._groupingValuesCache.hasOwnProperty(n))
855
+ return e._groupingValuesCache[n];
856
+ const o = t.getColumn(n);
857
+ return o != null && o.columnDef.getGroupingValue ? (e._groupingValuesCache[n] = o.columnDef.getGroupingValue(e.original), e._groupingValuesCache[n]) : e.getValue(n);
858
+ }, e._groupingValuesCache = {};
859
+ },
860
+ createCell: (e, t, n, o) => {
861
+ e.getIsGrouped = () => t.getIsGrouped() && t.id === n.groupingColumnId, e.getIsPlaceholder = () => !e.getIsGrouped() && t.getIsGrouped(), e.getIsAggregated = () => {
862
+ var r;
863
+ return !e.getIsGrouped() && !e.getIsPlaceholder() && !!((r = n.subRows) != null && r.length);
864
+ };
865
+ }
866
+ };
867
+ function xe(e, t, n) {
868
+ if (!(t != null && t.length) || !n)
869
+ return e;
870
+ const o = e.filter((i) => !t.includes(i.id));
871
+ return n === "remove" ? o : [...t.map((i) => e.find((l) => l.id === i)).filter(Boolean), ...o];
872
+ }
873
+ const ye = {
874
+ getInitialState: (e) => ({
875
+ columnOrder: [],
876
+ ...e
877
+ }),
878
+ getDefaultOptions: (e) => ({
879
+ onColumnOrderChange: _("columnOrder", e)
880
+ }),
881
+ createTable: (e) => {
882
+ e.setColumnOrder = (t) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(t), e.resetColumnOrder = (t) => {
883
+ var n;
884
+ e.setColumnOrder(t ? [] : (n = e.initialState.columnOrder) != null ? n : []);
885
+ }, e._getOrderColumnsFn = S(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (t, n, o) => (r) => {
886
+ let i = [];
887
+ if (!(t != null && t.length))
888
+ i = r;
889
+ else {
890
+ const l = [...t], u = [...r];
891
+ for (; u.length && l.length; ) {
892
+ const g = l.shift(), a = u.findIndex((s) => s.id === g);
893
+ a > -1 && i.push(u.splice(a, 1)[0]);
894
+ }
895
+ i = [...i, ...u];
896
+ }
897
+ return xe(i, n, o);
898
+ }, {
899
+ key: process.env.NODE_ENV === "development" && "getOrderColumnsFn"
900
+ // debug: () => table.options.debugAll ?? table.options.debugTable,
901
+ });
902
+ }
903
+ }, B = 0, b = 10, G = () => ({
904
+ pageIndex: B,
905
+ pageSize: b
906
+ }), De = {
907
+ getInitialState: (e) => ({
908
+ ...e,
909
+ pagination: {
910
+ ...G(),
911
+ ...e?.pagination
912
+ }
913
+ }),
914
+ getDefaultOptions: (e) => ({
915
+ onPaginationChange: _("pagination", e)
916
+ }),
917
+ createTable: (e) => {
918
+ let t = !1, n = !1;
919
+ e._autoResetPageIndex = () => {
920
+ var o, r;
921
+ if (!t) {
922
+ e._queue(() => {
923
+ t = !0;
924
+ });
925
+ return;
926
+ }
927
+ if ((o = (r = e.options.autoResetAll) != null ? r : e.options.autoResetPageIndex) != null ? o : !e.options.manualPagination) {
928
+ if (n)
929
+ return;
930
+ n = !0, e._queue(() => {
931
+ e.resetPageIndex(), n = !1;
932
+ });
933
+ }
934
+ }, e.setPagination = (o) => {
935
+ const r = (i) => E(o, i);
936
+ return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(r);
937
+ }, e.resetPagination = (o) => {
938
+ var r;
939
+ e.setPagination(o ? G() : (r = e.initialState.pagination) != null ? r : G());
940
+ }, e.setPageIndex = (o) => {
941
+ e.setPagination((r) => {
942
+ let i = E(o, r.pageIndex);
943
+ const l = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
944
+ return i = Math.max(0, Math.min(i, l)), {
945
+ ...r,
946
+ pageIndex: i
947
+ };
948
+ });
949
+ }, e.resetPageIndex = (o) => {
950
+ var r, i;
951
+ e.setPageIndex(o ? B : (r = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageIndex) != null ? r : B);
952
+ }, e.resetPageSize = (o) => {
953
+ var r, i;
954
+ e.setPageSize(o ? b : (r = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageSize) != null ? r : b);
955
+ }, e.setPageSize = (o) => {
956
+ e.setPagination((r) => {
957
+ const i = Math.max(1, E(o, r.pageSize)), l = r.pageSize * r.pageIndex, u = Math.floor(l / i);
958
+ return {
959
+ ...r,
960
+ pageIndex: u,
961
+ pageSize: i
962
+ };
963
+ });
964
+ }, e.setPageCount = (o) => e.setPagination((r) => {
965
+ var i;
966
+ let l = E(o, (i = e.options.pageCount) != null ? i : -1);
967
+ return typeof l == "number" && (l = Math.max(-1, l)), {
968
+ ...r,
969
+ pageCount: l
970
+ };
971
+ }), e.getPageOptions = S(() => [e.getPageCount()], (o) => {
972
+ let r = [];
973
+ return o && o > 0 && (r = [...new Array(o)].fill(null).map((i, l) => l)), r;
974
+ }, {
975
+ key: process.env.NODE_ENV === "development" && "getPageOptions",
976
+ debug: () => {
977
+ var o;
978
+ return (o = e.options.debugAll) != null ? o : e.options.debugTable;
979
+ }
980
+ }), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
981
+ const {
982
+ pageIndex: o
983
+ } = e.getState().pagination, r = e.getPageCount();
984
+ return r === -1 ? !0 : r === 0 ? !1 : o < r - 1;
985
+ }, e.previousPage = () => e.setPageIndex((o) => o - 1), e.nextPage = () => e.setPageIndex((o) => o + 1), e.getPrePaginationRowModel = () => e.getExpandedRowModel(), e.getPaginationRowModel = () => (!e._getPaginationRowModel && e.options.getPaginationRowModel && (e._getPaginationRowModel = e.options.getPaginationRowModel(e)), e.options.manualPagination || !e._getPaginationRowModel ? e.getPrePaginationRowModel() : e._getPaginationRowModel()), e.getPageCount = () => {
986
+ var o;
987
+ return (o = e.options.pageCount) != null ? o : Math.ceil(e.getPrePaginationRowModel().rows.length / e.getState().pagination.pageSize);
988
+ };
989
+ }
990
+ }, L = () => ({
991
+ left: [],
992
+ right: []
993
+ }), z = () => ({
994
+ top: [],
995
+ bottom: []
996
+ }), Ie = {
997
+ getInitialState: (e) => ({
998
+ columnPinning: L(),
999
+ rowPinning: z(),
1000
+ ...e
1001
+ }),
1002
+ getDefaultOptions: (e) => ({
1003
+ onColumnPinningChange: _("columnPinning", e),
1004
+ onRowPinningChange: _("rowPinning", e)
1005
+ }),
1006
+ createColumn: (e, t) => {
1007
+ e.pin = (n) => {
1008
+ const o = e.getLeafColumns().map((r) => r.id).filter(Boolean);
1009
+ t.setColumnPinning((r) => {
1010
+ var i, l;
1011
+ if (n === "right") {
1012
+ var u, g;
1013
+ return {
1014
+ left: ((u = r?.left) != null ? u : []).filter((d) => !(o != null && o.includes(d))),
1015
+ right: [...((g = r?.right) != null ? g : []).filter((d) => !(o != null && o.includes(d))), ...o]
1016
+ };
1017
+ }
1018
+ if (n === "left") {
1019
+ var a, s;
1020
+ return {
1021
+ left: [...((a = r?.left) != null ? a : []).filter((d) => !(o != null && o.includes(d))), ...o],
1022
+ right: ((s = r?.right) != null ? s : []).filter((d) => !(o != null && o.includes(d)))
1023
+ };
1024
+ }
1025
+ return {
1026
+ left: ((i = r?.left) != null ? i : []).filter((d) => !(o != null && o.includes(d))),
1027
+ right: ((l = r?.right) != null ? l : []).filter((d) => !(o != null && o.includes(d)))
1028
+ };
1029
+ });
1030
+ }, e.getCanPin = () => e.getLeafColumns().some((o) => {
1031
+ var r, i, l;
1032
+ return ((r = o.columnDef.enablePinning) != null ? r : !0) && ((i = (l = t.options.enableColumnPinning) != null ? l : t.options.enablePinning) != null ? i : !0);
1033
+ }), e.getIsPinned = () => {
1034
+ const n = e.getLeafColumns().map((u) => u.id), {
1035
+ left: o,
1036
+ right: r
1037
+ } = t.getState().columnPinning, i = n.some((u) => o?.includes(u)), l = n.some((u) => r?.includes(u));
1038
+ return i ? "left" : l ? "right" : !1;
1039
+ }, e.getPinnedIndex = () => {
1040
+ var n, o;
1041
+ const r = e.getIsPinned();
1042
+ return r ? (n = (o = t.getState().columnPinning) == null || (o = o[r]) == null ? void 0 : o.indexOf(e.id)) != null ? n : -1 : 0;
1043
+ };
1044
+ },
1045
+ createRow: (e, t) => {
1046
+ e.pin = (n, o, r) => {
1047
+ const i = o ? e.getLeafRows().map((g) => {
1048
+ let {
1049
+ id: a
1050
+ } = g;
1051
+ return a;
1052
+ }) : [], l = r ? e.getParentRows().map((g) => {
1053
+ let {
1054
+ id: a
1055
+ } = g;
1056
+ return a;
1057
+ }) : [], u = /* @__PURE__ */ new Set([...l, e.id, ...i]);
1058
+ t.setRowPinning((g) => {
1059
+ var a, s;
1060
+ if (n === "bottom") {
1061
+ var d, c;
1062
+ return {
1063
+ top: ((d = g?.top) != null ? d : []).filter((m) => !(u != null && u.has(m))),
1064
+ bottom: [...((c = g?.bottom) != null ? c : []).filter((m) => !(u != null && u.has(m))), ...Array.from(u)]
1065
+ };
1066
+ }
1067
+ if (n === "top") {
1068
+ var p, f;
1069
+ return {
1070
+ top: [...((p = g?.top) != null ? p : []).filter((m) => !(u != null && u.has(m))), ...Array.from(u)],
1071
+ bottom: ((f = g?.bottom) != null ? f : []).filter((m) => !(u != null && u.has(m)))
1072
+ };
1073
+ }
1074
+ return {
1075
+ top: ((a = g?.top) != null ? a : []).filter((m) => !(u != null && u.has(m))),
1076
+ bottom: ((s = g?.bottom) != null ? s : []).filter((m) => !(u != null && u.has(m)))
1077
+ };
1078
+ });
1079
+ }, e.getCanPin = () => {
1080
+ var n;
1081
+ const {
1082
+ enableRowPinning: o,
1083
+ enablePinning: r
1084
+ } = t.options;
1085
+ return typeof o == "function" ? o(e) : (n = o ?? r) != null ? n : !0;
1086
+ }, e.getIsPinned = () => {
1087
+ const n = [e.id], {
1088
+ top: o,
1089
+ bottom: r
1090
+ } = t.getState().rowPinning, i = n.some((u) => o?.includes(u)), l = n.some((u) => r?.includes(u));
1091
+ return i ? "top" : l ? "bottom" : !1;
1092
+ }, e.getPinnedIndex = () => {
1093
+ var n, o;
1094
+ const r = e.getIsPinned();
1095
+ if (!r)
1096
+ return -1;
1097
+ const i = (n = t._getPinnedRows(r)) == null ? void 0 : n.map((l) => {
1098
+ let {
1099
+ id: u
1100
+ } = l;
1101
+ return u;
1102
+ });
1103
+ return (o = i?.indexOf(e.id)) != null ? o : -1;
1104
+ }, e.getCenterVisibleCells = S(() => [e._getAllVisibleCells(), t.getState().columnPinning.left, t.getState().columnPinning.right], (n, o, r) => {
1105
+ const i = [...o ?? [], ...r ?? []];
1106
+ return n.filter((l) => !i.includes(l.column.id));
1107
+ }, {
1108
+ key: process.env.NODE_ENV === "development" && "row.getCenterVisibleCells",
1109
+ debug: () => {
1110
+ var n;
1111
+ return (n = t.options.debugAll) != null ? n : t.options.debugRows;
1112
+ }
1113
+ }), e.getLeftVisibleCells = S(() => [e._getAllVisibleCells(), t.getState().columnPinning.left, ,], (n, o) => (o ?? []).map((i) => n.find((l) => l.column.id === i)).filter(Boolean).map((i) => ({
1114
+ ...i,
1115
+ position: "left"
1116
+ })), {
1117
+ key: process.env.NODE_ENV === "development" && "row.getLeftVisibleCells",
1118
+ debug: () => {
1119
+ var n;
1120
+ return (n = t.options.debugAll) != null ? n : t.options.debugRows;
1121
+ }
1122
+ }), e.getRightVisibleCells = S(() => [e._getAllVisibleCells(), t.getState().columnPinning.right], (n, o) => (o ?? []).map((i) => n.find((l) => l.column.id === i)).filter(Boolean).map((i) => ({
1123
+ ...i,
1124
+ position: "right"
1125
+ })), {
1126
+ key: process.env.NODE_ENV === "development" && "row.getRightVisibleCells",
1127
+ debug: () => {
1128
+ var n;
1129
+ return (n = t.options.debugAll) != null ? n : t.options.debugRows;
1130
+ }
1131
+ });
1132
+ },
1133
+ createTable: (e) => {
1134
+ e.setColumnPinning = (t) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(t), e.resetColumnPinning = (t) => {
1135
+ var n, o;
1136
+ return e.setColumnPinning(t ? L() : (n = (o = e.initialState) == null ? void 0 : o.columnPinning) != null ? n : L());
1137
+ }, e.getIsSomeColumnsPinned = (t) => {
1138
+ var n;
1139
+ const o = e.getState().columnPinning;
1140
+ if (!t) {
1141
+ var r, i;
1142
+ return !!((r = o.left) != null && r.length || (i = o.right) != null && i.length);
1143
+ }
1144
+ return !!((n = o[t]) != null && n.length);
1145
+ }, e.getLeftLeafColumns = S(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (t, n) => (n ?? []).map((o) => t.find((r) => r.id === o)).filter(Boolean), {
1146
+ key: process.env.NODE_ENV === "development" && "getLeftLeafColumns",
1147
+ debug: () => {
1148
+ var t;
1149
+ return (t = e.options.debugAll) != null ? t : e.options.debugColumns;
1150
+ }
1151
+ }), e.getRightLeafColumns = S(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (t, n) => (n ?? []).map((o) => t.find((r) => r.id === o)).filter(Boolean), {
1152
+ key: process.env.NODE_ENV === "development" && "getRightLeafColumns",
1153
+ debug: () => {
1154
+ var t;
1155
+ return (t = e.options.debugAll) != null ? t : e.options.debugColumns;
1156
+ }
1157
+ }), e.getCenterLeafColumns = S(() => [e.getAllLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (t, n, o) => {
1158
+ const r = [...n ?? [], ...o ?? []];
1159
+ return t.filter((i) => !r.includes(i.id));
1160
+ }, {
1161
+ key: process.env.NODE_ENV === "development" && "getCenterLeafColumns",
1162
+ debug: () => {
1163
+ var t;
1164
+ return (t = e.options.debugAll) != null ? t : e.options.debugColumns;
1165
+ }
1166
+ }), e.setRowPinning = (t) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(t), e.resetRowPinning = (t) => {
1167
+ var n, o;
1168
+ return e.setRowPinning(t ? z() : (n = (o = e.initialState) == null ? void 0 : o.rowPinning) != null ? n : z());
1169
+ }, e.getIsSomeRowsPinned = (t) => {
1170
+ var n;
1171
+ const o = e.getState().rowPinning;
1172
+ if (!t) {
1173
+ var r, i;
1174
+ return !!((r = o.top) != null && r.length || (i = o.bottom) != null && i.length);
1175
+ }
1176
+ return !!((n = o[t]) != null && n.length);
1177
+ }, e._getPinnedRows = (t) => S(() => [e.getRowModel().rows, e.getState().rowPinning[t]], (n, o) => {
1178
+ var r;
1179
+ return ((r = e.options.keepPinnedRows) == null || r ? (
1180
+ //get all rows that are pinned even if they would not be otherwise visible
1181
+ //account for expanded parent rows, but not pagination or filtering
1182
+ (o ?? []).map((l) => {
1183
+ const u = e.getRow(l, !0);
1184
+ return u.getIsAllParentsExpanded() ? u : null;
1185
+ })
1186
+ ) : (
1187
+ //else get only visible rows that are pinned
1188
+ (o ?? []).map((l) => n.find((u) => u.id === l))
1189
+ )).filter(Boolean).map((l) => ({
1190
+ ...l,
1191
+ position: t
1192
+ }));
1193
+ }, {
1194
+ key: process.env.NODE_ENV === "development" && `row.get${t === "top" ? "Top" : "Bottom"}Rows`,
1195
+ debug: () => {
1196
+ var n;
1197
+ return (n = e.options.debugAll) != null ? n : e.options.debugRows;
1198
+ }
1199
+ })(), e.getTopRows = () => e._getPinnedRows("top"), e.getBottomRows = () => e._getPinnedRows("bottom"), e.getCenterRows = S(() => [e.getRowModel().rows, e.getState().rowPinning.top, e.getState().rowPinning.bottom], (t, n, o) => {
1200
+ const r = /* @__PURE__ */ new Set([...n ?? [], ...o ?? []]);
1201
+ return t.filter((i) => !r.has(i.id));
1202
+ }, {
1203
+ key: process.env.NODE_ENV === "development" && "row.getCenterRows",
1204
+ debug: () => {
1205
+ var t;
1206
+ return (t = e.options.debugAll) != null ? t : e.options.debugRows;
1207
+ }
1208
+ });
1209
+ }
1210
+ }, He = {
1211
+ getInitialState: (e) => ({
1212
+ rowSelection: {},
1213
+ ...e
1214
+ }),
1215
+ getDefaultOptions: (e) => ({
1216
+ onRowSelectionChange: _("rowSelection", e),
1217
+ enableRowSelection: !0,
1218
+ enableMultiRowSelection: !0,
1219
+ enableSubRowSelection: !0
1220
+ // enableGroupingRowSelection: false,
1221
+ // isAdditiveSelectEvent: (e: unknown) => !!e.metaKey,
1222
+ // isInclusiveSelectEvent: (e: unknown) => !!e.shiftKey,
1223
+ }),
1224
+ createTable: (e) => {
1225
+ e.setRowSelection = (t) => e.options.onRowSelectionChange == null ? void 0 : e.options.onRowSelectionChange(t), e.resetRowSelection = (t) => {
1226
+ var n;
1227
+ return e.setRowSelection(t ? {} : (n = e.initialState.rowSelection) != null ? n : {});
1228
+ }, e.toggleAllRowsSelected = (t) => {
1229
+ e.setRowSelection((n) => {
1230
+ t = typeof t < "u" ? t : !e.getIsAllRowsSelected();
1231
+ const o = {
1232
+ ...n
1233
+ }, r = e.getPreGroupedRowModel().flatRows;
1234
+ return t ? r.forEach((i) => {
1235
+ i.getCanSelect() && (o[i.id] = !0);
1236
+ }) : r.forEach((i) => {
1237
+ delete o[i.id];
1238
+ }), o;
1239
+ });
1240
+ }, e.toggleAllPageRowsSelected = (t) => e.setRowSelection((n) => {
1241
+ const o = typeof t < "u" ? t : !e.getIsAllPageRowsSelected(), r = {
1242
+ ...n
1243
+ };
1244
+ return e.getRowModel().rows.forEach((i) => {
1245
+ q(r, i.id, o, !0, e);
1246
+ }), r;
1247
+ }), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = S(() => [e.getState().rowSelection, e.getCoreRowModel()], (t, n) => Object.keys(t).length ? k(e, n) : {
1248
+ rows: [],
1249
+ flatRows: [],
1250
+ rowsById: {}
1251
+ }, {
1252
+ key: process.env.NODE_ENV === "development" && "getSelectedRowModel",
1253
+ debug: () => {
1254
+ var t;
1255
+ return (t = e.options.debugAll) != null ? t : e.options.debugTable;
1256
+ }
1257
+ }), e.getFilteredSelectedRowModel = S(() => [e.getState().rowSelection, e.getFilteredRowModel()], (t, n) => Object.keys(t).length ? k(e, n) : {
1258
+ rows: [],
1259
+ flatRows: [],
1260
+ rowsById: {}
1261
+ }, {
1262
+ key: process.env.NODE_ENV === "production" && "getFilteredSelectedRowModel",
1263
+ debug: () => {
1264
+ var t;
1265
+ return (t = e.options.debugAll) != null ? t : e.options.debugTable;
1266
+ }
1267
+ }), e.getGroupedSelectedRowModel = S(() => [e.getState().rowSelection, e.getSortedRowModel()], (t, n) => Object.keys(t).length ? k(e, n) : {
1268
+ rows: [],
1269
+ flatRows: [],
1270
+ rowsById: {}
1271
+ }, {
1272
+ key: process.env.NODE_ENV === "production" && "getGroupedSelectedRowModel",
1273
+ debug: () => {
1274
+ var t;
1275
+ return (t = e.options.debugAll) != null ? t : e.options.debugTable;
1276
+ }
1277
+ }), e.getIsAllRowsSelected = () => {
1278
+ const t = e.getFilteredRowModel().flatRows, {
1279
+ rowSelection: n
1280
+ } = e.getState();
1281
+ let o = !!(t.length && Object.keys(n).length);
1282
+ return o && t.some((r) => r.getCanSelect() && !n[r.id]) && (o = !1), o;
1283
+ }, e.getIsAllPageRowsSelected = () => {
1284
+ const t = e.getPaginationRowModel().flatRows.filter((r) => r.getCanSelect()), {
1285
+ rowSelection: n
1286
+ } = e.getState();
1287
+ let o = !!t.length;
1288
+ return o && t.some((r) => !n[r.id]) && (o = !1), o;
1289
+ }, e.getIsSomeRowsSelected = () => {
1290
+ var t;
1291
+ const n = Object.keys((t = e.getState().rowSelection) != null ? t : {}).length;
1292
+ return n > 0 && n < e.getFilteredRowModel().flatRows.length;
1293
+ }, e.getIsSomePageRowsSelected = () => {
1294
+ const t = e.getPaginationRowModel().flatRows;
1295
+ return e.getIsAllPageRowsSelected() ? !1 : t.filter((n) => n.getCanSelect()).some((n) => n.getIsSelected() || n.getIsSomeSelected());
1296
+ }, e.getToggleAllRowsSelectedHandler = () => (t) => {
1297
+ e.toggleAllRowsSelected(t.target.checked);
1298
+ }, e.getToggleAllPageRowsSelectedHandler = () => (t) => {
1299
+ e.toggleAllPageRowsSelected(t.target.checked);
1300
+ };
1301
+ },
1302
+ createRow: (e, t) => {
1303
+ e.toggleSelected = (n, o) => {
1304
+ const r = e.getIsSelected();
1305
+ t.setRowSelection((i) => {
1306
+ var l;
1307
+ if (n = typeof n < "u" ? n : !r, e.getCanSelect() && r === n)
1308
+ return i;
1309
+ const u = {
1310
+ ...i
1311
+ };
1312
+ return q(u, e.id, n, (l = o?.selectChildren) != null ? l : !0, t), u;
1313
+ });
1314
+ }, e.getIsSelected = () => {
1315
+ const {
1316
+ rowSelection: n
1317
+ } = t.getState();
1318
+ return X(e, n);
1319
+ }, e.getIsSomeSelected = () => {
1320
+ const {
1321
+ rowSelection: n
1322
+ } = t.getState();
1323
+ return T(e, n) === "some";
1324
+ }, e.getIsAllSubRowsSelected = () => {
1325
+ const {
1326
+ rowSelection: n
1327
+ } = t.getState();
1328
+ return T(e, n) === "all";
1329
+ }, e.getCanSelect = () => {
1330
+ var n;
1331
+ return typeof t.options.enableRowSelection == "function" ? t.options.enableRowSelection(e) : (n = t.options.enableRowSelection) != null ? n : !0;
1332
+ }, e.getCanSelectSubRows = () => {
1333
+ var n;
1334
+ return typeof t.options.enableSubRowSelection == "function" ? t.options.enableSubRowSelection(e) : (n = t.options.enableSubRowSelection) != null ? n : !0;
1335
+ }, e.getCanMultiSelect = () => {
1336
+ var n;
1337
+ return typeof t.options.enableMultiRowSelection == "function" ? t.options.enableMultiRowSelection(e) : (n = t.options.enableMultiRowSelection) != null ? n : !0;
1338
+ }, e.getToggleSelectedHandler = () => {
1339
+ const n = e.getCanSelect();
1340
+ return (o) => {
1341
+ var r;
1342
+ n && e.toggleSelected((r = o.target) == null ? void 0 : r.checked);
1343
+ };
1344
+ };
1345
+ }
1346
+ }, q = (e, t, n, o, r) => {
1347
+ var i;
1348
+ const l = r.getRow(t, !0);
1349
+ n ? (l.getCanMultiSelect() || Object.keys(e).forEach((u) => delete e[u]), l.getCanSelect() && (e[t] = !0)) : delete e[t], o && (i = l.subRows) != null && i.length && l.getCanSelectSubRows() && l.subRows.forEach((u) => q(e, u.id, n, o, r));
1350
+ };
1351
+ function k(e, t) {
1352
+ const n = e.getState().rowSelection, o = [], r = {}, i = function(l, u) {
1353
+ return l.map((g) => {
1354
+ var a;
1355
+ const s = X(g, n);
1356
+ if (s && (o.push(g), r[g.id] = g), (a = g.subRows) != null && a.length && (g = {
1357
+ ...g,
1358
+ subRows: i(g.subRows)
1359
+ }), s)
1360
+ return g;
1361
+ }).filter(Boolean);
1362
+ };
1363
+ return {
1364
+ rows: i(t.rows),
1365
+ flatRows: o,
1366
+ rowsById: r
1367
+ };
1368
+ }
1369
+ function X(e, t) {
1370
+ var n;
1371
+ return (n = t[e.id]) != null ? n : !1;
1372
+ }
1373
+ function T(e, t, n) {
1374
+ var o;
1375
+ if (!((o = e.subRows) != null && o.length))
1376
+ return !1;
1377
+ let r = !0, i = !1;
1378
+ return e.subRows.forEach((l) => {
1379
+ if (!(i && !r) && (l.getCanSelect() && (X(l, t) ? i = !0 : r = !1), l.subRows && l.subRows.length)) {
1380
+ const u = T(l, t);
1381
+ u === "all" ? i = !0 : (u === "some" && (i = !0), r = !1);
1382
+ }
1383
+ }), r ? "all" : i ? "some" : !1;
1384
+ }
1385
+ const U = /([0-9]+)/gm, Ne = (e, t, n) => ge(A(e.getValue(n)).toLowerCase(), A(t.getValue(n)).toLowerCase()), Oe = (e, t, n) => ge(A(e.getValue(n)), A(t.getValue(n))), Ge = (e, t, n) => K(A(e.getValue(n)).toLowerCase(), A(t.getValue(n)).toLowerCase()), Le = (e, t, n) => K(A(e.getValue(n)), A(t.getValue(n))), ze = (e, t, n) => {
1386
+ const o = e.getValue(n), r = t.getValue(n);
1387
+ return o > r ? 1 : o < r ? -1 : 0;
1388
+ }, ke = (e, t, n) => K(e.getValue(n), t.getValue(n));
1389
+ function K(e, t) {
1390
+ return e === t ? 0 : e > t ? 1 : -1;
1391
+ }
1392
+ function A(e) {
1393
+ return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
1394
+ }
1395
+ function ge(e, t) {
1396
+ const n = e.split(U).filter(Boolean), o = t.split(U).filter(Boolean);
1397
+ for (; n.length && o.length; ) {
1398
+ const r = n.shift(), i = o.shift(), l = parseInt(r, 10), u = parseInt(i, 10), g = [l, u].sort();
1399
+ if (isNaN(g[0])) {
1400
+ if (r > i)
1401
+ return 1;
1402
+ if (i > r)
1403
+ return -1;
1404
+ continue;
1405
+ }
1406
+ if (isNaN(g[1]))
1407
+ return isNaN(l) ? -1 : 1;
1408
+ if (l > u)
1409
+ return 1;
1410
+ if (u > l)
1411
+ return -1;
1412
+ }
1413
+ return n.length - o.length;
1414
+ }
1415
+ const M = {
1416
+ alphanumeric: Ne,
1417
+ alphanumericCaseSensitive: Oe,
1418
+ text: Ge,
1419
+ textCaseSensitive: Le,
1420
+ datetime: ze,
1421
+ basic: ke
1422
+ }, Be = {
1423
+ getInitialState: (e) => ({
1424
+ sorting: [],
1425
+ ...e
1426
+ }),
1427
+ getDefaultColumnDef: () => ({
1428
+ sortingFn: "auto",
1429
+ sortUndefined: 1
1430
+ }),
1431
+ getDefaultOptions: (e) => ({
1432
+ onSortingChange: _("sorting", e),
1433
+ isMultiSortEvent: (t) => t.shiftKey
1434
+ }),
1435
+ createColumn: (e, t) => {
1436
+ e.getAutoSortingFn = () => {
1437
+ const n = t.getFilteredRowModel().flatRows.slice(10);
1438
+ let o = !1;
1439
+ for (const r of n) {
1440
+ const i = r?.getValue(e.id);
1441
+ if (Object.prototype.toString.call(i) === "[object Date]")
1442
+ return M.datetime;
1443
+ if (typeof i == "string" && (o = !0, i.split(U).length > 1))
1444
+ return M.alphanumeric;
1445
+ }
1446
+ return o ? M.text : M.basic;
1447
+ }, e.getAutoSortDir = () => {
1448
+ const n = t.getFilteredRowModel().flatRows[0];
1449
+ return typeof n?.getValue(e.id) == "string" ? "asc" : "desc";
1450
+ }, e.getSortingFn = () => {
1451
+ var n, o;
1452
+ if (!e)
1453
+ throw new Error();
1454
+ return D(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (n = (o = t.options.sortingFns) == null ? void 0 : o[e.columnDef.sortingFn]) != null ? n : M[e.columnDef.sortingFn];
1455
+ }, e.toggleSorting = (n, o) => {
1456
+ const r = e.getNextSortingOrder(), i = typeof n < "u" && n !== null;
1457
+ t.setSorting((l) => {
1458
+ const u = l?.find((p) => p.id === e.id), g = l?.findIndex((p) => p.id === e.id);
1459
+ let a = [], s, d = i ? n : r === "desc";
1460
+ if (l != null && l.length && e.getCanMultiSort() && o ? u ? s = "toggle" : s = "add" : l != null && l.length && g !== l.length - 1 ? s = "replace" : u ? s = "toggle" : s = "replace", s === "toggle" && (i || r || (s = "remove")), s === "add") {
1461
+ var c;
1462
+ a = [...l, {
1463
+ id: e.id,
1464
+ desc: d
1465
+ }], a.splice(0, a.length - ((c = t.options.maxMultiSortColCount) != null ? c : Number.MAX_SAFE_INTEGER));
1466
+ } else
1467
+ s === "toggle" ? a = l.map((p) => p.id === e.id ? {
1468
+ ...p,
1469
+ desc: d
1470
+ } : p) : s === "remove" ? a = l.filter((p) => p.id !== e.id) : a = [{
1471
+ id: e.id,
1472
+ desc: d
1473
+ }];
1474
+ return a;
1475
+ });
1476
+ }, e.getFirstSortDir = () => {
1477
+ var n, o;
1478
+ return ((n = (o = e.columnDef.sortDescFirst) != null ? o : t.options.sortDescFirst) != null ? n : e.getAutoSortDir() === "desc") ? "desc" : "asc";
1479
+ }, e.getNextSortingOrder = (n) => {
1480
+ var o, r;
1481
+ const i = e.getFirstSortDir(), l = e.getIsSorted();
1482
+ return l ? l !== i && ((o = t.options.enableSortingRemoval) == null || o) && // If enableSortRemove, enable in general
1483
+ (!(n && (r = t.options.enableMultiRemove) != null) || r) ? !1 : l === "desc" ? "asc" : "desc" : i;
1484
+ }, e.getCanSort = () => {
1485
+ var n, o;
1486
+ return ((n = e.columnDef.enableSorting) != null ? n : !0) && ((o = t.options.enableSorting) != null ? o : !0) && !!e.accessorFn;
1487
+ }, e.getCanMultiSort = () => {
1488
+ var n, o;
1489
+ return (n = (o = e.columnDef.enableMultiSort) != null ? o : t.options.enableMultiSort) != null ? n : !!e.accessorFn;
1490
+ }, e.getIsSorted = () => {
1491
+ var n;
1492
+ const o = (n = t.getState().sorting) == null ? void 0 : n.find((r) => r.id === e.id);
1493
+ return o ? o.desc ? "desc" : "asc" : !1;
1494
+ }, e.getSortIndex = () => {
1495
+ var n, o;
1496
+ return (n = (o = t.getState().sorting) == null ? void 0 : o.findIndex((r) => r.id === e.id)) != null ? n : -1;
1497
+ }, e.clearSorting = () => {
1498
+ t.setSorting((n) => n != null && n.length ? n.filter((o) => o.id !== e.id) : []);
1499
+ }, e.getToggleSortingHandler = () => {
1500
+ const n = e.getCanSort();
1501
+ return (o) => {
1502
+ n && (o.persist == null || o.persist(), e.toggleSorting == null || e.toggleSorting(void 0, e.getCanMultiSort() ? t.options.isMultiSortEvent == null ? void 0 : t.options.isMultiSortEvent(o) : !1));
1503
+ };
1504
+ };
1505
+ },
1506
+ createTable: (e) => {
1507
+ e.setSorting = (t) => e.options.onSortingChange == null ? void 0 : e.options.onSortingChange(t), e.resetSorting = (t) => {
1508
+ var n, o;
1509
+ e.setSorting(t ? [] : (n = (o = e.initialState) == null ? void 0 : o.sorting) != null ? n : []);
1510
+ }, e.getPreSortedRowModel = () => e.getGroupedRowModel(), e.getSortedRowModel = () => (!e._getSortedRowModel && e.options.getSortedRowModel && (e._getSortedRowModel = e.options.getSortedRowModel(e)), e.options.manualSorting || !e._getSortedRowModel ? e.getPreSortedRowModel() : e._getSortedRowModel());
1511
+ }
1512
+ }, be = {
1513
+ getInitialState: (e) => ({
1514
+ columnVisibility: {},
1515
+ ...e
1516
+ }),
1517
+ getDefaultOptions: (e) => ({
1518
+ onColumnVisibilityChange: _("columnVisibility", e)
1519
+ }),
1520
+ createColumn: (e, t) => {
1521
+ e.toggleVisibility = (n) => {
1522
+ e.getCanHide() && t.setColumnVisibility((o) => ({
1523
+ ...o,
1524
+ [e.id]: n ?? !e.getIsVisible()
1525
+ }));
1526
+ }, e.getIsVisible = () => {
1527
+ var n, o;
1528
+ return (n = (o = t.getState().columnVisibility) == null ? void 0 : o[e.id]) != null ? n : !0;
1529
+ }, e.getCanHide = () => {
1530
+ var n, o;
1531
+ return ((n = e.columnDef.enableHiding) != null ? n : !0) && ((o = t.options.enableHiding) != null ? o : !0);
1532
+ }, e.getToggleVisibilityHandler = () => (n) => {
1533
+ e.toggleVisibility == null || e.toggleVisibility(n.target.checked);
1534
+ };
1535
+ },
1536
+ createRow: (e, t) => {
1537
+ e._getAllVisibleCells = S(() => [e.getAllCells(), t.getState().columnVisibility], (n) => n.filter((o) => o.column.getIsVisible()), {
1538
+ key: process.env.NODE_ENV === "production" && "row._getAllVisibleCells",
1539
+ debug: () => {
1540
+ var n;
1541
+ return (n = t.options.debugAll) != null ? n : t.options.debugRows;
1542
+ }
1543
+ }), e.getVisibleCells = S(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (n, o, r) => [...n, ...o, ...r], {
1544
+ key: process.env.NODE_ENV === "development" && "row.getVisibleCells",
1545
+ debug: () => {
1546
+ var n;
1547
+ return (n = t.options.debugAll) != null ? n : t.options.debugRows;
1548
+ }
1549
+ });
1550
+ },
1551
+ createTable: (e) => {
1552
+ const t = (n, o) => S(() => [o(), o().filter((r) => r.getIsVisible()).map((r) => r.id).join("_")], (r) => r.filter((i) => i.getIsVisible == null ? void 0 : i.getIsVisible()), {
1553
+ key: n,
1554
+ debug: () => {
1555
+ var r;
1556
+ return (r = e.options.debugAll) != null ? r : e.options.debugColumns;
1557
+ }
1558
+ });
1559
+ e.getVisibleFlatColumns = t("getVisibleFlatColumns", () => e.getAllFlatColumns()), e.getVisibleLeafColumns = t("getVisibleLeafColumns", () => e.getAllLeafColumns()), e.getLeftVisibleLeafColumns = t("getLeftVisibleLeafColumns", () => e.getLeftLeafColumns()), e.getRightVisibleLeafColumns = t("getRightVisibleLeafColumns", () => e.getRightLeafColumns()), e.getCenterVisibleLeafColumns = t("getCenterVisibleLeafColumns", () => e.getCenterLeafColumns()), e.setColumnVisibility = (n) => e.options.onColumnVisibilityChange == null ? void 0 : e.options.onColumnVisibilityChange(n), e.resetColumnVisibility = (n) => {
1560
+ var o;
1561
+ e.setColumnVisibility(n ? {} : (o = e.initialState.columnVisibility) != null ? o : {});
1562
+ }, e.toggleAllColumnsVisible = (n) => {
1563
+ var o;
1564
+ n = (o = n) != null ? o : !e.getIsAllColumnsVisible(), e.setColumnVisibility(e.getAllLeafColumns().reduce((r, i) => ({
1565
+ ...r,
1566
+ [i.id]: n || !(i.getCanHide != null && i.getCanHide())
1567
+ }), {}));
1568
+ }, e.getIsAllColumnsVisible = () => !e.getAllLeafColumns().some((n) => !(n.getIsVisible != null && n.getIsVisible())), e.getIsSomeColumnsVisible = () => e.getAllLeafColumns().some((n) => n.getIsVisible == null ? void 0 : n.getIsVisible()), e.getToggleAllColumnsVisibilityHandler = () => (n) => {
1569
+ var o;
1570
+ e.toggleAllColumnsVisible((o = n.target) == null ? void 0 : o.checked);
1571
+ };
1572
+ }
1573
+ }, ee = [Se, be, ye, Ie, Re, Be, Pe, Ce, De, He, me];
1574
+ function je(e) {
1575
+ var t;
1576
+ (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
1577
+ let n = {
1578
+ _features: ee
1579
+ };
1580
+ const o = n._features.reduce((s, d) => Object.assign(s, d.getDefaultOptions == null ? void 0 : d.getDefaultOptions(n)), {}), r = (s) => n.options.mergeOptions ? n.options.mergeOptions(o, s) : {
1581
+ ...o,
1582
+ ...s
1583
+ };
1584
+ let l = {
1585
+ ...{},
1586
+ ...(t = e.initialState) != null ? t : {}
1587
+ };
1588
+ n._features.forEach((s) => {
1589
+ var d;
1590
+ l = (d = s.getInitialState == null ? void 0 : s.getInitialState(l)) != null ? d : l;
1591
+ });
1592
+ const u = [];
1593
+ let g = !1;
1594
+ const a = {
1595
+ _features: ee,
1596
+ options: {
1597
+ ...o,
1598
+ ...e
1599
+ },
1600
+ initialState: l,
1601
+ _queue: (s) => {
1602
+ u.push(s), g || (g = !0, Promise.resolve().then(() => {
1603
+ for (; u.length; )
1604
+ u.shift()();
1605
+ g = !1;
1606
+ }).catch((d) => setTimeout(() => {
1607
+ throw d;
1608
+ })));
1609
+ },
1610
+ reset: () => {
1611
+ n.setState(n.initialState);
1612
+ },
1613
+ setOptions: (s) => {
1614
+ const d = E(s, n.options);
1615
+ n.options = r(d);
1616
+ },
1617
+ getState: () => n.options.state,
1618
+ setState: (s) => {
1619
+ n.options.onStateChange == null || n.options.onStateChange(s);
1620
+ },
1621
+ _getRowId: (s, d, c) => {
1622
+ var p;
1623
+ return (p = n.options.getRowId == null ? void 0 : n.options.getRowId(s, d, c)) != null ? p : `${c ? [c.id, d].join(".") : d}`;
1624
+ },
1625
+ getCoreRowModel: () => (n._getCoreRowModel || (n._getCoreRowModel = n.options.getCoreRowModel(n)), n._getCoreRowModel()),
1626
+ // The final calls start at the bottom of the model,
1627
+ // expanded rows, which then work their way up
1628
+ getRowModel: () => n.getPaginationRowModel(),
1629
+ //in next version, we should just pass in the row model as the optional 2nd arg
1630
+ getRow: (s, d) => {
1631
+ let c = (d ? n.getPrePaginationRowModel() : n.getRowModel()).rowsById[s];
1632
+ if (!c && (c = n.getCoreRowModel().rowsById[s], !c))
1633
+ throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${s}`) : new Error();
1634
+ return c;
1635
+ },
1636
+ _getDefaultColumnDef: S(() => [n.options.defaultColumn], (s) => {
1637
+ var d;
1638
+ return s = (d = s) != null ? d : {}, {
1639
+ header: (c) => {
1640
+ const p = c.header.column.columnDef;
1641
+ return p.accessorKey ? p.accessorKey : p.accessorFn ? p.id : null;
1642
+ },
1643
+ // footer: props => props.header.column.id,
1644
+ cell: (c) => {
1645
+ var p, f;
1646
+ return (p = (f = c.renderValue()) == null || f.toString == null ? void 0 : f.toString()) != null ? p : null;
1647
+ },
1648
+ ...n._features.reduce((c, p) => Object.assign(c, p.getDefaultColumnDef == null ? void 0 : p.getDefaultColumnDef()), {}),
1649
+ ...s
1650
+ };
1651
+ }, {
1652
+ debug: () => {
1653
+ var s;
1654
+ return (s = n.options.debugAll) != null ? s : n.options.debugColumns;
1655
+ },
1656
+ key: process.env.NODE_ENV === "development" && "getDefaultColumnDef"
1657
+ }),
1658
+ _getColumnDefs: () => n.options.columns,
1659
+ getAllColumns: S(() => [n._getColumnDefs()], (s) => {
1660
+ const d = function(c, p, f) {
1661
+ return f === void 0 && (f = 0), c.map((m) => {
1662
+ const C = fe(n, m, f, p), v = m;
1663
+ return C.columns = v.columns ? d(v.columns, C, f + 1) : [], C;
1664
+ });
1665
+ };
1666
+ return d(s);
1667
+ }, {
1668
+ key: process.env.NODE_ENV === "development" && "getAllColumns",
1669
+ debug: () => {
1670
+ var s;
1671
+ return (s = n.options.debugAll) != null ? s : n.options.debugColumns;
1672
+ }
1673
+ }),
1674
+ getAllFlatColumns: S(() => [n.getAllColumns()], (s) => s.flatMap((d) => d.getFlatColumns()), {
1675
+ key: process.env.NODE_ENV === "development" && "getAllFlatColumns",
1676
+ debug: () => {
1677
+ var s;
1678
+ return (s = n.options.debugAll) != null ? s : n.options.debugColumns;
1679
+ }
1680
+ }),
1681
+ _getAllFlatColumnsById: S(() => [n.getAllFlatColumns()], (s) => s.reduce((d, c) => (d[c.id] = c, d), {}), {
1682
+ key: process.env.NODE_ENV === "development" && "getAllFlatColumnsById",
1683
+ debug: () => {
1684
+ var s;
1685
+ return (s = n.options.debugAll) != null ? s : n.options.debugColumns;
1686
+ }
1687
+ }),
1688
+ getAllLeafColumns: S(() => [n.getAllColumns(), n._getOrderColumnsFn()], (s, d) => {
1689
+ let c = s.flatMap((p) => p.getLeafColumns());
1690
+ return d(c);
1691
+ }, {
1692
+ key: process.env.NODE_ENV === "development" && "getAllLeafColumns",
1693
+ debug: () => {
1694
+ var s;
1695
+ return (s = n.options.debugAll) != null ? s : n.options.debugColumns;
1696
+ }
1697
+ }),
1698
+ getColumn: (s) => {
1699
+ const d = n._getAllFlatColumnsById()[s];
1700
+ return process.env.NODE_ENV !== "production" && !d && console.error(`[Table] Column with id '${s}' does not exist.`), d;
1701
+ }
1702
+ };
1703
+ Object.assign(n, a);
1704
+ for (let s = 0; s < n._features.length; s++) {
1705
+ const d = n._features[s];
1706
+ d == null || d.createTable == null || d.createTable(n);
1707
+ }
1708
+ return n;
1709
+ }
1710
+ function qe(e, t, n, o) {
1711
+ const r = () => {
1712
+ var l;
1713
+ return (l = i.getValue()) != null ? l : e.options.renderFallbackValue;
1714
+ }, i = {
1715
+ id: `${t.id}_${n.id}`,
1716
+ row: t,
1717
+ column: n,
1718
+ getValue: () => t.getValue(o),
1719
+ renderValue: r,
1720
+ getContext: S(() => [e, n, t, i], (l, u, g, a) => ({
1721
+ table: l,
1722
+ column: u,
1723
+ row: g,
1724
+ cell: a,
1725
+ getValue: a.getValue,
1726
+ renderValue: a.renderValue
1727
+ }), {
1728
+ key: process.env.NODE_ENV === "development" && "cell.getContext",
1729
+ debug: () => e.options.debugAll
1730
+ })
1731
+ };
1732
+ return e._features.forEach((l) => {
1733
+ l.createCell == null || l.createCell(i, n, t, e);
1734
+ }, {}), i;
1735
+ }
1736
+ const Te = (e, t, n, o, r, i, l) => {
1737
+ let u = {
1738
+ id: t,
1739
+ index: o,
1740
+ original: n,
1741
+ depth: r,
1742
+ parentId: l,
1743
+ _valuesCache: {},
1744
+ _uniqueValuesCache: {},
1745
+ getValue: (g) => {
1746
+ if (u._valuesCache.hasOwnProperty(g))
1747
+ return u._valuesCache[g];
1748
+ const a = e.getColumn(g);
1749
+ if (a != null && a.accessorFn)
1750
+ return u._valuesCache[g] = a.accessorFn(u.original, o), u._valuesCache[g];
1751
+ },
1752
+ getUniqueValues: (g) => {
1753
+ if (u._uniqueValuesCache.hasOwnProperty(g))
1754
+ return u._uniqueValuesCache[g];
1755
+ const a = e.getColumn(g);
1756
+ if (a != null && a.accessorFn)
1757
+ return a.columnDef.getUniqueValues ? (u._uniqueValuesCache[g] = a.columnDef.getUniqueValues(u.original, o), u._uniqueValuesCache[g]) : (u._uniqueValuesCache[g] = [u.getValue(g)], u._uniqueValuesCache[g]);
1758
+ },
1759
+ renderValue: (g) => {
1760
+ var a;
1761
+ return (a = u.getValue(g)) != null ? a : e.options.renderFallbackValue;
1762
+ },
1763
+ subRows: i ?? [],
1764
+ getLeafRows: () => ce(u.subRows, (g) => g.subRows),
1765
+ getParentRow: () => u.parentId ? e.getRow(u.parentId, !0) : void 0,
1766
+ getParentRows: () => {
1767
+ let g = [], a = u;
1768
+ for (; ; ) {
1769
+ const s = a.getParentRow();
1770
+ if (!s)
1771
+ break;
1772
+ g.push(s), a = s;
1773
+ }
1774
+ return g.reverse();
1775
+ },
1776
+ getAllCells: S(() => [e.getAllLeafColumns()], (g) => g.map((a) => qe(e, u, a, a.id)), {
1777
+ key: process.env.NODE_ENV === "development" && "row.getAllCells",
1778
+ debug: () => {
1779
+ var g;
1780
+ return (g = e.options.debugAll) != null ? g : e.options.debugRows;
1781
+ }
1782
+ }),
1783
+ _getAllCellsByColumnId: S(() => [u.getAllCells()], (g) => g.reduce((a, s) => (a[s.column.id] = s, a), {}), {
1784
+ key: process.env.NODE_ENV === "production" && "row.getAllCellsByColumnId",
1785
+ debug: () => {
1786
+ var g;
1787
+ return (g = e.options.debugAll) != null ? g : e.options.debugRows;
1788
+ }
1789
+ })
1790
+ };
1791
+ for (let g = 0; g < e._features.length; g++) {
1792
+ const a = e._features[g];
1793
+ a == null || a.createRow == null || a.createRow(u, e);
1794
+ }
1795
+ return u;
1796
+ };
1797
+ function Xe() {
1798
+ return (e) => S(() => [e.options.data], (t) => {
1799
+ const n = {
1800
+ rows: [],
1801
+ flatRows: [],
1802
+ rowsById: {}
1803
+ }, o = function(r, i, l) {
1804
+ i === void 0 && (i = 0);
1805
+ const u = [];
1806
+ for (let a = 0; a < r.length; a++) {
1807
+ const s = Te(e, e._getRowId(r[a], a, l), r[a], a, i, void 0, l?.id);
1808
+ if (n.flatRows.push(s), n.rowsById[s.id] = s, u.push(s), e.options.getSubRows) {
1809
+ var g;
1810
+ s.originalSubRows = e.options.getSubRows(r[a], a), (g = s.originalSubRows) != null && g.length && (s.subRows = o(s.originalSubRows, i + 1, s));
1811
+ }
1812
+ }
1813
+ return u;
1814
+ };
1815
+ return n.rows = o(t), n;
1816
+ }, {
1817
+ key: process.env.NODE_ENV === "development" && "getRowModel",
1818
+ debug: () => {
1819
+ var t;
1820
+ return (t = e.options.debugAll) != null ? t : e.options.debugTable;
1821
+ },
1822
+ onChange: () => {
1823
+ e._autoResetPageIndex();
1824
+ }
1825
+ });
1826
+ }
1827
+ function Ke() {
1828
+ return (e) => S(() => [e.getState().sorting, e.getPreSortedRowModel()], (t, n) => {
1829
+ if (!n.rows.length || !(t != null && t.length))
1830
+ return n;
1831
+ const o = e.getState().sorting, r = [], i = o.filter((g) => {
1832
+ var a;
1833
+ return (a = e.getColumn(g.id)) == null ? void 0 : a.getCanSort();
1834
+ }), l = {};
1835
+ i.forEach((g) => {
1836
+ const a = e.getColumn(g.id);
1837
+ a && (l[g.id] = {
1838
+ sortUndefined: a.columnDef.sortUndefined,
1839
+ invertSorting: a.columnDef.invertSorting,
1840
+ sortingFn: a.getSortingFn()
1841
+ });
1842
+ });
1843
+ const u = (g) => {
1844
+ const a = g.map((s) => ({
1845
+ ...s
1846
+ }));
1847
+ return a.sort((s, d) => {
1848
+ for (let p = 0; p < i.length; p += 1) {
1849
+ var c;
1850
+ const f = i[p], m = l[f.id], C = (c = f?.desc) != null ? c : !1;
1851
+ let v = 0;
1852
+ if (m.sortUndefined) {
1853
+ const w = s.getValue(f.id), R = d.getValue(f.id), h = w === void 0, F = R === void 0;
1854
+ (h || F) && (v = h && F ? 0 : h ? m.sortUndefined : -m.sortUndefined);
1855
+ }
1856
+ if (v === 0 && (v = m.sortingFn(s, d, f.id)), v !== 0)
1857
+ return C && (v *= -1), m.invertSorting && (v *= -1), v;
1858
+ }
1859
+ return s.index - d.index;
1860
+ }), a.forEach((s) => {
1861
+ var d;
1862
+ r.push(s), (d = s.subRows) != null && d.length && (s.subRows = u(s.subRows));
1863
+ }), a;
1864
+ };
1865
+ return {
1866
+ rows: u(n.rows),
1867
+ flatRows: r,
1868
+ rowsById: n.rowsById
1869
+ };
1870
+ }, {
1871
+ key: process.env.NODE_ENV === "development" && "getSortedRowModel",
1872
+ debug: () => {
1873
+ var t;
1874
+ return (t = e.options.debugAll) != null ? t : e.options.debugTable;
1875
+ },
1876
+ onChange: () => {
1877
+ e._autoResetPageIndex();
1878
+ }
1879
+ });
1880
+ }
1881
+ function Ue(e) {
1882
+ const t = [], n = (o) => {
1883
+ var r;
1884
+ t.push(o), (r = o.subRows) != null && r.length && o.getIsExpanded() && o.subRows.forEach(n);
1885
+ };
1886
+ return e.rows.forEach(n), {
1887
+ rows: t,
1888
+ flatRows: e.flatRows,
1889
+ rowsById: e.rowsById
1890
+ };
1891
+ }
1892
+ function Je(e) {
1893
+ return (t) => S(() => [t.getState().pagination, t.getPrePaginationRowModel(), t.options.paginateExpandedRows ? void 0 : t.getState().expanded], (n, o) => {
1894
+ if (!o.rows.length)
1895
+ return o;
1896
+ const {
1897
+ pageSize: r,
1898
+ pageIndex: i
1899
+ } = n;
1900
+ let {
1901
+ rows: l,
1902
+ flatRows: u,
1903
+ rowsById: g
1904
+ } = o;
1905
+ const a = r * i, s = a + r;
1906
+ l = l.slice(a, s);
1907
+ let d;
1908
+ t.options.paginateExpandedRows ? d = {
1909
+ rows: l,
1910
+ flatRows: u,
1911
+ rowsById: g
1912
+ } : d = Ue({
1913
+ rows: l,
1914
+ flatRows: u,
1915
+ rowsById: g
1916
+ }), d.flatRows = [];
1917
+ const c = (p) => {
1918
+ d.flatRows.push(p), p.subRows.length && p.subRows.forEach(c);
1919
+ };
1920
+ return d.rows.forEach(c), d;
1921
+ }, {
1922
+ key: process.env.NODE_ENV === "development" && "getPaginationRowModel",
1923
+ debug: () => {
1924
+ var n;
1925
+ return (n = t.options.debugAll) != null ? n : t.options.debugTable;
1926
+ }
1927
+ });
1928
+ }
2
1929
  export {
3
- e as __exports
1930
+ me as ColumnSizing,
1931
+ Ce as Expanding,
1932
+ Re as Filters,
1933
+ Pe as Grouping,
1934
+ Se as Headers,
1935
+ ye as Ordering,
1936
+ De as Pagination,
1937
+ Ie as Pinning,
1938
+ He as RowSelection,
1939
+ Be as Sorting,
1940
+ be as Visibility,
1941
+ O as aggregationFns,
1942
+ P as buildHeaderGroups,
1943
+ qe as createCell,
1944
+ fe as createColumn,
1945
+ Te as createRow,
1946
+ je as createTable,
1947
+ x as defaultColumnSizing,
1948
+ Ue as expandRows,
1949
+ V as filterFns,
1950
+ ce as flattenBy,
1951
+ E as functionalUpdate,
1952
+ Xe as getCoreRowModel,
1953
+ Je as getPaginationRowModel,
1954
+ Ke as getSortedRowModel,
1955
+ D as isFunction,
1956
+ pe as isNumberArray,
1957
+ X as isRowSelected,
1958
+ T as isSubRowSelected,
1959
+ _ as makeStateUpdater,
1960
+ S as memo,
1961
+ xe as orderColumns,
1962
+ ve as passiveEventSupported,
1963
+ U as reSplitAlphaNumeric,
1964
+ k as selectRowsFn,
1965
+ Z as shouldAutoRemoveFilter,
1966
+ M as sortingFns
4
1967
  };