@streamlayer/react 0.37.1 → 0.38.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.
@@ -1,845 +1,795 @@
1
- import { jsxs as a, jsx as s, Fragment as E } from "react/jsx-runtime";
2
- import { s as i, c as g, d as me } from "./useSdkFeature.js";
3
- import { useStore as D } from "@nanostores/react";
4
- import { useState as N, useLayoutEffect as Se, useCallback as B, useEffect as G, useMemo as q, PureComponent as xe, useTransition as qe, useRef as Ee } from "react";
5
- import { o as he, c as Ne, w as De, j as Ie, E as Le, K as Pe, a as Ve, p as Oe, C as Qe, n as ve, m as Me, b as _e, l as Ue, D as fe, Y as re, d as je } from "./masters2.js";
6
- import { QuestionType as h, QuestionStatus as L, QuestionImages as U, PickHistoryStatus as F } from "@streamlayer/sdk-web-types";
1
+ import { jsxs as r, jsx as s, Fragment as x } from "react/jsx-runtime";
2
+ import { s as t, c as A, d as ce } from "./useSdkFeature.js";
3
+ import { useStore as S } from "@nanostores/react";
4
+ import { useState as E, useLayoutEffect as ye, useCallback as B, useEffect as ee, useMemo as N, PureComponent as Re, useTransition as we } from "react";
5
+ import { o as de, I as pe, s as ue, c as Te, w as ke, L as me, F as xe, h as Se, a as qe, p as Ee, C as Ne, n as he, m as De, b as Le, l as Pe, D as Ve, d as Oe, e as Qe } from "./masters2.js";
6
+ import { QuestionType as m, QuestionStatus as D, QuestionImages as j, PickHistoryStatus as F } from "@streamlayer/sdk-web-types";
7
7
  import "react-countup";
8
- import { CountdownCircleTimer as Be } from "react-countdown-circle-timer";
9
- import { E as P } from "./index2.js";
10
- import ze from "react-infinite-scroller";
8
+ import { CountdownCircleTimer as Me } from "react-countdown-circle-timer";
9
+ import { E as L } from "./index2.js";
10
+ import _e from "react-infinite-scroller";
11
11
  import "lodash.throttle";
12
12
  import "@streamlayer/sdk-web-interfaces";
13
13
  import "@streamlayer/sdk-web-notifications";
14
14
  import "./useStreamLayerApp.js";
15
15
  import "@streamlayer/sdk-web";
