@innosolutions/inno-calendar 1.0.62 → 1.0.64

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,307 @@ 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
+ ...a && { alwaysShowResources: a },
2271
+ selectedDate: S,
2252
2272
  visibleHours: {
2253
- from: w.startHour,
2254
- to: w.endHour
2273
+ from: T.startHour,
2274
+ to: T.endHour
2255
2275
  },
2256
- onEventClick: E,
2257
- onSlotSelect: Y,
2258
- onSlotClick: le,
2259
- renderPopover: U,
2260
- ...y && { slots: y },
2261
- ...b && { classNames: b }
2276
+ onEventClick: I,
2277
+ onSlotSelect: re,
2278
+ onSlotClick: ae,
2279
+ renderPopover: K,
2280
+ ...b && { slots: b },
2281
+ ...y && { classNames: y }
2262
2282
  }
2263
2283
  );
2264
2284
  case "timeline-3day":
2265
2285
  return /* @__PURE__ */ e(
2266
- Le,
2286
+ Te,
2267
2287
  {
2268
2288
  daysToShow: 3,
2269
- events: g,
2270
- users: Q,
2271
- selectedDate: H,
2289
+ events: d,
2290
+ users: X,
2291
+ ...a && { alwaysShowResources: a },
2292
+ selectedDate: S,
2272
2293
  visibleHours: {
2273
- from: w.startHour,
2274
- to: w.endHour
2294
+ from: T.startHour,
2295
+ to: T.endHour
2275
2296
  },
2276
- onEventClick: E,
2277
- onSlotSelect: Y,
2278
- onSlotClick: le,
2279
- renderPopover: U,
2280
- ...y && { slots: y },
2281
- ...b && { classNames: b }
2297
+ onEventClick: I,
2298
+ onSlotSelect: re,
2299
+ onSlotClick: ae,
2300
+ renderPopover: K,
2301
+ ...b && { slots: b },
2302
+ ...y && { classNames: y }
2282
2303
  }
2283
2304
  );
2284
2305
  case "timeline-week":
2285
2306
  return /* @__PURE__ */ e(
2286
- Le,
2307
+ Te,
2287
2308
  {
2288
2309
  daysToShow: 7,
2289
- events: g,
2290
- users: Q,
2291
- selectedDate: H,
2310
+ events: d,
2311
+ users: X,
2312
+ ...a && { alwaysShowResources: a },
2313
+ selectedDate: S,
2292
2314
  visibleHours: {
2293
- from: w.startHour,
2294
- to: w.endHour
2315
+ from: T.startHour,
2316
+ to: T.endHour
2295
2317
  },
2296
- onEventClick: E,
2297
- onSlotSelect: Y,
2298
- onSlotClick: le,
2299
- renderPopover: U,
2300
- ...y && { slots: y },
2301
- ...b && { classNames: b }
2318
+ onEventClick: I,
2319
+ onSlotSelect: re,
2320
+ onSlotClick: ae,
2321
+ renderPopover: K,
2322
+ ...b && { slots: b },
2323
+ ...y && { classNames: y }
2302
2324
  }
2303
2325
  );
2304
2326
  default:
2305
2327
  return /* @__PURE__ */ e(
2306
- Ve,
2328
+ Ye,
2307
2329
  {
2308
- events: g,
2309
- date: H,
2310
- badgeVariant: N,
2311
- onEventClick: E,
2312
- onDayClick: J,
2313
- ...y && { slots: y },
2314
- ...b && { classNames: b }
2330
+ events: d,
2331
+ date: S,
2332
+ badgeVariant: f,
2333
+ onEventClick: I,
2334
+ onDayClick: Q,
2335
+ ...b && { slots: b },
2336
+ ...y && { classNames: y }
2315
2337
  }
2316
2338
  );
2317
2339
  }
