warframe-worldstate-parser 5.2.16 → 5.2.18

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.
Files changed (184) hide show
  1. package/dist/{Calendar-CRM0XhAy.d.mts → Calendar-C-rbmV_t.d.mts} +1 -1
  2. package/dist/{CambionCycle-OI3v1knd.d.mts → CambionCycle-BzR_MfPH.d.mts} +2 -2
  3. package/dist/{CetusCycle-DQ4n05vO.d.mts → CetusCycle-DaqfF4J1.d.mts} +1 -1
  4. package/dist/{ConstructionProgress-DG2KzS0X.d.mts → ConstructionProgress-BRxmro3-.d.mts} +1 -1
  5. package/dist/{DarkSectorBattle-CiSe3kFm.d.mts → DarkSectorBattle-DHRl5tG1.d.mts} +1 -1
  6. package/dist/{Dependency-CNqXngHD.d.mts → Dependency-Cd-TxBJy.d.mts} +1 -1
  7. package/dist/{EarthCycle-CxtijnVV.d.mts → EarthCycle-C_oB5gDc.d.mts} +1 -1
  8. package/dist/{MidrathCycle-E0gMF3AR.d.mts → MidrathCycle-CxveqDtx.d.mts} +1 -1
  9. package/dist/{News-DxEm-q6V.d.mts → News-CJ3lD7_g.d.mts} +1 -1
  10. package/dist/{Nightwave-CPqMSqGK.d.mts → Nightwave-BLHH02ht.d.mts} +2 -2
  11. package/dist/{NightwaveChallenge-CG3uychc.d.mts → NightwaveChallenge-j_m4hVQU.d.mts} +1 -1
  12. package/dist/{PersistentEnemy-DnnnreSz.d.mts → PersistentEnemy-BJ4twtUY.d.mts} +1 -1
  13. package/dist/{VallisCycle-6DCaWFoR.d.mts → VallisCycle-as7DM4a-.d.mts} +1 -1
  14. package/dist/{ZarimanCycle-BrSLIWhD.d.mts → ZarimanCycle-DyYiVfyG.d.mts} +1 -1
  15. package/dist/{index-Bgx8kIDy.d.mts → index-C4EJ_Mpd.d.mts} +6 -6
  16. package/dist/lib/WorldState.d.mts +16 -19
  17. package/dist/lib/WorldState.mjs +32 -48
  18. package/dist/lib/models/Alert.d.mts +1 -17
  19. package/dist/lib/models/Alert.mjs +49 -7
  20. package/dist/lib/models/Archimedea.d.mts +1 -17
  21. package/dist/lib/models/Archimedea.mjs +88 -4
  22. package/dist/lib/models/Calendar.d.mts +1 -2
  23. package/dist/lib/models/Calendar.mjs +79 -4
  24. package/dist/lib/models/CambionCycle.d.mts +1 -3
  25. package/dist/lib/models/CambionCycle.mjs +28 -4
  26. package/dist/lib/models/CetusCycle.d.mts +1 -2
  27. package/dist/lib/models/CetusCycle.mjs +87 -4
  28. package/dist/lib/models/ChallengeInstance.d.mts +1 -17
  29. package/dist/lib/models/ChallengeInstance.mjs +46 -3
  30. package/dist/lib/models/ConclaveChallenge.d.mts +1 -17
  31. package/dist/lib/models/ConclaveChallenge.mjs +77 -4
  32. package/dist/lib/models/ConstructionProgress.d.mts +1 -2
  33. package/dist/lib/models/ConstructionProgress.mjs +23 -4
  34. package/dist/lib/models/DailyDeal.d.mts +1 -17
  35. package/dist/lib/models/DailyDeal.mjs +64 -4
  36. package/dist/lib/models/DarkSector.d.mts +1 -17
  37. package/dist/lib/models/DarkSector.mjs +136 -8
  38. package/dist/lib/models/DarkSectorBattle.d.mts +1 -2
  39. package/dist/lib/models/DarkSectorBattle.mjs +49 -3
  40. package/dist/lib/models/DuviriCycle.d.mts +1 -17
  41. package/dist/lib/models/DuviriCycle.mjs +55 -4
  42. package/dist/lib/models/EarthCycle.d.mts +1 -2
  43. package/dist/lib/models/EarthCycle.mjs +73 -4
  44. package/dist/lib/models/Fissure.d.mts +1 -17
  45. package/dist/lib/models/Fissure.mjs +83 -4
  46. package/dist/lib/models/FlashSale.d.mts +1 -17
  47. package/dist/lib/models/FlashSale.mjs +73 -4
  48. package/dist/lib/models/GlobalUpgrade.d.mts +1 -17
  49. package/dist/lib/models/GlobalUpgrade.mjs +56 -4
  50. package/dist/lib/models/Invasion.d.mts +1 -17
  51. package/dist/lib/models/Invasion.mjs +106 -6
  52. package/dist/lib/models/Kinepage.d.mts +1 -1
  53. package/dist/lib/models/Kinepage.mjs +23 -3
  54. package/dist/lib/models/Kuva.d.mts +1 -17
  55. package/dist/lib/models/Kuva.mjs +85 -3
  56. package/dist/lib/models/MidrathCycle.d.mts +1 -2
  57. package/dist/lib/models/MidrathCycle.mjs +66 -4
  58. package/dist/lib/models/Mission.d.mts +1 -17
  59. package/dist/lib/models/Mission.mjs +138 -5
  60. package/dist/lib/models/News.d.mts +1 -2
  61. package/dist/lib/models/News.mjs +116 -4
  62. package/dist/lib/models/Nightwave.d.mts +1 -3
  63. package/dist/lib/models/Nightwave.mjs +58 -5
  64. package/dist/lib/models/NightwaveChallenge.d.mts +1 -2
  65. package/dist/lib/models/NightwaveChallenge.mjs +51 -4
  66. package/dist/lib/models/PersistentEnemy.d.mts +1 -2
  67. package/dist/lib/models/PersistentEnemy.mjs +74 -4
  68. package/dist/lib/models/Reward.d.mts +1 -17
  69. package/dist/lib/models/Reward.mjs +71 -4
  70. package/dist/lib/models/SentientOutpost.d.mts +1 -17
  71. package/dist/lib/models/SentientOutpost.mjs +63 -3
  72. package/dist/lib/models/Simaris.d.mts +1 -17
  73. package/dist/lib/models/Simaris.mjs +33 -3
  74. package/dist/lib/models/Sortie.d.mts +1 -17
  75. package/dist/lib/models/Sortie.mjs +71 -8
  76. package/dist/lib/models/SortieVariant.d.mts +1 -17
  77. package/dist/lib/models/SortieVariant.mjs +49 -3
  78. package/dist/lib/models/SteelPathOffering.d.mts +1 -1
  79. package/dist/lib/models/SteelPathOffering.mjs +81 -3
  80. package/dist/lib/models/SyndicateJob.d.mts +1 -17
  81. package/dist/lib/models/SyndicateJob.mjs +161 -7
  82. package/dist/lib/models/SyndicateMission.d.mts +1 -17
  83. package/dist/lib/models/SyndicateMission.mjs +64 -8
  84. package/dist/lib/models/Tmp.d.mts +1 -17
  85. package/dist/lib/models/Tmp.mjs +28 -4
  86. package/dist/lib/models/VallisCycle.d.mts +1 -2
  87. package/dist/lib/models/VallisCycle.mjs +72 -4
  88. package/dist/lib/models/VoidTrader.d.mts +1 -17
  89. package/dist/lib/models/VoidTrader.mjs +76 -6
  90. package/dist/lib/models/VoidTraderItem.d.mts +1 -17
  91. package/dist/lib/models/VoidTraderItem.mjs +36 -3
  92. package/dist/lib/models/VoidTraderSchedule.d.mts +1 -17
  93. package/dist/lib/models/VoidTraderSchedule.mjs +12 -3
  94. package/dist/lib/models/WeeklyChallenge.d.mts +1 -17
  95. package/dist/lib/models/WeeklyChallenge.mjs +19 -5
  96. package/dist/lib/models/WorldEvent.d.mts +1 -17
  97. package/dist/lib/models/WorldEvent.mjs +211 -9
  98. package/dist/lib/models/WorldStateObject.d.mts +1 -1
  99. package/dist/lib/models/WorldStateObject.mjs +52 -3
  100. package/dist/lib/models/ZarimanCycle.d.mts +1 -2
  101. package/dist/lib/models/ZarimanCycle.mjs +77 -4
  102. package/dist/lib/models/index.d.mts +17 -18
  103. package/dist/lib/models/index.mjs +43 -47
  104. package/dist/lib/supporting/Dependency.d.mts +1 -1
  105. package/dist/lib/supporting/Dependency.mjs +1 -1
  106. package/dist/lib/supporting/DuviriChoice.d.mts +1 -17
  107. package/dist/lib/supporting/DuviriChoice.mjs +24 -3
  108. package/dist/lib/supporting/ExternalMission.d.mts +1 -1
  109. package/dist/lib/supporting/ExternalMission.mjs +1 -1
  110. package/dist/lib/supporting/FetchProxy.d.mts +1 -1
  111. package/dist/lib/supporting/FetchProxy.mjs +45 -3
  112. package/dist/lib/supporting/ImgCdn.d.mts +1 -1
  113. package/dist/lib/supporting/ImgCdn.mjs +6 -3
  114. package/dist/lib/supporting/KuvaLogEntry.d.mts +1 -1
  115. package/dist/lib/supporting/KuvaLogEntry.mjs +1 -1
  116. package/dist/lib/supporting/RewardData.d.mts +1 -1
  117. package/dist/lib/supporting/RewardData.mjs +75 -3
  118. package/dist/lib/supporting/RewardTypes.d.mts +1 -1
  119. package/dist/lib/supporting/RewardTypes.mjs +326 -3
  120. package/dist/lib/supporting/index.d.mts +8 -23
  121. package/dist/lib/supporting/index.mjs +6 -8
  122. package/dist/main.d.mts +24 -24
  123. package/dist/main.mjs +48 -51
  124. package/package.json +1 -1
  125. package/dist/Alert-CPT2sBmd.mjs +0 -51
  126. package/dist/Archimedea-Vo36QE99.mjs +0 -90
  127. package/dist/Calendar-_gEQ9BEd.mjs +0 -81
  128. package/dist/CambionCycle-B1pqIgks.mjs +0 -30
  129. package/dist/CetusCycle-Ct51M2pd.mjs +0 -89
  130. package/dist/ChallengeInstance-BOu_e7ML.mjs +0 -48
  131. package/dist/ConclaveChallenge-BTN6UyV6.mjs +0 -79
  132. package/dist/ConstructionProgress-BoF2P9fx.mjs +0 -25
  133. package/dist/DailyDeal-aoNeCFWT.mjs +0 -66
  134. package/dist/DarkSector-D0uJWCg7.mjs +0 -138
  135. package/dist/DarkSectorBattle-CqRYeNpe.mjs +0 -51
  136. package/dist/Dependency-BR-dAeHI.mjs +0 -1
  137. package/dist/DuviriChoice-BEBiWA-g.mjs +0 -25
  138. package/dist/DuviriCycle-Do7mMnoC.mjs +0 -57
  139. package/dist/EarthCycle-BOAlcAuQ.mjs +0 -75
  140. package/dist/ExternalMission-D3MSZgnN.mjs +0 -1
  141. package/dist/FetchProxy-Bkdk15SX.mjs +0 -46
  142. package/dist/Fissure-diM4hyi3.mjs +0 -85
  143. package/dist/FlashSale-CNfRaZhM.mjs +0 -75
  144. package/dist/GlobalUpgrade-CUtZw05z.mjs +0 -58
  145. package/dist/ImgCdn-BJOdWAbU.mjs +0 -7
  146. package/dist/Invasion-Corx1lxf.mjs +0 -108
  147. package/dist/Kinepage-CbSzge67.mjs +0 -24
  148. package/dist/Kuva-Ijy2ZGBL.mjs +0 -87
  149. package/dist/KuvaLogEntry-D_VzIT3W.mjs +0 -1
  150. package/dist/MidrathCycle-XD2T8Dx5.mjs +0 -68
  151. package/dist/Mission-b8KP-YDf.mjs +0 -140
  152. package/dist/News-zAK-sYRg.mjs +0 -118
  153. package/dist/Nightwave-cTRmlbwH.mjs +0 -60
  154. package/dist/NightwaveChallenge-C8ARG7LC.mjs +0 -53
  155. package/dist/PersistentEnemy-3Sw5E8AN.mjs +0 -76
  156. package/dist/Reward-3FBJF_hS.mjs +0 -73
  157. package/dist/RewardData-C_9b8Yhi.mjs +0 -76
  158. package/dist/RewardTypes-DUrR7H3G.mjs +0 -328
  159. package/dist/SentientOutpost-Cadk-pIW.mjs +0 -65
  160. package/dist/Simaris-D6etEQp_.mjs +0 -35
  161. package/dist/Sortie-rSBgJc6U.mjs +0 -73
  162. package/dist/SortieVariant-CnuLkkNZ.mjs +0 -51
  163. package/dist/SteelPathOffering--wm-7hwb.mjs +0 -83
  164. package/dist/SyndicateJob-R89tWqvT.mjs +0 -162
  165. package/dist/SyndicateMission-CKZDWNyf.mjs +0 -66
  166. package/dist/Tmp-BYL_mYIG.mjs +0 -30
  167. package/dist/VallisCycle-BW2g49wB.mjs +0 -74
  168. package/dist/VoidTrader-DtjtVUgR.mjs +0 -78
  169. package/dist/VoidTraderItem-Cz6x1KTF.mjs +0 -38
  170. package/dist/VoidTraderSchedule-BsJLu50V.mjs +0 -14
  171. package/dist/WeeklyChallenge-Dl2ekl6X.mjs +0 -21
  172. package/dist/WorldEvent-C-LaV2ug.mjs +0 -213
  173. package/dist/WorldStateObject-45dbRgp7.mjs +0 -54
  174. package/dist/ZarimanCycle-DoAPwgaM.mjs +0 -79
  175. package/dist/supporting-BLSXhlWM.mjs +0 -1
  176. /package/dist/{ExternalMission-C82w4uMq.d.mts → ExternalMission-CT__oi7Q.d.mts} +0 -0
  177. /package/dist/{FetchProxy-DfSTUgkf.d.mts → FetchProxy-DHSI4JPP.d.mts} +0 -0
  178. /package/dist/{ImgCdn-D0hSGSB1.d.mts → ImgCdn-DIhZrwap.d.mts} +0 -0
  179. /package/dist/{Kinepage-B-Ym_VW5.d.mts → Kinepage-CKBuvbv5.d.mts} +0 -0
  180. /package/dist/{KuvaLogEntry-cftxhjfU.d.mts → KuvaLogEntry-f4ZBn2Xf.d.mts} +0 -0
  181. /package/dist/{RewardData-DWCgJ3UT.d.mts → RewardData-BdtdUFnh.d.mts} +0 -0
  182. /package/dist/{RewardTypes-Y3tHrtIJ.d.mts → RewardTypes-BnGaD7VF.d.mts} +0 -0
  183. /package/dist/{SteelPathOffering-CQkoKi5T.d.mts → SteelPathOffering-DYjZ29sT.d.mts} +0 -0
  184. /package/dist/{WorldStateObject-C1HEDkH7.d.mts → WorldStateObject-C2KjQZjd.d.mts} +0 -0
