@innosolutions/inno-calendar 1.0.53 → 1.0.55

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 (33) hide show
  1. package/dist/agenda-widget-B7ryNQOt.js +3922 -0
  2. package/dist/agenda-widget-B7ryNQOt.js.map +1 -0
  3. package/dist/agenda-widget-YH495m1F.cjs +2 -0
  4. package/dist/agenda-widget-YH495m1F.cjs.map +1 -0
  5. package/dist/components/index.cjs +1 -1
  6. package/dist/components/index.mjs +2 -2
  7. package/dist/components/inno-calendar.d.ts.map +1 -1
  8. package/dist/components/primitives/index.d.ts +1 -0
  9. package/dist/components/primitives/index.d.ts.map +1 -1
  10. package/dist/components/primitives/scroll-navigator.d.ts +32 -0
  11. package/dist/components/primitives/scroll-navigator.d.ts.map +1 -0
  12. package/dist/components/views/day-events-expansion.d.ts +2 -2
  13. package/dist/components/views/day-events-expansion.d.ts.map +1 -1
  14. package/dist/index.cjs +1 -1
  15. package/dist/index.mjs +3 -3
  16. package/dist/presets/index.cjs +1 -1
  17. package/dist/presets/index.mjs +1 -1
  18. package/dist/styles/index.css +1 -1
  19. package/dist/{tailwind-calendar-Ufp5YM_i.cjs → tailwind-calendar-B2Wloz_o.cjs} +2 -2
  20. package/dist/{tailwind-calendar-Ufp5YM_i.cjs.map → tailwind-calendar-B2Wloz_o.cjs.map} +1 -1
  21. package/dist/{tailwind-calendar-Wvl6G_sK.js → tailwind-calendar-CjhEUHpL.js} +2 -2
  22. package/dist/{tailwind-calendar-Wvl6G_sK.js.map → tailwind-calendar-CjhEUHpL.js.map} +1 -1
  23. package/dist/{week-view-CCzE8DEb.js → week-view-D3PDybDq.js} +184 -187
  24. package/dist/week-view-D3PDybDq.js.map +1 -0
  25. package/dist/{week-view-1DnsOgRW.cjs → week-view-DfavofVM.cjs} +3 -3
  26. package/dist/week-view-DfavofVM.cjs.map +1 -0
  27. package/package.json +1 -1
  28. package/dist/agenda-widget-CcvTi51_.cjs +0 -2
  29. package/dist/agenda-widget-CcvTi51_.cjs.map +0 -1
  30. package/dist/agenda-widget-DHq2DsjV.js +0 -3740
  31. package/dist/agenda-widget-DHq2DsjV.js.map +0 -1
  32. package/dist/week-view-1DnsOgRW.cjs.map +0 -1
  33. package/dist/week-view-CCzE8DEb.js.map +0 -1
