main repo

This commit is contained in:
Basilosaurusrex
2025-11-24 18:09:40 +01:00
parent b636ee5e70
commit f027651f9b
34146 changed files with 4436636 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
import type { FormatDistanceFn } from "../../types.js";
export declare const formatDistance: FormatDistanceFn;

View File

@@ -0,0 +1,2 @@
import type { FormatDistanceFn } from "../../types.js";
export declare const formatDistance: FormatDistanceFn;

170
node_modules/date-fns/locale/pl/_lib/formatDistance.js generated vendored Normal file
View File

@@ -0,0 +1,170 @@
"use strict";
exports.formatDistance = void 0;
const formatDistanceLocale = {
lessThanXSeconds: {
one: {
regular: "mniej niż sekunda",
past: "mniej niż sekundę",
future: "mniej niż sekundę",
},
twoFour: "mniej niż {{count}} sekundy",
other: "mniej niż {{count}} sekund",
},
xSeconds: {
one: {
regular: "sekunda",
past: "sekundę",
future: "sekundę",
},
twoFour: "{{count}} sekundy",
other: "{{count}} sekund",
},
halfAMinute: {
one: "pół minuty",
twoFour: "pół minuty",
other: "pół minuty",
},
lessThanXMinutes: {
one: {
regular: "mniej niż minuta",
past: "mniej niż minutę",
future: "mniej niż minutę",
},
twoFour: "mniej niż {{count}} minuty",
other: "mniej niż {{count}} minut",
},
xMinutes: {
one: {
regular: "minuta",
past: "minutę",
future: "minutę",
},
twoFour: "{{count}} minuty",
other: "{{count}} minut",
},
aboutXHours: {
one: {
regular: "około godziny",
past: "około godziny",
future: "około godzinę",
},
twoFour: "około {{count}} godziny",
other: "około {{count}} godzin",
},
xHours: {
one: {
regular: "godzina",
past: "godzinę",
future: "godzinę",
},
twoFour: "{{count}} godziny",
other: "{{count}} godzin",
},
xDays: {
one: {
regular: "dzień",
past: "dzień",
future: "1 dzień",
},
twoFour: "{{count}} dni",
other: "{{count}} dni",
},
aboutXWeeks: {
one: "około tygodnia",
twoFour: "około {{count}} tygodni",
other: "około {{count}} tygodni",
},
xWeeks: {
one: "tydzień",
twoFour: "{{count}} tygodnie",
other: "{{count}} tygodni",
},
aboutXMonths: {
one: "około miesiąc",
twoFour: "około {{count}} miesiące",
other: "około {{count}} miesięcy",
},
xMonths: {
one: "miesiąc",
twoFour: "{{count}} miesiące",
other: "{{count}} miesięcy",
},
aboutXYears: {
one: "około rok",
twoFour: "około {{count}} lata",
other: "około {{count}} lat",
},
xYears: {
one: "rok",
twoFour: "{{count}} lata",
other: "{{count}} lat",
},
overXYears: {
one: "ponad rok",
twoFour: "ponad {{count}} lata",
other: "ponad {{count}} lat",
},
almostXYears: {
one: "prawie rok",
twoFour: "prawie {{count}} lata",
other: "prawie {{count}} lat",
},
};
function declensionGroup(scheme, count) {
if (count === 1) {
return scheme.one;
}
const rem100 = count % 100;
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other;
}
const rem10 = rem100 % 10;
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour;
}
return scheme.other;
}
function declension(scheme, count, time) {
const group = declensionGroup(scheme, count);
const finalText = typeof group === "string" ? group : group[time];
return finalText.replace("{{count}}", String(count));
}
const formatDistance = (token, count, options) => {
const scheme = formatDistanceLocale[token];
if (!options?.addSuffix) {
return declension(scheme, count, "regular");
}
if (options.comparison && options.comparison > 0) {
return "za " + declension(scheme, count, "future");
} else {
return declension(scheme, count, "past") + " temu";
}
};
exports.formatDistance = formatDistance;

166
node_modules/date-fns/locale/pl/_lib/formatDistance.mjs generated vendored Normal file
View File

