@streamlayer/react-ui 1.20.0 → 1.21.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/masters/BetPack/BetPackContent/EmergencyScreen/index.d.ts +1 -0
- package/lib/app/masters/BetPack/BetPackContent/EmergencyScreen/index.js +10 -10
- package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/useDynamicParentFont.js +12 -12
- package/lib/app/masters/BetPack/BetPackContent/index.js +50 -46
- package/lib/app/masters/BetPack/BetPackOverlay/index.js +3 -2
- package/lib/app/masters/BetPack/index.js +61 -59
- package/lib/app/masters/Features/Gamification/index.d.ts +0 -2
- package/lib/app/masters/Features/Gamification/index.js +29 -34
- package/lib/app/masters/Features/index.d.ts +0 -2
- package/lib/app/masters/Features/index.js +4 -12
- package/lib/app/masters/Notifications/Onboarding/index.d.ts +0 -1
- package/lib/app/masters/Notifications/Onboarding/index.js +42 -43
- package/lib/app/masters/Notifications/index.js +50 -55
- package/lib/app/masters/masters.js +21 -31
- package/lib/app/masters/useOrientation.d.ts +3 -0
- package/lib/app/masters/useOrientation.js +12 -0
- package/lib/assets/style.css +1 -1
- package/lib/ui/advertisement/overlay/externalAd/index.js +2973 -2989
- package/lib/ui/advertisement/overlay/externalAd/styles.d.ts +8 -0
- package/lib/ui/advertisement/overlay/externalAd/styles.js +39 -0
- package/lib/ui/gamification/vote/index.js +43 -43
- package/package.json +15 -15
|
@@ -41,26 +41,26 @@ const R = "data:image/svg+xml,%3csvg%20width='92'%20height='19'%20viewBox='0%200
|
|
|
41
41
|
propsAsIs: !1
|
|
42
42
|
}), q = ({
|
|
43
43
|
deepLink: l,
|
|
44
|
-
onboardingOpts:
|
|
44
|
+
onboardingOpts: C,
|
|
45
45
|
notification: i,
|
|
46
|
-
gamification:
|
|
46
|
+
gamification: p,
|
|
47
47
|
loading: s,
|
|
48
48
|
sdk: a
|
|
49
49
|
}) => {
|
|
50
|
-
var
|
|
51
|
-
const
|
|
52
|
-
var
|
|
53
|
-
const
|
|
54
|
-
return
|
|
50
|
+
var o, m, h, g, V, L, n;
|
|
51
|
+
const d = x(p.friends.getStore()), [e, f] = I(void 0), u = S(() => {
|
|
52
|
+
var c, b;
|
|
53
|
+
const r = a.getInviter();
|
|
54
|
+
return r ? (b = (c = d.data) == null ? void 0 : c.find(({
|
|
55
55
|
slId: k
|
|
56
|
-
}) => k ===
|
|
57
|
-
}, [
|
|
56
|
+
}) => k === r)) == null ? void 0 : b.name : "";
|
|
57
|
+
}, [d.data, a]);
|
|
58
58
|
return B(() => {
|
|
59
|
-
const
|
|
60
|
-
|
|
59
|
+
const r = l.$store.subscribe((c) => {
|
|
60
|
+
c && f(c.data);
|
|
61
61
|
});
|
|
62
62
|
return () => {
|
|
63
|
-
|
|
63
|
+
r();
|
|
64
64
|
};
|
|
65
65
|
}, [l.$store]), /* @__PURE__ */ t(W, {
|
|
66
66
|
children: /* @__PURE__ */ t(E, {
|
|
@@ -75,45 +75,44 @@ const R = "data:image/svg+xml,%3csvg%20width='92'%20height='19'%20viewBox='0%200
|
|
|
75
75
|
label: "Top the leader board and best your friends.",
|
|
76
76
|
icon: "icon-trophy"
|
|
77
77
|
}],
|
|
78
|
-
rulesBtnLabel: (
|
|
79
|
-
rulesTitle: (
|
|
78
|
+
rulesBtnLabel: (o = C.rules) == null ? void 0 : o.buttonLabel,
|
|
79
|
+
rulesTitle: (m = C.rules) == null ? void 0 : m.heading,
|
|
80
80
|
termsTitle: "Terms and Conditions",
|
|
81
|
-
termsText: (
|
|
81
|
+
termsText: (h = C.rules) == null ? void 0 : h.terms,
|
|
82
82
|
steps: H,
|
|
83
|
-
primaryColor: (
|
|
84
|
-
inviteLink:
|
|
85
|
-
inviteCardTitle: (
|
|
86
|
-
inviteCardSubtext: (
|
|
87
|
-
inviteCardBtnLabel: (
|
|
83
|
+
primaryColor: (g = C.inviteCard) == null ? void 0 : g.iconColor,
|
|
84
|
+
inviteLink: e,
|
|
85
|
+
inviteCardTitle: (V = C.inviteCard) == null ? void 0 : V.heading,
|
|
86
|
+
inviteCardSubtext: (L = C.inviteCard) == null ? void 0 : L.subtext,
|
|
87
|
+
inviteCardBtnLabel: (n = C.inviteCard) == null ? void 0 : n.buttonLabel,
|
|
88
88
|
onClose: () => {
|
|
89
|
-
var
|
|
90
|
-
(
|
|
89
|
+
var r;
|
|
90
|
+
(r = i.close) == null || r.call(i);
|
|
91
91
|
},
|
|
92
|
-
gamification:
|
|
92
|
+
gamification: p,
|
|
93
93
|
sdk: a,
|
|
94
|
-
inviterName:
|
|
94
|
+
inviterName: u
|
|
95
95
|
})
|
|
96
96
|
});
|
|
97
97
|
}, r2 = ({
|
|
98
98
|
sdk: l,
|
|
99
|
-
notification:
|
|
99
|
+
notification: C,
|
|
100
100
|
saveHeight: i,
|
|
101
|
-
style:
|
|
101
|
+
style: p,
|
|
102
102
|
appNode: s,
|
|
103
|
-
|
|
104
|
-
responsiveStore: p
|
|
103
|
+
responsiveStore: a
|
|
105
104
|
}) => {
|
|
106
105
|
var L;
|
|
107
|
-
const
|
|
108
|
-
graphicSrc:
|
|
109
|
-
}) =>
|
|
106
|
+
const d = A(null), e = C.data.onboarding, [f, u] = I(e == null ? void 0 : e.instantOpen), o = l.getFeature(j.GAMES), m = S(() => H == null ? void 0 : H.map(({
|
|
107
|
+
graphicSrc: n
|
|
108
|
+
}) => n), []), {
|
|
110
109
|
screen: h
|
|
111
|
-
} = x(
|
|
110
|
+
} = x(a, {
|
|
112
111
|
keys: ["screen"]
|
|
113
112
|
});
|
|
114
113
|
(L = e == null ? void 0 : e.titleCard) != null && L.media && (e.titleCard.media.sponsorLogo = R), _(() => {
|
|
115
|
-
var
|
|
116
|
-
i(((
|
|
114
|
+
var n;
|
|
115
|
+
i(((n = d.current) == null ? void 0 : n.getBoundingClientRect().height) || 0);
|
|
117
116
|
}, [i]);
|
|
118
117
|
const {
|
|
119
118
|
loading: g,
|
|
@@ -121,10 +120,10 @@ const R = "data:image/svg+xml,%3csvg%20width='92'%20height='19'%20viewBox='0%200
|
|
|
121
120
|
} = T(m);
|
|
122
121
|
return f && o && e && s.current && !V ? /* @__PURE__ */ t(G, {
|
|
123
122
|
container: s,
|
|
124
|
-
useContainer: !
|
|
123
|
+
useContainer: !1,
|
|
125
124
|
children: /* @__PURE__ */ t(q, {
|
|
126
|
-
notification:
|
|
127
|
-
setOpened:
|
|
125
|
+
notification: C,
|
|
126
|
+
setOpened: u,
|
|
128
127
|
gamification: o,
|
|
129
128
|
onboardingOpts: e,
|
|
130
129
|
deepLink: o.deepLink,
|
|
@@ -133,7 +132,7 @@ const R = "data:image/svg+xml,%3csvg%20width='92'%20height='19'%20viewBox='0%200
|
|
|
133
132
|
})
|
|
134
133
|
}) : /* @__PURE__ */ Z(w, {
|
|
135
134
|
children: [/* @__PURE__ */ t(y, {
|
|
136
|
-
ref:
|
|
135
|
+
ref: d,
|
|
137
136
|
style: {
|
|
138
137
|
position: "absolute",
|
|
139
138
|
visibility: "hidden"
|
|
@@ -146,14 +145,14 @@ const R = "data:image/svg+xml,%3csvg%20width='92'%20height='19'%20viewBox='0%200
|
|
|
146
145
|
onboarding: e
|
|
147
146
|
})
|
|
148
147
|
}), /* @__PURE__ */ t(O, {
|
|
149
|
-
style:
|
|
150
|
-
hiding:
|
|
148
|
+
style: p,
|
|
149
|
+
hiding: C.hiding,
|
|
151
150
|
children: /* @__PURE__ */ t(y, {
|
|
152
151
|
children: /* @__PURE__ */ t(M, {
|
|
153
|
-
close:
|
|
152
|
+
close: C.close,
|
|
154
153
|
action: () => {
|
|
155
|
-
var
|
|
156
|
-
|
|
154
|
+
var r;
|
|
155
|
+
u(!0), (((r = s.current) == null ? void 0 : r.getBoundingClientRect().y) || 0) < 0 && F(s, h.size, {
|
|
157
156
|
behavior: "smooth"
|
|
158
157
|
});
|
|
159
158
|
},
|
|
@@ -1,82 +1,77 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { cx as
|
|
1
|
+
import { jsxs as g, Fragment as V, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { cx as D } from "@linaria/core";
|
|
3
3
|
import { useMastersContext as T } from "../useMastersContext.js";
|
|
4
4
|
import { scrollIntoAppView as q } from "../useSdkScroll.js";
|
|
5
|
-
import { useState as
|
|
5
|
+
import { useState as f, useMemo as E, useEffect as h, useRef as O, useCallback as w } from "react";
|
|
6
6
|
import { r as b } from "../../../index-DALxy-8N.js";
|
|
7
|
-
import { useStore as
|
|
7
|
+
import { useStore as p } from "@streamlayer/react-polyfills";
|
|
8
8
|
import { eventBus as C } from "@streamlayer/sdk-web-interfaces";
|
|
9
9
|
import { NotificationType as a } from "@streamlayer/sdk-web-notifications";
|
|
10
10
|
import { QuestionTypeData as R } from "../../../ui/gamification/constants.js";
|
|
11
|
-
import { Notification as
|
|
11
|
+
import { Notification as N } from "../../../ui/gamification/question/notification/index.js";
|
|
12
12
|
import { PredictionResult as P } from "../../../ui/gamification/question/notification/prediction-result/index.js";
|
|
13
13
|
import { Onboarding as x } from "./Onboarding/index.js";
|
|
14
14
|
import { HiddenContainer as A, Container as B, InnerContainer as H, NotificationRefreshing as Q, Pill as U } from "./styles.js";
|
|
15
15
|
const j = (n) => {
|
|
16
|
-
const [t, u] =
|
|
17
|
-
i.current =
|
|
16
|
+
const [t, u] = f(0), i = O(null), l = w((o) => {
|
|
17
|
+
i.current = o;
|
|
18
18
|
}, []);
|
|
19
19
|
h(() => {
|
|
20
|
-
var
|
|
21
|
-
const
|
|
22
|
-
|
|
20
|
+
var d;
|
|
21
|
+
const o = (d = i.current) == null ? void 0 : d.getBoundingClientRect();
|
|
22
|
+
o && u(o.height);
|
|
23
23
|
}, [n]);
|
|
24
|
-
const
|
|
25
|
-
u(
|
|
24
|
+
const r = w((o) => {
|
|
25
|
+
u(o);
|
|
26
26
|
}, []);
|
|
27
|
-
return [
|
|
27
|
+
return [l, t, r];
|
|
28
28
|
}, z = ({
|
|
29
29
|
sdk: n,
|
|
30
30
|
notification: t,
|
|
31
31
|
appNode: u,
|
|
32
32
|
responsiveStore: i
|
|
33
33
|
}) => {
|
|
34
|
-
var
|
|
34
|
+
var m, s;
|
|
35
35
|
const {
|
|
36
|
-
|
|
37
|
-
} =
|
|
38
|
-
|
|
39
|
-
}), {
|
|
40
|
-
sdk: o
|
|
41
|
-
} = T(), [r, l, m] = j(t.id);
|
|
42
|
-
return t.type === a.QUESTION ? /* @__PURE__ */ f(D, {
|
|
36
|
+
sdk: l
|
|
37
|
+
} = T(), [r, o, d] = j(t.id);
|
|
38
|
+
return t.type === a.QUESTION ? /* @__PURE__ */ g(V, {
|
|
43
39
|
children: [/* @__PURE__ */ c(A, {
|
|
44
40
|
ref: r,
|
|
45
|
-
children: /* @__PURE__ */ c(
|
|
41
|
+
children: /* @__PURE__ */ c(N, {
|
|
46
42
|
...t
|
|
47
43
|
})
|
|
48
|
-
}), /* @__PURE__ */
|
|
44
|
+
}), /* @__PURE__ */ g(B, {
|
|
49
45
|
style: {
|
|
50
|
-
height: t.hiding ? 0 :
|
|
46
|
+
height: t.hiding ? 0 : o
|
|
51
47
|
},
|
|
52
48
|
hiding: t.hiding,
|
|
53
49
|
children: [/* @__PURE__ */ c(H, {
|
|
54
50
|
style: {
|
|
55
51
|
height: "100%"
|
|
56
52
|
},
|
|
57
|
-
children: /* @__PURE__ */ c(
|
|
53
|
+
children: /* @__PURE__ */ c(N, {
|
|
58
54
|
...t,
|
|
59
|
-
controlVideo:
|
|
55
|
+
controlVideo: l == null ? void 0 : l.controlVideoPlayer
|
|
60
56
|
})
|
|
61
57
|
}), /* @__PURE__ */ c(Q, {}, t.id)]
|
|
62
58
|
})]
|
|
63
|
-
}) : t.type === a.QUESTION_RESOLVED && ((
|
|
59
|
+
}) : t.type === a.QUESTION_RESOLVED && ((s = (m = t.data) == null ? void 0 : m.question) != null && s.predictionResult) ? /* @__PURE__ */ c(P, {
|
|
64
60
|
style: {
|
|
65
|
-
height: t.hiding ? 0 :
|
|
61
|
+
height: t.hiding ? 0 : o
|
|
66
62
|
},
|
|
67
|
-
saveHeight:
|
|
63
|
+
saveHeight: d,
|
|
68
64
|
close: t.close,
|
|
69
65
|
hiding: t.hiding,
|
|
70
66
|
...t.data.question,
|
|
71
67
|
mastersApp: !0
|
|
72
68
|
}) : t.type === a.ONBOARDING ? /* @__PURE__ */ c(x, {
|
|
73
69
|
style: {
|
|
74
|
-
height: t.hiding ? 0 :
|
|
70
|
+
height: t.hiding ? 0 : o
|
|
75
71
|
},
|
|
76
|
-
saveHeight:
|
|
72
|
+
saveHeight: d,
|
|
77
73
|
sdk: n,
|
|
78
74
|
notification: t,
|
|
79
|
-
sdkInDesktopView: d,
|
|
80
75
|
appNode: u,
|
|
81
76
|
responsiveStore: i
|
|
82
77
|
}) : null;
|
|
@@ -85,47 +80,47 @@ const j = (n) => {
|
|
|
85
80
|
setPill: t,
|
|
86
81
|
appNode: u,
|
|
87
82
|
headerNode: i,
|
|
88
|
-
scrollNode:
|
|
89
|
-
responsiveStore:
|
|
90
|
-
scrollStore:
|
|
83
|
+
scrollNode: l,
|
|
84
|
+
responsiveStore: r,
|
|
85
|
+
scrollStore: o
|
|
91
86
|
}) => {
|
|
92
|
-
var
|
|
87
|
+
var y, I;
|
|
93
88
|
const {
|
|
94
|
-
screen:
|
|
95
|
-
} =
|
|
89
|
+
screen: d
|
|
90
|
+
} = p(r, {
|
|
96
91
|
keys: ["screen"]
|
|
97
92
|
}), {
|
|
98
93
|
tabsShown: m,
|
|
99
94
|
scrollPosition: s
|
|
100
|
-
} =
|
|
95
|
+
} = p(o, {
|
|
101
96
|
keys: ["tabsShown", "scrollPosition"]
|
|
102
97
|
});
|
|
103
98
|
h(() => {
|
|
104
|
-
|
|
105
|
-
}, [s,
|
|
106
|
-
const e =
|
|
99
|
+
r.get().sdkInDesktopView ? s < 50 && t(null) : s > -50 && t(null);
|
|
100
|
+
}, [s, r, t]);
|
|
101
|
+
const e = r.get().sdkInDesktopView ? u : i;
|
|
107
102
|
return !n || !e.current ? null : b.createPortal(/* @__PURE__ */ c(U, {
|
|
108
|
-
title: n.type === a.QUESTION_RESOLVED ? "Prediction result" : `New ${((
|
|
103
|
+
title: n.type === a.QUESTION_RESOLVED ? "Prediction result" : `New ${((I = R[(y = n.data) == null ? void 0 : y.questionType]) == null ? void 0 : I.label) || "notification"}`,
|
|
109
104
|
onClick: () => {
|
|
110
|
-
var
|
|
111
|
-
|
|
105
|
+
var k;
|
|
106
|
+
r.get().sdkInDesktopView ? (k = l.current) == null || k.scrollTo({
|
|
112
107
|
top: 0,
|
|
113
108
|
behavior: "smooth"
|
|
114
|
-
}) : q(u,
|
|
109
|
+
}) : q(u, d.size, {
|
|
115
110
|
behavior: "smooth"
|
|
116
111
|
}), t(null);
|
|
117
112
|
},
|
|
118
|
-
className:
|
|
113
|
+
className: D(m && F, "sl-pill-button")
|
|
119
114
|
}), e.current);
|
|
120
115
|
}, it = ({
|
|
121
116
|
sdk: n,
|
|
122
117
|
headerNode: t,
|
|
123
118
|
scrollNode: u,
|
|
124
119
|
responsiveStore: i,
|
|
125
|
-
appNode:
|
|
126
|
-
scrollStore:
|
|
120
|
+
appNode: l,
|
|
121
|
+
scrollStore: r
|
|
127
122
|
}) => {
|
|
128
|
-
const [
|
|
123
|
+
const [o] = f(n.getNotificationsStore()), d = p(o), [m, s] = f(null), e = E(() => n.getActiveNotification(), [n, d]);
|
|
129
124
|
return h(() => {
|
|
130
125
|
e && C.emit("notification", {
|
|
131
126
|
action: "rendered",
|
|
@@ -136,25 +131,25 @@ const j = (n) => {
|
|
|
136
131
|
});
|
|
137
132
|
}, [e]), h(() => {
|
|
138
133
|
e && (i.get().sdkInDesktopView || i.get().sdkInView) && (!i.get().sdkInDesktopView && i.get().sdkInView && s(e), i.get().sdkInDesktopView && window.requestAnimationFrame(() => {
|
|
139
|
-
|
|
134
|
+
r.get().scrollPosition !== 0 && s(e);
|
|
140
135
|
}));
|
|
141
136
|
}, [e]), h(() => {
|
|
142
137
|
e || s(null);
|
|
143
|
-
}, [e]), /* @__PURE__ */
|
|
138
|
+
}, [e]), /* @__PURE__ */ g(V, {
|
|
144
139
|
children: [!m && e && /* @__PURE__ */ c(z, {
|
|
145
140
|
headerNode: t,
|
|
146
|
-
appNode:
|
|
141
|
+
appNode: l,
|
|
147
142
|
sdk: n,
|
|
148
143
|
notification: e,
|
|
149
144
|
responsiveStore: i
|
|
150
145
|
}), m && /* @__PURE__ */ c(L, {
|
|
151
146
|
pill: m,
|
|
152
147
|
setPill: s,
|
|
153
|
-
appNode:
|
|
148
|
+
appNode: l,
|
|
154
149
|
notification: e,
|
|
155
150
|
headerNode: t,
|
|
156
151
|
scrollNode: u,
|
|
157
|
-
scrollStore:
|
|
152
|
+
scrollStore: r,
|
|
158
153
|
responsiveStore: i
|
|
159
154
|
})]
|
|
160
155
|
});
|
|
@@ -19,35 +19,25 @@ import { StreamLayerMastersThemeProvider as se } from "../../ui/theme/masters.js
|
|
|
19
19
|
const B = ({ sdk: e, className: t }) => {
|
|
20
20
|
const [, r] = y(e);
|
|
21
21
|
return /* @__PURE__ */ a(k, { className: t, feature: r, sdk: e });
|
|
22
|
-
}, K = ({ sdk: e, className: t, appNode: r
|
|
23
|
-
const
|
|
24
|
-
return
|
|
25
|
-
const
|
|
26
|
-
return
|
|
27
|
-
z,
|
|
28
|
-
{
|
|
29
|
-
className: t,
|
|
30
|
-
appNode: r,
|
|
31
|
-
feature: i,
|
|
32
|
-
responsiveStore: n,
|
|
33
|
-
sdk: e
|
|
34
|
-
},
|
|
35
|
-
o
|
|
36
|
-
) : null;
|
|
22
|
+
}, K = ({ sdk: e, className: t, appNode: r }) => {
|
|
23
|
+
const o = c(e.featuresList.getStore());
|
|
24
|
+
return o ? Array.from(o, (n) => {
|
|
25
|
+
const s = e.getFeature(n);
|
|
26
|
+
return s ? /* @__PURE__ */ a(z, { className: t, appNode: r, feature: s, sdk: e }, n) : null;
|
|
37
27
|
}) : null;
|
|
38
28
|
}, O = (e) => {
|
|
39
|
-
const [t, r] = b(!S(v().size)),
|
|
29
|
+
const [t, r] = b(!S(v().size)), o = d(null);
|
|
40
30
|
return p(() => {
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
r(!S(
|
|
31
|
+
const n = A(() => {
|
|
32
|
+
const s = v();
|
|
33
|
+
r(!S(s.size));
|
|
44
34
|
}, 200);
|
|
45
|
-
return window.addEventListener("resize",
|
|
46
|
-
window.removeEventListener("resize",
|
|
35
|
+
return window.addEventListener("resize", n), () => {
|
|
36
|
+
window.removeEventListener("resize", n);
|
|
47
37
|
};
|
|
48
|
-
}, []), h(
|
|
38
|
+
}, []), h(o, { enabled: !0, event: "click", listener: F }), /* @__PURE__ */ a(M, { ref: o, ...e, isMobile: t });
|
|
49
39
|
}, R = ({ sdk: e }) => {
|
|
50
|
-
const t = d(null), r = c(e.status),
|
|
40
|
+
const t = d(null), r = c(e.status), o = c(e.sdkStore.slStreamId), n = d(null), [s] = D(t), [i, l] = x(t, s), m = r === "ready" && !!o.data;
|
|
51
41
|
return p(() => {
|
|
52
42
|
window.requestAnimationFrame(() => {
|
|
53
43
|
e.initializeApp().then(() => {
|
|
@@ -57,33 +47,33 @@ const B = ({ sdk: e, className: t }) => {
|
|
|
57
47
|
}, [e]), h(t, { enabled: !0, event: "click", listener: F }), p(() => {
|
|
58
48
|
import("./Features/Gamification/gamification-feature.js");
|
|
59
49
|
}, []), /* @__PURE__ */ f(L, { ref: t, children: [
|
|
60
|
-
/* @__PURE__ */ a(C, { className: w(u, "sl-hide-on-modal"), ref:
|
|
50
|
+
/* @__PURE__ */ a(C, { className: w(u, "sl-hide-on-modal"), ref: n }),
|
|
61
51
|
/* @__PURE__ */ f(N, { "data-nav": !0, className: "sl-hide-on-modal", ref: i, children: [
|
|
62
52
|
m && /* @__PURE__ */ a(
|
|
63
53
|
P,
|
|
64
54
|
{
|
|
65
55
|
sdk: e,
|
|
66
56
|
scrollNode: i,
|
|
67
|
-
headerNode:
|
|
57
|
+
headerNode: n,
|
|
68
58
|
appNode: t,
|
|
69
59
|
scrollStore: l,
|
|
70
|
-
responsiveStore:
|
|
60
|
+
responsiveStore: s
|
|
71
61
|
}
|
|
72
62
|
),
|
|
73
63
|
m && /* @__PURE__ */ a(B, { className: u, sdk: e }),
|
|
74
|
-
m && /* @__PURE__ */ a(K, {
|
|
64
|
+
m && /* @__PURE__ */ a(K, { appNode: t, className: u, sdk: e })
|
|
75
65
|
] })
|
|
76
66
|
] });
|
|
77
67
|
}, re = ({ sdk: e, betPack: t }) => {
|
|
78
|
-
const [r,
|
|
68
|
+
const [r, o] = b(t), s = !!c(e.userId()), i = E(() => ({ sdk: e }), [e]);
|
|
79
69
|
return /* @__PURE__ */ f(g.Provider, { value: i, children: [
|
|
80
|
-
r &&
|
|
70
|
+
r && s && /* @__PURE__ */ a(
|
|
81
71
|
O,
|
|
82
72
|
{
|
|
83
73
|
sdk: e,
|
|
84
|
-
onEvent: ({ type: l }) => l === "slOpenGameCenter" ?
|
|
74
|
+
onEvent: ({ type: l }) => l === "slOpenGameCenter" ? o(!1) : () => {
|
|
85
75
|
},
|
|
86
|
-
close: () =>
|
|
76
|
+
close: () => o(!1)
|
|
87
77
|
}
|
|
88
78
|
),
|
|
89
79
|
!r && /* @__PURE__ */ a(R, { sdk: e })
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useState as i, useEffect as o } from "react";
|
|
2
|
+
const a = () => {
|
|
3
|
+
const [t, n] = i(""), e = () => {
|
|
4
|
+
window.screen.orientation.type.includes("landscape") || Math.abs(window.orientation) === 90 ? n("landscape") : n("portrait");
|
|
5
|
+
};
|
|
6
|
+
return o(() => (window.screen.orientation.addEventListener("change", e), window.addEventListener("orientationchange", e), e(), () => {
|
|
7
|
+
window.screen.orientation.removeEventListener("change", e), window.removeEventListener("orientationchange", e);
|
|
8
|
+
}), []), { orientation: t };
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
a as useOrientation
|
|
12
|
+
};
|