@streamlayer/react-ui 1.26.0 → 1.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/app/app/Advertisement/index.d.ts +1 -0
- package/lib/app/app/Advertisement/index.js +125 -92
- package/lib/app/app/Banner/index.d.ts +6 -0
- package/lib/app/app/Banner/index.js +6 -0
- package/lib/app/app/Features/Gamification/Question.d.ts +4 -0
- package/lib/app/app/Features/Gamification/Question.js +79 -50
- package/lib/app/app/Features/Gamification/QuestionAdvertisement.d.ts +6 -0
- package/lib/app/app/Features/Gamification/QuestionAdvertisement.js +46 -0
- package/lib/app/app/Features/Gamification/Tabs.js +12 -12
- package/lib/app/app/Features/Gamification/index.d.ts +3 -0
- package/lib/app/app/Features/Gamification/index.js +56 -52
- package/lib/app/app/Features/index.d.ts +1 -0
- package/lib/app/app/Features/index.js +6 -4
- package/lib/app/app/InApp/index.d.ts +1 -0
- package/lib/app/app/InApp/index.js +44 -17
- package/lib/app/app/Insight/index.d.ts +3 -0
- package/lib/app/app/Insight/index.js +33 -30
- package/lib/app/app/Layout/index.d.ts +17 -0
- package/lib/app/app/Layout/index.js +105 -0
- package/lib/app/app/Layout/styles.d.ts +12 -0
- package/lib/app/app/Layout/styles.js +64 -0
- package/lib/app/app/Notifications/Onboarding/Notification/styles.d.ts +7 -1
- package/lib/app/app/Notifications/styles.d.ts +18 -2
- package/lib/app/app/index.d.ts +1 -0
- package/lib/app/app/index.js +91 -85
- package/lib/app/app/story/index.js +56 -58
- package/lib/app/app/story/promotion/index.js +31 -36
- package/lib/app/app/story/promotion/styles.d.ts +3 -1
- package/lib/app/app/story/promotion/video.js +63 -81
- package/lib/app/app/story/promotion-notification/styles.d.ts +3 -1
- package/lib/app/app/story/styles.d.ts +5 -1
- package/lib/app/app/story/styles.js +36 -16
- package/lib/app/app/story/video.d.ts +5 -1
- package/lib/app/app/story/video.js +70 -33
- package/lib/app/app/useApp.d.ts +1 -2
- package/lib/app/masters/BetPack/BetPackContent/StartScreen/styles.d.ts +7 -1
- package/lib/app/masters/BetPack/BetPackContent/index.js +175 -187
- package/lib/app/masters/BetPack/BetPackContent/styles.d.ts +84 -84
- package/lib/app/masters/BetPack/BetPackOverlay/styles.d.ts +14 -2
- package/lib/app/masters/Features/Gamification/Question.js +19 -17
- package/lib/app/masters/Notifications/Onboarding/Notification/styles.d.ts +7 -1
- package/lib/app/masters/Notifications/styles.d.ts +18 -2
- package/lib/app/masters/masters.d.ts +4 -1
- package/lib/app/masters/useMastersApp.d.ts +1 -1
- package/lib/app/tgl/styles.d.ts +3 -1
- package/lib/app/{tvos → webos/Advertisement}/AdvertisementUI.d.ts +7 -1
- package/lib/app/webos/Advertisement/AdvertisementUI.js +63 -0
- package/lib/app/{tvos/Advertisement.d.ts → webos/Advertisement/index.d.ts} +3 -1
- package/lib/app/webos/Advertisement/index.js +119 -0
- package/lib/app/webos/ExposedPauseAd/PauseAd.d.ts +15 -0
- package/lib/app/webos/ExposedPauseAd/PauseAd.js +93 -0
- package/lib/app/webos/ExposedPauseAd/styles.d.ts +12 -0
- package/lib/app/webos/ExposedPauseAd/styles.js +64 -0
- package/lib/app/webos/Question/index.d.ts +9 -0
- package/lib/app/webos/Question/index.js +56 -0
- package/lib/app/webos/index.d.ts +24 -0
- package/lib/app/webos/index.js +65 -0
- package/lib/app/webos/story.d.ts +9 -0
- package/lib/app/webos/story.js +74 -0
- package/lib/app/webos/styles.js +4 -0
- package/lib/app/webos/ui/Layout/index.js +78 -0
- package/lib/app/{tvos → webos}/ui/Layout/styles.js +25 -25
- package/lib/app/webos/ui/Sidebar/PromoAction.d.ts +7 -0
- package/lib/app/webos/ui/Sidebar/PromoAction.js +63 -0
- package/lib/app/{tvos → webos}/ui/Sidebar/index.d.ts +6 -0
- package/lib/app/webos/ui/Sidebar/index.js +176 -0
- package/lib/app/{tvos → webos}/ui/Sidebar/styles.d.ts +7 -3
- package/lib/app/{tvos → webos}/ui/Sidebar/styles.js +175 -170
- package/lib/app/webos/ui/insight/index.d.ts +9 -0
- package/lib/app/webos/ui/insight/index.js +100 -0
- package/lib/app/webos/ui/insight/styles.d.ts +12 -0
- package/lib/app/webos/ui/insight/styles.js +51 -0
- package/lib/app/webos/useTvButton.d.ts +9 -0
- package/lib/app/webos/useTvButton.js +23 -0
- package/lib/assets/style.css +1 -1
- package/lib/hooks/analytics.d.ts +14 -0
- package/lib/hooks/showIn.d.ts +9 -0
- package/lib/hooks/useKeyboardNavigation.d.ts +15 -0
- package/lib/hooks/useKeyboardNavigation.js +74 -0
- package/lib/index-T1iiS0ZO.js +17 -0
- package/lib/ui/advertisement/banner/index.d.ts +3 -0
- package/lib/ui/advertisement/banner/index.js +29 -17
- package/lib/ui/advertisement/banner/styles.d.ts +5 -1
- package/lib/ui/advertisement/index.d.ts +4 -1
- package/lib/ui/advertisement/index.js +56 -44
- package/lib/ui/advertisement/notification/index.d.ts +2 -0
- package/lib/ui/advertisement/notification/index.js +50 -34
- package/lib/ui/advertisement/notification/lower-third/index.d.ts +2 -0
- package/lib/ui/advertisement/notification/lower-third/index.js +42 -26
- package/lib/ui/advertisement/notification/lower-third/styles.d.ts +11 -0
- package/lib/ui/advertisement/notification/lower-third/styles.js +39 -24
- package/lib/ui/advertisement/notification/styles.d.ts +18 -1
- package/lib/ui/advertisement/notification/styles.js +48 -33
- package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.d.ts +2 -2
- package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.js +1 -1
- package/lib/ui/advertisement/overlay/index.d.ts +4 -1
- package/lib/ui/advertisement/overlay/index.js +135 -77
- package/lib/ui/gamification/detail/header/index.d.ts +2 -0
- package/lib/ui/gamification/detail/header/index.js +19 -16
- package/lib/ui/gamification/detail/header/styles.d.ts +15 -3
- package/lib/ui/gamification/detail/header/styles.js +1 -1
- package/lib/ui/gamification/detail/sponsor/index.d.ts +1 -0
- package/lib/ui/gamification/detail/sponsor/index.js +25 -13
- package/lib/ui/gamification/invite-link/styles.d.ts +14 -2
- package/lib/ui/gamification/leaderboard/list-item/styles.d.ts +7 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.d.ts +14 -2
- package/lib/ui/gamification/onboarding/styles.d.ts +10 -2
- package/lib/ui/gamification/points/styles.d.ts +7 -1
- package/lib/ui/gamification/question/inapp/notification/AdNotification/NotificationMedia/index.d.ts +48 -0
- package/lib/ui/gamification/question/inapp/notification/AdNotification/NotificationMedia/index.js +94 -0
- package/lib/ui/gamification/question/inapp/notification/AdNotification/index.d.ts +9 -0
- package/lib/ui/gamification/question/inapp/notification/AdNotification/index.js +99 -0
- package/lib/ui/gamification/question/inapp/notification/AdNotification/styles.d.ts +42 -0
- package/lib/ui/gamification/question/inapp/notification/AdNotification/styles.js +117 -0
- package/lib/ui/gamification/question/inapp/notification/NotificationMedia/index.js +9 -8
- package/lib/ui/gamification/question/inapp/notification/styles.d.ts +7 -1
- package/lib/ui/gamification/question/inapp/onboarding/index.js +12 -12
- package/lib/ui/gamification/question/inapp/onboarding/styles.d.ts +18 -2
- package/lib/ui/gamification/question/inapp/prediction-result/frames/content.js +9 -9
- package/lib/ui/gamification/question/inapp/prediction-result/frames/styles.d.ts +7 -1
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/content.d.ts +5 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/content.js +49 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/index.d.ts +12 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/index.js +56 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/lines.d.ts +1 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/lines.js +34 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step1.d.ts +1 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step1.js +19 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step2.d.ts +4 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step2.js +34 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step3.d.ts +7 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step3.js +43 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/styles.d.ts +9 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/styles.js +20 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/index.d.ts +10 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/index.js +20 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/styles.d.ts +11 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/styles.js +34 -0
- package/lib/ui/gamification/question/notification/prediction-result/styles.d.ts +38 -5
- package/lib/ui/gamification/question/notification/styles.d.ts +14 -2
- package/lib/ui/gamification/question/styles.d.ts +26 -4
- package/lib/ui/gamification/vote/alert/styles.d.ts +7 -1
- package/lib/ui/gamification/vote/feedback/styles.d.ts +19 -2
- package/lib/ui/gamification/vote/feedbackAlert/index.d.ts +9 -0
- package/lib/ui/gamification/vote/feedbackAlert/index.js +11 -0
- package/lib/ui/gamification/vote/feedbackAlert/styles.d.ts +11 -0
- package/lib/ui/gamification/vote/feedbackAlert/styles.js +30 -0
- package/lib/ui/gamification/vote/index.d.ts +3 -1
- package/lib/ui/gamification/vote/index.js +160 -130
- package/lib/ui/gamification/vote/insight-details/index.js +8 -7
- package/lib/ui/gamification/vote/insight-details/styles.d.ts +7 -1
- package/lib/ui/gamification/vote/styles.d.ts +29 -4
- package/lib/ui/gamification/vote/vote-option/index.d.ts +3 -0
- package/lib/ui/gamification/vote/vote-option/index.js +72 -64
- package/lib/ui/gamification/vote/vote-option/styles.d.ts +7 -1
- package/lib/ui/gamification/vote/win-bar/styles.d.ts +19 -2
- package/lib/ui/icons/index.d.ts +1 -0
- package/lib/ui/icons/index.js +80 -79
- package/lib/ui/modal/index.js +12 -17
- package/lib/ui/questions/insight/index.d.ts +4 -1
- package/lib/ui/questions/insight/index.js +29 -26
- package/lib/ui/questions/twitter/account/styles.d.ts +7 -1
- package/lib/ui/questions/twitter/index.d.ts +1 -0
- package/lib/ui/questions/twitter/index.js +27 -19
- package/lib/ui/theme/constants.d.ts +2 -0
- package/lib/ui/theme/constants.js +2 -0
- package/lib/ui/theme/masters-theme.js +1 -0
- package/lib/ui/theme/utils.d.ts +10 -0
- package/lib/ui/theme/utils.js +77 -0
- package/lib/ui/video-player/index.d.ts +10 -2
- package/lib/ui/video-player/index.js +189 -110
- package/lib/ui/video-player/styles.d.ts +36 -0
- package/lib/ui/video-player/styles.js +59 -11
- package/lib/utils/common.d.ts +6 -0
- package/lib/utils/createDemo.d.ts +12 -0
- package/lib/utils/debug/components/bypassLogin.d.ts +6 -0
- package/lib/utils/debug/components/copyLogs.d.ts +1 -0
- package/lib/utils/debug/components/developer.d.ts +14 -0
- package/lib/utils/debug/components/envToggle.d.ts +6 -0
- package/lib/utils/debug/components/eventInput.d.ts +8 -0
- package/lib/utils/debug/components/sdkKey.d.ts +6 -0
- package/lib/utils/debug/components/styles.d.ts +1 -0
- package/lib/utils/debug/index.d.ts +36 -0
- package/lib/utils/debug/storage.d.ts +14 -0
- package/lib/utils/decorators/container.d.ts +6 -0
- package/lib/utils/decorators/container.js +5 -5
- package/lib/utils/decorators/masters.d.ts +2 -0
- package/lib/utils/decorators/styles.d.ts +2 -0
- package/lib/utils/login.d.ts +3 -0
- package/lib/utils/storage.d.ts +14 -0
- package/package.json +27 -20
- package/lib/app/tvos/Advertisement.js +0 -88
- package/lib/app/tvos/AdvertisementUI.js +0 -40
- package/lib/app/tvos/index.d.ts +0 -16
- package/lib/app/tvos/index.js +0 -23
- package/lib/app/tvos/story.d.ts +0 -6
- package/lib/app/tvos/story.js +0 -34
- package/lib/app/tvos/styles.js +0 -4
- package/lib/app/tvos/ui/Layout/index.js +0 -76
- package/lib/app/tvos/ui/Sidebar/PromoAction.d.ts +0 -2
- package/lib/app/tvos/ui/Sidebar/PromoAction.js +0 -62
- package/lib/app/tvos/ui/Sidebar/index.js +0 -114
- /package/lib/app/{tvos → webos}/styles.d.ts +0 -0
- /package/lib/app/{tvos → webos}/ui/Layout/index.d.ts +0 -0
- /package/lib/app/{tvos → webos}/ui/Layout/styles.d.ts +0 -0
|
@@ -1,47 +1,35 @@
|
|
|
1
|
-
import { jsx as L, jsxs as
|
|
2
|
-
import { ConnectError as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
1
|
+
import { jsx as L, jsxs as G } from "react/jsx-runtime";
|
|
2
|
+
import { ConnectError as N, Code as Q } from "@connectrpc/connect";
|
|
3
|
+
import { u as q } from "../../../../index-T1iiS0ZO.js";
|
|
4
|
+
import V from "lodash.throttle";
|
|
5
|
+
import { useRef as H, useMemo as X, useCallback as Y, useEffect as j, useState as U } from "react";
|
|
6
|
+
import { f as _, g as J, m as k, h as K, i as R, j as W, C as Z, k as F } from "../../../../styles-BfnMua4o.js";
|
|
6
7
|
import { EmergencyScreen as E } from "./EmergencyScreen/index.js";
|
|
7
8
|
import { EndScreen as ee } from "./EndScreen/index.js";
|
|
8
9
|
import { LoaderScreen as te } from "./LoaderScreen/index.js";
|
|
9
10
|
import { QuestionScreen as ae } from "./QuestionScreen/index.js";
|
|
10
|
-
import { ScreenContainer as
|
|
11
|
-
import { StartScreen as
|
|
12
|
-
function le(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
function ne(o, e = {}) {
|
|
19
|
-
let u = G(
|
|
20
|
-
(n) => e.keys ? le(o, e.keys, n) : o.listen(n),
|
|
21
|
-
[e.keys, o]
|
|
22
|
-
), c = o.get.bind(o);
|
|
23
|
-
return V(u, c, c);
|
|
24
|
-
}
|
|
25
|
-
function re(o, e, u, c) {
|
|
26
|
-
return o.params.createElements && Object.keys(c).forEach((n) => {
|
|
27
|
-
if (!u[n] && u.auto === !0) {
|
|
28
|
-
let s = U(o.el, `.${c[n]}`)[0];
|
|
29
|
-
s || (s = _("div", c[n]), s.className = c[n], o.el.append(s)), u[n] = s, e[n] = s;
|
|
11
|
+
import { ScreenContainer as se } from "./ScreenContainer/index.js";
|
|
12
|
+
import { StartScreen as ie } from "./StartScreen/index.js";
|
|
13
|
+
function le(p, e, h, d) {
|
|
14
|
+
return p.params.createElements && Object.keys(d).forEach((r) => {
|
|
15
|
+
if (!h[r] && h.auto === !0) {
|
|
16
|
+
let i = _(p.el, `.${d[r]}`)[0];
|
|
17
|
+
i || (i = J("div", d[r]), i.className = d[r], p.el.append(i)), h[r] = i, e[r] = i;
|
|
30
18
|
}
|
|
31
|
-
}),
|
|
19
|
+
}), h;
|
|
32
20
|
}
|
|
33
|
-
function P(
|
|
34
|
-
return
|
|
21
|
+
function P(p) {
|
|
22
|
+
return p === void 0 && (p = ""), `.${p.trim().replace(/([\.:!+\/])/g, "\\$1").replace(/ /g, ".")}`;
|
|
35
23
|
}
|
|
36
|
-
function
|
|
24
|
+
function ne(p) {
|
|
37
25
|
let {
|
|
38
26
|
swiper: e,
|
|
39
|
-
extendParams:
|
|
40
|
-
on:
|
|
41
|
-
emit:
|
|
42
|
-
} =
|
|
43
|
-
const
|
|
44
|
-
|
|
27
|
+
extendParams: h,
|
|
28
|
+
on: d,
|
|
29
|
+
emit: r
|
|
30
|
+
} = p;
|
|
31
|
+
const i = "swiper-pagination";
|
|
32
|
+
h({
|
|
45
33
|
pagination: {
|
|
46
34
|
el: null,
|
|
47
35
|
bulletElement: "span",
|
|
@@ -58,36 +46,36 @@ function oe(o) {
|
|
|
58
46
|
dynamicMainBullets: 1,
|
|
59
47
|
formatFractionCurrent: (t) => t,
|
|
60
48
|
formatFractionTotal: (t) => t,
|
|
61
|
-
bulletClass: `${
|
|
62
|
-
bulletActiveClass: `${
|
|
63
|
-
modifierClass: `${
|
|
64
|
-
currentClass: `${
|
|
65
|
-
totalClass: `${
|
|
66
|
-
hiddenClass: `${
|
|
67
|
-
progressbarFillClass: `${
|
|
68
|
-
progressbarOppositeClass: `${
|
|
69
|
-
clickableClass: `${
|
|
70
|
-
lockClass: `${
|
|
71
|
-
horizontalClass: `${
|
|
72
|
-
verticalClass: `${
|
|
73
|
-
paginationDisabledClass: `${
|
|
49
|
+
bulletClass: `${i}-bullet`,
|
|
50
|
+
bulletActiveClass: `${i}-bullet-active`,
|
|
51
|
+
modifierClass: `${i}-`,
|
|
52
|
+
currentClass: `${i}-current`,
|
|
53
|
+
totalClass: `${i}-total`,
|
|
54
|
+
hiddenClass: `${i}-hidden`,
|
|
55
|
+
progressbarFillClass: `${i}-progressbar-fill`,
|
|
56
|
+
progressbarOppositeClass: `${i}-progressbar-opposite`,
|
|
57
|
+
clickableClass: `${i}-clickable`,
|
|
58
|
+
lockClass: `${i}-lock`,
|
|
59
|
+
horizontalClass: `${i}-horizontal`,
|
|
60
|
+
verticalClass: `${i}-vertical`,
|
|
61
|
+
paginationDisabledClass: `${i}-disabled`
|
|
74
62
|
}
|
|
75
63
|
}), e.pagination = {
|
|
76
64
|
el: null,
|
|
77
65
|
bullets: []
|
|
78
66
|
};
|
|
79
|
-
let f,
|
|
80
|
-
function
|
|
67
|
+
let f, m = 0;
|
|
68
|
+
function y() {
|
|
81
69
|
return !e.params.pagination.el || !e.pagination.el || Array.isArray(e.pagination.el) && e.pagination.el.length === 0;
|
|
82
70
|
}
|
|
83
71
|
function A(t, a) {
|
|
84
72
|
const {
|
|
85
|
-
bulletActiveClass:
|
|
73
|
+
bulletActiveClass: s
|
|
86
74
|
} = e.params.pagination;
|
|
87
|
-
t && (t = t[`${a === "prev" ? "previous" : "next"}ElementSibling`], t && (t.classList.add(`${
|
|
75
|
+
t && (t = t[`${a === "prev" ? "previous" : "next"}ElementSibling`], t && (t.classList.add(`${s}-${a}`), t = t[`${a === "prev" ? "previous" : "next"}ElementSibling`], t && t.classList.add(`${s}-${a}-${a}`)));
|
|
88
76
|
}
|
|
89
|
-
function I(t, a,
|
|
90
|
-
if (t = t %
|
|
77
|
+
function I(t, a, s) {
|
|
78
|
+
if (t = t % s, a = a % s, a === t + 1)
|
|
91
79
|
return "next";
|
|
92
80
|
if (a === t - 1)
|
|
93
81
|
return "previous";
|
|
@@ -97,139 +85,139 @@ function oe(o) {
|
|
|
97
85
|
if (!a)
|
|
98
86
|
return;
|
|
99
87
|
t.preventDefault();
|
|
100
|
-
const
|
|
88
|
+
const s = R(a) * e.params.slidesPerGroup;
|
|
101
89
|
if (e.params.loop) {
|
|
102
|
-
if (e.realIndex ===
|
|
103
|
-
const
|
|
104
|
-
|
|
90
|
+
if (e.realIndex === s) return;
|
|
91
|
+
const n = I(e.realIndex, s, e.slides.length);
|
|
92
|
+
n === "next" ? e.slideNext() : n === "previous" ? e.slidePrev() : e.slideToLoop(s);
|
|
105
93
|
} else
|
|
106
|
-
e.slideTo(
|
|
94
|
+
e.slideTo(s);
|
|
107
95
|
}
|
|
108
96
|
function S() {
|
|
109
97
|
const t = e.rtl, a = e.params.pagination;
|
|
110
|
-
if (
|
|
111
|
-
let
|
|
112
|
-
|
|
113
|
-
let
|
|
98
|
+
if (y()) return;
|
|
99
|
+
let s = e.pagination.el;
|
|
100
|
+
s = k(s);
|
|
101
|
+
let n, b;
|
|
114
102
|
const B = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : e.slides.length, T = e.params.loop ? Math.ceil(B / e.params.slidesPerGroup) : e.snapGrid.length;
|
|
115
|
-
if (e.params.loop ? (
|
|
116
|
-
const
|
|
117
|
-
let x,
|
|
118
|
-
if (a.dynamicBullets && (f =
|
|
119
|
-
|
|
120
|
-
}), a.dynamicMainBullets > 1 &&
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
}),
|
|
124
|
-
|
|
125
|
-
const
|
|
126
|
-
|
|
103
|
+
if (e.params.loop ? (b = e.previousRealIndex || 0, n = e.params.slidesPerGroup > 1 ? Math.floor(e.realIndex / e.params.slidesPerGroup) : e.realIndex) : typeof e.snapIndex < "u" ? (n = e.snapIndex, b = e.previousSnapIndex) : (b = e.previousIndex || 0, n = e.activeIndex || 0), a.type === "bullets" && e.pagination.bullets && e.pagination.bullets.length > 0) {
|
|
104
|
+
const c = e.pagination.bullets;
|
|
105
|
+
let x, v, O;
|
|
106
|
+
if (a.dynamicBullets && (f = K(c[0], e.isHorizontal() ? "width" : "height"), s.forEach((u) => {
|
|
107
|
+
u.style[e.isHorizontal() ? "width" : "height"] = `${f * (a.dynamicMainBullets + 4)}px`;
|
|
108
|
+
}), a.dynamicMainBullets > 1 && b !== void 0 && (m += n - (b || 0), m > a.dynamicMainBullets - 1 ? m = a.dynamicMainBullets - 1 : m < 0 && (m = 0)), x = Math.max(n - m, 0), v = x + (Math.min(c.length, a.dynamicMainBullets) - 1), O = (v + x) / 2), c.forEach((u) => {
|
|
109
|
+
const g = [...["", "-next", "-next-next", "-prev", "-prev-prev", "-main"].map((C) => `${a.bulletActiveClass}${C}`)].map((C) => typeof C == "string" && C.includes(" ") ? C.split(" ") : C).flat();
|
|
110
|
+
u.classList.remove(...g);
|
|
111
|
+
}), s.length > 1)
|
|
112
|
+
c.forEach((u) => {
|
|
113
|
+
const g = R(u);
|
|
114
|
+
g === n ? u.classList.add(...a.bulletActiveClass.split(" ")) : e.isElement && u.setAttribute("part", "bullet"), a.dynamicBullets && (g >= x && g <= v && u.classList.add(...`${a.bulletActiveClass}-main`.split(" ")), g === x && A(u, "prev"), g === v && A(u, "next"));
|
|
127
115
|
});
|
|
128
116
|
else {
|
|
129
|
-
const
|
|
130
|
-
if (
|
|
131
|
-
|
|
117
|
+
const u = c[n];
|
|
118
|
+
if (u && u.classList.add(...a.bulletActiveClass.split(" ")), e.isElement && c.forEach((g, C) => {
|
|
119
|
+
g.setAttribute("part", C === n ? "bullet-active" : "bullet");
|
|
132
120
|
}), a.dynamicBullets) {
|
|
133
|
-
const
|
|
134
|
-
for (let M = x; M <=
|
|
135
|
-
|
|
136
|
-
A(
|
|
121
|
+
const g = c[x], C = c[v];
|
|
122
|
+
for (let M = x; M <= v; M += 1)
|
|
123
|
+
c[M] && c[M].classList.add(...`${a.bulletActiveClass}-main`.split(" "));
|
|
124
|
+
A(g, "prev"), A(C, "next");
|
|
137
125
|
}
|
|
138
126
|
}
|
|
139
127
|
if (a.dynamicBullets) {
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
M.style[e.isHorizontal() ?
|
|
128
|
+
const u = Math.min(c.length, a.dynamicMainBullets + 4), g = (f * u - f) / 2 - O * f, C = t ? "right" : "left";
|
|
129
|
+
c.forEach((M) => {
|
|
130
|
+
M.style[e.isHorizontal() ? C : "top"] = `${g}px`;
|
|
143
131
|
});
|
|
144
132
|
}
|
|
145
133
|
}
|
|
146
|
-
|
|
147
|
-
if (a.type === "fraction" && (
|
|
148
|
-
|
|
149
|
-
}),
|
|
150
|
-
|
|
134
|
+
s.forEach((c, x) => {
|
|
135
|
+
if (a.type === "fraction" && (c.querySelectorAll(P(a.currentClass)).forEach((v) => {
|
|
136
|
+
v.textContent = a.formatFractionCurrent(n + 1);
|
|
137
|
+
}), c.querySelectorAll(P(a.totalClass)).forEach((v) => {
|
|
138
|
+
v.textContent = a.formatFractionTotal(T);
|
|
151
139
|
})), a.type === "progressbar") {
|
|
152
|
-
let
|
|
153
|
-
a.progressbarOpposite ?
|
|
154
|
-
const O = (
|
|
155
|
-
let
|
|
156
|
-
|
|
157
|
-
|
|
140
|
+
let v;
|
|
141
|
+
a.progressbarOpposite ? v = e.isHorizontal() ? "vertical" : "horizontal" : v = e.isHorizontal() ? "horizontal" : "vertical";
|
|
142
|
+
const O = (n + 1) / T;
|
|
143
|
+
let u = 1, g = 1;
|
|
144
|
+
v === "horizontal" ? u = O : g = O, c.querySelectorAll(P(a.progressbarFillClass)).forEach((C) => {
|
|
145
|
+
C.style.transform = `translate3d(0,0,0) scaleX(${u}) scaleY(${g})`, C.style.transitionDuration = `${e.params.speed}ms`;
|
|
158
146
|
});
|
|
159
147
|
}
|
|
160
|
-
a.type === "custom" && a.renderCustom ? (
|
|
148
|
+
a.type === "custom" && a.renderCustom ? (c.innerHTML = a.renderCustom(e, n + 1, T), x === 0 && r("paginationRender", c)) : (x === 0 && r("paginationRender", c), r("paginationUpdate", c)), e.params.watchOverflow && e.enabled && c.classList[e.isLocked ? "add" : "remove"](a.lockClass);
|
|
161
149
|
});
|
|
162
150
|
}
|
|
163
151
|
function l() {
|
|
164
152
|
const t = e.params.pagination;
|
|
165
|
-
if (
|
|
153
|
+
if (y()) return;
|
|
166
154
|
const a = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : e.grid && e.params.grid.rows > 1 ? e.slides.length / Math.ceil(e.params.grid.rows) : e.slides.length;
|
|
167
|
-
let
|
|
168
|
-
|
|
169
|
-
let
|
|
155
|
+
let s = e.pagination.el;
|
|
156
|
+
s = k(s);
|
|
157
|
+
let n = "";
|
|
170
158
|
if (t.type === "bullets") {
|
|
171
|
-
let
|
|
172
|
-
e.params.freeMode && e.params.freeMode.enabled &&
|
|
173
|
-
for (let B = 0; B <
|
|
174
|
-
t.renderBullet ?
|
|
159
|
+
let b = e.params.loop ? Math.ceil(a / e.params.slidesPerGroup) : e.snapGrid.length;
|
|
160
|
+
e.params.freeMode && e.params.freeMode.enabled && b > a && (b = a);
|
|
161
|
+
for (let B = 0; B < b; B += 1)
|
|
162
|
+
t.renderBullet ? n += t.renderBullet.call(e, B, t.bulletClass) : n += `<${t.bulletElement} ${e.isElement ? 'part="bullet"' : ""} class="${t.bulletClass}"></${t.bulletElement}>`;
|
|
175
163
|
}
|
|
176
|
-
t.type === "fraction" && (t.renderFraction ?
|
|
177
|
-
t.type !== "custom" && (
|
|
178
|
-
}), t.type !== "custom" &&
|
|
164
|
+
t.type === "fraction" && (t.renderFraction ? n = t.renderFraction.call(e, t.currentClass, t.totalClass) : n = `<span class="${t.currentClass}"></span> / <span class="${t.totalClass}"></span>`), t.type === "progressbar" && (t.renderProgressbar ? n = t.renderProgressbar.call(e, t.progressbarFillClass) : n = `<span class="${t.progressbarFillClass}"></span>`), e.pagination.bullets = [], s.forEach((b) => {
|
|
165
|
+
t.type !== "custom" && (b.innerHTML = n || ""), t.type === "bullets" && e.pagination.bullets.push(...b.querySelectorAll(P(t.bulletClass)));
|
|
166
|
+
}), t.type !== "custom" && r("paginationRender", s[0]);
|
|
179
167
|
}
|
|
180
|
-
function
|
|
181
|
-
e.params.pagination =
|
|
168
|
+
function o() {
|
|
169
|
+
e.params.pagination = le(e, e.originalParams.pagination, e.params.pagination, {
|
|
182
170
|
el: "swiper-pagination"
|
|
183
171
|
});
|
|
184
172
|
const t = e.params.pagination;
|
|
185
173
|
if (!t.el) return;
|
|
186
174
|
let a;
|
|
187
|
-
typeof t.el == "string" && e.isElement && (a = e.el.querySelector(t.el)), !a && typeof t.el == "string" && (a = [...document.querySelectorAll(t.el)]), a || (a = t.el), !(!a || a.length === 0) && (e.params.uniqueNavElements && typeof t.el == "string" && Array.isArray(a) && a.length > 1 && (a = [...e.el.querySelectorAll(t.el)], a.length > 1 && (a = a.find((
|
|
175
|
+
typeof t.el == "string" && e.isElement && (a = e.el.querySelector(t.el)), !a && typeof t.el == "string" && (a = [...document.querySelectorAll(t.el)]), a || (a = t.el), !(!a || a.length === 0) && (e.params.uniqueNavElements && typeof t.el == "string" && Array.isArray(a) && a.length > 1 && (a = [...e.el.querySelectorAll(t.el)], a.length > 1 && (a = a.find((s) => W(s, ".swiper")[0] === e.el))), Array.isArray(a) && a.length === 1 && (a = a[0]), Object.assign(e.pagination, {
|
|
188
176
|
el: a
|
|
189
|
-
}), a = k(a), a.forEach((
|
|
190
|
-
t.type === "bullets" && t.clickable &&
|
|
177
|
+
}), a = k(a), a.forEach((s) => {
|
|
178
|
+
t.type === "bullets" && t.clickable && s.classList.add(...(t.clickableClass || "").split(" ")), s.classList.add(t.modifierClass + t.type), s.classList.add(e.isHorizontal() ? t.horizontalClass : t.verticalClass), t.type === "bullets" && t.dynamicBullets && (s.classList.add(`${t.modifierClass}${t.type}-dynamic`), m = 0, t.dynamicMainBullets < 1 && (t.dynamicMainBullets = 1)), t.type === "progressbar" && t.progressbarOpposite && s.classList.add(t.progressbarOppositeClass), t.clickable && s.addEventListener("click", z), e.enabled || s.classList.add(t.lockClass);
|
|
191
179
|
}));
|
|
192
180
|
}
|
|
193
181
|
function $() {
|
|
194
182
|
const t = e.params.pagination;
|
|
195
|
-
if (
|
|
183
|
+
if (y()) return;
|
|
196
184
|
let a = e.pagination.el;
|
|
197
|
-
a && (a = k(a), a.forEach((
|
|
198
|
-
|
|
199
|
-
})), e.pagination.bullets && e.pagination.bullets.forEach((
|
|
185
|
+
a && (a = k(a), a.forEach((s) => {
|
|
186
|
+
s.classList.remove(t.hiddenClass), s.classList.remove(t.modifierClass + t.type), s.classList.remove(e.isHorizontal() ? t.horizontalClass : t.verticalClass), t.clickable && (s.classList.remove(...(t.clickableClass || "").split(" ")), s.removeEventListener("click", z));
|
|
187
|
+
})), e.pagination.bullets && e.pagination.bullets.forEach((s) => s.classList.remove(...t.bulletActiveClass.split(" ")));
|
|
200
188
|
}
|
|
201
|
-
|
|
189
|
+
d("changeDirection", () => {
|
|
202
190
|
if (!e.pagination || !e.pagination.el) return;
|
|
203
191
|
const t = e.params.pagination;
|
|
204
192
|
let {
|
|
205
193
|
el: a
|
|
206
194
|
} = e.pagination;
|
|
207
|
-
a = k(a), a.forEach((
|
|
208
|
-
|
|
195
|
+
a = k(a), a.forEach((s) => {
|
|
196
|
+
s.classList.remove(t.horizontalClass, t.verticalClass), s.classList.add(e.isHorizontal() ? t.horizontalClass : t.verticalClass);
|
|
209
197
|
});
|
|
210
|
-
}),
|
|
211
|
-
e.params.pagination.enabled === !1 ? w() : (
|
|
212
|
-
}),
|
|
198
|
+
}), d("init", () => {
|
|
199
|
+
e.params.pagination.enabled === !1 ? w() : (o(), l(), S());
|
|
200
|
+
}), d("activeIndexChange", () => {
|
|
213
201
|
typeof e.snapIndex > "u" && S();
|
|
214
|
-
}),
|
|
202
|
+
}), d("snapIndexChange", () => {
|
|
215
203
|
S();
|
|
216
|
-
}),
|
|
204
|
+
}), d("snapGridLengthChange", () => {
|
|
217
205
|
l(), S();
|
|
218
|
-
}),
|
|
206
|
+
}), d("destroy", () => {
|
|
219
207
|
$();
|
|
220
|
-
}),
|
|
208
|
+
}), d("enable disable", () => {
|
|
221
209
|
let {
|
|
222
210
|
el: t
|
|
223
211
|
} = e.pagination;
|
|
224
212
|
t && (t = k(t), t.forEach((a) => a.classList[e.enabled ? "remove" : "add"](e.params.pagination.lockClass)));
|
|
225
|
-
}),
|
|
213
|
+
}), d("lock unlock", () => {
|
|
226
214
|
S();
|
|
227
|
-
}),
|
|
228
|
-
const
|
|
229
|
-
if (e.params.pagination.el && e.params.pagination.hideOnClick &&
|
|
230
|
-
if (e.navigation && (e.navigation.nextEl &&
|
|
231
|
-
const
|
|
232
|
-
|
|
215
|
+
}), d("click", (t, a) => {
|
|
216
|
+
const s = a.target, n = k(e.pagination.el);
|
|
217
|
+
if (e.params.pagination.el && e.params.pagination.hideOnClick && n && n.length > 0 && !s.classList.contains(e.params.pagination.bulletClass)) {
|
|
218
|
+
if (e.navigation && (e.navigation.nextEl && s === e.navigation.nextEl || e.navigation.prevEl && s === e.navigation.prevEl)) return;
|
|
219
|
+
const b = n[0].classList.contains(e.params.pagination.hiddenClass);
|
|
220
|
+
r(b === !0 ? "paginationShow" : "paginationHide"), n.forEach((B) => B.classList.toggle(e.params.pagination.hiddenClass));
|
|
233
221
|
}
|
|
234
222
|
});
|
|
235
223
|
const D = () => {
|
|
@@ -237,7 +225,7 @@ function oe(o) {
|
|
|
237
225
|
let {
|
|
238
226
|
el: t
|
|
239
227
|
} = e.pagination;
|
|
240
|
-
t && (t = k(t), t.forEach((a) => a.classList.remove(e.params.pagination.paginationDisabledClass))),
|
|
228
|
+
t && (t = k(t), t.forEach((a) => a.classList.remove(e.params.pagination.paginationDisabledClass))), o(), l(), S();
|
|
241
229
|
}, w = () => {
|
|
242
230
|
e.el.classList.add(e.params.pagination.paginationDisabledClass);
|
|
243
231
|
let {
|
|
@@ -250,37 +238,37 @@ function oe(o) {
|
|
|
250
238
|
disable: w,
|
|
251
239
|
render: l,
|
|
252
240
|
update: S,
|
|
253
|
-
init:
|
|
241
|
+
init: o,
|
|
254
242
|
destroy: $
|
|
255
243
|
});
|
|
256
244
|
}
|
|
257
|
-
const
|
|
258
|
-
const
|
|
259
|
-
const l =
|
|
245
|
+
const re = ({ data: p, gamification: e, onEvent: h, swipeable: d, autoplay: r }) => {
|
|
246
|
+
const i = H(), f = H(), { listOfQuestions: m, countQuestionsAvailable: y } = X(() => {
|
|
247
|
+
const l = p ? Object.values(p) : [];
|
|
260
248
|
return {
|
|
261
249
|
listOfQuestions: l,
|
|
262
|
-
countQuestionsAvailable: l.filter(({ marketClosed:
|
|
250
|
+
countQuestionsAvailable: l.filter(({ marketClosed: o }) => !o).length
|
|
263
251
|
};
|
|
264
|
-
}, [
|
|
265
|
-
async (l,
|
|
252
|
+
}, [p]), A = Y(
|
|
253
|
+
async (l, o) => {
|
|
266
254
|
try {
|
|
267
|
-
await e.betPackVote(l,
|
|
255
|
+
await e.betPackVote(l, o), h({
|
|
268
256
|
type: "slVoted",
|
|
269
257
|
payload: {
|
|
270
258
|
questionId: l,
|
|
271
|
-
answerId:
|
|
259
|
+
answerId: o
|
|
272
260
|
}
|
|
273
261
|
});
|
|
274
262
|
} finally {
|
|
275
|
-
|
|
263
|
+
i.current && clearTimeout(i.current), r && (i.current = setTimeout(() => {
|
|
276
264
|
var $;
|
|
277
265
|
($ = f.current) == null || $.slideNext();
|
|
278
266
|
}, 2e3));
|
|
279
267
|
}
|
|
280
268
|
},
|
|
281
|
-
[e,
|
|
269
|
+
[e, h, r]
|
|
282
270
|
);
|
|
283
|
-
j(() => (
|
|
271
|
+
j(() => (h({
|
|
284
272
|
type: "slBetPackReady",
|
|
285
273
|
payload: {
|
|
286
274
|
next: () => {
|
|
@@ -296,27 +284,27 @@ const ce = ({ data: o, gamification: e, onEvent: u, swipeable: c, autoplay: n })
|
|
|
296
284
|
canPrev: !1
|
|
297
285
|
}
|
|
298
286
|
}), () => {
|
|
299
|
-
|
|
300
|
-
}), [
|
|
287
|
+
i.current && clearTimeout(i.current);
|
|
288
|
+
}), [h]);
|
|
301
289
|
const I = (l) => {
|
|
302
290
|
var $;
|
|
303
|
-
const
|
|
304
|
-
if (
|
|
291
|
+
const o = l.realIndex;
|
|
292
|
+
if (h({
|
|
305
293
|
type: "slBetPackChangeCard",
|
|
306
294
|
payload: {
|
|
307
|
-
current:
|
|
308
|
-
canNext:
|
|
309
|
-
canPrev:
|
|
295
|
+
current: o,
|
|
296
|
+
canNext: o < Object.keys(p).length + 1,
|
|
297
|
+
canPrev: o >= 1
|
|
310
298
|
}
|
|
311
|
-
}),
|
|
312
|
-
e.openQuestion(
|
|
299
|
+
}), o !== 0 && o !== Object.keys(p).length + 1 && (($ = m[o - 1]) != null && $.id)) {
|
|
300
|
+
e.openQuestion(m[o - 1].id, {
|
|
313
301
|
openedFrom: "bet-pack",
|
|
314
302
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
315
303
|
// @ts-expect-error
|
|
316
304
|
attributes: {
|
|
317
|
-
id:
|
|
318
|
-
type:
|
|
319
|
-
status:
|
|
305
|
+
id: m[o - 1].id,
|
|
306
|
+
type: m[o - 1].type,
|
|
307
|
+
status: m[o - 1].status,
|
|
320
308
|
attributes: {
|
|
321
309
|
case: void 0
|
|
322
310
|
}
|
|
@@ -325,76 +313,76 @@ const ce = ({ data: o, gamification: e, onEvent: u, swipeable: c, autoplay: n })
|
|
|
325
313
|
return;
|
|
326
314
|
}
|
|
327
315
|
e.closeQuestion();
|
|
328
|
-
}, [z, S] =
|
|
316
|
+
}, [z, S] = U(1.1);
|
|
329
317
|
return j(() => {
|
|
330
|
-
const l =
|
|
318
|
+
const l = V(() => {
|
|
331
319
|
var w;
|
|
332
|
-
const
|
|
333
|
-
if (!
|
|
320
|
+
const o = (w = f.current) == null ? void 0 : w.size;
|
|
321
|
+
if (!o)
|
|
334
322
|
return;
|
|
335
|
-
const D = 1 + 30 / (
|
|
323
|
+
const D = 1 + 30 / (o / 100) / 100 * 2;
|
|
336
324
|
S(Math.ceil(D * 1e3) / 1e3);
|
|
337
325
|
}, 200);
|
|
338
326
|
return window.addEventListener("resize", l), l(), () => {
|
|
339
327
|
window.removeEventListener("resize", l);
|
|
340
328
|
};
|
|
341
|
-
}, []), /* @__PURE__ */
|
|
329
|
+
}, []), /* @__PURE__ */ G(
|
|
342
330
|
Z,
|
|
343
331
|
{
|
|
344
332
|
slidesPerView: z,
|
|
345
333
|
spaceBetween: 12,
|
|
346
334
|
centeredSlides: !0,
|
|
347
335
|
centerInsufficientSlides: !0,
|
|
348
|
-
allowTouchMove:
|
|
336
|
+
allowTouchMove: d,
|
|
349
337
|
pagination: {
|
|
350
338
|
clickable: !0
|
|
351
339
|
},
|
|
352
|
-
modules: [
|
|
340
|
+
modules: [ne],
|
|
353
341
|
onSlideChange: I,
|
|
354
342
|
onBeforeSlideChangeStart: () => {
|
|
355
|
-
|
|
343
|
+
i.current && clearTimeout(i.current);
|
|
356
344
|
},
|
|
357
345
|
onSwiper: (l) => {
|
|
358
346
|
f.current = l;
|
|
359
347
|
},
|
|
360
348
|
children: [
|
|
361
|
-
/* @__PURE__ */ L(F, { children: /* @__PURE__ */ L(
|
|
362
|
-
|
|
363
|
-
/* @__PURE__ */ L(F, { children: /* @__PURE__ */ L(ee, { onEvent:
|
|
349
|
+
/* @__PURE__ */ L(F, { children: /* @__PURE__ */ L(ie, { sliderRef: f, countQuestionsAvailable: y }) }),
|
|
350
|
+
m.map((l) => l ? /* @__PURE__ */ L(F, { children: /* @__PURE__ */ L(se, { children: /* @__PURE__ */ L(ae, { question: l, vote: A }) }, l.id) }) : null),
|
|
351
|
+
/* @__PURE__ */ L(F, { children: /* @__PURE__ */ L(ee, { onEvent: h }) })
|
|
364
352
|
]
|
|
365
353
|
}
|
|
366
354
|
);
|
|
367
|
-
},
|
|
368
|
-
const
|
|
369
|
-
return
|
|
355
|
+
}, ye = ({ gamification: p, autoplay: e, overlay: h, swipeable: d, onEvent: r }) => {
|
|
356
|
+
const i = q(p.betPack.getStore()), { error: f, loading: m, data: y } = i;
|
|
357
|
+
return m || !Object.hasOwn(i, "data") ? /* @__PURE__ */ L(te, {}) : f ? /* @__PURE__ */ L(
|
|
370
358
|
E,
|
|
371
359
|
{
|
|
372
|
-
onEvent:
|
|
373
|
-
actionFn: () =>
|
|
374
|
-
description: f instanceof
|
|
360
|
+
onEvent: r,
|
|
361
|
+
actionFn: () => r({ type: "slHardRefresh" }),
|
|
362
|
+
description: f instanceof N && f.code !== Q.InvalidArgument ? `The event ID was not
|
|
375
363
|
specified or is invalid.` : `The server is unable to
|
|
376
364
|
handle this request.`
|
|
377
365
|
}
|
|
378
|
-
) : !
|
|
366
|
+
) : !y || !y.timestamp || !y.data || !Object.keys(y.data).length ? /* @__PURE__ */ L(
|
|
379
367
|
E,
|
|
380
368
|
{
|
|
381
|
-
onEvent:
|
|
382
|
-
actionFn: () =>
|
|
369
|
+
onEvent: r,
|
|
370
|
+
actionFn: () => r({ type: "slHardRefresh" }),
|
|
383
371
|
description: `It looks like we couldn't
|
|
384
372
|
load the questions.`
|
|
385
373
|
}
|
|
386
374
|
) : /* @__PURE__ */ L(
|
|
387
|
-
|
|
375
|
+
re,
|
|
388
376
|
{
|
|
389
|
-
data:
|
|
390
|
-
gamification:
|
|
391
|
-
onEvent:
|
|
392
|
-
swipeable:
|
|
377
|
+
data: y.data,
|
|
378
|
+
gamification: p,
|
|
379
|
+
onEvent: r,
|
|
380
|
+
swipeable: d,
|
|
393
381
|
autoplay: e,
|
|
394
|
-
overlay:
|
|
382
|
+
overlay: h
|
|
395
383
|
}
|
|
396
384
|
);
|
|
397
385
|
};
|
|
398
386
|
export {
|
|
399
|
-
|
|
387
|
+
ye as BetPackContent
|
|
400
388
|
};
|