@innosolutions/inno-calendar 1.0.38 → 1.0.40

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 (36) hide show
  1. package/dist/agenda-widget-B5Sgvvry.cjs +2 -0
  2. package/dist/agenda-widget-B5Sgvvry.cjs.map +1 -0
  3. package/dist/{agenda-widget-CNUXKiQT.js → agenda-widget-C5uR9Raa.js} +1055 -1052
  4. package/dist/agenda-widget-C5uR9Raa.js.map +1 -0
  5. package/dist/components/index.cjs +1 -1
  6. package/dist/components/index.mjs +2 -2
  7. package/dist/components/inno-calendar.d.ts +11 -0
  8. package/dist/components/inno-calendar.d.ts.map +1 -1
  9. package/dist/components/primitives/index.d.ts +1 -0
  10. package/dist/components/primitives/index.d.ts.map +1 -1
  11. package/dist/components/primitives/multi-day-banner.d.ts +17 -3
  12. package/dist/components/primitives/multi-day-banner.d.ts.map +1 -1
  13. package/dist/components/primitives/week-all-day-row.d.ts +40 -0
  14. package/dist/components/primitives/week-all-day-row.d.ts.map +1 -0
  15. package/dist/components/views/day-events-expansion.d.ts.map +1 -1
  16. package/dist/components/views/day-view.d.ts.map +1 -1
  17. package/dist/components/views/week-view.d.ts.map +1 -1
  18. package/dist/index.cjs +1 -1
  19. package/dist/index.mjs +3 -3
  20. package/dist/presets/index.cjs +1 -1
  21. package/dist/presets/index.mjs +1 -1
  22. package/dist/{tailwind-calendar-BqhSHRk0.cjs → tailwind-calendar-B2vvMCsL.cjs} +2 -2
  23. package/dist/{tailwind-calendar-BqhSHRk0.cjs.map → tailwind-calendar-B2vvMCsL.cjs.map} +1 -1
  24. package/dist/{tailwind-calendar-BvWm9ry9.js → tailwind-calendar-C1_6GoL0.js} +2 -2
  25. package/dist/{tailwind-calendar-BvWm9ry9.js.map → tailwind-calendar-C1_6GoL0.js.map} +1 -1
  26. package/dist/week-view-DBsCYSce.cjs +11 -0
  27. package/dist/week-view-DBsCYSce.cjs.map +1 -0
  28. package/dist/{week-view-BGthazCB.js → week-view-Dh-gHd0m.js} +1486 -1189
  29. package/dist/week-view-Dh-gHd0m.js.map +1 -0
  30. package/package.json +2 -2
  31. package/dist/agenda-widget-BsRtRyZ3.cjs +0 -2
  32. package/dist/agenda-widget-BsRtRyZ3.cjs.map +0 -1
  33. package/dist/agenda-widget-CNUXKiQT.js.map +0 -1
  34. package/dist/week-view-BGthazCB.js.map +0 -1
  35. package/dist/week-view-DOvr2VIq.cjs +0 -11
  36. package/dist/week-view-DOvr2VIq.cjs.map +0 -1
