registration

This commit is contained in:
User
2025-02-02 16:08:03 +03:00
parent 7f6495eb4d
commit 78afbaed71
6334 changed files with 196774 additions and 165754 deletions

View File

@@ -1,3 +1,6 @@
"use strict";
exports.formatDistance = void 0;
const formatDistanceLocale = {
lessThanXSeconds: {
one: {
@@ -152,7 +155,7 @@ function declension(scheme, count, time) {
return finalText.replace("{{count}}", String(count));
}
export const formatDistance = (token, count, options) => {
const formatDistance = (token, count, options) => {
const scheme = formatDistanceLocale[token];
if (!options?.addSuffix) {
return declension(scheme, count, "regular");
@@ -164,3 +167,4 @@ export const formatDistance = (token, count, options) => {
return declension(scheme, count, "past") + " temu";
}
};
exports.formatDistance = formatDistance;

View File

@@ -1,6 +1,3 @@
"use strict";
exports.formatDistance = void 0;
const formatDistanceLocale = {
lessThanXSeconds: {
one: {
@@ -155,7 +152,7 @@ function declension(scheme, count, time) {
return finalText.replace("{{count}}", String(count));
}
const formatDistance = (token, count, options) => {
export const formatDistance = (token, count, options) => {
const scheme = formatDistanceLocale[token];
if (!options?.addSuffix) {
return declension(scheme, count, "regular");
@@ -167,4 +164,3 @@ const formatDistance = (token, count, options) => {
return declension(scheme, count, "past") + " temu";
}
};
exports.formatDistance = formatDistance;

View File

@@ -1,4 +1,6 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.mjs";
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.cjs");
const dateFormats = {
full: "EEEE, do MMMM y",
@@ -21,19 +23,19 @@ const dateTimeFormats = {
short: "{{date}}, {{time}}",
};
export const formatLong = {
date: buildFormatLongFn({
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "full",
}),
};
});

View File

@@ -1,6 +1,4 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.js");
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.js";
const dateFormats = {
full: "EEEE, do MMMM y",
@@ -23,19 +21,19 @@ const dateTimeFormats = {
short: "{{date}}, {{time}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full",
}),
});
};

View File

@@ -1,4 +1,6 @@
import { isSameWeek } from "../../../isSameWeek.mjs";
"use strict";
exports.formatRelative = void 0;
var _index = require("../../../isSameWeek.cjs");
const adjectivesLastWeek = {
masculine: "ostatni",
@@ -27,7 +29,7 @@ const dayGrammaticalGender = {
function dayAndTimeWithAdjective(token, date, baseDate, options) {
let adjectives;
if (isSameWeek(date, baseDate, options)) {
if ((0, _index.isSameWeek)(date, baseDate, options)) {
adjectives = adjectivesThisWeek;
} else if (token === "lastWeek") {
adjectives = adjectivesLastWeek;
@@ -54,7 +56,7 @@ const formatRelativeLocale = {
other: "P",
};
export const formatRelative = (token, date, baseDate, options) => {
const formatRelative = (token, date, baseDate, options) => {
const format = formatRelativeLocale[token];
if (typeof format === "function") {
@@ -63,3 +65,4 @@ export const formatRelative = (token, date, baseDate, options) => {
return format;
};
exports.formatRelative = formatRelative;

View File

@@ -1,6 +1,4 @@
"use strict";
exports.formatRelative = void 0;
var _index = require("../../../isSameWeek.js");
import { isSameWeek } from "../../../isSameWeek.js";
const adjectivesLastWeek = {
masculine: "ostatni",
@@ -29,7 +27,7 @@ const dayGrammaticalGender = {
function dayAndTimeWithAdjective(token, date, baseDate, options) {
let adjectives;
if ((0, _index.isSameWeek)(date, baseDate, options)) {
if (isSameWeek(date, baseDate, options)) {
adjectives = adjectivesThisWeek;
} else if (token === "lastWeek") {
adjectives = adjectivesLastWeek;
@@ -56,7 +54,7 @@ const formatRelativeLocale = {
other: "P",
};
const formatRelative = (token, date, baseDate, options) => {
export const formatRelative = (token, date, baseDate, options) => {
const format = formatRelativeLocale[token];
if (typeof format === "function") {
@@ -65,4 +63,3 @@ const formatRelative = (token, date, baseDate, options) => {
return format;
};
exports.formatRelative = formatRelative;

View File

@@ -1,4 +1,6 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.mjs";
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.cjs");
const eraValues = {
narrow: ["p.n.e.", "n.e."],
@@ -176,38 +178,38 @@ const ordinalNumber = (dirtyNumber, _options) => {
return String(dirtyNumber);
};
export const localize = {
const localize = (exports.localize = {
ordinalNumber,
era: buildLocalizeFn({
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
formattingValues: monthFormattingValues,
defaultFormattingWidth: "wide",
}),
day: buildLocalizeFn({
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
formattingValues: dayFormattingValues,
defaultFormattingWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: dayPeriodFormattingValues,
defaultFormattingWidth: "wide",
}),
};
});

View File

@@ -1,6 +1,4 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.js");
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.js";
const eraValues = {
narrow: ["p.n.e.", "n.e."],
@@ -178,38 +176,38 @@ const ordinalNumber = (dirtyNumber, _options) => {
return String(dirtyNumber);
};
const localize = (exports.localize = {
export const localize = {
ordinalNumber,
era: (0, _index.buildLocalizeFn)({
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
formattingValues: monthFormattingValues,
defaultFormattingWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
formattingValues: dayFormattingValues,
defaultFormattingWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: dayPeriodFormattingValues,
defaultFormattingWidth: "wide",
}),
});
};

View File

@@ -1,5 +1,8 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.mjs";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.mjs";
"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;
@@ -101,21 +104,21 @@ const parseDayPeriodPatterns = {
},
};
export const match = {
ordinalNumber: buildMatchPatternFn({
const match = (exports.match = {
ordinalNumber: (0, _index2.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: buildMatchFn({
era: (0, _index.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: buildMatchFn({
quarter: (0, _index.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
@@ -123,24 +126,24 @@ export const match = {
valueCallback: (index) => index + 1,
}),
month: buildMatchFn({
month: (0, _index.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: buildMatchFn({
day: (0, _index.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: buildMatchFn({
dayPeriod: (0, _index.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};
});

View File

@@ -1,8 +1,5 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchFn.js");
var _index2 = require("../../_lib/buildMatchPatternFn.js");
import { buildMatchFn } from "../../_lib/buildMatchFn.js";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.js";
const matchOrdinalNumberPattern = /^(\d+)?/i;
const parseOrdinalNumberPattern = /\d+/i;
@@ -104,21 +101,21 @@ const parseDayPeriodPatterns = {
},
};
const match = (exports.match = {
ordinalNumber: (0, _index2.buildMatchPatternFn)({
export const match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: (0, _index.buildMatchFn)({
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index.buildMatchFn)({
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
@@ -126,24 +123,24 @@ const match = (exports.match = {
valueCallback: (index) => index + 1,
}),
month: (0, _index.buildMatchFn)({
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index.buildMatchFn)({
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: (0, _index.buildMatchFn)({
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});
};