16
- const Fe = /* @__PURE__ */ i("div")({
16
+ const je = /* @__PURE__ */ t("div")({
17
17
  name: "Container",
18
18
  class: "c1vwopgc",
19
19
  propsAsIs: !1
20
- }), We = /* @__PURE__ */ i("div")({
20
+ }), Ue = /* @__PURE__ */ t("div")({
21
21
  name: "QuestionTypeWrap",
22
22
  class: "qyktpt0",
23
23
  propsAsIs: !1
24
- }), Ze = () => g, He = /* @__PURE__ */ i(Ze())({
24
+ }), Be = () => A, ze = /* @__PURE__ */ t(Be())({
25
25
  name: "QuestionTypeIcon",
26
26
  class: "q951jdx",
27
27
  propsAsIs: !0
28
- }), Ye = /* @__PURE__ */ i("span")({
28
+ }), Fe = /* @__PURE__ */ t("span")({
29
29
  name: "QuestionTypeTitle",
30
30
  class: "qss5f0e",
31
31
  propsAsIs: !1
32
- }), Ge = /* @__PURE__ */ i("div")({
32
+ }), We = /* @__PURE__ */ t("div")({
33
33
  name: "CloseIconWrap",
34
34
  class: "c1ao1jtv",
35
35
  propsAsIs: !1
36
- }), Ke = () => g, Je = /* @__PURE__ */ i(Ke())({
36
+ }), He = () => A, Ze = /* @__PURE__ */ t(He())({
37
37
  name: "CloseIcon",
38
38
  class: "cvsl7l3",
39
39
  propsAsIs: !0
40
- }), Ce = ({ type: e, close: n, label: t }) => {
41
- const o = e ? he[e] : { label: t, iconName: void 0 };
42
- return /* @__PURE__ */ a(Fe, { children: [
43
- /* @__PURE__ */ a(We, { children: [
44
- (o == null ? void 0 : o.iconName) && /* @__PURE__ */ s(
45
- He,
40
+ }), Ie = ({ type: e, close: n, label: o }) => {
41
+ const i = e ? de[e] : { label: o, iconName: void 0 };
42
+ return /* @__PURE__ */ r(je, { children: [
43
+ /* @__PURE__ */ r(Ue, { children: [
44
+ (i == null ? void 0 : i.iconName) && /* @__PURE__ */ s(
45
+ ze,
46
46
  {
47
- "data-type-trivia": e === h.TRIVIA,
48
- "data-type-poll": e === h.POLL,
49
- name: o.iconName
47
+ "data-type-trivia": e === m.TRIVIA,
48
+ "data-type-poll": e === m.POLL,
49
+ name: i.iconName
50
50
  }
51
51
  ),
52
- (o == null ? void 0 : o.label) && /* @__PURE__ */ s(Ye, { children: o.label })
52
+ (i == null ? void 0 : i.label) && /* @__PURE__ */ s(Fe, { children: i.label })
53
53
  ] }),
54
- /* @__PURE__ */ s(Ge, { onClick: n, children: /* @__PURE__ */ s(Je, { name: "icon-cross" }) })
54
+ /* @__PURE__ */ s(We, { onClick: n, children: /* @__PURE__ */ s(Ze, { name: "icon-cross" }) })
55
55
  ] });
56
- }, Ae = (e) => e.split(/\s+/).map((n) => n[0]).join("").toUpperCase(), ge = (e) => e ? e.toLocaleString("en-US") : "0", se = (e) => e.toLocaleDateString("en-US", {
57
- weekday: "short",
58
- month: "short",
59
- day: "numeric"
60
- }), ne = (e) => e.toLocaleTimeString("en-US", {
61
- hour: "2-digit",
62
- minute: "2-digit"
63
- }), te = (e) => !isNaN(e.getTime()), Xe = /* @__PURE__ */ i("div")({
56
+ }, Ye = /* @__PURE__ */ t("div")({
64
57
  name: "Container",
65
58
  class: "c1zy8a",
66
59
  propsAsIs: !1
67
- }), es = /* @__PURE__ */ i("div")({
60
+ }), Ge = /* @__PURE__ */ t("div")({
68
61
  name: "Title",
69
62
  class: "t1vih9p5",
70
63
  propsAsIs: !1
71
- }), ss = /* @__PURE__ */ i("div")({
64
+ }), Ke = /* @__PURE__ */ t("div")({
72
65
  name: "Indicator",
73
66
  class: "i1fbnvpb",
74
67
  propsAsIs: !1
75
- }), ae = ({ indicator: e, title: n }) => /* @__PURE__ */ a(Xe, { children: [
76
- /* @__PURE__ */ s(es, { children: n }),
77
- /* @__PURE__ */ s(ss, { children: e })
78
- ] }), ns = /* @__PURE__ */ i("div")({
68
+ }), te = ({ indicator: e, title: n }) => /* @__PURE__ */ r(Ye, { children: [
69
+ /* @__PURE__ */ s(Ge, { children: n }),
70
+ /* @__PURE__ */ s(Ke, { children: e })
71
+ ] }), Xe = /* @__PURE__ */ t("div")({
79
72
  name: "Container",
80
73
  class: "ctmhwyc",
81
74
  propsAsIs: !1
82
- }), ts = /* @__PURE__ */ i("div")({
75
+ }), Je = /* @__PURE__ */ t("div")({
83
76
  name: "Indicator",
84
77
  class: "i1jri200",
85
78
  propsAsIs: !1
86
- }), is = /* @__PURE__ */ i("div")({
79
+ }), es = /* @__PURE__ */ t("div")({
87
80
  name: "Title",
88
81
  class: "t8s05oq",
89
82
  propsAsIs: !1
90
- }), W = ({ indicator: e, title: n }) => /* @__PURE__ */ a(ns, { children: [
91
- /* @__PURE__ */ s(ts, { children: e }),
92
- /* @__PURE__ */ s(is, { children: n })
93
- ] }), os = /* @__PURE__ */ i("div")({
83
+ }), W = ({ indicator: e, title: n }) => /* @__PURE__ */ r(Xe, { children: [
84
+ /* @__PURE__ */ s(Je, { children: e }),
85
+ /* @__PURE__ */ s(es, { children: n })
86
+ ] }), ss = /* @__PURE__ */ t("div")({
94
87
  name: "Container",
95
88
  class: "c1yrpn9o",
96
89
  propsAsIs: !1
97
- }), rs = /* @__PURE__ */ i("div")({
90
+ }), ns = /* @__PURE__ */ t("div")({
98
91
  name: "TopInfo",
99
92
  class: "t17fwahh",
100
93
  propsAsIs: !1
101
- }), as = /* @__PURE__ */ i("div")({
94
+ }), ts = /* @__PURE__ */ t("div")({
102
95
  name: "BottomInfo",
103
96
  class: "by6w7e9",
104
97
  propsAsIs: !1
105
- }), ls = /* @__PURE__ */ i("div")({
98
+ }), os = /* @__PURE__ */ t("div")({
106
99
  name: "User",
107
100
  class: "u1g7arbm",
108
101
  propsAsIs: !1
109
- }), cs = /* @__PURE__ */ i("img")({
102
+ }), is = /* @__PURE__ */ t("img")({
110
103
  name: "Avatar",
111
104
  class: "a1ldeata",
112
105
  propsAsIs: !1
113
- }), ds = /* @__PURE__ */ i("div")({
106
+ }), as = /* @__PURE__ */ t("div")({
114
107
  name: "UserInfo",
115
108
  class: "u10d4koz",
116
109
  propsAsIs: !1
117
- }), ps = /* @__PURE__ */ i("div")({
110
+ }), rs = /* @__PURE__ */ t("div")({
118
111
  name: "UserName",
119
112
  class: "u1q6roj0",
120
113
  propsAsIs: !1
121
- }), us = /* @__PURE__ */ i("div")({
114
+ }), ls = /* @__PURE__ */ t("div")({
122
115
  name: "UserRating",
123
116
  class: "ui0m425",
124
117
  propsAsIs: !1
125
- }), ms = /* @__PURE__ */ i("img")({
118
+ }), cs = /* @__PURE__ */ t("img")({
126
119
  name: "TrophyIcon",
127
120
  class: "t1el3mrn",
128
121
  propsAsIs: !1
129
- }), hs = /* @__PURE__ */ i("div")({
122
+ }), ds = /* @__PURE__ */ t("div")({
130
123
  name: "Rts",
131
124
  class: "r2vgnxv",
132
125
  propsAsIs: !1
133
- }), Is = /* @__PURE__ */ i("div")({
126
+ }), ps = /* @__PURE__ */ t("div")({
134
127
  name: "RtsIndicator",
135
128
  class: "roqn06j",
136
129
  propsAsIs: !1
137
- }), vs = /* @__PURE__ */ i("div")({
130
+ }), us = /* @__PURE__ */ t("div")({
138
131
  name: "RtsLabel",
139
132
  class: "r15adx7c",
140
133
  propsAsIs: !1
141
- }), fs = /* @__PURE__ */ i("div")({
134
+ }), ms = /* @__PURE__ */ t("div")({
142
135
  name: "Divider",
143
136
  class: "dv59lta",
144
137
  propsAsIs: !1
145
- }), Cs = /* @__PURE__ */ i("div")({
138
+ }), hs = /* @__PURE__ */ t("div")({
146
139
  name: "Ranks",
147
140
  class: "r55lotb",
148
141
  propsAsIs: !1
149
- }), As = /* @__PURE__ */ i("div")({
142
+ }), Is = /* @__PURE__ */ t("div")({
150
143
  name: "Statistics",
151
144
  class: "s1knfgqt",
152
145
  propsAsIs: !1
153
- }), gs = /* @__PURE__ */ i("div")({
146
+ }), vs = /* @__PURE__ */ t("div")({
154
147
  name: "AvatarPlaceholder",
155
148
  class: "a1mqo824",
156
149
  propsAsIs: !1
157
- }), $s = /* @__PURE__ */ i("button")({
150
+ }), Cs = /* @__PURE__ */ t("button")({
158
151
  name: "UserAccountBtn",
159
152
  class: "uxareh6",
160
153
  propsAsIs: !1
161
- }), bs = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Trophy'%3e%3cpath%20id='Combined%20Shape'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.69197%204.66662C3.69197%205.99705%203.92914%207.17787%204.4035%208.20912C3.49966%208.02451%202.74487%207.66486%202.1391%207.13014C1.53333%206.59542%201.23046%206.0798%201.23046%205.58328V4.66662H3.69197ZM14.7686%204.66662V5.58328C14.7686%206.0798%2014.4658%206.59542%2013.86%207.13014C13.2542%207.66486%2012.4994%208.02451%2011.5956%208.20912C12.0699%207.17787%2012.3071%205.99705%2012.3071%204.66662H14.7686ZM15.9998%205.58329V4.36108C15.9998%204.10645%2015.9101%203.89002%2015.7306%203.71178C15.5511%203.53354%2015.3332%203.44442%2015.0768%203.44442H12.3076V2.52776C12.3076%202.10763%2012.1569%201.74797%2011.8556%201.44878C11.5544%201.14959%2011.1922%201%2010.7691%201H5.23072C4.80764%201%204.44547%201.14959%204.14419%201.44878C3.84291%201.74797%203.69227%202.10763%203.69227%202.52776V3.44442H0.923068C0.666659%203.44442%200.448714%203.53354%200.269228%203.71178C0.0897418%203.89002%200%204.10645%200%204.36108V5.58329C0%206.03525%200.13301%206.49039%200.399034%206.94872C0.665059%207.40705%201.02403%207.82082%201.47595%208.19003C1.92787%208.55924%202.48234%208.86957%203.13939%209.12101C3.79644%209.37246%204.48713%209.51409%205.21149%209.54592C5.48071%209.88967%205.7852%2010.192%206.12494%2010.453C6.36853%2010.6695%206.53679%2010.9002%206.62974%2011.1453C6.72269%2011.3904%206.76916%2011.6752%206.76916%2011.9999C6.76916%2012.3436%206.67141%2012.6333%206.4759%2012.8688C6.28038%2013.1043%205.96789%2013.2221%205.53841%2013.2221C5.05764%2013.2221%204.62976%2013.3669%204.25476%2013.6566C3.87977%2013.9462%203.69227%2014.3106%203.69227%2014.7499V15.361C3.69227%2015.4501%203.72112%2015.5233%203.77881%2015.5806C3.8365%2015.6379%203.91022%2015.6665%203.99996%2015.6665H11.9999C12.0896%2015.6665%2012.1633%2015.6379%2012.221%2015.5806C12.2787%2015.5233%2012.3076%2015.4501%2012.3076%2015.361V14.7499C12.3076%2014.3106%2012.1201%2013.9462%2011.7451%2013.6566C11.3701%2013.3669%2010.9422%2013.2221%2010.4614%2013.2221C10.0319%2013.2221%209.71945%2013.1043%209.52394%2012.8688C9.32843%2012.6333%209.23068%2012.3436%209.23068%2011.9999C9.23068%2011.6752%209.27715%2011.3904%209.3701%2011.1453C9.46305%2010.9002%209.63131%2010.6695%209.8749%2010.453C10.2146%2010.192%2010.5191%209.88967%2010.7884%209.54592C11.5127%209.51409%2012.2034%209.37246%2012.8604%209.12101C13.5175%208.86957%2014.072%208.55924%2014.5239%208.19003C14.9758%207.82082%2015.3348%207.40705%2015.6008%206.94872C15.8668%206.49039%2015.9998%206.03525%2015.9998%205.58329ZM6.76047%207.1798L8.05109%206.49997L9.3417%207.1798L9.09521%205.73989L10.1393%204.72015L8.69639%204.51007L8.05109%203.2L7.40578%204.51007L5.96283%204.72015L7.00696%205.73989L6.76047%207.1798Z'%20fill='%23F2C94C'/%3e%3c/g%3e%3c/svg%3e", $e = ({
154
+ }), fs = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Trophy'%3e%3cpath%20id='Combined%20Shape'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.69197%204.66662C3.69197%205.99705%203.92914%207.17787%204.4035%208.20912C3.49966%208.02451%202.74487%207.66486%202.1391%207.13014C1.53333%206.59542%201.23046%206.0798%201.23046%205.58328V4.66662H3.69197ZM14.7686%204.66662V5.58328C14.7686%206.0798%2014.4658%206.59542%2013.86%207.13014C13.2542%207.66486%2012.4994%208.02451%2011.5956%208.20912C12.0699%207.17787%2012.3071%205.99705%2012.3071%204.66662H14.7686ZM15.9998%205.58329V4.36108C15.9998%204.10645%2015.9101%203.89002%2015.7306%203.71178C15.5511%203.53354%2015.3332%203.44442%2015.0768%203.44442H12.3076V2.52776C12.3076%202.10763%2012.1569%201.74797%2011.8556%201.44878C11.5544%201.14959%2011.1922%201%2010.7691%201H5.23072C4.80764%201%204.44547%201.14959%204.14419%201.44878C3.84291%201.74797%203.69227%202.10763%203.69227%202.52776V3.44442H0.923068C0.666659%203.44442%200.448714%203.53354%200.269228%203.71178C0.0897418%203.89002%200%204.10645%200%204.36108V5.58329C0%206.03525%200.13301%206.49039%200.399034%206.94872C0.665059%207.40705%201.02403%207.82082%201.47595%208.19003C1.92787%208.55924%202.48234%208.86957%203.13939%209.12101C3.79644%209.37246%204.48713%209.51409%205.21149%209.54592C5.48071%209.88967%205.7852%2010.192%206.12494%2010.453C6.36853%2010.6695%206.53679%2010.9002%206.62974%2011.1453C6.72269%2011.3904%206.76916%2011.6752%206.76916%2011.9999C6.76916%2012.3436%206.67141%2012.6333%206.4759%2012.8688C6.28038%2013.1043%205.96789%2013.2221%205.53841%2013.2221C5.05764%2013.2221%204.62976%2013.3669%204.25476%2013.6566C3.87977%2013.9462%203.69227%2014.3106%203.69227%2014.7499V15.361C3.69227%2015.4501%203.72112%2015.5233%203.77881%2015.5806C3.8365%2015.6379%203.91022%2015.6665%203.99996%2015.6665H11.9999C12.0896%2015.6665%2012.1633%2015.6379%2012.221%2015.5806C12.2787%2015.5233%2012.3076%2015.4501%2012.3076%2015.361V14.7499C12.3076%2014.3106%2012.1201%2013.9462%2011.7451%2013.6566C11.3701%2013.3669%2010.9422%2013.2221%2010.4614%2013.2221C10.0319%2013.2221%209.71945%2013.1043%209.52394%2012.8688C9.32843%2012.6333%209.23068%2012.3436%209.23068%2011.9999C9.23068%2011.6752%209.27715%2011.3904%209.3701%2011.1453C9.46305%2010.9002%209.63131%2010.6695%209.8749%2010.453C10.2146%2010.192%2010.5191%209.88967%2010.7884%209.54592C11.5127%209.51409%2012.2034%209.37246%2012.8604%209.12101C13.5175%208.86957%2014.072%208.55924%2014.5239%208.19003C14.9758%207.82082%2015.3348%207.40705%2015.6008%206.94872C15.8668%206.49039%2015.9998%206.03525%2015.9998%205.58329ZM6.76047%207.1798L8.05109%206.49997L9.3417%207.1798L9.09521%205.73989L10.1393%204.72015L8.69639%204.51007L8.05109%203.2L7.40578%204.51007L5.96283%204.72015L7.00696%205.73989L6.76047%207.1798Z'%20fill='%23F2C94C'/%3e%3c/g%3e%3c/svg%3e", ve = ({
162
155
  avatar: e,
163
156
  name: n,
164
- points: t,
165
- friendsRank: o,
166
- rank: r,
157
+ points: o,
158
+ friendsRank: i,
159
+ rank: a,
167
160
  streak: p,
168
- correct: d,
161
+ correct: c,
169
162
  incorrect: l,
170
- inTop: c,
171
- successRate: m
172
- }) => /* @__PURE__ */ a(os, { children: [
173
- /* @__PURE__ */ s(rs, { children: /* @__PURE__ */ a(ls, { children: [
174
- /* @__PURE__ */ a($s, { children: [
175
- e && /* @__PURE__ */ s(cs, { alt: "avatar", src: e }),
176
- !e && /* @__PURE__ */ s(gs, { children: Ae(n || "") })
163
+ inTop: d,
164
+ successRate: u
165
+ }) => /* @__PURE__ */ r(ss, { children: [
166
+ /* @__PURE__ */ s(ns, { children: /* @__PURE__ */ r(os, { children: [
167
+ /* @__PURE__ */ r(Cs, { children: [
168
+ e && /* @__PURE__ */ s(is, { alt: "avatar", src: e }),
169
+ !e && /* @__PURE__ */ s(vs, { children: pe(n || "") })
177
170
  ] }),
178
- /* @__PURE__ */ a(ds, { children: [
179
- /* @__PURE__ */ s(ps, { children: n }),
180
- /* @__PURE__ */ a(us, { children: [
181
- /* @__PURE__ */ a(hs, { children: [
182
- /* @__PURE__ */ s(ms, { alt: "rank-icon", src: bs }),
183
- /* @__PURE__ */ a(Is, { children: [
184
- ge(t),
185
- /* @__PURE__ */ s(vs, { children: "PTS" })
171
+ /* @__PURE__ */ r(as, { children: [
172
+ /* @__PURE__ */ s(rs, { children: n }),
173
+ /* @__PURE__ */ r(ls, { children: [
174
+ /* @__PURE__ */ r(ds, { children: [
175
+ /* @__PURE__ */ s(cs, { alt: "rank-icon", src: fs }),
176
+ /* @__PURE__ */ r(ps, { children: [
177
+ ue(o),
178
+ /* @__PURE__ */ s(us, { children: "PTS" })
186
179
  ] })
187
180
  ] }),
188
- /* @__PURE__ */ s(fs, {}),
189
- /* @__PURE__ */ a("div", { children: [
181
+ /* @__PURE__ */ s(ms, {}),
182
+ /* @__PURE__ */ r("div", { children: [
190
183
  "TOP ",
191
- c || 0,
184
+ d || 0,
192
185
  "%"
193
186
  ] })
194
187
  ] })
195
188
  ] })
196
189
  ] }) }),
197
- /* @__PURE__ */ a(as, { children: [
198
- /* @__PURE__ */ a(Cs, { children: [
199
- /* @__PURE__ */ s(ae, { indicator: o || 0, title: "Friends rank" }),
200
- /* @__PURE__ */ s(ae, { indicator: r || 0, title: "Global rank" })
190
+ /* @__PURE__ */ r(ts, { children: [
191
+ /* @__PURE__ */ r(hs, { children: [
192
+ /* @__PURE__ */ s(te, { indicator: i || 0, title: "Friends rank" }),
193
+ /* @__PURE__ */ s(te, { indicator: a || 0, title: "Global rank" })
201
194
  ] }),
202
- /* @__PURE__ */ a(As, { children: [
195
+ /* @__PURE__ */ r(Is, { children: [
203
196
  /* @__PURE__ */ s(W, { indicator: p || 0, title: "Win streak" }),
204
- /* @__PURE__ */ s(W, { indicator: d || 0, title: "Correct" }),
197
+ /* @__PURE__ */ s(W, { indicator: c || 0, title: "Correct" }),
205
198
  /* @__PURE__ */ s(W, { indicator: l || 0, title: "Incorrect" }),
206
- /* @__PURE__ */ s(W, { indicator: `${m || 0}%`, title: "Succ. rate" })
199
+ /* @__PURE__ */ s(W, { indicator: `${u || 0}%`, title: "Succ. rate" })
207
200
  ] })
208
201
  ] })
209
- ] }), ys = /* @__PURE__ */ i("div")({
202
+ ] }), As = /* @__PURE__ */ t("div")({
210
203
  name: "SponsorLogoWrap",
211
204
  class: "s8p5v5z",
212
205
  propsAsIs: !1
213
- }), ws = () => g, Rs = /* @__PURE__ */ i(ws())({
206
+ }), $s = () => A, gs = /* @__PURE__ */ t($s())({
214
207
  name: "SponsorLogo",
215
208
  class: "s755yti",
216
209
  propsAsIs: !0
217
- }), Ts = () => /* @__PURE__ */ s(ys, {
218
- children: /* @__PURE__ */ s(Rs, {
210
+ }), bs = () => /* @__PURE__ */ s(As, {
211
+ children: /* @__PURE__ */ s(gs, {
219
212
  name: "mastersLogo"
220
213
  })
221
- }), ks = /* @__PURE__ */ i("div")({
214
+ }), ys = /* @__PURE__ */ t("div")({
222
215
  name: "Container",
223
216
  class: "c38csyt",
224
217
  propsAsIs: !1
225
- }), Ss = /* @__PURE__ */ i("div")({
218
+ }), Rs = /* @__PURE__ */ t("div")({
226
219
  name: "Title",
227
220
  class: "ty221rx",
228
221
  propsAsIs: !1
229
- }), xs = /* @__PURE__ */ i("div")({
222
+ }), ws = /* @__PURE__ */ t("div")({
230
223
  name: "Description",
231
224
  class: "dlaj9xp",
232
225
  propsAsIs: !1
233
- }), qs = ({ title: e, description: n }) => /* @__PURE__ */ a(ks, { children: [
234
- /* @__PURE__ */ s(g, { name: "icon-check-circle" }),
235
- /* @__PURE__ */ s(Ss, { children: e }),
236
- /* @__PURE__ */ s(xs, { children: n })
237
- ] }), Es = /* @__PURE__ */ i("div")({
226
+ }), Ts = ({ title: e, description: n }) => /* @__PURE__ */ r(ys, { children: [
227
+ /* @__PURE__ */ s(A, { name: "icon-check-circle" }),
228
+ /* @__PURE__ */ s(Rs, { children: e }),
229
+ /* @__PURE__ */ s(ws, { children: n })
230
+ ] }), ks = /* @__PURE__ */ t("div")({
238
231
  name: "Container",
239
232
  class: "c16sbdnm",
240
233
  propsAsIs: !1
241
- }), Ns = () => g, Ds = /* @__PURE__ */ i(Ns())({
234
+ }), xs = () => A, Ss = /* @__PURE__ */ t(xs())({
242
235
  name: "IconPrediction",
243
236
  class: "ibhorgl",
244
237
  propsAsIs: !0
245
- }), j = /* @__PURE__ */ i("div")({
238
+ }), U = /* @__PURE__ */ t("div")({
246
239
  name: "FeedbackIconWrap",
247
240
  class: "f1g20ja7",
248
241
  propsAsIs: !1
249
- }), Z = /* @__PURE__ */ i("div")({
242
+ }), H = /* @__PURE__ */ t("div")({
250
243
  name: "FeedbackHeader",
251
244
  class: "f455ozj",
252
245
  propsAsIs: !1
253
- }), Ls = /* @__PURE__ */ i("span")({
246
+ }), qs = /* @__PURE__ */ t("span")({
254
247
  name: "FeedbackTitle",
255
248
  class: "f1913njx",
256
249
  propsAsIs: !1
257
- }), Q = /* @__PURE__ */ i("span")({
250
+ }), Q = /* @__PURE__ */ t("span")({
258
251
  name: "FeedbackDescription",
259
252
  class: "fzfk69z",
260
253
  propsAsIs: !1
261
- }), ee = /* @__PURE__ */ i("div")({
254
+ }), J = /* @__PURE__ */ t("div")({
262
255
  name: "FeedbackText",
263
256
  class: "fx87qaj",
264
257
  propsAsIs: !1
265
- }), Ps = ({
258
+ }), Es = ({
266
259
  feedbackMessages: e,
267
260
  questionVotedCorrectly: n,
268
- questionVoted: t,
269
- questionType: o,
270
- hasCorrectAnswer: r,
261
+ questionVoted: o,
262
+ questionType: i,
263
+ hasCorrectAnswer: a,
271
264
  questionStatus: p,
272
- showExpiredNotification: d,
265
+ showExpiredNotification: c,
273
266
  showClosedNotificationTrivia: l,
274
- votedInCurrentRender: c,
275
- votedAfterQuestionClosed: m,
276
- enteredAnActiveQuestion: u,
277
- marketClosed: f
267
+ votedInCurrentRender: d,
268
+ votedAfterQuestionClosed: u,
269
+ enteredAnActiveQuestion: h,
270
+ marketClosed: C
278
271
  }) => {
279
- const I = t && (o === h.TRIVIA || o === h.PREDICTION) && c && p !== L.RESOLVED, C = o === h.PREDICTION && !r, R = f && o === h.PREDICTION && !t && !u || o === h.PREDICTION && m && c && u, A = I && C, k = I && r, $ = o === h.PREDICTION && t && c && r, T = t && o === h.POLL && c;
280
- if (!d && !l && !A && !k && !R && !T && !$)
272
+ const I = o && (i === m.TRIVIA || i === m.PREDICTION) && d && p !== D.RESOLVED, f = i === m.PREDICTION && !a, w = C && i === m.PREDICTION && !o && !h || i === m.PREDICTION && u && d && h, g = I && f, T = I && a, b = i === m.PREDICTION && o && d && a, P = o && i === m.POLL && d;
273
+ if (!c && !l && !g && !T && !w && !P && !b)
281
274
  return null;
282
- const S = n ? "correct" : "incorrect", x = n ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
283
- return /* @__PURE__ */ a(Es, { "data-isPrediction": C, children: [
284
- d && /* @__PURE__ */ a(E, { children: [
285
- /* @__PURE__ */ s(j, { children: /* @__PURE__ */ s(g, { name: "questionExpired" }) }),
286
- /* @__PURE__ */ a("div", { children: [
287
- /* @__PURE__ */ s(Z, { children: /* @__PURE__ */ s(Q, { children: "Question Expired" }) }),
288
- /* @__PURE__ */ s(ee, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
275
+ const q = n ? "correct" : "incorrect", k = n ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
276
+ return /* @__PURE__ */ r(ks, { "data-isPrediction": f, children: [
277
+ c && /* @__PURE__ */ r(x, { children: [
278
+ /* @__PURE__ */ s(U, { children: /* @__PURE__ */ s(A, { name: "questionExpired" }) }),
279
+ /* @__PURE__ */ r("div", { children: [
280
+ /* @__PURE__ */ s(H, { children: /* @__PURE__ */ s(Q, { children: "Question Expired" }) }),
281
+ /* @__PURE__ */ s(J, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
289
282
  ] })
290
283
  ] }),
291
- l && /* @__PURE__ */ a(E, { children: [
292
- /* @__PURE__ */ s(j, { children: /* @__PURE__ */ s(g, { name: "questionExpired" }) }),
293
- /* @__PURE__ */ a("div", { children: [
294
- /* @__PURE__ */ s(Z, { children: /* @__PURE__ */ s(Q, { children: "Question Closed" }) }),
295
- /* @__PURE__ */ s(ee, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
284
+ l && /* @__PURE__ */ r(x, { children: [
285
+ /* @__PURE__ */ s(U, { children: /* @__PURE__ */ s(A, { name: "questionExpired" }) }),
286
+ /* @__PURE__ */ r("div", { children: [
287
+ /* @__PURE__ */ s(H, { children: /* @__PURE__ */ s(Q, { children: "Question Closed" }) }),
288
+ /* @__PURE__ */ s(J, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
296
289
  ] })
297
290
  ] }),
298
- R && /* @__PURE__ */ a(E, { children: [
299
- /* @__PURE__ */ s(j, { children: /* @__PURE__ */ s(g, { name: "questionExpired" }) }),
300
- /* @__PURE__ */ a("div", { children: [
301
- /* @__PURE__ */ s(Z, { children: /* @__PURE__ */ s(Q, { children: "Question Closed" }) }),
302
- /* @__PURE__ */ s(ee, { children: "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
291
+ w && /* @__PURE__ */ r(x, { children: [
292
+ /* @__PURE__ */ s(U, { children: /* @__PURE__ */ s(A, { name: "questionExpired" }) }),
293
+ /* @__PURE__ */ r("div", { children: [
294
+ /* @__PURE__ */ s(H, { children: /* @__PURE__ */ s(Q, { children: "Question Closed" }) }),
295
+ /* @__PURE__ */ s(J, { children: "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
303
296
  ] })
304
297
  ] }),
305
- A && /* @__PURE__ */ a(E, { children: [
306
- /* @__PURE__ */ s(Ds, { name: "icon-prediction" }),
298
+ g && /* @__PURE__ */ r(x, { children: [
299
+ /* @__PURE__ */ s(Ss, { name: "icon-prediction" }),
307
300
  /* @__PURE__ */ s(Q, { children: "Stay tuned to see if your prediction was correct." })
308
301
  ] }),
309
- T && /* @__PURE__ */ a(E, { children: [
310
- /* @__PURE__ */ s(j, { "data-feedback-type": "correct", children: /* @__PURE__ */ s(g, { name: "correct" }) }),
302
+ P && /* @__PURE__ */ r(x, { children: [
303
+ /* @__PURE__ */ s(U, { "data-feedback-type": "correct", children: /* @__PURE__ */ s(A, { name: "correct" }) }),
311
304
  /* @__PURE__ */ s(Q, { children: "That's for answering. Please stay tuned for the next question." })
312
305
  ] }),
313
- (k || $) && /* @__PURE__ */ a(E, { children: [
314
- /* @__PURE__ */ s(j, { "data-feedback-type": S, children: /* @__PURE__ */ s(g, { name: S }) }),
315
- /* @__PURE__ */ s("div", { children: /* @__PURE__ */ a(Z, { children: [
316
- /* @__PURE__ */ s(Ls, { "data-feedback-type": S, children: x == null ? void 0 : x.title }),
317
- /* @__PURE__ */ s(Q, { children: x == null ? void 0 : x.description })
306
+ (T || b) && /* @__PURE__ */ r(x, { children: [
307
+ /* @__PURE__ */ s(U, { "data-feedback-type": q, children: /* @__PURE__ */ s(A, { name: q }) }),
308
+ /* @__PURE__ */ s("div", { children: /* @__PURE__ */ r(H, { children: [
309
+ /* @__PURE__ */ s(qs, { "data-feedback-type": q, children: k == null ? void 0 : k.title }),
310
+ /* @__PURE__ */ s(Q, { children: k == null ? void 0 : k.description })
318
311
  ] }) })
319
312
  ] })
320
313
  ] });
321
- }, Vs = /* @__PURE__ */ i("div")({
314
+ }, Ns = /* @__PURE__ */ t("div")({
322
315
  name: "Container",
323
316
  class: "c14ielyq",
324
317
  propsAsIs: !1
325
- }), Os = () => Ne, Qs = /* @__PURE__ */ i(Os())({
318
+ }), Ds = () => Te, Ls = /* @__PURE__ */ t(Ds())({
326
319
  name: "QuestionScrollContainer",
327
320
  class: "q1tlqx57",
328
321
  propsAsIs: !0
329
- }), Ms = /* @__PURE__ */ i("div")({
322
+ }), Ps = /* @__PURE__ */ t("div")({
330
323
  name: "Content",
331
324
  class: "c1hq58md",
332
325
  propsAsIs: !1
333
- }), _s = /* @__PURE__ */ i("div")({
326
+ }), Vs = /* @__PURE__ */ t("div")({
334
327
  name: "Title",
335
328
  class: "t1c8nxcx",
336
329
  propsAsIs: !1
337
- }), Us = /* @__PURE__ */ i("div")({
330
+ }), Os = /* @__PURE__ */ t("div")({
338
331
  name: "Options",
339
332
  class: "oiozuc3",
340
333
  propsAsIs: !1
341
- }), js = /* @__PURE__ */ i("button")({
334
+ }), Qs = /* @__PURE__ */ t("button")({
342
335
  name: "ButtonContainer",
343
336
  class: "b1b6dl8t",
344
337
  propsAsIs: !1
345
- }), Bs = /* @__PURE__ */ i("div")({
338
+ }), Ms = /* @__PURE__ */ t("div")({
346
339
  name: "ButtonPct",
347
340
  class: "b4iik8i",
348
341
  propsAsIs: !1
349
- }), zs = /* @__PURE__ */ i("span")({
342
+ }), _s = /* @__PURE__ */ t("span")({
350
343
  name: "ButtonBody",
351
344
  class: "b1gq1lnf",
352
345
  propsAsIs: !1
353
- }), Fs = /* @__PURE__ */ i("div")({
346
+ }), js = /* @__PURE__ */ t("div")({
354
347
  name: "IconContainer",
355
348
  class: "i1j65z51",
356
349
  propsAsIs: !1
357
- }), Ws = /* @__PURE__ */ i("div")({
350
+ }), Us = /* @__PURE__ */ t("div")({
358
351
  name: "IconWrap",
359
352
  class: "i19tpfua",
360
353
  propsAsIs: !1
361
- }), be = /* @__PURE__ */ i("img")({
354
+ }), Ce = /* @__PURE__ */ t("img")({
362
355
  name: "Icon",
363
356
  class: "i1tubmma",
364
357
  propsAsIs: !1
365
- }), Zs = () => be, Hs = /* @__PURE__ */ i(Zs())({
358
+ }), Bs = () => Ce, zs = /* @__PURE__ */ t(Bs())({
366
359
  name: "IconDefault",
367
360
  class: "i1grrgwj",
368
361
  propsAsIs: !0
369
- }), Ys = () => be, Gs = /* @__PURE__ */ i(Ys())({
362
+ }), Fs = () => Ce, Ws = /* @__PURE__ */ t(Fs())({
370
363
  name: "IconCircle",
371
364
  class: "ibemyq8",
372
365
  propsAsIs: !0
373
- }), Ks = /* @__PURE__ */ i("span")({
366
+ }), Hs = /* @__PURE__ */ t("span")({
374
367
  name: "Title",
375
368
  class: "t1dceht",
376
369
  propsAsIs: !1
377
- }), Js = /* @__PURE__ */ i("span")({
370
+ }), Zs = /* @__PURE__ */ t("span")({
378
371
  name: "Indicators",
379
372
  class: "i116q4vq",
380
373
  propsAsIs: !1
381
- }), Xs = /* @__PURE__ */ i("span")({
374
+ }), Ys = /* @__PURE__ */ t("span")({
382
375
  name: "Pts",
383
376
  class: "p17ajcu2",
384
377
  propsAsIs: !1
385
- }), en = /* @__PURE__ */ i("span")({
378
+ }), Gs = /* @__PURE__ */ t("span")({
386
379
  name: "Percentage",
387
380
  class: "pu9kmlb",
388
381
  propsAsIs: !1
389
- }), sn = () => g, nn = /* @__PURE__ */ i(sn())({
382
+ }), Ks = () => A, Xs = /* @__PURE__ */ t(Ks())({
390
383
  name: "CheckIcon",
391
384
  class: "c1j2j0s0",
392
385
  propsAsIs: !0
393
- }), le = {
394
- [U.CENTERED]: (e) => /* @__PURE__ */ s(Hs, { alt: "option-icon", src: e }),
395
- [U.TRANSPARENT]: (e) => /* @__PURE__ */ s(Fs, { children: /* @__PURE__ */ s(Ws, { style: { backgroundImage: `url(${e})` } }) }),
396
- [U.ROUNDED]: (e) => /* @__PURE__ */ s(Gs, { alt: "option-icon", src: e }),
397
- [U.NONE]: () => null,
398
- [U.UNSET]: () => null
399
- }, tn = ({ questionType: e, hasCorrectAnswer: n, correct: t, youVoted: o, questionVoted: r }) => {
400
- if (e === h.POLL && o)
386
+ }), oe = {
387
+ [j.CENTERED]: (e) => /* @__PURE__ */ s(zs, { alt: "option-icon", src: e }),
388
+ [j.TRANSPARENT]: (e) => /* @__PURE__ */ s(js, { children: /* @__PURE__ */ s(Us, { style: { backgroundImage: `url(${e})` } }) }),
389
+ [j.ROUNDED]: (e) => /* @__PURE__ */ s(Ws, { alt: "option-icon", src: e }),
390
+ [j.NONE]: () => null,
391
+ [j.UNSET]: () => null
392
+ }, Js = ({ questionType: e, hasCorrectAnswer: n, correct: o, youVoted: i, questionVoted: a }) => {
393
+ if (e === m.POLL && i)
401
394
  return "correct";
402
- if (e === h.PREDICTION) {
403
- if (n && r)
404
- return o ? t ? "correct" : "incorrect" : "unset";
405
- if (o)
395
+ if (e === m.PREDICTION) {
396
+ if (n && a)
397
+ return i ? o ? "correct" : "incorrect" : "unset";
398
+ if (i)
406
399
  return "correct";
407
400
  }
408
- return e === h.TRIVIA && r && o ? t ? "correct" : "incorrect" : "unset";
409
- }, on = ({
401
+ return e === m.TRIVIA && a && i ? o ? "correct" : "incorrect" : "unset";
402
+ }, en = ({
410
403
  questionType: e,
411
404
  questionVoted: n,
412
- correct: t,
413
- hasCorrectAnswer: o,
414
- questionStatus: r
415
- }) => e === h.TRIVIA ? n && t : e === h.PREDICTION ? n && t && o || r === L.RESOLVED && t : !1, rn = (e) => {
405
+ correct: o,
406
+ hasCorrectAnswer: i,
407
+ questionStatus: a
408
+ }) => e === m.TRIVIA ? n && o : e === m.PREDICTION ? n && o && i || a === D.RESOLVED && o : !1, sn = (e) => {
416
409
  var n;
417
410
  const {
418
411
  // option props
419
- id: t,
420
- icon: o,
421
- text: r,
412
+ id: o,
413
+ icon: i,
414
+ text: a,
422
415
  percentageDecimal: p,
423
- points: d,
416
+ points: c,
424
417
  // extra props
425
418
  onVote: l,
426
- markThatVoted: c,
427
- youSelected: m,
428
- questionVoted: u,
429
- imageMode: f,
419
+ markThatVoted: d,
420
+ youSelected: u,
421
+ questionVoted: h,
422
+ imageMode: C,
430
423
  answerTimeExpired: I,
431
- questionStatus: C,
432
- isLoading: R,
433
- questionType: A,
434
- correct: k,
435
- hasCorrectAnswer: $,
436
- votedAfterQuestionClosed: T,
437
- enteredAnActiveQuestion: S,
438
- marketClosed: x
439
- } = e, [M, z] = N(p), V = tn(e), K = on({ questionType: A, questionVoted: u, correct: k, hasCorrectAnswer: $, questionStatus: C }), v = x && A === h.PREDICTION, b = u || v, y = A === h.PREDICTION && !u && !x, J = u && !m && V !== "incorrect";
440
- return Se(() => {
424
+ questionStatus: f,
425
+ isLoading: w,
426
+ questionType: g,
427
+ correct: T,
428
+ hasCorrectAnswer: b,
429
+ votedAfterQuestionClosed: P,
430
+ enteredAnActiveQuestion: q,
431
+ marketClosed: k
432
+ } = e, [M, z] = E(p), V = Js(e), G = en({ questionType: g, questionVoted: h, correct: T, hasCorrectAnswer: b, questionStatus: f }), v = k && g === m.PREDICTION, $ = h || v, y = g === m.PREDICTION && !h && !k, K = h && !u && V !== "incorrect";
433
+ return ye(() => {
441
434
  p > 0 && (z(0), requestAnimationFrame(() => {
442
435
  z(p);
443
436
  }));
444
- }, [p]), /* @__PURE__ */ a(
445
- js,
437
+ }, [p]), /* @__PURE__ */ r(
438
+ Qs,
446
439
  {
447
- value: t,
448
- "data-selected": m,
440
+ value: o,
441
+ "data-selected": u,
449
442
  "data-answer-state": V,
450
- disabled: u || R || I || v && !S || v && S && T,
451
- "data-is-not-checked": J,
443
+ disabled: h || w || I || v && !q || v && q && P,
444
+ "data-is-not-checked": K,
452
445
  onClick: (X) => {
453
- c(
454
- A === h.PREDICTION ? x : C === L.RESOLVED
446
+ d(
447
+ g === m.PREDICTION ? k : f === D.RESOLVED
455
448
  ), l(X);
456
449
  },
457
450
  children: [
458
- /* @__PURE__ */ s(Bs, { "data-answer-state": V, style: { width: `${b ? M : 0}%` } }),
459
- /* @__PURE__ */ a(zs, { children: [
460
- o && f && ((n = le[f]) == null ? void 0 : n.call(le, o)),
461
- /* @__PURE__ */ s(Ks, { children: r }),
462
- y && /* @__PURE__ */ a("div", { children: [
463
- d,
464
- /* @__PURE__ */ s(Xs, { children: "pts" })
451
+ /* @__PURE__ */ s(Ms, { "data-answer-state": V, style: { width: `${$ ? M : 0}%` } }),
452
+ /* @__PURE__ */ r(_s, { children: [
453
+ i && C && ((n = oe[C]) == null ? void 0 : n.call(oe, i)),
454
+ /* @__PURE__ */ s(Hs, { children: a }),
455
+ y && /* @__PURE__ */ r("div", { children: [
456
+ c,
457
+ /* @__PURE__ */ s(Ys, { children: "pts" })
465
458
  ] }),
466
- b && /* @__PURE__ */ a(Js, { children: [
467
- K && /* @__PURE__ */ s(nn, { name: "selected" }),
468
- /* @__PURE__ */ s(en, { children: /* @__PURE__ */ s(me, { value: p, suffix: "%" }) })
459
+ $ && /* @__PURE__ */ r(Zs, { children: [
460
+ G && /* @__PURE__ */ s(Xs, { name: "selected" }),
461
+ /* @__PURE__ */ s(Gs, { children: /* @__PURE__ */ s(ce, { value: p, suffix: "%" }) })
469
462
  ] })
470
463
  ] })
471
464
  ]
472
465
  }
473
466
  );
474
- }, an = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRAY3], ln = [10, 10, 1, 0], cn = /* @__PURE__ */ i("div")({
467
+ }, nn = [L.PRIMARY_GREEN1, L.SECONDARY_RED1, L.SECONDARY_RED1, L.NEUTRALS_GRAY3], tn = [10, 10, 1, 0], on = /* @__PURE__ */ t("div")({
475
468
  name: "RemainingTime",
476
469
  class: "r165427",
477
470
  propsAsIs: !1
478
- }), dn = P.SECONDARY_GREEN6, ce = P.SECONDARY_RED3, pn = P.NEUTRALS_GRAY3, un = ({
471
+ }), an = L.SECONDARY_GREEN6, ie = L.SECONDARY_RED3, rn = L.NEUTRALS_GRAY3, ln = ({
479
472
  isPlaying: e = !0,
480
473
  duration: n = 30,
481
- onTimerExpired: t
474
+ onTimerExpired: o
482
475
  }) => {
483
- const [o, r] = N(n > 10 ? dn : ce), p = ({
484
- remainingTime: c
485
- }) => /* @__PURE__ */ s(cn, {
486
- children: c
487
- }), d = B(() => {
488
- t == null || t(), r(pn);
489
- }, [t, r]), l = B((c) => {
490
- c === 10 && r(ce);
491
- }, [r]);
492
- return /* @__PURE__ */ s(Be, {
476
+ const [i, a] = E(n > 10 ? an : ie), p = ({
477
+ remainingTime: d
478
+ }) => /* @__PURE__ */ s(on, {
479
+ children: d
480
+ }), c = B(() => {
481
+ o == null || o(), a(rn);
482
+ }, [o, a]), l = B((d) => {
483
+ d === 10 && a(ie);
484
+ }, [a]);
485
+ return /* @__PURE__ */ s(Me, {
493
486
  isPlaying: e,
494
487
  duration: n,
495
- colors: an,
496
- colorsTime: ln,
488
+ colors: nn,
489
+ colorsTime: tn,
497
490
  size: 32,
498
491
  strokeWidth: 2,
499
492
  trailStrokeWidth: 2,
500
- trailColor: o,
501
- onComplete: d,
493
+ trailColor: i,
494
+ onComplete: c,
502
495
  onUpdate: l,
503
496
  children: p
504
497
  });
505
- }, mn = /* @__PURE__ */ i("div")({
498
+ }, cn = /* @__PURE__ */ t("div")({
506
499
  name: "WinBarContainer",
507
500
  class: "wie6cqo",
508
501
  propsAsIs: !1
509
- }), hn = /* @__PURE__ */ i("div")({
502
+ }), dn = /* @__PURE__ */ t("div")({
510
503
  name: "Content",
511
504
  class: "cgizw4u",
512
505
  propsAsIs: !1
513
- }), In = /* @__PURE__ */ i("div")({
506
+ }), pn = /* @__PURE__ */ t("div")({
514
507
  name: "Title",
515
508
  class: "t1l3ucjp",
516
509
  propsAsIs: !1
517
- }), vn = () => g, fn = /* @__PURE__ */ i(vn())({
510
+ }), un = () => A, mn = /* @__PURE__ */ t(un())({
518
511
  name: "WinIcon",
519
512
  class: "wx7j799",
520
513
  propsAsIs: !0
521
- }), Cn = /* @__PURE__ */ i("div")({
514
+ }), hn = /* @__PURE__ */ t("div")({
522
515
  name: "Points",
523
516
  class: "p4lwuj0",
524
517
  propsAsIs: !1
525
- }), An = /* @__PURE__ */ i("span")({
518
+ }), In = /* @__PURE__ */ t("span")({
526
519
  name: "PointsCount",
527
520
  class: "po9i64o",
528
521
  propsAsIs: !1
529
- }), gn = /* @__PURE__ */ i("span")({
522
+ }), vn = /* @__PURE__ */ t("span")({
530
523
  name: "PointsUnits",
531
524
  class: "pe5g05h",
532
525
  propsAsIs: !1
533
- }), $n = ({
526
+ }), Cn = ({
534
527
  title: e,
535
528
  points: n,
536
- isPlayingTimer: t,
537
- isTimer: o,
538
- animatePoints: r,
529
+ isPlayingTimer: o,
530
+ isTimer: i,
531
+ animatePoints: a,
539
532
  questionType: p,
540
- timerDuration: d,
533
+ timerDuration: c,
541
534
  onTimerExpired: l
542
- }) => /* @__PURE__ */ a(mn, { style: { justifyContent: p === h.PREDICTION ? "center" : "space-between" }, children: [
543
- /* @__PURE__ */ a(hn, { children: [
544
- e && /* @__PURE__ */ s(In, { children: e }),
545
- n !== void 0 && p !== h.POLL && /* @__PURE__ */ a(E, { children: [
546
- /* @__PURE__ */ s(fn, { name: "icon-trophy" }),
547
- /* @__PURE__ */ a(Cn, { children: [
548
- /* @__PURE__ */ s(An, { children: r ? /* @__PURE__ */ s(me, { value: n, delay: 0.3 }) : n }),
549
- /* @__PURE__ */ s(gn, { children: "PTS" })
535
+ }) => /* @__PURE__ */ r(cn, { style: { justifyContent: p === m.PREDICTION ? "center" : "space-between" }, children: [
536
+ /* @__PURE__ */ r(dn, { children: [
537
+ e && /* @__PURE__ */ s(pn, { children: e }),
538
+ n !== void 0 && p !== m.POLL && /* @__PURE__ */ r(x, { children: [
539
+ /* @__PURE__ */ s(mn, { name: "icon-trophy" }),
540
+ /* @__PURE__ */ r(hn, { children: [
541
+ /* @__PURE__ */ s(In, { children: a ? /* @__PURE__ */ s(ce, { value: n, delay: 0.3 }) : n }),
542
+ /* @__PURE__ */ s(vn, { children: "PTS" })
550
543
  ] })
551
544
  ] })
552
545
  ] }),
553
- o && p !== h.PREDICTION && /* @__PURE__ */ s(un, { isPlaying: t, onTimerExpired: l, duration: d })
554
- ] }), bn = ({ openedQuestion: e, isLoading: n, vote: t, close: o }) => {
555
- var r, p;
556
- const d = e.subject, l = e.type, c = e.status, m = (r = e.options) == null ? void 0 : r.options, u = e.marketClosed, [f, I] = N(!1), [C, R] = N(!1), [A, k] = N(!0), [$, T] = N(!1), [S, x] = N(""), M = e == null ? void 0 : e.id;
557
- G(() => {
558
- l === h.PREDICTION ? u && k(!1) : c === L.RESOLVED && k(!1);
546
+ i && p !== m.PREDICTION && /* @__PURE__ */ s(ln, { isPlaying: o, onTimerExpired: l, duration: c })
547
+ ] }), fn = ({ openedQuestion: e, isLoading: n, vote: o, close: i }) => {
548
+ var a, p;
549
+ const c = e.subject, l = e.type, d = e.status, u = (a = e.options) == null ? void 0 : a.options, h = e.marketClosed, [C, I] = E(!1), [f, w] = E(!1), [g, T] = E(!0), [b, P] = E(!1), [q, k] = E(""), M = e == null ? void 0 : e.id;
550
+ ee(() => {
551
+ l === m.PREDICTION ? h && T(!1) : d === D.RESOLVED && T(!1);
559
552
  }, []);
560
- const z = B((w) => {
561
- R(w), I(!0);
553
+ const z = B((R) => {
554
+ w(R), I(!0);
562
555
  }, []), V = B(
563
- async (w) => {
556
+ async (R) => {
564
557
  if (M) {
565
- const _ = w.currentTarget.value;
566
- x(_), await t(M, _);
558
+ const _ = R.currentTarget.value;
559
+ k(_), await o(M, _);
567
560
  }
568
561
  },
569
- [M, x, t]
570
- ), K = B(() => {
571
- T(!0), setTimeout(o, 3e3);
572
- }, [o]), v = q(
573
- () => e == null ? void 0 : e.answers.find((w) => w.youVoted === !0),
562
+ [M, k, o]
563
+ ), G = B(() => {
564
+ P(!0), setTimeout(i, 3e3);
565
+ }, [i]), v = N(
566
+ () => e == null ? void 0 : e.answers.find((R) => R.youVoted === !0),
574
567
  [e]
575
- ), b = q(
576
- () => !!(e != null && e.answers.find((w) => w.correct === !0)),
568
+ ), $ = N(
569
+ () => !!(e != null && e.answers.find((R) => R.correct === !0)),
577
570
  [e]
578
- ), y = q(
579
- () => e == null ? void 0 : e.answers.find((w) => w.correct === !0),
571
+ ), y = N(
572
+ () => e == null ? void 0 : e.answers.find((R) => R.correct === !0),
580
573
  [e]
581
- ), J = q(() => e ? e.answers.map((w) => {
574
+ ), K = N(() => e ? e.answers.map((R) => {
582
575
  var _;
583
576
  return {
584
- ...w,
577
+ ...R,
585
578
  questionVoted: !!v,
586
- youSelected: S === w.id,
579
+ youSelected: q === R.id,
587
580
  isLoading: n,
588
- hasCorrectAnswer: b,
581
+ hasCorrectAnswer: $,
589
582
  questionType: e.type,
590
- answerTimeExpired: $,
591
- questionStatus: c,
583
+ answerTimeExpired: b,
584
+ questionStatus: d,
592
585
  imageMode: (_ = e.appearance) == null ? void 0 : _.images,
593
586
  onVote: V
594
587
  };
595
588
  }) : [], [
596
- b,
597
589
  $,
590
+ b,
598
591
  n,
599
592
  e,
600
593
  v,
601
- c,
594
+ d,
602
595
  V,
603
- S
604
- ]), X = m && (m.case === "trivia" || m.case === "prediction") ? m.value : void 0, O = c === L.RESOLVED && l === h.TRIVIA && !v && !A, ie = l === h.TRIVIA && C && f && A, oe = q(() => l === h.PREDICTION ? !!(v && !b || v && b && y != null && y.youVoted) : !0, [l, v, b, y]), we = q(() => {
605
- if (l === h.PREDICTION && v && (!b || b && y != null && y.youVoted))
596
+ q
597
+ ]), X = u && (u.case === "trivia" || u.case === "prediction") ? u.value : void 0, O = d === D.RESOLVED && l === m.TRIVIA && !v && !g, se = l === m.TRIVIA && f && C && g, ne = N(() => l === m.PREDICTION ? !!(v && !$ || v && $ && y != null && y.youVoted) : !0, [l, v, $, y]), Ae = N(() => {
598
+ if (l === m.PREDICTION && v && (!$ || $ && y != null && y.youVoted))
606
599
  return v.points;
607
- if (!(O || $))
608
- return c === L.RESOLVED ? 0 : v ? v.correct ? v.points : 0 : y == null ? void 0 : y.points;
600
+ if (!(O || b))
601
+ return d === D.RESOLVED ? 0 : v ? v.correct ? v.points : 0 : y == null ? void 0 : y.points;
609
602
  }, [
610
- $,
603
+ b,
611
604
  v,
612
605
  y,
613
- c,
606
+ d,
614
607
  O,
615
608
  l,
616
- b
617
- ]), Re = q(() => l === h.PREDICTION && v ? b ? b && y != null && y.youVoted ? "You won" : "" : "To win" : O || $ ? "Time expired" : l === h.POLL ? "Time remaining" : v ? "You won" : "To win", [$, l, v, O, b, y]), Te = (l === h.TRIVIA || l === h.PREDICTION) && v && b && (y == null ? void 0 : y.youVoted), ke = v || O || ie || l === h.TRIVIA && c === L.RESOLVED && A;
618
- return /* @__PURE__ */ s(Qs, { children: /* @__PURE__ */ s(Vs, { children: /* @__PURE__ */ a(Ms, { children: [
609
+ $
610
+ ]), $e = N(() => l === m.PREDICTION && v ? $ ? $ && y != null && y.youVoted ? "You won" : "" : "To win" : O || b ? "Time expired" : l === m.POLL ? "Time remaining" : v ? "You won" : "To win", [b, l, v, O, $, y]), ge = (l === m.TRIVIA || l === m.PREDICTION) && v && $ && (y == null ? void 0 : y.youVoted), be = v || O || se || l === m.TRIVIA && d === D.RESOLVED && g;
611
+ return /* @__PURE__ */ s(Ls, { children: /* @__PURE__ */ s(Ns, { children: /* @__PURE__ */ r(Ps, { children: [
619
612
  /* @__PURE__ */ s(
620
- Ps,
613
+ Es,
621
614
  {
622
615
  feedbackMessages: X,
623
616
  questionVoted: !!v,
624
617
  questionVotedCorrectly: v == null ? void 0 : v.correct,
625
618
  questionType: l,
626
- hasCorrectAnswer: b,
627
- questionStatus: c,
619
+ hasCorrectAnswer: $,
620
+ questionStatus: d,
628
621
  showExpiredNotification: O,
629
- showClosedNotificationTrivia: ie,
630
- votedInCurrentRender: f,
631
- votedAfterQuestionClosed: C,
632
- enteredAnActiveQuestion: A,
633
- marketClosed: u
622
+ showClosedNotificationTrivia: se,
623
+ votedInCurrentRender: C,
624
+ votedAfterQuestionClosed: f,
625
+ enteredAnActiveQuestion: g,
626
+ marketClosed: h
634
627
  }
635
628
  ),
636
- oe && /* @__PURE__ */ s(
637
- $n,
629
+ ne && /* @__PURE__ */ s(
630
+ Cn,
638
631
  {
639
- title: Re,
640
- points: we,
641
- onTimerExpired: K,
632
+ title: $e,
633
+ points: Ae,
634
+ onTimerExpired: G,
642
635
  questionType: e.type,
643
636
  isTimer: !n,
644
637
  isPlayingTimer: !v,
645
- animatePoints: Te,
646
- timerDuration: ke ? 0 : Number(((p = e == null ? void 0 : e.appearance) == null ? void 0 : p.autoHideInterval) || "30")
638
+ animatePoints: ge,
639
+ timerDuration: be ? 0 : Number(((p = e == null ? void 0 : e.appearance) == null ? void 0 : p.autoHideInterval) || "30")
647
640
  }
648
641
  ),
649
- $ ? /* @__PURE__ */ s(
650
- qs,
642
+ b ? /* @__PURE__ */ s(
643
+ Ts,
651
644
  {
652
645
  title: "More to come...",
653
646
  description: "Watch for additional enhanced stream interactive experience."
654
647
  }
655
- ) : /* @__PURE__ */ a(E, { children: [
656
- /* @__PURE__ */ s(_s, { style: oe ? {} : { marginTop: 0 }, children: d }),
657
- /* @__PURE__ */ s(Us, { children: J.map((w) => /* @__PURE__ */ s(
658
- rn,
648
+ ) : /* @__PURE__ */ r(x, { children: [
649
+ /* @__PURE__ */ s(Vs, { style: ne ? {} : { marginTop: 0 }, children: c }),
650
+ /* @__PURE__ */ s(Os, { children: K.map((R) => /* @__PURE__ */ s(
651
+ sn,
659
652
  {
660
- ...w,
653
+ ...R,
661
654
  markThatVoted: z,
662
- votedAfterQuestionClosed: C,
663
- enteredAnActiveQuestion: A,
664
- marketClosed: u
655
+ votedAfterQuestionClosed: f,
656
+ enteredAnActiveQuestion: g,
657
+ marketClosed: h
665
658
  },
666
- w.id
659
+ R.id
667
660
  )) })
668
661
  ] })
669
662
  ] }) }) });
670
- }, yn = /* @__PURE__ */ i("div")({
663
+ }, An = /* @__PURE__ */ t("div")({
671
664
  name: "Container",
672
665
  class: "cgn5uen",
673
666
  propsAsIs: !1
674
- }), wn = /* @__PURE__ */ i("div")({
667
+ }), $n = /* @__PURE__ */ t("div")({
675
668
  name: "Content",
676
669
  class: "c1px8nt6",
677
670
  propsAsIs: !1
678
- }), Rn = /* @__PURE__ */ i("h3")({
671
+ }), gn = /* @__PURE__ */ t("h3")({
679
672
  name: "Title",
680
673
  class: "t5et2jt",
681
674
  propsAsIs: !1
682
- }), Tn = /* @__PURE__ */ i("div")({
675
+ }), bn = /* @__PURE__ */ t("div")({
683
676
  name: "Description",
684
677
  class: "d1i2kpk2",
685
678
  propsAsIs: !1
686
- }), kn = /* @__PURE__ */ i("div")({
687
- name: "DateWrap",
688
- class: "dd3lh3p",
689
- propsAsIs: !1
690
- }), Sn = /* @__PURE__ */ i("img")({
679
+ }), yn = /* @__PURE__ */ t("img")({
691
680
  name: "Image",
692
- class: "i1gfjeu5",
693
- propsAsIs: !1
694
- }), ye = ({ created: e, instantView: n, isDetail: t, notification: o }) => {
695
- const r = q(() => {
696
- if (e) {
697
- const u = new Date(e);
698
- if (te(u))
699
- return {
700
- date: se(u),
701
- time: ne(u)
702
- };
703
- }
704
- return null;
705
- }, [e]), p = n == null ? void 0 : n.heading, d = n == null ? void 0 : n.body, l = p || d, c = o == null ? void 0 : o.title, m = o == null ? void 0 : o.body;
706
- return /* @__PURE__ */ a(yn, { children: [
707
- r && /* @__PURE__ */ a(kn, { children: [
708
- r.date,
709
- " · ",
710
- r.time
711
- ] }),
712
- (n == null ? void 0 : n.video) && /* @__PURE__ */ s(De, { source: n.video.url, poster: n.video.thumbnailUrl }),
713
- (n == null ? void 0 : n.image) && !(n != null && n.video) && /* @__PURE__ */ s(Sn, { src: n == null ? void 0 : n.image }),
714
- /* @__PURE__ */ a(wn, { children: [
715
- /* @__PURE__ */ s(Rn, { children: t && l ? p : c }),
716
- /* @__PURE__ */ s(Tn, { children: t && l ? d : m })
681
+ class: "id3lh3p",
682
+ propsAsIs: !1
683
+ }), fe = ({ instantView: e, isDetail: n, notification: o }) => {
684
+ const i = e == null ? void 0 : e.heading, a = e == null ? void 0 : e.body, p = i || a, c = o == null ? void 0 : o.title, l = o == null ? void 0 : o.body;
685
+ return /* @__PURE__ */ r(An, { children: [
686
+ (e == null ? void 0 : e.video) && /* @__PURE__ */ s(ke, { source: e.video.url, poster: e.video.thumbnailUrl }),
687
+ (e == null ? void 0 : e.image) && !(e != null && e.video) && /* @__PURE__ */ s(yn, { src: e == null ? void 0 : e.image }),
688
+ /* @__PURE__ */ r($n, { children: [
689
+ /* @__PURE__ */ s(gn, { children: n && p ? i : c }),
690
+ /* @__PURE__ */ s(bn, { children: n && p ? a : l })
717
691
  ] })
718
692
  ] });
719
- }, xn = /* @__PURE__ */ i("div")({
693
+ }, Rn = /* @__PURE__ */ t("div")({
720
694
  name: "Container",
721
695
  class: "c1euiow",
722
696
  propsAsIs: !1
723
- }), qn = /* @__PURE__ */ i("a")({
697
+ }), wn = /* @__PURE__ */ t("a")({
724
698
  name: "WebLinkBtn",
725
699
  class: "w19zie3h",
726
700
  propsAsIs: !1
727
- }), En = ({ instantView: e, ...n }) => /* @__PURE__ */ a(xn, { children: [
728
- /* @__PURE__ */ s(ye, { instantView: e, ...n, isDetail: !0 }),
729
- (e == null ? void 0 : e.webLink) && /* @__PURE__ */ a(qn, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
701
+ }), Tn = ({ instantView: e, ...n }) => /* @__PURE__ */ r(Rn, { children: [
702
+ /* @__PURE__ */ s(fe, { instantView: e, ...n, isDetail: !0 }),
703
+ (e == null ? void 0 : e.webLink) && /* @__PURE__ */ r(wn, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
730
704
  e == null ? void 0 : e.webLink.label,
731
- /* @__PURE__ */ s(g, { name: "icon-external-link" })
705
+ /* @__PURE__ */ s(A, { name: "icon-external-link" })
732
706
  ] })
733
- ] }), Nn = /* @__PURE__ */ i("div")({
707
+ ] }), kn = /* @__PURE__ */ t("div")({
734
708
  name: "Container",
735
709
  class: "c1dcxmvf",
736
710
  propsAsIs: !1
737
- }), Dn = /* @__PURE__ */ i("div")({
738
- name: "DateTime",
739
- class: "db4q22c",
740
- propsAsIs: !1
741
- }), Ln = /* @__PURE__ */ i("blockquote")({
711
+ }), xn = /* @__PURE__ */ t("blockquote")({
742
712
  name: "Quote",
743
- class: "q111mmic",
744
- propsAsIs: !1
745
- }), Pn = ({ created: e, ...n }) => {
746
- const t = q(() => {
747
- if (e) {
748
- const o = new Date(e);
749
- if (te(o))
750
- return {
751
- date: se(o),
752
- time: ne(o)
753
- };
754
- }
755
- return null;
756
- }, [e]);
757
- return /* @__PURE__ */ a(Nn, { children: [
758
- t && /* @__PURE__ */ a(Dn, { children: [
759
- t.date,
760
- " · ",
761
- t.time
762
- ] }),
763
- n.title && /* @__PURE__ */ s(Ln, { children: n.title }),
764
- /* @__PURE__ */ s(Ie, { ...n })
765
- ] });
766
- }, Vn = /* @__PURE__ */ i("div")({
713
+ class: "qb4q22c",
714
+ propsAsIs: !1
715
+ }), Sn = (e) => /* @__PURE__ */ r(kn, { children: [
716
+ e.title && /* @__PURE__ */ s(xn, { children: e.title }),
717
+ /* @__PURE__ */ s(me, { ...e, isDetail: !0 })
718
+ ] }), qn = /* @__PURE__ */ t("div")({
767
719
  name: "QuestionContainer",
768
720
  class: "qdri6g3",
769
721
  propsAsIs: !1
770
- }), On = ({
722
+ }), En = ({
771
723
  openedQuestion: e
772
724
  }) => {
773
- var n, t;
774
- return ((n = e == null ? void 0 : e.attributes) == null ? void 0 : n.attributes.case) === "insight" ? /* @__PURE__ */ s(En, {
775
- created: e.attributes.created,
725
+ var n, o;
726
+ return ((n = e == null ? void 0 : e.attributes) == null ? void 0 : n.attributes.case) === "insight" ? /* @__PURE__ */ s(Tn, {
776
727
  ...e.attributes.attributes.value
777
- }) : ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "tweet" ? /* @__PURE__ */ s(Pn, {
778
- created: e.attributes.created,
728
+ }) : ((o = e == null ? void 0 : e.attributes) == null ? void 0 : o.attributes.case) === "tweet" ? /* @__PURE__ */ s(Sn, {
779
729
  ...e.attributes.attributes.value
780
730
  }) : null;
781
- }, Qn = ({
731
+ }, Nn = ({
782
732
  extendedQuestion: e,
783
733
  vote: n,
784
- close: t
734
+ close: o
785
735
  }) => {
786
736
  const {
787
- loading: o,
788
- data: r
737
+ loading: i,
738
+ data: a
789
739
  } = e;
790
- return r ? /* @__PURE__ */ s(bn, {
740
+ return a ? /* @__PURE__ */ s(fn, {
791
741
  vote: n,
792
- close: t,
793
- openedQuestion: r,
794
- isLoading: !!o
742
+ close: o,
743
+ openedQuestion: a,
744
+ isLoading: !!i
795
745
  }) : null;
796
- }, Mn = ({
746
+ }, Dn = ({
797
747
  gamification: e
798
748
  }) => {
799
749
  var n;
800
- const t = D(e.openedQuestion.$store), o = D(e.openedQuestion.$extendedStore);
801
- if (!t)
750
+ const o = S(e.openedQuestion.$store), i = S(e.openedQuestion.$extendedStore);
751
+ if (!o)
802
752
  return null;
803
- const r = t.type;
804
- return /* @__PURE__ */ a(Vn, {
805
- children: [/* @__PURE__ */ s(Ce, {
753
+ const a = o.type;
754
+ return /* @__PURE__ */ r(qn, {
755
+ children: [/* @__PURE__ */ s(Ie, {
806
756
  close: e.closeQuestion,
807
- type: ((n = t.attributes) == null ? void 0 : n.type) || h.UNSET
808
- }), r === "question" && /* @__PURE__ */ s(Qn, {
757
+ type: ((n = o.attributes) == null ? void 0 : n.type) || m.UNSET
758
+ }), a === "question" && /* @__PURE__ */ s(Nn, {
809
759
  vote: e.submitAnswer,
810
760
  close: e.closeQuestion,
811
- extendedQuestion: o
812
- }), r !== "question" && /* @__PURE__ */ s(On, {
813
- openedQuestion: t
814
- }), /* @__PURE__ */ s(Ts, {
761
+ extendedQuestion: i
762
+ }), a !== "question" && /* @__PURE__ */ s(En, {
763
+ openedQuestion: o
764
+ }), /* @__PURE__ */ s(bs, {
815
765
  sponsorLogo: ""
816
766
  })]
817
767
  });
818
- }, _n = /* @__PURE__ */ i("div")({
768
+ }, Ln = /* @__PURE__ */ t("div")({
819
769
  name: "Container",
820
770
  class: "c115qtkr",
821
771
  propsAsIs: !1
822
- }), Un = /* @__PURE__ */ i("div")({
772
+ }), Pn = /* @__PURE__ */ t("div")({
823
773
  name: "STabs",
824
774
  class: "sxnslc8",
825
775
  propsAsIs: !1
826
- }), jn = /* @__PURE__ */ i("button")({
776
+ }), Vn = /* @__PURE__ */ t("button")({
827
777
  name: "Button",
828
778
  class: "b1umzux0",
829
779
  propsAsIs: !1
830
- }), Bn = /* @__PURE__ */ i("span")({
780
+ }), On = /* @__PURE__ */ t("span")({
831
781
  name: "Title",
832
782
  class: "tspsaas",
833
783
  propsAsIs: !1
834
784
  });
835
785
  var Y = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(Y || {});
836
- const de = ({ title: e, active: n, onClick: t }) => /* @__PURE__ */ s(jn, { onClick: t, "data-selected": n, children: /* @__PURE__ */ s(Bn, { children: e }) }), zn = ({ activePage: e = "home", toggleActivePage: n }) => /* @__PURE__ */ s(_n, { children: /* @__PURE__ */ a(Un, { "data-position": e === "home" ? "left" : "right", children: [
837
- /* @__PURE__ */ s(de, { title: "Home", active: e === "home", onClick: () => n(
786
+ const ae = ({ title: e, active: n, onClick: o }) => /* @__PURE__ */ s(Vn, { onClick: o, "data-selected": n, children: /* @__PURE__ */ s(On, { children: e }) }), Qn = ({ activePage: e = "home", toggleActivePage: n }) => /* @__PURE__ */ s(Ln, { children: /* @__PURE__ */ r(Pn, { "data-position": e === "home" ? "left" : "right", children: [
787
+ /* @__PURE__ */ s(ae, { title: "Home", active: e === "home", onClick: () => n(
838
788
  "home"
839
789
  /* HOME */
840
790
  ) }),
841
791
  /* @__PURE__ */ s(
842
- de,
792
+ ae,
843
793
  {
844
794
  title: "Friends",
845
795
  active: e === "leaderboard",
@@ -849,76 +799,76 @@ const de = ({ title: e, active: n, onClick: t }) => /* @__PURE__ */ s(jn, { onCl
849
799
  )
850
800
  }
851
801
  )
852
- ] }) }), Fn = /* @__PURE__ */ i("div")({
802
+ ] }) }), Mn = /* @__PURE__ */ t("div")({
853
803
  name: "Container",
854
804
  class: "c1ux29ft",
855
805
  propsAsIs: !1
856
- }), Wn = /* @__PURE__ */ i("img")({
806
+ }), _n = /* @__PURE__ */ t("img")({
857
807
  name: "FriendsIcon",
858
808
  class: "f10ncfg2",
859
809
  propsAsIs: !1
860
- }), Zn = /* @__PURE__ */ i("div")({
810
+ }), jn = /* @__PURE__ */ t("div")({
861
811
  name: "Content",
862
812
  class: "c1yc07bd",
863
813
  propsAsIs: !1
864
- }), Hn = /* @__PURE__ */ i("div")({
814
+ }), Un = /* @__PURE__ */ t("div")({
865
815
  name: "Title",
866
816
  class: "tj6cq7w",
867
817
  propsAsIs: !1
868
- }), Yn = /* @__PURE__ */ i("div")({
818
+ }), Bn = /* @__PURE__ */ t("div")({
869
819
  name: "Description",
870
820
  class: "d1ag78xo",
871
821
  propsAsIs: !1
872
- }), Gn = () => g, Kn = /* @__PURE__ */ i(Gn())({
822
+ }), zn = () => A, Fn = /* @__PURE__ */ t(zn())({
873
823
  name: "ArrowInviteIcon",
874
824
  class: "awohrz6",
875
825
  propsAsIs: !0
876
- }), Jn = "data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='32'%20height='32'%20rx='16'%20fill='white'/%3e%3cpath%20d='M10.4615%2012.6875C9.44231%2012.6875%208.61538%2013.4665%208.61538%2014.4266C8.61538%2015.3868%209.44231%2016.1658%2010.4615%2016.1658C11.4808%2016.1658%2012.3077%2015.3868%2012.3077%2014.4266C12.3077%2013.4665%2011.4808%2012.6875%2010.4615%2012.6875ZM10.4615%2016.1658C9.10817%2016.1658%208%2017.2097%208%2018.4846V19.7527C8%2019.7527%208.61538%2020.2237%2010.4615%2020.2237C12.3077%2020.2237%2012.9231%2019.7527%2012.9231%2019.7527V18.4846C12.9231%2017.2097%2011.8149%2016.1658%2010.4615%2016.1658ZM21.5385%2012.6875C20.5192%2012.6875%2019.6923%2013.4665%2019.6923%2014.4266C19.6923%2015.3868%2020.5192%2016.1658%2021.5385%2016.1658C22.5577%2016.1658%2023.3846%2015.3868%2023.3846%2014.4266C23.3846%2013.4665%2022.5577%2012.6875%2021.5385%2012.6875ZM21.5385%2016.1658C20.1851%2016.1658%2019.0769%2017.2097%2019.0769%2018.4846V19.7527C19.0769%2019.7527%2019.6923%2020.2237%2021.5385%2020.2237C23.3846%2020.2237%2024%2019.7527%2024%2019.7527V18.4846C24%2017.2097%2022.8918%2016.1658%2021.5385%2016.1658ZM16%2015.0063C14.9808%2015.0063%2014.1538%2015.7853%2014.1538%2016.7455C14.1538%2017.7056%2014.9808%2018.4846%2016%2018.4846C17.0192%2018.4846%2017.8462%2017.7056%2017.8462%2016.7455C17.8462%2015.7853%2017.0192%2015.0063%2016%2015.0063ZM16%2018.4846C14.6466%2018.4846%2013.5385%2019.5285%2013.5385%2020.8034V22.0715C13.5385%2022.0715%2014.1538%2022.5425%2016%2022.5425C17.8462%2022.5425%2018.4615%2022.0715%2018.4615%2022.0715V20.8034C18.4615%2019.5285%2017.3534%2018.4846%2016%2018.4846Z'%20fill='%23107D57'/%3e%3cpath%20opacity='0.5'%20d='M13.3908%209C12.3103%209%2011.4336%209.82584%2011.4336%2010.8437C11.4336%2011.8616%2012.3103%2012.6875%2013.3908%2012.6875C14.4713%2012.6875%2015.348%2011.8616%2015.348%2010.8437C15.348%209.82584%2014.4713%209%2013.3908%209ZM13.3908%2012.6875C13.1946%2012.6875%2012.9958%2012.6827%2012.7996%2012.7451C13.192%2013.2372%2013.3908%2013.8542%2013.3908%2014.5312C13.3908%2014.7761%2013.3296%2015.0161%2013.3296%2015.261C13.8521%2014.524%2014.6956%2014.0391%2015.6742%2013.9166C15.218%2013.1796%2014.3694%2012.6875%2013.3908%2012.6875ZM18.61%209C17.5295%209%2016.6528%209.82584%2016.6528%2010.8437C16.6528%2011.8616%2017.5295%2012.6875%2018.61%2012.6875C19.6905%2012.6875%2020.5672%2011.8616%2020.5672%2010.8437C20.5672%209.82584%2019.6905%209%2018.61%209ZM18.61%2012.6875C17.6314%2012.6875%2016.7828%2013.1796%2016.3266%2013.9166C17.3052%2014.0391%2018.1487%2014.524%2018.6712%2015.261C18.6712%2015.0161%2018.61%2014.7761%2018.61%2014.5312C18.61%2013.8542%2018.8088%2013.2372%2019.2012%2012.7451C19.005%2012.6827%2018.8062%2012.6875%2018.61%2012.6875Z'%20fill='%23107D57'/%3e%3c/svg%3e", Xn = ({ title: e, description: n, onClick: t, className: o }) => /* @__PURE__ */ a(Fn, { onClick: t, className: o, children: [
877
- /* @__PURE__ */ s(Wn, { alt: "friends-icon", src: Jn }),
878
- /* @__PURE__ */ a(Zn, { children: [
879
- /* @__PURE__ */ s(Hn, { children: e }),
880
- /* @__PURE__ */ s(Yn, { children: n })
826
+ }), Wn = "data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='32'%20height='32'%20rx='16'%20fill='white'/%3e%3cpath%20d='M10.4615%2012.6875C9.44231%2012.6875%208.61538%2013.4665%208.61538%2014.4266C8.61538%2015.3868%209.44231%2016.1658%2010.4615%2016.1658C11.4808%2016.1658%2012.3077%2015.3868%2012.3077%2014.4266C12.3077%2013.4665%2011.4808%2012.6875%2010.4615%2012.6875ZM10.4615%2016.1658C9.10817%2016.1658%208%2017.2097%208%2018.4846V19.7527C8%2019.7527%208.61538%2020.2237%2010.4615%2020.2237C12.3077%2020.2237%2012.9231%2019.7527%2012.9231%2019.7527V18.4846C12.9231%2017.2097%2011.8149%2016.1658%2010.4615%2016.1658ZM21.5385%2012.6875C20.5192%2012.6875%2019.6923%2013.4665%2019.6923%2014.4266C19.6923%2015.3868%2020.5192%2016.1658%2021.5385%2016.1658C22.5577%2016.1658%2023.3846%2015.3868%2023.3846%2014.4266C23.3846%2013.4665%2022.5577%2012.6875%2021.5385%2012.6875ZM21.5385%2016.1658C20.1851%2016.1658%2019.0769%2017.2097%2019.0769%2018.4846V19.7527C19.0769%2019.7527%2019.6923%2020.2237%2021.5385%2020.2237C23.3846%2020.2237%2024%2019.7527%2024%2019.7527V18.4846C24%2017.2097%2022.8918%2016.1658%2021.5385%2016.1658ZM16%2015.0063C14.9808%2015.0063%2014.1538%2015.7853%2014.1538%2016.7455C14.1538%2017.7056%2014.9808%2018.4846%2016%2018.4846C17.0192%2018.4846%2017.8462%2017.7056%2017.8462%2016.7455C17.8462%2015.7853%2017.0192%2015.0063%2016%2015.0063ZM16%2018.4846C14.6466%2018.4846%2013.5385%2019.5285%2013.5385%2020.8034V22.0715C13.5385%2022.0715%2014.1538%2022.5425%2016%2022.5425C17.8462%2022.5425%2018.4615%2022.0715%2018.4615%2022.0715V20.8034C18.4615%2019.5285%2017.3534%2018.4846%2016%2018.4846Z'%20fill='%23107D57'/%3e%3cpath%20opacity='0.5'%20d='M13.3908%209C12.3103%209%2011.4336%209.82584%2011.4336%2010.8437C11.4336%2011.8616%2012.3103%2012.6875%2013.3908%2012.6875C14.4713%2012.6875%2015.348%2011.8616%2015.348%2010.8437C15.348%209.82584%2014.4713%209%2013.3908%209ZM13.3908%2012.6875C13.1946%2012.6875%2012.9958%2012.6827%2012.7996%2012.7451C13.192%2013.2372%2013.3908%2013.8542%2013.3908%2014.5312C13.3908%2014.7761%2013.3296%2015.0161%2013.3296%2015.261C13.8521%2014.524%2014.6956%2014.0391%2015.6742%2013.9166C15.218%2013.1796%2014.3694%2012.6875%2013.3908%2012.6875ZM18.61%209C17.5295%209%2016.6528%209.82584%2016.6528%2010.8437C16.6528%2011.8616%2017.5295%2012.6875%2018.61%2012.6875C19.6905%2012.6875%2020.5672%2011.8616%2020.5672%2010.8437C20.5672%209.82584%2019.6905%209%2018.61%209ZM18.61%2012.6875C17.6314%2012.6875%2016.7828%2013.1796%2016.3266%2013.9166C17.3052%2014.0391%2018.1487%2014.524%2018.6712%2015.261C18.6712%2015.0161%2018.61%2014.7761%2018.61%2014.5312C18.61%2013.8542%2018.8088%2013.2372%2019.2012%2012.7451C19.005%2012.6827%2018.8062%2012.6875%2018.61%2012.6875Z'%20fill='%23107D57'/%3e%3c/svg%3e", Hn = ({ title: e, description: n, onClick: o, className: i }) => /* @__PURE__ */ r(Mn, { onClick: o, className: i, children: [
827
+ /* @__PURE__ */ s(_n, { alt: "friends-icon", src: Wn }),
828
+ /* @__PURE__ */ r(jn, { children: [
829
+ /* @__PURE__ */ s(Un, { children: e }),
830
+ /* @__PURE__ */ s(Bn, { children: n })
881
831
  ] }),
882
- /* @__PURE__ */ s(Kn, { name: "icon-copy" })
832
+ /* @__PURE__ */ s(Fn, { name: "icon-copy" })
883
833
  ] });
884
- function et(e) {
885
- var n = e.lastRenderedStartIndex, t = e.lastRenderedStopIndex, o = e.startIndex, r = e.stopIndex;
886
- return !(o > t || r < n);
834
+ function Zn(e) {
835
+ var n = e.lastRenderedStartIndex, o = e.lastRenderedStopIndex, i = e.startIndex, a = e.stopIndex;
836
+ return !(i > o || a < n);
887
837
  }
888
- function st(e) {
889
- for (var n = e.isItemLoaded, t = e.itemCount, o = e.minimumBatchSize, r = e.startIndex, p = e.stopIndex, d = [], l = null, c = null, m = r; m <= p; m++) {
890
- var u = n(m);
891
- u ? c !== null && (d.push(l, c), l = c = null) : (c = m, l === null && (l = m));
838
+ function Yn(e) {
839
+ for (var n = e.isItemLoaded, o = e.itemCount, i = e.minimumBatchSize, a = e.startIndex, p = e.stopIndex, c = [], l = null, d = null, u = a; u <= p; u++) {
840
+ var h = n(u);
841
+ h ? d !== null && (c.push(l, d), l = d = null) : (d = u, l === null && (l = u));
892
842
  }
893
- if (c !== null) {
894
- for (var f = Math.min(Math.max(c, l + o - 1), t - 1), I = c + 1; I <= f && !n(I); I++)
895
- c = I;
896
- d.push(l, c);
843
+ if (d !== null) {
844
+ for (var C = Math.min(Math.max(d, l + i - 1), o - 1), I = d + 1; I <= C && !n(I); I++)
845
+ d = I;
846
+ c.push(l, d);
897
847
  }
898
- if (d.length)
899
- for (; d[1] - d[0] + 1 < o && d[0] > 0; ) {
900
- var C = d[0] - 1;
901
- if (!n(C))
902
- d[0] = C;
848
+ if (c.length)
849
+ for (; c[1] - c[0] + 1 < i && c[0] > 0; ) {
850
+ var f = c[0] - 1;
851
+ if (!n(f))
852
+ c[0] = f;
903
853
  else
904
854
  break;
905
855
  }
906
- return d;
856
+ return c;
907
857
  }
908
- var nt = function(e, n) {
858
+ var Gn = function(e, n) {
909
859
  if (!(e instanceof n))
910
860
  throw new TypeError("Cannot call a class as a function");
911
- }, tt = /* @__PURE__ */ function() {
912
- function e(n, t) {
913
- for (var o = 0; o < t.length; o++) {
914
- var r = t[o];
915
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(n, r.key, r);
861
+ }, Kn = /* @__PURE__ */ function() {
862
+ function e(n, o) {
863
+ for (var i = 0; i < o.length; i++) {
864
+ var a = o[i];
865
+ a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(n, a.key, a);
916
866
  }
917
867
  }
918
- return function(n, t, o) {
919
- return t && e(n.prototype, t), o && e(n, o), n;
868
+ return function(n, o, i) {
869
+ return o && e(n.prototype, o), i && e(n, i), n;
920
870
  };
921
- }(), it = function(e, n) {
871
+ }(), Xn = function(e, n) {
922
872
  if (typeof n != "function" && n !== null)
923
873
  throw new TypeError("Super expression must either be null or a function, not " + typeof n);
924
874
  e.prototype = Object.create(n && n.prototype, {
@@ -929,30 +879,30 @@ var nt = function(e, n) {
929
879
  configurable: !0
930
880
  }
931
881
  }), n && (Object.setPrototypeOf ? Object.setPrototypeOf(e, n) : e.__proto__ = n);
932
- }, pe = function(e, n) {
882
+ }, re = function(e, n) {
933
883
  if (!e)
934
884
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
935
885
  return n && (typeof n == "object" || typeof n == "function") ? n : e;
936
886
  };
937
887
  (function(e) {
938
- it(n, e);
888
+ Xn(n, e);
939
889
  function n() {
940
- var t, o, r, p;
941
- nt(this, n);
942
- for (var d = arguments.length, l = Array(d), c = 0; c < d; c++)
943
- l[c] = arguments[c];
944
- return p = (o = (r = pe(this, (t = n.__proto__ || Object.getPrototypeOf(n)).call.apply(t, [this].concat(l))), r), r._lastRenderedStartIndex = -1, r._lastRenderedStopIndex = -1, r._memoizedUnloadedRanges = [], r._onItemsRendered = function(m) {
945
- var u = m.visibleStartIndex, f = m.visibleStopIndex;
946
- r._lastRenderedStartIndex = u, r._lastRenderedStopIndex = f, r._ensureRowsLoaded(u, f);
947
- }, r._setRef = function(m) {
948
- r._listRef = m;
949
- }, o), pe(r, p);
890
+ var o, i, a, p;
891
+ Gn(this, n);
892
+ for (var c = arguments.length, l = Array(c), d = 0; d < c; d++)
893
+ l[d] = arguments[d];
894
+ return p = (i = (a = re(this, (o = n.__proto__ || Object.getPrototypeOf(n)).call.apply(o, [this].concat(l))), a), a._lastRenderedStartIndex = -1, a._lastRenderedStopIndex = -1, a._memoizedUnloadedRanges = [], a._onItemsRendered = function(u) {
895
+ var h = u.visibleStartIndex, C = u.visibleStopIndex;
896
+ a._lastRenderedStartIndex = h, a._lastRenderedStopIndex = C, a._ensureRowsLoaded(h, C);
897
+ }, a._setRef = function(u) {
898
+ a._listRef = u;
899
+ }, i), re(a, p);
950
900
  }
951
- return tt(n, [{
901
+ return Kn(n, [{
952
902
  key: "resetloadMoreItemsCache",
953
903
  value: function() {
954
- var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
955
- this._memoizedUnloadedRanges = [], o && this._ensureRowsLoaded(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
904
+ var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
905
+ this._memoizedUnloadedRanges = [], i && this._ensureRowsLoaded(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
956
906
  }
957
907
  }, {
958
908
  key: "componentDidMount",
@@ -961,124 +911,124 @@ var nt = function(e, n) {
961
911
  }, {
962
912
  key: "render",
963
913
  value: function() {
964
- var o = this.props.children;
965
- return o({
914
+ var i = this.props.children;
915
+ return i({
966
916
  onItemsRendered: this._onItemsRendered,
967
917
  ref: this._setRef
968
918
  });
969
919
  }
970
920
  }, {
971
921
  key: "_ensureRowsLoaded",
972
- value: function(o, r) {
973
- var p = this.props, d = p.isItemLoaded, l = p.itemCount, c = p.minimumBatchSize, m = c === void 0 ? 10 : c, u = p.threshold, f = u === void 0 ? 15 : u, I = st({
974
- isItemLoaded: d,
922
+ value: function(i, a) {
923
+ var p = this.props, c = p.isItemLoaded, l = p.itemCount, d = p.minimumBatchSize, u = d === void 0 ? 10 : d, h = p.threshold, C = h === void 0 ? 15 : h, I = Yn({
924
+ isItemLoaded: c,
975
925
  itemCount: l,
976
- minimumBatchSize: m,
977
- startIndex: Math.max(0, o - f),
978
- stopIndex: Math.min(l - 1, r + f)
926
+ minimumBatchSize: u,
927
+ startIndex: Math.max(0, i - C),
928
+ stopIndex: Math.min(l - 1, a + C)
979
929
  });
980
- (this._memoizedUnloadedRanges.length !== I.length || this._memoizedUnloadedRanges.some(function(C, R) {
981
- return I[R] !== C;
930
+ (this._memoizedUnloadedRanges.length !== I.length || this._memoizedUnloadedRanges.some(function(f, w) {
931
+ return I[w] !== f;
982
932
  })) && (this._memoizedUnloadedRanges = I, this._loadUnloadedRanges(I));
983
933
  }
984
934
  }, {
985
935
  key: "_loadUnloadedRanges",
986
- value: function(o) {
987
- for (var r = this, p = this.props.loadMoreItems || this.props.loadMoreRows, d = function(m) {
988
- var u = o[m], f = o[m + 1], I = p(u, f);
936
+ value: function(i) {
937
+ for (var a = this, p = this.props.loadMoreItems || this.props.loadMoreRows, c = function(u) {
938
+ var h = i[u], C = i[u + 1], I = p(h, C);
989
939
  I != null && I.then(function() {
990
- if (et({
991
- lastRenderedStartIndex: r._lastRenderedStartIndex,
992
- lastRenderedStopIndex: r._lastRenderedStopIndex,
993
- startIndex: u,
994
- stopIndex: f
940
+ if (Zn({
941
+ lastRenderedStartIndex: a._lastRenderedStartIndex,
942
+ lastRenderedStopIndex: a._lastRenderedStopIndex,
943
+ startIndex: h,
944
+ stopIndex: C
995
945
  })) {
996
- if (r._listRef == null)
946
+ if (a._listRef == null)
997
947
  return;
998
- typeof r._listRef.resetAfterIndex == "function" ? r._listRef.resetAfterIndex(u, !0) : (typeof r._listRef._getItemStyleCache == "function" && r._listRef._getItemStyleCache(-1), r._listRef.forceUpdate());
948
+ typeof a._listRef.resetAfterIndex == "function" ? a._listRef.resetAfterIndex(h, !0) : (typeof a._listRef._getItemStyleCache == "function" && a._listRef._getItemStyleCache(-1), a._listRef.forceUpdate());
999
949
  }
1000
950
  });
1001
- }, l = 0; l < o.length; l += 2)
1002
- d(l);
951
+ }, l = 0; l < i.length; l += 2)
952
+ c(l);
1003
953
  }
1004
954
  }]), n;
1005
- })(xe);
1006
- const ot = /* @__PURE__ */ i("div")({
955
+ })(Re);
956
+ const Jn = /* @__PURE__ */ t("div")({
1007
957
  name: "Container",
1008
958
  class: "culdu4a",
1009
959
  propsAsIs: !1
1010
- }), rt = /* @__PURE__ */ i("div")({
960
+ }), et = /* @__PURE__ */ t("div")({
1011
961
  name: "Position",
1012
962
  class: "pwf8e69",
1013
963
  propsAsIs: !1
1014
- }), at = /* @__PURE__ */ i("img")({
964
+ }), st = /* @__PURE__ */ t("img")({
1015
965
  name: "Avatar",
1016
966
  class: "atf4yh4",
1017
967
  propsAsIs: !1
1018
- }), lt = /* @__PURE__ */ i("div")({
968
+ }), nt = /* @__PURE__ */ t("div")({
1019
969
  name: "AvatarPlaceholder",
1020
970
  class: "a1dg29ja",
1021
971
  propsAsIs: !1
1022
- }), ct = /* @__PURE__ */ i("div")({
972
+ }), tt = /* @__PURE__ */ t("div")({
1023
973
  name: "Content",
1024
974
  class: "c10a68rc",
1025
975
  propsAsIs: !1
1026
- }), dt = /* @__PURE__ */ i("div")({
976
+ }), ot = /* @__PURE__ */ t("div")({
1027
977
  name: "NameContainer",
1028
978
  class: "nc4kck5",
1029
979
  propsAsIs: !1
1030
- }), pt = /* @__PURE__ */ i("span")({
980
+ }), it = /* @__PURE__ */ t("span")({
1031
981
  name: "Name",
1032
982
  class: "njsrqgr",
1033
983
  propsAsIs: !1
1034
- }), ut = () => g, mt = /* @__PURE__ */ i(ut())({
984
+ }), at = () => A, rt = /* @__PURE__ */ t(at())({
1035
985
  name: "CurrentUserBadge",
1036
986
  class: "c17uc4zr",
1037
987
  propsAsIs: !0
1038
- }), ht = ({
988
+ }), lt = ({
1039
989
  rank: e,
1040
990
  avatar: n,
1041
- name: t,
1042
- points: o,
1043
- isCurrentUser: r,
991
+ name: o,
992
+ points: i,
993
+ isCurrentUser: a,
1044
994
  openItemDetail: p,
1045
- style: d
1046
- }) => /* @__PURE__ */ a(ot, { onClick: p, style: d, children: [
1047
- /* @__PURE__ */ s(rt, { children: e || 0 }),
1048
- /* @__PURE__ */ a(ct, { children: [
1049
- n ? /* @__PURE__ */ s(at, { alt: "leaderboard-item-avatar", src: n }) : /* @__PURE__ */ s(lt, { children: Ae(t || "") }),
1050
- /* @__PURE__ */ a(dt, { children: [
1051
- /* @__PURE__ */ s(pt, { children: t || "" }),
1052
- r && /* @__PURE__ */ s(mt, { name: "icon-star" })
995
+ style: c
996
+ }) => /* @__PURE__ */ r(Jn, { onClick: p, style: c, children: [
997
+ /* @__PURE__ */ s(et, { children: e || 0 }),
998
+ /* @__PURE__ */ r(tt, { children: [
999
+ n ? /* @__PURE__ */ s(st, { alt: "leaderboard-item-avatar", src: n }) : /* @__PURE__ */ s(nt, { children: pe(o || "") }),
1000
+ /* @__PURE__ */ r(ot, { children: [
1001
+ /* @__PURE__ */ s(it, { children: o || "" }),
1002
+ a && /* @__PURE__ */ s(rt, { name: "icon-star" })
1053
1003
  ] })
1054
1004
  ] }),
1055
- /* @__PURE__ */ s("div", { children: ge(o) })
1056
- ] }), It = /* @__PURE__ */ i("div")({
1005
+ /* @__PURE__ */ s("div", { children: ue(i) })
1006
+ ] }), ct = /* @__PURE__ */ t("div")({
1057
1007
  name: "Container",
1058
1008
  class: "c16btbfp",
1059
1009
  propsAsIs: !1
1060
- }), vt = ({
1010
+ }), dt = ({
1061
1011
  items: e,
1062
1012
  currentUserId: n,
1063
- openItemDetail: t,
1064
- fetchMore: o,
1065
- scrollNode: r,
1013
+ openItemDetail: o,
1014
+ fetchMore: i,
1015
+ scrollNode: a,
1066
1016
  hasMore: p
1067
- }) => /* @__PURE__ */ s(ze, {
1068
- loadMore: o,
1017
+ }) => /* @__PURE__ */ s(_e, {
1018
+ loadMore: i,
1069
1019
  initialLoad: !1,
1070
1020
  hasMore: p,
1071
1021
  useWindow: !1,
1072
- getScrollParent: () => r.current,
1073
- children: /* @__PURE__ */ s(It, {
1074
- children: e.map((d) => /* @__PURE__ */ s(ht, {
1075
- ...d,
1076
- openItemDetail: () => t(d.userId),
1077
- isCurrentUser: !!n && n === d.userId
1078
- }, d.userId))
1022
+ getScrollParent: () => a.current,
1023
+ children: /* @__PURE__ */ s(ct, {
1024
+ children: e.map((c) => /* @__PURE__ */ s(lt, {
1025
+ ...c,
1026
+ openItemDetail: () => o(c.userId),
1027
+ isCurrentUser: !!n && n === c.userId
1028
+ }, c.userId))
1079
1029
  })
1080
- }), ft = ({ renderClipBoardNode: e, deepLink: n }) => /* @__PURE__ */ s(
1081
- Le,
1030
+ }), pt = ({ renderClipBoardNode: e, deepLink: n }) => /* @__PURE__ */ s(
1031
+ xe,
1082
1032
  {
1083
1033
  renderToNode: e,
1084
1034
  inviteLink: n,
@@ -1097,336 +1047,293 @@ const ot = /* @__PURE__ */ i("div")({
1097
1047
  inviteCardTitle: "It’s More Fun With Friends",
1098
1048
  inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
1099
1049
  }
1100
- ), Ct = /* @__PURE__ */ i("div")({
1050
+ ), ut = /* @__PURE__ */ t("div")({
1101
1051
  name: "InviteLinkContainer",
1102
1052
  class: "i1chxfpe",
1103
1053
  propsAsIs: !1
1104
- }), At = ({
1054
+ }), mt = ({
1105
1055
  gamification: e,
1106
1056
  scrollNode: n,
1107
- scrollStore: t,
1108
- renderClipBoardNode: o
1057
+ scrollStore: o,
1058
+ renderClipBoardNode: i
1109
1059
  }) => {
1110
1060
  const {
1111
- data: r,
1061
+ data: a,
1112
1062
  hasMore: p,
1113
- loading: d,
1063
+ loading: c,
1114
1064
  key: l
1115
- } = D(e.leaderboardList.$store), {
1116
- data: c
1117
- } = D(e.deepLink.$store), [m, u] = Pe(o);
1118
- return !r.length && !d ? /* @__PURE__ */ s(ft, {
1119
- renderClipBoardNode: o,
1120
- deepLink: c
1121
- }) : /* @__PURE__ */ a(E, {
1122
- children: [/* @__PURE__ */ s(vt, {
1123
- items: r,
1065
+ } = S(e.leaderboardList.$store), {
1066
+ data: d
1067
+ } = S(e.deepLink.$store), [u, h] = Se(i);
1068
+ return !a.length && !c ? /* @__PURE__ */ s(pt, {
1069
+ renderClipBoardNode: i,
1070
+ deepLink: d
1071
+ }) : /* @__PURE__ */ r(x, {
1072
+ children: [/* @__PURE__ */ s(dt, {
1073
+ items: a,
1124
1074
  scrollNode: n,
1125
- scrollStore: t,
1075
+ scrollStore: o,
1126
1076
  fetchMore: e.leaderboardList.fetchMore,
1127
1077
  hasMore: p,
1128
1078
  openItemDetail: e.openUser,
1129
1079
  currentUserId: e.currentUserId.get()
1130
- }, l), c && /* @__PURE__ */ s(Ct, {
1131
- children: /* @__PURE__ */ s(Xn, {
1132
- onClick: () => m(c),
1080
+ }, l), d && /* @__PURE__ */ s(ut, {
1081
+ children: /* @__PURE__ */ s(Hn, {
1082
+ onClick: () => u(d),
1133
1083
  title: "Invite Friends",
1134
1084
  description: "Challenge them now!"
1135
1085
  })
1136
- }), u]
1086
+ }), h]
1137
1087
  });
1138
- }, gt = /* @__PURE__ */ i("div")({
1088
+ }, ht = /* @__PURE__ */ t("div")({
1139
1089
  name: "QuestionItem",
1140
1090
  class: "q1w97g3p",
1141
1091
  propsAsIs: !1
1142
- }), $t = /* @__PURE__ */ i("div")({
1092
+ }), It = /* @__PURE__ */ t("div")({
1143
1093
  name: "QuestionCaption",
1144
1094
  class: "q2sl39u",
1145
1095
  propsAsIs: !1
1146
- }), bt = /* @__PURE__ */ i("div")({
1096
+ }), vt = /* @__PURE__ */ t("div")({
1147
1097
  name: "QuestionBody",
1148
1098
  class: "qd5h0uc",
1149
1099
  propsAsIs: !1
1150
- }), yt = /* @__PURE__ */ i("div")({
1100
+ }), Ct = /* @__PURE__ */ t("div")({
1151
1101
  name: "QuestionAction",
1152
1102
  class: "q105uluy",
1153
1103
  propsAsIs: !1
1154
- }), wt = () => g, H = /* @__PURE__ */ i(wt())({
1104
+ }), ft = () => A, Z = /* @__PURE__ */ t(ft())({
1155
1105
  name: "QuestionActionIcon",
1156
1106
  class: "q1fa0b9h",
1157
1107
  propsAsIs: !0
1158
- }), Rt = () => g, Tt = /* @__PURE__ */ i(Rt())({
1108
+ }), At = () => A, $t = /* @__PURE__ */ t(At())({
1159
1109
  name: "QuestionTypeIcon",
1160
1110
  class: "qxlt78s",
1161
1111
  propsAsIs: !0
1162
- }), kt = /* @__PURE__ */ i("div")({
1112
+ }), gt = /* @__PURE__ */ t("div")({
1163
1113
  name: "QuestionTypeLabel",
1164
1114
  class: "qmg0vkx",
1165
1115
  propsAsIs: !1
1166
- }), St = /* @__PURE__ */ i("div")({
1116
+ }), bt = /* @__PURE__ */ t("div")({
1167
1117
  name: "QuestionContent",
1168
1118
  class: "q1uz5j1g",
1169
1119
  propsAsIs: !1
1170
- }), xt = /* @__PURE__ */ i("button")({
1120
+ }), yt = /* @__PURE__ */ t("button")({
1171
1121
  name: "PlayButton",
1172
1122
  class: "p1pba9p1",
1173
1123
  propsAsIs: !1
1174
- }), qt = {
1175
- [F.LOST]: /* @__PURE__ */ s(H, { name: "incorrectVoted" }),
1176
- [F.WON]: /* @__PURE__ */ s(H, { name: "icon-check" }),
1177
- [F.UNSET]: /* @__PURE__ */ s(H, { name: "icon-arrow" }),
1178
- [F.DNP]: /* @__PURE__ */ s(H, { name: "icon-arrow" })
1179
- }, Et = ({
1124
+ }), Rt = {
1125
+ [F.LOST]: /* @__PURE__ */ s(Z, { name: "incorrectVoted" }),
1126
+ [F.WON]: /* @__PURE__ */ s(Z, { name: "icon-check" }),
1127
+ [F.UNSET]: /* @__PURE__ */ s(Z, { name: "icon-arrow" }),
1128
+ [F.DNP]: /* @__PURE__ */ s(Z, { name: "icon-arrow" })
1129
+ }, wt = ({
1180
1130
  questionId: e,
1181
1131
  questionType: n,
1182
- questionStatus: t,
1183
- subject: o,
1184
- openForVoting: r,
1132
+ questionStatus: o,
1133
+ subject: i,
1134
+ openForVoting: a,
1185
1135
  openQuestion: p,
1186
- status: d
1136
+ status: c
1187
1137
  }) => {
1188
- const l = he[n], c = qt[d];
1189
- return l ? /* @__PURE__ */ a(gt, { onClick: () => p == null ? void 0 : p(e), children: [
1190
- /* @__PURE__ */ a(St, { children: [
1191
- /* @__PURE__ */ a($t, { children: [
1138
+ const l = de[n], d = Rt[c];
1139
+ return l ? /* @__PURE__ */ r(ht, { onClick: () => p == null ? void 0 : p(e), children: [
1140
+ /* @__PURE__ */ r(bt, { children: [
1141
+ /* @__PURE__ */ r(It, { children: [
1192
1142
  /* @__PURE__ */ s(
1193
- Tt,
1143
+ $t,
1194
1144
  {
1195
- "data-type-trivia": n === h.TRIVIA,
1196
- "data-type-poll": n === h.POLL,
1145
+ "data-type-trivia": n === m.TRIVIA,
1146
+ "data-type-poll": n === m.POLL,
1197
1147
  name: l.iconName
1198
1148
  }
1199
1149
  ),
1200
- /* @__PURE__ */ a(kt, { children: [
1150
+ /* @__PURE__ */ r(gt, { children: [
1201
1151
  l.label,
1202
- n === h.TRIVIA && t === L.RESOLVED && " • Expired"
1152
+ n === m.TRIVIA && o === D.RESOLVED && " • Expired"
1203
1153
  ] })
1204
1154
  ] }),
1205
- /* @__PURE__ */ s(bt, { children: o || "" })
1155
+ /* @__PURE__ */ s(vt, { children: i || "" })
1206
1156
  ] }),
1207
- /* @__PURE__ */ s(yt, { children: r ? /* @__PURE__ */ s(xt, { children: "Play" }) : c })
1157
+ /* @__PURE__ */ s(Ct, { children: a ? /* @__PURE__ */ s(yt, { children: "Play" }) : d })
1208
1158
  ] }) : null;
1209
- }, Nt = /* @__PURE__ */ i("div")({
1159
+ }, Tt = /* @__PURE__ */ t("div")({
1210
1160
  name: "Container",
1211
1161
  class: "cll3md7",
1212
1162
  propsAsIs: !1
1213
- }), Dt = /* @__PURE__ */ i("button")({
1163
+ }), kt = /* @__PURE__ */ t("button")({
1214
1164
  name: "ActionBtn",
1215
1165
  class: "a10g1iik",
1216
1166
  propsAsIs: !1
1217
- }), Lt = ({
1167
+ }), xt = ({
1218
1168
  openInsight: e,
1219
1169
  questionId: n,
1220
- ...t
1221
- }) => /* @__PURE__ */ a(Nt, { children: [
1222
- /* @__PURE__ */ s(ye, { questionId: n, ...t }),
1223
- e && /* @__PURE__ */ s(Dt, { onClick: () => e(n), children: "View Insight" })
1224
- ] }), Pt = /* @__PURE__ */ i("div")({
1170
+ ...o
1171
+ }) => /* @__PURE__ */ r(Tt, { children: [
1172
+ /* @__PURE__ */ s(fe, { questionId: n, ...o }),
1173
+ e && /* @__PURE__ */ s(kt, { onClick: () => e(n), children: "View Insight" })
1174
+ ] }), St = /* @__PURE__ */ t("div")({
1225
1175
  name: "Container",
1226
1176
  class: "cl56x6b",
1227
1177
  propsAsIs: !1
1228
- }), Vt = () => Ve, Ot = /* @__PURE__ */ i(Vt())({
1178
+ }), qt = () => qe, Et = /* @__PURE__ */ t(qt())({
1229
1179
  name: "ActionButton",
1230
1180
  class: "a11pzf92",
1231
1181
  propsAsIs: !0
1232
- }), Qt = /* @__PURE__ */ i("div")({
1233
- name: "DateTime",
1234
- class: "d1hbaleq",
1235
- propsAsIs: !1
1236
- }), Mt = /* @__PURE__ */ i("blockquote")({
1182
+ }), Nt = /* @__PURE__ */ t("blockquote")({
1237
1183
  name: "Quote",
1238
- class: "qvvgqjm",
1184
+ class: "q1hbaleq",
1239
1185
  propsAsIs: !1
1240
- }), _t = ({
1186
+ }), Dt = ({
1241
1187
  openTweet: e,
1242
- created: n,
1243
- ...t
1244
- }) => {
1245
- const o = q(() => {
1246
- if (n) {
1247
- const r = new Date(n);
1248
- if (te(r))
1249
- return {
1250
- date: se(r),
1251
- time: ne(r)
1252
- };
1253
- }
1254
- return null;
1255
- }, [n]);
1256
- return /* @__PURE__ */ a(Pt, { children: [
1257
- o && /* @__PURE__ */ a(Qt, { children: [
1258
- o.date,
1259
- " · ",
1260
- o.time
1261
- ] }),
1262
- t.title && /* @__PURE__ */ s(Mt, { children: t.title }),
1263
- /* @__PURE__ */ s(Ie, { ...t }),
1264
- e && /* @__PURE__ */ s(Ot, { onClick: () => e(t.tweetId), children: "View Insight" })
1265
- ] });
1266
- }, Ut = /* @__PURE__ */ i("div")({
1188
+ ...n
1189
+ }) => /* @__PURE__ */ r(St, { children: [
1190
+ n.title && /* @__PURE__ */ s(Nt, { children: n.title }),
1191
+ /* @__PURE__ */ s(me, { ...n }),
1192
+ e && /* @__PURE__ */ s(Et, { onClick: () => e(n.tweetId), children: "View Insight" })
1193
+ ] }), Lt = /* @__PURE__ */ t("div")({
1267
1194
  name: "QuestionsContainer",
1268
1195
  class: "qvghv3l",
1269
1196
  propsAsIs: !1
1270
- }), jt = ({ questions: e, openQuestion: n }) => /* @__PURE__ */ s(Ut, { children: e == null ? void 0 : e.map((t) => {
1271
- var o, r, p;
1272
- if (t.type === "question" && ((o = t.attributes) == null ? void 0 : o.attributes.case) === "question") {
1273
- const d = t.attributes.attributes.value;
1274
- return /* @__PURE__ */ s(Et, { openQuestion: n, ...d }, d.questionId);
1197
+ }), Pt = ({ questions: e, openQuestion: n }) => /* @__PURE__ */ s(Lt, { children: e == null ? void 0 : e.map((o) => {
1198
+ var i, a, p;
1199
+ if (o.type === "question" && ((i = o.attributes) == null ? void 0 : i.attributes.case) === "question") {
1200
+ const c = o.attributes.attributes.value;
1201
+ return /* @__PURE__ */ s(wt, { openQuestion: n, ...c }, c.questionId);
1275
1202
  }
1276
- if (t.type === "insight" && ((r = t.attributes) == null ? void 0 : r.attributes.case) === "insight") {
1277
- const d = t.attributes.attributes.value, l = t.attributes.created;
1278
- return /* @__PURE__ */ s(Lt, { openInsight: n, ...d, created: l }, d.questionId);
1203
+ if (o.type === "insight" && ((a = o.attributes) == null ? void 0 : a.attributes.case) === "insight") {
1204
+ const c = o.attributes.attributes.value;
1205
+ return /* @__PURE__ */ s(xt, { openInsight: n, ...c }, c.questionId);
1279
1206
  }
1280
- if (t.type === "tweet" && ((p = t.attributes) == null ? void 0 : p.attributes.case) === "tweet") {
1281
- const d = t.attributes.attributes.value, l = t.attributes.id, c = t.attributes.created;
1282
- return /* @__PURE__ */ s(_t, { openTweet: n, ...d, tweetId: l, created: c }, l);
1207
+ if (o.type === "tweet" && ((p = o.attributes) == null ? void 0 : p.attributes.case) === "tweet") {
1208
+ const c = o.attributes.attributes.value, l = o.attributes.id;
1209
+ return /* @__PURE__ */ s(Dt, { openTweet: n, ...c, tweetId: l }, l);
1283
1210
  }
1284
1211
  return null;
1285
- }) }), Bt = ({ store: e, openQuestion: n }) => {
1286
- const t = D(e);
1287
- return t != null && t.data ? /* @__PURE__ */ s(jt, { openQuestion: n, questions: t.data }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
1288
- }, zt = ({ userSummary: e }) => {
1212
+ }) }), Vt = ({ store: e, openQuestion: n }) => {
1213
+ const o = S(e);
1214
+ return o != null && o.data ? /* @__PURE__ */ s(Pt, { openQuestion: n, questions: o.data }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
1215
+ }, Ot = ({ userSummary: e }) => {
1289
1216
  var n;
1290
- const [t, o] = N(void 0);
1291
- return G(() => {
1292
- const r = e.subscribe((p) => {
1293
- p != null && p.data && o(p.data);
1217
+ const [o, i] = E(void 0);
1218
+ return ee(() => {
1219
+ const a = e.subscribe((p) => {
1220
+ p != null && p.data && i(p.data);
1294
1221
  });
1295
1222
  return () => {
1296
- r();
1223
+ a();
1297
1224
  };
1298
- }, [e]), t != null && t.summary ? /* @__PURE__ */ s($e, { ...t.summary, successRate: (n = t.percentage) == null ? void 0 : n.correct }) : /* @__PURE__ */ s("div", { children: "wait user..." });
1299
- }, Ft = ({ gamification: e, className: n, scrollStore: t, scrollNode: o, appNode: r, style: p, responsiveStore: d, headerNode: l }) => {
1300
- const [c, m] = N(!1), [u, f] = N(Y.HOME), [, I] = qe(), { sdkInScrollView: C } = D(d, { keys: ["sdkInScrollView"] }), R = (T) => {
1301
- I(() => {
1302
- var S;
1303
- f(T), C === !1 && (((S = r.current) == null ? void 0 : S.getBoundingClientRect().y) || 0) < 0 && fe(r, { behavior: "instant" });
1225
+ }, [e]), o != null && o.summary ? /* @__PURE__ */ s(ve, { ...o.summary, successRate: (n = o.percentage) == null ? void 0 : n.correct }) : /* @__PURE__ */ s("div", { children: "wait user..." });
1226
+ }, Qt = ({ gamification: e, className: n, scrollStore: o, scrollNode: i, appNode: a, style: p, responsiveStore: c, headerNode: l }) => {
1227
+ const { tabsShown: d } = S(o, { keys: ["tabsShown"] }), [u, h] = E(Y.HOME), [, C] = we(), { sdkInDesktopView: I } = S(c, { keys: ["sdkInDesktopView"] }), f = (T) => {
1228
+ C(() => {
1229
+ var b;
1230
+ h(T), I === !1 && (((b = a.current) == null ? void 0 : b.getBoundingClientRect().y) || 0) < 0 && Ve(a, { behavior: "instant" });
1304
1231
  });
1305
- }, A = (T) => {
1306
- I(() => m(T));
1307
1232
  };
1308
- G(() => t.listen((T) => {
1233
+ ee(() => o.listen((T) => {
1309
1234
  if (T.scrollPosition === 0) {
1310
- A(!1), t.setKey("tabsShown", !1);
1235
+ o.setKey("tabsShown", !0);
1311
1236
  return;
1312
1237
  }
1313
- A(T.scrollDirection === "forward"), t.setKey("tabsShown", T.scrollDirection !== "forward");
1314
- }), [t]);
1315
- let k = "0px";
1316
- C ? k = c ? "calc(8px - var(--header-height) - var(--header-offset))" : "0px" : k = c ? "calc(var(--header-height) + var(--header-offset))" : "0px";
1317
- const $ = C ? r : l;
1318
- return /* @__PURE__ */ a(Oe, { className: n, style: p, children: [
1238
+ o.setKey("tabsShown", T.scrollDirection === "backward");
1239
+ }), [o]);
1240
+ let w = "0px";
1241
+ I ? w = d ? "0px" : "calc(8px - var(--header-height) - var(--header-offset))" : w = d ? "calc(var(--header-height) + var(--header-offset))" : "0px";
1242
+ const g = I ? a : l;
1243
+ return /* @__PURE__ */ r(Ee, { className: n, style: p, children: [
1319
1244
  /* @__PURE__ */ s(
1320
- Qe,
1245
+ Ne,
1321
1246
  {
1322
1247
  style: {
1323
- top: k
1248
+ top: w
1324
1249
  },
1325
- children: /* @__PURE__ */ s(zn, { activePage: u, toggleActivePage: R })
1250
+ children: /* @__PURE__ */ s(Qn, { activePage: u, toggleActivePage: f })
1326
1251
  }
1327
1252
  ),
1328
- u === Y.HOME && /* @__PURE__ */ a(E, { children: [
1329
- /* @__PURE__ */ s(ve, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ s(Me, { children: /* @__PURE__ */ s(zt, { userSummary: e.userSummary }) }) }),
1330
- /* @__PURE__ */ s(_e, { style: { flex: 1 }, children: /* @__PURE__ */ s(Bt, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
1253
+ u === Y.HOME && /* @__PURE__ */ r(x, { children: [
1254
+ /* @__PURE__ */ s(he, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ s(De, { children: /* @__PURE__ */ s(Ot, { userSummary: e.userSummary }) }) }),
1255
+ /* @__PURE__ */ s(Le, { style: { flex: 1 }, children: /* @__PURE__ */ s(Vt, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
1331
1256
  ] }),
1332
- u === Y.LEADERBOARD && /* @__PURE__ */ s(Ue, { children: /* @__PURE__ */ s(
1333
- At,
1257
+ u === Y.LEADERBOARD && /* @__PURE__ */ s(Pe, { children: /* @__PURE__ */ s(
1258
+ mt,
1334
1259
  {
1335
- renderClipBoardNode: $,
1336
- scrollStore: t,
1337
- scrollNode: o,
1260
+ renderClipBoardNode: g,
1261
+ scrollStore: o,
1262
+ scrollNode: i,
1338
1263
  gamification: e
1339
1264
  }
1340
1265
  ) })
1341
1266
  ] });
1342
- }, Wt = () => je, ue = /* @__PURE__ */ i(Wt())({
1267
+ }, Mt = () => Qe, le = /* @__PURE__ */ t(Mt())({
1343
1268
  name: "OpenedContainer",
1344
1269
  class: "oar61gl",
1345
1270
  propsAsIs: !0
1346
- }), Zt = /* @__PURE__ */ i("div")({
1271
+ }), _t = /* @__PURE__ */ t("div")({
1347
1272
  name: "UserContainer",
1348
1273
  class: "u14zaal4",
1349
1274
  propsAsIs: !1
1350
- }), Ht = ({
1275
+ }), jt = ({
1351
1276
  correct: e,
1352
1277
  incorrect: n
1353
1278
  }) => {
1354
- const t = e + n;
1355
- return t === 0 ? 0 : Math.round(e / t * 100);
1356
- }, Yt = `
1357
- body {
1358
- overflow: hidden
1359
- }
1360
- `, pi = ({
1279
+ const o = e + n;
1280
+ return o === 0 ? 0 : Math.round(e / o * 100);
1281
+ }, to = ({
1361
1282
  gamification: e,
1362
1283
  scrollStore: n,
1363
- className: t,
1364
- appNode: o,
1365
- scrollNode: r,
1284
+ className: o,
1285
+ appNode: i,
1286
+ scrollNode: a,
1366
1287
  headerNode: p,
1367
- responsiveStore: d
1288
+ responsiveStore: c
1368
1289
  }) => {
1369
- const l = D(e.openedQuestion.$store), c = D(e.openedUser), {
1370
- sdkInScrollView: m
1371
- } = D(d, {
1372
- keys: ["sdkInScrollView"]
1373
- }), u = Ee(0), [f, I] = q(() => {
1290
+ const l = S(e.openedQuestion.$store), d = S(e.openedUser), {
1291
+ sdkInDesktopView: u
1292
+ } = S(c, {
1293
+ keys: ["sdkInDesktopView"]
1294
+ }), h = N(() => {
1374
1295
  var C;
1375
- const R = m ? o : p, A = (((C = o.current) == null ? void 0 : C.getBoundingClientRect().y) || 0) < 0;
1376
- if ((l || c) && R.current) {
1377
- A && (u.current = window.scrollY);
1378
- const k = () => (G(() => {
1379
- const $ = setTimeout(() => {
1380
- fe(o, {
1381
- behavior: "instant"
1382
- });
1383
- }, 1e3);
1384
- return () => {
1385
- clearTimeout($), u.current !== 0 && (window.scroll({
1386
- top: u.current
1387
- }), u.current = 0);
1388
- };
1389
- }, []), /* @__PURE__ */ s("style", {
1390
- children: Yt
1391
- }));
1392
- return [A, l ? re.createPortal(/* @__PURE__ */ a(ue, {
1393
- className: t,
1394
- children: [/* @__PURE__ */ s(Mn, {
1395
- gamification: e
1396
- }), A && !m && /* @__PURE__ */ s(k, {})]
1397
- }), R.current) : c ? re.createPortal(/* @__PURE__ */ s(ue, {
1398
- className: t,
1399
- children: /* @__PURE__ */ a(Zt, {
1400
- children: [/* @__PURE__ */ s(Ce, {
1401
- label: "Friend's Rank",
1402
- close: e.closeUser
1403
- }), /* @__PURE__ */ s(ve, {
1404
- children: /* @__PURE__ */ s($e, {
1405
- ...c,
1406
- successRate: Ht(c)
1407
- })
1408
- })]
1409
- })
1410
- }), R.current) : null];
1411
- }
1412
- return [A, null];
1413
- }, [o, t, e, p, l, c, m]);
1414
- return /* @__PURE__ */ a(E, {
1415
- children: [I, /* @__PURE__ */ s(Ft, {
1416
- appNode: o,
1296
+ const I = (((C = i.current) == null ? void 0 : C.getBoundingClientRect().y) || 0) < 0;
1297
+ if (!i.current || !l && !d)
1298
+ return null;
1299
+ const f = l ? /* @__PURE__ */ s(le, {
1300
+ className: o,
1301
+ children: /* @__PURE__ */ s(Dn, {
1302
+ gamification: e
1303
+ })
1304
+ }) : d ? /* @__PURE__ */ s(le, {
1305
+ className: o,
1306
+ children: /* @__PURE__ */ r(_t, {
1307
+ children: [/* @__PURE__ */ s(Ie, {
1308
+ label: "Friend's Rank",
1309
+ close: e.closeUser
1310
+ }), /* @__PURE__ */ s(he, {
1311
+ children: /* @__PURE__ */ s(ve, {
1312
+ ...d,
1313
+ successRate: jt(d)
1314
+ })
1315
+ })]
1316
+ })
1317
+ }) : null;
1318
+ return Oe({
1319
+ Modal: f,
1320
+ container: i,
1321
+ useContainer: !u,
1322
+ fixedView: I
1323
+ });
1324
+ }, [i, o, e, l, d, u]);
1325
+ return /* @__PURE__ */ r(x, {
1326
+ children: [h, /* @__PURE__ */ s(Qt, {
1327
+ appNode: i,
1417
1328
  headerNode: p,
1418
1329
  scrollStore: n,
1419
- scrollNode: r,
1420
- className: t,
1330
+ scrollNode: a,
1331
+ className: o,
1421
1332
  gamification: e,
1422
- responsiveStore: d,
1423
- style: !m && !f && I !== null ? {
1424
- height: "0",
1425
- overflow: "hidden"
1426
- } : {}
1333
+ responsiveStore: c
1427
1334
  })]
1428
1335
  });
1429
1336
  };
1430
1337
  export {
1431
- pi as default
1338
+ to as default
1432
1339
  };