@innosolutions/inno-calendar 1.0.59 → 1.0.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/AGENT.md +40 -5
  2. package/README.md +47 -3
  3. package/dist/agenda-widget-BtjS59HE.cjs +2 -0
  4. package/dist/agenda-widget-BtjS59HE.cjs.map +1 -0
  5. package/dist/{agenda-widget-wrZfO67A.js → agenda-widget-COpTIR70.js} +5 -5
  6. package/dist/agenda-widget-COpTIR70.js.map +1 -0
  7. package/dist/components/event/event-card.d.ts.map +1 -1
  8. package/dist/components/index.cjs +1 -1
  9. package/dist/components/index.mjs +2 -2
  10. package/dist/core/context/inno-calendar-provider.d.ts.map +1 -1
  11. package/dist/core/index.cjs +1 -1
  12. package/dist/core/index.mjs +115 -114
  13. package/dist/core/types.d.ts +6 -18
  14. package/dist/core/types.d.ts.map +1 -1
  15. package/dist/core/utils/event-utils.d.ts.map +1 -1
  16. package/dist/core/utils/index.d.ts +1 -0
  17. package/dist/core/utils/index.d.ts.map +1 -1
  18. package/dist/core/utils/react-node-utils.d.ts +14 -0
  19. package/dist/core/utils/react-node-utils.d.ts.map +1 -0
  20. package/dist/index.cjs +1 -1
  21. package/dist/index.mjs +174 -173
  22. package/dist/position-utils-BQpbtF6N.cjs +2 -0
  23. package/dist/position-utils-BQpbtF6N.cjs.map +1 -0
  24. package/dist/position-utils-DMVQFywD.js +936 -0
  25. package/dist/position-utils-DMVQFywD.js.map +1 -0
  26. package/dist/presets/index.cjs +1 -1
  27. package/dist/presets/index.mjs +1 -1
  28. package/dist/{slot-selection-context-BwghpxKA.js → slot-selection-context-CKGT_45R.js} +201 -200
  29. package/dist/{slot-selection-context-BwghpxKA.js.map → slot-selection-context-CKGT_45R.js.map} +1 -1
  30. package/dist/slot-selection-context-CS1te8uo.cjs +2 -0
  31. package/dist/{slot-selection-context-CHSaOPWP.cjs.map → slot-selection-context-CS1te8uo.cjs.map} +1 -1
  32. package/dist/{tailwind-calendar-CVuxWXLY.js → tailwind-calendar-C3DidCJ5.js} +80 -80
  33. package/dist/{tailwind-calendar-CVuxWXLY.js.map → tailwind-calendar-C3DidCJ5.js.map} +1 -1
  34. package/dist/tailwind-calendar-iFeIx0Ci.cjs +2 -0
  35. package/dist/{tailwind-calendar-DoG6s3PJ.cjs.map → tailwind-calendar-iFeIx0Ci.cjs.map} +1 -1
  36. package/dist/{use-calendar-Clo9DFK4.js → use-calendar-D8XaVe44.js} +69 -69
  37. package/dist/{use-calendar-Clo9DFK4.js.map → use-calendar-D8XaVe44.js.map} +1 -1
  38. package/dist/use-calendar-DkT1_V3j.cjs +2 -0
  39. package/dist/{use-calendar-BEuelmSu.cjs.map → use-calendar-DkT1_V3j.cjs.map} +1 -1
  40. package/dist/{use-slot-selection-BCZKnZSM.js → use-slot-selection-CWRk_17s.js} +32 -32
  41. package/dist/{use-slot-selection-BCZKnZSM.js.map → use-slot-selection-CWRk_17s.js.map} +1 -1
  42. package/dist/use-slot-selection-Dj_tWg1O.cjs +2 -0
  43. package/dist/{use-slot-selection-Bwqwjiaq.cjs.map → use-slot-selection-Dj_tWg1O.cjs.map} +1 -1
  44. package/dist/utils.cjs +1 -1
  45. package/dist/utils.cjs.map +1 -1
  46. package/dist/utils.mjs +117 -920
  47. package/dist/utils.mjs.map +1 -1
  48. package/dist/week-view-B9_48WmF.cjs +11 -0
  49. package/dist/week-view-B9_48WmF.cjs.map +1 -0
  50. package/dist/{week-view-C1FxF_nk.js → week-view-CNbtlkE_.js} +804 -793
  51. package/dist/week-view-CNbtlkE_.js.map +1 -0
  52. package/package.json +1 -1
  53. package/dist/agenda-widget-BxZU4eGL.cjs +0 -2
  54. package/dist/agenda-widget-BxZU4eGL.cjs.map +0 -1
  55. package/dist/agenda-widget-wrZfO67A.js.map +0 -1
  56. package/dist/slot-selection-context-CHSaOPWP.cjs +0 -2
  57. package/dist/tailwind-calendar-DoG6s3PJ.cjs +0 -2
  58. package/dist/use-calendar-BEuelmSu.cjs +0 -2
  59. package/dist/use-slot-selection-Bwqwjiaq.cjs +0 -2
  60. package/dist/week-view-Bzpbti1B.cjs +0 -11
  61. package/dist/week-view-Bzpbti1B.cjs.map +0 -1
  62. package/dist/week-view-C1FxF_nk.js.map +0 -1
@@ -1,21 +1,21 @@
1
1
  import { jsxs as o, jsx as e, Fragment as kt } from "react/jsx-runtime";
2
2
  import * as Y from "react";
3
- import { forwardRef as Pe, createElement as Be, useState as Q, useEffect as ke, useCallback as W, useRef as ne, useMemo as K, useLayoutEffect as je } from "react";
4
- import { c as i, a as Dt } from "./index-DtaLkIY8.js";
3
+ import { forwardRef as Pe, createElement as Be, useState as Q, useEffect as ke, useCallback as L, useRef as ne, useMemo as K, useLayoutEffect as je } from "react";
4
+ import { c as s, a as Dt } from "./index-DtaLkIY8.js";
5
5
  import * as X from "@radix-ui/react-dropdown-menu";
6
- import { formatEventTimeDisplay as J, getEventsCountInView as Ct, getRangeText as St, groupEventsByDate as Mt, isToday as ce, detectAllDayEvent as ze, isSameDay as se, getEventsForDay as Fe, separateEventsByDuration as it, calculateOverlappingPositions as st, getVisibleHoursArray as lt, isWorkingHour as dt, formatHourLabel as Ae, generateMonthGrid as Tt, startOfDay as Ke, getWeekDays as zt } from "./utils.mjs";
7
- import { j as Ve, k as ct, l as Ge } from "./slot-selection-context-BwghpxKA.js";
6
+ import { U as J, aI as Ct, a7 as St, ad as Mt, ao as Tt, az as ce, x as ze, av as ie, a8 as Fe, aK as st, v as it, ah as lt, aB as dt, V as Ae, Z as zt, aQ as Ke, ai as At } from "./position-utils-DMVQFywD.js";
7
+ import { j as Ve, k as ct, l as Ge } from "./slot-selection-context-CKGT_45R.js";
8
8
  import * as V from "@radix-ui/react-dialog";
9
9
  import * as ge from "@radix-ui/react-popover";
10
10
  import * as De from "@radix-ui/react-tooltip";
11
11
  const ut = (...t) => t.filter((n, r, a) => !!n && n.trim() !== "" && a.indexOf(n) === r).join(" ").trim();
