@streamlayer/react-ui 1.18.0 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/lib/app/app/Notifications/index.js +1 -1
  2. package/lib/app/masters/BetPack/BetPackContent/EmergencyScreen/index.js +12 -8
  3. package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.js +42 -14
  4. package/lib/app/masters/BetPack/BetPackContent/EndScreen/styles.d.ts +12 -0
  5. package/lib/app/masters/BetPack/BetPackContent/EndScreen/styles.js +40 -20
  6. package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/index.js +8 -4
  7. package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/useDynamicParentFont.d.ts +4 -0
  8. package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/useDynamicParentFont.js +27 -0
  9. package/lib/app/masters/BetPack/BetPackContent/StartScreen/index.js +21 -19
  10. package/lib/app/masters/BetPack/BetPackContent/StartScreen/styles.d.ts +1 -0
  11. package/lib/app/masters/BetPack/BetPackContent/StartScreen/styles.js +22 -17
  12. package/lib/app/masters/BetPack/BetPackContent/index.js +88 -62
  13. package/lib/app/masters/BetPack/BetPackContent/styles.d.ts +1 -0
  14. package/lib/app/masters/BetPack/BetPackContent/styles.js +8 -7
  15. package/lib/app/masters/BetPack/index.js +59 -53
  16. package/lib/app/masters/Features/Gamification/Question.js +3 -3
  17. package/lib/app/masters/Features/Gamification/Tabs.d.ts +0 -7
  18. package/lib/app/masters/Features/Gamification/Tabs.js +9 -42
  19. package/lib/app/masters/Features/Gamification/UserSummary.js +15 -14
  20. package/lib/app/masters/Features/Gamification/index.d.ts +1 -6
  21. package/lib/app/masters/Features/Gamification/index.js +37 -76
  22. package/lib/app/masters/Features/index.d.ts +1 -6
  23. package/lib/app/masters/Features/index.js +15 -25
  24. package/lib/app/masters/Header/index.d.ts +3 -0
  25. package/lib/app/masters/Header/index.js +38 -0
  26. package/lib/app/masters/Notifications/index.js +1 -1
  27. package/lib/app/masters/masters.d.ts +1 -0
  28. package/lib/app/masters/masters.js +75 -92
  29. package/lib/app/masters/story/index.d.ts +1 -0
  30. package/lib/app/masters/story/index.js +21 -22
  31. package/lib/app/masters/styles.d.ts +0 -10
  32. package/lib/app/masters/styles.js +13 -23
  33. package/lib/app/masters/useSdkResponsive.js +1 -1
  34. package/lib/app/masters/useSdkScroll.js +1 -1
  35. package/lib/app/useClipboardCopy.js +1 -1
  36. package/lib/app/useSdkResponsive.js +1 -1
  37. package/lib/app/useSdkScroll.js +1 -1
  38. package/lib/assets/style.css +1 -1
  39. package/lib/index-BEm7B1u1.js +72 -0
  40. package/lib/index-DALxy-8N.js +5437 -0
  41. package/lib/ui/gamification/user-statistics/index.d.ts +1 -0
  42. package/lib/ui/gamification/user-statistics/index.js +47 -39
  43. package/lib/ui/gamification/user-statistics/styles.d.ts +2 -0
  44. package/lib/ui/gamification/user-statistics/styles.js +34 -24
  45. package/lib/ui/gamification/vote/feedback/index.d.ts +1 -0
  46. package/lib/ui/gamification/vote/feedback/index.js +60 -47
  47. package/lib/ui/gamification/vote/feedback/styles.d.ts +12 -0
  48. package/lib/ui/gamification/vote/feedback/styles.js +47 -27
  49. package/lib/ui/gamification/vote/index.js +145 -136
  50. package/lib/ui/gamification/vote/styles.d.ts +3 -1
  51. package/lib/ui/gamification/vote/styles.js +42 -32
  52. package/lib/ui/gamification/vote/vote-option/index.d.ts +1 -0
  53. package/lib/ui/gamification/vote/vote-option/index.js +59 -60
  54. package/lib/ui/gamification/vote/vote-option/styles.d.ts +1 -0
  55. package/lib/ui/gamification/vote/vote-option/styles.js +16 -11
  56. package/lib/ui/icons/index.d.ts +3 -0
  57. package/lib/ui/icons/index.js +69 -51
  58. package/lib/ui/loader/index.js +4 -3
  59. package/lib/ui/modal/index.js +1 -1
  60. package/lib/ui/theme/masters-theme.js +152 -32
  61. package/lib/ui/theme/theme.js +66 -20
  62. package/package.json +16 -15
  63. package/lib/app/masters/Features/Gamification/Friends.d.ts +0 -3
  64. package/lib/app/masters/Features/Gamification/Friends.js +0 -19
  65. package/lib/app/masters/Features/Gamification/Leaderboard.d.ts +0 -8
  66. package/lib/app/masters/Features/Gamification/Leaderboard.js +0 -56
  67. package/lib/index-B1QdimmR.js +0 -19047
  68. package/lib/index-CZvwzN5o.js +0 -75
  69. package/lib/index-xuotMAFm.js +0 -118
