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