2026-10-10 08:08:14 +00:00
|
|
|
// Module ID: 4799
|
|
|
|
|
// Function ID: 4800
|
2026-09-10 05:38:07 +00:00
|
|
|
// Name: intlFormatDate
|
2026-10-10 08:08:14 +00:00
|
|
|
// Dependencies: [2129, 4796, 1126, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: makeFormatter
|
|
|
|
|
|
2026-10-10 08:08:14 +00:00
|
|
|
// Module 4799 (intlFormatDate)
|
|
|
|
|
import LocaleStore from "LocaleStore" /* 2129 */;
|
2026-10-03 08:58:59 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-07-20 16:05:17 +00:00
|
|
|
function makeIntlFormatter(locale, arg1) {
|
2026-07-29 08:29:29 +00:00
|
|
|
try {
|
|
|
|
|
const _Intl = Intl;
|
|
|
|
|
return Intl.DateTimeFormat(locale, arg1).format;
|
|
|
|
|
} catch (err) {
|
|
|
|
|
const _Intl2 = Intl;
|
2026-10-03 08:58:59 +00:00
|
|
|
return Intl.DateTimeFormat(undefined, arg1).format;
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
const result = size.fileFinishedImporting("lib/intlFormatDate.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export const makeFormatter = function makeFormatter(arg0) {
|
2026-10-03 08:58:59 +00:00
|
|
|
function tryMakeNativeFormatter(locale, arg1) {
|
|
|
|
|
let closure_0 = locale;
|
|
|
|
|
let closure_1 = arg1;
|
2026-09-10 05:38:07 +00:00
|
|
|
if (null == closure_0(closure_1[1]).makeFormatter) {
|
2026-07-20 16:05:17 +00:00
|
|
|
return null;
|
|
|
|
|
} else {
|
2026-07-29 08:29:29 +00:00
|
|
|
try {
|
2026-10-03 08:58:59 +00:00
|
|
|
let tmp8;
|
|
|
|
|
let tmp3 = null != locale;
|
|
|
|
|
if (tmp3) {
|
|
|
|
|
const first = locale.split("-")[0];
|
|
|
|
|
const str2 = closure_0(closure_1[2]).systemLocale;
|
|
|
|
|
let first1;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (str2 != null) {
|
2026-10-03 08:58:59 +00:00
|
|
|
first1 = str2.split("-")[0];
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
2026-10-03 08:58:59 +00:00
|
|
|
tmp3 = first === first1;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-10-03 08:58:59 +00:00
|
|
|
const makeFormatter = tmp(tmp2[1]).makeFormatter;
|
|
|
|
|
closure_0(closure_1[1]);
|
|
|
|
|
if (locale !== closure_0(closure_1[2]).initialLocale) {
|
|
|
|
|
tmp8 = locale;
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
2026-10-03 08:58:59 +00:00
|
|
|
const formatter = makeFormatter(tmp8, arg1);
|
2026-07-29 08:29:29 +00:00
|
|
|
if (null == formatter) {
|
|
|
|
|
return null;
|
|
|
|
|
} else {
|
2026-10-03 08:58:59 +00:00
|
|
|
let closure_3 = null;
|
2026-07-29 08:29:29 +00:00
|
|
|
return (arg0) => {
|
|
|
|
|
try {
|
|
|
|
|
return formatter(arg0);
|
|
|
|
|
} catch (err) {
|
2026-09-10 05:38:07 +00:00
|
|
|
if (null == closure_3) {
|
2026-10-03 08:58:59 +00:00
|
|
|
closure_3 = makeIntlFormatter(locale, closure_1);
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
2026-10-03 08:58:59 +00:00
|
|
|
return closure_3(arg0);
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
} catch (err) {
|
2026-10-03 08:58:59 +00:00
|
|
|
return null;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
}
|
2026-10-03 08:58:59 +00:00
|
|
|
}
|
|
|
|
|
const locale = LocaleStore.locale;
|
|
|
|
|
let tmp = tryMakeNativeFormatter(locale, arg0);
|
2026-07-20 16:05:17 +00:00
|
|
|
if (null == tmp) {
|
2026-10-03 08:58:59 +00:00
|
|
|
const tmp2 = makeIntlFormatter;
|
2026-07-20 16:05:17 +00:00
|
|
|
tmp = makeIntlFormatter(locale, arg0);
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
};
|