@@ -3,7 +3,7 @@ import { cx as V } from "@linaria/core";
3
3
  import { useAppContext as O } from "../useAppContext.js";
4
4
  import { scrollIntoAppView as T } from "../../useSdkScroll.js";
5
5
  import { useState as I, useMemo as D, useEffect as a, useRef as E, useCallback as w } from "react";
6
- import { r as R } from "../../../index-B1QdimmR.js";
6
+ import { r as R } from "../../../index-DALxy-8N.js";
7
7
  import { useStore as y } from "@streamlayer/react-polyfills";
8
8
  import { eventBus as q } from "@streamlayer/sdk-web-interfaces";
9
9
  import { NotificationType as p } from "@streamlayer/sdk-web-notifications";
@@ -1,10 +1,14 @@
1
- import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
- import { EmergencyContainer as i, EmergencyScreenTitle as o, EmergencyScreenDescription as t, EmergencyScreenButton as m } from "./styles.js";
3
- const y = ({ actionFn: n, description: r }) => /* @__PURE__ */ c(i, { children: [
4
- /* @__PURE__ */ e(o, { children: "Something went wrong." }),
5
- /* @__PURE__ */ e(t, { children: r }),
6
- /* @__PURE__ */ e(m, { onClick: n, children: "Try again" })
7
- ] });
1
+ import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
+ import { useDynamicParentFont as i } from "../ScreenContainer/useDynamicParentFont.js";
3
+ import { EmergencyContainer as m, EmergencyScreenTitle as g, EmergencyScreenDescription as s, EmergencyScreenButton as y } from "./styles.js";
4
+ const f = ({ actionFn: n, description: r }) => {
5
+ const { container: c, fontSize: t } = i();
6
+ return /* @__PURE__ */ o(m, { style: { fontSize: t }, ref: c, children: [
7
+ /* @__PURE__ */ e(g, { children: "Something went wrong." }),
8
+ /* @__PURE__ */ e(s, { children: r }),
9
+ /* @__PURE__ */ e(y, { onClick: n, children: "Try again" })
10
+ ] });
11
+ };
8
12
  export {
9
- y as EmergencyScreen
13
+ f as EmergencyScreen
10
14
  };
@@ -1,18 +1,46 @@
1
1
  import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
+ import { useState as a } from "react";
2
3
  import { ScreenContainer as c } from "../ScreenContainer/index.js";