@@ -0,0 +1,166 @@
const formatDistanceLocale = {
lessThanXSeconds: {
one: {
regular: "mniej niż sekunda",
past: "mniej niż sekundę",
future: "mniej niż sekundę",
},
twoFour: "mniej niż {{count}} sekundy",
other: "mniej niż {{count}} sekund",
},
xSeconds: {
one: {
regular: "sekunda",
past: "sekundę",
future: "sekundę",
},
twoFour: "{{count}} sekundy",
other: "{{count}} sekund",
},
halfAMinute: {
one: "pół minuty",
twoFour: "pół minuty",
other: "pół minuty",
},
lessThanXMinutes: {
one: {
regular: "mniej niż minuta",
past: "mniej niż minutę",
future: "mniej niż minutę",
},
twoFour: "mniej niż {{count}} minuty",
other: "mniej niż {{count}} minut",
},
xMinutes: {
one: {
regular: "minuta",
past: "minutę",
future: "minutę",
},
twoFour: "{{count}} minuty",
other: "{{count}} minut",
},
aboutXHours: {
one: {
regular: "około godziny",
past: "około godziny",
future: "około godzinę",
},
twoFour: "około {{count}} godziny",
other: "około {{count}} godzin",
},
xHours: {
one: {
regular: "godzina",
past: "godzinę",
future: "godzinę",
},
twoFour: "{{count}} godziny",
other: "{{count}} godzin",
},
xDays: {
one: {
regular: "dzień",
past: "dzień",
future: "1 dzień",
},
twoFour: "{{count}} dni",
other: "{{count}} dni",
},
aboutXWeeks: {
one: "około tygodnia",
twoFour: "około {{count}} tygodni",
other: "około {{count}} tygodni",
},
xWeeks: {
one: "tydzień",
twoFour: "{{count}} tygodnie",
other: "{{count}} tygodni",
},
aboutXMonths: {
one: "około miesiąc",
twoFour: "około {{count}} miesiące",
other: "około {{count}} miesięcy",
},
xMonths: {
one: "miesiąc",
twoFour: "{{count}} miesiące",
other: "{{count}} miesięcy",
},
aboutXYears: {
one: "około rok",
twoFour: "około {{count}} lata",
other: "około {{count}} lat",
},
xYears: {
one: "rok",
twoFour: "{{count}} lata",
other: "{{count}} lat",
},
overXYears: {
one: "ponad rok",
twoFour: "ponad {{count}} lata",
other: "ponad {{count}} lat",
},
almostXYears: {
one: "prawie rok",
twoFour: "prawie {{count}} lata",
other: "prawie {{count}} lat",
},
};
function declensionGroup(scheme, count) {
if (count === 1) {
return scheme.one;
}
const rem100 = count % 100;
// ends with 11-20
if (rem100 <= 20 && rem100 > 10) {
return scheme.other;
}
const rem10 = rem100 % 10;
// ends with 2, 3, 4
if (rem10 >= 2 && rem10 <= 4) {
return scheme.twoFour;
}
return scheme.other;
}
function declension(scheme, count, time) {
const group = declensionGroup(scheme, count);
const finalText = typeof group === "string" ? group : group[time];
return finalText.replace("{{count}}", String(count));
}
export const formatDistance = (token, count, options) => {
const scheme = formatDistanceLocale[token];
if (!options?.addSuffix) {
return declension(scheme, count, "regular");
}
if (options.comparison && options.comparison > 0) {
return "za " + declension(scheme, count, "future");
} else {
return declension(scheme, count, "past") + " temu";
}
};

View File

@@ -0,0 +1,2 @@
import type { FormatLong } from "../../types.js";
export declare const formatLong: FormatLong;

2
node_modules/date-fns/locale/pl/_lib/formatLong.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { FormatLong } from "../../types.js";
export declare const formatLong: FormatLong;

41
node_modules/date-fns/locale/pl/_lib/formatLong.js generated vendored Normal file
View File

@@ -0,0 +1,41 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.js");
const dateFormats = {
full: "EEEE, do MMMM y",
long: "do MMMM y",
medium: "do MMM y",
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 = {
full: "{{date}} {{time}}",
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",
}),
});

