@overlayed/app 0.3.0 → 0.4.0

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/index.js CHANGED
@@ -1,56 +1,57 @@
1
- var ot = Object.defineProperty;
2
- var it = (r, t, e) => t in r ? ot(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
- var c = (r, t, e) => it(r, typeof t != "symbol" ? t + "" : t, e);
4
- import _, { resolve as lt } from "node:path";
5
- import { createRequire as ue } from "node:module";
6
- import { type as y, scope as ct } from "arktype";
7
- import C, { existsSync as dt, mkdirSync as ut, readFileSync as Se, writeFileSync as ht, copyFileSync as gt } from "node:fs";
8
- import E from "node:fs/promises";
9
- import Me from "jszip";
10
- import { createHash as pt } from "node:crypto";
11
- var ft = Object.defineProperty, yt = (r, t, e) => t in r ? ft(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, T = (r, t, e) => yt(r, typeof t != "symbol" ? t + "" : t, e);
12
- function mt(r) {
13
- return { all: r = r || /* @__PURE__ */ new Map(), on: function(t, e) {
14
- var n = r.get(t);
15
- n ? n.push(e) : r.set(t, [e]);
16
- }, off: function(t, e) {
17
- var n = r.get(t);
18
- n && (e ? n.splice(n.indexOf(e) >>> 0, 1) : r.set(t, []));
19
- }, emit: function(t, e) {
20
- var n = r.get(t);
21
- n && n.slice().map(function(s) {
22
- s(e);
23
- }), (n = r.get("*")) && n.slice().map(function(s) {
24
- s(t, e);
1
+ var Ue = Object.defineProperty;
2
+ var ze = (n, e, t) => e in n ? Ue(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var c = (n, e, t) => ze(n, typeof e != "symbol" ? e + "" : e, t);
4
+ import { type as K } from "arktype";
5
+ import { createRequire as oe } from "node:module";
6
+ import k, { existsSync as qe, mkdirSync as We, readFileSync as _e, writeFileSync as Qe, copyFileSync as Xe } from "node:fs";
7
+ import m, { resolve as Je } from "node:path";
8
+ import v from "node:fs/promises";
9
+ import ke from "jszip";
10
+ import { createHash as Ye } from "node:crypto";
11
+ import Ze, { app as Pe } from "electron";
12
+ var et = Object.defineProperty, tt = (n, e, t) => e in n ? et(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, F = (n, e, t) => tt(n, typeof e != "symbol" ? e + "" : e, t);
13
+ function nt(n) {
14
+ return { all: n = n || /* @__PURE__ */ new Map(), on: function(e, t) {
15
+ var r = n.get(e);
16
+ r ? r.push(t) : n.set(e, [t]);
17
+ }, off: function(e, t) {
18
+ var r = n.get(e);
19
+ r && (t ? r.splice(r.indexOf(t) >>> 0, 1) : n.set(e, []));
20
+ }, emit: function(e, t) {
21
+ var r = n.get(e);
22
+ r && r.slice().map(function(s) {
23
+ s(t);
24
+ }), (r = n.get("*")) && r.slice().map(function(s) {
25
+ s(e, t);
25
26
  });
26
27
  } };
27
28
  }
28
- let _t = class {
29
+ let Ce = class {
29
30
  constructor() {
30
- T(this, "emitter"), this.emitter = mt();
31
+ F(this, "emitter"), this.emitter = nt();
31
32
  }
32
- on(t, e) {
33
- this.emitter.on(t, e);
33
+ on(e, t) {
34
+ this.emitter.on(e, t);
34
35
  }
35
- off(t, e) {
36
- this.emitter.off(t, e);
36
+ off(e, t) {
37
+ this.emitter.off(e, t);
37
38
  }
38
- emit(t, e) {
39
- this.emitter.emit(t, e);
39
+ emit(e, t) {
40
+ this.emitter.emit(e, t);
40
41
  }
41
42
  removeAllListeners() {
42
43
  this.emitter.off("*", () => {
43
44
  });
44
45
  }
45
46
  };
46
- function bt(r, ...t) {
47
- var e;
48
- return e = class extends r {
47
+ function Ke(n, ...e) {
48
+ var t;
49
+ return t = class extends n {
49
50
  /**
50
51
  * Lazy get the static instance
51
52
  */
52
53
  static getInstance() {
53
- return this._instance || (this._instance = new r(...t)), this._instance;
54
+ return this._instance || (this._instance = new n(...e)), this._instance;
54
55
  }
55
56
  /**
56
57
  * Release the instance (most of the time you won't need this)
@@ -58,29 +59,68 @@ function bt(r, ...t) {
58
59
  static clearInstance() {
59
60
  this._instance = void 0;
60
61
  }
61
- }, T(e, "_instance"), e;
62
+ }, F(t, "_instance"), t;
62
63
  }
63
- const vt = _.join(process.env.APPDATA ?? "", "overlayed");
64
- _.join(vt, "logs");
65
- const Et = ue(import.meta.url), { PipeEventServer: wt, PipeEventClient: Cr, PipeEventBase: Pr, ProcessMonitor: Sr, Process: Mr, InjectionMethod: $r, AccessLevel: Ar } = Et("./build/overlayed_native_interface_x64.node");
66
- let kt = class extends _t {
67
- constructor(t) {
68
- super(), T(this, "server", null), T(this, "_hasConnection", !1), T(this, "pipeId"), this.pipeId = t, this.init();
64
+ class rt extends Ce {
65
+ destroy() {
66
+ this.removeAllListeners();
67
+ }
68
+ fatal(e, t, r) {
69
+ this.emit("fatal", {
70
+ code: t,
71
+ message: e,
72
+ data: r,
73
+ timestamp: Date.now()
74
+ });
75
+ }
76
+ error(e, t, r) {
77
+ this.emit("error", {
78
+ code: t,
79
+ message: e,
80
+ data: r,
81
+ timestamp: Date.now()
82
+ });
83
+ }
84
+ warn(e, t, r) {
85
+ this.emit("warning", {
86
+ code: t,
87
+ message: e,
88
+ data: r,
89
+ timestamp: Date.now()
90
+ });
91
+ }
92
+ }
93
+ Ke(rt);
94
+ const st = oe(import.meta.url), {
95
+ PipeEventServer: it,
96
+ PipeEventClient: Fn,
97
+ PipeEventBase: xn,
98
+ ProcessMonitor: Dn,
99
+ Process: $n,
100
+ InjectionMethod: Tn,
101
+ AccessLevel: Bn,
102
+ HardwareInterface: Gn
103
+ } = st("./build/overlayed_native_interface_x64.node");
104
+ let at = class extends Ce {
105
+ constructor(e) {
106
+ super(), F(this, "server", null), F(this, "_hasConnection", !1), F(this, "pipeId"), this.pipeId = e, this.init();
69
107
  }
70
108
  get hasConnection() {
71
109
  return this._hasConnection;
72
110
  }
73
111
  destroy() {
74
- var t;
75
- this.server && (this._hasConnection = !1, (t = this.server) == null || t.removeAllListeners(), this.server = null);
112
+ var e;
113
+ this.server && (this._hasConnection = !1, (e = this.server) == null || e.removeAllListeners(), this.server = null);
76
114
  }
115
+ // TODO make sure that new events and new event keys do not stop the app from working
116
+ // this is because we may have new events/event keys from a DLL but the types/validations might not be up to date
77
117
  init() {
78
- this.server = new wt(this.pipeId, { clientCount: 1, access: 1 }), this.server.on("event", (t) => {
118
+ this.server = new it(this.pipeId, { clientCount: 1, access: 1 }), this.server.on("event", (e) => {
79
119
  try {
80
- const e = JSON.parse(t);
81
- this.emit("data", e);
82
- } catch (e) {
83
- this.emit("error", e);
120
+ const t = JSON.parse(e);
121
+ this.emit("data", [t]);
122
+ } catch (t) {
123
+ this.emit("error", t);
84
124
  }
85
125
  }), this.server.on("connected", () => {
86
126
  this._hasConnection = !0;
@@ -89,54 +129,50 @@ let kt = class extends _t {
89
129
  });
90
130
  }
91
131
  };
92
- const $e = bt(kt, "overlayed"), Ae = y({
93
- game: "string",
94
- type: "string",
95
- creation_time: "number"
96
- });
97
- function It(r) {
98
- return { all: r = r || /* @__PURE__ */ new Map(), on: function(t, e) {
99
- var n = r.get(t);
100
- n ? n.push(e) : r.set(t, [e]);
101
- }, off: function(t, e) {
102
- var n = r.get(t);
103
- n && (e ? n.splice(n.indexOf(e) >>> 0, 1) : r.set(t, []));
104
- }, emit: function(t, e) {
105
- var n = r.get(t);
106
- n && n.slice().map(function(s) {
107
- s(e);
108
- }), (n = r.get("*")) && n.slice().map(function(s) {
109
- s(t, e);
132
+ const le = Ke(at, "stats-cc");
133
+ function ot(n) {
134
+ return { all: n = n || /* @__PURE__ */ new Map(), on: function(e, t) {
135
+ var r = n.get(e);
136
+ r ? r.push(t) : n.set(e, [t]);
137
+ }, off: function(e, t) {
138
+ var r = n.get(e);
139
+ r && (t ? r.splice(r.indexOf(t) >>> 0, 1) : n.set(e, []));
140
+ }, emit: function(e, t) {
141
+ var r = n.get(e);
142
+ r && r.slice().map(function(s) {
143
+ s(t);
144
+ }), (r = n.get("*")) && r.slice().map(function(s) {
145
+ s(e, t);
110
146
  });
111
147
  } };
112
148
  }
113
- class Ct {
149
+ class Se {
114
150
  constructor() {
115
151
  c(this, "emitter");
116
- this.emitter = It();
152
+ this.emitter = ot();
117
153
  }
118
- on(t, e) {
119
- this.emitter.on(t, e);
154
+ on(e, t) {
155
+ this.emitter.on(e, t);
120
156
  }
121
- off(t, e) {
122
- this.emitter.off(t, e);
157
+ off(e, t) {
158
+ this.emitter.off(e, t);
123
159
  }
124
- emit(t, e) {
125
- this.emitter.emit(t, e);
160
+ emit(e, t) {
161
+ this.emitter.emit(e, t);
126
162
  }
127
163
  removeAllListeners() {
128
164
  this.emitter.off("*", () => {
129
165
  });
130
166
  }
131
167
  }
132
- function I(r, ...t) {
133
- var n;
134
- return n = class extends r {
168
+ function _(n, ...e) {
169
+ var r;
170
+ return r = class extends n {
135
171
  /**
136
172
  * Lazy get the static instance
137
173
  */
138
174
  static getInstance() {
139
- return this._instance || (this._instance = new r(...t)), this._instance;
175
+ return this._instance || (this._instance = new n(...e)), this._instance;
140
176
  }
141
177
  /**
142
178
  * Release the instance (most of the time you won't need this)
@@ -144,163 +180,209 @@ function I(r, ...t) {
144
180
  static clearInstance() {
145
181
  this._instance = void 0;
146
182
  }
147
- }, c(n, "_instance"), n;
183
+ }, c(r, "_instance"), r;
148
184
  }
149
- function Pt(r) {
150
- try {
151
- return [JSON.parse(r), null];
152
- } catch (t) {
153
- return [null, t];
185
+ class lt extends Se {
186
+ destroy() {
187
+ this.removeAllListeners();
154
188
  }
155
- }
156
- function ae(r, t) {
157
- const e = {};
158
- for (const n in t)
159
- n in r ? typeof r[n] == "object" && r[n] !== null && typeof t[n] == "object" && t[n] !== null ? e[n] = ae(r[n], t[n]) : e[n] = r[n] : e[n] = t[n];
160
- for (const n in r)
161
- n in e || (e[n] = r[n]);
162
- return e;
163
- }
164
- class St {
165
- constructor(t) {
166
- c(this, "options");
167
- c(this, "_data");
168
- this.options = t, this._data = this.load();
189
+ fatal(e, t, r) {
190
+ this.emit("fatal", {
191
+ code: t,
192
+ message: e,
193
+ data: r,
194
+ timestamp: Date.now()
195
+ });
169
196
  }
170
- get data() {
171
- return this._data;
197
+ error(e, t, r) {
198
+ this.emit("error", {
199
+ code: t,
200
+ message: e,
201
+ data: r,
202
+ timestamp: Date.now()
203
+ });
172
204
  }
173
- set data(t) {
174
- this._data = t, this.saveCurrentData();
205
+ warn(e, t, r) {
206
+ this.emit("warning", {
207
+ code: t,
208
+ message: e,
209
+ data: r,
210
+ timestamp: Date.now()
211
+ });
175
212
  }
176
- onBeforeSave(t) {
177
- return t;
213
+ }
214
+ const E = _(lt);
215
+ class ct {
216
+ constructor(e) {
217
+ c(this, "data");
218
+ c(this, "_schema");
219
+ c(this, "_defaultValue");
220
+ c(this, "_path");
221
+ const { schema: t, default: r, path: s } = e;
222
+ this._schema = t, this._defaultValue = r, this._path = s;
223
+ }
224
+ set(e) {
225
+ const t = this._schema["~standard"].validate(e);
226
+ if (t instanceof Promise)
227
+ throw new Error("StructuredConfigFile does not support async validation");
228
+ if (t.issues) {
229
+ this.reportInvalidConfigFile(t.issues);
230
+ return;
231
+ }
232
+ this.data = this.onBeforeSave(e), this.save(e);
178
233
  }
179
- onAfterLoad(t) {
180
- return t;
234
+ get() {
235
+ return this.data ? this.data : this.load();
236
+ }
237
+ getKey(e) {
238
+ return this.get()[e];
181
239
  }
182
- saveCurrentData() {
240
+ save(e) {
241
+ const t = this.onBeforeSave(e);
183
242
  try {
184
- const t = this.onBeforeSave(this._data);
185
- C.writeFileSync(this.options.path, JSON.stringify(t, null, 2));
243
+ k.writeFileSync(this.getFilePath(), JSON.stringify(t, void 0, 2));
186
244
  } catch {
245
+ return;
187
246
  }
247
+ return this.data = t;
188
248
  }
189
249
  load() {
190
- if (!this.fileExists(this.options.path))
191
- return this.setupDefaultData();
192
- if (!this.canReadWriteFile(this.options.path))
193
- return this.setupDefaultData(!0);
194
- const t = C.readFileSync(this.options.path, "utf8"), [e, n] = Pt(t);
195
- return n ? this.setupDefaultData(!0) : this.onAfterLoad(e);
196
- }
197
- canReadWriteFile(t) {
250
+ if (!this.fileExists(this.getFilePath()) || !this.canReadWriteFile(this.getFilePath())) {
251
+ this.save(this._defaultValue);
252
+ const e = this.onAfterLoad(this._defaultValue);
253
+ return this.data = e, e;
254
+ }
198
255
  try {
199
- return C.accessSync(t, C.constants.R_OK | C.constants.W_OK), !0;
256
+ const e = k.readFileSync(this.getFilePath(), "utf8"), t = this.onAfterLoad(this.parseStoredData(e));
257
+ return this.data = t, t;
200
258
  } catch {
201
- return !1;
259
+ return this.data = this._defaultValue;
202
260
  }
203
261
  }
204
- fileExists(t) {
262
+ onBeforeSave(e) {
263
+ return e;
264
+ }
265
+ onAfterLoad(e) {
266
+ return e;
267
+ }
268
+ getFilePath() {
269
+ return this._path;
270
+ }
271
+ parseStoredData(e) {
205
272
  try {
206
- return C.accessSync(t, C.constants.F_OK), !0;
273
+ const r = K("string.json.parse").to("object")(e);
274
+ if (r instanceof K.errors)
275
+ return this._defaultValue;
276
+ const s = this._schema["~standard"].validate(r);
277
+ if (s instanceof Promise)
278
+ throw new Error("StructuredConfigFile does not support async validation");
279
+ return s.issues ? this.migrate(r, this._defaultValue) : this.migrate(s.value, this._defaultValue);
207
280
  } catch {
208
- return !1;
281
+ return this._defaultValue;
209
282
  }
210
283
  }
211
- setupDefaultData(t = !1) {
212
- return this._data = this.options.default, t || this.saveCurrentData(), this.data;
213
- }
214
- }
215
- class Mt extends St {
216
- constructor(e) {
217
- super(e);
218
- c(this, "options");
219
- this.options = e;
220
- }
221
- get data() {
222
- const e = this.options.schema["~standard"].validate(super.data);
223
- if (e instanceof Promise)
224
- throw new Error("StructuredConfigFile does not support async validation");
225
- return e.issues ? this.options.default : e.value;
284
+ canReadWriteFile(e) {
285
+ try {
286
+ return k.accessSync(e, k.constants.R_OK | k.constants.W_OK), !0;
287
+ } catch {
288
+ return !1;
289
+ }
226
290
  }
227
- set data(e) {
228
- const n = this.options.schema["~standard"].validate(e);
229
- if (n instanceof Promise)
230
- throw new Error("StructuredConfigFile does not support async validation");
231
- n.issues || (super.data = n.value);
291
+ fileExists(e) {
292
+ try {
293
+ return k.accessSync(e, k.constants.F_OK), !0;
294
+ } catch {
295
+ return !1;
296
+ }
232
297
  }
233
- onAfterLoad(e) {
234
- const n = this.options.schema["~standard"].validate(e);
235
- if (n instanceof Promise)
236
- throw new Error("StructuredConfigFile does not support async validation");
237
- return n.issues ? ae(e, this.options.default) : ae(n.value, this.options.default);
298
+ migrate(e, t) {
299
+ const r = { ...e };
300
+ for (const s in t)
301
+ Object.prototype.hasOwnProperty.call(t, s) && (s in e ? e[s] !== null && t[s] !== null && typeof e[s] == "object" && typeof t[s] == "object" && !Array.isArray(e[s]) && !Array.isArray(t[s]) ? r[s] = this.migrate(e[s], t[s]) : Array.isArray(t[s]) && (r[s] = e[s]) : r[s] = t[s]);
302
+ return r;
303
+ }
304
+ reportInvalidConfigFile(e) {
305
+ E.getInstance().error("Invalid config file", "INVALID_CONFIG_FILE", {
306
+ issues: e.map((t) => t.message),
307
+ filePath: this._path,
308
+ data: this.data
309
+ });
238
310
  }
239
311
  }
240
- const Re = {
241
- scope: (r) => ({
242
- log: (...t) => {
243
- console.log(r, ...t);
312
+ const Me = {
313
+ scope: (n) => ({
314
+ log: (...e) => {
315
+ console.log(n, ...e);
244
316
  },
245
- error: (...t) => {
246
- console.error(r, ...t);
317
+ error: (...e) => {
318
+ console.error(n, ...e);
247
319
  },
248
- warn: (...t) => {
249
- console.warn(r, ...t);
320
+ warn: (...e) => {
321
+ console.warn(n, ...e);
250
322
  },
251
- info: (...t) => {
252
- console.info(r, ...t);
323
+ info: (...e) => {
324
+ console.info(n, ...e);
253
325
  },
254
- debug: (...t) => {
255
- console.debug(r, ...t);
326
+ debug: (...e) => {
327
+ console.debug(n, ...e);
256
328
  },
257
- captureSentryException: (...t) => {
258
- console.error(r, ...t);
329
+ captureSentryException: (...e) => {
330
+ console.error(n, ...e);
259
331
  },
260
- sentryError: (...t) => {
261
- console.error(r, ...t);
332
+ sentryError: (...e) => {
333
+ console.error(n, ...e);
262
334
  },
263
- sentryLog: (...t) => {
264
- console.log(r, ...t);
335
+ sentryLog: (...e) => {
336
+ console.log(n, ...e);
265
337
  },
266
- sentryWarn: (...t) => {
267
- console.warn(r, ...t);
338
+ sentryWarn: (...e) => {
339
+ console.warn(n, ...e);
268
340
  }
269
341
  }),
270
- error: (...r) => {
271
- console.error(name, ...r);
342
+ error: (...n) => {
343
+ console.error(name, ...n);
272
344
  },
273
- warn: (...r) => {
274
- console.warn(name, ...r);
345
+ warn: (...n) => {
346
+ console.warn(name, ...n);
275
347
  },
276
- info: (...r) => {
277
- console.info(name, ...r);
348
+ info: (...n) => {
349
+ console.info(name, ...n);
278
350
  },
279
- debug: (...r) => {
280
- console.debug(name, ...r);
351
+ debug: (...n) => {
352
+ console.debug(name, ...n);
281
353
  },
282
- captureSentryException: (...r) => {
283
- console.error(name, ...r);
354
+ captureSentryException: (...n) => {
355
+ console.error(name, ...n);
284
356
  },
285
- sentryError: (...r) => {
286
- console.error(name, ...r);
357
+ sentryError: (...n) => {
358
+ console.error(name, ...n);
287
359
  },
288
- sentryLog: (...r) => {
289
- console.log(name, ...r);
360
+ sentryLog: (...n) => {
361
+ console.log(name, ...n);
290
362
  },
291
- sentryWarn: (...r) => {
292
- console.warn(name, ...r);
363
+ sentryWarn: (...n) => {
364
+ console.warn(name, ...n);
293
365
  },
294
- sentryInfo: (...r) => {
295
- console.info(name, ...r);
366
+ sentryInfo: (...n) => {
367
+ console.info(name, ...n);
296
368
  }
297
- }, B = _.join(process.env.APPDATA ?? "", "overlayed");
298
- _.join(B, "logs");
299
- class Ke {
300
- constructor(t) {
369
+ }, Y = () => m.join(process.env.APPDATA ?? "", "overlayed");
370
+ function ut() {
371
+ return m.normalize(Y());
372
+ }
373
+ function dt(n = []) {
374
+ return m.normalize(m.join(Y(), global.OVERLAYED.APP_NAME, ...n));
375
+ }
376
+ const ht = K({
377
+ game: "string",
378
+ type: "string",
379
+ creation_time: "number"
380
+ });
381
+ class Ae {
382
+ constructor(e) {
301
383
  c(this, "logger");
302
384
  c(this, "initialized", !1);
303
- this.logger = Re.scope(t);
385
+ this.logger = Me.scope(e);
304
386
  }
305
387
  init() {
306
388
  this.logger.log("Initializing"), this.initialized = !0;
@@ -309,12 +391,12 @@ class Ke {
309
391
  this.logger.log("Destroying"), this.initialized = !1;
310
392
  }
311
393
  }
312
- class x extends Ct {
313
- constructor(e) {
394
+ class G extends Se {
395
+ constructor(t) {
314
396
  super();
315
397
  c(this, "logger");
316
398
  c(this, "initialized", !1);
317
- this.logger = Re.scope(e);
399
+ this.logger = Me.scope(t);
318
400
  }
319
401
  init() {
320
402
  this.logger.log("Initializing"), this.initialized = !0;
@@ -323,399 +405,371 @@ class x extends Ct {
323
405
  this.logger.log("Destroying"), this.initialized = !1, this.removeAllListeners();
324
406
  }
325
407
  }
326
- class $t extends x {
327
- constructor() {
328
- super("ErrorManager");
329
- }
330
- error(t, e, n) {
331
- this.emit("error", {
332
- code: e,
333
- message: t,
334
- data: n,
335
- timestamp: Date.now()
336
- });
337
- }
338
- warn(t, e, n) {
339
- this.emit("warning", {
340
- code: e,
341
- message: t,
342
- data: n,
343
- timestamp: Date.now()
344
- });
345
- }
346
- }
347
- const q = I($t);
348
- function At() {
349
- return _.normalize(B);
350
- }
351
- function Rt(r = []) {
352
- return _.normalize(_.join(B, global.OVERLAYED.APP_NAME, ...r));
353
- }
354
- var R = "object", xe = "function", Te = "prototype", re = "text", he = "json", ve = "abort", oe = "paramsSerializer", Ee = "addEventListener", N = "status", k = "headers", ee = Object, P = void 0, W = null, ie = ee[Te], X = ee.keys, D = Array.isArray, we = "method", De = "HEAD", le = "GET", Oe = "OPTIONS", Kt = "POST", xt = "PUT", Tt = "PATCH", Dt = "DELETE";
355
- function Ot(r, t) {
356
- let e = new AbortController();
357
- function n(i) {
358
- e.abort(i), o();
408
+ var L = "object", Le = "function", Oe = "prototype", ee = "text", ce = "json", ye = "abort", ne = "paramsSerializer", me = "addEventListener", V = "status", w = "headers", Z = Object, S = void 0, W = null, re = Z[Oe], Q = Z.keys, x = Array.isArray, be = "method", Re = "HEAD", se = "GET", Fe = "OPTIONS", gt = "POST", ft = "PUT", pt = "PATCH", yt = "DELETE";
409
+ function mt(n, e) {
410
+ let t = new AbortController();
411
+ function r(o) {
412
+ t.abort(o), i();
359
413
  }
360
414
  let s = [];
361
- for (let i of r) {
362
- if ((i == null ? void 0 : i.aborted) === !0) {
363
- n(i.reason);
415
+ for (let o of n) {
416
+ if ((o == null ? void 0 : o.aborted) === !0) {
417
+ r(o.reason);
364
418
  break;
365
419
  }
366
- if (i != null && i[Ee]) {
420
+ if (o != null && o[me]) {
367
421
  let l = () => {
368
- n(i.reason);
422
+ r(o.reason);
369
423
  };
370
424
  s.push(() => {
371
- var h;
372
- (h = i.removeEventListener) == null || h.call(i, ve, l);
373
- }), i[Ee](ve, l);
425
+ var d;
426
+ (d = o.removeEventListener) == null || d.call(o, ye, l);
427
+ }), o[me](ye, l);
374
428
  }
375
429
  }
376
- function o() {
377
- s.forEach((i) => i()), t == null || t();
430
+ function i() {
431
+ s.forEach((o) => o()), e == null || e();
378
432
  }
379
- let a = e.signal;
380
- return a.clear = o, a;
433
+ let a = t.signal;
434
+ return a.clear = i, a;
381
435
  }
382
- var ke = ee.getPrototypeOf, Ie = (r) => {
383
- if (r !== W && typeof r === R) {
384
- if (typeof ke === xe) {
385
- let t = ke(r);
386
- return t === ie || t === W;
436
+ var ve = Z.getPrototypeOf, Ee = (n) => {
437
+ if (n !== W && typeof n === L) {
438
+ if (typeof ve === Le) {
439
+ let e = ve(n);
440
+ return e === re || e === W;
387
441
  }
388
- return ie.toString.call(r) === `[${R} Object]`;
442
+ return re.toString.call(n) === `[${L} Object]`;
389
443
  }
390
444
  return !1;
391
- }, ge = (...r) => r.reduce((t, e) => {
392
- if (D(e)) throw new TypeError(`Arguments must be ${R}s, not arrays.`);
393
- return X(e).forEach((n) => {
394
- ["__proto__", "constructor", Te].includes(n) || (D(t[n]) && D(e[n]) ? t[n] = Array.from(new Set(t[n].concat(e[n]))) : Ie(t[n]) && Ie(e[n]) ? t[n] = ge(t[n], e[n]) : t[n] = e[n]);
395
- }), t;
445
+ }, ue = (...n) => n.reduce((e, t) => {
446
+ if (x(t)) throw new TypeError(`Arguments must be ${L}s, not arrays.`);
447
+ return Q(t).forEach((r) => {
448
+ ["__proto__", "constructor", Oe].includes(r) || (x(e[r]) && x(t[r]) ? e[r] = Array.from(new Set(e[r].concat(t[r]))) : Ee(e[r]) && Ee(t[r]) ? e[r] = ue(e[r], t[r]) : e[r] = t[r]);
449
+ }), e;
396
450
  }, {});
397
- function pe(r, t = !0, e = W, n) {
398
- if (r === P || r === W) return "";
399
- let s = [], o = t ? encodeURIComponent : (p) => p, a = D(r), { arrayFormat: i, allowDots: l, serializeDate: h } = n || {}, g = (p) => {
400
- if (l && !a) return `.${p}`;
451
+ function de(n, e = !0, t = W, r) {
452
+ if (n === S || n === W) return "";
453
+ let s = [], i = e ? encodeURIComponent : (g) => g, a = x(n), { arrayFormat: o, allowDots: l, serializeDate: d } = r || {}, h = (g) => {
454
+ if (l && !a) return `.${g}`;
401
455
  if (a) {
402
- if (i === "brackets") return "[]";
403
- if (i === "repeat") return "";
456
+ if (o === "brackets") return "[]";
457
+ if (o === "repeat") return "";
404
458
  }
405
- return `[${p}]`;
459
+ return `[${g}]`;
406
460
  };
407
- for (let p in r) if (ie.hasOwnProperty.call(r, p)) {
408
- let d = r[p];
409
- if (d !== P) {
410
- let m = e ? `${e}${g(p)}` : o(p);
411
- if (!isNaN(d) && d instanceof Date && (d = h ? h(d) : d.toISOString()), typeof d === R) {
412
- let f = pe(d, t, m, n);
461
+ for (let g in n) if (re.hasOwnProperty.call(n, g)) {
462
+ let u = n[g];
463
+ if (u !== S) {
464
+ let p = t ? `${t}${h(g)}` : i(g);
465
+ if (!isNaN(u) && u instanceof Date && (u = d ? d(u) : u.toISOString()), typeof u === L) {
466
+ let f = de(u, e, p, r);
413
467
  f !== "" && s.push(f);
414
- } else s.push(`${o(m)}=${o(d)}`);
468
+ } else s.push(`${i(p)}=${i(u)}`);
415
469
  }
416
470
  }
417
471
  return s.join("&");
418
472
  }
419
- function ce(r) {
420
- return D(r) ? r.map(ce) : (r && typeof r === R && X(r).forEach((t) => {
421
- let e = r[t];
422
- e === P ? delete r[t] : ce(e);
423
- }), r);
473
+ function ie(n) {
474
+ return x(n) ? n.map(ie) : (n && typeof n === L && Q(n).forEach((e) => {
475
+ let t = n[e];
476
+ t === S ? delete n[e] : ie(t);
477
+ }), n);
424
478
  }
425
- function Lt(r) {
426
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(r);
479
+ function bt(n) {
480
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(n);
427
481
  }
428
- function Ft(r, t) {
429
- return r ? t ? (r.endsWith("/") ? r : r + "/") + (t[0] === "/" ? t.slice(1) : t) : r : t || "";
482
+ function vt(n, e) {
483
+ return n ? e ? (n.endsWith("/") ? n : n + "/") + (e[0] === "/" ? e.slice(1) : e) : n : e || "";
430
484
  }
431
- var Bt = "XiorError", Gt = "XiorTimeoutError", Le = class extends Error {
432
- constructor(t, e, n) {
433
- super(t), this.name = Bt, this.request = e, this.config = e, this.response = n;
434
- }
435
- }, Ht = class extends Le {
436
- constructor(t, e, n) {
437
- super(t, e, n), this.name = Gt;
438
- }
439
- }, Nt = Object.defineProperty, jt = Object.defineProperties, Ut = Object.getOwnPropertyDescriptors, Y = Object.getOwnPropertySymbols, Fe = Object.prototype.hasOwnProperty, Be = Object.prototype.propertyIsEnumerable, Ce = (r, t, e) => t in r ? Nt(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, O = (r, t) => {
440
- for (var e in t || (t = {})) Fe.call(t, e) && Ce(r, e, t[e]);
441
- if (Y) for (var e of Y(t)) Be.call(t, e) && Ce(r, e, t[e]);
442
- return r;
443
- }, z = (r, t) => jt(r, Ut(t)), zt = (r, t) => {
444
- var e = {};
445
- for (var n in r) Fe.call(r, n) && t.indexOf(n) < 0 && (e[n] = r[n]);
446
- if (r != null && Y) for (var n of Y(r)) t.indexOf(n) < 0 && Be.call(r, n) && (e[n] = r[n]);
447
- return e;
448
- }, L = (r, t, e) => new Promise((n, s) => {
449
- var o = (l) => {
485
+ var Et = "XiorError", It = "XiorTimeoutError", xe = class extends Error {
486
+ constructor(n, e, t) {
487
+ super(n), this.name = Et, this.request = e, this.config = e, this.response = t;
488
+ }
489
+ }, wt = class extends xe {
490
+ constructor(e, t, r) {
491
+ super(e, t, r), this.name = It;
492
+ }
493
+ }, _t = Object.defineProperty, kt = Object.defineProperties, Pt = Object.getOwnPropertyDescriptors, X = Object.getOwnPropertySymbols, De = Object.prototype.hasOwnProperty, $e = Object.prototype.propertyIsEnumerable, Ie = (n, e, t) => e in n ? _t(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, D = (n, e) => {
494
+ for (var t in e || (e = {})) De.call(e, t) && Ie(n, t, e[t]);
495
+ if (X) for (var t of X(e)) $e.call(e, t) && Ie(n, t, e[t]);
496
+ return n;
497
+ }, z = (n, e) => kt(n, Pt(e)), Ct = (n, e) => {
498
+ var t = {};
499
+ for (var r in n) De.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
500
+ if (n != null && X) for (var r of X(n)) e.indexOf(r) < 0 && $e.call(n, r) && (t[r] = n[r]);
501
+ return t;
502
+ }, $ = (n, e, t) => new Promise((r, s) => {
503
+ var i = (l) => {
450
504
  try {
451
- i(e.next(l));
452
- } catch (h) {
453
- s(h);
505
+ o(t.next(l));
506
+ } catch (d) {
507
+ s(d);
454
508
  }
455
509
  }, a = (l) => {
456
510
  try {
457
- i(e.throw(l));
458
- } catch (h) {
459
- s(h);
511
+ o(t.throw(l));
512
+ } catch (d) {
513
+ s(d);
460
514
  }
461
- }, i = (l) => l.done ? n(l.value) : Promise.resolve(l.value).then(o, a);
462
- i((e = e.apply(r, t)).next());
463
- }), fe = "application/", Ge = `${fe}x-www-form-urlencoded`, He = RegExp, Vt = new He(`^${Ge}`, "i"), qt = `${fe}${he}`, Wt = new He(`^${fe}.*${he}.*`, "i");
464
- function Xt(r = le) {
465
- return [De, le, Oe].includes(r);
515
+ }, o = (l) => l.done ? r(l.value) : Promise.resolve(l.value).then(i, a);
516
+ o((t = t.apply(n, e)).next());
517
+ }), he = "application/", Te = `${he}x-www-form-urlencoded`, Be = RegExp, Kt = new Be(`^${Te}`, "i"), St = `${he}${ce}`, Mt = new Be(`^${he}.*${ce}.*`, "i");
518
+ function At(n = se) {
519
+ return [Re, se, Fe].includes(n);
466
520
  }
467
- var Yt = typeof URLSearchParams != `${P}`;
468
- function Jt(r) {
469
- return L(this, null, function* () {
470
- let t = r[oe] || pe, e = r.encodeURI !== !1, n = r[we] && r[we].toUpperCase(), s = r.url, o = s, a = Yt && r.data instanceof URLSearchParams, i = a ? ee.fromEntries(r.data.entries()) : r.data, l = i, h = r != null && r[k] ? O({}, r[k]) : {}, g = r.params, p = Xt(n);
471
- if (i && typeof i.append !== xe) {
472
- let d = "", m = "content-type";
473
- if (r != null && r[k]) {
474
- let f = X(r[k]).find((w) => w.toLowerCase() === m);
475
- f && (m = f, d = r[k][f]);
521
+ var Lt = typeof URLSearchParams != `${S}`;
522
+ function Ot(n) {
523
+ return $(this, null, function* () {
524
+ let e = n[ne] || de, t = n.encodeURI !== !1, r = n[be] && n[be].toUpperCase(), s = n.url, i = s, a = Lt && n.data instanceof URLSearchParams, o = a ? Z.fromEntries(n.data.entries()) : n.data, l = o, d = n != null && n[w] ? D({}, n[w]) : {}, h = n.params, g = At(r);
525
+ if (o && typeof o.append !== Le) {
526
+ let u = "", p = "content-type";
527
+ if (n != null && n[w]) {
528
+ let f = Q(n[w]).find((I) => I.toLowerCase() === p);
529
+ f && (p = f, u = n[w][f]);
476
530
  }
477
- (!d || a) && (d = p || a ? Ge : qt, h[m] = d), typeof i === R && (p && g && (g = ge(i, g)), Wt.test(d) ? l = JSON.stringify(ce(i)) : !p && Vt.test(d) && (l = t(i)));
531
+ (!u || a) && (u = g || a ? Te : St, d[p] = u), typeof o === L && (g && h && (h = ue(o, h)), Mt.test(u) ? l = JSON.stringify(ie(o)) : !g && Kt.test(u) && (l = e(o)));
478
532
  }
479
- if (g && X(g).length > 0) {
480
- let d = t(g, e);
481
- s += s.includes("?") ? `&${d}` : `?${d}`;
533
+ if (h && Q(h).length > 0) {
534
+ let u = e(h, t);
535
+ s += s.includes("?") ? `&${u}` : `?${u}`;
482
536
  }
483
- return z(O({}, r), { _data: l, _url: s, data: i, url: o, method: n, [k]: h, isGet: p });
537
+ return z(D({}, n), { _data: l, _url: s, data: o, url: i, method: r, [w]: d, isGet: g });
484
538
  });
485
539
  }
486
- var Qt = typeof AbortController != `${P}`;
487
- function Zt(r, t) {
488
- return L(this, null, function* () {
489
- let e;
490
- if (!t || !r.ok || [re, he].includes(t)) {
491
- if (e = yield r[re](), e && t !== re) try {
492
- e = JSON.parse(e);
540
+ var Rt = typeof AbortController != `${S}`;
541
+ function Ft(n, e) {
542
+ return $(this, null, function* () {
543
+ let t;
544
+ if (!e || !n.ok || [ee, ce].includes(e)) {
545
+ if (t = yield n[ee](), t && e !== ee) try {
546
+ t = JSON.parse(t);
493
547
  } catch {
494
548
  }
495
549
  } else {
496
- if (t === "blob") return r.blob();
497
- if (t === "arraybuffer") return r.arrayBuffer();
550
+ if (e === "blob") return n.blob();
551
+ if (e === "arraybuffer") return n.arrayBuffer();
498
552
  }
499
- return e;
553
+ return t;
500
554
  });
501
555
  }
502
- var en = (r) => new A(r), A = class {
503
- constructor(t) {
504
- this.REQI = [], this.RESI = [], this.P = [], this.config = t, this.defaults = { params: {}, [k]: {} };
556
+ var xt = (n) => new A(n), A = class {
557
+ constructor(e) {
558
+ this.REQI = [], this.RESI = [], this.P = [], this.config = e, this.defaults = { params: {}, [w]: {} };
505
559
  }
506
560
  get interceptors() {
507
- return { request: { use: (t, e, n) => (this.REQI.push(t), t), eject: (t) => {
508
- this.REQI = this.REQI.filter((e) => e !== t);
561
+ return { request: { use: (e, t, r) => (this.REQI.push(e), e), eject: (e) => {
562
+ this.REQI = this.REQI.filter((t) => t !== e);
509
563
  }, clear: () => {
510
564
  this.REQI = [];
511
- } }, response: { use: (t, e) => (this.RESI.push({ fn: t, onRejected: e }), t), eject: (t) => {
512
- this.RESI = this.RESI.filter((e) => e.fn !== t);
565
+ } }, response: { use: (e, t) => (this.RESI.push({ fn: e, onRejected: t }), e), eject: (e) => {
566
+ this.RESI = this.RESI.filter((t) => t.fn !== e);
513
567
  }, clear: () => {
514
568
  this.RESI = [];
515
569
  } } };
516
570
  }
517
571
  get plugins() {
518
- return { use: (t) => (this.P.push(t), t), eject: (t) => {
519
- this.P = this.P.filter((e) => e !== t);
572
+ return { use: (e) => (this.P.push(e), e), eject: (e) => {
573
+ this.P = this.P.filter((t) => t !== e);
520
574
  }, clear: () => {
521
575
  this.P = [];
522
576
  } };
523
577
  }
524
- request(t) {
525
- return L(this, null, function* () {
526
- let e = ge(this.config || {}, this.defaults, typeof t == "string" ? { url: t } : t), n = "credentials";
527
- e.withCredentials && !e[n] && (e[n] = "include"), e[oe] || (e[oe] = pe);
528
- for (let a of this.REQI) e = yield a(e);
578
+ request(e) {
579
+ return $(this, null, function* () {
580
+ let t = ue(this.config || {}, this.defaults, typeof e == "string" ? { url: e } : e), r = "credentials";
581
+ t.withCredentials && !t[r] && (t[r] = "include"), t[ne] || (t[ne] = de);
582
+ for (let a of this.REQI) t = yield a(t);
529
583
  let s = this._.bind(this);
530
584
  this.P.forEach((a) => {
531
585
  s = a(s, this);
532
586
  });
533
- let o = s(e);
534
- if (!e._did) {
535
- let a = 0, i = [];
587
+ let i = s(t);
588
+ if (!t._did) {
589
+ let a = 0, o = [];
536
590
  for (this.RESI.forEach(function(l) {
537
- i.push(l.fn, l.onRejected);
538
- }); i.length > a; ) o = o.then(i[a++], i[a++]);
591
+ o.push(l.fn, l.onRejected);
592
+ }); o.length > a; ) i = i.then(o[a++], o[a++]);
539
593
  }
540
- return o;
594
+ return i;
541
595
  });
542
596
  }
543
- _(t) {
544
- return L(this, null, function* () {
545
- let e = yield Jt(t), { url: n, method: s, headers: o, timeout: a, signal: i, data: l, _data: h, _url: g, isGet: p, fetch: d } = e, m = zt(e, ["url", "method", "headers", "timeout", "signal", "data", "_data", "_url", "isGet", "fetch"]);
546
- t._url = g;
547
- let f, w = [], G = P;
548
- if (a && Qt) {
549
- let v = new AbortController();
550
- G = setTimeout(() => {
551
- v.abort(new Ht(`timeout of ${a}ms exceeded`, t));
552
- }, a), w.push(v.signal);
597
+ _(e) {
598
+ return $(this, null, function* () {
599
+ let t = yield Ot(e), { url: r, method: s, headers: i, timeout: a, signal: o, data: l, _data: d, _url: h, isGet: g, fetch: u } = t, p = Ct(t, ["url", "method", "headers", "timeout", "signal", "data", "_data", "_url", "isGet", "fetch"]);
600
+ e._url = h;
601
+ let f, I = [], j = S;
602
+ if (a && Rt) {
603
+ let b = new AbortController();
604
+ j = setTimeout(() => {
605
+ b.abort(new wt(`timeout of ${a}ms exceeded`, e));
606
+ }, a), I.push(b.signal);
553
607
  }
554
- i && w.push(i), f = w[0], w.length > 1 && (f = Ot(w, () => {
555
- clearTimeout(G);
608
+ o && I.push(o), f = I[0], I.length > 1 && (f = mt(I, () => {
609
+ clearTimeout(j);
556
610
  }));
557
- let H = g || n, _e = "baseURL";
558
- return t[_e] && !Lt(H) && (H = Ft(t[_e], H)), (d || fetch)(H, z(O({ body: p ? P : h }, m), { signal: f, method: s, headers: o })).then((v) => L(this, null, function* () {
559
- let { responseType: st } = t, be = { data: yield Zt(v, st), response: v, config: t, request: t, [N]: v[N], statusText: v.statusText, [k]: v[k] };
560
- if (!v.ok) {
561
- let at = new Le(v[N] ? `Request failed with status code ${v[N]}` : "Network error", t, be);
562
- return Promise.reject(at);
611
+ let N = h || r, fe = "baseURL";
612
+ return e[fe] && !bt(N) && (N = vt(e[fe], N)), (u || fetch)(N, z(D({ body: g ? S : d }, p), { signal: f, method: s, headers: i })).then((b) => $(this, null, function* () {
613
+ let { responseType: Ve } = e, pe = { data: yield Ft(b, Ve), response: b, config: e, request: e, [V]: b[V], statusText: b.statusText, [w]: b[w] };
614
+ if (!b.ok) {
615
+ let He = new xe(b[V] ? `Request failed with status code ${b[V]}` : "Network error", e, pe);
616
+ return Promise.reject(He);
563
617
  }
564
- return be;
618
+ return pe;
565
619
  })).finally(() => {
566
- var v;
567
- G && clearTimeout(G), (v = f == null ? void 0 : f.clear) == null || v.call(f);
620
+ var b;
621
+ j && clearTimeout(j), (b = f == null ? void 0 : f.clear) == null || b.call(f);
568
622
  });
569
623
  });
570
624
  }
571
- cG(t) {
572
- return (e, n) => this.request(n ? z(O({}, n), { method: t, url: e }) : { method: t, url: e });
625
+ cG(e) {
626
+ return (t, r) => this.request(r ? z(D({}, r), { method: e, url: t }) : { method: e, url: t });
573
627
  }
574
- cP(t) {
575
- return (e, n, s) => this.request(s ? z(O({}, s), { method: t, url: e, data: n }) : { method: t, url: e, data: n });
628
+ cP(e) {
629
+ return (t, r, s) => this.request(s ? z(D({}, s), { method: e, url: t, data: r }) : { method: e, url: t, data: r });
576
630
  }
577
- get(t, e) {
578
- return this.cG(le)(t, e);
631
+ get(e, t) {
632
+ return this.cG(se)(e, t);
579
633
  }
580
- head(t, e) {
581
- return this.cG(De)(t, e);
634
+ head(e, t) {
635
+ return this.cG(Re)(e, t);
582
636
  }
583
- post(t, e, n) {
584
- return this.cP(Kt)(t, e, n);
637
+ post(e, t, r) {
638
+ return this.cP(gt)(e, t, r);
585
639
  }
586
- put(t, e, n) {
587
- return this.cP(xt)(t, e, n);
640
+ put(e, t, r) {
641
+ return this.cP(ft)(e, t, r);
588
642
  }
589
- patch(t, e, n) {
590
- return this.cP(Tt)(t, e, n);
643
+ patch(e, t, r) {
644
+ return this.cP(pt)(e, t, r);
591
645
  }
592
- delete(t, e) {
593
- return this.cG(Dt)(t, e);
646
+ delete(e, t) {
647
+ return this.cG(yt)(e, t);
594
648
  }
595
- options(t, e) {
596
- return this.cG(Oe)(t, e);
649
+ options(e, t) {
650
+ return this.cG(Fe)(e, t);
597
651
  }
598
652
  };
599
- A.create = en, A.VERSION = "0.7.7";
600
- var tn = Object.assign(A.create(), { create: A.create, VERSION: A.VERSION }), Ne = tn;
601
- const je = Ne.create({
653
+ A.create = xt, A.VERSION = "0.7.7";
654
+ var Dt = Object.assign(A.create(), { create: A.create, VERSION: A.VERSION }), Ge = Dt;
655
+ const je = Ge.create({
602
656
  baseURL: "https://updater.stats.cc",
603
657
  headers: {
604
658
  Accept: "application/json",
605
659
  "Accept-Encoding": "gzip, deflate, br"
606
660
  }
607
- }), ye = Ne.create({
661
+ }), ge = Ge.create({
608
662
  baseURL: "https://api.stats.cc",
609
663
  headers: {
610
664
  Accept: "application/json",
611
665
  "Accept-Encoding": "gzip, deflate, br"
612
666
  }
613
667
  });
614
- function nn(r, t) {
615
- return je.get(`/v1/native/${r}/version.txt`, {
616
- params: { channel: t },
668
+ function $t(n, e) {
669
+ return je.get(`/v1/native/${n}/version.txt`, {
670
+ params: { channel: e },
617
671
  responseType: "text"
618
672
  });
619
673
  }
620
- function rn(r, t) {
621
- return je.get(`/v1/native/${r}/files`, {
622
- params: { channel: t },
674
+ function Tt(n, e) {
675
+ return je.get(`/v1/native/${n}/files`, {
676
+ params: { channel: e },
623
677
  responseType: "arraybuffer"
624
678
  });
625
679
  }
626
- function sn() {
627
- return ye.get("/v1/raven/config");
680
+ function Bt() {
681
+ return ge.get("/v1/raven/config");
628
682
  }
629
- function an(r, t) {
630
- return ye.get(`/v1/raven/games/${r}/builds/${t}/check`);
683
+ function Gt(n, e) {
684
+ return ge.get(`/v1/raven/games/${n}/builds/${e}/check`);
631
685
  }
632
- function on(r, t) {
633
- const e = new FormData();
634
- return e.append("file", t), ye.post(`/v1/raven/games/${r}/builds/upload`, e, {});
686
+ function jt(n, e) {
687
+ const t = new FormData();
688
+ return t.append("file", e), ge.post(`/v1/raven/games/${n}/builds/upload`, t, {});
635
689
  }
636
- function ln(r) {
637
- return r instanceof Error && (r.name === "XiorError" || r.name === "XiorTimeoutError");
690
+ function Nt(n) {
691
+ return n instanceof Error && (n.name === "XiorError" || n.name === "XiorTimeoutError");
638
692
  }
639
- function cn(r) {
640
- return !!(r && "kind" in r.data && "message" in r.data);
693
+ function Vt(n) {
694
+ return !!(n && "kind" in n.data && "message" in n.data);
641
695
  }
642
- const dn = {
696
+ const Ht = {
643
697
  buildChannel: "alpha"
644
698
  };
645
- class un extends x {
699
+ class Ut extends G {
646
700
  constructor() {
647
701
  super("NativeDllManager");
648
702
  c(this, "UPDATE_CHECK_INTERVAL_MS", 1e3 * 60 * 5);
649
703
  // 5 minutes
650
704
  c(this, "targetDir");
651
705
  c(this, "updateInterval");
652
- this.targetDir = _.join(B, "resources"), this.logger.log("Target directory", this.targetDir);
706
+ this.targetDir = m.join(Y(), "resources"), this.logger.log("Target directory", this.targetDir);
653
707
  }
654
- async initWithDlls(e) {
655
- super.init(), await E.mkdir(this.targetDir, { recursive: !0 }), await this.checkForUpdates(e), clearInterval(this.updateInterval), this.updateInterval = setInterval(() => this.checkForUpdates(e), this.UPDATE_CHECK_INTERVAL_MS);
708
+ async initWithDlls(t) {
709
+ super.init(), await v.mkdir(this.targetDir, { recursive: !0 }), await this.checkForUpdates(t), clearInterval(this.updateInterval), this.updateInterval = setInterval(() => this.checkForUpdates(t), this.UPDATE_CHECK_INTERVAL_MS);
656
710
  }
657
711
  destroy() {
658
712
  this.updateInterval && (clearInterval(this.updateInterval), this.updateInterval = void 0), super.destroy();
659
713
  }
660
- async getCurrentVersion(e) {
714
+ async getCurrentVersion(t) {
661
715
  try {
662
- const n = _.join(this.targetDir, e, "version.txt");
663
- return await E.readFile(n, "utf-8");
716
+ const r = m.join(this.targetDir, t, "version.txt");
717
+ return await v.readFile(r, "utf-8");
664
718
  } catch {
665
719
  return null;
666
720
  }
667
721
  }
668
- getTargetPath(e) {
669
- return _.join(this.targetDir, e);
722
+ getTargetPath(t) {
723
+ return m.join(this.targetDir, t);
670
724
  }
671
- getTargetVersionPath(e, n) {
672
- return _.join(this.getTargetPath(e), n);
725
+ getTargetVersionPath(t, r) {
726
+ return m.join(this.getTargetPath(t), r);
673
727
  }
674
- async checkForUpdates(e) {
675
- const n = dn.buildChannel;
728
+ async checkForUpdates(t) {
729
+ const r = Ht.buildChannel;
676
730
  this.logger.log("Checking for updates");
677
- for (const s of e)
731
+ for (const s of t)
678
732
  try {
679
- const { data: o } = await nn(s, n), a = await this.getCurrentVersion(s);
680
- this.logger.log(`${s} > Update Check. current: ${a}, latest: ${o}`);
681
- const i = o !== a;
682
- this.logger.log(`${s} > Update found: ${a} -> ${o}`), await this.downloadAndExtractDll(s, o, n, i), this.logger.log(`${s} > Downloaded and extracted`), i && (this.logger.log(`${s} > Cleaning up versions older than ${o}`), await this.cleanupOldVersions(s, o)), this.emit("dllUpdated", { identifier: s, version: o });
683
- } catch (o) {
684
- this.logger.captureSentryException(`${s} > Error checking/updating`, o);
733
+ const { data: i } = await $t(s, r), a = await this.getCurrentVersion(s);
734
+ this.logger.log(`${s} > Update Check. current: ${a}, latest: ${i}`);
735
+ const o = i !== a;
736
+ this.logger.log(`${s} > Update found: ${a} -> ${i}`), await this.downloadAndExtractDll(s, i, r, o), this.logger.log(`${s} > Downloaded and extracted`), o && (this.logger.log(`${s} > Cleaning up versions older than ${i}`), await this.cleanupOldVersions(s, i)), this.emit("dllUpdated", { identifier: s, version: i });
737
+ } catch (i) {
738
+ this.logger.captureSentryException(`${s} > Error checking/updating`, i);
685
739
  }
686
740
  }
687
- async downloadAndExtractDll(e, n, s, o) {
688
- const { data: a } = await rn(e, s), i = this.getTargetPath(e), l = this.getTargetVersionPath(e, n);
689
- await E.mkdir(l, { recursive: !0 });
690
- const h = new Me();
691
- await h.loadAsync(a);
692
- const g = Object.keys(h.files).map(async (d) => {
693
- const m = h.files[d];
694
- if (m && !m.dir) {
695
- const f = _.join(l, d);
696
- if (!o)
741
+ async downloadAndExtractDll(t, r, s, i) {
742
+ const { data: a } = await Tt(t, s), o = this.getTargetPath(t), l = this.getTargetVersionPath(t, r);
743
+ await v.mkdir(l, { recursive: !0 });
744
+ const d = new ke();
745
+ await d.loadAsync(a);
746
+ const h = Object.keys(d.files).map(async (u) => {
747
+ const p = d.files[u];
748
+ if (p && !p.dir) {
749
+ const f = m.join(l, u);
750
+ if (!i)
697
751
  try {
698
- await E.access(f, E.constants.F_OK);
752
+ await v.access(f, v.constants.F_OK);
699
753
  return;
700
754
  } catch {
701
- this.logger.warn(`${e} > File missing, re-downloading: ${f}`);
755
+ this.logger.warn(`${t} > File missing, re-downloading: ${f}`);
702
756
  }
703
- const w = await m.async("nodebuffer");
704
- await E.writeFile(f, w);
757
+ const I = await p.async("nodebuffer");
758
+ await v.writeFile(f, I);
705
759
  }
706
760
  });
707
- await Promise.all(g);
708
- const p = _.join(i, "version.txt");
709
- this.logger.log("Saving version file", p), await E.writeFile(p, n);
761
+ await Promise.all(h);
762
+ const g = m.join(o, "version.txt");
763
+ this.logger.log("Saving version file", g), await v.writeFile(g, r);
710
764
  }
711
- async cleanupOldVersions(e, n) {
712
- const s = _.join(this.targetDir, e), o = await E.readdir(s, { withFileTypes: !0 });
713
- for (const a of o)
714
- a.isDirectory() && a.name !== n && await E.rm(_.join(s, a.name), { recursive: !0, force: !0 });
765
+ async cleanupOldVersions(t, r) {
766
+ const s = m.join(this.targetDir, t), i = await v.readdir(s, { withFileTypes: !0 });
767
+ for (const a of i)
768
+ a.isDirectory() && a.name !== r && await v.rm(m.join(s, a.name), { recursive: !0, force: !0 });
715
769
  }
716
770
  }
717
- const J = I(un);
718
- class hn extends x {
771
+ const J = _(Ut);
772
+ class zt extends G {
719
773
  constructor() {
720
774
  super("RavenManager");
721
775
  c(this, "REFETCH_INTERVAL", 1e3 * 60 * 5);
@@ -731,8 +785,8 @@ class hn extends x {
731
785
  this._failedRefetchTimeoutHandler && (clearTimeout(this._failedRefetchTimeoutHandler), this._failedRefetchTimeoutHandler = null), this.fetchRavenConfig();
732
786
  }, this.REFETCH_INTERVAL);
733
787
  }
734
- getExecutableData(e) {
735
- return this._executableToGameMap.get(e.toLowerCase()) ?? null;
788
+ getExecutableData(t) {
789
+ return this._executableToGameMap.get(t.toLowerCase()) ?? null;
736
790
  }
737
791
  get executables() {
738
792
  return this._executablesArray;
@@ -745,81 +799,90 @@ class hn extends x {
745
799
  }
746
800
  async fetchRavenConfig() {
747
801
  try {
748
- const e = await sn();
749
- this._ravenConfig = e.data, this.resetState();
750
- const n = /* @__PURE__ */ new Set();
802
+ const t = await Bt();
803
+ this._ravenConfig = t.data, this.resetState();
804
+ const r = /* @__PURE__ */ new Set();
751
805
  for (const s of this._ravenConfig.games) {
752
- for (const o of s.executables) {
753
- const a = o.toLowerCase();
806
+ for (const i of s.executables) {
807
+ const a = i.toLowerCase();
754
808
  this._executableToGameMap.set(a, s), this._executablesArray.push(a);
755
809
  }
756
- s.dlls_to_inject.forEach((o) => n.add(o));
810
+ s.dlls_to_inject.forEach((i) => r.add(i));
757
811
  }
758
- await J.getInstance().initWithDlls(Array.from(n)), this.logger.log("Raven updated", this._ravenConfig), this.emit("executablesUpdated", { executables: this.executables, map: this._executableToGameMap });
759
- } catch (e) {
760
- this.logger.captureSentryException("Failed to fetch Raven config", e), this._failedRefetchTimeoutHandler = setTimeout(() => this.fetchRavenConfig(), this.FAILED_REFETCH_INTERVAL);
812
+ await J.getInstance().initWithDlls(Array.from(r)), this.logger.log("Raven updated", this._ravenConfig), this.emit("executablesUpdated", { executables: this.executables, map: this._executableToGameMap });
813
+ } catch (t) {
814
+ this.logger.captureSentryException("Failed to fetch Raven config", t), this._failedRefetchTimeoutHandler = setTimeout(() => this.fetchRavenConfig(), this.FAILED_REFETCH_INTERVAL);
761
815
  }
762
816
  }
763
817
  resetState() {
764
818
  this._executableToGameMap.clear(), this._executablesArray = [];
765
819
  }
766
820
  }
767
- const Q = I(hn), gn = ue(import.meta.url), { PipeEventServer: Dr, PipeEventClient: Or, PipeEventBase: Lr, ProcessMonitor: pn, Process: j, InjectionMethod: Fr, AccessLevel: Br } = gn("./build/overlayed_native_interface_x64.node");
768
- class fn extends x {
821
+ const T = _(zt), qt = oe(import.meta.url), {
822
+ PipeEventServer: Hn,
823
+ PipeEventClient: Un,
824
+ PipeEventBase: zn,
825
+ ProcessMonitor: Wt,
826
+ Process: H,
827
+ InjectionMethod: qn,
828
+ AccessLevel: Wn,
829
+ HardwareInterface: Qt
830
+ } = qt("./build/overlayed_native_interface_x64.node");
831
+ class Xt extends G {
769
832
  constructor() {
770
833
  super("ProcessManager");
771
834
  c(this, "_processMonitor");
772
835
  c(this, "_processes", /* @__PURE__ */ new Map());
773
836
  c(this, "boundOnRavenManagerExecutablesUpdated", this.onRavenManagerExecutablesUpdated.bind(this));
774
- this._processMonitor = new pn();
837
+ this._processMonitor = new Wt();
775
838
  }
776
839
  get hasAnyActiveProcesses() {
777
840
  return this.activeProcesses.length > 0;
778
841
  }
779
842
  get activeProcesses() {
780
- return Array.from(this._processes.values()).flat().filter((e) => !e.destroyedAt);
843
+ return Array.from(this._processes.values()).flat().filter((t) => !t.destroyedAt);
781
844
  }
782
845
  init() {
783
- super.init(), Q.getInstance().on("executablesUpdated", this.boundOnRavenManagerExecutablesUpdated), this._processMonitor.on("create", (e) => {
784
- this.logger.log("Process created", e), this.addProcess(e), this.logger.log(`Active Process Count: ${this._processes.size}`), this.emit("create", { process: e });
785
- }), this._processMonitor.on("destroy", (e) => {
786
- this.logger.log("Process destroyed", e), this.deleteProcess(e), this.logger.log(`Active Process Count: ${this._processes.size}`), this.emit("destroy", { process: e });
846
+ super.init(), T.getInstance().on("executablesUpdated", this.boundOnRavenManagerExecutablesUpdated), this._processMonitor.on("create", (t) => {
847
+ this.logger.log("Process created", t), this.addProcess(t), this.logger.log(`Active Process Count: ${this._processes.size}`), this.emit("create", { process: t });
848
+ }), this._processMonitor.on("destroy", (t) => {
849
+ this.logger.log("Process destroyed", t), this.deleteProcess(t), this.logger.log(`Active Process Count: ${this._processes.size}`), this.emit("destroy", { process: t });
787
850
  });
788
851
  }
789
852
  destroy() {
790
- Q.getInstance().off("executablesUpdated", this.boundOnRavenManagerExecutablesUpdated), this._processes.clear(), this._processMonitor.removeAllListeners(), super.destroy();
853
+ T.getInstance().off("executablesUpdated", this.boundOnRavenManagerExecutablesUpdated), this._processes.clear(), this._processMonitor.removeAllListeners(), super.destroy();
791
854
  }
792
- isProcessRunning(e) {
793
- const n = this._processes.get(e);
794
- return (n == null ? void 0 : n.some((s) => !s.destroyedAt)) ?? !1;
855
+ isProcessRunning(t) {
856
+ const r = this._processes.get(t);
857
+ return (r == null ? void 0 : r.some((s) => !s.destroyedAt)) ?? !1;
795
858
  }
796
- onRavenManagerExecutablesUpdated(e) {
797
- e.executables.forEach((n) => {
798
- this.logger.log("Monitoring process", n), this._processMonitor.registerProcess(n);
859
+ onRavenManagerExecutablesUpdated(t) {
860
+ t.executables.forEach((r) => {
861
+ this.logger.log("Monitoring process", r), this._processMonitor.registerProcess(r);
799
862
  });
800
863
  }
801
- addProcess(e) {
802
- if (!e.name)
864
+ addProcess(t) {
865
+ if (!t.name)
803
866
  return;
804
- const n = this._processes.get(e.name);
805
- if (!n) {
806
- this._processes.set(e.name, [e]);
867
+ const r = this._processes.get(t.name);
868
+ if (!r) {
869
+ this._processes.set(t.name, [t]);
807
870
  return;
808
871
  }
809
- this._processes.set(e.name, n.concat(e));
872
+ this._processes.set(t.name, r.concat(t));
810
873
  }
811
- deleteProcess(e) {
812
- if (!e.name)
874
+ deleteProcess(t) {
875
+ if (!t.name)
813
876
  return;
814
- const n = this._processes.get(e.name), s = (n == null ? void 0 : n.filter((o) => o.id !== e.id)) ?? [];
815
- s.length === 0 ? this._processes.delete(e.name) : this._processes.set(e.name, s);
877
+ const r = this._processes.get(t.name), s = (r == null ? void 0 : r.filter((i) => i.id !== t.id)) ?? [];
878
+ s.length === 0 ? this._processes.delete(t.name) : this._processes.set(t.name, s);
816
879
  }
817
880
  }
818
- const M = I(fn), yn = ue(import.meta.url), { RenderInterface: mn, renderHookPath: Gr } = yn("./build/overlayed_render_interface_x64.node");
819
- var _n = Object.defineProperty, bn = (r, t, e) => t in r ? _n(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, V = (r, t, e) => bn(r, typeof t != "symbol" ? t + "" : t, e);
820
- let vn = class {
821
- constructor(t) {
822
- V(this, "_instance"), V(this, "_resolution"), V(this, "boundOnResolutionChanged", this.onResolutionChanged.bind(this)), this._instance = t, this._resolution = { width: 0, height: 0 }, this._instance.on("resolution", this.boundOnResolutionChanged);
881
+ const C = _(Xt), Jt = oe(import.meta.url), { RenderInterface: Yt, renderHookPath: Qn } = Jt("./build/overlayed_render_interface_x64.node");
882
+ var Zt = Object.defineProperty, en = (n, e, t) => e in n ? Zt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, q = (n, e, t) => en(n, typeof e != "symbol" ? e + "" : e, t);
883
+ class tn {
884
+ constructor(e) {
885
+ q(this, "_instance"), q(this, "_resolution"), q(this, "boundOnResolutionChanged", this.onResolutionChanged.bind(this)), this._instance = e, this._resolution = { width: 0, height: 0 }, this._instance.on("resolution", this.boundOnResolutionChanged);
823
886
  }
824
887
  destroy() {
825
888
  this._instance.off("resolution", this.boundOnResolutionChanged);
@@ -830,22 +893,75 @@ let vn = class {
830
893
  get resolution() {
831
894
  return this._resolution;
832
895
  }
833
- onResolutionChanged(t, e) {
834
- this._resolution = { width: t, height: e };
896
+ onResolutionChanged(e, t) {
897
+ this._resolution = { width: e, height: t };
835
898
  }
836
- }, En = class {
899
+ }
900
+ let nn = class {
837
901
  constructor() {
838
- V(this, "interfaces", {});
902
+ q(this, "interfaces", {});
839
903
  }
840
- createInterface(t) {
841
- return this.interfaces[t] ? this.interfaces[t] : (this.interfaces[t] = new vn(new mn(t, { access: 1 })), this.interfaces[t]);
904
+ createInterface(e) {
905
+ return this.interfaces[e] ? this.interfaces[e] : (this.interfaces[e] = new tn(new Yt(e, { access: 1 })), this.interfaces[e]);
842
906
  }
843
- getInterface(t) {
844
- return this.interfaces[t] ? this.interfaces[t] : this.createInterface(t);
907
+ getInterface(e) {
908
+ return this.interfaces[e] ? this.interfaces[e] : this.createInterface(e);
845
909
  }
846
910
  };
847
- const F = I(En);
848
- class wn extends x {
911
+ const O = _(nn);
912
+ var rn = Object.defineProperty, sn = (n, e, t) => e in n ? rn(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, R = (n, e, t) => sn(n, typeof e != "symbol" ? e + "" : e, t);
913
+ class an {
914
+ constructor() {
915
+ R(this, "data", []);
916
+ }
917
+ get size() {
918
+ return this.data.length;
919
+ }
920
+ add(e) {
921
+ this.data.push(e);
922
+ }
923
+ next() {
924
+ return this.data.shift();
925
+ }
926
+ clear() {
927
+ this.data.length = 0;
928
+ }
929
+ *flush() {
930
+ for (; this.size > 0; ) {
931
+ const e = this.next();
932
+ e && (yield e);
933
+ }
934
+ }
935
+ }
936
+ class on {
937
+ constructor(e) {
938
+ R(this, "_clientId", null), R(this, "_userId", null), R(this, "options"), R(this, "eventQueue"), this.options = this.resolveOptions(e), this.eventQueue = new an(), this.setupFlushInterval();
939
+ }
940
+ set clientId(e) {
941
+ this._clientId = e;
942
+ }
943
+ set userId(e) {
944
+ this._userId = e;
945
+ }
946
+ track(e, t) {
947
+ this.eventQueue.add({ name: e, data: t, createdAt: (/* @__PURE__ */ new Date()).toISOString() });
948
+ }
949
+ flush() {
950
+ return Array.from(this.eventQueue.flush());
951
+ }
952
+ setupFlushInterval() {
953
+ setInterval(() => {
954
+ this.flush();
955
+ }, this.options.batchIntervalSeconds * 1e3);
956
+ }
957
+ resolveOptions(e) {
958
+ return {
959
+ batchIntervalSeconds: (e == null ? void 0 : e.batchIntervalSeconds) ?? 15
960
+ };
961
+ }
962
+ }
963
+ const P = _(on);
964
+ class ln extends G {
849
965
  constructor() {
850
966
  super("GameLaunchManager");
851
967
  c(this, "RENDER_INTERFACE_PATH", "node_modules/@overlayed/app/dist/render-interface/build/overlayed_render_hook_x64.dll");
@@ -853,116 +969,120 @@ class wn extends x {
853
969
  c(this, "boundOnProcessDestroy", this.onProcessDestroy.bind(this));
854
970
  }
855
971
  init() {
856
- super.init(), F.getInstance().createInterface("SCC_RAINBOW"), M.getInstance().on("create", this.boundOnProcessCreate), M.getInstance().on("destroy", this.boundOnProcessDestroy);
972
+ super.init(), O.getInstance().createInterface("OGG_SIEGE"), C.getInstance().on("create", this.boundOnProcessCreate), C.getInstance().on("destroy", this.boundOnProcessDestroy);
857
973
  }
858
974
  destroy() {
859
- M.getInstance().off("create", this.boundOnProcessCreate), M.getInstance().off("destroy", this.boundOnProcessDestroy), super.destroy();
975
+ C.getInstance().off("create", this.boundOnProcessCreate), C.getInstance().off("destroy", this.boundOnProcessDestroy), super.destroy();
860
976
  }
861
- async onProcessCreate({ process: e }) {
862
- const n = this.getRavenGame(e);
863
- if (!n)
977
+ async onProcessCreate({ process: t }) {
978
+ const r = this.getRavenGame(t);
979
+ if (!r)
864
980
  return;
865
- if (this.logger.log("Game Launched", n), this.logger.log("Process is elevated: ", e.isElevated), this.logger.log("Current process is elevated: ", j.currentProcess.isElevated), e.isElevated && !j.currentProcess.isElevated) {
866
- q.getInstance().error("Game is elevated but the App is not", "ELEVATION_MISMATCH", {
867
- appElevated: j.currentProcess.isElevated,
868
- gameElevated: e.isElevated
981
+ if (this.logger.log("Game Launched", r), this.logger.log("Process is elevated: ", t.isElevated), this.logger.log("Current process is elevated: ", H.currentProcess.isElevated), t.isElevated && !H.currentProcess.isElevated) {
982
+ E.getInstance().fatal("Game is elevated but the App is not", "ELEVATION_MISMATCH", {
983
+ appElevated: !!H.currentProcess.isElevated,
984
+ gameElevated: !!t.isElevated
869
985
  }), this.logger.sentryLog("Game elevated but App is not", {
870
- appElevated: j.currentProcess.isElevated,
871
- gameElevated: e.isElevated
986
+ appElevated: H.currentProcess.isElevated,
987
+ gameElevated: t.isElevated
872
988
  });
873
989
  return;
874
990
  }
875
991
  const s = this.copyDll(this.RENDER_INTERFACE_PATH);
876
992
  if (s)
877
993
  try {
878
- await e.injectDll(s), this.logger.log("Render Interface Injection Successful", s);
994
+ await t.injectDll(s), this.logger.log("Render Interface Injection Successful", s);
879
995
  } catch (a) {
880
996
  this.logger.captureSentryException("Render Interface Injection Failed", a), this.logger.sentryError("Render Interface Injection Failed", {
881
997
  renderInterfacePath: s
882
998
  });
883
999
  }
884
- const o = n == null ? void 0 : n.dlls_to_inject.map(async (a) => {
885
- const i = await J.getInstance().getCurrentVersion(a);
886
- if (!i)
1000
+ const i = r == null ? void 0 : r.dlls_to_inject.map(async (a) => {
1001
+ const o = await J.getInstance().getCurrentVersion(a);
1002
+ if (!o)
887
1003
  return this.logger.sentryError("No version found for DLL", { identifier: a }), Promise.resolve();
888
- const l = J.getInstance().getTargetVersionPath(a, i);
1004
+ const l = J.getInstance().getTargetVersionPath(a, o);
889
1005
  this.logger.log("DLL Path", l);
890
- const h = await this.getDllFiles(l);
891
- return this.logger.log("DLL Files", h), Promise.all(
892
- h.map(async (g) => {
893
- const p = _.basename(g), d = _.join(l, p);
894
- if (!d)
1006
+ const d = await this.getDllFiles(l);
1007
+ return this.logger.log("DLL Files", d), Promise.all(
1008
+ d.map(async (h) => {
1009
+ const g = m.basename(h), u = m.join(l, g);
1010
+ if (!u)
895
1011
  return Promise.resolve();
896
- this.logger.log("Injecting: ", d);
1012
+ this.logger.log("Injecting: ", u);
897
1013
  try {
898
- return e.injectDll(d).then(() => {
899
- this.logger.log("Injection Successful", d);
900
- }).catch((m) => {
901
- this.logger.sentryError("Injection Failed [1]", { targetPath: d }, m);
1014
+ return t.injectDll(u).then(() => {
1015
+ this.logger.log("Injection Successful", u);
1016
+ }).catch((p) => {
1017
+ this.logger.sentryError("Injection Failed [1]", { targetPath: u }, p);
902
1018
  });
903
- } catch (m) {
904
- return this.logger.sentryError("Injection Failed [2]", { targetPath: d }, m), Promise.reject(m);
1019
+ } catch (p) {
1020
+ return this.logger.sentryError("Injection Failed [2]", { targetPath: u }, p), Promise.reject(p);
905
1021
  }
906
1022
  })
907
1023
  );
908
1024
  });
909
- await Promise.allSettled(o), this.emit("gameLaunchInternal", { ravenGame: n, process: e }), this.emit("gameLaunch", { game: n.identifier });
910
- }
911
- copyDll(e) {
912
- this.logger.log(At());
913
- const n = e.split("/");
914
- if (n.length < 2)
915
- return this.logger.sentryError("Path is invalid", { dllPath: e }), !1;
916
- const s = n.at(-1);
1025
+ await Promise.allSettled(i), this.emit("gameLaunchInternal", { ravenGame: r, process: t }), this.emit("gameLaunch", { game: r.identifier }), P.getInstance().track("game_launch", {
1026
+ game: r.identifier
1027
+ });
1028
+ }
1029
+ copyDll(t) {
1030
+ this.logger.log(ut());
1031
+ const r = t.split("/");
1032
+ if (r.length < 2)
1033
+ return this.logger.sentryError("Path is invalid", { dllPath: t }), !1;
1034
+ const s = r.at(-1);
917
1035
  if (!s)
918
- return this.logger.sentryError("Dll name is invalid", { dllPath: e }), !1;
919
- const o = lt(e), a = _.join(B, "resources"), i = _.join(a, s);
920
- this.logger.debug("Copying", o, "to", i);
1036
+ return this.logger.sentryError("Dll name is invalid", { dllPath: t }), !1;
1037
+ const i = Je(t), a = m.join(Y(), "resources"), o = m.join(a, s);
1038
+ this.logger.debug("Copying", i, "to", o);
921
1039
  try {
922
- dt(a) || ut(a, { recursive: !0 });
923
- const l = Se(o);
924
- ht(i, l), gt(o, i);
1040
+ qe(a) || We(a, { recursive: !0 });
1041
+ const l = _e(i);
1042
+ Qe(o, l), Xe(i, o);
925
1043
  } catch (l) {
926
- return l.code === "EBUSY" ? i : (this.logger.captureSentryException("Failed to copy", l), this.logger.sentryError("Failed to copy", { originalPath: o, targetPath: i }), !1);
1044
+ return l.code === "EBUSY" ? o : (this.logger.captureSentryException("Failed to copy", l), this.logger.sentryError("Failed to copy", { originalPath: i, targetPath: o }), !1);
927
1045
  }
928
- return i;
1046
+ return o;
929
1047
  }
930
- async getDllFiles(e) {
1048
+ async getDllFiles(t) {
931
1049
  try {
932
- return (await E.readdir(e)).filter((s) => s.endsWith(".dll")).map((s) => _.join(e, s));
933
- } catch (n) {
934
- return this.logger.captureSentryException("Failed to read DLL directory", n), this.logger.sentryError("Failed to read DLL directory", { dllPath: e }), [];
1050
+ return (await v.readdir(t)).filter((s) => s.endsWith(".dll")).map((s) => m.join(t, s));
1051
+ } catch (r) {
1052
+ return this.logger.captureSentryException("Failed to read DLL directory", r), this.logger.sentryError("Failed to read DLL directory", { dllPath: t }), [];
935
1053
  }
936
1054
  }
937
- onProcessDestroy({ process: e }) {
938
- const n = this.getRavenGame(e);
939
- n && (this.emit("gameCloseInternal", { ravenGame: n, process: e }), this.emit("gameClose", { game: n.identifier }));
1055
+ onProcessDestroy({ process: t }) {
1056
+ const r = this.getRavenGame(t);
1057
+ r && (this.emit("gameCloseInternal", { ravenGame: r, process: t }), this.emit("gameClose", { game: r.identifier }), P.getInstance().track("game_close", {
1058
+ game: r.identifier
1059
+ }));
940
1060
  }
941
- getRavenGame(e) {
942
- if (!e.name)
1061
+ getRavenGame(t) {
1062
+ if (!t.name)
943
1063
  return;
944
- const n = Q.getInstance().getExecutableData(e.name);
945
- if (!n) {
946
- this.logger.sentryError("No raven game found for process", { process: e });
1064
+ const r = T.getInstance().getExecutableData(t.name);
1065
+ if (!r) {
1066
+ this.logger.sentryError("No raven game found for process", { process: t });
947
1067
  return;
948
1068
  }
949
- return n;
1069
+ return r;
950
1070
  }
951
1071
  }
952
- const Z = I(wn);
953
- class kn extends Ke {
1072
+ const B = _(ln);
1073
+ class cn extends Ae {
954
1074
  constructor() {
955
1075
  super("GameBuildManager");
956
1076
  c(this, "boundOnGameLaunch", this.onGameLaunch.bind(this));
957
1077
  }
958
1078
  init() {
959
- super.init(), Z.getInstance().on("gameLaunchInternal", this.boundOnGameLaunch);
1079
+ super.init(), B.getInstance().on("gameLaunchInternal", this.boundOnGameLaunch);
960
1080
  }
961
1081
  destroy() {
962
- Z.getInstance().off("gameLaunchInternal", this.boundOnGameLaunch), super.destroy();
1082
+ B.getInstance().off("gameLaunchInternal", this.boundOnGameLaunch), super.destroy();
963
1083
  }
964
- async onGameLaunch(e) {
965
- const { ravenGame: n, process: s } = e;
1084
+ async onGameLaunch(t) {
1085
+ const { ravenGame: r, process: s } = t;
966
1086
  if (!s.path || !s.name) {
967
1087
  this.logger.sentryError(
968
1088
  "Process path or name not found, could not check for build hash",
@@ -971,30 +1091,30 @@ class kn extends Ke {
971
1091
  );
972
1092
  return;
973
1093
  }
974
- const o = Se(s.path), a = pt("sha256").update(o).digest("hex");
1094
+ const i = _e(s.path), a = Ye("sha256").update(i).digest("hex");
975
1095
  this.logger.log("Process Path", s.path), this.logger.log("Process Name", s.name), this.logger.log("Build Hash", a);
976
- let i = !1;
1096
+ let o = !1;
977
1097
  try {
978
- i = (await an(n.identifier, a)).data.upload;
979
- } catch (g) {
980
- this.logger.captureSentryException("Error checking game build hash", g);
1098
+ o = (await Gt(r.identifier, a)).data.upload;
1099
+ } catch (h) {
1100
+ this.logger.captureSentryException("Error checking game build hash", h);
981
1101
  return;
982
1102
  }
983
- if (!i) {
1103
+ if (!o) {
984
1104
  this.logger.log("Build hash already exists, skipping upload");
985
1105
  return;
986
1106
  }
987
- const l = new Me();
988
- l.file(s.name, o);
989
- const h = await l.generateAsync({ type: "blob" });
1107
+ const l = new ke();
1108
+ l.file(s.name, i);
1109
+ const d = await l.generateAsync({ type: "blob" });
990
1110
  try {
991
- this.logger.log("Uploading build (size: ", h.size, " bytes)"), await on(n.identifier, h), this.logger.log("Build uploaded successfully");
992
- } catch (g) {
993
- ln(g) ? cn(g.response) ? this.logger.captureSentryException("Error uploading build hash, api error", g) : this.logger.captureSentryException("Error uploading build hash, request error", g) : this.logger.captureSentryException("Error uploading build hash, unknown error", g);
1111
+ this.logger.log("Uploading build (size: ", d.size, " bytes)"), await jt(r.identifier, d), this.logger.log("Build uploaded successfully");
1112
+ } catch (h) {
1113
+ Nt(h) ? Vt(h.response) ? this.logger.captureSentryException("Error uploading build hash, api error", h) : this.logger.captureSentryException("Error uploading build hash, request error", h) : this.logger.captureSentryException("Error uploading build hash, unknown error", h);
994
1114
  }
995
1115
  }
996
1116
  }
997
- const In = I(kn), de = /* @__PURE__ */ new Map([
1117
+ const Ne = _(cn), ae = /* @__PURE__ */ new Map([
998
1118
  [1, "LeftButton"],
999
1119
  [2, "RightButton"],
1000
1120
  [3, "Cancel"],
@@ -1187,14 +1307,14 @@ const In = I(kn), de = /* @__PURE__ */ new Map([
1187
1307
  [252, "Noname"],
1188
1308
  [253, "PA1"],
1189
1309
  [254, "OEM_Clear"]
1190
- ]), Pe = new Map(de.entries().map(([r, t]) => [t, r])), Cn = y({
1310
+ ]), we = new Map(ae.entries().map(([n, e]) => [e, n])), un = K({
1191
1311
  "[string]": {
1192
1312
  keys: "string[]",
1193
- mode: y("'toggle' | 'hold'").pipe((r) => r ?? "toggle")
1313
+ mode: K("'toggle' | 'hold'").pipe((n) => n ?? "toggle")
1194
1314
  }
1195
1315
  });
1196
- class Pn extends x {
1197
- constructor(e) {
1316
+ class dn extends G {
1317
+ constructor(t) {
1198
1318
  super("KeybindManager");
1199
1319
  c(this, "preferencesKeybindToCallbacks", /* @__PURE__ */ new Map());
1200
1320
  c(this, "pressedKeys", /* @__PURE__ */ new Set());
@@ -1205,159 +1325,176 @@ class Pn extends x {
1205
1325
  c(this, "boundHandleKeyUp", this.handleKeyUp.bind(this));
1206
1326
  c(this, "keybindsFile");
1207
1327
  // TODO try to figure out a better way to handle this
1208
- c(this, "isRecording", !1);
1209
- this.keybindsFile = new Mt({
1210
- path: Rt(["keybinds.json"]),
1211
- schema: Cn,
1212
- default: e
1328
+ c(this, "keybindListeningPaused", !1);
1329
+ this.keybindsFile = new ct({
1330
+ path: dt(["keybinds.json"]),
1331
+ schema: un,
1332
+ default: t
1213
1333
  });
1214
1334
  }
1215
1335
  init() {
1216
1336
  super.init();
1217
- const e = F.getInstance().getInterface("SCC_RAINBOW");
1218
- e.instance.on("keyboardFocus", this.boundHandleKeyboardFocus), e.instance.on("keyDown", this.boundHandleKeyDown), e.instance.on("keyUp", this.boundHandleKeyUp);
1337
+ const t = O.getInstance().getInterface("OGG_SIEGE");
1338
+ t.instance.on("keyboardFocus", this.boundHandleKeyboardFocus), t.instance.on("keyDown", this.boundHandleKeyDown), t.instance.on("keyUp", this.boundHandleKeyUp);
1219
1339
  }
1220
1340
  // TODO support multiple callbacks
1221
- async onHotkeyToggled(e, n) {
1222
- const s = this.preferencesKeybindToCallbacks.get(e) || {};
1223
- s.toggle = n, this.preferencesKeybindToCallbacks.set(e, s);
1341
+ async onKeybindToggled(t, r) {
1342
+ const s = this.preferencesKeybindToCallbacks.get(t) || {};
1343
+ s.toggle = r, this.preferencesKeybindToCallbacks.set(t, s);
1224
1344
  }
1225
- async onHotkeyDown(e, n) {
1226
- const s = this.preferencesKeybindToCallbacks.get(e) || {};
1227
- s.down = n, this.preferencesKeybindToCallbacks.set(e, s);
1345
+ async onKeybindDown(t, r) {
1346
+ const s = this.preferencesKeybindToCallbacks.get(t) || {};
1347
+ s.down = r, this.preferencesKeybindToCallbacks.set(t, s);
1228
1348
  }
1229
- async onHotkeyUp(e, n) {
1230
- const s = this.preferencesKeybindToCallbacks.get(e) || {};
1231
- s.up = n, this.preferencesKeybindToCallbacks.set(e, s);
1349
+ async onKeybindUp(t, r) {
1350
+ const s = this.preferencesKeybindToCallbacks.get(t) || {};
1351
+ s.up = r, this.preferencesKeybindToCallbacks.set(t, s);
1352
+ }
1353
+ async updateKeybind(t, r) {
1354
+ this.keybindsFile.set({
1355
+ [t]: r
1356
+ });
1357
+ }
1358
+ async updateKeybinds(t) {
1359
+ const r = Object.fromEntries(
1360
+ Object.entries(t).filter(([s, i]) => i !== void 0)
1361
+ );
1362
+ this.keybindsFile.set({
1363
+ ...this.keybindsFile.get(),
1364
+ ...r
1365
+ });
1366
+ }
1367
+ getConfig() {
1368
+ return this.keybindsFile.get();
1232
1369
  }
1233
1370
  destroy() {
1234
- const e = F.getInstance().getInterface("SCC_RAINBOW");
1235
- e.instance.off("keyboardFocus", this.boundHandleKeyboardFocus), e.instance.off("keyDown", this.boundHandleKeyDown), e.instance.off("keyUp", this.boundHandleKeyUp), super.destroy();
1371
+ const t = O.getInstance().getInterface("OGG_SIEGE");
1372
+ t.instance.off("keyboardFocus", this.boundHandleKeyboardFocus), t.instance.off("keyDown", this.boundHandleKeyDown), t.instance.off("keyUp", this.boundHandleKeyUp), super.destroy();
1236
1373
  }
1237
- handleKeyDown(e) {
1238
- if (this.isRecording)
1374
+ handleKeyDown(t) {
1375
+ if (this.keybindListeningPaused)
1239
1376
  return;
1240
- const n = de.get(e.key);
1241
- if (!n) {
1242
- this.logger.error("Unknown key down", e);
1377
+ const r = ae.get(t.key);
1378
+ if (!r) {
1379
+ this.logger.error("Unknown key down", t);
1243
1380
  return;
1244
1381
  }
1245
- this.pressedKeys.add(n), this.checkKeybindings();
1382
+ this.pressedKeys.add(r), this.checkKeybindings();
1246
1383
  }
1247
1384
  handleKeyboardFocus() {
1248
1385
  this.pressedKeys.clear(), this.activeKeybinds.clear(), this.triggeredToggleKeybinds.clear();
1249
1386
  }
1250
- async handleKeyUp(e) {
1251
- if (this.isRecording)
1387
+ async handleKeyUp(t) {
1388
+ if (this.keybindListeningPaused)
1252
1389
  return;
1253
- const n = de.get(e.key);
1254
- if (!n)
1390
+ const r = ae.get(t.key);
1391
+ if (!r)
1255
1392
  return;
1256
- this.pressedKeys.delete(n);
1257
- const s = this.keybindsFile.data;
1258
- for (const [o] of this.preferencesKeybindToCallbacks.entries())
1259
- s[o].keys.includes(n) && this.triggeredToggleKeybinds.delete(o);
1260
- this.checkHotkeyUps();
1261
- }
1262
- async checkHotkeyUps() {
1263
- const e = this.keybindsFile.data;
1264
- for (const [n, s] of this.preferencesKeybindToCallbacks.entries()) {
1393
+ this.pressedKeys.delete(r);
1394
+ const s = this.keybindsFile.get();
1395
+ for (const [i] of this.preferencesKeybindToCallbacks.entries())
1396
+ s[i].keys.includes(r) && this.triggeredToggleKeybinds.delete(i);
1397
+ this.checkKeybindUps();
1398
+ }
1399
+ async checkKeybindUps() {
1400
+ const t = this.keybindsFile.get();
1401
+ for (const [r, s] of this.preferencesKeybindToCallbacks.entries()) {
1265
1402
  if (!s.up) continue;
1266
- const o = e[n];
1267
- this.activeKeybinds.has(n) && o.keys.some((a) => !this.pressedKeys.has(a)) && (this.activeKeybinds.delete(n), s.up(), this.logger.log("Hotkey up triggered", this.getHotkeyToString(o)));
1403
+ const i = t[r];
1404
+ this.activeKeybinds.has(r) && i.keys.some((a) => !this.pressedKeys.has(a)) && (this.activeKeybinds.delete(r), s.up(), this.logger.log("Keybind up triggered", this.getKeybindToString(i)));
1268
1405
  }
1269
1406
  }
1270
1407
  async checkKeybindings() {
1271
- const e = this.keybindsFile.data;
1272
- for (const [n, s] of this.preferencesKeybindToCallbacks.entries()) {
1273
- const o = e[n];
1274
- if (o.keys.length === this.pressedKeys.size && o.keys.every((i) => Pe.has(i) ? this.pressedKeys.has(i) : !1)) {
1275
- this.triggerHotkey(o, s, n);
1408
+ const t = this.keybindsFile.get();
1409
+ for (const [r, s] of this.preferencesKeybindToCallbacks.entries()) {
1410
+ const i = t[r];
1411
+ if (i.keys.length === this.pressedKeys.size && i.keys.every((o) => we.has(o) ? this.pressedKeys.has(o) : !1)) {
1412
+ this.triggerKeybind(i, s, r);
1276
1413
  return;
1277
1414
  }
1278
1415
  }
1279
- for (const [n, s] of this.preferencesKeybindToCallbacks.entries()) {
1280
- const o = e[n];
1281
- o.keys.every((i) => Pe.has(i) ? this.pressedKeys.has(i) : (this.logger.error("Unknown key", i, o), !1)) && this.triggerHotkey(o, s, n);
1416
+ for (const [r, s] of this.preferencesKeybindToCallbacks.entries()) {
1417
+ const i = t[r];
1418
+ i.keys.every((o) => we.has(o) ? this.pressedKeys.has(o) : (this.logger.error("Unknown key", o, i), !1)) && this.triggerKeybind(i, s, r);
1282
1419
  }
1283
1420
  }
1284
- triggerHotkey(e, n, s) {
1285
- const o = e.mode;
1286
- if (o === "toggle" && n.toggle && !this.triggeredToggleKeybinds.has(s)) {
1287
- const a = n.toggle();
1421
+ triggerKeybind(t, r, s) {
1422
+ const i = t.mode;
1423
+ if (i === "toggle" && r.toggle && !this.triggeredToggleKeybinds.has(s)) {
1424
+ const a = r.toggle();
1288
1425
  this.triggeredToggleKeybinds.add(s), this.logger.log(
1289
- a ? `Hotkey pressed rejected: ${a}` : "Hotkey pressed accepted",
1290
- this.getHotkeyToString(e)
1426
+ a ? `Keybind pressed rejected: ${a}` : "Keybind pressed accepted",
1427
+ this.getKeybindToString(t)
1291
1428
  );
1292
1429
  }
1293
- if (o === "hold" && n.down && !this.activeKeybinds.has(s)) {
1294
- const a = n.down();
1295
- a ? this.logger.log(`Hotkey down rejected: ${a}`, this.getHotkeyToString(e)) : (this.activeKeybinds.add(s), this.logger.log("Hotkey down accepted", this.getHotkeyToString(e)));
1430
+ if (i === "hold" && r.down && !this.activeKeybinds.has(s)) {
1431
+ const a = r.down();
1432
+ a ? this.logger.log(`Keybind down rejected: ${a}`, this.getKeybindToString(t)) : (this.activeKeybinds.add(s), this.logger.log("Keybind down accepted", this.getKeybindToString(t)));
1296
1433
  }
1297
1434
  }
1298
- getHotkeyToString(e) {
1299
- return `(${e.keys.join("+")}${e.mode ? ` ${e.mode}` : ""})`;
1435
+ getKeybindToString(t) {
1436
+ return `(${t.keys.join("+")}${t.mode ? ` ${t.mode}` : ""})`;
1300
1437
  }
1301
1438
  }
1302
- class Sn extends Ke {
1303
- constructor(e) {
1439
+ class hn extends Ae {
1440
+ constructor(t) {
1304
1441
  super("OverridesManager");
1305
1442
  c(this, "renderInterface");
1306
1443
  c(this, "globalCursorOverrideCount", /* @__PURE__ */ new Set());
1307
1444
  c(this, "globalMouseBlockCount", /* @__PURE__ */ new Set());
1308
1445
  c(this, "globalKeyboardBlockCount", /* @__PURE__ */ new Set());
1309
1446
  c(this, "keyInputBlocks", {});
1310
- this.renderInterface = F.getInstance().getInterface(e);
1447
+ this.renderInterface = O.getInstance().getInterface(t);
1311
1448
  }
1312
- scope(e) {
1449
+ scope(t) {
1313
1450
  return {
1314
- setGlobalCursorOverride: (n) => this.setGlobalCursorOverride(e, n),
1315
- setGlobalMouseBlock: (n) => this.setGlobalMouseBlock(e, n),
1316
- setGlobalKeyboardBlock: (n) => this.setGlobalKeyboardBlock(e, n),
1317
- setKeyInputBlock: (n, s) => this.setKeyInputBlock(e, n, s)
1451
+ setGlobalCursorOverride: (r) => this.setGlobalCursorOverride(t, r),
1452
+ setGlobalMouseBlock: (r) => this.setGlobalMouseBlock(t, r),
1453
+ setGlobalKeyboardBlock: (r) => this.setGlobalKeyboardBlock(t, r),
1454
+ setKeyInputBlock: (r, s) => this.setKeyInputBlock(t, r, s)
1318
1455
  };
1319
1456
  }
1320
- setGlobalCursorOverride(e, n) {
1321
- n ? this.globalCursorOverrideCount.add(e) : this.globalCursorOverrideCount.delete(e), n && this.globalCursorOverrideCount.size === 1 ? this.renderInterface.instance.setGlobalCursorOverride(!0) : !n && this.globalCursorOverrideCount.size === 0 && this.renderInterface.instance.setGlobalCursorOverride(!1);
1457
+ setGlobalCursorOverride(t, r) {
1458
+ r ? this.globalCursorOverrideCount.add(t) : this.globalCursorOverrideCount.delete(t), r && this.globalCursorOverrideCount.size === 1 ? this.renderInterface.instance.setGlobalCursorOverride(!0) : !r && this.globalCursorOverrideCount.size === 0 && this.renderInterface.instance.setGlobalCursorOverride(!1);
1322
1459
  }
1323
- setGlobalMouseBlock(e, n) {
1324
- n ? this.globalMouseBlockCount.add(e) : this.globalMouseBlockCount.delete(e), n && this.globalMouseBlockCount.size === 1 ? this.renderInterface.instance.setGlobalMouseBlock(!0) : !n && this.globalMouseBlockCount.size === 0 && this.renderInterface.instance.setGlobalMouseBlock(!1);
1460
+ setGlobalMouseBlock(t, r) {
1461
+ r ? this.globalMouseBlockCount.add(t) : this.globalMouseBlockCount.delete(t), r && this.globalMouseBlockCount.size === 1 ? this.renderInterface.instance.setGlobalMouseBlock(!0) : !r && this.globalMouseBlockCount.size === 0 && this.renderInterface.instance.setGlobalMouseBlock(!1);
1325
1462
  }
1326
- setGlobalKeyboardBlock(e, n) {
1327
- n ? this.globalKeyboardBlockCount.add(e) : this.globalKeyboardBlockCount.delete(e), n && this.globalKeyboardBlockCount.size === 1 ? this.renderInterface.instance.setGlobalKeyboardBlock(!0) : !n && this.globalKeyboardBlockCount.size === 0 && this.renderInterface.instance.setGlobalKeyboardBlock(!1);
1463
+ setGlobalKeyboardBlock(t, r) {
1464
+ r ? this.globalKeyboardBlockCount.add(t) : this.globalKeyboardBlockCount.delete(t), r && this.globalKeyboardBlockCount.size === 1 ? this.renderInterface.instance.setGlobalKeyboardBlock(!0) : !r && this.globalKeyboardBlockCount.size === 0 && this.renderInterface.instance.setGlobalKeyboardBlock(!1);
1328
1465
  }
1329
- setKeyInputBlock(e, n, s) {
1330
- this.keyInputBlocks[n] || (this.keyInputBlocks[n] = /* @__PURE__ */ new Set()), s ? this.keyInputBlocks[n].add(e) : this.keyInputBlocks[n].delete(e), s && this.keyInputBlocks[n].size === 1 ? this.renderInterface.instance.setKeyInputBlock(n, !0) : !s && this.keyInputBlocks[n].size === 0 && this.renderInterface.instance.setKeyInputBlock(n, !1);
1466
+ setKeyInputBlock(t, r, s) {
1467
+ this.keyInputBlocks[r] || (this.keyInputBlocks[r] = /* @__PURE__ */ new Set()), s ? this.keyInputBlocks[r].add(t) : this.keyInputBlocks[r].delete(t), s && this.keyInputBlocks[r].size === 1 ? this.renderInterface.instance.setKeyInputBlock(r, !0) : !s && this.keyInputBlocks[r].size === 0 && this.renderInterface.instance.setKeyInputBlock(r, !1);
1331
1468
  }
1332
1469
  }
1333
- const Mn = I(Sn, "SCC_RAINBOW");
1334
- let se = !1, U = {};
1335
- function jr(r) {
1336
- const { init: t = !0 } = r;
1337
- if ($n(r), se)
1470
+ const gn = _(hn, "OGG_SIEGE");
1471
+ let te = !1, U;
1472
+ function Jn(n) {
1473
+ const { init: e = !0 } = n;
1474
+ if (fn(n), te)
1338
1475
  return U;
1339
- function e() {
1340
- const n = /* @__PURE__ */ new Map(), s = Rn(r.modules, n), o = Kn(), a = Tn(r.keybinds), i = Dn(), l = On();
1341
- An(), xn(r, n), se = !0, U = {
1476
+ function t() {
1477
+ _n(n);
1478
+ const r = /* @__PURE__ */ new Map(), s = mn(n.modules, r), i = bn(), a = En(n.keybinds), o = In(), l = wn();
1479
+ pn(), vn(n, r), te = !0, U = {
1342
1480
  ...s,
1343
- ...o,
1344
- // TODO add a way for developer to save keybinds that the user settings
1481
+ ...i,
1345
1482
  keybinds: a,
1346
- windows: i,
1483
+ windows: o,
1347
1484
  input: l,
1348
- hasAnyActiveProcesses: () => M.getInstance().hasAnyActiveProcesses,
1349
- init: e
1485
+ hasAnyActiveProcesses: () => C.getInstance().hasAnyActiveProcesses,
1486
+ init: t
1350
1487
  };
1351
1488
  }
1352
- return t ? (e(), U) : new Proxy(
1489
+ return e ? (t(), U) : new Proxy(
1353
1490
  {
1354
- init: e
1491
+ init: t
1355
1492
  },
1356
1493
  {
1357
- get: (n, s) => {
1358
- if (s !== "init" && !se)
1494
+ get: (r, s) => {
1495
+ if (s !== "init" && !te)
1359
1496
  throw new Error("overlayed was called before initialized");
1360
- return s === "init" ? n[s] : U[s];
1497
+ return s === "init" ? r[s] : U[s];
1361
1498
  }
1362
1499
  }
1363
1500
  );
@@ -1367,501 +1504,225 @@ global.OVERLAYED = new Proxy({}, {
1367
1504
  throw new Error("function overlayed was not called");
1368
1505
  }
1369
1506
  });
1370
- function $n(r) {
1507
+ function fn(n) {
1371
1508
  global.OVERLAYED = {
1372
- APP_NAME: r.appName
1509
+ APP_NAME: n.appName
1373
1510
  };
1374
1511
  }
1375
- function An() {
1376
- In.getInstance().init(), Z.getInstance().init(), M.getInstance().init(), Q.getInstance().init();
1512
+ function pn() {
1513
+ Ne.getInstance().init(), B.getInstance().init(), C.getInstance().init(), T.getInstance().init(), Pe.on("quit", () => {
1514
+ yn();
1515
+ });
1516
+ }
1517
+ function yn() {
1518
+ T.getInstance().destroy(), B.getInstance().destroy(), Ne.getInstance().destroy(), C.getInstance().destroy(), O.getInstance().getInterface("OGG_SIEGE").destroy(), le.getInstance().destroy(), E.getInstance().destroy();
1377
1519
  }
1378
- function Rn(r, t) {
1379
- return r.reduce((e, n) => {
1380
- const s = n.key;
1381
- return e[s] = {
1520
+ function mn(n, e) {
1521
+ return n.reduce((t, r) => {
1522
+ const s = r.key;
1523
+ return t[s] = {
1382
1524
  // prettier-ignore
1383
- on(o, a) {
1384
- const i = $(s, o), l = t.get(i) ?? /* @__PURE__ */ new Set();
1385
- l.add(a), t.set(i, l);
1525
+ on(i, a) {
1526
+ const o = M(s, i), l = e.get(o) ?? /* @__PURE__ */ new Set();
1527
+ l.add(a), e.set(o, l);
1386
1528
  },
1387
- onAny(o) {
1388
- const a = $(s, "*"), i = t.get(a) ?? /* @__PURE__ */ new Set();
1389
- i.add(o), t.set(a, i);
1529
+ onAny(i) {
1530
+ const a = M(s, "*"), o = e.get(a) ?? /* @__PURE__ */ new Set();
1531
+ o.add(i), e.set(a, o);
1390
1532
  },
1391
1533
  // prettier-ignore
1392
- off(o, a) {
1393
- const i = $(s, o), l = t.get(i) ?? /* @__PURE__ */ new Set();
1394
- l.delete(a), t.set(i, l);
1534
+ off(i, a) {
1535
+ const o = M(s, i), l = e.get(o) ?? /* @__PURE__ */ new Set();
1536
+ l.delete(a), e.set(o, l);
1395
1537
  },
1396
1538
  // prettier-ignore
1397
- offAny(o) {
1398
- const a = $(s, "*"), i = t.get(a) ?? /* @__PURE__ */ new Set();
1399
- i.delete(o), t.set(a, i);
1539
+ offAny(i) {
1540
+ const a = M(s, "*"), o = e.get(a) ?? /* @__PURE__ */ new Set();
1541
+ o.delete(i), e.set(a, o);
1400
1542
  }
1401
- }, e;
1543
+ }, t;
1402
1544
  }, {});
1403
1545
  }
1404
- function Kn() {
1405
- const r = q.getInstance(), t = Z.getInstance();
1546
+ function bn() {
1547
+ const n = E.getInstance(), e = B.getInstance();
1406
1548
  return {
1407
- on: (e, n) => {
1408
- switch (e) {
1549
+ on: (t, r) => {
1550
+ switch (t) {
1551
+ case "fatal":
1552
+ n.on("fatal", r);
1553
+ break;
1409
1554
  case "error":
1410
- r.on("error", n);
1555
+ n.on("error", r);
1411
1556
  break;
1412
1557
  case "warning":
1413
- r.on("warning", n);
1558
+ n.on("warning", r);
1414
1559
  break;
1415
1560
  case "gameLaunch":
1416
- t.on("gameLaunch", n);
1561
+ e.on("gameLaunch", r);
1417
1562
  break;
1418
1563
  case "gameClose":
1419
- t.on("gameClose", n);
1564
+ e.on("gameClose", r);
1420
1565
  break;
1421
1566
  default:
1422
- throw new Error("Not implemented", { cause: [e, n] });
1567
+ throw new Error(`Event type not implemented ${t}`, { cause: [t, r] });
1423
1568
  }
1424
1569
  },
1425
- off: (e, n) => {
1426
- switch (e) {
1570
+ off: (t, r) => {
1571
+ switch (t) {
1572
+ case "fatal":
1573
+ n.off("fatal", r);
1574
+ break;
1427
1575
  case "error":
1428
- r.off("error", n);
1576
+ n.off("error", r);
1429
1577
  break;
1430
1578
  case "warning":
1431
- r.off("warning", n);
1579
+ n.off("warning", r);
1432
1580
  break;
1433
1581
  case "gameLaunch":
1434
- t.off("gameLaunch", n);
1582
+ e.off("gameLaunch", r);
1435
1583
  break;
1436
1584
  case "gameClose":
1437
- t.off("gameClose", n);
1585
+ e.off("gameClose", r);
1438
1586
  break;
1439
1587
  default:
1440
- throw new Error("Not implemented", { cause: [e, n] });
1588
+ throw new Error(`Event type not implemented ${t}`, { cause: [t, r] });
1441
1589
  }
1442
1590
  }
1443
1591
  };
1444
1592
  }
1445
- function $(r, t) {
1446
- return `${r}:${t}`;
1593
+ function M(n, e) {
1594
+ return `${n}:${e}`;
1447
1595
  }
1448
- function xn(r, t) {
1449
- const e = $e.getInstance();
1450
- function n(s) {
1451
- const o = Ae(s);
1452
- if (o instanceof y.errors) {
1453
- q.getInstance().warn("Invalid event", "INVALID_EVENT", {
1454
- cause: o.summary
1596
+ function vn(n, e) {
1597
+ const t = le.getInstance();
1598
+ function r(s) {
1599
+ const i = ht(s);
1600
+ if (i instanceof K.errors) {
1601
+ E.getInstance().warn("Invalid event", "INVALID_EVENT", {
1602
+ summary: i.summary
1455
1603
  });
1456
1604
  return;
1457
1605
  }
1458
- const a = r.modules.find((f) => f.key === o.game), i = a == null ? void 0 : a.events.event;
1459
- if (!i)
1606
+ const a = n.modules.find((f) => f.key === i.game), o = a == null ? void 0 : a.events.event;
1607
+ if (!o)
1460
1608
  return;
1461
- const l = i(s);
1462
- if (l instanceof y.errors) {
1463
- q.getInstance().warn("Invalid event", "INVALID_EVENT", {
1464
- cause: l
1609
+ const l = o(s);
1610
+ if (l instanceof K.errors) {
1611
+ E.getInstance().warn("Invalid event", "INVALID_EVENT", {
1612
+ summary: l.summary
1465
1613
  });
1466
1614
  return;
1467
1615
  }
1468
- const h = $(a.key, l.type), g = $(a.key, "*"), p = t.get(h), d = t.get(g), m = [...Array.from(p ?? []), ...Array.from(d ?? [])];
1469
- m.length !== 0 && m.forEach((f) => {
1616
+ const d = M(a.key, l.type), h = M(a.key, "*"), g = e.get(d), u = e.get(h), p = [...Array.from(g ?? []), ...Array.from(u ?? [])];
1617
+ p.length !== 0 && p.forEach((f) => {
1470
1618
  f(l);
1471
1619
  });
1472
1620
  }
1473
- return e.on("data", (s) => s.forEach(n)), e;
1621
+ return t.on("data", (s) => s.forEach(r)), t.on("error", (s) => {
1622
+ E.getInstance().error("Pipe server error", "PIPE_SERVER_ERROR", {
1623
+ error: s
1624
+ });
1625
+ }), t;
1474
1626
  }
1475
- function Tn(r) {
1476
- const t = new Pn(r), e = {};
1477
- for (const s in r)
1478
- e[s] = {
1479
- on: (o, a) => {
1480
- switch (o) {
1627
+ function En(n) {
1628
+ const e = new dn(n), t = {};
1629
+ for (const s in n)
1630
+ t[s] = {
1631
+ on: (i, a) => {
1632
+ switch (i) {
1481
1633
  case "down":
1482
- t.onHotkeyDown(s, a);
1634
+ e.onKeybindDown(s, a);
1483
1635
  break;
1484
1636
  case "up":
1485
- t.onHotkeyUp(s, a);
1637
+ e.onKeybindUp(s, a);
1486
1638
  break;
1487
1639
  case "toggle":
1488
- t.onHotkeyToggled(s, a);
1640
+ e.onKeybindToggled(s, a);
1489
1641
  break;
1490
1642
  default:
1491
- throw new Error("Not implemented", { cause: [o, a] });
1643
+ throw new Error(`Event type not implemented ${i}`, { cause: [i, a] });
1492
1644
  }
1493
1645
  }
1494
1646
  };
1495
- return {
1496
- ...e,
1497
- toggleRecording: (s) => {
1498
- s === void 0 ? t.isRecording = !t.isRecording : t.isRecording = s;
1647
+ const r = {
1648
+ ...t,
1649
+ getConfig: () => e.getConfig(),
1650
+ pauseKeybindListening: () => {
1651
+ e.keybindListeningPaused = !0;
1652
+ },
1653
+ resumeKeybindListening: () => {
1654
+ e.keybindListeningPaused = !1;
1655
+ },
1656
+ updateKeybind: (s, i) => {
1657
+ e.updateKeybind(s, i);
1658
+ },
1659
+ updateKeybinds: (s) => {
1660
+ e.updateKeybinds(s);
1499
1661
  }
1500
1662
  };
1663
+ return e.init(), Pe.on("quit", () => {
1664
+ e.destroy();
1665
+ }), r;
1501
1666
  }
1502
- function Dn() {
1667
+ function In() {
1503
1668
  return {
1504
- createWindow: b("newWindow"),
1505
- on: b("on"),
1506
- off: b("off"),
1507
- once: b("once"),
1508
- addListener: b("addListener"),
1509
- prependListener: b("prependListener"),
1510
- prependOnceListener: b("prependOnceListener"),
1511
- removeListener: b("removeListener"),
1512
- removeAllListeners: b("removeAllListeners"),
1669
+ createWindow: (n) => y().instance.newWindowInternal(Ze.BrowserWindow, n),
1670
+ on: (n, e) => y().instance.on(n, e),
1671
+ off: (n, e) => y().instance.off(n, e),
1672
+ once: (n, e) => y().instance.once(n, e),
1673
+ addListener: (n, e) => y().instance.addListener(n, e),
1674
+ removeListener: (n, e) => y().instance.removeListener(n, e),
1675
+ removeAllListeners: () => y().instance.removeAllListeners(),
1676
+ prependListener: (n, e) => y().instance.prependListener(n, e),
1677
+ prependOnceListener: (n, e) => y().instance.prependOnceListener(n, e),
1513
1678
  getActiveGameInfo: () => {
1514
- const r = Ue(), t = $e.getInstance();
1679
+ const n = y(), e = le.getInstance();
1515
1680
  return {
1516
- resolution: r.resolution,
1517
- isConnected: t.hasConnection
1681
+ resolution: n.resolution,
1682
+ isConnected: e.hasConnection
1518
1683
  };
1519
1684
  }
1520
1685
  };
1521
1686
  }
1522
- function On() {
1687
+ function wn() {
1523
1688
  return {
1524
- scope: (r) => Mn.getInstance().scope(r),
1689
+ scope: (n) => gn.getInstance().scope(n),
1525
1690
  raw: {
1526
- setGlobalMouseBlock: b("setGlobalMouseBlock"),
1527
- setGlobalKeyboardBlock: b("setGlobalKeyboardBlock"),
1528
- setGlobalCursorOverride: b("setGlobalCursorOverride"),
1529
- setKeyInputBlock: b("setKeyInputBlock"),
1530
- getGlobalMouseBlock: b("getGlobalMouseBlock"),
1531
- getGlobalKeyboardBlock: b("getGlobalKeyboardBlock"),
1532
- getGlobalCursorOverride: b("getGlobalCursorOverride"),
1533
- getKeyInputBlock: b("getKeyInputBlock")
1691
+ setGlobalMouseBlock: (n) => y().instance.setGlobalMouseBlock(n),
1692
+ setGlobalKeyboardBlock: (n) => y().instance.setGlobalKeyboardBlock(n),
1693
+ setGlobalCursorOverride: (n) => y().instance.setGlobalCursorOverride(n),
1694
+ setKeyInputBlock: (n, e) => y().instance.setKeyInputBlock(n, e),
1695
+ getGlobalMouseBlock: () => y().instance.getGlobalMouseBlock(),
1696
+ getGlobalKeyboardBlock: () => y().instance.getGlobalKeyboardBlock(),
1697
+ getGlobalCursorOverride: () => y().instance.getGlobalCursorOverride(),
1698
+ getKeyInputBlock: (n) => y().instance.getKeyInputBlock(n)
1534
1699
  }
1535
1700
  };
1536
1701
  }
1537
- function Ue() {
1538
- return F.getInstance().getInterface("SCC_RAINBOW");
1539
- }
1540
- function b(r) {
1541
- return (...t) => {
1542
- const n = Ue().instance[r];
1543
- return n(...t);
1544
- };
1702
+ function _n(n) {
1703
+ P.getInstance().clientId = n.appName, P.getInstance().userId = Qt.generateUniqueIdentifier(), E.getInstance().on("fatal", (e) => {
1704
+ P.getInstance().track("fatal", {
1705
+ message: e.message,
1706
+ code: e.code,
1707
+ data: e.data
1708
+ });
1709
+ }), E.getInstance().on("error", (e) => {
1710
+ P.getInstance().track("error", {
1711
+ message: e.message,
1712
+ code: e.code,
1713
+ data: e.data
1714
+ });
1715
+ }), E.getInstance().on("warning", (e) => {
1716
+ P.getInstance().track("warning", {
1717
+ message: e.message,
1718
+ code: e.code,
1719
+ data: e.data
1720
+ });
1721
+ });
1545
1722
  }
1546
- const ze = "00000000-0000-0000-0000-000000000000", me = y(`string.uuid | '${ze}'`), Ve = ["intro", "planning", "prep", "action", "results", "invalid"], qe = y("===", ...Ve), We = [0, 1], te = y("===", ...We), Xe = ["attacker", "defender", "both", "invalid"], K = y("===", ...Xe), Ye = ["normal", "overhealed", "low_health", "downed", "dead", "respawning"], ne = y("===", ...Ye), Je = [
1547
- "bullet",
1548
- "melee",
1549
- "explosive",
1550
- "falling",
1551
- "regeneration",
1552
- "unknown",
1553
- "debris",
1554
- "projectile",
1555
- "downed",
1556
- "gas",
1557
- "thermal_explosion",
1558
- "melee_gadget",
1559
- "barbed_wire",
1560
- "electric",
1561
- "reinforcement",
1562
- "frag",
1563
- "paralyzed",
1564
- "emp",
1565
- "break",
1566
- "cleanup",
1567
- "interrogation",
1568
- "melee-finisher",
1569
- "toxic",
1570
- "toxic-explosion",
1571
- "pneumatic",
1572
- "body-contact",
1573
- "contact-explosion",
1574
- "flash",
1575
- "parasite-spike",
1576
- "laser",
1577
- "concussion",
1578
- "blowtorch",
1579
- "taser-shield",
1580
- "reverse-friendly-fire",
1581
- "self-destroyed",
1582
- "area-control",
1583
- "fire",
1584
- "breach-kick",
1585
- "break-wall",
1586
- "blade-mine",
1587
- "invalid"
1588
- ], Qe = y("===", ...Je), Ze = ["unknown", "enemy", "friendly", "invalid"], et = y("===", ...Ze), u = Ae.and({
1589
- game: "'siege'"
1590
- }), Ln = u.and({
1591
- type: "'local_player'",
1592
- content: {
1593
- profile_id: me
1594
- }
1595
- }), S = y({
1596
- id: "number",
1597
- value: "string"
1598
- }), tt = y({
1599
- kills: "number",
1600
- deaths: "number",
1601
- assists: "number",
1602
- plants: "number",
1603
- score: "number"
1604
- }), Fn = y({
1605
- instigator_player_id: "number",
1606
- receiver_player_id: "number",
1607
- damage_amount: "number",
1608
- remaining_health: "number",
1609
- pre_damage_health: "number",
1610
- max_health: "number",
1611
- damage_type: Qe,
1612
- damage_team_type: et,
1613
- damage_item_id: "number | null",
1614
- damage_time: "number"
1615
- }), nt = y({
1616
- index: "number",
1617
- rounds_until_next_segment: "number",
1618
- segment_size: "number",
1619
- segment_index: "number",
1620
- team_0: {
1621
- role: K,
1622
- state: "number"
1623
- },
1624
- team_1: {
1625
- role: K,
1626
- state: "number"
1627
- }
1628
- }), rt = y({
1629
- id: "number",
1630
- name: S,
1631
- time_of_day: S
1632
- }), Bn = y({
1633
- player_id: "number",
1634
- final_health: "number",
1635
- final_life_state: ne,
1636
- operator_name: S.or(y.null)
1637
- }), Gn = y({
1638
- round_data: nt,
1639
- damage_events: Fn.array(),
1640
- players: Bn.array()
1641
- }), Hn = u.and({
1642
- type: "'match_started'",
1643
- content: {
1644
- game_mode: "string",
1645
- game_type: S,
1646
- match_type: "string",
1647
- match_id: "string",
1648
- map: rt,
1649
- is_round_based: "boolean",
1650
- current_round_index: "number",
1651
- rounds: nt.array()
1652
- }
1653
- }), Nn = u.and({
1654
- type: "'module_loaded'"
1655
- }), jn = u.and({
1656
- type: "'module_unloaded'"
1657
- }), Un = u.and({
1658
- type: "'started_queuing'",
1659
- content: {
1660
- game_mode: "string",
1661
- game_type: S,
1662
- match_type: "string"
1663
- }
1664
- }), zn = u.and({
1665
- type: "'stopped_queuing'"
1666
- }), Vn = u.and({
1667
- type: "'unsupported_game_version'",
1668
- content: {
1669
- hash: "string | null",
1670
- version: "string | null"
1671
- }
1672
- }), qn = u.and({
1673
- type: "'match_ended'"
1674
- }), Wn = u.and({
1675
- type: "'map_changed'",
1676
- content: {
1677
- map: rt
1678
- }
1679
- }), Xn = u.and({
1680
- type: "'operator_banned'",
1681
- content: {
1682
- index: "number",
1683
- team: te,
1684
- side: K,
1685
- operator_name: S.or("null")
1686
- }
1687
- }), Yn = u.and({
1688
- type: "'round_ended'",
1689
- content: Gn
1690
- }), Jn = u.and({
1691
- type: "'phase_changed'",
1692
- content: {
1693
- phase: qe
1694
- }
1695
- }), Qn = u.and({
1696
- type: "'player_joined'",
1697
- content: {
1698
- player_id: "number",
1699
- profile_id: me,
1700
- is_bot: "boolean",
1701
- is_enemy: "boolean",
1702
- is_squad_member: "boolean",
1703
- is_local_player: "boolean",
1704
- username: "string",
1705
- side: K,
1706
- team: te,
1707
- is_privacy_username: "boolean",
1708
- has_avatar_hidden: "boolean",
1709
- has_commend_streak: "boolean",
1710
- ping_id: "number",
1711
- match_stats: tt,
1712
- life_state: ne,
1713
- ping: "number"
1714
- }
1715
- }).pipe((r) => ({
1716
- ...r,
1717
- content: {
1718
- ...r.content,
1719
- starting_side: r.content.side
1720
- }
1721
- })), Zn = u.and({
1722
- type: "'player_left'",
1723
- content: {
1724
- player_id: "number"
1725
- }
1726
- }), er = u.and({
1727
- type: "'player_operator_changed'",
1728
- content: {
1729
- player_id: "number",
1730
- operator_name: S.or(y.null)
1731
- }
1732
- }), tr = u.and({
1733
- type: "'player_location_changed'",
1734
- content: {
1735
- player_id: "number",
1736
- location_name: "string"
1737
- }
1738
- }), nr = u.and({
1739
- type: "'player_side_changed'",
1740
- content: {
1741
- player_id: "number",
1742
- side: K
1743
- }
1744
- }), rr = u.and({
1745
- type: "'player_stats_changed'",
1746
- content: {
1747
- player_id: "number",
1748
- match_stats: tt
1749
- }
1750
- }), sr = u.and({
1751
- type: "'player_ping_updated'",
1752
- content: {
1753
- player_id: "number",
1754
- ping: "number"
1755
- }
1756
- }), ar = u.and({
1757
- type: "'defuser_planted'",
1758
- content: {
1759
- player_id: "number"
1760
- }
1761
- }), or = u.and({
1762
- type: "'defuser_sabotaged'",
1763
- content: {
1764
- player_id: "number"
1765
- }
1766
- }), ir = u.and({
1767
- type: "'defuser_picked_up'",
1768
- content: {
1769
- player_id: "number",
1770
- initial: "boolean"
1771
- }
1772
- }), lr = u.and({
1773
- type: "'defuser_dropped'",
1774
- content: {
1775
- player_id: "number"
1776
- }
1777
- }), cr = u.and({
1778
- type: "'player_life_state_changed'",
1779
- content: {
1780
- player_id: "number",
1781
- life_state: ne
1782
- }
1783
- }), dr = u.and({
1784
- type: "'player_died'",
1785
- content: {
1786
- player_id: "number",
1787
- instigator_player_id: "number"
1788
- }
1789
- }), ur = u.and({
1790
- type: "'player_downed'",
1791
- content: {
1792
- player_id: "number",
1793
- instigator_player_id: "number"
1794
- }
1795
- }), hr = u.and({
1796
- type: "'player_ping_id_changed'",
1797
- content: {
1798
- player_id: "number",
1799
- ping_id: "number"
1800
- }
1801
- }), gr = u.and({
1802
- type: "'player_team_changed'",
1803
- content: {
1804
- player_id: "number",
1805
- team: te
1806
- }
1807
- }), pr = ct({
1808
- "#event1": "module_loaded | module_unloaded | unsupported_game_version | local_player | started_queuing | stopped_queuing | match_started | match_ended | map_changed | operator_banned | round_ended | phase_changed | player_joined | player_left | player_operator_changed | player_location_changed | player_side_changed | player_stats_changed",
1809
- "#event2": "player_life_state_changed | player_died | player_downed | player_ping_id_changed | player_team_changed | defuser_planted | defuser_sabotaged | defuser_picked_up | defuser_dropped | player_ping_updated",
1810
- event: "event1 | event2",
1811
- module_loaded: Nn,
1812
- module_unloaded: jn,
1813
- unsupported_game_version: Vn,
1814
- local_player: Ln,
1815
- started_queuing: Un,
1816
- stopped_queuing: zn,
1817
- match_started: Hn,
1818
- match_ended: qn,
1819
- map_changed: Wn,
1820
- operator_banned: Xn,
1821
- round_ended: Yn,
1822
- phase_changed: Jn,
1823
- player_joined: Qn,
1824
- player_left: Zn,
1825
- player_operator_changed: er,
1826
- player_location_changed: tr,
1827
- player_side_changed: nr,
1828
- player_stats_changed: rr,
1829
- defuser_planted: ar,
1830
- defuser_sabotaged: or,
1831
- defuser_picked_up: ir,
1832
- defuser_dropped: lr,
1833
- player_ping_updated: sr,
1834
- player_life_state_changed: cr,
1835
- player_died: dr,
1836
- player_downed: ur,
1837
- player_ping_id_changed: hr,
1838
- player_team_changed: gr
1839
- }).export();
1840
- function fr() {
1841
- return {
1842
- key: "siege",
1843
- events: pr
1844
- };
1723
+ function y() {
1724
+ return O.getInstance().getInterface("OGG_SIEGE");
1845
1725
  }
1846
- const Ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1847
- __proto__: null,
1848
- BOT_ID: ze,
1849
- DAMAGE_TEAM_TYPES: Ze,
1850
- DAMAGE_TYPES: Je,
1851
- DamageTeamTypeSchema: et,
1852
- DamageTypeSchema: Qe,
1853
- GAME_MODE_PHASES: Ve,
1854
- GameModePhaseSchema: qe,
1855
- PLAYER_LIFE_STATES: Ye,
1856
- PlayerLifeStateSchema: ne,
1857
- ProfileId: me,
1858
- SIDES: Xe,
1859
- SideSchema: K,
1860
- TEAMS: We,
1861
- TeamSchema: te,
1862
- module: fr
1863
- }, Symbol.toStringTag, { value: "Module" }));
1864
1726
  export {
1865
- Ur as Siege,
1866
- jr as overlayed
1727
+ Jn as overlayed
1867
1728
  };