3
- import { ScreenWrap as t, EndScreenWrap as o, EndScreenMain as d, SponsorIcon as s, EndScreenTitle as a, EndScreenDescription as l, EndScreenButton as p } from "./styles.js";
4
- const E = ({ height: r, onEvent: i }) => /* @__PURE__ */ e(c, { height: r, children: /* @__PURE__ */ e(t, { children: /* @__PURE__ */ e(o, { children: /* @__PURE__ */ n(d, { children: [
5
- /* @__PURE__ */ e(s, { name: "icon-masters-logo" }),
6
- /* @__PURE__ */ e(a, { children: "Great picks!" }),
7
- /* @__PURE__ */ n(l, { children: [
8
- "Stay in the Enhanced Stream for",
9
- /* @__PURE__ */ e("br", {}),
10
- "live results, predictions, trivia,",
11
- /* @__PURE__ */ e("br", {}),
12
- "polls, and match insights."
13
- ] }),
14
- /* @__PURE__ */ e(p, { onClick: () => i({ type: "slOpenGameCenter" }), children: "Open Game Center" })
15
- ] }) }) }) }, "end");
4
+ import { ScreenWrap as i, EndFirstScreenWrap as p, EndScreenMain as t, SponsorIcon as m, EndScreenTitle as h, EndScreenDescription as S, EndScreenButton as d, EndLastScreenWrap as u, EndScreenMedia as E, EndLastScreenDescription as b } from "./styles.js";
5
+ const x = ({ height: r, onEvent: o }) => {
6
+ const [s, l] = a(
7
+ 0
8
+ /* FIRST */
9
+ );
10
+ return s === 0 ? /* @__PURE__ */ e(c, { height: r, children: /* @__PURE__ */ e(i, { children: /* @__PURE__ */ n(p, { children: [
11
+ /* @__PURE__ */ n(t, { children: [
12
+ /* @__PURE__ */ e(m, { name: "icon-masters-logo" }),
13
+ /* @__PURE__ */ e(h, { children: "Great picks!" }),
14
+ /* @__PURE__ */ n(S, { children: [
15
+ "As results come in we’ll send you",
16
+ /* @__PURE__ */ e("br", {}),
17
+ "live updates right here."
18
+ ] })
19
+ ] }),
20
+ /* @__PURE__ */ e(
21
+ d,
22
+ {
23
+ onClick: () => {
24
+ l(
25
+ 1
26
+ /* LAST */
27
+ );
28
+ },
29
+ children: "Continue"
30
+ }
31
+ )
32
+ ] }) }) }, "end") : /* @__PURE__ */ e(c, { height: r, children: /* @__PURE__ */ e(i, { children: /* @__PURE__ */ n(u, { children: [
33
+ /* @__PURE__ */ n(t, { children: [
34
+ /* @__PURE__ */ e(E, { src: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/bet_pack_end_screen.png" }),
35
+ /* @__PURE__ */ n(b, { children: [
36
+ "Look for more live match insights,",
37
+ /* @__PURE__ */ e("br", {}),
38
+ "predictions and more."
39
+ ] })
40
+ ] }),
41
+ /* @__PURE__ */ e(d, { onClick: () => o({ type: "slOpenGameCenter" }), children: "Open Game Center" })
42
+ ] }) }) }, "end");
43
+ };
16
44
  export {
17
- E as EndScreen
45
+ x as EndScreen
18
46
  };
@@ -1,7 +1,19 @@
1
1
  export declare const ScreenWrap: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
2
2
  export declare const SponsorIcon: any;
3
3
  export declare const EndScreenWrap: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
+ export declare const EndFirstScreenWrap: {
5
+ __wyw_meta: unknown;
6
+ } & import('react').FunctionComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
7
+ as?: React.ElementType;
8
+ }>;
9
+ export declare const EndLastScreenWrap: {
10
+ __wyw_meta: unknown;
11
+ } & import('react').FunctionComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
12
+ as?: React.ElementType;
13
+ }>;
4
14
  export declare const EndScreenMain: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
5
15
  export declare const EndScreenTitle: any;
6
16
  export declare const EndScreenDescription: any;
17
+ export declare const EndLastScreenDescription: any;
7
18
  export declare const EndScreenButton: any;
19
+ export declare const EndScreenMedia: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLImageElement> & import('react').ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
@@ -1,41 +1,61 @@
1
1
  import { styled as e } from "@linaria/react";
