@platform-x/hcltechx-mfe-wrapper 2.0.10 → 2.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/{ArticleVodListComponent-BMGpjV5_.mjs → ArticleVodListComponent-DF2fUARb.mjs} +2 -2
  2. package/ChallengeDetailComponent-Bk6J5D1N.mjs +144 -0
  3. package/{ChallengeSliderComponent-BxwED251.mjs → ChallengeSliderComponent-Cl3JzeUT.mjs} +3 -3
  4. package/{CommonContentComponent-1QjuWDQY.mjs → CommonContentComponent-TFMxZU7l.mjs} +4 -4
  5. package/{DailyMotion-Ddy5WURp.mjs → DailyMotion-hnuvt9Up.mjs} +2 -2
  6. package/{EngagementHomeComponent-e0g7O5o_.mjs → EngagementHomeComponent-Pfxvw5Qm.mjs} +3 -3
  7. package/{EventDetailComponent-XFZ1HmLW.mjs → EventDetailComponent-QCU0QBKk.mjs} +3 -3
  8. package/EventListComponent-Cojz0QjQ.mjs +84 -0
  9. package/{ExperienceZone-CMxuO14J.mjs → ExperienceZone-DaFgwuAg.mjs} +11 -11
  10. package/{ExperienceZoneComponent-BAETbRY2.mjs → ExperienceZoneComponent-CtNZcqUk.mjs} +3 -3
  11. package/{Facebook-CbEGMN9B.mjs → Facebook-9-9UWZlO.mjs} +11 -11
  12. package/{FilePlayer-BN4BqRAJ.mjs → FilePlayer-BVNQab1w.mjs} +2 -2
  13. package/IndividualChallengeComponent-OgdIaKOB.mjs +203 -0
  14. package/{Kaltura-DGBjofkY.mjs → Kaltura-wSM-2IO5.mjs} +2 -2
  15. package/{Mapping-jqmNMEpL.mjs → Mapping-B5imuw10.mjs} +2 -1
  16. package/{Mixcloud-_wHS15Ve.mjs → Mixcloud-BDTnWB7c.mjs} +2 -2
  17. package/{Mux-B9IYv3cJ.mjs → Mux-CMsNR-Ed.mjs} +2 -2
  18. package/{PageComponent-DI5tSi6D.mjs → PageComponent-COY6EaoM.mjs} +3 -3
  19. package/{Preview-DkgVYD07.mjs → Preview-c4OWKSh6.mjs} +1 -1
  20. package/{RecentCarousel-Dygz6_ES.mjs → RecentCarousel-DfDvRjDs.mjs} +2 -2
  21. package/{Share-GxyXHORv.mjs → Share-CaJc5ajl.mjs} +431 -632
  22. package/{SoundCloud-fUr60d-U.mjs → SoundCloud-CoOTT-mw.mjs} +10 -10
  23. package/{Streamable-COxq-CUx.mjs → Streamable-yzjY8yT0.mjs} +2 -2
  24. package/ToggleButton-CZ1_YTkH.mjs +61983 -0
  25. package/{Twitch-BBlyCEoi.mjs → Twitch-C07y3R_-.mjs} +2 -2
  26. package/{Vidyard-Hv6RSj_W.mjs → Vidyard-zr3dpYOa.mjs} +2 -2
  27. package/{Vimeo-bqiO6WmR.mjs → Vimeo-BeNaVtI9.mjs} +2 -2
  28. package/{Wistia-Cd2g1HZY.mjs → Wistia-CXGFwlBf.mjs} +2 -2
  29. package/{YouTube-6rN0JkB9.mjs → YouTube-CZU4W6TC.mjs} +2 -2
  30. package/{index-CEf68FxI.mjs → index-BkV6Jknw.mjs} +5248 -3265
  31. package/index-DD-zhzlc.mjs +700 -0
  32. package/index.mjs +1 -1
  33. package/lib/services/ApiConfig.d.ts +1 -1
  34. package/lib/services/fetchQueries.d.ts +2 -2
  35. package/lib/utils/Mapping.d.ts +1 -0
  36. package/lib/utils/helper.d.ts +1 -0
  37. package/{mutateApi-B9-WjAQ7.mjs → mutateApi-BcwOxJGQ.mjs} +1 -1
  38. package/package.json +1 -1
  39. package/ChallengeDetailComponent-s44WjoJ1.mjs +0 -141
  40. package/EventListComponent-CEPQ2UEY.mjs +0 -83
  41. package/IndividualChallengeComponent-3ztKlQ7_.mjs +0 -200
  42. package/ToggleButton-D1B8HAID.mjs +0 -242830
  43. package/index-rDaw8Y8N.mjs +0 -64
@@ -1,7 +1,7 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { A as p } from "./ToggleButton-D1B8HAID.mjs";
2
+ import { A as p } from "./ToggleButton-CZ1_YTkH.mjs";
3
3
  import "react";
