@cocoar/vue-calendar 3.4.0-beta.22 → 3.4.0-beta.25

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 (28) hide show
  1. package/dist/builders/calendar-builder.d.ts.map +1 -1
  2. package/dist/components/CoarMonthListView.vue.d.ts.map +1 -1
  3. package/dist/components/CoarMonthView.vue.d.ts.map +1 -1
  4. package/dist/components/CoarTimeGrid.vue.d.ts.map +1 -1
  5. package/dist/components/internal/CoarEventAssignees.vue.d.ts.map +1 -1
  6. package/dist/components/internal/month/CoarMonthCell.vue.d.ts.map +1 -1
  7. package/dist/components/internal/month/CoarMonthDayOverlay.vue.d.ts.map +1 -1
  8. package/dist/components/internal/month/CoarMonthGrid.vue.d.ts +2 -0
  9. package/dist/components/internal/month/CoarMonthGrid.vue.d.ts.map +1 -1
  10. package/dist/components/internal/time-grid/CoarTimeGridAllDayBand.vue.d.ts.map +1 -1
  11. package/dist/components/internal/time-grid/CoarTimeGridEvent.vue.d.ts.map +1 -1
  12. package/dist/components/internal/time-grid/CoarTimeGridSurface.vue.d.ts.map +1 -1
  13. package/dist/components/internal/time-grid/CoarTimeSelectionLayer.vue.d.ts.map +1 -1
  14. package/dist/composables/useCalendarDnd.d.ts.map +1 -1
  15. package/dist/composables/useCoarDrag.d.ts.map +1 -1
  16. package/dist/composables/useMonthDayOverlay.d.ts.map +1 -1
  17. package/dist/composables/useTimeGridDnd.d.ts.map +1 -1
  18. package/dist/composables/useTimeGridPresentation.d.ts.map +1 -1
  19. package/dist/core/temporal.d.ts +2 -0
  20. package/dist/core/temporal.d.ts.map +1 -1
  21. package/dist/{core-Dcw3ry8Z.js → core-BU4PCeme.js} +153 -153
  22. package/dist/core.js +3 -3
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +1811 -1766
  25. package/dist/{move-math-C9mwvFPJ.js → move-math-ChynaO4h.js} +171 -171
  26. package/dist/recurrence.js +1 -1
  27. package/dist/vue-calendar.css +1 -1
  28. package/package.json +6 -6
@@ -1,105 +1,75 @@
1
1
  import { Temporal as e, Temporal as t } from "@js-temporal/polyfill";
2
- //#region src/core/types.ts
3
- function n(e) {
4
- return "timeZoneId" in e.start;
5
- }
6
- function r(e) {
7
- return !("timeZoneId" in e.start);
8
- }
9
- function i(t) {
10
- let { id: n, start: r, end: i } = t, o = r instanceof e.ZonedDateTime, s = r instanceof e.PlainDate;
11
- if (!o && !s) throw TypeError(`[CalendarEvent ${n}] start must be Temporal.ZonedDateTime or Temporal.PlainDate. Got ${r?.constructor?.name ?? typeof r}.`);
12
- if (o) try {
13
- r.toInstant();
14
- } catch (e) {
15
- let t = r.timeZoneId;
16
- throw TypeError(`[CalendarEvent ${n}] start.timeZoneId='${t}' is not a recognised IANA zone (Temporal threw '${e.message}'). Use a real IANA name like 'Europe/Vienna' / 'America/Los_Angeles'.`, { cause: e });
17
- }
18
- if (i !== void 0) {
19
- let t = i instanceof e.ZonedDateTime, a = i instanceof e.PlainDate;
20
- if (!t && !a) throw TypeError(`[CalendarEvent ${n}] end must be Temporal.ZonedDateTime or Temporal.PlainDate. Got ${i?.constructor?.name ?? typeof i}.`);
21
- if (o !== t) throw TypeError(`[CalendarEvent ${n}] start and end must be the same shape. Got start=${o ? "ZonedDateTime" : "PlainDate"}, end=${t ? "ZonedDateTime" : "PlainDate"}.`);
22
- if (o) {
23
- if (e.Instant.compare(r.toInstant(), i.toInstant()) >= 0) throw RangeError(`[CalendarEvent ${n}] end must be strictly after start.`);
24
- } else if (e.PlainDate.compare(r, i) >= 0) throw RangeError(`[CalendarEvent ${n}] end must be strictly after start.`);
25
- }
26
- let c = t.meta;
27
- if ((c?.rrule !== void 0 || c?.rdate !== void 0 || c?.exdate !== void 0 || c?.recurrenceId !== void 0) && !a.has(n)) {
28
- a.add(n);
29
- let e = `[@cocoar/vue-calendar] [CalendarEvent ${n}] meta.rrule / .rdate / .exdate / .recurrenceId is set, but recurrence is a separate series pipeline. This event renders only at \`start\`. Construct a \`RecurringSeries\` and bind it through \`CalendarBuilder.series(...)\` instead of putting rules into event metadata.`;
30
- typeof console < "u" && console.warn(e);
31
- }
32
- }
33
- var a = /* @__PURE__ */ new Set();
34
- //#endregion
35
2
  //#region src/core/temporal.ts