2
- import { ScreenTitle as s, ScreenDescription as n, ScreenButton as r } from "../../styles.js";
3
- import { SvgIcon as c } from "../../../../../ui/icons/index.js";
4
- const l = /* @__PURE__ */ e("div")({
2
+ import { ScreenTitle as r, ScreenDescription as s, ScreenButton as c } from "../../styles.js";
3
+ import { SvgIcon as o } from "../../../../../ui/icons/index.js";
4
+ const u = /* @__PURE__ */ e("div")({
5
5
  name: "ScreenWrap",
6
6
  class: "s8s3kc9",
7
7
  propsAsIs: !1
8
- }), o = () => c, m = /* @__PURE__ */ e(o())({
8
+ }), t = () => o, A = /* @__PURE__ */ e(t())({
9
9
  name: "SponsorIcon",
10
10
  class: "s1uswib2",
11
11
  propsAsIs: !0
12
- }), E = /* @__PURE__ */ e("div")({
12
+ }), n = /* @__PURE__ */ e("div")({
13
13
  name: "EndScreenWrap",
14
14
  class: "el0dbzn",
15
15
  propsAsIs: !1
16
- }), I = /* @__PURE__ */ e("div")({
17
- name: "EndScreenMain",
16
+ }), p = () => n, x = /* @__PURE__ */ e(p())({
17
+ name: "EndFirstScreenWrap",
18
18
  class: "e11do4i1",
19
+ propsAsIs: !0
20
+ }), a = () => n, f = /* @__PURE__ */ e(a())({
21
+ name: "EndLastScreenWrap",
22
+ class: "ef67yx9",
23
+ propsAsIs: !0
24
+ }), W = /* @__PURE__ */ e("div")({
25
+ name: "EndScreenMain",
26
+ class: "enw6fxs",
19
27
  propsAsIs: !1
20
- }), t = () => s, u = /* @__PURE__ */ e(t())({
28
+ }), i = () => r, _ = /* @__PURE__ */ e(i())({
21
29
  name: "EndScreenTitle",
22
- class: "ef67yx9",
30
+ class: "euaws9b",
23
31
  propsAsIs: !0
24
- }), p = () => n, f = /* @__PURE__ */ e(p())({
32
+ }), d = () => s, v = /* @__PURE__ */ e(d())({
25
33
  name: "EndScreenDescription",
26
- class: "enw6fxs",
34
+ class: "e9uqaot",
27
35
  propsAsIs: !0
28
- }), a = () => r, x = /* @__PURE__ */ e(a())({
36
+ }), S = () => s, D = /* @__PURE__ */ e(S())({
37
+ name: "EndLastScreenDescription",
38
+ class: "etyeg2m",
39
+ propsAsIs: !0
40
+ }), l = () => c, L = /* @__PURE__ */ e(l())({
29
41
  name: "EndScreenButton",
30
- class: "euaws9b",
42
+ class: "e177v9in",
31
43
  propsAsIs: !0
44
+ }), M = /* @__PURE__ */ e("img")({
45
+ name: "EndScreenMedia",
46
+ class: "ehp7lor",
47
+ propsAsIs: !1
32
48
  });
33
49
  export {
34
- x as EndScreenButton,
35
- f as EndScreenDescription,
36
- I as EndScreenMain,
37
- u as EndScreenTitle,
38
- E as EndScreenWrap,
39
- l as ScreenWrap,
40
- m as SponsorIcon
50
+ x as EndFirstScreenWrap,
51
+ D as EndLastScreenDescription,
52
+ f as EndLastScreenWrap,
53
+ L as EndScreenButton,
54
+ v as EndScreenDescription,
55
+ W as EndScreenMain,
56
+ M as EndScreenMedia,
57
+ _ as EndScreenTitle,
58
+ n as EndScreenWrap,
59
+ u as ScreenWrap,
60
+ A as SponsorIcon
41
61
  };
@@ -1,6 +1,10 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { ScreenContainerBox as n } from "./styles.js";
3
- const c = ({ children: e, height: o }) => /* @__PURE__ */ r(n, { style: { height: o }, children: /* @__PURE__ */ r("div", { children: e }) });
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { ScreenContainerBox as i } from "./styles.js";
3
+ import { useDynamicParentFont as c } from "./useDynamicParentFont.js";
4
+ const s = ({ children: o, height: r }) => {
5
+ const { container: e, fontSize: t } = c(r);
6
+ return /* @__PURE__ */ n(i, { style: { height: r, fontSize: t }, ref: e, children: /* @__PURE__ */ n("div", { children: o }) });
7
+ };
4
8
  export {
5
- c as ScreenContainer
9
+ s as ScreenContainer
6
10
  };
@@ -0,0 +1,4 @@
1
+ export declare const useDynamicParentFont: (height?: number) => {
2
+ container: import('react').MutableRefObject<HTMLDivElement | null>;
3
+ fontSize: string;
4
+ };
@@ -0,0 +1,27 @@
1
+ import a from "lodash.throttle";
2
+ import { useState as d, useRef as T, useEffect as c } from "react";
3
+ const i = "16px", u = 17, O = 21, h = 24, f = (n) => n < 0.9 ? h : n < 1.17 ? O : u, I = (n) => {
4
+ const [E, s] = d(i), r = T(null);
5
+ return c(() => {
6
+ const e = a(() => {
7
+ const { offsetWidth: t, offsetHeight: o } = r.current || {};
8
+ if (!t || !o) return;
9
+ const _ = o / t;
10
+ s(t ? `${t / f(_)}px` : i);
11
+ }, 200);
12
+ return window.screen.orientation.addEventListener("change", e), window.addEventListener("orientationchange", e), window.addEventListener("resize", e), e(), () => {
13
+ window.screen.orientation.removeEventListener("change", e), window.removeEventListener("resize", e), window.removeEventListener("orientationchange", e);
14
+ };
15
+ }, []), c(() => {
16
+ const { offsetWidth: e, offsetHeight: t } = r.current || {};
17
+ if (!e || !t) return;
18
+ const o = t / e;
19
+ s(e ? `${e / f(o)}px` : i);
20
+ }, [n]), {
21
+ container: r,
22
+ fontSize: E
23
+ };
24
+ };
25
+ export {
26
+ I as useDynamicParentFont
27
+ };
@@ -1,33 +1,35 @@
1
1
  import { jsx as r, jsxs as e } from "react/jsx-runtime";
2
2
  import { ScreenContainer as c } from "../ScreenContainer/index.js";
3
- import { ScreenWrap as s, SponsorIcon as S, StartScreenSponsor as a, StartScreenTitle as l, StartScreenDescription as p, StartScreenButton as m, IconArrowRight as d } from "./styles.js";
4
- const w = ({ height: o, countQuestionsAvailable: t, sliderRef: i }) => /* @__PURE__ */ r(c, { height: o, children: /* @__PURE__ */ e(s, { children: [
5
- /* @__PURE__ */ r(S, { name: "icon-masters-logo" }),
6
- /* @__PURE__ */ r(a, { children: "MASTERS PRESENTS" }),
7
- /* @__PURE__ */ e(l, { children: [
8
- "Tee time predictions:",
9
- /* @__PURE__ */ r("br", {}),
10
- "share your expertise"
11
- ] }),
12
- /* @__PURE__ */ e(p, { children: [
13
- "Swipe to answer today’s",
14
- /* @__PURE__ */ r("br", {}),
15
- "question cards."
3
+ import { ScreenWrap as s, Main as S, SponsorIcon as a, StartScreenSponsor as l, StartScreenTitle as p, StartScreenDescription as d, StartScreenButton as h, IconArrowRight as m } from "./styles.js";
4
+ const R = ({ height: o, countQuestionsAvailable: n, sliderRef: i }) => /* @__PURE__ */ r(c, { height: o, children: /* @__PURE__ */ e(s, { children: [
5
+ /* @__PURE__ */ e(S, { children: [
6
+ /* @__PURE__ */ r(a, { name: "icon-masters-logo" }),
7
+ /* @__PURE__ */ r(l, { children: "MASTERS PRESENTS" }),
8
+ /* @__PURE__ */ e(p, { children: [
9
+ "Tee time predictions:",
10
+ /* @__PURE__ */ r("br", {}),
11
+ "share your expertise"
12
+ ] }),
13
+ /* @__PURE__ */ e(d, { children: [
14
+ "Swipe to answer today’s",
15
+ /* @__PURE__ */ r("br", {}),
16
+ "question cards."
17
+ ] })
16
18
  ] }),
17
19
  /* @__PURE__ */ e(
18
- m,
20
+ h,
19
21
  {
20
22
  onClick: () => {
21
- var n;
22
- (n = i.current) == null || n.slickNext();
23
+ var t;
24
+ (t = i.current) == null || t.slickNext();
23
25
  },
24
26
  children: [
25
- t ? `${t} questions available` : "See all questions",
26
- /* @__PURE__ */ r(d, { name: "iconArrowRight" })
27
+ n ? `${n} questions available` : "See all questions",
28
+ /* @__PURE__ */ r(m, { name: "iconArrowRight" })
27
29
  ]
28
30
  }
29
31
  )
30
32
  ] }) }, "start");
31
33
  export {
32
- w as StartScreen
34
+ R as StartScreen
33
35
  };
@@ -1,4 +1,5 @@
1
1
  export declare const ScreenWrap: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
2
+ export declare const Main: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
2
3
  export declare const IconArrowRight: any;
3
4
  export declare const SponsorIcon: any;
4
5
  export declare const StartScreenSponsor: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -1,41 +1,46 @@
1
1
  import { styled as s } from "@linaria/react";
2
- import { ScreenTitle as r, ScreenDescription as t, ScreenButton as n } from "../../styles.js";
2
+ import { ScreenTitle as r, ScreenDescription as n, ScreenButton as t } from "../../styles.js";
3
3
  import { SvgIcon as e } from "../../../../../ui/icons/index.js";
4
4
  const I = /* @__PURE__ */ s("div")({
5
5
  name: "ScreenWrap",
6
6
  class: "s991vvm",
7
7
  propsAsIs: !1
8
- }), o = () => e, u = /* @__PURE__ */ s(o())({
8
+ }), u = /* @__PURE__ */ s("div")({
9
+ name: "Main",
10
+ class: "mnbj36g",
11
+ propsAsIs: !1
12
+ }), o = () => e, A = /* @__PURE__ */ s(o())({
9
13
  name: "IconArrowRight",
10
- class: "inbj36g",
14
+ class: "izrvgt",
11
15
  propsAsIs: !0
12
- }), c = () => e, A = /* @__PURE__ */ s(c())({
16
+ }), c = () => e, f = /* @__PURE__ */ s(c())({
13
17
  name: "SponsorIcon",
14
- class: "szrvgt",
18
+ class: "swqs2ju",
15
19
  propsAsIs: !0
16
- }), f = /* @__PURE__ */ s("div")({
20
+ }), v = /* @__PURE__ */ s("div")({
17
21
  name: "StartScreenSponsor",
18
- class: "swqs2ju",
22
+ class: "s1oq8jlq",
19
23
  propsAsIs: !1
20
24
  }), p = () => r, g = /* @__PURE__ */ s(p())({
21
25
  name: "StartScreenTitle",
22
- class: "s1oq8jlq",
26
+ class: "se4nn9a",
23
27
  propsAsIs: !0
24
- }), a = () => t, v = /* @__PURE__ */ s(a())({
28
+ }), a = () => n, x = /* @__PURE__ */ s(a())({
25
29
  name: "StartScreenDescription",
26
- class: "se4nn9a",
30
+ class: "sofug8s",
27
31
  propsAsIs: !0
28
- }), S = () => n, x = /* @__PURE__ */ s(S())({
32
+ }), S = () => t, _ = /* @__PURE__ */ s(S())({
29
33
  name: "StartScreenButton",
30
- class: "sofug8s",
34
+ class: "s18s0pjp",
31
35
  propsAsIs: !0
32
36
  });
33
37
  export {
34
- u as IconArrowRight,
38
+ A as IconArrowRight,
39
+ u as Main,
35
40
  I as ScreenWrap,
36
- A as SponsorIcon,
37
- x as StartScreenButton,
38
- v as StartScreenDescription,
39
- f as StartScreenSponsor,
41
+ f as SponsorIcon,
42
+ _ as StartScreenButton,
43
+ x as StartScreenDescription,
44
+ v as StartScreenSponsor,
40
45
  g as StartScreenTitle
41
46
  };
@@ -1,116 +1,142 @@
1
- import { jsx as a, jsxs as j } from "react/jsx-runtime";
2
- import { useCallback as v, useSyncExternalStore as C, useRef as b, useMemo as h, useEffect as S } from "react";
3
- import { EmergencyScreen as R } from "./EmergencyScreen/index.js";
4
- import { EndScreen as w } from "./EndScreen/index.js";
5
- import { LoaderScreen as N } from "./LoaderScreen/index.js";
6
- import { QuestionScreen as T } from "./QuestionScreen/index.js";
7
- import { ScreenContainer as A } from "./ScreenContainer/index.js";
8
- import { StartScreen as B } from "./StartScreen/index.js";
9
- import { settings as P } from "./constants.js";
10
- import { Carousel as F } from "./styles.js";
11
- function I(t, n, f) {
12
- let u = /* @__PURE__ */ new Set([...n, void 0]);
13
- return t.listen((c, s, m) => {
14
- u.has(m) && f(c, s, m);
1
+ import { jsx as i, jsxs as R } from "react/jsx-runtime";
2
+ import { ConnectError as T, Code as N } from "@connectrpc/connect";
3
+ import { cx as w } from "@linaria/core";
4
+ import { useCallback as x, useSyncExternalStore as A, useRef as b, useState as F, useMemo as I, useEffect as v } from "react";
5
+ import { EmergencyScreen as S } from "./EmergencyScreen/index.js";
6
+ import { EndScreen as B } from "./EndScreen/index.js";
7
+ import { LoaderScreen as D } from "./LoaderScreen/index.js";
8
+ import { QuestionScreen as H } from "./QuestionScreen/index.js";
9
+ import { ScreenContainer as L } from "./ScreenContainer/index.js";
10
+ import { StartScreen as V } from "./StartScreen/index.js";
11
+ import { settings as h } from "./constants.js";
12
+ import { Carousel as K, desktopDots as M } from "./styles.js";
13
+ function q(t, n, u) {
14
+ let a = /* @__PURE__ */ new Set([...n, void 0]);
15
+ return t.listen((s, o, p) => {
16
+ a.has(p) && u(s, o, p);
15
17
  });
16
18
  }
17
- function L(t, n = {}) {
18
- let f = v(
19
- (c) => n.keys ? I(t, n.keys, c) : t.listen(c),
19
+ function z(t, n = {}) {
20
+ let u = x(
21
+ (s) => n.keys ? q(t, n.keys, s) : t.listen(s),
20
22
  [n.keys, t]
21
- ), u = t.get.bind(t);
22
- return C(f, u, u);
23
+ ), a = t.get.bind(t);
24
+ return A(u, a, a);
23
25
  }
24
- const W = ({ gamification: t, autoplay: n, swipeable: f, changeHeightOnInit: u, height: c, onEvent: s, centerPadding: m }) => {
25
- const o = b(), i = b(null), { data: r, error: d, loading: k } = L(t.betPack.getStore()), { listOfQuestions: p, countQuestionsAvailable: x } = h(() => {
26
+ const re = ({ gamification: t, autoplay: n, swipeable: u, changeHeightOnInit: a, height: s, onEvent: o, centerPadding: p }) => {
27
+ const c = b(), l = b(null), [P, C] = F(!1), { data: r, error: f, loading: y } = z(t.betPack.getStore()), { listOfQuestions: m, countQuestionsAvailable: O } = I(() => {
26
28
  const e = r ? Object.values(r) : [];
27
29
  return {
28
30
  listOfQuestions: e,
29
- countQuestionsAvailable: e.filter(({ marketClosed: l }) => !l).length
31
+ countQuestionsAvailable: e.filter(({ marketClosed: d }) => !d).length
30
32
  };
31
33
  }, [r]);
32
- S(() => {
33
- !d && !k && r !== void 0 && s({
34
+ v(() => {
35
+ !f && !y && r !== void 0 && !P && o({
34
36
  type: "slBetPackReady",
35
37
  payload: {
36
38
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
37
39
  // @ts-expect-error
38
40
  next: () => {
39
41
  var e;
40
- return (e = i.current) == null ? void 0 : e.slickNext();
42
+ return (e = l.current) == null ? void 0 : e.slickNext();
41
43
  },
42
44
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
43
45
  // @ts-expect-error
44
46
  prev: () => {
45
47
  var e;
46
- return (e = i.current) == null ? void 0 : e.slickPrev();
48
+ return (e = l.current) == null ? void 0 : e.slickPrev();
47
49
  },
48
50
  current: 0,
49
51
  canNext: !0,
50
52
  canPrev: !1
51
53
  }
52
54
  });
53
- }, [r, d, k, s]);
54
- const O = v(
55
- async (e, l) => {
55
+ }, [r, f, y, o]);
56
+ const Q = x(
57
+ async (e, d) => {
56
58
  try {
57
- await t.betPackVote(e, l);
59
+ C(!0), await t.betPackVote(e, d);
58
60
  } finally {
59
- o.current && clearTimeout(o.current), n && (o.current = setTimeout(() => {
60
- var y;
61
- (y = i.current) == null || y.slickNext();
61
+ c.current && clearTimeout(c.current), n && (c.current = setTimeout(() => {
62
+ var k;
63
+ (k = l.current) == null || k.slickNext();
62
64
  }, 2e3));
63
65
  }
64
66
  },
65
- [t, i, n]
67
+ [t, l, n]
66
68
  );
67
- if (S(() => () => {
68
- o.current && clearTimeout(o.current);
69
- }, []), k || r === void 0)
70
- return /* @__PURE__ */ a(N, {});
71
- if (d || r === null || !Object.keys(r).length)
72
- return /* @__PURE__ */ a(
73
- R,
69
+ if (v(() => () => {
70
+ c.current && clearTimeout(c.current);
71
+ }, []), y)
72
+ return /* @__PURE__ */ i(D, {});
73
+ if (!f && (r == null || !Object.keys(r).length))
74
+ return /* @__PURE__ */ i(
75
+ S,
74
76
  {
75
- actionFn: () => s({ type: "slHardRefresh" }),
76
- description: "It looks like we couldn't load the questions."
77
+ actionFn: () => o({ type: "slHardRefresh" }),
78
+ description: `It looks like we couldn't
79
+ load the questions.`
77
80
  }
78
81
  );
79
- const Q = (e) => {
80
- var l;
81
- if (s({
82
+ if (f)
83
+ return /* @__PURE__ */ i(
84
+ S,
85
+ {
86
+ actionFn: () => o({ type: "slHardRefresh" }),
87
+ description: f instanceof T && f.code !== N.InvalidArgument ? `The event ID was not
88
+ specified or is invalid.` : `The server is unable to
89
+ handle this request.`
90
+ }
91
+ );
92
+ const g = (e) => {
93
+ var d;
94
+ if (o({
82
95
  type: "slBetPackChangeCard",
83
96
  payload: {
84
97
  current: e,
85
98
  canNext: e < Object.keys(r).length + 1,
86
99
  canPrev: e >= 1
87
100
  }
88
- }), e !== 0 && e !== Object.keys(r).length + 1 && ((l = p[e - 1]) != null && l.id)) {
89
- t.openQuestion(p[e - 1].id);
101
+ }), e !== 0 && e !== Object.keys(r).length + 1 && ((d = m[e - 1]) != null && d.id)) {
102
+ t.openQuestion(m[e - 1].id, {
103
+ openedFrom: "list",
104
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
105
+ // @ts-expect-error
106
+ attributes: {
107
+ id: m[e - 1].id,
108
+ type: m[e - 1].type,
109
+ status: m[e - 1].status,
110
+ attributes: {
111
+ case: void 0
112
+ }
113
+ }
114
+ });
90
115
  return;
91
116
  }
92
117
  t.closeQuestion();
93
- }, g = (e) => e ? /* @__PURE__ */ a(A, { height: c, children: /* @__PURE__ */ a(T, { question: e, vote: O }) }, e.id) : null;
94
- return /* @__PURE__ */ j(
95
- F,
118
+ }, j = (e) => e ? /* @__PURE__ */ i(L, { height: s, children: /* @__PURE__ */ i(H, { question: e, vote: Q }) }, e.id) : null;
119
+ return /* @__PURE__ */ R(
120
+ K,
96
121
  {
97
- ...P,
98
- swipe: f,
99
- onInit: u,
100
- centerPadding: m || P.centerPadding,
101
- afterChange: Q,
122
+ ...h,
123
+ swipe: u,
124
+ onInit: a,
125
+ centerPadding: p || h.centerPadding,
126
+ afterChange: g,
102
127
  beforeChange: () => {
103
- o.current && clearTimeout(o.current);
128
+ c.current && clearTimeout(c.current);
104
129
  },
105
- ref: i,
130
+ ref: l,
131
+ className: w(!u && M),
106
132
  children: [
107
- /* @__PURE__ */ a(B, { height: c, sliderRef: i, countQuestionsAvailable: x }),
108
- Object.values(r).map(g),
109
- /* @__PURE__ */ a(w, { onEvent: s, height: c })
133
+ /* @__PURE__ */ i(V, { height: s, sliderRef: l, countQuestionsAvailable: O }),
134
+ Object.values(r).map(j),
135
+ /* @__PURE__ */ i(B, { onEvent: o, height: s })
110
136
  ]
111
137
  }
112
138
  );
113
139
  };
114
140
  export {
115
- W as BetPackContent
141
+ re as BetPackContent
116
142
  };
@@ -1,3 +1,4 @@
1
1
  export declare const Carousel: any;
2
+ export declare const desktopDots: import('@linaria/core').LinariaClassName;
2
3
  export declare const Dot: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
4
  export declare const Dots: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -1,20 +1,21 @@
1
1
  import { styled as s } from "@linaria/react";
2
2
  import o from "react-slick";
3
- const r = () => o, a = /* @__PURE__ */ s(r())({
3
+ const t = () => o, p = /* @__PURE__ */ s(t())({
4
4
  name: "Carousel",
5
5
  class: "c1f9jjsn",
6
6
  propsAsIs: !0
7
- }), l = /* @__PURE__ */ s("div")({
7
+ }), a = "d25r51y", l = /* @__PURE__ */ s("div")({
8
8
  name: "Dot",
9
- class: "d25r51y",
9
+ class: "d1lvrmx8",
10
10
  propsAsIs: !1
11
- }), p = /* @__PURE__ */ s("div")({
11
+ }), c = /* @__PURE__ */ s("div")({
12
12
  name: "Dots",
13
- class: "d1lvrmx8",
13
+ class: "d11xps29",
14
14
  propsAsIs: !1
15
15
  });
16
16
  export {
17
- a as Carousel,
17
+ p as Carousel,
18
18
  l as Dot,
19
- p as Dots
19
+ c as Dots,
20
+ a as desktopDots
20
21
  };