2318
- }, he = ae(null);
2319
- return de(() => {
2320
- K.current = he.current;
2340
+ }, ue = ie(null);
2341
+ return he(() => {
2342
+ O.current = ue.current;
2321
2343
  }), /* @__PURE__ */ e(
2322
- It,
2344
+ jt,
2323
2345
  {
2324
- mode: Z,
2325
- onSelect: Y,
2326
- minDurationMinutes: f,
2327
- slotDurationMinutes: V,
2346
+ mode: q,
2347
+ onSelect: re,
2348
+ minDurationMinutes: h,
2349
+ slotDurationMinutes: U,
2328
2350
  enabled: !!(s || n),
2329
2351
  children: /* @__PURE__ */ r(
2330
2352
  "div",
2331
2353
  {
2332
- className: p(
2354
+ className: g(
2333
2355
  "inno-calendar-root flex flex-col h-full p-4",
2334
- b?.root,
2335
- i
2356
+ y?.root,
2357
+ l
2336
2358
  ),
2337
2359
  children: [
2338
- a && /* @__PURE__ */ e(
2339
- Ct,
2360
+ x && /* @__PURE__ */ e(
2361
+ Dt,
2340
2362
  {
2341
- currentDate: H,
2363
+ currentDate: S,
2342
2364
  view: M,
2343
- events: X,
2344
- onViewChange: G,
2345
- onNavigateToday: () => L(/* @__PURE__ */ new Date(), M),
2365
+ events: G,
2366
+ onViewChange: V,
2367
+ onNavigateToday: () => z(/* @__PURE__ */ new Date(), M),
2346
2368
  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);
2369
+ const d = new Date(S);
2370
+ 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
2371
  },
2350
2372
  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);
2373
+ const d = new Date(S);
2374
+ 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
2375
  },
2354
2376
  availableViews: [
2355
2377
  "day",
@@ -2359,28 +2381,28 @@ function Mn({
2359
2381
  "agenda"
2360
2382
  ],
2361
2383
  showTimelineViews: !0,
2362
- showSettings: !!A,
2363
- ...!P && o && { onAddEvent: o },
2364
- actions: P,
2365
- settingsContent: A,
2366
- filterContent: $,
2367
- ...C && { headerConfig: C }
2384
+ showSettings: !!B,
2385
+ ...!W && o && { onAddEvent: o },
2386
+ actions: W,
2387
+ settingsContent: B,
2388
+ filterContent: A,
2389
+ ...k && { headerConfig: k }
2368
2390
  }
2369
2391
  ),
2370
2392
  /* @__PURE__ */ r("div", { className: "relative flex-1 min-h-0", children: [
2371
2393
  /* @__PURE__ */ e(
2372
2394
  "div",
2373
2395
  {
2374
- ref: he,
2375
- className: p(
2396
+ ref: ue,
2397
+ className: g(
2376
2398
  "h-full border rounded-lg bg-white overflow-x-auto",
2377
- b?.viewContainer
2399
+ y?.viewContainer
2378
2400
  ),
2379
- children: we()
2401
+ children: ye()
2380
2402
  }
2381
2403
  ),
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 })
2404
+ P && /* @__PURE__ */ e("div", { className: "inno-calendar-loading-overlay", children: /* @__PURE__ */ e("div", { className: "inno-calendar-spinner" }) }),
2405
+ /* @__PURE__ */ e(Dn, { containerRef: ue, currentDate: S })
2384
2406
  ] })
2385
2407
  ]
2386
2408
  }
@@ -2388,93 +2410,95 @@ function Mn({
2388
2410
  }
2389
2411
  );
2390
2412
  }
2391
- function Sn({
2413
+ function Ln({
2392
2414
  events: t,
2393
2415
  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,
2416
+ alwaysShowResources: s,
2417
+ scheduleTypes: o = [],
2418
+ initialView: a = "week",
2419
+ initialDate: l,
2420
+ initialSelectedUserId: x,
2421
+ initialScheduleTypeIds: h,
2422
+ initialParticipantIds: c,
2423
+ initialWorkingHoursView: w,
2424
+ initialSearchQuery: P,
2425
+ preferencesConfig: b,
2426
+ onEventClick: y,
2427
+ onSlotClick: B,
2428
+ onSlotSelect: A,
2429
+ onAddEvent: W,
2407
2430
  onEventDrop: F,
2408
- onDateChange: T,
2409
- onViewChange: C,
2410
- className: j,
2411
- showHeader: W = !0,
2412
- minSelectionMinutes: _ = 30,
2431
+ onDateChange: H,
2432
+ onViewChange: k,
2433
+ className: $,
2434
+ showHeader: R = !0,
2435
+ minSelectionMinutes: Y = 30,
2413
2436
  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,
2437
+ showMoreEventsInPopover: V = !1,
2438
+ isLoading: S = !1,
2439
+ renderPopover: z,
2440
+ slots: U,
2441
+ classNames: G,
2442
+ settingsContent: X,
2443
+ filterContent: m,
2444
+ headerActions: p,
2445
+ focusEventId: f,
2446
+ headerConfig: E,
2424
2447
  eventDetailMode: D,
2425
- renderEventDetail: w
2426
- }, R) {
2427
- return /* @__PURE__ */ e(Tt, { ...F && { onEventDrop: F }, children: /* @__PURE__ */ e(
2428
- Ht,
2448
+ renderEventDetail: T
2449
+ }, te) {
2450
+ return /* @__PURE__ */ e(Ht, { ...F && { onEventDrop: F }, children: /* @__PURE__ */ e(
2451
+ It,
2429
2452
  {
2430
2453
  initialEvents: t,
2431
2454
  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 },
2455
+ initialScheduleTypes: o,
2456
+ initialView: a,
2457
+ ...l && { initialDate: l },
2458
+ ...x && { initialSelectedUserId: x },
2459
+ ...h && { initialScheduleTypeIds: h },
2460
+ ...c && { initialParticipantIds: c },
2461
+ ...w && { initialWorkingHoursView: w },
2462
+ ...P && { initialSearchQuery: P },
2463
+ ...b && { preferencesConfig: b },
2464
+ ...H && { onDateChange: H },
2465
+ ...k && { onViewChange: k },
2466
+ ...f && { initialFocusEventId: f },
2444
2467
  children: /* @__PURE__ */ e(
2445
- Mn,
2468
+ En,
2446
2469
  {
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: _,
2470
+ ...y && { onEventClick: y },
2471
+ ...B && { onSlotClick: B },
2472
+ ...A && { onSlotSelect: A },
2473
+ ...W && { onAddEvent: W },
2474
+ ...s && { alwaysShowResources: s },
2475
+ ...z && { renderPopover: z },
2476
+ className: $,
2477
+ showHeader: R,
2478
+ minSelectionMinutes: Y,
2455
2479
  ...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 },
2480
+ showMoreEventsInPopover: V,
2481
+ isLoading: S,
2482
+ ...U && { slots: U },
2483
+ ...G && { classNames: G },
2484
+ settingsContent: X,
2485
+ filterContent: m,
2486
+ headerActions: p,
2487
+ calendarRef: te,
2488
+ ...E && { headerConfig: E },
2465
2489
  ...D && { eventDetailMode: D },
2466
- ...w && { renderEventDetail: w }
2490
+ ...T && { renderEventDetail: T }
2467
2491
  }
2468
2492
  )
2469
2493
  }
2470
2494
  ) });
2471
2495
  }
2472
- const Cr = Ae(Sn), ve = Ae(
2496
+ const Dr = Pe(Ln), ve = Pe(
2473
2497
  ({ className: t, children: n, ...s }, o) => /* @__PURE__ */ e(
2474
2498
  "select",
2475
2499
  {
2476
2500
  ref: o,
2477
- className: p(
2501
+ className: g(
2478
2502
  "flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm",
2479
2503
  "ring-offset-background",
2480
2504
  "focus:outline-none focus:ring-1 focus:ring-ring",
@@ -2488,11 +2512,11 @@ const Cr = Ae(Sn), ve = Ae(
2488
2512
  )
2489
2513
  );
2490
2514
  ve.displayName = "Select";
2491
- const me = Ae(({ className: t, ...n }, s) => /* @__PURE__ */ e(
2515
+ const me = Pe(({ className: t, ...n }, s) => /* @__PURE__ */ e(
2492
2516
  "label",
2493
2517
  {
2494
2518
  ref: s,
2495
- className: p(
2519
+ className: g(
2496
2520
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
2497
2521
  t
2498
2522
  ),
@@ -2500,7 +2524,7 @@ const me = Ae(({ className: t, ...n }, s) => /* @__PURE__ */ e(
2500
2524
  }
2501
2525
  ));
2502
2526
  me.displayName = "Label";
2503
- function En({ className: t }) {
2527
+ function Sn({ className: t }) {
2504
2528
  return /* @__PURE__ */ r(
2505
2529
  "svg",
2506
2530
  {
@@ -2522,7 +2546,7 @@ function En({ className: t }) {
2522
2546
  }
2523
2547
  );
2524
2548
  }
2525
- function Ln({ className: t }) {
2549
+ function Tn({ className: t }) {
2526
2550
  return /* @__PURE__ */ r(
2527
2551
  "svg",
2528
2552
  {
@@ -2543,50 +2567,50 @@ function Ln({ className: t }) {
2543
2567
  }
2544
2568
  );
2545
2569
  }
2546
- const Tn = [
2570
+ const Hn = [
2547
2571
  { value: 15, label: "15 minutes" },
2548
2572
  { value: 30, label: "30 minutes" },
2549
2573
  { value: 60, label: "1 hour" }
2550
2574
  ];
2551
- function Dr({
2575
+ function Mr({
2552
2576
  value: t,
2553
2577
  onChange: n,
2554
2578
  isLocked: s = !1,
2555
2579
  className: o,
2556
- labels: i = {}
2580
+ labels: a = {}
2557
2581
  }) {
2558
- const a = {
2582
+ const l = {
2559
2583
  title: "Slot duration",
2560
2584
  lockedMessage: "This setting is locked by the administrator",
2561
2585
  infoMessage: "Set the time slot duration for day and week calendar views.",
2562
- ...i
2563
- }, f = (m) => {
2564
- s || n(Number(m.target.value));
2586
+ ...a
2587
+ }, x = (h) => {
2588
+ s || n(Number(h.target.value));
2565
2589
  };
2566
- return /* @__PURE__ */ r("div", { className: p("flex flex-col gap-3", o), children: [
2590
+ return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-3", o), children: [
2567
2591
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
2568
- /* @__PURE__ */ e(me, { className: "text-sm font-semibold", children: a.title }),
2592
+ /* @__PURE__ */ e(me, { className: "text-sm font-semibold", children: l.title }),
2569
2593
  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 }) })
2594
+ /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(Tn, { className: "size-3 text-muted-foreground" }) }),
2595
+ /* @__PURE__ */ e(xe, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
2572
2596
  ] }) }) : /* @__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 }) })
2597
+ /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(Sn, { className: "size-3 text-muted-foreground" }) }),
2598
+ /* @__PURE__ */ e(xe, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
2575
2599
  ] }) })
2576
2600
  ] }),
2577
2601
  /* @__PURE__ */ e(
2578
2602
  ve,
2579
2603
  {
2580
2604
  value: t.toString(),
2581
- onChange: f,
2605
+ onChange: x,
2582
2606
  disabled: s,
2583
2607
  className: "h-9 w-[128px] text-sm",
2584
- children: Tn.map((m) => /* @__PURE__ */ e("option", { value: m.value.toString(), children: m.label }, m.value))
2608
+ children: Hn.map((h) => /* @__PURE__ */ e("option", { value: h.value.toString(), children: h.label }, h.value))
2585
2609
  }
2586
2610
  )
2587
2611
  ] });
2588
2612
  }
2589
- function Hn({ className: t }) {
2613
+ function In({ className: t }) {
2590
2614
  return /* @__PURE__ */ r(
2591
2615
  "svg",
2592
2616
  {
@@ -2629,19 +2653,19 @@ function zn({ className: t }) {
2629
2653
  }
2630
2654
  );
2631
2655
  }
2632
- const In = [
2656
+ const jn = [
2633
2657
  { value: "dot", label: "Dot indicator" },
2634
2658
  { value: "colored", label: "Full color" },
2635
2659
  { value: "mixed", label: "Mixed" }
2636
2660
  ];
2637
- function Mr({
2661
+ function Er({
2638
2662
  value: t,
2639
2663
  onChange: n,
2640
2664
  isLocked: s = !1,
2641
2665
  className: o,
2642
- labels: i = {}
2666
+ labels: a = {}
2643
2667
  }) {
2644
- const a = {
2668
+ const l = {
2645
2669
  title: "Event display",
2646
2670
  lockedMessage: "This setting is locked by the administrator",
2647
2671
  infoMessage: "Choose how events are displayed. Dot shows a small indicator, colored fills the entire event, mixed uses both.",
@@ -2650,34 +2674,34 @@ function Mr({
2650
2674
  colored: "Full color",
2651
2675
  mixed: "Mixed"
2652
2676
  },
2653
- ...i
2654
- }, f = (c) => a.options?.[c] ?? c, m = (c) => {
2677
+ ...a
2678
+ }, x = (c) => l.options?.[c] ?? c, h = (c) => {
2655
2679
  s || n(c.target.value);
2656
2680
  };
2657
- return /* @__PURE__ */ r("div", { className: p("flex flex-col gap-3", o), children: [
2681
+ return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-3", o), children: [
2658
2682
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
2659
- /* @__PURE__ */ e(me, { className: "text-sm font-semibold", children: a.title }),
2683
+ /* @__PURE__ */ e(me, { className: "text-sm font-semibold", children: l.title }),
2660
2684
  s ? /* @__PURE__ */ e(fe, { delayDuration: 100, children: /* @__PURE__ */ r(ge, { children: [
2661
2685
  /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(zn, { className: "size-3 text-muted-foreground" }) }),
2662
- /* @__PURE__ */ e(xe, { children: /* @__PURE__ */ e("p", { children: a.lockedMessage }) })
2686
+ /* @__PURE__ */ e(xe, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
2663
2687
  ] }) }) : /* @__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 }) })
2688
+ /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(In, { className: "size-3 text-muted-foreground" }) }),
2689
+ /* @__PURE__ */ e(xe, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
2666
2690
  ] }) })
2667
2691
  ] }),
2668
2692
  /* @__PURE__ */ e(
2669
2693
  ve,
2670
2694
  {
2671
2695
  value: t,
2672
- onChange: m,
2696
+ onChange: h,
2673
2697
  disabled: s,
2674
2698
  className: "h-9 w-[128px] text-sm",
2675
- children: In.map((c) => /* @__PURE__ */ e("option", { value: c.value, children: f(c.value) }, c.value))
2699
+ children: jn.map((c) => /* @__PURE__ */ e("option", { value: c.value, children: x(c.value) }, c.value))
2676
2700
  }
2677
2701
  )
2678
2702
  ] });
2679
2703
  }
2680
- function jn({ className: t }) {
2704
+ function An({ className: t }) {
2681
2705
  return /* @__PURE__ */ r(
2682
2706
  "svg",
2683
2707
  {
@@ -2699,7 +2723,7 @@ function jn({ className: t }) {
2699
2723
  }
2700
2724
  );
2701
2725
  }
2702
- function An({ className: t }) {
2726
+ function Pn({ className: t }) {
2703
2727
  return /* @__PURE__ */ r(
2704
2728
  "svg",
2705
2729
  {
@@ -2720,71 +2744,71 @@ function An({ className: t }) {
2720
2744
  }
2721
2745
  );
2722
2746
  }
2723
- function Pn() {
2747
+ function Wn() {
2724
2748
  return Array.from({ length: 25 }, (t, n) => ({
2725
2749
  value: n,
2726
2750
  label: `${String(n).padStart(2, "0")}:00`
2727
2751
  }));
2728
2752
  }
2729
- function Sr({
2753
+ function Lr({
2730
2754
  value: t,
2731
2755
  onChange: n,
2732
2756
  isLocked: s = !1,
2733
2757
  className: o,
2734
- labels: i = {}
2758
+ labels: a = {}
2735
2759
  }) {
2736
- const a = {
2760
+ const l = {
2737
2761
  title: "Visible hours",
2738
2762
  from: "From",
2739
2763
  to: "To",
2740
2764
  lockedMessage: "This setting is locked by the administrator",
2741
2765
  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) => {
2766
+ ...a
2767
+ }, x = Wn(), h = (w) => {
2744
2768
  if (s) return;
2745
- const y = Number(v.target.value);
2746
- y < t.endHour && n({ ...t, startHour: y });
2747
- }, c = (v) => {
2769
+ const P = Number(w.target.value);
2770
+ P < t.endHour && n({ ...t, startHour: P });
2771
+ }, c = (w) => {
2748
2772
  if (s) return;
2749
- const y = Number(v.target.value);
2750
- y > t.startHour && n({ ...t, endHour: y });
2773
+ const P = Number(w.target.value);
2774
+ P > t.startHour && n({ ...t, endHour: P });
2751
2775
  };
2752
- return /* @__PURE__ */ r("div", { className: p("flex flex-col gap-3", o), children: [
2776
+ return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-3", o), children: [
2753
2777
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
2754
- /* @__PURE__ */ e(me, { className: "text-sm font-semibold", children: a.title }),
2778
+ /* @__PURE__ */ e(me, { className: "text-sm font-semibold", children: l.title }),
2755
2779
  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 }) })
2780
+ /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(Pn, { className: "size-3 text-muted-foreground" }) }),
2781
+ /* @__PURE__ */ e(xe, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
2758
2782
  ] }) }) : /* @__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 }) })
2783
+ /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(An, { className: "size-3 text-muted-foreground" }) }),
2784
+ /* @__PURE__ */ e(xe, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
2761
2785
  ] }) })
2762
2786
  ] }),
