@oneclick.dev/cms-core-modules 0.0.83 → 0.0.85

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.
Files changed (67) hide show
  1. package/dist/{ContentEditor-CxKirDdL.mjs → ContentEditor-C5ydvk8b.mjs} +7067 -5886
  2. package/dist/{ContentEditor-CRFkD4tE.js → ContentEditor-DiveHwSJ.js} +43 -43
  3. package/dist/{Create-CsqVYhPO.mjs → Create-6uT9HWar.mjs} +35 -35
  4. package/dist/{Create-ip0MnS0o.js → Create-DuZ5nZrX.js} +1 -1
  5. package/dist/{DateFormatter-CvOfaUnU.mjs → DateFormatter-2B0R-DY4.mjs} +204 -400
  6. package/dist/DateFormatter-DbtOLV0L.js +1 -0
  7. package/dist/{Detail-RMXFuSRQ.js → Detail-BZ-iE9vf.js} +1 -1
  8. package/dist/{Detail-B4b_FLDa.mjs → Detail-C1Blq61w.mjs} +90 -90
  9. package/dist/{Detail-BayNaAg9.js → Detail-C8wQiDcv.js} +1 -1
  10. package/dist/{Detail-CbLk1v37.mjs → Detail-CJVMJDP7.mjs} +17 -17
  11. package/dist/{Detail-CnK-qbhE.js → Detail-CPqug27l.js} +1 -1
  12. package/dist/Detail-CjuhjPby.js +1 -0
  13. package/dist/{Detail-U0mgLKt6.mjs → Detail-CtItxMX4.mjs} +62 -63
  14. package/dist/{Detail-CVgWHbMC.mjs → Detail-Dnpnmy4-.mjs} +158 -158
  15. package/dist/{Entries-D7MHylQE.mjs → Entries-BkOPae4R.mjs} +49 -49
  16. package/dist/Entries-CcEW98F5.js +1 -0
  17. package/dist/{Find-XPcJxeRH.mjs → Find-Bd1uLqSa.mjs} +55 -55
  18. package/dist/Find-D4Qa45qC.js +1 -0
  19. package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-CDc8MIq2.mjs → NewReservationDialog.vue_vue_type_script_setup_true_lang-Bc946oSc.mjs} +1 -1
  20. package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-StaNp-3y.js → NewReservationDialog.vue_vue_type_script_setup_true_lang-CqERfyYb.js} +1 -1
  21. package/dist/{Overview-CwCAeBnX.js → Overview-CA8wh_BI.js} +1 -1
  22. package/dist/{Overview-CgViRnNc.mjs → Overview-D4MFwRI_.mjs} +67 -68
  23. package/dist/{Overview-B2bFNGhH.js → Overview-Da0XexiT.js} +1 -1
  24. package/dist/Overview-DeQQ0FY3.js +1 -0
  25. package/dist/{Overview--XpvBbqz.mjs → Overview-DoOASlNz.mjs} +1 -3
  26. package/dist/{Overview-Cczt_dcE.mjs → Overview-gJSvftdE.mjs} +34 -34
  27. package/dist/{ReservationDetailDialog.vue_vue_type_script_setup_true_lang-B7ks5mbf.mjs → ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Cohhnd5x.mjs} +0 -1
  28. package/dist/{ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Vxubki_v.js → ReservationDetailDialog.vue_vue_type_script_setup_true_lang-VWVIxIr6.js} +1 -1
  29. package/dist/{SeoHealth-ZpvB7CS2.mjs → SeoHealth-Bc5chnaa.mjs} +14 -14
  30. package/dist/{SeoHealth-DFZ0LLBH.js → SeoHealth-BkpJ1F2Y.js} +1 -1
  31. package/dist/TableView-Ei_w_-bn.mjs +5745 -0
  32. package/dist/TableView-klOTPJKZ.js +4 -0
  33. package/dist/View-BaFlMcM6.js +1 -0
  34. package/dist/View-C4MBWRlA.mjs +28 -0
  35. package/dist/{agenda-Cl3s_FIE.mjs → agenda-C5grvzSa.mjs} +166 -169
  36. package/dist/agenda-DXMwVWpN.js +1 -0
  37. package/dist/{availability-B-tRp8hB.mjs → availability-C1NqOFsQ.mjs} +81 -81
  38. package/dist/{availability-BiBbzEIM.js → availability-D_wnfLsH.js} +1 -1
  39. package/dist/cms-core-modules.css +1 -1
  40. package/dist/{exceptions-DQPSFSj7.mjs → exceptions-BIwMhYa4.mjs} +1 -1
  41. package/dist/{exceptions-BA3PsW4n.js → exceptions-Cn7zooEu.js} +1 -1
  42. package/dist/{index-CBC9dWZ9.js → index-C9pSS15N.js} +2 -2
  43. package/dist/{index-YOOlBEZB.mjs → index-MwjeLHPP.mjs} +3 -3
  44. package/dist/index.cjs.js +1 -1
  45. package/dist/index.mjs +23 -23
  46. package/dist/{orders-DZzdsHOW.mjs → orders-DhQ2EFXS.mjs} +157 -157
  47. package/dist/orders-V1pch_ih.js +1 -0
  48. package/dist/server-handlers.cjs.js +1 -1
  49. package/dist/server-handlers.mjs +142 -147
  50. package/package.json +2 -2
  51. package/dist/DateFormatter-ls6HfWpS.js +0 -1
  52. package/dist/Detail-BcboL7NF.js +0 -1
  53. package/dist/Entries-BPkZ7Jg5.js +0 -1
  54. package/dist/Find-Ds6OvuH6.js +0 -1
  55. package/dist/Overview-B-8TLLjh.js +0 -1
  56. package/dist/TableView-BUPPcHUW.mjs +0 -89505
  57. package/dist/TableView-CksiPsTL.js +0 -586
  58. package/dist/View-DDXN0tKD.mjs +0 -25
  59. package/dist/View-DfzaVOzS.js +0 -1
  60. package/dist/agenda-rlFma_wn.js +0 -1
  61. package/dist/floating-ui.dom-B9WYoHj2.js +0 -1
  62. package/dist/floating-ui.dom-fpIfhXTZ.mjs +0 -1291
  63. package/dist/index-DYpruS-A-Cw57iwdY.mjs +0 -4210
  64. package/dist/index-DYpruS-A-DwDXo9Tq.js +0 -88
  65. package/dist/index-YMaY4uuk-BgpTtr73.js +0 -1
  66. package/dist/index-YMaY4uuk-C_xV5K9Z.mjs +0 -1300
  67. package/dist/orders-tP4WdF5q.js +0 -1
@@ -1,12 +1,12 @@
1
- import { defineComponent as K, resolveComponent as N, openBlock as o, createElementBlock as u, createElementVNode as e, Fragment as X, renderList as Y, toDisplayString as v, normalizeStyle as q, normalizeClass as R, createVNode as d, withCtx as S, unref as b, createTextVNode as ne, createCommentVNode as M, ref as $, createBlock as Q, provide as Z, computed as U, onMounted as pe, onUnmounted as fe, inject as ie, nextTick as xe, onBeforeUnmount as ze, watch as re } from "vue";
2
- import { o as ue, g as de } from "./DateFormatter-CvOfaUnU.mjs";
1
+ import { defineComponent as K, resolveComponent as P, openBlock as o, createElementBlock as u, createElementVNode as e, Fragment as X, renderList as Y, toDisplayString as v, normalizeStyle as q, normalizeClass as R, createVNode as d, withCtx as $, unref as b, createTextVNode as ne, createCommentVNode as M, ref as S, createBlock as Q, provide as Z, computed as U, onMounted as pe, onUnmounted as fe, inject as ie, nextTick as xe, onBeforeUnmount as ze, watch as le } from "vue";
2
+ import { c as ue, b as de } from "./DateFormatter-2B0R-DY4.mjs";
3
3
  import { X as we, Search as Ee, Clock as ge, Users as he, ChevronLeft as ve, ChevronRight as ce, Asterisk as Ie, CalendarDays as Be } from "lucide-vue-next";