@@ -1,7 +1,161 @@
1
- import "../../RewardTypes-DUrR7H3G.mjs";
2
- import "../../WorldStateObject-45dbRgp7.mjs";
3
- import "../../FetchProxy-Bkdk15SX.mjs";
4
- import "../../supporting-BLSXhlWM.mjs";
5
- import { t as SyndicateJob } from "../../SyndicateJob-R89tWqvT.mjs";
6
-
7
- export { SyndicateJob };
1
+ import { WorldStateObject } from "./WorldStateObject.mjs";
2
+ import { fetchProxy } from "../supporting/FetchProxy.mjs";
3
+ import "../supporting/index.mjs";
4
+ import { languageString } from "warframe-worldstate-data/utilities";
5
+ //#region lib/models/SyndicateJob.ts
6
+ const apiBase = process.env.API_BASE_URL || "https://api.warframestat.us";
7
+ const bountyRewardRegex = /(?:Tier([ABCDE])|Narmer)Table([ABC])Rewards/i;
8
+ const ghoulRewardRegex = /GhoulBountyTable([AB])Rewards/i;
9
+ /**
10
+ * Determine the level string for the bounty
11
+ */
12
+ const getLevelString = (job) => `${job.minEnemyLevel} - ${job.maxEnemyLevel}`;
13
+ const determineLocation = (i18n, raw, isVault) => {
14
+ const last = String(i18n).split("/").slice(-1)[0];
15
+ const bountyMatches = last.match(bountyRewardRegex);
16
+ const ghoulMatches = last.match(ghoulRewardRegex);
17
+ const isBounty = bountyMatches?.length;
18
+ const isGhoul = ghoulMatches?.length;
19
+ const isCetus = /eidolonjob/i.test(i18n);
20
+ const isVallis = /venusjob/i.test(i18n);
21
+ const isDeimos = /deimosmissionrewards/i.test(i18n);
22
+ const rotation = isBounty ? bountyMatches[2] : "";
23
+ const levelString = getLevelString(raw);
24
+ let location;
25
+ let levelClause;
26
+ if (isCetus) {
27
+ location = "Earth/Cetus ";
28
+ if (isGhoul) levelClause = `(Level ${levelString} Ghoul Bounty)`;
29
+ else levelClause = `(Level ${levelString} Cetus Bounty)`;
30
+ }
31
+ if (isVallis) {
32
+ location = "Venus/Orb Vallis ";
33
+ levelClause = `(Level ${levelString} Orb Vallis Bounty)`;
34
+ }
35
+ if (isDeimos) {
36
+ location = "Deimos/Cambion Drift ";
37
+ levelClause = `(Level ${levelString} ${isVault ? "Isolation Vault" : "Cambion Drift Bounty"})`;
38
+ }
39
+ const locationWRot = `${location}${levelClause}, Rot ${rotation.length ? rotation : "A"}`;
40
+ return {
41
+ location,
42
+ locationWRot
43
+ };
44
+ };
45
+ const getBountyRewards = async (i18n, raw, isVault) => {
46
+ let location;
47
+ let locationWRot;
48
+ if (i18n.endsWith("PlagueStarTableRewards")) {
49
+ location = "plague star";
50
+ locationWRot = "Earth/Cetus (Level 15 - 25 Plague Star), Rot A";
51
+ }
52
+ if (!location || !locationWRot) ({location, locationWRot} = determineLocation(i18n, raw, isVault));
53
+ const pool = (await fetchProxy(`${apiBase}/drops/search/${encodeURIComponent(location)}?grouped_by=location`).then((res) => res.json()).catch(() => {}))?.[locationWRot];
54
+ if (!pool) return ["Pattern Mismatch. Results inaccurate."];
55
+ const results = pool.rewards;
56
+ if (results) return Array.from(new Set(results));
57
+ return [];
58
+ };
59
+ const FIFTY_MINUTES = 3e6;
60
+ /**
61
+ * Represents a syndicate daily mission
62
+ * @augments {WorldStateObject}
63
+ */
64
+ var SyndicateJob = class SyndicateJob extends WorldStateObject {
65
+ /**
66
+ * Reward pool unique name
67
+ */
68
+ uniqueName;
69
+ /**
70
+ * Array of strings describing rewards
71
+ */
72
+ rewardPool;
73
+ /**
74
+ * A structured version of the reward pool
75
+ */
76
+ rewardPoolDrops;
77
+ /**
78
+ * The type of job this is
79
+ */
80
+ type;
81
+ /**
82
+ * Array of enemy levels
83
+ */
84
+ enemyLevels;
85
+ /**
86
+ * Array of standing gains per stage of job
87
+ */
88
+ standingStages;
89
+ /**
90
+ * Minimum mastery required to participate
91
+ */
92
+ minMR;
93
+ /**
94
+ * Whether or not this is a Vault job.
95
+ * No indication for difference of normal vs arcana vaults.
96
+ */
97
+ isVault;
98
+ /**
99
+ * Corresponding chamber. Nullable
100
+ */
101
+ locationTag;
102
+ /**
103
+ * What time phase this bounty is bound to
104
+ */
105
+ timeBound;
106
+ /**
107
+ * Generate a job with async data (reward pool)
108
+ * @param data The syndicate mission data
109
+ * @param expiry The syndicate job expiration
110
+ * @param deps The dependencies object
111
+ * @returns The created SyndicateJob object with rewardPool
112
+ */
113
+ static async build(data, expiry, deps) {
114
+ const job = new SyndicateJob(data, expiry, deps);
115
+ const rewards = await getBountyRewards(data.rewards, data, data.isVault);
116
+ if (typeof rewards[0] === "string") job.rewardPool = rewards;
117
+ else {
118
+ job.rewardPoolDrops = rewards.map((reward) => {
119
+ const countReg = /([0-9]{1,10})X/;
120
+ const count = reward.item.match(countReg)?.[1];
121
+ return {
122
+ ...reward,
123
+ item: reward.item.replace(countReg, "").trim(),
124
+ count: count ? parseInt(count, 10) : 1
125
+ };
126
+ });
127
+ job.rewardPool = rewards.map((reward) => reward.item);
128
+ }
129
+ return job;
130
+ }
131
+ /**
132
+ * Construct a job without async data (reward pool)
133
+ * @param data The syndicate mission data
134
+ * @param expiry The syndicate job expiration
135
+ * @param deps The dependencies object
136
+ * @param deps.locale Locale to use for translations
137
+ *
138
+ * This DOES NOT populate the reward pool
139
+ */
140
+ constructor(data, expiry, { locale } = { locale: "en" }) {
141
+ super({ _id: { $oid: data.JobCurrentVersion ? data.JobCurrentVersion.$oid : `${(data.jobType || "").split("/").slice(-1)[0]}${expiry.getTime()}` } });
142
+ this.uniqueName = data.rewards;
143
+ this.rewardPool = [];
144
+ this.rewardPoolDrops = [];
145
+ const chamber = (data.locationTag || "").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").trim();
146
+ this.type = data.isVault ? `Isolation Vault ${chamber}` : data.jobType ? languageString(data.jobType, locale) : void 0;
147
+ this.enemyLevels = [data.minEnemyLevel, data.maxEnemyLevel];
148
+ this.standingStages = data.xpAmounts;
149
+ this.minMR = data.masteryReq || 0;
150
+ this.isVault = data.isVault;
151
+ this.locationTag = data.locationTag;
152
+ this.expiry = expiry;
153
+ const jobType = data.jobType ?? "";
154
+ if (jobType.toLowerCase().includes("narmer")) if (jobType.toLowerCase().includes("eidolon")) {
155
+ this.timeBound = "day";
156
+ this.expiry = new Date(this.expiry.getTime() - FIFTY_MINUTES);
157
+ } else this.timeBound = "night";
158
+ }
159
+ };
160
+ //#endregion
161
+ export { SyndicateJob };
@@ -1,18 +1,2 @@
1
- import "../../Dependency-CNqXngHD.mjs";
2
- import { g as SyndicateMission, h as RawSyndicateMission } from "../../index-Bgx8kIDy.mjs";
3
- import "../../WorldStateObject-C1HEDkH7.mjs";
4
- import "../../Calendar-CRM0XhAy.mjs";
5
- import "../../CetusCycle-DQ4n05vO.mjs";
6
- import "../../CambionCycle-OI3v1knd.mjs";
7
- import "../../ConstructionProgress-DG2KzS0X.mjs";
8
- import "../../DarkSectorBattle-CiSe3kFm.mjs";
9
- import "../../EarthCycle-CxtijnVV.mjs";
10
- import "../../MidrathCycle-E0gMF3AR.mjs";
11
- import "../../News-DxEm-q6V.mjs";
12
- import "../../NightwaveChallenge-CG3uychc.mjs";
13
- import "../../Nightwave-CPqMSqGK.mjs";
14
- import "../../PersistentEnemy-DnnnreSz.mjs";
15
- import "../../SteelPathOffering-CQkoKi5T.mjs";
16
- import "../../VallisCycle-6DCaWFoR.mjs";
17
- import "../../ZarimanCycle-BrSLIWhD.mjs";
1
+ import { g as SyndicateMission, h as RawSyndicateMission } from "../../index-C4EJ_Mpd.mjs";
18
2
  export { RawSyndicateMission, SyndicateMission };