39
node_modules/date-fns/locale/pl/_lib/formatLong.mjs generated vendored Normal file
View File

@@ -0,0 +1,39 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.mjs";
const dateFormats = {
full: "EEEE, do MMMM y",
long: "do MMMM y",
medium: "do MMM y",
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 = {
full: "{{date}} {{time}}",
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",
}),
};

View File

@@ -0,0 +1,2 @@
import type { FormatRelativeFn } from "../../types.js";
export declare const formatRelative: FormatRelativeFn;

View File

@@ -0,0 +1,2 @@
import type { FormatRelativeFn } from "../../types.js";
export declare const formatRelative: FormatRelativeFn;

68
node_modules/date-fns/locale/pl/_lib/formatRelative.js generated vendored Normal file
View File

@@ -0,0 +1,68 @@
"use strict";
exports.formatRelative = void 0;
var _index = require("../../../isSameWeek.js");
const adjectivesLastWeek = {
masculine: "ostatni",
feminine: "ostatnia",
};
const adjectivesThisWeek = {
masculine: "ten",
feminine: "ta",
};
const adjectivesNextWeek = {
masculine: "następny",
feminine: "następna",
};
const dayGrammaticalGender = {
0: "feminine",
1: "masculine",
2: "masculine",
3: "feminine",
4: "masculine",
5: "masculine",
6: "feminine",
};
function dayAndTimeWithAdjective(token, date, baseDate, options) {
let adjectives;
if ((0, _index.isSameWeek)(date, baseDate, options)) {
adjectives = adjectivesThisWeek;
} else if (token === "lastWeek") {
adjectives = adjectivesLastWeek;
} else if (token === "nextWeek") {
adjectives = adjectivesNextWeek;
} else {
throw new Error(`Cannot determine adjectives for token ${token}`);
}
const day = date.getDay();
const grammaticalGender = dayGrammaticalGender[day];
const adjective = adjectives[grammaticalGender];
return `'${adjective}' eeee 'o' p`;
}
const formatRelativeLocale = {
lastWeek: dayAndTimeWithAdjective,
yesterday: "'wczoraj o' p",
today: "'dzisiaj o' p",
tomorrow: "'jutro o' p",
nextWeek: dayAndTimeWithAdjective,
other: "P",
};
const formatRelative = (token, date, baseDate, options) => {
const format = formatRelativeLocale[token];
if (typeof format === "function") {
return format(token, date, baseDate, options);
}
return format;
};
exports.formatRelative = formatRelative;

View File

@@ -0,0 +1,65 @@
import { isSameWeek } from "../../../isSameWeek.mjs";
const adjectivesLastWeek = {
masculine: "ostatni",
feminine: "ostatnia",
};
const adjectivesThisWeek = {
masculine: "ten",
feminine: "ta",
};
const adjectivesNextWeek = {
masculine: "następny",
feminine: "następna",
};
const dayGrammaticalGender = {
0: "feminine",
1: "masculine",
2: "masculine",
3: "feminine",
4: "masculine",
5: "masculine",
6: "feminine",
};
function dayAndTimeWithAdjective(token, date, baseDate, options) {
let adjectives;
if (isSameWeek(date, baseDate, options)) {
adjectives = adjectivesThisWeek;
} else if (token === "lastWeek") {
adjectives = adjectivesLastWeek;
} else if (token === "nextWeek") {
adjectives = adjectivesNextWeek;
} else {
throw new Error(`Cannot determine adjectives for token ${token}`);
}
const day = date.getDay();
const grammaticalGender = dayGrammaticalGender[day];
const adjective = adjectives[grammaticalGender];
return `'${adjective}' eeee 'o' p`;
}
const formatRelativeLocale = {
lastWeek: dayAndTimeWithAdjective,
yesterday: "'wczoraj o' p",
today: "'dzisiaj o' p",
tomorrow: "'jutro o' p",
nextWeek: dayAndTimeWithAdjective,
other: "P",
};
export const formatRelative = (token, date, baseDate, options) => {
const format = formatRelativeLocale[token];
if (typeof format === "function") {
return format(token, date, baseDate, options);
}
return format;
};

