@base-framework/ui 1.0.75 → 1.0.79

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,10 +1,10 @@
1
- import { Button as y, Div as o, On as E, Span as v, Th as P, UseParent as H, I as Q, Thead as X, Tr as q, Table as R, P as m, Li as D, Time as K, Nav as S, Ul as b, Section as O, Canvas as G } from "@base-framework/atoms";
2
- import { Atom as d, Component as u, Data as L, DateTime as V, Jot as M, router as x, NavLink as z, DataTracker as N, base as B, Dom as I } from "@base-framework/base";
3
- import { B as C, I as $ } from "./buttons-CVEwmPAi.js";
1
+ import { Button as y, Div as o, On as F, Span as v, Th as R, UseParent as E, I as H, Thead as Q, Tr as X, Table as W, P as p, Li as D, Time as q, Nav as S, Ul as b, Section as P, Canvas as K } from "@base-framework/atoms";
2
+ import { Atom as d, Component as h, Data as L, DateTime as G, router as x, NavLink as O, DataTracker as z, Jot as V, base as I, Dom as B } from "@base-framework/base";
3
+ import { B as C, I as N } from "./buttons-CVEwmPAi.js";
4
4
  import { Icons as w } from "./icons.es.js";
5
5
  import { TableBody as _, ScrollableTableBody as J, List as Z, IntervalTimer as ee } from "@base-framework/organisms";
