Rocky_Mountain_Vending/.pnpm-store/v10/files/b0/90ab2b70323c29441e568646d31e1e7ac11ef90c673a387a08c42efa7885626dc65582c0b39005a532465ea0a04c4a04fdd6a3129e4cc85d145b3ef7668778
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

143 lines
3.1 KiB
Text
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";
exports.formatDistance = void 0;
const formatDistanceLocale = {
lessThanXSeconds: {
one: "секунд хүрэхгүй",
other: "{{count}} секунд хүрэхгүй",
},
xSeconds: {
one: "1 секунд",
other: "{{count}} секунд",
},
halfAMinute: "хагас минут",
lessThanXMinutes: {
one: "минут хүрэхгүй",
other: "{{count}} минут хүрэхгүй",
},
xMinutes: {
one: "1 минут",
other: "{{count}} минут",
},
aboutXHours: {
one: "ойролцоогоор 1 цаг",
other: "ойролцоогоор {{count}} цаг",
},
xHours: {
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) {
/**
* Append genitive case
*/
const words = result.split(" ");
const lastword = words.pop();
result = words.join(" ");
switch (lastword) {
case "секунд":
result += " секундийн";
break;
case "минут":
result += " минутын";
break;
case "цаг":
result += " цагийн";
break;
case "өдөр":
result += " өдрийн";
break;
case "сар":
result += " сарын";
break;
case "жил":
result += " жилийн";
break;
case "хоног":
result += " хоногийн";
break;
case "гаран":
result += " гараны";
break;
case "хүрэхгүй":
result += " хүрэхгүй хугацааны";
break;
default:
result += lastword + "-н";
}
if (options.comparison && options.comparison > 0) {
return result + " дараа";
} else {
return result + " өмнө";
}
}
return result;
};
exports.formatDistance = formatDistance;