@wishbone-media/spark 0.15.2 → 0.16.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,12 +1,12 @@
1
- import { computed as k, resolveComponent as $, createElementBlock as g, openBlock as f, normalizeClass as _, createElementVNode as c, createVNode as b, unref as y, renderSlot as T, reactive as z, Fragment as M, renderList as B, createCommentVNode as x, toDisplayString as S, createBlock as V, resolveDynamicComponent as W, ref as L, inject as ge, provide as Ve, markRaw as he, withCtx as w, mergeProps as Y, toHandlers as ye, createTextVNode as P, withModifiers as j, useSlots as be, watch as E, onMounted as ve, h as le } from "vue";
1
+ import { computed as k, resolveComponent as L, createElementBlock as g, openBlock as f, normalizeClass as _, createElementVNode as c, createVNode as v, unref as y, renderSlot as T, reactive as z, Fragment as B, renderList as A, createCommentVNode as x, toDisplayString as S, createBlock as V, resolveDynamicComponent as W, ref as $, inject as ge, provide as Ve, markRaw as he, withCtx as w, mergeProps as Y, toHandlers as ye, createTextVNode as P, withModifiers as j, useSlots as ve, watch as E, onMounted as be, h as le } from "vue";
2
2
  import { library as xe, icon as ee } from "@fortawesome/fontawesome-svg-core";
3
3
  import { FontAwesomeIcon as Pe } from "@fortawesome/vue-fontawesome";
4
- import { faUndo as Re, faEye as Me, faSignOut as Fe, faXmark as Ae, faTrash as Be, faTimes as Ee, faStreetView as ze, faSortUp as je, faSortDown as Oe, faSort as Ie, faScaleBalanced as Ne, faSatelliteDish as De, faLayerPlus as Ze, faLaptopMobile as qe, faInfoCircle as Ge, faGripDotsVertical as Ke, faGearComplex as Ue, faFlag as We, faFaceSmileWink as Ye, faFaceSmileRelaxed as Xe, faExclamationTriangle as Je, faEllipsisVertical as Qe, faEllipsis as et, faEdit as tt, faComments as st, faCircleXmark as at, faCircleUser as ot, faChevronUp as rt, faChevronRight as nt, faChevronLeft as lt, faChevronDown as it, faCheckCircle as ct, faCheck as dt, faBullhorn as ut, faBellRing as pt, faBarsSort as ft, faArrowRightToLine as mt, faArrowLeftToLine as gt } from "@fortawesome/pro-regular-svg-icons";
4
+ import { faUndo as Re, faEye as Be, faSignOut as Me, faXmark as Fe, faTrash as Ae, faTimes as Ee, faStreetView as ze, faSortUp as je, faSortDown as Ie, faSort as Oe, faScaleBalanced as Ne, faSatelliteDish as De, faLayerPlus as Ze, faLaptopMobile as qe, faInfoCircle as Ge, faGripDotsVertical as Ke, faGearComplex as Ue, faFlag as We, faFaceSmileWink as Ye, faFaceSmileRelaxed as Xe, faExclamationTriangle as Je, faEllipsisVertical as Qe, faEllipsis as et, faEdit as tt, faComments as st, faCircleXmark as at, faCircleUser as ot, faChevronUp as rt, faChevronRight as nt, faChevronLeft as lt, faChevronDown as it, faCheckCircle as ct, faCheck as dt, faBullhorn as ut, faBellRing as pt, faBarsSort as ft, faArrowRightToLine as mt, faArrowLeftToLine as gt } from "@fortawesome/pro-regular-svg-icons";
5
5
  import { defineStore as X } from "pinia";
6
6
  import { TransitionRoot as ke, Dialog as _e, TransitionChild as te, DialogPanel as we } from "@headlessui/vue";
7
7
  import ae from "nprogress";
8
- import { range as ht, get as q, find as yt, has as bt } from "lodash";
9
- import { HotTable as vt } from "@handsontable/vue3";
8
+ import { range as ht, get as q, find as yt, has as vt } from "lodash";
9
+ import { HotTable as bt } from "@handsontable/vue3";
10
10
  import "handsontable/styles/handsontable.css";
11
11
  import "handsontable/styles/ht-theme-classic.css";
12
12
  import { registerPlugin as Q, AutoColumnSize as xt, CopyPaste as kt, StretchColumns as _t, NestedHeaders as wt } from "handsontable/plugins";
@@ -14,7 +14,20 @@ import { registerAllCellTypes as Ct } from "handsontable/cellTypes";
14
14
  import { useDebounceFn as Ce, watchDebounced as ie } from "@vueuse/core";
15
15
  import { registerRenderer as St, baseRenderer as $t } from "handsontable/renderers";
16
16
  import K from "axios";
