@betorigami/game-ui-wheel 1.1.3 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.mjs +104 -103
  2. package/dist/standalone.mjs +8232 -8212
  3. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -1,13 +1,13 @@
1
- import { genCorrelationId as ge, resolveApiErrorCode as ce, getTranslation as g, errorCodeToTranslationKey as ue, ErrorCode as K, createMockGenerator as pe, OrigamiActionType as ee, noiseClick as me, gameContext as R, OrigamiElement as C, componentStyles as L, watch as se, DEFAULT_CURRENCY as q, formatMonetaryAmount as de, DEFAULT_LANGUAGE as W, getCurrencyIcon as fe, OrigamiGame as X, InvalidReason as ye, GameComponent as ie, HotkeyController as be, HotkeyHelper as te, waitForEvent as ve, formatAutobetSettings as we, getGameOutcome as Se, calculateGameLayoutStyle as _e, isEndAction as $e } from "@betorigami/game-ui-shared";
2
- import { css as I, svg as Y, nothing as Z, html as l, LitElement as ke } from "lit";
3
- import { Wheel as De, WheelRiskLevel as u, WheelSegments as N, getWheelPattern as xe, getWheelSegmentMultipliers as Ee, describeWheelOutcomes as Ae, isWheelRiskLevel as re, isWheelSegments as ae, WHEEL_RISK_LEVELS as Ie, WHEEL_SEGMENT_OPTIONS as Me, getWheelMaxMultiplier as oe } from "@betorigami/game-wheel";
4
- import { cache as Pe } from "lit/directives/cache.js";
5
- import { property as n, customElement as k, query as J, state as v } from "lit/decorators.js";
1
+ import { genCorrelationId as ge, REQUEST_TIMEOUT_MS as ce, resolveApiErrorCode as ue, getTranslation as g, errorCodeToTranslationKey as pe, ErrorCode as K, createMockGenerator as me, OrigamiActionType as ee, noiseClick as de, gameContext as N, OrigamiElement as C, componentStyles as L, watch as se, DEFAULT_CURRENCY as q, formatMonetaryAmount as fe, DEFAULT_LANGUAGE as W, getCurrencyIcon as ye, OrigamiGame as X, InvalidReason as be, GameComponent as ie, HotkeyController as ve, HotkeyHelper as te, waitForEvent as we, formatAutobetSettings as Se, getGameOutcome as _e, calculateGameLayoutStyle as $e, isEndAction as ke } from "@betorigami/game-ui-shared";
2
+ import { css as I, svg as Y, nothing as Z, html as l, LitElement as De } from "lit";
3
+ import { Wheel as xe, WheelRiskLevel as u, WheelSegments as R, getWheelPattern as Ee, getWheelSegmentMultipliers as Ae, describeWheelOutcomes as Ie, isWheelRiskLevel as re, isWheelSegments as ae, WHEEL_RISK_LEVELS as Me, WHEEL_SEGMENT_OPTIONS as Pe, getWheelMaxMultiplier as oe } from "@betorigami/game-wheel";
4
+ import { cache as Oe } from "lit/directives/cache.js";
5
+ import { property as n, customElement as k, query as Q, state as v } from "lit/decorators.js";
6
6
  import f from "big.js";
7
- import { sumPayout as Oe } from "@betorigami/game-engine";
7
+ import { sumPayout as Ce } from "@betorigami/game-engine";
8
8
  import { consume as U } from "@lit/context";