2
node_modules/date-fns/locale/pl/_lib/localize.d.mts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { Localize } from "../../types.js";
export declare const localize: Localize;

2
node_modules/date-fns/locale/pl/_lib/localize.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { Localize } from "../../types.js";
export declare const localize: Localize;

215
node_modules/date-fns/locale/pl/_lib/localize.js generated vendored Normal file
View File

@@ -0,0 +1,215 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.js");
const eraValues = {
narrow: ["p.n.e.", "n.e."],
abbreviated: ["p.n.e.", "n.e."],
wide: ["przed naszą erą", "naszej ery"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["I kw.", "II kw.", "III kw.", "IV kw."],
wide: ["I kwartał", "II kwartał", "III kwartał", "IV kwartał"],
};
const monthValues = {
narrow: ["S", "L", "M", "K", "M", "C", "L", "S", "W", "P", "L", "G"],
abbreviated: [
"sty",
"lut",
"mar",
"kwi",
"maj",
"cze",
"lip",
"sie",
"wrz",
"paź",
"lis",
"gru",
],
wide: [
"styczeń",
"luty",
"marzec",
"kwiecień",
"maj",
"czerwiec",
"lipiec",
"sierpień",
"wrzesień",
"październik",
"listopad",
"grudzień",
],
};
const monthFormattingValues = {
narrow: ["s", "l", "m", "k", "m", "c", "l", "s", "w", "p", "l", "g"],
abbreviated: [
"sty",
"lut",
"mar",
"kwi",
"maj",
"cze",
"lip",
"sie",
"wrz",
"paź",
"lis",
"gru",
],
wide: [
"stycznia",
"lutego",
"marca",
"kwietnia",
"maja",
"czerwca",
"lipca",
"sierpnia",
"września",
"października",
"listopada",
"grudnia",
],
};
const dayValues = {
narrow: ["N", "P", "W", "Ś", "C", "P", "S"],
short: ["nie", "pon", "wto", "śro", "czw", "pią", "sob"],
abbreviated: ["niedz.", "pon.", "wt.", "śr.", "czw.", "pt.", "sob."],
wide: [
"niedziela",
"poniedziałek",
"wtorek",
"środa",
"czwartek",
"piątek",
"sobota",
],
};
const dayFormattingValues = {
narrow: ["n", "p", "w", "ś", "c", "p", "s"],
short: ["nie", "pon", "wto", "śro", "czw", "pią", "sob"],
abbreviated: ["niedz.", "pon.", "wt.", "śr.", "czw.", "pt.", "sob."],
wide: [
"niedziela",
"poniedziałek",
"wtorek",
"środa",
"czwartek",
"piątek",
"sobota",
],
};
const dayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "półn.",
noon: "poł",
morning: "rano",
afternoon: "popoł.",
evening: "wiecz.",
night: "noc",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "północ",
noon: "południe",
morning: "rano",
afternoon: "popołudnie",
evening: "wieczór",
night: "noc",
},
wide: {
am: "AM",
pm: "PM",
midnight: "północ",
noon: "południe",
morning: "rano",
afternoon: "popołudnie",
evening: "wieczór",
night: "noc",
},
};
const dayPeriodFormattingValues = {
narrow: {
am: "a",
pm: "p",
midnight: "o półn.",
noon: "w poł.",
morning: "rano",
afternoon: "po poł.",
evening: "wiecz.",
night: "w nocy",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "o północy",
noon: "w południe",
morning: "rano",
afternoon: "po południu",
evening: "wieczorem",
night: "w nocy",
},
wide: {
am: "AM",
pm: "PM",
midnight: "o północy",
noon: "w południe",
morning: "rano",
afternoon: "po południu",
evening: "wieczorem",
night: "w nocy",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
return String(dirtyNumber);
};
const localize = (exports.localize = {
ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
formattingValues: monthFormattingValues,
defaultFormattingWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
formattingValues: dayFormattingValues,
defaultFormattingWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: dayPeriodFormattingValues,
defaultFormattingWidth: "wide",
}),
});

213
node_modules/date-fns/locale/pl/_lib/localize.mjs generated vendored Normal file
View File