@@ -1,8 +1,64 @@
1
- import "../../RewardTypes-DUrR7H3G.mjs";
2
- import "../../WorldStateObject-45dbRgp7.mjs";
3
- import "../../FetchProxy-Bkdk15SX.mjs";
4
- import "../../supporting-BLSXhlWM.mjs";
5
- import "../../SyndicateJob-R89tWqvT.mjs";
6
- import { t as SyndicateMission } from "../../SyndicateMission-CKZDWNyf.mjs";
7
-
8
- export { SyndicateMission };
1
+ import { WorldStateObject } from "./WorldStateObject.mjs";
2
+ import { SyndicateJob } from "./SyndicateJob.mjs";
3
+ import { fromNow, node, syndicate, timeDeltaToString } from "warframe-worldstate-data/utilities";
4
+ //#region lib/models/SyndicateMission.ts
5
+ /**
6
+ * Represents a syndicate daily mission
7
+ * @augments {WorldStateObject}
8
+ */
9
+ var SyndicateMission = class SyndicateMission extends WorldStateObject {
10
+ /**
11
+ * The syndicate that is offering the mission
12
+ * @type {string}
13
+ */
14
+ syndicate;
15
+ /**
16
+ * The syndicate that is offering the mission
17
+ * @type {string}
18
+ */
19
+ syndicateKey;
20
+ /**
21
+ * The nodes on which the missions are taking place
22
+ * @type {Array.<string>}
23
+ */
24
+ nodes;
25
+ /**
26
+ * The jobs for this syndicate. Will normally be []
27
+ * @type {Array.<SyndicateJob>}
28
+ */
29
+ jobs;
30
+ /**
31
+ * Build a new SyndicateMission with async operations & data
32
+ * @param data The syndicate mission data
33
+ * @param deps The dependencies object
34
+ * @param deps.locale Locale to use for translations
35
+ * @returns SyndicateMission object w/ async resolution of jobs
36
+ */
37
+ static async build(data, deps = { locale: "en" }) {
38
+ const syndicateMission = new SyndicateMission(data, deps);
39
+ if (data.Jobs?.length) syndicateMission.jobs = await Promise.all(data.Jobs.map((job) => SyndicateJob.build(job, syndicateMission.expiry, deps)));
40
+ else syndicateMission.jobs = [];
41
+ return syndicateMission;
42
+ }
43
+ /**
44
+ * @param data The syndicate mission data
45
+ * @param deps The dependencies object
46
+ * @param deps.locale Locale to use for translations
47
+ */
48
+ constructor(data, { locale = "en" } = { locale: "en" }) {
49
+ super(data);
50
+ this.syndicate = syndicate(data.Tag, locale);
51
+ this.syndicateKey = syndicate(data.Tag, "en");
52
+ this.nodes = data.Nodes.map((n) => node(n, locale));
53
+ this.jobs = [];
54
+ this.id = `${this.expiry.getTime()}${data.Tag}`;
55
+ }
56
+ /**
57
+ * Time delta string from now to the expiry
58
+ */
59
+ get eta() {
60
+ return timeDeltaToString(fromNow(this.expiry));
61
+ }
62
+ };
63
+ //#endregion
64
+ export { SyndicateMission };
@@ -1,18 +1,2 @@
1
- import "../../Dependency-CNqXngHD.mjs";
2
- import { m as Tmp, p as InitialTmp } from "../../index-Bgx8kIDy.mjs";
3
- import "../../WorldStateObject-C1HEDkH7.mjs";
4
- import "../../Calendar-CRM0XhAy.mjs";
5
- import "../../CetusCycle-DQ4n05vO.mjs";
6
- import "../../CambionCycle-OI3v1knd.mjs";
7
- import "../../ConstructionProgress-DG2KzS0X.mjs";
8
- import "../../DarkSectorBattle-CiSe3kFm.mjs";
9
- import "../../EarthCycle-CxtijnVV.mjs";
10
- import "../../MidrathCycle-E0gMF3AR.mjs";
11
- import "../../News-DxEm-q6V.mjs";
12
- import "../../NightwaveChallenge-CG3uychc.mjs";
13
- import "../../Nightwave-CPqMSqGK.mjs";
14
- import "../../PersistentEnemy-DnnnreSz.mjs";
15
- import "../../SteelPathOffering-CQkoKi5T.mjs";
16
- import "../../VallisCycle-6DCaWFoR.mjs";
17
- import "../../ZarimanCycle-BrSLIWhD.mjs";
1
+ import { m as Tmp, p as InitialTmp } from "../../index-C4EJ_Mpd.mjs";
18
2
  export { InitialTmp, Tmp };