9
- import { styleMap as Ce } from "lit/directives/style-map.js";
10
- const Te = {
9
+ import { styleMap as Te } from "lit/directives/style-map.js";
10
+ const Be = {
11
11
  overview: {
12
12
  translation: {
13
13
  key: "gameInfo.wheel.overview",
@@ -107,7 +107,7 @@ class G {
107
107
  return 1 + a % o;
108
108
  }
109
109
  }
110
- class Be {
110
+ class We {
111
111
  constructor(e, i) {
112
112
  this.authToken = e, this.baseUrl = i + "/games/wheel";
113
113
  }
@@ -115,6 +115,7 @@ class Be {
115
115
  try {
116
116
  const i = await fetch(`${this.baseUrl}/play`, {
117
117
  method: "POST",
118
+ signal: AbortSignal.timeout(ce),
118
119
  headers: {
119
120
  "Content-Type": "application/json",
120
121
  Authorization: `Bearer ${this.authToken}`,
@@ -131,10 +132,10 @@ class Be {
131
132
  }), r = await i.json();
132
133
  if (i.ok && r.id)
133
134
  return { success: !0, data: r };
134
- const s = ce(r);
135
+ const s = ue(r);
135
136
  return {
136
137
  success: !1,
137
- error: g(ue(s), e.language),
138
+ error: g(pe(s), e.language),
138
139
  errorCode: s
139
140
  };
140
141
  } catch {
@@ -146,16 +147,16 @@ class Be {
146
147
  }
147
148
  }
148
149
  }
149
- class We {
150
+ class Le {
150
151
  constructor(e) {
151
152
  this.edge = e;
152
153
  }
153
154
  async startBet(e) {
154
- const { amount: i, riskLevel: r, segments: s } = e, a = { riskLevel: r, segments: s, betAmount: f(i) }, o = new De().getGameResult({
155
- generator: pe(),
155
+ const { amount: i, riskLevel: r, segments: s } = e, a = { riskLevel: r, segments: s, betAmount: f(i) }, o = new xe().getGameResult({
156
+ generator: me(),
156
157
  edge: this.edge,
157
158
  gameInputs: a
158
- }), d = Oe(o.payout).toString();
159
+ }), d = Ce(o.payout).toString();
159
160
  return { success: !0, data: {
160
161
  id: crypto.randomUUID(),
161
162
  tenantId: "origami-casino",
@@ -187,7 +188,7 @@ class We {
187
188
  } };
188
189
  }
189
190
  }
190
- const Le = I`
191
+ const Re = I`
191
192
  :host {
192
193
  width: 100%;
193
194
  height: 100%;
@@ -323,17 +324,17 @@ const Le = I`
323
324
  RED: "var(--wheel-color-red)",
324
325
  BLUE: "var(--wheel-color-blue)",
325
326
  PURPLE: "var(--wheel-color-purple)"
326
- }, Re = {
327
+ }, Ue = {
327
328
  ZERO: B.BLACK,
328
329
  A: B.GREEN,
329
330
  B: B.YELLOW,
330
331
  C: B.BLUE,
331
332
  D: B.RED,
332
333
  E: B.PURPLE
333
- }, ne = (t) => Re[t], V = 9, Ue = 0.08, je = 0.8, Fe = 1e4, He = () => ({
334
- layers: [me(2800, { duration: 15e-4, decay: 8, gain: 0.6 })],
334
+ }, ne = (t) => Ue[t], V = 9, je = 0.08, Fe = 0.8, He = 1e4, Ke = () => ({
335
+ layers: [de(2800, { duration: 15e-4, decay: 8, gain: 0.6 })],
335
336
  gainScale: 1
336
- }), Ke = I`
337
+ }), Ge = I`
337
338
  :host {
338
339
  --wheel-color-black: #1a1a1a;
339
340
  --wheel-color-green: #00d084;
@@ -354,17 +355,17 @@ const Le = I`
354
355
  }
355
356
  }
356
357
  `;
357
- var Ge = Object.defineProperty, qe = Object.getOwnPropertyDescriptor, j = (t, e, i, r) => {
358
- for (var s = r > 1 ? void 0 : r ? qe(e, i) : e, a = t.length - 1, o; a >= 0; a--)
358
+ var qe = Object.defineProperty, Ve = Object.getOwnPropertyDescriptor, j = (t, e, i, r) => {
359
+ for (var s = r > 1 ? void 0 : r ? Ve(e, i) : e, a = t.length - 1, o; a >= 0; a--)
359
360
  (o = t[a]) && (s = (r ? o(e, i, s) : o(s)) || s);
360
- return r && s && Ge(e, i, s), s;
361
+ return r && s && qe(e, i, s), s;
361
362
  };
362
363
  let P = class extends C {
363
364
  constructor() {
364
- super(...arguments), this.risk = u.MEDIUM_RISK, this.segments = N.TEN, this.highlightedSegments = [];
365
+ super(...arguments), this.risk = u.MEDIUM_RISK, this.segments = R.TEN, this.highlightedSegments = [];
365
366
  }
366
367
  generateWheelPaths() {
367
- const t = xe({ riskLevel: this.risk, segments: this.segments }), e = { cx: 285, cy: 285 }, i = 284.371, r = 2 * Math.PI / this.segments, s = [];
368
+ const t = Ee({ riskLevel: this.risk, segments: this.segments }), e = { cx: 285, cy: 285 }, i = 284.371, r = 2 * Math.PI / this.segments, s = [];
368
369
  for (let a = 0; a < this.segments; a++) {
369
370
  const o = ne(t[a]), _ = this.highlightedSegments.length > 0 && !this.highlightedSegments.includes(a) ? 0.25 : 1, E = a * r - Math.PI / 2, A = (a + 1) * r - Math.PI / 2, M = {
370
371
  x: e.cx + i * Math.cos(E),
@@ -403,7 +404,7 @@ let P = class extends C {
403
404
  `;
404
405
  }
405
406
  };
406
- P.styles = [Ke];
407
+ P.styles = [Ge];
407
408
  j([
408
409
  n({ type: String })
409
410
  ], P.prototype, "risk", 2);
@@ -414,15 +415,15 @@ j([
414
415
  n({ type: Array })
415
416
  ], P.prototype, "highlightedSegments", 2);
416
417
  j([
417
- U({ context: R, subscribe: !0 })
418
+ U({ context: N, subscribe: !0 })
418
419
  ], P.prototype, "gameData", 2);
419
420
  P = j([
420
421
  k("origami-wheel-svg")
421
422
  ], P);
422
- var Ve = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, c = (t, e, i, r) => {
423
- for (var s = r > 1 ? void 0 : r ? Ye(e, i) : e, a = t.length - 1, o; a >= 0; a--)
423
+ var Ye = Object.defineProperty, ze = Object.getOwnPropertyDescriptor, c = (t, e, i, r) => {
424
+ for (var s = r > 1 ? void 0 : r ? ze(e, i) : e, a = t.length - 1, o; a >= 0; a--)
424
425
  (o = t[a]) && (s = (r ? o(e, i, s) : o(s)) || s);
425
- return r && s && Ve(e, i, s), s;
426
+ return r && s && Ye(e, i, s), s;
426
427
  };
427
428
  let h = class extends C {
428
429
  constructor() {
@@ -443,7 +444,7 @@ let h = class extends C {
443
444
  this._angle = this.targetAngle, this._updateTransform(), this._stopLoop(), this.emit("wheel-spin-complete");
444
445
  return;
445
446
  }
446
- const t = this._isInstantBet ? je : Ue;
447
+ const t = this._isInstantBet ? Fe : je;
447
448
  this._decelerationOffsets = G.generateDecelerationOffsets(V, t);
448
449
  const e = this._decelerationOffsets[this._decelerationOffsets.length - 1];
449
450
  this._decelerationStartAngle = G.calculateDecelerationStartAngle(this._angle, this.targetAngle, e), this._currentDecelerationFrame = 0;
@@ -467,7 +468,7 @@ let h = class extends C {
467
468
  this._angle += V;
468
469
  this._updateTransform();
469
470
  const r = 360 / this.segments;
470
- Math.floor(this._angle / r) - Math.floor(e / r) > 0 && this.gameData?.soundEffects?.play(He()), this._rafId = requestAnimationFrame(t);
471
+ Math.floor(this._angle / r) - Math.floor(e / r) > 0 && this.gameData?.soundEffects?.play(Ke()), this._rafId = requestAnimationFrame(t);
471
472
  };
472
473
  this._rafId === null && (this._rafId = requestAnimationFrame(t));
473
474
  }
@@ -546,10 +547,10 @@ c([
546
547
  n({ type: Array })
547
548
  ], h.prototype, "hoveredSegments", 2);
548
549
  c([
549
- U({ context: R, subscribe: !0 })
550
+ U({ context: N, subscribe: !0 })
550
551
  ], h.prototype, "gameData", 2);
551
552
  c([
552
- J(".wheel-svg")
553
+ Q(".wheel-svg")
553
554
  ], h.prototype, "_wheelEl", 2);
554
555
  c([
555
556
  se("targetAngle")
@@ -560,7 +561,7 @@ c([
560
561
  h = c([
561
562
  k("origami-wheel-animator")
562
563
  ], h);
563
- const ze = I`
564
+ const Xe = I`
564
565
  :host {
565
566
  display: flex;
566
567
  flex-direction: column;
@@ -695,14 +696,14 @@ const ze = I`
695
696
  cursor: help;
696
697
  }
697
698
  `;
698
- var Xe = Object.defineProperty, Ze = Object.getOwnPropertyDescriptor, T = (t, e, i, r) => {
699
- for (var s = r > 1 ? void 0 : r ? Ze(e, i) : e, a = t.length - 1, o; a >= 0; a--)
699
+ var Ze = Object.defineProperty, Qe = Object.getOwnPropertyDescriptor, T = (t, e, i, r) => {
700
+ for (var s = r > 1 ? void 0 : r ? Qe(e, i) : e, a = t.length - 1, o; a >= 0; a--)
700
701
  (o = t[a]) && (s = (r ? o(e, i, s) : o(s)) || s);
701
- return r && s && Xe(e, i, s), s;
702
+ return r && s && Ze(e, i, s), s;
702
703
  };
703
704
  let $ = class extends C {
704
705
  constructor() {
705
- super(...arguments), this.isDesktop = !1, this.risk = u.MEDIUM_RISK, this.segments = N.TEN, this.resultSegment = null, this.hoveredTileIndex = null;
706
+ super(...arguments), this.isDesktop = !1, this.risk = u.MEDIUM_RISK, this.segments = R.TEN, this.resultSegment = null, this.hoveredTileIndex = null;
706
707
  }
707
708
  get edge() {
708
709
  return this.gameData?.edge ?? 1;
@@ -711,10 +712,10 @@ let $ = class extends C {
711
712
  return { riskLevel: this.risk, segments: this.segments };
712
713
  }
713
714
  get segmentMultipliers() {
714
- return Ee(this.selection, this.edge);
715
+ return Ae(this.selection, this.edge);
715
716
  }
716
717
  get tiles() {
717
- return Ae(this.selection, this.edge).outcomes;
718
+ return Ie(this.selection, this.edge).outcomes;
718
719
  }
719
720
  getActiveTileIndexFromSegment() {
720
721
  if (this.resultSegment === null) return null;
@@ -741,7 +742,7 @@ let $ = class extends C {
741
742
  }
742
743
  formatProfit(t) {
743
744
  const e = f(this.gameData?.betAmount ?? 0).times(t.minus(1)), i = e.lt(0) ? f(0) : e, r = this.gameData?.currency ?? q;
744
- return de(i.toNumber(), r, { includeSymbol: !1 });
745
+ return fe(i.toNumber(), r, { includeSymbol: !1 });
745
746
  }
746
747
  formatChance(t, e) {
747
748
  return `${t}/${e}`;
@@ -763,7 +764,7 @@ let $ = class extends C {
763
764
  .offset=${6}
764
765
  inline
765
766
  >
766
- <span class="info-icon">${fe(this.gameData?.currency ?? q)}</span>
767
+ <span class="info-icon">${ye(this.gameData?.currency ?? q)}</span>
767
768
  </origami-tooltip>
768
769
  </div>
769
770
 
@@ -782,20 +783,20 @@ let $ = class extends C {
782
783
 
783
784
  <div class="tiles" role="list" style="--grid-columns: ${e}" @mouseleave=${() => this.handleTileMouseLeave()}>
784
785
  ${t.map(({ slot: _, multiplier: E }, A) => {
785
- const M = `${E.toString()}X`, H = ne(_), Q = this.hoveredTileIndex === A;
786
+ const M = `${E.toString()}X`, H = ne(_), J = this.hoveredTileIndex === A;
786
787
  return l`
787
788
  <div
788
789
  class="tile"
789
790
  role="listitem"
790
- hovered=${Q}
791
- active=${!Q && A === r}
791
+ hovered=${J}
792
+ active=${!J && A === r}
792
793
  @mouseenter=${() => this.handleTileMouseEnter(A)}
793
794
  >
794
795
  <div class="tile-content">
795
796
  <span class="tile-label">${M}</span>
796
797
  <span
797
798
  class="dot"
798
- style=${Ce({ backgroundColor: H })}
799
+ style=${Te({ backgroundColor: H })}
799
800
  aria-hidden="true"
800
801
  ></span>
801
802
  </div>
@@ -807,7 +808,7 @@ let $ = class extends C {
807
808
  `;
808
809
  }
809
810
  };
810
- $.styles = [L, ze];
811
+ $.styles = [L, Xe];
811
812
  T([
812
813
  n({ type: Boolean, attribute: "data-is-desktop" })
813
814
  ], $.prototype, "isDesktop", 2);
@@ -824,13 +825,13 @@ T([
824
825
  v()
825
826
  ], $.prototype, "hoveredTileIndex", 2);
826
827
  T([
827
- U({ context: R, subscribe: !0 })
828
+ U({ context: N, subscribe: !0 })
828
829
  ], $.prototype, "gameData", 2);
829
830
  $ = T([
830
831
  k("origami-wheel-content-bottom")
831
832
  ], $);
832
- var Je = Object.defineProperty, Qe = Object.getOwnPropertyDescriptor, D = (t, e, i, r) => {
833
- for (var s = r > 1 ? void 0 : r ? Qe(e, i) : e, a = t.length - 1, o; a >= 0; a--)
833
+ var Je = Object.defineProperty, et = Object.getOwnPropertyDescriptor, D = (t, e, i, r) => {
834
+ for (var s = r > 1 ? void 0 : r ? et(e, i) : e, a = t.length - 1, o; a >= 0; a--)
834
835
  (o = t[a]) && (s = (r ? o(e, i, s) : o(s)) || s);
835
836
  return r && s && Je(e, i, s), s;
836
837
  };
@@ -871,7 +872,7 @@ let y = class extends C {
871
872
  `;
872
873
  }
873
874
  };
874
- y.styles = [L, Le];
875
+ y.styles = [L, Re];
875
876
  D([
876
877
  n({ type: Boolean })
877
878
  ], y.prototype, "isDesktop", 2);
@@ -929,7 +930,7 @@ const le = I`
929
930
  .grid-full-width {
930
931
  grid-column: span 2;
931
932
  }
932
- `, et = I`
933
+ `, tt = I`
933
934
  :host {
934
935
  display: contents;
935
936
  }
@@ -938,19 +939,19 @@ const le = I`
938
939
  grid-column: span 2;
939
940
  }
940
941
  `;
941
- var tt = Object.defineProperty, st = Object.getOwnPropertyDescriptor, F = (t, e, i, r) => {
942
- for (var s = r > 1 ? void 0 : r ? st(e, i) : e, a = t.length - 1, o; a >= 0; a--)
942
+ var st = Object.defineProperty, it = Object.getOwnPropertyDescriptor, F = (t, e, i, r) => {
943
+ for (var s = r > 1 ? void 0 : r ? it(e, i) : e, a = t.length - 1, o; a >= 0; a--)
943
944
  (o = t[a]) && (s = (r ? o(e, i, s) : o(s)) || s);
944
- return r && s && tt(e, i, s), s;
945
+ return r && s && st(e, i, s), s;
945
946
  };
946
- const it = {
947
+ const rt = {
947
948
  [u.LOW_RISK]: "common.low",
948
949
  [u.MEDIUM_RISK]: "common.medium",
949
950
  [u.HIGH_RISK]: "common.high"
950
951
  };
951
952
  let O = class extends C {
952
953
  constructor() {
953
- super(...arguments), this.risk = u.MEDIUM_RISK, this.segments = N.TEN, this.disabled = !1;
954
+ super(...arguments), this.risk = u.MEDIUM_RISK, this.segments = R.TEN, this.disabled = !1;
954
955
  }
955
956
  handleRiskChange(t) {
956
957
  const { value: e } = t.detail;
@@ -966,7 +967,7 @@ let O = class extends C {
966
967
  <origami-select
967
968
  class="grid-full-width"
968
969
  label=${g("common.risk", t)}
969
- .options=${Ie.map((e) => ({ value: e, label: g(it[e], t) }))}
970
+ .options=${Me.map((e) => ({ value: e, label: g(rt[e], t) }))}
970
971
  .value=${this.risk}
971
972
  @select-change=${this.handleRiskChange}
972
973
  ?disabled=${this.disabled}
@@ -975,7 +976,7 @@ let O = class extends C {
975
976
  <origami-select
976
977
  class="grid-full-width"
977
978
  label=${g("games.wheel.segments", t)}
978
- .options=${Me.map((e) => ({ value: e.toString(), label: e.toString() }))}
979
+ .options=${Pe.map((e) => ({ value: e.toString(), label: e.toString() }))}
979
980
  .value=${this.segments.toString()}
980
981
  @select-change=${this.handleSegmentsChange}
981
982
  ?disabled=${this.disabled}
@@ -983,7 +984,7 @@ let O = class extends C {
983
984
  `;
984
985
  }
985
986
  };
986
- O.styles = [L, et];
987
+ O.styles = [L, tt];
987
988
  F([
988
989
  n({ type: String })
989
990
  ], O.prototype, "risk", 2);
@@ -994,19 +995,19 @@ F([
994
995
  n({ type: Boolean })
995
996
  ], O.prototype, "disabled", 2);
996
997
  F([
997
- U({ context: R, subscribe: !0 })
998
+ U({ context: N, subscribe: !0 })
998
999
  ], O.prototype, "gameData", 2);
999
1000
  O = F([
1000
1001
  k("origami-wheel-selectors")
1001
1002
  ], O);
1002
- var rt = Object.defineProperty, at = Object.getOwnPropertyDescriptor, w = (t, e, i, r) => {
1003
- for (var s = r > 1 ? void 0 : r ? at(e, i) : e, a = t.length - 1, o; a >= 0; a--)
1003
+ var at = Object.defineProperty, ot = Object.getOwnPropertyDescriptor, w = (t, e, i, r) => {
1004
+ for (var s = r > 1 ? void 0 : r ? ot(e, i) : e, a = t.length - 1, o; a >= 0; a--)
1004
1005
  (o = t[a]) && (s = (r ? o(e, i, s) : o(s)) || s);
1005
- return r && s && rt(e, i, s), s;
1006
+ return r && s && at(e, i, s), s;
1006
1007
  };
1007
1008
  let p = class extends C {
1008
1009
  constructor() {
1009
- super(...arguments), this.isPlaying = !1, this.betDisabled = !1, this.inputsDisabled = !1, this.risk = u.MEDIUM_RISK, this.segments = N.TEN, this.betMaxMultiplier = f(1), this.isBetAmountValid = !0, this._betAboveBalance = !1;
1010
+ super(...arguments), this.isPlaying = !1, this.betDisabled = !1, this.inputsDisabled = !1, this.risk = u.MEDIUM_RISK, this.segments = R.TEN, this.betMaxMultiplier = f(1), this.isBetAmountValid = !0, this._betAboveBalance = !1;
1010
1011
  }
1011
1012
  render() {
1012
1013
  const t = this.gameData?.language || "en";
@@ -1019,7 +1020,7 @@ let p = class extends C {
1019
1020
  this.isBetAmountValid = e.detail.isValid;
1020
1021
  }}
1021
1022
  @bet-amount-input-error-change=${(e) => {
1022
- this._betAboveBalance = e.detail.invalidReason === ye.BET_AMOUNT_ABOVE_BALANCE;
1023
+ this._betAboveBalance = e.detail.invalidReason === be.BET_AMOUNT_ABOVE_BALANCE;
1023
1024
  }}
1024
1025
  ></origami-bet-amount-input>
1025
1026
 
@@ -1061,7 +1062,7 @@ w([
1061
1062
  n({ attribute: !1 })
1062
1063
  ], p.prototype, "betMaxMultiplier", 2);
1063
1064
  w([
1064
- U({ context: R, subscribe: !0 })
1065
+ U({ context: N, subscribe: !0 })
1065
1066
  ], p.prototype, "gameData", 2);
1066
1067
  w([
1067
1068
  v()
@@ -1072,14 +1073,14 @@ w([
1072
1073
  p = w([
1073
1074
  k("origami-wheel-manual")
1074
1075
  ], p);
1075
- var ot = Object.defineProperty, nt = Object.getOwnPropertyDescriptor, x = (t, e, i, r) => {
1076
- for (var s = r > 1 ? void 0 : r ? nt(e, i) : e, a = t.length - 1, o; a >= 0; a--)
1076
+ var nt = Object.defineProperty, lt = Object.getOwnPropertyDescriptor, x = (t, e, i, r) => {
1077
+ for (var s = r > 1 ? void 0 : r ? lt(e, i) : e, a = t.length - 1, o; a >= 0; a--)
1077
1078
  (o = t[a]) && (s = (r ? o(e, i, s) : o(s)) || s);
1078
- return r && s && ot(e, i, s), s;
1079
+ return r && s && nt(e, i, s), s;
1079
1080
  };
1080
1081
  let b = class extends C {
1081
1082
  constructor() {
1082
- super(...arguments), this.inputsDisabled = !1, this.autobetStopping = !1, this.autobetInProgress = !1, this.betDisabled = !1, this.isDesktop = !1, this.risk = u.MEDIUM_RISK, this.segments = N.TEN, this.betMaxMultiplier = f(1);
1083
+ super(...arguments), this.inputsDisabled = !1, this.autobetStopping = !1, this.autobetInProgress = !1, this.betDisabled = !1, this.isDesktop = !1, this.risk = u.MEDIUM_RISK, this.segments = R.TEN, this.betMaxMultiplier = f(1);
1083
1084
  }
1084
1085
  render() {
1085
1086
  return l`
@@ -1128,7 +1129,7 @@ x([
1128
1129
  b = x([
1129
1130
  k("origami-wheel-auto")
1130
1131
  ], b);
1131
- const lt = I`
1132
+ const ht = I`
1132
1133
  :host {
1133
1134
  height: 100%;
1134
1135
  }
@@ -1137,14 +1138,14 @@ const lt = I`
1137
1138
  display: block;
1138
1139
  }
1139
1140
  `;
1140
- var ht = Object.defineProperty, gt = Object.getOwnPropertyDescriptor, S = (t, e, i, r) => {
1141
- for (var s = r > 1 ? void 0 : r ? gt(e, i) : e, a = t.length - 1, o; a >= 0; a--)
1141
+ var gt = Object.defineProperty, ct = Object.getOwnPropertyDescriptor, S = (t, e, i, r) => {
1142
+ for (var s = r > 1 ? void 0 : r ? ct(e, i) : e, a = t.length - 1, o; a >= 0; a--)
1142
1143
  (o = t[a]) && (s = (r ? o(e, i, s) : o(s)) || s);
1143
- return r && s && ht(e, i, s), s;
1144
+ return r && s && gt(e, i, s), s;
1144
1145
  };
1145
1146
  let m = class extends ie {
1146
1147
  constructor() {
1147
- super(), this.isManualPlaying = !1, this.history = [], this.wheelRisk = u.MEDIUM_RISK, this.numberOfSegments = 10, this.targetAngle = null, this.resultSegment = null, this.isWheelSpinning = !1, new be(this, [
1148
+ super(), this.isManualPlaying = !1, this.history = [], this.wheelRisk = u.MEDIUM_RISK, this.numberOfSegments = 10, this.targetAngle = null, this.resultSegment = null, this.isWheelSpinning = !1, new ve(this, [
1148
1149
  {
1149
1150
  key: " ",
1150
1151
  callback: () => te.clickBetButton(this.manualOrAuto, this._wheelManualEl, this._wheelAutoEl),
@@ -1163,7 +1164,7 @@ let m = class extends ie {
1163
1164
  this.numberOfSegments = t.detail.value, this.resultSegment = null;
1164
1165
  }
1165
1166
  get wheelApi() {
1166
- return this.isDemoMode ? new We(this.gameData.edge) : new Be(this.gameData.authToken, this.gameData.baseUrl);
1167
+ return this.isDemoMode ? new Le(this.gameData.edge) : new We(this.gameData.authToken, this.gameData.baseUrl);
1167
1168
  }
1168
1169
  get isToggleDisabled() {
1169
1170
  return this.isManualPlaying || this.autobetInProgress || this.autobetStopping;
@@ -1172,7 +1173,7 @@ let m = class extends ie {
1172
1173
  return this.isManualPlaying || this.autobetInProgress || this.autobetStopping;
1173
1174
  }
1174
1175
  wheelSpinCompletedPromise() {
1175
- return ve(this, "wheel-spin-complete", void 0, Fe, !0);
1176
+ return we(this, "wheel-spin-complete", void 0, He, !0);
1176
1177
  }
1177
1178
  async handleBetExecution(t, e) {
1178
1179
  if (this.resetForNextBet(() => {
@@ -1195,7 +1196,7 @@ let m = class extends ie {
1195
1196
  language: this.gameData.language,
1196
1197
  riskLevel: this.wheelRisk,
1197
1198
  segments: this.numberOfSegments,
1198
- meta: e ? we(e) : void 0
1199
+ meta: e ? Se(e) : void 0
1199
1200
  })
1200
1201
  );
1201
1202
  if (s.success) {
@@ -1234,11 +1235,11 @@ let m = class extends ie {
1234
1235
  errorCode: i.errorCode ?? K.UNKNOWN,
1235
1236
  errorMessage: i.error || g("alerts.errorProcessingBet", this.gameData?.language || W)
1236
1237
  };
1237
- const r = i.data, s = f(r.payout ?? 0).minus(r.amount ?? 0), a = Number(r.multiplier), o = Se(a);
1238
+ const r = i.data, s = f(r.payout ?? 0).minus(r.amount ?? 0), a = Number(r.multiplier), o = _e(a);
1238
1239
  return await this.holdResultDisplay(), { pnl: s, gameOutcome: o, hasError: !1 };
1239
1240
  }
1240
1241
  render() {
1241
- const t = this.gameData?.mainWidth >= 768, e = oe(this.gameData.edge, { riskLevel: this.wheelRisk, segments: this.numberOfSegments }), i = !1, r = _e(this.gameData);
1242
+ const t = this.gameData?.mainWidth >= 768, e = oe(this.gameData.edge, { riskLevel: this.wheelRisk, segments: this.numberOfSegments }), i = !1, r = $e(this.gameData);
1242
1243
  return l`
1243
1244
  <origami-game-layout style=${r} .gameType=${X.WHEEL} data-is-desktop=${t}>
1244
1245
  <origami-game-sidebar
@@ -1250,7 +1251,7 @@ let m = class extends ie {
1250
1251
  @wheel-risk-change=${this.handleWheelRiskChange}
1251
1252
  @wheel-segments-change=${this.handleWheelSegmentsChange}
1252
1253
  >
1253
- ${Pe(
1254
+ ${Oe(
1254
1255
  this.manualOrAuto === "Manual" ? l`<origami-wheel-manual
1255
1256
  slot="controls"
1256
1257
  data-is-desktop=${t}
@@ -1303,7 +1304,7 @@ let m = class extends ie {
1303
1304
  `;
1304
1305
  }
1305
1306
  };
1306
- m.styles = [...ie.styles, lt];
1307
+ m.styles = [...ie.styles, ht];
1307
1308
  S([
1308
1309
  v()
1309
1310
  ], m.prototype, "isManualPlaying", 2);
@@ -1326,20 +1327,20 @@ S([
1326
1327
  v()
1327
1328
  ], m.prototype, "isWheelSpinning", 2);
1328
1329
  S([
1329
- J("origami-wheel-manual")
1330
+ Q("origami-wheel-manual")
1330
1331
  ], m.prototype, "_wheelManualEl", 2);
1331
1332
  S([
1332
- J("origami-wheel-auto")
1333
+ Q("origami-wheel-auto")
1333
1334
  ], m.prototype, "_wheelAutoEl", 2);
1334
1335
  m = S([
1335
1336
  k("origami-wheel-game")
1336
1337
  ], m);
1337
- var ct = Object.getOwnPropertyDescriptor, ut = (t, e, i, r) => {
1338
- for (var s = r > 1 ? void 0 : r ? ct(e, i) : e, a = t.length - 1, o; a >= 0; a--)
1338
+ var ut = Object.getOwnPropertyDescriptor, pt = (t, e, i, r) => {
1339
+ for (var s = r > 1 ? void 0 : r ? ut(e, i) : e, a = t.length - 1, o; a >= 0; a--)
1339
1340
  (o = t[a]) && (s = o(s) || s);
1340
1341
  return s;
1341
1342
  };
1342
- let z = class extends ke {
1343
+ let z = class extends De {
1343
1344
  render() {
1344
1345
  return l`<slot></slot>`;
1345
1346
  }
@@ -1365,17 +1366,17 @@ z.styles = I`
1365
1366
  }
1366
1367
  }
1367
1368
  `;
1368
- z = ut([
1369
+ z = pt([
1369
1370
  k("origami-wheel-outcome")
1370
1371
  ], z);
1371
- const pt = (t) => typeof t == "object" && t !== null && "risk" in t && re(t.risk) && "segments" in t && ae(t.segments) && "resultSegment" in t && typeof t.resultSegment == "number" && "betId" in t && typeof t.betId == "string", he = (t) => {
1372
+ const mt = (t) => typeof t == "object" && t !== null && "risk" in t && re(t.risk) && "segments" in t && ae(t.segments) && "resultSegment" in t && typeof t.resultSegment == "number" && "betId" in t && typeof t.betId == "string", he = (t) => {
1372
1373
  const e = t?.WHEEL;
1373
1374
  return e !== void 0 && "segments" in e ? e : void 0;
1374
- }, mt = (t) => {
1375
+ }, dt = (t) => {
1375
1376
  const e = he(t.betActions[0]?.data), i = t.betActions[t.betActions.length - 1]?.data.WHEEL;
1376
- return e === void 0 || i === void 0 || !$e(i) ? { risk: u.MEDIUM_RISK, segments: N.TEN, resultSegment: 0, betId: t.id || "123" } : { risk: e.riskLevel, segments: e.segments, resultSegment: i.result[0] ?? 0, betId: t.id };
1377
- }, dt = (t, { enableAnimation: e, inBetResultModal: i, language: r }) => {
1378
- if (!pt(t))
1377
+ return e === void 0 || i === void 0 || !ke(i) ? { risk: u.MEDIUM_RISK, segments: R.TEN, resultSegment: 0, betId: t.id || "123" } : { risk: e.riskLevel, segments: e.segments, resultSegment: i.result[0] ?? 0, betId: t.id };
1378
+ }, ft = (t, { enableAnimation: e, inBetResultModal: i, language: r }) => {
1379
+ if (!mt(t))
1379
1380
  return l`<p>${g("errors.noWheelData", r)}</p>`;
1380
1381
  const s = G.calculateTargetAngle(t.resultSegment, t.segments, t.betId);
1381
1382
  return l`
@@ -1393,20 +1394,20 @@ const pt = (t) => typeof t == "object" && t !== null && "risk" in t && re(t.risk
1393
1394
  ></origami-wheel-animator>
1394
1395
  </origami-wheel-outcome>
1395
1396
  `;
1396
- }, ft = (t) => {
1397
+ }, yt = (t) => {
1397
1398
  const e = he(t);
1398
1399
  return e === void 0 ? {} : { segments: e.segments, riskLevel: e.riskLevel };
1399
- }, yt = ({ segments: t, riskLevel: e }) => ({ segments: t, riskLevel: e }), At = {
1400
+ }, bt = ({ segments: t, riskLevel: e }) => ({ segments: t, riskLevel: e }), It = {
1400
1401
  id: X.WHEEL,
1401
1402
  renderGame: () => l`<origami-wheel-game></origami-wheel-game>`,
1402
- gameInfo: Te,
1403
+ gameInfo: Be,
1403
1404
  maxMultiplier: (t) => oe(t).toNumber(),
1404
- verifierInputs: ft,
1405
- verifierQuery: yt,
1406
- extractOutcome: mt,
1407
- renderOutcome: dt
1405
+ verifierInputs: yt,
1406
+ verifierQuery: bt,
1407
+ extractOutcome: dt,
1408
+ renderOutcome: ft
1408
1409
  };
1409
1410
  export {
1410
1411
  m as WheelGame,
1411
- At as wheelUiModule
1412
+ It as wheelUiModule
1412
1413
  };