@gamebob/axon-surge 0.18.0 → 0.19.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.
@@ -49,7 +49,7 @@ class st {
49
49
  this.lastTime = t, this.nextFrameTime += e, this.nextFrameTime < t - e && (this.nextFrameTime = t + e), this.updateCallback(i), this.renderCallback(), this.animationFrameId = requestAnimationFrame(this.tick);
50
50
  }
51
51
  }
52
- const X = {
52
+ const z = {
53
53
  core: {
54
54
  maxIntegrity: 3,
55
55
  invulnerabilityDuration: 1.5,
@@ -124,14 +124,14 @@ const X = {
124
124
  shockwaveMergeDistance: 120
125
125
  }
126
126
  };
127
- class N {
127
+ class k {
128
128
  static instance;
129
129
  config;
130
130
  constructor() {
131
- this.config = JSON.parse(JSON.stringify(X));
131
+ this.config = JSON.parse(JSON.stringify(z));
132
132
  }
133
133
  static getInstance() {
134
- return N.instance || (N.instance = new N()), N.instance;
134
+ return k.instance || (k.instance = new k()), k.instance;
135
135
  }
136
136
  getConfig() {
137
137
  return this.config;
@@ -149,7 +149,7 @@ class N {
149
149
  this.config.core.maxIntegrity += t;
150
150
  }
151
151
  resetToDefault() {
152
- this.config = JSON.parse(JSON.stringify(X));
152
+ this.config = JSON.parse(JSON.stringify(z));
153
153
  }
154
154
  }
155
155
  class at {
@@ -216,7 +216,7 @@ const J = {
216
216
  canBeChainReactionTarget: !0,
217
217
  synergyKey: (p) => p.color
218
218
  };
219
- class F {
219
+ class V {
220
220
  id;
221
221
  position = { x: 0, y: 0 };
222
222
  velocity = { x: 0, y: 0 };
@@ -480,7 +480,7 @@ class rt {
480
480
  };
481
481
  }
482
482
  }
483
- const G = {
483
+ const H = {
484
484
  es: {
485
485
  title: "AXON SURGE",
486
486
  startButton: "INICIAR ENLACE",
@@ -1345,7 +1345,7 @@ const G = {
1345
1345
  "ko",
1346
1346
  "zh"
1347
1347
  ];
1348
- function B(p) {
1348
+ function K(p) {
1349
1349
  return tt.includes(p);
1350
1350
  }
1351
1351
  const q = "axon_surge_language";
@@ -1357,17 +1357,17 @@ class ct {
1357
1357
  detectLanguage(t) {
1358
1358
  try {
1359
1359
  const e = localStorage.getItem(q);
1360
- if (e && B(e))
1360
+ if (e && K(e))
1361
1361
  return e;
1362
1362
  } catch {
1363
1363
  }
1364
- if (t && B(t))
1364
+ if (t && K(t))
1365
1365
  return t;
1366
1366
  try {
1367
1367
  const e = (document.documentElement.lang || document.body?.getAttribute("lang") || document.documentElement.getAttribute("data-lang") || "").toLowerCase();
1368
1368
  if (e) {
1369
1369
  const i = e.split("-")[0];
1370
- if (i && B(i))
1370
+ if (i && K(i))
1371
1371
  return i;
1372
1372
  }
1373
1373
  } catch {
@@ -1376,7 +1376,7 @@ class ct {
1376
1376
  const e = (navigator.language || navigator.languages && navigator.languages[0] || "").toLowerCase();
1377
1377
  if (e) {
1378
1378
  const i = e.split("-")[0];
1379
- if (i && B(i))
1379
+ if (i && K(i))
1380
1380
  return i;
1381
1381
  }
1382
1382
  } catch {
@@ -1384,7 +1384,7 @@ class ct {
1384
1384
  return "en";
1385
1385
  }
1386
1386
  setLanguage(t) {
1387
- if (G[t]) {
1387
+ if (H[t]) {
1388
1388
  this.currentLanguage = t;
1389
1389
  try {
1390
1390
  localStorage.setItem(q, t);
@@ -1396,13 +1396,13 @@ class ct {
1396
1396
  return this.currentLanguage;
1397
1397
  }
1398
1398
  translate(t, e) {
1399
- let s = (G[this.currentLanguage] || G.en)[t] || G.en[t] || String(t);
1399
+ let s = (H[this.currentLanguage] || H.en)[t] || H.en[t] || String(t);
1400
1400
  return e && Object.entries(e).forEach(([a, n]) => {
1401
1401
  s = s.replace(`{${a}}`, String(n));
1402
1402
  }), s;
1403
1403
  }
1404
1404
  }
1405
- class V {
1405
+ class Y {
1406
1406
  static killEnemy(t, e, i) {
1407
1407
  !t.active || t.isDying || (t.experienceDropPending = !0, i.shockwaves.push({
1408
1408
  id: Math.random().toString(),
@@ -1449,7 +1449,7 @@ class lt {
1449
1449
  }
1450
1450
  }
1451
1451
  }
1452
- const E = {
1452
+ const x = {
1453
1453
  piercer: "#ff2a5f",
1454
1454
  spore: "#39ff14",
1455
1455
  cluster: "#ffd700",
@@ -1476,21 +1476,21 @@ class ht {
1476
1476
  position: { ...t.position },
1477
1477
  radius: 20,
1478
1478
  maxRadius: Math.max(c, l) * 1.3,
1479
- color: E.core,
1479
+ color: x.core,
1480
1480
  alpha: 1,
1481
1481
  lifetime: 0,
1482
1482
  maxLifetime: 0.8
1483
1483
  }), n.triggerScreenShake({ x: d, y: g }, 25), n.triggerHitstop(0.15), n.triggerFlash(0.6);
1484
- for (const _ of e)
1485
- if (_.active && !_.isGrabbed && _.launchDelay <= 0) {
1486
- _.triggerDissolveDeath();
1487
- for (let x = 0; x < 8; x++) {
1488
- const y = Math.random() * Math.PI * 2, m = 100 + Math.random() * 200;
1484
+ for (const m of e)
1485
+ if (m.active && !m.isGrabbed && m.launchDelay <= 0) {
1486
+ m.triggerDissolveDeath();
1487
+ for (let v = 0; v < 8; v++) {
1488
+ const b = Math.random() * Math.PI * 2, f = 100 + Math.random() * 200;
1489
1489
  s.push({
1490
1490
  id: Math.random().toString(),
1491
- position: { ..._.position },
1492
- velocity: { x: Math.cos(y) * m, y: Math.sin(y) * m },
1493
- color: E.core,
1491
+ position: { ...m.position },
1492
+ velocity: { x: Math.cos(b) * f, y: Math.sin(b) * f },
1493
+ color: x.core,
1494
1494
  radius: 3 + Math.random() * 3,
1495
1495
  alpha: 1,
1496
1496
  lifetime: 0,
@@ -1503,7 +1503,7 @@ class ht {
1503
1503
  text: "CORE OVERLOAD PULSE!",
1504
1504
  position: { ...t.position },
1505
1505
  velocity: { x: 0, y: -90 },
1506
- color: E.core,
1506
+ color: x.core,
1507
1507
  alpha: 1,
1508
1508
  lifetime: 0,
1509
1509
  maxLifetime: 1.5,
@@ -1524,27 +1524,27 @@ class ht {
1524
1524
  if (h <= 0 || u <= 0) return !1;
1525
1525
  const d = t.getHitboxRadius() + e.radius;
1526
1526
  if (Math.max(0, l - d) / u > o.fragmentDeflectionLookahead) return !1;
1527
- const f = Math.random() * Math.PI * 2, _ = Math.max(o.fragmentDeflectionSpeed, h * 1.08);
1527
+ const _ = Math.random() * Math.PI * 2, m = Math.max(o.fragmentDeflectionSpeed, h * 1.08);
1528
1528
  e.velocity = {
1529
- x: Math.cos(f) * _,
1530
- y: Math.sin(f) * _
1531
- }, e.rotation = f, e.psionicDeflectionCooldown = o.fragmentDeflectionCooldown, e.psionicDeflectionTimer = 0.24, i.push({
1529
+ x: Math.cos(_) * m,
1530
+ y: Math.sin(_) * m
1531
+ }, e.rotation = _, e.psionicDeflectionCooldown = o.fragmentDeflectionCooldown, e.psionicDeflectionTimer = 0.24, i.push({
1532
1532
  id: Math.random().toString(),
1533
1533
  position: { ...e.position },
1534
1534
  radius: 4,
1535
1535
  maxRadius: 52,
1536
- color: E.coreAccent,
1536
+ color: x.coreAccent,
1537
1537
  alpha: 0.9,
1538
1538
  lifetime: 0,
1539
1539
  maxLifetime: 0.24
1540
1540
  });
1541
- for (let x = 0; x < 6; x++) {
1542
- const y = f + Math.PI + (Math.random() - 0.5) * 1.2, m = 120 + Math.random() * 180;
1541
+ for (let v = 0; v < 6; v++) {
1542
+ const b = _ + Math.PI + (Math.random() - 0.5) * 1.2, f = 120 + Math.random() * 180;
1543
1543
  s.push({
1544
1544
  id: Math.random().toString(),
1545
1545
  position: { ...e.position },
1546
- velocity: { x: Math.cos(y) * m, y: Math.sin(y) * m },
1547
- color: E.coreAccent,
1546
+ velocity: { x: Math.cos(b) * f, y: Math.sin(b) * f },
1547
+ color: x.coreAccent,
1548
1548
  radius: 2 + Math.random() * 2,
1549
1549
  alpha: 1,
1550
1550
  lifetime: 0,
@@ -1555,9 +1555,9 @@ class ht {
1555
1555
  }
1556
1556
  }
1557
1557
  class ut {
1558
- static update(t, e, i, s, a, n, o, r, c, l, h, u, d, g, b, f) {
1559
- const _ = (m, v) => {
1560
- V.killEnemy(m, v, {
1558
+ static update(t, e, i, s, a, n, o, r, c, l, h, u, d, g, E, _) {
1559
+ const m = (f, y) => {
1560
+ Y.killEnemy(f, y, {
1561
1561
  enemies: t,
1562
1562
  pools: e,
1563
1563
  vortices: i,
@@ -1568,15 +1568,15 @@ class ut {
1568
1568
  juice: o,
1569
1569
  spatialHash: d,
1570
1570
  factory: g,
1571
- config: b,
1571
+ config: E,
1572
1572
  width: l,
1573
1573
  height: h,
1574
1574
  currentThrowState: u,
1575
- onKill: f ?? (() => {
1575
+ onKill: _ ?? (() => {
1576
1576
  }),
1577
- killEnemy: _
1577
+ killEnemy: m
1578
1578
  });
1579
- }, x = () => ({
1579
+ }, v = () => ({
1580
1580
  enemies: t,
1581
1581
  pools: e,
1582
1582
  vortices: i,
@@ -1587,33 +1587,33 @@ class ut {
1587
1587
  juice: o,
1588
1588
  spatialHash: d,
1589
1589
  factory: g,
1590
- config: b,
1590
+ config: E,
1591
1591
  width: l,
1592
1592
  height: h,
1593
1593
  currentThrowState: u,
1594
- onKill: f ?? (() => {
1594
+ onKill: _ ?? (() => {
1595
1595
  }),
1596
- killEnemy: _
1596
+ killEnemy: m
1597
1597
  });
1598
- let y = !1;
1599
- for (const m of t.slice())
1600
- if (!(!m.active || !m.isThrown || m.isDying || m.launchDelay > 0)) {
1601
- if (y = !0, m.position.x < -120 || m.position.x > l + 120 || m.position.y < -120 || m.position.y > h + 120) {
1602
- m.behavior.onOutOfBounds?.(m, x()), m.active = !1, m.isThrown = !1;
1598
+ let b = !1;
1599
+ for (const f of t.slice())
1600
+ if (!(!f.active || !f.isThrown || f.isDying || f.launchDelay > 0)) {
1601
+ if (b = !0, f.position.x < -120 || f.position.x > l + 120 || f.position.y < -120 || f.position.y > h + 120) {
1602
+ f.behavior.onOutOfBounds?.(f, v()), f.active = !1, f.isThrown = !1;
1603
1603
  continue;
1604
1604
  }
1605
- for (const v of d.getNearby(m.position, m.getHitRadius() + 80)) {
1606
- if (v === m || !v.active || v.isGrabbed || v.isDying || v.launchDelay > 0 || v.isStationaryShield) continue;
1607
- const A = v.position.x - m.position.x, S = v.position.y - m.position.y, L = m.getHitRadius() + v.getHitRadius();
1608
- if (A * A + S * S > L * L) continue;
1609
- u.pos = { x: m.position.x, y: m.position.y };
1610
- const T = Math.atan2(m.velocity.y, m.velocity.x), I = { ...x(), thrownEnemy: m, targetEnemy: v, impactAngle: T };
1611
- if (m.behavior.onCollision?.(I) ?? !1)
1605
+ for (const y of d.getNearby(f.position, f.getHitRadius() + 80)) {
1606
+ if (y === f || !y.active || y.isGrabbed || y.isDying || y.launchDelay > 0 || y.isStationaryShield) continue;
1607
+ const A = y.position.x - f.position.x, M = y.position.y - f.position.y, T = f.getHitRadius() + y.getHitRadius();
1608
+ if (A * A + M * M > T * T) continue;
1609
+ u.pos = { x: f.position.x, y: f.position.y };
1610
+ const R = Math.atan2(f.velocity.y, f.velocity.x), S = { ...v(), thrownEnemy: f, targetEnemy: y, impactAngle: R };
1611
+ if (f.behavior.onCollision?.(S) ?? !1)
1612
1612
  break;
1613
- if (m.strategy) {
1614
- m.strategy.execute({
1615
- thrownEnemy: m,
1616
- targetEnemy: v,
1613
+ if (f.strategy) {
1614
+ f.strategy.execute({
1615
+ thrownEnemy: f,
1616
+ targetEnemy: y,
1617
1617
  allEnemies: t,
1618
1618
  pools: e,
1619
1619
  vortices: i,
@@ -1624,49 +1624,49 @@ class ut {
1624
1624
  width: l,
1625
1625
  height: h,
1626
1626
  factory: g,
1627
- config: b
1628
- }), m.active && !m.isDying && m.triggerDissolveDeath(!0), v.active && !v.isDying && v.triggerDissolveDeath(!0), u.kills += 2, f?.();
1627
+ config: E
1628
+ }), f.active && !f.isDying && f.triggerDissolveDeath(!0), y.active && !y.isDying && y.triggerDissolveDeath(!0), u.kills += 2, _?.();
1629
1629
  break;
1630
1630
  }
1631
- const $ = m.synergyKey === v.synergyKey, Z = $ ? 360 : 250;
1631
+ const O = f.synergyKey === y.synergyKey, G = O ? 360 : 250;
1632
1632
  s.push({
1633
1633
  id: Math.random().toString(),
1634
1634
  position: { ...u.pos },
1635
1635
  radius: 15,
1636
- maxRadius: Z,
1637
- color: m.color,
1636
+ maxRadius: G,
1637
+ color: f.color,
1638
1638
  alpha: 1,
1639
1639
  lifetime: 0,
1640
1640
  maxLifetime: 0.55
1641
1641
  });
1642
- for (let C = 0; C < 45; C++) {
1643
- const H = Math.random() * Math.PI * 2, z = 200 + Math.random() * 450;
1642
+ for (let P = 0; P < 45; P++) {
1643
+ const F = Math.random() * Math.PI * 2, X = 200 + Math.random() * 450;
1644
1644
  a.push({
1645
1645
  id: Math.random().toString(),
1646
1646
  position: { ...u.pos },
1647
- velocity: { x: Math.cos(H) * z, y: Math.sin(H) * z },
1648
- color: m.color,
1647
+ velocity: { x: Math.cos(F) * X, y: Math.sin(F) * X },
1648
+ color: f.color,
1649
1649
  radius: 4 + Math.random() * 6,
1650
1650
  alpha: 1,
1651
1651
  lifetime: 0,
1652
1652
  maxLifetime: 0.7
1653
1653
  });
1654
1654
  }
1655
- $ ? (u.kills += 2, o.triggerHitstop(0.14), o.triggerFlash(0.5), o.triggerScreenShake({ x: A, y: S }, 16), _(m, T), _(v, T)) : (u.kills += 2, o.triggerHitstop(0.08), o.triggerFlash(0.35), o.triggerScreenShake({ x: A, y: S }, 10), _(m, T), _(v, T));
1656
- for (const C of t.slice()) {
1657
- if (C === m || C === v || !C.active || C.isGrabbed || C.isDying) continue;
1658
- Math.hypot(C.position.x - u.pos.x, C.position.y - u.pos.y) <= Z && C.behavior.canBeChainReactionTarget && (_(C, T), u.kills++);
1655
+ O ? (u.kills += 2, o.triggerHitstop(0.14), o.triggerFlash(0.5), o.triggerScreenShake({ x: A, y: M }, 16), m(f, R), m(y, R)) : (u.kills += 2, o.triggerHitstop(0.08), o.triggerFlash(0.35), o.triggerScreenShake({ x: A, y: M }, 10), m(f, R), m(y, R));
1656
+ for (const P of t.slice()) {
1657
+ if (P === f || P === y || !P.active || P.isGrabbed || P.isDying) continue;
1658
+ Math.hypot(P.position.x - u.pos.x, P.position.y - u.pos.y) <= G && P.behavior.canBeChainReactionTarget && (m(P, R), u.kills++);
1659
1659
  }
1660
- f?.();
1660
+ _?.();
1661
1661
  break;
1662
1662
  }
1663
1663
  }
1664
- c.value = u.kills, !y && u.kills > 0 && (u.kills >= 2 && u.pos && n.push({
1664
+ c.value = u.kills, !b && u.kills > 0 && (u.kills >= 2 && u.pos && n.push({
1665
1665
  id: Math.random().toString(),
1666
1666
  text: `MULTIKILL x${u.kills}!`,
1667
1667
  position: { ...u.pos },
1668
1668
  velocity: { x: 0, y: -90 },
1669
- color: E.coreAccent,
1669
+ color: x.coreAccent,
1670
1670
  alpha: 1,
1671
1671
  lifetime: 0,
1672
1672
  maxLifetime: 1.4,
@@ -1683,7 +1683,7 @@ class pt {
1683
1683
  for (const u of e.slice()) {
1684
1684
  if (!u.active || u.isGrabbed || u.isDying || u.launchDelay > 0 || u.isThrown && u.behavior.canInteractWithHazard?.(u, "toxic-pool") === !1) continue;
1685
1685
  const d = u.position.x - h.position.x, g = u.position.y - h.position.y;
1686
- d * d + g * g <= h.radius * h.radius && (V.killEnemy(u, 0, r), o.kills++, c && c());
1686
+ d * d + g * g <= h.radius * h.radius && (Y.killEnemy(u, 0, r), o.kills++, c && c());
1687
1687
  }
1688
1688
  h.duration >= h.maxDuration && t.splice(l, 1);
1689
1689
  }
@@ -1691,22 +1691,22 @@ class pt {
1691
1691
  }
1692
1692
  }
1693
1693
  class dt {
1694
- static update(t, e, i, s, a, n, o, r, c, l, h, u, d, g, b) {
1695
- const f = g.shield.protectionArc;
1696
- for (const _ of t.slice())
1697
- if (!(!_.active || !_.isStationaryShield || _.isDying))
1698
- for (const x of u.getNearby(_.position, _.getHitRadius() + 80)) {
1699
- if (x === _ || !x.active || x.isGrabbed || x.isDying || x.launchDelay > 0) continue;
1700
- const y = x.position.x - _.position.x, m = x.position.y - _.position.y;
1701
- let v = Math.atan2(m, y) - _.rotation;
1702
- for (; v < -Math.PI; ) v += Math.PI * 2;
1703
- for (; v > Math.PI; ) v -= Math.PI * 2;
1704
- if (Math.abs(v) > f / 2) continue;
1705
- const A = _.getHitRadius() + x.getHitRadius();
1706
- if (y * y + m * m <= A * A) {
1707
- _.isStationaryShield = !1, _.strategy && _.strategy.execute({
1708
- thrownEnemy: _,
1709
- targetEnemy: x,
1694
+ static update(t, e, i, s, a, n, o, r, c, l, h, u, d, g, E) {
1695
+ const _ = g.shield.protectionArc;
1696
+ for (const m of t.slice())
1697
+ if (!(!m.active || !m.isStationaryShield || m.isDying))
1698
+ for (const v of u.getNearby(m.position, m.getHitRadius() + 80)) {
1699
+ if (v === m || !v.active || v.isGrabbed || v.isDying || v.launchDelay > 0) continue;
1700
+ const b = v.position.x - m.position.x, f = v.position.y - m.position.y;
1701
+ let y = Math.atan2(f, b) - m.rotation;
1702
+ for (; y < -Math.PI; ) y += Math.PI * 2;
1703
+ for (; y > Math.PI; ) y -= Math.PI * 2;
1704
+ if (Math.abs(y) > _ / 2) continue;
1705
+ const A = m.getHitRadius() + v.getHitRadius();
1706
+ if (b * b + f * f <= A * A) {
1707
+ m.isStationaryShield = !1, m.strategy && m.strategy.execute({
1708
+ thrownEnemy: m,
1709
+ targetEnemy: v,
1710
1710
  allEnemies: t,
1711
1711
  pools: e,
1712
1712
  vortices: i,
@@ -1718,31 +1718,31 @@ class dt {
1718
1718
  height: h,
1719
1719
  factory: d,
1720
1720
  config: g
1721
- }), c.kills += 2, o.triggerHitstop(0.12), o.triggerScreenShake({ x: y, y: m }, 18), b && b();
1721
+ }), c.kills += 2, o.triggerHitstop(0.12), o.triggerScreenShake({ x: b, y: f }, 18), E && E();
1722
1722
  break;
1723
1723
  }
1724
1724
  }
1725
1725
  }
1726
1726
  }
1727
- class R {
1727
+ class C {
1728
1728
  static merge(t, e, i, s) {
1729
- R.mergeToxicPools(t, s.toxicPoolMergePadding), R.mergeVortices(e, s.gravityVortexMergePadding), R.mergeShockwaves(i, s.shockwaveMergeDistance);
1729
+ C.mergeToxicPools(t, s.toxicPoolMergePadding), C.mergeVortices(e, s.gravityVortexMergePadding), C.mergeShockwaves(i, s.shockwaveMergeDistance);
1730
1730
  }
1731
1731
  static mergeToxicPools(t, e) {
1732
- R.mergeNearby(t, (i, s) => R.distance(i.position.x, i.position.y, s.position.x, s.position.y) <= i.radius + s.radius + e, (i, s) => {
1732
+ C.mergeNearby(t, (i, s) => C.distance(i.position.x, i.position.y, s.position.x, s.position.y) <= i.radius + s.radius + e, (i, s) => {
1733
1733
  const a = Math.max(0, i.maxDuration - i.duration), n = Math.max(0, s.maxDuration - s.duration);
1734
- R.mergePositionByArea(i, s), i.radius = Math.hypot(i.radius, s.radius), i.duration = 0, i.maxDuration = Math.max(a, n), i.damage += s.damage, i.sourceCount = R.sourceCount(i) + R.sourceCount(s);
1734
+ C.mergePositionByArea(i, s), i.radius = Math.hypot(i.radius, s.radius), i.duration = 0, i.maxDuration = Math.max(a, n), i.damage += s.damage, i.sourceCount = C.sourceCount(i) + C.sourceCount(s);
1735
1735
  });
1736
1736
  }
1737
1737
  static mergeVortices(t, e) {
1738
- R.mergeNearby(t, (i, s) => R.distance(i.position.x, i.position.y, s.position.x, s.position.y) <= i.radius + s.radius + e, (i, s) => {
1738
+ C.mergeNearby(t, (i, s) => C.distance(i.position.x, i.position.y, s.position.x, s.position.y) <= i.radius + s.radius + e, (i, s) => {
1739
1739
  const a = Math.max(0, i.maxDuration - i.duration), n = Math.max(0, s.maxDuration - s.duration);
1740
- R.mergePositionByArea(i, s), i.radius = Math.hypot(i.radius, s.radius), i.duration = 0, i.maxDuration = Math.max(a, n), i.pullForce += s.pullForce, i.sourceCount = R.sourceCount(i) + R.sourceCount(s);
1740
+ C.mergePositionByArea(i, s), i.radius = Math.hypot(i.radius, s.radius), i.duration = 0, i.maxDuration = Math.max(a, n), i.pullForce += s.pullForce, i.sourceCount = C.sourceCount(i) + C.sourceCount(s);
1741
1741
  });
1742
1742
  }
1743
1743
  static mergeShockwaves(t, e) {
1744
- R.mergeNearby(t, (i, s) => i.color !== s.color ? !1 : R.distance(i.position.x, i.position.y, s.position.x, s.position.y) <= e, (i, s) => {
1745
- const a = i.maxRadius > 0 ? i.radius / i.maxRadius : 0, n = s.maxRadius > 0 ? s.radius / s.maxRadius : 0, o = R.sourceCount(i), r = R.sourceCount(s);
1744
+ C.mergeNearby(t, (i, s) => i.color !== s.color ? !1 : C.distance(i.position.x, i.position.y, s.position.x, s.position.y) <= e, (i, s) => {
1745
+ const a = i.maxRadius > 0 ? i.radius / i.maxRadius : 0, n = s.maxRadius > 0 ? s.radius / s.maxRadius : 0, o = C.sourceCount(i), r = C.sourceCount(s);
1746
1746
  i.position = {
1747
1747
  x: (i.position.x * o + s.position.x * r) / (o + r),
1748
1748
  y: (i.position.y * o + s.position.y * r) / (o + r)
@@ -1782,10 +1782,10 @@ class gt {
1782
1782
  i18n;
1783
1783
  throwState = { kills: 0, pos: null };
1784
1784
  update(t, e, i, s, a, n, o, r, c, l, h, u, d, g) {
1785
- const b = this.configManager.getConfig();
1786
- let f;
1787
- const _ = (y, m) => V.killEnemy(y, m, f);
1788
- f = {
1785
+ const E = this.configManager.getConfig();
1786
+ let _;
1787
+ const m = (b, f) => Y.killEnemy(b, f, _);
1788
+ _ = {
1789
1789
  enemies: i,
1790
1790
  pools: s,
1791
1791
  vortices: a,
@@ -1796,47 +1796,47 @@ class gt {
1796
1796
  juice: c,
1797
1797
  spatialHash: this.spatialHash,
1798
1798
  factory: this.factory,
1799
- config: b,
1799
+ config: E,
1800
1800
  width: u,
1801
1801
  height: d,
1802
1802
  currentThrowState: this.throwState,
1803
1803
  onKill: g ?? (() => {
1804
1804
  }),
1805
- killEnemy: _
1805
+ killEnemy: m
1806
1806
  };
1807
- for (const y of i)
1808
- if (y.active && !y.isDying) {
1809
- if (y.behavior.onThrownUpdate?.(y, {
1807
+ for (const b of i)
1808
+ if (b.active && !b.isDying) {
1809
+ if (b.behavior.onThrownUpdate?.(b, {
1810
1810
  dt: t,
1811
1811
  enemies: i,
1812
- config: b
1813
- }), y.isStationaryShield) {
1814
- let m = null, v = 1 / 0;
1812
+ config: E
1813
+ }), b.isStationaryShield) {
1814
+ let f = null, y = 1 / 0;
1815
1815
  for (const A of i) {
1816
- if (A === y || !A.active || A.isGrabbed || A.isDying || A.isStationaryShield) continue;
1817
- const S = A.position.x - y.position.x, L = A.position.y - y.position.y, T = S * S + L * L;
1818
- T < v && (v = T, m = A);
1816
+ if (A === b || !A.active || A.isGrabbed || A.isDying || A.isStationaryShield) continue;
1817
+ const M = A.position.x - b.position.x, T = A.position.y - b.position.y, R = M * M + T * T;
1818
+ R < y && (y = R, f = A);
1819
1819
  }
1820
- if (m) {
1821
- let S = Math.atan2(m.position.y - y.position.y, m.position.x - y.position.x) - y.rotation;
1822
- for (; S < -Math.PI; ) S += Math.PI * 2;
1823
- for (; S > Math.PI; ) S -= Math.PI * 2;
1824
- const L = 5 * t;
1825
- y.rotation += Math.sign(S) * Math.min(Math.abs(S), L);
1820
+ if (f) {
1821
+ let M = Math.atan2(f.position.y - b.position.y, f.position.x - b.position.x) - b.rotation;
1822
+ for (; M < -Math.PI; ) M += Math.PI * 2;
1823
+ for (; M > Math.PI; ) M -= Math.PI * 2;
1824
+ const T = 5 * t;
1825
+ b.rotation += Math.sign(M) * Math.min(Math.abs(M), T);
1826
1826
  }
1827
1827
  }
1828
- y.update(t);
1829
- } else y.active && y.isDying && y.update(t);
1830
- for (let y = n.length - 1; y >= 0; y--) {
1831
- const m = n[y];
1832
- if (!m) continue;
1833
- m.lifetime += t;
1834
- const v = m.lifetime / m.maxLifetime;
1835
- m.radius = m.maxRadius * v, m.alpha = Math.max(0, 1 - v), m.lifetime >= m.maxLifetime && n.splice(y, 1);
1828
+ b.update(t);
1829
+ } else b.active && b.isDying && b.update(t);
1830
+ for (let b = n.length - 1; b >= 0; b--) {
1831
+ const f = n[b];
1832
+ if (!f) continue;
1833
+ f.lifetime += t;
1834
+ const y = f.lifetime / f.maxLifetime;
1835
+ f.radius = f.maxRadius * y, f.alpha = Math.max(0, 1 - y), f.lifetime >= f.maxLifetime && n.splice(b, 1);
1836
1836
  }
1837
- lt.update(a, i, t, b), this.spatialHash.clear();
1838
- for (const y of i)
1839
- y.active && !y.isDying && y.launchDelay <= 0 && this.spatialHash.insert(y);
1837
+ lt.update(a, i, t, E), this.spatialHash.clear();
1838
+ for (const b of i)
1839
+ b.active && !b.isDying && b.launchDelay <= 0 && this.spatialHash.insert(b);
1840
1840
  ht.update(
1841
1841
  e,
1842
1842
  i,
@@ -1848,7 +1848,7 @@ class gt {
1848
1848
  h,
1849
1849
  u,
1850
1850
  d,
1851
- b
1851
+ E
1852
1852
  ), ut.update(
1853
1853
  i,
1854
1854
  s,
@@ -1864,7 +1864,7 @@ class gt {
1864
1864
  this.throwState,
1865
1865
  this.spatialHash,
1866
1866
  this.factory,
1867
- b,
1867
+ E,
1868
1868
  g
1869
1869
  ), pt.update(
1870
1870
  s,
@@ -1874,7 +1874,7 @@ class gt {
1874
1874
  o,
1875
1875
  t,
1876
1876
  this.throwState,
1877
- f,
1877
+ _,
1878
1878
  g
1879
1879
  ), dt.update(
1880
1880
  i,
@@ -1890,18 +1890,18 @@ class gt {
1890
1890
  d,
1891
1891
  this.spatialHash,
1892
1892
  this.factory,
1893
- b,
1893
+ E,
1894
1894
  g
1895
- ), R.merge(s, a, n, b.effectAggregation);
1896
- const x = 32;
1897
- n.length > x && n.splice(0, n.length - x);
1895
+ ), C.merge(s, a, n, E.effectAggregation);
1896
+ const v = 32;
1897
+ n.length > v && n.splice(0, n.length - v);
1898
1898
  }
1899
1899
  }
1900
1900
  class mt {
1901
1901
  pool = [];
1902
1902
  constructor(t = 500) {
1903
1903
  for (let e = 0; e < t; e++) {
1904
- const i = new F(`pool_enemy_${e}`);
1904
+ const i = new V(`pool_enemy_${e}`);
1905
1905
  this.pool.push(i);
1906
1906
  }
1907
1907
  }
@@ -1909,7 +1909,7 @@ class mt {
1909
1909
  for (const e of this.pool)
1910
1910
  if (!e.active)
1911
1911
  return e.reset(), e;
1912
- const t = new F(`fallback_enemy_${Date.now()}_${Math.random()}`);
1912
+ const t = new V(`fallback_enemy_${Date.now()}_${Math.random()}`);
1913
1913
  return this.pool.push(t), t;
1914
1914
  }
1915
1915
  resetAll() {
@@ -1917,14 +1917,14 @@ class mt {
1917
1917
  t.reset();
1918
1918
  }
1919
1919
  }
1920
- class w {
1920
+ class D {
1921
1921
  static algorithms = {
1922
- circle: (t, e, i, s, a, n) => w.spawnCircleOfDeath(t, e, i, s, a, n),
1923
- dense: (t, e, i, s, a, n) => w.spawnDenseCluster(t, e, i, a, n, s),
1924
- sine: (t, e, i, s, a, n) => w.spawnSineSnake(t, e, i, a, n, s),
1925
- spiral: (t, e, i, s, a, n) => w.spawnDoubleSpiral(t, e, i, a, n, s),
1926
- marching: (t, e, i, s, a, n) => w.spawnMarchingWall(t, e, i, a, n, s),
1927
- crossfire: (t, e, i, s, a, n) => w.spawnCrossfireStreams(t, e, i, a, n, s)
1922
+ circle: (t, e, i, s, a, n) => D.spawnCircleOfDeath(t, e, i, s, a, n),
1923
+ dense: (t, e, i, s, a, n) => D.spawnDenseCluster(t, e, i, a, n, s),
1924
+ sine: (t, e, i, s, a, n) => D.spawnSineSnake(t, e, i, a, n, s),
1925
+ spiral: (t, e, i, s, a, n) => D.spawnDoubleSpiral(t, e, i, a, n, s),
1926
+ marching: (t, e, i, s, a, n) => D.spawnMarchingWall(t, e, i, a, n, s),
1927
+ crossfire: (t, e, i, s, a, n) => D.spawnCrossfireStreams(t, e, i, a, n, s)
1928
1928
  };
1929
1929
  static spawn(t, e, i, s, a, n, o) {
1930
1930
  return this.algorithms[i]?.(t, e, s, a, n, o) ?? [];
@@ -1957,10 +1957,10 @@ class w {
1957
1957
  y: (Math.random() - 0.5) * 60
1958
1958
  }, d = { x: l.x + u.x, y: l.y + u.y }, g = e.get();
1959
1959
  t.configureEnemy(g, i[0], d, n);
1960
- const b = n.x - d.x, f = n.y - d.y, _ = Math.atan2(f, b);
1960
+ const E = n.x - d.x, _ = n.y - d.y, m = Math.atan2(_, E);
1961
1961
  g.velocity = {
1962
- x: Math.cos(_) * (50 + Math.random() * 20),
1963
- y: Math.sin(_) * (50 + Math.random() * 20)
1962
+ x: Math.cos(m) * (50 + Math.random() * 20),
1963
+ y: Math.sin(m) * (50 + Math.random() * 20)
1964
1964
  }, o.push(g);
1965
1965
  }
1966
1966
  return o;
@@ -2038,7 +2038,7 @@ class _t {
2038
2038
  return this.spawnTimer >= o && n < r ? (this.spawnTimer = 0, this.spawnSingleEnemy(i, s, a)) : null;
2039
2039
  }
2040
2040
  spawnSingleEnemy(t, e, i) {
2041
- const s = w.getOffscreenPosition(t, e), a = this.content.enemies.values().filter((l) => (l.spawnWeight ?? 0) > 0), n = a.reduce((l, h) => l + (h.spawnWeight ?? 0), 0);
2041
+ const s = D.getOffscreenPosition(t, e), a = this.content.enemies.values().filter((l) => (l.spawnWeight ?? 0) > 0), n = a.reduce((l, h) => l + (h.spawnWeight ?? 0), 0);
2042
2042
  let o = Math.random() * n, r = a[0]?.id ?? "";
2043
2043
  for (const l of a)
2044
2044
  if (o -= l.spawnWeight ?? 0, o <= 0) {
@@ -2052,7 +2052,7 @@ class _t {
2052
2052
  const s = this.content.spawnerPatterns.values(), a = s.reduce((r, c) => r + c.weight, 0);
2053
2053
  let n = Math.random() * a;
2054
2054
  const o = s.find((r) => (n -= r.weight, n <= 0));
2055
- return o ? w.spawn(this.factory, this.pool, o.algorithmId, o.enemyIds, i, t, e) : [];
2055
+ return o ? D.spawn(this.factory, this.pool, o.algorithmId, o.enemyIds, i, t, e) : [];
2056
2056
  }
2057
2057
  applyFlockingBehaviors(t, e, i) {
2058
2058
  for (let a = 0; a < t.length; a++) {
@@ -2063,8 +2063,8 @@ class _t {
2063
2063
  if (a === d) continue;
2064
2064
  const g = t[d];
2065
2065
  if (!g.active || g.isGrabbed || g.isDying) continue;
2066
- const b = n.position.x - g.position.x, f = n.position.y - g.position.y, _ = Math.hypot(b, f);
2067
- _ > 0 && _ < 70 && (o += b / _, r += f / _, c++);
2066
+ const E = n.position.x - g.position.x, _ = n.position.y - g.position.y, m = Math.hypot(E, _);
2067
+ m > 0 && m < 70 && (o += E / m, r += _ / m, c++);
2068
2068
  }
2069
2069
  c > 0 && (o /= c, r /= c, n.velocity.x += o * 60 * e, n.velocity.y += r * 60 * e);
2070
2070
  const l = i.x - n.position.x, h = i.y - n.position.y, u = Math.hypot(l, h);
@@ -2094,7 +2094,7 @@ const ft = {
2094
2094
  yellowThreshold: 32,
2095
2095
  redThreshold: 256
2096
2096
  };
2097
- class k {
2097
+ class U {
2098
2098
  id;
2099
2099
  position;
2100
2100
  velocity;
@@ -2112,7 +2112,7 @@ class k {
2112
2112
  mergeStartPosition = null;
2113
2113
  mergeElapsed = 0;
2114
2114
  constructor(t, e = 1, i = ft) {
2115
- this.id = `xp_${Date.now()}_${Math.random()}`, this.position = { ...t }, this.value = Math.max(1, e), this.config = i, this.radius = i.baseRadius, this.color = E.experience, this.updateAppearance();
2115
+ this.id = `xp_${Date.now()}_${Math.random()}`, this.position = { ...t }, this.value = Math.max(1, e), this.config = i, this.radius = i.baseRadius, this.color = x.experience, this.updateAppearance();
2116
2116
  const s = Math.random() * Math.PI * 2, a = 25 + Math.random() * 45;
2117
2117
  this.velocity = {
2118
2118
  x: Math.cos(s) * a,
@@ -2129,7 +2129,7 @@ class k {
2129
2129
  const i = e, s = /* @__PURE__ */ new Map();
2130
2130
  for (const a of t) {
2131
2131
  if (!a.active || a.isAbsorbing || a.isMerging) continue;
2132
- const n = k.getCellKey(a.position, i), o = s.get(n);
2132
+ const n = U.getCellKey(a.position, i), o = s.get(n);
2133
2133
  o ? o.push(a) : s.set(n, [a]);
2134
2134
  }
2135
2135
  for (const a of t) {
@@ -2141,8 +2141,8 @@ class k {
2141
2141
  if (l)
2142
2142
  for (const h of l) {
2143
2143
  if (h === a || !h.active || h.isAbsorbing || h.isMerging) continue;
2144
- const u = h.position.x - a.position.x, d = h.position.y - a.position.y, g = Math.hypot(u, d), b = Math.min(12, Math.max(0, Math.max(a.radius, h.radius) - a.config.baseRadius));
2145
- g <= e + b && a.mergeWith(h);
2144
+ const u = h.position.x - a.position.x, d = h.position.y - a.position.y, g = Math.hypot(u, d), E = Math.min(12, Math.max(0, Math.max(a.radius, h.radius) - a.config.baseRadius));
2145
+ g <= e + E && a.mergeWith(h);
2146
2146
  }
2147
2147
  }
2148
2148
  }
@@ -2154,7 +2154,7 @@ class k {
2154
2154
  const a = s, n = /* @__PURE__ */ new Map();
2155
2155
  for (const o of t) {
2156
2156
  if (!o.active || o.isAbsorbing || o.isMerging) continue;
2157
- const r = k.getCellKey(o.position, a), c = n.get(r);
2157
+ const r = U.getCellKey(o.position, a), c = n.get(r);
2158
2158
  c ? c.push(o) : n.set(r, [o]);
2159
2159
  }
2160
2160
  for (const o of t) {
@@ -2167,10 +2167,10 @@ class k {
2167
2167
  for (const d of u) {
2168
2168
  if (d === o || !d.active || d.isAbsorbing || d.isMerging || d.id <= o.id)
2169
2169
  continue;
2170
- const g = d.position.x - o.position.x, b = d.position.y - o.position.y, f = Math.hypot(g, b);
2171
- if (f <= 0 || f > s) continue;
2172
- const _ = 1 - f / s, y = e.magneticAttractionStrength * _ * _ * i, m = g / f, v = b / f;
2173
- o.velocity.x += m * y, o.velocity.y += v * y, d.velocity.x -= m * y, d.velocity.y -= v * y;
2170
+ const g = d.position.x - o.position.x, E = d.position.y - o.position.y, _ = Math.hypot(g, E);
2171
+ if (_ <= 0 || _ > s) continue;
2172
+ const m = 1 - _ / s, b = e.magneticAttractionStrength * m * m * i, f = g / _, y = E / _;
2173
+ o.velocity.x += f * b, o.velocity.y += y * b, d.velocity.x -= f * b, d.velocity.y -= y * b;
2174
2174
  }
2175
2175
  }
2176
2176
  }
@@ -2219,7 +2219,7 @@ class k {
2219
2219
  this.radius = Math.min(this.config.maxRadius, this.config.baseRadius + e), this.color = this.getTierColor();
2220
2220
  }
2221
2221
  getTierColor() {
2222
- return this.value >= this.config.redThreshold ? E.experienceRed : this.value >= this.config.yellowThreshold ? E.experienceYellow : this.value >= this.config.blueThreshold ? E.experienceBlue : E.experience;
2222
+ return this.value >= this.config.redThreshold ? x.experienceRed : this.value >= this.config.yellowThreshold ? x.experienceYellow : this.value >= this.config.blueThreshold ? x.experienceBlue : x.experience;
2223
2223
  }
2224
2224
  updateMergeAnimation(t) {
2225
2225
  const e = this.mergeTarget, i = this.mergeStartPosition;
@@ -2238,22 +2238,23 @@ class k {
2238
2238
  return `${Math.floor(t.x / e)}:${Math.floor(t.y / e)}`;
2239
2239
  }
2240
2240
  }
2241
- const U = {
2241
+ const B = {
2242
2242
  bioluminescent: {
2243
2243
  bgInner: "#081220",
2244
2244
  bgMid: "#050b16",
2245
2245
  bgOuter: "#020408",
2246
2246
  nebulaCyan: "rgba(0, 240, 255, 0.08)",
2247
2247
  nebulaMagenta: "rgba(255, 0, 221, 0.07)",
2248
- piercerColor: E.piercer,
2249
- sporeColor: E.spore,
2250
- clusterColor: E.cluster,
2251
- parasiteColor: E.parasite,
2252
- microColor: E.micro,
2253
- corePrimary: E.core,
2254
- coreGlow: E.coreGlow,
2255
- tendrilMagenta: E.coreAccent,
2248
+ piercerColor: x.piercer,
2249
+ sporeColor: x.spore,
2250
+ clusterColor: x.cluster,
2251
+ parasiteColor: x.parasite,
2252
+ microColor: x.micro,
2253
+ corePrimary: x.core,
2254
+ coreGlow: x.coreGlow,
2255
+ tendrilMagenta: x.coreAccent,
2256
2256
  tendrilCyan: "#00ffff",
2257
+ progressAccent: "#d8c27a",
2257
2258
  effectHighlight: "#ffffff",
2258
2259
  effectInk: "#ffffff",
2259
2260
  effectShadow: "#000000",
@@ -2276,6 +2277,7 @@ const U = {
2276
2277
  coreGlow: "rgba(0, 180, 216, 0.85)",
2277
2278
  tendrilMagenta: "#d800a6",
2278
2279
  tendrilCyan: "#00b4d8",
2280
+ progressAccent: "#d4b46a",
2279
2281
  effectHighlight: "#ffffff",
2280
2282
  effectInk: "#ffffff",
2281
2283
  effectShadow: "#000000",
@@ -2298,6 +2300,7 @@ const U = {
2298
2300
  coreGlow: "rgba(0, 119, 182, 0.85)",
2299
2301
  tendrilMagenta: "#b5008c",
2300
2302
  tendrilCyan: "#0077b6",
2303
+ progressAccent: "#936f2d",
2301
2304
  effectHighlight: "#fffaf2",
2302
2305
  effectInk: "#17324d",
2303
2306
  effectShadow: "#18334c",
@@ -2305,7 +2308,7 @@ const U = {
2305
2308
  vortexCore: "#274760",
2306
2309
  vortexMid: "#577c9e"
2307
2310
  }
2308
- }, K = "axon_surge_theme";
2311
+ }, W = "axon_surge_theme";
2309
2312
  class yt {
2310
2313
  currentTheme = "dark";
2311
2314
  isExplicit = !1;
@@ -2313,14 +2316,14 @@ class yt {
2313
2316
  constructor(t, e) {
2314
2317
  e !== void 0 && (this.targetElement = e);
2315
2318
  try {
2316
- const i = localStorage.getItem(K);
2317
- if (i && U[i]) {
2319
+ const i = localStorage.getItem(W);
2320
+ if (i && B[i]) {
2318
2321
  this.currentTheme = i, this.isExplicit = !0, this.applyThemeToDOM();
2319
2322
  return;
2320
2323
  }
2321
2324
  } catch {
2322
2325
  }
2323
- if (t && U[t]) {
2326
+ if (t && B[t]) {
2324
2327
  this.currentTheme = t, this.isExplicit = !0, this.applyThemeToDOM();
2325
2328
  return;
2326
2329
  }
@@ -2330,10 +2333,10 @@ class yt {
2330
2333
  this.targetElement = t, this.isExplicit ? this.applyThemeToDOM() : this.currentTheme = this.detectParentOrSystemTheme();
2331
2334
  }
2332
2335
  setTheme(t) {
2333
- if (U[t]) {
2336
+ if (B[t]) {
2334
2337
  this.currentTheme = t, this.isExplicit = !0, this.applyThemeToDOM();
2335
2338
  try {
2336
- localStorage.setItem(K, t);
2339
+ localStorage.setItem(W, t);
2337
2340
  } catch {
2338
2341
  }
2339
2342
  }
@@ -2341,7 +2344,7 @@ class yt {
2341
2344
  clearExplicitTheme() {
2342
2345
  this.isExplicit = !1;
2343
2346
  try {
2344
- localStorage.removeItem(K);
2347
+ localStorage.removeItem(W);
2345
2348
  } catch {
2346
2349
  }
2347
2350
  this.removeThemeClasses(), this.currentTheme = this.detectParentOrSystemTheme();
@@ -2350,7 +2353,7 @@ class yt {
2350
2353
  return this.isExplicit || (this.currentTheme = this.detectParentOrSystemTheme()), this.currentTheme;
2351
2354
  }
2352
2355
  getPalette() {
2353
- return U[this.getTheme()] || U.dark;
2356
+ return B[this.getTheme()] || B.dark;
2354
2357
  }
2355
2358
  detectParentOrSystemTheme() {
2356
2359
  try {
@@ -2401,50 +2404,50 @@ class xt {
2401
2404
  if (o >= 0 && o <= i && r >= 0 && r <= s) continue;
2402
2405
  const c = Math.min(i, Math.max(0, o)), l = Math.min(s, Math.max(0, r)), h = Math.hypot(o - c, r - l);
2403
2406
  if (h <= 0 || h > this.maxDistance) continue;
2404
- const u = Math.min(1, Math.max(0, h / this.maxDistance)), d = this.minThickness + (this.maxThickness - this.minThickness) * (1 - u), g = this.minLength + (this.maxLength - this.minLength) * (1 - u), b = 0.55 + (1 - u) * 0.35;
2405
- if (t.save(), t.globalAlpha = b, t.shadowColor = n.color, t.shadowBlur = 14, t.strokeStyle = n.color, t.lineWidth = d, t.lineCap = "round", t.beginPath(), c === 0 || c === i) {
2406
- const f = Math.max(0, l - g / 2), _ = Math.min(s, l + g / 2);
2407
- t.moveTo(c, f), t.lineTo(c, _);
2407
+ const u = Math.min(1, Math.max(0, h / this.maxDistance)), d = this.minThickness + (this.maxThickness - this.minThickness) * (1 - u), g = this.minLength + (this.maxLength - this.minLength) * (1 - u), E = 0.55 + (1 - u) * 0.35;
2408
+ if (t.save(), t.globalAlpha = E, t.shadowColor = n.color, t.shadowBlur = 14, t.strokeStyle = n.color, t.lineWidth = d, t.lineCap = "round", t.beginPath(), c === 0 || c === i) {
2409
+ const _ = Math.max(0, l - g / 2), m = Math.min(s, l + g / 2);
2410
+ t.moveTo(c, _), t.lineTo(c, m);
2408
2411
  } else {
2409
- const f = Math.max(0, c - g / 2), _ = Math.min(i, c + g / 2);
2410
- t.moveTo(f, l), t.lineTo(_, l);
2412
+ const _ = Math.max(0, c - g / 2), m = Math.min(i, c + g / 2);
2413
+ t.moveTo(_, l), t.lineTo(m, l);
2411
2414
  }
2412
- t.stroke(), t.strokeStyle = a.effectHighlight, t.lineWidth = Math.max(1.8, d * 0.28), t.globalAlpha = b * 0.9, t.stroke(), t.restore();
2415
+ t.stroke(), t.strokeStyle = a.effectHighlight, t.lineWidth = Math.max(1.8, d * 0.28), t.globalAlpha = E * 0.9, t.stroke(), t.restore();
2413
2416
  }
2414
2417
  }
2415
2418
  }
2416
2419
  class bt {
2417
2420
  render(t, e, i, s, a, n, o = !1) {
2418
- const r = Math.max(1, a), c = Math.min(1, (r - 1) / 8), l = this.wrapHue(190 + (r - 1) * 34 + Math.sin(s * 0.1) * 5), h = this.wrapHue(l + 42), u = this.wrapHue(l + 150), d = e / 2, g = i / 2, b = Math.max(e, i) * 0.82, f = t.createRadialGradient(d, g, 20, d, g, b);
2419
- o ? (f.addColorStop(0, `hsl(${l}, 42%, 91%)`), f.addColorStop(0.42, `hsl(${h}, 42%, 86%)`), f.addColorStop(0.78, `hsl(${u}, 38%, 81%)`), f.addColorStop(1, n.bgOuter)) : (f.addColorStop(0, `hsl(${l}, 42%, 11%)`), f.addColorStop(0.42, `hsl(${h}, 48%, 8%)`), f.addColorStop(0.78, `hsl(${u}, 42%, 5%)`), f.addColorStop(1, `hsl(${u}, 48%, 2.5%)`)), t.fillStyle = f, t.fillRect(0, 0, e, i);
2420
- const _ = Math.min(e, i) * 0.055;
2421
+ const r = Math.max(1, a), c = Math.min(1, (r - 1) / 8), l = this.wrapHue(190 + (r - 1) * 34 + Math.sin(s * 0.1) * 5), h = this.wrapHue(l + 42), u = this.wrapHue(l + 150), d = e / 2, g = i / 2, E = Math.max(e, i) * 0.82, _ = t.createRadialGradient(d, g, 20, d, g, E);
2422
+ o ? (_.addColorStop(0, `hsl(${l}, 42%, 91%)`), _.addColorStop(0.42, `hsl(${h}, 42%, 86%)`), _.addColorStop(0.78, `hsl(${u}, 38%, 81%)`), _.addColorStop(1, n.bgOuter)) : (_.addColorStop(0, `hsl(${l}, 42%, 11%)`), _.addColorStop(0.42, `hsl(${h}, 48%, 8%)`), _.addColorStop(0.78, `hsl(${u}, 42%, 5%)`), _.addColorStop(1, `hsl(${u}, 48%, 2.5%)`)), t.fillStyle = _, t.fillRect(0, 0, e, i);
2423
+ const m = Math.min(e, i) * 0.055;
2421
2424
  this.drawNebula(
2422
2425
  t,
2423
- e * 0.22 + Math.sin(s * 0.18) * _,
2424
- i * 0.28 + Math.cos(s * 0.15) * _,
2426
+ e * 0.22 + Math.sin(s * 0.18) * m,
2427
+ i * 0.28 + Math.cos(s * 0.15) * m,
2425
2428
  Math.max(e, i) * 0.42,
2426
2429
  l,
2427
2430
  o ? 0.27 : 0.23,
2428
2431
  o
2429
2432
  ), this.drawNebula(
2430
2433
  t,
2431
- e * 0.8 + Math.cos(s * 0.14) * _,
2432
- i * 0.7 + Math.sin(s * 0.17) * _,
2434
+ e * 0.8 + Math.cos(s * 0.14) * m,
2435
+ i * 0.7 + Math.sin(s * 0.17) * m,
2433
2436
  Math.max(e, i) * 0.48,
2434
2437
  h,
2435
2438
  o ? 0.23 : 0.2,
2436
2439
  o
2437
2440
  ), this.drawNebula(
2438
2441
  t,
2439
- e * 0.86 + Math.sin(s * 0.11) * _ * 0.7,
2440
- i * 0.16 + Math.cos(s * 0.13) * _ * 0.7,
2442
+ e * 0.86 + Math.sin(s * 0.11) * m * 0.7,
2443
+ i * 0.16 + Math.cos(s * 0.13) * m * 0.7,
2441
2444
  Math.max(e, i) * 0.3,
2442
2445
  u,
2443
2446
  o ? 0.17 : 0.14,
2444
2447
  o
2445
2448
  ), this.drawSoftFlows(t, e, i, s, l, c, o), this.drawParticleField(t, e, i, s, l, h, r, o);
2446
- const x = t.createRadialGradient(d, g, Math.min(e, i) * 0.28, d, g, b);
2447
- x.addColorStop(0, "rgba(0, 0, 0, 0)"), x.addColorStop(1, o ? "rgba(40, 60, 90, 0.09)" : "rgba(0, 0, 0, 0.2)"), t.fillStyle = x, t.fillRect(0, 0, e, i);
2449
+ const v = t.createRadialGradient(d, g, Math.min(e, i) * 0.28, d, g, E);
2450
+ v.addColorStop(0, "rgba(0, 0, 0, 0)"), v.addColorStop(1, o ? "rgba(40, 60, 90, 0.09)" : "rgba(0, 0, 0, 0.2)"), t.fillStyle = v, t.fillRect(0, 0, e, i);
2448
2451
  }
2449
2452
  drawNebula(t, e, i, s, a, n, o) {
2450
2453
  const r = t.createRadialGradient(e, i, 0, e, i, s), c = o ? 52 : 60;
@@ -2463,8 +2466,8 @@ class bt {
2463
2466
  drawParticleField(t, e, i, s, a, n, o, r) {
2464
2467
  const c = 44 + Math.min(24, o * 2), l = e / 2, h = i / 2, u = Math.min(e, i) * 0.17;
2465
2468
  for (let d = 0; d < c; d++) {
2466
- const g = d + o * 17, b = this.unitNoise(g * 1.7) * e, f = this.unitNoise(g * 2.9 + 13) * i, _ = Math.hypot(b - l, f - h), x = Math.min(1, Math.max(0, (_ - u) / (Math.min(e, i) * 0.28))), y = 0.7 + Math.sin(s * (0.6 + d % 4 * 0.08) + g) * 0.3, m = (r ? 0.34 : 0.3) * x * y, v = 0.65 + d % 3 * 0.45;
2467
- t.fillStyle = `hsla(${d % 3 === 0 ? n : a}, ${r ? 82 : 78}%, ${r ? 40 : 70}%, ${m})`, t.beginPath(), t.arc(b, f, v, 0, Math.PI * 2), t.fill();
2469
+ const g = d + o * 17, E = this.unitNoise(g * 1.7) * e, _ = this.unitNoise(g * 2.9 + 13) * i, m = Math.hypot(E - l, _ - h), v = Math.min(1, Math.max(0, (m - u) / (Math.min(e, i) * 0.28))), b = 0.7 + Math.sin(s * (0.6 + d % 4 * 0.08) + g) * 0.3, f = (r ? 0.34 : 0.3) * v * b, y = 0.65 + d % 3 * 0.45;
2470
+ t.fillStyle = `hsla(${d % 3 === 0 ? n : a}, ${r ? 82 : 78}%, ${r ? 40 : 70}%, ${f})`, t.beginPath(), t.arc(E, _, y, 0, Math.PI * 2), t.fill();
2468
2471
  }
2469
2472
  }
2470
2473
  unitNoise(t) {
@@ -2482,16 +2485,16 @@ class Et {
2482
2485
  const n = e.getStep();
2483
2486
  if (t.save(), n === 1) {
2484
2487
  const o = Math.sin(i * 6) * 10, r = s.position.x, c = s.position.y - 65 + o;
2485
- t.shadowColor = E.core, t.shadowBlur = 20, t.fillStyle = E.core, t.beginPath(), t.moveTo(r, c + 20), t.lineTo(r - 16, c - 12), t.lineTo(r - 6, c - 12), t.lineTo(r - 6, c - 32), t.lineTo(r + 6, c - 32), t.lineTo(r + 6, c - 12), t.lineTo(r + 16, c - 12), t.closePath(), t.fill();
2488
+ t.shadowColor = x.core, t.shadowBlur = 20, t.fillStyle = x.core, t.beginPath(), t.moveTo(r, c + 20), t.lineTo(r - 16, c - 12), t.lineTo(r - 6, c - 12), t.lineTo(r - 6, c - 32), t.lineTo(r + 6, c - 32), t.lineTo(r + 6, c - 12), t.lineTo(r + 16, c - 12), t.closePath(), t.fill();
2486
2489
  const l = s.radius * (1.6 + Math.sin(i * 8) * 0.3);
2487
2490
  t.strokeStyle = "rgba(0, 240, 255, 0.8)", t.lineWidth = 3, t.beginPath(), t.arc(s.position.x, s.position.y, l, 0, Math.PI * 2), t.stroke();
2488
2491
  } else if (n === 2) {
2489
2492
  const o = a.position.x - s.position.x, r = a.position.y - s.position.y;
2490
2493
  if (Math.hypot(o, r) > 10) {
2491
2494
  const l = Math.atan2(r, o);
2492
- t.shadowColor = E.coreAccent, t.shadowBlur = 22, t.strokeStyle = E.coreAccent, t.lineWidth = 4, t.setLineDash([12, 8]), t.beginPath(), t.moveTo(s.position.x, s.position.y), t.lineTo(a.position.x, a.position.y), t.stroke(), t.setLineDash([]);
2495
+ t.shadowColor = x.coreAccent, t.shadowBlur = 22, t.strokeStyle = x.coreAccent, t.lineWidth = 4, t.setLineDash([12, 8]), t.beginPath(), t.moveTo(s.position.x, s.position.y), t.lineTo(a.position.x, a.position.y), t.stroke(), t.setLineDash([]);
2493
2496
  const h = a.position.x - Math.cos(l) * (a.radius + 10), u = a.position.y - Math.sin(l) * (a.radius + 10);
2494
- t.fillStyle = E.coreAccent, t.beginPath(), t.moveTo(h, u), t.lineTo(h - Math.cos(l - 0.4) * 24, u - Math.sin(l - 0.4) * 24), t.lineTo(h - Math.cos(l + 0.4) * 24, u - Math.sin(l + 0.4) * 24), t.closePath(), t.fill();
2497
+ t.fillStyle = x.coreAccent, t.beginPath(), t.moveTo(h, u), t.lineTo(h - Math.cos(l - 0.4) * 24, u - Math.sin(l - 0.4) * 24), t.lineTo(h - Math.cos(l + 0.4) * 24, u - Math.sin(l + 0.4) * 24), t.closePath(), t.fill();
2495
2498
  const d = a.radius * (1.8 + Math.cos(i * 10) * 0.3);
2496
2499
  t.strokeStyle = "rgba(255, 0, 221, 0.9)", t.lineWidth = 3.5, t.beginPath(), t.arc(a.position.x, a.position.y, d, 0, Math.PI * 2), t.stroke();
2497
2500
  }
@@ -2499,7 +2502,7 @@ class Et {
2499
2502
  t.restore();
2500
2503
  }
2501
2504
  }
2502
- class vt {
2505
+ class At {
2503
2506
  constructor(t) {
2504
2507
  this.configManager = t;
2505
2508
  }
@@ -2554,27 +2557,27 @@ class vt {
2554
2557
  const a = e.radius, n = a * 0.88, o = Math.sin(i * 3 + e.position.x * 0.01) * 1.5, r = e.color;
2555
2558
  t.save(), t.translate(-a * 0.12, o), t.fillStyle = r, t.shadowColor = r, t.shadowBlur = 20, t.beginPath();
2556
2559
  const c = 10;
2557
- for (let f = 0; f <= c; f++) {
2558
- const _ = f * Math.PI * 2 / c, x = 1 + Math.sin(_ * 3 + i * 2.4) * 0.08, y = Math.cos(_) * n * x, m = Math.sin(_) * n * x * 0.9;
2559
- f === 0 ? t.moveTo(y, m) : t.lineTo(y, m);
2560
+ for (let _ = 0; _ <= c; _++) {
2561
+ const m = _ * Math.PI * 2 / c, v = 1 + Math.sin(m * 3 + i * 2.4) * 0.08, b = Math.cos(m) * n * v, f = Math.sin(m) * n * v * 0.9;
2562
+ _ === 0 ? t.moveTo(b, f) : t.lineTo(b, f);
2560
2563
  }
2561
2564
  t.closePath(), t.fill(), t.fillStyle = s.effectHighlight, t.shadowColor = s.effectHighlight, t.shadowBlur = 7, t.beginPath(), t.arc(-a * 0.28, -a * 0.2, a * 0.11, 0, Math.PI * 2), t.arc(a * 0.02, a * 0.18, a * 0.08, 0, Math.PI * 2), t.fill(), t.restore();
2562
2565
  const l = a * 0.22, h = this.configManager.getConfig().shield.protectionArc, u = a * 0.72, d = a * 0.38;
2563
2566
  t.save(), t.translate(l, 0), t.beginPath(), t.arc(0, 0, u, -h / 2, h / 2, !1);
2564
- const g = Math.cos(h / 2) * d, b = Math.sin(h / 2) * d;
2565
- t.lineTo(g, b), t.arc(0, 0, d, h / 2, -h / 2, !0), t.closePath(), t.fillStyle = e.color, t.shadowColor = e.color, t.shadowBlur = e.isStationaryShield ? 28 : 16, t.fill(), t.strokeStyle = s.effectHighlight, t.lineWidth = 2.5, t.beginPath(), t.arc(0, 0, u + Math.sin(i * 4) * 2, -h / 2 + 0.1, h / 2 - 0.1), t.stroke(), t.strokeStyle = s.effectHighlight, t.lineWidth = 1.5, t.shadowColor = s.effectHighlight, t.shadowBlur = 8, t.beginPath(), t.arc(0, 0, d * 0.72, -h * 0.42, h * 0.42), t.stroke();
2566
- for (let f = -2; f <= 2; f++) {
2567
- const _ = f * h / 6, x = Math.cos(_) * (d + 6), y = Math.sin(_) * (d + 6);
2568
- t.fillStyle = s.effectHighlight, t.beginPath(), t.arc(x, y, 3, 0, Math.PI * 2), t.fill();
2567
+ const g = Math.cos(h / 2) * d, E = Math.sin(h / 2) * d;
2568
+ t.lineTo(g, E), t.arc(0, 0, d, h / 2, -h / 2, !0), t.closePath(), t.fillStyle = e.color, t.shadowColor = e.color, t.shadowBlur = e.isStationaryShield ? 28 : 16, t.fill(), t.strokeStyle = s.effectHighlight, t.lineWidth = 2.5, t.beginPath(), t.arc(0, 0, u + Math.sin(i * 4) * 2, -h / 2 + 0.1, h / 2 - 0.1), t.stroke(), t.strokeStyle = s.effectHighlight, t.lineWidth = 1.5, t.shadowColor = s.effectHighlight, t.shadowBlur = 8, t.beginPath(), t.arc(0, 0, d * 0.72, -h * 0.42, h * 0.42), t.stroke();
2569
+ for (let _ = -2; _ <= 2; _++) {
2570
+ const m = _ * h / 6, v = Math.cos(m) * (d + 6), b = Math.sin(m) * (d + 6);
2571
+ t.fillStyle = s.effectHighlight, t.beginPath(), t.arc(v, b, 3, 0, Math.PI * 2), t.fill();
2569
2572
  }
2570
2573
  t.restore();
2571
2574
  }
2572
2575
  }
2573
- const At = {
2574
- common: E.spore,
2575
- rare: E.parasite,
2576
- epic: E.cluster,
2577
- legendary: E.core
2576
+ const vt = {
2577
+ common: x.spore,
2578
+ rare: x.parasite,
2579
+ epic: x.cluster,
2580
+ legendary: x.core
2578
2581
  };
2579
2582
  class Mt {
2580
2583
  canvas;
@@ -2586,20 +2589,25 @@ class Mt {
2586
2589
  tutorialArrowRenderer;
2587
2590
  enemyShapeRenderer;
2588
2591
  constructor(t, e, i) {
2589
- this.canvas = t, this.ctx = t.getContext("2d"), this.themeManager = e, this.indicatorRenderer = new xt(), this.bgRenderer = new bt(), this.tutorialArrowRenderer = new Et(), this.enemyShapeRenderer = new vt(i), this.configManager = i;
2592
+ this.canvas = t, this.ctx = t.getContext("2d"), this.themeManager = e, this.indicatorRenderer = new xt(), this.bgRenderer = new bt(), this.tutorialArrowRenderer = new Et(), this.enemyShapeRenderer = new At(i), this.configManager = i;
2590
2593
  }
2591
- render(t, e, i, s, a, n, o, r, c, l, h, u = 1, d = 0, g = 0, b) {
2594
+ render(t, e, i, s, a, n, o, r, c, l, h, u = 1, d = 0, g = 0, E = !1, _) {
2592
2595
  if (!this.ctx) return;
2593
- const f = this.themeManager.getPalette(), { width: _, height: x } = this.canvas, y = c.getShakeOffset();
2594
- this.ctx.save(), this.ctx.translate(y.x, y.y), this.bgRenderer.render(
2596
+ const m = this.themeManager.getPalette(), { width: v, height: b } = this.canvas, f = c.getShakeOffset();
2597
+ this.ctx.save(), this.ctx.translate(f.x, f.y), this.bgRenderer.render(
2595
2598
  this.ctx,
2596
- _,
2597
- x,
2599
+ v,
2600
+ b,
2598
2601
  t.pulsePhase,
2599
2602
  u,
2600
- f,
2603
+ m,
2601
2604
  this.themeManager.getTheme() === "light"
2602
- ), this.drawExperienceOrbs(i, t.position, t.pulsePhase, f), this.drawToxicPools(s, t.pulsePhase), this.drawGravityVortices(a, t.pulsePhase), this.drawShockwaves(n), this.drawCoreFilaments(t, f), this.drawAutoDeflectionBeams(t.position, e, t.pulsePhase, f), this.drawParticles(o), this.configManager.getConfig().core.hasOffscreenIndicators && this.indicatorRenderer.render(this.ctx, e, _, x, f), this.drawOrganicEnemies(e, t.pulsePhase, f), b && this.tutorialArrowRenderer.render(this.ctx, b, t.pulsePhase), l ? this.drawPsionicTendril(t.position, l.position, f) : t && this.drawHoverTendril(t.position, h, e, f), this.drawOrganicConsciousnessCore(t, f, d, g), this.drawFloatingTexts(r), c.flashAlpha > 0 && (this.ctx.fillStyle = `rgba(255, 255, 255, ${c.flashAlpha})`, this.ctx.fillRect(0, 0, _, x)), this.ctx.restore();
2605
+ ), this.drawExperienceOrbs(i, t.position, t.pulsePhase, m), this.drawToxicPools(s, t.pulsePhase), this.drawGravityVortices(a, t.pulsePhase), this.drawShockwaves(n), this.drawCoreFilaments(t, m), this.drawAutoDeflectionBeams(t.position, e, t.pulsePhase, m), this.drawParticles(o), this.configManager.getConfig().core.hasOffscreenIndicators && this.indicatorRenderer.render(this.ctx, e, v, b, m), this.drawOrganicEnemies(e, t.pulsePhase, m), _ && this.tutorialArrowRenderer.render(this.ctx, _, t.pulsePhase), l ? this.drawPsionicTendril(t.position, l.position, m) : t && this.drawHoverTendril(t.position, h, e, m), E && this.drawLevelUpDimmer(), this.drawOrganicConsciousnessCore(t, m, d, g), this.drawFloatingTexts(r), c.flashAlpha > 0 && (this.ctx.fillStyle = `rgba(255, 255, 255, ${c.flashAlpha})`, this.ctx.fillRect(0, 0, v, b)), this.ctx.restore();
2606
+ }
2607
+ drawLevelUpDimmer() {
2608
+ if (!this.ctx) return;
2609
+ const t = this.themeManager.getTheme() === "light";
2610
+ this.ctx.save(), this.ctx.fillStyle = t ? "rgba(10, 24, 38, 0.24)" : "rgba(0, 0, 0, 0.48)", this.ctx.fillRect(0, 0, this.canvas.width, this.canvas.height), this.ctx.restore();
2603
2611
  }
2604
2612
  drawExperienceOrbs(t, e, i, s) {
2605
2613
  if (this.ctx)
@@ -2624,18 +2632,18 @@ class Mt {
2624
2632
  c.addColorStop(0, this.colorWithAlpha(i.sporeColor, n * 0.9)), c.addColorStop(0.4, `rgba(16, 185, 129, ${n * 0.65})`), c.addColorStop(0.8, `rgba(5, 80, 45, ${n * 0.35})`), c.addColorStop(1, "rgba(2, 35, 15, 0)"), this.ctx.fillStyle = c, this.ctx.shadowColor = i.sporeColor, this.ctx.shadowBlur = 30, this.ctx.beginPath();
2625
2633
  const l = 70;
2626
2634
  for (let h = 0; h <= l; h++) {
2627
- const u = h * Math.PI * 2 / l, d = Math.sin(u * 5 + e * 3) * 14, g = Math.cos(u * 3 - e * 2) * 9, b = s.radius + d + g, f = o + Math.cos(u) * b, _ = r + Math.sin(u) * b;
2628
- h === 0 ? this.ctx.moveTo(f, _) : this.ctx.lineTo(f, _);
2635
+ const u = h * Math.PI * 2 / l, d = Math.sin(u * 5 + e * 3) * 14, g = Math.cos(u * 3 - e * 2) * 9, E = s.radius + d + g, _ = o + Math.cos(u) * E, m = r + Math.sin(u) * E;
2636
+ h === 0 ? this.ctx.moveTo(_, m) : this.ctx.lineTo(_, m);
2629
2637
  }
2630
2638
  this.ctx.closePath(), this.ctx.fill(), this.ctx.strokeStyle = this.colorWithAlpha(i.sporeColor, n * 0.8), this.ctx.lineWidth = 2.5, this.ctx.beginPath();
2631
2639
  for (let h = 0; h <= l; h++) {
2632
- const u = h * Math.PI * 2 / l, d = Math.sin(u * 6 + e * 4) * 8, g = s.radius * 0.75 + d, b = o + Math.cos(u) * g, f = r + Math.sin(u) * g;
2633
- h === 0 ? this.ctx.moveTo(b, f) : this.ctx.lineTo(b, f);
2640
+ const u = h * Math.PI * 2 / l, d = Math.sin(u * 6 + e * 4) * 8, g = s.radius * 0.75 + d, E = o + Math.cos(u) * g, _ = r + Math.sin(u) * g;
2641
+ h === 0 ? this.ctx.moveTo(E, _) : this.ctx.lineTo(E, _);
2634
2642
  }
2635
2643
  this.ctx.closePath(), this.ctx.stroke();
2636
2644
  for (let h = 0; h < 6; h++) {
2637
- const u = h * Math.PI * 0.33 + e * 1.5, d = s.radius * 0.5 * (0.3 + Math.sin(e * 2 + h) * 0.3), g = o + Math.cos(u) * d, b = r + Math.sin(u) * d, f = 3 + Math.sin(e * 3 + h) * 2;
2638
- this.ctx.fillStyle = `rgba(255, 255, 255, ${n * 0.8})`, this.ctx.beginPath(), this.ctx.arc(g, b, Math.max(1, f), 0, Math.PI * 2), this.ctx.fill();
2645
+ const u = h * Math.PI * 0.33 + e * 1.5, d = s.radius * 0.5 * (0.3 + Math.sin(e * 2 + h) * 0.3), g = o + Math.cos(u) * d, E = r + Math.sin(u) * d, _ = 3 + Math.sin(e * 3 + h) * 2;
2646
+ this.ctx.fillStyle = `rgba(255, 255, 255, ${n * 0.8})`, this.ctx.beginPath(), this.ctx.arc(g, E, Math.max(1, _), 0, Math.PI * 2), this.ctx.fill();
2639
2647
  }
2640
2648
  this.ctx.restore();
2641
2649
  }
@@ -2707,60 +2715,88 @@ class Mt {
2707
2715
  if (!this.ctx) return;
2708
2716
  const { x: a, y: n } = t.position;
2709
2717
  if (this.ctx.save(), t.invulnerabilityTimer > 0) {
2710
- const x = Math.floor(t.invulnerabilityTimer * 20) % 2 === 0;
2711
- this.ctx.globalAlpha = x ? 0.3 : 0.9;
2718
+ const y = Math.floor(t.invulnerabilityTimer * 20) % 2 === 0;
2719
+ this.ctx.globalAlpha = y ? 0.3 : 0.9;
2712
2720
  }
2713
2721
  const o = t.getColorHex();
2714
- for (let x = 0; x < t.integrity; x++) {
2715
- const y = t.radius + 16 + x * 12;
2722
+ for (let y = 0; y < t.integrity; y++) {
2723
+ const A = t.radius + 16 + y * 12;
2716
2724
  this.ctx.strokeStyle = o, this.ctx.lineWidth = 2.2, this.ctx.shadowColor = o, this.ctx.shadowBlur = 12, this.ctx.beginPath();
2717
- const m = 60;
2718
- for (let v = 0; v <= m; v++) {
2719
- const A = v * Math.PI * 2 / m, S = y + Math.sin(A * 4 + t.pulsePhase * 2 + x) * 3, L = a + Math.cos(A) * S, T = n + Math.sin(A) * S;
2720
- v === 0 ? this.ctx.moveTo(L, T) : this.ctx.lineTo(L, T);
2725
+ const M = 60;
2726
+ for (let T = 0; T <= M; T++) {
2727
+ const R = T * Math.PI * 2 / M, L = A + Math.sin(R * 4 + t.pulsePhase * 2 + y) * 3, S = a + Math.cos(R) * L, I = n + Math.sin(R) * L;
2728
+ T === 0 ? this.ctx.moveTo(S, I) : this.ctx.lineTo(S, I);
2721
2729
  }
2722
2730
  this.ctx.closePath(), this.ctx.stroke();
2723
2731
  }
2724
2732
  if (t.repairProgress > 0) {
2725
- const x = t.integrity, y = t.radius + 16 + x * 12;
2733
+ const y = t.integrity, A = t.radius + 16 + y * 12;
2726
2734
  this.ctx.save(), this.ctx.globalAlpha = Math.max(0.15, t.repairProgress), this.ctx.strokeStyle = o, this.ctx.lineWidth = 2, this.ctx.shadowColor = o, this.ctx.shadowBlur = 8, this.ctx.setLineDash([6, 4]), this.ctx.beginPath();
2727
- const m = 60;
2728
- for (let v = 0; v <= m; v++) {
2729
- const A = v * Math.PI * 2 / m, S = y + Math.sin(A * 4 + t.pulsePhase * 2 + x) * 3, L = a + Math.cos(A) * S, T = n + Math.sin(A) * S;
2730
- v === 0 ? this.ctx.moveTo(L, T) : this.ctx.lineTo(L, T);
2735
+ const M = 60;
2736
+ for (let T = 0; T <= M; T++) {
2737
+ const R = T * Math.PI * 2 / M, L = A + Math.sin(R * 4 + t.pulsePhase * 2 + y) * 3, S = a + Math.cos(R) * L, I = n + Math.sin(R) * L;
2738
+ T === 0 ? this.ctx.moveTo(S, I) : this.ctx.lineTo(S, I);
2731
2739
  }
2732
2740
  this.ctx.closePath(), this.ctx.stroke(), this.ctx.restore();
2733
2741
  }
2734
2742
  const r = this.ctx.createRadialGradient(a, n, 5, a, n, t.radius * 2.2);
2735
2743
  r.addColorStop(0, o), r.addColorStop(0.5, e.nebulaMagenta), r.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = r, this.ctx.beginPath(), this.ctx.arc(a, n, t.radius * 2.2, 0, Math.PI * 2), this.ctx.fill(), this.ctx.save(), this.ctx.translate(a, n), this.ctx.strokeStyle = o, this.ctx.lineWidth = 3, this.ctx.fillStyle = o, this.ctx.shadowColor = o, this.ctx.shadowBlur = 20, this.ctx.beginPath();
2736
2744
  const c = 80;
2737
- for (let x = 0; x <= c; x++) {
2738
- const y = x * Math.PI * 2 / c, m = t.getMembraneRadius(y), v = Math.cos(y) * m, A = Math.sin(y) * m;
2739
- x === 0 ? this.ctx.moveTo(v, A) : this.ctx.lineTo(v, A);
2745
+ for (let y = 0; y <= c; y++) {
2746
+ const A = y * Math.PI * 2 / c, M = t.getMembraneRadius(A), T = Math.cos(A) * M, R = Math.sin(A) * M;
2747
+ y === 0 ? this.ctx.moveTo(T, R) : this.ctx.lineTo(T, R);
2740
2748
  }
2741
2749
  this.ctx.closePath(), this.ctx.fillStyle = o, this.ctx.fill(), this.ctx.strokeStyle = o, this.ctx.lineWidth = 3, this.ctx.stroke();
2742
2750
  const l = t.powerUpCount;
2743
2751
  if (l > 0) {
2744
2752
  this.ctx.strokeStyle = e.effectHighlight, this.ctx.lineWidth = 1.8, this.ctx.shadowColor = o, this.ctx.shadowBlur = 10;
2745
- for (let x = 0; x < l; x++) {
2746
- const y = x * Math.PI * 2 / l + t.pulsePhase * 0.4, m = t.radius * (0.45 + Math.sin(t.pulsePhase * 2 + x) * 0.15);
2753
+ for (let y = 0; y < l; y++) {
2754
+ const A = y * Math.PI * 2 / l + t.pulsePhase * 0.4, M = t.radius * (0.45 + Math.sin(t.pulsePhase * 2 + y) * 0.15);
2747
2755
  this.ctx.beginPath(), this.ctx.moveTo(0, 0);
2748
- const v = Math.cos(y + Math.sin(t.pulsePhase + x) * 0.4) * (m * 0.6), A = Math.sin(y + Math.cos(t.pulsePhase + x) * 0.4) * (m * 0.6), S = Math.cos(y) * m, L = Math.sin(y) * m;
2749
- this.ctx.quadraticCurveTo(v, A, S, L), this.ctx.stroke(), this.ctx.fillStyle = o, this.ctx.beginPath(), this.ctx.arc(S, L, 2.5, 0, Math.PI * 2), this.ctx.fill();
2756
+ const T = Math.cos(A + Math.sin(t.pulsePhase + y) * 0.4) * (M * 0.6), R = Math.sin(A + Math.cos(t.pulsePhase + y) * 0.4) * (M * 0.6), L = Math.cos(A) * M, S = Math.sin(A) * M;
2757
+ this.ctx.quadraticCurveTo(T, R, L, S), this.ctx.stroke(), this.ctx.fillStyle = o, this.ctx.beginPath(), this.ctx.arc(L, S, 2.5, 0, Math.PI * 2), this.ctx.fill();
2750
2758
  }
2751
2759
  }
2752
- const h = Math.max(0, Math.min(1, i)), u = Math.max(0, Math.min(1, s)), g = t.radius * 0.42 * (1 + u * 0.1), b = g - h * g * 2, f = Math.sin(t.pulsePhase * 5) * 1.5, _ = this.ctx.createRadialGradient(0, -g * 0.35, 1, 0, 0, g);
2753
- if (_.addColorStop(0, e.effectHighlight), _.addColorStop(0.7, this.colorWithAlpha(e.effectHighlight, 0.92)), _.addColorStop(1, this.colorWithAlpha(e.tendrilCyan, 0.55)), this.ctx.fillStyle = _, this.ctx.shadowColor = u > 0 ? o : e.effectHighlight, this.ctx.shadowBlur = 16 + u * 32, this.ctx.beginPath(), this.ctx.arc(0, 0, g, 0, Math.PI * 2), this.ctx.fill(), h > 0) {
2754
- this.ctx.save(), this.ctx.beginPath(), this.ctx.arc(0, 0, g, 0, Math.PI * 2), this.ctx.clip();
2755
- const x = this.ctx.createLinearGradient(0, b, 0, g);
2756
- x.addColorStop(0, this.colorWithAlpha(o, 1)), x.addColorStop(0.7, this.colorWithAlpha(o, 0.9)), x.addColorStop(1, this.colorWithAlpha(e.nebulaMagenta, 0.78)), this.ctx.fillStyle = x, this.ctx.fillRect(-g, b, g * 2, g * 2), this.ctx.strokeStyle = e.effectHighlight, this.ctx.lineWidth = 2, this.ctx.shadowColor = o, this.ctx.shadowBlur = 10, this.ctx.beginPath(), this.ctx.moveTo(-g, b + f), this.ctx.quadraticCurveTo(0, b - 2 - f, g, b + f), this.ctx.stroke(), this.ctx.restore();
2760
+ const h = Math.max(0, Math.min(1, i)), u = Math.max(0, Math.min(1, s)), d = t.radius * 0.42 * (1 + u * 0.1), g = Math.max(4, t.radius * 0.14), E = d + g * 0.5 - 0.5, _ = -Math.PI / 2, m = _ + Math.PI * 2 * h, v = (y) => E + (t.getMembraneRadius(y) - t.radius) * 0.18 + Math.sin(y * 2 - t.pulsePhase * 0.9) * 0.75 + Math.sin(y * 4 + t.pulsePhase * 0.55) * 0.35, b = (y, A) => {
2761
+ const M = Math.max(8, Math.ceil(Math.abs(A) / (Math.PI * 2) * 96)), T = Array.from({ length: M + 1 }, (S, I) => {
2762
+ const O = y + A * I / M, G = v(O);
2763
+ return { x: Math.cos(O) * G, y: Math.sin(O) * G };
2764
+ });
2765
+ this.ctx.beginPath(), this.ctx.moveTo(T[0].x, T[0].y);
2766
+ for (let S = 1; S < T.length - 1; S++) {
2767
+ const I = T[S], O = T[S + 1];
2768
+ this.ctx.quadraticCurveTo(
2769
+ I.x,
2770
+ I.y,
2771
+ (I.x + O.x) * 0.5,
2772
+ (I.y + O.y) * 0.5
2773
+ );
2774
+ }
2775
+ const R = T[T.length - 1], L = T[T.length - 2];
2776
+ this.ctx.quadraticCurveTo(L.x, L.y, R.x, R.y), Math.abs(A) >= Math.PI * 2 - 1e-3 && this.ctx.closePath(), this.ctx.stroke();
2777
+ };
2778
+ if (this.ctx.save(), this.ctx.strokeStyle = this.colorWithAlpha(e.progressAccent, 0.32), this.ctx.lineWidth = g, this.ctx.lineCap = "round", b(0, Math.PI * 2), h > 0) {
2779
+ this.ctx.strokeStyle = this.colorWithAlpha(e.progressAccent, 0.78), this.ctx.lineWidth = g + u * 0.8, this.ctx.shadowColor = e.progressAccent, this.ctx.shadowBlur = 4 + u * 10, b(_, Math.PI * 2 * h);
2780
+ const y = v(m), A = Math.cos(m) * y, M = Math.sin(m) * y;
2781
+ this.ctx.fillStyle = this.colorWithAlpha(e.progressAccent, 0.8), this.ctx.shadowColor = e.progressAccent, this.ctx.shadowBlur = 5 + u * 7, this.ctx.beginPath(), this.ctx.arc(A, M, g * 0.3 + u, 0, Math.PI * 2), this.ctx.fill();
2782
+ const T = Math.PI * 2 * h, R = t.pulsePhase * 0.22 % 0.72, L = _ + T * (0.14 + R);
2783
+ this.ctx.save(), this.ctx.strokeStyle = this.colorWithAlpha(e.progressAccent, 0.55), this.ctx.lineWidth = 1.25, this.ctx.shadowColor = e.progressAccent, this.ctx.shadowBlur = 5, b(L, Math.min(T * 0.16, 0.34)), this.ctx.restore();
2757
2784
  }
2758
- if (this.ctx.strokeStyle = this.colorWithAlpha(o, 0.8), this.ctx.lineWidth = 2.5, this.ctx.shadowColor = o, this.ctx.shadowBlur = 12 + u * 24, this.ctx.beginPath(), this.ctx.arc(0, 0, g + 4, -Math.PI / 2, -Math.PI / 2 + Math.PI * 2 * h), this.ctx.stroke(), u > 0) {
2759
- const x = 1 - u;
2760
- this.ctx.save(), this.ctx.globalAlpha = u * 0.75, this.ctx.strokeStyle = e.effectHighlight, this.ctx.lineWidth = 2 + u * 2, this.ctx.shadowColor = o, this.ctx.shadowBlur = 18, this.ctx.beginPath(), this.ctx.arc(0, 0, g + 10 + x * 28, 0, Math.PI * 2), this.ctx.stroke();
2761
- for (let y = 0; y < 8; y++) {
2762
- const m = y * Math.PI * 2 / 8 + t.pulsePhase * 0.4, v = g + 8, A = v + 10 + x * 16;
2763
- this.ctx.beginPath(), this.ctx.moveTo(Math.cos(m) * v, Math.sin(m) * v), this.ctx.lineTo(Math.cos(m) * A, Math.sin(m) * A), this.ctx.stroke();
2785
+ this.ctx.lineCap = "butt", this.ctx.restore();
2786
+ const f = this.ctx.createRadialGradient(
2787
+ -d * 0.35,
2788
+ -d * 0.35,
2789
+ 1,
2790
+ 0,
2791
+ 0,
2792
+ d
2793
+ );
2794
+ if (f.addColorStop(0, e.effectHighlight), f.addColorStop(0.62, this.colorWithAlpha(e.effectHighlight, 0.96)), f.addColorStop(1, this.colorWithAlpha(e.tendrilCyan, 0.6)), this.ctx.fillStyle = f, this.ctx.shadowColor = u > 0 ? o : e.effectHighlight, this.ctx.shadowBlur = 14 + u * 32, this.ctx.beginPath(), this.ctx.arc(0, 0, d, 0, Math.PI * 2), this.ctx.fill(), u > 0) {
2795
+ const y = 1 - u;
2796
+ this.ctx.save(), this.ctx.globalAlpha = u * 0.75, this.ctx.strokeStyle = e.effectHighlight, this.ctx.lineWidth = 2 + u * 2, this.ctx.shadowColor = o, this.ctx.shadowBlur = 18, this.ctx.beginPath(), this.ctx.arc(0, 0, d + 8 + y * 28, 0, Math.PI * 2), this.ctx.stroke();
2797
+ for (let A = 0; A < 8; A++) {
2798
+ const M = A * Math.PI * 2 / 8 + t.pulsePhase * 0.4, T = d + 8, R = T + 10 + y * 16;
2799
+ this.ctx.beginPath(), this.ctx.moveTo(Math.cos(M) * T, Math.sin(M) * T), this.ctx.lineTo(Math.cos(M) * R, Math.sin(M) * R), this.ctx.stroke();
2764
2800
  }
2765
2801
  this.ctx.restore();
2766
2802
  }
@@ -2839,15 +2875,15 @@ class Mt {
2839
2875
  const n = this.themeManager.getPalette(), o = this.themeManager.getTheme() === "light";
2840
2876
  for (const r of t) {
2841
2877
  if (!r.active) continue;
2842
- const { x: c, y: l } = r.position, h = r.definition.color, u = r.definition.rarity, d = At[u], g = r.radius + Math.sin(e * 6 + r.orbitAngle) * 3;
2878
+ const { x: c, y: l } = r.position, h = r.definition.color, u = r.definition.rarity, d = vt[u], g = r.radius + Math.sin(e * 6 + r.orbitAngle) * 3;
2843
2879
  if (this.ctx.save(), this.ctx.shadowColor = d, this.ctx.shadowBlur = r.isGrabbed ? 36 : u === "legendary" ? 28 : 16, u === "legendary" || u === "epic") {
2844
- const _ = g + 12, x = this.ctx.createRadialGradient(c, l, g, c, l, _);
2845
- x.addColorStop(0, d), x.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = x, this.ctx.beginPath(), this.ctx.arc(c, l, _, 0, Math.PI * 2), this.ctx.fill();
2880
+ const m = g + 12, v = this.ctx.createRadialGradient(c, l, g, c, l, m);
2881
+ v.addColorStop(0, d), v.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = v, this.ctx.beginPath(), this.ctx.arc(c, l, m, 0, Math.PI * 2), this.ctx.fill();
2846
2882
  }
2847
- const b = this.ctx.createRadialGradient(c, l, 2, c, l, g * 1.4);
2848
- b.addColorStop(0, n.effectHighlight), b.addColorStop(0.4, h), b.addColorStop(1, o ? "rgba(23, 50, 77, 0.24)" : "rgba(0, 0, 0, 0.5)"), this.ctx.fillStyle = b, this.ctx.beginPath(), this.ctx.arc(c, l, g, 0, Math.PI * 2), this.ctx.fill(), this.ctx.strokeStyle = d, this.ctx.lineWidth = u === "legendary" ? 3.5 : 2.5, this.ctx.beginPath(), this.ctx.arc(c, l, g + 4, e * 3, e * 3 + Math.PI * 1.2), this.ctx.stroke(), (u === "legendary" || u === "epic") && (this.ctx.strokeStyle = o ? d : n.effectHighlight, this.ctx.lineWidth = 1.5, this.ctx.beginPath(), this.ctx.arc(c, l, g + 8, -e * 2, -e * 2 + Math.PI * 0.9), this.ctx.stroke()), this.ctx.font = "900 14px Orbitron, sans-serif", this.ctx.textAlign = "center", this.ctx.textBaseline = "middle", this.ctx.fillStyle = n.effectInk, this.ctx.shadowColor = n.effectShadow, this.ctx.shadowBlur = 6, this.ctx.fillText(r.definition.badge, c, l);
2849
- const f = i ? i.translate(r.definition.titleKey) : r.definition.badge;
2850
- this.ctx.textBaseline = "alphabetic", this.ctx.font = "900 16px Orbitron, sans-serif", this.ctx.fillStyle = n.effectInk, this.ctx.shadowColor = d, this.ctx.shadowBlur = 14, this.ctx.fillText(f, c, l - g - 14), this.ctx.restore();
2883
+ const E = this.ctx.createRadialGradient(c, l, 2, c, l, g * 1.4);
2884
+ E.addColorStop(0, n.effectHighlight), E.addColorStop(0.4, h), E.addColorStop(1, o ? "rgba(23, 50, 77, 0.24)" : "rgba(0, 0, 0, 0.5)"), this.ctx.fillStyle = E, this.ctx.beginPath(), this.ctx.arc(c, l, g, 0, Math.PI * 2), this.ctx.fill(), this.ctx.strokeStyle = d, this.ctx.lineWidth = u === "legendary" ? 3.5 : 2.5, this.ctx.beginPath(), this.ctx.arc(c, l, g + 4, e * 3, e * 3 + Math.PI * 1.2), this.ctx.stroke(), (u === "legendary" || u === "epic") && (this.ctx.strokeStyle = o ? d : n.effectHighlight, this.ctx.lineWidth = 1.5, this.ctx.beginPath(), this.ctx.arc(c, l, g + 8, -e * 2, -e * 2 + Math.PI * 0.9), this.ctx.stroke()), this.ctx.font = "900 14px Orbitron, sans-serif", this.ctx.textAlign = "center", this.ctx.textBaseline = "middle", this.ctx.fillStyle = n.effectInk, this.ctx.shadowColor = n.effectShadow, this.ctx.shadowBlur = 6, this.ctx.fillText(r.definition.badge, c, l);
2885
+ const _ = i ? i.translate(r.definition.titleKey) : r.definition.badge;
2886
+ this.ctx.textBaseline = "alphabetic", this.ctx.font = "900 16px Orbitron, sans-serif", this.ctx.fillStyle = n.effectInk, this.ctx.shadowColor = d, this.ctx.shadowBlur = 14, this.ctx.fillText(_, c, l - g - 14), this.ctx.restore();
2851
2887
  }
2852
2888
  if (i && s) {
2853
2889
  const r = this.canvas.width / 2, c = this.canvas.height / 2 + 210, l = i.translate("rerollButton", { count: a });
@@ -2964,13 +3000,13 @@ class Tt {
2964
3000
  ko: "한국어 (KO)",
2965
3001
  zh: "中文 (ZH)"
2966
3002
  };
2967
- for (const I of tt) {
2968
- const M = document.createElement("option");
2969
- M.value = I, M.textContent = n[I], this.i18n.getLanguage() === I && (M.selected = !0), a.appendChild(M);
3003
+ for (const S of tt) {
3004
+ const I = document.createElement("option");
3005
+ I.value = S, I.textContent = n[S], this.i18n.getLanguage() === S && (I.selected = !0), a.appendChild(I);
2970
3006
  }
2971
3007
  a.addEventListener("change", () => {
2972
- const I = a.value;
2973
- this.i18n.setLanguage(I), this.onLanguageChangedCallback && this.onLanguageChangedCallback(I), this.renderContent();
3008
+ const S = a.value;
3009
+ this.i18n.setLanguage(S), this.onLanguageChangedCallback && this.onLanguageChangedCallback(S), this.renderContent();
2974
3010
  });
2975
3011
  const o = document.createElement("span");
2976
3012
  o.className = "axon-select-arrow", o.textContent = "▼", s.appendChild(a), s.appendChild(o), e.appendChild(i), e.appendChild(s);
@@ -2985,11 +3021,11 @@ class Tt {
2985
3021
  { id: "dark", label: "DARK" },
2986
3022
  { id: "light", label: "LIGHT" }
2987
3023
  ];
2988
- for (const I of h) {
2989
- const M = document.createElement("button");
2990
- M.type = "button", M.className = `axon-toggle-btn ${this.themeManager.getTheme() === I.id ? "active" : ""}`, M.textContent = I.label, M.addEventListener("click", () => {
2991
- this.themeManager.setTheme(I.id), this.renderContent();
2992
- }), l.appendChild(M);
3024
+ for (const S of h) {
3025
+ const I = document.createElement("button");
3026
+ I.type = "button", I.className = `axon-toggle-btn ${this.themeManager.getTheme() === S.id ? "active" : ""}`, I.textContent = S.label, I.addEventListener("click", () => {
3027
+ this.themeManager.setTheme(S.id), this.renderContent();
3028
+ }), l.appendChild(I);
2993
3029
  }
2994
3030
  r.appendChild(c), r.appendChild(l);
2995
3031
  const u = document.createElement("div");
@@ -2998,58 +3034,58 @@ class Tt {
2998
3034
  d.textContent = this.i18n.translate("fpsLimitLabel");
2999
3035
  const g = document.createElement("div");
3000
3036
  g.className = "axon-toggle-group";
3001
- const b = [
3037
+ const E = [
3002
3038
  { limit: 30, label: "30 FPS" },
3003
3039
  { limit: 60, label: "60 FPS" },
3004
3040
  { limit: 120, label: "120 FPS" }
3005
3041
  ];
3006
- for (const I of b) {
3007
- const M = document.createElement("button");
3008
- M.type = "button", M.className = `axon-toggle-btn ${this.fpsLimit === I.limit ? "active" : ""}`, M.textContent = I.label, M.addEventListener("click", () => {
3009
- this.fpsLimit = I.limit, localStorage.setItem("axon_surge_fps_limit", String(I.limit)), this.onFpsLimitChangedCallback?.(I.limit), this.renderContent();
3010
- }), g.appendChild(M);
3042
+ for (const S of E) {
3043
+ const I = document.createElement("button");
3044
+ I.type = "button", I.className = `axon-toggle-btn ${this.fpsLimit === S.limit ? "active" : ""}`, I.textContent = S.label, I.addEventListener("click", () => {
3045
+ this.fpsLimit = S.limit, localStorage.setItem("axon_surge_fps_limit", String(S.limit)), this.onFpsLimitChangedCallback?.(S.limit), this.renderContent();
3046
+ }), g.appendChild(I);
3011
3047
  }
3012
3048
  u.appendChild(d), u.appendChild(g);
3013
- const f = document.createElement("div");
3014
- f.className = "axon-setting-row";
3015
- const _ = document.createElement("span");
3016
- _.textContent = this.i18n.translate("hapticsLabel");
3017
- const x = document.createElement("div");
3018
- x.className = "axon-toggle-group";
3019
- const y = [
3049
+ const _ = document.createElement("div");
3050
+ _.className = "axon-setting-row";
3051
+ const m = document.createElement("span");
3052
+ m.textContent = this.i18n.translate("hapticsLabel");
3053
+ const v = document.createElement("div");
3054
+ v.className = "axon-toggle-group";
3055
+ const b = [
3020
3056
  { enabled: !0, label: this.i18n.translate("hapticsOn") },
3021
3057
  { enabled: !1, label: this.i18n.translate("hapticsOff") }
3022
3058
  ];
3023
- for (const I of y) {
3024
- const M = document.createElement("button");
3025
- M.type = "button", M.className = `axon-toggle-btn ${this.hapticsEnabled === I.enabled ? "active" : ""}`, M.textContent = I.label, M.addEventListener("click", () => {
3026
- this.hapticsEnabled = I.enabled, localStorage.setItem("axon_surge_haptics", String(I.enabled)), this.hapticsEnabled && this.platform.haptics.selectionChanged(), this.renderContent();
3027
- }), x.appendChild(M);
3059
+ for (const S of b) {
3060
+ const I = document.createElement("button");
3061
+ I.type = "button", I.className = `axon-toggle-btn ${this.hapticsEnabled === S.enabled ? "active" : ""}`, I.textContent = S.label, I.addEventListener("click", () => {
3062
+ this.hapticsEnabled = S.enabled, localStorage.setItem("axon_surge_haptics", String(S.enabled)), this.hapticsEnabled && this.platform.haptics.selectionChanged(), this.renderContent();
3063
+ }), v.appendChild(I);
3028
3064
  }
3029
- f.appendChild(_), f.appendChild(x);
3030
- const m = document.createElement("div");
3031
- m.className = "axon-setting-row";
3032
- const v = document.createElement("span");
3033
- v.textContent = this.i18n.translate("tutorialSettingLabel");
3065
+ _.appendChild(m), _.appendChild(v);
3066
+ const f = document.createElement("div");
3067
+ f.className = "axon-setting-row";
3068
+ const y = document.createElement("span");
3069
+ y.textContent = this.i18n.translate("tutorialSettingLabel");
3034
3070
  const A = document.createElement("div");
3035
3071
  A.className = "axon-toggle-group";
3036
- const S = localStorage.getItem("axon_surge_show_tutorial") !== "false", L = [
3072
+ const M = localStorage.getItem("axon_surge_show_tutorial") !== "false", T = [
3037
3073
  { enabled: !0, label: this.i18n.translate("hapticsOn") },
3038
3074
  { enabled: !1, label: this.i18n.translate("hapticsOff") }
3039
3075
  ];
3040
- for (const I of L) {
3041
- const M = document.createElement("button");
3042
- M.type = "button", M.className = `axon-toggle-btn ${S === I.enabled ? "active" : ""}`, M.textContent = I.label, M.addEventListener("click", () => {
3043
- localStorage.setItem("axon_surge_show_tutorial", String(I.enabled)), this.renderContent();
3044
- }), A.appendChild(M);
3076
+ for (const S of T) {
3077
+ const I = document.createElement("button");
3078
+ I.type = "button", I.className = `axon-toggle-btn ${M === S.enabled ? "active" : ""}`, I.textContent = S.label, I.addEventListener("click", () => {
3079
+ localStorage.setItem("axon_surge_show_tutorial", String(S.enabled)), this.renderContent();
3080
+ }), A.appendChild(I);
3045
3081
  }
3046
- m.appendChild(v), m.appendChild(A);
3047
- const T = document.createElement("div");
3048
- T.className = "axon-settings-credits", T.textContent = this.i18n.translate("creditsJam");
3049
- const O = document.createElement("button");
3050
- O.type = "button", O.className = "axon-start-button", O.style.padding = "12px 36px", O.style.fontSize = "14px", O.textContent = this.i18n.translate("closeButton"), O.addEventListener("click", () => {
3082
+ f.appendChild(y), f.appendChild(A);
3083
+ const R = document.createElement("div");
3084
+ R.className = "axon-settings-credits", R.textContent = this.i18n.translate("creditsJam");
3085
+ const L = document.createElement("button");
3086
+ L.type = "button", L.className = "axon-start-button", L.style.padding = "12px 36px", L.style.fontSize = "14px", L.textContent = this.i18n.translate("closeButton"), L.addEventListener("click", () => {
3051
3087
  this.modal.close();
3052
- }), this.card.appendChild(t), this.card.appendChild(e), this.card.appendChild(r), this.card.appendChild(u), this.card.appendChild(f), this.card.appendChild(m), this.card.appendChild(T), this.card.appendChild(O);
3088
+ }), this.card.appendChild(t), this.card.appendChild(e), this.card.appendChild(r), this.card.appendChild(u), this.card.appendChild(_), this.card.appendChild(f), this.card.appendChild(R), this.card.appendChild(L);
3053
3089
  }
3054
3090
  isHapticsEnabled() {
3055
3091
  return this.hapticsEnabled;
@@ -3069,7 +3105,7 @@ class Rt {
3069
3105
  this.content = t;
3070
3106
  }
3071
3107
  createEnemy(t, e, i) {
3072
- const s = `enemy_${Date.now()}_${Math.random()}`, a = new F(s);
3108
+ const s = `enemy_${Date.now()}_${Math.random()}`, a = new V(s);
3073
3109
  return this.configureEnemy(a, t, e, i), a;
3074
3110
  }
3075
3111
  configureEnemy(t, e, i, s) {
@@ -3209,7 +3245,10 @@ class Pt {
3209
3245
  this.onLevelUpCallback = t;
3210
3246
  }
3211
3247
  getExperienceRequiredForLevel(t) {
3212
- return t === 1 ? 3 : t === 2 ? 6 : t === 3 ? 10 : 10 + (t - 3) * 6;
3248
+ const e = [12, 16, 20, 20, 24, 28, 34, 42, 52, 64, 78, 94];
3249
+ if (t <= e.length) return e[t - 1];
3250
+ const i = e[e.length - 1], s = t - e.length;
3251
+ return i + s * 18 + s * s * 2;
3213
3252
  }
3214
3253
  addExperience(t = 1) {
3215
3254
  this.experienceCount += Math.max(0, t);
@@ -3242,7 +3281,7 @@ class Pt {
3242
3281
  return Math.min(1, this.experienceCount / t);
3243
3282
  }
3244
3283
  }
3245
- class P {
3284
+ class w {
3246
3285
  constructor(t) {
3247
3286
  this.kind = t;
3248
3287
  }
@@ -3282,7 +3321,7 @@ class wt {
3282
3321
  constructor(t) {
3283
3322
  this.configManager = t;
3284
3323
  }
3285
- registry = new P("power-up");
3324
+ registry = new w("power-up");
3286
3325
  defaultsRegistered = !1;
3287
3326
  defaultPowerUps = [
3288
3327
  {
@@ -3293,7 +3332,7 @@ class wt {
3293
3332
  category: "radius",
3294
3333
  rarity: "common",
3295
3334
  rarityWeight: 35,
3296
- color: E.spore,
3335
+ color: x.spore,
3297
3336
  apply: () => {
3298
3337
  const t = this.configManager, e = t.getConfig().toxicPool;
3299
3338
  t.updateConfig({
@@ -3313,7 +3352,7 @@ class wt {
3313
3352
  category: "duration",
3314
3353
  rarity: "common",
3315
3354
  rarityWeight: 35,
3316
- color: E.spore,
3355
+ color: x.spore,
3317
3356
  apply: () => {
3318
3357
  const t = this.configManager, e = t.getConfig().toxicPool;
3319
3358
  t.updateConfig({
@@ -3333,7 +3372,7 @@ class wt {
3333
3372
  category: "radius",
3334
3373
  rarity: "common",
3335
3374
  rarityWeight: 35,
3336
- color: E.parasite,
3375
+ color: x.parasite,
3337
3376
  apply: () => {
3338
3377
  const t = this.configManager, e = t.getConfig().gravityVortex;
3339
3378
  t.updateConfig({
@@ -3353,7 +3392,7 @@ class wt {
3353
3392
  category: "duration",
3354
3393
  rarity: "common",
3355
3394
  rarityWeight: 35,
3356
- color: E.parasite,
3395
+ color: x.parasite,
3357
3396
  apply: () => {
3358
3397
  const t = this.configManager, e = t.getConfig().gravityVortex;
3359
3398
  t.updateConfig({
@@ -3373,7 +3412,7 @@ class wt {
3373
3412
  category: "power",
3374
3413
  rarity: "rare",
3375
3414
  rarityWeight: 25,
3376
- color: E.parasite,
3415
+ color: x.parasite,
3377
3416
  apply: () => {
3378
3417
  const t = this.configManager, e = t.getConfig().gravityVortex;
3379
3418
  t.updateConfig({
@@ -3394,7 +3433,7 @@ class wt {
3394
3433
  category: "power",
3395
3434
  rarity: "legendary",
3396
3435
  rarityWeight: 5,
3397
- color: E.parasite,
3436
+ color: x.parasite,
3398
3437
  apply: () => {
3399
3438
  const t = this.configManager, e = t.getConfig().gravityVortex;
3400
3439
  t.updateConfig({
@@ -3414,7 +3453,7 @@ class wt {
3414
3453
  category: "power",
3415
3454
  rarity: "legendary",
3416
3455
  rarityWeight: 5,
3417
- color: E.heavy,
3456
+ color: x.heavy,
3418
3457
  apply: () => {
3419
3458
  const t = this.configManager, e = t.getConfig().shield;
3420
3459
  t.updateConfig({
@@ -3434,7 +3473,7 @@ class wt {
3434
3473
  category: "power",
3435
3474
  rarity: "epic",
3436
3475
  rarityWeight: 15,
3437
- color: E.heavy,
3476
+ color: x.heavy,
3438
3477
  apply: () => {
3439
3478
  const t = this.configManager, e = t.getConfig().shield;
3440
3479
  t.updateConfig({
@@ -3455,7 +3494,7 @@ class wt {
3455
3494
  category: "defense",
3456
3495
  rarity: "common",
3457
3496
  rarityWeight: 35,
3458
- color: E.heavy,
3497
+ color: x.heavy,
3459
3498
  apply: () => {
3460
3499
  const t = this.configManager, e = t.getConfig().shield;
3461
3500
  t.updateConfig({
@@ -3474,7 +3513,7 @@ class wt {
3474
3513
  category: "power",
3475
3514
  rarity: "rare",
3476
3515
  rarityWeight: 25,
3477
- color: E.cluster,
3516
+ color: x.cluster,
3478
3517
  apply: () => {
3479
3518
  const t = this.configManager, e = t.getConfig().cluster;
3480
3519
  t.updateConfig({
@@ -3494,7 +3533,7 @@ class wt {
3494
3533
  category: "power",
3495
3534
  rarity: "legendary",
3496
3535
  rarityWeight: 5,
3497
- color: E.cluster,
3536
+ color: x.cluster,
3498
3537
  apply: () => {
3499
3538
  const t = this.configManager, e = t.getConfig().cluster;
3500
3539
  t.updateConfig({
@@ -3513,7 +3552,7 @@ class wt {
3513
3552
  category: "power",
3514
3553
  rarity: "epic",
3515
3554
  rarityWeight: 15,
3516
- color: E.piercer,
3555
+ color: x.piercer,
3517
3556
  apply: () => {
3518
3557
  const t = this.configManager, e = t.getConfig().piercer;
3519
3558
  t.updateConfig({
@@ -3533,7 +3572,7 @@ class wt {
3533
3572
  category: "power",
3534
3573
  rarity: "legendary",
3535
3574
  rarityWeight: 5,
3536
- color: E.piercer,
3575
+ color: x.piercer,
3537
3576
  apply: () => {
3538
3577
  const t = this.configManager, e = t.getConfig().piercer;
3539
3578
  t.updateConfig({
@@ -3553,7 +3592,7 @@ class wt {
3553
3592
  category: "defense",
3554
3593
  rarity: "legendary",
3555
3594
  rarityWeight: 5,
3556
- color: E.core,
3595
+ color: x.core,
3557
3596
  apply: () => {
3558
3597
  const t = this.configManager, e = t.getConfig().core;
3559
3598
  t.updateConfig({
@@ -3573,7 +3612,7 @@ class wt {
3573
3612
  category: "power",
3574
3613
  rarity: "epic",
3575
3614
  rarityWeight: 15,
3576
- color: E.piercer,
3615
+ color: x.piercer,
3577
3616
  apply: () => {
3578
3617
  const t = this.configManager, e = t.getConfig().piercer;
3579
3618
  t.updateConfig({
@@ -3593,7 +3632,7 @@ class wt {
3593
3632
  category: "defense",
3594
3633
  rarity: "epic",
3595
3634
  rarityWeight: 15,
3596
- color: E.core,
3635
+ color: x.core,
3597
3636
  apply: () => {
3598
3637
  const t = this.configManager, e = t.getConfig().core;
3599
3638
  t.updateConfig({
@@ -3613,7 +3652,7 @@ class wt {
3613
3652
  category: "defense",
3614
3653
  rarity: "rare",
3615
3654
  rarityWeight: 25,
3616
- color: E.core,
3655
+ color: x.core,
3617
3656
  apply: () => {
3618
3657
  const t = this.configManager, e = t.getConfig().core;
3619
3658
  t.updateConfig({
@@ -3632,7 +3671,7 @@ class wt {
3632
3671
  category: "defense",
3633
3672
  rarity: "rare",
3634
3673
  rarityWeight: 20,
3635
- color: E.core,
3674
+ color: x.core,
3636
3675
  apply: (t) => {
3637
3676
  this.configManager.addCoreRing(1), t && t.addMaxRing(1);
3638
3677
  }
@@ -3645,7 +3684,7 @@ class wt {
3645
3684
  category: "magnet",
3646
3685
  rarity: "common",
3647
3686
  rarityWeight: 35,
3648
- color: E.core,
3687
+ color: x.core,
3649
3688
  apply: () => {
3650
3689
  const t = this.configManager, e = t.getConfig().magnet;
3651
3690
  t.updateConfig({
@@ -3664,7 +3703,7 @@ class wt {
3664
3703
  category: "magnet",
3665
3704
  rarity: "rare",
3666
3705
  rarityWeight: 25,
3667
- color: E.core,
3706
+ color: x.core,
3668
3707
  apply: () => {
3669
3708
  const t = this.configManager, e = t.getConfig().magnet;
3670
3709
  t.updateConfig({
@@ -3742,15 +3781,15 @@ class Ot {
3742
3781
  };
3743
3782
  }
3744
3783
  class Dt {
3745
- enemies = new P("enemy");
3746
- variants = new P("enemy variant");
3747
- powerUps = new P("power-up");
3748
- synergies = new P("synergy");
3749
- areas = new P("area");
3750
- bosses = new P("boss");
3751
- bossRewards = new P("boss reward");
3752
- cores = new P("core");
3753
- spawnerPatterns = new P("spawner pattern");
3784
+ enemies = new w("enemy");
3785
+ variants = new w("enemy variant");
3786
+ powerUps = new w("power-up");
3787
+ synergies = new w("synergy");
3788
+ areas = new w("area");
3789
+ bosses = new w("boss");
3790
+ bossRewards = new w("boss reward");
3791
+ cores = new w("core");
3792
+ spawnerPatterns = new w("spawner pattern");
3754
3793
  tutorial;
3755
3794
  constructor(t = {}) {
3756
3795
  this.tutorial = t.tutorial, this.enemies.registerMany(t.enemies ?? []), this.variants.registerMany(t.variants ?? []), this.powerUps.registerMany(t.powerUps ?? []), this.synergies.registerMany(t.synergies ?? []), this.areas.registerMany(t.areas ?? []), this.bosses.registerMany(t.bosses ?? []), this.bossRewards.registerMany(t.bossRewards ?? []), this.cores.registerMany(t.cores ?? []), this.spawnerPatterns.registerMany(t.spawnerPatterns ?? []);
@@ -3786,48 +3825,48 @@ class Nt {
3786
3825
  position: { ...r },
3787
3826
  radius: 15,
3788
3827
  maxRadius: 280,
3789
- color: E.cluster,
3828
+ color: x.cluster,
3790
3829
  alpha: 1,
3791
3830
  lifetime: 0,
3792
3831
  maxLifetime: 0.6
3793
3832
  });
3794
3833
  for (let d = 0; d < l; d++) {
3795
- const g = d * Math.PI * 2 / l, b = 800 + Math.random() * 300, f = {
3834
+ const g = d * Math.PI * 2 / l, E = 800 + Math.random() * 300, _ = {
3796
3835
  x: r.x + Math.cos(g) * 45,
3797
3836
  y: r.y + Math.sin(g) * 45
3798
3837
  };
3799
- let _ = g;
3838
+ let m = g;
3800
3839
  if (h) {
3801
- let m = null, v = 1 / 0;
3840
+ let f = null, y = 1 / 0;
3802
3841
  for (const A of s) {
3803
3842
  if (A === e || A === i || !A.active || A.isGrabbed || A.isDying) continue;
3804
- const S = Math.hypot(A.position.x - f.x, A.position.y - f.y);
3805
- S < v && (v = S, m = A);
3843
+ const M = Math.hypot(A.position.x - _.x, A.position.y - _.y);
3844
+ M < y && (y = M, f = A);
3806
3845
  }
3807
- m && (_ = Math.atan2(m.position.y - f.y, m.position.x - f.x));
3846
+ f && (m = Math.atan2(f.position.y - _.y, f.position.x - _.x));
3808
3847
  }
3809
- const x = e.behavior.spawnedEnemyIds?.[0];
3810
- if (!x) continue;
3811
- const y = t.factory.createEnemy(x, f, {
3812
- x: f.x + Math.cos(_) * 500,
3813
- y: f.y + Math.sin(_) * 500
3848
+ const v = e.behavior.spawnedEnemyIds?.[0];
3849
+ if (!v) continue;
3850
+ const b = t.factory.createEnemy(v, _, {
3851
+ x: _.x + Math.cos(m) * 500,
3852
+ y: _.y + Math.sin(m) * 500
3814
3853
  });
3815
- y.isThrown = !0, y.wasManipulated = !0, y.velocity = {
3816
- x: Math.cos(_) * b,
3817
- y: Math.sin(_) * b
3818
- }, s.push(y);
3854
+ b.isThrown = !0, b.wasManipulated = !0, b.velocity = {
3855
+ x: Math.cos(m) * E,
3856
+ y: Math.sin(m) * E
3857
+ }, s.push(b);
3819
3858
  }
3820
3859
  const u = Math.min(
3821
3860
  c.cluster.explosionParticleCount,
3822
3861
  Math.max(0, 96 - n.length)
3823
3862
  );
3824
3863
  for (let d = 0; d < u; d++) {
3825
- const g = Math.random() * Math.PI * 2, b = 200 + Math.random() * 300;
3864
+ const g = Math.random() * Math.PI * 2, E = 200 + Math.random() * 300;
3826
3865
  n.push({
3827
3866
  id: Math.random().toString(),
3828
3867
  position: { ...r },
3829
- velocity: { x: Math.cos(g) * b, y: Math.sin(g) * b },
3830
- color: E.cluster,
3868
+ velocity: { x: Math.cos(g) * E, y: Math.sin(g) * E },
3869
+ color: x.cluster,
3831
3870
  radius: 4 + Math.random() * 4,
3832
3871
  alpha: 1,
3833
3872
  lifetime: 0,
@@ -3839,7 +3878,7 @@ class Nt {
3839
3878
  text: "CLUSTER DETONATION",
3840
3879
  position: { ...r },
3841
3880
  velocity: { x: 0, y: -60 },
3842
- color: E.cluster,
3881
+ color: x.cluster,
3843
3882
  alpha: 1,
3844
3883
  lifetime: 0,
3845
3884
  maxLifetime: 1,
@@ -3865,7 +3904,7 @@ class kt {
3865
3904
  position: o,
3866
3905
  radius: 20,
3867
3906
  maxRadius: Math.round(n.gravityVortex.baseRadius * 2.2),
3868
- color: E.parasite,
3907
+ color: x.parasite,
3869
3908
  alpha: 1,
3870
3909
  lifetime: 0,
3871
3910
  maxLifetime: 0.65
@@ -3875,38 +3914,38 @@ class kt {
3875
3914
  class Ut {
3876
3915
  execute(t) {
3877
3916
  const { thrownEnemy: e, targetEnemy: i, allEnemies: s, shockwaves: a, particles: n, floatingTexts: o } = t, r = i.position.x - e.position.x, c = i.position.y - e.position.y, l = Math.atan2(c, r), h = t.config.shield, u = h.blastSpeed || 1400, d = h.isFanBlast ? [0, -h.fanBlastAngle, h.fanBlastAngle] : [0];
3878
- for (const [g, b] of d.entries()) {
3879
- const f = l + b, _ = g === 0 ? e : t.factory.createEnemy(
3917
+ for (const [g, E] of d.entries()) {
3918
+ const _ = l + E, m = g === 0 ? e : t.factory.createEnemy(
3880
3919
  e.type,
3881
3920
  {
3882
- x: e.position.x + Math.cos(f) * 30,
3883
- y: e.position.y + Math.sin(f) * 30
3921
+ x: e.position.x + Math.cos(_) * 30,
3922
+ y: e.position.y + Math.sin(_) * 30
3884
3923
  },
3885
3924
  { x: 0, y: 0 }
3886
3925
  );
3887
- _.isStationaryShield = !1, _.isThrown = !0, _.wasManipulated = !0, _.shieldAngle = f, _.rotation = f, _.launchDelay = h.isFanBlast ? g * h.fanBlastInterval : 0, _.velocity = {
3888
- x: Math.cos(f) * u,
3889
- y: Math.sin(f) * u
3890
- }, _ !== e && s.push(_);
3926
+ m.isStationaryShield = !1, m.isThrown = !0, m.wasManipulated = !0, m.shieldAngle = _, m.rotation = _, m.launchDelay = h.isFanBlast ? g * h.fanBlastInterval : 0, m.velocity = {
3927
+ x: Math.cos(_) * u,
3928
+ y: Math.sin(_) * u
3929
+ }, m !== e && s.push(m);
3891
3930
  }
3892
3931
  i.active = !1, i.triggerDissolveDeath(!0), o.push({
3893
3932
  id: Math.random().toString(),
3894
3933
  text: "ARC BLAST!",
3895
3934
  position: { ...e.position },
3896
3935
  velocity: { x: 0, y: -50 },
3897
- color: E.heavy,
3936
+ color: x.heavy,
3898
3937
  alpha: 1,
3899
3938
  lifetime: 0,
3900
3939
  maxLifetime: 0.9,
3901
3940
  size: 24
3902
3941
  });
3903
3942
  for (let g = 0; g < 50; g++) {
3904
- const b = (Math.random() - 0.5) * 1.5, f = l + b, _ = 300 + Math.random() * 500;
3943
+ const E = (Math.random() - 0.5) * 1.5, _ = l + E, m = 300 + Math.random() * 500;
3905
3944
  n.push({
3906
3945
  id: Math.random().toString(),
3907
3946
  position: { ...e.position },
3908
- velocity: { x: Math.cos(f) * _, y: Math.sin(f) * _ },
3909
- color: E.heavy,
3947
+ velocity: { x: Math.cos(_) * m, y: Math.sin(_) * m },
3948
+ color: x.heavy,
3910
3949
  radius: 4 + Math.random() * 6,
3911
3950
  alpha: 1,
3912
3951
  lifetime: 0,
@@ -3918,7 +3957,7 @@ class Ut {
3918
3957
  text: "ARC BLAST!",
3919
3958
  position: { ...e.position },
3920
3959
  velocity: { x: 0, y: -50 },
3921
- color: E.heavy,
3960
+ color: x.heavy,
3922
3961
  alpha: 1,
3923
3962
  lifetime: 0,
3924
3963
  maxLifetime: 0.9,
@@ -3934,7 +3973,7 @@ class Gt {
3934
3973
  position: { ...i.position },
3935
3974
  radius: 10,
3936
3975
  maxRadius: 180,
3937
- color: E.piercer,
3976
+ color: x.piercer,
3938
3977
  alpha: 1,
3939
3978
  lifetime: 0,
3940
3979
  maxLifetime: 0.5
@@ -3945,7 +3984,7 @@ class Gt {
3945
3984
  id: Math.random().toString(),
3946
3985
  position: { ...i.position },
3947
3986
  velocity: { x: Math.cos(r) * c, y: Math.sin(r) * c },
3948
- color: E.piercer,
3987
+ color: x.piercer,
3949
3988
  radius: 3 + Math.random() * 4,
3950
3989
  alpha: 1,
3951
3990
  lifetime: 0,
@@ -3957,7 +3996,7 @@ class Gt {
3957
3996
  text: "PIERCING SLICE",
3958
3997
  position: { ...i.position },
3959
3998
  velocity: { x: 0, y: -50 },
3960
- color: E.piercer,
3999
+ color: x.piercer,
3961
4000
  alpha: 1,
3962
4001
  lifetime: 0,
3963
4002
  maxLifetime: 0.8,
@@ -3980,7 +4019,7 @@ class Bt {
3980
4019
  position: { ...r },
3981
4020
  radius: 10,
3982
4021
  maxRadius: Math.round(c.toxicPool.baseRadius * 2.2),
3983
- color: E.spore,
4022
+ color: x.spore,
3984
4023
  alpha: 1,
3985
4024
  lifetime: 0,
3986
4025
  maxLifetime: 0.6
@@ -3991,7 +4030,7 @@ class Bt {
3991
4030
  id: Math.random().toString(),
3992
4031
  position: { ...r },
3993
4032
  velocity: { x: Math.cos(h) * u, y: Math.sin(h) * u },
3994
- color: E.spore,
4033
+ color: x.spore,
3995
4034
  radius: 4 + Math.random() * 5,
3996
4035
  alpha: 1,
3997
4036
  lifetime: 0,
@@ -4003,7 +4042,7 @@ class Bt {
4003
4042
  text: "MASSIVE SPORE NEBULA",
4004
4043
  position: { ...r },
4005
4044
  velocity: { x: 0, y: -60 },
4006
- color: E.spore,
4045
+ color: x.spore,
4007
4046
  alpha: 1,
4008
4047
  lifetime: 0,
4009
4048
  maxLifetime: 1.2,
@@ -4011,7 +4050,7 @@ class Bt {
4011
4050
  }), e.experienceDropPending = !0, e.active = !1, o.emit("onPoolCreated", { position: r });
4012
4051
  }
4013
4052
  }
4014
- const W = (p, t, e = []) => {
4053
+ const $ = (p, t, e = []) => {
4015
4054
  let i = null, s = 1 / 0;
4016
4055
  for (const a of t) {
4017
4056
  if (a === p || e.includes(a) || !a.active || a.isGrabbed || a.isDying) continue;
@@ -4019,7 +4058,7 @@ const W = (p, t, e = []) => {
4019
4058
  n < s && (s = n, i = a);
4020
4059
  }
4021
4060
  return i;
4022
- }, Y = (p, t, e, i, s = t.color) => {
4061
+ }, Z = (p, t, e, i, s = t.color) => {
4023
4062
  p.shockwaves.push({
4024
4063
  id: Math.random().toString(),
4025
4064
  position: { ...t.position },
@@ -4050,7 +4089,7 @@ const W = (p, t, e = []) => {
4050
4089
  t.config.piercer.hasHoming && (p.remainingHomingKills = t.config.piercer.homingTargets);
4051
4090
  }, Ft = (p, t) => {
4052
4091
  if (!p.isThrown || !t.config.piercer.hasHoming || p.remainingHomingKills <= 0) return;
4053
- const e = W(p, t.enemies);
4092
+ const e = $(p, t.enemies);
4054
4093
  if (!e) return;
4055
4094
  const i = Math.atan2(e.position.y - p.position.y, e.position.x - p.position.x), s = Math.max(Math.hypot(p.velocity.x, p.velocity.y), 1e3), a = Math.atan2(p.velocity.y, p.velocity.x);
4056
4095
  let n = i - a;
@@ -4058,12 +4097,12 @@ const W = (p, t, e = []) => {
4058
4097
  for (; n > Math.PI; ) n -= Math.PI * 2;
4059
4098
  const o = a + Math.sign(n) * Math.min(Math.abs(n), 25 * t.dt);
4060
4099
  p.rotation = o, p.velocity = { x: Math.cos(o) * s, y: Math.sin(o) * s };
4061
- }, Vt = (p, t) => {
4062
- Y(t, p, 350, 0.6), et(t, p, 40);
4063
4100
  }, Wt = (p, t) => {
4101
+ Z(t, p, 350, 0.6), et(t, p, 40);
4102
+ }, Vt = (p, t) => {
4064
4103
  const e = t.config.piercer.terminalAoERadius;
4065
4104
  if (!(e <= 0)) {
4066
- Y(t, p, e, 0.6);
4105
+ Z(t, p, e, 0.6);
4067
4106
  for (const i of t.spatialHash.getNearby(p.position, e)) {
4068
4107
  if (!i.active || i.isGrabbed || i.isDying) continue;
4069
4108
  const s = i.position.x - p.position.x, a = i.position.y - p.position.y;
@@ -4096,16 +4135,16 @@ const W = (p, t, e = []) => {
4096
4135
  if (p.juice.triggerHitstop(0.05), p.juice.triggerScreenShake({
4097
4136
  x: e.position.x - t.position.x,
4098
4137
  y: e.position.y - t.position.y
4099
- }, 7), Y(p, e, 180, 0.45), et(p, e, 16), t.remainingHomingKills > 0) {
4138
+ }, 7), Z(p, e, 180, 0.45), et(p, e, 16), t.remainingHomingKills > 0) {
4100
4139
  t.remainingHomingKills--;
4101
- const i = W(t, p.enemies, [e]);
4140
+ const i = $(t, p.enemies, [e]);
4102
4141
  if (i) {
4103
4142
  const s = Math.atan2(i.position.y - t.position.y, i.position.x - t.position.x), a = Math.hypot(t.velocity.x, t.velocity.y) || 1200;
4104
4143
  t.rotation = s, t.velocity = { x: Math.cos(s) * a, y: Math.sin(s) * a };
4105
4144
  }
4106
4145
  }
4107
4146
  return !0;
4108
- }, zt = (p) => {
4147
+ }, Xt = (p) => {
4109
4148
  p.enemy.triggerDissolveDeath(!0);
4110
4149
  const t = p.config.toxicPool;
4111
4150
  p.pools.push({
@@ -4116,7 +4155,7 @@ const W = (p, t, e = []) => {
4116
4155
  maxDuration: t.baseDuration,
4117
4156
  damage: t.damage
4118
4157
  });
4119
- }, Xt = (p) => {
4158
+ }, zt = (p) => {
4120
4159
  p.enemy.triggerDissolveDeath(!0);
4121
4160
  const t = p.config.cluster, e = p.enemy.behavior.spawnedEnemyIds?.[0];
4122
4161
  if (e)
@@ -4127,7 +4166,7 @@ const W = (p, t, e = []) => {
4127
4166
  };
4128
4167
  let n = s;
4129
4168
  if (t.hasHoming) {
4130
- const r = W(p.enemy, p.enemies);
4169
+ const r = $(p.enemy, p.enemies);
4131
4170
  r && (n = Math.atan2(r.position.y - a.y, r.position.x - a.x));
4132
4171
  }
4133
4172
  const o = p.factory.createEnemy(e, a, {
@@ -4157,7 +4196,7 @@ const W = (p, t, e = []) => {
4157
4196
  continuesThroughTargets: !0,
4158
4197
  onRelease: Kt,
4159
4198
  onThrownUpdate: Ft,
4160
- onOutOfBounds: Wt,
4199
+ onOutOfBounds: Vt,
4161
4200
  onCollision: Zt,
4162
4201
  onChainReaction: jt,
4163
4202
  canInteractWithHazard: qt,
@@ -4167,14 +4206,14 @@ const W = (p, t, e = []) => {
4167
4206
  rendererId: "spore",
4168
4207
  rotatesWithVelocity: !0,
4169
4208
  canBeChainReactionTarget: !0,
4170
- onChainReaction: zt,
4209
+ onChainReaction: Xt,
4171
4210
  synergyKey: (p) => p.color
4172
4211
  },
4173
4212
  cluster: {
4174
4213
  rendererId: "cluster",
4175
4214
  rotatesWithVelocity: !0,
4176
4215
  canBeChainReactionTarget: !0,
4177
- onChainReaction: Xt,
4216
+ onChainReaction: zt,
4178
4217
  spawnedEnemyIds: ["micro"],
4179
4218
  synergyKey: (p) => p.color
4180
4219
  },
@@ -4190,7 +4229,7 @@ const W = (p, t, e = []) => {
4190
4229
  rotatesWithVelocity: !1,
4191
4230
  canBeChainReactionTarget: !0,
4192
4231
  onRelease: Ht,
4193
- onOutOfBounds: Vt,
4232
+ onOutOfBounds: Wt,
4194
4233
  onCollision: $t,
4195
4234
  synergyKey: (p) => p.color
4196
4235
  },
@@ -4201,7 +4240,7 @@ const W = (p, t, e = []) => {
4201
4240
  autoDeflectFromCore: !0,
4202
4241
  synergyKey: (p) => p.color
4203
4242
  }
4204
- }, D = (p) => Qt[p] ?? {
4243
+ }, N = (p) => Qt[p] ?? {
4205
4244
  rendererId: "circle",
4206
4245
  rotatesWithVelocity: !0,
4207
4246
  canBeChainReactionTarget: !0,
@@ -4212,11 +4251,11 @@ const W = (p, t, e = []) => {
4212
4251
  speed: 95,
4213
4252
  maxSpeed: 140,
4214
4253
  radius: 18,
4215
- color: E.piercer,
4254
+ color: x.piercer,
4216
4255
  canBeGrabbed: !0,
4217
4256
  initialRotation: "none",
4218
4257
  impactStrategyFactory: () => new Gt(),
4219
- behavior: D("piercer"),
4258
+ behavior: N("piercer"),
4220
4259
  spawnWeight: 0.2,
4221
4260
  ambientSpawn: !0
4222
4261
  },
@@ -4225,11 +4264,11 @@ const W = (p, t, e = []) => {
4225
4264
  speed: 65,
4226
4265
  maxSpeed: 90,
4227
4266
  radius: 24,
4228
- color: E.spore,
4267
+ color: x.spore,
4229
4268
  canBeGrabbed: !0,
4230
4269
  initialRotation: "none",
4231
4270
  impactStrategyFactory: () => new Bt(),
4232
- behavior: D("spore"),
4271
+ behavior: N("spore"),
4233
4272
  spawnWeight: 0.2,
4234
4273
  ambientSpawn: !0
4235
4274
  },
@@ -4238,11 +4277,11 @@ const W = (p, t, e = []) => {
4238
4277
  speed: 50,
4239
4278
  maxSpeed: 75,
4240
4279
  radius: 26,
4241
- color: E.cluster,
4280
+ color: x.cluster,
4242
4281
  canBeGrabbed: !0,
4243
4282
  initialRotation: "none",
4244
4283
  impactStrategyFactory: () => new Nt(),
4245
- behavior: D("cluster"),
4284
+ behavior: N("cluster"),
4246
4285
  spawnWeight: 0.2,
4247
4286
  ambientSpawn: !0
4248
4287
  },
@@ -4251,11 +4290,11 @@ const W = (p, t, e = []) => {
4251
4290
  speed: 80,
4252
4291
  maxSpeed: 110,
4253
4292
  radius: 22,
4254
- color: E.parasite,
4293
+ color: x.parasite,
4255
4294
  canBeGrabbed: !0,
4256
4295
  initialRotation: "none",
4257
4296
  impactStrategyFactory: () => new kt(),
4258
- behavior: D("parasite"),
4297
+ behavior: N("parasite"),
4259
4298
  spawnWeight: 0.2,
4260
4299
  ambientSpawn: !0
4261
4300
  },
@@ -4264,11 +4303,11 @@ const W = (p, t, e = []) => {
4264
4303
  speed: 35,
4265
4304
  maxSpeed: 50,
4266
4305
  radius: 34,
4267
- color: E.heavy,
4306
+ color: x.heavy,
4268
4307
  canBeGrabbed: !0,
4269
4308
  initialRotation: "random",
4270
4309
  impactStrategyFactory: () => new Ut(),
4271
- behavior: D("heavy"),
4310
+ behavior: N("heavy"),
4272
4311
  spawnWeight: 0.2,
4273
4312
  ambientSpawn: !0
4274
4313
  },
@@ -4277,10 +4316,10 @@ const W = (p, t, e = []) => {
4277
4316
  speed: 130,
4278
4317
  maxSpeed: 160,
4279
4318
  radius: 12,
4280
- color: E.micro,
4319
+ color: x.micro,
4281
4320
  canBeGrabbed: !1,
4282
4321
  initialRotation: "none",
4283
- behavior: D("micro"),
4322
+ behavior: N("micro"),
4284
4323
  spawnWeight: 0,
4285
4324
  ambientSpawn: !1
4286
4325
  }
@@ -4436,7 +4475,7 @@ class se {
4436
4475
  performanceAudit;
4437
4476
  content = ee;
4438
4477
  entityFactory;
4439
- configManager = new N();
4478
+ configManager = new k();
4440
4479
  powerUpRegistry = new wt(this.configManager);
4441
4480
  core;
4442
4481
  enemies = [];
@@ -4644,7 +4683,7 @@ class se {
4644
4683
  text: "RING RESTORED!",
4645
4684
  position: { ...this.core.position },
4646
4685
  velocity: { x: 0, y: -60 },
4647
- color: E.core,
4686
+ color: x.core,
4648
4687
  alpha: 1,
4649
4688
  lifetime: 0,
4650
4689
  maxLifetime: 1.2,
@@ -4676,7 +4715,7 @@ class se {
4676
4715
  text: this.i18n.translate("levelUpChoose", { level: t }),
4677
4716
  position: { ...this.core.position },
4678
4717
  velocity: { x: 0, y: -100 },
4679
- color: E.core,
4718
+ color: x.core,
4680
4719
  alpha: 1,
4681
4720
  lifetime: 0,
4682
4721
  maxLifetime: 2,
@@ -4688,7 +4727,7 @@ class se {
4688
4727
  id: Math.random().toString(),
4689
4728
  position: { ...this.core.position },
4690
4729
  velocity: { x: Math.cos(s) * a, y: Math.sin(s) * a },
4691
- color: E.core,
4730
+ color: x.core,
4692
4731
  radius: 2 + Math.random() * 3,
4693
4732
  alpha: 1,
4694
4733
  lifetime: 0,
@@ -4703,11 +4742,11 @@ class se {
4703
4742
  }
4704
4743
  spawnExperienceDrops() {
4705
4744
  for (const t of this.enemies)
4706
- t.experienceDropPending && (t.experienceDropPending = !1, this.experienceOrbs.push(new k(t.position, 1, this.configManager.getConfig().experience)));
4745
+ t.experienceDropPending && (t.experienceDropPending = !1, this.experienceOrbs.push(new U(t.position, 1, this.configManager.getConfig().experience)));
4707
4746
  }
4708
4747
  updateExperienceOrbs(t) {
4709
4748
  const e = this.configManager.getConfig(), i = e.magnet;
4710
- k.attractNearby(this.experienceOrbs, e.experience, t), k.mergeNearby(this.experienceOrbs, e.experience.mergeDistance);
4749
+ U.attractNearby(this.experienceOrbs, e.experience, t), U.mergeNearby(this.experienceOrbs, e.experience.mergeDistance);
4711
4750
  for (const s of this.experienceOrbs)
4712
4751
  if (s.active) {
4713
4752
  if (s.isMerging) {
@@ -4761,6 +4800,7 @@ class se {
4761
4800
  this.progressBar.getLevel(),
4762
4801
  this.progressBar.getProgress(),
4763
4802
  this.progressBar.getLevelUpPulse(),
4803
+ this.isLevelUpActive,
4764
4804
  this.interactiveTutorial.isActive ? this.interactiveTutorial : void 0
4765
4805
  ), this.isLevelUpActive && this.orbitingOrbs.length > 0 && this.renderer.drawOrbitingModifierOrbs(
4766
4806
  this.orbitingOrbs,
@@ -4786,5 +4826,5 @@ export {
4786
4826
  tt as LANGUAGES,
4787
4827
  yt as ThemeManager,
4788
4828
  ae as createAxonSurge,
4789
- B as isLanguage
4829
+ K as isLanguage
4790
4830
  };