4
4
  import { _ as Le } from "./EditLayout.vue_vue_type_script_setup_true_lang-CcysXzmW.mjs";
5
- import { useModule as $e, useModuleRoute as Se, useFirebaseIntegration as Te, useModulePermissions as Ue } from "@oneclick.dev/cms-kit";
6
- import { _ as je, F as Pe } from "./ReservationDetailDialog.vue_vue_type_script_setup_true_lang-B7ks5mbf.mjs";
7
- import { _ as Ne } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
8
- import { _ as be } from "./NewReservationDialog.vue_vue_type_script_setup_true_lang-CDc8MIq2.mjs";
9
- const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted/30 rounded-lg p-2 overflow-visible" }, Fe = ["onClick"], Ae = { class: "absolute -top-8 left-1/2 -translate-x-1/2 bg-popover border shadow-md rounded px-2 py-1 text-xs whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none z-10" }, Ve = { class: "font-medium" }, We = { class: "text-muted-foreground" }, He = { class: "w-full flex-1 flex items-end justify-center" }, Qe = {
5
+ import { useModule as Se, useModuleRoute as $e, useFirebaseIntegration as Te, useModulePermissions as Ue } from "@oneclick.dev/cms-kit";
6
+ import { _ as je, F as Pe } from "./ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Cohhnd5x.mjs";
7
+ import { _ as Re } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
8
+ import { _ as be } from "./NewReservationDialog.vue_vue_type_script_setup_true_lang-Bc946oSc.mjs";
9
+ const Ne = { class: "mb-6" }, Oe = { class: "flex items-end gap-px h-24 bg-muted/30 rounded-lg p-2 overflow-visible" }, Fe = ["onClick"], Ae = { class: "absolute -top-8 left-1/2 -translate-x-1/2 bg-popover border shadow-md rounded px-2 py-1 text-xs whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none z-10" }, Ve = { class: "font-medium" }, We = { class: "text-muted-foreground" }, He = { class: "w-full flex-1 flex items-end justify-center" }, Qe = {
10
10
  key: 1,
11
11
  class: "text-[10px] mt-1"
12
12
  }, Xe = {
@@ -27,11 +27,11 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
27
27
  }, I = () => {
28
28
  y("clear");
29
29
  };