36
- function o(e) {
3
+ function n(e) {
37
4
  return e % 7;
38
5
  }
39
- var s = !1;
40
- function c(e) {
6
+ var r = !1;
7
+ function i(e) {
41
8
  try {
42
- let t = new Intl.Locale(e), n = t.getWeekInfo?.() ?? t.weekInfo;
43
- if (n && typeof n.firstDay == "number") return o(n.firstDay);
9
+ let t = new Intl.Locale(e), r = t.getWeekInfo?.() ?? t.weekInfo;
10
+ if (r && typeof r.firstDay == "number") return n(r.firstDay);
44
11
  } catch {}
45
- return !s && typeof console < "u" && (s = !0, console.warn(`[@cocoar/vue-calendar] Intl.Locale.weekInfo is not available on this runtime — falling back to Monday for locale '${e}'. Article 9: defaults are not decisions. Pass \`.firstDayOfWeek(0)\` (Sunday) / \`.firstDayOfWeek(6)\` (Saturday) etc. explicitly so the week-start is deterministic across browsers.`)), 1;
12
+ return !r && typeof console < "u" && (r = !0, console.warn(`[@cocoar/vue-calendar] Intl.Locale.weekInfo is not available on this runtime — falling back to Monday for locale '${e}'. Article 9: defaults are not decisions. Pass \`.firstDayOfWeek(0)\` (Sunday) / \`.firstDayOfWeek(6)\` (Saturday) etc. explicitly so the week-start is deterministic across browsers.`)), 1;
46
13
  }
47
- function l(e) {
14
+ function a(e) {
48
15
  try {
49
16
  return new Intl.DateTimeFormat(e, { hour: "numeric" }).resolvedOptions().hour12 ?? !1;
50
17
  } catch {
51
18
  return !1;
52
19
  }
53
20
  }
54
- var u = !1;
55
- function d() {
21
+ var o = !1;
22
+ function s() {
56
23
  try {
57
- let e = Intl.DateTimeFormat().resolvedOptions().timeZone;
58
- if (e) return e;
59
- } catch {}
60
- return !u && typeof console < "u" && (u = !0, console.warn("[@cocoar/vue-calendar] detectBrowserTimezone() couldn't read Intl.DateTimeFormat — falling back to 'UTC'. This is the Article-4 anti-pattern: human-meaningful times will render at the wrong wall-clock for users not in UTC. Pass an explicit IANA zone to `builder.timezone(...)` (e.g. 'Europe/Vienna'). If your app really does run in UTC, pass 'UTC' explicitly to silence this warning.")), "UTC";
24
+ return Intl.DateTimeFormat().resolvedOptions().timeZone || void 0;
25
+ } catch {
26
+ return;
27
+ }
28
+ }
29
+ function c() {
30
+ return s() || (!o && typeof console < "u" && (o = !0, console.warn("[@cocoar/vue-calendar] detectBrowserTimezone() couldn't read Intl.DateTimeFormat — falling back to 'UTC'. This is the Article-4 anti-pattern: human-meaningful times will render at the wrong wall-clock for users not in UTC. Pass an explicit IANA zone to `builder.timezone(...)` (e.g. 'Europe/Vienna'). If your app really does run in UTC, pass 'UTC' explicitly to silence this warning.")), "UTC");
61
31
  }
62
- function f(e, t) {
32
+ function l(e, t) {
63
33
  if (!t) return e;
64
34
  let n = { ...e };
65
35
  return t.hour12 !== void 0 && (n.hour12 = t.hour12), (t.dateStyle !== void 0 || t.timeStyle !== void 0) && (delete n.weekday, delete n.era, delete n.year, delete n.month, delete n.day, delete n.dayPeriod, delete n.hour, delete n.minute, delete n.second, delete n.fractionalSecondDigits, delete n.timeZoneName), t.dateStyle !== void 0 && (n.dateStyle = t.dateStyle), t.timeStyle !== void 0 && (n.timeStyle = t.timeStyle), n;
66
36
  }
67
- function p(e, t) {
68
- let n = (o(e.dayOfWeek) - t + 7) % 7;
69
- return n === 0 ? e : e.subtract({ days: n });
37
+ function u(e, t) {
38
+ let r = (n(e.dayOfWeek) - t + 7) % 7;
39
+ return r === 0 ? e : e.subtract({ days: r });
70
40
  }
71
- function m(e, t) {
72
- return p(e, t).add({ days: 6 });
41
+ function d(e, t) {
42
+ return u(e, t).add({ days: 6 });
73
43
  }
74
- function h(e) {
44
+ function f(e) {
75
45
  return e.with({ day: 1 });
76
46
  }
77
- function g(e) {
47
+ function p(e) {
78
48
  return e.with({ day: e.daysInMonth });
79
49
  }
80
- function _(e) {
50
+ function m(e) {
81
51
  let t = e.dayOfWeek, n = e.add({ days: 4 - t }), r = n.with({
82
52
  month: 1,
83
53
  day: 1
84
54
  }), i = (4 - r.dayOfWeek + 7) % 7, a = r.add({ days: i }), o = n.since(a, { largestUnit: "days" }).days;
85
55
  return Math.floor(o / 7) + 1;
86
56
  }
87
- function v(e, t) {
88
- let n = p(e, t), r = Array(7);
57
+ function h(e, t) {
58
+ let n = u(e, t), r = Array(7);
89
59
  for (let e = 0; e < 7; e++) r[e] = n.add({ days: e });
90
60
  return r;
91
61
  }
92
- function y(e, t, n) {
93
- if (n.length === 0) return [];
94
- let r = new Set(n);
95
- return v(e, t).filter((e) => r.has(o(e.dayOfWeek)));
62
+ function g(e, t, r) {
63
+ if (r.length === 0) return [];
64
+ let i = new Set(r);
65
+ return h(e, t).filter((e) => i.has(n(e.dayOfWeek)));
96
66
  }
97
- function b(e, t) {
98
- let n = p(e.toPlainDate({ day: 1 }), t), r = Array(42);
67
+ function _(e, t) {
68
+ let n = u(e.toPlainDate({ day: 1 }), t), r = Array(42);
99
69
  for (let e = 0; e < 42; e++) r[e] = n.add({ days: e });
100
70
  return r;
101
71
  }
102
- function x(e, t, n = "short") {
72
+ function v(e, t, n = "short") {
103
73
  let r = new Intl.DateTimeFormat(e, { weekday: n }), i = new Date(Date.UTC(2024, 0, 7)), a = Array(7);
104
74
  for (let e = 0; e < 7; e++) {
105
75
  let n = (t + e) % 7, o = new Date(i.getTime());
@@ -107,19 +77,19 @@ function x(e, t, n = "short") {
107
77
  }
108
78
  return a;
109
79
  }
110
- function S(e) {
80
+ function y(e) {
111
81
  return e.toString();
112
82
  }
113
- function C(e, n) {
83
+ function b(e, n) {
114
84
  return e instanceof t.PlainDate ? e : e.withTimeZone(n).toPlainDate();
115
85
  }
116
- function w(e) {
86
+ function x(e) {
117
87
  return t.Now.plainDateISO(e);
118
88
  }
119
- function T(e) {
89
+ function S(e) {
120
90
  return t.Now.zonedDateTimeISO(e);
121
91
  }
122
- function E(e) {
92
+ function C(e) {
123
93
  let { local: n, timeZoneId: r, dstPolicy: i = "compatible" } = e, a;
124
94
  try {
125
95
  a = t.PlainDateTime.from(n);
@@ -135,31 +105,61 @@ function E(e) {
135
105
  }
136
106
  return o;
137
107
  }
138
- function D(e) {
108
+ function w(e) {
139
109
  try {
140
110
  return t.PlainDate.from(e);
141
111
  } catch (t) {
142
112
  throw RangeError(`[parsePlainDate] iso='${e}' is not a parseable ISO-8601 date (${t.message}). Expected format: 'YYYY-MM-DD'.`, { cause: t });
143
113
  }
144
114
  }
145
- function O(e) {
115
+ function T(e) {
146
116
  return {
147
117
  local: e.toPlainDateTime().toString(),
148
118
  timeZoneId: e.timeZoneId
149
119
  };
150
120
  }
151
- function k(e) {
121
+ function E(e) {
152
122
  return t.ZonedDateTime.compare(e, e.startOfDay()) === 0;
153
123
  }
154
124
  //#endregion
155
- //#region src/core/dnd/move-math.ts
156
- var A = 15, j = class extends Error {
125
+ //#region src/core/types.ts
126
+ function D(e) {
127
+ return "timeZoneId" in e.start;
128
+ }
129
+ function O(e) {
130
+ return !("timeZoneId" in e.start);
131
+ }
132
+ function k(t) {
133
+ let { id: n, start: r, end: i } = t, a = r instanceof e.ZonedDateTime, o = r instanceof e.PlainDate;
134
+ if (!a && !o) throw TypeError(`[CalendarEvent ${n}] start must be Temporal.ZonedDateTime or Temporal.PlainDate. Got ${r?.constructor?.name ?? typeof r}.`);
135
+ if (a) try {
136
+ r.toInstant();
137
+ } catch (e) {
138
+ let t = r.timeZoneId;
139
+ throw TypeError(`[CalendarEvent ${n}] start.timeZoneId='${t}' is not a recognised IANA zone (Temporal threw '${e.message}'). Use a real IANA name like 'Europe/Vienna' / 'America/Los_Angeles'.`, { cause: e });
140
+ }
141
+ if (i !== void 0) {
142
+ let t = i instanceof e.ZonedDateTime, o = i instanceof e.PlainDate;
143
+ if (!t && !o) throw TypeError(`[CalendarEvent ${n}] end must be Temporal.ZonedDateTime or Temporal.PlainDate. Got ${i?.constructor?.name ?? typeof i}.`);
144
+ if (a !== t) throw TypeError(`[CalendarEvent ${n}] start and end must be the same shape. Got start=${a ? "ZonedDateTime" : "PlainDate"}, end=${t ? "ZonedDateTime" : "PlainDate"}.`);
145
+ if (a) {
146
+ if (e.Instant.compare(r.toInstant(), i.toInstant()) >= 0) throw RangeError(`[CalendarEvent ${n}] end must be strictly after start.`);
147
+ } else if (e.PlainDate.compare(r, i) >= 0) throw RangeError(`[CalendarEvent ${n}] end must be strictly after start.`);
148
+ }
149
+ let s = t.meta;
150
+ if ((s?.rrule !== void 0 || s?.rdate !== void 0 || s?.exdate !== void 0 || s?.recurrenceId !== void 0) && !A.has(n)) {
151
+ A.add(n);
152
+ let e = `[@cocoar/vue-calendar] [CalendarEvent ${n}] meta.rrule / .rdate / .exdate / .recurrenceId is set, but recurrence is a separate series pipeline. This event renders only at \`start\`. Construct a \`RecurringSeries\` and bind it through \`CalendarBuilder.series(...)\` instead of putting rules into event metadata.`;
153
+ typeof console < "u" && console.warn(e);
154
+ }
155
+ }
156
+ var A = /* @__PURE__ */ new Set(), j = 15, M = class extends Error {
157
157
  disambiguation;
158
158
  constructor(e, t) {
159
159
  super(t), this.name = "DstResolutionError", this.disambiguation = e;
160
160
  }
161
161
  };
162
- function M(t, n) {
162
+ function N(t, n) {
163
163
  let r;
164
164
  try {
165
165
  r = e.PlainDateTime.from({
@@ -185,8 +185,8 @@ function M(t, n) {
185
185
  let a = i.toPlainDateTime();
186
186
  return e.PlainDateTime.compare(a, r) === 0 ? "overlap" : "gap";
187
187
  }
188
- function N(e, t, n, r, i, a) {
189
- let o = P(t, r, i, e);
188
+ function P(e, t, n, r, i, a) {
189
+ let o = F(t, r, i, e);
190
190
  return {
191
191
  event: t,
192
192
  original: {
@@ -205,150 +205,150 @@ function N(e, t, n, r, i, a) {
205
205
  native: a
206
206
  };
207
207
  }
208
- function P(t, i, a, o = "compatible") {
209
- if (r(t)) {
210
- let n = t.start, r = t.end ?? n.add({ days: 1 }), o = e.PlainDate.from(i.date);
211
- if (a === "allDay-resize-start" || a === "month-resize-start") {
212
- let t = r.subtract({ days: 1 });
208
+ function F(t, n, r, i = "compatible") {
209
+ if (O(t)) {
210
+ let i = t.start, a = t.end ?? i.add({ days: 1 }), o = e.PlainDate.from(n.date);
211
+ if (r === "allDay-resize-start" || r === "month-resize-start") {
212
+ let t = a.subtract({ days: 1 });
213
213
  return {
214
214
  start: e.PlainDate.compare(o, t) > 0 ? t : o,
215
- end: r
215
+ end: a
216
216
  };
217
217
  }
218
- if (a === "allDay-resize-end" || a === "month-resize-end") {
219
- let t = n.add({ days: 1 }), r = o.add({ days: 1 });
218
+ if (r === "allDay-resize-end" || r === "month-resize-end") {
219
+ let t = i.add({ days: 1 }), n = o.add({ days: 1 });
220
220
  return {
221
- start: n,
222
- end: e.PlainDate.compare(r, t) < 0 ? t : r
221
+ start: i,
222
+ end: e.PlainDate.compare(n, t) < 0 ? t : n
223
223
  };
224
224
  }
225
- let s = n.until(r).total({ unit: "days" }), c = o, l = c.add({ days: s });
225
+ let s = i.until(a).total({ unit: "days" }), c = o, l = c.add({ days: s });
226
226
  return t.end ? {
227
227
  start: c,
228
228
  end: l
229
229
  } : { start: c };
230
230
  }
231
- if (!n(t)) throw TypeError(`[applyMoveToEvent] event ${t.id} has unrecognised start shape`);
232
- let s = t.start.timeZoneId, c = t.end?.timeZoneId ?? s, l = t.start, u = t.end ?? null, d = e.PlainDate.from(i.date);
233
- if (i.minutes === null && a === "month") {
234
- let e = l.withTimeZone(i.displayZone).toPlainDate().until(d, { largestUnit: "days" }).days;
231
+ if (!D(t)) throw TypeError(`[applyMoveToEvent] event ${t.id} has unrecognised start shape`);
232
+ let a = t.start.timeZoneId, o = t.end?.timeZoneId ?? a, s = t.start, c = t.end ?? null, l = e.PlainDate.from(n.date);
233
+ if (n.minutes === null && r === "month") {
234
+ let e = s.withTimeZone(n.displayZone).toPlainDate().until(l, { largestUnit: "days" }).days;
235
235
  return {
236
- start: l.add({ days: e }),
237
- ...u ? { end: u.add({ days: e }) } : {},
236
+ start: s.add({ days: e }),
237
+ ...c ? { end: c.add({ days: e }) } : {},
238
238
  disambiguation: null
239
239
  };
240
240
  }
241
- if (i.minutes === null && (a === "timed" || a === "timed-resize-start" || a === "timed-resize-end")) throw TypeError(`[applyMoveToEvent] timed event ${t.id} cannot be dropped onto an all-day target (target.minutes === null). To convert a timed event to all-day, change the event's start to a Temporal.PlainDate explicitly in your event-source — the drop API does not auto-convert.`);
242
- let f = e.PlainTime.from({
243
- hour: Math.floor(i.minutes / 60),
244
- minute: i.minutes % 60
245
- }), p = M(i.displayZone, {
246
- year: d.year,
247
- month: d.month,
248
- day: d.day,
249
- hour: f.hour,
250
- minute: f.minute
241
+ if (n.minutes === null && (r === "timed" || r === "timed-resize-start" || r === "timed-resize-end")) throw TypeError(`[applyMoveToEvent] timed event ${t.id} cannot be dropped onto an all-day target (target.minutes === null). To convert a timed event to all-day, change the event's start to a Temporal.PlainDate explicitly in your event-source — the drop API does not auto-convert.`);
242
+ let u = e.PlainTime.from({
243
+ hour: Math.floor(n.minutes / 60),
244
+ minute: n.minutes % 60
245
+ }), d = N(n.displayZone, {
246
+ year: l.year,
247
+ month: l.month,
248
+ day: l.day,
249
+ hour: u.hour,
250
+ minute: u.minute
251
251
  });
252
- if (p && o === "reject") throw new j(p, `[applyMoveToEvent] target ${i.date}T${String(f.hour).padStart(2, "0")}:${String(f.minute).padStart(2, "0")} is a DST ${p} in ${i.displayZone}; policy='reject'.`);
253
- let m = o === "reject" ? "compatible" : o, h = e.PlainDateTime.from({
254
- year: d.year,
255
- month: d.month,
256
- day: d.day,
257
- hour: f.hour,
258
- minute: f.minute
259
- }).toZonedDateTime(i.displayZone, { disambiguation: m }), g = h.withTimeZone(s), _ = h.withTimeZone(c), v = p;
260
- if (a === "timed-resize-start") {
261
- let t = g;
262
- if (u) {
263
- let n = u.subtract({ minutes: 15 }).withTimeZone(s);
252
+ if (d && i === "reject") throw new M(d, `[applyMoveToEvent] target ${n.date}T${String(u.hour).padStart(2, "0")}:${String(u.minute).padStart(2, "0")} is a DST ${d} in ${n.displayZone}; policy='reject'.`);
253
+ let f = i === "reject" ? "compatible" : i, p = e.PlainDateTime.from({
254
+ year: l.year,
255
+ month: l.month,
256
+ day: l.day,
257
+ hour: u.hour,
258
+ minute: u.minute
259
+ }).toZonedDateTime(n.displayZone, { disambiguation: f }), m = p.withTimeZone(a), h = p.withTimeZone(o), g = d;
260
+ if (r === "timed-resize-start") {
261
+ let t = m;
262
+ if (c) {
263
+ let n = c.subtract({ minutes: 15 }).withTimeZone(a);
264
264
  e.Instant.compare(t.toInstant(), n.toInstant()) > 0 && (t = n);
265
265
  }
266
266
  return {
267
267
  start: t,
268
- ...u ? { end: u } : {},
269
- disambiguation: v
268
+ ...c ? { end: c } : {},
269
+ disambiguation: g
270
270
  };
271
271
  }
272
- if (a === "timed-resize-end") {
273
- let t = l.add({ minutes: 15 }).withTimeZone(c), n = _;
272
+ if (r === "timed-resize-end") {
273
+ let t = s.add({ minutes: 15 }).withTimeZone(o), n = h;
274
274
  return e.Instant.compare(n.toInstant(), t.toInstant()) < 0 && (n = t), {
275
- start: l,
275
+ start: s,
276
276
  end: n,
277
- disambiguation: v
277
+ disambiguation: g
278
278
  };
279
279
  }
280
- if (a === "month-resize-start") {
281
- let t = l.withTimeZone(i.displayZone), n = M(i.displayZone, {
282
- year: d.year,
283
- month: d.month,
284
- day: d.day,
280
+ if (r === "month-resize-start") {
281
+ let t = s.withTimeZone(n.displayZone), r = N(n.displayZone, {
282
+ year: l.year,
283
+ month: l.month,
284
+ day: l.day,
285
285
  hour: t.hour,
286
286
  minute: t.minute,
287
287
  second: t.second
288
288
  });
289
- if (n && o === "reject") throw new j(n, `[applyMoveToEvent] month-resize-start lands in a DST ${n} in ${i.displayZone}; policy='reject'.`);
290
- let r = o === "reject" ? "compatible" : o, a = e.PlainDateTime.from({
291
- year: d.year,
292
- month: d.month,
293
- day: d.day,
289
+ if (r && i === "reject") throw new M(r, `[applyMoveToEvent] month-resize-start lands in a DST ${r} in ${n.displayZone}; policy='reject'.`);
290
+ let o = i === "reject" ? "compatible" : i, u = e.PlainDateTime.from({
291
+ year: l.year,
292
+ month: l.month,
293
+ day: l.day,
294
294
  hour: t.hour,
295
295
  minute: t.minute,
296
296
  second: t.second
297
- }).toZonedDateTime(i.displayZone, { disambiguation: r }).withTimeZone(s);
298
- if (u) {
299
- let t = u.subtract({ minutes: 15 }).withTimeZone(s);
300
- e.Instant.compare(a.toInstant(), t.toInstant()) > 0 && (a = t);
297
+ }).toZonedDateTime(n.displayZone, { disambiguation: o }).withTimeZone(a);
298
+ if (c) {
299
+ let t = c.subtract({ minutes: 15 }).withTimeZone(a);
300
+ e.Instant.compare(u.toInstant(), t.toInstant()) > 0 && (u = t);
301
301
  }
302
302
  return {
303
- start: a,
304
- ...u ? { end: u } : {},
305
- disambiguation: n
303
+ start: u,
304
+ ...c ? { end: c } : {},
305
+ disambiguation: r
306
306
  };
307
307
  }
308
- if (a === "month-resize-end") {
309
- let t = u ?? l, n = u ? c : s, r = t.withTimeZone(i.displayZone);
310
- if (u !== null && k(r)) {
311
- let t = d.add({ days: 1 }).toZonedDateTime({ timeZone: i.displayZone }).withTimeZone(n), r = l.add({ minutes: 15 }).withTimeZone(n);
312
- return e.Instant.compare(t.toInstant(), r.toInstant()) < 0 && (t = r), {
313
- start: l,
308
+ if (r === "month-resize-end") {
309
+ let t = c ?? s, r = c ? o : a, u = t.withTimeZone(n.displayZone);
310
+ if (c !== null && E(u)) {
311
+ let t = l.add({ days: 1 }).toZonedDateTime({ timeZone: n.displayZone }).withTimeZone(r), i = s.add({ minutes: 15 }).withTimeZone(r);
312
+ return e.Instant.compare(t.toInstant(), i.toInstant()) < 0 && (t = i), {
313
+ start: s,
314
314
  end: t
315
315
  };
316
316
  }
317
- let a = M(i.displayZone, {
318
- year: d.year,
319
- month: d.month,
320
- day: d.day,
321
- hour: r.hour,
322
- minute: r.minute,
323
- second: r.second
317
+ let d = N(n.displayZone, {
318
+ year: l.year,
319
+ month: l.month,
320
+ day: l.day,
321
+ hour: u.hour,
322
+ minute: u.minute,
323
+ second: u.second
324
324
  });
325
- if (a && o === "reject") throw new j(a, `[applyMoveToEvent] month-resize-end lands in a DST ${a} in ${i.displayZone}; policy='reject'.`);
326
- let f = o === "reject" ? "compatible" : o, p = e.PlainDateTime.from({
327
- year: d.year,
328
- month: d.month,
329
- day: d.day,
330
- hour: r.hour,
331
- minute: r.minute,
332
- second: r.second
333
- }).toZonedDateTime(i.displayZone, { disambiguation: f }).withTimeZone(n), m = l.add({ minutes: 15 }).withTimeZone(n);
325
+ if (d && i === "reject") throw new M(d, `[applyMoveToEvent] month-resize-end lands in a DST ${d} in ${n.displayZone}; policy='reject'.`);
326
+ let f = i === "reject" ? "compatible" : i, p = e.PlainDateTime.from({
327
+ year: l.year,
328
+ month: l.month,
329
+ day: l.day,
330
+ hour: u.hour,
331
+ minute: u.minute,
332
+ second: u.second
333
+ }).toZonedDateTime(n.displayZone, { disambiguation: f }).withTimeZone(r), m = s.add({ minutes: 15 }).withTimeZone(r);
334
334
  return e.Instant.compare(p.toInstant(), m.toInstant()) < 0 && (p = m), {
335
- start: l,
335
+ start: s,
336
336
  end: p,
337
- disambiguation: a
337
+ disambiguation: d
338
338
  };
339
339
  }
340
- if (u) {
341
- let e = u.epochMilliseconds - l.epochMilliseconds;
340
+ if (c) {
341
+ let e = c.epochMilliseconds - s.epochMilliseconds;
342
342
  return {
343
- start: g,
344
- end: g.add({ milliseconds: e }).withTimeZone(c),
345
- disambiguation: v
343
+ start: m,
344
+ end: m.add({ milliseconds: e }).withTimeZone(o),
345
+ disambiguation: g
346
346
  };
347
347
  }
348
348
  return {
349
- start: g,
350
- disambiguation: v
349
+ start: m,
350
+ disambiguation: g
351
351
  };
352
352
  }
353
353
  //#endregion
354
- export { n as A, h as C, v as D, w as E, y as O, E as S, o as T, _, M as a, T as b, S as c, l as d, g as f, O as g, C as h, N as i, i as j, r as k, d as l, k as m, A as n, t as o, m as p, P as r, f as s, j as t, c as u, x as v, p as w, D as x, b as y };
354
+ export { x as A, S as C, f as D, s as E, g as M, u as O, _ as S, C as T, E as _, N as a, m as b, k as c, y as d, c as f, d as g, p as h, P as i, h as j, n as k, t as l, a as m, j as n, O as o, i as p, F as r, D as s, M as t, l as u, b as v, w, v as x, T as y };
@@ -1,4 +1,4 @@
1
- import { a as e, t } from "./move-math-C9mwvFPJ.js";
1
+ import { a as e, t } from "./move-math-ChynaO4h.js";
2
2
  import { n, t as r } from "./types-fzCER_SC.js";
3
3
  import { Temporal as i } from "@js-temporal/polyfill";
4
4
  //#region src/recurrence/internal/series-to-engine.ts