temporal-polyfill-lite 0.3.4 → 0.3.5

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/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## 0.3.5 (2026-04-20)
9
+
10
+ ### Fixed
11
+
12
+ - Fix wrong order of observable operations for options object in `Intl.DateTimeFormat` constructor ([#28](https://github.com/fabon-f/temporal-polyfill-lite/pull/28))
13
+ - Fix types of `Intl` when the polyfill is used as a ponyfill ([#29](https://github.com/fabon-f/temporal-polyfill-lite/pull/29))
14
+
8
15
  ## 0.3.4 (2026-04-14)
9
16
 
10
17
  ### Fixed
@@ -591,19 +591,19 @@ export namespace Intl {
591
591
  }
592
592
  }
593
593
 
594
- export const Intl: {
594
+ export const Intl: typeof globalThis.Intl & {
595
595
  DateTimeFormat: {
596
596
  new (
597
- locales?: string | string[],
597
+ locales?: globalThis.Intl.LocalesArgument,
598
598
  options?: globalThis.Intl.DateTimeFormatOptions,
599
599
  ): Intl.DateTimeFormat;
600
600
  (
601
- locales?: string | string[],
601
+ locales?: globalThis.Intl.LocalesArgument,
602
602
  options?: globalThis.Intl.DateTimeFormatOptions,
603
603
  ): Intl.DateTimeFormat;
604
604
 
605
605
  supportedLocalesOf(
606
- locales: string | string[],
606
+ locales: globalThis.Intl.LocalesArgument,
607
607
  options?: globalThis.Intl.DateTimeFormatOptions,
608
608
  ): string[];
609
609
  };
@@ -1,2 +1,2 @@
1
- import { i as a, r as s, t as r } from "./src-BRD2b69b.js";
1
+ import { i as a, r as s, t as r } from "./src-DGSugl3P.js";
2
2
  export { s as Intl, r as Temporal, a as toTemporalInstant };
@@ -4,5 +4,5 @@ function install(s) {
4
4
  function setSystemTimeZoneIdCacheTtl(t) {
5
5
  s(t);
6
6
  }
7
- import { a as t, i as a, n as s, r as e, t as l } from "./src-BRD2b69b.js";
7
+ import { a as t, i as a, n as s, r as e, t as l } from "./src-DGSugl3P.js";
8
8
  export { install, setSystemTimeZoneIdCacheTtl };
@@ -35,9 +35,6 @@ function toPrimitive(e) {
35
35
  function toString(e) {
36
36
  return `${e}`;
37
37
  }
38
- function toBoolean(e) {
39
- return !!e;
40
- }
41
38
  function toBigInt(e) {
42
39
  return isObject(e) || "number" == typeof e ? BigInt.asIntN(2 ** 53 - 1, e) : BigInt(e);
43
40
  }
@@ -53,7 +50,7 @@ function toPositiveIntegerWithTruncation(e) {
53
50
  const t = toIntegerWithTruncation(e);
54
51
  return t <= 0 && throwRangeError(invalidNumber(t)), t;
55
52
  }
56
- function getOptionsObject(e = createNullPrototypeObject({})) {
53
+ function getOptionsObject(e = createNullPrototypeObject()) {
57
54
  return isObject(e) || throwTypeError("invalid options object"), e;
58
55
  }
59
56
  function getOption(e, t, o, n) {
@@ -1663,7 +1660,7 @@ function calendarResolveFields(e, t, o = s) {
1663
1660
  })(e, t, o);
1664
1661
  }
1665
1662
  function createEmptyCalendarFieldsRecord() {
1666
- return createNullPrototypeObject({});
1663
+ return createNullPrototypeObject();
1667
1664
  }
1668
1665
  function zeroDateDuration() {
1669
1666
  return createDateDurationRecord(0, 0, 0, 0);
@@ -1823,8 +1820,8 @@ function nudgeToCalendarUnit(e, t, o, n, r, a, i, c, s, l) {
1823
1820
  return roundNumberToIncrement(m.he + ((e, t, o) => signTimeDuration(e) ? ve(e, t) ? ve(addTimeDuration(e, e), t) * o / 5 + .5 : 1 : 0)(u, T, e) * c * e, c, l) === m.De && (d = !0, D = m.Ie, h = m.ge), {
1824
1821
  Oe: {
1825
1822
  Fe: combineDateAndTimeDuration(D, createTimeDurationFromSeconds(0)),
1826
- ye: h,
1827
- Se: d
1823
+ Se: h,
1824
+ ye: d
1828
1825
  },
1829
1826
  we: m.he + divideTimeDurationToFloatingPoint(u, 1e9) / divideTimeDurationToFloatingPoint(T, 1e9) * c * e
1830
1827
  };
@@ -1837,18 +1834,18 @@ function roundRelativeDuration(e, t, o, n, r, a, i, c, s, l) {
1837
1834
  let I, O = !1, F = 0;
1838
1835
  return vt(f) !== -e ? (O = !0, F = e, p = roundTimeDurationToIncrement(f, a * D, c), I = addTimeDurationToEpochNanoseconds(u, p)) : I = addTimeDurationToEpochNanoseconds(u, p), {
1839
1836
  Fe: combineDateAndTimeDuration(adjustDateDurationRecord(t.A, t.A.K + F), p),
1840
- ye: I,
1841
- Se: O
1837
+ Se: I,
1838
+ ye: O
1842
1839
  };
1843
1840
  })(d, e, n, r, a, c, s, l) : (function(e, t, o, n, r, a) {
1844
1841
  const i = add24HourDaysToTimeDuration(e.p, e.A.K), c = r === H ? roundTimeDurationByDays(i, n, a) : roundTimeDurationToIncrement(i, nanosecondsForTimeUnit(r) * n, a), s = c[0], [l, d] = isDateUnit(o) ? [s, addTimeDuration(c, timeDurationFromComponents(24 * -s, 0, 0, 0, 0, 0))] : [0, c];
1845
1842
  return {
1846
1843
  Fe: combineDateAndTimeDuration(adjustDateDurationRecord(e.A, l), d),
1847
- ye: addTimeDurationToEpochNanoseconds(t, addTimeDuration(c, negateTimeDuration(i))),
1848
- Se: sign(s - i[0]) === vt(i)
1844
+ Se: addTimeDurationToEpochNanoseconds(t, addTimeDuration(c, negateTimeDuration(i))),
1845
+ ye: sign(s - i[0]) === vt(i)
1849
1846
  };
1850
1847
  })(e, o, i, c, s, l);
1851
- return m.Se && s !== x ? ((e, t, o, n, r, a, i, c) => {
1848
+ return m.ye && s !== x ? ((e, t, o, n, r, a, i, c) => {
1852
1849
  if (c === i) return t;
1853
1850
  const s = i;
1854
1851
  let l;
@@ -1859,7 +1856,7 @@ function roundRelativeDuration(e, t, o, n, r, a, i, c, s, l) {
1859
1856
  t = combineDateAndTimeDuration(l, createTimeDurationFromSeconds(0));
1860
1857
  }
1861
1858
  return t;
1862
- })(d, m.Fe, m.ye, n, r, a, i, largerOfTwoTemporalUnits(s, H)) : m.Fe;
1859
+ })(d, m.Fe, m.Se, n, r, a, i, largerOfTwoTemporalUnits(s, H)) : m.Fe;
1863
1860
  }
1864
1861
  function totalRelativeDuration(e, t, o, n, r, a, i) {
1865
1862
  return isCalendarUnit(i) || r && i === H ? nudgeToCalendarUnit(internalDurationSign(e) || 1, e, t, o, n, r, a, 1, i, M).we : totalTimeDuration(add24HourDaysToTimeDuration(e.p, e.A.K), i);
@@ -1981,12 +1978,12 @@ function getTemporalFractionalSecondDigitsOption(e) {
1981
1978
  function toSecondsStringPrecisionRecord(e, t) {
1982
1979
  return e ? {
1983
1980
  $e: e === B ? D : 3 * (e - 6),
1984
- ve: e,
1985
- Ee: 1
1981
+ Ee: e,
1982
+ ve: 1
1986
1983
  } : {
1987
1984
  $e: t,
1988
- ve: divFloor((t ?? 9) - 1, 3) + 7,
1989
- Ee: 10 ** ((9 - (t ?? 9)) % 3)
1985
+ Ee: divFloor((t ?? 9) - 1, 3) + 7,
1986
+ ve: 10 ** ((9 - (t ?? 9)) % 3)
1990
1987
  };
1991
1988
  }
1992
1989
  function getTemporalUnitValuedOption(e, t, o) {
@@ -2004,7 +2001,7 @@ function validateTemporalUnitValue(e, t, o = []) {
2004
2001
  }
2005
2002
  function getTemporalRelativeToOption(e) {
2006
2003
  const t = e.relativeTo;
2007
- if (void 0 === t) return createNullPrototypeObject({});
2004
+ if (void 0 === t) return createNullPrototypeObject();
2008
2005
  let o, n, r, a, i, c = !0, s = F;
2009
2006
  if (isObject(t)) {
2010
2007
  if (isZonedDateTime(t)) return createNullPrototypeObject({ Me: getInternalSlotOrThrowForZonedDateTime(t) });
@@ -2121,7 +2118,7 @@ function isoDateTimeToFields(e, t) {
2121
2118
  });
2122
2119
  }
2123
2120
  function getInternalSlotOrThrowForDateTimeFormat(e) {
2124
- const t = Nt.get(e);
2121
+ const t = Rt.get(e);
2125
2122
  return t || throwTypeError(he), t;
2126
2123
  }
2127
2124
  function formatDateTime(e, t) {
@@ -2136,19 +2133,19 @@ function dateStyleToMonthStyle(e) {
2136
2133
  }
2137
2134
  function amendOptionsForPlainDate(e) {
2138
2135
  const t = createNullPrototypeObject(e);
2139
- return hasAnyOptions(e, Zt) || (hasAnyOptions(e, $t) && throwTypeError(Te), t.year = t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [...$t, "timeZoneName"]), t.timeZone = "UTC", t;
2136
+ return hasAnyOptions(e, Nt) || (hasAnyOptions(e, Zt) && throwTypeError(Te), t.year = t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [...Zt, "timeZoneName"]), t.timeZone = "UTC", t;
2140
2137
  }
2141
2138
  function amendOptionsForPlainTime(e) {
2142
2139
  const t = createNullPrototypeObject(e);
2143
- return hasAnyOptions(e, $t) || (hasAnyOptions(e, Zt) && throwTypeError(Te), t.hour = t.minute = t.second = "numeric"), "long" !== e.timeStyle && "full" !== e.timeStyle || (removeDateTimeFormatOptions(t, ["timeStyle"]), t.hour = t.minute = t.second = "numeric"), removeDateTimeFormatOptions(t, [
2144
- ...Zt,
2140
+ return hasAnyOptions(e, Zt) || (hasAnyOptions(e, Nt) && throwTypeError(Te), t.hour = t.minute = t.second = "numeric"), "long" !== e.timeStyle && "full" !== e.timeStyle || (removeDateTimeFormatOptions(t, ["timeStyle"]), t.hour = t.minute = t.second = "numeric"), removeDateTimeFormatOptions(t, [
2141
+ ...Nt,
2145
2142
  "era",
2146
2143
  "timeZoneName"
2147
2144
  ]), t.timeZone = "UTC", t;
2148
2145
  }
2149
2146
  function amendOptionsForPlainDateTime(e) {
2150
2147
  const t = createNullPrototypeObject(e);
2151
- return "long" !== e.timeStyle && "full" !== e.timeStyle || (removeDateTimeFormatOptions(t, ["timeStyle"]), t.hour = t.minute = t.second = "numeric", e.dateStyle && (removeDateTimeFormatOptions(t, ["dateStyle"]), t.year = t.day = "numeric", t.month = dateStyleToMonthStyle(e.dateStyle), t.weekday = "full" === e.dateStyle ? "long" : void 0)), hasAnyOptions(e, [...Zt, ...$t]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), removeDateTimeFormatOptions(t, ["timeZoneName"]), t.timeZone = "UTC", t;
2148
+ return "long" !== e.timeStyle && "full" !== e.timeStyle || (removeDateTimeFormatOptions(t, ["timeStyle"]), t.hour = t.minute = t.second = "numeric", e.dateStyle && (removeDateTimeFormatOptions(t, ["dateStyle"]), t.year = t.day = "numeric", t.month = dateStyleToMonthStyle(e.dateStyle), t.weekday = "full" === e.dateStyle ? "long" : void 0)), hasAnyOptions(e, [...Nt, ...Zt]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), removeDateTimeFormatOptions(t, ["timeZoneName"]), t.timeZone = "UTC", t;
2152
2149
  }
2153
2150
  function amendOptionsForPlainYearMonth(e) {
2154
2151
  const t = createNullPrototypeObject(e);
@@ -2156,8 +2153,8 @@ function amendOptionsForPlainYearMonth(e) {
2156
2153
  "year",
2157
2154
  "month",
2158
2155
  "dateStyle"
2159
- ]) || (hasAnyOptions(e, [...Zt, ...$t]) && throwTypeError(Te), t.year = t.month = "numeric"), removeDateTimeFormatOptions(t, [
2160
- ...$t,
2156
+ ]) || (hasAnyOptions(e, [...Nt, ...Zt]) && throwTypeError(Te), t.year = t.month = "numeric"), removeDateTimeFormatOptions(t, [
2157
+ ...Zt,
2161
2158
  "day",
2162
2159
  "weekday",
2163
2160
  "timeZoneName"
@@ -2169,8 +2166,8 @@ function amendOptionsForPlainMonthDay(e) {
2169
2166
  "month",
2170
2167
  "day",
2171
2168
  "dateStyle"
2172
- ]) || (hasAnyOptions(e, [...Zt, ...$t]) && throwTypeError(Te), t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [
2173
- ...$t,
2169
+ ]) || (hasAnyOptions(e, [...Nt, ...Zt]) && throwTypeError(Te), t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [
2170
+ ...Zt,
2174
2171
  "era",
2175
2172
  "year",
2176
2173
  "weekday",
@@ -2179,48 +2176,25 @@ function amendOptionsForPlainMonthDay(e) {
2179
2176
  }
2180
2177
  function amendOptionsForInstant(e) {
2181
2178
  const t = createNullPrototypeObject(e);
2182
- return hasAnyOptions(e, [...Zt, ...$t]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), t;
2179
+ return hasAnyOptions(e, [...Nt, ...Zt]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), t;
2183
2180
  }
2184
2181
  function hasAnyOptions(e, t) {
2185
2182
  return t.some((t) => void 0 !== e[t]);
2186
2183
  }
2187
- function createDateTimeFormat(e, t = createNullPrototypeObject({}), o, n, r = Object.create(Yt.prototype)) {
2184
+ function createDateTimeFormat(e, t = createNullPrototypeObject(), o, n, r = Object.create(Ct.prototype)) {
2188
2185
  null === t && throwTypeError(Te);
2189
- const a = ((e, t) => {
2190
- const o = createNullPrototypeObject({});
2191
- for (const n of t) o[n] = e[n];
2192
- return o;
2193
- })(Object(t), Rt);
2194
- a.hour12 = mapUnlessUndefined(a.hour12, toBoolean);
2195
- for (const e of [
2196
- "hourCycle",
2197
- "formatMatcher",
2198
- "era",
2199
- "year",
2200
- "month",
2201
- "day",
2202
- "weekday"
2203
- ]) mapUnlessUndefined(a[e], toString);
2204
- void 0 !== n && (void 0 !== a.timeZone && throwTypeError("disallowed field: timeZone"), a.timeZone = n, hasAnyOptions(a, [
2186
+ const a = createNullPrototypeObject();
2187
+ let i = new Pt(e, new Proxy(Object(t), { get(e, t) {
2188
+ const o = e[t];
2189
+ return "timeZone" === t && void 0 !== n ? (void 0 !== o && throwTypeError("disallowed field: timeZone"), a[t] = n) : void 0 === o ? o : a[t] = "hour12" === t ? ((e) => !!e)(o) : "fractionalSecondDigits" === t ? Se(o) : toString(o);
2190
+ } }));
2191
+ return (o === s && a.timeStyle || o === l && a.dateStyle) && throwTypeError(Te), a.calendar = i.resolvedOptions().calendar, void 0 === n || hasAnyOptions(a, [
2192
+ ...Nt,
2205
2193
  ...Zt,
2206
- ...$t,
2207
2194
  "timeZoneName"
2208
- ]) || (a.timeZoneName = "short"));
2209
- const i = new Pt(e, a), c = i.resolvedOptions(), d = createNullPrototypeObject(c);
2210
- for (const e of Object.keys(d)) void 0 === a[e] && (d[e] = void 0);
2211
- for (const e of [
2212
- "hour12",
2213
- "hourCycle",
2214
- "formatMatcher",
2215
- "era",
2216
- "year",
2217
- "month",
2218
- "day",
2219
- "weekday"
2220
- ]) d[e] = a[e];
2221
- return d.timeZone = c.timeZone, d.calendar = c.calendar, (o === s && d.timeStyle || o === l && d.dateStyle) && throwTypeError(Te), Nt.set(r, createNullPrototypeObject({
2195
+ ]) || (a.timeZoneName = "short", i = new Pt(i.resolvedOptions().locale, a)), Rt.set(r, createNullPrototypeObject({
2222
2196
  Pe: i,
2223
- Re: d,
2197
+ Re: a,
2224
2198
  Ne: i.resolvedOptions().locale
2225
2199
  })), r;
2226
2200
  }
@@ -2243,10 +2217,10 @@ function handleDateTimeValue(e, t) {
2243
2217
  return isPlainTime(t) ? [e.Ze ||= new Pt(e.Ne, amendOptionsForPlainTime(e.Re)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(createIsoDateRecord(1970, 1, 1), getInternalSlotOrThrowForPlainTime(t))))] : o ? (o.Y !== e.Re.calendar && "iso8601" !== o.Y && throwRangeError(De), [e.Ye ||= new Pt(e.Ne, amendOptionsForPlainDate(e.Re)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(o.o, midnightTimeRecord())))]) : n ? (n.Y !== e.Re.calendar && "iso8601" !== n.Y && throwRangeError(De), [e.Ce ||= new Pt(e.Ne, amendOptionsForPlainDateTime(e.Re)), epochMilliseconds(getUtcEpochNanoseconds(n._))]) : r ? (r.Y !== e.Re.calendar && throwRangeError(De), [e.Ue ||= new Pt(e.Ne, amendOptionsForPlainYearMonth(e.Re)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(r.o, midnightTimeRecord())))]) : a ? (a.Y !== e.Re.calendar && throwRangeError(De), [e.je ||= new Pt(e.Ne, amendOptionsForPlainMonthDay(e.Re)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(a.o, midnightTimeRecord())))]) : isInstant(t) ? [e.We ||= new Pt(e.Ne, amendOptionsForInstant(e.Re)), epochMilliseconds(getInternalSlotOrThrowForInstant(t).U)] : (isZonedDateTime(t) && throwTypeError(fe), [e.Pe, t]);
2244
2218
  }
2245
2219
  function DateTimeFormat(e, t) {
2246
- return new Yt(e, t);
2220
+ return new Ct(e, t);
2247
2221
  }
2248
- function createTemporalInstant(e, t = Object.create(Wt.prototype)) {
2249
- return jt.set(t, { U: e }), t;
2222
+ function createTemporalInstant(e, t = Object.create(jt.prototype)) {
2223
+ return Ut.set(t, { U: e }), t;
2250
2224
  }
2251
2225
  function toTemporalInstant$1(e) {
2252
2226
  if (isObject(e)) {
@@ -2285,23 +2259,23 @@ function validateEpochNanoseconds(e) {
2285
2259
  return ((e) => compareEpochNanoseconds(ye, e) * compareEpochNanoseconds(we, e) <= 0)(e) || throwRangeError(me), e;
2286
2260
  }
2287
2261
  function getInternalSlotForInstant(e) {
2288
- return jt.get(e);
2262
+ return Ut.get(e);
2289
2263
  }
2290
2264
  function getInternalSlotOrThrowForInstant(e) {
2291
2265
  const t = getInternalSlotForInstant(e);
2292
2266
  return t || throwTypeError(he), t;
2293
2267
  }
2294
2268
  function isInstant(e) {
2295
- return jt.has(e);
2269
+ return Ut.has(e);
2296
2270
  }
2297
2271
  function clampEpochNanoseconds(e) {
2298
2272
  return compareEpochNanoseconds(e, we) > 0 ? we : compareEpochNanoseconds(e, ye) < 0 ? ye : e;
2299
2273
  }
2300
2274
  function systemTimeZoneIdentifier() {
2301
- return Vt && xt + Vt > Date.now() && zt ? zt : (xt = Date.now(), zt = new Pt().resolvedOptions().timeZone);
2275
+ return zt && Vt + zt > Date.now() && kt ? kt : (Vt = Date.now(), kt = new Pt().resolvedOptions().timeZone);
2302
2276
  }
2303
2277
  function setSystemTimeZoneIdCacheTtl(e) {
2304
- Vt = e, e || (zt = void 0, xt = -Infinity);
2278
+ zt = e, e || (kt = void 0, Vt = -Infinity);
2305
2279
  }
2306
2280
  function systemUtcEpochNanoseconds() {
2307
2281
  return createEpochNanosecondsFromEpochMilliseconds(Date.now());
@@ -2495,7 +2469,7 @@ var Me = class {
2495
2469
  ], A))(o);
2496
2470
  validateTemporalUnitValue(c, l), c === q && throwRangeError(invalidField("smallestUnit"));
2497
2471
  const d = toSecondsStringPrecisionRecord(c, r);
2498
- return temporalZonedDateTimeToString(t, d.$e, n, s, a, d.Ee, d.ve, i);
2472
+ return temporalZonedDateTimeToString(t, d.$e, n, s, a, d.ve, d.Ee, i);
2499
2473
  }
2500
2474
  toLocaleString(e = void 0, t = void 0) {
2501
2475
  const o = getInternalSlotOrThrowForZonedDateTime(this), n = createDateTimeFormat(e, t, d, o.P), r = getInternalSlotOrThrowForDateTimeFormat(n);
@@ -2537,7 +2511,7 @@ var Me = class {
2537
2511
  }
2538
2512
  };
2539
2513
  defineStringTag(Me.prototype, "Temporal.ZonedDateTime"), renameFunction(Me, "ZonedDateTime");
2540
- const be = createNullPrototypeObject({}), Pe = createNullPrototypeObject({}), Re = /* @__PURE__ */ new WeakMap();
2514
+ const be = createNullPrototypeObject(), Pe = createNullPrototypeObject(), Re = /* @__PURE__ */ new WeakMap();
2541
2515
  var Ne = class {
2542
2516
  constructor(e, t, o, n = 0, r = 0, a = 0, i = 0, c = 0, s = 0, l = "iso8601") {
2543
2517
  const d = [
@@ -2691,7 +2665,7 @@ var Ne = class {
2691
2665
  const t = getInternalSlotOrThrowForPlainDateTime(this), o = getOptionsObject(e), n = getTemporalShowCalendarNameOption(o), r = getTemporalFractionalSecondDigitsOption(o), a = getRoundingModeOption(o, M), i = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
2692
2666
  validateTemporalUnitValue(i, l), i === q && throwRangeError(invalidField("smallestUnit"));
2693
2667
  const c = toSecondsStringPrecisionRecord(i, r);
2694
- return isoDateTimeToString(validateIsoDateTime(roundIsoDateTime(t._, c.Ee, c.ve, a)), t.Y, c.$e, n);
2668
+ return isoDateTimeToString(validateIsoDateTime(roundIsoDateTime(t._, c.ve, c.Ee, a)), t.Y, c.$e, n);
2695
2669
  }
2696
2670
  toLocaleString(e = void 0, t = void 0) {
2697
2671
  return getInternalSlotOrThrowForPlainDateTime(this), formatDateTime(createDateTimeFormat(e, t, d), this);
@@ -2787,7 +2761,7 @@ var $e = class {
2787
2761
  const t = getInternalSlotOrThrowForPlainTime(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, M), a = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
2788
2762
  validateTemporalUnitValue(a, l), a === q && throwRangeError(invalidField("smallestUnit"));
2789
2763
  const i = toSecondsStringPrecisionRecord(a, n);
2790
- return timeRecordToString(roundTime(t, i.Ee, i.ve, r), i.$e);
2764
+ return timeRecordToString(roundTime(t, i.ve, i.Ee, r), i.$e);
2791
2765
  }
2792
2766
  toLocaleString(e = void 0, t = void 0) {
2793
2767
  return getInternalSlotOrThrowForPlainTime(this), formatDateTime(createDateTimeFormat(e, t, l), this);
@@ -3110,7 +3084,7 @@ var Tt = class {
3110
3084
  }
3111
3085
  };
3112
3086
  defineStringTag(Tt.prototype, "Temporal.PlainDate"), renameFunction(Tt, "PlainDate");
3113
- const Dt = createNullPrototypeObject({}), ht = {
3087
+ const Dt = createNullPrototypeObject(), ht = {
3114
3088
  chinese: createLruCache(2e3),
3115
3089
  dangi: createLruCache(2e3)
3116
3090
  }, pt = {
@@ -3300,15 +3274,15 @@ var Et = class {
3300
3274
  const t = getInternalSlotOrThrowForDuration(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, M), a = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
3301
3275
  validateTemporalUnitValue(a, l), a !== q && a !== B || throwRangeError(disallowedUnit(a));
3302
3276
  const i = toSecondsStringPrecisionRecord(a, n);
3303
- if (i.ve === G && 1 === i.Ee) return temporalDurationToString(t, i.$e);
3277
+ if (i.Ee === G && 1 === i.ve) return temporalDurationToString(t, i.$e);
3304
3278
  const c = toInternalDurationRecord(t);
3305
- return temporalDurationToString(temporalDurationFromInternal(combineDateAndTimeDuration(c.A, roundTimeDuration(c.p, i.Ee, i.ve, r)), largerOfTwoTemporalUnits(defaultTemporalLargestUnit(t), J)), i.$e);
3279
+ return temporalDurationToString(temporalDurationFromInternal(combineDateAndTimeDuration(c.A, roundTimeDuration(c.p, i.ve, i.Ee, r)), largerOfTwoTemporalUnits(defaultTemporalLargestUnit(t), J)), i.$e);
3306
3280
  }
3307
3281
  toJSON() {
3308
3282
  return temporalDurationToString(getInternalSlotOrThrowForDuration(this));
3309
3283
  }
3310
3284
  toLocaleString(e = void 0, t = void 0) {
3311
- const o = getInternalSlotOrThrowForDuration(this), n = createNullPrototypeObject({});
3285
+ const o = getInternalSlotOrThrowForDuration(this), n = createNullPrototypeObject();
3312
3286
  return ce.map((e, t) => {
3313
3287
  n[e] = o[t];
3314
3288
  }), new Intl.DurationFormat(e, t).format(n);
@@ -3338,17 +3312,13 @@ const Mt = {
3338
3312
  [R]: roundHalfCeil,
3339
3313
  [N]: roundHalfFloor,
3340
3314
  [Z]: roundHalfEven
3341
- }, Pt = globalThis.Intl.DateTimeFormat, Rt = [];
3342
- new Pt(void 0, new Proxy({}, { get(e, t) {
3343
- Rt.push(t);
3344
- } }));
3345
- const Nt = /* @__PURE__ */ new WeakMap(), Zt = [
3315
+ }, Pt = globalThis.Intl.DateTimeFormat, Rt = /* @__PURE__ */ new WeakMap(), Nt = [
3346
3316
  "year",
3347
3317
  "month",
3348
3318
  "day",
3349
3319
  "weekday",
3350
3320
  "dateStyle"
3351
- ], $t = [
3321
+ ], Zt = [
3352
3322
  "hour",
3353
3323
  "minute",
3354
3324
  "second",
@@ -3356,16 +3326,16 @@ const Nt = /* @__PURE__ */ new WeakMap(), Zt = [
3356
3326
  "dayPeriod",
3357
3327
  "timeStyle"
3358
3328
  ];
3359
- var Ct = class {
3329
+ var $t = class {
3360
3330
  Ae(e) {
3361
3331
  return formatDateTime(this, e);
3362
3332
  }
3363
- }, Yt = class {
3333
+ }, Ct = class {
3364
3334
  constructor(e, t) {
3365
3335
  createDateTimeFormat(e, t, d, void 0, this);
3366
3336
  }
3367
3337
  get format() {
3368
- return Object.defineProperty(getInternalSlotOrThrowForDateTimeFormat(this).ke ||= Ct.prototype.Ae.bind(this), "name", { value: "" });
3338
+ return Object.defineProperty(getInternalSlotOrThrowForDateTimeFormat(this).ke ||= $t.prototype.Ae.bind(this), "name", { value: "" });
3369
3339
  }
3370
3340
  formatToParts(e) {
3371
3341
  return ((e, t) => {
@@ -3393,10 +3363,10 @@ var Ct = class {
3393
3363
  return getInternalSlotOrThrowForDateTimeFormat(this).Pe.resolvedOptions();
3394
3364
  }
3395
3365
  };
3396
- const Ut = Object.getOwnPropertyDescriptors(Intl.DateTimeFormat);
3397
- Ut.prototype.value = Yt.prototype, Object.defineProperties(DateTimeFormat, Ut), DateTimeFormat.prototype.constructor = DateTimeFormat, defineStringTag(DateTimeFormat.prototype, "Intl.DateTimeFormat");
3398
- const jt = /* @__PURE__ */ new WeakMap();
3399
- var Wt = class {
3366
+ const Yt = Object.getOwnPropertyDescriptors(Intl.DateTimeFormat);
3367
+ Yt.prototype.value = Ct.prototype, Object.defineProperties(DateTimeFormat, Yt), DateTimeFormat.prototype.constructor = DateTimeFormat, defineStringTag(DateTimeFormat.prototype, "Intl.DateTimeFormat");
3368
+ const Ut = /* @__PURE__ */ new WeakMap();
3369
+ var jt = class {
3400
3370
  constructor(e) {
3401
3371
  createTemporalInstant(validateEpochNanoseconds(createEpochNanosecondsFromBigInt(toBigInt(e))), this);
3402
3372
  }
@@ -3441,7 +3411,7 @@ var Wt = class {
3441
3411
  const t = getInternalSlotOrThrowForInstant(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, M), a = getTemporalUnitValuedOption(o, "smallestUnit", void 0), i = o.timeZone;
3442
3412
  validateTemporalUnitValue(a, l), a === q && throwRangeError(invalidField("smallestUnit"));
3443
3413
  const c = mapUnlessUndefined(i, toTemporalTimeZoneIdentifier), s = toSecondsStringPrecisionRecord(a, n);
3444
- return temporalInstantToString(roundTemporalInstant(t.U, s.Ee, s.ve, r), c, s.$e);
3414
+ return temporalInstantToString(roundTemporalInstant(t.U, s.ve, s.Ee, r), c, s.$e);
3445
3415
  }
3446
3416
  toLocaleString(e = void 0, t = void 0) {
3447
3417
  return getInternalSlotOrThrowForInstant(this), formatDateTime(createDateTimeFormat(e, t, d), this);
@@ -3456,18 +3426,18 @@ var Wt = class {
3456
3426
  return createTemporalZonedDateTime(getInternalSlotOrThrowForInstant(this).U, toTemporalTimeZoneIdentifier(e), "iso8601");
3457
3427
  }
3458
3428
  };
3459
- defineStringTag(Wt.prototype, "Temporal.Instant"), renameFunction(Wt, "Instant");
3460
- const At = class {
3429
+ defineStringTag(jt.prototype, "Temporal.Instant"), renameFunction(jt, "Instant");
3430
+ const Wt = class {
3461
3431
  toTemporalInstant() {
3462
3432
  const e = Date.prototype.valueOf.call(this);
3463
3433
  return isNaN(e) && throwRangeError("invalid date"), createTemporalInstant(createEpochNanosecondsFromEpochMilliseconds(e));
3464
3434
  }
3465
- }.prototype.toTemporalInstant, Lt = Object.getOwnPropertyDescriptors(globalThis.Intl);
3466
- Lt.DateTimeFormat.value = DateTimeFormat;
3467
- const kt = {};
3468
- Object.defineProperties(kt, Lt);
3469
- let zt, Vt = 0, xt = -Infinity;
3470
- const Ht = {
3435
+ }.prototype.toTemporalInstant, At = Object.getOwnPropertyDescriptors(globalThis.Intl);
3436
+ At.DateTimeFormat.value = DateTimeFormat;
3437
+ const Lt = {};
3438
+ Object.defineProperties(Lt, At);
3439
+ let kt, zt = 0, Vt = -Infinity;
3440
+ const xt = {
3471
3441
  timeZoneId: () => systemTimeZoneIdentifier(),
3472
3442
  instant: () => createTemporalInstant(systemUtcEpochNanoseconds()),
3473
3443
  plainDateTimeISO: (e = void 0) => createTemporalDateTime(systemDateTime(e), "iso8601"),
@@ -3475,9 +3445,9 @@ const Ht = {
3475
3445
  plainDateISO: (e = void 0) => createTemporalDate(systemDateTime(e).o, "iso8601"),
3476
3446
  plainTimeISO: (e = void 0) => createTemporalTime(systemDateTime(e).p)
3477
3447
  };
3478
- defineStringTag(Ht, "Temporal.Now"), makePropertiesNonEnumerable(Ht);
3479
- const qt = {
3480
- Instant: Wt,
3448
+ defineStringTag(xt, "Temporal.Now"), makePropertiesNonEnumerable(xt);
3449
+ const Ht = {
3450
+ Instant: jt,
3481
3451
  PlainDateTime: Ne,
3482
3452
  PlainDate: Tt,
3483
3453
  PlainTime: $e,
@@ -3485,7 +3455,7 @@ const qt = {
3485
3455
  PlainMonthDay: lt,
3486
3456
  Duration: Et,
3487
3457
  ZonedDateTime: Me,
3488
- Now: Ht
3458
+ Now: xt
3489
3459
  };
3490
- defineStringTag(qt, "Temporal"), makePropertiesNonEnumerable(qt);
3491
- export { defineNonEnumerableProperty as a, At as i, setSystemTimeZoneIdCacheTtl as n, kt as r, qt as t };
3460
+ defineStringTag(Ht, "Temporal"), makePropertiesNonEnumerable(Ht);
3461
+ export { defineNonEnumerableProperty as a, Wt as i, setSystemTimeZoneIdCacheTtl as n, Lt as r, Ht as t };
package/dist/index.d.ts CHANGED
@@ -591,19 +591,19 @@ export namespace Intl {
591
591
  }
592
592
  }
593
593
 
594
- export const Intl: {
594
+ export const Intl: typeof globalThis.Intl & {
595
595
  DateTimeFormat: {
596
596
  new (
597
- locales?: string | string[],
597
+ locales?: globalThis.Intl.LocalesArgument,
598
598
  options?: globalThis.Intl.DateTimeFormatOptions,
599
599
  ): Intl.DateTimeFormat;
600
600
  (
601
- locales?: string | string[],
601
+ locales?: globalThis.Intl.LocalesArgument,
602
602
  options?: globalThis.Intl.DateTimeFormatOptions,
603
603
  ): Intl.DateTimeFormat;
604
604
 
605
605
  supportedLocalesOf(
606
- locales: string | string[],
606
+ locales: globalThis.Intl.LocalesArgument,
607
607
  options?: globalThis.Intl.DateTimeFormatOptions,
608
608
  ): string[];
609
609
  };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { i as a, r as s, t as r } from "./src-D8HHiqs0.js";
1
+ import { i as a, r as s, t as r } from "./src-OoYXO2Zf.js";
2
2
  export { s as Intl, r as Temporal, a as toTemporalInstant };
package/dist/shim.js CHANGED
@@ -4,5 +4,5 @@ function install(s) {
4
4
  function setSystemTimeZoneIdCacheTtl(t) {
5
5
  s(t);
6
6
  }
7
- import { a as t, i as a, n as s, r as e, t as l } from "./src-D8HHiqs0.js";
7
+ import { a as t, i as a, n as s, r as e, t as l } from "./src-OoYXO2Zf.js";
8
8
  export { install, setSystemTimeZoneIdCacheTtl };
@@ -35,9 +35,6 @@ function toPrimitive(e) {
35
35
  function toString(e) {
36
36
  return `${e}`;
37
37
  }
38
- function toBoolean(e) {
39
- return !!e;
40
- }
41
38
  function toBigInt(e) {
42
39
  return isObject(e) || "number" == typeof e ? BigInt.asIntN(2 ** 53 - 1, e) : BigInt(e);
43
40
  }
@@ -53,7 +50,7 @@ function toPositiveIntegerWithTruncation(e) {
53
50
  const t = toIntegerWithTruncation(e);
54
51
  return t <= 0 && throwRangeError(invalidNumber(t)), t;
55
52
  }
56
- function getOptionsObject(e = createNullPrototypeObject({})) {
53
+ function getOptionsObject(e = createNullPrototypeObject()) {
57
54
  return isObject(e) || throwTypeError("invalid options object"), e;
58
55
  }
59
56
  function getOption(e, t, o, n) {
@@ -232,7 +229,7 @@ function toTemporalZonedDateTime(e, t) {
232
229
  return createZonedDateTimeSlot(interpretISODateTimeOffset(l, c, m, m === S ? parseDateTimeUtcOffset(n) : 0, o, r, a, d), o, i);
233
230
  }
234
231
  function createTemporalZonedDateTime(e, t, o, n) {
235
- return createTemporalZonedDateTimeFromSlot(createZonedDateTimeSlot(e, t, o, ((e, t) => Re[e] && Re[e].C(clampEpochSecond(t)))(t, epochSeconds(e))), n);
232
+ return createTemporalZonedDateTimeFromSlot(createZonedDateTimeSlot(e, t, o, ((e, t) => be[e] && be[e].C(clampEpochSecond(t)))(t, epochSeconds(e))), n);
236
233
  }
237
234
  function createZonedDateTimeSlot(e, t, o, n) {
238
235
  return {
@@ -315,7 +312,7 @@ function clampEpochSecond(e) {
315
312
  }
316
313
  function getNamedTimeZoneOffsetNanosecondsForEpochSecond(t, o, n) {
317
314
  if ("UTC" === t) return 0;
318
- const r = clampEpochSecond(o), a = Re[t] ||= (() => {
315
+ const r = clampEpochSecond(o), a = be[t] ||= (() => {
319
316
  const e = /* @__PURE__ */ new Map();
320
317
  return {
321
318
  C(t) {
@@ -341,7 +338,7 @@ function getNamedTimeZoneOffsetNanosecondsForEpochSecond(t, o, n) {
341
338
  return n || a.q(r, c), c;
342
339
  }
343
340
  function getFormatterForTimeZone(e) {
344
- return be[e] ||= new Ft("en-u-hc-h23", {
341
+ return Re[e] ||= new Ft("en-u-hc-h23", {
345
342
  timeZone: e,
346
343
  year: "numeric",
347
344
  month: "numeric",
@@ -1099,7 +1096,7 @@ function calendarResolveFields(e, t, o = c) {
1099
1096
  })(0, t, o);
1100
1097
  }
1101
1098
  function createEmptyCalendarFieldsRecord() {
1102
- return createNullPrototypeObject({});
1099
+ return createNullPrototypeObject();
1103
1100
  }
1104
1101
  function zeroDateDuration() {
1105
1102
  return createDateDurationRecord(0, 0, 0, 0);
@@ -1245,18 +1242,18 @@ function computeNudgeWindow(e, t, o, n, r, a, i, l, c) {
1245
1242
  return {
1246
1243
  Te: s,
1247
1244
  De: d,
1248
- he: u,
1249
- pe: r ? getEpochNanosecondsFor(r, D, g) : getUtcEpochNanoseconds(D),
1245
+ pe: u,
1246
+ he: r ? getEpochNanosecondsFor(r, D, g) : getUtcEpochNanoseconds(D),
1250
1247
  ge: m,
1251
1248
  fe: T
1252
1249
  };
1253
1250
  }
1254
1251
  function nudgeToCalendarUnit(e, t, o, n, r, a, i, l, c, s) {
1255
1252
  let d = !1, m = computeNudgeWindow(e, t, o, r, a, 0, l, c, !1);
1256
- compareEpochNanoseconds(m.he, n) * compareEpochNanoseconds(m.pe, n) > 0 && (m = computeNudgeWindow(e, t, o, r, a, 0, l, c, !0), d = !0);
1257
- const T = differenceEpochNanoseconds(m.he, n), u = differenceEpochNanoseconds(m.he, m.pe);
1258
- let D = m.ge, p = m.he;
1259
- return roundNumberToIncrement(m.Te + ((e, t, o) => signTimeDuration(e) ? ye(e, t) ? ye(addTimeDuration(e, e), t) * o / 5 + .5 : 1 : 0)(T, u, e) * l * e, l, s) === m.De && (d = !0, D = m.fe, p = m.pe), {
1253
+ compareEpochNanoseconds(m.pe, n) * compareEpochNanoseconds(m.he, n) > 0 && (m = computeNudgeWindow(e, t, o, r, a, 0, l, c, !0), d = !0);
1254
+ const T = differenceEpochNanoseconds(m.pe, n), u = differenceEpochNanoseconds(m.pe, m.he);
1255
+ let D = m.ge, p = m.pe;
1256
+ return roundNumberToIncrement(m.Te + ((e, t, o) => signTimeDuration(e) ? ye(e, t) ? ye(addTimeDuration(e, e), t) * o / 5 + .5 : 1 : 0)(T, u, e) * l * e, l, s) === m.De && (d = !0, D = m.fe, p = m.he), {
1260
1257
  Ie: {
1261
1258
  Oe: combineDateAndTimeDuration(D, createTimeDurationFromSeconds(0)),
1262
1259
  Se: p,
@@ -1385,7 +1382,7 @@ function getTemporalDisambiguationOption(e) {
1385
1382
  ], g);
1386
1383
  }
1387
1384
  function negateRoundingMode(e) {
1388
- return "ceil" === e ? y : "floor" === e ? v : "halfCeil" === e ? R : "halfFloor" === e ? b : e;
1385
+ return "ceil" === e ? y : "floor" === e ? v : "halfCeil" === e ? b : "halfFloor" === e ? R : e;
1389
1386
  }
1390
1387
  function getTemporalOffsetOption(e, t) {
1391
1388
  return getOption(e, "offset", [
@@ -1416,12 +1413,12 @@ function getTemporalFractionalSecondDigitsOption(e) {
1416
1413
  }
1417
1414
  function toSecondsStringPrecisionRecord(e, t) {
1418
1415
  return e ? {
1419
- ye: e === q ? D : 3 * (e - 6),
1420
- ve: e,
1416
+ ve: e === q ? D : 3 * (e - 6),
1417
+ ye: e,
1421
1418
  Ee: 1
1422
1419
  } : {
1423
- ye: t,
1424
- ve: divFloor((t ?? 9) - 1, 3) + 7,
1420
+ ve: t,
1421
+ ye: divFloor((t ?? 9) - 1, 3) + 7,
1425
1422
  Ee: 10 ** ((9 - (t ?? 9)) % 3)
1426
1423
  };
1427
1424
  }
@@ -1440,13 +1437,13 @@ function validateTemporalUnitValue(e, t, o = []) {
1440
1437
  }
1441
1438
  function getTemporalRelativeToOption(e) {
1442
1439
  const t = e.relativeTo;
1443
- if (void 0 === t) return createNullPrototypeObject({});
1440
+ if (void 0 === t) return createNullPrototypeObject();
1444
1441
  let o, n, r, a, i, l = !0, c = S;
1445
1442
  if (isObject(t)) {
1446
1443
  if (isZonedDateTime(t)) return createNullPrototypeObject({ Pe: getInternalSlotOrThrowForZonedDateTime(t) });
1447
- if (isPlainDate(t)) return createNullPrototypeObject({ be: getInternalSlotOrThrowForPlainDate(t) });
1444
+ if (isPlainDate(t)) return createNullPrototypeObject({ Re: getInternalSlotOrThrowForPlainDate(t) });
1448
1445
  const e = getInternalSlotForPlainDateTime(t);
1449
- if (e) return createNullPrototypeObject({ be: getInternalSlotOrThrowForPlainDate(createTemporalDate(e._.o, e.U)) });
1446
+ if (e) return createNullPrototypeObject({ Re: getInternalSlotOrThrowForPlainDate(createTemporalDate(e._.o, e.U)) });
1450
1447
  r = getTemporalCalendarIdentifierWithIsoDefault(t);
1451
1448
  const l = prepareCalendarFields(r, t, [
1452
1449
  Dt.t,
@@ -1468,7 +1465,7 @@ function getTemporalRelativeToOption(e) {
1468
1465
  const e = parseIsoDateTime(t, [Xe, Qe]);
1469
1466
  n = e.Z.$, e.Z.N ? (o = toTemporalTimeZoneIdentifier(e.Z.N), c = e.Z.M ? F : n ? S : w, l = void 0 !== n && hasUtcOffsetSubMinuteParts(n)) : o = void 0, r = canonicalizeCalendar(e.U || "iso8601"), a = createIsoDateRecord(e.t, e.u, e.T), i = e.p;
1470
1467
  }
1471
- return createNullPrototypeObject(o ? { Pe: getInternalSlotOrThrowForZonedDateTime(createTemporalZonedDateTime(interpretISODateTimeOffset(a, i, c, c === S ? parseDateTimeUtcOffset(n) : 0, o, g, O, l), o, r)) } : { be: getInternalSlotOrThrowForPlainDate(createTemporalDate(a, r)) });
1468
+ return createNullPrototypeObject(o ? { Pe: getInternalSlotOrThrowForZonedDateTime(createTemporalZonedDateTime(interpretISODateTimeOffset(a, i, c, c === S ? parseDateTimeUtcOffset(n) : 0, o, g, O, l), o, r)) } : { Re: getInternalSlotOrThrowForPlainDate(createTemporalDate(a, r)) });
1472
1469
  }
1473
1470
  function largerOfTwoTemporalUnits(e, t) {
1474
1471
  return e < t ? e : t;
@@ -1505,8 +1502,8 @@ function getRoundingModeOption(e, t) {
1505
1502
  y,
1506
1503
  E,
1507
1504
  P,
1508
- b,
1509
1505
  R,
1506
+ b,
1510
1507
  Z,
1511
1508
  N,
1512
1509
  M
@@ -1557,7 +1554,7 @@ function isoDateTimeToFields(e, t) {
1557
1554
  });
1558
1555
  }
1559
1556
  function getInternalSlotOrThrowForDateTimeFormat(e) {
1560
- const t = vt.get(e);
1557
+ const t = wt.get(e);
1561
1558
  return t || throwTypeError(pe), t;
1562
1559
  }
1563
1560
  function formatDateTime(e, t) {
@@ -1572,19 +1569,19 @@ function dateStyleToMonthStyle(e) {
1572
1569
  }
1573
1570
  function amendOptionsForPlainDate(e) {
1574
1571
  const t = createNullPrototypeObject(e);
1575
- return hasAnyOptions(e, yt) || (hasAnyOptions(e, Et) && throwTypeError(ue), t.year = t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [...Et, "timeZoneName"]), t.timeZone = "UTC", t;
1572
+ return hasAnyOptions(e, vt) || (hasAnyOptions(e, yt) && throwTypeError(ue), t.year = t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [...yt, "timeZoneName"]), t.timeZone = "UTC", t;
1576
1573
  }
1577
1574
  function amendOptionsForPlainTime(e) {
1578
1575
  const t = createNullPrototypeObject(e);
1579
- return hasAnyOptions(e, Et) || (hasAnyOptions(e, yt) && throwTypeError(ue), t.hour = t.minute = t.second = "numeric"), "long" !== e.timeStyle && "full" !== e.timeStyle || (removeDateTimeFormatOptions(t, ["timeStyle"]), t.hour = t.minute = t.second = "numeric"), removeDateTimeFormatOptions(t, [
1580
- ...yt,
1576
+ return hasAnyOptions(e, yt) || (hasAnyOptions(e, vt) && throwTypeError(ue), t.hour = t.minute = t.second = "numeric"), "long" !== e.timeStyle && "full" !== e.timeStyle || (removeDateTimeFormatOptions(t, ["timeStyle"]), t.hour = t.minute = t.second = "numeric"), removeDateTimeFormatOptions(t, [
1577
+ ...vt,
1581
1578
  "era",
1582
1579
  "timeZoneName"
1583
1580
  ]), t.timeZone = "UTC", t;
1584
1581
  }
1585
1582
  function amendOptionsForPlainDateTime(e) {
1586
1583
  const t = createNullPrototypeObject(e);
1587
- return "long" !== e.timeStyle && "full" !== e.timeStyle || (removeDateTimeFormatOptions(t, ["timeStyle"]), t.hour = t.minute = t.second = "numeric", e.dateStyle && (removeDateTimeFormatOptions(t, ["dateStyle"]), t.year = t.day = "numeric", t.month = dateStyleToMonthStyle(e.dateStyle), t.weekday = "full" === e.dateStyle ? "long" : void 0)), hasAnyOptions(e, [...yt, ...Et]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), removeDateTimeFormatOptions(t, ["timeZoneName"]), t.timeZone = "UTC", t;
1584
+ return "long" !== e.timeStyle && "full" !== e.timeStyle || (removeDateTimeFormatOptions(t, ["timeStyle"]), t.hour = t.minute = t.second = "numeric", e.dateStyle && (removeDateTimeFormatOptions(t, ["dateStyle"]), t.year = t.day = "numeric", t.month = dateStyleToMonthStyle(e.dateStyle), t.weekday = "full" === e.dateStyle ? "long" : void 0)), hasAnyOptions(e, [...vt, ...yt]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), removeDateTimeFormatOptions(t, ["timeZoneName"]), t.timeZone = "UTC", t;
1588
1585
  }
1589
1586
  function amendOptionsForPlainYearMonth(e) {
1590
1587
  const t = createNullPrototypeObject(e);
@@ -1592,8 +1589,8 @@ function amendOptionsForPlainYearMonth(e) {
1592
1589
  "year",
1593
1590
  "month",
1594
1591
  "dateStyle"
1595
- ]) || (hasAnyOptions(e, [...yt, ...Et]) && throwTypeError(ue), t.year = t.month = "numeric"), removeDateTimeFormatOptions(t, [
1596
- ...Et,
1592
+ ]) || (hasAnyOptions(e, [...vt, ...yt]) && throwTypeError(ue), t.year = t.month = "numeric"), removeDateTimeFormatOptions(t, [
1593
+ ...yt,
1597
1594
  "day",
1598
1595
  "weekday",
1599
1596
  "timeZoneName"
@@ -1605,8 +1602,8 @@ function amendOptionsForPlainMonthDay(e) {
1605
1602
  "month",
1606
1603
  "day",
1607
1604
  "dateStyle"
1608
- ]) || (hasAnyOptions(e, [...yt, ...Et]) && throwTypeError(ue), t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [
1609
- ...Et,
1605
+ ]) || (hasAnyOptions(e, [...vt, ...yt]) && throwTypeError(ue), t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [
1606
+ ...yt,
1610
1607
  "era",
1611
1608
  "year",
1612
1609
  "weekday",
@@ -1615,48 +1612,25 @@ function amendOptionsForPlainMonthDay(e) {
1615
1612
  }
1616
1613
  function amendOptionsForInstant(e) {
1617
1614
  const t = createNullPrototypeObject(e);
1618
- return hasAnyOptions(e, [...yt, ...Et]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), t;
1615
+ return hasAnyOptions(e, [...vt, ...yt]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), t;
1619
1616
  }
1620
1617
  function hasAnyOptions(e, t) {
1621
1618
  return t.some((t) => void 0 !== e[t]);
1622
1619
  }
1623
- function createDateTimeFormat(e, t = createNullPrototypeObject({}), o, n, r = Object.create(bt.prototype)) {
1620
+ function createDateTimeFormat(e, t = createNullPrototypeObject(), o, n, r = Object.create(Pt.prototype)) {
1624
1621
  null === t && throwTypeError(ue);
1625
- const a = ((e, t) => {
1626
- const o = createNullPrototypeObject({});
1627
- for (const n of t) o[n] = e[n];
1628
- return o;
1629
- })(Object(t), wt);
1630
- a.hour12 = mapUnlessUndefined(a.hour12, toBoolean);
1631
- for (const e of [
1632
- "hourCycle",
1633
- "formatMatcher",
1634
- "era",
1635
- "year",
1636
- "month",
1637
- "day",
1638
- "weekday"
1639
- ]) mapUnlessUndefined(a[e], toString);
1640
- void 0 !== n && (void 0 !== a.timeZone && throwTypeError("disallowed field: timeZone"), a.timeZone = n, hasAnyOptions(a, [
1622
+ const a = createNullPrototypeObject();
1623
+ let i = new Ft(e, new Proxy(Object(t), { get(e, t) {
1624
+ const o = e[t];
1625
+ return "timeZone" === t && void 0 !== n ? (void 0 !== o && throwTypeError("disallowed field: timeZone"), a[t] = n) : void 0 === o ? o : a[t] = "hour12" === t ? ((e) => !!e)(o) : "fractionalSecondDigits" === t ? Fe(o) : toString(o);
1626
+ } }));
1627
+ return (o === c && a.timeStyle || o === s && a.dateStyle) && throwTypeError(ue), a.calendar = i.resolvedOptions().calendar, void 0 === n || hasAnyOptions(a, [
1628
+ ...vt,
1641
1629
  ...yt,
1642
- ...Et,
1643
1630
  "timeZoneName"
1644
- ]) || (a.timeZoneName = "short"));
1645
- const i = new Ft(e, a), l = i.resolvedOptions(), d = createNullPrototypeObject(l);
1646
- for (const e of Object.keys(d)) void 0 === a[e] && (d[e] = void 0);
1647
- for (const e of [
1648
- "hour12",
1649
- "hourCycle",
1650
- "formatMatcher",
1651
- "era",
1652
- "year",
1653
- "month",
1654
- "day",
1655
- "weekday"
1656
- ]) d[e] = a[e];
1657
- return d.timeZone = l.timeZone, d.calendar = l.calendar, (o === c && d.timeStyle || o === s && d.dateStyle) && throwTypeError(ue), vt.set(r, createNullPrototypeObject({
1658
- Re: i,
1659
- Ze: d,
1631
+ ]) || (a.timeZoneName = "short", i = new Ft(i.resolvedOptions().locale, a)), wt.set(r, createNullPrototypeObject({
1632
+ be: i,
1633
+ Ze: a,
1660
1634
  Ne: i.resolvedOptions().locale
1661
1635
  })), r;
1662
1636
  }
@@ -1676,13 +1650,13 @@ function toDateTimeFormattable(e) {
1676
1650
  }
1677
1651
  function handleDateTimeValue(e, t) {
1678
1652
  const o = getInternalSlotForPlainDate(t), n = getInternalSlotForPlainDateTime(t), r = getInternalSlotForPlainYearMonth(t), a = getInternalSlotForPlainMonthDay(t);
1679
- return isPlainTime(t) ? [e.$e ||= new Ft(e.Ne, amendOptionsForPlainTime(e.Ze)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(createIsoDateRecord(1970, 1, 1), getInternalSlotOrThrowForPlainTime(t))))] : o ? (o.U !== e.Ze.calendar && "iso8601" !== o.U && throwRangeError(De), [e.Me ||= new Ft(e.Ne, amendOptionsForPlainDate(e.Ze)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(o.o, midnightTimeRecord())))]) : n ? (n.U !== e.Ze.calendar && "iso8601" !== n.U && throwRangeError(De), [e.Ue ||= new Ft(e.Ne, amendOptionsForPlainDateTime(e.Ze)), epochMilliseconds(getUtcEpochNanoseconds(n._))]) : r ? (r.U !== e.Ze.calendar && throwRangeError(De), [e.je ||= new Ft(e.Ne, amendOptionsForPlainYearMonth(e.Ze)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(r.o, midnightTimeRecord())))]) : a ? (a.U !== e.Ze.calendar && throwRangeError(De), [e.Ce ||= new Ft(e.Ne, amendOptionsForPlainMonthDay(e.Ze)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(a.o, midnightTimeRecord())))]) : isInstant(t) ? [e.Ye ||= new Ft(e.Ne, amendOptionsForInstant(e.Ze)), epochMilliseconds(getInternalSlotOrThrowForInstant(t).Y)] : (isZonedDateTime(t) && throwTypeError(fe), [e.Re, t]);
1653
+ return isPlainTime(t) ? [e.$e ||= new Ft(e.Ne, amendOptionsForPlainTime(e.Ze)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(createIsoDateRecord(1970, 1, 1), getInternalSlotOrThrowForPlainTime(t))))] : o ? (o.U !== e.Ze.calendar && "iso8601" !== o.U && throwRangeError(De), [e.Me ||= new Ft(e.Ne, amendOptionsForPlainDate(e.Ze)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(o.o, midnightTimeRecord())))]) : n ? (n.U !== e.Ze.calendar && "iso8601" !== n.U && throwRangeError(De), [e.Ue ||= new Ft(e.Ne, amendOptionsForPlainDateTime(e.Ze)), epochMilliseconds(getUtcEpochNanoseconds(n._))]) : r ? (r.U !== e.Ze.calendar && throwRangeError(De), [e.je ||= new Ft(e.Ne, amendOptionsForPlainYearMonth(e.Ze)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(r.o, midnightTimeRecord())))]) : a ? (a.U !== e.Ze.calendar && throwRangeError(De), [e.Ce ||= new Ft(e.Ne, amendOptionsForPlainMonthDay(e.Ze)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(a.o, midnightTimeRecord())))]) : isInstant(t) ? [e.Ye ||= new Ft(e.Ne, amendOptionsForInstant(e.Ze)), epochMilliseconds(getInternalSlotOrThrowForInstant(t).Y)] : (isZonedDateTime(t) && throwTypeError(fe), [e.be, t]);
1680
1654
  }
1681
1655
  function DateTimeFormat(e, t) {
1682
- return new bt(e, t);
1656
+ return new Pt(e, t);
1683
1657
  }
1684
- function createTemporalInstant(e, t = Object.create(Nt.prototype)) {
1685
- return Zt.set(t, { Y: e }), t;
1658
+ function createTemporalInstant(e, t = Object.create(Zt.prototype)) {
1659
+ return bt.set(t, { Y: e }), t;
1686
1660
  }
1687
1661
  function toTemporalInstant$1(e) {
1688
1662
  if (isObject(e)) {
@@ -1721,23 +1695,23 @@ function validateEpochNanoseconds(e) {
1721
1695
  return ((e) => compareEpochNanoseconds(we, e) * compareEpochNanoseconds(ve, e) <= 0)(e) || throwRangeError(me), e;
1722
1696
  }
1723
1697
  function getInternalSlotForInstant(e) {
1724
- return Zt.get(e);
1698
+ return bt.get(e);
1725
1699
  }
1726
1700
  function getInternalSlotOrThrowForInstant(e) {
1727
1701
  const t = getInternalSlotForInstant(e);
1728
1702
  return t || throwTypeError(pe), t;
1729
1703
  }
1730
1704
  function isInstant(e) {
1731
- return Zt.has(e);
1705
+ return bt.has(e);
1732
1706
  }
1733
1707
  function clampEpochNanoseconds(e) {
1734
1708
  return compareEpochNanoseconds(e, ve) > 0 ? ve : compareEpochNanoseconds(e, we) < 0 ? we : e;
1735
1709
  }
1736
1710
  function systemTimeZoneIdentifier() {
1737
- return Ct && Yt + Ct > Date.now() && $t ? $t : (Yt = Date.now(), $t = new Ft().resolvedOptions().timeZone);
1711
+ return $t && Ct + $t > Date.now() && jt ? jt : (Ct = Date.now(), jt = new Ft().resolvedOptions().timeZone);
1738
1712
  }
1739
1713
  function setSystemTimeZoneIdCacheTtl(e) {
1740
- Ct = e, e || ($t = void 0, Yt = -Infinity);
1714
+ $t = e, e || (jt = void 0, Ct = -Infinity);
1741
1715
  }
1742
1716
  function systemUtcEpochNanoseconds() {
1743
1717
  return createEpochNanosecondsFromEpochMilliseconds(Date.now());
@@ -1745,7 +1719,7 @@ function systemUtcEpochNanoseconds() {
1745
1719
  function systemDateTime(e = systemTimeZoneIdentifier()) {
1746
1720
  return getIsoDateTimeForZonedDateTimeSlot(createZonedDateTimeSlot(systemUtcEpochNanoseconds(), toTemporalTimeZoneIdentifier(e), "iso8601"));
1747
1721
  }
1748
- const e = 1e6, t = 6e10, o = 36e11, n = 86400, r = 864e5, a = 864e8, i = 864e11, l = 146097, c = Symbol(), s = Symbol(), d = Symbol(), m = Symbol(), T = Symbol(), u = Symbol(), D = Symbol(), p = "constrain", h = "reject", g = "compatible", f = "later", I = "prefer", O = "reject", S = Symbol(), F = Symbol(), w = Symbol(), v = "ceil", y = "floor", E = "expand", P = "trunc", b = "halfCeil", R = "halfFloor", Z = "halfExpand", N = "halfTrunc", M = "halfEven", U = "auto", j = "always", $ = "never", C = "critical", Y = "auto", A = "never", W = "auto", z = "never", V = "critical", k = 0, H = 1, x = 2, L = 3, B = 4, q = 5, J = 6, G = 9, _ = 0, K = 1, X = 2, Q = 3, ee = 4, te = 5, oe = 6, ne = 7, re = 8, ae = 9, ie = [
1722
+ const e = 1e6, t = 6e10, o = 36e11, n = 86400, r = 864e5, a = 864e8, i = 864e11, l = 146097, c = Symbol(), s = Symbol(), d = Symbol(), m = Symbol(), T = Symbol(), u = Symbol(), D = Symbol(), p = "constrain", h = "reject", g = "compatible", f = "later", I = "prefer", O = "reject", S = Symbol(), F = Symbol(), w = Symbol(), v = "ceil", y = "floor", E = "expand", P = "trunc", R = "halfCeil", b = "halfFloor", Z = "halfExpand", N = "halfTrunc", M = "halfEven", U = "auto", j = "always", $ = "never", C = "critical", Y = "auto", A = "never", W = "auto", z = "never", V = "critical", k = 0, H = 1, x = 2, L = 3, B = 4, q = 5, J = 6, G = 9, _ = 0, K = 1, X = 2, Q = 3, ee = 4, te = 5, oe = 6, ne = 7, re = 8, ae = 9, ie = [
1749
1723
  "year",
1750
1724
  "month",
1751
1725
  "week",
@@ -1931,7 +1905,7 @@ var Pe = class {
1931
1905
  ], W))(o);
1932
1906
  validateTemporalUnitValue(l, s), l === B && throwRangeError(invalidField("smallestUnit"));
1933
1907
  const d = toSecondsStringPrecisionRecord(l, r);
1934
- return temporalZonedDateTimeToString(t, d.ye, n, c, a, d.Ee, d.ve, i);
1908
+ return temporalZonedDateTimeToString(t, d.ve, n, c, a, d.Ee, d.ye, i);
1935
1909
  }
1936
1910
  toLocaleString(e = void 0, t = void 0) {
1937
1911
  const o = getInternalSlotOrThrowForZonedDateTime(this), n = createDateTimeFormat(e, t, d, o.Z), r = getInternalSlotOrThrowForDateTimeFormat(n);
@@ -1973,7 +1947,7 @@ var Pe = class {
1973
1947
  }
1974
1948
  };
1975
1949
  defineStringTag(Pe.prototype, "Temporal.ZonedDateTime"), renameFunction(Pe, "ZonedDateTime");
1976
- const be = createNullPrototypeObject({}), Re = createNullPrototypeObject({}), Ze = /* @__PURE__ */ new WeakMap();
1950
+ const Re = createNullPrototypeObject(), be = createNullPrototypeObject(), Ze = /* @__PURE__ */ new WeakMap();
1977
1951
  var Ne = class {
1978
1952
  constructor(e, t, o, n = 0, r = 0, a = 0, i = 0, l = 0, c = 0, s = "iso8601") {
1979
1953
  const d = [
@@ -2127,7 +2101,7 @@ var Ne = class {
2127
2101
  const t = getInternalSlotOrThrowForPlainDateTime(this), o = getOptionsObject(e), n = getTemporalShowCalendarNameOption(o), r = getTemporalFractionalSecondDigitsOption(o), a = getRoundingModeOption(o, P), i = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
2128
2102
  validateTemporalUnitValue(i, s), i === B && throwRangeError(invalidField("smallestUnit"));
2129
2103
  const l = toSecondsStringPrecisionRecord(i, r);
2130
- return isoDateTimeToString(validateIsoDateTime(roundIsoDateTime(t._, l.Ee, l.ve, a)), t.U, l.ye, n);
2104
+ return isoDateTimeToString(validateIsoDateTime(roundIsoDateTime(t._, l.Ee, l.ye, a)), t.U, l.ve, n);
2131
2105
  }
2132
2106
  toLocaleString(e = void 0, t = void 0) {
2133
2107
  return getInternalSlotOrThrowForPlainDateTime(this), formatDateTime(createDateTimeFormat(e, t, d), this);
@@ -2223,7 +2197,7 @@ var Ue = class {
2223
2197
  const t = getInternalSlotOrThrowForPlainTime(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, P), a = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
2224
2198
  validateTemporalUnitValue(a, s), a === B && throwRangeError(invalidField("smallestUnit"));
2225
2199
  const i = toSecondsStringPrecisionRecord(a, n);
2226
- return timeRecordToString(roundTime(t, i.Ee, i.ve, r), i.ye);
2200
+ return timeRecordToString(roundTime(t, i.Ee, i.ye, r), i.ve);
2227
2201
  }
2228
2202
  toLocaleString(e = void 0, t = void 0) {
2229
2203
  return getInternalSlotOrThrowForPlainTime(this), formatDateTime(createDateTimeFormat(e, t, s), this);
@@ -2618,7 +2592,7 @@ var It = class {
2618
2592
  if (n.every((e, t) => r[t] === e)) return 0;
2619
2593
  const i = defaultTemporalLargestUnit(n), l = defaultTemporalLargestUnit(r), c = toInternalDurationRecord(n), s = toInternalDurationRecord(r);
2620
2594
  let d, m;
2621
- return a.Pe && (isDateUnit(i) || isDateUnit(l)) ? compareEpochNanoseconds(addZonedDateTime(a.Pe, c, p), addZonedDateTime(a.Pe, s, p)) : (isCalendarUnit(i) || isCalendarUnit(l) ? (a.be || throwRangeError(missingField("relativeTo")), d = dateDurationDays(c.W, a.be), m = dateDurationDays(s.W, a.be)) : (d = n[Q], m = r[Q]), ye(add24HourDaysToTimeDuration(c.p, d), add24HourDaysToTimeDuration(s.p, m)));
2595
+ return a.Pe && (isDateUnit(i) || isDateUnit(l)) ? compareEpochNanoseconds(addZonedDateTime(a.Pe, c, p), addZonedDateTime(a.Pe, s, p)) : (isCalendarUnit(i) || isCalendarUnit(l) ? (a.Re || throwRangeError(missingField("relativeTo")), d = dateDurationDays(c.W, a.Re), m = dateDurationDays(s.W, a.Re)) : (d = n[Q], m = r[Q]), ye(add24HourDaysToTimeDuration(c.p, d), add24HourDaysToTimeDuration(s.p, m)));
2622
2596
  }
2623
2597
  get years() {
2624
2598
  return getInternalSlotOrThrowForDuration(this)[_];
@@ -2682,9 +2656,9 @@ var It = class {
2682
2656
  l ??= G;
2683
2657
  const s = defaultTemporalLargestUnit(t), m = largerOfTwoTemporalUnits(s, l), T = void 0 !== n;
2684
2658
  if (void 0 !== n && "auto" !== n || (n = m), (!c && !T || n > l) && throwRangeError(he), isDateUnit(l) || validateTemporalRoundingIncrement(a, maximumTemporalDurationRoundingIncrement(l), !1), a > 1 && n !== l && isDateUnit(l) && throwRangeError(he), r.Pe) return createTemporalDuration(temporalDurationFromInternal(differenceZonedDateTimeWithRounding(r.Pe, createZonedDateTimeSlot(addZonedDateTime(r.Pe, toInternalDurationRecord(t), p), r.Pe.Z, r.Pe.U), n, a, l, i), isDateUnit(n) ? B : n));
2685
- if (r.be) {
2659
+ if (r.Re) {
2686
2660
  const e = toInternalDurationRecordWith24HourDays(t), o = addTime(midnightTimeRecord(), e.p);
2687
- return createTemporalDuration(temporalDurationFromInternal(differencePlainDateTimeWithRounding(combineIsoDateAndTimeRecord(r.be.o, midnightTimeRecord()), combineIsoDateAndTimeRecord(calendarDateAdd(r.be.U, r.be.o, adjustDateDurationRecord(e.W, o.K), p), o), r.be.U, n, a, l, i), n));
2661
+ return createTemporalDuration(temporalDurationFromInternal(differencePlainDateTimeWithRounding(combineIsoDateAndTimeRecord(r.Re.o, midnightTimeRecord()), combineIsoDateAndTimeRecord(calendarDateAdd(r.Re.U, r.Re.o, adjustDateDurationRecord(e.W, o.K), p), o), r.Re.U, n, a, l, i), n));
2688
2662
  }
2689
2663
  (isCalendarUnit(s) || isCalendarUnit(n)) && throwRangeError(missingField("relativeTo"));
2690
2664
  const u = toInternalDurationRecordWith24HourDays(t);
@@ -2695,9 +2669,9 @@ var It = class {
2695
2669
  void 0 === e && throwTypeError(Se);
2696
2670
  const o = "string" == typeof e ? createNullPrototypeObject({ unit: e }) : getOptionsObject(e), n = getTemporalRelativeToOption(o), r = getTemporalUnitValuedOption(o, "unit", u);
2697
2671
  if (validateTemporalUnitValue(r, d), n.Pe) return ((e, t, o) => isDateUnit(o) ? totalRelativeDuration(differenceZonedDateTime(e, t, o), e.Y, t.Y, getIsoDateTimeForZonedDateTimeSlot(e), e.Z, e.U, o) : totalTimeDuration(timeDurationFromEpochNanosecondsDifference(t.Y, e.Y), o))(n.Pe, createZonedDateTimeSlot(addZonedDateTime(n.Pe, toInternalDurationRecord(t), p), n.Pe.Z, n.Pe.U), r);
2698
- if (n.be) {
2672
+ if (n.Re) {
2699
2673
  const e = toInternalDurationRecordWith24HourDays(t), o = addTime(midnightTimeRecord(), e.p);
2700
- return ((e, t, o, n) => compareIsoDateTime(e, t) ? (validateIsoDateTime(e), validateIsoDateTime(t), totalRelativeDuration(differenceISODateTime(e, t, o, n), getUtcEpochNanoseconds(e), getUtcEpochNanoseconds(t), e, void 0, 0, n)) : 0)(combineIsoDateAndTimeRecord(n.be.o, midnightTimeRecord()), combineIsoDateAndTimeRecord(calendarDateAdd(n.be.U, n.be.o, adjustDateDurationRecord(e.W, o.K), p), o), n.be.U, r);
2674
+ return ((e, t, o, n) => compareIsoDateTime(e, t) ? (validateIsoDateTime(e), validateIsoDateTime(t), totalRelativeDuration(differenceISODateTime(e, t, o, n), getUtcEpochNanoseconds(e), getUtcEpochNanoseconds(t), e, void 0, 0, n)) : 0)(combineIsoDateAndTimeRecord(n.Re.o, midnightTimeRecord()), combineIsoDateAndTimeRecord(calendarDateAdd(n.Re.U, n.Re.o, adjustDateDurationRecord(e.W, o.K), p), o), n.Re.U, r);
2701
2675
  }
2702
2676
  return (isCalendarUnit(defaultTemporalLargestUnit(t)) || isCalendarUnit(r)) && throwRangeError(missingField("relativeTo")), totalTimeDuration(toInternalDurationRecordWith24HourDays(t).p, r);
2703
2677
  }
@@ -2705,15 +2679,15 @@ var It = class {
2705
2679
  const t = getInternalSlotOrThrowForDuration(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, P), a = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
2706
2680
  validateTemporalUnitValue(a, s), a !== B && a !== q || throwRangeError(disallowedUnit(a));
2707
2681
  const i = toSecondsStringPrecisionRecord(a, n);
2708
- if (i.ve === G && 1 === i.Ee) return temporalDurationToString(t, i.ye);
2682
+ if (i.ye === G && 1 === i.Ee) return temporalDurationToString(t, i.ve);
2709
2683
  const l = toInternalDurationRecord(t);
2710
- return temporalDurationToString(temporalDurationFromInternal(combineDateAndTimeDuration(l.W, roundTimeDuration(l.p, i.Ee, i.ve, r)), largerOfTwoTemporalUnits(defaultTemporalLargestUnit(t), J)), i.ye);
2684
+ return temporalDurationToString(temporalDurationFromInternal(combineDateAndTimeDuration(l.W, roundTimeDuration(l.p, i.Ee, i.ye, r)), largerOfTwoTemporalUnits(defaultTemporalLargestUnit(t), J)), i.ve);
2711
2685
  }
2712
2686
  toJSON() {
2713
2687
  return temporalDurationToString(getInternalSlotOrThrowForDuration(this));
2714
2688
  }
2715
2689
  toLocaleString(e = void 0, t = void 0) {
2716
- const o = getInternalSlotOrThrowForDuration(this), n = createNullPrototypeObject({});
2690
+ const o = getInternalSlotOrThrowForDuration(this), n = createNullPrototypeObject();
2717
2691
  return le.map((e, t) => {
2718
2692
  n[e] = o[t];
2719
2693
  }), new Intl.DurationFormat(e, t).format(n);
@@ -2728,8 +2702,8 @@ const Ot = {
2728
2702
  [y]: Math.floor,
2729
2703
  [E]: roundExpand,
2730
2704
  [P]: Math.trunc,
2731
- [b]: roundHalfCeil,
2732
- [R]: roundHalfFloor,
2705
+ [R]: roundHalfCeil,
2706
+ [b]: roundHalfFloor,
2733
2707
  [Z]: (e) => (isIntegerAndHalf(e) ? roundExpand(e) : Math.round(e)) + 0,
2734
2708
  [N]: (e) => (isIntegerAndHalf(e) ? Math.trunc(e) : Math.round(e)) + 0,
2735
2709
  [M]: roundHalfEven
@@ -2738,22 +2712,18 @@ const Ot = {
2738
2712
  [y]: Math.floor,
2739
2713
  [E]: Math.ceil,
2740
2714
  [P]: Math.floor,
2741
- [b]: roundHalfCeil,
2742
- [R]: roundHalfFloor,
2715
+ [R]: roundHalfCeil,
2716
+ [b]: roundHalfFloor,
2743
2717
  [Z]: roundHalfCeil,
2744
2718
  [N]: roundHalfFloor,
2745
2719
  [M]: roundHalfEven
2746
- }, Ft = globalThis.Intl.DateTimeFormat, wt = [];
2747
- new Ft(void 0, new Proxy({}, { get(e, t) {
2748
- wt.push(t);
2749
- } }));
2750
- const vt = /* @__PURE__ */ new WeakMap(), yt = [
2720
+ }, Ft = globalThis.Intl.DateTimeFormat, wt = /* @__PURE__ */ new WeakMap(), vt = [
2751
2721
  "year",
2752
2722
  "month",
2753
2723
  "day",
2754
2724
  "weekday",
2755
2725
  "dateStyle"
2756
- ], Et = [
2726
+ ], yt = [
2757
2727
  "hour",
2758
2728
  "minute",
2759
2729
  "second",
@@ -2761,16 +2731,16 @@ const vt = /* @__PURE__ */ new WeakMap(), yt = [
2761
2731
  "dayPeriod",
2762
2732
  "timeStyle"
2763
2733
  ];
2764
- var Pt = class {
2734
+ var Et = class {
2765
2735
  Ae(e) {
2766
2736
  return formatDateTime(this, e);
2767
2737
  }
2768
- }, bt = class {
2738
+ }, Pt = class {
2769
2739
  constructor(e, t) {
2770
2740
  createDateTimeFormat(e, t, d, void 0, this);
2771
2741
  }
2772
2742
  get format() {
2773
- return Object.defineProperty(getInternalSlotOrThrowForDateTimeFormat(this).We ||= Pt.prototype.Ae.bind(this), "name", { value: "" });
2743
+ return Object.defineProperty(getInternalSlotOrThrowForDateTimeFormat(this).We ||= Et.prototype.Ae.bind(this), "name", { value: "" });
2774
2744
  }
2775
2745
  formatToParts(e) {
2776
2746
  return ((e, t) => {
@@ -2795,13 +2765,13 @@ var Pt = class {
2795
2765
  })(this, toDateTimeFormattable(e), toDateTimeFormattable(t));
2796
2766
  }
2797
2767
  resolvedOptions() {
2798
- return getInternalSlotOrThrowForDateTimeFormat(this).Re.resolvedOptions();
2768
+ return getInternalSlotOrThrowForDateTimeFormat(this).be.resolvedOptions();
2799
2769
  }
2800
2770
  };
2801
2771
  const Rt = Object.getOwnPropertyDescriptors(Intl.DateTimeFormat);
2802
- Rt.prototype.value = bt.prototype, Object.defineProperties(DateTimeFormat, Rt), DateTimeFormat.prototype.constructor = DateTimeFormat, defineStringTag(DateTimeFormat.prototype, "Intl.DateTimeFormat");
2803
- const Zt = /* @__PURE__ */ new WeakMap();
2804
- var Nt = class {
2772
+ Rt.prototype.value = Pt.prototype, Object.defineProperties(DateTimeFormat, Rt), DateTimeFormat.prototype.constructor = DateTimeFormat, defineStringTag(DateTimeFormat.prototype, "Intl.DateTimeFormat");
2773
+ const bt = /* @__PURE__ */ new WeakMap();
2774
+ var Zt = class {
2805
2775
  constructor(e) {
2806
2776
  createTemporalInstant(validateEpochNanoseconds(createEpochNanosecondsFromBigInt(toBigInt(e))), this);
2807
2777
  }
@@ -2846,7 +2816,7 @@ var Nt = class {
2846
2816
  const t = getInternalSlotOrThrowForInstant(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, P), a = getTemporalUnitValuedOption(o, "smallestUnit", void 0), i = o.timeZone;
2847
2817
  validateTemporalUnitValue(a, s), a === B && throwRangeError(invalidField("smallestUnit"));
2848
2818
  const l = mapUnlessUndefined(i, toTemporalTimeZoneIdentifier), c = toSecondsStringPrecisionRecord(a, n);
2849
- return temporalInstantToString(roundTemporalInstant(t.Y, c.Ee, c.ve, r), l, c.ye);
2819
+ return temporalInstantToString(roundTemporalInstant(t.Y, c.Ee, c.ye, r), l, c.ve);
2850
2820
  }
2851
2821
  toLocaleString(e = void 0, t = void 0) {
2852
2822
  return getInternalSlotOrThrowForInstant(this), formatDateTime(createDateTimeFormat(e, t, d), this);
@@ -2861,18 +2831,18 @@ var Nt = class {
2861
2831
  return createTemporalZonedDateTime(getInternalSlotOrThrowForInstant(this).Y, toTemporalTimeZoneIdentifier(e), "iso8601");
2862
2832
  }
2863
2833
  };
2864
- defineStringTag(Nt.prototype, "Temporal.Instant"), renameFunction(Nt, "Instant");
2865
- const Mt = class {
2834
+ defineStringTag(Zt.prototype, "Temporal.Instant"), renameFunction(Zt, "Instant");
2835
+ const Nt = class {
2866
2836
  toTemporalInstant() {
2867
2837
  const e = Date.prototype.valueOf.call(this);
2868
2838
  return isNaN(e) && throwRangeError("invalid date"), createTemporalInstant(createEpochNanosecondsFromEpochMilliseconds(e));
2869
2839
  }
2870
- }.prototype.toTemporalInstant, Ut = Object.getOwnPropertyDescriptors(globalThis.Intl);
2871
- Ut.DateTimeFormat.value = DateTimeFormat;
2872
- const jt = {};
2873
- Object.defineProperties(jt, Ut);
2874
- let $t, Ct = 0, Yt = -Infinity;
2875
- const At = {
2840
+ }.prototype.toTemporalInstant, Mt = Object.getOwnPropertyDescriptors(globalThis.Intl);
2841
+ Mt.DateTimeFormat.value = DateTimeFormat;
2842
+ const Ut = {};
2843
+ Object.defineProperties(Ut, Mt);
2844
+ let jt, $t = 0, Ct = -Infinity;
2845
+ const Yt = {
2876
2846
  timeZoneId: () => systemTimeZoneIdentifier(),
2877
2847
  instant: () => createTemporalInstant(systemUtcEpochNanoseconds()),
2878
2848
  plainDateTimeISO: (e = void 0) => createTemporalDateTime(systemDateTime(e), "iso8601"),
@@ -2880,9 +2850,9 @@ const At = {
2880
2850
  plainDateISO: (e = void 0) => createTemporalDate(systemDateTime(e).o, "iso8601"),
2881
2851
  plainTimeISO: (e = void 0) => createTemporalTime(systemDateTime(e).p)
2882
2852
  };
2883
- defineStringTag(At, "Temporal.Now"), makePropertiesNonEnumerable(At);
2884
- const Wt = {
2885
- Instant: Nt,
2853
+ defineStringTag(Yt, "Temporal.Now"), makePropertiesNonEnumerable(Yt);
2854
+ const At = {
2855
+ Instant: Zt,
2886
2856
  PlainDateTime: Ne,
2887
2857
  PlainDate: ut,
2888
2858
  PlainTime: Ue,
@@ -2890,7 +2860,7 @@ const Wt = {
2890
2860
  PlainMonthDay: st,
2891
2861
  Duration: It,
2892
2862
  ZonedDateTime: Pe,
2893
- Now: At
2863
+ Now: Yt
2894
2864
  };
2895
- defineStringTag(Wt, "Temporal"), makePropertiesNonEnumerable(Wt);
2896
- export { defineNonEnumerableProperty as a, Mt as i, setSystemTimeZoneIdCacheTtl as n, jt as r, Wt as t };
2865
+ defineStringTag(At, "Temporal"), makePropertiesNonEnumerable(At);
2866
+ export { defineNonEnumerableProperty as a, Nt as i, setSystemTimeZoneIdCacheTtl as n, Ut as r, At as t };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "temporal-polyfill-lite",
4
- "version": "0.3.4",
4
+ "version": "0.3.5",
5
5
  "description": "Lightweight Temporal polyfill",
6
6
  "keywords": [
7
7
  "Temporal"