30
- return (a, r) => {
31
- const c = N("Button");
32
- return o(), u("div", Oe, [
33
- r[2] || (r[2] = e("h3", { class: "font-semibold text-sm mb-2" }, "Timeline", -1)),
34
- e("div", Re, [
30
+ return (a, l) => {
31
+ const c = P("Button");
32
+ return o(), u("div", Ne, [
33
+ l[2] || (l[2] = e("h3", { class: "font-semibold text-sm mb-2" }, "Timeline", -1)),
34
+ e("div", Oe, [
35
35
  (o(!0), u(X, null, Y(f.timeSlots, (s) => (o(), u("div", {
36
36
  key: s.startTime,
37
37
  class: "flex-1 min-w-0 flex flex-col items-center cursor-pointer group h-full relative",
@@ -65,15 +65,15 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
65
65
  class: "h-6 w-6 p-0",
66
66
  onClick: I
67
67
  }, {
68
- default: S(() => [
68
+ default: $(() => [
69
69
  d(b(we), { size: 14 })
70
70
  ]),
71
71
  _: 1
72
72
  }),
73
73
  e("span", null, [
74
- r[0] || (r[0] = ne(" Showing ", -1)),
74
+ l[0] || (l[0] = ne(" Showing ", -1)),
75
75
  e("span", Ye, v(f.slotStats[f.selectedTimeSlot]?.bookings || 0), 1),
76
- r[1] || (r[1] = ne(" bookings at ", -1)),
76
+ l[1] || (l[1] = ne(" bookings at ", -1)),
77
77
  e("span", qe, v(f.selectedTimeSlot), 1)
78
78
  ])
79
79
  ])) : M("", !0)
@@ -92,7 +92,7 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
92
92
  }, ot = {
93
93
  key: 2,
94
94
  class: "space-y-2 max-h-80 overflow-y-auto"
95
- }, nt = ["onClick"], at = { class: "flex items-start justify-between" }, lt = { class: "flex-1" }, rt = { class: "font-medium" }, it = { class: "text-sm text-muted-foreground" }, ut = { class: "text-sm text-muted-foreground" }, dt = { class: "flex items-center gap-4" }, ct = { class: "flex items-center gap-2 mt-1 text-xs text-muted-foreground" }, mt = { class: "flex items-center gap-2 mt-1 text-xs text-muted-foreground" }, vt = { class: "text-right" }, pt = {
95
+ }, nt = ["onClick"], at = { class: "flex items-start justify-between" }, rt = { class: "flex-1" }, lt = { class: "font-medium" }, it = { class: "text-sm text-muted-foreground" }, ut = { class: "text-sm text-muted-foreground" }, dt = { class: "flex items-center gap-4" }, ct = { class: "flex items-center gap-2 mt-1 text-xs text-muted-foreground" }, mt = { class: "flex items-center gap-2 mt-1 text-xs text-muted-foreground" }, vt = { class: "text-right" }, pt = {
96
96
  key: 0,
97
97
  class: "inline-block px-2 py-1 text-xs rounded-full bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400"
98
98
  }, ft = {
@@ -121,15 +121,15 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
121
121
  },
122
122
  emits: ["update:searchQuery", "refresh"],
123
123
  setup(f, { emit: k }) {
124
- const y = k, T = $(null), I = (c) => {
124
+ const y = k, T = S(null), I = (c) => {
125
125
  y("update:searchQuery", c);
126
126
  }, a = () => {
127
127
  y("update:searchQuery", "");
128
- }, r = () => {
128
+ }, l = () => {
129
129
  y("refresh");
130
130
  };
131
131
  return (c, s) => {
132
- const w = N("Input"), _ = N("Button");
132
+ const w = P("Input"), _ = P("Button");
133
133
  return o(), u("div", null, [
134
134
  e("div", Ke, [
135
135
  e("h3", Ge, [
@@ -155,7 +155,7 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
155
155
  class: "absolute right-1 top-1/2 -translate-y-1/2 h-7 w-7",
156
156
  onClick: a
157
157
  }, {
158
- default: S(() => [
158
+ default: $(() => [
159
159
  d(b(we), { size: 14 })
160
160
  ]),
161
161
  _: 1
@@ -170,8 +170,8 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
170
170
  onClick: (B) => b(T).openDialog(h)
171
171
  }, [
172
172
  e("div", at, [
173
- e("div", lt, [
174
- e("div", rt, v(h.customerInfo.firstName + " " + h.customerInfo.lastName || "Unknown Customer"), 1),
173
+ e("div", rt, [
174
+ e("div", lt, v(h.customerInfo.firstName + " " + h.customerInfo.lastName || "Unknown Customer"), 1),
175
175
  e("div", it, v(h.customerInfo.email), 1),
176
176
  e("div", ut, v(h.customerInfo.phone), 1),
177
177
  e("div", dt, [
@@ -195,9 +195,9 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
195
195
  d(je, {
196
196
  ref_key: "reservationDetailDialog",
197
197
  ref: T,
198
- onCancelled: r,
199
- onConfirmed: r,
200
- onRejected: r
198
+ onCancelled: l,
199
+ onConfirmed: l,
200
+ onRejected: l
201
201
  }, null, 512)
202
202
  ]);
203
203
  };
@@ -205,19 +205,19 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
205
205
  }), _t = { class: "flex items-center gap-4 mt-2 text-sm" }, kt = { class: "flex items-center gap-1" }, wt = {
206
206
  key: 0,
207
207
  class: "flex items-center gap-1"
208
- }, $t = { class: "flex items-center gap-1" }, St = { class: "py-4" }, Tt = /* @__PURE__ */ K({
208
+ }, St = { class: "flex items-center gap-1" }, $t = { class: "py-4" }, Tt = /* @__PURE__ */ K({
209
209
  __name: "EventDialog",
210
210
  props: {
211
211
  resources: { default: () => [] }
212
212
  },
213
213
  setup(f, { expose: k }) {
214
- const y = f, { config: T } = $e(), { params: I } = Se(), a = Te(T.project), r = $(!1), c = $(null), s = $([]), w = $(!1), _ = $(null), h = $("");
214
+ const y = f, { config: T } = Se(), { params: I } = $e(), a = Te(T.project), l = S(!1), c = S(null), s = S([]), w = S(!1), _ = S(null), h = S("");
215
215
  Z("event", c);
216
216
  const B = U(() => {
217
217
  if (!c.value) return [];
218
218
  const p = c.value.resource?.interval || 60, n = [], [m, z] = c.value.startTime.split(":").map(Number), [A, C] = c.value.endTime.split(":").map(Number), O = m * 60 + z, t = A * 60 + C;
219
219
  for (let i = O; i < t; i += p) {
220
- const x = Math.floor(i / 60), g = i % 60, E = Math.min(i + p, t), P = Math.floor(E / 60), l = E % 60, V = `${x.toString().padStart(2, "0")}:${g.toString().padStart(2, "0")}`, H = `${P.toString().padStart(2, "0")}:${l.toString().padStart(2, "0")}`;
220
+ const x = Math.floor(i / 60), g = i % 60, E = Math.min(i + p, t), F = Math.floor(E / 60), r = E % 60, V = `${x.toString().padStart(2, "0")}:${g.toString().padStart(2, "0")}`, H = `${F.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}`;
221
221
  n.push({
222
222
  startTime: V,
223
223
  endTime: H,
@@ -249,7 +249,7 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
249
249
  threshold: 0.3,
250
250
  ignoreLocation: !0
251
251
  }).search(h.value).map((m) => m.item)), p;
252
- }), F = U(() => ({
252
+ }), N = U(() => ({
253
253
  spots: s.value.reduce((p, n) => p + (n.spots || 0), 0),
254
254
  bookings: s.value.length
255
255
  })), ee = (p) => {
@@ -257,7 +257,7 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
257
257
  }, J = () => {
258
258
  _.value = null;
259
259
  }, te = async (p) => {
260
- r.value = !0, c.value = p, _.value = null, h.value = "", await G();
260
+ l.value = !0, c.value = p, _.value = null, h.value = "", await G();
261
261
  }, G = async () => {
262
262
  if (c.value) {
263
263
  w.value = !0, s.value = [];
@@ -276,8 +276,7 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
276
276
  });
277
277
  let A = [];
278
278
  z.forEach((C) => {
279
- const O = C.reservations?.filter((t) => t.date === n) || [];
280
- console.log("dateReservations", O), O.forEach((t) => {
279
+ (C.reservations?.filter((t) => t.date === n) || []).forEach((t) => {
281
280
  const i = y.resources.find((x) => x.id === t.resourceId);
282
281
  (t.status === "approved" || t.status === "needs_approval") && A.push({
283
282
  customerInfo: C.customerInfo,
@@ -315,24 +314,24 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
315
314
  return k({
316
315
  openDialog: te
317
316
  }), (p, n) => {
318
- const m = N("DialogTitle"), z = N("DialogDescription"), A = N("DialogHeader"), C = N("Button"), O = N("DialogFooter"), t = N("DialogScrollContent"), i = N("Dialog");
317
+ const m = P("DialogTitle"), z = P("DialogDescription"), A = P("DialogHeader"), C = P("Button"), O = P("DialogFooter"), t = P("DialogScrollContent"), i = P("Dialog");
319
318
  return o(), Q(i, {
320
- open: r.value,
321
- "onUpdate:open": n[2] || (n[2] = (x) => r.value = x)
319
+ open: l.value,
320
+ "onUpdate:open": n[2] || (n[2] = (x) => l.value = x)
322
321
  }, {
323
- default: S(() => [
322
+ default: $(() => [
324
323
  d(t, { class: "sm:max-w-3xl" }, {
325
- default: S(() => [
324
+ default: $(() => [
326
325
  d(A, null, {
327
- default: S(() => [
326
+ default: $(() => [
328
327
  c.value?.date ? (o(), Q(m, { key: 0 }, {
329
- default: S(() => [
328
+ default: $(() => [
330
329
  ne(v(ae[new Date(c.value.date).getUTCDay()]) + " " + v(se[new Date(c.value.date).getUTCMonth()]) + " " + v(new Date(c.value.date).getUTCDate()) + ", " + v(new Date(c.value.date).getUTCFullYear()), 1)
331
330
  ]),
332
331
  _: 1
333
332
  })) : M("", !0),
334
333
  d(z, null, {
335
- default: S(() => [
334
+ default: $(() => [
336
335
  e("div", _t, [
337
336
  e("div", kt, [
338
337
  d(b(ge), { size: 14 }),
@@ -345,9 +344,9 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
345
344
  }, null, 4),
346
345
  e("span", null, v(c.value.resource.name), 1)
347
346
  ])) : M("", !0),
348
- e("div", $t, [
347
+ e("div", St, [
349
348
  d(b(he), { size: 14 }),
350
- e("span", null, v(F.value.spots) + " spots in " + v(F.value.bookings) + " reservations", 1)
349
+ e("span", null, v(N.value.spots) + " spots in " + v(N.value.bookings) + " reservations", 1)
351
350
  ])
352
351
  ])
353
352
  ]),
@@ -356,7 +355,7 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
356
355
  ]),
357
356
  _: 1
358
357
  }),
359
- e("div", St, [
358
+ e("div", $t, [
360
359
  B.value.length > 1 ? (o(), Q(Je, {
361
360
  key: 0,
362
361
  "time-slots": B.value,
@@ -377,12 +376,12 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
377
376
  }, null, 8, ["orders", "filtered-orders", "is-loading", "selected-time-slot", "search-query"])
378
377
  ]),
379
378
  d(O, null, {
380
- default: S(() => [
379
+ default: $(() => [
381
380
  d(C, {
382
381
  variant: "outline",
383
- onClick: n[1] || (n[1] = (x) => r.value = !1)
382
+ onClick: n[1] || (n[1] = (x) => l.value = !1)
384
383
  }, {
385
- default: S(() => [...n[3] || (n[3] = [
384
+ default: $(() => [...n[3] || (n[3] = [
386
385
  ne("Close", -1)
387
386
  ])]),
388
387
  _: 1
@@ -401,7 +400,7 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
401
400
  }), Dt = { class: "flex-1 border-r shadow-sm overflow-hidden min-h-[1536px]" }, Ct = { class: "relative h-full min-h-[1536px]" }, Mt = { class: "divide-y divide-input/80 h-full flex flex-col min-h-[1536px] border-y border-input/80" }, zt = { class: "absolute inset-0 pointer-events-none" }, Et = { class: "relative mr-3 h-full ml-2" }, It = ["onClick"], Bt = {
402
401
  key: 0,
403
402
  class: "absolute bottom-0 left-0 right-0 h-1 bg-black/20"
404
- }, Lt = { class: "flex items-start justify-between gap-2 mb-1" }, Ut = { class: "font-semibold text-sm leading-tight line-clamp-1 flex-1" }, jt = { class: "flex items-center gap-1 shrink-0" }, Pt = ["title"], Nt = { class: "font-medium" }, ye = /* @__PURE__ */ K({
403
+ }, Lt = { class: "flex items-start justify-between gap-2 mb-1" }, Ut = { class: "font-semibold text-sm leading-tight line-clamp-1 flex-1" }, jt = { class: "flex items-center gap-1 shrink-0" }, Pt = ["title"], Rt = { class: "font-medium" }, ye = /* @__PURE__ */ K({
405
404
  __name: "EventTimeline",
406
405
  props: {
407
406
  date: {},
@@ -410,12 +409,12 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
410
409
  resources: { default: () => [] }
411
410
  },
412
411
  setup(f) {
413
- const k = f, y = $(null), T = (r) => {
414
- const [c, s] = r.split(":").map(Number);
412
+ const k = f, y = S(null), T = (l) => {
413
+ const [c, s] = l.split(":").map(Number);
415
414
  return c * 60 + s;
416
415
  };
417
- U(() => !k.events || !k.resources ? [] : k.resources.map((r) => {
418
- const s = k.events.filter((w) => w.resourceId === r.id).map((w) => {
416
+ U(() => !k.events || !k.resources ? [] : k.resources.map((l) => {
417
+ const s = k.events.filter((w) => w.resourceId === l.id).map((w) => {
419
418
  const _ = T(w.startTime), B = T(w.endTime) - _, D = _ / 1440 * 100, W = B / 1440 * 100, L = (w.bookings ?? 0) > 0, j = w.maxBookings ? (w.bookings ?? 0) / w.maxBookings * 100 : 0;
420
419
  return {
421
420
  ...w,
@@ -428,26 +427,26 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
428
427
  };
429
428
  });
430
429
  return {
431
- resource: r,
430
+ resource: l,
432
431
  events: s
433
432
  };
434
433
  }));
435
- const I = U(() => k.events ? k.events.map((r) => {
436
- const c = T(r.startTime), w = T(r.endTime) - c, _ = c / 1440 * 100, h = w / 1440 * 100, B = (r.bookings ?? 0) > 0, D = r.maxBookings ? (r.bookings ?? 0) / r.maxBookings * 100 : 0;
434
+ const I = U(() => k.events ? k.events.map((l) => {
435
+ const c = T(l.startTime), w = T(l.endTime) - c, _ = c / 1440 * 100, h = w / 1440 * 100, B = (l.bookings ?? 0) > 0, D = l.maxBookings ? (l.bookings ?? 0) / l.maxBookings * 100 : 0;
437
436
  return {
438
- ...r,
437
+ ...l,
439
438
  top: `${_}%`,
440
439
  height: `${h}%`,
441
- color: r.resource?.color || "#3b82f6",
440
+ color: l.resource?.color || "#3b82f6",
442
441
  hasBookings: B,
443
442
  fillPercentage: D,
444
443
  isSmall: w < 60
445
444
  };
446
- }) : []), a = Array.from({ length: 24 }, (r, c) => ({
445
+ }) : []), a = Array.from({ length: 24 }, (l, c) => ({
447
446
  hour: c,
448
447
  label: `${c.toString().padStart(2, "0")}:00`
449
448
  }));
450
- return (r, c) => (o(), u(X, null, [
449
+ return (l, c) => (o(), u(X, null, [
451
450
  e("div", Dt, [
452
451
  e("div", Ct, [
453
452
  e("div", Mt, [
@@ -512,7 +511,7 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
512
511
  class: R(["flex items-center gap-1 px-2 py-0.5 rounded backdrop-blur-sm", { "bg-black/10": !s.isSmall }])
513
512
  }, [
514
513
  d(b(ge), { size: 10 }),
515
- e("span", Nt, v(s.startTime) + " – " + v(s.endTime), 1)
514
+ e("span", Rt, v(s.startTime) + " – " + v(s.endTime), 1)
516
515
  ], 2)
517
516
  ], 2)
518
517
  ], 2),
@@ -529,19 +528,19 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
529
528
  }, null, 8, ["resources"])
530
529
  ], 64));
531
530
  }
532
- }), Ot = { class: "sticky left-0 mt-auto z-10 divide-y divide-border/50 h-full flex flex-col min-h-[1536px] bg-input" }, Rt = { class: "flex-shrink-0 text-xs font-medium text-muted-foreground px-3 pb-3 border-r border-border/50 w-14" }, Ft = { class: "flex items-center gap-1.5" }, _e = /* @__PURE__ */ K({
531
+ }), Nt = { class: "sticky left-0 mt-auto z-10 divide-y divide-border/50 h-full flex flex-col min-h-[1536px] bg-input" }, Ot = { class: "flex-shrink-0 text-xs font-medium text-muted-foreground px-3 pb-3 border-r border-border/50 w-14" }, Ft = { class: "flex items-center gap-1.5" }, _e = /* @__PURE__ */ K({
533
532
  __name: "Event24hSidebar",
534
533
  setup(f) {
535
534
  const k = Array.from({ length: 24 }, (y, T) => ({
536
535
  hour: T,
537
536
  label: `${T.toString().padStart(2, "0")}:00`
538
537
  }));
539
- return (y, T) => (o(), u("div", Ot, [
538
+ return (y, T) => (o(), u("div", Nt, [
540
539
  (o(!0), u(X, null, Y(b(k), (I) => (o(), u("div", {
541
540
  key: I.hour,
542
541
  class: "flex-1 flex transition-all duration-200"
543
542
  }, [
544
- e("div", Rt, [
543
+ e("div", Ot, [
545
544
  e("div", Ft, [
546
545
  e("span", {
547
546
  class: R({ "-translate-y-1/2": I.hour !== 0 })
@@ -563,7 +562,7 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
563
562
  }
564
563
  },
565
564
  setup(f) {
566
- const k = $(Date.now());
565
+ const k = S(Date.now());
567
566
  let y;
568
567
  pe(() => {
569
568
  y = window.setInterval(() => {
@@ -576,12 +575,12 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
576
575
  const a = new Date(k.value);
577
576
  return `${(a.getHours() * 60 + a.getMinutes() + a.getSeconds() / 60) / 1440 * 100}%`;
578
577
  }), I = U(() => new Date(k.value).getFullYear() + "-" + (new Date(k.value).getMonth() + 1).toString().padStart(2, "0") + "-" + new Date(k.value).getDate().toString().padStart(2, "0"));
579
- return (a, r) => (o(), u("div", At, [
578
+ return (a, l) => (o(), u("div", At, [
580
579
  e("div", {
581
580
  class: "absolute left-0 right-0 h-0.5 bg-red-500 z-30 pointer-events-none transition-[top] duration-300 ease-linear",
582
581
  style: q({ top: T.value })
583
582
  }, [
584
- r[0] || (r[0] = e("div", { class: "absolute -left-2 -top-1.5 w-3 h-3 bg-red-500 rounded-full shadow-lg shadow-red-500/50" }, null, -1)),
583
+ l[0] || (l[0] = e("div", { class: "absolute -left-2 -top-1.5 w-3 h-3 bg-red-500 rounded-full shadow-lg shadow-red-500/50" }, null, -1)),
585
584
  f.currentDate && f.currentDate == I.value ? (o(), u("div", Vt, " Now ")) : M("", !0)
586
585
  ], 4)
587
586
  ]));
@@ -604,7 +603,7 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
604
603
  }, Gt = /* @__PURE__ */ K({
605
604
  __name: "EventView",
606
605
  setup(f) {
607
- const k = ie("activeDate", $(ue(de()))), y = ie("viewMode", $(1)), T = ie("events", $([])), I = ie("resources", $([])), a = $(null), r = $(!1), c = $(!1);
606
+ const k = ie("activeDate", S(ue(de()))), y = ie("viewMode", S(1)), T = ie("events", S([])), I = ie("resources", S([])), a = S(null), l = S(!1), c = S(!1);
608
607
  U(() => I.value.length > 1);
609
608
  const s = U(() => {
610
609
  const n = [], m = k.value;
@@ -635,13 +634,13 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
635
634
  }, 300));
636
635
  }, j = () => {
637
636
  D && (clearTimeout(D), D = null), B && (clearInterval(B), B = null);
638
- }, F = () => {
637
+ }, N = () => {
639
638
  if (!a.value) return;
640
639
  const { scrollLeft: n, scrollWidth: m, clientWidth: z } = a.value;
641
- r.value = n > 10, c.value = n < m - z - 10;
640
+ l.value = n > 10, c.value = n < m - z - 10;
642
641
  }, ee = (n) => {
643
642
  a.value && Math.abs(n.deltaY) > Math.abs(n.deltaX) && (n.preventDefault(), a.value.scrollBy({ left: n.deltaY, behavior: "auto" }));
644
- }, J = $(!1), te = $(0), G = $(0), ae = (n) => {
643
+ }, J = S(!1), te = S(0), G = S(0), ae = (n) => {
645
644
  !a.value || y.value === 1 || n.target.closest(".event-card") || (J.value = !0, te.value = n.pageX, G.value = a.value.scrollLeft, a.value.style.userSelect = "none", n.preventDefault());
646
645
  }, se = (n) => {
647
646
  if (!J.value || !a.value) return;
@@ -651,23 +650,23 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
651
650
  a.value && (J.value = !1, a.value.style.userSelect = "");
652
651
  };
653
652
  return pe(() => {
654
- a.value && (a.value.addEventListener("scroll", F), a.value.addEventListener("wheel", ee, { passive: !1 }), xe(() => {
655
- F(), setTimeout(F, 50), setTimeout(F, 150), setTimeout(F, 300), setTimeout(F, 500);
653
+ a.value && (a.value.addEventListener("scroll", N), a.value.addEventListener("wheel", ee, { passive: !1 }), xe(() => {
654
+ N(), setTimeout(N, 50), setTimeout(N, 150), setTimeout(N, 300), setTimeout(N, 500);
656
655
  })), document.addEventListener("mousemove", se), document.addEventListener("mouseup", p);
657
656
  }), ze(() => {
658
657
  document.removeEventListener("mousemove", se), document.removeEventListener("mouseup", p);
659
- }), re(y, () => {
658
+ }), le(y, () => {
660
659
  y.value > 1 ? xe(() => {
661
660
  setTimeout(() => {
662
661
  if (!a.value) return;
663
662
  const { scrollWidth: n, clientWidth: m } = a.value;
664
- n > m && (c.value = !0, r.value = !1);
663
+ n > m && (c.value = !0, l.value = !1);
665
664
  }, 100);
666
665
  }) : a.value && (a.value.style.cursor = "");
667
666
  }), fe(() => {
668
- j(), a.value && (a.value.removeEventListener("scroll", F), a.value.removeEventListener("wheel", ee));
667
+ j(), a.value && (a.value.removeEventListener("scroll", N), a.value.removeEventListener("wheel", ee));
669
668
  }), (n, m) => {
670
- const z = N("Button"), A = N("TooltipTrigger"), C = N("TooltipContent"), O = N("Tooltip");
669
+ const z = P("Button"), A = P("TooltipTrigger"), C = P("TooltipContent"), O = P("Tooltip");
671
670
  return b(y) === 1 ? (o(), u("div", Wt, [
672
671
  d(_e),
673
672
  d(ke, {
@@ -685,7 +684,7 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
685
684
  m[0] || (m[0] = e("span", null, "Scroll to view all days", -1)),
686
685
  d(b(ce), { size: 12 })
687
686
  ])) : M("", !0),
688
- r.value ? (o(), Q(z, {
687
+ l.value ? (o(), Q(z, {
689
688
  key: 1,
690
689
  variant: "outline",
691
690
  size: "icon",
@@ -696,7 +695,7 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
696
695
  onTouchend: j,
697
696
  class: "sticky top-1/2 left-2 -translate-y-1/2 z-40 h-10 w-10 rounded-full shadow-lg bg-background/95 backdrop-blur-sm hover:bg-background border-2"
698
697
  }, {
699
- default: S(() => [
698
+ default: $(() => [
700
699
  d(b(ve), { size: 20 })
701
700
  ]),
702
701
  _: 1
@@ -712,7 +711,7 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
712
711
  onTouchend: j,
713
712
  class: "sticky top-1/2 right-2 -translate-y-1/2 z-40 h-10 w-10 rounded-full shadow-lg bg-background/95 backdrop-blur-sm hover:bg-background border-2 float-right"
714
713
  }, {
715
- default: S(() => [
714
+ default: $(() => [
716
715
  d(b(ce), { size: 20 })
717
716
  ]),
718
717
  _: 1
@@ -725,7 +724,7 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
725
724
  ref_key: "scrollContainer",
726
725
  ref: a,
727
726
  class: "absolute inset-0 overflow-x-auto overflow-y-visible",
728
- onScroll: F,
727
+ onScroll: N,
729
728
  onMousedown: ae
730
729
  }, [
731
730
  e("div", Xt, [
@@ -763,9 +762,9 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
763
762
  e("div", { class: "text-[10px] text-muted-foreground/0 group-hover:text-muted-foreground/100 uppercase tracking-wide transition-all" }, " Click to view ")
764
763
  ], -1)),
765
764
  d(O, null, {
766
- default: S(() => [
765
+ default: $(() => [
767
766
  d(A, { "as-child": "" }, {
768
- default: S(() => [
767
+ default: $(() => [
769
768
  w(t).filter((x) => x.isException).length > 0 ? (o(), Q(b(Ie), {
770
769
  key: 0,
771
770
  class: "absolute top-3 right-3 size-4 text-orange-500"
@@ -774,7 +773,7 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
774
773
  _: 2
775
774
  }, 1024),
776
775
  d(C, null, {
777
- default: S(() => [...m[2] || (m[2] = [
776
+ default: $(() => [...m[2] || (m[2] = [
778
777
  e("p", null, " This day has exceptions applied to it. ", -1)
779
778
  ])]),
780
779
  _: 1
@@ -783,15 +782,15 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
783
782
  _: 2
784
783
  }, 1024),
785
784
  d(O, null, {
786
- default: S(() => [
785
+ default: $(() => [
787
786
  d(A, { "as-child": "" }, {
788
- default: S(() => [
787
+ default: $(() => [
789
788
  w(t).filter((x) => x.isException).length > 0 ? (o(), u("div", Kt)) : M("", !0)
790
789
  ]),
791
790
  _: 2
792
791
  }, 1024),
793
792
  d(C, null, {
794
- default: S(() => [...m[3] || (m[3] = [
793
+ default: $(() => [...m[3] || (m[3] = [
795
794
  e("p", null, " This day has exceptions applied to it. ", -1)
796
795
  ])]),
797
796
  _: 1
@@ -811,7 +810,7 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
811
810
  ]));
812
811
  };
813
812
  }
814
- }), Zt = /* @__PURE__ */ Ne(Gt, [["__scopeId", "data-v-99339cf2"]]), es = { class: "flex flex-col gap-2 md:gap-4 w-full h-full" }, ts = { class: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 px-1" }, ss = { class: "flex items-center justify-between sm:justify-start gap-4" }, os = { class: "flex flex-col" }, ns = { class: "flex items-center gap-2" }, as = { class: "text-lg sm:text-2xl font-bold tracking-tight truncate" }, ls = { class: "text-xs sm:text-sm text-muted-foreground ml-7 truncate" }, rs = { class: "flex items-center justify-between sm:justify-end gap-2" }, is = { class: "flex items-center gap-1 sm:mr-2" }, us = {
813
+ }), Zt = /* @__PURE__ */ Re(Gt, [["__scopeId", "data-v-99339cf2"]]), es = { class: "flex flex-col gap-2 md:gap-4 w-full h-full" }, ts = { class: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 px-1" }, ss = { class: "flex items-center justify-between sm:justify-start gap-4" }, os = { class: "flex flex-col" }, ns = { class: "flex items-center gap-2" }, as = { class: "text-lg sm:text-2xl font-bold tracking-tight truncate" }, rs = { class: "text-xs sm:text-sm text-muted-foreground ml-7 truncate" }, ls = { class: "flex items-center justify-between sm:justify-end gap-2" }, is = { class: "flex items-center gap-1 sm:mr-2" }, us = {
815
814
  key: 0,
816
815
  class: "flex items-center gap-2 px-1 overflow-x-auto pb-2 -mx-1 scrollbar-hide"
817
816
  }, ds = ["onClick"], cs = { class: "flex gap-4 flex-1 min-h-0 md:min-h-[1700px]" }, ms = { class: "hidden md:flex flex-shrink-0 flex-col gap-4" }, vs = {
@@ -826,21 +825,21 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
826
825
  }, ys = { class: "min-w-0 flex-1" }, _s = { class: "text-sm font-medium truncate text-muted-foreground" }, zs = /* @__PURE__ */ K({
827
826
  __name: "agenda",
828
827
  setup(f) {
829
- const { hasPermission: k } = Ue(), { params: y } = Se(), { config: T } = $e(), I = Te(T.project), a = $(ue(de())), r = $(1), c = $(typeof window < "u" ? window.innerWidth : 1024), s = U(() => c.value < 768), w = () => {
828
+ const { hasPermission: k } = Ue(), { params: y } = $e(), { config: T } = Se(), I = Te(T.project), a = S(ue(de())), l = S(1), c = S(typeof window < "u" ? window.innerWidth : 1024), s = U(() => c.value < 768), w = () => {
830
829
  c.value = window.innerWidth;
831
830
  };
832
831
  pe(() => {
833
832
  window.addEventListener("resize", w);
834
833
  }), fe(() => {
835
834
  window.removeEventListener("resize", w);
836
- }), re(s, (t) => {
837
- t && r.value !== 1 && (r.value = 1);
835
+ }), le(s, (t) => {
836
+ t && l.value !== 1 && (l.value = 1);
838
837
  }, { immediate: !0 });
839
- const _ = $(null), h = $(/* @__PURE__ */ new Map()), B = U(() => _.value?.resources || []), D = U(() => B.value.filter((t) => t.isActive)), W = U(() => B.value.filter((t) => !t.isActive)), L = $(null), j = $(!1);
840
- re(D, (t) => {
838
+ const _ = S(null), h = S(/* @__PURE__ */ new Map()), B = U(() => _.value?.resources || []), D = U(() => B.value.filter((t) => t.isActive)), W = U(() => B.value.filter((t) => !t.isActive)), L = S(null), j = S(!1);
839
+ le(D, (t) => {
841
840
  t.length > 0 && !L.value && (L.value = t[0].id);
842
841
  }, { immediate: !0 });
843
- const F = U(() => {
842
+ const N = U(() => {
844
843
  if (!L.value)
845
844
  return D.value.length > 0 ? [D.value[0]] : [];
846
845
  const t = D.value.find((i) => i.id === L.value);
@@ -848,7 +847,7 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
848
847
  }), ee = U(() => _.value?.pricingOptions?.find((i) => i.isDefault)?.duration || 30), J = (t) => {
849
848
  L.value = t;
850
849
  };
851
- re(a, () => {
850
+ le(a, () => {
852
851
  O();
853
852
  });
854
853
  const te = U(() => {
@@ -860,9 +859,9 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
860
859
  full: `${x} ${g} ${E}`
861
860
  };
862
861
  }), G = () => {
863
- a.value = a.value.subtract({ days: r.value });
862
+ a.value = a.value.subtract({ days: l.value });
864
863
  }, ae = () => {
865
- a.value = a.value.add({ days: r.value });
864
+ a.value = a.value.add({ days: l.value });
866
865
  }, se = () => {
867
866
  a.value = ue(de());
868
867
  }, p = (t) => {
@@ -871,56 +870,54 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
871
870
  }, n = (t, i) => (_.value?.exceptions || []).find((g) => i >= g.startDate && i <= g.endDate ? g.resourceIds === null ? !0 : g.resourceIds?.includes(t) : !1) || null, m = (t, i, x) => {
872
871
  const g = n(t.id, x);
873
872
  if (g)
874
- return g.isClosed ? [] : g.timeslots.map((l) => ({
875
- startTime: l.startTime,
876
- endTime: l.endTime,
873
+ return g.isClosed ? [] : g.timeslots.map((r) => ({
874
+ startTime: r.startTime,
875
+ endTime: r.endTime,
877
876
  isException: !0
878
877
  }));
879
- const E = i.getDay(), P = t.openingHours?.[E] || [];
880
- return P.length === 0 ? [] : P.map((l) => ({
881
- startTime: l.start,
882
- endTime: l.end,
878
+ const E = i.getDay(), F = t.openingHours?.[E] || [];
879
+ return F.length === 0 ? [] : F.map((r) => ({
880
+ startTime: r.start,
881
+ endTime: r.end,
883
882
  isException: !1
884
883
  }));
885
884
  }, z = (t, i, x, g) => {
886
885
  if (!_.value) return 0;
887
886
  const E = h.value.get(i);
888
- if (!E) return 0;
889
- const P = E.filter((l) => l.resourceId === t).reduce((l, V) => {
890
- const H = p(V.startTime), oe = p(V.endTime), le = p(x), me = p(g);
891
- return H < me && oe > le ? l + (V.reserved || 0) : l;
892
- }, 0);
893
- return P > 0 && console.log(`Found ${P} total bookings for ${t} on ${i} ${x}-${g}`), P;
887
+ return E ? E.filter((r) => r.resourceId === t).reduce((r, V) => {
888
+ const H = p(V.startTime), oe = p(V.endTime), re = p(x), me = p(g);
889
+ return H < me && oe > re ? r + (V.reserved || 0) : r;
890
+ }, 0) : 0;
894
891
  }, A = U(() => {
895
892
  if (!_.value) return [];
896
893
  h.value.size;
897
894
  let t = [], i = [];
898
- for (let g = 0; g < r.value; g++) {
895
+ for (let g = 0; g < l.value; g++) {
899
896
  const E = a.value.add({ days: g });
900
897
  i.push(E);
901
898
  }
902
- const x = F.value.length > 0 ? F.value : [];
899
+ const x = N.value.length > 0 ? N.value : [];
903
900
  return x.length === 0 ? [] : (i.forEach((g) => {
904
901
  let E = new Date(g.year, g.month - 1, g.day);
905
- const P = `${g.year}-${String(g.month).padStart(2, "0")}-${String(g.day).padStart(2, "0")}`;
906
- x.forEach((l) => {
907
- const V = m(l, E, P);
902
+ const F = `${g.year}-${String(g.month).padStart(2, "0")}-${String(g.day).padStart(2, "0")}`;
903
+ x.forEach((r) => {
904
+ const V = m(r, E, F);
908
905
  t = t.concat(V.map((H, oe) => {
909
- const le = z(l.id, P, H.startTime, H.endTime);
906
+ const re = z(r.id, F, H.startTime, H.endTime);
910
907
  return {
911
- id: `block-${P}-${l.id}-${oe}`,
908
+ id: `block-${F}-${r.id}-${oe}`,
912
909
  title: _.value.serviceName,
913
- date: P,
910
+ date: F,
914
911
  startTime: H.startTime,
915
912
  endTime: H.endTime,
916
- theme: l.color || "#3b82f6",
917
- bookings: le,
918
- maxBookings: l.capacity,
913
+ theme: r.color || "#3b82f6",
914
+ bookings: re,
915
+ maxBookings: r.capacity,
919
916
  isException: H.isException || !1,
920
- resourceId: l.id,
921
- resource: l,
917
+ resourceId: r.id,
918
+ resource: r,
922
919
  // Store interval and duration for booking slot calculation
923
- interval: l.interval || 30,
920
+ interval: r.interval || 30,
924
921
  serviceDuration: ee.value
925
922
  };
926
923
  }));
@@ -932,15 +929,15 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
932
929
  const t = y.value.id, i = a.value;
933
930
  h.value.clear();
934
931
  const x = [];
935
- for (let g = 0; g < r.value; g++) {
936
- const E = i.add({ days: g }), P = `${E.year}-${String(E.month).padStart(2, "0")}-${String(E.day).padStart(2, "0")}`, l = `${t}_${P}`;
932
+ for (let g = 0; g < l.value; g++) {
933
+ const E = i.add({ days: g }), F = `${E.year}-${String(E.month).padStart(2, "0")}-${String(E.day).padStart(2, "0")}`, r = `${t}_${F}`;
937
934
  x.push(
938
- I.get(T.reservedSpotsCollection, l).then((V) => {
935
+ I.get(T.reservedSpotsCollection, r).then((V) => {
939
936
  if (V) {
940
937
  let H = [];
941
938
  for (const oe of D.value) {
942
- const le = V?.[oe.id] || {};
943
- Object.entries(le).forEach(([me, De]) => {
939
+ const re = V?.[oe.id] || {};
940
+ Object.entries(re).forEach(([me, De]) => {
944
941
  const [Ce, Me] = me.split("-");
945
942
  H.push({
946
943
  resourceId: oe.id,
@@ -950,20 +947,20 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
950
947
  });
951
948
  });
952
949
  }
953
- h.value.set(P, H);
950
+ h.value.set(F, H);
954
951
  }
955
952
  }).catch(() => {
956
953
  })
957
954
  );
958
955
  }
959
- await Promise.all(x), console.log("Loaded reserved spots:", h.value);
956
+ await Promise.all(x);
960
957
  };
961
- return C(), O(), re(r, () => {
958
+ return C(), O(), le(l, () => {
962
959
  O();
963
- }), Z("agendaData", _), Z("activeDate", a), Z("viewMode", r), Z("events", A), Z("resources", F), Z("allResources", D), (t, i) => {
964
- const x = N("Button"), g = N("SegmentedControlButton"), E = N("SegmentedControl"), P = N("Calendar");
960
+ }), Z("agendaData", _), Z("activeDate", a), Z("viewMode", l), Z("events", A), Z("resources", N), Z("allResources", D), (t, i) => {
961
+ const x = P("Button"), g = P("SegmentedControlButton"), E = P("SegmentedControl"), F = P("Calendar");
965
962
  return o(), Q(Le, null, {
966
- default: S(() => [
963
+ default: $(() => [
967
964
  e("div", es, [
968
965
  e("div", ts, [
969
966
  e("div", ss, [
@@ -975,11 +972,11 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
975
972
  }),
976
973
  e("h2", as, v(te.value.full), 1)
977
974
  ]),
978
- e("p", ls, v(_.value?.serviceName), 1)
975
+ e("p", rs, v(_.value?.serviceName), 1)
979
976
  ]),
980
977
  s.value && b(k)("manage-reservations") ? (o(), Q(be, { key: 0 })) : M("", !0)
981
978
  ]),
982
- e("div", rs, [
979
+ e("div", ls, [
983
980
  e("div", is, [
984
981
  d(x, {
985
982
  variant: "outline",
@@ -987,7 +984,7 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
987
984
  class: "size-8 sm:size-9",
988
985
  onClick: G
989
986
  }, {
990
- default: S(() => [
987
+ default: $(() => [
991
988
  d(b(ve), { size: 16 })
992
989
  ]),
993
990
  _: 1
@@ -998,7 +995,7 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
998
995
  class: "h-8 sm:h-9 px-2 sm:px-3 text-xs sm:text-sm",
999
996
  onClick: se
1000
997
  }, {
1001
- default: S(() => [...i[3] || (i[3] = [
998
+ default: $(() => [...i[3] || (i[3] = [
1002
999
  ne(" Today ", -1)
1003
1000
  ])]),
1004
1001
  _: 1
@@ -1009,7 +1006,7 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
1009
1006
  class: "size-8 sm:size-9",
1010
1007
  onClick: ae
1011
1008
  }, {
1012
- default: S(() => [
1009
+ default: $(() => [
1013
1010
  d(b(ce), { size: 16 })
1014
1011
  ]),
1015
1012
  _: 1
@@ -1017,24 +1014,24 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
1017
1014
  ]),
1018
1015
  s.value ? M("", !0) : (o(), Q(E, {
1019
1016
  key: 0,
1020
- modelValue: r.value,
1021
- "onUpdate:modelValue": i[0] || (i[0] = (l) => r.value = l)
1017
+ modelValue: l.value,
1018
+ "onUpdate:modelValue": i[0] || (i[0] = (r) => l.value = r)
1022
1019
  }, {
1023
- default: S(() => [
1020
+ default: $(() => [
1024
1021
  d(g, { value: 1 }, {
1025
- default: S(() => [...i[4] || (i[4] = [
1022
+ default: $(() => [...i[4] || (i[4] = [
1026
1023
  e("span", { class: "whitespace-nowrap" }, "1 Day", -1)
1027
1024
  ])]),
1028
1025
  _: 1
1029
1026
  }),
1030
1027
  d(g, { value: 3 }, {
1031
- default: S(() => [...i[5] || (i[5] = [
1028
+ default: $(() => [...i[5] || (i[5] = [
1032
1029
  e("span", { class: "whitespace-nowrap" }, "3 Days", -1)
1033
1030
  ])]),
1034
1031
  _: 1
1035
1032
  }),
1036
1033
  d(g, { value: 7 }, {
1037
- default: S(() => [...i[6] || (i[6] = [
1034
+ default: $(() => [...i[6] || (i[6] = [
1038
1035
  e("span", { class: "whitespace-nowrap" }, "7 Days", -1)
1039
1036
  ])]),
1040
1037
  _: 1
@@ -1046,26 +1043,26 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
1046
1043
  ])
1047
1044
  ]),
1048
1045
  s.value && D.value.length > 0 ? (o(), u("div", us, [
1049
- (o(!0), u(X, null, Y(D.value, (l) => (o(), u("button", {
1050
- key: l.id,
1046
+ (o(!0), u(X, null, Y(D.value, (r) => (o(), u("button", {
1047
+ key: r.id,
1051
1048
  class: R(["flex items-center gap-2 px-3 py-1.5 rounded-full border text-sm whitespace-nowrap transition-colors flex-shrink-0", {
1052
- "bg-primary text-primary-foreground border-primary": L.value === l.id,
1053
- "bg-background hover:bg-muted": L.value !== l.id
1049
+ "bg-primary text-primary-foreground border-primary": L.value === r.id,
1050
+ "bg-background hover:bg-muted": L.value !== r.id
1054
1051
  }]),
1055
- onClick: (V) => J(l.id)
1052
+ onClick: (V) => J(r.id)
1056
1053
  }, [
1057
1054
  e("div", {
1058
1055
  class: "size-5 rounded-full flex items-center justify-center text-white text-[10px] font-medium",
1059
- style: q({ backgroundColor: L.value === l.id ? "rgba(255,255,255,0.3)" : l.color || "#6b7280" })
1060
- }, v(l.avatarLabel || l.name.charAt(0).toUpperCase()), 5),
1061
- e("span", null, v(l.name), 1)
1056
+ style: q({ backgroundColor: L.value === r.id ? "rgba(255,255,255,0.3)" : r.color || "#6b7280" })
1057
+ }, v(r.avatarLabel || r.name.charAt(0).toUpperCase()), 5),
1058
+ e("span", null, v(r.name), 1)
1062
1059
  ], 10, ds))), 128))
1063
1060
  ])) : M("", !0),
1064
1061
  e("div", cs, [
1065
1062
  e("div", ms, [
1066
- d(P, {
1063
+ d(F, {
1067
1064
  modelValue: a.value,
1068
- "onUpdate:modelValue": i[1] || (i[1] = (l) => a.value = l),
1065
+ "onUpdate:modelValue": i[1] || (i[1] = (r) => a.value = r),
1069
1066
  "weekday-format": "short",
1070
1067
  class: "rounded-md border"
1071
1068
  }, null, 8, ["modelValue"]),
@@ -1074,29 +1071,29 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
1074
1071
  e("span", { class: "text-sm font-medium" }, "Resources")
1075
1072
  ], -1)),
1076
1073
  e("div", ps, [
1077
- (o(!0), u(X, null, Y(D.value, (l) => (o(), u("div", {
1078
- key: l.id,
1074
+ (o(!0), u(X, null, Y(D.value, (r) => (o(), u("div", {
1075
+ key: r.id,
1079
1076
  class: R(["flex items-center gap-2 p-2 rounded-md hover:bg-muted cursor-pointer transition-colors", {
1080
- "bg-muted ring-2 ring-primary/20": L.value === l.id,
1081
- "opacity-50": L.value && L.value !== l.id
1077
+ "bg-muted ring-2 ring-primary/20": L.value === r.id,
1078
+ "opacity-50": L.value && L.value !== r.id
1082
1079
  }]),
1083
- onClick: (V) => J(l.id)
1080
+ onClick: (V) => J(r.id)
1084
1081
  }, [
1085
1082
  e("div", {
1086
1083
  class: "size-7 rounded-full flex items-center justify-center text-white text-xs font-medium flex-shrink-0",
1087
- style: q({ backgroundColor: l.color || "#6b7280" })
1088
- }, v(l.avatarLabel || l.name.charAt(0).toUpperCase()), 5),
1084
+ style: q({ backgroundColor: r.color || "#6b7280" })
1085
+ }, v(r.avatarLabel || r.name.charAt(0).toUpperCase()), 5),
1089
1086
  e("div", gs, [
1090
- e("div", hs, v(l.name), 1)
1087
+ e("div", hs, v(r.name), 1)
1091
1088
  ]),
1092
1089
  e("div", {
1093
- class: R(["size-2 rounded-full flex-shrink-0", L.value === l.id ? "bg-primary" : "bg-muted-foreground/30"])
1090
+ class: R(["size-2 rounded-full flex-shrink-0", L.value === r.id ? "bg-primary" : "bg-muted-foreground/30"])
1094
1091
  }, null, 2)
1095
1092
  ], 10, fs))), 128)),
1096
1093
  W.value.length > 0 ? (o(), u("div", xs, [
1097
1094
  e("button", {
1098
1095
  class: "flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground w-full py-1 transition-colors",
1099
- onClick: i[2] || (i[2] = (l) => j.value = !j.value)
1096
+ onClick: i[2] || (i[2] = (r) => j.value = !j.value)
1100
1097
  }, [
1101
1098
  d(b(ce), {
1102
1099
  size: 14,
@@ -1105,16 +1102,16 @@ const Oe = { class: "mb-6" }, Re = { class: "flex items-end gap-px h-24 bg-muted
1105
1102
  e("span", null, "Inactive (" + v(W.value.length) + ")", 1)
1106
1103
  ]),
1107
1104
  j.value ? (o(), u("div", bs, [
1108
- (o(!0), u(X, null, Y(W.value, (l) => (o(), u("div", {
1109
- key: l.id,
1105
+ (o(!0), u(X, null, Y(W.value, (r) => (o(), u("div", {
1106
+ key: r.id,
1110
1107
  class: "flex items-center gap-2 p-2 rounded-md opacity-50"
1111
1108
  }, [
1112
1109
  e("div", {
1113
1110
  class: "size-7 rounded-full flex items-center justify-center text-white text-xs font-medium flex-shrink-0 grayscale",
1114
- style: q({ backgroundColor: l.color || "#6b7280" })
1115
- }, v(l.avatarLabel || l.name.charAt(0).toUpperCase()), 5),
1111
+ style: q({ backgroundColor: r.color || "#6b7280" })
1112
+ }, v(r.avatarLabel || r.name.charAt(0).toUpperCase()), 5),
1116
1113
  e("div", ys, [
1117
- e("div", _s, v(l.name), 1)
1114
+ e("div", _s, v(r.name), 1)
1118
1115
  ])
1119
1116
  ]))), 128))
1120
1117
  ])) : M("", !0)