@@ -1,4 +1,28 @@
1
- import "../../SentientOutpost-Cadk-pIW.mjs";
2
- import { t as Tmp } from "../../Tmp-BYL_mYIG.mjs";
3
-
4
- export { Tmp };
1
+ import { Kinepage } from "./Kinepage.mjs";
2
+ import { SentientOutpost } from "./SentientOutpost.mjs";
3
+ //#region lib/models/Tmp.ts
4
+ var Tmp = class {
5
+ sentientOutposts;
6
+ kinepage;
7
+ faceoffBonus;
8
+ questToConquerCancer;
9
+ constructor(json, deps = { locale: "en" }) {
10
+ const tmp = JSON.parse(json);
11
+ this.sentientOutposts = new SentientOutpost(tmp.sfn, deps);
12
+ this.kinepage = new Kinepage(tmp.pgr, deps.locale);
13
+ if (tmp.fbst) {
14
+ const toDate = (ms) => /* @__PURE__ */ new Date(ms * 1e3);
15
+ this.faceoffBonus = {
16
+ activation: toDate(tmp.fbst.a),
17
+ expiry: toDate(tmp.fbst.e),
18
+ next: toDate(tmp.fbst.n)
19
+ };
20
+ }
21
+ if (tmp.QTCCFloofCount) this.questToConquerCancer = {
22
+ count: tmp.QTCCFloofCount,
23
+ goal: tmp.QTCCFloofLimit
24
+ };
25
+ }
26
+ };
27
+ //#endregion
28
+ export { Tmp };
@@ -1,3 +1,2 @@
1
- import "../../WorldStateObject-C1HEDkH7.mjs";
2
- import { t as VallisCycle } from "../../VallisCycle-6DCaWFoR.mjs";
1
+ import { t as VallisCycle } from "../../VallisCycle-as7DM4a-.mjs";
3
2
  export { VallisCycle };
