warframe-worldstate-data 3.9.0 → 3.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data/cs/languages.json +4 -0
- package/dist/data/de/languages.json +4 -0
- package/dist/data/es/languages.json +4 -0
- package/dist/data/fr/languages.json +4 -0
- package/dist/data/it/languages.json +4 -0
- package/dist/data/ko/languages.json +4 -0
- package/dist/data/pl/languages.json +4 -0
- package/dist/data/pt/languages.json +4 -0
- package/dist/data/ru/languages.json +4 -0
- package/dist/data/sr/languages.json +4 -0
- package/dist/data/tr/languages.json +4 -0
- package/dist/data/uk/languages.json +4 -0
- package/dist/data/zh/languages.json +4 -0
- package/dist/exports-RIRl0WJ7.mjs +76 -0
- package/dist/exports-vM5Z3-oC.d.mts +122 -0
- package/dist/exports.d.mts +1 -121
- package/dist/exports.mjs +2 -78
- package/dist/safeImport-BEIxuaxh.mjs +18 -0
- package/dist/safeImport.mjs +2 -19
- package/dist/timeDate-CAsNbBQV.mjs +112 -0
- package/dist/timeDate-qOqkfAEd.d.mts +77 -0
- package/dist/tools/timeDate.d.mts +1 -76
- package/dist/tools/timeDate.mjs +2 -113
- package/dist/tools/translation.d.mts +1 -291
- package/dist/tools/translation.mjs +3 -347
- package/dist/tools/utilities.d.mts +2 -2
- package/dist/tools/utilities.mjs +4 -5
- package/dist/translation-RrgsNYPn.mjs +345 -0
- package/dist/translation-aa6j-J6e.d.mts +292 -0
- package/dist/types-Bt_sadfS.d.mts +94 -0
- package/dist/types.d.mts +1 -93
- package/dist/types.mjs +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
//#region tools/timeDate.ts
|
|
2
|
+
const epochZero = { $date: { $numberLong: 0 } };
|
|
3
|
+
const pieceIsSmoller = (seconds, ceiling, label, timePieces) => {
|
|
4
|
+
if (seconds >= ceiling) {
|
|
5
|
+
timePieces.push(`${Math.floor(seconds / ceiling)}${label}`);
|
|
6
|
+
seconds = Math.floor(seconds) % ceiling;
|
|
7
|
+
}
|
|
8
|
+
return {
|
|
9
|
+
seconds,
|
|
10
|
+
timePieces
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* @param {number} millis The number of milliseconds in the time delta
|
|
15
|
+
* @returns {string} formatted time delta
|
|
16
|
+
*/
|
|
17
|
+
const timeDeltaToString = (millis) => {
|
|
18
|
+
if (typeof millis !== "number") throw new TypeError("millis should be a number");
|
|
19
|
+
let timePieces = [];
|
|
20
|
+
const prefix = millis < 0 ? "-" : "";
|
|
21
|
+
let seconds = Math.abs(millis / 1e3);
|
|
22
|
+
({seconds, timePieces} = pieceIsSmoller(seconds, 86400, "d", timePieces));
|
|
23
|
+
({seconds, timePieces} = pieceIsSmoller(seconds, 3600, "h", timePieces));
|
|
24
|
+
({seconds, timePieces} = pieceIsSmoller(seconds, 60, "m", timePieces));
|
|
25
|
+
/* istanbul ignore else */
|
|
26
|
+
if (seconds >= 0) timePieces.push(`${Math.floor(seconds)}s`);
|
|
27
|
+
return `${prefix}${timePieces.join(" ")}`;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Returns the number of milliseconds between now and a given date
|
|
31
|
+
* @param {Date} d The date from which the current time will be subtracted
|
|
32
|
+
* @param {function} [now] A function that returns the current UNIX time in milliseconds
|
|
33
|
+
* @returns {number} The number of milliseconds after the given date to now
|
|
34
|
+
*/
|
|
35
|
+
const fromNow = (d, now = Date.now) => {
|
|
36
|
+
return d.getTime() - now();
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Returns the number of milliseconds between a given date and now
|
|
40
|
+
* @param {Date} d The date that the current time will be subtracted from
|
|
41
|
+
* @param {function} [now] A function that returns the current UNIX time in milliseconds
|
|
42
|
+
* @returns {number} The number of milliseconds after now to the given date
|
|
43
|
+
*/
|
|
44
|
+
const toNow = (d, now = Date.now) => {
|
|
45
|
+
return now() - d.getTime();
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Returns a new Date constructed from a worldState date object
|
|
49
|
+
* @param {Object} d The worldState date object
|
|
50
|
+
* @returns {Date} parsed date from DE date format
|
|
51
|
+
*/
|
|
52
|
+
const parseDate = (d) => {
|
|
53
|
+
const contentD = d || epochZero;
|
|
54
|
+
if (typeof contentD.$date?.$numberLong === "string") return new Date(Number.parseInt(contentD.$date.$numberLong, 10));
|
|
55
|
+
if (typeof contentD.$date?.$numberLong === "number") return new Date(contentD.$date.$numberLong);
|
|
56
|
+
const legacyD = d;
|
|
57
|
+
if (typeof legacyD.sec === "string") return /* @__PURE__ */ new Date(1e3 * Number.parseInt(legacyD.sec, 10));
|
|
58
|
+
if (typeof legacyD.sec !== "undefined") return /* @__PURE__ */ new Date(1e3 * legacyD.sec);
|
|
59
|
+
if (typeof d === "number") return new Date(d);
|
|
60
|
+
throw new Error(`Invalid date format ${d}`);
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Get a weekly reset timestamp
|
|
64
|
+
*/
|
|
65
|
+
const weeklyReset = (nowFunc = () => /* @__PURE__ */ new Date()) => {
|
|
66
|
+
const now = nowFunc();
|
|
67
|
+
const currentDay = now.getUTCDay();
|
|
68
|
+
const daysUntilNextMonday = currentDay === 0 ? 1 : 8 - currentDay;
|
|
69
|
+
const expiry = new Date(now.getTime());
|
|
70
|
+
expiry.setUTCDate(now.getUTCDate() + daysUntilNextMonday);
|
|
71
|
+
expiry.setUTCHours(0, 0, 0, 0);
|
|
72
|
+
const activation = new Date(expiry.getTime());
|
|
73
|
+
activation.setUTCDate(expiry.getUTCDate() - 7);
|
|
74
|
+
return {
|
|
75
|
+
activation,
|
|
76
|
+
expiry
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Get a daily reset timestamp
|
|
81
|
+
*/
|
|
82
|
+
const dailyReset = (nowFunc = () => /* @__PURE__ */ new Date()) => {
|
|
83
|
+
const now = nowFunc();
|
|
84
|
+
const activation = new Date(now.getTime());
|
|
85
|
+
activation.setUTCHours(0, 0, 0, 0);
|
|
86
|
+
const expiry = new Date(now.getTime());
|
|
87
|
+
expiry.setUTCDate(now.getUTCDate() + 1);
|
|
88
|
+
expiry.setUTCHours(0, 0, 0, 0);
|
|
89
|
+
return {
|
|
90
|
+
activation,
|
|
91
|
+
expiry
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* An object containing functions to format dates and times
|
|
96
|
+
* @typedef {Record<string, Function>} TimeDateFunctions
|
|
97
|
+
* @property {Function} timeDeltaToString - Converts a time difference to a string
|
|
98
|
+
* @property {Function} fromNow - Returns the number of milliseconds between now and
|
|
99
|
+
* a given date
|
|
100
|
+
* @property {Function} toNow - Returns the number of milliseconds between a given
|
|
101
|
+
* date and now
|
|
102
|
+
*/
|
|
103
|
+
var timeDate_default = {
|
|
104
|
+
timeDeltaToString,
|
|
105
|
+
fromNow,
|
|
106
|
+
toNow,
|
|
107
|
+
parseDate,
|
|
108
|
+
dailyReset,
|
|
109
|
+
weeklyReset
|
|
110
|
+
};
|
|
111
|
+
//#endregion
|
|
112
|
+
export { timeDate_default as a, weeklyReset as c, pieceIsSmoller as i, fromNow as n, timeDeltaToString as o, parseDate as r, toNow as s, dailyReset as t };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
//#region tools/timeDate.d.ts
|
|
2
|
+
declare const pieceIsSmoller: (seconds: number, ceiling: number, label: string, timePieces: string[]) => {
|
|
3
|
+
seconds: number;
|
|
4
|
+
timePieces: string[];
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* @param {number} millis The number of milliseconds in the time delta
|
|
8
|
+
* @returns {string} formatted time delta
|
|
9
|
+
*/
|
|
10
|
+
declare const timeDeltaToString: (millis: number) => string;
|
|
11
|
+
/**
|
|
12
|
+
* Returns the number of milliseconds between now and a given date
|
|
13
|
+
* @param {Date} d The date from which the current time will be subtracted
|
|
14
|
+
* @param {function} [now] A function that returns the current UNIX time in milliseconds
|
|
15
|
+
* @returns {number} The number of milliseconds after the given date to now
|
|
16
|
+
*/
|
|
17
|
+
declare const fromNow: (d: Date, now?: () => number) => number;
|
|
18
|
+
/**
|
|
19
|
+
* Returns the number of milliseconds between a given date and now
|
|
20
|
+
* @param {Date} d The date that the current time will be subtracted from
|
|
21
|
+
* @param {function} [now] A function that returns the current UNIX time in milliseconds
|
|
22
|
+
* @returns {number} The number of milliseconds after now to the given date
|
|
23
|
+
*/
|
|
24
|
+
declare const toNow: (d: Date, now?: () => number) => number;
|
|
25
|
+
interface ContentTimestamp {
|
|
26
|
+
$date?: {
|
|
27
|
+
$numberLong: number | string;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
interface LegacyTimestamp {
|
|
31
|
+
sec: number | string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Returns a new Date constructed from a worldState date object
|
|
35
|
+
* @param {Object} d The worldState date object
|
|
36
|
+
* @returns {Date} parsed date from DE date format
|
|
37
|
+
*/
|
|
38
|
+
declare const parseDate: (d?: ContentTimestamp | LegacyTimestamp | number) => Date;
|
|
39
|
+
/**
|
|
40
|
+
* Get a weekly reset timestamp
|
|
41
|
+
*/
|
|
42
|
+
declare const weeklyReset: (nowFunc?: () => Date) => {
|
|
43
|
+
activation: Date;
|
|
44
|
+
expiry: Date;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Get a daily reset timestamp
|
|
48
|
+
*/
|
|
49
|
+
declare const dailyReset: (nowFunc?: () => Date) => {
|
|
50
|
+
activation: Date;
|
|
51
|
+
expiry: Date;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* An object containing functions to format dates and times
|
|
55
|
+
* @typedef {Record<string, Function>} TimeDateFunctions
|
|
56
|
+
* @property {Function} timeDeltaToString - Converts a time difference to a string
|
|
57
|
+
* @property {Function} fromNow - Returns the number of milliseconds between now and
|
|
58
|
+
* a given date
|
|
59
|
+
* @property {Function} toNow - Returns the number of milliseconds between a given
|
|
60
|
+
* date and now
|
|
61
|
+
*/
|
|
62
|
+
declare const _default: {
|
|
63
|
+
timeDeltaToString: (millis: number) => string;
|
|
64
|
+
fromNow: (d: Date, now?: () => number) => number;
|
|
65
|
+
toNow: (d: Date, now?: () => number) => number;
|
|
66
|
+
parseDate: (d?: ContentTimestamp | LegacyTimestamp | number) => Date;
|
|
67
|
+
dailyReset: (nowFunc?: () => Date) => {
|
|
68
|
+
activation: Date;
|
|
69
|
+
expiry: Date;
|
|
70
|
+
};
|
|
71
|
+
weeklyReset: (nowFunc?: () => Date) => {
|
|
72
|
+
activation: Date;
|
|
73
|
+
expiry: Date;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
//#endregion
|
|
77
|
+
export { fromNow as a, timeDeltaToString as c, dailyReset as i, toNow as l, LegacyTimestamp as n, parseDate as o, _default as r, pieceIsSmoller as s, ContentTimestamp as t, weeklyReset as u };
|
|
@@ -1,77 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
declare const pieceIsSmoller: (seconds: number, ceiling: number, label: string, timePieces: string[]) => {
|
|
3
|
-
seconds: number;
|
|
4
|
-
timePieces: string[];
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* @param {number} millis The number of milliseconds in the time delta
|
|
8
|
-
* @returns {string} formatted time delta
|
|
9
|
-
*/
|
|
10
|
-
declare const timeDeltaToString: (millis: number) => string;
|
|
11
|
-
/**
|
|
12
|
-
* Returns the number of milliseconds between now and a given date
|
|
13
|
-
* @param {Date} d The date from which the current time will be subtracted
|
|
14
|
-
* @param {function} [now] A function that returns the current UNIX time in milliseconds
|
|
15
|
-
* @returns {number} The number of milliseconds after the given date to now
|
|
16
|
-
*/
|
|
17
|
-
declare const fromNow: (d: Date, now?: () => number) => number;
|
|
18
|
-
/**
|
|
19
|
-
* Returns the number of milliseconds between a given date and now
|
|
20
|
-
* @param {Date} d The date that the current time will be subtracted from
|
|
21
|
-
* @param {function} [now] A function that returns the current UNIX time in milliseconds
|
|
22
|
-
* @returns {number} The number of milliseconds after now to the given date
|
|
23
|
-
*/
|
|
24
|
-
declare const toNow: (d: Date, now?: () => number) => number;
|
|
25
|
-
interface ContentTimestamp {
|
|
26
|
-
$date?: {
|
|
27
|
-
$numberLong: number | string;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
interface LegacyTimestamp {
|
|
31
|
-
sec: number | string;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Returns a new Date constructed from a worldState date object
|
|
35
|
-
* @param {Object} d The worldState date object
|
|
36
|
-
* @returns {Date} parsed date from DE date format
|
|
37
|
-
*/
|
|
38
|
-
declare const parseDate: (d?: ContentTimestamp | LegacyTimestamp | number) => Date;
|
|
39
|
-
/**
|
|
40
|
-
* Get a weekly reset timestamp
|
|
41
|
-
*/
|
|
42
|
-
declare const weeklyReset: (nowFunc?: () => Date) => {
|
|
43
|
-
activation: Date;
|
|
44
|
-
expiry: Date;
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* Get a daily reset timestamp
|
|
48
|
-
*/
|
|
49
|
-
declare const dailyReset: (nowFunc?: () => Date) => {
|
|
50
|
-
activation: Date;
|
|
51
|
-
expiry: Date;
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* An object containing functions to format dates and times
|
|
55
|
-
* @typedef {Record<string, Function>} TimeDateFunctions
|
|
56
|
-
* @property {Function} timeDeltaToString - Converts a time difference to a string
|
|
57
|
-
* @property {Function} fromNow - Returns the number of milliseconds between now and
|
|
58
|
-
* a given date
|
|
59
|
-
* @property {Function} toNow - Returns the number of milliseconds between a given
|
|
60
|
-
* date and now
|
|
61
|
-
*/
|
|
62
|
-
declare const _default: {
|
|
63
|
-
timeDeltaToString: (millis: number) => string;
|
|
64
|
-
fromNow: (d: Date, now?: () => number) => number;
|
|
65
|
-
toNow: (d: Date, now?: () => number) => number;
|
|
66
|
-
parseDate: (d?: ContentTimestamp | LegacyTimestamp | number) => Date;
|
|
67
|
-
dailyReset: (nowFunc?: () => Date) => {
|
|
68
|
-
activation: Date;
|
|
69
|
-
expiry: Date;
|
|
70
|
-
};
|
|
71
|
-
weeklyReset: (nowFunc?: () => Date) => {
|
|
72
|
-
activation: Date;
|
|
73
|
-
expiry: Date;
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
//#endregion
|
|
1
|
+
import { a as fromNow, c as timeDeltaToString, i as dailyReset, l as toNow, n as LegacyTimestamp, o as parseDate, r as _default, s as pieceIsSmoller, t as ContentTimestamp, u as weeklyReset } from "../timeDate-qOqkfAEd.mjs";
|
|
77
2
|
export { ContentTimestamp, LegacyTimestamp, dailyReset, _default as default, fromNow, parseDate, pieceIsSmoller, timeDeltaToString, toNow, weeklyReset };
|
package/dist/tools/timeDate.mjs
CHANGED
|
@@ -1,113 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const pieceIsSmoller = (seconds, ceiling, label, timePieces) => {
|
|
4
|
-
if (seconds >= ceiling) {
|
|
5
|
-
timePieces.push(`${Math.floor(seconds / ceiling)}${label}`);
|
|
6
|
-
seconds = Math.floor(seconds) % ceiling;
|
|
7
|
-
}
|
|
8
|
-
return {
|
|
9
|
-
seconds,
|
|
10
|
-
timePieces
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* @param {number} millis The number of milliseconds in the time delta
|
|
15
|
-
* @returns {string} formatted time delta
|
|
16
|
-
*/
|
|
17
|
-
const timeDeltaToString = (millis) => {
|
|
18
|
-
if (typeof millis !== "number") throw new TypeError("millis should be a number");
|
|
19
|
-
let timePieces = [];
|
|
20
|
-
const prefix = millis < 0 ? "-" : "";
|
|
21
|
-
let seconds = Math.abs(millis / 1e3);
|
|
22
|
-
({seconds, timePieces} = pieceIsSmoller(seconds, 86400, "d", timePieces));
|
|
23
|
-
({seconds, timePieces} = pieceIsSmoller(seconds, 3600, "h", timePieces));
|
|
24
|
-
({seconds, timePieces} = pieceIsSmoller(seconds, 60, "m", timePieces));
|
|
25
|
-
/* istanbul ignore else */
|
|
26
|
-
if (seconds >= 0) timePieces.push(`${Math.floor(seconds)}s`);
|
|
27
|
-
return `${prefix}${timePieces.join(" ")}`;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Returns the number of milliseconds between now and a given date
|
|
31
|
-
* @param {Date} d The date from which the current time will be subtracted
|
|
32
|
-
* @param {function} [now] A function that returns the current UNIX time in milliseconds
|
|
33
|
-
* @returns {number} The number of milliseconds after the given date to now
|
|
34
|
-
*/
|
|
35
|
-
const fromNow = (d, now = Date.now) => {
|
|
36
|
-
return d.getTime() - now();
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Returns the number of milliseconds between a given date and now
|
|
40
|
-
* @param {Date} d The date that the current time will be subtracted from
|
|
41
|
-
* @param {function} [now] A function that returns the current UNIX time in milliseconds
|
|
42
|
-
* @returns {number} The number of milliseconds after now to the given date
|
|
43
|
-
*/
|
|
44
|
-
const toNow = (d, now = Date.now) => {
|
|
45
|
-
return now() - d.getTime();
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* Returns a new Date constructed from a worldState date object
|
|
49
|
-
* @param {Object} d The worldState date object
|
|
50
|
-
* @returns {Date} parsed date from DE date format
|
|
51
|
-
*/
|
|
52
|
-
const parseDate = (d) => {
|
|
53
|
-
const contentD = d || epochZero;
|
|
54
|
-
if (typeof contentD.$date?.$numberLong === "string") return new Date(Number.parseInt(contentD.$date.$numberLong, 10));
|
|
55
|
-
if (typeof contentD.$date?.$numberLong === "number") return new Date(contentD.$date.$numberLong);
|
|
56
|
-
const legacyD = d;
|
|
57
|
-
if (typeof legacyD.sec === "string") return /* @__PURE__ */ new Date(1e3 * Number.parseInt(legacyD.sec, 10));
|
|
58
|
-
if (typeof legacyD.sec !== "undefined") return /* @__PURE__ */ new Date(1e3 * legacyD.sec);
|
|
59
|
-
if (typeof d === "number") return new Date(d);
|
|
60
|
-
throw new Error(`Invalid date format ${d}`);
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* Get a weekly reset timestamp
|
|
64
|
-
*/
|
|
65
|
-
const weeklyReset = (nowFunc = () => /* @__PURE__ */ new Date()) => {
|
|
66
|
-
const now = nowFunc();
|
|
67
|
-
const currentDay = now.getUTCDay();
|
|
68
|
-
const daysUntilNextMonday = currentDay === 0 ? 1 : 8 - currentDay;
|
|
69
|
-
const expiry = new Date(now.getTime());
|
|
70
|
-
expiry.setUTCDate(now.getUTCDate() + daysUntilNextMonday);
|
|
71
|
-
expiry.setUTCHours(0, 0, 0, 0);
|
|
72
|
-
const activation = new Date(expiry.getTime());
|
|
73
|
-
activation.setUTCDate(expiry.getUTCDate() - 7);
|
|
74
|
-
return {
|
|
75
|
-
activation,
|
|
76
|
-
expiry
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
/**
|
|
80
|
-
* Get a daily reset timestamp
|
|
81
|
-
*/
|
|
82
|
-
const dailyReset = (nowFunc = () => /* @__PURE__ */ new Date()) => {
|
|
83
|
-
const now = nowFunc();
|
|
84
|
-
const activation = new Date(now.getTime());
|
|
85
|
-
activation.setUTCHours(0, 0, 0, 0);
|
|
86
|
-
const expiry = new Date(now.getTime());
|
|
87
|
-
expiry.setUTCDate(now.getUTCDate() + 1);
|
|
88
|
-
expiry.setUTCHours(0, 0, 0, 0);
|
|
89
|
-
return {
|
|
90
|
-
activation,
|
|
91
|
-
expiry
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
/**
|
|
95
|
-
* An object containing functions to format dates and times
|
|
96
|
-
* @typedef {Record<string, Function>} TimeDateFunctions
|
|
97
|
-
* @property {Function} timeDeltaToString - Converts a time difference to a string
|
|
98
|
-
* @property {Function} fromNow - Returns the number of milliseconds between now and
|
|
99
|
-
* a given date
|
|
100
|
-
* @property {Function} toNow - Returns the number of milliseconds between a given
|
|
101
|
-
* date and now
|
|
102
|
-
*/
|
|
103
|
-
var timeDate_default = {
|
|
104
|
-
timeDeltaToString,
|
|
105
|
-
fromNow,
|
|
106
|
-
toNow,
|
|
107
|
-
parseDate,
|
|
108
|
-
dailyReset,
|
|
109
|
-
weeklyReset
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
//#endregion
|
|
113
|
-
export { dailyReset, timeDate_default as default, fromNow, parseDate, pieceIsSmoller, timeDeltaToString, toNow, weeklyReset };
|
|
1
|
+
import { a as timeDate_default, c as weeklyReset, i as pieceIsSmoller, n as fromNow, o as timeDeltaToString, r as parseDate, s as toNow, t as dailyReset } from "../timeDate-CAsNbBQV.mjs";
|
|
2
|
+
export { dailyReset, timeDate_default as default, fromNow, parseDate, pieceIsSmoller, timeDeltaToString, toNow, weeklyReset };
|
|
@@ -1,292 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Locale } from "../exports.mjs";
|
|
3
|
-
|
|
4
|
-
//#region tools/translation.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Rough Titlecase!
|
|
7
|
-
* @param {string} str string to be titlecased
|
|
8
|
-
* @returns {string} titlecased string
|
|
9
|
-
*/
|
|
10
|
-
declare const toTitleCase: (str: string) => string;
|
|
11
|
-
/**
|
|
12
|
-
* Utility function to split the resource name and return somewhat human-readable string
|
|
13
|
-
* @param {string} str localization resource key
|
|
14
|
-
* @returns {string} human-readable string
|
|
15
|
-
*/
|
|
16
|
-
declare const splitResourceName: (str: string) => string;
|
|
17
|
-
declare const lastResourceName: (str: string | undefined) => string | undefined;
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* @param {string} color - The internal color name
|
|
21
|
-
* @param {string} dataOverride locale for use with translation
|
|
22
|
-
* @returns {Object | undefined}
|
|
23
|
-
*/
|
|
24
|
-
declare const archonShard: (color: string, dataOverride?: Locale) => ArchonShard;
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
* @param {string} color - The internal color name
|
|
28
|
-
* @param {string} dataOverride locale for use with translation
|
|
29
|
-
* @returns {string}
|
|
30
|
-
*/
|
|
31
|
-
declare const archonShardColor: (color: string, dataOverride?: Locale) => string;
|
|
32
|
-
/**
|
|
33
|
-
*
|
|
34
|
-
* @param {string} color - The internal color name
|
|
35
|
-
* @param {string} upgradeType - The upgrade type
|
|
36
|
-
* @param {string} dataOverride locale for use with translation
|
|
37
|
-
* @returns {string}
|
|
38
|
-
*/
|
|
39
|
-
declare const archonShardUpgradeType: (color: string, upgradeType: string, dataOverride?: Locale) => string;
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
* @param {string} key - The data key
|
|
43
|
-
* @param {string} dataOverride locale for use with translation
|
|
44
|
-
* @returns {string} faction name
|
|
45
|
-
*/
|
|
46
|
-
declare const faction: (key: string, dataOverride?: Locale) => string;
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
49
|
-
* @param {string} key - The data key
|
|
50
|
-
* @param {string} dataOverride locale for use with translation
|
|
51
|
-
* @returns {string} node name
|
|
52
|
-
*/
|
|
53
|
-
declare const node: (key: string, dataOverride?: Locale) => string;
|
|
54
|
-
/**
|
|
55
|
-
*
|
|
56
|
-
* @param {string} key - The data key
|
|
57
|
-
* @param {string} dataOverride locale for use with translation
|
|
58
|
-
* @returns {string} mission type of the node
|
|
59
|
-
*/
|
|
60
|
-
declare const nodeMissionType: (key: string, dataOverride?: Locale) => string;
|
|
61
|
-
/**
|
|
62
|
-
*
|
|
63
|
-
* @param {string} key - The data key
|
|
64
|
-
* @param {string} dataOverride locale for use with translation
|
|
65
|
-
* @returns {string} faction that controls the node
|
|
66
|
-
*/
|
|
67
|
-
declare const nodeEnemy: (key: string, dataOverride?: Locale) => string;
|
|
68
|
-
/**
|
|
69
|
-
*
|
|
70
|
-
* @param {string} key - The data key
|
|
71
|
-
* @param {string} dataOverride locale for use with translation
|
|
72
|
-
* @returns {string} localization for language string
|
|
73
|
-
*/
|
|
74
|
-
declare const languageString: (key: string, dataOverride?: Locale) => string;
|
|
75
|
-
/**
|
|
76
|
-
*
|
|
77
|
-
* @param {string} key - The data key
|
|
78
|
-
* @param {string} dataOverride locale for use with translation
|
|
79
|
-
* @returns {string} localization for language description
|
|
80
|
-
*/
|
|
81
|
-
declare const languageDesc: (key: string, dataOverride?: Locale) => string;
|
|
82
|
-
/**
|
|
83
|
-
*
|
|
84
|
-
* @param {string} key - The data key
|
|
85
|
-
* @param {string} dataOverride locale for use with translation
|
|
86
|
-
* @returns {string} translation for mission type
|
|
87
|
-
*/
|
|
88
|
-
declare const missionType: (key: string, dataOverride?: Locale) => string;
|
|
89
|
-
/**
|
|
90
|
-
*
|
|
91
|
-
* @param {string} key - The data key
|
|
92
|
-
* @param {string} dataOverride locale for use with translation
|
|
93
|
-
* @returns {string} conclave mode
|
|
94
|
-
*/
|
|
95
|
-
declare const conclaveMode: (key: string, dataOverride?: Locale) => string;
|
|
96
|
-
/**
|
|
97
|
-
*
|
|
98
|
-
* @param {string} key - The data key
|
|
99
|
-
* @param {string} dataOverride locale for use with translation
|
|
100
|
-
* @returns {{ value: string; description: string }} conclave category
|
|
101
|
-
*/
|
|
102
|
-
declare const conclaveCategory: (key: string, dataOverride?: Locale) => string;
|
|
103
|
-
/**
|
|
104
|
-
*
|
|
105
|
-
* @param {string} key - The data key
|
|
106
|
-
* @param {string} dataOverride locale for use with translation
|
|
107
|
-
* @returns {string} fissure modifier data
|
|
108
|
-
*/
|
|
109
|
-
declare const fissureModifier: (key: string, dataOverride?: Locale) => string;
|
|
110
|
-
/**
|
|
111
|
-
*
|
|
112
|
-
* @param {string} key - The data key
|
|
113
|
-
* @param {string} dataOverride locale for use with translation
|
|
114
|
-
* @returns {number | string} fissure tier
|
|
115
|
-
*/
|
|
116
|
-
declare const fissureTier: (key: string, dataOverride?: Locale) => number | string;
|
|
117
|
-
/**
|
|
118
|
-
*
|
|
119
|
-
* @param {string} key - The data key
|
|
120
|
-
* @param {string} dataOverride locale for use with translation
|
|
121
|
-
* @returns {string} syndicate name
|
|
122
|
-
*/
|
|
123
|
-
declare const syndicate: (key: string, dataOverride?: Locale) => string;
|
|
124
|
-
/**
|
|
125
|
-
*
|
|
126
|
-
* @param {string} key - The data key
|
|
127
|
-
* @param {string} dataOverride locale for use with translation
|
|
128
|
-
* @returns {string} upgrade type
|
|
129
|
-
*/
|
|
130
|
-
declare const upgrade: (key: string, dataOverride?: Locale) => string;
|
|
131
|
-
/**
|
|
132
|
-
*
|
|
133
|
-
* @param {string} key - The data key
|
|
134
|
-
* @param {string} dataOverride locale for use with translation
|
|
135
|
-
* @returns {string} mathematical operation value
|
|
136
|
-
*/
|
|
137
|
-
declare const operation: (key: string, dataOverride?: Locale) => string;
|
|
138
|
-
/**
|
|
139
|
-
*
|
|
140
|
-
* @param {string} key - The data key
|
|
141
|
-
* @param {string} dataOverride locale for use with translation
|
|
142
|
-
* @returns {string} symbol of mathematical operation
|
|
143
|
-
*/
|
|
144
|
-
declare const operationSymbol: (key: string, dataOverride?: Locale) => string;
|
|
145
|
-
/**
|
|
146
|
-
* @param {string} key - The data key
|
|
147
|
-
* @param {string} dataOverride locale for use with translation
|
|
148
|
-
* @returns {string} sortie boss name
|
|
149
|
-
*/
|
|
150
|
-
declare const sortieBoss: (key: string, dataOverride?: Locale) => string;
|
|
151
|
-
/**
|
|
152
|
-
* @param {string} key - The data key
|
|
153
|
-
* @param {string} dataOverride locale for use with translation
|
|
154
|
-
* @returns {string} faction for a sortie based on the boss
|
|
155
|
-
*/
|
|
156
|
-
declare const sortieFaction: (key: string, dataOverride?: Locale) => string;
|
|
157
|
-
/**
|
|
158
|
-
*
|
|
159
|
-
* @param {string} key - The data key
|
|
160
|
-
* @param {string} dataOverride locale for use with translation
|
|
161
|
-
* @returns {string} sortie modifier data
|
|
162
|
-
*/
|
|
163
|
-
declare const sortieModifier: (key: string, dataOverride?: Locale) => string;
|
|
164
|
-
/**
|
|
165
|
-
* @param {string} key - The data key
|
|
166
|
-
* @param {string} dataOverride locale for use with translation
|
|
167
|
-
* @returns {string} sortie modifier description
|
|
168
|
-
*/
|
|
169
|
-
declare const sortieModDesc: (key: string, dataOverride?: Locale) => string;
|
|
170
|
-
/**
|
|
171
|
-
* Retrieve the localized region for a given key
|
|
172
|
-
* @param {string | number} key - The region key
|
|
173
|
-
* @param {string} dataOverride - The locale to use for translations
|
|
174
|
-
* @returns {string} localized region name
|
|
175
|
-
*/
|
|
176
|
-
declare const region: (key: number, dataOverride?: Locale) => string | number;
|
|
177
|
-
/**
|
|
178
|
-
* Retrieve conclave challenge name for the given key and locale
|
|
179
|
-
* @param {string} key key to retrieve
|
|
180
|
-
* @param {string} dataOverride locale key override
|
|
181
|
-
* @returns {{
|
|
182
|
-
* title: string,
|
|
183
|
-
* description: string,
|
|
184
|
-
* standing: number,
|
|
185
|
-
* }} - The conclave challenge name for the given key
|
|
186
|
-
*/
|
|
187
|
-
declare const conclaveChallenge: (key: string, dataOverride?: Locale) => {
|
|
188
|
-
title: string;
|
|
189
|
-
description: string;
|
|
190
|
-
standing: number;
|
|
191
|
-
};
|
|
192
|
-
/**
|
|
193
|
-
* Get the steel path data for given key
|
|
194
|
-
* @param {string} dataOverride - The locale to use for translations
|
|
195
|
-
* @returns {string} - The steel path data for the given key
|
|
196
|
-
*/
|
|
197
|
-
declare const steelPath: (dataOverride?: Locale) => SteelPath;
|
|
198
|
-
/**
|
|
199
|
-
* Translate the given focus school
|
|
200
|
-
* @param {string} focus The focus school to translate
|
|
201
|
-
* @returns {string} The translated focus school
|
|
202
|
-
*/
|
|
203
|
-
declare const translateFocus: (focus?: string) => string;
|
|
204
|
-
/**
|
|
205
|
-
* Translate the given polarity
|
|
206
|
-
* @param {string?} pol The polarity to translate
|
|
207
|
-
* @returns {string} The translated polarity
|
|
208
|
-
*/
|
|
209
|
-
declare const translatePolarity: (pol?: string) => string;
|
|
210
|
-
/**
|
|
211
|
-
* Translate the given event key
|
|
212
|
-
* @param {string} key Unique event type
|
|
213
|
-
* @returns {string}
|
|
214
|
-
*/
|
|
215
|
-
declare const translateCalendarEvent: (key: string) => string;
|
|
216
|
-
/**
|
|
217
|
-
* Translate the given season name to a non-unique string
|
|
218
|
-
* @param {string} season Unique season name
|
|
219
|
-
* @returns {string}
|
|
220
|
-
*/
|
|
221
|
-
declare const translateSeason: (season: string) => string;
|
|
222
|
-
declare const translateArchimedeaType: (type: string) => string;
|
|
223
|
-
/**
|
|
224
|
-
* An object containing functions to convert in-game names to their localizations
|
|
225
|
-
* @typedef {Record<string, function>} Translator
|
|
226
|
-
* @property {function} faction - Converts faction names
|
|
227
|
-
* @property {function} node - Converts star map node names
|
|
228
|
-
* @property {function} nodeMissionType - Returns the mission type of given node
|
|
229
|
-
* @property {function} nodeEnemy - Returns the faction that controls a given node
|
|
230
|
-
* @property {function} languageString - Converts generic language strings
|
|
231
|
-
* @property {function} languageDesc - Converts generic language strings
|
|
232
|
-
* and retrieves the description
|
|
233
|
-
* @property {function} missionType - Converts mission types
|
|
234
|
-
* @property {function} conclaveMode - Converts conclave modes
|
|
235
|
-
* @property {function} conclaveCategory - Converts conclave challenge categories
|
|
236
|
-
* @property {function} fissureModifier - Converts fissure mission modifiers
|
|
237
|
-
* @property {function} syndicate - Converts syndicate names
|
|
238
|
-
* @property {function} upgrade - Converts upgrade types
|
|
239
|
-
* @property {function} operation - Converts operation types
|
|
240
|
-
* @property {function} sortieBoss - Converts sortie boss names
|
|
241
|
-
* @property {function} sortieModifier - Converts sortie modifier types
|
|
242
|
-
* @property {function} sortieModDesc - Converts sortie modifier type descriptions
|
|
243
|
-
* @property {function} region - Converts persistent enemy region indicies
|
|
244
|
-
* @property {function} conclaveChallenge - Convert conclave identifiers into standing data
|
|
245
|
-
* @property {function} steelPath - Retrieve Steel Path rotation data for locale
|
|
246
|
-
* @property {function} toTitleCase - Format provided string as titlecase
|
|
247
|
-
* @property {function} translateFocus - Translate focus schools
|
|
248
|
-
* @property {function} translatePolarity - Translate polarities
|
|
249
|
-
* @property {function} archonShard - Converts archon shard names
|
|
250
|
-
* @property {function} archonShardColor - Converts archon shard names to in-game color values
|
|
251
|
-
* @property {function} archonShardUpgradeType - Convert archon shard upgrade type
|
|
252
|
-
* @property {function} translateCalendarEvent - Translate the given event key
|
|
253
|
-
* @property {function} translateSeason - Translate the given season name to a non-unique string
|
|
254
|
-
*/
|
|
255
|
-
declare const _default: {
|
|
256
|
-
faction: (key: string, dataOverride?: Locale) => string;
|
|
257
|
-
node: (key: string, dataOverride?: Locale) => string;
|
|
258
|
-
nodeMissionType: (key: string, dataOverride?: Locale) => string;
|
|
259
|
-
nodeEnemy: (key: string, dataOverride?: Locale) => string;
|
|
260
|
-
languageString: (key: string, dataOverride?: Locale) => string;
|
|
261
|
-
languageDesc: (key: string, dataOverride?: Locale) => string;
|
|
262
|
-
missionType: (key: string, dataOverride?: Locale) => string;
|
|
263
|
-
conclaveMode: (key: string, dataOverride?: Locale) => string;
|
|
264
|
-
conclaveCategory: (key: string, dataOverride?: Locale) => string;
|
|
265
|
-
fissureModifier: (key: string, dataOverride?: Locale) => string;
|
|
266
|
-
fissureTier: (key: string, dataOverride?: Locale) => number | string;
|
|
267
|
-
syndicate: (key: string, dataOverride?: Locale) => string;
|
|
268
|
-
upgrade: (key: string, dataOverride?: Locale) => string;
|
|
269
|
-
operation: (key: string, dataOverride?: Locale) => string;
|
|
270
|
-
operationSymbol: (key: string, dataOverride?: Locale) => string;
|
|
271
|
-
sortieBoss: (key: string, dataOverride?: Locale) => string;
|
|
272
|
-
sortieModifier: (key: string, dataOverride?: Locale) => string;
|
|
273
|
-
sortieModDesc: (key: string, dataOverride?: Locale) => string;
|
|
274
|
-
sortieFaction: (key: string, dataOverride?: Locale) => string;
|
|
275
|
-
region: (key: number, dataOverride?: Locale) => string | number;
|
|
276
|
-
conclaveChallenge: (key: string, dataOverride?: Locale) => {
|
|
277
|
-
title: string;
|
|
278
|
-
description: string;
|
|
279
|
-
standing: number;
|
|
280
|
-
};
|
|
281
|
-
steelPath: (dataOverride?: Locale) => SteelPath;
|
|
282
|
-
toTitleCase: (str: string) => string;
|
|
283
|
-
translateFocus: (focus?: string) => string;
|
|
284
|
-
translatePolarity: (pol?: string) => string;
|
|
285
|
-
archonShard: (color: string, dataOverride?: Locale) => ArchonShard;
|
|
286
|
-
archonShardColor: (color: string, dataOverride?: Locale) => string;
|
|
287
|
-
archonShardUpgradeType: (color: string, upgradeType: string, dataOverride?: Locale) => string;
|
|
288
|
-
translateCalendarEvent: (key: string) => string;
|
|
289
|
-
translateSeason: (season: string) => string;
|
|
290
|
-
};
|
|
291
|
-
//#endregion
|
|
1
|
+
import { A as translateCalendarEvent, C as sortieModDesc, D as syndicate, E as steelPath, M as translatePolarity, N as translateSeason, O as toTitleCase, P as upgrade, S as sortieFaction, T as splitResourceName, _ as nodeMissionType, a as conclaveCategory, b as region, c as faction, d as languageDesc, f as languageString, g as nodeEnemy, h as node, i as archonShardUpgradeType, j as translateFocus, k as translateArchimedeaType, l as fissureModifier, m as missionType, n as archonShard, o as conclaveChallenge, p as lastResourceName, r as archonShardColor, s as conclaveMode, t as _default, u as fissureTier, v as operation, w as sortieModifier, x as sortieBoss, y as operationSymbol } from "../translation-aa6j-J6e.mjs";
|
|
292
2
|
export { archonShard, archonShardColor, archonShardUpgradeType, conclaveCategory, conclaveChallenge, conclaveMode, _default as default, faction, fissureModifier, fissureTier, languageDesc, languageString, lastResourceName, missionType, node, nodeEnemy, nodeMissionType, operation, operationSymbol, region, sortieBoss, sortieFaction, sortieModDesc, sortieModifier, splitResourceName, steelPath, syndicate, toTitleCase, translateArchimedeaType, translateCalendarEvent, translateFocus, translatePolarity, translateSeason, upgrade };
|