@@ -1,11 +1,11 @@
1
- import { jsx as e, jsxs as n, Fragment as oe } from "react/jsx-runtime";
2
- import { o as Oe, c as Ke, C as qe, I as Je, j as Xe } from "./use-calendar-DR2emWYC.js";
3
- import { useCallback as se, useState as ae, useEffect as he, forwardRef as fe, useRef as ke, useMemo as O, useLayoutEffect as Qe, useImperativeHandle as Ze } from "react";
4
- import { c as m } from "./index-DtaLkIY8.js";
5
- import { P as _e, i as Pe, h as Re, m as Z, q as et, r as tt, B as ie, s as rt, t as Ce, k as ee, n as te, l as re, d as nt, C as ot, M as De, A as st, W as at, c as it, u as lt } from "./week-view-BGthazCB.js";
6
- import { D as ct, S as dt } from "./slot-selection-context-D2eu2o-7.js";
7
- import { isToday as q, startOfDay as ge, endOfDay as Ve, getYearMonths as ut, generateMonthGrid as ht, getEventsForDay as mt, addDays as Ue, formatDateISO as ft } from "./utils.mjs";
8
- function gt({ view: t, className: r = "" }) {
1
+ import { jsx as e, jsxs as n, Fragment as ne } from "react/jsx-runtime";
2
+ import { o as Oe, c as qe, C as Je, I as Xe, j as Qe } from "./use-calendar-DR2emWYC.js";
3
+ import { useCallback as oe, useState as se, useEffect as he, forwardRef as ge, useRef as Ne, useMemo as B, useLayoutEffect as Ze, useImperativeHandle as et } from "react";
4
+ import { c as h } from "./index-DtaLkIY8.js";
5
+ import { P as _e, i as Pe, h as Re, m as Q, q as tt, r as rt, B as ae, s as nt, t as Ce, k as Z, n as ee, l as te, d as ot, C as st, M as De, A as at, W as it, c as lt, u as ct } from "./week-view-Dh-gHd0m.js";
6
+ import { D as dt, S as ut } from "./slot-selection-context-D2eu2o-7.js";
7
+ import { isToday as q, startOfDay as xe, endOfDay as Ve, getYearMonths as ht, generateMonthGrid as mt, getEventsForDay as ft, addDays as Ue, formatDateISO as gt } from "./utils.mjs";
8
+ function xt({ view: t, className: r = "" }) {
9
9
  return /* @__PURE__ */ e(
10
10
  "div",
11
11
  {
@@ -30,48 +30,48 @@ function gt({ view: t, className: r = "" }) {
30
30
  );
31
31
  }
32
32
  function Me({ view: t, className: r }) {
33
- return /* @__PURE__ */ e(gt, { view: t, className: r });
33
+ return /* @__PURE__ */ e(xt, { view: t, className: r });
34
34
  }
35
- function Vr(t) {
35
+ function Ur(t) {
36
36
  const {
37
37
  events: r,
38
38
  resources: o,
39
39
  scheduleTypes: s,
40
40
  initialView: a = "week",
41
41
  initialDate: i,
42
- initialFilters: x,
43
- preferences: g,
42
+ initialFilters: g,
43
+ preferences: f,
44
44
  locale: c,
45
- slots: d,
46
- renderEvent: w,
47
- onViewChange: C,
48
- onDateChange: z,
49
- onEventClick: I,
50
- onSlotSelect: H,
51
- onFiltersChange: N,
52
- className: p,
53
- children: D
54
- } = t, k = Oe();
55
- if (k)
56
- return /* @__PURE__ */ e("div", { className: p, style: { position: "relative" }, children: D ?? /* @__PURE__ */ e(Me, { view: k.view, className: p }) });
57
- const S = Ke({
45
+ slots: x,
46
+ renderEvent: y,
47
+ onViewChange: p,
48
+ onDateChange: M,
49
+ onEventClick: A,
50
+ onSlotSelect: z,
51
+ onFiltersChange: C,
52
+ className: S,
53
+ children: L
54
+ } = t, w = Oe();
55
+ if (w)
56
+ return /* @__PURE__ */ e("div", { className: S, style: { position: "relative" }, children: L ?? /* @__PURE__ */ e(Me, { view: w.view, className: S }) });
57
+ const T = qe({
58
58
  events: r,
59
59
  resources: o,
60
60
  scheduleTypes: s,
61
61
  initialView: a,
62
62
  initialDate: i,
63
- initialFilters: x,
64
- preferences: g,
63
+ initialFilters: g,
64
+ preferences: f,
65
65
  locale: c,
66
- onViewChange: C,
67
- onDateChange: z,
68
- onEventClick: I,
69
- onSlotSelect: H,
70
- onFiltersChange: N
66
+ onViewChange: p,
67
+ onDateChange: M,
68
+ onEventClick: A,
69
+ onSlotSelect: z,
70
+ onFiltersChange: C
71
71
  });
72
- return /* @__PURE__ */ e(qe, { value: S, children: /* @__PURE__ */ e("div", { className: p, style: { position: "relative" }, children: D ?? /* @__PURE__ */ e(Me, { view: S.view, className: p }) }) });
72
+ return /* @__PURE__ */ e(Je, { value: T, children: /* @__PURE__ */ e("div", { className: S, style: { position: "relative" }, children: L ?? /* @__PURE__ */ e(Me, { view: T.view, className: S }) }) });
73
73
  }
74
- function xt({ className: t }) {
74
+ function pt({ className: t }) {
75
75
  return /* @__PURE__ */ n(
76
76
  "svg",
77
77
  {
@@ -112,7 +112,7 @@ function Ye({ className: t }) {
112
112
  }
113
113
  );
114
114
  }
115
- function me({ className: t }) {
115
+ function fe({ className: t }) {
116
116
  return /* @__PURE__ */ n(
117
117
  "svg",
118
118
  {
@@ -131,7 +131,7 @@ function me({ className: t }) {
131
131
  }
132
132
  );
133
133
  }
134
- function pt({ className: t }) {
134
+ function vt({ className: t }) {
135
135
  return /* @__PURE__ */ n(
136
136
  "svg",
137
137
  {
@@ -166,7 +166,7 @@ function de({ className: t }) {
166
166
  }
167
167
  );
168
168
  }
169
- function vt({ className: t }) {
169
+ function wt({ className: t }) {
170
170
  return /* @__PURE__ */ n(
171
171
  "svg",
172
172
  {
@@ -185,7 +185,7 @@ function vt({ className: t }) {
185
185
  }
186
186
  );
187
187
  }
188
- function wt({ className: t }) {
188
+ function bt({ className: t }) {
189
189
  return /* @__PURE__ */ e(
190
190
  "svg",
191
191
  {
@@ -201,7 +201,7 @@ function wt({ className: t }) {
201
201
  }
202
202
  );
203
203
  }
204
- function bt({ className: t }) {
204
+ function yt({ className: t }) {
205
205
  return /* @__PURE__ */ n(
206
206
  "svg",
207
207
  {
@@ -222,7 +222,7 @@ function bt({ className: t }) {
222
222
  }
223
223
  );
224
224
  }
225
- function yt({ className: t }) {
225
+ function kt({ className: t }) {
226
226
  return /* @__PURE__ */ n(
227
227
  "svg",
228
228
  {
@@ -241,7 +241,7 @@ function yt({ className: t }) {
241
241
  }
242
242
  );
243
243
  }
244
- function kt({ className: t }) {
244
+ function Nt({ className: t }) {
245
245
  return /* @__PURE__ */ n(
246
246
  "svg",
247
247
  {
@@ -262,7 +262,7 @@ function kt({ className: t }) {
262
262
  }
263
263
  );
264
264
  }
265
- function Nt({ className: t }) {
265
+ function Ct({ className: t }) {
266
266
  return /* @__PURE__ */ n(
267
267
  "svg",
268
268
  {
@@ -295,12 +295,12 @@ function le({ className: t }) {
295
295
  strokeWidth: "2",
296
296
  strokeLinecap: "round",
297
297
  strokeLinejoin: "round",
298
- className: m("animate-spin", t),
298
+ className: h("animate-spin", t),
299
299
  children: /* @__PURE__ */ e("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
300
300
  }
301
301
  );
302
302
  }
303
- const Ct = {
303
+ const Dt = {
304
304
  edit: "Edit",
305
305
  delete: "Delete",
306
306
  cancel: "Cancel Event",
@@ -325,15 +325,15 @@ const Ct = {
325
325
  acceptAllEvents: "Accept all events",
326
326
  deleteConfirmTitle: "Delete Event",
327
327
  deleteConfirmDescription: "Are you sure you want to delete this event? This action cannot be undone."
328
- }, ue = fe(
329
- ({ onClick: t, label: r, children: o, className: s, variant: a = "ghost", ...i }, x) => /* @__PURE__ */ n(ee, { children: [
330
- /* @__PURE__ */ e(te, { asChild: !0, children: /* @__PURE__ */ e(
328
+ }, ue = ge(
329
+ ({ onClick: t, label: r, children: o, className: s, variant: a = "ghost", ...i }, g) => /* @__PURE__ */ n(Z, { children: [
330
+ /* @__PURE__ */ e(ee, { asChild: !0, children: /* @__PURE__ */ e(
331
331
  "button",
332
332
  {
333
333
  type: "button",
334
- ref: x,
334
+ ref: g,
335
335
  onClick: t,
336
- className: m(
336
+ className: h(
337
337
  "h-8 w-8 rounded-full flex items-center justify-center transition-colors",
338
338
  a === "ghost" && "hover:bg-zinc-100 dark:hover:bg-zinc-800 text-zinc-600 dark:text-zinc-400",
339
339
  a === "destructive" && "hover:bg-red-50 dark:hover:bg-red-950/30 text-zinc-600 dark:text-zinc-400 hover:text-red-600",
@@ -344,16 +344,16 @@ const Ct = {
344
344
  children: o
345
345
  }
346
346
  ) }),
347
- /* @__PURE__ */ e(re, { side: "bottom", className: "text-xs", children: r })
347
+ /* @__PURE__ */ e(te, { side: "bottom", className: "text-xs", children: r })
348
348
  ] })
349
349
  );
350
350
  ue.displayName = "IconButton";
351
- function Dt({ src: t, alt: r, initials: o, className: s, isClient: a }) {
352
- const [i, x] = ae(!1);
351
+ function Mt({ src: t, alt: r, initials: o, className: s, isClient: a }) {
352
+ const [i, g] = se(!1);
353
353
  return /* @__PURE__ */ e(
354
354
  "div",
355
355
  {
356
- className: m(
356
+ className: h(
357
357
  "relative h-7 w-7 rounded-full overflow-hidden shrink-0",
358
358
  s
359
359
  ),
@@ -363,12 +363,12 @@ function Dt({ src: t, alt: r, initials: o, className: s, isClient: a }) {
363
363
  src: t,
364
364
  alt: r,
365
365
  className: "h-full w-full object-cover",
366
- onError: () => x(!0)
366
+ onError: () => g(!0)
367
367
  }
368
368
  ) : /* @__PURE__ */ e(
369
369
  "div",
370
370
  {
371
- className: m(
371
+ className: h(
372
372
  "h-full w-full flex items-center justify-center text-[10px] font-medium",
373
373
  a ? "bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300" : "bg-zinc-200 dark:bg-zinc-700 text-zinc-700 dark:text-zinc-300"
374
374
  ),
@@ -383,47 +383,47 @@ function Se({
383
383
  isEventCanceled: r = !1,
384
384
  labels: o
385
385
  }) {
386
- const s = t.name || "Unknown", a = s.split(" ").map((z) => z[0]).join("").toUpperCase().slice(0, 2), i = t.isOrganizer ?? !1, x = t.isConfirmed, g = x === !0, c = x === !1, d = t.isClient ?? !1, w = t.profilePicture || t.avatar, C = r;
386
+ const s = t.name || "Unknown", a = s.split(" ").map((M) => M[0]).join("").toUpperCase().slice(0, 2), i = t.isOrganizer ?? !1, g = t.isConfirmed, f = g === !0, c = g === !1, x = t.isClient ?? !1, y = t.profilePicture || t.avatar, p = r;
387
387
  return /* @__PURE__ */ n(
388
388
  "div",
389
389
  {
390
- className: m(
390
+ className: h(
391
391
  "flex items-center gap-3 py-0",
392
- C && "opacity-60"
392
+ p && "opacity-60"
393
393
  ),
394
394
  children: [
395
395
  /* @__PURE__ */ n("div", { className: "relative", children: [
396
396
  /* @__PURE__ */ e(
397
- Dt,
397
+ Mt,
398
398
  {
399
- src: w,
399
+ src: y,
400
400
  alt: s,
401
401
  initials: a,
402
- isClient: d,
403
- className: m(C && "grayscale")
402
+ isClient: x,
403
+ className: h(p && "grayscale")
404
404
  }
405
405
  ),
406
- C || c ? /* @__PURE__ */ e("div", { className: "absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-white dark:bg-zinc-900 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "h-3 w-3 rounded-full bg-red-100 dark:bg-red-900/50 flex items-center justify-center", children: /* @__PURE__ */ e(me, { className: "h-2 w-2 text-red-600 dark:text-red-400 stroke-[3]" }) }) }) : g ? /* @__PURE__ */ e("div", { className: "absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-white dark:bg-zinc-900 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "h-3 w-3 rounded-full bg-green-100 dark:bg-green-900/50 flex items-center justify-center", children: /* @__PURE__ */ e(de, { className: "h-2 w-2 text-green-600 dark:text-green-400 stroke-[3]" }) }) }) : null
406
+ p || c ? /* @__PURE__ */ e("div", { className: "absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-white dark:bg-zinc-900 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "h-3 w-3 rounded-full bg-red-100 dark:bg-red-900/50 flex items-center justify-center", children: /* @__PURE__ */ e(fe, { className: "h-2 w-2 text-red-600 dark:text-red-400 stroke-[3]" }) }) }) : f ? /* @__PURE__ */ e("div", { className: "absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-white dark:bg-zinc-900 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "h-3 w-3 rounded-full bg-green-100 dark:bg-green-900/50 flex items-center justify-center", children: /* @__PURE__ */ e(de, { className: "h-2 w-2 text-green-600 dark:text-green-400 stroke-[3]" }) }) }) : null
407
407
  ] }),
408
408
  /* @__PURE__ */ n("div", { className: "!h-fit min-w-0 gap-0", children: [
409
409
  /* @__PURE__ */ e("div", { className: "gap-0", children: /* @__PURE__ */ e(
410
410
  "span",
411
411
  {
412
- className: m(
412
+ className: h(
413
413
  "text-sm text-zinc-900 dark:text-zinc-100 truncate",
414
- C && "line-through text-zinc-500 dark:text-zinc-500"
414
+ p && "line-through text-zinc-500 dark:text-zinc-500"
415
415
  ),
416
416
  children: s
417
417
  }
418
418
  ) }),
419
- d && /* @__PURE__ */ e("div", { className: "text-[10px] px-1.5 w-fit py-0.5 rounded bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300 font-medium", children: o.client }),
420
- i && !C && /* @__PURE__ */ e("div", { className: "text-xs text-zinc-500", children: o.organizer })
419
+ x && /* @__PURE__ */ e("div", { className: "text-[10px] px-1.5 w-fit py-0.5 rounded bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300 font-medium", children: o.client }),
420
+ i && !p && /* @__PURE__ */ e("div", { className: "text-xs text-zinc-500", children: o.organizer })
421
421
  ] })
422
422
  ]
423
423
  }
424
424
  );
425
425
  }
426
- function Mt({
426
+ function St({
427
427
  open: t,
428
428
  onOpenChange: r,
429
429
  title: o,
@@ -454,15 +454,15 @@ function Mt({
454
454
  ] }) })
455
455
  ] }) : null;
456
456
  }
457
- function St({
457
+ function Et({
458
458
  open: t,
459
459
  onOpenChange: r,
460
460
  title: o,
461
461
  description: s,
462
462
  cancelLabel: a,
463
463
  confirmLabel: i,
464
- onConfirm: x,
465
- isLoading: g
464
+ onConfirm: g,
465
+ isLoading: f
466
466
  }) {
467
467
  return t ? /* @__PURE__ */ n("div", { className: "fixed inset-0 z-[60]", children: [
468
468
  /* @__PURE__ */ e(
@@ -480,7 +480,7 @@ function St({
480
480
  /* @__PURE__ */ e("p", { className: "mt-2 text-sm text-zinc-600 dark:text-zinc-400", children: s }),
481
481
  /* @__PURE__ */ n("div", { className: "mt-4 flex justify-end gap-3", children: [
482
482
  /* @__PURE__ */ e(
483
- ie,
483
+ ae,
484
484
  {
485
485
  variant: "outline",
486
486
  size: "sm",
@@ -489,14 +489,14 @@ function St({
489
489
  }
490
490
  ),
491
491
  /* @__PURE__ */ n(
492
- ie,
492
+ ae,
493
493
  {
494
494
  variant: "destructive",
495
495
  size: "sm",
496
- onClick: x,
497
- disabled: g,
496
+ onClick: g,
497
+ disabled: f,
498
498
  children: [
499
- g && /* @__PURE__ */ e(le, { className: "h-4 w-4 mr-2" }),
499
+ f && /* @__PURE__ */ e(le, { className: "h-4 w-4 mr-2" }),
500
500
  /* @__PURE__ */ e(Ye, { className: "h-4 w-4 mr-2" }),
501
501
  i
502
502
  ]
@@ -506,14 +506,14 @@ function St({
506
506
  ] }) })
507
507
  ] }) : null;
508
508
  }
509
- function Et(t, r) {
509
+ function zt(t, r) {
510
510
  return t.toLocaleDateString(void 0, {
511
511
  weekday: "long",
512
512
  month: "long",
513
513
  day: "numeric"
514
514
  });
515
515
  }
516
- function zt(t, r) {
516
+ function Lt(t, r) {
517
517
  const o = {
518
518
  hour: "2-digit",
519
519
  minute: "2-digit",
@@ -521,7 +521,7 @@ function zt(t, r) {
521
521
  };
522
522
  return `${t.toLocaleTimeString(void 0, o)} – ${r.toLocaleTimeString(void 0, o)}`;
523
523
  }
524
- function Lt(t) {
524
+ function Ht(t) {
525
525
  return t.toLocaleDateString(void 0, {
526
526
  day: "2-digit",
527
527
  month: "short",
@@ -530,8 +530,8 @@ function Lt(t) {
530
530
  minute: "2-digit"
531
531
  });
532
532
  }
533
- function Ht(t) {
534
- const [r, o] = ae(() => typeof window < "u" ? window.matchMedia(t).matches : !1);
533
+ function Tt(t) {
534
+ const [r, o] = se(() => typeof window < "u" ? window.matchMedia(t).matches : !1);
535
535
  return he(() => {
536
536
  if (typeof window > "u") return;
537
537
  const s = window.matchMedia(t), a = (i) => o(i.matches);
@@ -545,58 +545,58 @@ function Ee({
545
545
  onClose: s,
546
546
  onEdit: a,
547
547
  onDelete: i,
548
- onCancel: x,
549
- onAccept: g,
548
+ onCancel: g,
549
+ onAccept: f,
550
550
  onDecline: c,
551
- onConfirmMeeting: d,
552
- canEdit: w = !0,
553
- canDelete: C = !1,
554
- canCancel: z = !0,
555
- isCurrentUserParticipant: I = !1,
556
- isCurrentUserClient: H = !1,
557
- currentUserAcceptStatus: N,
558
- isAcceptLoading: p = !1,
559
- isDeclineLoading: D = !1,
560
- isConfirmLoading: k = !1,
561
- isDeleteLoading: S = !1,
562
- renderParticipant: T,
563
- renderHeaderActions: G,
564
- renderCancelReason: V,
565
- renderDeleteConfirmation: B,
566
- formatDate: j = Et,
567
- formatTimeRange: P = zt
551
+ onConfirmMeeting: x,
552
+ canEdit: y = !0,
553
+ canDelete: p = !1,
554
+ canCancel: M = !0,
555
+ isCurrentUserParticipant: A = !1,
556
+ isCurrentUserClient: z = !1,
557
+ currentUserAcceptStatus: C,
558
+ isAcceptLoading: S = !1,
559
+ isDeclineLoading: L = !1,
560
+ isConfirmLoading: w = !1,
561
+ isDeleteLoading: T = !1,
562
+ renderParticipant: D,
563
+ renderHeaderActions: F,
564
+ renderCancelReason: R,
565
+ renderDeleteConfirmation: V,
566
+ formatDate: $ = zt,
567
+ formatTimeRange: O = Lt
568
568
  }) {
569
- const [$, W] = ae(!1), U = !(t.isCanceled || t.meetingTookPlace), f = t.isRecurring ?? !1, l = t.participantDetails, h = t.participantsNames || [], v = l && l.length > 0, b = N === !0, y = N === !1, L = I && !H && U, M = v ? l.filter((R) => R.isConfirmed).length : t.isAccepted ? h.length : 0, _ = v ? l.length : h.length, J = t.scheduleTypeColor || t.hexColor || "#039BE5", K = se(() => t.startDate ? j(t.startDate) : r.noDateProvided, [t.startDate, j, r.noDateProvided]), u = se(() => t.startDate && t.endDate ? P(t.startDate, t.endDate) : null, [t.startDate, t.endDate, P]), E = () => {
569
+ const [I, P] = se(!1), U = !(t.isCanceled || t.meetingTookPlace), u = t.isRecurring ?? !1, l = t.participantDetails, d = t.participantsNames || [], v = l && l.length > 0, k = C === !0, b = C === !1, H = A && !z && U, E = v ? l.filter((j) => j.isConfirmed).length : t.isAccepted ? d.length : 0, _ = v ? l.length : d.length, Y = t.scheduleTypeColor || t.hexColor || "#039BE5", K = oe(() => t.startDate ? $(t.startDate) : r.noDateProvided, [t.startDate, $, r.noDateProvided]), J = oe(() => t.startDate && t.endDate ? O(t.startDate, t.endDate) : null, [t.startDate, t.endDate, O]), ie = () => {
570
570
  s(), a?.(t);
571
- }, A = () => {
572
- s(), x?.(t);
573
- }, F = () => {
574
- W(!0);
575
- }, Y = () => {
576
- i?.(t), W(!1);
571
+ }, m = () => {
572
+ s(), g?.(t);
573
+ }, N = () => {
574
+ P(!0);
575
+ }, W = () => {
576
+ i?.(t), P(!1);
577
577
  };
578
- return o ? /* @__PURE__ */ e("div", { className: "flex h-48 items-center justify-center", children: /* @__PURE__ */ e(le, { className: "h-6 w-6 text-zinc-400" }) }) : /* @__PURE__ */ n(Z, { delayDuration: 300, children: [
578
+ return o ? /* @__PURE__ */ e("div", { className: "flex h-48 items-center justify-center", children: /* @__PURE__ */ e(le, { className: "h-6 w-6 text-zinc-400" }) }) : /* @__PURE__ */ n(Q, { delayDuration: 300, children: [
579
579
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5 p-3", children: [
580
- /* @__PURE__ */ e("div", { className: "flex items-start justify-end gap-0.5", children: G ? G({ onClose: s }) : /* @__PURE__ */ n(oe, { children: [
581
- U && w && a && /* @__PURE__ */ e(ue, { onClick: E, label: r.edit, children: /* @__PURE__ */ e(xt, { className: "h-[18px] w-[18px]" }) }),
582
- U && z && x && /* @__PURE__ */ e(ue, { onClick: A, label: r.cancel, children: /* @__PURE__ */ e(pt, { className: "h-[18px] w-[18px]" }) }),
583
- C && i && /* @__PURE__ */ e(
580
+ /* @__PURE__ */ e("div", { className: "flex items-start justify-end gap-0.5", children: F ? F({ onClose: s }) : /* @__PURE__ */ n(ne, { children: [
581
+ U && y && a && /* @__PURE__ */ e(ue, { onClick: ie, label: r.edit, children: /* @__PURE__ */ e(pt, { className: "h-[18px] w-[18px]" }) }),
582
+ U && M && g && /* @__PURE__ */ e(ue, { onClick: m, label: r.cancel, children: /* @__PURE__ */ e(vt, { className: "h-[18px] w-[18px]" }) }),
583
+ p && i && /* @__PURE__ */ e(
584
584
  ue,
585
585
  {
586
- onClick: F,
586
+ onClick: N,
587
587
  label: r.delete,
588
588
  variant: "destructive",
589
589
  children: /* @__PURE__ */ e(Ye, { className: "h-[18px] w-[18px]" })
590
590
  }
591
591
  ),
592
- /* @__PURE__ */ e(ue, { onClick: s, label: r.close, children: /* @__PURE__ */ e(me, { className: "h-[18px] w-[18px]" }) })
592
+ /* @__PURE__ */ e(ue, { onClick: s, label: r.close, children: /* @__PURE__ */ e(fe, { className: "h-[18px] w-[18px]" }) })
593
593
  ] }) }),
594
594
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ n("div", { className: "flex items-start gap-2", children: [
595
595
  /* @__PURE__ */ e(
596
596
  "div",
597
597
  {
598
598
  className: "w-4 h-4 rounded mt-1 shrink-0",
599
- style: { backgroundColor: J }
599
+ style: { backgroundColor: Y }
600
600
  }
601
601
  ),
602
602
  /* @__PURE__ */ n("div", { className: "flex-1 min-w-0", children: [
@@ -604,7 +604,7 @@ function Ee({
604
604
  /* @__PURE__ */ e(
605
605
  "h2",
606
606
  {
607
- className: m(
607
+ className: h(
608
608
  "text-[22px] font-normal text-zinc-900 dark:text-zinc-100 leading-tight",
609
609
  t.isCanceled && "line-through opacity-60"
610
610
  ),
@@ -612,25 +612,25 @@ function Ee({
612
612
  }
613
613
  ),
614
614
  t.meetingTookPlace && /* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400 text-xs font-medium", children: [
615
- /* @__PURE__ */ e(vt, { className: "h-3 w-3" }),
615
+ /* @__PURE__ */ e(wt, { className: "h-3 w-3" }),
616
616
  r.completed
617
617
  ] }),
618
618
  t.isCanceled && /* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-400 text-xs font-medium", children: [
619
- /* @__PURE__ */ e(me, { className: "h-3 w-3" }),
619
+ /* @__PURE__ */ e(fe, { className: "h-3 w-3" }),
620
620
  r.canceled
621
621
  ] })
622
622
  ] }),
623
623
  /* @__PURE__ */ n("div", { className: "mt-1 text-sm text-zinc-600 dark:text-zinc-400", children: [
624
624
  /* @__PURE__ */ e("span", { children: K() }),
625
- u() && /* @__PURE__ */ n(oe, { children: [
625
+ J() && /* @__PURE__ */ n(ne, { children: [
626
626
  /* @__PURE__ */ e("span", { className: "mx-1.5", children: "·" }),
627
- /* @__PURE__ */ e("span", { children: u() })
627
+ /* @__PURE__ */ e("span", { children: J() })
628
628
  ] })
629
629
  ] }),
630
- f && t.recurrenceSummary && /* @__PURE__ */ e("div", { className: "text-sm text-zinc-500 dark:text-zinc-500", children: t.recurrenceSummary })
630
+ u && t.recurrenceSummary && /* @__PURE__ */ e("div", { className: "text-sm text-zinc-500 dark:text-zinc-500", children: t.recurrenceSummary })
631
631
  ] })
632
632
  ] }) }),
633
- t.isCanceled && /* @__PURE__ */ e("div", { className: "mx-4 p-3 rounded-lg bg-red-50 dark:bg-red-950/30", children: V ? V(t) : /* @__PURE__ */ e("div", { className: "flex items-start gap-0", children: /* @__PURE__ */ n("div", { className: "flex-1 min-w-0", children: [
633
+ t.isCanceled && /* @__PURE__ */ e("div", { className: "mx-4 p-3 rounded-lg bg-red-50 dark:bg-red-950/30", children: R ? R(t) : /* @__PURE__ */ e("div", { className: "flex items-start gap-0", children: /* @__PURE__ */ n("div", { className: "flex-1 min-w-0", children: [
634
634
  /* @__PURE__ */ e("div", { className: "text-sm font-medium text-red-700 dark:text-red-400", children: r.cancellationNote }),
635
635
  t.cancelReason && /* @__PURE__ */ n("div", { className: "mt-1 text-sm text-red-600/80 dark:text-red-400/80 italic", children: [
636
636
  '"',
@@ -640,16 +640,16 @@ function Ee({
640
640
  t.canceledDate && /* @__PURE__ */ n("div", { className: "mt-1.5 text-xs text-red-500/70 dark:text-red-400/60", children: [
641
641
  r.canceledOn,
642
642
  " ",
643
- Lt(t.canceledDate)
643
+ Ht(t.canceledDate)
644
644
  ] })
645
645
  ] }) }) }),
646
646
  /* @__PURE__ */ n("div", { className: "space-y-0.5", children: [
647
647
  t.address && /* @__PURE__ */ n("div", { className: "flex items-start gap-2", children: [
648
- /* @__PURE__ */ e(yt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
648
+ /* @__PURE__ */ e(kt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
649
649
  /* @__PURE__ */ e("span", { className: "text-sm text-zinc-700 dark:text-zinc-300", children: t.address })
650
650
  ] }),
651
- (v || h.length > 0) && /* @__PURE__ */ n("div", { className: "flex items-start gap-2 py-0", children: [
652
- /* @__PURE__ */ e(bt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
651
+ (v || d.length > 0) && /* @__PURE__ */ n("div", { className: "flex items-start gap-2 py-0", children: [
652
+ /* @__PURE__ */ e(yt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
653
653
  /* @__PURE__ */ n("div", { className: "flex-1", children: [
654
654
  /* @__PURE__ */ n("div", { className: "flex items-center gap-0", children: [
655
655
  /* @__PURE__ */ n("span", { className: "text-sm text-zinc-900 dark:text-zinc-100 font-medium", children: [
@@ -659,7 +659,7 @@ function Ee({
659
659
  ] }),
660
660
  _ > 0 && /* @__PURE__ */ n("span", { className: "text-xs text-zinc-500", children: [
661
661
  "(",
662
- M,
662
+ E,
663
663
  " ",
664
664
  r.confirmed,
665
665
  ")"
@@ -667,32 +667,32 @@ function Ee({
667
667
  ] }),
668
668
  /* @__PURE__ */ n("div", { className: "mt-2 space-y-2", children: [
669
669
  v ? l.slice(0, 6).map(
670
- (R, X) => T ? T(R, X) : /* @__PURE__ */ e(
670
+ (j, G) => D ? D(j, G) : /* @__PURE__ */ e(
671
671
  Se,
672
672
  {
673
- participant: R,
673
+ participant: j,
674
674
  isEventCanceled: t.isCanceled,
675
675
  labels: r
676
676
  },
677
- R.id
677
+ j.id
678
678
  )
679
- ) : h.slice(0, 6).map((R, X) => {
680
- const Ne = {
681
- id: String(X),
682
- name: R,
679
+ ) : d.slice(0, 6).map((j, G) => {
680
+ const me = {
681
+ id: String(G),
682
+ name: j,
683
683
  email: "",
684
684
  isConfirmed: t.isAccepted,
685
- isOrganizer: X === 0,
685
+ isOrganizer: G === 0,
686
686
  isClient: !1
687
687
  };
688
- return T ? T(Ne, X) : /* @__PURE__ */ e(
688
+ return D ? D(me, G) : /* @__PURE__ */ e(
689
689
  Se,
690
690
  {
691
- participant: Ne,
691
+ participant: me,
692
692
  isEventCanceled: t.isCanceled,
693
693
  labels: r
694
694
  },
695
- R
695
+ j
696
696
  );
697
697
  }),
698
698
  _ > 6 && /* @__PURE__ */ n("div", { className: "text-xs text-zinc-500 py-1.5 pl-10", children: [
@@ -705,203 +705,203 @@ function Ee({
705
705
  ] })
706
706
  ] }),
707
707
  t.description && /* @__PURE__ */ n("div", { className: "flex items-start gap-2", children: [
708
- /* @__PURE__ */ e(Nt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
708
+ /* @__PURE__ */ e(Ct, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
709
709
  /* @__PURE__ */ e("p", { className: "text-sm text-zinc-700 dark:text-zinc-300 whitespace-pre-wrap", children: t.description })
710
710
  ] }),
711
711
  /* @__PURE__ */ n("div", { className: "flex items-start gap-2", children: [
712
- /* @__PURE__ */ e(kt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
713
- /* @__PURE__ */ e("div", { className: "text-sm text-zinc-700 dark:text-zinc-300", children: v && l.find((R) => R.isOrganizer)?.name || h[0] || "Calendar" })
712
+ /* @__PURE__ */ e(Nt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
713
+ /* @__PURE__ */ e("div", { className: "text-sm text-zinc-700 dark:text-zinc-300", children: v && l.find((j) => j.isOrganizer)?.name || d[0] || "Calendar" })
714
714
  ] })
715
715
  ] }),
716
- L && g && c && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 mt-3 py-3", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
717
- f ? /* @__PURE__ */ n(et, { children: [
718
- /* @__PURE__ */ e(tt, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "flex", children: [
716
+ H && f && c && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 mt-3 py-3", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
717
+ u ? /* @__PURE__ */ n(tt, { children: [
718
+ /* @__PURE__ */ e(rt, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "flex", children: [
719
719
  /* @__PURE__ */ e(
720
- ie,
720
+ ae,
721
721
  {
722
722
  size: "sm",
723
723
  variant: "outline",
724
- className: m(
724
+ className: h(
725
725
  "rounded-r-none gap-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",
726
- b && "!bg-green-700 !text-white hover:!bg-green-700"
726
+ k && "!bg-green-700 !text-white hover:!bg-green-700"
727
727
  ),
728
- onClick: (R) => {
729
- R.stopPropagation(), b || g(t);
728
+ onClick: (j) => {
729
+ j.stopPropagation(), k || f(t);
730
730
  },
731
- disabled: p,
732
- children: p ? /* @__PURE__ */ e(le, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(oe, { children: [
733
- b && /* @__PURE__ */ e(de, { className: "h-3.5 w-3.5" }),
731
+ disabled: S,
732
+ children: S ? /* @__PURE__ */ e(le, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(ne, { children: [
733
+ k && /* @__PURE__ */ e(de, { className: "h-3.5 w-3.5" }),
734
734
  r.going
735
735
  ] })
736
736
  }
737
737
  ),
738
738
  /* @__PURE__ */ e(
739
- ie,
739
+ ae,
740
740
  {
741
741
  size: "sm",
742
742
  variant: "outline",
743
- className: m(
743
+ className: h(
744
744
  "rounded-l-none px-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",
745
- b && "!bg-green-700 !text-white hover:!bg-green-700"
745
+ k && "!bg-green-700 !text-white hover:!bg-green-700"
746
746
  ),
747
- children: /* @__PURE__ */ e(wt, { className: "h-3.5 w-3.5" })
747
+ children: /* @__PURE__ */ e(bt, { className: "h-3.5 w-3.5" })
748
748
  }
749
749
  )
750
750
  ] }) }),
751
- /* @__PURE__ */ n(rt, { align: "start", children: [
751
+ /* @__PURE__ */ n(nt, { align: "start", children: [
752
752
  /* @__PURE__ */ n(
753
753
  Ce,
754
754
  {
755
- className: m(
755
+ className: h(
756
756
  "gap-1.5 h-8 !border-none !bg-green-50 text-green-800 hover:!bg-green-100",
757
- b && "!bg-green-700 !text-white hover:!bg-green-700"
757
+ k && "!bg-green-700 !text-white hover:!bg-green-700"
758
758
  ),
759
- onClick: () => g(t),
759
+ onClick: () => f(t),
760
760
  children: [
761
761
  /* @__PURE__ */ e(de, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
762
762
  r.acceptThisEvent
763
763
  ]
764
764
  }
765
765
  ),
766
- /* @__PURE__ */ n(Ce, { onClick: () => g(t), children: [
766
+ /* @__PURE__ */ n(Ce, { onClick: () => f(t), children: [
767
767
  /* @__PURE__ */ e(de, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
768
768
  r.acceptAllEvents
769
769
  ] })
770
770
  ] })
771
771
  ] }) : /* @__PURE__ */ e(
772
- ie,
772
+ ae,
773
773
  {
774
774
  size: "sm",
775
775
  variant: "outline",
776
- className: m(
776
+ className: h(
777
777
  "gap-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",
778
- b && "!bg-green-700 !text-white hover:!bg-green-700"
778
+ k && "!bg-green-700 !text-white hover:!bg-green-700"
779
779
  ),
780
780
  onClick: () => {
781
- b || g(t);
781
+ k || f(t);
782
782
  },
783
- disabled: p,
784
- children: p ? /* @__PURE__ */ e(le, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(oe, { children: [
785
- b && /* @__PURE__ */ e(de, { className: "h-3.5 w-3.5" }),
783
+ disabled: S,
784
+ children: S ? /* @__PURE__ */ e(le, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(ne, { children: [
785
+ k && /* @__PURE__ */ e(de, { className: "h-3.5 w-3.5" }),
786
786
  r.going
787
787
  ] })
788
788
  }
789
789
  ),
790
790
  /* @__PURE__ */ e(
791
- ie,
791
+ ae,
792
792
  {
793
793
  size: "sm",
794
794
  variant: "outline",
795
- className: m(
795
+ className: h(
796
796
  "gap-1.5 h-8 !border-none !bg-rose-100 text-rose-800 hover:!bg-rose-200",
797
- y && "!bg-rose-700 !text-white hover:!bg-rose-700"
797
+ b && "!bg-rose-700 !text-white hover:!bg-rose-700"
798
798
  ),
799
799
  onClick: () => {
800
- y || c(t);
800
+ b || c(t);
801
801
  },
802
- disabled: D,
803
- children: D ? /* @__PURE__ */ e(le, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(oe, { children: [
804
- y && /* @__PURE__ */ e(me, { className: "h-3.5 w-3.5" }),
802
+ disabled: L,
803
+ children: L ? /* @__PURE__ */ e(le, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(ne, { children: [
804
+ b && /* @__PURE__ */ e(fe, { className: "h-3.5 w-3.5" }),
805
805
  r.notGoing
806
806
  ] })
807
807
  }
808
808
  )
809
809
  ] }) }),
810
- I && b && !t.meetingTookPlace && !t.isCanceled && d && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 py-3", children: /* @__PURE__ */ n(
811
- ie,
810
+ A && k && !t.meetingTookPlace && !t.isCanceled && x && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 py-3", children: /* @__PURE__ */ n(
811
+ ae,
812
812
  {
813
813
  size: "sm",
814
814
  variant: "outline",
815
815
  className: "w-full h-9 hover:!bg-green-100 hover:text-green-700 text-green-700 !bg-green-100 !border-none dark:text-green-400 dark:hover:bg-green-950/30",
816
- onClick: () => d(t),
817
- disabled: k,
816
+ onClick: () => x(t),
817
+ disabled: w,
818
818
  children: [
819
- k && /* @__PURE__ */ e(le, { className: "h-4 w-4 mr-2" }),
819
+ w && /* @__PURE__ */ e(le, { className: "h-4 w-4 mr-2" }),
820
820
  r.confirmMeeting
821
821
  ]
822
822
  }
823
823
  ) })
824
824
  ] }),
825
- B ? $ && B({
826
- onConfirm: Y,
827
- onCancel: () => W(!1),
828
- isLoading: S
825
+ V ? I && V({
826
+ onConfirm: W,
827
+ onCancel: () => P(!1),
828
+ isLoading: T
829
829
  }) : /* @__PURE__ */ e(
830
- St,
830
+ Et,
831
831
  {
832
- open: $,
833
- onOpenChange: W,
832
+ open: I,
833
+ onOpenChange: P,
834
834
  title: r.deleteConfirmTitle,
835
835
  description: r.deleteConfirmDescription,
836
836
  cancelLabel: r.cancel,
837
837
  confirmLabel: r.delete,
838
- onConfirm: Y,
839
- isLoading: S
838
+ onConfirm: W,
839
+ isLoading: T
840
840
  }
841
841
  )
842
842
  ] });
843
843
  }
844
- function Ur({
844
+ function Yr({
845
845
  event: t,
846
846
  children: r,
847
847
  open: o,
848
848
  onOpenChange: s,
849
849
  isLoading: a,
850
850
  labels: i,
851
- onEdit: x,
852
- onDelete: g,
851
+ onEdit: g,
852
+ onDelete: f,
853
853
  onCancel: c,
854
- onAccept: d,
855
- onDecline: w,
856
- onConfirmMeeting: C,
857
- canEdit: z = !0,
858
- canDelete: I = !1,
859
- canCancel: H = !0,
860
- isCurrentUserParticipant: N,
861
- isCurrentUserClient: p,
862
- currentUserAcceptStatus: D,
863
- isAcceptLoading: k,
864
- isDeclineLoading: S,
865
- isConfirmLoading: T,
866
- isDeleteLoading: G,
867
- renderParticipant: V,
868
- renderHeaderActions: B,
869
- renderCancelReason: j,
870
- renderDeleteConfirmation: P,
871
- formatDate: $,
872
- formatTimeRange: W,
854
+ onAccept: x,
855
+ onDecline: y,
856
+ onConfirmMeeting: p,
857
+ canEdit: M = !0,
858
+ canDelete: A = !1,
859
+ canCancel: z = !0,
860
+ isCurrentUserParticipant: C,
861
+ isCurrentUserClient: S,
862
+ currentUserAcceptStatus: L,
863
+ isAcceptLoading: w,
864
+ isDeclineLoading: T,
865
+ isConfirmLoading: D,
866
+ isDeleteLoading: F,
867
+ renderParticipant: R,
868
+ renderHeaderActions: V,
869
+ renderCancelReason: $,
870
+ renderDeleteConfirmation: O,
871
+ formatDate: I,
872
+ formatTimeRange: P,
873
873
  className: U,
874
- width: f = 360
874
+ width: u = 360
875
875
  }) {
876
- const l = Ht("(min-width: 768px)"), h = { ...Ct, ...i }, v = se(() => {
876
+ const l = Tt("(min-width: 768px)"), d = { ...Dt, ...i }, v = oe(() => {
877
877
  s?.(!1);
878
- }, [s]), b = {
878
+ }, [s]), k = {
879
879
  event: t,
880
- labels: h,
880
+ labels: d,
881
881
  isLoading: a,
882
882
  onClose: v,
883
- onEdit: x,
884
- onDelete: g,
883
+ onEdit: g,
884
+ onDelete: f,
885
885
  onCancel: c,
886
- onAccept: d,
887
- onDecline: w,
888
- onConfirmMeeting: C,
889
- canEdit: z,
890
- canDelete: I,
891
- canCancel: H,
892
- isCurrentUserParticipant: N,
893
- isCurrentUserClient: p,
894
- currentUserAcceptStatus: D,
895
- isAcceptLoading: k,
896
- isDeclineLoading: S,
897
- isConfirmLoading: T,
898
- isDeleteLoading: G,
899
- renderParticipant: V,
900
- renderHeaderActions: B,
901
- renderCancelReason: j,
902
- renderDeleteConfirmation: P,
903
- formatDate: $,
904
- formatTimeRange: W
886
+ onAccept: x,
887
+ onDecline: y,
888
+ onConfirmMeeting: p,
889
+ canEdit: M,
890
+ canDelete: A,
891
+ canCancel: z,
892
+ isCurrentUserParticipant: C,
893
+ isCurrentUserClient: S,
894
+ currentUserAcceptStatus: L,
895
+ isAcceptLoading: w,
896
+ isDeclineLoading: T,
897
+ isConfirmLoading: D,
898
+ isDeleteLoading: F,
899
+ renderParticipant: R,
900
+ renderHeaderActions: V,
901
+ renderCancelReason: $,
902
+ renderDeleteConfirmation: O,
903
+ formatDate: I,
904
+ formatTimeRange: P
905
905
  };
906
906
  return l ? /* @__PURE__ */ n(_e, { open: o ?? !1, onOpenChange: s ?? (() => {
907
907
  }), children: [
@@ -909,36 +909,36 @@ function Ur({
909
909
  /* @__PURE__ */ e(
910
910
  Re,
911
911
  {
912
- className: m(
912
+ className: h(
913
913
  "p-0 shadow-lg !rounded-2xl bg-white dark:bg-zinc-900 overflow-hidden border z-50",
914
914
  U
915
915
  ),
916
- style: { width: f },
916
+ style: { width: u },
917
917
  align: "center",
918
918
  side: "bottom",
919
919
  sideOffset: 4,
920
- children: /* @__PURE__ */ e(Ee, { ...b })
920
+ children: /* @__PURE__ */ e(Ee, { ...k })
921
921
  }
922
922
  )
923
- ] }) : /* @__PURE__ */ n(oe, { children: [
923
+ ] }) : /* @__PURE__ */ n(ne, { children: [
924
924
  r,
925
925
  /* @__PURE__ */ e(
926
- Mt,
926
+ St,
927
927
  {
928
928
  open: o ?? !1,
929
929
  onOpenChange: s ?? (() => {
930
930
  }),
931
931
  title: t.title,
932
- children: /* @__PURE__ */ e(Ee, { ...b })
932
+ children: /* @__PURE__ */ e(Ee, { ...k })
933
933
  }
934
934
  )
935
935
  ] });
936
936
  }
937
- const xe = 44, ze = 4, Tt = 56, Le = 8, pe = 80, ce = 140, He = 100, Te = 2, It = 8, jt = 18;
938
- function Wt(t) {
937
+ const pe = 44, ze = 4, It = 56, Le = 8, ve = 80, ce = 140, He = 100, Te = 2, jt = 8, Wt = 18;
938
+ function At(t) {
939
939
  return t.split(" ").map((r) => r[0]).join("").toUpperCase().slice(0, 2);
940
940
  }
941
- function At(t, r) {
941
+ function Ft(t, r) {
942
942
  const o = [];
943
943
  for (let s = 0; s < r; s++) {
944
944
  const a = new Date(t);
@@ -946,17 +946,17 @@ function At(t, r) {
946
946
  }
947
947
  return o;
948
948
  }
949
- function Ft(t, r, o) {
949
+ function Bt(t, r, o) {
950
950
  const s = [];
951
951
  return t.forEach((a, i) => {
952
- for (let x = r; x < o; x++)
953
- s.push({ hour: x, dayIndex: i, date: a });
952
+ for (let g = r; g < o; g++)
953
+ s.push({ hour: g, dayIndex: i, date: a });
954
954
  }), s;
955
955
  }
956
- function Bt(t) {
956
+ function $t(t) {
957
957
  return `${t.toString().padStart(2, "0")}:00`;
958
958
  }
959
- function $t(t) {
959
+ function Ot(t) {
960
960
  return t.toLocaleDateString("en-US", {
961
961
  weekday: "short",
962
962
  month: "short",
@@ -976,11 +976,11 @@ function Ie(t) {
976
976
  }
977
977
  return o;
978
978
  }
979
- function Ot({ src: t, alt: r, fallback: o, className: s }) {
979
+ function _t({ src: t, alt: r, fallback: o, className: s }) {
980
980
  return /* @__PURE__ */ e(
981
981
  "div",
982
982
  {
983
- className: m(
983
+ className: h(
984
984
  "relative flex shrink-0 overflow-hidden rounded-sm border bg-muted",
985
985
  s
986
986
  ),
@@ -995,122 +995,122 @@ function Ot({ src: t, alt: r, fallback: o, className: s }) {
995
995
  }
996
996
  );
997
997
  }
998
- const _t = 7;
999
- function ve({
1000
- daysToShow: t = _t,
998
+ const Pt = 7;
999
+ function we({
1000
+ daysToShow: t = Pt,
1001
1001
  events: r,
1002
1002
  users: o = [],
1003
1003
  selectedDate: s,
1004
1004
  onDateChange: a,
1005
1005
  onEventClick: i,
1006
- visibleHours: x,
1007
- className: g,
1006
+ visibleHours: g,
1007
+ className: f,
1008
1008
  getEventUserId: c,
1009
- renderPopover: d,
1010
- slots: w,
1011
- classNames: C
1009
+ renderPopover: x,
1010
+ slots: y,
1011
+ classNames: p
1012
1012
  }) {
1013
- const z = ke(null), I = s ?? /* @__PURE__ */ new Date(), H = !0, N = x?.from ?? It, p = x?.to ?? jt, D = p - N, k = O(() => {
1014
- const l = new Date(I);
1013
+ const M = Ne(null), A = s ?? /* @__PURE__ */ new Date(), z = !0, C = g?.from ?? jt, S = g?.to ?? Wt, L = S - C, w = B(() => {
1014
+ const l = new Date(A);
1015
1015
  if (t === 1 || t === 3)
1016
1016
  return l.setHours(0, 0, 0, 0), l;
1017
- const h = l.getDay(), v = h === 0 ? -6 : 1 - h;
1017
+ const d = l.getDay(), v = d === 0 ? -6 : 1 - d;
1018
1018
  return l.setDate(l.getDate() + v), l.setHours(0, 0, 0, 0), l;
1019
- }, [I, t]), S = O(
1020
- () => At(k, t),
1021
- [k, t]
1022
- ), T = O(
1023
- () => Ft(S, N, p),
1024
- [H, S, N, p]
1025
- ), V = c ?? ((l) => {
1026
- const h = l.data;
1027
- if (h?.userId) return String(h.userId);
1028
- if (h?.user && typeof h.user == "object" && h.user.id)
1029
- return String(h.user.id);
1019
+ }, [A, t]), T = B(
1020
+ () => Ft(w, t),
1021
+ [w, t]
1022
+ ), D = B(
1023
+ () => Bt(T, C, S),
1024
+ [z, T, C, S]
1025
+ ), R = c ?? ((l) => {
1026
+ const d = l.data;
1027
+ if (d?.userId) return String(d.userId);
1028
+ if (d?.user && typeof d.user == "object" && d.user.id)
1029
+ return String(d.user.id);
1030
1030
  if (l.user?.id) return l.user.id;
1031
1031
  if (l.participants?.[0]?.id) return l.participants[0].id;
1032
- }), B = O(() => {
1032
+ }), V = B(() => {
1033
1033
  const l = /* @__PURE__ */ new Map();
1034
- for (const h of o)
1035
- l.set(h.id, {
1036
- id: h.id,
1037
- name: h.name,
1038
- avatar: h.avatar ?? void 0,
1039
- email: h.email
1034
+ for (const d of o)
1035
+ l.set(d.id, {
1036
+ id: d.id,
1037
+ name: d.name,
1038
+ avatar: d.avatar ?? void 0,
1039
+ email: d.email
1040
1040
  });
1041
- for (const h of r) {
1042
- const b = h.data?.user;
1043
- b?.id && !l.has(b.id) && l.set(b.id, {
1044
- id: b.id,
1045
- name: b.name ?? "",
1046
- avatar: b.avatar ?? void 0,
1047
- email: b.email
1048
- }), h.user?.id && !l.has(h.user.id) && l.set(h.user.id, {
1049
- id: h.user.id,
1050
- name: h.user.name,
1051
- avatar: h.user.avatar ?? void 0,
1052
- email: h.user.email
1041
+ for (const d of r) {
1042
+ const k = d.data?.user;
1043
+ k?.id && !l.has(k.id) && l.set(k.id, {
1044
+ id: k.id,
1045
+ name: k.name ?? "",
1046
+ avatar: k.avatar ?? void 0,
1047
+ email: k.email
1048
+ }), d.user?.id && !l.has(d.user.id) && l.set(d.user.id, {
1049
+ id: d.user.id,
1050
+ name: d.user.name,
1051
+ avatar: d.user.avatar ?? void 0,
1052
+ email: d.user.email
1053
1053
  });
1054
- for (const y of h.participants || [])
1055
- y.id && !l.has(y.id) && l.set(y.id, {
1056
- id: y.id,
1057
- name: y.name,
1058
- avatar: y.avatar ?? void 0,
1059
- email: y.email
1054
+ for (const b of d.participants || [])
1055
+ b.id && !l.has(b.id) && l.set(b.id, {
1056
+ id: b.id,
1057
+ name: b.name,
1058
+ avatar: b.avatar ?? void 0,
1059
+ email: b.email
1060
1060
  });
1061
1061
  }
1062
1062
  return Array.from(l.values());
1063
- }, [o, r]), j = O(() => {
1064
- const l = [], h = /* @__PURE__ */ new Map();
1065
- for (const y of B)
1066
- h.set(y.id, []);
1067
- h.set("unassigned", []);
1068
- for (const y of r) {
1069
- const L = V(y) ?? "unassigned";
1070
- (h.get(L) ?? h.get("unassigned")).push(y);
1063
+ }, [o, r]), $ = B(() => {
1064
+ const l = [], d = /* @__PURE__ */ new Map();
1065
+ for (const b of V)
1066
+ d.set(b.id, []);
1067
+ d.set("unassigned", []);
1068
+ for (const b of r) {
1069
+ const H = R(b) ?? "unassigned";
1070
+ (d.get(H) ?? d.get("unassigned")).push(b);
1071
1071
  }
1072
- const v = (y) => {
1073
- const L = [];
1074
- for (const M of y) {
1075
- const _ = M.startDate.getHours() + M.startDate.getMinutes() / 60, J = M.endDate.getHours() + M.endDate.getMinutes() / 60;
1076
- for (let K = 0; K < S.length; K++) {
1077
- const u = S[K], E = ge(u), A = Ve(u);
1078
- if (M.startDate <= A && M.endDate >= E) {
1079
- let F = N, Y = p;
1080
- if (M.startDate >= E && (F = Math.max(N, _)), M.endDate <= A && (Y = Math.min(p, J)), F = Math.max(
1081
- N,
1082
- Math.min(p, F)
1083
- ), Y = Math.max(
1084
- N,
1085
- Math.min(p, Y)
1086
- ), Y > F) {
1087
- const R = K * D + Math.floor(F - N), X = K * D + Math.ceil(Y - N);
1088
- L.push({
1089
- event: M,
1090
- startCol: R,
1091
- spanCols: Math.max(1, X - R)
1072
+ const v = (b) => {
1073
+ const H = [];
1074
+ for (const E of b) {
1075
+ const _ = E.startDate.getHours() + E.startDate.getMinutes() / 60, Y = E.endDate.getHours() + E.endDate.getMinutes() / 60;
1076
+ for (let K = 0; K < T.length; K++) {
1077
+ const J = T[K], ie = xe(J), m = Ve(J);
1078
+ if (E.startDate <= m && E.endDate >= ie) {
1079
+ let N = C, W = S;
1080
+ if (E.startDate >= ie && (N = Math.max(C, _)), E.endDate <= m && (W = Math.min(S, Y)), N = Math.max(
1081
+ C,
1082
+ Math.min(S, N)
1083
+ ), W = Math.max(
1084
+ C,
1085
+ Math.min(S, W)
1086
+ ), W > N) {
1087
+ const j = K * L + Math.floor(N - C), G = K * L + Math.ceil(W - C);
1088
+ H.push({
1089
+ event: E,
1090
+ startCol: j,
1091
+ spanCols: Math.max(1, G - j)
1092
1092
  });
1093
1093
  }
1094
1094
  }
1095
1095
  }
1096
1096
  }
1097
- return L;
1097
+ return H;
1098
1098
  };
1099
- for (const y of B) {
1100
- const L = h.get(y.id) ?? [], M = v(L), _ = Ie(M), J = _.reduce(
1101
- (K, u) => Math.max(K, u.stackIndex + 1),
1099
+ for (const b of V) {
1100
+ const H = d.get(b.id) ?? [], E = v(H), _ = Ie(E), Y = _.reduce(
1101
+ (K, J) => Math.max(K, J.stackIndex + 1),
1102
1102
  0
1103
1103
  );
1104
1104
  l.push({
1105
- user: y,
1105
+ user: b,
1106
1106
  events: _,
1107
- maxStack: Math.max(J, 1)
1107
+ maxStack: Math.max(Y, 1)
1108
1108
  });
1109
1109
  }
1110
- const b = h.get("unassigned") ?? [];
1111
- if (b.length > 0) {
1112
- const y = v(b), L = Ie(y), M = L.reduce(
1113
- (_, J) => Math.max(_, J.stackIndex + 1),
1110
+ const k = d.get("unassigned") ?? [];
1111
+ if (k.length > 0) {
1112
+ const b = v(k), H = Ie(b), E = H.reduce(
1113
+ (_, Y) => Math.max(_, Y.stackIndex + 1),
1114
1114
  0
1115
1115
  );
1116
1116
  l.push({
@@ -1120,77 +1120,77 @@ function ve({
1120
1120
  avatar: void 0,
1121
1121
  email: void 0
1122
1122
  },
1123
- events: L,
1124
- maxStack: Math.max(M, 1)
1123
+ events: H,
1124
+ maxStack: Math.max(E, 1)
1125
1125
  });
1126
1126
  }
1127
- return l.filter((y) => y.events.length > 0);
1127
+ return l.filter((b) => b.events.length > 0);
1128
1128
  }, [
1129
- B,
1129
+ V,
1130
1130
  r,
1131
+ T,
1132
+ z,
1133
+ L,
1134
+ C,
1131
1135
  S,
1132
- H,
1133
- D,
1134
- N,
1135
- p,
1136
- V
1137
- ]), P = O(() => {
1136
+ R
1137
+ ]), O = B(() => {
1138
1138
  const l = /* @__PURE__ */ new Map();
1139
- for (const h of j)
1140
- for (const v of h.events)
1139
+ for (const d of $)
1140
+ for (const v of d.events)
1141
1141
  if (v.spanCols === 1) {
1142
- const b = l.get(v.startCol) ?? 0;
1143
- l.set(v.startCol, b + 1);
1142
+ const k = l.get(v.startCol) ?? 0;
1143
+ l.set(v.startCol, k + 1);
1144
1144
  }
1145
1145
  return l;
1146
- }, [j]), $ = O(() => {
1147
- const l = T.length, h = pe, v = [];
1148
- for (let b = 0; b < l; b++) {
1149
- const y = P.get(b) ?? 0;
1150
- y > Te ? v.push(
1151
- He + (y - Te) * 20
1152
- ) : y > 0 ? v.push(Math.max(h, He)) : v.push(h);
1146
+ }, [$]), I = B(() => {
1147
+ const l = D.length, d = ve, v = [];
1148
+ for (let k = 0; k < l; k++) {
1149
+ const b = O.get(k) ?? 0;
1150
+ b > Te ? v.push(
1151
+ He + (b - Te) * 20
1152
+ ) : b > 0 ? v.push(Math.max(d, He)) : v.push(d);
1153
1153
  }
1154
1154
  return v;
1155
1155
  }, [
1156
- H,
1156
+ z,
1157
+ D.length,
1157
1158
  T.length,
1158
- S.length,
1159
- P
1160
- ]), W = (l) => Math.max(
1161
- Tt,
1162
- l * (xe + ze) + Le * 2
1163
- ), U = ce + $.reduce((l, h) => l + h, 0), f = O(() => {
1159
+ O
1160
+ ]), P = (l) => Math.max(
1161
+ It,
1162
+ l * (pe + ze) + Le * 2
1163
+ ), U = ce + I.reduce((l, d) => l + d, 0), u = B(() => {
1164
1164
  const l = [0];
1165
- for (let h = 0; h < $.length; h++)
1166
- l.push(l[h] + $[h]);
1165
+ for (let d = 0; d < I.length; d++)
1166
+ l.push(l[d] + I[d]);
1167
1167
  return l;
1168
- }, [$]);
1169
- return Qe(() => {
1170
- const l = z.current;
1168
+ }, [I]);
1169
+ return Ze(() => {
1170
+ const l = M.current;
1171
1171
  if (!l) return;
1172
- const h = () => {
1172
+ const d = () => {
1173
1173
  let v = -1;
1174
- const y = (/* @__PURE__ */ new Date()).getHours();
1174
+ const b = (/* @__PURE__ */ new Date()).getHours();
1175
1175
  {
1176
- for (let L = 0; L < T.length; L++) {
1177
- const M = T[L];
1178
- if (M && q(M.date) && M.hour <= y && M.hour + 1 > y) {
1179
- v = L;
1176
+ for (let H = 0; H < D.length; H++) {
1177
+ const E = D[H];
1178
+ if (E && q(E.date) && E.hour <= b && E.hour + 1 > b) {
1179
+ v = H;
1180
1180
  break;
1181
1181
  }
1182
1182
  }
1183
1183
  if (v === -1)
1184
- for (let L = 0; L < T.length; L++) {
1185
- const M = T[L];
1186
- if (M && q(M.date)) {
1187
- v = L;
1184
+ for (let H = 0; H < D.length; H++) {
1185
+ const E = D[H];
1186
+ if (E && q(E.date)) {
1187
+ v = H;
1188
1188
  break;
1189
1189
  }
1190
1190
  }
1191
1191
  }
1192
1192
  if (v !== -1) {
1193
- const L = (f[v] ?? 0) + ce, M = l.clientWidth, _ = Math.max(0, L - M / 3);
1193
+ const H = (u[v] ?? 0) + ce, E = l.clientWidth, _ = Math.max(0, H - E / 3);
1194
1194
  l.scrollTo({
1195
1195
  left: _,
1196
1196
  behavior: "instant"
@@ -1198,9 +1198,9 @@ function ve({
1198
1198
  }
1199
1199
  };
1200
1200
  requestAnimationFrame(() => {
1201
- requestAnimationFrame(h);
1201
+ requestAnimationFrame(d);
1202
1202
  });
1203
- }, [I, T, S, f, H]), /* @__PURE__ */ e("div", { className: m("flex h-full flex-col", g), children: /* @__PURE__ */ e("div", { className: "ic-timeline-scroll-container flex-1", ref: z, children: /* @__PURE__ */ n("div", { className: "relative", style: { minWidth: U }, children: [
1203
+ }, [A, D, T, u, z]), /* @__PURE__ */ e("div", { className: h("flex h-full flex-col", f), children: /* @__PURE__ */ e("div", { className: "ic-timeline-scroll-container flex-1", ref: M, children: /* @__PURE__ */ n("div", { className: "relative", style: { minWidth: U }, children: [
1204
1204
  // Hour mode: Day headers + Hour sub-headers - sticky wrapper with flex child (sticky + flex breaks sticky)
1205
1205
  /* @__PURE__ */ e("div", { className: "ic-timeline-header sticky top-0 z-20 border-b bg-background", children: /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
1206
1206
  t > 1 && /* @__PURE__ */ n("div", { className: "flex border-b", children: [
@@ -1212,17 +1212,17 @@ function ve({
1212
1212
  children: /* @__PURE__ */ e("span", { className: "text-[10px] font-medium uppercase text-muted-foreground", children: "Resources" })
1213
1213
  }
1214
1214
  ),
1215
- S.map((l, h) => {
1216
- const v = q(l), b = h * D, y = $.slice(b, b + D).reduce((L, M) => L + M, 0);
1215
+ T.map((l, d) => {
1216
+ const v = q(l), k = d * L, b = I.slice(k, k + L).reduce((H, E) => H + E, 0);
1217
1217
  return /* @__PURE__ */ e(
1218
1218
  "div",
1219
1219
  {
1220
- className: m(
1220
+ className: h(
1221
1221
  "flex shrink-0 items-center justify-center border-r py-1.5 font-medium",
1222
1222
  v ? "bg-primary/10 text-primary" : "bg-muted/30"
1223
1223
  ),
1224
- style: { width: y },
1225
- children: /* @__PURE__ */ e("span", { className: "text-xs", children: $t(l) })
1224
+ style: { width: b },
1225
+ children: /* @__PURE__ */ e("span", { className: "text-xs", children: Ot(l) })
1226
1226
  },
1227
1227
  `day-${l.toISOString()}`
1228
1228
  );
@@ -1232,7 +1232,7 @@ function ve({
1232
1232
  /* @__PURE__ */ e(
1233
1233
  "div",
1234
1234
  {
1235
- className: m(
1235
+ className: h(
1236
1236
  "flex shrink-0 items-center border-r bg-background px-2 py-2",
1237
1237
  t > 1 && "sticky left-0 z-10"
1238
1238
  ),
@@ -1240,34 +1240,34 @@ function ve({
1240
1240
  children: t === 1 && /* @__PURE__ */ e("span", { className: "text-[10px] font-medium uppercase text-muted-foreground", children: "Resources" })
1241
1241
  }
1242
1242
  ),
1243
- T.map((l, h) => {
1244
- const v = l.hour === N, b = q(l.date), y = $[h] ?? pe;
1243
+ D.map((l, d) => {
1244
+ const v = l.hour === C, k = q(l.date), b = I[d] ?? ve;
1245
1245
  return /* @__PURE__ */ e(
1246
1246
  "div",
1247
1247
  {
1248
- className: m(
1248
+ className: h(
1249
1249
  "flex shrink-0 items-center justify-center py-1.5 text-[10px] text-muted-foreground",
1250
- v && h > 0 ? "border-l-2 border-l-border" : "border-r border-r-border/50",
1251
- b && "bg-primary/5"
1250
+ v && d > 0 ? "border-l-2 border-l-border" : "border-r border-r-border/50",
1251
+ k && "bg-primary/5"
1252
1252
  ),
1253
- style: { width: y },
1254
- children: Bt(l.hour)
1253
+ style: { width: b },
1254
+ children: $t(l.hour)
1255
1255
  },
1256
1256
  `hour-${l.dayIndex}-${l.hour}`
1257
1257
  );
1258
1258
  })
1259
1259
  ] })
1260
1260
  ] }) }),
1261
- j.map((l) => {
1262
- const h = W(l.maxStack);
1261
+ $.map((l) => {
1262
+ const d = P(l.maxStack);
1263
1263
  return /* @__PURE__ */ n(
1264
1264
  "div",
1265
1265
  {
1266
- className: m(
1266
+ className: h(
1267
1267
  "relative flex border-b",
1268
- C?.resourceRow
1268
+ p?.resourceRow
1269
1269
  ),
1270
- style: { height: h },
1270
+ style: { height: d },
1271
1271
  children: [
1272
1272
  /* @__PURE__ */ e(
1273
1273
  "div",
@@ -1277,18 +1277,18 @@ function ve({
1277
1277
  children: /* @__PURE__ */ n(
1278
1278
  "div",
1279
1279
  {
1280
- className: m(
1280
+ className: h(
1281
1281
  "flex h-full items-center gap-2 sm:gap-3 border-r bg-background px-2 sm:px-4",
1282
- C?.resourceHeader
1282
+ p?.resourceHeader
1283
1283
  ),
1284
1284
  children: [
1285
1285
  /* @__PURE__ */ e(
1286
- Ot,
1286
+ _t,
1287
1287
  {
1288
1288
  className: "size-7",
1289
1289
  src: l.user.avatar,
1290
1290
  alt: l.user.name,
1291
- fallback: Wt(l.user.name)
1291
+ fallback: At(l.user.name)
1292
1292
  }
1293
1293
  ),
1294
1294
  /* @__PURE__ */ e("span", { className: "truncate text-xs sm:text-sm font-medium", children: l.user.name })
@@ -1299,44 +1299,44 @@ function ve({
1299
1299
  ),
1300
1300
  /* @__PURE__ */ n("div", { className: "relative flex", children: [
1301
1301
  // Hour mode cells
1302
- T.map((v, b) => {
1303
- const y = v.hour === N && b > 0, L = $[b] ?? pe;
1302
+ D.map((v, k) => {
1303
+ const b = v.hour === C && k > 0, H = I[k] ?? ve;
1304
1304
  return /* @__PURE__ */ e(
1305
1305
  "div",
1306
1306
  {
1307
- className: m(
1307
+ className: h(
1308
1308
  "shrink-0",
1309
- y ? "border-l-2 border-l-border" : "border-r border-r-border/50",
1309
+ b ? "border-l-2 border-l-border" : "border-r border-r-border/50",
1310
1310
  q(v.date) && "bg-primary/5"
1311
1311
  ),
1312
- style: { width: L }
1312
+ style: { width: H }
1313
1313
  },
1314
1314
  `cell-${v.dayIndex}-${v.hour}`
1315
1315
  );
1316
1316
  }),
1317
1317
  l.events.map((v) => {
1318
- const b = (f[v.startCol] ?? 0) + 2, y = f[v.startCol + v.spanCols] ?? f[f.length - 1] ?? 0, L = f[v.startCol] ?? 0, M = y - L - 4, _ = Le + v.stackIndex * (xe + ze);
1318
+ const k = (u[v.startCol] ?? 0) + 2, b = u[v.startCol + v.spanCols] ?? u[u.length - 1] ?? 0, H = u[v.startCol] ?? 0, E = b - H - 4, _ = Le + v.stackIndex * (pe + ze);
1319
1319
  return /* @__PURE__ */ e(
1320
1320
  "div",
1321
1321
  {
1322
1322
  className: "absolute",
1323
1323
  style: {
1324
- left: b,
1325
- width: Math.max(M, 0),
1324
+ left: k,
1325
+ width: Math.max(E, 0),
1326
1326
  // No forced minimum - columns are guaranteed wide enough
1327
1327
  top: _,
1328
- height: xe
1328
+ height: pe
1329
1329
  },
1330
1330
  children: /* @__PURE__ */ e(
1331
- nt,
1331
+ ot,
1332
1332
  {
1333
1333
  event: v.event,
1334
1334
  variant: "compact",
1335
1335
  onClick: i,
1336
- renderPopover: d,
1337
- className: m(
1336
+ renderPopover: x,
1337
+ className: h(
1338
1338
  "h-full w-full",
1339
- C?.eventCardCompact
1339
+ p?.eventCardCompact
1340
1340
  )
1341
1341
  }
1342
1342
  )
@@ -1350,10 +1350,10 @@ function ve({
1350
1350
  l.user.id
1351
1351
  );
1352
1352
  }),
1353
- j.length === 0 && /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-20 text-muted-foreground", children: "No users or events to display" })
1353
+ $.length === 0 && /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-20 text-muted-foreground", children: "No users or events to display" })
1354
1354
  ] }) }) });
1355
1355
  }
1356
- const Pt = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], Rt = [
1356
+ const Rt = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], Vt = [
1357
1357
  "January",
1358
1358
  "February",
1359
1359
  "March",
@@ -1371,14 +1371,14 @@ function je(t) {
1371
1371
  const r = t.hexColor;
1372
1372
  return r ? { backgroundColor: r } : {};
1373
1373
  }
1374
- function Vt({ day: t, date: r, events: o, isCurrentMonth: s, onDayClick: a }) {
1375
- const i = q(r), x = 3, g = o.length;
1374
+ function Ut({ day: t, date: r, events: o, isCurrentMonth: s, onDayClick: a }) {
1375
+ const i = q(r), g = 3, f = o.length;
1376
1376
  return /* @__PURE__ */ n(
1377
1377
  "button",
1378
1378
  {
1379
1379
  type: "button",
1380
1380
  onClick: () => a?.(r),
1381
- className: m(
1381
+ className: h(
1382
1382
  "flex h-9 sm:h-11 flex-1 flex-col items-center justify-start gap-0.5 rounded-md pt-0.5 sm:pt-1",
1383
1383
  "hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
1384
1384
  "transition-colors",
@@ -1388,22 +1388,22 @@ function Vt({ day: t, date: r, events: o, isCurrentMonth: s, onDayClick: a }) {
1388
1388
  /* @__PURE__ */ e(
1389
1389
  "div",
1390
1390
  {
1391
- className: m(
1391
+ className: h(
1392
1392
  "flex size-5 sm:size-6 items-center justify-center rounded-full text-[10px] sm:text-xs font-medium",
1393
1393
  i && "bg-primary font-semibold text-primary-foreground"
1394
1394
  ),
1395
1395
  children: t
1396
1396
  }
1397
1397
  ),
1398
- g > 0 && /* @__PURE__ */ e("div", { className: "mt-0.5 flex items-center gap-0.5", children: g <= x ? o.map((c) => /* @__PURE__ */ e(
1398
+ f > 0 && /* @__PURE__ */ e("div", { className: "mt-0.5 flex items-center gap-0.5", children: f <= g ? o.map((c) => /* @__PURE__ */ e(
1399
1399
  "div",
1400
1400
  {
1401
1401
  className: "size-1 sm:size-1.5 rounded-full bg-primary",
1402
1402
  style: je(c)
1403
1403
  },
1404
1404
  c.id
1405
- )) : /* @__PURE__ */ n(oe, { children: [
1406
- o.slice(0, x).map((c) => /* @__PURE__ */ e(
1405
+ )) : /* @__PURE__ */ n(ne, { children: [
1406
+ o.slice(0, g).map((c) => /* @__PURE__ */ e(
1407
1407
  "div",
1408
1408
  {
1409
1409
  className: "size-1 sm:size-1.5 rounded-full bg-primary",
@@ -1413,70 +1413,70 @@ function Vt({ day: t, date: r, events: o, isCurrentMonth: s, onDayClick: a }) {
1413
1413
  )),
1414
1414
  /* @__PURE__ */ n("span", { className: "text-[6px] sm:text-[7px] font-medium text-muted-foreground", children: [
1415
1415
  "+",
1416
- g - x
1416
+ f - g
1417
1417
  ] })
1418
1418
  ] }) })
1419
1419
  ]
1420
1420
  }
1421
1421
  );
1422
1422
  }
1423
- function Ut({
1423
+ function Yt({
1424
1424
  date: t,
1425
1425
  events: r,
1426
1426
  onMonthClick: o,
1427
1427
  onDayClick: s
1428
1428
  }) {
1429
- const a = O(() => ht(t, 0), [t]);
1429
+ const a = B(() => mt(t, 0), [t]);
1430
1430
  return /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
1431
1431
  /* @__PURE__ */ e(
1432
1432
  "button",
1433
1433
  {
1434
1434
  type: "button",
1435
1435
  onClick: () => o?.(t),
1436
- className: m(
1436
+ className: h(
1437
1437
  "w-full rounded-t-lg border px-2 sm:px-3 py-1.5 sm:py-2 text-xs sm:text-sm font-semibold",
1438
1438
  "hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
1439
1439
  "transition-colors"
1440
1440
  ),
1441
- children: Rt[t.getMonth()]
1441
+ children: Vt[t.getMonth()]
1442
1442
  }
1443
1443
  ),
1444
1444
  /* @__PURE__ */ n("div", { className: "flex-1 space-y-1.5 sm:space-y-2 rounded-b-lg border border-t-0 p-2 sm:p-3", children: [
1445
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 text-center", children: Pt.map((i, x) => /* @__PURE__ */ n("div", { className: "text-[9px] sm:text-xs font-medium text-muted-foreground", children: [
1445
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 text-center", children: Rt.map((i, g) => /* @__PURE__ */ n("div", { className: "text-[9px] sm:text-xs font-medium text-muted-foreground", children: [
1446
1446
  /* @__PURE__ */ e("span", { className: "sm:hidden", children: i[0] }),
1447
1447
  /* @__PURE__ */ e("span", { className: "hidden sm:inline", children: i })
1448
- ] }, x)) }),
1449
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 gap-y-1", children: a.map((i, x) => {
1450
- const g = mt(r, i.date);
1448
+ ] }, g)) }),
1449
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 gap-y-1", children: a.map((i, g) => {
1450
+ const f = ft(r, i.date);
1451
1451
  return /* @__PURE__ */ e(
1452
- Vt,
1452
+ Ut,
1453
1453
  {
1454
1454
  day: i.date.getDate(),
1455
1455
  date: i.date,
1456
- events: g,
1456
+ events: f,
1457
1457
  isCurrentMonth: i.isCurrentMonth,
1458
1458
  onDayClick: s
1459
1459
  },
1460
- `${x + 1}-${i.date.toISOString()}`
1460
+ `${g + 1}-${i.date.toISOString()}`
1461
1461
  );
1462
1462
  }) })
1463
1463
  ] })
1464
1464
  ] });
1465
1465
  }
1466
- function Yt({
1466
+ function Gt({
1467
1467
  events: t,
1468
1468
  year: r,
1469
1469
  onMonthClick: o,
1470
1470
  onDayClick: s,
1471
1471
  className: a,
1472
1472
  slots: i,
1473
- classNames: x
1473
+ classNames: g
1474
1474
  }) {
1475
- const g = O(() => ut(r), [r]);
1476
- return /* @__PURE__ */ n("div", { className: m("flex flex-col h-full", a), children: [
1475
+ const f = B(() => ht(r), [r]);
1476
+ return /* @__PURE__ */ n("div", { className: h("flex flex-col h-full", a), children: [
1477
1477
  /* @__PURE__ */ e("div", { className: "flex items-center justify-center border-b px-4 py-3", children: /* @__PURE__ */ e("h2", { className: "text-lg font-semibold", children: r }) }),
1478
- /* @__PURE__ */ e("div", { className: "flex-1 overflow-auto p-4", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4", children: g.map((c) => /* @__PURE__ */ e(
1479
- Ut,
1478
+ /* @__PURE__ */ e("div", { className: "flex-1 overflow-auto p-4", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4", children: f.map((c) => /* @__PURE__ */ e(
1479
+ Yt,
1480
1480
  {
1481
1481
  date: c,
1482
1482
  events: t,
@@ -1487,7 +1487,7 @@ function Yt({
1487
1487
  )) }) })
1488
1488
  ] });
1489
1489
  }
1490
- function Gt(t) {
1490
+ function Kt(t) {
1491
1491
  switch (t) {
1492
1492
  case "day":
1493
1493
  case "week":
@@ -1496,66 +1496,67 @@ function Gt(t) {
1496
1496
  return "day";
1497
1497
  }
1498
1498
  }
1499
- function Kt({
1499
+ function qt({
1500
1500
  onEventClick: t,
1501
1501
  onSlotClick: r,
1502
1502
  onSlotSelect: o,
1503
1503
  onAddEvent: s,
1504
1504
  className: a,
1505
1505
  showHeader: i = !0,
1506
- minSelectionMinutes: x = 30,
1507
- showMoreEventsInPopover: g = !1,
1508
- isLoading: c = !1,
1509
- slots: d,
1510
- classNames: w,
1511
- settingsContent: C,
1512
- filterContent: z,
1513
- headerActions: I,
1514
- renderPopover: H,
1515
- calendarRef: N
1506
+ minSelectionMinutes: g = 30,
1507
+ showMoreMode: f,
1508
+ showMoreEventsInPopover: c = !1,
1509
+ isLoading: x = !1,
1510
+ slots: y,
1511
+ classNames: p,
1512
+ settingsContent: M,
1513
+ filterContent: A,
1514
+ headerActions: z,
1515
+ renderPopover: C,
1516
+ calendarRef: S
1516
1517
  }) {
1517
- const {
1518
- view: p,
1519
- setView: D,
1520
- selectedDate: k,
1521
- setSelectedDate: S,
1522
- slotDuration: T,
1523
- filteredEvents: G,
1524
- users: V,
1525
- visibleHours: B,
1526
- workingHours: j,
1518
+ const L = f ?? (c ? "popover" : "expand"), {
1519
+ view: w,
1520
+ setView: T,
1521
+ selectedDate: D,
1522
+ setSelectedDate: F,
1523
+ slotDuration: R,
1524
+ filteredEvents: V,
1525
+ users: $,
1526
+ visibleHours: O,
1527
+ workingHours: I,
1527
1528
  badgeVariant: P,
1528
- showWorkingHoursOnly: $
1529
- } = Xe(), W = O(() => {
1530
- if (!$ || !j)
1529
+ showWorkingHoursOnly: U
1530
+ } = Qe(), u = B(() => {
1531
+ if (!U || !I)
1531
1532
  return {
1532
- startHour: B.start,
1533
- endHour: B.end
1533
+ startHour: O.start,
1534
+ endHour: O.end
1534
1535
  };
1535
- let u = 24, E = 0;
1536
- for (const A of Object.keys(j)) {
1537
- const F = j[Number(A)];
1538
- !F || F.enabled === !1 || (F.from < u && (u = F.from), F.to > E && (E = F.to));
1536
+ let m = 24, N = 0;
1537
+ for (const W of Object.keys(I)) {
1538
+ const j = I[Number(W)];
1539
+ !j || j.enabled === !1 || (j.from < m && (m = j.from), j.to > N && (N = j.to));
1539
1540
  }
1540
- return u >= E ? {
1541
- startHour: B.start,
1542
- endHour: B.end
1543
- } : { startHour: u, endHour: E };
1544
- }, [$, j, B]), U = W, f = ke(null);
1545
- Ze(
1546
- N,
1541
+ return m >= N ? {
1542
+ startHour: O.start,
1543
+ endHour: O.end
1544
+ } : { startHour: m, endHour: N };
1545
+ }, [U, I, O]), l = u, d = Ne(null);
1546
+ et(
1547
+ S,
1547
1548
  () => ({
1548
1549
  scrollToToday: () => {
1549
- const u = /* @__PURE__ */ new Date();
1550
- S(u, p), requestAnimationFrame(() => {
1550
+ const m = /* @__PURE__ */ new Date();
1551
+ F(m, w), requestAnimationFrame(() => {
1551
1552
  requestAnimationFrame(() => {
1552
- const E = f.current?.querySelector(
1553
+ const N = d.current?.querySelector(
1553
1554
  ".ic-timeline-scroll-container, [class*='overflow-auto']"
1554
1555
  );
1555
- if (!E) return;
1556
- const Y = (u.getHours() - W.startHour) * 96;
1557
- Y > 0 && E.scrollTo({
1558
- top: Math.max(0, Y - 100),
1556
+ if (!N) return;
1557
+ const G = (m.getHours() - u.startHour) * 96;
1558
+ G > 0 && N.scrollTo({
1559
+ top: Math.max(0, G - 100),
1559
1560
  // Offset to show some context
1560
1561
  behavior: "smooth"
1561
1562
  });
@@ -1563,253 +1564,253 @@ function Kt({
1563
1564
  });
1564
1565
  },
1565
1566
  scrollToWorkingHours: () => {
1566
- let u = 8;
1567
- if (j)
1568
- for (const E of Object.keys(j)) {
1569
- const A = j[Number(E)];
1570
- A?.enabled && A.from < u && (u = Math.max(A.from - 1, 0));
1567
+ let m = 8;
1568
+ if (I)
1569
+ for (const N of Object.keys(I)) {
1570
+ const W = I[Number(N)];
1571
+ W?.enabled && W.from < m && (m = Math.max(W.from - 1, 0));
1571
1572
  }
1572
1573
  requestAnimationFrame(() => {
1573
1574
  requestAnimationFrame(() => {
1574
- const E = f.current?.querySelector(
1575
+ const N = d.current?.querySelector(
1575
1576
  ".ic-timeline-scroll-container, [class*='overflow-auto']"
1576
1577
  );
1577
- if (!E) return;
1578
- const F = (u - W.startHour) * 96;
1579
- E.scrollTo({
1580
- top: Math.max(0, F),
1578
+ if (!N) return;
1579
+ const j = (m - u.startHour) * 96;
1580
+ N.scrollTo({
1581
+ top: Math.max(0, j),
1581
1582
  behavior: "smooth"
1582
1583
  });
1583
1584
  });
1584
1585
  });
1585
1586
  },
1586
- getViewRect: () => f.current?.getBoundingClientRect() ?? null
1587
+ getViewRect: () => d.current?.getBoundingClientRect() ?? null
1587
1588
  }),
1588
- [S, p, W, j]
1589
+ [F, w, u, I]
1589
1590
  );
1590
- const l = O(() => Gt(p), [p]), h = se(
1591
- (u) => {
1591
+ const v = B(() => Kt(w), [w]), k = oe(
1592
+ (m) => {
1592
1593
  if (o) {
1593
- o(u);
1594
+ o(m);
1594
1595
  return;
1595
1596
  }
1596
1597
  if (r) {
1597
- const E = u.startDate.getHours();
1598
- r(u.startDate, E);
1598
+ const N = m.startDate.getHours();
1599
+ r(m.startDate, N);
1599
1600
  }
1600
1601
  },
1601
1602
  [o, r]
1602
- ), v = se(
1603
- (u) => {
1604
- D("day"), S(u, "day");
1603
+ ), b = oe(
1604
+ (m) => {
1605
+ T("day"), F(m, "day");
1605
1606
  },
1606
- [S, D]
1607
- ), b = se(
1608
- (u) => {
1609
- D("month"), S(u, "month");
1607
+ [F, T]
1608
+ ), H = oe(
1609
+ (m) => {
1610
+ T("month"), F(m, "month");
1610
1611
  },
1611
- [S, D]
1612
- ), y = se(
1613
- (u) => {
1614
- t?.(u);
1612
+ [F, T]
1613
+ ), E = oe(
1614
+ (m) => {
1615
+ t?.(m);
1615
1616
  },
1616
1617
  [t]
1617
- ), L = () => {
1618
- const u = G, E = y, A = H;
1619
- switch (p) {
1618
+ ), _ = () => {
1619
+ const m = V, N = E, W = C;
1620
+ switch (w) {
1620
1621
  case "day":
1621
1622
  return /* @__PURE__ */ e(
1622
- it,
1623
+ lt,
1623
1624
  {
1624
- events: u,
1625
- date: k,
1626
- visibleHours: U,
1627
- workingHours: j,
1628
- slotDuration: T,
1625
+ events: m,
1626
+ date: D,
1627
+ visibleHours: l,
1628
+ workingHours: I,
1629
+ slotDuration: R,
1629
1630
  badgeVariant: P,
1630
- onEventClick: E,
1631
- renderPopover: A,
1632
- ...d && { slots: d },
1633
- ...w && { classNames: w }
1631
+ onEventClick: N,
1632
+ renderPopover: W,
1633
+ ...y && { slots: y },
1634
+ ...p && { classNames: p }
1634
1635
  }
1635
1636
  );
1636
1637
  case "week":
1637
1638
  return /* @__PURE__ */ e(
1638
- at,
1639
+ it,
1639
1640
  {
1640
- events: u,
1641
- date: k,
1642
- visibleHours: U,
1643
- workingHours: j,
1644
- slotDuration: T,
1641
+ events: m,
1642
+ date: D,
1643
+ visibleHours: l,
1644
+ workingHours: I,
1645
+ slotDuration: R,
1645
1646
  badgeVariant: P,
1646
- onEventClick: E,
1647
- renderPopover: A,
1648
- ...d && { slots: d },
1649
- ...w && { classNames: w }
1647
+ onEventClick: N,
1648
+ renderPopover: W,
1649
+ ...y && { slots: y },
1650
+ ...p && { classNames: p }
1650
1651
  }
1651
1652
  );
1652
1653
  case "month":
1653
1654
  return /* @__PURE__ */ e(
1654
1655
  De,
1655
1656
  {
1656
- events: u,
1657
- date: k,
1657
+ events: m,
1658
+ date: D,
1658
1659
  badgeVariant: P,
1659
- onEventClick: E,
1660
- onDayClick: v,
1661
- renderPopover: A,
1662
- showMoreEventsInPopover: g,
1663
- ...d && { slots: d },
1664
- ...w && { classNames: w }
1660
+ onEventClick: N,
1661
+ onDayClick: b,
1662
+ renderPopover: W,
1663
+ showMoreMode: L,
1664
+ ...y && { slots: y },
1665
+ ...p && { classNames: p }
1665
1666
  }
1666
1667
  );
1667
1668
  case "year":
1668
1669
  return /* @__PURE__ */ e(
1669
- Yt,
1670
+ Gt,
1670
1671
  {
1671
- events: u,
1672
- year: k.getFullYear(),
1673
- onMonthClick: b,
1674
- onDayClick: v,
1675
- ...d && { slots: d },
1676
- ...w && { classNames: w }
1672
+ events: m,
1673
+ year: D.getFullYear(),
1674
+ onMonthClick: H,
1675
+ onDayClick: b,
1676
+ ...y && { slots: y },
1677
+ ...p && { classNames: p }
1677
1678
  }
1678
1679
  );
1679
1680
  case "agenda":
1680
1681
  return /* @__PURE__ */ e(
1681
- st,
1682
+ at,
1682
1683
  {
1683
- events: u,
1684
- date: k,
1685
- onEventClick: E,
1686
- renderPopover: A,
1687
- ...d && { slots: d },
1688
- ...w && { classNames: w }
1684
+ events: m,
1685
+ date: D,
1686
+ onEventClick: N,
1687
+ renderPopover: W,
1688
+ ...y && { slots: y },
1689
+ ...p && { classNames: p }
1689
1690
  }
1690
1691
  );
1691
1692
  // Timeline views
1692
1693
  case "timeline-day":
1693
1694
  return /* @__PURE__ */ e(
1694
- ve,
1695
+ we,
1695
1696
  {
1696
1697
  daysToShow: 1,
1697
- events: u,
1698
- users: V,
1699
- selectedDate: k,
1698
+ events: m,
1699
+ users: $,
1700
+ selectedDate: D,
1700
1701
  visibleHours: {
1701
- from: W.startHour,
1702
- to: W.endHour
1702
+ from: u.startHour,
1703
+ to: u.endHour
1703
1704
  },
1704
- onEventClick: E,
1705
- renderPopover: A,
1706
- ...d && { slots: d },
1707
- ...w && { classNames: w }
1705
+ onEventClick: N,
1706
+ renderPopover: W,
1707
+ ...y && { slots: y },
1708
+ ...p && { classNames: p }
1708
1709
  }
1709
1710
  );
1710
1711
  case "timeline-3day":
1711
1712
  return /* @__PURE__ */ e(
1712
- ve,
1713
+ we,
1713
1714
  {
1714
1715
  daysToShow: 3,
1715
- events: u,
1716
- users: V,
1717
- selectedDate: k,
1716
+ events: m,
1717
+ users: $,
1718
+ selectedDate: D,
1718
1719
  visibleHours: {
1719
- from: W.startHour,
1720
- to: W.endHour
1720
+ from: u.startHour,
1721
+ to: u.endHour
1721
1722
  },
1722
- onEventClick: E,
1723
- renderPopover: A,
1724
- ...d && { slots: d },
1725
- ...w && { classNames: w }
1723
+ onEventClick: N,
1724
+ renderPopover: W,
1725
+ ...y && { slots: y },
1726
+ ...p && { classNames: p }
1726
1727
  }
1727
1728
  );
1728
1729
  case "timeline-week":
1729
1730
  return /* @__PURE__ */ e(
1730
- ve,
1731
+ we,
1731
1732
  {
1732
1733
  daysToShow: 7,
1733
- events: u,
1734
- users: V,
1735
- selectedDate: k,
1734
+ events: m,
1735
+ users: $,
1736
+ selectedDate: D,
1736
1737
  visibleHours: {
1737
- from: W.startHour,
1738
- to: W.endHour
1738
+ from: u.startHour,
1739
+ to: u.endHour
1739
1740
  },
1740
- onEventClick: E,
1741
- renderPopover: A,
1742
- ...d && { slots: d },
1743
- ...w && { classNames: w }
1741
+ onEventClick: N,
1742
+ renderPopover: W,
1743
+ ...y && { slots: y },
1744
+ ...p && { classNames: p }
1744
1745
  }
1745
1746
  );
1746
1747
  default:
1747
1748
  return /* @__PURE__ */ e(
1748
1749
  De,
1749
1750
  {
1750
- events: u,
1751
- date: k,
1751
+ events: m,
1752
+ date: D,
1752
1753
  badgeVariant: P,
1753
- onEventClick: E,
1754
- onDayClick: v,
1755
- ...d && { slots: d },
1756
- ...w && { classNames: w }
1754
+ onEventClick: N,
1755
+ onDayClick: b,
1756
+ ...y && { slots: y },
1757
+ ...p && { classNames: p }
1757
1758
  }
1758
1759
  );
1759
1760
  }
1760
- }, M = ke(null), [_, J] = ae(!1);
1761
+ }, Y = Ne(null), [K, J] = se(!1);
1761
1762
  he(() => {
1762
- f.current = M.current;
1763
+ d.current = Y.current;
1763
1764
  }), he(() => {
1764
- const u = M.current;
1765
- if (!u) return;
1766
- const E = () => {
1767
- const { scrollLeft: Y, scrollWidth: R, clientWidth: X } = u;
1768
- J(Y + X < R - 4);
1765
+ const m = Y.current;
1766
+ if (!m) return;
1767
+ const N = () => {
1768
+ const { scrollLeft: G, scrollWidth: me, clientWidth: Ke } = m;
1769
+ J(G + Ke < me - 4);
1769
1770
  };
1770
- E(), u.addEventListener("scroll", E, { passive: !0 });
1771
- const A = new ResizeObserver(E);
1772
- A.observe(u);
1773
- const F = new MutationObserver(E);
1774
- return F.observe(u, { childList: !0, subtree: !0 }), () => {
1775
- u.removeEventListener("scroll", E), A.disconnect(), F.disconnect();
1771
+ N(), m.addEventListener("scroll", N, { passive: !0 });
1772
+ const W = new ResizeObserver(N);
1773
+ W.observe(m);
1774
+ const j = new MutationObserver(N);
1775
+ return j.observe(m, { childList: !0, subtree: !0 }), () => {
1776
+ m.removeEventListener("scroll", N), W.disconnect(), j.disconnect();
1776
1777
  };
1777
- }, [p]);
1778
- const K = se(() => {
1779
- M.current?.scrollBy({ left: 300, behavior: "smooth" });
1778
+ }, [w]);
1779
+ const ie = oe(() => {
1780
+ Y.current?.scrollBy({ left: 300, behavior: "smooth" });
1780
1781
  }, []);
1781
1782
  return /* @__PURE__ */ e(
1782
- dt,
1783
+ ut,
1783
1784
  {
1784
- mode: l,
1785
- onSelect: h,
1786
- minDurationMinutes: x,
1787
- slotDurationMinutes: T,
1785
+ mode: v,
1786
+ onSelect: k,
1787
+ minDurationMinutes: g,
1788
+ slotDurationMinutes: R,
1788
1789
  enabled: !!(o || r),
1789
1790
  children: /* @__PURE__ */ n(
1790
1791
  "div",
1791
1792
  {
1792
- className: m(
1793
+ className: h(
1793
1794
  "inno-calendar-root flex flex-col h-full p-4",
1794
- w?.root,
1795
+ p?.root,
1795
1796
  a
1796
1797
  ),
1797
1798
  children: [
1798
1799
  i && /* @__PURE__ */ e(
1799
- ot,
1800
+ st,
1800
1801
  {
1801
- currentDate: k,
1802
- view: p,
1803
- events: G,
1804
- onViewChange: D,
1805
- onNavigateToday: () => S(/* @__PURE__ */ new Date(), p),
1802
+ currentDate: D,
1803
+ view: w,
1804
+ events: V,
1805
+ onViewChange: T,
1806
+ onNavigateToday: () => F(/* @__PURE__ */ new Date(), w),
1806
1807
  onNavigatePrev: () => {
1807
- const u = new Date(k);
1808
- p === "day" || p === "timeline-day" ? u.setDate(u.getDate() - 1) : p === "timeline-3day" ? u.setDate(u.getDate() - 3) : p === "week" || p === "timeline-week" ? u.setDate(u.getDate() - 7) : p === "month" ? u.setMonth(u.getMonth() - 1) : p === "year" ? u.setFullYear(u.getFullYear() - 1) : u.setDate(u.getDate() - 7), S(u, p);
1808
+ const m = new Date(D);
1809
+ w === "day" || w === "timeline-day" ? m.setDate(m.getDate() - 1) : w === "timeline-3day" ? m.setDate(m.getDate() - 3) : w === "week" || w === "timeline-week" ? m.setDate(m.getDate() - 7) : w === "month" ? m.setMonth(m.getMonth() - 1) : w === "year" ? m.setFullYear(m.getFullYear() - 1) : m.setDate(m.getDate() - 7), F(m, w);
1809
1810
  },
1810
1811
  onNavigateNext: () => {
1811
- const u = new Date(k);
1812
- p === "day" || p === "timeline-day" ? u.setDate(u.getDate() + 1) : p === "timeline-3day" ? u.setDate(u.getDate() + 3) : p === "week" || p === "timeline-week" ? u.setDate(u.getDate() + 7) : p === "month" ? u.setMonth(u.getMonth() + 1) : p === "year" ? u.setFullYear(u.getFullYear() + 1) : u.setDate(u.getDate() + 7), S(u, p);
1812
+ const m = new Date(D);
1813
+ w === "day" || w === "timeline-day" ? m.setDate(m.getDate() + 1) : w === "timeline-3day" ? m.setDate(m.getDate() + 3) : w === "week" || w === "timeline-week" ? m.setDate(m.getDate() + 7) : w === "month" ? m.setMonth(m.getMonth() + 1) : w === "year" ? m.setFullYear(m.getFullYear() + 1) : m.setDate(m.getDate() + 7), F(m, w);
1813
1814
  },
1814
1815
  availableViews: [
1815
1816
  "day",
@@ -1819,31 +1820,31 @@ function Kt({
1819
1820
  "agenda"
1820
1821
  ],
1821
1822
  showTimelineViews: !0,
1822
- showSettings: !!C,
1823
- ...!I && s && { onAddEvent: s },
1824
- actions: I,
1825
- settingsContent: C,
1826
- filterContent: z
1823
+ showSettings: !!M,
1824
+ ...!z && s && { onAddEvent: s },
1825
+ actions: z,
1826
+ settingsContent: M,
1827
+ filterContent: A
1827
1828
  }
1828
1829
  ),
1829
1830
  /* @__PURE__ */ n("div", { className: "relative flex-1 min-h-0", children: [
1830
1831
  /* @__PURE__ */ e(
1831
1832
  "div",
1832
1833
  {
1833
- ref: M,
1834
- className: m(
1834
+ ref: Y,
1835
+ className: h(
1835
1836
  "h-full border rounded-lg bg-white overflow-x-auto",
1836
- w?.viewContainer
1837
+ p?.viewContainer
1837
1838
  ),
1838
- children: L()
1839
+ children: _()
1839
1840
  }
1840
1841
  ),
1841
- c && /* @__PURE__ */ e("div", { className: "inno-calendar-loading-overlay", children: /* @__PURE__ */ e("div", { className: "inno-calendar-spinner" }) }),
1842
- _ && /* @__PURE__ */ e(
1842
+ x && /* @__PURE__ */ e("div", { className: "inno-calendar-loading-overlay", children: /* @__PURE__ */ e("div", { className: "inno-calendar-spinner" }) }),
1843
+ K && /* @__PURE__ */ e(
1843
1844
  "button",
1844
1845
  {
1845
1846
  type: "button",
1846
- onClick: K,
1847
+ onClick: ie,
1847
1848
  className: "inno-scroll-right-btn",
1848
1849
  "aria-label": "Scroll right",
1849
1850
  children: /* @__PURE__ */ n(
@@ -1874,39 +1875,40 @@ function Kt({
1874
1875
  }
1875
1876
  );
1876
1877
  }
1877
- function qt({
1878
+ function Jt({
1878
1879
  events: t,
1879
1880
  users: r = [],
1880
1881
  scheduleTypes: o = [],
1881
1882
  initialView: s = "week",
1882
1883
  initialDate: a,
1883
1884
  initialSelectedUserId: i,
1884
- initialScheduleTypeIds: x,
1885
- initialParticipantIds: g,
1885
+ initialScheduleTypeIds: g,
1886
+ initialParticipantIds: f,
1886
1887
  initialWorkingHoursView: c,
1887
- initialSearchQuery: d,
1888
- preferencesConfig: w,
1889
- onEventClick: C,
1890
- onSlotClick: z,
1891
- onSlotSelect: I,
1892
- onAddEvent: H,
1893
- onEventDrop: N,
1894
- onDateChange: p,
1895
- onViewChange: D,
1896
- className: k,
1897
- showHeader: S = !0,
1898
- minSelectionMinutes: T = 30,
1899
- showMoreEventsInPopover: G = !1,
1888
+ initialSearchQuery: x,
1889
+ preferencesConfig: y,
1890
+ onEventClick: p,
1891
+ onSlotClick: M,
1892
+ onSlotSelect: A,
1893
+ onAddEvent: z,
1894
+ onEventDrop: C,
1895
+ onDateChange: S,
1896
+ onViewChange: L,
1897
+ className: w,
1898
+ showHeader: T = !0,
1899
+ minSelectionMinutes: D = 30,
1900
+ showMoreMode: F,
1901
+ showMoreEventsInPopover: R = !1,
1900
1902
  isLoading: V = !1,
1901
- renderPopover: B,
1902
- slots: j,
1903
- classNames: P,
1904
- settingsContent: $,
1905
- filterContent: W,
1906
- headerActions: U
1907
- }, f) {
1908
- return /* @__PURE__ */ e(ct, { ...N && { onEventDrop: N }, children: /* @__PURE__ */ e(
1909
- Je,
1903
+ renderPopover: $,
1904
+ slots: O,
1905
+ classNames: I,
1906
+ settingsContent: P,
1907
+ filterContent: U,
1908
+ headerActions: u
1909
+ }, l) {
1910
+ return /* @__PURE__ */ e(dt, { ...C && { onEventDrop: C }, children: /* @__PURE__ */ e(
1911
+ Xe,
1910
1912
  {
1911
1913
  initialEvents: t,
1912
1914
  initialUsers: r,
@@ -1914,43 +1916,44 @@ function qt({
1914
1916
  initialView: s,
1915
1917
  ...a && { initialDate: a },
1916
1918
  ...i && { initialSelectedUserId: i },
1917
- ...x && { initialScheduleTypeIds: x },
1918
- ...g && { initialParticipantIds: g },
1919
+ ...g && { initialScheduleTypeIds: g },
1920
+ ...f && { initialParticipantIds: f },
1919
1921
  ...c && { initialWorkingHoursView: c },
1920
- ...d && { initialSearchQuery: d },
1921
- ...w && { preferencesConfig: w },
1922
- ...p && { onDateChange: p },
1923
- ...D && { onViewChange: D },
1922
+ ...x && { initialSearchQuery: x },
1923
+ ...y && { preferencesConfig: y },
1924
+ ...S && { onDateChange: S },
1925
+ ...L && { onViewChange: L },
1924
1926
  children: /* @__PURE__ */ e(
1925
- Kt,
1927
+ qt,
1926
1928
  {
1927
- ...C && { onEventClick: C },
1928
- ...z && { onSlotClick: z },
1929
- ...I && { onSlotSelect: I },
1930
- ...H && { onAddEvent: H },
1931
- ...B && { renderPopover: B },
1932
- className: k,
1933
- showHeader: S,
1934
- minSelectionMinutes: T,
1935
- showMoreEventsInPopover: G,
1929
+ ...p && { onEventClick: p },
1930
+ ...M && { onSlotClick: M },
1931
+ ...A && { onSlotSelect: A },
1932
+ ...z && { onAddEvent: z },
1933
+ ...$ && { renderPopover: $ },
1934
+ className: w,
1935
+ showHeader: T,
1936
+ minSelectionMinutes: D,
1937
+ ...F && { showMoreMode: F },
1938
+ showMoreEventsInPopover: R,
1936
1939
  isLoading: V,
1937
- ...j && { slots: j },
1938
- ...P && { classNames: P },
1939
- settingsContent: $,
1940
- filterContent: W,
1941
- headerActions: U,
1942
- calendarRef: f
1940
+ ...O && { slots: O },
1941
+ ...I && { classNames: I },
1942
+ settingsContent: P,
1943
+ filterContent: U,
1944
+ headerActions: u,
1945
+ calendarRef: l
1943
1946
  }
1944
1947
  )
1945
1948
  }
1946
1949
  ) });
1947
1950
  }
1948
- const Yr = fe(qt), ne = fe(
1951
+ const Gr = ge(Jt), re = ge(
1949
1952
  ({ className: t, children: r, ...o }, s) => /* @__PURE__ */ e(
1950
1953
  "select",
1951
1954
  {
1952
1955
  ref: s,
1953
- className: m(
1956
+ className: h(
1954
1957
  "flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm",
1955
1958
  "ring-offset-background",
1956
1959
  "focus:outline-none focus:ring-1 focus:ring-ring",
@@ -1963,20 +1966,20 @@ const Yr = fe(qt), ne = fe(
1963
1966
  }
1964
1967
  )
1965
1968
  );
1966
- ne.displayName = "Select";
1967
- const Q = fe(({ className: t, ...r }, o) => /* @__PURE__ */ e(
1969
+ re.displayName = "Select";
1970
+ const X = ge(({ className: t, ...r }, o) => /* @__PURE__ */ e(
1968
1971
  "label",
1969
1972
  {
1970
1973
  ref: o,
1971
- className: m(
1974
+ className: h(
1972
1975
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
1973
1976
  t
1974
1977
  ),
1975
1978
  ...r
1976
1979
  }
1977
1980
  ));
1978
- Q.displayName = "Label";
1979
- function Jt({ className: t }) {
1981
+ X.displayName = "Label";
1982
+ function Xt({ className: t }) {
1980
1983
  return /* @__PURE__ */ n(
1981
1984
  "svg",
1982
1985
  {
@@ -1998,7 +2001,7 @@ function Jt({ className: t }) {
1998
2001
  }
1999
2002
  );
2000
2003
  }
2001
- function Xt({ className: t }) {
2004
+ function Qt({ className: t }) {
2002
2005
  return /* @__PURE__ */ n(
2003
2006
  "svg",
2004
2007
  {
@@ -2019,12 +2022,12 @@ function Xt({ className: t }) {
2019
2022
  }
2020
2023
  );
2021
2024
  }
2022
- const Qt = [
2025
+ const Zt = [
2023
2026
  { value: 15, label: "15 minutes" },
2024
2027
  { value: 30, label: "30 minutes" },
2025
2028
  { value: 60, label: "1 hour" }
2026
2029
  ];
2027
- function Gr({
2030
+ function Kr({
2028
2031
  value: t,
2029
2032
  onChange: r,
2030
2033
  isLocked: o = !1,
@@ -2036,33 +2039,33 @@ function Gr({
2036
2039
  lockedMessage: "This setting is locked by the administrator",
2037
2040
  infoMessage: "Set the time slot duration for day and week calendar views.",
2038
2041
  ...a
2039
- }, x = (g) => {
2040
- o || r(Number(g.target.value));
2042
+ }, g = (f) => {
2043
+ o || r(Number(f.target.value));
2041
2044
  };
2042
- return /* @__PURE__ */ n("div", { className: m("flex flex-col gap-3", s), children: [
2045
+ return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-3", s), children: [
2043
2046
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
2044
- /* @__PURE__ */ e(Q, { className: "text-sm font-semibold", children: i.title }),
2045
- o ? /* @__PURE__ */ e(Z, { delayDuration: 100, children: /* @__PURE__ */ n(ee, { children: [
2046
- /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(Xt, { className: "size-3 text-muted-foreground" }) }),
2047
- /* @__PURE__ */ e(re, { children: /* @__PURE__ */ e("p", { children: i.lockedMessage }) })
2048
- ] }) }) : /* @__PURE__ */ e(Z, { delayDuration: 100, children: /* @__PURE__ */ n(ee, { children: [
2049
- /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(Jt, { className: "size-3 text-muted-foreground" }) }),
2050
- /* @__PURE__ */ e(re, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: i.infoMessage }) })
2047
+ /* @__PURE__ */ e(X, { className: "text-sm font-semibold", children: i.title }),
2048
+ o ? /* @__PURE__ */ e(Q, { delayDuration: 100, children: /* @__PURE__ */ n(Z, { children: [
2049
+ /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(Qt, { className: "size-3 text-muted-foreground" }) }),
2050
+ /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e("p", { children: i.lockedMessage }) })
2051
+ ] }) }) : /* @__PURE__ */ e(Q, { delayDuration: 100, children: /* @__PURE__ */ n(Z, { children: [
2052
+ /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(Xt, { className: "size-3 text-muted-foreground" }) }),
2053
+ /* @__PURE__ */ e(te, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: i.infoMessage }) })
2051
2054
  ] }) })
2052
2055
  ] }),
2053
2056
  /* @__PURE__ */ e(
2054
- ne,
2057
+ re,
2055
2058
  {
2056
2059
  value: t.toString(),
2057
- onChange: x,
2060
+ onChange: g,
2058
2061
  disabled: o,
2059
2062
  className: "h-9 w-[128px] text-sm",
2060
- children: Qt.map((g) => /* @__PURE__ */ e("option", { value: g.value.toString(), children: g.label }, g.value))
2063
+ children: Zt.map((f) => /* @__PURE__ */ e("option", { value: f.value.toString(), children: f.label }, f.value))
2061
2064
  }
2062
2065
  )
2063
2066
  ] });
2064
2067
  }
2065
- function Zt({ className: t }) {
2068
+ function er({ className: t }) {
2066
2069
  return /* @__PURE__ */ n(
2067
2070
  "svg",
2068
2071
  {
@@ -2084,7 +2087,7 @@ function Zt({ className: t }) {
2084
2087
  }
2085
2088
  );
2086
2089
  }
2087
- function er({ className: t }) {
2090
+ function tr({ className: t }) {
2088
2091
  return /* @__PURE__ */ n(
2089
2092
  "svg",
2090
2093
  {
@@ -2105,12 +2108,12 @@ function er({ className: t }) {
2105
2108
  }
2106
2109
  );
2107
2110
  }
2108
- const tr = [
2111
+ const rr = [
2109
2112
  { value: "dot", label: "Dot indicator" },
2110
2113
  { value: "colored", label: "Full color" },
2111
2114
  { value: "mixed", label: "Mixed" }
2112
2115
  ];
2113
- function Kr({
2116
+ function qr({
2114
2117
  value: t,
2115
2118
  onChange: r,
2116
2119
  isLocked: o = !1,
@@ -2127,33 +2130,33 @@ function Kr({
2127
2130
  mixed: "Mixed"
2128
2131
  },
2129
2132
  ...a
2130
- }, x = (c) => i.options?.[c] ?? c, g = (c) => {
2133
+ }, g = (c) => i.options?.[c] ?? c, f = (c) => {
2131
2134
  o || r(c.target.value);
2132
2135
  };
2133
- return /* @__PURE__ */ n("div", { className: m("flex flex-col gap-3", s), children: [
2136
+ return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-3", s), children: [
2134
2137
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
2135
- /* @__PURE__ */ e(Q, { className: "text-sm font-semibold", children: i.title }),
2136
- o ? /* @__PURE__ */ e(Z, { delayDuration: 100, children: /* @__PURE__ */ n(ee, { children: [
2137
- /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(er, { className: "size-3 text-muted-foreground" }) }),
2138
- /* @__PURE__ */ e(re, { children: /* @__PURE__ */ e("p", { children: i.lockedMessage }) })
2139
- ] }) }) : /* @__PURE__ */ e(Z, { delayDuration: 100, children: /* @__PURE__ */ n(ee, { children: [
2140
- /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(Zt, { className: "size-3 text-muted-foreground" }) }),
2141
- /* @__PURE__ */ e(re, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: i.infoMessage }) })
2138
+ /* @__PURE__ */ e(X, { className: "text-sm font-semibold", children: i.title }),
2139
+ o ? /* @__PURE__ */ e(Q, { delayDuration: 100, children: /* @__PURE__ */ n(Z, { children: [
2140
+ /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(tr, { className: "size-3 text-muted-foreground" }) }),
2141
+ /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e("p", { children: i.lockedMessage }) })
2142
+ ] }) }) : /* @__PURE__ */ e(Q, { delayDuration: 100, children: /* @__PURE__ */ n(Z, { children: [
2143
+ /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(er, { className: "size-3 text-muted-foreground" }) }),
2144
+ /* @__PURE__ */ e(te, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: i.infoMessage }) })
2142
2145
  ] }) })
2143
2146
  ] }),
2144
2147
  /* @__PURE__ */ e(
2145
- ne,
2148
+ re,
2146
2149
  {
2147
2150
  value: t,
2148
- onChange: g,
2151
+ onChange: f,
2149
2152
  disabled: o,
2150
2153
  className: "h-9 w-[128px] text-sm",
2151
- children: tr.map((c) => /* @__PURE__ */ e("option", { value: c.value, children: x(c.value) }, c.value))
2154
+ children: rr.map((c) => /* @__PURE__ */ e("option", { value: c.value, children: g(c.value) }, c.value))
2152
2155
  }
2153
2156
  )
2154
2157
  ] });
2155
2158
  }
2156
- function rr({ className: t }) {
2159
+ function nr({ className: t }) {
2157
2160
  return /* @__PURE__ */ n(
2158
2161
  "svg",
2159
2162
  {
@@ -2175,7 +2178,7 @@ function rr({ className: t }) {
2175
2178
  }
2176
2179
  );
2177
2180
  }
2178
- function nr({ className: t }) {
2181
+ function or({ className: t }) {
2179
2182
  return /* @__PURE__ */ n(
2180
2183
  "svg",
2181
2184
  {
@@ -2196,13 +2199,13 @@ function nr({ className: t }) {
2196
2199
  }
2197
2200
  );
2198
2201
  }
2199
- function or() {
2202
+ function sr() {
2200
2203
  return Array.from({ length: 25 }, (t, r) => ({
2201
2204
  value: r,
2202
2205
  label: `${String(r).padStart(2, "0")}:00`
2203
2206
  }));
2204
2207
  }
2205
- function qr({
2208
+ function Jr({
2206
2209
  value: t,
2207
2210
  onChange: r,
2208
2211
  isLocked: o = !1,
@@ -2216,66 +2219,66 @@ function qr({
2216
2219
  lockedMessage: "This setting is locked by the administrator",
2217
2220
  infoMessage: "Set the visible hour range for day and week views. Hours outside this range will be hidden.",
2218
2221
  ...a
2219
- }, x = or(), g = (d) => {
2222
+ }, g = sr(), f = (x) => {
2220
2223
  if (o) return;
2221
- const w = Number(d.target.value);
2222
- w < t.endHour && r({ ...t, startHour: w });
2223
- }, c = (d) => {
2224
+ const y = Number(x.target.value);
2225
+ y < t.endHour && r({ ...t, startHour: y });
2226
+ }, c = (x) => {
2224
2227
  if (o) return;
2225
- const w = Number(d.target.value);
2226
- w > t.startHour && r({ ...t, endHour: w });
2228
+ const y = Number(x.target.value);
2229
+ y > t.startHour && r({ ...t, endHour: y });
2227
2230
  };
2228
- return /* @__PURE__ */ n("div", { className: m("flex flex-col gap-3", s), children: [
2231
+ return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-3", s), children: [
2229
2232
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
2230
- /* @__PURE__ */ e(Q, { className: "text-sm font-semibold", children: i.title }),
2231
- o ? /* @__PURE__ */ e(Z, { delayDuration: 100, children: /* @__PURE__ */ n(ee, { children: [
2232
- /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(nr, { className: "size-3 text-muted-foreground" }) }),
2233
- /* @__PURE__ */ e(re, { children: /* @__PURE__ */ e("p", { children: i.lockedMessage }) })
2234
- ] }) }) : /* @__PURE__ */ e(Z, { delayDuration: 100, children: /* @__PURE__ */ n(ee, { children: [
2235
- /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(rr, { className: "size-3 text-muted-foreground" }) }),
2236
- /* @__PURE__ */ e(re, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: i.infoMessage }) })
2233
+ /* @__PURE__ */ e(X, { className: "text-sm font-semibold", children: i.title }),
2234
+ o ? /* @__PURE__ */ e(Q, { delayDuration: 100, children: /* @__PURE__ */ n(Z, { children: [
2235
+ /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(or, { className: "size-3 text-muted-foreground" }) }),
2236
+ /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e("p", { children: i.lockedMessage }) })
2237
+ ] }) }) : /* @__PURE__ */ e(Q, { delayDuration: 100, children: /* @__PURE__ */ n(Z, { children: [
2238
+ /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(nr, { className: "size-3 text-muted-foreground" }) }),
2239
+ /* @__PURE__ */ e(te, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: i.infoMessage }) })
2237
2240
  ] }) })
2238
2241
  ] }),
2239
2242
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
2240
2243
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
2241
- /* @__PURE__ */ e(Q, { className: "text-xs text-muted-foreground", children: i.from }),
2244
+ /* @__PURE__ */ e(X, { className: "text-xs text-muted-foreground", children: i.from }),
2242
2245
  /* @__PURE__ */ e(
2243
- ne,
2246
+ re,
2244
2247
  {
2245
2248
  value: t.startHour.toString(),
2246
- onChange: g,
2249
+ onChange: f,
2247
2250
  disabled: o,
2248
2251
  className: "h-9 w-[88px] text-sm",
2249
- children: x.map((d) => /* @__PURE__ */ e(
2252
+ children: g.map((x) => /* @__PURE__ */ e(
2250
2253
  "option",
2251
2254
  {
2252
- value: d.value.toString(),
2253
- disabled: d.value >= t.endHour,
2254
- children: d.label
2255
+ value: x.value.toString(),
2256
+ disabled: x.value >= t.endHour,
2257
+ children: x.label
2255
2258
  },
2256
- d.value
2259
+ x.value
2257
2260
  ))
2258
2261
  }
2259
2262
  )
2260
2263
  ] }),
2261
2264
  /* @__PURE__ */ e("span", { className: "mt-5 text-muted-foreground", children: "—" }),
2262
2265
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
2263
- /* @__PURE__ */ e(Q, { className: "text-xs text-muted-foreground", children: i.to }),
2266
+ /* @__PURE__ */ e(X, { className: "text-xs text-muted-foreground", children: i.to }),
2264
2267
  /* @__PURE__ */ e(
2265
- ne,
2268
+ re,
2266
2269
  {
2267
2270
  value: t.endHour.toString(),
2268
2271
  onChange: c,
2269
2272
  disabled: o,
2270
2273
  className: "h-9 w-[88px] text-sm",
2271
- children: x.map((d) => /* @__PURE__ */ e(
2274
+ children: g.map((x) => /* @__PURE__ */ e(
2272
2275
  "option",
2273
2276
  {
2274
- value: d.value.toString(),
2275
- disabled: d.value <= t.startHour,
2276
- children: d.label
2277
+ value: x.value.toString(),
2278
+ disabled: x.value <= t.startHour,
2279
+ children: x.label
2277
2280
  },
2278
- d.value
2281
+ x.value
2279
2282
  ))
2280
2283
  }
2281
2284
  )
@@ -2283,7 +2286,7 @@ function qr({
2283
2286
  ] })
2284
2287
  ] });
2285
2288
  }
2286
- function sr({ className: t }) {
2289
+ function ar({ className: t }) {
2287
2290
  return /* @__PURE__ */ n(
2288
2291
  "svg",
2289
2292
  {
@@ -2305,7 +2308,7 @@ function sr({ className: t }) {
2305
2308
  }
2306
2309
  );
2307
2310
  }
2308
- function ar({ className: t }) {
2311
+ function ir({ className: t }) {
2309
2312
  return /* @__PURE__ */ n(
2310
2313
  "svg",
2311
2314
  {
@@ -2326,7 +2329,7 @@ function ar({ className: t }) {
2326
2329
  }
2327
2330
  );
2328
2331
  }
2329
- function ir({ className: t }) {
2332
+ function lr({ className: t }) {
2330
2333
  return /* @__PURE__ */ e(
2331
2334
  "svg",
2332
2335
  {
@@ -2344,7 +2347,7 @@ function ir({ className: t }) {
2344
2347
  }
2345
2348
  );
2346
2349
  }
2347
- const lr = [
2350
+ const cr = [
2348
2351
  "monday",
2349
2352
  "tuesday",
2350
2353
  "wednesday",
@@ -2353,7 +2356,7 @@ const lr = [
2353
2356
  "saturday",
2354
2357
  "sunday"
2355
2358
  ];
2356
- function cr() {
2359
+ function dr() {
2357
2360
  return Array.from({ length: 25 }, (t, r) => ({
2358
2361
  value: r,
2359
2362
  label: `${String(r).padStart(2, "0")}:00`
@@ -2368,17 +2371,17 @@ const We = {
2368
2371
  friday: "Fri",
2369
2372
  saturday: "Sat"
2370
2373
  };
2371
- function dr({ dayLabel: t, config: r, onChange: o, disabled: s, hourOptions: a }) {
2374
+ function ur({ dayLabel: t, config: r, onChange: o, disabled: s, hourOptions: a }) {
2372
2375
  const i = () => {
2373
2376
  s || o({ ...r, enabled: !r.enabled });
2374
- }, x = (c) => {
2375
- if (s) return;
2376
- const d = Number(c.target.value);
2377
- d < r.to && o({ ...r, from: d });
2378
2377
  }, g = (c) => {
2379
2378
  if (s) return;
2380
- const d = Number(c.target.value);
2381
- d > r.from && o({ ...r, to: d });
2379
+ const x = Number(c.target.value);
2380
+ x < r.to && o({ ...r, from: x });
2381
+ }, f = (c) => {
2382
+ if (s) return;
2383
+ const x = Number(c.target.value);
2384
+ x > r.from && o({ ...r, to: x });
2382
2385
  };
2383
2386
  return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
2384
2387
  /* @__PURE__ */ e(
@@ -2390,20 +2393,20 @@ function dr({ dayLabel: t, config: r, onChange: o, disabled: s, hourOptions: a }
2390
2393
  "aria-label": `Enable ${t}`,
2391
2394
  onClick: i,
2392
2395
  disabled: s,
2393
- className: m(
2396
+ className: h(
2394
2397
  "flex size-5 shrink-0 items-center justify-center rounded border transition-colors",
2395
2398
  r.enabled ? "border-primary bg-primary text-primary-foreground" : "border-input bg-background",
2396
2399
  s && "cursor-not-allowed opacity-50"
2397
2400
  ),
2398
- children: r.enabled && /* @__PURE__ */ e(ir, { className: "size-3" })
2401
+ children: r.enabled && /* @__PURE__ */ e(lr, { className: "size-3" })
2399
2402
  }
2400
2403
  ),
2401
- /* @__PURE__ */ e("span", { className: m("w-10 text-sm", !r.enabled && "text-muted-foreground"), children: t }),
2404
+ /* @__PURE__ */ e("span", { className: h("w-10 text-sm", !r.enabled && "text-muted-foreground"), children: t }),
2402
2405
  /* @__PURE__ */ e(
2403
- ne,
2406
+ re,
2404
2407
  {
2405
2408
  value: r.from.toString(),
2406
- onChange: x,
2409
+ onChange: g,
2407
2410
  disabled: s || !r.enabled,
2408
2411
  className: "h-8 w-[76px] text-xs",
2409
2412
  children: a.map((c) => /* @__PURE__ */ e("option", { value: c.value.toString(), disabled: c.value >= r.to, children: c.label }, c.value))
@@ -2411,10 +2414,10 @@ function dr({ dayLabel: t, config: r, onChange: o, disabled: s, hourOptions: a }
2411
2414
  ),
2412
2415
  /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: "—" }),
2413
2416
  /* @__PURE__ */ e(
2414
- ne,
2417
+ re,
2415
2418
  {
2416
2419
  value: r.to.toString(),
2417
- onChange: g,
2420
+ onChange: f,
2418
2421
  disabled: s || !r.enabled,
2419
2422
  className: "h-8 w-[76px] text-xs",
2420
2423
  children: a.map((c) => /* @__PURE__ */ e("option", { value: c.value.toString(), disabled: c.value <= r.from, children: c.label }, c.value))
@@ -2422,7 +2425,7 @@ function dr({ dayLabel: t, config: r, onChange: o, disabled: s, hourOptions: a }
2422
2425
  )
2423
2426
  ] });
2424
2427
  }
2425
- function Jr({
2428
+ function Xr({
2426
2429
  value: t,
2427
2430
  onChange: r,
2428
2431
  isLocked: o = !1,
@@ -2435,34 +2438,34 @@ function Jr({
2435
2438
  infoMessage: "Configure working hours for each day of the week. Non-working hours will be grayed out in day and week views.",
2436
2439
  days: We,
2437
2440
  ...a
2438
- }, x = cr(), g = (c, d) => {
2439
- o || r({ ...t, [c]: d });
2441
+ }, g = dr(), f = (c, x) => {
2442
+ o || r({ ...t, [c]: x });
2440
2443
  };
2441
- return /* @__PURE__ */ n("div", { className: m("flex flex-col gap-3", s), children: [
2444
+ return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-3", s), children: [
2442
2445
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
2443
- /* @__PURE__ */ e(Q, { className: "text-sm font-semibold", children: i.title }),
2444
- o ? /* @__PURE__ */ e(Z, { delayDuration: 100, children: /* @__PURE__ */ n(ee, { children: [
2445
- /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(ar, { className: "size-3 text-muted-foreground" }) }),
2446
- /* @__PURE__ */ e(re, { children: /* @__PURE__ */ e("p", { children: i.lockedMessage }) })
2447
- ] }) }) : /* @__PURE__ */ e(Z, { delayDuration: 100, children: /* @__PURE__ */ n(ee, { children: [
2448
- /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(sr, { className: "size-3 text-muted-foreground" }) }),
2449
- /* @__PURE__ */ e(re, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: i.infoMessage }) })
2446
+ /* @__PURE__ */ e(X, { className: "text-sm font-semibold", children: i.title }),
2447
+ o ? /* @__PURE__ */ e(Q, { delayDuration: 100, children: /* @__PURE__ */ n(Z, { children: [
2448
+ /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(ir, { className: "size-3 text-muted-foreground" }) }),
2449
+ /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e("p", { children: i.lockedMessage }) })
2450
+ ] }) }) : /* @__PURE__ */ e(Q, { delayDuration: 100, children: /* @__PURE__ */ n(Z, { children: [
2451
+ /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(ar, { className: "size-3 text-muted-foreground" }) }),
2452
+ /* @__PURE__ */ e(te, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: i.infoMessage }) })
2450
2453
  ] }) })
2451
2454
  ] }),
2452
- /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: lr.map((c) => /* @__PURE__ */ e(
2453
- dr,
2455
+ /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: cr.map((c) => /* @__PURE__ */ e(
2456
+ ur,
2454
2457
  {
2455
2458
  dayLabel: i.days?.[c] ?? We[c],
2456
2459
  config: t[c],
2457
- onChange: (d) => g(c, d),
2460
+ onChange: (x) => f(c, x),
2458
2461
  disabled: o,
2459
- hourOptions: x
2462
+ hourOptions: g
2460
2463
  },
2461
2464
  c
2462
2465
  )) })
2463
2466
  ] });
2464
2467
  }
2465
- const Xr = {
2468
+ const Qr = {
2466
2469
  sunday: { enabled: !1, from: 8, to: 18 },
2467
2470
  monday: { enabled: !0, from: 8, to: 18 },
2468
2471
  tuesday: { enabled: !0, from: 8, to: 18 },
@@ -2471,7 +2474,7 @@ const Xr = {
2471
2474
  friday: { enabled: !0, from: 8, to: 18 },
2472
2475
  saturday: { enabled: !1, from: 8, to: 18 }
2473
2476
  };
2474
- function we({ className: t }) {
2477
+ function be({ className: t }) {
2475
2478
  return /* @__PURE__ */ e(
2476
2479
  "svg",
2477
2480
  {
@@ -2487,7 +2490,7 @@ function we({ className: t }) {
2487
2490
  }
2488
2491
  );
2489
2492
  }
2490
- function ur({ className: t }) {
2493
+ function hr({ className: t }) {
2491
2494
  return /* @__PURE__ */ n(
2492
2495
  "svg",
2493
2496
  {
@@ -2506,7 +2509,7 @@ function ur({ className: t }) {
2506
2509
  }
2507
2510
  );
2508
2511
  }
2509
- function hr({ className: t }) {
2512
+ function mr({ className: t }) {
2510
2513
  return /* @__PURE__ */ n(
2511
2514
  "svg",
2512
2515
  {
@@ -2525,7 +2528,7 @@ function hr({ className: t }) {
2525
2528
  }
2526
2529
  );
2527
2530
  }
2528
- function be({ checked: t, onCheckedChange: r, className: o, children: s }) {
2531
+ function ye({ checked: t, onCheckedChange: r, className: o, children: s }) {
2529
2532
  return /* @__PURE__ */ e(
2530
2533
  "button",
2531
2534
  {
@@ -2538,12 +2541,12 @@ function be({ checked: t, onCheckedChange: r, className: o, children: s }) {
2538
2541
  }
2539
2542
  );
2540
2543
  }
2541
- function mr({ src: t, alt: r, fallback: o, className: s }) {
2542
- const [a, i] = ae(!1);
2544
+ function fr({ src: t, alt: r, fallback: o, className: s }) {
2545
+ const [a, i] = se(!1);
2543
2546
  return !t || a ? /* @__PURE__ */ e(
2544
2547
  "div",
2545
2548
  {
2546
- className: m(
2549
+ className: h(
2547
2550
  "flex items-center justify-center bg-zinc-200 text-zinc-600 font-medium text-sm",
2548
2551
  s
2549
2552
  ),
@@ -2554,14 +2557,14 @@ function mr({ src: t, alt: r, fallback: o, className: s }) {
2554
2557
  {
2555
2558
  src: t,
2556
2559
  alt: r || "",
2557
- className: m("object-cover", s),
2560
+ className: h("object-cover", s),
2558
2561
  onError: () => i(!0)
2559
2562
  }
2560
2563
  );
2561
2564
  }
2562
2565
  function Ae({ value: t, onChange: r, placeholder: o, className: s }) {
2563
- return /* @__PURE__ */ n("div", { className: m("relative", s), children: [
2564
- /* @__PURE__ */ e(ur, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
2566
+ return /* @__PURE__ */ n("div", { className: h("relative", s), children: [
2567
+ /* @__PURE__ */ e(hr, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
2565
2568
  /* @__PURE__ */ e(
2566
2569
  "input",
2567
2570
  {
@@ -2577,9 +2580,9 @@ function Ae({ value: t, onChange: r, placeholder: o, className: s }) {
2577
2580
  function Fe(t, r, o, s = 0.3) {
2578
2581
  if (!r.trim()) return t;
2579
2582
  const a = r.toLowerCase();
2580
- return t.filter((i) => o(i).some((g) => g ? g.toLowerCase().includes(a) : !1));
2583
+ return t.filter((i) => o(i).some((f) => f ? f.toLowerCase().includes(a) : !1));
2581
2584
  }
2582
- const fr = {
2585
+ const gr = {
2583
2586
  title: "Filters",
2584
2587
  subtitle: "Filter calendar events",
2585
2588
  scheduleTypes: "Event Types",
@@ -2592,73 +2595,73 @@ const fr = {
2592
2595
  noScheduleTypes: "No event types found",
2593
2596
  noParticipants: "No participants found"
2594
2597
  };
2595
- function Qr({
2598
+ function Zr({
2596
2599
  scheduleTypes: t,
2597
2600
  users: r,
2598
2601
  selectedScheduleTypeIds: o,
2599
2602
  onScheduleTypeChange: s,
2600
2603
  selectedUserIds: a,
2601
2604
  onUserChange: i,
2602
- onClearAll: x,
2603
- className: g,
2605
+ onClearAll: g,
2606
+ className: f,
2604
2607
  scheduleTypesLoading: c = !1,
2605
- usersLoading: d = !1,
2606
- labels: w,
2607
- getScheduleTypeName: C
2608
+ usersLoading: x = !1,
2609
+ labels: y,
2610
+ getScheduleTypeName: p
2608
2611
  }) {
2609
- const z = { ...fr, ...w }, [I, H] = ae(""), [N, p] = ae(""), D = O(() => I.trim() ? Fe(t, I, (f) => [
2610
- f.name,
2611
- C?.(f) || f.name
2612
- ]) : t, [t, I, C]), k = O(() => N.trim() ? Fe(r, N, (f) => [f.name, f.email || ""]) : r, [r, N]), S = D.length > 0 && D.every((f) => o.includes(f.id)), T = k.length > 0 && k.every((f) => a.includes(f.id)), G = o.length + a.length, V = (f, l) => {
2613
- const h = l ? [...o, f] : o.filter((v) => v !== f);
2614
- s(h);
2615
- }, B = () => {
2616
- if (S) {
2617
- const f = new Set(D.map((l) => l.id));
2618
- s(o.filter((l) => !f.has(l)));
2612
+ const M = { ...gr, ...y }, [A, z] = se(""), [C, S] = se(""), L = B(() => A.trim() ? Fe(t, A, (u) => [
2613
+ u.name,
2614
+ p?.(u) || u.name
2615
+ ]) : t, [t, A, p]), w = B(() => C.trim() ? Fe(r, C, (u) => [u.name, u.email || ""]) : r, [r, C]), T = L.length > 0 && L.every((u) => o.includes(u.id)), D = w.length > 0 && w.every((u) => a.includes(u.id)), F = o.length + a.length, R = (u, l) => {
2616
+ const d = l ? [...o, u] : o.filter((v) => v !== u);
2617
+ s(d);
2618
+ }, V = () => {
2619
+ if (T) {
2620
+ const u = new Set(L.map((l) => l.id));
2621
+ s(o.filter((l) => !u.has(l)));
2619
2622
  } else {
2620
- const f = /* @__PURE__ */ new Set([
2623
+ const u = /* @__PURE__ */ new Set([
2621
2624
  ...o,
2622
- ...D.map((l) => l.id)
2625
+ ...L.map((l) => l.id)
2623
2626
  ]);
2624
- s(Array.from(f));
2627
+ s(Array.from(u));
2625
2628
  }
2626
- }, j = (f, l) => {
2627
- const h = l ? [...a, f] : a.filter((v) => v !== f);
2628
- i(h);
2629
- }, P = () => {
2630
- if (T) {
2631
- const f = new Set(k.map((l) => l.id));
2632
- i(a.filter((l) => !f.has(l)));
2629
+ }, $ = (u, l) => {
2630
+ const d = l ? [...a, u] : a.filter((v) => v !== u);
2631
+ i(d);
2632
+ }, O = () => {
2633
+ if (D) {
2634
+ const u = new Set(w.map((l) => l.id));
2635
+ i(a.filter((l) => !u.has(l)));
2633
2636
  } else {
2634
- const f = /* @__PURE__ */ new Set([...a, ...k.map((l) => l.id)]);
2635
- i(Array.from(f));
2637
+ const u = /* @__PURE__ */ new Set([...a, ...w.map((l) => l.id)]);
2638
+ i(Array.from(u));
2636
2639
  }
2637
- }, $ = () => {
2638
- s([]), i([]), x?.();
2639
- }, W = (f) => C ? C(f) : f.name, U = (f) => f.colorHex || f.color || "#069AD7";
2640
+ }, I = () => {
2641
+ s([]), i([]), g?.();
2642
+ }, P = (u) => p ? p(u) : u.name, U = (u) => u.colorHex || u.color || "#069AD7";
2640
2643
  return /* @__PURE__ */ n(
2641
2644
  "div",
2642
2645
  {
2643
- className: m(
2646
+ className: h(
2644
2647
  "flex min-w-72 max-w-72 flex-col rounded-lg border bg-white shadow-sm",
2645
- g
2648
+ f
2646
2649
  ),
2647
2650
  children: [
2648
2651
  /* @__PURE__ */ n("header", { className: "flex items-start justify-between gap-2 px-4 pb-2 pt-4", children: [
2649
2652
  /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
2650
- /* @__PURE__ */ e("h3", { className: "text-base font-semibold text-foreground", children: z.title }),
2651
- /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: z.subtitle })
2653
+ /* @__PURE__ */ e("h3", { className: "text-base font-semibold text-foreground", children: M.title }),
2654
+ /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: M.subtitle })
2652
2655
  ] }),
2653
- G > 0 && /* @__PURE__ */ n(
2656
+ F > 0 && /* @__PURE__ */ n(
2654
2657
  "button",
2655
2658
  {
2656
2659
  type: "button",
2657
- onClick: $,
2660
+ onClick: I,
2658
2661
  className: "flex h-auto items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-destructive transition-colors hover:bg-destructive/10",
2659
2662
  children: [
2660
- /* @__PURE__ */ e(hr, { className: "h-3.5 w-3.5" }),
2661
- z.clearAll
2663
+ /* @__PURE__ */ e(mr, { className: "h-3.5 w-3.5" }),
2664
+ M.clearAll
2662
2665
  ]
2663
2666
  }
2664
2667
  )
@@ -2666,29 +2669,29 @@ function Qr({
2666
2669
  /* @__PURE__ */ e("div", { className: "h-px w-full bg-border/60" }),
2667
2670
  /* @__PURE__ */ n("section", { className: "flex flex-col", children: [
2668
2671
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between px-4 py-3", children: [
2669
- /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: z.scheduleTypes }),
2672
+ /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: M.scheduleTypes }),
2670
2673
  /* @__PURE__ */ e(
2671
2674
  "button",
2672
2675
  {
2673
2676
  type: "button",
2674
- onClick: B,
2677
+ onClick: V,
2675
2678
  className: "text-xs font-medium text-primary transition-colors hover:text-primary/80",
2676
- children: S ? z.unselectAll : z.selectAll
2679
+ children: T ? M.unselectAll : M.selectAll
2677
2680
  }
2678
2681
  )
2679
2682
  ] }),
2680
2683
  t.length > 6 && /* @__PURE__ */ e("div", { className: "px-4 pb-3", children: /* @__PURE__ */ e(
2681
2684
  Ae,
2682
2685
  {
2683
- value: I,
2684
- onChange: H,
2685
- placeholder: z.searchScheduleTypes
2686
+ value: A,
2687
+ onChange: z,
2688
+ placeholder: M.searchScheduleTypes
2686
2689
  }
2687
2690
  ) }),
2688
2691
  /* @__PURE__ */ n("div", { className: "flex max-h-[220px] flex-col gap-2 overflow-y-auto px-4 pb-2 scrollbar-thin", children: [
2689
2692
  c ? (
2690
2693
  // Loading skeletons
2691
- Array.from({ length: 4 }).map((f, l) => /* @__PURE__ */ n(
2694
+ Array.from({ length: 4 }).map((u, l) => /* @__PURE__ */ n(
2692
2695
  "div",
2693
2696
  {
2694
2697
  className: "flex animate-pulse items-center gap-2 rounded-md border border-border/60 bg-muted/40 p-2",
@@ -2699,14 +2702,14 @@ function Qr({
2699
2702
  },
2700
2703
  `skeleton-${l}`
2701
2704
  ))
2702
- ) : D.map((f) => {
2703
- const l = o.includes(f.id), h = U(f);
2705
+ ) : L.map((u) => {
2706
+ const l = o.includes(u.id), d = U(u);
2704
2707
  return /* @__PURE__ */ n(
2705
- be,
2708
+ ye,
2706
2709
  {
2707
2710
  checked: l,
2708
- onCheckedChange: (v) => V(f.id, v),
2709
- className: m(
2711
+ onCheckedChange: (v) => R(u.id, v),
2712
+ className: h(
2710
2713
  "relative flex w-full cursor-pointer items-center justify-between gap-3 rounded-md border border-border bg-white px-3 py-2 transition-colors hover:border-primary/50",
2711
2714
  l && "border-primary bg-primary/5"
2712
2715
  ),
@@ -2715,62 +2718,62 @@ function Qr({
2715
2718
  /* @__PURE__ */ e(
2716
2719
  "span",
2717
2720
  {
2718
- className: m(
2721
+ className: h(
2719
2722
  "flex h-4 w-4 items-center justify-center rounded border border-border text-xs transition-colors",
2720
2723
  l && "border-primary bg-primary text-primary-foreground"
2721
2724
  ),
2722
- children: l && /* @__PURE__ */ e(we, { className: "h-3 w-3" })
2725
+ children: l && /* @__PURE__ */ e(be, { className: "h-3 w-3" })
2723
2726
  }
2724
2727
  ),
2725
- /* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children: W(f) })
2728
+ /* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children: P(u) })
2726
2729
  ] }),
2727
2730
  /* @__PURE__ */ e(
2728
2731
  "div",
2729
2732
  {
2730
2733
  className: "h-4 w-4 rounded-full border",
2731
2734
  style: {
2732
- backgroundColor: h,
2733
- borderColor: h
2735
+ backgroundColor: d,
2736
+ borderColor: d
2734
2737
  }
2735
2738
  }
2736
2739
  )
2737
2740
  ]
2738
2741
  },
2739
- f.id
2742
+ u.id
2740
2743
  );
2741
2744
  }),
2742
- !c && D.length === 0 && /* @__PURE__ */ e("p", { className: "px-2 py-1 text-xs text-muted-foreground", children: z.noScheduleTypes })
2745
+ !c && L.length === 0 && /* @__PURE__ */ e("p", { className: "px-2 py-1 text-xs text-muted-foreground", children: M.noScheduleTypes })
2743
2746
  ] })
2744
2747
  ] }),
2745
2748
  /* @__PURE__ */ e("div", { className: "h-px w-full bg-border/60" }),
2746
2749
  /* @__PURE__ */ n("section", { className: "flex flex-col", children: [
2747
2750
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between px-4 py-3", children: [
2748
- /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: z.participants }),
2751
+ /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: M.participants }),
2749
2752
  /* @__PURE__ */ e(
2750
- be,
2753
+ ye,
2751
2754
  {
2752
- checked: T,
2753
- onCheckedChange: () => P(),
2754
- className: m(
2755
+ checked: D,
2756
+ onCheckedChange: () => O(),
2757
+ className: h(
2755
2758
  "flex h-5 w-5 items-center justify-center rounded border border-border bg-white transition-colors hover:border-primary/50",
2756
- T && "border-primary bg-primary text-primary-foreground"
2759
+ D && "border-primary bg-primary text-primary-foreground"
2757
2760
  ),
2758
- children: T && /* @__PURE__ */ e(we, { className: "h-3.5 w-3.5" })
2761
+ children: D && /* @__PURE__ */ e(be, { className: "h-3.5 w-3.5" })
2759
2762
  }
2760
2763
  )
2761
2764
  ] }),
2762
2765
  /* @__PURE__ */ e("div", { className: "px-4 pb-3", children: /* @__PURE__ */ e(
2763
2766
  Ae,
2764
2767
  {
2765
- value: N,
2766
- onChange: p,
2767
- placeholder: z.searchParticipants
2768
+ value: C,
2769
+ onChange: S,
2770
+ placeholder: M.searchParticipants
2768
2771
  }
2769
2772
  ) }),
2770
2773
  /* @__PURE__ */ n("div", { className: "flex max-h-[400px] flex-col gap-2 overflow-y-auto px-4 pb-4 scrollbar-thin", children: [
2771
- d ? (
2774
+ x ? (
2772
2775
  // Loading skeletons
2773
- Array.from({ length: 4 }).map((f, l) => /* @__PURE__ */ n(
2776
+ Array.from({ length: 4 }).map((u, l) => /* @__PURE__ */ n(
2774
2777
  "div",
2775
2778
  {
2776
2779
  className: "flex animate-pulse items-center gap-3 rounded-md border border-border/60 bg-muted/40 p-3",
@@ -2785,14 +2788,14 @@ function Qr({
2785
2788
  },
2786
2789
  `p-skeleton-${l}`
2787
2790
  ))
2788
- ) : k.map((f) => {
2789
- const l = a.includes(f.id);
2791
+ ) : w.map((u) => {
2792
+ const l = a.includes(u.id);
2790
2793
  return /* @__PURE__ */ n(
2791
- be,
2794
+ ye,
2792
2795
  {
2793
2796
  checked: l,
2794
- onCheckedChange: (h) => j(f.id, h),
2795
- className: m(
2797
+ onCheckedChange: (d) => $(u.id, d),
2798
+ className: h(
2796
2799
  "relative flex w-full cursor-pointer items-start gap-2 rounded-lg border border-border bg-white p-2 transition-colors hover:border-primary/50",
2797
2800
  l && "border-primary bg-zinc-50"
2798
2801
  ),
@@ -2800,48 +2803,48 @@ function Qr({
2800
2803
  /* @__PURE__ */ e(
2801
2804
  "span",
2802
2805
  {
2803
- className: m(
2806
+ className: h(
2804
2807
  "flex h-4 w-4 flex-shrink-0 items-center justify-center rounded border border-border transition-colors",
2805
2808
  l && "border-primary bg-primary text-primary-foreground"
2806
2809
  ),
2807
- children: l && /* @__PURE__ */ e(we, { className: "h-2.5 w-2.5" })
2810
+ children: l && /* @__PURE__ */ e(be, { className: "h-2.5 w-2.5" })
2808
2811
  }
2809
2812
  ),
2810
2813
  /* @__PURE__ */ n("div", { className: "flex flex-1 items-start gap-2", children: [
2811
2814
  /* @__PURE__ */ e(
2812
- mr,
2815
+ fr,
2813
2816
  {
2814
- src: f.avatar ?? null,
2815
- alt: f.name,
2816
- fallback: f.name?.[0]?.toUpperCase() ?? "?",
2817
+ src: u.avatar ?? null,
2818
+ alt: u.name,
2819
+ fallback: u.name?.[0]?.toUpperCase() ?? "?",
2817
2820
  className: "h-10 w-10 rounded-lg"
2818
2821
  }
2819
2822
  ),
2820
2823
  /* @__PURE__ */ n("div", { className: "flex max-w-[140px] flex-col gap-0.5 overflow-hidden", children: [
2821
- /* @__PURE__ */ e("span", { className: "line-clamp-1 text-sm font-medium text-foreground", children: f.name }),
2824
+ /* @__PURE__ */ e("span", { className: "line-clamp-1 text-sm font-medium text-foreground", children: u.name }),
2822
2825
  /* @__PURE__ */ e(
2823
2826
  "span",
2824
2827
  {
2825
2828
  className: "truncate text-[11px] text-muted-foreground",
2826
- title: f.email,
2827
- children: f.email
2829
+ title: u.email,
2830
+ children: u.email
2828
2831
  }
2829
2832
  )
2830
2833
  ] })
2831
2834
  ] })
2832
2835
  ]
2833
2836
  },
2834
- f.id
2837
+ u.id
2835
2838
  );
2836
2839
  }),
2837
- !d && k.length === 0 && /* @__PURE__ */ e("p", { className: "px-4 text-xs text-muted-foreground", children: z.noParticipants })
2840
+ !x && w.length === 0 && /* @__PURE__ */ e("p", { className: "px-4 text-xs text-muted-foreground", children: M.noParticipants })
2838
2841
  ] })
2839
2842
  ] })
2840
2843
  ]
2841
2844
  }
2842
2845
  );
2843
2846
  }
2844
- function gr({ className: t }) {
2847
+ function xr({ className: t }) {
2845
2848
  return /* @__PURE__ */ n(
2846
2849
  "svg",
2847
2850
  {
@@ -2862,7 +2865,7 @@ function gr({ className: t }) {
2862
2865
  }
2863
2866
  );
2864
2867
  }
2865
- function Zr({
2868
+ function en({
2866
2869
  scheduleTypes: t,
2867
2870
  value: r,
2868
2871
  onChange: o,
@@ -2870,24 +2873,24 @@ function Zr({
2870
2873
  className: a,
2871
2874
  label: i
2872
2875
  }) {
2873
- const x = (c) => {
2876
+ const g = (c) => {
2874
2877
  o(c.target.value);
2875
- }, g = t.find((c) => String(c.id) === r);
2876
- return /* @__PURE__ */ n("div", { className: m("flex flex-col gap-1", a), children: [
2877
- i && /* @__PURE__ */ e(Q, { className: "text-xs text-muted-foreground", children: i }),
2878
+ }, f = t.find((c) => String(c.id) === r);
2879
+ return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-1", a), children: [
2880
+ i && /* @__PURE__ */ e(X, { className: "text-xs text-muted-foreground", children: i }),
2878
2881
  /* @__PURE__ */ n("div", { className: "relative", children: [
2879
- g ? /* @__PURE__ */ e(
2882
+ f ? /* @__PURE__ */ e(
2880
2883
  "span",
2881
2884
  {
2882
2885
  className: "pointer-events-none absolute left-2.5 top-1/2 size-3 -translate-y-1/2 rounded-full",
2883
- style: { backgroundColor: g.color }
2886
+ style: { backgroundColor: f.color }
2884
2887
  }
2885
- ) : /* @__PURE__ */ e(gr, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
2888
+ ) : /* @__PURE__ */ e(xr, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
2886
2889
  /* @__PURE__ */ n(
2887
- ne,
2890
+ re,
2888
2891
  {
2889
2892
  value: r,
2890
- onChange: x,
2893
+ onChange: g,
2891
2894
  className: "h-9 w-full min-w-[140px] pl-8 pr-8 text-sm",
2892
2895
  children: [
2893
2896
  /* @__PURE__ */ e("option", { value: "all", children: s }),
@@ -2898,7 +2901,7 @@ function Zr({
2898
2901
  ] })
2899
2902
  ] });
2900
2903
  }
2901
- function xr({ className: t }) {
2904
+ function pr({ className: t }) {
2902
2905
  return /* @__PURE__ */ n(
2903
2906
  "svg",
2904
2907
  {
@@ -2921,7 +2924,7 @@ function xr({ className: t }) {
2921
2924
  }
2922
2925
  );
2923
2926
  }
2924
- function en({
2927
+ function tn({
2925
2928
  users: t,
2926
2929
  value: r,
2927
2930
  onChange: o,
@@ -2929,29 +2932,29 @@ function en({
2929
2932
  className: a,
2930
2933
  label: i
2931
2934
  }) {
2932
- const x = (g) => {
2933
- o(g.target.value);
2935
+ const g = (f) => {
2936
+ o(f.target.value);
2934
2937
  };
2935
- return /* @__PURE__ */ n("div", { className: m("flex flex-col gap-1", a), children: [
2936
- i && /* @__PURE__ */ e(Q, { className: "text-xs text-muted-foreground", children: i }),
2938
+ return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-1", a), children: [
2939
+ i && /* @__PURE__ */ e(X, { className: "text-xs text-muted-foreground", children: i }),
2937
2940
  /* @__PURE__ */ n("div", { className: "relative", children: [
2938
- /* @__PURE__ */ e(xr, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
2941
+ /* @__PURE__ */ e(pr, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
2939
2942
  /* @__PURE__ */ n(
2940
- ne,
2943
+ re,
2941
2944
  {
2942
2945
  value: r,
2943
- onChange: x,
2946
+ onChange: g,
2944
2947
  className: "h-9 w-full min-w-[120px] pl-8 pr-8 text-sm",
2945
2948
  children: [
2946
2949
  /* @__PURE__ */ e("option", { value: "all", children: s }),
2947
- t.map((g) => /* @__PURE__ */ e("option", { value: g.id, children: g.name }, g.id))
2950
+ t.map((f) => /* @__PURE__ */ e("option", { value: f.id, children: f.name }, f.id))
2948
2951
  ]
2949
2952
  }
2950
2953
  )
2951
2954
  ] })
2952
2955
  ] });
2953
2956
  }
2954
- function pr({ className: t }) {
2957
+ function vr({ className: t }) {
2955
2958
  return /* @__PURE__ */ n(
2956
2959
  "svg",
2957
2960
  {
@@ -2978,7 +2981,7 @@ function pr({ className: t }) {
2978
2981
  }
2979
2982
  );
2980
2983
  }
2981
- function vr({ className: t }) {
2984
+ function wr({ className: t }) {
2982
2985
  return /* @__PURE__ */ n(
2983
2986
  "svg",
2984
2987
  {
@@ -3001,7 +3004,7 @@ function vr({ className: t }) {
3001
3004
  }
3002
3005
  );
3003
3006
  }
3004
- function wr({ className: t }) {
3007
+ function br({ className: t }) {
3005
3008
  return /* @__PURE__ */ e(
3006
3009
  "svg",
3007
3010
  {
@@ -3017,7 +3020,7 @@ function wr({ className: t }) {
3017
3020
  }
3018
3021
  );
3019
3022
  }
3020
- function br({ className: t }) {
3023
+ function yr({ className: t }) {
3021
3024
  return /* @__PURE__ */ n(
3022
3025
  "svg",
3023
3026
  {
@@ -3037,7 +3040,7 @@ function br({ className: t }) {
3037
3040
  }
3038
3041
  );
3039
3042
  }
3040
- function yr(t) {
3043
+ function kr(t) {
3041
3044
  const r = t.getFullYear(), o = String(t.getMonth() + 1).padStart(2, "0"), s = String(t.getDate()).padStart(2, "0");
3042
3045
  return `${r}-${o}-${s}`;
3043
3046
  }
@@ -3045,17 +3048,17 @@ function Be(t) {
3045
3048
  const r = t.getHours(), o = t.getMinutes(), s = r >= 12 ? "PM" : "AM", a = r % 12 || 12, i = String(o).padStart(2, "0");
3046
3049
  return `${a}:${i} ${s}`;
3047
3050
  }
3048
- function kr(t) {
3051
+ function Nr(t) {
3049
3052
  const r = Be(t.startDate), o = Be(t.endDate);
3050
3053
  return `${r} - ${o}`;
3051
3054
  }
3052
- function Nr(t) {
3055
+ function Cr(t) {
3053
3056
  const r = Ue(/* @__PURE__ */ new Date(), 1);
3054
3057
  return t.getFullYear() === r.getFullYear() && t.getMonth() === r.getMonth() && t.getDate() === r.getDate();
3055
3058
  }
3056
- function Cr(t) {
3059
+ function Dr(t) {
3057
3060
  if (q(t)) return "Today";
3058
- if (Nr(t)) return "Tomorrow";
3061
+ if (Cr(t)) return "Tomorrow";
3059
3062
  const r = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], o = [
3060
3063
  "Jan",
3061
3064
  "Feb",
@@ -3072,38 +3075,38 @@ function Cr(t) {
3072
3075
  ], s = r[t.getDay()], a = o[t.getMonth()], i = t.getDate();
3073
3076
  return `${s}, ${a} ${i}`;
3074
3077
  }
3075
- function Dr(t, r) {
3078
+ function Mr(t, r) {
3076
3079
  const o = /* @__PURE__ */ new Map();
3077
3080
  for (const s of t) {
3078
- const a = yr(s.startDate), i = o.get(a) ?? [];
3081
+ const a = kr(s.startDate), i = o.get(a) ?? [];
3079
3082
  i.push(s), o.set(a, i);
3080
3083
  }
3081
3084
  return Array.from(o.entries()).map(([s, a]) => {
3082
3085
  const i = [...a].sort(
3083
- (g, c) => g.startDate.getTime() - c.startDate.getTime()
3084
- ), x = r > 0 ? i.slice(0, r) : i;
3086
+ (f, c) => f.startDate.getTime() - c.startDate.getTime()
3087
+ ), g = r > 0 ? i.slice(0, r) : i;
3085
3088
  return {
3086
3089
  date: new Date(s),
3087
3090
  dateKey: s,
3088
- events: x,
3091
+ events: g,
3089
3092
  hasMore: r > 0 && i.length > r
3090
3093
  };
3091
3094
  }).sort((s, a) => s.date.getTime() - a.date.getTime());
3092
3095
  }
3093
- function Mr(t) {
3094
- const r = ge(/* @__PURE__ */ new Date()), o = Ve(/* @__PURE__ */ new Date());
3096
+ function Sr(t) {
3097
+ const r = xe(/* @__PURE__ */ new Date()), o = Ve(/* @__PURE__ */ new Date());
3095
3098
  return t.filter((s) => s.startDate >= r && s.startDate <= o).length;
3096
3099
  }
3097
- function ye({ className: t }) {
3098
- return /* @__PURE__ */ e("div", { className: m("animate-pulse rounded-md bg-muted", t) });
3100
+ function ke({ className: t }) {
3101
+ return /* @__PURE__ */ e("div", { className: h("animate-pulse rounded-md bg-muted", t) });
3099
3102
  }
3100
- function Sr({ event: t, onClick: r }) {
3103
+ function Er({ event: t, onClick: r }) {
3101
3104
  return /* @__PURE__ */ n(
3102
3105
  "button",
3103
3106
  {
3104
3107
  type: "button",
3105
3108
  onClick: () => r?.(t),
3106
- className: m(
3109
+ className: h(
3107
3110
  "w-full text-left rounded-lg transition-colors",
3108
3111
  "hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3109
3112
  "flex items-start gap-3 p-2"
@@ -3118,62 +3121,62 @@ function Sr({ event: t, onClick: r }) {
3118
3121
  ),
3119
3122
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
3120
3123
  /* @__PURE__ */ e("p", { className: "text-sm font-medium truncate", children: t.title }),
3121
- /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground truncate", children: kr(t) })
3124
+ /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground truncate", children: Nr(t) })
3122
3125
  ] }),
3123
- r && /* @__PURE__ */ e(wr, { className: "shrink-0 size-4 text-muted-foreground/50 mt-1" })
3126
+ r && /* @__PURE__ */ e(br, { className: "shrink-0 size-4 text-muted-foreground/50 mt-1" })
3124
3127
  ]
3125
3128
  }
3126
3129
  );
3127
3130
  }
3128
- function Er({ group: t, onEventClick: r }) {
3131
+ function zr({ group: t, onEventClick: r }) {
3129
3132
  return /* @__PURE__ */ n("div", { className: "space-y-1", children: [
3130
3133
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between px-2 py-1.5", children: [
3131
- /* @__PURE__ */ e("h3", { className: m("text-xs font-semibold", q(t.date) && "text-primary"), children: Cr(t.date) }),
3134
+ /* @__PURE__ */ e("h3", { className: h("text-xs font-semibold", q(t.date) && "text-primary"), children: Dr(t.date) }),
3132
3135
  t.hasMore && /* @__PURE__ */ n("span", { className: "text-[10px] text-muted-foreground", children: [
3133
3136
  "+",
3134
3137
  t.events.length,
3135
3138
  " more"
3136
3139
  ] })
3137
3140
  ] }),
3138
- /* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((o) => /* @__PURE__ */ e(Sr, { event: o, onClick: r }, o.id)) })
3141
+ /* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((o) => /* @__PURE__ */ e(Er, { event: o, onClick: r }, o.id)) })
3139
3142
  ] });
3140
3143
  }
3141
- function tn({
3144
+ function rn({
3142
3145
  events: t,
3143
3146
  isLoading: r = !1,
3144
3147
  className: o,
3145
3148
  daysAhead: s = 7,
3146
3149
  maxEventsPerDay: a = 3,
3147
3150
  onEventClick: i,
3148
- onNavigateToAgenda: x
3151
+ onNavigateToAgenda: g
3149
3152
  }) {
3150
- const [g, c] = ae(!1), d = O(() => {
3151
- const H = ge(/* @__PURE__ */ new Date()), N = Ue(H, s);
3152
- return t.filter((p) => p.endDate >= H && p.startDate < N);
3153
- }, [t, s]), w = O(
3154
- () => Dr(d, a),
3155
- [d, a]
3156
- ), C = O(() => Mr(t), [t]), z = (H) => {
3157
- c(!1), i?.(H);
3158
- }, I = () => {
3159
- c(!1), x?.();
3153
+ const [f, c] = se(!1), x = B(() => {
3154
+ const z = xe(/* @__PURE__ */ new Date()), C = Ue(z, s);
3155
+ return t.filter((S) => S.endDate >= z && S.startDate < C);
3156
+ }, [t, s]), y = B(
3157
+ () => Mr(x, a),
3158
+ [x, a]
3159
+ ), p = B(() => Sr(t), [t]), M = (z) => {
3160
+ c(!1), i?.(z);
3161
+ }, A = () => {
3162
+ c(!1), g?.();
3160
3163
  };
3161
- return /* @__PURE__ */ n(_e, { open: g, onOpenChange: c, children: [
3164
+ return /* @__PURE__ */ n(_e, { open: f, onOpenChange: c, children: [
3162
3165
  /* @__PURE__ */ n(
3163
3166
  Pe,
3164
3167
  {
3165
- className: m(
3168
+ className: h(
3166
3169
  "relative rounded-xl hover:text-zinc-700 hover:!bg-zinc-300 !bg-zinc-200 text-zinc-600 shadow-none !px-2.5 p-2 max-h-10",
3167
3170
  o
3168
3171
  ),
3169
3172
  children: [
3170
- /* @__PURE__ */ e(pr, { className: "h-4 w-4" }),
3171
- C > 0 && /* @__PURE__ */ e(
3172
- lt,
3173
+ /* @__PURE__ */ e(vr, { className: "h-4 w-4" }),
3174
+ p > 0 && /* @__PURE__ */ e(
3175
+ ct,
3173
3176
  {
3174
3177
  variant: "destructive",
3175
3178
  className: "absolute -right-4 -top-4 m-3 flex h-5 w-5 items-center justify-center rounded-full bg-primary p-0 text-[10px] font-medium hover:bg-primary",
3176
- children: C > 99 ? "99+" : C
3179
+ children: p > 99 ? "99+" : p
3177
3180
  }
3178
3181
  )
3179
3182
  ]
@@ -3183,47 +3186,47 @@ function tn({
3183
3186
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between border-b p-4", children: [
3184
3187
  /* @__PURE__ */ n("div", { children: [
3185
3188
  /* @__PURE__ */ e("h3", { className: "text-sm font-semibold", children: "Upcoming" }),
3186
- /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: C > 0 ? `${C} event${C > 1 ? "s" : ""} today` : "No events today" })
3189
+ /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: p > 0 ? `${p} event${p > 1 ? "s" : ""} today` : "No events today" })
3187
3190
  ] }),
3188
- x && /* @__PURE__ */ n(
3191
+ g && /* @__PURE__ */ n(
3189
3192
  "button",
3190
3193
  {
3191
3194
  type: "button",
3192
- onClick: I,
3195
+ onClick: A,
3193
3196
  className: "text-xs text-primary hover:underline flex items-center gap-1",
3194
3197
  children: [
3195
3198
  "View all",
3196
- /* @__PURE__ */ e(br, { className: "size-3" })
3199
+ /* @__PURE__ */ e(yr, { className: "size-3" })
3197
3200
  ]
3198
3201
  }
3199
3202
  )
3200
3203
  ] }),
3201
- /* @__PURE__ */ e("div", { className: "max-h-80 overflow-y-auto p-2", children: r ? /* @__PURE__ */ e("div", { className: "space-y-2 p-2", children: Array.from({ length: 3 }).map((H, N) => /* @__PURE__ */ n("div", { className: "flex space-x-3", children: [
3202
- /* @__PURE__ */ e(ye, { className: "h-2 w-2 rounded-full mt-2" }),
3204
+ /* @__PURE__ */ e("div", { className: "max-h-80 overflow-y-auto p-2", children: r ? /* @__PURE__ */ e("div", { className: "space-y-2 p-2", children: Array.from({ length: 3 }).map((z, C) => /* @__PURE__ */ n("div", { className: "flex space-x-3", children: [
3205
+ /* @__PURE__ */ e(ke, { className: "h-2 w-2 rounded-full mt-2" }),
3203
3206
  /* @__PURE__ */ n("div", { className: "flex-1 space-y-2", children: [
3204
- /* @__PURE__ */ e(ye, { className: "h-4 w-full" }),
3205
- /* @__PURE__ */ e(ye, { className: "h-3 w-3/4" })
3207
+ /* @__PURE__ */ e(ke, { className: "h-4 w-full" }),
3208
+ /* @__PURE__ */ e(ke, { className: "h-3 w-3/4" })
3206
3209
  ] })
3207
- ] }, N)) }) : w.length === 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-8 text-center", children: [
3208
- /* @__PURE__ */ e(vr, { className: "mb-2 h-8 w-8 text-muted-foreground/50" }),
3210
+ ] }, C)) }) : y.length === 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-8 text-center", children: [
3211
+ /* @__PURE__ */ e(wr, { className: "mb-2 h-8 w-8 text-muted-foreground/50" }),
3209
3212
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "No upcoming events" }),
3210
3213
  /* @__PURE__ */ n("p", { className: "text-xs text-muted-foreground/70", children: [
3211
3214
  "Your schedule is clear for the next ",
3212
3215
  s,
3213
3216
  " days"
3214
3217
  ] })
3215
- ] }) : /* @__PURE__ */ e("div", { className: "space-y-3 divide-y", children: w.map((H) => /* @__PURE__ */ e(
3216
- Er,
3218
+ ] }) : /* @__PURE__ */ e("div", { className: "space-y-3 divide-y", children: y.map((z) => /* @__PURE__ */ e(
3219
+ zr,
3217
3220
  {
3218
- group: H,
3219
- onEventClick: z
3221
+ group: z,
3222
+ onEventClick: M
3220
3223
  },
3221
- H.dateKey
3224
+ z.dateKey
3222
3225
  )) }) })
3223
3226
  ] })
3224
3227
  ] });
3225
3228
  }
3226
- function zr({ className: t }) {
3229
+ function Lr({ className: t }) {
3227
3230
  return /* @__PURE__ */ n(
3228
3231
  "svg",
3229
3232
  {
@@ -3266,7 +3269,7 @@ function Ge({ className: t }) {
3266
3269
  }
3267
3270
  );
3268
3271
  }
3269
- function Lr(t) {
3272
+ function Hr(t) {
3270
3273
  const r = /* @__PURE__ */ new Date();
3271
3274
  return r.setDate(r.getDate() + 1), t.getFullYear() === r.getFullYear() && t.getMonth() === r.getMonth() && t.getDate() === r.getDate();
3272
3275
  }
@@ -3274,45 +3277,45 @@ function $e(t) {
3274
3277
  const r = t.getHours(), o = t.getMinutes(), s = r >= 12 ? "PM" : "AM";
3275
3278
  return `${r % 12 || 12}:${o.toString().padStart(2, "0")} ${s}`;
3276
3279
  }
3277
- function Hr(t) {
3280
+ function Tr(t) {
3278
3281
  return new Intl.DateTimeFormat("en-US", {
3279
3282
  weekday: "long",
3280
3283
  month: "short",
3281
3284
  day: "numeric"
3282
3285
  }).format(t);
3283
3286
  }
3284
- function Tr(t) {
3287
+ function Ir(t) {
3285
3288
  const r = $e(t.startDate), o = $e(t.endDate);
3286
3289
  return `${r} - ${o}`;
3287
3290
  }
3288
- function Ir(t) {
3289
- return q(t) ? "Today" : Lr(t) ? "Tomorrow" : Hr(t);
3291
+ function jr(t) {
3292
+ return q(t) ? "Today" : Hr(t) ? "Tomorrow" : Tr(t);
3290
3293
  }
3291
- function jr(t, r) {
3294
+ function Wr(t, r) {
3292
3295
  const o = /* @__PURE__ */ new Map();
3293
3296
  for (const s of t) {
3294
- const a = ft(s.startDate), i = o.get(a) ?? [];
3297
+ const a = gt(s.startDate), i = o.get(a) ?? [];
3295
3298
  i.push(s), o.set(a, i);
3296
3299
  }
3297
3300
  return Array.from(o.entries()).map(([s, a]) => {
3298
3301
  const i = [...a].sort(
3299
- (g, c) => g.startDate.getTime() - c.startDate.getTime()
3300
- ), x = r > 0 ? i.slice(0, r) : i;
3302
+ (f, c) => f.startDate.getTime() - c.startDate.getTime()
3303
+ ), g = r > 0 ? i.slice(0, r) : i;
3301
3304
  return {
3302
3305
  date: new Date(s),
3303
3306
  dateKey: s,
3304
- events: x,
3307
+ events: g,
3305
3308
  hasMore: r > 0 && i.length > r
3306
3309
  };
3307
3310
  }).sort((s, a) => s.date.getTime() - a.date.getTime());
3308
3311
  }
3309
- function Wr({ event: t, onClick: r, compact: o }) {
3312
+ function Ar({ event: t, onClick: r, compact: o }) {
3310
3313
  return /* @__PURE__ */ n(
3311
3314
  "button",
3312
3315
  {
3313
3316
  type: "button",
3314
3317
  onClick: () => r?.(t),
3315
- className: m(
3318
+ className: h(
3316
3319
  "w-full text-left rounded-lg transition-colors",
3317
3320
  "hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3318
3321
  "flex items-start gap-3",
@@ -3322,41 +3325,41 @@ function Wr({ event: t, onClick: r, compact: o }) {
3322
3325
  /* @__PURE__ */ e(
3323
3326
  "div",
3324
3327
  {
3325
- className: m("shrink-0 rounded-full mt-1", o ? "size-2" : "size-2.5"),
3328
+ className: h("shrink-0 rounded-full mt-1", o ? "size-2" : "size-2.5"),
3326
3329
  style: { backgroundColor: t.color ?? "#3b82f6" }
3327
3330
  }
3328
3331
  ),
3329
3332
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
3330
- /* @__PURE__ */ e("p", { className: m("font-medium truncate", o ? "text-xs" : "text-sm"), children: t.title }),
3331
- /* @__PURE__ */ e("p", { className: m("text-muted-foreground truncate", o ? "text-[10px]" : "text-xs"), children: Tr(t) })
3333
+ /* @__PURE__ */ e("p", { className: h("font-medium truncate", o ? "text-xs" : "text-sm"), children: t.title }),
3334
+ /* @__PURE__ */ e("p", { className: h("text-muted-foreground truncate", o ? "text-[10px]" : "text-xs"), children: Ir(t) })
3332
3335
  ] }),
3333
3336
  r && /* @__PURE__ */ e(
3334
3337
  Ge,
3335
3338
  {
3336
- className: m("shrink-0 text-muted-foreground/50", o ? "size-3" : "size-4")
3339
+ className: h("shrink-0 text-muted-foreground/50", o ? "size-3" : "size-4")
3337
3340
  }
3338
3341
  )
3339
3342
  ]
3340
3343
  }
3341
3344
  );
3342
3345
  }
3343
- function Ar({
3346
+ function Fr({
3344
3347
  group: t,
3345
3348
  onEventClick: r,
3346
3349
  onViewMore: o,
3347
3350
  compact: s
3348
3351
  }) {
3349
3352
  return /* @__PURE__ */ n("div", { className: "space-y-1", children: [
3350
- /* @__PURE__ */ n("div", { className: m("flex items-center justify-between px-2", s ? "py-1" : "py-1.5"), children: [
3353
+ /* @__PURE__ */ n("div", { className: h("flex items-center justify-between px-2", s ? "py-1" : "py-1.5"), children: [
3351
3354
  /* @__PURE__ */ e(
3352
3355
  "h3",
3353
3356
  {
3354
- className: m(
3357
+ className: h(
3355
3358
  "font-semibold",
3356
3359
  s ? "text-xs" : "text-sm",
3357
3360
  q(t.date) && "text-primary"
3358
3361
  ),
3359
- children: Ir(t.date)
3362
+ children: jr(t.date)
3360
3363
  }
3361
3364
  ),
3362
3365
  t.hasMore && o && /* @__PURE__ */ e(
@@ -3364,81 +3367,81 @@ function Ar({
3364
3367
  {
3365
3368
  type: "button",
3366
3369
  onClick: () => o(t.date),
3367
- className: m("text-primary hover:underline", s ? "text-[10px]" : "text-xs"),
3370
+ className: h("text-primary hover:underline", s ? "text-[10px]" : "text-xs"),
3368
3371
  children: "+more"
3369
3372
  }
3370
3373
  )
3371
3374
  ] }),
3372
- /* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((a) => /* @__PURE__ */ e(Wr, { event: a, onClick: r, compact: s }, a.id)) })
3375
+ /* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((a) => /* @__PURE__ */ e(Ar, { event: a, onClick: r, compact: s }, a.id)) })
3373
3376
  ] });
3374
3377
  }
3375
- function rn({
3378
+ function nn({
3376
3379
  events: t,
3377
3380
  daysAhead: r = 7,
3378
3381
  maxEventsPerDay: o = 3,
3379
3382
  onEventClick: s,
3380
3383
  onViewAll: a,
3381
3384
  className: i,
3382
- emptyState: x,
3383
- title: g = "Upcoming",
3385
+ emptyState: g,
3386
+ title: f = "Upcoming",
3384
3387
  showHeader: c = !0,
3385
- compact: d = !1
3388
+ compact: x = !1
3386
3389
  }) {
3387
- const w = Oe(), C = w?.filteredEvents, z = w?.currentDate ?? /* @__PURE__ */ new Date(), I = t ?? C ?? [], H = O(() => {
3388
- const D = ge(z), k = new Date(D);
3389
- return k.setDate(k.getDate() + r), I.filter((S) => S.endDate >= D && S.startDate < k);
3390
- }, [I, r, z]), N = O(
3391
- () => jr(H, o),
3392
- [H, o]
3393
- ), p = H.length;
3394
- return N.length === 0 ? /* @__PURE__ */ n("div", { className: m("rounded-lg border bg-card", i), children: [
3390
+ const y = Oe(), p = y?.filteredEvents, M = y?.currentDate ?? /* @__PURE__ */ new Date(), A = t ?? p ?? [], z = B(() => {
3391
+ const L = xe(M), w = new Date(L);
3392
+ return w.setDate(w.getDate() + r), A.filter((T) => T.endDate >= L && T.startDate < w);
3393
+ }, [A, r, M]), C = B(
3394
+ () => Wr(z, o),
3395
+ [z, o]
3396
+ ), S = z.length;
3397
+ return C.length === 0 ? /* @__PURE__ */ n("div", { className: h("rounded-lg border bg-card", i), children: [
3395
3398
  c && /* @__PURE__ */ e(
3396
3399
  "div",
3397
3400
  {
3398
- className: m(
3401
+ className: h(
3399
3402
  "border-b px-4 flex items-center justify-between",
3400
- d ? "py-2" : "py-3"
3403
+ x ? "py-2" : "py-3"
3401
3404
  ),
3402
- children: /* @__PURE__ */ e("h2", { className: m("font-semibold", d ? "text-sm" : "text-base"), children: g })
3405
+ children: /* @__PURE__ */ e("h2", { className: h("font-semibold", x ? "text-sm" : "text-base"), children: f })
3403
3406
  }
3404
3407
  ),
3405
3408
  /* @__PURE__ */ e(
3406
3409
  "div",
3407
3410
  {
3408
- className: m(
3411
+ className: h(
3409
3412
  "flex flex-col items-center justify-center text-center",
3410
- d ? "py-6 px-4" : "py-10 px-6"
3413
+ x ? "py-6 px-4" : "py-10 px-6"
3411
3414
  ),
3412
- children: x ?? /* @__PURE__ */ n(oe, { children: [
3415
+ children: g ?? /* @__PURE__ */ n(ne, { children: [
3413
3416
  /* @__PURE__ */ e(
3414
- zr,
3417
+ Lr,
3415
3418
  {
3416
- className: m("text-muted-foreground/50 mb-2", d ? "size-8" : "size-10")
3419
+ className: h("text-muted-foreground/50 mb-2", x ? "size-8" : "size-10")
3417
3420
  }
3418
3421
  ),
3419
- /* @__PURE__ */ e("p", { className: m("text-muted-foreground", d ? "text-xs" : "text-sm"), children: "No upcoming events" })
3422
+ /* @__PURE__ */ e("p", { className: h("text-muted-foreground", x ? "text-xs" : "text-sm"), children: "No upcoming events" })
3420
3423
  ] })
3421
3424
  }
3422
3425
  )
3423
- ] }) : /* @__PURE__ */ n("div", { className: m("rounded-lg border bg-card overflow-hidden", i), children: [
3426
+ ] }) : /* @__PURE__ */ n("div", { className: h("rounded-lg border bg-card overflow-hidden", i), children: [
3424
3427
  c && /* @__PURE__ */ n(
3425
3428
  "div",
3426
3429
  {
3427
- className: m(
3430
+ className: h(
3428
3431
  "border-b px-4 flex items-center justify-between",
3429
- d ? "py-2" : "py-3"
3432
+ x ? "py-2" : "py-3"
3430
3433
  ),
3431
3434
  children: [
3432
3435
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
3433
- /* @__PURE__ */ e("h2", { className: m("font-semibold", d ? "text-sm" : "text-base"), children: g }),
3436
+ /* @__PURE__ */ e("h2", { className: h("font-semibold", x ? "text-sm" : "text-base"), children: f }),
3434
3437
  /* @__PURE__ */ e(
3435
3438
  "span",
3436
3439
  {
3437
- className: m(
3440
+ className: h(
3438
3441
  "text-muted-foreground bg-muted rounded-full px-2",
3439
- d ? "text-[10px] py-0" : "text-xs py-0.5"
3442
+ x ? "text-[10px] py-0" : "text-xs py-0.5"
3440
3443
  ),
3441
- children: p
3444
+ children: S
3442
3445
  }
3443
3446
  )
3444
3447
  ] }),
@@ -3447,9 +3450,9 @@ function rn({
3447
3450
  {
3448
3451
  type: "button",
3449
3452
  onClick: () => a(),
3450
- className: m(
3453
+ className: h(
3451
3454
  "text-primary hover:underline flex items-center gap-0.5",
3452
- d ? "text-xs" : "text-sm"
3455
+ x ? "text-xs" : "text-sm"
3453
3456
  ),
3454
3457
  children: [
3455
3458
  "View all",
@@ -3463,39 +3466,39 @@ function rn({
3463
3466
  /* @__PURE__ */ e(
3464
3467
  "div",
3465
3468
  {
3466
- className: m(
3469
+ className: h(
3467
3470
  "divide-y overflow-auto",
3468
- d ? "p-2 max-h-[280px]" : "p-3 max-h-[400px]"
3471
+ x ? "p-2 max-h-[280px]" : "p-3 max-h-[400px]"
3469
3472
  ),
3470
- children: N.map((D) => /* @__PURE__ */ e(
3471
- Ar,
3473
+ children: C.map((L) => /* @__PURE__ */ e(
3474
+ Fr,
3472
3475
  {
3473
- group: D,
3476
+ group: L,
3474
3477
  onEventClick: s,
3475
- onViewMore: a ? (k) => a(k) : void 0,
3476
- compact: d
3478
+ onViewMore: a ? (w) => a(w) : void 0,
3479
+ compact: x
3477
3480
  },
3478
- D.dateKey
3481
+ L.dateKey
3479
3482
  ))
3480
3483
  }
3481
3484
  )
3482
3485
  ] });
3483
3486
  }
3484
3487
  export {
3485
- tn as A,
3486
- Kr as B,
3487
- Vr as C,
3488
- Xr as D,
3489
- Ur as E,
3490
- Yr as I,
3491
- Zr as S,
3492
- ve as T,
3493
- en as U,
3494
- qr as V,
3495
- Jr as W,
3496
- Yt as Y,
3497
- rn as a,
3498
- Qr as b,
3499
- Gr as c
3488
+ rn as A,
3489
+ qr as B,
3490
+ Ur as C,
3491
+ Qr as D,
3492
+ Yr as E,
3493
+ Gr as I,
3494
+ en as S,
3495
+ we as T,
3496
+ tn as U,
3497
+ Jr as V,
3498
+ Xr as W,
3499
+ Gt as Y,
3500
+ nn as a,
3501
+ Zr as b,
3502
+ Kr as c
3500
3503
  };
3501
- //# sourceMappingURL=agenda-widget-CNUXKiQT.js.map
3504
+ //# sourceMappingURL=agenda-widget-C5uR9Raa.js.map