@cuemath/leap 3.2.11-mb → 3.2.11

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 (104) hide show
  1. package/dist/assets/lottie/lottie.js +1 -1
  2. package/dist/assets/lottie/lottie.js.map +1 -1
  3. package/dist/features/auth/account-selector/account-selector.js +26 -25
  4. package/dist/features/auth/account-selector/account-selector.js.map +1 -1
  5. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +15 -14
  6. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
  7. package/dist/features/auth/comps/user-list/user-item/user-item.js +30 -31
  8. package/dist/features/auth/comps/user-list/user-item/user-item.js.map +1 -1
  9. package/dist/features/auth/comps/user-list/user-list.js +35 -34
  10. package/dist/features/auth/comps/user-list/user-list.js.map +1 -1
  11. package/dist/features/auth/forgot-password/forgot-password-styled.js +14 -15
  12. package/dist/features/auth/forgot-password/forgot-password-styled.js.map +1 -1
  13. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js +6 -7
  14. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js.map +1 -1
  15. package/dist/features/auth/login/login-styled.js +8 -9
  16. package/dist/features/auth/login/login-styled.js.map +1 -1
  17. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +121 -98
  18. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -1
  19. package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js +29 -28
  20. package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js.map +1 -1
  21. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js +43 -42
  22. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +1 -1
  23. package/dist/features/circle-games/games/tutorial/tutorial.js +43 -35
  24. package/dist/features/circle-games/games/tutorial/tutorial.js.map +1 -1
  25. package/dist/features/circle-games/sign-up/comp/grade-input/grade-input-styled.js +2 -2
  26. package/dist/features/circle-games/sign-up/comp/grade-input/grade-input-styled.js.map +1 -1
  27. package/dist/features/circle-games/sign-up/comp/grade-input/grade-input.js +1 -1
  28. package/dist/features/circle-games/sign-up/comp/grade-input/grade-input.js.map +1 -1
  29. package/dist/features/circle-games/sign-up/comp/username-input/username-input.js +26 -24
  30. package/dist/features/circle-games/sign-up/comp/username-input/username-input.js.map +1 -1
  31. package/dist/features/circle-games/sign-up/constants.js +3 -1
  32. package/dist/features/circle-games/sign-up/constants.js.map +1 -1
  33. package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js +42 -42
  34. package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js.map +1 -1
  35. package/dist/features/journey/comps/coachmark/coachmark.js +29 -27
  36. package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
  37. package/dist/features/journey/journey-id/journey-id-student.js +2 -2
  38. package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
  39. package/dist/features/journey/use-journey/journey-context-provider.js +73 -72
  40. package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
  41. package/dist/features/journey/use-journey/journey-styled.js +6 -4
  42. package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
  43. package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js +6 -0
  44. package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js.map +1 -0
  45. package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js +12 -60
  46. package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js.map +1 -1
  47. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +72 -77
  48. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
  49. package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js +63 -0
  50. package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js.map +1 -0
  51. package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js +21 -0
  52. package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js.map +1 -0
  53. package/dist/features/ui/error/error.js +65 -27
  54. package/dist/features/ui/error/error.js.map +1 -1
  55. package/dist/features/ui/modals/modal-styled.js +35 -28
  56. package/dist/features/ui/modals/modal-styled.js.map +1 -1
  57. package/dist/features/ui/modals/modal.js +40 -14
  58. package/dist/features/ui/modals/modal.js.map +1 -1
  59. package/dist/features/ui/nudge/nudge-styled.js +14 -7
  60. package/dist/features/ui/nudge/nudge-styled.js.map +1 -1
  61. package/dist/features/ui/nudge/nudge.js +13 -12
  62. package/dist/features/ui/nudge/nudge.js.map +1 -1
  63. package/dist/features/ui/sticker-grid/sticker-grid-styles.js +86 -0
  64. package/dist/features/ui/sticker-grid/sticker-grid-styles.js.map +1 -0
  65. package/dist/features/ui/sticker-grid/sticker-grid.js +24 -0
  66. package/dist/features/ui/sticker-grid/sticker-grid.js.map +1 -0
  67. package/dist/features/ui/sticker-grid/sticker.js +57 -0
  68. package/dist/features/ui/sticker-grid/sticker.js.map +1 -0
  69. package/dist/features/ui/stickers/constants.js +6 -0
  70. package/dist/features/ui/stickers/constants.js.map +1 -0
  71. package/dist/features/ui/stickers/stickers-effects.js +64 -0
  72. package/dist/features/ui/stickers/stickers-effects.js.map +1 -0
  73. package/dist/features/ui/stickers/stickers-styled.js +29 -0
  74. package/dist/features/ui/stickers/stickers-styled.js.map +1 -0
  75. package/dist/features/ui/stickers/stickers-utils.js +91 -0
  76. package/dist/features/ui/stickers/stickers-utils.js.map +1 -0
  77. package/dist/features/ui/stickers/stickers.js +40 -0
  78. package/dist/features/ui/stickers/stickers.js.map +1 -0
  79. package/dist/features/ui/streak-icon/streak-icon-styled.js +13 -13
  80. package/dist/features/ui/streak-icon/streak-icon-styled.js.map +1 -1
  81. package/dist/features/ui/streak-icon/streak-icon.js +17 -15
  82. package/dist/features/ui/streak-icon/streak-icon.js.map +1 -1
  83. package/dist/features/ui/text/text.js +40 -36
  84. package/dist/features/ui/text/text.js.map +1 -1
  85. package/dist/features/ui/theme/constants.js +4 -2
  86. package/dist/features/ui/theme/constants.js.map +1 -1
  87. package/dist/features/ui/theme/get-device.js +3 -3
  88. package/dist/features/ui/theme/get-device.js.map +1 -1
  89. package/dist/features/worksheet/worksheet/constants.js +12 -13
  90. package/dist/features/worksheet/worksheet/constants.js.map +1 -1
  91. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +246 -260
  92. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
  93. package/dist/features/worksheet/worksheet/worksheet-styled.js +37 -28
  94. package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
  95. package/dist/features/worksheet/worksheet/worksheet.js +166 -164
  96. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  97. package/dist/index.d.ts +48 -16
  98. package/dist/index.js +353 -349
  99. package/dist/index.js.map +1 -1
  100. package/dist/static/nudge-tap.0591aef4.json +1 -0
  101. package/package.json +1 -1
  102. package/dist/features/hooks/use-viewport/use-viewport.js +0 -22
  103. package/dist/features/hooks/use-viewport/use-viewport.js.map +0 -1
  104. package/dist/static/nudge-tap.5cb30093.json +0 -1057