12
- const At = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
13
- const Et = (t) => t.replace(
12
+ const Et = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
13
+ const Lt = (t) => t.replace(
14
14
  /^([A-Z])|[\s-_]+(\w)/g,
15
15
  (n, r, a) => a ? a.toUpperCase() : r.toLowerCase()
16
16
  );
17
17
  const Xe = (t) => {
18
- const n = Et(t);
18
+ const n = Lt(t);
19
19
  return n.charAt(0).toUpperCase() + n.slice(1);
20
20
  };
21
21
  var Wt = {
@@ -29,48 +29,48 @@ var Wt = {
29
29
  strokeLinecap: "round",
30
30
  strokeLinejoin: "round"
31
31
  };
32
- const Lt = (t) => {
32
+ const Rt = (t) => {
33
33
  for (const n in t)
34
34
  if (n.startsWith("aria-") || n === "role" || n === "title")
35
35
  return !0;
36
36
  return !1;
37
37
  };
38
- const Rt = Pe(
38
+ const _t = Pe(
39
39
  ({
40
40
  color: t = "currentColor",
41
41
  size: n = 24,
42
42
  strokeWidth: r = 2,
43
43
  absoluteStrokeWidth: a,
44
44
  className: d = "",
45
- children: h,
46
- iconNode: s,
45
+ children: p,
46
+ iconNode: i,
47
47
  ...y
48
- }, k) => Be(
48
+ }, D) => Be(
49
49
  "svg",
50
50
  {
51
- ref: k,
51
+ ref: D,
52
52
  ...Wt,
53
53
  width: n,
54
54
  height: n,
55
55
  stroke: t,
56
56
  strokeWidth: a ? Number(r) * 24 / Number(n) : r,
57
57
  className: ut("lucide", d),
58
- ...!h && !Lt(y) && { "aria-hidden": "true" },
58
+ ...!p && !Rt(y) && { "aria-hidden": "true" },
59
59
  ...y
60
60
  },
61
61
  [
62
- ...s.map(([l, b]) => Be(l, b)),
63
- ...Array.isArray(h) ? h : [h]
62
+ ...i.map(([l, b]) => Be(l, b)),
63
+ ...Array.isArray(p) ? p : [p]
64
64
  ]
65
65
  )
66
66
  );
67
- const Le = (t, n) => {
67
+ const We = (t, n) => {
68
68
  const r = Pe(
69
- ({ className: a, ...d }, h) => Be(Rt, {
70
- ref: h,
69
+ ({ className: a, ...d }, p) => Be(_t, {
70
+ ref: p,
71
71
  iconNode: n,
72
72
  className: ut(
73
- `lucide-${At(Xe(t))}`,
73
+ `lucide-${Et(Xe(t))}`,
74
74
  `lucide-${t}`,
75
75
  a
76
76
  ),
@@ -79,17 +79,17 @@ const Le = (t, n) => {
79
79
  );
80
80
  return r.displayName = Xe(t), r;
81
81
  };
82
- const _t = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], It = Le("check", _t);
83
- const Bt = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], $t = Le("chevron-right", Bt);
84
- const Ht = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], Ot = Le("circle", Ht);
85
- const Pt = [
82
+ const It = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], Bt = We("check", It);
83
+ const $t = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], Ht = We("chevron-right", $t);
84
+ const Ot = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], Pt = We("circle", Ot);
85
+ const jt = [
86
86
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
87
87
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
88
- ], mt = Le("x", Pt), jt = V.Root, Ft = V.Trigger, Vt = V.Portal, Vn = V.Close, ht = Y.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ e(
88
+ ], mt = We("x", jt), Ft = V.Root, Vt = V.Trigger, Gt = V.Portal, Gn = V.Close, ht = Y.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ e(
89
89
  V.Overlay,
90
90
  {
91
91
  ref: r,
92
- className: i(
92
+ className: s(
93
93
  "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
94
94
  t
95
95
  ),
@@ -97,13 +97,13 @@ const Pt = [
97
97
  }
98
98
  ));
99
99
  ht.displayName = V.Overlay.displayName;
100
- const pt = Y.forwardRef(({ className: t, children: n, ...r }, a) => /* @__PURE__ */ o(Vt, { children: [
100
+ const pt = Y.forwardRef(({ className: t, children: n, ...r }, a) => /* @__PURE__ */ o(Gt, { children: [
101
101
  /* @__PURE__ */ e(ht, {}),
102
102
  /* @__PURE__ */ o(
103
103
  V.Content,
104
104
  {
105
105
  ref: a,
106
- className: i(
106
+ className: s(
107
107
  "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",
108
108
  t
109
109
  ),
@@ -119,42 +119,42 @@ const pt = Y.forwardRef(({ className: t, children: n, ...r }, a) => /* @__PURE__
119
119
  )
120
120
  ] }));
121
121
  pt.displayName = V.Content.displayName;
122
- const Gt = ({
122
+ const Ut = ({
123
123
  className: t,
124
124
  ...n
125
125
  }) => /* @__PURE__ */ e(
126
126
  "div",
127
127
  {
128
- className: i("flex flex-col space-y-1.5 text-center sm:text-left", t),
128
+ className: s("flex flex-col space-y-1.5 text-center sm:text-left", t),
129
129
  ...n
130
130
  }
131
131
  );
132
- Gt.displayName = "DialogHeader";
133
- const Ut = Y.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ e(
132
+ Ut.displayName = "DialogHeader";
133
+ const qt = Y.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ e(
134
134
  V.Title,
135
135
  {
136
136
  ref: r,
137
- className: i("text-lg font-semibold leading-none tracking-tight", t),
137
+ className: s("text-lg font-semibold leading-none tracking-tight", t),
138
138
  ...n
139
139
  }
140
140
  ));
141
- Ut.displayName = V.Title.displayName;
142
- const qt = Y.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ e(
141
+ qt.displayName = V.Title.displayName;
142
+ const Kt = Y.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ e(
143
143
  V.Description,
144
144
  {
145
145
  ref: r,
146
- className: i("text-sm text-muted-foreground", t),
146
+ className: s("text-sm text-muted-foreground", t),
147
147
  ...n
148
148
  }
149
149
  ));
150
- qt.displayName = V.Description.displayName;
151
- const ue = ge.Root, me = ge.Trigger, Gn = ge.Anchor, le = Y.forwardRef(({ className: t, align: n = "center", sideOffset: r = 4, ...a }, d) => /* @__PURE__ */ e(ge.Portal, { children: /* @__PURE__ */ e(
150
+ Kt.displayName = V.Description.displayName;
151
+ const ue = ge.Root, me = ge.Trigger, Un = ge.Anchor, le = Y.forwardRef(({ className: t, align: n = "center", sideOffset: r = 4, ...a }, d) => /* @__PURE__ */ e(ge.Portal, { children: /* @__PURE__ */ e(
152
152
  ge.Content,
153
153
  {
154
154
  ref: d,
155
155
  align: n,
156
156
  sideOffset: r,
157
- className: i(
157
+ className: s(
158
158
  "z-50 w-72 rounded-xl border bg-white text-popover-foreground outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
159
159
  t
160
160
  ),
@@ -162,10 +162,10 @@ const ue = ge.Root, me = ge.Trigger, Gn = ge.Anchor, le = Y.forwardRef(({ classN
162
162
  }
163
163
  ) }));
164
164
  le.displayName = ge.Content.displayName;
165
- const Kt = V.Root, Xt = V.Trigger, Un = V.Close, Yt = V.Portal, ft = Y.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ e(
165
+ const Xt = V.Root, Yt = V.Trigger, qn = V.Close, Jt = V.Portal, ft = Y.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ e(
166
166
  V.Overlay,
167
167
  {
168
- className: i(
168
+ className: s(
169
169
  "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
170
170
  t
171
171
  ),
@@ -174,13 +174,13 @@ const Kt = V.Root, Xt = V.Trigger, Un = V.Close, Yt = V.Portal, ft = Y.forwardRe
174
174
  }
175
175
  ));
176
176
  ft.displayName = V.Overlay.displayName;
177
- const gt = Y.forwardRef(({ className: t, children: n, ...r }, a) => /* @__PURE__ */ o(Yt, { children: [
177
+ const gt = Y.forwardRef(({ className: t, children: n, ...r }, a) => /* @__PURE__ */ o(Jt, { children: [
178
178
  /* @__PURE__ */ e(ft, {}),
179
179
  /* @__PURE__ */ o(
180
180
  V.Content,
181
181
  {
182
182
  ref: a,
183
- className: i(
183
+ className: s(
184
184
  "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
185
185
  // Right-side slide
186
186
  "inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right",
@@ -198,41 +198,41 @@ const gt = Y.forwardRef(({ className: t, children: n, ...r }, a) => /* @__PURE__
198
198
  )
199
199
  ] }));
200
200
  gt.displayName = "SheetContent";
201
- const Jt = ({
201
+ const Zt = ({
202
202
  className: t,
203
203
  ...n
204
204
  }) => /* @__PURE__ */ e(
205
205
  "div",
206
206
  {
207
- className: i("flex flex-col space-y-2 text-center sm:text-left", t),
207
+ className: s("flex flex-col space-y-2 text-center sm:text-left", t),
208
208
  ...n
209
209
  }
210
210
  );
211
- Jt.displayName = "SheetHeader";
212
- const Zt = Y.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ e(
211
+ Zt.displayName = "SheetHeader";
212
+ const Qt = Y.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ e(
213
213
  V.Title,
214
214
  {
215
215
  ref: r,
216
- className: i("text-lg font-semibold text-foreground", t),
216
+ className: s("text-lg font-semibold text-foreground", t),
217
217
  ...n
218
218
  }
219
219
  ));
220
- Zt.displayName = V.Title.displayName;
221
- const Qt = Y.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ e(
220
+ Qt.displayName = V.Title.displayName;
221
+ const en = Y.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ e(
222
222
  V.Description,
223
223
  {
224
224
  ref: r,
225
- className: i("text-sm text-muted-foreground", t),
225
+ className: s("text-sm text-muted-foreground", t),
226
226
  ...n
227
227
  }
228
228
  ));
229
- Qt.displayName = V.Description.displayName;
230
- const qn = De.Provider, ae = De.Root, ie = De.Trigger, re = Y.forwardRef(({ className: t, sideOffset: n = 4, ...r }, a) => /* @__PURE__ */ e(
229
+ en.displayName = V.Description.displayName;
230
+ const Kn = De.Provider, ae = De.Root, se = De.Trigger, re = Y.forwardRef(({ className: t, sideOffset: n = 4, ...r }, a) => /* @__PURE__ */ e(
231
231
  De.Content,
232
232
  {
233
233
  ref: a,
234
234
  sideOffset: n,
235
- className: i(
235
+ className: s(
236
236
  "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
237
237
  t
238
238
  ),
@@ -334,67 +334,67 @@ function Ee({
334
334
  badgeVariant: r = "colored",
335
335
  onClick: a,
336
336
  className: d,
337
- showTime: h = !0,
338
- showDescription: s = !1,
337
+ showTime: p = !0,
338
+ showDescription: i = !1,
339
339
  showParticipants: y = !1,
340
- style: k,
340
+ style: D,
341
341
  disablePopover: l = !1,
342
342
  renderPopover: b,
343
343
  enableDrag: v = !1,
344
344
  enablePageTransition: u = !1,
345
345
  pageTransitionDuration: x = 400,
346
- eventDetailMode: p = "popover",
346
+ eventDetailMode: f = "popover",
347
347
  renderEventDetail: N
348
348
  }) {
349
- const g = de(t.color), [L, D] = Q(!1), [T, _] = Q(!1), [U, j] = Q(!1), [B, M] = Q(null), E = ne(null), I = Ve(), H = ct();
349
+ const g = de(t.color), [W, C] = Q(!1), [z, R] = Q(!1), [U, j] = Q(!1), [I, T] = Q(null), E = ne(null), _ = Ve(), H = ct();
350
350
  ke(() => {
351
351
  if (!l && H?.focusEventId && H.focusEventId === t.id) {
352
352
  const q = setTimeout(() => {
353
- D(!0), H.clearFocusEventId();
353
+ C(!0), H.clearFocusEventId();
354
354
  }, 300);
355
355
  return () => clearTimeout(q);
356
356
  }
357
357
  }, [H?.focusEventId, t.id, l]);
358
- const z = t.endDate < xt(/* @__PURE__ */ new Date()), f = t.isCanceled ?? !1, R = v && I && !f && !z, A = t.data, F = A?.meetingTookPlace ?? t.meetingTookPlace ?? !1, w = f ? /* @__PURE__ */ e(tn, { className: "h-3 w-3 text-zinc-800 dark:text-zinc-200" }) : F ? /* @__PURE__ */ e(en, { className: i("h-3 w-3", g.text) }) : null, c = A?.productName, m = A?.extendedProps, S = A?.nrParticipant, C = A?.siteName, P = A?.siteCity, O = [C, P].filter(Boolean).join(", "), $ = W(() => {
359
- if (!T) {
358
+ const S = t.endDate < xt(/* @__PURE__ */ new Date()), h = t.isCanceled ?? !1, B = v && _ && !h && !S, A = t.data, F = A?.meetingTookPlace ?? t.meetingTookPlace ?? !1, w = h ? /* @__PURE__ */ e(nn, { className: "h-3 w-3 text-zinc-800 dark:text-zinc-200" }) : F ? /* @__PURE__ */ e(tn, { className: s("h-3 w-3", g.text) }) : null, c = A?.productName, m = A?.extendedProps, M = A?.nrParticipant, k = A?.siteName, O = A?.siteCity, P = !!k || !!O, $ = L(() => {
359
+ if (!z) {
360
360
  if (l && a) {
361
361
  a(t);
362
362
  return;
363
363
  }
364
364
  if (u && E.current) {
365
365
  const q = E.current.getBoundingClientRect();
366
- M(q), j(!0);
367
- } else l || D(!0);
366
+ T(q), j(!0);
367
+ } else l || C(!0);
368
368
  }
369
- }, [T, l, a, t, u]);
370
- W(() => {
371
- j(!1), M(null), l || D(!0);
369
+ }, [z, l, a, t, u]);
370
+ L(() => {
371
+ j(!1), T(null), l || C(!0);
372
372
  }, [l]);
373
- const G = W(() => {
374
- D(!1);
375
- }, []), oe = W(
373
+ const G = L(() => {
374
+ C(!1);
375
+ }, []), oe = L(
376
376
  (q) => {
377
- R && (q.dataTransfer.effectAllowed = "move", q.dataTransfer.setData("text/plain", t.id), _(!0), I?.startDrag?.(t));
377
+ B && (q.dataTransfer.effectAllowed = "move", q.dataTransfer.setData("text/plain", t.id), R(!0), _?.startDrag?.(t));
378
378
  },
379
- [R, t, I]
380
- ), Z = W(() => {
381
- _(!1), I?.isDragging && I.endDrag?.();
382
- }, [I]), ee = N ? N({ event: t, onClose: G }) : b ? b({ event: t, onClose: G }) : /* @__PURE__ */ e(qe, { event: t, onClose: G }), xe = (q) => {
383
- switch (p) {
379
+ [B, t, _]
380
+ ), Z = L(() => {
381
+ R(!1), _?.isDragging && _.endDrag?.();
382
+ }, [_]), ee = N ? N({ event: t, onClose: G }) : b ? b({ event: t, onClose: G }) : /* @__PURE__ */ e(qe, { event: t, onClose: G }), xe = (q) => {
383
+ switch (f) {
384
384
  case "dialog":
385
- return /* @__PURE__ */ o(jt, { open: L, onOpenChange: D, children: [
386
- /* @__PURE__ */ e(Ft, { asChild: !0, children: q }),
385
+ return /* @__PURE__ */ o(Ft, { open: W, onOpenChange: C, children: [
386
+ /* @__PURE__ */ e(Vt, { asChild: !0, children: q }),
387
387
  /* @__PURE__ */ e(pt, { className: "sm:max-w-md", children: ee })
388
388
  ] });
389
389
  case "sheet":
390
- return /* @__PURE__ */ o(Kt, { open: L, onOpenChange: D, children: [
391
- /* @__PURE__ */ e(Xt, { asChild: !0, children: q }),
390
+ return /* @__PURE__ */ o(Xt, { open: W, onOpenChange: C, children: [
391
+ /* @__PURE__ */ e(Yt, { asChild: !0, children: q }),
392
392
  /* @__PURE__ */ e(gt, { children: ee })
393
393
  ] });
394
394
  case "custom":
395
395
  return q;
396
396
  default:
397
- return /* @__PURE__ */ o(ue, { open: L, onOpenChange: D, children: [
397
+ return /* @__PURE__ */ o(ue, { open: W, onOpenChange: C, children: [
398
398
  /* @__PURE__ */ e(me, { asChild: !0, children: q }),
399
399
  /* @__PURE__ */ e(le, { className: "w-80", children: ee })
400
400
  ] });
@@ -406,25 +406,25 @@ function Ee({
406
406
  {
407
407
  type: "button",
408
408
  onClick: $,
409
- className: i(
409
+ className: s(
410
410
  "size-2 rounded-full cursor-pointer transition-opacity",
411
411
  g.dot,
412
412
  t.isCanceled && "opacity-50",
413
413
  d
414
414
  ),
415
- style: k,
416
- "aria-label": t.title
415
+ style: D,
416
+ "aria-label": Ct(t.title)
417
417
  }
418
418
  );
419
419
  return l ? /* @__PURE__ */ o(ae, { children: [
420
- /* @__PURE__ */ e(ie, { asChild: !0, children: q }),
420
+ /* @__PURE__ */ e(se, { asChild: !0, children: q }),
421
421
  /* @__PURE__ */ e(re, { children: /* @__PURE__ */ o("div", { className: "flex flex-col gap-0.5", children: [
422
422
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
423
423
  /* @__PURE__ */ e("div", { className: "text-xs opacity-80", children: J(t) })
424
424
  ] }) })
425
425
  ] }) : xe(
426
426
  /* @__PURE__ */ o(ae, { children: [
427
- /* @__PURE__ */ e(ie, { asChild: !0, children: q }),
427
+ /* @__PURE__ */ e(se, { asChild: !0, children: q }),
428
428
  /* @__PURE__ */ e(re, { children: /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }) })
429
429
  ] })
430
430
  );
@@ -435,28 +435,28 @@ function Ee({
435
435
  {
436
436
  role: "button",
437
437
  tabIndex: 0,
438
- draggable: !!R,
438
+ draggable: !!B,
439
439
  onDragStart: oe,
440
440
  onDragEnd: Z,
441
441
  onClick: l ? $ : void 0,
442
442
  onKeyDown: (be) => {
443
443
  (be.key === "Enter" || be.key === " ") && (be.preventDefault(), $());
444
444
  },
445
- className: i(
445
+ className: s(
446
446
  "group flex w-full relative items-center shadow-[0_0_1px_rgba(0,0,0,0.3)] gap-0 rounded px-1.5 py-1 text-left text-xs transition-colors hover:opacity-80",
447
- R ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
448
- T && "opacity-50",
447
+ B ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
448
+ z && "opacity-50",
449
449
  // Cancelled events get gray background with strikethrough
450
- f ? "bg-zinc-100 dark:bg-zinc-800 text-zinc-500 dark:text-zinc-400 line-through" : [
450
+ h ? "bg-zinc-100 dark:bg-zinc-800 text-zinc-500 dark:text-zinc-400 line-through" : [
451
451
  r === "colored" && [g.bg, g.text],
452
452
  r === "mixed" && [g.bg, g.text],
453
453
  r === "dot" && "bg-muted/50"
454
454
  ],
455
455
  d
456
456
  ),
457
- style: k,
457
+ style: D,
458
458
  children: [
459
- ["dot", "mixed"].includes(r) && !f && /* @__PURE__ */ e(
459
+ ["dot", "mixed"].includes(r) && !h && /* @__PURE__ */ e(
460
460
  "svg",
461
461
  {
462
462
  width: "8",
@@ -488,7 +488,7 @@ function Ee({
488
488
  /* @__PURE__ */ e(
489
489
  "div",
490
490
  {
491
- className: i(
491
+ className: s(
492
492
  "w-fit mt-0.5 text-[10px] px-1 py-0.5 border border-dashed rounded-full font-medium",
493
493
  g.border
494
494
  ),
@@ -501,7 +501,7 @@ function Ee({
501
501
  }
502
502
  );
503
503
  return l ? /* @__PURE__ */ o(ae, { children: [
504
- /* @__PURE__ */ e(ie, { asChild: !0, children: q }),
504
+ /* @__PURE__ */ e(se, { asChild: !0, children: q }),
505
505
  /* @__PURE__ */ e(re, { children: /* @__PURE__ */ o("div", { className: "flex flex-col gap-0.5", children: [
506
506
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
507
507
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: J(t) })
@@ -513,12 +513,12 @@ function Ee({
513
513
  {
514
514
  type: "button",
515
515
  onClick: $,
516
- className: i(
516
+ className: s(
517
517
  "group relative flex w-full flex-col gap-1 rounded-md border-l-[3px] px-2 py-1.5 text-left transition-all",
518
518
  "shadow-[0_1px_3px_rgba(0,0,0,0.08)] hover:shadow-[0_2px_6px_rgba(0,0,0,0.12)]",
519
519
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
520
520
  // Cancelled events get gray background with strikethrough
521
- f ? "bg-zinc-100 dark:bg-zinc-800 border-l-zinc-400 dark:border-l-zinc-600 text-zinc-500 dark:text-zinc-400 line-through" : [
521
+ h ? "bg-zinc-100 dark:bg-zinc-800 border-l-zinc-400 dark:border-l-zinc-600 text-zinc-500 dark:text-zinc-400 line-through" : [
522
522
  r === "colored" && [
523
523
  g.bg,
524
524
  g.accentBorder,
@@ -533,11 +533,11 @@ function Ee({
533
533
  ],
534
534
  d
535
535
  ),
536
- style: k,
536
+ style: D,
537
537
  children: [
538
538
  /* @__PURE__ */ o("div", { className: "flex items-start justify-between gap-1", children: [
539
539
  /* @__PURE__ */ o("div", { className: "flex items-center gap-1.5 min-w-0", children: [
540
- ["dot", "mixed"].includes(r) && !f && /* @__PURE__ */ e(
540
+ ["dot", "mixed"].includes(r) && !h && /* @__PURE__ */ e(
541
541
  "svg",
542
542
  {
543
543
  width: "8",
@@ -552,10 +552,10 @@ function Ee({
552
552
  /* @__PURE__ */ e(
553
553
  "span",
554
554
  {
555
- className: i(
555
+ className: s(
556
556
  "text-sm font-medium truncate",
557
- !f && r !== "dot" && g.text,
558
- f && "line-through"
557
+ !h && r !== "dot" && g.text,
558
+ h && "line-through"
559
559
  ),
560
560
  children: t.title
561
561
  }
@@ -564,24 +564,28 @@ function Ee({
564
564
  w
565
565
  ] }),
566
566
  c && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground truncate", children: c }),
567
- m && m.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-col", children: m.map((q, be) => /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground truncate", children: q }, be)) }),
568
- S != null && S > 0 && /* @__PURE__ */ o("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
567
+ m && m.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-col text-xs text-muted-foreground", children: m.map((q, be) => /* @__PURE__ */ e("div", { children: q }, be)) }),
568
+ M != null && M > 0 && /* @__PURE__ */ o("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
569
569
  /* @__PURE__ */ e($e, { className: "h-3 w-3 shrink-0" }),
570
570
  /* @__PURE__ */ o("span", { children: [
571
- S,
571
+ M,
572
572
  " participant",
573
- S !== 1 ? "s" : ""
573
+ M !== 1 ? "s" : ""
574
574
  ] })
575
575
  ] }),
576
- h && /* @__PURE__ */ o("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
576
+ p && /* @__PURE__ */ o("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
577
577
  /* @__PURE__ */ e(Ue, { className: "h-3 w-3 shrink-0" }),
578
578
  /* @__PURE__ */ e("span", { children: J(t) })
579
579
  ] }),
580
- O && /* @__PURE__ */ o("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
580
+ P && /* @__PURE__ */ o("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
581
581
  /* @__PURE__ */ e(yt, { className: "h-3 w-3 shrink-0" }),
582
- /* @__PURE__ */ e("span", { className: "truncate", children: O })
582
+ /* @__PURE__ */ o("span", { className: "truncate", children: [
583
+ k,
584
+ k && O ? ", " : "",
585
+ O
586
+ ] })
583
587
  ] }),
584
- s && t.description && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground line-clamp-2", children: t.description }),
588
+ i && t.description && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground line-clamp-2", children: t.description }),
585
589
  y && t.participants && t.participants.length > 0 && /* @__PURE__ */ o("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
586
590
  /* @__PURE__ */ e($e, { className: "h-3 w-3 shrink-0" }),
587
591
  /* @__PURE__ */ e("span", { className: "truncate", children: t.participants.map((q) => q.name).join(", ") })
@@ -590,7 +594,7 @@ function Ee({
590
594
  }
591
595
  );
592
596
  return l ? /* @__PURE__ */ o(ae, { children: [
593
- /* @__PURE__ */ e(ie, { asChild: !0, children: ye }),
597
+ /* @__PURE__ */ e(se, { asChild: !0, children: ye }),
594
598
  /* @__PURE__ */ e(re, { children: /* @__PURE__ */ o("div", { className: "flex flex-col gap-0.5", children: [
595
599
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
596
600
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: J(t) })
@@ -616,7 +620,7 @@ function Ue({ className: t }) {
616
620
  }
617
621
  );
618
622
  }
619
- function en({ className: t }) {
623
+ function tn({ className: t }) {
620
624
  return /* @__PURE__ */ e(
621
625
  "svg",
622
626
  {
@@ -632,7 +636,7 @@ function en({ className: t }) {
632
636
  }
633
637
  );
634
638
  }
635
- function tn({ className: t }) {
639
+ function nn({ className: t }) {
636
640
  return /* @__PURE__ */ o(
637
641
  "svg",
638
642
  {
@@ -698,12 +702,12 @@ function qe({
698
702
  const r = de(t.color), a = t.isCanceled ?? !1;
699
703
  return /* @__PURE__ */ o("div", { className: "space-y-3", children: [
700
704
  /* @__PURE__ */ o("div", { className: "flex items-start gap-3", children: [
701
- /* @__PURE__ */ e("div", { className: i("size-4 rounded shrink-0 mt-0.5", r.dot) }),
705
+ /* @__PURE__ */ e("div", { className: s("size-4 rounded shrink-0 mt-0.5", r.dot) }),
702
706
  /* @__PURE__ */ o("div", { className: "flex-1 min-w-0", children: [
703
707
  /* @__PURE__ */ e(
704
708
  "h3",
705
709
  {
706
- className: i(
710
+ className: s(
707
711
  "font-semibold text-lg",
708
712
  a && "line-through opacity-50"
709
713
  ),
@@ -739,62 +743,62 @@ function bt({
739
743
  hourHeight: r = 96,
740
744
  badgeVariant: a = "colored",
741
745
  onClick: d,
742
- className: h,
743
- disablePopover: s = !1,
746
+ className: p,
747
+ disablePopover: i = !1,
744
748
  renderPopover: y,
745
- enableDrag: k = !0
749
+ enableDrag: D = !0
746
750
  }) {
747
- const l = de(t.color), [b, v] = Q(!1), [u, x] = Q(!1), p = Ve(), N = ct();
751
+ const l = de(t.color), [b, v] = Q(!1), [u, x] = Q(!1), f = Ve(), N = ct();
748
752
  ke(() => {
749
- if (!s && N?.focusEventId && N.focusEventId === t.id) {
750
- const O = setTimeout(() => {
753
+ if (!i && N?.focusEventId && N.focusEventId === t.id) {
754
+ const P = setTimeout(() => {
751
755
  v(!0), N.clearFocusEventId();
752
756
  }, 300);
753
- return () => clearTimeout(O);
757
+ return () => clearTimeout(P);
754
758
  }
755
- }, [N?.focusEventId, t.id, s]);
756
- const g = (t.endDate.getTime() - t.startDate.getTime()) / (1e3 * 60), L = g / 60 * r - 8, D = t.endDate < xt(/* @__PURE__ */ new Date()), T = t.isCanceled ?? !1, _ = k && p && !T && !D, U = g < 35, j = g > 25, B = g >= 45, M = t.data, E = M?.productName, I = M?.extendedProps, H = M?.nrParticipant, z = M?.siteName, f = M?.siteCity, R = [z, f].filter(Boolean).join(", "), A = a === "dot", F = W(() => {
757
- u || (s && d ? d(t) : s || v(!0));
758
- }, [u, s, d, t]), w = W(() => {
759
+ }, [N?.focusEventId, t.id, i]);
760
+ const g = (t.endDate.getTime() - t.startDate.getTime()) / (1e3 * 60), W = g / 60 * r - 8, C = t.endDate < xt(/* @__PURE__ */ new Date()), z = t.isCanceled ?? !1, R = D && f && !z && !C, U = g < 35, j = g > 25, I = g >= 45, T = t.data, E = T?.productName, _ = T?.extendedProps, H = T?.nrParticipant, S = T?.siteName, h = T?.siteCity, B = !!S || !!h, A = a === "dot", F = L(() => {
761
+ u || (i && d ? d(t) : i || v(!0));
762
+ }, [u, i, d, t]), w = L(() => {
759
763
  v(!1);
760
- }, []), c = W(
761
- (O) => {
762
- if (!_) return;
763
- O.dataTransfer.effectAllowed = "move", O.dataTransfer.setData("text/plain", t.id);
764
- const $ = O.currentTarget, G = $.getBoundingClientRect();
765
- O.dataTransfer.setDragImage(
764
+ }, []), c = L(
765
+ (P) => {
766
+ if (!R) return;
767
+ P.dataTransfer.effectAllowed = "move", P.dataTransfer.setData("text/plain", t.id);
768
+ const $ = P.currentTarget, G = $.getBoundingClientRect();
769
+ P.dataTransfer.setDragImage(
766
770
  $,
767
- O.clientX - G.left,
768
- O.clientY - G.top
769
- ), x(!0), p?.startDrag?.(t);
771
+ P.clientX - G.left,
772
+ P.clientY - G.top
773
+ ), x(!0), f?.startDrag?.(t);
770
774
  },
771
- [_, t, p]
772
- ), m = W(() => {
773
- x(!1), p?.isDragging && p.endDrag?.();
774
- }, [p]), S = W(
775
- (O) => {
776
- (O.key === "Enter" || O.key === " ") && (O.preventDefault(), F());
775
+ [R, t, f]
776
+ ), m = L(() => {
777
+ x(!1), f?.isDragging && f.endDrag?.();
778
+ }, [f]), M = L(
779
+ (P) => {
780
+ (P.key === "Enter" || P.key === " ") && (P.preventDefault(), F());
777
781
  },
778
782
  [F]
779
- ), C = /* @__PURE__ */ o(
783
+ ), k = /* @__PURE__ */ o(
780
784
  "div",
781
785
  {
782
786
  role: "button",
783
787
  tabIndex: 0,
784
- draggable: !!_,
788
+ draggable: !!R,
785
789
  onDragStart: c,
786
790
  onDragEnd: m,
787
- onKeyDown: S,
791
+ onKeyDown: M,
788
792
  onClick: u ? void 0 : F,
789
- className: i(
793
+ className: s(
790
794
  "group flex w-full select-none flex-col gap-0.5 overflow-hidden rounded-md border-l-[3px] px-2 py-1.5 text-xs text-left",
791
795
  "shadow-[0_1px_3px_rgba(0,0,0,0.08)] hover:shadow-[0_2px_6px_rgba(0,0,0,0.12)]",
792
796
  "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
793
797
  "transition-all",
794
- _ ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
798
+ R ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
795
799
  u && "opacity-50",
796
800
  // Cancelled events get gray background with strikethrough
797
- T ? "bg-zinc-100 dark:bg-zinc-800 border-l-zinc-400 dark:border-l-zinc-600 text-zinc-500 dark:text-zinc-400 line-through" : [
801
+ z ? "bg-zinc-100 dark:bg-zinc-800 border-l-zinc-400 dark:border-l-zinc-600 text-zinc-500 dark:text-zinc-400 line-through" : [
798
802
  // Colored/mixed variants
799
803
  !A && [l.bg, l.accentBorder, l.text],
800
804
  // Dot variant - neutral background
@@ -802,12 +806,12 @@ function bt({
802
806
  ],
803
807
  // Short events center content
804
808
  U && "py-0 justify-center",
805
- h
809
+ p
806
810
  ),
807
- style: { height: `${Math.max(L, 20)}px` },
811
+ style: { height: `${Math.max(W, 20)}px` },
808
812
  children: [
809
813
  /* @__PURE__ */ o("div", { className: "flex items-start gap-1.5 min-w-0", children: [
810
- ["mixed", "dot"].includes(a) && !T && /* @__PURE__ */ e(
814
+ ["mixed", "dot"].includes(a) && !z && /* @__PURE__ */ e(
811
815
  "svg",
812
816
  {
813
817
  width: "8",
@@ -822,39 +826,38 @@ function bt({
822
826
  /* @__PURE__ */ e("div", { className: "flex-1 min-w-0 overflow-hidden", children: /* @__PURE__ */ e(
823
827
  "p",
824
828
  {
825
- className: i(
829
+ className: s(
826
830
  "font-semibold truncate leading-tight",
827
- !T && A && "text-foreground"
831
+ !z && A && "text-foreground"
828
832
  ),
829
833
  children: t.title
830
834
  }
831
835
  ) })
832
836
  ] }),
833
- B && E && /* @__PURE__ */ e(
837
+ I && E && /* @__PURE__ */ e(
834
838
  "p",
835
839
  {
836
- className: i(
840
+ className: s(
837
841
  "text-[11px] truncate leading-tight",
838
842
  A ? "text-muted-foreground" : "opacity-80"
839
843
  ),
840
844
  children: E
841
845
  }
842
846
  ),
843
- B && I && I.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-col", children: I.map((O, $) => /* @__PURE__ */ e(
844
- "p",
847
+ I && _ && _.length > 0 && /* @__PURE__ */ e(
848
+ "div",
845
849
  {
846
- className: i(
847
- "text-[11px] truncate leading-tight",
850
+ className: s(
851
+ "flex flex-col text-[11px] leading-tight",
848
852
  A ? "text-muted-foreground" : "opacity-80"
849
853
  ),
850
- children: O
851
- },
852
- $
853
- )) }),
854
+ children: _.map((P, $) => /* @__PURE__ */ e("div", { children: P }, $))
855
+ }
856
+ ),
854
857
  H != null && H > 0 && /* @__PURE__ */ o(
855
858
  "div",
856
859
  {
857
- className: i(
860
+ className: s(
858
861
  "flex items-center gap-1 text-[11px] leading-tight",
859
862
  A ? "text-muted-foreground" : "opacity-80"
860
863
  ),
@@ -871,7 +874,7 @@ function bt({
871
874
  j && /* @__PURE__ */ o(
872
875
  "div",
873
876
  {
874
- className: i(
877
+ className: s(
875
878
  "flex items-center gap-1 text-[11px] tabular-nums leading-tight",
876
879
  A ? "text-muted-foreground" : "opacity-90"
877
880
  ),
@@ -881,34 +884,42 @@ function bt({
881
884
  ]
882
885
  }
883
886
  ),
884
- B && R && /* @__PURE__ */ o(
887
+ I && B && /* @__PURE__ */ o(
885
888
  "div",
886
889
  {
887
- className: i(
890
+ className: s(
888
891
  "flex items-center gap-1 text-[11px] truncate leading-tight",
889
892
  A ? "text-muted-foreground" : "opacity-80"
890
893
  ),
891
894
  children: [
892
895
  /* @__PURE__ */ e(yt, { className: "h-3 w-3 shrink-0" }),
893
- /* @__PURE__ */ e("span", { className: "truncate", children: R })
896
+ /* @__PURE__ */ o("span", { className: "truncate", children: [
897
+ S,
898
+ S && h ? ", " : "",
899
+ h
900
+ ] })
894
901
  ]
895
902
  }
896
903
  )
897
904
  ]
898
905
  }
899
- ), P = /* @__PURE__ */ e(re, { children: /* @__PURE__ */ o("div", { className: "flex flex-col gap-0.5", children: [
906
+ ), O = /* @__PURE__ */ e(re, { children: /* @__PURE__ */ o("div", { className: "flex flex-col gap-0.5", children: [
900
907
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
901
908
  E && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: E }),
902
- I && I.length > 0 && I.map((O, $) => /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: O }, $)),
909
+ _ && _.length > 0 && _.map((P, $) => /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: P }, $)),
903
910
  H != null && /* @__PURE__ */ o("div", { className: "text-xs text-muted-foreground", children: [
904
911
  H,
905
912
  " participant",
906
913
  H !== 1 ? "s" : ""
907
914
  ] }),
908
915
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: J(t) }),
909
- R && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: R })
916
+ B && /* @__PURE__ */ o("div", { className: "text-xs text-muted-foreground", children: [
917
+ S,
918
+ S && h ? ", " : "",
919
+ h
920
+ ] })
910
921
  ] }) });
911
- return s ? /* @__PURE__ */ e(
922
+ return i ? /* @__PURE__ */ e(
912
923
  "div",
913
924
  {
914
925
  className: "absolute p-0.5",
@@ -919,8 +930,8 @@ function bt({
919
930
  minWidth: n.minWidth ? `${n.minWidth}px` : void 0
920
931
  },
921
932
  children: /* @__PURE__ */ o(ae, { children: [
922
- /* @__PURE__ */ e(ie, { asChild: !0, children: C }),
923
- P
933
+ /* @__PURE__ */ e(se, { asChild: !0, children: k }),
934
+ O
924
935
  ] })
925
936
  }
926
937
  ) : /* @__PURE__ */ e(
@@ -934,40 +945,40 @@ function bt({
934
945
  minWidth: n.minWidth ? `${n.minWidth}px` : void 0
935
946
  },
936
947
  children: /* @__PURE__ */ o(ue, { open: b, onOpenChange: v, children: [
937
- /* @__PURE__ */ e(me, { asChild: !0, children: C }),
948
+ /* @__PURE__ */ e(me, { asChild: !0, children: k }),
938
949
  /* @__PURE__ */ e(le, { className: "w-80", children: y ? y({ event: t, onClose: w }) : /* @__PURE__ */ e(qe, { event: t, onClose: w }) })
939
950
  ] })
940
951
  }
941
952
  );
942
953
  }
943
- function Kn({
954
+ function Xn({
944
955
  event: t,
945
956
  spanDays: n,
946
957
  isStart: r,
947
958
  isEnd: a,
948
959
  onClick: d,
949
- className: h,
950
- disablePopover: s = !1,
960
+ className: p,
961
+ disablePopover: i = !1,
951
962
  renderPopover: y
952
963
  }) {
953
- const k = de(t.color), [l, b] = Q(!1), v = t.isCanceled ?? !1, u = W(() => {
954
- s && d ? d(t) : s || b(!0);
955
- }, [s, d, t]), x = W(() => {
964
+ const D = de(t.color), [l, b] = Q(!1), v = t.isCanceled ?? !1, u = L(() => {
965
+ i && d ? d(t) : i || b(!0);
966
+ }, [i, d, t]), x = L(() => {
956
967
  b(!1);
957
- }, []), p = /* @__PURE__ */ e(
968
+ }, []), f = /* @__PURE__ */ e(
958
969
  "button",
959
970
  {
960
971
  type: "button",
961
972
  onClick: u,
962
- className: i(
973
+ className: s(
963
974
  "flex h-5 items-center px-1.5 text-xs font-medium transition-opacity hover:opacity-80",
964
975
  // Cancelled events get gray background with strikethrough
965
- v ? "bg-zinc-200 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [k.dot, "text-white"],
976
+ v ? "bg-zinc-200 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [D.dot, "text-white"],
966
977
  r && "rounded-l",
967
978
  a && "rounded-r",
968
979
  !r && "border-l-0",
969
980
  !a && "border-r-0",
970
- h
981
+ p
971
982
  ),
972
983
  style: { width: `${n * 100}%` },
973
984
  children: r && /* @__PURE__ */ e("span", { className: "truncate", children: t.title })
@@ -976,11 +987,11 @@ function Kn({
976
987
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
977
988
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: J(t) })
978
989
  ] }) });
979
- return s ? /* @__PURE__ */ o(ae, { children: [
980
- /* @__PURE__ */ e(ie, { asChild: !0, children: p }),
990
+ return i ? /* @__PURE__ */ o(ae, { children: [
991
+ /* @__PURE__ */ e(se, { asChild: !0, children: f }),
981
992
  N
982
993
  ] }) : /* @__PURE__ */ o(ue, { open: l, onOpenChange: b, children: [
983
- /* @__PURE__ */ e(me, { asChild: !0, children: p }),
994
+ /* @__PURE__ */ e(me, { asChild: !0, children: f }),
984
995
  /* @__PURE__ */ e(le, { className: "w-80", children: y ? y({ event: t, onClose: x }) : /* @__PURE__ */ e(qe, { event: t, onClose: x }) })
985
996
  ] });
986
997
  }
@@ -1000,23 +1011,23 @@ if (typeof window < "u" && !document.getElementById("inno-calendar-event-marquee
1000
1011
  const Ye = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Je = Dt, wt = (t, n) => (r) => {
1001
1012
  var a;
1002
1013
  if (n?.variants == null) return Je(t, r?.class, r?.className);
1003
- const { variants: d, defaultVariants: h } = n, s = Object.keys(d).map((l) => {
1004
- const b = r?.[l], v = h?.[l];
1014
+ const { variants: d, defaultVariants: p } = n, i = Object.keys(d).map((l) => {
1015
+ const b = r?.[l], v = p?.[l];
1005
1016
  if (b === null) return null;
1006
1017
  const u = Ye(b) || Ye(v);
1007
1018
  return d[l][u];
1008
1019
  }), y = r && Object.entries(r).reduce((l, b) => {
1009
1020
  let [v, u] = b;
1010
1021
  return u === void 0 || (l[v] = u), l;
1011
- }, {}), k = n == null || (a = n.compoundVariants) === null || a === void 0 ? void 0 : a.reduce((l, b) => {
1022
+ }, {}), D = n == null || (a = n.compoundVariants) === null || a === void 0 ? void 0 : a.reduce((l, b) => {
1012
1023
  let { class: v, className: u, ...x } = b;
1013
- return Object.entries(x).every((p) => {
1014
- let [N, g] = p;
1024
+ return Object.entries(x).every((f) => {
1025
+ let [N, g] = f;
1015
1026
  return Array.isArray(g) ? g.includes({
1016
- ...h,
1027
+ ...p,
1017
1028
  ...y
1018
1029
  }[N]) : {
1019
- ...h,
1030
+ ...p,
1020
1031
  ...y
1021
1032
  }[N] === g;
1022
1033
  }) ? [
@@ -1025,8 +1036,8 @@ const Ye = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Je = Dt, w
1025
1036
  u
1026
1037
  ] : l;
1027
1038
  }, []);
1028
- return Je(t, s, k, r?.class, r?.className);
1029
- }, nn = wt(
1039
+ return Je(t, i, D, r?.class, r?.className);
1040
+ }, rn = wt(
1030
1041
  "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
1031
1042
  {
1032
1043
  variants: {
@@ -1051,13 +1062,13 @@ const Ye = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Je = Dt, w
1051
1062
  }
1052
1063
  }
1053
1064
  ), pe = Pe(
1054
- ({ className: t, variant: n, size: r, loading: a, disabled: d, children: h, ...s }, y) => /* @__PURE__ */ o(
1065
+ ({ className: t, variant: n, size: r, loading: a, disabled: d, children: p, ...i }, y) => /* @__PURE__ */ o(
1055
1066
  "button",
1056
1067
  {
1057
- className: i(nn({ variant: n, size: r, className: t })),
1068
+ className: s(rn({ variant: n, size: r, className: t })),
1058
1069
  ref: y,
1059
1070
  disabled: d || a,
1060
- ...s,
1071
+ ...i,
1061
1072
  children: [
1062
1073
  a && /* @__PURE__ */ o(
1063
1074
  "svg",
@@ -1089,17 +1100,17 @@ const Ye = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Je = Dt, w
1089
1100
  ]
1090
1101
  }
1091
1102
  ),
1092
- h
1103
+ p
1093
1104
  ]
1094
1105
  }
1095
1106
  )
1096
1107
  );
1097
1108
  pe.displayName = "Button";
1098
- const Ze = X.Root, Qe = X.Trigger, rn = Y.forwardRef(({ className: t, inset: n, children: r, ...a }, d) => /* @__PURE__ */ o(
1109
+ const Ze = X.Root, Qe = X.Trigger, on = Y.forwardRef(({ className: t, inset: n, children: r, ...a }, d) => /* @__PURE__ */ o(
1099
1110
  X.SubTrigger,
1100
1111
  {
1101
1112
  ref: d,
1102
- className: i(
1113
+ className: s(
1103
1114
  "flex cursor-default select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
1104
1115
  n && "pl-8",
1105
1116
  t
@@ -1107,29 +1118,29 @@ const Ze = X.Root, Qe = X.Trigger, rn = Y.forwardRef(({ className: t, inset: n,
1107
1118
  ...a,
1108
1119
  children: [
1109
1120
  r,
1110
- /* @__PURE__ */ e($t, { className: "ml-auto h-4 w-4" })
1121
+ /* @__PURE__ */ e(Ht, { className: "ml-auto h-4 w-4" })
1111
1122
  ]
1112
1123
  }
1113
1124
  ));
1114
- rn.displayName = X.SubTrigger.displayName;
1115
- const on = Y.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ e(
1125
+ on.displayName = X.SubTrigger.displayName;
1126
+ const an = Y.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ e(
1116
1127
  X.SubContent,
1117
1128
  {
1118
1129
  ref: r,
1119
- className: i(
1130
+ className: s(
1120
1131
  "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1121
1132
  t
1122
1133
  ),
1123
1134
  ...n
1124
1135
  }
1125
1136
  ));
1126
- on.displayName = X.SubContent.displayName;
1137
+ an.displayName = X.SubContent.displayName;
1127
1138
  const He = Y.forwardRef(({ className: t, sideOffset: n = 4, ...r }, a) => /* @__PURE__ */ e(X.Portal, { children: /* @__PURE__ */ e(
1128
1139
  X.Content,
1129
1140
  {
1130
1141
  ref: a,
1131
1142
  sideOffset: n,
1132
- className: i(
1143
+ className: s(
1133
1144
  "z-50 rounded-xl border bg-popover p-1 text-popover-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1134
1145
  t
1135
1146
  ),
@@ -1141,7 +1152,7 @@ const Oe = Y.forwardRef(({ className: t, inset: n, ...r }, a) => /* @__PURE__ */
1141
1152
  X.Item,
1142
1153
  {
1143
1154
  ref: a,
1144
- className: i(
1155
+ className: s(
1145
1156
  "relative flex cursor-pointer select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1146
1157
  n && "pl-8",
1147
1158
  t
@@ -1150,58 +1161,58 @@ const Oe = Y.forwardRef(({ className: t, inset: n, ...r }, a) => /* @__PURE__ */
1150
1161
  }
1151
1162
  ));
1152
1163
  Oe.displayName = X.Item.displayName;
1153
- const an = Y.forwardRef(({ className: t, children: n, checked: r = !1, ...a }, d) => /* @__PURE__ */ o(
1164
+ const sn = Y.forwardRef(({ className: t, children: n, checked: r = !1, ...a }, d) => /* @__PURE__ */ o(
1154
1165
  X.CheckboxItem,
1155
1166
  {
1156
1167
  ref: d,
1157
- className: i(
1168
+ className: s(
1158
1169
  "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1159
1170
  t
1160
1171
  ),
1161
1172
  checked: r,
1162
1173
  ...a,
1163
1174
  children: [
1164
- /* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(X.ItemIndicator, { children: /* @__PURE__ */ e(It, { className: "h-4 w-4" }) }) }),
1175
+ /* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(X.ItemIndicator, { children: /* @__PURE__ */ e(Bt, { className: "h-4 w-4" }) }) }),
1165
1176
  n
1166
1177
  ]
1167
1178
  }
1168
1179
  ));
1169
- an.displayName = X.CheckboxItem.displayName;
1170
- const sn = Y.forwardRef(({ className: t, children: n, ...r }, a) => /* @__PURE__ */ o(
1180
+ sn.displayName = X.CheckboxItem.displayName;
1181
+ const ln = Y.forwardRef(({ className: t, children: n, ...r }, a) => /* @__PURE__ */ o(
1171
1182
  X.RadioItem,
1172
1183
  {
1173
1184
  ref: a,
1174
- className: i(
1185
+ className: s(
1175
1186
  "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1176
1187
  t
1177
1188
  ),
1178
1189
  ...r,
1179
1190
  children: [
1180
- /* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(X.ItemIndicator, { children: /* @__PURE__ */ e(Ot, { className: "h-2 w-2 fill-current" }) }) }),
1191
+ /* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(X.ItemIndicator, { children: /* @__PURE__ */ e(Pt, { className: "h-2 w-2 fill-current" }) }) }),
1181
1192
  n
1182
1193
  ]
1183
1194
  }
1184
1195
  ));
1185
- sn.displayName = X.RadioItem.displayName;
1186
- const ln = Y.forwardRef(({ className: t, inset: n, ...r }, a) => /* @__PURE__ */ e(
1196
+ ln.displayName = X.RadioItem.displayName;
1197
+ const dn = Y.forwardRef(({ className: t, inset: n, ...r }, a) => /* @__PURE__ */ e(
1187
1198
  X.Label,
1188
1199
  {
1189
1200
  ref: a,
1190
- className: i("px-2 py-1.5 text-sm font-semibold", n && "pl-8", t),
1201
+ className: s("px-2 py-1.5 text-sm font-semibold", n && "pl-8", t),
1191
1202
  ...r
1192
1203
  }
1193
1204
  ));
1194
- ln.displayName = X.Label.displayName;
1195
- const dn = Y.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ e(
1205
+ dn.displayName = X.Label.displayName;
1206
+ const cn = Y.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ e(
1196
1207
  X.Separator,
1197
1208
  {
1198
1209
  ref: r,
1199
- className: i("-mx-1 my-1 h-px bg-muted", t),
1210
+ className: s("-mx-1 my-1 h-px bg-muted", t),
1200
1211
  ...n
1201
1212
  }
1202
1213
  ));
1203
- dn.displayName = X.Separator.displayName;
1204
- const cn = wt(
1214
+ cn.displayName = X.Separator.displayName;
1215
+ const un = wt(
1205
1216
  "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
1206
1217
  {
1207
1218
  variants: {
@@ -1215,10 +1226,10 @@ const cn = wt(
1215
1226
  defaultVariants: { variant: "default" }
1216
1227
  }
1217
1228
  );
1218
- function un({ className: t, variant: n, ...r }) {
1219
- return /* @__PURE__ */ e("div", { className: i(cn({ variant: n }), t), ...r });
1229
+ function mn({ className: t, variant: n, ...r }) {
1230
+ return /* @__PURE__ */ e("div", { className: s(un({ variant: n }), t), ...r });
1220
1231
  }
1221
- function mn({ className: t }) {
1232
+ function hn({ className: t }) {
1222
1233
  return /* @__PURE__ */ e(
1223
1234
  "svg",
1224
1235
  {
@@ -1236,7 +1247,7 @@ function mn({ className: t }) {
1236
1247
  }
1237
1248
  );
1238
1249
  }
1239
- function hn({ className: t }) {
1250
+ function pn({ className: t }) {
1240
1251
  return /* @__PURE__ */ e(
1241
1252
  "svg",
1242
1253
  {
@@ -1254,7 +1265,7 @@ function hn({ className: t }) {
1254
1265
  }
1255
1266
  );
1256
1267
  }
1257
- const pn = [
1268
+ const fn = [
1258
1269
  "January",
1259
1270
  "February",
1260
1271
  "March",
@@ -1268,25 +1279,25 @@ const pn = [
1268
1279
  "November",
1269
1280
  "December"
1270
1281
  ];
1271
- function fn({
1282
+ function gn({
1272
1283
  date: t,
1273
1284
  view: n,
1274
1285
  events: r = [],
1275
1286
  onNavigatePrev: a,
1276
1287
  onNavigateNext: d,
1277
- weekStartsOn: h = 1,
1278
- showEventCount: s = !0,
1288
+ weekStartsOn: p = 1,
1289
+ showEventCount: i = !0,
1279
1290
  className: y
1280
1291
  }) {
1281
- const k = pn[t.getMonth()], l = t.getFullYear(), b = s ? Ct(r, t, n, h) : 0, v = St(t, n);
1282
- return /* @__PURE__ */ o("div", { className: i("min-w-0 flex-1", y), children: [
1292
+ const D = fn[t.getMonth()], l = t.getFullYear(), b = i ? St(r, t, n, p) : 0, v = Mt(t, n);
1293
+ return /* @__PURE__ */ o("div", { className: s("min-w-0 flex-1", y), children: [
1283
1294
  /* @__PURE__ */ o("div", { className: "flex items-center gap-1.5 sm:gap-2 flex-wrap", children: [
1284
1295
  /* @__PURE__ */ o("span", { className: "text-base sm:text-lg font-semibold truncate", children: [
1285
- k,
1296
+ D,
1286
1297
  " ",
1287
1298
  l
1288
1299
  ] }),
1289
- s && /* @__PURE__ */ e(un, { variant: "outline", className: "px-1 sm:px-1.5 text-[10px] sm:text-xs shrink-0", children: b })
1300
+ i && /* @__PURE__ */ e(mn, { variant: "outline", className: "px-1 sm:px-1.5 text-[10px] sm:text-xs shrink-0", children: b })
1290
1301
  ] }),
1291
1302
  /* @__PURE__ */ o("div", { className: "flex items-center gap-1.5 sm:gap-2", children: [
1292
1303
  /* @__PURE__ */ e(
@@ -1296,7 +1307,7 @@ function fn({
1296
1307
  size: "icon",
1297
1308
  className: "size-5 sm:size-6 [&_svg]:size-3 sm:[&_svg]:size-4",
1298
1309
  onClick: a,
1299
- children: /* @__PURE__ */ e(mn, {})
1310
+ children: /* @__PURE__ */ e(hn, {})
1300
1311
  }
1301
1312
  ),
1302
1313
  /* @__PURE__ */ e("p", { className: "text-xs sm:text-sm text-muted-foreground truncate", children: v }),
@@ -1307,13 +1318,13 @@ function fn({
1307
1318
  size: "icon",
1308
1319
  className: "size-5 sm:size-6 [&_svg]:size-3 sm:[&_svg]:size-4",
1309
1320
  onClick: d,
1310
- children: /* @__PURE__ */ e(hn, {})
1321
+ children: /* @__PURE__ */ e(pn, {})
1311
1322
  }
1312
1323
  )
1313
1324
  ] })
1314
1325
  ] });
1315
1326
  }
1316
- const gn = [
1327
+ const xn = [
1317
1328
  "JAN",
1318
1329
  "FEB",
1319
1330
  "MAR",
@@ -1327,13 +1338,13 @@ const gn = [
1327
1338
  "NOV",
1328
1339
  "DEC"
1329
1340
  ];
1330
- function xn({ onClick: t, className: n }) {
1341
+ function yn({ onClick: t, className: n }) {
1331
1342
  const r = /* @__PURE__ */ new Date();
1332
1343
  return /* @__PURE__ */ o(
1333
1344
  "button",
1334
1345
  {
1335
1346
  type: "button",
1336
- className: i(
1347
+ className: s(
1337
1348
  "flex size-11 sm:size-14 flex-col items-start overflow-hidden rounded-lg border shrink-0",
1338
1349
  "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
1339
1350
  "hover:bg-accent/50 transition-colors",
@@ -1341,13 +1352,13 @@ function xn({ onClick: t, className: n }) {
1341
1352
  ),
1342
1353
  onClick: t,
1343
1354
  children: [
1344
- /* @__PURE__ */ e("p", { className: "flex h-4 sm:h-6 w-full items-center justify-center bg-primary text-center text-[10px] sm:text-xs font-semibold text-primary-foreground", children: gn[r.getMonth()] }),
1355
+ /* @__PURE__ */ e("p", { className: "flex h-4 sm:h-6 w-full items-center justify-center bg-primary text-center text-[10px] sm:text-xs font-semibold text-primary-foreground", children: xn[r.getMonth()] }),
1345
1356
  /* @__PURE__ */ e("p", { className: "flex w-full flex-1 items-center justify-center text-sm sm:text-lg font-bold", children: r.getDate() })
1346
1357
  ]
1347
1358
  }
1348
1359
  );
1349
1360
  }
1350
- function yn({ className: t }) {
1361
+ function bn({ className: t }) {
1351
1362
  return /* @__PURE__ */ o(
1352
1363
  "svg",
1353
1364
  {
@@ -1417,7 +1428,7 @@ function et({ className: t }) {
1417
1428
  }
1418
1429
  );
1419
1430
  }
1420
- function bn({ className: t }) {
1431
+ function wn({ className: t }) {
1421
1432
  return /* @__PURE__ */ o(
1422
1433
  "svg",
1423
1434
  {
@@ -1459,7 +1470,7 @@ function tt({ className: t }) {
1459
1470
  }
1460
1471
  );
1461
1472
  }
1462
- function wn({ className: t }) {
1473
+ function vn({ className: t }) {
1463
1474
  return /* @__PURE__ */ o(
1464
1475
  "svg",
1465
1476
  {
@@ -1484,7 +1495,7 @@ function wn({ className: t }) {
1484
1495
  }
1485
1496
  );
1486
1497
  }
1487
- function vn({ className: t }) {
1498
+ function Nn({ className: t }) {
1488
1499
  return /* @__PURE__ */ o(
1489
1500
  "svg",
1490
1501
  {
@@ -1505,7 +1516,7 @@ function vn({ className: t }) {
1505
1516
  }
1506
1517
  );
1507
1518
  }
1508
- function Nn({ className: t }) {
1519
+ function kn({ className: t }) {
1509
1520
  return /* @__PURE__ */ o(
1510
1521
  "svg",
1511
1522
  {
@@ -1527,7 +1538,7 @@ function Nn({ className: t }) {
1527
1538
  }
1528
1539
  );
1529
1540
  }
1530
- function kn({ className: t }) {
1541
+ function Dn({ className: t }) {
1531
1542
  return /* @__PURE__ */ o(
1532
1543
  "svg",
1533
1544
  {
@@ -1551,85 +1562,85 @@ function kn({ className: t }) {
1551
1562
  }
1552
1563
  );
1553
1564
  }
1554
- const Dn = [
1555
- { value: "day", label: "Day", icon: wn },
1556
- { value: "week", label: "Week", icon: vn },
1557
- { value: "month", label: "Month", icon: Nn },
1558
- { value: "year", label: "Year", icon: kn }
1565
+ const Cn = [
1566
+ { value: "day", label: "Day", icon: vn },
1567
+ { value: "week", label: "Week", icon: Nn },
1568
+ { value: "month", label: "Month", icon: kn },
1569
+ { value: "year", label: "Year", icon: Dn }
1559
1570
  // { value: 'agenda', label: 'Agenda', icon: ListIcon }, NOTE: Not needed currently
1560
1571
  ], nt = [
1561
1572
  { value: "timeline-day", label: "1 Day", icon: fe },
1562
1573
  { value: "timeline-3day", label: "3 Days", icon: fe },
1563
1574
  { value: "timeline-week", label: "7 Days", icon: fe }
1564
- ], Cn = [
1575
+ ], Sn = [
1565
1576
  { value: "resource-day", label: "1 Day", icon: fe },
1566
1577
  { value: "resource-week", label: "7 Days", icon: fe }
1567
1578
  ];
1568
- function Xn({
1579
+ function Yn({
1569
1580
  currentDate: t,
1570
1581
  view: n,
1571
1582
  events: r = [],
1572
1583
  onNavigateToday: a,
1573
1584
  onNavigatePrev: d,
1574
- onNavigateNext: h,
1575
- onNavigate: s,
1585
+ onNavigateNext: p,
1586
+ onNavigate: i,
1576
1587
  onViewChange: y,
1577
- onAddEvent: k,
1588
+ onAddEvent: D,
1578
1589
  availableViews: l = ["day", "week", "month", "agenda"],
1579
1590
  showTimelineViews: b = !1,
1580
1591
  timelineViews: v,
1581
1592
  settingsContent: u,
1582
1593
  showSettings: x = !1,
1583
- filterContent: p,
1594
+ filterContent: f,
1584
1595
  actions: N,
1585
1596
  className: g,
1586
- weekStartsOn: L = 1,
1587
- headerConfig: D,
1588
- labels: T = {}
1597
+ weekStartsOn: W = 1,
1598
+ headerConfig: C,
1599
+ labels: z = {}
1589
1600
  }) {
1590
- const _ = D?.showToday ?? !0, U = D?.showDateNavigator ?? !0, j = D?.showCalendarViews ?? !0, B = D?.showResourceViews ?? b, M = D?.showSettings ?? x, E = D?.showAddEvent ?? !0, I = D?.showFilters ?? !0, H = K(
1601
+ const R = C?.showToday ?? !0, U = C?.showDateNavigator ?? !0, j = C?.showCalendarViews ?? !0, I = C?.showResourceViews ?? b, T = C?.showSettings ?? x, E = C?.showAddEvent ?? !0, _ = C?.showFilters ?? !0, H = K(
1591
1602
  () => ({
1592
1603
  today: "Today",
1593
1604
  addEvent: "Add Event",
1594
1605
  calendarView: "Calendar View",
1595
1606
  resourceView: "Resource View",
1596
- ...T
1607
+ ...z
1597
1608
  }),
1598
- [T]
1599
- ), z = () => {
1600
- a?.(), s?.("today");
1601
- }, f = () => {
1602
- d?.(), s?.("prev");
1603
- }, R = () => {
1604
- h?.(), s?.("next");
1609
+ [z]
1610
+ ), S = () => {
1611
+ a?.(), i?.("today");
1612
+ }, h = () => {
1613
+ d?.(), i?.("prev");
1614
+ }, B = () => {
1615
+ p?.(), i?.("next");
1605
1616
  }, A = ["day", "week", "month", "year", "agenda"].includes(
1606
1617
  n
1607
- ), F = n.startsWith("timeline-") || n.startsWith("resource-"), w = Dn.filter(
1608
- (C) => l.includes(C.value)
1609
- ), c = A ? w.find((C) => C.value === n) : null, m = [...nt, ...Cn], S = F ? m.find((C) => C.value === n) : null;
1610
- return /* @__PURE__ */ o("div", { className: i("flex flex-col w-full gap-3 mb-2", g), children: [
1618
+ ), F = n.startsWith("timeline-") || n.startsWith("resource-"), w = Cn.filter(
1619
+ (k) => l.includes(k.value)
1620
+ ), c = A ? w.find((k) => k.value === n) : null, m = [...nt, ...Sn], M = F ? m.find((k) => k.value === n) : null;
1621
+ return /* @__PURE__ */ o("div", { className: s("flex flex-col w-full gap-3 mb-2", g), children: [
1611
1622
  /* @__PURE__ */ o("div", { className: "flex lg:flex-row flex-col w-full justify-between gap-3", children: [
1612
1623
  /* @__PURE__ */ o("div", { className: "flex items-center justify-between gap-2", children: [
1613
1624
  /* @__PURE__ */ o("div", { className: "flex items-center gap-2 sm:gap-3 min-w-0", children: [
1614
- _ && /* @__PURE__ */ e(xn, { onClick: z }),
1625
+ R && /* @__PURE__ */ e(yn, { onClick: S }),
1615
1626
  U && /* @__PURE__ */ e(
1616
- fn,
1627
+ gn,
1617
1628
  {
1618
1629
  date: t,
1619
1630
  view: n,
1620
1631
  events: r,
1621
- onNavigatePrev: f,
1622
- onNavigateNext: R,
1623
- weekStartsOn: L
1632
+ onNavigatePrev: h,
1633
+ onNavigateNext: B,
1634
+ weekStartsOn: W
1624
1635
  }
1625
1636
  )
1626
1637
  ] }),
1627
- E && k && /* @__PURE__ */ e(
1638
+ E && D && /* @__PURE__ */ e(
1628
1639
  pe,
1629
1640
  {
1630
1641
  size: "icon",
1631
1642
  className: "shrink-0 lg:hidden",
1632
- onClick: k,
1643
+ onClick: D,
1633
1644
  children: /* @__PURE__ */ e(tt, { className: "size-4" })
1634
1645
  }
1635
1646
  )
@@ -1639,80 +1650,80 @@ function Xn({
1639
1650
  /* @__PURE__ */ o(
1640
1651
  Qe,
1641
1652
  {
1642
- className: i(
1653
+ className: s(
1643
1654
  "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors",
1644
1655
  "h-10 px-2 sm:px-3 gap-1 sm:gap-1.5 shrink-0",
1645
1656
  A ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-background hover:bg-accent hover:text-accent-foreground"
1646
1657
  ),
1647
1658
  children: [
1648
- /* @__PURE__ */ e(yn, { className: "size-4" }),
1659
+ /* @__PURE__ */ e(bn, { className: "size-4" }),
1649
1660
  /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: c?.label ?? H.calendarView }),
1650
1661
  /* @__PURE__ */ e(et, { className: "size-3 opacity-60" })
1651
1662
  ]
1652
1663
  }
1653
1664
  ),
1654
- /* @__PURE__ */ e(He, { align: "start", className: "min-w-[120px]", children: w.map((C) => {
1655
- const P = C.icon;
1665
+ /* @__PURE__ */ e(He, { align: "start", className: "min-w-[120px]", children: w.map((k) => {
1666
+ const O = k.icon;
1656
1667
  return /* @__PURE__ */ o(
1657
1668
  Oe,
1658
1669
  {
1659
- onClick: () => y(C.value),
1660
- className: i(
1670
+ onClick: () => y(k.value),
1671
+ className: s(
1661
1672
  "gap-2",
1662
- n === C.value && "bg-accent"
1673
+ n === k.value && "bg-accent"
1663
1674
  ),
1664
1675
  children: [
1665
- /* @__PURE__ */ e(P, { className: "size-4" }),
1666
- /* @__PURE__ */ e("span", { children: C.label })
1676
+ /* @__PURE__ */ e(O, { className: "size-4" }),
1677
+ /* @__PURE__ */ e("span", { children: k.label })
1667
1678
  ]
1668
1679
  },
1669
- C.value
1680
+ k.value
1670
1681
  );
1671
1682
  }) })
1672
1683
  ] }),
1673
- B && y && /* @__PURE__ */ o(Ze, { children: [
1684
+ I && y && /* @__PURE__ */ o(Ze, { children: [
1674
1685
  /* @__PURE__ */ o(
1675
1686
  Qe,
1676
1687
  {
1677
- className: i(
1688
+ className: s(
1678
1689
  "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors",
1679
1690
  "h-10 px-2 sm:px-3 gap-1 sm:gap-1.5 shrink-0",
1680
1691
  F ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-white hover:bg-zinc-50 hover:text-accent-foreground"
1681
1692
  ),
1682
1693
  children: [
1683
1694
  /* @__PURE__ */ e(fe, { className: "size-4" }),
1684
- /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: S?.label ?? H.resourceView }),
1695
+ /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: M?.label ?? H.resourceView }),
1685
1696
  /* @__PURE__ */ e(et, { className: "size-3 opacity-60" })
1686
1697
  ]
1687
1698
  }
1688
1699
  ),
1689
- /* @__PURE__ */ e(He, { align: "start", className: "min-w-[120px]", children: nt.map((C) => {
1690
- const P = C.icon;
1700
+ /* @__PURE__ */ e(He, { align: "start", className: "min-w-[120px]", children: nt.map((k) => {
1701
+ const O = k.icon;
1691
1702
  return /* @__PURE__ */ o(
1692
1703
  Oe,
1693
1704
  {
1694
- onClick: () => y(C.value),
1695
- className: i(
1705
+ onClick: () => y(k.value),
1706
+ className: s(
1696
1707
  "gap-2",
1697
- n === C.value && "bg-accent"
1708
+ n === k.value && "bg-accent"
1698
1709
  ),
1699
1710
  children: [
1700
- /* @__PURE__ */ e(P, { className: "size-4" }),
1701
- /* @__PURE__ */ e("span", { children: C.label })
1711
+ /* @__PURE__ */ e(O, { className: "size-4" }),
1712
+ /* @__PURE__ */ e("span", { children: k.label })
1702
1713
  ]
1703
1714
  },
1704
- C.value
1715
+ k.value
1705
1716
  );
1706
1717
  }) })
1707
1718
  ] }),
1708
- M && u && /* @__PURE__ */ o(ue, { children: [
1719
+ T && u && /* @__PURE__ */ o(ue, { children: [
1709
1720
  /* @__PURE__ */ e(me, { asChild: !0, children: /* @__PURE__ */ e(
1710
1721
  pe,
1711
1722
  {
1712
1723
  variant: "outline",
1713
1724
  size: "icon",
1714
1725
  className: "min-w-10 min-h-10 shrink-0 mx-0",
1715
- children: /* @__PURE__ */ e(bn, { className: "size-4 sm:size-5" })
1726
+ children: /* @__PURE__ */ e(wn, { className: "size-4 sm:size-5" })
1716
1727
  }
1717
1728
  ) }),
1718
1729
  /* @__PURE__ */ e(
@@ -1726,11 +1737,11 @@ function Xn({
1726
1737
  )
1727
1738
  ] }),
1728
1739
  N,
1729
- E && k && /* @__PURE__ */ o(
1740
+ E && D && /* @__PURE__ */ o(
1730
1741
  pe,
1731
1742
  {
1732
1743
  className: "hidden lg:flex shrink-0 max-h-10",
1733
- onClick: k,
1744
+ onClick: D,
1734
1745
  children: [
1735
1746
  /* @__PURE__ */ e(tt, { className: "size-4" }),
1736
1747
  H.addEvent
@@ -1739,40 +1750,40 @@ function Xn({
1739
1750
  )
1740
1751
  ] })
1741
1752
  ] }),
1742
- I && p && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 pb-1 -mb-1 scrollbar-none", children: p })
1753
+ _ && f && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 pb-1 -mb-1 scrollbar-none", children: f })
1743
1754
  ] });
1744
1755
  }
1745
- function Yn({
1756
+ function Jn({
1746
1757
  events: t,
1747
1758
  date: n,
1748
1759
  daysAhead: r = 60,
1749
1760
  badgeVariant: a = "colored",
1750
1761
  onEventClick: d,
1751
- className: h,
1752
- renderEvent: s,
1762
+ className: p,
1763
+ renderEvent: i,
1753
1764
  renderPopover: y,
1754
- slots: k,
1765
+ slots: D,
1755
1766
  classNames: l
1756
1767
  }) {
1757
1768
  const b = K(() => {
1758
1769
  const u = new Date(n);
1759
1770
  u.setHours(0, 0, 0, 0);
1760
1771
  const x = new Date(u);
1761
- return x.setDate(x.getDate() + r), t.filter((p) => p.endDate >= u && p.startDate <= x);
1772
+ return x.setDate(x.getDate() + r), t.filter((f) => f.endDate >= u && f.startDate <= x);
1762
1773
  }, [t, r, n]), v = K(() => {
1763
- const u = Mt(b), x = [];
1764
- for (const [p, N] of u)
1774
+ const u = Tt(b), x = [];
1775
+ for (const [f, N] of u)
1765
1776
  x.push({
1766
- date: new Date(p),
1767
- dateKey: p,
1777
+ date: new Date(f),
1778
+ dateKey: f,
1768
1779
  events: N
1769
1780
  });
1770
- return x.sort((p, N) => p.date.getTime() - N.date.getTime()), x;
1781
+ return x.sort((f, N) => f.date.getTime() - N.date.getTime()), x;
1771
1782
  }, [b]);
1772
- return v.length === 0 ? /* @__PURE__ */ e("div", { className: i("flex flex-col items-center justify-center h-full py-12", h), children: /* @__PURE__ */ o("div", { className: "text-center", children: [
1783
+ return v.length === 0 ? /* @__PURE__ */ e("div", { className: s("flex flex-col items-center justify-center h-full py-12", p), children: /* @__PURE__ */ o("div", { className: "text-center", children: [
1773
1784
  /* @__PURE__ */ e("p", { className: "text-muted-foreground", children: "No events found" }),
1774
1785
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground/70", children: "No events scheduled for this period" })
1775
- ] }) }) : /* @__PURE__ */ o("div", { className: i("flex flex-col h-full overflow-auto", l?.agendaList, h), children: [
1786
+ ] }) }) : /* @__PURE__ */ o("div", { className: s("flex flex-col h-full overflow-auto", l?.agendaList, p), children: [
1776
1787
  /* @__PURE__ */ e("div", { className: "sticky top-0 z-10 bg-background border-b px-4 py-3", children: /* @__PURE__ */ o("div", { className: "flex items-center justify-between", children: [
1777
1788
  /* @__PURE__ */ e("h2", { className: "text-lg font-medium", children: "Schedule" }),
1778
1789
  /* @__PURE__ */ o("span", { className: "text-sm text-muted-foreground", children: [
@@ -1781,13 +1792,13 @@ function Yn({
1781
1792
  b.length !== 1 ? "s" : ""
1782
1793
  ] })
1783
1794
  ] }) }),
1784
- /* @__PURE__ */ e("div", { className: "flex-1", children: v.map(({ date: u, dateKey: x, events: p }) => {
1785
- const N = ce(u), g = u.toLocaleDateString([], { weekday: "short" }), L = u.getDate(), D = u.toLocaleDateString([], { month: "short" });
1786
- return /* @__PURE__ */ o("div", { className: i("", l?.agendaDayGroup), children: [
1795
+ /* @__PURE__ */ e("div", { className: "flex-1", children: v.map(({ date: u, dateKey: x, events: f }) => {
1796
+ const N = ce(u), g = u.toLocaleDateString([], { weekday: "short" }), W = u.getDate(), C = u.toLocaleDateString([], { month: "short" });
1797
+ return /* @__PURE__ */ o("div", { className: s("", l?.agendaDayGroup), children: [
1787
1798
  /* @__PURE__ */ e(
1788
1799
  "div",
1789
1800
  {
1790
- className: i(
1801
+ className: s(
1791
1802
  "sticky top-[52px] z-10 bg-background px-4 py-3 border-b",
1792
1803
  l?.agendaDayHeader
1793
1804
  ),
@@ -1796,7 +1807,7 @@ function Yn({
1796
1807
  /* @__PURE__ */ e(
1797
1808
  "span",
1798
1809
  {
1799
- className: i(
1810
+ className: s(
1800
1811
  "text-[11px] font-medium uppercase tracking-wide",
1801
1812
  N ? "text-primary" : "text-muted-foreground"
1802
1813
  ),
@@ -1806,28 +1817,28 @@ function Yn({
1806
1817
  /* @__PURE__ */ e(
1807
1818
  "span",
1808
1819
  {
1809
- className: i(
1820
+ className: s(
1810
1821
  "flex items-center justify-center rounded-full mt-0.5",
1811
1822
  "size-10 text-xl font-normal",
1812
1823
  N ? "bg-primary text-primary-foreground" : "text-foreground"
1813
1824
  ),
1814
- children: L
1825
+ children: W
1815
1826
  }
1816
1827
  )
1817
1828
  ] }),
1818
1829
  /* @__PURE__ */ o("span", { className: "text-sm text-muted-foreground", children: [
1819
- D,
1830
+ C,
1820
1831
  " ",
1821
1832
  u.getFullYear()
1822
1833
  ] })
1823
1834
  ] })
1824
1835
  }
1825
1836
  ),
1826
- /* @__PURE__ */ e("div", { className: "px-4 py-3 space-y-2 border-b last:border-b-0", children: p.map(
1827
- (T) => s ? /* @__PURE__ */ e("div", { children: s({ event: T, variant: "full" }) }, T.id) : /* @__PURE__ */ e(
1837
+ /* @__PURE__ */ e("div", { className: "px-4 py-3 space-y-2 border-b last:border-b-0", children: f.map(
1838
+ (z) => i ? /* @__PURE__ */ e("div", { children: i({ event: z, variant: "full" }) }, z.id) : /* @__PURE__ */ e(
1828
1839
  Ee,
1829
1840
  {
1830
- event: T,
1841
+ event: z,
1831
1842
  variant: "full",
1832
1843
  badgeVariant: a,
1833
1844
  onClick: d,
@@ -1838,7 +1849,7 @@ function Yn({
1838
1849
  showParticipants: !0,
1839
1850
  ...l?.eventCard && { className: l.eventCard }
1840
1851
  },
1841
- T.id
1852
+ z.id
1842
1853
  )
1843
1854
  ) })
1844
1855
  ] }, x);
@@ -1846,38 +1857,38 @@ function Yn({
1846
1857
  ] });
1847
1858
  }
1848
1859
  const Ce = 360, Se = 480, Re = 280;
1849
- function Sn({
1860
+ function Mn({
1850
1861
  isOpen: t,
1851
1862
  onClose: n,
1852
1863
  date: r,
1853
1864
  events: a,
1854
1865
  anchorRect: d,
1855
- badgeVariant: h = "colored",
1856
- onEventClick: s,
1866
+ badgeVariant: p = "colored",
1867
+ onEventClick: i,
1857
1868
  renderEvent: y,
1858
- renderPopover: k,
1869
+ renderPopover: D,
1859
1870
  className: l
1860
1871
  }) {
1861
- const b = ne(null), v = ne(null), [u, x] = Q("closed"), p = ne(null);
1862
- d && (p.current = d);
1863
- const N = d ?? p.current, g = K(
1864
- () => [...a].sort((M, E) => M.startDate.getTime() - E.startDate.getTime()),
1872
+ const b = ne(null), v = ne(null), [u, x] = Q("closed"), f = ne(null);
1873
+ d && (f.current = d);
1874
+ const N = d ?? f.current, g = K(
1875
+ () => [...a].sort((T, E) => T.startDate.getTime() - E.startDate.getTime()),
1865
1876
  [a]
1866
- ), L = K(() => {
1867
- const M = N;
1868
- if (!M)
1877
+ ), W = K(() => {
1878
+ const T = N;
1879
+ if (!T)
1869
1880
  return {
1870
1881
  top: 0,
1871
1882
  left: 0,
1872
1883
  width: Ce,
1873
1884
  maxHeight: Se
1874
1885
  };
1875
- const E = typeof window < "u" ? window.innerWidth : 1200, I = typeof window < "u" ? window.innerHeight : 800;
1876
- let H = M.left + M.width / 2 - Ce / 2;
1886
+ const E = typeof window < "u" ? window.innerWidth : 1200, _ = typeof window < "u" ? window.innerHeight : 800;
1887
+ let H = T.left + T.width / 2 - Ce / 2;
1877
1888
  H = Math.max(16, Math.min(H, E - Ce - 16));
1878
- const z = Math.min(a.length * 68 + 80, Se);
1879
- let f = M.top + M.height / 2 - z / 2;
1880
- return f = Math.max(16, Math.min(f, I - z - 16)), { top: f, left: H, width: Ce, maxHeight: Se };
1889
+ const S = Math.min(a.length * 68 + 80, Se);
1890
+ let h = T.top + T.height / 2 - S / 2;
1891
+ return h = Math.max(16, Math.min(h, _ - S - 16)), { top: h, left: H, width: Ce, maxHeight: Se };
1881
1892
  }, [N, a.length]);
1882
1893
  je(() => {
1883
1894
  if (t && N)
@@ -1888,49 +1899,49 @@ function Sn({
1888
1899
  });
1889
1900
  else if (!t && (u === "open" || u === "entering")) {
1890
1901
  x("exiting");
1891
- const M = setTimeout(() => {
1892
- x("closed"), p.current = null;
1902
+ const T = setTimeout(() => {
1903
+ x("closed"), f.current = null;
1893
1904
  }, Re);
1894
- return () => clearTimeout(M);
1905
+ return () => clearTimeout(T);
1895
1906
  }
1896
1907
  }, [t, N]), ke(() => {
1897
1908
  if (u === "closed") return;
1898
- const M = (E) => {
1909
+ const T = (E) => {
1899
1910
  E.key === "Escape" && (E.stopPropagation(), n());
1900
1911
  };
1901
- return document.addEventListener("keydown", M), () => document.removeEventListener("keydown", M);
1912
+ return document.addEventListener("keydown", T), () => document.removeEventListener("keydown", T);
1902
1913
  }, [u, n]), ke(() => {
1903
1914
  u === "open" && v.current && v.current.focus();
1904
1915
  }, [u]);
1905
- const D = W(
1906
- (M) => {
1907
- M.target === b.current && n();
1916
+ const C = L(
1917
+ (T) => {
1918
+ T.target === b.current && n();
1908
1919
  },
1909
1920
  [n]
1910
1921
  );
1911
1922
  if (u === "closed") return null;
1912
- const T = u === "entering" || u === "exiting", _ = N, U = T && _ ? {
1923
+ const z = u === "entering" || u === "exiting", R = N, U = z && R ? {
1913
1924
  // Collapsed state: match the day cell exactly
1914
1925
  position: "fixed",
1915
- top: _.top,
1916
- left: _.left,
1917
- width: _.width,
1918
- height: _.height,
1919
- maxHeight: _.height,
1926
+ top: R.top,
1927
+ left: R.left,
1928
+ width: R.width,
1929
+ height: R.height,
1930
+ maxHeight: R.height,
1920
1931
  opacity: u === "entering" ? 0.7 : 0,
1921
1932
  transform: "scale(1)",
1922
1933
  borderRadius: "8px"
1923
1934
  } : {
1924
1935
  // Expanded state: full panel
1925
1936
  position: "fixed",
1926
- top: L.top,
1927
- left: L.left,
1928
- width: L.width,
1929
- maxHeight: L.maxHeight,
1937
+ top: W.top,
1938
+ left: W.left,
1939
+ width: W.width,
1940
+ maxHeight: W.maxHeight,
1930
1941
  opacity: 1,
1931
1942
  transform: "scale(1)",
1932
1943
  borderRadius: "12px"
1933
- }, j = T ? 0 : 1, B = r.toLocaleDateString(void 0, {
1944
+ }, j = z ? 0 : 1, I = r.toLocaleDateString(void 0, {
1934
1945
  weekday: "long",
1935
1946
  month: "long",
1936
1947
  day: "numeric"
@@ -1941,7 +1952,7 @@ function Sn({
1941
1952
  {
1942
1953
  ref: b,
1943
1954
  role: "presentation",
1944
- onClick: D,
1955
+ onClick: C,
1945
1956
  className: "ic-expansion-backdrop",
1946
1957
  style: {
1947
1958
  position: "fixed",
@@ -1959,9 +1970,9 @@ function Sn({
1959
1970
  ref: v,
1960
1971
  role: "dialog",
1961
1972
  "aria-modal": "true",
1962
- "aria-label": `Events for ${B}`,
1973
+ "aria-label": `Events for ${I}`,
1963
1974
  tabIndex: -1,
1964
- className: i(
1975
+ className: s(
1965
1976
  "ic-expansion-panel",
1966
1977
  "!bg-white border border-border shadow-2xl overflow-hidden",
1967
1978
  "focus:outline-none",
@@ -1976,7 +1987,7 @@ function Sn({
1976
1987
  children: [
1977
1988
  /* @__PURE__ */ o("div", { className: "flex items-center justify-between px-4 py-3 border-b bg-muted/30", children: [
1978
1989
  /* @__PURE__ */ o("div", { className: "flex flex-col", children: [
1979
- /* @__PURE__ */ e("span", { className: "text-sm font-semibold text-foreground", children: B }),
1990
+ /* @__PURE__ */ e("span", { className: "text-sm font-semibold text-foreground", children: I }),
1980
1991
  /* @__PURE__ */ o("span", { className: "text-xs text-muted-foreground", children: [
1981
1992
  a.length,
1982
1993
  " event",
@@ -2016,17 +2027,17 @@ function Sn({
2016
2027
  className: "overflow-y-auto px-3 py-2 space-y-1.5",
2017
2028
  style: { maxHeight: `${Se - 64}px` },
2018
2029
  children: [
2019
- g.map((M) => /* @__PURE__ */ e("div", { onPointerDown: (E) => E.stopPropagation(), children: y ? y({ event: M, variant: "compact" }) : /* @__PURE__ */ e(
2030
+ g.map((T) => /* @__PURE__ */ e("div", { onPointerDown: (E) => E.stopPropagation(), children: y ? y({ event: T, variant: "compact" }) : /* @__PURE__ */ e(
2020
2031
  Ee,
2021
2032
  {
2022
- event: M,
2033
+ event: T,
2023
2034
  variant: "compact",
2024
- badgeVariant: h,
2025
- onClick: s,
2026
- renderPopover: k,
2035
+ badgeVariant: p,
2036
+ onClick: i,
2037
+ renderPopover: D,
2027
2038
  showTime: !0
2028
2039
  }
2029
- ) }, M.id)),
2040
+ ) }, T.id)),
2030
2041
  a.length === 0 && /* @__PURE__ */ e("div", { className: "py-6 text-center text-sm text-muted-foreground", children: "No events" })
2031
2042
  ]
2032
2043
  }
@@ -2036,24 +2047,24 @@ function Sn({
2036
2047
  )
2037
2048
  ] });
2038
2049
  }
2039
- function Mn({
2050
+ function Tn({
2040
2051
  event: t,
2041
2052
  date: n,
2042
2053
  onEventClick: r,
2043
2054
  disablePopover: a,
2044
2055
  renderPopover: d
2045
2056
  }) {
2046
- const [h, s] = Q(!1), y = de(t.color), k = ze(t), l = se(t.startDate, n), b = se(t.endDate, n), v = k && se(t.startDate, t.endDate), u = W(() => {
2047
- a && r ? r(t) : a || s(!0);
2048
- }, [a, r, t]), x = W(() => {
2049
- s(!1);
2050
- }, []), p = /* @__PURE__ */ o(
2057
+ const [p, i] = Q(!1), y = de(t.color), D = ze(t), l = ie(t.startDate, n), b = ie(t.endDate, n), v = D && ie(t.startDate, t.endDate), u = L(() => {
2058
+ a && r ? r(t) : a || i(!0);
2059
+ }, [a, r, t]), x = L(() => {
2060
+ i(!1);
2061
+ }, []), f = /* @__PURE__ */ o(
2051
2062
  "button",
2052
2063
  {
2053
2064
  type: "button",
2054
2065
  onClick: u,
2055
2066
  title: J(t),
2056
- className: i(
2067
+ className: s(
2057
2068
  "inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium transition-opacity hover:opacity-80",
2058
2069
  "sm:px-2 sm:py-1 sm:text-xs",
2059
2070
  y.bg,
@@ -2073,23 +2084,23 @@ function Mn({
2073
2084
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: J(t) })
2074
2085
  ] }) });
2075
2086
  return a ? /* @__PURE__ */ o(ae, { children: [
2076
- /* @__PURE__ */ e(ie, { asChild: !0, children: p }),
2087
+ /* @__PURE__ */ e(se, { asChild: !0, children: f }),
2077
2088
  N
2078
- ] }) : /* @__PURE__ */ o(ue, { open: h, onOpenChange: s, children: [
2079
- /* @__PURE__ */ e(me, { asChild: !0, children: p }),
2080
- /* @__PURE__ */ e(le, { className: "w-80", children: d ? d({ event: t, onClose: x }) : /* @__PURE__ */ e(Tn, { event: t, onClose: x }) })
2089
+ ] }) : /* @__PURE__ */ o(ue, { open: p, onOpenChange: i, children: [
2090
+ /* @__PURE__ */ e(me, { asChild: !0, children: f }),
2091
+ /* @__PURE__ */ e(le, { className: "w-80", children: d ? d({ event: t, onClose: x }) : /* @__PURE__ */ e(zn, { event: t, onClose: x }) })
2081
2092
  ] });
2082
2093
  }
2083
- function Tn({
2094
+ function zn({
2084
2095
  event: t,
2085
2096
  onClose: n
2086
2097
  }) {
2087
2098
  const r = de(t.color), a = t.isCanceled ?? !1;
2088
2099
  return /* @__PURE__ */ o("div", { className: "space-y-3", children: [
2089
2100
  /* @__PURE__ */ o("div", { className: "flex items-start gap-3", children: [
2090
- /* @__PURE__ */ e("div", { className: i("size-4 rounded shrink-0 mt-0.5", r.dot) }),
2101
+ /* @__PURE__ */ e("div", { className: s("size-4 rounded shrink-0 mt-0.5", r.dot) }),
2091
2102
  /* @__PURE__ */ o("div", { className: "flex-1 min-w-0", children: [
2092
- /* @__PURE__ */ e("h3", { className: i("font-semibold text-lg", a && "line-through opacity-50"), children: t.title }),
2103
+ /* @__PURE__ */ e("h3", { className: s("font-semibold text-lg", a && "line-through opacity-50"), children: t.title }),
2093
2104
  /* @__PURE__ */ e("div", { className: "flex items-center gap-1 text-sm text-muted-foreground mt-1 tabular-nums", children: J(t) })
2094
2105
  ] })
2095
2106
  ] }),
@@ -2109,22 +2120,22 @@ function Tn({
2109
2120
  ) })
2110
2121
  ] });
2111
2122
  }
2112
- function zn({
2123
+ function An({
2113
2124
  events: t,
2114
2125
  date: n,
2115
2126
  onEventClick: r,
2116
2127
  disablePopover: a = !1,
2117
2128
  renderPopover: d,
2118
- className: h
2129
+ className: p
2119
2130
  }) {
2120
2131
  if (t.length === 0) return null;
2121
- const s = t.some((l) => ze(l) && se(l.startDate, l.endDate)), y = t.some(
2122
- (l) => !se(l.startDate, l.endDate) || ze(l) && !se(l.startDate, l.endDate)
2123
- ), k = s && y ? "All day / Multi-day" : s ? "All day" : "Multi-day";
2124
- return /* @__PURE__ */ o("div", { className: i("border-b bg-muted/20 px-2 py-1.5 space-y-1", "sm:px-4 sm:py-2", h), children: [
2125
- /* @__PURE__ */ e("span", { className: "text-[10px] font-medium text-muted-foreground sm:text-xs", children: k }),
2132
+ const i = t.some((l) => ze(l) && ie(l.startDate, l.endDate)), y = t.some(
2133
+ (l) => !ie(l.startDate, l.endDate) || ze(l) && !ie(l.startDate, l.endDate)
2134
+ ), D = i && y ? "All day / Multi-day" : i ? "All day" : "Multi-day";
2135
+ return /* @__PURE__ */ o("div", { className: s("border-b bg-muted/20 px-2 py-1.5 space-y-1", "sm:px-4 sm:py-2", p), children: [
2136
+ /* @__PURE__ */ e("span", { className: "text-[10px] font-medium text-muted-foreground sm:text-xs", children: D }),
2126
2137
  /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: t.map((l) => /* @__PURE__ */ e(
2127
- Mn,
2138
+ Tn,
2128
2139
  {
2129
2140
  event: l,
2130
2141
  date: n,
@@ -2136,70 +2147,70 @@ function zn({
2136
2147
  )) })
2137
2148
  ] });
2138
2149
  }
2139
- const An = 5;
2150
+ const En = 5;
2140
2151
  function vt({
2141
2152
  slot: t,
2142
2153
  onSelectionStart: n,
2143
2154
  onSelectionMove: r,
2144
2155
  onSelectionEnd: a,
2145
2156
  isSelected: d = !1,
2146
- isSelecting: h = !1,
2147
- disabled: s = !1,
2157
+ isSelecting: p = !1,
2158
+ disabled: i = !1,
2148
2159
  ariaLabel: y,
2149
- children: k,
2160
+ children: D,
2150
2161
  className: l,
2151
2162
  height: b,
2152
2163
  style: v,
2153
2164
  dataAttributes: u
2154
2165
  }) {
2155
- const x = ne(null), p = ne(!1), N = ne(!1), g = ne(null), [L, D] = Q(!1), T = Ve(), _ = W(
2156
- (z) => {
2157
- s || z.button !== 0 && z.pointerType === "mouse" || (z.preventDefault(), x.current = { x: z.clientX, y: z.clientY }, p.current = !1, N.current = !0, n?.(t));
2166
+ const x = ne(null), f = ne(!1), N = ne(!1), g = ne(null), [W, C] = Q(!1), z = Ve(), R = L(
2167
+ (S) => {
2168
+ i || S.button !== 0 && S.pointerType === "mouse" || (S.preventDefault(), x.current = { x: S.clientX, y: S.clientY }, f.current = !1, N.current = !0, n?.(t));
2158
2169
  },
2159
- [s, t, n]
2160
- ), U = W(
2161
- (z) => {
2162
- if (!(x.current && N.current && !s)) return;
2163
- const f = z.clientX - x.current.x, R = z.clientY - x.current.y;
2164
- Math.sqrt(f * f + R * R) >= An && (p.current = !0);
2170
+ [i, t, n]
2171
+ ), U = L(
2172
+ (S) => {
2173
+ if (!(x.current && N.current && !i)) return;
2174
+ const h = S.clientX - x.current.x, B = S.clientY - x.current.y;
2175
+ Math.sqrt(h * h + B * B) >= En && (f.current = !0);
2165
2176
  },
2166
- [s]
2167
- ), j = W(
2168
- (z) => {
2169
- s || (z.buttons > 0 || h) && r?.(t);
2177
+ [i]
2178
+ ), j = L(
2179
+ (S) => {
2180
+ i || (S.buttons > 0 || p) && r?.(t);
2170
2181
  },
2171
- [s, h, t, r]
2172
- ), B = W(() => {
2173
- s || (a?.(), x.current = null, p.current = !1, N.current = !1);
2174
- }, [s, a]), M = W(
2175
- (z) => {
2176
- if (!T?.isDragging || s) return;
2177
- z.preventDefault(), z.dataTransfer.dropEffect = "move", D(!0);
2178
- const f = /* @__PURE__ */ new Date(), R = t.hour ?? f.getHours(), A = t.minute ?? (f.getMinutes() >= 30 ? 30 : 0);
2179
- T.updateDragPreview?.(t.date, R, A);
2182
+ [i, p, t, r]
2183
+ ), I = L(() => {
2184
+ i || (a?.(), x.current = null, f.current = !1, N.current = !1);
2185
+ }, [i, a]), T = L(
2186
+ (S) => {
2187
+ if (!z?.isDragging || i) return;
2188
+ S.preventDefault(), S.dataTransfer.dropEffect = "move", C(!0);
2189
+ const h = /* @__PURE__ */ new Date(), B = t.hour ?? h.getHours(), A = t.minute ?? (h.getMinutes() >= 30 ? 30 : 0);
2190
+ z.updateDragPreview?.(t.date, B, A);
2180
2191
  },
2181
- [T, s, t]
2182
- ), E = W(() => {
2183
- D(!1);
2184
- }, []), I = W(
2185
- (z) => {
2186
- z.preventDefault(), D(!1), !(!T?.isDragging || s) && T.endDrag?.();
2192
+ [z, i, t]
2193
+ ), E = L(() => {
2194
+ C(!1);
2195
+ }, []), _ = L(
2196
+ (S) => {
2197
+ S.preventDefault(), C(!1), !(!z?.isDragging || i) && z.endDrag?.();
2187
2198
  },
2188
- [T, s]
2199
+ [z, i]
2189
2200
  );
2190
2201
  ke(() => {
2191
- const z = () => {
2192
- N.current && (N.current = !1, x.current = null, p.current = !1);
2202
+ const S = () => {
2203
+ N.current && (N.current = !1, x.current = null, f.current = !1);
2193
2204
  };
2194
- return window.addEventListener("pointerup", z), window.addEventListener("pointercancel", z), () => {
2195
- window.removeEventListener("pointerup", z), window.removeEventListener("pointercancel", z);
2205
+ return window.addEventListener("pointerup", S), window.addEventListener("pointercancel", S), () => {
2206
+ window.removeEventListener("pointerup", S), window.removeEventListener("pointercancel", S);
2196
2207
  };
2197
2208
  }, []);
2198
- const H = W(
2199
- (z) => {
2200
- s || (z.key === "Enter" || z.key === " ") && (z.preventDefault(), n?.(t), a?.());
2209
+ const H = L(
2210
+ (S) => {
2211
+ i || (S.key === "Enter" || S.key === " ") && (S.preventDefault(), n?.(t), a?.());
2201
2212
  },
2202
- [s, t, n, a]
2213
+ [i, t, n, a]
2203
2214
  );
2204
2215
  return /* @__PURE__ */ e(
2205
2216
  "button",
@@ -2207,33 +2218,33 @@ function vt({
2207
2218
  ref: g,
2208
2219
  type: "button",
2209
2220
  "aria-label": y,
2210
- "aria-disabled": s,
2221
+ "aria-disabled": i,
2211
2222
  "aria-pressed": d,
2212
- disabled: s,
2213
- onPointerDown: _,
2223
+ disabled: i,
2224
+ onPointerDown: R,
2214
2225
  onPointerMove: U,
2215
- onPointerUp: B,
2226
+ onPointerUp: I,
2216
2227
  onPointerEnter: j,
2217
2228
  onKeyDown: H,
2218
- onDragOver: M,
2229
+ onDragOver: T,
2219
2230
  onDragLeave: E,
2220
- onDrop: I,
2221
- className: i(
2231
+ onDrop: _,
2232
+ className: s(
2222
2233
  "select-none touch-none cursor-pointer transition-colors",
2223
2234
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",
2224
2235
  // Hover state (only when not in selection)
2225
- !(h || s) && "hover:bg-blue-50/60",
2236
+ !(p || i) && "hover:bg-blue-50/60",
2226
2237
  // Selection state — blue tint matching the primary color
2227
2238
  d && "bg-blue-100/70",
2228
2239
  // Drag over state - visual feedback when event is dragged over
2229
- L && "bg-primary/20 ring-2 ring-primary ring-inset",
2240
+ W && "bg-primary/20 ring-2 ring-primary ring-inset",
2230
2241
  // Disabled state
2231
- s && "cursor-not-allowed opacity-50",
2242
+ i && "cursor-not-allowed opacity-50",
2232
2243
  l
2233
2244
  ),
2234
2245
  style: { height: b, ...v },
2235
2246
  ...u,
2236
- children: k
2247
+ children: D
2237
2248
  }
2238
2249
  );
2239
2250
  }
@@ -2243,61 +2254,61 @@ function Nt({
2243
2254
  hour: r,
2244
2255
  minute: a,
2245
2256
  ariaLabel: d,
2246
- ...h
2257
+ ...p
2247
2258
  }) {
2248
- const s = t ?? { date: n, hour: r ?? 0, minute: a ?? 0 }, y = d ?? `Add event at ${(s.hour ?? 0).toString().padStart(2, "0")}:${(s.minute ?? 0).toString().padStart(2, "0")} on ${s.date.toLocaleDateString()}`;
2249
- return /* @__PURE__ */ e(vt, { slot: s, ariaLabel: y, ...h });
2259
+ const i = t ?? { date: n, hour: r ?? 0, minute: a ?? 0 }, y = d ?? `Add event at ${(i.hour ?? 0).toString().padStart(2, "0")}:${(i.minute ?? 0).toString().padStart(2, "0")} on ${i.date.toLocaleDateString()}`;
2260
+ return /* @__PURE__ */ e(vt, { slot: i, ariaLabel: y, ...p });
2250
2261
  }
2251
- function En({ slot: t, date: n, ariaLabel: r, ...a }) {
2252
- const d = t ?? { date: n }, h = r ?? `Select ${d.date.toLocaleDateString()}`;
2253
- return /* @__PURE__ */ e(vt, { slot: d, ariaLabel: h, ...a });
2262
+ function Ln({ slot: t, date: n, ariaLabel: r, ...a }) {
2263
+ const d = t ?? { date: n }, p = r ?? `Select ${d.date.toLocaleDateString()}`;
2264
+ return /* @__PURE__ */ e(vt, { slot: d, ariaLabel: p, ...a });
2254
2265
  }
2255
2266
  const we = 96, _e = 72, Ie = 80;
2256
- function Jn({
2267
+ function Zn({
2257
2268
  events: t,
2258
2269
  date: n,
2259
2270
  visibleHours: r = { startHour: 0, endHour: 24 },
2260
2271
  workingHours: a,
2261
2272
  slotDuration: d = 30,
2262
- badgeVariant: h = "colored",
2263
- onEventClick: s,
2273
+ badgeVariant: p = "colored",
2274
+ onEventClick: i,
2264
2275
  onSlotSelect: y,
2265
- className: k,
2276
+ className: D,
2266
2277
  renderEvent: l,
2267
2278
  renderPopover: b,
2268
2279
  slots: v,
2269
2280
  classNames: u
2270
2281
  }) {
2271
- const x = 60 / d, p = 100 / x, N = K(() => {
2282
+ const x = 60 / d, f = 100 / x, N = K(() => {
2272
2283
  const w = [];
2273
2284
  for (let c = 0; c < x; c++)
2274
2285
  w.push(c * d);
2275
2286
  return w;
2276
- }, [x, d]), g = K(() => Fe(t, n), [t, n]), { singleDay: L, multiDay: D } = K(() => it(g), [g]), T = K(() => {
2277
- const w = st(L, n, r, we), c = /* @__PURE__ */ new Map();
2287
+ }, [x, d]), g = K(() => Fe(t, n), [t, n]), { singleDay: W, multiDay: C } = K(() => st(g), [g]), z = K(() => {
2288
+ const w = it(W, n, r, we), c = /* @__PURE__ */ new Map();
2278
2289
  for (const m of w)
2279
2290
  c.set(m.event.id, m.position);
2280
2291
  return c;
2281
- }, [L, n, r]), _ = K(() => lt(r), [r]), U = /* @__PURE__ */ new Date(), j = ce(n), B = K(() => {
2292
+ }, [W, n, r]), R = K(() => lt(r), [r]), U = /* @__PURE__ */ new Date(), j = ce(n), I = K(() => {
2282
2293
  if (!j) return 0;
2283
2294
  const w = U.getHours() + U.getMinutes() / 60;
2284
2295
  return w < r.startHour || w > r.endHour ? -1 : (w - r.startHour) * we;
2285
- }, [j, r, U]), M = ne(null);
2296
+ }, [j, r, U]), T = ne(null);
2286
2297
  je(() => {
2287
- const w = M.current;
2298
+ const w = T.current;
2288
2299
  if (!w) return;
2289
2300
  const c = () => {
2290
2301
  let m;
2291
2302
  if (j) {
2292
- const C = (/* @__PURE__ */ new Date()).getHours();
2293
- m = Math.max(C - 1, r.startHour);
2303
+ const k = (/* @__PURE__ */ new Date()).getHours();
2304
+ m = Math.max(k - 1, r.startHour);
2294
2305
  } else {
2295
- const C = n.getDay(), P = a?.[C];
2296
- P?.enabled && P.from > 0 ? m = Math.max(P.from - 1, r.startHour) : m = Math.max(7, r.startHour);
2306
+ const k = n.getDay(), O = a?.[k];
2307
+ O?.enabled && O.from > 0 ? m = Math.max(O.from - 1, r.startHour) : m = Math.max(7, r.startHour);
2297
2308
  }
2298
- const S = (m - r.startHour) * we;
2309
+ const M = (m - r.startHour) * we;
2299
2310
  w.scrollTo({
2300
- top: S,
2311
+ top: M,
2301
2312
  behavior: "instant"
2302
2313
  });
2303
2314
  };
@@ -2305,29 +2316,29 @@ function Jn({
2305
2316
  requestAnimationFrame(c);
2306
2317
  });
2307
2318
  }, [n, a, r, j]);
2308
- const E = Ge(), I = W(
2319
+ const E = Ge(), _ = L(
2309
2320
  (w) => {
2310
2321
  E?.startSelection(w);
2311
2322
  },
2312
2323
  [E]
2313
- ), H = W(
2324
+ ), H = L(
2314
2325
  (w) => {
2315
2326
  E?.updateSelection(w);
2316
2327
  },
2317
2328
  [E]
2318
- ), z = W(() => {
2329
+ ), S = L(() => {
2319
2330
  E?.endSelection();
2320
- }, [E]), f = W(
2331
+ }, [E]), h = L(
2321
2332
  (w) => {
2322
- s?.(w);
2333
+ i?.(w);
2323
2334
  },
2324
- [s]
2325
- ), R = n.toLocaleDateString([], { weekday: "short" }), A = n.getDate(), F = ce(n);
2326
- return /* @__PURE__ */ o("div", { className: i("flex flex-col h-full", k), children: [
2335
+ [i]
2336
+ ), B = n.toLocaleDateString([], { weekday: "short" }), A = n.getDate(), F = ce(n);
2337
+ return /* @__PURE__ */ o("div", { className: s("flex flex-col h-full", D), children: [
2327
2338
  /* @__PURE__ */ e(
2328
2339
  "div",
2329
2340
  {
2330
- className: i(
2341
+ className: s(
2331
2342
  "flex items-center gap-3 border-b px-4 py-3",
2332
2343
  u?.columnHeader,
2333
2344
  F && u?.columnHeaderToday
@@ -2336,17 +2347,17 @@ function Jn({
2336
2347
  /* @__PURE__ */ e(
2337
2348
  "span",
2338
2349
  {
2339
- className: i(
2350
+ className: s(
2340
2351
  "text-[11px] font-medium uppercase tracking-wide",
2341
2352
  F ? "text-primary" : "text-muted-foreground"
2342
2353
  ),
2343
- children: R
2354
+ children: B
2344
2355
  }
2345
2356
  ),
2346
2357
  /* @__PURE__ */ e(
2347
2358
  "span",
2348
2359
  {
2349
- className: i(
2360
+ className: s(
2350
2361
  "flex items-center justify-center rounded-full mt-0.5",
2351
2362
  "size-12 text-3xl font-normal",
2352
2363
  F ? "bg-primary text-primary-foreground" : "text-foreground"
@@ -2357,13 +2368,13 @@ function Jn({
2357
2368
  ] })
2358
2369
  }
2359
2370
  ),
2360
- D.length > 0 && /* @__PURE__ */ e(
2361
- zn,
2371
+ C.length > 0 && /* @__PURE__ */ e(
2372
+ An,
2362
2373
  {
2363
- events: D,
2374
+ events: C,
2364
2375
  date: n,
2365
- onEventClick: f,
2366
- disablePopover: !!s && !b,
2376
+ onEventClick: h,
2377
+ disablePopover: !!i && !b,
2367
2378
  renderPopover: b,
2368
2379
  ...u?.multiDayBanner && { className: u.multiDayBanner }
2369
2380
  }
@@ -2371,26 +2382,26 @@ function Jn({
2371
2382
  /* @__PURE__ */ e(
2372
2383
  "div",
2373
2384
  {
2374
- ref: M,
2375
- className: i("flex-1", u?.scrollContainer),
2385
+ ref: T,
2386
+ className: s("flex-1", u?.scrollContainer),
2376
2387
  children: /* @__PURE__ */ o("div", { className: "relative min-h-full", children: [
2377
- _.map((w, c) => {
2378
- const S = !dt(n, w, a);
2388
+ R.map((w, c) => {
2389
+ const M = !dt(n, w, a);
2379
2390
  return /* @__PURE__ */ o(
2380
2391
  "div",
2381
2392
  {
2382
- className: i(
2393
+ className: s(
2383
2394
  "relative flex",
2384
- S && "bg-calendar-disabled-hour",
2395
+ M && "bg-calendar-disabled-hour",
2385
2396
  u?.timeSlot,
2386
- S ? u?.timeSlotNonWorking : u?.timeSlotWorking
2397
+ M ? u?.timeSlotNonWorking : u?.timeSlotWorking
2387
2398
  ),
2388
2399
  style: { height: we },
2389
2400
  children: [
2390
2401
  /* @__PURE__ */ e(
2391
2402
  "div",
2392
2403
  {
2393
- className: i(
2404
+ className: s(
2394
2405
  "relative flex-shrink-0 border-r border-border/50 bg-zinc-50 dark:bg-zinc-900",
2395
2406
  u?.timeGutter
2396
2407
  ),
@@ -2398,7 +2409,7 @@ function Jn({
2398
2409
  children: /* @__PURE__ */ e("div", { className: "absolute -top-2.5 right-1 sm:right-2 flex h-5 items-center", children: c !== 0 && /* @__PURE__ */ e(
2399
2410
  "span",
2400
2411
  {
2401
- className: i(
2412
+ className: s(
2402
2413
  "text-[10px] sm:text-xs text-muted-foreground",
2403
2414
  u?.timeGutterLabel
2404
2415
  ),
@@ -2408,36 +2419,36 @@ function Jn({
2408
2419
  }
2409
2420
  ),
2410
2421
  /* @__PURE__ */ o("div", { className: "relative flex-1", children: [
2411
- j && !S && /* @__PURE__ */ e("div", { className: "absolute inset-0 bg-primary/5" }),
2422
+ j && !M && /* @__PURE__ */ e("div", { className: "absolute inset-0 bg-primary/5" }),
2412
2423
  c !== 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-x-0 top-0 border-b border-border/50" }),
2413
- N.slice(1).map((C) => /* @__PURE__ */ e(
2424
+ N.slice(1).map((k) => /* @__PURE__ */ e(
2414
2425
  "div",
2415
2426
  {
2416
2427
  className: "pointer-events-none absolute inset-x-0 border-b border-dashed border-border/30",
2417
- style: { top: `${C / 60 * 100}%` }
2428
+ style: { top: `${k / 60 * 100}%` }
2418
2429
  },
2419
- C
2430
+ k
2420
2431
  )),
2421
- N.map((C, P) => {
2422
- const O = { date: n, hour: w, minute: C };
2432
+ N.map((k, O) => {
2433
+ const P = { date: n, hour: w, minute: k };
2423
2434
  return /* @__PURE__ */ e(
2424
2435
  Nt,
2425
2436
  {
2426
- slot: O,
2427
- onSelectionStart: I,
2437
+ slot: P,
2438
+ onSelectionStart: _,
2428
2439
  onSelectionMove: H,
2429
- onSelectionEnd: z,
2430
- isSelected: E?.isSlotSelected(O) ?? !1,
2440
+ onSelectionEnd: S,
2441
+ isSelected: E?.isSlotSelected(P) ?? !1,
2431
2442
  isSelecting: E?.isSelecting ?? !1,
2432
- disabled: S,
2443
+ disabled: M,
2433
2444
  className: "absolute inset-x-0",
2434
2445
  style: {
2435
- top: `${P * p}%`,
2436
- height: `${p}%`
2446
+ top: `${O * f}%`,
2447
+ height: `${f}%`
2437
2448
  },
2438
- ariaLabel: `Add event at ${Ae(w)}:${String(C).padStart(2, "0")}`
2449
+ ariaLabel: `Add event at ${Ae(w)}:${String(k).padStart(2, "0")}`
2439
2450
  },
2440
- C
2451
+ k
2441
2452
  );
2442
2453
  })
2443
2454
  ] })
@@ -2451,10 +2462,10 @@ function Jn({
2451
2462
  {
2452
2463
  className: "absolute top-0 bottom-0 right-0 pointer-events-none",
2453
2464
  style: { left: _e },
2454
- children: L.map((w) => {
2455
- const c = T.get(w.id);
2465
+ children: W.map((w) => {
2466
+ const c = z.get(w.id);
2456
2467
  if (!c) return null;
2457
- const m = `calc(${c.width}% - 2px)`, S = `max(${Ie}px, ${m})`;
2468
+ const m = `calc(${c.width}% - 2px)`, M = `max(${Ie}px, ${m})`;
2458
2469
  return l ? /* @__PURE__ */ e(
2459
2470
  "div",
2460
2471
  {
@@ -2462,7 +2473,7 @@ function Jn({
2462
2473
  style: {
2463
2474
  top: `${c.top}px`,
2464
2475
  left: `${c.left}%`,
2465
- width: S,
2476
+ width: M,
2466
2477
  minWidth: `${Ie}px`
2467
2478
  },
2468
2479
  children: l({ event: w, position: c })
@@ -2479,26 +2490,26 @@ function Jn({
2479
2490
  minWidth: Ie
2480
2491
  },
2481
2492
  hourHeight: we,
2482
- badgeVariant: h,
2483
- onClick: s,
2484
- disablePopover: !!s && !b,
2493
+ badgeVariant: p,
2494
+ onClick: i,
2495
+ disablePopover: !!i && !b,
2485
2496
  renderPopover: b,
2486
- className: i("pointer-events-auto", u?.eventCard)
2497
+ className: s("pointer-events-auto", u?.eventCard)
2487
2498
  },
2488
2499
  w.id
2489
2500
  );
2490
2501
  })
2491
2502
  }
2492
2503
  ),
2493
- j && B >= 0 && /* @__PURE__ */ o(
2504
+ j && I >= 0 && /* @__PURE__ */ o(
2494
2505
  "div",
2495
2506
  {
2496
- className: i(
2507
+ className: s(
2497
2508
  "absolute left-0 right-0 z-20 flex items-center pointer-events-none",
2498
2509
  u?.currentTimeIndicator
2499
2510
  ),
2500
2511
  style: {
2501
- top: B,
2512
+ top: I,
2502
2513
  left: _e
2503
2514
  },
2504
2515
  children: [
@@ -2520,7 +2531,7 @@ const Wn = [
2520
2531
  { full: "Friday", short: "Fri", tiny: "F" },
2521
2532
  { full: "Saturday", short: "Sat", tiny: "S" },
2522
2533
  { full: "Sunday", short: "Sun", tiny: "S" }
2523
- ], Ln = [
2534
+ ], Rn = [
2524
2535
  { full: "Sunday", short: "Sun", tiny: "S" },
2525
2536
  { full: "Monday", short: "Mon", tiny: "M" },
2526
2537
  { full: "Tuesday", short: "Tue", tiny: "T" },
@@ -2529,104 +2540,104 @@ const Wn = [
2529
2540
  { full: "Friday", short: "Fri", tiny: "F" },
2530
2541
  { full: "Saturday", short: "Sat", tiny: "S" }
2531
2542
  ], ve = 3;
2532
- function Zn({
2543
+ function Qn({
2533
2544
  events: t,
2534
2545
  date: n,
2535
2546
  weekStartsOn: r = 1,
2536
2547
  badgeVariant: a = "colored",
2537
2548
  onEventClick: d,
2538
- onSlotSelect: h,
2539
- onDayClick: s,
2549
+ onSlotSelect: p,
2550
+ onDayClick: i,
2540
2551
  className: y,
2541
- renderEvent: k,
2552
+ renderEvent: D,
2542
2553
  renderPopover: l,
2543
2554
  showMoreMode: b,
2544
2555
  showMoreEventsInPopover: v = !1,
2545
2556
  slots: u,
2546
2557
  classNames: x
2547
2558
  }) {
2548
- const p = b ?? (v ? "popover" : "expand"), N = u?.dayCellHeader, g = u?.dayCellFooter, [L, D] = Q(null), [T, _] = Q(null), U = K(() => Tt(n, r), [n, r]), j = K(() => {
2549
- const f = /* @__PURE__ */ new Map();
2550
- for (const R of U) {
2551
- const A = R.date.toDateString(), F = Fe(t, R.date);
2552
- F.sort((w, c) => w.startDate.getTime() - c.startDate.getTime()), f.set(A, F);
2559
+ const f = b ?? (v ? "popover" : "expand"), N = u?.dayCellHeader, g = u?.dayCellFooter, [W, C] = Q(null), [z, R] = Q(null), U = K(() => zt(n, r), [n, r]), j = K(() => {
2560
+ const h = /* @__PURE__ */ new Map();
2561
+ for (const B of U) {
2562
+ const A = B.date.toDateString(), F = Fe(t, B.date);
2563
+ F.sort((w, c) => w.startDate.getTime() - c.startDate.getTime()), h.set(A, F);
2553
2564
  }
2554
- return f;
2555
- }, [U, t]), B = Ge(), M = W(
2556
- (f) => {
2557
- B?.startSelection(f);
2565
+ return h;
2566
+ }, [U, t]), I = Ge(), T = L(
2567
+ (h) => {
2568
+ I?.startSelection(h);
2558
2569
  },
2559
- [B]
2560
- ), E = W(
2561
- (f) => {
2562
- B?.updateSelection(f);
2570
+ [I]
2571
+ ), E = L(
2572
+ (h) => {
2573
+ I?.updateSelection(h);
2563
2574
  },
2564
- [B]
2565
- ), I = W(() => {
2566
- B?.endSelection();
2567
- }, [B]), H = W(
2568
- (f) => {
2569
- s?.(f);
2575
+ [I]
2576
+ ), _ = L(() => {
2577
+ I?.endSelection();
2578
+ }, [I]), H = L(
2579
+ (h) => {
2580
+ i?.(h);
2570
2581
  },
2571
- [s]
2572
- ), z = r === 0 ? Ln : Wn;
2573
- return /* @__PURE__ */ o("div", { className: i("flex flex-col h-full overflow-hidden", y), children: [
2582
+ [i]
2583
+ ), S = r === 0 ? Rn : Wn;
2584
+ return /* @__PURE__ */ o("div", { className: s("flex flex-col h-full overflow-hidden", y), children: [
2574
2585
  /* @__PURE__ */ e("div", { className: "flex flex-col flex-1 overflow-auto", children: /* @__PURE__ */ o("div", { className: "flex flex-col flex-1 min-w-[560px] sm:min-w-0", children: [
2575
2586
  /* @__PURE__ */ e(
2576
2587
  "div",
2577
2588
  {
2578
- className: i(
2589
+ className: s(
2579
2590
  "grid grid-cols-7 border-b !sticky !top-0 bg-background z-10",
2580
2591
  x?.weekdayHeader
2581
2592
  ),
2582
- children: z.map((f, R) => /* @__PURE__ */ o(
2593
+ children: S.map((h, B) => /* @__PURE__ */ o(
2583
2594
  "div",
2584
2595
  {
2585
- className: i(
2596
+ className: s(
2586
2597
  "py-2 sm:py-2.5 text-center text-[11px] uppercase font-medium tracking-wide text-muted-foreground",
2587
- R >= 5 && "text-muted-foreground/70",
2598
+ B >= 5 && "text-muted-foreground/70",
2588
2599
  // Weekend
2589
2600
  x?.weekdayLabel
2590
2601
  ),
2591
2602
  children: [
2592
- /* @__PURE__ */ e("span", { className: "sm:hidden", children: f.short }),
2593
- /* @__PURE__ */ e("span", { className: "hidden sm:inline", children: f.short })
2603
+ /* @__PURE__ */ e("span", { className: "sm:hidden", children: h.short }),
2604
+ /* @__PURE__ */ e("span", { className: "hidden sm:inline", children: h.short })
2594
2605
  ]
2595
2606
  },
2596
- f.full
2607
+ h.full
2597
2608
  ))
2598
2609
  }
2599
2610
  ),
2600
- /* @__PURE__ */ e("div", { className: i("grid grid-cols-7 auto-rows-min", x?.monthGrid), children: U.map((f) => {
2601
- const R = f.date.toDateString(), A = j.get(R) || [], F = ce(f.date), w = f.date.getDay() === 0 || f.date.getDay() === 6, c = A.length > ve;
2611
+ /* @__PURE__ */ e("div", { className: s("grid grid-cols-7 auto-rows-min", x?.monthGrid), children: U.map((h) => {
2612
+ const B = h.date.toDateString(), A = j.get(B) || [], F = ce(h.date), w = h.date.getDay() === 0 || h.date.getDay() === 6, c = A.length > ve;
2602
2613
  return /* @__PURE__ */ o(
2603
- En,
2614
+ Ln,
2604
2615
  {
2605
- date: f.date,
2606
- dataAttributes: { "data-day-key": R },
2607
- onSelectionStart: M,
2616
+ date: h.date,
2617
+ dataAttributes: { "data-day-key": B },
2618
+ onSelectionStart: T,
2608
2619
  onSelectionMove: E,
2609
- onSelectionEnd: I,
2610
- isSelected: B?.isSlotSelected({ date: f.date }) ?? !1,
2611
- isSelecting: B?.isSelecting ?? !1,
2612
- className: i(
2620
+ onSelectionEnd: _,
2621
+ isSelected: I?.isSlotSelected({ date: h.date }) ?? !1,
2622
+ isSelecting: I?.isSelecting ?? !1,
2623
+ className: s(
2613
2624
  "relative flex flex-col border-r border-b text-left min-h-[80px] sm:min-h-[100px] overflow-hidden",
2614
2625
  "[&:nth-child(7n)]:border-r-0",
2615
- !f.isCurrentMonth && "bg-muted/20",
2616
- w && f.isCurrentMonth && "bg-muted/10",
2626
+ !h.isCurrentMonth && "bg-muted/20",
2627
+ w && h.isCurrentMonth && "bg-muted/10",
2617
2628
  x?.dayCell,
2618
2629
  F && x?.dayCellToday,
2619
- !f.isCurrentMonth && x?.dayCellOutside,
2630
+ !h.isCurrentMonth && x?.dayCellOutside,
2620
2631
  w && x?.dayCellWeekend
2621
2632
  ),
2622
- ariaLabel: `${f.date.toLocaleDateString()} - ${A.length} events. Click to create event, double-click to view day.`,
2633
+ ariaLabel: `${h.date.toLocaleDateString()} - ${A.length} events. Click to create event, double-click to view day.`,
2623
2634
  children: [
2624
2635
  /* @__PURE__ */ e(
2625
2636
  "div",
2626
2637
  {
2627
- className: i(
2638
+ className: s(
2628
2639
  "flex items-center justify-center p-1",
2629
- !f.isCurrentMonth && "text-muted-foreground/40",
2640
+ !h.isCurrentMonth && "text-muted-foreground/40",
2630
2641
  x?.dayCellNumber
2631
2642
  ),
2632
2643
  children: /* @__PURE__ */ e(
@@ -2634,14 +2645,14 @@ function Zn({
2634
2645
  {
2635
2646
  type: "button",
2636
2647
  onClick: (m) => {
2637
- m.stopPropagation(), H(f.date);
2648
+ m.stopPropagation(), H(h.date);
2638
2649
  },
2639
- className: i(
2650
+ className: s(
2640
2651
  "flex items-center justify-center rounded-full transition-colors",
2641
2652
  "size-7 text-sm font-normal",
2642
2653
  F ? "bg-primary text-primary-foreground" : "hover:bg-muted"
2643
2654
  ),
2644
- children: f.date.getDate()
2655
+ children: h.date.getDate()
2645
2656
  }
2646
2657
  )
2647
2658
  }
@@ -2649,10 +2660,10 @@ function Zn({
2649
2660
  N && /* @__PURE__ */ e(
2650
2661
  N,
2651
2662
  {
2652
- date: f.date,
2663
+ date: h.date,
2653
2664
  events: A,
2654
2665
  isToday: F,
2655
- isCurrentMonth: f.isCurrentMonth,
2666
+ isCurrentMonth: h.isCurrentMonth,
2656
2667
  isWeekend: w,
2657
2668
  view: "month"
2658
2669
  }
@@ -2660,7 +2671,7 @@ function Zn({
2660
2671
  /* @__PURE__ */ o(
2661
2672
  "div",
2662
2673
  {
2663
- className: i(
2674
+ className: s(
2664
2675
  "flex-1 overflow-hidden px-2 pt-1 pb-1 space-y-1",
2665
2676
  x?.dayCellContent
2666
2677
  ),
@@ -2668,10 +2679,10 @@ function Zn({
2668
2679
  A.slice(0, ve).map((m) => /* @__PURE__ */ e(
2669
2680
  "div",
2670
2681
  {
2671
- onPointerDown: (S) => {
2672
- S.stopPropagation();
2682
+ onPointerDown: (M) => {
2683
+ M.stopPropagation();
2673
2684
  },
2674
- children: k ? k({ event: m, variant: "compact" }) : /* @__PURE__ */ e(
2685
+ children: D ? D({ event: m, variant: "compact" }) : /* @__PURE__ */ e(
2675
2686
  Ee,
2676
2687
  {
2677
2688
  event: m,
@@ -2690,21 +2701,21 @@ function Zn({
2690
2701
  },
2691
2702
  m.id
2692
2703
  )),
2693
- c && p === "expand" && /* @__PURE__ */ o(
2704
+ c && f === "expand" && /* @__PURE__ */ o(
2694
2705
  "button",
2695
2706
  {
2696
2707
  type: "button",
2697
2708
  onPointerDown: (m) => m.stopPropagation(),
2698
2709
  onClick: (m) => {
2699
2710
  m.stopPropagation();
2700
- const S = document.querySelector(`[data-day-key="${R}"]`);
2701
- _({
2702
- date: f.date,
2711
+ const M = document.querySelector(`[data-day-key="${B}"]`);
2712
+ R({
2713
+ date: h.date,
2703
2714
  events: A,
2704
- rect: S?.getBoundingClientRect() ?? new DOMRect(window.innerWidth / 2 - 180, window.innerHeight / 2 - 240, 0, 0)
2715
+ rect: M?.getBoundingClientRect() ?? new DOMRect(window.innerWidth / 2 - 180, window.innerHeight / 2 - 240, 0, 0)
2705
2716
  });
2706
2717
  },
2707
- className: i(
2718
+ className: s(
2708
2719
  "w-full text-left text-xs text-muted-foreground hover:text-foreground hover:underline px-1.5 cursor-pointer",
2709
2720
  x?.moreEventsIndicator
2710
2721
  ),
@@ -2715,11 +2726,11 @@ function Zn({
2715
2726
  ]
2716
2727
  }
2717
2728
  ),
2718
- c && p === "popover" && /* @__PURE__ */ o(
2729
+ c && f === "popover" && /* @__PURE__ */ o(
2719
2730
  ue,
2720
2731
  {
2721
- open: L === R,
2722
- onOpenChange: (m) => D(m ? R : null),
2732
+ open: W === B,
2733
+ onOpenChange: (m) => C(m ? B : null),
2723
2734
  children: [
2724
2735
  /* @__PURE__ */ e(me, { asChild: !0, children: /* @__PURE__ */ o(
2725
2736
  "button",
@@ -2727,9 +2738,9 @@ function Zn({
2727
2738
  type: "button",
2728
2739
  onPointerDown: (m) => m.stopPropagation(),
2729
2740
  onClick: (m) => {
2730
- m.stopPropagation(), D(R);
2741
+ m.stopPropagation(), C(B);
2731
2742
  },
2732
- className: i(
2743
+ className: s(
2733
2744
  "w-full text-left text-xs text-muted-foreground hover:text-foreground hover:underline px-1.5 cursor-pointer",
2734
2745
  x?.moreEventsIndicator
2735
2746
  ),
@@ -2750,7 +2761,7 @@ function Zn({
2750
2761
  onPointerDown: (m) => m.stopPropagation(),
2751
2762
  children: [
2752
2763
  /* @__PURE__ */ o("div", { className: "flex items-center justify-between mb-2 pb-2 border-b", children: [
2753
- /* @__PURE__ */ e("span", { className: "text-sm font-medium", children: f.date.toLocaleDateString(void 0, {
2764
+ /* @__PURE__ */ e("span", { className: "text-sm font-medium", children: h.date.toLocaleDateString(void 0, {
2754
2765
  weekday: "short",
2755
2766
  month: "short",
2756
2767
  day: "numeric"
@@ -2760,14 +2771,14 @@ function Zn({
2760
2771
  " events"
2761
2772
  ] })
2762
2773
  ] }),
2763
- /* @__PURE__ */ e("div", { className: "space-y-1.5", children: A.map((m) => /* @__PURE__ */ e("div", { children: k ? k({ event: m, variant: "compact" }) : /* @__PURE__ */ e(
2774
+ /* @__PURE__ */ e("div", { className: "space-y-1.5", children: A.map((m) => /* @__PURE__ */ e("div", { children: D ? D({ event: m, variant: "compact" }) : /* @__PURE__ */ e(
2764
2775
  Ee,
2765
2776
  {
2766
2777
  event: m,
2767
2778
  variant: "compact",
2768
2779
  badgeVariant: a,
2769
- onClick: (S) => {
2770
- D(null), d?.(S);
2780
+ onClick: (M) => {
2781
+ C(null), d?.(M);
2771
2782
  },
2772
2783
  disablePopover: !!d && !l,
2773
2784
  renderPopover: l,
@@ -2780,13 +2791,13 @@ function Zn({
2780
2791
  ]
2781
2792
  }
2782
2793
  ),
2783
- c && p === "dayView" && /* @__PURE__ */ o(
2794
+ c && f === "dayView" && /* @__PURE__ */ o(
2784
2795
  "div",
2785
2796
  {
2786
2797
  onPointerDown: (m) => {
2787
- m.stopPropagation(), H(f.date);
2798
+ m.stopPropagation(), H(h.date);
2788
2799
  },
2789
- className: i(
2800
+ className: s(
2790
2801
  "w-full text-left text-xs text-muted-foreground hover:text-foreground hover:underline px-1.5 cursor-pointer",
2791
2802
  x?.moreEventsIndicator
2792
2803
  ),
@@ -2803,102 +2814,102 @@ function Zn({
2803
2814
  g && /* @__PURE__ */ e(
2804
2815
  g,
2805
2816
  {
2806
- date: f.date,
2817
+ date: h.date,
2807
2818
  events: A,
2808
2819
  isToday: F,
2809
- isCurrentMonth: f.isCurrentMonth,
2820
+ isCurrentMonth: h.isCurrentMonth,
2810
2821
  isWeekend: w,
2811
2822
  view: "month"
2812
2823
  }
2813
2824
  )
2814
2825
  ]
2815
2826
  },
2816
- R
2827
+ B
2817
2828
  );
2818
2829
  }) })
2819
2830
  ] }) }),
2820
2831
  /* @__PURE__ */ e(
2821
- Sn,
2832
+ Mn,
2822
2833
  {
2823
- isOpen: T !== null,
2824
- onClose: () => _(null),
2825
- date: T?.date ?? /* @__PURE__ */ new Date(),
2826
- events: T?.events ?? [],
2827
- anchorRect: T?.rect ?? null,
2834
+ isOpen: z !== null,
2835
+ onClose: () => R(null),
2836
+ date: z?.date ?? /* @__PURE__ */ new Date(),
2837
+ events: z?.events ?? [],
2838
+ anchorRect: z?.rect ?? null,
2828
2839
  badgeVariant: a,
2829
2840
  onEventClick: d,
2830
- renderEvent: k,
2841
+ renderEvent: D,
2831
2842
  renderPopover: l
2832
2843
  }
2833
2844
  )
2834
2845
  ] });
2835
2846
  }
2836
- const We = 26, rt = 2, Me = 4;
2847
+ const Le = 26, rt = 2, Me = 4;
2837
2848
  function ot(t, n) {
2838
2849
  const r = Ke(t);
2839
2850
  for (let d = 0; d < n.length; d++) {
2840
- const h = n[d];
2841
- if (h && se(r, h)) return d;
2851
+ const p = n[d];
2852
+ if (p && ie(r, p)) return d;
2842
2853
  }
2843
2854
  const a = n[0];
2844
2855
  return a && r < Ke(a) ? -1 : 7;
2845
2856
  }
2846
- function Rn(t) {
2857
+ function _n(t) {
2847
2858
  const n = [...t].sort((a, d) => {
2848
- const h = a.endCol - a.startCol, s = d.endCol - d.startCol;
2849
- return s !== h ? s - h : a.startCol - d.startCol;
2859
+ const p = a.endCol - a.startCol, i = d.endCol - d.startCol;
2860
+ return i !== p ? i - p : a.startCol - d.startCol;
2850
2861
  }), r = [];
2851
2862
  return n.map((a) => {
2852
2863
  let d = -1;
2853
- for (let s = 0; s < r.length; s++) {
2854
- const y = r[s];
2864
+ for (let i = 0; i < r.length; i++) {
2865
+ const y = r[i];
2855
2866
  if (!y) continue;
2856
- let k = !0;
2867
+ let D = !0;
2857
2868
  for (let l = a.startCol; l <= a.endCol; l++)
2858
2869
  if (y[l]) {
2859
- k = !1;
2870
+ D = !1;
2860
2871
  break;
2861
2872
  }
2862
- if (k) {
2863
- d = s;
2873
+ if (D) {
2874
+ d = i;
2864
2875
  break;
2865
2876
  }
2866
2877
  }
2867
2878
  d === -1 && (d = r.length, r.push(new Array(7).fill(!1)));
2868
- const h = r[d];
2869
- if (h)
2870
- for (let s = a.startCol; s <= a.endCol; s++)
2871
- h[s] = !0;
2879
+ const p = r[d];
2880
+ if (p)
2881
+ for (let i = a.startCol; i <= a.endCol; i++)
2882
+ p[i] = !0;
2872
2883
  return { ...a, row: d };
2873
2884
  });
2874
2885
  }
2875
- function _n({
2886
+ function In({
2876
2887
  pe: t,
2877
2888
  onEventClick: n,
2878
2889
  disablePopover: r,
2879
2890
  renderPopover: a
2880
2891
  }) {
2881
- const [d, h] = Q(!1), s = de(t.event.color), y = W(() => {
2882
- r && n ? n(t.event) : r || h(!0);
2883
- }, [r, n, t.event]), k = W(() => {
2884
- h(!1);
2892
+ const [d, p] = Q(!1), i = de(t.event.color), y = L(() => {
2893
+ r && n ? n(t.event) : r || p(!0);
2894
+ }, [r, n, t.event]), D = L(() => {
2895
+ p(!1);
2885
2896
  }, []), l = /* @__PURE__ */ o(
2886
2897
  "button",
2887
2898
  {
2888
2899
  type: "button",
2889
2900
  onClick: y,
2890
- className: i(
2901
+ className: s(
2891
2902
  "inline-flex items-center gap-1 rounded text-[10px] font-medium transition-opacity hover:opacity-80 mx-0.5 overflow-hidden w-full",
2892
2903
  "sm:text-xs",
2893
- s.bg,
2894
- s.text,
2904
+ i.bg,
2905
+ i.text,
2895
2906
  t.event.isCanceled && "opacity-60 line-through",
2896
2907
  t.continuesBefore && "rounded-l-none -ml-0.5 pl-1",
2897
2908
  t.continuesAfter && "rounded-r-none -mr-0.5 pr-1"
2898
2909
  ),
2899
2910
  style: {
2900
- height: We,
2901
- lineHeight: `${We}px`,
2911
+ height: Le,
2912
+ lineHeight: `${Le}px`,
2902
2913
  paddingLeft: t.continuesBefore ? 4 : 6,
2903
2914
  paddingRight: t.continuesAfter ? 4 : 6
2904
2915
  },
@@ -2917,26 +2928,26 @@ function _n({
2917
2928
  gridRow: t.row + 1
2918
2929
  };
2919
2930
  return r ? /* @__PURE__ */ e("div", { style: v, children: /* @__PURE__ */ o(ae, { children: [
2920
- /* @__PURE__ */ e(ie, { asChild: !0, children: l }),
2931
+ /* @__PURE__ */ e(se, { asChild: !0, children: l }),
2921
2932
  b
2922
- ] }) }) : /* @__PURE__ */ e("div", { style: v, children: /* @__PURE__ */ o(ue, { open: d, onOpenChange: h, children: [
2933
+ ] }) }) : /* @__PURE__ */ e("div", { style: v, children: /* @__PURE__ */ o(ue, { open: d, onOpenChange: p, children: [
2923
2934
  /* @__PURE__ */ e(me, { asChild: !0, children: l }),
2924
- /* @__PURE__ */ e(le, { className: "w-80", children: a ? a({ event: t.event, onClose: k }) : /* @__PURE__ */ e(In, { event: t.event, onClose: k }) })
2935
+ /* @__PURE__ */ e(le, { className: "w-80", children: a ? a({ event: t.event, onClose: D }) : /* @__PURE__ */ e(Bn, { event: t.event, onClose: D }) })
2925
2936
  ] }) });
2926
2937
  }
2927
- function In({
2938
+ function Bn({
2928
2939
  event: t,
2929
2940
  onClose: n
2930
2941
  }) {
2931
2942
  const r = de(t.color), a = t.isCanceled ?? !1;
2932
2943
  return /* @__PURE__ */ o("div", { className: "space-y-3", children: [
2933
2944
  /* @__PURE__ */ o("div", { className: "flex items-start gap-3", children: [
2934
- /* @__PURE__ */ e("div", { className: i("size-4 rounded shrink-0 mt-0.5", r.dot) }),
2945
+ /* @__PURE__ */ e("div", { className: s("size-4 rounded shrink-0 mt-0.5", r.dot) }),
2935
2946
  /* @__PURE__ */ o("div", { className: "flex-1 min-w-0", children: [
2936
2947
  /* @__PURE__ */ e(
2937
2948
  "h3",
2938
2949
  {
2939
- className: i(
2950
+ className: s(
2940
2951
  "font-semibold text-lg",
2941
2952
  a && "line-through opacity-50"
2942
2953
  ),
@@ -2962,50 +2973,50 @@ function In({
2962
2973
  ) })
2963
2974
  ] });
2964
2975
  }
2965
- function Bn({
2976
+ function $n({
2966
2977
  events: t,
2967
2978
  weekDays: n,
2968
2979
  hourColumnWidth: r,
2969
2980
  minDayColumnWidth: a,
2970
2981
  dayColumnWidths: d,
2971
- onEventClick: h,
2972
- disablePopover: s = !1,
2982
+ onEventClick: p,
2983
+ disablePopover: i = !1,
2973
2984
  renderPopover: y,
2974
- className: k
2985
+ className: D
2975
2986
  }) {
2976
2987
  const l = K(() => {
2977
2988
  if (t.length === 0) return [];
2978
- const g = t.map((L) => {
2979
- const D = ot(L.startDate, n), T = ot(L.endDate, n), _ = Math.max(0, D), U = Math.min(6, T);
2980
- if (_ > 6 || U < 0) return null;
2981
- const j = D < 0, B = T > 6, E = ze(L) && se(L.startDate, L.endDate);
2989
+ const g = t.map((W) => {
2990
+ const C = ot(W.startDate, n), z = ot(W.endDate, n), R = Math.max(0, C), U = Math.min(6, z);
2991
+ if (R > 6 || U < 0) return null;
2992
+ const j = C < 0, I = z > 6, E = ze(W) && ie(W.startDate, W.endDate);
2982
2993
  return {
2983
- event: L,
2984
- startCol: _,
2994
+ event: W,
2995
+ startCol: R,
2985
2996
  endCol: U,
2986
2997
  continuesBefore: j,
2987
- continuesAfter: B,
2998
+ continuesAfter: I,
2988
2999
  isSingleDayAllDay: E
2989
3000
  };
2990
3001
  }).filter(Boolean);
2991
- return Rn(g);
3002
+ return _n(g);
2992
3003
  }, [t, n]);
2993
3004
  if (l.length === 0) return null;
2994
- const b = Math.max(...l.map((g) => g.row)) + 1, v = Math.min(b, Me), u = b > Me, x = u ? l.filter((g) => g.row >= Me).length : 0, p = [
3005
+ const b = Math.max(...l.map((g) => g.row)) + 1, v = Math.min(b, Me), u = b > Me, x = u ? l.filter((g) => g.row >= Me).length : 0, f = [
2995
3006
  `${r}px`,
2996
3007
  ...d.map((g) => g > a ? `${g}px` : `minmax(${a}px, 1fr)`)
2997
- ].join(" "), N = v * We + (v - 1) * rt + 8;
3008
+ ].join(" "), N = v * Le + (v - 1) * rt + 8;
2998
3009
  return /* @__PURE__ */ o(
2999
3010
  "div",
3000
3011
  {
3001
- className: i(
3012
+ className: s(
3002
3013
  "ic-all-day-row border-b bg-muted/20 relative",
3003
- k
3014
+ D
3004
3015
  ),
3005
3016
  style: {
3006
3017
  display: "grid",
3007
- gridTemplateColumns: p,
3008
- gridTemplateRows: `repeat(${v}, ${We}px)`,
3018
+ gridTemplateColumns: f,
3019
+ gridTemplateRows: `repeat(${v}, ${Le}px)`,
3009
3020
  gap: `${rt}px 0`,
3010
3021
  paddingTop: 4,
3011
3022
  paddingBottom: 4,
@@ -3023,23 +3034,23 @@ function Bn({
3023
3034
  children: /* @__PURE__ */ e("span", { className: "hidden sm:inline", children: "All day" })
3024
3035
  }
3025
3036
  ),
3026
- n.map((g, L) => /* @__PURE__ */ e(
3037
+ n.map((g, W) => /* @__PURE__ */ e(
3027
3038
  "div",
3028
3039
  {
3029
3040
  className: "pointer-events-none border-r last:border-r-0",
3030
3041
  style: {
3031
- gridColumn: L + 2,
3042
+ gridColumn: W + 2,
3032
3043
  gridRow: `1 / span ${v}`
3033
3044
  }
3034
3045
  },
3035
3046
  g.toDateString()
3036
3047
  )),
3037
3048
  l.filter((g) => g.row < Me).map((g) => /* @__PURE__ */ e(
3038
- _n,
3049
+ In,
3039
3050
  {
3040
3051
  pe: g,
3041
- onEventClick: h,
3042
- disablePopover: s,
3052
+ onEventClick: p,
3053
+ disablePopover: i,
3043
3054
  renderPopover: y
3044
3055
  },
3045
3056
  g.event.id
@@ -3063,40 +3074,40 @@ function Bn({
3063
3074
  }
3064
3075
  );
3065
3076
  }
3066
- const he = 96, Ne = 56, at = 72, te = 120, Te = 100, $n = 3;
3067
- function Qn({
3077
+ const he = 96, Ne = 56, at = 72, te = 120, Te = 100, Hn = 3;
3078
+ function er({
3068
3079
  events: t,
3069
3080
  date: n,
3070
3081
  weekStartsOn: r = 1,
3071
3082
  visibleHours: a = { startHour: 0, endHour: 24 },
3072
3083
  workingHours: d,
3073
- slotDuration: h = 30,
3074
- badgeVariant: s = "colored",
3084
+ slotDuration: p = 30,
3085
+ badgeVariant: i = "colored",
3075
3086
  onEventClick: y,
3076
- onSlotSelect: k,
3087
+ onSlotSelect: D,
3077
3088
  onDayClick: l,
3078
3089
  className: b,
3079
3090
  renderEvent: v,
3080
3091
  renderPopover: u,
3081
3092
  slots: x,
3082
- classNames: p
3093
+ classNames: f
3083
3094
  }) {
3084
- const N = 60 / h, g = 100 / N, L = K(() => {
3095
+ const N = 60 / p, g = 100 / N, W = K(() => {
3085
3096
  const c = [];
3086
3097
  for (let m = 0; m < N; m++)
3087
- c.push(m * h);
3098
+ c.push(m * p);
3088
3099
  return c;
3089
- }, [N, h]), D = K(
3090
- () => zt(n, r),
3100
+ }, [N, p]), C = K(
3101
+ () => At(n, r),
3091
3102
  [n, r]
3092
- ), T = K(
3103
+ ), z = K(
3093
3104
  () => lt(a),
3094
3105
  [a]
3095
- ), _ = K(() => {
3106
+ ), R = K(() => {
3096
3107
  const c = /* @__PURE__ */ new Map();
3097
- for (const m of D) {
3098
- const S = m.toDateString(), C = Fe(t, m), { singleDay: P, multiDay: O } = it(C), $ = st(
3099
- P,
3108
+ for (const m of C) {
3109
+ const M = m.toDateString(), k = Fe(t, m), { singleDay: O, multiDay: P } = st(k), $ = it(
3110
+ O,
3100
3111
  m,
3101
3112
  a,
3102
3113
  he
@@ -3107,96 +3118,96 @@ function Qn({
3107
3118
  const ee = Math.round(100 / Z.position.width);
3108
3119
  oe = Math.max(oe, ee);
3109
3120
  }
3110
- c.set(S, {
3111
- singleDay: P,
3112
- multiDay: O,
3121
+ c.set(M, {
3122
+ singleDay: O,
3123
+ multiDay: P,
3113
3124
  positions: G,
3114
3125
  maxOverlapping: oe
3115
3126
  });
3116
3127
  }
3117
3128
  return c;
3118
- }, [D, t, a]), U = K(() => {
3129
+ }, [C, t, a]), U = K(() => {
3119
3130
  const c = /* @__PURE__ */ new Map();
3120
- for (const { multiDay: m } of _.values())
3121
- for (const S of m)
3122
- c.set(S.id, S);
3131
+ for (const { multiDay: m } of R.values())
3132
+ for (const M of m)
3133
+ c.set(M.id, M);
3123
3134
  return Array.from(c.values());
3124
- }, [_]), j = /* @__PURE__ */ new Date(), B = D.findIndex((c) => ce(c)), M = K(() => {
3125
- if (B < 0) return -1;
3135
+ }, [R]), j = /* @__PURE__ */ new Date(), I = C.findIndex((c) => ce(c)), T = K(() => {
3136
+ if (I < 0) return -1;
3126
3137
  const c = j.getHours() + j.getMinutes() / 60;
3127
3138
  return c < a.startHour || c > a.endHour ? -1 : (c - a.startHour) * he;
3128
- }, [B, a, j]), E = ne(null);
3139
+ }, [I, a, j]), E = ne(null);
3129
3140
  je(() => {
3130
3141
  const c = E.current;
3131
3142
  if (!c) return;
3132
3143
  const m = () => {
3133
- let S;
3134
- if (B !== -1) {
3135
- const P = (/* @__PURE__ */ new Date()).getHours();
3136
- S = Math.max(P - 1, a.startHour);
3144
+ let M;
3145
+ if (I !== -1) {
3146
+ const O = (/* @__PURE__ */ new Date()).getHours();
3147
+ M = Math.max(O - 1, a.startHour);
3137
3148
  } else {
3138
- const O = (/* @__PURE__ */ new Date()).getDay();
3139
- let $ = d?.[O];
3149
+ const P = (/* @__PURE__ */ new Date()).getDay();
3150
+ let $ = d?.[P];
3140
3151
  if (!$?.enabled || $.from === 0) {
3141
3152
  const G = d?.[1];
3142
3153
  G?.enabled && ($ = G);
3143
3154
  }
3144
- $?.enabled && $.from > 0 ? S = Math.max(
3155
+ $?.enabled && $.from > 0 ? M = Math.max(
3145
3156
  $.from - 1,
3146
3157
  a.startHour
3147
- ) : S = Math.max(7, a.startHour);
3158
+ ) : M = Math.max(7, a.startHour);
3148
3159
  }
3149
- const C = (S - a.startHour) * he;
3160
+ const k = (M - a.startHour) * he;
3150
3161
  c.scrollTo({
3151
- top: C,
3162
+ top: k,
3152
3163
  behavior: "instant"
3153
3164
  });
3154
3165
  };
3155
3166
  requestAnimationFrame(() => {
3156
3167
  requestAnimationFrame(m);
3157
3168
  });
3158
- }, [n, d, a, B]);
3159
- const I = Ge(), H = W(
3169
+ }, [n, d, a, I]);
3170
+ const _ = Ge(), H = L(
3160
3171
  (c) => {
3161
- I?.startSelection(c);
3172
+ _?.startSelection(c);
3162
3173
  },
3163
- [I]
3164
- ), z = W(
3174
+ [_]
3175
+ ), S = L(
3165
3176
  (c) => {
3166
- I?.updateSelection(c);
3177
+ _?.updateSelection(c);
3167
3178
  },
3168
- [I]
3169
- ), f = W(() => {
3170
- I?.endSelection();
3171
- }, [I]), R = W(
3179
+ [_]
3180
+ ), h = L(() => {
3181
+ _?.endSelection();
3182
+ }, [_]), B = L(
3172
3183
  (c) => {
3173
3184
  y?.(c);
3174
3185
  },
3175
3186
  [y]
3176
3187
  ), A = Ne + 7 * te, F = K(() => {
3177
3188
  const c = [];
3178
- for (const m of D) {
3179
- const S = m.toDateString(), P = _.get(S)?.maxOverlapping ?? 1;
3180
- P > $n ? c.push(
3181
- Math.max(te, P * Te)
3189
+ for (const m of C) {
3190
+ const M = m.toDateString(), O = R.get(M)?.maxOverlapping ?? 1;
3191
+ O > Hn ? c.push(
3192
+ Math.max(te, O * Te)
3182
3193
  ) : c.push(te);
3183
3194
  }
3184
3195
  return c;
3185
- }, [D, _]), w = Ne + F.reduce((c, m) => c + m, 0);
3186
- return /* @__PURE__ */ o("div", { className: i("ic-week-view flex flex-col h-full", b), children: [
3196
+ }, [C, R]), w = Ne + F.reduce((c, m) => c + m, 0);
3197
+ return /* @__PURE__ */ o("div", { className: s("ic-week-view flex flex-col h-full", b), children: [
3187
3198
  U.length > 0 && /* @__PURE__ */ e(
3188
- Bn,
3199
+ $n,
3189
3200
  {
3190
3201
  events: U,
3191
- weekDays: D,
3202
+ weekDays: C,
3192
3203
  hourColumnWidth: Ne,
3193
3204
  minDayColumnWidth: te,
3194
3205
  dayColumnWidths: F,
3195
- onEventClick: R,
3206
+ onEventClick: B,
3196
3207
  disablePopover: !!y && !u,
3197
3208
  renderPopover: u,
3198
- ...p?.multiDayBanner && {
3199
- className: p.multiDayBanner
3209
+ ...f?.multiDayBanner && {
3210
+ className: f.multiDayBanner
3200
3211
  }
3201
3212
  }
3202
3213
  ),
@@ -3204,9 +3215,9 @@ function Qn({
3204
3215
  "div",
3205
3216
  {
3206
3217
  ref: E,
3207
- className: i(
3218
+ className: s(
3208
3219
  "ic-week-scroll-container flex-1",
3209
- p?.scrollContainer
3220
+ f?.scrollContainer
3210
3221
  ),
3211
3222
  children: /* @__PURE__ */ o("div", { style: { minWidth: Math.max(A, w) }, children: [
3212
3223
  /* @__PURE__ */ e("div", { className: "ic-week-header sticky top-0 z-20 border-b bg-background", children: /* @__PURE__ */ o("div", { className: "flex", children: [
@@ -3218,33 +3229,33 @@ function Qn({
3218
3229
  children: /* @__PURE__ */ o("span", { className: "hidden sm:inline", children: [
3219
3230
  "GMT",
3220
3231
  (() => {
3221
- const c = (/* @__PURE__ */ new Date()).getTimezoneOffset(), m = Math.abs(Math.floor(c / 60)), S = c <= 0 ? "+" : "-";
3222
- return m > 0 ? `${S}${String(m).padStart(2, "0")}` : "";
3232
+ const c = (/* @__PURE__ */ new Date()).getTimezoneOffset(), m = Math.abs(Math.floor(c / 60)), M = c <= 0 ? "+" : "-";
3233
+ return m > 0 ? `${M}${String(m).padStart(2, "0")}` : "";
3223
3234
  })()
3224
3235
  ] })
3225
3236
  }
3226
3237
  ),
3227
- D.map((c, m) => {
3228
- const S = ce(c), C = F[m] ?? te, P = C > te;
3238
+ C.map((c, m) => {
3239
+ const M = ce(c), k = F[m] ?? te, O = k > te;
3229
3240
  return /* @__PURE__ */ o(
3230
3241
  "div",
3231
3242
  {
3232
- className: i(
3243
+ className: s(
3233
3244
  "flex-1 flex flex-col items-center justify-center border-r last:border-r-0 py-2",
3234
- p?.columnHeader,
3235
- S && p?.columnHeaderToday
3245
+ f?.columnHeader,
3246
+ M && f?.columnHeaderToday
3236
3247
  ),
3237
3248
  style: {
3238
3249
  height: at,
3239
- minWidth: P ? C : te
3250
+ minWidth: O ? k : te
3240
3251
  },
3241
3252
  children: [
3242
3253
  /* @__PURE__ */ e(
3243
3254
  "span",
3244
3255
  {
3245
- className: i(
3256
+ className: s(
3246
3257
  "text-[11px] font-medium uppercase tracking-wide",
3247
- S ? "text-primary" : "text-muted-foreground"
3258
+ M ? "text-primary" : "text-muted-foreground"
3248
3259
  ),
3249
3260
  children: c.toLocaleDateString([], { weekday: "short" })
3250
3261
  }
@@ -3254,10 +3265,10 @@ function Qn({
3254
3265
  {
3255
3266
  type: "button",
3256
3267
  onClick: () => l?.(c),
3257
- className: i(
3268
+ className: s(
3258
3269
  "flex items-center justify-center rounded-full transition-colors mt-0.5",
3259
3270
  "size-10 text-2xl font-normal",
3260
- S ? "bg-primary text-primary-foreground" : "text-foreground hover:bg-muted"
3271
+ M ? "bg-primary text-primary-foreground" : "text-foreground hover:bg-muted"
3261
3272
  ),
3262
3273
  children: c.getDate()
3263
3274
  }
@@ -3272,12 +3283,12 @@ function Qn({
3272
3283
  /* @__PURE__ */ e(
3273
3284
  "div",
3274
3285
  {
3275
- className: i(
3286
+ className: s(
3276
3287
  "ic-hour-column sticky left-0 z-10 bg-zinc-50 border-r",
3277
- p?.timeGutter
3288
+ f?.timeGutter
3278
3289
  ),
3279
3290
  style: { width: Ne },
3280
- children: T.map((c, m) => /* @__PURE__ */ e(
3291
+ children: z.map((c, m) => /* @__PURE__ */ e(
3281
3292
  "div",
3282
3293
  {
3283
3294
  className: "relative",
@@ -3285,9 +3296,9 @@ function Qn({
3285
3296
  children: /* @__PURE__ */ e("div", { className: "absolute -top-2.5 right-1 sm:right-2 flex h-5 items-center", children: m !== 0 && /* @__PURE__ */ e(
3286
3297
  "span",
3287
3298
  {
3288
- className: i(
3299
+ className: s(
3289
3300
  "text-[10px] sm:text-xs text-muted-foreground",
3290
- p?.timeGutterLabel
3301
+ f?.timeGutterLabel
3291
3302
  ),
3292
3303
  children: Ae(c)
3293
3304
  }
@@ -3297,17 +3308,17 @@ function Qn({
3297
3308
  ))
3298
3309
  }
3299
3310
  ),
3300
- /* @__PURE__ */ e("div", { className: "ic-week-grid relative flex-1", children: /* @__PURE__ */ e("div", { className: "flex divide-x", children: D.map((c, m) => {
3301
- const S = c.toDateString(), C = _.get(S), P = F[m] ?? te, O = P > te;
3311
+ /* @__PURE__ */ e("div", { className: "ic-week-grid relative flex-1", children: /* @__PURE__ */ e("div", { className: "flex divide-x", children: C.map((c, m) => {
3312
+ const M = c.toDateString(), k = R.get(M), O = F[m] ?? te, P = O > te;
3302
3313
  return /* @__PURE__ */ o(
3303
3314
  "div",
3304
3315
  {
3305
3316
  className: "ic-day-column relative flex-1",
3306
3317
  style: {
3307
- minWidth: O ? P : te
3318
+ minWidth: P ? O : te
3308
3319
  },
3309
3320
  children: [
3310
- T.map(($, G) => {
3321
+ z.map(($, G) => {
3311
3322
  const Z = !dt(
3312
3323
  c,
3313
3324
  $,
@@ -3316,17 +3327,17 @@ function Qn({
3316
3327
  return /* @__PURE__ */ o(
3317
3328
  "div",
3318
3329
  {
3319
- className: i(
3330
+ className: s(
3320
3331
  "relative",
3321
3332
  Z && "bg-calendar-disabled-hour",
3322
3333
  ce(c) && !Z && "bg-primary/5",
3323
- p?.timeSlot,
3324
- Z ? p?.timeSlotNonWorking : p?.timeSlotWorking
3334
+ f?.timeSlot,
3335
+ Z ? f?.timeSlotNonWorking : f?.timeSlotWorking
3325
3336
  ),
3326
3337
  style: { height: he },
3327
3338
  children: [
3328
3339
  G !== 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-x-0 top-0 border-b border-border/50" }),
3329
- L.slice(1).map((ee) => /* @__PURE__ */ e(
3340
+ W.slice(1).map((ee) => /* @__PURE__ */ e(
3330
3341
  "div",
3331
3342
  {
3332
3343
  className: "pointer-events-none absolute inset-x-0 border-b border-dashed border-border/30",
@@ -3334,7 +3345,7 @@ function Qn({
3334
3345
  },
3335
3346
  ee
3336
3347
  )),
3337
- L.map((ee, xe) => {
3348
+ W.map((ee, xe) => {
3338
3349
  const ye = {
3339
3350
  date: c,
3340
3351
  hour: $,
@@ -3345,10 +3356,10 @@ function Qn({
3345
3356
  {
3346
3357
  slot: ye,
3347
3358
  onSelectionStart: H,
3348
- onSelectionMove: z,
3349
- onSelectionEnd: f,
3350
- isSelected: I?.isSlotSelected(ye) ?? !1,
3351
- isSelecting: I?.isSelecting ?? !1,
3359
+ onSelectionMove: S,
3360
+ onSelectionEnd: h,
3361
+ isSelected: _?.isSlotSelected(ye) ?? !1,
3362
+ isSelecting: _?.isSelecting ?? !1,
3352
3363
  disabled: Z,
3353
3364
  className: "absolute inset-x-0",
3354
3365
  style: {
@@ -3365,8 +3376,8 @@ function Qn({
3365
3376
  $
3366
3377
  );
3367
3378
  }),
3368
- C?.singleDay.map(($) => {
3369
- const G = C.positions.get($.id);
3379
+ k?.singleDay.map(($) => {
3380
+ const G = k.positions.get($.id);
3370
3381
  if (!G) return null;
3371
3382
  const oe = `calc(${G.width}% - 2px)`, Z = `max(${Te}px, ${oe})`;
3372
3383
  return v ? /* @__PURE__ */ e(
@@ -3393,26 +3404,26 @@ function Qn({
3393
3404
  minWidth: Te
3394
3405
  },
3395
3406
  hourHeight: he,
3396
- badgeVariant: s,
3407
+ badgeVariant: i,
3397
3408
  onClick: y,
3398
3409
  disablePopover: !!y && !u,
3399
3410
  renderPopover: u,
3400
- className: i(
3411
+ className: s(
3401
3412
  "pointer-events-auto",
3402
- p?.eventCard
3413
+ f?.eventCard
3403
3414
  )
3404
3415
  },
3405
3416
  $.id
3406
3417
  );
3407
3418
  }),
3408
- m === B && M >= 0 && /* @__PURE__ */ o(
3419
+ m === I && T >= 0 && /* @__PURE__ */ o(
3409
3420
  "div",
3410
3421
  {
3411
- className: i(
3422
+ className: s(
3412
3423
  "absolute left-0 right-0 z-20 flex items-center pointer-events-none",
3413
- p?.currentTimeIndicator
3424
+ f?.currentTimeIndicator
3414
3425
  ),
3415
- style: { top: M },
3426
+ style: { top: T },
3416
3427
  children: [
3417
3428
  /* @__PURE__ */ e("div", { className: "h-2 w-2 -ml-1 rounded-full bg-red-500" }),
3418
3429
  /* @__PURE__ */ e("div", { className: "flex-1 h-0.5 bg-red-500" })
@@ -3431,49 +3442,49 @@ function Qn({
3431
3442
  ] });
3432
3443
  }
3433
3444
  export {
3434
- Yn as A,
3445
+ Jn as A,
3435
3446
  pe as B,
3436
- Xn as C,
3437
- fn as D,
3447
+ Yn as C,
3448
+ gn as D,
3438
3449
  bt as E,
3439
- ie as F,
3440
- nn as G,
3450
+ se as F,
3451
+ rn as G,
3441
3452
  de as H,
3442
3453
  Ze as I,
3443
3454
  Qe as J,
3444
3455
  He as K,
3445
3456
  Oe as L,
3446
- Zn as M,
3447
- un as N,
3457
+ Qn as M,
3458
+ mn as N,
3448
3459
  ue as P,
3449
- Kt as S,
3460
+ Xt as S,
3450
3461
  Nt as T,
3451
- Qn as W,
3452
- Sn as a,
3453
- En as b,
3454
- Jn as c,
3455
- jt as d,
3456
- Vn as e,
3462
+ er as W,
3463
+ Mn as a,
3464
+ Ln as b,
3465
+ Zn as c,
3466
+ Ft as d,
3467
+ Gn as e,
3457
3468
  pt as f,
3458
- qt as g,
3459
- Gt as h,
3460
- Ut as i,
3461
- Ft as j,
3469
+ Kt as g,
3470
+ Ut as h,
3471
+ qt as i,
3472
+ Vt as j,
3462
3473
  Ee as k,
3463
- zn as l,
3464
- Kn as m,
3465
- Gn as n,
3474
+ An as l,
3475
+ Xn as m,
3476
+ Un as n,
3466
3477
  le as o,
3467
3478
  me as p,
3468
- Un as q,
3479
+ qn as q,
3469
3480
  gt as r,
3470
- Qt as s,
3471
- Jt as t,
3472
- Zt as u,
3473
- Xt as v,
3474
- xn as w,
3481
+ en as s,
3482
+ Zt as t,
3483
+ Qt as u,
3484
+ Yt as v,
3485
+ yn as w,
3475
3486
  ae as x,
3476
3487
  re as y,
3477
- qn as z
3488
+ Kn as z
3478
3489
  };
3479
- //# sourceMappingURL=week-view-C1FxF_nk.js.map
3490
+ //# sourceMappingURL=week-view-CNbtlkE_.js.map