@cuemath/leap 2.8.37-rj-2 → 2.8.37-rj-beta-0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/lottie/lottie.js +2 -0
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/circle-games/enum/circle-onboarding-steps.js +1 -1
- package/dist/features/circle-games/enum/circle-onboarding-steps.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode-styled.js +3 -3
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode-styled.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode.js +29 -35
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode-star/table-mode-star-styled.js +25 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode-star/table-mode-star-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode-star/table-mode-star.js +57 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode-star/table-mode-star.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-segment-star/table-segment-star-styled.js +27 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-segment-star/table-segment-star-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-segment-star/table-segment-star.js +37 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-segment-star/table-segment-star.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js +35 -42
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js +152 -135
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js.map +1 -1
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js +3 -3
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js.map +1 -1
- package/dist/features/circle-games/game-launcher/game-launcher.js +30 -29
- package/dist/features/circle-games/game-launcher/game-launcher.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js +61 -53
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +1 -1
- package/dist/features/post-game-stats/digital-meter/digital-meter-styled.js +24 -24
- package/dist/features/post-game-stats/digital-meter/digital-meter-styled.js.map +1 -1
- package/dist/features/post-game-stats/digital-meter/digital-meter.js +119 -88
- package/dist/features/post-game-stats/digital-meter/digital-meter.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +148 -142
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
- package/dist/index.d.ts +16 -2
- package/dist/static/table-mode-star.b8a1d762.json +1 -0
- package/dist/static/table-segment-star.78e851d6.json +1 -0
- package/package.json +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star-styled.js +0 -11
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star.js +0 -16
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star.js.map +0 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
2
|
-
import { memo as
|
2
|
+
import { memo as D, useState as v, useRef as x, useCallback as n, useMemo as N, useEffect as J } from "react";
|
3
3
|
import { LOTTIE as U } from "../../../assets/lottie/lottie.js";
|
4
4
|
import { JOURNEY_ID_STUDENT as h } from "../../journey/journey-id/journey-id-student.js";
|
5
5
|
import { CircularLoader as Y } from "../../ui/loader/circular-loader/circular-loader.js";
|
@@ -9,37 +9,37 @@ import { CircleSoundKey as u } from "../hooks/use-circle-sounds/use-circle-sound
|
|
9
9
|
import { GAME_LAUNCHER_SIZE as H } from "./comps/card-container/constants.js";
|
10
10
|
import { Carousel as z } from "./comps/carousel/carousel.js";
|
11
11
|
import { GAME_LAUNCHER_ASSET_PADDING as Z } from "./comps/segmented-game-card/constants.js";
|
12
|
-
import { SegmentedGameCard as
|
12
|
+
import { SegmentedGameCard as a } from "./comps/segmented-game-card/segmented-game-card.js";
|
13
13
|
import { TablesCard as w } from "./comps/tables-card/tables-card.js";
|
14
14
|
import { GAME_LAUNCHER_ANALYTICS_EVENTS as G } from "./game-launcher-analytics-events.js";
|
15
15
|
import { useGameLauncherJourney as X } from "./hooks/use-game-launcher-journey/use-game-launcher-journey.js";
|
16
16
|
import { useTableLauncherJourney as q } from "./hooks/use-table-launcher-journey/use-table-launcher-journey.js";
|
17
17
|
import { ProjectType as f } from "../games/web-view/enums/project-type-enum.js";
|
18
|
-
const V = H + Z, fe =
|
18
|
+
const V = H + Z, fe = D(
|
19
19
|
({ onSegmentClick: r, onJourneyComplete: c, journeyId: t, data: e, isLoading: S, defaultIndex: g = 0 }) => {
|
20
|
-
const [E] =
|
20
|
+
const [E] = v(!0), m = x(null), { playSwipSound: L, play: o } = K(), p = n(
|
21
21
|
(l) => {
|
22
22
|
o(u.GAME_CARD_CLICK), r(l, f.TABLE);
|
23
23
|
},
|
24
24
|
[r, o]
|
25
|
-
),
|
25
|
+
), b = n(
|
26
26
|
(l) => {
|
27
27
|
l.status !== "completed" && (o(u.GAME_CARD_CLICK), r(l, f.LESSON));
|
28
28
|
},
|
29
29
|
[r, o]
|
30
|
-
),
|
30
|
+
), C = n(
|
31
31
|
(l) => {
|
32
32
|
o(u.GAME_CARD_CLICK), r(l, f.GAME);
|
33
33
|
},
|
34
34
|
[r, o]
|
35
|
-
),
|
35
|
+
), T = n(
|
36
36
|
(l) => {
|
37
37
|
o(u.GAME_CARD_CLICK), r(l, f.PUZZLE);
|
38
38
|
},
|
39
39
|
[r, o]
|
40
40
|
), {
|
41
|
-
gameRefs:
|
42
|
-
lessonRefs:
|
41
|
+
gameRefs: _,
|
42
|
+
lessonRefs: A,
|
43
43
|
puzzleRefs: R,
|
44
44
|
startJourney: I
|
45
45
|
} = X({
|
@@ -48,16 +48,16 @@ const V = H + Z, fe = v(
|
|
48
48
|
onJourneyComplete: c
|
49
49
|
}), { startJourney: y, tableRef: P } = q({
|
50
50
|
carouselRefs: m,
|
51
|
-
onTableSegmentClick:
|
51
|
+
onTableSegmentClick: p,
|
52
52
|
onJourneyComplete: c
|
53
|
-
}),
|
53
|
+
}), M = N(() => {
|
54
54
|
let l = [];
|
55
55
|
return e && (e.lessons && (l = [
|
56
56
|
...l,
|
57
57
|
/* @__PURE__ */ i(
|
58
|
-
|
58
|
+
a,
|
59
59
|
{
|
60
|
-
ref:
|
60
|
+
ref: A,
|
61
61
|
label: e.lessons.label,
|
62
62
|
value: e.lessons.data.filter((s) => s.status === "completed").length,
|
63
63
|
maxValue: e.lessons.data.length,
|
@@ -66,16 +66,16 @@ const V = H + Z, fe = v(
|
|
66
66
|
card: s.cardLottie,
|
67
67
|
name: s.name,
|
68
68
|
isCompleted: s.status === "completed",
|
69
|
-
onPress: () =>
|
69
|
+
onPress: () => b(s)
|
70
70
|
}))
|
71
71
|
}
|
72
72
|
)
|
73
73
|
]), l = [
|
74
74
|
...l,
|
75
75
|
/* @__PURE__ */ i(
|
76
|
-
|
76
|
+
a,
|
77
77
|
{
|
78
|
-
ref:
|
78
|
+
ref: _,
|
79
79
|
label: e.games.label,
|
80
80
|
value: e.games.data.filter((s) => s.isPlayed).length,
|
81
81
|
maxValue: e.games.data.length,
|
@@ -84,12 +84,12 @@ const V = H + Z, fe = v(
|
|
84
84
|
card: s.cardLottie,
|
85
85
|
name: s.name,
|
86
86
|
isCompleted: !1,
|
87
|
-
onPress: () =>
|
87
|
+
onPress: () => C(s)
|
88
88
|
}))
|
89
89
|
}
|
90
90
|
),
|
91
91
|
/* @__PURE__ */ i(
|
92
|
-
|
92
|
+
a,
|
93
93
|
{
|
94
94
|
ref: R,
|
95
95
|
label: e.puzzles.label,
|
@@ -100,7 +100,7 @@ const V = H + Z, fe = v(
|
|
100
100
|
card: s.cardLottie,
|
101
101
|
name: s.name,
|
102
102
|
isCompleted: s.solved,
|
103
|
-
onPress: () =>
|
103
|
+
onPress: () => T(s)
|
104
104
|
}))
|
105
105
|
}
|
106
106
|
)
|
@@ -112,22 +112,23 @@ const V = H + Z, fe = v(
|
|
112
112
|
ref: P,
|
113
113
|
label: e.tables.label,
|
114
114
|
data: e.tables.data,
|
115
|
-
onPress:
|
115
|
+
onPress: p,
|
116
|
+
openModesOfTable: e.tables.openModesOfTable
|
116
117
|
}
|
117
118
|
)
|
118
119
|
])), l;
|
119
120
|
}, [
|
120
121
|
e,
|
121
|
-
|
122
|
+
_,
|
122
123
|
R,
|
123
124
|
E,
|
124
|
-
|
125
|
-
C,
|
126
|
-
_,
|
125
|
+
A,
|
127
126
|
b,
|
127
|
+
C,
|
128
|
+
T,
|
128
129
|
P,
|
129
|
-
|
130
|
-
]),
|
130
|
+
p
|
131
|
+
]), O = N(
|
131
132
|
() => [
|
132
133
|
/* @__PURE__ */ i(
|
133
134
|
B,
|
@@ -140,7 +141,7 @@ const V = H + Z, fe = v(
|
|
140
141
|
],
|
141
142
|
[]
|
142
143
|
);
|
143
|
-
return
|
144
|
+
return J(() => {
|
144
145
|
if (e != null && e.puzzles && t === h.CIRCLE_ACTIVITIES_INTRO_JOURNEY) {
|
145
146
|
I(e == null ? void 0 : e.puzzles, !!(e != null && e.lessons), t);
|
146
147
|
return;
|
@@ -150,7 +151,7 @@ const V = H + Z, fe = v(
|
|
150
151
|
z,
|
151
152
|
{
|
152
153
|
ref: m,
|
153
|
-
items:
|
154
|
+
items: M,
|
154
155
|
defaultIndex: g,
|
155
156
|
onNext: L,
|
156
157
|
onPrev: L,
|
@@ -165,7 +166,7 @@ const V = H + Z, fe = v(
|
|
165
166
|
z,
|
166
167
|
{
|
167
168
|
ref: m,
|
168
|
-
items:
|
169
|
+
items: O,
|
169
170
|
analyticsNext: {
|
170
171
|
analyticsLabel: ""
|
171
172
|
},
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"game-launcher.js","sources":["../../../../src/features/circle-games/game-launcher/game-launcher.tsx"],"sourcesContent":["import type { ICarouselRefs } from './comps/carousel/carousel-types';\nimport type { ITableDetails } from './comps/tables-card/tables-card-types';\nimport type {\n Game,\n Lesson,\n Puzzle,\n} from './dal/use-get-circle-home-details-dal/use-get-circle-home-dal-types';\nimport type { IGameLauncherProps } from './game-launcher-types';\nimport type { FC, ReactNode } from 'react';\n\nimport { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { LOTTIE } from '../../../assets/lottie/lottie';\nimport { JOURNEY_ID_STUDENT } from '../../journey/journey-id/journey-id-student';\nimport { CircularLoader } from '../../ui/loader/circular-loader/circular-loader';\nimport LottieAnimation from '../../ui/lottie-animation/lottie-animation';\nimport { ProjectType } from '../games/web-view/enums';\nimport { useCircleSounds } from '../hooks/use-circle-sounds/use-circle-sounds';\nimport { CircleSoundKey } from '../hooks/use-circle-sounds/use-circle-sounds-enums';\nimport { GAME_LAUNCHER_SIZE } from './comps/card-container/constants';\nimport { Carousel } from './comps/carousel/carousel';\nimport { GAME_LAUNCHER_ASSET_PADDING } from './comps/segmented-game-card/constants';\nimport { SegmentedGameCard } from './comps/segmented-game-card/segmented-game-card';\nimport { TablesCard } from './comps/tables-card/tables-card';\nimport { GAME_LAUNCHER_ANALYTICS_EVENTS } from './game-launcher-analytics-events';\nimport { useGameLauncherJourney } from './hooks/use-game-launcher-journey/use-game-launcher-journey';\nimport { useTableLauncherJourney } from './hooks/use-table-launcher-journey/use-table-launcher-journey';\n\nconst sleepyBoiDimension = GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING;\n\nexport const GameLauncher: FC<IGameLauncherProps> = memo(\n ({ onSegmentClick, onJourneyComplete, journeyId, data, isLoading, defaultIndex = 0 }) => {\n const [enableTables] = useState(true);\n const carouselRefs = useRef<ICarouselRefs>(null);\n\n const { playSwipSound, play } = useCircleSounds();\n\n const onTableSegmentClick = useCallback(\n (table: ITableDetails) => {\n play(CircleSoundKey.GAME_CARD_CLICK);\n onSegmentClick(table, ProjectType.TABLE);\n },\n [onSegmentClick, play],\n );\n\n const handleLessonSegmentClick = useCallback(\n (lesson: Lesson) => {\n if (lesson.status !== 'completed') {\n play(CircleSoundKey.GAME_CARD_CLICK);\n onSegmentClick(lesson, ProjectType.LESSON);\n }\n },\n [onSegmentClick, play],\n );\n\n const handleGameSegmentClick = useCallback(\n (game: Game) => {\n play(CircleSoundKey.GAME_CARD_CLICK);\n onSegmentClick(game, ProjectType.GAME);\n },\n [onSegmentClick, play],\n );\n\n const handlePuzzleSegmentClick = useCallback(\n (puzzle: Puzzle) => {\n play(CircleSoundKey.GAME_CARD_CLICK);\n onSegmentClick(puzzle, ProjectType.PUZZLE);\n },\n [onSegmentClick, play],\n );\n\n const {\n gameRefs,\n lessonRefs,\n puzzleRefs,\n startJourney: startLessonPuzzleGamesJourney,\n } = useGameLauncherJourney({\n carouselRefs,\n onSegmentClick,\n onJourneyComplete,\n });\n\n const { startJourney: startTablesJourney, tableRef } = useTableLauncherJourney({\n carouselRefs,\n onTableSegmentClick,\n onJourneyComplete,\n });\n\n const items = useMemo(() => {\n let itemTypes: ReactNode[] = [];\n\n if (data) {\n if (data.lessons) {\n itemTypes = [\n ...itemTypes,\n <SegmentedGameCard\n ref={lessonRefs}\n label={data.lessons.label}\n value={data.lessons.data.filter(lesson => lesson.status === 'completed').length}\n maxValue={data.lessons.data.length}\n initialValue={data.lessons.initialProgressValue}\n data={data?.lessons.data.map(lesson => ({\n card: lesson.cardLottie,\n name: lesson.name,\n isCompleted: lesson.status === 'completed',\n onPress: () => handleLessonSegmentClick(lesson),\n }))}\n />,\n ];\n }\n\n itemTypes = [\n ...itemTypes,\n <SegmentedGameCard\n ref={gameRefs}\n label={data.games.label}\n value={data.games.data.filter(game => game.isPlayed).length}\n maxValue={data.games.data.length}\n initialValue={data.games.initialProgressValue}\n data={data.games.data.map(game => ({\n card: game.cardLottie,\n name: game.name,\n isCompleted: false,\n onPress: () => handleGameSegmentClick(game),\n }))}\n />,\n <SegmentedGameCard\n ref={puzzleRefs}\n label={data.puzzles.label}\n value={data.puzzles.data.filter(puzzle => puzzle.solved).length}\n maxValue={data.puzzles.data.length}\n initialValue={data.puzzles.initialProgressValue}\n data={data.puzzles.data.map(puzzle => ({\n card: puzzle.cardLottie,\n name: puzzle.name,\n isCompleted: puzzle.solved,\n onPress: () => handlePuzzleSegmentClick(puzzle),\n }))}\n />,\n ];\n\n if (data.tables && enableTables) {\n itemTypes = [\n ...itemTypes,\n <TablesCard\n ref={tableRef}\n label={data.tables.label}\n data={data.tables.data}\n onPress={onTableSegmentClick}\n />,\n ];\n }\n }\n\n return itemTypes;\n }, [\n data,\n gameRefs,\n puzzleRefs,\n enableTables,\n lessonRefs,\n handleLessonSegmentClick,\n handleGameSegmentClick,\n handlePuzzleSegmentClick,\n tableRef,\n onTableSegmentClick,\n ]);\n\n const sleepyBoiItem = useMemo(\n () => [\n <LottieAnimation\n src={LOTTIE.SLEEPY_BOI}\n width={sleepyBoiDimension}\n height={sleepyBoiDimension}\n />,\n ],\n [],\n );\n\n // Start game launcher journey when the data for puzzles is available\n useEffect(() => {\n if (data?.puzzles && journeyId === JOURNEY_ID_STUDENT.CIRCLE_ACTIVITIES_INTRO_JOURNEY) {\n startLessonPuzzleGamesJourney(data?.puzzles, !!data?.lessons, journeyId);\n\n return; // CIRCLE_ACTIVITIES_INTRO_JOURNEY has higher priority\n }\n\n if (data?.tables && journeyId === JOURNEY_ID_STUDENT.CIRCLE_TABLES_INTRO_JOURNEY) {\n startTablesJourney(data?.tables);\n }\n }, [data, journeyId, startLessonPuzzleGamesJourney, startTablesJourney]);\n\n if (isLoading) {\n return <CircularLoader />;\n }\n\n if (!data) {\n return (\n <Carousel\n ref={carouselRefs}\n items={sleepyBoiItem}\n analyticsNext={{\n analyticsLabel: '',\n }}\n analyticsPrev={{\n analyticsLabel: '',\n }}\n />\n );\n }\n\n return (\n <Carousel\n ref={carouselRefs}\n items={items}\n defaultIndex={defaultIndex}\n onNext={playSwipSound}\n onPrev={playSwipSound}\n analyticsNext={{\n analyticsLabel: GAME_LAUNCHER_ANALYTICS_EVENTS.NEXT_ACTIVITY,\n }}\n analyticsPrev={{\n analyticsLabel: GAME_LAUNCHER_ANALYTICS_EVENTS.PREV_ACTIVITY,\n }}\n />\n );\n },\n);\n"],"names":["sleepyBoiDimension","GAME_LAUNCHER_SIZE","GAME_LAUNCHER_ASSET_PADDING","GameLauncher","memo","onSegmentClick","onJourneyComplete","journeyId","data","isLoading","defaultIndex","enableTables","useState","carouselRefs","useRef","playSwipSound","play","useCircleSounds","onTableSegmentClick","useCallback","table","CircleSoundKey","ProjectType","handleLessonSegmentClick","lesson","handleGameSegmentClick","game","handlePuzzleSegmentClick","puzzle","gameRefs","lessonRefs","puzzleRefs","startLessonPuzzleGamesJourney","useGameLauncherJourney","startTablesJourney","tableRef","useTableLauncherJourney","items","useMemo","itemTypes","jsx","SegmentedGameCard","TablesCard","sleepyBoiItem","LottieAnimation","LOTTIE","useEffect","JOURNEY_ID_STUDENT","CircularLoader","Carousel","GAME_LAUNCHER_ANALYTICS_EVENTS"],"mappings":";;;;;;;;;;;;;;;;;AA4BA,MAAMA,IAAqBC,IAAqBC,GAEnCC,KAAuCC;AAAA,EAClD,CAAC,EAAE,gBAAAC,GAAgB,mBAAAC,GAAmB,WAAAC,GAAW,MAAAC,GAAM,WAAAC,GAAW,cAAAC,IAAe,QAAQ;AACvF,UAAM,CAACC,CAAY,IAAIC,EAAS,EAAI,GAC9BC,IAAeC,EAAsB,IAAI,GAEzC,EAAE,eAAAC,GAAe,MAAAC,EAAK,IAAIC,EAAgB,GAE1CC,IAAsBC;AAAA,MAC1B,CAACC,MAAyB;AACxB,QAAAJ,EAAKK,EAAe,eA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AA,QACA,eAAe;AAAA,UACb,gBAAgBA,EAA+B;AAAA,QACjD;AAAA,MAAA;AAAA,IAAA,IAzBA,gBAAAV;AAAA,MAACS;AAAA,MAAA;AAAA,QACC,KAAKpC;AAAA,QACL,OAAO8B;AAAA,QACP,eAAe;AAAA,UACb,gBAAgB;AAAA,QAClB;AAAA,QACA,eAAe;AAAA,UACb,gBAAgB;AAAA,QAClB;AAAA,MAAA;AAAA,IAAA;AAAA,EAoBR;AACF;"}
|
1
|
+
{"version":3,"file":"game-launcher.js","sources":["../../../../src/features/circle-games/game-launcher/game-launcher.tsx"],"sourcesContent":["import type { ICarouselRefs } from './comps/carousel/carousel-types';\nimport type { ITableDetails } from './comps/tables-card/tables-card-types';\nimport type {\n Game,\n Lesson,\n Puzzle,\n} from './dal/use-get-circle-home-details-dal/use-get-circle-home-dal-types';\nimport type { IGameLauncherProps } from './game-launcher-types';\nimport type { FC, ReactNode } from 'react';\n\nimport { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { LOTTIE } from '../../../assets/lottie/lottie';\nimport { JOURNEY_ID_STUDENT } from '../../journey/journey-id/journey-id-student';\nimport { CircularLoader } from '../../ui/loader/circular-loader/circular-loader';\nimport LottieAnimation from '../../ui/lottie-animation/lottie-animation';\nimport { ProjectType } from '../games/web-view/enums';\nimport { useCircleSounds } from '../hooks/use-circle-sounds/use-circle-sounds';\nimport { CircleSoundKey } from '../hooks/use-circle-sounds/use-circle-sounds-enums';\nimport { GAME_LAUNCHER_SIZE } from './comps/card-container/constants';\nimport { Carousel } from './comps/carousel/carousel';\nimport { GAME_LAUNCHER_ASSET_PADDING } from './comps/segmented-game-card/constants';\nimport { SegmentedGameCard } from './comps/segmented-game-card/segmented-game-card';\nimport { TablesCard } from './comps/tables-card/tables-card';\nimport { GAME_LAUNCHER_ANALYTICS_EVENTS } from './game-launcher-analytics-events';\nimport { useGameLauncherJourney } from './hooks/use-game-launcher-journey/use-game-launcher-journey';\nimport { useTableLauncherJourney } from './hooks/use-table-launcher-journey/use-table-launcher-journey';\n\nconst sleepyBoiDimension = GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING;\n\nexport const GameLauncher: FC<IGameLauncherProps> = memo(\n ({ onSegmentClick, onJourneyComplete, journeyId, data, isLoading, defaultIndex = 0 }) => {\n const [enableTables] = useState(true);\n const carouselRefs = useRef<ICarouselRefs>(null);\n\n const { playSwipSound, play } = useCircleSounds();\n\n const onTableSegmentClick = useCallback(\n (table: ITableDetails) => {\n play(CircleSoundKey.GAME_CARD_CLICK);\n onSegmentClick(table, ProjectType.TABLE);\n },\n [onSegmentClick, play],\n );\n\n const handleLessonSegmentClick = useCallback(\n (lesson: Lesson) => {\n if (lesson.status !== 'completed') {\n play(CircleSoundKey.GAME_CARD_CLICK);\n onSegmentClick(lesson, ProjectType.LESSON);\n }\n },\n [onSegmentClick, play],\n );\n\n const handleGameSegmentClick = useCallback(\n (game: Game) => {\n play(CircleSoundKey.GAME_CARD_CLICK);\n onSegmentClick(game, ProjectType.GAME);\n },\n [onSegmentClick, play],\n );\n\n const handlePuzzleSegmentClick = useCallback(\n (puzzle: Puzzle) => {\n play(CircleSoundKey.GAME_CARD_CLICK);\n onSegmentClick(puzzle, ProjectType.PUZZLE);\n },\n [onSegmentClick, play],\n );\n\n const {\n gameRefs,\n lessonRefs,\n puzzleRefs,\n startJourney: startLessonPuzzleGamesJourney,\n } = useGameLauncherJourney({\n carouselRefs,\n onSegmentClick,\n onJourneyComplete,\n });\n\n const { startJourney: startTablesJourney, tableRef } = useTableLauncherJourney({\n carouselRefs,\n onTableSegmentClick,\n onJourneyComplete,\n });\n\n const items = useMemo(() => {\n let itemTypes: ReactNode[] = [];\n\n if (data) {\n if (data.lessons) {\n itemTypes = [\n ...itemTypes,\n <SegmentedGameCard\n ref={lessonRefs}\n label={data.lessons.label}\n value={data.lessons.data.filter(lesson => lesson.status === 'completed').length}\n maxValue={data.lessons.data.length}\n initialValue={data.lessons.initialProgressValue}\n data={data?.lessons.data.map(lesson => ({\n card: lesson.cardLottie,\n name: lesson.name,\n isCompleted: lesson.status === 'completed',\n onPress: () => handleLessonSegmentClick(lesson),\n }))}\n />,\n ];\n }\n\n itemTypes = [\n ...itemTypes,\n <SegmentedGameCard\n ref={gameRefs}\n label={data.games.label}\n value={data.games.data.filter(game => game.isPlayed).length}\n maxValue={data.games.data.length}\n initialValue={data.games.initialProgressValue}\n data={data.games.data.map(game => ({\n card: game.cardLottie,\n name: game.name,\n isCompleted: false,\n onPress: () => handleGameSegmentClick(game),\n }))}\n />,\n <SegmentedGameCard\n ref={puzzleRefs}\n label={data.puzzles.label}\n value={data.puzzles.data.filter(puzzle => puzzle.solved).length}\n maxValue={data.puzzles.data.length}\n initialValue={data.puzzles.initialProgressValue}\n data={data.puzzles.data.map(puzzle => ({\n card: puzzle.cardLottie,\n name: puzzle.name,\n isCompleted: puzzle.solved,\n onPress: () => handlePuzzleSegmentClick(puzzle),\n }))}\n />,\n ];\n\n if (data.tables && enableTables) {\n itemTypes = [\n ...itemTypes,\n <TablesCard\n ref={tableRef}\n label={data.tables.label}\n data={data.tables.data}\n onPress={onTableSegmentClick}\n openModesOfTable={data.tables.openModesOfTable}\n />,\n ];\n }\n }\n\n return itemTypes;\n }, [\n data,\n gameRefs,\n puzzleRefs,\n enableTables,\n lessonRefs,\n handleLessonSegmentClick,\n handleGameSegmentClick,\n handlePuzzleSegmentClick,\n tableRef,\n onTableSegmentClick,\n ]);\n\n const sleepyBoiItem = useMemo(\n () => [\n <LottieAnimation\n src={LOTTIE.SLEEPY_BOI}\n width={sleepyBoiDimension}\n height={sleepyBoiDimension}\n />,\n ],\n [],\n );\n\n // Start game launcher journey when the data for puzzles is available\n useEffect(() => {\n if (data?.puzzles && journeyId === JOURNEY_ID_STUDENT.CIRCLE_ACTIVITIES_INTRO_JOURNEY) {\n startLessonPuzzleGamesJourney(data?.puzzles, !!data?.lessons, journeyId);\n\n return; // CIRCLE_ACTIVITIES_INTRO_JOURNEY has higher priority\n }\n\n if (data?.tables && journeyId === JOURNEY_ID_STUDENT.CIRCLE_TABLES_INTRO_JOURNEY) {\n startTablesJourney(data?.tables);\n }\n }, [data, journeyId, startLessonPuzzleGamesJourney, startTablesJourney]);\n\n if (isLoading) {\n return <CircularLoader />;\n }\n\n if (!data) {\n return (\n <Carousel\n ref={carouselRefs}\n items={sleepyBoiItem}\n analyticsNext={{\n analyticsLabel: '',\n }}\n analyticsPrev={{\n analyticsLabel: '',\n }}\n />\n );\n }\n\n return (\n <Carousel\n ref={carouselRefs}\n items={items}\n defaultIndex={defaultIndex}\n onNext={playSwipSound}\n onPrev={playSwipSound}\n analyticsNext={{\n analyticsLabel: GAME_LAUNCHER_ANALYTICS_EVENTS.NEXT_ACTIVITY,\n }}\n analyticsPrev={{\n analyticsLabel: GAME_LAUNCHER_ANALYTICS_EVENTS.PREV_ACTIVITY,\n }}\n />\n );\n },\n);\n"],"names":["sleepyBoiDimension","GAME_LAUNCHER_SIZE","GAME_LAUNCHER_ASSET_PADDING","GameLauncher","memo","onSegmentClick","onJourneyComplete","journeyId","data","isLoading","defaultIndex","enableTables","useState","carouselRefs","useRef","playSwipSound","play","useCircleSounds","onTableSegmentClick","useCallback","table","CircleSoundKey","ProjectType","handleLessonSegmentClick","lesson","handleGameSegmentClick","game","handlePuzzleSegmentClick","puzzle","gameRefs","lessonRefs","puzzleRefs","startLessonPuzzleGamesJourney","useGameLauncherJourney","startTablesJourney","tableRef","useTableLauncherJourney","items","useMemo","itemTypes","jsx","SegmentedGameCard","TablesCard","sleepyBoiItem","LottieAnimation","LOTTIE","useEffect","JOURNEY_ID_STUDENT","CircularLoader","Carousel","GAME_LAUNCHER_ANALYTICS_EVENTS"],"mappings":";;;;;;;;;;;;;;;;;AA4BA,MAAMA,IAAqBC,IAAqBC,GAEnCC,KAAuCC;AAAA,EAClD,CAAC,EAAE,gBAAAC,GAAgB,mBAAAC,GAAmB,WAAAC,GAAW,MAAAC,GAAM,WAAAC,GAAW,cA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AkB,CAAC,GAEnEzB,sBACMuC,GAAe,CAAA,CAAA,IAGpBxC,IAgBH,gBAAAgC;AAAA,MAACS;AAAA,MAAA;AAAA,QACC,KAAKpC;AAAA,QACL,OAAAwB;AAAA,QACA,cAAA3B;AAAA,QACA,QAAQK;AAAA,QACR,QAAQA;AAAA,QACR,eAAe;AAAA,UACb,gBAAgBmC,EAA+B;AAAA,QACjD;AAAA,QACA,eAAe;AAAA,UACb,gBAAgBA,EAA+B;AAAA,QACjD;AAAA,MAAA;AAAA,IAAA,IAzBA,gBAAAV;AAAA,MAACS;AAAA,MAAA;AAAA,QACC,KAAKpC;AAAA,QACL,OAAO8B;AAAA,QACP,eAAe;AAAA,UACb,gBAAgB;AAAA,QAClB;AAAA,QACA,eAAe;AAAA,UACb,gBAAgB;AAAA,QAClB;AAAA,MAAA;AAAA,IAAA;AAAA,EAoBR;AACF;"}
|
@@ -1,31 +1,37 @@
|
|
1
1
|
import { jsx as r, Fragment as L } from "react/jsx-runtime";
|
2
|
-
import { useRef as R, useCallback as
|
3
|
-
import
|
4
|
-
import {
|
2
|
+
import { useRef as R, useCallback as b } from "react";
|
3
|
+
import x from "../../../../../assets/line-icons/icons/carat-right.js";
|
4
|
+
import { PLATFORM_EVENTS_STUDENT as W } from "../../../../analytics-events/platform-events-student.js";
|
5
|
+
import { JOURNEY_ID_STUDENT as G } from "../../../../journey/journey-id/journey-id-student.js";
|
5
6
|
import { IndicatorType as d } from "../../../../journey/use-journey/constants.js";
|
6
|
-
import { useJourney as
|
7
|
-
import
|
8
|
-
import
|
7
|
+
import { useJourney as w } from "../../../../journey/use-journey/use-journey.js";
|
8
|
+
import J from "../../../../ui/buttons/icon-button/icon-button.js";
|
9
|
+
import { useUIContext as X } from "../../../../ui/context/context.js";
|
10
|
+
import I from "../../../../ui/layout/flex-view.js";
|
9
11
|
import u from "../../../../ui/text/text.js";
|
10
|
-
import {
|
11
|
-
import {
|
12
|
-
import {
|
13
|
-
import {
|
14
|
-
|
12
|
+
import { CIRCLE_ONBOARDING_ANALYTICS_STEPS as S } from "../../../enum/circle-onboarding-steps.js";
|
13
|
+
import { useCircleSounds as V } from "../../../hooks/use-circle-sounds/use-circle-sounds.js";
|
14
|
+
import { TablesCard as B } from "../../comps/tables-card/tables-card.js";
|
15
|
+
import { GAME_LAUNCHER_ANALYTICS_EVENTS as F } from "../../game-launcher-analytics-events.js";
|
16
|
+
import { TABLE_CARD_INDEX as v, PUZZLE_CARD_INDEX as M } from "./constants.js";
|
17
|
+
import { Indicator as j } from "./use-table-launcher-journey-styled.js";
|
18
|
+
const me = ({
|
15
19
|
carouselRefs: s,
|
16
|
-
onTableSegmentClick:
|
17
|
-
onJourneyComplete:
|
20
|
+
onTableSegmentClick: O,
|
21
|
+
onJourneyComplete: _
|
18
22
|
}) => {
|
19
|
-
const e =
|
23
|
+
const e = G.CIRCLE_TABLES_INTRO_JOURNEY, t = R(null), p = R(null), N = R(!1), { playButtonSound: P } = V(), { nextCoachmark: i, setJourney: y, addCoachmark: c } = w(), { onEvent: T } = X(), C = b(
|
20
24
|
(o) => {
|
21
25
|
var l, a;
|
22
|
-
o &&
|
26
|
+
o && O(o), T(W.ONBOARDING_STEP_COMPLETED, {
|
27
|
+
step: S.TABLES
|
28
|
+
}), (l = t == null ? void 0 : t.current) == null || l.setLabelVisiblity(!0), (a = t == null ? void 0 : t.current) == null || a.stopLabelAnimation(), _(e), i(e, !1);
|
23
29
|
},
|
24
|
-
[e, i,
|
25
|
-
), H =
|
30
|
+
[e, i, _, O, T]
|
31
|
+
), H = b(
|
26
32
|
(o, l) => {
|
27
|
-
var
|
28
|
-
if (!((
|
33
|
+
var m, g, h;
|
34
|
+
if (!((m = t.current) != null && m.segmentedCardWrapperRef.current) || !((g = t.current) != null && g.labelRef.current))
|
29
35
|
return;
|
30
36
|
const a = t.current.labelRef.current.getBoundingClientRect(), n = (h = t.current) == null ? void 0 : h.segmentedCardWrapperRef.current.getBoundingClientRect();
|
31
37
|
c(e, {
|
@@ -33,7 +39,7 @@ const ne = ({
|
|
33
39
|
isActive: !1,
|
34
40
|
type: d.TOOLTIP,
|
35
41
|
elementToHighlight: /* @__PURE__ */ r(
|
36
|
-
|
42
|
+
B,
|
37
43
|
{
|
38
44
|
ref: p,
|
39
45
|
defaultTable: l,
|
@@ -47,7 +53,7 @@ const ne = ({
|
|
47
53
|
position: "left",
|
48
54
|
backgroundColor: "YELLOW_4",
|
49
55
|
width: 236,
|
50
|
-
tooltipItem: /* @__PURE__ */ r(
|
56
|
+
tooltipItem: /* @__PURE__ */ r(I, { children: /* @__PURE__ */ r(u, { $renderAs: "ab2-bold", children: "Each table has 3 levels—clear them and earn 3 stars!" }) }),
|
51
57
|
tooltipXCoOrdinates: 0,
|
52
58
|
tooltipYCoOrdinates: a.height * 0.35
|
53
59
|
}
|
@@ -63,15 +69,17 @@ const ne = ({
|
|
63
69
|
},
|
64
70
|
elementToHighlight: /* @__PURE__ */ r(L, {})
|
65
71
|
}), i(e, !1, 100), i(e, !0, 2e3);
|
66
|
-
const
|
72
|
+
const E = setTimeout(() => {
|
67
73
|
var f;
|
68
|
-
clearTimeout(
|
74
|
+
clearTimeout(E), (f = p.current) == null || f.startLabelAnimation("YELLOW_4");
|
69
75
|
}, 3e3);
|
70
76
|
},
|
71
77
|
[c, C, e, i]
|
72
|
-
),
|
78
|
+
), A = b(() => {
|
73
79
|
var a;
|
74
|
-
P(), (a = s.current) == null || a.goToIndex(
|
80
|
+
P(), (a = s.current) == null || a.goToIndex(v), i(e, !1, 1e3), T(W.ONBOARDING_STEP_VIEWED, {
|
81
|
+
step: S.TABLES
|
82
|
+
});
|
75
83
|
const o = setTimeout(() => {
|
76
84
|
var n;
|
77
85
|
clearTimeout(o), (n = t.current) == null || n.setLabelVisiblity(!1), i(e, !0);
|
@@ -79,18 +87,18 @@ const ne = ({
|
|
79
87
|
var n;
|
80
88
|
clearTimeout(l), (n = p.current) == null || n.startLabelAnimation("YELLOW_4");
|
81
89
|
}, 3100);
|
82
|
-
}, [s, e, i, P]),
|
90
|
+
}, [s, e, i, P, T]), U = b(
|
83
91
|
(o) => {
|
84
|
-
var
|
85
|
-
if (
|
92
|
+
var g, h, f, Y, k, D;
|
93
|
+
if (N.current)
|
86
94
|
return;
|
87
|
-
const l = (
|
88
|
-
if (!((f = t.current) != null && f.segmentedCardWrapperRef.current) || !((
|
95
|
+
const l = (g = s.current) == null ? void 0 : g.indicatorRefs, a = (h = s.current) == null ? void 0 : h.nextBtnRef, n = l == null ? void 0 : l[v];
|
96
|
+
if (!((f = t.current) != null && f.segmentedCardWrapperRef.current) || !((Y = t.current) != null && Y.labelRef.current) || !l || !(a != null && a.current) || !n || !n.current)
|
89
97
|
return;
|
90
|
-
|
91
|
-
const
|
92
|
-
|
93
|
-
originalElementToHighlightRef: (
|
98
|
+
N.current = !0;
|
99
|
+
const E = t.current.labelRef.current.getBoundingClientRect(), m = (k = t.current) == null ? void 0 : k.segmentedCardWrapperRef.current.getBoundingClientRect();
|
100
|
+
y(e, []), s.current.currentIndex === M ? (c(e, {
|
101
|
+
originalElementToHighlightRef: (D = s.current) == null ? void 0 : D.nextBtnRef,
|
94
102
|
isActive: !1,
|
95
103
|
type: d.NUDGE,
|
96
104
|
indicator: {
|
@@ -100,30 +108,30 @@ const ne = ({
|
|
100
108
|
nudgePointerY: 0
|
101
109
|
},
|
102
110
|
elementToHighlight: /* @__PURE__ */ r(
|
103
|
-
|
111
|
+
J,
|
104
112
|
{
|
105
113
|
renderAs: "secondary",
|
106
|
-
Icon:
|
107
|
-
onClick:
|
108
|
-
analyticsLabel:
|
114
|
+
Icon: x,
|
115
|
+
onClick: A,
|
116
|
+
analyticsLabel: F.JOURNEY_NEXT_ACTIVITY
|
109
117
|
}
|
110
118
|
)
|
111
119
|
}), i(e, !1, 500)) : (c(e, {
|
112
120
|
originalElementToHighlightRef: n,
|
113
121
|
isActive: !1,
|
114
122
|
type: d.TOOLTIP,
|
115
|
-
elementToHighlight: /* @__PURE__ */ r(
|
123
|
+
elementToHighlight: /* @__PURE__ */ r(j, { $isActive: !1 }),
|
116
124
|
indicator: {
|
117
125
|
position: "bottom",
|
118
126
|
backgroundColor: "YELLOW_4",
|
119
127
|
width: 52,
|
120
128
|
tooltipItem: /* @__PURE__ */ r(
|
121
|
-
|
129
|
+
I,
|
122
130
|
{
|
123
131
|
$position: "absolute",
|
124
132
|
$flexDirection: "row",
|
125
133
|
style: { top: 6, left: 8, cursor: "pointer" },
|
126
|
-
onClick:
|
134
|
+
onClick: A,
|
127
135
|
children: /* @__PURE__ */ r(u, { $renderAs: "ab2-bold", children: "NEW" })
|
128
136
|
}
|
129
137
|
),
|
@@ -148,10 +156,10 @@ const ne = ({
|
|
148
156
|
indicator: {
|
149
157
|
position: "right",
|
150
158
|
backgroundColor: "YELLOW_4",
|
151
|
-
width:
|
152
|
-
tooltipItem: /* @__PURE__ */ r(
|
153
|
-
tooltipXCoOrdinates:
|
154
|
-
tooltipYCoOrdinates:
|
159
|
+
width: 264,
|
160
|
+
tooltipItem: /* @__PURE__ */ r(I, { children: /* @__PURE__ */ r(u, { $renderAs: "ab2-bold", children: "Get faster at multiplication! Practice everyday and become a Tables champ." }) }),
|
161
|
+
tooltipXCoOrdinates: E.width + 50,
|
162
|
+
tooltipYCoOrdinates: E.height / 2
|
155
163
|
}
|
156
164
|
}), c(e, {
|
157
165
|
originalElementToHighlightRef: t.current.segmentedCardWrapperRef,
|
@@ -160,18 +168,18 @@ const ne = ({
|
|
160
168
|
indicator: {
|
161
169
|
nudge: "click",
|
162
170
|
content: /* @__PURE__ */ r(u, { $renderAs: "ab1", $color: "WHITE", children: "Pick a table to start" }),
|
163
|
-
nudgePointerX:
|
164
|
-
nudgePointerY:
|
171
|
+
nudgePointerX: m.width / 2 + 50,
|
172
|
+
nudgePointerY: m.height / 2
|
165
173
|
},
|
166
174
|
elementToHighlight: /* @__PURE__ */ r(
|
167
|
-
|
175
|
+
B,
|
168
176
|
{
|
169
177
|
ref: p,
|
170
178
|
label: o.label,
|
171
179
|
data: o.data,
|
172
180
|
onPress: () => {
|
173
181
|
},
|
174
|
-
onPressTableSegment: (
|
182
|
+
onPressTableSegment: ($) => H(o, $)
|
175
183
|
}
|
176
184
|
)
|
177
185
|
});
|
@@ -179,19 +187,19 @@ const ne = ({
|
|
179
187
|
[
|
180
188
|
c,
|
181
189
|
s,
|
182
|
-
|
190
|
+
A,
|
183
191
|
H,
|
184
192
|
e,
|
185
193
|
i,
|
186
|
-
|
194
|
+
y
|
187
195
|
]
|
188
196
|
);
|
189
197
|
return {
|
190
198
|
tableRef: t,
|
191
|
-
startJourney:
|
199
|
+
startJourney: U
|
192
200
|
};
|
193
201
|
};
|
194
202
|
export {
|
195
|
-
|
203
|
+
me as useTableLauncherJourney
|
196
204
|
};
|
197
205
|
//# sourceMappingURL=use-table-launcher-journey.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-table-launcher-journey.js","sources":["../../../../../../src/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.tsx"],"sourcesContent":["/* eslint-disable react-native/no-inline-styles */\nimport type { IArrowTooltipProps } from '../../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { INudgeProps } from '../../../../ui/nudge/nudge-types';\nimport type { ITableCardRef, ITableDetails } from '../../comps/tables-card/tables-card-types';\nimport type {\n ITableInfo,\n ITables,\n} from '../../dal/use-get-circle-home-details-dal/use-get-circle-home-dal-types';\nimport type { IUseTableJourneyProps } from './use-table-launcher-journey-types';\n\nimport { useCallback, useRef } from 'react';\n\nimport CaratRightIcon from '../../../../../assets/line-icons/icons/carat-right';\nimport { JOURNEY_ID_STUDENT } from '../../../../journey/journey-id/journey-id-student';\nimport { IndicatorType } from '../../../../journey/use-journey/constants';\nimport { useJourney } from '../../../../journey/use-journey/use-journey';\nimport IconButton from '../../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport { useCircleSounds } from '../../../hooks/use-circle-sounds/use-circle-sounds';\nimport { TablesCard } from '../../comps/tables-card/tables-card';\nimport { PUZZLE_CARD_INDEX, TABLE_CARD_INDEX } from './constants';\nimport * as S from './use-table-launcher-journey-styled';\n\nexport const useTableLauncherJourney = ({\n carouselRefs,\n onTableSegmentClick,\n onJourneyComplete,\n}: IUseTableJourneyProps) => {\n const journeyId = JOURNEY_ID_STUDENT.CIRCLE_TABLES_INTRO_JOURNEY;\n const originalTableRef = useRef<ITableCardRef>(null);\n const highlightedTableRef = useRef<ITableCardRef>(null);\n const isJourneyInProgress = useRef(false);\n\n const { playButtonSound } = useCircleSounds();\n const { nextCoachmark, setJourney, addCoachmark } = useJourney();\n\n const endJourney = useCallback(\n (tableDetails?: ITableDetails) => {\n // Only when User clicked on play\n if (tableDetails) {\n onTableSegmentClick(tableDetails);\n }\n // Reset original table card ref label\n originalTableRef?.current?.setLabelVisiblity(true);\n originalTableRef?.current?.stopLabelAnimation();\n onJourneyComplete(journeyId);\n nextCoachmark(journeyId, false);\n },\n [journeyId, nextCoachmark, onJourneyComplete, onTableSegmentClick],\n );\n\n const handleTableSegmentClick = useCallback(\n (launcherData: ITables, tableData: ITableInfo) => {\n if (\n !originalTableRef.current?.segmentedCardWrapperRef.current ||\n !originalTableRef.current?.labelRef.current\n ) {\n return;\n }\n\n const segmentedCardDims = originalTableRef.current.labelRef.current.getBoundingClientRect();\n const tableCardDims =\n originalTableRef.current?.segmentedCardWrapperRef.current.getBoundingClientRect();\n\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: (\n <TablesCard\n ref={highlightedTableRef}\n defaultTable={tableData}\n label={launcherData.label}\n data={launcherData.data}\n onPress={endJourney}\n onGoBackFromTableLevel={endJourney}\n />\n ),\n indicator: {\n position: 'left',\n backgroundColor: 'YELLOW_4',\n width: 236,\n tooltipItem: (\n <FlexView>\n <Text $renderAs=\"ab2-bold\">Each table has 3 levels—clear them and earn 3 stars!</Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: 0,\n tooltipYCoOrdinates: segmentedCardDims.height * 0.35,\n } as IArrowTooltipProps,\n });\n\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Pick a level\n </Text>\n ),\n nudgePointerX: tableCardDims.width / 2 + 50,\n nudgePointerY: tableCardDims.height * 0.4,\n } as INudgeProps,\n elementToHighlight: <></>,\n });\n\n nextCoachmark(journeyId, false, 100); // Show coachmark => Each table has 3... and Hide the previous two\n nextCoachmark(journeyId, true, 2000); // Show nudge => Pick a level\n\n const startAnimationOnLabelAgain = setTimeout(() => {\n clearTimeout(startAnimationOnLabelAgain);\n highlightedTableRef.current?.startLabelAnimation('YELLOW_4');\n }, 3000);\n },\n [addCoachmark, endJourney, journeyId, nextCoachmark],\n );\n\n const goToTableLauncher = useCallback(() => {\n playButtonSound();\n carouselRefs.current?.goToIndex(TABLE_CARD_INDEX);\n nextCoachmark(journeyId, false, 1000);\n\n const showNudge = setTimeout(() => {\n clearTimeout(showNudge);\n originalTableRef.current?.setLabelVisiblity(false);\n nextCoachmark(journeyId, true);\n }, 3000);\n\n const animateLabel = setTimeout(() => {\n clearTimeout(animateLabel);\n highlightedTableRef.current?.startLabelAnimation('YELLOW_4');\n }, 3100);\n }, [carouselRefs, journeyId, nextCoachmark, playButtonSound]);\n\n const startJourney = useCallback(\n (tablesData: ITables) => {\n if (isJourneyInProgress.current) {\n return;\n }\n\n const paginationList = carouselRefs.current?.indicatorRefs;\n const carouselNextBtnRef = carouselRefs.current?.nextBtnRef;\n const tablePaginationRef = paginationList?.[TABLE_CARD_INDEX];\n\n if (\n !originalTableRef.current?.segmentedCardWrapperRef.current ||\n !originalTableRef.current?.labelRef.current ||\n !paginationList ||\n !carouselNextBtnRef?.current ||\n !tablePaginationRef ||\n !tablePaginationRef.current\n ) {\n return;\n }\n\n isJourneyInProgress.current = true;\n\n const labelDims = originalTableRef.current.labelRef.current.getBoundingClientRect();\n const tableCardDims =\n originalTableRef.current?.segmentedCardWrapperRef.current.getBoundingClientRect();\n\n setJourney(journeyId, []);\n\n // TAKE THE USER TO THE TABLE CARD\n if (carouselRefs.current.currentIndex === PUZZLE_CARD_INDEX) {\n addCoachmark(journeyId, {\n originalElementToHighlightRef: carouselRefs.current?.nextBtnRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Click to proceed\n </Text>\n ),\n nudgePointerX: 0,\n nudgePointerY: 0,\n } as INudgeProps,\n elementToHighlight: (\n <IconButton\n renderAs=\"secondary\"\n Icon={CaratRightIcon}\n onClick={goToTableLauncher}\n analyticsLabel={'FIXXXX'}\n />\n ),\n });\n nextCoachmark(journeyId, false, 500); // Show nudge => Click to proceed\n } else {\n addCoachmark(journeyId, {\n originalElementToHighlightRef: tablePaginationRef as React.RefObject<HTMLDivElement>,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <S.Indicator $isActive={false} />,\n indicator: {\n position: 'bottom',\n backgroundColor: 'YELLOW_4',\n width: 52,\n tooltipItem: (\n <FlexView\n $position=\"absolute\"\n $flexDirection=\"row\"\n style={{ top: 6, left: 8, cursor: 'pointer' }}\n onClick={goToTableLauncher}\n >\n <Text $renderAs=\"ab2-bold\">NEW</Text>\n </FlexView>\n ),\n tooltipYCoOrdinates: 14, // Need some offset in Y direction from top\n } as IArrowTooltipProps,\n });\n addCoachmark(journeyId, {\n originalElementToHighlightRef: tablePaginationRef as React.RefObject<HTMLDivElement>,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: '',\n nudgePointerY: 20,\n } as INudgeProps,\n elementToHighlight: <></>,\n });\n nextCoachmark(journeyId, false, 500); // Show Coachmark => NEW\n nextCoachmark(journeyId, true, 1500); // Show Nudge over Coachmark\n }\n\n // SHOW THE USER SELECT A TABLE\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.labelRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <></>,\n indicator: {\n position: 'right',\n backgroundColor: 'YELLOW_4',\n width: 236,\n tooltipItem: (\n <FlexView>\n <Text $renderAs=\"ab2-bold\">\n Get faster & stay ahead in school. Practice 3 new skills everyday.\n </Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: labelDims.width + 50,\n tooltipYCoOrdinates: labelDims.height / 2,\n } as IArrowTooltipProps,\n });\n\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n {'Pick a table to start'}\n </Text>\n ),\n nudgePointerX: tableCardDims.width / 2 + 50,\n nudgePointerY: tableCardDims.height / 2,\n } as INudgeProps,\n elementToHighlight: (\n <TablesCard\n ref={highlightedTableRef}\n label={tablesData.label}\n data={tablesData.data}\n onPress={() => {}}\n onPressTableSegment={tableInfo => handleTableSegmentClick(tablesData, tableInfo)}\n />\n ),\n });\n },\n [\n addCoachmark,\n carouselRefs,\n goToTableLauncher,\n handleTableSegmentClick,\n journeyId,\n nextCoachmark,\n setJourney,\n ],\n );\n\n return {\n tableRef: originalTableRef,\n startJourney,\n };\n};\n"],"names":["useTableLauncherJourney","carouselRefs","onTableSegmentClick","onJourneyComplete","journeyId","JOURNEY_ID_STUDENT","originalTableRef","useRef","highlightedTableRef","isJourneyInProgress","playButtonSound","useCircleSounds","nextCoachmark","setJourney","addCoachmark","useJourney","endJourney","useCallback","tableDetails","_a","_b","handleTableSegmentClick","launcherData","tableData","segmentedCardDims","tableCardDims","_c","IndicatorType","jsx","TablesCard","FlexView","Text","Fragment","startAnimationOnLabelAgain","goToTableLauncher","TABLE_CARD_INDEX","showNudge","animateLabel","startJourney","tablesData","paginationList","carouselNextBtnRef","tablePaginationRef","_d","labelDims","_e","PUZZLE_CARD_INDEX","_f","IconButton","CaratRightIcon","S.Indicator","tableInfo"],"mappings":";;;;;;;;;;;;;AAwBO,MAAMA,KAA0B,CAAC;AAAA,EACtC,cAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,mBAAAC;AACF,MAA6B;AAC3B,QAAMC,IAAYC,EAAmB,6BAC/BC,IAAmBC,EAAsB,IAAI,GAC7CC,IAAsBD,EAAsB,IAAI,GAChDE,IAAsBF,EAAO,EAAK,GAElC,EAAE,iBAAAG,MAAoBC,KACtB,EAAE,eAAAC,GAAe,YAAAC,GAAY,cAAAC,MAAiBC,EAAW,GAEzDC,IAAaC;AAAA,IACjB,CAACC,MAAiC;;AAEhC,MAAIA,KACFhB,EAAoBgB,CAAY,IAGhBC,IAAAb,KAAA,gBAAAA,EAAA,YAAA,QAAAa,EAAS,kBAAkB,MAC7CC,IAAAd,KAAA,gBAAAA,EAAkB,YAAlB,QAAAc,EAA2B,sBAC3BjB,EAAkBC,CAAS,GAC3BQ,EAAcR,GAAW,EAAK;AAAA,IAChC;AAAA,IACA,CAACA,GAAWQ,GAAeT,GAAmBD,CAAmB;AAAA,EAAA,GAG7DmB,IAA0BJ;AAAA,IAC9B,CAACK,GAAuBC,MAA0B;;AAE9C,UAAA,GAACJ,IAAAb,EAAiB,YAAjB,QAAAa,EAA0B,wBAAwB,YACnD,GAACC,IAAAd,EAAiB,YAAjB,QAAAc,EAA0B,SAAS;AAEpC;AAGF,YAAMI,IAAoBlB,EAAiB,QAAQ,SAAS,QAAQ,yBAC9DmB,KACJC,IAAApB,EAAiB,YAAjB,gBAAAoB,EAA0B,wBAAwB,QAAQ;AAE5D,MAAAZ,EAAaV,GAAW;AAAA,QACtB,+BAA+BE,EAAiB,QAAQ;AAAA,QACxD,UAAU;AAAA,QACV,MAAMqB,EAAc;AAAA,QACpB,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O;AAAA,UACP,+BACGF,GACC,EAAA,UAAA,gBAAAF,EAACG,KAAK,WAAU,YAAW,gFAE3B,EACF,CAAA;AAAA,UAEF,qBAAqBa,EAAU,QAAQ;AAAA,UACvC,qBAAqBA,EAAU,SAAS;AAAA,QAC1C;AAAA,MAAA,CACD,GAED9B,EAAaV,GAAW;AAAA,QACtB,+BAA+BE,EAAiB,QAAQ;AAAA,QACxD,UAAU;AAAA,QACV,MAAMqB,EAAc;AAAA,QACpB,WAAW;AAAA,UACT,OAAO;AAAA,UACP,SACG,gBAAAC,EAAAG,GAAA,EAAK,WAAU,OAAM,QAAO,SAC1B,UACH,yBAAA;AAAA,UAEF,eAAeN,EAAc,QAAQ,IAAI;AAAA,UACzC,eAAeA,EAAc,SAAS;AAAA,QACxC;AAAA,QACA,oBACE,gBAAAG;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,KAAKrB;AAAA,YACL,OAAO+B,EAAW;AAAA,YAClB,MAAMA,EAAW;AAAA,YACjB,SAAS,MAAM;AAAA,YAAC;AAAA,YAChB,qBAAqB,CAAAY,MAAa9B,EAAwBkB,GAAYY,CAAS;AAAA,UAAA;AAAA,QACjF;AAAA,MAAA,CAEH;AAAA,IACH;AAAA,IACA;AAAA,MACErC;AAAA,MACAb;AAAA,MACAiC;AAAA,MACAb;AAAA,MACAjB;AAAA,MACAQ;AAAA,MACAC;AAAA,IACF;AAAA,EAAA;AAGK,SAAA;AAAA,IACL,UAAUP;AAAA,IACV,cAAAgC;AAAA,EAAA;AAEJ;"}
|
1
|
+
{"version":3,"file":"use-table-launcher-journey.js","sources":["../../../../../../src/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.tsx"],"sourcesContent":["/* eslint-disable react-native/no-inline-styles */\nimport type { IArrowTooltipProps } from '../../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { INudgeProps } from '../../../../ui/nudge/nudge-types';\nimport type { ITableCardRef, ITableDetails } from '../../comps/tables-card/tables-card-types';\nimport type {\n ITableInfo,\n ITables,\n} from '../../dal/use-get-circle-home-details-dal/use-get-circle-home-dal-types';\nimport type { IUseTableJourneyProps } from './use-table-launcher-journey-types';\n\nimport { useCallback, useRef } from 'react';\n\nimport CaratRightIcon from '../../../../../assets/line-icons/icons/carat-right';\nimport { PLATFORM_EVENTS_STUDENT } from '../../../../analytics-events/platform-events-student';\nimport { JOURNEY_ID_STUDENT } from '../../../../journey/journey-id/journey-id-student';\nimport { IndicatorType } from '../../../../journey/use-journey/constants';\nimport { useJourney } from '../../../../journey/use-journey/use-journey';\nimport IconButton from '../../../../ui/buttons/icon-button/icon-button';\nimport { useUIContext } from '../../../../ui/context/context';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport { CIRCLE_ONBOARDING_ANALYTICS_STEPS as Action } from '../../../enum/circle-onboarding-steps';\nimport { useCircleSounds } from '../../../hooks/use-circle-sounds/use-circle-sounds';\nimport { TablesCard } from '../../comps/tables-card/tables-card';\nimport { GAME_LAUNCHER_ANALYTICS_EVENTS } from '../../game-launcher-analytics-events';\nimport { PUZZLE_CARD_INDEX, TABLE_CARD_INDEX } from './constants';\nimport * as S from './use-table-launcher-journey-styled';\n\nexport const useTableLauncherJourney = ({\n carouselRefs,\n onTableSegmentClick,\n onJourneyComplete,\n}: IUseTableJourneyProps) => {\n const journeyId = JOURNEY_ID_STUDENT.CIRCLE_TABLES_INTRO_JOURNEY;\n const originalTableRef = useRef<ITableCardRef>(null);\n const highlightedTableRef = useRef<ITableCardRef>(null);\n const isJourneyInProgress = useRef(false);\n\n const { playButtonSound } = useCircleSounds();\n const { nextCoachmark, setJourney, addCoachmark } = useJourney();\n const { onEvent: trackAnalytics } = useUIContext();\n\n const endJourney = useCallback(\n (tableDetails?: ITableDetails) => {\n // Only when User clicked on play\n if (tableDetails) {\n onTableSegmentClick(tableDetails);\n }\n trackAnalytics(PLATFORM_EVENTS_STUDENT.ONBOARDING_STEP_COMPLETED, {\n step: Action.TABLES,\n });\n\n // Reset original table card ref label\n originalTableRef?.current?.setLabelVisiblity(true);\n originalTableRef?.current?.stopLabelAnimation();\n onJourneyComplete(journeyId);\n nextCoachmark(journeyId, false);\n },\n [journeyId, nextCoachmark, onJourneyComplete, onTableSegmentClick, trackAnalytics],\n );\n\n const handleTableSegmentClick = useCallback(\n (launcherData: ITables, tableData: ITableInfo) => {\n if (\n !originalTableRef.current?.segmentedCardWrapperRef.current ||\n !originalTableRef.current?.labelRef.current\n ) {\n return;\n }\n\n const segmentedCardDims = originalTableRef.current.labelRef.current.getBoundingClientRect();\n const tableCardDims =\n originalTableRef.current?.segmentedCardWrapperRef.current.getBoundingClientRect();\n\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: (\n <TablesCard\n ref={highlightedTableRef}\n defaultTable={tableData}\n label={launcherData.label}\n data={launcherData.data}\n onPress={endJourney}\n onGoBackFromTableLevel={endJourney}\n />\n ),\n indicator: {\n position: 'left',\n backgroundColor: 'YELLOW_4',\n width: 236,\n tooltipItem: (\n <FlexView>\n <Text $renderAs=\"ab2-bold\">Each table has 3 levels—clear them and earn 3 stars!</Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: 0,\n tooltipYCoOrdinates: segmentedCardDims.height * 0.35,\n } as IArrowTooltipProps,\n });\n\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Pick a level\n </Text>\n ),\n nudgePointerX: tableCardDims.width / 2 + 50,\n nudgePointerY: tableCardDims.height * 0.4,\n } as INudgeProps,\n elementToHighlight: <></>,\n });\n\n nextCoachmark(journeyId, false, 100); // Show coachmark => Each table has 3... and Hide the previous two\n nextCoachmark(journeyId, true, 2000); // Show nudge => Pick a level\n\n const startAnimationOnLabelAgain = setTimeout(() => {\n clearTimeout(startAnimationOnLabelAgain);\n highlightedTableRef.current?.startLabelAnimation('YELLOW_4');\n }, 3000);\n },\n [addCoachmark, endJourney, journeyId, nextCoachmark],\n );\n\n const goToTableLauncher = useCallback(() => {\n playButtonSound();\n carouselRefs.current?.goToIndex(TABLE_CARD_INDEX);\n nextCoachmark(journeyId, false, 1000);\n\n trackAnalytics(PLATFORM_EVENTS_STUDENT.ONBOARDING_STEP_VIEWED, {\n step: Action.TABLES,\n });\n\n const showNudge = setTimeout(() => {\n clearTimeout(showNudge);\n originalTableRef.current?.setLabelVisiblity(false);\n nextCoachmark(journeyId, true);\n }, 3000);\n\n const animateLabel = setTimeout(() => {\n clearTimeout(animateLabel);\n highlightedTableRef.current?.startLabelAnimation('YELLOW_4');\n }, 3100);\n }, [carouselRefs, journeyId, nextCoachmark, playButtonSound, trackAnalytics]);\n\n const startJourney = useCallback(\n (tablesData: ITables) => {\n if (isJourneyInProgress.current) {\n return;\n }\n\n const paginationList = carouselRefs.current?.indicatorRefs;\n const carouselNextBtnRef = carouselRefs.current?.nextBtnRef;\n const tablePaginationRef = paginationList?.[TABLE_CARD_INDEX];\n\n if (\n !originalTableRef.current?.segmentedCardWrapperRef.current ||\n !originalTableRef.current?.labelRef.current ||\n !paginationList ||\n !carouselNextBtnRef?.current ||\n !tablePaginationRef ||\n !tablePaginationRef.current\n ) {\n return;\n }\n\n isJourneyInProgress.current = true;\n\n const labelDims = originalTableRef.current.labelRef.current.getBoundingClientRect();\n const tableCardDims =\n originalTableRef.current?.segmentedCardWrapperRef.current.getBoundingClientRect();\n\n setJourney(journeyId, []);\n\n // TAKE THE USER TO THE TABLE CARD\n if (carouselRefs.current.currentIndex === PUZZLE_CARD_INDEX) {\n addCoachmark(journeyId, {\n originalElementToHighlightRef: carouselRefs.current?.nextBtnRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n Click to proceed\n </Text>\n ),\n nudgePointerX: 0,\n nudgePointerY: 0,\n } as INudgeProps,\n elementToHighlight: (\n <IconButton\n renderAs=\"secondary\"\n Icon={CaratRightIcon}\n onClick={goToTableLauncher}\n analyticsLabel={GAME_LAUNCHER_ANALYTICS_EVENTS.JOURNEY_NEXT_ACTIVITY}\n />\n ),\n });\n nextCoachmark(journeyId, false, 500); // Show nudge => Click to proceed\n } else {\n addCoachmark(journeyId, {\n originalElementToHighlightRef: tablePaginationRef as React.RefObject<HTMLDivElement>,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <S.Indicator $isActive={false} />,\n indicator: {\n position: 'bottom',\n backgroundColor: 'YELLOW_4',\n width: 52,\n tooltipItem: (\n <FlexView\n $position=\"absolute\"\n $flexDirection=\"row\"\n style={{ top: 6, left: 8, cursor: 'pointer' }}\n onClick={goToTableLauncher}\n >\n <Text $renderAs=\"ab2-bold\">NEW</Text>\n </FlexView>\n ),\n tooltipYCoOrdinates: 14, // Need some offset in Y direction from top\n } as IArrowTooltipProps,\n });\n addCoachmark(journeyId, {\n originalElementToHighlightRef: tablePaginationRef as React.RefObject<HTMLDivElement>,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: '',\n nudgePointerY: 20,\n } as INudgeProps,\n elementToHighlight: <></>,\n });\n nextCoachmark(journeyId, false, 500); // Show Coachmark => NEW\n nextCoachmark(journeyId, true, 1500); // Show Nudge over Coachmark\n }\n\n // SHOW THE USER SELECT A TABLE\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.labelRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <></>,\n indicator: {\n position: 'right',\n backgroundColor: 'YELLOW_4',\n width: 264,\n tooltipItem: (\n <FlexView>\n <Text $renderAs=\"ab2-bold\">\n Get faster at multiplication! Practice everyday and become a Tables champ.\n </Text>\n </FlexView>\n ),\n tooltipXCoOrdinates: labelDims.width + 50,\n tooltipYCoOrdinates: labelDims.height / 2,\n } as IArrowTooltipProps,\n });\n\n addCoachmark(journeyId, {\n originalElementToHighlightRef: originalTableRef.current.segmentedCardWrapperRef,\n isActive: false,\n type: IndicatorType.NUDGE,\n indicator: {\n nudge: 'click',\n content: (\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n {'Pick a table to start'}\n </Text>\n ),\n nudgePointerX: tableCardDims.width / 2 + 50,\n nudgePointerY: tableCardDims.height / 2,\n } as INudgeProps,\n elementToHighlight: (\n <TablesCard\n ref={highlightedTableRef}\n label={tablesData.label}\n data={tablesData.data}\n onPress={() => {}}\n onPressTableSegment={tableInfo => handleTableSegmentClick(tablesData, tableInfo)}\n />\n ),\n });\n },\n [\n addCoachmark,\n carouselRefs,\n goToTableLauncher,\n handleTableSegmentClick,\n journeyId,\n nextCoachmark,\n setJourney,\n ],\n );\n\n return {\n tableRef: originalTableRef,\n startJourney,\n };\n};\n"],"names":["useTableLauncherJourney","carouselRefs","onTableSegmentClick","onJourneyComplete","journeyId","JOURNEY_ID_STUDENT","originalTableRef","useRef","highlightedTableRef","isJourneyInProgress","playButtonSound","useCircleSounds","nextCoachmark","setJourney","addCoachmark","useJourney","trackAnalytics","useUIContext","endJourney","useCallback","tableDetails","PLATFORM_EVENTS_STUDENT","Action","_a","_b","handleTableSegmentClick","launcherData","tableData","segmentedCardDims","tableCardDims","_c","IndicatorType","jsx","TablesCard","FlexView","Text","Fragment","startAnimationOnLabelAgain","goToTableLauncher","TABLE_CARD_INDEX","showNudge","animateLabel","startJourney","tablesData","paginationList","carouselNextBtnRef","tablePaginationRef","_d","labelDims","_e","PUZZLE_CARD_INDEX","_f","IconButton","CaratRightIcon","GAME_LAUNCHER_ANALYTICS_EVENTS","S.Indicator","tableInfo"],"mappings":";;;;;;;;;;;;;;;;;AA4BO,MAAMA,KAA0B,CAAC;AAAA,EACtC,cAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,mBAAAC;AACF,MAA6B;AAC3B,QA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