17
- import { useRouter as O, useRoute as se } from "vue-router";
17
+ import { useRouter as I, useRoute as se } from "vue-router";
18
+ var Lt = {
19
+ prefix: "fad",
20
+ iconName: "sort-up",
21
+ icon: [384, 512, ["sort-asc"], "f0de", ["", "M32 224c-12.9 0-24.6-7.8-29.6-19.8S.2 178.5 9.4 169.4l160-160c12.5-12.5 32.8-12.5 45.3 0l160 160c9.2 9.2 11.9 22.9 6.9 34.9S364.9 224 352 224L32 224z"]]
22
+ }, Ht = {
23
+ prefix: "fad",
24
+ iconName: "sort",
25
+ icon: [384, 512, ["unsorted"], "f0dc", ["M2.4 307.8c-5 12-2.2 25.7 6.9 34.9l160 160c12.5 12.5 32.8 12.5 45.3 0l160-160c9.2-9.2 11.9-22.9 6.9-34.9S364.9 288 352 288L32 288c-12.9 0-24.6 7.8-29.6 19.8z", "M32 224c-12.9 0-24.6-7.8-29.6-19.8S.2 178.5 9.4 169.4l160-160c12.5-12.5 32.8-12.5 45.3 0l160 160c9.2 9.2 11.9 22.9 6.9 34.9S364.9 224 352 224L32 224z"]]
26
+ }, Tt = {
27
+ prefix: "fad",
28
+ iconName: "sort-down",
29
+ icon: [384, 512, ["sort-desc"], "f0dd", ["", "M32 288c-12.9 0-24.6 7.8-29.6 19.8S.2 333.5 9.4 342.6l160 160c12.5 12.5 32.8 12.5 45.3 0l160-160c9.2-9.2 11.9-22.9 6.9-34.9S364.9 288 352 288L32 288z"]]
30
+ };
18
31
  const H = {
19
32
  farArrowLeftToLine: gt,
20
33
  farArrowRightToLine: mt,
@@ -44,24 +57,27 @@ const H = {
44
57
  farLayerPlus: Ze,
45
58
  farSatelliteDish: De,
46
59
  farScaleBalanced: Ne,
47
- farSort: Ie,
48
- farSortDown: Oe,
60
+ farSort: Oe,
61
+ farSortDown: Ie,
49
62
  farSortUp: je,
50
63
  farStreetView: ze,
51
64
  farTimes: Ee,
52
- farTrash: Be,
53
- farXmark: Ae,
54
- farSignOut: Fe,
55
- farEye: Me,
56
- farUndo: Re
65
+ farTrash: Ae,
66
+ farXmark: Fe,
67
+ farSignOut: Me,
68
+ farEye: Be,
69
+ farUndo: Re,
70
+ fadSort: Ht,
71
+ fadSortDown: Tt,
72
+ fadSortUp: Lt
57
73
  };
58
- function pr(e) {
74
+ function hr(e) {
59
75
  Object.assign(H, e), xe.add(...Object.values(e));
60
76
  }
61
- function fr(e) {
77
+ function yr(e) {
62
78
  xe.add(...Object.values(H)), e.component("FontAwesomeIcon", Pe);
63
79
  }
64
- const Lt = { class: "flex items-center" }, Ht = { class: "shrink-0 self-start" }, Tt = { class: "ml-3" }, Vt = { class: "ml-auto pl-3 pt-1 self-start" }, Pt = { class: "-mx-1.5 -my-1.5" }, mr = {
80
+ const Vt = { class: "flex items-center" }, Pt = { class: "shrink-0 self-start" }, Rt = { class: "ml-3" }, Bt = { class: "ml-auto pl-3 pt-1 self-start" }, Mt = { class: "-mx-1.5 -my-1.5" }, vr = {
65
81
  __name: "SparkAlert",
66
82
  props: {
67
83
  type: {
@@ -87,35 +103,35 @@ const Lt = { class: "flex items-center" }, Ht = { class: "shrink-0 self-start" }
87
103
  warning: "farExclamationTriangle",
88
104
  danger: "farCircleXmark",
89
105
  info: "farInfoCircle"
90
- })[s.type]), o = k(() => ({
106
+ })[s.type]), r = k(() => ({
91
107
  success: "text-green-400 hover:bg-green-100",
92
108
  warning: "text-yellow-400 hover:bg-yellow-100",
93
109
  danger: "text-red-400 hover:bg-red-100",
94
110
  info: "text-blue-400 hover:bg-blue-100"
95
111
  })[s.type]);
96
- return (n, i) => {
97
- const r = $("font-awesome-icon");
112
+ return (o, i) => {
113
+ const n = L("font-awesome-icon");
98
114
  return f(), g("div", {
99
115
  class: _(["rounded-md border p-4", t.value])
100
116
  }, [
101
- c("div", Lt, [
102
- c("div", Ht, [
103
- b(r, {
117
+ c("div", Vt, [
118
+ c("div", Pt, [
119
+ v(n, {
104
120
  icon: y(H)[l.value],
105
121
  class: _(a.value)
106
122
  }, null, 8, ["icon", "class"])
107
123
  ]),
108
- c("div", Tt, [
109
- T(n.$slots, "default")
124
+ c("div", Rt, [
125
+ T(o.$slots, "default")
110
126
  ]),
111
- c("div", Vt, [
112
- c("div", Pt, [
127
+ c("div", Bt, [
128
+ c("div", Mt, [
113
129
  c("button", {
114
130
  type: "button",
115
- class: _(["inline-flex rounded-md px-2 py-1.5", o.value]),
116
- onClick: i[0] || (i[0] = (d) => n.$emit("close"))
131
+ class: _(["inline-flex rounded-md px-2 py-1.5", r.value]),
132
+ onClick: i[0] || (i[0] = (d) => o.$emit("close"))
117
133
  }, [
118
- b(r, {
134
+ v(n, {
119
135
  icon: y(H).farXmark
120
136
  }, null, 8, ["icon"])
121
137
  ], 2)
@@ -171,13 +187,13 @@ const Lt = { class: "flex items-center" }, Ht = { class: "shrink-0 self-start" }
171
187
  ], Se = X("sparkAppSelector", () => {
172
188
  const e = z({
173
189
  apps: [...oe]
174
- }), s = (o = {}) => {
175
- if (o.apps && Array.isArray(o.apps)) {
176
- const n = o.apps.filter((i) => {
177
- const r = i.name && i.description && i.icon && i.href;
178
- return r || console.warn("useSparkAppSelectorStore: Invalid app object", i), r;
190
+ }), s = (r = {}) => {
191
+ if (r.apps && Array.isArray(r.apps)) {
192
+ const o = r.apps.filter((i) => {
193
+ const n = i.name && i.description && i.icon && i.href;
194
+ return n || console.warn("useSparkAppSelectorStore: Invalid app object", i), n;
179
195
  });
180
- e.apps = n.map((i) => ({
196
+ e.apps = o.map((i) => ({
181
197
  name: i.name,
182
198
  description: i.description,
183
199
  icon: i.icon,
@@ -185,33 +201,33 @@ const Lt = { class: "flex items-center" }, Ht = { class: "shrink-0 self-start" }
185
201
  }));
186
202
  return;
187
203
  }
188
- if (o.appHrefs && typeof o.appHrefs == "object") {
189
- const n = /* @__PURE__ */ new Map();
190
- Object.keys(o.appHrefs).forEach((i) => {
191
- n.set(i.toLowerCase(), o.appHrefs[i]);
204
+ if (r.appHrefs && typeof r.appHrefs == "object") {
205
+ const o = /* @__PURE__ */ new Map();
206
+ Object.keys(r.appHrefs).forEach((i) => {
207
+ o.set(i.toLowerCase(), r.appHrefs[i]);
192
208
  }), e.apps = oe.map((i) => {
193
- const r = n.get(i.name.toLowerCase());
209
+ const n = o.get(i.name.toLowerCase());
194
210
  return {
195
211
  ...i,
196
- href: r || i.href
212
+ href: n || i.href
197
213
  };
198
214
  });
199
215
  return;
200
216
  }
201
217
  e.apps = [...oe];
202
- }, t = k(() => e.apps), a = (o) => {
203
- if (!o) return null;
204
- const n = o.toLowerCase();
205
- return e.apps.find((i) => i.name.toLowerCase() === n) || null;
218
+ }, t = k(() => e.apps), a = (r) => {
219
+ if (!r) return null;
220
+ const o = r.toLowerCase();
221
+ return e.apps.find((i) => i.name.toLowerCase() === o) || null;
206
222
  };
207
223
  return {
208
224
  state: e,
209
225
  initialize: s,
210
226
  allApps: t,
211
227
  getAppByName: a,
212
- getAppIcon: (o) => {
213
- const n = a(o);
214
- return n ? n.icon : "";
228
+ getAppIcon: (r) => {
229
+ const o = a(r);
230
+ return o ? o.icon : "";
215
231
  }
216
232
  };
217
233
  }), $e = X("sparkApp", () => {
@@ -227,16 +243,16 @@ const Lt = { class: "flex items-center" }, Ht = { class: "shrink-0 self-start" }
227
243
  e.app = t.app || "", e.homeRoute = t.homeRoute ?? "dashboard", e.showBrandSelector = t.showBrandSelector ?? !0, e.showAppSelector = t.showAppSelector ?? !0;
228
244
  }
229
245
  };
230
- }), Rt = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, Mt = { class: "flex flex-1 flex-col" }, Ft = { class: "divide-y divide-gray-200" }, At = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, Bt = { class: "ml-auto flex items-center" }, Et = ["href", "onClick"], zt = { class: "gap-y-1" }, jt = { class: "text-base text-gray-800 flex items-center" }, Ot = { class: "font-medium" }, It = {
246
+ }), Ft = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, At = { class: "flex flex-1 flex-col" }, Et = { class: "divide-y divide-gray-200" }, zt = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, jt = { class: "ml-auto flex items-center" }, It = ["href", "onClick"], Ot = { class: "gap-y-1" }, Nt = { class: "text-base text-gray-800 flex items-center" }, Dt = { class: "font-medium" }, Zt = {
231
247
  key: 0,
232
248
  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"
233
- }, Nt = { class: "text-sm text-gray-500" }, Dt = { class: "ml-auto flex items-center" }, Zt = { class: "mt-auto" }, qt = {
249
+ }, qt = { class: "text-sm text-gray-500" }, Gt = { class: "ml-auto flex items-center" }, Kt = { class: "mt-auto" }, Ut = {
234
250
  key: 0,
235
251
  class: "p-6"
236
- }, Gt = {
252
+ }, Wt = {
237
253
  key: 1,
238
254
  class: "bg-gray-50 p-6"
239
- }, Kt = {
255
+ }, Yt = {
240
256
  __name: "SparkAppSelector",
241
257
  props: {
242
258
  bottomSlot: {
@@ -250,60 +266,60 @@ const Lt = { class: "flex items-center" }, Ht = { class: "shrink-0 self-start" }
250
266
  },
251
267
  emits: ["close", "select"],
252
268
  setup(e, { emit: s }) {
253
- const t = s, a = Se(), l = $e(), o = k(() => {
269
+ const t = s, a = Se(), l = $e(), r = k(() => {
254
270
  const i = l.state.app;
255
- return a.state.apps.map((r) => ({
256
- ...r,
257
- current: i && r.name.toLowerCase() === i.toLowerCase()
271
+ return a.state.apps.map((n) => ({
272
+ ...n,
273
+ current: i && n.name.toLowerCase() === i.toLowerCase()
258
274
  }));
259
- }), n = (i, r) => {
275
+ }), o = (i, n) => {
260
276
  t("select", i);
261
277
  };
262
- return (i, r) => {
263
- const d = $("font-awesome-icon");
264
- return f(), g("div", Rt, [
265
- c("div", Mt, [
266
- c("div", Ft, [
267
- c("div", At, [
268
- r[1] || (r[1] = c("div", null, "Mr Group Network", -1)),
269
- c("div", Bt, [
270
- b(d, {
278
+ return (i, n) => {
279
+ const d = L("font-awesome-icon");
280
+ return f(), g("div", Ft, [
281
+ c("div", At, [
282
+ c("div", Et, [
283
+ c("div", zt, [
284
+ n[1] || (n[1] = c("div", null, "Mr Group Network", -1)),
285
+ c("div", jt, [
286
+ v(d, {
271
287
  icon: y(H).farTimes,
272
288
  class: "h-[15px] w-[15px] shrink-0 text-gray-400 cursor-pointer",
273
- onClick: r[0] || (r[0] = (m) => t("close"))
289
+ onClick: n[0] || (n[0] = (m) => t("close"))
274
290
  }, null, 8, ["icon"])
275
291
  ])
276
292
  ]),
277
- (f(!0), g(M, null, B(o.value, (m) => (f(), g("a", {
293
+ (f(!0), g(B, null, A(r.value, (m) => (f(), g("a", {
278
294
  key: m.name,
279
295
  href: m.href,
280
296
  target: "_blank",
281
297
  class: _([m.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
282
- onClick: (u) => m.current ? u.preventDefault() : n(m)
298
+ onClick: (u) => m.current ? u.preventDefault() : o(m)
283
299
  }, [
284
- c("div", zt, [
285
- c("div", jt, [
286
- c("div", Ot, S(m.name), 1),
287
- m.current ? (f(), g("span", It, " Active ")) : x("", !0)
300
+ c("div", Ot, [
301
+ c("div", Nt, [
302
+ c("div", Dt, S(m.name), 1),
303
+ m.current ? (f(), g("span", Zt, " Active ")) : x("", !0)
288
304
  ]),
289
- c("div", Nt, S(m.description), 1)
305
+ c("div", qt, S(m.description), 1)
290
306
  ]),
291
- c("div", Dt, [
292
- b(d, {
307
+ c("div", Gt, [
308
+ v(d, {
293
309
  class: _([m.current ? "text-gray-700" : "text-gray-400", "h-5 w-5 shrink-0"]),
294
310
  icon: y(H)[m.icon]
295
311
  }, null, 8, ["class", "icon"])
296
312
  ])
297
- ], 10, Et))), 128)),
298
- r[2] || (r[2] = c("div", null, null, -1))
313
+ ], 10, It))), 128)),
314
+ n[2] || (n[2] = c("div", null, null, -1))
299
315
  ]),
300
- c("div", Zt, [
301
- i.$slots.bottom || e.bottomSlot ? (f(), g("div", qt, [
316
+ c("div", Kt, [
317
+ i.$slots.bottom || e.bottomSlot ? (f(), g("div", Ut, [
302
318
  T(i.$slots, "bottom", {}, () => [
303
319
  e.bottomSlot ? (f(), V(W(e.bottomSlot), { key: 0 })) : x("", !0)
304
320
  ])
305
321
  ])) : x("", !0),
306
- i.$slots.footer || e.footerSlot ? (f(), g("div", Gt, [
322
+ i.$slots.footer || e.footerSlot ? (f(), g("div", Wt, [
307
323
  T(i.$slots, "footer", {}, () => [
308
324
  e.footerSlot ? (f(), V(W(e.footerSlot), { key: 0 })) : x("", !0)
309
325
  ])
@@ -318,36 +334,36 @@ const Lt = { class: "flex items-center" }, Ht = { class: "shrink-0 self-start" }
318
334
  () => {
319
335
  const e = z({
320
336
  brands: []
321
- }), s = (o = {}) => {
322
- if (!o.brands || !Array.isArray(o.brands)) {
337
+ }), s = (r = {}) => {
338
+ if (!r.brands || !Array.isArray(r.brands)) {
323
339
  console.warn("useSparkBrandFilterStore: No brands provided to initialize()"), e.brands = [];
324
340
  return;
325
341
  }
326
- const n = o.brands.filter((r) => {
327
- const d = r.id && r.name && r.logo;
328
- return d || console.warn("useSparkBrandFilterStore: Invalid brand object", r), d;
329
- }), i = n.filter((r) => r.current);
330
- i.length === 0 && n.length > 0 ? n[0].current = !0 : i.length > 1 && n.forEach((r) => {
331
- r.current = r === i[0];
332
- }), e.brands = n.map((r) => ({
333
- id: r.id,
334
- name: r.name,
335
- logo: r.logo,
336
- current: r.current || !1
342
+ const o = r.brands.filter((n) => {
343
+ const d = n.id && n.name && n.logo;
344
+ return d || console.warn("useSparkBrandFilterStore: Invalid brand object", n), d;
345
+ }), i = o.filter((n) => n.current);
346
+ i.length === 0 && o.length > 0 ? o[0].current = !0 : i.length > 1 && o.forEach((n) => {
347
+ n.current = n === i[0];
348
+ }), e.brands = o.map((n) => ({
349
+ id: n.id,
350
+ name: n.name,
351
+ logo: n.logo,
352
+ current: n.current || !1
337
353
  }));
338
- }, t = k(() => e.brands.find((o) => o.current) || null), a = k(() => e.brands);
354
+ }, t = k(() => e.brands.find((r) => r.current) || null), a = k(() => e.brands);
339
355
  return {
340
356
  state: e,
341
357
  initialize: s,
342
358
  currentBrand: t,
343
359
  allBrands: a,
344
- toggleBrand: (o) => {
345
- if (!o || !e.brands.includes(o)) {
360
+ toggleBrand: (r) => {
361
+ if (!r || !e.brands.includes(r)) {
346
362
  console.warn("useSparkBrandFilterStore: Invalid brand provided to toggleBrand()");
347
363
  return;
348
364
  }
349
- e.brands.forEach((n) => {
350
- n.current = n === o;
365
+ e.brands.forEach((o) => {
366
+ o.current = o === r;
351
367
  });
352
368
  }
353
369
  };
@@ -357,65 +373,65 @@ const Lt = { class: "flex items-center" }, Ht = { class: "shrink-0 self-start" }
357
373
  paths: ["state.brands"]
358
374
  }
359
375
  }
360
- ), Ut = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, Wt = { class: "flex flex-1 flex-col" }, Yt = { class: "divide-y divide-gray-200" }, Xt = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, Jt = { class: "ml-auto flex items-center" }, Qt = {
376
+ ), Xt = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, Jt = { class: "flex flex-1 flex-col" }, Qt = { class: "divide-y divide-gray-200" }, es = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, ts = { class: "ml-auto flex items-center" }, ss = {
361
377
  key: 0,
362
378
  class: "flex px-[22px] py-[15px] text-gray-500 text-sm"
363
- }, es = ["onClick"], ts = { class: "gap-y-1 flex" }, ss = { class: "flex items-center mr-4" }, as = ["src", "alt"], os = { class: "ml-auto flex flex-col" }, rs = { class: "text-base text-gray-800 flex items-center" }, ns = { class: "font-medium" }, ls = {
379
+ }, as = ["onClick"], os = { class: "gap-y-1 flex" }, rs = { class: "flex items-center mr-4" }, ns = ["src", "alt"], ls = { class: "ml-auto flex flex-col" }, is = { class: "text-base text-gray-800 flex items-center" }, cs = { class: "font-medium" }, ds = {
364
380
  key: 0,
365
381
  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"
366
- }, is = { class: "text-sm text-gray-500" }, cs = {
382
+ }, us = { class: "text-sm text-gray-500" }, ps = {
367
383
  __name: "SparkBrandSelector",
368
384
  emits: ["close", "select"],
369
385
  setup(e, { emit: s }) {
370
- const t = s, a = Le(), l = (o) => {
371
- t("select", o);
386
+ const t = s, a = Le(), l = (r) => {
387
+ t("select", r);
372
388
  };
373
- return (o, n) => {
374
- const i = $("font-awesome-icon");
375
- return f(), g("div", Ut, [
376
- c("div", Wt, [
377
- c("div", Yt, [
378
- c("div", Xt, [
379
- n[1] || (n[1] = c("div", null, "Filter by Brand", -1)),
380
- c("div", Jt, [
381
- b(i, {
389
+ return (r, o) => {
390
+ const i = L("font-awesome-icon");
391
+ return f(), g("div", Xt, [
392
+ c("div", Jt, [
393
+ c("div", Qt, [
394
+ c("div", es, [
395
+ o[1] || (o[1] = c("div", null, "Filter by Brand", -1)),
396
+ c("div", ts, [
397
+ v(i, {
382
398
  icon: y(H).farTimes,
383
399
  class: "size-4 text-gray-400 cursor-pointer",
384
- onClick: n[0] || (n[0] = (r) => t("close"))
400
+ onClick: o[0] || (o[0] = (n) => t("close"))
385
401
  }, null, 8, ["icon"])
386
402
  ])
387
403
  ]),
388
- y(a).allBrands.length === 0 ? (f(), g("div", Qt, " No brands configured ")) : x("", !0),
389
- (f(!0), g(M, null, B(y(a).allBrands, (r) => (f(), g("div", {
390
- key: r.id,
391
- class: _([r.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
392
- onClick: (d) => l(r)
404
+ y(a).allBrands.length === 0 ? (f(), g("div", ss, " No brands configured ")) : x("", !0),
405
+ (f(!0), g(B, null, A(y(a).allBrands, (n) => (f(), g("div", {
406
+ key: n.id,
407
+ class: _([n.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
408
+ onClick: (d) => l(n)
393
409
  }, [
394
- c("div", ts, [
395
- c("div", ss, [
410
+ c("div", os, [
411
+ c("div", rs, [
396
412
  c("img", {
397
- src: r.logo,
398
- alt: `${r.name} logo`,
413
+ src: n.logo,
414
+ alt: `${n.name} logo`,
399
415
  class: "h-8 w-auto"
400
- }, null, 8, as)
416
+ }, null, 8, ns)
401
417
  ]),
402
- c("div", os, [
403
- c("div", rs, [
404
- c("div", ns, S(r.name), 1),
405
- r.current ? (f(), g("span", ls, " Current ")) : x("", !0)
418
+ c("div", ls, [
419
+ c("div", is, [
420
+ c("div", cs, S(n.name), 1),
421
+ n.current ? (f(), g("span", ds, " Current ")) : x("", !0)
406
422
  ]),
407
- c("div", is, S(r.current ? "Current Brand" : "Change to"), 1)
423
+ c("div", us, S(n.current ? "Current Brand" : "Change to"), 1)
408
424
  ])
409
425
  ])
410
- ], 10, es))), 128)),
411
- n[2] || (n[2] = c("div", null, null, -1))
426
+ ], 10, as))), 128)),
427
+ o[2] || (o[2] = c("div", null, null, -1))
412
428
  ]),
413
- n[3] || (n[3] = c("div", { class: "mt-auto" }, null, -1))
429
+ o[3] || (o[3] = c("div", { class: "mt-auto" }, null, -1))
414
430
  ])
415
431
  ]);
416
432
  };
417
433
  }
418
- }, ds = ["disabled"], A = {
434
+ }, fs = ["disabled"], F = {
419
435
  __name: "SparkButton",
420
436
  props: {
421
437
  size: {
@@ -437,16 +453,16 @@ const Lt = { class: "flex items-center" }, Ht = { class: "shrink-0 self-start" }
437
453
  }
438
454
  },
439
455
  setup(e) {
440
- const s = e, t = L(null), a = ge("buttonGroup", null), l = k(() => {
456
+ const s = e, t = $(null), a = ge("buttonGroup", null), l = k(() => {
441
457
  if (!a?.isInGroup || !t.value) return null;
442
- const r = a.getButtonIndex(t.value), d = a.getButtonCount();
458
+ const n = a.getButtonIndex(t.value), d = a.getButtonCount();
443
459
  return {
444
- isFirst: r === 0,
445
- isLast: r === d - 1,
446
- index: r,
460
+ isFirst: n === 0,
461
+ isLast: n === d - 1,
462
+ index: n,
447
463
  total: d
448
464
  };
449
- }), o = {
465
+ }), r = {
450
466
  paddingX: /^px-/,
451
467
  paddingY: /^py-/,
452
468
  paddingAll: /^p-/,
@@ -456,85 +472,85 @@ const Lt = { class: "flex items-center" }, Ht = { class: "shrink-0 self-start" }
456
472
  borderRadius: /^rounded-/,
457
473
  background: /^bg-/,
458
474
  text: /^text-(?!white|black)/
459
- }, n = (r, d) => {
460
- if (!d) return r;
461
- const m = r.split(" ").filter(Boolean), u = d.split(" ").filter(Boolean);
462
- return [...m.filter((h) => !u.some((v) => {
463
- const N = Object.entries(o).find(
475
+ }, o = (n, d) => {
476
+ if (!d) return n;
477
+ const m = n.split(" ").filter(Boolean), u = d.split(" ").filter(Boolean);
478
+ return [...m.filter((h) => !u.some((b) => {
479
+ const N = Object.entries(r).find(
464
480
  ([R, J]) => J.test(h)
465
- )?.[0], C = Object.entries(o).find(
466
- ([R, J]) => J.test(v)
481
+ )?.[0], C = Object.entries(r).find(
482
+ ([R, J]) => J.test(b)
467
483
  )?.[0];
468
484
  return N && N === C;
469
485
  })), ...u].join(" ");
470
486
  }, i = k(() => {
471
- let r = "", d = "";
487
+ let n = "", d = "";
472
488
  switch (s.size) {
473
489
  case "xs":
474
- r += " px-2 py-1 text-xs", d = "sm";
490
+ n += " px-2 py-1 text-xs", d = "sm";
475
491
  break;
476
492
  case "sm":
477
- r += " px-2 py-1 text-sm", d = "sm";
493
+ n += " px-2 py-1 text-sm", d = "sm";
478
494
  break;
479
495
  case "md":
480
- r += " px-2.5 py-1.5 text-sm", d = "md";
496
+ n += " px-2.5 py-1.5 text-sm", d = "md";
481
497
  break;
482
498
  case "lg":
483
- r += " px-3 py-2 text-sm", d = "md";
499
+ n += " px-3 py-2 text-sm", d = "md";
484
500
  break;
485
501
  case "xl":
486
- r += " px-3.5 py-2.5 min-h-[42px] text-sm", d = "md";
502
+ n += " px-3.5 py-2.5 min-h-[42px] text-sm", d = "md";
487
503
  break;
488
504
  }
489
505
  if (a?.isInGroup && l.value) {
490
506
  const { isFirst: m, isLast: u } = l.value;
491
- r += " relative inline-flex items-center focus:z-10", m && u ? r += ` rounded-${d}` : m ? r += ` rounded-l-${d} rounded-r-none` : u ? r += ` rounded-r-${d} rounded-l-none -ml-px` : r += " rounded-none -ml-px";
507
+ n += " relative inline-flex items-center focus:z-10", m && u ? n += ` rounded-${d}` : m ? n += ` rounded-l-${d} rounded-r-none` : u ? n += ` rounded-r-${d} rounded-l-none -ml-px` : n += " rounded-none -ml-px";
492
508
  } else
493
- r += ` shadow-xs rounded-${d}`;
509
+ n += ` shadow-xs rounded-${d}`;
494
510
  switch (s.variant) {
495
511
  case "primary":
496
- r += " bg-primary-600 hover:bg-primary-500 text-white";
512
+ n += " bg-primary-600 hover:bg-primary-500 text-white";
497
513
  break;
498
514
  case "secondary":
499
- r += " ring-1 ring-gray-300 ring-inset bg-white hover:bg-gray-50 text-gray-900";
515
+ n += " ring-1 ring-gray-300 ring-inset bg-white hover:bg-gray-50 text-gray-900";
500
516
  break;
501
517
  case "success":
502
- r += " bg-green-600 hover:bg-green-500 text-white";
518
+ n += " bg-green-600 hover:bg-green-500 text-white";
503
519
  break;
504
520
  case "warning":
505
- r += " bg-amber-600 hover:bg-amber-500 text-white";
521
+ n += " bg-amber-600 hover:bg-amber-500 text-white";
506
522
  break;
507
523
  case "danger":
508
- r += " bg-red-600 hover:bg-red-500 text-white";
524
+ n += " bg-red-600 hover:bg-red-500 text-white";
509
525
  break;
510
526
  case "info":
511
- r += " bg-cyan-600 hover:bg-cyan-500 text-white";
527
+ n += " bg-cyan-600 hover:bg-cyan-500 text-white";
512
528
  break;
513
529
  default:
514
- r += ` bg-${s.variant}-600 hover:bg-${s.variant}-500 text-white`;
530
+ n += ` bg-${s.variant}-600 hover:bg-${s.variant}-500 text-white`;
515
531
  }
516
- return r = n(r, s.buttonClass), r;
532
+ return n = o(n, s.buttonClass), n;
517
533
  });
518
- return (r, d) => (f(), g("button", {
534
+ return (n, d) => (f(), g("button", {
519
535
  type: "button",
520
536
  ref_key: "buttonRef",
521
537
  ref: t,
522
538
  class: _(i.value),
523
539
  disabled: e.disabled,
524
- onClick: d[0] || (d[0] = (m) => r.$emit("click"))
540
+ onClick: d[0] || (d[0] = (m) => n.$emit("click"))
525
541
  }, [
526
- T(r.$slots, "default")
527
- ], 10, ds));
542
+ T(n.$slots, "default")
543
+ ], 10, fs));
528
544
  }
529
- }, us = {
545
+ }, ms = {
530
546
  __name: "SparkButtonGroup",
531
547
  setup(e) {
532
- const s = L(null);
548
+ const s = $(null);
533
549
  return Ve("buttonGroup", {
534
550
  isInGroup: !0,
535
551
  getButtonIndex: (l) => s.value ? Array.from(s.value.children).indexOf(l) : -1,
536
552
  getButtonCount: () => s.value?.children.length || 0
537
- }), (l, o) => (f(), g("div", {
553
+ }), (l, r) => (f(), g("div", {
538
554
  class: "inline-flex rounded-md shadow-xs",
539
555
  ref_key: "groupRef",
540
556
  ref: s
@@ -542,13 +558,13 @@ const Lt = { class: "flex items-center" }, Ht = { class: "shrink-0 self-start" }
542
558
  T(l.$slots, "default")
543
559
  ], 512));
544
560
  }
545
- }, ps = { class: "divide-y divide-gray-300 rounded-lg border border-gray-300 text-gray-700 bg-gray-100" }, fs = {
561
+ }, gs = { class: "divide-y divide-gray-300 rounded-lg border border-gray-300 text-gray-700 bg-gray-100" }, hs = {
546
562
  key: 0,
547
563
  class: "p-5"
548
- }, ms = {
564
+ }, ys = {
549
565
  key: 1,
550
566
  class: "p-5"
551
- }, gr = {
567
+ }, br = {
552
568
  __name: "SparkCard",
553
569
  props: {
554
570
  padded: {
@@ -562,8 +578,8 @@ const Lt = { class: "flex items-center" }, Ht = { class: "shrink-0 self-start" }
562
578
  },
563
579
  setup(e) {
564
580
  const s = e;
565
- return (t, a) => (f(), g("div", ps, [
566
- t.$slots.header ? (f(), g("div", fs, [
581
+ return (t, a) => (f(), g("div", gs, [
582
+ t.$slots.header ? (f(), g("div", hs, [
567
583
  T(t.$slots, "header")
568
584
  ])) : x("", !0),
569
585
  c("div", {
@@ -571,13 +587,13 @@ const Lt = { class: "flex items-center" }, Ht = { class: "shrink-0 self-start" }
571
587
  }, [
572
588
  T(t.$slots, "default")
573
589
  ], 2),
574
- t.$slots.footer ? (f(), g("div", ms, [
590
+ t.$slots.footer ? (f(), g("div", ys, [
575
591
  T(t.$slots, "footer")
576
592
  ])) : x("", !0)
577
593
  ]));
578
594
  }
579
595
  };
580
- class gs {
596
+ class vs {
581
597
  constructor() {
582
598
  this.state = z({
583
599
  isVisible: !1,
@@ -593,7 +609,7 @@ class gs {
593
609
  this.state.isVisible = !1, this.state.eventHandlers = {};
594
610
  };
595
611
  }
596
- const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto" }, ys = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, bs = {
612
+ const U = new vs(), bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto" }, xs = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, ks = {
597
613
  __name: "SparkModalContainer",
598
614
  setup(e) {
599
615
  return (s, t) => (f(), V(y(ke), {
@@ -601,12 +617,12 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
601
617
  show: y(U).state.isVisible
602
618
  }, {
603
619
  default: w(() => [
604
- b(y(_e), {
620
+ v(y(_e), {
605
621
  class: "relative z-200",
606
622
  onClose: y(U).hide
607
623
  }, {
608
624
  default: w(() => [
609
- b(y(te), {
625
+ v(y(te), {
610
626
  as: "template",
611
627
  enter: "ease-out duration-300",
612
628
  "enter-from": "opacity-0",
@@ -620,9 +636,9 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
620
636
  ])]),
621
637
  _: 1
622
638
  }),
623
- c("div", hs, [
624
- c("div", ys, [
625
- b(y(te), {
639
+ c("div", bs, [
640
+ c("div", xs, [
641
+ v(y(te), {
626
642
  as: "template",
627
643
  enter: "ease-out duration-300",
628
644
  "enter-from": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
@@ -632,7 +648,7 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
632
648
  "leave-to": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
633
649
  }, {
634
650
  default: w(() => [
635
- b(y(we), { 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" }, {
651
+ v(y(we), { 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" }, {
636
652
  default: w(() => [
637
653
  (f(), V(W(y(U).state.content), Y(y(U).state.props, ye(y(U).state.eventHandlers)), null, 16))
638
654
  ]),
@@ -650,10 +666,10 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
650
666
  _: 1
651
667
  }, 8, ["show"]));
652
668
  }
653
- }, vs = { class: "px-4 pt-5 pb-4 sm:p-6" }, xs = {
669
+ }, _s = { class: "px-4 pt-5 pb-4 sm:p-6" }, ws = {
654
670
  key: 0,
655
671
  class: "text-lg font-medium text-gray-900"
656
- }, hr = {
672
+ }, xr = {
657
673
  __name: "SparkModalDialog",
658
674
  props: {
659
675
  title: {
@@ -719,7 +735,7 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
719
735
  success: "farCheckCircle",
720
736
  warning: "farExclamationTriangle",
721
737
  danger: "farCircleXmark"
722
- }, o = k(() => s.icon || l[s.type]), n = k(() => ({
738
+ }, r = k(() => s.icon || l[s.type]), o = k(() => ({
723
739
  info: "bg-blue-100",
724
740
  success: "bg-green-100",
725
741
  warning: "bg-yellow-100",
@@ -730,22 +746,22 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
730
746
  warning: "text-yellow-400",
731
747
  danger: "text-red-400"
732
748
  })[s.type]);
733
- return (r, d) => {
734
- const m = $("font-awesome-icon");
735
- return f(), g("div", vs, [
736
- o.value ? (f(), g("div", {
749
+ return (n, d) => {
750
+ const m = L("font-awesome-icon");
751
+ return f(), g("div", _s, [
752
+ r.value ? (f(), g("div", {
737
753
  key: 0,
738
- class: _(["mx-auto flex size-12 items-center justify-center rounded-full", n.value])
754
+ class: _(["mx-auto flex size-12 items-center justify-center rounded-full", o.value])
739
755
  }, [
740
- b(m, {
741
- icon: y(H)[o.value],
756
+ v(m, {
757
+ icon: y(H)[r.value],
742
758
  class: _(["h-5 w-5", i.value])
743
759
  }, null, 8, ["icon", "class"])
744
760
  ], 2)) : x("", !0),
745
761
  c("div", {
746
- class: _(["text-center", { "mt-3 sm:mt-5": o.value }])
762
+ class: _(["text-center", { "mt-3 sm:mt-5": r.value }])
747
763
  }, [
748
- e.title ? (f(), g("h3", xs, S(e.title), 1)) : x("", !0),
764
+ e.title ? (f(), g("h3", ws, S(e.title), 1)) : x("", !0),
749
765
  e.message ? (f(), g("div", {
750
766
  key: 1,
751
767
  class: _([{ "mt-2": e.title }, "text-sm text-gray-500"])
@@ -754,10 +770,10 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
754
770
  c("div", {
755
771
  class: _(["mt-5 sm:mt-6", a.value])
756
772
  }, [
757
- (f(!0), g(M, null, B(t.value, (u, p) => (f(), V(y(A), {
773
+ (f(!0), g(B, null, A(t.value, (u, p) => (f(), V(y(F), {
758
774
  key: p,
759
775
  variant: u.variant,
760
- onClick: (h) => r.$emit(u.event, u)
776
+ onClick: (h) => n.$emit(u.event, u)
761
777
  }, {
762
778
  default: w(() => [
763
779
  P(S(u.text), 1)
@@ -768,7 +784,7 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
768
784
  ]);
769
785
  };
770
786
  }
771
- }, ks = { class: "fixed inset-0 flex" }, ce = {
787
+ }, Cs = { class: "fixed inset-0 flex" }, ce = {
772
788
  __name: "SparkOverlay",
773
789
  props: {
774
790
  position: {
@@ -783,21 +799,21 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
783
799
  },
784
800
  emits: ["close"],
785
801
  setup(e, { emit: s }) {
786
- const t = L(null), a = e, l = s, o = () => {
802
+ const t = $(null), a = e, l = s, r = () => {
787
803
  a.overlayInstance.close(), l("close");
788
804
  };
789
- return (n, i) => (f(), V(y(ke), {
805
+ return (o, i) => (f(), V(y(ke), {
790
806
  show: e.overlayInstance.state.isVisible,
791
807
  as: "template"
792
808
  }, {
793
809
  default: w(() => [
794
- b(y(_e), {
810
+ v(y(_e), {
795
811
  initialFocus: t.value,
796
812
  class: "relative z-200",
797
- onClose: o
813
+ onClose: r
798
814
  }, {
799
815
  default: w(() => [
800
- b(y(te), {
816
+ v(y(te), {
801
817
  as: "template",
802
818
  enter: "transition-opacity ease-linear duration-150",
803
819
  "enter-from": "opacity-0",
@@ -811,8 +827,8 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
811
827
  ])]),
812
828
  _: 1
813
829
  }),
814
- c("div", ks, [
815
- b(y(te), {
830
+ c("div", Cs, [
831
+ v(y(te), {
816
832
  as: "template",
817
833
  enter: "transition ease-in-out duration-150 transform",
818
834
  "enter-from": e.position === "left" ? "-translate-x-full opacity-0" : "translate-x-full opacity-0",
@@ -822,7 +838,7 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
822
838
  "leave-to": e.position === "left" ? "-translate-x-full opacity-0" : "translate-x-full opacity-0"
823
839
  }, {
824
840
  default: w(() => [
825
- b(y(we), {
841
+ v(y(we), {
826
842
  ref_key: "panelRef",
827
843
  ref: t,
828
844
  class: _([
@@ -846,53 +862,65 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
846
862
  _: 1
847
863
  }, 8, ["show"]));
848
864
  }
849
- }, _s = (e) => {
865
+ }, Ss = (e) => {
850
866
  if (e.includes(".")) {
851
867
  const s = e.split(".");
852
868
  e = s[s.length - 1];
853
869
  }
854
870
  return e.replace(/_/g, " ");
855
- }, ws = (e, s, t) => {
871
+ }, $s = (e, s, t) => {
856
872
  const a = s.querySelector(".relative");
857
873
  if (!a || a.querySelector(".spark-table-head-sorting"))
858
874
  return;
859
875
  const l = document.createElement("span");
860
- l.classList.add("spark-table-head-sorting"), l.innerHTML = ee({ prefix: "far", iconName: "sort" }).html + ee({ prefix: "far", iconName: "sort-up" }).html + ee({ prefix: "far", iconName: "sort-down" }).html, a.appendChild(l), a.addEventListener("click", async () => {
861
- const o = t.params.sort;
862
- return o === e ? (a.classList.remove("asc"), a.classList.add("desc"), t.methods.applyParams({
863
- sort: `-${e}`
864
- })) : o === `-${e}` ? (a.classList.remove("desc"), await t.methods.removeParam("sort")) : (a.classList.add("asc"), t.methods.applyParams({
865
- sort: e
876
+ 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 () => {
877
+ const r = t.params.orderBy, o = t.params.sortedBy;
878
+ return r === e && o === "asc" ? (a.classList.remove("asc"), a.classList.add("desc"), t.methods.applyParams({
879
+ orderBy: e,
880
+ sortedBy: "desc"
881
+ })) : r === e ? (a.classList.remove("desc"), await t.methods.clearParams(["orderBy", "sortedBy"])) : (a.classList.add("asc"), t.methods.applyParams({
882
+ orderBy: e,
883
+ sortedBy: "asc"
866
884
  }));
867
885
  });
868
- }, Cs = (e, s, t) => {
886
+ }, Ls = (e, s, t) => {
869
887
  if (s.querySelector(".spark-table-head-filter"))
870
888
  return;
871
889
  const a = document.createElement("div"), l = document.createElement("input");
872
890
  l.type = "text", l.placeholder = "Filter...", a.className = "spark-table-head-filter", a.appendChild(l);
873
- const o = Ce(async (n, i) => {
874
- const r = i.target.value, d = `filter[${n}]`;
875
- if (r)
876
- return t.params[d] && t.params[d] === r ? void 0 : t.methods.applyParams({
891
+ const r = Ce(async (o, i) => {
892
+ const n = i.target.value, d = `filter[${o}]`;
893
+ if (n)
894
+ return t.params[d] && t.params[d] === n ? void 0 : t.methods.applyParams({
877
895
  page: 1,
878
- [d]: r
896
+ [d]: n
879
897
  });
880
898
  await t.methods.removeParam(d);
881
899
  }, 200);
882
- l.addEventListener("keyup", (n) => o(e, n)), s.appendChild(a);
883
- }, Ss = (e, s, t) => {
900
+ l.addEventListener("keyup", (o) => r(e, o)), s.appendChild(a);
901
+ }, Hs = (e, s, t) => {
884
902
  e.classList.add("spark-table-head"), (!t || !t.hideSort) && e.classList.add("can-sort"), (!t || !t.hideFilter) && e.classList.add("can-filter"), e.querySelector(".relative").classList.add("spark-table-head-title-wrapper");
885
903
  const l = e.querySelector(".colHeader");
886
- l.classList.add("spark-table-head-title"), l.innerHTML = _s(s);
887
- }, $s = (e, s, t) => {
904
+ l.classList.add("spark-table-head-title"), l.innerHTML = Ss(s);
905
+ }, Ts = (e, s, t) => {
888
906
  if (typeof e != "number")
889
907
  return e;
890
908
  if (e < 0)
891
909
  return;
892
910
  let a = 2;
893
- const l = t.methods.colToProp(e), o = t.methods.getSettingsForProp(l);
894
- s.childElementCount === 1 && (o && o.hideSort && a--, o && o.hideFilter && a--, (!o || !o.hideSort) && ws(l, s, t), (!o || !o.hideFilter) && Cs(l, s, t)), (s.childElementCount === a || a === 0) && Ss(s, l, o);
895
- }, Ls = (e) => (s, t, a, l, o, n, i) => {
911
+ const l = t.methods.colToProp(e), r = t.methods.getSettingsForProp(l);
912
+ s.childElementCount === 1 && (r && r.hideSort && a--, r && r.hideFilter && a--, (!r || !r.hideSort) && $s(l, s, t), (!r || !r.hideFilter) && Ls(l, s, t)), (s.childElementCount === a || a === 0) && Hs(s, l, r);
913
+ }, Vs = (e) => {
914
+ if (!e.hotInstance || !e.hotInstance.rootElement)
915
+ return;
916
+ const s = e.params.orderBy, t = e.params.sortedBy, a = e.hotInstance.rootElement.querySelectorAll("thead th.can-sort .relative");
917
+ a.forEach((l) => {
918
+ l.classList.remove("asc", "desc");
919
+ }), s && t && a.forEach((l) => {
920
+ const r = l.closest("th"), o = Array.from(r.parentElement.children).indexOf(r);
921
+ e.methods.colToProp(o) === s && l.classList.add(t);
922
+ });
923
+ }, Ps = (e) => (s, t, a, l, r, o, i) => {
896
924
  t.innerHTML = "", t.classList.add("spark-table-cell-actions");
897
925
  const d = (i.rendererConfig || {}).actions || [];
898
926
  if (d.length === 0)
@@ -903,15 +931,15 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
903
931
  return;
904
932
  const h = document.createElement("button");
905
933
  if (h.type = "button", h.classList.add("spark-table-action-button"), p.icon) {
906
- const v = document.createElement("span");
907
- v.innerHTML = ee({ prefix: "far", iconName: p.icon }).html, v.classList.add("size-4"), h.appendChild(v);
934
+ const b = document.createElement("span");
935
+ b.innerHTML = ee({ prefix: "far", iconName: p.icon }).html, b.classList.add("size-4"), h.appendChild(b);
908
936
  }
909
937
  if (p.label) {
910
- const v = document.createElement("span");
911
- v.textContent = p.label, h.appendChild(v);
938
+ const b = document.createElement("span");
939
+ b.textContent = p.label, h.appendChild(b);
912
940
  }
913
- h.addEventListener("click", (v) => {
914
- if (v.preventDefault(), v.stopPropagation(), p.confirm) {
941
+ h.addEventListener("click", (b) => {
942
+ if (b.preventDefault(), b.stopPropagation(), p.confirm) {
915
943
  const N = typeof p.confirm == "string" ? p.confirm : `Are you sure you want to ${p.label?.toLowerCase() || "perform this action"}?`;
916
944
  if (!window.confirm(N))
917
945
  return;
@@ -928,10 +956,10 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
928
956
  purple: "bg-purple-100 text-purple-800",
929
957
  pink: "bg-pink-100 text-pink-800",
930
958
  indigo: "bg-indigo-100 text-indigo-800"
931
- }, Hs = (e) => (s, t, a, l, o, n, i) => {
932
- if (t.innerHTML = "", t.classList.add("spark-table-cell-badge"), !n)
959
+ }, Rs = (e) => (s, t, a, l, r, o, i) => {
960
+ if (t.innerHTML = "", t.classList.add("spark-table-cell-badge"), !o)
933
961
  return;
934
- const d = (i.rendererConfig || {}).colorMap || {}, m = d[n] || d[n?.toLowerCase()] || "gray", u = de[m] || de.gray, p = document.createElement("span");
962
+ const d = (i.rendererConfig || {}).colorMap || {}, m = d[o] || d[o?.toLowerCase()] || "gray", u = de[m] || de.gray, p = document.createElement("span");
935
963
  p.classList.add(
936
964
  "inline-flex",
937
965
  "items-center",
@@ -942,66 +970,66 @@ const U = new gs(), hs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
942
970
  "font-medium",
943
971
  "capitalize",
944
972
  ...u.split(" ")
945
- ), p.textContent = n, t.appendChild(p);
946
- }, Ts = (e) => (s, t, a, l, o, n, i) => {
947
- if (t.innerHTML = "", t.classList.add("spark-table-cell-link"), !n)
973
+ ), p.textContent = o, t.appendChild(p);
974
+ }, Bs = (e) => (s, t, a, l, r, o, i) => {
975
+ if (t.innerHTML = "", t.classList.add("spark-table-cell-link"), !o)
948
976
  return;
949
- const r = i.rendererConfig || {}, d = s.getSourceDataAtRow(s.toPhysicalRow(a));
950
- let m = n;
951
- r.href && (typeof r.href == "function" ? m = r.href(d) : r.href === "email" ? m = `mailto:${n}` : r.href === "tel" ? m = `tel:${n}` : typeof r.href == "string" && (m = d[r.href] || n));
977
+ const n = i.rendererConfig || {}, d = s.getSourceDataAtRow(s.toPhysicalRow(a));
978
+ let m = o;
979
+ n.href && (typeof n.href == "function" ? m = n.href(d) : n.href === "email" ? m = `mailto:${o}` : n.href === "tel" ? m = `tel:${o}` : typeof n.href == "string" && (m = d[n.href] || o));
952
980
  const u = document.createElement("a");
953
- u.href = m, u.textContent = n, u.classList.add("text-primary-600", "hover:text-primary-900", "hover:underline"), r.target && (u.target = r.target), r.rel && (u.rel = r.rel), u.addEventListener("click", (p) => {
981
+ u.href = m, u.textContent = o, u.classList.add("text-primary-600", "hover:text-primary-900", "hover:underline"), n.target && (u.target = n.target), n.rel && (u.rel = n.rel), u.addEventListener("click", (p) => {
954
982
  p.stopPropagation();
955
983
  }), t.appendChild(u);
956
984
  }, ue = {
957
985
  sm: "h-6 w-6",
958
986
  md: "h-8 w-8",
959
987
  lg: "h-12 w-12"
960
- }, Vs = (e) => (s, t, a, l, o, n, i) => {
961
- if (t.innerHTML = "", t.classList.add("spark-table-cell-image"), !n)
988
+ }, Ms = (e) => (s, t, a, l, r, o, i) => {
989
+ if (t.innerHTML = "", t.classList.add("spark-table-cell-image"), !o)
962
990
  return;
963
- const r = i.rendererConfig || {}, d = s.getSourceDataAtRow(s.toPhysicalRow(a)), m = r.size || "md", u = ue[m] || ue.md, p = r.rounded !== !1;
964
- let h = r.alt || "";
965
- typeof r.alt == "string" && d[r.alt] && (h = d[r.alt]);
966
- const v = document.createElement("img");
967
- v.src = n, v.alt = h, v.classList.add(...u.split(" "), "object-cover"), p ? v.classList.add("rounded-full") : v.classList.add("rounded"), t.appendChild(v);
968
- }, Ps = (e) => (s, t, a, l, o, n, i) => {
969
- if (t.innerHTML = "", t.classList.add("spark-table-cell-date"), !n)
991
+ const n = i.rendererConfig || {}, d = s.getSourceDataAtRow(s.toPhysicalRow(a)), m = n.size || "md", u = ue[m] || ue.md, p = n.rounded !== !1;
992
+ let h = n.alt || "";
993
+ typeof n.alt == "string" && d[n.alt] && (h = d[n.alt]);
994
+ const b = document.createElement("img");
995
+ b.src = o, b.alt = h, b.classList.add(...u.split(" "), "object-cover"), p ? b.classList.add("rounded-full") : b.classList.add("rounded"), t.appendChild(b);
996
+ }, Fs = (e) => (s, t, a, l, r, o, i) => {
997
+ if (t.innerHTML = "", t.classList.add("spark-table-cell-date"), !o)
970
998
  return;
971
- const r = i.rendererConfig || {}, d = r.format || "short", m = r.locale || "en-US";
972
- let u = n;
999
+ const n = i.rendererConfig || {}, d = n.format || "short", m = n.locale || "en-US";
1000
+ let u = o;
973
1001
  try {
974
- const h = new Date(n);
975
- isNaN(h.getTime()) ? u = n : typeof d == "function" ? u = d(h) : d === "short" ? u = h.toLocaleDateString(m) : d === "long" ? u = h.toLocaleDateString(m, {
1002
+ const h = new Date(o);
1003
+ isNaN(h.getTime()) ? u = o : typeof d == "function" ? u = d(h) : d === "short" ? u = h.toLocaleDateString(m) : d === "long" ? u = h.toLocaleDateString(m, {
976
1004
  year: "numeric",
977
1005
  month: "long",
978
1006
  day: "numeric"
979
- }) : d === "relative" ? u = Rs(h) : d === "datetime" ? u = h.toLocaleString(m) : u = h.toLocaleDateString(m);
1007
+ }) : d === "relative" ? u = As(h) : d === "datetime" ? u = h.toLocaleString(m) : u = h.toLocaleDateString(m);
980
1008
  } catch (h) {
981
- console.error("Error formatting date:", h), u = n;
1009
+ console.error("Error formatting date:", h), u = o;
982
1010
  }
983
1011
  const p = document.createElement("span");
984
1012
  p.textContent = u, t.appendChild(p);
985
1013
  };
986
- function Rs(e) {
987
- const t = /* @__PURE__ */ new Date() - e, a = Math.floor(Math.abs(t) / 1e3), l = Math.floor(a / 60), o = Math.floor(l / 60), n = Math.floor(o / 24), i = Math.floor(n / 30), r = Math.floor(n / 365), d = t > 0;
988
- return a < 60 ? d ? "just now" : "in a moment" : l < 60 ? d ? `${l} minute${l > 1 ? "s" : ""} ago` : `in ${l} minute${l > 1 ? "s" : ""}` : o < 24 ? d ? `${o} hour${o > 1 ? "s" : ""} ago` : `in ${o} hour${o > 1 ? "s" : ""}` : n < 30 ? d ? `${n} day${n > 1 ? "s" : ""} ago` : `in ${n} day${n > 1 ? "s" : ""}` : i < 12 ? d ? `${i} month${i > 1 ? "s" : ""} ago` : `in ${i} month${i > 1 ? "s" : ""}` : d ? `${r} year${r > 1 ? "s" : ""} ago` : `in ${r} year${r > 1 ? "s" : ""}`;
1014
+ function As(e) {
1015
+ 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), i = Math.floor(o / 30), n = Math.floor(o / 365), d = t > 0;
1016
+ return a < 60 ? d ? "just now" : "in a moment" : l < 60 ? d ? `${l} minute${l > 1 ? "s" : ""} ago` : `in ${l} minute${l > 1 ? "s" : ""}` : r < 24 ? d ? `${r} hour${r > 1 ? "s" : ""} ago` : `in ${r} hour${r > 1 ? "s" : ""}` : o < 30 ? d ? `${o} day${o > 1 ? "s" : ""} ago` : `in ${o} day${o > 1 ? "s" : ""}` : i < 12 ? d ? `${i} month${i > 1 ? "s" : ""} ago` : `in ${i} month${i > 1 ? "s" : ""}` : d ? `${n} year${n > 1 ? "s" : ""} ago` : `in ${n} year${n > 1 ? "s" : ""}`;
989
1017
  }
990
- const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
991
- St(e, (t, a, l, o, n, i, r) => {
992
- $t.apply(null, [t, a, l, o, n, i, r]), s(t, a, l, o, n, i, r);
993
- }), Ms.set(e, s);
994
- }, Fs = (e) => {
995
- D("spark.actions", Ls(e)), D("spark.badge", Hs()), D("spark.link", Ts()), D("spark.image", Vs()), D("spark.date", Ps()), D("style.capitalize", (s, t, a, l, o, n) => {
996
- if (!n || n.length === 0) {
1018
+ const Es = /* @__PURE__ */ new Map(), D = (e, s) => {
1019
+ St(e, (t, a, l, r, o, i, n) => {
1020
+ $t.apply(null, [t, a, l, r, o, i, n]), s(t, a, l, r, o, i, n);
1021
+ }), Es.set(e, s);
1022
+ }, zs = (e) => {
1023
+ D("spark.actions", Ps(e)), D("spark.badge", Rs()), D("spark.link", Bs()), D("spark.image", Ms()), D("spark.date", Fs()), D("style.capitalize", (s, t, a, l, r, o) => {
1024
+ if (!o || o.length === 0) {
997
1025
  t.innerText = "";
998
1026
  return;
999
1027
  }
1000
1028
  const i = document.createElement("span");
1001
- i.innerHTML = n, i.classList.add("capitalize"), t.replaceChildren(i);
1029
+ i.innerHTML = o, i.classList.add("capitalize"), t.replaceChildren(i);
1002
1030
  });
1003
- }, As = () => {
1004
- }, Bs = { class: "flex items-center gap-4 px-4 py-3" }, Es = { class: "shrink-0" }, zs = { class: "text-sm text-gray-700" }, js = { class: "font-medium" }, Os = { class: "font-medium" }, Is = { class: "font-medium" }, Ns = {
1031
+ }, js = () => {
1032
+ }, Is = { class: "flex items-center gap-4 px-4 py-3" }, Os = { class: "shrink-0" }, Ns = { class: "text-sm text-gray-700" }, Ds = { class: "font-medium" }, Zs = { class: "font-medium" }, qs = { class: "font-medium" }, Gs = {
1005
1033
  __name: "SparkTablePaginationDetails",
1006
1034
  props: {
1007
1035
  sparkTable: {
@@ -1012,28 +1040,28 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1012
1040
  setup(e) {
1013
1041
  const s = e;
1014
1042
  return (t, a) => (f(), g("div", null, [
1015
- c("div", Bs, [
1016
- c("div", Es, [
1017
- c("div", zs, [
1043
+ c("div", Is, [
1044
+ c("div", Os, [
1045
+ c("div", Ns, [
1018
1046
  a[0] || (a[0] = P(" Showing ", -1)),
1019
- c("span", js, S(s.sparkTable.response.meta.from), 1),
1047
+ c("span", Ds, S(s.sparkTable.response.meta.from), 1),
1020
1048
  a[1] || (a[1] = P(" to ", -1)),
1021
- c("span", Os, S(s.sparkTable.response.meta.to), 1),
1049
+ c("span", Zs, S(s.sparkTable.response.meta.to), 1),
1022
1050
  a[2] || (a[2] = P(" of ", -1)),
1023
- c("span", Is, S(s.sparkTable.response.meta.total), 1),
1051
+ c("span", qs, S(s.sparkTable.response.meta.total), 1),
1024
1052
  a[3] || (a[3] = P(" results ", -1))
1025
1053
  ])
1026
1054
  ])
1027
1055
  ])
1028
1056
  ]));
1029
1057
  }
1030
- }, Ds = { class: "flex items-center gap-4 px-4 py-3" }, Zs = {
1058
+ }, Ks = { class: "flex items-center gap-4 px-4 py-3" }, Us = {
1031
1059
  key: 0,
1032
1060
  class: "shrink-0 ml-auto"
1033
- }, qs = {
1061
+ }, Ws = {
1034
1062
  class: "isolate inline-flex -space-x-px rounded-md shadow-xs bg-white",
1035
1063
  "aria-label": "Pagination"
1036
- }, Gs = ["onClick"], Ks = {
1064
+ }, Ys = ["onClick"], Xs = {
1037
1065
  __name: "SparkTablePaginationPaging",
1038
1066
  props: {
1039
1067
  sparkTable: {
@@ -1044,49 +1072,49 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1044
1072
  emits: ["paginate"],
1045
1073
  setup(e, { emit: s }) {
1046
1074
  const t = e, a = s, l = (m) => {
1047
- o(t.sparkTable.params.page + m);
1048
- }, o = (m) => {
1075
+ r(t.sparkTable.params.page + m);
1076
+ }, r = (m) => {
1049
1077
  m < 1 || m > t.sparkTable.response.meta.last_page || a("paginate", {
1050
1078
  page: m
1051
1079
  });
1052
- }, n = k(() => t.sparkTable.params.page ? Math.ceil(t.sparkTable.params.page / 10) * 10 : 1), i = k(() => t.sparkTable.computed.ready ? ht(
1053
- Math.floor((n.value - 1) / 10) * 10 + 1,
1054
- n.value > t.sparkTable.response.meta.last_page ? t.sparkTable.response.meta.last_page + 1 : n.value + 1
1055
- ) : []), r = k(
1080
+ }, o = k(() => t.sparkTable.params.page ? Math.ceil(t.sparkTable.params.page / 10) * 10 : 1), i = k(() => t.sparkTable.computed.ready ? ht(
1081
+ Math.floor((o.value - 1) / 10) * 10 + 1,
1082
+ o.value > t.sparkTable.response.meta.last_page ? t.sparkTable.response.meta.last_page + 1 : o.value + 1
1083
+ ) : []), n = k(
1056
1084
  () => t.sparkTable.params.page < q(t.sparkTable.response.meta, "last_page", 1)
1057
1085
  ), d = k(() => t.sparkTable.params.page > 1);
1058
1086
  return (m, u) => {
1059
- const p = $("font-awesome-icon");
1087
+ const p = L("font-awesome-icon");
1060
1088
  return f(), g("div", null, [
1061
- c("div", Ds, [
1062
- i.value.length > 1 ? (f(), g("div", Zs, [
1089
+ c("div", Ks, [
1090
+ i.value.length > 1 ? (f(), g("div", Us, [
1063
1091
  c("div", null, [
1064
- c("nav", qs, [
1092
+ c("nav", Ws, [
1065
1093
  c("a", {
1066
1094
  class: _([d.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"]),
1067
1095
  href: "#",
1068
1096
  onClick: u[0] || (u[0] = j((h) => l(-1), ["prevent"]))
1069
1097
  }, [
1070
- b(p, {
1098
+ v(p, {
1071
1099
  icon: y(H).farChevronLeft,
1072
1100
  class: "size-5"
1073
1101
  }, null, 8, ["icon"])
1074
1102
  ], 2),
1075
- (f(!0), g(M, null, B(i.value, (h) => (f(), g("a", {
1103
+ (f(!0), g(B, null, A(i.value, (h) => (f(), g("a", {
1076
1104
  key: `page-${h}`,
1077
1105
  href: "#",
1078
1106
  class: _([
1079
1107
  "relative inline-flex items-center px-4 py-[9px] text-sm font-semibold ring-1 ring-inset",
1080
1108
  e.sparkTable.params.page === h ? "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"
1081
1109
  ]),
1082
- onClick: (v) => o(h)
1083
- }, S(h), 11, Gs))), 128)),
1110
+ onClick: (b) => r(h)
1111
+ }, S(h), 11, Ys))), 128)),
1084
1112
  c("a", {
1085
- class: _([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"]),
1113
+ class: _([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"]),
1086
1114
  onClick: u[1] || (u[1] = j((h) => l(1), ["prevent"])),
1087
1115
  href: "#"
1088
1116
  }, [
1089
- b(p, {
1117
+ v(p, {
1090
1118
  icon: y(H).farChevronRight,
1091
1119
  class: "size-5"
1092
1120
  }, null, 8, ["icon"])
@@ -1098,12 +1126,12 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1098
1126
  ]);
1099
1127
  };
1100
1128
  }
1101
- }, I = (e, s) => {
1129
+ }, O = (e, s) => {
1102
1130
  const t = e.__vccOpts || e;
1103
1131
  for (const [a, l] of s)
1104
1132
  t[a] = l;
1105
1133
  return t;
1106
- }, Us = { class: "spark-table-pagination-per-page" }, Ws = {
1134
+ }, Js = { class: "spark-table-pagination-per-page" }, Qs = {
1107
1135
  __name: "SparkTablePaginationPerPage",
1108
1136
  props: {
1109
1137
  sparkTable: {
@@ -1113,31 +1141,31 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1113
1141
  },
1114
1142
  emits: ["paginate"],
1115
1143
  setup(e, { emit: s }) {
1116
- const t = e, a = s, l = k(() => t.sparkTable.options.perPages.map((n) => ({
1117
- label: String(n),
1118
- value: n
1119
- }))), o = (n) => {
1144
+ const t = e, a = s, l = k(() => t.sparkTable.options.perPages.map((o) => ({
1145
+ label: String(o),
1146
+ value: o
1147
+ }))), r = (o) => {
1120
1148
  a("paginate", {
1121
1149
  page: 1,
1122
- limit: parseInt(n)
1150
+ limit: parseInt(o)
1123
1151
  });
1124
1152
  };
1125
- return (n, i) => {
1126
- const r = $("FormKit");
1127
- return f(), g("div", Us, [
1128
- b(r, {
1153
+ return (o, i) => {
1154
+ const n = L("FormKit");
1155
+ return f(), g("div", Js, [
1156
+ v(n, {
1129
1157
  "model-value": e.sparkTable.params.limit,
1130
1158
  type: "select",
1131
1159
  options: l.value,
1132
1160
  "outer-class": "!mb-0",
1133
1161
  "wrapper-class": "!mb-0",
1134
1162
  "input-class": "!py-2",
1135
- onInput: o
1163
+ onInput: r
1136
1164
  }, null, 8, ["model-value", "options"])
1137
1165
  ]);
1138
1166
  };
1139
1167
  }
1140
- }, Ys = /* @__PURE__ */ I(Ws, [["__scopeId", "data-v-9ef8544b"]]), pe = {
1168
+ }, ea = /* @__PURE__ */ O(Qs, [["__scopeId", "data-v-9ef8544b"]]), pe = {
1141
1169
  __name: "SparkTableToolbar",
1142
1170
  props: {
1143
1171
  position: {
@@ -1147,18 +1175,18 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1147
1175
  }
1148
1176
  },
1149
1177
  setup(e) {
1150
- const s = e, t = be(), a = k(() => !!t.default), l = k(() => {
1151
- const o = "spark-table-toolbar flex flex-wrap items-center gap-x-5 px-5 w-full";
1152
- return s.position === "footer" ? `${o} spark-table-toolbar-footer justify-between` : `${o} spark-table-toolbar-header gap-y-5 py-5`;
1178
+ const s = e, t = ve(), a = k(() => !!t.default), l = k(() => {
1179
+ const r = "spark-table-toolbar flex flex-wrap items-center gap-x-5 px-5 w-full";
1180
+ return s.position === "footer" ? `${r} spark-table-toolbar-footer justify-between` : `${r} spark-table-toolbar-header gap-y-5 py-5`;
1153
1181
  });
1154
- return (o, n) => a.value ? (f(), g("div", {
1182
+ return (r, o) => a.value ? (f(), g("div", {
1155
1183
  key: 0,
1156
1184
  class: _(l.value)
1157
1185
  }, [
1158
- T(o.$slots, "default")
1186
+ T(r.$slots, "default")
1159
1187
  ], 2)) : x("", !0);
1160
1188
  }
1161
- }, Xs = { class: "spark-table-search" }, Js = {
1189
+ }, ta = { class: "spark-table-search" }, sa = {
1162
1190
  __name: "SparkTableSearch",
1163
1191
  props: {
1164
1192
  /** SparkTable instance object */
@@ -1177,29 +1205,29 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1177
1205
  }
1178
1206
  },
1179
1207
  setup(e) {
1180
- const s = e, t = L("");
1208
+ const s = e, t = $("");
1181
1209
  s.sparkTable.params[s.config.param] && (t.value = s.sparkTable.params[s.config.param]);
1182
- const a = Ce((o) => {
1183
- o ? s.sparkTable.methods.applyParams({
1210
+ const a = Ce((r) => {
1211
+ r ? s.sparkTable.methods.applyParams({
1184
1212
  page: 1,
1185
- [s.config.param]: o
1213
+ [s.config.param]: r
1186
1214
  }) : s.sparkTable.methods.removeParam(s.config.param);
1187
1215
  }, s.config.debounce || 300);
1188
- E(t, (o) => {
1189
- a(o);
1216
+ E(t, (r) => {
1217
+ a(r);
1190
1218
  });
1191
1219
  const l = s.config.placeholder || "Search...";
1192
1220
  return E(
1193
1221
  () => s.sparkTable.params[s.config.param],
1194
- (o) => {
1195
- !o && t.value && (t.value = "");
1222
+ (r) => {
1223
+ !r && t.value && (t.value = "");
1196
1224
  }
1197
- ), (o, n) => {
1198
- const i = $("FormKit");
1199
- return f(), g("div", Xs, [
1200
- b(i, Y({
1225
+ ), (r, o) => {
1226
+ const i = L("FormKit");
1227
+ return f(), g("div", ta, [
1228
+ v(i, Y({
1201
1229
  modelValue: t.value,
1202
- "onUpdate:modelValue": n[0] || (n[0] = (r) => t.value = r),
1230
+ "onUpdate:modelValue": o[0] || (o[0] = (n) => t.value = n),
1203
1231
  type: "text",
1204
1232
  placeholder: y(l),
1205
1233
  "outer-class": "!mb-0",
@@ -1209,7 +1237,7 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1209
1237
  ]);
1210
1238
  };
1211
1239
  }
1212
- }, Qs = /* @__PURE__ */ I(Js, [["__scopeId", "data-v-1dde9add"]]), ea = { class: "spark-table-filter-select" }, ta = {
1240
+ }, aa = /* @__PURE__ */ O(sa, [["__scopeId", "data-v-1dde9add"]]), oa = { class: "spark-table-filter-select" }, ra = {
1213
1241
  __name: "SparkTableFilterSelect",
1214
1242
  props: {
1215
1243
  /** SparkTable instance object */
@@ -1225,31 +1253,31 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1225
1253
  }
1226
1254
  },
1227
1255
  setup(e) {
1228
- const s = e, t = L(""), a = s.config.param || `filter[${s.config.key}]`;
1256
+ const s = e, t = $(""), a = s.config.param || `filter[${s.config.key}]`;
1229
1257
  s.sparkTable.params[a] && (t.value = s.sparkTable.params[a]);
1230
- const l = s.config.label || null, o = k(() => [
1258
+ const l = s.config.label || null, r = k(() => [
1231
1259
  { label: s.config.placeholder || "All", value: "" },
1232
1260
  ...s.config.options
1233
1261
  ]);
1234
- return E(t, (n) => {
1235
- n ? s.sparkTable.methods.applyParams({
1262
+ return E(t, (o) => {
1263
+ o ? s.sparkTable.methods.applyParams({
1236
1264
  page: 1,
1237
- [a]: n
1265
+ [a]: o
1238
1266
  }) : s.sparkTable.methods.removeParam(a);
1239
1267
  }), E(
1240
1268
  () => s.sparkTable.params[a],
1241
- (n) => {
1242
- !n && t.value && (t.value = "");
1269
+ (o) => {
1270
+ !o && t.value && (t.value = "");
1243
1271
  }
1244
- ), (n, i) => {
1245
- const r = $("FormKit");
1246
- return f(), g("div", ea, [
1247
- b(r, Y({
1272
+ ), (o, i) => {
1273
+ const n = L("FormKit");
1274
+ return f(), g("div", oa, [
1275
+ v(n, Y({
1248
1276
  modelValue: t.value,
1249
1277
  "onUpdate:modelValue": i[0] || (i[0] = (d) => t.value = d),
1250
1278
  type: "select",
1251
1279
  label: y(l),
1252
- options: o.value,
1280
+ options: r.value,
1253
1281
  placeholder: e.config.placeholder || "All",
1254
1282
  "outer-class": "!mb-0",
1255
1283
  "wrapper-class": "!mb-0"
@@ -1257,10 +1285,10 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1257
1285
  ]);
1258
1286
  };
1259
1287
  }
1260
- }, sa = /* @__PURE__ */ I(ta, [["__scopeId", "data-v-2d4b75c0"]]), aa = { class: "spark-table-filter-buttons" }, oa = {
1288
+ }, na = /* @__PURE__ */ O(ra, [["__scopeId", "data-v-2d4b75c0"]]), la = { class: "spark-table-filter-buttons" }, ia = {
1261
1289
  key: 0,
1262
1290
  class: "spark-table-filter-buttons-label"
1263
- }, ra = {
1291
+ }, ca = {
1264
1292
  __name: "SparkTableFilterButtons",
1265
1293
  props: {
1266
1294
  /** SparkTable instance object */
@@ -1276,9 +1304,9 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1276
1304
  }
1277
1305
  },
1278
1306
  setup(e) {
1279
- const s = e, t = L(null), a = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`;
1307
+ const s = e, t = $(null), a = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`;
1280
1308
  s.sparkTable.params[l] !== void 0 && (t.value = s.sparkTable.params[l]);
1281
- const o = (i) => i == null ? t.value === null || t.value === void 0 || t.value === "" : t.value === i, n = (i) => {
1309
+ const r = (i) => i == null ? t.value === null || t.value === void 0 || t.value === "" : t.value === i, o = (i) => {
1282
1310
  t.value = i, i == null || i === "" ? s.sparkTable.methods.removeParam(l) : s.sparkTable.methods.applyParams({
1283
1311
  page: 1,
1284
1312
  [l]: i
@@ -1289,15 +1317,15 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1289
1317
  (i) => {
1290
1318
  (i == null || i === "") && t.value ? t.value = null : i !== t.value && (t.value = i);
1291
1319
  }
1292
- ), (i, r) => (f(), g("div", aa, [
1293
- y(a) ? (f(), g("span", oa, S(y(a)), 1)) : x("", !0),
1294
- b(us, { class: "isolate" }, {
1320
+ ), (i, n) => (f(), g("div", la, [
1321
+ y(a) ? (f(), g("span", ia, S(y(a)), 1)) : x("", !0),
1322
+ v(ms, { class: "isolate" }, {
1295
1323
  default: w(() => [
1296
- (f(!0), g(M, null, B(e.config.options, (d) => (f(), V(A, {
1324
+ (f(!0), g(B, null, A(e.config.options, (d) => (f(), V(F, {
1297
1325
  key: d.value,
1298
1326
  size: "xl",
1299
- variant: o(d.value) ? "primary" : "secondary",
1300
- onClick: (m) => n(d.value)
1327
+ variant: r(d.value) ? "primary" : "secondary",
1328
+ onClick: (m) => o(d.value)
1301
1329
  }, {
1302
1330
  default: w(() => [
1303
1331
  P(S(d.label), 1)
@@ -1309,7 +1337,7 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1309
1337
  })
1310
1338
  ]));
1311
1339
  }
1312
- }, na = /* @__PURE__ */ I(ra, [["__scopeId", "data-v-6de993cd"]]), la = { class: "spark-table-date-picker" }, ia = {
1340
+ }, da = /* @__PURE__ */ O(ca, [["__scopeId", "data-v-6de993cd"]]), ua = { class: "spark-table-date-picker" }, pa = {
1313
1341
  __name: "SparkTableDatePicker",
1314
1342
  props: {
1315
1343
  /** SparkTable instance object */
@@ -1325,7 +1353,7 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1325
1353
  }
1326
1354
  },
1327
1355
  setup(e) {
1328
- const s = e, t = L(null), a = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`;
1356
+ const s = e, t = $(null), a = s.config.label || null, l = s.config.param || `filter[${s.config.key}]`, r = $(`${l}-0`);
1329
1357
  return t.value = s.sparkTable.params[l] || null, E(t, (o) => {
1330
1358
  o ? s.sparkTable.methods.applyParams({
1331
1359
  page: 1,
@@ -1334,14 +1362,19 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1334
1362
  }), E(
1335
1363
  () => s.sparkTable.params[l],
1336
1364
  (o) => {
1337
- !o && t.value && (t.value = null);
1365
+ if ((o == null || o === "") && t.value) {
1366
+ t.value = null;
1367
+ const i = parseInt(r.value.split("-").pop()) || 0;
1368
+ r.value = `${l}-${i + 1}`;
1369
+ } else o && o !== t.value && (t.value = o);
1338
1370
  }
1339
- ), (o, n) => {
1340
- const i = $("FormKit");
1341
- return f(), g("div", la, [
1342
- b(i, Y({
1371
+ ), (o, i) => {
1372
+ const n = L("FormKit");
1373
+ return f(), g("div", ua, [
1374
+ (f(), V(n, Y({
1375
+ key: r.value,
1343
1376
  modelValue: t.value,
1344
- "onUpdate:modelValue": n[0] || (n[0] = (r) => t.value = r),
1377
+ "onUpdate:modelValue": i[0] || (i[0] = (d) => t.value = d),
1345
1378
  type: "datepicker",
1346
1379
  "picker-only": "",
1347
1380
  label: y(a),
@@ -1351,11 +1384,11 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1351
1384
  format: "YYYY-MM-DD",
1352
1385
  "outer-class": "!mb-0",
1353
1386
  "wrapper-class": "!mb-0"
1354
- }, e.config.formkitProps || {}), null, 16, ["modelValue", "label", "placeholder"])
1387
+ }, e.config.formkitProps || {}), null, 16, ["modelValue", "label", "placeholder"]))
1355
1388
  ]);
1356
1389
  };
1357
1390
  }
1358
- }, ca = /* @__PURE__ */ I(ia, [["__scopeId", "data-v-1c489ef8"]]), da = { class: "spark-table-reset" }, ua = { key: 1 }, pa = {
1391
+ }, fa = /* @__PURE__ */ O(pa, [["__scopeId", "data-v-f10ddb60"]]), ma = { class: "spark-table-reset" }, ga = { key: 1 }, ha = {
1359
1392
  __name: "SparkTableReset",
1360
1393
  props: {
1361
1394
  /** SparkTable instance object */
@@ -1372,49 +1405,49 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1372
1405
  setup(e) {
1373
1406
  const s = e, t = () => {
1374
1407
  const a = s.sparkTable.plugins || {}, l = [];
1375
- Object.entries(a).forEach(([n, i]) => {
1408
+ Object.entries(a).forEach(([o, i]) => {
1376
1409
  if (!(!i || !i.enabled || i.type === "reset")) {
1377
1410
  if (i.type === "search")
1378
1411
  i.param && l.push(i.param);
1379
1412
  else if (i.type === "filterSelect" || i.type === "filterButtons") {
1380
- const r = i.param || `filter[${i.key}]`;
1381
- l.push(r);
1413
+ const n = i.param || `filter[${i.key}]`;
1414
+ l.push(n);
1382
1415
  } else if (i.type === "datePicker") {
1383
- const r = i.param || `filter[${i.key}]`;
1384
- l.push(r);
1416
+ const n = i.param || `filter[${i.key}]`;
1417
+ l.push(n);
1385
1418
  }
1386
1419
  }
1387
1420
  });
1388
- const o = l.filter(
1389
- (n) => s.sparkTable.params[n] !== void 0 && s.sparkTable.params[n] !== null && s.sparkTable.params[n] !== ""
1421
+ const r = l.filter(
1422
+ (o) => s.sparkTable.params[o] !== void 0 && s.sparkTable.params[o] !== null && s.sparkTable.params[o] !== ""
1390
1423
  );
1391
- o.length !== 0 && s.sparkTable.methods.clearParams(o);
1424
+ r.length !== 0 && s.sparkTable.methods.clearParams(r);
1392
1425
  };
1393
1426
  return (a, l) => {
1394
- const o = $("font-awesome-icon");
1395
- return f(), g("div", da, [
1396
- b(A, {
1427
+ const r = L("font-awesome-icon");
1428
+ return f(), g("div", ma, [
1429
+ v(F, {
1397
1430
  onClick: t,
1398
1431
  variant: "secondary",
1399
1432
  size: "xl"
1400
1433
  }, {
1401
1434
  default: w(() => [
1402
- e.config.icon ? (f(), V(o, {
1435
+ e.config.icon ? (f(), V(r, {
1403
1436
  key: 0,
1404
1437
  icon: ["far", e.config.icon],
1405
1438
  class: _({ "mr-1.5": e.config.label })
1406
1439
  }, null, 8, ["icon", "class"])) : x("", !0),
1407
- e.config.label ? (f(), g("span", ua, S(e.config.label), 1)) : x("", !0)
1440
+ e.config.label ? (f(), g("span", ga, S(e.config.label), 1)) : x("", !0)
1408
1441
  ]),
1409
1442
  _: 1
1410
1443
  })
1411
1444
  ]);
1412
1445
  };
1413
1446
  }
1414
- }, fa = /* @__PURE__ */ I(pa, [["__scopeId", "data-v-cbbeeb45"]]), ma = { class: "spark-table" }, ga = { class: "flex items-center gap-x-3" }, ne = {
1447
+ }, ya = /* @__PURE__ */ O(ha, [["__scopeId", "data-v-cbbeeb45"]]), va = { class: "spark-table" }, ba = { class: "flex items-center gap-x-3" }, ne = {
1415
1448
  perPages: [100, 200, 500],
1416
1449
  limit: 100
1417
- }, ha = {
1450
+ }, xa = {
1418
1451
  page: 1,
1419
1452
  limit: ne.limit
1420
1453
  }, fe = {
@@ -1427,7 +1460,7 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1427
1460
  tableClassName: "spark-table-table",
1428
1461
  readOnlyCellClassName: "read-only",
1429
1462
  licenseKey: "non-commercial-and-evaluation"
1430
- }, yr = {
1463
+ }, kr = {
1431
1464
  __name: "SparkTable",
1432
1465
  props: {
1433
1466
  url: {
@@ -1439,7 +1472,7 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1439
1472
  dataTransformer: {
1440
1473
  type: Function,
1441
1474
  default: (e, s) => ({
1442
- data: q(s.settings, "nestedHeaders") ? e.data.data.map((a) => (s.settings.columnKeys || []).map((o) => a[o])) : e.data.data,
1475
+ data: q(s.settings, "nestedHeaders") ? e.data.data.map((a) => (s.settings.columnKeys || []).map((r) => a[r])) : e.data.data,
1443
1476
  meta: {
1444
1477
  last_page: e.data.last_page,
1445
1478
  from: e.data.from,
@@ -1451,7 +1484,7 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1451
1484
  params: {
1452
1485
  type: Object,
1453
1486
  default() {
1454
- return ha;
1487
+ return xa;
1455
1488
  }
1456
1489
  },
1457
1490
  options: {
@@ -1484,12 +1517,12 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1484
1517
  setup(e, { expose: s, emit: t }) {
1485
1518
  const a = e;
1486
1519
  Ct(), Q(xt), Q(kt), Q(_t), q(a, "settings.nestedHeaders") && Q(wt);
1487
- const l = t, o = ge("axios"), n = L(null), i = L(!1), r = L(null), d = {
1488
- search: Qs,
1489
- filterSelect: sa,
1490
- filterButtons: na,
1491
- datePicker: ca,
1492
- reset: fa
1520
+ const l = t, r = ge("axios"), o = $(null), i = $(!1), n = $(null), d = {
1521
+ search: aa,
1522
+ filterSelect: na,
1523
+ filterButtons: da,
1524
+ datePicker: fa,
1525
+ reset: ya
1493
1526
  }, m = k(() => Object.entries(a.plugins).filter(([p, h]) => h && h.enabled).map(([p, h]) => ({ name: p, config: h }))), u = z({
1494
1527
  hotInstance: null,
1495
1528
  url: a.url,
@@ -1510,17 +1543,17 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1510
1543
  u.params[p] && (delete u.params[p], await u.methods.loadTable());
1511
1544
  },
1512
1545
  loadTable: async (p) => {
1513
- if (!(!n.value || !n.value.hotInstance)) {
1514
- i.value = !0, r.value = null, l("loading", !0), ae.start(), u.hotInstance = n.value.hotInstance;
1546
+ if (!(!o.value || !o.value.hotInstance)) {
1547
+ i.value = !0, n.value = null, l("loading", !0), ae.start(), u.hotInstance = o.value.hotInstance;
1515
1548
  try {
1516
1549
  if (a.dataProvider) {
1517
- const v = await a.dataProvider(u.computed.params);
1518
- u.response = a.dataTransformer(v, a);
1550
+ const b = await a.dataProvider(u.computed.params);
1551
+ u.response = a.dataTransformer(b, a);
1519
1552
  } else if (a.url) {
1520
- const v = await o.get(a.url, {
1553
+ const b = await r.get(a.url, {
1521
1554
  params: u.computed.params
1522
1555
  });
1523
- u.response = a.dataTransformer(v, a);
1556
+ u.response = a.dataTransformer(b, a);
1524
1557
  } else {
1525
1558
  console.error("No data provider or URL provided"), i.value = !1, l("loading", !1), ae.done();
1526
1559
  return;
@@ -1530,14 +1563,14 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1530
1563
  meta: u.response.meta
1531
1564
  }), p && typeof p == "function" && p();
1532
1565
  } catch (h) {
1533
- r.value = h, l("error", h), console.error("Error loading table data:", h);
1566
+ n.value = h, l("error", h), console.error("Error loading table data:", h);
1534
1567
  } finally {
1535
1568
  i.value = !1, l("loading", !1), ae.done();
1536
1569
  }
1537
1570
  }
1538
1571
  },
1539
1572
  // can't use sparkTable.hotInstance here because the ref isn't ready
1540
- colToProp: (p) => n.value.hotInstance.colToProp(p),
1573
+ colToProp: (p) => o.value.hotInstance.colToProp(p),
1541
1574
  fireEvent: (p, h) => {
1542
1575
  l(p, h);
1543
1576
  },
@@ -1550,8 +1583,8 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1550
1583
  },
1551
1584
  clearParam: (p) => u.methods.removeParam(p),
1552
1585
  clearParams: (p) => {
1553
- (Array.isArray(p) ? p : [p]).forEach((v) => {
1554
- u.params[v] !== void 0 && delete u.params[v];
1586
+ (Array.isArray(p) ? p : [p]).forEach((b) => {
1587
+ u.params[b] !== void 0 && delete u.params[b];
1555
1588
  }), u.methods.applyParams({ page: 1 });
1556
1589
  }
1557
1590
  },
@@ -1560,7 +1593,7 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1560
1593
  ...a.params,
1561
1594
  ...u.params
1562
1595
  })),
1563
- ready: k(() => bt(u, "response.meta.last_page"))
1596
+ ready: k(() => vt(u, "response.meta.last_page"))
1564
1597
  },
1565
1598
  options: k(() => ({
1566
1599
  ...ne,
@@ -1570,9 +1603,10 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1570
1603
  ...fe,
1571
1604
  nestedHeaders: q(a.settings, "nestedHeaders", []),
1572
1605
  ...!q(a.settings, "nestedHeaders") && {
1573
- afterGetColHeader: (p, h) => $s(p, h, u)
1606
+ afterGetColHeader: (p, h) => Ts(p, h, u)
1574
1607
  },
1575
- afterChange: (p, h) => As(),
1608
+ afterChange: (p, h) => js(),
1609
+ afterRender: () => Vs(u),
1576
1610
  ...a.settings
1577
1611
  }))
1578
1612
  });
@@ -1588,9 +1622,9 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1588
1622
  await u.methods.loadTable();
1589
1623
  },
1590
1624
  { debounce: 50, maxWait: 1e3 }
1591
- ), ve(async () => {
1625
+ ), be(async () => {
1592
1626
  await u.methods.loadTable(), l("ready");
1593
- }), Fs(u), s({
1627
+ }), zs(u), s({
1594
1628
  refresh: () => u.methods.loadTable(),
1595
1629
  getParams: () => u.methods.getParams(),
1596
1630
  getParam: (p) => u.methods.getParam(p),
@@ -1599,33 +1633,33 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1599
1633
  clearParams: (p) => u.methods.clearParams(p),
1600
1634
  applyParams: (p) => u.methods.applyParams(p),
1601
1635
  loading: i,
1602
- error: r,
1636
+ error: n,
1603
1637
  sparkTable: u,
1604
- table: n
1605
- }), (p, h) => (f(), g("div", ma, [
1638
+ table: o
1639
+ }), (p, h) => (f(), g("div", va, [
1606
1640
  u.computed.ready ? (f(), V(pe, {
1607
1641
  key: 0,
1608
1642
  position: "header"
1609
1643
  }, {
1610
1644
  default: w(() => [
1611
- (f(!0), g(M, null, B(m.value, (v) => (f(), V(W(d[v.config.type]), {
1612
- key: v.name,
1613
- class: _(v.config.align ? `self-${v.config.align}` : ""),
1645
+ (f(!0), g(B, null, A(m.value, (b) => (f(), V(W(d[b.config.type]), {
1646
+ key: b.name,
1647
+ class: _(b.config.align ? `self-${b.config.align}` : ""),
1614
1648
  "spark-table": u,
1615
- config: v.config
1649
+ config: b.config
1616
1650
  }, null, 8, ["class", "spark-table", "config"]))), 128)),
1617
1651
  T(p.$slots, "header", {
1618
1652
  sparkTable: u,
1619
1653
  loading: i.value,
1620
- error: r.value
1654
+ error: n.value
1621
1655
  })
1622
1656
  ]),
1623
1657
  _: 3
1624
1658
  })) : x("", !0),
1625
- b(y(vt), {
1659
+ v(y(bt), {
1626
1660
  "theme-name": "ht-theme-classic",
1627
1661
  ref_key: "table",
1628
- ref: n,
1662
+ ref: o,
1629
1663
  settings: u.tableSettings
1630
1664
  }, null, 8, ["settings"]),
1631
1665
  u.computed.ready ? (f(), V(pe, {
@@ -1633,20 +1667,20 @@ const Ms = /* @__PURE__ */ new Map(), D = (e, s) => {
1633
1667
  position: "footer"
1634
1668
  }, {
1635
1669
  default: w(() => [
1636
- b(Ns, { "spark-table": u }, null, 8, ["spark-table"]),
1637
- c("div", ga, [
1638
- b(Ks, {
1670
+ v(Gs, { "spark-table": u }, null, 8, ["spark-table"]),
1671
+ c("div", ba, [
1672
+ v(Xs, {
1639
1673
  "spark-table": u,
1640
1674
  onPaginate: u.methods.applyParams
1641
1675
  }, null, 8, ["spark-table", "onPaginate"]),
1642
- b(Ys, {
1676
+ v(ea, {
1643
1677
  "spark-table": u,
1644
1678
  onPaginate: u.methods.applyParams
1645
1679
  }, null, 8, ["spark-table", "onPaginate"]),
1646
1680
  T(p.$slots, "footer", {
1647
1681
  sparkTable: u,
1648
1682
  loading: i.value,
1649
- error: r.value
1683
+ error: n.value
1650
1684
  })
1651
1685
  ])
1652
1686
  ]),
@@ -1667,8 +1701,8 @@ function me() {
1667
1701
  e.isVisible = !1, e.content = null, e.props = {}, e.eventHandlers = {};
1668
1702
  }, a = () => {
1669
1703
  e.isVisible = !0;
1670
- }, l = (n, i = {}, r = {}) => {
1671
- e.content = he(n), e.props = i, e.eventHandlers = r;
1704
+ }, l = (o, i = {}, n = {}) => {
1705
+ e.content = he(o), e.props = i, e.eventHandlers = n;
1672
1706
  };
1673
1707
  return {
1674
1708
  state: e,
@@ -1676,12 +1710,12 @@ function me() {
1676
1710
  close: t,
1677
1711
  open: a,
1678
1712
  setContent: l,
1679
- show: (n, i = {}, r = {}) => {
1680
- n && l(n, i, r), a();
1713
+ show: (o, i = {}, n = {}) => {
1714
+ o && l(o, i, n), a();
1681
1715
  }
1682
1716
  };
1683
1717
  }
1684
- class ya {
1718
+ class ka {
1685
1719
  constructor() {
1686
1720
  this.left = me(), this.right = me();
1687
1721
  }
@@ -1713,22 +1747,22 @@ class ya {
1713
1747
  this.left.close(), this.right.close();
1714
1748
  };
1715
1749
  }
1716
- const Z = new ya(), ba = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, va = { class: "flex flex-1 flex-col" }, xa = {
1750
+ const Z = new ka(), _a = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, wa = { class: "flex flex-1 flex-col" }, Ca = {
1717
1751
  class: "flex flex-1 flex-col gap-y-7",
1718
1752
  role: "list"
1719
- }, ka = { class: "flex flex-1 flex-col" }, _a = {
1753
+ }, Sa = { class: "flex flex-1 flex-col" }, $a = {
1720
1754
  role: "list",
1721
1755
  class: "flex flex-1 flex-col"
1722
- }, wa = { class: "flex items-center pb-8" }, Ca = ["href", "onClick"], Sa = {
1756
+ }, La = { class: "flex items-center pb-8" }, Ha = ["href", "onClick"], Ta = {
1723
1757
  key: 2,
1724
1758
  class: "w-full flex justify-center"
1725
- }, $a = {
1759
+ }, Va = {
1726
1760
  key: 0,
1727
1761
  class: "mt-[5px] flex flex-col gap-[5px]"
1728
- }, La = ["href", "onClick"], Ha = {
1762
+ }, Pa = ["href", "onClick"], Ra = {
1729
1763
  key: 1,
1730
1764
  class: "text-[13px]"
1731
- }, Ta = { class: "mt-auto" }, Va = { class: "p-[10px] flex-shrink-0" }, Pa = { class: "flex flex-1 items-center gap-x-6" }, Ra = { class: "relative flex flex-1 items-center gap-4" }, Ma = { class: "cursor-pointer" }, Fa = ["src"], Aa = { class: "ml-auto" }, Ba = { class: "mr-[10px] pb-[10px] flex-1 flex flex-col" }, br = {
1765
+ }, Ba = { class: "mt-auto" }, Ma = { class: "p-[10px] flex-shrink-0" }, Fa = { class: "flex flex-1 items-center gap-x-6" }, Aa = { class: "relative flex flex-1 items-center gap-4" }, Ea = { class: "cursor-pointer" }, za = ["src"], ja = { class: "ml-auto" }, Ia = { class: "mr-[10px] pb-[10px] flex-1 flex flex-col" }, _r = {
1732
1766
  __name: "SparkDefaultContainer",
1733
1767
  props: {
1734
1768
  appStore: {
@@ -1746,41 +1780,41 @@ const Z = new ya(), ba = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, va =
1746
1780
  },
1747
1781
  emits: ["overlayClose"],
1748
1782
  setup(e, { emit: s }) {
1749
- const t = e, a = s, l = be(), o = Le(), n = Se(), i = k(() => n.getAppIcon(t.appStore.state.app)), r = () => {
1783
+ const t = e, a = s, l = ve(), r = Le(), o = Se(), i = k(() => o.getAppIcon(t.appStore.state.app)), n = () => {
1750
1784
  const p = {};
1751
- l["app-selector-bottom"] ? p.bottomSlot = () => le("div", {}, l["app-selector-bottom"]()) : t.appSelectorSlots.bottomSlot && (p.bottomSlot = t.appSelectorSlots.bottomSlot), l["app-selector-footer"] ? p.footerSlot = () => le("div", {}, l["app-selector-footer"]()) : t.appSelectorSlots.footerSlot && (p.footerSlot = t.appSelectorSlots.footerSlot), Z.showRight(Kt, p, {
1785
+ l["app-selector-bottom"] ? p.bottomSlot = () => le("div", {}, l["app-selector-bottom"]()) : t.appSelectorSlots.bottomSlot && (p.bottomSlot = t.appSelectorSlots.bottomSlot), l["app-selector-footer"] ? p.footerSlot = () => le("div", {}, l["app-selector-footer"]()) : t.appSelectorSlots.footerSlot && (p.footerSlot = t.appSelectorSlots.footerSlot), Z.showRight(Yt, p, {
1752
1786
  select: (h) => {
1753
1787
  Z.closeRight();
1754
1788
  }
1755
1789
  });
1756
1790
  }, d = () => {
1757
1791
  Z.showLeft(
1758
- cs,
1792
+ ps,
1759
1793
  {},
1760
1794
  {
1761
1795
  select: (p) => {
1762
- o.toggleBrand(p), Z.closeLeft();
1796
+ r.toggleBrand(p), Z.closeLeft();
1763
1797
  }
1764
1798
  }
1765
1799
  );
1766
1800
  }, m = k(() => t.mainNavStore.state.hidden ? ["w-0 overflow-hidden"] : [t.mainNavStore.state.collapsed ? "w-[80px]" : "w-[240px]"]), u = k(() => t.mainNavStore.state.hidden ? ["pl-2.5"] : [t.mainNavStore.state.collapsed ? "pl-[80px]" : "pl-[240px]"]);
1767
1801
  return (p, h) => {
1768
- const v = $("font-awesome-icon"), N = $("router-view");
1769
- return f(), g(M, null, [
1802
+ const b = L("font-awesome-icon"), N = L("router-view");
1803
+ return f(), g(B, null, [
1770
1804
  c("div", {
1771
1805
  class: _([m.value, "fixed inset-y-0 flex transition-all z-100"])
1772
1806
  }, [
1773
- c("div", ba, [
1774
- c("nav", va, [
1775
- c("ul", xa, [
1776
- c("li", ka, [
1777
- c("ul", _a, [
1778
- c("li", wa, [
1807
+ c("div", _a, [
1808
+ c("nav", wa, [
1809
+ c("ul", Ca, [
1810
+ c("li", Sa, [
1811
+ c("ul", $a, [
1812
+ c("li", La, [
1779
1813
  c("a", {
1780
1814
  class: "grid w-[40px] h-[40px] place-items-center rounded-md bg-primary-600 text-white text-[13px] cursor-pointer",
1781
1815
  onClick: h[0] || (h[0] = j((C) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"]))
1782
1816
  }, [
1783
- b(v, {
1817
+ v(b, {
1784
1818
  icon: y(H)[i.value],
1785
1819
  class: "size-5"
1786
1820
  }, null, 8, ["icon"])
@@ -1791,7 +1825,7 @@ const Z = new ya(), ba = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, va =
1791
1825
  class: "font-medium text-gray-800 ml-[10px] cursor-pointer"
1792
1826
  }, S(e.appStore.state.app), 1))
1793
1827
  ]),
1794
- (f(!0), g(M, null, B(e.mainNavStore.state.menu, (C) => (f(), g("li", {
1828
+ (f(!0), g(B, null, A(e.mainNavStore.state.menu, (C) => (f(), g("li", {
1795
1829
  key: C.name,
1796
1830
  class: _({
1797
1831
  "mt-[10px]": C.children,
@@ -1806,12 +1840,12 @@ const Z = new ya(), ba = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, va =
1806
1840
  href: C?.href,
1807
1841
  onClick: j((R) => e.mainNavStore.goto(C.href), ["prevent"])
1808
1842
  }, [
1809
- C.icon ? (f(), V(v, {
1843
+ C.icon ? (f(), V(b, {
1810
1844
  key: 0,
1811
1845
  icon: y(H)[C.icon],
1812
1846
  class: _([[(C.current, "text-gray-400")], "size-4"])
1813
1847
  }, null, 8, ["icon", "class"])) : x("", !0),
1814
- e.mainNavStore.state.collapsed ? C?.children ? (f(), g("div", Sa, [...h[6] || (h[6] = [
1848
+ e.mainNavStore.state.collapsed ? C?.children ? (f(), g("div", Ta, [...h[6] || (h[6] = [
1815
1849
  c("div", { class: "w-[10px] h-px bg-gray-400" }, null, -1)
1816
1850
  ])])) : x("", !0) : (f(), g("span", {
1817
1851
  key: 1,
@@ -1822,9 +1856,9 @@ const Z = new ya(), ba = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, va =
1822
1856
  "text-gray-500": C?.children
1823
1857
  })
1824
1858
  }, S(C.name), 3))
1825
- ], 10, Ca),
1826
- C.children ? (f(), g("ul", $a, [
1827
- (f(!0), g(M, null, B(C.children, (R) => (f(), g("li", {
1859
+ ], 10, Ha),
1860
+ C.children ? (f(), g("ul", Va, [
1861
+ (f(!0), g(B, null, A(C.children, (R) => (f(), g("li", {
1828
1862
  key: R.name
1829
1863
  }, [
1830
1864
  c("a", {
@@ -1832,26 +1866,26 @@ const Z = new ya(), ba = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, va =
1832
1866
  href: R.href,
1833
1867
  onClick: j((J) => e.mainNavStore.goto(R.href), ["prevent"])
1834
1868
  }, [
1835
- R.icon ? (f(), V(v, {
1869
+ R.icon ? (f(), V(b, {
1836
1870
  key: 0,
1837
1871
  icon: y(H)[R.icon],
1838
1872
  class: _([[(R.current, "text-gray-400")], "size-4"])
1839
1873
  }, null, 8, ["icon", "class"])) : x("", !0),
1840
- e.mainNavStore.state.collapsed ? x("", !0) : (f(), g("span", Ha, S(R.name), 1))
1841
- ], 10, La)
1874
+ e.mainNavStore.state.collapsed ? x("", !0) : (f(), g("span", Ra, S(R.name), 1))
1875
+ ], 10, Pa)
1842
1876
  ]))), 128))
1843
1877
  ])) : x("", !0)
1844
1878
  ], 2))), 128))
1845
1879
  ])
1846
1880
  ]),
1847
- c("li", Ta, [
1881
+ c("li", Ba, [
1848
1882
  T(p.$slots, "sidebar-footer"),
1849
1883
  c("a", {
1850
1884
  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",
1851
1885
  href: "#",
1852
1886
  onClick: h[2] || (h[2] = j((C) => e.mainNavStore.toggleCollapsed(), ["prevent"]))
1853
1887
  }, [
1854
- b(v, {
1888
+ v(b, {
1855
1889
  icon: y(H)[e.mainNavStore.state.collapsed ? "farArrowRightToLine" : "farArrowLeftToLine"],
1856
1890
  class: "class-5"
1857
1891
  }, null, 8, ["icon"])
@@ -1864,12 +1898,12 @@ const Z = new ya(), ba = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, va =
1864
1898
  c("div", {
1865
1899
  class: _([u.value, "h-full transition-all flex flex-col"])
1866
1900
  }, [
1867
- c("div", Va, [
1868
- c("div", Pa, [
1869
- c("div", Ra, [
1901
+ c("div", Ma, [
1902
+ c("div", Fa, [
1903
+ c("div", Aa, [
1870
1904
  T(p.$slots, "header-left", {}, () => [
1871
- c("div", Ma, [
1872
- b(v, {
1905
+ c("div", Ea, [
1906
+ v(b, {
1873
1907
  icon: y(H).farBarsSort,
1874
1908
  class: "size-5",
1875
1909
  onClick: h[3] || (h[3] = (C) => e.mainNavStore.toggleHidden())
@@ -1882,23 +1916,23 @@ const Z = new ya(), ba = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, va =
1882
1916
  class: "absolute left-1/2 -translate-x-1/2 cursor-pointer h-9 flex items-center",
1883
1917
  onClick: d
1884
1918
  }, [
1885
- y(o).currentBrand ? (f(), g("img", {
1919
+ y(r).currentBrand ? (f(), g("img", {
1886
1920
  key: 0,
1887
- src: y(o).currentBrand.logo,
1921
+ src: y(r).currentBrand.logo,
1888
1922
  alt: "",
1889
1923
  class: "h-[30px] w-auto"
1890
- }, null, 8, Fa)) : x("", !0)
1924
+ }, null, 8, za)) : x("", !0)
1891
1925
  ])) : x("", !0)
1892
1926
  ]),
1893
- c("div", Aa, [
1927
+ c("div", ja, [
1894
1928
  T(p.$slots, "header-right", {}, () => [
1895
1929
  e.appStore.state.showAppSelector ? (f(), g("button", {
1896
1930
  key: 0,
1897
1931
  class: "rounded-sm bg-white w-[42px] h-[42px] ring-1 ring-inset ring-gray-300",
1898
1932
  type: "button",
1899
- onClick: r
1933
+ onClick: n
1900
1934
  }, [
1901
- b(v, {
1935
+ v(b, {
1902
1936
  icon: y(H).farGripDotsVertical,
1903
1937
  class: "size-4 text-gray-400"
1904
1938
  }, null, 8, ["icon"])
@@ -1908,46 +1942,46 @@ const Z = new ya(), ba = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, va =
1908
1942
  ])
1909
1943
  ])
1910
1944
  ]),
1911
- c("main", Ba, [
1912
- b(N)
1945
+ c("main", Ia, [
1946
+ v(N)
1913
1947
  ])
1914
1948
  ], 2),
1915
- b(y(ce), {
1949
+ v(y(ce), {
1916
1950
  position: "left",
1917
1951
  "overlay-instance": y(Z).left,
1918
1952
  onClose: h[4] || (h[4] = (C) => a("overlayClose", "left"))
1919
1953
  }, null, 8, ["overlay-instance"]),
1920
- b(y(ce), {
1954
+ v(y(ce), {
1921
1955
  position: "right",
1922
1956
  "overlay-instance": y(Z).right,
1923
1957
  onClose: h[5] || (h[5] = (C) => a("overlayClose", "right"))
1924
1958
  }, null, 8, ["overlay-instance"]),
1925
- b(y(bs))
1959
+ v(y(ks))
1926
1960
  ], 64);
1927
1961
  };
1928
1962
  }
1929
- }, Ea = {}, za = { class: "h-full" };
1930
- function ja(e, s) {
1931
- const t = $("router-view");
1932
- return f(), g("main", za, [
1933
- b(t)
1963
+ }, Oa = {}, Na = { class: "h-full" };
1964
+ function Da(e, s) {
1965
+ const t = L("router-view");
1966
+ return f(), g("main", Na, [
1967
+ v(t)
1934
1968
  ]);
1935
1969
  }
1936
- const vr = /* @__PURE__ */ I(Ea, [["render", ja]]), Oa = (e) => {
1970
+ const wr = /* @__PURE__ */ O(Oa, [["render", Da]]), Za = (e) => {
1937
1971
  const s = document.cookie.match(new RegExp(`(^| )${e}=([^;]+)`));
1938
1972
  return s ? s[2] : null;
1939
- }, Ia = (e, s, t = {}) => {
1973
+ }, qa = (e, s, t = {}) => {
1940
1974
  const {
1941
1975
  maxAge: a = 31536e3,
1942
1976
  // 365 days in seconds
1943
1977
  domain: l = He(),
1944
- secure: o = !0,
1945
- sameSite: n = "Lax",
1978
+ secure: r = !0,
1979
+ sameSite: o = "Lax",
1946
1980
  path: i = "/"
1947
1981
  } = t;
1948
- let r = `${e}=${s}; max-age=${a}; path=${i}; samesite=${n}`;
1949
- l && (r += `; domain=${l}`), o && (r += "; secure"), document.cookie = r;
1950
- }, Na = (e, s = {}) => {
1982
+ let n = `${e}=${s}; max-age=${a}; path=${i}; samesite=${o}`;
1983
+ l && (n += `; domain=${l}`), r && (n += "; secure"), document.cookie = n;
1984
+ }, Ga = (e, s = {}) => {
1951
1985
  const { domain: t = He(), path: a = "/" } = s;
1952
1986
  let l = `${e}=; max-age=0; path=${a}`;
1953
1987
  t && (l += `; domain=${t}`), document.cookie = l;
@@ -1955,15 +1989,15 @@ const vr = /* @__PURE__ */ I(Ea, [["render", ja]]), Oa = (e) => {
1955
1989
  const e = window.location.hostname;
1956
1990
  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;
1957
1991
  }, Te = [];
1958
- function Da(e) {
1992
+ function Ka(e) {
1959
1993
  Te.push(e);
1960
1994
  }
1961
- function Za() {
1995
+ function Ua() {
1962
1996
  Te.forEach((e) => e());
1963
1997
  }
1964
- function xr(e) {
1998
+ function Cr(e) {
1965
1999
  let s = !1;
1966
- return Da(() => {
2000
+ return Ka(() => {
1967
2001
  s = !1;
1968
2002
  }), {
1969
2003
  bootstrapApp: async () => {
@@ -1976,7 +2010,7 @@ function xr(e) {
1976
2010
  }
1977
2011
  };
1978
2012
  }
1979
- const re = "bolt-next-token", F = X("auth", () => {
2013
+ const re = "bolt-next-token", M = X("auth", () => {
1980
2014
  const e = z({
1981
2015
  user: null,
1982
2016
  token: null,
@@ -2012,13 +2046,13 @@ const re = "bolt-next-token", F = X("auth", () => {
2012
2046
  }), s = (d = {}) => {
2013
2047
  d.endpoints && Object.assign(e.endpoints, d.endpoints), d.routes && Object.assign(e.routes, d.routes), d.devCredentials && Object.assign(e.devCredentials, d.devCredentials), d.callbacks && Object.assign(e.callbacks, d.callbacks), d.overrideToken && (e.overrideToken = d.overrideToken);
2014
2048
  }, t = (d) => {
2015
- Ia(re, d), e.token = d;
2049
+ qa(re, d), e.token = d;
2016
2050
  }, a = () => {
2017
- Na(re), e.token = null;
2018
- }, l = () => Oa(re), o = async (d) => {
2051
+ Ga(re), e.token = null;
2052
+ }, l = () => Za(re), r = async (d) => {
2019
2053
  const m = await K.post(e.endpoints.login, d), u = m.headers.authorization;
2020
2054
  return t(u), e.user = m.data, e.callbacks.onLoginSuccess && await e.callbacks.onLoginSuccess(m.data), m.data;
2021
- }, n = async () => {
2055
+ }, o = async () => {
2022
2056
  try {
2023
2057
  await K.post(
2024
2058
  e.endpoints.logout,
@@ -2032,7 +2066,7 @@ const re = "bolt-next-token", F = X("auth", () => {
2032
2066
  } catch (d) {
2033
2067
  throw e.callbacks.onLogoutError && await e.callbacks.onLogoutError(d), d;
2034
2068
  } finally {
2035
- a(), e.user = null, Za();
2069
+ a(), e.user = null, Ua();
2036
2070
  }
2037
2071
  }, i = async () => {
2038
2072
  const d = e.overrideToken || l();
@@ -2050,29 +2084,29 @@ const re = "bolt-next-token", F = X("auth", () => {
2050
2084
  } finally {
2051
2085
  e.ready = !0;
2052
2086
  }
2053
- }, r = k(() => e.overrideToken ? !0 : !!e.token && !!e.user);
2087
+ }, n = k(() => e.overrideToken ? !0 : !!e.token && !!e.user);
2054
2088
  return {
2055
2089
  state: e,
2056
2090
  initialize: s,
2057
- login: o,
2058
- logout: n,
2091
+ login: r,
2092
+ logout: o,
2059
2093
  fetchUser: i,
2060
- check: r,
2094
+ check: n,
2061
2095
  setTokenCookie: t,
2062
2096
  clearTokenCookie: a,
2063
2097
  getTokenCookie: l
2064
2098
  };
2065
- }), qa = { class: "h-full grid place-content-center relative" }, Ga = { class: "absolute top-8 left-8" }, Ka = ["src"], Ua = {
2099
+ }), Wa = { class: "h-full grid place-content-center relative" }, Ya = { class: "absolute top-8 left-8" }, Xa = ["src"], Ja = {
2066
2100
  key: 1,
2067
2101
  width: "59",
2068
2102
  height: "23",
2069
2103
  viewBox: "0 0 59 23",
2070
2104
  fill: "none",
2071
2105
  xmlns: "http://www.w3.org/2000/svg"
2072
- }, Wa = { class: "max-w-sm grid gap-y-1 -mt-8" }, Ya = { class: "mb-7" }, Xa = { class: "text-gray-600" }, Ja = { class: "grid grid-flow-col justify-between mt-1 mb-4" }, Qa = {
2106
+ }, Qa = { class: "max-w-sm grid gap-y-1 -mt-8" }, eo = { class: "mb-7" }, to = { class: "text-gray-600" }, so = { class: "grid grid-flow-col justify-between mt-1 mb-4" }, ao = {
2073
2107
  key: 0,
2074
2108
  class: "text-red-600 text-sm mb-2"
2075
- }, eo = { key: 0 }, to = { key: 1 }, so = {
2109
+ }, oo = { key: 0 }, ro = { key: 1 }, no = {
2076
2110
  __name: "SparkLoginView",
2077
2111
  props: {
2078
2112
  logo: {
@@ -2089,8 +2123,8 @@ const re = "bolt-next-token", F = X("auth", () => {
2089
2123
  }
2090
2124
  },
2091
2125
  setup(e) {
2092
- const s = O(), t = se(), a = $e(), l = F(), o = e, n = L(!1), i = L(""), r = async (d) => {
2093
- n.value = !0, i.value = "";
2126
+ const s = I(), t = se(), a = $e(), l = M(), r = e, o = $(!1), i = $(""), n = async (d) => {
2127
+ o.value = !0, i.value = "";
2094
2128
  try {
2095
2129
  await l.login(d);
2096
2130
  const m = t.query.redirect;
@@ -2101,23 +2135,23 @@ const re = "bolt-next-token", F = X("auth", () => {
2101
2135
  }
2102
2136
  await s.push(m);
2103
2137
  } else
2104
- await s.push(o.defaultRedirect);
2138
+ await s.push(r.defaultRedirect);
2105
2139
  } catch (m) {
2106
2140
  i.value = m.response?.data?.message || m.message || "Login failed. Please try again.";
2107
2141
  } finally {
2108
- n.value = !1;
2142
+ o.value = !1;
2109
2143
  }
2110
2144
  };
2111
2145
  return (d, m) => {
2112
- const u = $("FormKit"), p = $("router-link");
2113
- return f(), g("div", qa, [
2114
- c("div", Ga, [
2115
- o.logo ? (f(), g("img", {
2146
+ const u = L("FormKit"), p = L("router-link");
2147
+ return f(), g("div", Wa, [
2148
+ c("div", Ya, [
2149
+ r.logo ? (f(), g("img", {
2116
2150
  key: 0,
2117
- src: o.logo,
2151
+ src: r.logo,
2118
2152
  alt: "Logo",
2119
2153
  class: "h-[23px] w-auto"
2120
- }, null, 8, Ka)) : (f(), g("svg", Ua, [...m[0] || (m[0] = [
2154
+ }, null, 8, Xa)) : (f(), g("svg", Ja, [...m[0] || (m[0] = [
2121
2155
  c("path", {
2122
2156
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
2123
2157
  fill: "#1C64F2"
@@ -2136,18 +2170,18 @@ const re = "bolt-next-token", F = X("auth", () => {
2136
2170
  }, null, -1)
2137
2171
  ])]))
2138
2172
  ]),
2139
- c("div", Wa, [
2140
- c("div", Ya, [
2173
+ c("div", Qa, [
2174
+ c("div", eo, [
2141
2175
  m[1] || (m[1] = c("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Log in", -1)),
2142
- c("p", Xa, " Welcome back" + S(y(a).state.app ? ` to ${y(a).state.app}` : "") + "! Please enter your details. ", 1)
2176
+ c("p", to, " Welcome back" + S(y(a).state.app ? ` to ${y(a).state.app}` : "") + "! Please enter your details. ", 1)
2143
2177
  ]),
2144
- b(u, {
2178
+ v(u, {
2145
2179
  type: "form",
2146
- onSubmit: r,
2180
+ onSubmit: n,
2147
2181
  actions: !1
2148
2182
  }, {
2149
2183
  default: w(() => [
2150
- b(u, {
2184
+ v(u, {
2151
2185
  label: "Email",
2152
2186
  name: "email",
2153
2187
  placeholder: "Enter your email",
@@ -2156,7 +2190,7 @@ const re = "bolt-next-token", F = X("auth", () => {
2156
2190
  "outer-class": "max-w-full",
2157
2191
  value: y(l).state.devCredentials.username
2158
2192
  }, null, 8, ["value"]),
2159
- b(u, {
2193
+ v(u, {
2160
2194
  label: "Password",
2161
2195
  name: "password",
2162
2196
  placeholder: "••••••••",
@@ -2165,10 +2199,10 @@ const re = "bolt-next-token", F = X("auth", () => {
2165
2199
  "outer-class": "max-w-full",
2166
2200
  value: y(l).state.devCredentials.password
2167
2201
  }, null, 8, ["value"]),
2168
- c("div", Ja, [
2202
+ c("div", so, [
2169
2203
  m[3] || (m[3] = c("span", null, null, -1)),
2170
- b(p, {
2171
- to: o.forgotPasswordRoute,
2204
+ v(p, {
2205
+ to: r.forgotPasswordRoute,
2172
2206
  class: "text-sm text-primary-600 font-semibold"
2173
2207
  }, {
2174
2208
  default: w(() => [...m[2] || (m[2] = [
@@ -2177,15 +2211,15 @@ const re = "bolt-next-token", F = X("auth", () => {
2177
2211
  _: 1
2178
2212
  }, 8, ["to"])
2179
2213
  ]),
2180
- i.value ? (f(), g("div", Qa, S(i.value), 1)) : x("", !0),
2181
- b(y(A), {
2214
+ i.value ? (f(), g("div", ao, S(i.value), 1)) : x("", !0),
2215
+ v(y(F), {
2182
2216
  type: "submit",
2183
2217
  size: "xl",
2184
- disabled: n.value,
2218
+ disabled: o.value,
2185
2219
  "button-class": "w-full mb-2"
2186
2220
  }, {
2187
2221
  default: w(() => [
2188
- n.value ? (f(), g("span", to, "Signing in...")) : (f(), g("span", eo, "Sign in"))
2222
+ o.value ? (f(), g("span", ro, "Signing in...")) : (f(), g("span", oo, "Sign in"))
2189
2223
  ]),
2190
2224
  _: 1
2191
2225
  }, 8, ["disabled"])
@@ -2196,7 +2230,7 @@ const re = "bolt-next-token", F = X("auth", () => {
2196
2230
  ]);
2197
2231
  };
2198
2232
  }
2199
- }, ao = {
2233
+ }, lo = {
2200
2234
  __name: "SparkLogoutView",
2201
2235
  props: {
2202
2236
  defaultRedirect: {
@@ -2205,27 +2239,27 @@ const re = "bolt-next-token", F = X("auth", () => {
2205
2239
  }
2206
2240
  },
2207
2241
  setup(e) {
2208
- const s = O(), t = se(), a = F(), l = e;
2209
- return ve(async () => {
2242
+ const s = I(), t = se(), a = M(), l = e;
2243
+ return be(async () => {
2210
2244
  await a.logout();
2211
- const o = t.query.redirect;
2212
- o && o.startsWith("http") ? window.location.href = o : await s.push(o || l.defaultRedirect);
2213
- }), (o, n) => null;
2245
+ const r = t.query.redirect;
2246
+ r && r.startsWith("http") ? window.location.href = r : await s.push(r || l.defaultRedirect);
2247
+ }), (r, o) => null;
2214
2248
  }
2215
- }, oo = { class: "h-full grid place-content-center relative" }, ro = { class: "absolute top-8 left-8" }, no = ["src"], lo = {
2249
+ }, io = { class: "h-full grid place-content-center relative" }, co = { class: "absolute top-8 left-8" }, uo = ["src"], po = {
2216
2250
  key: 1,
2217
2251
  width: "59",
2218
2252
  height: "23",
2219
2253
  viewBox: "0 0 59 23",
2220
2254
  fill: "none",
2221
2255
  xmlns: "http://www.w3.org/2000/svg"
2222
- }, io = { class: "max-w-sm grid gap-y-1 -mt-8" }, co = {
2256
+ }, fo = { class: "max-w-sm grid gap-y-1 -mt-8" }, mo = {
2223
2257
  key: 0,
2224
2258
  class: "text-red-600 text-sm mb-2"
2225
- }, uo = {
2259
+ }, go = {
2226
2260
  key: 1,
2227
2261
  class: "text-green-600 text-sm mb-2"
2228
- }, po = { key: 0 }, fo = { key: 1 }, mo = {
2262
+ }, ho = { key: 0 }, yo = { key: 1 }, vo = {
2229
2263
  __name: "SparkForgotPasswordView",
2230
2264
  props: {
2231
2265
  logo: {
@@ -2238,26 +2272,26 @@ const re = "bolt-next-token", F = X("auth", () => {
2238
2272
  }
2239
2273
  },
2240
2274
  setup(e) {
2241
- const s = F(), t = e, a = L(!1), l = L(""), o = L(""), n = async ({ email: i }) => {
2242
- a.value = !0, l.value = "", o.value = "";
2275
+ const s = M(), t = e, a = $(!1), l = $(""), r = $(""), o = async ({ email: i }) => {
2276
+ a.value = !0, l.value = "", r.value = "";
2243
2277
  try {
2244
- await K.post(s.state.endpoints.passwordEmail, { email: i }), o.value = "Password reset link sent! Check your email.";
2245
- } catch (r) {
2246
- l.value = r.response?.data?.message || "Failed to send reset link.";
2278
+ await K.post(s.state.endpoints.passwordEmail, { email: i }), r.value = "Password reset link sent! Check your email.";
2279
+ } catch (n) {
2280
+ l.value = n.response?.data?.message || "Failed to send reset link.";
2247
2281
  } finally {
2248
2282
  a.value = !1;
2249
2283
  }
2250
2284
  };
2251
- return (i, r) => {
2252
- const d = $("FormKit"), m = $("router-link");
2253
- return f(), g("div", oo, [
2254
- c("div", ro, [
2285
+ return (i, n) => {
2286
+ const d = L("FormKit"), m = L("router-link");
2287
+ return f(), g("div", io, [
2288
+ c("div", co, [
2255
2289
  t.logo ? (f(), g("img", {
2256
2290
  key: 0,
2257
2291
  src: t.logo,
2258
2292
  alt: "Logo",
2259
2293
  class: "h-[23px] w-auto"
2260
- }, null, 8, no)) : (f(), g("svg", lo, [...r[0] || (r[0] = [
2294
+ }, null, 8, uo)) : (f(), g("svg", po, [...n[0] || (n[0] = [
2261
2295
  c("path", {
2262
2296
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
2263
2297
  fill: "#1C64F2"
@@ -2276,18 +2310,18 @@ const re = "bolt-next-token", F = X("auth", () => {
2276
2310
  }, null, -1)
2277
2311
  ])]))
2278
2312
  ]),
2279
- c("div", io, [
2280
- r[2] || (r[2] = c("div", { class: "mb-7" }, [
2313
+ c("div", fo, [
2314
+ n[2] || (n[2] = c("div", { class: "mb-7" }, [
2281
2315
  c("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Reset password"),
2282
2316
  c("p", { class: "text-gray-600" }, " Enter your email and we'll send you a link to reset your password. ")
2283
2317
  ], -1)),
2284
- b(d, {
2318
+ v(d, {
2285
2319
  type: "form",
2286
- onSubmit: n,
2320
+ onSubmit: o,
2287
2321
  actions: !1
2288
2322
  }, {
2289
2323
  default: w(() => [
2290
- b(d, {
2324
+ v(d, {
2291
2325
  label: "Email",
2292
2326
  name: "email",
2293
2327
  placeholder: "Enter your email",
@@ -2295,24 +2329,24 @@ const re = "bolt-next-token", F = X("auth", () => {
2295
2329
  validation: "required|email",
2296
2330
  "outer-class": "max-w-full"
2297
2331
  }),
2298
- l.value ? (f(), g("div", co, S(l.value), 1)) : x("", !0),
2299
- o.value ? (f(), g("div", uo, S(o.value), 1)) : x("", !0),
2300
- b(y(A), {
2332
+ l.value ? (f(), g("div", mo, S(l.value), 1)) : x("", !0),
2333
+ r.value ? (f(), g("div", go, S(r.value), 1)) : x("", !0),
2334
+ v(y(F), {
2301
2335
  type: "submit",
2302
2336
  size: "xl",
2303
2337
  disabled: a.value,
2304
2338
  "button-class": "w-full mb-2"
2305
2339
  }, {
2306
2340
  default: w(() => [
2307
- a.value ? (f(), g("span", fo, "Sending...")) : (f(), g("span", po, "Send reset link"))
2341
+ a.value ? (f(), g("span", yo, "Sending...")) : (f(), g("span", ho, "Send reset link"))
2308
2342
  ]),
2309
2343
  _: 1
2310
2344
  }, 8, ["disabled"]),
2311
- b(m, {
2345
+ v(m, {
2312
2346
  to: t.loginRoute,
2313
2347
  class: "text-sm text-center text-primary-600 font-semibold block"
2314
2348
  }, {
2315
- default: w(() => [...r[1] || (r[1] = [
2349
+ default: w(() => [...n[1] || (n[1] = [
2316
2350
  P(" Back to login ", -1)
2317
2351
  ])]),
2318
2352
  _: 1
@@ -2324,17 +2358,17 @@ const re = "bolt-next-token", F = X("auth", () => {
2324
2358
  ]);
2325
2359
  };
2326
2360
  }
2327
- }, go = { class: "h-full grid place-content-center relative" }, ho = { class: "absolute top-8 left-8" }, yo = ["src"], bo = {
2361
+ }, bo = { class: "h-full grid place-content-center relative" }, xo = { class: "absolute top-8 left-8" }, ko = ["src"], _o = {
2328
2362
  key: 1,
2329
2363
  width: "59",
2330
2364
  height: "23",
2331
2365
  viewBox: "0 0 59 23",
2332
2366
  fill: "none",
2333
2367
  xmlns: "http://www.w3.org/2000/svg"
2334
- }, vo = { class: "max-w-sm grid gap-y-1 -mt-8" }, xo = {
2368
+ }, wo = { class: "max-w-sm grid gap-y-1 -mt-8" }, Co = {
2335
2369
  key: 0,
2336
2370
  class: "text-red-600 text-sm mb-2"
2337
- }, ko = { key: 0 }, _o = { key: 1 }, wo = {
2371
+ }, So = { key: 0 }, $o = { key: 1 }, Lo = {
2338
2372
  __name: "SparkResetPasswordView",
2339
2373
  props: {
2340
2374
  logo: {
@@ -2347,31 +2381,31 @@ const re = "bolt-next-token", F = X("auth", () => {
2347
2381
  }
2348
2382
  },
2349
2383
  setup(e) {
2350
- const s = O(), t = se(), a = F(), l = e, o = L(!1), n = L(""), i = async ({ password: r, password_confirmation: d }) => {
2351
- o.value = !0, n.value = "";
2384
+ const s = I(), t = se(), a = M(), l = e, r = $(!1), o = $(""), i = async ({ password: n, password_confirmation: d }) => {
2385
+ r.value = !0, o.value = "";
2352
2386
  try {
2353
2387
  await K.post(a.state.endpoints.passwordReset, {
2354
2388
  email: t.query.email,
2355
2389
  token: t.query.token,
2356
- password: r,
2390
+ password: n,
2357
2391
  password_confirmation: d
2358
2392
  }), await s.push(l.loginRoute);
2359
2393
  } catch (m) {
2360
- n.value = m.response?.data?.message || "Failed to reset password.";
2394
+ o.value = m.response?.data?.message || "Failed to reset password.";
2361
2395
  } finally {
2362
- o.value = !1;
2396
+ r.value = !1;
2363
2397
  }
2364
2398
  };
2365
- return (r, d) => {
2366
- const m = $("FormKit");
2367
- return f(), g("div", go, [
2368
- c("div", ho, [
2399
+ return (n, d) => {
2400
+ const m = L("FormKit");
2401
+ return f(), g("div", bo, [
2402
+ c("div", xo, [
2369
2403
  l.logo ? (f(), g("img", {
2370
2404
  key: 0,
2371
2405
  src: l.logo,
2372
2406
  alt: "Logo",
2373
2407
  class: "h-[23px] w-auto"
2374
- }, null, 8, yo)) : (f(), g("svg", bo, [...d[0] || (d[0] = [
2408
+ }, null, 8, ko)) : (f(), g("svg", _o, [...d[0] || (d[0] = [
2375
2409
  c("path", {
2376
2410
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
2377
2411
  fill: "#1C64F2"
@@ -2390,18 +2424,18 @@ const re = "bolt-next-token", F = X("auth", () => {
2390
2424
  }, null, -1)
2391
2425
  ])]))
2392
2426
  ]),
2393
- c("div", vo, [
2427
+ c("div", wo, [
2394
2428
  d[1] || (d[1] = c("div", { class: "mb-7" }, [
2395
2429
  c("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Set new password"),
2396
2430
  c("p", { class: "text-gray-600" }, " Enter your new password below. ")
2397
2431
  ], -1)),
2398
- b(m, {
2432
+ v(m, {
2399
2433
  type: "form",
2400
2434
  onSubmit: i,
2401
2435
  actions: !1
2402
2436
  }, {
2403
2437
  default: w(() => [
2404
- b(m, {
2438
+ v(m, {
2405
2439
  label: "New Password",
2406
2440
  name: "password",
2407
2441
  placeholder: "••••••••",
@@ -2409,7 +2443,7 @@ const re = "bolt-next-token", F = X("auth", () => {
2409
2443
  validation: "required|length:8",
2410
2444
  "outer-class": "max-w-full"
2411
2445
  }),
2412
- b(m, {
2446
+ v(m, {
2413
2447
  label: "Confirm Password",
2414
2448
  name: "password_confirmation",
2415
2449
  placeholder: "••••••••",
@@ -2417,15 +2451,15 @@ const re = "bolt-next-token", F = X("auth", () => {
2417
2451
  validation: "required|confirm:password",
2418
2452
  "outer-class": "max-w-full"
2419
2453
  }),
2420
- n.value ? (f(), g("div", xo, S(n.value), 1)) : x("", !0),
2421
- b(y(A), {
2454
+ o.value ? (f(), g("div", Co, S(o.value), 1)) : x("", !0),
2455
+ v(y(F), {
2422
2456
  type: "submit",
2423
2457
  size: "xl",
2424
- disabled: o.value,
2458
+ disabled: r.value,
2425
2459
  "button-class": "w-full mb-2"
2426
2460
  }, {
2427
2461
  default: w(() => [
2428
- o.value ? (f(), g("span", _o, "Resetting...")) : (f(), g("span", ko, "Reset password"))
2462
+ r.value ? (f(), g("span", $o, "Resetting...")) : (f(), g("span", So, "Reset password"))
2429
2463
  ]),
2430
2464
  _: 1
2431
2465
  }, 8, ["disabled"])
@@ -2436,14 +2470,14 @@ const re = "bolt-next-token", F = X("auth", () => {
2436
2470
  ]);
2437
2471
  };
2438
2472
  }
2439
- }, Co = { class: "h-full grid place-content-center relative" }, So = { class: "absolute top-8 left-8" }, $o = ["src"], Lo = {
2473
+ }, Ho = { class: "h-full grid place-content-center relative" }, To = { class: "absolute top-8 left-8" }, Vo = ["src"], Po = {
2440
2474
  key: 1,
2441
2475
  width: "59",
2442
2476
  height: "23",
2443
2477
  viewBox: "0 0 59 23",
2444
2478
  fill: "none",
2445
2479
  xmlns: "http://www.w3.org/2000/svg"
2446
- }, Ho = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, To = { class: "flex gap-4 justify-center" }, Vo = {
2480
+ }, Ro = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, Bo = { class: "flex gap-4 justify-center" }, Mo = {
2447
2481
  __name: "SparkError403View",
2448
2482
  props: {
2449
2483
  logo: {
@@ -2456,17 +2490,17 @@ const re = "bolt-next-token", F = X("auth", () => {
2456
2490
  }
2457
2491
  },
2458
2492
  setup(e) {
2459
- const s = O(), t = e, a = () => {
2493
+ const s = I(), t = e, a = () => {
2460
2494
  s.push(t.homeRoute);
2461
2495
  };
2462
- return (l, o) => (f(), g("div", Co, [
2463
- c("div", So, [
2496
+ return (l, r) => (f(), g("div", Ho, [
2497
+ c("div", To, [
2464
2498
  t.logo ? (f(), g("img", {
2465
2499
  key: 0,
2466
2500
  src: t.logo,
2467
2501
  alt: "Logo",
2468
2502
  class: "h-[23px] w-auto"
2469
- }, null, 8, $o)) : (f(), g("svg", Lo, [...o[0] || (o[0] = [
2503
+ }, null, 8, Vo)) : (f(), g("svg", Po, [...r[0] || (r[0] = [
2470
2504
  c("path", {
2471
2505
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
2472
2506
  fill: "#1C64F2"
@@ -2485,8 +2519,8 @@ const re = "bolt-next-token", F = X("auth", () => {
2485
2519
  }, null, -1)
2486
2520
  ])]))
2487
2521
  ]),
2488
- c("div", Ho, [
2489
- o[2] || (o[2] = c("div", null, [
2522
+ c("div", Ro, [
2523
+ r[2] || (r[2] = c("div", null, [
2490
2524
  c("div", { class: "text-primary-600 text-7xl font-bold mb-4" }, "403"),
2491
2525
  c("h1", { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, " Access Forbidden "),
2492
2526
  c("p", { class: "text-gray-600" }, [
@@ -2495,12 +2529,12 @@ const re = "bolt-next-token", F = X("auth", () => {
2495
2529
  P(" If you believe this is an error, please contact your administrator. ")
2496
2530
  ])
2497
2531
  ], -1)),
2498
- c("div", To, [
2499
- b(y(A), {
2532
+ c("div", Bo, [
2533
+ v(y(F), {
2500
2534
  onClick: a,
2501
2535
  size: "lg"
2502
2536
  }, {
2503
- default: w(() => [...o[1] || (o[1] = [
2537
+ default: w(() => [...r[1] || (r[1] = [
2504
2538
  P(" Go to Home ", -1)
2505
2539
  ])]),
2506
2540
  _: 1
@@ -2509,14 +2543,14 @@ const re = "bolt-next-token", F = X("auth", () => {
2509
2543
  ])
2510
2544
  ]));
2511
2545
  }
2512
- }, Po = { class: "h-full grid place-content-center relative" }, Ro = { class: "absolute top-8 left-8" }, Mo = ["src"], Fo = {
2546
+ }, Fo = { class: "h-full grid place-content-center relative" }, Ao = { class: "absolute top-8 left-8" }, Eo = ["src"], zo = {
2513
2547
  key: 1,
2514
2548
  width: "59",
2515
2549
  height: "23",
2516
2550
  viewBox: "0 0 59 23",
2517
2551
  fill: "none",
2518
2552
  xmlns: "http://www.w3.org/2000/svg"
2519
- }, Ao = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, Bo = { class: "flex gap-4 justify-center" }, Eo = {
2553
+ }, jo = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, Io = { class: "flex gap-4 justify-center" }, Oo = {
2520
2554
  __name: "SparkError404View",
2521
2555
  props: {
2522
2556
  logo: {
@@ -2529,17 +2563,17 @@ const re = "bolt-next-token", F = X("auth", () => {
2529
2563
  }
2530
2564
  },
2531
2565
  setup(e) {
2532
- const s = O(), t = e, a = () => {
2566
+ const s = I(), t = e, a = () => {
2533
2567
  s.push(t.homeRoute);
2534
2568
  };
2535
- return (l, o) => (f(), g("div", Po, [
2536
- c("div", Ro, [
2569
+ return (l, r) => (f(), g("div", Fo, [
2570
+ c("div", Ao, [
2537
2571
  t.logo ? (f(), g("img", {
2538
2572
  key: 0,
2539
2573
  src: t.logo,
2540
2574
  alt: "Logo",
2541
2575
  class: "h-[23px] w-auto"
2542
- }, null, 8, Mo)) : (f(), g("svg", Fo, [...o[0] || (o[0] = [
2576
+ }, null, 8, Eo)) : (f(), g("svg", zo, [...r[0] || (r[0] = [
2543
2577
  c("path", {
2544
2578
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
2545
2579
  fill: "#1C64F2"
@@ -2558,18 +2592,18 @@ const re = "bolt-next-token", F = X("auth", () => {
2558
2592
  }, null, -1)
2559
2593
  ])]))
2560
2594
  ]),
2561
- c("div", Ao, [
2562
- o[2] || (o[2] = c("div", null, [
2595
+ c("div", jo, [
2596
+ r[2] || (r[2] = c("div", null, [
2563
2597
  c("div", { class: "text-primary-600 text-7xl font-bold mb-4" }, "404"),
2564
2598
  c("h1", { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, " Page Not Found "),
2565
2599
  c("p", { class: "text-gray-600" }, " The page you're looking for doesn't exist or has been moved. ")
2566
2600
  ], -1)),
2567
- c("div", Bo, [
2568
- b(y(A), {
2601
+ c("div", Io, [
2602
+ v(y(F), {
2569
2603
  onClick: a,
2570
2604
  size: "lg"
2571
2605
  }, {
2572
- default: w(() => [...o[1] || (o[1] = [
2606
+ default: w(() => [...r[1] || (r[1] = [
2573
2607
  P(" Go to Home ", -1)
2574
2608
  ])]),
2575
2609
  _: 1
@@ -2578,14 +2612,14 @@ const re = "bolt-next-token", F = X("auth", () => {
2578
2612
  ])
2579
2613
  ]));
2580
2614
  }
2581
- }, zo = { class: "h-full grid place-content-center relative" }, jo = { class: "absolute top-8 left-8" }, Oo = ["src"], Io = {
2615
+ }, No = { class: "h-full grid place-content-center relative" }, Do = { class: "absolute top-8 left-8" }, Zo = ["src"], qo = {
2582
2616
  key: 1,
2583
2617
  width: "59",
2584
2618
  height: "23",
2585
2619
  viewBox: "0 0 59 23",
2586
2620
  fill: "none",
2587
2621
  xmlns: "http://www.w3.org/2000/svg"
2588
- }, No = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, Do = { class: "text-primary-600 text-7xl font-bold mb-4" }, Zo = { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, qo = { class: "text-gray-600" }, Go = { class: "flex gap-4 justify-center" }, kr = {
2622
+ }, Go = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, Ko = { class: "text-primary-600 text-7xl font-bold mb-4" }, Uo = { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, Wo = { class: "text-gray-600" }, Yo = { class: "flex gap-4 justify-center" }, Sr = {
2589
2623
  __name: "SparkErrorGeneralView",
2590
2624
  props: {
2591
2625
  logo: {
@@ -2610,17 +2644,17 @@ const re = "bolt-next-token", F = X("auth", () => {
2610
2644
  }
2611
2645
  },
2612
2646
  setup(e) {
2613
- const s = O(), t = e, a = () => {
2647
+ const s = I(), t = e, a = () => {
2614
2648
  s.push(t.homeRoute);
2615
2649
  };
2616
- return (l, o) => (f(), g("div", zo, [
2617
- c("div", jo, [
2650
+ return (l, r) => (f(), g("div", No, [
2651
+ c("div", Do, [
2618
2652
  t.logo ? (f(), g("img", {
2619
2653
  key: 0,
2620
2654
  src: t.logo,
2621
2655
  alt: "Logo",
2622
2656
  class: "h-[23px] w-auto"
2623
- }, null, 8, Oo)) : (f(), g("svg", Io, [...o[0] || (o[0] = [
2657
+ }, null, 8, Zo)) : (f(), g("svg", qo, [...r[0] || (r[0] = [
2624
2658
  c("path", {
2625
2659
  d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
2626
2660
  fill: "#1C64F2"
@@ -2639,18 +2673,18 @@ const re = "bolt-next-token", F = X("auth", () => {
2639
2673
  }, null, -1)
2640
2674
  ])]))
2641
2675
  ]),
2642
- c("div", No, [
2676
+ c("div", Go, [
2643
2677
  c("div", null, [
2644
- c("div", Do, S(t.errorCode || "Error"), 1),
2645
- c("h1", Zo, S(t.title || "Something went wrong"), 1),
2646
- c("p", qo, S(t.message || "An unexpected error occurred. Please try again later."), 1)
2678
+ c("div", Ko, S(t.errorCode || "Error"), 1),
2679
+ c("h1", Uo, S(t.title || "Something went wrong"), 1),
2680
+ c("p", Wo, S(t.message || "An unexpected error occurred. Please try again later."), 1)
2647
2681
  ]),
2648
- c("div", Go, [
2649
- b(y(A), {
2682
+ c("div", Yo, [
2683
+ v(y(F), {
2650
2684
  onClick: a,
2651
2685
  size: "lg"
2652
2686
  }, {
2653
- default: w(() => [...o[1] || (o[1] = [
2687
+ default: w(() => [...r[1] || (r[1] = [
2654
2688
  P(" Go to Home ", -1)
2655
2689
  ])]),
2656
2690
  _: 1
@@ -2660,60 +2694,60 @@ const re = "bolt-next-token", F = X("auth", () => {
2660
2694
  ]));
2661
2695
  }
2662
2696
  };
2663
- function _r(e = {}) {
2697
+ function $r(e = {}) {
2664
2698
  const {
2665
2699
  loginPath: s = "/login",
2666
2700
  logoutPath: t = "/logout",
2667
2701
  forgotPasswordPath: a = "/forgot-password",
2668
2702
  resetPasswordPath: l = "/password/reset",
2669
- logo: o = "",
2670
- defaultRedirect: n = "/dashboard"
2703
+ logo: r = "",
2704
+ defaultRedirect: o = "/dashboard"
2671
2705
  } = e;
2672
2706
  return [
2673
2707
  {
2674
2708
  path: s,
2675
2709
  name: "login",
2676
- component: so,
2677
- props: { logo: o, defaultRedirect: n },
2710
+ component: no,
2711
+ props: { logo: r, defaultRedirect: o },
2678
2712
  meta: { auth: !1 }
2679
2713
  },
2680
2714
  {
2681
2715
  path: t,
2682
2716
  name: "logout",
2683
- component: ao,
2717
+ component: lo,
2684
2718
  props: { defaultRedirect: s },
2685
2719
  meta: { auth: !1 }
2686
2720
  },
2687
2721
  {
2688
2722
  path: a,
2689
2723
  name: "forgot-password",
2690
- component: mo,
2691
- props: { logo: o, loginRoute: s },
2724
+ component: vo,
2725
+ props: { logo: r, loginRoute: s },
2692
2726
  meta: { auth: !1 }
2693
2727
  },
2694
2728
  {
2695
2729
  path: l,
2696
2730
  name: "password-reset",
2697
- component: wo,
2698
- props: { logo: o, loginRoute: s },
2731
+ component: Lo,
2732
+ props: { logo: r, loginRoute: s },
2699
2733
  meta: { auth: !1 }
2700
2734
  }
2701
2735
  ];
2702
2736
  }
2703
- function wr(e, s = {}) {
2737
+ function Lr(e, s = {}) {
2704
2738
  const { defaultAuthenticatedRoute: t = "/dashboard" } = s;
2705
- e.beforeEach(async (a, l, o) => {
2706
- const n = F();
2707
- n.state.ready || await n.fetchUser(), Ko(a, o, n, t);
2739
+ e.beforeEach(async (a, l, r) => {
2740
+ const o = M();
2741
+ o.state.ready || await o.fetchUser(), Xo(a, r, o, t);
2708
2742
  });
2709
2743
  }
2710
- function Ko(e, s, t, a) {
2711
- const l = e.meta.auth !== !1, o = t.check;
2744
+ function Xo(e, s, t, a) {
2745
+ const l = e.meta.auth !== !1, r = t.check;
2712
2746
  if (t.state.overrideToken && e.path === "/logout") {
2713
2747
  s({ path: a });
2714
2748
  return;
2715
2749
  }
2716
- if (!o) {
2750
+ if (!r) {
2717
2751
  if (!l) {
2718
2752
  if (e.path === "/logout") {
2719
2753
  s({ path: t.state.routes.auth });
@@ -2722,18 +2756,18 @@ function Ko(e, s, t, a) {
2722
2756
  s();
2723
2757
  return;
2724
2758
  }
2725
- let n = e.fullPath;
2726
- if (n === "/" || n === "" || n === a) {
2759
+ let o = e.fullPath;
2760
+ if (o === "/" || o === "" || o === a) {
2727
2761
  s({ path: t.state.routes.auth });
2728
2762
  return;
2729
2763
  }
2730
- n.includes("%") && (n = decodeURIComponent(n)), s({
2764
+ o.includes("%") && (o = decodeURIComponent(o)), s({
2731
2765
  path: t.state.routes.auth,
2732
- query: { redirect: n }
2766
+ query: { redirect: o }
2733
2767
  });
2734
2768
  return;
2735
2769
  }
2736
- if (o) {
2770
+ if (r) {
2737
2771
  if (!l && e.path === t.state.routes.auth) {
2738
2772
  s({ path: a });
2739
2773
  return;
@@ -2745,7 +2779,7 @@ function Ko(e, s, t, a) {
2745
2779
  s();
2746
2780
  }
2747
2781
  }
2748
- function Cr(e = {}) {
2782
+ function Hr(e = {}) {
2749
2783
  const {
2750
2784
  forbiddenPath: s = "/error/403",
2751
2785
  logo: t = "",
@@ -2754,12 +2788,12 @@ function Cr(e = {}) {
2754
2788
  return {
2755
2789
  path: s,
2756
2790
  name: "error-403",
2757
- component: Vo,
2791
+ component: Mo,
2758
2792
  props: { logo: t, homeRoute: a },
2759
2793
  meta: { auth: !1 }
2760
2794
  };
2761
2795
  }
2762
- function Sr(e = {}) {
2796
+ function Tr(e = {}) {
2763
2797
  const {
2764
2798
  logo: s = "",
2765
2799
  homeRoute: t = "/dashboard"
@@ -2767,20 +2801,20 @@ function Sr(e = {}) {
2767
2801
  return {
2768
2802
  path: "/:pathMatch(.*)*",
2769
2803
  name: "error-404",
2770
- component: Eo,
2804
+ component: Oo,
2771
2805
  props: { logo: s, homeRoute: t },
2772
2806
  meta: { auth: !1 }
2773
2807
  };
2774
2808
  }
2775
- function $r(e, s) {
2809
+ function Vr(e, s) {
2776
2810
  e.beforeResolve(async (t) => {
2777
2811
  if (t.meta.auth !== !1) {
2778
- const a = F();
2812
+ const a = M();
2779
2813
  a.state.ready && a.check && await s();
2780
2814
  }
2781
2815
  });
2782
2816
  }
2783
- function Uo(e = {}) {
2817
+ function Jo(e = {}) {
2784
2818
  const s = K.create({
2785
2819
  baseURL: e.baseURL || "",
2786
2820
  timeout: e.timeout || 3e4,
@@ -2792,7 +2826,7 @@ function Uo(e = {}) {
2792
2826
  return s.interceptors.request.use(
2793
2827
  (t) => {
2794
2828
  try {
2795
- const a = F();
2829
+ const a = M();
2796
2830
  a.state.overrideToken ? t.headers.Authorization = `Bearer ${a.state.overrideToken}` : a.state.token && (t.headers.Authorization = `Bearer ${a.state.token}`);
2797
2831
  } catch {
2798
2832
  }
@@ -2804,14 +2838,14 @@ function Uo(e = {}) {
2804
2838
  async (t) => {
2805
2839
  if (t.response?.status === 401)
2806
2840
  try {
2807
- const a = F();
2841
+ const a = M();
2808
2842
  await a.logout(), window.location.href = a.state.routes.auth;
2809
2843
  } catch (a) {
2810
2844
  console.error("Error during auto-logout:", a), window.location.href = "/login";
2811
2845
  }
2812
2846
  if (t.response?.status === 403)
2813
2847
  try {
2814
- const a = F();
2848
+ const a = M();
2815
2849
  window.location.href = a.state.routes.forbidden;
2816
2850
  } catch (a) {
2817
2851
  console.error("Error during 403 redirect:", a), window.location.href = "/error/403";
@@ -2821,20 +2855,20 @@ function Uo(e = {}) {
2821
2855
  ), s;
2822
2856
  }
2823
2857
  let G = null;
2824
- function Lr(e, s = {}) {
2825
- return G = Uo(s), e.provide("axios", G), e.config.globalProperties.$axios = G, G;
2858
+ function Pr(e, s = {}) {
2859
+ return G = Jo(s), e.provide("axios", G), e.config.globalProperties.$axios = G, G;
2826
2860
  }
2827
- function Hr() {
2861
+ function Rr() {
2828
2862
  if (!G)
2829
2863
  throw new Error("Axios instance not initialized. Call setupAxios() first.");
2830
2864
  return G;
2831
2865
  }
2832
- const Tr = X("sparkNav", () => {
2866
+ const Br = X("sparkNav", () => {
2833
2867
  const e = z({
2834
2868
  menu: [],
2835
2869
  collapsed: !1,
2836
2870
  hidden: !1
2837
- }), s = O(), t = se(), a = (d = []) => {
2871
+ }), s = I(), t = se(), a = (d = []) => {
2838
2872
  e.menu = d;
2839
2873
  }, l = (d, m) => {
2840
2874
  for (const u of d) {
@@ -2845,7 +2879,7 @@ const Tr = X("sparkNav", () => {
2845
2879
  }
2846
2880
  }
2847
2881
  return null;
2848
- }, o = async (d) => {
2882
+ }, r = async (d) => {
2849
2883
  if (d) {
2850
2884
  const m = l(e.menu, d);
2851
2885
  if (m && typeof m.action == "function") {
@@ -2854,11 +2888,11 @@ const Tr = X("sparkNav", () => {
2854
2888
  }
2855
2889
  await s.push(d);
2856
2890
  }
2857
- }, n = () => {
2891
+ }, o = () => {
2858
2892
  e.collapsed = !e.collapsed;
2859
2893
  }, i = () => {
2860
2894
  e.hidden = !e.hidden;
2861
- }, r = () => {
2895
+ }, n = () => {
2862
2896
  const d = t.name || t.path.replace("/", "");
2863
2897
  if (d) {
2864
2898
  const m = (u) => {
@@ -2872,71 +2906,71 @@ const Tr = X("sparkNav", () => {
2872
2906
  return E(
2873
2907
  () => t.path,
2874
2908
  () => {
2875
- r();
2909
+ n();
2876
2910
  },
2877
2911
  { immediate: !0 }
2878
2912
  ), {
2879
2913
  state: e,
2880
2914
  initialize: a,
2881
- goto: o,
2882
- toggleCollapsed: n,
2915
+ goto: r,
2916
+ toggleCollapsed: o,
2883
2917
  toggleHidden: i,
2884
- syncWithRoute: r
2918
+ syncWithRoute: n
2885
2919
  };
2886
2920
  });
2887
2921
  export {
2888
2922
  H as Icons,
2889
- mr as SparkAlert,
2890
- Kt as SparkAppSelector,
2891
- cs as SparkBrandSelector,
2892
- A as SparkButton,
2893
- us as SparkButtonGroup,
2894
- gr as SparkCard,
2895
- br as SparkDefaultContainer,
2896
- Vo as SparkError403View,
2897
- Eo as SparkError404View,
2898
- kr as SparkErrorGeneralView,
2899
- mo as SparkForgotPasswordView,
2900
- so as SparkLoginView,
2901
- ao as SparkLogoutView,
2902
- bs as SparkModalContainer,
2903
- hr as SparkModalDialog,
2923
+ vr as SparkAlert,
2924
+ Yt as SparkAppSelector,
2925
+ ps as SparkBrandSelector,
2926
+ F as SparkButton,
2927
+ ms as SparkButtonGroup,
2928
+ br as SparkCard,
2929
+ _r as SparkDefaultContainer,
2930
+ Mo as SparkError403View,
2931
+ Oo as SparkError404View,
2932
+ Sr as SparkErrorGeneralView,
2933
+ vo as SparkForgotPasswordView,
2934
+ no as SparkLoginView,
2935
+ lo as SparkLogoutView,
2936
+ ks as SparkModalContainer,
2937
+ xr as SparkModalDialog,
2904
2938
  ce as SparkOverlay,
2905
- vr as SparkPublicContainer,
2906
- wo as SparkResetPasswordView,
2907
- yr as SparkTable,
2908
- ca as SparkTableDatePicker,
2909
- na as SparkTableFilterButtons,
2910
- sa as SparkTableFilterSelect,
2911
- Ks as SparkTablePaginationPaging,
2912
- Ys as SparkTablePaginationPerPage,
2913
- fa as SparkTableReset,
2914
- Qs as SparkTableSearch,
2939
+ wr as SparkPublicContainer,
2940
+ Lo as SparkResetPasswordView,
2941
+ kr as SparkTable,
2942
+ fa as SparkTableDatePicker,
2943
+ da as SparkTableFilterButtons,
2944
+ na as SparkTableFilterSelect,
2945
+ Xs as SparkTablePaginationPaging,
2946
+ ea as SparkTablePaginationPerPage,
2947
+ ya as SparkTableReset,
2948
+ aa as SparkTableSearch,
2915
2949
  pe as SparkTableToolbar,
2916
- pr as addIcons,
2917
- Cr as create403Route,
2918
- Sr as create404Route,
2919
- _r as createAuthRoutes,
2920
- Uo as createAxiosInstance,
2921
- xr as createBootstrapService,
2922
- $s as customiseHeader,
2923
- Na as deleteCookie,
2924
- Hr as getAxiosInstance,
2925
- Oa as getCookie,
2950
+ hr as addIcons,
2951
+ Hr as create403Route,
2952
+ Tr as create404Route,
2953
+ $r as createAuthRoutes,
2954
+ Jo as createAxiosInstance,
2955
+ Cr as createBootstrapService,
2956
+ Ts as customiseHeader,
2957
+ Ga as deleteCookie,
2958
+ Rr as getAxiosInstance,
2959
+ Za as getCookie,
2926
2960
  He as getDomain,
2927
- _s as renderHeaderTitle,
2928
- Ia as setCookie,
2929
- wr as setupAuthGuards,
2930
- Lr as setupAxios,
2931
- $r as setupBootstrapGuard,
2932
- fr as setupFontAwesome,
2961
+ Ss as renderHeaderTitle,
2962
+ qa as setCookie,
2963
+ Lr as setupAuthGuards,
2964
+ Pr as setupAxios,
2965
+ Vr as setupBootstrapGuard,
2966
+ yr as setupFontAwesome,
2933
2967
  U as sparkModalService,
2934
2968
  Z as sparkOverlayService,
2935
- As as updateRow,
2969
+ js as updateRow,
2936
2970
  Se as useSparkAppSelectorStore,
2937
2971
  $e as useSparkAppStore,
2938
- F as useSparkAuthStore,
2972
+ M as useSparkAuthStore,
2939
2973
  Le as useSparkBrandFilterStore,
2940
- Tr as useSparkNavStore,
2974
+ Br as useSparkNavStore,
2941
2975
  me as useSparkOverlay
2942
2976
  };