@@ -1,353 +1,339 @@
1
- import { jsxs as L, jsx as i, Fragment as Vt } from "react/jsx-runtime";
2
- import { memo as Xt, useMemo as p, useState as T, useRef as K, useCallback as Pt, useEffect as R, useLayoutEffect as jt } from "react";
3
- import { IMAGES as Gt } from "../../../../assets/images/images.js";
4
- import Yt from "../../../cue-canvas/cue-canvas.js";
5
- import Zt from "../../../pointer-sync/pointer.js";
6
- import Ht from "../../../ui/layout/flex-view.js";
7
- import Jt from "../../constants/events.js";
8
- import { QUESTIONS_GAP as kt, LEARNOSITY_KEYBOARD_HEIGHT as St } from "../constants.js";
9
- import { getPaperColorByQuestion as qt, isConceptIntroWidget as te, scrollToQuestion as bt } from "../worksheet-helpers.js";
10
- import ee from "./header/header.js";
11
- import ie from "./learnosity-question.js";
12
- import re from "./question-backdrop/question-backdrop.js";
13
- import oe from "./subjective-review.js";
14
- import ne from "./system-intros/advanced-practice-intro.js";
15
- import ce from "./system-intros/basic-practice-intro.js";
16
- import ae from "./system-intros/exit-ticket-intro.js";
17
- import se from "./system-intros/regular-practice-intro.js";
18
- import { QuestionContainerWrapper as le, StimulusReview as me, QuestionContainer as ue, QuestionWrapper as fe, LessonOverviewBanner as he, CueCanvasWrapper as de, Hint as ge, Solution as Ee } from "./worksheet-question-styled.js";
19
- const Me = Xt(
1
+ import { jsxs as I, jsx as r, Fragment as Ut } from "react/jsx-runtime";
2
+ import { memo as zt, useMemo as $, useState as M, useRef as z, useCallback as Dt, useEffect as _, useLayoutEffect as Vt } from "react";
3
+ import { IMAGES as Xt } from "../../../../assets/images/images.js";
4
+ import Pt from "../../../cue-canvas/cue-canvas.js";
5
+ import jt from "../../../pointer-sync/pointer.js";
6
+ import wt from "../../../ui/layout/flex-view.js";
7
+ import Ft from "../../constants/events.js";
8
+ import { QUESTIONS_GAP as Gt } from "../constants.js";
9
+ import { getPaperColorByQuestion as Yt, isConceptIntroWidget as Zt, scrollToQuestion as vt } from "../worksheet-helpers.js";
10
+ import Kt from "./header/header.js";
11
+ import Jt from "./learnosity-question.js";
12
+ import kt from "./question-backdrop/question-backdrop.js";
13
+ import qt from "./subjective-review.js";
14
+ import ti from "./system-intros/advanced-practice-intro.js";
15
+ import ii from "./system-intros/basic-practice-intro.js";
16
+ import ri from "./system-intros/exit-ticket-intro.js";
17
+ import ei from "./system-intros/regular-practice-intro.js";
18
+ import { QuestionContainerWrapper as oi, StimulusReview as ni, QuestionContainer as ci, QuestionWrapper as ai, LessonOverviewBanner as mi, CueCanvasWrapper as li, Hint as si, Solution as ui } from "./worksheet-question-styled.js";
19
+ const Mi = zt(
20
20
  ({
21
- userType: c,
22
- signedRequest: Ct,
23
- worksheetCompleted: g,
24
- question: n,
25
- response: e,
26
- nextQuestionId: v,
27
- isActive: w,
28
- isHidden: A,
29
- canRender: V,
30
- loggerRef: M,
21
+ userType: n,
22
+ signedRequest: Ht,
23
+ worksheetCompleted: d,
24
+ question: c,
25
+ response: i,
26
+ nextQuestionId: w,
27
+ isActive: v,
28
+ isHidden: T,
29
+ canRender: D,
30
+ loggerRef: A,
31
31
  appended: a,
32
- maxQuestionWidth: X,
33
- behavior: P,
34
- layout: j,
35
- actionbarHeight: Wt,
36
- learnosity: b,
37
- intersectionObserver: G,
38
- background: Y = "paper",
39
- onMediaStateChange: yt,
40
- onMarkForReview: Bt,
41
- userId: xt,
42
- onPublishStrokes: Z,
43
- onReceiveStrokes: J,
44
- isScribblingEnabled: k,
45
- initialStrokesData: O,
46
- isCanvasEnabled: q,
47
- onPublishMouseMove: tt,
48
- onSubscribeMouseMove: et,
49
- setActiveQuestionId: it,
50
- canResolveDoubt: It,
32
+ maxQuestionWidth: V,
33
+ behavior: X,
34
+ layout: P,
35
+ actionbarHeight: St,
36
+ learnosity: S,
37
+ intersectionObserver: j,
38
+ background: F = "paper",
39
+ onMediaStateChange: Rt,
40
+ onMarkForReview: Wt,
41
+ userId: Ct,
42
+ onPublishStrokes: G,
43
+ onReceiveStrokes: Y,
44
+ isScribblingEnabled: Z,
45
+ initialStrokesData: B,
46
+ isCanvasEnabled: K,
47
+ onPublishMouseMove: J,
48
+ onSubscribeMouseMove: k,
49
+ setActiveQuestionId: q,
50
+ canResolveDoubt: pt,
51
51
  onResolveDoubt: Lt,
52
- studentId: Tt,
53
- responses: At,
54
- subjectiveProps: rt
52
+ studentId: bt,
53
+ responses: xt,
54
+ subjectiveProps: tt
55
55
  }) => {
56
- const C = p(
57
- () => Y === "paper" ? qt(n) : void 0,
58
- [Y, n]
59
- ), [W, Mt] = T(), [ot, Ot] = T(), {
60
- validation: nt,
61
- review: N,
62
- maximumAttempts: ct,
63
- canExceedAttempts: at,
64
- teacherValidationEnabled: H,
65
- solutionHidden: st
66
- } = P, { minQuestionHeight: Nt, topOffset: lt, questionsScrollable: y, renderQuestionHeader: Qt } = j, {
67
- type: E,
68
- response_id: r,
69
- stimulus_review: _,
70
- item_type: f,
71
- instructor_stimulus: mt,
72
- metadata: { hints: h, solution: B, widget_reference: ut },
73
- item_reference: ft,
74
- question_number: ht,
75
- item_number: dt,
76
- item_display_number: gt
77
- } = n, Ft = !!_, x = f === "overview", m = te(mt), d = mt === "SystemIntro", Q = m || d, Et = e == null ? void 0 : e.responseEdited, zt = p(() => {
56
+ const R = $(
57
+ () => F === "paper" ? Yt(c) : void 0,
58
+ [F, c]
59
+ ), [W, It] = M(), [it, Mt] = M(), {
60
+ validation: rt,
61
+ review: y,
62
+ maximumAttempts: et,
63
+ canExceedAttempts: ot,
64
+ teacherValidationEnabled: C,
65
+ solutionHidden: nt
66
+ } = X, { minQuestionHeight: Tt, topOffset: ct, questionsScrollable: p, renderQuestionHeader: At } = P, {
67
+ type: H,
68
+ response_id: e,
69
+ stimulus_review: g,
70
+ item_type: u,
71
+ instructor_stimulus: at,
72
+ metadata: { hints: h, solution: L, widget_reference: mt },
73
+ item_reference: lt,
74
+ question_number: st,
75
+ item_number: ut,
76
+ item_display_number: ht
77
+ } = c, Bt = !!g, b = u === "overview", l = Zt(at), f = at === "SystemIntro", ft = l || f, dt = i == null ? void 0 : i.responseEdited, yt = $(() => {
78
78
  const t = [];
79
- return Et && c === "TEACHER" && t.push("attempting"), a || t.push("hidden"), E === "hotspot" && t.push("correct-answers-hidden"), a && H && E === "clozetext" && (!m || c === "STUDENT" ? t.push("response-hidden") : t.push("response-code-hidden")), x && t.push("lesson-overview"), m && t.push("concept-intro"), d && t.push("system-intro"), t.join(" ");
79
+ return dt && n === "TEACHER" && t.push("attempting"), a || t.push("hidden"), H === "hotspot" && t.push("correct-answers-hidden"), a && C && H === "clozetext" && (!l || n === "STUDENT" ? t.push("response-hidden") : t.push("response-code-hidden")), b && t.push("lesson-overview"), l && t.push("concept-intro"), f && t.push("system-intro"), t.join(" ");
80
80
  }, [
81
81
  a,
82
- m,
83
- x,
84
- d,
85
- E,
86
- Et,
82
+ l,
83
+ b,
84
+ f,
87
85
  H,
88
- c
89
- ]), F = K({}), z = (e == null ? void 0 : e.hintsUsed) ?? 0, [_t] = T((e == null ? void 0 : e.validatedByTeacher) ?? !1), I = K(null), D = K(null), U = p(() => h == null ? void 0 : h.slice(0, z), [h, z]), $t = p(() => c === "TEACHER" || g ? !0 : !e || !e.response || e.responseEdited ? !1 : nt, [e, c, nt, g]), pt = p(() => {
90
- if (c === "TEACHER") return !0;
91
- if (N) {
92
- const { attemptsHistory: t } = e ?? {};
93
- return ((t == null ? void 0 : t.length) ?? 0) >= ct && !at;
86
+ dt,
87
+ C,
88
+ n
89
+ ]), O = z({}), Q = (i == null ? void 0 : i.hintsUsed) ?? 0, [gt] = M((i == null ? void 0 : i.validatedByTeacher) ?? !1), x = z(null), N = z(null), U = $(() => h == null ? void 0 : h.slice(0, Q), [h, Q]), Et = $(() => n === "TEACHER" || d ? !0 : !i || !i.response || i.responseEdited ? !1 : rt, [i, n, rt, d]), $t = $(() => {
90
+ if (n === "TEACHER") return !0;
91
+ if (y) {
92
+ const { attemptsHistory: t } = i ?? {};
93
+ return ((t == null ? void 0 : t.length) ?? 0) >= et && !ot;
94
94
  }
95
95
  return !1;
96
- }, [at, ct, e, N, c]), Dt = p(
97
- () => B && g && !st,
98
- [st, B, g]
99
- ), [Rt, Ut] = T({
96
+ }, [ot, et, i, y, n]), Ot = $(
97
+ () => L && d && !nt,
98
+ [nt, L, d]
99
+ ), [_t, Qt] = M({
100
100
  width: 0,
101
101
  height: 0
102
- }), Kt = Pt((t) => {
103
- Ot(t);
102
+ }), Nt = Dt((t) => {
103
+ Mt(t);
104
104
  }, []);
105
- return R(() => {
106
- I.current && G.observe(I.current);
107
- }, [G]), R(() => {
108
- if (a && (n.type === "clozeassociation" || n.type === "association" || n.type === "clozeformula")) {
105
+ return _(() => {
106
+ x.current && j.observe(x.current);
107
+ }, [j]), _(() => {
108
+ if (a && (c.type === "clozeassociation" || c.type === "association" || c.type === "clozeformula")) {
109
109
  const t = document.querySelectorAll(
110
- `.widget-${n.response_id} .lrn_draggable`
110
+ `.widget-${c.response_id} .lrn_draggable`
111
111
  );
112
- let s = 0, o = 0;
113
- t.forEach((l) => {
114
- s = Math.max(s, l.clientWidth + 33), o = Math.max(o, l.clientHeight + 1);
115
- }), Ut({
116
- width: n.type !== "association" ? s : 0,
117
- height: o
112
+ let o = 0, m = 0;
113
+ t.forEach((s) => {
114
+ o = Math.max(o, s.clientWidth + 33), m = Math.max(m, s.clientHeight + 1);
115
+ }), Qt({
116
+ width: c.type !== "association" ? o : 0,
117
+ height: m
118
118
  });
119
119
  }
120
- }, [a, n.response_id, n.type]), R(() => {
121
- if (a && $t) {
122
- const t = b.question(r);
120
+ }, [a, c.response_id, c.type]), _(() => {
121
+ if (a && Et) {
122
+ const t = S.question(e);
123
123
  t && t.validate({
124
- showCorrectAnswers: pt
124
+ showCorrectAnswers: $t
125
125
  });
126
126
  }
127
- }, [a, b, r, N, pt, c, $t]), R(() => {
128
- const t = D.current;
129
- if (a && t && M.current && F.current[r] === void 0 && !m && !d) {
130
- const s = t.clientWidth, o = t.querySelectorAll("*");
131
- for (let l = 0; l < o.length; l++) {
132
- const u = o[l];
133
- if (u != null && u.closest(".resize-sensor"))
127
+ }, [a, S, e, y, $t, n, Et]), _(() => {
128
+ const t = N.current;
129
+ if (a && t && A.current && O.current[e] === void 0 && !l && !f) {
130
+ const o = t.clientWidth, m = t.querySelectorAll("*");
131
+ for (let s = 0; s < m.length; s++) {
132
+ const E = m[s];
133
+ if (E != null && E.closest(".resize-sensor"))
134
134
  continue;
135
- if (((u == null ? void 0 : u.clientWidth) ?? 0) > s) {
136
- F.current[r] = !0, M.current(Jt.WORKSHEET_V3_GREATER_WIDTH_ELEMENT, {
137
- item_reference: ft,
138
- widget_reference: ut,
139
- question_type: E,
140
- question_number: ht,
141
- responseId: r,
142
- item_number: dt,
143
- item_display_number: gt
135
+ if (((E == null ? void 0 : E.clientWidth) ?? 0) > o) {
136
+ O.current[e] = !0, A.current(Ft.WORKSHEET_V3_GREATER_WIDTH_ELEMENT, {
137
+ item_reference: lt,
138
+ widget_reference: mt,
139
+ question_type: H,
140
+ question_number: st,
141
+ responseId: e,
142
+ item_number: ut,
143
+ item_display_number: ht
144
144
  });
145
145
  break;
146
146
  }
147
147
  }
148
- F.current[r] = !1;
148
+ O.current[e] = !1;
149
149
  }
150
150
  }, [
151
151
  a,
152
- m,
153
- d,
154
- gt,
155
- dt,
156
- ft,
157
- M,
158
- E,
152
+ l,
153
+ f,
159
154
  ht,
160
- r,
161
- ut
162
- ]), R(() => {
163
- const t = I.current, s = (o) => {
164
- const l = o.querySelector(".lrn_response_wrapper");
165
- if (Q || !l)
166
- return 0;
167
- const u = o.getBoundingClientRect().bottom, S = l.getBoundingClientRect().bottom, $ = Math.abs(u - S);
168
- return $ < St ? St - $ : 0;
169
- };
170
- a && t && Mt((o) => {
171
- var wt;
172
- const S = ((wt = n.ui_style) == null ? void 0 : wt.type) === "floating-keyboard" && !(H && E === "clozetext"), $ = t.clientHeight;
173
- if ($ === 0)
174
- return o;
175
- if (!o)
176
- return Math.ceil(
177
- $ + (S ? s(t) : 0)
178
- );
179
- const vt = Math.ceil(
180
- $ + (S ? s(t) : 0)
181
- );
182
- return Math.abs(vt - o) > 4 ? vt : o;
183
- }), (z || Ft || B && g) && b.renderMath("mathjax");
184
- }), jt(() => {
185
- !y && !A && bt(r);
186
- }, [A, y, r, lt]), R(() => {
187
- if (H && v && !_t && (e != null && e.validatedByTeacher)) {
155
+ ut,
156
+ lt,
157
+ A,
158
+ H,
159
+ st,
160
+ e,
161
+ mt
162
+ ]), _(() => {
163
+ const t = x.current, o = t == null ? void 0 : t.clientHeight;
164
+ a && o && o > 0 && It((m) => {
165
+ if (!m)
166
+ return Math.ceil(o);
167
+ const s = Math.ceil(o);
168
+ return Math.abs(s - m) > 4 ? s : m;
169
+ }), (Q || Bt || L && d) && S.renderMath("mathjax");
170
+ }), Vt(() => {
171
+ !p && !T && vt(e);
172
+ }, [T, p, e, ct]), _(() => {
173
+ if (C && w && !gt && (i != null && i.validatedByTeacher)) {
188
174
  const t = setTimeout(() => {
189
- y ? bt(v) : it(v);
175
+ p ? vt(w) : q(w);
190
176
  }, 1e3);
191
177
  return () => {
192
178
  clearTimeout(t);
193
179
  };
194
180
  }
195
181
  }, [
196
- v,
197
- H,
198
- _t,
199
- y,
200
- it,
201
- e == null ? void 0 : e.validatedByTeacher
202
- ]), /* @__PURE__ */ L(
203
- le,
182
+ w,
183
+ C,
184
+ gt,
185
+ p,
186
+ q,
187
+ i == null ? void 0 : i.validatedByTeacher
188
+ ]), /* @__PURE__ */ I(
189
+ oi,
204
190
  {
205
- "data-response-id": r,
206
- className: `widget-${r}`,
207
- ref: I,
208
- $topOffset: lt,
209
- $flexDirection: _ ? "row" : "column",
210
- $alignItems: _ ? "flex-start" : "center",
211
- $hidden: A,
212
- $marginBottom: kt,
191
+ "data-response-id": e,
192
+ className: `widget-${e}`,
193
+ ref: x,
194
+ $topOffset: ct,
195
+ $flexDirection: g ? "row" : "column",
196
+ $alignItems: g ? "flex-start" : "center",
197
+ $hidden: T,
198
+ $marginBottom: Gt,
213
199
  children: [
214
- _ && /* @__PURE__ */ i(
215
- me,
200
+ g && /* @__PURE__ */ r(
201
+ ni,
216
202
  {
217
203
  dangerouslySetInnerHTML: {
218
- __html: _
204
+ __html: g
219
205
  }
220
206
  }
221
207
  ),
222
- /* @__PURE__ */ L(
223
- ue,
208
+ /* @__PURE__ */ I(
209
+ ci,
224
210
  {
225
- ref: D,
226
- $width: _ ? "50%" : `${X}px`,
227
- $minHeight: W ? Math.max(W - 72, ot ?? 0) : Nt,
228
- $isActive: w,
229
- $paperColor: C,
230
- $opacity: w ? 1 : 0.2,
211
+ ref: N,
212
+ $width: g ? "50%" : `${V}px`,
213
+ $minHeight: W ? Math.max(W - 72, it ?? 0) : Tt,
214
+ $isActive: v,
215
+ $paperColor: R,
216
+ $opacity: v ? 1 : 0.2,
231
217
  children: [
232
- w && !!tt && !!et && q && /* @__PURE__ */ i(
233
- Zt,
218
+ v && !!J && !!k && K && /* @__PURE__ */ r(
219
+ jt,
234
220
  {
235
- containerRef: D,
236
- onPublish: tt,
237
- onSubscribe: et,
238
- responseId: r
221
+ containerRef: N,
222
+ onPublish: J,
223
+ onSubscribe: k,
224
+ responseId: e
239
225
  }
240
226
  ),
241
- /* @__PURE__ */ L(
242
- fe,
227
+ /* @__PURE__ */ I(
228
+ ai,
243
229
  {
244
- className: zt,
245
- $dropzoneMinWidth: Rt.width,
246
- $dropzoneMinHeight: Rt.height,
230
+ className: yt,
231
+ $dropzoneMinWidth: _t.width,
232
+ $dropzoneMinHeight: _t.height,
247
233
  children: [
248
- Qt && !(x || m || d) && /* @__PURE__ */ i(
249
- ee,
234
+ At && !(b || l || f) && /* @__PURE__ */ r(
235
+ Kt,
250
236
  {
251
- userType: c,
252
- question: n,
253
- response: e,
254
- behavior: P,
255
- layout: j,
256
- paperColor: C,
257
- onMarkForReview: Bt,
258
- actionbarHeight: Wt,
259
- canResolveDoubt: It,
237
+ userType: n,
238
+ question: c,
239
+ response: i,
240
+ behavior: X,
241
+ layout: P,
242
+ paperColor: R,
243
+ onMarkForReview: Wt,
244
+ actionbarHeight: St,
245
+ canResolveDoubt: pt,
260
246
  onResolveDoubt: Lt,
261
- worksheetCompleted: g
247
+ worksheetCompleted: d
262
248
  }
263
249
  ),
264
- x && /* @__PURE__ */ i(he, { src: Gt.LESSON_OVERVIEW_BANNER }),
265
- m && C && /* @__PURE__ */ i(re, { paperColor: C }),
266
- d ? /* @__PURE__ */ L(Vt, { children: [
267
- f === "practice-basic" && /* @__PURE__ */ i(ce, {}),
268
- f === "practice-regular" && /* @__PURE__ */ i(se, {}),
269
- f === "exit-ticket" && /* @__PURE__ */ i(ae, {}),
270
- (f == null ? void 0 : f.startsWith("advanced-")) && /* @__PURE__ */ i(ne, {})
250
+ b && /* @__PURE__ */ r(mi, { src: Xt.LESSON_OVERVIEW_BANNER }),
251
+ l && R && /* @__PURE__ */ r(kt, { paperColor: R }),
252
+ f ? /* @__PURE__ */ I(Ut, { children: [
253
+ u === "practice-basic" && /* @__PURE__ */ r(ii, {}),
254
+ u === "practice-regular" && /* @__PURE__ */ r(ei, {}),
255
+ u === "exit-ticket" && /* @__PURE__ */ r(ri, {}),
256
+ (u == null ? void 0 : u.startsWith("advanced-")) && /* @__PURE__ */ r(ti, {})
271
257
  ] }) : void 0,
272
- /* @__PURE__ */ i(
273
- ie,
258
+ /* @__PURE__ */ r(
259
+ Jt,
274
260
  {
275
- signedRequest: Ct,
261
+ signedRequest: Ht,
276
262
  appended: a,
277
- question: n,
278
- response: e == null ? void 0 : e.response,
279
- canRender: V || w,
280
- learnosity: b,
281
- canForceAppend: c === "TEACHER",
282
- isConceptIntro: m,
283
- simState: e == null ? void 0 : e.simState,
284
- onMediaStateChange: yt
263
+ question: c,
264
+ response: i == null ? void 0 : i.response,
265
+ canRender: D || v,
266
+ learnosity: S,
267
+ canForceAppend: n === "TEACHER",
268
+ isConceptIntro: l,
269
+ simState: i == null ? void 0 : i.simState,
270
+ onMediaStateChange: Rt
285
271
  }
286
272
  ),
287
- !Q && q && Z && J && W !== void 0 && /* @__PURE__ */ i(de, { $canScribble: k, children: /* @__PURE__ */ i(
288
- Yt,
273
+ !ft && K && G && Y && W !== void 0 && /* @__PURE__ */ r(li, { $canScribble: Z, children: /* @__PURE__ */ r(
274
+ Pt,
289
275
  {
290
- canRender: V,
291
- canScribble: k && w,
276
+ canRender: D,
277
+ canScribble: Z && v,
292
278
  appended: a,
293
- canvasId: r,
294
- width: X,
295
- height: Math.max(W, ot ?? 0),
296
- onUpdateHeight: Kt,
297
- onPublish: Z,
298
- onSubscribe: J,
299
- userId: xt,
300
- initialData: O == null ? void 0 : O[r],
301
- userType: c
279
+ canvasId: e,
280
+ width: V,
281
+ height: Math.max(W, it ?? 0),
282
+ onUpdateHeight: Nt,
283
+ onPublish: G,
284
+ onSubscribe: Y,
285
+ userId: Ct,
286
+ initialData: B == null ? void 0 : B[e],
287
+ userType: n
302
288
  }
303
289
  ) }),
304
- !Q && U && U.length > 0 && /* @__PURE__ */ i(
305
- Ht,
290
+ !ft && U && U.length > 0 && /* @__PURE__ */ r(
291
+ wt,
306
292
  {
307
293
  $background: "BLUE_1",
308
294
  $gutterX: 1,
309
295
  $gapX: 0.5,
310
296
  $borderRadiusX: 0,
311
297
  $borderColor: "BLUE_2",
312
- children: U.map((t, s) => /* @__PURE__ */ i(
313
- ge,
298
+ children: U.map((t, o) => /* @__PURE__ */ r(
299
+ si,
314
300
  {
315
301
  dangerouslySetInnerHTML: {
316
- __html: `<span style="color: #DA5107; font-weight: 600;">Hint${((h == null ? void 0 : h.length) ?? 0) > 1 ? ` ${s + 1}` : ""}:</span>&nbsp;${t}`
302
+ __html: `<span style="color: #DA5107; font-weight: 600;">Hint${((h == null ? void 0 : h.length) ?? 0) > 1 ? ` ${o + 1}` : ""}:</span>&nbsp;${t}`
317
303
  }
318
304
  },
319
305
  t
320
306
  ))
321
307
  }
322
308
  ),
323
- Dt && /* @__PURE__ */ i(
324
- Ht,
309
+ Ot && /* @__PURE__ */ r(
310
+ wt,
325
311
  {
326
312
  $background: "YELLOW_1",
327
313
  $gutterX: 1,
328
314
  $gapX: 0.875,
329
315
  $borderRadiusX: 0,
330
316
  $borderColor: "YELLOW_2",
331
- children: /* @__PURE__ */ i(
332
- Ee,
317
+ children: /* @__PURE__ */ r(
318
+ ui,
333
319
  {
334
320
  dangerouslySetInnerHTML: {
335
- __html: `<div style="color: #DA5107; font-weight: 600;">Solution:</div>${B}`
321
+ __html: `<div style="color: #DA5107; font-weight: 600;">Solution:</div>${L}`
336
322
  }
337
323
  }
338
324
  )
339
325
  }
340
326
  ),
341
- !!rt && /* @__PURE__ */ i(
342
- oe,
327
+ !!tt && /* @__PURE__ */ r(
328
+ qt,
343
329
  {
344
- responses: At,
345
- response: e,
346
- nextQuestionId: v,
347
- responseId: r,
348
- studentId: Tt,
349
- userType: c,
350
- ...rt
330
+ responses: xt,
331
+ response: i,
332
+ nextQuestionId: w,
333
+ responseId: e,
334
+ studentId: bt,
335
+ userType: n,
336
+ ...tt
351
337
  }
352
338
  )
353
339
  ]
@@ -362,6 +348,6 @@ const Me = Xt(
362
348
  }
363
349
  );
364
350
  export {
365
- Me as default
351
+ Mi as default
366
352
  };
367
353
  //# sourceMappingURL=worksheet-question.js.map