chore: update package.json (#2635)

* chore: update package.json

* chore: make bundle
This commit is contained in:
Pavol Rusnak
2024-08-29 22:51:41 +02:00
committed by GitHub
parent cbe858b385
commit 8cffda5a55
5 changed files with 2111 additions and 846 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
//! moment.js //! moment.js
//! version : 2.29.4 //! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT //! license : MIT
//! momentjs.com //! momentjs.com
@@ -155,24 +155,25 @@
} }
function isValid(m) { function isValid(m) {
if (m._isValid == null) { var flags = null,
var flags = getParsingFlags(m), parsedParts = false,
parsedParts = some.call(flags.parsedDateParts, function (i) { isNowValid = m._d && !isNaN(m._d.getTime());
return i != null; if (isNowValid) {
}), flags = getParsingFlags(m);
isNowValid = parsedParts = some.call(flags.parsedDateParts, function (i) {
!isNaN(m._d.getTime()) && return i != null;
flags.overflow < 0 && });
!flags.empty && isNowValid =
!flags.invalidEra && flags.overflow < 0 &&
!flags.invalidMonth && !flags.empty &&
!flags.invalidWeekday && !flags.invalidEra &&
!flags.weekdayMismatch && !flags.invalidMonth &&
!flags.nullInput && !flags.invalidWeekday &&
!flags.invalidFormat && !flags.weekdayMismatch &&
!flags.userInvalidated && !flags.nullInput &&
(!flags.meridiem || (flags.meridiem && parsedParts)); !flags.invalidFormat &&
!flags.userInvalidated &&
(!flags.meridiem || (flags.meridiem && parsedParts));
if (m._strict) { if (m._strict) {
isNowValid = isNowValid =
isNowValid && isNowValid &&
@@ -180,12 +181,11 @@
flags.unusedTokens.length === 0 && flags.unusedTokens.length === 0 &&
flags.bigHour === undefined; flags.bigHour === undefined;
} }
}
if (Object.isFrozen == null || !Object.isFrozen(m)) { if (Object.isFrozen == null || !Object.isFrozen(m)) {
m._isValid = isNowValid; m._isValid = isNowValid;
} else { } else {
return isNowValid; return isNowValid;
}
} }
return m._isValid; return m._isValid;
} }
@@ -630,12 +630,56 @@
return isFunction(format) ? format(output) : format.replace(/%s/i, output); return isFunction(format) ? format(output) : format.replace(/%s/i, output);
} }
var aliases = {}; var aliases = {
D: 'date',
function addUnitAlias(unit, shorthand) { dates: 'date',
var lowerCase = unit.toLowerCase(); date: 'date',
aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; d: 'day',
} days: 'day',
day: 'day',
e: 'weekday',
weekdays: 'weekday',
weekday: 'weekday',
E: 'isoWeekday',
isoweekdays: 'isoWeekday',
isoweekday: 'isoWeekday',
DDD: 'dayOfYear',
dayofyears: 'dayOfYear',
dayofyear: 'dayOfYear',
h: 'hour',
hours: 'hour',
hour: 'hour',
ms: 'millisecond',
milliseconds: 'millisecond',
millisecond: 'millisecond',
m: 'minute',
minutes: 'minute',
minute: 'minute',
M: 'month',
months: 'month',
month: 'month',
Q: 'quarter',
quarters: 'quarter',
quarter: 'quarter',
s: 'second',
seconds: 'second',
second: 'second',
gg: 'weekYear',
weekyears: 'weekYear',
weekyear: 'weekYear',
GG: 'isoWeekYear',
isoweekyears: 'isoWeekYear',
isoweekyear: 'isoWeekYear',
w: 'week',
weeks: 'week',
week: 'week',
W: 'isoWeek',
isoweeks: 'isoWeek',
isoweek: 'isoWeek',
y: 'year',
years: 'year',
year: 'year',
};
function normalizeUnits(units) { function normalizeUnits(units) {
return typeof units === 'string' return typeof units === 'string'
@@ -660,11 +704,24 @@
return normalizedInput; return normalizedInput;
} }
var priorities = {}; var priorities = {
date: 9,
function addUnitPriority(unit, priority) { day: 11,
priorities[unit] = priority; weekday: 11,
} isoWeekday: 11,
dayOfYear: 4,
hour: 13,
millisecond: 16,
minute: 14,
month: 8,
quarter: 7,
second: 15,
weekYear: 1,
isoWeekYear: 1,
week: 5,
isoWeek: 5,
year: 1,
};
function getPrioritizedUnits(unitsObj) { function getPrioritizedUnits(unitsObj) {
var units = [], var units = [],
@@ -680,96 +737,6 @@
return units; return units;
} }
function isLeapYear(year) {
return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
}
function absFloor(number) {
if (number < 0) {
// -0 -> 0
return Math.ceil(number) || 0;
} else {
return Math.floor(number);
}
}
function toInt(argumentForCoercion) {
var coercedNumber = +argumentForCoercion,
value = 0;
if (coercedNumber !== 0 && isFinite(coercedNumber)) {
value = absFloor(coercedNumber);
}
return value;
}
function makeGetSet(unit, keepTime) {
return function (value) {
if (value != null) {
set$1(this, unit, value);
hooks.updateOffset(this, keepTime);
return this;
} else {
return get(this, unit);
}
};
}
function get(mom, unit) {
return mom.isValid()
? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()
: NaN;
}
function set$1(mom, unit, value) {
if (mom.isValid() && !isNaN(value)) {
if (
unit === 'FullYear' &&
isLeapYear(mom.year()) &&
mom.month() === 1 &&
mom.date() === 29
) {
value = toInt(value);
mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](
value,
mom.month(),
daysInMonth(value, mom.month())
);
} else {
mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
}
}
}
// MOMENTS
function stringGet(units) {
units = normalizeUnits(units);
if (isFunction(this[units])) {
return this[units]();
}
return this;
}
function stringSet(units, value) {
if (typeof units === 'object') {
units = normalizeObjectUnits(units);
var prioritized = getPrioritizedUnits(units),
i,
prioritizedLen = prioritized.length;
for (i = 0; i < prioritizedLen; i++) {
this[prioritized[i].unit](units[prioritized[i].unit]);
}
} else {
units = normalizeUnits(units);
if (isFunction(this[units])) {
return this[units](value);
}
}
return this;
}
var match1 = /\d/, // 0 - 9 var match1 = /\d/, // 0 - 9
match2 = /\d\d/, // 00 - 99 match2 = /\d\d/, // 00 - 99
match3 = /\d{3}/, // 000 - 999 match3 = /\d{3}/, // 000 - 999
@@ -790,6 +757,8 @@
// includes scottish gaelic two word and hyphenated months // includes scottish gaelic two word and hyphenated months
matchWord = matchWord =
/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
match1to2NoLeadingZero = /^[1-9]\d?/, // 1-99
match1to2HasZero = /^([1-9]\d|\d)/, // 0-99
regexes; regexes;
regexes = {}; regexes = {};
@@ -828,6 +797,26 @@
return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
} }
function absFloor(number) {
if (number < 0) {
// -0 -> 0
return Math.ceil(number) || 0;
} else {
return Math.floor(number);
}
}
function toInt(argumentForCoercion) {
var coercedNumber = +argumentForCoercion,
value = 0;
if (coercedNumber !== 0 && isFinite(coercedNumber)) {
value = absFloor(coercedNumber);
}
return value;
}
var tokens = {}; var tokens = {};
function addParseToken(token, callback) { function addParseToken(token, callback) {
@@ -861,6 +850,10 @@
} }
} }
function isLeapYear(year) {
return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
}
var YEAR = 0, var YEAR = 0,
MONTH = 1, MONTH = 1,
DATE = 2, DATE = 2,
@@ -871,6 +864,173 @@
WEEK = 7, WEEK = 7,
WEEKDAY = 8; WEEKDAY = 8;
// FORMATTING
addFormatToken('Y', 0, 0, function () {
var y = this.year();
return y <= 9999 ? zeroFill(y, 4) : '+' + y;
});
addFormatToken(0, ['YY', 2], 0, function () {
return this.year() % 100;
});
addFormatToken(0, ['YYYY', 4], 0, 'year');
addFormatToken(0, ['YYYYY', 5], 0, 'year');
addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
// PARSING
addRegexToken('Y', matchSigned);
addRegexToken('YY', match1to2, match2);
addRegexToken('YYYY', match1to4, match4);
addRegexToken('YYYYY', match1to6, match6);
addRegexToken('YYYYYY', match1to6, match6);
addParseToken(['YYYYY', 'YYYYYY'], YEAR);
addParseToken('YYYY', function (input, array) {
array[YEAR] =
input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
});
addParseToken('YY', function (input, array) {
array[YEAR] = hooks.parseTwoDigitYear(input);
});
addParseToken('Y', function (input, array) {
array[YEAR] = parseInt(input, 10);
});
// HELPERS
function daysInYear(year) {
return isLeapYear(year) ? 366 : 365;
}
// HOOKS
hooks.parseTwoDigitYear = function (input) {
return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
};
// MOMENTS
var getSetYear = makeGetSet('FullYear', true);
function getIsLeapYear() {
return isLeapYear(this.year());
}
function makeGetSet(unit, keepTime) {
return function (value) {
if (value != null) {
set$1(this, unit, value);
hooks.updateOffset(this, keepTime);
return this;
} else {
return get(this, unit);
}
};
}
function get(mom, unit) {
if (!mom.isValid()) {
return NaN;
}
var d = mom._d,
isUTC = mom._isUTC;
switch (unit) {
case 'Milliseconds':
return isUTC ? d.getUTCMilliseconds() : d.getMilliseconds();
case 'Seconds':
return isUTC ? d.getUTCSeconds() : d.getSeconds();
case 'Minutes':
return isUTC ? d.getUTCMinutes() : d.getMinutes();
case 'Hours':
return isUTC ? d.getUTCHours() : d.getHours();
case 'Date':
return isUTC ? d.getUTCDate() : d.getDate();
case 'Day':
return isUTC ? d.getUTCDay() : d.getDay();
case 'Month':
return isUTC ? d.getUTCMonth() : d.getMonth();
case 'FullYear':
return isUTC ? d.getUTCFullYear() : d.getFullYear();
default:
return NaN; // Just in case
}
}
function set$1(mom, unit, value) {
var d, isUTC, year, month, date;
if (!mom.isValid() || isNaN(value)) {
return;
}
d = mom._d;
isUTC = mom._isUTC;
switch (unit) {
case 'Milliseconds':
return void (isUTC
? d.setUTCMilliseconds(value)
: d.setMilliseconds(value));
case 'Seconds':
return void (isUTC ? d.setUTCSeconds(value) : d.setSeconds(value));
case 'Minutes':
return void (isUTC ? d.setUTCMinutes(value) : d.setMinutes(value));
case 'Hours':
return void (isUTC ? d.setUTCHours(value) : d.setHours(value));
case 'Date':
return void (isUTC ? d.setUTCDate(value) : d.setDate(value));
// case 'Day': // Not real
// return void (isUTC ? d.setUTCDay(value) : d.setDay(value));
// case 'Month': // Not used because we need to pass two variables
// return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value));
case 'FullYear':
break; // See below ...
default:
return; // Just in case
}
year = value;
month = mom.month();
date = mom.date();
date = date === 29 && month === 1 && !isLeapYear(year) ? 28 : date;
void (isUTC
? d.setUTCFullYear(year, month, date)
: d.setFullYear(year, month, date));
}
// MOMENTS
function stringGet(units) {
units = normalizeUnits(units);
if (isFunction(this[units])) {
return this[units]();
}
return this;
}
function stringSet(units, value) {
if (typeof units === 'object') {
units = normalizeObjectUnits(units);
var prioritized = getPrioritizedUnits(units),
i,
prioritizedLen = prioritized.length;
for (i = 0; i < prioritizedLen; i++) {
this[prioritized[i].unit](units[prioritized[i].unit]);
}
} else {
units = normalizeUnits(units);
if (isFunction(this[units])) {
return this[units](value);
}
}
return this;
}
function mod(n, x) { function mod(n, x) {
return ((n % x) + x) % x; return ((n % x) + x) % x;
} }
@@ -919,17 +1079,9 @@
return this.localeData().months(this, format); return this.localeData().months(this, format);
}); });
// ALIASES
addUnitAlias('month', 'M');
// PRIORITY
addUnitPriority('month', 8);
// PARSING // PARSING
addRegexToken('M', match1to2); addRegexToken('M', match1to2, match1to2NoLeadingZero);
addRegexToken('MM', match1to2, match2); addRegexToken('MM', match1to2, match2);
addRegexToken('MMM', function (isStrict, locale) { addRegexToken('MMM', function (isStrict, locale) {
return locale.monthsShortRegex(isStrict); return locale.monthsShortRegex(isStrict);
@@ -1095,8 +1247,6 @@
// MOMENTS // MOMENTS
function setMonth(mom, value) { function setMonth(mom, value) {
var dayOfMonth;
if (!mom.isValid()) { if (!mom.isValid()) {
// No op // No op
return mom; return mom;
@@ -1114,8 +1264,13 @@
} }
} }
dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); var month = value,
mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); date = mom.date();
date = date < 29 ? date : Math.min(date, daysInMonth(mom.year(), month));
void (mom._isUTC
? mom._d.setUTCMonth(month, date)
: mom._d.setMonth(month, date));
return mom; return mom;
} }
@@ -1182,27 +1337,24 @@
longPieces = [], longPieces = [],
mixedPieces = [], mixedPieces = [],
i, i,
mom; mom,
shortP,
longP;
for (i = 0; i < 12; i++) { for (i = 0; i < 12; i++) {
// make the regex if we don't have it already // make the regex if we don't have it already
mom = createUTC([2000, i]); mom = createUTC([2000, i]);
shortPieces.push(this.monthsShort(mom, '')); shortP = regexEscape(this.monthsShort(mom, ''));
longPieces.push(this.months(mom, '')); longP = regexEscape(this.months(mom, ''));
mixedPieces.push(this.months(mom, '')); shortPieces.push(shortP);
mixedPieces.push(this.monthsShort(mom, '')); longPieces.push(longP);
mixedPieces.push(longP);
mixedPieces.push(shortP);
} }
// Sorting makes sure if one month (or abbr) is a prefix of another it // Sorting makes sure if one month (or abbr) is a prefix of another it
// will match the longer piece. // will match the longer piece.
shortPieces.sort(cmpLenRev); shortPieces.sort(cmpLenRev);
longPieces.sort(cmpLenRev); longPieces.sort(cmpLenRev);
mixedPieces.sort(cmpLenRev); mixedPieces.sort(cmpLenRev);
for (i = 0; i < 12; i++) {
shortPieces[i] = regexEscape(shortPieces[i]);
longPieces[i] = regexEscape(longPieces[i]);
}
for (i = 0; i < 24; i++) {
mixedPieces[i] = regexEscape(mixedPieces[i]);
}
this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
this._monthsShortRegex = this._monthsRegex; this._monthsShortRegex = this._monthsRegex;
@@ -1216,69 +1368,6 @@
); );
} }
// FORMATTING
addFormatToken('Y', 0, 0, function () {
var y = this.year();
return y <= 9999 ? zeroFill(y, 4) : '+' + y;
});
addFormatToken(0, ['YY', 2], 0, function () {
return this.year() % 100;
});
addFormatToken(0, ['YYYY', 4], 0, 'year');
addFormatToken(0, ['YYYYY', 5], 0, 'year');
addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
// ALIASES
addUnitAlias('year', 'y');
// PRIORITIES
addUnitPriority('year', 1);
// PARSING
addRegexToken('Y', matchSigned);
addRegexToken('YY', match1to2, match2);
addRegexToken('YYYY', match1to4, match4);
addRegexToken('YYYYY', match1to6, match6);
addRegexToken('YYYYYY', match1to6, match6);
addParseToken(['YYYYY', 'YYYYYY'], YEAR);
addParseToken('YYYY', function (input, array) {
array[YEAR] =
input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
});
addParseToken('YY', function (input, array) {
array[YEAR] = hooks.parseTwoDigitYear(input);
});
addParseToken('Y', function (input, array) {
array[YEAR] = parseInt(input, 10);
});
// HELPERS
function daysInYear(year) {
return isLeapYear(year) ? 366 : 365;
}
// HOOKS
hooks.parseTwoDigitYear = function (input) {
return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
};
// MOMENTS
var getSetYear = makeGetSet('FullYear', true);
function getIsLeapYear() {
return isLeapYear(this.year());
}
function createDate(y, m, d, h, M, s, ms) { function createDate(y, m, d, h, M, s, ms) {
// can't just apply() to create a date: // can't just apply() to create a date:
// https://stackoverflow.com/q/181348 // https://stackoverflow.com/q/181348
@@ -1384,21 +1473,11 @@
addFormatToken('w', ['ww', 2], 'wo', 'week'); addFormatToken('w', ['ww', 2], 'wo', 'week');
addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
// ALIASES
addUnitAlias('week', 'w');
addUnitAlias('isoWeek', 'W');
// PRIORITIES
addUnitPriority('week', 5);
addUnitPriority('isoWeek', 5);
// PARSING // PARSING
addRegexToken('w', match1to2); addRegexToken('w', match1to2, match1to2NoLeadingZero);
addRegexToken('ww', match1to2, match2); addRegexToken('ww', match1to2, match2);
addRegexToken('W', match1to2); addRegexToken('W', match1to2, match1to2NoLeadingZero);
addRegexToken('WW', match1to2, match2); addRegexToken('WW', match1to2, match2);
addWeekParseToken( addWeekParseToken(
@@ -1460,17 +1539,6 @@
addFormatToken('e', 0, 0, 'weekday'); addFormatToken('e', 0, 0, 'weekday');
addFormatToken('E', 0, 0, 'isoWeekday'); addFormatToken('E', 0, 0, 'isoWeekday');
// ALIASES
addUnitAlias('day', 'd');
addUnitAlias('weekday', 'e');
addUnitAlias('isoWeekday', 'E');
// PRIORITY
addUnitPriority('day', 11);
addUnitPriority('weekday', 11);
addUnitPriority('isoWeekday', 11);
// PARSING // PARSING
addRegexToken('d', match1to2); addRegexToken('d', match1to2);
@@ -1550,24 +1618,24 @@
return m === true return m === true
? shiftWeekdays(weekdays, this._week.dow) ? shiftWeekdays(weekdays, this._week.dow)
: m : m
? weekdays[m.day()] ? weekdays[m.day()]
: weekdays; : weekdays;
} }
function localeWeekdaysShort(m) { function localeWeekdaysShort(m) {
return m === true return m === true
? shiftWeekdays(this._weekdaysShort, this._week.dow) ? shiftWeekdays(this._weekdaysShort, this._week.dow)
: m : m
? this._weekdaysShort[m.day()] ? this._weekdaysShort[m.day()]
: this._weekdaysShort; : this._weekdaysShort;
} }
function localeWeekdaysMin(m) { function localeWeekdaysMin(m) {
return m === true return m === true
? shiftWeekdays(this._weekdaysMin, this._week.dow) ? shiftWeekdays(this._weekdaysMin, this._week.dow)
: m : m
? this._weekdaysMin[m.day()] ? this._weekdaysMin[m.day()]
: this._weekdaysMin; : this._weekdaysMin;
} }
function handleStrictParse$1(weekdayName, format, strict) { function handleStrictParse$1(weekdayName, format, strict) {
@@ -1716,7 +1784,8 @@
if (!this.isValid()) { if (!this.isValid()) {
return input != null ? this : NaN; return input != null ? this : NaN;
} }
var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
var day = get(this, 'Day');
if (input != null) { if (input != null) {
input = parseWeekday(input, this.localeData()); input = parseWeekday(input, this.localeData());
return this.add(input - day, 'd'); return this.add(input - day, 'd');
@@ -1915,13 +1984,6 @@
meridiem('a', true); meridiem('a', true);
meridiem('A', false); meridiem('A', false);
// ALIASES
addUnitAlias('hour', 'h');
// PRIORITY
addUnitPriority('hour', 13);
// PARSING // PARSING
function matchMeridiem(isStrict, locale) { function matchMeridiem(isStrict, locale) {
@@ -1930,9 +1992,9 @@
addRegexToken('a', matchMeridiem); addRegexToken('a', matchMeridiem);
addRegexToken('A', matchMeridiem); addRegexToken('A', matchMeridiem);
addRegexToken('H', match1to2); addRegexToken('H', match1to2, match1to2HasZero);
addRegexToken('h', match1to2); addRegexToken('h', match1to2, match1to2NoLeadingZero);
addRegexToken('k', match1to2); addRegexToken('k', match1to2, match1to2NoLeadingZero);
addRegexToken('HH', match1to2, match2); addRegexToken('HH', match1to2, match2);
addRegexToken('hh', match1to2, match2); addRegexToken('hh', match1to2, match2);
addRegexToken('kk', match1to2, match2); addRegexToken('kk', match1to2, match2);
@@ -2082,7 +2144,8 @@
function isLocaleNameSane(name) { function isLocaleNameSane(name) {
// Prevent names that look like filesystem paths, i.e contain '/' or '\' // Prevent names that look like filesystem paths, i.e contain '/' or '\'
return name.match('^[^/\\\\]*$') != null; // Ensure name is available and function returns boolean
return !!(name && name.match('^[^/\\\\]*$'));
} }
function loadLocale(name) { function loadLocale(name) {
@@ -2274,21 +2337,21 @@
a[MONTH] < 0 || a[MONTH] > 11 a[MONTH] < 0 || a[MONTH] > 11
? MONTH ? MONTH
: a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
? DATE ? DATE
: a[HOUR] < 0 || : a[HOUR] < 0 ||
a[HOUR] > 24 || a[HOUR] > 24 ||
(a[HOUR] === 24 && (a[HOUR] === 24 &&
(a[MINUTE] !== 0 || (a[MINUTE] !== 0 ||
a[SECOND] !== 0 || a[SECOND] !== 0 ||
a[MILLISECOND] !== 0)) a[MILLISECOND] !== 0))
? HOUR ? HOUR
: a[MINUTE] < 0 || a[MINUTE] > 59 : a[MINUTE] < 0 || a[MINUTE] > 59
? MINUTE ? MINUTE
: a[SECOND] < 0 || a[SECOND] > 59 : a[SECOND] < 0 || a[SECOND] > 59
? SECOND ? SECOND
: a[MILLISECOND] < 0 || a[MILLISECOND] > 999 : a[MILLISECOND] < 0 || a[MILLISECOND] > 999
? MILLISECOND ? MILLISECOND
: -1; : -1;
if ( if (
getParsingFlags(m)._overflowDayOfYear && getParsingFlags(m)._overflowDayOfYear &&
@@ -3729,16 +3792,16 @@
return diff < -6 return diff < -6
? 'sameElse' ? 'sameElse'
: diff < -1 : diff < -1
? 'lastWeek' ? 'lastWeek'
: diff < 0 : diff < 0
? 'lastDay' ? 'lastDay'
: diff < 1 : diff < 1
? 'sameDay' ? 'sameDay'
: diff < 2 : diff < 2
? 'nextDay' ? 'nextDay'
: diff < 7 : diff < 7
? 'nextWeek' ? 'nextWeek'
: 'sameElse'; : 'sameElse';
} }
function calendar$1(time, formats) { function calendar$1(time, formats) {
@@ -4546,16 +4609,22 @@
mixedPieces = [], mixedPieces = [],
i, i,
l, l,
erasName,
erasAbbr,
erasNarrow,
eras = this.eras(); eras = this.eras();
for (i = 0, l = eras.length; i < l; ++i) { for (i = 0, l = eras.length; i < l; ++i) {
namePieces.push(regexEscape(eras[i].name)); erasName = regexEscape(eras[i].name);
abbrPieces.push(regexEscape(eras[i].abbr)); erasAbbr = regexEscape(eras[i].abbr);
narrowPieces.push(regexEscape(eras[i].narrow)); erasNarrow = regexEscape(eras[i].narrow);
mixedPieces.push(regexEscape(eras[i].name)); namePieces.push(erasName);
mixedPieces.push(regexEscape(eras[i].abbr)); abbrPieces.push(erasAbbr);
mixedPieces.push(regexEscape(eras[i].narrow)); narrowPieces.push(erasNarrow);
mixedPieces.push(erasName);
mixedPieces.push(erasAbbr);
mixedPieces.push(erasNarrow);
} }
this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
@@ -4588,14 +4657,6 @@
// ALIASES // ALIASES
addUnitAlias('weekYear', 'gg');
addUnitAlias('isoWeekYear', 'GG');
// PRIORITY
addUnitPriority('weekYear', 1);
addUnitPriority('isoWeekYear', 1);
// PARSING // PARSING
addRegexToken('G', matchSigned); addRegexToken('G', matchSigned);
@@ -4625,7 +4686,7 @@
this, this,
input, input,
this.week(), this.week(),
this.weekday(), this.weekday() + this.localeData()._week.dow,
this.localeData()._week.dow, this.localeData()._week.dow,
this.localeData()._week.doy this.localeData()._week.doy
); );
@@ -4687,14 +4748,6 @@
addFormatToken('Q', 0, 'Qo', 'quarter'); addFormatToken('Q', 0, 'Qo', 'quarter');
// ALIASES
addUnitAlias('quarter', 'Q');
// PRIORITY
addUnitPriority('quarter', 7);
// PARSING // PARSING
addRegexToken('Q', match1); addRegexToken('Q', match1);
@@ -4714,16 +4767,9 @@
addFormatToken('D', ['DD', 2], 'Do', 'date'); addFormatToken('D', ['DD', 2], 'Do', 'date');
// ALIASES
addUnitAlias('date', 'D');
// PRIORITY
addUnitPriority('date', 9);
// PARSING // PARSING
addRegexToken('D', match1to2); addRegexToken('D', match1to2, match1to2NoLeadingZero);
addRegexToken('DD', match1to2, match2); addRegexToken('DD', match1to2, match2);
addRegexToken('Do', function (isStrict, locale) { addRegexToken('Do', function (isStrict, locale) {
// TODO: Remove "ordinalParse" fallback in next major release. // TODO: Remove "ordinalParse" fallback in next major release.
@@ -4745,13 +4791,6 @@
addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
// ALIASES
addUnitAlias('dayOfYear', 'DDD');
// PRIORITY
addUnitPriority('dayOfYear', 4);
// PARSING // PARSING
addRegexToken('DDD', match1to3); addRegexToken('DDD', match1to3);
@@ -4776,17 +4815,9 @@
addFormatToken('m', ['mm', 2], 0, 'minute'); addFormatToken('m', ['mm', 2], 0, 'minute');
// ALIASES
addUnitAlias('minute', 'm');
// PRIORITY
addUnitPriority('minute', 14);
// PARSING // PARSING
addRegexToken('m', match1to2); addRegexToken('m', match1to2, match1to2HasZero);
addRegexToken('mm', match1to2, match2); addRegexToken('mm', match1to2, match2);
addParseToken(['m', 'mm'], MINUTE); addParseToken(['m', 'mm'], MINUTE);
@@ -4798,17 +4829,9 @@
addFormatToken('s', ['ss', 2], 0, 'second'); addFormatToken('s', ['ss', 2], 0, 'second');
// ALIASES
addUnitAlias('second', 's');
// PRIORITY
addUnitPriority('second', 15);
// PARSING // PARSING
addRegexToken('s', match1to2); addRegexToken('s', match1to2, match1to2HasZero);
addRegexToken('ss', match1to2, match2); addRegexToken('ss', match1to2, match2);
addParseToken(['s', 'ss'], SECOND); addParseToken(['s', 'ss'], SECOND);
@@ -4846,14 +4869,6 @@
return this.millisecond() * 1000000; return this.millisecond() * 1000000;
}); });
// ALIASES
addUnitAlias('millisecond', 'ms');
// PRIORITY
addUnitPriority('millisecond', 16);
// PARSING // PARSING
addRegexToken('S', match1to3, match1); addRegexToken('S', match1to3, match1);
@@ -5161,12 +5176,12 @@
toInt((number % 100) / 10) === 1 toInt((number % 100) / 10) === 1
? 'th' ? 'th'
: b === 1 : b === 1
? 'st' ? 'st'
: b === 2 : b === 2
? 'nd' ? 'nd'
: b === 3 : b === 3
? 'rd' ? 'rd'
: 'th'; : 'th';
return number + output; return number + output;
}, },
}); });
@@ -5339,19 +5354,6 @@
} }
} }
// TODO: Use this.as('ms')?
function valueOf$1() {
if (!this.isValid()) {
return NaN;
}
return (
this._milliseconds +
this._days * 864e5 +
(this._months % 12) * 2592e6 +
toInt(this._months / 12) * 31536e6
);
}
function makeAs(alias) { function makeAs(alias) {
return function () { return function () {
return this.as(alias); return this.as(alias);
@@ -5366,7 +5368,8 @@
asWeeks = makeAs('w'), asWeeks = makeAs('w'),
asMonths = makeAs('M'), asMonths = makeAs('M'),
asQuarters = makeAs('Q'), asQuarters = makeAs('Q'),
asYears = makeAs('y'); asYears = makeAs('y'),
valueOf$1 = asMilliseconds;
function clone$1() { function clone$1() {
return createDuration(this); return createDuration(this);
@@ -5635,7 +5638,7 @@
//! moment.js //! moment.js
hooks.version = '2.29.4'; hooks.version = '2.30.1';
setHookCallback(createLocal); setHookCallback(createLocal);

32
package-lock.json generated
View File

@@ -7,9 +7,9 @@
"name": "lnbits", "name": "lnbits",
"dependencies": { "dependencies": {
"@chenfengyuan/vue-qrcode": "1.0.2", "@chenfengyuan/vue-qrcode": "1.0.2",
"axios": "^1.6.0", "axios": "^1.7.5",
"chart.js": "2.9", "chart.js": "^2.9.4",
"moment": "^2.29.4", "moment": "^2.30.1",
"quasar": "1.13.2", "quasar": "1.13.2",
"showdown": "^2.1.0", "showdown": "^2.1.0",
"underscore": "^1.13.6", "underscore": "^1.13.6",
@@ -22,7 +22,7 @@
"devDependencies": { "devDependencies": {
"concat": "^1.0.3", "concat": "^1.0.3",
"minify": "^9.2.0", "minify": "^9.2.0",
"prettier": "^3.2.5", "prettier": "^3.3.3",
"pyright": "1.1.289", "pyright": "1.1.289",
"sass": "^1.60.0" "sass": "^1.60.0"
} }
@@ -149,11 +149,12 @@
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
}, },
"node_modules/axios": { "node_modules/axios": {
"version": "1.6.0", "version": "1.7.5",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.5.tgz",
"integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", "integrity": "sha512-fZu86yCo+svH3uqJ/yTdQ0QHpQu5oL+/QE+QPSv6BZSkDAoky9vytxp7u5qk83OJFS3kEBcesWni9WTZAv3tSw==",
"license": "MIT",
"dependencies": { "dependencies": {
"follow-redirects": "^1.15.0", "follow-redirects": "^1.15.6",
"form-data": "^4.0.0", "form-data": "^4.0.0",
"proxy-from-env": "^1.1.0" "proxy-from-env": "^1.1.0"
} }
@@ -749,9 +750,10 @@
} }
}, },
"node_modules/moment": { "node_modules/moment": {
"version": "2.29.4", "version": "2.30.1",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
"integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
"license": "MIT",
"engines": { "engines": {
"node": "*" "node": "*"
} }
@@ -863,10 +865,11 @@
} }
}, },
"node_modules/prettier": { "node_modules/prettier": {
"version": "3.2.5", "version": "3.3.3",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz",
"integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==",
"dev": true, "dev": true,
"license": "MIT",
"bin": { "bin": {
"prettier": "bin/prettier.cjs" "prettier": "bin/prettier.cjs"
}, },
@@ -887,6 +890,7 @@
"resolved": "https://registry.npmjs.org/pyright/-/pyright-1.1.289.tgz", "resolved": "https://registry.npmjs.org/pyright/-/pyright-1.1.289.tgz",
"integrity": "sha512-fG3STxnwAt3i7bxbXUPJdYNFrcOWHLwCSEOySH2foUqtYdzWLcxDez0Kgl1X8LMQx0arMJ6HRkKghxfRD1/z6g==", "integrity": "sha512-fG3STxnwAt3i7bxbXUPJdYNFrcOWHLwCSEOySH2foUqtYdzWLcxDez0Kgl1X8LMQx0arMJ6HRkKghxfRD1/z6g==",
"dev": true, "dev": true,
"license": "MIT",
"bin": { "bin": {
"pyright": "index.js", "pyright": "index.js",
"pyright-langserver": "langserver.index.js" "pyright-langserver": "langserver.index.js"

View File

@@ -12,15 +12,15 @@
"devDependencies": { "devDependencies": {
"concat": "^1.0.3", "concat": "^1.0.3",
"minify": "^9.2.0", "minify": "^9.2.0",
"prettier": "^3.2.5", "prettier": "^3.3.3",
"pyright": "1.1.289", "pyright": "1.1.289",
"sass": "^1.60.0" "sass": "^1.60.0"
}, },
"dependencies": { "dependencies": {
"@chenfengyuan/vue-qrcode": "1.0.2", "@chenfengyuan/vue-qrcode": "1.0.2",
"axios": "^1.6.0", "axios": "^1.7.5",
"chart.js": "2.9", "chart.js": "^2.9.4",
"moment": "^2.29.4", "moment": "^2.30.1",
"quasar": "1.13.2", "quasar": "1.13.2",
"showdown": "^2.1.0", "showdown": "^2.1.0",
"underscore": "^1.13.6", "underscore": "^1.13.6",