@wishbone-media/spark 0.27.0 → 0.28.0

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.
package/dist/index.js CHANGED
@@ -1,20 +1,20 @@
1
- import { computed as $, resolveComponent as O, createElementBlock as h, openBlock as m, normalizeClass as H, createElementVNode as f, createCommentVNode as L, createVNode as b, unref as k, renderSlot as B, reactive as U, Fragment as R, renderList as z, toDisplayString as M, createBlock as V, resolveDynamicComponent as N, markRaw as me, ref as E, watch as I, Transition as dt, withCtx as T, normalizeProps as pt, mergeProps as Z, createTextVNode as F, Teleport as ft, TransitionGroup as ie, inject as Fe, provide as mt, toHandlers as Oe, onMounted as _e, withModifiers as ee, useSlots as Be, onUnmounted as ht, withDirectives as gt, vShow as yt, h as Se } from "vue";
2
- import { icon as Q, library as De } from "@fortawesome/fontawesome-svg-core";
3
- import { FontAwesomeIcon as vt } from "@fortawesome/vue-fontawesome";
4
- import { faCircleDot as ze, faEyeDropper as je, faAnglesLeft as Ie, faAnglesRight as Ne, faStar as Ze, faSpinnerThird as qe, faCircle as bt, faFile as be, faCalendar as Ue, faArrowUp as Ke, faArrowDown as Ge, faPlus as We, faInbox as xt, faCloudDownload as kt, faBolt as wt, faUndo as _t, faEye as St, faSignOut as Ct, faXmark as xe, faTrash as Ye, faTimes as $t, faStreetView as Tt, faSortUp as Pt, faSortDown as Lt, faSort as Mt, faScaleBalanced as Ht, faSatelliteDish as Vt, faLayerPlus as Rt, faLaptopMobile as Et, faInfoCircle as At, faGripDotsVertical as Xe, faGearComplex as Ft, faFlag as Ot, faFaceSmileWink as Bt, faFaceSmileRelaxed as Dt, faExclamationTriangle as zt, faEllipsisVertical as jt, faEllipsis as It, faEdit as Nt, faComments as Zt, faCircleXmark as qt, faCircleUser as Ut, faChevronUp as Kt, faChevronRight as Je, faChevronLeft as Qe, faChevronDown as et, faCheckCircle as Gt, faCheck as ke, faBullhorn as Wt, faBellRing as Yt, faBarsSort as Xt, faArrowRightToLine as Jt, faArrowLeftToLine as Qt } from "@fortawesome/pro-regular-svg-icons";
1
+ import { computed as $, resolveComponent as F, createElementBlock as g, openBlock as m, normalizeClass as V, createElementVNode as f, createCommentVNode as T, createVNode as k, unref as _, renderSlot as D, reactive as K, Fragment as E, renderList as z, toDisplayString as M, createBlock as H, resolveDynamicComponent as Z, markRaw as me, ref as R, watch as N, Transition as dt, withCtx as L, normalizeProps as pt, mergeProps as q, createTextVNode as O, Teleport as ft, TransitionGroup as ie, inject as _e, provide as mt, withModifiers as U, toHandlers as Oe, onMounted as Se, useSlots as De, onUnmounted as ht, withDirectives as gt, vShow as yt, h as Ce } from "vue";
2
+ import { icon as ee, library as Be } from "@fortawesome/fontawesome-svg-core";
3
+ import { FontAwesomeIcon as bt } from "@fortawesome/vue-fontawesome";
4
+ import { faCircleDot as je, faEyeDropper as ze, faAnglesLeft as Ie, faAnglesRight as Ne, faStar as Ze, faSpinnerThird as qe, faCircle as vt, faFile as ve, faCalendar as Ue, faArrowUp as Ke, faArrowDown as Ge, faPlus as We, faInbox as xt, faCloudDownload as kt, faBolt as wt, faUndo as _t, faEye as St, faSignOut as Ct, faXmark as xe, faTrash as Ye, faTimes as $t, faStreetView as Tt, faSortUp as Lt, faSortDown as Pt, faSort as Mt, faScaleBalanced as Vt, faSatelliteDish as Ht, faLayerPlus as Rt, faLaptopMobile as Ft, faInfoCircle as Et, faGripDotsVertical as Xe, faGearComplex as At, faFlag as Ot, faFaceSmileWink as Dt, faFaceSmileRelaxed as Bt, faExclamationTriangle as jt, faEllipsisVertical as zt, faEllipsis as It, faEdit as Nt, faComments as Zt, faCircleXmark as qt, faCircleUser as Ut, faChevronUp as Kt, faChevronRight as Je, faChevronLeft as Qe, faChevronDown as et, faCheckCircle as Gt, faCheck as ke, faBullhorn as Wt, faBellRing as Yt, faBarsSort as Xt, faArrowRightToLine as Jt, faArrowLeftToLine as Qt } from "@fortawesome/pro-regular-svg-icons";
5
5
  import { faSortUp as es, faSortDown as ts, faSort as ss } from "@fortawesome/pro-duotone-svg-icons";
6
6
  import { defineStore as ue } from "pinia";
7
- import { TransitionRoot as tt, Dialog as st, TransitionChild as fe, DialogPanel as ot } from "@headlessui/vue";
7
+ import { TransitionRoot as tt, Dialog as st, TransitionChild as fe, DialogPanel as at } from "@headlessui/vue";
8
8
  import he from "nprogress";
9
- import { range as os, get as J, find as as, has as rs } from "lodash";
9
+ import { range as as, get as Q, find as os, has as rs } from "lodash";
10
10
  import { HotTable as ns } from "@handsontable/vue3";
11
11
  import "handsontable/styles/handsontable.css";
12
12
  import "handsontable/styles/ht-theme-classic.css";
13
13
  import { registerPlugin as pe, AutoColumnSize as ls, CopyPaste as is, StretchColumns as cs, NestedHeaders as us } from "handsontable/plugins";
14
14
  import { registerAllCellTypes as ds } from "handsontable/cellTypes";
15
- import { useDebounceFn as at, watchDebounced as Ce } from "@vueuse/core";
15
+ import { useDebounceFn as ot, watchDebounced as $e } from "@vueuse/core";
16
16
  import { registerRenderer as ps, baseRenderer as fs } from "handsontable/renderers";
17
- import { useRouter as W, useRoute as le } from "vue-router";
17
+ import { useRouter as Y, useRoute as le } from "vue-router";
18
18
  import ne from "axios";