2763
2787
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
2764
2788
  /* @__PURE__ */ r("div", { className: "flex flex-col gap-1", children: [
2765
- /* @__PURE__ */ e(me, { className: "text-xs text-muted-foreground", children: a.from }),
2789
+ /* @__PURE__ */ e(me, { className: "text-xs text-muted-foreground", children: l.from }),
2766
2790
  /* @__PURE__ */ e(
2767
2791
  ve,
2768
2792
  {
2769
2793
  value: t.startHour.toString(),
2770
- onChange: m,
2794
+ onChange: h,
2771
2795
  disabled: s,
2772
2796
  className: "h-9 w-[88px] text-sm",
2773
- children: f.map((v) => /* @__PURE__ */ e(
2797
+ children: x.map((w) => /* @__PURE__ */ e(
2774
2798
  "option",
2775
2799
  {
2776
- value: v.value.toString(),
2777
- disabled: v.value >= t.endHour,
2778
- children: v.label
2800
+ value: w.value.toString(),
2801
+ disabled: w.value >= t.endHour,
2802
+ children: w.label
2779
2803
  },
2780
- v.value
2804
+ w.value
2781
2805
  ))
2782
2806
  }
2783
2807
  )
2784
2808
  ] }),
2785
2809
  /* @__PURE__ */ e("span", { className: "mt-5 text-muted-foreground", children: "—" }),
2786
2810
  /* @__PURE__ */ r("div", { className: "flex flex-col gap-1", children: [
2787
- /* @__PURE__ */ e(me, { className: "text-xs text-muted-foreground", children: a.to }),
2811
+ /* @__PURE__ */ e(me, { className: "text-xs text-muted-foreground", children: l.to }),
2788
2812
  /* @__PURE__ */ e(
2789
2813
  ve,
2790
2814
  {
@@ -2792,14 +2816,14 @@ function Sr({
2792
2816
  onChange: c,
2793
2817
  disabled: s,
2794
2818
  className: "h-9 w-[88px] text-sm",
2795
- children: f.map((v) => /* @__PURE__ */ e(
2819
+ children: x.map((w) => /* @__PURE__ */ e(
2796
2820
  "option",
2797
2821
  {
2798
- value: v.value.toString(),
2799
- disabled: v.value <= t.startHour,
2800
- children: v.label
2822
+ value: w.value.toString(),
2823
+ disabled: w.value <= t.startHour,
2824
+ children: w.label
2801
2825
  },
2802
- v.value
2826
+ w.value
2803
2827
  ))
2804
2828
  }
2805
2829
  )
@@ -2807,7 +2831,7 @@ function Sr({
2807
2831
  ] })
2808
2832
  ] });
2809
2833
  }
2810
- function Wn({ className: t }) {
2834
+ function Fn({ className: t }) {
2811
2835
  return /* @__PURE__ */ r(
2812
2836
  "svg",
2813
2837
  {
@@ -2829,7 +2853,7 @@ function Wn({ className: t }) {
2829
2853
  }
2830
2854
  );
2831
2855
  }
2832
- function Fn({ className: t }) {
2856
+ function $n({ className: t }) {
2833
2857
  return /* @__PURE__ */ r(
2834
2858
  "svg",
2835
2859
  {
@@ -2850,7 +2874,7 @@ function Fn({ className: t }) {
2850
2874
  }
2851
2875
  );
2852
2876
  }
2853
- function $n({ className: t }) {
2877
+ function On({ className: t }) {
2854
2878
  return /* @__PURE__ */ e(
2855
2879
  "svg",
2856
2880
  {
@@ -2868,7 +2892,7 @@ function $n({ className: t }) {
2868
2892
  }
2869
2893
  );
2870
2894
  }
2871
- const On = [
2895
+ const _n = [
2872
2896
  "monday",
2873
2897
  "tuesday",
2874
2898
  "wednesday",
@@ -2877,13 +2901,13 @@ const On = [
2877
2901
  "saturday",
2878
2902
  "sunday"
2879
2903
  ];
2880
- function _n() {
2904
+ function Bn() {
2881
2905
  return Array.from({ length: 25 }, (t, n) => ({
2882
2906
  value: n,
2883
2907
  label: `${String(n).padStart(2, "0")}:00`
2884
2908
  }));
2885
2909
  }
2886
- const nt = {
2910
+ const rt = {
2887
2911
  sunday: "Sun",
2888
2912
  monday: "Mon",
2889
2913
  tuesday: "Tue",
@@ -2892,17 +2916,17 @@ const nt = {
2892
2916
  friday: "Fri",
2893
2917
  saturday: "Sat"
2894
2918
  };
2895
- function Bn({ dayLabel: t, config: n, onChange: s, disabled: o, hourOptions: i }) {
2896
- const a = () => {
2919
+ function Rn({ dayLabel: t, config: n, onChange: s, disabled: o, hourOptions: a }) {
2920
+ const l = () => {
2897
2921
  o || s({ ...n, enabled: !n.enabled });
2898
- }, f = (c) => {
2922
+ }, x = (c) => {
2899
2923
  if (o) return;
2900
- const v = Number(c.target.value);
2901
- v < n.to && s({ ...n, from: v });
2902
- }, m = (c) => {
2924
+ const w = Number(c.target.value);
2925
+ w < n.to && s({ ...n, from: w });
2926
+ }, h = (c) => {
2903
2927
  if (o) return;
2904
- const v = Number(c.target.value);
2905
- v > n.from && s({ ...n, to: v });
2928
+ const w = Number(c.target.value);
2929
+ w > n.from && s({ ...n, to: w });
2906
2930
  };
2907
2931
  return /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
2908
2932
  /* @__PURE__ */ e(
@@ -2912,25 +2936,25 @@ function Bn({ dayLabel: t, config: n, onChange: s, disabled: o, hourOptions: i }
2912
2936
  role: "checkbox",
2913
2937
  "aria-checked": n.enabled,
2914
2938
  "aria-label": `Enable ${t}`,
2915
- onClick: a,
2939
+ onClick: l,
2916
2940
  disabled: o,
2917
- className: p(
2941
+ className: g(
2918
2942
  "flex size-5 shrink-0 items-center justify-center rounded border transition-colors",
2919
2943
  n.enabled ? "border-primary bg-primary text-primary-foreground" : "border-input bg-background",
2920
2944
  o && "cursor-not-allowed opacity-50"
2921
2945
  ),
2922
- children: n.enabled && /* @__PURE__ */ e($n, { className: "size-3" })
2946
+ children: n.enabled && /* @__PURE__ */ e(On, { className: "size-3" })
2923
2947
  }
2924
2948
  ),
2925
- /* @__PURE__ */ e("span", { className: p("w-10 text-sm", !n.enabled && "text-muted-foreground"), children: t }),
2949
+ /* @__PURE__ */ e("span", { className: g("w-10 text-sm", !n.enabled && "text-muted-foreground"), children: t }),
2926
2950
  /* @__PURE__ */ e(
2927
2951
  ve,
2928
2952
  {
2929
2953
  value: n.from.toString(),
2930
- onChange: f,
2954
+ onChange: x,
2931
2955
  disabled: o || !n.enabled,
2932
2956
  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))
2957
+ children: a.map((c) => /* @__PURE__ */ e("option", { value: c.value.toString(), disabled: c.value >= n.to, children: c.label }, c.value))
2934
2958
  }
2935
2959
  ),
2936
2960
  /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: "—" }),
@@ -2938,55 +2962,55 @@ function Bn({ dayLabel: t, config: n, onChange: s, disabled: o, hourOptions: i }
2938
2962
  ve,
2939
2963
  {
2940
2964
  value: n.to.toString(),
2941
- onChange: m,
2965
+ onChange: h,
2942
2966
  disabled: o || !n.enabled,
2943
2967
  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))
2968
+ children: a.map((c) => /* @__PURE__ */ e("option", { value: c.value.toString(), disabled: c.value <= n.from, children: c.label }, c.value))
2945
2969
  }
2946
2970
  )
2947
2971
  ] });
2948
2972
  }
2949
- function Er({
2973
+ function Sr({
2950
2974
  value: t,
2951
2975
  onChange: n,
2952
2976
  isLocked: s = !1,
2953
2977
  className: o,
2954
- labels: i = {}
2978
+ labels: a = {}
2955
2979
  }) {
2956
- const a = {
2980
+ const l = {
2957
2981
  title: "Working hours",
2958
2982
  lockedMessage: "This setting is locked by the administrator",
2959
2983
  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 });
2984
+ days: rt,
2985
+ ...a
2986
+ }, x = Bn(), h = (c, w) => {
2987
+ s || n({ ...t, [c]: w });
2964
2988
  };
2965
- return /* @__PURE__ */ r("div", { className: p("flex flex-col gap-3", o), children: [
2989
+ return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-3", o), children: [
2966
2990
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
2967
- /* @__PURE__ */ e(me, { className: "text-sm font-semibold", children: a.title }),
2991
+ /* @__PURE__ */ e(me, { className: "text-sm font-semibold", children: l.title }),
2968
2992
  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 }) })
2993
+ /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e($n, { className: "size-3 text-muted-foreground" }) }),
2994
+ /* @__PURE__ */ e(xe, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
2971
2995
  ] }) }) : /* @__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 }) })
2996
+ /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(Fn, { className: "size-3 text-muted-foreground" }) }),
2997
+ /* @__PURE__ */ e(xe, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
2974
2998
  ] }) })
