temporal-polyfill-lite 0.2.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  function getNameFromUnit(e) {
2
- return se[e];
2
+ return ce[e];
3
3
  }
4
4
  function nanosecondsForTimeUnit(e) {
5
5
  return de[e - 3];
@@ -193,11 +193,11 @@ function divideTimeDurationToFloatingPoint(e, t) {
193
193
  ? timeDurationToSubsecondsNumber(e, -9 + Math.log10(t), !0)
194
194
  : (i / t) * e[0] + e[1] / t;
195
195
  }
196
- function interpretISODateTimeOffset(e, o, n, r, a, i, c, s) {
196
+ function interpretISODateTimeOffset(e, o, n, r, a, i, s, c) {
197
197
  if (!o) return getStartOfDay(a, e);
198
198
  const l = combineIsoDateAndTimeRecord(e, o);
199
- if (n === v || (n === y && c == F)) return getEpochNanosecondsFor(a, l, i);
200
- if (n === w || (n === y && "use" == c))
199
+ if (n === v || (n === y && s == F)) return getEpochNanosecondsFor(a, l, i);
200
+ if (n === w || (n === y && "use" == s))
201
201
  return validateEpochNanoseconds(
202
202
  getUtcEpochNanoseconds(
203
203
  balanceIsoDateTime(l.o.t, l.o.u, l.o.T, l.p.D, l.p.I, l.p.O, l.p.F, l.p.S, l.p.$ - r),
@@ -210,10 +210,10 @@ function interpretISODateTimeOffset(e, o, n, r, a, i, c, s) {
210
210
  for (const e of d) {
211
211
  const o = getOffsetNanosecondsFor(a, e);
212
212
  if (o === r) return e;
213
- if (!s && roundNumberToIncrement(o, t, Z) === r) return e;
213
+ if (!c && roundNumberToIncrement(o, t, Z) === r) return e;
214
214
  }
215
215
  return (
216
- c === S && throwRangeError("time zone offset mismatch"),
216
+ s === S && throwRangeError("time zone offset mismatch"),
217
217
  disambiguatePossibleEpochNanoseconds(d, a, l, i)
218
218
  );
219
219
  }
@@ -223,8 +223,8 @@ function toTemporalZonedDateTime(e, t) {
223
223
  r,
224
224
  a,
225
225
  i,
226
- c,
227
226
  s,
227
+ c,
228
228
  l = !1,
229
229
  d = !0;
230
230
  if (isObject(e)) {
@@ -248,7 +248,7 @@ function toTemporalZonedDateTime(e, t) {
248
248
  const d = getOptionsObject(t);
249
249
  ((r = getTemporalDisambiguationOption(d)), (a = getTemporalOffsetOption(d, p)));
250
250
  const m = interpretTemporalDateTimeFields(i, l, getTemporalOverflowOption(d));
251
- ((c = m.o), (s = m.p));
251
+ ((s = m.o), (c = m.p));
252
252
  } else {
253
253
  validateString(e);
254
254
  const m = parseIsoDateTime(e, [et]);
@@ -262,12 +262,12 @@ function toTemporalZonedDateTime(e, t) {
262
262
  ((r = getTemporalDisambiguationOption(u)),
263
263
  (a = getTemporalOffsetOption(u, p)),
264
264
  getTemporalOverflowOption(u),
265
- (c = createIsoDateRecord(m.t, m.u, m.T)),
266
- (s = m.p));
265
+ (s = createIsoDateRecord(m.t, m.u, m.T)),
266
+ (c = m.p));
267
267
  }
268
268
  const m = l ? w : n ? y : v;
269
269
  return createZonedDateTimeSlot(
270
- interpretISODateTimeOffset(c, s, m, m === y ? parseDateTimeUtcOffset(n) : 0, o, r, a, d),
270
+ interpretISODateTimeOffset(s, c, m, m === y ? parseDateTimeUtcOffset(n) : 0, o, r, a, d),
271
271
  o,
272
272
  i,
273
273
  );
@@ -286,13 +286,13 @@ function createTemporalZonedDateTime(e, t, o, n) {
286
286
  function createZonedDateTimeSlot(e, t, o, n) {
287
287
  return { U: e, P: t, Y: o, W: n };
288
288
  }
289
- function temporalZonedDateTimeToString(e, t, o, n, r, a = 1, i = K, c = P) {
290
- const s = roundTemporalInstant(e.U, a, i, c),
289
+ function temporalZonedDateTimeToString(e, t, o, n, r, a = 1, i = K, s = P) {
290
+ const c = roundTemporalInstant(e.U, a, i, s),
291
291
  l =
292
- epochSeconds(s) === epochSeconds(e.U)
292
+ epochSeconds(c) === epochSeconds(e.U)
293
293
  ? getOffsetNanosecondsForZonedDateTimeSlot(e)
294
- : getOffsetNanosecondsFor(e.P, s);
295
- return `${isoDateTimeToString(getIsoDateTimeFromOffsetNanoseconds(s, l), "iso8601", t, j)}${r === L ? "" : formatDateTimeUtcOffsetRounded(l)}${n === z ? "" : `[${n === V ? "!" : ""}${e.P}]`}${formatCalendarAnnotation(e.Y, o)}`;
294
+ : getOffsetNanosecondsFor(e.P, c);
295
+ return `${isoDateTimeToString(getIsoDateTimeFromOffsetNanoseconds(c, l), "iso8601", t, j)}${r === L ? "" : formatDateTimeUtcOffsetRounded(l)}${n === z ? "" : `[${n === V ? "!" : ""}${e.P}]`}${formatCalendarAnnotation(e.Y, o)}`;
296
296
  }
297
297
  function addZonedDateTime(e, t, o) {
298
298
  if (0 === dateDurationSign(t.A)) return addInstant(e.U, t.p);
@@ -317,18 +317,18 @@ function differenceZonedDateTime(e, t, o) {
317
317
  timeDurationFromEpochNanosecondsDifference(t.U, e.U),
318
318
  );
319
319
  let i,
320
- c = differenceTime(r.p, a.p);
320
+ s = differenceTime(r.p, a.p);
321
321
  for (
322
- let o = Mt(c) === n ? 1 : 0;
322
+ let o = Mt(s) === n ? 1 : 0;
323
323
  o <= (3 - n) / 2 &&
324
324
  ((i = combineIsoDateAndTimeRecord(addDaysToIsoDate(a.o, o * n), r.p)),
325
- (c = timeDurationFromEpochNanosecondsDifference(t.U, getEpochNanosecondsFor(e.P, i, g))),
326
- Mt(c) === n);
325
+ (s = timeDurationFromEpochNanosecondsDifference(t.U, getEpochNanosecondsFor(e.P, i, g))),
326
+ Mt(s) === n);
327
327
  o++
328
328
  );
329
329
  return combineDateAndTimeDuration(
330
330
  calendarDateUntil(e.Y, r.o, i.o, largerOfTwoTemporalUnits(o, B)),
331
- c,
331
+ s,
332
332
  );
333
333
  }
334
334
  function differenceZonedDateTimeWithRounding(e, t, o, n, r, a) {
@@ -420,8 +420,8 @@ function createLruCache(e) {
420
420
  },
421
421
  };
422
422
  }
423
- function utcEpochMilliseconds(e, t, o, n = 0, a = 0, i = 0, c = 0) {
424
- return isoDateToEpochDays(e, t - 1, o) * r + Date.UTC(1970, 0, 1, n, a, i, c);
423
+ function utcEpochMilliseconds(e, t, o, n = 0, a = 0, i = 0, s = 0) {
424
+ return isoDateToEpochDays(e, t - 1, o) * r + Date.UTC(1970, 0, 1, n, a, i, s);
425
425
  }
426
426
  function clampEpochSecond(e) {
427
427
  return clamp(e, -1e10, 1 / 0);
@@ -432,16 +432,16 @@ function getNamedTimeZoneOffsetNanosecondsForEpochSecond(t, o, n) {
432
432
  a = (Ne[t] ||= createLruCache(5e3)),
433
433
  i = a.C(r);
434
434
  if (void 0 !== i) return i;
435
- const c = getFormatterForTimeZone(t).formatToParts(1e3 * r),
436
- s =
435
+ const s = getFormatterForTimeZone(t).formatToParts(1e3 * r),
436
+ c =
437
437
  (utcEpochMilliseconds(
438
438
  ...["year", "month", "day", "hour", "minute", "second"].map((e) =>
439
- toIntegerIfIntegral(c.find((t) => t.type === e).value),
439
+ toIntegerIfIntegral(s.find((t) => t.type === e).value),
440
440
  ),
441
441
  ) -
442
442
  1e3 * r) *
443
443
  e;
444
- return (n || a.B(r, s), s);
444
+ return (n || a.B(r, c), c);
445
445
  }
446
446
  function getFormatterForTimeZone(e) {
447
447
  return (Re[e] ||= new Nt("en-u-hc-h23", {
@@ -675,8 +675,8 @@ function toTemporalDateTime(e, t) {
675
675
  )
676
676
  );
677
677
  }
678
- function balanceIsoDateTime(e, t, o, n, r, a, i, c, s) {
679
- const l = balanceTime(n, r, a, i, c, s);
678
+ function balanceIsoDateTime(e, t, o, n, r, a, i, s, c) {
679
+ const l = balanceTime(n, r, a, i, s, c);
680
680
  return combineIsoDateAndTimeRecord(addDaysToIsoDate(createIsoDateRecord(e, t, o), l.K), l);
681
681
  }
682
682
  function createTemporalDateTime(e, t, o = Object.create($e.prototype)) {
@@ -698,22 +698,22 @@ function differenceISODateTime(e, t, o, n) {
698
698
  let i = t.o;
699
699
  a === compareIsoDate(e.o, t.o) &&
700
700
  ((i = addDaysToIsoDate(i, a)), (r = add24HourDaysToTimeDuration(r, -a)));
701
- const c = largerOfTwoTemporalUnits(B, n),
702
- s = calendarDateUntil(o, e.o, i, c);
701
+ const s = largerOfTwoTemporalUnits(B, n),
702
+ c = calendarDateUntil(o, e.o, i, s);
703
703
  return (
704
- n !== c && ((r = add24HourDaysToTimeDuration(r, s.K)), (s.K = 0)),
705
- combineDateAndTimeDuration(s, r)
704
+ n !== s && ((r = add24HourDaysToTimeDuration(r, c.K)), (c.K = 0)),
705
+ combineDateAndTimeDuration(c, r)
706
706
  );
707
707
  }
708
708
  function differencePlainDateTimeWithRounding(e, t, o, n, r, a, i) {
709
709
  if (!compareIsoDateTime(e, t))
710
710
  return combineDateAndTimeDuration(zeroDateDuration(), createTimeDurationFromSeconds(0));
711
711
  (validateIsoDateTime(e), validateIsoDateTime(t));
712
- const c = differenceISODateTime(e, t, o, n);
712
+ const s = differenceISODateTime(e, t, o, n);
713
713
  return a === K && 1 === r
714
- ? c
714
+ ? s
715
715
  : roundRelativeDuration(
716
- c,
716
+ s,
717
717
  getUtcEpochNanoseconds(e),
718
718
  getUtcEpochNanoseconds(t),
719
719
  e,
@@ -745,11 +745,11 @@ function addDurationToDateTime(e, t, o, n) {
745
745
  const r = applySignToDurationSlot(toTemporalDuration(o), e),
746
746
  a = getTemporalOverflowOption(getOptionsObject(n)),
747
747
  i = toInternalDurationRecordWith24HourDays(r),
748
- c = addTime(t._.p, i.p);
748
+ s = addTime(t._.p, i.p);
749
749
  return createTemporalDateTime(
750
750
  combineIsoDateAndTimeRecord(
751
- calendarDateAdd(t.Y, t._.o, adjustDateDurationRecord(i.A, c.K), a),
752
- c,
751
+ calendarDateAdd(t.Y, t._.o, adjustDateDurationRecord(i.A, s.K), a),
752
+ s,
753
753
  ),
754
754
  t.Y,
755
755
  );
@@ -851,8 +851,8 @@ function balanceTime(e, t, o, n, r, a) {
851
851
  }
852
852
  );
853
853
  }
854
- function createTemporalTime(e, t = Object.create(Ce.prototype)) {
855
- return (Ye.set(t, e), t);
854
+ function createTemporalTime(e, t = Object.create(Ye.prototype)) {
855
+ return (Ce.set(t, e), t);
856
856
  }
857
857
  function toTemporalTimeRecord(e, t = !1) {
858
858
  let o = !1;
@@ -882,14 +882,14 @@ function addTime(e, t) {
882
882
  }
883
883
  function roundTime(e, n, r, a) {
884
884
  const i = nanosecondsForTimeUnit(clamp(r - 1, 3, 8)),
885
- c = e.D * o + e.I * t + 1e9 * e.O + 1e6 * e.F + 1e3 * e.S + e.$;
885
+ s = e.D * o + e.I * t + 1e9 * e.O + 1e6 * e.F + 1e3 * e.S + e.$;
886
886
  return balanceTime(
887
887
  0,
888
888
  0,
889
889
  0,
890
890
  0,
891
891
  0,
892
- divFloor(c, i) * i + roundNumberToIncrement(modFloor(c, i), n * nanosecondsForTimeUnit(r), a),
892
+ divFloor(s, i) * i + roundNumberToIncrement(modFloor(s, i), n * nanosecondsForTimeUnit(r), a),
893
893
  );
894
894
  }
895
895
  function differenceTemporalPlainTime(e, t, o, n) {
@@ -914,11 +914,11 @@ function addDurationToTime(e, t, o) {
914
914
  );
915
915
  }
916
916
  function getInternalSlotOrThrowForPlainTime(e) {
917
- const t = Ye.get(e);
917
+ const t = Ce.get(e);
918
918
  return (t || throwTypeError(ge), t);
919
919
  }
920
920
  function isPlainTime(e) {
921
- return Ye.has(e);
921
+ return Ce.has(e);
922
922
  }
923
923
  function optionalChain(e) {
924
924
  return e.reduceRight((e, t) => `${t}(?:${e})?`);
@@ -936,7 +936,7 @@ function isAmbiguousTemporalTimeString(e) {
936
936
  });
937
937
  }
938
938
  function isTimeZoneIdentifier(e) {
939
- return ct.test(e);
939
+ return st.test(e);
940
940
  }
941
941
  function parseAnnotationsAndGetCalendar(e) {
942
942
  let t,
@@ -1095,7 +1095,7 @@ function temporalYearMonthToString(e, t) {
1095
1095
  function differenceTemporalPlainYearMonth(e, t, o, n) {
1096
1096
  const r = getInternalSlotOrThrowForPlainYearMonth(toTemporalYearMonth(o));
1097
1097
  calendarEquals(t.Y, r.Y) || throwRangeError(pe);
1098
- const a = getDifferenceSettings(e, getOptionsObject(n), s, [q, B], H, x);
1098
+ const a = getDifferenceSettings(e, getOptionsObject(n), c, [q, B], H, x);
1099
1099
  if (!compareIsoDate(t.o, r.o))
1100
1100
  return createTemporalDuration(createTemporalDurationSlot([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]));
1101
1101
  const i = calendarDateFromFields(
@@ -1103,13 +1103,13 @@ function differenceTemporalPlainYearMonth(e, t, o, n) {
1103
1103
  createNullPrototypeObject({ ...isoDateToFields(t.Y, t.o, m), [yt.T]: 1 }),
1104
1104
  h,
1105
1105
  ),
1106
- c = calendarDateFromFields(
1106
+ s = calendarDateFromFields(
1107
1107
  t.Y,
1108
1108
  createNullPrototypeObject({ ...isoDateToFields(t.Y, r.o, m), [yt.T]: 1 }),
1109
1109
  h,
1110
1110
  );
1111
1111
  let l = combineDateAndTimeDuration(
1112
- adjustDateDurationRecord(calendarDateUntil(t.Y, i, c, a.L), 0, 0),
1112
+ adjustDateDurationRecord(calendarDateUntil(t.Y, i, s, a.L), 0, 0),
1113
1113
  createTimeDurationFromSeconds(0),
1114
1114
  );
1115
1115
  if (a.H !== H || 1 !== a.V) {
@@ -1117,7 +1117,7 @@ function differenceTemporalPlainYearMonth(e, t, o, n) {
1117
1117
  l = roundRelativeDuration(
1118
1118
  l,
1119
1119
  getUtcEpochNanoseconds(e),
1120
- getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(c, midnightTimeRecord())),
1120
+ getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(s, midnightTimeRecord())),
1121
1121
  e,
1122
1122
  void 0,
1123
1123
  t.Y,
@@ -1237,7 +1237,7 @@ function compareIsoDate(e, t) {
1237
1237
  function differenceTemporalPlainDate(e, t, o, n) {
1238
1238
  const r = getInternalSlotOrThrowForPlainDate(toTemporalDate(o));
1239
1239
  calendarEquals(t.Y, r.Y) || throwRangeError(pe);
1240
- const a = getDifferenceSettings(e, getOptionsObject(n), s, [], B, B);
1240
+ const a = getDifferenceSettings(e, getOptionsObject(n), c, [], B, B);
1241
1241
  if (!compareIsoDate(t.o, r.o))
1242
1242
  return createTemporalDuration(createTemporalDurationSlot([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]));
1243
1243
  let i = combineDateAndTimeDuration(
@@ -1368,8 +1368,8 @@ function epochDaysToDate$6(e, t) {
1368
1368
  const o = yearMonthDay(e, t).t;
1369
1369
  return t - getNewYear(e, o) + 1;
1370
1370
  },
1371
- ie: { ce: void 0, t: void 0 },
1372
- se: 7,
1371
+ ie: { se: void 0, t: void 0 },
1372
+ ce: 7,
1373
1373
  get le() {
1374
1374
  const o = yearMonthDay(e, t);
1375
1375
  return daysInMonth$5(e, o.t, Math.round((t - o.T - getNewYear(e, o.t)) / 29.53) + 1);
@@ -1475,8 +1475,8 @@ function epochDaysToDate$2(e, t) {
1475
1475
  T: t - calendarIntegersToEpochDays$2(e, o, n, 1) + 1,
1476
1476
  re: isoDayOfWeek(epochDaysToIsoDate(t)),
1477
1477
  ae: t - calendarIntegersToEpochDays$2(e, o, 1, 1) + 1,
1478
- ie: { ce: void 0, t: void 0 },
1479
- se: 7,
1478
+ ie: { se: void 0, t: void 0 },
1479
+ ce: 7,
1480
1480
  le: daysInMonth$1(o, n),
1481
1481
  de: isLeapYear$1(o) ? 355 : 354,
1482
1482
  me: 12,
@@ -1549,7 +1549,7 @@ function calendarDateAdd(e, t, o, n) {
1549
1549
  i = balanceNonIsoYearMonth(
1550
1550
  e,
1551
1551
  a,
1552
- monthCodeToOrdinal(e, a, constrainMonthCode(e, a, r.v, n)) + o.te,
1552
+ monthCodeToOrdinal(e, a, constrainMonthCode(e, a, parseMonthCode(r.v), n)) + o.te,
1553
1553
  );
1554
1554
  return validateIsoDate(
1555
1555
  addDaysToIsoDate(
@@ -1570,7 +1570,7 @@ function nonIsoDateSurpasses(e, t, o, n, r, a) {
1570
1570
  const i = balanceNonIsoYearMonth(
1571
1571
  e,
1572
1572
  o.t + r,
1573
- monthCodeToOrdinal(e, o.t + r, constrainMonthCode(e, o.t + r, o.v, h)) + a,
1573
+ monthCodeToOrdinal(e, o.t + r, constrainMonthCode(e, o.t + r, parseMonthCode(o.v), h)) + a,
1574
1574
  );
1575
1575
  return compareSurpasses(t, i.t, i.u, o.T, n) ? { Te: !0 } : { Te: !1, ...i };
1576
1576
  }
@@ -1596,32 +1596,32 @@ function calendarDateUntil(e, t, o, n) {
1596
1596
  })(t, o, n);
1597
1597
  const a = nonIsoCalendarIsoToDate(e, t),
1598
1598
  i = nonIsoCalendarIsoToDate(e, o);
1599
- let c,
1600
- s = 0;
1601
- if (n === x) for (s = i.t - a.t; (c = nonIsoDateSurpasses(e, r, a, i, s, 0)).Te; s -= r);
1599
+ let s,
1600
+ c = 0;
1601
+ if (n === x) for (c = i.t - a.t; (s = nonIsoDateSurpasses(e, r, a, i, c, 0)).Te; c -= r);
1602
1602
  const l =
1603
1603
  ("hebrew" === e
1604
- ? ((d = (c || a).t), (m = (c || a).u), monthNumber(i.t, i.u) - monthNumber(d, m))
1605
- : "chinese" === e || "dangi" === e
1604
+ ? ((d = (s || a).t), (m = (s || a).u), monthNumber(i.t, i.u) - monthNumber(d, m))
1605
+ : isChineseDangi(e)
1606
1606
  ? (function (e, t, o, n, r) {
1607
1607
  if (t === n) return r - o;
1608
1608
  const a = calendarIntegersToEpochDays$6(e, t, o, 1),
1609
1609
  i = calendarIntegersToEpochDays$6(e, n, r, 1),
1610
- c = sign(i - a);
1610
+ s = sign(i - a);
1611
1611
  if (Math.abs(i - a) <= 15e6) return Math.round((i - a) / 29.5306);
1612
- let s = 0,
1612
+ let c = 0,
1613
1613
  l = a;
1614
- for (; (i - l) * c > 0; ) {
1615
- let t = l + clamp(15e6, 1, Math.abs(i - l)) * c;
1616
- ((t -= yearMonthDay(e, t).T - 1), (s += Math.round((t - l) / 29.5306)), (l = t));
1614
+ for (; (i - l) * s > 0; ) {
1615
+ let t = l + clamp(15e6, 1, Math.abs(i - l)) * s;
1616
+ ((t -= yearMonthDay(e, t).T - 1), (c += Math.round((t - l) / 29.5306)), (l = t));
1617
1617
  }
1618
- return s;
1619
- })(e, (c || a).t, (c || a).u, i.t, i.u)
1620
- : (i.t - (c || a).t) * a.me + i.u - (c || a).u) - (r * (a.T - i.T) > 0 ? r : 0);
1618
+ return c;
1619
+ })(e, (s || a).t, (s || a).u, i.t, i.u)
1620
+ : (i.t - (s || a).t) * a.me + i.u - (s || a).u) - (r * (a.T - i.T) > 0 ? r : 0);
1621
1621
  var d, m;
1622
- const u = nonIsoDateSurpasses(e, r, a, i, s, l);
1622
+ const u = nonIsoDateSurpasses(e, r, a, i, c, l);
1623
1623
  return createDateDurationRecord(
1624
- s,
1624
+ c,
1625
1625
  l,
1626
1626
  0,
1627
1627
  isoDateRecordToEpochDays(o) -
@@ -1633,27 +1633,21 @@ function calendarDateUntil(e, t, o, n) {
1633
1633
  function calendarDateToIso(e, t, o) {
1634
1634
  const n = t[yt.t],
1635
1635
  r = t[yt.u],
1636
- a = t[yt.v],
1636
+ a = mapUnlessUndefined(t[yt.v], parseMonthCode),
1637
1637
  i = t[yt.T];
1638
1638
  if (isIsoLikeCalendar(e))
1639
1639
  return ((e, t) => regulateIsoDate(e[yt.t], e[yt.u], e[yt.T], t))(
1640
1640
  { ...t, year: n + ("buddhist" === e ? -543 : "roc" === e ? 1911 : 0) },
1641
1641
  o,
1642
1642
  );
1643
- void 0 !== a && constrainMonthCode(e, n, a, o);
1644
- const c =
1645
- "chinese" === e || "dangi" === e
1646
- ? ((e, t, o) => (isWithin(o, 1, 12) ? o : clamp(o, 1, monthsInYear(e, t))))(e, n, r)
1647
- : clamp(r, 1, "hebrew" === e ? (isLeapYear$2(n) ? 13 : 12) : isCopticOrEthiopic(e) ? 13 : 12);
1648
- return (
1649
- c !== r && o === p && throwRangeError(Te),
1650
- calendarIntegersToIso(e, n, c, constrainDay(e, n, c, i, o))
1651
- );
1643
+ a && constrainMonthCode(e, n, a, o);
1644
+ const s = constrainMonth(e, n, r, o);
1645
+ return calendarIntegersToIso(e, n, s, constrainDay(e, n, s, i, o));
1652
1646
  }
1653
1647
  function nonIsoCalendarIsoToDate(e, t) {
1654
1648
  const o = isoDateRecordToEpochDays(t);
1655
1649
  if (isIsoLikeCalendar(e)) {
1656
- const n = { ...isoCalendarIsoToDate(t), ie: { t: void 0, ce: void 0 } };
1650
+ const n = { ...isoCalendarIsoToDate(t), ie: { t: void 0, se: void 0 } };
1657
1651
  if ("japanese" === e) {
1658
1652
  const r =
1659
1653
  o >= 18017
@@ -1697,8 +1691,8 @@ function nonIsoCalendarIsoToDate(e, t) {
1697
1691
  T: modFloor(n - 1, 30) + 1,
1698
1692
  re: isoDayOfWeek(epochDaysToIsoDate(t)),
1699
1693
  ae: n,
1700
- ie: { ce: void 0, t: void 0 },
1701
- se: 7,
1694
+ ie: { se: void 0, t: void 0 },
1695
+ ce: 7,
1702
1696
  le: daysInMonth$4(o, r),
1703
1697
  de: mathematicalInLeapYear$2(o) + 365,
1704
1698
  me: 13,
@@ -1722,8 +1716,8 @@ function nonIsoCalendarIsoToDate(e, t) {
1722
1716
  T: e - calendarIntegersToEpochDays$3(o, a, 1) + 1,
1723
1717
  re: isoDayOfWeek(t),
1724
1718
  ae: r,
1725
- ie: { ce: void 0, t: void 0 },
1726
- se: 7,
1719
+ ie: { se: void 0, t: void 0 },
1720
+ ce: 7,
1727
1721
  le: daysInMonth$2(o, a),
1728
1722
  de: 365 + n,
1729
1723
  me: 12,
@@ -1754,8 +1748,8 @@ function nonIsoCalendarIsoToDate(e, t) {
1754
1748
  get ae() {
1755
1749
  return getDate(t).ae;
1756
1750
  },
1757
- ie: { ce: void 0, t: void 0 },
1758
- se: 7,
1751
+ ie: { se: void 0, t: void 0 },
1752
+ ce: 7,
1759
1753
  get le() {
1760
1754
  const e = getDate(t);
1761
1755
  return e.u <= 6 ? 31 : 12 !== e.u || isLeapYear(e.t) ? 30 : 29;
@@ -1769,8 +1763,8 @@ function nonIsoCalendarIsoToDate(e, t) {
1769
1763
  },
1770
1764
  };
1771
1765
  })(o)
1772
- : "islamic-civil" === e || "islamic-tbla" === e
1773
- ? epochDaysToDate$2(e, o)
1766
+ : isChineseDangi(e)
1767
+ ? epochDaysToDate$6(e, o)
1774
1768
  : "islamic-umalqura" === e
1775
1769
  ? ((e) => {
1776
1770
  const t = epochDaysToDate$2("islamic-civil", e),
@@ -1798,8 +1792,8 @@ function nonIsoCalendarIsoToDate(e, t) {
1798
1792
  get ae() {
1799
1793
  return e - getFirstDayOfMonth(getYearMonthDay(e).t, 1) + 1;
1800
1794
  },
1801
- ie: { ce: void 0, t: void 0 },
1802
- se: 7,
1795
+ ie: { se: void 0, t: void 0 },
1796
+ ce: 7,
1803
1797
  get le() {
1804
1798
  const t = getYearMonthDay(e);
1805
1799
  return getFirstDayOfMonth(t.t, t.u + 1) - getFirstDayOfMonth(t.t, t.u);
@@ -1833,8 +1827,8 @@ function nonIsoCalendarIsoToDate(e, t) {
1833
1827
  T: e - calendarIntegersToEpochDays$4(o, n, 1) + 1,
1834
1828
  re: isoDayOfWeek(t),
1835
1829
  ae: e - calendarIntegersToEpochDays$4(o, 1, 1) + 1,
1836
- ie: { ce: void 0, t: void 0 },
1837
- se: 7,
1830
+ ie: { se: void 0, t: void 0 },
1831
+ ce: 7,
1838
1832
  le: daysInMonth$3(o, n),
1839
1833
  de:
1840
1834
  calendarIntegersToEpochDays$4(o + 1, 1, 1) -
@@ -1843,166 +1837,7 @@ function nonIsoCalendarIsoToDate(e, t) {
1843
1837
  ue: isLeapYear$2(o),
1844
1838
  };
1845
1839
  })(o)
1846
- : epochDaysToDate$6(e, o);
1847
- }
1848
- function calendarMonthDayToIsoReferenceDate(e, t, o) {
1849
- if (isIsoLikeCalendar(e))
1850
- return ((e, t) => {
1851
- const o = regulateIsoDate(e[yt.t] ?? 1972, e[yt.u], e[yt.T], t);
1852
- return createIsoDateRecord(1972, o.u, o.T);
1853
- })(
1854
- {
1855
- ...t,
1856
- year: mapUnlessUndefined(
1857
- t.year,
1858
- (t) => t - ("buddhist" === e ? -543 : "roc" === e ? 1911 : 0),
1859
- ),
1860
- },
1861
- o,
1862
- );
1863
- const n = t[yt.t],
1864
- r = t[yt.u];
1865
- let a = t[yt.v],
1866
- i = t[yt.T];
1867
- "chinese" === e || "dangi" === e
1868
- ? (i > 30 && o === p && throwRangeError(Te),
1869
- (i = clamp(i, 1, 30)),
1870
- void 0 !== n && (a || (a = nonIsoCalendarIsoToDate(e, calendarIntegersToIso(e, n, r, 1)).v)),
1871
- ("M01L" !== a &&
1872
- "M12L" !== a &&
1873
- (("M02L" !== a && "M08L" !== a && "M09L" !== a && "M10L" !== a && "M11L" !== a) ||
1874
- 30 !== i)) ||
1875
- (o === p && throwRangeError(Te), (a = createMonthCode(parseMonthCode(a)[0]))))
1876
- : (void 0 !== n
1877
- ? (a && (a = constrainMonthCode(e, n, a, o)), (i = constrainDay(e, n, r, i, o)))
1878
- : (i = ((e, t, o, n) => {
1879
- const r = parseMonthCode(t);
1880
- if ("chinese" === e || "dangi" === e) {
1881
- const e = clamp(o, 1, 30);
1882
- return o !== e && n === p ? throwRangeError(Te) : e;
1883
- }
1884
- if ("hebrew" === e)
1885
- return "M05L" === t ? constrainDay(e, 3, 6, o, n) : constrainDay(e, 1, r[0], o, n);
1886
- if (isCopticOrEthiopic(e)) return constrainDay(e, 3, r[0], o, n);
1887
- if ("indian" === e) return constrainDay(e, 2, r[0], o, n);
1888
- if ("islamic-civil" === e || "islamic-tbla" === e)
1889
- return constrainDay(e, 2, r[0], o, n);
1890
- if ("islamic-umalqura" === e) {
1891
- const e = clamp(o, 1, 30);
1892
- return o !== e && n === p ? throwRangeError(Te) : e;
1893
- }
1894
- if ("persian" === e) {
1895
- const e = clamp(o, 1, r[0] <= 6 ? 31 : 30);
1896
- return o !== e && n === p ? throwRangeError(Te) : e;
1897
- }
1898
- })(e, a, i, o)),
1899
- a || (a = nonIsoCalendarIsoToDate(e, calendarIntegersToIso(e, n, r, i)).v));
1900
- const c = parseMonthCode(a);
1901
- return isCopticOrEthiopic(e)
1902
- ? epochDaysToIsoDate(
1903
- ((e, t) => (13 === e && 6 === t ? 618 : ((30 * (e - 1) + t + 252) % 365) + 731))(c[0], i),
1904
- )
1905
- : epochDaysToIsoDate(
1906
- "indian" === e
1907
- ? ((e, t) => calendarIntegersToEpochDays$3(30 * e + t <= 310 ? 1894 : 1893, e, t))(
1908
- c[0],
1909
- i,
1910
- )
1911
- : "persian" === e
1912
- ? ((e, t) => {
1913
- if (12 === e && 30 === t)
1914
- for (let o = 1350; ; o--)
1915
- if (isLeapYear(o)) return calendarIntegersToEpochDays(o, e, t);
1916
- const o = calendarIntegersToEpochDays(1351, e, t);
1917
- return o <= 1095 ? o : calendarIntegersToEpochDays(1350, e, t);
1918
- })(c[0], i)
1919
- : "islamic-civil" === e || "islamic-tbla" === e
1920
- ? ((e, t, o) =>
1921
- 12 === t && 30 === o
1922
- ? "islamic-civil" === e
1923
- ? 421
1924
- : 420
1925
- : calendarIntegersToEpochDays$2(
1926
- e,
1927
- 30 * t + o <= ("islamic-civil" === e ? 355 : 356) ? 1392 : 1391,
1928
- t,
1929
- o,
1930
- ))(e, c[0], i)
1931
- : "islamic-umalqura" === e
1932
- ? ((e, t) => {
1933
- for (let o = 1392; ; o--)
1934
- if (constrainDay$2(o, e, t) === t) {
1935
- const n = calendarIntegersToEpochDays$1(o, e, t);
1936
- if (n <= 1095) return n;
1937
- }
1938
- })(c[0], i)
1939
- : "hebrew" === e
1940
- ? ((e, t) => {
1941
- const o = parseMonthCode(e);
1942
- if ("M05L" === e) return calendarIntegersToEpochDays$4(5730, 6, t);
1943
- if (("M02" === e || "M03" === e) && 30 === t)
1944
- return calendarIntegersToEpochDays$4(5732, o[0], t);
1945
- const n = calendarIntegersToEpochDays$4(5733, o[0], t);
1946
- return n <= 1095 ? n : calendarIntegersToEpochDays$4(5732, o[0], t);
1947
- })(a, i)
1948
- : (function (e, t, o) {
1949
- const [n, r] = parseMonthCode(t),
1950
- a = r || (30 === o && (6 === n || 8 === n)) || 12 === n ? n + 1 : n;
1951
- if ("M11" === t) {
1952
- const t = calendarIntegersToEpochDays$6(e, 30 === o ? 1969 : 1972, 11, o);
1953
- return t <= 1095 ? t : calendarIntegersToEpochDays$6(e, 1971, 12, o);
1954
- }
1955
- return calendarIntegersToEpochDays$6(
1956
- e,
1957
- ((e, t, o) => {
1958
- const [n, r] = parseMonthCode(t);
1959
- return 12 === n
1960
- ? 1971
1961
- : !r && (o < 30 || 2 === n || 5 === n || 7 === n || 9 === n || 10 === n)
1962
- ? 1972
1963
- : r
1964
- ? 2 === n
1965
- ? 1947
1966
- : 3 === n
1967
- ? 30 === o
1968
- ? 1955
1969
- : 1966
1970
- : 4 === n
1971
- ? 30 === o
1972
- ? 1944
1973
- : 1963
1974
- : 5 === n
1975
- ? 30 === o
1976
- ? 1952
1977
- : 1971
1978
- : 6 === n
1979
- ? 30 === o
1980
- ? 1941
1981
- : 1960
1982
- : 7 === n
1983
- ? 30 === o
1984
- ? 1938
1985
- : 1968
1986
- : 8 === n
1987
- ? 1957
1988
- : 9 === n
1989
- ? 2014
1990
- : 10 === n
1991
- ? 1984
1992
- : 2033
1993
- : 1 === n || 4 === n
1994
- ? 1970
1995
- : 3 === n
1996
- ? "chinese" === e
1997
- ? 1966
1998
- : 1968
1999
- : 1971;
2000
- })(e, t, o),
2001
- a,
2002
- o,
2003
- );
2004
- })(e, a, i),
2005
- );
1840
+ : epochDaysToDate$2(e, o);
2006
1841
  }
2007
1842
  function calendarSupportsEra(e) {
2008
1843
  return !!St[e].size;
@@ -2013,46 +1848,46 @@ function canonicalizeEraInCalendar(e, t) {
2013
1848
  }
2014
1849
  function constrainMonthCode(e, t, o, n) {
2015
1850
  if ("hebrew" === e)
2016
- return "M05L" !== o || isLeapYear$2(t) ? o : n === p ? throwRangeError(Te) : "M06";
2017
- if ("chinese" === e || "dangi" === e) {
2018
- const r = ((e, t, o) => {
2019
- const [n, r] = parseMonthCode(o);
2020
- return r && ordinalMonthToMonthCode(e, t, n + 1) !== o ? createMonthCode(n) : o;
2021
- })(e, t, o);
1851
+ return o[1] && !isLeapYear$2(t) ? (n === p ? throwRangeError(Te) : [6, !1]) : o;
1852
+ if (isChineseDangi(e)) {
1853
+ const r = ((e, t, o) =>
1854
+ o[1] && ordinalMonthToMonthCode(e, t, o[0] + 1) !== createMonthCode(...o) ? [o[0], !1] : o)(
1855
+ e,
1856
+ t,
1857
+ o,
1858
+ );
2022
1859
  return o !== r && n === p ? throwRangeError(Te) : r;
2023
1860
  }
2024
1861
  return o;
2025
1862
  }
2026
1863
  function monthCodeToOrdinal(e, t, o) {
2027
- const n = parseMonthCode(o);
2028
1864
  return "hebrew" === e
2029
- ? ((e, t) => {
2030
- const o = parseMonthCode(t);
2031
- return o[0] + +(isLeapYear$2(e) && o[0] + +o[1] >= 6);
2032
- })(t, o)
2033
- : "chinese" === e || "dangi" === e
2034
- ? ((e, t, o) => {
2035
- const [n, r] = parseMonthCode(o);
2036
- return r || ordinalMonthToMonthCode(e, t, n) !== o ? n + 1 : n;
2037
- })(e, t, o)
2038
- : n[0];
1865
+ ? ((e, t) => t[0] + +(isLeapYear$2(e) && t[0] + +t[1] >= 6))(t, o)
1866
+ : isChineseDangi(e)
1867
+ ? ((e, t, o) =>
1868
+ o[1] || ordinalMonthToMonthCode(e, t, o[0]) !== createMonthCode(...o) ? o[0] + 1 : o[0])(
1869
+ e,
1870
+ t,
1871
+ o,
1872
+ )
1873
+ : o[0];
2039
1874
  }
2040
1875
  function calendarIntegersToIso(e, t, o, n) {
2041
1876
  return isCopticOrEthiopic(e)
2042
1877
  ? epochDaysToIsoDate(calendarIntegersToEpochDays$5(e, t, o, n))
2043
- : epochDaysToIsoDate(
2044
- "indian" === e
2045
- ? calendarIntegersToEpochDays$3(t, o, n)
2046
- : "persian" === e
2047
- ? calendarIntegersToEpochDays(t, o, n)
2048
- : "islamic-civil" === e || "islamic-tbla" === e
2049
- ? calendarIntegersToEpochDays$2(e, t, o, n)
2050
- : "islamic-umalqura" === e
1878
+ : "indian" === e
1879
+ ? epochDaysToIsoDate(calendarIntegersToEpochDays$3(t, o, n))
1880
+ : "persian" === e
1881
+ ? epochDaysToIsoDate(calendarIntegersToEpochDays(t, o, n))
1882
+ : isChineseDangi(e)
1883
+ ? epochDaysToIsoDate(calendarIntegersToEpochDays$6(e, t, o, n))
1884
+ : epochDaysToIsoDate(
1885
+ "islamic-umalqura" === e
2051
1886
  ? calendarIntegersToEpochDays$1(t, o, n)
2052
1887
  : "hebrew" === e
2053
1888
  ? calendarIntegersToEpochDays$4(t, o, n)
2054
- : calendarIntegersToEpochDays$6(e, t, o, n),
2055
- );
1889
+ : calendarIntegersToEpochDays$2(e, t, o, n),
1890
+ );
2056
1891
  }
2057
1892
  function calendarSupportsEraForNonIsoCalendars(e) {
2058
1893
  return calendarSupportsEra(e);
@@ -2063,6 +1898,9 @@ function isIsoLikeCalendar(e) {
2063
1898
  function isCopticOrEthiopic(e) {
2064
1899
  return "coptic" === e || "ethioaa" === e || "ethiopic" === e;
2065
1900
  }
1901
+ function isChineseDangi(e) {
1902
+ return "chinese" === e || "dangi" === e;
1903
+ }
2066
1904
  function constrainDay(e, t, o, n, r) {
2067
1905
  const a =
2068
1906
  "persian" === e
@@ -2076,7 +1914,7 @@ function constrainDay(e, t, o, n, r) {
2076
1914
  : clamp(o, 1, isLeapYear(e) ? 30 : 29))(t, o, n)
2077
1915
  : "islamic-umalqura" === e
2078
1916
  ? constrainDay$2(t, o, n)
2079
- : "chinese" === e || "dangi" === e
1917
+ : isChineseDangi(e)
2080
1918
  ? ((e, t, o, n) => (n <= 29 ? n : clamp(n, 1, daysInMonth$5(e, t, o))))(e, t, o, n)
2081
1919
  : clamp(
2082
1920
  n,
@@ -2085,14 +1923,18 @@ function constrainDay(e, t, o, n, r) {
2085
1923
  ? daysInMonth$4(t, o)
2086
1924
  : "indian" === e
2087
1925
  ? daysInMonth$2(t, o)
2088
- : "islamic-civil" === e || "islamic-tbla" === e
2089
- ? daysInMonth$1(t, o)
2090
- : "hebrew" === e
2091
- ? daysInMonth$3(t, o)
2092
- : void 0,
1926
+ : "hebrew" === e
1927
+ ? daysInMonth$3(t, o)
1928
+ : daysInMonth$1(t, o),
2093
1929
  );
2094
1930
  return n !== a && r === p ? throwRangeError(Te) : a;
2095
1931
  }
1932
+ function constrainMonth(e, t, o, n) {
1933
+ const r = isChineseDangi(e)
1934
+ ? ((e, t, o) => (isWithin(o, 1, 12) ? o : clamp(o, 1, monthsInYear(e, t))))(e, t, o)
1935
+ : clamp(o, 1, ("hebrew" === e && isLeapYear$2(t)) || isCopticOrEthiopic(e) ? 13 : 12);
1936
+ return (r !== o && n === p && throwRangeError(Te), r);
1937
+ }
2096
1938
  function balanceNonIsoYearMonth(e, t, o) {
2097
1939
  if ("hebrew" === e)
2098
1940
  return ((e, t) => {
@@ -2100,7 +1942,7 @@ function balanceNonIsoYearMonth(e, t, o) {
2100
1942
  n = Math.floor((19 * (o - 1) + 17) / 235) + 1;
2101
1943
  return { t: n, u: o - monthNumber(n, 1) + 1 };
2102
1944
  })(t, o);
2103
- if ("chinese" === e || "dangi" === e)
1945
+ if (isChineseDangi(e))
2104
1946
  return ((e, t, o) => {
2105
1947
  if (isWithin(o, 1, 12)) return { t: t, u: o };
2106
1948
  const n = o >= 1 ? 1 : -1;
@@ -2172,7 +2014,7 @@ function toTemporalCalendarIdentifier(e) {
2172
2014
  try {
2173
2015
  return parseIsoDateTime(e, [et, tt, ot, nt, rt, at]).Y || "iso8601";
2174
2016
  } catch {
2175
- return (st.test(e) || throwRangeError(me), e);
2017
+ return (ct.test(e) || throwRangeError(me), e);
2176
2018
  }
2177
2019
  })(e),
2178
2020
  ));
@@ -2195,10 +2037,185 @@ function calendarYearMonthFromFields(e, t, o) {
2195
2037
  );
2196
2038
  }
2197
2039
  function calendarMonthDayFromFields(e, t, o) {
2198
- return (calendarResolveFields(e, t, u), calendarMonthDayToIsoReferenceDate(e, t, o));
2040
+ return (
2041
+ calendarResolveFields(e, t, u),
2042
+ (function (e, t, o) {
2043
+ if (isIsoLikeCalendar(e))
2044
+ return ((e, t) => {
2045
+ const o = regulateIsoDate(e[yt.t] ?? 1972, e[yt.u], e[yt.T], t);
2046
+ return createIsoDateRecord(1972, o.u, o.T);
2047
+ })(
2048
+ {
2049
+ ...t,
2050
+ year: mapUnlessUndefined(
2051
+ t.year,
2052
+ (t) => t - ("buddhist" === e ? -543 : "roc" === e ? 1911 : 0),
2053
+ ),
2054
+ },
2055
+ o,
2056
+ );
2057
+ const n = t[yt.t];
2058
+ let r = t[yt.u],
2059
+ a = mapUnlessUndefined(t[yt.v], parseMonthCode),
2060
+ i = t[yt.T];
2061
+ return (
2062
+ void 0 !== n
2063
+ ? (a || (r = constrainMonth(e, n, r, o)),
2064
+ (a = a
2065
+ ? constrainMonthCode(e, n, a, o)
2066
+ : parseMonthCode(nonIsoCalendarIsoToDate(e, calendarIntegersToIso(e, n, r, 1)).v)),
2067
+ (i = constrainDay(e, n, r, i, o)))
2068
+ : (i = ((e, t, o, n) => {
2069
+ if (isChineseDangi(e)) {
2070
+ const e = clamp(o, 1, 30);
2071
+ return o !== e && n === p ? throwRangeError(Te) : e;
2072
+ }
2073
+ if ("islamic-umalqura" === e) {
2074
+ const e = clamp(o, 1, 30);
2075
+ return o !== e && n === p ? throwRangeError(Te) : e;
2076
+ }
2077
+ if ("persian" === e) {
2078
+ const e = clamp(o, 1, t[0] <= 6 ? 31 : 30);
2079
+ return o !== e && n === p ? throwRangeError(Te) : e;
2080
+ }
2081
+ return "hebrew" === e
2082
+ ? t[1]
2083
+ ? constrainDay(e, 3, 6, o, n)
2084
+ : constrainDay(e, 1, t[0], o, n)
2085
+ : isCopticOrEthiopic(e)
2086
+ ? constrainDay(e, 3, t[0], o, n)
2087
+ : constrainDay(e, 2, t[0], o, n);
2088
+ })(e, a, i, o)),
2089
+ isChineseDangi(e) &&
2090
+ a[1] &&
2091
+ (1 === a[0] || 12 === a[0] || (30 === i && (2 === a[0] || isWithin(a[0], 8, 11)))) &&
2092
+ (o === p && throwRangeError(Te), (a[1] = !1)),
2093
+ isCopticOrEthiopic(e)
2094
+ ? epochDaysToIsoDate(
2095
+ ((e, t) => (13 === e && 6 === t ? 618 : ((30 * (e - 1) + t + 252) % 365) + 731))(
2096
+ a[0],
2097
+ i,
2098
+ ),
2099
+ )
2100
+ : "indian" === e
2101
+ ? epochDaysToIsoDate(
2102
+ ((e, t) => calendarIntegersToEpochDays$3(30 * e + t <= 310 ? 1894 : 1893, e, t))(
2103
+ a[0],
2104
+ i,
2105
+ ),
2106
+ )
2107
+ : "persian" === e
2108
+ ? epochDaysToIsoDate(
2109
+ ((e, t) => {
2110
+ if (12 === e && 30 === t)
2111
+ for (let o = 1350; ; o--)
2112
+ if (isLeapYear(o)) return calendarIntegersToEpochDays(o, e, t);
2113
+ const o = calendarIntegersToEpochDays(1351, e, t);
2114
+ return o <= 1095 ? o : calendarIntegersToEpochDays(1350, e, t);
2115
+ })(a[0], i),
2116
+ )
2117
+ : "islamic-umalqura" === e
2118
+ ? epochDaysToIsoDate(
2119
+ ((e, t) => {
2120
+ for (let o = 1392; ; o--)
2121
+ if (constrainDay$2(o, e, t) === t) {
2122
+ const n = calendarIntegersToEpochDays$1(o, e, t);
2123
+ if (n <= 1095) return n;
2124
+ }
2125
+ })(a[0], i),
2126
+ )
2127
+ : "hebrew" === e
2128
+ ? epochDaysToIsoDate(
2129
+ ((e, t, o) => {
2130
+ if (t) return calendarIntegersToEpochDays$4(5730, 6, o);
2131
+ if ((2 === e || 3 === e) && 30 === o)
2132
+ return calendarIntegersToEpochDays$4(5732, e, o);
2133
+ const n = calendarIntegersToEpochDays$4(5733, e, o);
2134
+ return n <= 1095 ? n : calendarIntegersToEpochDays$4(5732, e, o);
2135
+ })(a[0], a[1], i),
2136
+ )
2137
+ : isChineseDangi(e)
2138
+ ? epochDaysToIsoDate(
2139
+ ((e, t, o, n) => {
2140
+ const r = o || (30 === n && (6 === t || 8 === t)) || 12 === t ? t + 1 : t;
2141
+ if (11 === t && !o) {
2142
+ const t = calendarIntegersToEpochDays$6(
2143
+ e,
2144
+ 30 === n ? 1969 : 1972,
2145
+ 11,
2146
+ n,
2147
+ );
2148
+ return t <= 1095 ? t : calendarIntegersToEpochDays$6(e, 1971, 12, n);
2149
+ }
2150
+ return calendarIntegersToEpochDays$6(
2151
+ e,
2152
+ ((e, t, o, n) =>
2153
+ 12 === t
2154
+ ? 1971
2155
+ : !o &&
2156
+ (n < 30 || 2 === t || 5 === t || 7 === t || 9 === t || 10 === t)
2157
+ ? 1972
2158
+ : o
2159
+ ? 2 === t
2160
+ ? 1947
2161
+ : 3 === t
2162
+ ? 30 === n
2163
+ ? 1955
2164
+ : 1966
2165
+ : 4 === t
2166
+ ? 30 === n
2167
+ ? 1944
2168
+ : 1963
2169
+ : 5 === t
2170
+ ? 30 === n
2171
+ ? 1952
2172
+ : 1971
2173
+ : 6 === t
2174
+ ? 30 === n
2175
+ ? 1941
2176
+ : 1960
2177
+ : 7 === t
2178
+ ? 30 === n
2179
+ ? 1938
2180
+ : 1968
2181
+ : 8 === t
2182
+ ? 1957
2183
+ : 9 === t
2184
+ ? 2014
2185
+ : 10 === t
2186
+ ? 1984
2187
+ : 2033
2188
+ : 1 === t || 4 === t
2189
+ ? 1970
2190
+ : 3 === t
2191
+ ? "chinese" === e
2192
+ ? 1966
2193
+ : 1968
2194
+ : 1971)(e, t, o, n),
2195
+ r,
2196
+ n,
2197
+ );
2198
+ })(e, a[0], a[1], i),
2199
+ )
2200
+ : epochDaysToIsoDate(
2201
+ ((e, t, o) =>
2202
+ 12 === t && 30 === o
2203
+ ? "islamic-civil" === e
2204
+ ? 421
2205
+ : 420
2206
+ : calendarIntegersToEpochDays$2(
2207
+ e,
2208
+ 30 * t + o <= ("islamic-civil" === e ? 355 : 356) ? 1392 : 1391,
2209
+ t,
2210
+ o,
2211
+ ))(e, a[0], i),
2212
+ )
2213
+ );
2214
+ })(e, t, o)
2215
+ );
2199
2216
  }
2200
2217
  function formatCalendarAnnotation(e, t) {
2201
- return t === j || (t === C && "iso8601" === e) ? "" : `[${t === W ? "!" : ""}u-ca=${e}]`;
2218
+ return t === j || (t === Y && "iso8601" === e) ? "" : `[${t === W ? "!" : ""}u-ca=${e}]`;
2202
2219
  }
2203
2220
  function calendarEquals(e, t) {
2204
2221
  return e === t;
@@ -2216,10 +2233,10 @@ function isoWeekOfYear(e) {
2216
2233
  const t = e.t,
2217
2234
  o = divFloor(isoDayOfYear(e) + 10 - isoDayOfWeek(e), 7);
2218
2235
  return o < 1
2219
- ? { t: t - 1, ce: isoWeeksInYear(t - 1) }
2236
+ ? { t: t - 1, se: isoWeeksInYear(t - 1) }
2220
2237
  : o > isoWeeksInYear(t)
2221
- ? { t: t + 1, ce: 1 }
2222
- : { t: t, ce: o };
2238
+ ? { t: t + 1, se: 1 }
2239
+ : { t: t, se: o };
2223
2240
  }
2224
2241
  function isoDayOfYear(e) {
2225
2242
  return isoDateRecordToEpochDays(e) - isoDateToEpochDays(e.t, 0, 0);
@@ -2236,7 +2253,7 @@ function isoCalendarIsoToDate(e) {
2236
2253
  re: isoDayOfWeek(e),
2237
2254
  ae: isoDayOfYear(e),
2238
2255
  ie: isoWeekOfYear(e),
2239
- se: 7,
2256
+ ce: 7,
2240
2257
  le: isoDaysInMonth(e.t, e.u),
2241
2258
  de: ((t = e.t), 365 + mathematicalInLeapYear(t)),
2242
2259
  me: 12,
@@ -2259,18 +2276,18 @@ function isoResolveFields(e, t) {
2259
2276
  ((o[0] > 12 || o[1] || (void 0 !== e[yt.u] && o[0] !== e[yt.u])) && throwRangeError(Ie),
2260
2277
  (e[yt.u] = o[0]));
2261
2278
  }
2262
- function calendarResolveFields(e, t, o = s) {
2279
+ function calendarResolveFields(e, t, o = c) {
2263
2280
  "iso8601" === e
2264
2281
  ? isoResolveFields(t, o)
2265
- : (function (e, t, o = s) {
2282
+ : (function (e, t, o = c) {
2266
2283
  const n = t[yt.oe],
2267
2284
  r = t[yt.ne];
2268
2285
  let a = t[yt.t];
2269
2286
  const i = t[yt.v],
2270
- c = t[yt.u],
2287
+ s = t[yt.u],
2271
2288
  l = t[yt.T];
2272
2289
  if (
2273
- ((o === u && void 0 !== i && void 0 === c) ||
2290
+ ((o === u && void 0 !== i && void 0 === s) ||
2274
2291
  void 0 !== a ||
2275
2292
  (calendarSupportsEraForNonIsoCalendars(e) && void 0 !== n && void 0 !== r) ||
2276
2293
  throwTypeError(missingField("year, era, eraYear")),
@@ -2278,7 +2295,7 @@ function calendarResolveFields(e, t, o = s) {
2278
2295
  (void 0 === n) != (void 0 === r) &&
2279
2296
  throwTypeError(),
2280
2297
  o !== m && void 0 === l && throwTypeError(missingField("day")),
2281
- c === i && throwTypeError(missingField("month, monthCode")),
2298
+ s === i && throwTypeError(missingField("month, monthCode")),
2282
2299
  calendarSupportsEraForNonIsoCalendars(e) && void 0 !== r)
2283
2300
  ) {
2284
2301
  const o = ((e, t, o) => {
@@ -2290,20 +2307,17 @@ function calendarResolveFields(e, t, o = s) {
2290
2307
  (t[yt.t] = o));
2291
2308
  }
2292
2309
  if (((t[yt.oe] = t[yt.ne] = void 0), isIsoLikeCalendar(e))) isoResolveFields(t, o);
2293
- else if (void 0 !== i) {
2294
- ((e, t) => {
2295
- const o = parseMonthCode(t);
2296
- return (
2297
- (isWithin(o[0], 1, 12) && !o[1]) ||
2298
- (("chinese" === e || "dangi" === e) && isWithin(o[0], 1, 12)) ||
2299
- (isCopticOrEthiopic(e) && "M13" === t) ||
2300
- ("hebrew" === e && "M05L" === t)
2301
- );
2302
- })(e, i) || throwRangeError(invalidMonthCode(i));
2303
- const o = t[yt.t];
2304
- if (void 0 !== o) {
2305
- const n = monthCodeToOrdinal(e, o, constrainMonthCode(e, o, i, h));
2306
- (void 0 !== c && c !== n && throwRangeError(Ie), (t[yt.u] = n));
2310
+ else if (i) {
2311
+ const o = parseMonthCode(i);
2312
+ ((e, t) =>
2313
+ (isWithin(t[0], 1, 12) && !t[1]) ||
2314
+ (isChineseDangi(e) && isWithin(t[0], 1, 12)) ||
2315
+ (isCopticOrEthiopic(e) && 13 === t[0] && !t[1]) ||
2316
+ ("hebrew" === e && 5 === t[0] && t[1]))(e, o) || throwRangeError(invalidMonthCode(i));
2317
+ const n = t[yt.t];
2318
+ if (void 0 !== n) {
2319
+ const r = monthCodeToOrdinal(e, n, constrainMonthCode(e, n, o, h));
2320
+ (void 0 !== s && s !== r && throwRangeError(Ie), (t[yt.u] = r));
2307
2321
  }
2308
2322
  }
2309
2323
  })(e, t, o);
@@ -2317,7 +2331,7 @@ function zeroDateDuration() {
2317
2331
  function toInternalDurationRecord(e) {
2318
2332
  return combineDateAndTimeDuration(
2319
2333
  createDateDurationRecord(e[X], e[Q], e[ee], e[te]),
2320
- timeDurationFromComponents(e[oe], e[ne], e[re], e[ae], e[ie], e[ce]),
2334
+ timeDurationFromComponents(e[oe], e[ne], e[re], e[ae], e[ie], e[se]),
2321
2335
  );
2322
2336
  }
2323
2337
  function toInternalDurationRecordWith24HourDays([e, t, o, n, ...r]) {
@@ -2398,7 +2412,7 @@ function validateDuration(...e) {
2398
2412
  Math.abs(e[ee]) < 2 ** 32) ||
2399
2413
  throwRangeError(De),
2400
2414
  validateTimeDurationRange(
2401
- timeDurationFromComponents(24 * e[te] + e[oe], e[ne], e[re], e[ae], e[ie], e[ce]),
2415
+ timeDurationFromComponents(24 * e[te] + e[oe], e[ne], e[re], e[ae], e[ie], e[se]),
2402
2416
  ));
2403
2417
  }
2404
2418
  function defaultTemporalLargestUnit(e) {
@@ -2420,16 +2434,16 @@ function createTemporalDurationSlot(e) {
2420
2434
  function createTemporalDuration(e, t = Object.create(bt.prototype)) {
2421
2435
  return (Et.set(t, e), t);
2422
2436
  }
2423
- function timeDurationFromComponents(e, t, o, n, c, s) {
2437
+ function timeDurationFromComponents(e, t, o, n, s, c) {
2424
2438
  return addTimeDuration(
2425
2439
  addTimeDuration(
2426
2440
  addTimeDuration(
2427
2441
  createTimeDurationFromSeconds(3600 * e + 60 * t + o),
2428
2442
  normalize(divTrunc((m = n), r), (m % r) * 1e6),
2429
2443
  ),
2430
- ((d = c), normalize(Math.round((d - (d % a)) / a), (d % a) * 1e3)),
2444
+ ((d = s), normalize(Math.round((d - (d % a)) / a), (d % a) * 1e3)),
2431
2445
  ),
2432
- ((l = s), normalize(Math.round((l - (l % i)) / i), l % i)),
2446
+ ((l = c), normalize(Math.round((l - (l % i)) / i), l % i)),
2433
2447
  );
2434
2448
  var l, d, m;
2435
2449
  }
@@ -2463,19 +2477,19 @@ function roundTimeDuration(e, t, o, n) {
2463
2477
  function totalTimeDuration(e, t) {
2464
2478
  return divideTimeDurationToFloatingPoint(e, nanosecondsForTimeUnit(t));
2465
2479
  }
2466
- function computeNudgeWindow(e, t, o, n, r, a, i, c, s) {
2480
+ function computeNudgeWindow(e, t, o, n, r, a, i, s, c) {
2467
2481
  let l, d, m, u, T;
2468
- if (c === x)
2469
- ((l = roundNumberToIncrement(t.A.ee, i, P) + (s ? i * e : 0)),
2482
+ if (s === x)
2483
+ ((l = roundNumberToIncrement(t.A.ee, i, P) + (c ? i * e : 0)),
2470
2484
  (d = l + i * e),
2471
2485
  (m = createDateDurationRecord(l, 0, 0, 0)),
2472
2486
  (u = createDateDurationRecord(d, 0, 0, 0)));
2473
- else if (c === H)
2474
- ((l = roundNumberToIncrement(t.A.te, i, P) + (s ? i * e : 0)),
2487
+ else if (s === H)
2488
+ ((l = roundNumberToIncrement(t.A.te, i, P) + (c ? i * e : 0)),
2475
2489
  (d = l + i * e),
2476
2490
  (m = adjustDateDurationRecord(t.A, 0, 0, l)),
2477
2491
  (u = adjustDateDurationRecord(t.A, 0, 0, d)));
2478
- else if (c === q) {
2492
+ else if (s === q) {
2479
2493
  const o = calendarDateAdd(a, n.o, adjustDateDurationRecord(t.A, 0, 0), h);
2480
2494
  ((l = roundNumberToIncrement(
2481
2495
  t.A.X + calendarDateUntil(a, o, addDaysToIsoDate(o, t.A.K), q).X,
@@ -2505,11 +2519,11 @@ function computeNudgeWindow(e, t, o, n, r, a, i, c, s) {
2505
2519
  Ie: u,
2506
2520
  };
2507
2521
  }
2508
- function nudgeToCalendarUnit(e, t, o, n, r, a, i, c, s, l) {
2522
+ function nudgeToCalendarUnit(e, t, o, n, r, a, i, s, c, l) {
2509
2523
  let d = !1,
2510
- m = computeNudgeWindow(e, t, o, r, a, i, c, s, !1);
2524
+ m = computeNudgeWindow(e, t, o, r, a, i, s, c, !1);
2511
2525
  compareEpochNanoseconds(m.pe, n) * compareEpochNanoseconds(m.ge, n) > 0 &&
2512
- ((m = computeNudgeWindow(e, t, o, r, a, i, c, s, !0)), (d = !0));
2526
+ ((m = computeNudgeWindow(e, t, o, r, a, i, s, c, !0)), (d = !0));
2513
2527
  const u = differenceEpochNanoseconds(m.pe, n),
2514
2528
  T = differenceEpochNanoseconds(m.pe, m.ge);
2515
2529
  let D = m.fe,
@@ -2523,9 +2537,9 @@ function nudgeToCalendarUnit(e, t, o, n, r, a, i, c, s, l) {
2523
2537
  T,
2524
2538
  e,
2525
2539
  ) *
2526
- c *
2540
+ s *
2527
2541
  e,
2528
- c,
2542
+ s,
2529
2543
  l,
2530
2544
  ) === m.De && ((d = !0), (D = m.Ie), (h = m.ge)),
2531
2545
  {
@@ -2533,26 +2547,26 @@ function nudgeToCalendarUnit(e, t, o, n, r, a, i, c, s, l) {
2533
2547
  we:
2534
2548
  m.he +
2535
2549
  (divideTimeDurationToFloatingPoint(u, 1e9) / divideTimeDurationToFloatingPoint(T, 1e9)) *
2536
- c *
2550
+ s *
2537
2551
  e,
2538
2552
  }
2539
2553
  );
2540
2554
  }
2541
- function roundRelativeDuration(e, t, o, n, r, a, i, c, s, l) {
2555
+ function roundRelativeDuration(e, t, o, n, r, a, i, s, c, l) {
2542
2556
  const d = internalDurationSign(e) || 1,
2543
2557
  m =
2544
- isCalendarUnit(s) || (r && s === B)
2545
- ? nudgeToCalendarUnit(d, e, t, o, n, r, a, c, s, l).Oe
2558
+ isCalendarUnit(c) || (r && c === B)
2559
+ ? nudgeToCalendarUnit(d, e, t, o, n, r, a, s, c, l).Oe
2546
2560
  : r
2547
- ? ((e, t, o, n, r, a, i, c) => {
2548
- const s = calendarDateAdd(r, o.o, t.A, h),
2549
- l = combineIsoDateAndTimeRecord(s, o.p),
2550
- d = combineIsoDateAndTimeRecord(addDaysToIsoDate(s, e), o.p),
2561
+ ? ((e, t, o, n, r, a, i, s) => {
2562
+ const c = calendarDateAdd(r, o.o, t.A, h),
2563
+ l = combineIsoDateAndTimeRecord(c, o.p),
2564
+ d = combineIsoDateAndTimeRecord(addDaysToIsoDate(c, e), o.p),
2551
2565
  m = getEpochNanosecondsFor(n, l, g),
2552
2566
  u = getEpochNanosecondsFor(n, d, g),
2553
2567
  T = timeDurationFromEpochNanosecondsDifference(u, m),
2554
2568
  D = nanosecondsForTimeUnit(i);
2555
- let p = roundTimeDurationToIncrement(t.p, a * D, c);
2569
+ let p = roundTimeDurationToIncrement(t.p, a * D, s);
2556
2570
  const f = addTimeDuration(p, negateTimeDuration(T));
2557
2571
  let I,
2558
2572
  O = !1,
@@ -2561,7 +2575,7 @@ function roundRelativeDuration(e, t, o, n, r, a, i, c, s, l) {
2561
2575
  Mt(f) !== -e
2562
2576
  ? ((O = !0),
2563
2577
  (F = e),
2564
- (p = roundTimeDurationToIncrement(f, a * D, c)),
2578
+ (p = roundTimeDurationToIncrement(f, a * D, s)),
2565
2579
  (I = addTimeDurationToEpochNanoseconds(u, p)))
2566
2580
  : (I = addTimeDurationToEpochNanoseconds(u, p)),
2567
2581
  {
@@ -2570,41 +2584,41 @@ function roundRelativeDuration(e, t, o, n, r, a, i, c, s, l) {
2570
2584
  ye: O,
2571
2585
  }
2572
2586
  );
2573
- })(d, e, n, r, a, c, s, l)
2587
+ })(d, e, n, r, a, s, c, l)
2574
2588
  : (function (e, t, o, n, r, a) {
2575
2589
  const i = add24HourDaysToTimeDuration(e.p, e.A.K),
2576
- c =
2590
+ s =
2577
2591
  r === B
2578
2592
  ? roundTimeDurationByDays(i, n, a)
2579
2593
  : roundTimeDurationToIncrement(i, nanosecondsForTimeUnit(r) * n, a),
2580
- s = c[0],
2594
+ c = s[0],
2581
2595
  [l, d] = isDateUnit(o)
2582
- ? [s, addTimeDuration(c, timeDurationFromComponents(24 * -s, 0, 0, 0, 0, 0))]
2583
- : [0, c];
2596
+ ? [c, addTimeDuration(s, timeDurationFromComponents(24 * -c, 0, 0, 0, 0, 0))]
2597
+ : [0, s];
2584
2598
  return {
2585
2599
  Fe: combineDateAndTimeDuration(adjustDateDurationRecord(e.A, l), d),
2586
- Se: addTimeDurationToEpochNanoseconds(t, addTimeDuration(c, negateTimeDuration(i))),
2587
- ye: sign(s - i[0]) === Mt(i),
2600
+ Se: addTimeDurationToEpochNanoseconds(t, addTimeDuration(s, negateTimeDuration(i))),
2601
+ ye: sign(c - i[0]) === Mt(i),
2588
2602
  };
2589
- })(e, o, i, c, s, l);
2590
- return m.ye && s !== q
2591
- ? ((e, t, o, n, r, a, i, c) => {
2592
- if (c === i) return t;
2593
- const s = i;
2603
+ })(e, o, i, s, c, l);
2604
+ return m.ye && c !== q
2605
+ ? ((e, t, o, n, r, a, i, s) => {
2606
+ if (s === i) return t;
2607
+ const c = i;
2594
2608
  let l;
2595
- for (let i = c - 1; i >= s; i--)
2596
- if (i !== ee || s === ee) {
2609
+ for (let i = s - 1; i >= c; i--)
2610
+ if (i !== ee || c === ee) {
2597
2611
  l =
2598
2612
  i === X
2599
2613
  ? createDateDurationRecord(t.A.ee + e, 0, 0, 0)
2600
2614
  : i === Q
2601
2615
  ? adjustDateDurationRecord(t.A, 0, 0, t.A.te + e)
2602
2616
  : adjustDateDurationRecord(t.A, 0, t.A.X + e);
2603
- const c = combineIsoDateAndTimeRecord(calendarDateAdd(a, n.o, l, h), n.p);
2617
+ const s = combineIsoDateAndTimeRecord(calendarDateAdd(a, n.o, l, h), n.p);
2604
2618
  if (
2605
2619
  Mt(
2606
2620
  differenceEpochNanoseconds(
2607
- r ? getEpochNanosecondsFor(r, c, g) : getUtcEpochNanoseconds(c),
2621
+ r ? getEpochNanosecondsFor(r, s, g) : getUtcEpochNanoseconds(s),
2608
2622
  o,
2609
2623
  ),
2610
2624
  ) === -e
@@ -2613,7 +2627,7 @@ function roundRelativeDuration(e, t, o, n, r, a, i, c, s, l) {
2613
2627
  t = combineDateAndTimeDuration(l, createTimeDurationFromSeconds(0));
2614
2628
  }
2615
2629
  return t;
2616
- })(d, m.Fe, m.Se, n, r, a, i, largerOfTwoTemporalUnits(s, B))
2630
+ })(d, m.Fe, m.Se, n, r, a, i, largerOfTwoTemporalUnits(c, B))
2617
2631
  : m.Fe;
2618
2632
  }
2619
2633
  function totalRelativeDuration(e, t, o, n, r, a, i) {
@@ -2629,12 +2643,12 @@ function temporalDurationToString(e, t) {
2629
2643
  (e = applySignToDurationSlot(e, o))[re],
2630
2644
  e[ae],
2631
2645
  e[ie],
2632
- e[ce],
2646
+ e[se],
2633
2647
  ),
2634
- [, , , r, a, i, c] = balanceTimeDuration(n, _),
2635
- [s, l, d, m, u, T] = ["Y", "M", "W", "D", "H", "M"].map((t, o) => (e[o] ? `${e[o]}${t}` : "")),
2636
- D = `${u}${T}${Mt(n) || defaultTemporalLargestUnit(e) >= _ || void 0 !== t ? `${toString(r)}${formatFractionalSeconds(1e6 * a + 1e3 * i + c, t)}S` : ""}`;
2637
- return `${o < 0 ? "-" : ""}P${s}${l}${d}${m}${D && `T${D}`}`;
2648
+ [, , , r, a, i, s] = balanceTimeDuration(n, _),
2649
+ [c, l, d, m, u, T] = ["Y", "M", "W", "D", "H", "M"].map((t, o) => (e[o] ? `${e[o]}${t}` : "")),
2650
+ D = `${u}${T}${Mt(n) || defaultTemporalLargestUnit(e) >= _ || void 0 !== t ? `${toString(r)}${formatFractionalSeconds(1e6 * a + 1e3 * i + s, t)}S` : ""}`;
2651
+ return `${o < 0 ? "-" : ""}P${c}${l}${d}${m}${D && `T${D}`}`;
2638
2652
  }
2639
2653
  function addDurations(e, t, o) {
2640
2654
  const n = applySignToDurationSlot(toTemporalDuration(o), e),
@@ -2699,7 +2713,7 @@ function roundHalfEven(e) {
2699
2713
  }
2700
2714
  function isoDateToEpochDays(e, t, o) {
2701
2715
  const n = balanceIsoYearMonth(e, t + 1);
2702
- return Date.UTC((n.t % 400) - 400, n.u - 1, 0) / r + (divTrunc(n.t, 400) + 1) * c + o;
2716
+ return Date.UTC((n.t % 400) - 400, n.u - 1, 0) / r + (divTrunc(n.t, 400) + 1) * s + o;
2703
2717
  }
2704
2718
  function isoDateRecordToEpochDays(e) {
2705
2719
  return isoDateToEpochDays(e.t, e.u - 1, e.T);
@@ -2720,7 +2734,7 @@ function getTemporalOffsetOption(e, t) {
2720
2734
  return getOption(e, "offset", [O, "use", F, S], t);
2721
2735
  }
2722
2736
  function getTemporalShowCalendarNameOption(e) {
2723
- return getOption(e, "calendarName", [C, U, j, W], C);
2737
+ return getOption(e, "calendarName", [Y, U, j, W], Y);
2724
2738
  }
2725
2739
  function validateTemporalRoundingIncrement(e, t, o) {
2726
2740
  (e > (o ? t : t - 1) || t % e !== 0) && throwRangeError(invalidField("roundingIncrement"));
@@ -2737,12 +2751,12 @@ function getTemporalFractionalSecondDigitsOption(e) {
2737
2751
  }
2738
2752
  function toSecondsStringPrecisionRecord(e, t) {
2739
2753
  return e
2740
- ? { $e: e === G ? D : 3 * (e - 6), ve: e, Ee: 1 }
2741
- : { $e: t, ve: divFloor((t ?? 9) - 1, 3) + 7, Ee: 10 ** ((9 - (t ?? 9)) % 3) };
2754
+ ? { $e: e === G ? D : 3 * (e - 6), Ee: e, ve: 1 }
2755
+ : { $e: t, Ee: divFloor((t ?? 9) - 1, 3) + 7, ve: 10 ** ((9 - (t ?? 9)) % 3) };
2742
2756
  }
2743
2757
  function getTemporalUnitValuedOption(e, t, o) {
2744
- return mapUnlessUndefined(getOption(e, t, [...se, ...le, "auto"], o), (e) => {
2745
- return "auto" === e ? "auto" : ((t = e.replace(/s$/, "")), se.indexOf(t));
2758
+ return mapUnlessUndefined(getOption(e, t, [...ce, ...le, "auto"], o), (e) => {
2759
+ return "auto" === e ? "auto" : ((t = e.replace(/s$/, "")), ce.indexOf(t));
2746
2760
  var t;
2747
2761
  });
2748
2762
  }
@@ -2750,7 +2764,7 @@ function validateTemporalUnitValue(e, t, o = []) {
2750
2764
  void 0 === e ||
2751
2765
  o.includes(e) ||
2752
2766
  ("auto" === e && throwRangeError(disallowedUnit(e)),
2753
- ((e <= B && t === l) || (e > B && t === s)) && throwRangeError(disallowedUnit(e)));
2767
+ ((e <= B && t === l) || (e > B && t === c)) && throwRangeError(disallowedUnit(e)));
2754
2768
  }
2755
2769
  function getTemporalRelativeToOption(e) {
2756
2770
  const t = e.relativeTo;
@@ -2760,8 +2774,8 @@ function getTemporalRelativeToOption(e) {
2760
2774
  r,
2761
2775
  a,
2762
2776
  i,
2763
- c = !0,
2764
- s = y;
2777
+ s = !0,
2778
+ c = y;
2765
2779
  if (isObject(t)) {
2766
2780
  if (isZonedDateTime(t))
2767
2781
  return createNullPrototypeObject({ Me: getInternalSlotOrThrowForZonedDateTime(t) });
@@ -2773,22 +2787,22 @@ function getTemporalRelativeToOption(e) {
2773
2787
  be: getInternalSlotOrThrowForPlainDate(createTemporalDate(e._.o, e.Y)),
2774
2788
  });
2775
2789
  r = getTemporalCalendarIdentifierWithIsoDefault(t);
2776
- const c = prepareCalendarFields(
2790
+ const s = prepareCalendarFields(
2777
2791
  r,
2778
2792
  t,
2779
2793
  [yt.t, yt.u, yt.v, yt.T, yt.D, yt.I, yt.O, yt.F, yt.S, yt.$, yt.M, yt.P],
2780
2794
  [],
2781
2795
  ),
2782
- l = interpretTemporalDateTimeFields(r, c, h);
2783
- ((a = l.o), (i = l.p), (o = c.timeZone), (n = c.offset), (s = n ? y : v));
2796
+ l = interpretTemporalDateTimeFields(r, s, h);
2797
+ ((a = l.o), (i = l.p), (o = s.timeZone), (n = s.offset), (c = n ? y : v));
2784
2798
  } else {
2785
2799
  validateString(t);
2786
2800
  const e = parseIsoDateTime(t, [et, tt]);
2787
2801
  ((n = e.P.N),
2788
2802
  e.P.R
2789
2803
  ? ((o = toTemporalTimeZoneIdentifier(e.P.R)),
2790
- (s = e.P.Z ? w : n ? y : v),
2791
- (c = void 0 !== n && hasUtcOffsetSubMinuteParts(n)))
2804
+ (c = e.P.Z ? w : n ? y : v),
2805
+ (s = void 0 !== n && hasUtcOffsetSubMinuteParts(n)))
2792
2806
  : (o = void 0),
2793
2807
  (r = canonicalizeCalendar(e.Y || "iso8601")),
2794
2808
  (a = createIsoDateRecord(e.t, e.u, e.T)),
@@ -2802,12 +2816,12 @@ function getTemporalRelativeToOption(e) {
2802
2816
  interpretISODateTimeOffset(
2803
2817
  a,
2804
2818
  i,
2805
- s,
2806
- s === y ? parseDateTimeUtcOffset(n) : 0,
2819
+ c,
2820
+ c === y ? parseDateTimeUtcOffset(n) : 0,
2807
2821
  o,
2808
2822
  g,
2809
2823
  S,
2810
- c,
2824
+ s,
2811
2825
  ),
2812
2826
  o,
2813
2827
  r,
@@ -2858,7 +2872,7 @@ function roundNumberToIncrement(e, t, o) {
2858
2872
  return Pt[o](e / t) * t;
2859
2873
  }
2860
2874
  function getRoundingModeOption(e, t) {
2861
- return getOption(e, "roundingMode", [E, M, b, P, R, N, Z, $, Y], t);
2875
+ return getOption(e, "roundingMode", [E, M, b, P, R, N, Z, $, C], t);
2862
2876
  }
2863
2877
  function getRoundingIncrementOption(e) {
2864
2878
  const t = "roundingIncrement",
@@ -2875,8 +2889,8 @@ function isoDateToFields(e, t, o) {
2875
2889
  }
2876
2890
  function getDifferenceSettings(e, t, o, n, r, a) {
2877
2891
  let i = getTemporalUnitValuedOption(t, "largestUnit", void 0) ?? "auto";
2878
- const c = getRoundingIncrementOption(t),
2879
- s = getRoundingModeOption(t, P),
2892
+ const s = getRoundingIncrementOption(t),
2893
+ c = getRoundingModeOption(t, P),
2880
2894
  l = getTemporalUnitValuedOption(t, "smallestUnit", void 0) ?? r;
2881
2895
  return (
2882
2896
  validateTemporalUnitValue(i, o, ["auto"]),
@@ -2886,8 +2900,8 @@ function getDifferenceSettings(e, t, o, n, r, a) {
2886
2900
  "auto" === i && (i = largerOfTwoTemporalUnits(a, l)),
2887
2901
  i > l && throwRangeError(fe),
2888
2902
  isDateUnit(l) ||
2889
- validateTemporalRoundingIncrement(c, maximumTemporalDurationRoundingIncrement(l), !1),
2890
- { H: l, L: i, q: -1 === e ? negateRoundingMode(s) : s, V: c }
2903
+ validateTemporalRoundingIncrement(s, maximumTemporalDurationRoundingIncrement(l), !1),
2904
+ { H: l, L: i, q: -1 === e ? negateRoundingMode(c) : c, V: s }
2891
2905
  );
2892
2906
  }
2893
2907
  function getUtcEpochNanoseconds(e) {
@@ -2899,16 +2913,16 @@ function getUtcEpochNanoseconds(e) {
2899
2913
  );
2900
2914
  }
2901
2915
  function epochDaysToIsoDate(e) {
2902
- const t = new Date(modFloor(e, c) * r);
2916
+ const t = new Date(modFloor(e, s) * r);
2903
2917
  return {
2904
- t: t.getUTCFullYear() + 400 * divFloor(e, c),
2918
+ t: t.getUTCFullYear() + 400 * divFloor(e, s),
2905
2919
  u: t.getUTCMonth() + 1,
2906
2920
  T: t.getUTCDate(),
2907
2921
  };
2908
2922
  }
2909
2923
  function isoDateTimeToFields(e, t) {
2910
2924
  return createNullPrototypeObject({
2911
- ...isoDateToFields(e, t.o, s),
2925
+ ...isoDateToFields(e, t.o, c),
2912
2926
  [yt.D]: t.p.D,
2913
2927
  [yt.I]: t.p.I,
2914
2928
  [yt.O]: t.p.O,
@@ -2934,9 +2948,9 @@ function dateStyleToMonthStyle(e) {
2934
2948
  function amendOptionsForPlainDate(e) {
2935
2949
  const t = createNullPrototypeObject(e);
2936
2950
  return (
2937
- hasAnyOptions(e, Yt) ||
2938
- (hasAnyOptions(e, Ct) && throwTypeError(he), (t.year = t.month = t.day = "numeric")),
2939
- removeDateTimeFormatOptions(t, [...Ct, "timeZoneName"]),
2951
+ hasAnyOptions(e, Ct) ||
2952
+ (hasAnyOptions(e, Yt) && throwTypeError(he), (t.year = t.month = t.day = "numeric")),
2953
+ removeDateTimeFormatOptions(t, [...Yt, "timeZoneName"]),
2940
2954
  (t.timeZone = "UTC"),
2941
2955
  t
2942
2956
  );
@@ -2944,11 +2958,11 @@ function amendOptionsForPlainDate(e) {
2944
2958
  function amendOptionsForPlainTime(e) {
2945
2959
  const t = createNullPrototypeObject(e);
2946
2960
  return (
2947
- hasAnyOptions(e, Ct) ||
2948
- (hasAnyOptions(e, Yt) && throwTypeError(he), (t.hour = t.minute = t.second = "numeric")),
2961
+ hasAnyOptions(e, Yt) ||
2962
+ (hasAnyOptions(e, Ct) && throwTypeError(he), (t.hour = t.minute = t.second = "numeric")),
2949
2963
  ("long" !== e.timeStyle && "full" !== e.timeStyle) ||
2950
2964
  (removeDateTimeFormatOptions(t, ["timeStyle"]), (t.hour = t.minute = t.second = "numeric")),
2951
- removeDateTimeFormatOptions(t, [...Yt, "era", "timeZoneName"]),
2965
+ removeDateTimeFormatOptions(t, [...Ct, "era", "timeZoneName"]),
2952
2966
  (t.timeZone = "UTC"),
2953
2967
  t
2954
2968
  );
@@ -2964,7 +2978,7 @@ function amendOptionsForPlainDateTime(e) {
2964
2978
  (t.year = t.day = "numeric"),
2965
2979
  (t.month = dateStyleToMonthStyle(e.dateStyle)),
2966
2980
  (t.weekday = "full" === e.dateStyle ? "long" : void 0))),
2967
- hasAnyOptions(e, [...Yt, ...Ct]) ||
2981
+ hasAnyOptions(e, [...Ct, ...Yt]) ||
2968
2982
  (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"),
2969
2983
  removeDateTimeFormatOptions(t, ["timeZoneName"]),
2970
2984
  (t.timeZone = "UTC"),
@@ -2979,8 +2993,8 @@ function amendOptionsForPlainYearMonth(e) {
2979
2993
  (t.year = "short" === e.dateStyle ? "2-digit" : "numeric"),
2980
2994
  (t.month = dateStyleToMonthStyle(e.dateStyle))),
2981
2995
  hasAnyOptions(e, ["year", "month", "dateStyle"]) ||
2982
- (hasAnyOptions(e, [...Yt, ...Ct]) && throwTypeError(he), (t.year = t.month = "numeric")),
2983
- removeDateTimeFormatOptions(t, [...Ct, "day", "weekday", "timeZoneName"]),
2996
+ (hasAnyOptions(e, [...Ct, ...Yt]) && throwTypeError(he), (t.year = t.month = "numeric")),
2997
+ removeDateTimeFormatOptions(t, [...Yt, "day", "weekday", "timeZoneName"]),
2984
2998
  (t.timeZone = "UTC"),
2985
2999
  t
2986
3000
  );
@@ -2993,8 +3007,8 @@ function amendOptionsForPlainMonthDay(e) {
2993
3007
  (t.month = dateStyleToMonthStyle(e.dateStyle)),
2994
3008
  (t.day = "numeric")),
2995
3009
  hasAnyOptions(e, ["month", "day", "dateStyle"]) ||
2996
- (hasAnyOptions(e, [...Yt, ...Ct]) && throwTypeError(he), (t.month = t.day = "numeric")),
2997
- removeDateTimeFormatOptions(t, [...Ct, "era", "year", "weekday", "timeZoneName"]),
3010
+ (hasAnyOptions(e, [...Ct, ...Yt]) && throwTypeError(he), (t.month = t.day = "numeric")),
3011
+ removeDateTimeFormatOptions(t, [...Yt, "era", "year", "weekday", "timeZoneName"]),
2998
3012
  (t.timeZone = "UTC"),
2999
3013
  t
3000
3014
  );
@@ -3002,7 +3016,7 @@ function amendOptionsForPlainMonthDay(e) {
3002
3016
  function amendOptionsForInstant(e) {
3003
3017
  const t = createNullPrototypeObject(e);
3004
3018
  return (
3005
- hasAnyOptions(e, [...Yt, ...Ct]) ||
3019
+ hasAnyOptions(e, [...Ct, ...Yt]) ||
3006
3020
  (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"),
3007
3021
  t
3008
3022
  );
@@ -3029,18 +3043,18 @@ function createDateTimeFormat(
3029
3043
  void 0 !== n &&
3030
3044
  (void 0 !== a.timeZone && throwTypeError("disallowed field: timeZone"),
3031
3045
  (a.timeZone = n),
3032
- hasAnyOptions(a, [...Yt, ...Ct, "timeZoneName"]) || (a.timeZoneName = "short")));
3046
+ hasAnyOptions(a, [...Ct, ...Yt, "timeZoneName"]) || (a.timeZoneName = "short")));
3033
3047
  const i = new Nt(e, a),
3034
- c = i.resolvedOptions(),
3035
- d = createNullPrototypeObject(c);
3048
+ s = i.resolvedOptions(),
3049
+ d = createNullPrototypeObject(s);
3036
3050
  for (const e of Object.keys(d)) void 0 === a[e] && (d[e] = void 0);
3037
3051
  return (
3038
3052
  (d.hour12 = a.hour12),
3039
3053
  (d.hourCycle = a.hourCycle),
3040
3054
  (d.formatMatcher = a.formatMatcher),
3041
- (d.timeZone = c.timeZone),
3042
- (d.calendar = c.calendar),
3043
- ((o === s && d.timeStyle) || (o === l && d.dateStyle)) && throwTypeError(he),
3055
+ (d.timeZone = s.timeZone),
3056
+ (d.calendar = s.calendar),
3057
+ ((o === c && d.timeStyle) || (o === l && d.dateStyle)) && throwTypeError(he),
3044
3058
  $t.set(r, createNullPrototypeObject({ Pe: i, Re: d, Ne: i.resolvedOptions().locale })),
3045
3059
  r
3046
3060
  );
@@ -3223,8 +3237,8 @@ const e = 1e6,
3223
3237
  r = 864e5,
3224
3238
  a = 864e8,
3225
3239
  i = 864e11,
3226
- c = 146097,
3227
- s = Symbol(),
3240
+ s = 146097,
3241
+ c = Symbol(),
3228
3242
  l = Symbol(),
3229
3243
  d = Symbol(),
3230
3244
  m = Symbol(),
@@ -3250,8 +3264,8 @@ const e = 1e6,
3250
3264
  N = "halfFloor",
3251
3265
  Z = "halfExpand",
3252
3266
  $ = "halfTrunc",
3253
- Y = "halfEven",
3254
- C = "auto",
3267
+ C = "halfEven",
3268
+ Y = "auto",
3255
3269
  U = "always",
3256
3270
  j = "never",
3257
3271
  W = "critical",
@@ -3277,8 +3291,8 @@ const e = 1e6,
3277
3291
  re = 6,
3278
3292
  ae = 7,
3279
3293
  ie = 8,
3280
- ce = 9,
3281
- se = [
3294
+ se = 9,
3295
+ ce = [
3282
3296
  "year",
3283
3297
  "month",
3284
3298
  "week",
@@ -3290,7 +3304,7 @@ const e = 1e6,
3290
3304
  "microsecond",
3291
3305
  "nanosecond",
3292
3306
  ],
3293
- le = se.map((e) => `${e}s`),
3307
+ le = ce.map((e) => `${e}s`),
3294
3308
  de = [i, o, t, 1e9, 1e6, 1e3, 1],
3295
3309
  missingField = (e) => `missing field: ${e}`,
3296
3310
  invalidField = (e) => `invalid field: ${e}`,
@@ -3388,7 +3402,7 @@ var Pe = class {
3388
3402
  }
3389
3403
  get weekOfYear() {
3390
3404
  return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).ie
3391
- .ce;
3405
+ .se;
3392
3406
  }
3393
3407
  get yearOfWeek() {
3394
3408
  return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).ie.t;
@@ -3407,7 +3421,7 @@ var Pe = class {
3407
3421
  );
3408
3422
  }
3409
3423
  get daysInWeek() {
3410
- return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).se;
3424
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).ce;
3411
3425
  }
3412
3426
  get daysInMonth() {
3413
3427
  return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).le;
@@ -3455,12 +3469,12 @@ var Pe = class {
3455
3469
  ]),
3456
3470
  ),
3457
3471
  i = getOptionsObject(t),
3458
- c = getTemporalDisambiguationOption(i),
3459
- s = getTemporalOffsetOption(i, O),
3472
+ s = getTemporalDisambiguationOption(i),
3473
+ c = getTemporalOffsetOption(i, O),
3460
3474
  l = getTemporalOverflowOption(i),
3461
3475
  d = interpretTemporalDateTimeFields(o.Y, a, l);
3462
3476
  return createTemporalZonedDateTime(
3463
- interpretISODateTimeOffset(d.o, d.p, y, parseDateTimeUtcOffset(a[yt.M]), o.P, c, s, !0),
3477
+ interpretISODateTimeOffset(d.o, d.p, y, parseDateTimeUtcOffset(a[yt.M]), o.P, s, c, !0),
3464
3478
  o.P,
3465
3479
  o.Y,
3466
3480
  );
@@ -3529,10 +3543,10 @@ var Pe = class {
3529
3543
  t.Y,
3530
3544
  );
3531
3545
  }
3532
- const c = roundIsoDateTime(i, n, a, r),
3533
- s = getOffsetNanosecondsForZonedDateTimeSlot(t);
3546
+ const s = roundIsoDateTime(i, n, a, r),
3547
+ c = getOffsetNanosecondsForZonedDateTimeSlot(t);
3534
3548
  return createTemporalZonedDateTime(
3535
- interpretISODateTimeOffset(c.o, c.p, y, s, t.P, g, O, !0),
3549
+ interpretISODateTimeOffset(s.o, s.p, y, c, t.P, g, O, !0),
3536
3550
  t.P,
3537
3551
  t.Y,
3538
3552
  );
@@ -3551,11 +3565,11 @@ var Pe = class {
3551
3565
  r = getTemporalFractionalSecondDigitsOption(o),
3552
3566
  a = ((e) => getOption(e, "offset", [A, L], A))(o),
3553
3567
  i = getRoundingModeOption(o, P),
3554
- c = getTemporalUnitValuedOption(o, "smallestUnit", void 0),
3555
- s = ((e) => getOption(e, "timeZoneName", [k, z, V], k))(o);
3556
- (validateTemporalUnitValue(c, l), c === J && throwRangeError(invalidField("smallestUnit")));
3557
- const d = toSecondsStringPrecisionRecord(c, r);
3558
- return temporalZonedDateTimeToString(t, d.$e, n, s, a, d.Ee, d.ve, i);
3568
+ s = getTemporalUnitValuedOption(o, "smallestUnit", void 0),
3569
+ c = ((e) => getOption(e, "timeZoneName", [k, z, V], k))(o);
3570
+ (validateTemporalUnitValue(s, l), s === J && throwRangeError(invalidField("smallestUnit")));
3571
+ const d = toSecondsStringPrecisionRecord(s, r);
3572
+ return temporalZonedDateTimeToString(t, d.$e, n, c, a, d.ve, d.Ee, i);
3559
3573
  }
3560
3574
  toLocaleString(e = void 0, t = void 0) {
3561
3575
  const o = getInternalSlotOrThrowForZonedDateTime(this),
@@ -3570,7 +3584,7 @@ var Pe = class {
3570
3584
  return temporalZonedDateTimeToString(
3571
3585
  getInternalSlotOrThrowForZonedDateTime(this),
3572
3586
  void 0,
3573
- C,
3587
+ Y,
3574
3588
  k,
3575
3589
  A,
3576
3590
  );
@@ -3633,9 +3647,9 @@ const Re = createNullPrototypeObject({}),
3633
3647
  Ne = createNullPrototypeObject({}),
3634
3648
  Ze = new WeakMap();
3635
3649
  var $e = class {
3636
- constructor(e, t, o, n = 0, r = 0, a = 0, i = 0, c = 0, s = 0, l = "iso8601") {
3650
+ constructor(e, t, o, n = 0, r = 0, a = 0, i = 0, s = 0, c = 0, l = "iso8601") {
3637
3651
  const d = [e, t, o].map(toIntegerWithTruncation),
3638
- m = [n, r, a, i, c, s].map(toIntegerWithTruncation);
3652
+ m = [n, r, a, i, s, c].map(toIntegerWithTruncation);
3639
3653
  validateString(l);
3640
3654
  const u = canonicalizeCalendar(l);
3641
3655
  ((isValidIsoDate(...d) && isValidTime(...m)) || throwRangeError(ue),
@@ -3709,7 +3723,7 @@ var $e = class {
3709
3723
  }
3710
3724
  get weekOfYear() {
3711
3725
  const e = getInternalSlotOrThrowForPlainDateTime(this);
3712
- return calendarIsoToDate(e.Y, e._.o).ie.ce;
3726
+ return calendarIsoToDate(e.Y, e._.o).ie.se;
3713
3727
  }
3714
3728
  get yearOfWeek() {
3715
3729
  const e = getInternalSlotOrThrowForPlainDateTime(this);
@@ -3717,7 +3731,7 @@ var $e = class {
3717
3731
  }
3718
3732
  get daysInWeek() {
3719
3733
  const e = getInternalSlotOrThrowForPlainDateTime(this);
3720
- return calendarIsoToDate(e.Y, e._.o).se;
3734
+ return calendarIsoToDate(e.Y, e._.o).ce;
3721
3735
  }
3722
3736
  get daysInMonth() {
3723
3737
  const e = getInternalSlotOrThrowForPlainDateTime(this);
@@ -3802,11 +3816,11 @@ var $e = class {
3802
3816
  a = getRoundingModeOption(o, P),
3803
3817
  i = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
3804
3818
  (validateTemporalUnitValue(i, l), i === J && throwRangeError(invalidField("smallestUnit")));
3805
- const c = toSecondsStringPrecisionRecord(i, r);
3819
+ const s = toSecondsStringPrecisionRecord(i, r);
3806
3820
  return isoDateTimeToString(
3807
- validateIsoDateTime(roundIsoDateTime(t._, c.Ee, c.ve, a)),
3821
+ validateIsoDateTime(roundIsoDateTime(t._, s.ve, s.Ee, a)),
3808
3822
  t.Y,
3809
- c.$e,
3823
+ s.$e,
3810
3824
  n,
3811
3825
  );
3812
3826
  }
@@ -3818,7 +3832,7 @@ var $e = class {
3818
3832
  }
3819
3833
  toJSON() {
3820
3834
  const e = getInternalSlotOrThrowForPlainDateTime(this);
3821
- return isoDateTimeToString(e._, e.Y, void 0, C);
3835
+ return isoDateTimeToString(e._, e.Y, void 0, Y);
3822
3836
  }
3823
3837
  valueOf() {
3824
3838
  throwTypeError(Se);
@@ -3838,8 +3852,8 @@ var $e = class {
3838
3852
  }
3839
3853
  };
3840
3854
  (defineStringTag($e.prototype, "Temporal.PlainDateTime"), renameFunction($e, "PlainDateTime"));
3841
- const Ye = new WeakMap();
3842
- var Ce = class {
3855
+ const Ce = new WeakMap();
3856
+ var Ye = class {
3843
3857
  constructor(e = 0, t = 0, o = 0, n = 0, r = 0, a = 0) {
3844
3858
  const i = [e, t, o, n, r, a].map(toIntegerWithTruncation);
3845
3859
  (isValidTime(...i) || throwRangeError(ue), createTemporalTime(createTimeRecord(...i), this));
@@ -3915,7 +3929,7 @@ var Ce = class {
3915
3929
  a = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
3916
3930
  (validateTemporalUnitValue(a, l), a === J && throwRangeError(invalidField("smallestUnit")));
3917
3931
  const i = toSecondsStringPrecisionRecord(a, n);
3918
- return timeRecordToString(roundTime(t, i.Ee, i.ve, r), i.$e);
3932
+ return timeRecordToString(roundTime(t, i.ve, i.Ee, r), i.$e);
3919
3933
  }
3920
3934
  toLocaleString(e = void 0, t = void 0) {
3921
3935
  return (
@@ -3929,7 +3943,7 @@ var Ce = class {
3929
3943
  throwTypeError(Se);
3930
3944
  }
3931
3945
  };
3932
- (defineStringTag(Ce.prototype, "Temporal.PlainTime"), renameFunction(Ce, "PlainTime"));
3946
+ (defineStringTag(Ye.prototype, "Temporal.PlainTime"), renameFunction(Ye, "PlainTime"));
3933
3947
  const Ue = "\\d{4}|[-+]\\d{6}",
3934
3948
  je = "0[1-9]|1[0-2]",
3935
3949
  We = "0[1-9]|[12]\\d|30|31",
@@ -3960,8 +3974,8 @@ const Ue = "\\d{4}|[-+]\\d{6}",
3960
3974
  rt = createRegExp(`(${xe}|${qe})(?:${Ge})?${Xe}`),
3961
3975
  at = createRegExp(`(${xe}|${He})(?:${Ge})?${Xe}`),
3962
3976
  it = [createRegExp(`${qe}(${Ge})?(${Ke})*`), createRegExp(`${He}(${Ge})?(${Ke})*`)],
3963
- ct = createRegExp(Je),
3964
- st = createRegExp(_e),
3977
+ st = createRegExp(Je),
3978
+ ct = createRegExp(_e),
3965
3979
  lt = createRegExp(Ve),
3966
3980
  dt = new WeakMap();
3967
3981
  var mt = class {
@@ -3970,9 +3984,9 @@ var mt = class {
3970
3984
  a = toIntegerWithTruncation(t);
3971
3985
  validateString(o);
3972
3986
  const i = canonicalizeCalendar(o),
3973
- c = toIntegerWithTruncation(n);
3974
- (isValidIsoDate(c, r, a) || throwRangeError(ue),
3975
- createTemporalMonthDay(createIsoDateRecord(c, r, a), i, this));
3987
+ s = toIntegerWithTruncation(n);
3988
+ (isValidIsoDate(s, r, a) || throwRangeError(ue),
3989
+ createTemporalMonthDay(createIsoDateRecord(s, r, a), i, this));
3976
3990
  }
3977
3991
  static from(e, t = void 0) {
3978
3992
  return toTemporalMonthDay(e, t);
@@ -4020,11 +4034,11 @@ var mt = class {
4020
4034
  toLocaleString(e = void 0, t = void 0) {
4021
4035
  return (
4022
4036
  getInternalSlotOrThrowForPlainMonthDay(this),
4023
- formatDateTime(createDateTimeFormat(e, t, s), this)
4037
+ formatDateTime(createDateTimeFormat(e, t, c), this)
4024
4038
  );
4025
4039
  }
4026
4040
  toJSON() {
4027
- return temporalMonthDayToString(getInternalSlotOrThrowForPlainMonthDay(this), C);
4041
+ return temporalMonthDayToString(getInternalSlotOrThrowForPlainMonthDay(this), Y);
4028
4042
  }
4029
4043
  valueOf() {
4030
4044
  throwTypeError(Se);
@@ -4056,9 +4070,9 @@ var Tt = class {
4056
4070
  a = toIntegerWithTruncation(t);
4057
4071
  validateString(o);
4058
4072
  const i = canonicalizeCalendar(o),
4059
- c = toIntegerWithTruncation(n);
4060
- (isValidIsoDate(r, a, c) || throwRangeError(ue),
4061
- createTemporalYearMonth(createIsoDateRecord(r, a, c), i, this));
4073
+ s = toIntegerWithTruncation(n);
4074
+ (isValidIsoDate(r, a, s) || throwRangeError(ue),
4075
+ createTemporalYearMonth(createIsoDateRecord(r, a, s), i, this));
4062
4076
  }
4063
4077
  static from(e, t = void 0) {
4064
4078
  return toTemporalYearMonth(e, t);
@@ -4152,11 +4166,11 @@ var Tt = class {
4152
4166
  toLocaleString(e = void 0, t = void 0) {
4153
4167
  return (
4154
4168
  getInternalSlotOrThrowForPlainYearMonth(this),
4155
- formatDateTime(createDateTimeFormat(e, t, s), this)
4169
+ formatDateTime(createDateTimeFormat(e, t, c), this)
4156
4170
  );
4157
4171
  }
4158
4172
  toJSON() {
4159
- return temporalYearMonthToString(getInternalSlotOrThrowForPlainYearMonth(this), C);
4173
+ return temporalYearMonthToString(getInternalSlotOrThrowForPlainYearMonth(this), Y);
4160
4174
  }
4161
4175
  valueOf() {
4162
4176
  throwTypeError(Se);
@@ -4188,9 +4202,9 @@ var ht = class {
4188
4202
  a = toIntegerWithTruncation(t),
4189
4203
  i = toIntegerWithTruncation(o);
4190
4204
  validateString(n);
4191
- const c = canonicalizeCalendar(n);
4205
+ const s = canonicalizeCalendar(n);
4192
4206
  (isValidIsoDate(r, a, i) || throwRangeError(ue),
4193
- createTemporalDate(createIsoDateRecord(r, a, i), c, this));
4207
+ createTemporalDate(createIsoDateRecord(r, a, i), s, this));
4194
4208
  }
4195
4209
  static from(e, t = void 0) {
4196
4210
  return toTemporalDate(e, t);
@@ -4238,7 +4252,7 @@ var ht = class {
4238
4252
  }
4239
4253
  get weekOfYear() {
4240
4254
  const e = getInternalSlotOrThrowForPlainDate(this);
4241
- return calendarIsoToDate(e.Y, e.o).ie.ce;
4255
+ return calendarIsoToDate(e.Y, e.o).ie.se;
4242
4256
  }
4243
4257
  get yearOfWeek() {
4244
4258
  const e = getInternalSlotOrThrowForPlainDate(this);
@@ -4246,7 +4260,7 @@ var ht = class {
4246
4260
  }
4247
4261
  get daysInWeek() {
4248
4262
  const e = getInternalSlotOrThrowForPlainDate(this);
4249
- return calendarIsoToDate(e.Y, e.o).se;
4263
+ return calendarIsoToDate(e.Y, e.o).ce;
4250
4264
  }
4251
4265
  get daysInMonth() {
4252
4266
  const e = getInternalSlotOrThrowForPlainDate(this);
@@ -4267,14 +4281,14 @@ var ht = class {
4267
4281
  toPlainYearMonth() {
4268
4282
  const e = getInternalSlotOrThrowForPlainDate(this);
4269
4283
  return createTemporalYearMonth(
4270
- calendarYearMonthFromFields(e.Y, isoDateToFields(e.Y, e.o, s), h),
4284
+ calendarYearMonthFromFields(e.Y, isoDateToFields(e.Y, e.o, c), h),
4271
4285
  e.Y,
4272
4286
  );
4273
4287
  }
4274
4288
  toPlainMonthDay() {
4275
4289
  const e = getInternalSlotOrThrowForPlainDate(this);
4276
4290
  return createTemporalMonthDay(
4277
- calendarMonthDayFromFields(e.Y, isoDateToFields(e.Y, e.o, s), h),
4291
+ calendarMonthDayFromFields(e.Y, isoDateToFields(e.Y, e.o, c), h),
4278
4292
  e.Y,
4279
4293
  );
4280
4294
  }
@@ -4289,7 +4303,7 @@ var ht = class {
4289
4303
  validatePartialTemporalObject(e);
4290
4304
  const n = calendarMergeFields(
4291
4305
  o.Y,
4292
- isoDateToFields(o.Y, o.o, s),
4306
+ isoDateToFields(o.Y, o.o, c),
4293
4307
  prepareCalendarFields(o.Y, e, [yt.t, yt.u, yt.v, yt.T]),
4294
4308
  ),
4295
4309
  r = getTemporalOverflowOption(getOptionsObject(t));
@@ -4345,11 +4359,11 @@ var ht = class {
4345
4359
  }
4346
4360
  toLocaleString(e = void 0, t = void 0) {
4347
4361
  return (
4348
- getInternalSlotOrThrowForPlainDate(this), formatDateTime(createDateTimeFormat(e, t, s), this)
4362
+ getInternalSlotOrThrowForPlainDate(this), formatDateTime(createDateTimeFormat(e, t, c), this)
4349
4363
  );
4350
4364
  }
4351
4365
  toJSON() {
4352
- return temporalDateToString(getInternalSlotOrThrowForPlainDate(this), C);
4366
+ return temporalDateToString(getInternalSlotOrThrowForPlainDate(this), Y);
4353
4367
  }
4354
4368
  valueOf() {
4355
4369
  throwTypeError(Se);
@@ -4441,9 +4455,9 @@ const pt = createNullPrototypeObject({}),
4441
4455
  Et = new WeakMap(),
4442
4456
  Mt = signTimeDuration;
4443
4457
  var bt = class {
4444
- constructor(e = 0, t = 0, o = 0, n = 0, r = 0, a = 0, i = 0, c = 0, s = 0, l = 0) {
4458
+ constructor(e = 0, t = 0, o = 0, n = 0, r = 0, a = 0, i = 0, s = 0, c = 0, l = 0) {
4445
4459
  createTemporalDuration(
4446
- createTemporalDurationSlot([e, t, o, n, r, a, i, c, s, l].map(toIntegerIfIntegral)),
4460
+ createTemporalDurationSlot([e, t, o, n, r, a, i, s, c, l].map(toIntegerIfIntegral)),
4447
4461
  this,
4448
4462
  );
4449
4463
  }
@@ -4456,18 +4470,18 @@ var bt = class {
4456
4470
  a = getTemporalRelativeToOption(getOptionsObject(o));
4457
4471
  if (n.every((e, t) => r[t] === e)) return 0;
4458
4472
  const i = defaultTemporalLargestUnit(n),
4459
- c = defaultTemporalLargestUnit(r),
4460
- s = toInternalDurationRecord(n),
4473
+ s = defaultTemporalLargestUnit(r),
4474
+ c = toInternalDurationRecord(n),
4461
4475
  l = toInternalDurationRecord(r);
4462
4476
  let d, m;
4463
- return a.Me && (isDateUnit(i) || isDateUnit(c))
4464
- ? compareEpochNanoseconds(addZonedDateTime(a.Me, s, h), addZonedDateTime(a.Me, l, h))
4465
- : (isCalendarUnit(i) || isCalendarUnit(c)
4477
+ return a.Me && (isDateUnit(i) || isDateUnit(s))
4478
+ ? compareEpochNanoseconds(addZonedDateTime(a.Me, c, h), addZonedDateTime(a.Me, l, h))
4479
+ : (isCalendarUnit(i) || isCalendarUnit(s)
4466
4480
  ? (a.be || throwRangeError(missingField("relativeTo")),
4467
- (d = dateDurationDays(s.A, a.be)),
4481
+ (d = dateDurationDays(c.A, a.be)),
4468
4482
  (m = dateDurationDays(l.A, a.be)))
4469
4483
  : ((d = n[te]), (m = r[te])),
4470
- Me(add24HourDaysToTimeDuration(s.p, d), add24HourDaysToTimeDuration(l.p, m)));
4484
+ Me(add24HourDaysToTimeDuration(c.p, d), add24HourDaysToTimeDuration(l.p, m)));
4471
4485
  }
4472
4486
  get years() {
4473
4487
  return getInternalSlotOrThrowForDuration(this)[X];
@@ -4497,7 +4511,7 @@ var bt = class {
4497
4511
  return getInternalSlotOrThrowForDuration(this)[ie];
4498
4512
  }
4499
4513
  get nanoseconds() {
4500
- return getInternalSlotOrThrowForDuration(this)[ce];
4514
+ return getInternalSlotOrThrowForDuration(this)[se];
4501
4515
  }
4502
4516
  get sign() {
4503
4517
  return durationSign(getInternalSlotOrThrowForDuration(this));
@@ -4534,19 +4548,19 @@ var bt = class {
4534
4548
  const r = getTemporalRelativeToOption(o),
4535
4549
  a = getRoundingIncrementOption(o),
4536
4550
  i = getRoundingModeOption(o, Z);
4537
- let c = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
4538
- validateTemporalUnitValue(c, d);
4539
- const s = void 0 !== c;
4540
- c ??= K;
4551
+ let s = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
4552
+ validateTemporalUnitValue(s, d);
4553
+ const c = void 0 !== s;
4554
+ s ??= K;
4541
4555
  const l = defaultTemporalLargestUnit(t),
4542
- m = largerOfTwoTemporalUnits(l, c),
4556
+ m = largerOfTwoTemporalUnits(l, s),
4543
4557
  u = void 0 !== n;
4544
4558
  if (
4545
4559
  ((void 0 !== n && "auto" !== n) || (n = m),
4546
- ((!s && !u) || n > c) && throwRangeError(fe),
4547
- isDateUnit(c) ||
4548
- validateTemporalRoundingIncrement(a, maximumTemporalDurationRoundingIncrement(c), !1),
4549
- a > 1 && n !== c && isDateUnit(c) && throwRangeError(fe),
4560
+ ((!c && !u) || n > s) && throwRangeError(fe),
4561
+ isDateUnit(s) ||
4562
+ validateTemporalRoundingIncrement(a, maximumTemporalDurationRoundingIncrement(s), !1),
4563
+ a > 1 && n !== s && isDateUnit(s) && throwRangeError(fe),
4550
4564
  r.Me)
4551
4565
  )
4552
4566
  return createTemporalDuration(
@@ -4560,7 +4574,7 @@ var bt = class {
4560
4574
  ),
4561
4575
  n,
4562
4576
  a,
4563
- c,
4577
+ s,
4564
4578
  i,
4565
4579
  ),
4566
4580
  isDateUnit(n) ? J : n,
@@ -4580,7 +4594,7 @@ var bt = class {
4580
4594
  r.be.Y,
4581
4595
  n,
4582
4596
  a,
4583
- c,
4597
+ s,
4584
4598
  i,
4585
4599
  ),
4586
4600
  n,
@@ -4591,12 +4605,12 @@ var bt = class {
4591
4605
  const T = toInternalDurationRecordWith24HourDays(t);
4592
4606
  return createTemporalDuration(
4593
4607
  temporalDurationFromInternal(
4594
- c === B
4608
+ s === B
4595
4609
  ? combineDateAndTimeDuration(
4596
4610
  createDateDurationRecord(0, 0, 0, roundTimeDurationByDays(T.p, a, i)[0]),
4597
4611
  createTimeDurationFromSeconds(0),
4598
4612
  )
4599
- : combineDateAndTimeDuration(zeroDateDuration(), roundTimeDuration(T.p, a, c, i)),
4613
+ : combineDateAndTimeDuration(zeroDateDuration(), roundTimeDuration(T.p, a, s, i)),
4600
4614
  n,
4601
4615
  ),
4602
4616
  );
@@ -4668,11 +4682,11 @@ var bt = class {
4668
4682
  a = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
4669
4683
  (validateTemporalUnitValue(a, l), (a !== J && a !== G) || throwRangeError(disallowedUnit(a)));
4670
4684
  const i = toSecondsStringPrecisionRecord(a, n);
4671
- if (i.ve === K && 1 === i.Ee) return temporalDurationToString(t, i.$e);
4672
- const c = toInternalDurationRecord(t);
4685
+ if (i.Ee === K && 1 === i.ve) return temporalDurationToString(t, i.$e);
4686
+ const s = toInternalDurationRecord(t);
4673
4687
  return temporalDurationToString(
4674
4688
  temporalDurationFromInternal(
4675
- combineDateAndTimeDuration(c.A, roundTimeDuration(c.p, i.Ee, i.ve, r)),
4689
+ combineDateAndTimeDuration(s.A, roundTimeDuration(s.p, i.ve, i.Ee, r)),
4676
4690
  largerOfTwoTemporalUnits(defaultTemporalLargestUnit(t), _),
4677
4691
  ),
4678
4692
  i.$e,
@@ -4705,7 +4719,7 @@ const Pt = {
4705
4719
  [N]: roundHalfFloor,
4706
4720
  [Z]: (e) => (isIntegerAndHalf(e) ? roundExpand(e) : Math.round(e)) + 0,
4707
4721
  [$]: (e) => (isIntegerAndHalf(e) ? Math.trunc(e) : Math.round(e)) + 0,
4708
- [Y]: roundHalfEven,
4722
+ [C]: roundHalfEven,
4709
4723
  },
4710
4724
  Rt = {
4711
4725
  [E]: Math.ceil,
@@ -4716,7 +4730,7 @@ const Pt = {
4716
4730
  [N]: roundHalfFloor,
4717
4731
  [Z]: roundHalfCeil,
4718
4732
  [$]: roundHalfFloor,
4719
- [Y]: roundHalfEven,
4733
+ [C]: roundHalfEven,
4720
4734
  },
4721
4735
  Nt = globalThis.Intl.DateTimeFormat,
4722
4736
  Zt = [];
@@ -4732,8 +4746,8 @@ new Nt(
4732
4746
  ),
4733
4747
  );
4734
4748
  const $t = new WeakMap(),
4735
- Yt = ["year", "month", "day", "weekday", "dateStyle"],
4736
- Ct = ["hour", "minute", "second", "fractionalSecondDigits", "dayPeriod", "timeStyle"];
4749
+ Ct = ["year", "month", "day", "weekday", "dateStyle"],
4750
+ Yt = ["hour", "minute", "second", "fractionalSecondDigits", "dayPeriod", "timeStyle"];
4737
4751
  var Ut = class {
4738
4752
  Ae(e) {
4739
4753
  return formatDateTime(this, e);
@@ -4858,9 +4872,9 @@ var Lt = class {
4858
4872
  a = getTemporalUnitValuedOption(o, "smallestUnit", void 0),
4859
4873
  i = o.timeZone;
4860
4874
  (validateTemporalUnitValue(a, l), a === J && throwRangeError(invalidField("smallestUnit")));
4861
- const c = mapUnlessUndefined(i, toTemporalTimeZoneIdentifier),
4862
- s = toSecondsStringPrecisionRecord(a, n);
4863
- return temporalInstantToString(roundTemporalInstant(t.U, s.Ee, s.ve, r), c, s.$e);
4875
+ const s = mapUnlessUndefined(i, toTemporalTimeZoneIdentifier),
4876
+ c = toSecondsStringPrecisionRecord(a, n);
4877
+ return temporalInstantToString(roundTemporalInstant(t.U, c.ve, c.Ee, r), s, c.$e);
4864
4878
  }
4865
4879
  toLocaleString(e = void 0, t = void 0) {
4866
4880
  return (
@@ -4913,7 +4927,7 @@ const Ht = {
4913
4927
  Instant: Lt,
4914
4928
  PlainDateTime: $e,
4915
4929
  PlainDate: ht,
4916
- PlainTime: Ce,
4930
+ PlainTime: Ye,
4917
4931
  PlainYearMonth: Tt,
4918
4932
  PlainMonthDay: mt,
4919
4933
  Duration: bt,