19
19
  const A = {
20
20
  farArrowLeftToLine: Qt,
@@ -33,21 +33,21 @@ const A = {
33
33
  farComments: Zt,
34
34
  farEdit: Nt,
35
35
  farEllipsis: It,
36
- farEllipsisVertical: jt,
37
- farExclamationTriangle: zt,
38
- farFaceSmileRelaxed: Dt,
39
- farFaceSmileWink: Bt,
36
+ farEllipsisVertical: zt,
37
+ farExclamationTriangle: jt,
38
+ farFaceSmileRelaxed: Bt,
39
+ farFaceSmileWink: Dt,
40
40
  farFlag: Ot,
41
- farGearComplex: Ft,
41
+ farGearComplex: At,
42
42
  farGripDotsVertical: Xe,
43
- farInfoCircle: At,
44
- farLaptopMobile: Et,
43
+ farInfoCircle: Et,
44
+ farLaptopMobile: Ft,
45
45
  farLayerPlus: Rt,
46
- farSatelliteDish: Vt,
47
- farScaleBalanced: Ht,
46
+ farSatelliteDish: Ht,
47
+ farScaleBalanced: Vt,
48
48
  farSort: Mt,
49
- farSortDown: Lt,
50
- farSortUp: Pt,
49
+ farSortDown: Pt,
50
+ farSortUp: Lt,
51
51
  farStreetView: Tt,
52
52
  farTimes: $t,
53
53
  farTrash: Ye,
@@ -66,17 +66,17 @@ const A = {
66
66
  farArrowDown: Ge,
67
67
  farArrowUp: Ke,
68
68
  farCalendar: Ue,
69
- farFile: be,
70
- farCircle: bt,
69
+ farFile: ve,
70
+ farCircle: vt,
71
71
  farSpinner: qe,
72
72
  farStar: Ze,
73
73
  farAnglesRight: Ne,
74
74
  farAnglesLeft: Ie,
75
- farEyeDropper: je,
76
- farCircleDot: ze
77
- }, Ln = Object.fromEntries(
75
+ farEyeDropper: ze,
76
+ farCircleDot: je
77
+ }, An = Object.fromEntries(
78
78
  Object.entries(A).map(([e, s]) => {
79
- const t = Q(s);
79
+ const t = ee(s);
80
80
  return [e, t?.html?.[0] || ""];
81
81
  })
82
82
  ), ms = {
@@ -88,10 +88,10 @@ const A = {
88
88
  checkboxDecorator: ke,
89
89
  date: Ue,
90
90
  dragHandle: Xe,
91
- fileItem: be,
91
+ fileItem: ve,
92
92
  fileRemove: xe,
93
- noFiles: be,
94
- radioDecorator: ze,
93
+ noFiles: ve,
94
+ radioDecorator: je,
95
95
  // Circle with dot for radio indicator
96
96
  select: et,
97
97
  spinner: qe,
@@ -101,31 +101,31 @@ const A = {
101
101
  right: Je,
102
102
  left: Qe,
103
103
  rewind: Ie,
104
- color: je
105
- }, Mn = Object.fromEntries(
104
+ color: ze
105
+ }, On = Object.fromEntries(
106
106
  Object.entries(ms).map(([e, s]) => {
107
- const t = Q(s);
107
+ const t = ee(s);
108
108
  return [e, t?.html?.[0] || ""];
109
109
  })
110
110
  );
111
- function Hn(e) {
111
+ function Dn(e) {
112
112
  const s = A[e];
113
113
  if (s) {
114
- const t = Q(s);
114
+ const t = ee(s);
115
115
  return Promise.resolve(t?.html?.[0] || void 0);
116
116
  }
117
117
  return Promise.resolve(void 0);
118
118
  }
119
- function Vn(e) {
120
- Object.assign(A, e), De.add(...Object.values(e));
119
+ function Bn(e) {
120
+ Object.assign(A, e), Be.add(...Object.values(e));
121
121
  }
122
- function Rn(e) {
123
- De.add(...Object.values(A)), e.component("FontAwesomeIcon", vt);
122
+ function jn(e) {
123
+ Be.add(...Object.values(A)), e.component("FontAwesomeIcon", bt);
124
124
  }
125
- const hs = { class: "flex items-center" }, gs = { class: "shrink-0 self-start" }, ys = { class: "ml-3" }, vs = {
125
+ const hs = { class: "flex items-center" }, gs = { class: "shrink-0 self-start" }, ys = { class: "ml-3" }, bs = {
126
126
  key: 0,
127
127
  class: "ml-auto pl-3 pt-1 self-start"
128
- }, bs = { class: "-mx-1.5 -my-1.5" }, oe = {
128
+ }, vs = { class: "-mx-1.5 -my-1.5" }, ae = {
129
129
  __name: "SparkAlert",
130
130
  props: {
131
131
  type: {
@@ -145,7 +145,7 @@ const hs = { class: "flex items-center" }, gs = { class: "shrink-0 self-start" }
145
145
  warning: "bg-yellow-50 border-yellow-200 text-yellow-700",
146
146
  danger: "bg-red-50 border-red-200 text-red-700",
147
147
  info: "bg-blue-50 border-blue-200 text-blue-700"
148
- })[s.type]), o = $(() => ({
148
+ })[s.type]), a = $(() => ({
149
149
  success: "text-green-400",
150
150
  warning: "text-yellow-400",
151
151
  danger: "text-red-400",
@@ -155,40 +155,40 @@ const hs = { class: "flex items-center" }, gs = { class: "shrink-0 self-start" }
155
155
  warning: "farExclamationTriangle",
156
156
  danger: "farCircleXmark",
157
157
  info: "farInfoCircle"
158
- })[s.type]), n = $(() => ({
158
+ })[s.type]), r = $(() => ({
159
159
  success: "text-green-400 hover:bg-green-100",
160
160
  warning: "text-yellow-400 hover:bg-yellow-100",
161
161
  danger: "text-red-400 hover:bg-red-100",
162
162
  info: "text-blue-400 hover:bg-blue-100"
163
163
  })[s.type]);
164
- return (a, c) => {
165
- const r = O("font-awesome-icon");
166
- return m(), h("div", {
167
- class: H(["rounded-md border p-4", t.value])
164
+ return (o, c) => {
165
+ const n = F("font-awesome-icon");
166
+ return m(), g("div", {
167
+ class: V(["rounded-md border p-4", t.value])
168
168
  }, [
169
169
  f("div", hs, [
170
170
  f("div", gs, [
171
- b(r, {
172
- icon: k(A)[l.value],
173
- class: H(o.value)
171
+ k(n, {
172
+ icon: _(A)[l.value],
173
+ class: V(a.value)
174
174
  }, null, 8, ["icon", "class"])
175
175
  ]),
176
176
  f("div", ys, [
177
- B(a.$slots, "default")
177
+ D(o.$slots, "default")
178
178
  ]),
179
- e.closeable ? (m(), h("div", vs, [
180
- f("div", bs, [
179
+ e.closeable ? (m(), g("div", bs, [
180
+ f("div", vs, [
181
181
  f("button", {
182
182
  type: "button",
183
- class: H(["inline-flex rounded-md px-2 py-1.5", n.value]),
184
- onClick: c[0] || (c[0] = (i) => a.$emit("close"))
183
+ class: V(["inline-flex rounded-md px-2 py-1.5", r.value]),
184
+ onClick: c[0] || (c[0] = (i) => o.$emit("close"))
185
185
  }, [
186
- b(r, {
187
- icon: k(A).farXmark
186
+ k(n, {
187
+ icon: _(A).farXmark
188
188
  }, null, 8, ["icon"])
189
189
  ], 2)
190
190
  ])
191
- ])) : L("", !0)
191
+ ])) : T("", !0)
192
192
  ])
193
193
  ], 2);
194
194
  };
@@ -243,15 +243,15 @@ const hs = { class: "flex items-center" }, gs = { class: "shrink-0 self-start" }
243
243
  icon: "farCompass"
244
244
  }
245
245
  ], rt = ue("sparkAppSelector", () => {
246
- const e = U({
246
+ const e = K({
247
247
  apps: [...ge]
248
- }), s = (n = {}) => {
249
- if (n.apps && Array.isArray(n.apps)) {
250
- const a = n.apps.filter((c) => {
251
- const r = c.name && c.description && c.icon && c.href;
252
- return r || console.warn("useSparkAppSelectorStore: Invalid app object", c), r;
248
+ }), s = (r = {}) => {
249
+ if (r.apps && Array.isArray(r.apps)) {
250
+ const o = r.apps.filter((c) => {
251
+ const n = c.name && c.description && c.icon && c.href;
252
+ return n || console.warn("useSparkAppSelectorStore: Invalid app object", c), n;
253
253
  });
254
- e.apps = a.map((c) => ({
254
+ e.apps = o.map((c) => ({
255
255
  name: c.name,
256
256
  description: c.description,
257
257
  icon: c.icon,
@@ -259,37 +259,37 @@ const hs = { class: "flex items-center" }, gs = { class: "shrink-0 self-start" }
259
259
  }));
260
260
  return;
261
261
  }
262
- if (n.appHrefs && typeof n.appHrefs == "object") {
263
- const a = /* @__PURE__ */ new Map();
264
- Object.keys(n.appHrefs).forEach((c) => {
265
- a.set(c.toLowerCase(), n.appHrefs[c]);
262
+ if (r.appHrefs && typeof r.appHrefs == "object") {
263
+ const o = /* @__PURE__ */ new Map();
264
+ Object.keys(r.appHrefs).forEach((c) => {
265
+ o.set(c.toLowerCase(), r.appHrefs[c]);
266
266
  }), e.apps = ge.map((c) => {
267
- const r = a.get(c.name.toLowerCase());
267
+ const n = o.get(c.name.toLowerCase());
268
268
  return {
269
269
  ...c,
270
- href: r || c.href
270
+ href: n || c.href
271
271
  };
272
272
  });
273
273
  return;
274
274
  }
275
275
  e.apps = [...ge];
276
- }, t = $(() => e.apps), o = (n) => {
277
- if (!n) return null;
278
- const a = n.toLowerCase();
279
- return e.apps.find((c) => c.name.toLowerCase() === a) || null;
276
+ }, t = $(() => e.apps), a = (r) => {
277
+ if (!r) return null;
278
+ const o = r.toLowerCase();
279
+ return e.apps.find((c) => c.name.toLowerCase() === o) || null;
280
280
  };
281
281
  return {
282
282
  state: e,
283
283
  initialize: s,
284
284
  allApps: t,
285
- getAppByName: o,
286
- getAppIcon: (n) => {
287
- const a = o(n);
288
- return a ? a.icon : "";
285
+ getAppByName: a,
286
+ getAppIcon: (r) => {
287
+ const o = a(r);
288
+ return o ? o.icon : "";
289
289
  }
290
290
  };
291
291
  }), nt = ue("sparkApp", () => {
292
- const e = U({
292
+ const e = K({
293
293
  app: "",
294
294
  homeRoute: "dashboard",
295
295
  showBrandSelector: !0,
@@ -301,16 +301,16 @@ const hs = { class: "flex items-center" }, gs = { class: "shrink-0 self-start" }
301
301
  e.app = t.app || "", e.homeRoute = t.homeRoute ?? "dashboard", e.showBrandSelector = t.showBrandSelector ?? !0, e.showAppSelector = t.showAppSelector ?? !0;
302
302
  }
303
303
  };
304
- }), xs = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, ks = { class: "flex flex-1 flex-col" }, ws = { class: "divide-y divide-gray-200" }, _s = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, Ss = { class: "ml-auto flex items-center" }, Cs = ["href", "onClick"], $s = { class: "gap-y-1" }, Ts = { class: "text-base text-gray-800 flex items-center" }, Ps = { class: "font-medium" }, Ls = {
304
+ }), xs = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, ks = { class: "flex flex-1 flex-col" }, ws = { class: "divide-y divide-gray-200" }, _s = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, Ss = { class: "ml-auto flex items-center" }, Cs = ["href", "onClick"], $s = { class: "gap-y-1" }, Ts = { class: "text-base text-gray-800 flex items-center" }, Ls = { class: "font-medium" }, Ps = {
305
305
  key: 0,
306
306
  class: "inline-flex items-center rounded-full bg-green-100 px-1.5 py-0.5 text-xs font-medium text-green-700 ml-1"
307
- }, Ms = { class: "text-sm text-gray-500" }, Hs = { class: "ml-auto flex items-center" }, Vs = { class: "mt-auto" }, Rs = {
307
+ }, Ms = { class: "text-sm text-gray-500" }, Vs = { class: "ml-auto flex items-center" }, Hs = { class: "mt-auto" }, Rs = {
308
308
  key: 0,
309
309
  class: "p-6"
310
- }, Es = {
310
+ }, Fs = {
311
311
  key: 1,
312
312
  class: "bg-gray-50 p-6"
313
- }, As = {
313
+ }, Es = {
314
314
  __name: "SparkAppSelector",
315
315
  props: {
316
316
  bottomSlot: {
@@ -324,64 +324,64 @@ const hs = { class: "flex items-center" }, gs = { class: "shrink-0 self-start" }
324
324
  },
325
325
  emits: ["close", "select"],
326
326
  setup(e, { emit: s }) {
327
- const t = s, o = rt(), l = nt(), n = $(() => {
327
+ const t = s, a = rt(), l = nt(), r = $(() => {
328
328
  const c = l.state.app;
329
- return o.state.apps.map((r) => ({
330
- ...r,
331
- current: c && r.name.toLowerCase() === c.toLowerCase()
329
+ return a.state.apps.map((n) => ({
330
+ ...n,
331
+ current: c && n.name.toLowerCase() === c.toLowerCase()
332
332
  }));
333
- }), a = (c, r) => {
333
+ }), o = (c, n) => {
334
334
  t("select", c);
335
335
  };
336
- return (c, r) => {
337
- const i = O("font-awesome-icon");
338
- return m(), h("div", xs, [
336
+ return (c, n) => {
337
+ const i = F("font-awesome-icon");
338
+ return m(), g("div", xs, [
339
339
  f("div", ks, [
340
340
  f("div", ws, [
341
341
  f("div", _s, [
342
- r[1] || (r[1] = f("div", null, "Mr Group Network", -1)),
342
+ n[1] || (n[1] = f("div", null, "Mr Group Network", -1)),
343
343
  f("div", Ss, [
344
- b(i, {
345
- icon: k(A).farTimes,
344
+ k(i, {
345
+ icon: _(A).farTimes,
346
346
  class: "h-[15px] w-[15px] shrink-0 text-gray-400 cursor-pointer",
347
- onClick: r[0] || (r[0] = (u) => t("close"))
347
+ onClick: n[0] || (n[0] = (u) => t("close"))
348
348
  }, null, 8, ["icon"])
349
349
  ])
350
350
  ]),
351
- (m(!0), h(R, null, z(n.value, (u) => (m(), h("a", {
351
+ (m(!0), g(E, null, z(r.value, (u) => (m(), g("a", {
352
352
  key: u.name,
353
353
  href: u.href,
354
354
  target: "_blank",
355
- class: H([u.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
356
- onClick: (d) => u.current ? d.preventDefault() : a(u)
355
+ class: V([u.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
356
+ onClick: (d) => u.current ? d.preventDefault() : o(u)
357
357
  }, [
358
358
  f("div", $s, [
359
359
  f("div", Ts, [
360
- f("div", Ps, M(u.name), 1),
361
- u.current ? (m(), h("span", Ls, " Active ")) : L("", !0)
360
+ f("div", Ls, M(u.name), 1),
361
+ u.current ? (m(), g("span", Ps, " Active ")) : T("", !0)
362
362
  ]),
363
363
  f("div", Ms, M(u.description), 1)
364
364
  ]),
365
- f("div", Hs, [
366
- b(i, {
367
- class: H([u.current ? "text-gray-700" : "text-gray-400", "h-5 w-5 shrink-0"]),
368
- icon: k(A)[u.icon]
365
+ f("div", Vs, [
366
+ k(i, {
367
+ class: V([u.current ? "text-gray-700" : "text-gray-400", "h-5 w-5 shrink-0"]),
368
+ icon: _(A)[u.icon]
369
369
  }, null, 8, ["class", "icon"])
370
370
  ])
371
371
  ], 10, Cs))), 128)),
372
- r[2] || (r[2] = f("div", null, null, -1))
372
+ n[2] || (n[2] = f("div", null, null, -1))
373
373
  ]),
374
- f("div", Vs, [
375
- c.$slots.bottom || e.bottomSlot ? (m(), h("div", Rs, [
376
- B(c.$slots, "bottom", {}, () => [
377
- e.bottomSlot ? (m(), V(N(e.bottomSlot), { key: 0 })) : L("", !0)
374
+ f("div", Hs, [
375
+ c.$slots.bottom || e.bottomSlot ? (m(), g("div", Rs, [
376
+ D(c.$slots, "bottom", {}, () => [
377
+ e.bottomSlot ? (m(), H(Z(e.bottomSlot), { key: 0 })) : T("", !0)
378
378
  ])
379
- ])) : L("", !0),
380
- c.$slots.footer || e.footerSlot ? (m(), h("div", Es, [
381
- B(c.$slots, "footer", {}, () => [
382
- e.footerSlot ? (m(), V(N(e.footerSlot), { key: 0 })) : L("", !0)
379
+ ])) : T("", !0),
380
+ c.$slots.footer || e.footerSlot ? (m(), g("div", Fs, [
381
+ D(c.$slots, "footer", {}, () => [
382
+ e.footerSlot ? (m(), H(Z(e.footerSlot), { key: 0 })) : T("", !0)
383
383
  ])
384
- ])) : L("", !0)
384
+ ])) : T("", !0)
385
385
  ])
386
386
  ])
387
387
  ]);
@@ -393,9 +393,9 @@ const hs = { class: "flex items-center" }, gs = { class: "shrink-0 self-start" }
393
393
  warning: 5e3,
394
394
  danger: 0
395
395
  // sticky by default
396
- }, $e = ["top-left", "top-right", "center", "bottom-left", "bottom-right"];
397
- function Fs() {
398
- const e = U({
396
+ }, Te = ["top-left", "top-right", "center", "bottom-left", "bottom-right"];
397
+ function As() {
398
+ const e = K({
399
399
  isVisible: !1,
400
400
  type: "info",
401
401
  message: null,
@@ -404,52 +404,52 @@ function Fs() {
404
404
  closeable: !0,
405
405
  duration: null
406
406
  });
407
- let s = null, t = 0, o = !1, l = null;
408
- const n = () => {
409
- s && (clearTimeout(s), s = null), t = 0, o = !1, l = null;
410
- }, a = () => {
411
- n(), e.isVisible = !1;
407
+ let s = null, t = 0, a = !1, l = null;
408
+ const r = () => {
409
+ s && (clearTimeout(s), s = null), t = 0, a = !1, l = null;
410
+ }, o = () => {
411
+ r(), e.isVisible = !1;
412
412
  }, c = (p) => {
413
413
  p <= 0 || (t = p, l = Date.now(), s = setTimeout(() => {
414
- a();
414
+ o();
415
415
  }, p));
416
416
  };
417
417
  return {
418
418
  state: e,
419
419
  show: (p = {}) => {
420
- n();
420
+ r();
421
421
  const {
422
422
  type: v = "info",
423
- message: x = null,
424
- component: C = null,
425
- props: g = {},
423
+ message: b = null,
424
+ component: x = null,
425
+ props: h = {},
426
426
  closeable: w = !0,
427
- duration: _ = null
427
+ duration: S = null
428
428
  } = p;
429
- e.type = v, e.message = x, e.component = C ? me(C) : null, e.props = g, e.closeable = w, e.isVisible = !0;
430
- const y = _ !== null ? _ : lt[v];
429
+ e.type = v, e.message = b, e.component = x ? me(x) : null, e.props = h, e.closeable = w, e.isVisible = !0;
430
+ const y = S !== null ? S : lt[v];
431
431
  e.duration = y, y > 0 && c(y);
432
432
  },
433
- hide: a,
433
+ hide: o,
434
434
  reset: () => {
435
- a(), e.type = "info", e.message = null, e.component = null, e.props = {}, e.closeable = !0, e.duration = null;
435
+ o(), e.type = "info", e.message = null, e.component = null, e.props = {}, e.closeable = !0, e.duration = null;
436
436
  },
437
437
  pause: () => {
438
- if (!s || o) return;
438
+ if (!s || a) return;
439
439
  clearTimeout(s), s = null;
440
440
  const p = Date.now() - l;
441
- t = Math.max(0, t - p), o = !0;
441
+ t = Math.max(0, t - p), a = !0;
442
442
  },
443
443
  resume: () => {
444
- !o || t <= 0 || (o = !1, l = Date.now(), s = setTimeout(() => {
445
- a();
444
+ !a || t <= 0 || (a = !1, l = Date.now(), s = setTimeout(() => {
445
+ o();
446
446
  }, t));
447
447
  }
448
448
  };
449
449
  }
450
450
  class Os {
451
451
  constructor() {
452
- this.outlets = /* @__PURE__ */ new Map(), this.toastState = U({
452
+ this.outlets = /* @__PURE__ */ new Map(), this.toastState = K({
453
453
  toasts: [],
454
454
  maxToasts: 3,
455
455
  defaultPosition: "bottom-right",
@@ -465,7 +465,7 @@ class Os {
465
465
  * @returns {Object} Notification outlet instance
466
466
  */
467
467
  getOutlet(s = "default") {
468
- return this.outlets.has(s) || this.outlets.set(s, Fs()), this.outlets.get(s);
468
+ return this.outlets.has(s) || this.outlets.set(s, As()), this.outlets.get(s);
469
469
  }
470
470
  /**
471
471
  * Show a banner notification in the specified outlet
@@ -536,7 +536,7 @@ class Os {
536
536
  * @param {boolean} options.newestOnTop - Whether newest toasts appear on top (default: true)
537
537
  */
538
538
  configureToasts(s = {}) {
539
- s.maxToasts !== void 0 && (this.toastState.maxToasts = s.maxToasts), s.defaultPosition !== void 0 && $e.includes(s.defaultPosition) && (this.toastState.defaultPosition = s.defaultPosition), s.newestOnTop !== void 0 && (this.toastState.newestOnTop = s.newestOnTop);
539
+ s.maxToasts !== void 0 && (this.toastState.maxToasts = s.maxToasts), s.defaultPosition !== void 0 && Te.includes(s.defaultPosition) && (this.toastState.defaultPosition = s.defaultPosition), s.newestOnTop !== void 0 && (this.toastState.newestOnTop = s.newestOnTop);
540
540
  }
541
541
  /**
542
542
  * Show a toast notification
@@ -553,30 +553,30 @@ class Os {
553
553
  toast(s = {}) {
554
554
  const {
555
555
  type: t = "info",
556
- message: o = null,
556
+ message: a = null,
557
557
  component: l = null,
558
- props: n = {},
559
- closeable: a = !0,
558
+ props: r = {},
559
+ closeable: o = !0,
560
560
  duration: c = null,
561
- position: r = null
562
- } = s, i = ++this._toastIdCounter, u = r && $e.includes(r) ? r : this.toastState.defaultPosition, d = c !== null ? c : lt[t], p = {
561
+ position: n = null
562
+ } = s, i = ++this._toastIdCounter, u = n && Te.includes(n) ? n : this.toastState.defaultPosition, d = c !== null ? c : lt[t], p = {
563
563
  id: i,
564
564
  type: t,
565
- message: o,
565
+ message: a,
566
566
  component: l ? me(l) : null,
567
- props: n,
568
- closeable: a,
567
+ props: r,
568
+ closeable: o,
569
569
  duration: d,
570
570
  position: u,
571
571
  createdAt: Date.now()
572
- }, v = this.toastState.toasts.filter((x) => x.position === u);
572
+ }, v = this.toastState.toasts.filter((b) => b.position === u);
573
573
  if (v.length >= this.toastState.maxToasts) {
574
- const x = this.toastState.newestOnTop ? v[v.length - 1] : v[0];
575
- this.hideToast(x.id);
574
+ const b = this.toastState.newestOnTop ? v[v.length - 1] : v[0];
575
+ this.hideToast(b.id);
576
576
  }
577
577
  if (this.toastState.newestOnTop) {
578
- const x = this.toastState.toasts.findIndex((C) => C.position === u);
579
- x === -1 ? this.toastState.toasts.push(p) : this.toastState.toasts.splice(x, 0, p);
578
+ const b = this.toastState.toasts.findIndex((x) => x.position === u);
579
+ b === -1 ? this.toastState.toasts.push(p) : this.toastState.toasts.splice(b, 0, p);
580
580
  } else
581
581
  this.toastState.toasts.push(p);
582
582
  return d > 0 && this._startToastTimer(i, d), i;
@@ -587,7 +587,7 @@ class Os {
587
587
  */
588
588
  hideToast(s) {
589
589
  this._clearToastTimer(s);
590
- const t = this.toastState.toasts.findIndex((o) => o.id === s);
590
+ const t = this.toastState.toasts.findIndex((a) => a.id === s);
591
591
  t !== -1 && this.toastState.toasts.splice(t, 1);
592
592
  }
593
593
  /**
@@ -606,8 +606,8 @@ class Os {
606
606
  const t = this._toastTimers.get(s);
607
607
  if (!t || t.isPaused) return;
608
608
  clearTimeout(t.timeout), t.timeout = null;
609
- const o = Date.now() - t.startedAt;
610
- t.remainingTime = Math.max(0, t.remainingTime - o), t.isPaused = !0;
609
+ const a = Date.now() - t.startedAt;
610
+ t.remainingTime = Math.max(0, t.remainingTime - a), t.isPaused = !0;
611
611
  }
612
612
  /**
613
613
  * Resume auto-dismiss timer for a specific toast
@@ -634,15 +634,15 @@ class Os {
634
634
  * @private
635
635
  */
636
636
  _startToastTimer(s, t) {
637
- const o = {
637
+ const a = {
638
638
  timeout: null,
639
639
  remainingTime: t,
640
640
  startedAt: Date.now(),
641
641
  isPaused: !1
642
642
  };
643
- o.timeout = setTimeout(() => {
643
+ a.timeout = setTimeout(() => {
644
644
  this.hideToast(s);
645
- }, t), this._toastTimers.set(s, o);
645
+ }, t), this._toastTimers.set(s, a);
646
646
  }
647
647
  /**
648
648
  * @private
@@ -652,7 +652,7 @@ class Os {
652
652
  t && (t.timeout && clearTimeout(t.timeout), this._toastTimers.delete(s));
653
653
  }
654
654
  }
655
- const q = new Os(), En = {
655
+ const j = new Os(), zn = {
656
656
  __name: "SparkNotificationOutlet",
657
657
  props: {
658
658
  name: {
@@ -661,21 +661,21 @@ const q = new Os(), En = {
661
661
  }
662
662
  },
663
663
  setup(e) {
664
- const s = e, t = $(() => q.getOutlet(s.name)), o = E(0);
665
- I(
664
+ const s = e, t = $(() => j.getOutlet(s.name)), a = R(0);
665
+ N(
666
666
  () => [t.value.state.message, t.value.state.component, t.value.state.type],
667
667
  () => {
668
- t.value.state.isVisible && o.value++;
668
+ t.value.state.isVisible && a.value++;
669
669
  }
670
670
  );
671
671
  const l = () => {
672
- q.hide(s.name);
673
- }, n = () => {
674
- q.pause(s.name);
675
- }, a = () => {
676
- q.resume(s.name);
672
+ j.hide(s.name);
673
+ }, r = () => {
674
+ j.pause(s.name);
675
+ }, o = () => {
676
+ j.resume(s.name);
677
677
  };
678
- return (c, r) => (m(), V(dt, {
678
+ return (c, n) => (m(), H(dt, {
679
679
  "enter-active-class": "transition-all duration-300 ease-out",
680
680
  "enter-from-class": "opacity-0 -translate-y-2",
681
681
  "enter-to-class": "opacity-100 translate-y-0",
@@ -684,49 +684,49 @@ const q = new Os(), En = {
684
684
  "leave-to-class": "opacity-0 -translate-y-2",
685
685
  mode: "out-in"
686
686
  }, {
687
- default: T(() => [
688
- t.value.state.isVisible ? (m(), V(oe, {
689
- key: o.value,
687
+ default: L(() => [
688
+ t.value.state.isVisible ? (m(), H(ae, {
689
+ key: a.value,
690
690
  type: t.value.state.type,
691
691
  closeable: t.value.state.closeable,
692
692
  onClose: l,
693
- onMouseenter: n,
694
- onMouseleave: a
693
+ onMouseenter: r,
694
+ onMouseleave: o
695
695
  }, {
696
- default: T(() => [
697
- t.value.state.component ? (m(), V(N(t.value.state.component), pt(Z({ key: 0 }, t.value.state.props)), null, 16)) : (m(), h(R, { key: 1 }, [
698
- F(M(t.value.state.message), 1)
696
+ default: L(() => [
697
+ t.value.state.component ? (m(), H(Z(t.value.state.component), pt(q({ key: 0 }, t.value.state.props)), null, 16)) : (m(), g(E, { key: 1 }, [
698
+ O(M(t.value.state.message), 1)
699
699
  ], 64))
700
700
  ]),
701
701
  _: 1
702
- }, 8, ["type", "closeable"])) : L("", !0)
702
+ }, 8, ["type", "closeable"])) : T("", !0)
703
703
  ]),
704
704
  _: 1
705
705
  }));
706
706
  }
707
- }, Bs = { class: "fixed top-4 left-4 z-[2000] flex flex-col gap-3 max-w-sm w-full pointer-events-none" }, Ds = { class: "fixed top-4 right-4 z-[2000] flex flex-col gap-3 max-w-sm w-full pointer-events-none" }, zs = { class: "fixed top-[40%] left-1/2 -translate-x-1/2 -translate-y-1/2 z-[2000] flex flex-col gap-3 max-w-sm w-full pointer-events-none" }, js = { class: "fixed bottom-4 left-4 z-[2000] flex flex-col-reverse gap-3 max-w-sm w-full pointer-events-none" }, Is = { class: "fixed bottom-4 right-4 z-[2000] flex flex-col-reverse gap-3 max-w-sm w-full pointer-events-none" }, An = {
707
+ }, Ds = { class: "fixed top-4 left-4 z-[2000] flex flex-col gap-3 max-w-sm w-full pointer-events-none" }, Bs = { class: "fixed top-4 right-4 z-[2000] flex flex-col gap-3 max-w-sm w-full pointer-events-none" }, js = { class: "fixed top-[40%] left-1/2 -translate-x-1/2 -translate-y-1/2 z-[2000] flex flex-col gap-3 max-w-sm w-full pointer-events-none" }, zs = { class: "fixed bottom-4 left-4 z-[2000] flex flex-col-reverse gap-3 max-w-sm w-full pointer-events-none" }, Is = { class: "fixed bottom-4 right-4 z-[2000] flex flex-col-reverse gap-3 max-w-sm w-full pointer-events-none" }, In = {
708
708
  __name: "SparkToastContainer",
709
709
  setup(e) {
710
- const s = q.toastState, t = $(
710
+ const s = j.toastState, t = $(
711
711
  () => s.toasts.filter((u) => u.position === "top-left")
712
- ), o = $(
712
+ ), a = $(
713
713
  () => s.toasts.filter((u) => u.position === "top-right")
714
714
  ), l = $(
715
715
  () => s.toasts.filter((u) => u.position === "center")
716
- ), n = $(
716
+ ), r = $(
717
717
  () => s.toasts.filter((u) => u.position === "bottom-left")
718
- ), a = $(
718
+ ), o = $(
719
719
  () => s.toasts.filter((u) => u.position === "bottom-right")
720
720
  ), c = (u) => {
721
- q.hideToast(u);
722
- }, r = (u) => {
723
- q.pauseToast(u);
721
+ j.hideToast(u);
722
+ }, n = (u) => {
723
+ j.pauseToast(u);
724
724
  }, i = (u) => {
725
- q.resumeToast(u);
725
+ j.resumeToast(u);
726
726
  };
727
- return (u, d) => (m(), V(ft, { to: "body" }, [
728
- f("div", Bs, [
729
- b(ie, {
727
+ return (u, d) => (m(), H(ft, { to: "body" }, [
728
+ f("div", Ds, [
729
+ k(ie, {
730
730
  "enter-active-class": "transition-all duration-300 ease-out",
731
731
  "enter-from-class": "opacity-0 -translate-x-4",
732
732
  "enter-to-class": "opacity-100 translate-x-0",
@@ -734,24 +734,24 @@ const q = new Os(), En = {
734
734
  "leave-from-class": "opacity-100 translate-x-0",
735
735
  "leave-to-class": "opacity-0 -translate-x-4"
736
736
  }, {
737
- default: T(() => [
738
- (m(!0), h(R, null, z(t.value, (p) => (m(), h("div", {
737
+ default: L(() => [
738
+ (m(!0), g(E, null, z(t.value, (p) => (m(), g("div", {
739
739
  key: p.id,
740
740
  class: "pointer-events-auto"
741
741
  }, [
742
- b(oe, {
742
+ k(ae, {
743
743
  type: p.type,
744
744
  closeable: p.closeable,
745
745
  onClose: (v) => c(p.id),
746
- onMouseenter: (v) => r(p.id),
746
+ onMouseenter: (v) => n(p.id),
747
747
  onMouseleave: (v) => i(p.id)
748
748
  }, {
749
- default: T(() => [
750
- p.component ? (m(), V(N(p.component), Z({
749
+ default: L(() => [
750
+ p.component ? (m(), H(Z(p.component), q({
751
751
  key: 0,
752
752
  ref_for: !0
753
- }, p.props), null, 16)) : (m(), h(R, { key: 1 }, [
754
- F(M(p.message), 1)
753
+ }, p.props), null, 16)) : (m(), g(E, { key: 1 }, [
754
+ O(M(p.message), 1)
755
755
  ], 64))
756
756
  ]),
757
757
  _: 2
@@ -761,8 +761,8 @@ const q = new Os(), En = {
761
761
  _: 1
762
762
  })
763
763
  ]),
764
- f("div", Ds, [
765
- b(ie, {
764
+ f("div", Bs, [
765
+ k(ie, {
766
766
  "enter-active-class": "transition-all duration-300 ease-out",
767
767
  "enter-from-class": "opacity-0 translate-x-4",
768
768
  "enter-to-class": "opacity-100 translate-x-0",
@@ -770,24 +770,24 @@ const q = new Os(), En = {
770
770
  "leave-from-class": "opacity-100 translate-x-0",
771
771
  "leave-to-class": "opacity-0 translate-x-4"
772
772
  }, {
773
- default: T(() => [
774
- (m(!0), h(R, null, z(o.value, (p) => (m(), h("div", {
773
+ default: L(() => [
774
+ (m(!0), g(E, null, z(a.value, (p) => (m(), g("div", {
775
775
  key: p.id,
776
776
  class: "pointer-events-auto"
777
777
  }, [
778
- b(oe, {
778
+ k(ae, {
779
779
  type: p.type,
780
780
  closeable: p.closeable,
781
781
  onClose: (v) => c(p.id),
782
- onMouseenter: (v) => r(p.id),
782
+ onMouseenter: (v) => n(p.id),
783
783
  onMouseleave: (v) => i(p.id)
784
784
  }, {
785
- default: T(() => [
786
- p.component ? (m(), V(N(p.component), Z({
785
+ default: L(() => [
786
+ p.component ? (m(), H(Z(p.component), q({
787
787
  key: 0,
788
788
  ref_for: !0
789
- }, p.props), null, 16)) : (m(), h(R, { key: 1 }, [
790
- F(M(p.message), 1)
789
+ }, p.props), null, 16)) : (m(), g(E, { key: 1 }, [
790
+ O(M(p.message), 1)
791
791
  ], 64))
792
792
  ]),
793
793
  _: 2
@@ -797,8 +797,8 @@ const q = new Os(), En = {
797
797
  _: 1
798
798
  })
799
799
  ]),
800
- f("div", zs, [
801
- b(ie, {
800
+ f("div", js, [
801
+ k(ie, {
802
802
  "enter-active-class": "transition-all duration-300 ease-out",
803
803
  "enter-from-class": "opacity-0 scale-95",
804
804
  "enter-to-class": "opacity-100 scale-100",
@@ -806,24 +806,24 @@ const q = new Os(), En = {
806
806
  "leave-from-class": "opacity-100 scale-100",
807
807
  "leave-to-class": "opacity-0 scale-95"
808
808
  }, {
809
- default: T(() => [
810
- (m(!0), h(R, null, z(l.value, (p) => (m(), h("div", {
809
+ default: L(() => [
810
+ (m(!0), g(E, null, z(l.value, (p) => (m(), g("div", {
811
811
  key: p.id,
812
812
  class: "pointer-events-auto"
813
813
  }, [
814
- b(oe, {
814
+ k(ae, {
815
815
  type: p.type,
816
816
  closeable: p.closeable,
817
817
  onClose: (v) => c(p.id),
818
- onMouseenter: (v) => r(p.id),
818
+ onMouseenter: (v) => n(p.id),
819
819
  onMouseleave: (v) => i(p.id)
820
820
  }, {
821
- default: T(() => [
822
- p.component ? (m(), V(N(p.component), Z({
821
+ default: L(() => [
822
+ p.component ? (m(), H(Z(p.component), q({
823
823
  key: 0,
824
824
  ref_for: !0
825
- }, p.props), null, 16)) : (m(), h(R, { key: 1 }, [
826
- F(M(p.message), 1)
825
+ }, p.props), null, 16)) : (m(), g(E, { key: 1 }, [
826
+ O(M(p.message), 1)
827
827
  ], 64))
828
828
  ]),
829
829
  _: 2
@@ -833,8 +833,8 @@ const q = new Os(), En = {
833
833
  _: 1
834
834
  })
835
835
  ]),
836
- f("div", js, [
837
- b(ie, {
836
+ f("div", zs, [
837
+ k(ie, {
838
838
  "enter-active-class": "transition-all duration-300 ease-out",
839
839
  "enter-from-class": "opacity-0 -translate-x-4",
840
840
  "enter-to-class": "opacity-100 translate-x-0",
@@ -842,24 +842,24 @@ const q = new Os(), En = {
842
842
  "leave-from-class": "opacity-100 translate-x-0",
843
843
  "leave-to-class": "opacity-0 -translate-x-4"
844
844
  }, {
845
- default: T(() => [
846
- (m(!0), h(R, null, z(n.value, (p) => (m(), h("div", {
845
+ default: L(() => [
846
+ (m(!0), g(E, null, z(r.value, (p) => (m(), g("div", {
847
847
  key: p.id,
848
848
  class: "pointer-events-auto"
849
849
  }, [
850
- b(oe, {
850
+ k(ae, {
851
851
  type: p.type,
852
852
  closeable: p.closeable,
853
853
  onClose: (v) => c(p.id),
854
- onMouseenter: (v) => r(p.id),
854
+ onMouseenter: (v) => n(p.id),
855
855
  onMouseleave: (v) => i(p.id)
856
856
  }, {
857
- default: T(() => [
858
- p.component ? (m(), V(N(p.component), Z({
857
+ default: L(() => [
858
+ p.component ? (m(), H(Z(p.component), q({
859
859
  key: 0,
860
860
  ref_for: !0
861
- }, p.props), null, 16)) : (m(), h(R, { key: 1 }, [
862
- F(M(p.message), 1)
861
+ }, p.props), null, 16)) : (m(), g(E, { key: 1 }, [
862
+ O(M(p.message), 1)
863
863
  ], 64))
864
864
  ]),
865
865
  _: 2
@@ -870,7 +870,7 @@ const q = new Os(), En = {
870
870
  })
871
871
  ]),
872
872
  f("div", Is, [
873
- b(ie, {
873
+ k(ie, {
874
874
  "enter-active-class": "transition-all duration-300 ease-out",
875
875
  "enter-from-class": "opacity-0 translate-x-4",
876
876
  "enter-to-class": "opacity-100 translate-x-0",
@@ -878,24 +878,24 @@ const q = new Os(), En = {
878
878
  "leave-from-class": "opacity-100 translate-x-0",
879
879
  "leave-to-class": "opacity-0 translate-x-4"
880
880
  }, {
881
- default: T(() => [
882
- (m(!0), h(R, null, z(a.value, (p) => (m(), h("div", {
881
+ default: L(() => [
882
+ (m(!0), g(E, null, z(o.value, (p) => (m(), g("div", {
883
883
  key: p.id,
884
884
  class: "pointer-events-auto"
885
885
  }, [
886
- b(oe, {
886
+ k(ae, {
887
887
  type: p.type,
888
888
  closeable: p.closeable,
889
889
  onClose: (v) => c(p.id),
890
- onMouseenter: (v) => r(p.id),
890
+ onMouseenter: (v) => n(p.id),
891
891
  onMouseleave: (v) => i(p.id)
892
892
  }, {
893
- default: T(() => [
894
- p.component ? (m(), V(N(p.component), Z({
893
+ default: L(() => [
894
+ p.component ? (m(), H(Z(p.component), q({
895
895
  key: 0,
896
896
  ref_for: !0
897
- }, p.props), null, 16)) : (m(), h(R, { key: 1 }, [
898
- F(M(p.message), 1)
897
+ }, p.props), null, 16)) : (m(), g(E, { key: 1 }, [
898
+ O(M(p.message), 1)
899
899
  ], 64))
900
900
  ]),
901
901
  _: 2
@@ -910,38 +910,38 @@ const q = new Os(), En = {
910
910
  }, it = ue(
911
911
  "brandFilter",
912
912
  () => {
913
- const e = U({
913
+ const e = K({
914
914
  brands: []
915
- }), s = (n = {}) => {
916
- if (!n.brands || !Array.isArray(n.brands)) {
915
+ }), s = (r = {}) => {
916
+ if (!r.brands || !Array.isArray(r.brands)) {
917
917
  console.warn("useSparkBrandFilterStore: No brands provided to initialize()"), e.brands = [];
918
918
  return;
919
919
  }
920
- const a = n.brands.filter((r) => {
921
- const i = r.name && r.logo;
922
- return i || console.warn("useSparkBrandFilterStore: Invalid brand object", r), i;
923
- }), c = a.filter((r) => r.current);
924
- c.length === 0 && a.length > 0 ? a[0].current = !0 : c.length > 1 && a.forEach((r) => {
925
- r.current = r === c[0];
926
- }), e.brands = a.map((r) => ({
927
- id: r.id,
928
- name: r.name,
929
- logo: r.logo,
930
- current: r.current || !1
920
+ const o = r.brands.filter((n) => {
921
+ const i = n.name && n.logo;
922
+ return i || console.warn("useSparkBrandFilterStore: Invalid brand object", n), i;
923
+ }), c = o.filter((n) => n.current);
924
+ c.length === 0 && o.length > 0 ? o[0].current = !0 : c.length > 1 && o.forEach((n) => {
925
+ n.current = n === c[0];
926
+ }), e.brands = o.map((n) => ({
927
+ id: n.id,
928
+ name: n.name,
929
+ logo: n.logo,
930
+ current: n.current || !1
931
931
  }));
932
- }, t = $(() => e.brands.find((n) => n.current) || null), o = $(() => e.brands);
932
+ }, t = $(() => e.brands.find((r) => r.current) || null), a = $(() => e.brands);
933
933
  return {
934
934
  state: e,
935
935
  initialize: s,
936
936
  currentBrand: t,
937
- allBrands: o,
938
- toggleBrand: (n) => {
939
- if (!n || !e.brands.includes(n)) {
937
+ allBrands: a,
938
+ toggleBrand: (r) => {
939
+ if (!r || !e.brands.includes(r)) {
940
940
  console.warn("useSparkBrandFilterStore: Invalid brand provided to toggleBrand()");
941
941
  return;
942
942
  }
943
- e.brands.forEach((a) => {
944
- a.current = a === n;
943
+ e.brands.forEach((o) => {
944
+ o.current = o === r;
945
945
  });
946
946
  }
947
947
  };
@@ -954,62 +954,62 @@ const q = new Os(), En = {
954
954
  ), Ns = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, Zs = { class: "flex flex-1 flex-col" }, qs = { class: "divide-y divide-gray-200" }, Us = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, Ks = { class: "ml-auto flex items-center" }, Gs = {
955
955
  key: 0,
956
956
  class: "flex px-[22px] py-[15px] text-gray-500 text-sm"
957
- }, Ws = ["onClick"], Ys = { class: "w-full gap-y-1 flex justify-between" }, Xs = { class: "flex flex-col" }, Js = { class: "flex items-center" }, Qs = { class: "font-medium text-base text-gray-900" }, eo = {
957
+ }, Ws = ["onClick"], Ys = { class: "w-full gap-y-1 flex justify-between" }, Xs = { class: "flex flex-col" }, Js = { class: "flex items-center" }, Qs = { class: "font-medium text-base text-gray-900" }, ea = {
958
958
  key: 0,
959
959
  class: "inline-flex items-center rounded-full bg-green-100 px-1.5 py-0.5 text-xs font-medium text-green-800 ml-1"
960
- }, to = { class: "text-sm text-gray-500 font-normal" }, so = { class: "flex items-center" }, oo = ["src", "alt"], ao = {
960
+ }, ta = { class: "text-sm text-gray-500 font-normal" }, sa = { class: "flex items-center" }, aa = ["src", "alt"], oa = {
961
961
  __name: "SparkBrandSelector",
962
962
  emits: ["close", "select"],
963
963
  setup(e, { emit: s }) {
964
- const t = s, o = it(), l = (n) => {
965
- t("select", n);
964
+ const t = s, a = it(), l = (r) => {
965
+ t("select", r);
966
966
  };
967
- return (n, a) => {
968
- const c = O("font-awesome-icon");
969
- return m(), h("div", Ns, [
967
+ return (r, o) => {
968
+ const c = F("font-awesome-icon");
969
+ return m(), g("div", Ns, [
970
970
  f("div", Zs, [
971
971
  f("div", qs, [
972
972
  f("div", Us, [
973
- a[1] || (a[1] = f("div", null, "Filter by Brand", -1)),
973
+ o[1] || (o[1] = f("div", null, "Filter by Brand", -1)),
974
974
  f("div", Ks, [
975
- b(c, {
976
- icon: k(A).farTimes,
975
+ k(c, {
976
+ icon: _(A).farTimes,
977
977
  class: "size-4 text-gray-400 cursor-pointer",
978
- onClick: a[0] || (a[0] = (r) => t("close"))
978
+ onClick: o[0] || (o[0] = (n) => t("close"))
979
979
  }, null, 8, ["icon"])
980
980
  ])
981
981
  ]),
982
- k(o).allBrands.length === 0 ? (m(), h("div", Gs, " No brands configured ")) : L("", !0),
983
- (m(!0), h(R, null, z(k(o).allBrands, (r) => (m(), h("div", {
984
- key: r.id,
985
- class: H([r.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
986
- onClick: (i) => l(r)
982
+ _(a).allBrands.length === 0 ? (m(), g("div", Gs, " No brands configured ")) : T("", !0),
983
+ (m(!0), g(E, null, z(_(a).allBrands, (n) => (m(), g("div", {
984
+ key: n.id,
985
+ class: V([n.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
986
+ onClick: (i) => l(n)
987
987
  }, [
988
988
  f("div", Ys, [
989
989
  f("div", Xs, [
990
990
  f("div", Js, [
991
- f("div", Qs, M(r.name), 1),
992
- r.current ? (m(), h("span", eo, " Current ")) : L("", !0)
991
+ f("div", Qs, M(n.name), 1),
992
+ n.current ? (m(), g("span", ea, " Current ")) : T("", !0)
993
993
  ]),
994
- f("div", to, M(r.current ? "Current Brand" : "Change to"), 1)
994
+ f("div", ta, M(n.current ? "Current Brand" : "Change to"), 1)
995
995
  ]),
996
- f("div", so, [
996
+ f("div", sa, [
997
997
  f("img", {
998
- src: r.logo,
999
- alt: `${r.name} logo`,
998
+ src: n.logo,
999
+ alt: `${n.name} logo`,
1000
1000
  class: "h-8 w-auto"
1001
- }, null, 8, oo)
1001
+ }, null, 8, aa)
1002
1002
  ])
1003
1003
  ])
1004
1004
  ], 10, Ws))), 128)),
1005
- a[2] || (a[2] = f("div", null, null, -1))
1005
+ o[2] || (o[2] = f("div", null, null, -1))
1006
1006
  ]),
1007
- a[3] || (a[3] = f("div", { class: "mt-auto" }, null, -1))
1007
+ o[3] || (o[3] = f("div", { class: "mt-auto" }, null, -1))
1008
1008
  ])
1009
1009
  ]);
1010
1010
  };
1011
1011
  }
1012
- }, ro = ["disabled"], Y = {
1012
+ }, ra = ["disabled"], X = {
1013
1013
  __name: "SparkButton",
1014
1014
  props: {
1015
1015
  size: {
@@ -1032,16 +1032,16 @@ const q = new Os(), En = {
1032
1032
  },
1033
1033
  emits: ["click"],
1034
1034
  setup(e) {
1035
- const s = e, t = E(null), o = Fe("buttonGroup", null), l = $(() => {
1036
- if (!o?.isInGroup || !t.value) return null;
1037
- const r = o.getButtonIndex(t.value), i = o.getButtonCount();
1035
+ const s = e, t = R(null), a = _e("buttonGroup", null), l = $(() => {
1036
+ if (!a?.isInGroup || !t.value) return null;
1037
+ const n = a.getButtonIndex(t.value), i = a.getButtonCount();
1038
1038
  return {
1039
- isFirst: r === 0,
1040
- isLast: r === i - 1,
1041
- index: r,
1039
+ isFirst: n === 0,
1040
+ isLast: n === i - 1,
1041
+ index: n,
1042
1042
  total: i
1043
1043
  };
1044
- }), n = {
1044
+ }), r = {
1045
1045
  paddingX: /^px-/,
1046
1046
  paddingY: /^py-/,
1047
1047
  paddingAll: /^p-/,
@@ -1051,99 +1051,99 @@ const q = new Os(), En = {
1051
1051
  borderRadius: /^rounded-/,
1052
1052
  background: /^bg-/,
1053
1053
  text: /^text-(?!white|black)/
1054
- }, a = (r, i) => {
1055
- if (!i) return r;
1056
- const u = r.split(" ").filter(Boolean), d = i.split(" ").filter(Boolean);
1057
- return [...u.filter((v) => !d.some((x) => {
1058
- const C = Object.entries(n).find(
1059
- ([w, _]) => _.test(v)
1060
- )?.[0], g = Object.entries(n).find(
1061
- ([w, _]) => _.test(x)
1054
+ }, o = (n, i) => {
1055
+ if (!i) return n;
1056
+ const u = n.split(" ").filter(Boolean), d = i.split(" ").filter(Boolean);
1057
+ return [...u.filter((v) => !d.some((b) => {
1058
+ const x = Object.entries(r).find(
1059
+ ([w, S]) => S.test(v)
1060
+ )?.[0], h = Object.entries(r).find(
1061
+ ([w, S]) => S.test(b)
1062
1062
  )?.[0];
1063
- return C && C === g;
1063
+ return x && x === h;
1064
1064
  })), ...d].join(" ");
1065
1065
  }, c = $(() => {
1066
- let r = "", i = "";
1066
+ let n = "", i = "";
1067
1067
  switch (s.size) {
1068
1068
  case "xs":
1069
- r += " px-4 py-1 text-xs", i = "sm";
1069
+ n += " px-4 py-1 text-xs", i = "sm";
1070
1070
  break;
1071
1071
  case "sm":
1072
- r += " px-4 py-1 text-sm", i = "sm";
1072
+ n += " px-4 py-1 text-sm", i = "sm";
1073
1073
  break;
1074
1074
  case "md":
1075
- r += " px-5 py-1.5 text-sm", i = "md";
1075
+ n += " px-5 py-1.5 text-sm", i = "md";
1076
1076
  break;
1077
1077
  case "lg":
1078
- r += " px-6 py-2 text-sm", i = "md";
1078
+ n += " px-6 py-2 text-sm", i = "md";
1079
1079
  break;
1080
1080
  case "xl":
1081
- r += " px-7 py-2.5 min-h-[42px] text-sm", i = "md";
1081
+ n += " px-7 py-2.5 min-h-[42px] text-sm", i = "md";
1082
1082
  break;
1083
1083
  }
1084
- if (o?.isInGroup && l.value) {
1084
+ if (a?.isInGroup && l.value) {
1085
1085
  const { isFirst: u, isLast: d } = l.value;
1086
- r += " relative inline-flex items-center focus:z-10", u && d ? r += ` rounded-${i}` : u ? r += ` rounded-l-${i} rounded-r-none` : d ? r += ` rounded-r-${i} rounded-l-none -ml-px` : r += " rounded-none -ml-px";
1086
+ n += " relative inline-flex items-center focus:z-10", u && d ? n += ` rounded-${i}` : u ? n += ` rounded-l-${i} rounded-r-none` : d ? n += ` rounded-r-${i} rounded-l-none -ml-px` : n += " rounded-none -ml-px";
1087
1087
  } else
1088
- r += ` shadow-xs rounded-${i}`;
1088
+ n += ` shadow-xs rounded-${i}`;
1089
1089
  switch (s.variant) {
1090
1090
  case "primary":
1091
- r += " bg-primary-600 hover:bg-primary-500 text-white";
1091
+ n += " bg-primary-600 hover:bg-primary-500 text-white";
1092
1092
  break;
1093
1093
  case "secondary":
1094
- r += " ring-1 ring-gray-300 ring-inset bg-white hover:bg-gray-50 text-gray-900";
1094
+ n += " ring-1 ring-gray-300 ring-inset bg-white hover:bg-gray-50 text-gray-900";
1095
1095
  break;
1096
1096
  case "success":
1097
- r += " bg-green-600 hover:bg-green-500 text-white";
1097
+ n += " bg-green-600 hover:bg-green-500 text-white";
1098
1098
  break;
1099
1099
  case "warning":
1100
- r += " bg-amber-600 hover:bg-amber-500 text-white";
1100
+ n += " bg-amber-600 hover:bg-amber-500 text-white";
1101
1101
  break;
1102
1102
  case "danger":
1103
- r += " bg-red-600 hover:bg-red-500 text-white";
1103
+ n += " bg-red-600 hover:bg-red-500 text-white";
1104
1104
  break;
1105
1105
  case "info":
1106
- r += " bg-cyan-600 hover:bg-cyan-500 text-white";
1106
+ n += " bg-cyan-600 hover:bg-cyan-500 text-white";
1107
1107
  break;
1108
1108
  default:
1109
- r += ` bg-${s.variant}-600 hover:bg-${s.variant}-500 text-white`;
1109
+ n += ` bg-${s.variant}-600 hover:bg-${s.variant}-500 text-white`;
1110
1110
  }
1111
- return r = a(r, s.buttonClass), r;
1111
+ return n = o(n, s.buttonClass), n;
1112
1112
  });
1113
- return (r, i) => (m(), h("button", {
1113
+ return (n, i) => (m(), g("button", {
1114
1114
  type: "button",
1115
1115
  ref_key: "buttonRef",
1116
1116
  ref: t,
1117
- class: H(c.value),
1117
+ class: V(c.value),
1118
1118
  disabled: e.disabled,
1119
- onClick: i[0] || (i[0] = (u) => r.$emit("click"))
1119
+ onClick: i[0] || (i[0] = (u) => n.$emit("click"))
1120
1120
  }, [
1121
- B(r.$slots, "default")
1122
- ], 10, ro));
1121
+ D(n.$slots, "default")
1122
+ ], 10, ra));
1123
1123
  }
1124
- }, no = {
1124
+ }, na = {
1125
1125
  __name: "SparkButtonGroup",
1126
1126
  setup(e) {
1127
- const s = E(null);
1127
+ const s = R(null);
1128
1128
  return mt("buttonGroup", {
1129
1129
  isInGroup: !0,
1130
1130
  getButtonIndex: (l) => s.value ? Array.from(s.value.children).indexOf(l) : -1,
1131
1131
  getButtonCount: () => s.value?.children.length || 0
1132
- }), (l, n) => (m(), h("div", {
1132
+ }), (l, r) => (m(), g("div", {
1133
1133
  class: "inline-flex rounded-md shadow-xs",
1134
1134
  ref_key: "groupRef",
1135
1135
  ref: s
1136
1136
  }, [
1137
- B(l.$slots, "default")
1137
+ D(l.$slots, "default")
1138
1138
  ], 512));
1139
1139
  }
1140
- }, lo = { class: "divide-y divide-gray-300 rounded-lg border border-gray-300 text-gray-700 bg-gray-100" }, io = {
1140
+ }, la = { class: "divide-y divide-gray-300 rounded-lg border border-gray-300 text-gray-700 bg-gray-100" }, ia = {
1141
1141
  key: 0,
1142
1142
  class: "px-[30px] py-5"
1143
- }, co = {
1143
+ }, ca = {
1144
1144
  key: 1,
1145
1145
  class: "p-5"
1146
- }, Fn = {
1146
+ }, Nn = {
1147
1147
  __name: "SparkCard",
1148
1148
  props: {
1149
1149
  padded: {
@@ -1157,24 +1157,200 @@ const q = new Os(), En = {
1157
1157
  },
1158
1158
  setup(e) {
1159
1159
  const s = e;
1160
- return (t, o) => (m(), h("div", lo, [
1161
- t.$slots.header ? (m(), h("div", io, [
1162
- B(t.$slots, "header")
1163
- ])) : L("", !0),
1160
+ return (t, a) => (m(), g("div", la, [
1161
+ t.$slots.header ? (m(), g("div", ia, [
1162
+ D(t.$slots, "header")
1163
+ ])) : T("", !0),
1164
1164
  f("div", {
1165
- class: H([s.padded ? s.paddedClass : ""])
1165
+ class: V([s.padded ? s.paddedClass : ""])
1166
1166
  }, [
1167
- B(t.$slots, "default")
1167
+ D(t.$slots, "default")
1168
1168
  ], 2),
1169
- t.$slots.footer ? (m(), h("div", co, [
1170
- B(t.$slots, "footer")
1171
- ])) : L("", !0)
1169
+ t.$slots.footer ? (m(), g("div", ca, [
1170
+ D(t.$slots, "footer")
1171
+ ])) : T("", !0)
1172
1172
  ]));
1173
1173
  }
1174
- }, uo = { class: "px-4 pt-5 pb-4 sm:p-6" }, po = {
1174
+ }, ua = {
1175
+ key: 0,
1176
+ class: "block text-sm font-medium text-gray-700 mb-2"
1177
+ }, da = {
1178
+ key: 1,
1179
+ class: "mb-2 relative inline-block"
1180
+ }, pa = ["href"], fa = ["src", "alt"], ma = ["disabled"], ha = {
1181
+ key: 0,
1182
+ class: "absolute inset-0 flex items-center justify-center bg-blue-50/80 rounded-md pointer-events-none"
1183
+ }, ga = {
1184
+ key: 3,
1185
+ class: "text-sm text-gray-500 mt-1"
1186
+ }, Zn = {
1187
+ __name: "SparkImageUpload",
1188
+ props: {
1189
+ modelValue: {
1190
+ type: String,
1191
+ default: ""
1192
+ },
1193
+ uploadUrl: {
1194
+ type: String,
1195
+ required: !0
1196
+ },
1197
+ fieldName: {
1198
+ type: String,
1199
+ default: "file"
1200
+ },
1201
+ extraFields: {
1202
+ type: Object,
1203
+ default: () => ({})
1204
+ },
1205
+ label: {
1206
+ type: String,
1207
+ default: ""
1208
+ },
1209
+ name: {
1210
+ type: String,
1211
+ default: "image_file"
1212
+ },
1213
+ height: {
1214
+ type: String,
1215
+ default: "h-16"
1216
+ },
1217
+ accept: {
1218
+ type: String,
1219
+ default: "image/*"
1220
+ },
1221
+ disabled: {
1222
+ type: Boolean,
1223
+ default: !1
1224
+ },
1225
+ responseParser: {
1226
+ type: Function,
1227
+ default: (e) => e.data.url || e.data
1228
+ }
1229
+ },
1230
+ emits: ["update:modelValue", "upload-start", "upload-success", "upload-error"],
1231
+ setup(e, { emit: s }) {
1232
+ const t = e, a = s, l = _e("axios"), r = R(!1), o = R(!1);
1233
+ function c() {
1234
+ a("update:modelValue", "");
1235
+ }
1236
+ function n() {
1237
+ t.disabled || r.value || (o.value = !0);
1238
+ }
1239
+ function i() {
1240
+ o.value = !1;
1241
+ }
1242
+ function u(b) {
1243
+ if (o.value = !1, t.disabled || r.value) return;
1244
+ const x = b.dataTransfer?.files?.[0];
1245
+ if (x) {
1246
+ if (!d(x)) {
1247
+ j.show({
1248
+ type: "danger",
1249
+ message: "File type not accepted."
1250
+ });
1251
+ return;
1252
+ }
1253
+ v(x);
1254
+ }
1255
+ }
1256
+ function d(b) {
1257
+ const x = t.accept.split(",").map((h) => h.trim());
1258
+ for (const h of x) {
1259
+ if (h === "*/*") return !0;
1260
+ if (h.endsWith("/*")) {
1261
+ const w = h.slice(0, -2);
1262
+ if (b.type.startsWith(w + "/")) return !0;
1263
+ } else if (h.startsWith(".")) {
1264
+ if (b.name.toLowerCase().endsWith(h.toLowerCase())) return !0;
1265
+ } else if (b.type === h) return !0;
1266
+ }
1267
+ return !1;
1268
+ }
1269
+ function p(b) {
1270
+ if (!b || b.length === 0) return;
1271
+ const x = b[0].file;
1272
+ x && v(x);
1273
+ }
1274
+ async function v(b) {
1275
+ r.value = !0, a("upload-start");
1276
+ try {
1277
+ const x = new FormData();
1278
+ x.append(t.fieldName, b), Object.entries(t.extraFields).forEach(([S, y]) => {
1279
+ x.append(S, y);
1280
+ });
1281
+ const h = await l.post(t.uploadUrl, x, {
1282
+ headers: { "Content-Type": "multipart/form-data" }
1283
+ }), w = t.responseParser(h);
1284
+ a("update:modelValue", w), a("upload-success", h), j.show({
1285
+ type: "success",
1286
+ message: "Image uploaded!"
1287
+ });
1288
+ } catch (x) {
1289
+ a("upload-error", x), j.show({
1290
+ type: "danger",
1291
+ message: x.response?.data?.message || "Failed to upload image."
1292
+ });
1293
+ } finally {
1294
+ r.value = !1;
1295
+ }
1296
+ }
1297
+ return (b, x) => {
1298
+ const h = F("font-awesome-icon"), w = F("FormKit");
1299
+ return m(), g("div", null, [
1300
+ e.label ? (m(), g("label", ua, M(e.label), 1)) : T("", !0),
1301
+ e.modelValue ? (m(), g("div", da, [
1302
+ f("a", {
1303
+ href: e.modelValue,
1304
+ target: "_blank",
1305
+ rel: "noopener noreferrer"
1306
+ }, [
1307
+ f("img", {
1308
+ src: e.modelValue,
1309
+ alt: e.label || "Image preview",
1310
+ class: V([e.height, "w-auto object-contain border border-gray-300 rounded-md cursor-pointer hover:opacity-80 transition-opacity"])
1311
+ }, null, 10, fa)
1312
+ ], 8, pa),
1313
+ f("button", {
1314
+ type: "button",
1315
+ class: "absolute -top-2 -right-2 w-5 h-5 bg-white/80 hover:bg-white text-gray-500 hover:text-gray-700 rounded-full flex items-center justify-center shadow-sm border border-gray-200",
1316
+ disabled: e.disabled,
1317
+ onClick: c
1318
+ }, [
1319
+ k(h, {
1320
+ icon: _(A).farXmark,
1321
+ class: "text-xs"
1322
+ }, null, 8, ["icon"])
1323
+ ], 8, ma)
1324
+ ])) : T("", !0),
1325
+ e.modelValue ? T("", !0) : (m(), g("div", {
1326
+ key: 2,
1327
+ class: V(["relative rounded-md transition-colors", {
1328
+ "ring-2 ring-blue-500 ring-offset-2 bg-blue-50": o.value
1329
+ }]),
1330
+ onDragover: U(n, ["prevent"]),
1331
+ onDragenter: U(n, ["prevent"]),
1332
+ onDragleave: U(i, ["prevent"]),
1333
+ onDrop: U(u, ["prevent"])
1334
+ }, [
1335
+ k(w, {
1336
+ type: "file",
1337
+ name: e.name,
1338
+ accept: e.accept,
1339
+ disabled: e.disabled || r.value,
1340
+ onInput: p
1341
+ }, null, 8, ["name", "accept", "disabled"]),
1342
+ o.value ? (m(), g("div", ha, [...x[0] || (x[0] = [
1343
+ f("span", { class: "text-sm text-blue-600 font-medium" }, "Drop image here", -1)
1344
+ ])])) : T("", !0)
1345
+ ], 34)),
1346
+ r.value ? (m(), g("p", ga, "Uploading...")) : T("", !0)
1347
+ ]);
1348
+ };
1349
+ }
1350
+ }, ya = { class: "px-4 pt-5 pb-4 sm:p-6" }, ba = {
1175
1351
  key: 0,
1176
1352
  class: "text-lg font-medium text-gray-900"
1177
- }, fo = {
1353
+ }, va = {
1178
1354
  __name: "SparkModalDialog",
1179
1355
  props: {
1180
1356
  title: {
@@ -1224,7 +1400,7 @@ const q = new Os(), En = {
1224
1400
  "input"
1225
1401
  ],
1226
1402
  setup(e) {
1227
- const s = e, t = $(() => !s.buttons || s.buttons.length === 0 ? [{ text: "OK", variant: "primary", event: "ok" }] : s.buttons), o = $(() => {
1403
+ const s = e, t = $(() => !s.buttons || s.buttons.length === 0 ? [{ text: "OK", variant: "primary", event: "ok" }] : s.buttons), a = $(() => {
1228
1404
  switch (t.value.length) {
1229
1405
  case 1:
1230
1406
  return "sm:grid sm:grid-flow-row-dense";
@@ -1240,7 +1416,7 @@ const q = new Os(), En = {
1240
1416
  success: "farCheckCircle",
1241
1417
  warning: "farExclamationTriangle",
1242
1418
  danger: "farCircleXmark"
1243
- }, n = $(() => s.icon || l[s.type]), a = $(() => ({
1419
+ }, r = $(() => s.icon || l[s.type]), o = $(() => ({
1244
1420
  info: "bg-blue-100",
1245
1421
  success: "bg-green-100",
1246
1422
  warning: "bg-yellow-100",
@@ -1251,37 +1427,37 @@ const q = new Os(), En = {
1251
1427
  warning: "text-yellow-400",
1252
1428
  danger: "text-red-400"
1253
1429
  })[s.type]);
1254
- return (r, i) => {
1255
- const u = O("font-awesome-icon");
1256
- return m(), h("div", uo, [
1257
- n.value ? (m(), h("div", {
1430
+ return (n, i) => {
1431
+ const u = F("font-awesome-icon");
1432
+ return m(), g("div", ya, [
1433
+ r.value ? (m(), g("div", {
1258
1434
  key: 0,
1259
- class: H(["mx-auto flex size-12 items-center justify-center rounded-full", a.value])
1435
+ class: V(["mx-auto flex size-12 items-center justify-center rounded-full", o.value])
1260
1436
  }, [
1261
- b(u, {
1262
- icon: k(A)[n.value],
1263
- class: H(["h-5 w-5", c.value])
1437
+ k(u, {
1438
+ icon: _(A)[r.value],
1439
+ class: V(["h-5 w-5", c.value])
1264
1440
  }, null, 8, ["icon", "class"])
1265
- ], 2)) : L("", !0),
1441
+ ], 2)) : T("", !0),
1266
1442
  f("div", {
1267
- class: H(["text-center", { "mt-3 sm:mt-5": n.value }])
1443
+ class: V(["text-center", { "mt-3 sm:mt-5": r.value }])
1268
1444
  }, [
1269
- e.title ? (m(), h("h3", po, M(e.title), 1)) : L("", !0),
1270
- e.message ? (m(), h("div", {
1445
+ e.title ? (m(), g("h3", ba, M(e.title), 1)) : T("", !0),
1446
+ e.message ? (m(), g("div", {
1271
1447
  key: 1,
1272
- class: H([{ "mt-2": e.title }, "text-sm text-gray-500"])
1273
- }, M(e.message), 3)) : L("", !0)
1448
+ class: V([{ "mt-2": e.title }, "text-sm text-gray-500"])
1449
+ }, M(e.message), 3)) : T("", !0)
1274
1450
  ], 2),
1275
1451
  f("div", {
1276
- class: H(["mt-5 sm:mt-6", o.value])
1452
+ class: V(["mt-5 sm:mt-6", a.value])
1277
1453
  }, [
1278
- (m(!0), h(R, null, z(t.value, (d, p) => (m(), V(k(Y), {
1454
+ (m(!0), g(E, null, z(t.value, (d, p) => (m(), H(_(X), {
1279
1455
  key: p,
1280
1456
  variant: d.variant,
1281
- onClick: (v) => r.$emit(d.event, d)
1457
+ onClick: (v) => n.$emit(d.event, d)
1282
1458
  }, {
1283
- default: T(() => [
1284
- F(M(d.text), 1)
1459
+ default: L(() => [
1460
+ O(M(d.text), 1)
1285
1461
  ]),
1286
1462
  _: 2
1287
1463
  }, 1032, ["variant", "onClick"]))), 128))
@@ -1290,17 +1466,17 @@ const q = new Os(), En = {
1290
1466
  };
1291
1467
  }
1292
1468
  };
1293
- class mo {
1469
+ class xa {
1294
1470
  constructor() {
1295
- this.state = U({
1471
+ this.state = K({
1296
1472
  isVisible: !1,
1297
1473
  content: null,
1298
1474
  props: {},
1299
1475
  eventHandlers: {}
1300
1476
  });
1301
1477
  }
1302
- show = (s, t = {}, o = {}) => {
1303
- this.state.content = me(s), this.state.props = t, this.state.eventHandlers = o, this.state.isVisible = !0;
1478
+ show = (s, t = {}, a = {}) => {
1479
+ this.state.content = me(s), this.state.props = t, this.state.eventHandlers = a, this.state.isVisible = !0;
1304
1480
  };
1305
1481
  hide = () => {
1306
1482
  this.state.isVisible = !1, this.state.eventHandlers = {};
@@ -1319,21 +1495,21 @@ class mo {
1319
1495
  */
1320
1496
  confirm = (s = {}) => new Promise((t) => {
1321
1497
  const {
1322
- title: o = "Confirm",
1498
+ title: a = "Confirm",
1323
1499
  message: l = "Are you sure?",
1324
- type: n = "warning",
1325
- confirmText: a = "Confirm",
1500
+ type: r = "warning",
1501
+ confirmText: o = "Confirm",
1326
1502
  cancelText: c = "Cancel",
1327
- confirmVariant: r = "primary"
1503
+ confirmVariant: n = "primary"
1328
1504
  } = s;
1329
1505
  this.show(
1330
- fo,
1506
+ va,
1331
1507
  {
1332
- title: o,
1508
+ title: a,
1333
1509
  message: l,
1334
- type: n,
1510
+ type: r,
1335
1511
  buttons: [
1336
- { text: a, variant: r, event: "confirm" },
1512
+ { text: o, variant: n, event: "confirm" },
1337
1513
  { text: c, variant: "secondary", event: "cancel" }
1338
1514
  ]
1339
1515
  },
@@ -1348,20 +1524,20 @@ class mo {
1348
1524
  );
1349
1525
  });
1350
1526
  }
1351
- const ae = new mo(), ho = { class: "fixed inset-0 z-10 w-screen overflow-y-auto" }, go = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, yo = {
1527
+ const oe = new xa(), ka = { class: "fixed inset-0 z-10 w-screen overflow-y-auto" }, wa = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, _a = {
1352
1528
  __name: "SparkModalContainer",
1353
1529
  setup(e) {
1354
- return (s, t) => (m(), V(k(tt), {
1530
+ return (s, t) => (m(), H(_(tt), {
1355
1531
  as: "template",
1356
- show: k(ae).state.isVisible
1532
+ show: _(oe).state.isVisible
1357
1533
  }, {
1358
- default: T(() => [
1359
- b(k(st), {
1534
+ default: L(() => [
1535
+ k(_(st), {
1360
1536
  class: "relative z-1000",
1361
- onClose: k(ae).hide
1537
+ onClose: _(oe).hide
1362
1538
  }, {
1363
- default: T(() => [
1364
- b(k(fe), {
1539
+ default: L(() => [
1540
+ k(_(fe), {
1365
1541
  as: "template",
1366
1542
  enter: "ease-out duration-300",
1367
1543
  "enter-from": "opacity-0",
@@ -1370,14 +1546,14 @@ const ae = new mo(), ho = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
1370
1546
  "leave-from": "opacity-100",
1371
1547
  "leave-to": "opacity-0"
1372
1548
  }, {
1373
- default: T(() => [...t[0] || (t[0] = [
1549
+ default: L(() => [...t[0] || (t[0] = [
1374
1550
  f("div", { class: "fixed inset-0 bg-gray-500/75 transition-opacity" }, null, -1)
1375
1551
  ])]),
1376
1552
  _: 1
1377
1553
  }),
1378
- f("div", ho, [
1379
- f("div", go, [
1380
- b(k(fe), {
1554
+ f("div", ka, [
1555
+ f("div", wa, [
1556
+ k(_(fe), {
1381
1557
  as: "template",
1382
1558
  enter: "ease-out duration-300",
1383
1559
  "enter-from": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
@@ -1386,10 +1562,10 @@ const ae = new mo(), ho = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
1386
1562
  "leave-from": "opacity-100 translate-y-0 sm:scale-100",
1387
1563
  "leave-to": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
1388
1564
  }, {
1389
- default: T(() => [
1390
- b(k(ot), { class: "relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:min-w-lg sm:max-w-max" }, {
1391
- default: T(() => [
1392
- (m(), V(N(k(ae).state.content), Z(k(ae).state.props, Oe(k(ae).state.eventHandlers)), null, 16))
1565
+ default: L(() => [
1566
+ k(_(at), { class: "relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:min-w-lg sm:max-w-max" }, {
1567
+ default: L(() => [
1568
+ (m(), H(Z(_(oe).state.content), q(_(oe).state.props, Oe(_(oe).state.eventHandlers)), null, 16))
1393
1569
  ]),
1394
1570
  _: 1
1395
1571
  })
@@ -1405,7 +1581,7 @@ const ae = new mo(), ho = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
1405
1581
  _: 1
1406
1582
  }, 8, ["show"]));
1407
1583
  }
1408
- }, vo = { class: "fixed inset-0 flex" }, Te = {
1584
+ }, Sa = { class: "fixed inset-0 flex" }, Le = {
1409
1585
  __name: "SparkOverlay",
1410
1586
  props: {
1411
1587
  position: {
@@ -1420,27 +1596,27 @@ const ae = new mo(), ho = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
1420
1596
  },
1421
1597
  emits: ["close"],
1422
1598
  setup(e, { emit: s }) {
1423
- const t = E(null), o = {
1599
+ const t = R(null), a = {
1424
1600
  xs: "w-[250px]",
1425
1601
  sm: "w-[300px]",
1426
1602
  md: "w-[450px]",
1427
1603
  lg: "w-[810px]",
1428
1604
  xl: "w-[1000px]"
1429
- }, l = e, n = s, a = $(() => o[l.overlayInstance.state.size] || o.md), c = () => {
1430
- l.overlayInstance.close(), n("close");
1605
+ }, l = e, r = s, o = $(() => a[l.overlayInstance.state.size] || a.md), c = () => {
1606
+ l.overlayInstance.close(), r("close");
1431
1607
  };
1432
- return (r, i) => (m(), V(k(tt), {
1608
+ return (n, i) => (m(), H(_(tt), {
1433
1609
  show: e.overlayInstance.state.isVisible,
1434
1610
  as: "template"
1435
1611
  }, {
1436
- default: T(() => [
1437
- b(k(st), {
1612
+ default: L(() => [
1613
+ k(_(st), {
1438
1614
  initialFocus: t.value,
1439
1615
  class: "relative z-1000",
1440
1616
  onClose: c
1441
1617
  }, {
1442
- default: T(() => [
1443
- b(k(fe), {
1618
+ default: L(() => [
1619
+ k(_(fe), {
1444
1620
  as: "template",
1445
1621
  enter: "transition-opacity ease-linear duration-150",
1446
1622
  "enter-from": "opacity-0",
@@ -1449,13 +1625,13 @@ const ae = new mo(), ho = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
1449
1625
  "leave-from": "opacity-100",
1450
1626
  "leave-to": "opacity-0"
1451
1627
  }, {
1452
- default: T(() => [...i[0] || (i[0] = [
1628
+ default: L(() => [...i[0] || (i[0] = [
1453
1629
  f("div", { class: "fixed inset-0 bg-gray-600/30" }, null, -1)
1454
1630
  ])]),
1455
1631
  _: 1
1456
1632
  }),
1457
- f("div", vo, [
1458
- b(k(fe), {
1633
+ f("div", Sa, [
1634
+ k(_(fe), {
1459
1635
  as: "template",
1460
1636
  enter: "transition ease-in-out duration-150 transform",
1461
1637
  "enter-from": e.position === "left" ? "-translate-x-full opacity-0" : "translate-x-full opacity-0",
@@ -1464,18 +1640,18 @@ const ae = new mo(), ho = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
1464
1640
  "leave-from": "translate-x-0 opacity-100",
1465
1641
  "leave-to": e.position === "left" ? "-translate-x-full opacity-0" : "translate-x-full opacity-0"
1466
1642
  }, {
1467
- default: T(() => [
1468
- b(k(ot), {
1643
+ default: L(() => [
1644
+ k(_(at), {
1469
1645
  ref_key: "panelRef",
1470
1646
  ref: t,
1471
- class: H([
1647
+ class: V([
1472
1648
  "flex py-2.5",
1473
- a.value,
1649
+ o.value,
1474
1650
  e.position === "left" ? "relative left-[10px]" : "absolute right-[10px] h-full"
1475
1651
  ])
1476
1652
  }, {
1477
- default: T(() => [
1478
- (m(), V(N(e.overlayInstance.state.content), Z(e.overlayInstance.state.props, Oe(e.overlayInstance.state.eventHandlers)), null, 16))
1653
+ default: L(() => [
1654
+ (m(), H(Z(e.overlayInstance.state.content), q(e.overlayInstance.state.props, Oe(e.overlayInstance.state.eventHandlers)), null, 16))
1479
1655
  ]),
1480
1656
  _: 1
1481
1657
  }, 8, ["class"])
@@ -1490,88 +1666,88 @@ const ae = new mo(), ho = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
1490
1666
  _: 1
1491
1667
  }, 8, ["show"]));
1492
1668
  }
1493
- }, bo = (e) => {
1669
+ }, Ca = (e) => {
1494
1670
  if (e.includes(".")) {
1495
1671
  const s = e.split(".");
1496
1672
  e = s[s.length - 1];
1497
1673
  }
1498
1674
  return e.replace(/_/g, " ");
1499
- }, xo = (e, s, t) => {
1500
- const o = s.querySelector(".relative");
1501
- if (!o || o.querySelector(".spark-table-head-sorting"))
1675
+ }, $a = (e, s, t) => {
1676
+ const a = s.querySelector(".relative");
1677
+ if (!a || a.querySelector(".spark-table-head-sorting"))
1502
1678
  return;
1503
1679
  const l = document.createElement("span");
1504
- l.classList.add("spark-table-head-sorting"), l.innerHTML = Q({ prefix: "fad", iconName: "sort" }).html + Q({ prefix: "fad", iconName: "sort-up" }).html + Q({ prefix: "fad", iconName: "sort-down" }).html, o.appendChild(l), o.addEventListener("click", async () => {
1505
- const n = t.params.orderBy, a = t.params.sortedBy;
1506
- return n === e && a === "asc" ? (o.classList.remove("asc"), o.classList.add("desc"), t.methods.applyParams({
1680
+ l.classList.add("spark-table-head-sorting"), l.innerHTML = ee({ prefix: "fad", iconName: "sort" }).html + ee({ prefix: "fad", iconName: "sort-up" }).html + ee({ prefix: "fad", iconName: "sort-down" }).html, a.appendChild(l), a.addEventListener("click", async () => {
1681
+ const r = t.params.orderBy, o = t.params.sortedBy;
1682
+ return r === e && o === "asc" ? (a.classList.remove("asc"), a.classList.add("desc"), t.methods.applyParams({
1507
1683
  orderBy: e,
1508
1684
  sortedBy: "desc"
1509
- })) : n === e ? (o.classList.remove("desc"), await t.methods.clearParams(["orderBy", "sortedBy"])) : (o.classList.add("asc"), t.methods.applyParams({
1685
+ })) : r === e ? (a.classList.remove("desc"), await t.methods.clearParams(["orderBy", "sortedBy"])) : (a.classList.add("asc"), t.methods.applyParams({
1510
1686
  orderBy: e,
1511
1687
  sortedBy: "asc"
1512
1688
  }));
1513
1689
  });
1514
- }, ko = (e, s, t) => {
1690
+ }, Ta = (e, s, t) => {
1515
1691
  if (s.querySelector(".spark-table-head-filter"))
1516
1692
  return;
1517
- const o = document.createElement("div"), l = document.createElement("input");
1518
- l.type = "text", l.placeholder = "Filter...", o.className = "spark-table-head-filter", o.appendChild(l);
1519
- const n = at(async (a, c) => {
1520
- const r = c.target.value, i = `filter[${a}]`;
1521
- if (r)
1522
- return t.params[i] && t.params[i] === r ? void 0 : t.methods.applyParams({
1693
+ const a = document.createElement("div"), l = document.createElement("input");
1694
+ l.type = "text", l.placeholder = "Filter...", a.className = "spark-table-head-filter", a.appendChild(l);
1695
+ const r = ot(async (o, c) => {
1696
+ const n = c.target.value, i = `filter[${o}]`;
1697
+ if (n)
1698
+ return t.params[i] && t.params[i] === n ? void 0 : t.methods.applyParams({
1523
1699
  page: 1,
1524
- [i]: r
1700
+ [i]: n
1525
1701
  });
1526
1702
  await t.methods.removeParam(i);
1527
1703
  }, 200);
1528
- l.addEventListener("keyup", (a) => n(e, a)), s.appendChild(o);
1529
- }, wo = (e, s, t) => {
1704
+ l.addEventListener("keyup", (o) => r(e, o)), s.appendChild(a);
1705
+ }, La = (e, s, t) => {
1530
1706
  e.classList.add("spark-table-head"), t && t.columnSort && e.classList.add("can-sort"), t && t.columnFilter && e.classList.add("can-filter"), e.querySelector(".relative").classList.add("spark-table-head-title-wrapper");
1531
1707
  const l = e.querySelector(".colHeader");
1532
- l.classList.add("spark-table-head-title"), l.innerHTML = bo(s);
1533
- }, _o = (e, s, t) => {
1708
+ l.classList.add("spark-table-head-title"), l.innerHTML = Ca(s);
1709
+ }, Pa = (e, s, t) => {
1534
1710
  if (typeof e != "number")
1535
1711
  return e;
1536
1712
  if (e < 0)
1537
1713
  return;
1538
- let o = 2;
1539
- const l = t.methods.colToProp(e), n = t.methods.getSettingsForProp(l);
1540
- s.childElementCount === 1 && ((!n || !n.columnSort) && o--, (!n || !n.columnFilter) && o--, n && n.columnSort && xo(l, s, t), n && n.columnFilter && ko(l, s, t)), (s.childElementCount === o || o === 0) && wo(s, l, n);
1541
- }, So = (e) => {
1714
+ let a = 2;
1715
+ const l = t.methods.colToProp(e), r = t.methods.getSettingsForProp(l);
1716
+ s.childElementCount === 1 && ((!r || !r.columnSort) && a--, (!r || !r.columnFilter) && a--, r && r.columnSort && $a(l, s, t), r && r.columnFilter && Ta(l, s, t)), (s.childElementCount === a || a === 0) && La(s, l, r);
1717
+ }, Ma = (e) => {
1542
1718
  if (!e.hotInstance || !e.hotInstance.rootElement)
1543
1719
  return;
1544
- const s = e.params.orderBy, t = e.params.sortedBy, o = e.hotInstance.rootElement.querySelectorAll("thead th.can-sort .relative");
1545
- o.forEach((l) => {
1720
+ const s = e.params.orderBy, t = e.params.sortedBy, a = e.hotInstance.rootElement.querySelectorAll("thead th.can-sort .relative");
1721
+ a.forEach((l) => {
1546
1722
  l.classList.remove("asc", "desc");
1547
- }), s && t && o.forEach((l) => {
1548
- const n = l.closest("th"), a = Array.from(n.parentElement.children).indexOf(n);
1549
- e.methods.colToProp(a) === s && l.classList.add(t);
1723
+ }), s && t && a.forEach((l) => {
1724
+ const r = l.closest("th"), o = Array.from(r.parentElement.children).indexOf(r);
1725
+ e.methods.colToProp(o) === s && l.classList.add(t);
1550
1726
  });
1551
- }, Co = (e) => (s, t, o, l, n, a, c) => {
1727
+ }, Va = (e) => (s, t, a, l, r, o, c) => {
1552
1728
  t.innerHTML = "", t.classList.add("spark-table-cell-actions");
1553
1729
  const i = (c.rendererConfig || {}).actions || [];
1554
1730
  if (i.length === 0)
1555
1731
  return;
1556
- const u = s.getSourceDataAtRow(s.toPhysicalRow(o)), d = document.createElement("div");
1732
+ const u = s.getSourceDataAtRow(s.toPhysicalRow(a)), d = document.createElement("div");
1557
1733
  d.classList.add("flex", "items-center", "gap-2"), i.forEach((p) => {
1558
1734
  if (p.condition && typeof p.condition == "function" && !p.condition(u))
1559
1735
  return;
1560
1736
  const v = document.createElement("button");
1561
1737
  if (v.type = "button", v.classList.add("spark-table-action-button"), p.icon) {
1562
- const x = document.createElement("span");
1563
- x.innerHTML = Q({ prefix: "far", iconName: p.icon }).html, x.classList.add("size-4"), v.appendChild(x);
1738
+ const b = document.createElement("span");
1739
+ b.innerHTML = ee({ prefix: "far", iconName: p.icon }).html, b.classList.add("size-4"), v.appendChild(b);
1564
1740
  }
1565
1741
  if (p.label) {
1566
- const x = document.createElement("span");
1567
- x.textContent = p.label, v.appendChild(x);
1742
+ const b = document.createElement("span");
1743
+ b.textContent = p.label, v.appendChild(b);
1568
1744
  }
1569
- v.addEventListener("click", async (x) => {
1570
- if (x.preventDefault(), x.stopPropagation(), p.confirm) {
1571
- const C = typeof p.confirm == "string" ? p.confirm : `Are you sure you want to ${p.label?.toLowerCase() || "perform this action"}?`;
1572
- if (!await ae.confirm({
1745
+ v.addEventListener("click", async (b) => {
1746
+ if (b.preventDefault(), b.stopPropagation(), p.confirm) {
1747
+ const x = typeof p.confirm == "string" ? p.confirm : `Are you sure you want to ${p.label?.toLowerCase() || "perform this action"}?`;
1748
+ if (!await oe.confirm({
1573
1749
  title: p.confirmTitle,
1574
- message: C,
1750
+ message: x,
1575
1751
  type: p.confirmType,
1576
1752
  confirmText: p.confirmText,
1577
1753
  cancelText: p.cancelText,
@@ -1591,10 +1767,10 @@ const ae = new mo(), ho = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
1591
1767
  purple: "bg-purple-100 text-purple-800",
1592
1768
  pink: "bg-pink-100 text-pink-800",
1593
1769
  indigo: "bg-indigo-100 text-indigo-800"
1594
- }, $o = (e) => (s, t, o, l, n, a, c) => {
1595
- if (t.innerHTML = "", t.classList.add("spark-table-cell-badge"), !a)
1770
+ }, Ha = (e) => (s, t, a, l, r, o, c) => {
1771
+ if (t.innerHTML = "", t.classList.add("spark-table-cell-badge"), !o)
1596
1772
  return;
1597
- const i = (c.rendererConfig || {}).colorMap || {}, u = i[a] || i[a?.toLowerCase()] || "gray", d = Pe[u] || Pe.gray, p = document.createElement("span");
1773
+ const i = (c.rendererConfig || {}).colorMap || {}, u = i[o] || i[o?.toLowerCase()] || "gray", d = Pe[u] || Pe.gray, p = document.createElement("span");
1598
1774
  p.classList.add(
1599
1775
  "inline-flex",
1600
1776
  "items-center",
@@ -1605,15 +1781,15 @@ const ae = new mo(), ho = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
1605
1781
  "font-medium",
1606
1782
  "capitalize",
1607
1783
  ...d.split(" ")
1608
- ), p.textContent = a, t.appendChild(p);
1609
- }, Le = {
1784
+ ), p.textContent = o, t.appendChild(p);
1785
+ }, Me = {
1610
1786
  green: { bg: "bg-green-100", text: "text-green-500" },
1611
1787
  red: { bg: "bg-red-100", text: "text-red-500" },
1612
1788
  yellow: { bg: "bg-yellow-100", text: "text-yellow-500" },
1613
1789
  blue: { bg: "bg-blue-100", text: "text-blue-500" },
1614
1790
  gray: { bg: "bg-gray-100", text: "text-gray-500" },
1615
1791
  purple: { bg: "bg-purple-100", text: "text-purple-500" }
1616
- }, To = (e) => {
1792
+ }, Ra = (e) => {
1617
1793
  if (e == null || e === "")
1618
1794
  return !1;
1619
1795
  if (typeof e == "boolean")
@@ -1625,99 +1801,99 @@ const ae = new mo(), ho = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
1625
1801
  return s === "1" || s === "yes" || s === "true";
1626
1802
  }
1627
1803
  return !1;
1628
- }, Po = (e) => (s, t, o, l, n, a, c) => {
1804
+ }, Fa = (e) => (s, t, a, l, r, o, c) => {
1629
1805
  t.innerHTML = "", t.classList.add("spark-table-cell-boolean");
1630
- const r = c.rendererConfig || {}, i = To(a), u = i ? r.trueIcon || "check" : r.falseIcon || "xmark", d = i ? r.trueColor || "green" : r.falseColor || "red", p = r.size || 32, v = r.iconPrefix || "far", x = Le[d] || Le.gray;
1806
+ const n = c.rendererConfig || {}, i = Ra(o), u = i ? n.trueIcon || "check" : n.falseIcon || "xmark", d = i ? n.trueColor || "green" : n.falseColor || "red", p = n.size || 32, v = n.iconPrefix || "far", b = Me[d] || Me.gray;
1631
1807
  t.dataset.copyValue = i ? "true" : "false";
1632
- const C = document.createElement("div");
1633
- C.classList.add(
1808
+ const x = document.createElement("div");
1809
+ x.classList.add(
1634
1810
  "inline-flex",
1635
1811
  "items-center",
1636
1812
  "justify-center",
1637
1813
  "rounded-full",
1638
- x.bg,
1639
- x.text
1640
- ), C.style.width = `${p}px`, C.style.height = `${p}px`;
1641
- const g = document.createElement("span");
1642
- g.innerHTML = Q({ prefix: v, iconName: u }).html, g.classList.add("flex", "items-center", "justify-center");
1814
+ b.bg,
1815
+ b.text
1816
+ ), x.style.width = `${p}px`, x.style.height = `${p}px`;
1817
+ const h = document.createElement("span");
1818
+ h.innerHTML = ee({ prefix: v, iconName: u }).html, h.classList.add("flex", "items-center", "justify-center");
1643
1819
  const w = Math.round(p * 0.5);
1644
- g.style.fontSize = `${w}px`, C.appendChild(g), t.appendChild(C);
1645
- }, Lo = (e, s = 2) => {
1820
+ h.style.fontSize = `${w}px`, x.appendChild(h), t.appendChild(x);
1821
+ }, Ea = (e, s = 2) => {
1646
1822
  const t = Number(e);
1647
1823
  if (isNaN(t)) return null;
1648
- const o = t < 0, n = Math.abs(t).toLocaleString("en-AU", {
1824
+ const a = t < 0, r = Math.abs(t).toLocaleString("en-AU", {
1649
1825
  minimumFractionDigits: s,
1650
1826
  maximumFractionDigits: s
1651
1827
  });
1652
- return o ? `-$${n}` : `$${n}`;
1653
- }, Mo = (e) => (s, t, o, l, n, a, c) => {
1828
+ return a ? `-$${r}` : `$${r}`;
1829
+ }, Aa = (e) => (s, t, a, l, r, o, c) => {
1654
1830
  t.innerHTML = "", t.classList.add("spark-table-cell-currency");
1655
- const r = c.rendererConfig || {}, { decimals: i = 2, emptyText: u = "" } = r;
1656
- if (a == null || a === "") {
1831
+ const n = c.rendererConfig || {}, { decimals: i = 2, emptyText: u = "" } = n;
1832
+ if (o == null || o === "") {
1657
1833
  t.textContent = u;
1658
1834
  return;
1659
1835
  }
1660
- const d = Lo(a, i);
1836
+ const d = Ea(o, i);
1661
1837
  if (d === null) {
1662
1838
  t.textContent = u;
1663
1839
  return;
1664
1840
  }
1665
1841
  const p = document.createElement("span");
1666
1842
  p.textContent = d, t.appendChild(p);
1667
- }, Ho = (e) => (s, t, o, l, n, a, c) => {
1668
- if (t.innerHTML = "", t.classList.add("spark-table-cell-link"), !a)
1843
+ }, Oa = (e) => (s, t, a, l, r, o, c) => {
1844
+ if (t.innerHTML = "", t.classList.add("spark-table-cell-link"), !o)
1669
1845
  return;
1670
- const r = c.rendererConfig || {}, i = s.getSourceDataAtRow(s.toPhysicalRow(o));
1671
- let u = a;
1672
- r.href && (typeof r.href == "function" ? u = r.href(i) : r.href === "email" ? u = `mailto:${a}` : r.href === "tel" ? u = `tel:${a}` : typeof r.href == "string" && (u = i[r.href] || a));
1846
+ const n = c.rendererConfig || {}, i = s.getSourceDataAtRow(s.toPhysicalRow(a));
1847
+ let u = o;
1848
+ n.href && (typeof n.href == "function" ? u = n.href(i) : n.href === "email" ? u = `mailto:${o}` : n.href === "tel" ? u = `tel:${o}` : typeof n.href == "string" && (u = i[n.href] || o));
1673
1849
  const d = document.createElement("a");
1674
- d.href = u, d.textContent = a, d.classList.add("text-primary-600", "hover:text-primary-900", "hover:underline"), r.target && (d.target = r.target), r.rel && (d.rel = r.rel), d.addEventListener("click", (p) => {
1850
+ d.href = u, d.textContent = o, d.classList.add("text-primary-600", "hover:text-primary-900", "hover:underline"), n.target && (d.target = n.target), n.rel && (d.rel = n.rel), d.addEventListener("click", (p) => {
1675
1851
  p.stopPropagation();
1676
1852
  }), t.appendChild(d);
1677
- }, Me = {
1853
+ }, Ve = {
1678
1854
  sm: "h-6 w-6",
1679
1855
  md: "h-8 w-8",
1680
1856
  lg: "h-12 w-12"
1681
- }, Vo = (e) => (s, t, o, l, n, a, c) => {
1682
- if (t.innerHTML = "", t.classList.add("spark-table-cell-image"), !a)
1857
+ }, Da = (e) => (s, t, a, l, r, o, c) => {
1858
+ if (t.innerHTML = "", t.classList.add("spark-table-cell-image"), !o)
1683
1859
  return;
1684
- const r = c.rendererConfig || {}, i = s.getSourceDataAtRow(s.toPhysicalRow(o)), u = r.size || "md", d = Me[u] || Me.md, p = r.rounded !== !1;
1685
- let v = r.alt || "";
1686
- typeof r.alt == "string" && i[r.alt] && (v = i[r.alt]);
1687
- const x = document.createElement("img");
1688
- x.src = a, x.alt = v, x.classList.add(...d.split(" "), "object-cover"), p ? x.classList.add("rounded-full") : x.classList.add("rounded"), t.appendChild(x);
1689
- }, Ro = (e) => (s, t, o, l, n, a, c) => {
1690
- if (t.innerHTML = "", t.classList.add("spark-table-cell-date"), !a)
1860
+ const n = c.rendererConfig || {}, i = s.getSourceDataAtRow(s.toPhysicalRow(a)), u = n.size || "md", d = Ve[u] || Ve.md, p = n.rounded !== !1;
1861
+ let v = n.alt || "";
1862
+ typeof n.alt == "string" && i[n.alt] && (v = i[n.alt]);
1863
+ const b = document.createElement("img");
1864
+ b.src = o, b.alt = v, b.classList.add(...d.split(" "), "object-cover"), p ? b.classList.add("rounded-full") : b.classList.add("rounded"), t.appendChild(b);
1865
+ }, Ba = (e) => (s, t, a, l, r, o, c) => {
1866
+ if (t.innerHTML = "", t.classList.add("spark-table-cell-date"), !o)
1691
1867
  return;
1692
- const r = c.rendererConfig || {}, i = r.format || "short", u = r.locale || "en-US";
1693
- let d = a;
1868
+ const n = c.rendererConfig || {}, i = n.format || "short", u = n.locale || "en-US";
1869
+ let d = o;
1694
1870
  try {
1695
- const v = new Date(a);
1696
- isNaN(v.getTime()) ? d = a : typeof i == "function" ? d = i(v) : i === "short" ? d = v.toLocaleDateString(u) : i === "long" ? d = v.toLocaleDateString(u, {
1871
+ const v = new Date(o);
1872
+ isNaN(v.getTime()) ? d = o : typeof i == "function" ? d = i(v) : i === "short" ? d = v.toLocaleDateString(u) : i === "long" ? d = v.toLocaleDateString(u, {
1697
1873
  year: "numeric",
1698
1874
  month: "long",
1699
1875
  day: "numeric"
1700
- }) : i === "relative" ? d = Eo(v) : i === "datetime" ? d = v.toLocaleString(u) : d = v.toLocaleDateString(u);
1876
+ }) : i === "relative" ? d = ja(v) : i === "datetime" ? d = v.toLocaleString(u) : d = v.toLocaleDateString(u);
1701
1877
  } catch (v) {
1702
- console.error("Error formatting date:", v), d = a;
1878
+ console.error("Error formatting date:", v), d = o;
1703
1879
  }
1704
1880
  const p = document.createElement("span");
1705
1881
  p.textContent = d, t.appendChild(p);
1706
1882
  };
1707
- function Eo(e) {
1708
- const t = /* @__PURE__ */ new Date() - e, o = Math.floor(Math.abs(t) / 1e3), l = Math.floor(o / 60), n = Math.floor(l / 60), a = Math.floor(n / 24), c = Math.floor(a / 30), r = Math.floor(a / 365), i = t > 0;
1709
- return o < 60 ? i ? "just now" : "in a moment" : l < 60 ? i ? `${l} minute${l > 1 ? "s" : ""} ago` : `in ${l} minute${l > 1 ? "s" : ""}` : n < 24 ? i ? `${n} hour${n > 1 ? "s" : ""} ago` : `in ${n} hour${n > 1 ? "s" : ""}` : a < 30 ? i ? `${a} day${a > 1 ? "s" : ""} ago` : `in ${a} day${a > 1 ? "s" : ""}` : c < 12 ? i ? `${c} month${c > 1 ? "s" : ""} ago` : `in ${c} month${c > 1 ? "s" : ""}` : i ? `${r} year${r > 1 ? "s" : ""} ago` : `in ${r} year${r > 1 ? "s" : ""}`;
1883
+ function ja(e) {
1884
+ const t = /* @__PURE__ */ new Date() - e, a = Math.floor(Math.abs(t) / 1e3), l = Math.floor(a / 60), r = Math.floor(l / 60), o = Math.floor(r / 24), c = Math.floor(o / 30), n = Math.floor(o / 365), i = t > 0;
1885
+ return a < 60 ? i ? "just now" : "in a moment" : l < 60 ? i ? `${l} minute${l > 1 ? "s" : ""} ago` : `in ${l} minute${l > 1 ? "s" : ""}` : r < 24 ? i ? `${r} hour${r > 1 ? "s" : ""} ago` : `in ${r} hour${r > 1 ? "s" : ""}` : o < 30 ? i ? `${o} day${o > 1 ? "s" : ""} ago` : `in ${o} day${o > 1 ? "s" : ""}` : c < 12 ? i ? `${c} month${c > 1 ? "s" : ""} ago` : `in ${c} month${c > 1 ? "s" : ""}` : i ? `${n} year${n > 1 ? "s" : ""} ago` : `in ${n} year${n > 1 ? "s" : ""}`;
1710
1886
  }
1711
- const Ao = (e) => {
1887
+ const za = (e) => {
1712
1888
  const s = ["th", "st", "nd", "rd"], t = e % 100;
1713
1889
  return e + (s[(t - 20) % 10] || s[t] || s[0]);
1714
- }, j = (e, s = 2) => String(e).padStart(s, "0"), ye = /* @__PURE__ */ new Map(), Fo = (e, s) => {
1890
+ }, I = (e, s = 2) => String(e).padStart(s, "0"), ye = /* @__PURE__ */ new Map(), Ia = (e, s) => {
1715
1891
  const t = `${e}:${JSON.stringify(s)}`;
1716
1892
  return ye.has(t) || ye.set(t, new Intl.DateTimeFormat(e, s)), ye.get(t);
1717
- }, ce = (e, s, t, o) => {
1718
- const a = Fo(s, t).formatToParts(e).find((c) => c.type === o);
1719
- return a ? a.value : "";
1720
- }, Oo = (e) => e.epochMilliseconds !== void 0 ? new Date(e.epochMilliseconds) : new Date(
1893
+ }, ce = (e, s, t, a) => {
1894
+ const o = Ia(s, t).formatToParts(e).find((c) => c.type === a);
1895
+ return o ? o.value : "";
1896
+ }, Na = (e) => e.epochMilliseconds !== void 0 ? new Date(e.epochMilliseconds) : new Date(
1721
1897
  e.year,
1722
1898
  e.month - 1,
1723
1899
  e.day,
@@ -1725,8 +1901,8 @@ const Ao = (e) => {
1725
1901
  e.minute || 0,
1726
1902
  e.second || 0,
1727
1903
  e.millisecond || 0
1728
- ), Bo = (e) => {
1729
- const s = e.hour || 0, t = s % 12 || 12, o = s >= 12;
1904
+ ), Za = (e) => {
1905
+ const s = e.hour || 0, t = s % 12 || 12, a = s >= 12;
1730
1906
  return {
1731
1907
  year: e.year,
1732
1908
  month: e.month,
@@ -1740,49 +1916,49 @@ const Ao = (e) => {
1740
1916
  millisecond: e.millisecond || 0,
1741
1917
  dayOfWeek: e.dayOfWeek,
1742
1918
  // 1=Monday, 7=Sunday in Temporal
1743
- isPM: o,
1919
+ isPM: a,
1744
1920
  quarter: Math.ceil(e.month / 3)
1745
1921
  };
1746
1922
  }, He = (e, s = !0) => {
1747
1923
  if (!e.offsetNanoseconds && e.offsetNanoseconds !== 0)
1748
1924
  return "";
1749
- const t = Math.round(e.offsetNanoseconds / 6e10), o = t >= 0 ? "+" : "-", l = Math.abs(t), n = Math.floor(l / 60), a = l % 60;
1750
- return s ? `${o}${j(n)}:${j(a)}` : `${o}${j(n)}${j(a)}`;
1751
- }, Do = (e, s) => {
1752
- const t = Bo(e), o = Oo(e), l = t.dayOfWeek === 7 ? 0 : t.dayOfWeek;
1925
+ const t = Math.round(e.offsetNanoseconds / 6e10), a = t >= 0 ? "+" : "-", l = Math.abs(t), r = Math.floor(l / 60), o = l % 60;
1926
+ return s ? `${a}${I(r)}:${I(o)}` : `${a}${I(r)}${I(o)}`;
1927
+ }, qa = (e, s) => {
1928
+ const t = Za(e), a = Na(e), l = t.dayOfWeek === 7 ? 0 : t.dayOfWeek;
1753
1929
  return [
1754
1930
  // Year
1755
1931
  ["YYYY", () => String(t.year)],
1756
1932
  ["YY", () => String(t.year).slice(-2)],
1757
1933
  // Month
1758
- ["MMMM", () => ce(o, s, { month: "long" }, "month")],
1759
- ["MMM", () => ce(o, s, { month: "short" }, "month")],
1760
- ["MM", () => j(t.month)],
1934
+ ["MMMM", () => ce(a, s, { month: "long" }, "month")],
1935
+ ["MMM", () => ce(a, s, { month: "short" }, "month")],
1936
+ ["MM", () => I(t.month)],
1761
1937
  ["M", () => String(t.month)],
1762
1938
  // Day of month
1763
- ["DD", () => j(t.day)],
1764
- ["Do", () => Ao(t.day)],
1939
+ ["DD", () => I(t.day)],
1940
+ ["Do", () => za(t.day)],
1765
1941
  ["D", () => String(t.day)],
1766
1942
  // Day of week
1767
- ["dddd", () => ce(o, s, { weekday: "long" }, "weekday")],
1768
- ["ddd", () => ce(o, s, { weekday: "short" }, "weekday")],
1769
- ["dd", () => ce(o, s, { weekday: "short" }, "weekday").slice(0, 2)],
1943
+ ["dddd", () => ce(a, s, { weekday: "long" }, "weekday")],
1944
+ ["ddd", () => ce(a, s, { weekday: "short" }, "weekday")],
1945
+ ["dd", () => ce(a, s, { weekday: "short" }, "weekday").slice(0, 2)],
1770
1946
  ["d", () => String(l)],
1771
1947
  // Hour
1772
- ["HH", () => j(t.hour24)],
1948
+ ["HH", () => I(t.hour24)],
1773
1949
  ["H", () => String(t.hour24)],
1774
- ["hh", () => j(t.hour12)],
1950
+ ["hh", () => I(t.hour12)],
1775
1951
  ["h", () => String(t.hour12)],
1776
- ["kk", () => j(t.hourFrom1)],
1952
+ ["kk", () => I(t.hourFrom1)],
1777
1953
  ["k", () => String(t.hourFrom1)],
1778
1954
  // Minute
1779
- ["mm", () => j(t.minute)],
1955
+ ["mm", () => I(t.minute)],
1780
1956
  ["m", () => String(t.minute)],
1781
1957
  // Second
1782
- ["ss", () => j(t.second)],
1958
+ ["ss", () => I(t.second)],
1783
1959
  ["s", () => String(t.second)],
1784
1960
  // Millisecond
1785
- ["SSS", () => j(t.millisecond, 3)],
1961
+ ["SSS", () => I(t.millisecond, 3)],
1786
1962
  // AM/PM
1787
1963
  ["A", () => t.isPM ? "PM" : "AM"],
1788
1964
  ["a", () => t.isPM ? "pm" : "am"],
@@ -1792,11 +1968,11 @@ const Ao = (e) => {
1792
1968
  // Quarter
1793
1969
  ["Q", () => String(t.quarter)],
1794
1970
  // Unix timestamp
1795
- ["x", () => String(e.epochMilliseconds ?? o.getTime())],
1796
- ["X", () => String(Math.floor((e.epochMilliseconds ?? o.getTime()) / 1e3))]
1971
+ ["x", () => String(e.epochMilliseconds ?? a.getTime())],
1972
+ ["X", () => String(Math.floor((e.epochMilliseconds ?? a.getTime()) / 1e3))]
1797
1973
  ];
1798
- }, zo = (e, s, t = {}) => {
1799
- const { locale: o = "en-US" } = t;
1974
+ }, Ua = (e, s, t = {}) => {
1975
+ const { locale: a = "en-US" } = t;
1800
1976
  if (!e)
1801
1977
  return "";
1802
1978
  let l = e;
@@ -1805,69 +1981,69 @@ const Ao = (e) => {
1805
1981
  if (e.includes("[") || e.includes("Z") || /[+-]\d{2}:\d{2}$/.test(e))
1806
1982
  l = Temporal.ZonedDateTime.from(e);
1807
1983
  else {
1808
- const r = e.replace(" ", "T");
1809
- l = Temporal.PlainDateTime.from(r);
1984
+ const n = e.replace(" ", "T");
1985
+ l = Temporal.PlainDateTime.from(n);
1810
1986
  }
1811
- } catch (r) {
1812
- return console.error("Failed to parse date string:", e, r), e;
1987
+ } catch (n) {
1988
+ return console.error("Failed to parse date string:", e, n), e;
1813
1989
  }
1814
- const n = Do(l, o), a = n.map(([r]) => r).join("|"), c = new RegExp(`\\[([^\\]]+)\\]|(${a})`, "g");
1815
- return s.replace(c, (r, i, u) => {
1990
+ const r = qa(l, a), o = r.map(([n]) => n).join("|"), c = new RegExp(`\\[([^\\]]+)\\]|(${o})`, "g");
1991
+ return s.replace(c, (n, i, u) => {
1816
1992
  if (i !== void 0)
1817
1993
  return i;
1818
- const d = n.find(([p]) => p === u);
1819
- return d ? d[1]() : r;
1994
+ const d = r.find(([p]) => p === u);
1995
+ return d ? d[1]() : n;
1820
1996
  });
1821
- }, jo = (e, s = {}) => {
1822
- const { fromTimezone: t, toTimezone: o } = s;
1997
+ }, Ka = (e, s = {}) => {
1998
+ const { fromTimezone: t, toTimezone: a } = s;
1823
1999
  if (!e)
1824
2000
  return null;
1825
2001
  const l = e.replace(" ", "T");
1826
- return t && o ? Temporal.PlainDateTime.from(l).toZonedDateTime(t).withTimeZone(o) : t ? Temporal.PlainDateTime.from(l).toZonedDateTime(t) : Temporal.PlainDateTime.from(l);
1827
- }, Io = (e) => (s, t, o, l, n, a, c) => {
2002
+ return t && a ? Temporal.PlainDateTime.from(l).toZonedDateTime(t).withTimeZone(a) : t ? Temporal.PlainDateTime.from(l).toZonedDateTime(t) : Temporal.PlainDateTime.from(l);
2003
+ }, Ga = (e) => (s, t, a, l, r, o, c) => {
1828
2004
  t.innerHTML = "", t.classList.add("spark-table-cell-datetime");
1829
- const r = c.rendererConfig || {}, {
2005
+ const n = c.rendererConfig || {}, {
1830
2006
  format: i = "DD MMM YYYY, HH:mm",
1831
2007
  fromTimezone: u,
1832
2008
  toTimezone: d,
1833
2009
  locale: p = "en-US",
1834
2010
  emptyText: v = ""
1835
- } = r;
1836
- if (!a) {
2011
+ } = n;
2012
+ if (!o) {
1837
2013
  t.textContent = v;
1838
2014
  return;
1839
2015
  }
1840
2016
  try {
1841
- const x = jo(a, { fromTimezone: u, toTimezone: d });
1842
- if (!x) {
2017
+ const b = Ka(o, { fromTimezone: u, toTimezone: d });
2018
+ if (!b) {
1843
2019
  t.textContent = v;
1844
2020
  return;
1845
2021
  }
1846
- const C = zo(x, i, { locale: p }), g = document.createElement("span");
1847
- g.textContent = C, t.appendChild(g);
1848
- } catch (x) {
1849
- console.error("Error formatting datetime:", x, { value: a, format: i }), t.textContent = a;
2022
+ const x = Ua(b, i, { locale: p }), h = document.createElement("span");
2023
+ h.textContent = x, t.appendChild(h);
2024
+ } catch (b) {
2025
+ console.error("Error formatting datetime:", b, { value: o, format: i }), t.textContent = o;
1850
2026
  }
1851
- }, No = /* @__PURE__ */ new Map(), K = (e, s) => {
1852
- ps(e, (t, o, l, n, a, c, r) => {
1853
- fs.apply(null, [t, o, l, n, a, c, r]), s(t, o, l, n, a, c, r);
1854
- }), No.set(e, s);
1855
- }, Zo = (e) => {
1856
- K("spark.actions", Co(e)), K("spark.badge", $o()), K("spark.boolean", Po()), K("spark.currency", Mo()), K("spark.link", Ho()), K("spark.image", Vo()), K("spark.date", Ro()), K("spark.datetime", Io()), K("style.capitalize", (s, t, o, l, n, a) => {
1857
- if (!a || a.length === 0) {
2027
+ }, Wa = /* @__PURE__ */ new Map(), G = (e, s) => {
2028
+ ps(e, (t, a, l, r, o, c, n) => {
2029
+ fs.apply(null, [t, a, l, r, o, c, n]), s(t, a, l, r, o, c, n);
2030
+ }), Wa.set(e, s);
2031
+ }, Ya = (e) => {
2032
+ G("spark.actions", Va(e)), G("spark.badge", Ha()), G("spark.boolean", Fa()), G("spark.currency", Aa()), G("spark.link", Oa()), G("spark.image", Da()), G("spark.date", Ba()), G("spark.datetime", Ga()), G("style.capitalize", (s, t, a, l, r, o) => {
2033
+ if (!o || o.length === 0) {
1858
2034
  t.innerText = "";
1859
2035
  return;
1860
2036
  }
1861
2037
  const c = document.createElement("span");
1862
- c.innerHTML = a, c.classList.add("capitalize"), t.replaceChildren(c);
2038
+ c.innerHTML = o, c.classList.add("capitalize"), t.replaceChildren(c);
1863
2039
  });
1864
- }, qo = () => {
1865
- }, Uo = (e, s = {}) => {
1866
- const t = W(), o = le(), l = s.namespace, n = l === null, a = s.syncToRoute !== !1, c = s.persistToStorage === !0, r = s.restoreOnMount !== !1, i = s.storageTTL || 7, u = n ? `spark-table:${o.path}` : `spark-table:${l}`, d = (y, S = "") => {
2040
+ }, Xa = () => {
2041
+ }, Ja = (e, s = {}) => {
2042
+ const t = Y(), a = le(), l = s.namespace, r = l === null, o = s.syncToRoute !== !1, c = s.persistToStorage === !0, n = s.restoreOnMount !== !1, i = s.storageTTL || 7, u = r ? `spark-table:${a.path}` : `spark-table:${l}`, d = (y, C = "") => {
1867
2043
  const P = {};
1868
- return Object.keys(y).forEach((D) => {
1869
- const X = y[D], de = S ? `${S}[${D}]` : D;
1870
- X != null && (typeof X == "object" && !Array.isArray(X) ? Object.assign(P, d(X, de)) : P[de] = String(X));
2044
+ return Object.keys(y).forEach((B) => {
2045
+ const J = y[B], de = C ? `${C}[${B}]` : B;
2046
+ J != null && (typeof J == "object" && !Array.isArray(J) ? Object.assign(P, d(J, de)) : P[de] = String(J));
1871
2047
  }), P;
1872
2048
  }, p = () => {
1873
2049
  if (c)
@@ -1885,94 +2061,94 @@ const Ao = (e) => {
1885
2061
  try {
1886
2062
  const y = localStorage.getItem(u);
1887
2063
  if (!y) return null;
1888
- const S = JSON.parse(y);
2064
+ const C = JSON.parse(y);
1889
2065
  if (i > 0) {
1890
- const P = Date.now() - S.timestamp, D = i * 24 * 60 * 60 * 1e3;
1891
- if (P > D)
2066
+ const P = Date.now() - C.timestamp, B = i * 24 * 60 * 60 * 1e3;
2067
+ if (P > B)
1892
2068
  return localStorage.removeItem(u), null;
1893
2069
  }
1894
- return S.params;
2070
+ return C.params;
1895
2071
  } catch (y) {
1896
2072
  return console.warn("Failed to load table state from localStorage:", y), null;
1897
2073
  }
1898
- }, x = () => {
2074
+ }, b = () => {
1899
2075
  try {
1900
2076
  localStorage.removeItem(u);
1901
2077
  } catch (y) {
1902
2078
  console.warn("Failed to clear table state from localStorage:", y);
1903
2079
  }
1904
- }, C = () => {
1905
- if (!a) return;
1906
- const y = { ...o.query };
1907
- if (n) {
2080
+ }, x = () => {
2081
+ if (!o) return;
2082
+ const y = { ...a.query };
2083
+ if (r) {
1908
2084
  Object.keys(y).forEach((P) => {
1909
- g(P) && delete y[P];
2085
+ h(P) && delete y[P];
1910
2086
  });
1911
- const S = d(e.params);
1912
- Object.assign(y, S);
2087
+ const C = d(e.params);
2088
+ Object.assign(y, C);
1913
2089
  } else {
1914
2090
  Object.keys(y).forEach((P) => {
1915
2091
  (P.startsWith(`${l}[`) || P === l) && delete y[P];
1916
2092
  });
1917
- const S = d(e.params, l);
1918
- Object.assign(y, S);
2093
+ const C = d(e.params, l);
2094
+ Object.assign(y, C);
1919
2095
  }
1920
2096
  t.replace({ query: y });
1921
- }, g = (y) => !!(["page", "limit", "search", "orderBy", "sortedBy"].includes(y) || y.includes("[")), w = (y, S) => {
1922
- if (["page", "limit"].includes(y) && S !== null && S !== void 0) {
1923
- const D = parseInt(S, 10);
1924
- return isNaN(D) ? S : D;
2097
+ }, h = (y) => !!(["page", "limit", "search", "orderBy", "sortedBy"].includes(y) || y.includes("[")), w = (y, C) => {
2098
+ if (["page", "limit"].includes(y) && C !== null && C !== void 0) {
2099
+ const B = parseInt(C, 10);
2100
+ return isNaN(B) ? C : B;
1925
2101
  }
1926
- return S;
1927
- }, _ = () => {
1928
- if (n)
1929
- Object.keys(o.query).forEach((y) => {
1930
- g(y) && (e.params[y] = w(y, o.query[y]));
2102
+ return C;
2103
+ }, S = () => {
2104
+ if (r)
2105
+ Object.keys(a.query).forEach((y) => {
2106
+ h(y) && (e.params[y] = w(y, a.query[y]));
1931
2107
  });
1932
2108
  else {
1933
2109
  const y = `${l}[`;
1934
- Object.keys(o.query).forEach((S) => {
1935
- if (S.startsWith(y)) {
1936
- const P = S.slice(y.length, -1);
1937
- e.params[P] = w(P, o.query[S]);
2110
+ Object.keys(a.query).forEach((C) => {
2111
+ if (C.startsWith(y)) {
2112
+ const P = C.slice(y.length, -1);
2113
+ e.params[P] = w(P, a.query[C]);
1938
2114
  }
1939
2115
  });
1940
2116
  }
1941
2117
  };
1942
- return I(
2118
+ return N(
1943
2119
  () => e.params,
1944
2120
  () => {
1945
- a && C(), c && p();
2121
+ o && x(), c && p();
1946
2122
  },
1947
2123
  { deep: !0 }
1948
- ), r && _e(() => {
2124
+ ), n && Se(() => {
1949
2125
  let y = !1;
1950
- if (a) {
1951
- let S = !1;
1952
- if (n)
1953
- S = Object.keys(o.query).some((P) => g(P));
2126
+ if (o) {
2127
+ let C = !1;
2128
+ if (r)
2129
+ C = Object.keys(a.query).some((P) => h(P));
1954
2130
  else {
1955
2131
  const P = `${l}[`;
1956
- S = Object.keys(o.query).some(
1957
- (D) => D.startsWith(P)
2132
+ C = Object.keys(a.query).some(
2133
+ (B) => B.startsWith(P)
1958
2134
  );
1959
2135
  }
1960
- S && (y = !0, _());
2136
+ C && (y = !0, S());
1961
2137
  }
1962
2138
  if (!y && c) {
1963
- const S = v();
1964
- S && Object.keys(S).length > 0 && (Object.keys(S).forEach((P) => {
1965
- S[P] = w(P, S[P]);
1966
- }), Object.assign(e.params, S));
2139
+ const C = v();
2140
+ C && Object.keys(C).length > 0 && (Object.keys(C).forEach((P) => {
2141
+ C[P] = w(P, C[P]);
2142
+ }), Object.assign(e.params, C));
1967
2143
  }
1968
2144
  }), {
1969
- syncToRoute: C,
1970
- restoreFromRoute: _,
2145
+ syncToRoute: x,
2146
+ restoreFromRoute: S,
1971
2147
  saveToStorage: p,
1972
2148
  loadFromStorage: v,
1973
- clearStorage: x
2149
+ clearStorage: b
1974
2150
  };
1975
- }, Ko = { class: "flex items-center gap-4 py-3" }, Go = { class: "shrink-0" }, Wo = { class: "text-sm text-gray-700" }, Yo = { class: "font-medium" }, Xo = { class: "font-medium" }, Jo = { class: "font-medium" }, Qo = {
2151
+ }, Qa = { class: "flex items-center gap-4 py-3" }, eo = { class: "shrink-0" }, to = { class: "text-sm text-gray-700" }, so = { class: "font-medium" }, ao = { class: "font-medium" }, oo = { class: "font-medium" }, ro = {
1976
2152
  __name: "SparkTablePaginationDetails",
1977
2153
  props: {
1978
2154
  sparkTable: {
@@ -1982,29 +2158,29 @@ const Ao = (e) => {
1982
2158
  },
1983
2159
  setup(e) {
1984
2160
  const s = e;
1985
- return (t, o) => (m(), h("div", null, [
1986
- f("div", Ko, [
1987
- f("div", Go, [
1988
- f("div", Wo, [
1989
- o[0] || (o[0] = F(" Showing ", -1)),
1990
- f("span", Yo, M(s.sparkTable.response.meta.from), 1),
1991
- o[1] || (o[1] = F(" to ", -1)),
1992
- f("span", Xo, M(s.sparkTable.response.meta.to), 1),
1993
- o[2] || (o[2] = F(" of ", -1)),
1994
- f("span", Jo, M(s.sparkTable.response.meta.total), 1),
1995
- o[3] || (o[3] = F(" results ", -1))
2161
+ return (t, a) => (m(), g("div", null, [
2162
+ f("div", Qa, [
2163
+ f("div", eo, [
2164
+ f("div", to, [
2165
+ a[0] || (a[0] = O(" Showing ", -1)),
2166
+ f("span", so, M(s.sparkTable.response.meta.from), 1),
2167
+ a[1] || (a[1] = O(" to ", -1)),
2168
+ f("span", ao, M(s.sparkTable.response.meta.to), 1),
2169
+ a[2] || (a[2] = O(" of ", -1)),
2170
+ f("span", oo, M(s.sparkTable.response.meta.total), 1),
2171
+ a[3] || (a[3] = O(" results ", -1))
1996
2172
  ])
1997
2173
  ])
1998
2174
  ])
1999
2175
  ]));
2000
2176
  }
2001
- }, ea = { class: "flex items-center gap-4 px-4 py-3" }, ta = {
2177
+ }, no = { class: "flex items-center gap-4 px-4 py-3" }, lo = {
2002
2178
  key: 0,
2003
2179
  class: "shrink-0 ml-auto"
2004
- }, sa = {
2180
+ }, io = {
2005
2181
  class: "isolate inline-flex -space-x-px rounded-md shadow-xs bg-white",
2006
2182
  "aria-label": "Pagination"
2007
- }, oa = ["onClick"], aa = {
2183
+ }, co = ["onClick"], uo = {
2008
2184
  __name: "SparkTablePaginationPaging",
2009
2185
  props: {
2010
2186
  sparkTable: {
@@ -2014,67 +2190,67 @@ const Ao = (e) => {
2014
2190
  },
2015
2191
  emits: ["paginate"],
2016
2192
  setup(e, { emit: s }) {
2017
- const t = e, o = s, l = (u) => {
2018
- n(t.sparkTable.params.page + u);
2019
- }, n = (u) => {
2020
- u < 1 || u > t.sparkTable.response.meta.last_page || o("paginate", {
2193
+ const t = e, a = s, l = (u) => {
2194
+ r(t.sparkTable.params.page + u);
2195
+ }, r = (u) => {
2196
+ u < 1 || u > t.sparkTable.response.meta.last_page || a("paginate", {
2021
2197
  page: u
2022
2198
  });
2023
- }, a = $(() => t.sparkTable.params.page ? Math.ceil(t.sparkTable.params.page / 10) * 10 : 1), c = $(() => t.sparkTable.computed.ready ? os(
2024
- Math.floor((a.value - 1) / 10) * 10 + 1,
2025
- a.value > t.sparkTable.response.meta.last_page ? t.sparkTable.response.meta.last_page + 1 : a.value + 1
2026
- ) : []), r = $(
2027
- () => t.sparkTable.params.page < J(t.sparkTable.response.meta, "last_page", 1)
2199
+ }, o = $(() => t.sparkTable.params.page ? Math.ceil(t.sparkTable.params.page / 10) * 10 : 1), c = $(() => t.sparkTable.computed.ready ? as(
2200
+ Math.floor((o.value - 1) / 10) * 10 + 1,
2201
+ o.value > t.sparkTable.response.meta.last_page ? t.sparkTable.response.meta.last_page + 1 : o.value + 1
2202
+ ) : []), n = $(
2203
+ () => t.sparkTable.params.page < Q(t.sparkTable.response.meta, "last_page", 1)
2028
2204
  ), i = $(() => t.sparkTable.params.page > 1);
2029
2205
  return (u, d) => {
2030
- const p = O("font-awesome-icon");
2031
- return m(), h("div", null, [
2032
- f("div", ea, [
2033
- c.value.length > 1 ? (m(), h("div", ta, [
2206
+ const p = F("font-awesome-icon");
2207
+ return m(), g("div", null, [
2208
+ f("div", no, [
2209
+ c.value.length > 1 ? (m(), g("div", lo, [
2034
2210
  f("div", null, [
2035
- f("nav", sa, [
2211
+ f("nav", io, [
2036
2212
  f("a", {
2037
- class: H([i.value ? "" : "disabled", "relative inline-flex items-center rounded-l-md px-2 py-[9px] text-gray-400 ring-1 ring-gray-300 ring-inset hover:bg-gray-50 focus:z-20 focus:outline-offset-0"]),
2213
+ class: V([i.value ? "" : "disabled", "relative inline-flex items-center rounded-l-md px-2 py-[9px] text-gray-400 ring-1 ring-gray-300 ring-inset hover:bg-gray-50 focus:z-20 focus:outline-offset-0"]),
2038
2214
  href: "#",
2039
- onClick: d[0] || (d[0] = ee((v) => l(-1), ["prevent"]))
2215
+ onClick: d[0] || (d[0] = U((v) => l(-1), ["prevent"]))
2040
2216
  }, [
2041
- b(p, {
2042
- icon: k(A).farChevronLeft,
2217
+ k(p, {
2218
+ icon: _(A).farChevronLeft,
2043
2219
  class: "size-5"
2044
2220
  }, null, 8, ["icon"])
2045
2221
  ], 2),
2046
- (m(!0), h(R, null, z(c.value, (v) => (m(), h("a", {
2222
+ (m(!0), g(E, null, z(c.value, (v) => (m(), g("a", {
2047
2223
  key: `page-${v}`,
2048
2224
  href: "#",
2049
- class: H([
2225
+ class: V([
2050
2226
  "relative inline-flex items-center px-4 py-[9px] text-sm font-semibold ring-1 ring-inset",
2051
2227
  e.sparkTable.params.page === v ? "z-10 text-white bg-primary-600 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 hover:bg-primary-600" : "text-gray-900 hover:bg-gray-50 ring-gray-300 focus:z-20 focus:outline-offset-0"
2052
2228
  ]),
2053
- onClick: (x) => n(v)
2054
- }, M(v), 11, oa))), 128)),
2229
+ onClick: (b) => r(v)
2230
+ }, M(v), 11, co))), 128)),
2055
2231
  f("a", {
2056
- class: H([r.value ? "" : "disabled", "relative inline-flex items-center rounded-r-md px-2 py-[9px] text-gray-400 ring-1 ring-gray-300 ring-inset hover:bg-gray-50 focus:z-20 focus:outline-offset-0"]),
2057
- onClick: d[1] || (d[1] = ee((v) => l(1), ["prevent"])),
2232
+ class: V([n.value ? "" : "disabled", "relative inline-flex items-center rounded-r-md px-2 py-[9px] text-gray-400 ring-1 ring-gray-300 ring-inset hover:bg-gray-50 focus:z-20 focus:outline-offset-0"]),
2233
+ onClick: d[1] || (d[1] = U((v) => l(1), ["prevent"])),
2058
2234
  href: "#"
2059
2235
  }, [
2060
- b(p, {
2061
- icon: k(A).farChevronRight,
2236
+ k(p, {
2237
+ icon: _(A).farChevronRight,
2062
2238
  class: "size-5"
2063
2239
  }, null, 8, ["icon"])
2064
2240
  ], 2)
2065
2241
  ])
2066
2242
  ])
2067
- ])) : L("", !0)
2243
+ ])) : T("", !0)
2068
2244
  ])
2069
2245
  ]);
2070
2246
  };
2071
2247
  }
2072
2248
  }, te = (e, s) => {
2073
2249
  const t = e.__vccOpts || e;
2074
- for (const [o, l] of s)
2075
- t[o] = l;
2250
+ for (const [a, l] of s)
2251
+ t[a] = l;
2076
2252
  return t;
2077
- }, ra = { class: "spark-table-pagination-per-page" }, na = {
2253
+ }, po = { class: "spark-table-pagination-per-page" }, fo = {
2078
2254
  __name: "SparkTablePaginationPerPage",
2079
2255
  props: {
2080
2256
  sparkTable: {
@@ -2084,31 +2260,31 @@ const Ao = (e) => {
2084
2260
  },
2085
2261
  emits: ["paginate"],
2086
2262
  setup(e, { emit: s }) {
2087
- const t = e, o = s, l = $(() => t.sparkTable.options.perPages.map((a) => ({
2088
- label: String(a),
2089
- value: a
2090
- }))), n = (a) => {
2091
- o("paginate", {
2263
+ const t = e, a = s, l = $(() => t.sparkTable.options.perPages.map((o) => ({
2264
+ label: String(o),
2265
+ value: o
2266
+ }))), r = (o) => {
2267
+ a("paginate", {
2092
2268
  page: 1,
2093
- limit: parseInt(a)
2269
+ limit: parseInt(o)
2094
2270
  });
2095
2271
  };
2096
- return (a, c) => {
2097
- const r = O("FormKit");
2098
- return m(), h("div", ra, [
2099
- b(r, {
2272
+ return (o, c) => {
2273
+ const n = F("FormKit");
2274
+ return m(), g("div", po, [
2275
+ k(n, {
2100
2276
  "model-value": e.sparkTable.params.limit,
2101
2277
  type: "select",
2102
2278
  options: l.value,
2103
2279
  "outer-class": "!mb-0",
2104
2280
  "wrapper-class": "!mb-0",
2105
2281
  "input-class": "!py-2",
2106
- onInput: n
2282
+ onInput: r
2107
2283
  }, null, 8, ["model-value", "options"])
2108
2284
  ]);
2109
2285
  };
2110
2286
  }
2111
- }, la = /* @__PURE__ */ te(na, [["__scopeId", "data-v-9ef8544b"]]), Ve = {
2287
+ }, mo = /* @__PURE__ */ te(fo, [["__scopeId", "data-v-9ef8544b"]]), Re = {
2112
2288
  __name: "SparkTableToolbar",
2113
2289
  props: {
2114
2290
  position: {
@@ -2118,18 +2294,18 @@ const Ao = (e) => {
2118
2294
  }
2119
2295
  },
2120
2296
  setup(e) {
2121
- const s = e, t = Be(), o = $(() => !!t.default), l = $(() => {
2122
- const n = "spark-table-toolbar flex flex-wrap items-center gap-x-5 w-full";
2123
- return s.position === "footer" ? `${n} spark-table-toolbar-footer justify-between` : `${n} spark-table-toolbar-header gap-y-5 py-5`;
2297
+ const s = e, t = De(), a = $(() => !!t.default), l = $(() => {
2298
+ const r = "spark-table-toolbar flex flex-wrap items-center gap-x-5 w-full";
2299
+ return s.position === "footer" ? `${r} spark-table-toolbar-footer justify-between` : `${r} spark-table-toolbar-header gap-y-5 py-5`;
2124
2300
  });
2125
- return (n, a) => o.value ? (m(), h("div", {
2301
+ return (r, o) => a.value ? (m(), g("div", {
2126
2302
  key: 0,
2127
- class: H(l.value)
2303
+ class: V(l.value)
2128
2304
  }, [
2129
- B(n.$slots, "default")
2130
- ], 2)) : L("", !0);
2305
+ D(r.$slots, "default")
2306
+ ], 2)) : T("", !0);
2131
2307
  }
2132
- }, ia = { class: "spark-table-search" }, ca = {
2308
+ }, ho = { class: "spark-table-search" }, go = {
2133
2309
  __name: "SparkTableSearch",
2134
2310
  props: {
2135
2311
  /** SparkTable instance object */
@@ -2148,33 +2324,33 @@ const Ao = (e) => {
2148
2324
  }
2149
2325
  },
2150
2326
  setup(e) {
2151
- const s = e, t = E(""), o = s.config.param || "search";
2152
- s.sparkTable.params[o] ? t.value = s.sparkTable.params[o] : s.config.initialValue && (t.value = s.config.initialValue, s.sparkTable.methods.applyParams({
2153
- [o]: s.config.initialValue
2327
+ const s = e, t = R(""), a = s.config.param || "search";
2328
+ s.sparkTable.params[a] ? t.value = s.sparkTable.params[a] : s.config.initialValue && (t.value = s.config.initialValue, s.sparkTable.methods.applyParams({
2329
+ [a]: s.config.initialValue
2154
2330
  }));
2155
- const l = at((a) => {
2156
- a ? s.sparkTable.methods.applyParams({
2331
+ const l = ot((o) => {
2332
+ o ? s.sparkTable.methods.applyParams({
2157
2333
  page: 1,
2158
- [o]: a
2159
- }) : s.sparkTable.methods.removeParam(o);
2334
+ [a]: o
2335
+ }) : s.sparkTable.methods.removeParam(a);
2160
2336
  }, s.config.debounce || 300);
2161
- I(t, (a) => {
2162
- l(a);
2337
+ N(t, (o) => {
2338
+ l(o);
2163
2339
  });
2164
- const n = s.config.placeholder || "Search...";
2165
- return I(
2166
- () => s.sparkTable.params[o],
2167
- (a) => {
2168
- a && a !== t.value ? t.value = a : !a && t.value && (t.value = "");
2340
+ const r = s.config.placeholder || "Search...";
2341
+ return N(
2342
+ () => s.sparkTable.params[a],
2343
+ (o) => {
2344
+ o && o !== t.value ? t.value = o : !o && t.value && (t.value = "");
2169
2345
  }
2170
- ), (a, c) => {
2171
- const r = O("FormKit");
2172
- return m(), h("div", ia, [
2173
- b(r, Z({
2346
+ ), (o, c) => {
2347
+ const n = F("FormKit");
2348
+ return m(), g("div", ho, [
2349
+ k(n, q({
2174
2350
  modelValue: t.value,
2175
2351
  "onUpdate:modelValue": c[0] || (c[0] = (i) => t.value = i),
2176
2352
  type: "text",
2177
- placeholder: k(n),
2353
+ placeholder: _(r),
2178
2354
  suffixIcon: "search",
2179
2355
  "outer-class": "!mb-0",
2180
2356
  "wrapper-class": "!mb-0",
@@ -2183,7 +2359,7 @@ const Ao = (e) => {
2183
2359
  ]);
2184
2360
  };
2185
2361
  }
2186
- }, ua = /* @__PURE__ */ te(ca, [["__scopeId", "data-v-976170dc"]]), da = { class: "spark-table-filter-select" }, pa = {
2362
+ }, yo = /* @__PURE__ */ te(go, [["__scopeId", "data-v-976170dc"]]), bo = { class: "spark-table-filter-select" }, vo = {
2187
2363
  __name: "SparkTableFilterSelect",
2188
2364
  props: {
2189
2365
  /** SparkTable instance object */
@@ -2199,33 +2375,33 @@ const Ao = (e) => {
2199
2375
  }
2200
2376
  },
2201
2377
  setup(e) {
2202
- const s = e, t = E(""), o = s.config.param || `filter[${s.config.key}]`;
2203
- s.sparkTable.params[o] ? t.value = s.sparkTable.params[o] : s.config.initialValue !== void 0 && s.config.initialValue !== null && (t.value = s.config.initialValue, s.sparkTable.methods.applyParams({
2204
- [o]: s.config.initialValue
2378
+ const s = e, t = R(""), a = s.config.param || `filter[${s.config.key}]`;
2379
+ s.sparkTable.params[a] ? t.value = s.sparkTable.params[a] : s.config.initialValue !== void 0 && s.config.initialValue !== null && (t.value = s.config.initialValue, s.sparkTable.methods.applyParams({
2380
+ [a]: s.config.initialValue
2205
2381
  }));
2206
- const l = s.config.label || null, n = $(() => [
2382
+ const l = s.config.label || null, r = $(() => [
2207
2383
  { label: s.config.placeholder || "All", value: "" },
2208
2384
  ...s.config.options
2209
2385
  ]);
2210
- return I(t, (a) => {
2211
- a ? s.sparkTable.methods.applyParams({
2386
+ return N(t, (o) => {
2387
+ o ? s.sparkTable.methods.applyParams({
2212
2388
  page: 1,
2213
- [o]: a
2214
- }) : s.sparkTable.methods.removeParam(o);
2215
- }), I(
2216
- () => s.sparkTable.params[o],
2217
- (a) => {
2218
- a != null && a !== "" ? t.value !== a && (t.value = a) : t.value && (t.value = "");
2389
+ [a]: o
2390
+ }) : s.sparkTable.methods.removeParam(a);
2391
+ }), N(
2392
+ () => s.sparkTable.params[a],
2393
+ (o) => {
2394
+ o != null && o !== "" ? t.value !== o && (t.value = o) : t.value && (t.value = "");
2219
2395
  }
2220
- ), (a, c) => {
2221
- const r = O("FormKit");
2222
- return m(), h("div", da, [
2223
- b(r, Z({
2396
+ ), (o, c) => {
2397
+ const n = F("FormKit");
2398
+ return m(), g("div", bo, [
2399
+ k(n, q({
2224
2400
  modelValue: t.value,
2225
2401
  "onUpdate:modelValue": c[0] || (c[0] = (i) => t.value = i),
2226
2402
  type: "select",
2227
- label: k(l),
2228
- options: n.value,
2403
+ label: _(l),
2404
+ options: r.value,
2229
2405
  placeholder: e.config.placeholder || "All",
2230
2406
  "outer-class": "!mb-0",
2231
2407
  "wrapper-class": "!mb-0"
@@ -2233,10 +2409,10 @@ const Ao = (e) => {
2233
2409
  ]);
2234
2410
  };
2235
2411
  }
2236
- }, fa = /* @__PURE__ */ te(pa, [["__scopeId", "data-v-642dbc69"]]), ma = { class: "spark-table-filter-buttons" }, ha = {
2412
+ }, xo = /* @__PURE__ */ te(vo, [["__scopeId", "data-v-642dbc69"]]), ko = { class: "spark-table-filter-buttons" }, wo = {
2237
2413
  key: 0,
2238
2414
  class: "spark-table-filter-buttons-label"
2239
- }, ga = {
2415
+ }, _o = {
2240
2416
  __name: "SparkTableFilterButtons",
2241
2417
  props: {
2242
2418
  /** SparkTable instance object */
@@ -2252,34 +2428,34 @@ const Ao = (e) => {
2252
2428
  }
2253
2429
  },
2254
2430
  setup(e) {
2255
- const s = e, t = E(null), o = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`;
2431
+ const s = e, t = R(null), a = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`;
2256
2432
  s.sparkTable.params[l] !== void 0 ? t.value = s.sparkTable.params[l] : s.config.initialValue !== void 0 && (t.value = s.config.initialValue, s.config.initialValue !== null && s.sparkTable.methods.applyParams({
2257
2433
  [l]: s.config.initialValue
2258
2434
  }));
2259
- const n = (c) => c == null ? t.value === null || t.value === void 0 || t.value === "" : t.value === c, a = (c) => {
2435
+ const r = (c) => c == null ? t.value === null || t.value === void 0 || t.value === "" : t.value === c, o = (c) => {
2260
2436
  t.value = c, c == null || c === "" ? s.sparkTable.methods.removeParam(l) : s.sparkTable.methods.applyParams({
2261
2437
  page: 1,
2262
2438
  [l]: c
2263
2439
  });
2264
2440
  };
2265
- return I(
2441
+ return N(
2266
2442
  () => s.sparkTable.params[l],
2267
2443
  (c) => {
2268
2444
  (c == null || c === "") && t.value ? t.value = null : c !== t.value && (t.value = c);
2269
2445
  }
2270
- ), (c, r) => (m(), h("div", ma, [
2271
- k(o) ? (m(), h("span", ha, M(k(o)), 1)) : L("", !0),
2272
- b(no, { class: "isolate" }, {
2273
- default: T(() => [
2274
- (m(!0), h(R, null, z(e.config.options, (i) => (m(), V(Y, {
2446
+ ), (c, n) => (m(), g("div", ko, [
2447
+ _(a) ? (m(), g("span", wo, M(_(a)), 1)) : T("", !0),
2448
+ k(na, { class: "isolate" }, {
2449
+ default: L(() => [
2450
+ (m(!0), g(E, null, z(e.config.options, (i) => (m(), H(X, {
2275
2451
  key: i.value,
2276
2452
  size: "xl",
2277
2453
  "button-class": "px-3.5",
2278
- variant: n(i.value) ? "primary" : "secondary",
2279
- onClick: (u) => a(i.value)
2454
+ variant: r(i.value) ? "primary" : "secondary",
2455
+ onClick: (u) => o(i.value)
2280
2456
  }, {
2281
- default: T(() => [
2282
- F(M(i.label), 1)
2457
+ default: L(() => [
2458
+ O(M(i.label), 1)
2283
2459
  ]),
2284
2460
  _: 2
2285
2461
  }, 1032, ["variant", "onClick"]))), 128))
@@ -2288,7 +2464,7 @@ const Ao = (e) => {
2288
2464
  })
2289
2465
  ]));
2290
2466
  }
2291
- }, ya = /* @__PURE__ */ te(ga, [["__scopeId", "data-v-01a49899"]]), va = { class: "spark-table-date-picker" }, ba = {
2467
+ }, So = /* @__PURE__ */ te(_o, [["__scopeId", "data-v-01a49899"]]), Co = { class: "spark-table-date-picker" }, $o = {
2292
2468
  __name: "SparkTableDatePicker",
2293
2469
  props: {
2294
2470
  /** SparkTable instance object */
@@ -2304,33 +2480,33 @@ const Ao = (e) => {
2304
2480
  }
2305
2481
  },
2306
2482
  setup(e) {
2307
- const s = e, t = E(null), o = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`, n = E(`${l}-0`);
2483
+ const s = e, t = R(null), a = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`, r = R(`${l}-0`);
2308
2484
  return s.sparkTable.params[l] ? t.value = s.sparkTable.params[l] : s.config.initialValue ? (t.value = s.config.initialValue, s.sparkTable.methods.applyParams({
2309
2485
  [l]: s.config.initialValue
2310
- })) : t.value = null, I(t, (a) => {
2311
- a ? s.sparkTable.methods.applyParams({
2486
+ })) : t.value = null, N(t, (o) => {
2487
+ o ? s.sparkTable.methods.applyParams({
2312
2488
  page: 1,
2313
- [l]: a
2489
+ [l]: o
2314
2490
  }) : s.sparkTable.methods.removeParam(l);
2315
- }), I(
2491
+ }), N(
2316
2492
  () => s.sparkTable.params[l],
2317
- (a) => {
2318
- if ((a == null || a === "") && t.value) {
2493
+ (o) => {
2494
+ if ((o == null || o === "") && t.value) {
2319
2495
  t.value = null;
2320
- const c = parseInt(n.value.split("-").pop()) || 0;
2321
- n.value = `${l}-${c + 1}`;
2322
- } else a && a !== t.value && (t.value = a);
2496
+ const c = parseInt(r.value.split("-").pop()) || 0;
2497
+ r.value = `${l}-${c + 1}`;
2498
+ } else o && o !== t.value && (t.value = o);
2323
2499
  }
2324
- ), (a, c) => {
2325
- const r = O("FormKit");
2326
- return m(), h("div", va, [
2327
- (m(), V(r, Z({
2328
- key: n.value,
2500
+ ), (o, c) => {
2501
+ const n = F("FormKit");
2502
+ return m(), g("div", Co, [
2503
+ (m(), H(n, q({
2504
+ key: r.value,
2329
2505
  modelValue: t.value,
2330
2506
  "onUpdate:modelValue": c[0] || (c[0] = (i) => t.value = i),
2331
2507
  type: "datepicker",
2332
2508
  "picker-only": "",
2333
- label: k(o),
2509
+ label: _(a),
2334
2510
  placeholder: e.config.placeholder || "Select date",
2335
2511
  overlay: !0,
2336
2512
  "value-format": "YYYY-MM-DD",
@@ -2341,7 +2517,7 @@ const Ao = (e) => {
2341
2517
  ]);
2342
2518
  };
2343
2519
  }
2344
- }, xa = /* @__PURE__ */ te(ba, [["__scopeId", "data-v-44ef9cb8"]]), ka = { class: "spark-table-reset" }, wa = { key: 1 }, _a = {
2520
+ }, To = /* @__PURE__ */ te($o, [["__scopeId", "data-v-44ef9cb8"]]), Lo = { class: "spark-table-reset" }, Po = { key: 1 }, Mo = {
2345
2521
  __name: "SparkTableReset",
2346
2522
  props: {
2347
2523
  /** SparkTable instance object */
@@ -2357,61 +2533,61 @@ const Ao = (e) => {
2357
2533
  },
2358
2534
  setup(e) {
2359
2535
  const s = e, t = () => {
2360
- const o = s.sparkTable.plugins || {}, l = [], n = {};
2361
- Object.entries(o).forEach(([i, u]) => {
2536
+ const a = s.sparkTable.plugins || {}, l = [], r = {};
2537
+ Object.entries(a).forEach(([i, u]) => {
2362
2538
  if (!u || u.type === "reset" || !(typeof u.enabled == "function" ? u.enabled(s.sparkTable.params) : u.enabled))
2363
2539
  return;
2364
2540
  let p = null;
2365
- u.type === "search" ? p = u.param || "search" : u.type === "filterSelect" || u.type === "filterButtons" ? p = u.param || `filter[${u.key}]` : u.type === "datePicker" && (p = u.param || `filter[${u.key}]`), p && (u.initialValue !== void 0 && u.initialValue !== null ? n[p] = u.initialValue : l.push(p));
2541
+ u.type === "search" ? p = u.param || "search" : u.type === "filterSelect" || u.type === "filterButtons" ? p = u.param || `filter[${u.key}]` : u.type === "datePicker" && (p = u.param || `filter[${u.key}]`), p && (u.initialValue !== void 0 && u.initialValue !== null ? r[p] = u.initialValue : l.push(p));
2366
2542
  });
2367
- const a = l.filter(
2543
+ const o = l.filter(
2368
2544
  (i) => s.sparkTable.params[i] !== void 0 && s.sparkTable.params[i] !== null && s.sparkTable.params[i] !== ""
2369
- ), c = Object.entries(n).filter(
2545
+ ), c = Object.entries(r).filter(
2370
2546
  ([i, u]) => s.sparkTable.params[i] !== u
2371
2547
  );
2372
- if (a.length === 0 && c.length === 0)
2548
+ if (o.length === 0 && c.length === 0)
2373
2549
  return;
2374
- a.forEach((i) => {
2550
+ o.forEach((i) => {
2375
2551
  delete s.sparkTable.params[i];
2376
2552
  });
2377
- const r = Object.fromEntries(c);
2378
- s.sparkTable.methods.applyParams({ ...r, page: 1 });
2553
+ const n = Object.fromEntries(c);
2554
+ s.sparkTable.methods.applyParams({ ...n, page: 1 });
2379
2555
  };
2380
- return (o, l) => {
2381
- const n = O("font-awesome-icon");
2382
- return m(), h("div", ka, [
2383
- b(Y, {
2556
+ return (a, l) => {
2557
+ const r = F("font-awesome-icon");
2558
+ return m(), g("div", Lo, [
2559
+ k(X, {
2384
2560
  onClick: t,
2385
2561
  variant: "secondary",
2386
2562
  "button-class": "px-3.5",
2387
2563
  size: "xl"
2388
2564
  }, {
2389
- default: T(() => [
2390
- e.config.icon ? (m(), V(n, {
2565
+ default: L(() => [
2566
+ e.config.icon ? (m(), H(r, {
2391
2567
  key: 0,
2392
2568
  icon: ["far", e.config.icon],
2393
- class: H({ "mr-1.5": e.config.label })
2394
- }, null, 8, ["icon", "class"])) : L("", !0),
2395
- e.config.label ? (m(), h("span", wa, M(e.config.label), 1)) : L("", !0)
2569
+ class: V({ "mr-1.5": e.config.label })
2570
+ }, null, 8, ["icon", "class"])) : T("", !0),
2571
+ e.config.label ? (m(), g("span", Po, M(e.config.label), 1)) : T("", !0)
2396
2572
  ]),
2397
2573
  _: 1
2398
2574
  })
2399
2575
  ]);
2400
2576
  };
2401
2577
  }
2402
- }, Sa = /* @__PURE__ */ te(_a, [["__scopeId", "data-v-0894e3bf"]]), Ca = { class: "spark-table" }, $a = {
2578
+ }, Vo = /* @__PURE__ */ te(Mo, [["__scopeId", "data-v-0894e3bf"]]), Ho = { class: "spark-table" }, Ro = {
2403
2579
  key: 1,
2404
2580
  class: "pt-5"
2405
- }, Ta = {
2581
+ }, Fo = {
2406
2582
  key: 2,
2407
2583
  class: "flex flex-col items-center justify-center py-16 text-gray-500 rounded-md border border-gray-300 bg-white"
2408
- }, Pa = { class: "flex items-center gap-x-3 ml-auto" }, we = {
2584
+ }, Eo = { class: "flex items-center gap-x-3 ml-auto" }, we = {
2409
2585
  perPages: [15, 30, 50, 100, 200, 500],
2410
2586
  limit: 15
2411
- }, La = {
2587
+ }, Ao = {
2412
2588
  page: 1,
2413
2589
  limit: we.limit
2414
- }, Re = {
2590
+ }, Fe = {
2415
2591
  colHeaders: !0,
2416
2592
  filters: !1,
2417
2593
  stretchH: "all",
@@ -2421,7 +2597,7 @@ const Ao = (e) => {
2421
2597
  tableClassName: "spark-table-table",
2422
2598
  readOnlyCellClassName: "read-only",
2423
2599
  licenseKey: "non-commercial-and-evaluation"
2424
- }, On = {
2600
+ }, qn = {
2425
2601
  __name: "SparkTable",
2426
2602
  props: {
2427
2603
  url: {
@@ -2433,7 +2609,7 @@ const Ao = (e) => {
2433
2609
  dataTransformer: {
2434
2610
  type: Function,
2435
2611
  default: (e, s) => ({
2436
- data: J(s.settings, "nestedHeaders") ? e.data.data.map((o) => (s.settings.columnKeys || []).map((n) => o[n])) : e.data.data,
2612
+ data: Q(s.settings, "nestedHeaders") ? e.data.data.map((a) => (s.settings.columnKeys || []).map((r) => a[r])) : e.data.data,
2437
2613
  meta: {
2438
2614
  last_page: e.data.last_page,
2439
2615
  from: e.data.from,
@@ -2445,7 +2621,7 @@ const Ao = (e) => {
2445
2621
  params: {
2446
2622
  type: Object,
2447
2623
  default() {
2448
- return La;
2624
+ return Ao;
2449
2625
  }
2450
2626
  },
2451
2627
  options: {
@@ -2457,7 +2633,7 @@ const Ao = (e) => {
2457
2633
  settings: {
2458
2634
  type: Object,
2459
2635
  default() {
2460
- return Re;
2636
+ return Fe;
2461
2637
  }
2462
2638
  },
2463
2639
  plugins: {
@@ -2485,47 +2661,47 @@ const Ao = (e) => {
2485
2661
  "page-change"
2486
2662
  ],
2487
2663
  setup(e, { expose: s, emit: t }) {
2488
- const o = e;
2489
- ds(), pe(ls), pe(is), pe(cs), J(o, "settings.nestedHeaders") && pe(us);
2490
- const l = t, n = Fe("axios"), a = E(null), c = E(!1), r = E(null);
2664
+ const a = e;
2665
+ ds(), pe(ls), pe(is), pe(cs), Q(a, "settings.nestedHeaders") && pe(us);
2666
+ const l = t, r = _e("axios"), o = R(null), c = R(!1), n = R(null);
2491
2667
  let i = !1;
2492
2668
  const u = {
2493
- search: ua,
2494
- filterSelect: fa,
2495
- filterButtons: ya,
2496
- datePicker: xa,
2497
- reset: Sa
2498
- }, d = U({
2669
+ search: yo,
2670
+ filterSelect: xo,
2671
+ filterButtons: So,
2672
+ datePicker: To,
2673
+ reset: Vo
2674
+ }, d = K({
2499
2675
  hotInstance: null,
2500
- url: $(() => o.url),
2501
- plugins: o.plugins,
2676
+ url: $(() => a.url),
2677
+ plugins: a.plugins,
2502
2678
  response: {},
2503
2679
  params: {
2504
2680
  page: 1,
2505
- limit: o.options.limit
2681
+ limit: a.options.limit
2506
2682
  },
2507
2683
  methods: {
2508
- applyParams: (g) => {
2509
- g && (d.params = {
2684
+ applyParams: (h) => {
2685
+ h && (d.params = {
2510
2686
  ...d.params,
2511
- ...g
2687
+ ...h
2512
2688
  }, l("page-change", d.params));
2513
2689
  },
2514
- removeParam: async (g) => {
2515
- d.params[g] && (delete d.params[g], await d.methods.loadTable());
2690
+ removeParam: async (h) => {
2691
+ d.params[h] && (delete d.params[h], await d.methods.loadTable());
2516
2692
  },
2517
- loadTable: async (g) => {
2518
- if (!(!a.value || !a.value.hotInstance)) {
2519
- c.value = !0, r.value = null, l("loading", !0), he.start(), d.hotInstance = a.value.hotInstance;
2693
+ loadTable: async (h) => {
2694
+ if (!(!o.value || !o.value.hotInstance)) {
2695
+ c.value = !0, n.value = null, l("loading", !0), he.start(), d.hotInstance = o.value.hotInstance;
2520
2696
  try {
2521
- if (o.dataProvider) {
2522
- const y = await o.dataProvider(d.computed.params);
2523
- d.response = o.dataTransformer(y, o);
2524
- } else if (o.url) {
2525
- const y = await n.get(o.url, {
2697
+ if (a.dataProvider) {
2698
+ const y = await a.dataProvider(d.computed.params);
2699
+ d.response = a.dataTransformer(y, a);
2700
+ } else if (a.url) {
2701
+ const y = await r.get(a.url, {
2526
2702
  params: d.computed.params
2527
2703
  });
2528
- d.response = o.dataTransformer(y, o);
2704
+ d.response = a.dataTransformer(y, a);
2529
2705
  } else {
2530
2706
  console.error("No data provider or URL provided"), c.value = !1, l("loading", !1), he.done();
2531
2707
  return;
@@ -2533,226 +2709,226 @@ const Ao = (e) => {
2533
2709
  if (i) return;
2534
2710
  d.hotInstance.updateData(d.response.data), d.options.callback && typeof d.options.callback == "function" && await d.options.callback();
2535
2711
  const w = d.hotInstance.getPlugin("autoColumnSize");
2536
- J(o.settings, "columns", []).forEach((y, S) => {
2537
- y.width || w.calculateColumnsWidth(S, S, !0);
2712
+ Q(a.settings, "columns", []).forEach((y, C) => {
2713
+ y.width || w.calculateColumnsWidth(C, C, !0);
2538
2714
  }), l("load", {
2539
2715
  data: d.response.data,
2540
2716
  meta: d.response.meta
2541
- }), g && typeof g == "function" && g();
2717
+ }), h && typeof h == "function" && h();
2542
2718
  } catch (w) {
2543
- r.value = w, l("error", w), console.error("Error loading table data:", w);
2719
+ n.value = w, l("error", w), console.error("Error loading table data:", w);
2544
2720
  } finally {
2545
2721
  c.value = !1, l("loading", !1), he.done();
2546
2722
  }
2547
2723
  }
2548
2724
  },
2549
2725
  // can't use sparkTable.hotInstance here because the ref isn't ready
2550
- colToProp: (g) => a.value.hotInstance.colToProp(g),
2551
- fireEvent: (g, w) => {
2552
- l(g, w);
2726
+ colToProp: (h) => o.value.hotInstance.colToProp(h),
2727
+ fireEvent: (h, w) => {
2728
+ l(h, w);
2553
2729
  },
2554
- getSettingsForProp: (g) => as(J(d.tableSettings, "columns"), { data: g }),
2730
+ getSettingsForProp: (h) => os(Q(d.tableSettings, "columns"), { data: h }),
2555
2731
  // Helper methods for easier param access
2556
2732
  getParams: () => d.computed.params,
2557
- getParam: (g) => d.computed.params[g],
2558
- setParam: (g, w) => {
2559
- d.methods.applyParams({ [g]: w });
2733
+ getParam: (h) => d.computed.params[h],
2734
+ setParam: (h, w) => {
2735
+ d.methods.applyParams({ [h]: w });
2560
2736
  },
2561
- clearParam: (g) => d.methods.removeParam(g),
2562
- clearParams: (g) => {
2563
- (Array.isArray(g) ? g : [g]).forEach((_) => {
2564
- d.params[_] !== void 0 && delete d.params[_];
2737
+ clearParam: (h) => d.methods.removeParam(h),
2738
+ clearParams: (h) => {
2739
+ (Array.isArray(h) ? h : [h]).forEach((S) => {
2740
+ d.params[S] !== void 0 && delete d.params[S];
2565
2741
  }), d.methods.applyParams({ page: 1 });
2566
2742
  }
2567
2743
  },
2568
2744
  computed: {
2569
2745
  params: $(() => ({
2570
- ...o.params,
2746
+ ...a.params,
2571
2747
  ...d.params
2572
2748
  })),
2573
2749
  ready: $(() => rs(d, "response.meta.last_page"))
2574
2750
  },
2575
2751
  options: $(() => ({
2576
2752
  ...we,
2577
- ...o.options
2753
+ ...a.options
2578
2754
  })),
2579
2755
  tableSettings: $(() => ({
2580
- ...Re,
2581
- nestedHeaders: J(o.settings, "nestedHeaders", []),
2582
- ...!J(o.settings, "nestedHeaders") && {
2583
- afterGetColHeader: (g, w) => _o(g, w, d)
2756
+ ...Fe,
2757
+ nestedHeaders: Q(a.settings, "nestedHeaders", []),
2758
+ ...!Q(a.settings, "nestedHeaders") && {
2759
+ afterGetColHeader: (h, w) => Pa(h, w, d)
2584
2760
  },
2585
- afterChange: (g, w) => qo(),
2586
- afterRender: () => So(d),
2761
+ afterChange: (h, w) => Xa(),
2762
+ afterRender: () => Ma(d),
2587
2763
  /**
2588
2764
  * Prevent columns with explicit width from being stretched
2589
2765
  * This hook fires BEFORE stretchH is applied, allowing us to cap specific columns
2590
2766
  * while letting others stretch normally
2591
2767
  */
2592
- beforeStretchingColumnWidth: (g, w) => {
2593
- const y = J(o.settings, "columns", [])[w];
2594
- return y && y.width !== void 0 ? y.width : g;
2768
+ beforeStretchingColumnWidth: (h, w) => {
2769
+ const y = Q(a.settings, "columns", [])[w];
2770
+ return y && y.width !== void 0 ? y.width : h;
2595
2771
  },
2596
2772
  /**
2597
2773
  * Copy displayed cell content instead of raw data values
2598
2774
  * This ensures custom renderers copy their visual output, not the underlying data
2599
2775
  */
2600
- beforeCopy: (g, w) => {
2601
- const _ = a.value?.hotInstance;
2602
- _ && w.forEach((y) => {
2603
- for (let S = y.startRow; S <= y.endRow; S++)
2776
+ beforeCopy: (h, w) => {
2777
+ const S = o.value?.hotInstance;
2778
+ S && w.forEach((y) => {
2779
+ for (let C = y.startRow; C <= y.endRow; C++)
2604
2780
  for (let P = y.startCol; P <= y.endCol; P++) {
2605
- const D = _.getCell(S, P);
2606
- if (D) {
2607
- const X = S - w[0].startRow, de = P - w[0].startCol;
2608
- g[X][de] = D.dataset.copyValue ?? D.textContent ?? "";
2781
+ const B = S.getCell(C, P);
2782
+ if (B) {
2783
+ const J = C - w[0].startRow, de = P - w[0].startCol;
2784
+ h[J][de] = B.dataset.copyValue ?? B.textContent ?? "";
2609
2785
  }
2610
2786
  }
2611
2787
  });
2612
2788
  },
2613
- ...o.settings
2789
+ ...a.settings
2614
2790
  }))
2615
2791
  }), p = $(
2616
2792
  () => d.computed.ready && d.response.data?.length === 0
2617
- ), v = (g) => {
2618
- if (!g) return null;
2619
- switch (g.type) {
2793
+ ), v = (h) => {
2794
+ if (!h) return null;
2795
+ switch (h.type) {
2620
2796
  case "search":
2621
- return g.param || "search";
2797
+ return h.param || "search";
2622
2798
  case "filterSelect":
2623
2799
  case "filterButtons":
2624
2800
  case "datePicker":
2625
- return g.param || `filter[${g.key}]`;
2801
+ return h.param || `filter[${h.key}]`;
2626
2802
  default:
2627
2803
  return null;
2628
2804
  }
2629
- }, x = (g) => g ? typeof g.enabled == "function" ? g.enabled(d.params) : g.enabled : !1, C = $(() => Object.entries(o.plugins).filter(([g, w]) => x(w)).map(([g, w]) => ({ name: g, config: w })));
2630
- if (I(
2805
+ }, b = (h) => h ? typeof h.enabled == "function" ? h.enabled(d.params) : h.enabled : !1, x = $(() => Object.entries(a.plugins).filter(([h, w]) => b(w)).map(([h, w]) => ({ name: h, config: w })));
2806
+ if (N(
2631
2807
  () => ({ ...d.params }),
2632
2808
  () => {
2633
- const g = [];
2634
- Object.values(o.plugins).forEach((w) => {
2635
- const _ = v(w);
2636
- if (!_) return;
2637
- const y = x(w), S = d.params[_] !== void 0;
2638
- !y && S && g.push(_);
2639
- }), g.length > 0 && g.forEach((w) => {
2809
+ const h = [];
2810
+ Object.values(a.plugins).forEach((w) => {
2811
+ const S = v(w);
2812
+ if (!S) return;
2813
+ const y = b(w), C = d.params[S] !== void 0;
2814
+ !y && C && h.push(S);
2815
+ }), h.length > 0 && h.forEach((w) => {
2640
2816
  delete d.params[w];
2641
2817
  });
2642
2818
  },
2643
2819
  { deep: !0, flush: "sync" }
2644
- ), o.syncToRoute || o.persistToStorage) {
2645
- const g = typeof o.syncToRoute == "string";
2646
- Uo(d, {
2647
- namespace: g ? o.syncToRoute : null,
2648
- syncToRoute: !!o.syncToRoute,
2649
- persistToStorage: o.persistToStorage
2820
+ ), a.syncToRoute || a.persistToStorage) {
2821
+ const h = typeof a.syncToRoute == "string";
2822
+ Ja(d, {
2823
+ namespace: h ? a.syncToRoute : null,
2824
+ syncToRoute: !!a.syncToRoute,
2825
+ persistToStorage: a.persistToStorage
2650
2826
  });
2651
2827
  }
2652
- return Ce(
2653
- () => o.params,
2828
+ return $e(
2829
+ () => a.params,
2654
2830
  async () => {
2655
2831
  d.params.page = 1, await d.methods.loadTable();
2656
2832
  },
2657
2833
  { debounce: 50, maxWait: 1e3 }
2658
- ), Ce(
2834
+ ), $e(
2659
2835
  () => d.params,
2660
2836
  async () => {
2661
2837
  await d.methods.loadTable();
2662
2838
  },
2663
2839
  { debounce: 50, maxWait: 1e3 }
2664
- ), I(
2665
- () => o.url,
2666
- async (g, w) => {
2667
- g !== w && (d.params.page = 1, await d.methods.loadTable());
2840
+ ), N(
2841
+ () => a.url,
2842
+ async (h, w) => {
2843
+ h !== w && (d.params.page = 1, await d.methods.loadTable());
2668
2844
  }
2669
- ), _e(async () => {
2845
+ ), Se(async () => {
2670
2846
  await d.methods.loadTable(), l("ready");
2671
2847
  }), ht(() => {
2672
2848
  i = !0;
2673
- }), Zo(d), s({
2849
+ }), Ya(d), s({
2674
2850
  refresh: () => d.methods.loadTable(),
2675
2851
  getParams: () => d.methods.getParams(),
2676
- getParam: (g) => d.methods.getParam(g),
2677
- setParam: (g, w) => d.methods.setParam(g, w),
2678
- clearParam: (g) => d.methods.clearParam(g),
2679
- clearParams: (g) => d.methods.clearParams(g),
2680
- applyParams: (g) => d.methods.applyParams(g),
2852
+ getParam: (h) => d.methods.getParam(h),
2853
+ setParam: (h, w) => d.methods.setParam(h, w),
2854
+ clearParam: (h) => d.methods.clearParam(h),
2855
+ clearParams: (h) => d.methods.clearParams(h),
2856
+ applyParams: (h) => d.methods.applyParams(h),
2681
2857
  loading: c,
2682
- error: r,
2858
+ error: n,
2683
2859
  sparkTable: d,
2684
- table: a
2685
- }), (g, w) => {
2686
- const _ = O("font-awesome-icon");
2687
- return m(), h("div", Ca, [
2688
- d.computed.ready && C.value && C.value.length ? (m(), V(Ve, {
2860
+ table: o
2861
+ }), (h, w) => {
2862
+ const S = F("font-awesome-icon");
2863
+ return m(), g("div", Ho, [
2864
+ d.computed.ready && x.value && x.value.length ? (m(), H(Re, {
2689
2865
  key: 0,
2690
2866
  position: "header"
2691
2867
  }, {
2692
- default: T(() => [
2693
- (m(!0), h(R, null, z(C.value, (y) => (m(), V(N(u[y.config.type]), {
2868
+ default: L(() => [
2869
+ (m(!0), g(E, null, z(x.value, (y) => (m(), H(Z(u[y.config.type]), {
2694
2870
  key: y.name,
2695
- class: H(y.config.align ? `self-${y.config.align}` : ""),
2871
+ class: V(y.config.align ? `self-${y.config.align}` : ""),
2696
2872
  "spark-table": d,
2697
2873
  config: y.config
2698
2874
  }, null, 8, ["class", "spark-table", "config"]))), 128)),
2699
- B(g.$slots, "header", {
2875
+ D(h.$slots, "header", {
2700
2876
  sparkTable: d,
2701
2877
  loading: c.value,
2702
- error: r.value
2878
+ error: n.value
2703
2879
  })
2704
2880
  ]),
2705
2881
  _: 3
2706
- })) : (m(), h("div", $a)),
2707
- gt(b(k(ns), {
2882
+ })) : (m(), g("div", Ro)),
2883
+ gt(k(_(ns), {
2708
2884
  "theme-name": "ht-theme-classic",
2709
2885
  ref_key: "table",
2710
- ref: a,
2886
+ ref: o,
2711
2887
  settings: d.tableSettings
2712
2888
  }, null, 8, ["settings"]), [
2713
2889
  [yt, !p.value]
2714
2890
  ]),
2715
- p.value ? (m(), h("div", Ta, [
2716
- b(_, {
2717
- icon: k(A).farInbox,
2891
+ p.value ? (m(), g("div", Fo, [
2892
+ k(S, {
2893
+ icon: _(A).farInbox,
2718
2894
  class: "size-12 mb-4 text-gray-300"
2719
2895
  }, null, 8, ["icon"]),
2720
2896
  w[0] || (w[0] = f("p", { class: "text-sm" }, "No records found", -1))
2721
- ])) : L("", !0),
2722
- d.computed.ready ? (m(), V(Ve, {
2897
+ ])) : T("", !0),
2898
+ d.computed.ready ? (m(), H(Re, {
2723
2899
  key: 3,
2724
2900
  position: "footer"
2725
2901
  }, {
2726
- default: T(() => [
2727
- p.value ? L("", !0) : (m(), V(Qo, {
2902
+ default: L(() => [
2903
+ p.value ? T("", !0) : (m(), H(ro, {
2728
2904
  key: 0,
2729
2905
  "spark-table": d
2730
2906
  }, null, 8, ["spark-table"])),
2731
- f("div", Pa, [
2732
- p.value ? L("", !0) : (m(), V(aa, {
2907
+ f("div", Eo, [
2908
+ p.value ? T("", !0) : (m(), H(uo, {
2733
2909
  key: 0,
2734
2910
  "spark-table": d,
2735
2911
  onPaginate: d.methods.applyParams
2736
2912
  }, null, 8, ["spark-table", "onPaginate"])),
2737
- b(la, {
2913
+ k(mo, {
2738
2914
  "spark-table": d,
2739
2915
  onPaginate: d.methods.applyParams
2740
2916
  }, null, 8, ["spark-table", "onPaginate"]),
2741
- B(g.$slots, "footer", {
2917
+ D(h.$slots, "footer", {
2742
2918
  sparkTable: d,
2743
2919
  loading: c.value,
2744
- error: r.value
2920
+ error: n.value
2745
2921
  })
2746
2922
  ])
2747
2923
  ]),
2748
2924
  _: 3
2749
- })) : L("", !0)
2925
+ })) : T("", !0)
2750
2926
  ]);
2751
2927
  };
2752
2928
  }
2753
2929
  };
2754
2930
  function Ee() {
2755
- const e = U({
2931
+ const e = K({
2756
2932
  isVisible: !1,
2757
2933
  content: null,
2758
2934
  props: {},
@@ -2762,43 +2938,43 @@ function Ee() {
2762
2938
  e.isVisible = !e.isVisible;
2763
2939
  }, t = () => {
2764
2940
  e.isVisible = !1, e.content = null, e.props = {}, e.eventHandlers = {}, e.size = "md";
2765
- }, o = () => {
2941
+ }, a = () => {
2766
2942
  e.isVisible = !0;
2767
- }, l = (a, c = {}, r = {}, i = {}) => {
2768
- e.content = me(a), e.props = c, e.eventHandlers = r, e.size = i.size || "md";
2943
+ }, l = (o, c = {}, n = {}, i = {}) => {
2944
+ e.content = me(o), e.props = c, e.eventHandlers = n, e.size = i.size || "md";
2769
2945
  };
2770
2946
  return {
2771
2947
  state: e,
2772
2948
  toggle: s,
2773
2949
  close: t,
2774
- open: o,
2950
+ open: a,
2775
2951
  setContent: l,
2776
- show: (a, c = {}, r = {}, i = {}) => {
2777
- a && l(a, c, r, i), o();
2952
+ show: (o, c = {}, n = {}, i = {}) => {
2953
+ o && l(o, c, n, i), a();
2778
2954
  }
2779
2955
  };
2780
2956
  }
2781
- class Ma {
2957
+ class Oo {
2782
2958
  constructor() {
2783
2959
  this.left = Ee(), this.right = Ee();
2784
2960
  }
2785
- showLeft = (s, t = {}, o = {}, l = {}) => {
2786
- const n = {
2961
+ showLeft = (s, t = {}, a = {}, l = {}) => {
2962
+ const r = {
2787
2963
  close: () => {
2788
- o.close?.(), this.closeLeft();
2964
+ a.close?.(), this.closeLeft();
2789
2965
  },
2790
- ...o
2966
+ ...a
2791
2967
  };
2792
- this.left.show(s, t, n, l);
2968
+ this.left.show(s, t, r, l);
2793
2969
  };
2794
- showRight = (s, t = {}, o = {}, l = {}) => {
2795
- const n = {
2970
+ showRight = (s, t = {}, a = {}, l = {}) => {
2971
+ const r = {
2796
2972
  close: () => {
2797
- o.close?.(), this.closeRight();
2973
+ a.close?.(), this.closeRight();
2798
2974
  },
2799
- ...o
2975
+ ...a
2800
2976
  };
2801
- this.right.show(s, t, n, l);
2977
+ this.right.show(s, t, r, l);
2802
2978
  };
2803
2979
  closeLeft = () => {
2804
2980
  this.left.close();
@@ -2810,37 +2986,37 @@ class Ma {
2810
2986
  this.left.close(), this.right.close();
2811
2987
  };
2812
2988
  }
2813
- const se = new Ma(), Ha = (e) => {
2989
+ const se = new Oo(), Do = (e) => {
2814
2990
  const s = document.cookie.match(new RegExp(`(^| )${e}=([^;]+)`));
2815
2991
  return s ? s[2] : null;
2816
- }, Va = (e, s, t = {}) => {
2992
+ }, Bo = (e, s, t = {}) => {
2817
2993
  const {
2818
- maxAge: o = 31536e3,
2994
+ maxAge: a = 31536e3,
2819
2995
  // 365 days in seconds
2820
2996
  domain: l = ct(),
2821
- secure: n = !0,
2822
- sameSite: a = "Lax",
2997
+ secure: r = !0,
2998
+ sameSite: o = "Lax",
2823
2999
  path: c = "/"
2824
3000
  } = t;
2825
- let r = `${e}=${s}; max-age=${o}; path=${c}; samesite=${a}`;
2826
- l && (r += `; domain=${l}`), n && (r += "; secure"), document.cookie = r;
2827
- }, Ra = (e, s = {}) => {
2828
- const { domain: t = ct(), path: o = "/" } = s;
2829
- let l = `${e}=; max-age=0; path=${o}`;
3001
+ let n = `${e}=${s}; max-age=${a}; path=${c}; samesite=${o}`;
3002
+ l && (n += `; domain=${l}`), r && (n += "; secure"), document.cookie = n;
3003
+ }, jo = (e, s = {}) => {
3004
+ const { domain: t = ct(), path: a = "/" } = s;
3005
+ let l = `${e}=; max-age=0; path=${a}`;
2830
3006
  t && (l += `; domain=${t}`), document.cookie = l;
2831
3007
  }, ct = () => {
2832
3008
  const e = window.location.hostname;
2833
3009
  return e === "localhost" ? "localhost" : e.endsWith(".test") || e.endsWith(".io") ? "." + e.split(".").slice(-2).join(".") : e.endsWith(".com.au") ? "." + e.split(".").slice(-3).join(".") : e;
2834
3010
  }, ut = [];
2835
- function Ea(e) {
3011
+ function zo(e) {
2836
3012
  ut.push(e);
2837
3013
  }
2838
- function Aa() {
3014
+ function Io() {
2839
3015
  ut.forEach((e) => e());
2840
3016
  }
2841
- function Bn(e) {
3017
+ function Un(e) {
2842
3018
  let s = !1;
2843
- return Ea(() => {
3019
+ return zo(() => {
2844
3020
  s = !1;
2845
3021
  }), {
2846
3022
  bootstrapApp: async () => {
@@ -2853,8 +3029,8 @@ function Bn(e) {
2853
3029
  }
2854
3030
  };
2855
3031
  }
2856
- const ve = "bolt-next-token", G = ue("auth", () => {
2857
- const e = U({
3032
+ const be = "bolt-next-token", W = ue("auth", () => {
3033
+ const e = K({
2858
3034
  user: null,
2859
3035
  token: null,
2860
3036
  ready: !1,
@@ -2889,13 +3065,13 @@ const ve = "bolt-next-token", G = ue("auth", () => {
2889
3065
  }), s = (i = {}) => {
2890
3066
  i.endpoints && Object.assign(e.endpoints, i.endpoints), i.routes && Object.assign(e.routes, i.routes), i.devCredentials && Object.assign(e.devCredentials, i.devCredentials), i.callbacks && Object.assign(e.callbacks, i.callbacks), i.overrideToken && (e.overrideToken = i.overrideToken);
2891
3067
  }, t = (i) => {
2892
- Va(ve, i), e.token = i;
2893
- }, o = () => {
2894
- Ra(ve), e.token = null;
2895
- }, l = () => Ha(ve), n = async (i) => {
3068
+ Bo(be, i), e.token = i;
3069
+ }, a = () => {
3070
+ jo(be), e.token = null;
3071
+ }, l = () => Do(be), r = async (i) => {
2896
3072
  const u = await ne.post(e.endpoints.login, i), d = u.headers.authorization;
2897
3073
  return t(d), e.user = u.data, e.callbacks.onLoginSuccess && await e.callbacks.onLoginSuccess(u.data), u.data;
2898
- }, a = async () => {
3074
+ }, o = async () => {
2899
3075
  try {
2900
3076
  await ne.post(
2901
3077
  e.endpoints.logout,
@@ -2909,7 +3085,7 @@ const ve = "bolt-next-token", G = ue("auth", () => {
2909
3085
  } catch (i) {
2910
3086
  throw e.callbacks.onLogoutError && await e.callbacks.onLogoutError(i), i;
2911
3087
  } finally {
2912
- o(), e.user = null, Aa();
3088
+ a(), e.user = null, Io();
2913
3089
  }
2914
3090
  }, c = async () => {
2915
3091
  const i = e.overrideToken || l();
@@ -2923,24 +3099,24 @@ const ve = "bolt-next-token", G = ue("auth", () => {
2923
3099
  });
2924
3100
  e.user = u, e.overrideToken || (e.token = i);
2925
3101
  } catch {
2926
- e.overrideToken || o();
3102
+ e.overrideToken || a();
2927
3103
  } finally {
2928
3104
  e.ready = !0;
2929
3105
  }
2930
- }, r = $(() => e.overrideToken ? !0 : !!e.token && !!e.user);
3106
+ }, n = $(() => e.overrideToken ? !0 : !!e.token && !!e.user);
2931
3107
  return {
2932
3108
  state: e,
2933
3109
  initialize: s,
2934
- login: n,
2935
- logout: a,
3110
+ login: r,
3111
+ logout: o,
2936
3112
  fetchUser: c,
2937
- check: r,
3113
+ check: n,
2938
3114
  setTokenCookie: t,
2939
- clearTokenCookie: o,
3115
+ clearTokenCookie: a,
2940
3116
  getTokenCookie: l
2941
3117
  };
2942
3118
  });
2943
- function Fa(e = {}) {
3119
+ function No(e = {}) {
2944
3120
  const s = ne.create({
2945
3121
  baseURL: e.baseURL || "",
2946
3122
  timeout: e.timeout || 3e4,
@@ -2952,8 +3128,8 @@ function Fa(e = {}) {
2952
3128
  return s.interceptors.request.use(
2953
3129
  (t) => {
2954
3130
  try {
2955
- const o = G();
2956
- o.state.overrideToken ? t.headers.Authorization = `Bearer ${o.state.overrideToken}` : o.state.token && (t.headers.Authorization = `Bearer ${o.state.token}`);
3131
+ const a = W();
3132
+ a.state.overrideToken ? t.headers.Authorization = `Bearer ${a.state.overrideToken}` : a.state.token && (t.headers.Authorization = `Bearer ${a.state.token}`);
2957
3133
  } catch {
2958
3134
  }
2959
3135
  return t;
@@ -2964,95 +3140,95 @@ function Fa(e = {}) {
2964
3140
  async (t) => {
2965
3141
  if (t.response?.status === 401)
2966
3142
  try {
2967
- const o = G();
2968
- await o.logout(), window.location.href = o.state.routes.auth;
2969
- } catch (o) {
2970
- console.error("Error during auto-logout:", o), window.location.href = "/login";
3143
+ const a = W();
3144
+ await a.logout(), window.location.href = a.state.routes.auth;
3145
+ } catch (a) {
3146
+ console.error("Error during auto-logout:", a), window.location.href = "/login";
2971
3147
  }
2972
3148
  if (t.response?.status === 403)
2973
3149
  try {
2974
- const o = G();
2975
- window.location.href = o.state.routes.forbidden;
2976
- } catch (o) {
2977
- console.error("Error during 403 redirect:", o), window.location.href = "/error/403";
3150
+ const a = W();
3151
+ window.location.href = a.state.routes.forbidden;
3152
+ } catch (a) {
3153
+ console.error("Error during 403 redirect:", a), window.location.href = "/error/403";
2978
3154
  }
2979
3155
  return Promise.reject(t);
2980
3156
  }
2981
3157
  ), s;
2982
3158
  }
2983
3159
  let re = null;
2984
- function Dn(e, s = {}) {
2985
- return re = Fa(s), e.provide("axios", re), e.config.globalProperties.$axios = re, re;
3160
+ function Kn(e, s = {}) {
3161
+ return re = No(s), e.provide("axios", re), e.config.globalProperties.$axios = re, re;
2986
3162
  }
2987
- function Oa() {
3163
+ function Zo() {
2988
3164
  if (!re)
2989
3165
  throw new Error("Axios instance not initialized. Call setupAxios() first.");
2990
3166
  return re;
2991
3167
  }
2992
- function Ba(e) {
3168
+ function qo(e) {
2993
3169
  return e?.status !== 422 ? null : e.data?.errors || null;
2994
3170
  }
2995
3171
  function Ae(e) {
2996
3172
  return e?.status === 422 ? e.data?.message || "Please fix the validation errors." : e?.data?.message || "An error occurred.";
2997
3173
  }
2998
- function Da(e) {
3174
+ function Uo(e) {
2999
3175
  return e?.status === 422;
3000
3176
  }
3001
- function zn(e = {}) {
3177
+ function Gn(e = {}) {
3002
3178
  const {
3003
3179
  successMessage: s = "Saved successfully!",
3004
3180
  createMessage: t = "Created successfully!",
3005
- updateMessage: o = "Updated successfully!",
3181
+ updateMessage: a = "Updated successfully!",
3006
3182
  redirectTo: l = null,
3007
- onSuccess: n = null,
3008
- onError: a = null,
3183
+ onSuccess: r = null,
3184
+ onError: o = null,
3009
3185
  showNotification: c = !0,
3010
- setFieldErrors: r = !0,
3186
+ setFieldErrors: n = !0,
3011
3187
  setFormErrors: i = !1
3012
- } = e, u = W(), d = E(!1);
3013
- async function p(x) {
3014
- const { submitFn: C, method: g = "create", node: w = null, isEditMode: _ = !1 } = x;
3188
+ } = e, u = Y(), d = R(!1);
3189
+ async function p(b) {
3190
+ const { submitFn: x, method: h = "create", node: w = null, isEditMode: S = !1 } = b;
3015
3191
  d.value = !0, w && w.clearErrors();
3016
3192
  try {
3017
- const S = (await C()).data;
3193
+ const C = (await x()).data;
3018
3194
  if (c) {
3019
- const P = _ ? o : g === "create" ? t : s;
3020
- q.show({
3195
+ const P = S ? a : h === "create" ? t : s;
3196
+ j.show({
3021
3197
  type: "success",
3022
3198
  message: P
3023
3199
  });
3024
3200
  }
3025
- if (n && await n(S), !_ && l) {
3026
- const P = typeof l == "function" ? l(S) : l;
3201
+ if (r && await r(C), !S && l) {
3202
+ const P = typeof l == "function" ? l(C) : l;
3027
3203
  await u.push(P);
3028
3204
  }
3029
- return { success: !0, data: S, error: null };
3205
+ return { success: !0, data: C, error: null };
3030
3206
  } catch (y) {
3031
- const S = y.response;
3032
- if (a && await a(y) === !0)
3207
+ const C = y.response;
3208
+ if (o && await o(y) === !0)
3033
3209
  return { success: !1, data: null, error: y };
3034
- if (Da(S)) {
3035
- const P = Ba(S);
3036
- P && w && r && w.setErrors([], P), i && q.show({
3210
+ if (Uo(C)) {
3211
+ const P = qo(C);
3212
+ P && w && n && w.setErrors([], P), i && j.show({
3037
3213
  type: "danger",
3038
- message: Ae(S)
3214
+ message: Ae(C)
3039
3215
  });
3040
3216
  } else
3041
- q.show({
3217
+ j.show({
3042
3218
  type: "danger",
3043
- message: Ae(S)
3219
+ message: Ae(C)
3044
3220
  });
3045
3221
  return { success: !1, data: null, error: y };
3046
3222
  } finally {
3047
3223
  d.value = !1;
3048
3224
  }
3049
3225
  }
3050
- async function v(x) {
3051
- const { url: C, payload: g, method: w = "post", node: _, isEditMode: y } = x, S = Oa();
3226
+ async function v(b) {
3227
+ const { url: x, payload: h, method: w = "post", node: S, isEditMode: y } = b, C = Zo();
3052
3228
  return p({
3053
- submitFn: () => S[w](C, g),
3229
+ submitFn: () => C[w](x, h),
3054
3230
  method: y ? "update" : "create",
3055
- node: _,
3231
+ node: S,
3056
3232
  isEditMode: y
3057
3233
  });
3058
3234
  }
@@ -3062,22 +3238,22 @@ function zn(e = {}) {
3062
3238
  submitToApi: v
3063
3239
  };
3064
3240
  }
3065
- const za = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, ja = { class: "flex flex-1 flex-col" }, Ia = {
3241
+ const Ko = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Go = { class: "flex flex-1 flex-col" }, Wo = {
3066
3242
  class: "flex flex-1 flex-col gap-y-7",
3067
3243
  role: "list"
3068
- }, Na = { class: "flex flex-1 flex-col" }, Za = {
3244
+ }, Yo = { class: "flex flex-1 flex-col" }, Xo = {
3069
3245
  role: "list",
3070
3246
  class: "flex flex-1 flex-col"
3071
- }, qa = { class: "flex items-center pb-8" }, Ua = ["href", "onClick"], Ka = {
3247
+ }, Jo = { class: "flex items-center pb-8" }, Qo = ["href", "onClick"], er = {
3072
3248
  key: 2,
3073
3249
  class: "w-full flex justify-center"
3074
- }, Ga = {
3250
+ }, tr = {
3075
3251
  key: 0,
3076
3252
  class: "mt-[5px] flex flex-col gap-[5px]"
3077
- }, Wa = ["href", "onClick"], Ya = {
3253
+ }, sr = ["href", "onClick"], ar = {
3078
3254
  key: 1,
3079
3255
  class: "text-[13px]"
3080
- }, Xa = { class: "mt-auto" }, Ja = { class: "p-[10px] flex-shrink-0" }, Qa = { class: "flex flex-1 items-center gap-x-6" }, er = { class: "relative flex flex-1 items-center gap-4" }, tr = { class: "cursor-pointer" }, sr = ["src"], or = { class: "ml-auto" }, ar = { class: "mr-[10px] pb-[10px] flex-1 flex flex-col" }, jn = {
3256
+ }, or = { class: "mt-auto" }, rr = { class: "p-[10px] flex-shrink-0" }, nr = { class: "flex flex-1 items-center gap-x-6" }, lr = { class: "relative flex flex-1 items-center gap-4" }, ir = { class: "cursor-pointer" }, cr = ["src"], ur = { class: "ml-auto" }, dr = { class: "mr-[10px] pb-[10px] flex-1 flex flex-col" }, Wn = {
3081
3257
  __name: "SparkDefaultContainer",
3082
3258
  props: {
3083
3259
  appStore: {
@@ -3095,113 +3271,113 @@ const za = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, ja = { class: "flex
3095
3271
  },
3096
3272
  emits: ["overlayClose"],
3097
3273
  setup(e, { emit: s }) {
3098
- const t = e, o = s, l = Be(), n = le(), a = it(), c = rt(), r = $(() => c.getAppIcon(t.appStore.state.app)), i = $(() => n.meta.hideBrandSelector === !0 ? !1 : t.appStore.state.showBrandSelector), u = () => {
3099
- const x = {};
3100
- l["app-selector-bottom"] ? x.bottomSlot = () => Se("div", {}, l["app-selector-bottom"]()) : t.appSelectorSlots.bottomSlot && (x.bottomSlot = t.appSelectorSlots.bottomSlot), l["app-selector-footer"] ? x.footerSlot = () => Se("div", {}, l["app-selector-footer"]()) : t.appSelectorSlots.footerSlot && (x.footerSlot = t.appSelectorSlots.footerSlot), se.showRight(As, x, {
3101
- select: (C) => {
3274
+ const t = e, a = s, l = De(), r = le(), o = it(), c = rt(), n = $(() => c.getAppIcon(t.appStore.state.app)), i = $(() => r.meta.hideBrandSelector === !0 ? !1 : t.appStore.state.showBrandSelector), u = () => {
3275
+ const b = {};
3276
+ l["app-selector-bottom"] ? b.bottomSlot = () => Ce("div", {}, l["app-selector-bottom"]()) : t.appSelectorSlots.bottomSlot && (b.bottomSlot = t.appSelectorSlots.bottomSlot), l["app-selector-footer"] ? b.footerSlot = () => Ce("div", {}, l["app-selector-footer"]()) : t.appSelectorSlots.footerSlot && (b.footerSlot = t.appSelectorSlots.footerSlot), se.showRight(Es, b, {
3277
+ select: (x) => {
3102
3278
  se.closeRight();
3103
3279
  }
3104
3280
  });
3105
3281
  }, d = () => {
3106
3282
  se.showLeft(
3107
- ao,
3283
+ oa,
3108
3284
  {},
3109
3285
  {
3110
- select: (x) => {
3111
- a.toggleBrand(x), se.closeLeft();
3286
+ select: (b) => {
3287
+ o.toggleBrand(b), se.closeLeft();
3112
3288
  }
3113
3289
  }
3114
3290
  );
3115
3291
  }, p = $(() => t.mainNavStore.state.hidden ? ["w-0 overflow-hidden"] : [t.mainNavStore.state.collapsed ? "w-[80px]" : "w-[240px]"]), v = $(() => t.mainNavStore.state.hidden ? ["pl-2.5"] : [t.mainNavStore.state.collapsed ? "pl-[80px]" : "pl-[240px]"]);
3116
- return (x, C) => {
3117
- const g = O("font-awesome-icon"), w = O("router-view");
3118
- return m(), h(R, null, [
3292
+ return (b, x) => {
3293
+ const h = F("font-awesome-icon"), w = F("router-view");
3294
+ return m(), g(E, null, [
3119
3295
  f("div", {
3120
- class: H([p.value, "fixed inset-y-0 flex transition-all z-100"])
3296
+ class: V([p.value, "fixed inset-y-0 flex transition-all z-100"])
3121
3297
  }, [
3122
- f("div", za, [
3123
- f("nav", ja, [
3124
- f("ul", Ia, [
3125
- f("li", Na, [
3126
- f("ul", Za, [
3127
- f("li", qa, [
3298
+ f("div", Ko, [
3299
+ f("nav", Go, [
3300
+ f("ul", Wo, [
3301
+ f("li", Yo, [
3302
+ f("ul", Xo, [
3303
+ f("li", Jo, [
3128
3304
  f("a", {
3129
3305
  class: "grid w-[40px] h-[40px] place-items-center rounded-md bg-primary-600 text-white text-[13px] cursor-pointer",
3130
- onClick: C[0] || (C[0] = ee((_) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"]))
3306
+ onClick: x[0] || (x[0] = U((S) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"]))
3131
3307
  }, [
3132
- b(g, {
3133
- icon: k(A)[r.value],
3308
+ k(h, {
3309
+ icon: _(A)[n.value],
3134
3310
  class: "size-5"
3135
3311
  }, null, 8, ["icon"])
3136
3312
  ]),
3137
- e.mainNavStore.state.collapsed ? L("", !0) : (m(), h("a", {
3313
+ e.mainNavStore.state.collapsed ? T("", !0) : (m(), g("a", {
3138
3314
  key: 0,
3139
- onClick: C[1] || (C[1] = ee((_) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"])),
3315
+ onClick: x[1] || (x[1] = U((S) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"])),
3140
3316
  class: "font-medium text-gray-800 ml-[10px] cursor-pointer"
3141
3317
  }, M(e.appStore.state.app), 1))
3142
3318
  ]),
3143
- (m(!0), h(R, null, z(e.mainNavStore.state.menu, (_) => (m(), h("li", {
3144
- key: _.name,
3145
- class: H({
3146
- "mt-[10px]": _.children,
3147
- "mt-auto": _.footerSection
3319
+ (m(!0), g(E, null, z(e.mainNavStore.state.menu, (S) => (m(), g("li", {
3320
+ key: S.name,
3321
+ class: V({
3322
+ "mt-[10px]": S.children,
3323
+ "mt-auto": S.footerSection
3148
3324
  })
3149
3325
  }, [
3150
3326
  f("a", {
3151
- class: H([{
3152
- "bg-gray-100": _.current,
3153
- "hover:bg-gray-100": _?.href
3327
+ class: V([{
3328
+ "bg-gray-100": S.current,
3329
+ "hover:bg-gray-100": S?.href
3154
3330
  }, "h-[37px] sgroup flex items-center gap-x-2 rounded-md p-3 text-gray-800 leading-5 transition-all duration-300 ease-in-out"]),
3155
- href: _?.href,
3156
- onClick: ee((y) => e.mainNavStore.goto(_.href), ["prevent"])
3331
+ href: S?.href,
3332
+ onClick: U((y) => e.mainNavStore.goto(S.href), ["prevent"])
3157
3333
  }, [
3158
- _.icon ? (m(), V(g, {
3334
+ S.icon ? (m(), H(h, {
3159
3335
  key: 0,
3160
- icon: k(A)[_.icon],
3161
- class: H([[(_.current, "text-gray-400")], "size-4"])
3162
- }, null, 8, ["icon", "class"])) : L("", !0),
3163
- e.mainNavStore.state.collapsed ? _?.children ? (m(), h("div", Ka, [...C[6] || (C[6] = [
3336
+ icon: _(A)[S.icon],
3337
+ class: V([[(S.current, "text-gray-400")], "size-4"])
3338
+ }, null, 8, ["icon", "class"])) : T("", !0),
3339
+ e.mainNavStore.state.collapsed ? S?.children ? (m(), g("div", er, [...x[6] || (x[6] = [
3164
3340
  f("div", { class: "w-[10px] h-px bg-gray-400" }, null, -1)
3165
- ])])) : L("", !0) : (m(), h("span", {
3341
+ ])])) : T("", !0) : (m(), g("span", {
3166
3342
  key: 1,
3167
- class: H({
3168
- "text-[11px]": _?.children,
3169
- "text-[13px]": !_?.children,
3170
- "font-semibold": _?.children,
3171
- "text-gray-500": _?.children
3343
+ class: V({
3344
+ "text-[11px]": S?.children,
3345
+ "text-[13px]": !S?.children,
3346
+ "font-semibold": S?.children,
3347
+ "text-gray-500": S?.children
3172
3348
  })
3173
- }, M(_.name), 3))
3174
- ], 10, Ua),
3175
- _.children ? (m(), h("ul", Ga, [
3176
- (m(!0), h(R, null, z(_.children, (y) => (m(), h("li", {
3349
+ }, M(S.name), 3))
3350
+ ], 10, Qo),
3351
+ S.children ? (m(), g("ul", tr, [
3352
+ (m(!0), g(E, null, z(S.children, (y) => (m(), g("li", {
3177
3353
  key: y.name
3178
3354
  }, [
3179
3355
  f("a", {
3180
- class: H([[y.current ? "bg-gray-100" : "", "hover:bg-gray-100"], "h-[37px] sgroup flex items-center gap-x-2 rounded-md p-3 text-gray-800 leading-5 transition-all duration-300 ease-in-out"]),
3356
+ class: V([[y.current ? "bg-gray-100" : "", "hover:bg-gray-100"], "h-[37px] sgroup flex items-center gap-x-2 rounded-md p-3 text-gray-800 leading-5 transition-all duration-300 ease-in-out"]),
3181
3357
  href: y.href,
3182
- onClick: ee((S) => e.mainNavStore.goto(y.href), ["prevent"])
3358
+ onClick: U((C) => e.mainNavStore.goto(y.href), ["prevent"])
3183
3359
  }, [
3184
- y.icon ? (m(), V(g, {
3360
+ y.icon ? (m(), H(h, {
3185
3361
  key: 0,
3186
- icon: k(A)[y.icon],
3187
- class: H([[(y.current, "text-gray-400")], "size-4"])
3188
- }, null, 8, ["icon", "class"])) : L("", !0),
3189
- e.mainNavStore.state.collapsed ? L("", !0) : (m(), h("span", Ya, M(y.name), 1))
3190
- ], 10, Wa)
3362
+ icon: _(A)[y.icon],
3363
+ class: V([[(y.current, "text-gray-400")], "size-4"])
3364
+ }, null, 8, ["icon", "class"])) : T("", !0),
3365
+ e.mainNavStore.state.collapsed ? T("", !0) : (m(), g("span", ar, M(y.name), 1))
3366
+ ], 10, sr)
3191
3367
  ]))), 128))
3192
- ])) : L("", !0)
3368
+ ])) : T("", !0)
3193
3369
  ], 2))), 128))
3194
3370
  ])
3195
3371
  ]),
3196
- f("li", Xa, [
3197
- B(x.$slots, "sidebar-footer"),
3372
+ f("li", or, [
3373
+ D(b.$slots, "sidebar-footer"),
3198
3374
  f("a", {
3199
3375
  class: "font-medium grid place-content-center gap-x-3 rounded-md h-10 p-2.5 text-gray-800 text-[13px] hover:bg-gray-100 transition-all duration-300 ease-in-out",
3200
3376
  href: "#",
3201
- onClick: C[2] || (C[2] = ee((_) => e.mainNavStore.toggleCollapsed(), ["prevent"]))
3377
+ onClick: x[2] || (x[2] = U((S) => e.mainNavStore.toggleCollapsed(), ["prevent"]))
3202
3378
  }, [
3203
- b(g, {
3204
- icon: k(A)[e.mainNavStore.state.collapsed ? "farArrowRightToLine" : "farArrowLeftToLine"],
3379
+ k(h, {
3380
+ icon: _(A)[e.mainNavStore.state.collapsed ? "farArrowRightToLine" : "farArrowLeftToLine"],
3205
3381
  class: "class-5"
3206
3382
  }, null, 8, ["icon"])
3207
3383
  ])
@@ -3211,88 +3387,88 @@ const za = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, ja = { class: "flex
3211
3387
  ])
3212
3388
  ], 2),
3213
3389
  f("div", {
3214
- class: H([v.value, "h-full transition-all flex flex-col"])
3390
+ class: V([v.value, "h-full transition-all flex flex-col"])
3215
3391
  }, [
3216
- f("div", Ja, [
3217
- f("div", Qa, [
3218
- f("div", er, [
3219
- B(x.$slots, "header-left", {}, () => [
3220
- f("div", tr, [
3221
- b(g, {
3222
- icon: k(A).farBarsSort,
3392
+ f("div", rr, [
3393
+ f("div", nr, [
3394
+ f("div", lr, [
3395
+ D(b.$slots, "header-left", {}, () => [
3396
+ f("div", ir, [
3397
+ k(h, {
3398
+ icon: _(A).farBarsSort,
3223
3399
  class: "size-5",
3224
- onClick: C[3] || (C[3] = (_) => e.mainNavStore.toggleHidden())
3400
+ onClick: x[3] || (x[3] = (S) => e.mainNavStore.toggleHidden())
3225
3401
  }, null, 8, ["icon"])
3226
3402
  ])
3227
3403
  ]),
3228
- B(x.$slots, "header-center", {}, () => [
3229
- i.value ? (m(), h("div", {
3404
+ D(b.$slots, "header-center", {}, () => [
3405
+ i.value ? (m(), g("div", {
3230
3406
  key: 0,
3231
3407
  class: "absolute left-1/2 -translate-x-1/2 cursor-pointer h-9 flex items-center",
3232
3408
  onClick: d
3233
3409
  }, [
3234
- k(a).currentBrand ? (m(), h("img", {
3410
+ _(o).currentBrand ? (m(), g("img", {
3235
3411
  key: 0,
3236
- src: k(a).currentBrand.logo,
3412
+ src: _(o).currentBrand.logo,
3237
3413
  alt: "",
3238
3414
  class: "h-[30px] w-auto"
3239
- }, null, 8, sr)) : L("", !0)
3240
- ])) : L("", !0)
3415
+ }, null, 8, cr)) : T("", !0)
3416
+ ])) : T("", !0)
3241
3417
  ]),
3242
- f("div", or, [
3243
- B(x.$slots, "header-right", {}, () => [
3244
- e.appStore.state.showAppSelector ? (m(), h("button", {
3418
+ f("div", ur, [
3419
+ D(b.$slots, "header-right", {}, () => [
3420
+ e.appStore.state.showAppSelector ? (m(), g("button", {
3245
3421
  key: 0,
3246
3422
  class: "rounded-sm bg-white w-[42px] h-[42px] ring-1 ring-inset ring-gray-300",
3247
3423
  type: "button",
3248
3424
  onClick: u
3249
3425
  }, [
3250
- b(g, {
3251
- icon: k(A).farGripDotsVertical,
3426
+ k(h, {
3427
+ icon: _(A).farGripDotsVertical,
3252
3428
  class: "size-4 text-gray-400"
3253
3429
  }, null, 8, ["icon"])
3254
- ])) : L("", !0)
3430
+ ])) : T("", !0)
3255
3431
  ])
3256
3432
  ])
3257
3433
  ])
3258
3434
  ])
3259
3435
  ]),
3260
- f("main", ar, [
3261
- b(w)
3436
+ f("main", dr, [
3437
+ k(w)
3262
3438
  ])
3263
3439
  ], 2),
3264
- b(k(Te), {
3440
+ k(_(Le), {
3265
3441
  position: "left",
3266
- "overlay-instance": k(se).left,
3267
- onClose: C[4] || (C[4] = (_) => o("overlayClose", "left"))
3442
+ "overlay-instance": _(se).left,
3443
+ onClose: x[4] || (x[4] = (S) => a("overlayClose", "left"))
3268
3444
  }, null, 8, ["overlay-instance"]),
3269
- b(k(Te), {
3445
+ k(_(Le), {
3270
3446
  position: "right",
3271
- "overlay-instance": k(se).right,
3272
- onClose: C[5] || (C[5] = (_) => o("overlayClose", "right"))
3447
+ "overlay-instance": _(se).right,
3448
+ onClose: x[5] || (x[5] = (S) => a("overlayClose", "right"))
3273
3449
  }, null, 8, ["overlay-instance"]),
3274
- b(k(yo))
3450
+ k(_(_a))
3275
3451
  ], 64);
3276
3452
  };
3277
3453
  }
3278
- }, rr = {}, nr = { class: "h-full" };
3279
- function lr(e, s) {
3280
- const t = O("router-view");
3281
- return m(), h("main", nr, [
3282
- b(t)
3454
+ }, pr = {}, fr = { class: "h-full" };
3455
+ function mr(e, s) {
3456
+ const t = F("router-view");
3457
+ return m(), g("main", fr, [
3458
+ k(t)
3283
3459
  ]);
3284
3460
  }
3285
- const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid place-content-center relative" }, cr = { class: "absolute top-8 left-8" }, ur = ["src"], dr = {
3461
+ const Yn = /* @__PURE__ */ te(pr, [["render", mr]]), hr = { class: "h-full grid place-content-center relative" }, gr = { class: "absolute top-8 left-8" }, yr = ["src"], br = {
3286
3462
  key: 1,
3287
3463
  width: "59",
3288
3464
  height: "23",
3289
3465
  viewBox: "0 0 59 23",
3290
3466
  fill: "none",
3291
3467
  xmlns: "http://www.w3.org/2000/svg"
3292
- }, pr = { class: "max-w-sm grid gap-y-1 -mt-8" }, fr = { class: "mb-7" }, mr = { class: "text-gray-600" }, hr = { class: "grid grid-flow-col justify-between mt-1 mb-4" }, gr = {
3468
+ }, vr = { class: "max-w-sm grid gap-y-1 -mt-8" }, xr = { class: "mb-7" }, kr = { class: "text-gray-600" }, wr = { class: "grid grid-flow-col justify-between mt-1 mb-4" }, _r = {
3293
3469
  key: 0,
3294
3470
  class: "text-red-600 text-sm mb-2"
3295
- }, yr = { key: 0 }, vr = { key: 1 }, br = {
3471
+ }, Sr = { key: 0 }, Cr = { key: 1 }, $r = {
3296
3472
  __name: "SparkLoginView",
3297
3473
  props: {
3298
3474
  logo: {
@@ -3309,8 +3485,8 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
3309
3485
  }
3310
3486
  },
3311
3487
  setup(e) {
3312
- const s = W(), t = le(), o = nt(), l = G(), n = e, a = E(!1), c = E(""), r = async (i) => {
3313
- a.value = !0, c.value = "";
3488
+ const s = Y(), t = le(), a = nt(), l = W(), r = e, o = R(!1), c = R(""), n = async (i) => {
3489
+ o.value = !0, c.value = "";
3314
3490
  try {
3315
3491
  await l.login(i);
3316
3492
  const u = t.query.redirect;
@@ -3321,23 +3497,23 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
3321
3497
  }
3322
3498
  await s.push(u);
3323
3499
  } else
3324
- await s.push(n.defaultRedirect);
3500
+ await s.push(r.defaultRedirect);
3325
3501
  } catch (u) {
3326
3502
  c.value = u.response?.data?.message || u.message || "Login failed. Please try again.";
3327
3503
  } finally {
3328
- a.value = !1;
3504
+ o.value = !1;
3329
3505
  }
3330
3506
  };
3331
3507
  return (i, u) => {
3332
- const d = O("FormKit"), p = O("router-link");
3333
- return m(), h("div", ir, [
3334
- f("div", cr, [
3335
- n.logo ? (m(), h("img", {
3508
+ const d = F("FormKit"), p = F("router-link");
3509
+ return m(), g("div", hr, [
3510
+ f("div", gr, [
3511
+ r.logo ? (m(), g("img", {
3336
3512
  key: 0,
3337
- src: n.logo,
3513
+ src: r.logo,
3338
3514
  alt: "Logo",
3339
3515
  class: "h-[23px] w-auto"
3340
- }, null, 8, ur)) : (m(), h("svg", dr, [...u[0] || (u[0] = [
3516
+ }, null, 8, yr)) : (m(), g("svg", br, [...u[0] || (u[0] = [
3341
3517
  f("path", {
3342
3518
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
3343
3519
  fill: "#1C64F2"
@@ -3356,56 +3532,56 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
3356
3532
  }, null, -1)
3357
3533
  ])]))
3358
3534
  ]),
3359
- f("div", pr, [
3360
- f("div", fr, [
3535
+ f("div", vr, [
3536
+ f("div", xr, [
3361
3537
  u[1] || (u[1] = f("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Log in", -1)),
3362
- f("p", mr, " Welcome back" + M(k(o).state.app ? ` to ${k(o).state.app}` : "") + "! Please enter your details. ", 1)
3538
+ f("p", kr, " Welcome back" + M(_(a).state.app ? ` to ${_(a).state.app}` : "") + "! Please enter your details. ", 1)
3363
3539
  ]),
3364
- b(d, {
3540
+ k(d, {
3365
3541
  type: "form",
3366
- onSubmit: r,
3542
+ onSubmit: n,
3367
3543
  actions: !1
3368
3544
  }, {
3369
- default: T(() => [
3370
- b(d, {
3545
+ default: L(() => [
3546
+ k(d, {
3371
3547
  label: "Email",
3372
3548
  name: "email",
3373
3549
  placeholder: "Enter your email",
3374
3550
  type: "email",
3375
3551
  validation: "required|email",
3376
3552
  "outer-class": "max-w-full",
3377
- value: k(l).state.devCredentials.username
3553
+ value: _(l).state.devCredentials.username
3378
3554
  }, null, 8, ["value"]),
3379
- b(d, {
3555
+ k(d, {
3380
3556
  label: "Password",
3381
3557
  name: "password",
3382
3558
  placeholder: "••••••••",
3383
3559
  type: "password",
3384
3560
  validation: "required",
3385
3561
  "outer-class": "max-w-full",
3386
- value: k(l).state.devCredentials.password
3562
+ value: _(l).state.devCredentials.password
3387
3563
  }, null, 8, ["value"]),
3388
- f("div", hr, [
3564
+ f("div", wr, [
3389
3565
  u[3] || (u[3] = f("span", null, null, -1)),
3390
- b(p, {
3391
- to: n.forgotPasswordRoute,
3566
+ k(p, {
3567
+ to: r.forgotPasswordRoute,
3392
3568
  class: "text-sm text-primary-600 font-semibold"
3393
3569
  }, {
3394
- default: T(() => [...u[2] || (u[2] = [
3395
- F(" Forgot password ", -1)
3570
+ default: L(() => [...u[2] || (u[2] = [
3571
+ O(" Forgot password ", -1)
3396
3572
  ])]),
3397
3573
  _: 1
3398
3574
  }, 8, ["to"])
3399
3575
  ]),
3400
- c.value ? (m(), h("div", gr, M(c.value), 1)) : L("", !0),
3401
- b(k(Y), {
3576
+ c.value ? (m(), g("div", _r, M(c.value), 1)) : T("", !0),
3577
+ k(_(X), {
3402
3578
  type: "submit",
3403
3579
  size: "xl",
3404
- disabled: a.value,
3580
+ disabled: o.value,
3405
3581
  "button-class": "w-full mb-2"
3406
3582
  }, {
3407
- default: T(() => [
3408
- a.value ? (m(), h("span", vr, "Signing in...")) : (m(), h("span", yr, "Sign in"))
3583
+ default: L(() => [
3584
+ o.value ? (m(), g("span", Cr, "Signing in...")) : (m(), g("span", Sr, "Sign in"))
3409
3585
  ]),
3410
3586
  _: 1
3411
3587
  }, 8, ["disabled"])
@@ -3416,7 +3592,7 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
3416
3592
  ]);
3417
3593
  };
3418
3594
  }
3419
- }, xr = {
3595
+ }, Tr = {
3420
3596
  __name: "SparkLogoutView",
3421
3597
  props: {
3422
3598
  defaultRedirect: {
@@ -3425,27 +3601,27 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
3425
3601
  }
3426
3602
  },
3427
3603
  setup(e) {
3428
- const s = W(), t = le(), o = G(), l = e;
3429
- return _e(async () => {
3430
- await o.logout();
3431
- const n = t.query.redirect;
3432
- n && n.startsWith("http") ? window.location.href = n : await s.push(n || l.defaultRedirect);
3433
- }), (n, a) => null;
3604
+ const s = Y(), t = le(), a = W(), l = e;
3605
+ return Se(async () => {
3606
+ await a.logout();
3607
+ const r = t.query.redirect;
3608
+ r && r.startsWith("http") ? window.location.href = r : await s.push(r || l.defaultRedirect);
3609
+ }), (r, o) => null;
3434
3610
  }
3435
- }, kr = { class: "h-full grid place-content-center relative" }, wr = { class: "absolute top-8 left-8" }, _r = ["src"], Sr = {
3611
+ }, Lr = { class: "h-full grid place-content-center relative" }, Pr = { class: "absolute top-8 left-8" }, Mr = ["src"], Vr = {
3436
3612
  key: 1,
3437
3613
  width: "59",
3438
3614
  height: "23",
3439
3615
  viewBox: "0 0 59 23",
3440
3616
  fill: "none",
3441
3617
  xmlns: "http://www.w3.org/2000/svg"
3442
- }, Cr = { class: "max-w-sm grid gap-y-1 -mt-8" }, $r = {
3618
+ }, Hr = { class: "max-w-sm grid gap-y-1 -mt-8" }, Rr = {
3443
3619
  key: 0,
3444
3620
  class: "text-red-600 text-sm mb-2"
3445
- }, Tr = {
3621
+ }, Fr = {
3446
3622
  key: 1,
3447
3623
  class: "text-green-600 text-sm mb-2"
3448
- }, Pr = { key: 0 }, Lr = { key: 1 }, Mr = {
3624
+ }, Er = { key: 0 }, Ar = { key: 1 }, Or = {
3449
3625
  __name: "SparkForgotPasswordView",
3450
3626
  props: {
3451
3627
  logo: {
@@ -3458,26 +3634,26 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
3458
3634
  }
3459
3635
  },
3460
3636
  setup(e) {
3461
- const s = G(), t = e, o = E(!1), l = E(""), n = E(""), a = async ({ email: c }) => {
3462
- o.value = !0, l.value = "", n.value = "";
3637
+ const s = W(), t = e, a = R(!1), l = R(""), r = R(""), o = async ({ email: c }) => {
3638
+ a.value = !0, l.value = "", r.value = "";
3463
3639
  try {
3464
- await ne.post(s.state.endpoints.passwordEmail, { email: c }), n.value = "Password reset link sent! Check your email.";
3465
- } catch (r) {
3466
- l.value = r.response?.data?.message || "Failed to send reset link.";
3640
+ await ne.post(s.state.endpoints.passwordEmail, { email: c }), r.value = "Password reset link sent! Check your email.";
3641
+ } catch (n) {
3642
+ l.value = n.response?.data?.message || "Failed to send reset link.";
3467
3643
  } finally {
3468
- o.value = !1;
3644
+ a.value = !1;
3469
3645
  }
3470
3646
  };
3471
- return (c, r) => {
3472
- const i = O("FormKit"), u = O("router-link");
3473
- return m(), h("div", kr, [
3474
- f("div", wr, [
3475
- t.logo ? (m(), h("img", {
3647
+ return (c, n) => {
3648
+ const i = F("FormKit"), u = F("router-link");
3649
+ return m(), g("div", Lr, [
3650
+ f("div", Pr, [
3651
+ t.logo ? (m(), g("img", {
3476
3652
  key: 0,
3477
3653
  src: t.logo,
3478
3654
  alt: "Logo",
3479
3655
  class: "h-[23px] w-auto"
3480
- }, null, 8, _r)) : (m(), h("svg", Sr, [...r[0] || (r[0] = [
3656
+ }, null, 8, Mr)) : (m(), g("svg", Vr, [...n[0] || (n[0] = [
3481
3657
  f("path", {
3482
3658
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
3483
3659
  fill: "#1C64F2"
@@ -3496,18 +3672,18 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
3496
3672
  }, null, -1)
3497
3673
  ])]))
3498
3674
  ]),
3499
- f("div", Cr, [
3500
- r[2] || (r[2] = f("div", { class: "mb-7" }, [
3675
+ f("div", Hr, [
3676
+ n[2] || (n[2] = f("div", { class: "mb-7" }, [
3501
3677
  f("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Reset password"),
3502
3678
  f("p", { class: "text-gray-600" }, " Enter your email and we'll send you a link to reset your password. ")
3503
3679
  ], -1)),
3504
- b(i, {
3680
+ k(i, {
3505
3681
  type: "form",
3506
- onSubmit: a,
3682
+ onSubmit: o,
3507
3683
  actions: !1
3508
3684
  }, {
3509
- default: T(() => [
3510
- b(i, {
3685
+ default: L(() => [
3686
+ k(i, {
3511
3687
  label: "Email",
3512
3688
  name: "email",
3513
3689
  placeholder: "Enter your email",
@@ -3515,25 +3691,25 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
3515
3691
  validation: "required|email",
3516
3692
  "outer-class": "max-w-full"
3517
3693
  }),
3518
- l.value ? (m(), h("div", $r, M(l.value), 1)) : L("", !0),
3519
- n.value ? (m(), h("div", Tr, M(n.value), 1)) : L("", !0),
3520
- b(k(Y), {
3694
+ l.value ? (m(), g("div", Rr, M(l.value), 1)) : T("", !0),
3695
+ r.value ? (m(), g("div", Fr, M(r.value), 1)) : T("", !0),
3696
+ k(_(X), {
3521
3697
  type: "submit",
3522
3698
  size: "xl",
3523
- disabled: o.value,
3699
+ disabled: a.value,
3524
3700
  "button-class": "w-full mb-2"
3525
3701
  }, {
3526
- default: T(() => [
3527
- o.value ? (m(), h("span", Lr, "Sending...")) : (m(), h("span", Pr, "Send reset link"))
3702
+ default: L(() => [
3703
+ a.value ? (m(), g("span", Ar, "Sending...")) : (m(), g("span", Er, "Send reset link"))
3528
3704
  ]),
3529
3705
  _: 1
3530
3706
  }, 8, ["disabled"]),
3531
- b(u, {
3707
+ k(u, {
3532
3708
  to: t.loginRoute,
3533
3709
  class: "text-sm text-center text-primary-600 font-semibold block"
3534
3710
  }, {
3535
- default: T(() => [...r[1] || (r[1] = [
3536
- F(" Back to login ", -1)
3711
+ default: L(() => [...n[1] || (n[1] = [
3712
+ O(" Back to login ", -1)
3537
3713
  ])]),
3538
3714
  _: 1
3539
3715
  }, 8, ["to"])
@@ -3544,17 +3720,17 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
3544
3720
  ]);
3545
3721
  };
3546
3722
  }
3547
- }, Hr = { class: "h-full grid place-content-center relative" }, Vr = { class: "absolute top-8 left-8" }, Rr = ["src"], Er = {
3723
+ }, Dr = { class: "h-full grid place-content-center relative" }, Br = { class: "absolute top-8 left-8" }, jr = ["src"], zr = {
3548
3724
  key: 1,
3549
3725
  width: "59",
3550
3726
  height: "23",
3551
3727
  viewBox: "0 0 59 23",
3552
3728
  fill: "none",
3553
3729
  xmlns: "http://www.w3.org/2000/svg"
3554
- }, Ar = { class: "max-w-sm grid gap-y-1 -mt-8" }, Fr = {
3730
+ }, Ir = { class: "max-w-sm grid gap-y-1 -mt-8" }, Nr = {
3555
3731
  key: 0,
3556
3732
  class: "text-red-600 text-sm mb-2"
3557
- }, Or = { key: 0 }, Br = { key: 1 }, Dr = {
3733
+ }, Zr = { key: 0 }, qr = { key: 1 }, Ur = {
3558
3734
  __name: "SparkResetPasswordView",
3559
3735
  props: {
3560
3736
  logo: {
@@ -3567,31 +3743,31 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
3567
3743
  }
3568
3744
  },
3569
3745
  setup(e) {
3570
- const s = W(), t = le(), o = G(), l = e, n = E(!1), a = E(""), c = async ({ password: r, password_confirmation: i }) => {
3571
- n.value = !0, a.value = "";
3746
+ const s = Y(), t = le(), a = W(), l = e, r = R(!1), o = R(""), c = async ({ password: n, password_confirmation: i }) => {
3747
+ r.value = !0, o.value = "";
3572
3748
  try {
3573
- await ne.post(o.state.endpoints.passwordReset, {
3749
+ await ne.post(a.state.endpoints.passwordReset, {
3574
3750
  email: t.query.email,
3575
3751
  token: t.query.token,
3576
- password: r,
3752
+ password: n,
3577
3753
  password_confirmation: i
3578
3754
  }), await s.push(l.loginRoute);
3579
3755
  } catch (u) {
3580
- a.value = u.response?.data?.message || "Failed to reset password.";
3756
+ o.value = u.response?.data?.message || "Failed to reset password.";
3581
3757
  } finally {
3582
- n.value = !1;
3758
+ r.value = !1;
3583
3759
  }
3584
3760
  };
3585
- return (r, i) => {
3586
- const u = O("FormKit");
3587
- return m(), h("div", Hr, [
3588
- f("div", Vr, [
3589
- l.logo ? (m(), h("img", {
3761
+ return (n, i) => {
3762
+ const u = F("FormKit");
3763
+ return m(), g("div", Dr, [
3764
+ f("div", Br, [
3765
+ l.logo ? (m(), g("img", {
3590
3766
  key: 0,
3591
3767
  src: l.logo,
3592
3768
  alt: "Logo",
3593
3769
  class: "h-[23px] w-auto"
3594
- }, null, 8, Rr)) : (m(), h("svg", Er, [...i[0] || (i[0] = [
3770
+ }, null, 8, jr)) : (m(), g("svg", zr, [...i[0] || (i[0] = [
3595
3771
  f("path", {
3596
3772
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
3597
3773
  fill: "#1C64F2"
@@ -3610,18 +3786,18 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
3610
3786
  }, null, -1)
3611
3787
  ])]))
3612
3788
  ]),
3613
- f("div", Ar, [
3789
+ f("div", Ir, [
3614
3790
  i[1] || (i[1] = f("div", { class: "mb-7" }, [
3615
3791
  f("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Set new password"),
3616
3792
  f("p", { class: "text-gray-600" }, " Enter your new password below. ")
3617
3793
  ], -1)),
3618
- b(u, {
3794
+ k(u, {
3619
3795
  type: "form",
3620
3796
  onSubmit: c,
3621
3797
  actions: !1
3622
3798
  }, {
3623
- default: T(() => [
3624
- b(u, {
3799
+ default: L(() => [
3800
+ k(u, {
3625
3801
  label: "New Password",
3626
3802
  name: "password",
3627
3803
  placeholder: "••••••••",
@@ -3629,7 +3805,7 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
3629
3805
  validation: "required|length:8",
3630
3806
  "outer-class": "max-w-full"
3631
3807
  }),
3632
- b(u, {
3808
+ k(u, {
3633
3809
  label: "Confirm Password",
3634
3810
  name: "password_confirmation",
3635
3811
  placeholder: "••••••••",
@@ -3637,15 +3813,15 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
3637
3813
  validation: "required|confirm:password",
3638
3814
  "outer-class": "max-w-full"
3639
3815
  }),
3640
- a.value ? (m(), h("div", Fr, M(a.value), 1)) : L("", !0),
3641
- b(k(Y), {
3816
+ o.value ? (m(), g("div", Nr, M(o.value), 1)) : T("", !0),
3817
+ k(_(X), {
3642
3818
  type: "submit",
3643
3819
  size: "xl",
3644
- disabled: n.value,
3820
+ disabled: r.value,
3645
3821
  "button-class": "w-full mb-2"
3646
3822
  }, {
3647
- default: T(() => [
3648
- n.value ? (m(), h("span", Br, "Resetting...")) : (m(), h("span", Or, "Reset password"))
3823
+ default: L(() => [
3824
+ r.value ? (m(), g("span", qr, "Resetting...")) : (m(), g("span", Zr, "Reset password"))
3649
3825
  ]),
3650
3826
  _: 1
3651
3827
  }, 8, ["disabled"])
@@ -3656,14 +3832,14 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
3656
3832
  ]);
3657
3833
  };
3658
3834
  }
3659
- }, zr = { class: "h-full grid place-content-center relative" }, jr = { class: "absolute top-8 left-8" }, Ir = ["src"], Nr = {
3835
+ }, Kr = { class: "h-full grid place-content-center relative" }, Gr = { class: "absolute top-8 left-8" }, Wr = ["src"], Yr = {
3660
3836
  key: 1,
3661
3837
  width: "59",
3662
3838
  height: "23",
3663
3839
  viewBox: "0 0 59 23",
3664
3840
  fill: "none",
3665
3841
  xmlns: "http://www.w3.org/2000/svg"
3666
- }, Zr = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, qr = { class: "flex gap-4 justify-center" }, Ur = {
3842
+ }, Xr = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, Jr = { class: "flex gap-4 justify-center" }, Qr = {
3667
3843
  __name: "SparkError403View",
3668
3844
  props: {
3669
3845
  logo: {
@@ -3676,17 +3852,17 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
3676
3852
  }
3677
3853
  },
3678
3854
  setup(e) {
3679
- const s = W(), t = e, o = () => {
3855
+ const s = Y(), t = e, a = () => {
3680
3856
  s.push(t.homeRoute);
3681
3857
  };
3682
- return (l, n) => (m(), h("div", zr, [
3683
- f("div", jr, [
3684
- t.logo ? (m(), h("img", {
3858
+ return (l, r) => (m(), g("div", Kr, [
3859
+ f("div", Gr, [
3860
+ t.logo ? (m(), g("img", {
3685
3861
  key: 0,
3686
3862
  src: t.logo,
3687
3863
  alt: "Logo",
3688
3864
  class: "h-[23px] w-auto"
3689
- }, null, 8, Ir)) : (m(), h("svg", Nr, [...n[0] || (n[0] = [
3865
+ }, null, 8, Wr)) : (m(), g("svg", Yr, [...r[0] || (r[0] = [
3690
3866
  f("path", {
3691
3867
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
3692
3868
  fill: "#1C64F2"
@@ -3705,23 +3881,23 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
3705
3881
  }, null, -1)
3706
3882
  ])]))
3707
3883
  ]),
3708
- f("div", Zr, [
3709
- n[2] || (n[2] = f("div", null, [
3884
+ f("div", Xr, [
3885
+ r[2] || (r[2] = f("div", null, [
3710
3886
  f("div", { class: "text-primary-600 text-7xl font-bold mb-4" }, "403"),
3711
3887
  f("h1", { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, " Access Forbidden "),
3712
3888
  f("p", { class: "text-gray-600" }, [
3713
- F(" You don't have permission to access this resource."),
3889
+ O(" You don't have permission to access this resource."),
3714
3890
  f("br"),
3715
- F(" If you believe this is an error, please contact your administrator. ")
3891
+ O(" If you believe this is an error, please contact your administrator. ")
3716
3892
  ])
3717
3893
  ], -1)),
3718
- f("div", qr, [
3719
- b(k(Y), {
3720
- onClick: o,
3894
+ f("div", Jr, [
3895
+ k(_(X), {
3896
+ onClick: a,
3721
3897
  size: "lg"
3722
3898
  }, {
3723
- default: T(() => [...n[1] || (n[1] = [
3724
- F(" Go to Home ", -1)
3899
+ default: L(() => [...r[1] || (r[1] = [
3900
+ O(" Go to Home ", -1)
3725
3901
  ])]),
3726
3902
  _: 1
3727
3903
  })
@@ -3729,14 +3905,14 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
3729
3905
  ])
3730
3906
  ]));
3731
3907
  }
3732
- }, Kr = { class: "h-full grid place-content-center relative" }, Gr = { class: "absolute top-8 left-8" }, Wr = ["src"], Yr = {
3908
+ }, en = { class: "h-full grid place-content-center relative" }, tn = { class: "absolute top-8 left-8" }, sn = ["src"], an = {
3733
3909
  key: 1,
3734
3910
  width: "59",
3735
3911
  height: "23",
3736
3912
  viewBox: "0 0 59 23",
3737
3913
  fill: "none",
3738
3914
  xmlns: "http://www.w3.org/2000/svg"
3739
- }, Xr = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, Jr = { class: "flex gap-4 justify-center" }, Qr = {
3915
+ }, on = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, rn = { class: "flex gap-4 justify-center" }, nn = {
3740
3916
  __name: "SparkError404View",
3741
3917
  props: {
3742
3918
  logo: {
@@ -3749,17 +3925,17 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
3749
3925
  }
3750
3926
  },
3751
3927
  setup(e) {
3752
- const s = W(), t = e, o = () => {
3928
+ const s = Y(), t = e, a = () => {
3753
3929
  s.push(t.homeRoute);
3754
3930
  };
3755
- return (l, n) => (m(), h("div", Kr, [
3756
- f("div", Gr, [
3757
- t.logo ? (m(), h("img", {
3931
+ return (l, r) => (m(), g("div", en, [
3932
+ f("div", tn, [
3933
+ t.logo ? (m(), g("img", {
3758
3934
  key: 0,
3759
3935
  src: t.logo,
3760
3936
  alt: "Logo",
3761
3937
  class: "h-[23px] w-auto"
3762
- }, null, 8, Wr)) : (m(), h("svg", Yr, [...n[0] || (n[0] = [
3938
+ }, null, 8, sn)) : (m(), g("svg", an, [...r[0] || (r[0] = [
3763
3939
  f("path", {
3764
3940
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
3765
3941
  fill: "#1C64F2"
@@ -3778,19 +3954,19 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
3778
3954
  }, null, -1)
3779
3955
  ])]))
3780
3956
  ]),
3781
- f("div", Xr, [
3782
- n[2] || (n[2] = f("div", null, [
3957
+ f("div", on, [
3958
+ r[2] || (r[2] = f("div", null, [
3783
3959
  f("div", { class: "text-primary-600 text-7xl font-bold mb-4" }, "404"),
3784
3960
  f("h1", { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, " Page Not Found "),
3785
3961
  f("p", { class: "text-gray-600" }, " The page you're looking for doesn't exist or has been moved. ")
3786
3962
  ], -1)),
3787
- f("div", Jr, [
3788
- b(k(Y), {
3789
- onClick: o,
3963
+ f("div", rn, [
3964
+ k(_(X), {
3965
+ onClick: a,
3790
3966
  size: "lg"
3791
3967
  }, {
3792
- default: T(() => [...n[1] || (n[1] = [
3793
- F(" Go to Home ", -1)
3968
+ default: L(() => [...r[1] || (r[1] = [
3969
+ O(" Go to Home ", -1)
3794
3970
  ])]),
3795
3971
  _: 1
3796
3972
  })
@@ -3798,14 +3974,14 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
3798
3974
  ])
3799
3975
  ]));
3800
3976
  }
3801
- }, en = { class: "h-full grid place-content-center relative" }, tn = { class: "absolute top-8 left-8" }, sn = ["src"], on = {
3977
+ }, ln = { class: "h-full grid place-content-center relative" }, cn = { class: "absolute top-8 left-8" }, un = ["src"], dn = {
3802
3978
  key: 1,
3803
3979
  width: "59",
3804
3980
  height: "23",
3805
3981
  viewBox: "0 0 59 23",
3806
3982
  fill: "none",
3807
3983
  xmlns: "http://www.w3.org/2000/svg"
3808
- }, an = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, rn = { class: "text-primary-600 text-7xl font-bold mb-4" }, nn = { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, ln = { class: "text-gray-600" }, cn = { class: "flex gap-4 justify-center" }, Nn = {
3984
+ }, pn = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, fn = { class: "text-primary-600 text-7xl font-bold mb-4" }, mn = { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, hn = { class: "text-gray-600" }, gn = { class: "flex gap-4 justify-center" }, Xn = {
3809
3985
  __name: "SparkErrorGeneralView",
3810
3986
  props: {
3811
3987
  logo: {
@@ -3830,17 +4006,17 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
3830
4006
  }
3831
4007
  },
3832
4008
  setup(e) {
3833
- const s = W(), t = e, o = () => {
4009
+ const s = Y(), t = e, a = () => {
3834
4010
  s.push(t.homeRoute);
3835
4011
  };
3836
- return (l, n) => (m(), h("div", en, [
3837
- f("div", tn, [
3838
- t.logo ? (m(), h("img", {
4012
+ return (l, r) => (m(), g("div", ln, [
4013
+ f("div", cn, [
4014
+ t.logo ? (m(), g("img", {
3839
4015
  key: 0,
3840
4016
  src: t.logo,
3841
4017
  alt: "Logo",
3842
4018
  class: "h-[23px] w-auto"
3843
- }, null, 8, sn)) : (m(), h("svg", on, [...n[0] || (n[0] = [
4019
+ }, null, 8, un)) : (m(), g("svg", dn, [...r[0] || (r[0] = [
3844
4020
  f("path", {
3845
4021
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
3846
4022
  fill: "#1C64F2"
@@ -3859,19 +4035,19 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
3859
4035
  }, null, -1)
3860
4036
  ])]))
3861
4037
  ]),
3862
- f("div", an, [
4038
+ f("div", pn, [
3863
4039
  f("div", null, [
3864
- f("div", rn, M(t.errorCode || "Error"), 1),
3865
- f("h1", nn, M(t.title || "Something went wrong"), 1),
3866
- f("p", ln, M(t.message || "An unexpected error occurred. Please try again later."), 1)
4040
+ f("div", fn, M(t.errorCode || "Error"), 1),
4041
+ f("h1", mn, M(t.title || "Something went wrong"), 1),
4042
+ f("p", hn, M(t.message || "An unexpected error occurred. Please try again later."), 1)
3867
4043
  ]),
3868
- f("div", cn, [
3869
- b(k(Y), {
3870
- onClick: o,
4044
+ f("div", gn, [
4045
+ k(_(X), {
4046
+ onClick: a,
3871
4047
  size: "lg"
3872
4048
  }, {
3873
- default: T(() => [...n[1] || (n[1] = [
3874
- F(" Go to Home ", -1)
4049
+ default: L(() => [...r[1] || (r[1] = [
4050
+ O(" Go to Home ", -1)
3875
4051
  ])]),
3876
4052
  _: 1
3877
4053
  })
@@ -3880,60 +4056,60 @@ const In = /* @__PURE__ */ te(rr, [["render", lr]]), ir = { class: "h-full grid
3880
4056
  ]));
3881
4057
  }
3882
4058
  };
3883
- function Zn(e = {}) {
4059
+ function Jn(e = {}) {
3884
4060
  const {
3885
4061
  loginPath: s = "/login",
3886
4062
  logoutPath: t = "/logout",
3887
- forgotPasswordPath: o = "/forgot-password",
4063
+ forgotPasswordPath: a = "/forgot-password",
3888
4064
  resetPasswordPath: l = "/password/reset",
3889
- logo: n = "",
3890
- defaultRedirect: a = "/dashboard"
4065
+ logo: r = "",
4066
+ defaultRedirect: o = "/dashboard"
3891
4067
  } = e;
3892
4068
  return [
3893
4069
  {
3894
4070
  path: s,
3895
4071
  name: "login",
3896
- component: br,
3897
- props: { logo: n, defaultRedirect: a },
4072
+ component: $r,
4073
+ props: { logo: r, defaultRedirect: o },
3898
4074
  meta: { auth: !1 }
3899
4075
  },
3900
4076
  {
3901
4077
  path: t,
3902
4078
  name: "logout",
3903
- component: xr,
4079
+ component: Tr,
3904
4080
  props: { defaultRedirect: s },
3905
4081
  meta: { auth: !1 }
3906
4082
  },
3907
4083
  {
3908
- path: o,
4084
+ path: a,
3909
4085
  name: "forgot-password",
3910
- component: Mr,
3911
- props: { logo: n, loginRoute: s },
4086
+ component: Or,
4087
+ props: { logo: r, loginRoute: s },
3912
4088
  meta: { auth: !1 }
3913
4089
  },
3914
4090
  {
3915
4091
  path: l,
3916
4092
  name: "password-reset",
3917
- component: Dr,
3918
- props: { logo: n, loginRoute: s },
4093
+ component: Ur,
4094
+ props: { logo: r, loginRoute: s },
3919
4095
  meta: { auth: !1 }
3920
4096
  }
3921
4097
  ];
3922
4098
  }
3923
- function qn(e, s = {}) {
4099
+ function Qn(e, s = {}) {
3924
4100
  const { defaultAuthenticatedRoute: t = "/dashboard" } = s;
3925
- e.beforeEach(async (o, l, n) => {
3926
- const a = G();
3927
- a.state.ready || await a.fetchUser(), un(o, n, a, t);
4101
+ e.beforeEach(async (a, l, r) => {
4102
+ const o = W();
4103
+ o.state.ready || await o.fetchUser(), yn(a, r, o, t);
3928
4104
  });
3929
4105
  }
3930
- function un(e, s, t, o) {
3931
- const l = e.meta.auth !== !1, n = t.check;
4106
+ function yn(e, s, t, a) {
4107
+ const l = e.meta.auth !== !1, r = t.check;
3932
4108
  if (t.state.overrideToken && e.path === "/logout") {
3933
- s({ path: o });
4109
+ s({ path: a });
3934
4110
  return;
3935
4111
  }
3936
- if (!n) {
4112
+ if (!r) {
3937
4113
  if (!l) {
3938
4114
  if (e.path === "/logout") {
3939
4115
  s({ path: t.state.routes.auth });
@@ -3942,44 +4118,44 @@ function un(e, s, t, o) {
3942
4118
  s();
3943
4119
  return;
3944
4120
  }
3945
- let a = e.fullPath;
3946
- if (a === "/" || a === "" || a === o) {
4121
+ let o = e.fullPath;
4122
+ if (o === "/" || o === "" || o === a) {
3947
4123
  s({ path: t.state.routes.auth });
3948
4124
  return;
3949
4125
  }
3950
- a.includes("%") && (a = decodeURIComponent(a)), s({
4126
+ o.includes("%") && (o = decodeURIComponent(o)), s({
3951
4127
  path: t.state.routes.auth,
3952
- query: { redirect: a }
4128
+ query: { redirect: o }
3953
4129
  });
3954
4130
  return;
3955
4131
  }
3956
- if (n) {
4132
+ if (r) {
3957
4133
  if (!l && e.path === t.state.routes.auth) {
3958
- s({ path: o });
4134
+ s({ path: a });
3959
4135
  return;
3960
4136
  }
3961
4137
  if (e.path === "/") {
3962
- s({ path: o });
4138
+ s({ path: a });
3963
4139
  return;
3964
4140
  }
3965
4141
  s();
3966
4142
  }
3967
4143
  }
3968
- function Un(e = {}) {
4144
+ function el(e = {}) {
3969
4145
  const {
3970
4146
  forbiddenPath: s = "/error/403",
3971
4147
  logo: t = "",
3972
- homeRoute: o = "/dashboard"
4148
+ homeRoute: a = "/dashboard"
3973
4149
  } = e;
3974
4150
  return {
3975
4151
  path: s,
3976
4152
  name: "error-403",
3977
- component: Ur,
3978
- props: { logo: t, homeRoute: o },
4153
+ component: Qr,
4154
+ props: { logo: t, homeRoute: a },
3979
4155
  meta: { auth: !1 }
3980
4156
  };
3981
4157
  }
3982
- function Kn(e = {}) {
4158
+ function tl(e = {}) {
3983
4159
  const {
3984
4160
  logo: s = "",
3985
4161
  homeRoute: t = "/dashboard"
@@ -3987,26 +4163,26 @@ function Kn(e = {}) {
3987
4163
  return {
3988
4164
  path: "/:pathMatch(.*)*",
3989
4165
  name: "error-404",
3990
- component: Qr,
4166
+ component: nn,
3991
4167
  props: { logo: s, homeRoute: t },
3992
4168
  meta: { auth: !1 }
3993
4169
  };
3994
4170
  }
3995
- function Gn(e, s) {
4171
+ function sl(e, s) {
3996
4172
  e.beforeResolve(async (t) => {
3997
4173
  if (t.meta.auth !== !1) {
3998
- const o = G();
3999
- o.state.ready && o.check && await s();
4174
+ const a = W();
4175
+ a.state.ready && a.check && await s();
4000
4176
  }
4001
4177
  });
4002
4178
  }
4003
- const Wn = ue("sparkNav", () => {
4004
- const e = U({
4179
+ const al = ue("sparkNav", () => {
4180
+ const e = K({
4005
4181
  menu: [],
4006
4182
  collapsed: !1,
4007
4183
  hidden: !1
4008
- }), s = W(), t = le(), o = (i = []) => {
4009
- e.menu = i, r();
4184
+ }), s = Y(), t = le(), a = (i = []) => {
4185
+ e.menu = i, n();
4010
4186
  }, l = (i, u) => {
4011
4187
  for (const d of i) {
4012
4188
  if (d.href === u) return d;
@@ -4016,7 +4192,7 @@ const Wn = ue("sparkNav", () => {
4016
4192
  }
4017
4193
  }
4018
4194
  return null;
4019
- }, n = async (i) => {
4195
+ }, r = async (i) => {
4020
4196
  if (i) {
4021
4197
  const u = l(e.menu, i);
4022
4198
  if (u && typeof u.action == "function") {
@@ -4025,11 +4201,11 @@ const Wn = ue("sparkNav", () => {
4025
4201
  }
4026
4202
  await s.push(i);
4027
4203
  }
4028
- }, a = () => {
4204
+ }, o = () => {
4029
4205
  e.collapsed = !e.collapsed;
4030
4206
  }, c = () => {
4031
4207
  e.hidden = !e.hidden;
4032
- }, r = () => {
4208
+ }, n = () => {
4033
4209
  const i = t.name || t.path.replace("/", "");
4034
4210
  if (i) {
4035
4211
  const u = (d) => {
@@ -4040,87 +4216,88 @@ const Wn = ue("sparkNav", () => {
4040
4216
  u(e.menu);
4041
4217
  }
4042
4218
  };
4043
- return I(
4219
+ return N(
4044
4220
  () => t.path,
4045
4221
  () => {
4046
- r();
4222
+ n();
4047
4223
  },
4048
4224
  { immediate: !0 }
4049
4225
  ), {
4050
4226
  state: e,
4051
- initialize: o,
4052
- goto: n,
4053
- toggleCollapsed: a,
4227
+ initialize: a,
4228
+ goto: r,
4229
+ toggleCollapsed: o,
4054
4230
  toggleHidden: c,
4055
- syncWithRoute: r
4231
+ syncWithRoute: n
4056
4232
  };
4057
4233
  });
4058
4234
  export {
4059
4235
  A as Icons,
4060
- oe as SparkAlert,
4061
- As as SparkAppSelector,
4062
- ao as SparkBrandSelector,
4063
- Y as SparkButton,
4064
- no as SparkButtonGroup,
4065
- Fn as SparkCard,
4066
- jn as SparkDefaultContainer,
4067
- Ur as SparkError403View,
4068
- Qr as SparkError404View,
4069
- Nn as SparkErrorGeneralView,
4070
- Mr as SparkForgotPasswordView,
4071
- br as SparkLoginView,
4072
- xr as SparkLogoutView,
4073
- yo as SparkModalContainer,
4074
- fo as SparkModalDialog,
4075
- En as SparkNotificationOutlet,
4076
- Te as SparkOverlay,
4077
- In as SparkPublicContainer,
4078
- Dr as SparkResetPasswordView,
4079
- On as SparkTable,
4080
- xa as SparkTableDatePicker,
4081
- ya as SparkTableFilterButtons,
4082
- fa as SparkTableFilterSelect,
4083
- aa as SparkTablePaginationPaging,
4084
- la as SparkTablePaginationPerPage,
4085
- Sa as SparkTableReset,
4086
- ua as SparkTableSearch,
4087
- Ve as SparkTableToolbar,
4088
- An as SparkToastContainer,
4089
- Vn as addIcons,
4090
- Un as create403Route,
4091
- Kn as create404Route,
4092
- Zn as createAuthRoutes,
4093
- Fa as createAxiosInstance,
4094
- Bn as createBootstrapService,
4095
- _o as customiseHeader,
4096
- Ra as deleteCookie,
4097
- Mn as formKitGenesisOverride,
4098
- Hn as formKitIconLoader,
4099
- Ln as formKitIcons,
4100
- zo as formatTemporal,
4101
- Oa as getAxiosInstance,
4102
- Ha as getCookie,
4236
+ ae as SparkAlert,
4237
+ Es as SparkAppSelector,
4238
+ oa as SparkBrandSelector,
4239
+ X as SparkButton,
4240
+ na as SparkButtonGroup,
4241
+ Nn as SparkCard,
4242
+ Wn as SparkDefaultContainer,
4243
+ Qr as SparkError403View,
4244
+ nn as SparkError404View,
4245
+ Xn as SparkErrorGeneralView,
4246
+ Or as SparkForgotPasswordView,
4247
+ Zn as SparkImageUpload,
4248
+ $r as SparkLoginView,
4249
+ Tr as SparkLogoutView,
4250
+ _a as SparkModalContainer,
4251
+ va as SparkModalDialog,
4252
+ zn as SparkNotificationOutlet,
4253
+ Le as SparkOverlay,
4254
+ Yn as SparkPublicContainer,
4255
+ Ur as SparkResetPasswordView,
4256
+ qn as SparkTable,
4257
+ To as SparkTableDatePicker,
4258
+ So as SparkTableFilterButtons,
4259
+ xo as SparkTableFilterSelect,
4260
+ uo as SparkTablePaginationPaging,
4261
+ mo as SparkTablePaginationPerPage,
4262
+ Vo as SparkTableReset,
4263
+ yo as SparkTableSearch,
4264
+ Re as SparkTableToolbar,
4265
+ In as SparkToastContainer,
4266
+ Bn as addIcons,
4267
+ el as create403Route,
4268
+ tl as create404Route,
4269
+ Jn as createAuthRoutes,
4270
+ No as createAxiosInstance,
4271
+ Un as createBootstrapService,
4272
+ Pa as customiseHeader,
4273
+ jo as deleteCookie,
4274
+ On as formKitGenesisOverride,
4275
+ Dn as formKitIconLoader,
4276
+ An as formKitIcons,
4277
+ Ua as formatTemporal,
4278
+ Zo as getAxiosInstance,
4279
+ Do as getCookie,
4103
4280
  ct as getDomain,
4104
4281
  Ae as getFormLevelMessage,
4105
- Da as isValidationError,
4106
- jo as parseDatetime,
4107
- Ba as parseLaravelErrors,
4108
- bo as renderHeaderTitle,
4109
- Va as setCookie,
4110
- qn as setupAuthGuards,
4111
- Dn as setupAxios,
4112
- Gn as setupBootstrapGuard,
4113
- Rn as setupFontAwesome,
4114
- ae as sparkModalService,
4115
- q as sparkNotificationService,
4282
+ Uo as isValidationError,
4283
+ Ka as parseDatetime,
4284
+ qo as parseLaravelErrors,
4285
+ Ca as renderHeaderTitle,
4286
+ Bo as setCookie,
4287
+ Qn as setupAuthGuards,
4288
+ Kn as setupAxios,
4289
+ sl as setupBootstrapGuard,
4290
+ jn as setupFontAwesome,
4291
+ oe as sparkModalService,
4292
+ j as sparkNotificationService,
4116
4293
  se as sparkOverlayService,
4117
- qo as updateRow,
4118
- zn as useFormSubmission,
4294
+ Xa as updateRow,
4295
+ Gn as useFormSubmission,
4119
4296
  rt as useSparkAppSelectorStore,
4120
4297
  nt as useSparkAppStore,
4121
- G as useSparkAuthStore,
4298
+ W as useSparkAuthStore,
4122
4299
  it as useSparkBrandFilterStore,
4123
- Wn as useSparkNavStore,
4300
+ al as useSparkNavStore,
4124
4301
  Ee as useSparkOverlay,
4125
- Uo as useSparkTableRouteSync
4302
+ Ja as useSparkTableRouteSync
4126
4303
  };