@betorigami/game-ui-wheel 1.1.9 → 1.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +68 -67
- package/dist/standalone.mjs +7429 -7410
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { genCorrelationId as
|
|
1
|
+
import { genCorrelationId as ge, REQUEST_TIMEOUT_MS as ue, resolveApiErrorCode as me, getTranslation as g, errorCodeToTranslationKey as pe, ErrorCode as U, createMockGenerator as de, OrigamiActionType as J, desktopContainerQuery as H, noiseClick as fe, OrigamiElement as D, componentStyles as W, watch as te, RequiredContext as f, servicesContext as ye, skinContext as be, preferencesContext as ve, mobileContainerQuery as we, localeContext as z, limitsContext as se, layoutContext as ie, walletContext as Se, calculateProfitOnWin as _e, formatMonetaryAmount as $e, getCurrencyIcon as xe, OrigamiGame as Y, InvalidReason as ke, GameComponent as re, HotkeyController as Ee, HotkeyHelper as ee, waitForEvent as Ie, formatAutobetSettings as Ae, getGameOutcome as Me, calculateGameLayoutStyle as Pe, isEndAction as Oe } from "@betorigami/game-ui-shared";
|
|
2
2
|
import { css as I, svg as q, nothing as Q, html as a, LitElement as De } from "lit";
|
|
3
|
-
import { Wheel as Ce, WheelRiskLevel as
|
|
3
|
+
import { Wheel as Ce, WheelRiskLevel as u, WheelSegments as L, getWheelPattern as Te, getWheelSegmentMultipliers as Be, describeWheelOutcomes as We, isWheelRiskLevel as ne, isWheelSegments as le, WHEEL_RISK_LEVELS as Le, WHEEL_SEGMENT_OPTIONS as Re, getWheelMaxMultiplier as oe } from "@betorigami/game-wheel";
|
|
4
4
|
import { cache as Ne } from "lit/directives/cache.js";
|
|
5
5
|
import { property as o, customElement as $, query as X, state as b } from "lit/decorators.js";
|
|
6
|
-
import
|
|
6
|
+
import c from "big.js";
|
|
7
7
|
import { sumPayout as Ue } from "@betorigami/game-engine";
|
|
8
8
|
import { styleMap as je } from "lit/directives/style-map.js";
|
|
9
9
|
const He = {
|
|
@@ -74,10 +74,10 @@ class j {
|
|
|
74
74
|
let n = 0, l = 0;
|
|
75
75
|
for (; ; ) {
|
|
76
76
|
l++;
|
|
77
|
-
const
|
|
78
|
-
if (
|
|
77
|
+
const d = e * Math.exp(-i * l);
|
|
78
|
+
if (d < 0.01)
|
|
79
79
|
break;
|
|
80
|
-
n +=
|
|
80
|
+
n += d, s.push(n);
|
|
81
81
|
}
|
|
82
82
|
return s;
|
|
83
83
|
}
|
|
@@ -118,7 +118,7 @@ class Fe {
|
|
|
118
118
|
headers: {
|
|
119
119
|
"Content-Type": "application/json",
|
|
120
120
|
Authorization: `Bearer ${this.authToken}`,
|
|
121
|
-
"X-Origami-Trace":
|
|
121
|
+
"X-Origami-Trace": ge()
|
|
122
122
|
},
|
|
123
123
|
body: JSON.stringify({
|
|
124
124
|
amount: e.amount,
|
|
@@ -151,11 +151,11 @@ class Ke {
|
|
|
151
151
|
this.edge = e;
|
|
152
152
|
}
|
|
153
153
|
async startBet(e) {
|
|
154
|
-
const { amount: i, riskLevel: r, segments: s } = e, n = { riskLevel: r, segments: s, betAmount:
|
|
154
|
+
const { amount: i, riskLevel: r, segments: s } = e, n = { riskLevel: r, segments: s, betAmount: c(i) }, l = new Ce().getGameResult({
|
|
155
155
|
generator: de(),
|
|
156
156
|
edge: this.edge,
|
|
157
157
|
gameInputs: n
|
|
158
|
-
}),
|
|
158
|
+
}), d = Ue(l.payout).toString();
|
|
159
159
|
return { success: !0, data: {
|
|
160
160
|
id: crypto.randomUUID(),
|
|
161
161
|
tenantId: "origami-casino",
|
|
@@ -163,7 +163,7 @@ class Ke {
|
|
|
163
163
|
tenantUserId: "mock-user",
|
|
164
164
|
gameId: "wheel",
|
|
165
165
|
amount: i,
|
|
166
|
-
payout:
|
|
166
|
+
payout: d,
|
|
167
167
|
afterBalance: "1000",
|
|
168
168
|
multiplier: l.payoutMultiplier.toString(),
|
|
169
169
|
clientSeed: "mock-seed",
|
|
@@ -363,7 +363,7 @@ var Je = Object.defineProperty, et = Object.getOwnPropertyDescriptor, F = (t, e,
|
|
|
363
363
|
};
|
|
364
364
|
let T = class extends D {
|
|
365
365
|
constructor() {
|
|
366
|
-
super(...arguments), this.risk =
|
|
366
|
+
super(...arguments), this.risk = u.MEDIUM_RISK, this.segments = L.TEN, this.highlightedSegments = [];
|
|
367
367
|
}
|
|
368
368
|
generateWheelPaths() {
|
|
369
369
|
const t = Te({ riskLevel: this.risk, segments: this.segments }), e = { cx: 285, cy: 285 }, i = 284.371, r = 2 * Math.PI / this.segments, s = [];
|
|
@@ -418,14 +418,14 @@ F([
|
|
|
418
418
|
T = F([
|
|
419
419
|
$("origami-wheel-svg")
|
|
420
420
|
], T);
|
|
421
|
-
var tt = Object.defineProperty, st = Object.getOwnPropertyDescriptor,
|
|
421
|
+
var tt = Object.defineProperty, st = Object.getOwnPropertyDescriptor, p = (t, e, i, r) => {
|
|
422
422
|
for (var s = r > 1 ? void 0 : r ? st(e, i) : e, n = t.length - 1, l; n >= 0; n--)
|
|
423
423
|
(l = t[n]) && (s = (r ? l(e, i, s) : l(s)) || s);
|
|
424
424
|
return r && s && tt(e, i, s), s;
|
|
425
425
|
};
|
|
426
426
|
let h = class extends D {
|
|
427
427
|
constructor() {
|
|
428
|
-
super(...arguments), this.services = new f(this, ye), this.skin = new f(this, be), this.preferences = new f(this, ve), this.isPlaying = !1, this.staticDisplay = !1, this.ignoreInstantBet = !1, this.risk =
|
|
428
|
+
super(...arguments), this.services = new f(this, ye), this.skin = new f(this, be), this.preferences = new f(this, ve), this.isPlaying = !1, this.staticDisplay = !1, this.ignoreInstantBet = !1, this.risk = u.MEDIUM_RISK, this.segments = 10, this.targetAngle = null, this.resultSegment = null, this.hoveredSegments = [], this._angle = 0, this._rafId = null, this._decelerationOffsets = null, this._currentDecelerationFrame = 0, this._decelerationStartAngle = 0;
|
|
429
429
|
}
|
|
430
430
|
firstUpdated() {
|
|
431
431
|
this._updateTransform();
|
|
@@ -520,40 +520,40 @@ let h = class extends D {
|
|
|
520
520
|
}
|
|
521
521
|
};
|
|
522
522
|
h.styles = [W, qe];
|
|
523
|
-
|
|
523
|
+
p([
|
|
524
524
|
o({ type: Boolean })
|
|
525
525
|
], h.prototype, "isPlaying", 2);
|
|
526
|
-
|
|
526
|
+
p([
|
|
527
527
|
o({ type: Boolean })
|
|
528
528
|
], h.prototype, "staticDisplay", 2);
|
|
529
|
-
|
|
529
|
+
p([
|
|
530
530
|
o({ type: Boolean })
|
|
531
531
|
], h.prototype, "ignoreInstantBet", 2);
|
|
532
|
-
|
|
532
|
+
p([
|
|
533
533
|
o({ type: String })
|
|
534
534
|
], h.prototype, "risk", 2);
|
|
535
|
-
|
|
535
|
+
p([
|
|
536
536
|
o({ type: Number })
|
|
537
537
|
], h.prototype, "segments", 2);
|
|
538
|
-
|
|
538
|
+
p([
|
|
539
539
|
o({ type: Number })
|
|
540
540
|
], h.prototype, "targetAngle", 2);
|
|
541
|
-
|
|
541
|
+
p([
|
|
542
542
|
o({ type: Number })
|
|
543
543
|
], h.prototype, "resultSegment", 2);
|
|
544
|
-
|
|
544
|
+
p([
|
|
545
545
|
o({ type: Array })
|
|
546
546
|
], h.prototype, "hoveredSegments", 2);
|
|
547
|
-
|
|
547
|
+
p([
|
|
548
548
|
X(".wheel-svg")
|
|
549
549
|
], h.prototype, "_wheelEl", 2);
|
|
550
|
-
|
|
550
|
+
p([
|
|
551
551
|
te("targetAngle")
|
|
552
552
|
], h.prototype, "handleTargetAngleChange", 1);
|
|
553
|
-
|
|
553
|
+
p([
|
|
554
554
|
te("isPlaying")
|
|
555
555
|
], h.prototype, "handleIsPlayingChange", 1);
|
|
556
|
-
h =
|
|
556
|
+
h = p([
|
|
557
557
|
$("origami-wheel-animator")
|
|
558
558
|
], h);
|
|
559
559
|
const it = I`
|
|
@@ -700,7 +700,7 @@ var rt = Object.defineProperty, nt = Object.getOwnPropertyDescriptor, R = (t, e,
|
|
|
700
700
|
};
|
|
701
701
|
let O = class extends D {
|
|
702
702
|
constructor() {
|
|
703
|
-
super(...arguments), this.locale = new f(this, z), this.limits = new f(this, se), this.layout = new f(this, ie), this.wallet = new f(this, Se), this.risk =
|
|
703
|
+
super(...arguments), this.locale = new f(this, z), this.limits = new f(this, se), this.layout = new f(this, ie), this.wallet = new f(this, Se), this.risk = u.MEDIUM_RISK, this.segments = L.TEN, this.resultSegment = null, this.hoveredTileIndex = null;
|
|
704
704
|
}
|
|
705
705
|
get edge() {
|
|
706
706
|
return this.limits.value.edge;
|
|
@@ -738,14 +738,14 @@ let O = class extends D {
|
|
|
738
738
|
this.layout.value.isDesktop && (this.hoveredTileIndex = null, this.emit("wheel-multiplier-hover", { detail: { segments: [] } }));
|
|
739
739
|
}
|
|
740
740
|
formatProfit(t) {
|
|
741
|
-
const { betAmount: e } = this.wallet.value, { maxPayout: i } = this.limits.value, { currency: r } = this.locale.value, s = _e({ betAmount:
|
|
741
|
+
const { betAmount: e } = this.wallet.value, { maxPayout: i } = this.limits.value, { currency: r } = this.locale.value, s = _e({ betAmount: c(e), multiplier: t, maxPayout: c(i) });
|
|
742
742
|
return $e(s.toFixed(), r, { includeSymbol: !1 });
|
|
743
743
|
}
|
|
744
744
|
formatChance(t, e) {
|
|
745
745
|
return `${t}/${e}`;
|
|
746
746
|
}
|
|
747
747
|
render() {
|
|
748
|
-
const t = this.tiles, e = Math.min(t.length, 6), { language: i } = this.locale.value, r = this.activeTileIndex, s = t[r], n = t.reduce((_, k) => _ + k.weight, 0), l = this.formatProfit(s.multiplier),
|
|
748
|
+
const t = this.tiles, e = Math.min(t.length, 6), { language: i } = this.locale.value, r = this.activeTileIndex, s = t[r], n = t.reduce((_, k) => _ + k.weight, 0), l = this.formatProfit(s.multiplier), d = this.formatChance(s.weight, n);
|
|
749
749
|
return a`
|
|
750
750
|
<div class="container">
|
|
751
751
|
${this.layout.value.isDesktop ? a`<div class="multiplier-info">
|
|
@@ -768,7 +768,7 @@ let O = class extends D {
|
|
|
768
768
|
<div class="info-item">
|
|
769
769
|
<div>
|
|
770
770
|
<span class="label">${g("common.winChance", i)}:</span>
|
|
771
|
-
<span class="value">${
|
|
771
|
+
<span class="value">${d}</span>
|
|
772
772
|
</div>
|
|
773
773
|
<lottie-icon
|
|
774
774
|
src="https://assets.betorigami.com/games/animations/percentage_symbol.json"
|
|
@@ -828,7 +828,7 @@ var lt = Object.defineProperty, ot = Object.getOwnPropertyDescriptor, A = (t, e,
|
|
|
828
828
|
};
|
|
829
829
|
let v = class extends D {
|
|
830
830
|
constructor() {
|
|
831
|
-
super(...arguments), this.isPlaying = !1, this.history = [], this.risk =
|
|
831
|
+
super(...arguments), this.isPlaying = !1, this.history = [], this.risk = u.MEDIUM_RISK, this.segments = 10, this.targetAngle = null, this.resultSegment = null, this.hoveredSegments = [];
|
|
832
832
|
}
|
|
833
833
|
handleMultiplierHover(t) {
|
|
834
834
|
this.hoveredSegments = t.detail.segments;
|
|
@@ -924,19 +924,19 @@ const he = I`
|
|
|
924
924
|
grid-column: span 2;
|
|
925
925
|
}
|
|
926
926
|
`;
|
|
927
|
-
var ht = Object.defineProperty,
|
|
928
|
-
for (var s = r > 1 ? void 0 : r ?
|
|
927
|
+
var ht = Object.defineProperty, ct = Object.getOwnPropertyDescriptor, K = (t, e, i, r) => {
|
|
928
|
+
for (var s = r > 1 ? void 0 : r ? ct(e, i) : e, n = t.length - 1, l; n >= 0; n--)
|
|
929
929
|
(l = t[n]) && (s = (r ? l(e, i, s) : l(s)) || s);
|
|
930
930
|
return r && s && ht(e, i, s), s;
|
|
931
931
|
};
|
|
932
|
-
const
|
|
933
|
-
[
|
|
934
|
-
[
|
|
935
|
-
[
|
|
932
|
+
const gt = {
|
|
933
|
+
[u.LOW_RISK]: "common.low",
|
|
934
|
+
[u.MEDIUM_RISK]: "common.medium",
|
|
935
|
+
[u.HIGH_RISK]: "common.high"
|
|
936
936
|
};
|
|
937
937
|
let B = class extends D {
|
|
938
938
|
constructor() {
|
|
939
|
-
super(...arguments), this.locale = new f(this, z), this.risk =
|
|
939
|
+
super(...arguments), this.locale = new f(this, z), this.risk = u.MEDIUM_RISK, this.segments = L.TEN, this.disabled = !1;
|
|
940
940
|
}
|
|
941
941
|
handleRiskChange(t) {
|
|
942
942
|
const { value: e } = t.detail;
|
|
@@ -952,7 +952,7 @@ let B = class extends D {
|
|
|
952
952
|
<origami-select
|
|
953
953
|
class="grid-full-width"
|
|
954
954
|
label=${g("common.risk", t)}
|
|
955
|
-
.options=${Le.map((e) => ({ value: e, label: g(
|
|
955
|
+
.options=${Le.map((e) => ({ value: e, label: g(gt[e], t) }))}
|
|
956
956
|
.value=${this.risk}
|
|
957
957
|
@select-change=${this.handleRiskChange}
|
|
958
958
|
?disabled=${this.disabled}
|
|
@@ -989,7 +989,7 @@ var ut = Object.defineProperty, mt = Object.getOwnPropertyDescriptor, x = (t, e,
|
|
|
989
989
|
};
|
|
990
990
|
let y = class extends D {
|
|
991
991
|
constructor() {
|
|
992
|
-
super(...arguments), this.locale = new f(this, z), this.isPlaying = !1, this.betDisabled = !1, this.inputsDisabled = !1, this.risk =
|
|
992
|
+
super(...arguments), this.locale = new f(this, z), this.isPlaying = !1, this.betDisabled = !1, this.inputsDisabled = !1, this.risk = u.MEDIUM_RISK, this.segments = L.TEN, this.betMaxMultiplier = c(1), this.isBetAmountValid = !0, this._betAboveBalance = !1;
|
|
993
993
|
}
|
|
994
994
|
render() {
|
|
995
995
|
const t = this.locale.value.language;
|
|
@@ -1059,7 +1059,7 @@ var pt = Object.defineProperty, dt = Object.getOwnPropertyDescriptor, M = (t, e,
|
|
|
1059
1059
|
};
|
|
1060
1060
|
let w = class extends D {
|
|
1061
1061
|
constructor() {
|
|
1062
|
-
super(...arguments), this.inputsDisabled = !1, this.autobetStopping = !1, this.autobetInProgress = !1, this.betDisabled = !1, this.risk =
|
|
1062
|
+
super(...arguments), this.inputsDisabled = !1, this.autobetStopping = !1, this.autobetInProgress = !1, this.betDisabled = !1, this.risk = u.MEDIUM_RISK, this.segments = L.TEN, this.betMaxMultiplier = c(1);
|
|
1063
1063
|
}
|
|
1064
1064
|
render() {
|
|
1065
1065
|
return a`
|
|
@@ -1118,9 +1118,9 @@ var yt = Object.defineProperty, bt = Object.getOwnPropertyDescriptor, S = (t, e,
|
|
|
1118
1118
|
(l = t[n]) && (s = (r ? l(e, i, s) : l(s)) || s);
|
|
1119
1119
|
return r && s && yt(e, i, s), s;
|
|
1120
1120
|
};
|
|
1121
|
-
let
|
|
1121
|
+
let m = class extends re {
|
|
1122
1122
|
constructor() {
|
|
1123
|
-
super(), this.limits = new f(this, se), this.layout = new f(this, ie), this.isManualPlaying = !1, this.history = [], this.wheelRisk =
|
|
1123
|
+
super(), this.limits = new f(this, se), this.layout = new f(this, ie), this.isManualPlaying = !1, this.history = [], this.wheelRisk = u.MEDIUM_RISK, this.numberOfSegments = 10, this.targetAngle = null, this.resultSegment = null, this.isWheelSpinning = !1, new Ee(this, [
|
|
1124
1124
|
{
|
|
1125
1125
|
key: " ",
|
|
1126
1126
|
callback: () => ee.clickBetButton(this.manualOrAuto, this._wheelManualEl, this._wheelAutoEl),
|
|
@@ -1154,7 +1154,7 @@ let u = class extends re {
|
|
|
1154
1154
|
this.resetForNextBet(() => {
|
|
1155
1155
|
this.targetAngle = null, this.resultSegment = null;
|
|
1156
1156
|
});
|
|
1157
|
-
const i =
|
|
1157
|
+
const i = c(this.wallet.value.balance);
|
|
1158
1158
|
try {
|
|
1159
1159
|
if (this.session.value.isDemoMode && i.lt(t))
|
|
1160
1160
|
throw new Error(g("alerts.insufficientBalance", this.locale.value.language));
|
|
@@ -1171,16 +1171,16 @@ let u = class extends re {
|
|
|
1171
1171
|
})
|
|
1172
1172
|
);
|
|
1173
1173
|
if (s.success) {
|
|
1174
|
-
const { data: n } = s, l = Number(n.multiplier ?? 0), { betActions:
|
|
1174
|
+
const { data: n } = s, l = Number(n.multiplier ?? 0), { betActions: d } = n, _ = d[d.length - 1];
|
|
1175
1175
|
if (_?.data?.WHEEL) {
|
|
1176
1176
|
const { result: P } = _.data.WHEEL;
|
|
1177
1177
|
this.resultSegment = P[0] ?? 0, this.targetAngle = j.calculateTargetAngle(this.resultSegment, this.numberOfSegments, n.id);
|
|
1178
1178
|
}
|
|
1179
1179
|
r && await this.wheelSpinCompletedPromise(), this.isWheelSpinning = !1;
|
|
1180
|
-
const k =
|
|
1180
|
+
const k = c(l).gt(0);
|
|
1181
1181
|
this.history = [...this.history, { multiplier: l, won: k, id: n.id }], this.updateHistoryWithBet(n);
|
|
1182
|
-
const E = this.session.value.isDemoMode ? i.minus(n.amount ?? 0).plus(n.payout ?? 0) :
|
|
1183
|
-
return this.wallet.value.updateBalance(E),
|
|
1182
|
+
const E = this.session.value.isDemoMode ? i.minus(n.amount ?? 0).plus(n.payout ?? 0) : c(n.afterBalance ?? 0);
|
|
1183
|
+
return this.wallet.value.updateBalance(E), c(l).gt(1) && this.playWinFeedback(), s;
|
|
1184
1184
|
} else
|
|
1185
1185
|
return this.wallet.value.updateBalance(i), this.isWheelSpinning = !1, s;
|
|
1186
1186
|
} catch (r) {
|
|
@@ -1200,14 +1200,15 @@ let u = class extends re {
|
|
|
1200
1200
|
const i = await this.handleBetExecution(e, t);
|
|
1201
1201
|
if (!i.success)
|
|
1202
1202
|
return {
|
|
1203
|
-
pnl:
|
|
1203
|
+
pnl: c(0),
|
|
1204
1204
|
gameOutcome: "Draw",
|
|
1205
1205
|
hasError: !0,
|
|
1206
|
+
afterBalance: null,
|
|
1206
1207
|
errorCode: i.errorCode ?? U.UNKNOWN,
|
|
1207
1208
|
errorMessage: i.error || g("alerts.errorProcessingBet", this.locale.value.language)
|
|
1208
1209
|
};
|
|
1209
|
-
const r = i.data, s =
|
|
1210
|
-
return await this.holdResultDisplay(), { pnl: s, gameOutcome: l, hasError: !1 };
|
|
1210
|
+
const r = i.data, s = c(r.payout ?? 0).minus(r.amount ?? 0), n = Number(r.multiplier), l = Me(n);
|
|
1211
|
+
return await this.holdResultDisplay(), { pnl: s, gameOutcome: l, hasError: !1, afterBalance: r.afterBalance ? c(r.afterBalance) : null };
|
|
1211
1212
|
}
|
|
1212
1213
|
render() {
|
|
1213
1214
|
const t = oe(this.limits.value.edge, { riskLevel: this.wheelRisk, segments: this.numberOfSegments }), e = !1, i = Pe(this.layout.value);
|
|
@@ -1268,37 +1269,37 @@ let u = class extends re {
|
|
|
1268
1269
|
`;
|
|
1269
1270
|
}
|
|
1270
1271
|
};
|
|
1271
|
-
|
|
1272
|
+
m.styles = [...re.styles, ft];
|
|
1272
1273
|
S([
|
|
1273
1274
|
b()
|
|
1274
|
-
],
|
|
1275
|
+
], m.prototype, "isManualPlaying", 2);
|
|
1275
1276
|
S([
|
|
1276
1277
|
b()
|
|
1277
|
-
],
|
|
1278
|
+
], m.prototype, "history", 2);
|
|
1278
1279
|
S([
|
|
1279
1280
|
b()
|
|
1280
|
-
],
|
|
1281
|
+
], m.prototype, "wheelRisk", 2);
|
|
1281
1282
|
S([
|
|
1282
1283
|
b()
|
|
1283
|
-
],
|
|
1284
|
+
], m.prototype, "numberOfSegments", 2);
|
|
1284
1285
|
S([
|
|
1285
1286
|
b()
|
|
1286
|
-
],
|
|
1287
|
+
], m.prototype, "targetAngle", 2);
|
|
1287
1288
|
S([
|
|
1288
1289
|
b()
|
|
1289
|
-
],
|
|
1290
|
+
], m.prototype, "resultSegment", 2);
|
|
1290
1291
|
S([
|
|
1291
1292
|
b()
|
|
1292
|
-
],
|
|
1293
|
+
], m.prototype, "isWheelSpinning", 2);
|
|
1293
1294
|
S([
|
|
1294
1295
|
X("origami-wheel-manual")
|
|
1295
|
-
],
|
|
1296
|
+
], m.prototype, "_wheelManualEl", 2);
|
|
1296
1297
|
S([
|
|
1297
1298
|
X("origami-wheel-auto")
|
|
1298
|
-
],
|
|
1299
|
-
|
|
1299
|
+
], m.prototype, "_wheelAutoEl", 2);
|
|
1300
|
+
m = S([
|
|
1300
1301
|
$("origami-wheel-game")
|
|
1301
|
-
],
|
|
1302
|
+
], m);
|
|
1302
1303
|
var vt = Object.getOwnPropertyDescriptor, wt = (t, e, i, r) => {
|
|
1303
1304
|
for (var s = r > 1 ? void 0 : r ? vt(e, i) : e, n = t.length - 1, l; n >= 0; n--)
|
|
1304
1305
|
(l = t[n]) && (s = l(s) || s);
|
|
@@ -1333,12 +1334,12 @@ V.styles = I`
|
|
|
1333
1334
|
V = wt([
|
|
1334
1335
|
$("origami-wheel-outcome")
|
|
1335
1336
|
], V);
|
|
1336
|
-
const St = (t) => typeof t == "object" && t !== null && "risk" in t && ne(t.risk) && "segments" in t && le(t.segments) && "resultSegment" in t && typeof t.resultSegment == "number" && "betId" in t && typeof t.betId == "string",
|
|
1337
|
+
const St = (t) => typeof t == "object" && t !== null && "risk" in t && ne(t.risk) && "segments" in t && le(t.segments) && "resultSegment" in t && typeof t.resultSegment == "number" && "betId" in t && typeof t.betId == "string", ce = (t) => {
|
|
1337
1338
|
const e = t?.WHEEL;
|
|
1338
1339
|
return e !== void 0 && "segments" in e ? e : void 0;
|
|
1339
1340
|
}, _t = (t) => {
|
|
1340
|
-
const e =
|
|
1341
|
-
return e === void 0 || i === void 0 || !Oe(i) ? { risk:
|
|
1341
|
+
const e = ce(t.betActions[0]?.data), i = t.betActions[t.betActions.length - 1]?.data.WHEEL;
|
|
1342
|
+
return e === void 0 || i === void 0 || !Oe(i) ? { risk: u.MEDIUM_RISK, segments: L.TEN, resultSegment: 0, betId: t.id || "123" } : { risk: e.riskLevel, segments: e.segments, resultSegment: i.result[0] ?? 0, betId: t.id };
|
|
1342
1343
|
}, $t = (t, { enableAnimation: e, inBetResultModal: i, language: r }) => {
|
|
1343
1344
|
if (!St(t))
|
|
1344
1345
|
return a`<p>${g("errors.noWheelData", r)}</p>`;
|
|
@@ -1358,7 +1359,7 @@ const St = (t) => typeof t == "object" && t !== null && "risk" in t && ne(t.risk
|
|
|
1358
1359
|
</origami-wheel-outcome>
|
|
1359
1360
|
`;
|
|
1360
1361
|
}, xt = (t) => {
|
|
1361
|
-
const e =
|
|
1362
|
+
const e = ce(t);
|
|
1362
1363
|
return e === void 0 ? {} : { segments: e.segments, riskLevel: e.riskLevel };
|
|
1363
1364
|
}, kt = ({ segments: t, riskLevel: e }) => ({ segments: t, riskLevel: e }), Bt = {
|
|
1364
1365
|
id: Y.WHEEL,
|
|
@@ -1371,6 +1372,6 @@ const St = (t) => typeof t == "object" && t !== null && "risk" in t && ne(t.risk
|
|
|
1371
1372
|
renderOutcome: $t
|
|
1372
1373
|
};
|
|
1373
1374
|
export {
|
|
1374
|
-
|
|
1375
|
+
m as WheelGame,
|
|
1375
1376
|
Bt as wheelUiModule
|
|
1376
1377
|
};
|