// Module ID: 13195 // Function ID: 99940 // Name: CanonicalizeLocaleList // Dependencies: [] // Module 13195 (CanonicalizeLocaleList) function CanonicalizeLocaleList(items) { return Intl.getCanonicalLocales(items); } function GetOption(arg0, arg1, arg2, arr) { if ("object" !== typeof arg0) { const _TypeError3 = TypeError; const typeError = new TypeError("Options must be an object"); throw typeError; } else { arg1 = tmp23; if (undefined !== arg0[arg1]) { if ("boolean" !== arg2) { if ("string" !== arg2) { const _TypeError2 = TypeError; const typeError1 = new TypeError("invalid type"); throw typeError1; } } let tmp2 = tmp23; if ("boolean" === arg2) { const _Boolean = Boolean; const BooleanResult = Boolean(tmp23); arg1 = BooleanResult; tmp2 = BooleanResult; } let tmp5 = tmp2; if ("string" === arg2) { if ("symbol" === typeof tmp2) { const _TypeError = TypeError; throw TypeError("Cannot convert a Symbol value to a string"); } else { const _String = String; const StringResult = String(tmp2); arg1 = StringResult; tmp5 = StringResult; } } if (undefined !== arr) { if (!arr.filter((arg0) => arg0 == StringResult).length) { const _RangeError = RangeError; const _HermesInternal = HermesInternal; const rangeError = new RangeError("" + tmp5 + " is not within " + arr.join(", ")); throw rangeError; } } return tmp5; } else { return arg4; } } } function memoize(arg0, cache) { return cache.strategy ? cache.strategy : strategyDefault(arg0, { cache: cache.cache || closure_8, serializer: cache.serializer || serializerDefault }); } function monadic(call, get) { let tmp = null == arg3; if (!tmp) { tmp = "number" === typeof arg3; } if (!tmp) { tmp = "boolean" === typeof arg3; } let tmp2 = arg3; if (!tmp) { tmp2 = arg2(arg3); } let value = get.get(tmp2); if (undefined === value) { const self = this; const callResult = call.call(this, arg3); const result = get.set(tmp2, callResult); value = callResult; } return value; } function variadic(apply, get) { const callResult = slice.call(arguments, 3); const tmp2 = arg2(callResult); let value = get.get(tmp2); if (undefined === value) { const self = this; const applyResult = apply.apply(this, callResult); const result = get.set(tmp2, applyResult); value = applyResult; } return value; } function assemble(closure_101, iter, bind, queue, bindResult1) { return bind.bind(iter, closure_101, queue, bindResult1); } function strategyDefault(arg0, cache) { cache = cache.cache; return assemble(arg0, this, 1 === arg0.length ? monadic : variadic, cache.create(), cache.serializer); } function setInternalSlot(get) { if (!get.get(arg1)) { const _Object = Object; const result = get.set(arg1, Object.create(null)); } get.get(arg1)[arg2] = arg3; } function getInternalSlot(get) { return function getMultiInternalSlots(get, arg1, arg2) { const value = get.get(arg1); if (value) { const length = arguments.length; let _Array = Array; let num2 = 0; if (length > 2) { num2 = length - 2; } const prototype2 = _Array.prototype; _Array = new _Array(num2); for (let num3 = 2; num3 < length; num3 = num3 + 1) { _Array[num3 - 2] = arguments[num3]; } const _Object = Object; return _Array.reduce((arg0, arg1) => { arg0[arg1] = value[arg1]; return arg0; }, Object.create(null)); } else { const _TypeError = TypeError; const _HermesInternal = HermesInternal; const typeError = new TypeError("" + arg1 + " InternalSlot has not been initialized"); throw typeError; } }(get, arg1, arg2)[arg2]; } function isLiteralPart(type) { return "literal" === type.type; } function invariant(arg0, arg1) { if (arguments.length > 2) { if (undefined !== arguments[2]) { let _Error = arguments[2]; } if (!arg0) { const prototype = _Error.prototype; _Error = new _Error(arg1); throw _Error; } } _Error = Error; } function SupportedLocales(arg0, arg1, arg2) { if (undefined !== arg2) { if (null == arg2) { const _TypeError = TypeError; const typeError = new TypeError("undefined/null cannot be converted to object"); throw typeError; } else { const _Object = Object; tmp(Object(arg2), "localeMatcher", "string", [-1806852539, 688836880], "best fit"); } } return arg1(dependencyMap[4]).LookupSupportedLocales(Array.from(arg0), arg1); } function validateInstance(arg0, arg1) { if (!(arg0 instanceof tmp5)) { const _TypeError = TypeError; const _String = String; const _HermesInternal = HermesInternal; const typeError = new TypeError("Method Intl.ListFormat.prototype." + arg1 + " called on incompatible receiver " + String(arg0)); throw typeError; } } function stringListFromIterable(arg0) { if ("object" !== typeof arg0) { return []; } else { const items = []; const _Symbol = Symbol; const iter3 = arg0[Symbol.iterator](); const iter4 = iter3.next(); let iter2 = iter4; if (!iter4.done) { while ("string" === typeof iter2.value) { let arr = items.push(iter2.value); let iter = iter3.next(); iter2 = iter; } const _TypeError = TypeError; const _HermesInternal = HermesInternal; const typeError = new TypeError("Iterable yielded " + iter2.value + " which is not a string"); throw typeError; } return items; } } function createPartsFromList(arg0, arg1, arg2) { if (0 === arg2.length) { return []; } else if (2 === length) { let obj = {}; obj = { type: "element", value: arg2[0] }; obj[0] = obj; const obj1 = { type: "element", value: arg2[1] }; obj[1] = obj1; return deconstructPattern(getInternalSlot(arg0, arg1, "templatePair"), obj); } else { const obj2 = { type: "element", value: arg2[length - 1] }; let diff = length - 2; let tmpResult = obj2; let tmp5 = obj2; if (diff >= 0) { do { let str = "templateStart"; let tmp = closure_24; let tmp2 = closure_17; if (0 !== diff) { let str2 = "templateEnd"; if (diff < length - 2) { str2 = "templateMiddle"; } str = str2; } obj = {}; let obj3 = { type: "element", value: arg2[diff] }; obj[0] = obj3; obj[1] = tmpResult; tmpResult = tmp(tmp2(arg0, arg1, str), obj); diff = diff - 1; tmp5 = tmpResult; } while (diff >= 0); } return tmp5; } } function deconstructPattern(internalSlot, arg1) { const items = []; const index = internalSlot.indexOf("{"); let num = 0; if (index < internalSlot.length) { let tmp3 = index; let num4 = 0; num = 0; if (index > -1) { while (true) { let tmp4 = invariant; let index1 = internalSlot.indexOf("}", tmp3); let _HermesInternal = HermesInternal; let tmp6 = index1 > tmp3; let tmp7 = invariant(tmp6, "Invalid pattern " + internalSlot); let tmp8 = tmp3; if (tmp3 > num4) { let obj = { type: "literal", value: internalSlot.substring(num4, tmp3) }; let arr = items.push(obj); } obj = { type: internalSlot.substring(tmp3 + 1, index1), value: undefined }; arr = items.push(obj); let sum = index1 + 1; let index2 = internalSlot.indexOf("{", sum); num = sum; if (index2 >= internalSlot.length) { break; } else { num4 = sum; num = sum; tmp3 = index2; if (index2 <= -1) { break; } } } } } if (num < internalSlot.length) { obj = { type: "literal", value: internalSlot.substring(num, length) }; items.push(obj); } const items1 = []; const iter = items[Symbol.iterator](); const nextResult = iter.next(); while (iter !== undefined) { let type = nextResult.type; let tmp31 = isLiteralPart; let iter2 = nextResult; if (isLiteralPart(nextResult)) { let tmp28 = items1; let obj1 = { type: "literal" }; let tmp29 = nextResult; obj1.value = iter2.value; let arr2 = items1.push(obj1); } else { let tmp15 = invariant; let tmp16 = type; let tmp17 = arg1; let _HermesInternal2 = HermesInternal; let tmp18 = type in arg1; let tmp19 = invariant(tmp18, "" + type + " is missing from placables"); let tmp20 = arg1[type]; let tmp21 = tmp20; let _Array = Array; let tmp22 = items1; let push = items1.push; if (Array.isArray(tmp20)) { let tmp25 = callback; let tmp26 = tmp20; let applyResult = push.apply(items1, callback(tmp21)); } else { let tmp23 = tmp20; let arr3 = push(tmp21); } } // continue } return items1; } let closure_2 = importDefault(dependencyMap[0]); let closure_3 = importDefault(dependencyMap[1]); let closure_4 = importDefault(dependencyMap[2]); let closure_5 = importDefault(dependencyMap[3]); function serializerDefault() { return JSON.stringify(arguments); } let closure_7 = () => { class ObjectWithoutPrototypeCache { constructor() { tmp = closure_4(this, ObjectWithoutPrototypeCache); this.cache = Object.create(null); return; } } const arg1 = ObjectWithoutPrototypeCache; let obj = { key: "get", value: function get(arg0) { return this.cache[arg0]; } }; const items = [obj, ]; obj = { key: "set", value: function set(arg0, arg1) { this.cache[arg0] = arg1; } }; items[1] = obj; return callback3(ObjectWithoutPrototypeCache, items); }(); let closure_8 = { create() { return new closure_7(); } }; let obj = { variadic: function strategyVariadic(arg0, cache) { cache = cache.cache; return assemble(arg0, this, variadic, cache.create(), cache.serializer); }, monadic: function strategyMonadic(arg0, cache) { cache = cache.cache; return assemble(arg0, this, monadic, cache.create(), cache.serializer); } }; obj = { strategy: obj.variadic }; memoize(() => { const length = arguments.length; const array = new Array(length); for (let num = 0; num < length; num = num + 1) { array[num] = arguments[num]; } return callback2(Intl.NumberFormat, array); }, obj); obj = { strategy: obj.variadic }; memoize(() => { const length = arguments.length; const array = new Array(length); for (let num = 0; num < length; num = num + 1) { array[num] = arguments[num]; } return callback2(Intl.PluralRules, array); }, obj); memoize(() => { const length = arguments.length; const array = new Array(length); for (let num = 0; num < length; num = num + 1) { array[num] = arguments[num]; } return callback2(Intl.Locale, array); }, { strategy: obj.variadic }); memoize(() => { const length = arguments.length; const array = new Array(length); for (let num = 0; num < length; num = num + 1) { array[num] = arguments[num]; } return callback2(Intl.ListFormat, array); }, { strategy: obj.variadic }); const tmp5 = () => { class ListFormat { constructor(arg0, arg1) { obj1 = arg1; self = this; tmp2 = closure_4(this, ListFormat); constructor = undefined; if (this) { tmp4 = ListFormat; if (self instanceof ListFormat) { constructor = self.constructor; } } if (constructor) { tmp10 = closure_16; tmp11 = ListFormat; str2 = "initializedListFormat"; flag = true; tmp12 = self; tmp13 = closure_16(ListFormat.__INTERNAL_SLOT_MAP__, self, "initializedListFormat", true); tmp14 = closure_10; tmp15 = arg0; tmp16 = closure_10(arg0); tmp17 = globalThis; _Object = Object; tmp18 = null; obj = Object.create(null); if (undefined === obj1) { _Object2 = Object; obj1 = Object.create(null); } else { str3 = "object"; if ("object" !== typeof obj1) { _TypeError2 = TypeError; prototype2 = TypeError.prototype; tmp20 = new.target; str4 = "Options must be an object"; tmp21 = new.target; typeError = new TypeError("Options must be an object"); tmp23 = typeError; throw typeError; } } tmp24 = closure_11; str5 = "localeMatcher"; str6 = "string"; str7 = "best fit"; tmp25 = obj1; str8 = "string"; obj.localeMatcher = closure_11(obj1, "localeMatcher", "string", ["", ""], "best fit"); localeData = tmp11.localeData; tmp26 = ListFormat; tmp27 = closure_1; num = 4; obj = ListFormat(closure_1[4]); tmp28 = obj; tmp29 = tmp16; tmp30 = obj; tmp31 = localeData; ResolveLocaleResult = obj.ResolveLocale(tmp11.availableLocales, tmp16, obj, tmp11.relevantExtensionKeys, localeData, tmp11.getDefaultLocale); str9 = "locale"; tmp33 = self; tmp10Result = tmp10(tmp11.__INTERNAL_SLOT_MAP__, self, "locale", ResolveLocaleResult.locale); str10 = "type"; str11 = "conjunction"; tmp35 = obj1; str12 = "type"; str13 = "string"; tmp36 = closure_11(obj1, "type", "string", [], "conjunction"); tmp37 = self; str14 = "type"; tmp38 = tmp36; tmp10Result1 = tmp10(tmp11.__INTERNAL_SLOT_MAP__, self, "type", tmp36); str15 = "style"; str16 = "long"; tmp40 = obj1; str17 = "style"; str18 = "string"; tmp41 = closure_11(obj1, "style", "string", [null, null, null], "long"); tmp42 = self; str19 = "style"; tmp43 = tmp41; tmp10Result2 = tmp10(tmp11.__INTERNAL_SLOT_MAP__, self, "style", tmp41); dataLocale = ResolveLocaleResult.dataLocale; tmp45 = localeData[dataLocale]; tmp46 = closure_19; _HermesInternal = HermesInternal; str20 = "Missing locale data for "; tmp47 = !tmp45; tmp48 = closure_19(!tmp47, "Missing locale data for " + dataLocale); tmp49 = tmp45[tmp36][tmp41]; str21 = "templatePair"; tmp50 = self; tmp10Result3 = tmp10(tmp11.__INTERNAL_SLOT_MAP__, self, "templatePair", tmp49.pair); str22 = "templateStart"; tmp52 = self; tmp10Result4 = tmp10(tmp11.__INTERNAL_SLOT_MAP__, self, "templateStart", tmp49.start); str23 = "templateMiddle"; tmp54 = self; tmp10Result5 = tmp10(tmp11.__INTERNAL_SLOT_MAP__, self, "templateMiddle", tmp49.middle); str24 = "templateEnd"; tmp56 = self; tmp10Result6 = tmp10(tmp11.__INTERNAL_SLOT_MAP__, self, "templateEnd", tmp49.end); return; } else { tmp5 = globalThis; _TypeError = TypeError; prototype = TypeError.prototype; tmp6 = new.target; str = "Intl.ListFormat must be called with 'new'"; tmp7 = new.target; typeError1 = new TypeError("Intl.ListFormat must be called with 'new'"); tmp9 = typeError1; throw typeError1; } } } const arg1 = ListFormat; let obj = { key: "format", value: function format(arg0) { callback8(this, "format"); let str = ""; const iter = callback10(ListFormat.__INTERNAL_SLOT_MAP__, this, callback9(arg0)); if (Array.isArray(iter)) { for (const item10021 of iter) { let tmp3 = str; str = `${item10021.value}`; } return str; } else { return iter.value; } } }; const items = [obj, , ]; obj = { key: "formatToParts", value: function formatToParts(arg0) { callback8(this, "format"); const tmp2 = callback10(ListFormat.__INTERNAL_SLOT_MAP__, this, callback9(arg0)); if (Array.isArray(tmp2)) { const items = []; for (const item10021 of tmp2) { let tmp4 = items; let _Object = Object; let arr = items.push(Object.assign({}, item10021)); } return items; } else { const items1 = [tmp2]; return items1; } } }; items[1] = obj; obj = { key: "resolvedOptions", value: function resolvedOptions() { callback8(this, "resolvedOptions"); return { locale: callback5(ListFormat.__INTERNAL_SLOT_MAP__, this, "locale"), type: callback5(ListFormat.__INTERNAL_SLOT_MAP__, this, "type"), style: callback5(ListFormat.__INTERNAL_SLOT_MAP__, this, "style") }; } }; items[2] = obj; const items1 = [ { key: "supportedLocalesOf", value: function supportedLocalesOf(arg0, arg1) { return callback7(ListFormat.availableLocales, callback2(arg0), arg1); } }, { key: "__addLocaleData", value: function __addLocaleData(item10117) { let data; let locale; const length = arguments.length; const array = new Array(length); for (let num = 0; num < length; num = num + 1) { array[num] = arguments[num]; } for (const item10017 of array) { ({ data, locale } = item10017); let _Intl = Intl; let prototype = Locale.prototype; let tmp4 = new.target; let tmp5 = new.target; let tmp6 = locale; locale = new Locale(locale); let tmp7 = locale; let str = locale.minimize(); str = str.toString(); let tmp10 = closure_0; closure_0.localeData[str] = data; closure_0.localeData[locale] = data; let availableLocales = closure_0.availableLocales; let tmp9 = str; let addResult = availableLocales.add(str); let availableLocales2 = closure_0.availableLocales; let addResult1 = availableLocales2.add(locale); if (!closure_0.__defaultLocale) { let tmp2 = closure_0; let tmp3 = str; closure_0.__defaultLocale = tmp9; } } } }, { key: "getDefaultLocale", value: function getDefaultLocale() { return ListFormat.__defaultLocale; } } ]; return callback3(ListFormat, items, items1); }(); tmp5.localeData = {}; tmp5.availableLocales = new Set(); tmp5.__defaultLocale = ""; tmp5.relevantExtensionKeys = []; tmp5.polyfilled = true; const weakMap = new WeakMap(); tmp5.__INTERNAL_SLOT_MAP__ = weakMap; tmp5.__ = undefined; if ("undefined" !== typeof Symbol) { const _Object = Object; const _Symbol = Symbol; Object.defineProperty(obj6.prototype, Symbol.toStringTag, { acn: false, acp: "default", acq: false, acr: true }); } Object.defineProperty(tmp5.prototype.constructor, "length", {}); Object.defineProperty(tmp5.supportedLocalesOf, "length", { acn: true, acp: "/assets/.cache/intl/bW9kdWxlcy9nb19saXZlL3dlYi9tb2RhbA==", acq: null, acr: "b0f2d18e6d7a6837db7a0d021090104d" }); while (true) { let _Object2 = Object; let _Intl = Intl; let obj3 = { acn: "ERROR", acp: "ERROR", acq: "NOT_RESPONDER", acr: "NOT_RESPONDER" }; let tmp12 = tmp5; obj3.value = obj6; let str = "ListFormat"; let definePropertyResult3 = Object.defineProperty(Intl, "ListFormat", obj3); let _globalThis = globalThis; if (!__FORMATJS_LISTFORMAT_DATA__) { break; } else { let tmp15 = __FORMATJS_LISTFORMAT_DATA__; let tmp16 = tmp14; for (const item10117 of __FORMATJS_LISTFORMAT_DATA__) { let tmp17 = tmp5; let __addLocaleDataResult = obj6.__addLocaleData(item10117); } let _globalThis2 = globalThis; delete r1.__FORMATJS_LISTFORMAT_DATA__; // break } }