UEA-PRODEM

This commit is contained in:
2026-06-10 12:14:46 -03:00
parent f54126b9d8
commit 9947565694
5319 changed files with 148520 additions and 129332 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
import type { FormatDistanceFn } from "../../types.js";
import type { FormatDistanceFn } from "../../types.ts";
export declare const formatDistance: FormatDistanceFn;
+1 -1
View File
@@ -1,2 +1,2 @@
import type { FormatDistanceFn } from "../../types.js";
import type { FormatDistanceFn } from "../../types.ts";
export declare const formatDistance: FormatDistanceFn;
+1 -1
View File
@@ -1,2 +1,2 @@
import type { FormatLong } from "../../types.js";
import type { FormatLong } from "../../types.ts";
export declare const formatLong: FormatLong;
+1 -1
View File
@@ -1,2 +1,2 @@
import type { FormatLong } from "../../types.js";
import type { FormatLong } from "../../types.ts";
export declare const formatLong: FormatLong;
+1 -1
View File
@@ -1,2 +1,2 @@
import type { FormatRelativeFn } from "../../types.js";
import type { FormatRelativeFn } from "../../types.ts";
export declare const formatRelative: FormatRelativeFn;
+1 -1
View File
@@ -1,2 +1,2 @@
import type { FormatRelativeFn } from "../../types.js";
import type { FormatRelativeFn } from "../../types.ts";
export declare const formatRelative: FormatRelativeFn;
+1 -1
View File
@@ -1,2 +1,2 @@
import type { Localize } from "../../types.js";
import type { Localize } from "../../types.ts";
export declare const localize: Localize;
+1 -1
View File
@@ -1,2 +1,2 @@
import type { Localize } from "../../types.js";
import type { Localize } from "../../types.ts";
export declare const localize: Localize;
+15 -15
View File
@@ -26,9 +26,9 @@ const parseQuarterPatterns = {
};
const matchMonthPatterns = {
narrow: /^(一|二|三|四|五|六|七|八|九|十[二一])/i,
abbreviated: /^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,
wide: /^(一|二|三|四|五|六|七|八|九|十[二一])月/i,
narrow: /^(一|二|三|四|五|六|七|八|九|十[二一]?)/i,
abbreviated: /^(一|二|三|四|五|六|七|八|九|十[二一]?|\d|1[0-2])月/i,
wide: /^(一|二|三|四|五|六|七|八|九|十[二一]?)月/i,
};
const parseMonthPatterns = {
narrow: [
@@ -47,18 +47,18 @@ const parseMonthPatterns = {
],
any: [
/^一|1/i,
/^二|2/i,
/^三|3/i,
/^四|4/i,
/^五|5/i,
/^六|6/i,
/^七|7/i,
/^八|8/i,
/^九|9/i,
/^十(?!(一|二))|10/i,
/^十一|11/i,
/^十二|12/i,
/^(一|1(?!\d))/i,
/^(二|2)/i,
/^(三|3)/i,
/^(四|4)/i,
/^(五|5)/i,
/^(六|6)/i,
/^(七|7)/i,
/^(八|8)/i,
/^(九|9)/i,
/^(十(?!(一|二))|10)/i,
/^(十一|11)/i,
/^(十二|12)/i,
],
};
+1 -1
View File
@@ -1,2 +1,2 @@
import type { Match } from "../../types.js";
import type { Match } from "../../types.ts";
export declare const match: Match;
+1 -1
View File
@@ -1,2 +1,2 @@
import type { Match } from "../../types.js";
import type { Match } from "../../types.ts";
export declare const match: Match;
+15 -15
View File
@@ -23,9 +23,9 @@ const parseQuarterPatterns = {
};
const matchMonthPatterns = {
narrow: /^(一|二|三|四|五|六|七|八|九|十[二一])/i,
abbreviated: /^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,
wide: /^(一|二|三|四|五|六|七|八|九|十[二一])月/i,
narrow: /^(一|二|三|四|五|六|七|八|九|十[二一]?)/i,
abbreviated: /^(一|二|三|四|五|六|七|八|九|十[二一]?|\d|1[0-2])月/i,
wide: /^(一|二|三|四|五|六|七|八|九|十[二一]?)月/i,
};
const parseMonthPatterns = {
narrow: [
@@ -44,18 +44,18 @@ const parseMonthPatterns = {
],
any: [
/^一|1/i,
/^二|2/i,
/^三|3/i,
/^四|4/i,
/^五|5/i,
/^六|6/i,
/^七|7/i,
/^八|8/i,
/^九|9/i,
/^十(?!(一|二))|10/i,
/^十一|11/i,
/^十二|12/i,
/^(一|1(?!\d))/i,
/^(二|2)/i,
/^(三|3)/i,
/^(四|4)/i,
/^(五|5)/i,
/^(六|6)/i,
/^(七|7)/i,
/^(八|8)/i,
/^(九|9)/i,
/^(十(?!(一|二))|10)/i,
/^(十一|11)/i,
/^(十二|12)/i,
],
};
+382 -349
View File
@@ -1,154 +1,159 @@
(() => {
var _window$dateFns;function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}var __defProp = Object.defineProperty;
var __export = function __export(target, all) {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: function set(newValue) {return all[name] = function () {return newValue;};}
});
};
// lib/locale/zh-HK/_lib/formatDistance.js
var _window$dateFns;function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(e, r, t) {return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : i + "";}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);} //#region dist/date-fns/locale/zh-HK/_lib/formatDistance.js
var formatDistanceLocale = {
lessThanXSeconds: {
one: "\u5C11\u65BC 1 \u79D2",
other: "\u5C11\u65BC {{count}} \u79D2"
one: "少於 1 秒",
other: "少於 {{count}} "
},
xSeconds: {
one: "1 \u79D2",
other: "{{count}} \u79D2"
one: "1 ",
other: "{{count}} "
},
halfAMinute: "\u534A\u5206\u9418",
halfAMinute: "半分鐘",
lessThanXMinutes: {
one: "\u5C11\u65BC 1 \u5206\u9418",
other: "\u5C11\u65BC {{count}} \u5206\u9418"
one: "少於 1 分鐘",
other: "少於 {{count}} 分鐘"
},
xMinutes: {
one: "1 \u5206\u9418",
other: "{{count}} \u5206\u9418"
one: "1 分鐘",
other: "{{count}} 分鐘"
},
xHours: {
one: "1 \u5C0F\u6642",
other: "{{count}} \u5C0F\u6642"
one: "1 小時",
other: "{{count}} 小時"
},
aboutXHours: {
one: "\u5927\u7D04 1 \u5C0F\u6642",
other: "\u5927\u7D04 {{count}} \u5C0F\u6642"
one: "大約 1 小時",
other: "大約 {{count}} 小時"
},
xDays: {
one: "1 \u5929",
other: "{{count}} \u5929"
one: "1 ",
other: "{{count}} "
},
aboutXWeeks: {
one: "\u5927\u7D04 1 \u500B\u661F\u671F",
other: "\u5927\u7D04 {{count}} \u500B\u661F\u671F"
one: "大約 1 個星期",
other: "大約 {{count}} 個星期"
},
xWeeks: {
one: "1 \u500B\u661F\u671F",
other: "{{count}} \u500B\u661F\u671F"
one: "1 個星期",
other: "{{count}} 個星期"
},
aboutXMonths: {
one: "\u5927\u7D04 1 \u500B\u6708",
other: "\u5927\u7D04 {{count}} \u500B\u6708"
one: "大約 1 個月",
other: "大約 {{count}} 個月"
},
xMonths: {
one: "1 \u500B\u6708",
other: "{{count}} \u500B\u6708"
one: "1 個月",
other: "{{count}} 個月"
},
aboutXYears: {
one: "\u5927\u7D04 1 \u5E74",
other: "\u5927\u7D04 {{count}} \u5E74"
one: "大約 1 年",
other: "大約 {{count}} "
},
xYears: {
one: "1 \u5E74",
other: "{{count}} \u5E74"
one: "1 ",
other: "{{count}} "
},
overXYears: {
one: "\u8D85\u904E 1 \u5E74",
other: "\u8D85\u904E {{count}} \u5E74"
one: "超過 1 年",
other: "超過 {{count}} "
},
almostXYears: {
one: "\u5C07\u8FD1 1 \u5E74",
other: "\u5C07\u8FD1 {{count}} \u5E74"
one: "將近 1 年",
other: "將近 {{count}} "
}
};
var formatDistance = function formatDistance(token, count, options) {
var result;
var 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 !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return result + "\u5167";
} else {
return result + "\u524D";
}
}
if (typeof tokenValue === "string") result = tokenValue;else
if (count === 1) result = tokenValue.one;else
result = tokenValue.other.replace("{{count}}", String(count));
if (options !== null && options !== void 0 && options.addSuffix) if (options.comparison && options.comparison > 0) return result + "內";else
return result + "前";
return result;
};
// lib/locale/_lib/buildFormatLongFn.js
//#endregion
//#region dist/date-fns/locale/_lib/buildFormatLongFn.js
function buildFormatLongFn(args) {
return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var width = options.width ? String(options.width) : args.defaultWidth;
var format = args.formats[width] || args.formats[args.defaultWidth];
return format;
return args.formats[width] || args.formats[args.defaultWidth];
};
}
// lib/locale/zh-HK/_lib/formatLong.js
var dateFormats = {
full: "y'\u5E74'M'\u6708'd'\u65E5' EEEE",
long: "y'\u5E74'M'\u6708'd'\u65E5'",
medium: "yyyy-MM-dd",
short: "yy-MM-dd"
};
var timeFormats = {
full: "zzzz a h:mm:ss",
long: "z a h:mm:ss",
medium: "a h:mm:ss",
short: "a h:mm"
};
var dateTimeFormats = {
full: "{{date}} {{time}}",
long: "{{date}} {{time}}",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
formats: {
full: "y'年'M'月'd'日' EEEE",
long: "y'年'M'月'd'日'",
medium: "yyyy-MM-dd",
short: "yy-MM-dd"
},
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
formats: {
full: "zzzz a h:mm:ss",
long: "z a h:mm:ss",
medium: "a h:mm:ss",
short: "a h:mm"
},
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
formats: {
full: "{{date}} {{time}}",
long: "{{date}} {{time}}",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}"
},
defaultWidth: "full"
})
};
// lib/locale/zh-HK/_lib/formatRelative.js
//#endregion
//#region dist/date-fns/locale/zh-HK/_lib/formatRelative.js
var formatRelativeLocale = {
lastWeek: "'\u4E0A\u500B'eeee p",
yesterday: "'\u6628\u5929' p",
today: "'\u4ECA\u5929' p",
tomorrow: "'\u660E\u5929' p",
nextWeek: "'\u4E0B\u500B'eeee p",
lastWeek: "'上個'eeee p",
yesterday: "'昨天' p",
today: "'今天' p",
tomorrow: "'明天' p",
nextWeek: "'下個'eeee p",
other: "P"
};
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {return formatRelativeLocale[token];};
// lib/locale/_lib/buildLocalizeFn.js
//#endregion
//#region dist/date-fns/locale/_lib/buildLocalizeFn.js
/**
* The localize function argument callback which allows to convert raw value to
* the actual type.
*
* @param value - The value to convert
*
* @returns The converted value
*/
/**
* The map of localized values for each width.
*/
/**
* The index type of the locale unit value. It types conversion of units of
* values that don't start at 0 (i.e. quarters).
*/
/**
* Converts the unit value to the tuple of values.
*/
/**
* The tuple of localized era values. The first element represents BC,
* the second element represents AD.
*/
/**
* The tuple of localized quarter values. The first element represents Q1.
*/
/**
* The tuple of localized day values. The first element represents Sunday.
*/
/**
* The tuple of localized month values. The first element represents January.
*/
function buildLocalizeFn(args) {
return function (value, options) {
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
@@ -166,145 +171,187 @@ function buildLocalizeFn(args) {
return valuesArray[index];
};
}
// lib/locale/zh-HK/_lib/localize.js
//#endregion
//#region dist/date-fns/locale/zh-HK/_lib/localize.js
var eraValues = {
narrow: ["\u524D", "\u516C\u5143"],
abbreviated: ["\u524D", "\u516C\u5143"],
wide: ["\u516C\u5143\u524D", "\u516C\u5143"]
narrow: ["", "公元"],
abbreviated: ["", "公元"],
wide: ["公元前", "公元"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["\u7B2C\u4E00\u5B63", "\u7B2C\u4E8C\u5B63", "\u7B2C\u4E09\u5B63", "\u7B2C\u56DB\u5B63"],
wide: ["\u7B2C\u4E00\u5B63\u5EA6", "\u7B2C\u4E8C\u5B63\u5EA6", "\u7B2C\u4E09\u5B63\u5EA6", "\u7B2C\u56DB\u5B63\u5EA6"]
narrow: [
"1",
"2",
"3",
"4"],
abbreviated: [
"第一季",
"第二季",
"第三季",
"第四季"],
wide: [
"第一季度",
"第二季度",
"第三季度",
"第四季度"]
};
var monthValues = {
narrow: [
"\u4E00",
"\u4E8C",
"\u4E09",
"\u56DB",
"\u4E94",
"\u516D",
"\u4E03",
"\u516B",
"\u4E5D",
"\u5341",
"\u5341\u4E00",
"\u5341\u4E8C"],
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"十一",
"十二"],
abbreviated: [
"1\u6708",
"2\u6708",
"3\u6708",
"4\u6708",
"5\u6708",
"6\u6708",
"7\u6708",
"8\u6708",
"9\u6708",
"10\u6708",
"11\u6708",
"12\u6708"],
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12"],
wide: [
"\u4E00\u6708",
"\u4E8C\u6708",
"\u4E09\u6708",
"\u56DB\u6708",
"\u4E94\u6708",
"\u516D\u6708",
"\u4E03\u6708",
"\u516B\u6708",
"\u4E5D\u6708",
"\u5341\u6708",
"\u5341\u4E00\u6708",
"\u5341\u4E8C\u6708"]
"一月",
"二月",
"三月",
"四月",
"五月",
"六月",
"七月",
"八月",
"九月",
"十月",
"十一月",
"十二月"]
};
var dayValues = {
narrow: ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"],
short: ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"],
abbreviated: ["\u9031\u65E5", "\u9031\u4E00", "\u9031\u4E8C", "\u9031\u4E09", "\u9031\u56DB", "\u9031\u4E94", "\u9031\u516D"],
wide: ["\u661F\u671F\u65E5", "\u661F\u671F\u4E00", "\u661F\u671F\u4E8C", "\u661F\u671F\u4E09", "\u661F\u671F\u56DB", "\u661F\u671F\u4E94", "\u661F\u671F\u516D"]
narrow: [
"日",
"一",
"二",
"三",
"四",
"五",
"六"],
short: [
"日",
"一",
"二",
"三",
"四",
"五",
"六"],
abbreviated: [
"週日",
"週一",
"週二",
"週三",
"週四",
"週五",
"週六"],
wide: [
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六"]
};
var dayPeriodValues = {
narrow: {
am: "\u4E0A",
pm: "\u4E0B",
midnight: "\u5348\u591C",
noon: "\u664C",
morning: "\u65E9",
afternoon: "\u5348",
evening: "\u665A",
night: "\u591C"
am: "",
pm: "",
midnight: "午夜",
noon: "",
morning: "",
afternoon: "",
evening: "",
night: ""
},
abbreviated: {
am: "\u4E0A\u5348",
pm: "\u4E0B\u5348",
midnight: "\u5348\u591C",
noon: "\u4E2D\u5348",
morning: "\u4E0A\u5348",
afternoon: "\u4E0B\u5348",
evening: "\u665A\u4E0A",
night: "\u591C\u665A"
am: "上午",
pm: "下午",
midnight: "午夜",
noon: "中午",
morning: "上午",
afternoon: "下午",
evening: "晚上",
night: "夜晚"
},
wide: {
am: "\u4E0A\u5348",
pm: "\u4E0B\u5348",
midnight: "\u5348\u591C",
noon: "\u4E2D\u5348",
morning: "\u4E0A\u5348",
afternoon: "\u4E0B\u5348",
evening: "\u665A\u4E0A",
night: "\u591C\u665A"
am: "上午",
pm: "下午",
midnight: "午夜",
noon: "中午",
morning: "上午",
afternoon: "下午",
evening: "晚上",
night: "夜晚"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "\u4E0A",
pm: "\u4E0B",
midnight: "\u5348\u591C",
noon: "\u664C",
morning: "\u65E9",
afternoon: "\u5348",
evening: "\u665A",
night: "\u591C"
am: "",
pm: "",
midnight: "午夜",
noon: "",
morning: "",
afternoon: "",
evening: "",
night: ""
},
abbreviated: {
am: "\u4E0A\u5348",
pm: "\u4E0B\u5348",
midnight: "\u5348\u591C",
noon: "\u4E2D\u5348",
morning: "\u4E0A\u5348",
afternoon: "\u4E0B\u5348",
evening: "\u665A\u4E0A",
night: "\u591C\u665A"
am: "上午",
pm: "下午",
midnight: "午夜",
noon: "中午",
morning: "上午",
afternoon: "下午",
evening: "晚上",
night: "夜晚"
},
wide: {
am: "\u4E0A\u5348",
pm: "\u4E0B\u5348",
midnight: "\u5348\u591C",
noon: "\u4E2D\u5348",
morning: "\u4E0A\u5348",
afternoon: "\u4E0B\u5348",
evening: "\u665A\u4E0A",
night: "\u591C\u665A"
am: "上午",
pm: "下午",
midnight: "午夜",
noon: "中午",
morning: "上午",
afternoon: "下午",
evening: "晚上",
night: "夜晚"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, options) {
var number = Number(dirtyNumber);
switch (options === null || options === void 0 ? void 0 : options.unit) {
case "date":
return number + "\u65E5";
case "hour":
return number + "\u6642";
case "minute":
return number + "\u5206";
case "second":
return number + "\u79D2";
default:
return "\u7B2C " + number;
case "date":return number + "日";
case "hour":return number + "";
case "minute":return number + "分";
case "second":return number + "";
default:return "第 " + number;
}
};
var localize = {
@@ -333,16 +380,14 @@ var localize = {
defaultFormattingWidth: "wide"
})
};
// lib/locale/_lib/buildMatchFn.js
//#endregion
//#region dist/date-fns/locale/_lib/buildMatchFn.js
function buildMatchFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var width = options.width;
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
var matchResult = string.match(matchPattern);
if (!matchResult) {
return null;
}
if (!matchResult) return null;
var matchedString = matchResult[0];
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
@@ -350,175 +395,164 @@ function buildMatchFn(args) {
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
return {
value: value,
rest: rest
};
};
}
function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
for (var key in object) if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) return key;
}
function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
for (var key = 0; key < array.length; key++) if (predicate(array[key])) return key;
}
// lib/locale/_lib/buildMatchPatternFn.js
//#endregion
//#region dist/date-fns/locale/_lib/buildMatchPatternFn.js
function buildMatchPatternFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var matchResult = string.match(args.matchPattern);
if (!matchResult)
return null;
if (!matchResult) return null;
var matchedString = matchResult[0];
var parseResult = string.match(args.parsePattern);
if (!parseResult)
return null;
if (!parseResult) return null;
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
return {
value: value,
rest: rest
};
};
}
// lib/locale/zh-HK/_lib/match.js
var matchOrdinalNumberPattern = /^(第\s*)?\d+(日|時|分|秒)?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(前)/i,
abbreviated: /^(前)/i,
wide: /^(公元前|公元)/i
};
var parseEraPatterns = {
any: [/^(前)/i, /^(公元)/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^第[一二三四]季/i,
wide: /^第[一二三四]季度/i
};
var parseQuarterPatterns = {
any: [/(1|一)/i, /(2|二)/i, /(3|三)/i, /(4|四)/i]
};
var matchMonthPatterns = {
narrow: /^(一|二|三|四|五|六|七|八|九|十[二一])/i,
abbreviated: /^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,
wide: /^(一|二|三|四|五|六|七|八|九|十[二一])月/i
};
var parseMonthPatterns = {
narrow: [
/^一/i,
/^二/i,
/^三/i,
/^四/i,
/^五/i,
/^六/i,
/^七/i,
/^八/i,
/^九/i,
/^十(?!(一|二))/i,
/^十一/i,
/^十二/i],
any: [
/^一|1/i,
/^二|2/i,
/^三|3/i,
/^四|4/i,
/^五|5/i,
/^六|6/i,
/^七|7/i,
/^八|8/i,
/^九|9/i,
/^十(?!(一|二))|10/i,
/^十一|11/i,
/^十二|12/i]
};
var matchDayPatterns = {
narrow: /^[一二三四五六日]/i,
short: /^[一二三四五六日]/i,
abbreviated: /^週[一二三四五六日]/i,
wide: /^星期[一二三四五六日]/i
};
var parseDayPatterns = {
any: [/日/i, /一/i, /二/i, /三/i, /四/i, /五/i, /六/i]
};
var matchDayPeriodPatterns = {
any: /^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨)/i
};
var parseDayPeriodPatterns = {
any: {
am: /^上午?/i,
pm: /^下午?/i,
midnight: /^午夜/i,
noon: /^[中正]午/i,
morning: /^早上/i,
afternoon: /^下午/i,
evening: /^晚上?/i,
night: /^凌晨/i
}
};
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {return parseInt(value, 10);}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any"
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: function valueCallback(index) {return 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"
})
};
// lib/locale/zh-HK.js
//#endregion
//#region dist/date-fns/locale/zh-HK.js
/**
* @category Locales
* @summary Chinese Traditional locale.
* @language Chinese Traditional
* @iso-639-2 zho
* @author Gary Ip [@gaplo](https://github.com/gaplo)
*/
var zhHK = {
code: "zh-HK",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
match: {
ordinalNumber: buildMatchPatternFn({
matchPattern: /^(第\s*)?\d+(日|時|分|秒)?/i,
parsePattern: /\d+/i,
valueCallback: function valueCallback(value) {return parseInt(value, 10);}
}),
era: buildMatchFn({
matchPatterns: {
narrow: /^(前)/i,
abbreviated: /^(前)/i,
wide: /^(公元前|公元)/i
},
defaultMatchWidth: "wide",
parsePatterns: { any: [/^(前)/i, /^(公元)/i] },
defaultParseWidth: "any"
}),
quarter: buildMatchFn({
matchPatterns: {
narrow: /^[1234]/i,
abbreviated: /^第[一二三四]季/i,
wide: /^第[一二三四]季度/i
},
defaultMatchWidth: "wide",
parsePatterns: { any: [
/(1|一)/i,
/(2|二)/i,
/(3|三)/i,
/(4|四)/i]
},
defaultParseWidth: "any",
valueCallback: function valueCallback(index) {return index + 1;}
}),
month: buildMatchFn({
matchPatterns: {
narrow: /^(一|二|三|四|五|六|七|八|九|十[二一]?)/i,
abbreviated: /^(一|二|三|四|五|六|七|八|九|十[二一]?|\d|1[0-2])月/i,
wide: /^(一|二|三|四|五|六|七|八|九|十[二一]?)月/i
},
defaultMatchWidth: "wide",
parsePatterns: {
narrow: [
/^一/i,
/^二/i,
/^三/i,
/^四/i,
/^五/i,
/^六/i,
/^七/i,
/^八/i,
/^九/i,
/^十(?!(一|二))/i,
/^十一/i,
/^十二/i],
any: [
/^(一|1(?!\d))/i,
/^(二|2)/i,
/^(三|3)/i,
/^(四|4)/i,
/^(五|5)/i,
/^(六|6)/i,
/^(七|7)/i,
/^(八|8)/i,
/^(九|9)/i,
/^(十(?!(一|二))|10)/i,
/^(十一|11)/i,
/^(十二|12)/i]
},
defaultParseWidth: "any"
}),
day: buildMatchFn({
matchPatterns: {
narrow: /^[一二三四五六日]/i,
short: /^[一二三四五六日]/i,
abbreviated: /^週[一二三四五六日]/i,
wide: /^星期[一二三四五六日]/i
},
defaultMatchWidth: "wide",
parsePatterns: { any: [
/日/i,
/一/i,
/二/i,
/三/i,
/四/i,
/五/i,
/六/i]
},
defaultParseWidth: "any"
}),
dayPeriod: buildMatchFn({
matchPatterns: { any: /^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨)/i },
defaultMatchWidth: "any",
parsePatterns: { any: {
am: /^上午?/i,
pm: /^下午?/i,
midnight: /^午夜/i,
noon: /^[中正]午/i,
morning: /^早上/i,
afternoon: /^下午/i,
evening: /^晚上?/i,
night: /^凌晨/i
} },
defaultParseWidth: "any"
})
},
options: {
weekStartsOn: 0,
firstWeekContainsDate: 1
}
};
// lib/locale/zh-HK/cdn.js
//#endregion
//#region dist/date-fns/_entries/locale/zh-HK/cdn.js
window.dateFns = _objectSpread(_objectSpread({},
window.dateFns), {}, {
locale: _objectSpread(_objectSpread({}, (_window$dateFns =
@@ -526,8 +560,7 @@ window.dateFns), {}, {
zhHK: zhHK }) });
//#endregion
//# debugId=434F1B9F02C127CF64756E2164756E21
//# sourceMappingURL=cdn.js.map
console.log("date-fns CDN files have moved to @date-fns/cdn. Please update your URLs. See: https://date-fns.org/docs/CDN");
})();
File diff suppressed because one or more lines are too long
+1 -3
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long