@formatjs/temporal 1.0.0 → 1.1.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 +1 @@
1
- {"version":3,"file":"polyfill-force.js","names":["Constructor","parts","day","limit","ranges","ranges","chinese","dangi","Constructor","dayMilliseconds","limit","years","fields","monthStarts","Constructor","nativeParts","NumberConstructor","numberFormat","dayMilliseconds","fields","NumberConstructor","numberFormat","limit","cycle","clipped","NumberConstructor","numberFormat","Decimal","readers","temporal","Decimal"],"sources":["sources/packages/ecma262-abstract/ToString.js","sources/packages/temporal/native.ts","sources/packages/ecma262-abstract/DateOperations.js","sources/packages/temporal/host-timezone.ts","sources/node_modules/@formatjs_generated/datetimeformat.calendars/fallback-eras.js","sources/packages/temporal/lunisolar.ts","sources/node_modules/@formatjs_generated/icu.calendar/host-chinese.js","sources/node_modules/@formatjs_generated/icu.calendar/host-dangi.js","sources/packages/temporal/host-calendar-data.ts","sources/packages/temporal/host-calendar.ts","sources/packages/temporal/calendar-table.ts","sources/packages/temporal/calendar.ts","sources/packages/temporal/legacy-lunisolar-date.ts","sources/packages/temporal/legacy-calendar-date.ts","sources/packages/temporal/legacy-extended-date.ts","sources/packages/temporal/legacy-zoned-date.ts","sources/packages/temporal/locale.ts","sources/packages/temporal/date-bridge.ts","sources/packages/temporal/detect.ts","sources/node_modules/@formatjs/bigdecimal/index.js","sources/packages/ecma262-abstract/ToNumber.js","sources/packages/ecma402-abstract/DateTimeFormat/TemporalDateTime.js","sources/packages/ecma262-abstract/TimeClip.js","sources/packages/ecma402-abstract/DateTimeFormat/HandleDateTimeValue.js","sources/packages/temporal/legacy-intl.ts","sources/packages/ecma402-abstract/DurationFormat/constants.js","sources/packages/ecma402-abstract/DurationFormat/DurationRecordSign.js","sources/packages/ecma402-abstract/DurationFormat/IsValidDurationRecord.js","sources/node_modules/@formatjs/fast-memoize/index.js","sources/packages/ecma402-abstract/utils.js","sources/packages/ecma402-abstract/DurationFormat/ToIntegerIfIntegral.js","sources/packages/ecma402-abstract/DurationFormat/ToDurationRecord.js","sources/packages/ecma402-abstract/DurationFormat/ToTemporalDurationRecord.js","sources/packages/temporal/legacy-durationformat.ts","sources/packages/temporal/install.ts","sources/packages/temporal/polyfill-force.ts"],"sourcesContent":["/**\n* https://tc39.es/ecma262/#sec-tostring\n*/\nexport function ToString(o) {\n\tif (typeof o === \"symbol\") {\n\t\tthrow TypeError(\"Cannot convert a Symbol value to a string\");\n\t}\n\treturn String(o);\n}\n","import type {\n DateSlot,\n DateTimeSlot,\n ZonedSlot,\n} from '#packages/temporal/plain-slots.js'\nimport type {RelativeTo} from '#packages/temporal/relative-duration.js'\nimport type {\n CalendarId,\n CalendarFields,\n CalendarDate,\n DateDuration,\n Overflow,\n} from '#packages/temporal/calendar.js'\nimport type {ISODateTime, Disambiguation} from '#packages/temporal/kernel.js'\nimport type {\n Precision,\n RoundingMode,\n TimeUnit,\n} from '#packages/temporal/rounding.js'\nimport type {DurationFields} from '#packages/temporal/duration-core.js'\n\nexport type NativeQuery = (request: string) => string | number\nconst parse = JSON.parse\nconst stringify = JSON.stringify\nconst create = Object.create\nconst keys = Object.keys\nconst indexOf = String.prototype.indexOf\nconst apply = Reflect.apply\nconst bigintText = BigInt.prototype.toString\nconst ToBigInt = BigInt\nconst BadRange = RangeError\nexport interface NativeTemporal {\n addPlainYearMonth(\n slot: DateSlot,\n fields: DurationFields,\n subtract: boolean,\n overflow: Overflow\n ): number\n differencePlainYearMonth(\n start: DateSlot,\n end: DateSlot,\n largest: string,\n smallest: string,\n increment: number,\n mode: RoundingMode,\n since: boolean\n ): DurationFields\n yearMonthToDate(slot: DateSlot, day: number): number\n monthDayToDate(slot: DateSlot, year: number): number\n formatPlainDate(slot: DateSlot, calendarName: string): string\n formatPlainDateTime(\n value: bigint,\n calendar: string,\n precision: Precision,\n mode: RoundingMode,\n calendarName: string\n ): string\n formatPlainYearMonth(slot: DateSlot, calendarName: string): string\n formatPlainMonthDay(slot: DateSlot, calendarName: string): string\n formatZonedDateTime(\n slot: ZonedSlot,\n precision: Precision,\n mode: RoundingMode,\n calendarName: string,\n offset: boolean,\n timeZoneName: string\n ): string\n parsePlainDate(value: string): DateSlot\n parsePlainDateTime(value: string): DateTimeSlot\n parsePlainYearMonth(value: string): DateSlot\n parsePlainMonthDay(value: string): DateSlot\n parseZonedFields(value: string): {\n fields: Required<ISODateTime> & {calendar: string}\n timeZone: string\n offset: string | undefined\n }\n resolveZonedDateTime(\n value: bigint,\n identifier: string,\n calendar: string,\n offset: string | undefined,\n behavior: string,\n disambiguation: Disambiguation,\n matchMinute: boolean,\n dateOnly: boolean\n ): bigint\n addZonedDateTime(\n slot: ZonedSlot,\n fields: DurationFields,\n subtract: boolean,\n overflow: Overflow\n ): bigint\n differenceZonedDateTime(\n start: ZonedSlot,\n end: ZonedSlot,\n largest: string,\n smallest: string,\n increment: number,\n mode: RoundingMode,\n since: boolean\n ): DurationFields\n roundZonedDateTime(\n slot: ZonedSlot,\n unit: string,\n increment: number,\n mode: RoundingMode\n ): bigint\n startOfZonedDay(slot: ZonedSlot, day?: number): bigint\n hoursInZonedDay(slot: ZonedSlot): number\n addPlainDate(\n epochDay: number,\n calendar: string,\n fields: DurationFields,\n subtract: boolean,\n overflow: Overflow\n ): number\n addPlainDateTime(\n value: bigint,\n calendar: string,\n fields: DurationFields,\n subtract: boolean,\n overflow: Overflow\n ): bigint\n differencePlainDate(\n start: number,\n end: number,\n calendar: string,\n largest: string,\n smallest: string,\n increment: number,\n mode: RoundingMode,\n since: boolean\n ): DurationFields\n differencePlainDateTime(\n start: bigint,\n end: bigint,\n calendar: string,\n largest: string,\n smallest: string,\n increment: number,\n mode: RoundingMode,\n since: boolean\n ): DurationFields\n roundPlainDateTime(\n value: bigint,\n calendar: string,\n unit: string,\n increment: number,\n mode: RoundingMode\n ): bigint\n transformDuration(fields: DurationFields, absolute: boolean): DurationFields\n parseDuration(value: string): DurationFields\n validateDuration(fields: DurationFields): void\n formatDuration(\n fields: DurationFields,\n precision: number | 'auto',\n mode: RoundingMode\n ): string\n addDuration(\n one: DurationFields,\n two: DurationFields,\n subtract: boolean\n ): DurationFields\n compareDuration(\n one: DurationFields,\n two: DurationFields,\n relative?: RelativeTo\n ): -1 | 0 | 1\n totalDuration(\n fields: DurationFields,\n unit: string,\n relative?: RelativeTo\n ): number\n roundDuration(\n fields: DurationFields,\n largest: string,\n smallest: string,\n increment: number,\n mode: RoundingMode,\n relative?: RelativeTo\n ): DurationFields\n timeZoneIdentity(identifier: string): {identifier: string; primary: string}\n timeZoneOffset(identifier: string, value: bigint): bigint\n timeZonePossibleInstants(identifier: string, fields: ISODateTime): bigint[]\n timeZoneResolve(\n identifier: string,\n fields: ISODateTime,\n disambiguation: Disambiguation\n ): bigint\n timeZoneTransition(\n identifier: string,\n value: bigint,\n direction: 'next' | 'previous'\n ): bigint | null\n calendarStartOfYear(calendar: CalendarId, year: number): number\n calendarMonthsInYear(calendar: CalendarId, year: number): number\n calendarDaysInMonth(calendar: CalendarId, year: number, month: number): number\n calendarToEpochDay(\n calendar: CalendarId,\n fields: CalendarFields,\n overflow: Overflow\n ): number\n calendarFromEpochDay(calendar: CalendarId, epoch: number): CalendarDate\n calendarAdd(\n calendar: CalendarId,\n fields: CalendarFields,\n duration: DateDuration,\n overflow: Overflow\n ): CalendarDate\n calendarUntil(\n calendar: CalendarId,\n one: number,\n two: number,\n largest: string\n ): DateDuration\n calendarMonthSerial(calendar: CalendarId, year: number, month: number): number\n calendarEra(\n calendar: CalendarId,\n epoch: number\n ): {era: string; eraYear: number} | undefined\n calendarYearFromEra(calendar: CalendarId, era: string, year: number): number\n isoToEpochNanoseconds(fields: ISODateTime): bigint\n epochNanosecondsToISO(value: bigint): Required<ISODateTime>\n addISODays(fields: ISODateTime, days: number): Required<ISODateTime>\n parsePlainTime(value: string): bigint\n regulatePlainTime(values: number[], constrain: boolean): bigint\n formatPlainTime(\n value: bigint,\n precision: Precision,\n mode: RoundingMode\n ): string\n addPlainTime(\n value: bigint,\n duration: DurationFields,\n subtract: boolean\n ): bigint\n roundPlainTime(\n value: bigint,\n unit: TimeUnit,\n increment: number,\n mode: RoundingMode\n ): bigint\n differencePlainTime(\n value: bigint,\n other: bigint,\n largest: TimeUnit,\n smallest: TimeUnit,\n increment: number,\n mode: RoundingMode\n ): DurationFields\n parseInstant(value: string): bigint\n formatInstant(value: bigint, precision: Precision, offset?: bigint): string\n addInstant(value: bigint, duration: DurationFields, subtract: boolean): bigint\n roundInstant(value: bigint, quantum: bigint, mode: RoundingMode): bigint\n differenceInstant(\n value: bigint,\n other: bigint,\n largest: TimeUnit,\n smallest: TimeUnit,\n increment: number,\n mode: RoundingMode\n ): DurationFields\n}\nlet native: NativeTemporal | undefined\nexport function nativeTemporal(): NativeTemporal | undefined {\n return native\n}\n/** @internal Experimental Hermes backend installation. */\nexport function configureNativeTemporal(query: NativeQuery): void {\n const text = (value: bigint) => apply(bigintText, value, [])\n function call(op: string, properties: Record<string, unknown>): any {\n const input = create(null)\n input.op = op\n const names = keys(properties)\n for (let index = 0; index < names.length; index++)\n input[names[index]] = properties[names[index]]\n const source = stringify(input)\n // Escaped code units violate Temporal's ASCII grammar; reject before UTF-8 decoding.\n if (\n apply(indexOf, op, ['parse']) === 0 &&\n apply(indexOf, source, ['\\\\u']) >= 0\n )\n throw new BadRange('Invalid Temporal string')\n const result = query(source)\n if (typeof result === 'number')\n throw new BadRange('Invalid Temporal value or range')\n return parse(result)\n }\n function isoFields(fields: ISODateTime): Record<string, number> {\n const copy = create(null)\n copy.year = fields.year\n copy.month = fields.month\n copy.day = fields.day\n copy.hour = fields.hour ?? 0\n copy.minute = fields.minute ?? 0\n copy.second = fields.second ?? 0\n copy.millisecond = fields.millisecond ?? 0\n copy.microsecond = fields.microsecond ?? 0\n copy.nanosecond = fields.nanosecond ?? 0\n return copy\n }\n function request(\n op: string,\n fields?: ISODateTime,\n value?: bigint,\n days?: number\n ): any {\n const record = create(null)\n record.op = op\n if (fields) {\n record.fields = isoFields(fields)\n }\n if (value !== undefined) record.nanoseconds = apply(bigintText, value, [])\n if (days !== undefined) record.days = days\n return call(op, record)\n }\n function addition(\n op: string,\n value: bigint,\n fields: DurationFields,\n subtract: boolean\n ): bigint {\n return ToBigInt(\n call(op, {\n nanoseconds: text(value),\n duration: durationFields(fields),\n subtract,\n })\n )\n }\n function durationFields(fields: DurationFields): Record<string, string> {\n const duration = create(null)\n const names = keys(fields)\n for (let index = 0; index < names.length; index++)\n duration[names[index]] = text(\n ToBigInt(fields[names[index] as keyof DurationFields])\n )\n return duration\n }\n function dateFields(value: CalendarFields): Record<string, unknown> {\n const fields = create(null)\n fields.year = value.year\n if (value.month !== undefined) fields.month = value.month\n if (value.monthCode !== undefined) fields.monthCode = value.monthCode\n fields.day = value.day\n return fields\n }\n function shortFields(slot: DateSlot): Record<string, unknown> {\n const result = create(null)\n result.epochDay = slot.epochDay\n result.calendar = slot.calendar\n return result\n }\n function zonedFields(slot: ZonedSlot): Record<string, unknown> {\n const result = create(null)\n result.nanoseconds = text(slot.epochNanoseconds)\n result.calendar = slot.calendar\n result.identifier = slot.timeZone\n return result\n }\n function relativeFields(\n relative?: RelativeTo\n ): Record<string, unknown> | undefined {\n if (!relative) return undefined\n if ('zoned' in relative) {\n const result = zonedFields(relative.zoned)\n result.kind = 'zoned'\n return result\n }\n const result = create(null)\n result.kind = 'date'\n result.epochDay = relative.date.epochDay\n result.calendar = relative.date.calendar\n return result\n }\n native = {\n addPlainYearMonth: (slot, fields, subtract, overflow) =>\n call('addPlainYearMonth', {\n value: shortFields(slot),\n duration: durationFields(fields),\n subtract,\n overflow,\n }),\n differencePlainYearMonth: (\n start,\n end,\n largest,\n smallest,\n increment,\n mode,\n since\n ) =>\n call('differencePlainYearMonth', {\n value: shortFields(start),\n other: shortFields(end),\n largest,\n smallest,\n increment,\n mode,\n since,\n }),\n yearMonthToDate: (slot, day) =>\n call('yearMonthToDate', {value: shortFields(slot), day}),\n monthDayToDate: (slot, year) =>\n call('monthDayToDate', {value: shortFields(slot), year}),\n formatPlainDate: (slot, calendarName) =>\n call('formatPlainDate', {value: shortFields(slot), calendarName}),\n formatPlainDateTime: (value, calendar, precision, mode, calendarName) =>\n call('formatPlainDateTime', {\n nanoseconds: text(value),\n calendar,\n precision,\n mode,\n calendarName,\n }),\n formatPlainYearMonth: (slot, calendarName) =>\n call('formatPlainYearMonth', {value: shortFields(slot), calendarName}),\n formatPlainMonthDay: (slot, calendarName) =>\n call('formatPlainMonthDay', {value: shortFields(slot), calendarName}),\n formatZonedDateTime: (\n slot,\n precision,\n mode,\n calendarName,\n offset,\n timeZoneName\n ) =>\n call('formatZonedDateTime', {\n value: zonedFields(slot),\n precision,\n mode,\n calendarName,\n offset,\n timeZoneName,\n }),\n parsePlainDate: value => call('parsePlainDate', {text: value}),\n parsePlainDateTime: value => {\n const result = call('parsePlainDateTime', {text: value})\n return {\n epochNanoseconds: ToBigInt(result.epochNanoseconds),\n calendar: result.calendar,\n }\n },\n parsePlainYearMonth: value => call('parsePlainYearMonth', {text: value}),\n parsePlainMonthDay: value => call('parsePlainMonthDay', {text: value}),\n parseZonedFields: value => {\n const result = call('parseZonedFields', {text: value})\n return {\n fields: result.fields,\n timeZone: result.timeZone,\n offset: result.offset ?? undefined,\n }\n },\n resolveZonedDateTime: (\n value,\n identifier,\n calendar,\n offset,\n behavior,\n disambiguation,\n matchMinute,\n dateOnly\n ) =>\n ToBigInt(\n call('resolveZonedDateTime', {\n nanoseconds: text(value),\n identifier,\n calendar,\n offset,\n behavior,\n disambiguation,\n matchMinute,\n dateOnly,\n })\n ),\n addZonedDateTime: (slot, fields, subtract, overflow) =>\n ToBigInt(\n call('addZonedDateTime', {\n value: zonedFields(slot),\n duration: durationFields(fields),\n subtract,\n overflow,\n })\n ),\n differenceZonedDateTime: (\n start,\n end,\n largest,\n smallest,\n increment,\n mode,\n since\n ) =>\n call('differenceZonedDateTime', {\n value: zonedFields(start),\n other: zonedFields(end),\n largest,\n smallest,\n increment,\n mode,\n since,\n }),\n roundZonedDateTime: (slot, unit, increment, mode) =>\n ToBigInt(\n call('roundZonedDateTime', {\n value: zonedFields(slot),\n unit,\n increment,\n mode,\n })\n ),\n startOfZonedDay: (slot, day) =>\n ToBigInt(call('startOfZonedDay', {value: zonedFields(slot), day})),\n hoursInZonedDay: slot =>\n call('hoursInZonedDay', {value: zonedFields(slot)}),\n addPlainDate: (epochDay, calendar, fields, subtract, overflow) =>\n call('addPlainDate', {\n epochDay,\n calendar,\n duration: durationFields(fields),\n subtract,\n overflow,\n }),\n addPlainDateTime: (value, calendar, fields, subtract, overflow) =>\n ToBigInt(\n call('addPlainDateTime', {\n nanoseconds: text(value),\n calendar,\n duration: durationFields(fields),\n subtract,\n overflow,\n })\n ),\n differencePlainDate: (\n start,\n end,\n calendar,\n largest,\n smallest,\n increment,\n mode,\n since\n ) =>\n call('differencePlainDate', {\n epochDay: start,\n other: end,\n calendar,\n largest,\n smallest,\n increment,\n mode,\n since,\n }),\n differencePlainDateTime: (\n start,\n end,\n calendar,\n largest,\n smallest,\n increment,\n mode,\n since\n ) =>\n call('differencePlainDateTime', {\n nanoseconds: text(start),\n other: text(end),\n calendar,\n largest,\n smallest,\n increment,\n mode,\n since,\n }),\n roundPlainDateTime: (value, calendar, unit, increment, mode) =>\n ToBigInt(\n call('roundPlainDateTime', {\n nanoseconds: text(value),\n calendar,\n unit,\n increment,\n mode,\n })\n ),\n transformDuration: (fields, absolute) =>\n call('transformDuration', {duration: durationFields(fields), absolute}),\n parseDuration: value => call('parseDuration', {text: value}),\n validateDuration: fields => {\n call('validateDuration', {duration: durationFields(fields)})\n },\n formatDuration: (fields, precision, mode) =>\n call('formatDuration', {\n duration: durationFields(fields),\n precision,\n mode,\n }),\n addDuration: (one, two, subtract) =>\n call('addDuration', {\n duration: durationFields(one),\n other: durationFields(two),\n subtract,\n }),\n compareDuration: (one, two, relative) =>\n call('compareDuration', {\n duration: durationFields(one),\n other: durationFields(two),\n relative: relativeFields(relative),\n }),\n totalDuration: (fields, unit, relative) =>\n call('totalDuration', {\n duration: durationFields(fields),\n unit,\n relative: relativeFields(relative),\n }),\n roundDuration: (fields, largest, smallest, increment, mode, relative) =>\n call('roundDuration', {\n duration: durationFields(fields),\n largest,\n smallest,\n increment,\n mode,\n relative: relativeFields(relative),\n }),\n timeZoneIdentity: identifier => call('timeZoneIdentity', {identifier}),\n timeZoneOffset: (identifier, value) =>\n ToBigInt(call('timeZoneOffset', {identifier, nanoseconds: text(value)})),\n timeZonePossibleInstants: (identifier, fields) => {\n const values = call('timeZonePossibleInstants', {\n identifier,\n fields: isoFields(fields),\n })\n const result: bigint[] = []\n for (let index = 0; index < values.length; index++)\n result.push(ToBigInt(values[index]))\n return result\n },\n timeZoneResolve: (identifier, fields, disambiguation) =>\n ToBigInt(\n call('timeZoneResolve', {\n identifier,\n fields: isoFields(fields),\n disambiguation,\n })\n ),\n timeZoneTransition: (identifier, value, direction) => {\n const result = call('timeZoneTransition', {\n identifier,\n nanoseconds: text(value),\n direction,\n })\n return result === null ? null : ToBigInt(result)\n },\n calendarStartOfYear: (calendar, year) =>\n call('calendarStartOfYear', {calendar, year}),\n calendarMonthsInYear: (calendar, year) =>\n call('calendarMonthsInYear', {calendar, year}),\n calendarDaysInMonth: (calendar, year, month) =>\n call('calendarDaysInMonth', {calendar, year, month}),\n calendarToEpochDay: (calendar, fields, overflow) =>\n call('calendarToEpochDay', {\n calendar,\n fields: dateFields(fields),\n overflow,\n }),\n calendarFromEpochDay: (calendar, epoch) =>\n call('calendarFromEpochDay', {calendar, epoch}),\n calendarAdd: (calendar, fields, values, overflow) => {\n const duration = create(null)\n duration.years = values.years ?? 0\n duration.months = values.months ?? 0\n duration.weeks = values.weeks ?? 0\n duration.days = values.days ?? 0\n return call('calendarAdd', {\n calendar,\n fields: dateFields(fields),\n duration,\n overflow,\n })\n },\n calendarUntil: (calendar, one, two, largest) =>\n call('calendarUntil', {calendar, one, two, largest}),\n calendarMonthSerial: (calendar, year, month) =>\n call('calendarMonthSerial', {calendar, year, month}),\n calendarEra: (calendar, epoch) =>\n call('calendarEra', {calendar, epoch}) ?? undefined,\n calendarYearFromEra: (calendar, era, year) =>\n call('calendarYearFromEra', {calendar, era, year}),\n isoToEpochNanoseconds: fields =>\n ToBigInt(request('isoToEpochNanoseconds', fields)),\n epochNanosecondsToISO: value =>\n request('epochNanosecondsToISO', undefined, value),\n addISODays: (fields, days) =>\n request('addISODays', fields, undefined, days),\n parsePlainTime: value => ToBigInt(call('parsePlainTime', {text: value})),\n regulatePlainTime: (values, constrain) => {\n const fields = create(null)\n fields.hour = values[0]\n fields.minute = values[1]\n fields.second = values[2]\n fields.millisecond = values[3]\n fields.microsecond = values[4]\n fields.nanosecond = values[5]\n return ToBigInt(call('regulatePlainTime', {fields, constrain}))\n },\n formatPlainTime: (value, precision, mode) =>\n call('formatPlainTime', {nanoseconds: text(value), precision, mode}),\n addPlainTime: (value, fields, subtract) =>\n addition('addPlainTime', value, fields, subtract),\n roundPlainTime: (value, unit, increment, mode) =>\n ToBigInt(\n call('roundPlainTime', {\n nanoseconds: text(value),\n unit,\n increment,\n mode,\n })\n ),\n differencePlainTime: (value, other, largest, smallest, increment, mode) =>\n call('differencePlainTime', {\n nanoseconds: text(value),\n other: text(other),\n largest,\n smallest,\n increment,\n mode,\n }),\n parseInstant: value => ToBigInt(call('parseInstant', {text: value})),\n formatInstant: (value, precision, offset) =>\n call('formatInstant', {\n nanoseconds: text(value),\n precision,\n offset: offset === undefined ? undefined : text(offset),\n }),\n addInstant: (value, fields, subtract) =>\n addition('addInstant', value, fields, subtract),\n roundInstant: (value, quantum, mode) =>\n ToBigInt(\n call('roundInstant', {\n nanoseconds: text(value),\n quantum: text(quantum),\n mode,\n })\n ),\n differenceInstant: (value, other, largest, smallest, increment, mode) =>\n call('differenceInstant', {\n nanoseconds: text(value),\n other: text(other),\n largest,\n smallest,\n increment,\n mode,\n }),\n }\n}\n","const MS_PER_DAY = 864e5;\nfunction mod(x, y) {\n\treturn x - Math.floor(x / y) * y;\n}\nexport function Day(t) {\n\treturn Math.floor(t / MS_PER_DAY);\n}\nexport function WeekDay(t) {\n\treturn mod(Day(t) + 4, 7);\n}\nexport function DayFromYear(y) {\n\t// ECMA-262 §21.4.1.5 DayFromYear, steps 2–6: count days arithmetically.\n\t// The first day of the minimum representable year lies outside Date's range.\n\t// https://tc39.es/ecma262/#sec-dayfromyear\n\t// https://github.com/tc39/ecma262/blob/b7865f0eed2021720f84d561289401bc414874d0/spec.html#L34143-L34147\n\treturn 365 * (y - 1970) + Math.floor((y - 1969) / 4) - Math.floor((y - 1901) / 100) + Math.floor((y - 1601) / 400);\n}\nexport function YearFromTime(t) {\n\t// ECMA-262 §21.4.1.7 YearFromTime, step 1: locate the enclosing year.\n\t// Local timezone adjustment may move an otherwise valid instant past Date's bounds.\n\t// https://tc39.es/ecma262/#sec-yearfromtime\n\t// https://github.com/tc39/ecma262/blob/b7865f0eed2021720f84d561289401bc414874d0/spec.html#L34177\n\tif (!Number.isFinite(t)) return NaN;\n\tconst day = Day(t);\n\tlet year = 1970 + Math.floor(day / 365.2425);\n\twhile (DayFromYear(year) > day) year--;\n\twhile (DayFromYear(year + 1) <= day) year++;\n\treturn year;\n}\nexport function DaysInYear(y) {\n\tif (y % 4 !== 0) return 365;\n\tif (y % 100 !== 0) return 366;\n\tif (y % 400 !== 0) return 365;\n\treturn 366;\n}\nexport function DayWithinYear(t) {\n\treturn Day(t) - DayFromYear(YearFromTime(t));\n}\nexport function InLeapYear(t) {\n\treturn DaysInYear(YearFromTime(t)) === 365 ? 0 : 1;\n}\nexport function MonthFromTime(t) {\n\tconst dwy = DayWithinYear(t);\n\tconst leap = InLeapYear(t);\n\tif (dwy >= 0 && dwy < 31) return 0;\n\tif (dwy < 59 + leap) return 1;\n\tif (dwy < 90 + leap) return 2;\n\tif (dwy < 120 + leap) return 3;\n\tif (dwy < 151 + leap) return 4;\n\tif (dwy < 181 + leap) return 5;\n\tif (dwy < 212 + leap) return 6;\n\tif (dwy < 243 + leap) return 7;\n\tif (dwy < 273 + leap) return 8;\n\tif (dwy < 304 + leap) return 9;\n\tif (dwy < 334 + leap) return 10;\n\tif (dwy < 365 + leap) return 11;\n\tthrow new Error(\"Invalid time\");\n}\nexport function DateFromTime(t) {\n\tconst dwy = DayWithinYear(t);\n\tconst mft = MonthFromTime(t);\n\tconst leap = InLeapYear(t);\n\tif (mft === 0) return dwy + 1;\n\tif (mft === 1) return dwy - 30;\n\tif (mft === 2) return dwy - 58 - leap;\n\tif (mft === 3) return dwy - 89 - leap;\n\tif (mft === 4) return dwy - 119 - leap;\n\tif (mft === 5) return dwy - 150 - leap;\n\tif (mft === 6) return dwy - 180 - leap;\n\tif (mft === 7) return dwy - 211 - leap;\n\tif (mft === 8) return dwy - 242 - leap;\n\tif (mft === 9) return dwy - 272 - leap;\n\tif (mft === 10) return dwy - 303 - leap;\n\tif (mft === 11) return dwy - 333 - leap;\n\tthrow new Error(\"Invalid time\");\n}\nconst HOURS_PER_DAY = 24;\nconst MINUTES_PER_HOUR = 60;\nconst SECONDS_PER_MINUTE = 60;\nconst MS_PER_SECOND = 1e3;\nconst MS_PER_MINUTE = MS_PER_SECOND * SECONDS_PER_MINUTE;\nconst MS_PER_HOUR = MS_PER_MINUTE * MINUTES_PER_HOUR;\nexport function HourFromTime(t) {\n\treturn mod(Math.floor(t / MS_PER_HOUR), HOURS_PER_DAY);\n}\nexport function MinFromTime(t) {\n\treturn mod(Math.floor(t / MS_PER_MINUTE), MINUTES_PER_HOUR);\n}\nexport function SecFromTime(t) {\n\treturn mod(Math.floor(t / MS_PER_SECOND), SECONDS_PER_MINUTE);\n}\nexport function msFromTime(t) {\n\treturn mod(t, MS_PER_SECOND);\n}\n","import {steps} from '@formatjs_generated/tz/temporal-names.js'\nimport links from '@formatjs_generated/tz/links.js'\nimport primary from '@formatjs_generated/tz/primary.js'\nimport {\n isoToEpochNanoseconds,\n type ISODateTime,\n type Disambiguation,\n type TimeZoneKernel,\n} from '#packages/temporal/kernel.js'\nimport {DateFromTime} from '#packages/ecma262-abstract/DateOperations.js'\n\nexport type HostTimeZone = Pick<\n TimeZoneKernel,\n 'offsetNanoseconds' | 'possibleInstants' | 'resolve'\n> &\n Partial<Pick<TimeZoneKernel, 'transition'>>\nconst Constructor = globalThis.Intl?.DateTimeFormat\nconst parts = Constructor?.prototype.formatToParts\nconst nowMilliseconds = Date.now\nconst second = 1000000000n\nconst day = 86400n * second\nconst limit = 100000000n * day\nfunction check(instant: bigint): bigint {\n if (instant < -limit || instant > limit)\n throw new RangeError('Instant out of range')\n return instant\n}\nconst clamp = (instant: bigint): bigint =>\n instant < -limit ? -limit : instant > limit ? limit : instant\n\nexport function createHostTimeZoneOffset(\n timeZone: string,\n intrinsics: {\n Constructor?: Intl.DateTimeFormatConstructor\n parts?: typeof Intl.DateTimeFormat.prototype.formatToParts\n } = {Constructor, parts}\n): HostTimeZone['offsetNanoseconds'] {\n const {Constructor, parts} = intrinsics\n if (!Constructor || !parts)\n throw new RangeError(\n 'Temporal requires Intl.DateTimeFormat timezone support'\n )\n const formatter = new Constructor(\n 'en-US-u-nu-latn',\n Object.assign(Object.create(null), {\n timeZone,\n calendar: 'iso8601',\n numberingSystem: 'latn',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: false,\n })\n )\n const offsets = new Map<number, bigint>()\n const offsetNanoseconds = (instant: bigint): bigint => {\n check(instant)\n const epochSecond =\n instant / second - (instant < 0n && instant % second !== 0n ? 1n : 0n),\n key = Number(epochSecond),\n cached = offsets.get(key)\n if (cached !== undefined) return cached\n let date = -1,\n hour = -1,\n minute = -1,\n seconds = -1\n const fields = parts.call(formatter, key * 1000)\n for (let index = 0; index < fields.length; index++) {\n const part = fields[index]\n if (part.type === 'day') date = Number(part.value)\n else if (part.type === 'hour') hour = Number(part.value)\n else if (part.type === 'minute') minute = Number(part.value)\n else if (part.type === 'second') seconds = Number(part.value)\n }\n if (\n !(\n date >= 1 &&\n date <= 31 &&\n hour >= 0 &&\n hour <= 24 &&\n minute >= 0 &&\n minute < 60 &&\n seconds >= 0 &&\n seconds < 60\n )\n )\n throw new RangeError('Unsupported host timezone fields')\n const utcDate = DateFromTime(key * 1000),\n nextDate = date === utcDate + 1 || (date === 1 && utcDate >= 28),\n previousDate = date === utcDate - 1 || (utcDate === 1 && date >= 28)\n if (date !== utcDate && !nextDate && !previousDate)\n throw new RangeError('Unsupported host timezone calendar')\n const difference = date === utcDate ? 0 : nextDate ? 1 : -1,\n utcSeconds = Number(((epochSecond % 86400n) + 86400n) % 86400n),\n offsetSeconds =\n difference * 86400 +\n (hour % 24) * 3600 +\n minute * 60 +\n seconds -\n utcSeconds\n if (Math.abs(offsetSeconds) >= 86400)\n throw new RangeError('Invalid host timezone offset')\n const offset = BigInt(offsetSeconds) * second\n if (offsets.size >= 64) offsets.delete(offsets.keys().next().value!)\n offsets.set(key, offset)\n return offset\n }\n return offsetNanoseconds\n}\n\nexport function createHostTimeZone(timeZone: string): TimeZoneKernel {\n const offsetNanoseconds = createHostTimeZoneOffset(timeZone)\n const sampleOffsets = (local: bigint): bigint[] => {\n const result: bigint[] = []\n const samples = [clamp(local - day), clamp(local), clamp(local + day)]\n for (let index = 0; index < samples.length; index++) {\n const offset = offsetNanoseconds(samples[index])\n if (!result.includes(offset)) result.push(offset)\n }\n return result\n }\n const candidatesFor = (local: bigint): bigint[] => {\n const candidates = sampleOffsets(local)\n .map(offset => local - offset)\n .filter(\n instant =>\n instant >= -limit &&\n instant <= limit &&\n instant + offsetNanoseconds(instant) === local\n )\n return candidates.sort((one, two) => (one < two ? -1 : one > two ? 1 : 0))\n }\n const possibleInstants = (fields: ISODateTime): bigint[] =>\n candidatesFor(isoToEpochNanoseconds(fields))\n const resolve = (\n fields: ISODateTime,\n disambiguation: Disambiguation = 'compatible'\n ): bigint => {\n if (!['compatible', 'earlier', 'later', 'reject'].includes(disambiguation))\n throw new RangeError('Invalid disambiguation')\n const local = isoToEpochNanoseconds(fields),\n candidates = candidatesFor(local)\n if (candidates.length === 1) return candidates[0]\n if (disambiguation === 'reject')\n throw new RangeError('Ambiguous or nonexistent local time')\n if (candidates.length)\n return candidates[disambiguation === 'later' ? candidates.length - 1 : 0]\n const before = offsetNanoseconds(clamp(local - day)),\n after = offsetNanoseconds(clamp(local + day))\n if (after <= before) throw new RangeError('No matching instant')\n return check(local - (disambiguation === 'earlier' ? after : before))\n }\n const canonical =\n (links as Record<string, string>)[timeZone] ??\n (primary as Record<string, string>)[timeZone] ??\n timeZone\n // Host tzdata can contain transitions absent from our generated metadata.\n const step = BigInt(\n Math.min(steps[timeZone] ?? steps[canonical] ?? 7 * 86400, 7 * 86400)\n )\n const transitions: {\n direction: string\n first: bigint\n last: bigint\n value: bigint | null\n }[] = []\n const unchanged: {first: bigint; last: bigint; offset: bigint}[] = []\n const transition = (\n instant: bigint,\n direction: 'next' | 'previous'\n ): bigint | null => {\n check(instant)\n const known = transitions.find(\n row =>\n row.direction === direction &&\n instant >= row.first &&\n instant <= row.last\n )\n if (known) return known.value\n const next = direction === 'next'\n const floorSecond = (value: bigint) =>\n value / second - (value < 0n && value % second ? 1n : 0n)\n const earliest = -5364662400n // IANA transitions begin after 1800.\n const horizon = 3n * 366n * 86400n\n const now = floorSecond(BigInt(nowMilliseconds()) * 1000000n)\n const original = floorSecond(next ? instant : instant - 1n)\n let cursor = next ? (original < earliest ? earliest : original) : original\n const end = next ? (original > now ? original : now) + horizon : earliest\n const boundary = next\n ? end > limit / second\n ? limit / second\n : end\n : earliest\n let value: bigint | null = null\n let initial = cursor\n while (next ? cursor < boundary : cursor > boundary) {\n const observed = unchanged.find(row =>\n next\n ? row.first <= cursor && cursor < row.last\n : row.first < cursor && cursor <= row.last\n )\n let probe = observed\n ? next\n ? observed.last\n : observed.first\n : cursor + (next ? step : -step)\n if (next ? probe > boundary : probe < boundary) probe = boundary\n const offset = offsetNanoseconds(cursor * second)\n if (offsetNanoseconds(probe * second) !== offset) {\n let left = next ? cursor : probe\n let right = next ? probe : cursor\n const before = offsetNanoseconds(left * second)\n while (right - left > 1n) {\n const middle = (left + right) >> 1n\n if (offsetNanoseconds(middle * second) === before) left = middle\n else right = middle\n }\n value = right * second\n break\n }\n let first = next ? cursor : probe\n let last = next ? probe : cursor\n for (let index = unchanged.length - 1; index >= 0; index--) {\n const row = unchanged[index]\n if (row.offset === offset && row.first <= last && first <= row.last) {\n if (row.first < first) first = row.first\n if (row.last > last) last = row.last\n unchanged.splice(index, 1)\n }\n }\n if (unchanged.length >= 64) unchanged.shift()\n unchanged.push({first, last, offset})\n cursor = probe\n // Future host rules repeat annually or settle at a fixed offset. Search\n // nearby years first, then resume the finite historical record.\n if (!next && initial > now + horizon && initial - cursor >= horizon) {\n cursor = now + horizon\n initial = cursor\n }\n }\n if (transitions.length >= 64) transitions.shift()\n transitions.push({\n direction,\n first: next ? instant : value === null ? -limit : value + 1n,\n last: next ? (value === null ? instant : value - 1n) : instant,\n value,\n })\n return value\n }\n return {offsetNanoseconds, possibleInstants, resolve, transition}\n}\n","export const beforeHijrah = {\n\t\"ady\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"af\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"agq\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ak\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"am\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ar\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"as\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"asa\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ast\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"az\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ba\": [\n\t\t\"Һижрәткә тиклем\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"bas\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"be\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"bem\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"bez\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"bg\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"bgc\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"bho\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"blo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"bm\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"bn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"bo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"br\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"brx\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"bs\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"bua\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ca\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ccp\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ce\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ceb\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"cgg\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"chr\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ckb\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"cop\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"cs\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"csw\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"cv\": [\n\t\t\"хиджрӑччен\",\n\t\t\"х-ч.\",\n\t\t\"х-ч.\"\n\t],\n\t\"cy\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"da\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"dav\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"de\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"dje\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"doi\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"dsb\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"dua\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"dyo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"dz\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ebu\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ee\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"el\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"en\": [\n\t\t\"Before Hijrah\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"eo\": [\n\t\t\"antaŭ heĝiro\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"es\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"et\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"eu\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ewo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"fa\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ff\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"fi\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"fil\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"fo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"fr\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"fur\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"fy\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ga\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"gaa\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"gd\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"gl\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"gsw\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"gu\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"guz\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"gv\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ha\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"haw\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"he\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"hi\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"hr\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"hsb\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"hu\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"hy\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ia\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"id\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ie\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ig\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ii\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"is\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"it\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ja\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"jgo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"jmc\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"jv\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ka\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"kab\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"kam\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"kbd\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"kde\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"kea\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"kek\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"kgp\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"khq\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ki\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"kk\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"kkj\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"kl\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"kln\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"km\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"kn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ko\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"kok\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ks\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ksb\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ksf\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ksh\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ku\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"kw\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"kxv\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ky\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"lag\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"lb\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"lg\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"lij\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"lkt\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"lld\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"lmo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ln\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"lo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"lrc\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"lt\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"lu\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"luo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"luy\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"lv\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"mai\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"mas\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"mer\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"mfe\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"mg\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"mgh\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"mgo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"mi\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"mk\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ml\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"mn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"mni\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"mr\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ms\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"mt\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"mua\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"my\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"mzn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"naq\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"nb\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"nd\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"nds\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ne\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"nl\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"nmg\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"nn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"nnh\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"no\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"nqo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"nso\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"nus\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"nyn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"oc\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"om\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"or\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"os\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"pa\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"pcm\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"pl\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"pms\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"prg\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ps\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"pt\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"qu\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"quc\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"raj\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"rm\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"rn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ro\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"rof\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ru\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"rw\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"rwk\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sa\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sah\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"saq\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sat\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sbp\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sc\": [\n\t\t\"in antis de s’ègira\",\n\t\t\"a.E.\",\n\t\t\"A\"\n\t],\n\t\"scn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sd\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"se\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"seh\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ses\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sg\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"shi\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"shn\": [\n\t\t\"ဢွၼ်ၼႃႈ ႁေးၵျိရႃႇ\",\n\t\t\"ဢ.ႁ.\",\n\t\t\"ဢ.ႁ.\"\n\t],\n\t\"si\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sk\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sl\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"smn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"so\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sq\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sr\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"st\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"su\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sv\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sw\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"syr\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"szl\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ta\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"te\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"teo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"tg\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"th\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ti\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"tk\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"tn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"to\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"tok\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"tr\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"tt\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"twq\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"tyv\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"tzm\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ug\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"uk\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"und\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ur\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"uz\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"vai\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"vec\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"vi\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"vmw\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"vun\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"wae\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"wo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"xh\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"xnr\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"xog\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"yav\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"yi\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"yo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"yrl\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"yue\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"za\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"zgh\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"zh\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"zu\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"bal-Latn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"hi-Latn\": [\n\t\t\"Before Hijrah\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"suz-Sunu\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"blt-Latn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"byn-Latn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"cu-Glag\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"en-Dsrt\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"en-Shaw\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"iu-Latn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"kaa-Latn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t]\n};\n","// Adapted from ICU4X 2.3.0, east_asian_traditional/simple.rs.\n// Unicode-3.0; see LICENSE.md.\nimport {DayFromYear} from '#packages/ecma262-abstract/DateOperations.js'\nimport type {CalendarYearData} from '#packages/temporal/host-calendar-data.js'\n\nconst day = 86400000n\nconst month = (day * 295305888531n) / 10000000000n\nconst year = (day * 146097n) / 400n\nconst term = year / 12n\nconst moonEpoch = 730125n * day + 65640000n\nfunction floor(value: bigint, divisor: bigint): bigint {\n return value / divisor - (value < 0n && value % divisor !== 0n ? 1n : 0n)\n}\nfunction onOrBefore(date: bigint, base: bigint, period: bigint): bigint {\n return base + floor(date * day - base + day - 1n, period) * period\n}\n\nexport function lunisolarMonthSerial(epoch: number): number {\n return Number(floor(BigInt(epoch + 719178) * day - moonEpoch, month))\n}\n\nexport function lunisolarMonthEpoch(serial: number): number {\n if (!Number.isSafeInteger(serial)) throw new RangeError('Invalid month count')\n const epoch = floor(moonEpoch + BigInt(serial) * month, day) - 719163n\n if (epoch < -110000400n || epoch > 110000400n)\n throw new RangeError('Calendar month out of range')\n return Number(epoch)\n}\n\nexport function approximateLunisolarYear(\n calendar: 'chinese' | 'dangi',\n relatedYear: number\n): CalendarYearData {\n const offset =\n relatedYear < 1900\n ? 27940000n\n : calendar === 'chinese'\n ? 28800000n\n : 32400000n\n let solar = onOrBefore(\n BigInt(DayFromYear(relatedYear) + 719162),\n 730110n * day + 27840000n + offset,\n year\n )\n let moon = onOrBefore(\n floor(solar, day),\n 730125n * day + 65640000n + offset,\n month\n ),\n nextMoon = moon + month,\n solarTerm = -2,\n hadLeap = false\n while (\n solarTerm < 0 ||\n (floor(nextMoon, day) <= floor(solar, day) && !hadLeap)\n ) {\n if (floor(nextMoon, day) <= floor(solar, day) && !hadLeap) hadLeap = true\n else {\n solarTerm++\n solar += term\n }\n moon = nextMoon\n nextMoon += month\n }\n const newYear = floor(moon, day),\n lengths: number[] = []\n let leap = 0\n while (\n solarTerm < 12 ||\n (floor(nextMoon, day) <= floor(solar, day) && !hadLeap)\n ) {\n const index = solarTerm + Number(leap !== 0)\n if (index < 13)\n lengths[index] = Number(floor(nextMoon, day) - floor(moon, day))\n if (floor(nextMoon, day) <= floor(solar, day) && !hadLeap) {\n hadLeap = true\n leap = solarTerm\n } else {\n solarTerm++\n solar += term\n }\n moon = nextMoon\n nextMoon += month\n }\n const earliest = DayFromYear(relatedYear) + 18,\n starts = [earliest + Number((newYear - BigInt(earliest + 719163)) & 63n)],\n count = leap ? 13 : 12\n for (let index = 0; index < count; index++)\n starts.push(starts[index] + lengths[index])\n return {starts: starts.slice(0, count), end: starts[count], leap}\n}\n","// Generated from pinned ICU4X historical calendar data.\nexport const ranges = [{\n\tfirstYear: 1900,\n\tstartDay: -25537,\n\tyears: [\n\t\t71378,\n\t\t1874,\n\t\t3749,\n\t\t46666,\n\t\t1611,\n\t\t2715,\n\t\t38230,\n\t\t1386,\n\t\t2905,\n\t\t22354,\n\t\t1874,\n\t\t56101,\n\t\t2853,\n\t\t2635,\n\t\t46251,\n\t\t685,\n\t\t1387,\n\t\t19305,\n\t\t3497,\n\t\t64914,\n\t\t3730,\n\t\t3365,\n\t\t47693,\n\t\t2646,\n\t\t694,\n\t\t38325,\n\t\t1748,\n\t\t3753,\n\t\t24210,\n\t\t3730,\n\t\t52518,\n\t\t1323,\n\t\t2647,\n\t\t45750,\n\t\t2906,\n\t\t1748,\n\t\t28361,\n\t\t1865,\n\t\t63123,\n\t\t2707,\n\t\t1323,\n\t\t51803,\n\t\t2733,\n\t\t1386,\n\t\t39765,\n\t\t2980,\n\t\t2889,\n\t\t23187,\n\t\t2709,\n\t\t62765,\n\t\t1334,\n\t\t2733,\n\t\t46506,\n\t\t1458,\n\t\t3493,\n\t\t32074,\n\t\t3402,\n\t\t68245,\n\t\t2711,\n\t\t1366,\n\t\t51893,\n\t\t2773,\n\t\t1746,\n\t\t36517,\n\t\t3749,\n\t\t1610,\n\t\t27799,\n\t\t2715,\n\t\t62810,\n\t\t1386,\n\t\t2921,\n\t\t46930,\n\t\t2898,\n\t\t2853,\n\t\t38475,\n\t\t2635,\n\t\t70827,\n\t\t685,\n\t\t1389,\n\t\t52073,\n\t\t3497,\n\t\t3474,\n\t\t40229,\n\t\t3365,\n\t\t88653,\n\t\t2646,\n\t\t694,\n\t\t50613,\n\t\t1749,\n\t\t3753,\n\t\t48786,\n\t\t3730,\n\t\t3366,\n\t\t27222,\n\t\t2647,\n\t\t70870,\n\t\t858,\n\t\t1749,\n\t\t46793,\n\t\t1865,\n\t\t1683,\n\t\t38187,\n\t\t1323,\n\t\t2651,\n\t\t21850,\n\t\t1386,\n\t\t64341,\n\t\t2980,\n\t\t2889,\n\t\t47763,\n\t\t2709,\n\t\t1325,\n\t\t35501,\n\t\t2741,\n\t\t79274,\n\t\t1490,\n\t\t3493,\n\t\t56650,\n\t\t3402,\n\t\t3221,\n\t\t38190,\n\t\t1366,\n\t\t2741,\n\t\t21938,\n\t\t1746,\n\t\t52901,\n\t\t1829,\n\t\t1611,\n\t\t44183,\n\t\t3243,\n\t\t1370,\n\t\t27350,\n\t\t2921,\n\t\t96082,\n\t\t2898,\n\t\t2853,\n\t\t55883,\n\t\t2635,\n\t\t1195,\n\t\t42331,\n\t\t1453,\n\t\t2922,\n\t\t23378,\n\t\t3474,\n\t\t64805,\n\t\t3365,\n\t\t2645,\n\t\t46253,\n\t\t1206,\n\t\t1461,\n\t\t28074,\n\t\t3785,\n\t\t73362,\n\t\t3730,\n\t\t3366,\n\t\t51798,\n\t\t2647,\n\t\t1366,\n\t\t34517,\n\t\t1877,\n\t\t1865,\n\t\t28307,\n\t\t1683,\n\t\t62763,\n\t\t1323,\n\t\t2651,\n\t\t46426,\n\t\t1386,\n\t\t2917,\n\t\t38730,\n\t\t2890,\n\t\t72341,\n\t\t2709,\n\t\t1325,\n\t\t51885,\n\t\t2741,\n\t\t1450,\n\t\t35749,\n\t\t3493,\n\t\t3402,\n\t\t31893,\n\t\t3222,\n\t\t63822,\n\t\t1366,\n\t\t2741,\n\t\t46514,\n\t\t1746,\n\t\t3749,\n\t\t36426,\n\t\t1675,\n\t\t68759,\n\t\t1195,\n\t\t1371,\n\t\t51926,\n\t\t2922,\n\t\t1874,\n\t\t38693,\n\t\t2885,\n\t\t2699,\n\t\t21659,\n\t\t1195,\n\t\t59739,\n\t\t1453\n\t]\n}];\n","// Generated from pinned ICU4X historical calendar data.\nexport const ranges = [{\n\tfirstYear: 1900,\n\tstartDay: -25537,\n\tyears: [\n\t\t71378,\n\t\t1874,\n\t\t3749,\n\t\t46666,\n\t\t1611,\n\t\t2715,\n\t\t38230,\n\t\t1386,\n\t\t2905,\n\t\t22354,\n\t\t1874,\n\t\t56101,\n\t\t2853,\n\t\t2635,\n\t\t45723,\n\t\t2733,\n\t\t1386,\n\t\t19305,\n\t\t2985,\n\t\t64338,\n\t\t3474,\n\t\t3365,\n\t\t47693,\n\t\t2390,\n\t\t693,\n\t\t38317,\n\t\t1748,\n\t\t3497,\n\t\t23954,\n\t\t3730,\n\t\t52518,\n\t\t1319,\n\t\t2647,\n\t\t45750,\n\t\t2778,\n\t\t1748,\n\t\t28329,\n\t\t1865,\n\t\t63123,\n\t\t2707,\n\t\t1323,\n\t\t51803,\n\t\t2413,\n\t\t2922,\n\t\t39764,\n\t\t2980,\n\t\t2889,\n\t\t23187,\n\t\t2709,\n\t\t62763,\n\t\t1325,\n\t\t2733,\n\t\t46442,\n\t\t3506,\n\t\t3492,\n\t\t32073,\n\t\t3402,\n\t\t72341,\n\t\t2710,\n\t\t1366,\n\t\t51893,\n\t\t2773,\n\t\t1746,\n\t\t36517,\n\t\t3749,\n\t\t3658,\n\t\t27798,\n\t\t2715,\n\t\t62806,\n\t\t1386,\n\t\t2905,\n\t\t46930,\n\t\t1874,\n\t\t1829,\n\t\t38475,\n\t\t2635,\n\t\t70315,\n\t\t685,\n\t\t1387,\n\t\t52073,\n\t\t3497,\n\t\t3474,\n\t\t39717,\n\t\t3365,\n\t\t88653,\n\t\t2646,\n\t\t694,\n\t\t54701,\n\t\t1748,\n\t\t3497,\n\t\t48530,\n\t\t3730,\n\t\t3366,\n\t\t27222,\n\t\t2647,\n\t\t70326,\n\t\t2906,\n\t\t1748,\n\t\t44745,\n\t\t1865,\n\t\t1683,\n\t\t38183,\n\t\t1323,\n\t\t2651,\n\t\t21850,\n\t\t874,\n\t\t64341,\n\t\t2980,\n\t\t2889,\n\t\t47763,\n\t\t2709,\n\t\t1325,\n\t\t27229,\n\t\t2733,\n\t\t79274,\n\t\t1490,\n\t\t3493,\n\t\t48458,\n\t\t3402,\n\t\t2709,\n\t\t38189,\n\t\t1366,\n\t\t2741,\n\t\t21930,\n\t\t1746,\n\t\t52901,\n\t\t3749,\n\t\t3658,\n\t\t44182,\n\t\t3227,\n\t\t1370,\n\t\t27349,\n\t\t2921,\n\t\t96082,\n\t\t1874,\n\t\t2853,\n\t\t54859,\n\t\t2635,\n\t\t1195,\n\t\t42331,\n\t\t1389,\n\t\t2921,\n\t\t23378,\n\t\t3474,\n\t\t64805,\n\t\t3365,\n\t\t2637,\n\t\t46253,\n\t\t694,\n\t\t1461,\n\t\t28073,\n\t\t3753,\n\t\t73106,\n\t\t3730,\n\t\t3366,\n\t\t51798,\n\t\t2647,\n\t\t1238,\n\t\t34485,\n\t\t1749,\n\t\t3785,\n\t\t28306,\n\t\t1683,\n\t\t62763,\n\t\t1323,\n\t\t2651,\n\t\t46426,\n\t\t1386,\n\t\t2901,\n\t\t38729,\n\t\t2889,\n\t\t72339,\n\t\t2709,\n\t\t1325,\n\t\t51885,\n\t\t2741,\n\t\t1450,\n\t\t35749,\n\t\t3493,\n\t\t3402,\n\t\t31381,\n\t\t3221,\n\t\t62766,\n\t\t1366,\n\t\t2741,\n\t\t46514,\n\t\t1746,\n\t\t3749,\n\t\t40522,\n\t\t1610,\n\t\t68759,\n\t\t3243,\n\t\t1370,\n\t\t51925,\n\t\t2921,\n\t\t1874,\n\t\t38565,\n\t\t2853,\n\t\t1611,\n\t\t29847,\n\t\t1195,\n\t\t58715,\n\t\t1453\n\t]\n}];\n","import {ranges as chinese} from '@formatjs_generated/icu.calendar/host-chinese.js'\nimport {ranges as dangi} from '@formatjs_generated/icu.calendar/host-dangi.js'\n\nexport interface CalendarYearData {\n starts: number[]\n end: number\n leap: number\n}\ninterface Range {\n firstYear: number\n years: readonly number[]\n starts: number[]\n}\nconst cache = new Map<string, Range[]>()\nfunction ranges(calendar: 'chinese' | 'dangi'): Range[] {\n let result = cache.get(calendar)\n if (!result) {\n result = (calendar === 'chinese' ? chinese : dangi).map(range => {\n const starts = [range.startDay]\n for (const packed of range.years) {\n let days = (packed >>> 13 ? 13 : 12) * 29,\n bits = packed & 8191\n while (bits) {\n days++\n bits &= bits - 1\n }\n starts.push(starts[starts.length - 1] + days)\n }\n return {...range, starts}\n })\n cache.set(calendar, result)\n }\n return result\n}\n\nexport function compactCalendarYear(\n calendar: 'chinese' | 'dangi',\n year: number\n): CalendarYearData | undefined {\n for (const range of ranges(calendar)) {\n const index = year - range.firstYear\n if (index < 0 || index >= range.years.length) continue\n const packed = range.years[index],\n leap = packed >>> 13,\n count = leap ? 13 : 12,\n starts = [range.starts[index]]\n for (let month = 0; month < count - 1; month++)\n starts.push(starts[month] + 29 + ((packed >>> month) & 1))\n return {starts, end: range.starts[index + 1], leap}\n }\n return undefined\n}\n","import {YearFromTime} from '#packages/ecma262-abstract/DateOperations.js'\nimport {\n approximateLunisolarYear,\n lunisolarMonthSerial,\n lunisolarMonthEpoch,\n} from '#packages/temporal/lunisolar.js'\nimport {\n compactCalendarYear,\n type CalendarYearData,\n} from '#packages/temporal/host-calendar-data.js'\n\nexport type HostTableCalendar = 'chinese' | 'dangi' | 'islamic-umalqura'\nconst Constructor = globalThis.Intl?.DateTimeFormat\nconst parts = Constructor?.prototype.formatToParts\nconst resolved = Constructor?.prototype.resolvedOptions\nconst dayMilliseconds = 86400000\nconst limit = 100000000\nconst formatters = new Map<HostTableCalendar, Intl.DateTimeFormat>()\nconst years = new Map<string, CalendarYearData>()\nfunction remember(key: string, value: CalendarYearData): CalendarYearData {\n if (years.size >= 128) years.delete(years.keys().next().value!)\n years.set(key, value)\n return value\n}\n\nfunction fields(calendar: HostTableCalendar, day: number) {\n if (!Number.isInteger(day) || Math.abs(day) > limit)\n throw new RangeError('Host Intl calendar date out of range')\n if (!Constructor || !parts || !resolved)\n throw new RangeError(\n 'Temporal requires Intl.DateTimeFormat calendar support'\n )\n let formatter = formatters.get(calendar)\n if (!formatter) {\n formatter = new Constructor('en-US-u-nu-latn', {\n calendar,\n timeZone: 'UTC',\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n })\n if (resolved.call(formatter).calendar !== calendar)\n throw new RangeError(`Host Intl does not support ${calendar}`)\n formatters.set(calendar, formatter)\n }\n let year = NaN,\n date = NaN\n for (const part of parts.call(formatter, day * dayMilliseconds)) {\n const type: string = part.type\n if (type === 'relatedYear' || type === 'year') year = Number(part.value)\n else if (type === 'day') date = Number(part.value)\n }\n if (!Number.isSafeInteger(year) || !(date >= 1 && date <= 30))\n throw new RangeError('Unsupported host Intl calendar fields')\n return {year, day: date}\n}\n\nexport function hostCalendarYear(\n calendar: HostTableCalendar,\n year: number\n): CalendarYearData {\n if (!Number.isSafeInteger(year)) throw new RangeError('Invalid calendar year')\n const key = `${calendar}:${year}`,\n cached = years.get(key)\n if (cached) return cached\n if (calendar !== 'islamic-umalqura') {\n const compact = compactCalendarYear(calendar, year)\n return remember(key, compact ?? approximateLunisolarYear(calendar, year))\n }\n let probe = -492148 + 354 * (year - 1) + Math.floor((3 + 11 * year) / 30)\n if (Math.abs(probe) > limit - 800)\n throw new RangeError('Host Intl calendar year requires boundary data')\n probe += 400\n let value = fields(calendar, probe)\n // Find the following year, then walk back by actual host month boundaries.\n for (let attempts = 0; value.year <= year; attempts++) {\n if (attempts >= 3) throw new RangeError('Unsupported host calendar year')\n probe += 400\n value = fields(calendar, probe)\n }\n const starts: number[] = []\n let end = NaN\n for (let attempts = 0; value.year >= year; attempts++) {\n if (attempts >= 40) throw new RangeError('Unsupported host calendar year')\n const start = probe - value.day + 1\n if (value.year === year) {\n starts.push(start)\n } else end = start\n probe = start - 1\n value = fields(calendar, probe)\n }\n starts.reverse()\n if (starts.length !== 12)\n throw new RangeError('Unsupported host calendar year')\n return remember(key, {starts, end, leap: 0})\n}\n\nexport function hostCalendarDate(\n calendar: HostTableCalendar,\n epoch: number\n): {year: number; month: number; day: number} {\n let year =\n calendar === 'islamic-umalqura'\n ? fields(calendar, epoch).year\n : YearFromTime(epoch * dayMilliseconds)\n let data = hostCalendarYear(calendar, year)\n if (epoch < data.starts[0]) data = hostCalendarYear(calendar, --year)\n else if (epoch >= data.end) data = hostCalendarYear(calendar, ++year)\n let month = data.starts.length\n while (data.starts[month - 1] > epoch) month--\n return {year, month, day: epoch - data.starts[month - 1] + 1}\n}\n\nexport function hostCalendarAddMonths(\n calendar: 'chinese' | 'dangi',\n year: number,\n month: number,\n delta: number\n): {year: number; month: number} {\n if (!Number.isSafeInteger(delta)) throw new RangeError('Invalid month count')\n const target =\n lunisolarMonthSerial(hostCalendarYear(calendar, year).starts[month - 1]) +\n delta\n year = YearFromTime(lunisolarMonthEpoch(target) * dayMilliseconds)\n for (;;) {\n const data = hostCalendarYear(calendar, year),\n index = target - lunisolarMonthSerial(data.starts[0])\n if (index < 0) year--\n else if (index >= data.starts.length) year++\n else return {year, month: index + 1}\n }\n}\n\nexport function hostCalendarMonthDifference(\n calendar: 'chinese' | 'dangi',\n oneYear: number,\n oneMonth: number,\n twoYear: number,\n twoMonth: number\n): number {\n return (\n lunisolarMonthSerial(\n hostCalendarYear(calendar, twoYear).starts[twoMonth - 1]\n ) -\n lunisolarMonthSerial(\n hostCalendarYear(calendar, oneYear).starts[oneMonth - 1]\n )\n )\n}\n","import {\n fallbackLunisolar,\n fallbackUmmAlQura,\n} from '#packages/temporal/fallback-data.js'\nimport {\n hostCalendarYear,\n hostCalendarDate,\n hostCalendarAddMonths,\n hostCalendarMonthDifference,\n} from '#packages/temporal/host-calendar.js'\n\ndeclare global {\n interface ImportMeta {\n readonly formatjsTemporalHostCalendar?: boolean\n }\n}\nexport const hostCalendarData: boolean =\n import.meta.formatjsTemporalHostCalendar === true\n\nexport type TableCalendarId = 'chinese' | 'dangi' | 'islamic-umalqura'\nconst alphabet =\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'\nexport function isLunisolar(calendar: string): calendar is 'chinese' | 'dangi' {\n return calendar === 'chinese' || calendar === 'dangi'\n}\nfunction data(calendar: 'chinese' | 'dangi') {\n return fallbackLunisolar(calendar)\n}\nfunction pattern(calendar: 'chinese' | 'dangi', year: number): number {\n const table = data(calendar),\n index = year - table.firstYear\n if (!Number.isInteger(index) || index < 0 || index * 2 >= table.years.length)\n throw new RangeError('Calendar year out of range')\n return table.dictionary[\n alphabet.indexOf(table.years[index * 2]) * 64 +\n alphabet.indexOf(table.years[index * 2 + 1])\n ]\n}\nfunction length(packed: number): number {\n let days = (packed >>> 13 ? 13 : 12) * 29,\n bits = packed & 8191\n while (bits) {\n days++\n bits &= bits - 1\n }\n return days\n}\nexport function tableLeapMonth(\n calendar: 'chinese' | 'dangi',\n year: number\n): number {\n if (hostCalendarData) return hostCalendarYear(calendar, year).leap\n return pattern(calendar, year) >>> 13\n}\nexport function tableYearStart(\n calendar: TableCalendarId,\n year: number\n): number | undefined {\n if (hostCalendarData) {\n if (calendar === 'islamic-umalqura' && (year < 1300 || year > 1601))\n return undefined\n return hostCalendarYear(calendar, year).starts[0]\n }\n if (calendar === 'islamic-umalqura') {\n const ummAlQura = fallbackUmmAlQura()\n const index = year - ummAlQura.firstYear\n return index >= 0 && index < ummAlQura.startDays.length\n ? ummAlQura.startDays[index]\n : undefined\n }\n const table = data(calendar),\n index = year - table.firstYear\n if (index === table.years.length / 2) return table.endDay\n pattern(calendar, year)\n const block = Math.floor(index / 64)\n let start = table.checkpoints[block]\n for (let i = block * 64; i < index; i++)\n start += length(pattern(calendar, table.firstYear + i))\n return start\n}\nexport function tableMonthLength(\n calendar: TableCalendarId,\n year: number,\n month: number\n): number | undefined {\n if (hostCalendarData) {\n if (calendar === 'islamic-umalqura' && (year < 1300 || year > 1600))\n return undefined\n const data = hostCalendarYear(calendar, year)\n return (data.starts[month] ?? data.end) - data.starts[month - 1]\n }\n if (calendar === 'islamic-umalqura') {\n const ummAlQura = fallbackUmmAlQura()\n const index = year - ummAlQura.firstYear\n return index >= 0 && index < ummAlQura.monthLengths.length\n ? 29 + ((ummAlQura.monthLengths[index] >>> (month - 1)) & 1)\n : undefined\n }\n return 29 + ((pattern(calendar, year) >>> (month - 1)) & 1)\n}\nexport function tableMonthSerial(\n calendar: 'chinese' | 'dangi',\n year: number,\n month: number\n): number {\n if (hostCalendarData)\n return hostCalendarMonthDifference(calendar, 1970, 1, year, month)\n const table = data(calendar),\n index = year - table.firstYear\n pattern(calendar, year)\n const block = Math.floor(index / 64)\n let serial = table.monthCheckpoints[block]\n for (let i = block * 64; i < index; i++)\n serial += tableLeapMonth(calendar, table.firstYear + i) ? 13 : 12\n return serial + month - 1\n}\nexport function tableYearMonth(\n calendar: 'chinese' | 'dangi',\n serial: number\n): {year: number; month: number} {\n if (hostCalendarData) return hostCalendarAddMonths(calendar, 1970, 1, serial)\n const table = data(calendar),\n checkpoints = table.monthCheckpoints\n if (!Number.isSafeInteger(serial) || serial < 0)\n throw new RangeError('Calendar month out of range')\n let low = 0,\n high = checkpoints.length\n while (low + 1 < high) {\n const mid = Math.floor((low + high) / 2)\n if (checkpoints[mid] <= serial) low = mid\n else high = mid\n }\n let year = table.firstYear + low * 64,\n remaining = serial - checkpoints[low]\n for (;;) {\n const count = tableLeapMonth(calendar, year) ? 13 : 12\n if (remaining < count) return {year, month: remaining + 1}\n remaining -= count\n year++\n }\n}\nexport function tableDate(\n calendar: 'chinese' | 'dangi',\n epoch: number\n): {year: number; month: number; day: number} {\n if (hostCalendarData) return hostCalendarDate(calendar, epoch)\n const table = data(calendar),\n checkpoints = table.checkpoints\n if (epoch < checkpoints[0] || epoch >= table.endDay)\n throw new RangeError('Calendar date out of range')\n let low = 0,\n high = checkpoints.length\n while (low + 1 < high) {\n const mid = Math.floor((low + high) / 2)\n if (checkpoints[mid] <= epoch) low = mid\n else high = mid\n }\n let year = table.firstYear + low * 64,\n remaining = epoch - checkpoints[low]\n while (remaining >= length(pattern(calendar, year)))\n remaining -= length(pattern(calendar, year++))\n let month = 1\n while (remaining >= tableMonthLength(calendar, year, month)!)\n remaining -= tableMonthLength(calendar, year, month++)!\n return {year, month, day: remaining + 1}\n}\n\nexport function tableAddMonths(\n calendar: 'chinese' | 'dangi',\n year: number,\n month: number,\n months: number\n): {year: number; month: number} {\n return hostCalendarData\n ? hostCalendarAddMonths(calendar, year, month, months)\n : tableYearMonth(calendar, tableMonthSerial(calendar, year, month) + months)\n}\n\nexport function tableMonthDifference(\n calendar: 'chinese' | 'dangi',\n oneYear: number,\n oneMonth: number,\n twoYear: number,\n twoMonth: number\n): number {\n return hostCalendarData\n ? hostCalendarMonthDifference(\n calendar,\n oneYear,\n oneMonth,\n twoYear,\n twoMonth\n )\n : tableMonthSerial(calendar, twoYear, twoMonth) -\n tableMonthSerial(calendar, oneYear, oneMonth)\n}\n","import {nativeTemporal} from '#packages/temporal/native.js'\nimport {\n isLunisolar,\n tableLeapMonth,\n tableYearStart,\n tableMonthLength,\n tableMonthSerial,\n tableAddMonths,\n tableMonthDifference,\n tableDate,\n} from '#packages/temporal/calendar-table.js'\n// Numeric calendars; callers own Temporal coercion and property order.\nimport {\n DateFromTime,\n DayFromYear,\n DaysInYear,\n MonthFromTime,\n YearFromTime,\n} from '#packages/ecma262-abstract/DateOperations.js'\n\nexport const arithmeticCalendars = [\n 'iso8601',\n 'gregory',\n 'buddhist',\n 'japanese',\n 'roc',\n 'coptic',\n 'ethiopic',\n 'ethioaa',\n 'hebrew',\n 'indian',\n 'islamic-civil',\n 'islamic-tbla',\n 'persian',\n] as const\nexport const calendarIds: readonly (\n | (typeof arithmeticCalendars)[number]\n | 'chinese'\n | 'dangi'\n | 'islamic-umalqura'\n)[] = [...arithmeticCalendars, 'chinese', 'dangi', 'islamic-umalqura']\nexport type CalendarId = (typeof calendarIds)[number]\nexport type Overflow = 'constrain' | 'reject'\nexport interface CalendarFields {\n year: number\n month?: number\n monthCode?: string\n day: number\n}\nexport interface CalendarDate {\n year: number\n month: number\n monthCode: string\n day: number\n}\nexport interface DateDuration {\n years?: number\n months?: number\n weeks?: number\n days?: number\n}\nconst monthStarts = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]\nconst mod = (value: number, divisor: number): number =>\n value - Math.floor(value / divisor) * divisor\nfunction integer(value: number): number {\n if (!Number.isSafeInteger(value))\n throw new RangeError('Expected safe integer')\n return value\n}\nfunction yearCheck(year: number): number {\n if (Math.abs(integer(year)) > 400000)\n throw new RangeError('Calendar year out of range')\n return year\n}\nexport function dayCheck(day: number): number {\n if (integer(day) < -100000001 || day > 100000000)\n throw new RangeError('Calendar date out of range')\n return day\n}\nfunction calendarCheck(calendar: CalendarId): void {\n if (!calendarIds.includes(calendar))\n throw new RangeError('Unsupported calendar')\n}\nfunction overflowCheck(overflow: Overflow): void {\n if (overflow !== 'constrain' && overflow !== 'reject')\n throw new RangeError('Invalid overflow')\n}\nfunction regulate(\n value: number,\n min: number,\n max: number,\n overflow: Overflow\n): number {\n if (!Number.isInteger(value)) throw new RangeError('Expected finite integer')\n if (overflow === 'reject' && (value < min || value > max))\n throw new RangeError('Calendar field out of range')\n return Math.min(Math.max(value, min), max)\n}\nfunction hebrewLeap(year: number): boolean {\n return mod(7 * year + 1, 19) < 7\n}\nfunction elapsedMonths(year: number): number {\n return Math.floor((235 * year - 234) / 19)\n}\n// Same postponement arithmetic as crates/intl_datetimeformat_calendars/core.rs.\nfunction hebrewDelay(year: number): number {\n const months = elapsedMonths(year)\n const day = 29 * months + Math.floor((12084 + 13753 * months) / 25920)\n return day + Number(mod(3 * (day + 1), 7) < 3)\n}\nfunction isoLike(calendar: CalendarId): boolean {\n return ['iso8601', 'gregory', 'buddhist', 'japanese', 'roc'].includes(\n calendar\n )\n}\nfunction isoYear(calendar: CalendarId, year: number): number {\n return year + (calendar === 'buddhist' ? -543 : calendar === 'roc' ? 1911 : 0)\n}\nfunction start(calendar: CalendarId, year: number): number {\n if (isLunisolar(calendar)) return tableYearStart(calendar, year)!\n if (calendar === 'islamic-umalqura')\n return tableYearStart(calendar, year) ?? start('islamic-civil', year)\n if (isoLike(calendar)) return DayFromYear(isoYear(calendar, year))\n switch (calendar) {\n case 'coptic':\n return 1824665 - 2440588 + 365 * year + Math.floor(year / 4)\n case 'ethiopic':\n return 1723856 - 2440588 + 365 * year + Math.floor(year / 4)\n case 'ethioaa': {\n const value = year - 5500\n return 1723856 - 2440588 + 365 * value + Math.floor(value / 4)\n }\n case 'indian': {\n const value = year + 78\n return DayFromYear(value) + 80\n }\n case 'islamic-civil':\n case 'islamic-tbla':\n return (\n 1948440 -\n 2440588 -\n Number(calendar === 'islamic-tbla') +\n 354 * (year - 1) +\n Math.floor((3 + 11 * year) / 30)\n )\n case 'persian':\n return (\n 1948320 - 2440588 + 365 * (year - 1) + Math.floor((8 * year + 21) / 33)\n )\n }\n const present = hebrewDelay(year)\n return (\n -2092590 +\n present +\n (hebrewDelay(year + 1) - present === 356\n ? 2\n : present - hebrewDelay(year - 1) === 382\n ? 1\n : 0)\n )\n}\nexport function calendarStartOfYear(\n calendar: CalendarId,\n year: number\n): number {\n calendarCheck(calendar)\n yearCheck(year)\n const native = nativeTemporal()\n if (native) return native.calendarStartOfYear(calendar, year)\n return start(calendar, year)\n}\nexport function monthsInYear(calendar: CalendarId, year: number): number {\n calendarCheck(calendar)\n yearCheck(year)\n const native = nativeTemporal()\n if (native) return native.calendarMonthsInYear(calendar, year)\n if (isLunisolar(calendar)) return tableLeapMonth(calendar, year) ? 13 : 12\n return ['coptic', 'ethiopic', 'ethioaa'].includes(calendar) ||\n (calendar === 'hebrew' && hebrewLeap(year))\n ? 13\n : 12\n}\nexport function daysInMonth(\n calendar: CalendarId,\n year: number,\n month: number\n): number {\n const native = nativeTemporal()\n if (native) return native.calendarDaysInMonth(calendar, year, month)\n const count = monthsInYear(calendar, year)\n if (integer(month) < 1 || month > count)\n throw new RangeError('Invalid calendar month')\n if (isLunisolar(calendar)) return tableMonthLength(calendar, year, month)!\n if (calendar === 'islamic-umalqura')\n return (\n tableMonthLength(calendar, year, month) ??\n daysInMonth('islamic-civil', year, month)\n )\n if (isoLike(calendar)) {\n return month === 12\n ? 31\n : monthStarts[month] -\n monthStarts[month - 1] +\n Number(month === 2 && DaysInYear(isoYear(calendar, year)) === 366)\n }\n const length = start(calendar, year + 1) - start(calendar, year)\n if (['coptic', 'ethiopic', 'ethioaa'].includes(calendar))\n return month === 13 ? length - 360 : 30\n if (calendar === 'indian')\n return month === 1\n ? 30 + Number(DaysInYear(year + 78) === 366)\n : month <= 6\n ? 31\n : 30\n if (calendar === 'islamic-civil' || calendar === 'islamic-tbla')\n return month % 2 === 1 || (month === 12 && length === 355) ? 30 : 29\n if (calendar === 'persian')\n return month <= 6 ? 31 : month < 12 ? 30 : length - 336\n const code = month + Number(!hebrewLeap(year) && month >= 6)\n if ([4, 7, 9, 11, 13].includes(code)) return 29\n if (code === 2) return length % 10 === 5 ? 30 : 29\n if (code === 3) return length % 10 === 3 ? 29 : 30\n return 30\n}\nfunction monthCode(calendar: CalendarId, year: number, month: number): string {\n if (isLunisolar(calendar)) {\n const leap = tableLeapMonth(calendar, year)\n return (\n 'M' +\n String(month - Number(leap > 0 && month > leap)).padStart(2, '0') +\n (leap > 0 && month === leap + 1 ? 'L' : '')\n )\n }\n const leap = calendar === 'hebrew' && hebrewLeap(year)\n if (leap && month === 6) return 'M05L'\n return 'M' + String(month - Number(leap && month > 6)).padStart(2, '0')\n}\nfunction monthFromCode(\n calendar: CalendarId,\n year: number,\n code: string,\n overflow: Overflow\n): number {\n if (isLunisolar(calendar)) {\n if (!/^M(0[1-9]|1[0-2])L?$/.test(code))\n throw new RangeError('Invalid month code')\n const number = Number(code.slice(1, 3)),\n leap = tableLeapMonth(calendar, year)\n if (code.endsWith('L') && leap !== number && overflow === 'reject')\n throw new RangeError('Leap month absent')\n return (\n number +\n Number(\n leap > 0 && (number > leap || (number === leap && code.endsWith('L')))\n )\n )\n }\n if (calendar === 'hebrew' && code === 'M05L') {\n if (!hebrewLeap(year) && overflow === 'reject')\n throw new RangeError('Leap month absent')\n return 6\n }\n if (\n !/^M(0[1-9]|1[0-3])$/.test(code) ||\n (code === 'M13' && !['coptic', 'ethiopic', 'ethioaa'].includes(calendar))\n )\n throw new RangeError('Invalid month code')\n const month = Number(code.slice(1))\n return month + Number(calendar === 'hebrew' && hebrewLeap(year) && month >= 6)\n}\nexport function calendarToEpochDayRaw(\n calendar: CalendarId,\n fields: CalendarFields,\n overflow: Overflow = 'constrain'\n): number {\n calendarCheck(calendar)\n overflowCheck(overflow)\n const year = yearCheck(fields.year)\n const native = nativeTemporal()\n if (native) {\n if (fields.month === undefined && fields.monthCode === undefined)\n throw new TypeError('Month or monthCode required')\n return native.calendarToEpochDay(calendar, fields, overflow)\n }\n let month: number\n if (fields.monthCode !== undefined) {\n month = monthFromCode(calendar, year, fields.monthCode, overflow)\n if (fields.month !== undefined && integer(fields.month) !== month)\n throw new RangeError('Month and monthCode disagree')\n } else {\n if (fields.month === undefined)\n throw new TypeError('Month or monthCode required')\n month = regulate(fields.month, 1, monthsInYear(calendar, year), overflow)\n }\n const day = regulate(\n fields.day,\n 1,\n daysInMonth(calendar, year, month),\n overflow\n )\n let epoch = start(calendar, year) + day - 1\n for (let m = 1; m < month; m++) epoch += daysInMonth(calendar, year, m)\n return integer(epoch)\n}\nexport function calendarToEpochDay(\n calendar: CalendarId,\n fields: CalendarFields,\n overflow: Overflow = 'constrain'\n): number {\n return dayCheck(calendarToEpochDayRaw(calendar, fields, overflow))\n}\nexport function calendarFromEpochDay(\n calendar: CalendarId,\n epoch: number\n): CalendarDate {\n return calendarFromEpochDayRaw(calendar, dayCheck(epoch))\n}\nexport function calendarFromEpochDayRaw(\n calendar: CalendarId,\n epoch: number\n): CalendarDate {\n calendarCheck(calendar)\n if (Math.abs(integer(epoch)) > 110000000)\n throw new RangeError('Calendar date out of range')\n const native = nativeTemporal()\n if (native) return native.calendarFromEpochDay(calendar, epoch)\n if (isLunisolar(calendar)) {\n const value = tableDate(calendar, epoch)\n return {...value, monthCode: monthCode(calendar, value.year, value.month)}\n }\n const t = epoch * 86400000,\n civilYear = YearFromTime(t)\n if (isoLike(calendar)) {\n const year =\n civilYear -\n (calendar === 'buddhist' ? -543 : calendar === 'roc' ? 1911 : 0),\n month = MonthFromTime(t) + 1\n return {\n year,\n month,\n monthCode: monthCode(calendar, year, month),\n day: DateFromTime(t),\n }\n }\n const jd = epoch + 2440588\n let year: number\n switch (calendar) {\n case 'coptic':\n year = Math.floor((4 * (jd - 1824665) + 3) / 1461)\n break\n case 'ethiopic':\n case 'ethioaa':\n year =\n Math.floor((4 * (jd - 1723856) + 3) / 1461) +\n (calendar === 'ethioaa' ? 5500 : 0)\n break\n case 'islamic-umalqura':\n case 'islamic-civil':\n case 'islamic-tbla':\n year = Math.floor(\n (30 * (jd - 1948440 + Number(calendar === 'islamic-tbla')) + 10646) /\n 10631\n )\n break\n case 'persian':\n year = 1 + Math.floor((33 * (jd - 1948320) + 3) / 12053)\n break\n case 'indian':\n year = civilYear - 78\n break\n default:\n year = Math.floor(((epoch + 2092590) * 492480) / 179876755) + 1\n }\n while (start(calendar, year) > epoch) year--\n while (start(calendar, year + 1) <= epoch) year++\n let month = 1,\n remaining = epoch - start(calendar, year)\n while (remaining >= daysInMonth(calendar, year, month))\n remaining -= daysInMonth(calendar, year, month++)\n return {\n year,\n month,\n monthCode: monthCode(calendar, year, month),\n day: remaining + 1,\n }\n}\nfunction addYearMonth(\n calendar: CalendarId,\n original: CalendarDate,\n years: number,\n months: number,\n overflow: Overflow\n): {year: number; month: number} {\n let year = yearCheck(original.year + years)\n let month: number\n if (isLunisolar(calendar)) {\n month = monthFromCode(calendar, year, original.monthCode, overflow)\n return tableAddMonths(calendar, year, month, months)\n }\n if (calendar !== 'hebrew') {\n const count = monthsInYear(calendar, year)\n const serial = year * count + original.month - 1 + months\n year = yearCheck(Math.floor(serial / count))\n month = mod(serial, count) + 1\n } else {\n month = monthFromCode(calendar, year, original.monthCode, overflow)\n const serial = integer(elapsedMonths(year) + month - 1 + months)\n year = yearCheck(Math.floor((19 * serial + 234) / 235))\n while (elapsedMonths(year) > serial) year--\n while (elapsedMonths(year + 1) <= serial) year++\n month = serial - elapsedMonths(year) + 1\n }\n return {year, month}\n}\nexport function addCalendarDateRaw(\n calendar: CalendarId,\n fields: CalendarFields,\n duration: DateDuration,\n overflow: Overflow = 'constrain'\n): CalendarDate {\n overflowCheck(overflow)\n const native = nativeTemporal()\n if (native) return native.calendarAdd(calendar, fields, duration, overflow)\n const original = calendarFromEpochDayRaw(\n calendar,\n calendarToEpochDayRaw(calendar, fields, 'reject')\n )\n const values = [\n duration.years ?? 0,\n duration.months ?? 0,\n duration.weeks ?? 0,\n duration.days ?? 0,\n ].map(integer)\n if (values.some(x => x < 0) && values.some(x => x > 0))\n throw new RangeError('Mixed duration signs')\n const {year, month} = addYearMonth(\n calendar,\n original,\n values[0],\n values[1],\n overflow\n )\n const epoch = calendarToEpochDayRaw(\n calendar,\n {year, month, day: original.day},\n overflow\n )\n return calendarFromEpochDayRaw(\n calendar,\n epoch + integer(7 * values[2] + values[3])\n )\n}\nexport function addCalendarDate(\n calendar: CalendarId,\n fields: CalendarFields,\n duration: DateDuration,\n overflow: Overflow = 'constrain'\n): CalendarDate {\n const result = addCalendarDateRaw(calendar, fields, duration, overflow)\n dayCheck(calendarToEpochDayRaw(calendar, result, 'reject'))\n return result\n}\nexport function calendarDaysUntil(\n calendar: CalendarId,\n one: CalendarFields,\n two: CalendarFields\n): number {\n return (\n calendarToEpochDay(calendar, two, 'reject') -\n calendarToEpochDay(calendar, one, 'reject')\n )\n}\n\nexport function calendarMonthSerial(\n calendar: CalendarId,\n year: number,\n month: number\n): number {\n calendarCheck(calendar)\n const native = nativeTemporal()\n if (native) return native.calendarMonthSerial(calendar, year, month)\n if (isLunisolar(calendar)) return tableMonthSerial(calendar, year, month)\n return calendar === 'hebrew'\n ? elapsedMonths(year) + month - 1\n : year * monthsInYear(calendar, year) + month - 1\n}\nexport function calendarDateUntilRaw(\n calendar: CalendarId,\n one: number,\n two: number,\n largest: string\n): DateDuration {\n const native = nativeTemporal()\n if (native) return native.calendarUntil(calendar, one, two, largest)\n const first = calendarFromEpochDayRaw(calendar, one),\n last = calendarFromEpochDayRaw(calendar, two)\n const result = {years: 0, months: 0, weeks: 0, days: 0},\n sign = Math.sign(two - one)\n if (!sign) return result\n // Difference prefixes compare unregulated days and month codes, not clamped dates.\n const surpasses = (): boolean => {\n const year = first.year + result.years\n const codeOrder =\n first.monthCode === last.monthCode\n ? 0\n : first.monthCode > last.monthCode\n ? 1\n : -1\n if (sign * (year - last.year || codeOrder || first.day - last.day) > 0)\n return true\n const candidate = addYearMonth(\n calendar,\n first,\n result.years,\n result.months,\n 'constrain'\n )\n return (\n sign *\n (candidate.year - last.year ||\n candidate.month - last.month ||\n first.day - last.day) >\n 0\n )\n }\n let anchor = one\n if (largest === 'year') {\n result.years = last.year - first.year\n if (surpasses()) result.years -= sign\n }\n if (largest === 'year' || largest === 'month') {\n const base = addYearMonth(calendar, first, result.years, 0, 'constrain')\n result.months = isLunisolar(calendar)\n ? tableMonthDifference(\n calendar,\n base.year,\n base.month,\n last.year,\n last.month\n )\n : calendarMonthSerial(calendar, last.year, last.month) -\n calendarMonthSerial(calendar, base.year, base.month)\n if (surpasses()) result.months -= sign\n anchor = calendarToEpochDayRaw(\n calendar,\n addCalendarDateRaw(calendar, first, result, 'constrain'),\n 'reject'\n )\n }\n result.days = two - anchor\n if (largest === 'week') {\n result.weeks = Math.trunc(result.days / 7) || 0\n result.days = result.days % 7 || 0\n }\n return result\n}\nconst japaneseEras = [\n [18017, 'reiwa', 2018],\n [6947, 'heisei', 1988],\n [-15713, 'showa', 1925],\n [-20974, 'taisho', 1911],\n [-35428, 'meiji', 1867],\n] as const\nexport function calendarEra(\n calendar: CalendarId,\n epoch: number,\n extended = false\n): {era: string; eraYear: number} | undefined {\n const native = nativeTemporal()\n if (native) {\n if (!extended) dayCheck(epoch)\n return native.calendarEra(calendar, epoch)\n }\n const {year} = (extended ? calendarFromEpochDayRaw : calendarFromEpochDay)(\n calendar,\n epoch\n )\n switch (calendar) {\n case 'iso8601':\n case 'chinese':\n case 'dangi':\n return undefined\n case 'buddhist':\n return {era: 'be', eraYear: year}\n case 'coptic':\n case 'hebrew':\n return {era: 'am', eraYear: year}\n case 'ethiopic':\n return {\n era: year > 0 ? 'am' : 'aa',\n eraYear: year > 0 ? year : year + 5500,\n }\n case 'ethioaa':\n return {era: 'aa', eraYear: year}\n case 'indian':\n return {era: 'shaka', eraYear: year}\n case 'persian':\n return {era: 'ap', eraYear: year}\n case 'roc':\n return {\n era: year > 0 ? 'roc' : 'broc',\n eraYear: year > 0 ? year : 1 - year,\n }\n case 'islamic-umalqura':\n case 'islamic-civil':\n case 'islamic-tbla':\n return {era: year > 0 ? 'ah' : 'bh', eraYear: year > 0 ? year : 1 - year}\n case 'japanese':\n for (const [start, era, offset] of japaneseEras)\n if (epoch >= start) return {era, eraYear: year - offset}\n }\n return {era: year > 0 ? 'ce' : 'bce', eraYear: year > 0 ? year : 1 - year}\n}\nexport function calendarYearFromEra(\n calendar: CalendarId,\n era: string,\n eraYear: number\n): number {\n calendarCheck(calendar)\n integer(eraYear)\n const native = nativeTemporal()\n if (native) return native.calendarYearFromEra(calendar, era, eraYear)\n if (calendar === 'japanese')\n for (const [, name, offset] of japaneseEras)\n if (era === name) return yearCheck(eraYear + offset)\n if (calendar === 'ethiopic' && era === 'aa') return yearCheck(eraYear - 5500)\n const names: Partial<Record<CalendarId, readonly string[]>> = {\n gregory: ['ce', 'bce'],\n japanese: ['ce', 'bce'],\n buddhist: ['be'],\n coptic: ['am'],\n ethiopic: ['am'],\n ethioaa: ['aa'],\n hebrew: ['am'],\n indian: ['shaka'],\n persian: ['ap'],\n roc: ['roc', 'broc'],\n 'islamic-umalqura': ['ah', 'bh'],\n 'islamic-civil': ['ah', 'bh'],\n 'islamic-tbla': ['ah', 'bh'],\n }\n if (\n (calendar === 'gregory' || calendar === 'japanese') &&\n (era === 'ad' || era === 'bc')\n )\n era = era === 'ad' ? 'ce' : 'bce'\n const index = names[calendar]?.indexOf(era) ?? -1\n if (index < 0) throw new RangeError('Invalid era')\n return yearCheck(index === 1 ? 1 - eraYear : eraYear)\n}\n","import {\n calendarFromEpochDayRaw,\n calendarToEpochDayRaw,\n} from '#packages/temporal/calendar.js'\nimport type {LegacyDateTimeProjection} from '#packages/temporal/legacy-extended-date.js'\n\ntype Calendar = 'chinese' | 'dangi'\ntype Resolved = typeof Intl.DateTimeFormat.prototype.resolvedOptions\ntype RangeParts = typeof Intl.DateTimeFormat.prototype.formatRangeToParts\nconst Constructor = globalThis.Intl?.DateTimeFormat\nconst nativeParts = Constructor?.prototype.formatToParts\nconst NumberConstructor = globalThis.Intl?.NumberFormat\nconst numberFormat =\n NumberConstructor &&\n Object.getOwnPropertyDescriptor(NumberConstructor.prototype, 'format')?.get\nconst dayMilliseconds = 86400000\nconst probes = new Map<string, Intl.DateTimeFormat>()\nconst positiveEras = new WeakMap<Intl.DateTimeFormat, string>()\nconst dateTypes = new Set(['year', 'relatedYear', 'yearName', 'month', 'day'])\ninterface Catalog {\n months: Map<string, number>\n cursor: number\n count: number\n full?: number\n leap?: string\n}\nconst catalogs = new Map<Calendar, Catalog>()\nconst utc = new WeakMap<Intl.DateTimeFormat, Intl.DateTimeFormat>()\nconst separators = new WeakMap<Intl.DateTimeFormat, string>()\nfunction isoDay(year: number, month: number, day: number): number {\n return calendarToEpochDayRaw('iso8601', {year, month, day}, 'reject')\n}\nfunction probe(\n calendar: Calendar | 'iso8601',\n timeZone: string\n): Intl.DateTimeFormat {\n const key = `${calendar}:${timeZone}`\n let result = probes.get(key)\n if (!result) {\n result = new Constructor!('en-US-u-nu-latn', {\n calendar: calendar === 'iso8601' ? 'gregory' : calendar,\n numberingSystem: 'latn',\n timeZone,\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n ...(calendar === 'iso8601' ? {era: 'short' as const} : {}),\n })\n probes.set(key, result)\n }\n return result\n}\nfunction fields(\n calendar: Calendar | 'iso8601',\n timeZone: string,\n milliseconds: number\n) {\n const formatter = probe(calendar, timeZone)\n const values = new Map<string, string>(\n nativeParts!\n .call(formatter, milliseconds)\n .map(part => [part.type, part.value])\n )\n const year = Number(\n values.get(calendar === 'iso8601' ? 'year' : 'relatedYear')\n )\n const day = Number(values.get('day'))\n const month = /^(\\d{1,2})(bis)?$/.exec(values.get('month') || '')\n if (\n !Number.isSafeInteger(year) ||\n !Number.isInteger(day) ||\n day < 1 ||\n day > (calendar === 'iso8601' ? 31 : 30) ||\n !month ||\n +month[1] < 1 ||\n +month[1] > 12\n )\n throw new RangeError('Unsupported host calendar fields')\n let bce = false\n if (calendar === 'iso8601') {\n let positive = positiveEras.get(formatter)\n if (positive === undefined) {\n positive = nativeParts!\n .call(formatter, 0)\n .find(part => part.type === 'era')?.value\n if (!positive) throw new RangeError('Unsupported host Gregorian era')\n positiveEras.set(formatter, positive)\n }\n bce = values.get('era') !== positive\n }\n return {\n year: bce ? 1 - year : year,\n month: Number(month[1]),\n day,\n monthCode: `M${month[1].padStart(2, '0')}${month[2] ? 'L' : ''}`,\n }\n}\nfunction catalog(calendar: Calendar, code: string): Catalog {\n let result = catalogs.get(calendar)\n if (!result) {\n const sample = isoDay(2020, 1, 15),\n value = fields(calendar, 'UTC', sample * dayMilliseconds)\n result = {months: new Map(), cursor: sample - value.day + 1, count: 0}\n catalogs.set(calendar, result)\n }\n while (\n (!result.months.has(code) || result.full === undefined || !result.leap) &&\n result.count < 2400\n ) {\n const start = result.cursor,\n value = fields(calendar, 'UTC', start * dayMilliseconds),\n next = start + 32,\n end = next - fields(calendar, 'UTC', next * dayMilliseconds).day + 1\n result.months.set(value.monthCode, start)\n if (end - start === 30) result.full = start\n if (value.monthCode.endsWith('L')) result.leap = value.monthCode\n result.cursor = end\n result.count++\n }\n return result\n}\nexport function calendarLabelFormatter(\n source: Intl.DateTimeFormat,\n options: Intl.ResolvedDateTimeFormatOptions,\n raw: Intl.DateTimeFormatPart[]\n): Intl.DateTimeFormat {\n let result = utc.get(source)\n if (!result) {\n const projected = {\n ...options,\n timeZone: 'UTC',\n } as Intl.DateTimeFormatOptions\n // Some hosts omit resolved year options for relatedYear/yearName output.\n if (\n !options.dateStyle &&\n !options.year &&\n raw.some(part => ['relatedYear', 'yearName'].includes(part.type))\n )\n projected.year = 'numeric'\n result = new Constructor!(options.locale, projected)\n utc.set(source, result)\n }\n return result\n}\n\nexport function legacyISOEpochDay(\n timeZone: string,\n milliseconds: number\n): number {\n const value = fields('iso8601', timeZone, milliseconds)\n return isoDay(value.year, value.month, value.day)\n}\nfunction part(\n source: Intl.DateTimeFormat,\n epoch: number,\n type: string\n): string {\n const value = nativeParts!\n .call(source, epoch * dayMilliseconds)\n .find(part => part.type === type)\n if (!value) throw new RangeError(`Unsupported host calendar pattern: ${type}`)\n return value.value\n}\nfunction monthLabel(\n source: Intl.DateTimeFormat,\n calendar: Calendar,\n code: string\n): string {\n const data = catalog(calendar, code),\n epoch = data.months.get(code)\n if (epoch !== undefined) return part(source, epoch + 14, 'month')\n if (!code.endsWith('L') || !data.leap)\n throw new RangeError('Unsupported host calendar month')\n const normal = monthLabel(source, calendar, data.leap.slice(0, -1)),\n leap = part(source, data.months.get(data.leap)! + 14, 'month'),\n index = leap.indexOf(normal)\n if (index < 0) throw new RangeError('Unsupported host leap-month pattern')\n return (\n leap.slice(0, index) +\n monthLabel(source, calendar, code.slice(0, -1)) +\n leap.slice(index + normal.length)\n )\n}\n\nexport function correctLunisolarParts(\n value: LegacyDateTimeProjection,\n raw: Intl.DateTimeFormatPart[],\n resolved: Resolved,\n surrogateMilliseconds?: number,\n expectedEpochDay?: number\n): Intl.DateTimeFormatPart[] {\n const options = resolved.call(value.formatter),\n calendar = options.calendar\n if (\n (calendar !== 'chinese' && calendar !== 'dangi') ||\n !raw.some(part => dateTypes.has(part.type))\n )\n return raw\n const iso =\n surrogateMilliseconds === undefined && expectedEpochDay === undefined\n ? fields('iso8601', options.timeZone, value.milliseconds)\n : undefined,\n expected = calendarFromEpochDayRaw(\n calendar,\n expectedEpochDay ??\n (iso\n ? isoDay(iso.year, iso.month, iso.day)\n : Math.floor(value.milliseconds / dayMilliseconds))\n ),\n actual = fields(\n calendar,\n options.timeZone,\n surrogateMilliseconds ?? value.milliseconds\n )\n if (\n actual.year === expected.year &&\n actual.monthCode === expected.monthCode &&\n actual.day === expected.day\n )\n return raw\n const labels = calendarLabelFormatter(value.formatter, options, raw),\n changes = new Map<string, string>()\n if (actual.day !== expected.day && raw.some(part => part.type === 'day')) {\n const data = catalog(calendar, 'M01')\n changes.set('day', part(labels, data.full! + expected.day - 1, 'day'))\n }\n if (\n actual.monthCode !== expected.monthCode &&\n raw.some(part => part.type === 'month')\n )\n changes.set('month', monthLabel(labels, calendar, expected.monthCode))\n if (actual.year !== expected.year) {\n const cycleYear = 2000 + ((((expected.year - 2000) % 60) + 60) % 60)\n for (const item of raw) {\n const type: string = item.type\n if (type === 'yearName')\n changes.set(item.type, part(labels, isoDay(cycleYear, 7, 1), item.type))\n else if (type === 'year' || type === 'relatedYear') {\n if (!NumberConstructor || !numberFormat)\n throw new RangeError(\n 'Calendar year correction requires Intl.NumberFormat'\n )\n const format = numberFormat.call(\n new NumberConstructor(options.locale, {\n numberingSystem: options.numberingSystem,\n useGrouping: false,\n maximumFractionDigits: 0,\n })\n ),\n sample = part(labels, isoDay(2001, 7, 1), item.type),\n short = sample !== format(2001)\n changes.set(\n item.type,\n short\n ? numberFormat.call(\n new NumberConstructor(options.locale, {\n numberingSystem: options.numberingSystem,\n useGrouping: false,\n minimumIntegerDigits: 2,\n maximumFractionDigits: 0,\n })\n )(((expected.year % 100) + 100) % 100)\n : format(expected.year)\n )\n }\n }\n }\n return changes.size\n ? raw.map(item =>\n changes.has(item.type)\n ? {...item, value: changes.get(item.type)!}\n : item\n )\n : raw\n}\n\nexport function lunisolarRangeParts(\n first: LegacyDateTimeProjection,\n last: LegacyDateTimeProjection,\n parts: RangeParts,\n resolved: Resolved\n): Intl.DateTimeRangeFormatPart[] | undefined {\n const calendar = resolved.call(first.formatter).calendar\n if (\n (calendar !== 'chinese' && calendar !== 'dangi') ||\n !nativeParts ||\n !parts\n )\n return undefined\n const raw = parts.call(\n first.formatter,\n first.milliseconds,\n last.milliseconds\n ),\n firstRaw = nativeParts.call(first.formatter, first.milliseconds),\n lastRaw = nativeParts.call(last.formatter, last.milliseconds),\n start = correctLunisolarParts(first, firstRaw, resolved),\n end = correctLunisolarParts(last, lastRaw, resolved)\n if (start === firstRaw && end === lastRaw) return raw\n return joinCalendarRangeParts(first.formatter, start, end, parts)\n}\n\nexport function joinCalendarRangeParts(\n formatter: Intl.DateTimeFormat,\n start: Intl.DateTimeFormatPart[],\n end: Intl.DateTimeFormatPart[],\n parts: RangeParts\n): Intl.DateTimeRangeFormatPart[] {\n if (\n start.map(part => part.value).join('') ===\n end.map(part => part.value).join('')\n )\n return start.map(part => ({...part, source: 'shared'}))\n let separator = separators.get(formatter)\n if (separator === undefined) {\n const sample = parts.call(formatter, 946718033000, 1025966286000),\n end = sample.findIndex(part => part.source === 'endRange')\n let start = end - 1\n while (start >= 0 && sample[start].source !== 'startRange') start--\n if (start < 0 || end < 0)\n throw new RangeError('Unsupported host calendar range pattern')\n separator = sample\n .slice(start + 1, end)\n .map(part => part.value)\n .join('')\n separators.set(formatter, separator)\n }\n return [\n ...start.map(part => ({...part, source: 'startRange' as const})),\n {type: 'literal', value: separator, source: 'shared'},\n ...end.map(part => ({...part, source: 'endRange' as const})),\n ]\n}\n","import {beforeHijrah} from '@formatjs_generated/datetimeformat.calendars/fallback-eras.js'\nimport {\n calendarEra,\n calendarFromEpochDayRaw,\n calendarToEpochDayRaw,\n calendarYearFromEra,\n calendarIds,\n monthsInYear,\n type CalendarId,\n} from '#packages/temporal/calendar.js'\nimport {\n correctLunisolarParts,\n joinCalendarRangeParts,\n calendarLabelFormatter,\n legacyISOEpochDay,\n} from '#packages/temporal/legacy-lunisolar-date.js'\nimport type {LegacyDateTimeProjection} from '#packages/temporal/legacy-extended-date.js'\n\ntype Parts = typeof Intl.DateTimeFormat.prototype.formatToParts\ntype Resolved = typeof Intl.DateTimeFormat.prototype.resolvedOptions\ntype RangeParts = typeof Intl.DateTimeFormat.prototype.formatRangeToParts\nconst Constructor = globalThis.Intl?.DateTimeFormat\nconst NumberConstructor = globalThis.Intl?.NumberFormat\nconst numberFormat =\n NumberConstructor &&\n Object.getOwnPropertyDescriptor(NumberConstructor.prototype, 'format')?.get\nconst dayMilliseconds = 86400000\nconst limit = 8640000000000000\nconst cycle = 146097 * dayMilliseconds\nconst reference = 1609459200000\nconst representatives = new Map<string, number>()\nconst numbers = new WeakMap<\n Intl.DateTimeFormat,\n Map<number, (value: number) => string>\n>()\nconst eraWidths = new WeakMap<\n Intl.DateTimeFormat,\n 'long' | 'short' | 'narrow'\n>()\nconst eraLabels = new WeakMap<Intl.DateTimeFormat, Map<string, string>>()\nconst clockFormatters = new WeakMap<Intl.DateTimeFormat, Intl.DateTimeFormat>()\nconst clockTypes = new Set([\n 'weekday',\n 'hour',\n 'minute',\n 'second',\n 'fractionalSecond',\n 'dayPeriod',\n 'timeZoneName',\n])\n\nfunction clipped(value: LegacyDateTimeProjection): boolean {\n return value.plain === true && Math.abs(value.milliseconds) > limit\n}\nfunction number(\n source: Intl.DateTimeFormat,\n options: Intl.ResolvedDateTimeFormatOptions,\n digits: number\n): (value: number) => string {\n let cache = numbers.get(source)\n if (!cache) {\n cache = new Map()\n numbers.set(source, cache)\n }\n const existing = cache.get(digits)\n if (existing) return existing\n if (!NumberConstructor || !numberFormat)\n throw new RangeError('Extended calendar dates require Intl.NumberFormat')\n const result = numberFormat.call(\n new NumberConstructor(options.locale, {\n numberingSystem: options.numberingSystem,\n useGrouping: false,\n minimumIntegerDigits: digits,\n maximumFractionDigits: 0,\n })\n )\n cache.set(digits, result)\n return result\n}\nfunction representative(\n calendar: CalendarId,\n code: string,\n leap: boolean\n): number {\n const key = `${calendar}:${code}:${leap}`\n const cached = representatives.get(key)\n if (cached !== undefined) return cached\n const first = calendarFromEpochDayRaw(\n calendar,\n Math.floor(reference / dayMilliseconds)\n ).year\n for (let delta = 0; delta < 32; delta++) {\n const year = first + delta\n if (calendar === 'hebrew' && (monthsInYear(calendar, year) === 13) !== leap)\n continue\n let epoch: number\n try {\n epoch = calendarToEpochDayRaw(\n calendar,\n {year, monthCode: code, day: 3},\n 'reject'\n )\n } catch (error) {\n if (error instanceof RangeError) continue\n throw error\n }\n representatives.set(key, epoch)\n return epoch\n }\n throw new RangeError('No host calendar label example')\n}\nfunction firstPart(parts: Intl.DateTimeFormatPart[], type: string): string {\n const value = parts.find(part => part.type === type)\n if (!value) throw new RangeError(`Unsupported host calendar pattern: ${type}`)\n return value.value\n}\nfunction eraOptions(\n options: Intl.ResolvedDateTimeFormatOptions,\n calendar: string,\n era: 'long' | 'short' | 'narrow'\n): Intl.DateTimeFormatOptions {\n return options.dateStyle || options.timeStyle\n ? {\n calendar,\n era,\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n timeZone: 'UTC',\n }\n : ({\n ...options,\n calendar,\n era,\n timeZone: 'UTC',\n } as Intl.DateTimeFormatOptions)\n}\nfunction eraWidth(\n source: Intl.DateTimeFormat,\n options: Intl.ResolvedDateTimeFormatOptions,\n raw: Intl.DateTimeFormatPart[],\n surrogate: number,\n parts: Parts\n): 'long' | 'short' | 'narrow' {\n const existing = eraWidths.get(source)\n if (existing) return existing\n if (\n options.era === 'long' ||\n options.era === 'short' ||\n options.era === 'narrow'\n ) {\n eraWidths.set(source, options.era)\n return options.era\n }\n const original = firstPart(raw, 'era')\n for (const width of ['long', 'short', 'narrow'] as const) {\n const formatter = new Constructor!(\n options.locale,\n eraOptions(options, options.calendar, width)\n )\n if (firstPart(parts.call(formatter, surrogate), 'era') === original) {\n eraWidths.set(source, width)\n return width\n }\n }\n throw new RangeError('Unsupported host era width')\n}\nfunction eraLabel(\n source: Intl.DateTimeFormat,\n calendar: CalendarId,\n era: string,\n options: Intl.ResolvedDateTimeFormatOptions,\n width: 'long' | 'short' | 'narrow',\n sample: number,\n parts: Parts\n): string {\n let cache = eraLabels.get(source)\n if (!cache) {\n cache = new Map()\n eraLabels.set(source, cache)\n }\n const key = `${calendar}:${era}:${width}`,\n existing = cache.get(key)\n if (existing !== undefined) return existing\n if (era === 'bh') {\n let locale = options.locale.split('-u-')[0]\n while (!beforeHijrah[locale] && locale.includes('-'))\n locale = locale.slice(0, locale.lastIndexOf('-'))\n const value = (beforeHijrah[locale] ?? beforeHijrah.en)[\n width === 'long' ? 0 : width === 'short' ? 1 : 2\n ]\n cache.set(key, value)\n return value\n }\n if (calendar === 'japanese' && (era === 'bce' || era === 'ce')) {\n calendar = 'gregory'\n sample = calendarToEpochDayRaw(\n 'iso8601',\n {year: era === 'bce' ? 0 : 2000, month: 1, day: 1},\n 'reject'\n )\n } else if (calendar === 'japanese') {\n sample = calendarToEpochDayRaw(\n 'iso8601',\n {year: calendarYearFromEra(calendar, era, 10), month: 7, day: 1},\n 'reject'\n )\n } else if (era === 'broc' || (calendar === 'ethiopic' && era === 'aa')) {\n sample = calendarToEpochDayRaw(\n calendar,\n {year: 0, month: 1, day: 1},\n 'reject'\n )\n }\n const formatter = new Constructor!(\n options.locale,\n eraOptions(options, calendar, width)\n )\n const value = firstPart(\n parts.call(formatter, sample * dayMilliseconds),\n 'era'\n )\n cache.set(key, value)\n return value\n}\n\nexport function legacyCalendarParts(\n value: LegacyDateTimeProjection,\n parts: Parts,\n resolved: Resolved\n): Intl.DateTimeFormatPart[] | undefined {\n const options = resolved.call(value.formatter),\n calendar = options.calendar as CalendarId\n if (\n calendar === 'iso8601' ||\n calendar === 'gregory' ||\n !calendarIds.includes(calendar)\n )\n return undefined\n if (value.plain !== true) {\n if (\n !Number.isFinite(value.milliseconds) ||\n Math.abs(value.milliseconds) > limit\n )\n return undefined\n const lunar = calendar === 'chinese' || calendar === 'dangi'\n let epoch = lunar\n ? undefined\n : legacyISOEpochDay(options.timeZone, value.milliseconds)\n let raw: Intl.DateTimeFormatPart[]\n let labels: Intl.DateTimeFormat\n let surrogate: number | undefined\n try {\n raw = parts.call(value.formatter, value.milliseconds)\n if (\n !raw.some(part =>\n ['year', 'month', 'day', 'era', 'relatedYear', 'yearName'].includes(\n part.type\n )\n )\n )\n return raw\n if (lunar) return correctLunisolarParts(value, raw, resolved)\n labels = calendarLabelFormatter(value.formatter, options, raw)\n } catch (error) {\n if (!(error instanceof RangeError) && !(error instanceof TypeError))\n throw error\n epoch ??= legacyISOEpochDay(options.timeZone, value.milliseconds)\n // Some host calendars fail at valid Date bounds; retain their clock and zone via Gregorian fields.\n let clock = clockFormatters.get(value.formatter)\n if (!clock) {\n clock = new Constructor!(options.locale, {\n ...options,\n calendar: 'gregory',\n } as Intl.DateTimeFormatOptions)\n clockFormatters.set(value.formatter, clock)\n }\n const clockParts = parts.call(clock, value.milliseconds)\n labels = calendarLabelFormatter(\n value.formatter,\n options,\n lunar ? parts.call(value.formatter, reference) : clockParts\n )\n const local = epoch * dayMilliseconds\n surrogate = local - Math.floor((local - 946684800000) / cycle) * cycle\n raw = parts\n .call(labels, surrogate)\n .map(part =>\n clockTypes.has(part.type)\n ? (clockParts.find(item => item.type === part.type) ?? part)\n : part\n )\n }\n // Keep the original local day when labels use a UTC surrogate.\n if (lunar)\n return correctLunisolarParts(\n {...value, formatter: labels},\n raw,\n resolved,\n surrogate,\n epoch\n )\n return restoreCalendarParts(value, raw, epoch!, labels, options, parts)\n }\n // Whole Gregorian cycles preserve weekday and clock in the plain UTC projection.\n const surrogate =\n value.milliseconds -\n Math.floor((value.milliseconds - 946684800000) / cycle) * cycle,\n raw = parts.call(value.formatter, surrogate)\n if (\n !raw.some(part =>\n ['year', 'month', 'day', 'era', 'relatedYear', 'yearName'].includes(\n part.type\n )\n )\n )\n return raw\n if (calendar === 'chinese' || calendar === 'dangi')\n return correctLunisolarParts(value, raw, resolved, surrogate)\n return restoreCalendarParts(\n value,\n raw,\n Math.floor(value.milliseconds / dayMilliseconds),\n value.formatter,\n options,\n parts\n )\n}\n\nfunction restoreCalendarParts(\n value: LegacyDateTimeProjection,\n raw: Intl.DateTimeFormatPart[],\n epoch: number,\n labels: Intl.DateTimeFormat,\n options: Intl.ResolvedDateTimeFormatOptions,\n parts: Parts\n): Intl.DateTimeFormatPart[] {\n const calendar = options.calendar as CalendarId,\n date = calendarFromEpochDayRaw(calendar, epoch),\n era = calendarEra(calendar, epoch, true),\n year = era?.eraYear ?? date.year,\n sample = representative(\n calendar,\n date.monthCode,\n monthsInYear(calendar, date.year) === 13\n ),\n controls = parts.call(labels, sample * dayMilliseconds),\n sampleEra = calendarEra(calendar, sample, true),\n sampleYear =\n sampleEra?.eraYear ?? calendarFromEpochDayRaw(calendar, sample).year,\n format = number(value.formatter, options, 1),\n formatTwo = number(value.formatter, options, 2),\n short = (value: number): string =>\n Array.from(formatTwo(value)).slice(-2).join(''),\n changes = new Map<string, string>()\n if (raw.some(part => part.type === 'year')) {\n const sampleText = firstPart(controls, 'year'),\n two =\n options.year === '2-digit' ||\n (options.year === undefined &&\n sampleText !== format(sampleYear) &&\n sampleText === short(sampleYear))\n changes.set('year', two ? short(year) : format(year))\n if (\n calendar === 'japanese' &&\n year === 1 &&\n era?.era !== 'ce' &&\n era?.era !== 'bce' &&\n !clipped(value)\n )\n changes.set(\n 'year',\n firstPart(parts.call(value.formatter, value.milliseconds), 'year')\n )\n }\n if (raw.some(part => part.type === 'month'))\n changes.set('month', firstPart(controls, 'month'))\n if (raw.some(part => part.type === 'day')) {\n const two = firstPart(controls, 'day') === formatTwo(3)\n changes.set('day', two ? formatTwo(date.day) : format(date.day))\n }\n if (era && raw.some(part => part.type === 'era'))\n changes.set(\n 'era',\n eraLabel(\n value.formatter,\n calendar,\n era.era,\n options,\n eraWidth(\n value.formatter,\n options,\n controls,\n sample * dayMilliseconds,\n parts\n ),\n sample,\n parts\n )\n )\n if (\n raw.every(\n part => !changes.has(part.type) || changes.get(part.type) === part.value\n )\n )\n return raw\n return raw.map(part =>\n changes.has(part.type) ? {...part, value: changes.get(part.type)!} : part\n )\n}\n\nexport function legacyCalendarRangeParts(\n first: LegacyDateTimeProjection,\n last: LegacyDateTimeProjection,\n parts: Parts,\n rangeParts: RangeParts,\n resolved: Resolved\n): Intl.DateTimeRangeFormatPart[] | undefined {\n const calendar = resolved.call(first.formatter).calendar\n if (\n calendar === 'iso8601' ||\n calendar === 'gregory' ||\n !calendarIds.includes(calendar as CalendarId)\n )\n return undefined\n const start =\n legacyCalendarParts(first, parts, resolved) ??\n correctLunisolarParts(\n first,\n parts.call(first.formatter, first.milliseconds),\n resolved\n ),\n end =\n legacyCalendarParts(last, parts, resolved) ??\n correctLunisolarParts(\n last,\n parts.call(last.formatter, last.milliseconds),\n resolved\n )\n if (!clipped(first) && !clipped(last)) {\n try {\n const same = (\n one: Intl.DateTimeFormatPart[],\n two: Intl.DateTimeFormatPart[]\n ): boolean =>\n one.length === two.length &&\n one.every(\n (part, index) =>\n part.type === two[index].type && part.value === two[index].value\n )\n if (\n same(start, parts.call(first.formatter, first.milliseconds)) &&\n same(end, parts.call(last.formatter, last.milliseconds))\n )\n return undefined\n } catch (error) {\n if (!(error instanceof RangeError) && !(error instanceof TypeError))\n throw error\n }\n }\n return joinCalendarRangeParts(first.formatter, start, end, rangeParts)\n}\n","import {YearFromTime} from '#packages/ecma262-abstract/DateOperations.js'\nimport {\n legacyCalendarParts,\n legacyCalendarRangeParts,\n} from '#packages/temporal/legacy-calendar-date.js'\nimport {\n correctLunisolarParts,\n lunisolarRangeParts,\n} from '#packages/temporal/legacy-lunisolar-date.js'\n\nexport const legacyTimeZoneName: unique symbol = Symbol()\n\nexport interface LegacyDateTimeProjection {\n formatter: Intl.DateTimeFormat\n milliseconds: number\n plain?: boolean\n [legacyTimeZoneName]?: string\n}\nconst limit = 8640000000000000\nconst cycle = 146097 * 86400000\nconst NumberConstructor = globalThis.Intl?.NumberFormat\nconst numberFormat =\n NumberConstructor &&\n Object.getOwnPropertyDescriptor(NumberConstructor.prototype, 'format')?.get\ntype Resolved = typeof Intl.DateTimeFormat.prototype.resolvedOptions\ntype Parts = typeof Intl.DateTimeFormat.prototype.formatToParts\ntype RangeParts = typeof Intl.DateTimeFormat.prototype.formatRangeToParts\ntype Format = (this: Intl.DateTimeFormat) => (value?: number) => string\nconst nativeParts = globalThis.Intl?.DateTimeFormat?.prototype.formatToParts\n\nfunction clipped(value: LegacyDateTimeProjection): boolean {\n return value.plain === true && Math.abs(value.milliseconds) > limit\n}\nfunction gregorian(\n formatter: Intl.DateTimeFormat,\n resolved: Resolved\n): boolean {\n const calendar = resolved.call(formatter).calendar\n return calendar === 'iso8601' || calendar === 'gregory'\n}\nfunction shift(value: LegacyDateTimeProjection): number {\n return clipped(value) ? (value.milliseconds < 0 ? cycle : -cycle) : 0\n}\nfunction years(\n value: LegacyDateTimeProjection,\n delta: number,\n resolved: Resolved\n): (text: string) => string {\n if (!delta) return text => text\n if (!NumberConstructor || !numberFormat)\n throw new RangeError('Extended Gregorian dates require Intl.NumberFormat')\n const options = resolved.call(value.formatter),\n formatter = new NumberConstructor(options.locale, {\n numberingSystem: options.numberingSystem,\n useGrouping: false,\n maximumFractionDigits: 0,\n }),\n format = numberFormat.call(formatter) as (value: number) => string,\n year = YearFromTime(value.milliseconds),\n surrogate = YearFromTime(value.milliseconds + delta),\n original = format(year <= 0 ? 1 - year : year),\n replacement = format(surrogate <= 0 ? 1 - surrogate : surrogate)\n // A 400-year shift preserves month/day/weekday and two-digit years.\n return text => (text === replacement ? original : text)\n}\n\nexport function legacyDateTimeParts(\n value: LegacyDateTimeProjection,\n parts: Parts,\n resolved: Resolved\n): Intl.DateTimeFormatPart[] {\n if (value[legacyTimeZoneName] !== undefined)\n return legacyDateTimeParts(\n {...value, [legacyTimeZoneName]: undefined},\n parts,\n resolved\n ).map(part =>\n part.type === 'timeZoneName'\n ? {...part, value: value[legacyTimeZoneName]!}\n : part\n )\n const calendar = legacyCalendarParts(value, parts, resolved)\n if (calendar) return calendar\n if (!clipped(value) || !gregorian(value.formatter, resolved))\n return correctLunisolarParts(\n value,\n parts.call(value.formatter, value.milliseconds),\n resolved\n )\n const delta = shift(value),\n rewrite = years(value, delta, resolved)\n return parts\n .call(value.formatter, value.milliseconds + delta)\n .map(part =>\n part.type === 'year' ? {...part, value: rewrite(part.value)} : part\n )\n}\n\nexport function legacyDateTimeFormat(\n value: LegacyDateTimeProjection,\n format: Format,\n parts: Parts,\n resolved: Resolved\n): string {\n if (value[legacyTimeZoneName] !== undefined)\n return legacyDateTimeParts(value, parts, resolved)\n .map(part => part.value)\n .join('')\n const calendar = legacyCalendarParts(value, parts, resolved)\n if (calendar) return calendar.map(part => part.value).join('')\n if (!clipped(value) || !gregorian(value.formatter, resolved)) {\n const calendar = resolved.call(value.formatter).calendar\n if (calendar !== 'chinese' && calendar !== 'dangi')\n return format.call(value.formatter)(value.milliseconds)\n const raw = parts.call(value.formatter, value.milliseconds),\n corrected = correctLunisolarParts(value, raw, resolved)\n return corrected === raw\n ? format.call(value.formatter)(value.milliseconds)\n : corrected.map(part => part.value).join('')\n }\n return legacyDateTimeParts(value, parts, resolved)\n .map(part => part.value)\n .join('')\n}\n\nfunction rangeShifts(\n first: LegacyDateTimeProjection,\n last: LegacyDateTimeProjection\n): [number, number] {\n const delta = shift(first) || shift(last)\n const fits = (value: LegacyDateTimeProjection): boolean =>\n Math.abs(value.milliseconds + delta) <= limit &&\n YearFromTime(value.milliseconds) <= 0 ===\n YearFromTime(value.milliseconds + delta) <= 0\n return fits(first) && fits(last)\n ? [delta, delta]\n : [shift(first), shift(last)]\n}\n\nexport function legacyDateTimeRangeParts(\n first: LegacyDateTimeProjection,\n last: LegacyDateTimeProjection,\n parts: RangeParts,\n resolved: Resolved\n): Intl.DateTimeRangeFormatPart[] {\n const extended = legacyCalendarRangeParts(\n first,\n last,\n nativeParts!,\n parts,\n resolved\n )\n if (extended) return extended\n const lunar = lunisolarRangeParts(first, last, parts, resolved)\n if (lunar) return lunar\n if (\n (!clipped(first) && !clipped(last)) ||\n !gregorian(first.formatter, resolved)\n )\n return parts.call(first.formatter, first.milliseconds, last.milliseconds)\n const [start, end] = rangeShifts(first, last),\n rewriteStart = years(first, start, resolved),\n rewriteEnd = years(last, end, resolved)\n return parts\n .call(first.formatter, first.milliseconds + start, last.milliseconds + end)\n .map(part =>\n part.type === 'year'\n ? {\n ...part,\n value: (part.source === 'endRange' ? rewriteEnd : rewriteStart)(\n part.value\n ),\n }\n : part\n )\n}\n\nexport function legacyDateTimeRangeFormat(\n first: LegacyDateTimeProjection,\n last: LegacyDateTimeProjection,\n format: typeof Intl.DateTimeFormat.prototype.formatRange,\n parts: RangeParts,\n resolved: Resolved\n): string {\n const extended = legacyCalendarRangeParts(\n first,\n last,\n nativeParts!,\n parts,\n resolved\n )\n if (extended) return extended.map(part => part.value).join('')\n const lunar = lunisolarRangeParts(first, last, parts, resolved)\n if (lunar) return lunar.map(part => part.value).join('')\n if (\n (!clipped(first) && !clipped(last)) ||\n !gregorian(first.formatter, resolved)\n )\n return format.call(first.formatter, first.milliseconds, last.milliseconds)\n return legacyDateTimeRangeParts(first, last, parts, resolved)\n .map(part => part.value)\n .join('')\n}\n","import {\n createHostTimeZoneOffset,\n type HostTimeZone,\n} from '#packages/temporal/host-timezone.js'\nimport {\n legacyTimeZoneName,\n type LegacyDateTimeProjection,\n} from '#packages/temporal/legacy-extended-date.js'\n\ntype Parts = typeof Intl.DateTimeFormat.prototype.formatToParts\nconst zones = new WeakMap<\n Intl.DateTimeFormatConstructor,\n Map<string, HostTimeZone['offsetNanoseconds'] | undefined>\n>()\nconst NumberConstructor = globalThis.Intl?.NumberFormat\nconst numberFormat =\n NumberConstructor &&\n Object.getOwnPropertyDescriptor(NumberConstructor.prototype, 'format')?.get\n\nexport function legacyHostTimeZone(\n Constructor: Intl.DateTimeFormatConstructor,\n timeZone: string,\n parts: Parts\n): HostTimeZone['offsetNanoseconds'] | undefined {\n let cache = zones.get(Constructor)\n if (!cache) {\n cache = new Map()\n zones.set(Constructor, cache)\n }\n if (cache.has(timeZone)) return cache.get(timeZone)\n let zone: HostTimeZone['offsetNanoseconds'] | undefined\n try {\n zone = createHostTimeZoneOffset(timeZone, {Constructor, parts})\n } catch (error) {\n if (!(error instanceof RangeError)) throw error\n }\n cache.set(timeZone, zone)\n return zone\n}\n\nexport function legacyZonedProjection(\n Constructor: Intl.DateTimeFormatConstructor,\n resolved: Intl.ResolvedDateTimeFormatOptions,\n selected: Record<string, unknown>,\n local: bigint,\n offset: bigint,\n parts: Parts\n): LegacyDateTimeProjection {\n const formatter = new Constructor(\n resolved.locale,\n Object.assign(Object.create(null), selected, {timeZone: 'UTC'})\n )\n const probe = parts.call(formatter, 0)\n let timeZoneName: string | undefined\n if (probe.some(part => part.type === 'timeZoneName')) {\n const long =\n selected.timeZoneName === 'long' ||\n selected.timeZoneName === 'longOffset' ||\n selected.timeZoneName === 'longGeneric' ||\n selected.timeStyle === 'full'\n timeZoneName = offsetName(Constructor, resolved, offset, long, parts)\n }\n const ms = local / 1_000_000n - (local < 0n && local % 1_000_000n ? 1n : 0n)\n return {\n formatter,\n milliseconds: Number(ms),\n plain: true,\n [legacyTimeZoneName]: timeZoneName,\n }\n}\n\nfunction offsetName(\n Constructor: Intl.DateTimeFormatConstructor,\n resolved: Intl.ResolvedDateTimeFormatOptions,\n offset: bigint,\n long: boolean,\n parts: Parts\n): string {\n const label = (timeZone: string, long: boolean, latin = false): string =>\n parts\n .call(\n new Constructor(resolved.locale, {\n timeZone,\n timeZoneName: long ? 'long' : 'short',\n numberingSystem: latin ? 'latn' : resolved.numberingSystem,\n hour: 'numeric',\n }),\n 0\n )\n .find(part => part.type === 'timeZoneName')!.value\n if (offset === 0n) return label('Etc/GMT', long)\n const pattern = label(offset < 0n ? 'Etc/GMT+1' : 'Etc/GMT-1', long, true)\n const separator = /01(\\D+)00/.exec(label('Etc/GMT-1', true, true))?.[1] ?? ':'\n const numberingSystem =\n resolved.numberingSystem === 'latn' || /01/.test(label('Etc/GMT-1', true))\n ? 'latn'\n : resolved.numberingSystem\n const seconds = Number((offset < 0n ? -offset : offset) / 1_000_000_000n)\n const hour = Math.floor(seconds / 3600),\n minute = Math.floor((seconds % 3600) / 60),\n second = seconds % 60\n if (!NumberConstructor || !numberFormat)\n throw new RangeError('Timezone offset labels require Intl.NumberFormat')\n const numeric = (digits: number): ((value: number) => string) =>\n numberFormat.call(\n new NumberConstructor(resolved.locale, {\n numberingSystem,\n minimumIntegerDigits: digits,\n useGrouping: false,\n maximumFractionDigits: 0,\n })\n )\n const number = numeric(long ? 2 : 1),\n two = numeric(2)\n const replacement =\n number(hour) +\n (long || minute || second ? separator + two(minute) : '') +\n (second ? separator + two(second) : '')\n return pattern.replace(/0?1(?:\\D+00)?/, replacement)\n}\n","import {ToString} from '#packages/ecma262-abstract/ToString.js'\nimport type {TemporalDateTimeValue} from '#packages/ecma402-abstract/DateTimeFormat/TemporalDateTime.js'\nimport type {DurationFields} from '#packages/temporal/duration-core.js'\nimport {\n legacyHostTimeZone,\n legacyZonedProjection,\n} from '#packages/temporal/legacy-zoned-date.js'\nimport {\n legacyDateTimeFormat,\n type LegacyDateTimeProjection,\n} from '#packages/temporal/legacy-extended-date.js'\n\nconst dateUTC = Date.UTC\n\ninterface DateTimeConstructor extends Intl.DateTimeFormatConstructor {\n __formatTemporal?: (\n value: TemporalDateTimeValue & {timeZone?: string},\n locales?: unknown,\n options?: unknown,\n localNanoseconds?: () => bigint\n ) => string\n}\nlet dateTimeConstructor = globalThis.Intl?.DateTimeFormat as\n | DateTimeConstructor\n | undefined\nlet temporalFormat = dateTimeConstructor?.__formatTemporal\nlet formatDate =\n dateTimeConstructor &&\n Object.getOwnPropertyDescriptor(dateTimeConstructor.prototype, 'format')?.get\nlet partsDate = dateTimeConstructor?.prototype.formatToParts\nlet resolvedDate = dateTimeConstructor?.prototype.resolvedOptions\nlet durationConstructor = (\n globalThis.Intl as\n | (typeof Intl & {\n DurationFormat?: new (\n locales?: unknown,\n options?: unknown\n ) => {format(value: DurationFields): string}\n })\n | undefined\n)?.DurationFormat\nlet formatDuration = durationConstructor?.prototype.format\n\nexport function configureLocaleFormatting(): void {\n dateTimeConstructor = globalThis.Intl?.DateTimeFormat as\n | DateTimeConstructor\n | undefined\n temporalFormat = dateTimeConstructor?.__formatTemporal\n formatDate =\n dateTimeConstructor &&\n Object.getOwnPropertyDescriptor(dateTimeConstructor.prototype, 'format')\n ?.get\n partsDate = dateTimeConstructor?.prototype.formatToParts\n resolvedDate = dateTimeConstructor?.prototype.resolvedOptions\n durationConstructor = (\n globalThis.Intl as\n | (typeof Intl & {\n DurationFormat?: new (\n locales?: unknown,\n options?: unknown\n ) => {format(value: DurationFields): string}\n })\n | undefined\n )?.DurationFormat\n formatDuration = durationConstructor?.prototype.format\n}\n\nexport function localeDuration(\n fields: DurationFields,\n locales: unknown,\n options: unknown,\n fallback: () => string\n): string {\n if (!durationConstructor || !formatDuration) return fallback()\n return formatDuration.call(new durationConstructor(locales, options), {\n ...fields,\n })\n}\n\nexport function localeDateTime(\n value: TemporalDateTimeValue & {timeZone?: string},\n locales: unknown,\n options: unknown,\n fallback: () => string,\n localNanoseconds?: () => bigint\n): string {\n if (!dateTimeConstructor || !formatDate || !resolvedDate) return fallback()\n if (temporalFormat)\n return temporalFormat(value, locales, options, localNanoseconds)\n const projection = legacyDateTimeProjection(\n dateTimeConstructor,\n value,\n locales,\n options,\n true,\n undefined,\n localNanoseconds\n )\n return legacyDateTimeFormat(projection, formatDate, partsDate!, resolvedDate)\n}\n\nexport interface LegacyDateTimeIntrinsics {\n resolvedOptions: typeof Intl.DateTimeFormat.prototype.resolvedOptions\n formatToParts: typeof Intl.DateTimeFormat.prototype.formatToParts\n}\n\nexport function legacyDateTimeProjection(\n Constructor: Intl.DateTimeFormatConstructor,\n value: TemporalDateTimeValue & {timeZone?: string},\n locales: unknown,\n options: unknown,\n localeMethod = true,\n intrinsics: LegacyDateTimeIntrinsics = {\n resolvedOptions: resolvedDate!,\n formatToParts: partsDate!,\n },\n localNanoseconds?: () => bigint\n): LegacyDateTimeProjection {\n const zoned = value.kind === 'ZonedDateTime' && localNanoseconds !== undefined\n const host = zoned\n ? legacyHostTimeZone(Constructor, value.timeZone!, intrinsics.formatToParts)\n : undefined\n let source: Record<string, unknown> | undefined\n const snapshot: Record<string, unknown> = Object.create(null)\n const proxy = new Proxy(Object.create(null), {\n get(_target, key) {\n if (!source) {\n if (options === null) throw new TypeError('Invalid options')\n source = options === undefined ? Object.create(null) : Object(options)\n }\n if (typeof key !== 'string') return Reflect.get(source!, key)\n if (!Object.prototype.hasOwnProperty.call(snapshot, key)) {\n const raw = Reflect.get(source!, key)\n if (\n key === 'timeZone' &&\n value.kind === 'ZonedDateTime' &&\n raw !== undefined\n )\n throw new TypeError('timeZone option conflicts with ZonedDateTime')\n snapshot[key] = legacyDateTimeOption(key, raw)\n }\n return key === 'timeZone' && value.kind === 'ZonedDateTime'\n ? zoned && !host\n ? 'UTC'\n : value.timeZone\n : snapshot[key]\n },\n })\n const first = new Constructor(locales as string | string[] | undefined, proxy)\n const resolved = intrinsics.resolvedOptions.call(first)\n if (\n value.calendar !== undefined &&\n value.calendar !== resolved.calendar &&\n (value.calendar !== 'iso8601' ||\n value.kind === 'PlainYearMonth' ||\n value.kind === 'PlainMonthDay')\n )\n throw new RangeError('Temporal calendar does not match DateTimeFormat')\n const date = ['weekday', 'year', 'month', 'day']\n const time = [\n 'dayPeriod',\n 'hour',\n 'minute',\n 'second',\n 'fractionalSecondDigits',\n ]\n const required =\n value.kind === 'PlainDate'\n ? date\n : value.kind === 'PlainYearMonth'\n ? ['year', 'month']\n : value.kind === 'PlainMonthDay'\n ? ['month', 'day']\n : value.kind === 'PlainTime'\n ? time\n : [...date, ...time]\n const allowed = [...required]\n if (value.kind !== 'PlainTime' && value.kind !== 'PlainMonthDay')\n allowed.push('era')\n const instant = value.kind === 'Instant' || value.kind === 'ZonedDateTime'\n if (instant) allowed.push('timeZoneName')\n const selected: Record<string, unknown> = Object.create(null)\n for (const key of [\n 'calendar',\n 'numberingSystem',\n 'localeMatcher',\n 'hour12',\n 'hourCycle',\n 'formatMatcher',\n ])\n selected[key] = snapshot[key]\n selected.timeZone = instant ? resolved.timeZone : 'UTC'\n const dateStyle = snapshot.dateStyle,\n timeStyle = snapshot.timeStyle\n if (\n localeMethod &&\n ((value.kind === 'PlainTime' && dateStyle !== undefined) ||\n (!instant &&\n value.kind !== 'PlainDateTime' &&\n value.kind !== 'PlainTime' &&\n timeStyle !== undefined))\n )\n throw new TypeError('DateTimeFormat style conflicts with required type')\n if (dateStyle !== undefined || timeStyle !== undefined) {\n const plainDate =\n value.kind === 'PlainDate' ||\n value.kind === 'PlainYearMonth' ||\n value.kind === 'PlainMonthDay'\n if (\n (plainDate && dateStyle === undefined) ||\n (value.kind === 'PlainTime' && timeStyle === undefined)\n )\n throw new TypeError(\n 'DateTimeFormat styles do not overlap the Temporal type'\n )\n const styleFields = legacyStyleFields(\n Constructor,\n resolved,\n dateStyle,\n timeStyle,\n intrinsics.formatToParts\n )\n if (Object.keys(styleFields).some(key => !allowed.includes(key))) {\n for (const key of allowed) selected[key] = styleFields[key]\n if (styleFields.hour !== undefined && allowed.includes('hour'))\n selected.hourCycle = resolved.hourCycle\n } else {\n selected.dateStyle = dateStyle\n selected.timeStyle = timeStyle\n }\n } else {\n for (const key of allowed) selected[key] = snapshot[key]\n if (required.every(key => snapshot[key] === undefined)) {\n if (\n !instant &&\n [...date, ...time].some(key => snapshot[key] !== undefined)\n )\n throw new TypeError(\n 'DateTimeFormat options do not overlap the Temporal type'\n )\n const defaults =\n value.kind === 'PlainTime'\n ? ['hour', 'minute', 'second']\n : value.kind === 'PlainDate'\n ? ['year', 'month', 'day']\n : value.kind === 'PlainYearMonth' || value.kind === 'PlainMonthDay'\n ? required\n : ['year', 'month', 'day', 'hour', 'minute', 'second']\n for (const key of defaults) selected[key] = 'numeric'\n if (value.kind === 'ZonedDateTime' && selected.timeZoneName === undefined)\n selected.timeZoneName = 'short'\n }\n }\n const formatter = new Constructor(resolved.locale, selected)\n const ns = value.epochNanoseconds\n if (zoned) {\n const local = localNanoseconds!()\n if (!host || host(ns) !== local - ns)\n return legacyZonedProjection(\n Constructor,\n resolved,\n selected,\n local,\n local - ns,\n intrinsics.formatToParts\n )\n }\n const ms = ns / 1_000_000n - (ns < 0n && ns % 1_000_000n ? 1n : 0n)\n return {formatter, milliseconds: Number(ms), plain: !instant}\n}\n\nfunction legacyStyleFields(\n Constructor: Intl.DateTimeFormatConstructor,\n resolved: Intl.ResolvedDateTimeFormatOptions,\n dateStyle: unknown,\n timeStyle: unknown,\n formatToParts: typeof Intl.DateTimeFormat.prototype.formatToParts\n): Record<string, unknown> {\n const controls = {\n calendar: resolved.calendar,\n numberingSystem: resolved.numberingSystem,\n timeZone: 'UTC',\n hourCycle: resolved.hourCycle,\n }\n const style = new Constructor(resolved.locale, {\n ...controls,\n dateStyle,\n timeStyle,\n } as Intl.DateTimeFormatOptions)\n const probes = [\n dateUTC(2006, 10, 22, 7, 8, 9),\n dateUTC(1991, 1, 3, 17, 18, 19),\n ]\n const field = (type: string): string =>\n type === 'relatedYear' || type === 'yearName' ? 'year' : type\n const parts = probes.map(probe => formatToParts.call(style, probe))\n const defaults: Record<string, string> = {\n weekday: 'long',\n era: 'short',\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n second: '2-digit',\n timeZoneName: 'short',\n }\n const seed: Record<string, unknown> = Object.create(null)\n for (const part of parts[0]) {\n const key = field(part.type)\n if (defaults[key] !== undefined) seed[key] = defaults[key]\n }\n const text = (values: Intl.DateTimeFormatPart[], key: string): string =>\n values\n .filter(part => field(part.type) === key)\n .map(part => part.value)\n .join('')\n const result: Record<string, unknown> = {...seed}\n for (const key of Object.keys(seed)) {\n const widths =\n key === 'year' ||\n key === 'day' ||\n key === 'hour' ||\n key === 'minute' ||\n key === 'second'\n ? ['numeric', '2-digit']\n : key === 'month'\n ? ['numeric', '2-digit', 'long', 'short', 'narrow']\n : key === 'timeZoneName'\n ? ['short', 'long']\n : ['long', 'short', 'narrow']\n for (const width of widths) {\n const candidate = new Constructor(resolved.locale, {\n ...controls,\n ...seed,\n [key]: width,\n } as Intl.DateTimeFormatOptions)\n if (\n probes.every(\n (probe, index) =>\n text(formatToParts.call(candidate, probe), key) ===\n text(parts[index], key)\n )\n ) {\n result[key] = width\n break\n }\n }\n }\n return result\n}\n\nexport function legacyDateTimeOption(key: string, value: unknown): unknown {\n if (value === undefined) return undefined\n if (key === 'hour12') return !!value\n if (key === 'fractionalSecondDigits') return +(value as number)\n return ToString(value)\n}\n","const getTime = Function.prototype.call.bind(Date.prototype.getTime)\nexport function createDateToTemporalInstant<T>(\n create: (ns: bigint) => T\n): (this: unknown) => T {\n return {\n toTemporalInstant(this: unknown): T {\n return create(BigInt(getTime(this)) * 1_000_000n)\n },\n }.toTemporalInstant\n}\n","const constructors = [\n 'Instant',\n 'Duration',\n 'PlainDate',\n 'PlainDateTime',\n 'PlainTime',\n 'PlainYearMonth',\n 'PlainMonthDay',\n 'ZonedDateTime',\n]\nconst nowMethods = [\n 'instant',\n 'timeZoneId',\n 'plainDateTimeISO',\n 'plainDateISO',\n 'plainTimeISO',\n 'zonedDateTimeISO',\n]\nexport function needsTemporal(): boolean {\n const temporal = (globalThis as {Temporal?: Record<string, unknown>}).Temporal\n if (!temporal || typeof temporal !== 'object') return true\n for (let i = 0; i < constructors.length; i++)\n if (typeof temporal[constructors[i]] !== 'function') return true\n const now = temporal.Now as Record<string, unknown> | undefined\n if (!now || typeof now !== 'object') return true\n for (let i = 0; i < nowMethods.length; i++)\n if (typeof now[nowMethods[i]] !== 'function') return true\n return false\n}\n","// ../../../../../../../../execroot/_main/bazel-out/local_linux_gnu-opt/bin/packages/bigdecimal/index.ts\nconst DIV_PRECISION = 40;\nfunction removeTrailingZeros(mantissa, exponent) {\n\tif (mantissa === 0n) return [0n, 0];\n\tif (mantissa % 10n !== 0n) return [mantissa, exponent];\n\twhile (mantissa % 100000000n === 0n && Number.isSafeInteger(exponent) && Number.isSafeInteger(exponent + 8)) {\n\t\tmantissa /= 100000000n;\n\t\texponent += 8;\n\t}\n\twhile (mantissa % 10n === 0n) {\n\t\tmantissa /= 10n;\n\t\texponent++;\n\t}\n\treturn [mantissa, exponent];\n}\nfunction bigintAbs(n) {\n\treturn n < 0n ? -n : n;\n}\nfunction digitCount(n) {\n\tif (n === 0n) return 1;\n\tif (n < 0n) n = -n;\n\tlet count = 0;\n\tconst big15 = 1000000000000000n;\n\twhile (n >= big15) {\n\t\tn /= big15;\n\t\tcount += 15;\n\t}\n\tlet r = Number(n);\n\twhile (r >= 1) {\n\t\tr /= 10;\n\t\tcount++;\n\t}\n\treturn count;\n}\nconst TEN_BIGINT = 10n;\nconst SMALL_POWERS_OF_TEN = [1n];\nfunction bigintPow10(n) {\n\tif (n <= 0) return 1n;\n\tif (n <= 64 && Number.isInteger(n)) {\n\t\tfor (let i = SMALL_POWERS_OF_TEN.length; i <= n; i++) SMALL_POWERS_OF_TEN.push(SMALL_POWERS_OF_TEN[i - 1] * TEN_BIGINT);\n\t\treturn SMALL_POWERS_OF_TEN[n];\n\t}\n\tlet result = 1n;\n\tlet base = TEN_BIGINT;\n\tlet exp = n;\n\twhile (exp > 0) {\n\t\tif (exp & 1) result *= base;\n\t\tbase *= base;\n\t\texp >>= 1;\n\t}\n\treturn result;\n}\nfunction parseDecimalString(s) {\n\ts = s.trim();\n\tif (s === \"NaN\") return {\n\t\tmantissa: 0n,\n\t\texponent: 0,\n\t\tspecial: 1,\n\t\tnegativeZero: false\n\t};\n\tif (s === \"Infinity\" || s === \"+Infinity\") return {\n\t\tmantissa: 0n,\n\t\texponent: 0,\n\t\tspecial: 2,\n\t\tnegativeZero: false\n\t};\n\tif (s === \"-Infinity\") return {\n\t\tmantissa: 0n,\n\t\texponent: 0,\n\t\tspecial: 3,\n\t\tnegativeZero: false\n\t};\n\tlet negative = false;\n\tlet idx = 0;\n\tif (s[idx] === \"-\") {\n\t\tnegative = true;\n\t\tidx++;\n\t} else if (s[idx] === \"+\") idx++;\n\tlet eIdx = s.indexOf(\"e\", idx);\n\tif (eIdx === -1) eIdx = s.indexOf(\"E\", idx);\n\tlet sciExp = 0;\n\tlet numPart;\n\tif (eIdx !== -1) {\n\t\tsciExp = parseInt(s.substring(eIdx + 1), 10);\n\t\tnumPart = s.substring(idx, eIdx);\n\t} else numPart = s.substring(idx);\n\tconst dotIdx = numPart.indexOf(\".\");\n\tlet intPart;\n\tlet fracPart;\n\tif (dotIdx !== -1) {\n\t\tintPart = numPart.substring(0, dotIdx);\n\t\tfracPart = numPart.substring(dotIdx + 1);\n\t} else {\n\t\tintPart = numPart;\n\t\tfracPart = \"\";\n\t}\n\tconst combined = intPart + fracPart;\n\tconst exponent = sciExp - fracPart.length;\n\tif (combined === \"\" || combined === \"0\" || /^0+$/.test(combined)) return {\n\t\tmantissa: 0n,\n\t\texponent: 0,\n\t\tspecial: 0,\n\t\tnegativeZero: negative\n\t};\n\tlet mantissa = BigInt(combined);\n\tif (negative) mantissa = -mantissa;\n\tconst [normMantissa, normExponent] = removeTrailingZeros(mantissa, exponent);\n\treturn {\n\t\tmantissa: normMantissa,\n\t\texponent: normExponent,\n\t\tspecial: 0,\n\t\tnegativeZero: false\n\t};\n}\nvar BigDecimal = class BigDecimal {\n\tconstructor(value) {\n\t\tif (typeof value === \"bigint\") {\n\t\t\tconst [m, e] = removeTrailingZeros(value, 0);\n\t\t\tthis._mantissa = m;\n\t\t\tthis._exponent = e;\n\t\t\tthis._special = 0;\n\t\t\tthis._negativeZero = false;\n\t\t\treturn;\n\t\t}\n\t\tif (typeof value === \"number\") {\n\t\t\tif (Number.isNaN(value)) {\n\t\t\t\tthis._mantissa = 0n;\n\t\t\t\tthis._exponent = 0;\n\t\t\t\tthis._special = 1;\n\t\t\t\tthis._negativeZero = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (value === Infinity) {\n\t\t\t\tthis._mantissa = 0n;\n\t\t\t\tthis._exponent = 0;\n\t\t\t\tthis._special = 2;\n\t\t\t\tthis._negativeZero = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (value === -Infinity) {\n\t\t\t\tthis._mantissa = 0n;\n\t\t\t\tthis._exponent = 0;\n\t\t\t\tthis._special = 3;\n\t\t\t\tthis._negativeZero = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (value === 0) {\n\t\t\t\tthis._mantissa = 0n;\n\t\t\t\tthis._exponent = 0;\n\t\t\t\tthis._special = 0;\n\t\t\t\tthis._negativeZero = Object.is(value, -0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (Number.isSafeInteger(value)) {\n\t\t\t\tconst [m, e] = removeTrailingZeros(BigInt(value), 0);\n\t\t\t\tthis._mantissa = m;\n\t\t\t\tthis._exponent = e;\n\t\t\t\tthis._special = 0;\n\t\t\t\tthis._negativeZero = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvalue = String(value);\n\t\t}\n\t\tconst parsed = parseDecimalString(value);\n\t\tthis._mantissa = parsed.mantissa;\n\t\tthis._exponent = parsed.exponent;\n\t\tthis._special = parsed.special;\n\t\tthis._negativeZero = parsed.negativeZero;\n\t}\n\tstatic _create(mantissa, exponent, special, negativeZero) {\n\t\tconst bd = Object.create(BigDecimal.prototype);\n\t\tbd._mantissa = mantissa;\n\t\tbd._exponent = exponent;\n\t\tbd._special = special;\n\t\tbd._negativeZero = negativeZero;\n\t\treturn bd;\n\t}\n\tstatic _coerce(v) {\n\t\treturn v instanceof BigDecimal ? v : new BigDecimal(v);\n\t}\n\ttimes(y) {\n\t\tconst other = BigDecimal._coerce(y);\n\t\tif (this._special || other._special) return this._specialArith(other, \"times\");\n\t\tif (this._mantissa === 0n || other._mantissa === 0n) {\n\t\t\tconst negZero = this._isSignNegative() ? !other._isSignNegative() : other._isSignNegative();\n\t\t\treturn BigDecimal._create(0n, 0, 0, negZero);\n\t\t}\n\t\tconst [nm, ne] = removeTrailingZeros(this._mantissa * other._mantissa, this._exponent + other._exponent);\n\t\treturn BigDecimal._create(nm, ne, 0, false);\n\t}\n\tdiv(y) {\n\t\tconst other = BigDecimal._coerce(y);\n\t\tif (this._special || other._special) return this._specialArith(other, \"div\");\n\t\tif (other._mantissa === 0n) {\n\t\t\tif (this._mantissa === 0n) return BigDecimal._create(0n, 0, 1, false);\n\t\t\tconst neg = this._isSignNegative() !== other._isSignNegative();\n\t\t\treturn BigDecimal._create(0n, 0, neg ? 3 : 2, false);\n\t\t}\n\t\tif (this._mantissa === 0n) {\n\t\t\tconst negZero = this._isSignNegative() !== other._isSignNegative();\n\t\t\treturn BigDecimal._create(0n, 0, 0, negZero);\n\t\t}\n\t\tconst exponent = this._exponent - other._exponent;\n\t\tconst newExponent = exponent - DIV_PRECISION;\n\t\tif ((other._mantissa === 1n || other._mantissa === -1n) && Number.isSafeInteger(exponent) && Number.isSafeInteger(newExponent)) return BigDecimal._create(other._mantissa === 1n ? this._mantissa : -this._mantissa, exponent === 0 ? 0 : exponent, 0, false);\n\t\tconst [nm, ne] = removeTrailingZeros(this._mantissa * bigintPow10(DIV_PRECISION) / other._mantissa, newExponent);\n\t\treturn BigDecimal._create(nm, ne, 0, false);\n\t}\n\tplus(y) {\n\t\tconst other = BigDecimal._coerce(y);\n\t\tif (this._special || other._special) return this._specialArith(other, \"plus\");\n\t\tif (this._mantissa === 0n && other._mantissa === 0n) {\n\t\t\tconst negZero = this._negativeZero && other._negativeZero;\n\t\t\treturn BigDecimal._create(0n, 0, 0, negZero);\n\t\t}\n\t\tif (this._mantissa === 0n) return other;\n\t\tif (other._mantissa === 0n) return this;\n\t\tlet m1 = this._mantissa;\n\t\tlet m2 = other._mantissa;\n\t\tconst e1 = this._exponent;\n\t\tconst e2 = other._exponent;\n\t\tconst minE = Math.min(e1, e2);\n\t\tif (e1 > minE) m1 *= bigintPow10(e1 - minE);\n\t\tif (e2 > minE) m2 *= bigintPow10(e2 - minE);\n\t\tconst sum = m1 + m2;\n\t\tif (sum === 0n) return BigDecimal._create(0n, 0, 0, false);\n\t\tconst [nm, ne] = removeTrailingZeros(sum, minE);\n\t\treturn BigDecimal._create(nm, ne, 0, false);\n\t}\n\tminus(y) {\n\t\treturn this.plus(BigDecimal._coerce(y).negated());\n\t}\n\tmod(y) {\n\t\tconst other = BigDecimal._coerce(y);\n\t\tif (this._special || other._special) {\n\t\t\tif (this._special === 1 || other._special === 1) return BigDecimal._create(0n, 0, 1, false);\n\t\t\tif (this._special === 2 || this._special === 3) return BigDecimal._create(0n, 0, 1, false);\n\t\t\tif (other._special === 2 || other._special === 3) return this;\n\t\t}\n\t\tif (other._mantissa === 0n) return BigDecimal._create(0n, 0, 1, false);\n\t\tif (this._mantissa === 0n) return this;\n\t\tlet m1 = this._mantissa;\n\t\tlet m2 = other._mantissa;\n\t\tconst e1 = this._exponent;\n\t\tconst e2 = other._exponent;\n\t\tconst minE = Math.min(e1, e2);\n\t\tif (e1 > minE) m1 *= bigintPow10(e1 - minE);\n\t\tif (e2 > minE) m2 *= bigintPow10(e2 - minE);\n\t\tconst remainder = m1 % m2;\n\t\tif (remainder === 0n) return BigDecimal._create(0n, 0, 0, false);\n\t\tconst [nm, ne] = removeTrailingZeros(remainder, minE);\n\t\treturn BigDecimal._create(nm, ne, 0, false);\n\t}\n\tabs() {\n\t\tif (this._special === 1) return this;\n\t\tif (this._special === 3) return BigDecimal._create(0n, 0, 2, false);\n\t\treturn BigDecimal._create(bigintAbs(this._mantissa), this._exponent, this._special, false);\n\t}\n\tnegated() {\n\t\tif (this._special === 1) return this;\n\t\tif (this._special === 2) return BigDecimal._create(0n, 0, 3, false);\n\t\tif (this._special === 3) return BigDecimal._create(0n, 0, 2, false);\n\t\tif (this._mantissa === 0n) return BigDecimal._create(0n, 0, 0, !this._negativeZero);\n\t\treturn BigDecimal._create(-this._mantissa, this._exponent, 0, false);\n\t}\n\tpow(n) {\n\t\tif (this._special === 1) return this;\n\t\tif (n === 0) return new BigDecimal(1);\n\t\tif (n < 0) return new BigDecimal(1).div(this.pow(-n));\n\t\tif (this._special === 2) return this;\n\t\tif (this._special === 3) return n % 2 === 0 ? BigDecimal._create(0n, 0, 2, false) : this;\n\t\tif (this._mantissa === 0n) return new BigDecimal(0);\n\t\tconst [nm, ne] = removeTrailingZeros(this._mantissa ** BigInt(n), this._exponent * n);\n\t\treturn BigDecimal._create(nm, ne, 0, false);\n\t}\n\tfloor() {\n\t\tif (this._special !== 0) return this;\n\t\tif (this._mantissa === 0n) return this;\n\t\tif (this._exponent >= 0) return this;\n\t\tconst divisor = bigintPow10(-this._exponent);\n\t\tconst m = this._mantissa;\n\t\tlet q = m / divisor;\n\t\tif (m < 0n && m % divisor !== 0n) q -= 1n;\n\t\tif (q === 0n) {\n\t\t\tconst negZero = this._mantissa < 0n;\n\t\t\treturn BigDecimal._create(0n, 0, 0, negZero);\n\t\t}\n\t\tconst [nm, ne] = removeTrailingZeros(q, 0);\n\t\treturn BigDecimal._create(nm, ne, 0, false);\n\t}\n\tceil() {\n\t\tif (this._special !== 0) return this;\n\t\tif (this._mantissa === 0n) return this;\n\t\tif (this._exponent >= 0) return this;\n\t\tconst divisor = bigintPow10(-this._exponent);\n\t\tconst m = this._mantissa;\n\t\tlet q = m / divisor;\n\t\tif (m > 0n && m % divisor !== 0n) q += 1n;\n\t\tif (q === 0n) return BigDecimal._create(0n, 0, 0, false);\n\t\tconst [nm, ne] = removeTrailingZeros(q, 0);\n\t\treturn BigDecimal._create(nm, ne, 0, false);\n\t}\n\tlog(base) {\n\t\tif (this._special === 1) return this;\n\t\tif (this._special === 3) return BigDecimal._create(0n, 0, 1, false);\n\t\tif (this._special === 2) return BigDecimal._create(0n, 0, 2, false);\n\t\tif (this._mantissa < 0n) return BigDecimal._create(0n, 0, 1, false);\n\t\tif (this._mantissa === 0n) return BigDecimal._create(0n, 0, 3, false);\n\t\tif (base === 10) return this._log10();\n\t\tconst log10x = this._log10();\n\t\tconst log10b = new BigDecimal(Math.log10(base));\n\t\treturn log10x.div(log10b);\n\t}\n\t_log10() {\n\t\tconst absMantissa = bigintAbs(this._mantissa);\n\t\tconst digits = digitCount(absMantissa);\n\t\tlet log10Mantissa;\n\t\tif (digits <= 15) log10Mantissa = Math.log10(Number(absMantissa));\n\t\telse {\n\t\t\tconst shift = digits - 17;\n\t\t\tconst leading = absMantissa / bigintPow10(shift);\n\t\t\tlog10Mantissa = Math.log10(Number(leading)) + shift;\n\t\t}\n\t\tconst totalLog10 = log10Mantissa + this._exponent;\n\t\treturn new BigDecimal(totalLog10);\n\t}\n\teq(y) {\n\t\tconst other = BigDecimal._coerce(y);\n\t\tif (this._special === 1 || other._special === 1) return false;\n\t\tif (this._special !== other._special) return false;\n\t\tif (this._special !== 0) return true;\n\t\tif (this._mantissa === 0n && other._mantissa === 0n) return true;\n\t\treturn this._mantissa === other._mantissa && this._exponent === other._exponent;\n\t}\n\t_compareTo(other) {\n\t\tif (this._special === 1 || other._special === 1) return NaN;\n\t\tif (this._special === 2) return other._special === 2 ? 0 : 1;\n\t\tif (this._special === 3) return other._special === 3 ? 0 : -1;\n\t\tif (other._special === 2) return -1;\n\t\tif (other._special === 3) return 1;\n\t\tconst thisZero = this._mantissa === 0n;\n\t\tconst otherZero = other._mantissa === 0n;\n\t\tif (thisZero && otherZero) return 0;\n\t\tif (thisZero) return other._mantissa > 0n ? -1 : 1;\n\t\tif (otherZero) return this._mantissa > 0n ? 1 : -1;\n\t\tconst thisNeg = this._mantissa < 0n;\n\t\tif (thisNeg !== other._mantissa < 0n) return thisNeg ? -1 : 1;\n\t\tlet m1 = this._mantissa;\n\t\tlet m2 = other._mantissa;\n\t\tconst e1 = this._exponent;\n\t\tconst e2 = other._exponent;\n\t\tconst minE = Math.min(e1, e2);\n\t\tif (e1 > minE) m1 *= bigintPow10(e1 - minE);\n\t\tif (e2 > minE) m2 *= bigintPow10(e2 - minE);\n\t\tif (m1 < m2) return -1;\n\t\tif (m1 > m2) return 1;\n\t\treturn 0;\n\t}\n\tlessThan(y) {\n\t\treturn this._compareTo(BigDecimal._coerce(y)) === -1;\n\t}\n\tgreaterThan(y) {\n\t\treturn this._compareTo(BigDecimal._coerce(y)) === 1;\n\t}\n\tlessThanOrEqualTo(y) {\n\t\tconst c = this._compareTo(BigDecimal._coerce(y));\n\t\treturn c === 0 || c === -1;\n\t}\n\tgreaterThanOrEqualTo(y) {\n\t\tconst c = this._compareTo(BigDecimal._coerce(y));\n\t\treturn c === 0 || c === 1;\n\t}\n\tisZero() {\n\t\treturn this._special === 0 && this._mantissa === 0n;\n\t}\n\tisNaN() {\n\t\treturn this._special === 1;\n\t}\n\tisFinite() {\n\t\treturn this._special === 0;\n\t}\n\tisNegative() {\n\t\tif (this._special === 1) return false;\n\t\tif (this._special === 3) return true;\n\t\tif (this._special === 2) return false;\n\t\tif (this._mantissa === 0n) return this._negativeZero;\n\t\treturn this._mantissa < 0n;\n\t}\n\tisPositive() {\n\t\tif (this._special === 1) return false;\n\t\tif (this._special === 2) return true;\n\t\tif (this._special === 3) return false;\n\t\tif (this._mantissa === 0n) return !this._negativeZero;\n\t\treturn this._mantissa > 0n;\n\t}\n\tisInteger() {\n\t\tif (this._special !== 0) return false;\n\t\tif (this._mantissa === 0n) return true;\n\t\treturn this._exponent >= 0;\n\t}\n\ttoJSON() {\n\t\treturn this.toString();\n\t}\n\ttoNumber() {\n\t\tif (this._special === 1) return NaN;\n\t\tif (this._special === 2) return Infinity;\n\t\tif (this._special === 3) return -Infinity;\n\t\tif (this._mantissa === 0n) return this._negativeZero ? -0 : 0;\n\t\tif (this._exponent === 0) return Number(this._mantissa);\n\t\treturn Number(this.toString());\n\t}\n\ttoString() {\n\t\tif (this._special === 1) return \"NaN\";\n\t\tif (this._special === 2) return \"Infinity\";\n\t\tif (this._special === 3) return \"-Infinity\";\n\t\tif (this._mantissa === 0n) return \"0\";\n\t\tconst negative = this._mantissa < 0n;\n\t\tconst absStr = bigintAbs(this._mantissa).toString();\n\t\tconst prefix = negative ? \"-\" : \"\";\n\t\tif (this._exponent === 0) return prefix + absStr;\n\t\tif (this._exponent > 0) return prefix + absStr + \"0\".repeat(this._exponent);\n\t\tconst decimalPlaces = -this._exponent;\n\t\tif (decimalPlaces < absStr.length) {\n\t\t\tconst intPart = absStr.slice(0, absStr.length - decimalPlaces);\n\t\t\tconst fracPart = absStr.slice(absStr.length - decimalPlaces);\n\t\t\treturn prefix + intPart + \".\" + fracPart;\n\t\t} else {\n\t\t\tconst leadingZeros = decimalPlaces - absStr.length;\n\t\t\treturn prefix + \"0.\" + \"0\".repeat(leadingZeros) + absStr;\n\t\t}\n\t}\n\tstatic pow(base, exp) {\n\t\tconst n = typeof exp === \"number\" ? exp : exp.toNumber();\n\t\tif (typeof base === \"number\" && base === 10) return BigDecimal._create(1n, n, 0, false);\n\t\treturn (base instanceof BigDecimal ? base : new BigDecimal(base)).pow(n);\n\t}\n\tstatic set(_config) {}\n\t_isSignNegative() {\n\t\tif (this._special === 3) return true;\n\t\tif (this._mantissa < 0n) return true;\n\t\tif (this._mantissa === 0n) return this._negativeZero;\n\t\treturn false;\n\t}\n\t_specialArith(other, op) {\n\t\tconst a = this._special;\n\t\tconst b = other._special;\n\t\tif (a === 1 || b === 1) return BigDecimal._create(0n, 0, 1, false);\n\t\tconst aNeg = this._isSignNegative();\n\t\tconst bNeg = other._isSignNegative();\n\t\tconst aInf = a === 2 || a === 3;\n\t\tconst bInf = b === 2 || b === 3;\n\t\tif (op === \"times\") {\n\t\t\tif (aInf || bInf) {\n\t\t\t\tif (aInf && other._mantissa === 0n && !bInf || bInf && this._mantissa === 0n && !aInf) return BigDecimal._create(0n, 0, 1, false);\n\t\t\t\tconst neg = aNeg !== bNeg;\n\t\t\t\treturn BigDecimal._create(0n, 0, neg ? 3 : 2, false);\n\t\t\t}\n\t\t}\n\t\tif (op === \"div\") {\n\t\t\tif (aInf && bInf) return BigDecimal._create(0n, 0, 1, false);\n\t\t\tif (aInf) {\n\t\t\t\tconst neg = aNeg !== bNeg;\n\t\t\t\treturn BigDecimal._create(0n, 0, neg ? 3 : 2, false);\n\t\t\t}\n\t\t\tif (bInf) {\n\t\t\t\tconst negZero = aNeg !== bNeg;\n\t\t\t\treturn BigDecimal._create(0n, 0, 0, negZero);\n\t\t\t}\n\t\t}\n\t\tif (op === \"plus\") {\n\t\t\tif (aInf && bInf) {\n\t\t\t\tif (aNeg !== bNeg) return BigDecimal._create(0n, 0, 1, false);\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tif (aInf) return this;\n\t\t\tif (bInf) return other;\n\t\t}\n\t\treturn BigDecimal._create(0n, 0, 1, false);\n\t}\n};\nexport { BigDecimal, BigDecimal as Decimal, BigDecimal as default };\n\n//# sourceMappingURL=index.js.map","import { Decimal } from \"@formatjs/bigdecimal\";\n/**\n* ECMA-262 §7.1.4 ToNumber, steps 2, 8–10.\n* https://tc39.es/ecma262/#sec-tonumber\n* https://github.com/tc39/ecma262/blob/dcf59856a8184792a9e42f0ffb7dc064094a5dcc/spec.html#L5183-L5191\n*/\nexport function ToNumber(arg) {\n\t// Unary + evaluation step 2 returns ? ToNumber, preserving abrupt completions\n\t// from ToPrimitive and rejecting BigInt/Symbol before constructing Decimal.\n\t// ECMA-262 §13.5.4.1 Unary + evaluation, step 2.\n\t// https://tc39.es/ecma262/#sec-unary-plus-operator-runtime-semantics-evaluation\n\t// https://github.com/tc39/ecma262/blob/dcf59856a8184792a9e42f0ffb7dc064094a5dcc/spec.html#L20666\n\treturn new Decimal(+arg);\n}\n","import { ToNumber } from \"#packages/ecma262-abstract/ToNumber.js\";\nimport { DayFromYear, DaysInYear } from \"#packages/ecma262-abstract/DateOperations.js\";\nconst readers = [];\nconst registered = new WeakSet();\nexport function registerTemporalDateTimeNamespace(temporal) {\n\tif (registered.has(temporal)) return;\n\tconst additions = [\n\t\t\"PlainDate\",\n\t\t\"PlainYearMonth\",\n\t\t\"PlainMonthDay\",\n\t\t\"PlainTime\",\n\t\t\"PlainDateTime\",\n\t\t\"Instant\",\n\t\t\"ZonedDateTime\"\n\t].map((kind) => ({\n\t\tkind,\n\t\tread: kind === \"Instant\" || kind === \"ZonedDateTime\" ? Object.getOwnPropertyDescriptor(temporal[kind].prototype, \"epochNanoseconds\").get : Object.getOwnPropertyDescriptor(temporal[kind].prototype, \"toString\").value\n\t}));\n\treaders.push(...additions);\n\tregistered.add(temporal);\n}\nconst temporal = globalThis.Temporal;\nif (temporal) registerTemporalDateTimeNamespace(temporal);\nconst stringOptions = Object.assign(Object.create(null), { calendarName: \"always\" });\nconst CALENDAR_ANNOTATION = /\\[u-ca=([^\\]]+)\\]/;\nconst ISO_DATE = /^([+-]\\d{6}|\\d{4})-(\\d{2})-(\\d{2})/;\nconst ISO_TIME = /(?:^|T)(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?/;\nconst dateGetTime = Date.prototype.getTime;\nconst monthStarts = [\n\t0,\n\t31,\n\t59,\n\t90,\n\t120,\n\t151,\n\t181,\n\t212,\n\t243,\n\t273,\n\t304,\n\t334\n];\nexport function ToDateTimeFormattable(value) {\n\tif (value !== null && typeof value === \"object\" && readers.length) {\n\t\tlet isDate = false;\n\t\ttry {\n\t\t\tdateGetTime.call(value);\n\t\t\tisDate = true;\n\t\t} catch {}\n\t\tif (isDate) return ToNumber(value);\n\t\tfor (const { kind, read } of readers) {\n\t\t\tlet result;\n\t\t\ttry {\n\t\t\t\tresult = read.call(value, stringOptions);\n\t\t\t} catch {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (kind === \"Instant\" || kind === \"ZonedDateTime\") {\n\t\t\t\treturn {\n\t\t\t\t\tkind,\n\t\t\t\t\tepochNanoseconds: BigInt(result)\n\t\t\t\t};\n\t\t\t}\n\t\t\t// calendarName=always includes the ISO reference date for YearMonth/MonthDay.\n\t\t\t// Parsing this intrinsic result avoids Date's TimeClip and user-defined coercion.\n\t\t\tconst text = String(result);\n\t\t\tconst calendar = CALENDAR_ANNOTATION.exec(text)?.[1];\n\t\t\tconst date = ISO_DATE.exec(text);\n\t\t\tconst time = ISO_TIME.exec(text);\n\t\t\tlet epochNanoseconds = BigInt(0);\n\t\t\tif (date) {\n\t\t\t\tconst year = Number(date[1]);\n\t\t\t\tconst month = Number(date[2]);\n\t\t\t\tconst days = DayFromYear(year) + monthStarts[month - 1] + Number(date[3]) - 1 + (month > 2 && DaysInYear(year) === 366 ? 1 : 0);\n\t\t\t\tepochNanoseconds = BigInt(days) * BigInt(864e11);\n\t\t\t}\n\t\t\tif (time) {\n\t\t\t\tepochNanoseconds += BigInt(Number(time[1]) * 3600 + Number(time[2]) * 60 + Number(time[3])) * BigInt(1e9) + BigInt(((time[4] || \"\") + \"000000000\").slice(0, 9));\n\t\t\t} else {\n\t\t\t\tepochNanoseconds += BigInt(432e11);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tkind,\n\t\t\t\tcalendar,\n\t\t\t\tepochNanoseconds\n\t\t\t};\n\t\t}\n\t}\n\treturn ToNumber(value);\n}\n","import { Decimal } from \"@formatjs/bigdecimal\";\nconst ZERO = new Decimal(0);\nimport { ToNumber } from \"#packages/ecma262-abstract/ToNumber.js\";\nfunction ToInteger(n) {\n\tconst number = ToNumber(n);\n\tif (number.isNaN() || number.isZero()) {\n\t\treturn ZERO;\n\t}\n\tif (!number.isFinite()) {\n\t\treturn number;\n\t}\n\tlet integer = number.abs().floor();\n\tif (number.isNegative()) {\n\t\tinteger = integer.negated();\n\t}\n\treturn integer.isZero() ? ZERO : integer;\n}\n/**\n* https://tc39.es/ecma262/#sec-timeclip\n*/\nexport function TimeClip(time) {\n\tif (!time.isFinite()) {\n\t\treturn new Decimal(NaN);\n\t}\n\t// ECMA-262 §21.4.1.31, step 2: the bound is exactly 8.64 × 10^15.\n\t// Multiplying the binary Number 8.64 by 1e15 rounds one millisecond too high.\n\t// https://tc39.es/ecma262/#sec-timeclip\n\t// https://github.com/tc39/ecma262/blob/b7865f0eed2021720f84d561289401bc414874d0/spec.html#L34739\n\tif (time.abs().greaterThan(864e13)) {\n\t\treturn new Decimal(NaN);\n\t}\n\t// ECMA-262 §21.4.1.31, step 3: truncate finite timestamps toward zero.\n\t// https://tc39.es/ecma262/#sec-timeclip\n\t// https://github.com/tc39/ecma262/blob/b7865f0eed2021720f84d561289401bc414874d0/spec.html#L34738-L34740\n\treturn ToInteger(time);\n}\n","import { TimeClip } from \"#packages/ecma262-abstract/TimeClip.js\";\nexport function isTemporalDateTimeValue(value) {\n\treturn Object.prototype.hasOwnProperty.call(value, \"kind\");\n}\n/** https://tc39.es/proposal-temporal/#sec-temporal-handledatetimevalue */\nexport function HandleDateTimeValue(slots, value) {\n\tif (!isTemporalDateTimeValue(value)) {\n\t\t// HandleDateTimeOthers clips Number inputs before creating the record.\n\t\tconst clipped = TimeClip(value);\n\t\tif (clipped.isNaN()) throw new RangeError(\"Invalid time\");\n\t\treturn {\n\t\t\tformat: slots,\n\t\t\tepochNanoseconds: BigInt(clipped.toNumber()) * BigInt(1e6),\n\t\t\tisPlain: false\n\t\t};\n\t}\n\tif (value.kind === \"ZonedDateTime\") {\n\t\tthrow new TypeError(\"Temporal.ZonedDateTime is not supported by DateTimeFormat\");\n\t}\n\tif (value.calendar !== undefined && value.calendar !== slots.calendar && (value.calendar !== \"iso8601\" || value.kind === \"PlainYearMonth\" || value.kind === \"PlainMonthDay\")) {\n\t\tthrow new RangeError(\"Temporal calendar does not match DateTimeFormat\");\n\t}\n\treturn {\n\t\tformat: slots.getTemporalFormat(value.kind),\n\t\tepochNanoseconds: value.epochNanoseconds,\n\t\tisPlain: value.kind !== \"Instant\"\n\t};\n}\n","import {\n registerTemporalDateTimeNamespace,\n ToDateTimeFormattable,\n type TemporalDateTimeValue,\n} from '#packages/ecma402-abstract/DateTimeFormat/TemporalDateTime.js'\nimport {isTemporalDateTimeValue} from '#packages/ecma402-abstract/DateTimeFormat/HandleDateTimeValue.js'\nimport {\n legacyDateTimeProjection,\n legacyDateTimeOption,\n} from '#packages/temporal/locale.js'\nimport type {TemporalNamespace} from '#packages/temporal/index.js'\nimport {\n legacyDateTimeFormat,\n legacyDateTimeParts,\n legacyDateTimeRangeFormat,\n legacyDateTimeRangeParts,\n type LegacyDateTimeProjection as Projection,\n} from '#packages/temporal/legacy-extended-date.js'\n\nconst now = Date.now\n\nexport function installLegacyDateTimeFormat(\n namespace: TemporalNamespace\n): void {\n const Native = globalThis.Intl?.DateTimeFormat as\n | (Intl.DateTimeFormatConstructor & {__formatTemporal?: unknown})\n | undefined\n if (!Native || Native.__formatTemporal) return\n registerTemporalDateTimeNamespace(namespace)\n const nativeFormat = Object.getOwnPropertyDescriptor(\n Native.prototype,\n 'format'\n )!.get!\n const nativeParts = Native.prototype.formatToParts\n const nativeRange = Native.prototype.formatRange\n const nativeRangeParts = Native.prototype.formatRangeToParts\n const nativeResolved = Native.prototype.resolvedOptions\n const intrinsics = {\n resolvedOptions: nativeResolved,\n formatToParts: nativeParts,\n }\n interface State {\n formatter: Intl.DateTimeFormat\n locale: string\n calendar: string\n options: Record<string, unknown>\n bound?: (value?: unknown) => string\n projections: Map<string, Intl.DateTimeFormat>\n }\n const states = new WeakMap<object, State>()\n // Native bound functions identify the formatter without rereading its legacy symbol.\n const boundStates = new WeakMap<Function, State>()\n const probe = Object.create(Native.prototype)\n const chained = Reflect.apply(Native, probe, [])\n const legacySymbol =\n chained === probe ? Object.getOwnPropertySymbols(probe)[0] : undefined\n const hasInstance = Function.prototype[Symbol.hasInstance]\n function project(state: State, value: TemporalDateTimeValue): Projection {\n if (value.kind === 'ZonedDateTime')\n throw new TypeError(\n 'Temporal.ZonedDateTime is not supported by DateTimeFormat'\n )\n if (\n value.calendar !== undefined &&\n value.calendar !== state.calendar &&\n (value.calendar !== 'iso8601' ||\n value.kind === 'PlainYearMonth' ||\n value.kind === 'PlainMonthDay')\n )\n throw new RangeError('Temporal calendar does not match DateTimeFormat')\n const cached = state.projections.get(value.kind)\n if (cached) {\n const ns = value.epochNanoseconds\n return {\n formatter: cached,\n plain: value.kind !== 'Instant',\n milliseconds: Number(\n ns / 1_000_000n - (ns < 0n && ns % 1_000_000n ? 1n : 0n)\n ),\n }\n }\n const result = legacyDateTimeProjection(\n Native!,\n value,\n state.locale,\n state.options,\n false,\n intrinsics\n )\n state.projections.set(value.kind, result.formatter)\n return result\n }\n function single(state: State, input: unknown): Projection | undefined {\n if (input === undefined)\n return state.calendar !== 'gregory' && state.calendar !== 'iso8601'\n ? {formatter: state.formatter, milliseconds: now()}\n : undefined\n const value = ToDateTimeFormattable(input)\n return isTemporalDateTimeValue(value)\n ? project(state, value)\n : {formatter: state.formatter, milliseconds: value.toNumber()}\n }\n function range(\n state: State,\n start: unknown,\n end: unknown\n ): [Projection, Projection] {\n if (start === undefined || end === undefined)\n throw new TypeError('DateTimeFormat range requires two values')\n const first = ToDateTimeFormattable(start)\n const last = ToDateTimeFormattable(end)\n const firstTemporal = isTemporalDateTimeValue(first)\n const lastTemporal = isTemporalDateTimeValue(last)\n if (!firstTemporal && !lastTemporal)\n return [\n {formatter: state.formatter, milliseconds: first.toNumber()},\n {formatter: state.formatter, milliseconds: last.toNumber()},\n ]\n if (!firstTemporal || !lastTemporal || first.kind !== last.kind)\n throw new TypeError(\n 'DateTimeFormat range requires matching Temporal types'\n )\n return [project(state, first), project(state, last)]\n }\n function create(\n locales: unknown,\n options: unknown,\n newTarget: Function\n ): Intl.DateTimeFormat {\n let source: Record<string, unknown> | undefined\n const snapshot: Record<string, unknown> = Object.create(null)\n const tracked = new Proxy(Object.create(null), {\n get(_target, key) {\n if (!source) {\n if (options === null) throw new TypeError('Invalid options')\n source = options === undefined ? Object.create(null) : Object(options)\n }\n const raw = Reflect.get(source!, key)\n if (typeof key !== 'string' || raw === undefined) return raw\n const value = legacyDateTimeOption(key, raw)\n snapshot[key] = value\n return value\n },\n })\n const formatter = Reflect.construct(\n Native!,\n [locales, tracked],\n newTarget\n ) as Intl.DateTimeFormat\n const resolved = nativeResolved.call(formatter)\n const state: State = {\n formatter,\n locale: resolved.locale,\n calendar: resolved.calendar,\n options: snapshot,\n projections: new Map(),\n }\n states.set(formatter, state)\n boundStates.set(nativeFormat.call(formatter), state)\n return formatter\n }\n class LegacyDateTimeFormat {\n get format(): (value?: unknown) => string {\n const bound = nativeFormat.call(this)\n const state = boundStates.get(bound)\n if (!state) return bound\n if (!state.bound) {\n state.bound = (input?: unknown): string => {\n const value = single(state, input)\n return value\n ? legacyDateTimeFormat(\n value,\n nativeFormat,\n nativeParts,\n nativeResolved\n )\n : nativeFormat.call(state.formatter)()\n }\n Object.defineProperty(state.bound, 'name', {value: ''})\n }\n return state.bound\n }\n formatToParts(input?: unknown): Intl.DateTimeFormatPart[] {\n const state = states.get(this)\n if (!state) return Reflect.apply(nativeParts, this, [input])\n const value = single(state, input)\n return value\n ? legacyDateTimeParts(value, nativeParts, nativeResolved)\n : nativeParts.call(state.formatter)\n }\n formatRange(start: unknown, end: unknown): string {\n const state = states.get(this)\n if (!state) return Reflect.apply(nativeRange, this, [start, end])\n const [first, last] = range(state, start, end)\n return legacyDateTimeRangeFormat(\n first,\n last,\n nativeRange,\n nativeRangeParts,\n nativeResolved\n )\n }\n formatRangeToParts(\n start: unknown,\n end: unknown\n ): Intl.DateTimeRangeFormatPart[] {\n const state = states.get(this)\n if (!state) return Reflect.apply(nativeRangeParts, this, [start, end])\n const [first, last] = range(state, start, end)\n return legacyDateTimeRangeParts(\n first,\n last,\n nativeRangeParts,\n nativeResolved\n )\n }\n resolvedOptions(): Intl.ResolvedDateTimeFormatOptions {\n return Reflect.apply(nativeResolved, this, [])\n }\n }\n function DateTimeFormat(\n this: unknown,\n locales: unknown = undefined,\n options: unknown = undefined\n ): Intl.DateTimeFormat {\n const formatter = create(locales, options, new.target || DateTimeFormat)\n if (!new.target && legacySymbol && hasInstance.call(Native, this)) {\n Object.defineProperty(this, legacySymbol, {\n value: formatter,\n writable: false,\n enumerable: false,\n configurable: false,\n })\n return this as Intl.DateTimeFormat\n }\n return formatter\n }\n Object.defineProperties(DateTimeFormat, {\n ...Object.getOwnPropertyDescriptors(Native),\n __addTemporalNamespace: {value: registerTemporalDateTimeNamespace},\n __formatTemporal: {\n value(\n value: TemporalDateTimeValue,\n locales?: unknown,\n options?: unknown,\n localNanoseconds?: () => bigint\n ): string {\n const result = legacyDateTimeProjection(\n Native!,\n value,\n locales,\n options,\n true,\n intrinsics,\n localNanoseconds\n )\n return legacyDateTimeFormat(\n result,\n nativeFormat,\n nativeParts,\n nativeResolved\n )\n },\n },\n })\n const descriptors: Record<PropertyKey, PropertyDescriptor> =\n Object.getOwnPropertyDescriptors(LegacyDateTimeFormat.prototype)\n if (!nativeRange) delete descriptors.formatRange\n if (!nativeRangeParts) delete descriptors.formatRangeToParts\n Object.defineProperties(Native.prototype, {\n ...descriptors,\n constructor: {value: DateTimeFormat, writable: true, configurable: true},\n [Symbol.toStringTag]: {value: 'Intl.DateTimeFormat', configurable: true},\n })\n globalThis.Intl.DateTimeFormat =\n DateTimeFormat as unknown as Intl.DateTimeFormatConstructor\n}\n","export const TABLE_1 = [\n\t\"years\",\n\t\"months\",\n\t\"weeks\",\n\t\"days\",\n\t\"hours\",\n\t\"minutes\",\n\t\"seconds\",\n\t\"milliseconds\",\n\t\"microseconds\",\n\t\"nanoseconds\"\n];\n","import { TABLE_1 } from \"#packages/ecma402-abstract/DurationFormat/constants.js\";\nimport \"#packages/ecma402-abstract/types/duration.js\";\nexport function DurationRecordSign(record) {\n\tfor (const key of TABLE_1) {\n\t\tif (record[key] < 0) {\n\t\t\treturn -1;\n\t\t}\n\t\tif (record[key] > 0) {\n\t\t\treturn 1;\n\t\t}\n\t}\n\treturn 0;\n}\n","import { TABLE_1 } from \"#packages/ecma402-abstract/DurationFormat/constants.js\";\nimport \"#packages/ecma402-abstract/types/duration.js\";\nimport { DurationRecordSign } from \"#packages/ecma402-abstract/DurationFormat/DurationRecordSign.js\";\nexport function IsValidDurationRecord(record) {\n\tconst sign = DurationRecordSign(record);\n\tfor (const key of TABLE_1) {\n\t\tconst v = record[key];\n\t\tif (!Number.isFinite(v)) return false;\n\t\tif (v < 0 && sign > 0) {\n\t\t\treturn false;\n\t\t}\n\t\tif (v > 0 && sign < 0) {\n\t\t\treturn false;\n\t\t}\n\t}\n\t// IsValidDuration bounds calendar units and exact normalized seconds.\n\t// ECMA-402 §13.5.5 IsValidDuration, steps 3–8.\n\t// https://tc39.es/ecma402/#sec-isvalidduration\n\t// https://github.com/tc39/ecma402/blob/b1c961988b9a07894b1dc3dc2b5626ea48387d61/spec/durationformat.html#L569-L574\n\tif ([\n\t\t\"years\",\n\t\t\"months\",\n\t\t\"weeks\"\n\t].some((unit) => Math.abs(record[unit]) >= 2 ** 32)) {\n\t\treturn false;\n\t}\n\t// Scaling integral Number values with BigInt avoids rounding at 2**53 seconds.\n\tconst billion = BigInt(1e9);\n\tconst normalizedNanoseconds = BigInt(record.days) * BigInt(86400) * billion + BigInt(record.hours) * BigInt(3600) * billion + BigInt(record.minutes) * BigInt(60) * billion + BigInt(record.seconds) * billion + BigInt(record.milliseconds) * BigInt(1e6) + BigInt(record.microseconds) * BigInt(1e3) + BigInt(record.nanoseconds);\n\tconst limit = BigInt(2 ** 53) * billion;\n\treturn normalizedNanoseconds > -limit && normalizedNanoseconds < limit;\n}\n","// ../../../../../../../../execroot/_main/bazel-out/local_linux_gnu-opt/bin/packages/fast-memoize/index.ts\nfunction memoize(fn, options) {\n\tconst cache = options && options.cache ? options.cache : cacheDefault;\n\tconst serializer = options && options.serializer ? options.serializer : serializerDefault;\n\treturn (options && options.strategy ? options.strategy : strategyDefault)(fn, {\n\t\tcache,\n\t\tserializer\n\t});\n}\nfunction isPrimitive(value) {\n\treturn value == null || typeof value === \"number\" || typeof value === \"boolean\";\n}\nfunction monadic(fn, cache, serializer, arg) {\n\tconst cacheKey = isPrimitive(arg) ? arg : serializer(arg);\n\tlet computedValue = cache.get(cacheKey);\n\tif (typeof computedValue === \"undefined\") {\n\t\tcomputedValue = fn.call(this, arg);\n\t\tcache.set(cacheKey, computedValue);\n\t}\n\treturn computedValue;\n}\nfunction variadic(fn, cache, serializer) {\n\tconst args = Array.prototype.slice.call(arguments, 3);\n\tconst cacheKey = serializer(args);\n\tlet computedValue = cache.get(cacheKey);\n\tif (typeof computedValue === \"undefined\") {\n\t\tcomputedValue = fn.apply(this, args);\n\t\tcache.set(cacheKey, computedValue);\n\t}\n\treturn computedValue;\n}\nfunction assemble(fn, context, strategy, cache, serialize) {\n\treturn strategy.bind(context, fn, cache, serialize);\n}\nfunction strategyDefault(fn, options) {\n\tconst strategy = fn.length === 1 ? monadic : variadic;\n\treturn assemble(fn, this, strategy, options.cache.create(), options.serializer);\n}\nfunction strategyVariadic(fn, options) {\n\treturn assemble(fn, this, variadic, options.cache.create(), options.serializer);\n}\nfunction strategyMonadic(fn, options) {\n\treturn assemble(fn, this, monadic, options.cache.create(), options.serializer);\n}\nconst serializerDefault = function() {\n\treturn JSON.stringify(arguments);\n};\nvar ObjectWithoutPrototypeCache = class {\n\tconstructor() {\n\t\tthis.cache = Object.create(null);\n\t}\n\tget(key) {\n\t\treturn this.cache[key];\n\t}\n\tset(key, value) {\n\t\tthis.cache[key] = value;\n\t}\n};\nconst cacheDefault = { create: function create() {\n\treturn new ObjectWithoutPrototypeCache();\n} };\nconst strategies = {\n\tvariadic: strategyVariadic,\n\tmonadic: strategyMonadic\n};\nexport { memoize, strategies };\n\n//# sourceMappingURL=index.js.map","import { memoize, strategies } from \"@formatjs/fast-memoize\";\nexport function repeat(s, times) {\n\tif (typeof s.repeat === \"function\") {\n\t\treturn s.repeat(times);\n\t}\n\tconst arr = Array.from({ length: times });\n\tfor (let i = 0; i < arr.length; i++) {\n\t\tarr[i] = s;\n\t}\n\treturn arr.join(\"\");\n}\nexport function setInternalSlot(map, pl, field, value) {\n\tif (!map.get(pl)) {\n\t\tmap.set(pl, Object.create(null));\n\t}\n\tconst slots = map.get(pl);\n\tslots[field] = value;\n}\nexport function getInternalSlot(map, pl, field) {\n\treturn getMultiInternalSlots(map, pl, field)[field];\n}\nexport function getMultiInternalSlots(map, pl, ...fields) {\n\tconst slots = map.get(pl);\n\tif (!slots) {\n\t\tthrow new TypeError(`${pl} InternalSlot has not been initialized`);\n\t}\n\treturn fields.reduce((all, f) => {\n\t\tall[f] = slots[f];\n\t\treturn all;\n\t}, Object.create(null));\n}\nexport function isLiteralPart(patternPart) {\n\treturn patternPart.type === \"literal\";\n}\n/*\n17 ECMAScript Standard Built-in Objects:\nEvery built-in Function object, including constructors, that is not\nidentified as an anonymous function has a name property whose value\nis a String.\n\nUnless otherwise specified, the name property of a built-in Function\nobject, if it exists, has the attributes { [[Writable]]: false,\n[[Enumerable]]: false, [[Configurable]]: true }.\n*/\nexport function defineProperty(target, name, { value }) {\n\tObject.defineProperty(target, name, {\n\t\tconfigurable: true,\n\t\tenumerable: false,\n\t\twritable: true,\n\t\tvalue\n\t});\n}\nexport function ensureIntl() {\n\tif (typeof Intl === \"undefined\") {\n\t\tObject.defineProperty(globalThis, \"Intl\", {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\twritable: true,\n\t\t\tvalue: {}\n\t\t});\n\t}\n\treturn Intl;\n}\n/**\n* 7.3.5 CreateDataProperty\n* @param target\n* @param name\n* @param value\n*/\nexport function createDataProperty(target, name, value) {\n\tObject.defineProperty(target, name, {\n\t\tconfigurable: true,\n\t\tenumerable: true,\n\t\twritable: true,\n\t\tvalue\n\t});\n}\nexport function invariant(condition, message, Err = Error) {\n\tif (!condition) {\n\t\tthrow new Err(message);\n\t}\n}\nexport const createMemoizedNumberFormat = memoize((...args) => new Intl.NumberFormat(...args), { strategy: strategies.variadic });\nexport const createMemoizedPluralRules = memoize((...args) => new Intl.PluralRules(...args), { strategy: strategies.variadic });\nexport const createMemoizedListFormat = memoize((...args) => new Intl.ListFormat(...args), { strategy: strategies.variadic });\n","import { ToNumber } from \"#packages/ecma262-abstract/ToNumber.js\";\nimport { invariant } from \"#packages/ecma402-abstract/utils.js\";\nexport function ToIntegerIfIntegral(arg) {\n\tconst number = ToNumber(arg);\n\t// Nonintegral Number values require RangeError, without coercing arg again.\n\t// ECMA-402 §13.5.2 ToIntegerIfIntegral, steps 1–2.\n\t// https://tc39.es/ecma402/#sec-tointegerifintegral\n\t// https://github.com/tc39/ecma402/blob/b1c961988b9a07894b1dc3dc2b5626ea48387d61/spec/durationformat.html#L473-L474\n\tinvariant(number.isInteger(), \"Duration field is not an integer\", RangeError);\n\t// Step 3 returns a mathematical value: input -0 becomes unsigned zero.\n\t// https://github.com/tc39/ecma402/blob/b1c961988b9a07894b1dc3dc2b5626ea48387d61/spec/durationformat.html#L475\n\treturn number.isZero() ? 0 : number.toNumber();\n}\n","import \"#packages/ecma402-abstract/types/duration.js\";\nimport { IsValidDurationRecord } from \"#packages/ecma402-abstract/DurationFormat/IsValidDurationRecord.js\";\nimport { ToIntegerIfIntegral } from \"#packages/ecma402-abstract/DurationFormat/ToIntegerIfIntegral.js\";\nexport function ToDurationRecord(input) {\n\tif ((typeof input !== \"object\" || input === null) && typeof input !== \"function\") {\n\t\tif (typeof input === \"string\") {\n\t\t\tthrow new RangeError(\"Invalid duration format\");\n\t\t}\n\t\tthrow new TypeError(\"Invalid duration\");\n\t}\n\tconst result = {\n\t\tyears: 0,\n\t\tmonths: 0,\n\t\tweeks: 0,\n\t\tdays: 0,\n\t\thours: 0,\n\t\tminutes: 0,\n\t\tseconds: 0,\n\t\tmilliseconds: 0,\n\t\tmicroseconds: 0,\n\t\tnanoseconds: 0\n\t};\n\t// Read each field once, in ToDurationRecord's specified order.\n\t// ECMA-402 §13.5.3 ToDurationRecord, steps 3–24.a.\n\t// https://tc39.es/ecma402/#sec-todurationrecord\n\t// https://github.com/tc39/ecma402/blob/b1c961988b9a07894b1dc3dc2b5626ea48387d61/spec/durationformat.html#L495-L517\n\tlet anyDefined = false;\n\tfor (const field of [\n\t\t\"days\",\n\t\t\"hours\",\n\t\t\"microseconds\",\n\t\t\"milliseconds\",\n\t\t\"minutes\",\n\t\t\"months\",\n\t\t\"nanoseconds\",\n\t\t\"seconds\",\n\t\t\"weeks\",\n\t\t\"years\"\n\t]) {\n\t\tconst value = input[field];\n\t\tif (value !== undefined) {\n\t\t\tanyDefined = true;\n\t\t\tresult[field] = ToIntegerIfIntegral(value);\n\t\t}\n\t}\n\tif (!anyDefined) {\n\t\tthrow new TypeError(\"Invalid duration format\");\n\t}\n\tif (!IsValidDurationRecord(result)) {\n\t\tthrow new RangeError(\"Invalid duration format\");\n\t}\n\treturn result;\n}\n","import { ToDurationRecord } from \"#packages/ecma402-abstract/DurationFormat/ToDurationRecord.js\";\nconst fields = [\n\t\"years\",\n\t\"months\",\n\t\"weeks\",\n\t\"days\",\n\t\"hours\",\n\t\"minutes\",\n\t\"seconds\",\n\t\"milliseconds\",\n\t\"microseconds\",\n\t\"nanoseconds\"\n];\nconst apply = Reflect.apply;\nconst readers = [];\nexport function registerTemporalDurationNamespace(namespace) {\n\tconst constructor = namespace?.Duration;\n\tif (!constructor || readers.some((reader) => reader.constructor === constructor)) return;\n\tconst from = constructor.from, prototype = constructor.prototype;\n\tif (typeof from !== \"function\" || prototype === null || typeof prototype !== \"object\" && typeof prototype !== \"function\") return;\n\tconst getters = fields.map((field) => Object.getOwnPropertyDescriptor(prototype, field)?.get);\n\tif (getters.some((getter) => typeof getter !== \"function\")) return;\n\treaders.push({\n\t\tconstructor,\n\t\tfrom,\n\t\tgetters\n\t});\n}\nconst temporal = globalThis.Temporal;\nif (temporal) registerTemporalDurationNamespace(temporal);\n// https://tc39.es/proposal-temporal/#sec-Intl.DurationFormat.prototype.format\nexport function ToTemporalDurationRecord(input) {\n\tif (typeof input === \"string\" && readers.length) {\n\t\tconst reader = readers[readers.length - 1];\n\t\tinput = apply(reader.from, reader.constructor, [input]);\n\t}\n\tif (input !== null && (typeof input === \"object\" || typeof input === \"function\")) {\n\t\tfor (const reader of readers) {\n\t\t\tlet years;\n\t\t\ttry {\n\t\t\t\tyears = apply(reader.getters[0], input, []);\n\t\t\t} catch {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst record = Object.create(null);\n\t\t\trecord.years = years;\n\t\t\tfor (let index = 1; index < fields.length; index++) record[fields[index]] = apply(reader.getters[index], input, []);\n\t\t\treturn record;\n\t\t}\n\t}\n\treturn ToDurationRecord(input);\n}\n","import {\n registerTemporalDurationNamespace,\n ToTemporalDurationRecord,\n type TemporalDurationNamespace,\n} from '#packages/ecma402-abstract/DurationFormat/ToTemporalDurationRecord.js'\nimport type {DurationInput} from '#packages/ecma402-abstract/types/duration.js'\n\nexport function installLegacyDurationFormat(\n namespace: TemporalDurationNamespace\n): void {\n const Native = (\n globalThis.Intl as\n | (typeof Intl & {\n DurationFormat?: {\n prototype: {\n resolvedOptions: (this: unknown) => unknown\n format: (this: unknown, duration: unknown) => string\n formatToParts: (this: unknown, duration: unknown) => unknown\n }\n __addTemporalNamespace?: (\n namespace: TemporalDurationNamespace\n ) => void\n }\n })\n | undefined\n )?.DurationFormat\n if (!Native || Native.__addTemporalNamespace) return\n registerTemporalDurationNamespace(namespace)\n const prototype = Native.prototype,\n resolved = prototype.resolvedOptions,\n apply = Reflect.apply\n for (const method of ['format', 'formatToParts'] as const) {\n const original = prototype[method],\n descriptor = Object.getOwnPropertyDescriptor(prototype, method)!\n const wrapper = {\n [method](this: unknown, duration: DurationInput | string): unknown {\n apply(resolved, this, [])\n return apply(original, this, [ToTemporalDurationRecord(duration)])\n },\n }[method]\n Object.defineProperty(prototype, method, {...descriptor, value: wrapper})\n }\n Object.defineProperty(Native, '__addTemporalNamespace', {\n value: registerTemporalDurationNamespace,\n writable: true,\n configurable: true,\n })\n}\n","import {configureLocaleFormatting} from '#packages/temporal/locale.js'\nimport {\n Temporal,\n toTemporalInstant,\n type TemporalNamespace,\n} from '#packages/temporal/index.js'\nimport {createDateToTemporalInstant} from '#packages/temporal/date-bridge.js'\nimport {needsTemporal} from '#packages/temporal/detect.js'\nimport {installLegacyDateTimeFormat} from '#packages/temporal/legacy-intl.js'\nimport {installLegacyDurationFormat} from '#packages/temporal/legacy-durationformat.js'\n\nexport function installTemporal(force = false): void {\n const target = globalThis as typeof globalThis & {\n Temporal: TemporalNamespace\n },\n date = Date.prototype as Date & {toTemporalInstant?: () => unknown},\n replace = force || needsTemporal()\n if (replace)\n Object.defineProperty(target, 'Temporal', {\n value: Temporal,\n writable: true,\n configurable: true,\n enumerable: false,\n })\n if (replace || target.Temporal === Temporal) {\n installLegacyDateTimeFormat(target.Temporal)\n installLegacyDurationFormat(target.Temporal)\n }\n const Formatter = globalThis.Intl?.DateTimeFormat as\n | (typeof Intl.DateTimeFormat & {\n __addTemporalNamespace?: (namespace: TemporalNamespace) => void\n })\n | undefined\n Formatter?.__addTemporalNamespace?.(target.Temporal)\n const DurationFormatter = (\n globalThis.Intl as\n | (typeof Intl & {\n DurationFormat?: {\n __addTemporalNamespace?: (namespace: TemporalNamespace) => void\n }\n })\n | undefined\n )?.DurationFormat\n DurationFormatter?.__addTemporalNamespace?.(target.Temporal)\n configureLocaleFormatting()\n if (replace || typeof date.toTemporalInstant !== 'function') {\n const Constructor = target.Temporal.Instant\n Object.defineProperty(date, 'toTemporalInstant', {\n value:\n target.Temporal === Temporal\n ? toTemporalInstant\n : createDateToTemporalInstant(ns => new Constructor(ns)),\n enumerable: false,\n writable: true,\n configurable: true,\n })\n }\n}\n","import {installTemporal} from '#packages/temporal/install.js'\ninstallTemporal(true)\n"],"ignoreList":[4,6,7,19,28],"mappings":";;;;;AAGA,SAAgB,SAAS,GAAG;CAC3B,IAAI,OAAO,MAAM,UAChB,MAAM,UAAU,2CAA2C;CAE5D,OAAO,OAAO,CAAC;AAChB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,UAAU,IAAI,WAAW,IAAI,IACvD,aAAa,QAAS,cAAc,SAAU,UAAU,MAAM,GAC9D,gBACE,aAAa,QACZ,OAAO,KAAM,OACd,SAAS,KACT,UACA;EACJ,IAAI,KAAK,IAAI,aAAa,KAAK,OAC7B,MAAM,IAAI,WAAW,8BAA8B;EACrD,MAAM,SAAS,OAAO,aAAa,IAAI;EACvC,IAAI,QAAQ,QAAQ,IAAI,QAAQ,OAAO,QAAQ,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,KAAM;EACnE,QAAQ,IAAI,KAAK,MAAM;EACvB,OAAO;CACT;CACA,OAAO;AACT;;AC7GA,MAAa,eAAe;CAC3B,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,YAAY;EACX;EACA;EACA;CACD;CACA,WAAW;EACV;EACA;EACA;CACD;CACA,YAAY;EACX;EACA;EACA;CACD;CACA,YAAY;EACX;EACA;EACA;CACD;CACA,YAAY;EACX;EACA;EACA;CACD;CACA,WAAW;EACV;EACA;EACA;CACD;CACA,WAAW;EACV;EACA;EACA;CACD;CACA,WAAW;EACV;EACA;EACA;CACD;CACA,WAAW;EACV;EACA;EACA;CACD;CACA,YAAY;EACX;EACA;EACA;CACD;AACD;;AC1xCA,MAAM,MAAM;AACZ,MAAM,QAAS,MAAM,gBAAiB;AACtC,MAAM,OAAQ,MAAM,UAAW;AAC/B,MAAM,OAAO,OAAO;AAEpB,SAAS,MAAM,OAAe,SAAyB;CACrD,OAAO,QAAQ,WAAW,QAAQ,MAAM,QAAQ,YAAY,KAAK,KAAK;AACxE;AACA,SAAS,WAAW,MAAc,MAAc,QAAwB;CACtE,OAAO,OAAO,MAAM,OAAO,MAAM,OAAO,MAAM,IAAI,MAAM,IAAI;AAC9D;AAc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Q;CAAI;AAClE;;ACzFA,MAAaC,WAAS,CAAC;CACtB,WAAW;CACX,UAAU;CACV,OAAO;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;AACD,CAAC;;AChND,MAAaC,WAAS,CAAC;CACtB,WAAW;CACX,UAAU;CACV,OAAO;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;AACD,CAAC;;ACpMD,MAAM,wBAAQ,IAAI,IAAqB;AACvC,SAAS,OAAO,UAAwC;CACtD,IAAI,SAAS,MAAM,IAAI,QAAQ;CAC/B,IAAI,CAAC,QAAQ;EACX,UAAU,aAAa,YAAYC,WAAUC,SAAAA,CAAO,KAAI,UAAS;GAC/D,MAAM,SAAS,CAAC,MAAM,QAAQ;GAC9B,KAAK,MAAM,UAAU,MAAM,OAAO;IAChC,IAAI,QAAQ,WAAW,KAAK,KAAK,MAAM,IACrC,OAAO,SAAS;IAClB,OAAO,MAAM;KACX;K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AAS,cAAc;CACnC,IAAI,SACF,OAAO,eAAe,QAAQ,YAAY;EACxC,OAAO;EACP,UAAU;EACV,cAAc;EACd,YAAY;CACd,CAAC;CACH,IAAI,WAAW,OAAO,aAAa,UAAU;EAC3C,4BAA4B,OAAO,QAAQ;EAC3C,4BAA4B,OAAO,QAAQ;CAC7C;CAMA,CALkB,WAAW,MAAM,eAAA,EAKxB,yBAAyB,OAAO,QAAQ;CAUnD,CARE,WAAW,MAOV,eAAA,EACgB,yBAAyB,OAAO,QAAQ;CAC3D,0BAA0B;CAC1B,IAAI,WAAW,OAAO,KAAK,sBAAsB,YAAY;EAC3D,MAAM,cAAc,OAAO,SAAS;EACpC,OAAO,eAAe,MAAM,qBAAqB;GAC/C,OACE,OAAO,aAAa,WAChB,oBACA,6BAA4B,OAAM,IAAI,YAAY,EAAE,CAAC;GAC3D,YAAY;GACZ,UAAU;GACV,cAAc;EAChB,CAAC;CACH;AACF;;ACxDA,gBAAgB,IAAI"}
1
+ {"version":3,"file":"polyfill-force.js","names":["Constructor","parts","day","limit","ranges","ranges","chinese","dangi","Constructor","dayMilliseconds","limit","years","fields","monthStarts","integer","hebrewLeap","japaneseEras","Constructor","nativeParts","NumberConstructor","numberFormat","dayMilliseconds","fields","NumberConstructor","numberFormat","limit","cycle","clipped","NumberConstructor","numberFormat","Decimal","readers","temporal","Decimal"],"sources":["sources/packages/ecma262-abstract/ToString.js","sources/packages/temporal/native.ts","sources/packages/ecma262-abstract/DateOperations.js","sources/packages/temporal/host-timezone.ts","sources/node_modules/@formatjs_generated/datetimeformat.calendars/fallback-eras.js","sources/packages/temporal/lunisolar.ts","sources/node_modules/@formatjs_generated/icu.calendar/host-chinese.js","sources/node_modules/@formatjs_generated/icu.calendar/host-dangi.js","sources/packages/temporal/host-calendar-data.ts","sources/packages/temporal/host-calendar.ts","sources/packages/temporal/calendar-table.ts","sources/packages/ecma402-abstract/Calendar/Arithmetic.js","sources/packages/temporal/calendar.ts","sources/packages/temporal/legacy-lunisolar-date.ts","sources/packages/temporal/legacy-calendar-date.ts","sources/packages/temporal/legacy-extended-date.ts","sources/packages/temporal/legacy-zoned-date.ts","sources/packages/temporal/locale.ts","sources/packages/temporal/date-bridge.ts","sources/packages/temporal/detect.ts","sources/node_modules/@formatjs/bigdecimal/index.js","sources/packages/ecma262-abstract/ToNumber.js","sources/packages/ecma402-abstract/DateTimeFormat/TemporalDateTime.js","sources/packages/ecma262-abstract/TimeClip.js","sources/packages/ecma402-abstract/DateTimeFormat/HandleDateTimeValue.js","sources/packages/temporal/legacy-intl.ts","sources/packages/ecma402-abstract/DurationFormat/constants.js","sources/packages/ecma402-abstract/DurationFormat/DurationRecordSign.js","sources/packages/ecma402-abstract/DurationFormat/IsValidDurationRecord.js","sources/node_modules/@formatjs/fast-memoize/index.js","sources/packages/ecma402-abstract/utils.js","sources/packages/ecma402-abstract/DurationFormat/ToIntegerIfIntegral.js","sources/packages/ecma402-abstract/DurationFormat/ToDurationRecord.js","sources/packages/ecma402-abstract/DurationFormat/ToTemporalDurationRecord.js","sources/packages/temporal/legacy-durationformat.ts","sources/packages/temporal/install.ts","sources/packages/temporal/polyfill-force.ts"],"sourcesContent":["/**\n* https://tc39.es/ecma262/#sec-tostring\n*/\nexport function ToString(o) {\n\tif (typeof o === \"symbol\") {\n\t\tthrow TypeError(\"Cannot convert a Symbol value to a string\");\n\t}\n\treturn String(o);\n}\n","import type {\n DateSlot,\n DateTimeSlot,\n ZonedSlot,\n} from '#packages/temporal/plain-slots.js'\nimport type {RelativeTo} from '#packages/temporal/relative-duration.js'\nimport type {\n CalendarId,\n CalendarFields,\n CalendarDate,\n DateDuration,\n Overflow,\n} from '#packages/temporal/calendar.js'\nimport type {ISODateTime, Disambiguation} from '#packages/temporal/kernel.js'\nimport type {\n Precision,\n RoundingMode,\n TimeUnit,\n} from '#packages/temporal/rounding.js'\nimport type {DurationFields} from '#packages/temporal/duration-core.js'\n\nexport type NativeQuery = (request: string) => string | number\nconst parse = JSON.parse\nconst stringify = JSON.stringify\nconst create = Object.create\nconst keys = Object.keys\nconst indexOf = String.prototype.indexOf\nconst apply = Reflect.apply\nconst bigintText = BigInt.prototype.toString\nconst ToBigInt = BigInt\nconst BadRange = RangeError\nexport interface NativeTemporal {\n addPlainYearMonth(\n slot: DateSlot,\n fields: DurationFields,\n subtract: boolean,\n overflow: Overflow\n ): number\n differencePlainYearMonth(\n start: DateSlot,\n end: DateSlot,\n largest: string,\n smallest: string,\n increment: number,\n mode: RoundingMode,\n since: boolean\n ): DurationFields\n yearMonthToDate(slot: DateSlot, day: number): number\n monthDayToDate(slot: DateSlot, year: number): number\n formatPlainDate(slot: DateSlot, calendarName: string): string\n formatPlainDateTime(\n value: bigint,\n calendar: string,\n precision: Precision,\n mode: RoundingMode,\n calendarName: string\n ): string\n formatPlainYearMonth(slot: DateSlot, calendarName: string): string\n formatPlainMonthDay(slot: DateSlot, calendarName: string): string\n formatZonedDateTime(\n slot: ZonedSlot,\n precision: Precision,\n mode: RoundingMode,\n calendarName: string,\n offset: boolean,\n timeZoneName: string\n ): string\n parsePlainDate(value: string): DateSlot\n parsePlainDateTime(value: string): DateTimeSlot\n parsePlainYearMonth(value: string): DateSlot\n parsePlainMonthDay(value: string): DateSlot\n parseZonedFields(value: string): {\n fields: Required<ISODateTime> & {calendar: string}\n timeZone: string\n offset: string | undefined\n }\n resolveZonedDateTime(\n value: bigint,\n identifier: string,\n calendar: string,\n offset: string | undefined,\n behavior: string,\n disambiguation: Disambiguation,\n matchMinute: boolean,\n dateOnly: boolean\n ): bigint\n addZonedDateTime(\n slot: ZonedSlot,\n fields: DurationFields,\n subtract: boolean,\n overflow: Overflow\n ): bigint\n differenceZonedDateTime(\n start: ZonedSlot,\n end: ZonedSlot,\n largest: string,\n smallest: string,\n increment: number,\n mode: RoundingMode,\n since: boolean\n ): DurationFields\n roundZonedDateTime(\n slot: ZonedSlot,\n unit: string,\n increment: number,\n mode: RoundingMode\n ): bigint\n startOfZonedDay(slot: ZonedSlot, day?: number): bigint\n hoursInZonedDay(slot: ZonedSlot): number\n addPlainDate(\n epochDay: number,\n calendar: string,\n fields: DurationFields,\n subtract: boolean,\n overflow: Overflow\n ): number\n addPlainDateTime(\n value: bigint,\n calendar: string,\n fields: DurationFields,\n subtract: boolean,\n overflow: Overflow\n ): bigint\n differencePlainDate(\n start: number,\n end: number,\n calendar: string,\n largest: string,\n smallest: string,\n increment: number,\n mode: RoundingMode,\n since: boolean\n ): DurationFields\n differencePlainDateTime(\n start: bigint,\n end: bigint,\n calendar: string,\n largest: string,\n smallest: string,\n increment: number,\n mode: RoundingMode,\n since: boolean\n ): DurationFields\n roundPlainDateTime(\n value: bigint,\n calendar: string,\n unit: string,\n increment: number,\n mode: RoundingMode\n ): bigint\n transformDuration(fields: DurationFields, absolute: boolean): DurationFields\n parseDuration(value: string): DurationFields\n validateDuration(fields: DurationFields): void\n formatDuration(\n fields: DurationFields,\n precision: number | 'auto',\n mode: RoundingMode\n ): string\n addDuration(\n one: DurationFields,\n two: DurationFields,\n subtract: boolean\n ): DurationFields\n compareDuration(\n one: DurationFields,\n two: DurationFields,\n relative?: RelativeTo\n ): -1 | 0 | 1\n totalDuration(\n fields: DurationFields,\n unit: string,\n relative?: RelativeTo\n ): number\n roundDuration(\n fields: DurationFields,\n largest: string,\n smallest: string,\n increment: number,\n mode: RoundingMode,\n relative?: RelativeTo\n ): DurationFields\n timeZoneIdentity(identifier: string): {identifier: string; primary: string}\n timeZoneOffset(identifier: string, value: bigint): bigint\n timeZonePossibleInstants(identifier: string, fields: ISODateTime): bigint[]\n timeZoneResolve(\n identifier: string,\n fields: ISODateTime,\n disambiguation: Disambiguation\n ): bigint\n timeZoneTransition(\n identifier: string,\n value: bigint,\n direction: 'next' | 'previous'\n ): bigint | null\n calendarStartOfYear(calendar: CalendarId, year: number): number\n calendarMonthsInYear(calendar: CalendarId, year: number): number\n calendarDaysInMonth(calendar: CalendarId, year: number, month: number): number\n calendarToEpochDay(\n calendar: CalendarId,\n fields: CalendarFields,\n overflow: Overflow\n ): number\n calendarFromEpochDay(calendar: CalendarId, epoch: number): CalendarDate\n calendarAdd(\n calendar: CalendarId,\n fields: CalendarFields,\n duration: DateDuration,\n overflow: Overflow\n ): CalendarDate\n calendarUntil(\n calendar: CalendarId,\n one: number,\n two: number,\n largest: string\n ): DateDuration\n calendarMonthSerial(calendar: CalendarId, year: number, month: number): number\n calendarEra(\n calendar: CalendarId,\n epoch: number\n ): {era: string; eraYear: number} | undefined\n calendarYearFromEra(calendar: CalendarId, era: string, year: number): number\n isoToEpochNanoseconds(fields: ISODateTime): bigint\n epochNanosecondsToISO(value: bigint): Required<ISODateTime>\n addISODays(fields: ISODateTime, days: number): Required<ISODateTime>\n parsePlainTime(value: string): bigint\n regulatePlainTime(values: number[], constrain: boolean): bigint\n formatPlainTime(\n value: bigint,\n precision: Precision,\n mode: RoundingMode\n ): string\n addPlainTime(\n value: bigint,\n duration: DurationFields,\n subtract: boolean\n ): bigint\n roundPlainTime(\n value: bigint,\n unit: TimeUnit,\n increment: number,\n mode: RoundingMode\n ): bigint\n differencePlainTime(\n value: bigint,\n other: bigint,\n largest: TimeUnit,\n smallest: TimeUnit,\n increment: number,\n mode: RoundingMode\n ): DurationFields\n parseInstant(value: string): bigint\n formatInstant(value: bigint, precision: Precision, offset?: bigint): string\n addInstant(value: bigint, duration: DurationFields, subtract: boolean): bigint\n roundInstant(value: bigint, quantum: bigint, mode: RoundingMode): bigint\n differenceInstant(\n value: bigint,\n other: bigint,\n largest: TimeUnit,\n smallest: TimeUnit,\n increment: number,\n mode: RoundingMode\n ): DurationFields\n}\nlet native: NativeTemporal | undefined\nexport function nativeTemporal(): NativeTemporal | undefined {\n return native\n}\n/** @internal Experimental Hermes backend installation. */\nexport function configureNativeTemporal(query: NativeQuery): void {\n const text = (value: bigint) => apply(bigintText, value, [])\n function call(op: string, properties: Record<string, unknown>): any {\n const input = create(null)\n input.op = op\n const names = keys(properties)\n for (let index = 0; index < names.length; index++)\n input[names[index]] = properties[names[index]]\n const source = stringify(input)\n // Escaped code units violate Temporal's ASCII grammar; reject before UTF-8 decoding.\n if (\n apply(indexOf, op, ['parse']) === 0 &&\n apply(indexOf, source, ['\\\\u']) >= 0\n )\n throw new BadRange('Invalid Temporal string')\n const result = query(source)\n if (typeof result === 'number')\n throw new BadRange('Invalid Temporal value or range')\n return parse(result)\n }\n function isoFields(fields: ISODateTime): Record<string, number> {\n const copy = create(null)\n copy.year = fields.year\n copy.month = fields.month\n copy.day = fields.day\n copy.hour = fields.hour ?? 0\n copy.minute = fields.minute ?? 0\n copy.second = fields.second ?? 0\n copy.millisecond = fields.millisecond ?? 0\n copy.microsecond = fields.microsecond ?? 0\n copy.nanosecond = fields.nanosecond ?? 0\n return copy\n }\n function request(\n op: string,\n fields?: ISODateTime,\n value?: bigint,\n days?: number\n ): any {\n const record = create(null)\n record.op = op\n if (fields) {\n record.fields = isoFields(fields)\n }\n if (value !== undefined) record.nanoseconds = apply(bigintText, value, [])\n if (days !== undefined) record.days = days\n return call(op, record)\n }\n function addition(\n op: string,\n value: bigint,\n fields: DurationFields,\n subtract: boolean\n ): bigint {\n return ToBigInt(\n call(op, {\n nanoseconds: text(value),\n duration: durationFields(fields),\n subtract,\n })\n )\n }\n function durationFields(fields: DurationFields): Record<string, string> {\n const duration = create(null)\n const names = keys(fields)\n for (let index = 0; index < names.length; index++)\n duration[names[index]] = text(\n ToBigInt(fields[names[index] as keyof DurationFields])\n )\n return duration\n }\n function dateFields(value: CalendarFields): Record<string, unknown> {\n const fields = create(null)\n fields.year = value.year\n if (value.month !== undefined) fields.month = value.month\n if (value.monthCode !== undefined) fields.monthCode = value.monthCode\n fields.day = value.day\n return fields\n }\n function shortFields(slot: DateSlot): Record<string, unknown> {\n const result = create(null)\n result.epochDay = slot.epochDay\n result.calendar = slot.calendar\n return result\n }\n function zonedFields(slot: ZonedSlot): Record<string, unknown> {\n const result = create(null)\n result.nanoseconds = text(slot.epochNanoseconds)\n result.calendar = slot.calendar\n result.identifier = slot.timeZone\n return result\n }\n function relativeFields(\n relative?: RelativeTo\n ): Record<string, unknown> | undefined {\n if (!relative) return undefined\n if ('zoned' in relative) {\n const result = zonedFields(relative.zoned)\n result.kind = 'zoned'\n return result\n }\n const result = create(null)\n result.kind = 'date'\n result.epochDay = relative.date.epochDay\n result.calendar = relative.date.calendar\n return result\n }\n native = {\n addPlainYearMonth: (slot, fields, subtract, overflow) =>\n call('addPlainYearMonth', {\n value: shortFields(slot),\n duration: durationFields(fields),\n subtract,\n overflow,\n }),\n differencePlainYearMonth: (\n start,\n end,\n largest,\n smallest,\n increment,\n mode,\n since\n ) =>\n call('differencePlainYearMonth', {\n value: shortFields(start),\n other: shortFields(end),\n largest,\n smallest,\n increment,\n mode,\n since,\n }),\n yearMonthToDate: (slot, day) =>\n call('yearMonthToDate', {value: shortFields(slot), day}),\n monthDayToDate: (slot, year) =>\n call('monthDayToDate', {value: shortFields(slot), year}),\n formatPlainDate: (slot, calendarName) =>\n call('formatPlainDate', {value: shortFields(slot), calendarName}),\n formatPlainDateTime: (value, calendar, precision, mode, calendarName) =>\n call('formatPlainDateTime', {\n nanoseconds: text(value),\n calendar,\n precision,\n mode,\n calendarName,\n }),\n formatPlainYearMonth: (slot, calendarName) =>\n call('formatPlainYearMonth', {value: shortFields(slot), calendarName}),\n formatPlainMonthDay: (slot, calendarName) =>\n call('formatPlainMonthDay', {value: shortFields(slot), calendarName}),\n formatZonedDateTime: (\n slot,\n precision,\n mode,\n calendarName,\n offset,\n timeZoneName\n ) =>\n call('formatZonedDateTime', {\n value: zonedFields(slot),\n precision,\n mode,\n calendarName,\n offset,\n timeZoneName,\n }),\n parsePlainDate: value => call('parsePlainDate', {text: value}),\n parsePlainDateTime: value => {\n const result = call('parsePlainDateTime', {text: value})\n return {\n epochNanoseconds: ToBigInt(result.epochNanoseconds),\n calendar: result.calendar,\n }\n },\n parsePlainYearMonth: value => call('parsePlainYearMonth', {text: value}),\n parsePlainMonthDay: value => call('parsePlainMonthDay', {text: value}),\n parseZonedFields: value => {\n const result = call('parseZonedFields', {text: value})\n return {\n fields: result.fields,\n timeZone: result.timeZone,\n offset: result.offset ?? undefined,\n }\n },\n resolveZonedDateTime: (\n value,\n identifier,\n calendar,\n offset,\n behavior,\n disambiguation,\n matchMinute,\n dateOnly\n ) =>\n ToBigInt(\n call('resolveZonedDateTime', {\n nanoseconds: text(value),\n identifier,\n calendar,\n offset,\n behavior,\n disambiguation,\n matchMinute,\n dateOnly,\n })\n ),\n addZonedDateTime: (slot, fields, subtract, overflow) =>\n ToBigInt(\n call('addZonedDateTime', {\n value: zonedFields(slot),\n duration: durationFields(fields),\n subtract,\n overflow,\n })\n ),\n differenceZonedDateTime: (\n start,\n end,\n largest,\n smallest,\n increment,\n mode,\n since\n ) =>\n call('differenceZonedDateTime', {\n value: zonedFields(start),\n other: zonedFields(end),\n largest,\n smallest,\n increment,\n mode,\n since,\n }),\n roundZonedDateTime: (slot, unit, increment, mode) =>\n ToBigInt(\n call('roundZonedDateTime', {\n value: zonedFields(slot),\n unit,\n increment,\n mode,\n })\n ),\n startOfZonedDay: (slot, day) =>\n ToBigInt(call('startOfZonedDay', {value: zonedFields(slot), day})),\n hoursInZonedDay: slot =>\n call('hoursInZonedDay', {value: zonedFields(slot)}),\n addPlainDate: (epochDay, calendar, fields, subtract, overflow) =>\n call('addPlainDate', {\n epochDay,\n calendar,\n duration: durationFields(fields),\n subtract,\n overflow,\n }),\n addPlainDateTime: (value, calendar, fields, subtract, overflow) =>\n ToBigInt(\n call('addPlainDateTime', {\n nanoseconds: text(value),\n calendar,\n duration: durationFields(fields),\n subtract,\n overflow,\n })\n ),\n differencePlainDate: (\n start,\n end,\n calendar,\n largest,\n smallest,\n increment,\n mode,\n since\n ) =>\n call('differencePlainDate', {\n epochDay: start,\n other: end,\n calendar,\n largest,\n smallest,\n increment,\n mode,\n since,\n }),\n differencePlainDateTime: (\n start,\n end,\n calendar,\n largest,\n smallest,\n increment,\n mode,\n since\n ) =>\n call('differencePlainDateTime', {\n nanoseconds: text(start),\n other: text(end),\n calendar,\n largest,\n smallest,\n increment,\n mode,\n since,\n }),\n roundPlainDateTime: (value, calendar, unit, increment, mode) =>\n ToBigInt(\n call('roundPlainDateTime', {\n nanoseconds: text(value),\n calendar,\n unit,\n increment,\n mode,\n })\n ),\n transformDuration: (fields, absolute) =>\n call('transformDuration', {duration: durationFields(fields), absolute}),\n parseDuration: value => call('parseDuration', {text: value}),\n validateDuration: fields => {\n call('validateDuration', {duration: durationFields(fields)})\n },\n formatDuration: (fields, precision, mode) =>\n call('formatDuration', {\n duration: durationFields(fields),\n precision,\n mode,\n }),\n addDuration: (one, two, subtract) =>\n call('addDuration', {\n duration: durationFields(one),\n other: durationFields(two),\n subtract,\n }),\n compareDuration: (one, two, relative) =>\n call('compareDuration', {\n duration: durationFields(one),\n other: durationFields(two),\n relative: relativeFields(relative),\n }),\n totalDuration: (fields, unit, relative) =>\n call('totalDuration', {\n duration: durationFields(fields),\n unit,\n relative: relativeFields(relative),\n }),\n roundDuration: (fields, largest, smallest, increment, mode, relative) =>\n call('roundDuration', {\n duration: durationFields(fields),\n largest,\n smallest,\n increment,\n mode,\n relative: relativeFields(relative),\n }),\n timeZoneIdentity: identifier => call('timeZoneIdentity', {identifier}),\n timeZoneOffset: (identifier, value) =>\n ToBigInt(call('timeZoneOffset', {identifier, nanoseconds: text(value)})),\n timeZonePossibleInstants: (identifier, fields) => {\n const values = call('timeZonePossibleInstants', {\n identifier,\n fields: isoFields(fields),\n })\n const result: bigint[] = []\n for (let index = 0; index < values.length; index++)\n result.push(ToBigInt(values[index]))\n return result\n },\n timeZoneResolve: (identifier, fields, disambiguation) =>\n ToBigInt(\n call('timeZoneResolve', {\n identifier,\n fields: isoFields(fields),\n disambiguation,\n })\n ),\n timeZoneTransition: (identifier, value, direction) => {\n const result = call('timeZoneTransition', {\n identifier,\n nanoseconds: text(value),\n direction,\n })\n return result === null ? null : ToBigInt(result)\n },\n calendarStartOfYear: (calendar, year) =>\n call('calendarStartOfYear', {calendar, year}),\n calendarMonthsInYear: (calendar, year) =>\n call('calendarMonthsInYear', {calendar, year}),\n calendarDaysInMonth: (calendar, year, month) =>\n call('calendarDaysInMonth', {calendar, year, month}),\n calendarToEpochDay: (calendar, fields, overflow) =>\n call('calendarToEpochDay', {\n calendar,\n fields: dateFields(fields),\n overflow,\n }),\n calendarFromEpochDay: (calendar, epoch) =>\n call('calendarFromEpochDay', {calendar, epoch}),\n calendarAdd: (calendar, fields, values, overflow) => {\n const duration = create(null)\n duration.years = values.years ?? 0\n duration.months = values.months ?? 0\n duration.weeks = values.weeks ?? 0\n duration.days = values.days ?? 0\n return call('calendarAdd', {\n calendar,\n fields: dateFields(fields),\n duration,\n overflow,\n })\n },\n calendarUntil: (calendar, one, two, largest) =>\n call('calendarUntil', {calendar, one, two, largest}),\n calendarMonthSerial: (calendar, year, month) =>\n call('calendarMonthSerial', {calendar, year, month}),\n calendarEra: (calendar, epoch) =>\n call('calendarEra', {calendar, epoch}) ?? undefined,\n calendarYearFromEra: (calendar, era, year) =>\n call('calendarYearFromEra', {calendar, era, year}),\n isoToEpochNanoseconds: fields =>\n ToBigInt(request('isoToEpochNanoseconds', fields)),\n epochNanosecondsToISO: value =>\n request('epochNanosecondsToISO', undefined, value),\n addISODays: (fields, days) =>\n request('addISODays', fields, undefined, days),\n parsePlainTime: value => ToBigInt(call('parsePlainTime', {text: value})),\n regulatePlainTime: (values, constrain) => {\n const fields = create(null)\n fields.hour = values[0]\n fields.minute = values[1]\n fields.second = values[2]\n fields.millisecond = values[3]\n fields.microsecond = values[4]\n fields.nanosecond = values[5]\n return ToBigInt(call('regulatePlainTime', {fields, constrain}))\n },\n formatPlainTime: (value, precision, mode) =>\n call('formatPlainTime', {nanoseconds: text(value), precision, mode}),\n addPlainTime: (value, fields, subtract) =>\n addition('addPlainTime', value, fields, subtract),\n roundPlainTime: (value, unit, increment, mode) =>\n ToBigInt(\n call('roundPlainTime', {\n nanoseconds: text(value),\n unit,\n increment,\n mode,\n })\n ),\n differencePlainTime: (value, other, largest, smallest, increment, mode) =>\n call('differencePlainTime', {\n nanoseconds: text(value),\n other: text(other),\n largest,\n smallest,\n increment,\n mode,\n }),\n parseInstant: value => ToBigInt(call('parseInstant', {text: value})),\n formatInstant: (value, precision, offset) =>\n call('formatInstant', {\n nanoseconds: text(value),\n precision,\n offset: offset === undefined ? undefined : text(offset),\n }),\n addInstant: (value, fields, subtract) =>\n addition('addInstant', value, fields, subtract),\n roundInstant: (value, quantum, mode) =>\n ToBigInt(\n call('roundInstant', {\n nanoseconds: text(value),\n quantum: text(quantum),\n mode,\n })\n ),\n differenceInstant: (value, other, largest, smallest, increment, mode) =>\n call('differenceInstant', {\n nanoseconds: text(value),\n other: text(other),\n largest,\n smallest,\n increment,\n mode,\n }),\n }\n}\n","const MS_PER_DAY = 864e5;\nfunction mod(x, y) {\n\treturn x - Math.floor(x / y) * y;\n}\nexport function Day(t) {\n\treturn Math.floor(t / MS_PER_DAY);\n}\nexport function WeekDay(t) {\n\treturn mod(Day(t) + 4, 7);\n}\nexport function DayFromYear(y) {\n\t// ECMA-262 §21.4.1.5 DayFromYear, steps 2–6: count days arithmetically.\n\t// The first day of the minimum representable year lies outside Date's range.\n\t// https://tc39.es/ecma262/#sec-dayfromyear\n\t// https://github.com/tc39/ecma262/blob/b7865f0eed2021720f84d561289401bc414874d0/spec.html#L34143-L34147\n\treturn 365 * (y - 1970) + Math.floor((y - 1969) / 4) - Math.floor((y - 1901) / 100) + Math.floor((y - 1601) / 400);\n}\nexport function YearFromTime(t) {\n\t// ECMA-262 §21.4.1.7 YearFromTime, step 1: locate the enclosing year.\n\t// Local timezone adjustment may move an otherwise valid instant past Date's bounds.\n\t// https://tc39.es/ecma262/#sec-yearfromtime\n\t// https://github.com/tc39/ecma262/blob/b7865f0eed2021720f84d561289401bc414874d0/spec.html#L34177\n\tif (!Number.isFinite(t)) return NaN;\n\tconst day = Day(t);\n\tlet year = 1970 + Math.floor(day / 365.2425);\n\twhile (DayFromYear(year) > day) year--;\n\twhile (DayFromYear(year + 1) <= day) year++;\n\treturn year;\n}\nexport function DaysInYear(y) {\n\tif (y % 4 !== 0) return 365;\n\tif (y % 100 !== 0) return 366;\n\tif (y % 400 !== 0) return 365;\n\treturn 366;\n}\nexport function DayWithinYear(t) {\n\treturn Day(t) - DayFromYear(YearFromTime(t));\n}\nexport function InLeapYear(t) {\n\treturn DaysInYear(YearFromTime(t)) === 365 ? 0 : 1;\n}\nexport function MonthFromTime(t) {\n\tconst dwy = DayWithinYear(t);\n\tconst leap = InLeapYear(t);\n\tif (dwy >= 0 && dwy < 31) return 0;\n\tif (dwy < 59 + leap) return 1;\n\tif (dwy < 90 + leap) return 2;\n\tif (dwy < 120 + leap) return 3;\n\tif (dwy < 151 + leap) return 4;\n\tif (dwy < 181 + leap) return 5;\n\tif (dwy < 212 + leap) return 6;\n\tif (dwy < 243 + leap) return 7;\n\tif (dwy < 273 + leap) return 8;\n\tif (dwy < 304 + leap) return 9;\n\tif (dwy < 334 + leap) return 10;\n\tif (dwy < 365 + leap) return 11;\n\tthrow new Error(\"Invalid time\");\n}\nexport function DateFromTime(t) {\n\tconst dwy = DayWithinYear(t);\n\tconst mft = MonthFromTime(t);\n\tconst leap = InLeapYear(t);\n\tif (mft === 0) return dwy + 1;\n\tif (mft === 1) return dwy - 30;\n\tif (mft === 2) return dwy - 58 - leap;\n\tif (mft === 3) return dwy - 89 - leap;\n\tif (mft === 4) return dwy - 119 - leap;\n\tif (mft === 5) return dwy - 150 - leap;\n\tif (mft === 6) return dwy - 180 - leap;\n\tif (mft === 7) return dwy - 211 - leap;\n\tif (mft === 8) return dwy - 242 - leap;\n\tif (mft === 9) return dwy - 272 - leap;\n\tif (mft === 10) return dwy - 303 - leap;\n\tif (mft === 11) return dwy - 333 - leap;\n\tthrow new Error(\"Invalid time\");\n}\nconst HOURS_PER_DAY = 24;\nconst MINUTES_PER_HOUR = 60;\nconst SECONDS_PER_MINUTE = 60;\nconst MS_PER_SECOND = 1e3;\nconst MS_PER_MINUTE = MS_PER_SECOND * SECONDS_PER_MINUTE;\nconst MS_PER_HOUR = MS_PER_MINUTE * MINUTES_PER_HOUR;\nexport function HourFromTime(t) {\n\treturn mod(Math.floor(t / MS_PER_HOUR), HOURS_PER_DAY);\n}\nexport function MinFromTime(t) {\n\treturn mod(Math.floor(t / MS_PER_MINUTE), MINUTES_PER_HOUR);\n}\nexport function SecFromTime(t) {\n\treturn mod(Math.floor(t / MS_PER_SECOND), SECONDS_PER_MINUTE);\n}\nexport function msFromTime(t) {\n\treturn mod(t, MS_PER_SECOND);\n}\n","import {steps} from '@formatjs_generated/tz/temporal-names.js'\nimport links from '@formatjs_generated/tz/links.js'\nimport primary from '@formatjs_generated/tz/primary.js'\nimport {\n isoToEpochNanoseconds,\n type ISODateTime,\n type Disambiguation,\n type TimeZoneKernel,\n} from '#packages/temporal/kernel.js'\nimport {DateFromTime} from '#packages/ecma262-abstract/DateOperations.js'\n\nexport type HostTimeZone = Pick<\n TimeZoneKernel,\n 'offsetNanoseconds' | 'possibleInstants' | 'resolve'\n> &\n Partial<Pick<TimeZoneKernel, 'transition'>>\nconst Constructor = globalThis.Intl?.DateTimeFormat\nconst parts = Constructor?.prototype.formatToParts\nconst nowMilliseconds = Date.now\nconst second = 1000000000n\nconst day = 86400n * second\nconst limit = 100000000n * day\nfunction check(instant: bigint): bigint {\n if (instant < -limit || instant > limit)\n throw new RangeError('Instant out of range')\n return instant\n}\nconst clamp = (instant: bigint): bigint =>\n instant < -limit ? -limit : instant > limit ? limit : instant\n\nexport function createHostTimeZoneOffset(\n timeZone: string,\n intrinsics: {\n Constructor?: Intl.DateTimeFormatConstructor\n parts?: typeof Intl.DateTimeFormat.prototype.formatToParts\n } = {Constructor, parts}\n): HostTimeZone['offsetNanoseconds'] {\n const {Constructor, parts} = intrinsics\n if (!Constructor || !parts)\n throw new RangeError(\n 'Temporal requires Intl.DateTimeFormat timezone support'\n )\n const formatter = new Constructor(\n 'en-US-u-nu-latn',\n Object.assign(Object.create(null), {\n timeZone,\n calendar: 'iso8601',\n numberingSystem: 'latn',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: false,\n })\n )\n const offsets = new Map<number, bigint>()\n const offsetNanoseconds = (instant: bigint): bigint => {\n check(instant)\n const epochSecond =\n instant / second - (instant < 0n && instant % second !== 0n ? 1n : 0n),\n key = Number(epochSecond),\n cached = offsets.get(key)\n if (cached !== undefined) return cached\n let date = -1,\n hour = -1,\n minute = -1,\n seconds = -1\n const fields = parts.call(formatter, key * 1000)\n for (let index = 0; index < fields.length; index++) {\n const part = fields[index]\n if (part.type === 'day') date = Number(part.value)\n else if (part.type === 'hour') hour = Number(part.value)\n else if (part.type === 'minute') minute = Number(part.value)\n else if (part.type === 'second') seconds = Number(part.value)\n }\n if (\n !(\n date >= 1 &&\n date <= 31 &&\n hour >= 0 &&\n hour <= 24 &&\n minute >= 0 &&\n minute < 60 &&\n seconds >= 0 &&\n seconds < 60\n )\n )\n throw new RangeError('Unsupported host timezone fields')\n const utcDate = DateFromTime(key * 1000),\n nextDate = date === utcDate + 1 || (date === 1 && utcDate >= 28),\n previousDate = date === utcDate - 1 || (utcDate === 1 && date >= 28)\n if (date !== utcDate && !nextDate && !previousDate)\n throw new RangeError('Unsupported host timezone calendar')\n const difference = date === utcDate ? 0 : nextDate ? 1 : -1,\n utcSeconds = Number(((epochSecond % 86400n) + 86400n) % 86400n),\n offsetSeconds =\n difference * 86400 +\n (hour % 24) * 3600 +\n minute * 60 +\n seconds -\n utcSeconds\n if (Math.abs(offsetSeconds) >= 86400)\n throw new RangeError('Invalid host timezone offset')\n const offset = BigInt(offsetSeconds) * second\n if (offsets.size >= 64) offsets.delete(offsets.keys().next().value!)\n offsets.set(key, offset)\n return offset\n }\n return offsetNanoseconds\n}\n\nexport function createHostTimeZone(timeZone: string): TimeZoneKernel {\n const offsetNanoseconds = createHostTimeZoneOffset(timeZone)\n const sampleOffsets = (local: bigint): bigint[] => {\n const result: bigint[] = []\n const samples = [clamp(local - day), clamp(local), clamp(local + day)]\n for (let index = 0; index < samples.length; index++) {\n const offset = offsetNanoseconds(samples[index])\n if (!result.includes(offset)) result.push(offset)\n }\n return result\n }\n const candidatesFor = (local: bigint): bigint[] => {\n const candidates = sampleOffsets(local)\n .map(offset => local - offset)\n .filter(\n instant =>\n instant >= -limit &&\n instant <= limit &&\n instant + offsetNanoseconds(instant) === local\n )\n return candidates.sort((one, two) => (one < two ? -1 : one > two ? 1 : 0))\n }\n const possibleInstants = (fields: ISODateTime): bigint[] =>\n candidatesFor(isoToEpochNanoseconds(fields))\n const resolve = (\n fields: ISODateTime,\n disambiguation: Disambiguation = 'compatible'\n ): bigint => {\n if (!['compatible', 'earlier', 'later', 'reject'].includes(disambiguation))\n throw new RangeError('Invalid disambiguation')\n const local = isoToEpochNanoseconds(fields),\n candidates = candidatesFor(local)\n if (candidates.length === 1) return candidates[0]\n if (disambiguation === 'reject')\n throw new RangeError('Ambiguous or nonexistent local time')\n if (candidates.length)\n return candidates[disambiguation === 'later' ? candidates.length - 1 : 0]\n const before = offsetNanoseconds(clamp(local - day)),\n after = offsetNanoseconds(clamp(local + day))\n if (after <= before) throw new RangeError('No matching instant')\n return check(local - (disambiguation === 'earlier' ? after : before))\n }\n const canonical =\n (links as Record<string, string>)[timeZone] ??\n (primary as Record<string, string>)[timeZone] ??\n timeZone\n // Host tzdata can contain transitions absent from our generated metadata.\n const step = BigInt(\n Math.min(steps[timeZone] ?? steps[canonical] ?? 7 * 86400, 7 * 86400)\n )\n const transitions: {\n direction: string\n first: bigint\n last: bigint\n value: bigint | null\n }[] = []\n const unchanged: {first: bigint; last: bigint; offset: bigint}[] = []\n const transition = (\n instant: bigint,\n direction: 'next' | 'previous'\n ): bigint | null => {\n check(instant)\n const known = transitions.find(\n row =>\n row.direction === direction &&\n instant >= row.first &&\n instant <= row.last\n )\n if (known) return known.value\n const next = direction === 'next'\n const floorSecond = (value: bigint) =>\n value / second - (value < 0n && value % second ? 1n : 0n)\n const earliest = -5364662400n // IANA transitions begin after 1800.\n const horizon = 3n * 366n * 86400n\n const now = floorSecond(BigInt(nowMilliseconds()) * 1000000n)\n const original = floorSecond(next ? instant : instant - 1n)\n let cursor = next ? (original < earliest ? earliest : original) : original\n const end = next ? (original > now ? original : now) + horizon : earliest\n const boundary = next\n ? end > limit / second\n ? limit / second\n : end\n : earliest\n let value: bigint | null = null\n let initial = cursor\n while (next ? cursor < boundary : cursor > boundary) {\n const observed = unchanged.find(row =>\n next\n ? row.first <= cursor && cursor < row.last\n : row.first < cursor && cursor <= row.last\n )\n let probe = observed\n ? next\n ? observed.last\n : observed.first\n : cursor + (next ? step : -step)\n if (next ? probe > boundary : probe < boundary) probe = boundary\n const offset = offsetNanoseconds(cursor * second)\n if (offsetNanoseconds(probe * second) !== offset) {\n let left = next ? cursor : probe\n let right = next ? probe : cursor\n const before = offsetNanoseconds(left * second)\n while (right - left > 1n) {\n const middle = (left + right) >> 1n\n if (offsetNanoseconds(middle * second) === before) left = middle\n else right = middle\n }\n value = right * second\n break\n }\n let first = next ? cursor : probe\n let last = next ? probe : cursor\n for (let index = unchanged.length - 1; index >= 0; index--) {\n const row = unchanged[index]\n if (row.offset === offset && row.first <= last && first <= row.last) {\n if (row.first < first) first = row.first\n if (row.last > last) last = row.last\n unchanged.splice(index, 1)\n }\n }\n if (unchanged.length >= 64) unchanged.shift()\n unchanged.push({first, last, offset})\n cursor = probe\n // Future host rules repeat annually or settle at a fixed offset. Search\n // nearby years first, then resume the finite historical record.\n if (!next && initial > now + horizon && initial - cursor >= horizon) {\n cursor = now + horizon\n initial = cursor\n }\n }\n if (transitions.length >= 64) transitions.shift()\n transitions.push({\n direction,\n first: next ? instant : value === null ? -limit : value + 1n,\n last: next ? (value === null ? instant : value - 1n) : instant,\n value,\n })\n return value\n }\n return {offsetNanoseconds, possibleInstants, resolve, transition}\n}\n","export const beforeHijrah = {\n\t\"ady\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"af\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"agq\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ak\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"am\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ar\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"as\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"asa\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ast\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"az\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ba\": [\n\t\t\"Һижрәткә тиклем\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"bas\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"be\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"bem\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"bez\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"bg\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"bgc\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"bho\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"blo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"bm\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"bn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"bo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"br\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"brx\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"bs\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"bua\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ca\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ccp\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ce\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ceb\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"cgg\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"chr\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ckb\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"cop\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"cs\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"csw\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"cv\": [\n\t\t\"хиджрӑччен\",\n\t\t\"х-ч.\",\n\t\t\"х-ч.\"\n\t],\n\t\"cy\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"da\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"dav\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"de\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"dje\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"doi\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"dsb\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"dua\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"dyo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"dz\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ebu\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ee\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"el\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"en\": [\n\t\t\"Before Hijrah\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"eo\": [\n\t\t\"antaŭ heĝiro\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"es\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"et\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"eu\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ewo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"fa\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ff\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"fi\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"fil\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"fo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"fr\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"fur\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"fy\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ga\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"gaa\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"gd\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"gl\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"gsw\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"gu\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"guz\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"gv\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ha\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"haw\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"he\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"hi\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"hr\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"hsb\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"hu\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"hy\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ia\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"id\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ie\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ig\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ii\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"is\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"it\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ja\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"jgo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"jmc\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"jv\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ka\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"kab\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"kam\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"kbd\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"kde\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"kea\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"kek\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"kgp\": [\n\t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\n\t],\n\t\"lb\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"lg\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"lij\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"lkt\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"lld\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"lmo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ln\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"lo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"lrc\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"lt\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"lu\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"luo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"luy\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"lv\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"mai\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"mas\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"mer\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"mfe\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"mg\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"mgh\": [\n\t\t\"BH\",\n\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\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"nnh\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"no\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"nqo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"nso\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"nus\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"nyn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"oc\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"om\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"or\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"os\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"pa\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"pcm\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"pl\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"pms\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"prg\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ps\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"pt\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"qu\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"quc\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"raj\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"rm\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"rn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ro\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"rof\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ru\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"rw\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"rwk\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sa\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sah\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"saq\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sat\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sbp\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sc\": [\n\t\t\"in antis de s’ègira\",\n\t\t\"a.E.\",\n\t\t\"A\"\n\t],\n\t\"scn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sd\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"se\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"seh\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ses\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sg\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"shi\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"shn\": [\n\t\t\"ဢွၼ်ၼႃႈ ႁေးၵျိရႃႇ\",\n\t\t\"ဢ.ႁ.\",\n\t\t\"ဢ.ႁ.\"\n\t],\n\t\"si\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sk\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sl\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"smn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"so\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sq\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sr\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"st\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"su\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sv\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"sw\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"syr\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"szl\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ta\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"te\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"teo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"tg\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"th\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ti\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"tk\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"tn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"to\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"tok\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"tr\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"tt\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"twq\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"tyv\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"tzm\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ug\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"uk\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"und\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"ur\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"uz\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"vai\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"vec\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"vi\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"vmw\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"vun\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"wae\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"wo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"xh\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"xnr\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"xog\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"yav\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"yi\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"yo\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"yrl\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"yue\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"za\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"zgh\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"zh\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"zu\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"bal-Latn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"hi-Latn\": [\n\t\t\"Before Hijrah\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"suz-Sunu\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"blt-Latn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"byn-Latn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"cu-Glag\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"en-Dsrt\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"en-Shaw\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"iu-Latn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t],\n\t\"kaa-Latn\": [\n\t\t\"BH\",\n\t\t\"BH\",\n\t\t\"BH\"\n\t]\n};\n","// Adapted from ICU4X 2.3.0, east_asian_traditional/simple.rs.\n// Unicode-3.0; see LICENSE.md.\nimport {DayFromYear} from '#packages/ecma262-abstract/DateOperations.js'\nimport type {CalendarYearData} from '#packages/temporal/host-calendar-data.js'\n\nconst day = 86400000n\nconst month = (day * 295305888531n) / 10000000000n\nconst year = (day * 146097n) / 400n\nconst term = year / 12n\nconst moonEpoch = 730125n * day + 65640000n\nfunction floor(value: bigint, divisor: bigint): bigint {\n return value / divisor - (value < 0n && value % divisor !== 0n ? 1n : 0n)\n}\nfunction onOrBefore(date: bigint, base: bigint, period: bigint): bigint {\n return base + floor(date * day - base + day - 1n, period) * period\n}\n\nexport function lunisolarMonthSerial(epoch: number): number {\n return Number(floor(BigInt(epoch + 719178) * day - moonEpoch, month))\n}\n\nexport function lunisolarMonthEpoch(serial: number): number {\n if (!Number.isSafeInteger(serial)) throw new RangeError('Invalid month count')\n const epoch = floor(moonEpoch + BigInt(serial) * month, day) - 719163n\n if (epoch < -110000400n || epoch > 110000400n)\n throw new RangeError('Calendar month out of range')\n return Number(epoch)\n}\n\nexport function approximateLunisolarYear(\n calendar: 'chinese' | 'dangi',\n relatedYear: number\n): CalendarYearData {\n const offset =\n relatedYear < 1900\n ? 27940000n\n : calendar === 'chinese'\n ? 28800000n\n : 32400000n\n let solar = onOrBefore(\n BigInt(DayFromYear(relatedYear) + 719162),\n 730110n * day + 27840000n + offset,\n year\n )\n let moon = onOrBefore(\n floor(solar, day),\n 730125n * day + 65640000n + offset,\n month\n ),\n nextMoon = moon + month,\n solarTerm = -2,\n hadLeap = false\n while (\n solarTerm < 0 ||\n (floor(nextMoon, day) <= floor(solar, day) && !hadLeap)\n ) {\n if (floor(nextMoon, day) <= floor(solar, day) && !hadLeap) hadLeap = true\n else {\n solarTerm++\n solar += term\n }\n moon = nextMoon\n nextMoon += month\n }\n const newYear = floor(moon, day),\n lengths: number[] = []\n let leap = 0\n while (\n solarTerm < 12 ||\n (floor(nextMoon, day) <= floor(solar, day) && !hadLeap)\n ) {\n const index = solarTerm + Number(leap !== 0)\n if (index < 13)\n lengths[index] = Number(floor(nextMoon, day) - floor(moon, day))\n if (floor(nextMoon, day) <= floor(solar, day) && !hadLeap) {\n hadLeap = true\n leap = solarTerm\n } else {\n solarTerm++\n solar += term\n }\n moon = nextMoon\n nextMoon += month\n }\n const earliest = DayFromYear(relatedYear) + 18,\n starts = [earliest + Number((newYear - BigInt(earliest + 719163)) & 63n)],\n count = leap ? 13 : 12\n for (let index = 0; index < count; index++)\n starts.push(starts[index] + lengths[index])\n return {starts: starts.slice(0, count), end: starts[count], leap}\n}\n","// Generated from pinned ICU4X historical calendar data.\nexport const ranges = [{\n\tfirstYear: 1900,\n\tstartDay: -25537,\n\tyears: [\n\t\t71378,\n\t\t1874,\n\t\t3749,\n\t\t46666,\n\t\t1611,\n\t\t2715,\n\t\t38230,\n\t\t1386,\n\t\t2905,\n\t\t22354,\n\t\t1874,\n\t\t56101,\n\t\t2853,\n\t\t2635,\n\t\t46251,\n\t\t685,\n\t\t1387,\n\t\t19305,\n\t\t3497,\n\t\t64914,\n\t\t3730,\n\t\t3365,\n\t\t47693,\n\t\t2646,\n\t\t694,\n\t\t38325,\n\t\t1748,\n\t\t3753,\n\t\t24210,\n\t\t3730,\n\t\t52518,\n\t\t1323,\n\t\t2647,\n\t\t45750,\n\t\t2906,\n\t\t1748,\n\t\t28361,\n\t\t1865,\n\t\t63123,\n\t\t2707,\n\t\t1323,\n\t\t51803,\n\t\t2733,\n\t\t1386,\n\t\t39765,\n\t\t2980,\n\t\t2889,\n\t\t23187,\n\t\t2709,\n\t\t62765,\n\t\t1334,\n\t\t2733,\n\t\t46506,\n\t\t1458,\n\t\t3493,\n\t\t32074,\n\t\t3402,\n\t\t68245,\n\t\t2711,\n\t\t1366,\n\t\t51893,\n\t\t2773,\n\t\t1746,\n\t\t36517,\n\t\t3749,\n\t\t1610,\n\t\t27799,\n\t\t2715,\n\t\t62810,\n\t\t1386,\n\t\t2921,\n\t\t46930,\n\t\t2898,\n\t\t2853,\n\t\t38475,\n\t\t2635,\n\t\t70827,\n\t\t685,\n\t\t1389,\n\t\t52073,\n\t\t3497,\n\t\t3474,\n\t\t40229,\n\t\t3365,\n\t\t88653,\n\t\t2646,\n\t\t694,\n\t\t50613,\n\t\t1749,\n\t\t3753,\n\t\t48786,\n\t\t3730,\n\t\t3366,\n\t\t27222,\n\t\t2647,\n\t\t70870,\n\t\t858,\n\t\t1749,\n\t\t46793,\n\t\t1865,\n\t\t1683,\n\t\t38187,\n\t\t1323,\n\t\t2651,\n\t\t21850,\n\t\t1386,\n\t\t64341,\n\t\t2980,\n\t\t2889,\n\t\t47763,\n\t\t2709,\n\t\t1325,\n\t\t35501,\n\t\t2741,\n\t\t79274,\n\t\t1490,\n\t\t3493,\n\t\t56650,\n\t\t3402,\n\t\t3221,\n\t\t38190,\n\t\t1366,\n\t\t2741,\n\t\t21938,\n\t\t1746,\n\t\t52901,\n\t\t1829,\n\t\t1611,\n\t\t44183,\n\t\t3243,\n\t\t1370,\n\t\t27350,\n\t\t2921,\n\t\t96082,\n\t\t2898,\n\t\t2853,\n\t\t55883,\n\t\t2635,\n\t\t1195,\n\t\t42331,\n\t\t1453,\n\t\t2922,\n\t\t23378,\n\t\t3474,\n\t\t64805,\n\t\t3365,\n\t\t2645,\n\t\t46253,\n\t\t1206,\n\t\t1461,\n\t\t28074,\n\t\t3785,\n\t\t73362,\n\t\t3730,\n\t\t3366,\n\t\t51798,\n\t\t2647,\n\t\t1366,\n\t\t34517,\n\t\t1877,\n\t\t1865,\n\t\t28307,\n\t\t1683,\n\t\t62763,\n\t\t1323,\n\t\t2651,\n\t\t46426,\n\t\t1386,\n\t\t2917,\n\t\t38730,\n\t\t2890,\n\t\t72341,\n\t\t2709,\n\t\t1325,\n\t\t51885,\n\t\t2741,\n\t\t1450,\n\t\t35749,\n\t\t3493,\n\t\t3402,\n\t\t31893,\n\t\t3222,\n\t\t63822,\n\t\t1366,\n\t\t2741,\n\t\t46514,\n\t\t1746,\n\t\t3749,\n\t\t36426,\n\t\t1675,\n\t\t68759,\n\t\t1195,\n\t\t1371,\n\t\t51926,\n\t\t2922,\n\t\t1874,\n\t\t38693,\n\t\t2885,\n\t\t2699,\n\t\t21659,\n\t\t1195,\n\t\t59739,\n\t\t1453\n\t]\n}];\n","// Generated from pinned ICU4X historical calendar data.\nexport const ranges = [{\n\tfirstYear: 1900,\n\tstartDay: -25537,\n\tyears: [\n\t\t71378,\n\t\t1874,\n\t\t3749,\n\t\t46666,\n\t\t1611,\n\t\t2715,\n\t\t38230,\n\t\t1386,\n\t\t2905,\n\t\t22354,\n\t\t1874,\n\t\t56101,\n\t\t2853,\n\t\t2635,\n\t\t45723,\n\t\t2733,\n\t\t1386,\n\t\t19305,\n\t\t2985,\n\t\t64338,\n\t\t3474,\n\t\t3365,\n\t\t47693,\n\t\t2390,\n\t\t693,\n\t\t38317,\n\t\t1748,\n\t\t3497,\n\t\t23954,\n\t\t3730,\n\t\t52518,\n\t\t1319,\n\t\t2647,\n\t\t45750,\n\t\t2778,\n\t\t1748,\n\t\t28329,\n\t\t1865,\n\t\t63123,\n\t\t2707,\n\t\t1323,\n\t\t51803,\n\t\t2413,\n\t\t2922,\n\t\t39764,\n\t\t2980,\n\t\t2889,\n\t\t23187,\n\t\t2709,\n\t\t62763,\n\t\t1325,\n\t\t2733,\n\t\t46442,\n\t\t3506,\n\t\t3492,\n\t\t32073,\n\t\t3402,\n\t\t72341,\n\t\t2710,\n\t\t1366,\n\t\t51893,\n\t\t2773,\n\t\t1746,\n\t\t36517,\n\t\t3749,\n\t\t3658,\n\t\t27798,\n\t\t2715,\n\t\t62806,\n\t\t1386,\n\t\t2905,\n\t\t46930,\n\t\t1874,\n\t\t1829,\n\t\t38475,\n\t\t2635,\n\t\t70315,\n\t\t685,\n\t\t1387,\n\t\t52073,\n\t\t3497,\n\t\t3474,\n\t\t39717,\n\t\t3365,\n\t\t88653,\n\t\t2646,\n\t\t694,\n\t\t54701,\n\t\t1748,\n\t\t3497,\n\t\t48530,\n\t\t3730,\n\t\t3366,\n\t\t27222,\n\t\t2647,\n\t\t70326,\n\t\t2906,\n\t\t1748,\n\t\t44745,\n\t\t1865,\n\t\t1683,\n\t\t38183,\n\t\t1323,\n\t\t2651,\n\t\t21850,\n\t\t874,\n\t\t64341,\n\t\t2980,\n\t\t2889,\n\t\t47763,\n\t\t2709,\n\t\t1325,\n\t\t27229,\n\t\t2733,\n\t\t79274,\n\t\t1490,\n\t\t3493,\n\t\t48458,\n\t\t3402,\n\t\t2709,\n\t\t38189,\n\t\t1366,\n\t\t2741,\n\t\t21930,\n\t\t1746,\n\t\t52901,\n\t\t3749,\n\t\t3658,\n\t\t44182,\n\t\t3227,\n\t\t1370,\n\t\t27349,\n\t\t2921,\n\t\t96082,\n\t\t1874,\n\t\t2853,\n\t\t54859,\n\t\t2635,\n\t\t1195,\n\t\t42331,\n\t\t1389,\n\t\t2921,\n\t\t23378,\n\t\t3474,\n\t\t64805,\n\t\t3365,\n\t\t2637,\n\t\t46253,\n\t\t694,\n\t\t1461,\n\t\t28073,\n\t\t3753,\n\t\t73106,\n\t\t3730,\n\t\t3366,\n\t\t51798,\n\t\t2647,\n\t\t1238,\n\t\t34485,\n\t\t1749,\n\t\t3785,\n\t\t28306,\n\t\t1683,\n\t\t62763,\n\t\t1323,\n\t\t2651,\n\t\t46426,\n\t\t1386,\n\t\t2901,\n\t\t38729,\n\t\t2889,\n\t\t72339,\n\t\t2709,\n\t\t1325,\n\t\t51885,\n\t\t2741,\n\t\t1450,\n\t\t35749,\n\t\t3493,\n\t\t3402,\n\t\t31381,\n\t\t3221,\n\t\t62766,\n\t\t1366,\n\t\t2741,\n\t\t46514,\n\t\t1746,\n\t\t3749,\n\t\t40522,\n\t\t1610,\n\t\t68759,\n\t\t3243,\n\t\t1370,\n\t\t51925,\n\t\t2921,\n\t\t1874,\n\t\t38565,\n\t\t2853,\n\t\t1611,\n\t\t29847,\n\t\t1195,\n\t\t58715,\n\t\t1453\n\t]\n}];\n","import {ranges as chinese} from '@formatjs_generated/icu.calendar/host-chinese.js'\nimport {ranges as dangi} from '@formatjs_generated/icu.calendar/host-dangi.js'\n\nexport interface CalendarYearData {\n starts: number[]\n end: number\n leap: number\n}\ninterface Range {\n firstYear: number\n years: readonly number[]\n starts: number[]\n}\nconst cache = new Map<string, Range[]>()\nfunction ranges(calendar: 'chinese' | 'dangi'): Range[] {\n let result = cache.get(calendar)\n if (!result) {\n result = (calendar === 'chinese' ? chinese : dangi).map(range => {\n const starts = [range.startDay]\n for (const packed of range.years) {\n let days = (packed >>> 13 ? 13 : 12) * 29,\n bits = packed & 8191\n while (bits) {\n days++\n bits &= bits - 1\n }\n starts.push(starts[starts.length - 1] + days)\n }\n return {...range, starts}\n })\n cache.set(calendar, result)\n }\n return result\n}\n\nexport function compactCalendarYear(\n calendar: 'chinese' | 'dangi',\n year: number\n): CalendarYearData | undefined {\n for (const range of ranges(calendar)) {\n const index = year - range.firstYear\n if (index < 0 || index >= range.years.length) continue\n const packed = range.years[index],\n leap = packed >>> 13,\n count = leap ? 13 : 12,\n starts = [range.starts[index]]\n for (let month = 0; month < count - 1; month++)\n starts.push(starts[month] + 29 + ((packed >>> month) & 1))\n return {starts, end: range.starts[index + 1], leap}\n }\n return undefined\n}\n","import {YearFromTime} from '#packages/ecma262-abstract/DateOperations.js'\nimport {\n approximateLunisolarYear,\n lunisolarMonthSerial,\n lunisolarMonthEpoch,\n} from '#packages/temporal/lunisolar.js'\nimport {\n compactCalendarYear,\n type CalendarYearData,\n} from '#packages/temporal/host-calendar-data.js'\n\nexport type HostTableCalendar = 'chinese' | 'dangi' | 'islamic-umalqura'\nconst Constructor = globalThis.Intl?.DateTimeFormat\nconst parts = Constructor?.prototype.formatToParts\nconst resolved = Constructor?.prototype.resolvedOptions\nconst dayMilliseconds = 86400000\nconst limit = 100000000\nconst formatters = new Map<HostTableCalendar, Intl.DateTimeFormat>()\nconst years = new Map<string, CalendarYearData>()\nfunction remember(key: string, value: CalendarYearData): CalendarYearData {\n if (years.size >= 128) years.delete(years.keys().next().value!)\n years.set(key, value)\n return value\n}\n\nfunction fields(calendar: HostTableCalendar, day: number) {\n if (!Number.isInteger(day) || Math.abs(day) > limit)\n throw new RangeError('Host Intl calendar date out of range')\n if (!Constructor || !parts || !resolved)\n throw new RangeError(\n 'Temporal requires Intl.DateTimeFormat calendar support'\n )\n let formatter = formatters.get(calendar)\n if (!formatter) {\n formatter = new Constructor('en-US-u-nu-latn', {\n calendar,\n timeZone: 'UTC',\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n })\n if (resolved.call(formatter).calendar !== calendar)\n throw new RangeError(`Host Intl does not support ${calendar}`)\n formatters.set(calendar, formatter)\n }\n let year = NaN,\n date = NaN\n for (const part of parts.call(formatter, day * dayMilliseconds)) {\n const type: string = part.type\n if (type === 'relatedYear' || type === 'year') year = Number(part.value)\n else if (type === 'day') date = Number(part.value)\n }\n if (!Number.isSafeInteger(year) || !(date >= 1 && date <= 30))\n throw new RangeError('Unsupported host Intl calendar fields')\n return {year, day: date}\n}\n\nexport function hostCalendarYear(\n calendar: HostTableCalendar,\n year: number\n): CalendarYearData {\n if (!Number.isSafeInteger(year)) throw new RangeError('Invalid calendar year')\n const key = `${calendar}:${year}`,\n cached = years.get(key)\n if (cached) return cached\n if (calendar !== 'islamic-umalqura') {\n const compact = compactCalendarYear(calendar, year)\n return remember(key, compact ?? approximateLunisolarYear(calendar, year))\n }\n let probe = -492148 + 354 * (year - 1) + Math.floor((3 + 11 * year) / 30)\n if (Math.abs(probe) > limit - 800)\n throw new RangeError('Host Intl calendar year requires boundary data')\n probe += 400\n let value = fields(calendar, probe)\n // Find the following year, then walk back by actual host month boundaries.\n for (let attempts = 0; value.year <= year; attempts++) {\n if (attempts >= 3) throw new RangeError('Unsupported host calendar year')\n probe += 400\n value = fields(calendar, probe)\n }\n const starts: number[] = []\n let end = NaN\n for (let attempts = 0; value.year >= year; attempts++) {\n if (attempts >= 40) throw new RangeError('Unsupported host calendar year')\n const start = probe - value.day + 1\n if (value.year === year) {\n starts.push(start)\n } else end = start\n probe = start - 1\n value = fields(calendar, probe)\n }\n starts.reverse()\n if (starts.length !== 12)\n throw new RangeError('Unsupported host calendar year')\n return remember(key, {starts, end, leap: 0})\n}\n\nexport function hostCalendarDate(\n calendar: HostTableCalendar,\n epoch: number\n): {year: number; month: number; day: number} {\n let year =\n calendar === 'islamic-umalqura'\n ? fields(calendar, epoch).year\n : YearFromTime(epoch * dayMilliseconds)\n let data = hostCalendarYear(calendar, year)\n if (epoch < data.starts[0]) data = hostCalendarYear(calendar, --year)\n else if (epoch >= data.end) data = hostCalendarYear(calendar, ++year)\n let month = data.starts.length\n while (data.starts[month - 1] > epoch) month--\n return {year, month, day: epoch - data.starts[month - 1] + 1}\n}\n\nexport function hostCalendarAddMonths(\n calendar: 'chinese' | 'dangi',\n year: number,\n month: number,\n delta: number\n): {year: number; month: number} {\n if (!Number.isSafeInteger(delta)) throw new RangeError('Invalid month count')\n const target =\n lunisolarMonthSerial(hostCalendarYear(calendar, year).starts[month - 1]) +\n delta\n year = YearFromTime(lunisolarMonthEpoch(target) * dayMilliseconds)\n for (;;) {\n const data = hostCalendarYear(calendar, year),\n index = target - lunisolarMonthSerial(data.starts[0])\n if (index < 0) year--\n else if (index >= data.starts.length) year++\n else return {year, month: index + 1}\n }\n}\n\nexport function hostCalendarMonthDifference(\n calendar: 'chinese' | 'dangi',\n oneYear: number,\n oneMonth: number,\n twoYear: number,\n twoMonth: number\n): number {\n return (\n lunisolarMonthSerial(\n hostCalendarYear(calendar, twoYear).starts[twoMonth - 1]\n ) -\n lunisolarMonthSerial(\n hostCalendarYear(calendar, oneYear).starts[oneMonth - 1]\n )\n )\n}\n","import {\n fallbackLunisolar,\n fallbackUmmAlQura,\n} from '#packages/temporal/fallback-data.js'\nimport {\n hostCalendarYear,\n hostCalendarDate,\n hostCalendarAddMonths,\n hostCalendarMonthDifference,\n} from '#packages/temporal/host-calendar.js'\n\ndeclare global {\n interface ImportMeta {\n readonly formatjsTemporalHostCalendar?: boolean\n }\n}\nexport const hostCalendarData: boolean =\n import.meta.formatjsTemporalHostCalendar === true\n\nexport type TableCalendarId = 'chinese' | 'dangi' | 'islamic-umalqura'\nconst alphabet =\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'\nexport function isLunisolar(calendar: string): calendar is 'chinese' | 'dangi' {\n return calendar === 'chinese' || calendar === 'dangi'\n}\nfunction data(calendar: 'chinese' | 'dangi') {\n return fallbackLunisolar(calendar)\n}\nfunction pattern(calendar: 'chinese' | 'dangi', year: number): number {\n const table = data(calendar),\n index = year - table.firstYear\n if (!Number.isInteger(index) || index < 0 || index * 2 >= table.years.length)\n throw new RangeError('Calendar year out of range')\n return table.dictionary[\n alphabet.indexOf(table.years[index * 2]) * 64 +\n alphabet.indexOf(table.years[index * 2 + 1])\n ]\n}\nfunction length(packed: number): number {\n let days = (packed >>> 13 ? 13 : 12) * 29,\n bits = packed & 8191\n while (bits) {\n days++\n bits &= bits - 1\n }\n return days\n}\nexport function tableLeapMonth(\n calendar: 'chinese' | 'dangi',\n year: number\n): number {\n if (hostCalendarData) return hostCalendarYear(calendar, year).leap\n return pattern(calendar, year) >>> 13\n}\nexport function tableYearStart(\n calendar: TableCalendarId,\n year: number\n): number | undefined {\n if (hostCalendarData) {\n if (calendar === 'islamic-umalqura' && (year < 1300 || year > 1601))\n return undefined\n return hostCalendarYear(calendar, year).starts[0]\n }\n if (calendar === 'islamic-umalqura') {\n const ummAlQura = fallbackUmmAlQura()\n const index = year - ummAlQura.firstYear\n return index >= 0 && index < ummAlQura.startDays.length\n ? ummAlQura.startDays[index]\n : undefined\n }\n const table = data(calendar),\n index = year - table.firstYear\n if (index === table.years.length / 2) return table.endDay\n pattern(calendar, year)\n const block = Math.floor(index / 64)\n let start = table.checkpoints[block]\n for (let i = block * 64; i < index; i++)\n start += length(pattern(calendar, table.firstYear + i))\n return start\n}\nexport function tableMonthLength(\n calendar: TableCalendarId,\n year: number,\n month: number\n): number | undefined {\n if (hostCalendarData) {\n if (calendar === 'islamic-umalqura' && (year < 1300 || year > 1600))\n return undefined\n const data = hostCalendarYear(calendar, year)\n return (data.starts[month] ?? data.end) - data.starts[month - 1]\n }\n if (calendar === 'islamic-umalqura') {\n const ummAlQura = fallbackUmmAlQura()\n const index = year - ummAlQura.firstYear\n return index >= 0 && index < ummAlQura.monthLengths.length\n ? 29 + ((ummAlQura.monthLengths[index] >>> (month - 1)) & 1)\n : undefined\n }\n return 29 + ((pattern(calendar, year) >>> (month - 1)) & 1)\n}\nexport function tableMonthSerial(\n calendar: 'chinese' | 'dangi',\n year: number,\n month: number\n): number {\n if (hostCalendarData)\n return hostCalendarMonthDifference(calendar, 1970, 1, year, month)\n const table = data(calendar),\n index = year - table.firstYear\n pattern(calendar, year)\n const block = Math.floor(index / 64)\n let serial = table.monthCheckpoints[block]\n for (let i = block * 64; i < index; i++)\n serial += tableLeapMonth(calendar, table.firstYear + i) ? 13 : 12\n return serial + month - 1\n}\nexport function tableYearMonth(\n calendar: 'chinese' | 'dangi',\n serial: number\n): {year: number; month: number} {\n if (hostCalendarData) return hostCalendarAddMonths(calendar, 1970, 1, serial)\n const table = data(calendar),\n checkpoints = table.monthCheckpoints\n if (!Number.isSafeInteger(serial) || serial < 0)\n throw new RangeError('Calendar month out of range')\n let low = 0,\n high = checkpoints.length\n while (low + 1 < high) {\n const mid = Math.floor((low + high) / 2)\n if (checkpoints[mid] <= serial) low = mid\n else high = mid\n }\n let year = table.firstYear + low * 64,\n remaining = serial - checkpoints[low]\n for (;;) {\n const count = tableLeapMonth(calendar, year) ? 13 : 12\n if (remaining < count) return {year, month: remaining + 1}\n remaining -= count\n year++\n }\n}\nexport function tableDate(\n calendar: 'chinese' | 'dangi',\n epoch: number\n): {year: number; month: number; day: number} {\n if (hostCalendarData) return hostCalendarDate(calendar, epoch)\n const table = data(calendar),\n checkpoints = table.checkpoints\n if (epoch < checkpoints[0] || epoch >= table.endDay)\n throw new RangeError('Calendar date out of range')\n let low = 0,\n high = checkpoints.length\n while (low + 1 < high) {\n const mid = Math.floor((low + high) / 2)\n if (checkpoints[mid] <= epoch) low = mid\n else high = mid\n }\n let year = table.firstYear + low * 64,\n remaining = epoch - checkpoints[low]\n while (remaining >= length(pattern(calendar, year)))\n remaining -= length(pattern(calendar, year++))\n let month = 1\n while (remaining >= tableMonthLength(calendar, year, month)!)\n remaining -= tableMonthLength(calendar, year, month++)!\n return {year, month, day: remaining + 1}\n}\n\nexport function tableAddMonths(\n calendar: 'chinese' | 'dangi',\n year: number,\n month: number,\n months: number\n): {year: number; month: number} {\n return hostCalendarData\n ? hostCalendarAddMonths(calendar, year, month, months)\n : tableYearMonth(calendar, tableMonthSerial(calendar, year, month) + months)\n}\n\nexport function tableMonthDifference(\n calendar: 'chinese' | 'dangi',\n oneYear: number,\n oneMonth: number,\n twoYear: number,\n twoMonth: number\n): number {\n return hostCalendarData\n ? hostCalendarMonthDifference(\n calendar,\n oneYear,\n oneMonth,\n twoYear,\n twoMonth\n )\n : tableMonthSerial(calendar, twoYear, twoMonth) -\n tableMonthSerial(calendar, oneYear, oneMonth)\n}\n","import { DateFromTime, DayFromYear, DaysInYear, MonthFromTime, YearFromTime } from \"#packages/ecma262-abstract/DateOperations.js\";\n// Shared numeric calendar helpers; not named ECMA-402 abstract operations.\nexport const arithmeticCalendars = [\n\t\"iso8601\",\n\t\"gregory\",\n\t\"buddhist\",\n\t\"japanese\",\n\t\"roc\",\n\t\"coptic\",\n\t\"ethiopic\",\n\t\"ethioaa\",\n\t\"hebrew\",\n\t\"indian\",\n\t\"islamic-civil\",\n\t\"islamic-tbla\",\n\t\"persian\"\n];\nconst monthStarts = [\n\t0,\n\t31,\n\t59,\n\t90,\n\t120,\n\t151,\n\t181,\n\t212,\n\t243,\n\t273,\n\t304,\n\t334\n];\nconst mod = (value, divisor) => value - Math.floor(value / divisor) * divisor;\nfunction integer(value) {\n\tif (!Number.isSafeInteger(value)) throw new RangeError(\"Expected safe integer\");\n\treturn value;\n}\nexport function HebrewLeapYear(year) {\n\treturn mod(7 * year + 1, 19) < 7;\n}\nexport function HebrewElapsedMonths(year) {\n\treturn Math.floor((235 * year - 234) / 19);\n}\n// Same postponement arithmetic as crates/intl_datetimeformat_calendars/core.rs.\nfunction hebrewDelay(year) {\n\tconst months = HebrewElapsedMonths(year);\n\tconst day = 29 * months + Math.floor((12084 + 13753 * months) / 25920);\n\treturn day + Number(mod(3 * (day + 1), 7) < 3);\n}\nfunction IsISOCalendar(calendar) {\n\treturn [\n\t\t\"iso8601\",\n\t\t\"gregory\",\n\t\t\"buddhist\",\n\t\t\"japanese\",\n\t\t\"roc\"\n\t].includes(calendar);\n}\nfunction CalendarISOYear(calendar, year) {\n\treturn year + (calendar === \"buddhist\" ? -543 : calendar === \"roc\" ? 1911 : 0);\n}\nexport function ArithmeticCalendarStartOfYear(calendar, year) {\n\tif (IsISOCalendar(calendar)) return DayFromYear(CalendarISOYear(calendar, year));\n\tswitch (calendar) {\n\t\tcase \"coptic\": return 1824665 - 2440588 + 365 * year + Math.floor(year / 4);\n\t\tcase \"ethiopic\": return 1723856 - 2440588 + 365 * year + Math.floor(year / 4);\n\t\tcase \"ethioaa\": {\n\t\t\tconst value = year - 5500;\n\t\t\treturn 1723856 - 2440588 + 365 * value + Math.floor(value / 4);\n\t\t}\n\t\tcase \"indian\": {\n\t\t\tconst value = year + 78;\n\t\t\treturn DayFromYear(value) + 80;\n\t\t}\n\t\tcase \"islamic-civil\":\n\t\tcase \"islamic-tbla\": return 1948440 - 2440588 - Number(calendar === \"islamic-tbla\") + 354 * (year - 1) + Math.floor((3 + 11 * year) / 30);\n\t\tcase \"persian\": return 1948320 - 2440588 + 365 * (year - 1) + Math.floor((8 * year + 21) / 33);\n\t}\n\tconst present = hebrewDelay(year);\n\treturn -2092590 + present + (hebrewDelay(year + 1) - present === 356 ? 2 : present - hebrewDelay(year - 1) === 382 ? 1 : 0);\n}\nexport function ArithmeticCalendarMonthsInYear(calendar, year) {\n\treturn [\n\t\t\"coptic\",\n\t\t\"ethiopic\",\n\t\t\"ethioaa\"\n\t].includes(calendar) || calendar === \"hebrew\" && HebrewLeapYear(year) ? 13 : 12;\n}\nexport function ArithmeticCalendarDaysInMonth(calendar, year, month) {\n\tconst count = ArithmeticCalendarMonthsInYear(calendar, year);\n\tif (integer(month) < 1 || month > count) throw new RangeError(\"Invalid calendar month\");\n\tif (IsISOCalendar(calendar)) {\n\t\treturn month === 12 ? 31 : monthStarts[month] - monthStarts[month - 1] + Number(month === 2 && DaysInYear(CalendarISOYear(calendar, year)) === 366);\n\t}\n\tconst length = ArithmeticCalendarStartOfYear(calendar, year + 1) - ArithmeticCalendarStartOfYear(calendar, year);\n\tif ([\n\t\t\"coptic\",\n\t\t\"ethiopic\",\n\t\t\"ethioaa\"\n\t].includes(calendar)) return month === 13 ? length - 360 : 30;\n\tif (calendar === \"indian\") return month === 1 ? 30 + Number(DaysInYear(year + 78) === 366) : month <= 6 ? 31 : 30;\n\tif (calendar === \"islamic-civil\" || calendar === \"islamic-tbla\") return month % 2 === 1 || month === 12 && length === 355 ? 30 : 29;\n\tif (calendar === \"persian\") return month <= 6 ? 31 : month < 12 ? 30 : length - 336;\n\tconst code = month + Number(!HebrewLeapYear(year) && month >= 6);\n\tif ([\n\t\t4,\n\t\t7,\n\t\t9,\n\t\t11,\n\t\t13\n\t].includes(code)) return 29;\n\tif (code === 2) return length % 10 === 5 ? 30 : 29;\n\tif (code === 3) return length % 10 === 3 ? 29 : 30;\n\treturn 30;\n}\nexport function ArithmeticCalendarMonthCode(calendar, year, month) {\n\tconst leap = calendar === \"hebrew\" && HebrewLeapYear(year);\n\tif (leap && month === 6) return \"M05L\";\n\tconst code = month - Number(leap && month > 6);\n\treturn \"M\" + (code < 10 ? \"0\" : \"\") + code;\n}\nexport function ArithmeticCalendarFromEpochDay(calendar, epoch) {\n\tconst t = epoch * 864e5, civilYear = YearFromTime(t);\n\tif (IsISOCalendar(calendar)) {\n\t\tconst year = civilYear - (calendar === \"buddhist\" ? -543 : calendar === \"roc\" ? 1911 : 0), month = MonthFromTime(t) + 1;\n\t\treturn {\n\t\t\tyear,\n\t\t\tmonth,\n\t\t\tmonthCode: ArithmeticCalendarMonthCode(calendar, year, month),\n\t\t\tday: DateFromTime(t)\n\t\t};\n\t}\n\tconst jd = epoch + 2440588;\n\tlet year;\n\tswitch (calendar) {\n\t\tcase \"coptic\":\n\t\t\tyear = Math.floor((4 * (jd - 1824665) + 3) / 1461);\n\t\t\tbreak;\n\t\tcase \"ethiopic\":\n\t\tcase \"ethioaa\":\n\t\t\tyear = Math.floor((4 * (jd - 1723856) + 3) / 1461) + (calendar === \"ethioaa\" ? 5500 : 0);\n\t\t\tbreak;\n\t\tcase \"islamic-civil\":\n\t\tcase \"islamic-tbla\":\n\t\t\tyear = Math.floor((30 * (jd - 1948440 + Number(calendar === \"islamic-tbla\")) + 10646) / 10631);\n\t\t\tbreak;\n\t\tcase \"persian\":\n\t\t\tyear = 1 + Math.floor((33 * (jd - 1948320) + 3) / 12053);\n\t\t\tbreak;\n\t\tcase \"indian\":\n\t\t\tyear = civilYear - 78;\n\t\t\tbreak;\n\t\tdefault: year = Math.floor((epoch + 2092590) * 492480 / 179876755) + 1;\n\t}\n\twhile (ArithmeticCalendarStartOfYear(calendar, year) > epoch) year--;\n\twhile (ArithmeticCalendarStartOfYear(calendar, year + 1) <= epoch) year++;\n\tlet month = 1, remaining = epoch - ArithmeticCalendarStartOfYear(calendar, year);\n\twhile (remaining >= ArithmeticCalendarDaysInMonth(calendar, year, month)) remaining -= ArithmeticCalendarDaysInMonth(calendar, year, month++);\n\treturn {\n\t\tyear,\n\t\tmonth,\n\t\tmonthCode: ArithmeticCalendarMonthCode(calendar, year, month),\n\t\tday: remaining + 1\n\t};\n}\nexport const JapaneseEras = [\n\t[\n\t\t18017,\n\t\t\"reiwa\",\n\t\t2018\n\t],\n\t[\n\t\t6947,\n\t\t\"heisei\",\n\t\t1988\n\t],\n\t[\n\t\t-15713,\n\t\t\"showa\",\n\t\t1925\n\t],\n\t[\n\t\t-20974,\n\t\t\"taisho\",\n\t\t1911\n\t],\n\t[\n\t\t-35428,\n\t\t\"meiji\",\n\t\t1867\n\t]\n];\nexport function ArithmeticCalendarEra(calendar, epoch, year) {\n\tswitch (calendar) {\n\t\tcase \"iso8601\": return undefined;\n\t\tcase \"buddhist\": return {\n\t\t\tera: \"be\",\n\t\t\teraYear: year\n\t\t};\n\t\tcase \"coptic\":\n\t\tcase \"hebrew\": return {\n\t\t\tera: \"am\",\n\t\t\teraYear: year\n\t\t};\n\t\tcase \"ethiopic\": return {\n\t\t\tera: year > 0 ? \"am\" : \"aa\",\n\t\t\teraYear: year > 0 ? year : year + 5500\n\t\t};\n\t\tcase \"ethioaa\": return {\n\t\t\tera: \"aa\",\n\t\t\teraYear: year\n\t\t};\n\t\tcase \"indian\": return {\n\t\t\tera: \"shaka\",\n\t\t\teraYear: year\n\t\t};\n\t\tcase \"persian\": return {\n\t\t\tera: \"ap\",\n\t\t\teraYear: year\n\t\t};\n\t\tcase \"roc\": return {\n\t\t\tera: year > 0 ? \"roc\" : \"broc\",\n\t\t\teraYear: year > 0 ? year : 1 - year\n\t\t};\n\t\tcase \"islamic-civil\":\n\t\tcase \"islamic-tbla\": return {\n\t\t\tera: year > 0 ? \"ah\" : \"bh\",\n\t\t\teraYear: year > 0 ? year : 1 - year\n\t\t};\n\t\tcase \"japanese\": for (const [start, era, offset] of JapaneseEras) if (epoch >= start) return {\n\t\t\tera,\n\t\t\teraYear: year - offset\n\t\t};\n\t}\n\treturn {\n\t\tera: year > 0 ? \"ce\" : \"bce\",\n\t\teraYear: year > 0 ? year : 1 - year\n\t};\n}\n","import {nativeTemporal} from '#packages/temporal/native.js'\nimport {\n isLunisolar,\n tableLeapMonth,\n tableYearStart,\n tableMonthLength,\n tableMonthSerial,\n tableAddMonths,\n tableMonthDifference,\n tableDate,\n} from '#packages/temporal/calendar-table.js'\n\nimport {\n arithmeticCalendars,\n ArithmeticCalendarStartOfYear,\n ArithmeticCalendarMonthsInYear,\n ArithmeticCalendarDaysInMonth,\n ArithmeticCalendarMonthCode,\n ArithmeticCalendarFromEpochDay,\n ArithmeticCalendarEra,\n HebrewLeapYear as hebrewLeap,\n HebrewElapsedMonths as elapsedMonths,\n JapaneseEras as japaneseEras,\n} from '#packages/ecma402-abstract/Calendar/Arithmetic.js'\nexport {arithmeticCalendars} from '#packages/ecma402-abstract/Calendar/Arithmetic.js'\n\nexport const calendarIds: readonly (\n | (typeof arithmeticCalendars)[number]\n | 'chinese'\n | 'dangi'\n | 'islamic-umalqura'\n)[] = [...arithmeticCalendars, 'chinese', 'dangi', 'islamic-umalqura']\nexport type CalendarId = (typeof calendarIds)[number]\nexport type Overflow = 'constrain' | 'reject'\nexport interface CalendarFields {\n year: number\n month?: number\n monthCode?: string\n day: number\n}\nexport interface CalendarDate {\n year: number\n month: number\n monthCode: string\n day: number\n}\nexport interface DateDuration {\n years?: number\n months?: number\n weeks?: number\n days?: number\n}\nconst mod = (value: number, divisor: number): number =>\n value - Math.floor(value / divisor) * divisor\nfunction integer(value: number): number {\n if (!Number.isSafeInteger(value))\n throw new RangeError('Expected safe integer')\n return value\n}\nfunction yearCheck(year: number): number {\n if (Math.abs(integer(year)) > 400000)\n throw new RangeError('Calendar year out of range')\n return year\n}\nexport function dayCheck(day: number): number {\n if (integer(day) < -100000001 || day > 100000000)\n throw new RangeError('Calendar date out of range')\n return day\n}\nfunction calendarCheck(calendar: CalendarId): void {\n if (!calendarIds.includes(calendar))\n throw new RangeError('Unsupported calendar')\n}\nfunction overflowCheck(overflow: Overflow): void {\n if (overflow !== 'constrain' && overflow !== 'reject')\n throw new RangeError('Invalid overflow')\n}\nfunction regulate(\n value: number,\n min: number,\n max: number,\n overflow: Overflow\n): number {\n if (!Number.isInteger(value)) throw new RangeError('Expected finite integer')\n if (overflow === 'reject' && (value < min || value > max))\n throw new RangeError('Calendar field out of range')\n return Math.min(Math.max(value, min), max)\n}\nfunction start(calendar: CalendarId, year: number): number {\n if (isLunisolar(calendar)) return tableYearStart(calendar, year)!\n if (calendar === 'islamic-umalqura')\n return (\n tableYearStart(calendar, year) ??\n ArithmeticCalendarStartOfYear('islamic-civil', year)\n )\n return ArithmeticCalendarStartOfYear(calendar, year)\n}\nexport function calendarStartOfYear(\n calendar: CalendarId,\n year: number\n): number {\n calendarCheck(calendar)\n yearCheck(year)\n const native = nativeTemporal()\n if (native) return native.calendarStartOfYear(calendar, year)\n return start(calendar, year)\n}\nexport function monthsInYear(calendar: CalendarId, year: number): number {\n calendarCheck(calendar)\n yearCheck(year)\n const native = nativeTemporal()\n if (native) return native.calendarMonthsInYear(calendar, year)\n if (isLunisolar(calendar)) return tableLeapMonth(calendar, year) ? 13 : 12\n return calendar === 'islamic-umalqura'\n ? 12\n : ArithmeticCalendarMonthsInYear(calendar, year)\n}\nexport function daysInMonth(\n calendar: CalendarId,\n year: number,\n month: number\n): number {\n const native = nativeTemporal()\n if (native) return native.calendarDaysInMonth(calendar, year, month)\n const count = monthsInYear(calendar, year)\n if (integer(month) < 1 || month > count)\n throw new RangeError('Invalid calendar month')\n if (isLunisolar(calendar)) return tableMonthLength(calendar, year, month)!\n if (calendar === 'islamic-umalqura')\n return (\n tableMonthLength(calendar, year, month) ??\n daysInMonth('islamic-civil', year, month)\n )\n return ArithmeticCalendarDaysInMonth(calendar, year, month)\n}\nfunction monthCode(calendar: CalendarId, year: number, month: number): string {\n if (isLunisolar(calendar)) {\n const leap = tableLeapMonth(calendar, year)\n return (\n 'M' +\n String(month - Number(leap > 0 && month > leap)).padStart(2, '0') +\n (leap > 0 && month === leap + 1 ? 'L' : '')\n )\n }\n return ArithmeticCalendarMonthCode(\n calendar === 'islamic-umalqura' ? 'islamic-civil' : calendar,\n year,\n month\n )\n}\nfunction monthFromCode(\n calendar: CalendarId,\n year: number,\n code: string,\n overflow: Overflow\n): number {\n if (isLunisolar(calendar)) {\n if (!/^M(0[1-9]|1[0-2])L?$/.test(code))\n throw new RangeError('Invalid month code')\n const number = Number(code.slice(1, 3)),\n leap = tableLeapMonth(calendar, year)\n if (code.endsWith('L') && leap !== number && overflow === 'reject')\n throw new RangeError('Leap month absent')\n return (\n number +\n Number(\n leap > 0 && (number > leap || (number === leap && code.endsWith('L')))\n )\n )\n }\n if (calendar === 'hebrew' && code === 'M05L') {\n if (!hebrewLeap(year) && overflow === 'reject')\n throw new RangeError('Leap month absent')\n return 6\n }\n if (\n !/^M(0[1-9]|1[0-3])$/.test(code) ||\n (code === 'M13' && !['coptic', 'ethiopic', 'ethioaa'].includes(calendar))\n )\n throw new RangeError('Invalid month code')\n const month = Number(code.slice(1))\n return month + Number(calendar === 'hebrew' && hebrewLeap(year) && month >= 6)\n}\nexport function calendarToEpochDayRaw(\n calendar: CalendarId,\n fields: CalendarFields,\n overflow: Overflow = 'constrain'\n): number {\n calendarCheck(calendar)\n overflowCheck(overflow)\n const year = yearCheck(fields.year)\n const native = nativeTemporal()\n if (native) {\n if (fields.month === undefined && fields.monthCode === undefined)\n throw new TypeError('Month or monthCode required')\n return native.calendarToEpochDay(calendar, fields, overflow)\n }\n let month: number\n if (fields.monthCode !== undefined) {\n month = monthFromCode(calendar, year, fields.monthCode, overflow)\n if (fields.month !== undefined && integer(fields.month) !== month)\n throw new RangeError('Month and monthCode disagree')\n } else {\n if (fields.month === undefined)\n throw new TypeError('Month or monthCode required')\n month = regulate(fields.month, 1, monthsInYear(calendar, year), overflow)\n }\n const day = regulate(\n fields.day,\n 1,\n daysInMonth(calendar, year, month),\n overflow\n )\n let epoch = start(calendar, year) + day - 1\n for (let m = 1; m < month; m++) epoch += daysInMonth(calendar, year, m)\n return integer(epoch)\n}\nexport function calendarToEpochDay(\n calendar: CalendarId,\n fields: CalendarFields,\n overflow: Overflow = 'constrain'\n): number {\n return dayCheck(calendarToEpochDayRaw(calendar, fields, overflow))\n}\nexport function calendarFromEpochDay(\n calendar: CalendarId,\n epoch: number\n): CalendarDate {\n return calendarFromEpochDayRaw(calendar, dayCheck(epoch))\n}\nexport function calendarFromEpochDayRaw(\n calendar: CalendarId,\n epoch: number\n): CalendarDate {\n calendarCheck(calendar)\n if (Math.abs(integer(epoch)) > 110000000)\n throw new RangeError('Calendar date out of range')\n const native = nativeTemporal()\n if (native) return native.calendarFromEpochDay(calendar, epoch)\n if (isLunisolar(calendar)) {\n const value = tableDate(calendar, epoch)\n return {...value, monthCode: monthCode(calendar, value.year, value.month)}\n }\n if (calendar !== 'islamic-umalqura')\n return ArithmeticCalendarFromEpochDay(calendar, epoch)\n const jd = epoch + 2440588\n let year = Math.floor((30 * (jd - 1948440) + 10646) / 10631)\n while (start(calendar, year) > epoch) year--\n while (start(calendar, year + 1) <= epoch) year++\n let month = 1,\n remaining = epoch - start(calendar, year)\n while (remaining >= daysInMonth(calendar, year, month))\n remaining -= daysInMonth(calendar, year, month++)\n return {\n year,\n month,\n monthCode: monthCode(calendar, year, month),\n day: remaining + 1,\n }\n}\nfunction addYearMonth(\n calendar: CalendarId,\n original: CalendarDate,\n years: number,\n months: number,\n overflow: Overflow\n): {year: number; month: number} {\n let year = yearCheck(original.year + years)\n let month: number\n if (isLunisolar(calendar)) {\n month = monthFromCode(calendar, year, original.monthCode, overflow)\n return tableAddMonths(calendar, year, month, months)\n }\n if (calendar !== 'hebrew') {\n const count = monthsInYear(calendar, year)\n const serial = year * count + original.month - 1 + months\n year = yearCheck(Math.floor(serial / count))\n month = mod(serial, count) + 1\n } else {\n month = monthFromCode(calendar, year, original.monthCode, overflow)\n const serial = integer(elapsedMonths(year) + month - 1 + months)\n year = yearCheck(Math.floor((19 * serial + 234) / 235))\n while (elapsedMonths(year) > serial) year--\n while (elapsedMonths(year + 1) <= serial) year++\n month = serial - elapsedMonths(year) + 1\n }\n return {year, month}\n}\nexport function addCalendarDateRaw(\n calendar: CalendarId,\n fields: CalendarFields,\n duration: DateDuration,\n overflow: Overflow = 'constrain'\n): CalendarDate {\n overflowCheck(overflow)\n const native = nativeTemporal()\n if (native) return native.calendarAdd(calendar, fields, duration, overflow)\n const original = calendarFromEpochDayRaw(\n calendar,\n calendarToEpochDayRaw(calendar, fields, 'reject')\n )\n const values = [\n duration.years ?? 0,\n duration.months ?? 0,\n duration.weeks ?? 0,\n duration.days ?? 0,\n ].map(integer)\n if (values.some(x => x < 0) && values.some(x => x > 0))\n throw new RangeError('Mixed duration signs')\n const {year, month} = addYearMonth(\n calendar,\n original,\n values[0],\n values[1],\n overflow\n )\n const epoch = calendarToEpochDayRaw(\n calendar,\n {year, month, day: original.day},\n overflow\n )\n return calendarFromEpochDayRaw(\n calendar,\n epoch + integer(7 * values[2] + values[3])\n )\n}\nexport function addCalendarDate(\n calendar: CalendarId,\n fields: CalendarFields,\n duration: DateDuration,\n overflow: Overflow = 'constrain'\n): CalendarDate {\n const result = addCalendarDateRaw(calendar, fields, duration, overflow)\n dayCheck(calendarToEpochDayRaw(calendar, result, 'reject'))\n return result\n}\nexport function calendarDaysUntil(\n calendar: CalendarId,\n one: CalendarFields,\n two: CalendarFields\n): number {\n return (\n calendarToEpochDay(calendar, two, 'reject') -\n calendarToEpochDay(calendar, one, 'reject')\n )\n}\n\nexport function calendarMonthSerial(\n calendar: CalendarId,\n year: number,\n month: number\n): number {\n calendarCheck(calendar)\n const native = nativeTemporal()\n if (native) return native.calendarMonthSerial(calendar, year, month)\n if (isLunisolar(calendar)) return tableMonthSerial(calendar, year, month)\n return calendar === 'hebrew'\n ? elapsedMonths(year) + month - 1\n : year * monthsInYear(calendar, year) + month - 1\n}\nexport function calendarDateUntilRaw(\n calendar: CalendarId,\n one: number,\n two: number,\n largest: string\n): DateDuration {\n const native = nativeTemporal()\n if (native) return native.calendarUntil(calendar, one, two, largest)\n const first = calendarFromEpochDayRaw(calendar, one),\n last = calendarFromEpochDayRaw(calendar, two)\n const result = {years: 0, months: 0, weeks: 0, days: 0},\n sign = Math.sign(two - one)\n if (!sign) return result\n // Difference prefixes compare unregulated days and month codes, not clamped dates.\n const surpasses = (): boolean => {\n const year = first.year + result.years\n const codeOrder =\n first.monthCode === last.monthCode\n ? 0\n : first.monthCode > last.monthCode\n ? 1\n : -1\n if (sign * (year - last.year || codeOrder || first.day - last.day) > 0)\n return true\n const candidate = addYearMonth(\n calendar,\n first,\n result.years,\n result.months,\n 'constrain'\n )\n return (\n sign *\n (candidate.year - last.year ||\n candidate.month - last.month ||\n first.day - last.day) >\n 0\n )\n }\n let anchor = one\n if (largest === 'year') {\n result.years = last.year - first.year\n if (surpasses()) result.years -= sign\n }\n if (largest === 'year' || largest === 'month') {\n const base = addYearMonth(calendar, first, result.years, 0, 'constrain')\n result.months = isLunisolar(calendar)\n ? tableMonthDifference(\n calendar,\n base.year,\n base.month,\n last.year,\n last.month\n )\n : calendarMonthSerial(calendar, last.year, last.month) -\n calendarMonthSerial(calendar, base.year, base.month)\n if (surpasses()) result.months -= sign\n anchor = calendarToEpochDayRaw(\n calendar,\n addCalendarDateRaw(calendar, first, result, 'constrain'),\n 'reject'\n )\n }\n result.days = two - anchor\n if (largest === 'week') {\n result.weeks = Math.trunc(result.days / 7) || 0\n result.days = result.days % 7 || 0\n }\n return result\n}\nexport function calendarEra(\n calendar: CalendarId,\n epoch: number,\n extended = false\n): {era: string; eraYear: number} | undefined {\n const native = nativeTemporal()\n if (native) {\n if (!extended) dayCheck(epoch)\n return native.calendarEra(calendar, epoch)\n }\n const {year} = (extended ? calendarFromEpochDayRaw : calendarFromEpochDay)(\n calendar,\n epoch\n )\n if (calendar === 'chinese' || calendar === 'dangi') return undefined\n return ArithmeticCalendarEra(\n calendar === 'islamic-umalqura' ? 'islamic-civil' : calendar,\n epoch,\n year\n )\n}\nexport function calendarYearFromEra(\n calendar: CalendarId,\n era: string,\n eraYear: number\n): number {\n calendarCheck(calendar)\n integer(eraYear)\n const native = nativeTemporal()\n if (native) return native.calendarYearFromEra(calendar, era, eraYear)\n if (calendar === 'japanese')\n for (const [, name, offset] of japaneseEras)\n if (era === name) return yearCheck(eraYear + offset)\n if (calendar === 'ethiopic' && era === 'aa') return yearCheck(eraYear - 5500)\n const names: Partial<Record<CalendarId, readonly string[]>> = {\n gregory: ['ce', 'bce'],\n japanese: ['ce', 'bce'],\n buddhist: ['be'],\n coptic: ['am'],\n ethiopic: ['am'],\n ethioaa: ['aa'],\n hebrew: ['am'],\n indian: ['shaka'],\n persian: ['ap'],\n roc: ['roc', 'broc'],\n 'islamic-umalqura': ['ah', 'bh'],\n 'islamic-civil': ['ah', 'bh'],\n 'islamic-tbla': ['ah', 'bh'],\n }\n if (\n (calendar === 'gregory' || calendar === 'japanese') &&\n (era === 'ad' || era === 'bc')\n )\n era = era === 'ad' ? 'ce' : 'bce'\n const index = names[calendar]?.indexOf(era) ?? -1\n if (index < 0) throw new RangeError('Invalid era')\n return yearCheck(index === 1 ? 1 - eraYear : eraYear)\n}\n","import {\n calendarFromEpochDayRaw,\n calendarToEpochDayRaw,\n} from '#packages/temporal/calendar.js'\nimport type {LegacyDateTimeProjection} from '#packages/temporal/legacy-extended-date.js'\n\ntype Calendar = 'chinese' | 'dangi'\ntype Resolved = typeof Intl.DateTimeFormat.prototype.resolvedOptions\ntype RangeParts = typeof Intl.DateTimeFormat.prototype.formatRangeToParts\nconst Constructor = globalThis.Intl?.DateTimeFormat\nconst nativeParts = Constructor?.prototype.formatToParts\nconst NumberConstructor = globalThis.Intl?.NumberFormat\nconst numberFormat =\n NumberConstructor &&\n Object.getOwnPropertyDescriptor(NumberConstructor.prototype, 'format')?.get\nconst dayMilliseconds = 86400000\nconst probes = new Map<string, Intl.DateTimeFormat>()\nconst positiveEras = new WeakMap<Intl.DateTimeFormat, string>()\nconst dateTypes = new Set(['year', 'relatedYear', 'yearName', 'month', 'day'])\ninterface Catalog {\n months: Map<string, number>\n cursor: number\n count: number\n full?: number\n leap?: string\n}\nconst catalogs = new Map<Calendar, Catalog>()\nconst utc = new WeakMap<Intl.DateTimeFormat, Intl.DateTimeFormat>()\nconst separators = new WeakMap<Intl.DateTimeFormat, string>()\nfunction isoDay(year: number, month: number, day: number): number {\n return calendarToEpochDayRaw('iso8601', {year, month, day}, 'reject')\n}\nfunction probe(\n calendar: Calendar | 'iso8601',\n timeZone: string\n): Intl.DateTimeFormat {\n const key = `${calendar}:${timeZone}`\n let result = probes.get(key)\n if (!result) {\n result = new Constructor!('en-US-u-nu-latn', {\n calendar: calendar === 'iso8601' ? 'gregory' : calendar,\n numberingSystem: 'latn',\n timeZone,\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n ...(calendar === 'iso8601' ? {era: 'short' as const} : {}),\n })\n probes.set(key, result)\n }\n return result\n}\nfunction fields(\n calendar: Calendar | 'iso8601',\n timeZone: string,\n milliseconds: number\n) {\n const formatter = probe(calendar, timeZone)\n const values = new Map<string, string>(\n nativeParts!\n .call(formatter, milliseconds)\n .map(part => [part.type, part.value])\n )\n const year = Number(\n values.get(calendar === 'iso8601' ? 'year' : 'relatedYear')\n )\n const day = Number(values.get('day'))\n const month = /^(\\d{1,2})(bis)?$/.exec(values.get('month') || '')\n if (\n !Number.isSafeInteger(year) ||\n !Number.isInteger(day) ||\n day < 1 ||\n day > (calendar === 'iso8601' ? 31 : 30) ||\n !month ||\n +month[1] < 1 ||\n +month[1] > 12\n )\n throw new RangeError('Unsupported host calendar fields')\n let bce = false\n if (calendar === 'iso8601') {\n let positive = positiveEras.get(formatter)\n if (positive === undefined) {\n positive = nativeParts!\n .call(formatter, 0)\n .find(part => part.type === 'era')?.value\n if (!positive) throw new RangeError('Unsupported host Gregorian era')\n positiveEras.set(formatter, positive)\n }\n bce = values.get('era') !== positive\n }\n return {\n year: bce ? 1 - year : year,\n month: Number(month[1]),\n day,\n monthCode: `M${month[1].padStart(2, '0')}${month[2] ? 'L' : ''}`,\n }\n}\nfunction catalog(calendar: Calendar, code: string): Catalog {\n let result = catalogs.get(calendar)\n if (!result) {\n const sample = isoDay(2020, 1, 15),\n value = fields(calendar, 'UTC', sample * dayMilliseconds)\n result = {months: new Map(), cursor: sample - value.day + 1, count: 0}\n catalogs.set(calendar, result)\n }\n while (\n (!result.months.has(code) || result.full === undefined || !result.leap) &&\n result.count < 2400\n ) {\n const start = result.cursor,\n value = fields(calendar, 'UTC', start * dayMilliseconds),\n next = start + 32,\n end = next - fields(calendar, 'UTC', next * dayMilliseconds).day + 1\n result.months.set(value.monthCode, start)\n if (end - start === 30) result.full = start\n if (value.monthCode.endsWith('L')) result.leap = value.monthCode\n result.cursor = end\n result.count++\n }\n return result\n}\nexport function calendarLabelFormatter(\n source: Intl.DateTimeFormat,\n options: Intl.ResolvedDateTimeFormatOptions,\n raw: Intl.DateTimeFormatPart[]\n): Intl.DateTimeFormat {\n let result = utc.get(source)\n if (!result) {\n const projected = {\n ...options,\n timeZone: 'UTC',\n } as Intl.DateTimeFormatOptions\n // Some hosts omit resolved year options for relatedYear/yearName output.\n if (\n !options.dateStyle &&\n !options.year &&\n raw.some(part => ['relatedYear', 'yearName'].includes(part.type))\n )\n projected.year = 'numeric'\n result = new Constructor!(options.locale, projected)\n utc.set(source, result)\n }\n return result\n}\n\nexport function legacyISOEpochDay(\n timeZone: string,\n milliseconds: number\n): number {\n const value = fields('iso8601', timeZone, milliseconds)\n return isoDay(value.year, value.month, value.day)\n}\nfunction part(\n source: Intl.DateTimeFormat,\n epoch: number,\n type: string\n): string {\n const value = nativeParts!\n .call(source, epoch * dayMilliseconds)\n .find(part => part.type === type)\n if (!value) throw new RangeError(`Unsupported host calendar pattern: ${type}`)\n return value.value\n}\nfunction monthLabel(\n source: Intl.DateTimeFormat,\n calendar: Calendar,\n code: string\n): string {\n const data = catalog(calendar, code),\n epoch = data.months.get(code)\n if (epoch !== undefined) return part(source, epoch + 14, 'month')\n if (!code.endsWith('L') || !data.leap)\n throw new RangeError('Unsupported host calendar month')\n const normal = monthLabel(source, calendar, data.leap.slice(0, -1)),\n leap = part(source, data.months.get(data.leap)! + 14, 'month'),\n index = leap.indexOf(normal)\n if (index < 0) throw new RangeError('Unsupported host leap-month pattern')\n return (\n leap.slice(0, index) +\n monthLabel(source, calendar, code.slice(0, -1)) +\n leap.slice(index + normal.length)\n )\n}\n\nexport function correctLunisolarParts(\n value: LegacyDateTimeProjection,\n raw: Intl.DateTimeFormatPart[],\n resolved: Resolved,\n surrogateMilliseconds?: number,\n expectedEpochDay?: number\n): Intl.DateTimeFormatPart[] {\n const options = resolved.call(value.formatter),\n calendar = options.calendar\n if (\n (calendar !== 'chinese' && calendar !== 'dangi') ||\n !raw.some(part => dateTypes.has(part.type))\n )\n return raw\n const iso =\n surrogateMilliseconds === undefined && expectedEpochDay === undefined\n ? fields('iso8601', options.timeZone, value.milliseconds)\n : undefined,\n expected = calendarFromEpochDayRaw(\n calendar,\n expectedEpochDay ??\n (iso\n ? isoDay(iso.year, iso.month, iso.day)\n : Math.floor(value.milliseconds / dayMilliseconds))\n ),\n actual = fields(\n calendar,\n options.timeZone,\n surrogateMilliseconds ?? value.milliseconds\n )\n if (\n actual.year === expected.year &&\n actual.monthCode === expected.monthCode &&\n actual.day === expected.day\n )\n return raw\n const labels = calendarLabelFormatter(value.formatter, options, raw),\n changes = new Map<string, string>()\n if (actual.day !== expected.day && raw.some(part => part.type === 'day')) {\n const data = catalog(calendar, 'M01')\n changes.set('day', part(labels, data.full! + expected.day - 1, 'day'))\n }\n if (\n actual.monthCode !== expected.monthCode &&\n raw.some(part => part.type === 'month')\n )\n changes.set('month', monthLabel(labels, calendar, expected.monthCode))\n if (actual.year !== expected.year) {\n const cycleYear = 2000 + ((((expected.year - 2000) % 60) + 60) % 60)\n for (const item of raw) {\n const type: string = item.type\n if (type === 'yearName')\n changes.set(item.type, part(labels, isoDay(cycleYear, 7, 1), item.type))\n else if (type === 'year' || type === 'relatedYear') {\n if (!NumberConstructor || !numberFormat)\n throw new RangeError(\n 'Calendar year correction requires Intl.NumberFormat'\n )\n const format = numberFormat.call(\n new NumberConstructor(options.locale, {\n numberingSystem: options.numberingSystem,\n useGrouping: false,\n maximumFractionDigits: 0,\n })\n ),\n sample = part(labels, isoDay(2001, 7, 1), item.type),\n short = sample !== format(2001)\n changes.set(\n item.type,\n short\n ? numberFormat.call(\n new NumberConstructor(options.locale, {\n numberingSystem: options.numberingSystem,\n useGrouping: false,\n minimumIntegerDigits: 2,\n maximumFractionDigits: 0,\n })\n )(((expected.year % 100) + 100) % 100)\n : format(expected.year)\n )\n }\n }\n }\n return changes.size\n ? raw.map(item =>\n changes.has(item.type)\n ? {...item, value: changes.get(item.type)!}\n : item\n )\n : raw\n}\n\nexport function lunisolarRangeParts(\n first: LegacyDateTimeProjection,\n last: LegacyDateTimeProjection,\n parts: RangeParts,\n resolved: Resolved\n): Intl.DateTimeRangeFormatPart[] | undefined {\n const calendar = resolved.call(first.formatter).calendar\n if (\n (calendar !== 'chinese' && calendar !== 'dangi') ||\n !nativeParts ||\n !parts\n )\n return undefined\n const raw = parts.call(\n first.formatter,\n first.milliseconds,\n last.milliseconds\n ),\n firstRaw = nativeParts.call(first.formatter, first.milliseconds),\n lastRaw = nativeParts.call(last.formatter, last.milliseconds),\n start = correctLunisolarParts(first, firstRaw, resolved),\n end = correctLunisolarParts(last, lastRaw, resolved)\n if (start === firstRaw && end === lastRaw) return raw\n return joinCalendarRangeParts(first.formatter, start, end, parts)\n}\n\nexport function joinCalendarRangeParts(\n formatter: Intl.DateTimeFormat,\n start: Intl.DateTimeFormatPart[],\n end: Intl.DateTimeFormatPart[],\n parts: RangeParts\n): Intl.DateTimeRangeFormatPart[] {\n if (\n start.map(part => part.value).join('') ===\n end.map(part => part.value).join('')\n )\n return start.map(part => ({...part, source: 'shared'}))\n let separator = separators.get(formatter)\n if (separator === undefined) {\n const sample = parts.call(formatter, 946718033000, 1025966286000),\n end = sample.findIndex(part => part.source === 'endRange')\n let start = end - 1\n while (start >= 0 && sample[start].source !== 'startRange') start--\n if (start < 0 || end < 0)\n throw new RangeError('Unsupported host calendar range pattern')\n separator = sample\n .slice(start + 1, end)\n .map(part => part.value)\n .join('')\n separators.set(formatter, separator)\n }\n return [\n ...start.map(part => ({...part, source: 'startRange' as const})),\n {type: 'literal', value: separator, source: 'shared'},\n ...end.map(part => ({...part, source: 'endRange' as const})),\n ]\n}\n","import {beforeHijrah} from '@formatjs_generated/datetimeformat.calendars/fallback-eras.js'\nimport {\n calendarEra,\n calendarFromEpochDayRaw,\n calendarToEpochDayRaw,\n calendarYearFromEra,\n calendarIds,\n monthsInYear,\n type CalendarId,\n} from '#packages/temporal/calendar.js'\nimport {\n correctLunisolarParts,\n joinCalendarRangeParts,\n calendarLabelFormatter,\n legacyISOEpochDay,\n} from '#packages/temporal/legacy-lunisolar-date.js'\nimport type {LegacyDateTimeProjection} from '#packages/temporal/legacy-extended-date.js'\n\ntype Parts = typeof Intl.DateTimeFormat.prototype.formatToParts\ntype Resolved = typeof Intl.DateTimeFormat.prototype.resolvedOptions\ntype RangeParts = typeof Intl.DateTimeFormat.prototype.formatRangeToParts\nconst Constructor = globalThis.Intl?.DateTimeFormat\nconst NumberConstructor = globalThis.Intl?.NumberFormat\nconst numberFormat =\n NumberConstructor &&\n Object.getOwnPropertyDescriptor(NumberConstructor.prototype, 'format')?.get\nconst dayMilliseconds = 86400000\nconst limit = 8640000000000000\nconst cycle = 146097 * dayMilliseconds\nconst reference = 1609459200000\nconst representatives = new Map<string, number>()\nconst numbers = new WeakMap<\n Intl.DateTimeFormat,\n Map<number, (value: number) => string>\n>()\nconst eraWidths = new WeakMap<\n Intl.DateTimeFormat,\n 'long' | 'short' | 'narrow'\n>()\nconst eraLabels = new WeakMap<Intl.DateTimeFormat, Map<string, string>>()\nconst clockFormatters = new WeakMap<Intl.DateTimeFormat, Intl.DateTimeFormat>()\nconst clockTypes = new Set([\n 'weekday',\n 'hour',\n 'minute',\n 'second',\n 'fractionalSecond',\n 'dayPeriod',\n 'timeZoneName',\n])\n\nfunction clipped(value: LegacyDateTimeProjection): boolean {\n return value.plain === true && Math.abs(value.milliseconds) > limit\n}\nfunction number(\n source: Intl.DateTimeFormat,\n options: Intl.ResolvedDateTimeFormatOptions,\n digits: number\n): (value: number) => string {\n let cache = numbers.get(source)\n if (!cache) {\n cache = new Map()\n numbers.set(source, cache)\n }\n const existing = cache.get(digits)\n if (existing) return existing\n if (!NumberConstructor || !numberFormat)\n throw new RangeError('Extended calendar dates require Intl.NumberFormat')\n const result = numberFormat.call(\n new NumberConstructor(options.locale, {\n numberingSystem: options.numberingSystem,\n useGrouping: false,\n minimumIntegerDigits: digits,\n maximumFractionDigits: 0,\n })\n )\n cache.set(digits, result)\n return result\n}\nfunction representative(\n calendar: CalendarId,\n code: string,\n leap: boolean\n): number {\n const key = `${calendar}:${code}:${leap}`\n const cached = representatives.get(key)\n if (cached !== undefined) return cached\n const first = calendarFromEpochDayRaw(\n calendar,\n Math.floor(reference / dayMilliseconds)\n ).year\n for (let delta = 0; delta < 32; delta++) {\n const year = first + delta\n if (calendar === 'hebrew' && (monthsInYear(calendar, year) === 13) !== leap)\n continue\n let epoch: number\n try {\n epoch = calendarToEpochDayRaw(\n calendar,\n {year, monthCode: code, day: 3},\n 'reject'\n )\n } catch (error) {\n if (error instanceof RangeError) continue\n throw error\n }\n representatives.set(key, epoch)\n return epoch\n }\n throw new RangeError('No host calendar label example')\n}\nfunction firstPart(parts: Intl.DateTimeFormatPart[], type: string): string {\n const value = parts.find(part => part.type === type)\n if (!value) throw new RangeError(`Unsupported host calendar pattern: ${type}`)\n return value.value\n}\nfunction eraOptions(\n options: Intl.ResolvedDateTimeFormatOptions,\n calendar: string,\n era: 'long' | 'short' | 'narrow'\n): Intl.DateTimeFormatOptions {\n return options.dateStyle || options.timeStyle\n ? {\n calendar,\n era,\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n timeZone: 'UTC',\n }\n : ({\n ...options,\n calendar,\n era,\n timeZone: 'UTC',\n } as Intl.DateTimeFormatOptions)\n}\nfunction eraWidth(\n source: Intl.DateTimeFormat,\n options: Intl.ResolvedDateTimeFormatOptions,\n raw: Intl.DateTimeFormatPart[],\n surrogate: number,\n parts: Parts\n): 'long' | 'short' | 'narrow' {\n const existing = eraWidths.get(source)\n if (existing) return existing\n if (\n options.era === 'long' ||\n options.era === 'short' ||\n options.era === 'narrow'\n ) {\n eraWidths.set(source, options.era)\n return options.era\n }\n const original = firstPart(raw, 'era')\n for (const width of ['long', 'short', 'narrow'] as const) {\n const formatter = new Constructor!(\n options.locale,\n eraOptions(options, options.calendar, width)\n )\n if (firstPart(parts.call(formatter, surrogate), 'era') === original) {\n eraWidths.set(source, width)\n return width\n }\n }\n throw new RangeError('Unsupported host era width')\n}\nfunction eraLabel(\n source: Intl.DateTimeFormat,\n calendar: CalendarId,\n era: string,\n options: Intl.ResolvedDateTimeFormatOptions,\n width: 'long' | 'short' | 'narrow',\n sample: number,\n parts: Parts\n): string {\n let cache = eraLabels.get(source)\n if (!cache) {\n cache = new Map()\n eraLabels.set(source, cache)\n }\n const key = `${calendar}:${era}:${width}`,\n existing = cache.get(key)\n if (existing !== undefined) return existing\n if (era === 'bh') {\n let locale = options.locale.split('-u-')[0]\n while (!beforeHijrah[locale] && locale.includes('-'))\n locale = locale.slice(0, locale.lastIndexOf('-'))\n const value = (beforeHijrah[locale] ?? beforeHijrah.en)[\n width === 'long' ? 0 : width === 'short' ? 1 : 2\n ]\n cache.set(key, value)\n return value\n }\n if (calendar === 'japanese' && (era === 'bce' || era === 'ce')) {\n calendar = 'gregory'\n sample = calendarToEpochDayRaw(\n 'iso8601',\n {year: era === 'bce' ? 0 : 2000, month: 1, day: 1},\n 'reject'\n )\n } else if (calendar === 'japanese') {\n sample = calendarToEpochDayRaw(\n 'iso8601',\n {year: calendarYearFromEra(calendar, era, 10), month: 7, day: 1},\n 'reject'\n )\n } else if (era === 'broc' || (calendar === 'ethiopic' && era === 'aa')) {\n sample = calendarToEpochDayRaw(\n calendar,\n {year: 0, month: 1, day: 1},\n 'reject'\n )\n }\n const formatter = new Constructor!(\n options.locale,\n eraOptions(options, calendar, width)\n )\n const value = firstPart(\n parts.call(formatter, sample * dayMilliseconds),\n 'era'\n )\n cache.set(key, value)\n return value\n}\n\nexport function legacyCalendarParts(\n value: LegacyDateTimeProjection,\n parts: Parts,\n resolved: Resolved\n): Intl.DateTimeFormatPart[] | undefined {\n const options = resolved.call(value.formatter),\n calendar = options.calendar as CalendarId\n if (\n calendar === 'iso8601' ||\n calendar === 'gregory' ||\n !calendarIds.includes(calendar)\n )\n return undefined\n if (value.plain !== true) {\n if (\n !Number.isFinite(value.milliseconds) ||\n Math.abs(value.milliseconds) > limit\n )\n return undefined\n const lunar = calendar === 'chinese' || calendar === 'dangi'\n let epoch = lunar\n ? undefined\n : legacyISOEpochDay(options.timeZone, value.milliseconds)\n let raw: Intl.DateTimeFormatPart[]\n let labels: Intl.DateTimeFormat\n let surrogate: number | undefined\n try {\n raw = parts.call(value.formatter, value.milliseconds)\n if (\n !raw.some(part =>\n ['year', 'month', 'day', 'era', 'relatedYear', 'yearName'].includes(\n part.type\n )\n )\n )\n return raw\n if (lunar) return correctLunisolarParts(value, raw, resolved)\n labels = calendarLabelFormatter(value.formatter, options, raw)\n } catch (error) {\n if (!(error instanceof RangeError) && !(error instanceof TypeError))\n throw error\n epoch ??= legacyISOEpochDay(options.timeZone, value.milliseconds)\n // Some host calendars fail at valid Date bounds; retain their clock and zone via Gregorian fields.\n let clock = clockFormatters.get(value.formatter)\n if (!clock) {\n clock = new Constructor!(options.locale, {\n ...options,\n calendar: 'gregory',\n } as Intl.DateTimeFormatOptions)\n clockFormatters.set(value.formatter, clock)\n }\n const clockParts = parts.call(clock, value.milliseconds)\n labels = calendarLabelFormatter(\n value.formatter,\n options,\n lunar ? parts.call(value.formatter, reference) : clockParts\n )\n const local = epoch * dayMilliseconds\n surrogate = local - Math.floor((local - 946684800000) / cycle) * cycle\n raw = parts\n .call(labels, surrogate)\n .map(part =>\n clockTypes.has(part.type)\n ? (clockParts.find(item => item.type === part.type) ?? part)\n : part\n )\n }\n // Keep the original local day when labels use a UTC surrogate.\n if (lunar)\n return correctLunisolarParts(\n {...value, formatter: labels},\n raw,\n resolved,\n surrogate,\n epoch\n )\n return restoreCalendarParts(value, raw, epoch!, labels, options, parts)\n }\n // Whole Gregorian cycles preserve weekday and clock in the plain UTC projection.\n const surrogate =\n value.milliseconds -\n Math.floor((value.milliseconds - 946684800000) / cycle) * cycle,\n raw = parts.call(value.formatter, surrogate)\n if (\n !raw.some(part =>\n ['year', 'month', 'day', 'era', 'relatedYear', 'yearName'].includes(\n part.type\n )\n )\n )\n return raw\n if (calendar === 'chinese' || calendar === 'dangi')\n return correctLunisolarParts(value, raw, resolved, surrogate)\n return restoreCalendarParts(\n value,\n raw,\n Math.floor(value.milliseconds / dayMilliseconds),\n value.formatter,\n options,\n parts\n )\n}\n\nfunction restoreCalendarParts(\n value: LegacyDateTimeProjection,\n raw: Intl.DateTimeFormatPart[],\n epoch: number,\n labels: Intl.DateTimeFormat,\n options: Intl.ResolvedDateTimeFormatOptions,\n parts: Parts\n): Intl.DateTimeFormatPart[] {\n const calendar = options.calendar as CalendarId,\n date = calendarFromEpochDayRaw(calendar, epoch),\n era = calendarEra(calendar, epoch, true),\n year = era?.eraYear ?? date.year,\n sample = representative(\n calendar,\n date.monthCode,\n monthsInYear(calendar, date.year) === 13\n ),\n controls = parts.call(labels, sample * dayMilliseconds),\n sampleEra = calendarEra(calendar, sample, true),\n sampleYear =\n sampleEra?.eraYear ?? calendarFromEpochDayRaw(calendar, sample).year,\n format = number(value.formatter, options, 1),\n formatTwo = number(value.formatter, options, 2),\n short = (value: number): string =>\n Array.from(formatTwo(value)).slice(-2).join(''),\n changes = new Map<string, string>()\n if (raw.some(part => part.type === 'year')) {\n const sampleText = firstPart(controls, 'year'),\n two =\n options.year === '2-digit' ||\n (options.year === undefined &&\n sampleText !== format(sampleYear) &&\n sampleText === short(sampleYear))\n changes.set('year', two ? short(year) : format(year))\n if (\n calendar === 'japanese' &&\n year === 1 &&\n era?.era !== 'ce' &&\n era?.era !== 'bce' &&\n !clipped(value)\n )\n changes.set(\n 'year',\n firstPart(parts.call(value.formatter, value.milliseconds), 'year')\n )\n }\n if (raw.some(part => part.type === 'month'))\n changes.set('month', firstPart(controls, 'month'))\n if (raw.some(part => part.type === 'day')) {\n const two = firstPart(controls, 'day') === formatTwo(3)\n changes.set('day', two ? formatTwo(date.day) : format(date.day))\n }\n if (era && raw.some(part => part.type === 'era'))\n changes.set(\n 'era',\n eraLabel(\n value.formatter,\n calendar,\n era.era,\n options,\n eraWidth(\n value.formatter,\n options,\n controls,\n sample * dayMilliseconds,\n parts\n ),\n sample,\n parts\n )\n )\n if (\n raw.every(\n part => !changes.has(part.type) || changes.get(part.type) === part.value\n )\n )\n return raw\n return raw.map(part =>\n changes.has(part.type) ? {...part, value: changes.get(part.type)!} : part\n )\n}\n\nexport function legacyCalendarRangeParts(\n first: LegacyDateTimeProjection,\n last: LegacyDateTimeProjection,\n parts: Parts,\n rangeParts: RangeParts,\n resolved: Resolved\n): Intl.DateTimeRangeFormatPart[] | undefined {\n const calendar = resolved.call(first.formatter).calendar\n if (\n calendar === 'iso8601' ||\n calendar === 'gregory' ||\n !calendarIds.includes(calendar as CalendarId)\n )\n return undefined\n const start =\n legacyCalendarParts(first, parts, resolved) ??\n correctLunisolarParts(\n first,\n parts.call(first.formatter, first.milliseconds),\n resolved\n ),\n end =\n legacyCalendarParts(last, parts, resolved) ??\n correctLunisolarParts(\n last,\n parts.call(last.formatter, last.milliseconds),\n resolved\n )\n if (!clipped(first) && !clipped(last)) {\n try {\n const same = (\n one: Intl.DateTimeFormatPart[],\n two: Intl.DateTimeFormatPart[]\n ): boolean =>\n one.length === two.length &&\n one.every(\n (part, index) =>\n part.type === two[index].type && part.value === two[index].value\n )\n if (\n same(start, parts.call(first.formatter, first.milliseconds)) &&\n same(end, parts.call(last.formatter, last.milliseconds))\n )\n return undefined\n } catch (error) {\n if (!(error instanceof RangeError) && !(error instanceof TypeError))\n throw error\n }\n }\n return joinCalendarRangeParts(first.formatter, start, end, rangeParts)\n}\n","import {YearFromTime} from '#packages/ecma262-abstract/DateOperations.js'\nimport {\n legacyCalendarParts,\n legacyCalendarRangeParts,\n} from '#packages/temporal/legacy-calendar-date.js'\nimport {\n correctLunisolarParts,\n lunisolarRangeParts,\n} from '#packages/temporal/legacy-lunisolar-date.js'\n\nexport const legacyTimeZoneName: unique symbol = Symbol()\n\nexport interface LegacyDateTimeProjection {\n formatter: Intl.DateTimeFormat\n milliseconds: number\n plain?: boolean\n [legacyTimeZoneName]?: string\n}\nconst limit = 8640000000000000\nconst cycle = 146097 * 86400000\nconst NumberConstructor = globalThis.Intl?.NumberFormat\nconst numberFormat =\n NumberConstructor &&\n Object.getOwnPropertyDescriptor(NumberConstructor.prototype, 'format')?.get\ntype Resolved = typeof Intl.DateTimeFormat.prototype.resolvedOptions\ntype Parts = typeof Intl.DateTimeFormat.prototype.formatToParts\ntype RangeParts = typeof Intl.DateTimeFormat.prototype.formatRangeToParts\ntype Format = (this: Intl.DateTimeFormat) => (value?: number) => string\nconst nativeParts = globalThis.Intl?.DateTimeFormat?.prototype.formatToParts\n\nfunction clipped(value: LegacyDateTimeProjection): boolean {\n return value.plain === true && Math.abs(value.milliseconds) > limit\n}\nfunction gregorian(\n formatter: Intl.DateTimeFormat,\n resolved: Resolved\n): boolean {\n const calendar = resolved.call(formatter).calendar\n return calendar === 'iso8601' || calendar === 'gregory'\n}\nfunction shift(value: LegacyDateTimeProjection): number {\n return clipped(value) ? (value.milliseconds < 0 ? cycle : -cycle) : 0\n}\nfunction years(\n value: LegacyDateTimeProjection,\n delta: number,\n resolved: Resolved\n): (text: string) => string {\n if (!delta) return text => text\n if (!NumberConstructor || !numberFormat)\n throw new RangeError('Extended Gregorian dates require Intl.NumberFormat')\n const options = resolved.call(value.formatter),\n formatter = new NumberConstructor(options.locale, {\n numberingSystem: options.numberingSystem,\n useGrouping: false,\n maximumFractionDigits: 0,\n }),\n format = numberFormat.call(formatter) as (value: number) => string,\n year = YearFromTime(value.milliseconds),\n surrogate = YearFromTime(value.milliseconds + delta),\n original = format(year <= 0 ? 1 - year : year),\n replacement = format(surrogate <= 0 ? 1 - surrogate : surrogate)\n // A 400-year shift preserves month/day/weekday and two-digit years.\n return text => (text === replacement ? original : text)\n}\n\nexport function legacyDateTimeParts(\n value: LegacyDateTimeProjection,\n parts: Parts,\n resolved: Resolved\n): Intl.DateTimeFormatPart[] {\n if (value[legacyTimeZoneName] !== undefined)\n return legacyDateTimeParts(\n {...value, [legacyTimeZoneName]: undefined},\n parts,\n resolved\n ).map(part =>\n part.type === 'timeZoneName'\n ? {...part, value: value[legacyTimeZoneName]!}\n : part\n )\n const calendar = legacyCalendarParts(value, parts, resolved)\n if (calendar) return calendar\n if (!clipped(value) || !gregorian(value.formatter, resolved))\n return correctLunisolarParts(\n value,\n parts.call(value.formatter, value.milliseconds),\n resolved\n )\n const delta = shift(value),\n rewrite = years(value, delta, resolved)\n return parts\n .call(value.formatter, value.milliseconds + delta)\n .map(part =>\n part.type === 'year' ? {...part, value: rewrite(part.value)} : part\n )\n}\n\nexport function legacyDateTimeFormat(\n value: LegacyDateTimeProjection,\n format: Format,\n parts: Parts,\n resolved: Resolved\n): string {\n if (value[legacyTimeZoneName] !== undefined)\n return legacyDateTimeParts(value, parts, resolved)\n .map(part => part.value)\n .join('')\n const calendar = legacyCalendarParts(value, parts, resolved)\n if (calendar) return calendar.map(part => part.value).join('')\n if (!clipped(value) || !gregorian(value.formatter, resolved)) {\n const calendar = resolved.call(value.formatter).calendar\n if (calendar !== 'chinese' && calendar !== 'dangi')\n return format.call(value.formatter)(value.milliseconds)\n const raw = parts.call(value.formatter, value.milliseconds),\n corrected = correctLunisolarParts(value, raw, resolved)\n return corrected === raw\n ? format.call(value.formatter)(value.milliseconds)\n : corrected.map(part => part.value).join('')\n }\n return legacyDateTimeParts(value, parts, resolved)\n .map(part => part.value)\n .join('')\n}\n\nfunction rangeShifts(\n first: LegacyDateTimeProjection,\n last: LegacyDateTimeProjection\n): [number, number] {\n const delta = shift(first) || shift(last)\n const fits = (value: LegacyDateTimeProjection): boolean =>\n Math.abs(value.milliseconds + delta) <= limit &&\n YearFromTime(value.milliseconds) <= 0 ===\n YearFromTime(value.milliseconds + delta) <= 0\n return fits(first) && fits(last)\n ? [delta, delta]\n : [shift(first), shift(last)]\n}\n\nexport function legacyDateTimeRangeParts(\n first: LegacyDateTimeProjection,\n last: LegacyDateTimeProjection,\n parts: RangeParts,\n resolved: Resolved\n): Intl.DateTimeRangeFormatPart[] {\n const extended = legacyCalendarRangeParts(\n first,\n last,\n nativeParts!,\n parts,\n resolved\n )\n if (extended) return extended\n const lunar = lunisolarRangeParts(first, last, parts, resolved)\n if (lunar) return lunar\n if (\n (!clipped(first) && !clipped(last)) ||\n !gregorian(first.formatter, resolved)\n )\n return parts.call(first.formatter, first.milliseconds, last.milliseconds)\n const [start, end] = rangeShifts(first, last),\n rewriteStart = years(first, start, resolved),\n rewriteEnd = years(last, end, resolved)\n return parts\n .call(first.formatter, first.milliseconds + start, last.milliseconds + end)\n .map(part =>\n part.type === 'year'\n ? {\n ...part,\n value: (part.source === 'endRange' ? rewriteEnd : rewriteStart)(\n part.value\n ),\n }\n : part\n )\n}\n\nexport function legacyDateTimeRangeFormat(\n first: LegacyDateTimeProjection,\n last: LegacyDateTimeProjection,\n format: typeof Intl.DateTimeFormat.prototype.formatRange,\n parts: RangeParts,\n resolved: Resolved\n): string {\n const extended = legacyCalendarRangeParts(\n first,\n last,\n nativeParts!,\n parts,\n resolved\n )\n if (extended) return extended.map(part => part.value).join('')\n const lunar = lunisolarRangeParts(first, last, parts, resolved)\n if (lunar) return lunar.map(part => part.value).join('')\n if (\n (!clipped(first) && !clipped(last)) ||\n !gregorian(first.formatter, resolved)\n )\n return format.call(first.formatter, first.milliseconds, last.milliseconds)\n return legacyDateTimeRangeParts(first, last, parts, resolved)\n .map(part => part.value)\n .join('')\n}\n","import {\n createHostTimeZoneOffset,\n type HostTimeZone,\n} from '#packages/temporal/host-timezone.js'\nimport {\n legacyTimeZoneName,\n type LegacyDateTimeProjection,\n} from '#packages/temporal/legacy-extended-date.js'\n\ntype Parts = typeof Intl.DateTimeFormat.prototype.formatToParts\nconst zones = new WeakMap<\n Intl.DateTimeFormatConstructor,\n Map<string, HostTimeZone['offsetNanoseconds'] | undefined>\n>()\nconst NumberConstructor = globalThis.Intl?.NumberFormat\nconst numberFormat =\n NumberConstructor &&\n Object.getOwnPropertyDescriptor(NumberConstructor.prototype, 'format')?.get\n\nexport function legacyHostTimeZone(\n Constructor: Intl.DateTimeFormatConstructor,\n timeZone: string,\n parts: Parts\n): HostTimeZone['offsetNanoseconds'] | undefined {\n let cache = zones.get(Constructor)\n if (!cache) {\n cache = new Map()\n zones.set(Constructor, cache)\n }\n if (cache.has(timeZone)) return cache.get(timeZone)\n let zone: HostTimeZone['offsetNanoseconds'] | undefined\n try {\n zone = createHostTimeZoneOffset(timeZone, {Constructor, parts})\n } catch (error) {\n if (!(error instanceof RangeError)) throw error\n }\n cache.set(timeZone, zone)\n return zone\n}\n\nexport function legacyZonedProjection(\n Constructor: Intl.DateTimeFormatConstructor,\n resolved: Intl.ResolvedDateTimeFormatOptions,\n selected: Record<string, unknown>,\n local: bigint,\n offset: bigint,\n parts: Parts\n): LegacyDateTimeProjection {\n const formatter = new Constructor(\n resolved.locale,\n Object.assign(Object.create(null), selected, {timeZone: 'UTC'})\n )\n const probe = parts.call(formatter, 0)\n let timeZoneName: string | undefined\n if (probe.some(part => part.type === 'timeZoneName')) {\n const long =\n selected.timeZoneName === 'long' ||\n selected.timeZoneName === 'longOffset' ||\n selected.timeZoneName === 'longGeneric' ||\n selected.timeStyle === 'full'\n timeZoneName = offsetName(Constructor, resolved, offset, long, parts)\n }\n const ms = local / 1_000_000n - (local < 0n && local % 1_000_000n ? 1n : 0n)\n return {\n formatter,\n milliseconds: Number(ms),\n plain: true,\n [legacyTimeZoneName]: timeZoneName,\n }\n}\n\nfunction offsetName(\n Constructor: Intl.DateTimeFormatConstructor,\n resolved: Intl.ResolvedDateTimeFormatOptions,\n offset: bigint,\n long: boolean,\n parts: Parts\n): string {\n const label = (timeZone: string, long: boolean, latin = false): string =>\n parts\n .call(\n new Constructor(resolved.locale, {\n timeZone,\n timeZoneName: long ? 'long' : 'short',\n numberingSystem: latin ? 'latn' : resolved.numberingSystem,\n hour: 'numeric',\n }),\n 0\n )\n .find(part => part.type === 'timeZoneName')!.value\n if (offset === 0n) return label('Etc/GMT', long)\n const pattern = label(offset < 0n ? 'Etc/GMT+1' : 'Etc/GMT-1', long, true)\n const separator = /01(\\D+)00/.exec(label('Etc/GMT-1', true, true))?.[1] ?? ':'\n const numberingSystem =\n resolved.numberingSystem === 'latn' || /01/.test(label('Etc/GMT-1', true))\n ? 'latn'\n : resolved.numberingSystem\n const seconds = Number((offset < 0n ? -offset : offset) / 1_000_000_000n)\n const hour = Math.floor(seconds / 3600),\n minute = Math.floor((seconds % 3600) / 60),\n second = seconds % 60\n if (!NumberConstructor || !numberFormat)\n throw new RangeError('Timezone offset labels require Intl.NumberFormat')\n const numeric = (digits: number): ((value: number) => string) =>\n numberFormat.call(\n new NumberConstructor(resolved.locale, {\n numberingSystem,\n minimumIntegerDigits: digits,\n useGrouping: false,\n maximumFractionDigits: 0,\n })\n )\n const number = numeric(long ? 2 : 1),\n two = numeric(2)\n const replacement =\n number(hour) +\n (long || minute || second ? separator + two(minute) : '') +\n (second ? separator + two(second) : '')\n return pattern.replace(/0?1(?:\\D+00)?/, replacement)\n}\n","import {ToString} from '#packages/ecma262-abstract/ToString.js'\nimport type {TemporalDateTimeValue} from '#packages/ecma402-abstract/DateTimeFormat/TemporalDateTime.js'\nimport type {DurationFields} from '#packages/temporal/duration-core.js'\nimport {\n legacyHostTimeZone,\n legacyZonedProjection,\n} from '#packages/temporal/legacy-zoned-date.js'\nimport {\n legacyDateTimeFormat,\n type LegacyDateTimeProjection,\n} from '#packages/temporal/legacy-extended-date.js'\n\nconst dateUTC = Date.UTC\n\ninterface DateTimeConstructor extends Intl.DateTimeFormatConstructor {\n __formatTemporal?: (\n value: TemporalDateTimeValue & {timeZone?: string},\n locales?: unknown,\n options?: unknown,\n localNanoseconds?: () => bigint\n ) => string\n}\nlet dateTimeConstructor = globalThis.Intl?.DateTimeFormat as\n | DateTimeConstructor\n | undefined\nlet temporalFormat = dateTimeConstructor?.__formatTemporal\nlet formatDate =\n dateTimeConstructor &&\n Object.getOwnPropertyDescriptor(dateTimeConstructor.prototype, 'format')?.get\nlet partsDate = dateTimeConstructor?.prototype.formatToParts\nlet resolvedDate = dateTimeConstructor?.prototype.resolvedOptions\nlet durationConstructor = (\n globalThis.Intl as\n | (typeof Intl & {\n DurationFormat?: new (\n locales?: unknown,\n options?: unknown\n ) => {format(value: DurationFields): string}\n })\n | undefined\n)?.DurationFormat\nlet formatDuration = durationConstructor?.prototype.format\n\nexport function configureLocaleFormatting(): void {\n dateTimeConstructor = globalThis.Intl?.DateTimeFormat as\n | DateTimeConstructor\n | undefined\n temporalFormat = dateTimeConstructor?.__formatTemporal\n formatDate =\n dateTimeConstructor &&\n Object.getOwnPropertyDescriptor(dateTimeConstructor.prototype, 'format')\n ?.get\n partsDate = dateTimeConstructor?.prototype.formatToParts\n resolvedDate = dateTimeConstructor?.prototype.resolvedOptions\n durationConstructor = (\n globalThis.Intl as\n | (typeof Intl & {\n DurationFormat?: new (\n locales?: unknown,\n options?: unknown\n ) => {format(value: DurationFields): string}\n })\n | undefined\n )?.DurationFormat\n formatDuration = durationConstructor?.prototype.format\n}\n\nexport function localeDuration(\n fields: DurationFields,\n locales: unknown,\n options: unknown,\n fallback: () => string\n): string {\n if (!durationConstructor || !formatDuration) return fallback()\n return formatDuration.call(new durationConstructor(locales, options), {\n ...fields,\n })\n}\n\nexport function localeDateTime(\n value: TemporalDateTimeValue & {timeZone?: string},\n locales: unknown,\n options: unknown,\n fallback: () => string,\n localNanoseconds?: () => bigint\n): string {\n if (!dateTimeConstructor || !formatDate || !resolvedDate) return fallback()\n if (temporalFormat)\n return temporalFormat(value, locales, options, localNanoseconds)\n const projection = legacyDateTimeProjection(\n dateTimeConstructor,\n value,\n locales,\n options,\n true,\n undefined,\n localNanoseconds\n )\n return legacyDateTimeFormat(projection, formatDate, partsDate!, resolvedDate)\n}\n\nexport interface LegacyDateTimeIntrinsics {\n resolvedOptions: typeof Intl.DateTimeFormat.prototype.resolvedOptions\n formatToParts: typeof Intl.DateTimeFormat.prototype.formatToParts\n}\n\nexport function legacyDateTimeProjection(\n Constructor: Intl.DateTimeFormatConstructor,\n value: TemporalDateTimeValue & {timeZone?: string},\n locales: unknown,\n options: unknown,\n localeMethod = true,\n intrinsics: LegacyDateTimeIntrinsics = {\n resolvedOptions: resolvedDate!,\n formatToParts: partsDate!,\n },\n localNanoseconds?: () => bigint\n): LegacyDateTimeProjection {\n const zoned = value.kind === 'ZonedDateTime' && localNanoseconds !== undefined\n const host = zoned\n ? legacyHostTimeZone(Constructor, value.timeZone!, intrinsics.formatToParts)\n : undefined\n let source: Record<string, unknown> | undefined\n const snapshot: Record<string, unknown> = Object.create(null)\n const proxy = new Proxy(Object.create(null), {\n get(_target, key) {\n if (!source) {\n if (options === null) throw new TypeError('Invalid options')\n source = options === undefined ? Object.create(null) : Object(options)\n }\n if (typeof key !== 'string') return Reflect.get(source!, key)\n if (!Object.prototype.hasOwnProperty.call(snapshot, key)) {\n const raw = Reflect.get(source!, key)\n if (\n key === 'timeZone' &&\n value.kind === 'ZonedDateTime' &&\n raw !== undefined\n )\n throw new TypeError('timeZone option conflicts with ZonedDateTime')\n snapshot[key] = legacyDateTimeOption(key, raw)\n }\n return key === 'timeZone' && value.kind === 'ZonedDateTime'\n ? zoned && !host\n ? 'UTC'\n : value.timeZone\n : snapshot[key]\n },\n })\n const first = new Constructor(locales as string | string[] | undefined, proxy)\n const resolved = intrinsics.resolvedOptions.call(first)\n if (\n value.calendar !== undefined &&\n value.calendar !== resolved.calendar &&\n (value.calendar !== 'iso8601' ||\n value.kind === 'PlainYearMonth' ||\n value.kind === 'PlainMonthDay')\n )\n throw new RangeError('Temporal calendar does not match DateTimeFormat')\n const date = ['weekday', 'year', 'month', 'day']\n const time = [\n 'dayPeriod',\n 'hour',\n 'minute',\n 'second',\n 'fractionalSecondDigits',\n ]\n const required =\n value.kind === 'PlainDate'\n ? date\n : value.kind === 'PlainYearMonth'\n ? ['year', 'month']\n : value.kind === 'PlainMonthDay'\n ? ['month', 'day']\n : value.kind === 'PlainTime'\n ? time\n : [...date, ...time]\n const allowed = [...required]\n if (value.kind !== 'PlainTime' && value.kind !== 'PlainMonthDay')\n allowed.push('era')\n const instant = value.kind === 'Instant' || value.kind === 'ZonedDateTime'\n if (instant) allowed.push('timeZoneName')\n const selected: Record<string, unknown> = Object.create(null)\n for (const key of [\n 'calendar',\n 'numberingSystem',\n 'localeMatcher',\n 'hour12',\n 'hourCycle',\n 'formatMatcher',\n ])\n selected[key] = snapshot[key]\n selected.timeZone = instant ? resolved.timeZone : 'UTC'\n const dateStyle = snapshot.dateStyle,\n timeStyle = snapshot.timeStyle\n if (\n localeMethod &&\n ((value.kind === 'PlainTime' && dateStyle !== undefined) ||\n (!instant &&\n value.kind !== 'PlainDateTime' &&\n value.kind !== 'PlainTime' &&\n timeStyle !== undefined))\n )\n throw new TypeError('DateTimeFormat style conflicts with required type')\n if (dateStyle !== undefined || timeStyle !== undefined) {\n const plainDate =\n value.kind === 'PlainDate' ||\n value.kind === 'PlainYearMonth' ||\n value.kind === 'PlainMonthDay'\n if (\n (plainDate && dateStyle === undefined) ||\n (value.kind === 'PlainTime' && timeStyle === undefined)\n )\n throw new TypeError(\n 'DateTimeFormat styles do not overlap the Temporal type'\n )\n const styleFields = legacyStyleFields(\n Constructor,\n resolved,\n dateStyle,\n timeStyle,\n intrinsics.formatToParts\n )\n if (Object.keys(styleFields).some(key => !allowed.includes(key))) {\n for (const key of allowed) selected[key] = styleFields[key]\n if (styleFields.hour !== undefined && allowed.includes('hour'))\n selected.hourCycle = resolved.hourCycle\n } else {\n selected.dateStyle = dateStyle\n selected.timeStyle = timeStyle\n }\n } else {\n for (const key of allowed) selected[key] = snapshot[key]\n if (required.every(key => snapshot[key] === undefined)) {\n if (\n !instant &&\n [...date, ...time].some(key => snapshot[key] !== undefined)\n )\n throw new TypeError(\n 'DateTimeFormat options do not overlap the Temporal type'\n )\n const defaults =\n value.kind === 'PlainTime'\n ? ['hour', 'minute', 'second']\n : value.kind === 'PlainDate'\n ? ['year', 'month', 'day']\n : value.kind === 'PlainYearMonth' || value.kind === 'PlainMonthDay'\n ? required\n : ['year', 'month', 'day', 'hour', 'minute', 'second']\n for (const key of defaults) selected[key] = 'numeric'\n if (value.kind === 'ZonedDateTime' && selected.timeZoneName === undefined)\n selected.timeZoneName = 'short'\n }\n }\n const formatter = new Constructor(resolved.locale, selected)\n const ns = value.epochNanoseconds\n if (zoned) {\n const local = localNanoseconds!()\n if (!host || host(ns) !== local - ns)\n return legacyZonedProjection(\n Constructor,\n resolved,\n selected,\n local,\n local - ns,\n intrinsics.formatToParts\n )\n }\n const ms = ns / 1_000_000n - (ns < 0n && ns % 1_000_000n ? 1n : 0n)\n return {formatter, milliseconds: Number(ms), plain: !instant}\n}\n\nfunction legacyStyleFields(\n Constructor: Intl.DateTimeFormatConstructor,\n resolved: Intl.ResolvedDateTimeFormatOptions,\n dateStyle: unknown,\n timeStyle: unknown,\n formatToParts: typeof Intl.DateTimeFormat.prototype.formatToParts\n): Record<string, unknown> {\n const controls = {\n calendar: resolved.calendar,\n numberingSystem: resolved.numberingSystem,\n timeZone: 'UTC',\n hourCycle: resolved.hourCycle,\n }\n const style = new Constructor(resolved.locale, {\n ...controls,\n dateStyle,\n timeStyle,\n } as Intl.DateTimeFormatOptions)\n const probes = [\n dateUTC(2006, 10, 22, 7, 8, 9),\n dateUTC(1991, 1, 3, 17, 18, 19),\n ]\n const field = (type: string): string =>\n type === 'relatedYear' || type === 'yearName' ? 'year' : type\n const parts = probes.map(probe => formatToParts.call(style, probe))\n const defaults: Record<string, string> = {\n weekday: 'long',\n era: 'short',\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n second: '2-digit',\n timeZoneName: 'short',\n }\n const seed: Record<string, unknown> = Object.create(null)\n for (const part of parts[0]) {\n const key = field(part.type)\n if (defaults[key] !== undefined) seed[key] = defaults[key]\n }\n const text = (values: Intl.DateTimeFormatPart[], key: string): string =>\n values\n .filter(part => field(part.type) === key)\n .map(part => part.value)\n .join('')\n const result: Record<string, unknown> = {...seed}\n for (const key of Object.keys(seed)) {\n const widths =\n key === 'year' ||\n key === 'day' ||\n key === 'hour' ||\n key === 'minute' ||\n key === 'second'\n ? ['numeric', '2-digit']\n : key === 'month'\n ? ['numeric', '2-digit', 'long', 'short', 'narrow']\n : key === 'timeZoneName'\n ? ['short', 'long']\n : ['long', 'short', 'narrow']\n for (const width of widths) {\n const candidate = new Constructor(resolved.locale, {\n ...controls,\n ...seed,\n [key]: width,\n } as Intl.DateTimeFormatOptions)\n if (\n probes.every(\n (probe, index) =>\n text(formatToParts.call(candidate, probe), key) ===\n text(parts[index], key)\n )\n ) {\n result[key] = width\n break\n }\n }\n }\n return result\n}\n\nexport function legacyDateTimeOption(key: string, value: unknown): unknown {\n if (value === undefined) return undefined\n if (key === 'hour12') return !!value\n if (key === 'fractionalSecondDigits') return +(value as number)\n return ToString(value)\n}\n","const getTime = Function.prototype.call.bind(Date.prototype.getTime)\nexport function createDateToTemporalInstant<T>(\n create: (ns: bigint) => T\n): (this: unknown) => T {\n return {\n toTemporalInstant(this: unknown): T {\n return create(BigInt(getTime(this)) * 1_000_000n)\n },\n }.toTemporalInstant\n}\n","const constructors = [\n 'Instant',\n 'Duration',\n 'PlainDate',\n 'PlainDateTime',\n 'PlainTime',\n 'PlainYearMonth',\n 'PlainMonthDay',\n 'ZonedDateTime',\n]\nconst nowMethods = [\n 'instant',\n 'timeZoneId',\n 'plainDateTimeISO',\n 'plainDateISO',\n 'plainTimeISO',\n 'zonedDateTimeISO',\n]\nexport function needsTemporal(): boolean {\n const temporal = (globalThis as {Temporal?: Record<string, unknown>}).Temporal\n if (!temporal || typeof temporal !== 'object') return true\n for (let i = 0; i < constructors.length; i++)\n if (typeof temporal[constructors[i]] !== 'function') return true\n const now = temporal.Now as Record<string, unknown> | undefined\n if (!now || typeof now !== 'object') return true\n for (let i = 0; i < nowMethods.length; i++)\n if (typeof now[nowMethods[i]] !== 'function') return true\n return false\n}\n","// packages/bigdecimal/index.ts\nconst DIV_PRECISION = 40;\nfunction removeTrailingZeros(mantissa, exponent) {\n\tif (mantissa === 0n) return [0n, 0];\n\tif (mantissa % 10n !== 0n) return [mantissa, exponent];\n\twhile (mantissa % 100000000n === 0n && Number.isSafeInteger(exponent) && Number.isSafeInteger(exponent + 8)) {\n\t\tmantissa /= 100000000n;\n\t\texponent += 8;\n\t}\n\twhile (mantissa % 10n === 0n) {\n\t\tmantissa /= 10n;\n\t\texponent++;\n\t}\n\treturn [mantissa, exponent];\n}\nfunction bigintAbs(n) {\n\treturn n < 0n ? -n : n;\n}\nfunction digitCount(n) {\n\tif (n === 0n) return 1;\n\tif (n < 0n) n = -n;\n\tlet count = 0;\n\tconst big15 = 1000000000000000n;\n\twhile (n >= big15) {\n\t\tn /= big15;\n\t\tcount += 15;\n\t}\n\tlet r = Number(n);\n\twhile (r >= 1) {\n\t\tr /= 10;\n\t\tcount++;\n\t}\n\treturn count;\n}\nconst TEN_BIGINT = 10n;\nconst SMALL_POWERS_OF_TEN = [1n];\nfunction bigintPow10(n) {\n\tif (n <= 0) return 1n;\n\tif (n <= 64 && Number.isInteger(n)) {\n\t\tfor (let i = SMALL_POWERS_OF_TEN.length; i <= n; i++) SMALL_POWERS_OF_TEN.push(SMALL_POWERS_OF_TEN[i - 1] * TEN_BIGINT);\n\t\treturn SMALL_POWERS_OF_TEN[n];\n\t}\n\tlet result = 1n;\n\tlet base = TEN_BIGINT;\n\tlet exp = n;\n\twhile (exp > 0) {\n\t\tif (exp & 1) result *= base;\n\t\tbase *= base;\n\t\texp >>= 1;\n\t}\n\treturn result;\n}\nfunction parseDecimalString(s) {\n\ts = s.trim();\n\tif (s === \"NaN\") return {\n\t\tmantissa: 0n,\n\t\texponent: 0,\n\t\tspecial: 1,\n\t\tnegativeZero: false\n\t};\n\tif (s === \"Infinity\" || s === \"+Infinity\") return {\n\t\tmantissa: 0n,\n\t\texponent: 0,\n\t\tspecial: 2,\n\t\tnegativeZero: false\n\t};\n\tif (s === \"-Infinity\") return {\n\t\tmantissa: 0n,\n\t\texponent: 0,\n\t\tspecial: 3,\n\t\tnegativeZero: false\n\t};\n\tlet negative = false;\n\tlet idx = 0;\n\tif (s[idx] === \"-\") {\n\t\tnegative = true;\n\t\tidx++;\n\t} else if (s[idx] === \"+\") idx++;\n\tlet eIdx = s.indexOf(\"e\", idx);\n\tif (eIdx === -1) eIdx = s.indexOf(\"E\", idx);\n\tlet sciExp = 0;\n\tlet numPart;\n\tif (eIdx !== -1) {\n\t\tsciExp = parseInt(s.substring(eIdx + 1), 10);\n\t\tnumPart = s.substring(idx, eIdx);\n\t} else numPart = s.substring(idx);\n\tconst dotIdx = numPart.indexOf(\".\");\n\tlet intPart;\n\tlet fracPart;\n\tif (dotIdx !== -1) {\n\t\tintPart = numPart.substring(0, dotIdx);\n\t\tfracPart = numPart.substring(dotIdx + 1);\n\t} else {\n\t\tintPart = numPart;\n\t\tfracPart = \"\";\n\t}\n\tconst combined = intPart + fracPart;\n\tconst exponent = sciExp - fracPart.length;\n\tif (combined === \"\" || combined === \"0\" || /^0+$/.test(combined)) return {\n\t\tmantissa: 0n,\n\t\texponent: 0,\n\t\tspecial: 0,\n\t\tnegativeZero: negative\n\t};\n\tlet mantissa = BigInt(combined);\n\tif (negative) mantissa = -mantissa;\n\tconst [normMantissa, normExponent] = removeTrailingZeros(mantissa, exponent);\n\treturn {\n\t\tmantissa: normMantissa,\n\t\texponent: normExponent,\n\t\tspecial: 0,\n\t\tnegativeZero: false\n\t};\n}\nvar BigDecimal = class BigDecimal {\n\tconstructor(value) {\n\t\tif (typeof value === \"bigint\") {\n\t\t\tconst [m, e] = removeTrailingZeros(value, 0);\n\t\t\tthis._mantissa = m;\n\t\t\tthis._exponent = e;\n\t\t\tthis._special = 0;\n\t\t\tthis._negativeZero = false;\n\t\t\treturn;\n\t\t}\n\t\tif (typeof value === \"number\") {\n\t\t\tif (Number.isNaN(value)) {\n\t\t\t\tthis._mantissa = 0n;\n\t\t\t\tthis._exponent = 0;\n\t\t\t\tthis._special = 1;\n\t\t\t\tthis._negativeZero = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (value === Infinity) {\n\t\t\t\tthis._mantissa = 0n;\n\t\t\t\tthis._exponent = 0;\n\t\t\t\tthis._special = 2;\n\t\t\t\tthis._negativeZero = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (value === -Infinity) {\n\t\t\t\tthis._mantissa = 0n;\n\t\t\t\tthis._exponent = 0;\n\t\t\t\tthis._special = 3;\n\t\t\t\tthis._negativeZero = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (value === 0) {\n\t\t\t\tthis._mantissa = 0n;\n\t\t\t\tthis._exponent = 0;\n\t\t\t\tthis._special = 0;\n\t\t\t\tthis._negativeZero = Object.is(value, -0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (Number.isSafeInteger(value)) {\n\t\t\t\tconst [m, e] = removeTrailingZeros(BigInt(value), 0);\n\t\t\t\tthis._mantissa = m;\n\t\t\t\tthis._exponent = e;\n\t\t\t\tthis._special = 0;\n\t\t\t\tthis._negativeZero = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvalue = String(value);\n\t\t}\n\t\tconst parsed = parseDecimalString(value);\n\t\tthis._mantissa = parsed.mantissa;\n\t\tthis._exponent = parsed.exponent;\n\t\tthis._special = parsed.special;\n\t\tthis._negativeZero = parsed.negativeZero;\n\t}\n\tstatic _create(mantissa, exponent, special, negativeZero) {\n\t\tconst bd = Object.create(BigDecimal.prototype);\n\t\tbd._mantissa = mantissa;\n\t\tbd._exponent = exponent;\n\t\tbd._special = special;\n\t\tbd._negativeZero = negativeZero;\n\t\treturn bd;\n\t}\n\tstatic _coerce(v) {\n\t\treturn v instanceof BigDecimal ? v : new BigDecimal(v);\n\t}\n\ttimes(y) {\n\t\tconst other = BigDecimal._coerce(y);\n\t\tif (this._special || other._special) return this._specialArith(other, \"times\");\n\t\tif (this._mantissa === 0n || other._mantissa === 0n) {\n\t\t\tconst negZero = this._isSignNegative() ? !other._isSignNegative() : other._isSignNegative();\n\t\t\treturn BigDecimal._create(0n, 0, 0, negZero);\n\t\t}\n\t\tconst [nm, ne] = removeTrailingZeros(this._mantissa * other._mantissa, this._exponent + other._exponent);\n\t\treturn BigDecimal._create(nm, ne, 0, false);\n\t}\n\tdiv(y) {\n\t\tconst other = BigDecimal._coerce(y);\n\t\tif (this._special || other._special) return this._specialArith(other, \"div\");\n\t\tif (other._mantissa === 0n) {\n\t\t\tif (this._mantissa === 0n) return BigDecimal._create(0n, 0, 1, false);\n\t\t\tconst neg = this._isSignNegative() !== other._isSignNegative();\n\t\t\treturn BigDecimal._create(0n, 0, neg ? 3 : 2, false);\n\t\t}\n\t\tif (this._mantissa === 0n) {\n\t\t\tconst negZero = this._isSignNegative() !== other._isSignNegative();\n\t\t\treturn BigDecimal._create(0n, 0, 0, negZero);\n\t\t}\n\t\tconst exponent = this._exponent - other._exponent;\n\t\tconst newExponent = exponent - DIV_PRECISION;\n\t\tif ((other._mantissa === 1n || other._mantissa === -1n) && Number.isSafeInteger(exponent) && Number.isSafeInteger(newExponent)) return BigDecimal._create(other._mantissa === 1n ? this._mantissa : -this._mantissa, exponent === 0 ? 0 : exponent, 0, false);\n\t\tconst [nm, ne] = removeTrailingZeros(this._mantissa * bigintPow10(DIV_PRECISION) / other._mantissa, newExponent);\n\t\treturn BigDecimal._create(nm, ne, 0, false);\n\t}\n\tplus(y) {\n\t\tconst other = BigDecimal._coerce(y);\n\t\tif (this._special || other._special) return this._specialArith(other, \"plus\");\n\t\tif (this._mantissa === 0n && other._mantissa === 0n) {\n\t\t\tconst negZero = this._negativeZero && other._negativeZero;\n\t\t\treturn BigDecimal._create(0n, 0, 0, negZero);\n\t\t}\n\t\tif (this._mantissa === 0n) return other;\n\t\tif (other._mantissa === 0n) return this;\n\t\tlet m1 = this._mantissa;\n\t\tlet m2 = other._mantissa;\n\t\tconst e1 = this._exponent;\n\t\tconst e2 = other._exponent;\n\t\tconst minE = Math.min(e1, e2);\n\t\tif (e1 > minE) m1 *= bigintPow10(e1 - minE);\n\t\tif (e2 > minE) m2 *= bigintPow10(e2 - minE);\n\t\tconst sum = m1 + m2;\n\t\tif (sum === 0n) return BigDecimal._create(0n, 0, 0, false);\n\t\tconst [nm, ne] = removeTrailingZeros(sum, minE);\n\t\treturn BigDecimal._create(nm, ne, 0, false);\n\t}\n\tminus(y) {\n\t\treturn this.plus(BigDecimal._coerce(y).negated());\n\t}\n\tmod(y) {\n\t\tconst other = BigDecimal._coerce(y);\n\t\tif (this._special || other._special) {\n\t\t\tif (this._special === 1 || other._special === 1) return BigDecimal._create(0n, 0, 1, false);\n\t\t\tif (this._special === 2 || this._special === 3) return BigDecimal._create(0n, 0, 1, false);\n\t\t\tif (other._special === 2 || other._special === 3) return this;\n\t\t}\n\t\tif (other._mantissa === 0n) return BigDecimal._create(0n, 0, 1, false);\n\t\tif (this._mantissa === 0n) return this;\n\t\tlet m1 = this._mantissa;\n\t\tlet m2 = other._mantissa;\n\t\tconst e1 = this._exponent;\n\t\tconst e2 = other._exponent;\n\t\tconst minE = Math.min(e1, e2);\n\t\tif (e1 > minE) m1 *= bigintPow10(e1 - minE);\n\t\tif (e2 > minE) m2 *= bigintPow10(e2 - minE);\n\t\tconst remainder = m1 % m2;\n\t\tif (remainder === 0n) return BigDecimal._create(0n, 0, 0, false);\n\t\tconst [nm, ne] = removeTrailingZeros(remainder, minE);\n\t\treturn BigDecimal._create(nm, ne, 0, false);\n\t}\n\tabs() {\n\t\tif (this._special === 1) return this;\n\t\tif (this._special === 3) return BigDecimal._create(0n, 0, 2, false);\n\t\treturn BigDecimal._create(bigintAbs(this._mantissa), this._exponent, this._special, false);\n\t}\n\tnegated() {\n\t\tif (this._special === 1) return this;\n\t\tif (this._special === 2) return BigDecimal._create(0n, 0, 3, false);\n\t\tif (this._special === 3) return BigDecimal._create(0n, 0, 2, false);\n\t\tif (this._mantissa === 0n) return BigDecimal._create(0n, 0, 0, !this._negativeZero);\n\t\treturn BigDecimal._create(-this._mantissa, this._exponent, 0, false);\n\t}\n\tpow(n) {\n\t\tif (this._special === 1) return this;\n\t\tif (n === 0) return new BigDecimal(1);\n\t\tif (n < 0) return new BigDecimal(1).div(this.pow(-n));\n\t\tif (this._special === 2) return this;\n\t\tif (this._special === 3) return n % 2 === 0 ? BigDecimal._create(0n, 0, 2, false) : this;\n\t\tif (this._mantissa === 0n) return new BigDecimal(0);\n\t\tconst [nm, ne] = removeTrailingZeros(this._mantissa ** BigInt(n), this._exponent * n);\n\t\treturn BigDecimal._create(nm, ne, 0, false);\n\t}\n\tfloor() {\n\t\tif (this._special !== 0) return this;\n\t\tif (this._mantissa === 0n) return this;\n\t\tif (this._exponent >= 0) return this;\n\t\tconst divisor = bigintPow10(-this._exponent);\n\t\tconst m = this._mantissa;\n\t\tlet q = m / divisor;\n\t\tif (m < 0n && m % divisor !== 0n) q -= 1n;\n\t\tif (q === 0n) {\n\t\t\tconst negZero = this._mantissa < 0n;\n\t\t\treturn BigDecimal._create(0n, 0, 0, negZero);\n\t\t}\n\t\tconst [nm, ne] = removeTrailingZeros(q, 0);\n\t\treturn BigDecimal._create(nm, ne, 0, false);\n\t}\n\tceil() {\n\t\tif (this._special !== 0) return this;\n\t\tif (this._mantissa === 0n) return this;\n\t\tif (this._exponent >= 0) return this;\n\t\tconst divisor = bigintPow10(-this._exponent);\n\t\tconst m = this._mantissa;\n\t\tlet q = m / divisor;\n\t\tif (m > 0n && m % divisor !== 0n) q += 1n;\n\t\tif (q === 0n) return BigDecimal._create(0n, 0, 0, false);\n\t\tconst [nm, ne] = removeTrailingZeros(q, 0);\n\t\treturn BigDecimal._create(nm, ne, 0, false);\n\t}\n\tlog(base) {\n\t\tif (this._special === 1) return this;\n\t\tif (this._special === 3) return BigDecimal._create(0n, 0, 1, false);\n\t\tif (this._special === 2) return BigDecimal._create(0n, 0, 2, false);\n\t\tif (this._mantissa < 0n) return BigDecimal._create(0n, 0, 1, false);\n\t\tif (this._mantissa === 0n) return BigDecimal._create(0n, 0, 3, false);\n\t\tif (base === 10) return this._log10();\n\t\tconst log10x = this._log10();\n\t\tconst log10b = new BigDecimal(Math.log10(base));\n\t\treturn log10x.div(log10b);\n\t}\n\t_log10() {\n\t\tconst absMantissa = bigintAbs(this._mantissa);\n\t\tconst digits = digitCount(absMantissa);\n\t\tlet log10Mantissa;\n\t\tif (digits <= 15) log10Mantissa = Math.log10(Number(absMantissa));\n\t\telse {\n\t\t\tconst shift = digits - 17;\n\t\t\tconst leading = absMantissa / bigintPow10(shift);\n\t\t\tlog10Mantissa = Math.log10(Number(leading)) + shift;\n\t\t}\n\t\tconst totalLog10 = log10Mantissa + this._exponent;\n\t\treturn new BigDecimal(totalLog10);\n\t}\n\teq(y) {\n\t\tconst other = BigDecimal._coerce(y);\n\t\tif (this._special === 1 || other._special === 1) return false;\n\t\tif (this._special !== other._special) return false;\n\t\tif (this._special !== 0) return true;\n\t\tif (this._mantissa === 0n && other._mantissa === 0n) return true;\n\t\treturn this._mantissa === other._mantissa && this._exponent === other._exponent;\n\t}\n\t_compareTo(other) {\n\t\tif (this._special === 1 || other._special === 1) return NaN;\n\t\tif (this._special === 2) return other._special === 2 ? 0 : 1;\n\t\tif (this._special === 3) return other._special === 3 ? 0 : -1;\n\t\tif (other._special === 2) return -1;\n\t\tif (other._special === 3) return 1;\n\t\tconst thisZero = this._mantissa === 0n;\n\t\tconst otherZero = other._mantissa === 0n;\n\t\tif (thisZero && otherZero) return 0;\n\t\tif (thisZero) return other._mantissa > 0n ? -1 : 1;\n\t\tif (otherZero) return this._mantissa > 0n ? 1 : -1;\n\t\tconst thisNeg = this._mantissa < 0n;\n\t\tif (thisNeg !== other._mantissa < 0n) return thisNeg ? -1 : 1;\n\t\tlet m1 = this._mantissa;\n\t\tlet m2 = other._mantissa;\n\t\tconst e1 = this._exponent;\n\t\tconst e2 = other._exponent;\n\t\tconst minE = Math.min(e1, e2);\n\t\tif (e1 > minE) m1 *= bigintPow10(e1 - minE);\n\t\tif (e2 > minE) m2 *= bigintPow10(e2 - minE);\n\t\tif (m1 < m2) return -1;\n\t\tif (m1 > m2) return 1;\n\t\treturn 0;\n\t}\n\tlessThan(y) {\n\t\treturn this._compareTo(BigDecimal._coerce(y)) === -1;\n\t}\n\tgreaterThan(y) {\n\t\treturn this._compareTo(BigDecimal._coerce(y)) === 1;\n\t}\n\tlessThanOrEqualTo(y) {\n\t\tconst c = this._compareTo(BigDecimal._coerce(y));\n\t\treturn c === 0 || c === -1;\n\t}\n\tgreaterThanOrEqualTo(y) {\n\t\tconst c = this._compareTo(BigDecimal._coerce(y));\n\t\treturn c === 0 || c === 1;\n\t}\n\tisZero() {\n\t\treturn this._special === 0 && this._mantissa === 0n;\n\t}\n\tisNaN() {\n\t\treturn this._special === 1;\n\t}\n\tisFinite() {\n\t\treturn this._special === 0;\n\t}\n\tisNegative() {\n\t\tif (this._special === 1) return false;\n\t\tif (this._special === 3) return true;\n\t\tif (this._special === 2) return false;\n\t\tif (this._mantissa === 0n) return this._negativeZero;\n\t\treturn this._mantissa < 0n;\n\t}\n\tisPositive() {\n\t\tif (this._special === 1) return false;\n\t\tif (this._special === 2) return true;\n\t\tif (this._special === 3) return false;\n\t\tif (this._mantissa === 0n) return !this._negativeZero;\n\t\treturn this._mantissa > 0n;\n\t}\n\tisInteger() {\n\t\tif (this._special !== 0) return false;\n\t\tif (this._mantissa === 0n) return true;\n\t\treturn this._exponent >= 0;\n\t}\n\ttoJSON() {\n\t\treturn this.toString();\n\t}\n\ttoNumber() {\n\t\tif (this._special === 1) return NaN;\n\t\tif (this._special === 2) return Infinity;\n\t\tif (this._special === 3) return -Infinity;\n\t\tif (this._mantissa === 0n) return this._negativeZero ? -0 : 0;\n\t\tif (this._exponent === 0) return Number(this._mantissa);\n\t\treturn Number(this.toString());\n\t}\n\ttoString() {\n\t\tif (this._special === 1) return \"NaN\";\n\t\tif (this._special === 2) return \"Infinity\";\n\t\tif (this._special === 3) return \"-Infinity\";\n\t\tif (this._mantissa === 0n) return \"0\";\n\t\tconst negative = this._mantissa < 0n;\n\t\tconst absStr = bigintAbs(this._mantissa).toString();\n\t\tconst prefix = negative ? \"-\" : \"\";\n\t\tif (this._exponent === 0) return prefix + absStr;\n\t\tif (this._exponent > 0) return prefix + absStr + \"0\".repeat(this._exponent);\n\t\tconst decimalPlaces = -this._exponent;\n\t\tif (decimalPlaces < absStr.length) {\n\t\t\tconst intPart = absStr.slice(0, absStr.length - decimalPlaces);\n\t\t\tconst fracPart = absStr.slice(absStr.length - decimalPlaces);\n\t\t\treturn prefix + intPart + \".\" + fracPart;\n\t\t} else {\n\t\t\tconst leadingZeros = decimalPlaces - absStr.length;\n\t\t\treturn prefix + \"0.\" + \"0\".repeat(leadingZeros) + absStr;\n\t\t}\n\t}\n\tstatic pow(base, exp) {\n\t\tconst n = typeof exp === \"number\" ? exp : exp.toNumber();\n\t\tif (typeof base === \"number\" && base === 10) return BigDecimal._create(1n, n, 0, false);\n\t\treturn (base instanceof BigDecimal ? base : new BigDecimal(base)).pow(n);\n\t}\n\tstatic set(_config) {}\n\t_isSignNegative() {\n\t\tif (this._special === 3) return true;\n\t\tif (this._mantissa < 0n) return true;\n\t\tif (this._mantissa === 0n) return this._negativeZero;\n\t\treturn false;\n\t}\n\t_specialArith(other, op) {\n\t\tconst a = this._special;\n\t\tconst b = other._special;\n\t\tif (a === 1 || b === 1) return BigDecimal._create(0n, 0, 1, false);\n\t\tconst aNeg = this._isSignNegative();\n\t\tconst bNeg = other._isSignNegative();\n\t\tconst aInf = a === 2 || a === 3;\n\t\tconst bInf = b === 2 || b === 3;\n\t\tif (op === \"times\") {\n\t\t\tif (aInf || bInf) {\n\t\t\t\tif (aInf && other._mantissa === 0n && !bInf || bInf && this._mantissa === 0n && !aInf) return BigDecimal._create(0n, 0, 1, false);\n\t\t\t\tconst neg = aNeg !== bNeg;\n\t\t\t\treturn BigDecimal._create(0n, 0, neg ? 3 : 2, false);\n\t\t\t}\n\t\t}\n\t\tif (op === \"div\") {\n\t\t\tif (aInf && bInf) return BigDecimal._create(0n, 0, 1, false);\n\t\t\tif (aInf) {\n\t\t\t\tconst neg = aNeg !== bNeg;\n\t\t\t\treturn BigDecimal._create(0n, 0, neg ? 3 : 2, false);\n\t\t\t}\n\t\t\tif (bInf) {\n\t\t\t\tconst negZero = aNeg !== bNeg;\n\t\t\t\treturn BigDecimal._create(0n, 0, 0, negZero);\n\t\t\t}\n\t\t}\n\t\tif (op === \"plus\") {\n\t\t\tif (aInf && bInf) {\n\t\t\t\tif (aNeg !== bNeg) return BigDecimal._create(0n, 0, 1, false);\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tif (aInf) return this;\n\t\t\tif (bInf) return other;\n\t\t}\n\t\treturn BigDecimal._create(0n, 0, 1, false);\n\t}\n};\nexport { BigDecimal, BigDecimal as Decimal, BigDecimal as default };\n\n//# sourceMappingURL=index.js.map","import { Decimal } from \"@formatjs/bigdecimal\";\n/**\n* ECMA-262 §7.1.4 ToNumber, steps 2, 8–10.\n* https://tc39.es/ecma262/#sec-tonumber\n* https://github.com/tc39/ecma262/blob/dcf59856a8184792a9e42f0ffb7dc064094a5dcc/spec.html#L5183-L5191\n*/\nexport function ToNumber(arg) {\n\t// Unary + evaluation step 2 returns ? ToNumber, preserving abrupt completions\n\t// from ToPrimitive and rejecting BigInt/Symbol before constructing Decimal.\n\t// ECMA-262 §13.5.4.1 Unary + evaluation, step 2.\n\t// https://tc39.es/ecma262/#sec-unary-plus-operator-runtime-semantics-evaluation\n\t// https://github.com/tc39/ecma262/blob/dcf59856a8184792a9e42f0ffb7dc064094a5dcc/spec.html#L20666\n\treturn new Decimal(+arg);\n}\n","import { ToNumber } from \"#packages/ecma262-abstract/ToNumber.js\";\nimport { DayFromYear, DaysInYear } from \"#packages/ecma262-abstract/DateOperations.js\";\nconst readers = [];\nconst registered = new WeakSet();\nexport function registerTemporalDateTimeNamespace(temporal) {\n\tif (registered.has(temporal)) return;\n\tconst additions = [\n\t\t\"PlainDate\",\n\t\t\"PlainYearMonth\",\n\t\t\"PlainMonthDay\",\n\t\t\"PlainTime\",\n\t\t\"PlainDateTime\",\n\t\t\"Instant\",\n\t\t\"ZonedDateTime\"\n\t].map((kind) => ({\n\t\tkind,\n\t\tread: kind === \"Instant\" || kind === \"ZonedDateTime\" ? Object.getOwnPropertyDescriptor(temporal[kind].prototype, \"epochNanoseconds\").get : Object.getOwnPropertyDescriptor(temporal[kind].prototype, \"toString\").value\n\t}));\n\treaders.push(...additions);\n\tregistered.add(temporal);\n}\nconst temporal = globalThis.Temporal;\nif (temporal) registerTemporalDateTimeNamespace(temporal);\nconst stringOptions = Object.assign(Object.create(null), { calendarName: \"always\" });\nconst CALENDAR_ANNOTATION = /\\[u-ca=([^\\]]+)\\]/;\nconst ISO_DATE = /^([+-]\\d{6}|\\d{4})-(\\d{2})-(\\d{2})/;\nconst ISO_TIME = /(?:^|T)(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?/;\nconst dateGetTime = Date.prototype.getTime;\nconst monthStarts = [\n\t0,\n\t31,\n\t59,\n\t90,\n\t120,\n\t151,\n\t181,\n\t212,\n\t243,\n\t273,\n\t304,\n\t334\n];\nexport function ToDateTimeFormattable(value) {\n\tif (value !== null && typeof value === \"object\" && readers.length) {\n\t\tlet isDate = false;\n\t\ttry {\n\t\t\tdateGetTime.call(value);\n\t\t\tisDate = true;\n\t\t} catch {}\n\t\tif (isDate) return ToNumber(value);\n\t\tfor (const { kind, read } of readers) {\n\t\t\tlet result;\n\t\t\ttry {\n\t\t\t\tresult = read.call(value, stringOptions);\n\t\t\t} catch {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (kind === \"Instant\" || kind === \"ZonedDateTime\") {\n\t\t\t\treturn {\n\t\t\t\t\tkind,\n\t\t\t\t\tepochNanoseconds: BigInt(result)\n\t\t\t\t};\n\t\t\t}\n\t\t\t// calendarName=always includes the ISO reference date for YearMonth/MonthDay.\n\t\t\t// Parsing this intrinsic result avoids Date's TimeClip and user-defined coercion.\n\t\t\tconst text = String(result);\n\t\t\tconst calendar = CALENDAR_ANNOTATION.exec(text)?.[1];\n\t\t\tconst date = ISO_DATE.exec(text);\n\t\t\tconst time = ISO_TIME.exec(text);\n\t\t\tlet epochNanoseconds = BigInt(0);\n\t\t\tif (date) {\n\t\t\t\tconst year = Number(date[1]);\n\t\t\t\tconst month = Number(date[2]);\n\t\t\t\tconst days = DayFromYear(year) + monthStarts[month - 1] + Number(date[3]) - 1 + (month > 2 && DaysInYear(year) === 366 ? 1 : 0);\n\t\t\t\tepochNanoseconds = BigInt(days) * BigInt(864e11);\n\t\t\t}\n\t\t\tif (time) {\n\t\t\t\tepochNanoseconds += BigInt(Number(time[1]) * 3600 + Number(time[2]) * 60 + Number(time[3])) * BigInt(1e9) + BigInt(((time[4] || \"\") + \"000000000\").slice(0, 9));\n\t\t\t} else {\n\t\t\t\tepochNanoseconds += BigInt(432e11);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tkind,\n\t\t\t\tcalendar,\n\t\t\t\tepochNanoseconds\n\t\t\t};\n\t\t}\n\t}\n\treturn ToNumber(value);\n}\n","import { Decimal } from \"@formatjs/bigdecimal\";\nconst ZERO = new Decimal(0);\nimport { ToNumber } from \"#packages/ecma262-abstract/ToNumber.js\";\nfunction ToInteger(n) {\n\tconst number = ToNumber(n);\n\tif (number.isNaN() || number.isZero()) {\n\t\treturn ZERO;\n\t}\n\tif (!number.isFinite()) {\n\t\treturn number;\n\t}\n\tlet integer = number.abs().floor();\n\tif (number.isNegative()) {\n\t\tinteger = integer.negated();\n\t}\n\treturn integer.isZero() ? ZERO : integer;\n}\n/**\n* https://tc39.es/ecma262/#sec-timeclip\n*/\nexport function TimeClip(time) {\n\tif (!time.isFinite()) {\n\t\treturn new Decimal(NaN);\n\t}\n\t// ECMA-262 §21.4.1.31, step 2: the bound is exactly 8.64 × 10^15.\n\t// Multiplying the binary Number 8.64 by 1e15 rounds one millisecond too high.\n\t// https://tc39.es/ecma262/#sec-timeclip\n\t// https://github.com/tc39/ecma262/blob/b7865f0eed2021720f84d561289401bc414874d0/spec.html#L34739\n\tif (time.abs().greaterThan(864e13)) {\n\t\treturn new Decimal(NaN);\n\t}\n\t// ECMA-262 §21.4.1.31, step 3: truncate finite timestamps toward zero.\n\t// https://tc39.es/ecma262/#sec-timeclip\n\t// https://github.com/tc39/ecma262/blob/b7865f0eed2021720f84d561289401bc414874d0/spec.html#L34738-L34740\n\treturn ToInteger(time);\n}\n","import { TimeClip } from \"#packages/ecma262-abstract/TimeClip.js\";\nexport function isTemporalDateTimeValue(value) {\n\treturn Object.prototype.hasOwnProperty.call(value, \"kind\");\n}\n/** https://tc39.es/proposal-temporal/#sec-temporal-handledatetimevalue */\nexport function HandleDateTimeValue(slots, value) {\n\tif (!isTemporalDateTimeValue(value)) {\n\t\t// HandleDateTimeOthers clips Number inputs before creating the record.\n\t\tconst clipped = TimeClip(value);\n\t\tif (clipped.isNaN()) throw new RangeError(\"Invalid time\");\n\t\treturn {\n\t\t\tformat: slots,\n\t\t\tepochNanoseconds: BigInt(clipped.toNumber()) * BigInt(1e6),\n\t\t\tisPlain: false\n\t\t};\n\t}\n\tif (value.kind === \"ZonedDateTime\") {\n\t\tthrow new TypeError(\"Temporal.ZonedDateTime is not supported by DateTimeFormat\");\n\t}\n\tif (value.calendar !== undefined && value.calendar !== slots.calendar && (value.calendar !== \"iso8601\" || value.kind === \"PlainYearMonth\" || value.kind === \"PlainMonthDay\")) {\n\t\tthrow new RangeError(\"Temporal calendar does not match DateTimeFormat\");\n\t}\n\treturn {\n\t\tformat: slots.getTemporalFormat(value.kind),\n\t\tepochNanoseconds: value.epochNanoseconds,\n\t\tisPlain: value.kind !== \"Instant\"\n\t};\n}\n","import {\n registerTemporalDateTimeNamespace,\n ToDateTimeFormattable,\n type TemporalDateTimeValue,\n} from '#packages/ecma402-abstract/DateTimeFormat/TemporalDateTime.js'\nimport {isTemporalDateTimeValue} from '#packages/ecma402-abstract/DateTimeFormat/HandleDateTimeValue.js'\nimport {\n legacyDateTimeProjection,\n legacyDateTimeOption,\n} from '#packages/temporal/locale.js'\nimport type {TemporalNamespace} from '#packages/temporal/index.js'\nimport {\n legacyDateTimeFormat,\n legacyDateTimeParts,\n legacyDateTimeRangeFormat,\n legacyDateTimeRangeParts,\n type LegacyDateTimeProjection as Projection,\n} from '#packages/temporal/legacy-extended-date.js'\n\nconst now = Date.now\n\nexport function installLegacyDateTimeFormat(\n namespace: TemporalNamespace\n): void {\n const Native = globalThis.Intl?.DateTimeFormat as\n | (Intl.DateTimeFormatConstructor & {__formatTemporal?: unknown})\n | undefined\n if (!Native || Native.__formatTemporal) return\n registerTemporalDateTimeNamespace(namespace)\n const nativeFormat = Object.getOwnPropertyDescriptor(\n Native.prototype,\n 'format'\n )!.get!\n const nativeParts = Native.prototype.formatToParts\n const nativeRange = Native.prototype.formatRange\n const nativeRangeParts = Native.prototype.formatRangeToParts\n const nativeResolved = Native.prototype.resolvedOptions\n const intrinsics = {\n resolvedOptions: nativeResolved,\n formatToParts: nativeParts,\n }\n interface State {\n formatter: Intl.DateTimeFormat\n locale: string\n calendar: string\n options: Record<string, unknown>\n bound?: (value?: unknown) => string\n projections: Map<string, Intl.DateTimeFormat>\n }\n const states = new WeakMap<object, State>()\n // Native bound functions identify the formatter without rereading its legacy symbol.\n const boundStates = new WeakMap<Function, State>()\n const probe = Object.create(Native.prototype)\n const chained = Reflect.apply(Native, probe, [])\n const legacySymbol =\n chained === probe ? Object.getOwnPropertySymbols(probe)[0] : undefined\n const hasInstance = Function.prototype[Symbol.hasInstance]\n function project(state: State, value: TemporalDateTimeValue): Projection {\n if (value.kind === 'ZonedDateTime')\n throw new TypeError(\n 'Temporal.ZonedDateTime is not supported by DateTimeFormat'\n )\n if (\n value.calendar !== undefined &&\n value.calendar !== state.calendar &&\n (value.calendar !== 'iso8601' ||\n value.kind === 'PlainYearMonth' ||\n value.kind === 'PlainMonthDay')\n )\n throw new RangeError('Temporal calendar does not match DateTimeFormat')\n const cached = state.projections.get(value.kind)\n if (cached) {\n const ns = value.epochNanoseconds\n return {\n formatter: cached,\n plain: value.kind !== 'Instant',\n milliseconds: Number(\n ns / 1_000_000n - (ns < 0n && ns % 1_000_000n ? 1n : 0n)\n ),\n }\n }\n const result = legacyDateTimeProjection(\n Native!,\n value,\n state.locale,\n state.options,\n false,\n intrinsics\n )\n state.projections.set(value.kind, result.formatter)\n return result\n }\n function single(state: State, input: unknown): Projection | undefined {\n if (input === undefined)\n return state.calendar !== 'gregory' && state.calendar !== 'iso8601'\n ? {formatter: state.formatter, milliseconds: now()}\n : undefined\n const value = ToDateTimeFormattable(input)\n return isTemporalDateTimeValue(value)\n ? project(state, value)\n : {formatter: state.formatter, milliseconds: value.toNumber()}\n }\n function range(\n state: State,\n start: unknown,\n end: unknown\n ): [Projection, Projection] {\n if (start === undefined || end === undefined)\n throw new TypeError('DateTimeFormat range requires two values')\n const first = ToDateTimeFormattable(start)\n const last = ToDateTimeFormattable(end)\n const firstTemporal = isTemporalDateTimeValue(first)\n const lastTemporal = isTemporalDateTimeValue(last)\n if (!firstTemporal && !lastTemporal)\n return [\n {formatter: state.formatter, milliseconds: first.toNumber()},\n {formatter: state.formatter, milliseconds: last.toNumber()},\n ]\n if (!firstTemporal || !lastTemporal || first.kind !== last.kind)\n throw new TypeError(\n 'DateTimeFormat range requires matching Temporal types'\n )\n return [project(state, first), project(state, last)]\n }\n function create(\n locales: unknown,\n options: unknown,\n newTarget: Function\n ): Intl.DateTimeFormat {\n let source: Record<string, unknown> | undefined\n const snapshot: Record<string, unknown> = Object.create(null)\n const tracked = new Proxy(Object.create(null), {\n get(_target, key) {\n if (!source) {\n if (options === null) throw new TypeError('Invalid options')\n source = options === undefined ? Object.create(null) : Object(options)\n }\n const raw = Reflect.get(source!, key)\n if (typeof key !== 'string' || raw === undefined) return raw\n const value = legacyDateTimeOption(key, raw)\n snapshot[key] = value\n return value\n },\n })\n const formatter = Reflect.construct(\n Native!,\n [locales, tracked],\n newTarget\n ) as Intl.DateTimeFormat\n const resolved = nativeResolved.call(formatter)\n const state: State = {\n formatter,\n locale: resolved.locale,\n calendar: resolved.calendar,\n options: snapshot,\n projections: new Map(),\n }\n states.set(formatter, state)\n boundStates.set(nativeFormat.call(formatter), state)\n return formatter\n }\n class LegacyDateTimeFormat {\n get format(): (value?: unknown) => string {\n const bound = nativeFormat.call(this)\n const state = boundStates.get(bound)\n if (!state) return bound\n if (!state.bound) {\n state.bound = (input?: unknown): string => {\n const value = single(state, input)\n return value\n ? legacyDateTimeFormat(\n value,\n nativeFormat,\n nativeParts,\n nativeResolved\n )\n : nativeFormat.call(state.formatter)()\n }\n Object.defineProperty(state.bound, 'name', {value: ''})\n }\n return state.bound\n }\n formatToParts(input?: unknown): Intl.DateTimeFormatPart[] {\n const state = states.get(this)\n if (!state) return Reflect.apply(nativeParts, this, [input])\n const value = single(state, input)\n return value\n ? legacyDateTimeParts(value, nativeParts, nativeResolved)\n : nativeParts.call(state.formatter)\n }\n formatRange(start: unknown, end: unknown): string {\n const state = states.get(this)\n if (!state) return Reflect.apply(nativeRange, this, [start, end])\n const [first, last] = range(state, start, end)\n return legacyDateTimeRangeFormat(\n first,\n last,\n nativeRange,\n nativeRangeParts,\n nativeResolved\n )\n }\n formatRangeToParts(\n start: unknown,\n end: unknown\n ): Intl.DateTimeRangeFormatPart[] {\n const state = states.get(this)\n if (!state) return Reflect.apply(nativeRangeParts, this, [start, end])\n const [first, last] = range(state, start, end)\n return legacyDateTimeRangeParts(\n first,\n last,\n nativeRangeParts,\n nativeResolved\n )\n }\n resolvedOptions(): Intl.ResolvedDateTimeFormatOptions {\n return Reflect.apply(nativeResolved, this, [])\n }\n }\n function DateTimeFormat(\n this: unknown,\n locales: unknown = undefined,\n options: unknown = undefined\n ): Intl.DateTimeFormat {\n const formatter = create(locales, options, new.target || DateTimeFormat)\n if (!new.target && legacySymbol && hasInstance.call(Native, this)) {\n Object.defineProperty(this, legacySymbol, {\n value: formatter,\n writable: false,\n enumerable: false,\n configurable: false,\n })\n return this as Intl.DateTimeFormat\n }\n return formatter\n }\n Object.defineProperties(DateTimeFormat, {\n ...Object.getOwnPropertyDescriptors(Native),\n __addTemporalNamespace: {value: registerTemporalDateTimeNamespace},\n __formatTemporal: {\n value(\n value: TemporalDateTimeValue,\n locales?: unknown,\n options?: unknown,\n localNanoseconds?: () => bigint\n ): string {\n const result = legacyDateTimeProjection(\n Native!,\n value,\n locales,\n options,\n true,\n intrinsics,\n localNanoseconds\n )\n return legacyDateTimeFormat(\n result,\n nativeFormat,\n nativeParts,\n nativeResolved\n )\n },\n },\n })\n const descriptors: Record<PropertyKey, PropertyDescriptor> =\n Object.getOwnPropertyDescriptors(LegacyDateTimeFormat.prototype)\n if (!nativeRange) delete descriptors.formatRange\n if (!nativeRangeParts) delete descriptors.formatRangeToParts\n Object.defineProperties(Native.prototype, {\n ...descriptors,\n constructor: {value: DateTimeFormat, writable: true, configurable: true},\n [Symbol.toStringTag]: {value: 'Intl.DateTimeFormat', configurable: true},\n })\n globalThis.Intl.DateTimeFormat =\n DateTimeFormat as unknown as Intl.DateTimeFormatConstructor\n}\n","export const TABLE_1 = [\n\t\"years\",\n\t\"months\",\n\t\"weeks\",\n\t\"days\",\n\t\"hours\",\n\t\"minutes\",\n\t\"seconds\",\n\t\"milliseconds\",\n\t\"microseconds\",\n\t\"nanoseconds\"\n];\n","import { TABLE_1 } from \"#packages/ecma402-abstract/DurationFormat/constants.js\";\nimport \"#packages/ecma402-abstract/types/duration.js\";\nexport function DurationRecordSign(record) {\n\tfor (const key of TABLE_1) {\n\t\tif (record[key] < 0) {\n\t\t\treturn -1;\n\t\t}\n\t\tif (record[key] > 0) {\n\t\t\treturn 1;\n\t\t}\n\t}\n\treturn 0;\n}\n","import { TABLE_1 } from \"#packages/ecma402-abstract/DurationFormat/constants.js\";\nimport \"#packages/ecma402-abstract/types/duration.js\";\nimport { DurationRecordSign } from \"#packages/ecma402-abstract/DurationFormat/DurationRecordSign.js\";\nexport function IsValidDurationRecord(record) {\n\tconst sign = DurationRecordSign(record);\n\tfor (const key of TABLE_1) {\n\t\tconst v = record[key];\n\t\tif (!Number.isFinite(v)) return false;\n\t\tif (v < 0 && sign > 0) {\n\t\t\treturn false;\n\t\t}\n\t\tif (v > 0 && sign < 0) {\n\t\t\treturn false;\n\t\t}\n\t}\n\t// IsValidDuration bounds calendar units and exact normalized seconds.\n\t// ECMA-402 §13.5.5 IsValidDuration, steps 3–8.\n\t// https://tc39.es/ecma402/#sec-isvalidduration\n\t// https://github.com/tc39/ecma402/blob/b1c961988b9a07894b1dc3dc2b5626ea48387d61/spec/durationformat.html#L569-L574\n\tif ([\n\t\t\"years\",\n\t\t\"months\",\n\t\t\"weeks\"\n\t].some((unit) => Math.abs(record[unit]) >= 2 ** 32)) {\n\t\treturn false;\n\t}\n\t// Scaling integral Number values with BigInt avoids rounding at 2**53 seconds.\n\tconst billion = BigInt(1e9);\n\tconst normalizedNanoseconds = BigInt(record.days) * BigInt(86400) * billion + BigInt(record.hours) * BigInt(3600) * billion + BigInt(record.minutes) * BigInt(60) * billion + BigInt(record.seconds) * billion + BigInt(record.milliseconds) * BigInt(1e6) + BigInt(record.microseconds) * BigInt(1e3) + BigInt(record.nanoseconds);\n\tconst limit = BigInt(2 ** 53) * billion;\n\treturn normalizedNanoseconds > -limit && normalizedNanoseconds < limit;\n}\n","// packages/fast-memoize/index.ts\nfunction memoize(fn, options) {\n\tconst cache = options && options.cache ? options.cache : cacheDefault;\n\tconst serializer = options && options.serializer ? options.serializer : serializerDefault;\n\treturn (options && options.strategy ? options.strategy : strategyDefault)(fn, {\n\t\tcache,\n\t\tserializer\n\t});\n}\nfunction isPrimitive(value) {\n\treturn value == null || typeof value === \"number\" || typeof value === \"boolean\";\n}\nfunction monadic(fn, cache, serializer, arg) {\n\tconst cacheKey = isPrimitive(arg) ? arg : serializer(arg);\n\tlet computedValue = cache.get(cacheKey);\n\tif (typeof computedValue === \"undefined\") {\n\t\tcomputedValue = fn.call(this, arg);\n\t\tcache.set(cacheKey, computedValue);\n\t}\n\treturn computedValue;\n}\nfunction variadic(fn, cache, serializer) {\n\tconst args = Array.prototype.slice.call(arguments, 3);\n\tconst cacheKey = serializer(args);\n\tlet computedValue = cache.get(cacheKey);\n\tif (typeof computedValue === \"undefined\") {\n\t\tcomputedValue = fn.apply(this, args);\n\t\tcache.set(cacheKey, computedValue);\n\t}\n\treturn computedValue;\n}\nfunction assemble(fn, context, strategy, cache, serialize) {\n\treturn strategy.bind(context, fn, cache, serialize);\n}\nfunction strategyDefault(fn, options) {\n\tconst strategy = fn.length === 1 ? monadic : variadic;\n\treturn assemble(fn, this, strategy, options.cache.create(), options.serializer);\n}\nfunction strategyVariadic(fn, options) {\n\treturn assemble(fn, this, variadic, options.cache.create(), options.serializer);\n}\nfunction strategyMonadic(fn, options) {\n\treturn assemble(fn, this, monadic, options.cache.create(), options.serializer);\n}\nconst serializerDefault = function() {\n\treturn JSON.stringify(arguments);\n};\nvar ObjectWithoutPrototypeCache = class {\n\tconstructor() {\n\t\tthis.cache = Object.create(null);\n\t}\n\tget(key) {\n\t\treturn this.cache[key];\n\t}\n\tset(key, value) {\n\t\tthis.cache[key] = value;\n\t}\n};\nconst cacheDefault = { create: function create() {\n\treturn new ObjectWithoutPrototypeCache();\n} };\nconst strategies = {\n\tvariadic: strategyVariadic,\n\tmonadic: strategyMonadic\n};\nexport { memoize, strategies };\n\n//# sourceMappingURL=index.js.map","import { memoize, strategies } from \"@formatjs/fast-memoize\";\nexport function repeat(s, times) {\n\tif (typeof s.repeat === \"function\") {\n\t\treturn s.repeat(times);\n\t}\n\tconst arr = Array.from({ length: times });\n\tfor (let i = 0; i < arr.length; i++) {\n\t\tarr[i] = s;\n\t}\n\treturn arr.join(\"\");\n}\nexport function setInternalSlot(map, pl, field, value) {\n\tif (!map.get(pl)) {\n\t\tmap.set(pl, Object.create(null));\n\t}\n\tconst slots = map.get(pl);\n\tslots[field] = value;\n}\nexport function getInternalSlot(map, pl, field) {\n\treturn getMultiInternalSlots(map, pl, field)[field];\n}\nexport function getMultiInternalSlots(map, pl, ...fields) {\n\tconst slots = map.get(pl);\n\tif (!slots) {\n\t\tthrow new TypeError(`${pl} InternalSlot has not been initialized`);\n\t}\n\treturn fields.reduce((all, f) => {\n\t\tall[f] = slots[f];\n\t\treturn all;\n\t}, Object.create(null));\n}\nexport function isLiteralPart(patternPart) {\n\treturn patternPart.type === \"literal\";\n}\n/*\n17 ECMAScript Standard Built-in Objects:\nEvery built-in Function object, including constructors, that is not\nidentified as an anonymous function has a name property whose value\nis a String.\n\nUnless otherwise specified, the name property of a built-in Function\nobject, if it exists, has the attributes { [[Writable]]: false,\n[[Enumerable]]: false, [[Configurable]]: true }.\n*/\nexport function defineProperty(target, name, { value }) {\n\tObject.defineProperty(target, name, {\n\t\tconfigurable: true,\n\t\tenumerable: false,\n\t\twritable: true,\n\t\tvalue\n\t});\n}\nexport function ensureIntl() {\n\tif (typeof Intl === \"undefined\") {\n\t\tObject.defineProperty(globalThis, \"Intl\", {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\twritable: true,\n\t\t\tvalue: {}\n\t\t});\n\t}\n\treturn Intl;\n}\n/**\n* 7.3.5 CreateDataProperty\n* @param target\n* @param name\n* @param value\n*/\nexport function createDataProperty(target, name, value) {\n\tObject.defineProperty(target, name, {\n\t\tconfigurable: true,\n\t\tenumerable: true,\n\t\twritable: true,\n\t\tvalue\n\t});\n}\nexport function invariant(condition, message, Err = Error) {\n\tif (!condition) {\n\t\tthrow new Err(message);\n\t}\n}\nexport const createMemoizedNumberFormat = memoize((...args) => new Intl.NumberFormat(...args), { strategy: strategies.variadic });\nexport const createMemoizedPluralRules = memoize((...args) => new Intl.PluralRules(...args), { strategy: strategies.variadic });\nexport const createMemoizedListFormat = memoize((...args) => new Intl.ListFormat(...args), { strategy: strategies.variadic });\n","import { ToNumber } from \"#packages/ecma262-abstract/ToNumber.js\";\nimport { invariant } from \"#packages/ecma402-abstract/utils.js\";\nexport function ToIntegerIfIntegral(arg) {\n\tconst number = ToNumber(arg);\n\t// Nonintegral Number values require RangeError, without coercing arg again.\n\t// ECMA-402 §13.5.2 ToIntegerIfIntegral, steps 1–2.\n\t// https://tc39.es/ecma402/#sec-tointegerifintegral\n\t// https://github.com/tc39/ecma402/blob/b1c961988b9a07894b1dc3dc2b5626ea48387d61/spec/durationformat.html#L473-L474\n\tinvariant(number.isInteger(), \"Duration field is not an integer\", RangeError);\n\t// Step 3 returns a mathematical value: input -0 becomes unsigned zero.\n\t// https://github.com/tc39/ecma402/blob/b1c961988b9a07894b1dc3dc2b5626ea48387d61/spec/durationformat.html#L475\n\treturn number.isZero() ? 0 : number.toNumber();\n}\n","import \"#packages/ecma402-abstract/types/duration.js\";\nimport { IsValidDurationRecord } from \"#packages/ecma402-abstract/DurationFormat/IsValidDurationRecord.js\";\nimport { ToIntegerIfIntegral } from \"#packages/ecma402-abstract/DurationFormat/ToIntegerIfIntegral.js\";\nexport function ToDurationRecord(input) {\n\tif ((typeof input !== \"object\" || input === null) && typeof input !== \"function\") {\n\t\tif (typeof input === \"string\") {\n\t\t\tthrow new RangeError(\"Invalid duration format\");\n\t\t}\n\t\tthrow new TypeError(\"Invalid duration\");\n\t}\n\tconst result = {\n\t\tyears: 0,\n\t\tmonths: 0,\n\t\tweeks: 0,\n\t\tdays: 0,\n\t\thours: 0,\n\t\tminutes: 0,\n\t\tseconds: 0,\n\t\tmilliseconds: 0,\n\t\tmicroseconds: 0,\n\t\tnanoseconds: 0\n\t};\n\t// Read each field once, in ToDurationRecord's specified order.\n\t// ECMA-402 §13.5.3 ToDurationRecord, steps 3–24.a.\n\t// https://tc39.es/ecma402/#sec-todurationrecord\n\t// https://github.com/tc39/ecma402/blob/b1c961988b9a07894b1dc3dc2b5626ea48387d61/spec/durationformat.html#L495-L517\n\tlet anyDefined = false;\n\tfor (const field of [\n\t\t\"days\",\n\t\t\"hours\",\n\t\t\"microseconds\",\n\t\t\"milliseconds\",\n\t\t\"minutes\",\n\t\t\"months\",\n\t\t\"nanoseconds\",\n\t\t\"seconds\",\n\t\t\"weeks\",\n\t\t\"years\"\n\t]) {\n\t\tconst value = input[field];\n\t\tif (value !== undefined) {\n\t\t\tanyDefined = true;\n\t\t\tresult[field] = ToIntegerIfIntegral(value);\n\t\t}\n\t}\n\tif (!anyDefined) {\n\t\tthrow new TypeError(\"Invalid duration format\");\n\t}\n\tif (!IsValidDurationRecord(result)) {\n\t\tthrow new RangeError(\"Invalid duration format\");\n\t}\n\treturn result;\n}\n","import { ToDurationRecord } from \"#packages/ecma402-abstract/DurationFormat/ToDurationRecord.js\";\nconst fields = [\n\t\"years\",\n\t\"months\",\n\t\"weeks\",\n\t\"days\",\n\t\"hours\",\n\t\"minutes\",\n\t\"seconds\",\n\t\"milliseconds\",\n\t\"microseconds\",\n\t\"nanoseconds\"\n];\nconst apply = Reflect.apply;\nconst readers = [];\nexport function registerTemporalDurationNamespace(namespace) {\n\tconst constructor = namespace?.Duration;\n\tif (!constructor || readers.some((reader) => reader.constructor === constructor)) return;\n\tconst from = constructor.from, prototype = constructor.prototype;\n\tif (typeof from !== \"function\" || prototype === null || typeof prototype !== \"object\" && typeof prototype !== \"function\") return;\n\tconst getters = fields.map((field) => Object.getOwnPropertyDescriptor(prototype, field)?.get);\n\tif (getters.some((getter) => typeof getter !== \"function\")) return;\n\treaders.push({\n\t\tconstructor,\n\t\tfrom,\n\t\tgetters\n\t});\n}\nconst temporal = globalThis.Temporal;\nif (temporal) registerTemporalDurationNamespace(temporal);\n// https://tc39.es/proposal-temporal/#sec-Intl.DurationFormat.prototype.format\nexport function ToTemporalDurationRecord(input) {\n\tif (typeof input === \"string\" && readers.length) {\n\t\tconst reader = readers[readers.length - 1];\n\t\tinput = apply(reader.from, reader.constructor, [input]);\n\t}\n\tif (input !== null && (typeof input === \"object\" || typeof input === \"function\")) {\n\t\tfor (const reader of readers) {\n\t\t\tlet years;\n\t\t\ttry {\n\t\t\t\tyears = apply(reader.getters[0], input, []);\n\t\t\t} catch {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst record = Object.create(null);\n\t\t\trecord.years = years;\n\t\t\tfor (let index = 1; index < fields.length; index++) record[fields[index]] = apply(reader.getters[index], input, []);\n\t\t\treturn record;\n\t\t}\n\t}\n\treturn ToDurationRecord(input);\n}\n","import {\n registerTemporalDurationNamespace,\n ToTemporalDurationRecord,\n type TemporalDurationNamespace,\n} from '#packages/ecma402-abstract/DurationFormat/ToTemporalDurationRecord.js'\nimport type {DurationInput} from '#packages/ecma402-abstract/types/duration.js'\n\nexport function installLegacyDurationFormat(\n namespace: TemporalDurationNamespace\n): void {\n const Native = (\n globalThis.Intl as\n | (typeof Intl & {\n DurationFormat?: {\n prototype: {\n resolvedOptions: (this: unknown) => unknown\n format: (this: unknown, duration: unknown) => string\n formatToParts: (this: unknown, duration: unknown) => unknown\n }\n __addTemporalNamespace?: (\n namespace: TemporalDurationNamespace\n ) => void\n }\n })\n | undefined\n )?.DurationFormat\n if (!Native || Native.__addTemporalNamespace) return\n registerTemporalDurationNamespace(namespace)\n const prototype = Native.prototype,\n resolved = prototype.resolvedOptions,\n apply = Reflect.apply\n for (const method of ['format', 'formatToParts'] as const) {\n const original = prototype[method],\n descriptor = Object.getOwnPropertyDescriptor(prototype, method)!\n const wrapper = {\n [method](this: unknown, duration: DurationInput | string): unknown {\n apply(resolved, this, [])\n return apply(original, this, [ToTemporalDurationRecord(duration)])\n },\n }[method]\n Object.defineProperty(prototype, method, {...descriptor, value: wrapper})\n }\n Object.defineProperty(Native, '__addTemporalNamespace', {\n value: registerTemporalDurationNamespace,\n writable: true,\n configurable: true,\n })\n}\n","import {configureLocaleFormatting} from '#packages/temporal/locale.js'\nimport {\n Temporal,\n toTemporalInstant,\n type TemporalNamespace,\n} from '#packages/temporal/index.js'\nimport {createDateToTemporalInstant} from '#packages/temporal/date-bridge.js'\nimport {needsTemporal} from '#packages/temporal/detect.js'\nimport {installLegacyDateTimeFormat} from '#packages/temporal/legacy-intl.js'\nimport {installLegacyDurationFormat} from '#packages/temporal/legacy-durationformat.js'\n\nexport function installTemporal(force = false): void {\n const target = globalThis as typeof globalThis & {\n Temporal: TemporalNamespace\n },\n date = Date.prototype as Date & {toTemporalInstant?: () => unknown},\n replace = force || needsTemporal()\n if (replace)\n Object.defineProperty(target, 'Temporal', {\n value: Temporal,\n writable: true,\n configurable: true,\n enumerable: false,\n })\n if (replace || target.Temporal === Temporal) {\n installLegacyDateTimeFormat(target.Temporal)\n installLegacyDurationFormat(target.Temporal)\n }\n const Formatter = globalThis.Intl?.DateTimeFormat as\n | (typeof Intl.DateTimeFormat & {\n __addTemporalNamespace?: (namespace: TemporalNamespace) => void\n })\n | undefined\n Formatter?.__addTemporalNamespace?.(target.Temporal)\n const DurationFormatter = (\n globalThis.Intl as\n | (typeof Intl & {\n DurationFormat?: {\n __addTemporalNamespace?: (namespace: TemporalNamespace) => void\n }\n })\n | undefined\n )?.DurationFormat\n DurationFormatter?.__addTemporalNamespace?.(target.Temporal)\n configureLocaleFormatting()\n if (replace || typeof date.toTemporalInstant !== 'function') {\n const Constructor = target.Temporal.Instant\n Object.defineProperty(date, 'toTemporalInstant', {\n value:\n target.Temporal === Temporal\n ? toTemporalInstant\n : createDateToTemporalInstant(ns => new Constructor(ns)),\n enumerable: false,\n writable: true,\n configurable: true,\n })\n }\n}\n","import {installTemporal} from '#packages/temporal/install.js'\ninstallTemporal(true)\n"],"ignoreList":[4,6,7,20,29],"mappings":";;;;;AAGA,SAAgB,SAAS,GAAG;CAC3B,IAAI,OAAO,MAAM,UAChB,MAAM,UAAU,2CAA2C;CAE5D,OAAO,OAAO,CAAC;AAChB;ACkBgB,OAAO,UAAU;AAEd,OAAO,UAAU;;AC5BpC,MAAM,aAAa;AAInB,SAAgB,IAAI,GAAG;CACtB,OAAO,KAAK,MAAM,IAAI,UAAU;AACjC;AAIA,SAAgB,YAAY,GAAG;CAK9B,OAAO,OAAO,IAAI,QAAQ,KAAK,OAAO,IAAI,QAAQ,CAAC,IAAI,KAAK,OAAO,IAAI,QAAQ,GAAG,IAAI,KAAK,OAAO,IAAI,QAAQ,GAAG;AAClH;AACA,SAAgB,aAAa,GAAG;CAK/B,IAAI,CAAC,OAAO,SAAS,CAAC,GAAG,OAAO;CAChC,MAAM,MAAM,IAAI,CAAC;CACjB,IAAI,OAAO,OAAO,KAAK,MAAM,MAAM,QAAQ;CAC3C,OAAO,YAAY,IAAI,IAAI,KAAK;CAChC,OAAO,YAAY,OAAO,CAAC,KAAK,KAAK;CACrC,OAAO;AACR;AACA,SAAgB,WAAW,GAAG;CAC7B,IAAI,IAAI,MAAM,GAAG,OAAO;CACxB,IAAI,IAAI,QAAQ,GAA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;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,OAAO;EACN;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,MAAM;EACL;EACA;EACA;CACD;CACA,YAAY;EACX;EACA;EACA;CACD;CACA,WA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AAC,SAC/C;EACA,MAAM,QAAQ,YAAY,OAAO,SAAS,CAAC;EAC3C,IAAI,QAAQ,IACV,QAAQ,SAAS,OAAO,MAAM,UAAU,GAAG,IAAI,MAAM,MAAM,GAAG,CAAC;EACjE,IAAI,MAAM,UAAU,GAAG,KAAK,MAAM,OAAO,GAAG,KAAK,CAAC,SAAS;GACzD,UAAU;GACV,OAAO;EACT,OAAO;GACL;GACA,SAAS;EACX;EACA,OAAO;EACP,YAAY;CACd;CACA,MAAM,WAAW,YAAY,WAAW,IAAI,IAC1C,SAAS,CAAC,WAAW,OAAQ,UAAU,OAAO,WAAW,MAAM,IAAK,GAAG,CAAC,GACxE,QAAQ,OAAO,KAAK;CACtB,KAAK,IAAI,QAAQ,GAAG,QAAQ,OAAO,SACjC,OAAO,KAAK,OAAO,SAAS,QAAQ,MAAM;CAC5C,OAAO;EAAC,QAAQ,OAAO,MAAM,GAAG,KAAK;EAAG,KAAK,OAAO;EAAQ;CAAI;AAClE;;ACzFA,MAAaC,WAAS,CAAC;CACtB,WAAW;CACX,UAAU;CACV,OAAO;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;AACD,CAAC;;AChND,MAAaC,WAAS,CAAC;CACtB,WAAW;CACX,UAAU;CACV,OAAO;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;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