@innosolutions/inno-calendar 1.0.62 → 1.0.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  import { jsx as e, jsxs as r, Fragment as be } from "react/jsx-runtime";
2
- import { g as it, u as pt, C as xt } from "./use-calendar-D8XaVe44.js";
3
- import { useCallback as O, useState as ie, useEffect as de, forwardRef as Ae, useRef as ae, useMemo as te, useLayoutEffect as vt, useImperativeHandle as wt } from "react";
4
- import { c as p } from "./index-DtaLkIY8.js";
5
- import { P as lt, p as ct, o as dt, z as fe, I as bt, J as yt, B as Ce, K as kt, L as Ue, x as ge, F as pe, y as xe, k as Nt, C as Ct, M as Ve, A as Dt, W as Mt, c as St, N as Et } from "./week-view-DY167Wok.js";
6
- import { j as Lt, D as Tt, I as Ht, e as zt, S as It } from "./slot-selection-context-CRstOosL.js";
7
- import { az as ce, aQ as Pe, I as ut, an as jt, Z as At, a8 as Pt, n as ht, T as Wt } from "./position-utils-DMVQFywD.js";
8
- function Ft({ view: t, className: n = "" }) {
2
+ import { g as lt, u as xt, C as vt } from "./use-calendar-D8XaVe44.js";
3
+ import { useCallback as _, useState as le, useEffect as he, forwardRef as Pe, useRef as ie, useMemo as ee, useLayoutEffect as wt, useImperativeHandle as bt } from "react";
4
+ import { c as g } from "./index-DtaLkIY8.js";
5
+ import { P as ct, p as dt, o as ut, z as fe, I as yt, J as kt, B as De, K as Nt, L as Ve, x as ge, F as pe, y as xe, k as Ct, C as Dt, M as Ye, A as Mt, W as Et, c as Lt, N as St } from "./week-view-DY167Wok.js";
6
+ import { j as Tt, D as Ht, I as It, e as zt, S as jt } from "./slot-selection-context-CRstOosL.js";
7
+ import { az as de, aQ as We, I as ht, an as At, Z as Pt, a8 as Wt, n as mt, T as Ft } from "./position-utils-DMVQFywD.js";
8
+ function $t({ view: t, className: n = "" }) {
9
9
  return /* @__PURE__ */ e(
10
10
  "div",
11
11
  {
@@ -29,49 +29,49 @@ function Ft({ view: t, className: n = "" }) {
29
29
  }
30
30
  );
31
31
  }
32
- function Ye({ view: t, className: n }) {
33
- return /* @__PURE__ */ e(Ft, { view: t, className: n });
32
+ function Ke({ view: t, className: n }) {
33
+ return /* @__PURE__ */ e($t, { view: t, className: n });
34
34
  }
35
- function kr(t) {
35
+ function Nr(t) {
36
36
  const {
37
37
  events: n,
38
38
  resources: s,
39
39
  scheduleTypes: o,
40
- initialView: i = "week",
41
- initialDate: a,
42
- initialFilters: f,
43
- preferences: m,
40
+ initialView: a = "week",
41
+ initialDate: l,
42
+ initialFilters: x,
43
+ preferences: h,
44
44
  locale: c,
45
- slots: v,
46
- renderEvent: y,
45
+ slots: w,
46
+ renderEvent: P,
47
47
  onViewChange: b,
48
- onDateChange: A,
49
- onEventClick: $,
50
- onSlotSelect: P,
51
- onFiltersChange: F,
52
- className: T,
53
- children: C
54
- } = t, j = it();
55
- if (j)
56
- return /* @__PURE__ */ e("div", { className: T, style: { position: "relative" }, children: C ?? /* @__PURE__ */ e(Ye, { view: j.view, className: T }) });
57
- const W = pt({
48
+ onDateChange: y,
49
+ onEventClick: B,
50
+ onSlotSelect: A,
51
+ onFiltersChange: W,
52
+ className: F,
53
+ children: H
54
+ } = t, k = lt();
55
+ if (k)
56
+ return /* @__PURE__ */ e("div", { className: F, style: { position: "relative" }, children: H ?? /* @__PURE__ */ e(Ke, { view: k.view, className: F }) });
57
+ const $ = xt({
58
58
  events: n,
59
59
  resources: s,
60
60
  scheduleTypes: o,
61
- initialView: i,
62
- initialDate: a,
63
- initialFilters: f,
64
- preferences: m,
61
+ initialView: a,
62
+ initialDate: l,
63
+ initialFilters: x,
64
+ preferences: h,
65
65
  locale: c,
66
66
  onViewChange: b,
67
- onDateChange: A,
68
- onEventClick: $,
69
- onSlotSelect: P,
70
- onFiltersChange: F
67
+ onDateChange: y,
68
+ onEventClick: B,
69
+ onSlotSelect: A,
70
+ onFiltersChange: W
71
71
  });
72
- return /* @__PURE__ */ e(xt, { value: W, children: /* @__PURE__ */ e("div", { className: T, style: { position: "relative" }, children: C ?? /* @__PURE__ */ e(Ye, { view: W.view, className: T }) }) });
72
+ return /* @__PURE__ */ e(vt, { value: $, children: /* @__PURE__ */ e("div", { className: F, style: { position: "relative" }, children: H ?? /* @__PURE__ */ e(Ke, { view: $.view, className: F }) }) });
73
73
  }
74
- function $t({ className: t }) {
74
+ function Ot({ className: t }) {
75
75
  return /* @__PURE__ */ r(
76
76
  "svg",
77
77
  {
@@ -90,7 +90,7 @@ function $t({ className: t }) {
90
90
  }
91
91
  );
92
92
  }
93
- function mt({ className: t }) {
93
+ function ft({ className: t }) {
94
94
  return /* @__PURE__ */ r(
95
95
  "svg",
96
96
  {
@@ -112,7 +112,7 @@ function mt({ className: t }) {
112
112
  }
113
113
  );
114
114
  }
115
- function je({ className: t }) {
115
+ function Ae({ className: t }) {
116
116
  return /* @__PURE__ */ r(
117
117
  "svg",
118
118
  {
@@ -131,7 +131,7 @@ function je({ className: t }) {
131
131
  }
132
132
  );
133
133
  }
134
- function Ot({ className: t }) {
134
+ function _t({ className: t }) {
135
135
  return /* @__PURE__ */ r(
136
136
  "svg",
137
137
  {
@@ -150,7 +150,7 @@ function Ot({ className: t }) {
150
150
  }
151
151
  );
152
152
  }
153
- function Te({ className: t }) {
153
+ function He({ className: t }) {
154
154
  return /* @__PURE__ */ e(
155
155
  "svg",
156
156
  {
@@ -166,7 +166,7 @@ function Te({ className: t }) {
166
166
  }
167
167
  );
168
168
  }
169
- function _t({ className: t }) {
169
+ function Bt({ className: t }) {
170
170
  return /* @__PURE__ */ r(
171
171
  "svg",
172
172
  {
@@ -185,7 +185,7 @@ function _t({ className: t }) {
185
185
  }
186
186
  );
187
187
  }
188
- function Bt({ className: t }) {
188
+ function Rt({ className: t }) {
189
189
  return /* @__PURE__ */ e(
190
190
  "svg",
191
191
  {
@@ -201,7 +201,7 @@ function Bt({ className: t }) {
201
201
  }
202
202
  );
203
203
  }
204
- function Rt({ className: t }) {
204
+ function Ut({ className: t }) {
205
205
  return /* @__PURE__ */ r(
206
206
  "svg",
207
207
  {
@@ -222,7 +222,7 @@ function Rt({ className: t }) {
222
222
  }
223
223
  );
224
224
  }
225
- function Ut({ className: t }) {
225
+ function Vt({ className: t }) {
226
226
  return /* @__PURE__ */ r(
227
227
  "svg",
228
228
  {
@@ -241,7 +241,7 @@ function Ut({ className: t }) {
241
241
  }
242
242
  );
243
243
  }
244
- function Vt({ className: t }) {
244
+ function Yt({ className: t }) {
245
245
  return /* @__PURE__ */ r(
246
246
  "svg",
247
247
  {
@@ -262,7 +262,7 @@ function Vt({ className: t }) {
262
262
  }
263
263
  );
264
264
  }
265
- function Yt({ className: t }) {
265
+ function Kt({ className: t }) {
266
266
  return /* @__PURE__ */ r(
267
267
  "svg",
268
268
  {
@@ -284,7 +284,7 @@ function Yt({ className: t }) {
284
284
  }
285
285
  );
286
286
  }
287
- function Me({ className: t }) {
287
+ function Ee({ className: t }) {
288
288
  return /* @__PURE__ */ e(
289
289
  "svg",
290
290
  {
@@ -295,12 +295,12 @@ function Me({ className: t }) {
295
295
  strokeWidth: "2",
296
296
  strokeLinecap: "round",
297
297
  strokeLinejoin: "round",
298
- className: p("animate-spin", t),
298
+ className: g("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 Kt = {
303
+ const Gt = {
304
304
  edit: "Edit",
305
305
  delete: "Delete",
306
306
  cancel: "Cancel Event",
@@ -325,52 +325,52 @@ const Kt = {
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
- }, He = Ae(
329
- ({ onClick: t, label: n, children: s, className: o, variant: i = "ghost", ...a }, f) => /* @__PURE__ */ r(ge, { children: [
328
+ }, Ie = Pe(
329
+ ({ onClick: t, label: n, children: s, className: o, variant: a = "ghost", ...l }, x) => /* @__PURE__ */ r(ge, { children: [
330
330
  /* @__PURE__ */ e(pe, { asChild: !0, children: /* @__PURE__ */ e(
331
331
  "button",
332
332
  {
333
333
  type: "button",
334
- ref: f,
334
+ ref: x,
335
335
  onClick: t,
336
- className: p(
336
+ className: g(
337
337
  "h-8 w-8 rounded-full flex items-center justify-center transition-colors",
338
- i === "ghost" && "hover:bg-zinc-100 dark:hover:bg-zinc-800 text-zinc-600 dark:text-zinc-400",
339
- i === "destructive" && "hover:bg-red-50 dark:hover:bg-red-950/30 text-zinc-600 dark:text-zinc-400 hover:text-red-600",
338
+ a === "ghost" && "hover:bg-zinc-100 dark:hover:bg-zinc-800 text-zinc-600 dark:text-zinc-400",
339
+ a === "destructive" && "hover:bg-red-50 dark:hover:bg-red-950/30 text-zinc-600 dark:text-zinc-400 hover:text-red-600",
340
340
  o
341
341
  ),
342
342
  "aria-label": n,
343
- ...a,
343
+ ...l,
344
344
  children: s
345
345
  }
346
346
  ) }),
347
347
  /* @__PURE__ */ e(xe, { side: "bottom", className: "text-xs", children: n })
348
348
  ] })
349
349
  );
350
- He.displayName = "IconButton";
351
- function Gt({ src: t, alt: n, initials: s, className: o, isClient: i }) {
352
- const [a, f] = ie(!1);
350
+ Ie.displayName = "IconButton";
351
+ function Jt({ src: t, alt: n, initials: s, className: o, isClient: a }) {
352
+ const [l, x] = le(!1);
353
353
  return /* @__PURE__ */ e(
354
354
  "div",
355
355
  {
356
- className: p(
356
+ className: g(
357
357
  "relative h-7 w-7 rounded-full overflow-hidden shrink-0",
358
358
  o
359
359
  ),
360
- children: t && !a ? /* @__PURE__ */ e(
360
+ children: t && !l ? /* @__PURE__ */ e(
361
361
  "img",
362
362
  {
363
363
  src: t,
364
364
  alt: n,
365
365
  className: "h-full w-full object-cover",
366
- onError: () => f(!0)
366
+ onError: () => x(!0)
367
367
  }
368
368
  ) : /* @__PURE__ */ e(
369
369
  "div",
370
370
  {
371
- className: p(
371
+ className: g(
372
372
  "h-full w-full flex items-center justify-center text-[10px] font-medium",
373
- i ? "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"
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
  ),
375
375
  children: s
376
376
  }
@@ -378,64 +378,64 @@ function Gt({ src: t, alt: n, initials: s, className: o, isClient: i }) {
378
378
  }
379
379
  );
380
380
  }
381
- function Ke({
381
+ function Ge({
382
382
  participant: t,
383
383
  isEventCanceled: n = !1,
384
384
  labels: s
385
385
  }) {
386
- const o = t.name || "Unknown", i = o.split(" ").map((A) => A[0]).join("").toUpperCase().slice(0, 2), a = t.isOrganizer ?? !1, f = t.isConfirmed, m = f === !0, c = f === !1, v = t.isClient ?? !1, y = t.profilePicture || t.avatar, b = n;
386
+ const o = t.name || "Unknown", a = o.split(" ").map((y) => y[0]).join("").toUpperCase().slice(0, 2), l = t.isOrganizer ?? !1, x = t.isConfirmed, h = x === !0, c = x === !1, w = t.isClient ?? !1, P = t.profilePicture || t.avatar, b = n;
387
387
  return /* @__PURE__ */ r(
388
388
  "div",
389
389
  {
390
- className: p(
390
+ className: g(
391
391
  "flex items-center gap-3 py-0",
392
392
  b && "opacity-60"
393
393
  ),
394
394
  children: [
395
395
  /* @__PURE__ */ r("div", { className: "relative", children: [
396
396
  /* @__PURE__ */ e(
397
- Gt,
397
+ Jt,
398
398
  {
399
- src: y,
399
+ src: P,
400
400
  alt: o,
401
- initials: i,
402
- isClient: v,
403
- className: p(b && "grayscale")
401
+ initials: a,
402
+ isClient: w,
403
+ className: g(b && "grayscale")
404
404
  }
405
405
  ),
406
- b || 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(je, { className: "h-2 w-2 text-red-600 dark:text-red-400 stroke-[3]" }) }) }) : m ? /* @__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(Te, { className: "h-2 w-2 text-green-600 dark:text-green-400 stroke-[3]" }) }) }) : null
406
+ b || 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(Ae, { className: "h-2 w-2 text-red-600 dark:text-red-400 stroke-[3]" }) }) }) : h ? /* @__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(He, { className: "h-2 w-2 text-green-600 dark:text-green-400 stroke-[3]" }) }) }) : null
407
407
  ] }),
408
408
  /* @__PURE__ */ r("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: p(
412
+ className: g(
413
413
  "text-sm text-zinc-900 dark:text-zinc-100 truncate",
414
414
  b && "line-through text-zinc-500 dark:text-zinc-500"
415
415
  ),
416
416
  children: o
417
417
  }
418
418
  ) }),
419
- v && /* @__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: s.client }),
420
- a && !b && /* @__PURE__ */ e("div", { className: "text-xs text-zinc-500", children: s.organizer })
419
+ w && /* @__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: s.client }),
420
+ l && !b && /* @__PURE__ */ e("div", { className: "text-xs text-zinc-500", children: s.organizer })
421
421
  ] })
422
422
  ]
423
423
  }
424
424
  );
425
425
  }
426
- function Jt({
426
+ function qt({
427
427
  open: t,
428
428
  onOpenChange: n,
429
429
  title: s,
430
430
  children: o
431
431
  }) {
432
- return de(() => {
432
+ return he(() => {
433
433
  if (!t) return;
434
- const i = (a) => {
435
- a.key === "Escape" && n(!1);
434
+ const a = (l) => {
435
+ l.key === "Escape" && n(!1);
436
436
  };
437
- return document.addEventListener("keydown", i), () => document.removeEventListener("keydown", i);
438
- }, [t, n]), de(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
437
+ return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
438
+ }, [t, n]), he(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
439
439
  document.body.style.overflow = "";
440
440
  }), [t]), t ? /* @__PURE__ */ r("div", { className: "fixed inset-0 z-50", children: [
441
441
  /* @__PURE__ */ e(
@@ -443,8 +443,8 @@ function Jt({
443
443
  {
444
444
  className: "fixed inset-0 bg-black/50 backdrop-blur-sm",
445
445
  onClick: () => n(!1),
446
- onKeyDown: (i) => {
447
- (i.key === "Enter" || i.key === " ") && n(!1);
446
+ onKeyDown: (a) => {
447
+ (a.key === "Enter" || a.key === " ") && n(!1);
448
448
  }
449
449
  }
450
450
  ),
@@ -454,15 +454,15 @@ function Jt({
454
454
  ] }) })
455
455
  ] }) : null;
456
456
  }
457
- function qt({
457
+ function Xt({
458
458
  open: t,
459
459
  onOpenChange: n,
460
460
  title: s,
461
461
  description: o,
462
- cancelLabel: i,
463
- confirmLabel: a,
464
- onConfirm: f,
465
- isLoading: m
462
+ cancelLabel: a,
463
+ confirmLabel: l,
464
+ onConfirm: x,
465
+ isLoading: h
466
466
  }) {
467
467
  return t ? /* @__PURE__ */ r("div", { className: "fixed inset-0 z-[60]", children: [
468
468
  /* @__PURE__ */ e(
@@ -480,25 +480,25 @@ function qt({
480
480
  /* @__PURE__ */ e("p", { className: "mt-2 text-sm text-zinc-600 dark:text-zinc-400", children: o }),
481
481
  /* @__PURE__ */ r("div", { className: "mt-4 flex justify-end gap-3", children: [
482
482
  /* @__PURE__ */ e(
483
- Ce,
483
+ De,
484
484
  {
485
485
  variant: "outline",
486
486
  size: "sm",
487
487
  onClick: () => n(!1),
488
- children: i
488
+ children: a
489
489
  }
490
490
  ),
491
491
  /* @__PURE__ */ r(
492
- Ce,
492
+ De,
493
493
  {
494
494
  variant: "destructive",
495
495
  size: "sm",
496
- onClick: f,
497
- disabled: m,
496
+ onClick: x,
497
+ disabled: h,
498
498
  children: [
499
- m && /* @__PURE__ */ e(Me, { className: "h-4 w-4 mr-2" }),
500
- /* @__PURE__ */ e(mt, { className: "h-4 w-4 mr-2" }),
501
- a
499
+ h && /* @__PURE__ */ e(Ee, { className: "h-4 w-4 mr-2" }),
500
+ /* @__PURE__ */ e(ft, { className: "h-4 w-4 mr-2" }),
501
+ l
502
502
  ]
503
503
  }
504
504
  )
@@ -506,14 +506,14 @@ function qt({
506
506
  ] }) })
507
507
  ] }) : null;
508
508
  }
509
- function Xt(t, n) {
509
+ function Qt(t, n) {
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 Qt(t, n) {
516
+ function Zt(t, n) {
517
517
  const s = {
518
518
  hour: "2-digit",
519
519
  minute: "2-digit",
@@ -521,7 +521,7 @@ function Qt(t, n) {
521
521
  };
522
522
  return `${t.toLocaleTimeString(void 0, s)} – ${n.toLocaleTimeString(void 0, s)}`;
523
523
  }
524
- function Zt(t) {
524
+ function en(t) {
525
525
  return t.toLocaleDateString(void 0, {
526
526
  day: "2-digit",
527
527
  month: "short",
@@ -530,73 +530,73 @@ function Zt(t) {
530
530
  minute: "2-digit"
531
531
  });
532
532
  }
533
- function en(t) {
534
- const [n, s] = ie(() => typeof window < "u" ? window.matchMedia(t).matches : !1);
535
- return de(() => {
533
+ function tn(t) {
534
+ const [n, s] = le(() => typeof window < "u" ? window.matchMedia(t).matches : !1);
535
+ return he(() => {
536
536
  if (typeof window > "u") return;
537
- const o = window.matchMedia(t), i = (a) => s(a.matches);
538
- return o.addEventListener("change", i), () => o.removeEventListener("change", i);
537
+ const o = window.matchMedia(t), a = (l) => s(l.matches);
538
+ return o.addEventListener("change", a), () => o.removeEventListener("change", a);
539
539
  }, [t]), n;
540
540
  }
541
- function Ge({
541
+ function Je({
542
542
  event: t,
543
543
  labels: n,
544
544
  isLoading: s,
545
545
  onClose: o,
546
- onEdit: i,
547
- onDelete: a,
548
- onCancel: f,
549
- onAccept: m,
546
+ onEdit: a,
547
+ onDelete: l,
548
+ onCancel: x,
549
+ onAccept: h,
550
550
  onDecline: c,
551
- onConfirmMeeting: v,
552
- canEdit: y = !0,
551
+ onConfirmMeeting: w,
552
+ canEdit: P = !0,
553
553
  canDelete: b = !1,
554
- canCancel: A = !0,
555
- isCurrentUserParticipant: $ = !1,
556
- isCurrentUserClient: P = !1,
557
- currentUserAcceptStatus: F,
558
- isAcceptLoading: T = !1,
559
- isDeclineLoading: C = !1,
560
- isConfirmLoading: j = !1,
561
- isDeleteLoading: W = !1,
562
- renderParticipant: _,
563
- renderHeaderActions: M,
564
- renderCancelReason: G,
565
- renderDeleteConfirmation: H,
566
- formatDate: L = Xt,
567
- formatTimeRange: V = Qt
554
+ canCancel: y = !0,
555
+ isCurrentUserParticipant: B = !1,
556
+ isCurrentUserClient: A = !1,
557
+ currentUserAcceptStatus: W,
558
+ isAcceptLoading: F = !1,
559
+ isDeclineLoading: H = !1,
560
+ isConfirmLoading: k = !1,
561
+ isDeleteLoading: $ = !1,
562
+ renderParticipant: R,
563
+ renderHeaderActions: Y,
564
+ renderCancelReason: M,
565
+ renderDeleteConfirmation: V,
566
+ formatDate: S = Qt,
567
+ formatTimeRange: z = Zt
568
568
  }) {
569
- const [X, Q] = ie(!1), B = !(t.isCanceled || t.meetingTookPlace), d = t.isRecurring ?? !1, N = t.participantDetails, h = t.participantsNames || [], D = N && N.length > 0, w = F === !0, R = F === !1, K = $ && !P && B, Z = D ? N.filter((E) => E.isConfirmed).length : t.isAccepted ? h.length : 0, Y = D ? N.length : h.length, J = t.scheduleTypeColor || t.hexColor || "#039BE5", ue = O(() => t.startDate ? L(t.startDate) : n.noDateProvided, [t.startDate, L, n.noDateProvided]), se = O(() => t.startDate && t.endDate ? V(t.startDate, t.endDate) : null, [t.startDate, t.endDate, V]), le = () => {
570
- o(), i?.(t);
571
- }, we = () => {
572
- o(), f?.(t);
573
- }, he = () => {
574
- Q(!0);
575
- }, g = () => {
576
- a?.(t), Q(!1);
569
+ const [U, G] = le(!1), X = !(t.isCanceled || t.meetingTookPlace), m = t.isRecurring ?? !1, p = t.participantDetails, f = t.participantsNames || [], E = p && p.length > 0, D = W === !0, T = W === !1, te = B && !A && X, O = E ? p.filter((d) => d.isConfirmed).length : t.isAccepted ? f.length : 0, q = E ? p.length : f.length, re = t.scheduleTypeColor || t.hexColor || "#039BE5", Q = _(() => t.startDate ? S(t.startDate) : n.noDateProvided, [t.startDate, S, n.noDateProvided]), we = _(() => t.startDate && t.endDate ? z(t.startDate, t.endDate) : null, [t.startDate, t.endDate, z]), se = () => {
570
+ o(), a?.(t);
571
+ }, ae = () => {
572
+ o(), x?.(t);
573
+ }, ye = () => {
574
+ G(!0);
575
+ }, ue = () => {
576
+ l?.(t), G(!1);
577
577
  };
578
- return s ? /* @__PURE__ */ e("div", { className: "flex h-48 items-center justify-center", children: /* @__PURE__ */ e(Me, { className: "h-6 w-6 text-zinc-400" }) }) : /* @__PURE__ */ r(fe, { delayDuration: 300, children: [
578
+ return s ? /* @__PURE__ */ e("div", { className: "flex h-48 items-center justify-center", children: /* @__PURE__ */ e(Ee, { className: "h-6 w-6 text-zinc-400" }) }) : /* @__PURE__ */ r(fe, { delayDuration: 300, children: [
579
579
  /* @__PURE__ */ r("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: M ? M({ onClose: o }) : /* @__PURE__ */ r(be, { children: [
581
- B && y && i && /* @__PURE__ */ e(He, { onClick: le, label: n.edit, children: /* @__PURE__ */ e($t, { className: "h-[18px] w-[18px]" }) }),
582
- B && A && f && /* @__PURE__ */ e(He, { onClick: we, label: n.cancel, children: /* @__PURE__ */ e(Ot, { className: "h-[18px] w-[18px]" }) }),
583
- b && a && /* @__PURE__ */ e(
584
- He,
580
+ /* @__PURE__ */ e("div", { className: "flex items-start justify-end gap-0.5", children: Y ? Y({ onClose: o }) : /* @__PURE__ */ r(be, { children: [
581
+ X && P && a && /* @__PURE__ */ e(Ie, { onClick: se, label: n.edit, children: /* @__PURE__ */ e(Ot, { className: "h-[18px] w-[18px]" }) }),
582
+ X && y && x && /* @__PURE__ */ e(Ie, { onClick: ae, label: n.cancel, children: /* @__PURE__ */ e(_t, { className: "h-[18px] w-[18px]" }) }),
583
+ b && l && /* @__PURE__ */ e(
584
+ Ie,
585
585
  {
586
- onClick: he,
586
+ onClick: ye,
587
587
  label: n.delete,
588
588
  variant: "destructive",
589
- children: /* @__PURE__ */ e(mt, { className: "h-[18px] w-[18px]" })
589
+ children: /* @__PURE__ */ e(ft, { className: "h-[18px] w-[18px]" })
590
590
  }
591
591
  ),
592
- /* @__PURE__ */ e(He, { onClick: o, label: n.close, children: /* @__PURE__ */ e(je, { className: "h-[18px] w-[18px]" }) })
592
+ /* @__PURE__ */ e(Ie, { onClick: o, label: n.close, children: /* @__PURE__ */ e(Ae, { className: "h-[18px] w-[18px]" }) })
593
593
  ] }) }),
594
594
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ r("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: re }
600
600
  }
601
601
  ),
602
602
  /* @__PURE__ */ r("div", { className: "flex-1 min-w-0", children: [
@@ -604,7 +604,7 @@ function Ge({
604
604
  /* @__PURE__ */ e(
605
605
  "h2",
606
606
  {
607
- className: p(
607
+ className: g(
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 Ge({
612
612
  }
613
613
  ),
614
614
  t.meetingTookPlace && /* @__PURE__ */ r("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(_t, { className: "h-3 w-3" }),
615
+ /* @__PURE__ */ e(Bt, { className: "h-3 w-3" }),
616
616
  n.completed
617
617
  ] }),
618
618
  t.isCanceled && /* @__PURE__ */ r("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(je, { className: "h-3 w-3" }),
619
+ /* @__PURE__ */ e(Ae, { className: "h-3 w-3" }),
620
620
  n.canceled
621
621
  ] })
622
622
  ] }),
623
623
  /* @__PURE__ */ r("div", { className: "mt-1 text-sm text-zinc-600 dark:text-zinc-400", children: [
624
- /* @__PURE__ */ e("span", { children: ue() }),
625
- se() && /* @__PURE__ */ r(be, { children: [
624
+ /* @__PURE__ */ e("span", { children: Q() }),
625
+ we() && /* @__PURE__ */ r(be, { children: [
626
626
  /* @__PURE__ */ e("span", { className: "mx-1.5", children: "·" }),
627
- /* @__PURE__ */ e("span", { children: se() })
627
+ /* @__PURE__ */ e("span", { children: we() })
628
628
  ] })
629
629
  ] }),
630
- d && t.recurrenceSummary && /* @__PURE__ */ e("div", { className: "text-sm text-zinc-500 dark:text-zinc-500", children: t.recurrenceSummary })
630
+ m && 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: G ? G(t) : /* @__PURE__ */ e("div", { className: "flex items-start gap-0", children: /* @__PURE__ */ r("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: M ? M(t) : /* @__PURE__ */ e("div", { className: "flex items-start gap-0", children: /* @__PURE__ */ r("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: n.cancellationNote }),
635
635
  t.cancelReason && /* @__PURE__ */ r("div", { className: "mt-1 text-sm text-red-600/80 dark:text-red-400/80 italic", children: [
636
636
  '"',
@@ -640,64 +640,64 @@ function Ge({
640
640
  t.canceledDate && /* @__PURE__ */ r("div", { className: "mt-1.5 text-xs text-red-500/70 dark:text-red-400/60", children: [
641
641
  n.canceledOn,
642
642
  " ",
643
- Zt(t.canceledDate)
643
+ en(t.canceledDate)
644
644
  ] })
645
645
  ] }) }) }),
646
646
  /* @__PURE__ */ r("div", { className: "space-y-0.5", children: [
647
647
  t.address && /* @__PURE__ */ r("div", { className: "flex items-start gap-2", children: [
648
- /* @__PURE__ */ e(Ut, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
648
+ /* @__PURE__ */ e(Vt, { 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
- (D || h.length > 0) && /* @__PURE__ */ r("div", { className: "flex items-start gap-2 py-0", children: [
652
- /* @__PURE__ */ e(Rt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
651
+ (E || f.length > 0) && /* @__PURE__ */ r("div", { className: "flex items-start gap-2 py-0", children: [
652
+ /* @__PURE__ */ e(Ut, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
653
653
  /* @__PURE__ */ r("div", { className: "flex-1", children: [
654
654
  /* @__PURE__ */ r("div", { className: "flex items-center gap-0", children: [
655
655
  /* @__PURE__ */ r("span", { className: "text-sm text-zinc-900 dark:text-zinc-100 font-medium", children: [
656
- Y,
656
+ q,
657
657
  " ",
658
- Y !== 1 ? n.guests : n.guest
658
+ q !== 1 ? n.guests : n.guest
659
659
  ] }),
660
- Y > 0 && /* @__PURE__ */ r("span", { className: "text-xs text-zinc-500", children: [
660
+ q > 0 && /* @__PURE__ */ r("span", { className: "text-xs text-zinc-500", children: [
661
661
  "(",
662
- Z,
662
+ O,
663
663
  " ",
664
664
  n.confirmed,
665
665
  ")"
666
666
  ] })
667
667
  ] }),
668
668
  /* @__PURE__ */ r("div", { className: "mt-2 space-y-2", children: [
669
- D ? N.slice(0, 6).map(
670
- (E, U) => _ ? _(E, U) : /* @__PURE__ */ e(
671
- Ke,
669
+ E ? p.slice(0, 6).map(
670
+ (d, I) => R ? R(d, I) : /* @__PURE__ */ e(
671
+ Ge,
672
672
  {
673
- participant: E,
673
+ participant: d,
674
674
  isEventCanceled: t.isCanceled,
675
675
  labels: n
676
676
  },
677
- E.id
677
+ d.id
678
678
  )
679
- ) : h.slice(0, 6).map((E, U) => {
680
- const re = {
681
- id: String(U),
682
- name: E,
679
+ ) : f.slice(0, 6).map((d, I) => {
680
+ const K = {
681
+ id: String(I),
682
+ name: d,
683
683
  email: "",
684
684
  isConfirmed: t.isAccepted,
685
- isOrganizer: U === 0,
685
+ isOrganizer: I === 0,
686
686
  isClient: !1
687
687
  };
688
- return _ ? _(re, U) : /* @__PURE__ */ e(
689
- Ke,
688
+ return R ? R(K, I) : /* @__PURE__ */ e(
689
+ Ge,
690
690
  {
691
- participant: re,
691
+ participant: K,
692
692
  isEventCanceled: t.isCanceled,
693
693
  labels: n
694
694
  },
695
- E
695
+ d
696
696
  );
697
697
  }),
698
- Y > 6 && /* @__PURE__ */ r("div", { className: "text-xs text-zinc-500 py-1.5 pl-10", children: [
698
+ q > 6 && /* @__PURE__ */ r("div", { className: "text-xs text-zinc-500 py-1.5 pl-10", children: [
699
699
  "+",
700
- Y - 6,
700
+ q - 6,
701
701
  " ",
702
702
  n.more
703
703
  ] })
@@ -705,282 +705,282 @@ function Ge({
705
705
  ] })
706
706
  ] }),
707
707
  t.description && /* @__PURE__ */ r("div", { className: "flex items-start gap-2", children: [
708
- /* @__PURE__ */ e(Yt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
708
+ /* @__PURE__ */ e(Kt, { 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__ */ r("div", { className: "flex items-start gap-2", children: [
712
- /* @__PURE__ */ e(Vt, { 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: D && N.find((E) => E.isOrganizer)?.name || h[0] || "Calendar" })
712
+ /* @__PURE__ */ e(Yt, { 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: E && p.find((d) => d.isOrganizer)?.name || f[0] || "Calendar" })
714
714
  ] })
715
715
  ] }),
716
- K && m && c && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 mt-3 py-3", children: /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
717
- d ? /* @__PURE__ */ r(bt, { children: [
718
- /* @__PURE__ */ e(yt, { asChild: !0, children: /* @__PURE__ */ r("div", { className: "flex", children: [
716
+ te && h && c && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 mt-3 py-3", children: /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
717
+ m ? /* @__PURE__ */ r(yt, { children: [
718
+ /* @__PURE__ */ e(kt, { asChild: !0, children: /* @__PURE__ */ r("div", { className: "flex", children: [
719
719
  /* @__PURE__ */ e(
720
- Ce,
720
+ De,
721
721
  {
722
722
  size: "sm",
723
723
  variant: "outline",
724
- className: p(
724
+ className: g(
725
725
  "rounded-r-none gap-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",
726
- w && "!bg-green-700 !text-white hover:!bg-green-700"
726
+ D && "!bg-green-700 !text-white hover:!bg-green-700"
727
727
  ),
728
- onClick: (E) => {
729
- E.stopPropagation(), w || m(t);
728
+ onClick: (d) => {
729
+ d.stopPropagation(), D || h(t);
730
730
  },
731
- disabled: T,
732
- children: T ? /* @__PURE__ */ e(Me, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(be, { children: [
733
- w && /* @__PURE__ */ e(Te, { className: "h-3.5 w-3.5" }),
731
+ disabled: F,
732
+ children: F ? /* @__PURE__ */ e(Ee, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(be, { children: [
733
+ D && /* @__PURE__ */ e(He, { className: "h-3.5 w-3.5" }),
734
734
  n.going
735
735
  ] })
736
736
  }
737
737
  ),
738
738
  /* @__PURE__ */ e(
739
- Ce,
739
+ De,
740
740
  {
741
741
  size: "sm",
742
742
  variant: "outline",
743
- className: p(
743
+ className: g(
744
744
  "rounded-l-none px-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",
745
- w && "!bg-green-700 !text-white hover:!bg-green-700"
745
+ D && "!bg-green-700 !text-white hover:!bg-green-700"
746
746
  ),
747
- children: /* @__PURE__ */ e(Bt, { className: "h-3.5 w-3.5" })
747
+ children: /* @__PURE__ */ e(Rt, { className: "h-3.5 w-3.5" })
748
748
  }
749
749
  )
750
750
  ] }) }),
751
- /* @__PURE__ */ r(kt, { align: "start", children: [
751
+ /* @__PURE__ */ r(Nt, { align: "start", children: [
752
752
  /* @__PURE__ */ r(
753
- Ue,
753
+ Ve,
754
754
  {
755
- className: p(
755
+ className: g(
756
756
  "gap-1.5 h-8 !border-none !bg-green-50 text-green-800 hover:!bg-green-100",
757
- w && "!bg-green-700 !text-white hover:!bg-green-700"
757
+ D && "!bg-green-700 !text-white hover:!bg-green-700"
758
758
  ),
759
- onClick: () => m(t),
759
+ onClick: () => h(t),
760
760
  children: [
761
- /* @__PURE__ */ e(Te, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
761
+ /* @__PURE__ */ e(He, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
762
762
  n.acceptThisEvent
763
763
  ]
764
764
  }
765
765
  ),
766
- /* @__PURE__ */ r(Ue, { onClick: () => m(t), children: [
767
- /* @__PURE__ */ e(Te, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
766
+ /* @__PURE__ */ r(Ve, { onClick: () => h(t), children: [
767
+ /* @__PURE__ */ e(He, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
768
768
  n.acceptAllEvents
769
769
  ] })
770
770
  ] })
771
771
  ] }) : /* @__PURE__ */ e(
772
- Ce,
772
+ De,
773
773
  {
774
774
  size: "sm",
775
775
  variant: "outline",
776
- className: p(
776
+ className: g(
777
777
  "gap-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",
778
- w && "!bg-green-700 !text-white hover:!bg-green-700"
778
+ D && "!bg-green-700 !text-white hover:!bg-green-700"
779
779
  ),
780
780
  onClick: () => {
781
- w || m(t);
781
+ D || h(t);
782
782
  },
783
- disabled: T,
784
- children: T ? /* @__PURE__ */ e(Me, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(be, { children: [
785
- w && /* @__PURE__ */ e(Te, { className: "h-3.5 w-3.5" }),
783
+ disabled: F,
784
+ children: F ? /* @__PURE__ */ e(Ee, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(be, { children: [
785
+ D && /* @__PURE__ */ e(He, { className: "h-3.5 w-3.5" }),
786
786
  n.going
787
787
  ] })
788
788
  }
789
789
  ),
790
790
  /* @__PURE__ */ e(
791
- Ce,
791
+ De,
792
792
  {
793
793
  size: "sm",
794
794
  variant: "outline",
795
- className: p(
795
+ className: g(
796
796
  "gap-1.5 h-8 !border-none !bg-rose-100 text-rose-800 hover:!bg-rose-200",
797
- R && "!bg-rose-700 !text-white hover:!bg-rose-700"
797
+ T && "!bg-rose-700 !text-white hover:!bg-rose-700"
798
798
  ),
799
799
  onClick: () => {
800
- R || c(t);
800
+ T || c(t);
801
801
  },
802
- disabled: C,
803
- children: C ? /* @__PURE__ */ e(Me, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(be, { children: [
804
- R && /* @__PURE__ */ e(je, { className: "h-3.5 w-3.5" }),
802
+ disabled: H,
803
+ children: H ? /* @__PURE__ */ e(Ee, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(be, { children: [
804
+ T && /* @__PURE__ */ e(Ae, { className: "h-3.5 w-3.5" }),
805
805
  n.notGoing
806
806
  ] })
807
807
  }
808
808
  )
809
809
  ] }) }),
810
- $ && w && !t.meetingTookPlace && !t.isCanceled && v && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 py-3", children: /* @__PURE__ */ r(
811
- Ce,
810
+ B && D && !t.meetingTookPlace && !t.isCanceled && w && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 py-3", children: /* @__PURE__ */ r(
811
+ De,
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: () => v(t),
817
- disabled: j,
816
+ onClick: () => w(t),
817
+ disabled: k,
818
818
  children: [
819
- j && /* @__PURE__ */ e(Me, { className: "h-4 w-4 mr-2" }),
819
+ k && /* @__PURE__ */ e(Ee, { className: "h-4 w-4 mr-2" }),
820
820
  n.confirmMeeting
821
821
  ]
822
822
  }
823
823
  ) })
824
824
  ] }),
825
- H ? X && H({
826
- onConfirm: g,
827
- onCancel: () => Q(!1),
828
- isLoading: W
825
+ V ? U && V({
826
+ onConfirm: ue,
827
+ onCancel: () => G(!1),
828
+ isLoading: $
829
829
  }) : /* @__PURE__ */ e(
830
- qt,
830
+ Xt,
831
831
  {
832
- open: X,
833
- onOpenChange: Q,
832
+ open: U,
833
+ onOpenChange: G,
834
834
  title: n.deleteConfirmTitle,
835
835
  description: n.deleteConfirmDescription,
836
836
  cancelLabel: n.cancel,
837
837
  confirmLabel: n.delete,
838
- onConfirm: g,
839
- isLoading: W
838
+ onConfirm: ue,
839
+ isLoading: $
840
840
  }
841
841
  )
842
842
  ] });
843
843
  }
844
- function Nr({
844
+ function Cr({
845
845
  event: t,
846
846
  children: n,
847
847
  open: s,
848
848
  onOpenChange: o,
849
- isLoading: i,
850
- labels: a,
851
- onEdit: f,
852
- onDelete: m,
849
+ isLoading: a,
850
+ labels: l,
851
+ onEdit: x,
852
+ onDelete: h,
853
853
  onCancel: c,
854
- onAccept: v,
855
- onDecline: y,
854
+ onAccept: w,
855
+ onDecline: P,
856
856
  onConfirmMeeting: b,
857
- canEdit: A = !0,
858
- canDelete: $ = !1,
859
- canCancel: P = !0,
860
- isCurrentUserParticipant: F,
861
- isCurrentUserClient: T,
862
- currentUserAcceptStatus: C,
863
- isAcceptLoading: j,
864
- isDeclineLoading: W,
865
- isConfirmLoading: _,
866
- isDeleteLoading: M,
867
- renderParticipant: G,
868
- renderHeaderActions: H,
869
- renderCancelReason: L,
870
- renderDeleteConfirmation: V,
871
- formatDate: X,
872
- formatTimeRange: Q,
873
- className: B,
874
- width: d = 360
857
+ canEdit: y = !0,
858
+ canDelete: B = !1,
859
+ canCancel: A = !0,
860
+ isCurrentUserParticipant: W,
861
+ isCurrentUserClient: F,
862
+ currentUserAcceptStatus: H,
863
+ isAcceptLoading: k,
864
+ isDeclineLoading: $,
865
+ isConfirmLoading: R,
866
+ isDeleteLoading: Y,
867
+ renderParticipant: M,
868
+ renderHeaderActions: V,
869
+ renderCancelReason: S,
870
+ renderDeleteConfirmation: z,
871
+ formatDate: U,
872
+ formatTimeRange: G,
873
+ className: X,
874
+ width: m = 360
875
875
  }) {
876
- const N = en("(min-width: 768px)"), h = { ...Kt, ...a }, D = O(() => {
876
+ const p = tn("(min-width: 768px)"), f = { ...Gt, ...l }, E = _(() => {
877
877
  o?.(!1);
878
- }, [o]), w = {
878
+ }, [o]), D = {
879
879
  event: t,
880
- labels: h,
881
- isLoading: i,
882
- onClose: D,
883
- onEdit: f,
884
- onDelete: m,
880
+ labels: f,
881
+ isLoading: a,
882
+ onClose: E,
883
+ onEdit: x,
884
+ onDelete: h,
885
885
  onCancel: c,
886
- onAccept: v,
887
- onDecline: y,
886
+ onAccept: w,
887
+ onDecline: P,
888
888
  onConfirmMeeting: b,
889
- canEdit: A,
890
- canDelete: $,
891
- canCancel: P,
892
- isCurrentUserParticipant: F,
893
- isCurrentUserClient: T,
894
- currentUserAcceptStatus: C,
895
- isAcceptLoading: j,
896
- isDeclineLoading: W,
897
- isConfirmLoading: _,
898
- isDeleteLoading: M,
899
- renderParticipant: G,
900
- renderHeaderActions: H,
901
- renderCancelReason: L,
902
- renderDeleteConfirmation: V,
903
- formatDate: X,
904
- formatTimeRange: Q
889
+ canEdit: y,
890
+ canDelete: B,
891
+ canCancel: A,
892
+ isCurrentUserParticipant: W,
893
+ isCurrentUserClient: F,
894
+ currentUserAcceptStatus: H,
895
+ isAcceptLoading: k,
896
+ isDeclineLoading: $,
897
+ isConfirmLoading: R,
898
+ isDeleteLoading: Y,
899
+ renderParticipant: M,
900
+ renderHeaderActions: V,
901
+ renderCancelReason: S,
902
+ renderDeleteConfirmation: z,
903
+ formatDate: U,
904
+ formatTimeRange: G
905
905
  };
906
- return N ? /* @__PURE__ */ r(lt, { open: s ?? !1, onOpenChange: o ?? (() => {
906
+ return p ? /* @__PURE__ */ r(ct, { open: s ?? !1, onOpenChange: o ?? (() => {
907
907
  }), children: [
908
- /* @__PURE__ */ e(ct, { asChild: !0, children: n }),
908
+ /* @__PURE__ */ e(dt, { asChild: !0, children: n }),
909
909
  /* @__PURE__ */ e(
910
- dt,
910
+ ut,
911
911
  {
912
- className: p(
912
+ className: g(
913
913
  "p-0 shadow-lg !rounded-2xl bg-white dark:bg-zinc-900 overflow-hidden border z-50",
914
- B
914
+ X
915
915
  ),
916
- style: { width: d },
916
+ style: { width: m },
917
917
  align: "center",
918
918
  side: "bottom",
919
919
  sideOffset: 4,
920
- children: /* @__PURE__ */ e(Ge, { ...w })
920
+ children: /* @__PURE__ */ e(Je, { ...D })
921
921
  }
922
922
  )
923
923
  ] }) : /* @__PURE__ */ r(be, { children: [
924
924
  n,
925
925
  /* @__PURE__ */ e(
926
- Jt,
926
+ qt,
927
927
  {
928
928
  open: s ?? !1,
929
929
  onOpenChange: o ?? (() => {
930
930
  }),
931
931
  title: t.title,
932
- children: /* @__PURE__ */ e(Ge, { ...w })
932
+ children: /* @__PURE__ */ e(Je, { ...D })
933
933
  }
934
934
  )
935
935
  ] });
936
936
  }
937
- const We = 44, Je = 4, tn = 56, qe = 8, ze = 80, Ee = 140, Xe = 100, Qe = 2, nn = 8, rn = 18;
938
- function on(t) {
937
+ const Fe = 44, qe = 4, nn = 56, Xe = 8, ze = 80, Se = 140, Qe = 100, Ze = 2, rn = 8, on = 18;
938
+ function sn(t) {
939
939
  return t.split(" ").map((n) => n[0]).join("").toUpperCase().slice(0, 2);
940
940
  }
941
- function sn(t, n) {
941
+ function an(t, n) {
942
942
  const s = [];
943
943
  for (let o = 0; o < n; o++) {
944
- const i = new Date(t);
945
- i.setDate(i.getDate() + o), s.push(i);
944
+ const a = new Date(t);
945
+ a.setDate(a.getDate() + o), s.push(a);
946
946
  }
947
947
  return s;
948
948
  }
949
- function an(t, n, s) {
949
+ function ln(t, n, s) {
950
950
  const o = [];
951
- return t.forEach((i, a) => {
952
- for (let f = n; f < s; f++)
953
- o.push({ hour: f, dayIndex: a, date: i });
951
+ return t.forEach((a, l) => {
952
+ for (let x = n; x < s; x++)
953
+ o.push({ hour: x, dayIndex: l, date: a });
954
954
  }), o;
955
955
  }
956
- function Fe(t) {
956
+ function $e(t) {
957
957
  return `${t.toString().padStart(2, "0")}:00`;
958
958
  }
959
- function ln(t) {
959
+ function cn(t) {
960
960
  return t.toLocaleDateString("en-US", {
961
961
  weekday: "short",
962
962
  month: "short",
963
963
  day: "numeric"
964
964
  });
965
965
  }
966
- function Ze(t) {
967
- const n = [...t].sort((i, a) => i.startCol !== a.startCol ? i.startCol - a.startCol : a.spanCols - i.spanCols), s = [], o = [];
968
- for (const i of n) {
969
- let a = 0;
970
- for (; o[a] !== void 0 && o[a] > i.startCol; )
971
- a++;
972
- o[a] = i.startCol + i.spanCols, s.push({
973
- ...i,
974
- stackIndex: a
966
+ function et(t) {
967
+ const n = [...t].sort((a, l) => a.startCol !== l.startCol ? a.startCol - l.startCol : l.spanCols - a.spanCols), s = [], o = [];
968
+ for (const a of n) {
969
+ let l = 0;
970
+ for (; o[l] !== void 0 && o[l] > a.startCol; )
971
+ l++;
972
+ o[l] = a.startCol + a.spanCols, s.push({
973
+ ...a,
974
+ stackIndex: l
975
975
  });
976
976
  }
977
977
  return s;
978
978
  }
979
- function cn({ src: t, alt: n, fallback: s, className: o }) {
979
+ function dn({ src: t, alt: n, fallback: s, className: o }) {
980
980
  return /* @__PURE__ */ e(
981
981
  "div",
982
982
  {
983
- className: p(
983
+ className: g(
984
984
  "relative flex shrink-0 overflow-hidden rounded-sm border bg-muted",
985
985
  o
986
986
  ),
@@ -995,208 +995,224 @@ function cn({ src: t, alt: n, fallback: s, className: o }) {
995
995
  }
996
996
  );
997
997
  }
998
- const dn = 7;
999
- function Le({
1000
- daysToShow: t = dn,
998
+ const un = 7;
999
+ function Te({
1000
+ daysToShow: t = un,
1001
1001
  events: n,
1002
1002
  users: s = [],
1003
- selectedDate: o,
1004
- onDateChange: i,
1005
- onEventClick: a,
1006
- onSlotClick: f,
1007
- onSlotSelect: m,
1008
- visibleHours: c,
1009
- className: v,
1010
- getEventUserId: y,
1011
- renderPopover: b,
1012
- slots: A,
1013
- classNames: $,
1014
- enableDrag: P = !0
1003
+ alwaysShowResources: o,
1004
+ selectedDate: a,
1005
+ onDateChange: l,
1006
+ onEventClick: x,
1007
+ onSlotClick: h,
1008
+ onSlotSelect: c,
1009
+ visibleHours: w,
1010
+ className: P,
1011
+ getEventUserId: b,
1012
+ renderPopover: y,
1013
+ slots: B,
1014
+ classNames: A,
1015
+ enableDrag: W = !0
1015
1016
  }) {
1016
- const F = ae(null), T = Lt(), [C, j] = ie(null), W = ae(!1), [_, M] = ie(null), G = o ?? /* @__PURE__ */ new Date(), H = !0, L = c?.from ?? nn, V = c?.to ?? rn, X = V - L, Q = te(() => {
1017
- const l = new Date(G);
1017
+ const F = ie(null), H = Tt(), [k, $] = le(null), R = ie(!1), [Y, M] = le(null), V = a ?? /* @__PURE__ */ new Date(), S = !0, z = w?.from ?? rn, U = w?.to ?? on, G = U - z, X = ee(() => {
1018
+ const i = new Date(V);
1018
1019
  if (t === 1 || t === 3)
1019
- return l.setHours(0, 0, 0, 0), l;
1020
- const u = l.getDay(), x = u === 0 ? -6 : 1 - u;
1021
- return l.setDate(l.getDate() + x), l.setHours(0, 0, 0, 0), l;
1022
- }, [G, t]), B = te(
1023
- () => sn(Q, t),
1024
- [Q, t]
1025
- ), d = te(
1026
- () => an(B, L, V),
1027
- [H, B, L, V]
1028
- ), h = y ?? ((l) => {
1029
- if (l.resourceId) return l.resourceId;
1030
- const u = l.data;
1020
+ return i.setHours(0, 0, 0, 0), i;
1021
+ const u = i.getDay(), v = u === 0 ? -6 : 1 - u;
1022
+ return i.setDate(i.getDate() + v), i.setHours(0, 0, 0, 0), i;
1023
+ }, [V, t]), m = ee(
1024
+ () => an(X, t),
1025
+ [X, t]
1026
+ ), p = ee(
1027
+ () => ln(m, z, U),
1028
+ [S, m, z, U]
1029
+ ), E = b ?? ((i) => {
1030
+ if (i.resourceId) return i.resourceId;
1031
+ const u = i.data;
1031
1032
  if (u?.userId) return String(u.userId);
1032
1033
  if (u?.user && typeof u.user == "object" && u.user.id)
1033
1034
  return String(u.user.id);
1034
- if (l.user?.id) return l.user.id;
1035
- if (l.participants?.[0]?.id) return l.participants[0].id;
1036
- }), D = te(() => {
1037
- const l = /* @__PURE__ */ new Map();
1035
+ if (i.user?.id) return i.user.id;
1036
+ if (i.participants?.[0]?.id) return i.participants[0].id;
1037
+ }), D = ee(() => {
1038
+ const i = /* @__PURE__ */ new Map();
1038
1039
  for (const u of s)
1039
- l.set(u.id, {
1040
+ i.set(u.id, {
1040
1041
  id: u.id,
1041
1042
  name: u.name,
1042
1043
  avatar: u.avatar ?? void 0,
1043
1044
  email: u.email
1044
1045
  });
1045
1046
  for (const u of n) {
1046
- const k = u.data?.user;
1047
- k?.id && !l.has(k.id) && l.set(k.id, {
1048
- id: k.id,
1049
- name: k.name ?? "",
1050
- avatar: k.avatar ?? void 0,
1051
- email: k.email
1052
- }), u.user?.id && !l.has(u.user.id) && l.set(u.user.id, {
1047
+ const N = u.data?.user;
1048
+ N?.id && !i.has(N.id) && i.set(N.id, {
1049
+ id: N.id,
1050
+ name: N.name ?? "",
1051
+ avatar: N.avatar ?? void 0,
1052
+ email: N.email
1053
+ }), u.user?.id && !i.has(u.user.id) && i.set(u.user.id, {
1053
1054
  id: u.user.id,
1054
1055
  name: u.user.name,
1055
1056
  avatar: u.user.avatar ?? void 0,
1056
1057
  email: u.user.email
1057
1058
  });
1058
- for (const S of u.participants || [])
1059
- S.id && !l.has(S.id) && l.set(S.id, {
1060
- id: S.id,
1061
- name: S.name,
1062
- avatar: S.avatar ?? void 0,
1063
- email: S.email
1059
+ for (const C of u.participants || [])
1060
+ C.id && !i.has(C.id) && i.set(C.id, {
1061
+ id: C.id,
1062
+ name: C.name,
1063
+ avatar: C.avatar ?? void 0,
1064
+ email: C.email
1064
1065
  });
1065
1066
  }
1066
- return Array.from(l.values());
1067
- }, [s, n]), w = te(() => {
1068
- const l = [], u = /* @__PURE__ */ new Map();
1069
- for (const S of D)
1070
- u.set(S.id, []);
1067
+ return Array.from(i.values());
1068
+ }, [s, n]), T = ee(() => {
1069
+ const i = [], u = /* @__PURE__ */ new Map();
1070
+ for (const C of D)
1071
+ u.set(C.id, []);
1071
1072
  u.set("unassigned", []);
1072
- for (const S of n) {
1073
- const z = h(S) ?? "unassigned";
1074
- (u.get(z) ?? u.get("unassigned")).push(S);
1073
+ for (const C of n) {
1074
+ const L = E(C) ?? "unassigned";
1075
+ (u.get(L) ?? u.get("unassigned")).push(C);
1075
1076
  }
1076
- const x = (S) => {
1077
- const z = [];
1078
- for (const I of S) {
1079
- const ee = I.startDate.getHours() + I.startDate.getMinutes() / 60, ne = I.endDate.getHours() + I.endDate.getMinutes() / 60;
1080
- for (let q = 0; q < B.length; q++) {
1081
- const oe = B[q], ye = Pe(oe), ke = ut(oe);
1082
- if (I.startDate <= ke && I.endDate >= ye) {
1083
- let Ne = L, Se = V;
1084
- if (I.startDate >= ye && (Ne = Math.max(L, ee)), I.endDate <= ke && (Se = Math.min(V, ne)), Ne = Math.max(
1085
- L,
1086
- Math.min(V, Ne)
1087
- ), Se = Math.max(
1088
- L,
1089
- Math.min(V, Se)
1090
- ), Se > Ne) {
1091
- const Re = q * X + Math.floor(Ne - L), gt = q * X + Math.ceil(Se - L);
1092
- z.push({
1093
- event: I,
1094
- startCol: Re,
1095
- spanCols: Math.max(1, gt - Re)
1077
+ const v = (C) => {
1078
+ const L = [];
1079
+ for (const j of C) {
1080
+ const Z = j.startDate.getHours() + j.startDate.getMinutes() / 60, ne = j.endDate.getHours() + j.endDate.getMinutes() / 60;
1081
+ for (let J = 0; J < m.length; J++) {
1082
+ const oe = m[J], ke = We(oe), Ne = ht(oe);
1083
+ if (j.startDate <= Ne && j.endDate >= ke) {
1084
+ let Ce = z, Le = U;
1085
+ if (j.startDate >= ke && (Ce = Math.max(z, Z)), j.endDate <= Ne && (Le = Math.min(U, ne)), Ce = Math.max(
1086
+ z,
1087
+ Math.min(U, Ce)
1088
+ ), Le = Math.max(
1089
+ z,
1090
+ Math.min(U, Le)
1091
+ ), Le > Ce) {
1092
+ const Ue = J * G + Math.floor(Ce - z), pt = J * G + Math.ceil(Le - z);
1093
+ L.push({
1094
+ event: j,
1095
+ startCol: Ue,
1096
+ spanCols: Math.max(1, pt - Ue)
1096
1097
  });
1097
1098
  }
1098
1099
  }
1099
1100
  }
1100
1101
  }
1101
- return z;
1102
+ return L;
1102
1103
  };
1103
- for (const S of D) {
1104
- const z = u.get(S.id) ?? [], I = x(z), ee = Ze(I), ne = ee.reduce(
1105
- (q, oe) => Math.max(q, oe.stackIndex + 1),
1104
+ for (const C of D) {
1105
+ const L = u.get(C.id) ?? [], j = v(L), Z = et(j), ne = Z.reduce(
1106
+ (J, oe) => Math.max(J, oe.stackIndex + 1),
1106
1107
  0
1107
1108
  );
1108
- l.push({
1109
- user: S,
1110
- events: ee,
1109
+ i.push({
1110
+ user: C,
1111
+ events: Z,
1111
1112
  maxStack: Math.max(ne, 1)
1112
1113
  });
1113
1114
  }
1114
- const k = u.get("unassigned") ?? [];
1115
- if (k.length > 0) {
1116
- const S = x(k), z = Ze(S), I = z.reduce(
1117
- (ee, ne) => Math.max(ee, ne.stackIndex + 1),
1115
+ const N = u.get("unassigned") ?? [];
1116
+ if (N.length > 0) {
1117
+ const C = v(N), L = et(C), j = L.reduce(
1118
+ (Z, ne) => Math.max(Z, ne.stackIndex + 1),
1118
1119
  0
1119
1120
  );
1120
- l.push({
1121
+ i.push({
1121
1122
  user: {
1122
1123
  id: "unassigned",
1123
1124
  name: "Unassigned",
1124
1125
  avatar: void 0,
1125
1126
  email: void 0
1126
1127
  },
1127
- events: z,
1128
- maxStack: Math.max(I, 1)
1128
+ events: L,
1129
+ maxStack: Math.max(j, 1)
1129
1130
  });
1130
1131
  }
1131
- return l;
1132
+ if (o?.length) {
1133
+ const C = new Set(i.map((L) => L.user.id));
1134
+ for (const L of o)
1135
+ C.has(L.id) || (i.push({
1136
+ user: {
1137
+ id: L.id,
1138
+ name: L.name,
1139
+ avatar: L.avatar ?? void 0,
1140
+ email: L.email
1141
+ },
1142
+ events: [],
1143
+ maxStack: 1
1144
+ }), C.add(L.id));
1145
+ }
1146
+ return i;
1132
1147
  }, [
1133
1148
  D,
1134
1149
  n,
1135
- B,
1136
- H,
1137
- X,
1138
- L,
1139
- V,
1140
- h
1141
- ]), R = te(() => {
1142
- const l = /* @__PURE__ */ new Map();
1143
- for (const u of w)
1144
- for (const x of u.events)
1145
- if (x.spanCols === 1) {
1146
- const k = l.get(x.startCol) ?? 0;
1147
- l.set(x.startCol, k + 1);
1150
+ m,
1151
+ S,
1152
+ G,
1153
+ z,
1154
+ U,
1155
+ E,
1156
+ o
1157
+ ]), te = ee(() => {
1158
+ const i = /* @__PURE__ */ new Map();
1159
+ for (const u of T)
1160
+ for (const v of u.events)
1161
+ if (v.spanCols === 1) {
1162
+ const N = i.get(v.startCol) ?? 0;
1163
+ i.set(v.startCol, N + 1);
1148
1164
  }
1149
- return l;
1150
- }, [w]), K = te(() => {
1151
- const l = d.length, u = ze, x = [];
1152
- for (let k = 0; k < l; k++) {
1153
- const S = R.get(k) ?? 0;
1154
- S > Qe ? x.push(
1155
- Xe + (S - Qe) * 20
1156
- ) : S > 0 ? x.push(Math.max(u, Xe)) : x.push(u);
1165
+ return i;
1166
+ }, [T]), O = ee(() => {
1167
+ const i = p.length, u = ze, v = [];
1168
+ for (let N = 0; N < i; N++) {
1169
+ const C = te.get(N) ?? 0;
1170
+ C > Ze ? v.push(
1171
+ Qe + (C - Ze) * 20
1172
+ ) : C > 0 ? v.push(Math.max(u, Qe)) : v.push(u);
1157
1173
  }
1158
- return x;
1174
+ return v;
1159
1175
  }, [
1160
- H,
1161
- d.length,
1162
- B.length,
1163
- R
1164
- ]), Z = (l) => Math.max(
1165
- tn,
1166
- l * (We + Je) + qe * 2
1167
- ), Y = Ee + K.reduce((l, u) => l + u, 0), J = te(() => {
1168
- const l = [0];
1169
- for (let u = 0; u < K.length; u++)
1170
- l.push(l[u] + K[u]);
1171
- return l;
1172
- }, [K]);
1173
- vt(() => {
1174
- const l = F.current;
1175
- if (!l) return;
1176
+ S,
1177
+ p.length,
1178
+ m.length,
1179
+ te
1180
+ ]), q = (i) => Math.max(
1181
+ nn,
1182
+ i * (Fe + qe) + Xe * 2
1183
+ ), re = Se + O.reduce((i, u) => i + u, 0), Q = ee(() => {
1184
+ const i = [0];
1185
+ for (let u = 0; u < O.length; u++)
1186
+ i.push(i[u] + O[u]);
1187
+ return i;
1188
+ }, [O]);
1189
+ wt(() => {
1190
+ const i = F.current;
1191
+ if (!i) return;
1176
1192
  const u = () => {
1177
- let x = -1;
1178
- const S = (/* @__PURE__ */ new Date()).getHours();
1193
+ let v = -1;
1194
+ const C = (/* @__PURE__ */ new Date()).getHours();
1179
1195
  {
1180
- for (let z = 0; z < d.length; z++) {
1181
- const I = d[z];
1182
- if (I && ce(I.date) && I.hour <= S && I.hour + 1 > S) {
1183
- x = z;
1196
+ for (let L = 0; L < p.length; L++) {
1197
+ const j = p[L];
1198
+ if (j && de(j.date) && j.hour <= C && j.hour + 1 > C) {
1199
+ v = L;
1184
1200
  break;
1185
1201
  }
1186
1202
  }
1187
- if (x === -1)
1188
- for (let z = 0; z < d.length; z++) {
1189
- const I = d[z];
1190
- if (I && ce(I.date)) {
1191
- x = z;
1203
+ if (v === -1)
1204
+ for (let L = 0; L < p.length; L++) {
1205
+ const j = p[L];
1206
+ if (j && de(j.date)) {
1207
+ v = L;
1192
1208
  break;
1193
1209
  }
1194
1210
  }
1195
1211
  }
1196
- if (x !== -1) {
1197
- const z = (J[x] ?? 0) + Ee, I = l.clientWidth, ee = Math.max(0, z - I / 3);
1198
- l.scrollTo({
1199
- left: ee,
1212
+ if (v !== -1) {
1213
+ const L = (Q[v] ?? 0) + Se, j = i.clientWidth, Z = Math.max(0, L - j / 3);
1214
+ i.scrollTo({
1215
+ left: Z,
1200
1216
  behavior: "instant"
1201
1217
  });
1202
1218
  }
@@ -1204,104 +1220,104 @@ function Le({
1204
1220
  requestAnimationFrame(() => {
1205
1221
  requestAnimationFrame(u);
1206
1222
  });
1207
- }, [G, d, B, J, H]);
1208
- const ue = O(
1209
- (l, u) => {
1210
- const x = u.getBoundingClientRect(), k = l - x.left + u.scrollLeft;
1211
- for (let S = 0; S < J.length - 1; S++) {
1212
- const z = J[S], I = J[S + 1];
1213
- if (k >= z && k < I) {
1214
- const ee = (k - z) / (I - z), ne = Math.floor(ee * 60), q = Math.round(ne / 15) * 15;
1215
- return { colIndex: S, minute: Math.min(q, 45) };
1223
+ }, [V, p, m, Q, S]);
1224
+ const we = _(
1225
+ (i, u) => {
1226
+ const v = u.getBoundingClientRect(), N = i - v.left + u.scrollLeft;
1227
+ for (let C = 0; C < Q.length - 1; C++) {
1228
+ const L = Q[C], j = Q[C + 1];
1229
+ if (N >= L && N < j) {
1230
+ const Z = (N - L) / (j - L), ne = Math.floor(Z * 60), J = Math.round(ne / 15) * 15;
1231
+ return { colIndex: C, minute: Math.min(J, 45) };
1216
1232
  }
1217
1233
  }
1218
1234
  return null;
1219
1235
  },
1220
- [J]
1221
- ), se = O(
1222
- (l, u) => {
1223
- if (d[l]) {
1224
- const x = d[l], k = new Date(x.date);
1225
- return k.setHours(x.hour, u ?? 0, 0, 0), { date: k, hour: x.hour };
1236
+ [Q]
1237
+ ), se = _(
1238
+ (i, u) => {
1239
+ if (p[i]) {
1240
+ const v = p[i], N = new Date(v.date);
1241
+ return N.setHours(v.hour, u ?? 0, 0, 0), { date: N, hour: v.hour };
1226
1242
  }
1227
1243
  return { date: /* @__PURE__ */ new Date() };
1228
1244
  },
1229
- [H, d, B]
1230
- ), le = O(
1231
- (l, u) => {
1232
- if (l.preventDefault(), l.dataTransfer.dropEffect = "move", !T?.isDragging || !T.dragState) return;
1233
- const x = l.currentTarget, k = ue(l.clientX, x);
1234
- if (!k) return;
1235
- const { colIndex: S, minute: z } = k, { date: I, hour: ee } = se(S, z);
1236
- T.updateDragPreview(I, ee, z, u);
1237
- const { originalStartDate: ne, originalEndDate: q } = T.dragState, oe = q.getTime() - ne.getTime(), ye = d.length;
1238
- let ke;
1245
+ [S, p, m]
1246
+ ), ae = _(
1247
+ (i, u) => {
1248
+ if (i.preventDefault(), i.dataTransfer.dropEffect = "move", !H?.isDragging || !H.dragState) return;
1249
+ const v = i.currentTarget, N = we(i.clientX, v);
1250
+ if (!N) return;
1251
+ const { colIndex: C, minute: L } = N, { date: j, hour: Z } = se(C, L);
1252
+ H.updateDragPreview(j, Z, L, u);
1253
+ const { originalStartDate: ne, originalEndDate: J } = H.dragState, oe = J.getTime() - ne.getTime(), ke = p.length;
1254
+ let Ne;
1239
1255
  {
1240
- const Ne = oe / 36e5;
1241
- ke = Math.max(1, Math.ceil(Ne));
1256
+ const Ce = oe / 36e5;
1257
+ Ne = Math.max(1, Math.ceil(Ce));
1242
1258
  }
1243
- ke = Math.min(ke, ye - S), M({ resourceId: u, colIndex: S, spanCols: ke });
1259
+ Ne = Math.min(Ne, ke - C), M({ resourceId: u, colIndex: C, spanCols: Ne });
1244
1260
  },
1245
- [T, ue, se, H, d.length, B.length]
1246
- ), we = O(
1247
- (l) => {
1248
- const u = l.relatedTarget;
1249
- l.currentTarget.contains(u) || M(null);
1261
+ [H, we, se, S, p.length, m.length]
1262
+ ), ye = _(
1263
+ (i) => {
1264
+ const u = i.relatedTarget;
1265
+ i.currentTarget.contains(u) || M(null);
1250
1266
  },
1251
1267
  []
1252
- ), he = O(
1253
- (l, u) => {
1254
- l.preventDefault(), M(null), T?.isDragging && T.endDrag();
1268
+ ), ue = _(
1269
+ (i, u) => {
1270
+ i.preventDefault(), M(null), H?.isDragging && H.endDrag();
1255
1271
  },
1256
- [T]
1257
- ), g = O(
1258
- (l, u) => {
1259
- if (!C || C.resourceId !== l) return !1;
1260
- const x = Math.min(C.startCol, C.endCol), k = Math.max(C.startCol, C.endCol);
1261
- return u >= x && u <= k;
1272
+ [H]
1273
+ ), d = _(
1274
+ (i, u) => {
1275
+ if (!k || k.resourceId !== i) return !1;
1276
+ const v = Math.min(k.startCol, k.endCol), N = Math.max(k.startCol, k.endCol);
1277
+ return u >= v && u <= N;
1262
1278
  },
1263
- [C]
1264
- ), E = O(
1265
- (l, u) => !_ || _.resourceId !== l ? !1 : u >= _.colIndex && u < _.colIndex + _.spanCols,
1266
- [_]
1267
- ), U = O(
1268
- (l, u, x) => {
1269
- x.button !== 0 && x.pointerType === "mouse" || (m || f) && (x.preventDefault(), W.current = !0, j({ resourceId: l, startCol: u, endCol: u, isSelecting: !0 }));
1279
+ [k]
1280
+ ), I = _(
1281
+ (i, u) => !Y || Y.resourceId !== i ? !1 : u >= Y.colIndex && u < Y.colIndex + Y.spanCols,
1282
+ [Y]
1283
+ ), K = _(
1284
+ (i, u, v) => {
1285
+ v.button !== 0 && v.pointerType === "mouse" || (c || h) && (v.preventDefault(), R.current = !0, $({ resourceId: i, startCol: u, endCol: u, isSelecting: !0 }));
1270
1286
  },
1271
- [m, f]
1272
- ), re = O(
1273
- (l, u, x) => {
1274
- if (W.current && !(!C || C.resourceId !== l)) {
1275
- if (x.buttons === 0) {
1276
- W.current = !1;
1287
+ [c, h]
1288
+ ), ce = _(
1289
+ (i, u, v) => {
1290
+ if (R.current && !(!k || k.resourceId !== i)) {
1291
+ if (v.buttons === 0) {
1292
+ R.current = !1;
1277
1293
  return;
1278
1294
  }
1279
- j((k) => k ? { ...k, endCol: u } : null);
1295
+ $((N) => N ? { ...N, endCol: u } : null);
1280
1296
  }
1281
1297
  },
1282
- [C]
1283
- ), De = O(() => {
1284
- if (!W.current || !C) return;
1285
- W.current = !1;
1286
- const l = Math.min(C.startCol, C.endCol), u = Math.max(C.startCol, C.endCol), x = se(l), k = se(u), S = new Date(x.date), z = new Date(k.date);
1287
- k.hour !== void 0 && z.setHours(k.hour + 1, 0, 0, 0);
1288
- const I = {
1289
- startDate: S,
1290
- endDate: z,
1291
- resourceId: C.resourceId
1298
+ [k]
1299
+ ), Me = _(() => {
1300
+ if (!R.current || !k) return;
1301
+ R.current = !1;
1302
+ const i = Math.min(k.startCol, k.endCol), u = Math.max(k.startCol, k.endCol), v = se(i), N = se(u), C = new Date(v.date), L = new Date(N.date);
1303
+ N.hour !== void 0 && L.setHours(N.hour + 1, 0, 0, 0);
1304
+ const j = {
1305
+ startDate: C,
1306
+ endDate: L,
1307
+ resourceId: k.resourceId
1292
1308
  };
1293
- l === u && f && f(x.date, x.hour, C.resourceId), m?.(I), j((ee) => ee ? { ...ee, isSelecting: !1 } : null), setTimeout(() => j(null), 150);
1294
- }, [C, se, H, f, m]);
1295
- return de(() => {
1296
- const l = () => {
1297
- W.current && De();
1309
+ i === u && h && h(v.date, v.hour, k.resourceId), c?.(j), $((Z) => Z ? { ...Z, isSelecting: !1 } : null), setTimeout(() => $(null), 150);
1310
+ }, [k, se, S, h, c]);
1311
+ return he(() => {
1312
+ const i = () => {
1313
+ R.current && Me();
1298
1314
  };
1299
- return window.addEventListener("pointerup", l), window.addEventListener("pointercancel", l), () => {
1300
- window.removeEventListener("pointerup", l), window.removeEventListener("pointercancel", l);
1315
+ return window.addEventListener("pointerup", i), window.addEventListener("pointercancel", i), () => {
1316
+ window.removeEventListener("pointerup", i), window.removeEventListener("pointercancel", i);
1301
1317
  };
1302
- }, [De]), de(() => {
1303
- T?.isDragging || M(null);
1304
- }, [T?.isDragging]), /* @__PURE__ */ e("div", { className: p("flex h-full flex-col", v), children: /* @__PURE__ */ e("div", { className: "ic-timeline-scroll-container flex-1", ref: F, children: /* @__PURE__ */ r("div", { className: "relative", style: { minWidth: Y }, children: [
1318
+ }, [Me]), he(() => {
1319
+ H?.isDragging || M(null);
1320
+ }, [H?.isDragging]), /* @__PURE__ */ e("div", { className: g("flex h-full flex-col", P), children: /* @__PURE__ */ e("div", { className: "ic-timeline-scroll-container flex-1", ref: F, children: /* @__PURE__ */ r("div", { className: "relative", style: { minWidth: re }, children: [
1305
1321
  // Hour mode: Day headers + Hour sub-headers - sticky wrapper with flex child (sticky + flex breaks sticky)
1306
1322
  /* @__PURE__ */ e("div", { className: "ic-timeline-header sticky top-0 z-20 border-b bg-background", children: t > 1 ? (
1307
1323
  // Multi-day: Resources cell spans both day-header + hour-header rows
@@ -1310,40 +1326,40 @@ function Le({
1310
1326
  "div",
1311
1327
  {
1312
1328
  className: "flex shrink-0 items-center justify-center border-r bg-background px-2 sticky left-0 z-10",
1313
- style: { width: Ee },
1329
+ style: { width: Se },
1314
1330
  children: /* @__PURE__ */ e("span", { className: "text-[10px] font-medium uppercase text-muted-foreground", children: "Resources" })
1315
1331
  }
1316
1332
  ),
1317
1333
  /* @__PURE__ */ r("div", { className: "flex min-w-0 flex-col", children: [
1318
- /* @__PURE__ */ e("div", { className: "flex border-b", children: B.map((l, u) => {
1319
- const x = ce(l), k = u * X, S = K.slice(k, k + X).reduce((z, I) => z + I, 0);
1334
+ /* @__PURE__ */ e("div", { className: "flex border-b", children: m.map((i, u) => {
1335
+ const v = de(i), N = u * G, C = O.slice(N, N + G).reduce((L, j) => L + j, 0);
1320
1336
  return /* @__PURE__ */ e(
1321
1337
  "div",
1322
1338
  {
1323
- className: p(
1339
+ className: g(
1324
1340
  "flex shrink-0 items-center justify-center border-r py-1.5 font-medium",
1325
- x ? "bg-primary/10 text-primary" : "bg-muted/30"
1341
+ v ? "bg-primary/10 text-primary" : "bg-muted/30"
1326
1342
  ),
1327
- style: { width: S },
1328
- children: /* @__PURE__ */ e("span", { className: "text-xs", children: ln(l) })
1343
+ style: { width: C },
1344
+ children: /* @__PURE__ */ e("span", { className: "text-xs", children: cn(i) })
1329
1345
  },
1330
- `day-${l.toISOString()}`
1346
+ `day-${i.toISOString()}`
1331
1347
  );
1332
1348
  }) }),
1333
- /* @__PURE__ */ e("div", { className: "flex", children: d.map((l, u) => {
1334
- const x = l.hour === L, k = ce(l.date), S = K[u] ?? ze;
1349
+ /* @__PURE__ */ e("div", { className: "flex", children: p.map((i, u) => {
1350
+ const v = i.hour === z, N = de(i.date), C = O[u] ?? ze;
1335
1351
  return /* @__PURE__ */ e(
1336
1352
  "div",
1337
1353
  {
1338
- className: p(
1354
+ className: g(
1339
1355
  "flex shrink-0 items-center justify-center py-1.5 text-[10px] text-muted-foreground",
1340
- x && u > 0 ? "border-l-2 border-l-border" : "border-r border-r-border/50",
1341
- k && "bg-primary/5"
1356
+ v && u > 0 ? "border-l-2 border-l-border" : "border-r border-r-border/50",
1357
+ N && "bg-primary/5"
1342
1358
  ),
1343
- style: { width: S },
1344
- children: Fe(l.hour)
1359
+ style: { width: C },
1360
+ children: $e(i.hour)
1345
1361
  },
1346
- `hour-${l.dayIndex}-${l.hour}`
1362
+ `hour-${i.dayIndex}-${i.hour}`
1347
1363
  );
1348
1364
  }) })
1349
1365
  ] })
@@ -1355,36 +1371,36 @@ function Le({
1355
1371
  "div",
1356
1372
  {
1357
1373
  className: "flex shrink-0 items-center border-r bg-background px-2 py-2",
1358
- style: { width: Ee },
1374
+ style: { width: Se },
1359
1375
  children: /* @__PURE__ */ e("span", { className: "text-[10px] font-medium uppercase text-muted-foreground", children: "Resources" })
1360
1376
  }
1361
1377
  ),
1362
- d.map((l, u) => {
1363
- const x = l.hour === L, k = ce(l.date), S = K[u] ?? ze;
1378
+ p.map((i, u) => {
1379
+ const v = i.hour === z, N = de(i.date), C = O[u] ?? ze;
1364
1380
  return /* @__PURE__ */ e(
1365
1381
  "div",
1366
1382
  {
1367
- className: p(
1383
+ className: g(
1368
1384
  "flex shrink-0 items-center justify-center py-1.5 text-[10px] text-muted-foreground",
1369
- x && u > 0 ? "border-l-2 border-l-border" : "border-r border-r-border/50",
1370
- k && "bg-primary/5"
1385
+ v && u > 0 ? "border-l-2 border-l-border" : "border-r border-r-border/50",
1386
+ N && "bg-primary/5"
1371
1387
  ),
1372
- style: { width: S },
1373
- children: Fe(l.hour)
1388
+ style: { width: C },
1389
+ children: $e(i.hour)
1374
1390
  },
1375
- `hour-${l.dayIndex}-${l.hour}`
1391
+ `hour-${i.dayIndex}-${i.hour}`
1376
1392
  );
1377
1393
  })
1378
1394
  ] })
1379
1395
  ) }),
1380
- w.map((l) => {
1381
- const u = Z(l.maxStack);
1396
+ T.map((i) => {
1397
+ const u = q(i.maxStack);
1382
1398
  return /* @__PURE__ */ r(
1383
1399
  "div",
1384
1400
  {
1385
- className: p(
1401
+ className: g(
1386
1402
  "relative flex border-b",
1387
- $?.resourceRow
1403
+ A?.resourceRow
1388
1404
  ),
1389
1405
  style: { height: u },
1390
1406
  children: [
@@ -1392,25 +1408,25 @@ function Le({
1392
1408
  "div",
1393
1409
  {
1394
1410
  className: "sticky left-0 z-10",
1395
- style: { width: Ee },
1411
+ style: { width: Se },
1396
1412
  children: /* @__PURE__ */ r(
1397
1413
  "div",
1398
1414
  {
1399
- className: p(
1415
+ className: g(
1400
1416
  "flex h-full items-center gap-2 sm:gap-3 border-r bg-background px-2 sm:px-4",
1401
- $?.resourceHeader
1417
+ A?.resourceHeader
1402
1418
  ),
1403
1419
  children: [
1404
1420
  /* @__PURE__ */ e(
1405
- cn,
1421
+ dn,
1406
1422
  {
1407
1423
  className: "size-7",
1408
- src: l.user.avatar,
1409
- alt: l.user.name,
1410
- fallback: on(l.user.name)
1424
+ src: i.user.avatar,
1425
+ alt: i.user.name,
1426
+ fallback: sn(i.user.name)
1411
1427
  }
1412
1428
  ),
1413
- /* @__PURE__ */ e("span", { className: "truncate text-xs sm:text-sm font-medium", children: l.user.name })
1429
+ /* @__PURE__ */ e("span", { className: "truncate text-xs sm:text-sm font-medium", children: i.user.name })
1414
1430
  ]
1415
1431
  }
1416
1432
  )
@@ -1420,90 +1436,90 @@ function Le({
1420
1436
  "div",
1421
1437
  {
1422
1438
  className: "ic-timeline-grid relative flex",
1423
- onDragOver: (x) => le(x, l.user.id),
1424
- onDragLeave: we,
1425
- onDrop: (x) => he(x, l.user.id),
1439
+ onDragOver: (v) => ae(v, i.user.id),
1440
+ onDragLeave: ye,
1441
+ onDrop: (v) => ue(v, i.user.id),
1426
1442
  children: [
1427
1443
  // Hour mode cells — interactive buttons for slot selection
1428
- d.map((x, k) => {
1429
- const S = x.hour === L && k > 0, z = K[k] ?? ze, I = g(l.user.id, k), ee = E(l.user.id, k), ne = !!(m || f);
1444
+ p.map((v, N) => {
1445
+ const C = v.hour === z && N > 0, L = O[N] ?? ze, j = d(i.user.id, N), Z = I(i.user.id, N), ne = !!(c || h);
1430
1446
  return /* @__PURE__ */ e(
1431
1447
  "div",
1432
1448
  {
1433
1449
  role: ne ? "button" : void 0,
1434
1450
  tabIndex: ne ? 0 : void 0,
1435
- "aria-label": ne ? `Select ${Fe(x.hour)} on ${x.date.toLocaleDateString()} for ${l.user.name}` : void 0,
1436
- onPointerDown: (q) => U(l.user.id, k, q),
1437
- onPointerEnter: (q) => re(l.user.id, k, q),
1438
- onPointerUp: De,
1439
- onKeyDown: (q) => {
1440
- if (ne && (q.key === "Enter" || q.key === " ")) {
1441
- q.preventDefault();
1442
- const oe = se(k);
1443
- f?.(oe.date, oe.hour, l.user.id), m?.({
1451
+ "aria-label": ne ? `Select ${$e(v.hour)} on ${v.date.toLocaleDateString()} for ${i.user.name}` : void 0,
1452
+ onPointerDown: (J) => K(i.user.id, N, J),
1453
+ onPointerEnter: (J) => ce(i.user.id, N, J),
1454
+ onPointerUp: Me,
1455
+ onKeyDown: (J) => {
1456
+ if (ne && (J.key === "Enter" || J.key === " ")) {
1457
+ J.preventDefault();
1458
+ const oe = se(N);
1459
+ h?.(oe.date, oe.hour, i.user.id), c?.({
1444
1460
  startDate: oe.date,
1445
1461
  endDate: (() => {
1446
- const ye = new Date(oe.date);
1447
- return oe.hour !== void 0 && ye.setHours(oe.hour + 1, 0, 0, 0), ye;
1462
+ const ke = new Date(oe.date);
1463
+ return oe.hour !== void 0 && ke.setHours(oe.hour + 1, 0, 0, 0), ke;
1448
1464
  })(),
1449
- resourceId: l.user.id
1465
+ resourceId: i.user.id
1450
1466
  });
1451
1467
  }
1452
1468
  },
1453
- className: p(
1469
+ className: g(
1454
1470
  "shrink-0 select-none touch-none transition-colors",
1455
1471
  ne && "cursor-pointer",
1456
- S ? "border-l-2 border-l-border" : "border-r border-r-border/50",
1457
- ce(x.date) && "bg-primary/5",
1472
+ C ? "border-l-2 border-l-border" : "border-r border-r-border/50",
1473
+ de(v.date) && "bg-primary/5",
1458
1474
  // Hover — subtle feedback (only when not selecting or dragging)
1459
- ne && !C?.isSelecting && !T?.isDragging && "hover:bg-blue-50/60",
1475
+ ne && !k?.isSelecting && !H?.isDragging && "hover:bg-blue-50/60",
1460
1476
  // Slot selection highlight
1461
- I && "bg-blue-100/70",
1477
+ j && "bg-blue-100/70",
1462
1478
  // Drop target highlight
1463
- ee && "bg-primary/20 ring-2 ring-primary ring-inset"
1479
+ Z && "bg-primary/20 ring-2 ring-primary ring-inset"
1464
1480
  ),
1465
- style: { width: z }
1481
+ style: { width: L }
1466
1482
  },
1467
- `cell-${x.dayIndex}-${x.hour}`
1483
+ `cell-${v.dayIndex}-${v.hour}`
1468
1484
  );
1469
1485
  }),
1470
- l.events.map((x) => {
1471
- const k = (J[x.startCol] ?? 0) + 2, S = J[x.startCol + x.spanCols] ?? J[J.length - 1] ?? 0, z = J[x.startCol] ?? 0, I = S - z - 4, ee = qe + x.stackIndex * (We + Je), ne = t === 1 ? "timeline-day" : t === 3 ? "timeline-3day" : "timeline-week", q = A?.eventCard;
1486
+ i.events.map((v) => {
1487
+ const N = (Q[v.startCol] ?? 0) + 2, C = Q[v.startCol + v.spanCols] ?? Q[Q.length - 1] ?? 0, L = Q[v.startCol] ?? 0, j = C - L - 4, Z = Xe + v.stackIndex * (Fe + qe), ne = t === 1 ? "timeline-day" : t === 3 ? "timeline-3day" : "timeline-week", J = B?.eventCard;
1472
1488
  return /* @__PURE__ */ e(
1473
1489
  "div",
1474
1490
  {
1475
1491
  className: "absolute",
1476
1492
  style: {
1477
- left: k,
1478
- width: Math.max(I, 0),
1493
+ left: N,
1494
+ width: Math.max(j, 0),
1479
1495
  // No forced minimum - columns are guaranteed wide enough
1480
- top: ee,
1481
- height: We
1496
+ top: Z,
1497
+ height: Fe
1482
1498
  },
1483
- children: q ? /* @__PURE__ */ e(
1484
- q,
1499
+ children: J ? /* @__PURE__ */ e(
1500
+ J,
1485
1501
  {
1486
- event: x.event,
1502
+ event: v.event,
1487
1503
  view: ne,
1488
1504
  isCompact: !0,
1489
- onClick: () => a?.(x.event)
1505
+ onClick: () => x?.(v.event)
1490
1506
  }
1491
1507
  ) : /* @__PURE__ */ e(
1492
- Nt,
1508
+ Ct,
1493
1509
  {
1494
- event: x.event,
1510
+ event: v.event,
1495
1511
  variant: "compact",
1496
- enableDrag: P,
1497
- onClick: a,
1498
- renderPopover: b,
1499
- className: p(
1512
+ enableDrag: W,
1513
+ onClick: x,
1514
+ renderPopover: y,
1515
+ className: g(
1500
1516
  "h-full w-full",
1501
- $?.eventCardCompact
1517
+ A?.eventCardCompact
1502
1518
  )
1503
1519
  }
1504
1520
  )
1505
1521
  },
1506
- x.event.id
1522
+ v.event.id
1507
1523
  );
1508
1524
  })
1509
1525
  ]
@@ -1511,13 +1527,13 @@ function Le({
1511
1527
  )
1512
1528
  ]
1513
1529
  },
1514
- l.user.id
1530
+ i.user.id
1515
1531
  );
1516
1532
  }),
1517
- w.length === 0 && /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-20 text-muted-foreground", children: "No users or events to display" })
1533
+ T.length === 0 && /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-20 text-muted-foreground", children: "No users or events to display" })
1518
1534
  ] }) }) });
1519
1535
  }
1520
- const un = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], hn = [
1536
+ const hn = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], mn = [
1521
1537
  "January",
1522
1538
  "February",
1523
1539
  "March",
@@ -1531,18 +1547,18 @@ const un = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], hn = [
1531
1547
  "November",
1532
1548
  "December"
1533
1549
  ];
1534
- function et(t) {
1550
+ function tt(t) {
1535
1551
  const n = t.hexColor;
1536
1552
  return n ? { backgroundColor: n } : {};
1537
1553
  }
1538
- function mn({ day: t, date: n, events: s, isCurrentMonth: o, onDayClick: i }) {
1539
- const a = ce(n), f = 3, m = s.length;
1554
+ function fn({ day: t, date: n, events: s, isCurrentMonth: o, onDayClick: a }) {
1555
+ const l = de(n), x = 3, h = s.length;
1540
1556
  return /* @__PURE__ */ r(
1541
1557
  "button",
1542
1558
  {
1543
1559
  type: "button",
1544
- onClick: () => i?.(n),
1545
- className: p(
1560
+ onClick: () => a?.(n),
1561
+ className: g(
1546
1562
  "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",
1547
1563
  "hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
1548
1564
  "transition-colors",
@@ -1552,95 +1568,95 @@ function mn({ day: t, date: n, events: s, isCurrentMonth: o, onDayClick: i }) {
1552
1568
  /* @__PURE__ */ e(
1553
1569
  "div",
1554
1570
  {
1555
- className: p(
1571
+ className: g(
1556
1572
  "flex size-5 sm:size-6 items-center justify-center rounded-full text-[10px] sm:text-xs font-medium",
1557
- a && "bg-primary font-semibold text-primary-foreground"
1573
+ l && "bg-primary font-semibold text-primary-foreground"
1558
1574
  ),
1559
1575
  children: t
1560
1576
  }
1561
1577
  ),
1562
- m > 0 && /* @__PURE__ */ e("div", { className: "mt-0.5 flex items-center gap-0.5", children: m <= f ? s.map((c) => /* @__PURE__ */ e(
1578
+ h > 0 && /* @__PURE__ */ e("div", { className: "mt-0.5 flex items-center gap-0.5", children: h <= x ? s.map((c) => /* @__PURE__ */ e(
1563
1579
  "div",
1564
1580
  {
1565
1581
  className: "size-1 sm:size-1.5 rounded-full bg-primary",
1566
- style: et(c)
1582
+ style: tt(c)
1567
1583
  },
1568
1584
  c.id
1569
1585
  )) : /* @__PURE__ */ r(be, { children: [
1570
- s.slice(0, f).map((c) => /* @__PURE__ */ e(
1586
+ s.slice(0, x).map((c) => /* @__PURE__ */ e(
1571
1587
  "div",
1572
1588
  {
1573
1589
  className: "size-1 sm:size-1.5 rounded-full bg-primary",
1574
- style: et(c)
1590
+ style: tt(c)
1575
1591
  },
1576
1592
  c.id
1577
1593
  )),
1578
1594
  /* @__PURE__ */ r("span", { className: "text-[6px] sm:text-[7px] font-medium text-muted-foreground", children: [
1579
1595
  "+",
1580
- m - f
1596
+ h - x
1581
1597
  ] })
1582
1598
  ] }) })
1583
1599
  ]
1584
1600
  }
1585
1601
  );
1586
1602
  }
1587
- function fn({
1603
+ function gn({
1588
1604
  date: t,
1589
1605
  events: n,
1590
1606
  onMonthClick: s,
1591
1607
  onDayClick: o
1592
1608
  }) {
1593
- const i = te(() => At(t, 0), [t]);
1609
+ const a = ee(() => Pt(t, 0), [t]);
1594
1610
  return /* @__PURE__ */ r("div", { className: "flex flex-col", children: [
1595
1611
  /* @__PURE__ */ e(
1596
1612
  "button",
1597
1613
  {
1598
1614
  type: "button",
1599
1615
  onClick: () => s?.(t),
1600
- className: p(
1616
+ className: g(
1601
1617
  "w-full rounded-t-lg border px-2 sm:px-3 py-1.5 sm:py-2 text-xs sm:text-sm font-semibold",
1602
1618
  "hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
1603
1619
  "transition-colors"
1604
1620
  ),
1605
- children: hn[t.getMonth()]
1621
+ children: mn[t.getMonth()]
1606
1622
  }
1607
1623
  ),
1608
1624
  /* @__PURE__ */ r("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: [
1609
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 text-center", children: un.map((a, f) => /* @__PURE__ */ r("div", { className: "text-[9px] sm:text-xs font-medium text-muted-foreground", children: [
1610
- /* @__PURE__ */ e("span", { className: "sm:hidden", children: a[0] }),
1611
- /* @__PURE__ */ e("span", { className: "hidden sm:inline", children: a })
1612
- ] }, f)) }),
1613
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 gap-y-1", children: i.map((a, f) => {
1614
- const m = Pt(n, a.date);
1625
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 text-center", children: hn.map((l, x) => /* @__PURE__ */ r("div", { className: "text-[9px] sm:text-xs font-medium text-muted-foreground", children: [
1626
+ /* @__PURE__ */ e("span", { className: "sm:hidden", children: l[0] }),
1627
+ /* @__PURE__ */ e("span", { className: "hidden sm:inline", children: l })
1628
+ ] }, x)) }),
1629
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 gap-y-1", children: a.map((l, x) => {
1630
+ const h = Wt(n, l.date);
1615
1631
  return /* @__PURE__ */ e(
1616
- mn,
1632
+ fn,
1617
1633
  {
1618
- day: a.date.getDate(),
1619
- date: a.date,
1620
- events: m,
1621
- isCurrentMonth: a.isCurrentMonth,
1634
+ day: l.date.getDate(),
1635
+ date: l.date,
1636
+ events: h,
1637
+ isCurrentMonth: l.isCurrentMonth,
1622
1638
  onDayClick: o
1623
1639
  },
1624
- `${f + 1}-${a.date.toISOString()}`
1640
+ `${x + 1}-${l.date.toISOString()}`
1625
1641
  );
1626
1642
  }) })
1627
1643
  ] })
1628
1644
  ] });
1629
1645
  }
1630
- function gn({
1646
+ function pn({
1631
1647
  events: t,
1632
1648
  year: n,
1633
1649
  onMonthClick: s,
1634
1650
  onDayClick: o,
1635
- className: i,
1636
- slots: a,
1637
- classNames: f
1651
+ className: a,
1652
+ slots: l,
1653
+ classNames: x
1638
1654
  }) {
1639
- const m = te(() => jt(n), [n]);
1640
- return /* @__PURE__ */ r("div", { className: p("flex flex-col h-full", i), children: [
1655
+ const h = ee(() => At(n), [n]);
1656
+ return /* @__PURE__ */ r("div", { className: g("flex flex-col h-full", a), children: [
1641
1657
  /* @__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: n }) }),
1642
- /* @__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: m.map((c) => /* @__PURE__ */ e(
1643
- fn,
1658
+ /* @__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: h.map((c) => /* @__PURE__ */ e(
1659
+ gn,
1644
1660
  {
1645
1661
  date: c,
1646
1662
  events: t,
@@ -1651,8 +1667,8 @@ function gn({
1651
1667
  )) }) })
1652
1668
  ] });
1653
1669
  }
1654
- const Ie = 200, pn = 60, xn = 300, vn = 7, tt = 2, $e = 40, wn = 18;
1655
- function bn() {
1670
+ const je = 200, xn = 60, vn = 300, wn = 7, nt = 2, Oe = 40, bn = 18;
1671
+ function yn() {
1656
1672
  return /* @__PURE__ */ e(
1657
1673
  "svg",
1658
1674
  {
@@ -1669,7 +1685,7 @@ function bn() {
1669
1685
  }
1670
1686
  );
1671
1687
  }
1672
- function yn() {
1688
+ function kn() {
1673
1689
  return /* @__PURE__ */ e(
1674
1690
  "svg",
1675
1691
  {
@@ -1686,7 +1702,7 @@ function yn() {
1686
1702
  }
1687
1703
  );
1688
1704
  }
1689
- function kn() {
1705
+ function Nn() {
1690
1706
  return /* @__PURE__ */ e(
1691
1707
  "svg",
1692
1708
  {
@@ -1703,7 +1719,7 @@ function kn() {
1703
1719
  }
1704
1720
  );
1705
1721
  }
1706
- function Nn() {
1722
+ function Cn() {
1707
1723
  return /* @__PURE__ */ e(
1708
1724
  "svg",
1709
1725
  {
@@ -1720,160 +1736,160 @@ function Nn() {
1720
1736
  }
1721
1737
  );
1722
1738
  }
1723
- function Cn({
1739
+ function Dn({
1724
1740
  containerRef: t,
1725
1741
  currentDate: n,
1726
1742
  className: s
1727
1743
  }) {
1728
- const [o, i] = ie({
1744
+ const [o, a] = le({
1729
1745
  canUp: !1,
1730
1746
  canDown: !1,
1731
1747
  canLeft: !1,
1732
1748
  canRight: !1
1733
- }), [a, f] = ie({ x: 0, y: 0 }), [m, c] = ie(!1), v = o.canUp || o.canDown || o.canLeft || o.canRight, y = ae(null), b = ae(null), A = ae(null), $ = ae(!1), P = ae({ x: 0, y: 0 }), F = ae({ x: 0, y: 0 }), T = ae(0), C = ae(null), j = O(() => {
1734
- const h = t.current;
1735
- if (!h) return;
1736
- const D = 4;
1737
- i({
1738
- canUp: h.scrollTop > D,
1739
- canDown: h.scrollTop + h.clientHeight < h.scrollHeight - D,
1740
- canLeft: h.scrollLeft > D,
1741
- canRight: h.scrollLeft + h.clientWidth < h.scrollWidth - D
1749
+ }), [l, x] = le({ x: 0, y: 0 }), [h, c] = le(!1), w = o.canUp || o.canDown || o.canLeft || o.canRight, P = ie(null), b = ie(null), y = ie(null), B = ie(!1), A = ie({ x: 0, y: 0 }), W = ie({ x: 0, y: 0 }), F = ie(0), H = ie(null), k = _(() => {
1750
+ const f = t.current;
1751
+ if (!f) return;
1752
+ const E = 4;
1753
+ a({
1754
+ canUp: f.scrollTop > E,
1755
+ canDown: f.scrollTop + f.clientHeight < f.scrollHeight - E,
1756
+ canLeft: f.scrollLeft > E,
1757
+ canRight: f.scrollLeft + f.clientWidth < f.scrollWidth - E
1742
1758
  });
1743
1759
  }, [t]);
1744
- de(() => {
1745
- const h = t.current;
1746
- if (!h) return;
1747
- j(), h.addEventListener("scroll", j, { passive: !0 });
1748
- const D = new ResizeObserver(j);
1749
- D.observe(h);
1750
- const w = new MutationObserver(j);
1751
- return w.observe(h, { childList: !0, subtree: !0 }), () => {
1752
- h.removeEventListener("scroll", j), D.disconnect(), w.disconnect();
1760
+ he(() => {
1761
+ const f = t.current;
1762
+ if (!f) return;
1763
+ k(), f.addEventListener("scroll", k, { passive: !0 });
1764
+ const E = new ResizeObserver(k);
1765
+ E.observe(f);
1766
+ const D = new MutationObserver(k);
1767
+ return D.observe(f, { childList: !0, subtree: !0 }), () => {
1768
+ f.removeEventListener("scroll", k), E.disconnect(), D.disconnect();
1753
1769
  };
1754
- }, [t, j]);
1755
- const W = O(
1756
- (h, D) => {
1757
- t.current?.scrollBy({ left: h, top: D, behavior: "smooth" });
1770
+ }, [t, k]);
1771
+ const $ = _(
1772
+ (f, E) => {
1773
+ t.current?.scrollBy({ left: f, top: E, behavior: "smooth" });
1758
1774
  },
1759
1775
  [t]
1760
- ), _ = O(() => W(0, -Ie), [W]), M = O(() => W(0, Ie), [W]), G = O(() => W(-Ie, 0), [W]), H = O(() => W(Ie, 0), [W]), L = O(() => {
1761
- y.current && (clearTimeout(y.current), y.current = null), b.current && (clearInterval(b.current), b.current = null);
1762
- }, []), V = O((h) => {
1763
- h(), y.current = setTimeout(() => {
1764
- b.current = setInterval(h, pn);
1765
- }, xn);
1776
+ ), R = _(() => $(0, -je), [$]), Y = _(() => $(0, je), [$]), M = _(() => $(-je, 0), [$]), V = _(() => $(je, 0), [$]), S = _(() => {
1777
+ P.current && (clearTimeout(P.current), P.current = null), b.current && (clearInterval(b.current), b.current = null);
1778
+ }, []), z = _((f) => {
1779
+ f(), P.current = setTimeout(() => {
1780
+ b.current = setInterval(f, xn);
1781
+ }, vn);
1766
1782
  }, []);
1767
- de(() => L, [L]), de(() => {
1768
- const h = t.current;
1769
- if (!h) return;
1770
- const D = (w) => {
1771
- if (w.ctrlKey || w.metaKey || w.altKey) return;
1772
- const R = w.target.tagName;
1773
- if (!(R === "INPUT" || R === "TEXTAREA" || w.target.isContentEditable))
1774
- switch (w.key) {
1783
+ he(() => S, [S]), he(() => {
1784
+ const f = t.current;
1785
+ if (!f) return;
1786
+ const E = (D) => {
1787
+ if (D.ctrlKey || D.metaKey || D.altKey) return;
1788
+ const T = D.target.tagName;
1789
+ if (!(T === "INPUT" || T === "TEXTAREA" || D.target.isContentEditable))
1790
+ switch (D.key) {
1775
1791
  case "ArrowUp":
1776
- w.preventDefault(), _();
1792
+ D.preventDefault(), R();
1777
1793
  break;
1778
1794
  case "ArrowDown":
1779
- w.preventDefault(), M();
1795
+ D.preventDefault(), Y();
1780
1796
  break;
1781
1797
  case "ArrowLeft":
1782
- w.preventDefault(), G();
1798
+ D.preventDefault(), M();
1783
1799
  break;
1784
1800
  case "ArrowRight":
1785
- w.preventDefault(), H();
1801
+ D.preventDefault(), V();
1786
1802
  break;
1787
1803
  }
1788
1804
  };
1789
- return h.addEventListener("keydown", D), () => h.removeEventListener("keydown", D);
1790
- }, [t, _, M, G, H]), de(() => {
1791
- if (!v) return;
1792
- const h = C.current;
1793
- if (!h) return;
1794
- let D = 0;
1795
- const w = () => {
1796
- const Y = h.offsetParent;
1797
- if (!Y) return;
1798
- const J = Y.getBoundingClientRect(), ue = window.innerHeight;
1799
- if (J.height <= ue) {
1800
- h.style.removeProperty("top"), h.style.removeProperty("bottom");
1805
+ return f.addEventListener("keydown", E), () => f.removeEventListener("keydown", E);
1806
+ }, [t, R, Y, M, V]), he(() => {
1807
+ if (!w) return;
1808
+ const f = H.current;
1809
+ if (!f) return;
1810
+ let E = 0;
1811
+ const D = () => {
1812
+ const q = f.offsetParent;
1813
+ if (!q) return;
1814
+ const re = q.getBoundingClientRect(), Q = window.innerHeight;
1815
+ if (re.height <= Q) {
1816
+ f.style.removeProperty("top"), f.style.removeProperty("bottom");
1801
1817
  return;
1802
1818
  }
1803
- const le = Math.min(J.bottom, ue) - J.top, we = h.offsetHeight, he = le - we - 12, g = 12, E = Y.clientHeight - we - 12, U = Math.max(g, Math.min(he, E));
1804
- h.style.top = `${U}px`, h.style.bottom = "auto";
1805
- }, R = () => {
1806
- cancelAnimationFrame(D), D = requestAnimationFrame(w);
1807
- }, K = [window];
1808
- let Z = h.parentElement;
1809
- for (; Z; ) {
1810
- const Y = getComputedStyle(Z);
1811
- /(auto|scroll)/.test(Y.overflow + Y.overflowY) && K.push(Z), Z = Z.parentElement;
1819
+ const se = Math.min(re.bottom, Q) - re.top, ae = f.offsetHeight, ye = se - ae - 12, ue = 12, d = q.clientHeight - ae - 12, I = Math.max(ue, Math.min(ye, d));
1820
+ f.style.top = `${I}px`, f.style.bottom = "auto";
1821
+ }, T = () => {
1822
+ cancelAnimationFrame(E), E = requestAnimationFrame(D);
1823
+ }, te = [window];
1824
+ let O = f.parentElement;
1825
+ for (; O; ) {
1826
+ const q = getComputedStyle(O);
1827
+ /(auto|scroll)/.test(q.overflow + q.overflowY) && te.push(O), O = O.parentElement;
1812
1828
  }
1813
- for (const Y of K)
1814
- Y.addEventListener("scroll", R, { passive: !0 });
1815
- return window.addEventListener("resize", R, { passive: !0 }), w(), () => {
1816
- cancelAnimationFrame(D);
1817
- for (const Y of K)
1818
- Y.removeEventListener("scroll", R);
1819
- window.removeEventListener("resize", R);
1829
+ for (const q of te)
1830
+ q.addEventListener("scroll", T, { passive: !0 });
1831
+ return window.addEventListener("resize", T, { passive: !0 }), D(), () => {
1832
+ cancelAnimationFrame(E);
1833
+ for (const q of te)
1834
+ q.removeEventListener("scroll", T);
1835
+ window.removeEventListener("resize", T);
1820
1836
  };
1821
- }, [v]);
1822
- const X = O(() => {
1823
- $.current = !1, c(!1), f({ x: 0, y: 0 }), F.current = { x: 0, y: 0 }, T.current && cancelAnimationFrame(T.current);
1824
- }, []), Q = O(
1825
- (h) => {
1826
- h.preventDefault(), $.current = !0, c(!0), P.current = { x: h.clientX, y: h.clientY }, F.current = { x: 0, y: 0 }, h.target.setPointerCapture(h.pointerId);
1827
- const D = () => {
1828
- if (!$.current) return;
1829
- const w = t.current;
1830
- if (w) {
1831
- const { x: R, y: K } = F.current, Z = Math.sqrt(R * R + K * K);
1832
- if (Z > tt) {
1833
- const J = Math.min(Z / $e, 1) * wn;
1834
- w.scrollLeft += R / Z * J, w.scrollTop += K / Z * J;
1837
+ }, [w]);
1838
+ const U = _(() => {
1839
+ B.current = !1, c(!1), x({ x: 0, y: 0 }), W.current = { x: 0, y: 0 }, F.current && cancelAnimationFrame(F.current);
1840
+ }, []), G = _(
1841
+ (f) => {
1842
+ f.preventDefault(), B.current = !0, c(!0), A.current = { x: f.clientX, y: f.clientY }, W.current = { x: 0, y: 0 }, f.target.setPointerCapture(f.pointerId);
1843
+ const E = () => {
1844
+ if (!B.current) return;
1845
+ const D = t.current;
1846
+ if (D) {
1847
+ const { x: T, y: te } = W.current, O = Math.sqrt(T * T + te * te);
1848
+ if (O > nt) {
1849
+ const re = Math.min(O / Oe, 1) * bn;
1850
+ D.scrollLeft += T / O * re, D.scrollTop += te / O * re;
1835
1851
  }
1836
1852
  }
1837
- T.current = requestAnimationFrame(D);
1853
+ F.current = requestAnimationFrame(E);
1838
1854
  };
1839
- T.current = requestAnimationFrame(D);
1855
+ F.current = requestAnimationFrame(E);
1840
1856
  },
1841
1857
  [t]
1842
- ), B = O((h) => {
1843
- if (!$.current) return;
1844
- const D = h.clientX - P.current.x, w = h.clientY - P.current.y;
1845
- F.current = { x: D, y: w };
1846
- const R = Math.sqrt(D * D + w * w);
1847
- if (R < tt)
1848
- f({ x: 0, y: 0 });
1858
+ ), X = _((f) => {
1859
+ if (!B.current) return;
1860
+ const E = f.clientX - A.current.x, D = f.clientY - A.current.y;
1861
+ W.current = { x: E, y: D };
1862
+ const T = Math.sqrt(E * E + D * D);
1863
+ if (T < nt)
1864
+ x({ x: 0, y: 0 });
1849
1865
  else {
1850
- const Z = Math.min(R, $e) / $e * vn;
1851
- f({
1852
- x: D / R * Z,
1853
- y: w / R * Z
1866
+ const O = Math.min(T, Oe) / Oe * wn;
1867
+ x({
1868
+ x: E / T * O,
1869
+ y: D / T * O
1854
1870
  });
1855
1871
  }
1856
- }, []), d = O(
1857
- (h) => {
1858
- switch (h.key) {
1872
+ }, []), m = _(
1873
+ (f) => {
1874
+ switch (f.key) {
1859
1875
  case "ArrowUp":
1860
- h.preventDefault(), _();
1876
+ f.preventDefault(), R();
1861
1877
  break;
1862
1878
  case "ArrowDown":
1863
- h.preventDefault(), M();
1879
+ f.preventDefault(), Y();
1864
1880
  break;
1865
1881
  case "ArrowLeft":
1866
- h.preventDefault(), G();
1882
+ f.preventDefault(), M();
1867
1883
  break;
1868
1884
  case "ArrowRight":
1869
- h.preventDefault(), H();
1885
+ f.preventDefault(), V();
1870
1886
  break;
1871
1887
  }
1872
1888
  },
1873
- [_, M, G, H]
1889
+ [R, Y, M, V]
1874
1890
  );
1875
- if (!v) return null;
1876
- const N = n ? n.toLocaleDateString(void 0, {
1891
+ if (!w) return null;
1892
+ const p = n ? n.toLocaleDateString(void 0, {
1877
1893
  weekday: "short",
1878
1894
  month: "short",
1879
1895
  day: "numeric"
@@ -1881,13 +1897,13 @@ function Cn({
1881
1897
  return /* @__PURE__ */ r(
1882
1898
  "div",
1883
1899
  {
1884
- ref: C,
1900
+ ref: H,
1885
1901
  className: `inno-scroll-nav-wrapper ${s ?? ""}`,
1886
1902
  role: "toolbar",
1887
1903
  "aria-label": "Scroll navigation",
1888
- onKeyDown: d,
1904
+ onKeyDown: m,
1889
1905
  children: [
1890
- N && /* @__PURE__ */ e("div", { className: "inno-scroll-nav-date", "aria-live": "polite", children: N }),
1906
+ p && /* @__PURE__ */ e("div", { className: "inno-scroll-nav-date", "aria-live": "polite", children: p }),
1891
1907
  /* @__PURE__ */ r("div", { className: "inno-scroll-nav", children: [
1892
1908
  /* @__PURE__ */ e(
1893
1909
  "button",
@@ -1896,11 +1912,11 @@ function Cn({
1896
1912
  className: `inno-scroll-nav-btn inno-scroll-nav-up ${o.canUp ? "" : "inno-scroll-nav-btn-disabled"}`,
1897
1913
  "aria-label": "Scroll up",
1898
1914
  disabled: !o.canUp,
1899
- onPointerDown: () => V(_),
1900
- onPointerUp: L,
1901
- onPointerLeave: L,
1915
+ onPointerDown: () => z(R),
1916
+ onPointerUp: S,
1917
+ onPointerLeave: S,
1902
1918
  tabIndex: o.canUp ? 0 : -1,
1903
- children: /* @__PURE__ */ e(bn, {})
1919
+ children: /* @__PURE__ */ e(yn, {})
1904
1920
  }
1905
1921
  ),
1906
1922
  /* @__PURE__ */ e(
@@ -1910,31 +1926,31 @@ function Cn({
1910
1926
  className: `inno-scroll-nav-btn inno-scroll-nav-left ${o.canLeft ? "" : "inno-scroll-nav-btn-disabled"}`,
1911
1927
  "aria-label": "Scroll left",
1912
1928
  disabled: !o.canLeft,
1913
- onPointerDown: () => V(G),
1914
- onPointerUp: L,
1915
- onPointerLeave: L,
1929
+ onPointerDown: () => z(M),
1930
+ onPointerUp: S,
1931
+ onPointerLeave: S,
1916
1932
  tabIndex: o.canLeft ? 0 : -1,
1917
- children: /* @__PURE__ */ e(kn, {})
1933
+ children: /* @__PURE__ */ e(Nn, {})
1918
1934
  }
1919
1935
  ),
1920
1936
  /* @__PURE__ */ e(
1921
1937
  "button",
1922
1938
  {
1923
- ref: A,
1939
+ ref: y,
1924
1940
  type: "button",
1925
- className: `inno-scroll-nav-joystick ${m ? "inno-scroll-nav-joystick-active" : ""}`,
1941
+ className: `inno-scroll-nav-joystick ${h ? "inno-scroll-nav-joystick-active" : ""}`,
1926
1942
  "aria-label": "Drag to scroll freely",
1927
- onPointerDown: Q,
1928
- onPointerMove: B,
1929
- onPointerUp: X,
1930
- onPointerCancel: X,
1943
+ onPointerDown: G,
1944
+ onPointerMove: X,
1945
+ onPointerUp: U,
1946
+ onPointerCancel: U,
1931
1947
  tabIndex: 0,
1932
1948
  children: /* @__PURE__ */ e(
1933
1949
  "span",
1934
1950
  {
1935
1951
  className: "inno-scroll-nav-joystick-dot",
1936
1952
  style: {
1937
- transform: `translate(${a.x}px, ${a.y}px)`
1953
+ transform: `translate(${l.x}px, ${l.y}px)`
1938
1954
  }
1939
1955
  }
1940
1956
  )
@@ -1947,11 +1963,11 @@ function Cn({
1947
1963
  className: `inno-scroll-nav-btn inno-scroll-nav-right ${o.canRight ? "" : "inno-scroll-nav-btn-disabled"}`,
1948
1964
  "aria-label": "Scroll right",
1949
1965
  disabled: !o.canRight,
1950
- onPointerDown: () => V(H),
1951
- onPointerUp: L,
1952
- onPointerLeave: L,
1966
+ onPointerDown: () => z(V),
1967
+ onPointerUp: S,
1968
+ onPointerLeave: S,
1953
1969
  tabIndex: o.canRight ? 0 : -1,
1954
- children: /* @__PURE__ */ e(Nn, {})
1970
+ children: /* @__PURE__ */ e(Cn, {})
1955
1971
  }
1956
1972
  ),
1957
1973
  /* @__PURE__ */ e(
@@ -1961,11 +1977,11 @@ function Cn({
1961
1977
  className: `inno-scroll-nav-btn inno-scroll-nav-down ${o.canDown ? "" : "inno-scroll-nav-btn-disabled"}`,
1962
1978
  "aria-label": "Scroll down",
1963
1979
  disabled: !o.canDown,
1964
- onPointerDown: () => V(M),
1965
- onPointerUp: L,
1966
- onPointerLeave: L,
1980
+ onPointerDown: () => z(Y),
1981
+ onPointerUp: S,
1982
+ onPointerLeave: S,
1967
1983
  tabIndex: o.canDown ? 0 : -1,
1968
- children: /* @__PURE__ */ e(yn, {})
1984
+ children: /* @__PURE__ */ e(kn, {})
1969
1985
  }
1970
1986
  )
1971
1987
  ] })
@@ -1973,7 +1989,7 @@ function Cn({
1973
1989
  }
1974
1990
  );
1975
1991
  }
1976
- function Dn(t) {
1992
+ function Mn(t) {
1977
1993
  switch (t) {
1978
1994
  case "day":
1979
1995
  case "week":
@@ -1982,71 +1998,72 @@ function Dn(t) {
1982
1998
  return "day";
1983
1999
  }
1984
2000
  }
1985
- function Mn({
2001
+ function En({
1986
2002
  onEventClick: t,
1987
2003
  onSlotClick: n,
1988
2004
  onSlotSelect: s,
1989
2005
  onAddEvent: o,
1990
- className: i,
1991
- showHeader: a = !0,
1992
- minSelectionMinutes: f = 30,
1993
- showMoreMode: m,
1994
- showMoreEventsInPopover: c = !1,
1995
- isLoading: v = !1,
1996
- slots: y,
1997
- classNames: b,
1998
- settingsContent: A,
1999
- filterContent: $,
2000
- headerActions: P,
2006
+ alwaysShowResources: a,
2007
+ className: l,
2008
+ showHeader: x = !0,
2009
+ minSelectionMinutes: h = 30,
2010
+ showMoreMode: c,
2011
+ showMoreEventsInPopover: w = !1,
2012
+ isLoading: P = !1,
2013
+ slots: b,
2014
+ classNames: y,
2015
+ settingsContent: B,
2016
+ filterContent: A,
2017
+ headerActions: W,
2001
2018
  renderPopover: F,
2002
- calendarRef: T,
2003
- headerConfig: C,
2004
- eventDetailMode: j,
2005
- renderEventDetail: W
2019
+ calendarRef: H,
2020
+ headerConfig: k,
2021
+ eventDetailMode: $,
2022
+ renderEventDetail: R
2006
2023
  }) {
2007
- const _ = m ?? (c ? "popover" : "expand"), {
2024
+ const Y = c ?? (w ? "popover" : "expand"), {
2008
2025
  view: M,
2009
- setView: G,
2010
- selectedDate: H,
2011
- setSelectedDate: L,
2012
- slotDuration: V,
2013
- filteredEvents: X,
2014
- users: Q,
2015
- visibleHours: B,
2016
- workingHours: d,
2017
- badgeVariant: N,
2018
- showWorkingHoursOnly: h,
2026
+ setView: V,
2027
+ selectedDate: S,
2028
+ setSelectedDate: z,
2029
+ slotDuration: U,
2030
+ filteredEvents: G,
2031
+ users: X,
2032
+ visibleHours: m,
2033
+ workingHours: p,
2034
+ badgeVariant: f,
2035
+ showWorkingHoursOnly: E,
2019
2036
  clearFocusEventId: D
2020
- } = zt(), w = te(() => {
2021
- if (!h || !d)
2037
+ } = zt(), T = ee(() => {
2038
+ if (!E || !p)
2022
2039
  return {
2023
- startHour: B.start,
2024
- endHour: B.end
2040
+ startHour: m.start,
2041
+ endHour: m.end
2025
2042
  };
2026
- let g = 24, E = 0;
2027
- for (const U of Object.keys(d)) {
2028
- const re = d[Number(U)];
2029
- !re || re.enabled === !1 || (re.from < g && (g = re.from), re.to > E && (E = re.to));
2043
+ let d = 24, I = 0;
2044
+ for (const K of Object.keys(p)) {
2045
+ const ce = p[Number(K)];
2046
+ !ce || ce.enabled === !1 || (ce.from < d && (d = ce.from), ce.to > I && (I = ce.to));
2030
2047
  }
2031
- return g >= E ? {
2032
- startHour: B.start,
2033
- endHour: B.end
2034
- } : { startHour: g, endHour: E };
2035
- }, [h, d, B]), R = w, K = ae(null);
2036
- wt(
2037
- T,
2048
+ return d >= I ? {
2049
+ startHour: m.start,
2050
+ endHour: m.end
2051
+ } : { startHour: d, endHour: I };
2052
+ }, [E, p, m]), te = T, O = ie(null);
2053
+ bt(
2054
+ H,
2038
2055
  () => ({
2039
2056
  scrollToToday: () => {
2040
- const g = /* @__PURE__ */ new Date();
2041
- L(g, M), requestAnimationFrame(() => {
2057
+ const d = /* @__PURE__ */ new Date();
2058
+ z(d, M), requestAnimationFrame(() => {
2042
2059
  requestAnimationFrame(() => {
2043
- const E = K.current?.querySelector(
2060
+ const I = O.current?.querySelector(
2044
2061
  ".ic-timeline-scroll-container, [class*='overflow-auto']"
2045
2062
  );
2046
- if (!E) return;
2047
- const De = (g.getHours() - w.startHour) * 96;
2048
- De > 0 && E.scrollTo({
2049
- top: Math.max(0, De - 100),
2063
+ if (!I) return;
2064
+ const Me = (d.getHours() - T.startHour) * 96;
2065
+ Me > 0 && I.scrollTo({
2066
+ top: Math.max(0, Me - 100),
2050
2067
  // Offset to show some context
2051
2068
  behavior: "smooth"
2052
2069
  });
@@ -2054,302 +2071,304 @@ function Mn({
2054
2071
  });
2055
2072
  },
2056
2073
  scrollToWorkingHours: () => {
2057
- let g = 8;
2058
- if (d)
2059
- for (const E of Object.keys(d)) {
2060
- const U = d[Number(E)];
2061
- U?.enabled && U.from < g && (g = Math.max(U.from - 1, 0));
2074
+ let d = 8;
2075
+ if (p)
2076
+ for (const I of Object.keys(p)) {
2077
+ const K = p[Number(I)];
2078
+ K?.enabled && K.from < d && (d = Math.max(K.from - 1, 0));
2062
2079
  }
2063
2080
  requestAnimationFrame(() => {
2064
2081
  requestAnimationFrame(() => {
2065
- const E = K.current?.querySelector(
2082
+ const I = O.current?.querySelector(
2066
2083
  ".ic-timeline-scroll-container, [class*='overflow-auto']"
2067
2084
  );
2068
- if (!E) return;
2069
- const re = (g - w.startHour) * 96;
2070
- E.scrollTo({
2071
- top: Math.max(0, re),
2085
+ if (!I) return;
2086
+ const ce = (d - T.startHour) * 96;
2087
+ I.scrollTo({
2088
+ top: Math.max(0, ce),
2072
2089
  behavior: "smooth"
2073
2090
  });
2074
2091
  });
2075
2092
  });
2076
2093
  },
2077
- getViewRect: () => K.current?.getBoundingClientRect() ?? null,
2078
- focusEvent: (g) => {
2094
+ getViewRect: () => O.current?.getBoundingClientRect() ?? null,
2095
+ focusEvent: (d) => {
2079
2096
  D(), requestAnimationFrame(() => {
2080
2097
  D();
2081
2098
  });
2082
- const E = K.current?.querySelector(
2083
- `[data-event-id="${g}"]`
2099
+ const I = O.current?.querySelector(
2100
+ `[data-event-id="${d}"]`
2084
2101
  );
2085
- E && setTimeout(() => E.click(), 150);
2102
+ I && setTimeout(() => I.click(), 150);
2086
2103
  }
2087
2104
  }),
2088
2105
  [
2089
- L,
2106
+ z,
2090
2107
  M,
2091
- w,
2092
- d,
2108
+ T,
2109
+ p,
2093
2110
  D
2094
2111
  ]
2095
2112
  );
2096
- const Z = te(() => Dn(M), [M]), Y = O(
2097
- (g) => {
2113
+ const q = ee(() => Mn(M), [M]), re = _(
2114
+ (d) => {
2098
2115
  if (s) {
2099
- s(g);
2116
+ s(d);
2100
2117
  return;
2101
2118
  }
2102
2119
  if (n) {
2103
- const E = g.startDate.getHours();
2104
- n(g.startDate, E);
2120
+ const I = d.startDate.getHours();
2121
+ n(d.startDate, I);
2105
2122
  }
2106
2123
  },
2107
2124
  [s, n]
2108
- ), J = O(
2109
- (g) => {
2110
- G("day"), L(g, "day");
2125
+ ), Q = _(
2126
+ (d) => {
2127
+ V("day"), z(d, "day");
2111
2128
  },
2112
- [L, G]
2113
- ), ue = O(
2114
- (g) => {
2115
- G("month"), L(g, "month");
2129
+ [z, V]
2130
+ ), we = _(
2131
+ (d) => {
2132
+ V("month"), z(d, "month");
2116
2133
  },
2117
- [L, G]
2118
- ), se = O(
2119
- (g) => {
2120
- t?.(g);
2134
+ [z, V]
2135
+ ), se = _(
2136
+ (d) => {
2137
+ t?.(d);
2121
2138
  },
2122
2139
  [t]
2123
- ), le = O(
2124
- (g, E, U) => {
2125
- n?.(g, E);
2140
+ ), ae = _(
2141
+ (d, I, K) => {
2142
+ n?.(d, I);
2126
2143
  },
2127
2144
  [n]
2128
- ), we = () => {
2129
- const g = X, E = se, U = F;
2145
+ ), ye = () => {
2146
+ const d = G, I = se, K = F;
2130
2147
  switch (M) {
2131
2148
  case "day":
2132
2149
  return /* @__PURE__ */ e(
2133
- St,
2150
+ Lt,
2134
2151
  {
2135
- events: g,
2136
- date: H,
2137
- visibleHours: R,
2138
- workingHours: d,
2139
- slotDuration: V,
2140
- badgeVariant: N,
2141
- onEventClick: E,
2142
- renderPopover: U,
2143
- ...y && { slots: y },
2144
- ...b && { classNames: b }
2152
+ events: d,
2153
+ date: S,
2154
+ visibleHours: te,
2155
+ workingHours: p,
2156
+ slotDuration: U,
2157
+ badgeVariant: f,
2158
+ onEventClick: I,
2159
+ renderPopover: K,
2160
+ ...b && { slots: b },
2161
+ ...y && { classNames: y }
2145
2162
  }
2146
2163
  );
2147
2164
  case "week":
2148
2165
  return /* @__PURE__ */ e(
2149
- Mt,
2166
+ Et,
2150
2167
  {
2151
- events: g,
2152
- date: H,
2153
- visibleHours: R,
2154
- workingHours: d,
2155
- slotDuration: V,
2156
- badgeVariant: N,
2157
- onEventClick: E,
2158
- renderPopover: U,
2159
- ...y && { slots: y },
2160
- ...b && { classNames: b }
2168
+ events: d,
2169
+ date: S,
2170
+ visibleHours: te,
2171
+ workingHours: p,
2172
+ slotDuration: U,
2173
+ badgeVariant: f,
2174
+ onEventClick: I,
2175
+ renderPopover: K,
2176
+ ...b && { slots: b },
2177
+ ...y && { classNames: y }
2161
2178
  }
2162
2179
  );
2163
2180
  case "month":
2164
2181
  return /* @__PURE__ */ e(
2165
- Ve,
2182
+ Ye,
2166
2183
  {
2167
- events: g,
2168
- date: H,
2169
- badgeVariant: N,
2170
- onEventClick: E,
2171
- onDayClick: J,
2172
- renderPopover: U,
2173
- showMoreMode: _,
2174
- ...y && { slots: y },
2175
- ...b && { classNames: b }
2184
+ events: d,
2185
+ date: S,
2186
+ badgeVariant: f,
2187
+ onEventClick: I,
2188
+ onDayClick: Q,
2189
+ renderPopover: K,
2190
+ showMoreMode: Y,
2191
+ ...b && { slots: b },
2192
+ ...y && { classNames: y }
2176
2193
  }
2177
2194
  );
2178
2195
  case "year":
2179
2196
  return /* @__PURE__ */ e(
2180
- gn,
2197
+ pn,
2181
2198
  {
2182
- events: g,
2183
- year: H.getFullYear(),
2184
- onMonthClick: ue,
2185
- onDayClick: J,
2186
- ...y && { slots: y },
2187
- ...b && { classNames: b }
2199
+ events: d,
2200
+ year: S.getFullYear(),
2201
+ onMonthClick: we,
2202
+ onDayClick: Q,
2203
+ ...b && { slots: b },
2204
+ ...y && { classNames: y }
2188
2205
  }
2189
2206
  );
2190
2207
  case "agenda":
2191
2208
  return /* @__PURE__ */ e(
2192
- Dt,
2209
+ Mt,
2193
2210
  {
2194
- events: g,
2195
- date: H,
2196
- onEventClick: E,
2197
- renderPopover: U,
2198
- ...y && { slots: y },
2199
- ...b && { classNames: b }
2211
+ events: d,
2212
+ date: S,
2213
+ onEventClick: I,
2214
+ renderPopover: K,
2215
+ ...b && { slots: b },
2216
+ ...y && { classNames: y }
2200
2217
  }
2201
2218
  );
2202
2219
  // Resource views — delegate to TimelineView with matching day count
2203
2220
  case "resource-day":
2204
2221
  return /* @__PURE__ */ e(
2205
- Le,
2222
+ Te,
2206
2223
  {
2207
2224
  daysToShow: 1,
2208
- events: g,
2209
- users: Q,
2210
- selectedDate: H,
2225
+ events: d,
2226
+ users: X,
2227
+ ...a && { alwaysShowResources: a },
2228
+ selectedDate: S,
2211
2229
  visibleHours: {
2212
- from: w.startHour,
2213
- to: w.endHour
2230
+ from: T.startHour,
2231
+ to: T.endHour
2214
2232
  },
2215
- onEventClick: E,
2216
- onSlotSelect: Y,
2217
- onSlotClick: le,
2218
- renderPopover: U,
2219
- ...y && { slots: y },
2220
- ...b && { classNames: b }
2233
+ onEventClick: I,
2234
+ onSlotSelect: re,
2235
+ onSlotClick: ae,
2236
+ renderPopover: K,
2237
+ ...b && { slots: b },
2238
+ ...y && { classNames: y }
2221
2239
  }
2222
2240
  );
2223
2241
  case "resource-week":
2224
2242
  return /* @__PURE__ */ e(
2225
- Le,
2243
+ Te,
2226
2244
  {
2227
2245
  daysToShow: 7,
2228
- events: g,
2229
- users: Q,
2230
- selectedDate: H,
2246
+ events: d,
2247
+ users: X,
2248
+ ...a && { alwaysShowResources: a },
2249
+ selectedDate: S,
2231
2250
  visibleHours: {
2232
- from: w.startHour,
2233
- to: w.endHour
2251
+ from: T.startHour,
2252
+ to: T.endHour
2234
2253
  },
2235
- onEventClick: E,
2236
- onSlotSelect: Y,
2237
- onSlotClick: le,
2238
- renderPopover: U,
2239
- ...y && { slots: y },
2240
- ...b && { classNames: b }
2254
+ onEventClick: I,
2255
+ onSlotSelect: re,
2256
+ onSlotClick: ae,
2257
+ renderPopover: K,
2258
+ ...b && { slots: b },
2259
+ ...y && { classNames: y }
2241
2260
  }
2242
2261
  );
2243
2262
  // Timeline views
2244
2263
  case "timeline-day":
2245
2264
  return /* @__PURE__ */ e(
2246
- Le,
2265
+ Te,
2247
2266
  {
2248
2267
  daysToShow: 1,
2249
- events: g,
2250
- users: Q,
2251
- selectedDate: H,
2268
+ events: d,
2269
+ users: X,
2270
+ selectedDate: S,
2252
2271
  visibleHours: {
2253
- from: w.startHour,
2254
- to: w.endHour
2272
+ from: T.startHour,
2273
+ to: T.endHour
2255
2274
  },
2256
- onEventClick: E,
2257
- onSlotSelect: Y,
2258
- onSlotClick: le,
2259
- renderPopover: U,
2260
- ...y && { slots: y },
2261
- ...b && { classNames: b }
2275
+ onEventClick: I,
2276
+ onSlotSelect: re,
2277
+ onSlotClick: ae,
2278
+ renderPopover: K,
2279
+ ...b && { slots: b },
2280
+ ...y && { classNames: y }
2262
2281
  }
2263
2282
  );
2264
2283
  case "timeline-3day":
2265
2284
  return /* @__PURE__ */ e(
2266
- Le,
2285
+ Te,
2267
2286
  {
2268
2287
  daysToShow: 3,
2269
- events: g,
2270
- users: Q,
2271
- selectedDate: H,
2288
+ events: d,
2289
+ users: X,
2290
+ selectedDate: S,
2272
2291
  visibleHours: {
2273
- from: w.startHour,
2274
- to: w.endHour
2292
+ from: T.startHour,
2293
+ to: T.endHour
2275
2294
  },
2276
- onEventClick: E,
2277
- onSlotSelect: Y,
2278
- onSlotClick: le,
2279
- renderPopover: U,
2280
- ...y && { slots: y },
2281
- ...b && { classNames: b }
2295
+ onEventClick: I,
2296
+ onSlotSelect: re,
2297
+ onSlotClick: ae,
2298
+ renderPopover: K,
2299
+ ...b && { slots: b },
2300
+ ...y && { classNames: y }
2282
2301
  }
2283
2302
  );
2284
2303
  case "timeline-week":
2285
2304
  return /* @__PURE__ */ e(
2286
- Le,
2305
+ Te,
2287
2306
  {
2288
2307
  daysToShow: 7,
2289
- events: g,
2290
- users: Q,
2291
- selectedDate: H,
2308
+ events: d,
2309
+ users: X,
2310
+ selectedDate: S,
2292
2311
  visibleHours: {
2293
- from: w.startHour,
2294
- to: w.endHour
2312
+ from: T.startHour,
2313
+ to: T.endHour
2295
2314
  },
2296
- onEventClick: E,
2297
- onSlotSelect: Y,
2298
- onSlotClick: le,
2299
- renderPopover: U,
2300
- ...y && { slots: y },
2301
- ...b && { classNames: b }
2315
+ onEventClick: I,
2316
+ onSlotSelect: re,
2317
+ onSlotClick: ae,
2318
+ renderPopover: K,
2319
+ ...b && { slots: b },
2320
+ ...y && { classNames: y }
2302
2321
  }
2303
2322
  );
2304
2323
  default:
2305
2324
  return /* @__PURE__ */ e(
2306
- Ve,
2325
+ Ye,
2307
2326
  {
2308
- events: g,
2309
- date: H,
2310
- badgeVariant: N,
2311
- onEventClick: E,
2312
- onDayClick: J,
2313
- ...y && { slots: y },
2314
- ...b && { classNames: b }
2327
+ events: d,
2328
+ date: S,
2329
+ badgeVariant: f,
2330
+ onEventClick: I,
2331
+ onDayClick: Q,
2332
+ ...b && { slots: b },
2333
+ ...y && { classNames: y }
2315
2334
  }
2316
2335
  );
2317
2336
  }
2318
- }, he = ae(null);
2319
- return de(() => {
2320
- K.current = he.current;
2337
+ }, ue = ie(null);
2338
+ return he(() => {
2339
+ O.current = ue.current;
2321
2340
  }), /* @__PURE__ */ e(
2322
- It,
2341
+ jt,
2323
2342
  {
2324
- mode: Z,
2325
- onSelect: Y,
2326
- minDurationMinutes: f,
2327
- slotDurationMinutes: V,
2343
+ mode: q,
2344
+ onSelect: re,
2345
+ minDurationMinutes: h,
2346
+ slotDurationMinutes: U,
2328
2347
  enabled: !!(s || n),
2329
2348
  children: /* @__PURE__ */ r(
2330
2349
  "div",
2331
2350
  {
2332
- className: p(
2351
+ className: g(
2333
2352
  "inno-calendar-root flex flex-col h-full p-4",
2334
- b?.root,
2335
- i
2353
+ y?.root,
2354
+ l
2336
2355
  ),
2337
2356
  children: [
2338
- a && /* @__PURE__ */ e(
2339
- Ct,
2357
+ x && /* @__PURE__ */ e(
2358
+ Dt,
2340
2359
  {
2341
- currentDate: H,
2360
+ currentDate: S,
2342
2361
  view: M,
2343
- events: X,
2344
- onViewChange: G,
2345
- onNavigateToday: () => L(/* @__PURE__ */ new Date(), M),
2362
+ events: G,
2363
+ onViewChange: V,
2364
+ onNavigateToday: () => z(/* @__PURE__ */ new Date(), M),
2346
2365
  onNavigatePrev: () => {
2347
- const g = new Date(H);
2348
- M === "day" || M === "timeline-day" || M === "resource-day" ? g.setDate(g.getDate() - 1) : M === "timeline-3day" ? g.setDate(g.getDate() - 3) : M === "week" || M === "timeline-week" || M === "resource-week" ? g.setDate(g.getDate() - 7) : M === "month" ? g.setMonth(g.getMonth() - 1) : M === "year" ? g.setFullYear(g.getFullYear() - 1) : g.setDate(g.getDate() - 7), L(g, M);
2366
+ const d = new Date(S);
2367
+ M === "day" || M === "timeline-day" || M === "resource-day" ? d.setDate(d.getDate() - 1) : M === "timeline-3day" ? d.setDate(d.getDate() - 3) : M === "week" || M === "timeline-week" || M === "resource-week" ? d.setDate(d.getDate() - 7) : M === "month" ? d.setMonth(d.getMonth() - 1) : M === "year" ? d.setFullYear(d.getFullYear() - 1) : d.setDate(d.getDate() - 7), z(d, M);
2349
2368
  },
2350
2369
  onNavigateNext: () => {
2351
- const g = new Date(H);
2352
- M === "day" || M === "timeline-day" || M === "resource-day" ? g.setDate(g.getDate() + 1) : M === "timeline-3day" ? g.setDate(g.getDate() + 3) : M === "week" || M === "timeline-week" || M === "resource-week" ? g.setDate(g.getDate() + 7) : M === "month" ? g.setMonth(g.getMonth() + 1) : M === "year" ? g.setFullYear(g.getFullYear() + 1) : g.setDate(g.getDate() + 7), L(g, M);
2370
+ const d = new Date(S);
2371
+ M === "day" || M === "timeline-day" || M === "resource-day" ? d.setDate(d.getDate() + 1) : M === "timeline-3day" ? d.setDate(d.getDate() + 3) : M === "week" || M === "timeline-week" || M === "resource-week" ? d.setDate(d.getDate() + 7) : M === "month" ? d.setMonth(d.getMonth() + 1) : M === "year" ? d.setFullYear(d.getFullYear() + 1) : d.setDate(d.getDate() + 7), z(d, M);
2353
2372
  },
2354
2373
  availableViews: [
2355
2374
  "day",
@@ -2359,28 +2378,28 @@ function Mn({
2359
2378
  "agenda"
2360
2379
  ],
2361
2380
  showTimelineViews: !0,
2362
- showSettings: !!A,
2363
- ...!P && o && { onAddEvent: o },
2364
- actions: P,
2365
- settingsContent: A,
2366
- filterContent: $,
2367
- ...C && { headerConfig: C }
2381
+ showSettings: !!B,
2382
+ ...!W && o && { onAddEvent: o },
2383
+ actions: W,
2384
+ settingsContent: B,
2385
+ filterContent: A,
2386
+ ...k && { headerConfig: k }
2368
2387
  }
2369
2388
  ),
2370
2389
  /* @__PURE__ */ r("div", { className: "relative flex-1 min-h-0", children: [
2371
2390
  /* @__PURE__ */ e(
2372
2391
  "div",
2373
2392
  {
2374
- ref: he,
2375
- className: p(
2393
+ ref: ue,
2394
+ className: g(
2376
2395
  "h-full border rounded-lg bg-white overflow-x-auto",
2377
- b?.viewContainer
2396
+ y?.viewContainer
2378
2397
  ),
2379
- children: we()
2398
+ children: ye()
2380
2399
  }
2381
2400
  ),
2382
- v && /* @__PURE__ */ e("div", { className: "inno-calendar-loading-overlay", children: /* @__PURE__ */ e("div", { className: "inno-calendar-spinner" }) }),
2383
- /* @__PURE__ */ e(Cn, { containerRef: he, currentDate: H })
2401
+ P && /* @__PURE__ */ e("div", { className: "inno-calendar-loading-overlay", children: /* @__PURE__ */ e("div", { className: "inno-calendar-spinner" }) }),
2402
+ /* @__PURE__ */ e(Dn, { containerRef: ue, currentDate: S })
2384
2403
  ] })
2385
2404
  ]
2386
2405
  }
@@ -2388,93 +2407,95 @@ function Mn({
2388
2407
  }
2389
2408
  );
2390
2409
  }
2391
- function Sn({
2410
+ function Ln({
2392
2411
  events: t,
2393
2412
  users: n = [],
2394
- scheduleTypes: s = [],
2395
- initialView: o = "week",
2396
- initialDate: i,
2397
- initialSelectedUserId: a,
2398
- initialScheduleTypeIds: f,
2399
- initialParticipantIds: m,
2400
- initialWorkingHoursView: c,
2401
- initialSearchQuery: v,
2402
- preferencesConfig: y,
2403
- onEventClick: b,
2404
- onSlotClick: A,
2405
- onSlotSelect: $,
2406
- onAddEvent: P,
2413
+ alwaysShowResources: s,
2414
+ scheduleTypes: o = [],
2415
+ initialView: a = "week",
2416
+ initialDate: l,
2417
+ initialSelectedUserId: x,
2418
+ initialScheduleTypeIds: h,
2419
+ initialParticipantIds: c,
2420
+ initialWorkingHoursView: w,
2421
+ initialSearchQuery: P,
2422
+ preferencesConfig: b,
2423
+ onEventClick: y,
2424
+ onSlotClick: B,
2425
+ onSlotSelect: A,
2426
+ onAddEvent: W,
2407
2427
  onEventDrop: F,
2408
- onDateChange: T,
2409
- onViewChange: C,
2410
- className: j,
2411
- showHeader: W = !0,
2412
- minSelectionMinutes: _ = 30,
2428
+ onDateChange: H,
2429
+ onViewChange: k,
2430
+ className: $,
2431
+ showHeader: R = !0,
2432
+ minSelectionMinutes: Y = 30,
2413
2433
  showMoreMode: M,
2414
- showMoreEventsInPopover: G = !1,
2415
- isLoading: H = !1,
2416
- renderPopover: L,
2417
- slots: V,
2418
- classNames: X,
2419
- settingsContent: Q,
2420
- filterContent: B,
2421
- headerActions: d,
2422
- focusEventId: N,
2423
- headerConfig: h,
2434
+ showMoreEventsInPopover: V = !1,
2435
+ isLoading: S = !1,
2436
+ renderPopover: z,
2437
+ slots: U,
2438
+ classNames: G,
2439
+ settingsContent: X,
2440
+ filterContent: m,
2441
+ headerActions: p,
2442
+ focusEventId: f,
2443
+ headerConfig: E,
2424
2444
  eventDetailMode: D,
2425
- renderEventDetail: w
2426
- }, R) {
2427
- return /* @__PURE__ */ e(Tt, { ...F && { onEventDrop: F }, children: /* @__PURE__ */ e(
2428
- Ht,
2445
+ renderEventDetail: T
2446
+ }, te) {
2447
+ return /* @__PURE__ */ e(Ht, { ...F && { onEventDrop: F }, children: /* @__PURE__ */ e(
2448
+ It,
2429
2449
  {
2430
2450
  initialEvents: t,
2431
2451
  initialUsers: n,
2432
- initialScheduleTypes: s,
2433
- initialView: o,
2434
- ...i && { initialDate: i },
2435
- ...a && { initialSelectedUserId: a },
2436
- ...f && { initialScheduleTypeIds: f },
2437
- ...m && { initialParticipantIds: m },
2438
- ...c && { initialWorkingHoursView: c },
2439
- ...v && { initialSearchQuery: v },
2440
- ...y && { preferencesConfig: y },
2441
- ...T && { onDateChange: T },
2442
- ...C && { onViewChange: C },
2443
- ...N && { initialFocusEventId: N },
2452
+ initialScheduleTypes: o,
2453
+ initialView: a,
2454
+ ...l && { initialDate: l },
2455
+ ...x && { initialSelectedUserId: x },
2456
+ ...h && { initialScheduleTypeIds: h },
2457
+ ...c && { initialParticipantIds: c },
2458
+ ...w && { initialWorkingHoursView: w },
2459
+ ...P && { initialSearchQuery: P },
2460
+ ...b && { preferencesConfig: b },
2461
+ ...H && { onDateChange: H },
2462
+ ...k && { onViewChange: k },
2463
+ ...f && { initialFocusEventId: f },
2444
2464
  children: /* @__PURE__ */ e(
2445
- Mn,
2465
+ En,
2446
2466
  {
2447
- ...b && { onEventClick: b },
2448
- ...A && { onSlotClick: A },
2449
- ...$ && { onSlotSelect: $ },
2450
- ...P && { onAddEvent: P },
2451
- ...L && { renderPopover: L },
2452
- className: j,
2453
- showHeader: W,
2454
- minSelectionMinutes: _,
2467
+ ...y && { onEventClick: y },
2468
+ ...B && { onSlotClick: B },
2469
+ ...A && { onSlotSelect: A },
2470
+ ...W && { onAddEvent: W },
2471
+ ...s && { alwaysShowResources: s },
2472
+ ...z && { renderPopover: z },
2473
+ className: $,
2474
+ showHeader: R,
2475
+ minSelectionMinutes: Y,
2455
2476
  ...M && { showMoreMode: M },
2456
- showMoreEventsInPopover: G,
2457
- isLoading: H,
2458
- ...V && { slots: V },
2459
- ...X && { classNames: X },
2460
- settingsContent: Q,
2461
- filterContent: B,
2462
- headerActions: d,
2463
- calendarRef: R,
2464
- ...h && { headerConfig: h },
2477
+ showMoreEventsInPopover: V,
2478
+ isLoading: S,
2479
+ ...U && { slots: U },
2480
+ ...G && { classNames: G },
2481
+ settingsContent: X,
2482
+ filterContent: m,
2483
+ headerActions: p,
2484
+ calendarRef: te,
2485
+ ...E && { headerConfig: E },
2465
2486
  ...D && { eventDetailMode: D },
2466
- ...w && { renderEventDetail: w }
2487
+ ...T && { renderEventDetail: T }
2467
2488
  }
2468
2489
  )
2469
2490
  }
2470
2491
  ) });
2471
2492
  }
2472
- const Cr = Ae(Sn), ve = Ae(
2493
+ const Dr = Pe(Ln), ve = Pe(
2473
2494
  ({ className: t, children: n, ...s }, o) => /* @__PURE__ */ e(
2474
2495
  "select",
2475
2496
  {
2476
2497
  ref: o,
2477
- className: p(
2498
+ className: g(
2478
2499
  "flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm",
2479
2500
  "ring-offset-background",
2480
2501
  "focus:outline-none focus:ring-1 focus:ring-ring",
@@ -2488,11 +2509,11 @@ const Cr = Ae(Sn), ve = Ae(
2488
2509
  )
2489
2510
  );
2490
2511
  ve.displayName = "Select";
2491
- const me = Ae(({ className: t, ...n }, s) => /* @__PURE__ */ e(
2512
+ const me = Pe(({ className: t, ...n }, s) => /* @__PURE__ */ e(
2492
2513
  "label",
2493
2514
  {
2494
2515
  ref: s,
2495
- className: p(
2516
+ className: g(
2496
2517
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
2497
2518
  t
2498
2519
  ),
@@ -2500,7 +2521,7 @@ const me = Ae(({ className: t, ...n }, s) => /* @__PURE__ */ e(
2500
2521
  }
2501
2522
  ));
2502
2523
  me.displayName = "Label";
2503
- function En({ className: t }) {
2524
+ function Sn({ className: t }) {
2504
2525
  return /* @__PURE__ */ r(
2505
2526
  "svg",
2506
2527
  {
@@ -2522,7 +2543,7 @@ function En({ className: t }) {
2522
2543
  }
2523
2544
  );
2524
2545
  }
2525
- function Ln({ className: t }) {
2546
+ function Tn({ className: t }) {
2526
2547
  return /* @__PURE__ */ r(
2527
2548
  "svg",
2528
2549
  {
@@ -2543,50 +2564,50 @@ function Ln({ className: t }) {
2543
2564
  }
2544
2565
  );
2545
2566
  }
2546
- const Tn = [
2567
+ const Hn = [
2547
2568
  { value: 15, label: "15 minutes" },
2548
2569
  { value: 30, label: "30 minutes" },
2549
2570
  { value: 60, label: "1 hour" }
2550
2571
  ];
2551
- function Dr({
2572
+ function Mr({
2552
2573
  value: t,
2553
2574
  onChange: n,
2554
2575
  isLocked: s = !1,
2555
2576
  className: o,
2556
- labels: i = {}
2577
+ labels: a = {}
2557
2578
  }) {
2558
- const a = {
2579
+ const l = {
2559
2580
  title: "Slot duration",
2560
2581
  lockedMessage: "This setting is locked by the administrator",
2561
2582
  infoMessage: "Set the time slot duration for day and week calendar views.",
2562
- ...i
2563
- }, f = (m) => {
2564
- s || n(Number(m.target.value));
2583
+ ...a
2584
+ }, x = (h) => {
2585
+ s || n(Number(h.target.value));
2565
2586
  };
2566
- return /* @__PURE__ */ r("div", { className: p("flex flex-col gap-3", o), children: [
2587
+ return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-3", o), children: [
2567
2588
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
2568
- /* @__PURE__ */ e(me, { className: "text-sm font-semibold", children: a.title }),
2589
+ /* @__PURE__ */ e(me, { className: "text-sm font-semibold", children: l.title }),
2569
2590
  s ? /* @__PURE__ */ e(fe, { delayDuration: 100, children: /* @__PURE__ */ r(ge, { children: [
2570
- /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(Ln, { className: "size-3 text-muted-foreground" }) }),
2571
- /* @__PURE__ */ e(xe, { children: /* @__PURE__ */ e("p", { children: a.lockedMessage }) })
2591
+ /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(Tn, { className: "size-3 text-muted-foreground" }) }),
2592
+ /* @__PURE__ */ e(xe, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
2572
2593
  ] }) }) : /* @__PURE__ */ e(fe, { delayDuration: 100, children: /* @__PURE__ */ r(ge, { children: [
2573
- /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(En, { className: "size-3 text-muted-foreground" }) }),
2574
- /* @__PURE__ */ e(xe, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: a.infoMessage }) })
2594
+ /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(Sn, { className: "size-3 text-muted-foreground" }) }),
2595
+ /* @__PURE__ */ e(xe, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
2575
2596
  ] }) })
2576
2597
  ] }),
2577
2598
  /* @__PURE__ */ e(
2578
2599
  ve,
2579
2600
  {
2580
2601
  value: t.toString(),
2581
- onChange: f,
2602
+ onChange: x,
2582
2603
  disabled: s,
2583
2604
  className: "h-9 w-[128px] text-sm",
2584
- children: Tn.map((m) => /* @__PURE__ */ e("option", { value: m.value.toString(), children: m.label }, m.value))
2605
+ children: Hn.map((h) => /* @__PURE__ */ e("option", { value: h.value.toString(), children: h.label }, h.value))
2585
2606
  }
2586
2607
  )
2587
2608
  ] });
2588
2609
  }
2589
- function Hn({ className: t }) {
2610
+ function In({ className: t }) {
2590
2611
  return /* @__PURE__ */ r(
2591
2612
  "svg",
2592
2613
  {
@@ -2629,19 +2650,19 @@ function zn({ className: t }) {
2629
2650
  }
2630
2651
  );
2631
2652
  }
2632
- const In = [
2653
+ const jn = [
2633
2654
  { value: "dot", label: "Dot indicator" },
2634
2655
  { value: "colored", label: "Full color" },
2635
2656
  { value: "mixed", label: "Mixed" }
2636
2657
  ];
2637
- function Mr({
2658
+ function Er({
2638
2659
  value: t,
2639
2660
  onChange: n,
2640
2661
  isLocked: s = !1,
2641
2662
  className: o,
2642
- labels: i = {}
2663
+ labels: a = {}
2643
2664
  }) {
2644
- const a = {
2665
+ const l = {
2645
2666
  title: "Event display",
2646
2667
  lockedMessage: "This setting is locked by the administrator",
2647
2668
  infoMessage: "Choose how events are displayed. Dot shows a small indicator, colored fills the entire event, mixed uses both.",
@@ -2650,34 +2671,34 @@ function Mr({
2650
2671
  colored: "Full color",
2651
2672
  mixed: "Mixed"
2652
2673
  },
2653
- ...i
2654
- }, f = (c) => a.options?.[c] ?? c, m = (c) => {
2674
+ ...a
2675
+ }, x = (c) => l.options?.[c] ?? c, h = (c) => {
2655
2676
  s || n(c.target.value);
2656
2677
  };
2657
- return /* @__PURE__ */ r("div", { className: p("flex flex-col gap-3", o), children: [
2678
+ return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-3", o), children: [
2658
2679
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
2659
- /* @__PURE__ */ e(me, { className: "text-sm font-semibold", children: a.title }),
2680
+ /* @__PURE__ */ e(me, { className: "text-sm font-semibold", children: l.title }),
2660
2681
  s ? /* @__PURE__ */ e(fe, { delayDuration: 100, children: /* @__PURE__ */ r(ge, { children: [
2661
2682
  /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(zn, { className: "size-3 text-muted-foreground" }) }),
2662
- /* @__PURE__ */ e(xe, { children: /* @__PURE__ */ e("p", { children: a.lockedMessage }) })
2683
+ /* @__PURE__ */ e(xe, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
2663
2684
  ] }) }) : /* @__PURE__ */ e(fe, { delayDuration: 100, children: /* @__PURE__ */ r(ge, { children: [
2664
- /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(Hn, { className: "size-3 text-muted-foreground" }) }),
2665
- /* @__PURE__ */ e(xe, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: a.infoMessage }) })
2685
+ /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(In, { className: "size-3 text-muted-foreground" }) }),
2686
+ /* @__PURE__ */ e(xe, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
2666
2687
  ] }) })
2667
2688
  ] }),
2668
2689
  /* @__PURE__ */ e(
2669
2690
  ve,
2670
2691
  {
2671
2692
  value: t,
2672
- onChange: m,
2693
+ onChange: h,
2673
2694
  disabled: s,
2674
2695
  className: "h-9 w-[128px] text-sm",
2675
- children: In.map((c) => /* @__PURE__ */ e("option", { value: c.value, children: f(c.value) }, c.value))
2696
+ children: jn.map((c) => /* @__PURE__ */ e("option", { value: c.value, children: x(c.value) }, c.value))
2676
2697
  }
2677
2698
  )
2678
2699
  ] });
2679
2700
  }
2680
- function jn({ className: t }) {
2701
+ function An({ className: t }) {
2681
2702
  return /* @__PURE__ */ r(
2682
2703
  "svg",
2683
2704
  {
@@ -2699,7 +2720,7 @@ function jn({ className: t }) {
2699
2720
  }
2700
2721
  );
2701
2722
  }
2702
- function An({ className: t }) {
2723
+ function Pn({ className: t }) {
2703
2724
  return /* @__PURE__ */ r(
2704
2725
  "svg",
2705
2726
  {
@@ -2720,71 +2741,71 @@ function An({ className: t }) {
2720
2741
  }
2721
2742
  );
2722
2743
  }
2723
- function Pn() {
2744
+ function Wn() {
2724
2745
  return Array.from({ length: 25 }, (t, n) => ({
2725
2746
  value: n,
2726
2747
  label: `${String(n).padStart(2, "0")}:00`
2727
2748
  }));
2728
2749
  }
2729
- function Sr({
2750
+ function Lr({
2730
2751
  value: t,
2731
2752
  onChange: n,
2732
2753
  isLocked: s = !1,
2733
2754
  className: o,
2734
- labels: i = {}
2755
+ labels: a = {}
2735
2756
  }) {
2736
- const a = {
2757
+ const l = {
2737
2758
  title: "Visible hours",
2738
2759
  from: "From",
2739
2760
  to: "To",
2740
2761
  lockedMessage: "This setting is locked by the administrator",
2741
2762
  infoMessage: "Set the visible hour range for day and week views. Hours outside this range will be hidden.",
2742
- ...i
2743
- }, f = Pn(), m = (v) => {
2763
+ ...a
2764
+ }, x = Wn(), h = (w) => {
2744
2765
  if (s) return;
2745
- const y = Number(v.target.value);
2746
- y < t.endHour && n({ ...t, startHour: y });
2747
- }, c = (v) => {
2766
+ const P = Number(w.target.value);
2767
+ P < t.endHour && n({ ...t, startHour: P });
2768
+ }, c = (w) => {
2748
2769
  if (s) return;
2749
- const y = Number(v.target.value);
2750
- y > t.startHour && n({ ...t, endHour: y });
2770
+ const P = Number(w.target.value);
2771
+ P > t.startHour && n({ ...t, endHour: P });
2751
2772
  };
2752
- return /* @__PURE__ */ r("div", { className: p("flex flex-col gap-3", o), children: [
2773
+ return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-3", o), children: [
2753
2774
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
2754
- /* @__PURE__ */ e(me, { className: "text-sm font-semibold", children: a.title }),
2775
+ /* @__PURE__ */ e(me, { className: "text-sm font-semibold", children: l.title }),
2755
2776
  s ? /* @__PURE__ */ e(fe, { delayDuration: 100, children: /* @__PURE__ */ r(ge, { children: [
2756
- /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(An, { className: "size-3 text-muted-foreground" }) }),
2757
- /* @__PURE__ */ e(xe, { children: /* @__PURE__ */ e("p", { children: a.lockedMessage }) })
2777
+ /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(Pn, { className: "size-3 text-muted-foreground" }) }),
2778
+ /* @__PURE__ */ e(xe, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
2758
2779
  ] }) }) : /* @__PURE__ */ e(fe, { delayDuration: 100, children: /* @__PURE__ */ r(ge, { children: [
2759
- /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(jn, { className: "size-3 text-muted-foreground" }) }),
2760
- /* @__PURE__ */ e(xe, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: a.infoMessage }) })
2780
+ /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(An, { className: "size-3 text-muted-foreground" }) }),
2781
+ /* @__PURE__ */ e(xe, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
2761
2782
  ] }) })
2762
2783
  ] }),
2763
2784
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
2764
2785
  /* @__PURE__ */ r("div", { className: "flex flex-col gap-1", children: [
2765
- /* @__PURE__ */ e(me, { className: "text-xs text-muted-foreground", children: a.from }),
2786
+ /* @__PURE__ */ e(me, { className: "text-xs text-muted-foreground", children: l.from }),
2766
2787
  /* @__PURE__ */ e(
2767
2788
  ve,
2768
2789
  {
2769
2790
  value: t.startHour.toString(),
2770
- onChange: m,
2791
+ onChange: h,
2771
2792
  disabled: s,
2772
2793
  className: "h-9 w-[88px] text-sm",
2773
- children: f.map((v) => /* @__PURE__ */ e(
2794
+ children: x.map((w) => /* @__PURE__ */ e(
2774
2795
  "option",
2775
2796
  {
2776
- value: v.value.toString(),
2777
- disabled: v.value >= t.endHour,
2778
- children: v.label
2797
+ value: w.value.toString(),
2798
+ disabled: w.value >= t.endHour,
2799
+ children: w.label
2779
2800
  },
2780
- v.value
2801
+ w.value
2781
2802
  ))
2782
2803
  }
2783
2804
  )
2784
2805
  ] }),
2785
2806
  /* @__PURE__ */ e("span", { className: "mt-5 text-muted-foreground", children: "—" }),
2786
2807
  /* @__PURE__ */ r("div", { className: "flex flex-col gap-1", children: [
2787
- /* @__PURE__ */ e(me, { className: "text-xs text-muted-foreground", children: a.to }),
2808
+ /* @__PURE__ */ e(me, { className: "text-xs text-muted-foreground", children: l.to }),
2788
2809
  /* @__PURE__ */ e(
2789
2810
  ve,
2790
2811
  {
@@ -2792,14 +2813,14 @@ function Sr({
2792
2813
  onChange: c,
2793
2814
  disabled: s,
2794
2815
  className: "h-9 w-[88px] text-sm",
2795
- children: f.map((v) => /* @__PURE__ */ e(
2816
+ children: x.map((w) => /* @__PURE__ */ e(
2796
2817
  "option",
2797
2818
  {
2798
- value: v.value.toString(),
2799
- disabled: v.value <= t.startHour,
2800
- children: v.label
2819
+ value: w.value.toString(),
2820
+ disabled: w.value <= t.startHour,
2821
+ children: w.label
2801
2822
  },
2802
- v.value
2823
+ w.value
2803
2824
  ))
2804
2825
  }
2805
2826
  )
@@ -2807,7 +2828,7 @@ function Sr({
2807
2828
  ] })
2808
2829
  ] });
2809
2830
  }
2810
- function Wn({ className: t }) {
2831
+ function Fn({ className: t }) {
2811
2832
  return /* @__PURE__ */ r(
2812
2833
  "svg",
2813
2834
  {
@@ -2829,7 +2850,7 @@ function Wn({ className: t }) {
2829
2850
  }
2830
2851
  );
2831
2852
  }
2832
- function Fn({ className: t }) {
2853
+ function $n({ className: t }) {
2833
2854
  return /* @__PURE__ */ r(
2834
2855
  "svg",
2835
2856
  {
@@ -2850,7 +2871,7 @@ function Fn({ className: t }) {
2850
2871
  }
2851
2872
  );
2852
2873
  }
2853
- function $n({ className: t }) {
2874
+ function On({ className: t }) {
2854
2875
  return /* @__PURE__ */ e(
2855
2876
  "svg",
2856
2877
  {
@@ -2868,7 +2889,7 @@ function $n({ className: t }) {
2868
2889
  }
2869
2890
  );
2870
2891
  }
2871
- const On = [
2892
+ const _n = [
2872
2893
  "monday",
2873
2894
  "tuesday",
2874
2895
  "wednesday",
@@ -2877,13 +2898,13 @@ const On = [
2877
2898
  "saturday",
2878
2899
  "sunday"
2879
2900
  ];
2880
- function _n() {
2901
+ function Bn() {
2881
2902
  return Array.from({ length: 25 }, (t, n) => ({
2882
2903
  value: n,
2883
2904
  label: `${String(n).padStart(2, "0")}:00`
2884
2905
  }));
2885
2906
  }
2886
- const nt = {
2907
+ const rt = {
2887
2908
  sunday: "Sun",
2888
2909
  monday: "Mon",
2889
2910
  tuesday: "Tue",
@@ -2892,17 +2913,17 @@ const nt = {
2892
2913
  friday: "Fri",
2893
2914
  saturday: "Sat"
2894
2915
  };
2895
- function Bn({ dayLabel: t, config: n, onChange: s, disabled: o, hourOptions: i }) {
2896
- const a = () => {
2916
+ function Rn({ dayLabel: t, config: n, onChange: s, disabled: o, hourOptions: a }) {
2917
+ const l = () => {
2897
2918
  o || s({ ...n, enabled: !n.enabled });
2898
- }, f = (c) => {
2919
+ }, x = (c) => {
2899
2920
  if (o) return;
2900
- const v = Number(c.target.value);
2901
- v < n.to && s({ ...n, from: v });
2902
- }, m = (c) => {
2921
+ const w = Number(c.target.value);
2922
+ w < n.to && s({ ...n, from: w });
2923
+ }, h = (c) => {
2903
2924
  if (o) return;
2904
- const v = Number(c.target.value);
2905
- v > n.from && s({ ...n, to: v });
2925
+ const w = Number(c.target.value);
2926
+ w > n.from && s({ ...n, to: w });
2906
2927
  };
2907
2928
  return /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
2908
2929
  /* @__PURE__ */ e(
@@ -2912,25 +2933,25 @@ function Bn({ dayLabel: t, config: n, onChange: s, disabled: o, hourOptions: i }
2912
2933
  role: "checkbox",
2913
2934
  "aria-checked": n.enabled,
2914
2935
  "aria-label": `Enable ${t}`,
2915
- onClick: a,
2936
+ onClick: l,
2916
2937
  disabled: o,
2917
- className: p(
2938
+ className: g(
2918
2939
  "flex size-5 shrink-0 items-center justify-center rounded border transition-colors",
2919
2940
  n.enabled ? "border-primary bg-primary text-primary-foreground" : "border-input bg-background",
2920
2941
  o && "cursor-not-allowed opacity-50"
2921
2942
  ),
2922
- children: n.enabled && /* @__PURE__ */ e($n, { className: "size-3" })
2943
+ children: n.enabled && /* @__PURE__ */ e(On, { className: "size-3" })
2923
2944
  }
2924
2945
  ),
2925
- /* @__PURE__ */ e("span", { className: p("w-10 text-sm", !n.enabled && "text-muted-foreground"), children: t }),
2946
+ /* @__PURE__ */ e("span", { className: g("w-10 text-sm", !n.enabled && "text-muted-foreground"), children: t }),
2926
2947
  /* @__PURE__ */ e(
2927
2948
  ve,
2928
2949
  {
2929
2950
  value: n.from.toString(),
2930
- onChange: f,
2951
+ onChange: x,
2931
2952
  disabled: o || !n.enabled,
2932
2953
  className: "h-8 w-[76px] text-xs",
2933
- children: i.map((c) => /* @__PURE__ */ e("option", { value: c.value.toString(), disabled: c.value >= n.to, children: c.label }, c.value))
2954
+ children: a.map((c) => /* @__PURE__ */ e("option", { value: c.value.toString(), disabled: c.value >= n.to, children: c.label }, c.value))
2934
2955
  }
2935
2956
  ),
2936
2957
  /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: "—" }),
@@ -2938,55 +2959,55 @@ function Bn({ dayLabel: t, config: n, onChange: s, disabled: o, hourOptions: i }
2938
2959
  ve,
2939
2960
  {
2940
2961
  value: n.to.toString(),
2941
- onChange: m,
2962
+ onChange: h,
2942
2963
  disabled: o || !n.enabled,
2943
2964
  className: "h-8 w-[76px] text-xs",
2944
- children: i.map((c) => /* @__PURE__ */ e("option", { value: c.value.toString(), disabled: c.value <= n.from, children: c.label }, c.value))
2965
+ children: a.map((c) => /* @__PURE__ */ e("option", { value: c.value.toString(), disabled: c.value <= n.from, children: c.label }, c.value))
2945
2966
  }
2946
2967
  )
2947
2968
  ] });
2948
2969
  }
2949
- function Er({
2970
+ function Sr({
2950
2971
  value: t,
2951
2972
  onChange: n,
2952
2973
  isLocked: s = !1,
2953
2974
  className: o,
2954
- labels: i = {}
2975
+ labels: a = {}
2955
2976
  }) {
2956
- const a = {
2977
+ const l = {
2957
2978
  title: "Working hours",
2958
2979
  lockedMessage: "This setting is locked by the administrator",
2959
2980
  infoMessage: "Configure working hours for each day of the week. Non-working hours will be grayed out in day and week views.",
2960
- days: nt,
2961
- ...i
2962
- }, f = _n(), m = (c, v) => {
2963
- s || n({ ...t, [c]: v });
2981
+ days: rt,
2982
+ ...a
2983
+ }, x = Bn(), h = (c, w) => {
2984
+ s || n({ ...t, [c]: w });
2964
2985
  };
2965
- return /* @__PURE__ */ r("div", { className: p("flex flex-col gap-3", o), children: [
2986
+ return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-3", o), children: [
2966
2987
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
2967
- /* @__PURE__ */ e(me, { className: "text-sm font-semibold", children: a.title }),
2988
+ /* @__PURE__ */ e(me, { className: "text-sm font-semibold", children: l.title }),
2968
2989
  s ? /* @__PURE__ */ e(fe, { delayDuration: 100, children: /* @__PURE__ */ r(ge, { children: [
2969
- /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(Fn, { className: "size-3 text-muted-foreground" }) }),
2970
- /* @__PURE__ */ e(xe, { children: /* @__PURE__ */ e("p", { children: a.lockedMessage }) })
2990
+ /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e($n, { className: "size-3 text-muted-foreground" }) }),
2991
+ /* @__PURE__ */ e(xe, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
2971
2992
  ] }) }) : /* @__PURE__ */ e(fe, { delayDuration: 100, children: /* @__PURE__ */ r(ge, { children: [
2972
- /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(Wn, { className: "size-3 text-muted-foreground" }) }),
2973
- /* @__PURE__ */ e(xe, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: a.infoMessage }) })
2993
+ /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(Fn, { className: "size-3 text-muted-foreground" }) }),
2994
+ /* @__PURE__ */ e(xe, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
2974
2995
  ] }) })
2975
2996
  ] }),
2976
- /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: On.map((c) => /* @__PURE__ */ e(
2977
- Bn,
2997
+ /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: _n.map((c) => /* @__PURE__ */ e(
2998
+ Rn,
2978
2999
  {
2979
- dayLabel: a.days?.[c] ?? nt[c],
3000
+ dayLabel: l.days?.[c] ?? rt[c],
2980
3001
  config: t[c],
2981
- onChange: (v) => m(c, v),
3002
+ onChange: (w) => h(c, w),
2982
3003
  disabled: s,
2983
- hourOptions: f
3004
+ hourOptions: x
2984
3005
  },
2985
3006
  c
2986
3007
  )) })
2987
3008
  ] });
2988
3009
  }
2989
- const Lr = {
3010
+ const Tr = {
2990
3011
  sunday: { enabled: !1, from: 8, to: 18 },
2991
3012
  monday: { enabled: !0, from: 8, to: 18 },
2992
3013
  tuesday: { enabled: !0, from: 8, to: 18 },
@@ -2995,7 +3016,7 @@ const Lr = {
2995
3016
  friday: { enabled: !0, from: 8, to: 18 },
2996
3017
  saturday: { enabled: !1, from: 8, to: 18 }
2997
3018
  };
2998
- function Oe({ className: t }) {
3019
+ function _e({ className: t }) {
2999
3020
  return /* @__PURE__ */ e(
3000
3021
  "svg",
3001
3022
  {
@@ -3011,7 +3032,7 @@ function Oe({ className: t }) {
3011
3032
  }
3012
3033
  );
3013
3034
  }
3014
- function Rn({ className: t }) {
3035
+ function Un({ className: t }) {
3015
3036
  return /* @__PURE__ */ r(
3016
3037
  "svg",
3017
3038
  {
@@ -3030,7 +3051,7 @@ function Rn({ className: t }) {
3030
3051
  }
3031
3052
  );
3032
3053
  }
3033
- function Un({ className: t }) {
3054
+ function Vn({ className: t }) {
3034
3055
  return /* @__PURE__ */ r(
3035
3056
  "svg",
3036
3057
  {
@@ -3049,7 +3070,7 @@ function Un({ className: t }) {
3049
3070
  }
3050
3071
  );
3051
3072
  }
3052
- function _e({ checked: t, onCheckedChange: n, className: s, children: o }) {
3073
+ function Be({ checked: t, onCheckedChange: n, className: s, children: o }) {
3053
3074
  return /* @__PURE__ */ e(
3054
3075
  "button",
3055
3076
  {
@@ -3062,12 +3083,12 @@ function _e({ checked: t, onCheckedChange: n, className: s, children: o }) {
3062
3083
  }
3063
3084
  );
3064
3085
  }
3065
- function Vn({ src: t, alt: n, fallback: s, className: o }) {
3066
- const [i, a] = ie(!1);
3067
- return !t || i ? /* @__PURE__ */ e(
3086
+ function Yn({ src: t, alt: n, fallback: s, className: o }) {
3087
+ const [a, l] = le(!1);
3088
+ return !t || a ? /* @__PURE__ */ e(
3068
3089
  "div",
3069
3090
  {
3070
- className: p(
3091
+ className: g(
3071
3092
  "flex items-center justify-center bg-zinc-200 text-zinc-600 font-medium text-sm",
3072
3093
  o
3073
3094
  ),
@@ -3078,32 +3099,32 @@ function Vn({ src: t, alt: n, fallback: s, className: o }) {
3078
3099
  {
3079
3100
  src: t,
3080
3101
  alt: n || "",
3081
- className: p("object-cover", o),
3082
- onError: () => a(!0)
3102
+ className: g("object-cover", o),
3103
+ onError: () => l(!0)
3083
3104
  }
3084
3105
  );
3085
3106
  }
3086
- function rt({ value: t, onChange: n, placeholder: s, className: o }) {
3087
- return /* @__PURE__ */ r("div", { className: p("relative", o), children: [
3088
- /* @__PURE__ */ e(Rn, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
3107
+ function ot({ value: t, onChange: n, placeholder: s, className: o }) {
3108
+ return /* @__PURE__ */ r("div", { className: g("relative", o), children: [
3109
+ /* @__PURE__ */ e(Un, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
3089
3110
  /* @__PURE__ */ e(
3090
3111
  "input",
3091
3112
  {
3092
3113
  type: "text",
3093
3114
  value: t,
3094
- onChange: (i) => n(i.target.value),
3115
+ onChange: (a) => n(a.target.value),
3095
3116
  placeholder: s,
3096
3117
  className: "h-9 w-full rounded-lg border border-border bg-white pl-9 pr-3 text-sm placeholder:text-muted-foreground focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary"
3097
3118
  }
3098
3119
  )
3099
3120
  ] });
3100
3121
  }
3101
- function ot(t, n, s, o = 0.3) {
3122
+ function st(t, n, s, o = 0.3) {
3102
3123
  if (!n.trim()) return t;
3103
- const i = n.toLowerCase();
3104
- return t.filter((a) => s(a).some((m) => m ? m.toLowerCase().includes(i) : !1));
3124
+ const a = n.toLowerCase();
3125
+ return t.filter((l) => s(l).some((h) => h ? h.toLowerCase().includes(a) : !1));
3105
3126
  }
3106
- const Yn = {
3127
+ const Kn = {
3107
3128
  title: "Filters",
3108
3129
  subtitle: "Filter calendar events",
3109
3130
  scheduleTypes: "Event Types",
@@ -3116,73 +3137,73 @@ const Yn = {
3116
3137
  noScheduleTypes: "No event types found",
3117
3138
  noParticipants: "No participants found"
3118
3139
  };
3119
- function Tr({
3140
+ function Hr({
3120
3141
  scheduleTypes: t,
3121
3142
  users: n,
3122
3143
  selectedScheduleTypeIds: s,
3123
3144
  onScheduleTypeChange: o,
3124
- selectedUserIds: i,
3125
- onUserChange: a,
3126
- onClearAll: f,
3127
- className: m,
3145
+ selectedUserIds: a,
3146
+ onUserChange: l,
3147
+ onClearAll: x,
3148
+ className: h,
3128
3149
  scheduleTypesLoading: c = !1,
3129
- usersLoading: v = !1,
3130
- labels: y,
3150
+ usersLoading: w = !1,
3151
+ labels: P,
3131
3152
  getScheduleTypeName: b
3132
3153
  }) {
3133
- const A = { ...Yn, ...y }, [$, P] = ie(""), [F, T] = ie(""), C = te(() => $.trim() ? ot(t, $, (d) => [
3134
- d.name,
3135
- b?.(d) || d.name
3136
- ]) : t, [t, $, b]), j = te(() => F.trim() ? ot(n, F, (d) => [d.name, d.email || ""]) : n, [n, F]), W = C.length > 0 && C.every((d) => s.includes(d.id)), _ = j.length > 0 && j.every((d) => i.includes(d.id)), M = s.length + i.length, G = (d, N) => {
3137
- const h = N ? [...s, d] : s.filter((D) => D !== d);
3138
- o(h);
3139
- }, H = () => {
3140
- if (W) {
3141
- const d = new Set(C.map((N) => N.id));
3142
- o(s.filter((N) => !d.has(N)));
3154
+ const y = { ...Kn, ...P }, [B, A] = le(""), [W, F] = le(""), H = ee(() => B.trim() ? st(t, B, (m) => [
3155
+ m.name,
3156
+ b?.(m) || m.name
3157
+ ]) : t, [t, B, b]), k = ee(() => W.trim() ? st(n, W, (m) => [m.name, m.email || ""]) : n, [n, W]), $ = H.length > 0 && H.every((m) => s.includes(m.id)), R = k.length > 0 && k.every((m) => a.includes(m.id)), Y = s.length + a.length, M = (m, p) => {
3158
+ const f = p ? [...s, m] : s.filter((E) => E !== m);
3159
+ o(f);
3160
+ }, V = () => {
3161
+ if ($) {
3162
+ const m = new Set(H.map((p) => p.id));
3163
+ o(s.filter((p) => !m.has(p)));
3143
3164
  } else {
3144
- const d = /* @__PURE__ */ new Set([
3165
+ const m = /* @__PURE__ */ new Set([
3145
3166
  ...s,
3146
- ...C.map((N) => N.id)
3167
+ ...H.map((p) => p.id)
3147
3168
  ]);
3148
- o(Array.from(d));
3169
+ o(Array.from(m));
3149
3170
  }
3150
- }, L = (d, N) => {
3151
- const h = N ? [...i, d] : i.filter((D) => D !== d);
3152
- a(h);
3153
- }, V = () => {
3154
- if (_) {
3155
- const d = new Set(j.map((N) => N.id));
3156
- a(i.filter((N) => !d.has(N)));
3171
+ }, S = (m, p) => {
3172
+ const f = p ? [...a, m] : a.filter((E) => E !== m);
3173
+ l(f);
3174
+ }, z = () => {
3175
+ if (R) {
3176
+ const m = new Set(k.map((p) => p.id));
3177
+ l(a.filter((p) => !m.has(p)));
3157
3178
  } else {
3158
- const d = /* @__PURE__ */ new Set([...i, ...j.map((N) => N.id)]);
3159
- a(Array.from(d));
3179
+ const m = /* @__PURE__ */ new Set([...a, ...k.map((p) => p.id)]);
3180
+ l(Array.from(m));
3160
3181
  }
3161
- }, X = () => {
3162
- o([]), a([]), f?.();
3163
- }, Q = (d) => b ? b(d) : d.name, B = (d) => d.colorHex || d.color || "#069AD7";
3182
+ }, U = () => {
3183
+ o([]), l([]), x?.();
3184
+ }, G = (m) => b ? b(m) : m.name, X = (m) => m.colorHex || m.color || "#069AD7";
3164
3185
  return /* @__PURE__ */ r(
3165
3186
  "div",
3166
3187
  {
3167
- className: p(
3188
+ className: g(
3168
3189
  "flex min-w-72 max-w-72 flex-col rounded-lg border bg-white shadow-sm",
3169
- m
3190
+ h
3170
3191
  ),
3171
3192
  children: [
3172
3193
  /* @__PURE__ */ r("header", { className: "flex items-start justify-between gap-2 px-4 pb-2 pt-4", children: [
3173
3194
  /* @__PURE__ */ r("div", { className: "flex flex-col", children: [
3174
- /* @__PURE__ */ e("h3", { className: "text-base font-semibold text-foreground", children: A.title }),
3175
- /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: A.subtitle })
3195
+ /* @__PURE__ */ e("h3", { className: "text-base font-semibold text-foreground", children: y.title }),
3196
+ /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: y.subtitle })
3176
3197
  ] }),
3177
- M > 0 && /* @__PURE__ */ r(
3198
+ Y > 0 && /* @__PURE__ */ r(
3178
3199
  "button",
3179
3200
  {
3180
3201
  type: "button",
3181
- onClick: X,
3202
+ onClick: U,
3182
3203
  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",
3183
3204
  children: [
3184
- /* @__PURE__ */ e(Un, { className: "h-3.5 w-3.5" }),
3185
- A.clearAll
3205
+ /* @__PURE__ */ e(Vn, { className: "h-3.5 w-3.5" }),
3206
+ y.clearAll
3186
3207
  ]
3187
3208
  }
3188
3209
  )
@@ -3190,29 +3211,29 @@ function Tr({
3190
3211
  /* @__PURE__ */ e("div", { className: "h-px w-full bg-border/60" }),
3191
3212
  /* @__PURE__ */ r("section", { className: "flex flex-col", children: [
3192
3213
  /* @__PURE__ */ r("div", { className: "flex items-center justify-between px-4 py-3", children: [
3193
- /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: A.scheduleTypes }),
3214
+ /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: y.scheduleTypes }),
3194
3215
  /* @__PURE__ */ e(
3195
3216
  "button",
3196
3217
  {
3197
3218
  type: "button",
3198
- onClick: H,
3219
+ onClick: V,
3199
3220
  className: "text-xs font-medium text-primary transition-colors hover:text-primary/80",
3200
- children: W ? A.unselectAll : A.selectAll
3221
+ children: $ ? y.unselectAll : y.selectAll
3201
3222
  }
3202
3223
  )
3203
3224
  ] }),
3204
3225
  t.length > 6 && /* @__PURE__ */ e("div", { className: "px-4 pb-3", children: /* @__PURE__ */ e(
3205
- rt,
3226
+ ot,
3206
3227
  {
3207
- value: $,
3208
- onChange: P,
3209
- placeholder: A.searchScheduleTypes
3228
+ value: B,
3229
+ onChange: A,
3230
+ placeholder: y.searchScheduleTypes
3210
3231
  }
3211
3232
  ) }),
3212
3233
  /* @__PURE__ */ r("div", { className: "flex max-h-[220px] flex-col gap-2 overflow-y-auto px-4 pb-2 scrollbar-thin", children: [
3213
3234
  c ? (
3214
3235
  // Loading skeletons
3215
- Array.from({ length: 4 }).map((d, N) => /* @__PURE__ */ r(
3236
+ Array.from({ length: 4 }).map((m, p) => /* @__PURE__ */ r(
3216
3237
  "div",
3217
3238
  {
3218
3239
  className: "flex animate-pulse items-center gap-2 rounded-md border border-border/60 bg-muted/40 p-2",
@@ -3221,80 +3242,80 @@ function Tr({
3221
3242
  /* @__PURE__ */ e("div", { className: "h-3 w-24 rounded bg-muted-foreground/20" })
3222
3243
  ]
3223
3244
  },
3224
- `skeleton-${N}`
3245
+ `skeleton-${p}`
3225
3246
  ))
3226
- ) : C.map((d) => {
3227
- const N = s.includes(d.id), h = B(d);
3247
+ ) : H.map((m) => {
3248
+ const p = s.includes(m.id), f = X(m);
3228
3249
  return /* @__PURE__ */ r(
3229
- _e,
3250
+ Be,
3230
3251
  {
3231
- checked: N,
3232
- onCheckedChange: (D) => G(d.id, D),
3233
- className: p(
3252
+ checked: p,
3253
+ onCheckedChange: (E) => M(m.id, E),
3254
+ className: g(
3234
3255
  "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",
3235
- N && "border-primary bg-primary/5"
3256
+ p && "border-primary bg-primary/5"
3236
3257
  ),
3237
3258
  children: [
3238
3259
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
3239
3260
  /* @__PURE__ */ e(
3240
3261
  "span",
3241
3262
  {
3242
- className: p(
3263
+ className: g(
3243
3264
  "flex h-4 w-4 items-center justify-center rounded border border-border text-xs transition-colors",
3244
- N && "border-primary bg-primary text-primary-foreground"
3265
+ p && "border-primary bg-primary text-primary-foreground"
3245
3266
  ),
3246
- children: N && /* @__PURE__ */ e(Oe, { className: "h-3 w-3" })
3267
+ children: p && /* @__PURE__ */ e(_e, { className: "h-3 w-3" })
3247
3268
  }
3248
3269
  ),
3249
- /* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children: Q(d) })
3270
+ /* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children: G(m) })
3250
3271
  ] }),
3251
3272
  /* @__PURE__ */ e(
3252
3273
  "div",
3253
3274
  {
3254
3275
  className: "h-4 w-4 rounded-full border",
3255
3276
  style: {
3256
- backgroundColor: h,
3257
- borderColor: h
3277
+ backgroundColor: f,
3278
+ borderColor: f
3258
3279
  }
3259
3280
  }
3260
3281
  )
3261
3282
  ]
3262
3283
  },
3263
- d.id
3284
+ m.id
3264
3285
  );
3265
3286
  }),
3266
- !c && C.length === 0 && /* @__PURE__ */ e("p", { className: "px-2 py-1 text-xs text-muted-foreground", children: A.noScheduleTypes })
3287
+ !c && H.length === 0 && /* @__PURE__ */ e("p", { className: "px-2 py-1 text-xs text-muted-foreground", children: y.noScheduleTypes })
3267
3288
  ] })
3268
3289
  ] }),
3269
3290
  /* @__PURE__ */ e("div", { className: "h-px w-full bg-border/60" }),
3270
3291
  /* @__PURE__ */ r("section", { className: "flex flex-col", children: [
3271
3292
  /* @__PURE__ */ r("div", { className: "flex items-center justify-between px-4 py-3", children: [
3272
- /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: A.participants }),
3293
+ /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: y.participants }),
3273
3294
  /* @__PURE__ */ e(
3274
- _e,
3295
+ Be,
3275
3296
  {
3276
- checked: _,
3277
- onCheckedChange: () => V(),
3278
- className: p(
3297
+ checked: R,
3298
+ onCheckedChange: () => z(),
3299
+ className: g(
3279
3300
  "flex h-5 w-5 items-center justify-center rounded border border-border bg-white transition-colors hover:border-primary/50",
3280
- _ && "border-primary bg-primary text-primary-foreground"
3301
+ R && "border-primary bg-primary text-primary-foreground"
3281
3302
  ),
3282
- children: _ && /* @__PURE__ */ e(Oe, { className: "h-3.5 w-3.5" })
3303
+ children: R && /* @__PURE__ */ e(_e, { className: "h-3.5 w-3.5" })
3283
3304
  }
3284
3305
  )
3285
3306
  ] }),
3286
3307
  /* @__PURE__ */ e("div", { className: "px-4 pb-3", children: /* @__PURE__ */ e(
3287
- rt,
3308
+ ot,
3288
3309
  {
3289
- value: F,
3290
- onChange: T,
3291
- placeholder: A.searchParticipants
3310
+ value: W,
3311
+ onChange: F,
3312
+ placeholder: y.searchParticipants
3292
3313
  }
3293
3314
  ) }),
3294
3315
  /* @__PURE__ */ r("div", { className: "flex max-h-[400px] flex-col gap-2 overflow-y-auto px-4 pb-4 scrollbar-thin", children: [
3295
- v ? (
3316
+ w ? (
3296
3317
  // Loading skeletons
3297
- Array.from({ length: 4 }).map((d, N) => /* @__PURE__ */ r(
3318
+ Array.from({ length: 4 }).map((m, p) => /* @__PURE__ */ r(
3298
3319
  "div",
3299
3320
  {
3300
3321
  className: "flex animate-pulse items-center gap-3 rounded-md border border-border/60 bg-muted/40 p-3",
@@ -3307,65 +3328,65 @@ function Tr({
3307
3328
  ] })
3308
3329
  ]
3309
3330
  },
3310
- `p-skeleton-${N}`
3331
+ `p-skeleton-${p}`
3311
3332
  ))
3312
- ) : j.map((d) => {
3313
- const N = i.includes(d.id);
3333
+ ) : k.map((m) => {
3334
+ const p = a.includes(m.id);
3314
3335
  return /* @__PURE__ */ r(
3315
- _e,
3336
+ Be,
3316
3337
  {
3317
- checked: N,
3318
- onCheckedChange: (h) => L(d.id, h),
3319
- className: p(
3338
+ checked: p,
3339
+ onCheckedChange: (f) => S(m.id, f),
3340
+ className: g(
3320
3341
  "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",
3321
- N && "border-primary bg-zinc-50"
3342
+ p && "border-primary bg-zinc-50"
3322
3343
  ),
3323
3344
  children: [
3324
3345
  /* @__PURE__ */ e(
3325
3346
  "span",
3326
3347
  {
3327
- className: p(
3348
+ className: g(
3328
3349
  "flex h-4 w-4 flex-shrink-0 items-center justify-center rounded border border-border transition-colors",
3329
- N && "border-primary bg-primary text-primary-foreground"
3350
+ p && "border-primary bg-primary text-primary-foreground"
3330
3351
  ),
3331
- children: N && /* @__PURE__ */ e(Oe, { className: "h-2.5 w-2.5" })
3352
+ children: p && /* @__PURE__ */ e(_e, { className: "h-2.5 w-2.5" })
3332
3353
  }
3333
3354
  ),
3334
3355
  /* @__PURE__ */ r("div", { className: "flex flex-1 items-start gap-2", children: [
3335
3356
  /* @__PURE__ */ e(
3336
- Vn,
3357
+ Yn,
3337
3358
  {
3338
- src: d.avatar ?? null,
3339
- alt: d.name,
3340
- fallback: d.name?.[0]?.toUpperCase() ?? "?",
3359
+ src: m.avatar ?? null,
3360
+ alt: m.name,
3361
+ fallback: m.name?.[0]?.toUpperCase() ?? "?",
3341
3362
  className: "h-10 w-10 rounded-lg"
3342
3363
  }
3343
3364
  ),
3344
3365
  /* @__PURE__ */ r("div", { className: "flex max-w-[140px] flex-col gap-0.5 overflow-hidden", children: [
3345
- /* @__PURE__ */ e("span", { className: "line-clamp-1 text-sm font-medium text-foreground", children: d.name }),
3366
+ /* @__PURE__ */ e("span", { className: "line-clamp-1 text-sm font-medium text-foreground", children: m.name }),
3346
3367
  /* @__PURE__ */ e(
3347
3368
  "span",
3348
3369
  {
3349
3370
  className: "truncate text-[11px] text-muted-foreground",
3350
- title: d.email,
3351
- children: d.email
3371
+ title: m.email,
3372
+ children: m.email
3352
3373
  }
3353
3374
  )
3354
3375
  ] })
3355
3376
  ] })
3356
3377
  ]
3357
3378
  },
3358
- d.id
3379
+ m.id
3359
3380
  );
3360
3381
  }),
3361
- !v && j.length === 0 && /* @__PURE__ */ e("p", { className: "px-4 text-xs text-muted-foreground", children: A.noParticipants })
3382
+ !w && k.length === 0 && /* @__PURE__ */ e("p", { className: "px-4 text-xs text-muted-foreground", children: y.noParticipants })
3362
3383
  ] })
3363
3384
  ] })
3364
3385
  ]
3365
3386
  }
3366
3387
  );
3367
3388
  }
3368
- function Kn({ className: t }) {
3389
+ function Gn({ className: t }) {
3369
3390
  return /* @__PURE__ */ r(
3370
3391
  "svg",
3371
3392
  {
@@ -3386,32 +3407,32 @@ function Kn({ className: t }) {
3386
3407
  }
3387
3408
  );
3388
3409
  }
3389
- function Hr({
3410
+ function Ir({
3390
3411
  scheduleTypes: t,
3391
3412
  value: n,
3392
3413
  onChange: s,
3393
3414
  allLabel: o = "All types",
3394
- className: i,
3395
- label: a
3415
+ className: a,
3416
+ label: l
3396
3417
  }) {
3397
- const f = (c) => {
3418
+ const x = (c) => {
3398
3419
  s(c.target.value);
3399
- }, m = t.find((c) => String(c.id) === n);
3400
- return /* @__PURE__ */ r("div", { className: p("flex flex-col gap-1", i), children: [
3401
- a && /* @__PURE__ */ e(me, { className: "text-xs text-muted-foreground", children: a }),
3420
+ }, h = t.find((c) => String(c.id) === n);
3421
+ return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-1", a), children: [
3422
+ l && /* @__PURE__ */ e(me, { className: "text-xs text-muted-foreground", children: l }),
3402
3423
  /* @__PURE__ */ r("div", { className: "relative", children: [
3403
- m ? /* @__PURE__ */ e(
3424
+ h ? /* @__PURE__ */ e(
3404
3425
  "span",
3405
3426
  {
3406
3427
  className: "pointer-events-none absolute left-2.5 top-1/2 size-3 -translate-y-1/2 rounded-full",
3407
- style: { backgroundColor: m.color }
3428
+ style: { backgroundColor: h.color }
3408
3429
  }
3409
- ) : /* @__PURE__ */ e(Kn, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
3430
+ ) : /* @__PURE__ */ e(Gn, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
3410
3431
  /* @__PURE__ */ r(
3411
3432
  ve,
3412
3433
  {
3413
3434
  value: n,
3414
- onChange: f,
3435
+ onChange: x,
3415
3436
  className: "h-9 w-full min-w-[140px] pl-8 pr-8 text-sm",
3416
3437
  children: [
3417
3438
  /* @__PURE__ */ e("option", { value: "all", children: o }),
@@ -3422,7 +3443,7 @@ function Hr({
3422
3443
  ] })
3423
3444
  ] });
3424
3445
  }
3425
- function Gn({ className: t }) {
3446
+ function Jn({ className: t }) {
3426
3447
  return /* @__PURE__ */ r(
3427
3448
  "svg",
3428
3449
  {
@@ -3450,32 +3471,32 @@ function zr({
3450
3471
  value: n,
3451
3472
  onChange: s,
3452
3473
  allLabel: o = "All users",
3453
- className: i,
3454
- label: a
3474
+ className: a,
3475
+ label: l
3455
3476
  }) {
3456
- const f = (m) => {
3457
- s(m.target.value);
3477
+ const x = (h) => {
3478
+ s(h.target.value);
3458
3479
  };
3459
- return /* @__PURE__ */ r("div", { className: p("flex flex-col gap-1", i), children: [
3460
- a && /* @__PURE__ */ e(me, { className: "text-xs text-muted-foreground", children: a }),
3480
+ return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-1", a), children: [
3481
+ l && /* @__PURE__ */ e(me, { className: "text-xs text-muted-foreground", children: l }),
3461
3482
  /* @__PURE__ */ r("div", { className: "relative", children: [
3462
- /* @__PURE__ */ e(Gn, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
3483
+ /* @__PURE__ */ e(Jn, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
3463
3484
  /* @__PURE__ */ r(
3464
3485
  ve,
3465
3486
  {
3466
3487
  value: n,
3467
- onChange: f,
3488
+ onChange: x,
3468
3489
  className: "h-9 w-full min-w-[120px] pl-8 pr-8 text-sm",
3469
3490
  children: [
3470
3491
  /* @__PURE__ */ e("option", { value: "all", children: o }),
3471
- t.map((m) => /* @__PURE__ */ e("option", { value: m.id, children: m.name }, m.id))
3492
+ t.map((h) => /* @__PURE__ */ e("option", { value: h.id, children: h.name }, h.id))
3472
3493
  ]
3473
3494
  }
3474
3495
  )
3475
3496
  ] })
3476
3497
  ] });
3477
3498
  }
3478
- function Jn({ className: t }) {
3499
+ function qn({ className: t }) {
3479
3500
  return /* @__PURE__ */ r(
3480
3501
  "svg",
3481
3502
  {
@@ -3502,7 +3523,7 @@ function Jn({ className: t }) {
3502
3523
  }
3503
3524
  );
3504
3525
  }
3505
- function qn({ className: t }) {
3526
+ function Xn({ className: t }) {
3506
3527
  return /* @__PURE__ */ r(
3507
3528
  "svg",
3508
3529
  {
@@ -3525,7 +3546,7 @@ function qn({ className: t }) {
3525
3546
  }
3526
3547
  );
3527
3548
  }
3528
- function Xn({ className: t }) {
3549
+ function Qn({ className: t }) {
3529
3550
  return /* @__PURE__ */ e(
3530
3551
  "svg",
3531
3552
  {
@@ -3541,7 +3562,7 @@ function Xn({ className: t }) {
3541
3562
  }
3542
3563
  );
3543
3564
  }
3544
- function Qn({ className: t }) {
3565
+ function Zn({ className: t }) {
3545
3566
  return /* @__PURE__ */ r(
3546
3567
  "svg",
3547
3568
  {
@@ -3561,25 +3582,25 @@ function Qn({ className: t }) {
3561
3582
  }
3562
3583
  );
3563
3584
  }
3564
- function Zn(t) {
3585
+ function er(t) {
3565
3586
  const n = t.getFullYear(), s = String(t.getMonth() + 1).padStart(2, "0"), o = String(t.getDate()).padStart(2, "0");
3566
3587
  return `${n}-${s}-${o}`;
3567
3588
  }
3568
- function st(t) {
3569
- const n = t.getHours(), s = t.getMinutes(), o = n >= 12 ? "PM" : "AM", i = n % 12 || 12, a = String(s).padStart(2, "0");
3570
- return `${i}:${a} ${o}`;
3589
+ function at(t) {
3590
+ const n = t.getHours(), s = t.getMinutes(), o = n >= 12 ? "PM" : "AM", a = n % 12 || 12, l = String(s).padStart(2, "0");
3591
+ return `${a}:${l} ${o}`;
3571
3592
  }
3572
- function er(t) {
3573
- const n = st(t.startDate), s = st(t.endDate);
3593
+ function tr(t) {
3594
+ const n = at(t.startDate), s = at(t.endDate);
3574
3595
  return `${n} - ${s}`;
3575
3596
  }
3576
- function tr(t) {
3577
- const n = ht(/* @__PURE__ */ new Date(), 1);
3597
+ function nr(t) {
3598
+ const n = mt(/* @__PURE__ */ new Date(), 1);
3578
3599
  return t.getFullYear() === n.getFullYear() && t.getMonth() === n.getMonth() && t.getDate() === n.getDate();
3579
3600
  }
3580
- function nr(t) {
3581
- if (ce(t)) return "Today";
3582
- if (tr(t)) return "Tomorrow";
3601
+ function rr(t) {
3602
+ if (de(t)) return "Today";
3603
+ if (nr(t)) return "Tomorrow";
3583
3604
  const n = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], s = [
3584
3605
  "Jan",
3585
3606
  "Feb",
@@ -3593,41 +3614,41 @@ function nr(t) {
3593
3614
  "Oct",
3594
3615
  "Nov",
3595
3616
  "Dec"
3596
- ], o = n[t.getDay()], i = s[t.getMonth()], a = t.getDate();
3597
- return `${o}, ${i} ${a}`;
3617
+ ], o = n[t.getDay()], a = s[t.getMonth()], l = t.getDate();
3618
+ return `${o}, ${a} ${l}`;
3598
3619
  }
3599
- function rr(t, n) {
3620
+ function or(t, n) {
3600
3621
  const s = /* @__PURE__ */ new Map();
3601
3622
  for (const o of t) {
3602
- const i = Zn(o.startDate), a = s.get(i) ?? [];
3603
- a.push(o), s.set(i, a);
3623
+ const a = er(o.startDate), l = s.get(a) ?? [];
3624
+ l.push(o), s.set(a, l);
3604
3625
  }
3605
- return Array.from(s.entries()).map(([o, i]) => {
3606
- const a = [...i].sort(
3607
- (m, c) => m.startDate.getTime() - c.startDate.getTime()
3608
- ), f = n > 0 ? a.slice(0, n) : a;
3626
+ return Array.from(s.entries()).map(([o, a]) => {
3627
+ const l = [...a].sort(
3628
+ (h, c) => h.startDate.getTime() - c.startDate.getTime()
3629
+ ), x = n > 0 ? l.slice(0, n) : l;
3609
3630
  return {
3610
3631
  date: new Date(o),
3611
3632
  dateKey: o,
3612
- events: f,
3613
- hasMore: n > 0 && a.length > n
3633
+ events: x,
3634
+ hasMore: n > 0 && l.length > n
3614
3635
  };
3615
- }).sort((o, i) => o.date.getTime() - i.date.getTime());
3636
+ }).sort((o, a) => o.date.getTime() - a.date.getTime());
3616
3637
  }
3617
- function or(t) {
3618
- const n = Pe(/* @__PURE__ */ new Date()), s = ut(/* @__PURE__ */ new Date());
3638
+ function sr(t) {
3639
+ const n = We(/* @__PURE__ */ new Date()), s = ht(/* @__PURE__ */ new Date());
3619
3640
  return t.filter((o) => o.startDate >= n && o.startDate <= s).length;
3620
3641
  }
3621
- function Be({ className: t }) {
3622
- return /* @__PURE__ */ e("div", { className: p("animate-pulse rounded-md bg-muted", t) });
3642
+ function Re({ className: t }) {
3643
+ return /* @__PURE__ */ e("div", { className: g("animate-pulse rounded-md bg-muted", t) });
3623
3644
  }
3624
- function sr({ event: t, onClick: n }) {
3645
+ function ar({ event: t, onClick: n }) {
3625
3646
  return /* @__PURE__ */ r(
3626
3647
  "button",
3627
3648
  {
3628
3649
  type: "button",
3629
3650
  onClick: () => n?.(t),
3630
- className: p(
3651
+ className: g(
3631
3652
  "w-full text-left rounded-lg transition-colors",
3632
3653
  "hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3633
3654
  "flex items-start gap-3 p-2"
@@ -3642,58 +3663,58 @@ function sr({ event: t, onClick: n }) {
3642
3663
  ),
3643
3664
  /* @__PURE__ */ r("div", { className: "min-w-0 flex-1", children: [
3644
3665
  /* @__PURE__ */ e("p", { className: "text-sm font-medium truncate", children: t.title }),
3645
- /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground truncate", children: er(t) })
3666
+ /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground truncate", children: tr(t) })
3646
3667
  ] }),
3647
- n && /* @__PURE__ */ e(Xn, { className: "shrink-0 size-4 text-muted-foreground/50 mt-1" })
3668
+ n && /* @__PURE__ */ e(Qn, { className: "shrink-0 size-4 text-muted-foreground/50 mt-1" })
3648
3669
  ]
3649
3670
  }
3650
3671
  );
3651
3672
  }
3652
- function ar({ group: t, onEventClick: n }) {
3673
+ function ir({ group: t, onEventClick: n }) {
3653
3674
  return /* @__PURE__ */ r("div", { className: "space-y-1", children: [
3654
3675
  /* @__PURE__ */ r("div", { className: "flex items-center justify-between px-2 py-1.5", children: [
3655
- /* @__PURE__ */ e("h3", { className: p("text-xs font-semibold", ce(t.date) && "text-primary"), children: nr(t.date) }),
3676
+ /* @__PURE__ */ e("h3", { className: g("text-xs font-semibold", de(t.date) && "text-primary"), children: rr(t.date) }),
3656
3677
  t.hasMore && /* @__PURE__ */ r("span", { className: "text-[10px] text-muted-foreground", children: [
3657
3678
  "+",
3658
3679
  t.events.length,
3659
3680
  " more"
3660
3681
  ] })
3661
3682
  ] }),
3662
- /* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((s) => /* @__PURE__ */ e(sr, { event: s, onClick: n }, s.id)) })
3683
+ /* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((s) => /* @__PURE__ */ e(ar, { event: s, onClick: n }, s.id)) })
3663
3684
  ] });
3664
3685
  }
3665
- function Ir({
3686
+ function jr({
3666
3687
  events: t,
3667
3688
  isLoading: n = !1,
3668
3689
  className: s,
3669
3690
  daysAhead: o = 7,
3670
- maxEventsPerDay: i = 3,
3671
- onEventClick: a,
3672
- onNavigateToAgenda: f
3691
+ maxEventsPerDay: a = 3,
3692
+ onEventClick: l,
3693
+ onNavigateToAgenda: x
3673
3694
  }) {
3674
- const [m, c] = ie(!1), v = te(() => {
3675
- const P = Pe(/* @__PURE__ */ new Date()), F = ht(P, o);
3676
- return t.filter((T) => T.endDate >= P && T.startDate < F);
3677
- }, [t, o]), y = te(
3678
- () => rr(v, i),
3679
- [v, i]
3680
- ), b = te(() => or(t), [t]), A = (P) => {
3681
- c(!1), a?.(P);
3682
- }, $ = () => {
3683
- c(!1), f?.();
3695
+ const [h, c] = le(!1), w = ee(() => {
3696
+ const A = We(/* @__PURE__ */ new Date()), W = mt(A, o);
3697
+ return t.filter((F) => F.endDate >= A && F.startDate < W);
3698
+ }, [t, o]), P = ee(
3699
+ () => or(w, a),
3700
+ [w, a]
3701
+ ), b = ee(() => sr(t), [t]), y = (A) => {
3702
+ c(!1), l?.(A);
3703
+ }, B = () => {
3704
+ c(!1), x?.();
3684
3705
  };
3685
- return /* @__PURE__ */ r(lt, { open: m, onOpenChange: c, children: [
3706
+ return /* @__PURE__ */ r(ct, { open: h, onOpenChange: c, children: [
3686
3707
  /* @__PURE__ */ r(
3687
- ct,
3708
+ dt,
3688
3709
  {
3689
- className: p(
3710
+ className: g(
3690
3711
  "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",
3691
3712
  s
3692
3713
  ),
3693
3714
  children: [
3694
- /* @__PURE__ */ e(Jn, { className: "h-4 w-4" }),
3715
+ /* @__PURE__ */ e(qn, { className: "h-4 w-4" }),
3695
3716
  b > 0 && /* @__PURE__ */ e(
3696
- Et,
3717
+ St,
3697
3718
  {
3698
3719
  variant: "destructive",
3699
3720
  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",
@@ -3703,51 +3724,51 @@ function Ir({
3703
3724
  ]
3704
3725
  }
3705
3726
  ),
3706
- /* @__PURE__ */ r(dt, { className: "w-80 rounded-xl p-0", align: "end", side: "bottom", sideOffset: 8, children: [
3727
+ /* @__PURE__ */ r(ut, { className: "w-80 rounded-xl p-0", align: "end", side: "bottom", sideOffset: 8, children: [
3707
3728
  /* @__PURE__ */ r("div", { className: "flex items-center justify-between border-b p-4", children: [
3708
3729
  /* @__PURE__ */ r("div", { children: [
3709
3730
  /* @__PURE__ */ e("h3", { className: "text-sm font-semibold", children: "Upcoming" }),
3710
3731
  /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: b > 0 ? `${b} event${b > 1 ? "s" : ""} today` : "No events today" })
3711
3732
  ] }),
3712
- f && /* @__PURE__ */ r(
3733
+ x && /* @__PURE__ */ r(
3713
3734
  "button",
3714
3735
  {
3715
3736
  type: "button",
3716
- onClick: $,
3737
+ onClick: B,
3717
3738
  className: "text-xs text-primary hover:underline flex items-center gap-1",
3718
3739
  children: [
3719
3740
  "View all",
3720
- /* @__PURE__ */ e(Qn, { className: "size-3" })
3741
+ /* @__PURE__ */ e(Zn, { className: "size-3" })
3721
3742
  ]
3722
3743
  }
3723
3744
  )
3724
3745
  ] }),
3725
- /* @__PURE__ */ e("div", { className: "max-h-80 overflow-y-auto p-2", children: n ? /* @__PURE__ */ e("div", { className: "space-y-2 p-2", children: Array.from({ length: 3 }).map((P, F) => /* @__PURE__ */ r("div", { className: "flex space-x-3", children: [
3726
- /* @__PURE__ */ e(Be, { className: "h-2 w-2 rounded-full mt-2" }),
3746
+ /* @__PURE__ */ e("div", { className: "max-h-80 overflow-y-auto p-2", children: n ? /* @__PURE__ */ e("div", { className: "space-y-2 p-2", children: Array.from({ length: 3 }).map((A, W) => /* @__PURE__ */ r("div", { className: "flex space-x-3", children: [
3747
+ /* @__PURE__ */ e(Re, { className: "h-2 w-2 rounded-full mt-2" }),
3727
3748
  /* @__PURE__ */ r("div", { className: "flex-1 space-y-2", children: [
3728
- /* @__PURE__ */ e(Be, { className: "h-4 w-full" }),
3729
- /* @__PURE__ */ e(Be, { className: "h-3 w-3/4" })
3749
+ /* @__PURE__ */ e(Re, { className: "h-4 w-full" }),
3750
+ /* @__PURE__ */ e(Re, { className: "h-3 w-3/4" })
3730
3751
  ] })
3731
- ] }, F)) }) : y.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center py-8 text-center", children: [
3732
- /* @__PURE__ */ e(qn, { className: "mb-2 h-8 w-8 text-muted-foreground/50" }),
3752
+ ] }, W)) }) : P.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center py-8 text-center", children: [
3753
+ /* @__PURE__ */ e(Xn, { className: "mb-2 h-8 w-8 text-muted-foreground/50" }),
3733
3754
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "No upcoming events" }),
3734
3755
  /* @__PURE__ */ r("p", { className: "text-xs text-muted-foreground/70", children: [
3735
3756
  "Your schedule is clear for the next ",
3736
3757
  o,
3737
3758
  " days"
3738
3759
  ] })
3739
- ] }) : /* @__PURE__ */ e("div", { className: "space-y-3 divide-y", children: y.map((P) => /* @__PURE__ */ e(
3740
- ar,
3760
+ ] }) : /* @__PURE__ */ e("div", { className: "space-y-3 divide-y", children: P.map((A) => /* @__PURE__ */ e(
3761
+ ir,
3741
3762
  {
3742
- group: P,
3743
- onEventClick: A
3763
+ group: A,
3764
+ onEventClick: y
3744
3765
  },
3745
- P.dateKey
3766
+ A.dateKey
3746
3767
  )) }) })
3747
3768
  ] })
3748
3769
  ] });
3749
3770
  }
3750
- function ir({ className: t }) {
3771
+ function lr({ className: t }) {
3751
3772
  return /* @__PURE__ */ r(
3752
3773
  "svg",
3753
3774
  {
@@ -3772,7 +3793,7 @@ function ir({ className: t }) {
3772
3793
  }
3773
3794
  );
3774
3795
  }
3775
- function ft({ className: t }) {
3796
+ function gt({ className: t }) {
3776
3797
  return /* @__PURE__ */ e(
3777
3798
  "svg",
3778
3799
  {
@@ -3790,53 +3811,53 @@ function ft({ className: t }) {
3790
3811
  }
3791
3812
  );
3792
3813
  }
3793
- function lr(t) {
3814
+ function cr(t) {
3794
3815
  const n = /* @__PURE__ */ new Date();
3795
3816
  return n.setDate(n.getDate() + 1), t.getFullYear() === n.getFullYear() && t.getMonth() === n.getMonth() && t.getDate() === n.getDate();
3796
3817
  }
3797
- function at(t) {
3818
+ function it(t) {
3798
3819
  const n = t.getHours(), s = t.getMinutes(), o = n >= 12 ? "PM" : "AM";
3799
3820
  return `${n % 12 || 12}:${s.toString().padStart(2, "0")} ${o}`;
3800
3821
  }
3801
- function cr(t) {
3822
+ function dr(t) {
3802
3823
  return new Intl.DateTimeFormat("en-US", {
3803
3824
  weekday: "long",
3804
3825
  month: "short",
3805
3826
  day: "numeric"
3806
3827
  }).format(t);
3807
3828
  }
3808
- function dr(t) {
3809
- const n = at(t.startDate), s = at(t.endDate);
3829
+ function ur(t) {
3830
+ const n = it(t.startDate), s = it(t.endDate);
3810
3831
  return `${n} - ${s}`;
3811
3832
  }
3812
- function ur(t) {
3813
- return ce(t) ? "Today" : lr(t) ? "Tomorrow" : cr(t);
3833
+ function hr(t) {
3834
+ return de(t) ? "Today" : cr(t) ? "Tomorrow" : dr(t);
3814
3835
  }
3815
- function hr(t, n) {
3836
+ function mr(t, n) {
3816
3837
  const s = /* @__PURE__ */ new Map();
3817
3838
  for (const o of t) {
3818
- const i = Wt(o.startDate), a = s.get(i) ?? [];
3819
- a.push(o), s.set(i, a);
3839
+ const a = Ft(o.startDate), l = s.get(a) ?? [];
3840
+ l.push(o), s.set(a, l);
3820
3841
  }
3821
- return Array.from(s.entries()).map(([o, i]) => {
3822
- const a = [...i].sort(
3823
- (m, c) => m.startDate.getTime() - c.startDate.getTime()
3824
- ), f = n > 0 ? a.slice(0, n) : a;
3842
+ return Array.from(s.entries()).map(([o, a]) => {
3843
+ const l = [...a].sort(
3844
+ (h, c) => h.startDate.getTime() - c.startDate.getTime()
3845
+ ), x = n > 0 ? l.slice(0, n) : l;
3825
3846
  return {
3826
3847
  date: new Date(o),
3827
3848
  dateKey: o,
3828
- events: f,
3829
- hasMore: n > 0 && a.length > n
3849
+ events: x,
3850
+ hasMore: n > 0 && l.length > n
3830
3851
  };
3831
- }).sort((o, i) => o.date.getTime() - i.date.getTime());
3852
+ }).sort((o, a) => o.date.getTime() - a.date.getTime());
3832
3853
  }
3833
- function mr({ event: t, onClick: n, compact: s }) {
3854
+ function fr({ event: t, onClick: n, compact: s }) {
3834
3855
  return /* @__PURE__ */ r(
3835
3856
  "button",
3836
3857
  {
3837
3858
  type: "button",
3838
3859
  onClick: () => n?.(t),
3839
- className: p(
3860
+ className: g(
3840
3861
  "w-full text-left rounded-lg transition-colors",
3841
3862
  "hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3842
3863
  "flex items-start gap-3",
@@ -3846,41 +3867,41 @@ function mr({ event: t, onClick: n, compact: s }) {
3846
3867
  /* @__PURE__ */ e(
3847
3868
  "div",
3848
3869
  {
3849
- className: p("shrink-0 rounded-full mt-1", s ? "size-2" : "size-2.5"),
3870
+ className: g("shrink-0 rounded-full mt-1", s ? "size-2" : "size-2.5"),
3850
3871
  style: { backgroundColor: t.color ?? "#3b82f6" }
3851
3872
  }
3852
3873
  ),
3853
3874
  /* @__PURE__ */ r("div", { className: "min-w-0 flex-1", children: [
3854
- /* @__PURE__ */ e("p", { className: p("font-medium truncate", s ? "text-xs" : "text-sm"), children: t.title }),
3855
- /* @__PURE__ */ e("p", { className: p("text-muted-foreground truncate", s ? "text-[10px]" : "text-xs"), children: dr(t) })
3875
+ /* @__PURE__ */ e("p", { className: g("font-medium truncate", s ? "text-xs" : "text-sm"), children: t.title }),
3876
+ /* @__PURE__ */ e("p", { className: g("text-muted-foreground truncate", s ? "text-[10px]" : "text-xs"), children: ur(t) })
3856
3877
  ] }),
3857
3878
  n && /* @__PURE__ */ e(
3858
- ft,
3879
+ gt,
3859
3880
  {
3860
- className: p("shrink-0 text-muted-foreground/50", s ? "size-3" : "size-4")
3881
+ className: g("shrink-0 text-muted-foreground/50", s ? "size-3" : "size-4")
3861
3882
  }
3862
3883
  )
3863
3884
  ]
3864
3885
  }
3865
3886
  );
3866
3887
  }
3867
- function fr({
3888
+ function gr({
3868
3889
  group: t,
3869
3890
  onEventClick: n,
3870
3891
  onViewMore: s,
3871
3892
  compact: o
3872
3893
  }) {
3873
3894
  return /* @__PURE__ */ r("div", { className: "space-y-1", children: [
3874
- /* @__PURE__ */ r("div", { className: p("flex items-center justify-between px-2", o ? "py-1" : "py-1.5"), children: [
3895
+ /* @__PURE__ */ r("div", { className: g("flex items-center justify-between px-2", o ? "py-1" : "py-1.5"), children: [
3875
3896
  /* @__PURE__ */ e(
3876
3897
  "h3",
3877
3898
  {
3878
- className: p(
3899
+ className: g(
3879
3900
  "font-semibold",
3880
3901
  o ? "text-xs" : "text-sm",
3881
- ce(t.date) && "text-primary"
3902
+ de(t.date) && "text-primary"
3882
3903
  ),
3883
- children: ur(t.date)
3904
+ children: hr(t.date)
3884
3905
  }
3885
3906
  ),
3886
3907
  t.hasMore && s && /* @__PURE__ */ e(
@@ -3888,96 +3909,96 @@ function fr({
3888
3909
  {
3889
3910
  type: "button",
3890
3911
  onClick: () => s(t.date),
3891
- className: p("text-primary hover:underline", o ? "text-[10px]" : "text-xs"),
3912
+ className: g("text-primary hover:underline", o ? "text-[10px]" : "text-xs"),
3892
3913
  children: "+more"
3893
3914
  }
3894
3915
  )
3895
3916
  ] }),
3896
- /* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((i) => /* @__PURE__ */ e(mr, { event: i, onClick: n, compact: o }, i.id)) })
3917
+ /* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((a) => /* @__PURE__ */ e(fr, { event: a, onClick: n, compact: o }, a.id)) })
3897
3918
  ] });
3898
3919
  }
3899
- function jr({
3920
+ function Ar({
3900
3921
  events: t,
3901
3922
  daysAhead: n = 7,
3902
3923
  maxEventsPerDay: s = 3,
3903
3924
  onEventClick: o,
3904
- onViewAll: i,
3905
- className: a,
3906
- emptyState: f,
3907
- title: m = "Upcoming",
3925
+ onViewAll: a,
3926
+ className: l,
3927
+ emptyState: x,
3928
+ title: h = "Upcoming",
3908
3929
  showHeader: c = !0,
3909
- compact: v = !1
3930
+ compact: w = !1
3910
3931
  }) {
3911
- const y = it(), b = y?.filteredEvents, A = y?.currentDate ?? /* @__PURE__ */ new Date(), $ = t ?? b ?? [], P = te(() => {
3912
- const C = Pe(A), j = new Date(C);
3913
- return j.setDate(j.getDate() + n), $.filter((W) => W.endDate >= C && W.startDate < j);
3914
- }, [$, n, A]), F = te(
3915
- () => hr(P, s),
3916
- [P, s]
3917
- ), T = P.length;
3918
- return F.length === 0 ? /* @__PURE__ */ r("div", { className: p("rounded-lg border bg-card", a), children: [
3932
+ const P = lt(), b = P?.filteredEvents, y = P?.currentDate ?? /* @__PURE__ */ new Date(), B = t ?? b ?? [], A = ee(() => {
3933
+ const H = We(y), k = new Date(H);
3934
+ return k.setDate(k.getDate() + n), B.filter(($) => $.endDate >= H && $.startDate < k);
3935
+ }, [B, n, y]), W = ee(
3936
+ () => mr(A, s),
3937
+ [A, s]
3938
+ ), F = A.length;
3939
+ return W.length === 0 ? /* @__PURE__ */ r("div", { className: g("rounded-lg border bg-card", l), children: [
3919
3940
  c && /* @__PURE__ */ e(
3920
3941
  "div",
3921
3942
  {
3922
- className: p(
3943
+ className: g(
3923
3944
  "border-b px-4 flex items-center justify-between",
3924
- v ? "py-2" : "py-3"
3945
+ w ? "py-2" : "py-3"
3925
3946
  ),
3926
- children: /* @__PURE__ */ e("h2", { className: p("font-semibold", v ? "text-sm" : "text-base"), children: m })
3947
+ children: /* @__PURE__ */ e("h2", { className: g("font-semibold", w ? "text-sm" : "text-base"), children: h })
3927
3948
  }
3928
3949
  ),
3929
3950
  /* @__PURE__ */ e(
3930
3951
  "div",
3931
3952
  {
3932
- className: p(
3953
+ className: g(
3933
3954
  "flex flex-col items-center justify-center text-center",
3934
- v ? "py-6 px-4" : "py-10 px-6"
3955
+ w ? "py-6 px-4" : "py-10 px-6"
3935
3956
  ),
3936
- children: f ?? /* @__PURE__ */ r(be, { children: [
3957
+ children: x ?? /* @__PURE__ */ r(be, { children: [
3937
3958
  /* @__PURE__ */ e(
3938
- ir,
3959
+ lr,
3939
3960
  {
3940
- className: p("text-muted-foreground/50 mb-2", v ? "size-8" : "size-10")
3961
+ className: g("text-muted-foreground/50 mb-2", w ? "size-8" : "size-10")
3941
3962
  }
3942
3963
  ),
3943
- /* @__PURE__ */ e("p", { className: p("text-muted-foreground", v ? "text-xs" : "text-sm"), children: "No upcoming events" })
3964
+ /* @__PURE__ */ e("p", { className: g("text-muted-foreground", w ? "text-xs" : "text-sm"), children: "No upcoming events" })
3944
3965
  ] })
3945
3966
  }
3946
3967
  )
3947
- ] }) : /* @__PURE__ */ r("div", { className: p("rounded-lg border bg-card overflow-hidden", a), children: [
3968
+ ] }) : /* @__PURE__ */ r("div", { className: g("rounded-lg border bg-card overflow-hidden", l), children: [
3948
3969
  c && /* @__PURE__ */ r(
3949
3970
  "div",
3950
3971
  {
3951
- className: p(
3972
+ className: g(
3952
3973
  "border-b px-4 flex items-center justify-between",
3953
- v ? "py-2" : "py-3"
3974
+ w ? "py-2" : "py-3"
3954
3975
  ),
3955
3976
  children: [
3956
3977
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
3957
- /* @__PURE__ */ e("h2", { className: p("font-semibold", v ? "text-sm" : "text-base"), children: m }),
3978
+ /* @__PURE__ */ e("h2", { className: g("font-semibold", w ? "text-sm" : "text-base"), children: h }),
3958
3979
  /* @__PURE__ */ e(
3959
3980
  "span",
3960
3981
  {
3961
- className: p(
3982
+ className: g(
3962
3983
  "text-muted-foreground bg-muted rounded-full px-2",
3963
- v ? "text-[10px] py-0" : "text-xs py-0.5"
3984
+ w ? "text-[10px] py-0" : "text-xs py-0.5"
3964
3985
  ),
3965
- children: T
3986
+ children: F
3966
3987
  }
3967
3988
  )
3968
3989
  ] }),
3969
- i && /* @__PURE__ */ r(
3990
+ a && /* @__PURE__ */ r(
3970
3991
  "button",
3971
3992
  {
3972
3993
  type: "button",
3973
- onClick: () => i(),
3974
- className: p(
3994
+ onClick: () => a(),
3995
+ className: g(
3975
3996
  "text-primary hover:underline flex items-center gap-0.5",
3976
- v ? "text-xs" : "text-sm"
3997
+ w ? "text-xs" : "text-sm"
3977
3998
  ),
3978
3999
  children: [
3979
4000
  "View all",
3980
- /* @__PURE__ */ e(ft, { className: "size-3" })
4001
+ /* @__PURE__ */ e(gt, { className: "size-3" })
3981
4002
  ]
3982
4003
  }
3983
4004
  )
@@ -3987,39 +4008,39 @@ function jr({
3987
4008
  /* @__PURE__ */ e(
3988
4009
  "div",
3989
4010
  {
3990
- className: p(
4011
+ className: g(
3991
4012
  "divide-y overflow-auto",
3992
- v ? "p-2 max-h-[280px]" : "p-3 max-h-[400px]"
4013
+ w ? "p-2 max-h-[280px]" : "p-3 max-h-[400px]"
3993
4014
  ),
3994
- children: F.map((C) => /* @__PURE__ */ e(
3995
- fr,
4015
+ children: W.map((H) => /* @__PURE__ */ e(
4016
+ gr,
3996
4017
  {
3997
- group: C,
4018
+ group: H,
3998
4019
  onEventClick: o,
3999
- onViewMore: i ? (j) => i(j) : void 0,
4000
- compact: v
4020
+ onViewMore: a ? (k) => a(k) : void 0,
4021
+ compact: w
4001
4022
  },
4002
- C.dateKey
4023
+ H.dateKey
4003
4024
  ))
4004
4025
  }
4005
4026
  )
4006
4027
  ] });
4007
4028
  }
4008
4029
  export {
4009
- Ir as A,
4010
- Mr as B,
4011
- kr as C,
4012
- Lr as D,
4013
- Nr as E,
4014
- Cr as I,
4015
- Hr as S,
4016
- Le as T,
4030
+ jr as A,
4031
+ Er as B,
4032
+ Nr as C,
4033
+ Tr as D,
4034
+ Cr as E,
4035
+ Dr as I,
4036
+ Ir as S,
4037
+ Te as T,
4017
4038
  zr as U,
4018
- Sr as V,
4019
- Er as W,
4020
- gn as Y,
4021
- jr as a,
4022
- Tr as b,
4023
- Dr as c
4039
+ Lr as V,
4040
+ Sr as W,
4041
+ pn as Y,
4042
+ Ar as a,
4043
+ Hr as b,
4044
+ Mr as c
4024
4045
  };
4025
- //# sourceMappingURL=agenda-widget-Couk7jMB.js.map
4046
+ //# sourceMappingURL=agenda-widget-DbqQHhyM.js.map