6
- import { C as te, I as se, H as ne } from "./inputs-DmJuUwS9.js";
7
- import { A as ae, P as ie } from "./calendar-BDqm833e.js";
6
+ import { C as te, I as se, H as ae } from "./inputs-DmJuUwS9.js";
7
+ import { A as ie, P as ne } from "./calendar-BDqm833e.js";
8
8
  d((t, e) => ({
9
9
  class: "flex items-center px-4 py-2",
10
10
  ...t,
@@ -14,9 +14,9 @@ d(({ value: t, label: e }) => y({
14
14
  class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-md px-8 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
15
15
  onState: ["performance", { active: t }],
16
16
  dataSet: ["performance", ["state", t, "active"]],
17
- click: (s, { state: n }) => n.performance = t
17
+ click: (s, { state: a }) => a.performance = t
18
18
  }, e));
19
- class Je extends u {
19
+ class et extends h {
20
20
  /**
21
21
  * This will declare the props for the compiler.
22
22
  *
@@ -41,70 +41,70 @@ const oe = (t) => {
41
41
  }, le = (t) => {
42
42
  const e = new Date(t.valueOf()), s = (e.getDay() + 6) % 7;
43
43
  e.setDate(e.getDate() - s + 3);
44
- const n = e.getFullYear(), a = new Date(n, 0, 4);
45
- a.setDate(a.getDate() - (a.getDay() + 6) % 7);
46
- const i = Math.ceil((e - a) / 6048e5) + 1;
47
- return i > 52 && !oe(n) ? {
44
+ const a = e.getFullYear(), i = new Date(a, 0, 4);
45
+ i.setDate(i.getDate() - (i.getDay() + 6) % 7);
46
+ const n = Math.ceil((e - i) / 6048e5) + 1;
47
+ return n > 52 && !oe(a) ? {
48
48
  weekNumber: 1,
49
- year: n + 1
49
+ year: a + 1
50
50
  } : {
51
- weekNumber: i,
52
- year: n
51
+ weekNumber: n,
52
+ year: a
53
53
  };
54
54
  }, re = (t, e, s) => {
55
55
  if (s === 0) return [];
56
- const n = new Date(t, e, 0).getDate();
56
+ const a = new Date(t, e, 0).getDate();
57
57
  return Array.from(
58
58
  { length: s },
59
- (a, i) => new Date(t, e - 1, n - s + i + 1)
59
+ (i, n) => new Date(t, e - 1, a - s + n + 1)
60
60
  );
61
- }, ce = (t, e, s) => Array.from({ length: s }, (n, a) => new Date(t, e + 1, a + 1)), T = (t, e) => {
62
- const s = new Date(e, 0, 4), n = (s.getDay() + 6) % 7, a = new Date(s);
63
- a.setDate(s.getDate() - n);
64
- const i = new Date(a);
65
- return i.setDate(a.getDate() + (t - 1) * 7), i;
66
- }, Ze = (t, e) => {
67
- const s = new Date(t, e, 1).getDay(), n = new Date(t, e + 1, 0).getDate(), a = [];
61
+ }, ce = (t, e, s) => Array.from({ length: s }, (a, i) => new Date(t, e + 1, i + 1)), T = (t, e) => {
62
+ const s = new Date(e, 0, 4), a = (s.getDay() + 6) % 7, i = new Date(s);
63
+ i.setDate(s.getDate() - a);
64
+ const n = new Date(i);
65
+ return n.setDate(i.getDate() + (t - 1) * 7), n;
66
+ }, tt = (t, e) => {
67
+ const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i = [];
68
+ let n = [];
69
+ for (let l = 1 - s; l <= a; l++) {
70
+ const u = new Date(t, e, l);
71
+ n.push(l > 0 ? u : null), (n.length === 7 || l === a) && (i.push([...n]), n = []);
72
+ }
73
+ return i;
74
+ }, st = (t, e) => {
75
+ const s = new Date(t, e + 1, 0).getDate(), a = [];
68
76
  let i = [];
69
- for (let l = 1 - s; l <= n; l++) {
70
- const h = new Date(t, e, l);
71
- i.push(l > 0 ? h : null), (i.length === 7 || l === n) && (a.push([...i]), i = []);
72
- }
73
- return a;
74
- }, et = (t, e) => {
75
- const s = new Date(t, e + 1, 0).getDate(), n = [];
76
- let a = [];
77
- for (let i = 1; i <= s; i++)
78
- a.push(new Date(t, e, i)), a.length === 7 && (n.push(a), a = []);
79
- return a.length > 0 && n.push(a), n;
77
+ for (let n = 1; n <= s; n++)
78
+ i.push(new Date(t, e, n)), i.length === 7 && (a.push(i), i = []);
79
+ return i.length > 0 && a.push(i), a;
80
80
  }, de = (t, e, s) => {
81
- const n = /* @__PURE__ */ new Date();
82
- return n.getDate() === t && n.getMonth() === e && n.getFullYear() === s;
83
- }, he = ({ day: t, month: e, year: s, weekNumber: n, selectWeek: a }) => {
84
- const i = de(t, e, s);
81
+ const a = /* @__PURE__ */ new Date();
82
+ return a.getDate() === t && a.getMonth() === e && a.getFullYear() === s;
83
+ }, he = ({ day: t, month: e, year: s, weekNumber: a, selectWeek: i }) => {
84
+ const n = de(t, e, s);
85
85
  return y({
86
86
  text: t || "",
87
87
  disabled: !t,
88
88
  class: `
89
89
  px-2 py-1 text-center rounded-md
90
- ${i ? "bg-accent text-accent-foreground" : ""}
90
+ ${n ? "bg-accent text-accent-foreground" : ""}
91
91
  hover:bg-primary hover:text-primary-foreground
92
92
  `,
93
- click: () => a(n, s)
93
+ click: () => i(a, s)
94
94
  });
95
95
  }, ue = (t, e) => {
96
- const s = new Date(t, e, 1).getDay(), n = new Date(t, e + 1, 0).getDate(), a = re(t, e, s), i = Array.from({ length: n }, (r, p) => new Date(t, e, p + 1)), l = (a.length + i.length) % 7, h = l === 0 ? 0 : 7 - l, c = ce(t, e, h), f = [...a, ...i, ...c], g = [];
96
+ const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i = re(t, e, s), n = Array.from({ length: a }, (r, m) => new Date(t, e, m + 1)), l = (i.length + n.length) % 7, u = l === 0 ? 0 : 7 - l, c = ce(t, e, u), f = [...i, ...n, ...c], g = [];
97
97
  for (let r = 0; r < f.length; r += 7) {
98
- const p = f.slice(r, r + 7), k = p.find((F) => F) || new Date(t, e, 1), { weekNumber: U, year: Y } = le(k);
98
+ const m = f.slice(r, r + 7), k = m.find((Y) => Y) || new Date(t, e, 1), { weekNumber: A, year: U } = le(k);
99
99
  g.push({
100
- weekNumber: U,
101
- year: Y,
102
- days: p
100
+ weekNumber: A,
101
+ year: U,
102
+ days: m
103
103
  });
104
104
  }
105
105
  return g;
106
- }, fe = ({ selectWeek: t }) => E("month", (e, s, { data: n }) => {
107
- const { year: a, month: i, currentDate: l } = n, h = ue(a, i);
106
+ }, fe = ({ selectWeek: t }) => F("month", (e, s, { data: a }) => {
107
+ const { year: i, month: n, currentDate: l } = a, u = ue(i, n);
108
108
  return o(
109
109
  { class: "grid grid-cols-8 gap-1 text-sm px-4 py-2" },
110
110
  [
@@ -119,7 +119,7 @@ const oe = (t) => {
119
119
  )
120
120
  ),
121
121
  // Render each "week" row
122
- ...h.map(
122
+ ...u.map(
123
123
  ({ weekNumber: c, days: f, year: g }) => o({
124
124
  class: "grid grid-cols-8 col-span-8 items-center ring-primary rounded-sm px-1",
125
125
  onSet: ["currentWeek", {
@@ -154,7 +154,7 @@ const oe = (t) => {
154
154
  )
155
155
  ]
156
156
  );
157
- }), W = ({ label: t, click: e }) => C(
157
+ }), M = ({ label: t, click: e }) => C(
158
158
  {
159
159
  class: `
160
160
  inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
@@ -169,16 +169,16 @@ const oe = (t) => {
169
169
  }
170
170
  ), ge = ({ next: t, previous: e }) => o({ class: "flex flex-auto min-h-12 text-sm font-medium relative justify-center items-center" }, [
171
171
  v("[[monthName]] [[year]]"),
172
- W({
172
+ M({
173
173
  label: "Previous",
174
174
  click: e
175
175
  }),
176
- W({
176
+ M({
177
177
  label: "Next",
178
178
  click: t
179
179
  })
180
180
  ]);
181
- class tt extends u {
181
+ class at extends h {
182
182
  /**
183
183
  * This will declare the props for the compiler.
184
184
  *
@@ -193,12 +193,12 @@ class tt extends u {
193
193
  * @returns {Data}
194
194
  */
195
195
  setData() {
196
- const e = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(e), n = T(s, e.getFullYear());
196
+ const e = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(e), a = T(s, e.getFullYear());
197
197
  return new L({
198
- monthName: this.getMonthName(n.getMonth()),
199
- year: n.getFullYear(),
200
- month: n.getMonth(),
201
- currentDate: n.getDate(),
198
+ monthName: this.getMonthName(a.getMonth()),
199
+ year: a.getFullYear(),
200
+ month: a.getMonth(),
201
+ currentDate: a.getDate(),
202
202
  currentWeek: s
203
203
  });
204
204
  }
@@ -219,10 +219,10 @@ class tt extends u {
219
219
  * @returns {number}
220
220
  */
221
221
  calculateCurrentWeek(e) {
222
- const s = new Date(e.valueOf()), n = (e.getDay() + 6) % 7;
223
- s.setDate(s.getDate() - n + 3);
224
- const a = s.valueOf();
225
- return s.setMonth(0, 1), s.getDay() !== 4 && s.setMonth(0, 1 + (4 - s.getDay() + 7) % 7), 1 + Math.ceil((a - s) / 6048e5);
222
+ const s = new Date(e.valueOf()), a = (e.getDay() + 6) % 7;
223
+ s.setDate(s.getDate() - a + 3);
224
+ const i = s.valueOf();
225
+ return s.setMonth(0, 1), s.getDay() !== 4 && s.setMonth(0, 1 + (4 - s.getDay() + 7) % 7), 1 + Math.ceil((i - s) / 6048e5);
226
226
  }
227
227
  /**
228
228
  * Gets the name of the month.
@@ -231,7 +231,7 @@ class tt extends u {
231
231
  * @returns {string}
232
232
  */
233
233
  getMonthName(e) {
234
- return V.monthNames[e];
234
+ return G.monthNames[e];
235
235
  }
236
236
  /**
237
237
  * Updates the calendar to show the previous month.
@@ -240,8 +240,8 @@ class tt extends u {
240
240
  */
241
241
  goToPreviousMonth() {
242
242
  const e = this.data;
243
- let { year: s, month: n } = e;
244
- n === 0 ? (n = 11, s--) : n--, this.setDate(n, s);
243
+ let { year: s, month: a } = e;
244
+ a === 0 ? (a = 11, s--) : a--, this.setDate(a, s);
245
245
  }
246
246
  /**
247
247
  * Updates the calendar to show the next month.
@@ -250,8 +250,8 @@ class tt extends u {
250
250
  */
251
251
  goToNextMonth() {
252
252
  const e = this.data;
253
- let { year: s, month: n } = e;
254
- n === 11 ? (n = 0, s++) : n++, this.setDate(n, s);
253
+ let { year: s, month: a } = e;
254
+ a === 11 ? (a = 0, s++) : a++, this.setDate(a, s);
255
255
  }
256
256
  /**
257
257
  * Sets the selected date.
@@ -261,12 +261,12 @@ class tt extends u {
261
261
  * @param {number|null} [date=null]
262
262
  * @returns {void}
263
263
  */
264
- setDate(e, s, n) {
264
+ setDate(e, s, a) {
265
265
  this.data.set({
266
266
  year: s,
267
267
  month: e,
268
268
  monthName: this.getMonthName(e)
269
- }), n && (this.data.currentDate = n);
269
+ }), a && (this.data.currentDate = a);
270
270
  }
271
271
  /**
272
272
  * Handles week selection.
@@ -276,8 +276,8 @@ class tt extends u {
276
276
  */
277
277
  selectWeek(e, s) {
278
278
  this.data.currentWeek = e;
279
- const n = T(e, s);
280
- this.setDate(n.getMonth(), n.getFullYear(), n.getDate()), typeof this.selectedCallBack == "function" && this.selectedCallBack(e);
279
+ const a = T(e, s);
280
+ this.setDate(a.getMonth(), a.getFullYear(), a.getDate()), typeof this.selectedCallBack == "function" && this.selectedCallBack(e);
281
281
  }
282
282
  /**
283
283
  * Renders the WeekCalendar component.
@@ -296,26 +296,26 @@ class tt extends u {
296
296
  ]);
297
297
  }
298
298
  }
299
- const pe = (t, e) => {
299
+ const me = (t, e) => {
300
300
  const s = t.toggleAllSelectedRows();
301
301
  e.state.checked = !s;
302
- }, me = (t) => P({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class || ""}` }, [
303
- H((e) => new te({ class: "mr-2", onChange: (s, n) => pe(e, n) }))
304
- ]), we = ({ align: t, sortable: e, key: s, label: n, sort: a, class: i }) => {
302
+ }, pe = (t) => R({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class || ""}` }, [
303
+ E((e) => new te({ class: "mr-2", onChange: (s, a) => me(e, a) }))
304
+ ]), we = ({ align: t, sortable: e, key: s, label: a, sort: i, class: n }) => {
305
305
  const l = t || "justify-start";
306
- return P({
307
- class: `cursor-pointer py-3 px-4 text-base ${i || ""}`,
308
- click: e && (() => a(s))
306
+ return R({
307
+ class: `cursor-pointer py-3 px-4 text-base ${n || ""}`,
308
+ click: e && (() => i(s))
309
309
  }, [
310
310
  o({ class: `flex flex-auto w-full items-center ${l}` }, [
311
- v(n),
312
- e && Q({ class: "ml-2", html: w.arrows.upDown })
311
+ v(a),
312
+ e && H({ class: "ml-2", html: w.arrows.upDown })
313
313
  ])
314
314
  ]);
315
- }, j = (t) => X([
316
- q({
315
+ }, $ = (t) => Q([
316
+ X({
317
317
  class: "text-muted-foreground border-b",
318
- map: [t.headers, (e) => e.label === "checkbox" ? me({ toggle: t.toggle }) : we({
318
+ map: [t.headers, (e) => e.label === "checkbox" ? pe({ toggle: t.toggle }) : we({
319
319
  align: e.align,
320
320
  sortable: e.sortable,
321
321
  key: e.key,
@@ -323,217 +323,248 @@ const pe = (t, e) => {
323
323
  sort: t.sort
324
324
  })]
325
325
  })
326
- ]), be = ({ key: t, rows: e, selectRow: s, rowItem: n }) => new _({
326
+ ]), be = ({ key: t, rows: e, selectRow: s, rowItem: a }) => new _({
327
327
  cache: "list",
328
328
  key: t,
329
329
  items: e,
330
- rowItem: (a) => n(a, s),
330
+ rowItem: (i) => a(i, s),
331
331
  class: "divide-y divide-border"
332
- }), ke = M(
333
- {
334
- /**
335
- * Initializes component data.
336
- *
337
- * @returns {Data}
338
- */
339
- setData() {
340
- return new L({
341
- selectedRows: [],
342
- selected: !1
343
- });
344
- },
345
- /**
346
- * This will toggle all selected rows.
347
- *
348
- * @returns {boolean}
349
- */
350
- toggleAllSelectedRows() {
351
- const t = this.list.getRows(), e = this.data.selectedRows.length === t.length, s = e ? [] : t;
352
- return this.data.selectedRows = s, this.updateSelected(), this.updateTable(!e), e;
353
- },
354
- /**
355
- * This will update the selected state.
356
- *
357
- * @returns {void}
358
- */
359
- updateSelected() {
360
- const t = this.data.get("selectedRows");
361
- this.data.selected = t.length > 0;
362
- },
363
- /**
364
- * This will get the selected rows.
365
- *
366
- * @returns {Array<object>}
367
- */
368
- getSelectedRows() {
369
- return this.data.get("selectedRows");
370
- },
371
- /**
372
- * This will update the table rows.
373
- *
374
- * @protected
375
- * @param {boolean} selected
376
- * @returns {void}
377
- */
378
- updateTable(t) {
379
- const e = this.list.getRows();
380
- e.forEach((s) => s.selected = t), this.list.setRows(e);
381
- },
382
- /**
383
- * Handles row selection.
384
- *
385
- * @param {object} row
386
- */
387
- selectRow(t) {
388
- const e = t.selected ?? !1;
389
- t.selected = !e;
390
- const s = this.data.get("selectedRows"), n = t.selected ? [...s, t] : s.filter((a) => a !== t);
391
- this.data.selectedRows = n, this.updateSelected();
392
- },
393
- /**
394
- * Renders the DataTable component.
395
- *
396
- * @returns {object}
397
- */
398
- render() {
399
- const t = this.rows, e = this.border !== !1 ? "border" : "";
400
- return o({ class: "w-full" }, [
401
- o({ class: `w-full rounded-md ${e} overflow-x-auto` }, [
402
- R({ class: "w-full" }, [
332
+ });
333
+ class ke extends h {
334
+ /**
335
+ * Initializes component data.
336
+ *
337
+ * @returns {Data}
338
+ */
339
+ setData() {
340
+ return new L({
341
+ selectedRows: [],
342
+ selected: !1
343
+ });
344
+ }
345
+ /**
346
+ * This will toggle all selected rows.
347
+ *
348
+ * @returns {boolean}
349
+ */
350
+ toggleAllSelectedRows() {
351
+ const e = this.list.getRows(), s = this.data.selectedRows.length === e.length, a = s ? [] : e;
352
+ return this.data.selectedRows = a, this.updateSelected(), this.updateTable(!s), s;
353
+ }
354
+ /**
355
+ * This will update the selected state.
356
+ *
357
+ * @returns {void}
358
+ */
359
+ updateSelected() {
360
+ const e = this.data.get("selectedRows");
361
+ this.data.selected = e.length > 0;
362
+ }
363
+ /**
364
+ * This will get the selected rows.
365
+ *
366
+ * @returns {Array<object>}
367
+ */
368
+ getSelectedRows() {
369
+ return this.data.get("selectedRows");
370
+ }
371
+ /**
372
+ * This will update the table rows.
373
+ *
374
+ * @protected
375
+ * @param {boolean} selected
376
+ * @returns {void}
377
+ */
378
+ updateTable(e) {
379
+ const s = this.list.getRows();
380
+ s.forEach((a) => a.selected = e), this.list.setRows(s);
381
+ }
382
+ /**
383
+ * Handles row selection.
384
+ *
385
+ * @param {object} row
386
+ */
387
+ selectRow(e) {
388
+ const s = e.selected ?? !1;
389
+ e.selected = !s;
390
+ const a = this.data.get("selectedRows"), i = e.selected ? [...a, e] : a.filter((n) => n !== e);
391
+ this.data.selectedRows = i, this.updateSelected();
392
+ }
393
+ /**
394
+ * Renders the DataTable component.
395
+ *
396
+ * @returns {object}
397
+ */
398
+ render() {
399
+ const e = this.rows, s = this.border !== !1 ? "border" : "";
400
+ return o({ class: "w-full" }, [
401
+ o({ class: `w-full rounded-md ${s} overflow-x-auto` }, [
402
+ W({ class: "w-full" }, [
403
+ // @ts-ignore
404
+ this.headers && $({ headers: this.headers, sort: (a) => this.sortRows(a) }),
405
+ // @ts-ignore
406
+ this.customHeader ?? null,
407
+ be({
408
+ // @ts-ignore
409
+ key: this.key,
410
+ rows: e,
403
411
  // @ts-ignore
404
- this.headers && j({ headers: this.headers, sort: (s) => this.sortRows(s) }),
412
+ selectRow: this.selectRow.bind(this),
405
413
  // @ts-ignore
406
- this.customHeader ?? null,
407
- be({
408
- // @ts-ignore
409
- key: this.key,
410
- rows: t,
411
- // @ts-ignore
412
- selectRow: this.selectRow.bind(this),
413
- // @ts-ignore
414
- rowItem: this.rowItem
415
- })
416
- ])
414
+ rowItem: this.rowItem
415
+ })
417
416
  ])
418
- ]);
419
- },
420
- /**
421
- * This will remove items from the list.
422
- *
423
- * @public
424
- * @param {array} items
425
- * @returns {void}
426
- */
427
- remove(t) {
428
- this.list.remove(t);
429
- },
430
- /**
431
- * This will set the items in the list.
432
- *
433
- * @public
434
- * @param {array} rows
435
- * @returns {void}
436
- */
437
- setRows(t) {
438
- this.list.setRows(t);
439
- },
440
- /**
441
- * This will append items to the list.
442
- *
443
- * @public
444
- * @param {array|object} items
445
- * @returns {void}
446
- */
447
- append(t) {
448
- this.list.append(t);
449
- },
450
- /**
451
- * This will mingle the new items with the old items.
452
- *
453
- * @public
454
- * @param {Array<Object>} newItems
455
- * @param {boolean} withDelete
456
- * @returns {void}
457
- */
458
- mingle(t, e = !1) {
459
- this.list.mingle(t, e);
460
- },
461
- /**
462
- * This will prepend items to the list.
463
- *
464
- * @public
465
- * @param {array|object} items
466
- * @returns {void}
467
- */
468
- prepend(t) {
469
- this.list.prepend(t);
470
- },
471
- /**
472
- * This will remove the selected rows.
473
- *
474
- * @returns {void}
475
- */
476
- beforeDestroy() {
477
- this.data.selectedRows = [];
478
- }
417
+ ])
418
+ ]);
479
419
  }
480
- ), st = d((t) => new ke(
481
- {
482
- /**
483
- * Renders the DataTable component.
484
- *
485
- * @returns {object}
486
- */
487
- render() {
488
- const e = t.rows, s = this.border !== !1 ? "border" : "";
489
- return o({ class: "w-full" }, [
490
- o({ class: `w-full rounded-md ${s} overflow-x-auto` }, [
491
- R({ class: "w-full" }, [
420
+ /**
421
+ * This will remove items from the list.
422
+ *
423
+ * @public
424
+ * @param {array} items
425
+ * @returns {void}
426
+ */
427
+ remove(e) {
428
+ this.list.remove(e);
429
+ }
430
+ /**
431
+ * This will set the items in the list.
432
+ *
433
+ * @public
434
+ * @param {array} rows
435
+ * @returns {void}
436
+ */
437
+ setRows(e) {
438
+ this.list.setRows(e);
439
+ }
440
+ /**
441
+ * This will append items to the list.
442
+ *
443
+ * @public
444
+ * @param {array|object} items
445
+ * @returns {void}
446
+ */
447
+ append(e) {
448
+ this.list.append(e);
449
+ }
450
+ /**
451
+ * This will mingle the new items with the old items.
452
+ *
453
+ * @public
454
+ * @param {Array<Object>} newItems
455
+ * @param {boolean} withDelete
456
+ * @returns {void}
457
+ */
458
+ mingle(e, s = !1) {
459
+ this.list.mingle(e, s);
460
+ }
461
+ /**
462
+ * This will prepend items to the list.
463
+ *
464
+ * @public
465
+ * @param {array|object} items
466
+ * @returns {void}
467
+ */
468
+ prepend(e) {
469
+ this.list.prepend(e);
470
+ }
471
+ /**
472
+ * This will remove the selected rows.
473
+ *
474
+ * @returns {void}
475
+ */
476
+ beforeDestroy() {
477
+ this.data.selectedRows = [];
478
+ }
479
+ }
480
+ const xe = (t) => new J({
481
+ cache: "list",
482
+ scrollContainer: t.scrollContainer,
483
+ loadMoreItems: t.loadMoreItems,
484
+ offset: t.offset,
485
+ limit: t.limit,
486
+ key: t.key,
487
+ data: t.data,
488
+ items: t.items,
489
+ rowItem: (e) => t.rowItem(e, t.selectRow),
490
+ class: "divide-y divide-border"
491
+ });
492
+ class ye extends ke {
493
+ /**
494
+ * Renders the DataTable component.
495
+ *
496
+ * @returns {object}
497
+ */
498
+ render() {
499
+ const e = this.rows, s = this.border !== !1 ? "border" : "";
500
+ return o({ class: "w-full" }, [
501
+ o({ class: `w-full rounded-md ${s} overflow-x-auto` }, [
502
+ W({ class: "w-full" }, [
503
+ // @ts-ignore
504
+ this.headers && $({ headers: this.headers, sort: (a) => this.sortRows(a) }),
505
+ // @ts-ignore
506
+ this.customHeader ?? null,
507
+ xe({
508
+ // @ts-ignore
509
+ scrollContainer: this.scrollContainer,
510
+ // @ts-ignore
511
+ loadMoreItems: this.loadMoreItems,
512
+ // @ts-ignore
513
+ offset: this.offset,
514
+ // @ts-ignore
515
+ limit: this.limit,
516
+ // @ts-ignore
517
+ class: this.class,
518
+ // @ts-ignore
519
+ data: this.tableData,
492
520
  // @ts-ignore
493
- t.headers && j({ headers: t.headers, sort: (n) => this.sortRows(n) }),
521
+ key: this.key,
522
+ items: e,
494
523
  // @ts-ignore
495
- t.customHeader ?? null,
496
- new J({
497
- scrollContainer: t.scrollContainer,
498
- loadMoreItems: t.loadMoreItems,
499
- offset: t.offset,
500
- limit: t.limit,
501
- class: t.class,
502
- containerClass: t.containerClass ?? "",
503
- data: t.data,
504
- // @ts-ignore
505
- key: t.key,
506
- items: e,
507
- // @ts-ignore
508
- selectRow: this.selectRow.bind(this),
509
- // @ts-ignore
510
- rowItem: t.rowItem
511
- })
512
- ])
524
+ selectRow: this.selectRow.bind(this),
525
+ // @ts-ignore
526
+ rowItem: this.rowItem
527
+ })
513
528
  ])
514
- ]);
515
- }
529
+ ])
530
+ ]);
516
531
  }
517
- )), xe = d(({ name: t, email: e }) => o({ class: "min-w-0 flex-auto" }, [
518
- m({ class: "text-base font-semibold leading-6 m-0" }, t),
519
- m({ class: "truncate text-sm leading-5 text-muted-foreground m-0" }, e)
520
- ])), ye = () => o({ class: "flex items-center gap-x-1.5" }, [
532
+ }
533
+ const it = d((t) => new ye(
534
+ {
535
+ tableData: t.data,
536
+ scrollContainer: t.scrollContainer,
537
+ loadMoreItems: t.loadMoreItems,
538
+ offset: t.offset,
539
+ limit: t.limit,
540
+ class: t.class,
541
+ key: t.key,
542
+ rows: t.rows,
543
+ rowItem: t.rowItem,
544
+ headers: t.headers,
545
+ customHeader: t.customHeader,
546
+ border: t.border
547
+ }
548
+ )), ve = d(({ name: t, email: e }) => o({ class: "min-w-0 flex-auto" }, [
549
+ p({ class: "text-base font-semibold leading-6 m-0" }, t),
550
+ p({ class: "truncate text-sm leading-5 text-muted-foreground m-0" }, e)
551
+ ])), De = () => o({ class: "flex items-center gap-x-1.5" }, [
521
552
  o({ class: "flex-none rounded-full bg-emerald-500/20 p-1" }, [
522
553
  o({ class: "h-1.5 w-1.5 rounded-full bg-emerald-500" })
523
554
  ]),
524
- m({ class: "text-xs leading-5 text-gray-500" }, "Online")
525
- ]), ve = (t) => m({ class: "text-xs leading-5 text-muted-foreground" }, [
555
+ p({ class: "text-xs leading-5 text-gray-500" }, "Online")
556
+ ]), Se = (t) => p({ class: "text-xs leading-5 text-muted-foreground" }, [
526
557
  v("Last seen "),
527
- K({ datetime: t }, "3h ago")
528
- ]), De = (t, e) => t === "online" ? ye() : ve(e), Se = d(({ role: t, lastSeen: e, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
529
- m({ class: "text-sm leading-6 m-0" }, t),
530
- De(s, e)
531
- ])), Le = (t) => t.split(" ").map((s) => s[0]).join(""), Ce = d((t) => D({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
558
+ q({ datetime: t }, "3h ago")
559
+ ]), Le = (t, e) => t === "online" ? De() : Se(e), Ce = d(({ role: t, lastSeen: e, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
560
+ p({ class: "text-sm leading-6 m-0" }, t),
561
+ Le(s, e)
562
+ ])), Ie = (t) => t.split(" ").map((s) => s[0]).join(""), Be = d((t) => D({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
532
563
  o({ class: "flex min-w-0 gap-x-4" }, [
533
- ae({ src: t.image, alt: t.name, fallbackText: Le(t.name) }),
534
- xe({ name: t.name, email: t.email })
564
+ ie({ src: t.image, alt: t.name, fallbackText: Ie(t.name) }),
565
+ ve({ name: t.name, email: t.email })
535
566
  ]),
536
- Se({
567
+ Ce({
537
568
  role: t.role,
538
569
  lastSeen: t.lastSeen,
539
570
  status: t.status
@@ -544,15 +575,15 @@ const pe = (t, e) => {
544
575
  items: t.users,
545
576
  role: "list",
546
577
  class: "divide-y divide-border",
547
- rowItem: Ce
548
- })), Be = (t, e) => e.includes(t), Ie = (t, e, s) => t.exact ? s === e : Be(e, s), Te = ({ text: t, href: e, exact: s, hidden: n }) => new z({
578
+ rowItem: Be
579
+ })), Te = (t, e) => e.includes(t), Me = (t, e, s) => t.exact ? s === e : Te(e, s), Re = ({ text: t, href: e, exact: s, hidden: a }) => new O({
549
580
  text: t,
550
581
  href: e,
551
582
  exact: s,
552
583
  dataSet: ["selected", ["state", !0, "active"]],
553
- class: `${n ? "hidden" : "inline-flex"} items-center justify-center whitespace-nowrap px-3 py-1.5 text-sm font-medium transition-all rounded-md focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring focus-visible:ring-offset-background hover:bg-primary hover:text-primary-foreground disabled:opacity-50 disabled:pointer-events-none data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm`
584
+ class: `${a ? "hidden" : "inline-flex"} items-center justify-center whitespace-nowrap px-3 py-1.5 text-sm font-medium transition-all rounded-md focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring focus-visible:ring-offset-background hover:bg-primary hover:text-primary-foreground disabled:opacity-50 disabled:pointer-events-none data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm`
554
585
  });
555
- class at extends u {
586
+ class ot extends h {
556
587
  /**
557
588
  * This will declare the props for the compiler.
558
589
  *
@@ -605,10 +636,10 @@ class at extends u {
605
636
  updateLinks(e) {
606
637
  let s = !1;
607
638
  this.deactivateAllLinks();
608
- for (const n of this.links) {
609
- if (!n.rendered)
639
+ for (const a of this.links) {
640
+ if (!a.rendered)
610
641
  continue;
611
- Ie(n, n.getLinkPath(), e) ? (this.updateLink(n, !0), s = !0) : this.updateLink(n, !1);
642
+ Me(a, a.getLinkPath(), e) ? (this.updateLink(a, !0), s = !0) : this.updateLink(a, !1);
612
643
  }
613
644
  !s && this.links[0] && this.updateLink(this.links[0], !0);
614
645
  }
@@ -637,9 +668,9 @@ class at extends u {
637
668
  * @param {object} option
638
669
  * @returns {object}
639
670
  */
640
- addLink({ label: e, href: s, exact: n, hidden: a }) {
641
- const i = Te({ text: e, href: s, exact: n, hidden: a });
642
- return this.links.push(i), i;
671
+ addLink({ label: e, href: s, exact: a, hidden: i }) {
672
+ const n = Re({ text: e, href: s, exact: a, hidden: i });
673
+ return this.links.push(n), n;
643
674
  }
644
675
  /**
645
676
  * This will clear the links.
@@ -650,7 +681,7 @@ class at extends u {
650
681
  this.links = [];
651
682
  }
652
683
  }
653
- const it = d((t) => {
684
+ const lt = d((t) => {
654
685
  const e = t.margin || "m-4 ml-0";
655
686
  return o({ class: `flex-none ${e}` }, [
656
687
  C({
@@ -664,11 +695,11 @@ const it = d((t) => {
664
695
  t.backUrl && app.navigate(t.backUrl);
665
696
  }
666
697
  }, [
667
- $(w.arrows.left)
698
+ N(w.arrows.left)
668
699
  ])
669
700
  ]);
670
701
  });
671
- class A extends u {
702
+ class j extends h {
672
703
  /**
673
704
  * This will declare the props for the compiler.
674
705
  *
@@ -755,13 +786,13 @@ class A extends u {
755
786
  return this.children;
756
787
  }
757
788
  }
758
- N.addType("dockableOverlay", (t) => {
789
+ z.addType("dockableOverlay", (t) => {
759
790
  if (!t)
760
791
  return;
761
792
  const e = t.component;
762
793
  e && e.rendered === !0 && e.state.docked === !1 && e.destroy();
763
794
  });
764
- class ot extends A {
795
+ class rt extends j {
765
796
  /**
766
797
  * This will stop presistence.
767
798
  *
@@ -783,8 +814,8 @@ class ot extends A {
783
814
  ["loading", {
784
815
  loading: !0
785
816
  }],
786
- ["docked", (s, n) => {
787
- s ? (n.className = this.getDockedClassName(), e.appendChild(n), document.documentElement.style.overflowY = "auto") : (n.className = this.getClassName(), app.root.appendChild(n), document.documentElement.style.overflowY = "hidden");
817
+ ["docked", (s, a) => {
818
+ s ? (a.className = this.getDockedClassName(), e.appendChild(a), document.documentElement.style.overflowY = "auto") : (a.className = this.getClassName(), app.root.appendChild(a), document.documentElement.style.overflowY = "hidden");
788
819
  }]
789
820
  ]
790
821
  },
@@ -827,7 +858,7 @@ class ot extends A {
827
858
  * @returns {void}
828
859
  */
829
860
  afterSetup() {
830
- N.add(
861
+ z.add(
831
862
  this.container,
832
863
  "dockableOverlay",
833
864
  {
@@ -870,7 +901,7 @@ class ot extends A {
870
901
  document.documentElement.style.overflowY = "auto";
871
902
  }
872
903
  }
873
- class lt extends A {
904
+ class ct extends j {
874
905
  /**
875
906
  * This will get the overlay type.
876
907
  *
@@ -889,7 +920,7 @@ class lt extends A {
889
920
  this.container = e, this.initialize();
890
921
  }
891
922
  }
892
- const We = d(({ index: t, click: e, state: s }, n) => D({
923
+ const We = d(({ index: t, click: e, state: s }, a) => D({
893
924
  class: "p-2 cursor-pointer hover:bg-muted/50",
894
925
  onState: [
895
926
  [s, "selectedIndex", {
@@ -898,10 +929,10 @@ const We = d(({ index: t, click: e, state: s }, n) => D({
898
929
  }]
899
930
  ],
900
931
  click: () => e(t)
901
- }, n)), Pe = d(({ selectOption: t, state: e }) => b({
932
+ }, a)), Pe = d(({ selectOption: t, state: e }) => b({
902
933
  class: "border rounded-md list-none m-0 p-0 max-h-[400px] overflow-y-auto",
903
- for: ["filteredOptions", (s, n) => We({ index: n, click: t, state: e }, s.label)]
904
- })), Re = d((t) => o({ class: "relative flex items-center" }, [
934
+ for: ["filteredOptions", (s, a) => We({ index: a, click: t, state: e }, s.label)]
935
+ })), Oe = d((t) => o({ class: "relative flex items-center" }, [
905
936
  se({
906
937
  cache: "input",
907
938
  placeholder: t.placeholder ?? "Search...",
@@ -913,22 +944,22 @@ const We = d(({ index: t, click: e, state: s }, n) => D({
913
944
  keydown: (e) => typeof t.handleKeyDown == "function" && t.handleKeyDown(e)
914
945
  }),
915
946
  t.icon && o({ class: "absolute right-0 mr-2" }, [
916
- $(t.icon)
947
+ N(t.icon)
917
948
  ])
918
- ])), Oe = (t) => o({
949
+ ])), ze = (t) => o({
919
950
  class: "relative flex fle-auto flex-col",
920
- onState: ["open", (e, s, n) => {
951
+ onState: ["open", (e, s, a) => {
921
952
  if (e)
922
- return new ie({
953
+ return new ne({
923
954
  cache: "dropdown",
924
- parent: n,
925
- button: n.input,
955
+ parent: a,
956
+ button: a.input,
926
957
  size: "xl"
927
958
  }, [
928
959
  Pe(t)
929
960
  ]);
930
961
  }]
931
- }), rt = M(
962
+ }), dt = V(
932
963
  {
933
964
  /**
934
965
  * This will set up the data object.
@@ -963,7 +994,7 @@ const We = d(({ index: t, click: e, state: s }, n) => D({
963
994
  const t = this.data.filteredOptions;
964
995
  let { searchQuery: e } = this.state;
965
996
  e = e.toLowerCase();
966
- const s = t.findIndex((n) => n.label.toLowerCase() === e);
997
+ const s = t.findIndex((a) => a.label.toLowerCase() === e);
967
998
  s >= 0 && (this.state.selectedIndex = s);
968
999
  },
969
1000
  /**
@@ -1025,7 +1056,7 @@ const We = d(({ index: t, click: e, state: s }, n) => D({
1025
1056
  */
1026
1057
  render() {
1027
1058
  return o({ class: "relative w-full max-w-md" }, [
1028
- Re({
1059
+ Oe({
1029
1060
  // @ts-ignore
1030
1061
  state: this.state,
1031
1062
  // @ts-ignore
@@ -1037,7 +1068,7 @@ const We = d(({ index: t, click: e, state: s }, n) => D({
1037
1068
  // @ts-ignore
1038
1069
  handleKeyDown: this.handleKeyDown.bind(this)
1039
1070
  }),
1040
- Oe({
1071
+ ze({
1041
1072
  // @ts-ignore
1042
1073
  state: this.state,
1043
1074
  // @ts-ignore
@@ -1048,7 +1079,7 @@ const We = d(({ index: t, click: e, state: s }, n) => D({
1048
1079
  ]);
1049
1080
  }
1050
1081
  }
1051
- ), Me = (t) => D(
1082
+ ), Ne = (t) => D(
1052
1083
  {
1053
1084
  class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-sm text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm",
1054
1085
  dataSet: ["selected", ["state", t.value, "active"]]
@@ -1060,10 +1091,10 @@ const We = d(({ index: t, click: e, state: s }, n) => D({
1060
1091
  click: (e) => t.callBack(t.value)
1061
1092
  }, t.label)
1062
1093
  ]
1063
- ), ze = (t, e) => (t.callBack = e, Me(t)), Ne = (t) => S({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1064
- b({ class: "flex flex-auto flex-row", map: [t.options, (e) => ze(e, t.callBack)] })
1094
+ ), $e = (t, e) => (t.callBack = e, Ne(t)), je = (t) => S({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1095
+ b({ class: "flex flex-auto flex-row", map: [t.options, (e) => $e(e, t.callBack)] })
1065
1096
  ]);
1066
- class ct extends u {
1097
+ class ht extends h {
1067
1098
  /**
1068
1099
  * This will declare the props for the compiler.
1069
1100
  *
@@ -1080,12 +1111,12 @@ class ct extends u {
1080
1111
  render() {
1081
1112
  const e = this.select.bind(this);
1082
1113
  return o({ class: "" }, [
1083
- Ne({
1114
+ je({
1084
1115
  class: this.class,
1085
1116
  options: this.options,
1086
1117
  callBack: e
1087
1118
  }),
1088
- O({
1119
+ P({
1089
1120
  class: "tab-content",
1090
1121
  onState: ["selected", this.updateContent.bind(this)]
1091
1122
  })
@@ -1128,11 +1159,11 @@ class ct extends u {
1128
1159
  const s = this.options;
1129
1160
  if (!s || s.length < 1)
1130
1161
  return;
1131
- const n = s[0];
1132
- for (const a of s)
1133
- if (a.value === e)
1134
- return a.layout;
1135
- return n.layout;
1162
+ const a = s[0];
1163
+ for (const i of s)
1164
+ if (i.value === e)
1165
+ return i.layout;
1166
+ return a.layout;
1136
1167
  }
1137
1168
  /**
1138
1169
  * This will setup the states.
@@ -1144,14 +1175,14 @@ class ct extends u {
1144
1175
  return {
1145
1176
  selected: {
1146
1177
  state: this.getFirstValue(),
1147
- callBack(n) {
1148
- s === "function" && e(n);
1178
+ callBack(a) {
1179
+ s === "function" && e(a);
1149
1180
  }
1150
1181
  }
1151
1182
  };
1152
1183
  }
1153
1184
  }
1154
- const $e = (t) => D(
1185
+ const Ae = (t) => D(
1155
1186
  {
1156
1187
  class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-sm text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm",
1157
1188
  dataSet: ["selected", ["state", t.value, "active"]]
@@ -1164,10 +1195,10 @@ const $e = (t) => D(
1164
1195
  disabled: t.disabled
1165
1196
  }, t.label)
1166
1197
  ]
1167
- ), je = (t, e) => (t.callBack = e, $e(t)), Ae = (t) => S({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1168
- b({ class: "flex flex-auto flex-row", map: [t.options, (e) => je(e, t.callBack)] })
1198
+ ), Ue = (t, e) => (t.callBack = e, Ae(t)), Ye = (t) => S({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
1199
+ b({ class: "flex flex-auto flex-row", map: [t.options, (e) => Ue(e, t.callBack)] })
1169
1200
  ]);
1170
- class dt extends u {
1201
+ class ut extends h {
1171
1202
  /**
1172
1203
  * This will declare the props for the compiler.
1173
1204
  *
@@ -1183,7 +1214,7 @@ class dt extends u {
1183
1214
  */
1184
1215
  render() {
1185
1216
  const e = this.select.bind(this);
1186
- return Ae({
1217
+ return Ye({
1187
1218
  class: this.class,
1188
1219
  options: this.options,
1189
1220
  callBack: e
@@ -1210,17 +1241,17 @@ class dt extends u {
1210
1241
  };
1211
1242
  }
1212
1243
  }
1213
- const Ue = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), Ye = (t, e) => {
1244
+ const Fe = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), Ee = (t, e) => {
1214
1245
  const s = t.getLinkPath();
1215
- return t.exact ? e === s : Ue(s, e);
1216
- }, Fe = ({ text: t, href: e, exact: s }) => new z({
1246
+ return t.exact ? e === s : Fe(s, e);
1247
+ }, He = ({ text: t, href: e, exact: s }) => new O({
1217
1248
  text: t,
1218
1249
  href: e,
1219
1250
  exact: s,
1220
1251
  dataSet: ["selected", ["state", !0, "active"]],
1221
1252
  class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm"
1222
1253
  });
1223
- class Ee extends u {
1254
+ class Qe extends h {
1224
1255
  /**
1225
1256
  * This will declare the props for the compiler.
1226
1257
  *
@@ -1268,14 +1299,14 @@ class Ee extends u {
1268
1299
  * @returns {void}
1269
1300
  */
1270
1301
  updateLinks(e) {
1271
- let s = !1, n = this.links[0];
1302
+ let s = !1, a = this.links[0];
1272
1303
  this.deactivateAllLinks();
1273
- for (const a of this.links)
1274
- if (a.rendered !== !1 && (s = Ye(a, e), s === !0)) {
1275
- this.updateLink(a, !0);
1304
+ for (const i of this.links)
1305
+ if (i.rendered !== !1 && (s = Ee(i, e), s === !0)) {
1306
+ this.updateLink(i, !0);
1276
1307
  break;
1277
1308
  }
1278
- s !== !0 && n && this.updateLink(n, !0);
1309
+ s !== !0 && a && this.updateLink(a, !0);
1279
1310
  }
1280
1311
  /**
1281
1312
  * This will deactivate all links.
@@ -1302,9 +1333,9 @@ class Ee extends u {
1302
1333
  * @param {object} option
1303
1334
  * @returns {object}
1304
1335
  */
1305
- addLink({ label: e, href: s, exact: n }) {
1306
- const a = Fe({ text: e, href: s, exact: n });
1307
- return this.links.push(a), a;
1336
+ addLink({ label: e, href: s, exact: a }) {
1337
+ const i = He({ text: e, href: s, exact: a });
1338
+ return this.links.push(i), i;
1308
1339
  }
1309
1340
  /**
1310
1341
  * This will remove all the links.
@@ -1315,7 +1346,7 @@ class Ee extends u {
1315
1346
  this.links = [];
1316
1347
  }
1317
1348
  }
1318
- class ht extends u {
1349
+ class ft extends h {
1319
1350
  /**
1320
1351
  * This will declare the props for the compiler.
1321
1352
  *
@@ -1331,11 +1362,11 @@ class ht extends u {
1331
1362
  */
1332
1363
  render() {
1333
1364
  return o({ class: "tab-panel" }, [
1334
- new Ee({
1365
+ new Qe({
1335
1366
  class: this.class,
1336
1367
  options: this.options
1337
1368
  }),
1338
- O({
1369
+ P({
1339
1370
  class: "tab-content",
1340
1371
  switch: this.addGroup()
1341
1372
  })
@@ -1348,9 +1379,9 @@ class ht extends u {
1348
1379
  */
1349
1380
  addGroup() {
1350
1381
  let e;
1351
- const s = [], n = this.options;
1352
- for (let a = 0, i = n.length; a < i; a++)
1353
- e = n[a], s.push(
1382
+ const s = [], a = this.options;
1383
+ for (let i = 0, n = a.length; i < n; i++)
1384
+ e = a[i], s.push(
1354
1385
  {
1355
1386
  uri: e.uri || e.href,
1356
1387
  component: e.component,
@@ -1361,7 +1392,7 @@ class ht extends u {
1361
1392
  return s;
1362
1393
  }
1363
1394
  }
1364
- class He extends u {
1395
+ class Xe extends h {
1365
1396
  /**
1366
1397
  * Runs before rendering, sets up defaults, a timer for drawing,
1367
1398
  * and basic canvas properties.
@@ -1379,7 +1410,7 @@ class He extends u {
1379
1410
  * @returns {object} Layout definition for the canvas.
1380
1411
  */
1381
1412
  render() {
1382
- return G({
1413
+ return K({
1383
1414
  style: "touch-action: none; -webkit-user-select: none; -webkit-touch-callout: none;"
1384
1415
  });
1385
1416
  }
@@ -1409,13 +1440,13 @@ class He extends u {
1409
1440
  * @returns {Array} An array of [eventName, element, callback] definitions.
1410
1441
  */
1411
1442
  setupEvents() {
1412
- const e = this.panel, s = this.pointerPosition.bind(this), n = this.pointerUp.bind(this), a = this.pointerDown.bind(this), i = this.resize.bind(this), l = { passive: !1 };
1443
+ const e = this.panel, s = this.pointerPosition.bind(this), a = this.pointerUp.bind(this), i = this.pointerDown.bind(this), n = this.resize.bind(this), l = { passive: !1 };
1413
1444
  return [
1414
1445
  ["pointermove", e, s, l],
1415
- ["pointerup", e, n],
1416
- ["pointerdown", e, a, l],
1417
- ["pointerout", e, n],
1418
- ["resize", window, i]
1446
+ ["pointerup", e, a],
1447
+ ["pointerdown", e, i, l],
1448
+ ["pointerout", e, a],
1449
+ ["resize", window, n]
1419
1450
  ];
1420
1451
  }
1421
1452
  /**
@@ -1425,15 +1456,15 @@ class He extends u {
1425
1456
  * @returns {void}
1426
1457
  */
1427
1458
  getEventPosition(e) {
1428
- let s, n;
1429
- const a = this.canvas, i = a.width / parseInt(a.style.width), l = a.getBoundingClientRect();
1459
+ let s, a;
1460
+ const i = this.canvas, n = i.width / parseInt(i.style.width), l = i.getBoundingClientRect();
1430
1461
  if (e.touches && e.touches.length) {
1431
1462
  const f = e.touches[0];
1432
- s = f.clientX, n = f.clientY;
1463
+ s = f.clientX, a = f.clientY;
1433
1464
  } else
1434
- s = e.x || e.clientX, n = e.y || e.clientY;
1435
- const h = parseInt((s - l.left) * i), c = parseInt((n - l.top) * i);
1436
- this.mouse.x = h, this.mouse.y = c;
1465
+ s = e.x || e.clientX, a = e.y || e.clientY;
1466
+ const u = parseInt((s - l.left) * n), c = parseInt((a - l.top) * n);
1467
+ this.mouse.x = u, this.mouse.y = c;
1437
1468
  }
1438
1469
  /**
1439
1470
  * Called when the pointer goes down on the canvas.
@@ -1444,8 +1475,8 @@ class He extends u {
1444
1475
  */
1445
1476
  pointerDown(e) {
1446
1477
  e.preventDefault(), e.stopPropagation(), this.getEventPosition(e);
1447
- const { ctx: s, mouse: n } = this;
1448
- s.beginPath(), s.moveTo(n.x, n.y), n.status = "down", this.startTimer();
1478
+ const { ctx: s, mouse: a } = this;
1479
+ s.beginPath(), s.moveTo(a.x, a.y), a.status = "down", this.startTimer();
1449
1480
  }
1450
1481
  /**
1451
1482
  * Called when the pointer goes up or leaves the canvas area.
@@ -1473,12 +1504,12 @@ class He extends u {
1473
1504
  * @returns {void}
1474
1505
  */
1475
1506
  resize() {
1476
- const { canvas: e, ctx: s } = this, n = e.toDataURL();
1477
- if (this.scale(), this.setupBackground(s), n !== "data:,") {
1478
- const a = new window.Image();
1479
- B.on("load", a, function i() {
1480
- s.drawImage(a, 0, 0), B.off("load", a, i);
1481
- }), a.src = n;
1507
+ const { canvas: e, ctx: s } = this, a = e.toDataURL();
1508
+ if (this.scale(), this.setupBackground(s), a !== "data:,") {
1509
+ const i = new window.Image();
1510
+ I.on("load", i, function n() {
1511
+ s.drawImage(i, 0, 0), I.off("load", i, n);
1512
+ }), i.src = a;
1482
1513
  }
1483
1514
  this.draw();
1484
1515
  }
@@ -1497,7 +1528,7 @@ class He extends u {
1497
1528
  * @returns {void}
1498
1529
  */
1499
1530
  noScaleResize() {
1500
- const e = I.getSize(container);
1531
+ const e = B.getSize(container);
1501
1532
  this.width = canvas.width = e.width, this.height = canvas.height = e.height;
1502
1533
  }
1503
1534
  /**
@@ -1507,13 +1538,13 @@ class He extends u {
1507
1538
  * @returns {void}
1508
1539
  */
1509
1540
  scale() {
1510
- const e = this.canvas, s = this.container, n = I.getSize(s), a = this.targetSize, i = a.width, l = a.height;
1511
- let h = i + "px", c = l + "px";
1512
- if (this.width = e.width = i, this.height = e.height = l, n.width !== 0 && n.height !== 0) {
1513
- const f = n.width, g = n.height, r = f / i, p = g / l, k = Math.min(r, p);
1514
- h = i * k + "px", c = l * k + "px";
1541
+ const e = this.canvas, s = this.container, a = B.getSize(s), i = this.targetSize, n = i.width, l = i.height;
1542
+ let u = n + "px", c = l + "px";
1543
+ if (this.width = e.width = n, this.height = e.height = l, a.width !== 0 && a.height !== 0) {
1544
+ const f = a.width, g = a.height, r = f / n, m = g / l, k = Math.min(r, m);
1545
+ u = n * k + "px", c = l * k + "px";
1515
1546
  }
1516
- e.style.width = h, e.style.height = c;
1547
+ e.style.width = u, e.style.height = c;
1517
1548
  }
1518
1549
  /**
1519
1550
  * Main drawing loop. If the mouse is down, adds a line
@@ -1533,8 +1564,8 @@ class He extends u {
1533
1564
  drawBottomLine(e) {
1534
1565
  const s = this.canvas;
1535
1566
  e.globalAlpha = 1, e.shadowBlur = 0;
1536
- const n = this.margin.x, a = this.height - this.margin.y;
1537
- e.beginPath(), e.moveTo(n, a), e.lineTo(s.width - this.margin.x, a), e.lineWidth = this.baseLineWidth, e.strokeStyle = this.baseStrokeColor, e.stroke(), e.closePath();
1567
+ const a = this.margin.x, i = this.height - this.margin.y;
1568
+ e.beginPath(), e.moveTo(a, i), e.lineTo(s.width - this.margin.x, i), e.lineWidth = this.baseLineWidth, e.strokeStyle = this.baseStrokeColor, e.stroke(), e.closePath();
1538
1569
  }
1539
1570
  /**
1540
1571
  * Adds a line to the current path, updating the 'signed' status.
@@ -1545,10 +1576,10 @@ class He extends u {
1545
1576
  * @param {string} color The stroke color.
1546
1577
  * @returns {void}
1547
1578
  */
1548
- addLine(e, s, n, a) {
1579
+ addLine(e, s, a, i) {
1549
1580
  this.signed || (this.signed = !0);
1550
- const i = Math.round(s), l = Math.round(n);
1551
- e.lineWidth = this.lineWidth, e.strokeStyle = a, e.lineTo(i, l), e.stroke();
1581
+ const n = Math.round(s), l = Math.round(a);
1582
+ e.lineWidth = this.lineWidth, e.strokeStyle = i, e.lineTo(n, l), e.stroke();
1552
1583
  }
1553
1584
  /**
1554
1585
  * Clears the canvas, sets signed to false, and re-initializes
@@ -1587,7 +1618,7 @@ class He extends u {
1587
1618
  this.timer.stop(), this.status = "stopped";
1588
1619
  }
1589
1620
  }
1590
- class ut extends u {
1621
+ class gt extends h {
1591
1622
  /**
1592
1623
  * Sets up default properties for the signature panel.
1593
1624
  *
@@ -1604,7 +1635,7 @@ class ut extends u {
1604
1635
  */
1605
1636
  render() {
1606
1637
  return o({ class: "signature-panel relative flex flex-auto overflow-hidden select-none" }, [
1607
- ne({
1638
+ ae({
1608
1639
  cache: "hiddenInput",
1609
1640
  required: !0,
1610
1641
  bind: this.path + ".data"
@@ -1616,7 +1647,7 @@ class ut extends u {
1616
1647
  click: this.reset.bind(this)
1617
1648
  })
1618
1649
  ]),
1619
- new He({
1650
+ new Xe({
1620
1651
  cache: "canvasLayer",
1621
1652
  margin: this.margin,
1622
1653
  targetSize: this.targetSize,
@@ -1666,34 +1697,34 @@ class ut extends u {
1666
1697
  }
1667
1698
  }
1668
1699
  export {
1669
- it as B,
1670
- me as C,
1700
+ lt as B,
1701
+ pe as C,
1671
1702
  be as D,
1672
1703
  we as H,
1673
- lt as I,
1674
- at as N,
1675
- A as O,
1676
- Je as P,
1677
- st as S,
1678
- j as T,
1679
- Ce as U,
1680
- tt as W,
1704
+ ct as I,
1705
+ ot as N,
1706
+ j as O,
1707
+ et as P,
1708
+ it as S,
1709
+ $ as T,
1710
+ Be as U,
1711
+ at as W,
1681
1712
  ce as a,
1682
1713
  T as b,
1683
1714
  le as c,
1684
- Ze as d,
1685
- et as e,
1715
+ tt as d,
1716
+ st as e,
1686
1717
  he as f,
1687
1718
  re as g,
1688
1719
  fe as h,
1689
1720
  ge as i,
1690
1721
  ke as j,
1691
1722
  nt as k,
1692
- ot as l,
1693
- rt as m,
1694
- ct as n,
1695
- dt as o,
1696
- Ee as p,
1697
- ht as q,
1698
- ut as r
1723
+ rt as l,
1724
+ dt as m,
1725
+ ht as n,
1726
+ ut as o,
1727
+ Qe as p,
1728
+ ft as q,
1729
+ gt as r
1699
1730
  };