@fileflow/sdk 0.1.18 → 0.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,49 +1,49 @@
1
- import { jsx as g, jsxs as v, Fragment as oe } from "react/jsx-runtime";
2
- import * as Se from "react";
3
- import ut, { useCallback as Me, useState as Y, useMemo as ze, useEffect as Ae } from "react";
4
- import { h as G, j as ft, k as dt, X as se, m as j, U as Xe, n as Ie, T as Re, q as gt, p as Ve, o as Ge, t as ct, d as pt, V as Oe, g as ee, S as de, L as be } from "./index-DnkwOjwi.mjs";
1
+ import { jsx as c, jsxs as w, Fragment as re } from "react/jsx-runtime";
2
+ import * as xe from "react";
3
+ import pt, { useCallback as Ne, useState as q, useMemo as be, useEffect as Oe } from "react";
4
+ import { h as b, j as mt, k as ht, X as ae, m as U, U as Qe, n as Pe, T as _e, q as vt, p as ke, o as Te, t as wt, d as Ct, V as Be, g as te, S as ce, L as ge } from "./index-EFXXxSbj.mjs";
5
5
  /**
6
6
  * @license lucide-react v0.563.0 - ISC
7
7
  *
8
8
  * This source code is licensed under the ISC license.
9
9
  * See the LICENSE file in the root directory of this source tree.
10
10
  */
11
- const mt = [
11
+ const St = [
12
12
  ["path", { d: "M5 12h14", key: "1ays0h" }],
13
13
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
14
- ], ht = G("arrow-right", mt);
14
+ ], yt = b("arrow-right", St);
15
15
  /**
16
16
  * @license lucide-react v0.563.0 - ISC
17
17
  *
18
18
  * This source code is licensed under the ISC license.
19
19
  * See the LICENSE file in the root directory of this source tree.
20
20
  */
21
- const vt = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], wt = G("check", vt);
21
+ const Rt = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], xt = b("check", Rt);
22
22
  /**
23
23
  * @license lucide-react v0.563.0 - ISC
24
24
  *
25
25
  * This source code is licensed under the ISC license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
27
  */
28
- const Ct = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], St = G("chevron-left", Ct);
28
+ const _t = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], Ft = b("chevron-left", _t);
29
29
  /**
30
30
  * @license lucide-react v0.563.0 - ISC
31
31
  *
32
32
  * This source code is licensed under the ISC license.
33
33
  * See the LICENSE file in the root directory of this source tree.
34
34
  */
35
- const Rt = [
35
+ const $t = [
36
36
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
37
37
  ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
38
38
  ["path", { d: "M12 17h.01", key: "p32p05" }]
39
- ], yt = G("circle-question-mark", Rt);
39
+ ], It = b("circle-question-mark", $t);
40
40
  /**
41
41
  * @license lucide-react v0.563.0 - ISC
42
42
  *
43
43
  * This source code is licensed under the ISC license.
44
44
  * See the LICENSE file in the root directory of this source tree.
45
45
  */