@@ -1,4 +1,72 @@
1
- import "../../WorldStateObject-45dbRgp7.mjs";
2
- import { t as VallisCycle } from "../../VallisCycle-BW2g49wB.mjs";
3
-
4
- export { VallisCycle };
1
+ import { WorldStateObject } from "./WorldStateObject.mjs";
2
+ import { fromNow, timeDeltaToString } from "warframe-worldstate-data/utilities";
3
+ //#region lib/models/VallisCycle.ts
4
+ const lStart = /* @__PURE__ */ new Date("2026-02-04T19:46:48Z");
5
+ const loopTime = 16e5;
6
+ const coldTime = loopTime - 4e5;
7
+ /**
8
+ * Get the current cycle state for Orb Vallis
9
+ * @returns current cycle state
10
+ */
11
+ function getCurrentCycle() {
12
+ const toNextFull = loopTime - (Date.now() - lStart.getTime()) % loopTime;
13
+ let state = "cold";
14
+ if (toNextFull > coldTime) state = "warm";
15
+ let toNextMinor;
16
+ if (toNextFull < coldTime) toNextMinor = toNextFull;
17
+ else toNextMinor = toNextFull - coldTime;
18
+ const milliAtNext = Date.now() + toNextMinor;
19
+ const milliAtPrev = Date.now() + toNextFull - (state === "warm" ? loopTime : coldTime);
20
+ const timeAtPrevious = new Date(milliAtPrev);
21
+ timeAtPrevious.setSeconds(0);
22
+ return {
23
+ state,
24
+ toNextMinor,
25
+ toNextFull,
26
+ timeAtNext: new Date(milliAtNext),
27
+ timeAtPrevious
28
+ };
29
+ }
30
+ /**
31
+ * Represents the current Earth Day/Night Cycle
32
+ * @augments {WorldStateObject}
33
+ */
34
+ var VallisCycle = class extends WorldStateObject {
35
+ /**
36
+ * Whether or not this it's daytime
37
+ */
38
+ isWarm;
39
+ /**
40
+ * Current cycle state. One of `warm`, `cold`
41
+ */
42
+ state;
43
+ /**
44
+ * The current cetus cycle, for calculating the other fields
45
+ */
46
+ #ec = getCurrentCycle();
47
+ constructor() {
48
+ super({ _id: { $oid: "vallisCycle0" } });
49
+ this.id = `vallisCycle${this.#ec.timeAtPrevious.getTime()}`;
50
+ this.activation = this.#ec.timeAtPrevious;
51
+ this.expiry = this.#ec.timeAtNext;
52
+ this.isWarm = this.#ec.state === "warm";
53
+ this.state = this.#ec.state;
54
+ }
55
+ /**
56
+ * Whether this event has expired
57
+ */
58
+ get expired() {
59
+ return fromNow(this.expiry) < 0;
60
+ }
61
+ /**
62
+ * Time remaining string
63
+ */
64
+ get timeLeft() {
65
+ return timeDeltaToString(this.#ec.toNextMinor);
66
+ }
67
+ get shortString() {
68
+ return `${this.timeLeft.replace(/\s\d*s/gi, "")} to ${this.isWarm ? "Cold" : "Warm"}`;
69
+ }
70
+ };
71
+ //#endregion
72
+ export { VallisCycle };
@@ -1,18 +1,2 @@
1
- import "../../Dependency-CNqXngHD.mjs";
2
- import { c as RawVoidTrader, l as VoidTrader } from "../../index-Bgx8kIDy.mjs";
3
- import "../../WorldStateObject-C1HEDkH7.mjs";
4
- import "../../Calendar-CRM0XhAy.mjs";
5
- import "../../CetusCycle-DQ4n05vO.mjs";
6
- import "../../CambionCycle-OI3v1knd.mjs";
7
- import "../../ConstructionProgress-DG2KzS0X.mjs";
8
- import "../../DarkSectorBattle-CiSe3kFm.mjs";
9
- import "../../EarthCycle-CxtijnVV.mjs";
10
- import "../../MidrathCycle-E0gMF3AR.mjs";
11
- import "../../News-DxEm-q6V.mjs";
12
- import "../../NightwaveChallenge-CG3uychc.mjs";
13
- import "../../Nightwave-CPqMSqGK.mjs";
14
- import "../../PersistentEnemy-DnnnreSz.mjs";
15
- import "../../SteelPathOffering-CQkoKi5T.mjs";
16
- import "../../VallisCycle-6DCaWFoR.mjs";
17
- import "../../ZarimanCycle-BrSLIWhD.mjs";
1
+ import { c as RawVoidTrader, l as VoidTrader } from "../../index-C4EJ_Mpd.mjs";
18
2
  export { RawVoidTrader, VoidTrader };
@@ -1,6 +1,76 @@
1
- import "../../WorldStateObject-45dbRgp7.mjs";
2
- import "../../VoidTraderItem-Cz6x1KTF.mjs";
3
- import "../../VoidTraderSchedule-BsJLu50V.mjs";
4
- import { t as VoidTrader } from "../../VoidTrader-DtjtVUgR.mjs";
5
-
6
- export { VoidTrader };
1
+ import { WorldStateObject } from "./WorldStateObject.mjs";
2
+ import { VoidTraderItem } from "./VoidTraderItem.mjs";
3
+ import { VoidTraderSchedule } from "./VoidTraderSchedule.mjs";
4
+ import { fromNow, insist, node, parseDate, timeDeltaToString } from "warframe-worldstate-data/utilities";
5
+ //#region lib/models/VoidTrader.ts
6
+ /**
7
+ * Represents a void trader
8
+ * @augments {WorldStateObject}
9
+ */
10
+ var VoidTrader = class extends WorldStateObject {
11
+ /**
12
+ * The void trader's name
13
+ */
14
+ character;
15
+ /**
16
+ * The node at which the Void Trader appears
17
+ */
18
+ location;
19
+ /**
20
+ * The trader's inventory
21
+ */
22
+ inventory;
23
+ /**
24
+ * Pseudo Identifier for identifying changes in inventory
25
+ */
26
+ psId;
27
+ /**
28
+ * The initial start date
29
+ */
30
+ initialStart;
31
+ /**
32
+ * Whether it's completed or not
33
+ */
34
+ completed;
35
+ /**
36
+ * Possible schedule
37
+ */
38
+ schedule;
39
+ /**
40
+ * @param data The trader data
41
+ * @param deps The dependencies object
42
+ * @param deps.locale Locale to use for translations
43
+ * @param deps.character The trader name
44
+ */
45
+ constructor(data, { locale = "en", character } = { locale: "en" }) {
46
+ super(data);
47
+ insist({ ...data }, "Activation", "Expiry");
48
+ this.character = data.Character ? data.Character.replace("Baro'Ki Teel", "Baro Ki'Teer") : character ?? "";
49
+ this.location = node(data.Node, locale);
50
+ this.inventory = data.Manifest ? data.Manifest.map((i) => new VoidTraderItem(i, { locale })) : [];
51
+ this.psId = `${this.id}${this.inventory.length}`;
52
+ this.initialStart = parseDate(data.InitialStartDate);
53
+ this.completed = data.Completed;
54
+ this.schedule = data.ScheduleInfo ? data.ScheduleInfo.map((i) => new VoidTraderSchedule(i, { locale })) : [];
55
+ }
56
+ /**
57
+ * Whether the trader is active
58
+ */
59
+ get active() {
60
+ return fromNow(this.activation) < 0 && fromNow(this.expiry) > 0;
61
+ }
62
+ /**
63
+ * Time delta string from now to the start
64
+ */
65
+ get startString() {
66
+ return timeDeltaToString(fromNow(this.activation));
67
+ }
68
+ /**
69
+ * Time delta string from now to the end
70
+ */
71
+ get endString() {
72
+ return timeDeltaToString(fromNow(this.expiry));
73
+ }
74
+ };
75
+ //#endregion
76
+ export { VoidTrader };
@@ -1,18 +1,2 @@
1
- import "../../Dependency-CNqXngHD.mjs";
2
- import { d as RawVoidTraderItem, f as VoidTraderItem } from "../../index-Bgx8kIDy.mjs";
3
- import "../../WorldStateObject-C1HEDkH7.mjs";
4
- import "../../Calendar-CRM0XhAy.mjs";
5
- import "../../CetusCycle-DQ4n05vO.mjs";
6
- import "../../CambionCycle-OI3v1knd.mjs";
7
- import "../../ConstructionProgress-DG2KzS0X.mjs";
8
- import "../../DarkSectorBattle-CiSe3kFm.mjs";
9
- import "../../EarthCycle-CxtijnVV.mjs";
10
- import "../../MidrathCycle-E0gMF3AR.mjs";
11
- import "../../News-DxEm-q6V.mjs";
12
- import "../../NightwaveChallenge-CG3uychc.mjs";
13
- import "../../Nightwave-CPqMSqGK.mjs";
14
- import "../../PersistentEnemy-DnnnreSz.mjs";
15
- import "../../SteelPathOffering-CQkoKi5T.mjs";
16
- import "../../VallisCycle-6DCaWFoR.mjs";
17
- import "../../ZarimanCycle-BrSLIWhD.mjs";
1
+ import { d as RawVoidTraderItem, f as VoidTraderItem } from "../../index-C4EJ_Mpd.mjs";
18
2
  export { RawVoidTraderItem, VoidTraderItem };
@@ -1,3 +1,36 @@
1
- import { t as VoidTraderItem } from "../../VoidTraderItem-Cz6x1KTF.mjs";
2
-
3
- export { VoidTraderItem };
1
+ import { languageString } from "warframe-worldstate-data/utilities";
2
+ //#region lib/models/VoidTraderItem.ts
3
+ /**
4
+ * A void trader inventory item
5
+ */
6
+ var VoidTraderItem = class {
7
+ uniqueName;
8
+ /**
9
+ * The name of the inventory item
10
+ */
11
+ item;
12
+ /**
13
+ * Ducat cost of the item
14
+ */
15
+ ducats;
16
+ /**
17
+ * Credit cost of the item
18
+ */
19
+ credits;
20
+ /**
21
+ * @param data The void trader item data
22
+ * @param data.ItemType Worldstate Item i18n path
23
+ * @param data.PrimePrice Ducat cost of the item
24
+ * @param data.RegularPrice Credit price of the item
25
+ * @param deps The dependencies object
26
+ * @param deps.locale Locale to use for translations
27
+ */
28
+ constructor({ ItemType, PrimePrice, RegularPrice }, { locale = "en" } = { locale: "en" }) {
29
+ this.uniqueName = ItemType;
30
+ this.item = languageString(ItemType, locale);
31
+ this.ducats = Number.parseInt(String(PrimePrice), 10);
32
+ this.credits = Number.parseInt(String(RegularPrice), 10);
33
+ }
34
+ };
35
+ //#endregion
36
+ export { VoidTraderItem };
@@ -1,18 +1,2 @@
1
- import "../../Dependency-CNqXngHD.mjs";
2
- import { u as VoidTraderSchedule } from "../../index-Bgx8kIDy.mjs";
3
- import "../../WorldStateObject-C1HEDkH7.mjs";
4
- import "../../Calendar-CRM0XhAy.mjs";
5
- import "../../CetusCycle-DQ4n05vO.mjs";
6
- import "../../CambionCycle-OI3v1knd.mjs";
7
- import "../../ConstructionProgress-DG2KzS0X.mjs";
8
- import "../../DarkSectorBattle-CiSe3kFm.mjs";
9
- import "../../EarthCycle-CxtijnVV.mjs";
10
- import "../../MidrathCycle-E0gMF3AR.mjs";
11
- import "../../News-DxEm-q6V.mjs";
12
- import "../../NightwaveChallenge-CG3uychc.mjs";
13
- import "../../Nightwave-CPqMSqGK.mjs";
14
- import "../../PersistentEnemy-DnnnreSz.mjs";
15
- import "../../SteelPathOffering-CQkoKi5T.mjs";
16
- import "../../VallisCycle-6DCaWFoR.mjs";
17
- import "../../ZarimanCycle-BrSLIWhD.mjs";
1
+ import { u as VoidTraderSchedule } from "../../index-C4EJ_Mpd.mjs";
18
2
  export { VoidTraderSchedule };
@@ -1,3 +1,12 @@
1
- import { t as VoidTraderSchedule } from "../../VoidTraderSchedule-BsJLu50V.mjs";
2
-
3
- export { VoidTraderSchedule };
1
+ import { languageString, parseDate } from "warframe-worldstate-data/utilities";
2
+ //#region lib/models/VoidTraderSchedule.ts
3
+ var VoidTraderSchedule = class {
4
+ expiry;
5
+ item;
6
+ constructor(data, { locale = "en" } = { locale: "en" }) {
7
+ this.expiry = parseDate(data.Expiry);
8
+ this.item = languageString(data.FeaturedItem, locale);
9
+ }
10
+ };
11
+ //#endregion
12
+ export { VoidTraderSchedule };
@@ -1,18 +1,2 @@
1
- import "../../Dependency-CNqXngHD.mjs";
2
- import { o as RawWeeklyChallenge, s as WeeklyChallenge } from "../../index-Bgx8kIDy.mjs";
3
- import "../../WorldStateObject-C1HEDkH7.mjs";
4
- import "../../Calendar-CRM0XhAy.mjs";
5
- import "../../CetusCycle-DQ4n05vO.mjs";
6
- import "../../CambionCycle-OI3v1knd.mjs";
7
- import "../../ConstructionProgress-DG2KzS0X.mjs";
8
- import "../../DarkSectorBattle-CiSe3kFm.mjs";
9
- import "../../EarthCycle-CxtijnVV.mjs";
10
- import "../../MidrathCycle-E0gMF3AR.mjs";
11
- import "../../News-DxEm-q6V.mjs";
12
- import "../../NightwaveChallenge-CG3uychc.mjs";
13
- import "../../Nightwave-CPqMSqGK.mjs";
14
- import "../../PersistentEnemy-DnnnreSz.mjs";
15
- import "../../SteelPathOffering-CQkoKi5T.mjs";
16
- import "../../VallisCycle-6DCaWFoR.mjs";
17
- import "../../ZarimanCycle-BrSLIWhD.mjs";
1
+ import { o as RawWeeklyChallenge, s as WeeklyChallenge } from "../../index-C4EJ_Mpd.mjs";
18
2
  export { RawWeeklyChallenge, WeeklyChallenge };
@@ -1,5 +1,19 @@
1
- import "../../WorldStateObject-45dbRgp7.mjs";
2
- import "../../ChallengeInstance-BOu_e7ML.mjs";
3
- import { t as WeeklyChallenge } from "../../WeeklyChallenge-Dl2ekl6X.mjs";
4
-
5
- export { WeeklyChallenge };
1
+ import { WorldStateObject } from "./WorldStateObject.mjs";
2
+ import { ChallengeInstance } from "./ChallengeInstance.mjs";
3
+ //#region lib/models/WeeklyChallenge.ts
4
+ /**
5
+ * Represents a void trader
6
+ * @augments {WorldStateObject}
7
+ */
8
+ var WeeklyChallenge = class extends WorldStateObject {
9
+ challenges;
10
+ /**
11
+ * @param data The Void trader data
12
+ */
13
+ constructor(data) {
14
+ super(data);
15
+ this.challenges = data.Challenges.map((challengeData) => new ChallengeInstance(challengeData));
16
+ }
17
+ };
18
+ //#endregion
19
+ export { WeeklyChallenge };
@@ -1,18 +1,2 @@
1
- import "../../Dependency-CNqXngHD.mjs";
2
- import { a as WorldEvent, i as RawWorldEvent, n as InterimStep, r as ProgressStep, t as InterimRewardMessage } from "../../index-Bgx8kIDy.mjs";
3
- import "../../WorldStateObject-C1HEDkH7.mjs";
4
- import "../../Calendar-CRM0XhAy.mjs";
5
- import "../../CetusCycle-DQ4n05vO.mjs";
6
- import "../../CambionCycle-OI3v1knd.mjs";
7
- import "../../ConstructionProgress-DG2KzS0X.mjs";
8
- import "../../DarkSectorBattle-CiSe3kFm.mjs";
9
- import "../../EarthCycle-CxtijnVV.mjs";
10
- import "../../MidrathCycle-E0gMF3AR.mjs";
11
- import "../../News-DxEm-q6V.mjs";
12
- import "../../NightwaveChallenge-CG3uychc.mjs";
13
- import "../../Nightwave-CPqMSqGK.mjs";
14
- import "../../PersistentEnemy-DnnnreSz.mjs";
15
- import "../../SteelPathOffering-CQkoKi5T.mjs";
16
- import "../../VallisCycle-6DCaWFoR.mjs";
17
- import "../../ZarimanCycle-BrSLIWhD.mjs";
1
+ import { a as WorldEvent, i as RawWorldEvent, n as InterimStep, r as ProgressStep, t as InterimRewardMessage } from "../../index-C4EJ_Mpd.mjs";
18
2
  export { InterimRewardMessage, InterimStep, ProgressStep, RawWorldEvent, WorldEvent };