@@ -45,10 +45,10 @@ const Lt = Oe(
45
45
  children: h,
46
46
  iconNode: s,
47
47
  ...y
48
- }, C) => Ie(
48
+ }, k) => Ie(
49
49
  "svg",
50
50
  {
51
- ref: C,
51
+ ref: k,
52
52
  ...Wt,
53
53
  width: n,
54
54
  height: n,
@@ -337,7 +337,7 @@ function ze({
337
337
  showTime: h = !0,
338
338
  showDescription: s = !1,
339
339
  showParticipants: y = !1,
340
- style: C,
340
+ style: k,
341
341
  disablePopover: l = !1,
342
342
  renderPopover: b,
343
343
  enableDrag: v = !1,
@@ -346,32 +346,32 @@ function ze({
346
346
  eventDetailMode: p = "popover",
347
347
  renderEventDetail: N
348
348
  }) {
349
- const g = de(t.color), [L, k] = Q(!1), [T, _] = Q(!1), [G, j] = Q(!1), [I, S] = Q(null), z = ne(null), B = Fe(), $ = dt();
349
+ const g = de(t.color), [L, D] = Q(!1), [T, _] = Q(!1), [G, j] = Q(!1), [I, S] = Q(null), A = ne(null), B = Fe(), $ = dt();
350
350
  we(() => {
351
351
  if (!l && $?.focusEventId && $.focusEventId === t.id) {
352
352
  const U = setTimeout(() => {
353
- k(!0), $.clearFocusEventId();
353
+ D(!0), $.clearFocusEventId();
354
354
  }, 300);
355
355
  return () => clearTimeout(U);
356
356
  }
357
357
  }, [$?.focusEventId, t.id, l]);
358
- const A = t.endDate < gt(/* @__PURE__ */ new Date()), f = t.isCanceled ?? !1, R = v && B && !f && !A, W = t.data, F = W?.meetingTookPlace ?? t.meetingTookPlace ?? !1, w = f ? /* @__PURE__ */ e(en, { className: "h-3 w-3 text-zinc-800 dark:text-zinc-200" }) : F ? /* @__PURE__ */ e(Qt, { className: i("h-3 w-3", g.text) }) : null, c = W?.productName, m = W?.nrParticipant, M = W?.siteName, D = W?.siteCity, H = [M, D].filter(Boolean).join(", "), O = E(() => {
358
+ const z = t.endDate < gt(/* @__PURE__ */ new Date()), f = t.isCanceled ?? !1, R = v && B && !f && !z, W = t.data, F = W?.meetingTookPlace ?? t.meetingTookPlace ?? !1, w = f ? /* @__PURE__ */ e(en, { className: "h-3 w-3 text-zinc-800 dark:text-zinc-200" }) : F ? /* @__PURE__ */ e(Qt, { className: i("h-3 w-3", g.text) }) : null, c = W?.productName, m = W?.nrParticipant, M = W?.siteName, C = W?.siteCity, H = [M, C].filter(Boolean).join(", "), O = E(() => {
359
359
  if (!T) {
360
360
  if (l && a) {
361
361
  a(t);
362
362
  return;
363
363
  }
364
- if (u && z.current) {
365
- const U = z.current.getBoundingClientRect();
364
+ if (u && A.current) {
365
+ const U = A.current.getBoundingClientRect();
366
366
  S(U), j(!0);
367
- } else l || k(!0);
367
+ } else l || D(!0);
368
368
  }
369
369
  }, [T, l, a, t, u]);
370
370
  E(() => {
371
- j(!1), S(null), l || k(!0);
371
+ j(!1), S(null), l || D(!0);
372
372
  }, [l]);
373
373
  const P = E(() => {
374
- k(!1);
374
+ D(!1);
375
375
  }, []), q = E(
376
376
  (U) => {
377
377
  R && (U.dataTransfer.effectAllowed = "move", U.dataTransfer.setData("text/plain", t.id), _(!0), B?.startDrag?.(t));
@@ -382,19 +382,19 @@ function ze({
382
382
  }, [B]), J = N ? N({ event: t, onClose: P }) : b ? b({ event: t, onClose: P }) : /* @__PURE__ */ e(Ue, { event: t, onClose: P }), ee = (U) => {
383
383
  switch (p) {
384
384
  case "dialog":
385
- return /* @__PURE__ */ o(Pt, { open: L, onOpenChange: k, children: [
385
+ return /* @__PURE__ */ o(Pt, { open: L, onOpenChange: D, children: [
386
386
  /* @__PURE__ */ e(jt, { asChild: !0, children: U }),
387
387
  /* @__PURE__ */ e(ht, { className: "sm:max-w-md", children: J })
388
388
  ] });
389
389
  case "sheet":
390
- return /* @__PURE__ */ o(qt, { open: L, onOpenChange: k, children: [
390
+ return /* @__PURE__ */ o(qt, { open: L, onOpenChange: D, children: [
391
391
  /* @__PURE__ */ e(Kt, { asChild: !0, children: U }),
392
392
  /* @__PURE__ */ e(ft, { children: J })
393
393
  ] });
394
394
  case "custom":
395
395
  return U;
396
396
  default:
397
- return /* @__PURE__ */ o(ue, { open: L, onOpenChange: k, children: [
397
+ return /* @__PURE__ */ o(ue, { open: L, onOpenChange: D, children: [
398
398
  /* @__PURE__ */ e(me, { asChild: !0, children: U }),
399
399
  /* @__PURE__ */ e(le, { className: "w-80", children: J })
400
400
  ] });
@@ -412,7 +412,7 @@ function ze({
412
412
  t.isCanceled && "opacity-50",
413
413
  d
414
414
  ),
415
- style: C,
415
+ style: k,
416
416
  "aria-label": t.title
417
417
  }
418
418
  );
@@ -454,7 +454,7 @@ function ze({
454
454
  ],
455
455
  d
456
456
  ),
457
- style: C,
457
+ style: k,
458
458
  children: [
459
459
  ["dot", "mixed"].includes(r) && !f && /* @__PURE__ */ e(
460
460
  "svg",
@@ -533,7 +533,7 @@ function ze({
533
533
  ],
534
534
  d
535
535
  ),
536
- style: C,
536
+ style: k,
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: [
@@ -741,7 +741,7 @@ function yt({
741
741
  className: h,
742
742
  disablePopover: s = !1,
743
743
  renderPopover: y,
744
- enableDrag: C = !0
744
+ enableDrag: k = !0
745
745
  }) {
746
746
  const l = de(t.color), [b, v] = Q(!1), [u, x] = Q(!1), p = Fe(), N = dt();
747
747
  we(() => {
@@ -752,7 +752,7 @@ function yt({
752
752
  return () => clearTimeout(O);
753
753
  }
754
754
  }, [N?.focusEventId, t.id, s]);
755
- const g = (t.endDate.getTime() - t.startDate.getTime()) / (1e3 * 60), L = g / 60 * r - 8, k = t.endDate < gt(/* @__PURE__ */ new Date()), T = t.isCanceled ?? !1, _ = C && p && !T && !k, G = g < 35, j = g > 25, I = g >= 45, S = t.data, z = t.scheduleTypeName || S?.scheduleTypeName || S?.typeName, B = S?.productName, $ = S?.nrParticipant, A = S?.siteName, f = S?.siteCity, R = [A, f].filter(Boolean).join(", "), W = a === "dot", F = E(() => {
755
+ const g = (t.endDate.getTime() - t.startDate.getTime()) / (1e3 * 60), L = g / 60 * r - 8, D = t.endDate < gt(/* @__PURE__ */ new Date()), T = t.isCanceled ?? !1, _ = k && p && !T && !D, G = g < 35, j = g > 25, I = g >= 45, S = t.data, A = t.scheduleTypeName || S?.scheduleTypeName || S?.typeName, B = S?.productName, $ = S?.nrParticipant, z = S?.siteName, f = S?.siteCity, R = [z, f].filter(Boolean).join(", "), W = a === "dot", F = E(() => {
756
756
  u || (s && d ? d(t) : s || v(!0));
757
757
  }, [u, s, d, t]), w = E(() => {
758
758
  v(!1);
@@ -775,7 +775,7 @@ function yt({
775
775
  (O.key === "Enter" || O.key === " ") && (O.preventDefault(), F());
776
776
  },
777
777
  [F]
778
- ), D = /* @__PURE__ */ o(
778
+ ), C = /* @__PURE__ */ o(
779
779
  "div",
780
780
  {
781
781
  role: "button",
@@ -827,10 +827,10 @@ function yt({
827
827
  ),
828
828
  children: [
829
829
  t.title,
830
- z && /* @__PURE__ */ o("span", { className: "font-normal opacity-75", children: [
830
+ A && /* @__PURE__ */ o("span", { className: "font-normal opacity-75", children: [
831
831
  " ",
832
832
  "- ",
833
- z
833
+ A
834
834
  ] })
835
835
  ]
836
836
  }
@@ -894,10 +894,10 @@ function yt({
894
894
  ), H = /* @__PURE__ */ e(re, { children: /* @__PURE__ */ o("div", { className: "flex flex-col gap-0.5", children: [
895
895
  /* @__PURE__ */ o("div", { className: "font-medium", children: [
896
896
  t.title,
897
- z && /* @__PURE__ */ o("span", { className: "font-normal opacity-75", children: [
897
+ A && /* @__PURE__ */ o("span", { className: "font-normal opacity-75", children: [
898
898
  " ",
899
899
  "- ",
900
- z
900
+ A
901
901
  ] })
902
902
  ] }),
903
903
  B && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: B }),
@@ -920,7 +920,7 @@ function yt({
920
920
  minWidth: n.minWidth ? `${n.minWidth}px` : void 0
921
921
  },
922
922
  children: /* @__PURE__ */ o(ae, { children: [
923
- /* @__PURE__ */ e(ie, { asChild: !0, children: D }),
923
+ /* @__PURE__ */ e(ie, { asChild: !0, children: C }),
924
924
  H
925
925
  ] })
926
926
  }
@@ -935,7 +935,7 @@ function yt({
935
935
  minWidth: n.minWidth ? `${n.minWidth}px` : void 0
936
936
  },
937
937
  children: /* @__PURE__ */ o(ue, { open: b, onOpenChange: v, children: [
938
- /* @__PURE__ */ e(me, { asChild: !0, children: D }),
938
+ /* @__PURE__ */ e(me, { asChild: !0, children: C }),
939
939
  /* @__PURE__ */ e(le, { className: "w-80", children: y ? y({ event: t, onClose: w }) : /* @__PURE__ */ e(Ue, { event: t, onClose: w }) })
940
940
  ] })
941
941
  }
@@ -951,7 +951,7 @@ function qn({
951
951
  disablePopover: s = !1,
952
952
  renderPopover: y
953
953
  }) {
954
- const C = de(t.color), [l, b] = Q(!1), v = t.isCanceled ?? !1, u = E(() => {
954
+ const k = de(t.color), [l, b] = Q(!1), v = t.isCanceled ?? !1, u = E(() => {
955
955
  s && d ? d(t) : s || b(!0);
956
956
  }, [s, d, t]), x = E(() => {
957
957
  b(!1);
@@ -963,7 +963,7 @@ function qn({
963
963
  className: i(
964
964
  "flex h-5 items-center px-1.5 text-xs font-medium transition-opacity hover:opacity-80",
965
965
  // Cancelled events get gray background with strikethrough
966
- v ? "bg-zinc-200 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [C.dot, "text-white"],
966
+ v ? "bg-zinc-200 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [k.dot, "text-white"],
967
967
  r && "rounded-l",
968
968
  a && "rounded-r",
969
969
  !r && "border-l-0",
@@ -1009,7 +1009,7 @@ const Xe = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Ye = kt, b
1009
1009
  }), y = r && Object.entries(r).reduce((l, b) => {
1010
1010
  let [v, u] = b;
1011
1011
  return u === void 0 || (l[v] = u), l;
1012
- }, {}), C = n == null || (a = n.compoundVariants) === null || a === void 0 ? void 0 : a.reduce((l, b) => {
1012
+ }, {}), k = n == null || (a = n.compoundVariants) === null || a === void 0 ? void 0 : a.reduce((l, b) => {
1013
1013
  let { class: v, className: u, ...x } = b;
1014
1014
  return Object.entries(x).every((p) => {
1015
1015
  let [N, g] = p;
@@ -1026,7 +1026,7 @@ const Xe = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Ye = kt, b
1026
1026
  u
1027
1027
  ] : l;
1028
1028
  }, []);
1029
- return Ye(t, s, C, r?.class, r?.className);
1029
+ return Ye(t, s, k, r?.class, r?.className);
1030
1030
  }, tn = bt(
1031
1031
  "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",
1032
1032
  {
@@ -1279,11 +1279,11 @@ function pn({
1279
1279
  showEventCount: s = !0,
1280
1280
  className: y
1281
1281
  }) {
1282
- const C = hn[t.getMonth()], l = t.getFullYear(), b = s ? Dt(r, t, n, h) : 0, v = Ct(t, n);
1282
+ const k = hn[t.getMonth()], l = t.getFullYear(), b = s ? Dt(r, t, n, h) : 0, v = Ct(t, n);
1283
1283
  return /* @__PURE__ */ o("div", { className: i("min-w-0 flex-1", y), children: [
1284
1284
  /* @__PURE__ */ o("div", { className: "flex items-center gap-1.5 sm:gap-2 flex-wrap", children: [
1285
1285
  /* @__PURE__ */ o("span", { className: "text-base sm:text-lg font-semibold truncate", children: [
1286
- C,
1286
+ k,
1287
1287
  " ",
1288
1288
  l
1289
1289
  ] }),
@@ -1575,7 +1575,7 @@ function Kn({
1575
1575
  onNavigateNext: h,
1576
1576
  onNavigate: s,
1577
1577
  onViewChange: y,
1578
- onAddEvent: C,
1578
+ onAddEvent: k,
1579
1579
  availableViews: l = ["day", "week", "month", "agenda"],
1580
1580
  showTimelineViews: b = !1,
1581
1581
  timelineViews: v,
@@ -1585,10 +1585,10 @@ function Kn({
1585
1585
  actions: N,
1586
1586
  className: g,
1587
1587
  weekStartsOn: L = 1,
1588
- headerConfig: k,
1588
+ headerConfig: D,
1589
1589
  labels: T = {}
1590
1590
  }) {
1591
- const _ = k?.showToday ?? !0, G = k?.showDateNavigator ?? !0, j = k?.showCalendarViews ?? !0, I = k?.showResourceViews ?? b, S = k?.showSettings ?? x, z = k?.showAddEvent ?? !0, B = k?.showFilters ?? !0, $ = K(
1591
+ const _ = D?.showToday ?? !0, G = D?.showDateNavigator ?? !0, j = D?.showCalendarViews ?? !0, I = D?.showResourceViews ?? b, S = D?.showSettings ?? x, A = D?.showAddEvent ?? !0, B = D?.showFilters ?? !0, $ = K(
1592
1592
  () => ({
1593
1593
  today: "Today",
1594
1594
  addEvent: "Add Event",
@@ -1597,7 +1597,7 @@ function Kn({
1597
1597
  ...T
1598
1598
  }),
1599
1599
  [T]
1600
- ), A = () => {
1600
+ ), z = () => {
1601
1601
  a?.(), s?.("today");
1602
1602
  }, f = () => {
1603
1603
  d?.(), s?.("prev");
@@ -1606,13 +1606,13 @@ function Kn({
1606
1606
  }, W = ["day", "week", "month", "year", "agenda"].includes(
1607
1607
  n
1608
1608
  ), F = n.startsWith("timeline-") || n.startsWith("resource-"), w = kn.filter(
1609
- (D) => l.includes(D.value)
1610
- ), c = W ? w.find((D) => D.value === n) : null, m = [...tt, ...Dn], M = F ? m.find((D) => D.value === n) : null;
1609
+ (C) => l.includes(C.value)
1610
+ ), c = W ? w.find((C) => C.value === n) : null, m = [...tt, ...Dn], M = F ? m.find((C) => C.value === n) : null;
1611
1611
  return /* @__PURE__ */ o("div", { className: i("flex flex-col w-full gap-3 mb-2", g), children: [
1612
1612
  /* @__PURE__ */ o("div", { className: "flex lg:flex-row flex-col w-full justify-between gap-3", children: [
1613
1613
  /* @__PURE__ */ o("div", { className: "flex items-center justify-between gap-2", children: [
1614
1614
  /* @__PURE__ */ o("div", { className: "flex items-center gap-2 sm:gap-3 min-w-0", children: [
1615
- _ && /* @__PURE__ */ e(gn, { onClick: A }),
1615
+ _ && /* @__PURE__ */ e(gn, { onClick: z }),
1616
1616
  G && /* @__PURE__ */ e(
1617
1617
  pn,
1618
1618
  {
@@ -1625,12 +1625,12 @@ function Kn({
1625
1625
  }
1626
1626
  )
1627
1627
  ] }),
1628
- z && C && /* @__PURE__ */ e(
1628
+ A && k && /* @__PURE__ */ e(
1629
1629
  pe,
1630
1630
  {
1631
1631
  size: "icon",
1632
1632
  className: "shrink-0 lg:hidden",
1633
- onClick: C,
1633
+ onClick: k,
1634
1634
  children: /* @__PURE__ */ e(et, { className: "size-4" })
1635
1635
  }
1636
1636
  )
@@ -1652,22 +1652,22 @@ function Kn({
1652
1652
  ]
1653
1653
  }
1654
1654
  ),
1655
- /* @__PURE__ */ e($e, { align: "start", className: "min-w-[120px]", children: w.map((D) => {
1656
- const H = D.icon;
1655
+ /* @__PURE__ */ e($e, { align: "start", className: "min-w-[120px]", children: w.map((C) => {
1656
+ const H = C.icon;
1657
1657
  return /* @__PURE__ */ o(
1658
1658
  He,
1659
1659
  {
1660
- onClick: () => y(D.value),
1660
+ onClick: () => y(C.value),
1661
1661
  className: i(
1662
1662
  "gap-2",
1663
- n === D.value && "bg-accent"
1663
+ n === C.value && "bg-accent"
1664
1664
  ),
1665
1665
  children: [
1666
1666
  /* @__PURE__ */ e(H, { className: "size-4" }),
1667
- /* @__PURE__ */ e("span", { children: D.label })
1667
+ /* @__PURE__ */ e("span", { children: C.label })
1668
1668
  ]
1669
1669
  },
1670
- D.value
1670
+ C.value
1671
1671
  );
1672
1672
  }) })
1673
1673
  ] }),
@@ -1687,22 +1687,22 @@ function Kn({
1687
1687
  ]
1688
1688
  }
1689
1689
  ),
1690
- /* @__PURE__ */ e($e, { align: "start", className: "min-w-[120px]", children: tt.map((D) => {
1691
- const H = D.icon;
1690
+ /* @__PURE__ */ e($e, { align: "start", className: "min-w-[120px]", children: tt.map((C) => {
1691
+ const H = C.icon;
1692
1692
  return /* @__PURE__ */ o(
1693
1693
  He,
1694
1694
  {
1695
- onClick: () => y(D.value),
1695
+ onClick: () => y(C.value),
1696
1696
  className: i(
1697
1697
  "gap-2",
1698
- n === D.value && "bg-accent"
1698
+ n === C.value && "bg-accent"
1699
1699
  ),
1700
1700
  children: [
1701
1701
  /* @__PURE__ */ e(H, { className: "size-4" }),
1702
- /* @__PURE__ */ e("span", { children: D.label })
1702
+ /* @__PURE__ */ e("span", { children: C.label })
1703
1703
  ]
1704
1704
  },
1705
- D.value
1705
+ C.value
1706
1706
  );
1707
1707
  }) })
1708
1708
  ] }),
@@ -1727,11 +1727,11 @@ function Kn({
1727
1727
  )
1728
1728
  ] }),
1729
1729
  N,
1730
- z && C && /* @__PURE__ */ o(
1730
+ A && k && /* @__PURE__ */ o(
1731
1731
  pe,
1732
1732
  {
1733
1733
  className: "hidden lg:flex shrink-0 max-h-10",
1734
- onClick: C,
1734
+ onClick: k,
1735
1735
  children: [
1736
1736
  /* @__PURE__ */ e(et, { className: "size-4" }),
1737
1737
  $.addEvent
@@ -1752,7 +1752,7 @@ function Xn({
1752
1752
  className: h,
1753
1753
  renderEvent: s,
1754
1754
  renderPopover: y,
1755
- slots: C,
1755
+ slots: k,
1756
1756
  classNames: l
1757
1757
  }) {
1758
1758
  const b = K(() => {
@@ -1783,7 +1783,7 @@ function Xn({
1783
1783
  ] })
1784
1784
  ] }) }),
1785
1785
  /* @__PURE__ */ e("div", { className: "flex-1", children: v.map(({ date: u, dateKey: x, events: p }) => {
1786
- const N = ce(u), g = u.toLocaleDateString([], { weekday: "short" }), L = u.getDate(), k = u.toLocaleDateString([], { month: "short" });
1786
+ const N = ce(u), g = u.toLocaleDateString([], { weekday: "short" }), L = u.getDate(), D = u.toLocaleDateString([], { month: "short" });
1787
1787
  return /* @__PURE__ */ o("div", { className: i("", l?.agendaDayGroup), children: [
1788
1788
  /* @__PURE__ */ e(
1789
1789
  "div",
@@ -1817,7 +1817,7 @@ function Xn({
1817
1817
  )
1818
1818
  ] }),
1819
1819
  /* @__PURE__ */ o("span", { className: "text-sm text-muted-foreground", children: [
1820
- k,
1820
+ D,
1821
1821
  " ",
1822
1822
  u.getFullYear()
1823
1823
  ] })
@@ -1856,23 +1856,29 @@ function Cn({
1856
1856
  badgeVariant: h = "colored",
1857
1857
  onEventClick: s,
1858
1858
  renderEvent: y,
1859
- renderPopover: C,
1859
+ renderPopover: k,
1860
1860
  className: l
1861
1861
  }) {
1862
1862
  const b = ne(null), v = ne(null), [u, x] = Q("closed"), p = ne(null);
1863
1863
  d && (p.current = d);
1864
1864
  const N = d ?? p.current, g = K(
1865
- () => [...a].sort((S, z) => S.startDate.getTime() - z.startDate.getTime()),
1865
+ () => [...a].sort((S, A) => S.startDate.getTime() - A.startDate.getTime()),
1866
1866
  [a]
1867
1867
  ), L = K(() => {
1868
1868
  const S = N;
1869
- if (!S) return { top: 0, left: 0, width: ke, maxHeight: De };
1870
- const z = typeof window < "u" ? window.innerWidth : 1200, B = typeof window < "u" ? window.innerHeight : 800;
1869
+ if (!S)
1870
+ return {
1871
+ top: 0,
1872
+ left: 0,
1873
+ width: ke,
1874
+ maxHeight: De
1875
+ };
1876
+ const A = typeof window < "u" ? window.innerWidth : 1200, B = typeof window < "u" ? window.innerHeight : 800;
1871
1877
  let $ = S.left + S.width / 2 - ke / 2;
1872
- $ = Math.max(16, Math.min($, z - ke - 16));
1873
- const A = Math.min(a.length * 68 + 80, De);
1874
- let f = S.top + S.height / 2 - A / 2;
1875
- return f = Math.max(16, Math.min(f, B - A - 16)), { top: f, left: $, width: ke, maxHeight: De };
1878
+ $ = Math.max(16, Math.min($, A - ke - 16));
1879
+ const z = Math.min(a.length * 68 + 80, De);
1880
+ let f = S.top + S.height / 2 - z / 2;
1881
+ return f = Math.max(16, Math.min(f, B - z - 16)), { top: f, left: $, width: ke, maxHeight: De };
1876
1882
  }, [N, a.length]);
1877
1883
  Pe(() => {
1878
1884
  if (t && N)
@@ -1890,14 +1896,14 @@ function Cn({
1890
1896
  }
1891
1897
  }, [t, N]), we(() => {
1892
1898
  if (u === "closed") return;
1893
- const S = (z) => {
1894
- z.key === "Escape" && (z.stopPropagation(), n());
1899
+ const S = (A) => {
1900
+ A.key === "Escape" && (A.stopPropagation(), n());
1895
1901
  };
1896
1902
  return document.addEventListener("keydown", S), () => document.removeEventListener("keydown", S);
1897
1903
  }, [u, n]), we(() => {
1898
1904
  u === "open" && v.current && v.current.focus();
1899
1905
  }, [u]);
1900
- const k = E(
1906
+ const D = E(
1901
1907
  (S) => {
1902
1908
  S.target === b.current && n();
1903
1909
  },
@@ -1936,12 +1942,12 @@ function Cn({
1936
1942
  {
1937
1943
  ref: b,
1938
1944
  role: "presentation",
1939
- onClick: k,
1945
+ onClick: D,
1940
1946
  className: "ic-expansion-backdrop",
1941
1947
  style: {
1942
1948
  position: "fixed",
1943
1949
  inset: 0,
1944
- zIndex: 50,
1950
+ zIndex: 40,
1945
1951
  backgroundColor: "rgba(0, 0, 0, 0.2)",
1946
1952
  opacity: j,
1947
1953
  transition: `opacity ${Le}ms cubic-bezier(0.32, 0.72, 0, 1)`
@@ -1964,7 +1970,7 @@ function Cn({
1964
1970
  ),
1965
1971
  style: {
1966
1972
  ...G,
1967
- zIndex: 51,
1973
+ zIndex: 41,
1968
1974
  transition: `all ${Le}ms cubic-bezier(0.32, 0.72, 0, 1)`,
1969
1975
  willChange: "top, left, width, height, max-height, opacity, border-radius"
1970
1976
  },
@@ -2011,26 +2017,17 @@ function Cn({
2011
2017
  className: "overflow-y-auto px-3 py-2 space-y-1.5",
2012
2018
  style: { maxHeight: `${De - 64}px` },
2013
2019
  children: [
2014
- g.map((S) => /* @__PURE__ */ e(
2015
- "div",
2020
+ g.map((S) => /* @__PURE__ */ e("div", { onPointerDown: (A) => A.stopPropagation(), children: y ? y({ event: S, variant: "compact" }) : /* @__PURE__ */ e(
2021
+ ze,
2016
2022
  {
2017
- onPointerDown: (z) => z.stopPropagation(),
2018
- children: y ? y({ event: S, variant: "compact" }) : /* @__PURE__ */ e(
2019
- ze,
2020
- {
2021
- event: S,
2022
- variant: "compact",
2023
- badgeVariant: h,
2024
- onClick: (z) => {
2025
- n(), s?.(z);
2026
- },
2027
- disablePopover: !0,
2028
- showTime: !0
2029
- }
2030
- )
2031
- },
2032
- S.id
2033
- )),
2023
+ event: S,
2024
+ variant: "compact",
2025
+ badgeVariant: h,
2026
+ onClick: s,
2027
+ renderPopover: k,
2028
+ showTime: !0
2029
+ }
2030
+ ) }, S.id)),
2034
2031
  a.length === 0 && /* @__PURE__ */ e("div", { className: "py-6 text-center text-sm text-muted-foreground", children: "No events" })
2035
2032
  ]
2036
2033
  }
@@ -2047,7 +2044,7 @@ function Sn({
2047
2044
  disablePopover: a,
2048
2045
  renderPopover: d
2049
2046
  }) {
2050
- const [h, s] = Q(!1), y = de(t.color), C = Me(t), l = se(t.startDate, n), b = se(t.endDate, n), v = C && se(t.startDate, t.endDate), u = E(() => {
2047
+ const [h, s] = Q(!1), y = de(t.color), k = Me(t), l = se(t.startDate, n), b = se(t.endDate, n), v = k && se(t.startDate, t.endDate), u = E(() => {
2051
2048
  a && r ? r(t) : a || s(!0);
2052
2049
  }, [a, r, t]), x = E(() => {
2053
2050
  s(!1);
@@ -2124,9 +2121,9 @@ function Tn({
2124
2121
  if (t.length === 0) return null;
2125
2122
  const s = t.some((l) => Me(l) && se(l.startDate, l.endDate)), y = t.some(
2126
2123
  (l) => !se(l.startDate, l.endDate) || Me(l) && !se(l.startDate, l.endDate)
2127
- ), C = s && y ? "All day / Multi-day" : s ? "All day" : "Multi-day";
2124
+ ), k = s && y ? "All day / Multi-day" : s ? "All day" : "Multi-day";
2128
2125
  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: [
2129
- /* @__PURE__ */ e("span", { className: "text-[10px] font-medium text-muted-foreground sm:text-xs", children: C }),
2126
+ /* @__PURE__ */ e("span", { className: "text-[10px] font-medium text-muted-foreground sm:text-xs", children: k }),
2130
2127
  /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: t.map((l) => /* @__PURE__ */ e(
2131
2128
  Sn,
2132
2129
  {
@@ -2150,58 +2147,58 @@ function wt({
2150
2147
  isSelecting: h = !1,
2151
2148
  disabled: s = !1,
2152
2149
  ariaLabel: y,
2153
- children: C,
2150
+ children: k,
2154
2151
  className: l,
2155
2152
  height: b,
2156
2153
  style: v,
2157
2154
  dataAttributes: u
2158
2155
  }) {
2159
- const x = ne(null), p = ne(!1), N = ne(!1), g = ne(null), [L, k] = Q(!1), T = Fe(), _ = E(
2160
- (A) => {
2161
- s || A.button !== 0 && A.pointerType === "mouse" || (A.preventDefault(), x.current = { x: A.clientX, y: A.clientY }, p.current = !1, N.current = !0, n?.(t));
2156
+ const x = ne(null), p = ne(!1), N = ne(!1), g = ne(null), [L, D] = Q(!1), T = Fe(), _ = E(
2157
+ (z) => {
2158
+ 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));
2162
2159
  },
2163
2160
  [s, t, n]
2164
2161
  ), G = E(
2165
- (A) => {
2162
+ (z) => {
2166
2163
  if (!(x.current && N.current && !s)) return;
2167
- const f = A.clientX - x.current.x, R = A.clientY - x.current.y;
2164
+ const f = z.clientX - x.current.x, R = z.clientY - x.current.y;
2168
2165
  Math.sqrt(f * f + R * R) >= zn && (p.current = !0);
2169
2166
  },
2170
2167
  [s]
2171
2168
  ), j = E(
2172
- (A) => {
2173
- s || (A.buttons > 0 || h) && r?.(t);
2169
+ (z) => {
2170
+ s || (z.buttons > 0 || h) && r?.(t);
2174
2171
  },
2175
2172
  [s, h, t, r]
2176
2173
  ), I = E(() => {
2177
2174
  s || (a?.(), x.current = null, p.current = !1, N.current = !1);
2178
2175
  }, [s, a]), S = E(
2179
- (A) => {
2176
+ (z) => {
2180
2177
  if (!T?.isDragging || s) return;
2181
- A.preventDefault(), A.dataTransfer.dropEffect = "move", k(!0);
2178
+ z.preventDefault(), z.dataTransfer.dropEffect = "move", D(!0);
2182
2179
  const f = /* @__PURE__ */ new Date(), R = t.hour ?? f.getHours(), W = t.minute ?? (f.getMinutes() >= 30 ? 30 : 0);
2183
2180
  T.updateDragPreview?.(t.date, R, W);
2184
2181
  },
2185
2182
  [T, s, t]
2186
- ), z = E(() => {
2187
- k(!1);
2183
+ ), A = E(() => {
2184
+ D(!1);
2188
2185
  }, []), B = E(
2189
- (A) => {
2190
- A.preventDefault(), k(!1), !(!T?.isDragging || s) && T.endDrag?.();
2186
+ (z) => {
2187
+ z.preventDefault(), D(!1), !(!T?.isDragging || s) && T.endDrag?.();
2191
2188
  },
2192
2189
  [T, s]
2193
2190
  );
2194
2191
  we(() => {
2195
- const A = () => {
2192
+ const z = () => {
2196
2193
  N.current && (N.current = !1, x.current = null, p.current = !1);
2197
2194
  };
2198
- return window.addEventListener("pointerup", A), window.addEventListener("pointercancel", A), () => {
2199
- window.removeEventListener("pointerup", A), window.removeEventListener("pointercancel", A);
2195
+ return window.addEventListener("pointerup", z), window.addEventListener("pointercancel", z), () => {
2196
+ window.removeEventListener("pointerup", z), window.removeEventListener("pointercancel", z);
2200
2197
  };
2201
2198
  }, []);
2202
2199
  const $ = E(
2203
- (A) => {
2204
- s || (A.key === "Enter" || A.key === " ") && (A.preventDefault(), n?.(t), a?.());
2200
+ (z) => {
2201
+ s || (z.key === "Enter" || z.key === " ") && (z.preventDefault(), n?.(t), a?.());
2205
2202
  },
2206
2203
  [s, t, n, a]
2207
2204
  );
@@ -2220,7 +2217,7 @@ function wt({
2220
2217
  onPointerEnter: j,
2221
2218
  onKeyDown: $,
2222
2219
  onDragOver: S,
2223
- onDragLeave: z,
2220
+ onDragLeave: A,
2224
2221
  onDrop: B,
2225
2222
  className: i(
2226
2223
  "select-none touch-none cursor-pointer transition-colors",
@@ -2237,7 +2234,7 @@ function wt({
2237
2234
  ),
2238
2235
  style: { height: b, ...v },
2239
2236
  ...u,
2240
- children: C
2237
+ children: k
2241
2238
  }
2242
2239
  );
2243
2240
  }
@@ -2266,7 +2263,7 @@ function Yn({
2266
2263
  badgeVariant: h = "colored",
2267
2264
  onEventClick: s,
2268
2265
  onSlotSelect: y,
2269
- className: C,
2266
+ className: k,
2270
2267
  renderEvent: l,
2271
2268
  renderPopover: b,
2272
2269
  slots: v,
@@ -2277,7 +2274,7 @@ function Yn({
2277
2274
  for (let c = 0; c < x; c++)
2278
2275
  w.push(c * d);
2279
2276
  return w;
2280
- }, [x, d]), g = K(() => je(t, n), [t, n]), { singleDay: L, multiDay: k } = K(() => at(g), [g]), T = K(() => {
2277
+ }, [x, d]), g = K(() => je(t, n), [t, n]), { singleDay: L, multiDay: D } = K(() => at(g), [g]), T = K(() => {
2281
2278
  const w = it(L, n, r, xe), c = /* @__PURE__ */ new Map();
2282
2279
  for (const m of w)
2283
2280
  c.set(m.event.id, m.position);
@@ -2293,10 +2290,10 @@ function Yn({
2293
2290
  const c = () => {
2294
2291
  let m;
2295
2292
  if (j) {
2296
- const D = (/* @__PURE__ */ new Date()).getHours();
2297
- m = Math.max(D - 1, r.startHour);
2293
+ const C = (/* @__PURE__ */ new Date()).getHours();
2294
+ m = Math.max(C - 1, r.startHour);
2298
2295
  } else {
2299
- const D = n.getDay(), H = a?.[D];
2296
+ const C = n.getDay(), H = a?.[C];
2300
2297
  H?.enabled && H.from > 0 ? m = Math.max(H.from - 1, r.startHour) : m = Math.max(7, r.startHour);
2301
2298
  }
2302
2299
  const M = (m - r.startHour) * xe;
@@ -2309,25 +2306,25 @@ function Yn({
2309
2306
  requestAnimationFrame(c);
2310
2307
  });
2311
2308
  }, [n, a, r, j]);
2312
- const z = Ve(), B = E(
2309
+ const A = Ve(), B = E(
2313
2310
  (w) => {
2314
- z?.startSelection(w);
2311
+ A?.startSelection(w);
2315
2312
  },
2316
- [z]
2313
+ [A]
2317
2314
  ), $ = E(
2318
2315
  (w) => {
2319
- z?.updateSelection(w);
2316
+ A?.updateSelection(w);
2320
2317
  },
2321
- [z]
2322
- ), A = E(() => {
2323
- z?.endSelection();
2324
- }, [z]), f = E(
2318
+ [A]
2319
+ ), z = E(() => {
2320
+ A?.endSelection();
2321
+ }, [A]), f = E(
2325
2322
  (w) => {
2326
2323
  s?.(w);
2327
2324
  },
2328
2325
  [s]
2329
2326
  ), R = n.toLocaleDateString([], { weekday: "short" }), W = n.getDate(), F = ce(n);
2330
- return /* @__PURE__ */ o("div", { className: i("flex flex-col h-full", C), children: [
2327
+ return /* @__PURE__ */ o("div", { className: i("flex flex-col h-full", k), children: [
2331
2328
  /* @__PURE__ */ e(
2332
2329
  "div",
2333
2330
  {
@@ -2361,10 +2358,10 @@ function Yn({
2361
2358
  ] })
2362
2359
  }
2363
2360
  ),
2364
- k.length > 0 && /* @__PURE__ */ e(
2361
+ D.length > 0 && /* @__PURE__ */ e(
2365
2362
  Tn,
2366
2363
  {
2367
- events: k,
2364
+ events: D,
2368
2365
  date: n,
2369
2366
  onEventClick: f,
2370
2367
  disablePopover: !!s && !b,
@@ -2414,34 +2411,34 @@ function Yn({
2414
2411
  /* @__PURE__ */ o("div", { className: "relative flex-1", children: [
2415
2412
  j && !M && /* @__PURE__ */ e("div", { className: "absolute inset-0 bg-primary/5" }),
2416
2413
  c !== 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-x-0 top-0 border-b border-border/50" }),
2417
- N.slice(1).map((D) => /* @__PURE__ */ e(
2414
+ N.slice(1).map((C) => /* @__PURE__ */ e(
2418
2415
  "div",
2419
2416
  {
2420
2417
  className: "pointer-events-none absolute inset-x-0 border-b border-dashed border-border/30",
2421
- style: { top: `${D / 60 * 100}%` }
2418
+ style: { top: `${C / 60 * 100}%` }
2422
2419
  },
2423
- D
2420
+ C
2424
2421
  )),
2425
- N.map((D, H) => {
2426
- const O = { date: n, hour: w, minute: D };
2422
+ N.map((C, H) => {
2423
+ const O = { date: n, hour: w, minute: C };
2427
2424
  return /* @__PURE__ */ e(
2428
2425
  vt,
2429
2426
  {
2430
2427
  slot: O,
2431
2428
  onSelectionStart: B,
2432
2429
  onSelectionMove: $,
2433
- onSelectionEnd: A,
2434
- isSelected: z?.isSlotSelected(O) ?? !1,
2435
- isSelecting: z?.isSelecting ?? !1,
2430
+ onSelectionEnd: z,
2431
+ isSelected: A?.isSlotSelected(O) ?? !1,
2432
+ isSelecting: A?.isSelecting ?? !1,
2436
2433
  disabled: M,
2437
2434
  className: "absolute inset-x-0",
2438
2435
  style: {
2439
2436
  top: `${H * p}%`,
2440
2437
  height: `${p}%`
2441
2438
  },
2442
- ariaLabel: `Add event at ${Te(w)}:${String(D).padStart(2, "0")}`
2439
+ ariaLabel: `Add event at ${Te(w)}:${String(C).padStart(2, "0")}`
2443
2440
  },
2444
- D
2441
+ C
2445
2442
  );
2446
2443
  })
2447
2444
  ] })
@@ -2542,14 +2539,14 @@ function Jn({
2542
2539
  onSlotSelect: h,
2543
2540
  onDayClick: s,
2544
2541
  className: y,
2545
- renderEvent: C,
2542
+ renderEvent: k,
2546
2543
  renderPopover: l,
2547
2544
  showMoreMode: b,
2548
2545
  showMoreEventsInPopover: v = !1,
2549
2546
  slots: u,
2550
2547
  classNames: x
2551
2548
  }) {
2552
- const p = b ?? (v ? "popover" : "expand"), N = u?.dayCellHeader, g = u?.dayCellFooter, [L, k] = Q(null), [T, _] = Q(null), G = K(() => Mt(n, r), [n, r]), j = K(() => {
2549
+ const p = b ?? (v ? "popover" : "expand"), N = u?.dayCellHeader, g = u?.dayCellFooter, [L, D] = Q(null), [T, _] = Q(null), G = K(() => Mt(n, r), [n, r]), j = K(() => {
2553
2550
  const f = /* @__PURE__ */ new Map();
2554
2551
  for (const R of G) {
2555
2552
  const W = R.date.toDateString(), F = je(t, R.date);
@@ -2561,7 +2558,7 @@ function Jn({
2561
2558
  I?.startSelection(f);
2562
2559
  },
2563
2560
  [I]
2564
- ), z = E(
2561
+ ), A = E(
2565
2562
  (f) => {
2566
2563
  I?.updateSelection(f);
2567
2564
  },
@@ -2573,7 +2570,7 @@ function Jn({
2573
2570
  s?.(f);
2574
2571
  },
2575
2572
  [s]
2576
- ), A = r === 0 ? En : Wn;
2573
+ ), z = r === 0 ? En : Wn;
2577
2574
  return /* @__PURE__ */ o("div", { className: i("flex flex-col h-full overflow-hidden", y), children: [
2578
2575
  /* @__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: [
2579
2576
  /* @__PURE__ */ e(
@@ -2583,7 +2580,7 @@ function Jn({
2583
2580
  "grid grid-cols-7 border-b !sticky !top-0 bg-background z-10",
2584
2581
  x?.weekdayHeader
2585
2582
  ),
2586
- children: A.map((f, R) => /* @__PURE__ */ o(
2583
+ children: z.map((f, R) => /* @__PURE__ */ o(
2587
2584
  "div",
2588
2585
  {
2589
2586
  className: i(
@@ -2609,7 +2606,7 @@ function Jn({
2609
2606
  date: f.date,
2610
2607
  dataAttributes: { "data-day-key": R },
2611
2608
  onSelectionStart: S,
2612
- onSelectionMove: z,
2609
+ onSelectionMove: A,
2613
2610
  onSelectionEnd: B,
2614
2611
  isSelected: I?.isSlotSelected({ date: f.date }) ?? !1,
2615
2612
  isSelecting: I?.isSelecting ?? !1,
@@ -2675,7 +2672,7 @@ function Jn({
2675
2672
  onPointerDown: (M) => {
2676
2673
  M.stopPropagation();
2677
2674
  },
2678
- children: C ? C({ event: m, variant: "compact" }) : /* @__PURE__ */ e(
2675
+ children: k ? k({ event: m, variant: "compact" }) : /* @__PURE__ */ e(
2679
2676
  ze,
2680
2677
  {
2681
2678
  event: m,
@@ -2723,7 +2720,7 @@ function Jn({
2723
2720
  ue,
2724
2721
  {
2725
2722
  open: L === R,
2726
- onOpenChange: (m) => k(m ? R : null),
2723
+ onOpenChange: (m) => D(m ? R : null),
2727
2724
  children: [
2728
2725
  /* @__PURE__ */ e(me, { asChild: !0, children: /* @__PURE__ */ o(
2729
2726
  "button",
@@ -2731,7 +2728,7 @@ function Jn({
2731
2728
  type: "button",
2732
2729
  onPointerDown: (m) => m.stopPropagation(),
2733
2730
  onClick: (m) => {
2734
- m.stopPropagation(), k(R);
2731
+ m.stopPropagation(), D(R);
2735
2732
  },
2736
2733
  className: i(
2737
2734
  "w-full text-left text-xs text-muted-foreground hover:text-foreground hover:underline px-1.5 cursor-pointer",
@@ -2764,14 +2761,14 @@ function Jn({
2764
2761
  " events"
2765
2762
  ] })
2766
2763
  ] }),
2767
- /* @__PURE__ */ e("div", { className: "space-y-1.5", children: W.map((m) => /* @__PURE__ */ e("div", { children: C ? C({ event: m, variant: "compact" }) : /* @__PURE__ */ e(
2764
+ /* @__PURE__ */ e("div", { className: "space-y-1.5", children: W.map((m) => /* @__PURE__ */ e("div", { children: k ? k({ event: m, variant: "compact" }) : /* @__PURE__ */ e(
2768
2765
  ze,
2769
2766
  {
2770
2767
  event: m,
2771
2768
  variant: "compact",
2772
2769
  badgeVariant: a,
2773
2770
  onClick: (M) => {
2774
- k(null), d?.(M);
2771
+ D(null), d?.(M);
2775
2772
  },
2776
2773
  disablePopover: !!d && !l,
2777
2774
  renderPopover: l,
@@ -2831,7 +2828,7 @@ function Jn({
2831
2828
  anchorRect: T?.rect ?? null,
2832
2829
  badgeVariant: a,
2833
2830
  onEventClick: d,
2834
- renderEvent: C,
2831
+ renderEvent: k,
2835
2832
  renderPopover: l
2836
2833
  }
2837
2834
  )
@@ -2857,13 +2854,13 @@ function Ln(t) {
2857
2854
  for (let s = 0; s < r.length; s++) {
2858
2855
  const y = r[s];
2859
2856
  if (!y) continue;
2860
- let C = !0;
2857
+ let k = !0;
2861
2858
  for (let l = a.startCol; l <= a.endCol; l++)
2862
2859
  if (y[l]) {
2863
- C = !1;
2860
+ k = !1;
2864
2861
  break;
2865
2862
  }
2866
- if (C) {
2863
+ if (k) {
2867
2864
  d = s;
2868
2865
  break;
2869
2866
  }
@@ -2884,7 +2881,7 @@ function Rn({
2884
2881
  }) {
2885
2882
  const [d, h] = Q(!1), s = de(t.event.color), y = E(() => {
2886
2883
  r && n ? n(t.event) : r || h(!0);
2887
- }, [r, n, t.event]), C = E(() => {
2884
+ }, [r, n, t.event]), k = E(() => {
2888
2885
  h(!1);
2889
2886
  }, []), l = /* @__PURE__ */ o(
2890
2887
  "button",
@@ -2925,7 +2922,7 @@ function Rn({
2925
2922
  b
2926
2923
  ] }) }) : /* @__PURE__ */ e("div", { style: v, children: /* @__PURE__ */ o(ue, { open: d, onOpenChange: h, children: [
2927
2924
  /* @__PURE__ */ e(me, { asChild: !0, children: l }),
2928
- /* @__PURE__ */ e(le, { className: "w-80", children: a ? a({ event: t.event, onClose: C }) : /* @__PURE__ */ e(_n, { event: t.event, onClose: C }) })
2925
+ /* @__PURE__ */ e(le, { className: "w-80", children: a ? a({ event: t.event, onClose: k }) : /* @__PURE__ */ e(_n, { event: t.event, onClose: k }) })
2929
2926
  ] }) });
2930
2927
  }
2931
2928
  function _n({
@@ -2975,21 +2972,21 @@ function In({
2975
2972
  onEventClick: h,
2976
2973
  disablePopover: s = !1,
2977
2974
  renderPopover: y,
2978
- className: C
2975
+ className: k
2979
2976
  }) {
2980
2977
  const l = K(() => {
2981
2978
  if (t.length === 0) return [];
2982
2979
  const g = t.map((L) => {
2983
- const k = rt(L.startDate, n), T = rt(L.endDate, n), _ = Math.max(0, k), G = Math.min(6, T);
2980
+ const D = rt(L.startDate, n), T = rt(L.endDate, n), _ = Math.max(0, D), G = Math.min(6, T);
2984
2981
  if (_ > 6 || G < 0) return null;
2985
- const j = k < 0, I = T > 6, z = Me(L) && se(L.startDate, L.endDate);
2982
+ const j = D < 0, I = T > 6, A = Me(L) && se(L.startDate, L.endDate);
2986
2983
  return {
2987
2984
  event: L,
2988
2985
  startCol: _,
2989
2986
  endCol: G,
2990
2987
  continuesBefore: j,
2991
2988
  continuesAfter: I,
2992
- isSingleDayAllDay: z
2989
+ isSingleDayAllDay: A
2993
2990
  };
2994
2991
  }).filter(Boolean);
2995
2992
  return Ln(g);
@@ -3004,7 +3001,7 @@ function In({
3004
3001
  {
3005
3002
  className: i(
3006
3003
  "ic-all-day-row border-b bg-muted/20 relative",
3007
- C
3004
+ k
3008
3005
  ),
3009
3006
  style: {
3010
3007
  display: "grid",
@@ -3077,7 +3074,7 @@ function Zn({
3077
3074
  slotDuration: h = 30,
3078
3075
  badgeVariant: s = "colored",
3079
3076
  onEventClick: y,
3080
- onSlotSelect: C,
3077
+ onSlotSelect: k,
3081
3078
  onDayClick: l,
3082
3079
  className: b,
3083
3080
  renderEvent: v,
@@ -3090,7 +3087,7 @@ function Zn({
3090
3087
  for (let m = 0; m < N; m++)
3091
3088
  c.push(m * h);
3092
3089
  return c;
3093
- }, [N, h]), k = K(
3090
+ }, [N, h]), D = K(
3094
3091
  () => Tt(n, r),
3095
3092
  [n, r]
3096
3093
  ), T = K(
@@ -3098,8 +3095,8 @@ function Zn({
3098
3095
  [a]
3099
3096
  ), _ = K(() => {
3100
3097
  const c = /* @__PURE__ */ new Map();
3101
- for (const m of k) {
3102
- const M = m.toDateString(), D = je(t, m), { singleDay: H, multiDay: O } = at(D), P = it(
3098
+ for (const m of D) {
3099
+ const M = m.toDateString(), C = je(t, m), { singleDay: H, multiDay: O } = at(C), P = it(
3103
3100
  H,
3104
3101
  m,
3105
3102
  a,
@@ -3119,19 +3116,19 @@ function Zn({
3119
3116
  });
3120
3117
  }
3121
3118
  return c;
3122
- }, [k, t, a]), G = K(() => {
3119
+ }, [D, t, a]), G = K(() => {
3123
3120
  const c = /* @__PURE__ */ new Map();
3124
3121
  for (const { multiDay: m } of _.values())
3125
3122
  for (const M of m)
3126
3123
  c.set(M.id, M);
3127
3124
  return Array.from(c.values());
3128
- }, [_]), j = /* @__PURE__ */ new Date(), I = k.findIndex((c) => ce(c)), S = K(() => {
3125
+ }, [_]), j = /* @__PURE__ */ new Date(), I = D.findIndex((c) => ce(c)), S = K(() => {
3129
3126
  if (I < 0) return -1;
3130
3127
  const c = j.getHours() + j.getMinutes() / 60;
3131
3128
  return c < a.startHour || c > a.endHour ? -1 : (c - a.startHour) * he;
3132
- }, [I, a, j]), z = ne(null);
3129
+ }, [I, a, j]), A = ne(null);
3133
3130
  Pe(() => {
3134
- const c = z.current;
3131
+ const c = A.current;
3135
3132
  if (!c) return;
3136
3133
  const m = () => {
3137
3134
  let M;
@@ -3150,9 +3147,9 @@ function Zn({
3150
3147
  a.startHour
3151
3148
  ) : M = Math.max(7, a.startHour);
3152
3149
  }
3153
- const D = (M - a.startHour) * he;
3150
+ const C = (M - a.startHour) * he;
3154
3151
  c.scrollTo({
3155
- top: D,
3152
+ top: C,
3156
3153
  behavior: "instant"
3157
3154
  });
3158
3155
  };
@@ -3165,7 +3162,7 @@ function Zn({
3165
3162
  B?.startSelection(c);
3166
3163
  },
3167
3164
  [B]
3168
- ), A = E(
3165
+ ), z = E(
3169
3166
  (c) => {
3170
3167
  B?.updateSelection(c);
3171
3168
  },
@@ -3179,20 +3176,20 @@ function Zn({
3179
3176
  [y]
3180
3177
  ), W = be + 7 * te, F = K(() => {
3181
3178
  const c = [];
3182
- for (const m of k) {
3179
+ for (const m of D) {
3183
3180
  const M = m.toDateString(), H = _.get(M)?.maxOverlapping ?? 1;
3184
3181
  H > Bn ? c.push(
3185
3182
  Math.max(te, H * Se)
3186
3183
  ) : c.push(te);
3187
3184
  }
3188
3185
  return c;
3189
- }, [k, _]), w = be + F.reduce((c, m) => c + m, 0);
3186
+ }, [D, _]), w = be + F.reduce((c, m) => c + m, 0);
3190
3187
  return /* @__PURE__ */ o("div", { className: i("ic-week-view flex flex-col h-full", b), children: [
3191
3188
  G.length > 0 && /* @__PURE__ */ e(
3192
3189
  In,
3193
3190
  {
3194
3191
  events: G,
3195
- weekDays: k,
3192
+ weekDays: D,
3196
3193
  hourColumnWidth: be,
3197
3194
  minDayColumnWidth: te,
3198
3195
  dayColumnWidths: F,
@@ -3207,7 +3204,7 @@ function Zn({
3207
3204
  /* @__PURE__ */ e(
3208
3205
  "div",
3209
3206
  {
3210
- ref: z,
3207
+ ref: A,
3211
3208
  className: i(
3212
3209
  "ic-week-scroll-container flex-1",
3213
3210
  p?.scrollContainer
@@ -3228,8 +3225,8 @@ function Zn({
3228
3225
  ] })
3229
3226
  }
3230
3227
  ),
3231
- k.map((c, m) => {
3232
- const M = ce(c), D = F[m] ?? te, H = D > te;
3228
+ D.map((c, m) => {
3229
+ const M = ce(c), C = F[m] ?? te, H = C > te;
3233
3230
  return /* @__PURE__ */ o(
3234
3231
  "div",
3235
3232
  {
@@ -3240,7 +3237,7 @@ function Zn({
3240
3237
  ),
3241
3238
  style: {
3242
3239
  height: ot,
3243
- minWidth: H ? D : te
3240
+ minWidth: H ? C : te
3244
3241
  },
3245
3242
  children: [
3246
3243
  /* @__PURE__ */ e(
@@ -3301,8 +3298,8 @@ function Zn({
3301
3298
  ))
3302
3299
  }
3303
3300
  ),
3304
- /* @__PURE__ */ e("div", { className: "ic-week-grid relative flex-1", children: /* @__PURE__ */ e("div", { className: "flex divide-x", children: k.map((c, m) => {
3305
- const M = c.toDateString(), D = _.get(M), H = F[m] ?? te, O = H > te;
3301
+ /* @__PURE__ */ e("div", { className: "ic-week-grid relative flex-1", children: /* @__PURE__ */ e("div", { className: "flex divide-x", children: D.map((c, m) => {
3302
+ const M = c.toDateString(), C = _.get(M), H = F[m] ?? te, O = H > te;
3306
3303
  return /* @__PURE__ */ o(
3307
3304
  "div",
3308
3305
  {
@@ -3349,7 +3346,7 @@ function Zn({
3349
3346
  {
3350
3347
  slot: U,
3351
3348
  onSelectionStart: $,
3352
- onSelectionMove: A,
3349
+ onSelectionMove: z,
3353
3350
  onSelectionEnd: f,
3354
3351
  isSelected: B?.isSlotSelected(U) ?? !1,
3355
3352
  isSelecting: B?.isSelecting ?? !1,
@@ -3369,8 +3366,8 @@ function Zn({
3369
3366
  P
3370
3367
  );
3371
3368
  }),
3372
- D?.singleDay.map((P) => {
3373
- const q = D.positions.get(P.id);
3369
+ C?.singleDay.map((P) => {
3370
+ const q = C.positions.get(P.id);
3374
3371
  if (!q) return null;
3375
3372
  const oe = `calc(${q.width}% - 2px)`, J = `max(${Se}px, ${oe})`;
3376
3373
  return v ? /* @__PURE__ */ e(
@@ -3480,4 +3477,4 @@ export {
3480
3477
  re as y,
3481
3478
  Un as z
3482
3479
  };
3483
- //# sourceMappingURL=week-view-CCzE8DEb.js.map
3480
+ //# sourceMappingURL=week-view-D3PDybDq.js.map