manolis-ui 0.12.0 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,13 @@
1
- import { defineComponent as U, computed as L, createElementBlock as a, openBlock as n, normalizeClass as D, createCommentVNode as O, renderSlot as T, createTextVNode as xe, createElementVNode as o, Fragment as z, renderList as E, toDisplayString as I, ref as C, watch as H, h as pe, onMounted as ee, withDirectives as W, createVNode as se, isRef as Ae, vModelCheckbox as Pe, unref as N, provide as Ee, normalizeStyle as ie, inject as Le, useId as Ue, defineAsyncComponent as ce, nextTick as ve, onBeforeUnmount as ge, withModifiers as Q, createBlock as ae, resolveDynamicComponent as fe, mergeProps as me, withKeys as he, onUnmounted as ke, vModelSelect as Z, vModelText as oe, useSlots as Re, Comment as Ne, vShow as je } from "vue";
2
- const Fe = ["disabled"], qe = {
1
+ var ft = (e) => {
2
+ throw TypeError(e);
3
+ };
4
+ var mt = (e, t, n) => t.has(e) || ft("Cannot " + n);
5
+ var oe = (e, t, n) => (mt(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Be = (e, t, n) => t.has(e) ? ft("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Ve = (e, t, n, a) => (mt(e, t, "write to private field"), a ? a.call(e, n) : t.set(e, n), n);
6
+ import { defineComponent as A, computed as K, createElementBlock as p, openBlock as f, normalizeClass as B, createCommentVNode as E, renderSlot as V, createTextVNode as Ct, createElementVNode as d, Fragment as U, renderList as F, toDisplayString as O, ref as M, watch as R, h as He, onMounted as ue, withDirectives as Ce, createVNode as ie, isRef as Yt, vModelCheckbox as Jt, unref as Z, provide as Xt, normalizeStyle as ye, inject as Gt, useId as Qt, defineAsyncComponent as ze, nextTick as Pe, onBeforeUnmount as _e, withModifiers as te, createBlock as ae, resolveDynamicComponent as Oe, mergeProps as Ne, withKeys as We, onUnmounted as Dt, resolveComponent as Ae, withCtx as pt, vModelText as Tt, useSlots as en, Comment as tn, vShow as nn } from "vue";
7
+ const an = ["disabled"], ln = {
3
8
  key: 0,
4
9
  class: "loading loading-spinner"
5
- }, pn = /* @__PURE__ */ U({
10
+ }, fo = /* @__PURE__ */ A({
6
11
  __name: "ButtonComponent",
7
12
  props: {
8
13
  outlined: { type: Boolean, default: !1 },
@@ -14,8 +19,8 @@ const Fe = ["disabled"], qe = {
14
19
  disabled: { type: Boolean, default: !1 }
15
20
  },
16
21
  setup(e) {
17
- const c = e, t = L(() => {
18
- switch (c.size) {
22
+ const t = e, n = K(() => {
23
+ switch (t.size) {
19
24
  case "large":
20
25
  return "btn-lg";
21
26
  case "small":
@@ -29,8 +34,8 @@ const Fe = ["disabled"], qe = {
29
34
  default:
30
35
  return "";
31
36
  }
32
- }), i = L(() => {
33
- switch (c.type) {
37
+ }), a = K(() => {
38
+ switch (t.type) {
34
39
  case "neutral":
35
40
  return "btn-neutral";
36
41
  case "primary":
@@ -54,8 +59,8 @@ const Fe = ["disabled"], qe = {
54
59
  default:
55
60
  return "btn-neutral";
56
61
  }
57
- }), r = L(() => {
58
- switch (c.shape) {
62
+ }), o = K(() => {
63
+ switch (t.shape) {
59
64
  case "square":
60
65
  return "btn-square";
61
66
  case "circle":
@@ -64,27 +69,27 @@ const Fe = ["disabled"], qe = {
64
69
  return "";
65
70
  }
66
71
  });
67
- return (l, s) => (n(), a("button", {
68
- class: D([
72
+ return (l, s) => (f(), p("button", {
73
+ class: B([
69
74
  "btn",
70
- { "btn-outline": c.outlined },
71
- { "btn-active": c.active },
72
- i.value,
73
- t.value,
74
- r.value
75
+ { "btn-outline": t.outlined },
76
+ { "btn-active": t.active },
77
+ a.value,
78
+ n.value,
79
+ o.value
75
80
  ]),
76
- disabled: c.disabled
81
+ disabled: t.disabled
77
82
  }, [
78
- e.loading ? (n(), a("span", qe)) : O("", !0),
79
- T(l.$slots, "default", {}, () => [
80
- s[0] || (s[0] = xe("Submit", -1))
83
+ e.loading ? (f(), p("span", ln)) : E("", !0),
84
+ V(l.$slots, "default", {}, () => [
85
+ s[0] || (s[0] = Ct("Submit", -1))
81
86
  ])
82
- ], 10, Fe));
87
+ ], 10, an));
83
88
  }
84
- }), He = {
89
+ }), on = {
85
90
  tabindex: "0",
86
91
  class: "z-1 bg-base-100 shadow-sm p-2 rounded-sm min-w-[inherit] md:min-w-full xl:min-w-52 dropdown-content menu"
87
- }, We = ["href"], gn = /* @__PURE__ */ U({
92
+ }, sn = ["href"], mo = /* @__PURE__ */ A({
88
93
  __name: "dropdown",
89
94
  props: {
90
95
  items: {},
@@ -94,35 +99,35 @@ const Fe = ["disabled"], qe = {
94
99
  forceOpen: { type: Boolean, default: !1 }
95
100
  },
96
101
  setup(e) {
97
- const c = {
102
+ const t = {
98
103
  left: "dropdown-left",
99
104
  right: "dropdown-right",
100
105
  bottom: "dropdown-bottom",
101
106
  top: "dropdown-top"
102
- }, t = {
107
+ }, n = {
103
108
  start: "",
104
109
  end: "dropdown-end"
105
- }, i = e;
106
- return (r, l) => (n(), a("div", {
107
- class: D(["dropdown", c[i.position], t[i.floatPosition], { "dropdown-open": i.forceOpen }, { "dropdown-hover": i.openOnHover }])
110
+ }, a = e;
111
+ return (o, l) => (f(), p("div", {
112
+ class: B(["dropdown", t[a.position], n[a.floatPosition], { "dropdown-open": a.forceOpen }, { "dropdown-hover": a.openOnHover }])
108
113
  }, [
109
- T(r.$slots, "default", {
114
+ V(o.$slots, "default", {
110
115
  tabindex: "0",
111
116
  role: "button"
112
117
  }, () => [
113
- l[0] || (l[0] = o("div", { class: "m-1 btn" }, "Open dropdown", -1))
118
+ l[0] || (l[0] = d("div", { class: "m-1 btn" }, "Open dropdown", -1))
114
119
  ]),
115
- o("ul", He, [
116
- (n(!0), a(z, null, E(e.items, (s) => (n(), a("li", null, [
117
- o("a", {
120
+ d("ul", on, [
121
+ (f(!0), p(U, null, F(e.items, (s) => (f(), p("li", null, [
122
+ d("a", {
118
123
  href: s.link
119
- }, I(s.text), 9, We)
124
+ }, O(s.text), 9, sn)
120
125
  ]))), 256)),
121
- T(r.$slots, "additional")
126
+ V(o.$slots, "additional")
122
127
  ])
123
128
  ], 2));
124
129
  }
125
- }), Ke = { class: "modal-box" }, _e = { class: "modal-action" }, hn = /* @__PURE__ */ U({
130
+ }), rn = { class: "modal-box" }, un = { class: "modal-action" }, po = /* @__PURE__ */ A({
126
131
  __name: "modal",
127
132
  props: {
128
133
  position: { default: "center" },
@@ -130,48 +135,48 @@ const Fe = ["disabled"], qe = {
130
135
  forceOpen: { type: [Boolean, null], default: null }
131
136
  },
132
137
  setup(e) {
133
- const c = e, t = {
138
+ const t = e, n = {
134
139
  top: "modal-top",
135
140
  bottom: "modal-bottom",
136
141
  center: "modal-middle"
137
- }, i = C(null), r = () => {
142
+ }, a = M(null), o = () => {
138
143
  var s;
139
- (s = i.value) == null || s.showModal();
144
+ (s = a.value) == null || s.showModal();
140
145
  }, l = () => {
141
146
  var s;
142
- (s = i.value) == null || s.close();
147
+ (s = a.value) == null || s.close();
143
148
  };
144
- return H(
145
- () => c.forceOpen,
149
+ return R(
150
+ () => t.forceOpen,
146
151
  (s) => {
147
- s == !0 && r(), s == !1 && l();
152
+ s == !0 && o(), s == !1 && l();
148
153
  }
149
- ), (s, h) => (n(), a(z, null, [
150
- c.forceOpen == null ? (n(), a("span", {
154
+ ), (s, u) => (f(), p(U, null, [
155
+ t.forceOpen == null ? (f(), p("span", {
151
156
  key: 0,
152
157
  class: "w-fit cursor-pointer",
153
- onClick: r
158
+ onClick: o
154
159
  }, [
155
- T(s.$slots, "trigger", { role: "button" }, () => [
156
- h[0] || (h[0] = o("button", { class: "btn" }, "Open", -1))
160
+ V(s.$slots, "trigger", { role: "button" }, () => [
161
+ u[0] || (u[0] = d("button", { class: "btn" }, "Open", -1))
157
162
  ])
158
- ])) : O("", !0),
159
- o("dialog", {
163
+ ])) : E("", !0),
164
+ d("dialog", {
160
165
  ref_key: "dialog",
161
- ref: i,
162
- class: D(["modal", t[c.position]])
166
+ ref: a,
167
+ class: B(["modal", n[t.position]])
163
168
  }, [
164
- o("div", Ke, [
165
- T(s.$slots, "default"),
166
- o("div", _e, [
167
- T(s.$slots, "actions"),
168
- o("form", {
169
+ d("div", rn, [
170
+ V(s.$slots, "default"),
171
+ d("div", un, [
172
+ V(s.$slots, "actions"),
173
+ d("form", {
169
174
  method: "dialog",
170
175
  onSubmit: l,
171
- class: D(e.withBackdrop ? "modal-backdrop" : "")
176
+ class: B(e.withBackdrop ? "modal-backdrop" : "")
172
177
  }, [
173
- T(s.$slots, "close-button", {}, () => [
174
- h[1] || (h[1] = o("button", { class: "btn" }, "Close", -1))
178
+ V(s.$slots, "close-button", {}, () => [
179
+ u[1] || (u[1] = d("button", { class: "btn" }, "Close", -1))
175
180
  ])
176
181
  ], 34)
177
182
  ])
@@ -179,22 +184,22 @@ const Fe = ["disabled"], qe = {
179
184
  ], 2)
180
185
  ], 64));
181
186
  }
182
- }), Ye = { class: "flex justify-center items-center swap-on" }, Je = { class: "flex justify-center items-center swap-off" }, bn = /* @__PURE__ */ U({
187
+ }), cn = { class: "flex justify-center items-center swap-on" }, dn = { class: "flex justify-center items-center swap-off" }, ho = /* @__PURE__ */ A({
183
188
  __name: "swap",
184
189
  props: {
185
190
  effect: {}
186
191
  },
187
192
  setup(e) {
188
- const c = e;
189
- return (t, i) => (n(), a("label", {
190
- class: D(["swap", c.effect ? `swap-${e.effect}` : ""])
193
+ const t = e;
194
+ return (n, a) => (f(), p("label", {
195
+ class: B(["swap", t.effect ? `swap-${e.effect}` : ""])
191
196
  }, [
192
- i[0] || (i[0] = o("input", { type: "checkbox" }, null, -1)),
193
- o("div", Ye, [
194
- T(t.$slots, "on")
197
+ a[0] || (a[0] = d("input", { type: "checkbox" }, null, -1)),
198
+ d("div", cn, [
199
+ V(n.$slots, "on")
195
200
  ]),
196
- o("div", Je, [
197
- T(t.$slots, "off")
201
+ d("div", dn, [
202
+ V(n.$slots, "off")
198
203
  ])
199
204
  ], 2));
200
205
  }
@@ -205,14 +210,14 @@ const Fe = ["disabled"], qe = {
205
210
  * This source code is licensed under the ISC license.
206
211
  * See the LICENSE file in the root directory of this source tree.
207
212
  */
208
- const Xe = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
213
+ const fn = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
209
214
  /**
210
215
  * @license lucide-vue-next v0.468.0 - ISC
211
216
  *
212
217
  * This source code is licensed under the ISC license.
213
218
  * See the LICENSE file in the root directory of this source tree.
214
219
  */
215
- var de = {
220
+ var $e = {
216
221
  xmlns: "http://www.w3.org/2000/svg",
217
222
  width: 24,
218
223
  height: 24,
@@ -229,18 +234,18 @@ var de = {
229
234
  * This source code is licensed under the ISC license.
230
235
  * See the LICENSE file in the root directory of this source tree.
231
236
  */
232
- const Ge = ({ size: e, strokeWidth: c = 2, absoluteStrokeWidth: t, color: i, iconNode: r, name: l, class: s, ...h }, { slots: f }) => pe(
237
+ const mn = ({ size: e, strokeWidth: t = 2, absoluteStrokeWidth: n, color: a, iconNode: o, name: l, class: s, ...u }, { slots: i }) => He(
233
238
  "svg",
234
239
  {
235
- ...de,
236
- width: e || de.width,
237
- height: e || de.height,
238
- stroke: i || de.stroke,
239
- "stroke-width": t ? Number(c) * 24 / Number(e) : c,
240
- class: ["lucide", `lucide-${Xe(l ?? "icon")}`],
241
- ...h
240
+ ...$e,
241
+ width: e || $e.width,
242
+ height: e || $e.height,
243
+ stroke: a || $e.stroke,
244
+ "stroke-width": n ? Number(t) * 24 / Number(e) : t,
245
+ class: ["lucide", `lucide-${fn(l ?? "icon")}`],
246
+ ...u
242
247
  },
243
- [...r.map((m) => pe(...m)), ...f.default ? [f.default()] : []]
248
+ [...o.map((c) => He(...c)), ...i.default ? [i.default()] : []]
244
249
  );
245
250
  /**
246
251
  * @license lucide-vue-next v0.468.0 - ISC
@@ -248,14 +253,14 @@ const Ge = ({ size: e, strokeWidth: c = 2, absoluteStrokeWidth: t, color: i, ico
248
253
  * This source code is licensed under the ISC license.
249
254
  * See the LICENSE file in the root directory of this source tree.
250
255
  */
251
- const te = (e, c) => (t, { slots: i }) => pe(
252
- Ge,
256
+ const be = (e, t) => (n, { slots: a }) => He(
257
+ mn,
253
258
  {
254
- ...t,
255
- iconNode: c,
259
+ ...n,
260
+ iconNode: t,
256
261
  name: e
257
262
  },
258
- i
263
+ a
259
264
  );
260
265
  /**
261
266
  * @license lucide-vue-next v0.468.0 - ISC
@@ -263,19 +268,7 @@ const te = (e, c) => (t, { slots: i }) => pe(
263
268
  * This source code is licensed under the ISC license.
264
269
  * See the LICENSE file in the root directory of this source tree.
265
270
  */
266
- const Ze = te("CalendarIcon", [
267
- ["path", { d: "M8 2v4", key: "1cmpym" }],
268
- ["path", { d: "M16 2v4", key: "4m81vk" }],
269
- ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
270
- ["path", { d: "M3 10h18", key: "8toen8" }]
271
- ]);
272
- /**
273
- * @license lucide-vue-next v0.468.0 - ISC
274
- *
275
- * This source code is licensed under the ISC license.
276
- * See the LICENSE file in the root directory of this source tree.
277
- */
278
- const Qe = te("CircleChevronDownIcon", [
271
+ const pn = be("CircleChevronDownIcon", [
279
272
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
280
273
  ["path", { d: "m16 10-4 4-4-4", key: "894hmk" }]
281
274
  ]);
@@ -285,7 +278,7 @@ const Qe = te("CircleChevronDownIcon", [
285
278
  * This source code is licensed under the ISC license.
286
279
  * See the LICENSE file in the root directory of this source tree.
287
280
  */
288
- const et = te("CircleXIcon", [
281
+ const hn = be("CircleXIcon", [
289
282
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
290
283
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
291
284
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
@@ -296,7 +289,7 @@ const et = te("CircleXIcon", [
296
289
  * This source code is licensed under the ISC license.
297
290
  * See the LICENSE file in the root directory of this source tree.
298
291
  */
299
- const tt = te("MoonIcon", [
292
+ const vn = be("MoonIcon", [
300
293
  ["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
301
294
  ]);
302
295
  /**
@@ -305,7 +298,7 @@ const tt = te("MoonIcon", [
305
298
  * This source code is licensed under the ISC license.
306
299
  * See the LICENSE file in the root directory of this source tree.
307
300
  */
308
- const we = te("SearchIcon", [
301
+ const ht = be("SearchIcon", [
309
302
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
310
303
  ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
311
304
  ]);
@@ -315,7 +308,7 @@ const we = te("SearchIcon", [
315
308
  * This source code is licensed under the ISC license.
316
309
  * See the LICENSE file in the root directory of this source tree.
317
310
  */
318
- const lt = te("SunIcon", [
311
+ const gn = be("SunIcon", [
319
312
  ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
320
313
  ["path", { d: "M12 2v2", key: "tus03m" }],
321
314
  ["path", { d: "M12 20v2", key: "1lh1kg" }],
@@ -325,44 +318,44 @@ const lt = te("SunIcon", [
325
318
  ["path", { d: "M20 12h2", key: "1q8mjw" }],
326
319
  ["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
327
320
  ["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
328
- ]), nt = (e, c) => {
329
- const t = C(null);
330
- return ee(() => {
321
+ ]), yn = (e, t) => {
322
+ const n = M(null);
323
+ return ue(() => {
331
324
  if (typeof window < "u") {
332
- const i = window.localStorage.getItem(e);
333
- t.value = i ? JSON.parse(i) : c;
325
+ const a = window.localStorage.getItem(e);
326
+ n.value = a ? JSON.parse(a) : t;
334
327
  }
335
- }), H(t, (i) => {
336
- typeof window < "u" && window.localStorage.setItem(e, JSON.stringify(i));
337
- }), t;
338
- }, at = { class: "swap-rotate swap" }, ot = ["true-value", "false-value"], yn = /* @__PURE__ */ U({
328
+ }), R(n, (a) => {
329
+ typeof window < "u" && window.localStorage.setItem(e, JSON.stringify(a));
330
+ }), n;
331
+ }, bn = { class: "swap-rotate swap" }, wn = ["true-value", "false-value"], vo = /* @__PURE__ */ A({
339
332
  __name: "theme-controller",
340
333
  props: {
341
334
  lightTheme: { default: "light" },
342
335
  darkTheme: { default: "dark" }
343
336
  },
344
337
  setup(e) {
345
- const c = e, t = nt("theme", c.lightTheme);
346
- function i(r) {
347
- typeof window < "u" && window.document && document.documentElement.setAttribute("data-theme", r);
338
+ const t = e, n = yn("theme", t.lightTheme);
339
+ function a(o) {
340
+ typeof window < "u" && window.document && document.documentElement.setAttribute("data-theme", o);
348
341
  }
349
- return ee(() => i(t.value ? t.value : "")), H(t, (r) => {
350
- i(r);
351
- }), (r, l) => (n(), a("label", at, [
352
- W(o("input", {
342
+ return ue(() => a(n.value ? n.value : "")), R(n, (o) => {
343
+ a(o);
344
+ }), (o, l) => (f(), p("label", bn, [
345
+ Ce(d("input", {
353
346
  type: "checkbox",
354
347
  class: "theme-controller",
355
- "onUpdate:modelValue": l[0] || (l[0] = (s) => Ae(t) ? t.value = s : null),
356
- "true-value": c.lightTheme,
357
- "false-value": c.darkTheme
358
- }, null, 8, ot), [
359
- [Pe, N(t)]
348
+ "onUpdate:modelValue": l[0] || (l[0] = (s) => Yt(n) ? n.value = s : null),
349
+ "true-value": t.lightTheme,
350
+ "false-value": t.darkTheme
351
+ }, null, 8, wn), [
352
+ [Jt, Z(n)]
360
353
  ]),
361
- se(N(lt), { class: "swap-off fill-current" }),
362
- se(N(tt), { class: "swap-on fill-current" })
354
+ ie(Z(gn), { class: "swap-off fill-current" }),
355
+ ie(Z(vn), { class: "swap-on fill-current" })
363
356
  ]));
364
357
  }
365
- }), st = ["name"], it = { class: "collapse-title font-bold text-2xl lg:text-4xl" }, rt = { class: "collapse-content" }, ut = ["innerHTML"], wn = /* @__PURE__ */ U({
358
+ }), xn = ["name"], kn = { class: "collapse-title font-bold text-2xl lg:text-4xl" }, $n = { class: "collapse-content" }, Sn = ["innerHTML"], go = /* @__PURE__ */ A({
366
359
  __name: "accordion",
367
360
  props: {
368
361
  name: {},
@@ -371,25 +364,25 @@ const lt = te("SunIcon", [
371
364
  icon: {}
372
365
  },
373
366
  setup(e) {
374
- const c = e;
375
- return (t, i) => (n(!0), a(z, null, E(c.items, (r, l) => (n(), a("div", {
376
- class: D(["collapse border border-base-300", [e.icon ? `collapse-${e.icon}` : "", { "join-item": e.joinItems }]]),
367
+ const t = e;
368
+ return (n, a) => (f(!0), p(U, null, F(t.items, (o, l) => (f(), p("div", {
369
+ class: B(["collapse border border-base-300", [e.icon ? `collapse-${e.icon}` : "", { "join-item": e.joinItems }]]),
377
370
  key: l
378
371
  }, [
379
- o("input", {
372
+ d("input", {
380
373
  type: "radio",
381
374
  name: e.name,
382
375
  value: "true"
383
- }, null, 8, st),
384
- o("div", it, I(r.title), 1),
385
- o("div", rt, [
386
- o("span", {
387
- innerHTML: r.content
388
- }, null, 8, ut)
376
+ }, null, 8, xn),
377
+ d("div", kn, O(o.title), 1),
378
+ d("div", $n, [
379
+ d("span", {
380
+ innerHTML: o.content
381
+ }, null, 8, Sn)
389
382
  ])
390
383
  ], 2))), 128));
391
384
  }
392
- }), dt = ["src"], ct = { class: "text-xl" }, xn = /* @__PURE__ */ U({
385
+ }), Cn = ["src"], Dn = { class: "text-xl" }, yo = /* @__PURE__ */ A({
393
386
  __name: "avatar",
394
387
  props: {
395
388
  image: {},
@@ -398,32 +391,32 @@ const lt = te("SunIcon", [
398
391
  fullyRounded: { type: Boolean, default: !1 }
399
392
  },
400
393
  setup(e) {
401
- const c = e, t = C(c.onlineStatus);
402
- return H(
403
- () => c.onlineStatus,
404
- (i) => {
405
- i && (t.value = i);
394
+ const t = e, n = M(t.onlineStatus);
395
+ return R(
396
+ () => t.onlineStatus,
397
+ (a) => {
398
+ a && (n.value = a);
406
399
  }
407
- ), (i, r) => (n(), a("div", {
408
- class: D(["avatar", [{ "avatar-online": t.value === "online" }, { "avatar-offline": t.value === "offline" }]])
400
+ ), (a, o) => (f(), p("div", {
401
+ class: B(["avatar", [{ "avatar-online": n.value === "online" }, { "avatar-offline": n.value === "offline" }]])
409
402
  }, [
410
- e.image ? (n(), a("div", {
403
+ e.image ? (f(), p("div", {
411
404
  key: 0,
412
- class: D(["rounded", [{ "rounded-full": e.fullyRounded }, { rounded: !e.fullyRounded }]])
405
+ class: B(["rounded", [{ "rounded-full": e.fullyRounded }, { rounded: !e.fullyRounded }]])
413
406
  }, [
414
- o("img", {
407
+ d("img", {
415
408
  src: e.image,
416
409
  class: "w-full h-full"
417
- }, null, 8, dt)
418
- ], 2)) : (n(), a("div", {
410
+ }, null, 8, Cn)
411
+ ], 2)) : (f(), p("div", {
419
412
  key: 1,
420
- class: D(["flex justify-center bg-neutral p-[25%] rounded w-16 text-neutral-content text-center", [{ "rounded-full": e.fullyRounded }, { rounded: !e.fullyRounded }]])
413
+ class: B(["flex justify-center bg-neutral p-[25%] rounded w-16 text-neutral-content text-center", [{ "rounded-full": e.fullyRounded }, { rounded: !e.fullyRounded }]])
421
414
  }, [
422
- o("p", ct, I(e.initials), 1)
415
+ d("p", Dn, O(e.initials), 1)
423
416
  ], 2))
424
417
  ], 2));
425
418
  }
426
- }), kn = /* @__PURE__ */ U({
419
+ }), bo = /* @__PURE__ */ A({
427
420
  __name: "badge",
428
421
  props: {
429
422
  color: { default: "neutral" },
@@ -431,12 +424,12 @@ const lt = te("SunIcon", [
431
424
  size: { default: "medium" }
432
425
  },
433
426
  setup(e) {
434
- const c = e, t = {
427
+ const t = e, n = {
435
428
  "extra small": "badge-xs",
436
429
  small: "badge-sm",
437
430
  medium: "badge-md",
438
431
  large: "badge-lg"
439
- }, i = {
432
+ }, a = {
440
433
  neutral: "badge-neutral",
441
434
  primary: "badge-primary",
442
435
  secondary: "badge-secondary",
@@ -447,25 +440,25 @@ const lt = te("SunIcon", [
447
440
  warning: "badge-warning",
448
441
  error: "badge-error"
449
442
  };
450
- return (r, l) => (n(), a("span", {
451
- class: D(["badge", t[c.size], i[c.color], { "badge-outline": c.outline }])
443
+ return (o, l) => (f(), p("span", {
444
+ class: B(["badge", n[t.size], a[t.color], { "badge-outline": t.outline }])
452
445
  }, [
453
- T(r.$slots, "default")
446
+ V(o.$slots, "default")
454
447
  ], 2));
455
448
  }
456
- }), vt = ["src", "alt"], ft = {
449
+ }), Tn = ["src", "alt"], Mn = {
457
450
  key: 0,
458
451
  class: "card-body"
459
- }, mt = {
452
+ }, In = {
460
453
  key: 0,
461
454
  class: "group-hover:text-primary text-lg text-left cursor-pointer card-title"
462
- }, pt = {
455
+ }, En = {
463
456
  key: 1,
464
457
  class: "text-left"
465
- }, gt = { class: "flex-col flex-nowrap mt-auto card-actions" }, ht = {
458
+ }, Bn = { class: "flex-col flex-nowrap mt-auto card-actions" }, Vn = {
466
459
  key: 1,
467
460
  class: "card-body"
468
- }, $n = /* @__PURE__ */ U({
461
+ }, wo = /* @__PURE__ */ A({
469
462
  __name: "card",
470
463
  props: {
471
464
  imgUrl: { default: "" },
@@ -482,64 +475,64 @@ const lt = te("SunIcon", [
482
475
  horizontal: { type: Boolean, default: !1 }
483
476
  },
484
477
  setup(e) {
485
- const c = e, t = C(c.outlined);
486
- return H(
487
- () => c.outlined,
488
- (i) => {
489
- t.value = i;
478
+ const t = e, n = M(t.outlined);
479
+ return R(
480
+ () => t.outlined,
481
+ (a) => {
482
+ n.value = a;
490
483
  }
491
- ), (i, r) => (n(), a("div", {
492
- class: D(["group bg-base-100 shadow-xl rounded-sm min-w-64 max-w-full h-full card card-compact", [
493
- { "border-4 border-primary": t.value },
484
+ ), (a, o) => (f(), p("div", {
485
+ class: B(["group bg-base-100 shadow-xl rounded-sm min-w-64 max-w-full h-full card card-compact", [
486
+ { "border-4 border-primary": n.value },
494
487
  e.color ?? "",
495
488
  e.background,
496
489
  { "card-side": e.horizontal }
497
490
  ]])
498
491
  }, [
499
- o("figure", {
500
- class: D([{ "contents!": e.horizontal && e.imgWidth }])
492
+ d("figure", {
493
+ class: B([{ "contents!": e.horizontal && e.imgWidth }])
501
494
  }, [
502
- e.imgUrl || e.imgUrl && !e.loading ? (n(), a("img", {
495
+ e.imgUrl || e.imgUrl && !e.loading ? (f(), p("img", {
503
496
  key: 0,
504
497
  src: e.imgUrl,
505
498
  alt: e.alt,
506
- class: D(["rounded-sm object-cover", [
499
+ class: B(["rounded-sm object-cover", [
507
500
  {
508
501
  hidden: e.loading
509
502
  },
510
503
  !e.horizontal && e.imgHeight ? e.imgHeight : "h-full",
511
504
  e.horizontal && e.imgWidth ? e.imgWidth : "w-full"
512
505
  ]])
513
- }, null, 10, vt)) : O("", !0),
514
- e.loading && e.imgUrl ? (n(), a("div", {
506
+ }, null, 10, Tn)) : E("", !0),
507
+ e.loading && e.imgUrl ? (f(), p("div", {
515
508
  key: 1,
516
- class: D(["w-full skeleton", e.imgHeight])
517
- }, null, 2)) : O("", !0)
509
+ class: B(["w-full skeleton", e.imgHeight])
510
+ }, null, 2)) : E("", !0)
518
511
  ], 2),
519
- e.loading ? O("", !0) : (n(), a("div", ft, [
520
- e.title ? (n(), a("h2", mt, I(e.title), 1)) : O("", !0),
521
- T(i.$slots, "details"),
522
- e.description ? (n(), a("p", pt, I(e.description), 1)) : O("", !0),
523
- o("div", gt, [
524
- T(i.$slots, "actions")
512
+ e.loading ? E("", !0) : (f(), p("div", Mn, [
513
+ e.title ? (f(), p("h2", In, O(e.title), 1)) : E("", !0),
514
+ V(a.$slots, "details"),
515
+ e.description ? (f(), p("p", En, O(e.description), 1)) : E("", !0),
516
+ d("div", Bn, [
517
+ V(a.$slots, "actions")
525
518
  ])
526
519
  ])),
527
- e.loading ? (n(), a("div", ht, [...r[0] || (r[0] = [
528
- o("div", { class: "flex flex-col gap-4 w-52" }, [
529
- o("div", { class: "w-28 h-4 skeleton" }),
530
- o("div", { class: "w-full h-4 skeleton" }),
531
- o("div", { class: "w-full h-4 skeleton" })
520
+ e.loading ? (f(), p("div", Vn, [...o[0] || (o[0] = [
521
+ d("div", { class: "flex flex-col gap-4 w-52" }, [
522
+ d("div", { class: "w-28 h-4 skeleton" }),
523
+ d("div", { class: "w-full h-4 skeleton" }),
524
+ d("div", { class: "w-full h-4 skeleton" })
532
525
  ], -1)
533
- ])])) : O("", !0)
526
+ ])])) : E("", !0)
534
527
  ], 2));
535
528
  }
536
- }), $e = Symbol("CarouselItemStyle"), bt = { class: "relative h-full" }, yt = {
529
+ }), Mt = Symbol("CarouselItemStyle"), zn = { class: "relative h-full" }, Pn = {
537
530
  key: 0,
538
531
  class: "top-1/2 right-5 left-5 z-10 absolute flex justify-between -translate-y-1/2 transform"
539
- }, wt = {
532
+ }, On = {
540
533
  key: 1,
541
534
  class: "bottom-5 z-10 absolute flex justify-center gap-2 py-2 w-full"
542
- }, xt = ["onClick", "aria-label"], kt = /* @__PURE__ */ U({
535
+ }, Nn = ["onClick", "aria-label"], An = /* @__PURE__ */ A({
543
536
  __name: "carousel",
544
537
  props: {
545
538
  showIndicators: {
@@ -576,136 +569,136 @@ const lt = te("SunIcon", [
576
569
  validator: (e) => e >= 0
577
570
  }
578
571
  },
579
- setup(e, { expose: c }) {
580
- const t = e, i = C(t.initialSlide), r = C(null), l = C(!1), s = C(0), h = L(() => ({
581
- width: `calc((100% - ${t.slidesPerView > 1 ? (t.slidesPerView - 1) * t.gap : 0}px) / ${t.slidesPerView})`
572
+ setup(e, { expose: t }) {
573
+ const n = e, a = M(n.initialSlide), o = M(null), l = M(!1), s = M(0), u = K(() => ({
574
+ width: `calc((100% - ${n.slidesPerView > 1 ? (n.slidesPerView - 1) * n.gap : 0}px) / ${n.slidesPerView})`
582
575
  }));
583
- Ee($e, h);
584
- const f = () => {
585
- r.value ? s.value = r.value.children.length : s.value = 0;
586
- }, m = async (y) => {
587
- if (!r.value || t.slidesPerView <= 0 || l.value || (f(), s.value === 0)) return;
588
- const $ = (y % s.value + s.value) % s.value, M = r.value, A = t.sliderOrientation === "vertical" ? (M.offsetHeight - (t.slidesPerView - 1) * t.gap) / t.slidesPerView : (M.offsetWidth - (t.slidesPerView - 1) * t.gap) / t.slidesPerView;
589
- if (A <= 0) return;
590
- const F = A + t.gap, K = $ * F, Y = t.sliderOrientation === "vertical" ? M.scrollHeight - M.offsetHeight : M.scrollWidth - M.offsetWidth, v = Math.max(0, Math.min(K, Y + 0.5));
591
- l.value = !0, M.style.scrollBehavior = "auto";
592
- const b = t.sliderOrientation === "vertical" ? M.scrollTop : M.scrollLeft, S = v - b;
593
- if (Math.abs(S) < 1) {
594
- l.value = !1, i.value = $;
576
+ Xt(Mt, u);
577
+ const i = () => {
578
+ o.value ? s.value = o.value.children.length : s.value = 0;
579
+ }, c = async (S) => {
580
+ if (!o.value || n.slidesPerView <= 0 || l.value || (i(), s.value === 0)) return;
581
+ const D = (S % s.value + s.value) % s.value, k = o.value, C = n.sliderOrientation === "vertical" ? (k.offsetHeight - (n.slidesPerView - 1) * n.gap) / n.slidesPerView : (k.offsetWidth - (n.slidesPerView - 1) * n.gap) / n.slidesPerView;
582
+ if (C <= 0) return;
583
+ const z = C + n.gap, j = D * z, H = n.sliderOrientation === "vertical" ? k.scrollHeight - k.offsetHeight : k.scrollWidth - k.offsetWidth, v = Math.max(0, Math.min(j, H + 0.5));
584
+ l.value = !0, k.style.scrollBehavior = "auto";
585
+ const h = n.sliderOrientation === "vertical" ? k.scrollTop : k.scrollLeft, x = v - h;
586
+ if (Math.abs(x) < 1) {
587
+ l.value = !1, a.value = D;
595
588
  return;
596
589
  }
597
- const V = performance.now(), u = (P) => {
598
- const w = P - V, B = Math.min(1, w / t.slideDuration), _ = B < 0.5 ? 4 * B * B * B : 1 - Math.pow(-2 * B + 2, 3) / 2, J = b + S * _;
599
- t.sliderOrientation === "vertical" ? M.scrollTop = J : M.scrollLeft = J, B < 1 ? requestAnimationFrame(u) : (t.sliderOrientation === "vertical" ? M.scrollTop = v : M.scrollLeft = v, i.value = $, l.value = !1);
590
+ const T = performance.now(), r = (b) => {
591
+ const $ = b - T, I = Math.min(1, $ / n.slideDuration), P = I < 0.5 ? 4 * I * I * I : 1 - Math.pow(-2 * I + 2, 3) / 2, q = h + x * P;
592
+ n.sliderOrientation === "vertical" ? k.scrollTop = q : k.scrollLeft = q, I < 1 ? requestAnimationFrame(r) : (n.sliderOrientation === "vertical" ? k.scrollTop = v : k.scrollLeft = v, a.value = D, l.value = !1);
600
593
  };
601
- requestAnimationFrame(u);
602
- }, k = () => {
603
- m(i.value + 1);
604
- }, R = () => {
605
- m(i.value - 1);
606
- }, j = (y) => {
607
- m(y);
608
- }, x = () => {
609
- if (!r.value || t.slidesPerView <= 0 || (f(), s.value === 0)) return;
610
- const y = r.value, $ = t.sliderOrientation === "vertical" ? y.offsetHeight : y.offsetWidth, M = t.slidesPerView > 1 ? (t.slidesPerView - 1) * t.gap : 0, A = ($ - M) / t.slidesPerView;
611
- if (A <= 0) return;
612
- const F = Math.max(0, s.value - t.slidesPerView), K = Math.min(Math.max(0, t.initialSlide), F), Y = K * (A + t.gap), v = t.sliderOrientation === "vertical" ? y.scrollHeight - y.offsetHeight : y.scrollWidth - y.offsetWidth, b = Math.max(0, Math.min(Y, v + 0.5));
613
- t.sliderOrientation === "vertical" ? y.scrollTo({ top: b, behavior: "auto" }) : y.scrollTo({ left: b, behavior: "auto" }), i.value = K;
594
+ requestAnimationFrame(r);
595
+ }, m = () => {
596
+ c(a.value + 1);
597
+ }, w = () => {
598
+ c(a.value - 1);
599
+ }, g = (S) => {
600
+ c(S);
601
+ }, y = () => {
602
+ if (!o.value || n.slidesPerView <= 0 || (i(), s.value === 0)) return;
603
+ const S = o.value, D = n.sliderOrientation === "vertical" ? S.offsetHeight : S.offsetWidth, k = n.slidesPerView > 1 ? (n.slidesPerView - 1) * n.gap : 0, C = (D - k) / n.slidesPerView;
604
+ if (C <= 0) return;
605
+ const z = Math.max(0, s.value - n.slidesPerView), j = Math.min(Math.max(0, n.initialSlide), z), H = j * (C + n.gap), v = n.sliderOrientation === "vertical" ? S.scrollHeight - S.offsetHeight : S.scrollWidth - S.offsetWidth, h = Math.max(0, Math.min(H, v + 0.5));
606
+ n.sliderOrientation === "vertical" ? S.scrollTo({ top: h, behavior: "auto" }) : S.scrollTo({ left: h, behavior: "auto" }), a.value = j;
614
607
  };
615
- return ee(() => {
608
+ return ue(() => {
616
609
  requestAnimationFrame(() => {
617
- requestAnimationFrame(x);
618
- }), f();
619
- }), H(() => t.initialSlide, (y) => {
620
- requestAnimationFrame(() => m(y));
621
- }), H(() => [t.slidesPerView, t.gap], () => {
610
+ requestAnimationFrame(y);
611
+ }), i();
612
+ }), R(() => n.initialSlide, (S) => {
613
+ requestAnimationFrame(() => c(S));
614
+ }), R(() => [n.slidesPerView, n.gap], () => {
622
615
  requestAnimationFrame(() => {
623
616
  requestAnimationFrame(() => {
624
- if (f(), s.value === 0) return;
625
- const y = Math.max(0, s.value - t.slidesPerView), $ = Math.min(i.value, y), M = t.slideDuration;
626
- t.slideDuration = 0, m($), t.slideDuration = M;
617
+ if (i(), s.value === 0) return;
618
+ const S = Math.max(0, s.value - n.slidesPerView), D = Math.min(a.value, S), k = n.slideDuration;
619
+ n.slideDuration = 0, c(D), n.slideDuration = k;
627
620
  });
628
621
  });
629
- }), c({ scrollToSlide: m }), (y, $) => (n(), a("div", bt, [
630
- o("div", {
622
+ }), t({ scrollToSlide: c }), (S, D) => (f(), p("div", zn, [
623
+ d("div", {
631
624
  ref_key: "carouselContainer",
632
- ref: r,
633
- class: D(["rounded w-full h-full overflow-x-scroll scroll-smooth carousel", [{ "carousel-horizontal md:snap-none": e.sliderOrientation == "horizontal" }, { "carousel-vertical": e.sliderOrientation == "vertical" }]]),
634
- style: ie({ gap: `${e.gap}px` })
625
+ ref: o,
626
+ class: B(["rounded w-full h-full overflow-x-scroll scroll-smooth carousel", [{ "carousel-horizontal md:snap-none": e.sliderOrientation == "horizontal" }, { "carousel-vertical": e.sliderOrientation == "vertical" }]]),
627
+ style: ye({ gap: `${e.gap}px` })
635
628
  }, [
636
- T(y.$slots, "default", {}, void 0, !0)
629
+ V(S.$slots, "default", {}, void 0, !0)
637
630
  ], 6),
638
- e.showNavigationButtons ? (n(), a("div", yt, [
639
- o("div", {
640
- onClick: R,
631
+ e.showNavigationButtons ? (f(), p("div", Pn, [
632
+ d("div", {
633
+ onClick: w,
641
634
  role: "button",
642
635
  "aria-label": "Previous Slide"
643
636
  }, [
644
- T(y.$slots, "prevButton", {}, () => [
645
- $[0] || ($[0] = o("button", {
637
+ V(S.$slots, "prevButton", {}, () => [
638
+ D[0] || (D[0] = d("button", {
646
639
  class: "btn btn-circle",
647
640
  tabindex: "-1"
648
641
  }, "❮", -1))
649
642
  ], !0)
650
643
  ]),
651
- o("div", {
652
- onClick: k,
644
+ d("div", {
645
+ onClick: m,
653
646
  role: "button",
654
647
  "aria-label": "Next Slide"
655
648
  }, [
656
- T(y.$slots, "nextButton", {}, () => [
657
- $[1] || ($[1] = o("button", {
649
+ V(S.$slots, "nextButton", {}, () => [
650
+ D[1] || (D[1] = d("button", {
658
651
  class: "btn btn-circle",
659
652
  tabindex: "-1"
660
653
  }, "❯", -1))
661
654
  ], !0)
662
655
  ])
663
- ])) : O("", !0),
664
- e.showIndicators ? (n(), a("div", wt, [
665
- (n(!0), a(z, null, E(s.value, (M, A) => (n(), a("button", {
666
- key: `dot-${A}`,
667
- onClick: (F) => j(A),
668
- class: D(["btn btn-circle btn-xs", { "btn-active": A === i.value }]),
669
- "aria-label": `Go to slide ${A + 1}`
670
- }, null, 10, xt))), 128))
671
- ])) : O("", !0)
656
+ ])) : E("", !0),
657
+ e.showIndicators ? (f(), p("div", On, [
658
+ (f(!0), p(U, null, F(s.value, (k, C) => (f(), p("button", {
659
+ key: `dot-${C}`,
660
+ onClick: (z) => g(C),
661
+ class: B(["btn btn-circle btn-xs", { "btn-active": C === a.value }]),
662
+ "aria-label": `Go to slide ${C + 1}`
663
+ }, null, 10, Nn))), 128))
664
+ ])) : E("", !0)
672
665
  ]));
673
666
  }
674
- }), le = (e, c) => {
675
- const t = e.__vccOpts || e;
676
- for (const [i, r] of c)
677
- t[i] = r;
678
- return t;
679
- }, Sn = /* @__PURE__ */ le(kt, [["__scopeId", "data-v-db55a6a5"]]), $t = /* @__PURE__ */ U({
667
+ }), we = (e, t) => {
668
+ const n = e.__vccOpts || e;
669
+ for (const [a, o] of t)
670
+ n[a] = o;
671
+ return n;
672
+ }, xo = /* @__PURE__ */ we(An, [["__scopeId", "data-v-db55a6a5"]]), Ln = /* @__PURE__ */ A({
680
673
  __name: "carouselItem",
681
674
  setup(e) {
682
- const c = Le($e, C({}));
683
- return (t, i) => (n(), a("div", {
675
+ const t = Gt(Mt, M({}));
676
+ return (n, a) => (f(), p("div", {
684
677
  class: "w-full h-full carousel-item",
685
- style: ie(N(c))
678
+ style: ye(Z(t))
686
679
  }, [
687
- T(t.$slots, "default", {}, void 0, !0)
680
+ V(n.$slots, "default", {}, void 0, !0)
688
681
  ], 4));
689
682
  }
690
- }), Cn = /* @__PURE__ */ le($t, [["__scopeId", "data-v-507384bc"]]), St = { class: "flex gap-4 bg-base-100 w-full tabs tabs-boxed" }, Ct = ["onClick"], It = {
683
+ }), ko = /* @__PURE__ */ we(Ln, [["__scopeId", "data-v-507384bc"]]), Un = { class: "flex gap-4 bg-base-100 w-full tabs tabs-boxed" }, jn = ["onClick"], Fn = {
691
684
  key: 0,
692
685
  class: "inline-component-wrapper flex grow justify-center items-center w-full h-full"
693
- }, Mt = {
686
+ }, Rn = {
694
687
  key: 1,
695
688
  class: "flex flex-col"
696
- }, Dt = { class: "text-sm" }, Tt = {
689
+ }, qn = { class: "text-sm" }, Hn = {
697
690
  key: 0,
698
691
  class: "opacity-75 overflow-hidden text-xs truncate ..."
699
- }, Vt = {
692
+ }, _n = {
700
693
  key: 1,
701
694
  class: "hidden md:block opacity-35 overflow-hidden text-xs truncate ..."
702
- }, Bt = { class: "hidden" }, Ot = ["id"], zt = { class: "modal-box" }, At = { class: "font-bold text-lg" }, Pt = ["name", "checked"], Et = { class: "collapse-title flex justify-between items-center pr-4 w-full font-medium text-xl" }, Lt = {
695
+ }, Wn = { class: "hidden" }, Zn = ["id"], Kn = { class: "modal-box" }, Yn = { class: "font-bold text-lg" }, Jn = ["name", "checked"], Xn = { class: "collapse-title flex justify-between items-center pr-4 w-full font-medium text-xl" }, Gn = {
703
696
  key: 0,
704
697
  class: "opacity-75 overflow-hidden text-sm truncate ..."
705
- }, Ut = {
698
+ }, Qn = {
706
699
  key: 1,
707
700
  class: "opacity-35 text-sm"
708
- }, Rt = { class: "collapse-content flex place-content-center p-0" }, Nt = /* @__PURE__ */ U({
701
+ }, ea = { class: "collapse-content flex place-content-center p-0" }, ta = /* @__PURE__ */ A({
709
702
  __name: "advancedSearch",
710
703
  props: {
711
704
  searchOptions: {},
@@ -714,37 +707,37 @@ const lt = te("SunIcon", [
714
707
  value: {}
715
708
  },
716
709
  emits: ["search", "update:search-data"],
717
- setup(e, { emit: c }) {
718
- const t = e, i = c, r = t.id ?? `advancedSearch-${Ue()}`, l = C(null), s = C(null), h = {
719
- datetime: ce(() => Promise.resolve().then(() => vl)),
720
- "standard-select": ce(() => import("./select-Cz4vf_YE.js")),
710
+ setup(e, { emit: t }) {
711
+ const n = e, a = t, o = n.id ?? `advancedSearch-${Qt()}`, l = M(null), s = M(null), u = {
712
+ datetime: ze(() => import("./datetimePicker-B5De2MZQ.js")),
713
+ "standard-select": ze(() => import("./select-Cz4vf_YE.js")),
721
714
  // Add other components here when you create them:
722
715
  // 'custom-range': defineAsyncComponent(() => import('./CustomRange.vue')),
723
716
  // 'custom-number': defineAsyncComponent(() => import('./CustomNumber.vue')),
724
- "custom-text": ce(() => import("./inputField-BxT95oyM.js"))
717
+ "custom-text": ze(() => import("./inputField-BxT95oyM.js"))
725
718
  // 'custom-select': defineAsyncComponent(() => import('./CustomSelect.vue')),
726
- }, f = C({}), m = C({
719
+ }, i = M({}), c = M({
727
720
  left: "0px",
728
721
  top: "0px",
729
722
  transform: "translateX(0%)"
730
- }), k = C(null), R = (v) => {
731
- var b;
723
+ }), m = M(null), w = (v) => {
724
+ var h;
732
725
  if (v.value === void 0 || v.value === null || v.value === "")
733
726
  return "";
734
727
  switch (v.type) {
735
728
  case "datetime":
736
729
  if (typeof v.value == "string")
737
730
  try {
738
- const S = new Date(v.value);
739
- if (!isNaN(S.getTime()))
740
- return S.toLocaleString();
731
+ const x = new Date(v.value);
732
+ if (!isNaN(x.getTime()))
733
+ return x.toLocaleString();
741
734
  } catch {
742
735
  }
743
736
  else if (v.range && typeof v.value == "object" && v.value !== null && "start" in v.value && "end" in v.value)
744
737
  try {
745
- const S = new Date(v.value.start), V = new Date(v.value.end);
746
- if (!isNaN(S.getTime()) && !isNaN(V.getTime()))
747
- return `${S.toLocaleDateString()} - ${V.toLocaleDateString()}`;
738
+ const x = new Date(v.value.start), T = new Date(v.value.end);
739
+ if (!isNaN(x.getTime()) && !isNaN(T.getTime()))
740
+ return `${x.toLocaleDateString()} - ${T.toLocaleDateString()}`;
748
741
  } catch {
749
742
  }
750
743
  break;
@@ -758,12 +751,12 @@ const lt = te("SunIcon", [
758
751
  break;
759
752
  case "standard-select":
760
753
  case "custom-select":
761
- if ((b = v.props) != null && b.options && Array.isArray(v.props.options)) {
762
- const S = v.props.options.find(
763
- (V) => V.value === v.value
754
+ if ((h = v.props) != null && h.options && Array.isArray(v.props.options)) {
755
+ const x = v.props.options.find(
756
+ (T) => T.value === v.value
764
757
  );
765
- if (S)
766
- return S.text;
758
+ if (x)
759
+ return x.text;
767
760
  }
768
761
  return String(v.value);
769
762
  case "custom-text":
@@ -773,62 +766,62 @@ const lt = te("SunIcon", [
773
766
  }
774
767
  return String(v.value);
775
768
  };
776
- function j(v) {
777
- var u, P;
778
- const b = (u = l.value) == null ? void 0 : u.name;
779
- if (!b) {
769
+ function g(v) {
770
+ var r, b;
771
+ const h = (r = l.value) == null ? void 0 : r.name;
772
+ if (!h) {
780
773
  console.warn("componentValueUpdated called but no active tab.");
781
774
  return;
782
775
  }
783
- const S = (P = t.searchOptions.find(
784
- (w) => (w == null ? void 0 : w.category) === t.currentCategory
785
- )) == null ? void 0 : P.tabs, V = S == null ? void 0 : S.find(
786
- (w) => w.name === b
776
+ const x = (b = n.searchOptions.find(
777
+ ($) => ($ == null ? void 0 : $.category) === n.currentCategory
778
+ )) == null ? void 0 : b.tabs, T = x == null ? void 0 : x.find(
779
+ ($) => $.name === h
787
780
  );
788
- V ? (V.value = v, i("update:search-data", {
789
- tab: V.name,
781
+ T ? (T.value = v, a("update:search-data", {
782
+ tab: T.name,
790
783
  data: v
791
784
  })) : console.error(
792
- `Tab with name "${b}" not found in current category.`
785
+ `Tab with name "${h}" not found in current category.`
793
786
  );
794
787
  }
795
- function x(v) {
796
- j(v);
788
+ function y(v) {
789
+ g(v);
797
790
  }
798
- function y() {
799
- i("search");
791
+ function S() {
792
+ a("search");
800
793
  }
801
- async function $(v) {
802
- var V;
803
- const b = document.getElementById(`advancedSearchMobile-${r}`), S = b && b.contains(v.target);
804
- ((V = l.value) == null ? void 0 : V.displayMode) === "popup" && k.value && !k.value.contains(v.target) && !S && (await ve(), l.value = null);
794
+ async function D(v) {
795
+ var T;
796
+ const h = document.getElementById(`advancedSearchMobile-${o}`), x = h && h.contains(v.target);
797
+ ((T = l.value) == null ? void 0 : T.displayMode) === "popup" && m.value && !m.value.contains(v.target) && !x && (await Pe(), l.value = null);
805
798
  }
806
- async function M() {
799
+ async function k() {
807
800
  if (typeof window < "u" && window.innerWidth <= 768) {
808
801
  const v = document.getElementById(
809
- `advancedSearchMobile-${r}`
802
+ `advancedSearchMobile-${o}`
810
803
  );
811
804
  v ? (l.value = null, v.showModal()) : console.warn(
812
- `Mobile modal element not found. Ensure it exists with id="advancedSearchMobile-${r}".`
805
+ `Mobile modal element not found. Ensure it exists with id="advancedSearchMobile-${o}".`
813
806
  );
814
807
  }
815
808
  }
816
- async function A(v) {
817
- var S, V, u;
809
+ async function C(v) {
810
+ var x, T, r;
818
811
  if (typeof window < "u" && window.innerWidth <= 768) {
819
- M();
812
+ k();
820
813
  return;
821
814
  }
822
- const b = v.displayMode ?? "popup";
823
- if (((S = l.value) == null ? void 0 : S.name) === v.name && ((V = l.value) == null ? void 0 : V.displayMode) === b)
815
+ const h = v.displayMode ?? "popup";
816
+ if (((x = l.value) == null ? void 0 : x.name) === v.name && ((T = l.value) == null ? void 0 : T.displayMode) === h)
824
817
  l.value = null;
825
- else if (l.value = { ...v, displayMode: b }, await ve(), ((u = l.value) == null ? void 0 : u.displayMode) === "popup") {
826
- const P = f.value[v.name];
827
- if (P && k.value) {
828
- const w = P.getBoundingClientRect(), B = k.value.getBoundingClientRect(), _ = w.bottom - B.top, J = w.left + w.width / 2 - B.left;
829
- m.value = {
830
- left: `${J}px`,
831
- top: `${_ + 8}px`,
818
+ else if (l.value = { ...v, displayMode: h }, await Pe(), ((r = l.value) == null ? void 0 : r.displayMode) === "popup") {
819
+ const b = i.value[v.name];
820
+ if (b && m.value) {
821
+ const $ = b.getBoundingClientRect(), I = m.value.getBoundingClientRect(), P = $.bottom - I.top, q = $.left + $.width / 2 - I.left;
822
+ c.value = {
823
+ left: `${q}px`,
824
+ top: `${P + 8}px`,
832
825
  // Add a small gap
833
826
  transform: "translateX(-50%)"
834
827
  // Center horizontally
@@ -840,25 +833,25 @@ const lt = te("SunIcon", [
840
833
  );
841
834
  }
842
835
  }
843
- const F = (v) => {
844
- const b = v.relatedTarget;
836
+ const z = (v) => {
837
+ const h = v.relatedTarget;
845
838
  setTimeout(() => {
846
- var S;
847
- ((S = l.value) == null ? void 0 : S.displayMode) === "inline" && k.value && (!b || !k.value.contains(b)) ? (console.log("Blur detected outside container, closing inline view."), l.value = null) : console.log(
839
+ var x;
840
+ ((x = l.value) == null ? void 0 : x.displayMode) === "inline" && m.value && (!h || !m.value.contains(h)) ? (console.log("Blur detected outside container, closing inline view."), l.value = null) : console.log(
848
841
  "Blur detected, but staying within container or not an inline tab."
849
842
  );
850
843
  }, 50);
851
- }, K = () => {
844
+ }, j = () => {
852
845
  console.log("Enter key pressed on inline component, closing inline view."), l.value = null;
853
846
  };
854
- H(s, (v) => {
855
- var b;
847
+ R(s, (v) => {
848
+ var h;
856
849
  console.log(
857
850
  "advanced-search: inlineComponentRef changed. New Value:",
858
851
  v
859
- ), console.log("advanced-search: activeTab.value:", l.value), v && ((b = l.value) == null ? void 0 : b.displayMode) === "inline" ? (console.log(
852
+ ), console.log("advanced-search: activeTab.value:", l.value), v && ((h = l.value) == null ? void 0 : h.displayMode) === "inline" ? (console.log(
860
853
  "advanced-search: Inline component ref is available and active tab is inline. Attempting to focus child input..."
861
- ), ve(() => {
854
+ ), Pe(() => {
862
855
  console.log(
863
856
  "advanced-search: Inside nextTick. Attempting to call child's focus method..."
864
857
  ), console.log("advanced-search: Type of newValue:", typeof v), console.log(
@@ -873,606 +866,1638 @@ const lt = te("SunIcon", [
873
866
  })) : console.log(
874
867
  v ? "advanced-search: inlineComponentRef available, but active tab is not inline." : "advanced-search: inlineComponentRef is now null (component likely unmounted)."
875
868
  );
876
- }), ee(() => {
877
- document.addEventListener("click", $), window.addEventListener("resize", Y);
878
- }), ge(() => {
879
- document.removeEventListener("click", $), window.removeEventListener("resize", Y);
869
+ }), ue(() => {
870
+ document.addEventListener("click", D), window.addEventListener("resize", H);
871
+ }), _e(() => {
872
+ document.removeEventListener("click", D), window.removeEventListener("resize", H);
880
873
  });
881
- const Y = () => {
882
- var v, b;
874
+ const H = () => {
875
+ var v, h;
883
876
  if (typeof window < "u") {
884
- const S = window.innerWidth <= 768, V = l.value !== null && (l.value.displayMode === "popup" || l.value.displayMode === "inline") && window.innerWidth > 768;
885
- !S && (((v = l.value) == null ? void 0 : v.displayMode) === "popup" || ((b = l.value) == null ? void 0 : b.displayMode) === "inline") && window.innerWidth <= 768 && (console.log("Resizing to mobile, closing active tab."), l.value = null), S && !V && l.value !== null && (console.log(
877
+ const x = window.innerWidth <= 768, T = l.value !== null && (l.value.displayMode === "popup" || l.value.displayMode === "inline") && window.innerWidth > 768;
878
+ !x && (((v = l.value) == null ? void 0 : v.displayMode) === "popup" || ((h = l.value) == null ? void 0 : h.displayMode) === "inline") && window.innerWidth <= 768 && (console.log("Resizing to mobile, closing active tab."), l.value = null), x && !T && l.value !== null && (console.log(
886
879
  "Resizing to desktop from potential mobile active state, closing active tab."
887
880
  ), l.value = null);
888
- const u = document.getElementById(
889
- `advancedSearchMobile-${r}`
881
+ const r = document.getElementById(
882
+ `advancedSearchMobile-${o}`
890
883
  );
891
- u != null && u.open && !S && (console.log("Modal is open on desktop, closing modal and active tab."), u.close(), l.value = null);
884
+ r != null && r.open && !x && (console.log("Modal is open on desktop, closing modal and active tab."), r.close(), l.value = null);
892
885
  }
893
886
  };
894
- return (v, b) => {
895
- var S, V;
896
- return n(), a(z, null, [
897
- o("div", {
887
+ return (v, h) => {
888
+ var x, T;
889
+ return f(), p(U, null, [
890
+ d("div", {
898
891
  ref_key: "searchContainer",
899
- ref: k,
892
+ ref: m,
900
893
  class: "w-full"
901
894
  }, [
902
- o("div", {
895
+ d("div", {
903
896
  class: "group/search relative flex place-items-center shadow-md p-2 border-2 border-base-300/25 rounded-sm w-full transition-all cursor-pointer md:cursor-auto",
904
- onClick: M
897
+ onClick: k
905
898
  }, [
906
- o("div", St, [
907
- (n(!0), a(z, null, E(((S = t.searchOptions.find(
908
- (u) => u.category === t.currentCategory
909
- )) == null ? void 0 : S.tabs) || [], (u, P) => {
910
- var w, B, _, J, re;
911
- return n(), a("button", {
912
- key: `${u.name}-${P}`,
913
- onClick: Q((X) => A(u), ["stop"]),
914
- class: D([{
915
- "tab-active": ((w = l.value) == null ? void 0 : w.name) === u.name,
916
- "tab-active-inline": ((B = l.value) == null ? void 0 : B.name) === u.name && ((_ = l.value) == null ? void 0 : _.displayMode) === "inline"
899
+ d("div", Un, [
900
+ (f(!0), p(U, null, F(((x = n.searchOptions.find(
901
+ (r) => r.category === n.currentCategory
902
+ )) == null ? void 0 : x.tabs) || [], (r, b) => {
903
+ var $, I, P, q, Q;
904
+ return f(), p("button", {
905
+ key: `${r.name}-${b}`,
906
+ onClick: te((Y) => C(r), ["stop"]),
907
+ class: B([{
908
+ "tab-active": (($ = l.value) == null ? void 0 : $.name) === r.name,
909
+ "tab-active-inline": ((I = l.value) == null ? void 0 : I.name) === r.name && ((P = l.value) == null ? void 0 : P.displayMode) === "inline"
917
910
  // Add new class
918
911
  }, "group/searchitem after:top-0 after:-right-2 after:absolute relative first-of-type:flex-auto last-of-type:flex-auto after:bg-base-200 hover:bg-base-200 p-1 rounded-sm w-auto after:w-px after:h-10 overflow-x-hidden text-start md:after:content-[''] after:content-none last-of-type:after:content-none"]),
919
912
  ref_for: !0,
920
- ref: (X) => f.value[u.name] = X
913
+ ref: (Y) => i.value[r.name] = Y
921
914
  }, [
922
- ((J = l.value) == null ? void 0 : J.name) === u.name && ((re = l.value) == null ? void 0 : re.displayMode) === "inline" ? (n(), a("div", It, [
923
- (n(), ae(fe(h[l.value.type]), me({ ref_for: !0 }, l.value.props || {}, {
915
+ ((q = l.value) == null ? void 0 : q.name) === r.name && ((Q = l.value) == null ? void 0 : Q.displayMode) === "inline" ? (f(), p("div", Fn, [
916
+ (f(), ae(Oe(u[l.value.type]), Ne({ ref_for: !0 }, l.value.props || {}, {
924
917
  modelValue: l.value.value,
925
- onUpdated: b[0] || (b[0] = (X) => x(X)),
926
- "onUpdate:modelValue": b[1] || (b[1] = (X) => x(X)),
927
- onBlur: F,
928
- onKeydown: he(Q(K, ["stop", "prevent"]), ["enter"]),
918
+ onUpdated: h[0] || (h[0] = (Y) => y(Y)),
919
+ "onUpdate:modelValue": h[1] || (h[1] = (Y) => y(Y)),
920
+ onBlur: z,
921
+ onKeydown: We(te(j, ["stop", "prevent"]), ["enter"]),
929
922
  ref_for: !0,
930
923
  ref_key: "inlineComponentRef",
931
924
  ref: s
932
925
  }), null, 16, ["modelValue", "onKeydown"]))
933
- ])) : (n(), a("div", Mt, [
934
- o("p", Dt, I(u.name), 1),
935
- u.value !== void 0 && u.value !== null && u.value !== "" ? (n(), a("p", Tt, I(R(u)), 1)) : (n(), a("p", Vt, I(u.description), 1))
926
+ ])) : (f(), p("div", Rn, [
927
+ d("p", qn, O(r.name), 1),
928
+ r.value !== void 0 && r.value !== null && r.value !== "" ? (f(), p("p", Hn, O(w(r)), 1)) : (f(), p("p", _n, O(r.description), 1))
936
929
  ]))
937
- ], 10, Ct);
930
+ ], 10, jn);
938
931
  }), 128))
939
932
  ]),
940
- l.value && l.value.displayMode === "popup" ? (n(), a("div", {
933
+ l.value && l.value.displayMode === "popup" ? (f(), p("div", {
941
934
  key: 0,
942
935
  class: "absolute flex shadow-sm mt-4 w-fit max-w-full transition-all tab-content",
943
- style: ie(m.value)
936
+ style: ye(c.value)
944
937
  }, [
945
- (n(), ae(fe(h[l.value.type]), me(l.value.props || {}, {
938
+ (f(), ae(Oe(u[l.value.type]), Ne(l.value.props || {}, {
946
939
  modelValue: l.value.value,
947
- onUpdated: b[2] || (b[2] = (u) => j(u)),
948
- "onUpdate:modelValue": b[3] || (b[3] = (u) => j(u))
940
+ onUpdated: h[2] || (h[2] = (r) => g(r)),
941
+ "onUpdate:modelValue": h[3] || (h[3] = (r) => g(r))
949
942
  }), null, 16, ["modelValue"]))
950
- ], 4)) : O("", !0),
951
- o("button", {
943
+ ], 4)) : E("", !0),
944
+ d("button", {
952
945
  title: "search",
953
946
  type: "submit",
954
947
  class: "ml-1 btn btn-primary btn-square",
955
- onClick: Q(y, ["stop"])
948
+ onClick: te(S, ["stop"])
956
949
  }, [
957
- se(N(we), {
950
+ ie(Z(ht), {
958
951
  size: 24,
959
952
  color: "white"
960
953
  })
961
954
  ])
962
955
  ]),
963
- o("div", Bt, [
964
- o("button", {
956
+ d("div", Wn, [
957
+ d("button", {
965
958
  title: "search",
966
- onClick: b[4] || (b[4] = () => {
959
+ onClick: h[4] || (h[4] = () => {
967
960
  })
968
961
  }, [
969
- se(N(we), {
962
+ ie(Z(ht), {
970
963
  size: 24,
971
964
  color: "white"
972
965
  })
973
966
  ])
974
967
  ])
975
968
  ], 512),
976
- o("dialog", {
977
- id: `advancedSearchMobile-${N(r)}`,
969
+ d("dialog", {
970
+ id: `advancedSearchMobile-${Z(o)}`,
978
971
  class: "modal"
979
972
  }, [
980
- o("div", zt, [
981
- T(v.$slots, "additionalForMobile", {}, () => [
982
- o("h3", At, I(e.currentCategory), 1)
973
+ d("div", Kn, [
974
+ V(v.$slots, "additionalForMobile", {}, () => [
975
+ d("h3", Yn, O(e.currentCategory), 1)
983
976
  ], !0),
984
- (n(!0), a(z, null, E(((V = t.searchOptions.find(
985
- (u) => u.category === t.currentCategory
986
- )) == null ? void 0 : V.tabs) || [], (u, P) => (n(), a("div", {
977
+ (f(!0), p(U, null, F(((T = n.searchOptions.find(
978
+ (r) => r.category === n.currentCategory
979
+ )) == null ? void 0 : T.tabs) || [], (r, b) => (f(), p("div", {
987
980
  class: "collapse bg-base-200 my-4",
988
- key: u.name
981
+ key: r.name
989
982
  }, [
990
- o("input", {
983
+ d("input", {
991
984
  type: "radio",
992
- name: `accordion-${N(r)}`,
993
- checked: P === 0
994
- }, null, 8, Pt),
995
- o("div", Et, [
996
- o("div", null, I(u.name), 1),
997
- u.value !== void 0 && u.value !== null && u.value !== "" ? (n(), a("div", Lt, I(R(u)), 1)) : (n(), a("div", Ut, I(u.description), 1))
985
+ name: `accordion-${Z(o)}`,
986
+ checked: b === 0
987
+ }, null, 8, Jn),
988
+ d("div", Xn, [
989
+ d("div", null, O(r.name), 1),
990
+ r.value !== void 0 && r.value !== null && r.value !== "" ? (f(), p("div", Gn, O(w(r)), 1)) : (f(), p("div", Qn, O(r.description), 1))
998
991
  ]),
999
- o("div", Rt, [
1000
- b[7] || (b[7] = o("br", null, null, -1)),
1001
- (n(), ae(fe(h[u.type]), me({ ref_for: !0 }, u.props || {}, {
1002
- modelValue: u.value,
1003
- onUpdated: b[5] || (b[5] = (w) => j(w)),
1004
- "onUpdate:modelValue": b[6] || (b[6] = (w) => j(w))
992
+ d("div", ea, [
993
+ h[7] || (h[7] = d("br", null, null, -1)),
994
+ (f(), ae(Oe(u[r.type]), Ne({ ref_for: !0 }, r.props || {}, {
995
+ modelValue: r.value,
996
+ onUpdated: h[5] || (h[5] = ($) => g($)),
997
+ "onUpdate:modelValue": h[6] || (h[6] = ($) => g($))
1005
998
  }), null, 16, ["modelValue"]))
1006
999
  ])
1007
1000
  ]))), 128)),
1008
- o("div", { class: "modal-action" }, [
1009
- o("form", { method: "dialog" }, [
1010
- o("button", {
1001
+ d("div", { class: "modal-action" }, [
1002
+ d("form", { method: "dialog" }, [
1003
+ d("button", {
1011
1004
  class: "btn btn-primary",
1012
- onClick: y
1005
+ onClick: S
1013
1006
  }, " Close and Search ")
1014
1007
  ])
1015
1008
  ])
1016
1009
  ])
1017
- ], 8, Ot)
1010
+ ], 8, Zn)
1018
1011
  ], 64);
1019
1012
  };
1020
1013
  }
1021
- }), In = /* @__PURE__ */ le(Nt, [["__scopeId", "data-v-577c3624"]]), jt = ["placeholder", "value", "id", "disabled"], Ft = ["disabled"], qt = ["id"], Ht = {
1022
- key: 0,
1023
- class: "flex justify-between items-center place-content-center mb-4"
1024
- }, Wt = ["disabled"], Kt = ["value"], _t = ["value"], Yt = {
1025
- key: 1,
1026
- class: "gap-2 grid grid-cols-7"
1027
- }, Jt = ["onClick"], Xt = {
1028
- key: 2,
1029
- class: "mt-4 lg:w-80"
1030
- }, Gt = {
1031
- key: 0,
1032
- class: "mb-2 font-bold text-lg"
1033
- }, Zt = { key: 1 }, Qt = {
1034
- key: 1,
1035
- class: "flex gap-4"
1036
- }, el = ["value"], tl = ["value"], ll = {
1037
- key: 2,
1038
- class: "flex flex-col gap-4"
1039
- }, nl = {
1040
- key: 1,
1041
- class: "flex gap-2"
1042
- }, al = ["value"], ol = ["value"], sl = {
1043
- key: 1,
1044
- class: "flex gap-2"
1045
- }, il = ["value"], rl = ["value"], ul = { class: "flex gap-2 mt-4" }, dl = {
1046
- __name: "datetimePicker",
1047
- props: {
1048
- mode: {
1049
- type: String,
1050
- default: "datetime",
1051
- // 'datetime', 'date', 'time'
1052
- validator: (e) => ["datetime", "date", "time"].includes(e)
1053
- },
1054
- range: {
1055
- type: Boolean,
1056
- default: !1
1057
- },
1058
- placeholder: {
1059
- type: String,
1060
- default: "Select date and time"
1061
- },
1062
- popup: {
1063
- type: Boolean,
1064
- default: !1
1065
- },
1066
- id: {
1067
- type: String,
1068
- default: "datetimepicker"
1069
- },
1070
- initialDate: {
1071
- type: Object,
1072
- default: () => null
1014
+ }), $o = /* @__PURE__ */ we(ta, [["__scopeId", "data-v-577c3624"]]);
1015
+ var ne, se;
1016
+ class na {
1017
+ /**
1018
+ * @param {T} current
1019
+ */
1020
+ constructor(t) {
1021
+ /**
1022
+ * @type {T}
1023
+ */
1024
+ Be(this, ne);
1025
+ Be(this, se, /* @__PURE__ */ new Set());
1026
+ Ve(this, ne, t);
1027
+ }
1028
+ /**
1029
+ * @return {T}
1030
+ */
1031
+ get current() {
1032
+ return oe(this, ne);
1033
+ }
1034
+ /**
1035
+ * @param {T} value
1036
+ */
1037
+ set current(t) {
1038
+ oe(this, ne) != t && (Ve(this, ne, t), oe(this, se).forEach((n) => n(t)));
1039
+ }
1040
+ /**
1041
+ * @type {import("hooks").Ref["on"]}
1042
+ */
1043
+ on(t) {
1044
+ return oe(this, se).add(t), () => oe(this, se).delete(t);
1045
+ }
1046
+ }
1047
+ ne = new WeakMap(), se = new WeakMap();
1048
+ const It = (e) => new na(e), Ze = Symbol.for("atomico.hooks");
1049
+ globalThis[Ze] = globalThis[Ze] || {};
1050
+ let re = globalThis[Ze];
1051
+ const aa = Symbol.for("Atomico.suspense"), Et = Symbol.for("Atomico.effect"), la = Symbol.for("Atomico.layoutEffect"), Bt = Symbol.for("Atomico.insertionEffect"), ce = (e, t, n) => {
1052
+ const { i: a, hooks: o } = re.c, l = o[a] = o[a] || {};
1053
+ return l.value = e(l.value), l.effect = t, l.tag = n, re.c.i++, o[a].value;
1054
+ }, oa = (e) => ce((t = It(e)) => t), xe = () => ce((e = It(re.c.host)) => e), Vt = () => re.c.update, sa = (e, t, n = 0) => {
1055
+ let a = {}, o = !1;
1056
+ const l = () => o, s = (u, i) => {
1057
+ for (const c in a) {
1058
+ const m = a[c];
1059
+ m.effect && m.tag === u && (m.value = m.effect(m.value, i));
1060
+ }
1061
+ };
1062
+ return { load: (u) => {
1063
+ re.c = { host: t, hooks: a, update: e, i: 0, id: n };
1064
+ let i;
1065
+ try {
1066
+ o = !1, i = u();
1067
+ } catch (c) {
1068
+ if (c !== aa)
1069
+ throw c;
1070
+ o = !0;
1071
+ } finally {
1072
+ re.c = null;
1073
+ }
1074
+ return i;
1075
+ }, cleanEffects: (u) => (s(Bt, u), () => (s(la, u), () => {
1076
+ s(Et, u);
1077
+ })), isSuspense: l };
1078
+ }, de = Symbol.for;
1079
+ function zt(e, t) {
1080
+ const n = e.length;
1081
+ if (n !== t.length)
1082
+ return !1;
1083
+ for (let a = 0; a < n; a++) {
1084
+ let o = e[a], l = t[a];
1085
+ if (o !== l)
1086
+ return !1;
1087
+ }
1088
+ return !0;
1089
+ }
1090
+ const W = (e) => typeof e == "function", me = (e) => typeof e == "object", { isArray: ia } = Array, Ke = (e, t) => (t ? e instanceof HTMLStyleElement : !0) && "hydrate" in ((e == null ? void 0 : e.dataset) || {});
1091
+ function Pt(e, t) {
1092
+ let n;
1093
+ const a = (o) => {
1094
+ let { length: l } = o;
1095
+ for (let s = 0; s < l; s++) {
1096
+ const u = o[s];
1097
+ if (u && Array.isArray(u))
1098
+ a(u);
1099
+ else {
1100
+ const i = typeof u;
1101
+ if (u == null || i === "function" || i === "boolean")
1102
+ continue;
1103
+ i === "string" || i === "number" ? (n == null && (n = ""), n += u) : (n != null && (t(n), n = null), t(u));
1104
+ }
1105
+ }
1106
+ };
1107
+ a(e), n != null && t(n);
1108
+ }
1109
+ const Ot = (e, t, n) => (e.addEventListener(t, n), () => e.removeEventListener(t, n));
1110
+ class Nt {
1111
+ /**
1112
+ *
1113
+ * @param {HTMLElement} target
1114
+ * @param {string} message
1115
+ * @param {string} value
1116
+ */
1117
+ constructor(t, n, a) {
1118
+ this.message = n, this.target = t, this.value = a;
1119
+ }
1120
+ }
1121
+ class At extends Nt {
1122
+ }
1123
+ class ra extends Nt {
1124
+ }
1125
+ const De = "Custom", ua = null, ca = { true: 1, "": 1, 1: 1 };
1126
+ function da(e, t, n, a, o) {
1127
+ const {
1128
+ type: l,
1129
+ reflect: s,
1130
+ event: u,
1131
+ value: i,
1132
+ attr: c = fa(t)
1133
+ } = (n == null ? void 0 : n.name) != De && me(n) && n != ua ? n : { type: n }, m = (l == null ? void 0 : l.name) === De && l.map, w = i != null ? l == Function || !W(i) ? () => i : i : null;
1134
+ Object.defineProperty(e, t, {
1135
+ configurable: !0,
1136
+ /**
1137
+ * @this {import("dom").AtomicoThisInternal}
1138
+ * @param {any} newValue
1139
+ */
1140
+ set(g) {
1141
+ const y = this[t];
1142
+ w && l != Boolean && g == null && (g = w());
1143
+ const { error: S, value: D } = (m ? ha : va)(
1144
+ l,
1145
+ g
1146
+ );
1147
+ if (S && D != null)
1148
+ throw new At(
1149
+ this,
1150
+ `The value defined for prop '${t}' must be of type '${l.name}'`,
1151
+ D
1152
+ );
1153
+ y != D && (this._props[t] = D ?? void 0, this.update(), u && Lt(this, u), this.updated.then(() => {
1154
+ s && (this._ignoreAttr = c, ma(this, l, c, this[t]), this._ignoreAttr = null);
1155
+ }));
1073
1156
  },
1074
- disabled: {
1075
- type: Boolean,
1076
- default: !1
1157
+ /**
1158
+ * @this {import("dom").AtomicoThisInternal}
1159
+ */
1160
+ get() {
1161
+ return this._props[t];
1077
1162
  }
1078
- },
1079
- emits: ["updated"],
1080
- setup(e, { emit: c }) {
1081
- const t = e;
1082
- H(
1083
- () => t.range,
1084
- (p) => {
1085
- p ? (l.value = { start: null, end: null }, s.value = { start: null, end: null }) : (l.value = null, s.value = null);
1163
+ }), w && (o[t] = w()), a[c] = { prop: t, type: l };
1164
+ }
1165
+ const Lt = (e, { type: t, base: n = CustomEvent, ...a }) => e.dispatchEvent(new n(t, a)), fa = (e) => e.replace(/([A-Z])/g, "-$1").toLowerCase(), ma = (e, t, n, a) => a == null || t == Boolean && !a ? e.removeAttribute(n) : e.setAttribute(
1166
+ n,
1167
+ (t == null ? void 0 : t.name) === De && (t != null && t.serialize) ? t == null ? void 0 : t.serialize(a) : me(a) ? JSON.stringify(a) : t == Boolean ? "" : a
1168
+ ), pa = (e, t) => e == Boolean ? !!ca[t] : e == Number ? Number(t) : e == String ? t : e == Array || e == Object ? JSON.parse(t) : e.name == De ? t : (
1169
+ // TODO: If when defining reflect the prop can also be of type string?
1170
+ new e(t)
1171
+ ), ha = ({ map: e }, t) => {
1172
+ try {
1173
+ return { value: e(t), error: !1 };
1174
+ } catch {
1175
+ return { value: t, error: !0 };
1176
+ }
1177
+ }, va = (e, t) => e == null || t == null ? { value: t, error: !1 } : e != String && t === "" ? { value: void 0, error: !1 } : e == Object || e == Array || e == Symbol ? {
1178
+ value: t,
1179
+ error: {}.toString.call(t) !== `[object ${e.name}]`
1180
+ } : t instanceof e ? {
1181
+ value: t,
1182
+ error: e == Number && Number.isNaN(t.valueOf())
1183
+ } : e == String || e == Number || e == Boolean ? {
1184
+ value: t,
1185
+ error: e == Number ? typeof t != "number" ? !0 : Number.isNaN(t) : e == String ? typeof t != "string" : typeof t != "boolean"
1186
+ } : { value: t, error: !0 };
1187
+ let ga = 0;
1188
+ const ya = (e) => {
1189
+ var n;
1190
+ return ((n = (e == null ? void 0 : e.dataset) || {}) == null ? void 0 : n.hydrate) || "" || "c" + ga++;
1191
+ }, ke = (e, t = HTMLElement) => {
1192
+ const n = {}, a = {}, o = "prototype" in t && t.prototype instanceof Element, l = o ? t : "base" in t ? t.base : HTMLElement, { props: s, styles: u } = o ? e : t;
1193
+ class i extends l {
1194
+ constructor() {
1195
+ super(), this._setup(), this._render = () => e({ ...this._props });
1196
+ for (const m in a)
1197
+ this[m] = a[m];
1198
+ }
1199
+ /**
1200
+ * @returns {import("core").Sheets[]}
1201
+ */
1202
+ static get styles() {
1203
+ return [super.styles, u];
1204
+ }
1205
+ async _setup() {
1206
+ if (this._props)
1207
+ return;
1208
+ this._props = {};
1209
+ let m, w;
1210
+ this.mounted = new Promise(
1211
+ (k) => this.mount = () => {
1212
+ k(), m != this.parentNode && (w != m ? this.unmounted.then(this.update) : this.update()), m = this.parentNode;
1213
+ }
1214
+ ), this.unmounted = new Promise(
1215
+ (k) => this.unmount = () => {
1216
+ k(), (m != this.parentNode || !this.isConnected) && (g.cleanEffects(!0)()(), w = this.parentNode, m = null);
1217
+ }
1218
+ ), this.symbolId = this.symbolId || Symbol(), this.symbolIdParent = Symbol();
1219
+ const g = sa(
1220
+ () => this.update(),
1221
+ this,
1222
+ ya(this)
1223
+ );
1224
+ let y, S = !0;
1225
+ const D = Ke(this);
1226
+ this.update = () => (y || (y = !0, this.updated = (this.updated || this.mounted).then(() => {
1227
+ try {
1228
+ const k = g.load(this._render), C = g.cleanEffects();
1229
+ return k && //@ts-ignore
1230
+ k.render(this, this.symbolId, D), y = !1, S && !g.isSuspense() && (S = !1, !D && ba(this)), C();
1231
+ } finally {
1232
+ y = !1;
1233
+ }
1234
+ }).then(
1235
+ /**
1236
+ * @param {import("internal/hooks.js").CleanUseEffects} [cleanUseEffect]
1237
+ */
1238
+ (k) => {
1239
+ k && k();
1240
+ }
1241
+ )), this.updated), this.update();
1242
+ }
1243
+ connectedCallback() {
1244
+ this.mount(), super.connectedCallback && super.connectedCallback();
1245
+ }
1246
+ disconnectedCallback() {
1247
+ super.disconnectedCallback && super.disconnectedCallback(), this.unmount();
1248
+ }
1249
+ /**
1250
+ * @this {import("dom").AtomicoThisInternal}
1251
+ * @param {string} attr
1252
+ * @param {(string|null)} oldValue
1253
+ * @param {(string|null)} value
1254
+ */
1255
+ attributeChangedCallback(m, w, g) {
1256
+ if (n[m]) {
1257
+ if (m === this._ignoreAttr || w === g)
1258
+ return;
1259
+ const { prop: y, type: S } = n[m];
1260
+ try {
1261
+ this[y] = pa(S, g);
1262
+ } catch {
1263
+ throw new ra(
1264
+ this,
1265
+ `The value defined as attr '${m}' cannot be parsed by type '${S.name}'`,
1266
+ g
1267
+ );
1268
+ }
1269
+ } else
1270
+ super.attributeChangedCallback(m, w, g);
1271
+ }
1272
+ static get props() {
1273
+ return { ...super.props, ...s };
1274
+ }
1275
+ static get observedAttributes() {
1276
+ const m = super.observedAttributes || [];
1277
+ for (const w in s)
1278
+ da(this.prototype, w, s[w], n, a);
1279
+ return Object.keys(n).concat(m);
1280
+ }
1281
+ }
1282
+ return i;
1283
+ };
1284
+ function ba(e) {
1285
+ const { styles: t } = e.constructor, { shadowRoot: n } = e;
1286
+ if (n && t.length) {
1287
+ const a = [];
1288
+ Pt(t, (o) => {
1289
+ o && (o instanceof Element ? n.appendChild(o.cloneNode(!0)) : a.push(o));
1290
+ }), a.length && (n.adoptedStyleSheets = a);
1291
+ }
1292
+ }
1293
+ const Ut = (e) => (t, n) => {
1294
+ ce(
1295
+ /**
1296
+ * Clean the effect hook
1297
+ * @type {import("internal/hooks.js").CollectorEffect}
1298
+ */
1299
+ ([a, o] = []) => ((o || !o) && (o && zt(o, n) ? a = a || !0 : (W(a) && a(), a = null)), [a, n]),
1300
+ /**
1301
+ * @returns {any}
1302
+ */
1303
+ ([a, o], l) => l ? (W(a) && a(), []) : [a || t(), o],
1304
+ e
1305
+ );
1306
+ }, ve = Ut(Et), wa = Ut(Bt);
1307
+ class jt extends Array {
1308
+ /**
1309
+ *
1310
+ * @param {any} initialState
1311
+ * @param {(nextState: any, state:any[], mount: boolean )=>void} mapState
1312
+ */
1313
+ constructor(t, n) {
1314
+ let a = !0;
1315
+ const o = (l) => {
1316
+ try {
1317
+ n(l, this, a);
1318
+ } finally {
1319
+ a = !1;
1086
1320
  }
1321
+ };
1322
+ super(void 0, o, n), o(t);
1323
+ }
1324
+ /**
1325
+ * The following code allows a mutable approach to useState
1326
+ * and useProp this with the idea of allowing an alternative
1327
+ * approach similar to Vue or Qwik of state management
1328
+ * @todo pending review with the community
1329
+ */
1330
+ // get value() {
1331
+ // return this[0];
1332
+ // }
1333
+ // set value(nextState) {
1334
+ // this[2](nextState, this);
1335
+ // }
1336
+ }
1337
+ const Ge = (e) => {
1338
+ const t = Vt();
1339
+ return ce(
1340
+ (n = new jt(e, (a, o, l) => {
1341
+ a = W(a) ? a(o[0]) : a, a !== o[0] && (o[0] = a, l || t());
1342
+ })) => n
1343
+ );
1344
+ }, J = (e, t) => {
1345
+ const [n] = ce(([a, o, l = 0] = []) => ((!o || o && !zt(o, t)) && (a = e()), [a, t, l]));
1346
+ return n;
1347
+ }, Qe = (e) => {
1348
+ const { current: t } = xe();
1349
+ if (!(e in t))
1350
+ throw new At(
1351
+ t,
1352
+ `For useProp("${e}"), the prop does not exist on the host.`,
1353
+ e
1087
1354
  );
1088
- const i = c, r = C(!1), l = C(t.range ? { start: null, end: null } : null), s = C(t.range ? { start: null, end: null } : null), h = C(
1089
- (/* @__PURE__ */ new Date()).toLocaleString("default", { month: "long" })
1090
- ), f = C((/* @__PURE__ */ new Date()).getFullYear()), m = C(t.range ? { start: 0, end: 0 } : 0), k = C(t.range ? { start: 0, end: 0 } : 0), R = C(null), j = L(() => `${t.id}-input`), x = L(() => `${t.id}-popup`), y = L(
1091
- () => t.mode === "date" || t.mode === "datetime"
1092
- ), $ = L(
1093
- () => t.mode === "time" || t.mode === "datetime"
1355
+ return ce(
1356
+ (n = new jt(t[e], (a, o) => {
1357
+ a = W(a) ? a(t[e]) : a, t[e] = a;
1358
+ })) => (n[0] = t[e], n)
1359
+ );
1360
+ }, X = (e, t = {}) => {
1361
+ const n = xe();
1362
+ return n[e] || (n[e] = (a = t.detail) => Lt(n.current, {
1363
+ type: e,
1364
+ ...t,
1365
+ detail: a
1366
+ })), n[e];
1367
+ }, Ye = de("atomico/options");
1368
+ globalThis[Ye] = globalThis[Ye] || {
1369
+ sheet: !!document.adoptedStyleSheets
1370
+ };
1371
+ const Ft = globalThis[Ye], xa = {
1372
+ checked: 1,
1373
+ value: 1,
1374
+ selected: 1
1375
+ }, ka = {
1376
+ list: 1,
1377
+ type: 1,
1378
+ size: 1,
1379
+ form: 1,
1380
+ width: 1,
1381
+ height: 1,
1382
+ src: 1,
1383
+ href: 1,
1384
+ slot: 1
1385
+ }, $a = {
1386
+ shadowDom: 1,
1387
+ staticNode: 1,
1388
+ cloneNode: 1,
1389
+ children: 1,
1390
+ key: 1
1391
+ }, Se = {}, Je = [];
1392
+ class Xe extends Text {
1393
+ }
1394
+ const Sa = de("atomico/id"), pe = de("atomico/type"), Le = de("atomico/ref"), Rt = de("atomico/vnode"), Ca = () => {
1395
+ };
1396
+ function Da(e, t, n) {
1397
+ return Ht(this, e, t, n);
1398
+ }
1399
+ const qt = (e, t, ...n) => {
1400
+ const a = t || Se;
1401
+ let { children: o } = a;
1402
+ if (o = o ?? (n.length ? n : Je), e === Ca)
1403
+ return o;
1404
+ const l = e ? e instanceof Node ? 1 : (
1405
+ //@ts-ignore
1406
+ e.prototype instanceof HTMLElement && 2
1407
+ ) : 0;
1408
+ if (l === !1 && e instanceof Function)
1409
+ return e(
1410
+ o != Je ? { children: o, ...a } : a
1094
1411
  );
1095
- L(
1096
- () => new Date(f.value, M.value)
1412
+ const s = Ft.render || Da;
1413
+ return {
1414
+ [pe]: Rt,
1415
+ type: e,
1416
+ props: a,
1417
+ children: o,
1418
+ key: a.key,
1419
+ // key for lists by keys
1420
+ // define if the node declares its shadowDom
1421
+ shadow: a.shadowDom,
1422
+ // allows renderings to run only once
1423
+ static: a.staticNode,
1424
+ // defines whether the type is a childNode `1` or a constructor `2`
1425
+ raw: l,
1426
+ // defines whether to use the second parameter for document.createElement
1427
+ is: a.is,
1428
+ // clone the node if it comes from a reference
1429
+ clone: a.cloneNode,
1430
+ render: s
1431
+ };
1432
+ };
1433
+ function Ht(e, t, n = Sa, a, o) {
1434
+ let l;
1435
+ if (t && t[n] && t[n].vnode == e || e[pe] != Rt)
1436
+ return t;
1437
+ (e || !t) && (o = o || e.type == "svg", l = e.type != "host" && (e.raw == 1 ? (t && e.clone ? t[Le] : t) != e.type : e.raw == 2 ? !(t instanceof e.type) : t ? t[Le] || t.localName != e.type : !t), l && e.type != null && (e.raw == 1 && e.clone ? (a = !0, t = e.type.cloneNode(!0), t[Le] = e.type) : t = e.raw == 1 ? e.type : e.raw == 2 ? new e.type() : o ? document.createElementNS(
1438
+ "http://www.w3.org/2000/svg",
1439
+ e.type
1440
+ ) : document.createElement(
1441
+ e.type,
1442
+ e.is ? { is: e.is } : void 0
1443
+ )));
1444
+ const s = t[n] ? t[n] : Se, { vnode: u = Se, cycle: i = 0 } = s;
1445
+ let { fragment: c, handlers: m } = s;
1446
+ const { children: w = Je, props: g = Se } = u;
1447
+ if (m = l ? {} : m || {}, e.static && !l)
1448
+ return t;
1449
+ if (e.shadow && !t.shadowRoot && // @ts-ignore
1450
+ t.attachShadow({ mode: "open", ...e.shadow }), e.props != g && Ia(t, g, e.props, m, o), e.children !== w) {
1451
+ const y = e.shadow ? t.shadowRoot : t;
1452
+ c = Ma(
1453
+ e.children,
1454
+ /**
1455
+ * @todo for hydration use attribute and send childNodes
1456
+ */
1457
+ c,
1458
+ y,
1459
+ n,
1460
+ // add support to foreignObject, children will escape from svg
1461
+ !i && a,
1462
+ o && e.type == "foreignObject" ? !1 : o
1097
1463
  );
1098
- const M = L(() => V.indexOf(h.value)), A = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], F = L(
1099
- () => new Date(f.value, M.value).getDay()
1100
- ), K = L(() => {
1101
- const p = new Date(f.value, M.value + 1, 0).getDate();
1102
- return Array.from(
1103
- { length: p },
1104
- (g, d) => new Date(f.value, M.value, d + 1)
1464
+ }
1465
+ return t[n] = { vnode: e, handlers: m, fragment: c, cycle: i + 1 }, t;
1466
+ }
1467
+ function Ta(e, t) {
1468
+ const n = new Xe(""), a = new Xe("");
1469
+ let o;
1470
+ if (e[t ? "prepend" : "append"](n), t) {
1471
+ let { lastElementChild: l } = e;
1472
+ for (; l; ) {
1473
+ const { previousElementSibling: s } = l;
1474
+ if (Ke(l, !0) && !Ke(s, !0)) {
1475
+ o = l;
1476
+ break;
1477
+ }
1478
+ l = s;
1479
+ }
1480
+ }
1481
+ return o ? o.before(a) : e.append(a), {
1482
+ markStart: n,
1483
+ markEnd: a
1484
+ };
1485
+ }
1486
+ function Ma(e, t, n, a, o, l) {
1487
+ e = e == null ? null : ia(e) ? e : [e];
1488
+ const s = t || Ta(n, o), { markStart: u, markEnd: i, keyes: c } = s;
1489
+ let m;
1490
+ const w = c && /* @__PURE__ */ new Set();
1491
+ let g = u;
1492
+ if (e && Pt(e, (y) => {
1493
+ if (typeof y == "object" && !y[pe])
1494
+ return;
1495
+ const S = y[pe] && y.key, D = c && S != null && c.get(S);
1496
+ g != i && g === D ? w.delete(g) : g = g == i ? i : g.nextSibling;
1497
+ const k = c ? D : g;
1498
+ let C = k;
1499
+ if (y[pe])
1500
+ C = Ht(y, k, a, o, l);
1501
+ else {
1502
+ const z = y + "";
1503
+ !(C instanceof Text) || C instanceof Xe ? C = new Text(z) : C.data != z && (C.data = z);
1504
+ }
1505
+ C != g && (c && w.delete(C), !k || c ? (n.insertBefore(C, g), c && g != i && w.add(g)) : k == i ? n.insertBefore(C, i) : (n.replaceChild(C, k), g = C)), S != null && (m = m || /* @__PURE__ */ new Map(), m.set(S, C));
1506
+ }), g = g == i ? i : g.nextSibling, t && g != i)
1507
+ for (; g != i; ) {
1508
+ const y = g;
1509
+ g = g.nextSibling, y.remove();
1510
+ }
1511
+ return w && w.forEach((y) => y.remove()), s.keyes = m, s;
1512
+ }
1513
+ function Ia(e, t, n, a, o) {
1514
+ for (const l in t)
1515
+ !(l in n) && vt(e, l, t[l], null, o, a);
1516
+ for (const l in n)
1517
+ vt(e, l, t[l], n[l], o, a);
1518
+ }
1519
+ function vt(e, t, n, a, o, l) {
1520
+ if (t = t == "class" && !o ? "className" : t, n = n ?? null, a = a ?? null, t in e && xa[t] && (n = e[t]), !(a === n || $a[t] || t[0] == "_"))
1521
+ if (t[0] == "o" && t[1] == "n" && (W(a) || W(n)))
1522
+ Ea(e, t.slice(2), a, l);
1523
+ else if (t == "ref")
1524
+ a && (W(a) ? a(e) : a.current = e);
1525
+ else if (t == "style") {
1526
+ const { style: s } = e;
1527
+ n = n || "", a = a || "";
1528
+ const u = me(n), i = me(a);
1529
+ if (u)
1530
+ for (const c in n)
1531
+ if (i)
1532
+ !(c in a) && gt(s, c, null);
1533
+ else
1534
+ break;
1535
+ if (i)
1536
+ for (const c in a) {
1537
+ const m = a[c];
1538
+ u && n[c] === m || gt(s, c, m);
1539
+ }
1540
+ else
1541
+ s.cssText = a;
1542
+ } else {
1543
+ const s = t[0] == "$" ? t.slice(1) : t;
1544
+ s === t && (!o && !ka[t] && t in e || W(a) || W(n)) ? e[t] = a ?? "" : a == null ? e.removeAttribute(s) : e.setAttribute(
1545
+ s,
1546
+ me(a) ? JSON.stringify(a) : a
1105
1547
  );
1106
- }), Y = L(
1107
- () => Array.from({ length: F.value }, (p, g) => g)
1108
- ), v = Array.from({ length: 24 }, (p, g) => g), b = Array.from({ length: 60 }, (p, g) => g), S = L(
1109
- () => typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
1110
- navigator.userAgent
1111
- )
1112
- ), V = [
1113
- "January",
1114
- "February",
1115
- "March",
1116
- "April",
1117
- "May",
1118
- "June",
1119
- "July",
1120
- "August",
1121
- "September",
1122
- "October",
1123
- "November",
1124
- "December"
1125
- ], u = L(() => {
1126
- const p = (/* @__PURE__ */ new Date()).getFullYear();
1127
- return Array.from({ length: 100 }, (g, d) => p - 50 + d);
1128
- }), P = L(() => {
1129
- if (!y.value || !l.value) return "";
1130
- if (t.range && l.value.start && l.value.end) {
1131
- const p = l.value.start.toLocaleDateString("en-US"), g = l.value.end.toLocaleDateString("en-US");
1132
- return `${p} - ${g}`;
1548
+ }
1549
+ }
1550
+ function Ea(e, t, n, a) {
1551
+ if (a.handleEvent || (a.handleEvent = (o) => a[o.type].call(e, o)), n) {
1552
+ if (!a[t]) {
1553
+ const o = n.capture || n.once || n.passive ? Object.assign({}, n) : null;
1554
+ e.addEventListener(t, a, o);
1555
+ }
1556
+ a[t] = n;
1557
+ } else
1558
+ a[t] && (e.removeEventListener(t, a), delete a[t]);
1559
+ }
1560
+ function gt(e, t, n) {
1561
+ let a = "setProperty";
1562
+ n == null && (a = "removeProperty", n = null), ~t.indexOf("-") ? e[a](t, n) : e[t] = n;
1563
+ }
1564
+ const yt = {};
1565
+ function Me(e, ...t) {
1566
+ const n = (e.raw || e).reduce(
1567
+ (a, o, l) => a + o + (t[l] || ""),
1568
+ ""
1569
+ );
1570
+ return yt[n] = yt[n] || Ba(n);
1571
+ }
1572
+ function Ba(e) {
1573
+ if (Ft.sheet) {
1574
+ const t = new CSSStyleSheet();
1575
+ return t.replaceSync(e), t;
1576
+ } else {
1577
+ const t = document.createElement("style");
1578
+ return t.textContent = e, t;
1579
+ }
1580
+ }
1581
+ const Va = qt("host", { style: "display: contents" }), Ue = de("atomico/context"), za = (e, t) => {
1582
+ const n = xe();
1583
+ wa(
1584
+ () => Ot(
1585
+ n.current,
1586
+ "ConnectContext",
1587
+ /**
1588
+ * @param {CustomEvent<import("context").DetailConnectContext>} event
1589
+ */
1590
+ (a) => {
1591
+ e === a.detail.id && (a.stopPropagation(), a.detail.connect(t));
1133
1592
  }
1134
- return !t.range && l.value ? l.value.toLocaleDateString("en-US") : "";
1135
- }), w = (p) => p instanceof Date ? p : new Date(p), B = (p) => p instanceof Date && !isNaN(p), _ = L(() => {
1136
- if (!$.value) return "";
1137
- const p = (g) => {
1138
- var ue, ne, ye;
1139
- const d = ((ue = m.value) == null ? void 0 : ue[g]) ?? m.value, G = ((ne = k.value) == null ? void 0 : ne[g]) ?? k.value;
1140
- return S.value ? ((ye = s.value) == null ? void 0 : ye[g]) ?? s.value : `${d.toString().padStart(2, "0")}:${G.toString().padStart(2, "0")}`;
1141
- };
1142
- return t.range ? `${p("start")} - ${p("end")}` : p();
1143
- }), J = L(() => {
1144
- const p = P.value, g = _.value;
1145
- return `${p} ${g}`.trim();
1146
- }), re = () => r.value = !r.value, X = () => {
1147
- q(), Se();
1148
- }, Se = () => r.value = !1, Ce = () => {
1149
- l.value = t.range ? { start: null, end: null } : null, s.value = t.range ? { start: null, end: null } : null, q();
1150
- }, Ie = (p) => {
1151
- t.range ? l.value.start && l.value.end ? l.value = { start: p, end: null } : l.value.start ? l.value.end = p : l.value.start = p : l.value = p, q();
1152
- }, Me = (p) => (p = w(p), t.range ? l.value.start && B(l.value.start) && p.getTime() === l.value.start.getTime() || l.value.end && B(l.value.end) && p.getTime() === l.value.end.getTime() : B(l.value) && p.getTime() === l.value.getTime()), De = (p) => {
1153
- p = w(p);
1154
- const g = /* @__PURE__ */ new Date();
1155
- return p.getDate() === g.getDate() && p.getMonth() === g.getMonth() && p.getFullYear() === g.getFullYear();
1156
- }, Te = (p) => (p = w(p), t.range && B(l.value.start) && p.getTime() === l.value.start.getTime()), Ve = (p) => (p = w(p), t.range && B(l.value.end) && p.getTime() === l.value.end.getTime()), Be = (p) => {
1157
- if (p = w(p), t.range && B(l.value.start) && B(l.value.end)) {
1158
- const g = l.value.start.getTime(), d = l.value.end.getTime(), G = p.getTime();
1159
- return G > g && G < d;
1593
+ ),
1594
+ [e]
1595
+ );
1596
+ }, Pa = (e) => {
1597
+ const t = X("ConnectContext", {
1598
+ bubbles: !0,
1599
+ composed: !0
1600
+ }), n = () => {
1601
+ let l;
1602
+ return t({
1603
+ id: e,
1604
+ connect(s) {
1605
+ l = s;
1160
1606
  }
1161
- return !1;
1162
- }, Oe = () => {
1163
- let p = M.value - 1;
1164
- p < 0 && (p = 11, f.value--), h.value = V[p], q();
1165
- }, ze = () => {
1166
- let p = M.value + 1;
1167
- p > 11 && (p = 0, f.value++), h.value = V[p], q();
1168
- }, be = (p) => {
1169
- R.value && !R.value.contains(p.target) && r.value == !0 && X();
1170
- }, q = () => {
1171
- let p = {};
1172
- const g = (d, G, ue) => {
1173
- d instanceof Date && !isNaN(d) || (d = /* @__PURE__ */ new Date());
1174
- const ne = new Date(d);
1175
- return ne.setUTCHours(G, ue, 0, 0), ne.toISOString();
1607
+ }), l;
1608
+ }, [a, o] = Ge(
1609
+ n
1610
+ );
1611
+ return ve(() => {
1612
+ a || (e[Ue] || (e[Ue] = customElements.whenDefined(
1613
+ new e().localName
1614
+ )), e[Ue].then(
1615
+ () => o(n)
1616
+ ));
1617
+ }, [e]), a;
1618
+ }, Oa = (e) => {
1619
+ const t = Pa(e), n = Vt();
1620
+ return ve(() => {
1621
+ if (t)
1622
+ return Ot(t, "UpdatedValue", n);
1623
+ }, [t]), (t || e).value;
1624
+ }, Na = (e) => {
1625
+ const t = ke(
1626
+ () => (za(t, xe().current), Va),
1627
+ {
1628
+ props: {
1629
+ value: {
1630
+ type: Object,
1631
+ event: { type: "UpdatedValue" },
1632
+ value: () => e
1633
+ }
1634
+ }
1635
+ }
1636
+ );
1637
+ return t.value = e, t;
1638
+ }, N = (e, t, n) => (t == null ? t = { key: n } : t.key = n, qt(e, t)), he = N, _t = Me`*,*:before,*:after{box-sizing:border-box}button{padding:0;touch-action:manipulation;cursor:pointer;user-select:none}`, Wt = Me`.vh{position:absolute;transform:scale(0)}`;
1639
+ function et() {
1640
+ const e = /* @__PURE__ */ new Date();
1641
+ return new L(e.getFullYear(), e.getMonth() + 1, e.getDate());
1642
+ }
1643
+ function tt(e, t = 0) {
1644
+ const n = _(e), a = n.getUTCDay(), o = (a < t ? 7 : 0) + a - t;
1645
+ return n.setUTCDate(n.getUTCDate() - o), L.from(n);
1646
+ }
1647
+ function Zt(e, t = 0) {
1648
+ return tt(e, t).add({ days: 6 });
1649
+ }
1650
+ function Kt(e) {
1651
+ return L.from(new Date(Date.UTC(e.year, e.month, 0)));
1652
+ }
1653
+ function Ie(e, t, n) {
1654
+ return t && L.compare(e, t) < 0 ? t : n && L.compare(e, n) > 0 ? n : e;
1655
+ }
1656
+ const Aa = { days: 1 };
1657
+ function La(e, t = 0) {
1658
+ let n = tt(e.toPlainDate(), t);
1659
+ const a = Zt(Kt(e), t), o = [];
1660
+ for (; L.compare(n, a) < 0; ) {
1661
+ const l = [];
1662
+ for (let s = 0; s < 7; s++)
1663
+ l.push(n), n = n.add(Aa);
1664
+ o.push(l);
1665
+ }
1666
+ return o;
1667
+ }
1668
+ function _(e) {
1669
+ return new Date(Date.UTC(e.year, e.month - 1, e.day ?? 1));
1670
+ }
1671
+ const Ua = /^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[0-1])$/, je = (e, t) => e.toString().padStart(t, "0");
1672
+ class L {
1673
+ constructor(t, n, a) {
1674
+ this.year = t, this.month = n, this.day = a;
1675
+ }
1676
+ // this is an incomplete implementation that only handles arithmetic on a single unit at a time.
1677
+ // i didn't want to get into more complex arithmetic since it get tricky fast
1678
+ // this is enough to serve my needs and will still be a drop-in replacement when actual Temporal API lands
1679
+ add(t) {
1680
+ const n = _(this);
1681
+ if ("days" in t)
1682
+ return n.setUTCDate(this.day + t.days), L.from(n);
1683
+ let { year: a, month: o } = this;
1684
+ "months" in t ? (o = this.month + t.months, n.setUTCMonth(o - 1)) : (a = this.year + t.years, n.setUTCFullYear(a));
1685
+ const l = L.from(_({ year: a, month: o, day: 1 }));
1686
+ return Ie(L.from(n), l, Kt(l));
1687
+ }
1688
+ toString() {
1689
+ return `${je(this.year, 4)}-${je(this.month, 2)}-${je(this.day, 2)}`;
1690
+ }
1691
+ toPlainYearMonth() {
1692
+ return new Ee(this.year, this.month);
1693
+ }
1694
+ equals(t) {
1695
+ return L.compare(this, t) === 0;
1696
+ }
1697
+ static compare(t, n) {
1698
+ return t.year < n.year ? -1 : t.year > n.year ? 1 : t.month < n.month ? -1 : t.month > n.month ? 1 : t.day < n.day ? -1 : t.day > n.day ? 1 : 0;
1699
+ }
1700
+ static from(t) {
1701
+ if (typeof t == "string") {
1702
+ const n = t.match(Ua);
1703
+ if (!n)
1704
+ throw new TypeError(t);
1705
+ const [, a, o, l] = n;
1706
+ return new L(
1707
+ parseInt(a, 10),
1708
+ parseInt(o, 10),
1709
+ parseInt(l, 10)
1710
+ );
1711
+ }
1712
+ return new L(
1713
+ t.getUTCFullYear(),
1714
+ t.getUTCMonth() + 1,
1715
+ t.getUTCDate()
1716
+ );
1717
+ }
1718
+ }
1719
+ class Ee {
1720
+ constructor(t, n) {
1721
+ this.year = t, this.month = n;
1722
+ }
1723
+ add(t) {
1724
+ const n = _(this), a = (t.months ?? 0) + (t.years ?? 0) * 12;
1725
+ return n.setUTCMonth(n.getUTCMonth() + a), new Ee(n.getUTCFullYear(), n.getUTCMonth() + 1);
1726
+ }
1727
+ equals(t) {
1728
+ return this.year === t.year && this.month === t.month;
1729
+ }
1730
+ toPlainDate() {
1731
+ return new L(this.year, this.month, 1);
1732
+ }
1733
+ }
1734
+ function Te(e, t) {
1735
+ if (t)
1736
+ try {
1737
+ return e.from(t);
1738
+ } catch {
1739
+ }
1740
+ }
1741
+ function G(e) {
1742
+ const [t, n] = Qe(e);
1743
+ return [J(() => Te(L, t), [t]), (a) => n(a == null ? void 0 : a.toString())];
1744
+ }
1745
+ function ja(e) {
1746
+ const [t = "", n] = Qe(e);
1747
+ return [J(() => {
1748
+ const [a, o] = t.split("/"), l = Te(L, a), s = Te(L, o);
1749
+ return l && s ? [l, s] : [];
1750
+ }, [t]), (a) => n(`${a[0]}/${a[1]}`)];
1751
+ }
1752
+ function Fa(e) {
1753
+ const [t = "", n] = Qe(e);
1754
+ return [J(() => {
1755
+ const a = [];
1756
+ for (const o of t.trim().split(/\s+/)) {
1757
+ const l = Te(L, o);
1758
+ l && a.push(l);
1759
+ }
1760
+ return a;
1761
+ }, [t]), (a) => n(a.join(" "))];
1762
+ }
1763
+ function ge(e, t) {
1764
+ return J(
1765
+ () => new Intl.DateTimeFormat(t, { timeZone: "UTC", ...e }),
1766
+ [t, e]
1767
+ );
1768
+ }
1769
+ function bt(e, t, n) {
1770
+ const a = ge(e, n);
1771
+ return J(() => {
1772
+ const o = [], l = /* @__PURE__ */ new Date();
1773
+ for (var s = 0; s < 7; s++) {
1774
+ const u = (l.getUTCDay() - t + 7) % 7;
1775
+ o[u] = a.format(l), l.setUTCDate(l.getUTCDate() + 1);
1776
+ }
1777
+ return o;
1778
+ }, [t, a]);
1779
+ }
1780
+ const wt = (e, t, n) => Ie(e, t, n) === e, xt = (e) => e.target.matches(":dir(ltr)"), Ra = { month: "long", day: "numeric" }, qa = { month: "long" }, Ha = { weekday: "long" }, Fe = { bubbles: !0 };
1781
+ function _a({ props: e, context: t }) {
1782
+ const { offset: n } = e, {
1783
+ firstDayOfWeek: a,
1784
+ isDateDisallowed: o,
1785
+ min: l,
1786
+ max: s,
1787
+ today: u,
1788
+ page: i,
1789
+ locale: c,
1790
+ focusedDate: m,
1791
+ formatWeekday: w
1792
+ } = t, g = u ?? et(), y = bt(Ha, a, c), S = J(
1793
+ () => ({ weekday: w }),
1794
+ [w]
1795
+ ), D = bt(S, a, c), k = ge(Ra, c), C = ge(qa, c), z = J(
1796
+ () => i.start.add({ months: n }),
1797
+ [i, n]
1798
+ ), j = J(
1799
+ () => La(z, a),
1800
+ [z, a]
1801
+ ), H = X("focusday", Fe), v = X("selectday", Fe), h = X("hoverday", Fe);
1802
+ function x(b) {
1803
+ H(Ie(b, l, s));
1804
+ }
1805
+ function T(b) {
1806
+ let $;
1807
+ switch (b.key) {
1808
+ case "ArrowRight":
1809
+ $ = m.add({ days: xt(b) ? 1 : -1 });
1810
+ break;
1811
+ case "ArrowLeft":
1812
+ $ = m.add({ days: xt(b) ? -1 : 1 });
1813
+ break;
1814
+ case "ArrowDown":
1815
+ $ = m.add({ days: 7 });
1816
+ break;
1817
+ case "ArrowUp":
1818
+ $ = m.add({ days: -7 });
1819
+ break;
1820
+ case "PageUp":
1821
+ $ = m.add(b.shiftKey ? { years: -1 } : { months: -1 });
1822
+ break;
1823
+ case "PageDown":
1824
+ $ = m.add(b.shiftKey ? { years: 1 } : { months: 1 });
1825
+ break;
1826
+ case "Home":
1827
+ $ = tt(m, a);
1828
+ break;
1829
+ case "End":
1830
+ $ = Zt(m, a);
1831
+ break;
1832
+ default:
1833
+ return;
1834
+ }
1835
+ x($), b.preventDefault();
1836
+ }
1837
+ function r(b) {
1838
+ var rt, ut;
1839
+ const $ = z.equals(b);
1840
+ if (!t.showOutsideDays && !$)
1841
+ return;
1842
+ const I = b.equals(m), P = b.equals(g), q = _(b), Q = o == null ? void 0 : o(q), Y = !wt(b, l, s);
1843
+ let it = "", le;
1844
+ if (t.type === "range") {
1845
+ const [ee, fe] = t.value, ct = ee == null ? void 0 : ee.equals(b), dt = fe == null ? void 0 : fe.equals(b);
1846
+ le = ee && fe && wt(b, ee, fe), it = `${ct ? "range-start" : ""} ${dt ? "range-end" : ""} ${le && !ct && !dt ? "range-inner" : ""}`;
1847
+ } else
1848
+ t.type === "multi" ? le = t.value.some((ee) => ee.equals(b)) : le = (rt = t.value) == null ? void 0 : rt.equals(b);
1849
+ return {
1850
+ part: `${`button day day-${q.getDay()} ${// we don't want outside days to ever be shown as selected
1851
+ $ ? le ? "selected" : "" : "outside"} ${Q ? "disallowed" : ""} ${P ? "today" : ""} ${((ut = t.getDayParts) == null ? void 0 : ut.call(t, q)) ?? ""}`} ${it}`,
1852
+ tabindex: $ && I ? 0 : -1,
1853
+ disabled: Y,
1854
+ "aria-disabled": Q ? "true" : void 0,
1855
+ "aria-pressed": $ && le,
1856
+ "aria-current": P ? "date" : void 0,
1857
+ "aria-label": k.format(q),
1858
+ onkeydown: T,
1859
+ onclick() {
1860
+ Q || v(b), x(b);
1861
+ },
1862
+ onmouseover() {
1863
+ !Q && !Y && h(b);
1864
+ }
1865
+ };
1866
+ }
1867
+ return {
1868
+ weeks: j,
1869
+ yearMonth: z,
1870
+ daysLong: y,
1871
+ daysVisible: D,
1872
+ formatter: C,
1873
+ getDayProps: r
1874
+ };
1875
+ }
1876
+ const Re = et(), nt = Na({
1877
+ type: "date",
1878
+ firstDayOfWeek: 1,
1879
+ focusedDate: Re,
1880
+ page: { start: Re.toPlainYearMonth(), end: Re.toPlainYearMonth() }
1881
+ });
1882
+ customElements.define("calendar-ctx", nt);
1883
+ const Wa = (e, t) => (t + e) % 7, Za = ke(
1884
+ (e) => {
1885
+ const t = Oa(nt), n = oa(), a = _a({ props: e, context: t });
1886
+ function o() {
1887
+ var l;
1888
+ (l = n.current.querySelector("button[tabindex='0']")) == null || l.focus();
1889
+ }
1890
+ return /* @__PURE__ */ he("host", { shadowDom: !0, focus: o, children: [
1891
+ /* @__PURE__ */ N("div", { id: "h", part: "heading", children: a.formatter.format(_(a.yearMonth)) }),
1892
+ /* @__PURE__ */ he("table", { ref: n, "aria-labelledby": "h", part: "table", children: [
1893
+ /* @__PURE__ */ N("thead", { children: /* @__PURE__ */ N("tr", { part: "tr head", children: a.daysLong.map((l, s) => /* @__PURE__ */ he(
1894
+ "th",
1895
+ {
1896
+ part: `th day day-${Wa(t.firstDayOfWeek, s)}`,
1897
+ scope: "col",
1898
+ children: [
1899
+ /* @__PURE__ */ N("span", { class: "vh", children: l }),
1900
+ /* @__PURE__ */ N("span", { "aria-hidden": "true", children: a.daysVisible[s] })
1901
+ ]
1902
+ }
1903
+ )) }) }),
1904
+ /* @__PURE__ */ N("tbody", { children: a.weeks.map((l, s) => /* @__PURE__ */ N("tr", { part: "tr week", children: l.map((u, i) => {
1905
+ const c = a.getDayProps(u);
1906
+ return /* @__PURE__ */ N("td", { part: "td", children: c && /* @__PURE__ */ N("button", { ...c, children: u.day }) }, i);
1907
+ }) }, s)) })
1908
+ ] })
1909
+ ] });
1910
+ },
1911
+ {
1912
+ props: {
1913
+ offset: {
1914
+ type: Number,
1915
+ value: 0
1916
+ }
1917
+ },
1918
+ styles: [
1919
+ _t,
1920
+ Wt,
1921
+ Me`:host{--color-accent: black;--color-text-on-accent: white;display:flex;flex-direction:column;gap:.25rem;text-align:center;inline-size:fit-content}table{border-collapse:collapse;font-size:.875rem}th{font-weight:700;block-size:2.25rem}td{padding-inline:0}button{color:inherit;font-size:inherit;background:transparent;border:0;font-variant-numeric:tabular-nums;block-size:2.25rem;inline-size:2.25rem}button:hover:where(:not(:disabled,[aria-disabled])){background:#0000000d}button:is([aria-pressed=true],:focus-visible){background:var(--color-accent);color:var(--color-text-on-accent)}button:focus-visible{outline:1px solid var(--color-text-on-accent);outline-offset:-2px}button:disabled,:host::part(outside),:host::part(disallowed){cursor:default;opacity:.5}`
1922
+ ]
1923
+ }
1924
+ );
1925
+ customElements.define("calendar-month", Za);
1926
+ function kt(e) {
1927
+ return /* @__PURE__ */ N(
1928
+ "button",
1929
+ {
1930
+ part: `button ${e.name} ${e.onclick ? "" : "disabled"}`,
1931
+ onclick: e.onclick,
1932
+ "aria-disabled": e.onclick ? null : "true",
1933
+ children: /* @__PURE__ */ N("slot", { name: e.name, children: e.children })
1934
+ }
1935
+ );
1936
+ }
1937
+ function at(e) {
1938
+ const t = _(e.page.start), n = _(e.page.end);
1939
+ return /* @__PURE__ */ he("div", { role: "group", "aria-labelledby": "h", part: "container", children: [
1940
+ /* @__PURE__ */ N("div", { id: "h", class: "vh", "aria-live": "polite", "aria-atomic": "true", children: e.formatVerbose.formatRange(t, n) }),
1941
+ /* @__PURE__ */ he("div", { part: "header", children: [
1942
+ /* @__PURE__ */ N(kt, { name: "previous", onclick: e.previous, children: "Previous" }),
1943
+ /* @__PURE__ */ N("slot", { part: "heading", name: "heading", children: /* @__PURE__ */ N("div", { "aria-hidden": "true", children: e.format.formatRange(t, n) }) }),
1944
+ /* @__PURE__ */ N(kt, { name: "next", onclick: e.next, children: "Next" })
1945
+ ] }),
1946
+ /* @__PURE__ */ N(
1947
+ nt,
1948
+ {
1949
+ value: e,
1950
+ onselectday: e.onSelect,
1951
+ onfocusday: e.onFocus,
1952
+ onhoverday: e.onHover,
1953
+ children: /* @__PURE__ */ N("slot", {})
1954
+ }
1955
+ )
1956
+ ] });
1957
+ }
1958
+ const lt = {
1959
+ value: {
1960
+ type: String,
1961
+ value: ""
1962
+ },
1963
+ min: {
1964
+ type: String,
1965
+ value: ""
1966
+ },
1967
+ max: {
1968
+ type: String,
1969
+ value: ""
1970
+ },
1971
+ today: {
1972
+ type: String,
1973
+ value: ""
1974
+ },
1975
+ isDateDisallowed: {
1976
+ type: Function,
1977
+ value: (e) => !1
1978
+ },
1979
+ formatWeekday: {
1980
+ type: String,
1981
+ value: () => "narrow"
1982
+ },
1983
+ getDayParts: {
1984
+ type: Function,
1985
+ value: (e) => ""
1986
+ },
1987
+ firstDayOfWeek: {
1988
+ type: Number,
1989
+ value: () => 1
1990
+ },
1991
+ showOutsideDays: {
1992
+ type: Boolean,
1993
+ value: !1
1994
+ },
1995
+ locale: {
1996
+ type: String,
1997
+ value: () => {
1998
+ }
1999
+ },
2000
+ months: {
2001
+ type: Number,
2002
+ value: 1
2003
+ },
2004
+ focusedDate: {
2005
+ type: String,
2006
+ value: () => {
2007
+ }
2008
+ },
2009
+ pageBy: {
2010
+ type: String,
2011
+ value: () => "months"
2012
+ }
2013
+ }, ot = [
2014
+ _t,
2015
+ Wt,
2016
+ Me`:host{display:block;inline-size:fit-content}[role=group]{display:flex;flex-direction:column;gap:1em}:host::part(header){display:flex;align-items:center;justify-content:space-between}:host::part(heading){font-weight:700;font-size:1.25em}button{display:flex;align-items:center;justify-content:center}button[aria-disabled]{cursor:default;opacity:.5}`
2017
+ ], Ka = { year: "numeric" }, Ya = { year: "numeric", month: "long" };
2018
+ function qe(e, t) {
2019
+ return (t.year - e.year) * 12 + t.month - e.month;
2020
+ }
2021
+ const $t = (e, t) => (e = t === 12 ? new Ee(e.year, 1) : e, {
2022
+ start: e,
2023
+ end: e.add({ months: t - 1 })
2024
+ });
2025
+ function Ja({
2026
+ pageBy: e,
2027
+ focusedDate: t,
2028
+ months: n,
2029
+ max: a,
2030
+ min: o,
2031
+ goto: l
2032
+ }) {
2033
+ const s = e === "single" ? 1 : n, [u, i] = Ge(
2034
+ () => $t(t.toPlainYearMonth(), n)
2035
+ ), c = (w) => i($t(u.start.add({ months: w }), n)), m = (w) => {
2036
+ const g = qe(u.start, w.toPlainYearMonth());
2037
+ return g >= 0 && g < n;
2038
+ };
2039
+ return ve(() => {
2040
+ if (m(t))
2041
+ return;
2042
+ const w = qe(t.toPlainYearMonth(), u.start);
2043
+ l(t.add({ months: w }));
2044
+ }, [u.start]), ve(() => {
2045
+ if (m(t))
2046
+ return;
2047
+ const w = qe(u.start, t.toPlainYearMonth());
2048
+ c(w === -1 ? -s : w === n ? s : Math.floor(w / n) * n);
2049
+ }, [t, s, n]), {
2050
+ page: u,
2051
+ previous: !o || !m(o) ? () => c(-s) : void 0,
2052
+ next: !a || !m(a) ? () => c(s) : void 0
2053
+ };
2054
+ }
2055
+ function st({
2056
+ months: e,
2057
+ pageBy: t,
2058
+ locale: n,
2059
+ focusedDate: a,
2060
+ setFocusedDate: o
2061
+ }) {
2062
+ const [l] = G("min"), [s] = G("max"), [u] = G("today"), i = X("focusday"), c = X("change"), m = J(
2063
+ () => Ie(a ?? u ?? et(), l, s),
2064
+ [a, u, l, s]
2065
+ );
2066
+ function w(C) {
2067
+ o(C), i(_(C));
2068
+ }
2069
+ const { next: g, previous: y, page: S } = Ja({
2070
+ pageBy: t,
2071
+ focusedDate: m,
2072
+ months: e,
2073
+ min: l,
2074
+ max: s,
2075
+ goto: w
2076
+ }), D = xe();
2077
+ function k(C) {
2078
+ const z = (C == null ? void 0 : C.target) ?? "day";
2079
+ z === "day" ? D.current.querySelectorAll("calendar-month").forEach((j) => j.focus(C)) : D.current.shadowRoot.querySelector(`[part~='${z}']`).focus(C);
2080
+ }
2081
+ return {
2082
+ format: ge(Ka, n),
2083
+ formatVerbose: ge(Ya, n),
2084
+ page: S,
2085
+ focusedDate: m,
2086
+ dispatch: c,
2087
+ onFocus(C) {
2088
+ C.stopPropagation(), w(C.detail), setTimeout(k);
2089
+ },
2090
+ min: l,
2091
+ max: s,
2092
+ today: u,
2093
+ next: g,
2094
+ previous: y,
2095
+ focus: k
2096
+ };
2097
+ }
2098
+ const Xa = ke(
2099
+ (e) => {
2100
+ const [t, n] = G("value"), [a = t, o] = G("focusedDate"), l = st({
2101
+ ...e,
2102
+ focusedDate: a,
2103
+ setFocusedDate: o
2104
+ });
2105
+ function s(u) {
2106
+ n(u.detail), l.dispatch();
2107
+ }
2108
+ return /* @__PURE__ */ N("host", { shadowDom: !0, focus: l.focus, children: /* @__PURE__ */ N(
2109
+ at,
2110
+ {
2111
+ ...e,
2112
+ ...l,
2113
+ type: "date",
2114
+ value: t,
2115
+ onSelect: s
2116
+ }
2117
+ ) });
2118
+ },
2119
+ { props: lt, styles: ot }
2120
+ );
2121
+ customElements.define("calendar-date", Xa);
2122
+ const St = (e, t) => L.compare(e, t) < 0 ? [e, t] : [t, e], Ga = ke(
2123
+ (e) => {
2124
+ const [t, n] = ja("value"), [a = t[0], o] = G("focusedDate"), l = st({
2125
+ ...e,
2126
+ focusedDate: a,
2127
+ setFocusedDate: o
2128
+ }), s = X("rangestart"), u = X("rangeend"), [i, c] = G(
2129
+ "tentative"
2130
+ ), [m, w] = Ge();
2131
+ ve(() => w(void 0), [i]);
2132
+ function g(k) {
2133
+ l.onFocus(k), y(k);
2134
+ }
2135
+ function y(k) {
2136
+ k.stopPropagation(), i && w(k.detail);
2137
+ }
2138
+ function S(k) {
2139
+ const C = k.detail;
2140
+ k.stopPropagation(), i ? (n(St(i, C)), c(void 0), u(_(C)), l.dispatch()) : (c(C), s(_(C)));
2141
+ }
2142
+ const D = i ? St(i, m ?? i) : t;
2143
+ return /* @__PURE__ */ N("host", { shadowDom: !0, focus: l.focus, children: /* @__PURE__ */ N(
2144
+ at,
2145
+ {
2146
+ ...e,
2147
+ ...l,
2148
+ type: "range",
2149
+ value: D,
2150
+ onFocus: g,
2151
+ onHover: y,
2152
+ onSelect: S
2153
+ }
2154
+ ) });
2155
+ },
2156
+ {
2157
+ props: {
2158
+ ...lt,
2159
+ tentative: {
2160
+ type: String,
2161
+ value: ""
2162
+ }
2163
+ },
2164
+ styles: ot
2165
+ }
2166
+ );
2167
+ customElements.define("calendar-range", Ga);
2168
+ const Qa = ke(
2169
+ (e) => {
2170
+ const [t, n] = Fa("value"), [a = t[0], o] = G("focusedDate"), l = st({
2171
+ ...e,
2172
+ focusedDate: a,
2173
+ setFocusedDate: o
2174
+ });
2175
+ function s(u) {
2176
+ const i = [...t], c = t.findIndex((m) => m.equals(u.detail));
2177
+ c < 0 ? i.push(u.detail) : i.splice(c, 1), n(i), l.dispatch();
2178
+ }
2179
+ return /* @__PURE__ */ N("host", { shadowDom: !0, focus: l.focus, children: /* @__PURE__ */ N(
2180
+ at,
2181
+ {
2182
+ ...e,
2183
+ ...l,
2184
+ type: "multi",
2185
+ value: t,
2186
+ onSelect: s
2187
+ }
2188
+ ) });
2189
+ },
2190
+ { props: lt, styles: ot }
2191
+ );
2192
+ customElements.define("calendar-multi", Qa);
2193
+ const el = ["placeholder", "value", "id", "disabled"], tl = ["disabled"], nl = {
2194
+ key: 2,
2195
+ class: "join items-center gap-2 w-full justify-between py-2 px-4 max-md:input max-md:input-bordered rounded"
2196
+ }, al = { class: "join-item" }, ll = ["id", "disabled"], ol = { class: "join-item" }, sl = ["id", "disabled"], il = ["id", "disabled"], rl = {
2197
+ key: 4,
2198
+ class: "flex mt-4"
2199
+ }, So = /* @__PURE__ */ A({
2200
+ __name: "datetimePicker",
2201
+ props: {
2202
+ mode: { default: "datetime" },
2203
+ range: { type: Boolean, default: !1 },
2204
+ placeholder: { default: "Select date and time" },
2205
+ popup: { type: Boolean, default: !1 },
2206
+ id: { default: "date-time-picker" },
2207
+ initialDate: { default: null },
2208
+ disabled: { type: Boolean, default: !1 },
2209
+ locale: { default: "nl-NL" },
2210
+ min: {},
2211
+ max: {}
2212
+ },
2213
+ emits: ["update:modelValue", "change"],
2214
+ setup(e, { emit: t }) {
2215
+ const n = e, a = t, o = M(!1), l = M(null), s = M(null), u = M(null), i = M(null), c = M(null), m = M(null), w = M({
2216
+ from: "",
2217
+ to: "",
2218
+ single: ""
2219
+ }), g = M({
2220
+ single: null,
2221
+ start: null,
2222
+ end: null
2223
+ }), y = K(() => {
2224
+ let h = "", x = "";
2225
+ n.mode !== "time" && (n.range && g.value.start && g.value.end ? h = `${g.value.start} - ${g.value.end}` : !n.range && g.value.single && (h = g.value.single)), n.mode !== "date" && (n.range && w.value.from && w.value.to ? x = `${w.value.from} - ${w.value.to}` : !n.range && w.value.single && (x = w.value.single));
2226
+ const T = (r) => {
2227
+ if (!r || r.includes(":")) return r;
2228
+ if (r.match(/^\d{4}-\d{2}-\d{2}$/)) {
2229
+ const b = r.split("-");
2230
+ try {
2231
+ return new Date(r).toLocaleDateString(n.locale);
2232
+ } catch {
2233
+ return `${b[2]}/${b[1]}/${b[0]}`;
2234
+ }
2235
+ }
2236
+ return r;
1176
2237
  };
1177
- t.range ? (p.from = g(
1178
- l.value.start,
1179
- m.value.start,
1180
- k.value.start
1181
- ), p.to = g(
1182
- l.value.end,
1183
- m.value.end,
1184
- k.value.end
1185
- )) : p = g(
1186
- l.value,
1187
- m.value,
1188
- k.value
1189
- ), i("updated", p);
2238
+ if (n.mode === "date") {
2239
+ if (n.range) {
2240
+ const [r, b] = h.split(" - ").map(T);
2241
+ return r && b ? `${r} - ${b}` : "";
2242
+ }
2243
+ return T(h);
2244
+ }
2245
+ if (n.mode === "time") return x;
2246
+ if (n.range) {
2247
+ const [r, b] = h.split(" - ").map(T), [$, I] = x.split(" - ");
2248
+ let P = "";
2249
+ return r && $ && (P += `${r} ${$}`), b && I && (P += P ? ` - ${b} ${I}` : `${b} ${I}`), P.trim();
2250
+ }
2251
+ return `${T(h)} ${x}`.trim();
2252
+ }), S = (h, x) => {
2253
+ if (n.range) {
2254
+ const T = h.start, r = h.end, b = x.from, $ = x.to;
2255
+ let I = null, P = null;
2256
+ if (n.mode === "time" && b && $ ? (I = b, P = $) : n.mode === "date" && T && r ? (I = T, P = r) : n.mode === "datetime" && T && r && b && $ && (I = `${T}T${b}`, P = `${r}T${$}`), I && P)
2257
+ return { start: I, end: P };
2258
+ } else {
2259
+ const T = h.single, r = x.single;
2260
+ if (n.mode === "date") return T;
2261
+ if (n.mode === "time") return r || null;
2262
+ if (n.mode === "datetime" && T && r)
2263
+ return `${T}T${r}`;
2264
+ }
2265
+ return null;
2266
+ }, D = () => {
2267
+ if (s.value)
2268
+ g.value.single = s.value.value || null;
2269
+ else if (u.value) {
2270
+ const h = u.value.value;
2271
+ g.value.start = (h == null ? void 0 : h.start) || null, g.value.end = (h == null ? void 0 : h.end) || null;
2272
+ }
2273
+ }, k = () => {
2274
+ D();
2275
+ const h = S(g.value, w.value);
2276
+ a("update:modelValue", h), a("change", h);
2277
+ }, C = () => {
2278
+ var h, x, T;
2279
+ n.range ? (w.value.from = ((h = c.value) == null ? void 0 : h.value) || "", w.value.to = ((x = m.value) == null ? void 0 : x.value) || "") : w.value.single = ((T = i.value) == null ? void 0 : T.value) || "", k();
2280
+ }, z = () => {
2281
+ o.value = !o.value, o.value && k();
2282
+ }, j = () => {
2283
+ o.value = !1, k();
2284
+ }, H = () => {
2285
+ if (n.initialDate) {
2286
+ if (n.range) {
2287
+ if (typeof n.initialDate == "object" && n.initialDate !== null && "start" in n.initialDate) {
2288
+ const h = n.initialDate, x = (b) => b instanceof Date ? b.toISOString() : b, T = x(h.start), r = x(h.end);
2289
+ if (T && r && (g.value = {
2290
+ single: null,
2291
+ // Now calling .includes() on a guaranteed string
2292
+ start: T.includes("T") ? T.split("T")[0] : T,
2293
+ end: r.includes("T") ? r.split("T")[0] : r
2294
+ }, n.mode === "datetime" || n.mode === "time")) {
2295
+ const b = new Date(T), $ = new Date(r), I = (P) => `${String(P.getUTCHours()).padStart(2, "0")}:${String(P.getUTCMinutes()).padStart(2, "0")}`;
2296
+ w.value = {
2297
+ single: "",
2298
+ from: I(b),
2299
+ to: I($)
2300
+ }, c.value && (c.value.value = w.value.from), m.value && (m.value.value = w.value.to);
2301
+ }
2302
+ }
2303
+ } else if (typeof n.initialDate == "string" || n.initialDate instanceof Date) {
2304
+ const h = n.initialDate.toString();
2305
+ if (g.value.single = h.includes("T") ? h.split("T")[0] : h, g.value.start = null, g.value.end = null, n.mode === "datetime" || n.mode === "time") {
2306
+ const x = new Date(h), T = `${String(x.getUTCHours()).padStart(2, "0")}:${String(x.getUTCMinutes()).padStart(2, "0")}`;
2307
+ w.value.single = T, i.value && (i.value.value = T);
2308
+ }
2309
+ }
2310
+ }
2311
+ }, v = (h) => {
2312
+ n.popup && o.value && l.value && !l.value.contains(h.target) && j();
1190
2313
  };
1191
- return ee(() => {
1192
- t.initialDate && (t.range && t.initialDate.start && t.initialDate.end ? l.value = {
1193
- start: new Date(t.initialDate.start),
1194
- end: new Date(t.initialDate.end)
1195
- } : t.initialDate.start && (l.value = { start: new Date(t.initialDate.start) })), t.range ? (m.value.start = m.value.start ?? (/* @__PURE__ */ new Date()).getHours(), m.value.end = m.value.end ?? (/* @__PURE__ */ new Date()).getHours(), k.value.start = k.value.start ?? (/* @__PURE__ */ new Date()).getMinutes(), k.value.end = k.value.end ?? (/* @__PURE__ */ new Date()).getMinutes()) : (m.value = m.value ?? (/* @__PURE__ */ new Date()).getHours(), k.value = k.value ?? (/* @__PURE__ */ new Date()).getMinutes());
1196
- }), t.popup && ee(() => document.addEventListener("click", be)), ke(() => document.removeEventListener("click", be)), (p, g) => (n(), a("div", {
1197
- class: "inline-block relative w-full lg:w-[360px]",
1198
- ref_key: "pickerContainer",
1199
- ref: R
1200
- }, [
1201
- o("div", {
1202
- class: "flex items-center gap-2 cursor-pointer",
1203
- onClick: g[0] || (g[0] = (d) => t.disabled ? null : re())
2314
+ return ue(() => {
2315
+ s.value && s.value.addEventListener("change", k), u.value && u.value.addEventListener("change", k), H(), setTimeout(k, 0), n.popup && document.addEventListener("click", v);
2316
+ }), Dt(() => {
2317
+ s.value && s.value.removeEventListener("change", k), u.value && u.value.removeEventListener("change", k), n.popup && document.removeEventListener("click", v);
2318
+ }), (h, x) => {
2319
+ const T = Ae("calendar-month"), r = Ae("calendar-date"), b = Ae("calendar-range");
2320
+ return f(), p("div", {
2321
+ class: "inline-block relative w-fit lg:w-full",
2322
+ ref_key: "pickerContainer",
2323
+ ref: l
1204
2324
  }, [
1205
- e.popup ? T(p.$slots, "default", { key: 0 }, () => [
1206
- o("input", {
2325
+ n.popup ? (f(), p("div", {
2326
+ key: 0,
2327
+ class: "flex items-center gap-2 cursor-pointer w-full",
2328
+ onClick: x[0] || (x[0] = ($) => n.disabled ? null : z())
2329
+ }, [
2330
+ d("input", {
1207
2331
  type: "text",
1208
2332
  class: "input-bordered w-full cursor-pointer input",
1209
- placeholder: e.placeholder,
1210
- value: J.value,
2333
+ placeholder: n.placeholder,
2334
+ value: y.value,
1211
2335
  readonly: "",
1212
- id: j.value,
1213
- disabled: t.disabled
1214
- }, null, 8, jt),
1215
- o("button", {
2336
+ id: `${n.id}-input`,
2337
+ disabled: n.disabled
2338
+ }, null, 8, el),
2339
+ d("button", {
1216
2340
  class: "btn btn-ghost",
1217
- disabled: t.disabled
1218
- }, [
1219
- se(N(Ze))
1220
- ], 8, Ft)
1221
- ], !0) : O("", !0)
1222
- ]),
1223
- r.value || !e.popup ? (n(), a("div", {
1224
- key: 0,
1225
- class: D(["z-50 bg-base-100 md:mt-2 md:p-4 px-4 rounded-md w-full", [{ absolute: e.popup }]]),
1226
- id: x.value
1227
- }, [
1228
- y.value ? (n(), a("div", Ht, [
1229
- o("button", {
1230
- class: "hidden md:block btn-outline btn btn-primary md:btn-sm",
1231
- onClick: Oe,
1232
- disabled: t.disabled
1233
- }, [...g[12] || (g[12] = [
1234
- o("svg", {
1235
- xmlns: "http://www.w3.org/2000/svg",
1236
- class: "w-4 h-4",
1237
- fill: "none",
1238
- viewBox: "0 0 24 24",
1239
- stroke: "currentColor"
1240
- }, [
1241
- o("path", {
1242
- "stroke-linecap": "round",
1243
- "stroke-linejoin": "round",
1244
- "stroke-width": "2",
1245
- d: "M15 19l-7-7 7-7"
1246
- })
1247
- ], -1)
1248
- ])], 8, Wt),
1249
- W(o("select", {
1250
- class: "border-none w-fit select",
1251
- "onUpdate:modelValue": g[1] || (g[1] = (d) => h.value = d),
1252
- onChange: q
1253
- }, [
1254
- (n(), a(z, null, E(V, (d, G) => o("option", {
1255
- key: G,
1256
- value: d
1257
- }, I(d), 9, Kt)), 64))
1258
- ], 544), [
1259
- [Z, h.value]
1260
- ]),
1261
- W(o("select", {
1262
- class: "border-none w-24 select",
1263
- "onUpdate:modelValue": g[2] || (g[2] = (d) => f.value = d),
1264
- onChange: q
1265
- }, [
1266
- (n(!0), a(z, null, E(u.value, (d) => (n(), a("option", {
1267
- key: d,
1268
- value: d
1269
- }, I(d), 9, _t))), 128))
1270
- ], 544), [
1271
- [Z, f.value]
1272
- ]),
1273
- o("button", {
1274
- class: "hidden md:block btn-outline btn btn-primary md:btn-sm",
1275
- onClick: ze
1276
- }, [...g[13] || (g[13] = [
1277
- o("svg", {
2341
+ disabled: n.disabled
2342
+ }, [...x[1] || (x[1] = [
2343
+ d("svg", {
1278
2344
  xmlns: "http://www.w3.org/2000/svg",
1279
- class: "w-4 h-4",
1280
- fill: "none",
1281
2345
  viewBox: "0 0 24 24",
1282
- stroke: "currentColor"
2346
+ fill: "currentColor",
2347
+ class: "size-6"
1283
2348
  }, [
1284
- o("path", {
1285
- "stroke-linecap": "round",
1286
- "stroke-linejoin": "round",
1287
- "stroke-width": "2",
1288
- d: "M9 5l7 7-7 7"
1289
- })
2349
+ d("path", { d: "M12.75 12.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM7.5 7.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM7.5 10.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM7.5 13.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM7.5 16.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM10.5 7.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM10.5 10.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM10.5 13.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM10.5 16.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM13.5 7.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM13.5 13.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM13.5 16.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM16.5 7.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM16.5 10.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM16.5 13.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM16.5 16.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM18 3.75c0-.621-.504-1.125-1.125-1.125h-15c-.621 0-1.125.504-1.125 1.125v15c0 .621.504 1.125 1.125 1.125h15c.621 0 1.125-.504 1.125-1.125v-15ZM4.5 5.25v12h15v-12h-15Z" })
1290
2350
  ], -1)
1291
- ])])
1292
- ])) : O("", !0),
1293
- y.value ? (n(), a("div", Yt, [
1294
- (n(), a(z, null, E(A, (d) => o("div", {
1295
- key: d,
1296
- class: "text-center"
1297
- }, I(d), 1)), 64)),
1298
- (n(!0), a(z, null, E(Y.value, (d) => (n(), a("div", {
1299
- key: d,
1300
- class: "text-center"
1301
- }))), 128)),
1302
- (n(!0), a(z, null, E(K.value, (d) => (n(), a("div", {
1303
- key: d,
1304
- class: D(["hover:bg-primary-10 py-1 rounded-full text-center cursor-pointer", {
1305
- "bg-primary text-primary-content": Me(d),
1306
- today: De(d),
1307
- "range-start bg-primary text-primary-content": Te(d),
1308
- "range-end bg-primary text-primary-content": Ve(d),
1309
- "in-range bg-primary/20 hover:bg-primary/10": Be(d)
1310
- }]),
1311
- onClick: (G) => Ie(d)
1312
- }, I(d.getDate()), 11, Jt))), 128))
1313
- ])) : O("", !0),
1314
- $.value ? (n(), a("div", Xt, [
1315
- t.range ? O("", !0) : (n(), a("h3", Gt, "Select Time")),
1316
- t.range ? (n(), a("div", ll, [
1317
- o("div", null, [
1318
- g[14] || (g[14] = o("p", { class: "font-bold" }, "Start Time", -1)),
1319
- S.value ? W((n(), a("input", {
1320
- key: 0,
2351
+ ])], 8, tl)
2352
+ ])) : E("", !0),
2353
+ o.value || !n.popup ? (f(), p("div", {
2354
+ key: 1,
2355
+ class: B(["z-50 bg-base-100 md:p-4 px-4 rounded-md w-full", { "absolute top-full left-0 mt-2 shadow-lg": n.popup, "mt-2": !n.popup }])
2356
+ }, [
2357
+ !n.range && n.mode !== "time" ? (f(), ae(r, {
2358
+ key: 0,
2359
+ class: "cally w-full",
2360
+ ref_key: "datePicker",
2361
+ ref: s,
2362
+ id: `${n.id}-date`,
2363
+ min: n.min,
2364
+ max: n.max,
2365
+ disabled: n.disabled,
2366
+ "initial-date": n.initialDate,
2367
+ onChange: k
2368
+ }, {
2369
+ default: pt(() => [
2370
+ x[2] || (x[2] = d("svg", {
2371
+ "aria-label": "Previous",
2372
+ class: "fill-current size-4",
2373
+ slot: "previous",
2374
+ xmlns: "http://www.w3.org/2000/svg",
2375
+ viewBox: "0 0 24 24"
2376
+ }, [
2377
+ d("path", {
2378
+ fill: "currentColor",
2379
+ d: "M15.75 19.5 8.25 12l7.5-7.5"
2380
+ })
2381
+ ], -1)),
2382
+ x[3] || (x[3] = d("svg", {
2383
+ "aria-label": "Next",
2384
+ class: "fill-current size-4",
2385
+ slot: "next",
2386
+ xmlns: "http://www.w3.org/2000/svg",
2387
+ viewBox: "0 0 24 24"
2388
+ }, [
2389
+ d("path", {
2390
+ fill: "currentColor",
2391
+ d: "m8.25 4.5 7.5 7.5-7.5 7.5"
2392
+ })
2393
+ ], -1)),
2394
+ ie(T, {
2395
+ locale: n.locale
2396
+ }, null, 8, ["locale"])
2397
+ ]),
2398
+ _: 1
2399
+ }, 8, ["id", "min", "max", "disabled", "initial-date"])) : E("", !0),
2400
+ n.range && n.mode !== "time" ? (f(), ae(b, {
2401
+ key: 1,
2402
+ class: "cally w-full",
2403
+ ref_key: "rangeDatePicker",
2404
+ ref: u,
2405
+ id: `${n.id}-date-range`,
2406
+ min: n.min,
2407
+ max: n.max,
2408
+ disabled: n.disabled,
2409
+ "initial-date": n.initialDate,
2410
+ onChange: k
2411
+ }, {
2412
+ default: pt(() => [
2413
+ x[4] || (x[4] = d("svg", {
2414
+ "aria-label": "Previous",
2415
+ class: "fill-current size-4",
2416
+ slot: "previous",
2417
+ xmlns: "http://www.w3.org/2000/svg",
2418
+ viewBox: "0 0 24 24"
2419
+ }, [
2420
+ d("path", {
2421
+ fill: "currentColor",
2422
+ d: "M15.75 19.5 8.25 12l7.5-7.5"
2423
+ })
2424
+ ], -1)),
2425
+ x[5] || (x[5] = d("svg", {
2426
+ "aria-label": "Next",
2427
+ class: "fill-current size-4",
2428
+ slot: "next",
2429
+ xmlns: "http://www.w3.org/2000/svg",
2430
+ viewBox: "0 0 24 24"
2431
+ }, [
2432
+ d("path", {
2433
+ fill: "currentColor",
2434
+ d: "m8.25 4.5 7.5 7.5-7.5 7.5"
2435
+ })
2436
+ ], -1)),
2437
+ ie(T, {
2438
+ locale: n.locale
2439
+ }, null, 8, ["locale"])
2440
+ ]),
2441
+ _: 1
2442
+ }, 8, ["id", "min", "max", "disabled", "initial-date"])) : E("", !0),
2443
+ n.range && n.mode !== "date" ? (f(), p("div", nl, [
2444
+ d("div", al, [
2445
+ d("input", {
2446
+ class: "max-md:max-w-xs text-center hover:border-b-2 hover:-mb-0.5 open:bg-primary open:p-1 open:-m-0.5 open:rounded w-full",
1321
2447
  type: "time",
1322
- class: "input-bordered w-full input",
1323
- "onUpdate:modelValue": g[6] || (g[6] = (d) => s.value.start = d),
1324
- onChange: q
1325
- }, null, 544)), [
1326
- [oe, s.value.start]
1327
- ]) : (n(), a("div", nl, [
1328
- W(o("select", {
1329
- class: "w-full select-bordered select",
1330
- "onUpdate:modelValue": g[7] || (g[7] = (d) => m.value.start = d),
1331
- onChange: q
1332
- }, [
1333
- (n(!0), a(z, null, E(N(v), (d) => (n(), a("option", {
1334
- key: d,
1335
- value: d
1336
- }, I(d.toString().padStart(2, "0")), 9, al))), 128))
1337
- ], 544), [
1338
- [
1339
- Z,
1340
- m.value.start,
1341
- void 0,
1342
- { number: !0 }
1343
- ]
1344
- ]),
1345
- W(o("select", {
1346
- class: "w-full select-bordered select",
1347
- "onUpdate:modelValue": g[8] || (g[8] = (d) => k.value.start = d),
1348
- onChange: q
1349
- }, [
1350
- (n(!0), a(z, null, E(N(b), (d) => (n(), a("option", {
1351
- key: d,
1352
- value: d
1353
- }, I(d.toString().padStart(2, "0")), 9, ol))), 128))
1354
- ], 544), [
1355
- [
1356
- Z,
1357
- k.value.start,
1358
- void 0,
1359
- { number: !0 }
1360
- ]
1361
- ])
1362
- ]))
2448
+ ref_key: "timeFromInput",
2449
+ ref: c,
2450
+ id: `${n.id}-time-from`,
2451
+ placeholder: "van",
2452
+ onChange: C,
2453
+ disabled: n.disabled
2454
+ }, null, 40, ll)
1363
2455
  ]),
1364
- o("div", null, [
1365
- g[15] || (g[15] = o("p", { class: "font-bold" }, "End Time", -1)),
1366
- S.value ? W((n(), a("input", {
1367
- key: 0,
2456
+ x[6] || (x[6] = d("svg", {
2457
+ class: "join-item",
2458
+ viewBox: "0 0 1024 1024",
2459
+ focusable: "false",
2460
+ "data-icon": "swap-right",
2461
+ width: "1em",
2462
+ height: "1em",
2463
+ fill: "currentColor",
2464
+ "aria-hidden": "true"
2465
+ }, [
2466
+ d("path", { d: "M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z" })
2467
+ ], -1)),
2468
+ d("div", ol, [
2469
+ d("input", {
2470
+ class: "hover:border-b-2 hover:-mb-0.5 open:bg-primary open:p-1 open:-m-0.5 open:rounded w-full",
1368
2471
  type: "time",
1369
- class: "input-bordered w-full input",
1370
- "onUpdate:modelValue": g[9] || (g[9] = (d) => s.value.end = d),
1371
- onChange: q
1372
- }, null, 544)), [
1373
- [oe, s.value.end]
1374
- ]) : (n(), a("div", sl, [
1375
- W(o("select", {
1376
- class: "w-full select-bordered select",
1377
- "onUpdate:modelValue": g[10] || (g[10] = (d) => m.value.end = d),
1378
- onChange: q
1379
- }, [
1380
- (n(!0), a(z, null, E(N(v), (d) => (n(), a("option", {
1381
- key: d,
1382
- value: d
1383
- }, I(d.toString().padStart(2, "0")), 9, il))), 128))
1384
- ], 544), [
1385
- [
1386
- Z,
1387
- m.value.end,
1388
- void 0,
1389
- { number: !0 }
1390
- ]
1391
- ]),
1392
- W(o("select", {
1393
- class: "w-full select-bordered select",
1394
- "onUpdate:modelValue": g[11] || (g[11] = (d) => k.value.end = d),
1395
- onChange: q
1396
- }, [
1397
- (n(!0), a(z, null, E(N(b), (d) => (n(), a("option", {
1398
- key: d,
1399
- value: d
1400
- }, I(d.toString().padStart(2, "0")), 9, rl))), 128))
1401
- ], 544), [
1402
- [
1403
- Z,
1404
- k.value.end,
1405
- void 0,
1406
- { number: !0 }
1407
- ]
1408
- ])
1409
- ]))
2472
+ ref_key: "timeToInput",
2473
+ ref: m,
2474
+ id: `${n.id}-time-to`,
2475
+ onChange: C,
2476
+ disabled: n.disabled
2477
+ }, null, 40, sl)
1410
2478
  ])
1411
- ])) : (n(), a("div", Zt, [
1412
- S.value ? W((n(), a("input", {
1413
- key: 0,
1414
- type: "time",
1415
- class: "input-bordered w-full input",
1416
- "onUpdate:modelValue": g[3] || (g[3] = (d) => s.value = d),
1417
- onChange: q
1418
- }, null, 544)), [
1419
- [oe, s.value]
1420
- ]) : (n(), a("div", Qt, [
1421
- W(o("select", {
1422
- class: "w-full select-bordered select",
1423
- "onUpdate:modelValue": g[4] || (g[4] = (d) => m.value = d),
1424
- onChange: q
1425
- }, [
1426
- (n(!0), a(z, null, E(N(v), (d) => (n(), a("option", {
1427
- key: d,
1428
- value: d
1429
- }, I(d.toString().padStart(2, "0")), 9, el))), 128))
1430
- ], 544), [
1431
- [
1432
- Z,
1433
- m.value,
1434
- void 0,
1435
- { number: !0 }
1436
- ]
1437
- ]),
1438
- W(o("select", {
1439
- class: "w-full select-bordered select",
1440
- "onUpdate:modelValue": g[5] || (g[5] = (d) => k.value = d),
1441
- onChange: q
1442
- }, [
1443
- (n(!0), a(z, null, E(N(b), (d) => (n(), a("option", {
1444
- key: d,
1445
- value: d
1446
- }, I(d.toString().padStart(2, "0")), 9, tl))), 128))
1447
- ], 544), [
1448
- [
1449
- Z,
1450
- k.value,
1451
- void 0,
1452
- { number: !0 }
1453
- ]
1454
- ])
1455
- ]))
1456
- ]))
1457
- ])) : O("", !0),
1458
- o("div", ul, [
1459
- o("button", {
1460
- class: D(["btn btn-secondary", e.popup ? "w-fit" : "w-full"]),
1461
- onClick: Ce
1462
- }, " Clear ", 2),
1463
- e.popup ? (n(), a("button", {
1464
- key: 0,
1465
- class: "btn btn-primary btn-wide",
1466
- onClick: X
1467
- }, " Close ")) : O("", !0)
1468
- ])
1469
- ], 10, qt)) : O("", !0)
1470
- ], 512));
2479
+ ])) : E("", !0),
2480
+ !n.range && n.mode !== "date" ? (f(), p("input", {
2481
+ key: 3,
2482
+ class: "open:bg-primary open:rounded w-full input input-bordered my-2 justify-center",
2483
+ type: "time",
2484
+ ref_key: "timeInput",
2485
+ ref: i,
2486
+ id: `${n.id}-time`,
2487
+ onChange: C,
2488
+ disabled: n.disabled
2489
+ }, null, 40, il)) : E("", !0),
2490
+ n.popup ? (f(), p("div", rl, [
2491
+ d("button", {
2492
+ class: "btn btn-primary",
2493
+ onClick: j
2494
+ }, " Close ")
2495
+ ])) : E("", !0)
2496
+ ], 2)) : E("", !0)
2497
+ ], 512);
2498
+ };
1471
2499
  }
1472
- }, cl = /* @__PURE__ */ le(dl, [["__scopeId", "data-v-bab9b3c1"]]), vl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1473
- __proto__: null,
1474
- default: cl
1475
- }, Symbol.toStringTag, { value: "Module" })), fl = ["value", "checked", "onChange", "disabled"], Mn = /* @__PURE__ */ U({
2500
+ }), ul = ["value", "checked", "onChange", "disabled"], Co = /* @__PURE__ */ A({
1476
2501
  __name: "rating",
1477
2502
  props: {
1478
2503
  initialRating: { default: 0 },
@@ -1485,30 +2510,30 @@ const lt = te("SunIcon", [
1485
2510
  gap: { default: 0 }
1486
2511
  },
1487
2512
  setup(e) {
1488
- const c = e, t = C(c.initialRating);
1489
- H(
1490
- () => c.initialRating,
1491
- (r) => {
1492
- t.value = r;
2513
+ const t = e, n = M(t.initialRating);
2514
+ R(
2515
+ () => t.initialRating,
2516
+ (o) => {
2517
+ n.value = o;
1493
2518
  }
1494
2519
  );
1495
- const i = (r) => {
1496
- t.value = r;
2520
+ const a = (o) => {
2521
+ n.value = o;
1497
2522
  };
1498
- return (r, l) => (n(), a("div", {
1499
- class: D(["rating", [
1500
- `rating-${c.size}`,
2523
+ return (o, l) => (f(), p("div", {
2524
+ class: B(["rating", [
2525
+ `rating-${t.size}`,
1501
2526
  { "rating-half": e.halfStars },
1502
2527
  { "pointer-events-none": !e.isInteractive }
1503
2528
  ]])
1504
2529
  }, [
1505
- (n(!0), a(z, null, E(e.numberOfStars * (e.halfStars ? 2 : 1), (s) => (n(), a("input", {
2530
+ (f(!0), p(U, null, F(e.numberOfStars * (e.halfStars ? 2 : 1), (s) => (f(), p("input", {
1506
2531
  key: s,
1507
2532
  type: "radio",
1508
2533
  value: e.halfStars ? s * 0.5 : s,
1509
- checked: t.value === (e.halfStars ? s * 0.5 : s),
1510
- onChange: (h) => e.isInteractive ? i(e.halfStars ? s * 0.5 : s) : null,
1511
- class: D(["mask", [
2534
+ checked: n.value === (e.halfStars ? s * 0.5 : s),
2535
+ onChange: (u) => e.isInteractive ? a(e.halfStars ? s * 0.5 : s) : null,
2536
+ class: B(["mask", [
1512
2537
  {
1513
2538
  // 'bg-yellow-400': rating >= (halfStars ? i * 0.5 : i),
1514
2539
  "mask-half-1": e.halfStars && s % 2 !== 0,
@@ -1529,16 +2554,16 @@ const lt = te("SunIcon", [
1529
2554
  "mask-triangle-3": e.shape === "triangle-left",
1530
2555
  "mask-triangle-4": e.shape === "triangle-right"
1531
2556
  },
1532
- t.value >= (e.halfStars ? s * 0.5 : s) ? c.color : ""
2557
+ n.value >= (e.halfStars ? s * 0.5 : s) ? t.color : ""
1533
2558
  ]]),
1534
- style: ie({
1535
- marginRight: e.halfStars && s % 2 === 0 ? `${c.gap}px` : e.halfStars ? "0" : `${c.gap}px`
2559
+ style: ye({
2560
+ marginRight: e.halfStars && s % 2 === 0 ? `${t.gap}px` : e.halfStars ? "0" : `${t.gap}px`
1536
2561
  }),
1537
2562
  disabled: !e.isInteractive
1538
- }, null, 46, fl))), 128))
2563
+ }, null, 46, ul))), 128))
1539
2564
  ], 2));
1540
2565
  }
1541
- }), ml = { class: "badge" }, pl = ["onClick"], gl = { class: "opacity-75" }, hl = ["placeholder"], Dn = /* @__PURE__ */ U({
2566
+ }), cl = { class: "badge" }, dl = ["onClick"], fl = { class: "opacity-75" }, ml = ["placeholder"], Do = /* @__PURE__ */ A({
1542
2567
  __name: "taginput",
1543
2568
  props: {
1544
2569
  modelValue: {},
@@ -1547,61 +2572,61 @@ const lt = te("SunIcon", [
1547
2572
  class: {}
1548
2573
  },
1549
2574
  emits: ["update:modelValue"],
1550
- setup(e, { emit: c }) {
1551
- const t = e, i = c, r = C([...t.modelValue]), l = t.maxTagAmount === void 0 ? -1 : t.maxTagAmount, s = C(null), h = C(""), f = L(() => l < 0 || r.value.length < l), m = () => {
1552
- const x = h.value.trim();
1553
- x && !r.value.includes(x) && (r.value.push(x), i("update:modelValue", r.value), h.value = "");
1554
- }, k = (x) => {
1555
- r.value = r.value.filter((y) => y !== x), i("update:modelValue", r.value);
1556
- }, R = () => {
1557
- h.value === "" && (r.value.pop(), i("update:modelValue", r.value));
1558
- }, j = (x) => {
1559
- x.key === "Enter" ? m() : x.key === "Backspace" && h.value === "" && R();
2575
+ setup(e, { emit: t }) {
2576
+ const n = e, a = t, o = M([...n.modelValue]), l = n.maxTagAmount === void 0 ? -1 : n.maxTagAmount, s = M(null), u = M(""), i = K(() => l < 0 || o.value.length < l), c = () => {
2577
+ const y = u.value.trim();
2578
+ y && !o.value.includes(y) && (o.value.push(y), a("update:modelValue", o.value), u.value = "");
2579
+ }, m = (y) => {
2580
+ o.value = o.value.filter((S) => S !== y), a("update:modelValue", o.value);
2581
+ }, w = () => {
2582
+ u.value === "" && (o.value.pop(), a("update:modelValue", o.value));
2583
+ }, g = (y) => {
2584
+ y.key === "Enter" ? c() : y.key === "Backspace" && u.value === "" && w();
1560
2585
  };
1561
- return H(() => t.modelValue, (x) => {
1562
- r.value = [...x];
1563
- }), (x, y) => (n(), a("div", {
1564
- class: D(["flex flex-wrap gap-2 bg-base-100 shadow px-4 py-6 border border-base-content/20 rounded", x.$props.class])
2586
+ return R(() => n.modelValue, (y) => {
2587
+ o.value = [...y];
2588
+ }), (y, S) => (f(), p("div", {
2589
+ class: B(["flex flex-wrap gap-2 bg-base-100 shadow px-4 py-6 border border-base-content/20 rounded", y.$props.class])
1565
2590
  }, [
1566
- (n(!0), a(z, null, E(r.value, ($) => T(x.$slots, "tag", {
1567
- key: $,
1568
- tag: $
2591
+ (f(!0), p(U, null, F(o.value, (D) => V(y.$slots, "tag", {
2592
+ key: D,
2593
+ tag: D
1569
2594
  }, () => [
1570
- o("div", ml, [
1571
- o("button", {
2595
+ d("div", cl, [
2596
+ d("button", {
1572
2597
  class: "px-1! py-0! h-fit font-bold cursor-pointer",
1573
- onClick: (M) => k($),
2598
+ onClick: (k) => m(D),
1574
2599
  "aria-label": "Remove tag"
1575
- }, "X", 8, pl),
1576
- o("span", gl, I($), 1)
2600
+ }, "X", 8, dl),
2601
+ d("span", fl, O(D), 1)
1577
2602
  ])
1578
2603
  ])), 128)),
1579
- T(x.$slots, "input", { showInput: f.value }, () => [
1580
- f.value ? W((n(), a("input", {
2604
+ V(y.$slots, "input", { showInput: i.value }, () => [
2605
+ i.value ? Ce((f(), p("input", {
1581
2606
  key: 0,
1582
2607
  ref_key: "inputRef",
1583
2608
  ref: s,
1584
- "onUpdate:modelValue": y[0] || (y[0] = ($) => h.value = $),
2609
+ "onUpdate:modelValue": S[0] || (S[0] = (D) => u.value = D),
1585
2610
  type: "text",
1586
2611
  placeholder: e.placeholder || "Type here",
1587
2612
  class: "h-full input input-ghost",
1588
- onKeydown: j,
2613
+ onKeydown: g,
1589
2614
  "aria-label": "Add tags"
1590
- }, null, 40, hl)), [
1591
- [oe, h.value]
1592
- ]) : O("", !0)
2615
+ }, null, 40, ml)), [
2616
+ [Tt, u.value]
2617
+ ]) : E("", !0)
1593
2618
  ])
1594
2619
  ], 2));
1595
2620
  }
1596
- }), bl = { class: "w-full max-w-xs form-control" }, yl = {
2621
+ }), pl = { class: "w-full max-w-xs form-control" }, hl = {
1597
2622
  key: 0,
1598
2623
  class: "label"
1599
- }, wl = { class: "label-text" }, xl = ["value"], kl = {
2624
+ }, vl = { class: "label-text" }, gl = ["value"], yl = {
1600
2625
  key: 0,
1601
2626
  value: "",
1602
2627
  disabled: "",
1603
2628
  selected: ""
1604
- }, $l = ["value"], Tn = /* @__PURE__ */ U({
2629
+ }, bl = ["value"], To = /* @__PURE__ */ A({
1605
2630
  __name: "select",
1606
2631
  props: {
1607
2632
  options: {},
@@ -1610,45 +2635,45 @@ const lt = te("SunIcon", [
1610
2635
  modelValue: {}
1611
2636
  },
1612
2637
  emits: ["update:modelValue"],
1613
- setup(e, { expose: c, emit: t }) {
2638
+ setup(e, { expose: t, emit: n }) {
1614
2639
  console.log(e.placeholder);
1615
- const r = t, l = C(null), s = (f) => {
1616
- const m = f.target;
1617
- r("update:modelValue", m.value);
2640
+ const o = n, l = M(null), s = (i) => {
2641
+ const c = i.target;
2642
+ o("update:modelValue", c.value);
1618
2643
  };
1619
- return c({
2644
+ return t({
1620
2645
  focusInput: () => {
1621
- var f;
1622
- console.log("select.vue: focusInput method called."), (f = l.value) == null || f.focus();
2646
+ var i;
2647
+ console.log("select.vue: focusInput method called."), (i = l.value) == null || i.focus();
1623
2648
  }
1624
2649
  // You can expose other properties or methods here if needed by the parent
1625
2650
  // e.g., the current value: modelValue
1626
- }), (f, m) => (n(), a("div", bl, [
1627
- e.label ? (n(), a("label", yl, [
1628
- o("span", wl, I(e.label), 1)
1629
- ])) : O("", !0),
1630
- o("select", {
2651
+ }), (i, c) => (f(), p("div", pl, [
2652
+ e.label ? (f(), p("label", hl, [
2653
+ d("span", vl, O(e.label), 1)
2654
+ ])) : E("", !0),
2655
+ d("select", {
1631
2656
  ref_key: "selectElement",
1632
2657
  ref: l,
1633
2658
  class: "rounded-md w-full select-bordered select",
1634
2659
  value: e.modelValue,
1635
2660
  onChange: s
1636
2661
  }, [
1637
- e.placeholder ? (n(), a("option", kl, I(e.placeholder), 1)) : O("", !0),
1638
- (n(!0), a(z, null, E(e.options, (k) => (n(), a("option", {
1639
- key: k.value,
1640
- value: k.value
1641
- }, I(k.text), 9, $l))), 128))
1642
- ], 40, xl)
2662
+ e.placeholder ? (f(), p("option", yl, O(e.placeholder), 1)) : E("", !0),
2663
+ (f(!0), p(U, null, F(e.options, (m) => (f(), p("option", {
2664
+ key: m.value,
2665
+ value: m.value
2666
+ }, O(m.text), 9, bl))), 128))
2667
+ ], 40, gl)
1643
2668
  ]));
1644
2669
  }
1645
- }), Sl = {
2670
+ }), wl = {
1646
2671
  key: 0,
1647
2672
  class: "label"
1648
- }, Cl = { class: "label-text" }, Il = ["onKeydown", "aria-expanded", "aria-activedescendant"], Ml = ["placeholder", "disabled"], Dl = {
2673
+ }, xl = { class: "label-text" }, kl = ["onKeydown", "aria-expanded", "aria-activedescendant"], $l = ["placeholder", "disabled"], Sl = {
1649
2674
  class: "top-full z-10 absolute bg-base-100 shadow-lg mt-1 rounded-md w-full dropdown-content",
1650
2675
  role: "listbox"
1651
- }, Tl = { class: "flex-nowrap p-0 w-[inherit] max-h-60 overflow-y-auto menu" }, Vl = ["onMousedown", "id", "aria-selected"], Vn = {
2676
+ }, Cl = { class: "flex-nowrap p-0 w-[inherit] max-h-60 overflow-y-auto menu" }, Dl = ["onMousedown", "id", "aria-selected"], Mo = {
1652
2677
  __name: "filterableSelect",
1653
2678
  props: {
1654
2679
  // Array of options: [{ value: any, text: string }, ...]
@@ -1678,195 +2703,195 @@ const lt = te("SunIcon", [
1678
2703
  }
1679
2704
  },
1680
2705
  emits: ["update:modelValue", "select", "clear"],
1681
- setup(e, { expose: c, emit: t }) {
1682
- const i = e, r = t, l = Re(), s = L(() => {
1683
- const P = (l.default ? l.default() : []).filter((w) => w.type !== Ne);
1684
- return console.log("hasDefaultSlotContent computed:", P.length > 0), P.length > 0;
1685
- }), h = C(""), f = C(null), m = C(!1), k = C(null), R = C(null), j = C(null), x = C(null), y = () => {
1686
- m.value = !i.disabled;
1687
- }, $ = () => {
1688
- m.value = !1, x.value = null, s.value || (f.value && h.value !== f.value.text ? h.value = f.value.text : f.value || (h.value = ""));
1689
- }, M = () => {
1690
- m.value ? $() : y();
1691
- }, A = L(() => {
1692
- const u = h.value ? h.value.toLowerCase() : "";
1693
- return u === "" && !m.value ? [] : i.options.filter(
1694
- (w) => w && w.text ? w.text.toLowerCase().includes(u) : ""
2706
+ setup(e, { expose: t, emit: n }) {
2707
+ const a = e, o = n, l = en(), s = K(() => {
2708
+ const b = (l.default ? l.default() : []).filter(($) => $.type !== tn);
2709
+ return console.log("hasDefaultSlotContent computed:", b.length > 0), b.length > 0;
2710
+ }), u = M(""), i = M(null), c = M(!1), m = M(null), w = M(null), g = M(null), y = M(null), S = () => {
2711
+ c.value = !a.disabled;
2712
+ }, D = () => {
2713
+ c.value = !1, y.value = null, s.value || (i.value && u.value !== i.value.text ? u.value = i.value.text : i.value || (u.value = ""));
2714
+ }, k = () => {
2715
+ c.value ? D() : S();
2716
+ }, C = K(() => {
2717
+ const r = u.value ? u.value.toLowerCase() : "";
2718
+ return r === "" && !c.value ? [] : a.options.filter(
2719
+ ($) => $ && $.text ? $.text.toLowerCase().includes(r) : ""
1695
2720
  );
1696
2721
  });
1697
- H(
1698
- () => i.modelValue,
1699
- (u, P) => {
1700
- if (u !== P && $(), u == null)
1701
- f.value = null, !m.value && !s.value && (h.value = "");
2722
+ R(
2723
+ () => a.modelValue,
2724
+ (r, b) => {
2725
+ if (r !== b && D(), r == null)
2726
+ i.value = null, !c.value && !s.value && (u.value = "");
1702
2727
  else {
1703
- const w = i.options.find((B) => B.value === u);
1704
- w ? (f.value = w, !m.value && !s.value && (h.value = w.text)) : (f.value = null, !m.value && !s.value && (h.value = ""));
2728
+ const $ = a.options.find((I) => I.value === r);
2729
+ $ ? (i.value = $, !c.value && !s.value && (u.value = $.text)) : (i.value = null, !c.value && !s.value && (u.value = ""));
1705
2730
  }
1706
2731
  },
1707
2732
  { immediate: !0 }
1708
2733
  // Run immediately on component mount
1709
2734
  );
1710
- const F = (u) => {
1711
- R.value && !R.value.contains(u.target) && $();
1712
- }, K = () => {
2735
+ const z = (r) => {
2736
+ w.value && !w.value.contains(r.target) && D();
2737
+ }, j = () => {
1713
2738
  setTimeout(() => {
1714
- R.value && !R.value.contains(document.activeElement) && $();
2739
+ w.value && !w.value.contains(document.activeElement) && D();
1715
2740
  }, 100);
1716
2741
  };
1717
- H(m, (u) => {
1718
- u ? setTimeout(() => {
1719
- document.addEventListener("click", F);
1720
- }, 0) : document.removeEventListener("click", F);
1721
- }), ge(() => {
1722
- document.removeEventListener("click", F), window.removeEventListener("keydown", V);
2742
+ R(c, (r) => {
2743
+ r ? setTimeout(() => {
2744
+ document.addEventListener("click", z);
2745
+ }, 0) : document.removeEventListener("click", z);
2746
+ }), _e(() => {
2747
+ document.removeEventListener("click", z), window.removeEventListener("keydown", T);
1723
2748
  });
1724
- const Y = () => {
1725
- if (i.disabled) return;
1726
- const u = f.value;
1727
- r("update:modelValue", null), u && r("clear", u);
1728
- }, v = (u) => {
1729
- f.value = u, s.value || (h.value = u.text), r("update:modelValue", u.value), r("select", u), $();
1730
- }, b = () => {
1731
- A.value.length > 0 && v(A.value[0]);
1732
- }, S = () => {
1733
- m.value || y();
1734
- }, V = (u) => {
1735
- if (!m.value || A.value.length === 0) return;
1736
- const P = A.value.findIndex(
1737
- (B, _) => "option-" + _ === x.value
2749
+ const H = () => {
2750
+ if (a.disabled) return;
2751
+ const r = i.value;
2752
+ o("update:modelValue", null), r && o("clear", r);
2753
+ }, v = (r) => {
2754
+ i.value = r, s.value || (u.value = r.text), o("update:modelValue", r.value), o("select", r), D();
2755
+ }, h = () => {
2756
+ C.value.length > 0 && v(C.value[0]);
2757
+ }, x = () => {
2758
+ c.value || S();
2759
+ }, T = (r) => {
2760
+ if (!c.value || C.value.length === 0) return;
2761
+ const b = C.value.findIndex(
2762
+ (I, P) => "option-" + P === y.value
1738
2763
  );
1739
- let w = -1;
1740
- if (u.key === "ArrowDown")
1741
- u.preventDefault(), w = (P + 1) % A.value.length;
1742
- else if (u.key === "ArrowUp")
1743
- u.preventDefault(), w = (P - 1 + A.value.length) % A.value.length;
1744
- else if (u.key === "Enter" && x.value) {
1745
- u.preventDefault();
1746
- const B = A.value.find(
1747
- (_, J) => "option-" + J === x.value
2764
+ let $ = -1;
2765
+ if (r.key === "ArrowDown")
2766
+ r.preventDefault(), $ = (b + 1) % C.value.length;
2767
+ else if (r.key === "ArrowUp")
2768
+ r.preventDefault(), $ = (b - 1 + C.value.length) % C.value.length;
2769
+ else if (r.key === "Enter" && y.value) {
2770
+ r.preventDefault();
2771
+ const I = C.value.find(
2772
+ (P, q) => "option-" + q === y.value
1748
2773
  );
1749
- B && v(B);
2774
+ I && v(I);
1750
2775
  return;
1751
- } else if (u.key === "Escape") {
1752
- u.preventDefault(), $(), j.value && j.value.focus();
2776
+ } else if (r.key === "Escape") {
2777
+ r.preventDefault(), D(), g.value && g.value.focus();
1753
2778
  return;
1754
2779
  } else if (s.value)
1755
2780
  return;
1756
- if (w !== -1) {
1757
- x.value = "option-" + w;
1758
- const B = document.getElementById(x.value);
1759
- B && requestAnimationFrame(() => {
1760
- B.scrollIntoView({ block: "nearest", behavior: "smooth" });
2781
+ if ($ !== -1) {
2782
+ y.value = "option-" + $;
2783
+ const I = document.getElementById(y.value);
2784
+ I && requestAnimationFrame(() => {
2785
+ I.scrollIntoView({ block: "nearest", behavior: "smooth" });
1761
2786
  });
1762
2787
  }
1763
2788
  };
1764
- return H(m, (u) => {
1765
- u ? (window.addEventListener("keydown", V), !s.value && !h.value && f.value && (h.value = f.value.text)) : window.removeEventListener("keydown", V);
1766
- }), ge(() => {
1767
- document.removeEventListener("click", F), window.removeEventListener("keydown", V);
1768
- }), c({
1769
- isDropdownOpen: m,
2789
+ return R(c, (r) => {
2790
+ r ? (window.addEventListener("keydown", T), !s.value && !u.value && i.value && (u.value = i.value.text)) : window.removeEventListener("keydown", T);
2791
+ }), _e(() => {
2792
+ document.removeEventListener("click", z), window.removeEventListener("keydown", T);
2793
+ }), t({
2794
+ isDropdownOpen: c,
1770
2795
  // Expose state
1771
- selectedItem: f,
2796
+ selectedItem: i,
1772
2797
  // Expose selected item
1773
- openDropdown: y,
2798
+ openDropdown: S,
1774
2799
  // Expose method to open
1775
- closeDropdown: $,
2800
+ closeDropdown: D,
1776
2801
  // Expose method to close
1777
- toggleDropdown: M,
2802
+ toggleDropdown: k,
1778
2803
  // Expose method to toggle
1779
2804
  selectItem: v,
1780
2805
  // Expose method to select an item programmatically
1781
- filterText: h,
2806
+ filterText: u,
1782
2807
  // Expose filter text (useful if parent controls filtering)
1783
2808
  hasDefaultSlotContent: s
1784
2809
  // Expose to know if the default slot is used
1785
- }), (u, P) => (n(), a("div", {
2810
+ }), (r, b) => (f(), p("div", {
1786
2811
  class: "relative w-full max-w-xs form-control",
1787
2812
  ref_key: "componentRoot",
1788
- ref: R
2813
+ ref: w
1789
2814
  }, [
1790
- e.label ? (n(), a("label", Sl, [
1791
- o("span", Cl, I(e.label), 1)
1792
- ])) : O("", !0),
1793
- o("div", {
1794
- class: D(["flex items-center input-bordered rounded-md w-fit cursor-pointer", { input: !s.value, select: !s.value }]),
1795
- style: ie(
1796
- f.value ? "background-image: unset; padding-right: 0.5rem;" : ""
2815
+ e.label ? (f(), p("label", wl, [
2816
+ d("span", xl, O(e.label), 1)
2817
+ ])) : E("", !0),
2818
+ d("div", {
2819
+ class: B(["flex items-center input-bordered rounded-md w-fit cursor-pointer", { input: !s.value, select: !s.value }]),
2820
+ style: ye(
2821
+ i.value ? "background-image: unset; padding-right: 0.5rem;" : ""
1797
2822
  ),
1798
2823
  tabindex: "0",
1799
- onClick: P[1] || (P[1] = (w) => s.value ? M() : y()),
2824
+ onClick: b[1] || (b[1] = ($) => s.value ? k() : S()),
1800
2825
  onKeydown: [
1801
- he(Q(b, ["prevent"]), ["enter"]),
1802
- he(Q(b, ["prevent"]), ["space"])
2826
+ We(te(h, ["prevent"]), ["enter"]),
2827
+ We(te(h, ["prevent"]), ["space"])
1803
2828
  ],
1804
- onBlur: K,
2829
+ onBlur: j,
1805
2830
  role: "combobox",
1806
2831
  "aria-haspopup": "listbox",
1807
- "aria-expanded": m.value,
1808
- "aria-activedescendant": x.value,
2832
+ "aria-expanded": c.value,
2833
+ "aria-activedescendant": y.value,
1809
2834
  "aria-autocomplete": "list",
1810
2835
  ref_key: "activatorWrapper",
1811
- ref: j
2836
+ ref: g
1812
2837
  }, [
1813
- T(u.$slots, "default", {}, () => [
1814
- s.value ? O("", !0) : W((n(), a("input", {
2838
+ V(r.$slots, "default", {}, () => [
2839
+ s.value ? E("", !0) : Ce((f(), p("input", {
1815
2840
  key: 0,
1816
2841
  type: "text",
1817
2842
  placeholder: e.placeholder,
1818
2843
  class: "bg-transparent border-none focus:outline-none w-full",
1819
- "onUpdate:modelValue": P[0] || (P[0] = (w) => h.value = w),
2844
+ "onUpdate:modelValue": b[0] || (b[0] = ($) => u.value = $),
1820
2845
  ref_key: "filterInput",
1821
- ref: k,
1822
- onFocus: y,
1823
- onInput: S,
2846
+ ref: m,
2847
+ onFocus: S,
2848
+ onInput: x,
1824
2849
  tabindex: "-1",
1825
- disabled: i.disabled
1826
- }, null, 40, Ml)), [
1827
- [oe, h.value]
2850
+ disabled: a.disabled
2851
+ }, null, 40, $l)), [
2852
+ [Tt, u.value]
1828
2853
  ])
1829
2854
  ]),
1830
- f.value && !e.disabled ? (n(), ae(N(et), {
2855
+ i.value && !e.disabled ? (f(), ae(Z(hn), {
1831
2856
  key: 0,
1832
2857
  size: 20,
1833
2858
  class: "mx-2 text-base-content/50 hover:text-base-content/80 cursor-pointer",
1834
- onClick: Q(Y, ["stop"])
1835
- })) : O("", !0),
1836
- s.value && !f.value ? (n(), ae(N(Qe), {
2859
+ onClick: te(H, ["stop"])
2860
+ })) : E("", !0),
2861
+ s.value && !i.value ? (f(), ae(Z(pn), {
1837
2862
  key: 1,
1838
- class: D([{ "rotate-180": m.value }, "mx-2"]),
2863
+ class: B([{ "rotate-180": c.value }, "mx-2"]),
1839
2864
  size: 20
1840
- }, null, 8, ["class"])) : O("", !0)
1841
- ], 46, Il),
1842
- W(o("div", Dl, [
1843
- o("ul", Tl, [
1844
- (n(!0), a(z, null, E(A.value, (w, B) => (n(), a("li", {
1845
- key: w.value,
1846
- onMousedown: Q((_) => v(w), ["prevent"]),
2865
+ }, null, 8, ["class"])) : E("", !0)
2866
+ ], 46, kl),
2867
+ Ce(d("div", Sl, [
2868
+ d("ul", Cl, [
2869
+ (f(!0), p(U, null, F(C.value, ($, I) => (f(), p("li", {
2870
+ key: $.value,
2871
+ onMousedown: te((P) => v($), ["prevent"]),
1847
2872
  class: "hover:bg-base-200 rounded-md w-full cursor-pointer",
1848
- id: "option-" + B,
2873
+ id: "option-" + I,
1849
2874
  role: "option",
1850
- "aria-selected": f.value && f.value.value === w.value
2875
+ "aria-selected": i.value && i.value.value === $.value
1851
2876
  }, [
1852
- o("a", null, I(w.text), 1)
1853
- ], 40, Vl))), 128))
2877
+ d("a", null, O($.text), 1)
2878
+ ], 40, Dl))), 128))
1854
2879
  ])
1855
2880
  ], 512), [
1856
- [je, m.value && A.value.length > 0]
2881
+ [nn, c.value && C.value.length > 0]
1857
2882
  ])
1858
2883
  ], 512));
1859
2884
  }
1860
- }, Bl = { class: "w-full max-w-xs form-control" }, Ol = {
2885
+ }, Tl = { class: "w-full max-w-xs form-control" }, Ml = {
1861
2886
  key: 0,
1862
2887
  class: "label"
1863
- }, zl = { class: "label-text" }, Al = ["type", "placeholder", "disabled", "value"], Pl = {
2888
+ }, Il = { class: "label-text" }, El = ["type", "placeholder", "disabled", "value"], Bl = {
1864
2889
  key: 1,
1865
2890
  class: "label"
1866
- }, El = { class: "label-text-alt text-error validator-hint" }, Ll = {
2891
+ }, Vl = { class: "label-text-alt text-error validator-hint" }, zl = {
1867
2892
  key: 2,
1868
2893
  class: "label"
1869
- }, Ul = { class: "label-text-alt text-success validator-hint" }, Bn = /* @__PURE__ */ U({
2894
+ }, Pl = { class: "label-text-alt text-success validator-hint" }, Io = /* @__PURE__ */ A({
1870
2895
  __name: "inputField",
1871
2896
  props: {
1872
2897
  modelValue: { default: "" },
@@ -1882,43 +2907,43 @@ const lt = te("SunIcon", [
1882
2907
  disabled: { type: Boolean, default: !1 }
1883
2908
  },
1884
2909
  emits: ["update:modelValue", "validate"],
1885
- setup(e, { expose: c, emit: t }) {
1886
- const i = e, r = t, l = C(null), s = C(!1), h = C(""), f = L(() => {
1887
- var M, A, F, K;
1888
- let x = !0, y = "";
1889
- const $ = i.modelValue;
1890
- return (M = i.rules) != null && M.required && ($ == null || $ === "") && (x = !1, y = "This field is required."), x && ((A = i.rules) == null ? void 0 : A.minLength) !== void 0 && typeof $ == "string" && $.length < i.rules.minLength && (x = !1, y = `Must be at least ${i.rules.minLength} characters.`), x && ((F = i.rules) == null ? void 0 : F.maxLength) !== void 0 && typeof $ == "string" && $.length > i.rules.maxLength && (x = !1, y = `Cannot exceed ${i.rules.maxLength} characters.`), x && ((K = i.rules) != null && K.email) && typeof $ == "string" && $ && (/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test($) || (x = !1, y = "Please enter a valid email address.")), h.value = y, r("validate", x), x;
1891
- }), m = L(() => s.value && !f.value), k = (x) => {
1892
- const y = x.target;
1893
- r("update:modelValue", y.value), s.value && f.value;
1894
- }, R = () => {
1895
- s.value = !0, f.value;
2910
+ setup(e, { expose: t, emit: n }) {
2911
+ const a = e, o = n, l = M(null), s = M(!1), u = M(""), i = K(() => {
2912
+ var k, C, z, j;
2913
+ let y = !0, S = "";
2914
+ const D = a.modelValue;
2915
+ return (k = a.rules) != null && k.required && (D == null || D === "") && (y = !1, S = "This field is required."), y && ((C = a.rules) == null ? void 0 : C.minLength) !== void 0 && typeof D == "string" && D.length < a.rules.minLength && (y = !1, S = `Must be at least ${a.rules.minLength} characters.`), y && ((z = a.rules) == null ? void 0 : z.maxLength) !== void 0 && typeof D == "string" && D.length > a.rules.maxLength && (y = !1, S = `Cannot exceed ${a.rules.maxLength} characters.`), y && ((j = a.rules) != null && j.email) && typeof D == "string" && D && (/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(D) || (y = !1, S = "Please enter a valid email address.")), u.value = S, o("validate", y), y;
2916
+ }), c = K(() => s.value && !i.value), m = (y) => {
2917
+ const S = y.target;
2918
+ o("update:modelValue", S.value), s.value && i.value;
2919
+ }, w = () => {
2920
+ s.value = !0, i.value;
1896
2921
  };
1897
- return H(
1898
- () => i.modelValue,
2922
+ return R(
2923
+ () => a.modelValue,
1899
2924
  () => {
1900
- s.value && f.value;
2925
+ s.value && i.value;
1901
2926
  }
1902
- ), c({
2927
+ ), t({
1903
2928
  focusInput: () => {
1904
- var x;
1905
- console.log("inputField.vue: focusInput method called."), (x = l.value) == null || x.focus();
2929
+ var y;
2930
+ console.log("inputField.vue: focusInput method called."), (y = l.value) == null || y.focus();
1906
2931
  },
1907
- isValid: f,
2932
+ isValid: i,
1908
2933
  isTouched: s,
1909
- errorMessage: h
1910
- }), (x, y) => (n(), a("div", Bl, [
1911
- e.label ? (n(), a("label", Ol, [
1912
- o("span", zl, I(e.label), 1)
1913
- ])) : O("", !0),
1914
- T(x.$slots, "default"),
1915
- o("input", {
2934
+ errorMessage: u
2935
+ }), (y, S) => (f(), p("div", Tl, [
2936
+ e.label ? (f(), p("label", Ml, [
2937
+ d("span", Il, O(e.label), 1)
2938
+ ])) : E("", !0),
2939
+ V(y.$slots, "default"),
2940
+ d("input", {
1916
2941
  ref_key: "inputElement",
1917
2942
  ref: l,
1918
2943
  type: e.type,
1919
2944
  placeholder: e.placeholder,
1920
- disabled: i.disabled,
1921
- class: D(["input-bordered rounded-md w-full input validator", [
2945
+ disabled: a.disabled,
2946
+ class: B(["input-bordered rounded-md w-full input validator", [
1922
2947
  {
1923
2948
  // Size classes - Apply based on size prop
1924
2949
  "input-xs": e.size === "xs",
@@ -1930,33 +2955,33 @@ const lt = te("SunIcon", [
1930
2955
  "input-ghost": e.style === "ghost",
1931
2956
  // Color classes - Apply only if NOT in an error state AND NOT in a validation success state.
1932
2957
  // This ensures validation feedback overrides base colors.
1933
- "input-neutral": e.color === "neutral" && !m.value && !(f.value && s.value && e.needsValidation),
1934
- "input-primary": e.color === "primary" && !m.value && !(f.value && s.value && e.needsValidation),
1935
- "input-secondary": e.color === "secondary" && !m.value && !(f.value && s.value && e.needsValidation),
1936
- "input-accent": e.color === "accent" && !m.value && !(f.value && s.value && e.needsValidation),
1937
- "input-info": e.color === "info" && !m.value && !(f.value && s.value && e.needsValidation),
1938
- "input-success": e.color === "success" && !m.value && !(f.value && s.value && e.needsValidation),
2958
+ "input-neutral": e.color === "neutral" && !c.value && !(i.value && s.value && e.needsValidation),
2959
+ "input-primary": e.color === "primary" && !c.value && !(i.value && s.value && e.needsValidation),
2960
+ "input-secondary": e.color === "secondary" && !c.value && !(i.value && s.value && e.needsValidation),
2961
+ "input-accent": e.color === "accent" && !c.value && !(i.value && s.value && e.needsValidation),
2962
+ "input-info": e.color === "info" && !c.value && !(i.value && s.value && e.needsValidation),
2963
+ "input-success": e.color === "success" && !c.value && !(i.value && s.value && e.needsValidation),
1939
2964
  // Color success applies only if not in error or validation success state
1940
- "input-warning": e.color === "warning" && !m.value && !(f.value && s.value && e.needsValidation),
2965
+ "input-warning": e.color === "warning" && !c.value && !(i.value && s.value && e.needsValidation),
1941
2966
  // Validation state classes - These take precedence visually via conditions or CSS specificity.
1942
- "input-error": m.value,
2967
+ "input-error": c.value,
1943
2968
  // Apply error style if validation fails
1944
- "input-success-validation": f.value && s.value && !m.value && e.needsValidation
2969
+ "input-success-validation": i.value && s.value && !c.value && e.needsValidation
1945
2970
  // Apply validation success style if valid, touched, not error, AND validation is needed. Using a distinct name 'input-success-validation' is recommended to avoid CSS conflicts with the 'input-success' color class.
1946
2971
  }
1947
2972
  ]]),
1948
2973
  value: e.modelValue,
1949
- onInput: k,
1950
- onBlur: R
1951
- }, null, 42, Al),
1952
- m.value ? (n(), a("div", Pl, [
1953
- o("span", El, I(h.value), 1)
1954
- ])) : f.value && s.value && e.successMessage ? (n(), a("div", Ll, [
1955
- o("span", Ul, I(e.successMessage), 1)
1956
- ])) : O("", !0)
2974
+ onInput: m,
2975
+ onBlur: w
2976
+ }, null, 42, El),
2977
+ c.value ? (f(), p("div", Bl, [
2978
+ d("span", Vl, O(u.value), 1)
2979
+ ])) : i.value && s.value && e.successMessage ? (f(), p("div", zl, [
2980
+ d("span", Pl, O(e.successMessage), 1)
2981
+ ])) : E("", !0)
1957
2982
  ]));
1958
2983
  }
1959
- }), On = /* @__PURE__ */ U({
2984
+ }), Eo = /* @__PURE__ */ A({
1960
2985
  __name: "loader",
1961
2986
  props: {
1962
2987
  loading: { type: Boolean, default: !0 },
@@ -1965,15 +2990,15 @@ const lt = te("SunIcon", [
1965
2990
  color: { default: "primary" }
1966
2991
  },
1967
2992
  setup(e) {
1968
- const c = e, t = C(c.loading);
1969
- return H(
1970
- () => c.loading,
1971
- (i) => {
1972
- t.value = i;
2993
+ const t = e, n = M(t.loading);
2994
+ return R(
2995
+ () => t.loading,
2996
+ (a) => {
2997
+ n.value = a;
1973
2998
  }
1974
- ), (i, r) => t.value ? (n(), a("span", {
2999
+ ), (a, o) => n.value ? (f(), p("span", {
1975
3000
  key: 0,
1976
- class: D(["loading", [
3001
+ class: B(["loading", [
1977
3002
  { "loading-xs": e.size === "xs" },
1978
3003
  { "loading-sm": e.size === "sm" },
1979
3004
  { "loading-md": e.size === "md" },
@@ -1996,15 +3021,15 @@ const lt = te("SunIcon", [
1996
3021
  { "text-warning": e.color === "warning" },
1997
3022
  { "text-error": e.color === "error" }
1998
3023
  ]])
1999
- }, null, 2)) : O("", !0);
3024
+ }, null, 2)) : E("", !0);
2000
3025
  }
2001
- }), Rl = { class: "footer sm:footer-horizontal container" }, Nl = { class: "footer-title" }, jl = ["href"], Fl = {
3026
+ }), Ol = { class: "footer sm:footer-horizontal container" }, Nl = { class: "footer-title" }, Al = ["href"], Ll = {
2002
3027
  key: 0,
2003
3028
  class: "sm:hidden w-full"
2004
- }, ql = { class: "border-b-2 border-base-100 last:border-b-0 w-full" }, Hl = {
3029
+ }, Ul = { class: "border-b-2 border-base-100 last:border-b-0 w-full" }, jl = {
2005
3030
  tabindex: "0",
2006
3031
  class: "collapse collapse-plus w-full"
2007
- }, Wl = { class: "collapse-title font-bold text-lg collapsible-footer-title" }, Kl = { class: "collapse-content flex w-full text-sm" }, _l = { class: "flex flex-col gap-2.5" }, Yl = { class: "w-full" }, Jl = ["href"], Xl = { class: "w-full" }, zn = /* @__PURE__ */ U({
3032
+ }, Fl = { class: "collapse-title font-bold text-lg collapsible-footer-title" }, Rl = { class: "collapse-content flex w-full text-sm" }, ql = { class: "flex flex-col gap-2.5" }, Hl = { class: "w-full" }, _l = ["href"], Wl = { class: "w-full" }, Bo = /* @__PURE__ */ A({
2008
3033
  __name: "footer",
2009
3034
  props: {
2010
3035
  items: {},
@@ -2013,118 +3038,118 @@ const lt = te("SunIcon", [
2013
3038
  collapseOnMobile: { type: Boolean, default: !1 }
2014
3039
  },
2015
3040
  setup(e) {
2016
- const c = e;
2017
- return (t, i) => (n(), a("div", {
2018
- class: D(["mx-auto md:px-10 py-10 text-base-content", [e.background ?? "bg-base-200", e.color ?? "text-base-content"]])
3041
+ const t = e;
3042
+ return (n, a) => (f(), p("div", {
3043
+ class: B(["mx-auto md:px-10 py-10 text-base-content", [e.background ?? "bg-base-200", e.color ?? "text-base-content"]])
2019
3044
  }, [
2020
- o("footer", Rl, [
2021
- (n(!0), a(z, null, E(c.items, (r) => (n(), a("nav", {
2022
- class: D([{ "hidden sm:grid": e.collapseOnMobile }])
3045
+ d("footer", Ol, [
3046
+ (f(!0), p(U, null, F(t.items, (o) => (f(), p("nav", {
3047
+ class: B([{ "hidden sm:grid": e.collapseOnMobile }])
2023
3048
  }, [
2024
- o("h6", Nl, I(r.title), 1),
2025
- (n(!0), a(z, null, E(r.items, (l) => (n(), a("a", {
3049
+ d("h6", Nl, O(o.title), 1),
3050
+ (f(!0), p(U, null, F(o.items, (l) => (f(), p("a", {
2026
3051
  class: "link link-hover",
2027
3052
  href: l.link
2028
- }, I(l.text), 9, jl))), 256))
3053
+ }, O(l.text), 9, Al))), 256))
2029
3054
  ], 2))), 256)),
2030
- e.collapseOnMobile ? (n(), a("nav", Fl, [
2031
- (n(!0), a(z, null, E(c.items, (r) => (n(), a("ul", ql, [
2032
- o("div", Hl, [
2033
- o("div", Wl, I(r.title), 1),
2034
- o("div", Kl, [
2035
- o("ul", _l, [
2036
- (n(!0), a(z, null, E(r.items, (l) => (n(), a("li", Yl, [
2037
- o("a", {
3055
+ e.collapseOnMobile ? (f(), p("nav", Ll, [
3056
+ (f(!0), p(U, null, F(t.items, (o) => (f(), p("ul", Ul, [
3057
+ d("div", jl, [
3058
+ d("div", Fl, O(o.title), 1),
3059
+ d("div", Rl, [
3060
+ d("ul", ql, [
3061
+ (f(!0), p(U, null, F(o.items, (l) => (f(), p("li", Hl, [
3062
+ d("a", {
2038
3063
  class: "w-full font-medium link link-hover",
2039
3064
  href: l.link
2040
- }, I(l.text), 9, Jl)
3065
+ }, O(l.text), 9, _l)
2041
3066
  ]))), 256))
2042
3067
  ])
2043
3068
  ])
2044
3069
  ])
2045
3070
  ]))), 256))
2046
- ])) : O("", !0),
2047
- o("aside", Xl, [
2048
- T(t.$slots, "default")
3071
+ ])) : E("", !0),
3072
+ d("aside", Wl, [
3073
+ V(n.$slots, "default")
2049
3074
  ])
2050
3075
  ])
2051
3076
  ], 2));
2052
3077
  }
2053
- }), Gl = {}, Zl = { class: "min-h-40 container hero" }, Ql = { class: "px-0! text-center hero-content" }, en = { class: "mt-9 text-4xl" };
2054
- function tn(e, c) {
2055
- return n(), a("div", Zl, [
2056
- o("div", Ql, [
2057
- o("div", null, [
2058
- o("h1", en, [
2059
- T(e.$slots, "title", {}, () => [
2060
- c[0] || (c[0] = xe("hero title", -1))
3078
+ }), Zl = {}, Kl = { class: "min-h-40 container hero" }, Yl = { class: "px-0! text-center hero-content" }, Jl = { class: "mt-9 text-4xl" };
3079
+ function Xl(e, t) {
3080
+ return f(), p("div", Kl, [
3081
+ d("div", Yl, [
3082
+ d("div", null, [
3083
+ d("h1", Jl, [
3084
+ V(e.$slots, "title", {}, () => [
3085
+ t[0] || (t[0] = Ct("hero title", -1))
2061
3086
  ])
2062
3087
  ]),
2063
- o("p", null, [
2064
- T(e.$slots, "description", { class: "py-9" })
3088
+ d("p", null, [
3089
+ V(e.$slots, "description", { class: "py-9" })
2065
3090
  ]),
2066
- T(e.$slots, "call-to-action-block", { class: "max-w-full" }, () => [
2067
- c[1] || (c[1] = o("button", { class: "btn btn-primary" }, "Call to action", -1))
3091
+ V(e.$slots, "call-to-action-block", { class: "max-w-full" }, () => [
3092
+ t[1] || (t[1] = d("button", { class: "btn btn-primary" }, "Call to action", -1))
2068
3093
  ])
2069
3094
  ])
2070
3095
  ])
2071
3096
  ]);
2072
3097
  }
2073
- const An = /* @__PURE__ */ le(Gl, [["render", tn]]), ln = { class: "flex flex-row place-content-center gap-4 categories" }, nn = ["onClick"], Pn = /* @__PURE__ */ U({
3098
+ const Vo = /* @__PURE__ */ we(Zl, [["render", Xl]]), Gl = { class: "flex flex-row place-content-center gap-4 categories" }, Ql = ["onClick"], zo = /* @__PURE__ */ A({
2074
3099
  __name: "categoryNavigation",
2075
3100
  props: {
2076
3101
  searchOptions: {},
2077
3102
  currentCategory: {}
2078
3103
  },
2079
3104
  emits: ["update:currentCategory"],
2080
- setup(e, { emit: c }) {
2081
- const t = e, i = c;
2082
- function r(l) {
2083
- i("update:currentCategory", l);
3105
+ setup(e, { emit: t }) {
3106
+ const n = e, a = t;
3107
+ function o(l) {
3108
+ a("update:currentCategory", l);
2084
3109
  }
2085
- return (l, s) => (n(), a("div", ln, [
2086
- (n(!0), a(z, null, E(t.searchOptions, (h) => (n(), a("div", {
2087
- key: h.category
3110
+ return (l, s) => (f(), p("div", Gl, [
3111
+ (f(!0), p(U, null, F(n.searchOptions, (u) => (f(), p("div", {
3112
+ key: u.category
2088
3113
  }, [
2089
- o("button", {
2090
- onClick: (f) => r(h.category),
2091
- class: D(["truncate btn btn-ghost", { "font-semibold": t.currentCategory === h.category }])
2092
- }, I(h.category), 11, nn)
3114
+ d("button", {
3115
+ onClick: (i) => o(u.category),
3116
+ class: B(["truncate btn btn-ghost", { "font-semibold": n.currentCategory === u.category }])
3117
+ }, O(u.category), 11, Ql)
2093
3118
  ]))), 128))
2094
3119
  ]));
2095
3120
  }
2096
- }), an = { class: "md:flex hidden navbar-start" }, on = { class: "md:flex justify-center items-center hidden navbar-center" }, sn = { class: "md:flex hidden navbar-end" }, rn = { class: "navbar-bottom md:flex hidden" }, un = /* @__PURE__ */ U({
3121
+ }), eo = { class: "md:flex hidden navbar-start" }, to = { class: "md:flex justify-center items-center hidden navbar-center" }, no = { class: "md:flex hidden navbar-end" }, ao = { class: "navbar-bottom md:flex hidden" }, lo = /* @__PURE__ */ A({
2097
3122
  __name: "navigationBar",
2098
3123
  props: {
2099
3124
  isCollapsed: { type: Boolean, default: !0 }
2100
3125
  },
2101
3126
  setup(e) {
2102
- const c = e;
2103
- return (t, i) => (n(), a("nav", {
2104
- class: D(["place-items-start border-primary bg-base-100 px-5 py-5 border-b-4 transition-all navbar navigationbar", c.isCollapsed ? "collapsed" : ""])
3127
+ const t = e;
3128
+ return (n, a) => (f(), p("nav", {
3129
+ class: B(["place-items-start border-primary bg-base-100 px-5 py-5 border-b-4 transition-all navbar navigationbar", t.isCollapsed ? "collapsed" : ""])
2105
3130
  }, [
2106
- o("div", an, [
2107
- T(t.$slots, "start", {}, void 0, !0)
3131
+ d("div", eo, [
3132
+ V(n.$slots, "start", {}, void 0, !0)
2108
3133
  ]),
2109
- o("div", on, [
2110
- T(t.$slots, "center", {}, void 0, !0)
3134
+ d("div", to, [
3135
+ V(n.$slots, "center", {}, void 0, !0)
2111
3136
  ]),
2112
- o("div", sn, [
2113
- T(t.$slots, "end", {}, void 0, !0)
3137
+ d("div", no, [
3138
+ V(n.$slots, "end", {}, void 0, !0)
2114
3139
  ]),
2115
- o("div", rn, [
2116
- T(t.$slots, "bottom", {}, void 0, !0)
3140
+ d("div", ao, [
3141
+ V(n.$slots, "bottom", {}, void 0, !0)
2117
3142
  ])
2118
3143
  ], 2));
2119
3144
  }
2120
- }), En = /* @__PURE__ */ le(un, [["__scopeId", "data-v-8ddb2b45"]]), dn = {
3145
+ }), Po = /* @__PURE__ */ we(lo, [["__scopeId", "data-v-8ddb2b45"]]), oo = {
2121
3146
  key: 0,
2122
3147
  class: "hidden top-4 right-0 absolute md:flex gap-4"
2123
- }, cn = ["onClick", "aria-selected"], vn = {
3148
+ }, so = ["onClick", "aria-selected"], io = {
2124
3149
  key: 0,
2125
3150
  role: "tabpanel",
2126
3151
  class: "p-6 border-x-0 border-t-2 border-b-0 border-base-300 max-w-full overflow-x-auto tab-content"
2127
- }, fn = { class: "p-6 border-x-0 border-t-2 border-b-0 border-base-300 max-w-full" }, Ln = /* @__PURE__ */ U({
3152
+ }, ro = { class: "p-6 border-x-0 border-t-2 border-b-0 border-base-300 max-w-full" }, Oo = /* @__PURE__ */ A({
2128
3153
  __name: "tab",
2129
3154
  props: {
2130
3155
  items: {},
@@ -2133,82 +3158,82 @@ const An = /* @__PURE__ */ le(Gl, [["render", tn]]), ln = { class: "flex flex-ro
2133
3158
  buttonOnlyMode: { type: Boolean, default: !1 }
2134
3159
  },
2135
3160
  emits: ["tab-changed"],
2136
- setup(e, { emit: c }) {
2137
- const t = e, i = C(t.items[0]), r = c;
2138
- function l(f) {
2139
- i.value = f, r("tab-changed", f);
3161
+ setup(e, { emit: t }) {
3162
+ const n = e, a = M(n.items[0]), o = t;
3163
+ function l(i) {
3164
+ a.value = i, o("tab-changed", i);
2140
3165
  }
2141
3166
  function s() {
2142
- const m = (t.items.indexOf(i.value) + 1) % t.items.length;
2143
- l(t.items[m]);
3167
+ const c = (n.items.indexOf(a.value) + 1) % n.items.length;
3168
+ l(n.items[c]);
2144
3169
  }
2145
- function h() {
2146
- const m = (t.items.indexOf(i.value) - 1 + t.items.length) % t.items.length;
2147
- l(t.items[m]);
3170
+ function u() {
3171
+ const c = (n.items.indexOf(a.value) - 1 + n.items.length) % n.items.length;
3172
+ l(n.items[c]);
2148
3173
  }
2149
- return ee(() => {
2150
- t.items && l(t.items[0]);
2151
- }), ke(() => {
2152
- t.rotateTabsAfter && t.rotateTabsAfter > 0 && setInterval(() => {
3174
+ return ue(() => {
3175
+ n.items && l(n.items[0]);
3176
+ }), Dt(() => {
3177
+ n.rotateTabsAfter && n.rotateTabsAfter > 0 && setInterval(() => {
2153
3178
  s();
2154
- }, t.rotateTabsAfter * 1e3);
2155
- }), (f, m) => (n(), a(z, null, [
2156
- o("div", {
3179
+ }, n.rotateTabsAfter * 1e3);
3180
+ }), (i, c) => (f(), p(U, null, [
3181
+ d("div", {
2157
3182
  role: "tablist",
2158
- class: D(["relative tabs-bordered w-full tabs tabs-lg", { "flex-nowrap overflow-x-auto": e.buttonOnlyMode }])
3183
+ class: B(["relative tabs-bordered w-full tabs tabs-lg", { "flex-nowrap overflow-x-auto": e.buttonOnlyMode }])
2159
3184
  }, [
2160
- e.withControlls ? (n(), a("div", dn, [
2161
- o("button", {
2162
- onClick: m[0] || (m[0] = (k) => h()),
3185
+ e.withControlls ? (f(), p("div", oo, [
3186
+ d("button", {
3187
+ onClick: c[0] || (c[0] = (m) => u()),
2163
3188
  class: "cursor-pointer"
2164
3189
  }, "Previous"),
2165
- o("button", {
2166
- onClick: m[1] || (m[1] = (k) => s()),
3190
+ d("button", {
3191
+ onClick: c[1] || (c[1] = (m) => s()),
2167
3192
  class: "text-primary cursor-pointer"
2168
3193
  }, "Next")
2169
- ])) : O("", !0),
2170
- (n(!0), a(z, null, E(e.items, (k) => (n(), a(z, null, [
2171
- o("a", {
3194
+ ])) : E("", !0),
3195
+ (f(!0), p(U, null, F(e.items, (m) => (f(), p(U, null, [
3196
+ d("a", {
2172
3197
  type: "button",
2173
3198
  role: "tab",
2174
- class: D(["min-w-max tab", k === i.value ? "bg-primary text-base-100" : ""]),
2175
- onClick: (R) => l(k),
2176
- "aria-selected": i.value == k
2177
- }, I(k), 11, cn),
2178
- e.buttonOnlyMode ? O("", !0) : (n(), a("div", vn, [
2179
- T(f.$slots, `${k}-tab`)
3199
+ class: B(["min-w-max tab", m === a.value ? "bg-primary text-base-100" : ""]),
3200
+ onClick: (w) => l(m),
3201
+ "aria-selected": a.value == m
3202
+ }, O(m), 11, so),
3203
+ e.buttonOnlyMode ? E("", !0) : (f(), p("div", io, [
3204
+ V(i.$slots, `${m}-tab`)
2180
3205
  ]))
2181
3206
  ], 64))), 256))
2182
3207
  ], 2),
2183
- o("div", fn, [
2184
- T(f.$slots, "default")
3208
+ d("div", ro, [
3209
+ V(i.$slots, "default")
2185
3210
  ])
2186
3211
  ], 64));
2187
3212
  }
2188
3213
  });
2189
3214
  export {
2190
- wn as Accordion,
2191
- In as AdvancedSearch,
2192
- xn as Avatar,
2193
- kn as Badge,
2194
- pn as ButtonComponent,
2195
- $n as Card,
2196
- Sn as Carousel,
2197
- Cn as CarouselItem,
2198
- Pn as CategoryNavigation,
2199
- cl as DatetimePicker,
2200
- gn as Dropdown,
2201
- Vn as FilterableSelect,
2202
- zn as Footer,
2203
- An as Hero,
2204
- Bn as InputField,
2205
- On as Loader,
2206
- hn as Modal,
2207
- En as NavigationBar,
2208
- Mn as Rating,
2209
- Tn as Selector,
2210
- bn as Swap,
2211
- Ln as Tab,
2212
- Dn as TagInput,
2213
- yn as ThemeController
3215
+ go as Accordion,
3216
+ $o as AdvancedSearch,
3217
+ yo as Avatar,
3218
+ bo as Badge,
3219
+ fo as ButtonComponent,
3220
+ wo as Card,
3221
+ xo as Carousel,
3222
+ ko as CarouselItem,
3223
+ zo as CategoryNavigation,
3224
+ So as DatetimePicker,
3225
+ mo as Dropdown,
3226
+ Mo as FilterableSelect,
3227
+ Bo as Footer,
3228
+ Vo as Hero,
3229
+ Io as InputField,
3230
+ Eo as Loader,
3231
+ po as Modal,
3232
+ Po as NavigationBar,
3233
+ Co as Rating,
3234
+ To as Selector,
3235
+ ho as Swap,
3236
+ Oo as Tab,
3237
+ Do as TagInput,
3238
+ vo as ThemeController
2214
3239
  };