@formatjs/intl-pluralrules 6.3.1 → 6.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +113 -65
- package/index.js +965 -64
- package/index.js.map +1 -0
- package/package.json +5 -6
- package/polyfill-force.d.ts +1 -1
- package/polyfill-force.js +1125 -2
- package/polyfill-force.js.map +1 -0
- package/polyfill.d.ts +1 -1
- package/polyfill.iife.js +5305 -5845
- package/polyfill.js +1354 -3
- package/polyfill.js.map +1 -0
- package/should-polyfill.d.ts +5 -1
- package/should-polyfill.js +227 -8
- package/should-polyfill.js.map +1 -0
- package/abstract/GetOperands.d.ts +0 -59
- package/abstract/GetOperands.js +0 -50
- package/abstract/InitializePluralRules.d.ts +0 -8
- package/abstract/InitializePluralRules.js +0 -31
- package/abstract/ResolvePlural.d.ts +0 -43
- package/abstract/ResolvePlural.js +0 -75
- package/abstract/ResolvePluralRange.d.ts +0 -23
- package/abstract/ResolvePluralRange.js +0 -59
- package/get_internal_slots.d.ts +0 -3
- package/get_internal_slots.js +0 -10
- package/supported-locales.generated.d.ts +0 -1
- package/supported-locales.generated.js +0 -217
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"polyfill-force.js","names":["invariant","Decimal","invariant","Decimal","Decimal","ZERO","ZERO","ZERO","Decimal","ZERO"],"sources":["../../ecma402-abstract/CanonicalizeLocaleList.js","../../ecma262-abstract/ToObject.js","../../ecma262-abstract/ToString.js","../../ecma402-abstract/GetOption.js","../../ecma402-abstract/SupportedLocales.js","../../ecma262-abstract/ToPrimitive.js","../../ecma402-abstract/ToIntlMathematicalValue.js","../../ecma402-abstract/CoerceOptionsToObject.js","../../ecma402-abstract/DefaultNumberOption.js","../../ecma402-abstract/GetNumberOption.js","../../../node_modules/.aspect_rules_js/@formatjs+fast-memoize@0.0.0/node_modules/@formatjs/fast-memoize/index.js","../../ecma402-abstract/utils.js","../../ecma402-abstract/NumberFormat/SetNumberFormatDigitOptions.js","../../ecma402-abstract/PluralRules/InitializePluralRules.js","../../ecma262-abstract/Type.js","../../ecma402-abstract/NumberFormat/decimal-cache.js","../../ecma402-abstract/NumberFormat/ComputeExponentForMagnitude.js","../../ecma402-abstract/constants.js","../../ecma402-abstract/NumberFormat/GetUnsignedRoundingMode.js","../../ecma402-abstract/NumberFormat/ApplyUnsignedRoundingMode.js","../../ecma402-abstract/NumberFormat/ToRawFixed.js","../../ecma402-abstract/NumberFormat/ToRawPrecision.js","../../ecma402-abstract/NumberFormat/FormatNumericToString.js","../../ecma262-abstract/ToNumber.js","../../ecma402-abstract/PluralRules/GetOperands.js","../../ecma402-abstract/PluralRules/ResolvePlural.js","../../ecma402-abstract/PluralRules/ResolvePluralRange.js","../get_internal_slots.ts","../index.ts","../polyfill-force.ts"],"sourcesContent":["/**\n* http://ecma-international.org/ecma-402/7.0/index.html#sec-canonicalizelocalelist\n* @param locales\n*/\nexport function CanonicalizeLocaleList(locales) {\n\t// TODO\n\treturn Intl.getCanonicalLocales(locales);\n}\n","/**\n* https://tc39.es/ecma262/#sec-toobject\n*/\nexport function ToObject(arg) {\n\tif (arg == null) {\n\t\tthrow new TypeError(\"undefined/null cannot be converted to object\");\n\t}\n\treturn Object(arg);\n}\n","/**\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 { ToString } from \"#packages/ecma262-abstract/ToString.js\";\n/**\n* https://tc39.es/ecma402/#sec-getoption\n* @param opts\n* @param prop\n* @param type\n* @param values\n* @param fallback\n*/\nexport function GetOption(opts, prop, type, values, fallback) {\n\tif (typeof opts !== \"object\") {\n\t\tthrow new TypeError(\"Options must be an object\");\n\t}\n\tlet value = opts[prop];\n\tif (value !== undefined) {\n\t\tif (type !== \"boolean\" && type !== \"string\") {\n\t\t\tthrow new TypeError(\"invalid type\");\n\t\t}\n\t\tif (type === \"boolean\") {\n\t\t\tvalue = Boolean(value);\n\t\t}\n\t\tif (type === \"string\") {\n\t\t\tvalue = ToString(value);\n\t\t}\n\t\tif (values !== undefined && !values.filter((val) => val == value).length) {\n\t\t\tthrow new RangeError(`${value} is not within ${values.join(\", \")}`);\n\t\t}\n\t\treturn value;\n\t}\n\treturn fallback;\n}\n","import { LookupSupportedLocales } from \"@formatjs/intl-localematcher\";\nimport { ToObject } from \"#packages/ecma262-abstract/ToObject.js\";\nimport { GetOption } from \"#packages/ecma402-abstract/GetOption.js\";\n/**\n* https://tc39.es/ecma402/#sec-supportedlocales\n* @param availableLocales\n* @param requestedLocales\n* @param options\n*/\nexport function SupportedLocales(availableLocales, requestedLocales, options) {\n\tlet matcher = \"best fit\";\n\tif (options !== undefined) {\n\t\toptions = ToObject(options);\n\t\tmatcher = GetOption(options, \"localeMatcher\", \"string\", [\"lookup\", \"best fit\"], \"best fit\");\n\t}\n\tif (matcher === \"best fit\") {\n\t\treturn LookupSupportedLocales(Array.from(availableLocales), requestedLocales);\n\t}\n\treturn LookupSupportedLocales(Array.from(availableLocales), requestedLocales);\n}\n","function invariant(condition, message, Err = Error) {\n\tif (!condition) {\n\t\tthrow new Err(message);\n\t}\n}\nfunction IsCallable(fn) {\n\treturn typeof fn === \"function\";\n}\nfunction OrdinaryToPrimitive(O, hint) {\n\tlet methodNames;\n\tif (hint === \"string\") {\n\t\tmethodNames = [\"toString\", \"valueOf\"];\n\t} else {\n\t\tmethodNames = [\"valueOf\", \"toString\"];\n\t}\n\tfor (const name of methodNames) {\n\t\tconst method = O[name];\n\t\tif (IsCallable(method)) {\n\t\t\tlet result = method.call(O);\n\t\t\tif (typeof result !== \"object\") {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\tthrow new TypeError(\"Cannot convert object to primitive value\");\n}\n/**\n* https://tc39.es/ecma262/#sec-toprimitive\n*/\nexport function ToPrimitive(input, preferredType) {\n\tif (typeof input === \"object\" && input != null) {\n\t\tconst exoticToPrim = Symbol.toPrimitive in input ? input[Symbol.toPrimitive] : undefined;\n\t\tlet hint;\n\t\tif (exoticToPrim !== undefined) {\n\t\t\tif (preferredType === undefined) {\n\t\t\t\thint = \"default\";\n\t\t\t} else if (preferredType === \"string\") {\n\t\t\t\thint = \"string\";\n\t\t\t} else {\n\t\t\t\tinvariant(preferredType === \"number\", \"preferredType must be \\\"string\\\" or \\\"number\\\"\");\n\t\t\t\thint = \"number\";\n\t\t\t}\n\t\t\tlet result = exoticToPrim.call(input, hint);\n\t\t\tif (typeof result !== \"object\") {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tthrow new TypeError(\"Cannot convert exotic object to primitive.\");\n\t\t}\n\t\tif (preferredType === undefined) {\n\t\t\tpreferredType = \"number\";\n\t\t}\n\t\treturn OrdinaryToPrimitive(input, preferredType);\n\t}\n\treturn input;\n}\n","import { Decimal } from \"@formatjs/bigdecimal\";\nimport { ToPrimitive } from \"#packages/ecma262-abstract/ToPrimitive.js\";\n/**\n* https://tc39.es/ecma402/#sec-tointlmathematicalvalue\n* Converts input to a mathematical value, supporting BigInt\n*/\nexport function ToIntlMathematicalValue(input) {\n\t// Handle BigInt directly before ToPrimitive, since ToPrimitive doesn't\n\t// handle bigint in its type signature (though the spec says it should return it as-is)\n\tif (typeof input === \"bigint\") {\n\t\treturn new Decimal(input.toString());\n\t}\n\tlet primValue = ToPrimitive(input, \"number\");\n\t// Handle other primitive types\n\tif (primValue === undefined) {\n\t\treturn new Decimal(NaN);\n\t}\n\tif (primValue === true) {\n\t\treturn new Decimal(1);\n\t}\n\tif (primValue === false) {\n\t\treturn new Decimal(0);\n\t}\n\tif (primValue === null) {\n\t\treturn new Decimal(0);\n\t}\n\t// Try to convert to Decimal (handles numbers and strings)\n\ttry {\n\t\treturn new Decimal(primValue);\n\t} catch {\n\t\treturn new Decimal(NaN);\n\t}\n}\n","import { ToObject } from \"#packages/ecma262-abstract/ToObject.js\";\n/**\n* https://tc39.es/ecma402/#sec-coerceoptionstoobject\n* @param options\n* @returns\n*/\nexport function CoerceOptionsToObject(options) {\n\tif (typeof options === \"undefined\") {\n\t\treturn Object.create(null);\n\t}\n\treturn ToObject(options);\n}\n","/**\n* https://tc39.es/ecma402/#sec-defaultnumberoption\n* @param val\n* @param min\n* @param max\n* @param fallback\n*/\nexport function DefaultNumberOption(inputVal, min, max, fallback) {\n\tif (inputVal === undefined) {\n\t\t// @ts-expect-error\n\t\treturn fallback;\n\t}\n\tconst val = Number(inputVal);\n\tif (isNaN(val) || val < min || val > max) {\n\t\tthrow new RangeError(`${val} is outside of range [${min}, ${max}]`);\n\t}\n\treturn Math.floor(val);\n}\n","/**\n* https://tc39.es/ecma402/#sec-getnumberoption\n* @param options\n* @param property\n* @param min\n* @param max\n* @param fallback\n*/\nimport { DefaultNumberOption } from \"#packages/ecma402-abstract/DefaultNumberOption.js\";\nexport function GetNumberOption(options, property, minimum, maximum, fallback) {\n\tconst val = options[property];\n\treturn DefaultNumberOption(val, minimum, maximum, fallback);\n}\n","//#region 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};\n//#endregion\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 setMultiInternalSlots(map, pl, props) {\n\tfor (const k of Object.keys(props)) {\n\t\tsetInternalSlot(map, pl, k, props[k]);\n\t}\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}\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 const UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi;\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 createMemoizedLocale = memoize((...args) => new Intl.Locale(...args), { strategy: strategies.variadic });\nexport const createMemoizedListFormat = memoize((...args) => new Intl.ListFormat(...args), { strategy: strategies.variadic });\n","import { DefaultNumberOption } from \"#packages/ecma402-abstract/DefaultNumberOption.js\";\nimport { GetNumberOption } from \"#packages/ecma402-abstract/GetNumberOption.js\";\nimport { GetOption } from \"#packages/ecma402-abstract/GetOption.js\";\nimport \"#packages/ecma402-abstract/types/number.js\";\nimport { invariant } from \"#packages/ecma402-abstract/utils.js\";\n//IMPL: Valid rounding increments as per implementation\nconst VALID_ROUNDING_INCREMENTS = new Set([\n\t1,\n\t2,\n\t5,\n\t10,\n\t20,\n\t25,\n\t50,\n\t100,\n\t200,\n\t250,\n\t500,\n\t1e3,\n\t2e3,\n\t2500,\n\t5e3\n]);\n/**\n* https://tc39.es/ecma402/#sec-setnfdigitoptions\n*/\nexport function SetNumberFormatDigitOptions(internalSlots, opts, mnfdDefault, mxfdDefault, notation) {\n\t// 1. Let mnid be ? GetNumberOption(opts, \"minimumIntegerDigits\", 1, 21, 1).\n\tconst mnid = GetNumberOption(opts, \"minimumIntegerDigits\", 1, 21, 1);\n\t// 2. Let mnfd be opts.[[MinimumFractionDigits]].\n\tlet mnfd = opts.minimumFractionDigits;\n\t// 3. Let mxfd be opts.[[MaximumFractionDigits]].\n\tlet mxfd = opts.maximumFractionDigits;\n\t// 4. Let mnsd be opts.[[MinimumSignificantDigits]].\n\tlet mnsd = opts.minimumSignificantDigits;\n\t// 5. Let mxsd be opts.[[MaximumSignificantDigits]].\n\tlet mxsd = opts.maximumSignificantDigits;\n\t// 6. Set internalSlots.[[MinimumIntegerDigits]] to mnid.\n\tinternalSlots.minimumIntegerDigits = mnid;\n\t// 7. Let roundingIncrement be ? GetNumberOption(opts, \"roundingIncrement\", 1, 5000, 1).\n\tconst roundingIncrement = GetNumberOption(opts, \"roundingIncrement\", 1, 5e3, 1);\n\t// 8. If roundingIncrement is not an element of the list {1, 2, 5, 10, 20, 25, 50, 100, 200, 250, 500, 1000, 2000, 2500, 5000}, throw a RangeError exception.\n\tinvariant(VALID_ROUNDING_INCREMENTS.has(roundingIncrement), `Invalid rounding increment value: ${roundingIncrement}.\nValid values are ${Array.from(VALID_ROUNDING_INCREMENTS).join(\", \")}.`);\n\t// 9. Let roundingMode be ? GetOption(opts, \"roundingMode\", \"string\", « \"ceil\", \"floor\", \"expand\", \"trunc\", \"halfCeil\", \"halfFloor\", \"halfExpand\", \"halfTrunc\", \"halfEven\" », \"halfExpand\").\n\tconst roundingMode = GetOption(opts, \"roundingMode\", \"string\", [\n\t\t\"ceil\",\n\t\t\"floor\",\n\t\t\"expand\",\n\t\t\"trunc\",\n\t\t\"halfCeil\",\n\t\t\"halfFloor\",\n\t\t\"halfExpand\",\n\t\t\"halfTrunc\",\n\t\t\"halfEven\"\n\t], \"halfExpand\");\n\t// 10. Let roundingPriority be ? GetOption(opts, \"roundingPriority\", \"string\", « \"auto\", \"morePrecision\", \"lessPrecision\" », \"auto\").\n\tconst roundingPriority = GetOption(opts, \"roundingPriority\", \"string\", [\n\t\t\"auto\",\n\t\t\"morePrecision\",\n\t\t\"lessPrecision\"\n\t], \"auto\");\n\t// 11. Let trailingZeroDisplay be ? GetOption(opts, \"trailingZeroDisplay\", \"string\", « \"auto\", \"stripIfInteger\" », \"auto\").\n\tconst trailingZeroDisplay = GetOption(opts, \"trailingZeroDisplay\", \"string\", [\"auto\", \"stripIfInteger\"], \"auto\");\n\t// 12. If roundingIncrement is not 1, then\n\tif (roundingIncrement !== 1) {\n\t\t// 12.a. Set mxfdDefault to mnfdDefault.\n\t\tmxfdDefault = mnfdDefault;\n\t}\n\t// 13. Set internalSlots.[[RoundingIncrement]] to roundingIncrement.\n\tinternalSlots.roundingIncrement = roundingIncrement;\n\t// 14. Set internalSlots.[[RoundingMode]] to roundingMode.\n\tinternalSlots.roundingMode = roundingMode;\n\t// 15. Set internalSlots.[[TrailingZeroDisplay]] to trailingZeroDisplay.\n\tinternalSlots.trailingZeroDisplay = trailingZeroDisplay;\n\t// 16. Let hasSd be true if mnsd is not undefined or mxsd is not undefined; otherwise, let hasSd be false.\n\tconst hasSd = mnsd !== undefined || mxsd !== undefined;\n\t// 17. Let hasFd be true if mnfd is not undefined or mxfd is not undefined; otherwise, let hasFd be false.\n\tconst hasFd = mnfd !== undefined || mxfd !== undefined;\n\t// 18. Let needSd be true.\n\tlet needSd = true;\n\t// 19. Let needFd be true.\n\tlet needFd = true;\n\t// 20. If roundingPriority is \"auto\", then\n\tif (roundingPriority === \"auto\") {\n\t\t// 20.a. Set needSd to hasSd.\n\t\tneedSd = hasSd;\n\t\t// 20.b. If hasSd is true or hasFd is false and notation is \"compact\", then\n\t\tif (hasSd || !hasFd && notation === \"compact\") {\n\t\t\t// 20.b.i. Set needFd to false.\n\t\t\tneedFd = false;\n\t\t}\n\t}\n\t// 21. If needSd is true, then\n\tif (needSd) {\n\t\t// 21.a. If hasSd is true, then\n\t\tif (hasSd) {\n\t\t\t// 21.a.i. Set internalSlots.[[MinimumSignificantDigits]] to ? DefaultNumberOption(mnsd, 1, 21, 1).\n\t\t\tinternalSlots.minimumSignificantDigits = DefaultNumberOption(mnsd, 1, 21, 1);\n\t\t\t// 21.a.ii. Set internalSlots.[[MaximumSignificantDigits]] to ? DefaultNumberOption(mxsd, internalSlots.[[MinimumSignificantDigits]], 21, 21).\n\t\t\tinternalSlots.maximumSignificantDigits = DefaultNumberOption(mxsd, internalSlots.minimumSignificantDigits, 21, 21);\n\t\t} else {\n\t\t\t// 21.b. Else,\n\t\t\t// 21.b.i. Set internalSlots.[[MinimumSignificantDigits]] to 1.\n\t\t\tinternalSlots.minimumSignificantDigits = 1;\n\t\t\t// 21.b.ii. Set internalSlots.[[MaximumSignificantDigits]] to 21.\n\t\t\tinternalSlots.maximumSignificantDigits = 21;\n\t\t}\n\t}\n\t// 22. If needFd is true, then\n\tif (needFd) {\n\t\t// 22.a. If hasFd is true, then\n\t\tif (hasFd) {\n\t\t\t// 22.a.i. Set mnfd to ? DefaultNumberOption(mnfd, 0, 100, undefined).\n\t\t\tmnfd = DefaultNumberOption(mnfd, 0, 100, undefined);\n\t\t\t// 22.a.ii. Set mxfd to ? DefaultNumberOption(mxfd, 0, 100, undefined).\n\t\t\tmxfd = DefaultNumberOption(mxfd, 0, 100, undefined);\n\t\t\t// 22.a.iii. If mnfd is undefined, then\n\t\t\tif (mnfd === undefined) {\n\t\t\t\t// 22.a.iii.1. Assert: mxfd is not undefined.\n\t\t\t\tinvariant(mxfd !== undefined, \"maximumFractionDigits must be defined\");\n\t\t\t\t// 22.a.iii.2. Set mnfd to min(mnfdDefault, mxfd).\n\t\t\t\tmnfd = Math.min(mnfdDefault, mxfd);\n\t\t\t} else if (mxfd === undefined) {\n\t\t\t\t// 22.a.iv. Else if mxfd is undefined, then\n\t\t\t\t// 22.a.iv.1. Set mxfd to max(mxfdDefault, mnfd).\n\t\t\t\tmxfd = Math.max(mxfdDefault, mnfd);\n\t\t\t} else if (mnfd > mxfd) {\n\t\t\t\t// 22.a.v. Else if mnfd > mxfd, throw a RangeError exception.\n\t\t\t\tthrow new RangeError(`Invalid range, ${mnfd} > ${mxfd}`);\n\t\t\t}\n\t\t\t// 22.a.vi. Set internalSlots.[[MinimumFractionDigits]] to mnfd.\n\t\t\tinternalSlots.minimumFractionDigits = mnfd;\n\t\t\t// 22.a.vii. Set internalSlots.[[MaximumFractionDigits]] to mxfd.\n\t\t\tinternalSlots.maximumFractionDigits = mxfd;\n\t\t} else {\n\t\t\t// 22.b. Else,\n\t\t\t// 22.b.i. Set internalSlots.[[MinimumFractionDigits]] to mnfdDefault.\n\t\t\tinternalSlots.minimumFractionDigits = mnfdDefault;\n\t\t\t// 22.b.ii. Set internalSlots.[[MaximumFractionDigits]] to mxfdDefault.\n\t\t\tinternalSlots.maximumFractionDigits = mxfdDefault;\n\t\t}\n\t}\n\t// 23. If needSd is false and needFd is false, then\n\tif (!needSd && !needFd) {\n\t\t// 23.a. Set internalSlots.[[MinimumFractionDigits]] to 0.\n\t\tinternalSlots.minimumFractionDigits = 0;\n\t\t// 23.b. Set internalSlots.[[MaximumFractionDigits]] to 0.\n\t\tinternalSlots.maximumFractionDigits = 0;\n\t\t// 23.c. Set internalSlots.[[MinimumSignificantDigits]] to 1.\n\t\tinternalSlots.minimumSignificantDigits = 1;\n\t\t// 23.d. Set internalSlots.[[MaximumSignificantDigits]] to 2.\n\t\tinternalSlots.maximumSignificantDigits = 2;\n\t\t// 23.e. Set internalSlots.[[RoundingType]] to \"morePrecision\".\n\t\tinternalSlots.roundingType = \"morePrecision\";\n\t\t// 23.f. Set internalSlots.[[RoundingPriority]] to \"morePrecision\".\n\t\tinternalSlots.roundingPriority = \"morePrecision\";\n\t} else if (roundingPriority === \"morePrecision\") {\n\t\t// 24. Else if roundingPriority is \"morePrecision\", then\n\t\t// 24.a. Set internalSlots.[[RoundingType]] to \"morePrecision\".\n\t\tinternalSlots.roundingType = \"morePrecision\";\n\t\t// 24.b. Set internalSlots.[[RoundingPriority]] to \"morePrecision\".\n\t\tinternalSlots.roundingPriority = \"morePrecision\";\n\t} else if (roundingPriority === \"lessPrecision\") {\n\t\t// 25. Else if roundingPriority is \"lessPrecision\", then\n\t\t// 25.a. Set internalSlots.[[RoundingType]] to \"lessPrecision\".\n\t\tinternalSlots.roundingType = \"lessPrecision\";\n\t\t// 25.b. Set internalSlots.[[RoundingPriority]] to \"lessPrecision\".\n\t\tinternalSlots.roundingPriority = \"lessPrecision\";\n\t} else if (hasSd) {\n\t\t// 26. Else if hasSd is true, then\n\t\t// 26.a. Set internalSlots.[[RoundingType]] to \"significantDigits\".\n\t\tinternalSlots.roundingType = \"significantDigits\";\n\t\t// 26.b. Set internalSlots.[[RoundingPriority]] to \"auto\".\n\t\tinternalSlots.roundingPriority = \"auto\";\n\t} else {\n\t\t// 27. Else,\n\t\t// 27.a. Set internalSlots.[[RoundingType]] to \"fractionDigits\".\n\t\tinternalSlots.roundingType = \"fractionDigits\";\n\t\t// 27.b. Set internalSlots.[[RoundingPriority]] to \"auto\".\n\t\tinternalSlots.roundingPriority = \"auto\";\n\t}\n\t// 28. If roundingIncrement is not 1, then\n\tif (roundingIncrement !== 1) {\n\t\t// 28.a. Assert: internalSlots.[[RoundingType]] is \"fractionDigits\".\n\t\tinvariant(internalSlots.roundingType === \"fractionDigits\", \"Invalid roundingType\", TypeError);\n\t\t// 28.b. Assert: internalSlots.[[MaximumFractionDigits]] is equal to internalSlots.[[MinimumFractionDigits]].\n\t\tinvariant(internalSlots.maximumFractionDigits === internalSlots.minimumFractionDigits, \"With roundingIncrement > 1, maximumFractionDigits and minimumFractionDigits must be equal.\", RangeError);\n\t}\n}\n","import { CanonicalizeLocaleList } from \"#packages/ecma402-abstract/CanonicalizeLocaleList.js\";\nimport { CoerceOptionsToObject } from \"#packages/ecma402-abstract/CoerceOptionsToObject.js\";\nimport { GetOption } from \"#packages/ecma402-abstract/GetOption.js\";\nimport { SetNumberFormatDigitOptions } from \"#packages/ecma402-abstract/NumberFormat/SetNumberFormatDigitOptions.js\";\nimport \"#packages/ecma402-abstract/types/plural-rules.js\";\nimport { ResolveLocale } from \"@formatjs/intl-localematcher\";\nexport function InitializePluralRules(pl, locales, options, { availableLocales, relevantExtensionKeys, localeData, getDefaultLocale, getInternalSlots }) {\n\tconst requestedLocales = CanonicalizeLocaleList(locales);\n\tconst opt = Object.create(null);\n\tconst opts = CoerceOptionsToObject(options);\n\tconst internalSlots = getInternalSlots(pl);\n\tinternalSlots.initializedPluralRules = true;\n\tconst matcher = GetOption(opts, \"localeMatcher\", \"string\", [\"best fit\", \"lookup\"], \"best fit\");\n\topt.localeMatcher = matcher;\n\tconst r = ResolveLocale(availableLocales, requestedLocales, opt, relevantExtensionKeys, localeData, getDefaultLocale);\n\tinternalSlots.locale = r.locale;\n\t// ECMA-402 Spec: type option ('cardinal' or 'ordinal')\n\tinternalSlots.type = GetOption(opts, \"type\", \"string\", [\"cardinal\", \"ordinal\"], \"cardinal\");\n\t// Extension: notation options for compact notation support\n\t// Not in ECMA-402 spec, but mirrors Intl.NumberFormat notation option\n\t// Enables proper plural selection for compact numbers (e.g., \"1.2M\")\n\tconst notation = GetOption(opts, \"notation\", \"string\", [\"standard\", \"compact\"], \"standard\");\n\tinternalSlots.notation = notation;\n\tif (notation === \"compact\") {\n\t\tinternalSlots.compactDisplay = GetOption(opts, \"compactDisplay\", \"string\", [\"short\", \"long\"], \"short\");\n\t\t// Implementation: Load NumberFormat locale data if available (soft dependency)\n\t\t// This is needed to calculate compact exponents using ComputeExponentForMagnitude\n\t\tif (typeof Intl !== \"undefined\" && Intl.NumberFormat && Intl.NumberFormat.localeData) {\n\t\t\tinternalSlots.dataLocaleData = Intl.NumberFormat.localeData[r.locale];\n\t\t}\n\t}\n\tSetNumberFormatDigitOptions(internalSlots, opts, 0, 3, \"standard\");\n\treturn pl;\n}\n","/**\n* https://www.ecma-international.org/ecma-262/11.0/index.html#sec-type\n*/\nexport function Type(x) {\n\tif (x === null) {\n\t\treturn \"Null\";\n\t}\n\tif (typeof x === \"undefined\") {\n\t\treturn \"Undefined\";\n\t}\n\tif (typeof x === \"function\" || typeof x === \"object\") {\n\t\treturn \"Object\";\n\t}\n\tif (typeof x === \"number\") {\n\t\treturn \"Number\";\n\t}\n\tif (typeof x === \"boolean\") {\n\t\treturn \"Boolean\";\n\t}\n\tif (typeof x === \"string\") {\n\t\treturn \"String\";\n\t}\n\tif (typeof x === \"symbol\") {\n\t\treturn \"Symbol\";\n\t}\n\tif (typeof x === \"bigint\") {\n\t\treturn \"BigInt\";\n\t}\n}\n","import { Decimal } from \"@formatjs/bigdecimal\";\nimport { memoize } from \"@formatjs/fast-memoize\";\n/**\n* Cached function to compute powers of 10 for Decimal.js operations.\n* This cache significantly reduces overhead in ComputeExponent and ToRawFixed\n* by memoizing expensive Decimal.pow(10, n) calculations.\n*\n* Common exponents (e.g., -20 to 20) are used repeatedly in number formatting,\n* so caching provides substantial performance benefits.\n*\n* @param exponent - Can be a number or Decimal. If Decimal, it will be converted to string for cache key.\n*/\nexport const getPowerOf10 = memoize((exponent) => {\n\treturn Decimal.pow(10, exponent);\n});\n","import \"#packages/ecma402-abstract/types/number.js\";\nimport { invariant } from \"#packages/ecma402-abstract/utils.js\";\nimport { getPowerOf10 } from \"#packages/ecma402-abstract/NumberFormat/decimal-cache.js\";\n/**\n* The abstract operation ComputeExponentForMagnitude computes an exponent by which to scale a\n* number of the given magnitude (power of ten of the most significant digit) according to the\n* locale and the desired notation (scientific, engineering, or compact).\n*/\nexport function ComputeExponentForMagnitude(internalSlots, magnitude) {\n\tconst { notation, dataLocaleData, numberingSystem } = internalSlots;\n\tswitch (notation) {\n\t\tcase \"standard\": return 0;\n\t\tcase \"scientific\": return magnitude.toNumber();\n\t\tcase \"engineering\":\n\t\t\tconst thousands = magnitude.div(3).floor();\n\t\t\treturn thousands.times(3).toNumber();\n\t\tdefault: {\n\t\t\tinvariant(notation === \"compact\", \"Invalid notation\");\n\t\t\t// Let exponent be an implementation- and locale-dependent (ILD) integer by which to scale a\n\t\t\t// number of the given magnitude in compact notation for the current locale.\n\t\t\tconst { compactDisplay, style, currencyDisplay } = internalSlots;\n\t\t\tlet thresholdMap;\n\t\t\tif (style === \"currency\" && currencyDisplay !== \"name\") {\n\t\t\t\tconst currency = dataLocaleData.numbers.currency[numberingSystem] || dataLocaleData.numbers.currency[dataLocaleData.numbers.nu[0]];\n\t\t\t\tthresholdMap = currency.short;\n\t\t\t} else {\n\t\t\t\tconst decimal = dataLocaleData.numbers.decimal[numberingSystem] || dataLocaleData.numbers.decimal[dataLocaleData.numbers.nu[0]];\n\t\t\t\tthresholdMap = compactDisplay === \"long\" ? decimal.long : decimal.short;\n\t\t\t}\n\t\t\tif (!thresholdMap) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tconst num = getPowerOf10(magnitude).toString();\n\t\t\tconst thresholds = Object.keys(thresholdMap);\n\t\t\tif (num < thresholds[0]) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tif (num > thresholds[thresholds.length - 1]) {\n\t\t\t\t// GH #4236: When number exceeds max threshold, use the exponent\n\t\t\t\t// corresponding to the largest available threshold in locale data.\n\t\t\t\t// Calculate exponent the same way as for normal thresholds (lines 70-73).\n\t\t\t\tconst magnitudeKey = thresholds[thresholds.length - 1];\n\t\t\t\tconst compactPattern = thresholdMap[magnitudeKey].other;\n\t\t\t\tif (compactPattern === \"0\") {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\treturn magnitudeKey.length - thresholdMap[magnitudeKey].other.match(/0+/)[0].length;\n\t\t\t}\n\t\t\tconst i = thresholds.indexOf(num);\n\t\t\tif (i === -1) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\t// See https://unicode.org/reports/tr35/tr35-numbers.html#Compact_Number_Formats\n\t\t\t// Special handling if the pattern is precisely `0`.\n\t\t\tconst magnitudeKey = thresholds[i];\n\t\t\t// TODO: do we need to handle plural here?\n\t\t\tconst compactPattern = thresholdMap[magnitudeKey].other;\n\t\t\tif (compactPattern === \"0\") {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\t// Example: in zh-TW, `10000000` maps to `0000萬`. So we need to return 8 - 4 = 4 here.\n\t\t\treturn magnitudeKey.length - thresholdMap[magnitudeKey].other.match(/0+/)[0].length;\n\t\t}\n\t}\n}\n","import { Decimal } from \"@formatjs/bigdecimal\";\nexport const TEN = new Decimal(10);\nexport const ZERO = new Decimal(0);\nexport const NEGATIVE_ZERO = new Decimal(-0);\n","import \"#packages/ecma402-abstract/types/number.js\";\nconst negativeMapping = {\n\tceil: \"zero\",\n\tfloor: \"infinity\",\n\texpand: \"infinity\",\n\ttrunc: \"zero\",\n\thalfCeil: \"half-zero\",\n\thalfFloor: \"half-infinity\",\n\thalfExpand: \"half-infinity\",\n\thalfTrunc: \"half-zero\",\n\thalfEven: \"half-even\"\n};\nconst positiveMapping = {\n\tceil: \"infinity\",\n\tfloor: \"zero\",\n\texpand: \"infinity\",\n\ttrunc: \"zero\",\n\thalfCeil: \"half-infinity\",\n\thalfFloor: \"half-zero\",\n\thalfExpand: \"half-infinity\",\n\thalfTrunc: \"half-zero\",\n\thalfEven: \"half-even\"\n};\nexport function GetUnsignedRoundingMode(roundingMode, isNegative) {\n\tif (isNegative) {\n\t\treturn negativeMapping[roundingMode];\n\t}\n\treturn positiveMapping[roundingMode];\n}\n","import \"#packages/ecma402-abstract/types/number.js\";\nimport { invariant } from \"#packages/ecma402-abstract/utils.js\";\nexport function ApplyUnsignedRoundingMode(x, r1, r2, unsignedRoundingMode) {\n\t// If x equals r1 or if r1 equals r2 (already at rounding boundary), return r1\n\tif (x.eq(r1) || r1.eq(r2)) return r1;\n\t// If x equals r2, return r2\n\tif (x.eq(r2)) return r2;\n\tinvariant(r1.lessThan(x) && x.lessThan(r2), `x should be between r1 and r2 but x=${x}, r1=${r1}, r2=${r2}`);\n\tif (unsignedRoundingMode === \"zero\") {\n\t\treturn r1;\n\t}\n\tif (unsignedRoundingMode === \"infinity\") {\n\t\treturn r2;\n\t}\n\tconst d1 = x.minus(r1);\n\tconst d2 = r2.minus(x);\n\tif (d1.lessThan(d2)) {\n\t\treturn r1;\n\t}\n\tif (d2.lessThan(d1)) {\n\t\treturn r2;\n\t}\n\tinvariant(d1.eq(d2), \"d1 should be equal to d2\");\n\tif (unsignedRoundingMode === \"half-zero\") {\n\t\treturn r1;\n\t}\n\tif (unsignedRoundingMode === \"half-infinity\") {\n\t\treturn r2;\n\t}\n\tinvariant(unsignedRoundingMode === \"half-even\", \"unsignedRoundingMode should be half-even\");\n\tconst cardinality = r1.div(r2.minus(r1)).mod(2);\n\tif (cardinality.isZero()) {\n\t\treturn r1;\n\t}\n\treturn r2;\n}\n","import \"#packages/ecma402-abstract/types/number.js\";\nimport { repeat } from \"#packages/ecma402-abstract/utils.js\";\nimport { ApplyUnsignedRoundingMode } from \"#packages/ecma402-abstract/NumberFormat/ApplyUnsignedRoundingMode.js\";\nimport { getPowerOf10 } from \"#packages/ecma402-abstract/NumberFormat/decimal-cache.js\";\n//IMPL: Helper function to calculate raw fixed value\nfunction ToRawFixedFn(n, f) {\n\treturn n.times(getPowerOf10(-f));\n}\n//IMPL: Helper function to find n1 and r1\nfunction findN1R1(x, f, roundingIncrement) {\n\tconst nx = x.times(getPowerOf10(f)).floor();\n\tconst n1 = nx.div(roundingIncrement).floor().times(roundingIncrement);\n\tconst r1 = ToRawFixedFn(n1, f);\n\treturn {\n\t\tn1,\n\t\tr1\n\t};\n}\n//IMPL: Helper function to find n2 and r2\nfunction findN2R2(x, f, roundingIncrement) {\n\tconst nx = x.times(getPowerOf10(f)).ceil();\n\tconst n2 = nx.div(roundingIncrement).ceil().times(roundingIncrement);\n\tconst r2 = ToRawFixedFn(n2, f);\n\treturn {\n\t\tn2,\n\t\tr2\n\t};\n}\n/**\n* https://tc39.es/ecma402/#sec-torawfixed\n* @param x a finite non-negative Number or BigInt\n* @param minFraction an integer between 0 and 20\n* @param maxFraction an integer between 0 and 20\n*/\nexport function ToRawFixed(x, minFraction, maxFraction, roundingIncrement, unsignedRoundingMode) {\n\t// 1. Let f be maxFraction.\n\tconst f = maxFraction;\n\t// 2. Let n1 and r1 be the results of performing the maximized rounding of x to f fraction digits.\n\tconst { n1, r1 } = findN1R1(x, f, roundingIncrement);\n\t// 3. Let n2 and r2 be the results of performing the minimized rounding of x to f fraction digits.\n\tconst { n2, r2 } = findN2R2(x, f, roundingIncrement);\n\t// 4. Let r be ApplyUnsignedRoundingMode(x, r1, r2, unsignedRoundingMode).\n\tconst r = ApplyUnsignedRoundingMode(x, r1, r2, unsignedRoundingMode);\n\tlet n, xFinal;\n\tlet m;\n\t// 5. If r is equal to r1, then\n\tif (r.eq(r1)) {\n\t\t// a. Let n be n1.\n\t\tn = n1;\n\t\t// b. Let xFinal be r1.\n\t\txFinal = r1;\n\t} else {\n\t\t// 6. Else,\n\t\t// a. Let n be n2.\n\t\tn = n2;\n\t\t// b. Let xFinal be r2.\n\t\txFinal = r2;\n\t}\n\t// 7. If n is 0, let m be \"0\".\n\tif (n.isZero()) {\n\t\tm = \"0\";\n\t} else {\n\t\t// 8. Else, let m be the String representation of n.\n\t\tm = n.toString();\n\t}\n\tlet int;\n\t// 9. If f is not 0, then\n\tif (f !== 0) {\n\t\t// a. Let k be the length of m.\n\t\tlet k = m.length;\n\t\t// b. If k < f, then\n\t\tif (k <= f) {\n\t\t\t// i. Let z be the String value consisting of f + 1 - k occurrences of the character \"0\".\n\t\t\tconst z = repeat(\"0\", f - k + 1);\n\t\t\t// ii. Set m to the string-concatenation of z and m.\n\t\t\tm = z + m;\n\t\t\t// iii. Set k to f + 1.\n\t\t\tk = f + 1;\n\t\t}\n\t\t// c. Let a be the substring of m from 0 to k - f.\n\t\tconst a = m.slice(0, k - f);\n\t\t// d. Let b be the substring of m from k - f to k.\n\t\tconst b = m.slice(m.length - f);\n\t\t// e. Set m to the string-concatenation of a, \".\", and b.\n\t\tm = a + \".\" + b;\n\t\t// f. Let int be the length of a.\n\t\tint = a.length;\n\t} else {\n\t\t// 10. Else, let int be the length of m.\n\t\tint = m.length;\n\t}\n\t// 11. Let cut be maxFraction - minFraction.\n\tlet cut = maxFraction - minFraction;\n\t// 12. Repeat, while cut > 0 and the last character of m is \"0\",\n\twhile (cut > 0 && m[m.length - 1] === \"0\") {\n\t\t// a. Remove the last character from m.\n\t\tm = m.slice(0, m.length - 1);\n\t\t// b. Decrease cut by 1.\n\t\tcut--;\n\t}\n\t// 13. If the last character of m is \".\", then\n\tif (m[m.length - 1] === \".\") {\n\t\t// a. Remove the last character from m.\n\t\tm = m.slice(0, m.length - 1);\n\t}\n\t// 14. Return the Record { [[FormattedString]]: m, [[RoundedNumber]]: xFinal, [[IntegerDigitsCount]]: int, [[RoundingMagnitude]]: -f }.\n\treturn {\n\t\tformattedString: m,\n\t\troundedNumber: xFinal,\n\t\tintegerDigitsCount: int,\n\t\troundingMagnitude: -f\n\t};\n}\n","import { ZERO } from \"#packages/ecma402-abstract/constants.js\";\nimport \"#packages/ecma402-abstract/types/number.js\";\nimport { invariant, repeat } from \"#packages/ecma402-abstract/utils.js\";\nimport { ApplyUnsignedRoundingMode } from \"#packages/ecma402-abstract/NumberFormat/ApplyUnsignedRoundingMode.js\";\nimport { getPowerOf10 } from \"#packages/ecma402-abstract/NumberFormat/decimal-cache.js\";\n//IMPL: Helper function to find n1, e1, and r1 using direct calculation\nfunction findN1E1R1(x, p) {\n\tconst maxN1 = getPowerOf10(p);\n\tconst minN1 = getPowerOf10(p - 1);\n\t// Direct calculation: compute e1 from logarithm\n\t// e1 is the exponent such that n1 * 10^(e1-p+1) <= x\n\t// Taking log: log(n1) + (e1-p+1)*log(10) <= log(x)\n\t// Since n1 is between 10^(p-1) and 10^p, we have:\n\t// (p-1) + (e1-p+1) <= log10(x) < p + (e1-p+1)\n\t// Simplifying: e1 <= log10(x) < e1 + 1\n\t// Therefore: e1 = floor(log10(x))\n\tconst log10x = x.log(10);\n\tlet e1 = log10x.floor();\n\t// Calculate n1 and r1 from e1\n\tconst divisor = getPowerOf10(e1.minus(p).plus(1));\n\tlet n1 = x.div(divisor).floor();\n\tlet r1 = n1.times(divisor);\n\t// Verify and adjust if n1 is out of bounds\n\t// This handles edge cases near powers of 10\n\tif (n1.greaterThanOrEqualTo(maxN1)) {\n\t\te1 = e1.plus(1);\n\t\tconst newDivisor = getPowerOf10(e1.minus(p).plus(1));\n\t\tn1 = x.div(newDivisor).floor();\n\t\tr1 = n1.times(newDivisor);\n\t} else if (n1.lessThan(minN1)) {\n\t\te1 = e1.minus(1);\n\t\tconst newDivisor = getPowerOf10(e1.minus(p).plus(1));\n\t\tn1 = x.div(newDivisor).floor();\n\t\tr1 = n1.times(newDivisor);\n\t}\n\t// Final verification with fallback to iterative search if needed\n\tif (r1.lessThanOrEqualTo(x) && n1.lessThan(maxN1) && n1.greaterThanOrEqualTo(minN1)) {\n\t\treturn {\n\t\t\tn1,\n\t\t\te1,\n\t\t\tr1\n\t\t};\n\t}\n\t// Fallback: iterative search (should rarely be needed)\n\tconst maxE1 = x.div(minN1).log(10).plus(p).minus(1).ceil();\n\tlet currentE1 = maxE1;\n\twhile (true) {\n\t\tconst currentDivisor = getPowerOf10(currentE1.minus(p).plus(1));\n\t\tlet currentN1 = x.div(currentDivisor).floor();\n\t\tif (currentN1.lessThan(maxN1) && currentN1.greaterThanOrEqualTo(minN1)) {\n\t\t\tconst currentR1 = currentN1.times(currentDivisor);\n\t\t\tif (currentR1.lessThanOrEqualTo(x)) {\n\t\t\t\treturn {\n\t\t\t\t\tn1: currentN1,\n\t\t\t\t\te1: currentE1,\n\t\t\t\t\tr1: currentR1\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\tcurrentE1 = currentE1.minus(1);\n\t}\n}\n//IMPL: Helper function to find n2, e2, and r2 using direct calculation\nfunction findN2E2R2(x, p) {\n\tconst maxN2 = getPowerOf10(p);\n\tconst minN2 = getPowerOf10(p - 1);\n\t// Direct calculation: similar to findN1E1R1 but with ceiling\n\tconst log10x = x.log(10);\n\tlet e2 = log10x.floor();\n\t// Calculate n2 and r2 from e2\n\tconst divisor = getPowerOf10(e2.minus(p).plus(1));\n\tlet n2 = x.div(divisor).ceil();\n\tlet r2 = n2.times(divisor);\n\t// Verify and adjust if n2 is out of bounds\n\tif (n2.greaterThanOrEqualTo(maxN2)) {\n\t\te2 = e2.plus(1);\n\t\tconst newDivisor = getPowerOf10(e2.minus(p).plus(1));\n\t\tn2 = x.div(newDivisor).ceil();\n\t\tr2 = n2.times(newDivisor);\n\t} else if (n2.lessThan(minN2)) {\n\t\te2 = e2.minus(1);\n\t\tconst newDivisor = getPowerOf10(e2.minus(p).plus(1));\n\t\tn2 = x.div(newDivisor).ceil();\n\t\tr2 = n2.times(newDivisor);\n\t}\n\t// Final verification with fallback to iterative search if needed\n\tif (r2.greaterThanOrEqualTo(x) && n2.lessThan(maxN2) && n2.greaterThanOrEqualTo(minN2)) {\n\t\treturn {\n\t\t\tn2,\n\t\t\te2,\n\t\t\tr2\n\t\t};\n\t}\n\t// Fallback: iterative search (should rarely be needed)\n\tconst minE2 = x.div(maxN2).log(10).plus(p).minus(1).floor();\n\tlet currentE2 = minE2;\n\twhile (true) {\n\t\tconst currentDivisor = getPowerOf10(currentE2.minus(p).plus(1));\n\t\tlet currentN2 = x.div(currentDivisor).ceil();\n\t\tif (currentN2.lessThan(maxN2) && currentN2.greaterThanOrEqualTo(minN2)) {\n\t\t\tconst currentR2 = currentN2.times(currentDivisor);\n\t\t\tif (currentR2.greaterThanOrEqualTo(x)) {\n\t\t\t\treturn {\n\t\t\t\t\tn2: currentN2,\n\t\t\t\t\te2: currentE2,\n\t\t\t\t\tr2: currentR2\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\tcurrentE2 = currentE2.plus(1);\n\t}\n}\n/**\n* https://tc39.es/ecma402/#sec-torawprecision\n* @param x a finite non-negative Number or BigInt\n* @param minPrecision an integer between 1 and 21\n* @param maxPrecision an integer between 1 and 21\n*/\nexport function ToRawPrecision(x, minPrecision, maxPrecision, unsignedRoundingMode) {\n\t// 1. Let p be maxPrecision.\n\tconst p = maxPrecision;\n\tlet m;\n\tlet e;\n\tlet xFinal;\n\t// 2. If x = 0, then\n\tif (x.isZero()) {\n\t\t// a. Let m be the String value consisting of p occurrences of the character \"0\".\n\t\tm = repeat(\"0\", p);\n\t\t// b. Let e be 0.\n\t\te = 0;\n\t\t// c. Let xFinal be 0.\n\t\txFinal = ZERO;\n\t} else {\n\t\t// 3. Else,\n\t\t// a. Let {n1, e1, r1} be the result of findN1E1R1(x, p).\n\t\tconst { n1, e1, r1 } = findN1E1R1(x, p);\n\t\t// b. Let {n2, e2, r2} be the result of findN2E2R2(x, p).\n\t\tconst { n2, e2, r2 } = findN2E2R2(x, p);\n\t\t// c. Let r be ApplyUnsignedRoundingMode(x, r1, r2, unsignedRoundingMode).\n\t\tlet r = ApplyUnsignedRoundingMode(x, r1, r2, unsignedRoundingMode);\n\t\tlet n;\n\t\t// d. If r = r1, then\n\t\tif (r.eq(r1)) {\n\t\t\t// i. Let n be n1.\n\t\t\tn = n1;\n\t\t\t// ii. Let e be e1.\n\t\t\te = e1.toNumber();\n\t\t\t// iii. Let xFinal be r1.\n\t\t\txFinal = r1;\n\t\t} else {\n\t\t\t// e. Else,\n\t\t\t// i. Let n be n2.\n\t\t\tn = n2;\n\t\t\t// ii. Let e be e2.\n\t\t\te = e2.toNumber();\n\t\t\t// iii. Let xFinal be r2.\n\t\t\txFinal = r2;\n\t\t}\n\t\t// f. Let m be the String representation of n.\n\t\tm = n.toString();\n\t}\n\tlet int;\n\t// 4. If e ≥ p - 1, then\n\tif (e >= p - 1) {\n\t\t// a. Let m be the string-concatenation of m and p - 1 - e occurrences of the character \"0\".\n\t\tm = m + repeat(\"0\", e - p + 1);\n\t\t// b. Let int be e + 1.\n\t\tint = e + 1;\n\t} else if (e >= 0) {\n\t\t// 5. Else if e ≥ 0, then\n\t\t// a. Let m be the string-concatenation of the first e + 1 characters of m, \".\", and the remaining p - (e + 1) characters of m.\n\t\tm = m.slice(0, e + 1) + \".\" + m.slice(m.length - (p - (e + 1)));\n\t\t// b. Let int be e + 1.\n\t\tint = e + 1;\n\t} else {\n\t\t// 6. Else,\n\t\t// a. Assert: e < 0.\n\t\tinvariant(e < 0, \"e should be less than 0\");\n\t\t// b. Let m be the string-concatenation of \"0.\", -e - 1 occurrences of the character \"0\", and m.\n\t\tm = \"0.\" + repeat(\"0\", -e - 1) + m;\n\t\t// c. Let int be 1.\n\t\tint = 1;\n\t}\n\t// 7. If m contains \".\", and maxPrecision > minPrecision, then\n\tif (m.includes(\".\") && maxPrecision > minPrecision) {\n\t\t// a. Let cut be maxPrecision - minPrecision.\n\t\tlet cut = maxPrecision - minPrecision;\n\t\t// b. Repeat, while cut > 0 and the last character of m is \"0\",\n\t\twhile (cut > 0 && m[m.length - 1] === \"0\") {\n\t\t\t// i. Remove the last character from m.\n\t\t\tm = m.slice(0, m.length - 1);\n\t\t\t// ii. Decrease cut by 1.\n\t\t\tcut--;\n\t\t}\n\t\t// c. If the last character of m is \".\", then\n\t\tif (m[m.length - 1] === \".\") {\n\t\t\t// i. Remove the last character from m.\n\t\t\tm = m.slice(0, m.length - 1);\n\t\t}\n\t}\n\t// 8. Return the Record { [[FormattedString]]: m, [[RoundedNumber]]: xFinal, [[IntegerDigitsCount]]: int, [[RoundingMagnitude]]: e }.\n\treturn {\n\t\tformattedString: m,\n\t\troundedNumber: xFinal,\n\t\tintegerDigitsCount: int,\n\t\troundingMagnitude: e\n\t};\n}\n","import { NEGATIVE_ZERO, ZERO } from \"#packages/ecma402-abstract/constants.js\";\nimport \"#packages/ecma402-abstract/types/number.js\";\nimport { invariant, repeat } from \"#packages/ecma402-abstract/utils.js\";\nimport { GetUnsignedRoundingMode } from \"#packages/ecma402-abstract/NumberFormat/GetUnsignedRoundingMode.js\";\nimport { ToRawFixed } from \"#packages/ecma402-abstract/NumberFormat/ToRawFixed.js\";\nimport { ToRawPrecision } from \"#packages/ecma402-abstract/NumberFormat/ToRawPrecision.js\";\n/**\n* https://tc39.es/ecma402/#sec-formatnumberstring\n*/\nexport function FormatNumericToString(intlObject, _x) {\n\tlet x = _x;\n\tlet sign;\n\t// -0\n\tif (x.isZero() && x.isNegative()) {\n\t\tsign = \"negative\";\n\t\tx = ZERO;\n\t} else {\n\t\tinvariant(x.isFinite(), \"NumberFormatDigitInternalSlots value is not finite\");\n\t\tif (x.lessThan(0)) {\n\t\t\tsign = \"negative\";\n\t\t} else {\n\t\t\tsign = \"positive\";\n\t\t}\n\t\tif (sign === \"negative\") {\n\t\t\tx = x.negated();\n\t\t}\n\t}\n\tlet result;\n\tconst roundingType = intlObject.roundingType;\n\tconst unsignedRoundingMode = GetUnsignedRoundingMode(intlObject.roundingMode, sign === \"negative\");\n\tswitch (roundingType) {\n\t\tcase \"significantDigits\":\n\t\t\tresult = ToRawPrecision(x, intlObject.minimumSignificantDigits, intlObject.maximumSignificantDigits, unsignedRoundingMode);\n\t\t\tbreak;\n\t\tcase \"fractionDigits\":\n\t\t\tresult = ToRawFixed(x, intlObject.minimumFractionDigits, intlObject.maximumFractionDigits, intlObject.roundingIncrement, unsignedRoundingMode);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tlet sResult = ToRawPrecision(x, intlObject.minimumSignificantDigits, intlObject.maximumSignificantDigits, unsignedRoundingMode);\n\t\t\tlet fResult = ToRawFixed(x, intlObject.minimumFractionDigits, intlObject.maximumFractionDigits, intlObject.roundingIncrement, unsignedRoundingMode);\n\t\t\tif (intlObject.roundingType === \"morePrecision\") {\n\t\t\t\tif (sResult.roundingMagnitude <= fResult.roundingMagnitude) {\n\t\t\t\t\tresult = sResult;\n\t\t\t\t} else {\n\t\t\t\t\tresult = fResult;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tinvariant(intlObject.roundingType === \"lessPrecision\", \"Invalid roundingType\");\n\t\t\t\tif (sResult.roundingMagnitude <= fResult.roundingMagnitude) {\n\t\t\t\t\tresult = fResult;\n\t\t\t\t} else {\n\t\t\t\t\tresult = sResult;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t}\n\tx = result.roundedNumber;\n\tlet string = result.formattedString;\n\tif (intlObject.trailingZeroDisplay === \"stripIfInteger\" && x.isInteger()) {\n\t\tlet i = string.indexOf(\".\");\n\t\tif (i > -1) {\n\t\t\tstring = string.slice(0, i);\n\t\t}\n\t}\n\tconst int = result.integerDigitsCount;\n\tconst minInteger = intlObject.minimumIntegerDigits;\n\tif (int < minInteger) {\n\t\tconst forwardZeros = repeat(\"0\", minInteger - int);\n\t\tstring = forwardZeros + string;\n\t}\n\tif (sign === \"negative\") {\n\t\tif (x.isZero()) {\n\t\t\tx = NEGATIVE_ZERO;\n\t\t} else {\n\t\t\tx = x.negated();\n\t\t}\n\t}\n\treturn {\n\t\troundedNumber: x,\n\t\tformattedString: string\n\t};\n}\n","import { Decimal } from \"@formatjs/bigdecimal\";\nimport { ToPrimitive } from \"#packages/ecma262-abstract/ToPrimitive.js\";\nconst ZERO = new Decimal(0);\nfunction invariant(condition, message, Err = Error) {\n\tif (!condition) {\n\t\tthrow new Err(message);\n\t}\n}\n/**\n* https://tc39.es/ecma262/#sec-tonumber\n*/\nexport function ToNumber(arg) {\n\tif (typeof arg === \"number\") {\n\t\treturn new Decimal(arg);\n\t}\n\tif (typeof arg === \"bigint\") {\n\t\treturn new Decimal(arg.toString());\n\t}\n\tinvariant(typeof arg !== \"symbol\", \"Symbol is not supported\", TypeError);\n\tif (arg === undefined) {\n\t\treturn new Decimal(NaN);\n\t}\n\tif (arg === null || arg === 0) {\n\t\treturn ZERO;\n\t}\n\tif (arg === true) {\n\t\treturn new Decimal(1);\n\t}\n\tif (typeof arg === \"string\") {\n\t\ttry {\n\t\t\treturn new Decimal(arg);\n\t\t} catch {\n\t\t\treturn new Decimal(NaN);\n\t\t}\n\t}\n\tinvariant(typeof arg === \"object\", \"object expected\", TypeError);\n\tlet primValue = ToPrimitive(arg, \"number\");\n\tinvariant(typeof primValue !== \"object\", \"object expected\", TypeError);\n\treturn ToNumber(primValue);\n}\n","import { ToNumber } from \"#packages/ecma262-abstract/ToNumber.js\";\nimport { ZERO } from \"#packages/ecma402-abstract/constants.js\";\nimport { invariant } from \"#packages/ecma402-abstract/utils.js\";\n/**\n* ECMA-402 Spec: GetOperands abstract operation\n* https://tc39.es/ecma402/#sec-getoperands\n*\n* Implementation: Extended to support compact exponent (c/e operands)\n*\n* @param s Formatted number string\n* @param exponent Compact decimal exponent (c/e operand), defaults to 0\n*/\nexport function GetOperands(s, exponent = 0) {\n\tinvariant(typeof s === \"string\", `GetOperands should have been called with a string`);\n\tconst n = ToNumber(s);\n\tinvariant(n.isFinite(), \"n should be finite\");\n\tlet dp = s.indexOf(\".\");\n\tlet iv;\n\tlet f;\n\tlet v;\n\tlet fv = \"\";\n\tif (dp === -1) {\n\t\tiv = n;\n\t\tf = ZERO;\n\t\tv = 0;\n\t} else {\n\t\tiv = s.slice(0, dp);\n\t\tfv = s.slice(dp, s.length);\n\t\tf = ToNumber(fv);\n\t\tv = fv.length;\n\t}\n\tconst i = ToNumber(iv).abs();\n\tlet w;\n\tlet t;\n\tif (!f.isZero()) {\n\t\tconst ft = fv.replace(/0+$/, \"\");\n\t\tw = ft.length;\n\t\tt = ToNumber(ft);\n\t} else {\n\t\tw = 0;\n\t\tt = ZERO;\n\t}\n\treturn {\n\t\tNumber: n,\n\t\t// Keep as string if too large for JavaScript number to preserve precision\n\t\tIntegerDigits: i.lessThanOrEqualTo(Number.MAX_SAFE_INTEGER) && i.greaterThanOrEqualTo(-Number.MAX_SAFE_INTEGER) ? i.toNumber() : i.toString(),\n\t\tNumberOfFractionDigits: v,\n\t\tNumberOfFractionDigitsWithoutTrailing: w,\n\t\tFractionDigits: f.toNumber(),\n\t\tFractionDigitsWithoutTrailing: t.toNumber(),\n\t\tCompactExponent: exponent\n\t};\n}\n","import { Type } from \"#packages/ecma262-abstract/Type.js\";\nimport { ComputeExponentForMagnitude } from \"#packages/ecma402-abstract/NumberFormat/ComputeExponentForMagnitude.js\";\nimport { FormatNumericToString } from \"#packages/ecma402-abstract/NumberFormat/FormatNumericToString.js\";\nimport \"#packages/ecma402-abstract/types/plural-rules.js\";\nimport { invariant } from \"#packages/ecma402-abstract/utils.js\";\nimport Decimal from \"@formatjs/bigdecimal\";\nimport { GetOperands } from \"#packages/ecma402-abstract/PluralRules/GetOperands.js\";\n/**\n* ResolvePluralInternal ( pluralRules, n )\n*\n* Internal version of ResolvePlural that returns both the formatted string and plural category.\n* This is needed for selectRange, which must compare formatted strings to determine if the\n* start and end values are identical.\n*\n* The formatted string is obtained by applying the number formatting options (digit options)\n* from the PluralRules object to the input number. This ensures that formatting-sensitive\n* plural rules work correctly (e.g., rules that depend on visible fraction digits).\n*\n* @param pl - An initialized PluralRules object\n* @param n - Mathematical value to resolve\n* @returns Record containing the formatted string and plural category\n*/\nexport function ResolvePluralInternal(pl, n, { getInternalSlots, PluralRuleSelect }) {\n\tconst internalSlots = getInternalSlots(pl);\n\tinvariant(Type(internalSlots) === \"Object\", \"pl has to be an object\");\n\tinvariant(\"initializedPluralRules\" in internalSlots, \"pluralrules must be initialized\");\n\t// Handle non-finite values (Infinity, -Infinity, NaN)\n\tif (!n.isFinite()) {\n\t\treturn {\n\t\t\tformattedString: String(n),\n\t\t\tpluralCategory: \"other\"\n\t\t};\n\t}\n\tconst { locale, type, notation } = internalSlots;\n\t// ECMA-402 Spec: Format the number according to digit options\n\tconst res = FormatNumericToString(internalSlots, n);\n\tconst s = res.formattedString;\n\t// Extension: Calculate compact exponent if using compact notation\n\t// This enables CLDR c/e operands for proper plural selection with compact numbers\n\tlet exponent = 0;\n\tif (notation === \"compact\" && !n.isZero()) {\n\t\t// Implementation: Only calculate exponent if NumberFormat locale data is available (soft dependency)\n\t\tif (internalSlots.dataLocaleData?.numbers) {\n\t\t\ttry {\n\t\t\t\t// Calculate magnitude (floor of log10 of absolute value)\n\t\t\t\tconst magnitudeNum = Math.floor(Math.log10(Math.abs(n.toNumber())));\n\t\t\t\tconst magnitude = new Decimal(magnitudeNum);\n\t\t\t\t// Use ComputeExponentForMagnitude from ecma402-abstract\n\t\t\t\t// This determines which compact notation pattern to use (K, M, B, etc.)\n\t\t\t\t// Cast to any since it expects NumberFormatInternal\n\t\t\t\texponent = ComputeExponentForMagnitude(internalSlots, magnitude);\n\t\t\t} catch {\n\t\t\t\t// Gracefully fall back to 0 if exponent calculation fails\n\t\t\t\texponent = 0;\n\t\t\t}\n\t\t}\n\t}\n\t// ECMA-402 Spec: Extract CLDR operands from the formatted string\n\t// Extension: Pass exponent for c/e operands\n\tconst operands = GetOperands(s, exponent);\n\t// ECMA-402 Spec: Select the appropriate plural category using the locale's plural rules\n\tconst pluralCategory = PluralRuleSelect(locale, type, n, operands);\n\treturn {\n\t\tformattedString: s,\n\t\tpluralCategory\n\t};\n}\n/**\n* http://ecma-international.org/ecma-402/7.0/index.html#sec-resolveplural\n* @param pl\n* @param n\n* @param PluralRuleSelect Has to pass in bc it's implementation-specific\n*/\nexport function ResolvePlural(pl, n, { getInternalSlots, PluralRuleSelect }) {\n\treturn ResolvePluralInternal(pl, n, {\n\t\tgetInternalSlots,\n\t\tPluralRuleSelect\n\t}).pluralCategory;\n}\n","import { Type } from \"#packages/ecma262-abstract/Type.js\";\nimport \"#packages/ecma402-abstract/types/plural-rules.js\";\nimport { invariant } from \"#packages/ecma402-abstract/utils.js\";\nimport \"#packages/ecma402-abstract/PluralRules/GetOperands.js\";\nimport { ResolvePluralInternal } from \"#packages/ecma402-abstract/PluralRules/ResolvePlural.js\";\n/**\n* ResolvePluralRange ( pluralRules, x, y )\n*\n* The ResolvePluralRange abstract operation is called with arguments pluralRules (which must be\n* an object initialized as a PluralRules), x (a mathematical value), and y (a mathematical value).\n* It resolves the appropriate plural form for a range by determining the plural forms of both the\n* start and end values, then consulting locale-specific range data.\n*\n* Specification: https://tc39.es/ecma402/#sec-resolvepluralrange\n*\n* @param pluralRules - An initialized PluralRules object\n* @param x - Mathematical value for the range start\n* @param y - Mathematical value for the range end\n* @returns The plural category for the range (zero, one, two, few, many, or other)\n*/\nexport function ResolvePluralRange(pluralRules, x, y, { getInternalSlots, PluralRuleSelect, PluralRuleSelectRange }) {\n\t// 1. If x is not-a-number or y is not-a-number, throw a RangeError exception.\n\tif (!x.isFinite() || !y.isFinite()) {\n\t\tthrow new RangeError(\"selectRange requires start and end values to be finite numbers\");\n\t}\n\t// Validation: Assert that pluralRules has been initialized\n\tconst internalSlots = getInternalSlots(pluralRules);\n\tinvariant(Type(internalSlots) === \"Object\", \"pluralRules has to be an object\");\n\tinvariant(\"initializedPluralRules\" in internalSlots, \"pluralrules must be initialized\");\n\t// 2. Let xp be ResolvePlural(pluralRules, x).\n\t// Note: ResolvePlural returns a Record with [[FormattedString]] and [[PluralCategory]]\n\tconst xp = ResolvePluralInternal(pluralRules, x, {\n\t\tgetInternalSlots,\n\t\tPluralRuleSelect\n\t});\n\t// 3. Let yp be ResolvePlural(pluralRules, y).\n\tconst yp = ResolvePluralInternal(pluralRules, y, {\n\t\tgetInternalSlots,\n\t\tPluralRuleSelect\n\t});\n\t// 4. If xp.[[FormattedString]] is yp.[[FormattedString]], then\n\t// a. Return xp.[[PluralCategory]].\n\t// Note: When the formatted strings are identical (e.g., \"1\" and \"1\"), the values are\n\t// effectively the same, so we return the plural category of the start value.\n\tif (xp.formattedString === yp.formattedString) {\n\t\treturn xp.pluralCategory;\n\t}\n\t// 5. Let locale be pluralRules.[[Locale]].\n\t// 6. Let type be pluralRules.[[Type]].\n\tconst { locale, type } = internalSlots;\n\t// 7. Let notation be pluralRules.[[Notation]].\n\t// 8. Let compactDisplay be pluralRules.[[CompactDisplay]].\n\t// Note: notation and compactDisplay are not yet implemented for PluralRules polyfill.\n\t// When implemented, these would affect how the range is formatted and thus which\n\t// plural rules apply (see c/e operand support).\n\t// 9. Return PluralRuleSelectRange(locale, type, notation, compactDisplay, xp.[[PluralCategory]], yp.[[PluralCategory]]).\n\t// Note: PluralRuleSelectRange is implementation-defined and uses CLDR plural range data\n\t// to determine the appropriate plural category for a range based on the start and end categories.\n\t// Example: In English, \"one\" to \"other\" → \"other\" (e.g., \"1-2 items\")\n\treturn PluralRuleSelectRange(locale, type, xp.pluralCategory, yp.pluralCategory);\n}\n","// Type-only circular import\n// eslint-disable-next-line import/no-cycle\nimport type {PluralRules} from '#packages/intl-pluralrules/index.js'\nimport {type PluralRulesInternal} from '#packages/intl-pluralrules/index.js'\n\nconst internalSlotMap = new WeakMap<PluralRules, PluralRulesInternal>()\n\nexport default function getInternalSlots(x: PluralRules): PluralRulesInternal {\n let internalSlots = internalSlotMap.get(x)\n if (!internalSlots) {\n internalSlots = Object.create(null) as PluralRulesInternal\n internalSlotMap.set(x, internalSlots)\n }\n return internalSlots\n}\n","import {CanonicalizeLocaleList} from '#packages/ecma402-abstract/CanonicalizeLocaleList.js'\nimport {SupportedLocales} from '#packages/ecma402-abstract/SupportedLocales.js'\nimport {ToIntlMathematicalValue} from '#packages/ecma402-abstract/ToIntlMathematicalValue.js'\nimport {type NumberFormatDigitInternalSlots} from '#packages/ecma402-abstract/types/number.js'\nimport {\n type LDMLPluralRule,\n type PluralRulesData,\n type PluralRulesLocaleData,\n} from '#packages/ecma402-abstract/types/plural-rules.js'\nimport type Decimal from '@formatjs/bigdecimal'\nimport {type OperandsRecord} from '#packages/ecma402-abstract/PluralRules/GetOperands.js'\nimport {InitializePluralRules} from '#packages/ecma402-abstract/PluralRules/InitializePluralRules.js'\nimport {ResolvePlural} from '#packages/ecma402-abstract/PluralRules/ResolvePlural.js'\nimport {ResolvePluralRange} from '#packages/ecma402-abstract/PluralRules/ResolvePluralRange.js'\nimport getInternalSlots from '#packages/intl-pluralrules/get_internal_slots.js'\n\n/**\n * Type augmentation for Intl.PluralRules\n *\n * ECMA-402 Spec: selectRange method (Intl.PluralRules.prototype.selectRange)\n * https://tc39.es/ecma402/#sec-intl.pluralrules.prototype.selectrange\n *\n * Extension: notation and compactDisplay options (not in ECMA-402 spec)\n * Mirrors Intl.NumberFormat notation option for proper plural selection with compact numbers\n */\ndeclare global {\n namespace Intl {\n interface PluralRules {\n // ECMA-402 Spec: selectRange method\n selectRange(start: number | bigint, end: number | bigint): LDMLPluralRule\n }\n interface PluralRulesOptions {\n // Extension: notation option (mirrors Intl.NumberFormat)\n notation?: 'standard' | 'compact'\n // Extension: compactDisplay option (mirrors Intl.NumberFormat)\n compactDisplay?: 'short' | 'long'\n }\n }\n}\n\nfunction validateInstance(instance: any, method: string) {\n if (!(instance instanceof PluralRules)) {\n throw new TypeError(\n `Method Intl.PluralRules.prototype.${method} called on incompatible receiver ${String(\n instance\n )}`\n )\n }\n}\n\nexport interface PluralRulesInternal extends NumberFormatDigitInternalSlots {\n initializedPluralRules: boolean\n locale: string\n type: 'cardinal' | 'ordinal'\n notation: 'standard' | 'compact'\n compactDisplay?: 'short' | 'long'\n dataLocaleData?: any // NumberFormatLocaleInternalData\n}\n\n/**\n * http://ecma-international.org/ecma-402/7.0/index.html#sec-pluralruleselect\n * @param locale\n * @param type\n * @param _n\n * @param param3\n */\nfunction PluralRuleSelect(\n locale: string,\n type: 'cardinal' | 'ordinal',\n _n: Decimal,\n {\n IntegerDigits,\n NumberOfFractionDigits,\n FractionDigits,\n CompactExponent,\n }: OperandsRecord\n): LDMLPluralRule {\n // Always pass a string to the compiled function to preserve precision for huge numbers\n return PluralRules.localeData[locale].fn(\n NumberOfFractionDigits\n ? `${IntegerDigits}.${FractionDigits}`\n : String(IntegerDigits),\n type === 'ordinal',\n CompactExponent\n )\n}\n\n/**\n * PluralRuleSelectRange ( locale, type, notation, compactDisplay, start, end )\n *\n * Implementation-defined abstract operation that determines the plural category for a range\n * by consulting CLDR plural range data. Each locale defines how different combinations of\n * start and end plural categories map to a range plural category.\n *\n * Examples from CLDR:\n * - English: \"one\" + \"other\" → \"other\" (e.g., \"1-2 items\")\n * - French: \"one\" + \"one\" → \"one\" (e.g., \"0-1 vue\")\n * - Arabic: \"few\" + \"many\" → \"many\" (e.g., complex range rules)\n *\n * The spec allows this to be implementation-defined, and we use CLDR supplemental data\n * from pluralRanges.json which provides explicit mappings for each locale.\n *\n * @param locale - BCP 47 locale identifier\n * @param type - \"cardinal\" or \"ordinal\"\n * @param xp - Start plural category\n * @param yp - End plural category\n * @returns The plural category for the range\n */\nfunction PluralRuleSelectRange(\n locale: string,\n type: 'cardinal' | 'ordinal',\n xp: LDMLPluralRule,\n yp: LDMLPluralRule\n): LDMLPluralRule {\n const localeData = PluralRules.localeData[locale]\n if (!localeData || !localeData.pluralRanges) {\n // Fallback: If no range data is available, return the end category.\n // This is a reasonable default as the end value often determines the plural form.\n return yp\n }\n\n // Construct lookup key: \"start_end\" (e.g., \"one_other\", \"few_many\")\n const key = `${xp}_${yp}` as const\n\n // Select the appropriate range data based on type (cardinal vs ordinal)\n const rangeData =\n type === 'ordinal'\n ? localeData.pluralRanges.ordinal\n : localeData.pluralRanges.cardinal\n\n // Look up the result, falling back to end category if not found\n return rangeData?.[key] ?? yp\n}\n\nexport class PluralRules {\n constructor(locales?: string | string[], options?: Intl.PluralRulesOptions) {\n // test262/test/intl402/RelativeTimeFormat/constructor/constructor/newtarget-undefined.js\n // Cannot use `new.target` bc of IE11 & TS transpiles it to something else\n const newTarget =\n this && this instanceof PluralRules ? this.constructor : void 0\n if (!newTarget) {\n throw new TypeError(\"Intl.PluralRules must be called with 'new'\")\n }\n return InitializePluralRules(this, locales, options, {\n availableLocales: PluralRules.availableLocales,\n relevantExtensionKeys: PluralRules.relevantExtensionKeys,\n localeData: PluralRules.localeData,\n getDefaultLocale: PluralRules.getDefaultLocale,\n getInternalSlots,\n })\n }\n public resolvedOptions(): Intl.ResolvedPluralRulesOptions {\n validateInstance(this, 'resolvedOptions')\n const opts = Object.create(null)\n const internalSlots = getInternalSlots(this)\n opts.locale = internalSlots.locale\n opts.type = internalSlots.type\n ;(\n [\n 'minimumIntegerDigits',\n 'minimumFractionDigits',\n 'maximumFractionDigits',\n 'minimumSignificantDigits',\n 'maximumSignificantDigits',\n ] as Array<keyof PluralRulesInternal>\n ).forEach(field => {\n const val = internalSlots[field]\n if (val !== undefined) {\n opts[field] = val\n }\n })\n\n opts.pluralCategories = [\n ...PluralRules.localeData[opts.locale].categories[\n opts.type as 'cardinal'\n ],\n ]\n return opts\n }\n public select(val: number | bigint): LDMLPluralRule {\n validateInstance(this, 'select')\n // Use ToIntlMathematicalValue which handles bigint per ECMA-402\n // https://tc39.es/ecma402/#sec-intl.pluralrules.prototype.select\n const n = ToIntlMathematicalValue(val)\n return ResolvePlural(this, n, {getInternalSlots, PluralRuleSelect})\n }\n /**\n * Intl.PluralRules.prototype.selectRange ( start, end )\n *\n * Returns a string indicating which plural rule applies to a range of numbers.\n * This is useful for formatting ranges like \"1-2 items\" vs \"2-3 items\" where\n * different languages have different plural rules for ranges.\n *\n * Specification: https://tc39.es/ecma402/#sec-intl.pluralrules.prototype.selectrange\n *\n * @param start - The start value of the range (number or bigint)\n * @param end - The end value of the range (number or bigint)\n * @returns The plural category for the range (zero, one, two, few, many, or other)\n *\n * @example\n * const pr = new Intl.PluralRules('en');\n * pr.selectRange(1, 2); // \"other\" (English: \"1-2 items\")\n * pr.selectRange(1, 1); // \"one\" (same value: \"1 item\")\n *\n * @example\n * const prFr = new Intl.PluralRules('fr');\n * prFr.selectRange(0, 1); // \"one\" (French: \"0-1 vue\")\n * prFr.selectRange(1, 2); // \"other\" (French: \"1-2 vues\")\n *\n * @example\n * // BigInt support (spec-compliant, but Chrome has a bug as of early 2025)\n * pr.selectRange(BigInt(1), BigInt(2)); // \"other\"\n *\n * @throws {TypeError} If start or end is undefined\n * @throws {RangeError} If start or end is not a finite number (Infinity, NaN)\n *\n * @note Chrome's native implementation (as of early 2025) has a bug where it throws\n * \"Cannot convert a BigInt value to a number\" when using BigInt arguments. This is\n * a browser bug - the spec requires BigInt support. This polyfill handles BigInt correctly.\n */\n public selectRange(\n start: number | bigint,\n end: number | bigint\n ): LDMLPluralRule {\n validateInstance(this, 'selectRange')\n // Spec: https://tc39.es/ecma402/#sec-intl.pluralrules.prototype.selectrange\n\n // 1. Let pr be the this value.\n // 2. Perform ? RequireInternalSlot(pr, [[InitializedPluralRules]]).\n // (Validation is done by validateInstance above)\n\n // 3. If start is undefined or end is undefined, throw a TypeError exception.\n if (start === undefined || end === undefined) {\n throw new TypeError('selectRange requires both start and end arguments')\n }\n\n // 4. Let x be ? ToIntlMathematicalValue(start).\n const x = ToIntlMathematicalValue(start)\n\n // 5. Let y be ? ToIntlMathematicalValue(end).\n const y = ToIntlMathematicalValue(end)\n\n // 6. Return ? ResolvePluralRange(pr, x, y).\n return ResolvePluralRange(this, x, y, {\n getInternalSlots,\n PluralRuleSelect,\n PluralRuleSelectRange,\n })\n }\n toString() {\n return '[object Intl.PluralRules]'\n }\n public static supportedLocalesOf(\n locales?: string | string[],\n options?: Pick<Intl.PluralRulesOptions, 'localeMatcher'>\n ): string[] {\n return SupportedLocales(\n PluralRules.availableLocales,\n CanonicalizeLocaleList(locales),\n options\n )\n }\n public static __addLocaleData(...data: PluralRulesLocaleData[]): void {\n for (const {data: d, locale} of data) {\n PluralRules.localeData[locale] = d\n PluralRules.availableLocales.add(locale)\n if (!PluralRules.__defaultLocale) {\n PluralRules.__defaultLocale = locale\n }\n }\n }\n static localeData: Record<string, PluralRulesData> = {}\n static availableLocales: Set<string> = new Set<string>()\n static __defaultLocale = ''\n static getDefaultLocale(): string {\n return PluralRules.__defaultLocale\n }\n static relevantExtensionKeys: never[] = []\n public static polyfilled = true\n}\n\ntry {\n // IE11 does not have Symbol\n if (typeof Symbol !== 'undefined') {\n Object.defineProperty(PluralRules.prototype, Symbol.toStringTag, {\n value: 'Intl.PluralRules',\n writable: false,\n enumerable: false,\n configurable: true,\n })\n }\n\n try {\n // https://github.com/tc39/test262/blob/master/test/intl402/PluralRules/length.js\n Object.defineProperty(PluralRules, 'length', {\n value: 0,\n writable: false,\n enumerable: false,\n configurable: true,\n })\n } catch {\n // IE 11 sets Function.prototype.length to be non-configurable which will cause the\n // above Object.defineProperty to throw an error.\n }\n // https://github.com/tc39/test262/blob/master/test/intl402/RelativeTimeFormat/constructor/length.js\n Object.defineProperty(PluralRules.prototype.constructor, 'length', {\n value: 0,\n writable: false,\n enumerable: false,\n configurable: true,\n })\n // https://github.com/tc39/test262/blob/master/test/intl402/RelativeTimeFormat/constructor/supportedLocalesOf/length.js\n Object.defineProperty(PluralRules.supportedLocalesOf, 'length', {\n value: 1,\n writable: false,\n enumerable: false,\n configurable: true,\n })\n Object.defineProperty(PluralRules, 'name', {\n value: 'PluralRules',\n writable: false,\n enumerable: false,\n configurable: true,\n })\n} catch {\n // Meta fixes for test262\n}\n","import {PluralRules} from '#packages/intl-pluralrules/index.js'\n\nObject.defineProperty(Intl, 'PluralRules', {\n value: PluralRules,\n writable: true,\n enumerable: false,\n configurable: true,\n})\n\n// Drain any locale data that was buffered before polyfill loaded\nconst buf = (globalThis as Record<string, unknown>)\n .__FORMATJS_PLURALRULES_DATA__ as\n | Parameters<(typeof PluralRules)['__addLocaleData']>[0][]\n | undefined\nif (buf) {\n for (const d of buf) PluralRules.__addLocaleData(d)\n delete (globalThis as Record<string, unknown>).__FORMATJS_PLURALRULES_DATA__\n}\n"],"x_google_ignoreList":[10],"mappings":";;;;;;;AAIA,SAAgB,uBAAuB,SAAS;AAE/C,QAAO,KAAK,oBAAoB,QAAQ;;;;;;;ACHzC,SAAgB,SAAS,KAAK;AAC7B,KAAI,OAAO,KACV,OAAM,IAAI,UAAU,+CAA+C;AAEpE,QAAO,OAAO,IAAI;;;;;;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