46
- const xt = [
46
+ const Mt = [
47
47
  [
48
48
  "path",
49
49
  {
@@ -52,14 +52,14 @@ const xt = [
52
52
  }
53
53
  ],
54
54
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
55
- ], _t = G("eye", xt);
55
+ ], Vt = b("eye", Mt);
56
56
  /**
57
57
  * @license lucide-react v0.563.0 - ISC
58
58
  *
59
59
  * This source code is licensed under the ISC license.
60
60
  * See the LICENSE file in the root directory of this source tree.
61
61
  */
62
- const Ft = [
62
+ const Nt = [
63
63
  [
64
64
  "path",
65
65
  {
@@ -72,14 +72,14 @@ const Ft = [
72
72
  ["path", { d: "M14 13h2", key: "un5t4a" }],
73
73
  ["path", { d: "M8 17h2", key: "2yhykz" }],
74
74
  ["path", { d: "M14 17h2", key: "10kma7" }]
75
- ], $t = G("file-spreadsheet", Ft);
75
+ ], Pt = b("file-spreadsheet", Nt);
76
76
  /**
77
77
  * @license lucide-react v0.563.0 - ISC
78
78
  *
79
79
  * This source code is licensed under the ISC license.
80
80
  * See the LICENSE file in the root directory of this source tree.
81
81
  */
82
- const Mt = [
82
+ const kt = [
83
83
  [
84
84
  "path",
85
85
  {
@@ -88,26 +88,26 @@ const Mt = [
88
88
  }
89
89
  ],
90
90
  ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
91
- ], It = G("file", Mt);
91
+ ], Et = b("file", kt);
92
92
  /**
93
93
  * @license lucide-react v0.563.0 - ISC
94
94
  *
95
95
  * This source code is licensed under the ISC license.
96
96
  * See the LICENSE file in the root directory of this source tree.
97
97
  */
98
- const Vt = [
98
+ const Dt = [
99
99
  ["line", { x1: "6", x2: "6", y1: "3", y2: "15", key: "17qcm7" }],
100
100
  ["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
101
101
  ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
102
102
  ["path", { d: "M18 9a9 9 0 0 1-9 9", key: "n2h4wq" }]
103
- ], Nt = G("git-branch", Vt);
103
+ ], Lt = b("git-branch", Dt);
104
104
  /**
105
105
  * @license lucide-react v0.563.0 - ISC
106
106
  *
107
107
  * This source code is licensed under the ISC license.
108
108
  * See the LICENSE file in the root directory of this source tree.
109
109
  */
110
- const Pt = [
110
+ const zt = [
111
111
  [
112
112
  "path",
113
113
  {
@@ -115,33 +115,33 @@ const Pt = [
115
115
  key: "1a8usu"
116
116
  }
117
117
  ]
118
- ], Et = G("pen", Pt);
118
+ ], Ht = b("pen", zt);
119
119
  /**
120
120
  * @license lucide-react v0.563.0 - ISC
121
121
  *
122
122
  * This source code is licensed under the ISC license.
123
123
  * See the LICENSE file in the root directory of this source tree.
124
124
  */
125
- const Dt = [
125
+ const At = [
126
126
  [
127
127
  "path",
128
128
  { d: "M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344", key: "2acyp4" }
129
129
  ],
130
130
  ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
131
- ], kt = G("square-check-big", Dt);
131
+ ], Gt = b("square-check-big", At);
132
132
  /**
133
133
  * @license lucide-react v0.563.0 - ISC
134
134
  *
135
135
  * This source code is licensed under the ISC license.
136
136
  * See the LICENSE file in the root directory of this source tree.
137
137
  */
138
- const Lt = [
138
+ const bt = [
139
139
  ["path", { d: "M10 11v6", key: "nco0om" }],
140
140
  ["path", { d: "M14 11v6", key: "outv1u" }],
141
141
  ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
142
142
  ["path", { d: "M3 6h18", key: "d0wm0j" }],
143
143
  ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
144
- ], Ht = G("trash-2", Lt), Be = {
144
+ ], Ot = b("trash-2", bt), Ke = {
145
145
  sessionId: null,
146
146
  status: "idle",
147
147
  step: "upload",
@@ -162,8 +162,269 @@ const Lt = [
162
162
  error: null,
163
163
  editingCell: null,
164
164
  editedRows: /* @__PURE__ */ new Set()
165
- }, J = ft((e, o) => ({
166
- ...Be,
165
+ };
166
+ function Tt(e, o) {
167
+ const t = [], n = (e == null ? void 0 : e.trim()) || "";
168
+ if (o.required && !n)
169
+ return t.push({
170
+ rowIndex: 0,
171
+ // will be set by caller
172
+ columnKey: o.key,
173
+ value: n,
174
+ severity: "error",
175
+ validatorType: "required",
176
+ message: `${o.label} is required`
177
+ }), t;
178
+ if (!n) return t;
179
+ switch (o.type) {
180
+ case "email":
181
+ /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n) || t.push({
182
+ rowIndex: 0,
183
+ columnKey: o.key,
184
+ value: n,
185
+ severity: "error",
186
+ validatorType: "type",
187
+ message: "Invalid email format"
188
+ });
189
+ break;
190
+ case "url":
191
+ /^https?:\/\/.+/.test(n) || t.push({
192
+ rowIndex: 0,
193
+ columnKey: o.key,
194
+ value: n,
195
+ severity: "error",
196
+ validatorType: "type",
197
+ message: "Invalid URL format"
198
+ });
199
+ break;
200
+ case "integer":
201
+ /^-?\d+$/.test(n) || t.push({
202
+ rowIndex: 0,
203
+ columnKey: o.key,
204
+ value: n,
205
+ severity: "error",
206
+ validatorType: "type",
207
+ message: "Must be a whole number"
208
+ });
209
+ break;
210
+ case "number":
211
+ case "float":
212
+ /^-?\d+(\.\d+)?$/.test(n) || t.push({
213
+ rowIndex: 0,
214
+ columnKey: o.key,
215
+ value: n,
216
+ severity: "error",
217
+ validatorType: "type",
218
+ message: "Must be a valid number"
219
+ });
220
+ break;
221
+ case "phone":
222
+ n.replace(/\D/g, "").length < 10 && t.push({
223
+ rowIndex: 0,
224
+ columnKey: o.key,
225
+ value: n,
226
+ severity: "warning",
227
+ validatorType: "type",
228
+ message: "Invalid phone number"
229
+ });
230
+ break;
231
+ }
232
+ if (o.validators)
233
+ for (const r of o.validators) {
234
+ const l = r.severity === "info" ? "warning" : r.severity || "error", i = r.params || {};
235
+ switch (r.type) {
236
+ case "minLength": {
237
+ const s = i.value ?? 0;
238
+ n.length < s && t.push({
239
+ rowIndex: 0,
240
+ columnKey: o.key,
241
+ value: n,
242
+ severity: l,
243
+ validatorType: r.type,
244
+ message: r.message || `Must be at least ${s} characters`
245
+ });
246
+ break;
247
+ }
248
+ case "maxLength": {
249
+ const s = i.value ?? 1 / 0;
250
+ n.length > s && t.push({
251
+ rowIndex: 0,
252
+ columnKey: o.key,
253
+ value: n,
254
+ severity: l,
255
+ validatorType: r.type,
256
+ message: r.message || `Must be at most ${s} characters`
257
+ });
258
+ break;
259
+ }
260
+ case "min": {
261
+ const s = parseFloat(n), u = i.value ?? -1 / 0;
262
+ !isNaN(s) && s < u && t.push({
263
+ rowIndex: 0,
264
+ columnKey: o.key,
265
+ value: n,
266
+ severity: l,
267
+ validatorType: r.type,
268
+ message: r.message || `Must be at least ${u}`
269
+ });
270
+ break;
271
+ }
272
+ case "max": {
273
+ const s = parseFloat(n), u = i.value ?? 1 / 0;
274
+ !isNaN(s) && s > u && t.push({
275
+ rowIndex: 0,
276
+ columnKey: o.key,
277
+ value: n,
278
+ severity: l,
279
+ validatorType: r.type,
280
+ message: r.message || `Must be at most ${u}`
281
+ });
282
+ break;
283
+ }
284
+ case "pattern": {
285
+ const s = i.regex ?? i.pattern ?? ".*";
286
+ new RegExp(s).test(n) || t.push({
287
+ rowIndex: 0,
288
+ columnKey: o.key,
289
+ value: n,
290
+ severity: l,
291
+ validatorType: r.type,
292
+ message: r.message || "Format is invalid"
293
+ });
294
+ break;
295
+ }
296
+ case "enum": {
297
+ const s = i.values || [];
298
+ s.map((f) => f.toLowerCase()).includes(n.toLowerCase()) || t.push({
299
+ rowIndex: 0,
300
+ columnKey: o.key,
301
+ value: n,
302
+ severity: l,
303
+ validatorType: r.type,
304
+ message: r.message || `Must be one of: ${s.slice(0, 5).join(", ")}${s.length > 5 ? "..." : ""}`
305
+ });
306
+ break;
307
+ }
308
+ case "custom": {
309
+ const s = i.validatorName;
310
+ if (s === "commaSeparatedEnum") {
311
+ const u = i.allowedValues || [], f = n.split(",").map((d) => d.trim().toLowerCase()).filter((d) => d), g = u.map((d) => d.toLowerCase()), p = f.filter((d) => !g.includes(d));
312
+ p.length > 0 && t.push({
313
+ rowIndex: 0,
314
+ columnKey: o.key,
315
+ value: n,
316
+ severity: l,
317
+ validatorType: r.type,
318
+ message: r.message || `Invalid values: ${p.join(", ")}. Must be comma-separated values from: ${u.slice(0, 5).join(", ")}${u.length > 5 ? "..." : ""}`
319
+ });
320
+ }
321
+ if (s === "commaSeparatedEmails") {
322
+ const f = n.split(",").map((g) => g.trim()).filter((g) => g).filter((g) => !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(g));
323
+ f.length > 0 && t.push({
324
+ rowIndex: 0,
325
+ columnKey: o.key,
326
+ value: n,
327
+ severity: l,
328
+ validatorType: r.type,
329
+ message: `Invalid email(s): ${f.join(", ")}`
330
+ });
331
+ }
332
+ break;
333
+ }
334
+ }
335
+ }
336
+ return t;
337
+ }
338
+ function pe(e, o, t) {
339
+ var C;
340
+ const n = [];
341
+ for (const h of e)
342
+ for (const S of t) {
343
+ if (!S.targetKey) continue;
344
+ const x = o.columns.find((V) => V.key === S.targetKey);
345
+ if (!x) continue;
346
+ const I = h.data[S.targetKey] || h.data[S.sourceColumn] || "", F = Tt(String(I), x);
347
+ for (const V of F)
348
+ n.push({ ...V, rowIndex: h.rowIndex });
349
+ }
350
+ const r = ((C = o.options) == null ? void 0 : C.uniqueKeys) || [];
351
+ for (const h of r) {
352
+ const S = t.find((I) => I.targetKey === h);
353
+ if (!S) continue;
354
+ const x = /* @__PURE__ */ new Map();
355
+ for (const I of e) {
356
+ const F = String(I.data[h] || I.data[S.sourceColumn] || "").toLowerCase().trim();
357
+ if (!F) continue;
358
+ const V = x.get(F) || [];
359
+ V.push(I.rowIndex), x.set(F, V);
360
+ }
361
+ for (const [I, F] of x.entries())
362
+ if (F.length > 1)
363
+ for (const V of F.slice(1))
364
+ n.push({
365
+ rowIndex: V,
366
+ columnKey: h,
367
+ value: I,
368
+ severity: "warning",
369
+ validatorType: "unique",
370
+ message: `Duplicate ${h} value`
371
+ });
372
+ }
373
+ const l = /* @__PURE__ */ new Map();
374
+ for (const h of n) {
375
+ const S = l.get(h.rowIndex) || [];
376
+ S.push(h), l.set(h.rowIndex, S);
377
+ }
378
+ const i = n.filter((h) => h.severity === "error").length, s = n.filter((h) => h.severity === "warning").length, u = n.filter((h) => h.severity === "info").length, f = new Set(n.filter((h) => h.severity === "error").map((h) => h.rowIndex)), g = e.length, p = g - f.size, d = {};
379
+ for (const h of n) {
380
+ d[h.columnKey] || (d[h.columnKey] = {
381
+ columnKey: h.columnKey,
382
+ errorCount: 0,
383
+ warningCount: 0,
384
+ infoCount: 0,
385
+ mostCommonError: void 0
386
+ });
387
+ const S = d[h.columnKey];
388
+ h.severity === "error" ? S.errorCount++ : h.severity === "warning" ? S.warningCount++ : S.infoCount++, S.mostCommonError || (S.mostCommonError = h.message);
389
+ }
390
+ const a = {};
391
+ for (const h of n)
392
+ a[h.validatorType] = (a[h.validatorType] || 0) + 1;
393
+ const m = [];
394
+ for (const h of r) {
395
+ const S = t.find((I) => I.targetKey === h);
396
+ if (!S) continue;
397
+ const x = /* @__PURE__ */ new Map();
398
+ for (const I of e) {
399
+ const F = String(I.data[h] || I.data[S.sourceColumn] || "").toLowerCase().trim();
400
+ if (!F) continue;
401
+ const V = x.get(F) || [];
402
+ V.push(I.rowIndex), x.set(F, V);
403
+ }
404
+ for (const [I, F] of x.entries())
405
+ F.length > 1 && m.push({ columnKey: h, value: I, rowIndices: F });
406
+ }
407
+ const v = {
408
+ byColumn: d,
409
+ byType: a,
410
+ duplicates: m.length > 0 ? m : void 0
411
+ };
412
+ return {
413
+ validationResults: {
414
+ isValid: i === 0,
415
+ totalRows: g,
416
+ validRows: p,
417
+ errorCount: i,
418
+ warningCount: s,
419
+ infoCount: u,
420
+ errors: n,
421
+ summary: v
422
+ },
423
+ errorsByRow: l
424
+ };
425
+ }
426
+ const Z = mt((e, o) => ({
427
+ ...Ke,
167
428
  setSchema: (t) => e({ schema: t }),
168
429
  setSessionId: (t) => e({ sessionId: t }),
169
430
  setFile: (t) => e({
@@ -194,6 +455,16 @@ const Lt = [
194
455
  }
195
456
  e({ validationResults: t, errorsByRow: n });
196
457
  },
458
+ revalidate: () => {
459
+ const t = o();
460
+ if (!t.schema || !t.validationResults) return;
461
+ const { validationResults: n, errorsByRow: r } = pe(
462
+ t.rows,
463
+ t.schema,
464
+ t.mappings
465
+ );
466
+ e({ validationResults: n, errorsByRow: r });
467
+ },
197
468
  setStep: (t) => e({ step: t }),
198
469
  nextStep: () => {
199
470
  const t = ["upload", "mapping", "validation", "review", "complete"], n = t.indexOf(o().step);
@@ -207,56 +478,57 @@ const Lt = [
207
478
  editingCell: { rowIndex: t, columnKey: n }
208
479
  }),
209
480
  stopEditing: () => e({ editingCell: null }),
210
- updateCell: (t, n, r) => e((l) => {
211
- const i = [...l.rows], s = i.find((f) => f.rowIndex === t);
481
+ updateCell: (t, n, r) => {
482
+ const l = o(), i = [...l.rows], s = i.find((f) => f.rowIndex === t);
212
483
  s && (s.data = { ...s.data, [n]: String(r) });
213
- const a = new Set(l.editedRows);
214
- return a.add(t), { rows: i, editedRows: a, editingCell: null };
215
- }),
216
- deleteRow: (t) => e((n) => {
217
- const l = n.rows.filter((a) => a.rowIndex !== t).map((a, f) => ({ ...a, rowIndex: f })), i = /* @__PURE__ */ new Map();
218
- n.errorsByRow.forEach((a, f) => {
219
- if (f !== t) {
220
- const p = f > t ? f - 1 : f;
221
- i.set(p, a.map((c) => ({ ...c, rowIndex: p })));
222
- }
223
- });
224
- const s = n.validationResults ? {
225
- ...n.validationResults,
226
- totalRows: n.validationResults.totalRows - 1,
227
- errors: n.validationResults.errors.filter((a) => a.rowIndex !== t).map((a) => ({ ...a, rowIndex: a.rowIndex > t ? a.rowIndex - 1 : a.rowIndex }))
228
- } : null;
229
- return {
484
+ const u = new Set(l.editedRows);
485
+ if (u.add(t), e({ rows: i, editedRows: u, editingCell: null }), l.schema && l.validationResults) {
486
+ const { validationResults: f, errorsByRow: g } = pe(
487
+ i,
488
+ l.schema,
489
+ l.mappings
490
+ );
491
+ e({ validationResults: f, errorsByRow: g });
492
+ }
493
+ },
494
+ deleteRow: (t) => {
495
+ const n = o(), l = n.rows.filter((i) => i.rowIndex !== t).map((i, s) => ({ ...i, rowIndex: s }));
496
+ if (e({
230
497
  rows: l,
231
- totalRows: l.length,
232
- errorsByRow: i,
233
- validationResults: s
234
- };
235
- }),
498
+ totalRows: l.length
499
+ }), n.schema && n.validationResults) {
500
+ const { validationResults: i, errorsByRow: s } = pe(
501
+ l,
502
+ n.schema,
503
+ n.mappings
504
+ );
505
+ e({ validationResults: i, errorsByRow: s });
506
+ }
507
+ },
236
508
  setStatus: (t) => e({ status: t }),
237
509
  setLoading: (t) => e({ isLoading: t }),
238
510
  setError: (t) => e({ error: t }),
239
- reset: () => e(Be)
240
- })), zt = ({
511
+ reset: () => e(Ke)
512
+ })), Bt = ({
241
513
  onFileSelect: e,
242
514
  maxSize: o = 50 * 1024 * 1024,
243
515
  // 50MB
244
516
  acceptedTypes: t = [".csv", ".xlsx", ".xls"]
245
517
  }) => {
246
- const { file: n, fileName: r, fileSize: l, setFile: i, error: s, setError: a, isLoading: f } = J(), p = Me(
247
- (w, R) => {
248
- if (R.length > 0) {
249
- a("Invalid file type or file too large");
518
+ const { file: n, fileName: r, fileSize: l, setFile: i, error: s, setError: u, isLoading: f } = Z(), g = Ne(
519
+ (C, h) => {
520
+ if (h.length > 0) {
521
+ u("Invalid file type or file too large");
250
522
  return;
251
523
  }
252
- if (w.length > 0) {
253
- const _ = w[0];
254
- i(_), e == null || e(_);
524
+ if (C.length > 0) {
525
+ const S = C[0];
526
+ i(S), e == null || e(S);
255
527
  }
256
528
  },
257
- [e, i, a]
258
- ), { getRootProps: c, getInputProps: d, isDragActive: u } = dt({
259
- onDrop: p,
529
+ [e, i, u]
530
+ ), { getRootProps: p, getInputProps: d, isDragActive: a } = ht({
531
+ onDrop: g,
260
532
  accept: {
261
533
  "text/csv": [".csv"],
262
534
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": [".xlsx"],
@@ -265,45 +537,45 @@ const Lt = [
265
537
  maxSize: o,
266
538
  multiple: !1,
267
539
  disabled: f
268
- }), m = (w) => w < 1024 ? `${w} B` : w < 1024 * 1024 ? `${(w / 1024).toFixed(1)} KB` : `${(w / (1024 * 1024)).toFixed(1)} MB`, h = (w) => {
269
- w.stopPropagation(), J.getState().reset();
540
+ }), m = (C) => C < 1024 ? `${C} B` : C < 1024 * 1024 ? `${(C / 1024).toFixed(1)} KB` : `${(C / (1024 * 1024)).toFixed(1)} MB`, v = (C) => {
541
+ C.stopPropagation(), Z.getState().reset();
270
542
  };
271
- return n ? /* @__PURE__ */ g("div", { className: "ff-p-4 ff-rounded-xl ff-border", style: { backgroundColor: "var(--ff-success-light)", borderColor: "var(--ff-success)" }, children: /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-3", children: [
272
- /* @__PURE__ */ g("div", { className: "ff-p-2 ff-rounded-lg", style: { backgroundColor: "rgba(41, 142, 51, 0.15)" }, children: /* @__PURE__ */ g(It, { className: "ff-w-6 ff-h-6", style: { color: "var(--ff-success)" } }) }),
273
- /* @__PURE__ */ v("div", { className: "ff-flex-1 ff-min-w-0", children: [
274
- /* @__PURE__ */ g("p", { className: "ff-font-medium ff-truncate", style: { color: "var(--ff-success-dark)" }, children: r }),
275
- /* @__PURE__ */ g("p", { className: "ff-text-sm", style: { color: "var(--ff-success)" }, children: m(l || 0) })
543
+ return n ? /* @__PURE__ */ c("div", { className: "ff-p-4 ff-rounded-xl ff-border", style: { backgroundColor: "var(--ff-success-light)", borderColor: "var(--ff-success)" }, children: /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-3", children: [
544
+ /* @__PURE__ */ c("div", { className: "ff-p-2 ff-rounded-lg", style: { backgroundColor: "rgba(41, 142, 51, 0.15)" }, children: /* @__PURE__ */ c(Et, { className: "ff-w-6 ff-h-6", style: { color: "var(--ff-success)" } }) }),
545
+ /* @__PURE__ */ w("div", { className: "ff-flex-1 ff-min-w-0", children: [
546
+ /* @__PURE__ */ c("p", { className: "ff-font-medium ff-truncate", style: { color: "var(--ff-success-dark)" }, children: r }),
547
+ /* @__PURE__ */ c("p", { className: "ff-text-sm", style: { color: "var(--ff-success)" }, children: m(l || 0) })
276
548
  ] }),
277
- /* @__PURE__ */ g(
549
+ /* @__PURE__ */ c(
278
550
  "button",
279
551
  {
280
- onClick: h,
552
+ onClick: v,
281
553
  className: "ff-p-1.5 ff-rounded-full ff-transition-colors",
282
554
  style: { color: "var(--ff-success)" },
283
555
  "aria-label": "Remove file",
284
- children: /* @__PURE__ */ g(se, { className: "ff-w-5 ff-h-5" })
556
+ children: /* @__PURE__ */ c(ae, { className: "ff-w-5 ff-h-5" })
285
557
  }
286
558
  )
287
- ] }) }) : /* @__PURE__ */ v("div", { className: "ff-space-y-6", children: [
288
- /* @__PURE__ */ v(
559
+ ] }) }) : /* @__PURE__ */ w("div", { className: "ff-space-y-6", children: [
560
+ /* @__PURE__ */ w(
289
561
  "div",
290
562
  {
291
- ...c(),
292
- className: j(
563
+ ...p(),
564
+ className: U(
293
565
  "ff-dropzone",
294
- u && "ff-dropzone-active",
566
+ a && "ff-dropzone-active",
295
567
  f && "ff-opacity-50 ff-cursor-not-allowed"
296
568
  ),
297
569
  children: [
298
- /* @__PURE__ */ g("input", { ...d() }),
299
- /* @__PURE__ */ g("div", { className: "ff-dropzone-icon-wrapper", children: /* @__PURE__ */ g(Xe, { className: "ff-dropzone-icon" }) }),
300
- /* @__PURE__ */ g("h3", { className: "ff-dropzone-text", children: u ? "Drop your file here" : "Upload your file" }),
301
- /* @__PURE__ */ g("p", { className: "ff-dropzone-hint", children: "Drag and drop or click to select" }),
302
- /* @__PURE__ */ g("label", { className: "ff-inline-block", children: /* @__PURE__ */ g("span", { className: j(
570
+ /* @__PURE__ */ c("input", { ...d() }),
571
+ /* @__PURE__ */ c("div", { className: "ff-dropzone-icon-wrapper", children: /* @__PURE__ */ c(Qe, { className: "ff-dropzone-icon" }) }),
572
+ /* @__PURE__ */ c("h3", { className: "ff-dropzone-text", children: a ? "Drop your file here" : "Upload your file" }),
573
+ /* @__PURE__ */ c("p", { className: "ff-dropzone-hint", children: "Drag and drop or click to select" }),
574
+ /* @__PURE__ */ c("label", { className: "ff-inline-block", children: /* @__PURE__ */ c("span", { className: U(
303
575
  "ff-btn ff-btn-primary",
304
576
  f && "ff-opacity-50 ff-cursor-wait"
305
577
  ), children: f ? "Processing..." : "Choose file" }) }),
306
- /* @__PURE__ */ v("p", { className: "ff-dropzone-formats", children: [
578
+ /* @__PURE__ */ w("p", { className: "ff-dropzone-formats", children: [
307
579
  "Supports ",
308
580
  t.join(", "),
309
581
  " up to ",
@@ -312,66 +584,66 @@ const Lt = [
312
584
  ]
313
585
  }
314
586
  ),
315
- s && /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-2 ff-p-4 ff-rounded-lg ff-text-sm", style: { backgroundColor: "var(--ff-error-light)", color: "var(--ff-error)" }, children: [
316
- /* @__PURE__ */ g(Ie, { className: "ff-w-4 ff-h-4 ff-flex-shrink-0" }),
317
- /* @__PURE__ */ g("p", { children: s })
587
+ s && /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-2 ff-p-4 ff-rounded-lg ff-text-sm", style: { backgroundColor: "var(--ff-error-light)", color: "var(--ff-error)" }, children: [
588
+ /* @__PURE__ */ c(Pe, { className: "ff-w-4 ff-h-4 ff-flex-shrink-0" }),
589
+ /* @__PURE__ */ c("p", { children: s })
318
590
  ] })
319
591
  ] });
320
- }, At = ({ onMappingChange: e }) => {
321
- const { mappings: o, schema: t, unmappedSource: n, updateMapping: r } = J(), l = (t == null ? void 0 : t.columns) || [], i = (c, d) => {
322
- const u = d === "" ? null : d;
323
- r(c, u), e == null || e(c, u);
324
- }, s = (c) => c >= 0.85 ? "var(--ff-success)" : c >= 0.6 ? "var(--ff-warning)" : "var(--ff-error)", a = (c) => c >= 0.85 ? "High" : c >= 0.6 ? "Medium" : "Low", p = new Set(
325
- o.filter((c) => c.targetKey !== null).map((c) => c.targetKey)
592
+ }, Kt = ({ onMappingChange: e }) => {
593
+ const { mappings: o, schema: t, unmappedSource: n, updateMapping: r } = Z(), l = (t == null ? void 0 : t.columns) || [], i = (p, d) => {
594
+ const a = d === "" ? null : d;
595
+ r(p, a), e == null || e(p, a);
596
+ }, s = (p) => p >= 0.85 ? "var(--ff-success)" : p >= 0.6 ? "var(--ff-warning)" : "var(--ff-error)", u = (p) => p >= 0.85 ? "High" : p >= 0.6 ? "Medium" : "Low", g = new Set(
597
+ o.filter((p) => p.targetKey !== null).map((p) => p.targetKey)
326
598
  );
327
- return /* @__PURE__ */ v("div", { className: "ff-space-y-4", children: [
328
- /* @__PURE__ */ v("div", { className: "ff-mapping-header", children: [
329
- /* @__PURE__ */ v("div", { children: [
330
- /* @__PURE__ */ g("h3", { className: "ff-mapping-title", children: "Column Mapping" }),
331
- /* @__PURE__ */ g("p", { className: "ff-mapping-subtitle", children: "Match your file columns to the expected fields" })
599
+ return /* @__PURE__ */ w("div", { className: "ff-space-y-4", children: [
600
+ /* @__PURE__ */ w("div", { className: "ff-mapping-header", children: [
601
+ /* @__PURE__ */ w("div", { children: [
602
+ /* @__PURE__ */ c("h3", { className: "ff-mapping-title", children: "Column Mapping" }),
603
+ /* @__PURE__ */ c("p", { className: "ff-mapping-subtitle", children: "Match your file columns to the expected fields" })
332
604
  ] }),
333
- /* @__PURE__ */ v("div", { className: "ff-mapping-legend", children: [
334
- /* @__PURE__ */ v("span", { className: "ff-mapping-legend-item", children: [
335
- /* @__PURE__ */ g("span", { className: "ff-mapping-legend-dot", style: { backgroundColor: "var(--ff-success)" } }),
336
- /* @__PURE__ */ g("span", { style: { color: "var(--ff-text-secondary)" }, children: "Mapped" })
605
+ /* @__PURE__ */ w("div", { className: "ff-mapping-legend", children: [
606
+ /* @__PURE__ */ w("span", { className: "ff-mapping-legend-item", children: [
607
+ /* @__PURE__ */ c("span", { className: "ff-mapping-legend-dot", style: { backgroundColor: "var(--ff-success)" } }),
608
+ /* @__PURE__ */ c("span", { style: { color: "var(--ff-text-secondary)" }, children: "Mapped" })
337
609
  ] }),
338
- /* @__PURE__ */ v("span", { className: "ff-mapping-legend-item", children: [
339
- /* @__PURE__ */ g("span", { className: "ff-mapping-legend-dot", style: { backgroundColor: "var(--ff-warning)" } }),
340
- /* @__PURE__ */ g("span", { style: { color: "var(--ff-text-secondary)" }, children: "Review" })
610
+ /* @__PURE__ */ w("span", { className: "ff-mapping-legend-item", children: [
611
+ /* @__PURE__ */ c("span", { className: "ff-mapping-legend-dot", style: { backgroundColor: "var(--ff-warning)" } }),
612
+ /* @__PURE__ */ c("span", { style: { color: "var(--ff-text-secondary)" }, children: "Review" })
341
613
  ] }),
342
- /* @__PURE__ */ v("span", { className: "ff-mapping-legend-item", children: [
343
- /* @__PURE__ */ g("span", { className: "ff-mapping-legend-dot", style: { backgroundColor: "var(--ff-gray-70)" } }),
344
- /* @__PURE__ */ g("span", { style: { color: "var(--ff-text-secondary)" }, children: "Unmapped" })
614
+ /* @__PURE__ */ w("span", { className: "ff-mapping-legend-item", children: [
615
+ /* @__PURE__ */ c("span", { className: "ff-mapping-legend-dot", style: { backgroundColor: "var(--ff-gray-70)" } }),
616
+ /* @__PURE__ */ c("span", { style: { color: "var(--ff-text-secondary)" }, children: "Unmapped" })
345
617
  ] })
346
618
  ] })
347
619
  ] }),
348
- /* @__PURE__ */ g("div", { className: "ff-space-y-2", children: o.map((c) => {
349
- l.find((m) => m.key === c.targetKey);
350
- const d = c.targetKey !== null, u = c.confidence >= 0.85;
351
- return /* @__PURE__ */ v(
620
+ /* @__PURE__ */ c("div", { className: "ff-space-y-2", children: o.map((p) => {
621
+ l.find((m) => m.key === p.targetKey);
622
+ const d = p.targetKey !== null, a = p.confidence >= 0.85;
623
+ return /* @__PURE__ */ w(
352
624
  "div",
353
625
  {
354
- className: j(
626
+ className: U(
355
627
  "ff-mapping-row",
356
- d && u && "ff-mapping-row-success",
357
- d && !u && "ff-mapping-row-warning"
628
+ d && a && "ff-mapping-row-success",
629
+ d && !a && "ff-mapping-row-warning"
358
630
  ),
359
631
  children: [
360
- /* @__PURE__ */ g("div", { className: "ff-flex-1", children: /* @__PURE__ */ g("div", { className: "ff-mapping-source", children: c.sourceColumn }) }),
361
- /* @__PURE__ */ g("div", { className: "ff-mapping-arrow", children: /* @__PURE__ */ g(ht, { className: "ff-w-5 ff-h-5" }) }),
362
- /* @__PURE__ */ g("div", { className: "ff-flex-1 ff-mapping-target", children: /* @__PURE__ */ v(
632
+ /* @__PURE__ */ c("div", { className: "ff-flex-1", children: /* @__PURE__ */ c("div", { className: "ff-mapping-source", children: p.sourceColumn }) }),
633
+ /* @__PURE__ */ c("div", { className: "ff-mapping-arrow", children: /* @__PURE__ */ c(yt, { className: "ff-w-5 ff-h-5" }) }),
634
+ /* @__PURE__ */ c("div", { className: "ff-flex-1 ff-mapping-target", children: /* @__PURE__ */ w(
363
635
  "select",
364
636
  {
365
- value: c.targetKey || "",
366
- onChange: (m) => i(c.sourceColumn, m.target.value),
637
+ value: p.targetKey || "",
638
+ onChange: (m) => i(p.sourceColumn, m.target.value),
367
639
  className: "ff-input",
368
640
  children: [
369
- /* @__PURE__ */ g("option", { value: "", children: "-- Do not import --" }),
370
- l.map((m) => /* @__PURE__ */ v(
641
+ /* @__PURE__ */ c("option", { value: "", children: "-- Do not import --" }),
642
+ l.map((m) => /* @__PURE__ */ w(
371
643
  "option",
372
644
  {
373
645
  value: m.key,
374
- disabled: p.has(m.key) && c.targetKey !== m.key,
646
+ disabled: g.has(m.key) && p.targetKey !== m.key,
375
647
  children: [
376
648
  m.label,
377
649
  " (",
@@ -385,32 +657,32 @@ const Lt = [
385
657
  ]
386
658
  }
387
659
  ) }),
388
- /* @__PURE__ */ g("div", { className: "ff-mapping-status", children: d ? u ? /* @__PURE__ */ g(wt, { className: "ff-w-5 ff-h-5", style: { color: "var(--ff-success)" } }) : /* @__PURE__ */ g(yt, { className: "ff-w-5 ff-h-5", style: { color: "var(--ff-warning)" } }) : /* @__PURE__ */ g("span", { className: "ff-w-5 ff-h-5" }) }),
389
- c.confidence > 0 && /* @__PURE__ */ v("div", { className: "ff-confidence", style: { color: s(c.confidence) }, children: [
390
- /* @__PURE__ */ v("span", { children: [
391
- Math.round(c.confidence * 100),
660
+ /* @__PURE__ */ c("div", { className: "ff-mapping-status", children: d ? a ? /* @__PURE__ */ c(xt, { className: "ff-w-5 ff-h-5", style: { color: "var(--ff-success)" } }) : /* @__PURE__ */ c(It, { className: "ff-w-5 ff-h-5", style: { color: "var(--ff-warning)" } }) : /* @__PURE__ */ c("span", { className: "ff-w-5 ff-h-5" }) }),
661
+ p.confidence > 0 && /* @__PURE__ */ w("div", { className: "ff-confidence", style: { color: s(p.confidence) }, children: [
662
+ /* @__PURE__ */ w("span", { children: [
663
+ Math.round(p.confidence * 100),
392
664
  "%"
393
665
  ] }),
394
- /* @__PURE__ */ v("span", { style: { color: "var(--ff-text-muted)" }, children: [
666
+ /* @__PURE__ */ w("span", { style: { color: "var(--ff-text-muted)" }, children: [
395
667
  "(",
396
- a(c.confidence),
668
+ u(p.confidence),
397
669
  ")"
398
670
  ] })
399
671
  ] })
400
672
  ]
401
673
  },
402
- c.sourceColumn
674
+ p.sourceColumn
403
675
  );
404
676
  }) }),
405
677
  (() => {
406
- const c = l.filter(
407
- (d) => d.required && !p.has(d.key)
678
+ const p = l.filter(
679
+ (d) => d.required && !g.has(d.key)
408
680
  );
409
- return c.length > 0 ? /* @__PURE__ */ v("div", { className: "ff-flex ff-items-start ff-gap-2 ff-p-4 ff-rounded-lg", style: { backgroundColor: "var(--ff-warning-light)", borderColor: "var(--ff-warning)" }, children: [
410
- /* @__PURE__ */ g(Ie, { className: "ff-w-5 ff-h-5 ff-flex-shrink-0 ff-mt-0.5", style: { color: "var(--ff-warning)" } }),
411
- /* @__PURE__ */ v("div", { children: [
412
- /* @__PURE__ */ g("p", { className: "ff-text-sm ff-font-medium", style: { color: "var(--ff-warning-dark)" }, children: "Required fields not mapped" }),
413
- /* @__PURE__ */ g("p", { className: "ff-text-sm ff-mt-1", style: { color: "var(--ff-warning)" }, children: c.map((d) => d.label).join(", ") })
681
+ return p.length > 0 ? /* @__PURE__ */ w("div", { className: "ff-flex ff-items-start ff-gap-2 ff-p-4 ff-rounded-lg", style: { backgroundColor: "var(--ff-warning-light)", borderColor: "var(--ff-warning)" }, children: [
682
+ /* @__PURE__ */ c(Pe, { className: "ff-w-5 ff-h-5 ff-flex-shrink-0 ff-mt-0.5", style: { color: "var(--ff-warning)" } }),
683
+ /* @__PURE__ */ w("div", { children: [
684
+ /* @__PURE__ */ c("p", { className: "ff-text-sm ff-font-medium", style: { color: "var(--ff-warning-dark)" }, children: "Required fields not mapped" }),
685
+ /* @__PURE__ */ c("p", { className: "ff-text-sm ff-mt-1", style: { color: "var(--ff-warning)" }, children: p.map((d) => d.label).join(", ") })
414
686
  ] })
415
687
  ] }) : null;
416
688
  })()
@@ -426,7 +698,7 @@ const Lt = [
426
698
  *
427
699
  * @license MIT
428
700
  */
429
- function Gt() {
701
+ function qt() {
430
702
  return {
431
703
  accessor: (e, o) => typeof e == "function" ? {
432
704
  ...o,
@@ -439,24 +711,24 @@ function Gt() {
439
711
  group: (e) => e
440
712
  };
441
713
  }
442
- function q(e, o) {
714
+ function j(e, o) {
443
715
  return typeof e == "function" ? e(o) : e;
444
716
  }
445
717
  function L(e, o) {
446
718
  return (t) => {
447
719
  o.setState((n) => ({
448
720
  ...n,
449
- [e]: q(t, n[e])
721
+ [e]: j(t, n[e])
450
722
  }));
451
723
  };
452
724
  }
453
- function ae(e) {
725
+ function ue(e) {
454
726
  return e instanceof Function;
455
727
  }
456
- function Ot(e) {
728
+ function jt(e) {
457
729
  return Array.isArray(e) && e.every((o) => typeof o == "number");
458
730
  }
459
- function bt(e, o) {
731
+ function Ut(e, o) {
460
732
  const t = [], n = (r) => {
461
733
  r.forEach((l) => {
462
734
  t.push(l);
@@ -466,23 +738,23 @@ function bt(e, o) {
466
738
  };
467
739
  return n(e), t;
468
740
  }
469
- function C(e, o, t) {
741
+ function y(e, o, t) {
470
742
  let n = [], r;
471
743
  return (l) => {
472
744
  let i;
473
745
  t.key && t.debug && (i = Date.now());
474
746
  const s = e(l);
475
- if (!(s.length !== n.length || s.some((p, c) => n[c] !== p)))
747
+ if (!(s.length !== n.length || s.some((g, p) => n[p] !== g)))
476
748
  return r;
477
749
  n = s;
478
750
  let f;
479
751
  if (t.key && t.debug && (f = Date.now()), r = o(...s), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
480
- const p = Math.round((Date.now() - i) * 100) / 100, c = Math.round((Date.now() - f) * 100) / 100, d = c / 16, u = (m, h) => {
481
- for (m = String(m); m.length < h; )
752
+ const g = Math.round((Date.now() - i) * 100) / 100, p = Math.round((Date.now() - f) * 100) / 100, d = p / 16, a = (m, v) => {
753
+ for (m = String(m); m.length < v; )
482
754
  m = " " + m;
483
755
  return m;
484
756
  };
485
- console.info(`%c⏱ ${u(c, 5)} /${u(p, 5)} ms`, `
757
+ console.info(`%c⏱ ${a(p, 5)} /${a(g, 5)} ms`, `
486
758
  font-size: .6rem;
487
759
  font-weight: bold;
488
760
  color: hsl(${Math.max(0, Math.min(120 - 120 * d, 120))}deg 100% 31%);`, t == null ? void 0 : t.key);
@@ -490,7 +762,7 @@ function C(e, o, t) {
490
762
  return r;
491
763
  };
492
764
  }
493
- function S(e, o, t, n) {
765
+ function R(e, o, t, n) {
494
766
  return {
495
767
  debug: () => {
496
768
  var r;
@@ -500,7 +772,7 @@ function S(e, o, t, n) {
500
772
  onChange: n
501
773
  };
502
774
  }
503
- function Bt(e, o, t, n) {
775
+ function Xt(e, o, t, n) {
504
776
  const r = () => {
505
777
  var i;
506
778
  return (i = l.getValue()) != null ? i : e.options.renderFallbackValue;
@@ -510,61 +782,61 @@ function Bt(e, o, t, n) {
510
782
  column: t,
511
783
  getValue: () => o.getValue(n),
512
784
  renderValue: r,
513
- getContext: C(() => [e, t, o, l], (i, s, a, f) => ({
785
+ getContext: y(() => [e, t, o, l], (i, s, u, f) => ({
514
786
  table: i,
515
787
  column: s,
516
- row: a,
788
+ row: u,
517
789
  cell: f,
518
790
  getValue: f.getValue,
519
791
  renderValue: f.renderValue
520
- }), S(e.options, "debugCells", "cell.getContext"))
792
+ }), R(e.options, "debugCells", "cell.getContext"))
521
793
  };
522
794
  return e._features.forEach((i) => {
523
795
  i.createCell == null || i.createCell(l, t, o, e);
524
796
  }, {}), l;
525
797
  }
526
- function Tt(e, o, t, n) {
798
+ function Wt(e, o, t, n) {
527
799
  var r, l;
528
800
  const s = {
529
801
  ...e._getDefaultColumnDef(),
530
802
  ...o
531
- }, a = s.accessorKey;
532
- let f = (r = (l = s.id) != null ? l : a ? typeof String.prototype.replaceAll == "function" ? a.replaceAll(".", "_") : a.replace(/\./g, "_") : void 0) != null ? r : typeof s.header == "string" ? s.header : void 0, p;
533
- if (s.accessorFn ? p = s.accessorFn : a && (a.includes(".") ? p = (d) => {
534
- let u = d;
535
- for (const h of a.split(".")) {
803
+ }, u = s.accessorKey;
804
+ let f = (r = (l = s.id) != null ? l : u ? typeof String.prototype.replaceAll == "function" ? u.replaceAll(".", "_") : u.replace(/\./g, "_") : void 0) != null ? r : typeof s.header == "string" ? s.header : void 0, g;
805
+ if (s.accessorFn ? g = s.accessorFn : u && (u.includes(".") ? g = (d) => {
806
+ let a = d;
807
+ for (const v of u.split(".")) {
536
808
  var m;
537
- u = (m = u) == null ? void 0 : m[h], process.env.NODE_ENV !== "production" && u === void 0 && console.warn(`"${h}" in deeply nested key "${a}" returned undefined.`);
809
+ a = (m = a) == null ? void 0 : m[v], process.env.NODE_ENV !== "production" && a === void 0 && console.warn(`"${v}" in deeply nested key "${u}" returned undefined.`);
538
810
  }
539
- return u;
540
- } : p = (d) => d[s.accessorKey]), !f)
811
+ return a;
812
+ } : g = (d) => d[s.accessorKey]), !f)
541
813
  throw process.env.NODE_ENV !== "production" ? new Error(s.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
542
- let c = {
814
+ let p = {
543
815
  id: `${String(f)}`,
544
- accessorFn: p,
816
+ accessorFn: g,
545
817
  parent: n,
546
818
  depth: t,
547
819
  columnDef: s,
548
820
  columns: [],
549
- getFlatColumns: C(() => [!0], () => {
821
+ getFlatColumns: y(() => [!0], () => {
550
822
  var d;
551
- return [c, ...(d = c.columns) == null ? void 0 : d.flatMap((u) => u.getFlatColumns())];
552
- }, S(e.options, "debugColumns", "column.getFlatColumns")),
553
- getLeafColumns: C(() => [e._getOrderColumnsFn()], (d) => {
554
- var u;
555
- if ((u = c.columns) != null && u.length) {
556
- let m = c.columns.flatMap((h) => h.getLeafColumns());
823
+ return [p, ...(d = p.columns) == null ? void 0 : d.flatMap((a) => a.getFlatColumns())];
824
+ }, R(e.options, "debugColumns", "column.getFlatColumns")),
825
+ getLeafColumns: y(() => [e._getOrderColumnsFn()], (d) => {
826
+ var a;
827
+ if ((a = p.columns) != null && a.length) {
828
+ let m = p.columns.flatMap((v) => v.getLeafColumns());
557
829
  return d(m);
558
830
  }
559
- return [c];
560
- }, S(e.options, "debugColumns", "column.getLeafColumns"))
831
+ return [p];
832
+ }, R(e.options, "debugColumns", "column.getLeafColumns"))
561
833
  };
562
834
  for (const d of e._features)
563
- d.createColumn == null || d.createColumn(c, e);
564
- return c;
835
+ d.createColumn == null || d.createColumn(p, e);
836
+ return p;
565
837
  }
566
- const P = "debugHeaders";
567
- function Te(e, o, t) {
838
+ const E = "debugHeaders";
839
+ function qe(e, o, t) {
568
840
  var n;
569
841
  let l = {
570
842
  id: (n = t.id) != null ? n : o.id,
@@ -578,8 +850,8 @@ function Te(e, o, t) {
578
850
  rowSpan: 0,
579
851
  headerGroup: null,
580
852
  getLeafHeaders: () => {
581
- const i = [], s = (a) => {
582
- a.subHeaders && a.subHeaders.length && a.subHeaders.map(s), i.push(a);
853
+ const i = [], s = (u) => {
854
+ u.subHeaders && u.subHeaders.length && u.subHeaders.map(s), i.push(u);
583
855
  };
584
856
  return s(l), i;
585
857
  },
@@ -593,92 +865,92 @@ function Te(e, o, t) {
593
865
  i.createHeader == null || i.createHeader(l, e);
594
866
  }), l;
595
867
  }
596
- const qt = {
868
+ const Qt = {
597
869
  createTable: (e) => {
598
- e.getHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => {
870
+ e.getHeaderGroups = y(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => {
599
871
  var l, i;
600
- const s = (l = n == null ? void 0 : n.map((c) => t.find((d) => d.id === c)).filter(Boolean)) != null ? l : [], a = (i = r == null ? void 0 : r.map((c) => t.find((d) => d.id === c)).filter(Boolean)) != null ? i : [], f = t.filter((c) => !(n != null && n.includes(c.id)) && !(r != null && r.includes(c.id)));
601
- return re(o, [...s, ...f, ...a], e);
602
- }, S(e.options, P, "getHeaderGroups")), e.getCenterHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => (t = t.filter((l) => !(n != null && n.includes(l.id)) && !(r != null && r.includes(l.id))), re(o, t, e, "center")), S(e.options, P, "getCenterHeaderGroups")), e.getLeftHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (o, t, n) => {
872
+ const s = (l = n == null ? void 0 : n.map((p) => t.find((d) => d.id === p)).filter(Boolean)) != null ? l : [], u = (i = r == null ? void 0 : r.map((p) => t.find((d) => d.id === p)).filter(Boolean)) != null ? i : [], f = t.filter((p) => !(n != null && n.includes(p.id)) && !(r != null && r.includes(p.id)));
873
+ return le(o, [...s, ...f, ...u], e);
874
+ }, R(e.options, E, "getHeaderGroups")), e.getCenterHeaderGroups = y(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => (t = t.filter((l) => !(n != null && n.includes(l.id)) && !(r != null && r.includes(l.id))), le(o, t, e, "center")), R(e.options, E, "getCenterHeaderGroups")), e.getLeftHeaderGroups = y(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (o, t, n) => {
603
875
  var r;
604
876
  const l = (r = n == null ? void 0 : n.map((i) => t.find((s) => s.id === i)).filter(Boolean)) != null ? r : [];
605
- return re(o, l, e, "left");
606
- }, S(e.options, P, "getLeftHeaderGroups")), e.getRightHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (o, t, n) => {
877
+ return le(o, l, e, "left");
878
+ }, R(e.options, E, "getLeftHeaderGroups")), e.getRightHeaderGroups = y(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (o, t, n) => {
607
879
  var r;
608
880
  const l = (r = n == null ? void 0 : n.map((i) => t.find((s) => s.id === i)).filter(Boolean)) != null ? r : [];
609
- return re(o, l, e, "right");
610
- }, S(e.options, P, "getRightHeaderGroups")), e.getFooterGroups = C(() => [e.getHeaderGroups()], (o) => [...o].reverse(), S(e.options, P, "getFooterGroups")), e.getLeftFooterGroups = C(() => [e.getLeftHeaderGroups()], (o) => [...o].reverse(), S(e.options, P, "getLeftFooterGroups")), e.getCenterFooterGroups = C(() => [e.getCenterHeaderGroups()], (o) => [...o].reverse(), S(e.options, P, "getCenterFooterGroups")), e.getRightFooterGroups = C(() => [e.getRightHeaderGroups()], (o) => [...o].reverse(), S(e.options, P, "getRightFooterGroups")), e.getFlatHeaders = C(() => [e.getHeaderGroups()], (o) => o.map((t) => t.headers).flat(), S(e.options, P, "getFlatHeaders")), e.getLeftFlatHeaders = C(() => [e.getLeftHeaderGroups()], (o) => o.map((t) => t.headers).flat(), S(e.options, P, "getLeftFlatHeaders")), e.getCenterFlatHeaders = C(() => [e.getCenterHeaderGroups()], (o) => o.map((t) => t.headers).flat(), S(e.options, P, "getCenterFlatHeaders")), e.getRightFlatHeaders = C(() => [e.getRightHeaderGroups()], (o) => o.map((t) => t.headers).flat(), S(e.options, P, "getRightFlatHeaders")), e.getCenterLeafHeaders = C(() => [e.getCenterFlatHeaders()], (o) => o.filter((t) => {
881
+ return le(o, l, e, "right");
882
+ }, R(e.options, E, "getRightHeaderGroups")), e.getFooterGroups = y(() => [e.getHeaderGroups()], (o) => [...o].reverse(), R(e.options, E, "getFooterGroups")), e.getLeftFooterGroups = y(() => [e.getLeftHeaderGroups()], (o) => [...o].reverse(), R(e.options, E, "getLeftFooterGroups")), e.getCenterFooterGroups = y(() => [e.getCenterHeaderGroups()], (o) => [...o].reverse(), R(e.options, E, "getCenterFooterGroups")), e.getRightFooterGroups = y(() => [e.getRightHeaderGroups()], (o) => [...o].reverse(), R(e.options, E, "getRightFooterGroups")), e.getFlatHeaders = y(() => [e.getHeaderGroups()], (o) => o.map((t) => t.headers).flat(), R(e.options, E, "getFlatHeaders")), e.getLeftFlatHeaders = y(() => [e.getLeftHeaderGroups()], (o) => o.map((t) => t.headers).flat(), R(e.options, E, "getLeftFlatHeaders")), e.getCenterFlatHeaders = y(() => [e.getCenterHeaderGroups()], (o) => o.map((t) => t.headers).flat(), R(e.options, E, "getCenterFlatHeaders")), e.getRightFlatHeaders = y(() => [e.getRightHeaderGroups()], (o) => o.map((t) => t.headers).flat(), R(e.options, E, "getRightFlatHeaders")), e.getCenterLeafHeaders = y(() => [e.getCenterFlatHeaders()], (o) => o.filter((t) => {
611
883
  var n;
612
884
  return !((n = t.subHeaders) != null && n.length);
613
- }), S(e.options, P, "getCenterLeafHeaders")), e.getLeftLeafHeaders = C(() => [e.getLeftFlatHeaders()], (o) => o.filter((t) => {
885
+ }), R(e.options, E, "getCenterLeafHeaders")), e.getLeftLeafHeaders = y(() => [e.getLeftFlatHeaders()], (o) => o.filter((t) => {
614
886
  var n;
615
887
  return !((n = t.subHeaders) != null && n.length);
616
- }), S(e.options, P, "getLeftLeafHeaders")), e.getRightLeafHeaders = C(() => [e.getRightFlatHeaders()], (o) => o.filter((t) => {
888
+ }), R(e.options, E, "getLeftLeafHeaders")), e.getRightLeafHeaders = y(() => [e.getRightFlatHeaders()], (o) => o.filter((t) => {
617
889
  var n;
618
890
  return !((n = t.subHeaders) != null && n.length);
619
- }), S(e.options, P, "getRightLeafHeaders")), e.getLeafHeaders = C(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (o, t, n) => {
620
- var r, l, i, s, a, f;
621
- return [...(r = (l = o[0]) == null ? void 0 : l.headers) != null ? r : [], ...(i = (s = t[0]) == null ? void 0 : s.headers) != null ? i : [], ...(a = (f = n[0]) == null ? void 0 : f.headers) != null ? a : []].map((p) => p.getLeafHeaders()).flat();
622
- }, S(e.options, P, "getLeafHeaders"));
891
+ }), R(e.options, E, "getRightLeafHeaders")), e.getLeafHeaders = y(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (o, t, n) => {
892
+ var r, l, i, s, u, f;
893
+ return [...(r = (l = o[0]) == null ? void 0 : l.headers) != null ? r : [], ...(i = (s = t[0]) == null ? void 0 : s.headers) != null ? i : [], ...(u = (f = n[0]) == null ? void 0 : f.headers) != null ? u : []].map((g) => g.getLeafHeaders()).flat();
894
+ }, R(e.options, E, "getLeafHeaders"));
623
895
  }
624
896
  };
625
- function re(e, o, t, n) {
897
+ function le(e, o, t, n) {
626
898
  var r, l;
627
899
  let i = 0;
628
- const s = function(d, u) {
629
- u === void 0 && (u = 1), i = Math.max(i, u), d.filter((m) => m.getIsVisible()).forEach((m) => {
630
- var h;
631
- (h = m.columns) != null && h.length && s(m.columns, u + 1);
900
+ const s = function(d, a) {
901
+ a === void 0 && (a = 1), i = Math.max(i, a), d.filter((m) => m.getIsVisible()).forEach((m) => {
902
+ var v;
903
+ (v = m.columns) != null && v.length && s(m.columns, a + 1);
632
904
  }, 0);
633
905
  };
634
906
  s(e);
635
- let a = [];
636
- const f = (d, u) => {
907
+ let u = [];
908
+ const f = (d, a) => {
637
909
  const m = {
638
- depth: u,
639
- id: [n, `${u}`].filter(Boolean).join("_"),
910
+ depth: a,
911
+ id: [n, `${a}`].filter(Boolean).join("_"),
640
912
  headers: []
641
- }, h = [];
642
- d.forEach((w) => {
643
- const R = [...h].reverse()[0], _ = w.column.depth === m.depth;
644
- let $, E = !1;
645
- if (_ && w.column.parent ? $ = w.column.parent : ($ = w.column, E = !0), R && (R == null ? void 0 : R.column) === $)
646
- R.subHeaders.push(w);
913
+ }, v = [];
914
+ d.forEach((C) => {
915
+ const h = [...v].reverse()[0], S = C.column.depth === m.depth;
916
+ let x, I = !1;
917
+ if (S && C.column.parent ? x = C.column.parent : (x = C.column, I = !0), h && (h == null ? void 0 : h.column) === x)
918
+ h.subHeaders.push(C);
647
919
  else {
648
- const I = Te(t, $, {
649
- id: [n, u, $.id, w == null ? void 0 : w.id].filter(Boolean).join("_"),
650
- isPlaceholder: E,
651
- placeholderId: E ? `${h.filter((D) => D.column === $).length}` : void 0,
652
- depth: u,
653
- index: h.length
920
+ const F = qe(t, x, {
921
+ id: [n, a, x.id, C == null ? void 0 : C.id].filter(Boolean).join("_"),
922
+ isPlaceholder: I,
923
+ placeholderId: I ? `${v.filter((V) => V.column === x).length}` : void 0,
924
+ depth: a,
925
+ index: v.length
654
926
  });
655
- I.subHeaders.push(w), h.push(I);
927
+ F.subHeaders.push(C), v.push(F);
656
928
  }
657
- m.headers.push(w), w.headerGroup = m;
658
- }), a.push(m), u > 0 && f(h, u - 1);
659
- }, p = o.map((d, u) => Te(t, d, {
929
+ m.headers.push(C), C.headerGroup = m;
930
+ }), u.push(m), a > 0 && f(v, a - 1);
931
+ }, g = o.map((d, a) => qe(t, d, {
660
932
  depth: i,
661
- index: u
933
+ index: a
662
934
  }));
663
- f(p, i - 1), a.reverse();
664
- const c = (d) => d.filter((m) => m.column.getIsVisible()).map((m) => {
665
- let h = 0, w = 0, R = [0];
666
- m.subHeaders && m.subHeaders.length ? (R = [], c(m.subHeaders).forEach(($) => {
935
+ f(g, i - 1), u.reverse();
936
+ const p = (d) => d.filter((m) => m.column.getIsVisible()).map((m) => {
937
+ let v = 0, C = 0, h = [0];
938
+ m.subHeaders && m.subHeaders.length ? (h = [], p(m.subHeaders).forEach((x) => {
667
939
  let {
668
- colSpan: E,
669
- rowSpan: I
670
- } = $;
671
- h += E, R.push(I);
672
- })) : h = 1;
673
- const _ = Math.min(...R);
674
- return w = w + _, m.colSpan = h, m.rowSpan = w, {
675
- colSpan: h,
676
- rowSpan: w
940
+ colSpan: I,
941
+ rowSpan: F
942
+ } = x;
943
+ v += I, h.push(F);
944
+ })) : v = 1;
945
+ const S = Math.min(...h);
946
+ return C = C + S, m.colSpan = v, m.rowSpan = C, {
947
+ colSpan: v,
948
+ rowSpan: C
677
949
  };
678
950
  });
679
- return c((r = (l = a[0]) == null ? void 0 : l.headers) != null ? r : []), a;
951
+ return p((r = (l = u[0]) == null ? void 0 : l.headers) != null ? r : []), u;
680
952
  }
681
- const Ne = (e, o, t, n, r, l, i) => {
953
+ const Ee = (e, o, t, n, r, l, i) => {
682
954
  let s = {
683
955
  id: o,
684
956
  index: n,
@@ -687,92 +959,92 @@ const Ne = (e, o, t, n, r, l, i) => {
687
959
  parentId: i,
688
960
  _valuesCache: {},
689
961
  _uniqueValuesCache: {},
690
- getValue: (a) => {
691
- if (s._valuesCache.hasOwnProperty(a))
692
- return s._valuesCache[a];
693
- const f = e.getColumn(a);
962
+ getValue: (u) => {
963
+ if (s._valuesCache.hasOwnProperty(u))
964
+ return s._valuesCache[u];
965
+ const f = e.getColumn(u);
694
966
  if (f != null && f.accessorFn)
695
- return s._valuesCache[a] = f.accessorFn(s.original, n), s._valuesCache[a];
967
+ return s._valuesCache[u] = f.accessorFn(s.original, n), s._valuesCache[u];
696
968
  },
697
- getUniqueValues: (a) => {
698
- if (s._uniqueValuesCache.hasOwnProperty(a))
699
- return s._uniqueValuesCache[a];
700
- const f = e.getColumn(a);
969
+ getUniqueValues: (u) => {
970
+ if (s._uniqueValuesCache.hasOwnProperty(u))
971
+ return s._uniqueValuesCache[u];
972
+ const f = e.getColumn(u);
701
973
  if (f != null && f.accessorFn)
702
- return f.columnDef.getUniqueValues ? (s._uniqueValuesCache[a] = f.columnDef.getUniqueValues(s.original, n), s._uniqueValuesCache[a]) : (s._uniqueValuesCache[a] = [s.getValue(a)], s._uniqueValuesCache[a]);
974
+ return f.columnDef.getUniqueValues ? (s._uniqueValuesCache[u] = f.columnDef.getUniqueValues(s.original, n), s._uniqueValuesCache[u]) : (s._uniqueValuesCache[u] = [s.getValue(u)], s._uniqueValuesCache[u]);
703
975
  },
704
- renderValue: (a) => {
976
+ renderValue: (u) => {
705
977
  var f;
706
- return (f = s.getValue(a)) != null ? f : e.options.renderFallbackValue;
978
+ return (f = s.getValue(u)) != null ? f : e.options.renderFallbackValue;
707
979
  },
708
980
  subRows: [],
709
- getLeafRows: () => bt(s.subRows, (a) => a.subRows),
981
+ getLeafRows: () => Ut(s.subRows, (u) => u.subRows),
710
982
  getParentRow: () => s.parentId ? e.getRow(s.parentId, !0) : void 0,
711
983
  getParentRows: () => {
712
- let a = [], f = s;
984
+ let u = [], f = s;
713
985
  for (; ; ) {
714
- const p = f.getParentRow();
715
- if (!p) break;
716
- a.push(p), f = p;
986
+ const g = f.getParentRow();
987
+ if (!g) break;
988
+ u.push(g), f = g;
717
989
  }
718
- return a.reverse();
990
+ return u.reverse();
719
991
  },
720
- getAllCells: C(() => [e.getAllLeafColumns()], (a) => a.map((f) => Bt(e, s, f, f.id)), S(e.options, "debugRows", "getAllCells")),
721
- _getAllCellsByColumnId: C(() => [s.getAllCells()], (a) => a.reduce((f, p) => (f[p.column.id] = p, f), {}), S(e.options, "debugRows", "getAllCellsByColumnId"))
992
+ getAllCells: y(() => [e.getAllLeafColumns()], (u) => u.map((f) => Xt(e, s, f, f.id)), R(e.options, "debugRows", "getAllCells")),
993
+ _getAllCellsByColumnId: y(() => [s.getAllCells()], (u) => u.reduce((f, g) => (f[g.column.id] = g, f), {}), R(e.options, "debugRows", "getAllCellsByColumnId"))
722
994
  };
723
- for (let a = 0; a < e._features.length; a++) {
724
- const f = e._features[a];
995
+ for (let u = 0; u < e._features.length; u++) {
996
+ const f = e._features[u];
725
997
  f == null || f.createRow == null || f.createRow(s, e);
726
998
  }
727
999
  return s;
728
- }, jt = {
1000
+ }, Yt = {
729
1001
  createColumn: (e, o) => {
730
1002
  e._getFacetedRowModel = o.options.getFacetedRowModel && o.options.getFacetedRowModel(o, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : o.getPreFilteredRowModel(), e._getFacetedUniqueValues = o.options.getFacetedUniqueValues && o.options.getFacetedUniqueValues(o, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = o.options.getFacetedMinMaxValues && o.options.getFacetedMinMaxValues(o, e.id), e.getFacetedMinMaxValues = () => {
731
1003
  if (e._getFacetedMinMaxValues)
732
1004
  return e._getFacetedMinMaxValues();
733
1005
  };
734
1006
  }
735
- }, We = (e, o, t) => {
1007
+ }, Ye = (e, o, t) => {
736
1008
  var n, r;
737
1009
  const l = t == null || (n = t.toString()) == null ? void 0 : n.toLowerCase();
738
1010
  return !!(!((r = e.getValue(o)) == null || (r = r.toString()) == null || (r = r.toLowerCase()) == null) && r.includes(l));
739
1011
  };
740
- We.autoRemove = (e) => A(e);
741
- const Qe = (e, o, t) => {
1012
+ Ye.autoRemove = (e) => G(e);
1013
+ const Je = (e, o, t) => {
742
1014
  var n;
743
1015
  return !!(!((n = e.getValue(o)) == null || (n = n.toString()) == null) && n.includes(t));
744
1016
  };
745
- Qe.autoRemove = (e) => A(e);
746
- const Ye = (e, o, t) => {
1017
+ Je.autoRemove = (e) => G(e);
1018
+ const Ze = (e, o, t) => {
747
1019
  var n;
748
1020
  return ((n = e.getValue(o)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === (t == null ? void 0 : t.toLowerCase());
749
1021
  };
750
- Ye.autoRemove = (e) => A(e);
751
- const Je = (e, o, t) => {
1022
+ Ze.autoRemove = (e) => G(e);
1023
+ const et = (e, o, t) => {
752
1024
  var n;
753
1025
  return (n = e.getValue(o)) == null ? void 0 : n.includes(t);
754
1026
  };
755
- Je.autoRemove = (e) => A(e);
756
- const Ze = (e, o, t) => !t.some((n) => {
1027
+ et.autoRemove = (e) => G(e);
1028
+ const tt = (e, o, t) => !t.some((n) => {
757
1029
  var r;
758
1030
  return !((r = e.getValue(o)) != null && r.includes(n));
759
1031
  });
760
- Ze.autoRemove = (e) => A(e) || !(e != null && e.length);
761
- const et = (e, o, t) => t.some((n) => {
1032
+ tt.autoRemove = (e) => G(e) || !(e != null && e.length);
1033
+ const nt = (e, o, t) => t.some((n) => {
762
1034
  var r;
763
1035
  return (r = e.getValue(o)) == null ? void 0 : r.includes(n);
764
1036
  });
765
- et.autoRemove = (e) => A(e) || !(e != null && e.length);
766
- const tt = (e, o, t) => e.getValue(o) === t;
767
- tt.autoRemove = (e) => A(e);
768
- const nt = (e, o, t) => e.getValue(o) == t;
769
- nt.autoRemove = (e) => A(e);
770
- const Pe = (e, o, t) => {
1037
+ nt.autoRemove = (e) => G(e) || !(e != null && e.length);
1038
+ const ot = (e, o, t) => e.getValue(o) === t;
1039
+ ot.autoRemove = (e) => G(e);
1040
+ const rt = (e, o, t) => e.getValue(o) == t;
1041
+ rt.autoRemove = (e) => G(e);
1042
+ const De = (e, o, t) => {
771
1043
  let [n, r] = t;
772
1044
  const l = e.getValue(o);
773
1045
  return l >= n && l <= r;
774
1046
  };
775
- Pe.resolveFilterValue = (e) => {
1047
+ De.resolveFilterValue = (e) => {
776
1048
  let [o, t] = e, n = typeof o != "number" ? parseFloat(o) : o, r = typeof t != "number" ? parseFloat(t) : t, l = o === null || Number.isNaN(n) ? -1 / 0 : n, i = t === null || Number.isNaN(r) ? 1 / 0 : r;
777
1049
  if (l > i) {
778
1050
  const s = l;
@@ -780,22 +1052,22 @@ Pe.resolveFilterValue = (e) => {
780
1052
  }
781
1053
  return [l, i];
782
1054
  };
783
- Pe.autoRemove = (e) => A(e) || A(e[0]) && A(e[1]);
1055
+ De.autoRemove = (e) => G(e) || G(e[0]) && G(e[1]);
784
1056
  const B = {
785
- includesString: We,
786
- includesStringSensitive: Qe,
787
- equalsString: Ye,
788
- arrIncludes: Je,
789
- arrIncludesAll: Ze,
790
- arrIncludesSome: et,
791
- equals: tt,
792
- weakEquals: nt,
793
- inNumberRange: Pe
1057
+ includesString: Ye,
1058
+ includesStringSensitive: Je,
1059
+ equalsString: Ze,
1060
+ arrIncludes: et,
1061
+ arrIncludesAll: tt,
1062
+ arrIncludesSome: nt,
1063
+ equals: ot,
1064
+ weakEquals: rt,
1065
+ inNumberRange: De
794
1066
  };
795
- function A(e) {
1067
+ function G(e) {
796
1068
  return e == null || e === "";
797
1069
  }
798
- const Ut = {
1070
+ const Jt = {
799
1071
  getDefaultColumnDef: () => ({
800
1072
  filterFn: "auto"
801
1073
  }),
@@ -814,7 +1086,7 @@ const Ut = {
814
1086
  return typeof n == "string" ? B.includesString : typeof n == "number" ? B.inNumberRange : typeof n == "boolean" || n !== null && typeof n == "object" ? B.equals : Array.isArray(n) ? B.arrIncludes : B.weakEquals;
815
1087
  }, e.getFilterFn = () => {
816
1088
  var t, n;
817
- return ae(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
1089
+ return ue(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
818
1090
  // @ts-ignore
819
1091
  (t = (n = o.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t : B[e.columnDef.filterFn]
820
1092
  );
@@ -829,20 +1101,20 @@ const Ut = {
829
1101
  return (t = (n = o.getState().columnFilters) == null ? void 0 : n.findIndex((r) => r.id === e.id)) != null ? t : -1;
830
1102
  }, e.setFilterValue = (t) => {
831
1103
  o.setColumnFilters((n) => {
832
- const r = e.getFilterFn(), l = n == null ? void 0 : n.find((p) => p.id === e.id), i = q(t, l ? l.value : void 0);
833
- if (qe(r, i, e)) {
1104
+ const r = e.getFilterFn(), l = n == null ? void 0 : n.find((g) => g.id === e.id), i = j(t, l ? l.value : void 0);
1105
+ if (je(r, i, e)) {
834
1106
  var s;
835
- return (s = n == null ? void 0 : n.filter((p) => p.id !== e.id)) != null ? s : [];
1107
+ return (s = n == null ? void 0 : n.filter((g) => g.id !== e.id)) != null ? s : [];
836
1108
  }
837
- const a = {
1109
+ const u = {
838
1110
  id: e.id,
839
1111
  value: i
840
1112
  };
841
1113
  if (l) {
842
1114
  var f;
843
- return (f = n == null ? void 0 : n.map((p) => p.id === e.id ? a : p)) != null ? f : [];
1115
+ return (f = n == null ? void 0 : n.map((g) => g.id === e.id ? u : g)) != null ? f : [];
844
1116
  }
845
- return n != null && n.length ? [...n, a] : [a];
1117
+ return n != null && n.length ? [...n, u] : [u];
846
1118
  });
847
1119
  };
848
1120
  },
@@ -853,11 +1125,11 @@ const Ut = {
853
1125
  e.setColumnFilters = (o) => {
854
1126
  const t = e.getAllLeafColumns(), n = (r) => {
855
1127
  var l;
856
- return (l = q(o, r)) == null ? void 0 : l.filter((i) => {
857
- const s = t.find((a) => a.id === i.id);
1128
+ return (l = j(o, r)) == null ? void 0 : l.filter((i) => {
1129
+ const s = t.find((u) => u.id === i.id);
858
1130
  if (s) {
859
- const a = s.getFilterFn();
860
- if (qe(a, i.value, s))
1131
+ const u = s.getFilterFn();
1132
+ if (je(u, i.value, s))
861
1133
  return !1;
862
1134
  }
863
1135
  return !0;
@@ -870,57 +1142,57 @@ const Ut = {
870
1142
  }, 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());
871
1143
  }
872
1144
  };
873
- function qe(e, o, t) {
1145
+ function je(e, o, t) {
874
1146
  return (e && e.autoRemove ? e.autoRemove(o, t) : !1) || typeof o > "u" || typeof o == "string" && !o;
875
1147
  }
876
- const Kt = (e, o, t) => t.reduce((n, r) => {
1148
+ const Zt = (e, o, t) => t.reduce((n, r) => {
877
1149
  const l = r.getValue(e);
878
1150
  return n + (typeof l == "number" ? l : 0);
879
- }, 0), Xt = (e, o, t) => {
1151
+ }, 0), en = (e, o, t) => {
880
1152
  let n;
881
1153
  return t.forEach((r) => {
882
1154
  const l = r.getValue(e);
883
1155
  l != null && (n > l || n === void 0 && l >= l) && (n = l);
884
1156
  }), n;
885
- }, Wt = (e, o, t) => {
1157
+ }, tn = (e, o, t) => {
886
1158
  let n;
887
1159
  return t.forEach((r) => {
888
1160
  const l = r.getValue(e);
889
1161
  l != null && (n < l || n === void 0 && l >= l) && (n = l);
890
1162
  }), n;
891
- }, Qt = (e, o, t) => {
1163
+ }, nn = (e, o, t) => {
892
1164
  let n, r;
893
1165
  return t.forEach((l) => {
894
1166
  const i = l.getValue(e);
895
1167
  i != null && (n === void 0 ? i >= i && (n = r = i) : (n > i && (n = i), r < i && (r = i)));
896
1168
  }), [n, r];
897
- }, Yt = (e, o) => {
1169
+ }, on = (e, o) => {
898
1170
  let t = 0, n = 0;
899
1171
  if (o.forEach((r) => {
900
1172
  let l = r.getValue(e);
901
1173
  l != null && (l = +l) >= l && (++t, n += l);
902
1174
  }), t) return n / t;
903
- }, Jt = (e, o) => {
1175
+ }, rn = (e, o) => {
904
1176
  if (!o.length)
905
1177
  return;
906
1178
  const t = o.map((l) => l.getValue(e));
907
- if (!Ot(t))
1179
+ if (!jt(t))
908
1180
  return;
909
1181
  if (t.length === 1)
910
1182
  return t[0];
911
1183
  const n = Math.floor(t.length / 2), r = t.sort((l, i) => l - i);
912
1184
  return t.length % 2 !== 0 ? r[n] : (r[n - 1] + r[n]) / 2;
913
- }, Zt = (e, o) => Array.from(new Set(o.map((t) => t.getValue(e))).values()), en = (e, o) => new Set(o.map((t) => t.getValue(e))).size, tn = (e, o) => o.length, ge = {
914
- sum: Kt,
915
- min: Xt,
916
- max: Wt,
917
- extent: Qt,
918
- mean: Yt,
919
- median: Jt,
920
- unique: Zt,
921
- uniqueCount: en,
922
- count: tn
923
- }, nn = {
1185
+ }, ln = (e, o) => Array.from(new Set(o.map((t) => t.getValue(e))).values()), sn = (e, o) => new Set(o.map((t) => t.getValue(e))).size, an = (e, o) => o.length, me = {
1186
+ sum: Zt,
1187
+ min: en,
1188
+ max: tn,
1189
+ extent: nn,
1190
+ mean: on,
1191
+ median: rn,
1192
+ unique: ln,
1193
+ uniqueCount: sn,
1194
+ count: an
1195
+ }, un = {
924
1196
  getDefaultColumnDef: () => ({
925
1197
  aggregatedCell: (e) => {
926
1198
  var o, t;
@@ -956,14 +1228,14 @@ const Kt = (e, o, t) => t.reduce((n, r) => {
956
1228
  }, e.getAutoAggregationFn = () => {
957
1229
  const t = o.getCoreRowModel().flatRows[0], n = t == null ? void 0 : t.getValue(e.id);
958
1230
  if (typeof n == "number")
959
- return ge.sum;
1231
+ return me.sum;
960
1232
  if (Object.prototype.toString.call(n) === "[object Date]")
961
- return ge.extent;
1233
+ return me.extent;
962
1234
  }, e.getAggregationFn = () => {
963
1235
  var t, n;
964
1236
  if (!e)
965
1237
  throw new Error();
966
- return ae(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (t = (n = o.options.aggregationFns) == null ? void 0 : n[e.columnDef.aggregationFn]) != null ? t : ge[e.columnDef.aggregationFn];
1238
+ return ue(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (t = (n = o.options.aggregationFns) == null ? void 0 : n[e.columnDef.aggregationFn]) != null ? t : me[e.columnDef.aggregationFn];
967
1239
  };
968
1240
  },
969
1241
  createTable: (e) => {
@@ -987,13 +1259,13 @@ const Kt = (e, o, t) => t.reduce((n, r) => {
987
1259
  };
988
1260
  }
989
1261
  };
990
- function on(e, o, t) {
1262
+ function fn(e, o, t) {
991
1263
  if (!(o != null && o.length) || !t)
992
1264
  return e;
993
1265
  const n = e.filter((l) => !o.includes(l.id));
994
1266
  return t === "remove" ? n : [...o.map((l) => e.find((i) => i.id === l)).filter(Boolean), ...n];
995
1267
  }
996
- const rn = {
1268
+ const dn = {
997
1269
  getInitialState: (e) => ({
998
1270
  columnOrder: [],
999
1271
  ...e
@@ -1002,12 +1274,12 @@ const rn = {
1002
1274
  onColumnOrderChange: L("columnOrder", e)
1003
1275
  }),
1004
1276
  createColumn: (e, o) => {
1005
- e.getIndex = C((t) => [ne(o, t)], (t) => t.findIndex((n) => n.id === e.id), S(o.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
1277
+ e.getIndex = y((t) => [oe(o, t)], (t) => t.findIndex((n) => n.id === e.id), R(o.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
1006
1278
  var n;
1007
- return ((n = ne(o, t)[0]) == null ? void 0 : n.id) === e.id;
1279
+ return ((n = oe(o, t)[0]) == null ? void 0 : n.id) === e.id;
1008
1280
  }, e.getIsLastColumn = (t) => {
1009
1281
  var n;
1010
- const r = ne(o, t);
1282
+ const r = oe(o, t);
1011
1283
  return ((n = r[r.length - 1]) == null ? void 0 : n.id) === e.id;
1012
1284
  };
1013
1285
  },
@@ -1015,27 +1287,27 @@ const rn = {
1015
1287
  e.setColumnOrder = (o) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(o), e.resetColumnOrder = (o) => {
1016
1288
  var t;
1017
1289
  e.setColumnOrder(o ? [] : (t = e.initialState.columnOrder) != null ? t : []);
1018
- }, e._getOrderColumnsFn = C(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (o, t, n) => (r) => {
1290
+ }, e._getOrderColumnsFn = y(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (o, t, n) => (r) => {
1019
1291
  let l = [];
1020
1292
  if (!(o != null && o.length))
1021
1293
  l = r;
1022
1294
  else {
1023
1295
  const i = [...o], s = [...r];
1024
1296
  for (; s.length && i.length; ) {
1025
- const a = i.shift(), f = s.findIndex((p) => p.id === a);
1297
+ const u = i.shift(), f = s.findIndex((g) => g.id === u);
1026
1298
  f > -1 && l.push(s.splice(f, 1)[0]);
1027
1299
  }
1028
1300
  l = [...l, ...s];
1029
1301
  }
1030
- return on(l, t, n);
1031
- }, S(e.options, "debugTable", "_getOrderColumnsFn"));
1302
+ return fn(l, t, n);
1303
+ }, R(e.options, "debugTable", "_getOrderColumnsFn"));
1032
1304
  }
1033
- }, ce = () => ({
1305
+ }, he = () => ({
1034
1306
  left: [],
1035
1307
  right: []
1036
- }), ln = {
1308
+ }), cn = {
1037
1309
  getInitialState: (e) => ({
1038
- columnPinning: ce(),
1310
+ columnPinning: he(),
1039
1311
  ...e
1040
1312
  }),
1041
1313
  getDefaultOptions: (e) => ({
@@ -1047,22 +1319,22 @@ const rn = {
1047
1319
  o.setColumnPinning((r) => {
1048
1320
  var l, i;
1049
1321
  if (t === "right") {
1050
- var s, a;
1322
+ var s, u;
1051
1323
  return {
1052
- left: ((s = r == null ? void 0 : r.left) != null ? s : []).filter((c) => !(n != null && n.includes(c))),
1053
- right: [...((a = r == null ? void 0 : r.right) != null ? a : []).filter((c) => !(n != null && n.includes(c))), ...n]
1324
+ left: ((s = r == null ? void 0 : r.left) != null ? s : []).filter((p) => !(n != null && n.includes(p))),
1325
+ right: [...((u = r == null ? void 0 : r.right) != null ? u : []).filter((p) => !(n != null && n.includes(p))), ...n]
1054
1326
  };
1055
1327
  }
1056
1328
  if (t === "left") {
1057
- var f, p;
1329
+ var f, g;
1058
1330
  return {
1059
- left: [...((f = r == null ? void 0 : r.left) != null ? f : []).filter((c) => !(n != null && n.includes(c))), ...n],
1060
- right: ((p = r == null ? void 0 : r.right) != null ? p : []).filter((c) => !(n != null && n.includes(c)))
1331
+ left: [...((f = r == null ? void 0 : r.left) != null ? f : []).filter((p) => !(n != null && n.includes(p))), ...n],
1332
+ right: ((g = r == null ? void 0 : r.right) != null ? g : []).filter((p) => !(n != null && n.includes(p)))
1061
1333
  };
1062
1334
  }
1063
1335
  return {
1064
- left: ((l = r == null ? void 0 : r.left) != null ? l : []).filter((c) => !(n != null && n.includes(c))),
1065
- right: ((i = r == null ? void 0 : r.right) != null ? i : []).filter((c) => !(n != null && n.includes(c)))
1336
+ left: ((l = r == null ? void 0 : r.left) != null ? l : []).filter((p) => !(n != null && n.includes(p))),
1337
+ right: ((i = r == null ? void 0 : r.right) != null ? i : []).filter((p) => !(n != null && n.includes(p)))
1066
1338
  };
1067
1339
  });
1068
1340
  }, e.getCanPin = () => e.getLeafColumns().some((n) => {
@@ -1081,21 +1353,21 @@ const rn = {
1081
1353
  };
1082
1354
  },
1083
1355
  createRow: (e, o) => {
1084
- e.getCenterVisibleCells = C(() => [e._getAllVisibleCells(), o.getState().columnPinning.left, o.getState().columnPinning.right], (t, n, r) => {
1356
+ e.getCenterVisibleCells = y(() => [e._getAllVisibleCells(), o.getState().columnPinning.left, o.getState().columnPinning.right], (t, n, r) => {
1085
1357
  const l = [...n ?? [], ...r ?? []];
1086
1358
  return t.filter((i) => !l.includes(i.column.id));
1087
- }, S(o.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = C(() => [e._getAllVisibleCells(), o.getState().columnPinning.left], (t, n) => (n ?? []).map((l) => t.find((i) => i.column.id === l)).filter(Boolean).map((l) => ({
1359
+ }, R(o.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = y(() => [e._getAllVisibleCells(), o.getState().columnPinning.left], (t, n) => (n ?? []).map((l) => t.find((i) => i.column.id === l)).filter(Boolean).map((l) => ({
1088
1360
  ...l,
1089
1361
  position: "left"
1090
- })), S(o.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = C(() => [e._getAllVisibleCells(), o.getState().columnPinning.right], (t, n) => (n ?? []).map((l) => t.find((i) => i.column.id === l)).filter(Boolean).map((l) => ({
1362
+ })), R(o.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = y(() => [e._getAllVisibleCells(), o.getState().columnPinning.right], (t, n) => (n ?? []).map((l) => t.find((i) => i.column.id === l)).filter(Boolean).map((l) => ({
1091
1363
  ...l,
1092
1364
  position: "right"
1093
- })), S(o.options, "debugRows", "getRightVisibleCells"));
1365
+ })), R(o.options, "debugRows", "getRightVisibleCells"));
1094
1366
  },
1095
1367
  createTable: (e) => {
1096
1368
  e.setColumnPinning = (o) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(o), e.resetColumnPinning = (o) => {
1097
1369
  var t, n;
1098
- return e.setColumnPinning(o ? ce() : (t = (n = e.initialState) == null ? void 0 : n.columnPinning) != null ? t : ce());
1370
+ return e.setColumnPinning(o ? he() : (t = (n = e.initialState) == null ? void 0 : n.columnPinning) != null ? t : he());
1099
1371
  }, e.getIsSomeColumnsPinned = (o) => {
1100
1372
  var t;
1101
1373
  const n = e.getState().columnPinning;
@@ -1104,31 +1376,31 @@ const rn = {
1104
1376
  return !!((r = n.left) != null && r.length || (l = n.right) != null && l.length);
1105
1377
  }
1106
1378
  return !!((t = n[o]) != null && t.length);
1107
- }, e.getLeftLeafColumns = C(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (o, t) => (t ?? []).map((n) => o.find((r) => r.id === n)).filter(Boolean), S(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = C(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (o, t) => (t ?? []).map((n) => o.find((r) => r.id === n)).filter(Boolean), S(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = C(() => [e.getAllLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n) => {
1379
+ }, e.getLeftLeafColumns = y(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (o, t) => (t ?? []).map((n) => o.find((r) => r.id === n)).filter(Boolean), R(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = y(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (o, t) => (t ?? []).map((n) => o.find((r) => r.id === n)).filter(Boolean), R(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = y(() => [e.getAllLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n) => {
1108
1380
  const r = [...t ?? [], ...n ?? []];
1109
1381
  return o.filter((l) => !r.includes(l.id));
1110
- }, S(e.options, "debugColumns", "getCenterLeafColumns"));
1382
+ }, R(e.options, "debugColumns", "getCenterLeafColumns"));
1111
1383
  }
1112
1384
  };
1113
- function sn(e) {
1385
+ function gn(e) {
1114
1386
  return e || (typeof document < "u" ? document : null);
1115
1387
  }
1116
- const le = {
1388
+ const ie = {
1117
1389
  size: 150,
1118
1390
  minSize: 20,
1119
1391
  maxSize: Number.MAX_SAFE_INTEGER
1120
- }, pe = () => ({
1392
+ }, ve = () => ({
1121
1393
  startOffset: null,
1122
1394
  startSize: null,
1123
1395
  deltaOffset: null,
1124
1396
  deltaPercentage: null,
1125
1397
  isResizingColumn: !1,
1126
1398
  columnSizingStart: []
1127
- }), an = {
1128
- getDefaultColumnDef: () => le,
1399
+ }), pn = {
1400
+ getDefaultColumnDef: () => ie,
1129
1401
  getInitialState: (e) => ({
1130
1402
  columnSizing: {},
1131
- columnSizingInfo: pe(),
1403
+ columnSizingInfo: ve(),
1132
1404
  ...e
1133
1405
  }),
1134
1406
  getDefaultOptions: (e) => ({
@@ -1141,8 +1413,8 @@ const le = {
1141
1413
  e.getSize = () => {
1142
1414
  var t, n, r;
1143
1415
  const l = o.getState().columnSizing[e.id];
1144
- return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : le.minSize, (n = l ?? e.columnDef.size) != null ? n : le.size), (r = e.columnDef.maxSize) != null ? r : le.maxSize);
1145
- }, e.getStart = C((t) => [t, ne(o, t), o.getState().columnSizing], (t, n) => n.slice(0, e.getIndex(t)).reduce((r, l) => r + l.getSize(), 0), S(o.options, "debugColumns", "getStart")), e.getAfter = C((t) => [t, ne(o, t), o.getState().columnSizing], (t, n) => n.slice(e.getIndex(t) + 1).reduce((r, l) => r + l.getSize(), 0), S(o.options, "debugColumns", "getAfter")), e.resetSize = () => {
1416
+ return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : ie.minSize, (n = l ?? e.columnDef.size) != null ? n : ie.size), (r = e.columnDef.maxSize) != null ? r : ie.maxSize);
1417
+ }, e.getStart = y((t) => [t, oe(o, t), o.getState().columnSizing], (t, n) => n.slice(0, e.getIndex(t)).reduce((r, l) => r + l.getSize(), 0), R(o.options, "debugColumns", "getStart")), e.getAfter = y((t) => [t, oe(o, t), o.getState().columnSizing], (t, n) => n.slice(e.getIndex(t) + 1).reduce((r, l) => r + l.getSize(), 0), R(o.options, "debugColumns", "getAfter")), e.resetSize = () => {
1146
1418
  o.setColumnSizing((t) => {
1147
1419
  let {
1148
1420
  [e.id]: n,
@@ -1176,27 +1448,27 @@ const le = {
1176
1448
  }, e.getResizeHandler = (t) => {
1177
1449
  const n = o.getColumn(e.column.id), r = n == null ? void 0 : n.getCanResize();
1178
1450
  return (l) => {
1179
- if (!n || !r || (l.persist == null || l.persist(), me(l) && l.touches && l.touches.length > 1))
1451
+ if (!n || !r || (l.persist == null || l.persist(), we(l) && l.touches && l.touches.length > 1))
1180
1452
  return;
1181
- const i = e.getSize(), s = e ? e.getLeafHeaders().map((R) => [R.column.id, R.column.getSize()]) : [[n.id, n.getSize()]], a = me(l) ? Math.round(l.touches[0].clientX) : l.clientX, f = {}, p = (R, _) => {
1182
- typeof _ == "number" && (o.setColumnSizingInfo(($) => {
1183
- var E, I;
1184
- const D = o.options.columnResizeDirection === "rtl" ? -1 : 1, K = (_ - ((E = $ == null ? void 0 : $.startOffset) != null ? E : 0)) * D, N = Math.max(K / ((I = $ == null ? void 0 : $.startSize) != null ? I : 0), -0.999999);
1185
- return $.columnSizingStart.forEach((z) => {
1186
- let [T, O] = z;
1187
- f[T] = Math.round(Math.max(O + O * N, 0) * 100) / 100;
1453
+ const i = e.getSize(), s = e ? e.getLeafHeaders().map((h) => [h.column.id, h.column.getSize()]) : [[n.id, n.getSize()]], u = we(l) ? Math.round(l.touches[0].clientX) : l.clientX, f = {}, g = (h, S) => {
1454
+ typeof S == "number" && (o.setColumnSizingInfo((x) => {
1455
+ var I, F;
1456
+ const V = o.options.columnResizeDirection === "rtl" ? -1 : 1, W = (S - ((I = x == null ? void 0 : x.startOffset) != null ? I : 0)) * V, k = Math.max(W / ((F = x == null ? void 0 : x.startSize) != null ? F : 0), -0.999999);
1457
+ return x.columnSizingStart.forEach((H) => {
1458
+ let [K, O] = H;
1459
+ f[K] = Math.round(Math.max(O + O * k, 0) * 100) / 100;
1188
1460
  }), {
1189
- ...$,
1190
- deltaOffset: K,
1191
- deltaPercentage: N
1461
+ ...x,
1462
+ deltaOffset: W,
1463
+ deltaPercentage: k
1192
1464
  };
1193
- }), (o.options.columnResizeMode === "onChange" || R === "end") && o.setColumnSizing(($) => ({
1194
- ...$,
1465
+ }), (o.options.columnResizeMode === "onChange" || h === "end") && o.setColumnSizing((x) => ({
1466
+ ...x,
1195
1467
  ...f
1196
1468
  })));
1197
- }, c = (R) => p("move", R), d = (R) => {
1198
- p("end", R), o.setColumnSizingInfo((_) => ({
1199
- ..._,
1469
+ }, p = (h) => g("move", h), d = (h) => {
1470
+ g("end", h), o.setColumnSizingInfo((S) => ({
1471
+ ...S,
1200
1472
  isResizingColumn: !1,
1201
1473
  startOffset: null,
1202
1474
  startSize: null,
@@ -1204,23 +1476,23 @@ const le = {
1204
1476
  deltaPercentage: null,
1205
1477
  columnSizingStart: []
1206
1478
  }));
1207
- }, u = sn(t), m = {
1208
- moveHandler: (R) => c(R.clientX),
1209
- upHandler: (R) => {
1210
- u == null || u.removeEventListener("mousemove", m.moveHandler), u == null || u.removeEventListener("mouseup", m.upHandler), d(R.clientX);
1479
+ }, a = gn(t), m = {
1480
+ moveHandler: (h) => p(h.clientX),
1481
+ upHandler: (h) => {
1482
+ a == null || a.removeEventListener("mousemove", m.moveHandler), a == null || a.removeEventListener("mouseup", m.upHandler), d(h.clientX);
1211
1483
  }
1212
- }, h = {
1213
- moveHandler: (R) => (R.cancelable && (R.preventDefault(), R.stopPropagation()), c(R.touches[0].clientX), !1),
1214
- upHandler: (R) => {
1215
- var _;
1216
- u == null || u.removeEventListener("touchmove", h.moveHandler), u == null || u.removeEventListener("touchend", h.upHandler), R.cancelable && (R.preventDefault(), R.stopPropagation()), d((_ = R.touches[0]) == null ? void 0 : _.clientX);
1484
+ }, v = {
1485
+ moveHandler: (h) => (h.cancelable && (h.preventDefault(), h.stopPropagation()), p(h.touches[0].clientX), !1),
1486
+ upHandler: (h) => {
1487
+ var S;
1488
+ a == null || a.removeEventListener("touchmove", v.moveHandler), a == null || a.removeEventListener("touchend", v.upHandler), h.cancelable && (h.preventDefault(), h.stopPropagation()), d((S = h.touches[0]) == null ? void 0 : S.clientX);
1217
1489
  }
1218
- }, w = un() ? {
1490
+ }, C = mn() ? {
1219
1491
  passive: !1
1220
1492
  } : !1;
1221
- me(l) ? (u == null || u.addEventListener("touchmove", h.moveHandler, w), u == null || u.addEventListener("touchend", h.upHandler, w)) : (u == null || u.addEventListener("mousemove", m.moveHandler, w), u == null || u.addEventListener("mouseup", m.upHandler, w)), o.setColumnSizingInfo((R) => ({
1222
- ...R,
1223
- startOffset: a,
1493
+ we(l) ? (a == null || a.addEventListener("touchmove", v.moveHandler, C), a == null || a.addEventListener("touchend", v.upHandler, C)) : (a == null || a.addEventListener("mousemove", m.moveHandler, C), a == null || a.addEventListener("mouseup", m.upHandler, C)), o.setColumnSizingInfo((h) => ({
1494
+ ...h,
1495
+ startOffset: u,
1224
1496
  startSize: i,
1225
1497
  deltaOffset: 0,
1226
1498
  deltaPercentage: 0,
@@ -1236,7 +1508,7 @@ const le = {
1236
1508
  e.setColumnSizing(o ? {} : (t = e.initialState.columnSizing) != null ? t : {});
1237
1509
  }, e.resetHeaderSizeInfo = (o) => {
1238
1510
  var t;
1239
- e.setColumnSizingInfo(o ? pe() : (t = e.initialState.columnSizingInfo) != null ? t : pe());
1511
+ e.setColumnSizingInfo(o ? ve() : (t = e.initialState.columnSizingInfo) != null ? t : ve());
1240
1512
  }, e.getTotalSize = () => {
1241
1513
  var o, t;
1242
1514
  return (o = (t = e.getHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
@@ -1252,9 +1524,9 @@ const le = {
1252
1524
  };
1253
1525
  }
1254
1526
  };
1255
- let ie = null;
1256
- function un() {
1257
- if (typeof ie == "boolean") return ie;
1527
+ let se = null;
1528
+ function mn() {
1529
+ if (typeof se == "boolean") return se;
1258
1530
  let e = !1;
1259
1531
  try {
1260
1532
  const o = {
@@ -1267,12 +1539,12 @@ function un() {
1267
1539
  } catch {
1268
1540
  e = !1;
1269
1541
  }
1270
- return ie = e, ie;
1542
+ return se = e, se;
1271
1543
  }
1272
- function me(e) {
1544
+ function we(e) {
1273
1545
  return e.type === "touchstart";
1274
1546
  }
1275
- const fn = {
1547
+ const hn = {
1276
1548
  getInitialState: (e) => ({
1277
1549
  columnVisibility: {},
1278
1550
  ...e
@@ -1298,10 +1570,10 @@ const fn = {
1298
1570
  };
1299
1571
  },
1300
1572
  createRow: (e, o) => {
1301
- e._getAllVisibleCells = C(() => [e.getAllCells(), o.getState().columnVisibility], (t) => t.filter((n) => n.column.getIsVisible()), S(o.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = C(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, n, r) => [...t, ...n, ...r], S(o.options, "debugRows", "getVisibleCells"));
1573
+ e._getAllVisibleCells = y(() => [e.getAllCells(), o.getState().columnVisibility], (t) => t.filter((n) => n.column.getIsVisible()), R(o.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = y(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, n, r) => [...t, ...n, ...r], R(o.options, "debugRows", "getVisibleCells"));
1302
1574
  },
1303
1575
  createTable: (e) => {
1304
- const o = (t, n) => C(() => [n(), n().filter((r) => r.getIsVisible()).map((r) => r.id).join("_")], (r) => r.filter((l) => l.getIsVisible == null ? void 0 : l.getIsVisible()), S(e.options, "debugColumns", t));
1576
+ const o = (t, n) => y(() => [n(), n().filter((r) => r.getIsVisible()).map((r) => r.id).join("_")], (r) => r.filter((l) => l.getIsVisible == null ? void 0 : l.getIsVisible()), R(e.options, "debugColumns", t));
1305
1577
  e.getVisibleFlatColumns = o("getVisibleFlatColumns", () => e.getAllFlatColumns()), e.getVisibleLeafColumns = o("getVisibleLeafColumns", () => e.getAllLeafColumns()), e.getLeftVisibleLeafColumns = o("getLeftVisibleLeafColumns", () => e.getLeftLeafColumns()), e.getRightVisibleLeafColumns = o("getRightVisibleLeafColumns", () => e.getRightLeafColumns()), e.getCenterVisibleLeafColumns = o("getCenterVisibleLeafColumns", () => e.getCenterLeafColumns()), e.setColumnVisibility = (t) => e.options.onColumnVisibilityChange == null ? void 0 : e.options.onColumnVisibilityChange(t), e.resetColumnVisibility = (t) => {
1306
1578
  var n;
1307
1579
  e.setColumnVisibility(t ? {} : (n = e.initialState.columnVisibility) != null ? n : {});
@@ -1317,17 +1589,17 @@ const fn = {
1317
1589
  };
1318
1590
  }
1319
1591
  };
1320
- function ne(e, o) {
1592
+ function oe(e, o) {
1321
1593
  return o ? o === "center" ? e.getCenterVisibleLeafColumns() : o === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
1322
1594
  }
1323
- const dn = {
1595
+ const vn = {
1324
1596
  createTable: (e) => {
1325
1597
  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 = () => {
1326
1598
  if (e._getGlobalFacetedMinMaxValues)
1327
1599
  return e._getGlobalFacetedMinMaxValues();
1328
1600
  };
1329
1601
  }
1330
- }, gn = {
1602
+ }, wn = {
1331
1603
  getInitialState: (e) => ({
1332
1604
  globalFilter: void 0,
1333
1605
  ...e
@@ -1353,14 +1625,14 @@ const dn = {
1353
1625
  const {
1354
1626
  globalFilterFn: n
1355
1627
  } = e.options;
1356
- return ae(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (o = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? o : B[n];
1628
+ return ue(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (o = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? o : B[n];
1357
1629
  }, e.setGlobalFilter = (o) => {
1358
1630
  e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(o);
1359
1631
  }, e.resetGlobalFilter = (o) => {
1360
1632
  e.setGlobalFilter(o ? void 0 : e.initialState.globalFilter);
1361
1633
  };
1362
1634
  }
1363
- }, cn = {
1635
+ }, Cn = {
1364
1636
  getInitialState: (e) => ({
1365
1637
  expanded: {},
1366
1638
  ...e
@@ -1422,9 +1694,9 @@ const dn = {
1422
1694
  if (l && !t) {
1423
1695
  const {
1424
1696
  [e.id]: s,
1425
- ...a
1697
+ ...u
1426
1698
  } = i;
1427
- return a;
1699
+ return u;
1428
1700
  }
1429
1701
  return n;
1430
1702
  });
@@ -1447,14 +1719,14 @@ const dn = {
1447
1719
  };
1448
1720
  };
1449
1721
  }
1450
- }, ye = 0, xe = 10, he = () => ({
1451
- pageIndex: ye,
1452
- pageSize: xe
1453
- }), pn = {
1722
+ }, Fe = 0, $e = 10, Ce = () => ({
1723
+ pageIndex: Fe,
1724
+ pageSize: $e
1725
+ }), Sn = {
1454
1726
  getInitialState: (e) => ({
1455
1727
  ...e,
1456
1728
  pagination: {
1457
- ...he(),
1729
+ ...Ce(),
1458
1730
  ...e == null ? void 0 : e.pagination
1459
1731
  }
1460
1732
  }),
@@ -1478,14 +1750,14 @@ const dn = {
1478
1750
  });
1479
1751
  }
1480
1752
  }, e.setPagination = (n) => {
1481
- const r = (l) => q(n, l);
1753
+ const r = (l) => j(n, l);
1482
1754
  return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(r);
1483
1755
  }, e.resetPagination = (n) => {
1484
1756
  var r;
1485
- e.setPagination(n ? he() : (r = e.initialState.pagination) != null ? r : he());
1757
+ e.setPagination(n ? Ce() : (r = e.initialState.pagination) != null ? r : Ce());
1486
1758
  }, e.setPageIndex = (n) => {
1487
1759
  e.setPagination((r) => {
1488
- let l = q(n, r.pageIndex);
1760
+ let l = j(n, r.pageIndex);
1489
1761
  const i = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
1490
1762
  return l = Math.max(0, Math.min(l, i)), {
1491
1763
  ...r,
@@ -1494,13 +1766,13 @@ const dn = {
1494
1766
  });
1495
1767
  }, e.resetPageIndex = (n) => {
1496
1768
  var r, l;
1497
- e.setPageIndex(n ? ye : (r = (l = e.initialState) == null || (l = l.pagination) == null ? void 0 : l.pageIndex) != null ? r : ye);
1769
+ e.setPageIndex(n ? Fe : (r = (l = e.initialState) == null || (l = l.pagination) == null ? void 0 : l.pageIndex) != null ? r : Fe);
1498
1770
  }, e.resetPageSize = (n) => {
1499
1771
  var r, l;
1500
- e.setPageSize(n ? xe : (r = (l = e.initialState) == null || (l = l.pagination) == null ? void 0 : l.pageSize) != null ? r : xe);
1772
+ e.setPageSize(n ? $e : (r = (l = e.initialState) == null || (l = l.pagination) == null ? void 0 : l.pageSize) != null ? r : $e);
1501
1773
  }, e.setPageSize = (n) => {
1502
1774
  e.setPagination((r) => {
1503
- const l = Math.max(1, q(n, r.pageSize)), i = r.pageSize * r.pageIndex, s = Math.floor(i / l);
1775
+ const l = Math.max(1, j(n, r.pageSize)), i = r.pageSize * r.pageIndex, s = Math.floor(i / l);
1504
1776
  return {
1505
1777
  ...r,
1506
1778
  pageIndex: s,
@@ -1509,15 +1781,15 @@ const dn = {
1509
1781
  });
1510
1782
  }, e.setPageCount = (n) => e.setPagination((r) => {
1511
1783
  var l;
1512
- let i = q(n, (l = e.options.pageCount) != null ? l : -1);
1784
+ let i = j(n, (l = e.options.pageCount) != null ? l : -1);
1513
1785
  return typeof i == "number" && (i = Math.max(-1, i)), {
1514
1786
  ...r,
1515
1787
  pageCount: i
1516
1788
  };
1517
- }), e.getPageOptions = C(() => [e.getPageCount()], (n) => {
1789
+ }), e.getPageOptions = y(() => [e.getPageCount()], (n) => {
1518
1790
  let r = [];
1519
1791
  return n && n > 0 && (r = [...new Array(n)].fill(null).map((l, i) => i)), r;
1520
- }, S(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
1792
+ }, R(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
1521
1793
  const {
1522
1794
  pageIndex: n
1523
1795
  } = e.getState().pagination, r = e.getPageCount();
@@ -1530,12 +1802,12 @@ const dn = {
1530
1802
  return (n = e.options.rowCount) != null ? n : e.getPrePaginationRowModel().rows.length;
1531
1803
  };
1532
1804
  }
1533
- }, ve = () => ({
1805
+ }, Se = () => ({
1534
1806
  top: [],
1535
1807
  bottom: []
1536
- }), mn = {
1808
+ }), yn = {
1537
1809
  getInitialState: (e) => ({
1538
- rowPinning: ve(),
1810
+ rowPinning: Se(),
1539
1811
  ...e
1540
1812
  }),
1541
1813
  getDefaultOptions: (e) => ({
@@ -1543,36 +1815,36 @@ const dn = {
1543
1815
  }),
1544
1816
  createRow: (e, o) => {
1545
1817
  e.pin = (t, n, r) => {
1546
- const l = n ? e.getLeafRows().map((a) => {
1818
+ const l = n ? e.getLeafRows().map((u) => {
1547
1819
  let {
1548
1820
  id: f
1549
- } = a;
1821
+ } = u;
1550
1822
  return f;
1551
- }) : [], i = r ? e.getParentRows().map((a) => {
1823
+ }) : [], i = r ? e.getParentRows().map((u) => {
1552
1824
  let {
1553
1825
  id: f
1554
- } = a;
1826
+ } = u;
1555
1827
  return f;
1556
1828
  }) : [], s = /* @__PURE__ */ new Set([...i, e.id, ...l]);
1557
- o.setRowPinning((a) => {
1558
- var f, p;
1829
+ o.setRowPinning((u) => {
1830
+ var f, g;
1559
1831
  if (t === "bottom") {
1560
- var c, d;
1832
+ var p, d;
1561
1833
  return {
1562
- top: ((c = a == null ? void 0 : a.top) != null ? c : []).filter((h) => !(s != null && s.has(h))),
1563
- bottom: [...((d = a == null ? void 0 : a.bottom) != null ? d : []).filter((h) => !(s != null && s.has(h))), ...Array.from(s)]
1834
+ top: ((p = u == null ? void 0 : u.top) != null ? p : []).filter((v) => !(s != null && s.has(v))),
1835
+ bottom: [...((d = u == null ? void 0 : u.bottom) != null ? d : []).filter((v) => !(s != null && s.has(v))), ...Array.from(s)]
1564
1836
  };
1565
1837
  }
1566
1838
  if (t === "top") {
1567
- var u, m;
1839
+ var a, m;
1568
1840
  return {
1569
- top: [...((u = a == null ? void 0 : a.top) != null ? u : []).filter((h) => !(s != null && s.has(h))), ...Array.from(s)],
1570
- bottom: ((m = a == null ? void 0 : a.bottom) != null ? m : []).filter((h) => !(s != null && s.has(h)))
1841
+ top: [...((a = u == null ? void 0 : u.top) != null ? a : []).filter((v) => !(s != null && s.has(v))), ...Array.from(s)],
1842
+ bottom: ((m = u == null ? void 0 : u.bottom) != null ? m : []).filter((v) => !(s != null && s.has(v)))
1571
1843
  };
1572
1844
  }
1573
1845
  return {
1574
- top: ((f = a == null ? void 0 : a.top) != null ? f : []).filter((h) => !(s != null && s.has(h))),
1575
- bottom: ((p = a == null ? void 0 : a.bottom) != null ? p : []).filter((h) => !(s != null && s.has(h)))
1846
+ top: ((f = u == null ? void 0 : u.top) != null ? f : []).filter((v) => !(s != null && s.has(v))),
1847
+ bottom: ((g = u == null ? void 0 : u.bottom) != null ? g : []).filter((v) => !(s != null && s.has(v)))
1576
1848
  };
1577
1849
  });
1578
1850
  }, e.getCanPin = () => {
@@ -1604,7 +1876,7 @@ const dn = {
1604
1876
  createTable: (e) => {
1605
1877
  e.setRowPinning = (o) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(o), e.resetRowPinning = (o) => {
1606
1878
  var t, n;
1607
- return e.setRowPinning(o ? ve() : (t = (n = e.initialState) == null ? void 0 : n.rowPinning) != null ? t : ve());
1879
+ return e.setRowPinning(o ? Se() : (t = (n = e.initialState) == null ? void 0 : n.rowPinning) != null ? t : Se());
1608
1880
  }, e.getIsSomeRowsPinned = (o) => {
1609
1881
  var t;
1610
1882
  const n = e.getState().rowPinning;
@@ -1629,12 +1901,12 @@ const dn = {
1629
1901
  ...i,
1630
1902
  position: n
1631
1903
  }));
1632
- }, e.getTopRows = C(() => [e.getRowModel().rows, e.getState().rowPinning.top], (o, t) => e._getPinnedRows(o, t, "top"), S(e.options, "debugRows", "getTopRows")), e.getBottomRows = C(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (o, t) => e._getPinnedRows(o, t, "bottom"), S(e.options, "debugRows", "getBottomRows")), e.getCenterRows = C(() => [e.getRowModel().rows, e.getState().rowPinning.top, e.getState().rowPinning.bottom], (o, t, n) => {
1904
+ }, e.getTopRows = y(() => [e.getRowModel().rows, e.getState().rowPinning.top], (o, t) => e._getPinnedRows(o, t, "top"), R(e.options, "debugRows", "getTopRows")), e.getBottomRows = y(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (o, t) => e._getPinnedRows(o, t, "bottom"), R(e.options, "debugRows", "getBottomRows")), e.getCenterRows = y(() => [e.getRowModel().rows, e.getState().rowPinning.top, e.getState().rowPinning.bottom], (o, t, n) => {
1633
1905
  const r = /* @__PURE__ */ new Set([...t ?? [], ...n ?? []]);
1634
1906
  return o.filter((l) => !r.has(l.id));
1635
- }, S(e.options, "debugRows", "getCenterRows"));
1907
+ }, R(e.options, "debugRows", "getCenterRows"));
1636
1908
  }
1637
- }, hn = {
1909
+ }, Rn = {
1638
1910
  getInitialState: (e) => ({
1639
1911
  rowSelection: {},
1640
1912
  ...e
@@ -1669,21 +1941,21 @@ const dn = {
1669
1941
  ...t
1670
1942
  };
1671
1943
  return e.getRowModel().rows.forEach((l) => {
1672
- _e(r, l.id, n, !0, e);
1944
+ Ie(r, l.id, n, !0, e);
1673
1945
  }), r;
1674
- }), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = C(() => [e.getState().rowSelection, e.getCoreRowModel()], (o, t) => Object.keys(o).length ? we(e, t) : {
1946
+ }), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = y(() => [e.getState().rowSelection, e.getCoreRowModel()], (o, t) => Object.keys(o).length ? ye(e, t) : {
1675
1947
  rows: [],
1676
1948
  flatRows: [],
1677
1949
  rowsById: {}
1678
- }, S(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = C(() => [e.getState().rowSelection, e.getFilteredRowModel()], (o, t) => Object.keys(o).length ? we(e, t) : {
1950
+ }, R(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = y(() => [e.getState().rowSelection, e.getFilteredRowModel()], (o, t) => Object.keys(o).length ? ye(e, t) : {
1679
1951
  rows: [],
1680
1952
  flatRows: [],
1681
1953
  rowsById: {}
1682
- }, S(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = C(() => [e.getState().rowSelection, e.getSortedRowModel()], (o, t) => Object.keys(o).length ? we(e, t) : {
1954
+ }, R(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = y(() => [e.getState().rowSelection, e.getSortedRowModel()], (o, t) => Object.keys(o).length ? ye(e, t) : {
1683
1955
  rows: [],
1684
1956
  flatRows: [],
1685
1957
  rowsById: {}
1686
- }, S(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
1958
+ }, R(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
1687
1959
  const o = e.getFilteredRowModel().flatRows, {
1688
1960
  rowSelection: t
1689
1961
  } = e.getState();
@@ -1718,23 +1990,23 @@ const dn = {
1718
1990
  const s = {
1719
1991
  ...l
1720
1992
  };
1721
- return _e(s, e.id, t, (i = n == null ? void 0 : n.selectChildren) != null ? i : !0, o), s;
1993
+ return Ie(s, e.id, t, (i = n == null ? void 0 : n.selectChildren) != null ? i : !0, o), s;
1722
1994
  });
1723
1995
  }, e.getIsSelected = () => {
1724
1996
  const {
1725
1997
  rowSelection: t
1726
1998
  } = o.getState();
1727
- return Ee(e, t);
1999
+ return Le(e, t);
1728
2000
  }, e.getIsSomeSelected = () => {
1729
2001
  const {
1730
2002
  rowSelection: t
1731
2003
  } = o.getState();
1732
- return Fe(e, t) === "some";
2004
+ return Me(e, t) === "some";
1733
2005
  }, e.getIsAllSubRowsSelected = () => {
1734
2006
  const {
1735
2007
  rowSelection: t
1736
2008
  } = o.getState();
1737
- return Fe(e, t) === "all";
2009
+ return Me(e, t) === "all";
1738
2010
  }, e.getCanSelect = () => {
1739
2011
  var t;
1740
2012
  return typeof o.options.enableRowSelection == "function" ? o.options.enableRowSelection(e) : (t = o.options.enableRowSelection) != null ? t : !0;
@@ -1752,21 +2024,21 @@ const dn = {
1752
2024
  };
1753
2025
  };
1754
2026
  }
1755
- }, _e = (e, o, t, n, r) => {
2027
+ }, Ie = (e, o, t, n, r) => {
1756
2028
  var l;
1757
2029
  const i = r.getRow(o, !0);
1758
- t ? (i.getCanMultiSelect() || Object.keys(e).forEach((s) => delete e[s]), i.getCanSelect() && (e[o] = !0)) : delete e[o], n && (l = i.subRows) != null && l.length && i.getCanSelectSubRows() && i.subRows.forEach((s) => _e(e, s.id, t, n, r));
2030
+ t ? (i.getCanMultiSelect() || Object.keys(e).forEach((s) => delete e[s]), i.getCanSelect() && (e[o] = !0)) : delete e[o], n && (l = i.subRows) != null && l.length && i.getCanSelectSubRows() && i.subRows.forEach((s) => Ie(e, s.id, t, n, r));
1759
2031
  };
1760
- function we(e, o) {
2032
+ function ye(e, o) {
1761
2033
  const t = e.getState().rowSelection, n = [], r = {}, l = function(i, s) {
1762
- return i.map((a) => {
2034
+ return i.map((u) => {
1763
2035
  var f;
1764
- const p = Ee(a, t);
1765
- if (p && (n.push(a), r[a.id] = a), (f = a.subRows) != null && f.length && (a = {
1766
- ...a,
1767
- subRows: l(a.subRows)
1768
- }), p)
1769
- return a;
2036
+ const g = Le(u, t);
2037
+ if (g && (n.push(u), r[u.id] = u), (f = u.subRows) != null && f.length && (u = {
2038
+ ...u,
2039
+ subRows: l(u.subRows)
2040
+ }), g)
2041
+ return u;
1770
2042
  }).filter(Boolean);
1771
2043
  };
1772
2044
  return {
@@ -1775,43 +2047,43 @@ function we(e, o) {
1775
2047
  rowsById: r
1776
2048
  };
1777
2049
  }
1778
- function Ee(e, o) {
2050
+ function Le(e, o) {
1779
2051
  var t;
1780
2052
  return (t = o[e.id]) != null ? t : !1;
1781
2053
  }
1782
- function Fe(e, o, t) {
2054
+ function Me(e, o, t) {
1783
2055
  var n;
1784
2056
  if (!((n = e.subRows) != null && n.length)) return !1;
1785
2057
  let r = !0, l = !1;
1786
2058
  return e.subRows.forEach((i) => {
1787
- if (!(l && !r) && (i.getCanSelect() && (Ee(i, o) ? l = !0 : r = !1), i.subRows && i.subRows.length)) {
1788
- const s = Fe(i, o);
2059
+ if (!(l && !r) && (i.getCanSelect() && (Le(i, o) ? l = !0 : r = !1), i.subRows && i.subRows.length)) {
2060
+ const s = Me(i, o);
1789
2061
  s === "all" ? l = !0 : (s === "some" && (l = !0), r = !1);
1790
2062
  }
1791
2063
  }), r ? "all" : l ? "some" : !1;
1792
2064
  }
1793
- const $e = /([0-9]+)/gm, vn = (e, o, t) => ot(U(e.getValue(t)).toLowerCase(), U(o.getValue(t)).toLowerCase()), wn = (e, o, t) => ot(U(e.getValue(t)), U(o.getValue(t))), Cn = (e, o, t) => De(U(e.getValue(t)).toLowerCase(), U(o.getValue(t)).toLowerCase()), Sn = (e, o, t) => De(U(e.getValue(t)), U(o.getValue(t))), Rn = (e, o, t) => {
2065
+ const Ve = /([0-9]+)/gm, xn = (e, o, t) => lt(X(e.getValue(t)).toLowerCase(), X(o.getValue(t)).toLowerCase()), _n = (e, o, t) => lt(X(e.getValue(t)), X(o.getValue(t))), Fn = (e, o, t) => ze(X(e.getValue(t)).toLowerCase(), X(o.getValue(t)).toLowerCase()), $n = (e, o, t) => ze(X(e.getValue(t)), X(o.getValue(t))), In = (e, o, t) => {
1794
2066
  const n = e.getValue(t), r = o.getValue(t);
1795
2067
  return n > r ? 1 : n < r ? -1 : 0;
1796
- }, yn = (e, o, t) => De(e.getValue(t), o.getValue(t));
1797
- function De(e, o) {
2068
+ }, Mn = (e, o, t) => ze(e.getValue(t), o.getValue(t));
2069
+ function ze(e, o) {
1798
2070
  return e === o ? 0 : e > o ? 1 : -1;
1799
2071
  }
1800
- function U(e) {
2072
+ function X(e) {
1801
2073
  return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
1802
2074
  }
1803
- function ot(e, o) {
1804
- const t = e.split($e).filter(Boolean), n = o.split($e).filter(Boolean);
2075
+ function lt(e, o) {
2076
+ const t = e.split(Ve).filter(Boolean), n = o.split(Ve).filter(Boolean);
1805
2077
  for (; t.length && n.length; ) {
1806
- const r = t.shift(), l = n.shift(), i = parseInt(r, 10), s = parseInt(l, 10), a = [i, s].sort();
1807
- if (isNaN(a[0])) {
2078
+ const r = t.shift(), l = n.shift(), i = parseInt(r, 10), s = parseInt(l, 10), u = [i, s].sort();
2079
+ if (isNaN(u[0])) {
1808
2080
  if (r > l)
1809
2081
  return 1;
1810
2082
  if (l > r)
1811
2083
  return -1;
1812
2084
  continue;
1813
2085
  }
1814
- if (isNaN(a[1]))
2086
+ if (isNaN(u[1]))
1815
2087
  return isNaN(i) ? -1 : 1;
1816
2088
  if (i > s)
1817
2089
  return 1;
@@ -1820,14 +2092,14 @@ function ot(e, o) {
1820
2092
  }
1821
2093
  return t.length - n.length;
1822
2094
  }
1823
- const te = {
1824
- alphanumeric: vn,
1825
- alphanumericCaseSensitive: wn,
1826
- text: Cn,
1827
- textCaseSensitive: Sn,
1828
- datetime: Rn,
1829
- basic: yn
1830
- }, xn = {
2095
+ const ne = {
2096
+ alphanumeric: xn,
2097
+ alphanumericCaseSensitive: _n,
2098
+ text: Fn,
2099
+ textCaseSensitive: $n,
2100
+ datetime: In,
2101
+ basic: Mn
2102
+ }, Vn = {
1831
2103
  getInitialState: (e) => ({
1832
2104
  sorting: [],
1833
2105
  ...e
@@ -1847,11 +2119,11 @@ const te = {
1847
2119
  for (const r of t) {
1848
2120
  const l = r == null ? void 0 : r.getValue(e.id);
1849
2121
  if (Object.prototype.toString.call(l) === "[object Date]")
1850
- return te.datetime;
1851
- if (typeof l == "string" && (n = !0, l.split($e).length > 1))
1852
- return te.alphanumeric;
2122
+ return ne.datetime;
2123
+ if (typeof l == "string" && (n = !0, l.split(Ve).length > 1))
2124
+ return ne.alphanumeric;
1853
2125
  }
1854
- return n ? te.text : te.basic;
2126
+ return n ? ne.text : ne.basic;
1855
2127
  }, e.getAutoSortDir = () => {
1856
2128
  const t = o.getFilteredRowModel().flatRows[0];
1857
2129
  return typeof (t == null ? void 0 : t.getValue(e.id)) == "string" ? "asc" : "desc";
@@ -1859,24 +2131,24 @@ const te = {
1859
2131
  var t, n;
1860
2132
  if (!e)
1861
2133
  throw new Error();
1862
- return ae(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (n = o.options.sortingFns) == null ? void 0 : n[e.columnDef.sortingFn]) != null ? t : te[e.columnDef.sortingFn];
2134
+ return ue(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (n = o.options.sortingFns) == null ? void 0 : n[e.columnDef.sortingFn]) != null ? t : ne[e.columnDef.sortingFn];
1863
2135
  }, e.toggleSorting = (t, n) => {
1864
2136
  const r = e.getNextSortingOrder(), l = typeof t < "u" && t !== null;
1865
2137
  o.setSorting((i) => {
1866
- const s = i == null ? void 0 : i.find((u) => u.id === e.id), a = i == null ? void 0 : i.findIndex((u) => u.id === e.id);
1867
- let f = [], p, c = l ? t : r === "desc";
1868
- if (i != null && i.length && e.getCanMultiSort() && n ? s ? p = "toggle" : p = "add" : i != null && i.length && a !== i.length - 1 ? p = "replace" : s ? p = "toggle" : p = "replace", p === "toggle" && (l || r || (p = "remove")), p === "add") {
2138
+ const s = i == null ? void 0 : i.find((a) => a.id === e.id), u = i == null ? void 0 : i.findIndex((a) => a.id === e.id);
2139
+ let f = [], g, p = l ? t : r === "desc";
2140
+ if (i != null && i.length && e.getCanMultiSort() && n ? s ? g = "toggle" : g = "add" : i != null && i.length && u !== i.length - 1 ? g = "replace" : s ? g = "toggle" : g = "replace", g === "toggle" && (l || r || (g = "remove")), g === "add") {
1869
2141
  var d;
1870
2142
  f = [...i, {
1871
2143
  id: e.id,
1872
- desc: c
2144
+ desc: p
1873
2145
  }], f.splice(0, f.length - ((d = o.options.maxMultiSortColCount) != null ? d : Number.MAX_SAFE_INTEGER));
1874
- } else p === "toggle" ? f = i.map((u) => u.id === e.id ? {
1875
- ...u,
1876
- desc: c
1877
- } : u) : p === "remove" ? f = i.filter((u) => u.id !== e.id) : f = [{
2146
+ } else g === "toggle" ? f = i.map((a) => a.id === e.id ? {
2147
+ ...a,
2148
+ desc: p
2149
+ } : a) : g === "remove" ? f = i.filter((a) => a.id !== e.id) : f = [{
1878
2150
  id: e.id,
1879
- desc: c
2151
+ desc: p
1880
2152
  }];
1881
2153
  return f;
1882
2154
  });
@@ -1916,135 +2188,135 @@ const te = {
1916
2188
  e.setSorting(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.sorting) != null ? t : []);
1917
2189
  }, 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());
1918
2190
  }
1919
- }, _n = [
1920
- qt,
1921
- fn,
1922
- rn,
1923
- ln,
1924
- jt,
1925
- Ut,
2191
+ }, Nn = [
2192
+ Qt,
2193
+ hn,
1926
2194
  dn,
2195
+ cn,
2196
+ Yt,
2197
+ Jt,
2198
+ vn,
1927
2199
  //depends on ColumnFaceting
1928
- gn,
2200
+ wn,
1929
2201
  //depends on ColumnFiltering
1930
- xn,
1931
- nn,
2202
+ Vn,
2203
+ un,
1932
2204
  //depends on RowSorting
1933
- cn,
1934
- pn,
1935
- mn,
1936
- hn,
1937
- an
2205
+ Cn,
2206
+ Sn,
2207
+ yn,
2208
+ Rn,
2209
+ pn
1938
2210
  ];
1939
- function Fn(e) {
2211
+ function Pn(e) {
1940
2212
  var o, t;
1941
2213
  process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
1942
- const n = [..._n, ...(o = e._features) != null ? o : []];
2214
+ const n = [...Nn, ...(o = e._features) != null ? o : []];
1943
2215
  let r = {
1944
2216
  _features: n
1945
2217
  };
1946
- const l = r._features.reduce((d, u) => Object.assign(d, u.getDefaultOptions == null ? void 0 : u.getDefaultOptions(r)), {}), i = (d) => r.options.mergeOptions ? r.options.mergeOptions(l, d) : {
2218
+ const l = r._features.reduce((d, a) => Object.assign(d, a.getDefaultOptions == null ? void 0 : a.getDefaultOptions(r)), {}), i = (d) => r.options.mergeOptions ? r.options.mergeOptions(l, d) : {
1947
2219
  ...l,
1948
2220
  ...d
1949
2221
  };
1950
- let a = {
2222
+ let u = {
1951
2223
  ...{},
1952
2224
  ...(t = e.initialState) != null ? t : {}
1953
2225
  };
1954
2226
  r._features.forEach((d) => {
1955
- var u;
1956
- a = (u = d.getInitialState == null ? void 0 : d.getInitialState(a)) != null ? u : a;
2227
+ var a;
2228
+ u = (a = d.getInitialState == null ? void 0 : d.getInitialState(u)) != null ? a : u;
1957
2229
  });
1958
2230
  const f = [];
1959
- let p = !1;
1960
- const c = {
2231
+ let g = !1;
2232
+ const p = {
1961
2233
  _features: n,
1962
2234
  options: {
1963
2235
  ...l,
1964
2236
  ...e
1965
2237
  },
1966
- initialState: a,
2238
+ initialState: u,
1967
2239
  _queue: (d) => {
1968
- f.push(d), p || (p = !0, Promise.resolve().then(() => {
2240
+ f.push(d), g || (g = !0, Promise.resolve().then(() => {
1969
2241
  for (; f.length; )
1970
2242
  f.shift()();
1971
- p = !1;
1972
- }).catch((u) => setTimeout(() => {
1973
- throw u;
2243
+ g = !1;
2244
+ }).catch((a) => setTimeout(() => {
2245
+ throw a;
1974
2246
  })));
1975
2247
  },
1976
2248
  reset: () => {
1977
2249
  r.setState(r.initialState);
1978
2250
  },
1979
2251
  setOptions: (d) => {
1980
- const u = q(d, r.options);
1981
- r.options = i(u);
2252
+ const a = j(d, r.options);
2253
+ r.options = i(a);
1982
2254
  },
1983
2255
  getState: () => r.options.state,
1984
2256
  setState: (d) => {
1985
2257
  r.options.onStateChange == null || r.options.onStateChange(d);
1986
2258
  },
1987
- _getRowId: (d, u, m) => {
1988
- var h;
1989
- return (h = r.options.getRowId == null ? void 0 : r.options.getRowId(d, u, m)) != null ? h : `${m ? [m.id, u].join(".") : u}`;
2259
+ _getRowId: (d, a, m) => {
2260
+ var v;
2261
+ return (v = r.options.getRowId == null ? void 0 : r.options.getRowId(d, a, m)) != null ? v : `${m ? [m.id, a].join(".") : a}`;
1990
2262
  },
1991
2263
  getCoreRowModel: () => (r._getCoreRowModel || (r._getCoreRowModel = r.options.getCoreRowModel(r)), r._getCoreRowModel()),
1992
2264
  // The final calls start at the bottom of the model,
1993
2265
  // expanded rows, which then work their way up
1994
2266
  getRowModel: () => r.getPaginationRowModel(),
1995
2267
  //in next version, we should just pass in the row model as the optional 2nd arg
1996
- getRow: (d, u) => {
1997
- let m = (u ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[d];
2268
+ getRow: (d, a) => {
2269
+ let m = (a ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[d];
1998
2270
  if (!m && (m = r.getCoreRowModel().rowsById[d], !m))
1999
2271
  throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${d}`) : new Error();
2000
2272
  return m;
2001
2273
  },
2002
- _getDefaultColumnDef: C(() => [r.options.defaultColumn], (d) => {
2003
- var u;
2004
- return d = (u = d) != null ? u : {}, {
2274
+ _getDefaultColumnDef: y(() => [r.options.defaultColumn], (d) => {
2275
+ var a;
2276
+ return d = (a = d) != null ? a : {}, {
2005
2277
  header: (m) => {
2006
- const h = m.header.column.columnDef;
2007
- return h.accessorKey ? h.accessorKey : h.accessorFn ? h.id : null;
2278
+ const v = m.header.column.columnDef;
2279
+ return v.accessorKey ? v.accessorKey : v.accessorFn ? v.id : null;
2008
2280
  },
2009
2281
  // footer: props => props.header.column.id,
2010
2282
  cell: (m) => {
2011
- var h, w;
2012
- return (h = (w = m.renderValue()) == null || w.toString == null ? void 0 : w.toString()) != null ? h : null;
2283
+ var v, C;
2284
+ return (v = (C = m.renderValue()) == null || C.toString == null ? void 0 : C.toString()) != null ? v : null;
2013
2285
  },
2014
- ...r._features.reduce((m, h) => Object.assign(m, h.getDefaultColumnDef == null ? void 0 : h.getDefaultColumnDef()), {}),
2286
+ ...r._features.reduce((m, v) => Object.assign(m, v.getDefaultColumnDef == null ? void 0 : v.getDefaultColumnDef()), {}),
2015
2287
  ...d
2016
2288
  };
2017
- }, S(e, "debugColumns", "_getDefaultColumnDef")),
2289
+ }, R(e, "debugColumns", "_getDefaultColumnDef")),
2018
2290
  _getColumnDefs: () => r.options.columns,
2019
- getAllColumns: C(() => [r._getColumnDefs()], (d) => {
2020
- const u = function(m, h, w) {
2021
- return w === void 0 && (w = 0), m.map((R) => {
2022
- const _ = Tt(r, R, w, h), $ = R;
2023
- return _.columns = $.columns ? u($.columns, _, w + 1) : [], _;
2291
+ getAllColumns: y(() => [r._getColumnDefs()], (d) => {
2292
+ const a = function(m, v, C) {
2293
+ return C === void 0 && (C = 0), m.map((h) => {
2294
+ const S = Wt(r, h, C, v), x = h;
2295
+ return S.columns = x.columns ? a(x.columns, S, C + 1) : [], S;
2024
2296
  });
2025
2297
  };
2026
- return u(d);
2027
- }, S(e, "debugColumns", "getAllColumns")),
2028
- getAllFlatColumns: C(() => [r.getAllColumns()], (d) => d.flatMap((u) => u.getFlatColumns()), S(e, "debugColumns", "getAllFlatColumns")),
2029
- _getAllFlatColumnsById: C(() => [r.getAllFlatColumns()], (d) => d.reduce((u, m) => (u[m.id] = m, u), {}), S(e, "debugColumns", "getAllFlatColumnsById")),
2030
- getAllLeafColumns: C(() => [r.getAllColumns(), r._getOrderColumnsFn()], (d, u) => {
2031
- let m = d.flatMap((h) => h.getLeafColumns());
2032
- return u(m);
2033
- }, S(e, "debugColumns", "getAllLeafColumns")),
2298
+ return a(d);
2299
+ }, R(e, "debugColumns", "getAllColumns")),
2300
+ getAllFlatColumns: y(() => [r.getAllColumns()], (d) => d.flatMap((a) => a.getFlatColumns()), R(e, "debugColumns", "getAllFlatColumns")),
2301
+ _getAllFlatColumnsById: y(() => [r.getAllFlatColumns()], (d) => d.reduce((a, m) => (a[m.id] = m, a), {}), R(e, "debugColumns", "getAllFlatColumnsById")),
2302
+ getAllLeafColumns: y(() => [r.getAllColumns(), r._getOrderColumnsFn()], (d, a) => {
2303
+ let m = d.flatMap((v) => v.getLeafColumns());
2304
+ return a(m);
2305
+ }, R(e, "debugColumns", "getAllLeafColumns")),
2034
2306
  getColumn: (d) => {
2035
- const u = r._getAllFlatColumnsById()[d];
2036
- return process.env.NODE_ENV !== "production" && !u && console.error(`[Table] Column with id '${d}' does not exist.`), u;
2307
+ const a = r._getAllFlatColumnsById()[d];
2308
+ return process.env.NODE_ENV !== "production" && !a && console.error(`[Table] Column with id '${d}' does not exist.`), a;
2037
2309
  }
2038
2310
  };
2039
- Object.assign(r, c);
2311
+ Object.assign(r, p);
2040
2312
  for (let d = 0; d < r._features.length; d++) {
2041
- const u = r._features[d];
2042
- u == null || u.createTable == null || u.createTable(r);
2313
+ const a = r._features[d];
2314
+ a == null || a.createTable == null || a.createTable(r);
2043
2315
  }
2044
2316
  return r;
2045
2317
  }
2046
- function $n() {
2047
- return (e) => C(() => [e.options.data], (o) => {
2318
+ function kn() {
2319
+ return (e) => y(() => [e.options.data], (o) => {
2048
2320
  const t = {
2049
2321
  rows: [],
2050
2322
  flatRows: [],
@@ -2053,18 +2325,18 @@ function $n() {
2053
2325
  l === void 0 && (l = 0);
2054
2326
  const s = [];
2055
2327
  for (let f = 0; f < r.length; f++) {
2056
- const p = Ne(e, e._getRowId(r[f], f, i), r[f], f, l, void 0, i == null ? void 0 : i.id);
2057
- if (t.flatRows.push(p), t.rowsById[p.id] = p, s.push(p), e.options.getSubRows) {
2058
- var a;
2059
- p.originalSubRows = e.options.getSubRows(r[f], f), (a = p.originalSubRows) != null && a.length && (p.subRows = n(p.originalSubRows, l + 1, p));
2328
+ const g = Ee(e, e._getRowId(r[f], f, i), r[f], f, l, void 0, i == null ? void 0 : i.id);
2329
+ if (t.flatRows.push(g), t.rowsById[g.id] = g, s.push(g), e.options.getSubRows) {
2330
+ var u;
2331
+ g.originalSubRows = e.options.getSubRows(r[f], f), (u = g.originalSubRows) != null && u.length && (g.subRows = n(g.originalSubRows, l + 1, g));
2060
2332
  }
2061
2333
  }
2062
2334
  return s;
2063
2335
  };
2064
2336
  return t.rows = n(o), t;
2065
- }, S(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
2337
+ }, R(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
2066
2338
  }
2067
- function Mn(e) {
2339
+ function En(e) {
2068
2340
  const o = [], t = (n) => {
2069
2341
  var r;
2070
2342
  o.push(n), (r = n.subRows) != null && r.length && n.getIsExpanded() && n.subRows.forEach(t);
@@ -2075,31 +2347,31 @@ function Mn(e) {
2075
2347
  rowsById: e.rowsById
2076
2348
  };
2077
2349
  }
2078
- function In(e, o, t) {
2079
- return t.options.filterFromLeafRows ? Vn(e, o, t) : Nn(e, o, t);
2350
+ function Dn(e, o, t) {
2351
+ return t.options.filterFromLeafRows ? Ln(e, o, t) : zn(e, o, t);
2080
2352
  }
2081
- function Vn(e, o, t) {
2353
+ function Ln(e, o, t) {
2082
2354
  var n;
2083
- const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, s = function(a, f) {
2355
+ const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, s = function(u, f) {
2084
2356
  f === void 0 && (f = 0);
2085
- const p = [];
2086
- for (let d = 0; d < a.length; d++) {
2087
- var c;
2088
- let u = a[d];
2089
- const m = Ne(t, u.id, u.original, u.index, u.depth, void 0, u.parentId);
2090
- if (m.columnFilters = u.columnFilters, (c = u.subRows) != null && c.length && f < i) {
2091
- if (m.subRows = s(u.subRows, f + 1), u = m, o(u) && !m.subRows.length) {
2092
- p.push(u), l[u.id] = u, r.push(u);
2357
+ const g = [];
2358
+ for (let d = 0; d < u.length; d++) {
2359
+ var p;
2360
+ let a = u[d];
2361
+ const m = Ee(t, a.id, a.original, a.index, a.depth, void 0, a.parentId);
2362
+ if (m.columnFilters = a.columnFilters, (p = a.subRows) != null && p.length && f < i) {
2363
+ if (m.subRows = s(a.subRows, f + 1), a = m, o(a) && !m.subRows.length) {
2364
+ g.push(a), l[a.id] = a, r.push(a);
2093
2365
  continue;
2094
2366
  }
2095
- if (o(u) || m.subRows.length) {
2096
- p.push(u), l[u.id] = u, r.push(u);
2367
+ if (o(a) || m.subRows.length) {
2368
+ g.push(a), l[a.id] = a, r.push(a);
2097
2369
  continue;
2098
2370
  }
2099
2371
  } else
2100
- u = m, o(u) && (p.push(u), l[u.id] = u, r.push(u));
2372
+ a = m, o(a) && (g.push(a), l[a.id] = a, r.push(a));
2101
2373
  }
2102
- return p;
2374
+ return g;
2103
2375
  };
2104
2376
  return {
2105
2377
  rows: s(e),
@@ -2107,23 +2379,23 @@ function Vn(e, o, t) {
2107
2379
  rowsById: l
2108
2380
  };
2109
2381
  }
2110
- function Nn(e, o, t) {
2382
+ function zn(e, o, t) {
2111
2383
  var n;
2112
- const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, s = function(a, f) {
2384
+ const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, s = function(u, f) {
2113
2385
  f === void 0 && (f = 0);
2114
- const p = [];
2115
- for (let d = 0; d < a.length; d++) {
2116
- let u = a[d];
2117
- if (o(u)) {
2118
- var c;
2119
- if ((c = u.subRows) != null && c.length && f < i) {
2120
- const h = Ne(t, u.id, u.original, u.index, u.depth, void 0, u.parentId);
2121
- h.subRows = s(u.subRows, f + 1), u = h;
2386
+ const g = [];
2387
+ for (let d = 0; d < u.length; d++) {
2388
+ let a = u[d];
2389
+ if (o(a)) {
2390
+ var p;
2391
+ if ((p = a.subRows) != null && p.length && f < i) {
2392
+ const v = Ee(t, a.id, a.original, a.index, a.depth, void 0, a.parentId);
2393
+ v.subRows = s(a.subRows, f + 1), a = v;
2122
2394
  }
2123
- p.push(u), r.push(u), l[u.id] = u;
2395
+ g.push(a), r.push(a), l[a.id] = a;
2124
2396
  }
2125
2397
  }
2126
- return p;
2398
+ return g;
2127
2399
  };
2128
2400
  return {
2129
2401
  rows: s(e),
@@ -2131,8 +2403,8 @@ function Nn(e, o, t) {
2131
2403
  rowsById: l
2132
2404
  };
2133
2405
  }
2134
- function Pn() {
2135
- return (e) => C(() => [e.getPreFilteredRowModel(), e.getState().columnFilters, e.getState().globalFilter], (o, t, n) => {
2406
+ function Hn() {
2407
+ return (e) => y(() => [e.getPreFilteredRowModel(), e.getState().columnFilters, e.getState().globalFilter], (o, t, n) => {
2136
2408
  if (!o.rows.length || !(t != null && t.length) && !n) {
2137
2409
  for (let d = 0; d < o.flatRows.length; d++)
2138
2410
  o.flatRows[d].columnFilters = {}, o.flatRows[d].columnFiltersMeta = {};
@@ -2140,66 +2412,66 @@ function Pn() {
2140
2412
  }
2141
2413
  const r = [], l = [];
2142
2414
  (t ?? []).forEach((d) => {
2143
- var u;
2415
+ var a;
2144
2416
  const m = e.getColumn(d.id);
2145
2417
  if (!m)
2146
2418
  return;
2147
- const h = m.getFilterFn();
2148
- if (!h) {
2419
+ const v = m.getFilterFn();
2420
+ if (!v) {
2149
2421
  process.env.NODE_ENV !== "production" && console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${m.id}.`);
2150
2422
  return;
2151
2423
  }
2152
2424
  r.push({
2153
2425
  id: d.id,
2154
- filterFn: h,
2155
- resolvedValue: (u = h.resolveFilterValue == null ? void 0 : h.resolveFilterValue(d.value)) != null ? u : d.value
2426
+ filterFn: v,
2427
+ resolvedValue: (a = v.resolveFilterValue == null ? void 0 : v.resolveFilterValue(d.value)) != null ? a : d.value
2156
2428
  });
2157
2429
  });
2158
- const i = (t ?? []).map((d) => d.id), s = e.getGlobalFilterFn(), a = e.getAllLeafColumns().filter((d) => d.getCanGlobalFilter());
2159
- n && s && a.length && (i.push("__global__"), a.forEach((d) => {
2160
- var u;
2430
+ const i = (t ?? []).map((d) => d.id), s = e.getGlobalFilterFn(), u = e.getAllLeafColumns().filter((d) => d.getCanGlobalFilter());
2431
+ n && s && u.length && (i.push("__global__"), u.forEach((d) => {
2432
+ var a;
2161
2433
  l.push({
2162
2434
  id: d.id,
2163
2435
  filterFn: s,
2164
- resolvedValue: (u = s.resolveFilterValue == null ? void 0 : s.resolveFilterValue(n)) != null ? u : n
2436
+ resolvedValue: (a = s.resolveFilterValue == null ? void 0 : s.resolveFilterValue(n)) != null ? a : n
2165
2437
  });
2166
2438
  }));
2167
- let f, p;
2439
+ let f, g;
2168
2440
  for (let d = 0; d < o.flatRows.length; d++) {
2169
- const u = o.flatRows[d];
2170
- if (u.columnFilters = {}, r.length)
2441
+ const a = o.flatRows[d];
2442
+ if (a.columnFilters = {}, r.length)
2171
2443
  for (let m = 0; m < r.length; m++) {
2172
2444
  f = r[m];
2173
- const h = f.id;
2174
- u.columnFilters[h] = f.filterFn(u, h, f.resolvedValue, (w) => {
2175
- u.columnFiltersMeta[h] = w;
2445
+ const v = f.id;
2446
+ a.columnFilters[v] = f.filterFn(a, v, f.resolvedValue, (C) => {
2447
+ a.columnFiltersMeta[v] = C;
2176
2448
  });
2177
2449
  }
2178
2450
  if (l.length) {
2179
2451
  for (let m = 0; m < l.length; m++) {
2180
- p = l[m];
2181
- const h = p.id;
2182
- if (p.filterFn(u, h, p.resolvedValue, (w) => {
2183
- u.columnFiltersMeta[h] = w;
2452
+ g = l[m];
2453
+ const v = g.id;
2454
+ if (g.filterFn(a, v, g.resolvedValue, (C) => {
2455
+ a.columnFiltersMeta[v] = C;
2184
2456
  })) {
2185
- u.columnFilters.__global__ = !0;
2457
+ a.columnFilters.__global__ = !0;
2186
2458
  break;
2187
2459
  }
2188
2460
  }
2189
- u.columnFilters.__global__ !== !0 && (u.columnFilters.__global__ = !1);
2461
+ a.columnFilters.__global__ !== !0 && (a.columnFilters.__global__ = !1);
2190
2462
  }
2191
2463
  }
2192
- const c = (d) => {
2193
- for (let u = 0; u < i.length; u++)
2194
- if (d.columnFilters[i[u]] === !1)
2464
+ const p = (d) => {
2465
+ for (let a = 0; a < i.length; a++)
2466
+ if (d.columnFilters[i[a]] === !1)
2195
2467
  return !1;
2196
2468
  return !0;
2197
2469
  };
2198
- return In(o.rows, c, e);
2199
- }, S(e.options, "debugTable", "getFilteredRowModel", () => e._autoResetPageIndex()));
2470
+ return Dn(o.rows, p, e);
2471
+ }, R(e.options, "debugTable", "getFilteredRowModel", () => e._autoResetPageIndex()));
2200
2472
  }
2201
- function En(e) {
2202
- return (o) => C(() => [o.getState().pagination, o.getPrePaginationRowModel(), o.options.paginateExpandedRows ? void 0 : o.getState().expanded], (t, n) => {
2473
+ function An(e) {
2474
+ return (o) => y(() => [o.getState().pagination, o.getPrePaginationRowModel(), o.options.paginateExpandedRows ? void 0 : o.getState().expanded], (t, n) => {
2203
2475
  if (!n.rows.length)
2204
2476
  return n;
2205
2477
  const {
@@ -2209,66 +2481,66 @@ function En(e) {
2209
2481
  let {
2210
2482
  rows: i,
2211
2483
  flatRows: s,
2212
- rowsById: a
2484
+ rowsById: u
2213
2485
  } = n;
2214
- const f = r * l, p = f + r;
2215
- i = i.slice(f, p);
2216
- let c;
2217
- o.options.paginateExpandedRows ? c = {
2486
+ const f = r * l, g = f + r;
2487
+ i = i.slice(f, g);
2488
+ let p;
2489
+ o.options.paginateExpandedRows ? p = {
2218
2490
  rows: i,
2219
2491
  flatRows: s,
2220
- rowsById: a
2221
- } : c = Mn({
2492
+ rowsById: u
2493
+ } : p = En({
2222
2494
  rows: i,
2223
2495
  flatRows: s,
2224
- rowsById: a
2225
- }), c.flatRows = [];
2226
- const d = (u) => {
2227
- c.flatRows.push(u), u.subRows.length && u.subRows.forEach(d);
2496
+ rowsById: u
2497
+ }), p.flatRows = [];
2498
+ const d = (a) => {
2499
+ p.flatRows.push(a), a.subRows.length && a.subRows.forEach(d);
2228
2500
  };
2229
- return c.rows.forEach(d), c;
2230
- }, S(o.options, "debugTable", "getPaginationRowModel"));
2501
+ return p.rows.forEach(d), p;
2502
+ }, R(o.options, "debugTable", "getPaginationRowModel"));
2231
2503
  }
2232
- function Dn() {
2233
- return (e) => C(() => [e.getState().sorting, e.getPreSortedRowModel()], (o, t) => {
2504
+ function Gn() {
2505
+ return (e) => y(() => [e.getState().sorting, e.getPreSortedRowModel()], (o, t) => {
2234
2506
  if (!t.rows.length || !(o != null && o.length))
2235
2507
  return t;
2236
- const n = e.getState().sorting, r = [], l = n.filter((a) => {
2508
+ const n = e.getState().sorting, r = [], l = n.filter((u) => {
2237
2509
  var f;
2238
- return (f = e.getColumn(a.id)) == null ? void 0 : f.getCanSort();
2510
+ return (f = e.getColumn(u.id)) == null ? void 0 : f.getCanSort();
2239
2511
  }), i = {};
2240
- l.forEach((a) => {
2241
- const f = e.getColumn(a.id);
2242
- f && (i[a.id] = {
2512
+ l.forEach((u) => {
2513
+ const f = e.getColumn(u.id);
2514
+ f && (i[u.id] = {
2243
2515
  sortUndefined: f.columnDef.sortUndefined,
2244
2516
  invertSorting: f.columnDef.invertSorting,
2245
2517
  sortingFn: f.getSortingFn()
2246
2518
  });
2247
2519
  });
2248
- const s = (a) => {
2249
- const f = a.map((p) => ({
2250
- ...p
2520
+ const s = (u) => {
2521
+ const f = u.map((g) => ({
2522
+ ...g
2251
2523
  }));
2252
- return f.sort((p, c) => {
2253
- for (let u = 0; u < l.length; u += 1) {
2524
+ return f.sort((g, p) => {
2525
+ for (let a = 0; a < l.length; a += 1) {
2254
2526
  var d;
2255
- const m = l[u], h = i[m.id], w = h.sortUndefined, R = (d = m == null ? void 0 : m.desc) != null ? d : !1;
2256
- let _ = 0;
2257
- if (w) {
2258
- const $ = p.getValue(m.id), E = c.getValue(m.id), I = $ === void 0, D = E === void 0;
2259
- if (I || D) {
2260
- if (w === "first") return I ? -1 : 1;
2261
- if (w === "last") return I ? 1 : -1;
2262
- _ = I && D ? 0 : I ? w : -w;
2527
+ const m = l[a], v = i[m.id], C = v.sortUndefined, h = (d = m == null ? void 0 : m.desc) != null ? d : !1;
2528
+ let S = 0;
2529
+ if (C) {
2530
+ const x = g.getValue(m.id), I = p.getValue(m.id), F = x === void 0, V = I === void 0;
2531
+ if (F || V) {
2532
+ if (C === "first") return F ? -1 : 1;
2533
+ if (C === "last") return F ? 1 : -1;
2534
+ S = F && V ? 0 : F ? C : -C;
2263
2535
  }
2264
2536
  }
2265
- if (_ === 0 && (_ = h.sortingFn(p, c, m.id)), _ !== 0)
2266
- return R && (_ *= -1), h.invertSorting && (_ *= -1), _;
2537
+ if (S === 0 && (S = v.sortingFn(g, p, m.id)), S !== 0)
2538
+ return h && (S *= -1), v.invertSorting && (S *= -1), S;
2267
2539
  }
2268
- return p.index - c.index;
2269
- }), f.forEach((p) => {
2270
- var c;
2271
- r.push(p), (c = p.subRows) != null && c.length && (p.subRows = s(p.subRows));
2540
+ return g.index - p.index;
2541
+ }), f.forEach((g) => {
2542
+ var p;
2543
+ r.push(g), (p = g.subRows) != null && p.length && (g.subRows = s(g.subRows));
2272
2544
  }), f;
2273
2545
  };
2274
2546
  return {
@@ -2276,7 +2548,7 @@ function Dn() {
2276
2548
  flatRows: r,
2277
2549
  rowsById: t.rowsById
2278
2550
  };
2279
- }, S(e.options, "debugTable", "getSortedRowModel", () => e._autoResetPageIndex()));
2551
+ }, R(e.options, "debugTable", "getSortedRowModel", () => e._autoResetPageIndex()));
2280
2552
  }
2281
2553
  /**
2282
2554
  * react-table
@@ -2288,22 +2560,22 @@ function Dn() {
2288
2560
  *
2289
2561
  * @license MIT
2290
2562
  */
2291
- function je(e, o) {
2292
- return e ? kn(e) ? /* @__PURE__ */ Se.createElement(e, o) : e : null;
2563
+ function Ue(e, o) {
2564
+ return e ? bn(e) ? /* @__PURE__ */ xe.createElement(e, o) : e : null;
2293
2565
  }
2294
- function kn(e) {
2295
- return Ln(e) || typeof e == "function" || Hn(e);
2566
+ function bn(e) {
2567
+ return On(e) || typeof e == "function" || Tn(e);
2296
2568
  }
2297
- function Ln(e) {
2569
+ function On(e) {
2298
2570
  return typeof e == "function" && (() => {
2299
2571
  const o = Object.getPrototypeOf(e);
2300
2572
  return o.prototype && o.prototype.isReactComponent;
2301
2573
  })();
2302
2574
  }
2303
- function Hn(e) {
2575
+ function Tn(e) {
2304
2576
  return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
2305
2577
  }
2306
- function zn(e) {
2578
+ function Bn(e) {
2307
2579
  const o = {
2308
2580
  state: {},
2309
2581
  // Dummy state
@@ -2312,9 +2584,9 @@ function zn(e) {
2312
2584
  // noop
2313
2585
  renderFallbackValue: null,
2314
2586
  ...e
2315
- }, [t] = Se.useState(() => ({
2316
- current: Fn(o)
2317
- })), [n, r] = Se.useState(() => t.current.initialState);
2587
+ }, [t] = xe.useState(() => ({
2588
+ current: Pn(o)
2589
+ })), [n, r] = xe.useState(() => t.current.initialState);
2318
2590
  return t.current.setOptions((l) => ({
2319
2591
  ...l,
2320
2592
  ...e,
@@ -2329,7 +2601,7 @@ function zn(e) {
2329
2601
  }
2330
2602
  })), t.current;
2331
2603
  }
2332
- const Ue = ({
2604
+ const Xe = ({
2333
2605
  editable: e = !0,
2334
2606
  deletable: o = !0,
2335
2607
  pageSize: t = 25,
@@ -2340,100 +2612,100 @@ const Ue = ({
2340
2612
  rows: l,
2341
2613
  schema: i,
2342
2614
  mappings: s,
2343
- errorsByRow: a,
2615
+ errorsByRow: u,
2344
2616
  editingCell: f,
2345
- startEditing: p,
2346
- stopEditing: c,
2617
+ startEditing: g,
2618
+ stopEditing: p,
2347
2619
  updateCell: d,
2348
- deleteRow: u
2349
- } = J(), [m, h] = Y([]), [w, R] = Y(""), [_, $] = Y(""), E = ze(() => s.filter((y) => y.targetKey !== null).map((y) => {
2350
- const x = i == null ? void 0 : i.columns.find((V) => V.key === y.targetKey);
2620
+ deleteRow: a
2621
+ } = Z(), [m, v] = q([]), [C, h] = q(""), [S, x] = q(""), I = be(() => s.filter((_) => _.targetKey !== null).map((_) => {
2622
+ const $ = i == null ? void 0 : i.columns.find((P) => P.key === _.targetKey);
2351
2623
  return {
2352
- sourceColumn: y.sourceColumn,
2353
- targetKey: y.targetKey,
2354
- label: (x == null ? void 0 : x.label) || y.targetKey,
2355
- type: (x == null ? void 0 : x.type) || "string"
2624
+ sourceColumn: _.sourceColumn,
2625
+ targetKey: _.targetKey,
2626
+ label: ($ == null ? void 0 : $.label) || _.targetKey,
2627
+ type: ($ == null ? void 0 : $.type) || "string"
2356
2628
  };
2357
- }), [s, i]), I = Me(
2358
- (y, x) => {
2359
- const V = a.get(y);
2360
- return V == null ? void 0 : V.find((W) => W.columnKey === x);
2629
+ }), [s, i]), F = Ne(
2630
+ (_, $) => {
2631
+ const P = u.get(_);
2632
+ return P == null ? void 0 : P.find((A) => A.columnKey === $);
2361
2633
  },
2362
- [a]
2363
- ), D = (y, x, V) => {
2364
- $(V), p(y, x);
2365
- }, K = () => {
2366
- f && (d(f.rowIndex, f.columnKey, _), n == null || n(f.rowIndex, f.columnKey, _)), c();
2367
- }, N = () => {
2368
- $(""), c();
2369
- }, z = (y) => {
2370
- u(y), r == null || r(y);
2371
- }, T = Gt(), O = ze(
2634
+ [u]
2635
+ ), V = (_, $, P) => {
2636
+ x(P), g(_, $);
2637
+ }, W = () => {
2638
+ f && (d(f.rowIndex, f.columnKey, S), n == null || n(f.rowIndex, f.columnKey, S)), p();
2639
+ }, k = () => {
2640
+ x(""), p();
2641
+ }, H = (_) => {
2642
+ a(_), r == null || r(_);
2643
+ }, K = qt(), O = be(
2372
2644
  () => [
2373
- T.accessor("rowIndex", {
2645
+ K.accessor("rowIndex", {
2374
2646
  header: "#",
2375
2647
  size: 60,
2376
- cell: (y) => /* @__PURE__ */ g("span", { className: "ff-font-mono ff-text-xs", style: { color: "var(--ff-text-muted)" }, children: y.getValue() + 1 })
2648
+ cell: (_) => /* @__PURE__ */ c("span", { className: "ff-font-mono ff-text-xs", style: { color: "var(--ff-text-muted)" }, children: _.getValue() + 1 })
2377
2649
  }),
2378
- ...E.map(
2379
- (y) => T.accessor((x) => x.data[y.targetKey] || x.data[y.sourceColumn], {
2380
- id: y.targetKey,
2381
- header: y.label,
2382
- cell: (x) => {
2383
- const V = x.row.original.rowIndex, W = String(x.getValue() ?? ""), k = I(V, y.targetKey);
2384
- return (f == null ? void 0 : f.rowIndex) === V && (f == null ? void 0 : f.columnKey) === y.targetKey ? /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-2 ff-min-w-[280px]", children: [
2385
- /* @__PURE__ */ g(
2650
+ ...I.map(
2651
+ (_) => K.accessor(($) => $.data[_.targetKey] || $.data[_.sourceColumn], {
2652
+ id: _.targetKey,
2653
+ header: _.label,
2654
+ cell: ($) => {
2655
+ const P = $.row.original.rowIndex, A = String($.getValue() ?? ""), D = F(P, _.targetKey);
2656
+ return (f == null ? void 0 : f.rowIndex) === P && (f == null ? void 0 : f.columnKey) === _.targetKey ? /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-2 ff-min-w-[280px]", children: [
2657
+ /* @__PURE__ */ c(
2386
2658
  "input",
2387
2659
  {
2388
2660
  type: "text",
2389
- value: _,
2390
- onChange: (X) => $(X.target.value),
2391
- onKeyDown: (X) => {
2392
- X.key === "Enter" && K(), X.key === "Escape" && N();
2661
+ value: S,
2662
+ onChange: (Y) => x(Y.target.value),
2663
+ onKeyDown: (Y) => {
2664
+ Y.key === "Enter" && W(), Y.key === "Escape" && k();
2393
2665
  },
2394
2666
  className: "ff-input ff-py-2 ff-px-3 ff-text-sm ff-flex-1 ff-min-w-[160px]",
2395
2667
  autoFocus: !0
2396
2668
  }
2397
2669
  ),
2398
- /* @__PURE__ */ g(
2670
+ /* @__PURE__ */ c(
2399
2671
  "button",
2400
2672
  {
2401
- onClick: K,
2673
+ onClick: W,
2402
2674
  className: "ff-btn ff-btn-primary ff-btn-sm ff-flex-shrink-0",
2403
2675
  children: "Save"
2404
2676
  }
2405
2677
  ),
2406
- /* @__PURE__ */ g(
2678
+ /* @__PURE__ */ c(
2407
2679
  "button",
2408
2680
  {
2409
- onClick: N,
2681
+ onClick: k,
2410
2682
  className: "ff-btn ff-btn-secondary ff-btn-sm ff-flex-shrink-0",
2411
2683
  children: "Cancel"
2412
2684
  }
2413
2685
  )
2414
- ] }) : /* @__PURE__ */ v(
2686
+ ] }) : /* @__PURE__ */ w(
2415
2687
  "div",
2416
2688
  {
2417
- className: j(
2689
+ className: U(
2418
2690
  "ff-group ff-flex ff-items-center ff-gap-2",
2419
- (k == null ? void 0 : k.severity) === "error" && "ff-cell-error",
2420
- (k == null ? void 0 : k.severity) === "warning" && "ff-cell-warning"
2691
+ (D == null ? void 0 : D.severity) === "error" && "ff-cell-error",
2692
+ (D == null ? void 0 : D.severity) === "warning" && "ff-cell-warning"
2421
2693
  ),
2422
2694
  children: [
2423
- /* @__PURE__ */ g("span", { className: "ff-flex-1 ff-truncate", children: W || /* @__PURE__ */ g("span", { style: { color: "var(--ff-text-muted)" }, children: "—" }) }),
2424
- k && /* @__PURE__ */ v("div", { className: "ff-relative ff-group/tooltip", children: [
2425
- k.severity === "error" ? /* @__PURE__ */ g(Ie, { className: "ff-w-4 ff-h-4", style: { color: "var(--ff-error)" } }) : /* @__PURE__ */ g(Re, { className: "ff-w-4 ff-h-4", style: { color: "var(--ff-warning)" } }),
2426
- /* @__PURE__ */ v("div", { className: "ff-tooltip ff-bottom-full ff-left-1/2 ff-transform ff--translate-x-1/2 ff-mb-2 ff-w-48 group-hover/tooltip:ff-tooltip-visible", children: [
2427
- k.message,
2428
- k.suggestion && /* @__PURE__ */ g("span", { className: "ff-block ff-mt-1", style: { color: "var(--ff-text-muted)" }, children: k.suggestion })
2695
+ /* @__PURE__ */ c("span", { className: "ff-flex-1 ff-truncate", children: A || /* @__PURE__ */ c("span", { style: { color: "var(--ff-text-muted)" }, children: "—" }) }),
2696
+ D && /* @__PURE__ */ w("div", { className: "ff-relative ff-group/tooltip", children: [
2697
+ D.severity === "error" ? /* @__PURE__ */ c(Pe, { className: "ff-w-4 ff-h-4", style: { color: "var(--ff-error)" } }) : /* @__PURE__ */ c(_e, { className: "ff-w-4 ff-h-4", style: { color: "var(--ff-warning)" } }),
2698
+ /* @__PURE__ */ w("div", { className: "ff-tooltip ff-bottom-full ff-left-1/2 ff-transform ff--translate-x-1/2 ff-mb-2 ff-w-48 group-hover/tooltip:ff-tooltip-visible", children: [
2699
+ D.message,
2700
+ D.suggestion && /* @__PURE__ */ c("span", { className: "ff-block ff-mt-1", style: { color: "var(--ff-text-muted)" }, children: D.suggestion })
2429
2701
  ] })
2430
2702
  ] }),
2431
- e && /* @__PURE__ */ g(
2703
+ e && /* @__PURE__ */ c(
2432
2704
  "button",
2433
2705
  {
2434
- onClick: () => D(V, y.targetKey, W),
2706
+ onClick: () => V(P, _.targetKey, A),
2435
2707
  className: "ff-opacity-0 group-hover:ff-opacity-100 ff-p-1 ff-rounded ff-transition-opacity ff-edit-btn",
2436
- children: /* @__PURE__ */ g(Et, { className: "ff-w-3 ff-h-3" })
2708
+ children: /* @__PURE__ */ c(Ht, { className: "ff-w-3 ff-h-3" })
2437
2709
  }
2438
2710
  )
2439
2711
  ]
@@ -2444,134 +2716,134 @@ const Ue = ({
2444
2716
  ),
2445
2717
  // Actions column (delete)
2446
2718
  ...o ? [
2447
- T.display({
2719
+ K.display({
2448
2720
  id: "actions",
2449
2721
  header: "",
2450
2722
  size: 50,
2451
- cell: (y) => {
2452
- const x = y.row.original.rowIndex;
2453
- return /* @__PURE__ */ g(
2723
+ cell: (_) => {
2724
+ const $ = _.row.original.rowIndex;
2725
+ return /* @__PURE__ */ c(
2454
2726
  "button",
2455
2727
  {
2456
- onClick: () => z(x),
2728
+ onClick: () => H($),
2457
2729
  className: "ff-delete-btn",
2458
2730
  title: "Delete row",
2459
- children: /* @__PURE__ */ g(Ht, { className: "ff-w-4 ff-h-4" })
2731
+ children: /* @__PURE__ */ c(Ot, { className: "ff-w-4 ff-h-4" })
2460
2732
  }
2461
2733
  );
2462
2734
  }
2463
2735
  })
2464
2736
  ] : []
2465
2737
  ],
2466
- [E, f, _, e, o, I, T]
2467
- ), H = zn({
2738
+ [I, f, S, e, o, F, K]
2739
+ ), z = Bn({
2468
2740
  data: l,
2469
2741
  columns: O,
2470
2742
  state: {
2471
2743
  sorting: m,
2472
- globalFilter: w
2744
+ globalFilter: C
2473
2745
  },
2474
- onSortingChange: h,
2475
- onGlobalFilterChange: R,
2476
- getCoreRowModel: $n(),
2477
- getPaginationRowModel: En(),
2478
- getSortedRowModel: Dn(),
2479
- getFilteredRowModel: Pn(),
2746
+ onSortingChange: v,
2747
+ onGlobalFilterChange: h,
2748
+ getCoreRowModel: kn(),
2749
+ getPaginationRowModel: An(),
2750
+ getSortedRowModel: Gn(),
2751
+ getFilteredRowModel: Hn(),
2480
2752
  initialState: {
2481
2753
  pagination: {
2482
2754
  pageSize: t
2483
2755
  }
2484
2756
  }
2485
2757
  });
2486
- return /* @__PURE__ */ v("div", { className: "ff-space-y-4", children: [
2487
- /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-justify-between", children: [
2488
- /* @__PURE__ */ g(
2758
+ return /* @__PURE__ */ w("div", { className: "ff-space-y-4", children: [
2759
+ /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-justify-between", children: [
2760
+ /* @__PURE__ */ c(
2489
2761
  "input",
2490
2762
  {
2491
2763
  type: "text",
2492
- value: w,
2493
- onChange: (y) => R(y.target.value),
2764
+ value: C,
2765
+ onChange: (_) => h(_.target.value),
2494
2766
  placeholder: "Search all columns...",
2495
2767
  className: "ff-input ff-max-w-xs"
2496
2768
  }
2497
2769
  ),
2498
- /* @__PURE__ */ v("div", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: [
2499
- H.getFilteredRowModel().rows.length,
2770
+ /* @__PURE__ */ w("div", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: [
2771
+ z.getFilteredRowModel().rows.length,
2500
2772
  " rows"
2501
2773
  ] })
2502
2774
  ] }),
2503
- /* @__PURE__ */ g("div", { className: "ff-table-container ff-max-h-[500px]", children: /* @__PURE__ */ v("table", { className: "ff-table", children: [
2504
- /* @__PURE__ */ g("thead", { children: H.getHeaderGroups().map((y) => /* @__PURE__ */ g("tr", { children: y.headers.map((x) => /* @__PURE__ */ g(
2775
+ /* @__PURE__ */ c("div", { className: "ff-table-container ff-max-h-[500px]", children: /* @__PURE__ */ w("table", { className: "ff-table", children: [
2776
+ /* @__PURE__ */ c("thead", { children: z.getHeaderGroups().map((_) => /* @__PURE__ */ c("tr", { children: _.headers.map(($) => /* @__PURE__ */ c(
2505
2777
  "th",
2506
2778
  {
2507
- style: { width: x.getSize() },
2508
- onClick: x.column.getToggleSortingHandler(),
2509
- className: j(
2510
- x.column.getCanSort() && "ff-cursor-pointer ff-select-none"
2779
+ style: { width: $.getSize() },
2780
+ onClick: $.column.getToggleSortingHandler(),
2781
+ className: U(
2782
+ $.column.getCanSort() && "ff-cursor-pointer ff-select-none"
2511
2783
  ),
2512
- children: /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-1", children: [
2513
- je(x.column.columnDef.header, x.getContext()),
2514
- x.column.getIsSorted() && /* @__PURE__ */ g("span", { children: x.column.getIsSorted() === "asc" ? "↑" : "↓" })
2784
+ children: /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-1", children: [
2785
+ Ue($.column.columnDef.header, $.getContext()),
2786
+ $.column.getIsSorted() && /* @__PURE__ */ c("span", { children: $.column.getIsSorted() === "asc" ? "↑" : "↓" })
2515
2787
  ] })
2516
2788
  },
2517
- x.id
2518
- )) }, y.id)) }),
2519
- /* @__PURE__ */ g("tbody", { children: H.getRowModel().rows.map((y) => {
2520
- const x = a.has(y.original.rowIndex);
2521
- return /* @__PURE__ */ g(
2789
+ $.id
2790
+ )) }, _.id)) }),
2791
+ /* @__PURE__ */ c("tbody", { children: z.getRowModel().rows.map((_) => {
2792
+ const $ = u.has(_.original.rowIndex);
2793
+ return /* @__PURE__ */ c(
2522
2794
  "tr",
2523
2795
  {
2524
- className: j(x && "ff-row-error"),
2525
- children: y.getVisibleCells().map((V) => /* @__PURE__ */ g("td", { children: je(V.column.columnDef.cell, V.getContext()) }, V.id))
2796
+ className: U($ && "ff-row-error"),
2797
+ children: _.getVisibleCells().map((P) => /* @__PURE__ */ c("td", { children: Ue(P.column.columnDef.cell, P.getContext()) }, P.id))
2526
2798
  },
2527
- y.id
2799
+ _.id
2528
2800
  );
2529
2801
  }) })
2530
2802
  ] }) }),
2531
- /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-justify-between ff-px-2", children: [
2532
- /* @__PURE__ */ v("div", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: [
2803
+ /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-justify-between ff-px-2", children: [
2804
+ /* @__PURE__ */ w("div", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: [
2533
2805
  "Page ",
2534
- H.getState().pagination.pageIndex + 1,
2806
+ z.getState().pagination.pageIndex + 1,
2535
2807
  " of ",
2536
- H.getPageCount()
2808
+ z.getPageCount()
2537
2809
  ] }),
2538
- /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-2", children: [
2539
- /* @__PURE__ */ v(
2810
+ /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-2", children: [
2811
+ /* @__PURE__ */ w(
2540
2812
  "button",
2541
2813
  {
2542
- onClick: () => H.previousPage(),
2543
- disabled: !H.getCanPreviousPage(),
2814
+ onClick: () => z.previousPage(),
2815
+ disabled: !z.getCanPreviousPage(),
2544
2816
  className: "ff-btn ff-btn-secondary ff-btn-sm",
2545
2817
  children: [
2546
- /* @__PURE__ */ g(St, { className: "ff-w-4 ff-h-4" }),
2818
+ /* @__PURE__ */ c(Ft, { className: "ff-w-4 ff-h-4" }),
2547
2819
  "Previous"
2548
2820
  ]
2549
2821
  }
2550
2822
  ),
2551
- /* @__PURE__ */ v(
2823
+ /* @__PURE__ */ w(
2552
2824
  "button",
2553
2825
  {
2554
- onClick: () => H.nextPage(),
2555
- disabled: !H.getCanNextPage(),
2826
+ onClick: () => z.nextPage(),
2827
+ disabled: !z.getCanNextPage(),
2556
2828
  className: "ff-btn ff-btn-secondary ff-btn-sm",
2557
2829
  children: [
2558
2830
  "Next",
2559
- /* @__PURE__ */ g(gt, { className: "ff-w-4 ff-h-4" })
2831
+ /* @__PURE__ */ c(vt, { className: "ff-w-4 ff-h-4" })
2560
2832
  ]
2561
2833
  }
2562
2834
  )
2563
2835
  ] })
2564
2836
  ] })
2565
2837
  ] });
2566
- }, Ke = ({
2838
+ }, We = ({
2567
2839
  showDetails: e = !0
2568
2840
  }) => {
2569
- const { validationResults: o } = J();
2841
+ const { validationResults: o } = Z();
2570
2842
  if (!o)
2571
2843
  return null;
2572
- const { isValid: t, totalRows: n, validRows: r, errorCount: l, warningCount: i, infoCount: s, summary: a } = o, f = Math.round(r / n * 100);
2573
- return /* @__PURE__ */ v("div", { className: "ff-space-y-4", children: [
2574
- /* @__PURE__ */ v(
2844
+ const { isValid: t, totalRows: n, validRows: r, errorCount: l, warningCount: i, infoCount: s, summary: u } = o, f = Math.round(r / n * 100);
2845
+ return /* @__PURE__ */ w("div", { className: "ff-space-y-4", children: [
2846
+ /* @__PURE__ */ w(
2575
2847
  "div",
2576
2848
  {
2577
2849
  className: "ff-flex ff-items-center ff-gap-4 ff-p-4 ff-rounded-lg ff-border",
@@ -2580,9 +2852,9 @@ const Ue = ({
2580
2852
  borderColor: t ? "var(--ff-success)" : "var(--ff-error)"
2581
2853
  },
2582
2854
  children: [
2583
- t ? /* @__PURE__ */ g(Ve, { className: "ff-w-8 ff-h-8", style: { color: "var(--ff-success)" } }) : /* @__PURE__ */ g(Ge, { className: "ff-w-8 ff-h-8", style: { color: "var(--ff-error)" } }),
2584
- /* @__PURE__ */ v("div", { children: [
2585
- /* @__PURE__ */ g(
2855
+ t ? /* @__PURE__ */ c(ke, { className: "ff-w-8 ff-h-8", style: { color: "var(--ff-success)" } }) : /* @__PURE__ */ c(Te, { className: "ff-w-8 ff-h-8", style: { color: "var(--ff-error)" } }),
2856
+ /* @__PURE__ */ w("div", { children: [
2857
+ /* @__PURE__ */ c(
2586
2858
  "h3",
2587
2859
  {
2588
2860
  className: "ff-text-lg ff-font-semibold",
@@ -2590,7 +2862,7 @@ const Ue = ({
2590
2862
  children: t ? "Validation Passed" : "Validation Failed"
2591
2863
  }
2592
2864
  ),
2593
- /* @__PURE__ */ v("p", { className: "ff-text-sm", style: { color: t ? "var(--ff-success)" : "var(--ff-error)" }, children: [
2865
+ /* @__PURE__ */ w("p", { className: "ff-text-sm", style: { color: t ? "var(--ff-success)" : "var(--ff-error)" }, children: [
2594
2866
  r,
2595
2867
  " of ",
2596
2868
  n,
@@ -2602,27 +2874,27 @@ const Ue = ({
2602
2874
  ]
2603
2875
  }
2604
2876
  ),
2605
- /* @__PURE__ */ v("div", { className: "ff-grid ff-grid-cols-4 ff-gap-4", children: [
2606
- /* @__PURE__ */ v("div", { className: "ff-border ff-rounded-lg ff-p-4 ff-text-center", style: { backgroundColor: "var(--ff-bg-primary)", borderColor: "var(--ff-border-light)" }, children: [
2607
- /* @__PURE__ */ g("p", { className: "ff-text-2xl ff-font-bold", style: { color: "var(--ff-text-primary)" }, children: n }),
2608
- /* @__PURE__ */ g("p", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: "Total Rows" })
2877
+ /* @__PURE__ */ w("div", { className: "ff-grid ff-grid-cols-4 ff-gap-4", children: [
2878
+ /* @__PURE__ */ w("div", { className: "ff-border ff-rounded-lg ff-p-4 ff-text-center", style: { backgroundColor: "var(--ff-bg-primary)", borderColor: "var(--ff-border-light)" }, children: [
2879
+ /* @__PURE__ */ c("p", { className: "ff-text-2xl ff-font-bold", style: { color: "var(--ff-text-primary)" }, children: n }),
2880
+ /* @__PURE__ */ c("p", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: "Total Rows" })
2609
2881
  ] }),
2610
- /* @__PURE__ */ v("div", { className: "ff-border ff-rounded-lg ff-p-4 ff-text-center", style: { backgroundColor: "var(--ff-success-light)", borderColor: "var(--ff-success)" }, children: [
2611
- /* @__PURE__ */ g("p", { className: "ff-text-2xl ff-font-bold", style: { color: "var(--ff-success-dark)" }, children: r }),
2612
- /* @__PURE__ */ g("p", { className: "ff-text-sm", style: { color: "var(--ff-success)" }, children: "Valid Rows" })
2882
+ /* @__PURE__ */ w("div", { className: "ff-border ff-rounded-lg ff-p-4 ff-text-center", style: { backgroundColor: "var(--ff-success-light)", borderColor: "var(--ff-success)" }, children: [
2883
+ /* @__PURE__ */ c("p", { className: "ff-text-2xl ff-font-bold", style: { color: "var(--ff-success-dark)" }, children: r }),
2884
+ /* @__PURE__ */ c("p", { className: "ff-text-sm", style: { color: "var(--ff-success)" }, children: "Valid Rows" })
2613
2885
  ] }),
2614
- /* @__PURE__ */ v("div", { className: "ff-border ff-rounded-lg ff-p-4 ff-text-center", style: { backgroundColor: "var(--ff-error-light)", borderColor: "var(--ff-error)" }, children: [
2615
- /* @__PURE__ */ g("p", { className: "ff-text-2xl ff-font-bold", style: { color: "var(--ff-error-dark)" }, children: l }),
2616
- /* @__PURE__ */ g("p", { className: "ff-text-sm", style: { color: "var(--ff-error)" }, children: "Errors" })
2886
+ /* @__PURE__ */ w("div", { className: "ff-border ff-rounded-lg ff-p-4 ff-text-center", style: { backgroundColor: "var(--ff-error-light)", borderColor: "var(--ff-error)" }, children: [
2887
+ /* @__PURE__ */ c("p", { className: "ff-text-2xl ff-font-bold", style: { color: "var(--ff-error-dark)" }, children: l }),
2888
+ /* @__PURE__ */ c("p", { className: "ff-text-sm", style: { color: "var(--ff-error)" }, children: "Errors" })
2617
2889
  ] }),
2618
- /* @__PURE__ */ v("div", { className: "ff-border ff-rounded-lg ff-p-4 ff-text-center", style: { backgroundColor: "var(--ff-warning-light)", borderColor: "var(--ff-warning)" }, children: [
2619
- /* @__PURE__ */ g("p", { className: "ff-text-2xl ff-font-bold", style: { color: "var(--ff-warning-dark)" }, children: i }),
2620
- /* @__PURE__ */ g("p", { className: "ff-text-sm", style: { color: "var(--ff-warning)" }, children: "Warnings" })
2890
+ /* @__PURE__ */ w("div", { className: "ff-border ff-rounded-lg ff-p-4 ff-text-center", style: { backgroundColor: "var(--ff-warning-light)", borderColor: "var(--ff-warning)" }, children: [
2891
+ /* @__PURE__ */ c("p", { className: "ff-text-2xl ff-font-bold", style: { color: "var(--ff-warning-dark)" }, children: i }),
2892
+ /* @__PURE__ */ c("p", { className: "ff-text-sm", style: { color: "var(--ff-warning)" }, children: "Warnings" })
2621
2893
  ] })
2622
2894
  ] }),
2623
- e && a.byColumn && Object.keys(a.byColumn).length > 0 && /* @__PURE__ */ v("div", { className: "ff-border ff-rounded-xl ff-overflow-hidden", style: { backgroundColor: "var(--ff-bg-primary)", borderColor: "var(--ff-border-light)" }, children: [
2624
- /* @__PURE__ */ g("div", { className: "ff-px-4 ff-py-3", style: { backgroundColor: "var(--ff-bg-secondary)" }, children: /* @__PURE__ */ g("h4", { className: "ff-font-medium ff-text-sm", style: { color: "var(--ff-text-secondary)" }, children: "Issues by Column" }) }),
2625
- /* @__PURE__ */ g("div", { children: Object.entries(a.byColumn).filter(([, p]) => p.errorCount > 0 || p.warningCount > 0).map(([p, c], d, u) => /* @__PURE__ */ v(
2895
+ e && u.byColumn && Object.keys(u.byColumn).length > 0 && /* @__PURE__ */ w("div", { className: "ff-border ff-rounded-xl ff-overflow-hidden", style: { backgroundColor: "var(--ff-bg-primary)", borderColor: "var(--ff-border-light)" }, children: [
2896
+ /* @__PURE__ */ c("div", { className: "ff-px-4 ff-py-3", style: { backgroundColor: "var(--ff-bg-secondary)" }, children: /* @__PURE__ */ c("h4", { className: "ff-font-medium ff-text-sm", style: { color: "var(--ff-text-secondary)" }, children: "Issues by Column" }) }),
2897
+ /* @__PURE__ */ c("div", { children: Object.entries(u.byColumn).filter(([, g]) => g.errorCount > 0 || g.warningCount > 0).map(([g, p], d, a) => /* @__PURE__ */ w(
2626
2898
  "div",
2627
2899
  {
2628
2900
  className: "ff-flex ff-items-center ff-justify-between ff-px-4 ff-py-3",
@@ -2630,63 +2902,63 @@ const Ue = ({
2630
2902
  borderTop: d > 0 ? "1px solid var(--ff-border-light)" : void 0
2631
2903
  },
2632
2904
  children: [
2633
- /* @__PURE__ */ v("div", { className: "ff-flex-1 ff-min-w-0 ff-mr-4", children: [
2634
- /* @__PURE__ */ g("p", { className: "ff-font-medium ff-text-sm", style: { color: "var(--ff-text-primary)" }, children: c.columnKey }),
2635
- c.mostCommonError && /* @__PURE__ */ g("p", { className: "ff-text-sm ff-truncate", style: { color: "var(--ff-text-muted)" }, children: c.mostCommonError })
2905
+ /* @__PURE__ */ w("div", { className: "ff-flex-1 ff-min-w-0 ff-mr-4", children: [
2906
+ /* @__PURE__ */ c("p", { className: "ff-font-medium ff-text-sm", style: { color: "var(--ff-text-primary)" }, children: p.columnKey }),
2907
+ p.mostCommonError && /* @__PURE__ */ c("p", { className: "ff-text-sm ff-truncate", style: { color: "var(--ff-text-muted)" }, children: p.mostCommonError })
2636
2908
  ] }),
2637
- /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-2 ff-flex-shrink-0", children: [
2638
- c.errorCount > 0 && /* @__PURE__ */ v("span", { className: "ff-badge ff-badge-error ff-whitespace-nowrap", children: [
2639
- /* @__PURE__ */ g(Ge, { className: "ff-w-3 ff-h-3 ff-mr-1" }),
2640
- c.errorCount,
2909
+ /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-2 ff-flex-shrink-0", children: [
2910
+ p.errorCount > 0 && /* @__PURE__ */ w("span", { className: "ff-badge ff-badge-error ff-whitespace-nowrap", children: [
2911
+ /* @__PURE__ */ c(Te, { className: "ff-w-3 ff-h-3 ff-mr-1" }),
2912
+ p.errorCount,
2641
2913
  " ",
2642
- c.errorCount === 1 ? "error" : "errors"
2914
+ p.errorCount === 1 ? "error" : "errors"
2643
2915
  ] }),
2644
- c.warningCount > 0 && /* @__PURE__ */ v("span", { className: "ff-badge ff-badge-warning ff-whitespace-nowrap", children: [
2645
- /* @__PURE__ */ g(Re, { className: "ff-w-3 ff-h-3 ff-mr-1" }),
2646
- c.warningCount,
2916
+ p.warningCount > 0 && /* @__PURE__ */ w("span", { className: "ff-badge ff-badge-warning ff-whitespace-nowrap", children: [
2917
+ /* @__PURE__ */ c(_e, { className: "ff-w-3 ff-h-3 ff-mr-1" }),
2918
+ p.warningCount,
2647
2919
  " ",
2648
- c.warningCount === 1 ? "warning" : "warnings"
2920
+ p.warningCount === 1 ? "warning" : "warnings"
2649
2921
  ] })
2650
2922
  ] })
2651
2923
  ]
2652
2924
  },
2653
- p
2925
+ g
2654
2926
  )) })
2655
2927
  ] }),
2656
- e && a.duplicates && a.duplicates.length > 0 && /* @__PURE__ */ g("div", { className: "ff-border ff-rounded-lg ff-p-4", style: { backgroundColor: "var(--ff-warning-light)", borderColor: "var(--ff-warning)" }, children: /* @__PURE__ */ v("div", { className: "ff-flex ff-items-start ff-gap-3", children: [
2657
- /* @__PURE__ */ g(Re, { className: "ff-w-5 ff-h-5 ff-flex-shrink-0 ff-mt-0.5", style: { color: "var(--ff-warning)" } }),
2658
- /* @__PURE__ */ v("div", { children: [
2659
- /* @__PURE__ */ g("h4", { className: "ff-font-medium", style: { color: "var(--ff-warning-dark)" }, children: "Duplicate Values Found" }),
2660
- /* @__PURE__ */ v("ul", { className: "ff-mt-2 ff-space-y-1 ff-text-sm", style: { color: "var(--ff-warning-dark)" }, children: [
2661
- a.duplicates.slice(0, 5).map((p, c) => /* @__PURE__ */ v("li", { children: [
2662
- /* @__PURE__ */ g("span", { className: "ff-font-mono", children: p.columnKey }),
2928
+ e && u.duplicates && u.duplicates.length > 0 && /* @__PURE__ */ c("div", { className: "ff-border ff-rounded-lg ff-p-4", style: { backgroundColor: "var(--ff-warning-light)", borderColor: "var(--ff-warning)" }, children: /* @__PURE__ */ w("div", { className: "ff-flex ff-items-start ff-gap-3", children: [
2929
+ /* @__PURE__ */ c(_e, { className: "ff-w-5 ff-h-5 ff-flex-shrink-0 ff-mt-0.5", style: { color: "var(--ff-warning)" } }),
2930
+ /* @__PURE__ */ w("div", { children: [
2931
+ /* @__PURE__ */ c("h4", { className: "ff-font-medium", style: { color: "var(--ff-warning-dark)" }, children: "Duplicate Values Found" }),
2932
+ /* @__PURE__ */ w("ul", { className: "ff-mt-2 ff-space-y-1 ff-text-sm", style: { color: "var(--ff-warning-dark)" }, children: [
2933
+ u.duplicates.slice(0, 5).map((g, p) => /* @__PURE__ */ w("li", { children: [
2934
+ /* @__PURE__ */ c("span", { className: "ff-font-mono", children: g.columnKey }),
2663
2935
  ': "',
2664
- String(p.value),
2936
+ String(g.value),
2665
2937
  '" appears',
2666
2938
  " ",
2667
- p.rowIndices.length,
2939
+ g.rowIndices.length,
2668
2940
  " times (rows",
2669
2941
  " ",
2670
- p.rowIndices.slice(0, 3).map((d) => d + 1).join(", "),
2671
- p.rowIndices.length > 3 ? "..." : "",
2942
+ g.rowIndices.slice(0, 3).map((d) => d + 1).join(", "),
2943
+ g.rowIndices.length > 3 ? "..." : "",
2672
2944
  ")"
2673
- ] }, c)),
2674
- a.duplicates.length > 5 && /* @__PURE__ */ v("li", { style: { color: "var(--ff-warning)" }, children: [
2945
+ ] }, p)),
2946
+ u.duplicates.length > 5 && /* @__PURE__ */ w("li", { style: { color: "var(--ff-warning)" }, children: [
2675
2947
  "... and ",
2676
- a.duplicates.length - 5,
2948
+ u.duplicates.length - 5,
2677
2949
  " more duplicate groups"
2678
2950
  ] })
2679
2951
  ] })
2680
2952
  ] })
2681
2953
  ] }) })
2682
2954
  ] });
2683
- }, Ce = ["upload", "mapping", "validation", "complete"], An = [
2684
- { key: "upload", label: "Upload", icon: Xe },
2685
- { key: "mapping", label: "Map Columns", icon: Nt },
2686
- { key: "validation", label: "Validate", icon: kt },
2687
- { key: "review", label: "Review", icon: _t },
2688
- { key: "complete", label: "Complete", icon: Ve }
2689
- ], Tn = ({
2955
+ }, Re = ["upload", "mapping", "validation", "complete"], Kn = [
2956
+ { key: "upload", label: "Upload", icon: Qe },
2957
+ { key: "mapping", label: "Map Columns", icon: Lt },
2958
+ { key: "validation", label: "Validate", icon: Gt },
2959
+ { key: "review", label: "Review", icon: Vt },
2960
+ { key: "complete", label: "Complete", icon: ke }
2961
+ ], Wn = ({
2690
2962
  template: e,
2691
2963
  schema: o,
2692
2964
  mode: t = "modal",
@@ -2697,119 +2969,123 @@ const Ue = ({
2697
2969
  onError: s
2698
2970
  }) => {
2699
2971
  const {
2700
- step: a,
2972
+ step: u,
2701
2973
  sessionId: f,
2702
- file: p,
2703
- mappings: c,
2974
+ file: g,
2975
+ mappings: p,
2704
2976
  validationResults: d,
2705
- isLoading: u,
2977
+ isLoading: a,
2706
2978
  error: m,
2707
- setSchema: h,
2708
- setSessionId: w,
2709
- setParsedData: R,
2710
- setMappings: _,
2711
- setUnmapped: $,
2712
- setValidationResults: E,
2713
- setStep: I,
2714
- nextStep: D,
2715
- previousStep: K,
2716
- setLoading: N,
2717
- setError: z,
2718
- reset: T
2719
- } = J(), [O, H] = Y(null), [y, x] = Y(null);
2720
- Ae(() => {
2721
- if (x(null), e)
2722
- if (ct(e)) {
2723
- const F = pt(e);
2724
- F ? H(F) : (x(`Failed to load template "${e}"`), s == null || s(new Error(`Failed to load template "${e}"`)));
2979
+ setSchema: v,
2980
+ setSessionId: C,
2981
+ setParsedData: h,
2982
+ setMappings: S,
2983
+ setUnmapped: x,
2984
+ setValidationResults: I,
2985
+ setStep: F,
2986
+ nextStep: V,
2987
+ previousStep: W,
2988
+ setLoading: k,
2989
+ setError: H,
2990
+ reset: K
2991
+ } = Z(), [O, z] = q(null), [_, $] = q(null), [P, A] = q(0), [D, Q] = q("");
2992
+ Oe(() => {
2993
+ if ($(null), e)
2994
+ if (wt(e)) {
2995
+ const M = Ct(e);
2996
+ M ? z(M) : ($(`Failed to load template "${e}"`), s == null || s(new Error(`Failed to load template "${e}"`)));
2725
2997
  } else {
2726
- const F = `Template "${e}" not found. Available templates: ${Oe.join(", ")}`;
2727
- x(F), s == null || s(new Error(F));
2998
+ const M = `Template "${e}" not found. Available templates: ${Be.join(", ")}`;
2999
+ $(M), s == null || s(new Error(M));
2728
3000
  }
2729
3001
  else if (o)
2730
- H(o);
3002
+ z(o);
2731
3003
  else {
2732
- const F = `No template or schema provided. Please specify a template (${Oe.join(", ")}) or provide a custom schema.`;
2733
- x(F), s == null || s(new Error(F));
3004
+ const M = `No template or schema provided. Please specify a template (${Be.join(", ")}) or provide a custom schema.`;
3005
+ $(M), s == null || s(new Error(M));
2734
3006
  }
2735
- }, [e, o, s]), Ae(() => {
2736
- O && (h(O), V(O));
3007
+ }, [e, o, s]), Oe(() => {
3008
+ O && (v(O), Y(O));
2737
3009
  }, [O]);
2738
- const V = async (F) => {
3010
+ const Y = async (M) => {
2739
3011
  try {
2740
- N(!0);
2741
- const b = await ee().createImportSession(F);
2742
- w(b.sessionId);
2743
- } catch (M) {
2744
- const b = M;
2745
- z(b.message), s == null || s(b);
3012
+ k(!0);
3013
+ const T = await te().createImportSession(M);
3014
+ C(T.sessionId);
3015
+ } catch (N) {
3016
+ const T = N;
3017
+ H(T.message), s == null || s(T);
2746
3018
  } finally {
2747
- N(!1);
3019
+ k(!1);
2748
3020
  }
2749
- }, W = Me(async (F) => {
3021
+ }, it = Ne(async (M) => {
2750
3022
  if (f)
2751
3023
  try {
2752
- N(!0), z(null);
2753
- const b = await ee().uploadFile(f, F), He = (Q, at) => ({
2754
- rowIndex: Q.rowIndex ?? at,
2755
- data: Q.data ?? Q,
2756
- rawData: Q.rawData ?? Object.values(Q.data ?? Q)
3024
+ k(!0), H(null), A(10), Q("Uploading file...");
3025
+ const N = te();
3026
+ A(30), Q("Parsing file data...");
3027
+ const T = await N.uploadFile(f, M);
3028
+ A(60), Q("Processing rows...");
3029
+ const Ge = (J, gt) => ({
3030
+ rowIndex: J.rowIndex ?? gt,
3031
+ data: J.data ?? J,
3032
+ rawData: J.rawData ?? Object.values(J.data ?? J)
2757
3033
  });
2758
- R({
2759
- headers: b.data.headers,
2760
- rows: b.data.sampleRows.map(He),
2761
- totalRows: b.data.totalRows,
2762
- sampleRows: b.data.sampleRows.map(He)
2763
- }), D(), await k();
2764
- } catch (M) {
2765
- z(`Failed to process the uploaded file: ${M.message}`);
3034
+ h({
3035
+ headers: T.data.headers,
3036
+ rows: T.data.sampleRows.map(Ge),
3037
+ totalRows: T.data.totalRows,
3038
+ sampleRows: T.data.sampleRows.map(Ge)
3039
+ }), A(80), Q("Matching columns..."), V(), await st(), A(100), Q("Done");
3040
+ } catch (N) {
3041
+ H(`Failed to process the uploaded file: ${N.message}`);
2766
3042
  } finally {
2767
- N(!1);
3043
+ k(!1), A(0), Q("");
2768
3044
  }
2769
- }, [f]), k = async () => {
3045
+ }, [f]), st = async () => {
2770
3046
  if (f)
2771
3047
  try {
2772
- N(!0);
2773
- const M = await ee().matchColumns(f);
2774
- _(M.mappings), $(M.unmappedSource, M.unmappedTarget);
2775
- } catch (F) {
2776
- z(`Column matching failed: ${F.message}`);
3048
+ k(!0);
3049
+ const N = await te().matchColumns(f);
3050
+ S(N.mappings), x(N.unmappedSource, N.unmappedTarget);
3051
+ } catch (M) {
3052
+ H(`Column matching failed: ${M.message}`);
2777
3053
  } finally {
2778
- N(!1);
3054
+ k(!1);
2779
3055
  }
2780
- }, ke = async () => {
3056
+ }, at = async () => {
2781
3057
  if (f)
2782
3058
  try {
2783
- N(!0), z(null);
2784
- const M = await ee().validateImport(f);
2785
- E(M.validation), D();
2786
- } catch (F) {
2787
- z(`Validation failed: ${F.message}`);
3059
+ k(!0), H(null);
3060
+ const N = await te().validateImport(f);
3061
+ I(N.validation), V();
3062
+ } catch (M) {
3063
+ H(`Validation failed: ${M.message}`);
2788
3064
  } finally {
2789
- N(!1);
3065
+ k(!1);
2790
3066
  }
2791
- }, [X, ue] = Y(null), rt = async () => {
3067
+ }, [He, fe] = q(null), ut = async () => {
2792
3068
  if (f)
2793
3069
  try {
2794
- N(!0), z(null), ue(null);
2795
- const M = await ee().completeImport(f, {
3070
+ k(!0), H(null), fe(null);
3071
+ const N = await te().completeImport(f, {
2796
3072
  skipInvalidRows: !0,
2797
3073
  acknowledgeWarnings: !0
2798
3074
  });
2799
- I("complete"), l == null || l(M);
2800
- } catch (F) {
2801
- ue(F.message), I("complete");
3075
+ F("complete"), l == null || l(N);
3076
+ } catch (M) {
3077
+ fe(M.message), F("complete");
2802
3078
  } finally {
2803
- N(!1);
3079
+ k(!1);
2804
3080
  }
2805
- }, fe = () => {
2806
- T(), i == null || i();
2807
- }, lt = () => An.findIndex((F) => F.key === a), it = () => {
2808
- switch (a) {
3081
+ }, de = () => {
3082
+ K(), i == null || i();
3083
+ }, ft = () => Kn.findIndex((M) => M.key === u), dt = () => {
3084
+ switch (u) {
2809
3085
  case "upload":
2810
- return p !== null;
3086
+ return g !== null;
2811
3087
  case "mapping":
2812
- return c.length > 0 && c.some((F) => F.targetKey !== null);
3088
+ return p.length > 0 && p.some((M) => M.targetKey !== null);
2813
3089
  case "validation":
2814
3090
  return d !== null;
2815
3091
  case "review":
@@ -2817,138 +3093,152 @@ const Ue = ({
2817
3093
  default:
2818
3094
  return !1;
2819
3095
  }
2820
- }, st = async () => {
2821
- switch (a) {
3096
+ }, ct = async () => {
3097
+ switch (u) {
2822
3098
  case "mapping":
2823
- await ke();
3099
+ await at();
2824
3100
  break;
2825
3101
  case "validation":
2826
- D();
3102
+ V();
2827
3103
  break;
2828
3104
  case "review":
2829
- await rt();
3105
+ await ut();
2830
3106
  break;
2831
3107
  default:
2832
- D();
3108
+ V();
2833
3109
  }
2834
3110
  };
2835
- if (y)
2836
- return /* @__PURE__ */ g(de, { theme: n, useShadowDom: r, children: /* @__PURE__ */ g("div", { className: "ff-container ff-bg-white ff-rounded-xl ff-shadow-xl ff-overflow-hidden ff-p-6", children: /* @__PURE__ */ v("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-8", children: [
2837
- /* @__PURE__ */ g("div", { className: "ff-w-16 ff-h-16 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", style: { backgroundColor: "var(--ff-error-light)" }, children: /* @__PURE__ */ g(se, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-error)" } }) }),
2838
- /* @__PURE__ */ g("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Configuration Error" }),
2839
- /* @__PURE__ */ g("p", { className: "ff-text-center ff-max-w-md ff-mb-4", style: { color: "var(--ff-text-muted)" }, children: y }),
2840
- i && /* @__PURE__ */ g("button", { onClick: fe, className: "ff-btn ff-btn-secondary", children: "Close" })
3111
+ if (_)
3112
+ return /* @__PURE__ */ c(ce, { theme: n, useShadowDom: r, children: /* @__PURE__ */ c("div", { className: "ff-container ff-bg-white ff-rounded-xl ff-shadow-xl ff-overflow-hidden ff-p-6", children: /* @__PURE__ */ w("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-8", children: [
3113
+ /* @__PURE__ */ c("div", { className: "ff-w-16 ff-h-16 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", style: { backgroundColor: "var(--ff-error-light)" }, children: /* @__PURE__ */ c(ae, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-error)" } }) }),
3114
+ /* @__PURE__ */ c("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Configuration Error" }),
3115
+ /* @__PURE__ */ c("p", { className: "ff-text-center ff-max-w-md ff-mb-4", style: { color: "var(--ff-text-muted)" }, children: _ }),
3116
+ i && /* @__PURE__ */ c("button", { onClick: de, className: "ff-btn ff-btn-secondary", children: "Close" })
2841
3117
  ] }) }) });
2842
3118
  if (!O)
2843
- return /* @__PURE__ */ g(de, { theme: n, useShadowDom: r, children: /* @__PURE__ */ g("div", { className: "ff-container ff-bg-white ff-rounded-xl ff-shadow-xl ff-overflow-hidden ff-p-6", children: /* @__PURE__ */ v("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-8", children: [
2844
- /* @__PURE__ */ g(be, { className: "ff-w-10 ff-h-10 ff-animate-spin ff-mb-4", style: { color: "var(--ff-primary-90)" } }),
2845
- /* @__PURE__ */ g("p", { style: { color: "var(--ff-text-muted)" }, children: "Loading template..." })
3119
+ return /* @__PURE__ */ c(ce, { theme: n, useShadowDom: r, children: /* @__PURE__ */ c("div", { className: "ff-container ff-bg-white ff-rounded-xl ff-shadow-xl ff-overflow-hidden ff-p-6", children: /* @__PURE__ */ w("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-8", children: [
3120
+ /* @__PURE__ */ c(ge, { className: "ff-w-10 ff-h-10 ff-animate-spin ff-mb-4", style: { color: "var(--ff-primary-90)" } }),
3121
+ /* @__PURE__ */ c("p", { style: { color: "var(--ff-text-muted)" }, children: "Loading template..." })
2846
3122
  ] }) }) });
2847
- const Z = () => {
2848
- const F = a === "review" ? "validation" : a;
2849
- return Ce.indexOf(F);
2850
- }, Le = /* @__PURE__ */ g(oe, { children: /* @__PURE__ */ v("div", { className: t === "embed" ? "ff-container ff-embed" : "ff-container ff-modal", children: [
2851
- /* @__PURE__ */ v("div", { className: "ff-modal-header", children: [
2852
- /* @__PURE__ */ v("div", { className: "ff-modal-header-left", children: [
2853
- /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-3", children: [
2854
- /* @__PURE__ */ g("div", { className: "ff-modal-icon", children: /* @__PURE__ */ g($t, {}) }),
2855
- /* @__PURE__ */ g("h2", { className: "ff-modal-title", children: "Import Data" })
3123
+ const ee = () => {
3124
+ const M = u === "review" ? "validation" : u;
3125
+ return Re.indexOf(M);
3126
+ }, Ae = /* @__PURE__ */ c(re, { children: /* @__PURE__ */ w("div", { className: t === "embed" ? "ff-container ff-embed" : "ff-container ff-modal", children: [
3127
+ /* @__PURE__ */ w("div", { className: "ff-modal-header", children: [
3128
+ /* @__PURE__ */ w("div", { className: "ff-modal-header-left", children: [
3129
+ /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-3", children: [
3130
+ /* @__PURE__ */ c("div", { className: "ff-modal-icon", children: /* @__PURE__ */ c(Pt, {}) }),
3131
+ /* @__PURE__ */ c("h2", { className: "ff-modal-title", children: "Import Data" })
2856
3132
  ] }),
2857
- /* @__PURE__ */ g("div", { className: "ff-steps ff-ml-4", children: Ce.map((F, M) => /* @__PURE__ */ v(ut.Fragment, { children: [
2858
- /* @__PURE__ */ g(
3133
+ /* @__PURE__ */ c("div", { className: "ff-steps ff-ml-4", children: Re.map((M, N) => /* @__PURE__ */ w(pt.Fragment, { children: [
3134
+ /* @__PURE__ */ c(
2859
3135
  "div",
2860
3136
  {
2861
- className: j(
3137
+ className: U(
2862
3138
  "ff-step",
2863
- Z() === M && "ff-step-active",
2864
- Z() > M && "ff-step-complete",
2865
- Z() < M && "ff-step-pending"
3139
+ ee() === N && "ff-step-active",
3140
+ ee() > N && "ff-step-complete",
3141
+ ee() < N && "ff-step-pending"
2866
3142
  ),
2867
- children: Z() > M ? "✓" : M + 1
3143
+ children: ee() > N ? "✓" : N + 1
2868
3144
  }
2869
3145
  ),
2870
- M < Ce.length - 1 && /* @__PURE__ */ g("div", { className: j(
3146
+ N < Re.length - 1 && /* @__PURE__ */ c("div", { className: U(
2871
3147
  "ff-step-connector",
2872
- Z() > M && "ff-step-connector-complete"
3148
+ ee() > N && "ff-step-connector-complete"
2873
3149
  ) })
2874
- ] }, F)) })
3150
+ ] }, M)) })
2875
3151
  ] }),
2876
- /* @__PURE__ */ g(
3152
+ /* @__PURE__ */ c(
2877
3153
  "button",
2878
3154
  {
2879
- onClick: fe,
3155
+ onClick: de,
2880
3156
  className: "ff-modal-close",
2881
- children: /* @__PURE__ */ g(se, { className: "ff-w-5 ff-h-5" })
3157
+ children: /* @__PURE__ */ c(ae, { className: "ff-w-5 ff-h-5" })
2882
3158
  }
2883
3159
  )
2884
3160
  ] }),
2885
- /* @__PURE__ */ v("div", { className: "ff-modal-body", children: [
2886
- m && /* @__PURE__ */ g("div", { className: "ff-mb-4 ff-p-4 ff-border ff-rounded-lg ff-text-sm", style: { backgroundColor: "var(--ff-error-light)", borderColor: "var(--ff-error)", color: "var(--ff-error)" }, children: m }),
2887
- a === "upload" && /* @__PURE__ */ g("div", { className: "ff-py-4", children: /* @__PURE__ */ g("div", { className: "ff-max-w-xl ff-mx-auto", children: /* @__PURE__ */ g(zt, { onFileSelect: W }) }) }),
2888
- a === "mapping" && /* @__PURE__ */ g(At, {}),
2889
- a === "validation" && /* @__PURE__ */ v("div", { className: "ff-space-y-6", children: [
2890
- /* @__PURE__ */ g(Ke, {}),
2891
- /* @__PURE__ */ g(Ue, { editable: !0 })
3161
+ /* @__PURE__ */ w("div", { className: "ff-modal-body", children: [
3162
+ m && /* @__PURE__ */ c("div", { className: "ff-mb-4 ff-p-4 ff-border ff-rounded-lg ff-text-sm", style: { backgroundColor: "var(--ff-error-light)", borderColor: "var(--ff-error)", color: "var(--ff-error)" }, children: m }),
3163
+ u === "upload" && /* @__PURE__ */ c("div", { className: "ff-py-4", children: /* @__PURE__ */ c("div", { className: "ff-max-w-xl ff-mx-auto", children: a && P > 0 ? /* @__PURE__ */ w("div", { className: "ff-p-8 ff-text-center", children: [
3164
+ /* @__PURE__ */ c(ge, { className: "ff-w-10 ff-h-10 ff-animate-spin ff-mx-auto ff-mb-4", style: { color: "var(--ff-primary-90)" } }),
3165
+ /* @__PURE__ */ c("p", { className: "ff-font-medium ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: D }),
3166
+ /* @__PURE__ */ c("div", { className: "ff-progress ff-w-full ff-max-w-xs ff-mx-auto ff-mb-2", children: /* @__PURE__ */ c(
3167
+ "div",
3168
+ {
3169
+ className: "ff-progress-bar",
3170
+ style: { width: `${P}%`, transition: "width 0.3s ease" }
3171
+ }
3172
+ ) }),
3173
+ /* @__PURE__ */ w("p", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: [
3174
+ P,
3175
+ "% complete"
3176
+ ] })
3177
+ ] }) : /* @__PURE__ */ c(Bt, { onFileSelect: it }) }) }),
3178
+ u === "mapping" && /* @__PURE__ */ c(Kt, {}),
3179
+ u === "validation" && /* @__PURE__ */ w("div", { className: "ff-space-y-6", children: [
3180
+ /* @__PURE__ */ c(We, {}),
3181
+ /* @__PURE__ */ c(Xe, { editable: !0 })
2892
3182
  ] }),
2893
- a === "review" && /* @__PURE__ */ v("div", { className: "ff-space-y-6", children: [
2894
- /* @__PURE__ */ g(Ke, { showDetails: !1 }),
2895
- /* @__PURE__ */ g(Ue, { editable: !1, pageSize: 10 })
3183
+ u === "review" && /* @__PURE__ */ w("div", { className: "ff-space-y-6", children: [
3184
+ /* @__PURE__ */ c(We, { showDetails: !1 }),
3185
+ /* @__PURE__ */ c(Xe, { editable: !1, pageSize: 10 })
2896
3186
  ] }),
2897
- a === "complete" && /* @__PURE__ */ g("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-12", children: X ? /* @__PURE__ */ v(oe, { children: [
2898
- /* @__PURE__ */ g("div", { className: "ff-w-16 ff-h-16 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", style: { backgroundColor: "var(--ff-error-light)" }, children: /* @__PURE__ */ g(se, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-error)" } }) }),
2899
- /* @__PURE__ */ g("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Import Failed" }),
2900
- /* @__PURE__ */ g("p", { className: "ff-text-center ff-max-w-md ff-mb-4", style: { color: "var(--ff-text-muted)" }, children: X }),
2901
- /* @__PURE__ */ v("div", { className: "ff-flex ff-gap-3", children: [
2902
- /* @__PURE__ */ g(
3187
+ u === "complete" && /* @__PURE__ */ c("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-12", children: He ? /* @__PURE__ */ w(re, { children: [
3188
+ /* @__PURE__ */ c("div", { className: "ff-w-16 ff-h-16 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", style: { backgroundColor: "var(--ff-error-light)" }, children: /* @__PURE__ */ c(ae, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-error)" } }) }),
3189
+ /* @__PURE__ */ c("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Import Failed" }),
3190
+ /* @__PURE__ */ c("p", { className: "ff-text-center ff-max-w-md ff-mb-4", style: { color: "var(--ff-text-muted)" }, children: He }),
3191
+ /* @__PURE__ */ w("div", { className: "ff-flex ff-gap-3", children: [
3192
+ /* @__PURE__ */ c(
2903
3193
  "button",
2904
3194
  {
2905
3195
  onClick: () => {
2906
- ue(null), I("review");
3196
+ fe(null), F("review");
2907
3197
  },
2908
3198
  className: "ff-btn ff-btn-secondary",
2909
3199
  children: "Back to Review"
2910
3200
  }
2911
3201
  ),
2912
- i && /* @__PURE__ */ g("button", { onClick: fe, className: "ff-btn ff-btn-secondary", children: "Close" })
3202
+ i && /* @__PURE__ */ c("button", { onClick: de, className: "ff-btn ff-btn-secondary", children: "Close" })
2913
3203
  ] })
2914
- ] }) : /* @__PURE__ */ v(oe, { children: [
2915
- /* @__PURE__ */ g("div", { className: "ff-w-16 ff-h-16 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", style: { backgroundColor: "var(--ff-success-light)" }, children: /* @__PURE__ */ g(Ve, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-success)" } }) }),
2916
- /* @__PURE__ */ g("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Import Complete!" }),
2917
- /* @__PURE__ */ g("p", { style: { color: "var(--ff-text-muted)" }, children: "Your data has been successfully imported." })
3204
+ ] }) : /* @__PURE__ */ w(re, { children: [
3205
+ /* @__PURE__ */ c("div", { className: "ff-w-16 ff-h-16 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", style: { backgroundColor: "var(--ff-success-light)" }, children: /* @__PURE__ */ c(ke, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-success)" } }) }),
3206
+ /* @__PURE__ */ c("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Import Complete!" }),
3207
+ /* @__PURE__ */ c("p", { style: { color: "var(--ff-text-muted)" }, children: "Your data has been successfully imported." })
2918
3208
  ] }) })
2919
3209
  ] }),
2920
- a !== "complete" && /* @__PURE__ */ v("div", { className: "ff-modal-footer", children: [
2921
- /* @__PURE__ */ g(
3210
+ u !== "complete" && /* @__PURE__ */ w("div", { className: "ff-modal-footer", children: [
3211
+ /* @__PURE__ */ c(
2922
3212
  "button",
2923
3213
  {
2924
- onClick: K,
2925
- disabled: lt() === 0 || u,
3214
+ onClick: W,
3215
+ disabled: ft() === 0 || a,
2926
3216
  className: "ff-btn ff-btn-secondary",
2927
3217
  children: "Back"
2928
3218
  }
2929
3219
  ),
2930
- /* @__PURE__ */ g(
3220
+ /* @__PURE__ */ c(
2931
3221
  "button",
2932
3222
  {
2933
- onClick: st,
2934
- disabled: !it() || u,
3223
+ onClick: ct,
3224
+ disabled: !dt() || a,
2935
3225
  className: "ff-btn ff-btn-primary",
2936
- children: u ? /* @__PURE__ */ v(oe, { children: [
2937
- /* @__PURE__ */ g(be, { className: "ff-w-4 ff-h-4 ff-animate-spin" }),
3226
+ children: a ? /* @__PURE__ */ w(re, { children: [
3227
+ /* @__PURE__ */ c(ge, { className: "ff-w-4 ff-h-4 ff-animate-spin" }),
2938
3228
  "Processing..."
2939
- ] }) : a === "review" ? "Complete Import" : "Continue"
3229
+ ] }) : u === "review" ? "Complete Import" : "Continue"
2940
3230
  }
2941
3231
  )
2942
3232
  ] })
2943
3233
  ] }) });
2944
- return /* @__PURE__ */ g(de, { theme: n, useShadowDom: r, children: t === "modal" ? /* @__PURE__ */ g("div", { className: "ff-overlay", children: Le }) : Le });
3234
+ return /* @__PURE__ */ c(ce, { theme: n, useShadowDom: r, children: t === "modal" ? /* @__PURE__ */ c("div", { className: "ff-overlay", children: Ae }) : Ae });
2945
3235
  };
2946
3236
  export {
2947
- At as C,
2948
- Ue as D,
2949
- zt as F,
2950
- Tn as I,
2951
- Ke as V,
2952
- J as u
3237
+ Kt as C,
3238
+ Xe as D,
3239
+ Bt as F,
3240
+ Wn as I,
3241
+ We as V,
3242
+ Z as u
2953
3243
  };
2954
- //# sourceMappingURL=ImportWizard-D4GlHhyY.mjs.map
3244
+ //# sourceMappingURL=ImportWizard-CrUjPf36.mjs.map