cjs β’ Lines: 105"use strict";
exports.formatDistance = void 0;
const formatDistanceLocale = {
lessThanXSeconds: {
one: "ε°ζΌ 1 η§",
other: "ε°ζΌ {{count}} η§",
},
xSeconds: {
one: "1 η§",
other: "{{count}} η§",
},
halfAMinute: "εει",
lessThanXMinutes: {
one: "ε°ζΌ 1 ει",
other: "ε°ζΌ {{count}} ει",
},
xMinutes: {
one: "1 ει",
other: "{{count}} ει",
},
xHours: {
one: "1 ε°ζ",
other: "{{count}} ε°ζ",
},
aboutXHours: {
one: "ε€§η΄ 1 ε°ζ",
other: "ε€§η΄ {{count}} ε°ζ",
},
xDays: {
one: "1 倩",
other: "{{count}} 倩",
},
aboutXWeeks: {
one: "ε€§η΄ 1 εζζ",
other: "ε€§η΄ {{count}} εζζ",
},
xWeeks: {
one: "1 εζζ",
other: "{{count}} εζζ",
},
aboutXMonths: {
one: "ε€§η΄ 1 εζ",
other: "ε€§η΄ {{count}} εζ",
},
xMonths: {
one: "1 εζ",
other: "{{count}} εζ",
},
aboutXYears: {
one: "ε€§η΄ 1 εΉ΄",
other: "ε€§η΄ {{count}} εΉ΄",
},
xYears: {
one: "1 εΉ΄",
other: "{{count}} εΉ΄",
},
overXYears: {
one: "θΆ
ι 1 εΉ΄",
other: "θΆ
ι {{count}} εΉ΄",
},
almostXYears: {
one: "ε°θΏ 1 εΉ΄",
other: "ε°θΏ {{count}} εΉ΄",
},
};
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 + "ε
§";
} else {
return result + "ε";
}
}
return result;
};
exports.formatDistance = formatDistance;