till download files, everything works

This commit is contained in:
dimitar committed 2024-11-01 22:13:14 +01:00
1 parent ce893a4185
commit ed1a580b09
6050 files changed
+768543 -177

No files matched your search

+105
View File
@@ -0,0 +1,105 @@
"use strict";
exports.formatDistance = void 0;
const formatDistanceLocale = {
lessThanXSeconds: {
one: "dưới 1 giây",
other: "dưới {{count}} giây",
},
xSeconds: {
one: "1 giây",
other: "{{count}} giây",
},
halfAMinute: "nửa phút",
lessThanXMinutes: {
one: "dưới 1 phút",
other: "dưới {{count}} phút",
},
xMinutes: {
one: "1 phút",
other: "{{count}} phút",
},
aboutXHours: {
one: "khoảng 1 giờ",
other: "khoảng {{count}} giờ",
},
xHours: {
one: "1 giờ",
other: "{{count}} giờ",
},
xDays: {
one: "1 ngày",
other: "{{count}} ngày",
},
aboutXWeeks: {
one: "khoảng 1 tuần",
other: "khoảng {{count}} tuần",
},
xWeeks: {
one: "1 tuần",
other: "{{count}} tuần",
},
aboutXMonths: {
one: "khoảng 1 tháng",
other: "khoảng {{count}} tháng",
},
xMonths: {
one: "1 tháng",
other: "{{count}} tháng",
},
aboutXYears: {
one: "khoảng 1 năm",
other: "khoảng {{count}} năm",
},
xYears: {
one: "1 năm",
other: "{{count}} năm",
},
overXYears: {
one: "hơn 1 năm",
other: "hơn {{count}} năm",
},
almostXYears: {
one: "gần 1 năm",
other: "gần {{count}} năm",
},
};
const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return result + " nữa";
} else {
return result + " trước";
}
}
return result;
};
exports.formatDistance = formatDistance;
+2
View File
@@ -0,0 +1,2 @@
import type { FormatDistanceFn } from "../../types.js";
export declare const formatDistance: FormatDistanceFn;
+2
View File
@@ -0,0 +1,2 @@
import type { FormatDistanceFn } from "../../types.js";
export declare const formatDistance: FormatDistanceFn;
+101
View File
@@ -0,0 +1,101 @@
const formatDistanceLocale = {
lessThanXSeconds: {
one: "dưới 1 giây",
other: "dưới {{count}} giây",
},
xSeconds: {
one: "1 giây",
other: "{{count}} giây",
},
halfAMinute: "nửa phút",
lessThanXMinutes: {
one: "dưới 1 phút",
other: "dưới {{count}} phút",
},
xMinutes: {
one: "1 phút",
other: "{{count}} phút",
},
aboutXHours: {
one: "khoảng 1 giờ",
other: "khoảng {{count}} giờ",
},
xHours: {
one: "1 giờ",
other: "{{count}} giờ",
},
xDays: {
one: "1 ngày",
other: "{{count}} ngày",
},
aboutXWeeks: {
one: "khoảng 1 tuần",
other: "khoảng {{count}} tuần",
},
xWeeks: {
one: "1 tuần",
other: "{{count}} tuần",
},
aboutXMonths: {
one: "khoảng 1 tháng",
other: "khoảng {{count}} tháng",
},
xMonths: {
one: "1 tháng",
other: "{{count}} tháng",
},
aboutXYears: {
one: "khoảng 1 năm",
other: "khoảng {{count}} năm",
},
xYears: {
one: "1 năm",
other: "{{count}} năm",
},
overXYears: {
one: "hơn 1 năm",
other: "hơn {{count}} năm",
},
almostXYears: {
one: "gần 1 năm",
other: "gần {{count}} năm",
},
};
export const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return result + " nữa";
} else {
return result + " trước";
}
}
return result;
};
+47
View File
@@ -0,0 +1,47 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.cjs");
const dateFormats = {
// thứ Sáu, ngày 25 tháng 08 năm 2017
full: "EEEE, 'ngày' d MMMM 'năm' y",
// ngày 25 tháng 08 năm 2017
long: "'ngày' d MMMM 'năm' y",
// 25 thg 08 năm 2017
medium: "d MMM 'năm' y",
// 25/08/2017
short: "dd/MM/y",
};
const timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm",
};
const dateTimeFormats = {
// thứ Sáu, ngày 25 tháng 08 năm 2017 23:25:59
full: "{{date}} {{time}}",
// ngày 25 tháng 08 năm 2017 23:25
long: "{{date}} {{time}}",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "full",
}),
});
+2
View File
@@ -0,0 +1,2 @@
import type { FormatLong } from "../../types.js";
export declare const formatLong: FormatLong;
+2
View File
@@ -0,0 +1,2 @@
import type { FormatLong } from "../../types.js";
export declare const formatLong: FormatLong;
+45
View File
@@ -0,0 +1,45 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.js";
const dateFormats = {
// thứ Sáu, ngày 25 tháng 08 năm 2017
full: "EEEE, 'ngày' d MMMM 'năm' y",
// ngày 25 tháng 08 năm 2017
long: "'ngày' d MMMM 'năm' y",
// 25 thg 08 năm 2017
medium: "d MMM 'năm' y",
// 25/08/2017
short: "dd/MM/y",
};
const timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm",
};
const dateTimeFormats = {
// thứ Sáu, ngày 25 tháng 08 năm 2017 23:25:59
full: "{{date}} {{time}}",
// ngày 25 tháng 08 năm 2017 23:25
long: "{{date}} {{time}}",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}",
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full",
}),
};
+15
View File
@@ -0,0 +1,15 @@
"use strict";
exports.formatRelative = void 0;
const formatRelativeLocale = {
lastWeek: "eeee 'tuần trước vào lúc' p",
yesterday: "'hôm qua vào lúc' p",
today: "'hôm nay vào lúc' p",
tomorrow: "'ngày mai vào lúc' p",
nextWeek: "eeee 'tới vào lúc' p",
other: "P",
};
const formatRelative = (token, _date, _baseDate, _options) =>
formatRelativeLocale[token];
exports.formatRelative = formatRelative;
+2
View File
@@ -0,0 +1,2 @@
import type { FormatRelativeFn } from "../../types.js";
export declare const formatRelative: FormatRelativeFn;
+2
View File
@@ -0,0 +1,2 @@
import type { FormatRelativeFn } from "../../types.js";
export declare const formatRelative: FormatRelativeFn;
+11
View File
@@ -0,0 +1,11 @@
const formatRelativeLocale = {
lastWeek: "eeee 'tuần trước vào lúc' p",
yesterday: "'hôm qua vào lúc' p",
today: "'hôm nay vào lúc' p",
tomorrow: "'ngày mai vào lúc' p",
nextWeek: "eeee 'tới vào lúc' p",
other: "P",
};
export const formatRelative = (token, _date, _baseDate, _options) =>
formatRelativeLocale[token];
+288
View File
@@ -0,0 +1,288 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.cjs");
// Vietnamese locale reference: http://www.localeplanet.com/icu/vi-VN/index.html
// Capitalization reference: http://hcmup.edu.vn/index.php?option=com_content&view=article&id=4106%3Avit-hoa-trong-vn-bn-hanh-chinh&catid=2345%3Atham-kho&Itemid=4103&lang=vi&site=134
const eraValues = {
narrow: ["TCN", "SCN"],
abbreviated: ["trước CN", "sau CN"],
wide: ["trước Công Nguyên", "sau Công Nguyên"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
wide: ["Quý 1", "Quý 2", "Quý 3", "Quý 4"],
};
const formattingQuarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
// I notice many news outlet use this "quý II/2018"
wide: ["quý I", "quý II", "quý III", "quý IV"],
};
// Note: in English, the names of days of the week and months are capitalized.
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
// Generally, formatted dates should look like they are in the middle of a sentence,
// e.g. in Spanish language the weekdays and months should be in the lowercase.
const monthValues = {
narrow: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
abbreviated: [
"Thg 1",
"Thg 2",
"Thg 3",
"Thg 4",
"Thg 5",
"Thg 6",
"Thg 7",
"Thg 8",
"Thg 9",
"Thg 10",
"Thg 11",
"Thg 12",
],
wide: [
"Tháng Một",
"Tháng Hai",
"Tháng Ba",
"Tháng Tư",
"Tháng Năm",
"Tháng Sáu",
"Tháng Bảy",
"Tháng Tám",
"Tháng Chín",
"Tháng Mười",
"Tháng Mười Một",
"Tháng Mười Hai",
],
};
// In Vietnamese date formatting, month number less than 10 expected to have leading zero
const formattingMonthValues = {
narrow: [
"01",
"02",
"03",
"04",
"05",
"06",
"07",
"08",
"09",
"10",
"11",
"12",
],
abbreviated: [
"thg 1",
"thg 2",
"thg 3",
"thg 4",
"thg 5",
"thg 6",
"thg 7",
"thg 8",
"thg 9",
"thg 10",
"thg 11",
"thg 12",
],
wide: [
"tháng 01",
"tháng 02",
"tháng 03",
"tháng 04",
"tháng 05",
"tháng 06",
"tháng 07",
"tháng 08",
"tháng 09",
"tháng 10",
"tháng 11",
"tháng 12",
],
};
const dayValues = {
narrow: ["CN", "T2", "T3", "T4", "T5", "T6", "T7"],
short: ["CN", "Th 2", "Th 3", "Th 4", "Th 5", "Th 6", "Th 7"],
abbreviated: ["CN", "Thứ 2", "Thứ 3", "Thứ 4", "Thứ 5", "Thứ 6", "Thứ 7"],
wide: [
"Chủ Nhật",
"Thứ Hai",
"Thứ Ba",
"Thứ Tư",
"Thứ Năm",
"Thứ Sáu",
"Thứ Bảy",
],
};
// Vietnamese are used to AM/PM borrowing from English, hence `narrow` and
// `abbreviated` are just like English but I'm leaving the `wide`
// format being localized with abbreviations found in some systems (SÁng / CHiều);
// however, personally, I don't think `Chiều` sounds appropriate for `PM`
const dayPeriodValues = {
// narrow date period is extremely rare in Vietnamese
// I used abbreviated form for noon, morning and afternoon
// which are regconizable by Vietnamese, others cannot be any shorter
narrow: {
am: "am",
pm: "pm",
midnight: "nửa đêm",
noon: "tr",
morning: "sg",
afternoon: "ch",
evening: "tối",
night: "đêm",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "nửa đêm",
noon: "trưa",
morning: "sáng",
afternoon: "chiều",
evening: "tối",
night: "đêm",
},
wide: {
am: "SA",
pm: "CH",
midnight: "nửa đêm",
noon: "trưa",
morning: "sáng",
afternoon: "chiều",
evening: "tối",
night: "đêm",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "am",
pm: "pm",
midnight: "nửa đêm",
noon: "tr",
morning: "sg",
afternoon: "ch",
evening: "tối",
night: "đêm",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "nửa đêm",
noon: "trưa",
morning: "sáng",
afternoon: "chiều",
evening: "tối",
night: "đêm",
},
wide: {
am: "SA",
pm: "CH",
midnight: "nửa đêm",
noon: "giữa trưa",
morning: "vào buổi sáng",
afternoon: "vào buổi chiều",
evening: "vào buổi tối",
night: "vào ban đêm",
},
};
const ordinalNumber = (dirtyNumber, options) => {
const number = Number(dirtyNumber);
const unit = options?.unit;
if (unit === "quarter") {
// many news outlets use "quý I"...
switch (number) {
case 1:
return "I";
case 2:
return "II";
case 3:
return "III";
case 4:
return "IV";
}
} else if (unit === "day") {
// day of week in Vietnamese has ordinal number meaning,
// so we should use them, else it'll sound weird
switch (number) {
case 1:
return "thứ 2"; // meaning 2nd day but it's the first day of the week :D
case 2:
return "thứ 3"; // meaning 3rd day
case 3:
return "thứ 4"; // meaning 4th day and so on
case 4:
return "thứ 5";
case 5:
return "thứ 6";
case 6:
return "thứ 7";
case 7:
return "chủ nhật"; // meaning Sunday, there's no 8th day :D
}
} else if (unit === "week") {
if (number === 1) {
return "thứ nhất";
} else {
return "thứ " + number;
}
} else if (unit === "dayOfYear") {
if (number === 1) {
return "đầu tiên";
} else {
return "thứ " + number;
}
}
// there are no different forms of ordinal numbers in Vietnamese
return String(number);
};
const localize = (exports.localize = {
ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
formattingValues: formattingQuarterValues,
defaultFormattingWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
formattingValues: formattingMonthValues,
defaultFormattingWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
});
+2
View File
@@ -0,0 +1,2 @@
import type { Localize } from "../../types.js";
export declare const localize: Localize;
+2
View File
@@ -0,0 +1,2 @@
import type { Localize } from "../../types.js";
export declare const localize: Localize;
+286
View File
@@ -0,0 +1,286 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.js";
// Vietnamese locale reference: http://www.localeplanet.com/icu/vi-VN/index.html
// Capitalization reference: http://hcmup.edu.vn/index.php?option=com_content&view=article&id=4106%3Avit-hoa-trong-vn-bn-hanh-chinh&catid=2345%3Atham-kho&Itemid=4103&lang=vi&site=134
const eraValues = {
narrow: ["TCN", "SCN"],
abbreviated: ["trước CN", "sau CN"],
wide: ["trước Công Nguyên", "sau Công Nguyên"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
wide: ["Quý 1", "Quý 2", "Quý 3", "Quý 4"],
};
const formattingQuarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
// I notice many news outlet use this "quý II/2018"
wide: ["quý I", "quý II", "quý III", "quý IV"],
};
// Note: in English, the names of days of the week and months are capitalized.
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
// Generally, formatted dates should look like they are in the middle of a sentence,
// e.g. in Spanish language the weekdays and months should be in the lowercase.
const monthValues = {
narrow: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
abbreviated: [
"Thg 1",
"Thg 2",
"Thg 3",
"Thg 4",
"Thg 5",
"Thg 6",
"Thg 7",
"Thg 8",
"Thg 9",
"Thg 10",
"Thg 11",
"Thg 12",
],
wide: [
"Tháng Một",
"Tháng Hai",
"Tháng Ba",
"Tháng Tư",
"Tháng Năm",
"Tháng Sáu",
"Tháng Bảy",
"Tháng Tám",
"Tháng Chín",
"Tháng Mười",
"Tháng Mười Một",
"Tháng Mười Hai",
],
};
// In Vietnamese date formatting, month number less than 10 expected to have leading zero
const formattingMonthValues = {
narrow: [
"01",
"02",
"03",
"04",
"05",
"06",
"07",
"08",
"09",
"10",
"11",
"12",
],
abbreviated: [
"thg 1",
"thg 2",
"thg 3",
"thg 4",
"thg 5",
"thg 6",
"thg 7",
"thg 8",
"thg 9",
"thg 10",
"thg 11",
"thg 12",
],
wide: [
"tháng 01",
"tháng 02",
"tháng 03",
"tháng 04",
"tháng 05",
"tháng 06",
"tháng 07",
"tháng 08",
"tháng 09",
"tháng 10",
"tháng 11",
"tháng 12",
],
};
const dayValues = {
narrow: ["CN", "T2", "T3", "T4", "T5", "T6", "T7"],
short: ["CN", "Th 2", "Th 3", "Th 4", "Th 5", "Th 6", "Th 7"],
abbreviated: ["CN", "Thứ 2", "Thứ 3", "Thứ 4", "Thứ 5", "Thứ 6", "Thứ 7"],
wide: [
"Chủ Nhật",
"Thứ Hai",
"Thứ Ba",
"Thứ Tư",
"Thứ Năm",
"Thứ Sáu",
"Thứ Bảy",
],
};
// Vietnamese are used to AM/PM borrowing from English, hence `narrow` and
// `abbreviated` are just like English but I'm leaving the `wide`
// format being localized with abbreviations found in some systems (SÁng / CHiều);
// however, personally, I don't think `Chiều` sounds appropriate for `PM`
const dayPeriodValues = {
// narrow date period is extremely rare in Vietnamese
// I used abbreviated form for noon, morning and afternoon
// which are regconizable by Vietnamese, others cannot be any shorter
narrow: {
am: "am",
pm: "pm",
midnight: "nửa đêm",
noon: "tr",
morning: "sg",
afternoon: "ch",
evening: "tối",
night: "đêm",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "nửa đêm",
noon: "trưa",
morning: "sáng",
afternoon: "chiều",
evening: "tối",
night: "đêm",
},
wide: {
am: "SA",
pm: "CH",
midnight: "nửa đêm",
noon: "trưa",
morning: "sáng",
afternoon: "chiều",
evening: "tối",
night: "đêm",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "am",
pm: "pm",
midnight: "nửa đêm",
noon: "tr",
morning: "sg",
afternoon: "ch",
evening: "tối",
night: "đêm",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "nửa đêm",
noon: "trưa",
morning: "sáng",
afternoon: "chiều",
evening: "tối",
night: "đêm",
},
wide: {
am: "SA",
pm: "CH",
midnight: "nửa đêm",
noon: "giữa trưa",
morning: "vào buổi sáng",
afternoon: "vào buổi chiều",
evening: "vào buổi tối",
night: "vào ban đêm",
},
};
const ordinalNumber = (dirtyNumber, options) => {
const number = Number(dirtyNumber);
const unit = options?.unit;
if (unit === "quarter") {
// many news outlets use "quý I"...
switch (number) {
case 1:
return "I";
case 2:
return "II";
case 3:
return "III";
case 4:
return "IV";
}
} else if (unit === "day") {
// day of week in Vietnamese has ordinal number meaning,
// so we should use them, else it'll sound weird
switch (number) {
case 1:
return "thứ 2"; // meaning 2nd day but it's the first day of the week :D
case 2:
return "thứ 3"; // meaning 3rd day
case 3:
return "thứ 4"; // meaning 4th day and so on
case 4:
return "thứ 5";
case 5:
return "thứ 6";
case 6:
return "thứ 7";
case 7:
return "chủ nhật"; // meaning Sunday, there's no 8th day :D
}
} else if (unit === "week") {
if (number === 1) {
return "thứ nhất";
} else {
return "thứ " + number;
}
} else if (unit === "dayOfYear") {
if (number === 1) {
return "đầu tiên";
} else {
return "thứ " + number;
}
}
// there are no different forms of ordinal numbers in Vietnamese
return String(number);
};
export const localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
formattingValues: formattingQuarterValues,
defaultFormattingWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
formattingValues: formattingMonthValues,
defaultFormattingWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};
+157
View File
@@ -0,0 +1,157 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchFn.cjs");
var _index2 = require("../../_lib/buildMatchPatternFn.cjs");
const matchOrdinalNumberPattern = /^(\d+)/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(tcn|scn)/i,
abbreviated: /^(trước CN|sau CN)/i,
wide: /^(trước Công Nguyên|sau Công Nguyên)/i,
};
const parseEraPatterns = {
any: [/^t/i, /^s/i],
};
const matchQuarterPatterns = {
narrow: /^([1234]|i{1,3}v?)/i,
abbreviated: /^q([1234]|i{1,3}v?)/i,
wide: /^quý ([1234]|i{1,3}v?)/i,
};
const parseQuarterPatterns = {
any: [/(1|i)$/i, /(2|ii)$/i, /(3|iii)$/i, /(4|iv)$/i],
};
const matchMonthPatterns = {
// month number may contain leading 0, 'thg' prefix may have space, underscore or empty before number
// note the order of '1' since it is a sub-string of '10', so must be lower priority
narrow: /^(0?[2-9]|10|11|12|0?1)/i,
// note the order of 'thg 1' since it is sub-string of 'thg 10', so must be lower priority
abbreviated: /^thg[ _]?(0?[1-9](?!\d)|10|11|12)/i,
// note the order of 'Mười' since it is sub-string of Mười Một, so must be lower priority
wide: /^tháng ?(Một|Hai|Ba|Tư|Năm|Sáu|Bảy|Tám|Chín|Mười|Mười ?Một|Mười ?Hai|0?[1-9](?!\d)|10|11|12)/i,
};
const parseMonthPatterns = {
narrow: [
/0?1$/i,
/0?2/i,
/3/,
/4/,
/5/,
/6/,
/7/,
/8/,
/9/,
/10/,
/11/,
/12/,
],
abbreviated: [
/^thg[ _]?0?1(?!\d)/i,
/^thg[ _]?0?2/i,
/^thg[ _]?0?3/i,
/^thg[ _]?0?4/i,
/^thg[ _]?0?5/i,
/^thg[ _]?0?6/i,
/^thg[ _]?0?7/i,
/^thg[ _]?0?8/i,
/^thg[ _]?0?9/i,
/^thg[ _]?10/i,
/^thg[ _]?11/i,
/^thg[ _]?12/i,
],
wide: [
/^tháng ?(Một|0?1(?!\d))/i,
/^tháng ?(Hai|0?2)/i,
/^tháng ?(Ba|0?3)/i,
/^tháng ?(Tư|0?4)/i,
/^tháng ?(Năm|0?5)/i,
/^tháng ?(Sáu|0?6)/i,
/^tháng ?(Bảy|0?7)/i,
/^tháng ?(Tám|0?8)/i,
/^tháng ?(Chín|0?9)/i,
/^tháng ?(Mười|10)/i,
/^tháng ?(Mười ?Một|11)/i,
/^tháng ?(Mười ?Hai|12)/i,
],
};
const matchDayPatterns = {
narrow: /^(CN|T2|T3|T4|T5|T6|T7)/i,
short: /^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,
abbreviated: /^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,
wide: /^(Chủ ?Nhật|Chúa ?Nhật|thứ ?Hai|thứ ?Ba|thứ ?Tư|thứ ?Năm|thứ ?Sáu|thứ ?Bảy)/i,
};
const parseDayPatterns = {
narrow: [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i],
short: [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i],
abbreviated: [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i],
wide: [/(Chủ|Chúa) ?Nhật/i, /Hai/i, /Ba/i, /Tư/i, /Năm/i, /Sáu/i, /Bảy/i],
};
const matchDayPeriodPatterns = {
narrow: /^(a|p|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,
abbreviated: /^(am|pm|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,
wide: /^(ch[^i]*|sa|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^(a|sa)/i,
pm: /^(p|ch[^i]*)/i,
midnight: /nửa đêm/i,
noon: /trưa/i,
morning: /sáng/i,
afternoon: /chiều/i,
evening: /tối/i,
night: /^đêm/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index2.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: (0, _index.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: (0, _index.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "wide",
}),
day: (0, _index.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "wide",
}),
dayPeriod: (0, _index.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});
+2
View File
@@ -0,0 +1,2 @@
import type { Match } from "../../types.js";
export declare const match: Match;
+2
View File
@@ -0,0 +1,2 @@
import type { Match } from "../../types.js";
export declare const match: Match;
+154
View File
@@ -0,0 +1,154 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.js";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.js";
const matchOrdinalNumberPattern = /^(\d+)/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(tcn|scn)/i,
abbreviated: /^(trước CN|sau CN)/i,
wide: /^(trước Công Nguyên|sau Công Nguyên)/i,
};
const parseEraPatterns = {
any: [/^t/i, /^s/i],
};
const matchQuarterPatterns = {
narrow: /^([1234]|i{1,3}v?)/i,
abbreviated: /^q([1234]|i{1,3}v?)/i,
wide: /^quý ([1234]|i{1,3}v?)/i,
};
const parseQuarterPatterns = {
any: [/(1|i)$/i, /(2|ii)$/i, /(3|iii)$/i, /(4|iv)$/i],
};
const matchMonthPatterns = {
// month number may contain leading 0, 'thg' prefix may have space, underscore or empty before number
// note the order of '1' since it is a sub-string of '10', so must be lower priority
narrow: /^(0?[2-9]|10|11|12|0?1)/i,
// note the order of 'thg 1' since it is sub-string of 'thg 10', so must be lower priority
abbreviated: /^thg[ _]?(0?[1-9](?!\d)|10|11|12)/i,
// note the order of 'Mười' since it is sub-string of Mười Một, so must be lower priority
wide: /^tháng ?(Một|Hai|Ba|Tư|Năm|Sáu|Bảy|Tám|Chín|Mười|Mười ?Một|Mười ?Hai|0?[1-9](?!\d)|10|11|12)/i,
};
const parseMonthPatterns = {
narrow: [
/0?1$/i,
/0?2/i,
/3/,
/4/,
/5/,
/6/,
/7/,
/8/,
/9/,
/10/,
/11/,
/12/,
],
abbreviated: [
/^thg[ _]?0?1(?!\d)/i,
/^thg[ _]?0?2/i,
/^thg[ _]?0?3/i,
/^thg[ _]?0?4/i,
/^thg[ _]?0?5/i,
/^thg[ _]?0?6/i,
/^thg[ _]?0?7/i,
/^thg[ _]?0?8/i,
/^thg[ _]?0?9/i,
/^thg[ _]?10/i,
/^thg[ _]?11/i,
/^thg[ _]?12/i,
],
wide: [
/^tháng ?(Một|0?1(?!\d))/i,
/^tháng ?(Hai|0?2)/i,
/^tháng ?(Ba|0?3)/i,
/^tháng ?(Tư|0?4)/i,
/^tháng ?(Năm|0?5)/i,
/^tháng ?(Sáu|0?6)/i,
/^tháng ?(Bảy|0?7)/i,
/^tháng ?(Tám|0?8)/i,
/^tháng ?(Chín|0?9)/i,
/^tháng ?(Mười|10)/i,
/^tháng ?(Mười ?Một|11)/i,
/^tháng ?(Mười ?Hai|12)/i,
],
};
const matchDayPatterns = {
narrow: /^(CN|T2|T3|T4|T5|T6|T7)/i,
short: /^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,
abbreviated: /^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,
wide: /^(Chủ ?Nhật|Chúa ?Nhật|thứ ?Hai|thứ ?Ba|thứ ?Tư|thứ ?Năm|thứ ?Sáu|thứ ?Bảy)/i,
};
const parseDayPatterns = {
narrow: [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i],
short: [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i],
abbreviated: [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i],
wide: [/(Chủ|Chúa) ?Nhật/i, /Hai/i, /Ba/i, /Tư/i, /Năm/i, /Sáu/i, /Bảy/i],
};
const matchDayPeriodPatterns = {
narrow: /^(a|p|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,
abbreviated: /^(am|pm|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,
wide: /^(ch[^i]*|sa|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^(a|sa)/i,
pm: /^(p|ch[^i]*)/i,
midnight: /nửa đêm/i,
noon: /trưa/i,
morning: /sáng/i,
afternoon: /chiều/i,
evening: /tối/i,
night: /^đêm/i,
},
};
export const match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "wide",
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "wide",
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};
+631
View File
@@ -0,0 +1,631 @@
(() => {
var _window$dateFns;function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}var __defProp = Object.defineProperty;
var __export = function __export(target, all) {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: function set(newValue) {return all[name] = function () {return newValue;};}
});
};
// lib/locale/vi/_lib/formatDistance.js
var formatDistanceLocale = {
lessThanXSeconds: {
one: "d\u01B0\u1EDBi 1 gi\xE2y",
other: "d\u01B0\u1EDBi {{count}} gi\xE2y"
},
xSeconds: {
one: "1 gi\xE2y",
other: "{{count}} gi\xE2y"
},
halfAMinute: "n\u1EEDa ph\xFAt",
lessThanXMinutes: {
one: "d\u01B0\u1EDBi 1 ph\xFAt",
other: "d\u01B0\u1EDBi {{count}} ph\xFAt"
},
xMinutes: {
one: "1 ph\xFAt",
other: "{{count}} ph\xFAt"
},
aboutXHours: {
one: "kho\u1EA3ng 1 gi\u1EDD",
other: "kho\u1EA3ng {{count}} gi\u1EDD"
},
xHours: {
one: "1 gi\u1EDD",
other: "{{count}} gi\u1EDD"
},
xDays: {
one: "1 ng\xE0y",
other: "{{count}} ng\xE0y"
},
aboutXWeeks: {
one: "kho\u1EA3ng 1 tu\u1EA7n",
other: "kho\u1EA3ng {{count}} tu\u1EA7n"
},
xWeeks: {
one: "1 tu\u1EA7n",
other: "{{count}} tu\u1EA7n"
},
aboutXMonths: {
one: "kho\u1EA3ng 1 th\xE1ng",
other: "kho\u1EA3ng {{count}} th\xE1ng"
},
xMonths: {
one: "1 th\xE1ng",
other: "{{count}} th\xE1ng"
},
aboutXYears: {
one: "kho\u1EA3ng 1 n\u0103m",
other: "kho\u1EA3ng {{count}} n\u0103m"
},
xYears: {
one: "1 n\u0103m",
other: "{{count}} n\u0103m"
},
overXYears: {
one: "h\u01A1n 1 n\u0103m",
other: "h\u01A1n {{count}} n\u0103m"
},
almostXYears: {
one: "g\u1EA7n 1 n\u0103m",
other: "g\u1EA7n {{count}} n\u0103m"
}
};
var formatDistance = function formatDistance(token, count, options) {
var result;
var tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return result + " n\u1EEFa";
} else {
return result + " tr\u01B0\u1EDBc";
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.js
function buildFormatLongFn(args) {
return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var width = options.width ? String(options.width) : args.defaultWidth;
var format = args.formats[width] || args.formats[args.defaultWidth];
return format;
};
}
// lib/locale/vi/_lib/formatLong.js
var dateFormats = {
full: "EEEE, 'ng\xE0y' d MMMM 'n\u0103m' y",
long: "'ng\xE0y' d MMMM 'n\u0103m' y",
medium: "d MMM 'n\u0103m' y",
short: "dd/MM/y"
};
var timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm"
};
var dateTimeFormats = {
full: "{{date}} {{time}}",
long: "{{date}} {{time}}",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full"
})
};
// lib/locale/vi/_lib/formatRelative.js
var formatRelativeLocale = {
lastWeek: "eeee 'tu\u1EA7n tr\u01B0\u1EDBc v\xE0o l\xFAc' p",
yesterday: "'h\xF4m qua v\xE0o l\xFAc' p",
today: "'h\xF4m nay v\xE0o l\xFAc' p",
tomorrow: "'ng\xE0y mai v\xE0o l\xFAc' p",
nextWeek: "eeee 't\u1EDBi v\xE0o l\xFAc' p",
other: "P"
};
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {return formatRelativeLocale[token];};
// lib/locale/_lib/buildLocalizeFn.js
function buildLocalizeFn(args) {
return function (value, options) {
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
var valuesArray;
if (context === "formatting" && args.formattingValues) {
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
} else {
var _defaultWidth = args.defaultWidth;
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
valuesArray = args.values[_width] || args.values[_defaultWidth];
}
var index = args.argumentCallback ? args.argumentCallback(value) : value;
return valuesArray[index];
};
}
// lib/locale/vi/_lib/localize.js
var eraValues = {
narrow: ["TCN", "SCN"],
abbreviated: ["tr\u01B0\u1EDBc CN", "sau CN"],
wide: ["tr\u01B0\u1EDBc C\xF4ng Nguy\xEAn", "sau C\xF4ng Nguy\xEAn"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
wide: ["Qu\xFD 1", "Qu\xFD 2", "Qu\xFD 3", "Qu\xFD 4"]
};
var formattingQuarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
wide: ["qu\xFD I", "qu\xFD II", "qu\xFD III", "qu\xFD IV"]
};
var monthValues = {
narrow: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
abbreviated: [
"Thg 1",
"Thg 2",
"Thg 3",
"Thg 4",
"Thg 5",
"Thg 6",
"Thg 7",
"Thg 8",
"Thg 9",
"Thg 10",
"Thg 11",
"Thg 12"],
wide: [
"Th\xE1ng M\u1ED9t",
"Th\xE1ng Hai",
"Th\xE1ng Ba",
"Th\xE1ng T\u01B0",
"Th\xE1ng N\u0103m",
"Th\xE1ng S\xE1u",
"Th\xE1ng B\u1EA3y",
"Th\xE1ng T\xE1m",
"Th\xE1ng Ch\xEDn",
"Th\xE1ng M\u01B0\u1EDDi",
"Th\xE1ng M\u01B0\u1EDDi M\u1ED9t",
"Th\xE1ng M\u01B0\u1EDDi Hai"]
};
var formattingMonthValues = {
narrow: [
"01",
"02",
"03",
"04",
"05",
"06",
"07",
"08",
"09",
"10",
"11",
"12"],
abbreviated: [
"thg 1",
"thg 2",
"thg 3",
"thg 4",
"thg 5",
"thg 6",
"thg 7",
"thg 8",
"thg 9",
"thg 10",
"thg 11",
"thg 12"],
wide: [
"th\xE1ng 01",
"th\xE1ng 02",
"th\xE1ng 03",
"th\xE1ng 04",
"th\xE1ng 05",
"th\xE1ng 06",
"th\xE1ng 07",
"th\xE1ng 08",
"th\xE1ng 09",
"th\xE1ng 10",
"th\xE1ng 11",
"th\xE1ng 12"]
};
var dayValues = {
narrow: ["CN", "T2", "T3", "T4", "T5", "T6", "T7"],
short: ["CN", "Th 2", "Th 3", "Th 4", "Th 5", "Th 6", "Th 7"],
abbreviated: ["CN", "Th\u1EE9 2", "Th\u1EE9 3", "Th\u1EE9 4", "Th\u1EE9 5", "Th\u1EE9 6", "Th\u1EE9 7"],
wide: [
"Ch\u1EE7 Nh\u1EADt",
"Th\u1EE9 Hai",
"Th\u1EE9 Ba",
"Th\u1EE9 T\u01B0",
"Th\u1EE9 N\u0103m",
"Th\u1EE9 S\xE1u",
"Th\u1EE9 B\u1EA3y"]
};
var dayPeriodValues = {
narrow: {
am: "am",
pm: "pm",
midnight: "n\u1EEDa \u0111\xEAm",
noon: "tr",
morning: "sg",
afternoon: "ch",
evening: "t\u1ED1i",
night: "\u0111\xEAm"
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "n\u1EEDa \u0111\xEAm",
noon: "tr\u01B0a",
morning: "s\xE1ng",
afternoon: "chi\u1EC1u",
evening: "t\u1ED1i",
night: "\u0111\xEAm"
},
wide: {
am: "SA",
pm: "CH",
midnight: "n\u1EEDa \u0111\xEAm",
noon: "tr\u01B0a",
morning: "s\xE1ng",
afternoon: "chi\u1EC1u",
evening: "t\u1ED1i",
night: "\u0111\xEAm"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "am",
pm: "pm",
midnight: "n\u1EEDa \u0111\xEAm",
noon: "tr",
morning: "sg",
afternoon: "ch",
evening: "t\u1ED1i",
night: "\u0111\xEAm"
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "n\u1EEDa \u0111\xEAm",
noon: "tr\u01B0a",
morning: "s\xE1ng",
afternoon: "chi\u1EC1u",
evening: "t\u1ED1i",
night: "\u0111\xEAm"
},
wide: {
am: "SA",
pm: "CH",
midnight: "n\u1EEDa \u0111\xEAm",
noon: "gi\u1EEFa tr\u01B0a",
morning: "v\xE0o bu\u1ED5i s\xE1ng",
afternoon: "v\xE0o bu\u1ED5i chi\u1EC1u",
evening: "v\xE0o bu\u1ED5i t\u1ED1i",
night: "v\xE0o ban \u0111\xEAm"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, options) {
var number = Number(dirtyNumber);
var unit = options === null || options === void 0 ? void 0 : options.unit;
if (unit === "quarter") {
switch (number) {
case 1:
return "I";
case 2:
return "II";
case 3:
return "III";
case 4:
return "IV";
}
} else if (unit === "day") {
switch (number) {
case 1:
return "th\u1EE9 2";
case 2:
return "th\u1EE9 3";
case 3:
return "th\u1EE9 4";
case 4:
return "th\u1EE9 5";
case 5:
return "th\u1EE9 6";
case 6:
return "th\u1EE9 7";
case 7:
return "ch\u1EE7 nh\u1EADt";
}
} else if (unit === "week") {
if (number === 1) {
return "th\u1EE9 nh\u1EA5t";
} else {
return "th\u1EE9 " + number;
}
} else if (unit === "dayOfYear") {
if (number === 1) {
return "\u0111\u1EA7u ti\xEAn";
} else {
return "th\u1EE9 " + number;
}
}
return String(number);
};
var localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide"
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
formattingValues: formattingQuarterValues,
defaultFormattingWidth: "wide",
argumentCallback: function argumentCallback(quarter) {return quarter - 1;}
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
formattingValues: formattingMonthValues,
defaultFormattingWidth: "wide"
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide"
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide"
})
};
// lib/locale/_lib/buildMatchFn.js
function buildMatchFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var width = options.width;
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
var matchResult = string.match(matchPattern);
if (!matchResult) {
return null;
}
var matchedString = matchResult[0];
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
var value;
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
}
function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
}
// lib/locale/_lib/buildMatchPatternFn.js
function buildMatchPatternFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var matchResult = string.match(args.matchPattern);
if (!matchResult)
return null;
var matchedString = matchResult[0];
var parseResult = string.match(args.parsePattern);
if (!parseResult)
return null;
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
// lib/locale/vi/_lib/match.js
var matchOrdinalNumberPattern = /^(\d+)/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(tcn|scn)/i,
abbreviated: /^(trước CN|sau CN)/i,
wide: /^(trước Công Nguyên|sau Công Nguyên)/i
};
var parseEraPatterns = {
any: [/^t/i, /^s/i]
};
var matchQuarterPatterns = {
narrow: /^([1234]|i{1,3}v?)/i,
abbreviated: /^q([1234]|i{1,3}v?)/i,
wide: /^quý ([1234]|i{1,3}v?)/i
};
var parseQuarterPatterns = {
any: [/(1|i)$/i, /(2|ii)$/i, /(3|iii)$/i, /(4|iv)$/i]
};
var matchMonthPatterns = {
narrow: /^(0?[2-9]|10|11|12|0?1)/i,
abbreviated: /^thg[ _]?(0?[1-9](?!\d)|10|11|12)/i,
wide: /^tháng ?(Một|Hai|Ba|Tư|Năm|Sáu|Bảy|Tám|Chín|Mười|Mười ?Một|Mười ?Hai|0?[1-9](?!\d)|10|11|12)/i
};
var parseMonthPatterns = {
narrow: [
/0?1$/i,
/0?2/i,
/3/,
/4/,
/5/,
/6/,
/7/,
/8/,
/9/,
/10/,
/11/,
/12/],
abbreviated: [
/^thg[ _]?0?1(?!\d)/i,
/^thg[ _]?0?2/i,
/^thg[ _]?0?3/i,
/^thg[ _]?0?4/i,
/^thg[ _]?0?5/i,
/^thg[ _]?0?6/i,
/^thg[ _]?0?7/i,
/^thg[ _]?0?8/i,
/^thg[ _]?0?9/i,
/^thg[ _]?10/i,
/^thg[ _]?11/i,
/^thg[ _]?12/i],
wide: [
/^tháng ?(Một|0?1(?!\d))/i,
/^tháng ?(Hai|0?2)/i,
/^tháng ?(Ba|0?3)/i,
/^tháng ?(Tư|0?4)/i,
/^tháng ?(Năm|0?5)/i,
/^tháng ?(Sáu|0?6)/i,
/^tháng ?(Bảy|0?7)/i,
/^tháng ?(Tám|0?8)/i,
/^tháng ?(Chín|0?9)/i,
/^tháng ?(Mười|10)/i,
/^tháng ?(Mười ?Một|11)/i,
/^tháng ?(Mười ?Hai|12)/i]
};
var matchDayPatterns = {
narrow: /^(CN|T2|T3|T4|T5|T6|T7)/i,
short: /^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,
abbreviated: /^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,
wide: /^(Chủ ?Nhật|Chúa ?Nhật|thứ ?Hai|thứ ?Ba|thứ ?Tư|thứ ?Năm|thứ ?Sáu|thứ ?Bảy)/i
};
var parseDayPatterns = {
narrow: [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i],
short: [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i],
abbreviated: [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i],
wide: [/(Chủ|Chúa) ?Nhật/i, /Hai/i, /Ba/i, /Tư/i, /Năm/i, /Sáu/i, /Bảy/i]
};
var matchDayPeriodPatterns = {
narrow: /^(a|p|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,
abbreviated: /^(am|pm|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,
wide: /^(ch[^i]*|sa|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i
};
var parseDayPeriodPatterns = {
any: {
am: /^(a|sa)/i,
pm: /^(p|ch[^i]*)/i,
midnight: /nửa đêm/i,
noon: /trưa/i,
morning: /sáng/i,
afternoon: /chiều/i,
evening: /tối/i,
night: /^đêm/i
}
};
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {return parseInt(value, 10);}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any"
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: function valueCallback(index) {return index + 1;}
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "wide"
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "wide"
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any"
})
};
// lib/locale/vi.js
var vi = {
code: "vi",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1,
firstWeekContainsDate: 1
}
};
// lib/locale/vi/cdn.js
window.dateFns = _objectSpread(_objectSpread({},
window.dateFns), {}, {
locale: _objectSpread(_objectSpread({}, (_window$dateFns =
window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
vi: vi }) });
//# debugId=99CB759AEAC8A3D464756E2164756E21
//# sourceMappingURL=cdn.js.map
})();
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"cdn.js","names":["__defProp","Object","defineProperty","__export","target","all","name","get","enumerable","configurable","set","newValue","formatDistanceLocale","lessThanXSeconds","one","other","xSeconds","halfAMinute","lessThanXMinutes","xMinutes","aboutXHours","xHours","xDays","aboutXWeeks","xWeeks","aboutXMonths","xMonths","aboutXYears","xYears","overXYears","almostXYears","formatDistance","token","count","options","result","tokenValue","replace","String","addSuffix","comparison","buildFormatLongFn","args","arguments","length","undefined","width","defaultWidth","format","formats","dateFormats","full","long","medium","short","timeFormats","dateTimeFormats","formatLong","date","time","dateTime","formatRelativeLocale","lastWeek","yesterday","today","tomorrow","nextWeek","formatRelative","_date","_baseDate","_options","buildLocalizeFn","value","context","valuesArray","formattingValues","defaultFormattingWidth","values","index","argumentCallback","eraValues","narrow","abbreviated","wide","quarterValues","formattingQuarterValues","monthValues","formattingMonthValues","dayValues","dayPeriodValues","am","pm","midnight","noon","morning","afternoon","evening","night","formattingDayPeriodValues","ordinalNumber","dirtyNumber","number","Number","unit","localize","era","quarter","month","day","dayPeriod","buildMatchFn","string","matchPattern","matchPatterns","defaultMatchWidth","matchResult","match","matchedString","parsePatterns","defaultParseWidth","key","Array","isArray","findIndex","pattern","test","findKey","valueCallback","rest","slice","object","predicate","prototype","hasOwnProperty","call","array","buildMatchPatternFn","parseResult","parsePattern","matchOrdinalNumberPattern","parseOrdinalNumberPattern","matchEraPatterns","parseEraPatterns","any","matchQuarterPatterns","parseQuarterPatterns","matchMonthPatterns","parseMonthPatterns","matchDayPatterns","parseDayPatterns","matchDayPeriodPatterns","parseDayPeriodPatterns","parseInt","vi","code","weekStartsOn","firstWeekContainsDate","window","dateFns","_objectSpread","locale","_window$dateFns"],"sources":["cdn.js"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, {\n get: all[name],\n enumerable: true,\n configurable: true,\n set: (newValue) => all[name] = () => newValue\n });\n};\n\n// lib/locale/vi/_lib/formatDistance.js\nvar formatDistanceLocale = {\n lessThanXSeconds: {\n one: \"d\\u01B0\\u1EDBi 1 gi\\xE2y\",\n other: \"d\\u01B0\\u1EDBi {{count}} gi\\xE2y\"\n },\n xSeconds: {\n one: \"1 gi\\xE2y\",\n other: \"{{count}} gi\\xE2y\"\n },\n halfAMinute: \"n\\u1EEDa ph\\xFAt\",\n lessThanXMinutes: {\n one: \"d\\u01B0\\u1EDBi 1 ph\\xFAt\",\n other: \"d\\u01B0\\u1EDBi {{count}} ph\\xFAt\"\n },\n xMinutes: {\n one: \"1 ph\\xFAt\",\n other: \"{{count}} ph\\xFAt\"\n },\n aboutXHours: {\n one: \"kho\\u1EA3ng 1 gi\\u1EDD\",\n other: \"kho\\u1EA3ng {{count}} gi\\u1EDD\"\n },\n xHours: {\n one: \"1 gi\\u1EDD\",\n other: \"{{count}} gi\\u1EDD\"\n },\n xDays: {\n one: \"1 ng\\xE0y\",\n other: \"{{count}} ng\\xE0y\"\n },\n aboutXWeeks: {\n one: \"kho\\u1EA3ng 1 tu\\u1EA7n\",\n other: \"kho\\u1EA3ng {{count}} tu\\u1EA7n\"\n },\n xWeeks: {\n one: \"1 tu\\u1EA7n\",\n other: \"{{count}} tu\\u1EA7n\"\n },\n aboutXMonths: {\n one: \"kho\\u1EA3ng 1 th\\xE1ng\",\n other: \"kho\\u1EA3ng {{count}} th\\xE1ng\"\n },\n xMonths: {\n one: \"1 th\\xE1ng\",\n other: \"{{count}} th\\xE1ng\"\n },\n aboutXYears: {\n one: \"kho\\u1EA3ng 1 n\\u0103m\",\n other: \"kho\\u1EA3ng {{count}} n\\u0103m\"\n },\n xYears: {\n one: \"1 n\\u0103m\",\n other: \"{{count}} n\\u0103m\"\n },\n overXYears: {\n one: \"h\\u01A1n 1 n\\u0103m\",\n other: \"h\\u01A1n {{count}} n\\u0103m\"\n },\n almostXYears: {\n one: \"g\\u1EA7n 1 n\\u0103m\",\n other: \"g\\u1EA7n {{count}} n\\u0103m\"\n }\n};\nvar formatDistance = (token, count, options) => {\n let result;\n const tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === \"string\") {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace(\"{{count}}\", String(count));\n }\n if (options?.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return result + \" n\\u1EEFa\";\n } else {\n return result + \" tr\\u01B0\\u1EDBc\";\n }\n }\n return result;\n};\n\n// lib/locale/_lib/buildFormatLongFn.js\nfunction buildFormatLongFn(args) {\n return (options = {}) => {\n const width = options.width ? String(options.width) : args.defaultWidth;\n const format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}\n\n// lib/locale/vi/_lib/formatLong.js\nvar dateFormats = {\n full: \"EEEE, 'ng\\xE0y' d MMMM 'n\\u0103m' y\",\n long: \"'ng\\xE0y' d MMMMLine truncated
+3
View File
@@ -0,0 +1,3 @@
(()=>{var $;function C(G){return C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},C(G)}function E(G,H){var J=Object.keys(G);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(G);H&&(X=X.filter(function(Y){return Object.getOwnPropertyDescriptor(G,Y).enumerable})),J.push.apply(J,X)}return J}function q(G){for(var H=1;H<arguments.length;H++){var J=arguments[H]!=null?arguments[H]:{};H%2?E(Object(J),!0).forEach(function(X){N(G,X,J[X])}):Object.getOwnPropertyDescriptors?Object.defineProperties(G,Object.getOwnPropertyDescriptors(J)):E(Object(J)).forEach(function(X){Object.defineProperty(G,X,Object.getOwnPropertyDescriptor(J,X))})}return G}function N(G,H,J){if(H=z(H),H in G)Object.defineProperty(G,H,{value:J,enumerable:!0,configurable:!0,writable:!0});else G[H]=J;return G}function z(G){var H=A(G,"string");return C(H)=="symbol"?H:String(H)}function A(G,H){if(C(G)!="object"||!G)return G;var J=G[Symbol.toPrimitive];if(J!==void 0){var X=J.call(G,H||"default");if(C(X)!="object")return X;throw new TypeError("@@toPrimitive must return a primitive value.")}return(H==="string"?String:Number)(G)}var W=Object.defineProperty,YG=function G(H,J){for(var X in J)W(H,X,{get:J[X],enumerable:!0,configurable:!0,set:function Y(Z){return J[X]=function(){return Z}}})},D={lessThanXSeconds:{one:"d\u01B0\u1EDBi 1 gi\xE2y",other:"d\u01B0\u1EDBi {{count}} gi\xE2y"},xSeconds:{one:"1 gi\xE2y",other:"{{count}} gi\xE2y"},halfAMinute:"n\u1EEDa ph\xFAt",lessThanXMinutes:{one:"d\u01B0\u1EDBi 1 ph\xFAt",other:"d\u01B0\u1EDBi {{count}} ph\xFAt"},xMinutes:{one:"1 ph\xFAt",other:"{{count}} ph\xFAt"},aboutXHours:{one:"kho\u1EA3ng 1 gi\u1EDD",other:"kho\u1EA3ng {{count}} gi\u1EDD"},xHours:{one:"1 gi\u1EDD",other:"{{count}} gi\u1EDD"},xDays:{one:"1 ng\xE0y",other:"{{count}} ng\xE0y"},aboutXWeeks:{one:"kho\u1EA3ng 1 tu\u1EA7n",other:"kho\u1EA3ng {{count}} tu\u1EA7n"},xWeeks:{one:"1 tu\u1EA7n",other:"{{count}} tu\u1EA7n"},aboutXMonths:{one:"kho\u1EA3ng 1 th\xE1ng",other:"kho\u1EA3ng {{count}} th\xE1ng"},xMonths:{one:"1 th\xE1ng",other:"{{count}} th\xE1ng"},aboutXYears:{one:"kho\u1EA3ng 1 n\u0103m",other:"kho\u1EA3ng {{count}} n\u0103m"},xYears:{one:"1 n\u0103m",other:"{{count}} n\u0103m"},overXYears:{one:"h\u01A1n 1 n\u0103m",other:"h\u01A1n {{count}} n\u0103m"},almostXYears:{one:"g\u1EA7n 1 n\u0103m",other:"g\u1EA7n {{count}} n\u0103m"}},S=function G(H,J,X){var Y,Z=D[H];if(typeof Z==="string")Y=Z;else if(J===1)Y=Z.one;else Y=Z.other.replace("{{count}}",String(J));if(X!==null&&X!==void 0&&X.addSuffix)if(X.comparison&&X.comparison>0)return Y+" n\u1EEFa";else return Y+" tr\u01B0\u1EDBc";return Y};function K(G){return function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},J=H.width?String(H.width):G.defaultWidth,X=G.formats[J]||G.formats[G.defaultWidth];return X}}var M={full:"EEEE, 'ng\xE0y' d MMMM 'n\u0103m' y",long:"'ng\xE0y' d MMMM 'n\u0103m' y",medium:"d MMM 'n\u0103m' y",short:"dd/MM/y"},R={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},L={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},V={date:K({formats:M,defaultWidth:"full"}),time:K({formats:R,defaultWidth:"full"}),dateTime:K({formats:L,defaultWidth:"full"})},j={lastWeek:"eeee 'tu\u1EA7n tr\u01B0\u1EDBc v\xE0o l\xFAc' p",yesterday:"'h\xF4m qua v\xE0o l\xFAc' p",today:"'h\xF4m nay v\xE0o l\xFAc' p",tomorrow:"'ng\xE0y mai v\xE0o l\xFAc' p",nextWeek:"eeee 't\u1EDBi v\xE0o l\xFAc' p",other:"P"},w=function G(H,J,X,Y){return j[H]};function I(G){return function(H,J){var X=J!==null&&J!==void 0&&J.context?String(J.context):"standalone",Y;if(X==="formatting"&&G.formattingValues){var Z=G.defaultFormattingWidth||G.defaultWidth,B=J!==null&&J!==void 0&&J.width?String(J.width):Z;Y=G.formattingValues[B]||G.formattingValues[Z]}else{var T=G.defaultWidth,Q=J!==null&&J!==void 0&&J.width?String(J.width):G.defaultWidth;Y=G.values[Q]||G.values[T]}var U=G.argumentCallback?G.argumentCallback(H):H;return Y[U]}}var _={narrow:["TCN","SCN"],abbreviated:["tr\u01B0\u1EDBc CN","sau CN"],wide:["tr\u01B0\u1EDBc C\xF4ng Nguy\xEAn","sau C\xF4ng Nguy\xEAn"]},F={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["Qu\xFD 1","Qu\xFD 2","Qu\xFD 3","Qu\xFD 4"]},f={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["qu\xFD I","qu\xFD II","qu\xFD III","qu\xFD IV"]},P={narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["Thg 1","Thg 2","Thg 3","Thg 4","Thg 5","Thg 6","Thg 7","Thg 8","Thg 9","Thg 10","Thg 11","Thg 12"],wide:["Th\xE1ng M\u1ED9t","Th\xE1ng Hai","Th\xE1ng Ba","Th\xE1ng T\u01B0","Th\xE1ng N\u0103m","Th\xE1ng S\xE1u","Th\xE1ng B\u1EA3y","Th\xE1ng T\xE1m","Th\xE1ng Ch\xEDn","Th\xE1ng M\u01B0\u1EDDi","Th\xE1ng M\u01B0\u1EDDi M\u1ED9t","Th\xE1ng M\u01B0\u1EDDi Hai"]},v={narrow:["01","02","03","04","05","06","07","08","09","Line truncated
//# debugId=6C2318370AAF54DE64756E2164756E21
+10
View File
@@ -0,0 +1,10 @@
{
"version": 3,
"sources": ["lib/locale/vi/cdn.js"],
"sourcesContent": [
"(() => {\nvar _window$dateFns;function _typeof(o) {\"@babel/helpers - typeof\";return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, \"string\");return \"symbol\" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if (\"object\" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || \"default\");if (\"object\" != _typeof(i)) return i;throw new TypeError(\"@@toPrimitive must return a primitive value.\");}return (\"string\" === r ? String : Number)(t);}var __defProp = Object.defineProperty;\nvar __export = function __export(target, all) {\n for (var name in all)\n __defProp(target, name, {\n get: all[name],\n enumerable: true,\n configurable: true,\n set: function set(newValue) {return all[name] = function () {return newValue;};}\n });\n};\n\n// lib/locale/vi/_lib/formatDistance.js\nvar formatDistanceLocale = {\n lessThanXSeconds: {\n one: \"d\\u01B0\\u1EDBi 1 gi\\xE2y\",\n other: \"d\\u01B0\\u1EDBi {{count}} gi\\xE2y\"\n },\n xSeconds: {\n one: \"1 gi\\xE2y\",\n other: \"{{count}} gi\\xE2y\"\n },\n halfAMinute: \"n\\u1EEDa ph\\xFAt\",\n lessThanXMinutes: {\n one: \"d\\u01B0\\u1EDBi 1 ph\\xFAt\",\n other: \"d\\u01B0\\u1EDBi {{count}} ph\\xFAt\"\n },\n xMinutes: {\n one: \"1 ph\\xFAt\",\n other: \"{{count}} ph\\xFAt\"\n },\n aboutXHours: {\n one: \"kho\\u1EA3ng 1 gi\\u1EDD\",\n other: \"kho\\u1EA3ng {{count}} gi\\u1EDD\"\n },\n xHours: {\n one: \"1 gi\\u1EDD\",\n other: \"{{count}} gi\\u1EDD\"\n },\n xDays: {\n one: \"1 ng\\xE0y\",\n other: \"{{count}} ng\\xE0y\"\n },\n aboutXWeeks: {\n one: \"kho\\u1EA3ng 1 tu\\u1EA7n\",\n other: \"kho\\u1EA3ng {{count}} tu\\u1EA7n\"\n },\n xWeeks: {\n one: \"1 tu\\u1EA7n\",\n other: \"{{count}} tu\\u1EA7n\"\n },\n aboutXMonths: {\n one: \"kho\\u1EA3ng 1 th\\xE1ng\",\n other: \"kho\\u1EA3ng {{count}} th\\xE1ng\"\n },\n xMonths: {\n one: \"1 th\\xE1ng\",\n other: \"{{count}} th\\xE1ng\"\n },\n aboutXYears: {\n one: \"kho\\u1EA3ng 1 n\\u0103m\",\n other: \"kho\\u1EA3ng {{count}} n\\u0103m\"\n },\n xYears: {\n one: \"1 n\\u0103m\",\n other: \"{{count}} n\\u0103m\"\n },\n overXYears: {\n one: \"h\\u01A1n 1 n\\u0103m\",\n other: \"h\\u01A1n {{count}} n\\u0103m\"\n },\n almostXYears: {\n one: \"g\\u1EA7n 1 n\\u0103m\",\n other: \"g\\u1EA7n {{count}} n\\u0103m\"\n }\n};\nvar formatDistance = function formatDistance(token, count, options) {\n var result;\n var tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === \"string\") {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace(\"{{count}}\", String(count));\n }\n if (options !== null && options !== void 0 && options.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return result + \" n\\u1EEFa\";\n } else {\n return result + \" tr\\u01B0\\u1EDBc\";\n }\n }\n return result;\n};\n\n// lib/locale/_lib/buildFormatLongFn.js\nfunction buildFormatLongFn(args) {\n return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var width = options.width ? String(options.width) : args.defaultWidth;\n var format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}\n\n// lib/locale/vi/_lib/formatLong.js\nvar dateFormats = {\n full: \"EEEE, 'ng\\xE0y' d MMMM 'n\\u0103m' y\",\n long: \"'ng\\xE0y' d MMMM 'n\\u0103m' y\",\n medium: \"d MMM 'n\\u0103m' y\",\n short: \"dd/MM/y\"\n};\nvar timeFormats = {\n full: \"HH:mm:ss zzzz\",\n long: \"HH:mm:ss z\",\n medium: \"HH:mm:ss\",\n short: \"HH:mm\"\n};\nvar dateTimeFormats = {\n full: \"{{date}} {{time}}\",\n long: \"{{dateLine truncated
],
"mappings": "AAAA,CAAC,IAAM,CACP,IAAI,EAAgB,SAAS,CAAO,CAAC,EAAG,CAA2B,OAAO,SAA+B,QAArB,mBAAkD,OAAO,UAA1B,iBAA8C,CAAC,EAAG,CAAC,cAAc,WAAe,CAAC,EAAG,CAAC,OAAO,UAA0B,QAArB,YAA+B,EAAE,cAAgB,QAAU,IAAM,OAAO,UAAY,gBAAkB,GAAK,EAAQ,CAAC,EAAG,SAAS,CAAO,CAAC,EAAG,EAAG,CAAC,IAAI,EAAI,OAAO,KAAK,CAAC,EAAE,GAAI,OAAO,sBAAuB,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AAQ,MAAM,EAC5D,YAAa,CAAC,KAAM,aAAc,aAAc,aAAc,aAAc,aAAc,YAAY,EACtG,KAAM,CACN,qBACA,eACA,cACA,mBACA,oBACA,kBACA,mBAAmB,CAErB,EACI,EAAkB,CACpB,OAAQ,CACN,GAAI,KACJ,GAAI,KACJ,SAAU,uBACV,KAAM,KACN,QAAS,KACT,UAAW,KACX,QAAS,WACT,MAAO,aACT,EACA,YAAa,CACX,GAAI,KACJ,GAAI,KACJ,SAAU,uBACV,KAAM,YACN,QAAS,UACT,UAAW,aACX,QAAS,WACT,MAAO,aACT,EACA,KAAM,CACJ,GAAI,KACJ,GAAI,KACJ,SAAU,uBACV,KAAM,YACN,QAAS,UACT,UAAW,aACX,QAAS,WACT,MAAO,aACT,CACF,EACI,EAA4B,CAC9Line truncated
"debugId": "6C2318370AAF54DE64756E2164756E21",
"names": []
}