@@ -0,0 +1,213 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.mjs";
const eraValues = {
narrow: ["p.n.e.", "n.e."],
abbreviated: ["p.n.e.", "n.e."],
wide: ["przed naszą erą", "naszej ery"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["I kw.", "II kw.", "III kw.", "IV kw."],
wide: ["I kwartał", "II kwartał", "III kwartał", "IV kwartał"],
};
const monthValues = {
narrow: ["S", "L", "M", "K", "M", "C", "L", "S", "W", "P", "L", "G"],
abbreviated: [
"sty",
"lut",
"mar",
"kwi",
"maj",
"cze",
"lip",
"sie",
"wrz",
"paź",
"lis",
"gru",
],
wide: [
"styczeń",
"luty",
"marzec",
"kwiecień",
"maj",
"czerwiec",
"lipiec",
"sierpień",
"wrzesień",
"październik",
"listopad",
"grudzień",
],
};
const monthFormattingValues = {
narrow: ["s", "l", "m", "k", "m", "c", "l", "s", "w", "p", "l", "g"],
abbreviated: [
"sty",
"lut",
"mar",
"kwi",
"maj",
"cze",
"lip",
"sie",
"wrz",
"paź",
"lis",
"gru",
],
wide: [
"stycznia",
"lutego",
"marca",
"kwietnia",
"maja",
"czerwca",
"lipca",
"sierpnia",
"września",
"października",
"listopada",
"grudnia",
],
};
const dayValues = {
narrow: ["N", "P", "W", "Ś", "C", "P", "S"],
short: ["nie", "pon", "wto", "śro", "czw", "pią", "sob"],
abbreviated: ["niedz.", "pon.", "wt.", "śr.", "czw.", "pt.", "sob."],
wide: [
"niedziela",
"poniedziałek",
"wtorek",
"środa",
"czwartek",
"piątek",
"sobota",
],
};
const dayFormattingValues = {
narrow: ["n", "p", "w", "ś", "c", "p", "s"],
short: ["nie", "pon", "wto", "śro", "czw", "pią", "sob"],
abbreviated: ["niedz.", "pon.", "wt.", "śr.", "czw.", "pt.", "sob."],
wide: [
"niedziela",
"poniedziałek",
"wtorek",
"środa",
"czwartek",
"piątek",
"sobota",
],
};
const dayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "półn.",
noon: "poł",
morning: "rano",
afternoon: "popoł.",
evening: "wiecz.",
night: "noc",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "północ",
noon: "południe",
morning: "rano",
afternoon: "popołudnie",
evening: "wieczór",
night: "noc",
},
wide: {
am: "AM",
pm: "PM",
midnight: "północ",
noon: "południe",
morning: "rano",
afternoon: "popołudnie",
evening: "wieczór",
night: "noc",
},
};
const dayPeriodFormattingValues = {
narrow: {
am: "a",
pm: "p",
midnight: "o półn.",
noon: "w poł.",
morning: "rano",
afternoon: "po poł.",
evening: "wiecz.",
night: "w nocy",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "o północy",
noon: "w południe",
morning: "rano",
afternoon: "po południu",
evening: "wieczorem",
night: "w nocy",
},
wide: {
am: "AM",
pm: "PM",
midnight: "o północy",
noon: "w południe",
morning: "rano",
afternoon: "po południu",
evening: "wieczorem",
night: "w nocy",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
return String(dirtyNumber);
};
export const localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
formattingValues: monthFormattingValues,
defaultFormattingWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
formattingValues: dayFormattingValues,
defaultFormattingWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: dayPeriodFormattingValues,
defaultFormattingWidth: "wide",
}),
};

2
node_modules/date-fns/locale/pl/_lib/match.d.mts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { Match } from "../../types.js";
export declare const match: Match;

2
node_modules/date-fns/locale/pl/_lib/match.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { Match } from "../../types.js";
export declare const match: Match;

149
node_modules/date-fns/locale/pl/_lib/match.js generated vendored Normal file
View File

