decord/source/1268_DEFAULT_LOCALE.js

151 lines
4.5 KiB
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 1268
2026-07-25 08:10:48 +00:00
// Function ID: 14323
2026-07-20 16:05:17 +00:00
// Name: DEFAULT_LOCALE
2026-07-23 10:11:24 +00:00
// Dependencies: [57, 6, 7, 1252, 1251, 1254]
2026-07-20 16:05:17 +00:00
// Module 1268 (DEFAULT_LOCALE)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
import _classCallCheck from "_classCallCheck";
import _defineProperties from "_defineProperties";
2026-07-20 16:05:17 +00:00
export const DEFAULT_LOCALE = "en-US";
2026-07-23 10:11:24 +00:00
export const IntlManager = (() => {
2026-07-20 16:05:17 +00:00
class IntlManager {
constructor(arg0) {
self = this;
2026-07-23 10:11:24 +00:00
self = this;
2026-07-20 16:05:17 +00:00
DEFAULT_LOCALE = arg0.initialLocale;
if (undefined === DEFAULT_LOCALE) {
2026-07-23 10:11:24 +00:00
tmp = outer1_1;
DEFAULT_LOCALE = outer1_1.DEFAULT_LOCALE;
2026-07-20 16:05:17 +00:00
}
DEFAULT_LOCALE2 = arg0.defaultLocale;
if (undefined === DEFAULT_LOCALE2) {
2026-07-23 10:11:24 +00:00
tmp2 = outer1_1;
DEFAULT_LOCALE2 = outer1_1.DEFAULT_LOCALE;
2026-07-20 16:05:17 +00:00
}
DEFAULT_FORMAT_CONFIG = arg0.formatConfig;
if (undefined === DEFAULT_FORMAT_CONFIG) {
tmp3 = IntlManager;
2026-07-23 10:11:24 +00:00
tmp4 = outer1_2;
2026-07-20 16:05:17 +00:00
num = 3;
2026-07-23 10:11:24 +00:00
DEFAULT_FORMAT_CONFIG = IntlManager(outer1_2[3]).DEFAULT_FORMAT_CONFIG;
2026-07-20 16:05:17 +00:00
}
forceLookupMatcher = arg0.forceLookupMatcher;
tmp5 = undefined !== forceLookupMatcher && forceLookupMatcher;
2026-07-23 10:11:24 +00:00
tmp6 = outer1_4(self, self);
2026-07-20 16:05:17 +00:00
self.onLocaleChange = (arg0) => {
2026-07-23 10:11:24 +00:00
const _self = arg0;
let _localeSubscriptions = _self._localeSubscriptions;
2026-07-20 16:05:17 +00:00
_localeSubscriptions.add(arg0);
return () => {
2026-07-23 10:11:24 +00:00
_localeSubscriptions = _localeSubscriptions._localeSubscriptions;
return _localeSubscriptions.delete(_localeSubscriptions);
2026-07-20 16:05:17 +00:00
};
};
self.currentLocale = DEFAULT_LOCALE;
self.defaultLocale = DEFAULT_LOCALE2;
self.formatConfig = DEFAULT_FORMAT_CONFIG;
self._forceLookupMatcher = tmp5;
items = [, ];
({ currentLocale: arr[0], defaultLocale: arr[1] } = self);
2026-07-23 10:11:24 +00:00
self.data = IntlManager(outer1_2[4]).makeDataFormatters(items, self.formatConfig, self._forceLookupMatcher);
2026-07-20 16:05:17 +00:00
set = new Set();
self._localeSubscriptions = set;
return;
}
}
let obj = {
key: "withFormatters",
2026-07-23 10:11:24 +00:00
value: function withFormatters(getLanguages) {
2026-07-20 16:05:17 +00:00
const self = this;
2026-07-23 10:11:24 +00:00
const entries = Object.entries(getLanguages);
2026-07-20 16:05:17 +00:00
while (tmp2 !== undefined) {
2026-07-23 10:11:24 +00:00
let tmp4 = outer1_3;
let tmp5 = outer1_3(tmp3, 2);
2026-07-20 16:05:17 +00:00
self[tmp5[0]] = self.makeFormatFunction(tmp5[1]);
2026-07-23 10:11:24 +00:00
continue;
2026-07-20 16:05:17 +00:00
}
return self;
}
};
2026-07-23 10:11:24 +00:00
let items = [obj, , , , , , ];
2026-07-20 16:05:17 +00:00
obj = {
key: "makeFormatFunction",
value: function makeFormatFunction(arg0) {
2026-07-23 10:11:24 +00:00
let closure_1;
2026-07-20 16:05:17 +00:00
let format;
2026-07-23 10:11:24 +00:00
const self = this;
2026-07-20 16:05:17 +00:00
({ format, builder: closure_1 } = arg0);
let closure_2 = format.bind(this);
return (arg0, arg1) => {
let tmp = null;
if (null != arg0) {
tmp = callback(arg0(self.currentLocale), arg1, closure_1);
}
return tmp;
};
}
};
items[1] = obj;
obj = {
key: "setLocale",
value: function setLocale(combined) {
this.currentLocale = combined;
const items = [, ];
({ currentLocale: arr[0], defaultLocale: arr[1] } = this);
2026-07-23 10:11:24 +00:00
this.data = IntlManager(outer1_2[4]).makeDataFormatters(items, this.formatConfig, this._forceLookupMatcher);
2026-07-20 16:05:17 +00:00
this.emitLocaleChange(combined);
}
};
items[2] = obj;
items[3] = {
key: "emitLocaleChange",
value: function emitLocaleChange(combined) {
for (const item10006 of tmp) {
let tmp2 = arg0;
let item10006Result = item10006(arg0);
2026-07-23 10:11:24 +00:00
continue;
2026-07-20 16:05:17 +00:00
}
}
};
items[4] = {
key: "string",
value: function string(arg0) {
let str = "";
if (null != arg0) {
const self = this;
str = arg0(this.currentLocale).reserialize();
const obj = arg0(this.currentLocale);
}
return str;
}
};
items[5] = {
key: "reserialize",
value: function reserialize(arg0) {
if (null == arg0) {
return "";
} else {
const self = this;
const obj = arg0(this.currentLocale);
let reserializeResult = obj;
if ("string" !== typeof obj) {
reserializeResult = obj.reserialize();
}
return reserializeResult;
}
}
};
items[6] = {
key: "bindFormatValues",
value: function bindFormatValues(Builder, ast, values) {
const items = [, ];
({ currentLocale: arr[0], defaultLocale: arr[1] } = this);
2026-07-23 10:11:24 +00:00
return IntlManager(outer1_2[5]).bindFormatValues({ Builder, nodes: ast.ast, locales: items, dataFormatters: this.data, formatConfig: this.formatConfig, values, keyPrefix: "" });
2026-07-20 16:05:17 +00:00
}
};
2026-07-23 10:11:24 +00:00
return _defineProperties(IntlManager, items);
})();