2975
2999
  ] }),
2976
- /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: On.map((c) => /* @__PURE__ */ e(
2977
- Bn,
3000
+ /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: _n.map((c) => /* @__PURE__ */ e(
3001
+ Rn,
2978
3002
  {
2979
- dayLabel: a.days?.[c] ?? nt[c],
3003
+ dayLabel: l.days?.[c] ?? rt[c],
2980
3004
  config: t[c],
2981
- onChange: (v) => m(c, v),
3005
+ onChange: (w) => h(c, w),
2982
3006
  disabled: s,
2983
- hourOptions: f
3007
+ hourOptions: x
2984
3008
  },
2985
3009
  c
2986
3010
  )) })
2987
3011
  ] });
2988
3012
  }
2989
- const Lr = {
3013
+ const Tr = {
2990
3014
  sunday: { enabled: !1, from: 8, to: 18 },
2991
3015
  monday: { enabled: !0, from: 8, to: 18 },
2992
3016
  tuesday: { enabled: !0, from: 8, to: 18 },
@@ -2995,7 +3019,7 @@ const Lr = {
2995
3019
  friday: { enabled: !0, from: 8, to: 18 },
2996
3020
  saturday: { enabled: !1, from: 8, to: 18 }
2997
3021
  };
2998
- function Oe({ className: t }) {
3022
+ function _e({ className: t }) {
2999
3023
  return /* @__PURE__ */ e(
3000
3024
  "svg",
3001
3025
  {
@@ -3011,7 +3035,7 @@ function Oe({ className: t }) {
3011
3035
  }
3012
3036
  );
3013
3037
  }
3014
- function Rn({ className: t }) {
3038
+ function Un({ className: t }) {
3015
3039
  return /* @__PURE__ */ r(
3016
3040
  "svg",
3017
3041
  {
@@ -3030,7 +3054,7 @@ function Rn({ className: t }) {
3030
3054
  }
3031
3055
  );
3032
3056
  }
3033
- function Un({ className: t }) {
3057
+ function Vn({ className: t }) {
3034
3058
  return /* @__PURE__ */ r(
3035
3059
  "svg",
3036
3060
  {
@@ -3049,7 +3073,7 @@ function Un({ className: t }) {
3049
3073
  }
3050
3074
  );
3051
3075
  }
3052
- function _e({ checked: t, onCheckedChange: n, className: s, children: o }) {
3076
+ function Be({ checked: t, onCheckedChange: n, className: s, children: o }) {
3053
3077
  return /* @__PURE__ */ e(
3054
3078
  "button",
3055
3079
  {
@@ -3062,12 +3086,12 @@ function _e({ checked: t, onCheckedChange: n, className: s, children: o }) {
3062
3086
  }
3063
3087
  );
3064
3088
  }
3065
- function Vn({ src: t, alt: n, fallback: s, className: o }) {
3066
- const [i, a] = ie(!1);
3067
- return !t || i ? /* @__PURE__ */ e(
3089
+ function Yn({ src: t, alt: n, fallback: s, className: o }) {
3090
+ const [a, l] = le(!1);
3091
+ return !t || a ? /* @__PURE__ */ e(
3068
3092
  "div",
3069
3093
  {
3070
- className: p(
3094
+ className: g(
3071
3095
  "flex items-center justify-center bg-zinc-200 text-zinc-600 font-medium text-sm",
3072
3096
  o
3073
3097
  ),
@@ -3078,32 +3102,32 @@ function Vn({ src: t, alt: n, fallback: s, className: o }) {
3078
3102
  {
3079
3103
  src: t,
3080
3104
  alt: n || "",
3081
- className: p("object-cover", o),
3082
- onError: () => a(!0)
3105
+ className: g("object-cover", o),
3106
+ onError: () => l(!0)
3083
3107
  }
3084
3108
  );
3085
3109
  }
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" }),
3110
+ function ot({ value: t, onChange: n, placeholder: s, className: o }) {
3111
+ return /* @__PURE__ */ r("div", { className: g("relative", o), children: [
3112
+ /* @__PURE__ */ e(Un, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
3089
3113
  /* @__PURE__ */ e(
3090
3114
  "input",
3091
3115
  {
3092
3116
  type: "text",
3093
3117
  value: t,
3094
- onChange: (i) => n(i.target.value),
3118
+ onChange: (a) => n(a.target.value),
3095
3119
  placeholder: s,
3096
3120
  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
3121
  }
3098
3122
  )
3099
3123
  ] });
3100
3124
  }
3101
- function ot(t, n, s, o = 0.3) {
3125
+ function st(t, n, s, o = 0.3) {
3102
3126
  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));
3127
+ const a = n.toLowerCase();
3128
+ return t.filter((l) => s(l).some((h) => h ? h.toLowerCase().includes(a) : !1));
3105
3129
  }
3106
- const Yn = {
3130
+ const Kn = {
3107
3131
  title: "Filters",
3108
3132
  subtitle: "Filter calendar events",
3109
3133
  scheduleTypes: "Event Types",
@@ -3116,73 +3140,73 @@ const Yn = {
3116
3140
  noScheduleTypes: "No event types found",
3117
3141
  noParticipants: "No participants found"
3118
3142
  };
3119
- function Tr({
3143
+ function Hr({
3120
3144
  scheduleTypes: t,
3121
3145
  users: n,
3122
3146
  selectedScheduleTypeIds: s,
3123
3147
  onScheduleTypeChange: o,
3124
- selectedUserIds: i,
3125
- onUserChange: a,
3126
- onClearAll: f,
3127
- className: m,
3148
+ selectedUserIds: a,
3149
+ onUserChange: l,
3150
+ onClearAll: x,
3151
+ className: h,
3128
3152
  scheduleTypesLoading: c = !1,
3129
- usersLoading: v = !1,
3130
- labels: y,
3153
+ usersLoading: w = !1,
3154
+ labels: P,
3131
3155
  getScheduleTypeName: b
3132
3156
  }) {
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)));
3157
+ const y = { ...Kn, ...P }, [B, A] = le(""), [W, F] = le(""), H = ee(() => B.trim() ? st(t, B, (m) => [
3158
+ m.name,
3159
+ b?.(m) || m.name
3160
+ ]) : 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) => {
3161
+ const f = p ? [...s, m] : s.filter((E) => E !== m);
3162
+ o(f);
3163
+ }, V = () => {
3164
+ if ($) {
3165
+ const m = new Set(H.map((p) => p.id));
3166
+ o(s.filter((p) => !m.has(p)));
3143
3167
  } else {
3144
- const d = /* @__PURE__ */ new Set([
3168
+ const m = /* @__PURE__ */ new Set([
3145
3169
  ...s,
3146
- ...C.map((N) => N.id)
3170
+ ...H.map((p) => p.id)
3147
3171
  ]);
3148
- o(Array.from(d));
3172
+ o(Array.from(m));
3149
3173
  }
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)));
3174
+ }, S = (m, p) => {
3175
+ const f = p ? [...a, m] : a.filter((E) => E !== m);
3176
+ l(f);
3177
+ }, z = () => {
3178
+ if (R) {
3179
+ const m = new Set(k.map((p) => p.id));
3180
+ l(a.filter((p) => !m.has(p)));
3157
3181
  } else {
3158
- const d = /* @__PURE__ */ new Set([...i, ...j.map((N) => N.id)]);
3159
- a(Array.from(d));
3182
+ const m = /* @__PURE__ */ new Set([...a, ...k.map((p) => p.id)]);
3183
+ l(Array.from(m));
3160
3184
  }
3161
- }, X = () => {
3162
- o([]), a([]), f?.();
3163
- }, Q = (d) => b ? b(d) : d.name, B = (d) => d.colorHex || d.color || "#069AD7";
3185
+ }, U = () => {
3186
+ o([]), l([]), x?.();
3187
+ }, G = (m) => b ? b(m) : m.name, X = (m) => m.colorHex || m.color || "#069AD7";
3164
3188
  return /* @__PURE__ */ r(
3165
3189
  "div",
3166
3190
  {
3167
- className: p(
3191
+ className: g(
3168
3192
  "flex min-w-72 max-w-72 flex-col rounded-lg border bg-white shadow-sm",
3169
- m
3193
+ h
3170
3194
  ),
3171
3195
  children: [
3172
3196
  /* @__PURE__ */ r("header", { className: "flex items-start justify-between gap-2 px-4 pb-2 pt-4", children: [
3173
3197
  /* @__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 })
3198
+ /* @__PURE__ */ e("h3", { className: "text-base font-semibold text-foreground", children: y.title }),
3199
+ /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: y.subtitle })
3176
3200
  ] }),
3177
- M > 0 && /* @__PURE__ */ r(
3201
+ Y > 0 && /* @__PURE__ */ r(
3178
3202
  "button",
3179
3203
  {
3180
3204
  type: "button",
3181
- onClick: X,
3205
+ onClick: U,
3182
3206
  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
3207
  children: [
3184
- /* @__PURE__ */ e(Un, { className: "h-3.5 w-3.5" }),
3185
- A.clearAll
3208
+ /* @__PURE__ */ e(Vn, { className: "h-3.5 w-3.5" }),
3209
+ y.clearAll
3186
3210
  ]
3187
3211
  }
3188
3212
  )
@@ -3190,29 +3214,29 @@ function Tr({
3190
3214
  /* @__PURE__ */ e("div", { className: "h-px w-full bg-border/60" }),
3191
3215
  /* @__PURE__ */ r("section", { className: "flex flex-col", children: [
3192
3216
  /* @__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 }),
3217
+ /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: y.scheduleTypes }),
3194
3218
  /* @__PURE__ */ e(
3195
3219
  "button",
3196
3220
  {
3197
3221
  type: "button",
3198
- onClick: H,
3222
+ onClick: V,
3199
3223
  className: "text-xs font-medium text-primary transition-colors hover:text-primary/80",
3200
- children: W ? A.unselectAll : A.selectAll
3224
+ children: $ ? y.unselectAll : y.selectAll
3201
3225
  }
3202
3226
  )
3203
3227
  ] }),
3204
3228
  t.length > 6 && /* @__PURE__ */ e("div", { className: "px-4 pb-3", children: /* @__PURE__ */ e(
3205
- rt,
3229
+ ot,
3206
3230
  {
3207
- value: $,
3208
- onChange: P,
3209
- placeholder: A.searchScheduleTypes
3231
+ value: B,
3232
+ onChange: A,
3233
+ placeholder: y.searchScheduleTypes
3210
3234
  }
3211
3235
  ) }),
3212
3236
  /* @__PURE__ */ r("div", { className: "flex max-h-[220px] flex-col gap-2 overflow-y-auto px-4 pb-2 scrollbar-thin", children: [
3213
3237
  c ? (
3214
3238
  // Loading skeletons
3215
- Array.from({ length: 4 }).map((d, N) => /* @__PURE__ */ r(
3239
+ Array.from({ length: 4 }).map((m, p) => /* @__PURE__ */ r(
3216
3240
  "div",
3217
3241
  {
3218
3242
  className: "flex animate-pulse items-center gap-2 rounded-md border border-border/60 bg-muted/40 p-2",
@@ -3221,80 +3245,80 @@ function Tr({
3221
3245
  /* @__PURE__ */ e("div", { className: "h-3 w-24 rounded bg-muted-foreground/20" })
3222
3246
  ]
3223
3247
  },
3224
- `skeleton-${N}`
3248
+ `skeleton-${p}`
3225
3249
  ))
3226
- ) : C.map((d) => {
3227
- const N = s.includes(d.id), h = B(d);
3250
+ ) : H.map((m) => {
3251
+ const p = s.includes(m.id), f = X(m);
3228
3252
  return /* @__PURE__ */ r(
3229
- _e,
3253
+ Be,
3230
3254
  {
3231
- checked: N,
3232
- onCheckedChange: (D) => G(d.id, D),
3233
- className: p(
3255
+ checked: p,
3256
+ onCheckedChange: (E) => M(m.id, E),
3257
+ className: g(
3234
3258
  "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"
3259
+ p && "border-primary bg-primary/5"
3236
3260
  ),
3237
3261
  children: [
3238
3262
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
3239
3263
  /* @__PURE__ */ e(
3240
3264
  "span",
3241
3265
  {
3242
- className: p(
3266
+ className: g(
3243
3267
  "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"
3268
+ p && "border-primary bg-primary text-primary-foreground"
3245
3269
  ),
3246
- children: N && /* @__PURE__ */ e(Oe, { className: "h-3 w-3" })
3270
+ children: p && /* @__PURE__ */ e(_e, { className: "h-3 w-3" })
3247
3271
  }
3248
3272
  ),
3249
- /* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children: Q(d) })
3273
+ /* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children: G(m) })
3250
3274
  ] }),
3251
3275
  /* @__PURE__ */ e(
3252
3276
  "div",
3253
3277
  {
3254
3278
  className: "h-4 w-4 rounded-full border",
3255
3279
  style: {
3256
- backgroundColor: h,
3257
- borderColor: h
3280
+ backgroundColor: f,
3281
+ borderColor: f
3258
3282
  }
3259
3283
  }
3260
3284
  )
3261
3285
  ]
3262
3286
  },
3263
- d.id
3287
+ m.id
3264
3288
  );
3265
3289
  }),
3266
- !c && C.length === 0 && /* @__PURE__ */ e("p", { className: "px-2 py-1 text-xs text-muted-foreground", children: A.noScheduleTypes })
3290
+ !c && H.length === 0 && /* @__PURE__ */ e("p", { className: "px-2 py-1 text-xs text-muted-foreground", children: y.noScheduleTypes })
3267
3291
  ] })
3268
3292
  ] }),
3269
3293
  /* @__PURE__ */ e("div", { className: "h-px w-full bg-border/60" }),
3270
3294
  /* @__PURE__ */ r("section", { className: "flex flex-col", children: [
3271
3295
  /* @__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 }),
3296
+ /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: y.participants }),
3273
3297
  /* @__PURE__ */ e(
3274
- _e,
3298
+ Be,
3275
3299
  {
3276
- checked: _,
3277
- onCheckedChange: () => V(),
3278
- className: p(
3300
+ checked: R,
3301
+ onCheckedChange: () => z(),
3302
+ className: g(
3279
3303
  "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"
3304
+ R && "border-primary bg-primary text-primary-foreground"
3281
3305
  ),
3282
- children: _ && /* @__PURE__ */ e(Oe, { className: "h-3.5 w-3.5" })
3306
+ children: R && /* @__PURE__ */ e(_e, { className: "h-3.5 w-3.5" })
3283
3307
  }
3284
3308
  )
3285
3309
  ] }),
3286
3310
  /* @__PURE__ */ e("div", { className: "px-4 pb-3", children: /* @__PURE__ */ e(
3287
- rt,
3311
+ ot,
3288
3312
  {
3289
- value: F,
3290
- onChange: T,
3291
- placeholder: A.searchParticipants
3313
+ value: W,
3314
+ onChange: F,
3315
+ placeholder: y.searchParticipants
3292
3316
  }
3293
3317
  ) }),
3294
3318
  /* @__PURE__ */ r("div", { className: "flex max-h-[400px] flex-col gap-2 overflow-y-auto px-4 pb-4 scrollbar-thin", children: [
3295
- v ? (
3319
+ w ? (
3296
3320
  // Loading skeletons
3297
- Array.from({ length: 4 }).map((d, N) => /* @__PURE__ */ r(
3321
+ Array.from({ length: 4 }).map((m, p) => /* @__PURE__ */ r(
3298
3322
  "div",
3299
3323
  {
3300
3324
  className: "flex animate-pulse items-center gap-3 rounded-md border border-border/60 bg-muted/40 p-3",
@@ -3307,65 +3331,65 @@ function Tr({
3307
3331
  ] })
3308
3332
  ]
3309
3333
  },
3310
- `p-skeleton-${N}`
3334
+ `p-skeleton-${p}`
3311
3335
  ))
3312
- ) : j.map((d) => {
3313
- const N = i.includes(d.id);
3336
+ ) : k.map((m) => {
3337
+ const p = a.includes(m.id);
3314
3338
  return /* @__PURE__ */ r(
3315
- _e,
3339
+ Be,
3316
3340
  {
3317
- checked: N,
3318
- onCheckedChange: (h) => L(d.id, h),
3319
- className: p(
3341
+ checked: p,
3342
+ onCheckedChange: (f) => S(m.id, f),
3343
+ className: g(
3320
3344
  "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"
3345
+ p && "border-primary bg-zinc-50"
3322
3346
  ),
3323
3347
  children: [
3324
3348
  /* @__PURE__ */ e(
3325
3349
  "span",
3326
3350
  {
3327
- className: p(
3351
+ className: g(
3328
3352
  "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"
3353
+ p && "border-primary bg-primary text-primary-foreground"
3330
3354
  ),
3331
- children: N && /* @__PURE__ */ e(Oe, { className: "h-2.5 w-2.5" })
3355
+ children: p && /* @__PURE__ */ e(_e, { className: "h-2.5 w-2.5" })
3332
3356
  }
3333
3357
  ),
3334
3358
  /* @__PURE__ */ r("div", { className: "flex flex-1 items-start gap-2", children: [
3335
3359
  /* @__PURE__ */ e(
3336
- Vn,
3360
+ Yn,
3337
3361
  {
3338
- src: d.avatar ?? null,
3339
- alt: d.name,
3340
- fallback: d.name?.[0]?.toUpperCase() ?? "?",
3362
+ src: m.avatar ?? null,
3363
+ alt: m.name,
3364
+ fallback: m.name?.[0]?.toUpperCase() ?? "?",
3341
3365
  className: "h-10 w-10 rounded-lg"
3342
3366
  }
3343
3367
  ),
3344
3368
  /* @__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 }),
3369
+ /* @__PURE__ */ e("span", { className: "line-clamp-1 text-sm font-medium text-foreground", children: m.name }),
3346
3370
  /* @__PURE__ */ e(
3347
3371
  "span",
3348
3372
  {
3349
3373
  className: "truncate text-[11px] text-muted-foreground",
3350
- title: d.email,
3351
- children: d.email
3374
+ title: m.email,
3375
+ children: m.email
3352
3376
  }
3353
3377
  )
3354
3378
  ] })
3355
3379
  ] })
3356
3380
  ]
3357
3381
  },
3358
- d.id
3382
+ m.id
3359
3383
  );
3360
3384
  }),
3361
- !v && j.length === 0 && /* @__PURE__ */ e("p", { className: "px-4 text-xs text-muted-foreground", children: A.noParticipants })
3385
+ !w && k.length === 0 && /* @__PURE__ */ e("p", { className: "px-4 text-xs text-muted-foreground", children: y.noParticipants })
3362
3386
  ] })
3363
3387
  ] })
3364
3388
  ]
3365
3389
  }
3366
3390
  );
3367
3391
  }
3368
- function Kn({ className: t }) {
3392
+ function Gn({ className: t }) {
3369
3393
  return /* @__PURE__ */ r(
3370
3394
  "svg",
3371
3395
  {
@@ -3386,32 +3410,32 @@ function Kn({ className: t }) {
3386
3410
  }
3387
3411
  );
3388
3412
  }
3389
- function Hr({
3413
+ function Ir({
3390
3414
  scheduleTypes: t,
3391
3415
  value: n,
3392
3416
  onChange: s,
3393
3417
  allLabel: o = "All types",
3394
- className: i,
3395
- label: a
3418
+ className: a,
3419
+ label: l
3396
3420
  }) {
3397
- const f = (c) => {
3421
+ const x = (c) => {
3398
3422
  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 }),
3423
+ }, h = t.find((c) => String(c.id) === n);
3424
+ return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-1", a), children: [
3425
+ l && /* @__PURE__ */ e(me, { className: "text-xs text-muted-foreground", children: l }),
3402
3426
  /* @__PURE__ */ r("div", { className: "relative", children: [
3403
- m ? /* @__PURE__ */ e(
3427
+ h ? /* @__PURE__ */ e(
3404
3428
  "span",
3405
3429
  {
3406
3430
  className: "pointer-events-none absolute left-2.5 top-1/2 size-3 -translate-y-1/2 rounded-full",
3407
- style: { backgroundColor: m.color }
3431
+ style: { backgroundColor: h.color }
3408
3432
  }
3409
- ) : /* @__PURE__ */ e(Kn, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
3433
+ ) : /* @__PURE__ */ e(Gn, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
3410
3434
  /* @__PURE__ */ r(
3411
3435
  ve,
3412
3436
  {
3413
3437
  value: n,
3414
- onChange: f,
3438
+ onChange: x,
3415
3439
  className: "h-9 w-full min-w-[140px] pl-8 pr-8 text-sm",
3416
3440
  children: [
3417
3441
  /* @__PURE__ */ e("option", { value: "all", children: o }),
@@ -3422,7 +3446,7 @@ function Hr({
3422
3446
  ] })
3423
3447
  ] });
3424
3448
  }
3425
- function Gn({ className: t }) {
3449
+ function Jn({ className: t }) {
3426
3450
  return /* @__PURE__ */ r(
3427
3451
  "svg",
3428
3452
  {
@@ -3450,32 +3474,32 @@ function zr({
3450
3474
  value: n,
3451
3475
  onChange: s,
3452
3476
  allLabel: o = "All users",
3453
- className: i,
3454
- label: a
3477
+ className: a,
3478
+ label: l
3455
3479
  }) {
3456
- const f = (m) => {
3457
- s(m.target.value);
3480
+ const x = (h) => {
3481
+ s(h.target.value);
3458
3482
  };
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 }),
3483
+ return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-1", a), children: [
3484
+ l && /* @__PURE__ */ e(me, { className: "text-xs text-muted-foreground", children: l }),
3461
3485
  /* @__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" }),
3486
+ /* @__PURE__ */ e(Jn, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
3463
3487
  /* @__PURE__ */ r(
3464
3488
  ve,
3465
3489
  {
3466
3490
  value: n,
3467
- onChange: f,
3491
+ onChange: x,
3468
3492
  className: "h-9 w-full min-w-[120px] pl-8 pr-8 text-sm",
3469
3493
  children: [
3470
3494
  /* @__PURE__ */ e("option", { value: "all", children: o }),
3471
- t.map((m) => /* @__PURE__ */ e("option", { value: m.id, children: m.name }, m.id))
3495
+ t.map((h) => /* @__PURE__ */ e("option", { value: h.id, children: h.name }, h.id))
3472
3496
  ]
3473
3497
  }
3474
3498
  )
3475
3499
  ] })
3476
3500
  ] });
3477
3501
  }
3478
- function Jn({ className: t }) {
3502
+ function qn({ className: t }) {
3479
3503
  return /* @__PURE__ */ r(
3480
3504
  "svg",
3481
3505
  {
@@ -3502,7 +3526,7 @@ function Jn({ className: t }) {
3502
3526
  }
3503
3527
  );
3504
3528
  }
3505
- function qn({ className: t }) {
3529
+ function Xn({ className: t }) {
3506
3530
  return /* @__PURE__ */ r(
3507
3531
  "svg",
3508
3532
  {
@@ -3525,7 +3549,7 @@ function qn({ className: t }) {
3525
3549
  }
3526
3550
  );
3527
3551
  }
3528
- function Xn({ className: t }) {
3552
+ function Qn({ className: t }) {
3529
3553
  return /* @__PURE__ */ e(
3530
3554
  "svg",
3531
3555
  {
@@ -3541,7 +3565,7 @@ function Xn({ className: t }) {
3541
3565
  }
3542
3566
  );
3543
3567
  }
3544
- function Qn({ className: t }) {
3568
+ function Zn({ className: t }) {
3545
3569
  return /* @__PURE__ */ r(
3546
3570
  "svg",
3547
3571
  {
@@ -3561,25 +3585,25 @@ function Qn({ className: t }) {
3561
3585
  }
3562
3586
  );
3563
3587
  }
3564
- function Zn(t) {
3588
+ function er(t) {
3565
3589
  const n = t.getFullYear(), s = String(t.getMonth() + 1).padStart(2, "0"), o = String(t.getDate()).padStart(2, "0");
3566
3590
  return `${n}-${s}-${o}`;
3567
3591
  }
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}`;
3592
+ function at(t) {
3593
+ const n = t.getHours(), s = t.getMinutes(), o = n >= 12 ? "PM" : "AM", a = n % 12 || 12, l = String(s).padStart(2, "0");
3594
+ return `${a}:${l} ${o}`;
3571
3595
  }
3572
- function er(t) {
3573
- const n = st(t.startDate), s = st(t.endDate);
3596
+ function tr(t) {
3597
+ const n = at(t.startDate), s = at(t.endDate);
3574
3598
  return `${n} - ${s}`;
3575
3599
  }
3576
- function tr(t) {
3577
- const n = ht(/* @__PURE__ */ new Date(), 1);
3600
+ function nr(t) {
3601
+ const n = mt(/* @__PURE__ */ new Date(), 1);
3578
3602
  return t.getFullYear() === n.getFullYear() && t.getMonth() === n.getMonth() && t.getDate() === n.getDate();
3579
3603
  }
3580
- function nr(t) {
3581
- if (ce(t)) return "Today";
3582
- if (tr(t)) return "Tomorrow";
3604
+ function rr(t) {
3605
+ if (de(t)) return "Today";
3606
+ if (nr(t)) return "Tomorrow";
3583
3607
  const n = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], s = [
3584
3608
  "Jan",
3585
3609
  "Feb",
@@ -3593,41 +3617,41 @@ function nr(t) {
3593
3617
  "Oct",
3594
3618
  "Nov",
3595
3619
  "Dec"
3596
- ], o = n[t.getDay()], i = s[t.getMonth()], a = t.getDate();
3597
- return `${o}, ${i} ${a}`;
3620
+ ], o = n[t.getDay()], a = s[t.getMonth()], l = t.getDate();
3621
+ return `${o}, ${a} ${l}`;
3598
3622
  }
3599
- function rr(t, n) {
3623
+ function or(t, n) {
3600
3624
  const s = /* @__PURE__ */ new Map();
3601
3625
  for (const o of t) {
3602
- const i = Zn(o.startDate), a = s.get(i) ?? [];
3603
- a.push(o), s.set(i, a);
3626
+ const a = er(o.startDate), l = s.get(a) ?? [];
3627
+ l.push(o), s.set(a, l);
3604
3628
  }
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;
3629
+ return Array.from(s.entries()).map(([o, a]) => {
3630
+ const l = [...a].sort(
3631
+ (h, c) => h.startDate.getTime() - c.startDate.getTime()
3632
+ ), x = n > 0 ? l.slice(0, n) : l;
3609
3633
  return {
3610
3634
  date: new Date(o),
3611
3635
  dateKey: o,
3612
- events: f,
3613
- hasMore: n > 0 && a.length > n
3636
+ events: x,
3637
+ hasMore: n > 0 && l.length > n
3614
3638
  };
3615
- }).sort((o, i) => o.date.getTime() - i.date.getTime());
3639
+ }).sort((o, a) => o.date.getTime() - a.date.getTime());
3616
3640
  }
3617
- function or(t) {
3618
- const n = Pe(/* @__PURE__ */ new Date()), s = ut(/* @__PURE__ */ new Date());
3641
+ function sr(t) {
3642
+ const n = We(/* @__PURE__ */ new Date()), s = ht(/* @__PURE__ */ new Date());
3619
3643
  return t.filter((o) => o.startDate >= n && o.startDate <= s).length;
3620
3644
  }
3621
- function Be({ className: t }) {
3622
- return /* @__PURE__ */ e("div", { className: p("animate-pulse rounded-md bg-muted", t) });
3645
+ function Re({ className: t }) {
3646
+ return /* @__PURE__ */ e("div", { className: g("animate-pulse rounded-md bg-muted", t) });
3623
3647
  }
3624
- function sr({ event: t, onClick: n }) {
3648
+ function ar({ event: t, onClick: n }) {
3625
3649
  return /* @__PURE__ */ r(
3626
3650
  "button",
3627
3651
  {
3628
3652
  type: "button",
3629
3653
  onClick: () => n?.(t),
3630
- className: p(
3654
+ className: g(
3631
3655
  "w-full text-left rounded-lg transition-colors",
3632
3656
  "hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3633
3657
  "flex items-start gap-3 p-2"
@@ -3642,58 +3666,58 @@ function sr({ event: t, onClick: n }) {
3642
3666
  ),
3643
3667
  /* @__PURE__ */ r("div", { className: "min-w-0 flex-1", children: [
3644
3668
  /* @__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) })
3669
+ /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground truncate", children: tr(t) })
3646
3670
  ] }),
3647
- n && /* @__PURE__ */ e(Xn, { className: "shrink-0 size-4 text-muted-foreground/50 mt-1" })
3671
+ n && /* @__PURE__ */ e(Qn, { className: "shrink-0 size-4 text-muted-foreground/50 mt-1" })
3648
3672
  ]
3649
3673
  }
3650
3674
  );
3651
3675
  }
3652
- function ar({ group: t, onEventClick: n }) {
3676
+ function ir({ group: t, onEventClick: n }) {
3653
3677
  return /* @__PURE__ */ r("div", { className: "space-y-1", children: [
3654
3678
  /* @__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) }),
3679
+ /* @__PURE__ */ e("h3", { className: g("text-xs font-semibold", de(t.date) && "text-primary"), children: rr(t.date) }),
3656
3680
  t.hasMore && /* @__PURE__ */ r("span", { className: "text-[10px] text-muted-foreground", children: [
3657
3681
  "+",
3658
3682
  t.events.length,
3659
3683
  " more"
3660
3684
  ] })
3661
3685
  ] }),
3662
- /* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((s) => /* @__PURE__ */ e(sr, { event: s, onClick: n }, s.id)) })
3686
+ /* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((s) => /* @__PURE__ */ e(ar, { event: s, onClick: n }, s.id)) })
3663
3687
  ] });
3664
3688
  }
3665
- function Ir({
3689
+ function jr({
3666
3690
  events: t,
3667
3691
  isLoading: n = !1,
3668
3692
  className: s,
3669
3693
  daysAhead: o = 7,
3670
- maxEventsPerDay: i = 3,
3671
- onEventClick: a,
3672
- onNavigateToAgenda: f
3694
+ maxEventsPerDay: a = 3,
3695
+ onEventClick: l,
3696
+ onNavigateToAgenda: x
3673
3697
  }) {
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?.();
3698
+ const [h, c] = le(!1), w = ee(() => {
3699
+ const A = We(/* @__PURE__ */ new Date()), W = mt(A, o);
3700
+ return t.filter((F) => F.endDate >= A && F.startDate < W);
3701
+ }, [t, o]), P = ee(
3702
+ () => or(w, a),
3703
+ [w, a]
3704
+ ), b = ee(() => sr(t), [t]), y = (A) => {
3705
+ c(!1), l?.(A);
3706
+ }, B = () => {
3707
+ c(!1), x?.();
3684
3708
  };
3685
- return /* @__PURE__ */ r(lt, { open: m, onOpenChange: c, children: [
3709
+ return /* @__PURE__ */ r(ct, { open: h, onOpenChange: c, children: [
3686
3710
  /* @__PURE__ */ r(
3687
- ct,
3711
+ dt,
3688
3712
  {
3689
- className: p(
3713
+ className: g(
3690
3714
  "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
3715
  s
3692
3716
  ),
3693
3717
  children: [
3694
- /* @__PURE__ */ e(Jn, { className: "h-4 w-4" }),
3718
+ /* @__PURE__ */ e(qn, { className: "h-4 w-4" }),
3695
3719
  b > 0 && /* @__PURE__ */ e(
3696
- Et,
3720
+ St,
3697
3721
  {
3698
3722
  variant: "destructive",
3699
3723
  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 +3727,51 @@ function Ir({
3703
3727
  ]
3704
3728
  }
3705
3729
  ),
3706
- /* @__PURE__ */ r(dt, { className: "w-80 rounded-xl p-0", align: "end", side: "bottom", sideOffset: 8, children: [
3730
+ /* @__PURE__ */ r(ut, { className: "w-80 rounded-xl p-0", align: "end", side: "bottom", sideOffset: 8, children: [
3707
3731
  /* @__PURE__ */ r("div", { className: "flex items-center justify-between border-b p-4", children: [
3708
3732
  /* @__PURE__ */ r("div", { children: [
3709
3733
  /* @__PURE__ */ e("h3", { className: "text-sm font-semibold", children: "Upcoming" }),
3710
3734
  /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: b > 0 ? `${b} event${b > 1 ? "s" : ""} today` : "No events today" })
3711
3735
  ] }),
3712
- f && /* @__PURE__ */ r(
3736
+ x && /* @__PURE__ */ r(
3713
3737
  "button",
3714
3738
  {
3715
3739
  type: "button",
3716
- onClick: $,
3740
+ onClick: B,
3717
3741
  className: "text-xs text-primary hover:underline flex items-center gap-1",
3718
3742
  children: [
3719
3743
  "View all",
3720
- /* @__PURE__ */ e(Qn, { className: "size-3" })
3744
+ /* @__PURE__ */ e(Zn, { className: "size-3" })
3721
3745
  ]
3722
3746
  }
3723
3747
  )
3724
3748
  ] }),
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" }),
3749
+ /* @__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: [
3750
+ /* @__PURE__ */ e(Re, { className: "h-2 w-2 rounded-full mt-2" }),
3727
3751
  /* @__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" })
3752
+ /* @__PURE__ */ e(Re, { className: "h-4 w-full" }),
3753
+ /* @__PURE__ */ e(Re, { className: "h-3 w-3/4" })
3730
3754
  ] })
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" }),
3755
+ ] }, W)) }) : P.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center py-8 text-center", children: [
3756
+ /* @__PURE__ */ e(Xn, { className: "mb-2 h-8 w-8 text-muted-foreground/50" }),
3733
3757
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "No upcoming events" }),
3734
3758
  /* @__PURE__ */ r("p", { className: "text-xs text-muted-foreground/70", children: [
3735
3759
  "Your schedule is clear for the next ",
3736
3760
  o,
3737
3761
  " days"
3738
3762
  ] })
3739
- ] }) : /* @__PURE__ */ e("div", { className: "space-y-3 divide-y", children: y.map((P) => /* @__PURE__ */ e(
3740
- ar,
3763
+ ] }) : /* @__PURE__ */ e("div", { className: "space-y-3 divide-y", children: P.map((A) => /* @__PURE__ */ e(
3764
+ ir,
3741
3765
  {
3742
- group: P,
3743
- onEventClick: A
3766
+ group: A,
3767
+ onEventClick: y
3744
3768
  },
3745
- P.dateKey
3769
+ A.dateKey
3746
3770
  )) }) })
3747
3771
  ] })
3748
3772
  ] });
3749
3773
  }
3750
- function ir({ className: t }) {
3774
+ function lr({ className: t }) {
3751
3775
  return /* @__PURE__ */ r(
3752
3776
  "svg",
3753
3777
  {
@@ -3772,7 +3796,7 @@ function ir({ className: t }) {
3772
3796
  }
3773
3797
  );
3774
3798
  }
3775
- function ft({ className: t }) {
3799
+ function gt({ className: t }) {
3776
3800
  return /* @__PURE__ */ e(
3777
3801
  "svg",
3778
3802
  {
@@ -3790,53 +3814,53 @@ function ft({ className: t }) {
3790
3814
  }
3791
3815
  );
3792
3816
  }
3793
- function lr(t) {
3817
+ function cr(t) {
3794
3818
  const n = /* @__PURE__ */ new Date();
3795
3819
  return n.setDate(n.getDate() + 1), t.getFullYear() === n.getFullYear() && t.getMonth() === n.getMonth() && t.getDate() === n.getDate();
3796
3820
  }
3797
- function at(t) {
3821
+ function it(t) {
3798
3822
  const n = t.getHours(), s = t.getMinutes(), o = n >= 12 ? "PM" : "AM";
3799
3823
  return `${n % 12 || 12}:${s.toString().padStart(2, "0")} ${o}`;
3800
3824
  }
3801
- function cr(t) {
3825
+ function dr(t) {
3802
3826
  return new Intl.DateTimeFormat("en-US", {
3803
3827
  weekday: "long",
3804
3828
  month: "short",
3805
3829
  day: "numeric"
3806
3830
  }).format(t);
3807
3831
  }
3808
- function dr(t) {
3809
- const n = at(t.startDate), s = at(t.endDate);
3832
+ function ur(t) {
3833
+ const n = it(t.startDate), s = it(t.endDate);
3810
3834
  return `${n} - ${s}`;
3811
3835
  }
3812
- function ur(t) {
3813
- return ce(t) ? "Today" : lr(t) ? "Tomorrow" : cr(t);
3836
+ function hr(t) {
3837
+ return de(t) ? "Today" : cr(t) ? "Tomorrow" : dr(t);
3814
3838
  }
3815
- function hr(t, n) {
3839
+ function mr(t, n) {
3816
3840
  const s = /* @__PURE__ */ new Map();
3817
3841
  for (const o of t) {
3818
- const i = Wt(o.startDate), a = s.get(i) ?? [];
3819
- a.push(o), s.set(i, a);
3842
+ const a = Ft(o.startDate), l = s.get(a) ?? [];
3843
+ l.push(o), s.set(a, l);
3820
3844
  }
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;
3845
+ return Array.from(s.entries()).map(([o, a]) => {
3846
+ const l = [...a].sort(
3847
+ (h, c) => h.startDate.getTime() - c.startDate.getTime()
3848
+ ), x = n > 0 ? l.slice(0, n) : l;
3825
3849
  return {
3826
3850
  date: new Date(o),
3827
3851
  dateKey: o,
3828
- events: f,
3829
- hasMore: n > 0 && a.length > n
3852
+ events: x,
3853
+ hasMore: n > 0 && l.length > n
3830
3854
  };
3831
- }).sort((o, i) => o.date.getTime() - i.date.getTime());
3855
+ }).sort((o, a) => o.date.getTime() - a.date.getTime());
3832
3856
  }
3833
- function mr({ event: t, onClick: n, compact: s }) {
3857
+ function fr({ event: t, onClick: n, compact: s }) {
3834
3858
  return /* @__PURE__ */ r(
3835
3859
  "button",
3836
3860
  {
3837
3861
  type: "button",
3838
3862
  onClick: () => n?.(t),
3839
- className: p(
3863
+ className: g(
3840
3864
  "w-full text-left rounded-lg transition-colors",
3841
3865
  "hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3842
3866
  "flex items-start gap-3",
@@ -3846,41 +3870,41 @@ function mr({ event: t, onClick: n, compact: s }) {
3846
3870
  /* @__PURE__ */ e(
3847
3871
  "div",
3848
3872
  {
3849
- className: p("shrink-0 rounded-full mt-1", s ? "size-2" : "size-2.5"),
3873
+ className: g("shrink-0 rounded-full mt-1", s ? "size-2" : "size-2.5"),
3850
3874
  style: { backgroundColor: t.color ?? "#3b82f6" }
3851
3875
  }
3852
3876
  ),
3853
3877
  /* @__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) })
3878
+ /* @__PURE__ */ e("p", { className: g("font-medium truncate", s ? "text-xs" : "text-sm"), children: t.title }),
3879
+ /* @__PURE__ */ e("p", { className: g("text-muted-foreground truncate", s ? "text-[10px]" : "text-xs"), children: ur(t) })
3856
3880
  ] }),
3857
3881
  n && /* @__PURE__ */ e(
3858
- ft,
3882
+ gt,
3859
3883
  {
3860
- className: p("shrink-0 text-muted-foreground/50", s ? "size-3" : "size-4")
3884
+ className: g("shrink-0 text-muted-foreground/50", s ? "size-3" : "size-4")
3861
3885
  }
3862
3886
  )
3863
3887
  ]
3864
3888
  }
3865
3889
  );
3866
3890
  }
3867
- function fr({
3891
+ function gr({
3868
3892
  group: t,
3869
3893
  onEventClick: n,
3870
3894
  onViewMore: s,
3871
3895
  compact: o
3872
3896
  }) {
3873
3897
  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: [
3898
+ /* @__PURE__ */ r("div", { className: g("flex items-center justify-between px-2", o ? "py-1" : "py-1.5"), children: [
3875
3899
  /* @__PURE__ */ e(
3876
3900
  "h3",
3877
3901
  {
3878
- className: p(
3902
+ className: g(
3879
3903
  "font-semibold",
3880
3904
  o ? "text-xs" : "text-sm",
3881
- ce(t.date) && "text-primary"
3905
+ de(t.date) && "text-primary"
3882
3906
  ),
3883
- children: ur(t.date)
3907
+ children: hr(t.date)
3884
3908
  }
3885
3909
  ),
3886
3910
  t.hasMore && s && /* @__PURE__ */ e(
@@ -3888,96 +3912,96 @@ function fr({
3888
3912
  {
3889
3913
  type: "button",
3890
3914
  onClick: () => s(t.date),
3891
- className: p("text-primary hover:underline", o ? "text-[10px]" : "text-xs"),
3915
+ className: g("text-primary hover:underline", o ? "text-[10px]" : "text-xs"),
3892
3916
  children: "+more"
3893
3917
  }
3894
3918
  )
3895
3919
  ] }),
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)) })
3920
+ /* @__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
3921
  ] });
3898
3922
  }
3899
- function jr({
3923
+ function Ar({
3900
3924
  events: t,
3901
3925
  daysAhead: n = 7,
3902
3926
  maxEventsPerDay: s = 3,
3903
3927
  onEventClick: o,
3904
- onViewAll: i,
3905
- className: a,
3906
- emptyState: f,
3907
- title: m = "Upcoming",
3928
+ onViewAll: a,
3929
+ className: l,
3930
+ emptyState: x,
3931
+ title: h = "Upcoming",
3908
3932
  showHeader: c = !0,
3909
- compact: v = !1
3933
+ compact: w = !1
3910
3934
  }) {
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: [
3935
+ const P = lt(), b = P?.filteredEvents, y = P?.currentDate ?? /* @__PURE__ */ new Date(), B = t ?? b ?? [], A = ee(() => {
3936
+ const H = We(y), k = new Date(H);
3937
+ return k.setDate(k.getDate() + n), B.filter(($) => $.endDate >= H && $.startDate < k);
3938
+ }, [B, n, y]), W = ee(
3939
+ () => mr(A, s),
3940
+ [A, s]
3941
+ ), F = A.length;
3942
+ return W.length === 0 ? /* @__PURE__ */ r("div", { className: g("rounded-lg border bg-card", l), children: [
3919
3943
  c && /* @__PURE__ */ e(
3920
3944
  "div",
3921
3945
  {
3922
- className: p(
3946
+ className: g(
3923
3947
  "border-b px-4 flex items-center justify-between",
3924
- v ? "py-2" : "py-3"
3948
+ w ? "py-2" : "py-3"
3925
3949
  ),
3926
- children: /* @__PURE__ */ e("h2", { className: p("font-semibold", v ? "text-sm" : "text-base"), children: m })
3950
+ children: /* @__PURE__ */ e("h2", { className: g("font-semibold", w ? "text-sm" : "text-base"), children: h })
3927
3951
  }
3928
3952
  ),
3929
3953
  /* @__PURE__ */ e(
3930
3954
  "div",
3931
3955
  {
3932
- className: p(
3956
+ className: g(
3933
3957
  "flex flex-col items-center justify-center text-center",
3934
- v ? "py-6 px-4" : "py-10 px-6"
3958
+ w ? "py-6 px-4" : "py-10 px-6"
3935
3959
  ),
3936
- children: f ?? /* @__PURE__ */ r(be, { children: [
3960
+ children: x ?? /* @__PURE__ */ r(be, { children: [
3937
3961
  /* @__PURE__ */ e(
3938
- ir,
3962
+ lr,
3939
3963
  {
3940
- className: p("text-muted-foreground/50 mb-2", v ? "size-8" : "size-10")
3964
+ className: g("text-muted-foreground/50 mb-2", w ? "size-8" : "size-10")
3941
3965
  }
3942
3966
  ),
3943
- /* @__PURE__ */ e("p", { className: p("text-muted-foreground", v ? "text-xs" : "text-sm"), children: "No upcoming events" })
3967
+ /* @__PURE__ */ e("p", { className: g("text-muted-foreground", w ? "text-xs" : "text-sm"), children: "No upcoming events" })
3944
3968
  ] })
3945
3969
  }
3946
3970
  )
3947
- ] }) : /* @__PURE__ */ r("div", { className: p("rounded-lg border bg-card overflow-hidden", a), children: [
3971
+ ] }) : /* @__PURE__ */ r("div", { className: g("rounded-lg border bg-card overflow-hidden", l), children: [
3948
3972
  c && /* @__PURE__ */ r(
3949
3973
  "div",
3950
3974
  {
3951
- className: p(
3975
+ className: g(
3952
3976
  "border-b px-4 flex items-center justify-between",
3953
- v ? "py-2" : "py-3"
3977
+ w ? "py-2" : "py-3"
3954
3978
  ),
3955
3979
  children: [
3956
3980
  /* @__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 }),
3981
+ /* @__PURE__ */ e("h2", { className: g("font-semibold", w ? "text-sm" : "text-base"), children: h }),
3958
3982
  /* @__PURE__ */ e(
3959
3983
  "span",
3960
3984
  {
3961
- className: p(
3985
+ className: g(
3962
3986
  "text-muted-foreground bg-muted rounded-full px-2",
3963
- v ? "text-[10px] py-0" : "text-xs py-0.5"
3987
+ w ? "text-[10px] py-0" : "text-xs py-0.5"
3964
3988
  ),
3965
- children: T
3989
+ children: F
3966
3990
  }
3967
3991
  )
3968
3992
  ] }),
3969
- i && /* @__PURE__ */ r(
3993
+ a && /* @__PURE__ */ r(
3970
3994
  "button",
3971
3995
  {
3972
3996
  type: "button",
3973
- onClick: () => i(),
3974
- className: p(
3997
+ onClick: () => a(),
3998
+ className: g(
3975
3999
  "text-primary hover:underline flex items-center gap-0.5",
3976
- v ? "text-xs" : "text-sm"
4000
+ w ? "text-xs" : "text-sm"
3977
4001
  ),
3978
4002
  children: [
3979
4003
  "View all",
3980
- /* @__PURE__ */ e(ft, { className: "size-3" })
4004
+ /* @__PURE__ */ e(gt, { className: "size-3" })
3981
4005
  ]
3982
4006
  }
3983
4007
  )
@@ -3987,39 +4011,39 @@ function jr({
3987
4011
  /* @__PURE__ */ e(
3988
4012
  "div",
3989
4013
  {
3990
- className: p(
4014
+ className: g(
3991
4015
  "divide-y overflow-auto",
3992
- v ? "p-2 max-h-[280px]" : "p-3 max-h-[400px]"
4016
+ w ? "p-2 max-h-[280px]" : "p-3 max-h-[400px]"
3993
4017
  ),
3994
- children: F.map((C) => /* @__PURE__ */ e(
3995
- fr,
4018
+ children: W.map((H) => /* @__PURE__ */ e(
4019
+ gr,
3996
4020
  {
3997
- group: C,
4021
+ group: H,
3998
4022
  onEventClick: o,
3999
- onViewMore: i ? (j) => i(j) : void 0,
4000
- compact: v
4023
+ onViewMore: a ? (k) => a(k) : void 0,
4024
+ compact: w
4001
4025
  },
4002
- C.dateKey
4026
+ H.dateKey
4003
4027
  ))
4004
4028
  }
4005
4029
  )
4006
4030
  ] });
4007
4031
  }
4008
4032
  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,
4033
+ jr as A,
4034
+ Er as B,
4035
+ Nr as C,
4036
+ Tr as D,
4037
+ Cr as E,
4038
+ Dr as I,
4039
+ Ir as S,
4040
+ Te as T,
4017
4041
  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
4042
+ Lr as V,
4043
+ Sr as W,
4044
+ pn as Y,
4045
+ Ar as a,
4046
+ Hr as b,
4047
+ Mr as c
4024
4048
  };
4025
- //# sourceMappingURL=agenda-widget-Couk7jMB.js.map
4049
+ //# sourceMappingURL=agenda-widget-duVkXi_m.js.map