4
- import "./index-CEf68FxI.mjs";
4
+ import "./index-BkV6Jknw.mjs";
5
5
  import "react-dom";
6
6
  const f = ({
7
7
  data: t,
@@ -0,0 +1,144 @@
1
+ import { jsx as Z } from "react/jsx-runtime";
2
+ import { b as $ } from "./ToggleButton-CZ1_YTkH.mjs";
3
+ import { useState as a, useEffect as R } from "react";
4
+ import { s as u, f as C } from "./index-BkV6Jknw.mjs";
5
+ import { m as ee } from "./mutateApi-BcwOxJGQ.mjs";
6
+ import "react-dom";
7
+ const ie = (T) => {
8
+ var B;
9
+ const {
10
+ pageData: r = {},
11
+ secondaryArgs: A,
12
+ prelemAnalyticsProp: G,
13
+ prelemAuthoringHelper: j,
14
+ userId: P,
15
+ filters: D
16
+ } = T || {}, {
17
+ prelemBaseEndpoint: { language: m, site_host: h }
18
+ } = A, [b, f] = a(!1), [p, w] = a(!1), [U, k] = a(0), [J, x] = a(0), [L, H] = a([]), [K, v] = a(!1), [N, O] = a({}), [q, z] = a("0"), [E, F] = a(0), [M, Q] = a(0), _ = r != null && r.target_type && (r == null ? void 0 : r.target_type) !== "" ? (B = JSON.parse(r == null ? void 0 : r.target_type)[0]) == null ? void 0 : B.label : "steps", d = localStorage.getItem("userId") || P, V = async (c) => {
19
+ var n, l, i, o;
20
+ if (!d) {
21
+ u("User ID is not available. Please log in.");
22
+ return;
23
+ }
24
+ try {
25
+ f(!0);
26
+ const t = {
27
+ input: {
28
+ ...c,
29
+ userId: d
30
+ }
31
+ }, e = await ee.joinChallenge(t, m, h);
32
+ ((n = e == null ? void 0 : e.errors) == null ? void 0 : n.length) > 0 ? u((l = e == null ? void 0 : e.errors[0]) == null ? void 0 : l.message) : (o = (i = e == null ? void 0 : e.data) == null ? void 0 : i.community_joinChallenge) != null && o.id ? (w(!0), await S(), await I(), v(!0)) : console.error("Join Challenge API failed");
33
+ } catch (t) {
34
+ console.error("Error in Join Challenge API:", t);
35
+ } finally {
36
+ f(!1);
37
+ }
38
+ }, S = async () => {
39
+ var c, n, l, i;
40
+ if (!d) {
41
+ u("User ID is not available. Please log in.");
42
+ return;
43
+ }
44
+ try {
45
+ f(!0);
46
+ let o = {};
47
+ _ === "Km" || _ === "miles" ? o = {
48
+ challenge_id: r == null ? void 0 : r.page,
49
+ user_id: localStorage.getItem("userId") || P,
50
+ target_type: _
51
+ } : o = {
52
+ challenge_id: r == null ? void 0 : r.page,
53
+ user_id: localStorage.getItem("userId") || P
54
+ };
55
+ const t = await C.getChallengeDetails(o, m, h);
56
+ if (((c = t == null ? void 0 : t.errors) == null ? void 0 : c.length) > 0)
57
+ u((n = t == null ? void 0 : t.errors[0]) == null ? void 0 : n.message);
58
+ else if ((l = t == null ? void 0 : t.data) != null && l.community_challengesDetail) {
59
+ const {
60
+ total_participant: e,
61
+ is_joined: g,
62
+ user_steps: s = 0,
63
+ total_distance_covered: y = "0"
64
+ } = (i = t == null ? void 0 : t.data) == null ? void 0 : i.community_challengesDetail;
65
+ w(g), k(e), x(s), z(y);
66
+ } else
67
+ console.error("GetEventDetails API failed");
68
+ } catch (o) {
69
+ console.error("Error in GetEventDetails API:", o);
70
+ } finally {
71
+ f(!1);
72
+ }
73
+ }, I = async (c = !1) => {
74
+ var n, l, i, o, t;
75
+ try {
76
+ f(!0);
77
+ const g = {
78
+ challenge_id: r == null ? void 0 : r.page,
79
+ user_id: d,
80
+ pagination: c ? { start: 0, rows: 10 } : { start: E, rows: 10 }
81
+ }, s = await C.getLeaderBoardList(g, m, h);
82
+ if (((n = s == null ? void 0 : s.errors) == null ? void 0 : n.length) > 0)
83
+ u((l = s == null ? void 0 : s.errors[0]) == null ? void 0 : l.message);
84
+ else if ((o = (i = s == null ? void 0 : s.data) == null ? void 0 : i.community_getLeaderBoardList) != null && o.records) {
85
+ const { records: y, total_count: Y } = (t = s == null ? void 0 : s.data) == null ? void 0 : t.community_getLeaderBoardList;
86
+ H(c ? y : [...L, ...y]), F(c ? 10 : E + 10), Q(Y);
87
+ } else
88
+ console.error("GetLeaderBoardList API failed");
89
+ } catch (e) {
90
+ console.error("Error in GetLeaderBoardList API:", e);
91
+ } finally {
92
+ f(!1);
93
+ }
94
+ }, W = async (c = "") => {
95
+ var n, l, i, o;
96
+ try {
97
+ f(!0);
98
+ const t = {
99
+ date: c,
100
+ user_id: d
101
+ }, e = await C.fetchPersonalTracker(t, m, h);
102
+ if (((n = e == null ? void 0 : e.errors) == null ? void 0 : n.length) > 0)
103
+ u((l = e == null ? void 0 : e.errors[0]) == null ? void 0 : l.message);
104
+ else if ((i = e == null ? void 0 : e.data) != null && i.community_fetchPersonalTracker) {
105
+ const { device_info: g } = (o = e == null ? void 0 : e.data) == null ? void 0 : o.community_fetchPersonalTracker;
106
+ O(g);
107
+ } else
108
+ console.error("GetPersonalData API failed"), u("GetPersonalData API failed");
109
+ } catch (t) {
110
+ console.error("Error in GetPersonalData API:", t);
111
+ } finally {
112
+ f(!1);
113
+ }
114
+ }, X = {
115
+ joinChallenge: V,
116
+ loading: b,
117
+ isEnrolled: p,
118
+ enrolledParticipants: U,
119
+ userAchieved: J,
120
+ leaderBoardList: L,
121
+ showPopup: K,
122
+ setShowPopup: v,
123
+ deviceInfo: N,
124
+ userAchievedDistance: q,
125
+ totalParticipateCount: M
126
+ };
127
+ return R(() => {
128
+ r != null && r.page && (S(), I(), W());
129
+ }, [r]), /* @__PURE__ */ Z(
130
+ $,
131
+ {
132
+ content: r,
133
+ analytics: G,
134
+ authoringHelper: j,
135
+ secondaryArgs: A,
136
+ challengeDetails: X,
137
+ filters: D,
138
+ getLeaderBoardList: I
139
+ }
140
+ );
141
+ };
142
+ export {
143
+ ie as default
144
+ };
@@ -1,8 +1,8 @@
1
1
  import { jsx as W } from "react/jsx-runtime";
2
- import { f as X, C as Y } from "./ToggleButton-D1B8HAID.mjs";
2
+ import { f as X, C as Y } from "./ToggleButton-CZ1_YTkH.mjs";
3
3
  import { useState as a, useEffect as Z } from "react";
4
- import { C as $, f as _, s as c, a as V } from "./index-CEf68FxI.mjs";
5
- import { m as R } from "./mutateApi-B9-WjAQ7.mjs";
4
+ import { C as $, f as _, s as c, a as V } from "./index-BkV6Jknw.mjs";
5
+ import { m as R } from "./mutateApi-BcwOxJGQ.mjs";
6
6
  import "react-dom";
7
7
  const ae = (T) => {
8
8
  var I, P, A;
@@ -1,12 +1,12 @@
1
1
  import { jsx as O } from "react/jsx-runtime";
2
2
  import j, { memo as x, useState as g, useEffect as J } from "react";
3
- import { F as M, f as N, s as w } from "./index-CEf68FxI.mjs";
4
- import { m as $ } from "./mutateApi-B9-WjAQ7.mjs";
5
- import { M as T } from "./Mapping-jqmNMEpL.mjs";
3
+ import { F as M, f as N, s as w } from "./index-BkV6Jknw.mjs";
4
+ import { m as $ } from "./mutateApi-BcwOxJGQ.mjs";
5
+ import { M as T } from "./Mapping-B5imuw10.mjs";
6
6
  import "react-dom";
7
7
  const c = {};
8
8
  Object.keys(T).forEach((l) => (c[l] = j.lazy(
9
- () => import("./index-rDaw8Y8N.mjs").then((t) => ({
9
+ () => import("./index-DD-zhzlc.mjs").then((t) => ({
10
10
  default: t[T[l]]
11
11
  }))
12
12
  ), c));
@@ -1,6 +1,6 @@
1
- import { n as P } from "./index-CEf68FxI.mjs";
1
+ import { l as P } from "./index-BkV6Jknw.mjs";
2
2
  import v from "react";
3
- import { z as D, F as O } from "./ToggleButton-D1B8HAID.mjs";
3
+ import { z as D, F as O } from "./ToggleButton-CZ1_YTkH.mjs";
4
4
  function b(t, e) {
5
5
  for (var r = 0; r < e.length; r++) {
6
6
  const o = e[r];
@@ -1,8 +1,8 @@
1
1
  import { jsx as ee } from "react/jsx-runtime";
2
- import { f as te, a as oe } from "./ToggleButton-D1B8HAID.mjs";
2
+ import { f as te, a as oe } from "./ToggleButton-CZ1_YTkH.mjs";
3
3
  import { useState as o, useEffect as ae } from "react";
4
- import { C as ne, f as k, s as i, a as se } from "./index-CEf68FxI.mjs";
5
- import { m as re } from "./mutateApi-B9-WjAQ7.mjs";
4
+ import { C as ne, f as k, s as i, a as se } from "./index-BkV6Jknw.mjs";
5
+ import { m as re } from "./mutateApi-BcwOxJGQ.mjs";
6
6
  import "react-dom";
7
7
  const A = async (D, d, I, u = "", t = "wellnessevent") => {
8
8
  var g, h, n, s;
@@ -1,8 +1,8 @@
1
1
  import { jsx as U } from "react/jsx-runtime";
2
- import { c as V } from "./ToggleButton-D1B8HAID.mjs";
2
+ import { c as V } from "./ToggleButton-CZ1_YTkH.mjs";
3
3
  import { useState as a, useEffect as p } from "react";
4
- import { f as q, s as d, a as I } from "./index-CEf68FxI.mjs";
5
- import { m as z } from "./mutateApi-B9-WjAQ7.mjs";
4
+ import { f as q, s as d, a as I } from "./index-BkV6Jknw.mjs";
5
+ import { m as z } from "./mutateApi-BcwOxJGQ.mjs";
6
6
  import "react-dom";
7
7
  const Z = (h) => {
8
8
  const {
@@ -0,0 +1,84 @@
1
+ import { jsx as U } from "react/jsx-runtime";
2
+ import { E as j, f as B } from "./ToggleButton-CZ1_YTkH.mjs";
3
+ import { useState as n, useEffect as H } from "react";
4
+ import { C as O, s as r, f as q, a as z } from "./index-BkV6Jknw.mjs";
5
+ import { m as F } from "./mutateApi-BcwOxJGQ.mjs";
6
+ import "react-dom";
7
+ const Y = ({
8
+ data: h,
9
+ prelemAnalyticsProp: y,
10
+ prelemAuthoringHelper: S,
11
+ secondaryArgs: f,
12
+ userId: m,
13
+ filters: P,
14
+ relativePath: p
15
+ }) => {
16
+ const [w, I] = n({}), [C, D] = n({}), [T, E] = n({}), [_, u] = n(!1), [v, k] = n(0), {
17
+ prelemBaseEndpoint: { language: g, site_host: d }
18
+ } = f, l = localStorage.getItem("userId") || m, G = async (i, t, c) => {
19
+ var s, o;
20
+ if (!l) {
21
+ r("User ID is not available. Please log in.");
22
+ return;
23
+ }
24
+ try {
25
+ const e = {
26
+ input: { activity_type: c, target: i.toString(), action: t },
27
+ user_id: l
28
+ }, a = await F.setPersonalGoal(e, g, d);
29
+ ((o = (s = a == null ? void 0 : a.data) == null ? void 0 : s.community_setPersonalGoal) == null ? void 0 : o.message) === "Created Successfully!!!" && t === "goal" ? z("Goal updated successfully!") : t !== "entry" && console.error("Something went wrong !");
30
+ } catch (e) {
31
+ console.error("Error in update goal API:", e), r("Something went wrong, please try after sometime !");
32
+ }
33
+ }, A = async () => {
34
+ var i, t, c, s;
35
+ if (!l) {
36
+ r("User ID is not available. Please log in.");
37
+ return;
38
+ }
39
+ try {
40
+ u(!0);
41
+ const o = {
42
+ date: B(/* @__PURE__ */ new Date(), "yyyy-MM-dd"),
43
+ user_id: l
44
+ }, e = await q.fetchPersonalTracker(o, g, d);
45
+ if (((i = e == null ? void 0 : e.errors) == null ? void 0 : i.length) > 0)
46
+ r((t = e == null ? void 0 : e.errors[0]) == null ? void 0 : t.message);
47
+ else if ((c = e == null ? void 0 : e.data) != null && c.community_fetchPersonalTracker) {
48
+ const { steps: a, calories: b, distance: x, individual_challenge_info: M, streak_count: N } = (s = e == null ? void 0 : e.data) == null ? void 0 : s.community_fetchPersonalTracker;
49
+ E(a), I(M), D({ calories: b, distance: x }), k(N);
50
+ } else
51
+ console.error("GetPersonalData API failed");
52
+ } catch (o) {
53
+ r("Something went wrong !"), console.error("Error in GetPersonalData API:", o);
54
+ } finally {
55
+ u(!1);
56
+ }
57
+ }, L = {
58
+ stepsData: T,
59
+ loading: _,
60
+ updateGoals: G
61
+ };
62
+ return H(() => {
63
+ A();
64
+ }, []), /* @__PURE__ */ U(
65
+ j,
66
+ {
67
+ content: h,
68
+ analytics: y,
69
+ authoringHelper: S,
70
+ secondaryArgs: f,
71
+ stepsDetails: L,
72
+ filters: P,
73
+ relativePath: p,
74
+ individualChallengeInfo: w,
75
+ commonInfo: C,
76
+ userId: m,
77
+ constants: O,
78
+ streaksCount: v
79
+ }
80
+ );
81
+ };
82
+ export {
83
+ Y as default
84
+ };
@@ -1,20 +1,20 @@
1
1
  import { jsx as s, jsxs as i } from "react/jsx-runtime";
2
- import { a7 as m, a8 as u, a9 as C, B as l, T, k as f, aa as k, ab as v, ac as x, v as b, ad as B } from "./ToggleButton-D1B8HAID.mjs";
2
+ import { aq as S, ar as m, M as C, B as l, T, k as f, $ as k, as as v, at as x, v as B, au as N } from "./ToggleButton-CZ1_YTkH.mjs";
3
3
  const E = ({
4
4
  content: r,
5
5
  analytics: c,
6
- authoringHelper: o,
7
- secondaryArgs: a,
6
+ authoringHelper: a,
7
+ secondaryArgs: o,
8
8
  filters: n,
9
9
  eventData: d
10
10
  }) => {
11
11
  var t;
12
- m(c, r, a);
13
- const p = u(), w = (e) => {
14
- b(e, n, a);
12
+ S(c, r, o);
13
+ const p = m(), w = (e) => {
14
+ B(e, n, o);
15
15
  }, h = (e) => {
16
- B(n, e, a);
17
- }, S = { ...{
16
+ N(n, e, o);
17
+ }, u = { ...{
18
18
  slidesToShow: 4,
19
19
  slidesToScroll: 4,
20
20
  autoPlay: !0,
@@ -53,7 +53,7 @@ const E = ({
53
53
  return /* @__PURE__ */ s(
54
54
  "div",
55
55
  {
56
- ref: o == null ? void 0 : o.innerRef,
56
+ ref: a == null ? void 0 : a.innerRef,
57
57
  className: `${p.ExperienceZoneWrapper} PX-ExperienceZoneBox`,
58
58
  children: /* @__PURE__ */ s(C, { className: "prelem-py", children: /* @__PURE__ */ i(l, { children: [
59
59
  /* @__PURE__ */ i(l, { className: "PX-headerWrapper", children: [
@@ -68,11 +68,11 @@ const E = ({
68
68
  }
69
69
  )
70
70
  ] }),
71
- /* @__PURE__ */ s(k, { ...S, className: "PX-arrowDotSlider", children: (t = v(d, "start_date", "end_date", !1)) == null ? void 0 : t.map((e) => /* @__PURE__ */ s(
71
+ /* @__PURE__ */ s(k, { ...u, className: "PX-arrowDotSlider", children: (t = v(d, "start_date", "end_date", !1)) == null ? void 0 : t.map((e) => /* @__PURE__ */ s(
72
72
  x,
73
73
  {
74
74
  content: e,
75
- secondaryArgs: a,
75
+ secondaryArgs: o,
76
76
  onCardClick: w
77
77
  },
78
78
  e
@@ -1,8 +1,8 @@
1
1
  import { jsx as S } from "react/jsx-runtime";
2
- import "./ToggleButton-D1B8HAID.mjs";
3
- import { E as l } from "./ExperienceZone-CMxuO14J.mjs";
2
+ import "./ToggleButton-CZ1_YTkH.mjs";
3
+ import { E as l } from "./ExperienceZone-DaFgwuAg.mjs";
4
4
  import { useState as T, useEffect as j } from "react";
5
- import { f as k } from "./index-CEf68FxI.mjs";
5
+ import { f as k } from "./index-BkV6Jknw.mjs";
6
6
  import "react-dom";
7
7
  const z = (h) => {
8
8
  var t, c, r;
@@ -1,6 +1,6 @@
1
- import { n as _ } from "./index-CEf68FxI.mjs";
1
+ import { l as _ } from "./index-BkV6Jknw.mjs";
2
2
  import P from "react";
3
- import { z as g, F as m } from "./ToggleButton-D1B8HAID.mjs";
3
+ import { z as g, F as m } from "./ToggleButton-CZ1_YTkH.mjs";
4
4
  function v(t, e) {
5
5
  for (var r = 0; r < e.length; r++) {
6
6
  const o = e[r];
@@ -34,13 +34,13 @@ var O = Object.create, i = Object.defineProperty, D = Object.getOwnPropertyDescr
34
34
  t
35
35
  )), w = (t) => h(i({}, "__esModule", { value: !0 }), t), a = (t, e, r) => (F(t, typeof e != "symbol" ? e + "" : e, r), r), b = {};
36
36
  I(b, {
37
- default: () => l
37
+ default: () => n
38
38
  });
39
- var d = w(b), u = k(P), n = g, L = m;
39
+ var d = w(b), u = k(P), l = g, L = m;
40
40
  const c = "https://connect.facebook.net/en_US/sdk.js", f = "FB", y = "fbAsyncInit", M = "facebook-player-";
41
- class l extends u.Component {
41
+ class n extends u.Component {
42
42
  constructor() {
43
- super(...arguments), a(this, "callPlayer", n.callPlayer), a(this, "playerID", this.props.config.playerId || `${M}${(0, n.randomString)()}`), a(this, "mute", () => {
43
+ super(...arguments), a(this, "callPlayer", l.callPlayer), a(this, "playerID", this.props.config.playerId || `${M}${(0, l.randomString)()}`), a(this, "mute", () => {
44
44
  this.callPlayer("mute");
45
45
  }), a(this, "unmute", () => {
46
46
  this.callPlayer("unmute");
@@ -51,10 +51,10 @@ class l extends u.Component {
51
51
  }
52
52
  load(e, r) {
53
53
  if (r) {
54
- (0, n.getSDK)(c, f, y).then((o) => o.XFBML.parse());
54
+ (0, l.getSDK)(c, f, y).then((o) => o.XFBML.parse());
55
55
  return;
56
56
  }
57
- (0, n.getSDK)(c, f, y).then((o) => {
57
+ (0, l.getSDK)(c, f, y).then((o) => {
58
58
  o.init({
59
59
  appId: this.props.config.appId,
60
60
  xfbml: !0,
@@ -109,9 +109,9 @@ class l extends u.Component {
109
109
  );
110
110
  }
111
111
  }
112
- a(l, "displayName", "Facebook");
113
- a(l, "canPlay", L.canPlay.facebook);
114
- a(l, "loopOnEnded", !0);
112
+ a(n, "displayName", "Facebook");
113
+ a(n, "canPlay", L.canPlay.facebook);
114
+ a(n, "loopOnEnded", !0);
115
115
  const x = /* @__PURE__ */ _(d), R = /* @__PURE__ */ v({
116
116
  __proto__: null,
117
117
  default: x
@@ -1,6 +1,6 @@
1
- import { n as b } from "./index-CEf68FxI.mjs";
1
+ import { l as b } from "./index-BkV6Jknw.mjs";
2
2
  import _ from "react";
3
- import { z as O, F as A } from "./ToggleButton-D1B8HAID.mjs";
3
+ import { z as O, F as A } from "./ToggleButton-CZ1_YTkH.mjs";
4
4
  function R(s, e) {
5
5
  for (var t = 0; t < e.length; t++) {
6
6
  const i = e[t];
@@ -0,0 +1,203 @@
1
+ import { jsx as ue } from "react/jsx-runtime";
2
+ import { I as ge } from "./ToggleButton-CZ1_YTkH.mjs";
3
+ import { useState as g, useEffect as de } from "react";
4
+ import { C as fe, g as he, f as C, s as f, a as B } from "./index-BkV6Jknw.mjs";
5
+ import { m as j } from "./mutateApi-BcwOxJGQ.mjs";
6
+ import "react-dom";
7
+ const Pe = (D) => {
8
+ const {
9
+ pageData: l = {},
10
+ secondaryArgs: I,
11
+ prelemAnalyticsProp: U,
12
+ prelemAuthoringHelper: k,
13
+ userId: P,
14
+ cugId: b,
15
+ filters: x
16
+ } = D || {}, {
17
+ prelemBaseEndpoint: { site_host: h, language: m }
18
+ } = I, y = localStorage.getItem("userId") || P, [H, d] = g(!1), [J, v] = g(!1), [N, O] = g(0), [z, F] = g(0), [A, K] = g([]), [M, S] = g([]), [Q, V] = g([]), [W, w] = g({}), [X, Y] = g({}), [Z, $] = g([]), [p, L] = g(!1), [R, ee] = g({}), [q, te] = g(0), [re, oe] = g(0), se = async (u) => {
19
+ var s, i, n, o, r, e;
20
+ try {
21
+ d(!0);
22
+ const c = {
23
+ input: {
24
+ ...u,
25
+ userId: y
26
+ }
27
+ }, t = await j.joinChallenge(c, m, h);
28
+ ((s = t == null ? void 0 : t.errors) == null ? void 0 : s.length) > 0 ? f((i = t == null ? void 0 : t.errors[0]) == null ? void 0 : i.message) : (o = (n = t == null ? void 0 : t.data) == null ? void 0 : n.community_joinChallenge) != null && o.id ? (B((e = (r = t == null ? void 0 : t.data) == null ? void 0 : r.community_joinChallenge) == null ? void 0 : e.message), v(!0), _()) : console.error("Join Challenge API failed");
29
+ } catch (c) {
30
+ console.error("Error in Join Challenge API:", c);
31
+ } finally {
32
+ d(!1);
33
+ }
34
+ }, _ = async () => {
35
+ var u, s, i, n;
36
+ try {
37
+ d(!0), L(!0);
38
+ const o = {
39
+ challenge_id: l == null ? void 0 : l.page,
40
+ user_id: y,
41
+ challenge_type: "individual",
42
+ derived_challenge_id: he("derived_challenge_id")
43
+ }, r = await C.getChallengeDetails(o, m, h);
44
+ if (((u = r == null ? void 0 : r.errors) == null ? void 0 : u.length) > 0)
45
+ f((s = r == null ? void 0 : r.errors[0]) == null ? void 0 : s.message);
46
+ else if ((i = r == null ? void 0 : r.data) != null && i.community_challengesDetail) {
47
+ const {
48
+ total_participant: e,
49
+ is_joined: c,
50
+ user_steps: t = 0,
51
+ derivedChallenges: a
52
+ } = (n = r == null ? void 0 : r.data) == null ? void 0 : n.community_challengesDetail;
53
+ v(c), O(e), F(t), $(a);
54
+ } else
55
+ console.error("GetChallengeDetails API failed");
56
+ } catch (o) {
57
+ console.error("Error in GetChallengeDetails API:", o), L(!1);
58
+ } finally {
59
+ d(!1), L(!1);
60
+ }
61
+ }, T = async (u = "") => {
62
+ var s, i, n, o;
63
+ try {
64
+ d(!0);
65
+ const r = {
66
+ date: u,
67
+ user_id: y
68
+ }, e = await C.fetchPersonalTracker(r, m, h);
69
+ if (((s = e == null ? void 0 : e.errors) == null ? void 0 : s.length) > 0)
70
+ f((i = e == null ? void 0 : e.errors[0]) == null ? void 0 : i.message);
71
+ else if ((n = e == null ? void 0 : e.data) != null && n.community_fetchPersonalTracker) {
72
+ const { steps: c, device_info: t, individual_challenge_info: a } = (o = e == null ? void 0 : e.data) == null ? void 0 : o.community_fetchPersonalTracker;
73
+ w(c), Y(t), ee(a);
74
+ } else
75
+ console.error("GetPersonalData API failed"), f("GetPersonalData API failed");
76
+ } catch (r) {
77
+ console.error("Error in GetPersonalData API:", r), f("Error in GetPersonalData API"), w({});
78
+ } finally {
79
+ d(!1);
80
+ }
81
+ }, ne = async (u, s = !1) => {
82
+ var n, o, r, e, c;
83
+ try {
84
+ d(!0);
85
+ const t = {
86
+ challenge_id: l == null ? void 0 : l.page,
87
+ user_id: y,
88
+ challenge_type: "individual",
89
+ derived_challenge_id: u || "",
90
+ pagination: s ? { start: 0, rows: 10 } : { start: q, rows: 10 }
91
+ }, a = await C.getLeaderBoardList(t, m, h);
92
+ if (((n = a == null ? void 0 : a.errors) == null ? void 0 : n.length) > 0)
93
+ f((o = a == null ? void 0 : a.errors[0]) == null ? void 0 : o.message);
94
+ else if ((e = (r = a == null ? void 0 : a.data) == null ? void 0 : r.community_getLeaderBoardList) != null && e.records) {
95
+ const { records: G, total_count: ae = 0 } = (c = a == null ? void 0 : a.data) == null ? void 0 : c.community_getLeaderBoardList;
96
+ K(s ? G : [...A, ...G]), te(s ? 10 : q + 10), oe(ae);
97
+ } else
98
+ console.error("GetLeaderBoardList API failed");
99
+ } catch (t) {
100
+ console.error("Error in GetLeaderBoardList API:", t);
101
+ } finally {
102
+ d(!1);
103
+ }
104
+ }, le = async (u) => {
105
+ var s, i;
106
+ try {
107
+ const n = {
108
+ input: u
109
+ }, o = await j.setUpChallenge(n, m, h);
110
+ ((i = (s = o == null ? void 0 : o.data) == null ? void 0 : s.community_setupChallenge) == null ? void 0 : i.message) === "challenge has been setUp successfully" ? (B("Challenge has been setup successfully!"), _()) : console.error("Something went wrong !");
111
+ } catch (n) {
112
+ console.error("Error in update goal API:", n), f("Something went wrong, please try after sometime !");
113
+ }
114
+ }, ie = async (u = "", s = !1) => {
115
+ var i, n, o, r, e;
116
+ try {
117
+ d(!0);
118
+ let c = {};
119
+ u !== "" ? c = {
120
+ challenge_id: l == null ? void 0 : l.page,
121
+ user_id: y,
122
+ derived_challenge_id: u,
123
+ viewParticipants: s
124
+ } : c = {
125
+ challenge_id: l == null ? void 0 : l.page,
126
+ user_id: y,
127
+ viewParticipants: s
128
+ };
129
+ const t = await C.getSentRequestList(c, m, h);
130
+ if (((i = t == null ? void 0 : t.errors) == null ? void 0 : i.length) > 0)
131
+ f((n = t == null ? void 0 : t.errors[0]) == null ? void 0 : n.message);
132
+ else if ((r = (o = t == null ? void 0 : t.data) == null ? void 0 : o.community_sentRequests) != null && r.records) {
133
+ const { records: a } = (e = t == null ? void 0 : t.data) == null ? void 0 : e.community_sentRequests;
134
+ S(a);
135
+ } else
136
+ console.error("GetSentRequestList API failed");
137
+ } catch (c) {
138
+ console.error("Error in GetSentRequestList API:", c), S([]);
139
+ } finally {
140
+ d(!1);
141
+ }
142
+ }, E = async () => {
143
+ var u, s, i, n, o;
144
+ try {
145
+ d(!0);
146
+ const r = {
147
+ challenge_id: l == null ? void 0 : l.page,
148
+ user_id: y
149
+ }, e = await C.getReceivedRequestList(r, m, h);
150
+ if (((u = e == null ? void 0 : e.errors) == null ? void 0 : u.length) > 0)
151
+ f((s = e == null ? void 0 : e.errors[0]) == null ? void 0 : s.message);
152
+ else if ((n = (i = e == null ? void 0 : e.data) == null ? void 0 : i.community_receivedRequests) != null && n.records) {
153
+ const { records: c } = (o = e == null ? void 0 : e.data) == null ? void 0 : o.community_receivedRequests;
154
+ V(c);
155
+ } else
156
+ console.error("GetReceivedRequestList API failed");
157
+ } catch (r) {
158
+ console.error("Error in GetReceivedRequestList API:", r);
159
+ } finally {
160
+ d(!1);
161
+ }
162
+ }, ce = {
163
+ joinChallenge: se,
164
+ loading: H,
165
+ isEnrolled: J,
166
+ enrolledParticipants: N,
167
+ userAchieved: z,
168
+ leaderBoardList: A,
169
+ stepsData: W,
170
+ setUpChallenge: le,
171
+ sentRequestList: M,
172
+ receivedRequestList: Q,
173
+ getSentRequestList: ie,
174
+ getReceivedRequestList: E,
175
+ getChallengeDetails: _,
176
+ derivedChallenge: Z,
177
+ deviceInfo: X,
178
+ pageLoader: p,
179
+ fetchPersonalData: T,
180
+ individualChallengeInfo: R,
181
+ getLeaderBoardList: ne,
182
+ totalParticipateCount: re
183
+ };
184
+ return de(() => {
185
+ l != null && l.page && (_(), T(), E());
186
+ }, [l]), /* @__PURE__ */ ue(
187
+ ge,
188
+ {
189
+ content: l,
190
+ analytics: U,
191
+ authoringHelper: k,
192
+ secondaryArgs: I,
193
+ challengeDetails: ce,
194
+ userId: P,
195
+ cugId: b,
196
+ filters: x,
197
+ constants: fe
198
+ }
199
+ );
200
+ };
201
+ export {
202
+ Pe as default
203
+ };
@@ -1,6 +1,6 @@
1
- import { n as f } from "./index-CEf68FxI.mjs";
1
+ import { l as f } from "./index-BkV6Jknw.mjs";
2
2
  import y from "react";
3
- import { z as _, F as m } from "./ToggleButton-D1B8HAID.mjs";
3
+ import { z as _, F as m } from "./ToggleButton-CZ1_YTkH.mjs";
4
4
  function P(r, e) {
5
5
  for (var t = 0; t < e.length; t++) {
6
6
  const o = e[t];
@@ -24,7 +24,8 @@ const e = {
24
24
  Prelem_0120: "ServiceCardActivity",
25
25
  Prelem_0119: "DynamicVideo",
26
26
  Prelem_0121: "ToggleButton",
27
- Prelem_0122: "ConnectWithUs"
27
+ Prelem_0122: "ConnectWithUs",
28
+ Prelem_0129: "Faq2"
28
29
  };
29
30
  export {
30
31
  e as M
@@ -1,6 +1,6 @@
1
- import { n as f } from "./index-CEf68FxI.mjs";
1
+ import { l as f } from "./index-BkV6Jknw.mjs";
2
2
  import y from "react";
3
- import { z as m, F as g } from "./ToggleButton-D1B8HAID.mjs";
3
+ import { z as m, F as g } from "./ToggleButton-CZ1_YTkH.mjs";
4
4
  function v(t, e) {
5
5
  for (var r = 0; r < e.length; r++) {
6
6
  const s = e[r];