@cocoar/vue-calendar 3.4.0-beta.21 → 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.
- package/dist/builders/calendar-builder.d.ts.map +1 -1
- package/dist/components/CoarMonthListView.vue.d.ts.map +1 -1
- package/dist/components/CoarMonthView.vue.d.ts.map +1 -1
- package/dist/components/CoarTimeGrid.vue.d.ts.map +1 -1
- package/dist/components/internal/CoarEventAssignees.vue.d.ts.map +1 -1
- package/dist/components/internal/month/CoarMonthCell.vue.d.ts.map +1 -1
- package/dist/components/internal/month/CoarMonthDayOverlay.vue.d.ts.map +1 -1
- package/dist/components/internal/month/CoarMonthGrid.vue.d.ts +2 -0
- package/dist/components/internal/month/CoarMonthGrid.vue.d.ts.map +1 -1
- package/dist/components/internal/time-grid/CoarTimeGridAllDayBand.vue.d.ts.map +1 -1
- package/dist/components/internal/time-grid/CoarTimeGridEvent.vue.d.ts.map +1 -1
- package/dist/components/internal/time-grid/CoarTimeGridSurface.vue.d.ts.map +1 -1
- package/dist/components/internal/time-grid/CoarTimeSelectionLayer.vue.d.ts.map +1 -1
- package/dist/composables/useCalendarDnd.d.ts.map +1 -1
- package/dist/composables/useCoarDrag.d.ts.map +1 -1
- package/dist/composables/useMonthDayOverlay.d.ts.map +1 -1
- package/dist/composables/useTimeGridDnd.d.ts.map +1 -1
- package/dist/composables/useTimeGridPresentation.d.ts.map +1 -1
- package/dist/core/temporal.d.ts +2 -0
- package/dist/core/temporal.d.ts.map +1 -1
- package/dist/{core-Dcw3ry8Z.js → core-BU4PCeme.js} +153 -153
- package/dist/core.js +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1811 -1766
- package/dist/{move-math-C9mwvFPJ.js → move-math-ChynaO4h.js} +171 -171
- package/dist/recurrence.js +1 -1
- package/dist/vue-calendar.css +1 -1
- 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
|
|
3
|
+
function n(e) {
|
|
37
4
|
return e % 7;
|
|
38
5
|
}
|
|
39
|
-
var
|
|
40
|
-
function
|
|
6
|
+
var r = !1;
|
|
7
|
+
function i(e) {
|
|
41
8
|
try {
|
|
42
|
-
let t = new Intl.Locale(e),
|
|
43
|
-
if (
|
|
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 !
|
|
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
|
|
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
|
|
55
|
-
function
|
|
21
|
+
var o = !1;
|
|
22
|
+
function s() {
|
|
56
23
|
try {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
|
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
|
|
68
|
-
let
|
|
69
|
-
return
|
|
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
|
|
72
|
-
return
|
|
41
|
+
function d(e, t) {
|
|
42
|
+
return u(e, t).add({ days: 6 });
|
|
73
43
|
}
|
|
74
|
-
function
|
|
44
|
+
function f(e) {
|
|
75
45
|
return e.with({ day: 1 });
|
|
76
46
|
}
|
|
77
|
-
function
|
|
47
|
+
function p(e) {
|
|
78
48
|
return e.with({ day: e.daysInMonth });
|
|
79
49
|
}
|
|
80
|
-
function
|
|
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
|
|
88
|
-
let n =
|
|
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
|
|
93
|
-
if (
|
|
94
|
-
let
|
|
95
|
-
return
|
|
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
|
|
98
|
-
let n =
|
|
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
|
|
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
|
|
80
|
+
function y(e) {
|
|
111
81
|
return e.toString();
|
|
112
82
|
}
|
|
113
|
-
function
|
|
83
|
+
function b(e, n) {
|
|
114
84
|
return e instanceof t.PlainDate ? e : e.withTimeZone(n).toPlainDate();
|
|
115
85
|
}
|
|
116
|
-
function
|
|
86
|
+
function x(e) {
|
|
117
87
|
return t.Now.plainDateISO(e);
|
|
118
88
|
}
|
|
119
|
-
function
|
|
89
|
+
function S(e) {
|
|
120
90
|
return t.Now.zonedDateTimeISO(e);
|
|
121
91
|
}
|
|
122
|
-
function
|
|
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
|
|
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
|
|
115
|
+
function T(e) {
|
|
146
116
|
return {
|
|
147
117
|
local: e.toPlainDateTime().toString(),
|
|
148
118
|
timeZoneId: e.timeZoneId
|
|
149
119
|
};
|
|
150
120
|
}
|
|
151
|
-
function
|
|
121
|
+
function E(e) {
|
|
152
122
|
return t.ZonedDateTime.compare(e, e.startOfDay()) === 0;
|
|
153
123
|
}
|
|
154
124
|
//#endregion
|
|
155
|
-
//#region src/core/
|
|
156
|
-
|
|
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
|
|
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
|
|
189
|
-
let o =
|
|
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
|
|
209
|
-
if (
|
|
210
|
-
let
|
|
211
|
-
if (
|
|
212
|
-
let t =
|
|
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:
|
|
215
|
+
end: a
|
|
216
216
|
};
|
|
217
217
|
}
|
|
218
|
-
if (
|
|
219
|
-
let t =
|
|
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:
|
|
222
|
-
end: e.PlainDate.compare(
|
|
221
|
+
start: i,
|
|
222
|
+
end: e.PlainDate.compare(n, t) < 0 ? t : n
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
|
-
let 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 (!
|
|
232
|
-
let
|
|
233
|
-
if (
|
|
234
|
-
let e =
|
|
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:
|
|
237
|
-
...
|
|
236
|
+
start: s.add({ days: e }),
|
|
237
|
+
...c ? { end: c.add({ days: e }) } : {},
|
|
238
238
|
disambiguation: null
|
|
239
239
|
};
|
|
240
240
|
}
|
|
241
|
-
if (
|
|
242
|
-
let
|
|
243
|
-
hour: Math.floor(
|
|
244
|
-
minute:
|
|
245
|
-
}),
|
|
246
|
-
year:
|
|
247
|
-
month:
|
|
248
|
-
day:
|
|
249
|
-
hour:
|
|
250
|
-
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 (
|
|
253
|
-
let
|
|
254
|
-
year:
|
|
255
|
-
month:
|
|
256
|
-
day:
|
|
257
|
-
hour:
|
|
258
|
-
minute:
|
|
259
|
-
}).toZonedDateTime(
|
|
260
|
-
if (
|
|
261
|
-
let t =
|
|
262
|
-
if (
|
|
263
|
-
let n =
|
|
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
|
-
...
|
|
269
|
-
disambiguation:
|
|
268
|
+
...c ? { end: c } : {},
|
|
269
|
+
disambiguation: g
|
|
270
270
|
};
|
|
271
271
|
}
|
|
272
|
-
if (
|
|
273
|
-
let t =
|
|
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:
|
|
275
|
+
start: s,
|
|
276
276
|
end: n,
|
|
277
|
-
disambiguation:
|
|
277
|
+
disambiguation: g
|
|
278
278
|
};
|
|
279
279
|
}
|
|
280
|
-
if (
|
|
281
|
-
let t =
|
|
282
|
-
year:
|
|
283
|
-
month:
|
|
284
|
-
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 (
|
|
290
|
-
let
|
|
291
|
-
year:
|
|
292
|
-
month:
|
|
293
|
-
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(
|
|
298
|
-
if (
|
|
299
|
-
let t =
|
|
300
|
-
e.Instant.compare(
|
|
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:
|
|
304
|
-
...
|
|
305
|
-
disambiguation:
|
|
303
|
+
start: u,
|
|
304
|
+
...c ? { end: c } : {},
|
|
305
|
+
disambiguation: r
|
|
306
306
|
};
|
|
307
307
|
}
|
|
308
|
-
if (
|
|
309
|
-
let t =
|
|
310
|
-
if (
|
|
311
|
-
let t =
|
|
312
|
-
return e.Instant.compare(t.toInstant(),
|
|
313
|
-
start:
|
|
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
|
|
318
|
-
year:
|
|
319
|
-
month:
|
|
320
|
-
day:
|
|
321
|
-
hour:
|
|
322
|
-
minute:
|
|
323
|
-
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 (
|
|
326
|
-
let f =
|
|
327
|
-
year:
|
|
328
|
-
month:
|
|
329
|
-
day:
|
|
330
|
-
hour:
|
|
331
|
-
minute:
|
|
332
|
-
second:
|
|
333
|
-
}).toZonedDateTime(
|
|
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:
|
|
335
|
+
start: s,
|
|
336
336
|
end: p,
|
|
337
|
-
disambiguation:
|
|
337
|
+
disambiguation: d
|
|
338
338
|
};
|
|
339
339
|
}
|
|
340
|
-
if (
|
|
341
|
-
let e =
|
|
340
|
+
if (c) {
|
|
341
|
+
let e = c.epochMilliseconds - s.epochMilliseconds;
|
|
342
342
|
return {
|
|
343
|
-
start:
|
|
344
|
-
end:
|
|
345
|
-
disambiguation:
|
|
343
|
+
start: m,
|
|
344
|
+
end: m.add({ milliseconds: e }).withTimeZone(o),
|
|
345
|
+
disambiguation: g
|
|
346
346
|
};
|
|
347
347
|
}
|
|
348
348
|
return {
|
|
349
|
-
start:
|
|
350
|
-
disambiguation:
|
|
349
|
+
start: m,
|
|
350
|
+
disambiguation: g
|
|
351
351
|
};
|
|
352
352
|
}
|
|
353
353
|
//#endregion
|
|
354
|
-
export {
|
|
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 };
|
package/dist/recurrence.js
CHANGED