@@ -0,0 +1,149 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchFn.js");
var _index2 = require("../../_lib/buildMatchPatternFn.js");
const matchOrdinalNumberPattern = /^(\d+)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(p\.?\s*n\.?\s*e\.?\s*|n\.?\s*e\.?\s*)/i,
abbreviated: /^(p\.?\s*n\.?\s*e\.?\s*|n\.?\s*e\.?\s*)/i,
wide: /^(przed\s*nasz(ą|a)\s*er(ą|a)|naszej\s*ery)/i,
};
const parseEraPatterns = {
any: [/^p/i, /^n/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^(I|II|III|IV)\s*kw\.?/i,
wide: /^(I|II|III|IV)\s*kwarta(ł|l)/i,
};
const parseQuarterPatterns = {
narrow: [/1/i, /2/i, /3/i, /4/i],
any: [/^I kw/i, /^II kw/i, /^III kw/i, /^IV kw/i],
};
const matchMonthPatterns = {
narrow: /^[slmkcwpg]/i,
abbreviated: /^(sty|lut|mar|kwi|maj|cze|lip|sie|wrz|pa(ź|z)|lis|gru)/i,
wide: /^(stycznia|stycze(ń|n)|lutego|luty|marca|marzec|kwietnia|kwiecie(ń|n)|maja|maj|czerwca|czerwiec|lipca|lipiec|sierpnia|sierpie(ń|n)|wrze(ś|s)nia|wrzesie(ń|n)|pa(ź|z)dziernika|pa(ź|z)dziernik|listopada|listopad|grudnia|grudzie(ń|n))/i,
};
const parseMonthPatterns = {
narrow: [
/^s/i,
/^l/i,
/^m/i,
/^k/i,
/^m/i,
/^c/i,
/^l/i,
/^s/i,
/^w/i,
/^p/i,
/^l/i,
/^g/i,
],
any: [
/^st/i,
/^lu/i,
/^mar/i,
/^k/i,
/^maj/i,
/^c/i,
/^lip/i,
/^si/i,
/^w/i,
/^p/i,
/^lis/i,
/^g/i,
],
};
const matchDayPatterns = {
narrow: /^[npwścs]/i,
short: /^(nie|pon|wto|(ś|s)ro|czw|pi(ą|a)|sob)/i,
abbreviated: /^(niedz|pon|wt|(ś|s)r|czw|pt|sob)\.?/i,
wide: /^(niedziela|poniedzia(ł|l)ek|wtorek|(ś|s)roda|czwartek|pi(ą|a)tek|sobota)/i,
};
const parseDayPatterns = {
narrow: [/^n/i, /^p/i, /^w/i, /^ś/i, /^c/i, /^p/i, /^s/i],
abbreviated: [/^n/i, /^po/i, /^w/i, /^(ś|s)r/i, /^c/i, /^pt/i, /^so/i],
any: [/^n/i, /^po/i, /^w/i, /^(ś|s)r/i, /^c/i, /^pi/i, /^so/i],
};
const matchDayPeriodPatterns = {
narrow:
/^(^a$|^p$|pó(ł|l)n\.?|o\s*pó(ł|l)n\.?|po(ł|l)\.?|w\s*po(ł|l)\.?|po\s*po(ł|l)\.?|rano|wiecz\.?|noc|w\s*nocy)/i,
any: /^(am|pm|pó(ł|l)noc|o\s*pó(ł|l)nocy|po(ł|l)udnie|w\s*po(ł|l)udnie|popo(ł|l)udnie|po\s*po(ł|l)udniu|rano|wieczór|wieczorem|noc|w\s*nocy)/i,
};
const parseDayPeriodPatterns = {
narrow: {
am: /^a$/i,
pm: /^p$/i,
midnight: /pó(ł|l)n/i,
noon: /po(ł|l)/i,
morning: /rano/i,
afternoon: /po\s*po(ł|l)/i,
evening: /wiecz/i,
night: /noc/i,
},
any: {
am: /^am/i,
pm: /^pm/i,
midnight: /pó(ł|l)n/i,
noon: /po(ł|l)/i,
morning: /rano/i,
afternoon: /po\s*po(ł|l)/i,
evening: /wiecz/i,
night: /noc/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: "any",
}),
day: (0, _index.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: (0, _index.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});

146
node_modules/date-fns/locale/pl/_lib/match.mjs generated vendored Normal file
View File

@@ -0,0 +1,146 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.mjs";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.mjs";
const matchOrdinalNumberPattern = /^(\d+)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(p\.?\s*n\.?\s*e\.?\s*|n\.?\s*e\.?\s*)/i,
abbreviated: /^(p\.?\s*n\.?\s*e\.?\s*|n\.?\s*e\.?\s*)/i,
wide: /^(przed\s*nasz(ą|a)\s*er(ą|a)|naszej\s*ery)/i,
};
const parseEraPatterns = {
any: [/^p/i, /^n/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^(I|II|III|IV)\s*kw\.?/i,
wide: /^(I|II|III|IV)\s*kwarta(ł|l)/i,
};
const parseQuarterPatterns = {
narrow: [/1/i, /2/i, /3/i, /4/i],
any: [/^I kw/i, /^II kw/i, /^III kw/i, /^IV kw/i],
};
const matchMonthPatterns = {
narrow: /^[slmkcwpg]/i,
abbreviated: /^(sty|lut|mar|kwi|maj|cze|lip|sie|wrz|pa(ź|z)|lis|gru)/i,
wide: /^(stycznia|stycze(ń|n)|lutego|luty|marca|marzec|kwietnia|kwiecie(ń|n)|maja|maj|czerwca|czerwiec|lipca|lipiec|sierpnia|sierpie(ń|n)|wrze(ś|s)nia|wrzesie(ń|n)|pa(ź|z)dziernika|pa(ź|z)dziernik|listopada|listopad|grudnia|grudzie(ń|n))/i,
};
const parseMonthPatterns = {
narrow: [
/^s/i,
/^l/i,
/^m/i,
/^k/i,
/^m/i,
/^c/i,
/^l/i,
/^s/i,
/^w/i,
/^p/i,
/^l/i,
/^g/i,
],
any: [
/^st/i,
/^lu/i,
/^mar/i,
/^k/i,
/^maj/i,
/^c/i,
/^lip/i,
/^si/i,
/^w/i,
/^p/i,
/^lis/i,
/^g/i,
],
};
const matchDayPatterns = {
narrow: /^[npwścs]/i,
short: /^(nie|pon|wto|(ś|s)ro|czw|pi(ą|a)|sob)/i,
abbreviated: /^(niedz|pon|wt|(ś|s)r|czw|pt|sob)\.?/i,
wide: /^(niedziela|poniedzia(ł|l)ek|wtorek|(ś|s)roda|czwartek|pi(ą|a)tek|sobota)/i,
};
const parseDayPatterns = {
narrow: [/^n/i, /^p/i, /^w/i, /^ś/i, /^c/i, /^p/i, /^s/i],
abbreviated: [/^n/i, /^po/i, /^w/i, /^(ś|s)r/i, /^c/i, /^pt/i, /^so/i],
any: [/^n/i, /^po/i, /^w/i, /^(ś|s)r/i, /^c/i, /^pi/i, /^so/i],
};
const matchDayPeriodPatterns = {
narrow:
/^(^a$|^p$|pó(ł|l)n\.?|o\s*pó(ł|l)n\.?|po(ł|l)\.?|w\s*po(ł|l)\.?|po\s*po(ł|l)\.?|rano|wiecz\.?|noc|w\s*nocy)/i,
any: /^(am|pm|pó(ł|l)noc|o\s*pó(ł|l)nocy|po(ł|l)udnie|w\s*po(ł|l)udnie|popo(ł|l)udnie|po\s*po(ł|l)udniu|rano|wieczór|wieczorem|noc|w\s*nocy)/i,
};
const parseDayPeriodPatterns = {
narrow: {
am: /^a$/i,
pm: /^p$/i,
midnight: /pó(ł|l)n/i,
noon: /po(ł|l)/i,
morning: /rano/i,
afternoon: /po\s*po(ł|l)/i,
evening: /wiecz/i,
night: /noc/i,
},
any: {
am: /^am/i,
pm: /^pm/i,
midnight: /pó(ł|l)n/i,
noon: /po(ł|l)/i,
morning: /rano/i,
afternoon: /po\s*po(ł|l)/i,
evening: /wiecz/i,
night: /noc/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: "any",
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};