analytica-frontend-lib 1.0.94 → 1.0.96

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.
@@ -23,6 +23,7 @@ __export(Quiz_exports, {
23
23
  Quiz: () => Quiz,
24
24
  QuizAlternative: () => QuizAlternative,
25
25
  QuizContent: () => QuizContent,
26
+ QuizDissertative: () => QuizDissertative,
26
27
  QuizFooter: () => QuizFooter,
27
28
  QuizHeader: () => QuizHeader,
28
29
  QuizHeaderResult: () => QuizHeaderResult,
@@ -36,7 +37,7 @@ __export(Quiz_exports, {
36
37
  QuizTitle: () => QuizTitle
37
38
  });
38
39
  module.exports = __toCommonJS(Quiz_exports);
39
- var import_phosphor_react8 = require("phosphor-react");
40
+ var import_phosphor_react9 = require("phosphor-react");
40
41
 
41
42
  // src/components/Badge/Badge.tsx
42
43
  var import_phosphor_react = require("phosphor-react");
@@ -952,7 +953,7 @@ IconButton.displayName = "IconButton";
952
953
  var IconButton_default = IconButton;
953
954
 
954
955
  // src/components/Quiz/Quiz.tsx
955
- var import_react11 = require("react");
956
+ var import_react12 = require("react");
956
957
 
957
958
  // src/components/Quiz/useQuizStore.ts
958
959
  var import_zustand2 = require("zustand");
@@ -1036,6 +1037,10 @@ var useQuizStore = (0, import_zustand2.create)()(
1036
1037
  console.warn("selectAnswer called before userId is set");
1037
1038
  return;
1038
1039
  }
1040
+ const question = activeQuiz.quiz.questions.find(
1041
+ (q) => q.id === questionId
1042
+ );
1043
+ if (!question) return;
1039
1044
  const existingAnswerIndex = userAnswers.findIndex(
1040
1045
  (answer) => answer.questionId === questionId
1041
1046
  );
@@ -1043,8 +1048,10 @@ var useQuizStore = (0, import_zustand2.create)()(
1043
1048
  questionId,
1044
1049
  activityId,
1045
1050
  userId,
1046
- answer: null,
1047
- optionId: answerId
1051
+ answer: question.type === "DISSERTATIVA" /* DISSERTATIVA */ ? answerId : null,
1052
+ optionId: question.type === "DISSERTATIVA" /* DISSERTATIVA */ ? null : answerId,
1053
+ questionType: question.type,
1054
+ answerStatus: "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */
1048
1055
  };
1049
1056
  let updatedUserAnswers;
1050
1057
  if (existingAnswerIndex !== -1) {
@@ -1067,6 +1074,10 @@ var useQuizStore = (0, import_zustand2.create)()(
1067
1074
  console.warn("selectMultipleAnswer called before userId is set");
1068
1075
  return;
1069
1076
  }
1077
+ const question = activeQuiz.quiz.questions.find(
1078
+ (q) => q.id === questionId
1079
+ );
1080
+ if (!question) return;
1070
1081
  const filteredUserAnswers = userAnswers.filter(
1071
1082
  (answer) => answer.questionId !== questionId
1072
1083
  );
@@ -1076,7 +1087,11 @@ var useQuizStore = (0, import_zustand2.create)()(
1076
1087
  activityId,
1077
1088
  userId,
1078
1089
  answer: null,
1079
- optionId: answerId
1090
+ // selectMultipleAnswer is for non-dissertative questions
1091
+ optionId: answerId,
1092
+ // selectMultipleAnswer should only set optionId
1093
+ questionType: question.type,
1094
+ answerStatus: "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */
1080
1095
  })
1081
1096
  );
1082
1097
  const updatedUserAnswers = [
@@ -1087,6 +1102,50 @@ var useQuizStore = (0, import_zustand2.create)()(
1087
1102
  userAnswers: updatedUserAnswers
1088
1103
  });
1089
1104
  },
1105
+ selectDissertativeAnswer: (questionId, answer) => {
1106
+ const { getActiveQuiz, userAnswers } = get();
1107
+ const activeQuiz = getActiveQuiz();
1108
+ if (!activeQuiz) return;
1109
+ const activityId = activeQuiz.quiz.id;
1110
+ const userId = get().getUserId();
1111
+ if (!userId || userId === "") {
1112
+ console.warn(
1113
+ "selectDissertativeAnswer called before userId is set"
1114
+ );
1115
+ return;
1116
+ }
1117
+ const question = activeQuiz.quiz.questions.find(
1118
+ (q) => q.id === questionId
1119
+ );
1120
+ if (!question || question.type !== "DISSERTATIVA" /* DISSERTATIVA */) {
1121
+ console.warn(
1122
+ "selectDissertativeAnswer called for non-dissertative question"
1123
+ );
1124
+ return;
1125
+ }
1126
+ const existingAnswerIndex = userAnswers.findIndex(
1127
+ (answerItem) => answerItem.questionId === questionId
1128
+ );
1129
+ const newUserAnswer = {
1130
+ questionId,
1131
+ activityId,
1132
+ userId,
1133
+ answer,
1134
+ optionId: null,
1135
+ questionType: "DISSERTATIVA" /* DISSERTATIVA */,
1136
+ answerStatus: "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */
1137
+ };
1138
+ let updatedUserAnswers;
1139
+ if (existingAnswerIndex !== -1) {
1140
+ updatedUserAnswers = [...userAnswers];
1141
+ updatedUserAnswers[existingAnswerIndex] = newUserAnswer;
1142
+ } else {
1143
+ updatedUserAnswers = [...userAnswers, newUserAnswer];
1144
+ }
1145
+ set({
1146
+ userAnswers: updatedUserAnswers
1147
+ });
1148
+ },
1090
1149
  skipQuestion: () => {
1091
1150
  const { getCurrentQuestion, userAnswers, getActiveQuiz } = get();
1092
1151
  const currentQuestion = getCurrentQuestion();
@@ -1107,7 +1166,9 @@ var useQuizStore = (0, import_zustand2.create)()(
1107
1166
  activityId,
1108
1167
  userId,
1109
1168
  answer: null,
1110
- optionId: null
1169
+ optionId: null,
1170
+ questionType: currentQuestion.type,
1171
+ answerStatus: "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */
1111
1172
  };
1112
1173
  let updatedUserAnswers;
1113
1174
  if (existingAnswerIndex !== -1) {
@@ -1131,6 +1192,10 @@ var useQuizStore = (0, import_zustand2.create)()(
1131
1192
  console.warn("addUserAnswer called before userId is set");
1132
1193
  return;
1133
1194
  }
1195
+ const question = activeQuiz.quiz.questions.find(
1196
+ (q) => q.id === questionId
1197
+ );
1198
+ if (!question) return;
1134
1199
  const existingAnswerIndex = userAnswers.findIndex(
1135
1200
  (answer) => answer.questionId === questionId
1136
1201
  );
@@ -1138,8 +1203,10 @@ var useQuizStore = (0, import_zustand2.create)()(
1138
1203
  questionId,
1139
1204
  activityId,
1140
1205
  userId,
1141
- answer: null,
1142
- optionId: answerId || null
1206
+ answer: question.type === "DISSERTATIVA" /* DISSERTATIVA */ ? answerId || null : null,
1207
+ optionId: question.type !== "DISSERTATIVA" /* DISSERTATIVA */ ? answerId || null : null,
1208
+ questionType: question.type,
1209
+ answerStatus: "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */
1143
1210
  };
1144
1211
  if (existingAnswerIndex !== -1) {
1145
1212
  const updatedUserAnswers = [...userAnswers];
@@ -1189,7 +1256,9 @@ var useQuizStore = (0, import_zustand2.create)()(
1189
1256
  },
1190
1257
  getAnsweredQuestions: () => {
1191
1258
  const { userAnswers } = get();
1192
- return userAnswers.filter((answer) => answer.optionId !== null).length;
1259
+ return userAnswers.filter(
1260
+ (answer) => answer.optionId !== null || answer.answer !== null
1261
+ ).length;
1193
1262
  },
1194
1263
  getUnansweredQuestions: () => {
1195
1264
  const { getActiveQuiz, userAnswers } = get();
@@ -1200,8 +1269,8 @@ var useQuizStore = (0, import_zustand2.create)()(
1200
1269
  const userAnswer = userAnswers.find(
1201
1270
  (answer) => answer.questionId === question.id
1202
1271
  );
1203
- const isAnswered = userAnswer && userAnswer.optionId !== null;
1204
- const isSkipped = userAnswer && userAnswer.optionId === null;
1272
+ const isAnswered = userAnswer && (userAnswer.optionId !== null || userAnswer.answer !== null);
1273
+ const isSkipped = userAnswer && userAnswer.optionId === null && userAnswer.answer === null;
1205
1274
  if (!isAnswered && !isSkipped) {
1206
1275
  unansweredQuestions.push(index + 1);
1207
1276
  }
@@ -1210,7 +1279,9 @@ var useQuizStore = (0, import_zustand2.create)()(
1210
1279
  },
1211
1280
  getSkippedQuestions: () => {
1212
1281
  const { userAnswers } = get();
1213
- return userAnswers.filter((answer) => answer.optionId === null).length;
1282
+ return userAnswers.filter(
1283
+ (answer) => answer.optionId === null && answer.answer === null
1284
+ ).length;
1214
1285
  },
1215
1286
  getProgress: () => {
1216
1287
  const { getTotalQuestions, getAnsweredQuestions } = get();
@@ -1223,14 +1294,14 @@ var useQuizStore = (0, import_zustand2.create)()(
1223
1294
  const userAnswer = userAnswers.find(
1224
1295
  (answer) => answer.questionId === questionId
1225
1296
  );
1226
- return userAnswer ? userAnswer.optionId !== null : false;
1297
+ return userAnswer ? userAnswer.optionId !== null || userAnswer.answer !== null : false;
1227
1298
  },
1228
1299
  isQuestionSkipped: (questionId) => {
1229
1300
  const { userAnswers } = get();
1230
1301
  const userAnswer = userAnswers.find(
1231
1302
  (answer) => answer.questionId === questionId
1232
1303
  );
1233
- return userAnswer ? userAnswer.optionId === null : false;
1304
+ return userAnswer ? userAnswer.optionId === null && userAnswer.answer === null : false;
1234
1305
  },
1235
1306
  getCurrentAnswer: () => {
1236
1307
  const { getCurrentQuestion, userAnswers } = get();
@@ -1239,7 +1310,7 @@ var useQuizStore = (0, import_zustand2.create)()(
1239
1310
  const userAnswer = userAnswers.find(
1240
1311
  (answer) => answer.questionId === currentQuestion.id
1241
1312
  );
1242
- return userAnswer?.optionId;
1313
+ return userAnswer;
1243
1314
  },
1244
1315
  getAllCurrentAnswer: () => {
1245
1316
  const { getCurrentQuestion, userAnswers } = get();
@@ -1273,8 +1344,8 @@ var useQuizStore = (0, import_zustand2.create)()(
1273
1344
  const userAnswer = userAnswers.find(
1274
1345
  (answer) => answer.questionId === question.id
1275
1346
  );
1276
- const hasAnswer = userAnswer && userAnswer.optionId !== null;
1277
- const isSkipped = userAnswer && userAnswer.optionId === null;
1347
+ const hasAnswer = userAnswer && (userAnswer.optionId !== null || userAnswer.answer !== null);
1348
+ const isSkipped = userAnswer && userAnswer.optionId === null && userAnswer.answer === null;
1278
1349
  if (!hasAnswer || isSkipped) {
1279
1350
  unansweredQuestions.push(index + 1);
1280
1351
  }
@@ -1305,7 +1376,7 @@ var useQuizStore = (0, import_zustand2.create)()(
1305
1376
  const answer = userAnswers.find(
1306
1377
  (answer2) => answer2.questionId === questionId
1307
1378
  );
1308
- return answer ? answer.optionId !== null : false;
1379
+ return answer ? answer.optionId !== null || answer.answer !== null : false;
1309
1380
  },
1310
1381
  getQuestionStatusFromUserAnswers: (questionId) => {
1311
1382
  const { userAnswers } = get();
@@ -1334,6 +1405,27 @@ var useQuizStore = (0, import_zustand2.create)()(
1334
1405
  return;
1335
1406
  }
1336
1407
  set({ currentQuestionIndex: questionIndex });
1408
+ },
1409
+ setAnswerStatus: (questionId, status) => {
1410
+ const { userAnswers } = get();
1411
+ const existingAnswerIndex = userAnswers.findIndex(
1412
+ (answer) => answer.questionId === questionId
1413
+ );
1414
+ if (existingAnswerIndex !== -1) {
1415
+ const updatedUserAnswers = [...userAnswers];
1416
+ updatedUserAnswers[existingAnswerIndex] = {
1417
+ ...updatedUserAnswers[existingAnswerIndex],
1418
+ answerStatus: status
1419
+ };
1420
+ set({ userAnswers: updatedUserAnswers });
1421
+ }
1422
+ },
1423
+ getAnswerStatus: (questionId) => {
1424
+ const { userAnswers } = get();
1425
+ const userAnswer = userAnswers.find(
1426
+ (answer) => answer.questionId === questionId
1427
+ );
1428
+ return userAnswer ? userAnswer.answerStatus : null;
1337
1429
  }
1338
1430
  };
1339
1431
  },
@@ -1569,9 +1661,9 @@ var import_react6 = require("react");
1569
1661
  var import_phosphor_react4 = require("phosphor-react");
1570
1662
  var import_jsx_runtime9 = require("react/jsx-runtime");
1571
1663
  var VARIANT_CLASSES = {
1572
- outlined: "border rounded-lg focus:border-primary-950",
1573
- underlined: "border-b focus:border-primary-950",
1574
- rounded: "border rounded-full focus:border-primary-950"
1664
+ outlined: "border-2 rounded-lg focus:border-primary-950",
1665
+ underlined: "border-b-2 focus:border-primary-950",
1666
+ rounded: "border-2 rounded-full focus:border-primary-950"
1575
1667
  };
1576
1668
  var SIZE_CLASSES6 = {
1577
1669
  small: "text-sm",
@@ -1656,6 +1748,7 @@ var injectStore2 = (children, store, size, selectId) => {
1656
1748
  var Select = ({
1657
1749
  children,
1658
1750
  defaultValue = "",
1751
+ className,
1659
1752
  value: propValue,
1660
1753
  onValueChange,
1661
1754
  size = "small",
@@ -1737,7 +1830,7 @@ var Select = ({
1737
1830
  }
1738
1831
  }, [propValue]);
1739
1832
  const sizeClasses = SIZE_CLASSES6[size];
1740
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "w-full", children: [
1833
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: cn("w-auto", className), children: [
1741
1834
  label && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1742
1835
  "label",
1743
1836
  {
@@ -1746,8 +1839,8 @@ var Select = ({
1746
1839
  children: label
1747
1840
  }
1748
1841
  ),
1749
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: cn("relative", sizeClasses), ref: selectRef, children: injectStore2(children, store, size, selectId) }),
1750
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "mt-1.5 gap-1.5", children: [
1842
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: cn("relative"), ref: selectRef, children: injectStore2(children, store, size, selectId) }),
1843
+ (helperText || errorMessage) && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "mt-1.5 gap-1.5", children: [
1751
1844
  helperText && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-sm text-text-500", children: helperText }),
1752
1845
  errorMessage && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("p", { className: "flex gap-1 items-center text-sm text-indicator-error", children: [
1753
1846
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_phosphor_react4.WarningCircle, { size: 16 }),
@@ -1788,15 +1881,16 @@ var SelectTrigger = (0, import_react6.forwardRef)(
1788
1881
  {
1789
1882
  ref,
1790
1883
  id: selectId,
1791
- className: `
1792
- flex min-w-[220px] w-full items-center justify-between border-border-300
1793
- ${heightClasses} ${paddingClasses}
1794
- ${invalid && `${variant == "underlined" ? "border-b-2" : "border-2"} border-indicator-error text-text-600`}
1795
- ${disabled ? "cursor-not-allowed text-text-400 pointer-events-none opacity-50" : "cursor-pointer hover:bg-background-50 focus:bg-accent focus:text-accent-foreground hover:bg-accent hover:text-accent-foreground"}
1796
- ${!invalid && !disabled ? "text-text-700" : ""}
1797
- ${variantClasses}
1798
- ${className}
1799
- `,
1884
+ className: cn(
1885
+ "flex w-full items-center justify-between border-border-300",
1886
+ heightClasses,
1887
+ paddingClasses,
1888
+ invalid && `${variant == "underlined" ? "border-b-2" : "border-2"} border-indicator-error text-text-600`,
1889
+ disabled ? "cursor-not-allowed text-text-400 pointer-events-none opacity-50" : "cursor-pointer hover:bg-background-50 focus:bg-accent focus:text-accent-foreground hover:bg-accent hover:text-accent-foreground",
1890
+ !invalid && !disabled ? "text-text-700" : "",
1891
+ variantClasses,
1892
+ className
1893
+ ),
1800
1894
  onClick: toggleOpen,
1801
1895
  "aria-expanded": open,
1802
1896
  "aria-haspopup": "listbox",
@@ -1869,10 +1963,12 @@ var SelectItem = (0, import_react6.forwardRef)(
1869
1963
  const handleClick = (e) => {
1870
1964
  const labelNode = getLabelAsNode(children);
1871
1965
  if (!disabled) {
1872
- setValue(value);
1873
- setSelectedLabel(labelNode);
1966
+ const newValue = selectedValue === value ? "" : value;
1967
+ const newLabel = selectedValue === value ? "" : labelNode;
1968
+ setValue(newValue);
1969
+ setSelectedLabel(newLabel);
1874
1970
  setOpen(false);
1875
- onValueChange?.(value);
1971
+ onValueChange?.(newValue);
1876
1972
  }
1877
1973
  props.onClick?.(e);
1878
1974
  };
@@ -4231,10 +4327,146 @@ var MultipleChoiceList = ({
4231
4327
  );
4232
4328
  };
4233
4329
 
4234
- // src/components/Quiz/Quiz.tsx
4330
+ // src/components/TextArea/TextArea.tsx
4331
+ var import_react11 = require("react");
4332
+ var import_phosphor_react8 = require("phosphor-react");
4235
4333
  var import_jsx_runtime16 = require("react/jsx-runtime");
4236
- var Quiz = (0, import_react11.forwardRef)(({ children, className, ...props }, ref) => {
4237
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4334
+ var SIZE_CLASSES10 = {
4335
+ small: {
4336
+ textarea: "h-24 text-sm",
4337
+ // 96px height, 14px font
4338
+ textSize: "sm"
4339
+ },
4340
+ medium: {
4341
+ textarea: "h-24 text-base",
4342
+ // 96px height, 16px font
4343
+ textSize: "md"
4344
+ },
4345
+ large: {
4346
+ textarea: "h-24 text-lg",
4347
+ // 96px height, 18px font
4348
+ textSize: "lg"
4349
+ },
4350
+ extraLarge: {
4351
+ textarea: "h-24 text-xl",
4352
+ // 96px height, 20px font
4353
+ textSize: "xl"
4354
+ }
4355
+ };
4356
+ var BASE_TEXTAREA_CLASSES = "w-full box-border p-3 bg-background border border-solid rounded-[4px] resize-none focus:outline-none font-roboto font-normal leading-[150%] placeholder:text-text-600 transition-all duration-200";
4357
+ var STATE_CLASSES3 = {
4358
+ default: {
4359
+ base: "border-border-300 bg-background text-text-600",
4360
+ hover: "hover:border-border-400",
4361
+ focus: "focus:border-border-500"
4362
+ },
4363
+ hovered: {
4364
+ base: "border-border-400 bg-background text-text-600",
4365
+ hover: "",
4366
+ focus: "focus:border-border-500"
4367
+ },
4368
+ focused: {
4369
+ base: "border-2 border-primary-950 bg-background text-text-900",
4370
+ hover: "",
4371
+ focus: ""
4372
+ },
4373
+ invalid: {
4374
+ base: "border-2 border-red-700 bg-white text-gray-800",
4375
+ hover: "hover:border-red-700",
4376
+ focus: "focus:border-red-700"
4377
+ },
4378
+ disabled: {
4379
+ base: "border-border-300 bg-background text-text-600 cursor-not-allowed opacity-40",
4380
+ hover: "",
4381
+ focus: ""
4382
+ }
4383
+ };
4384
+ var TextArea = (0, import_react11.forwardRef)(
4385
+ ({
4386
+ label,
4387
+ size = "medium",
4388
+ state = "default",
4389
+ errorMessage,
4390
+ helperMessage,
4391
+ className = "",
4392
+ labelClassName = "",
4393
+ disabled,
4394
+ id,
4395
+ onChange,
4396
+ placeholder,
4397
+ ...props
4398
+ }, ref) => {
4399
+ const generatedId = (0, import_react11.useId)();
4400
+ const inputId = id ?? `textarea-${generatedId}`;
4401
+ const [isFocused, setIsFocused] = (0, import_react11.useState)(false);
4402
+ const handleChange = (event) => {
4403
+ onChange?.(event);
4404
+ };
4405
+ const handleFocus = (event) => {
4406
+ setIsFocused(true);
4407
+ props.onFocus?.(event);
4408
+ };
4409
+ const handleBlur = (event) => {
4410
+ setIsFocused(false);
4411
+ props.onBlur?.(event);
4412
+ };
4413
+ let currentState = disabled ? "disabled" : state;
4414
+ if (isFocused && currentState !== "invalid" && currentState !== "disabled") {
4415
+ currentState = "focused";
4416
+ }
4417
+ const sizeClasses = SIZE_CLASSES10[size];
4418
+ const stateClasses = STATE_CLASSES3[currentState];
4419
+ const textareaClasses = cn(
4420
+ BASE_TEXTAREA_CLASSES,
4421
+ sizeClasses.textarea,
4422
+ stateClasses.base,
4423
+ stateClasses.hover,
4424
+ stateClasses.focus,
4425
+ className
4426
+ );
4427
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: `flex flex-col`, children: [
4428
+ label && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4429
+ Text_default,
4430
+ {
4431
+ as: "label",
4432
+ htmlFor: inputId,
4433
+ size: sizeClasses.textSize,
4434
+ weight: "medium",
4435
+ color: "text-text-950",
4436
+ className: cn("mb-1.5", labelClassName),
4437
+ children: label
4438
+ }
4439
+ ),
4440
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4441
+ "textarea",
4442
+ {
4443
+ ref,
4444
+ id: inputId,
4445
+ disabled,
4446
+ onChange: handleChange,
4447
+ onFocus: handleFocus,
4448
+ onBlur: handleBlur,
4449
+ className: textareaClasses,
4450
+ placeholder,
4451
+ ...props
4452
+ }
4453
+ ),
4454
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("p", { className: "flex gap-1 items-center text-sm text-indicator-error mt-1.5", children: [
4455
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_phosphor_react8.WarningCircle, { size: 16 }),
4456
+ " ",
4457
+ errorMessage
4458
+ ] }),
4459
+ helperMessage && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text_default, { size: "sm", weight: "normal", className: "mt-1.5 text-text-500", children: helperMessage })
4460
+ ] });
4461
+ }
4462
+ );
4463
+ TextArea.displayName = "TextArea";
4464
+ var TextArea_default = TextArea;
4465
+
4466
+ // src/components/Quiz/Quiz.tsx
4467
+ var import_jsx_runtime17 = require("react/jsx-runtime");
4468
+ var Quiz = (0, import_react12.forwardRef)(({ children, className, ...props }, ref) => {
4469
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4238
4470
  "div",
4239
4471
  {
4240
4472
  ref,
@@ -4247,38 +4479,21 @@ var Quiz = (0, import_react11.forwardRef)(({ children, className, ...props }, re
4247
4479
  }
4248
4480
  );
4249
4481
  });
4250
- var QuizHeaderResult = (0, import_react11.forwardRef)(
4482
+ var QuizHeaderResult = (0, import_react12.forwardRef)(
4251
4483
  ({ className, ...props }, ref) => {
4252
- const { getCurrentQuestion, getCurrentAnswer, getAllCurrentAnswer } = useQuizStore();
4253
- const currentQuestion = getCurrentQuestion();
4254
- const userAnswer = getCurrentAnswer();
4255
- const [isCorrect, setIsCorrect] = (0, import_react11.useState)(false);
4256
- (0, import_react11.useEffect)(() => {
4257
- if (currentQuestion?.type === "MULTIPLA_CHOICE" /* MULTIPLA_CHOICE */) {
4258
- const allCurrentAnswers = getAllCurrentAnswer();
4259
- const isCorrectOption = currentQuestion.options.filter(
4260
- (op) => op.isCorrect
4261
- );
4262
- if (allCurrentAnswers?.length !== isCorrectOption.length) {
4263
- setIsCorrect(false);
4264
- return;
4265
- }
4266
- setIsCorrect(true);
4267
- allCurrentAnswers.forEach((answer) => {
4268
- const findInCorrectOptions = isCorrectOption.find(
4269
- (op) => op.id === answer.optionId
4270
- );
4271
- if (!findInCorrectOptions) {
4272
- setIsCorrect(false);
4273
- }
4274
- });
4275
- } else {
4484
+ const { getAllCurrentAnswer } = useQuizStore();
4485
+ const usersAnswer = getAllCurrentAnswer();
4486
+ const [isCorrect, setIsCorrect] = (0, import_react12.useState)(false);
4487
+ (0, import_react12.useEffect)(() => {
4488
+ if (usersAnswer) {
4276
4489
  setIsCorrect(
4277
- currentQuestion?.options.find((op) => op.id === userAnswer)?.isCorrect || false
4490
+ usersAnswer.length > 0 ? usersAnswer.map(
4491
+ (answer) => answer.answerStatus === "RESPOSTA_CORRETA" /* RESPOSTA_CORRETA */
4492
+ ).every(Boolean) : false
4278
4493
  );
4279
4494
  }
4280
- }, [currentQuestion, getAllCurrentAnswer]);
4281
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
4495
+ }, [usersAnswer]);
4496
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
4282
4497
  "div",
4283
4498
  {
4284
4499
  ref,
@@ -4289,14 +4504,14 @@ var QuizHeaderResult = (0, import_react11.forwardRef)(
4289
4504
  ),
4290
4505
  ...props,
4291
4506
  children: [
4292
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-text-950 font-bold text-lg", children: "Resultado" }),
4293
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-text-700 text-md", children: isCorrect ? "\u{1F389} Parab\xE9ns!!" : "N\xE3o foi dessa vez..." })
4507
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-text-950 font-bold text-lg", children: "Resultado" }),
4508
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-text-700 text-md", children: isCorrect ? "\u{1F389} Parab\xE9ns!!" : "N\xE3o foi dessa vez..." })
4294
4509
  ]
4295
4510
  }
4296
4511
  );
4297
4512
  }
4298
4513
  );
4299
- var QuizTitle = (0, import_react11.forwardRef)(
4514
+ var QuizTitle = (0, import_react12.forwardRef)(
4300
4515
  ({ className, ...props }, ref) => {
4301
4516
  const {
4302
4517
  currentQuestionIndex,
@@ -4308,7 +4523,7 @@ var QuizTitle = (0, import_react11.forwardRef)(
4308
4523
  } = useQuizStore();
4309
4524
  const totalQuestions = getTotalQuestions();
4310
4525
  const quizTitle = getQuizTitle();
4311
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
4526
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
4312
4527
  "div",
4313
4528
  {
4314
4529
  ref,
@@ -4318,11 +4533,11 @@ var QuizTitle = (0, import_react11.forwardRef)(
4318
4533
  ),
4319
4534
  ...props,
4320
4535
  children: [
4321
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "flex flex-col gap-2 text-center", children: [
4322
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
4323
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
4536
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "flex flex-col gap-2 text-center", children: [
4537
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
4538
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
4324
4539
  ] }),
4325
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "absolute right-2", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_phosphor_react8.Clock, {}), children: isStarted ? formatTime(timeElapsed) : "00:00" }) })
4540
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "absolute right-2", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_phosphor_react9.Clock, {}), children: isStarted ? formatTime(timeElapsed) : "00:00" }) })
4326
4541
  ]
4327
4542
  }
4328
4543
  );
@@ -4331,7 +4546,7 @@ var QuizTitle = (0, import_react11.forwardRef)(
4331
4546
  var QuizHeader = () => {
4332
4547
  const { getCurrentQuestion } = useQuizStore();
4333
4548
  const currentQuestion = getCurrentQuestion();
4334
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4549
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4335
4550
  HeaderAlternative,
4336
4551
  {
4337
4552
  title: currentQuestion ? `Quest\xE3o ${currentQuestion.id}` : "Quest\xE3o",
@@ -4340,27 +4555,43 @@ var QuizHeader = () => {
4340
4555
  }
4341
4556
  );
4342
4557
  };
4343
- var QuizContent = (0, import_react11.forwardRef)(({ type = "Alternativas", className, variant, ...props }, ref) => {
4344
- const { getCurrentQuestion } = useQuizStore();
4558
+ var QuizContent = (0, import_react12.forwardRef)(({ type = "Alternativas", className, variant, ...props }, ref) => {
4559
+ const { getCurrentQuestion, getCurrentAnswer } = useQuizStore();
4345
4560
  const currentQuestion = getCurrentQuestion();
4346
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
4347
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "px-4 pb-2 pt-6", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "font-bold text-lg text-text-950", children: type }) }),
4348
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4561
+ const currentAnswer = getCurrentAnswer();
4562
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
4563
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "px-4 pb-2 pt-6", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "font-bold text-lg text-text-950", children: type }) }),
4564
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4349
4565
  "div",
4350
4566
  {
4351
4567
  ref,
4352
4568
  className: cn(
4353
- "rounded-t-xl px-4 pt-4 pb-[80px] h-full flex flex-col gap-4 mb-auto",
4569
+ "bg-background rounded-t-xl px-4 pt-4 pb-[80px] h-full flex flex-col gap-4 mb-auto",
4354
4570
  className
4355
4571
  ),
4356
4572
  ...props,
4357
- children: currentQuestion && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
4358
- currentQuestion.type === "ALTERNATIVA" /* ALTERNATIVA */ && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(QuizAlternative, { variant }),
4359
- currentQuestion.type === "MULTIPLA_CHOICE" /* MULTIPLA_CHOICE */ && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(QuizMultipleChoice, { variant }),
4360
- currentQuestion.type === "DISSERTATIVA" /* DISSERTATIVA */ && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { children: "Componente de dissertativa" })
4573
+ children: currentQuestion && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
4574
+ currentQuestion.type === "ALTERNATIVA" /* ALTERNATIVA */ && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(QuizAlternative, { variant }),
4575
+ currentQuestion.type === "MULTIPLA_CHOICE" /* MULTIPLA_CHOICE */ && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(QuizMultipleChoice, { variant }),
4576
+ currentQuestion.type === "DISSERTATIVA" /* DISSERTATIVA */ && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(QuizDissertative, { variant })
4361
4577
  ] })
4362
4578
  }
4363
- )
4579
+ ),
4580
+ currentQuestion?.type === "DISSERTATIVA" /* DISSERTATIVA */ && variant === "result" && currentAnswer?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
4581
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "px-4 pb-2 pt-6", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "font-bold text-lg text-text-950", children: "Observa\xE7\xE3o do professor" }) }),
4582
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4583
+ "div",
4584
+ {
4585
+ ref,
4586
+ className: cn(
4587
+ "bg-background rounded-t-xl px-4 pt-4 pb-[80px] h-full flex flex-col gap-4 mb-auto",
4588
+ className
4589
+ ),
4590
+ ...props,
4591
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim. Mauris euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim." })
4592
+ }
4593
+ )
4594
+ ] })
4364
4595
  ] });
4365
4596
  });
4366
4597
  var QuizAlternative = ({ variant = "default" }) => {
@@ -4375,7 +4606,7 @@ var QuizAlternative = ({ variant = "default" }) => {
4375
4606
  );
4376
4607
  if (isCorrectOption?.id === option.id) {
4377
4608
  status = "correct" /* CORRECT */;
4378
- } else if (currentAnswer === option.id && option.id !== isCorrectOption?.id) {
4609
+ } else if (currentAnswer?.optionId === option.id && option.id !== isCorrectOption?.id) {
4379
4610
  status = "incorrect" /* INCORRECT */;
4380
4611
  }
4381
4612
  }
@@ -4386,16 +4617,16 @@ var QuizAlternative = ({ variant = "default" }) => {
4386
4617
  };
4387
4618
  });
4388
4619
  if (!alternatives)
4389
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { children: "N\xE3o h\xE1 Alternativas" }) });
4390
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4620
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: "N\xE3o h\xE1 Alternativas" }) });
4621
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4391
4622
  AlternativesList,
4392
4623
  {
4393
4624
  mode: variant === "default" ? "interactive" : "readonly",
4394
4625
  name: `question-${currentQuestion?.id || "1"}`,
4395
4626
  layout: "compact",
4396
4627
  alternatives,
4397
- value: currentAnswer,
4398
- selectedValue: currentAnswer,
4628
+ value: currentAnswer?.optionId || "",
4629
+ selectedValue: currentAnswer?.optionId || "",
4399
4630
  onValueChange: (value) => {
4400
4631
  if (currentQuestion) {
4401
4632
  selectAnswer(currentQuestion.id, value);
@@ -4411,15 +4642,15 @@ var QuizMultipleChoice = ({
4411
4642
  const { getCurrentQuestion, selectMultipleAnswer, getAllCurrentAnswer } = useQuizStore();
4412
4643
  const currentQuestion = getCurrentQuestion();
4413
4644
  const allCurrentAnswers = getAllCurrentAnswer();
4414
- const prevSelectedValuesRef = (0, import_react11.useRef)([]);
4415
- const prevQuestionIdRef = (0, import_react11.useRef)("");
4416
- const allCurrentAnswerIds = (0, import_react11.useMemo)(() => {
4645
+ const prevSelectedValuesRef = (0, import_react12.useRef)([]);
4646
+ const prevQuestionIdRef = (0, import_react12.useRef)("");
4647
+ const allCurrentAnswerIds = (0, import_react12.useMemo)(() => {
4417
4648
  return allCurrentAnswers?.map((answer) => answer.optionId) || [];
4418
4649
  }, [allCurrentAnswers]);
4419
- const selectedValues = (0, import_react11.useMemo)(() => {
4650
+ const selectedValues = (0, import_react12.useMemo)(() => {
4420
4651
  return allCurrentAnswerIds?.filter((id) => id !== null) || [];
4421
4652
  }, [allCurrentAnswerIds]);
4422
- const stableSelectedValues = (0, import_react11.useMemo)(() => {
4653
+ const stableSelectedValues = (0, import_react12.useMemo)(() => {
4423
4654
  const currentQuestionId = currentQuestion?.id || "";
4424
4655
  const hasQuestionChanged = prevQuestionIdRef.current !== currentQuestionId;
4425
4656
  if (hasQuestionChanged) {
@@ -4434,7 +4665,7 @@ var QuizMultipleChoice = ({
4434
4665
  }
4435
4666
  return prevSelectedValuesRef.current;
4436
4667
  }, [selectedValues, currentQuestion?.id]);
4437
- const handleSelectedValues = (0, import_react11.useCallback)(
4668
+ const handleSelectedValues = (0, import_react12.useCallback)(
4438
4669
  (values) => {
4439
4670
  if (currentQuestion) {
4440
4671
  selectMultipleAnswer(currentQuestion.id, values);
@@ -4442,7 +4673,7 @@ var QuizMultipleChoice = ({
4442
4673
  },
4443
4674
  [currentQuestion, selectMultipleAnswer]
4444
4675
  );
4445
- const questionKey = (0, import_react11.useMemo)(
4676
+ const questionKey = (0, import_react12.useMemo)(
4446
4677
  () => `question-${currentQuestion?.id || "1"}`,
4447
4678
  [currentQuestion?.id]
4448
4679
  );
@@ -4463,8 +4694,8 @@ var QuizMultipleChoice = ({
4463
4694
  };
4464
4695
  });
4465
4696
  if (!choices)
4466
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { children: "N\xE3o h\xE1 Escolhas Multiplas" }) });
4467
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4697
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: "N\xE3o h\xE1 Escolhas Multiplas" }) });
4698
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4468
4699
  MultipleChoiceList,
4469
4700
  {
4470
4701
  choices,
@@ -4476,6 +4707,46 @@ var QuizMultipleChoice = ({
4476
4707
  questionKey
4477
4708
  ) });
4478
4709
  };
4710
+ var QuizDissertative = ({
4711
+ variant = "default"
4712
+ }) => {
4713
+ const { getCurrentQuestion, getCurrentAnswer, selectDissertativeAnswer } = useQuizStore();
4714
+ const currentQuestion = getCurrentQuestion();
4715
+ const currentAnswer = getCurrentAnswer();
4716
+ const textareaRef = (0, import_react12.useRef)(null);
4717
+ const handleAnswerChange = (value) => {
4718
+ if (currentQuestion) {
4719
+ selectDissertativeAnswer(currentQuestion.id, value);
4720
+ }
4721
+ };
4722
+ const adjustTextareaHeight = (0, import_react12.useCallback)(() => {
4723
+ if (textareaRef.current) {
4724
+ textareaRef.current.style.height = "auto";
4725
+ const scrollHeight = textareaRef.current.scrollHeight;
4726
+ const minHeight = 120;
4727
+ const maxHeight = 400;
4728
+ const newHeight = Math.min(Math.max(scrollHeight, minHeight), maxHeight);
4729
+ textareaRef.current.style.height = `${newHeight}px`;
4730
+ }
4731
+ }, []);
4732
+ (0, import_react12.useEffect)(() => {
4733
+ adjustTextareaHeight();
4734
+ }, [currentAnswer, adjustTextareaHeight]);
4735
+ if (!currentQuestion) {
4736
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-text-600 text-md", children: "Nenhuma quest\xE3o dispon\xEDvel" }) });
4737
+ }
4738
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "space-y-4 max-h-[600px] overflow-y-auto", children: variant === "default" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4739
+ TextArea_default,
4740
+ {
4741
+ ref: textareaRef,
4742
+ placeholder: "Escreva sua resposta",
4743
+ value: currentAnswer?.answer || "",
4744
+ onChange: (e) => handleAnswerChange(e.target.value),
4745
+ rows: 4,
4746
+ className: "min-h-[120px] max-h-[400px] resize-none overflow-y-auto"
4747
+ }
4748
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: currentAnswer?.answer || "Nenhuma resposta fornecida" }) }) });
4749
+ };
4479
4750
  var QuizQuestionList = ({
4480
4751
  filterType = "all",
4481
4752
  onQuestionClick
@@ -4527,16 +4798,16 @@ var QuizQuestionList = ({
4527
4798
  return "Em branco";
4528
4799
  }
4529
4800
  };
4530
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "space-y-6 px-4", children: Object.entries(filteredGroupedQuestions).map(
4531
- ([subjectId, questions]) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("section", { className: "flex flex-col gap-2", children: [
4532
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "pt-6 pb-4 flex flex-row gap-2", children: [
4533
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "bg-primary-500 p-1 rounded-sm flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_phosphor_react8.BookOpen, { size: 17, className: "text-white" }) }),
4534
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-text-800 font-bold text-lg", children: subjectId })
4801
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "space-y-6 px-4", children: Object.entries(filteredGroupedQuestions).map(
4802
+ ([subjectId, questions]) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("section", { className: "flex flex-col gap-2", children: [
4803
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "pt-6 pb-4 flex flex-row gap-2", children: [
4804
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "bg-primary-500 p-1 rounded-sm flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_phosphor_react9.BookOpen, { size: 17, className: "text-white" }) }),
4805
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-text-800 font-bold text-lg", children: subjectId })
4535
4806
  ] }),
4536
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { className: "flex flex-col gap-2", children: questions.map((question) => {
4807
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ul", { className: "flex flex-col gap-2", children: questions.map((question) => {
4537
4808
  const status = getQuestionStatus(question.id);
4538
4809
  const questionNumber = getQuestionIndex(question.id);
4539
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4810
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4540
4811
  CardStatus,
4541
4812
  {
4542
4813
  header: `Quest\xE3o ${questionNumber.toString().padStart(2, "0")}`,
@@ -4552,7 +4823,7 @@ var QuizQuestionList = ({
4552
4823
  ] }, subjectId)
4553
4824
  ) });
4554
4825
  };
4555
- var QuizFooter = (0, import_react11.forwardRef)(
4826
+ var QuizFooter = (0, import_react12.forwardRef)(
4556
4827
  ({
4557
4828
  className,
4558
4829
  onGoToSimulated,
@@ -4579,15 +4850,15 @@ var QuizFooter = (0, import_react11.forwardRef)(
4579
4850
  const currentAnswer = getCurrentAnswer();
4580
4851
  const currentQuestion = getCurrentQuestion();
4581
4852
  const isCurrentQuestionSkipped = currentQuestion ? getQuestionStatusFromUserAnswers(currentQuestion.id) === "skipped" : false;
4582
- const [alertDialogOpen, setAlertDialogOpen] = (0, import_react11.useState)(false);
4583
- const [modalResultOpen, setModalResultOpen] = (0, import_react11.useState)(false);
4584
- const [modalNavigateOpen, setModalNavigateOpen] = (0, import_react11.useState)(false);
4585
- const [filterType, setFilterType] = (0, import_react11.useState)("all");
4853
+ const [alertDialogOpen, setAlertDialogOpen] = (0, import_react12.useState)(false);
4854
+ const [modalResultOpen, setModalResultOpen] = (0, import_react12.useState)(false);
4855
+ const [modalNavigateOpen, setModalNavigateOpen] = (0, import_react12.useState)(false);
4856
+ const [filterType, setFilterType] = (0, import_react12.useState)("all");
4586
4857
  const unansweredQuestions = getUnansweredQuestionsFromUserAnswers();
4587
4858
  const userAnswers = getUserAnswers();
4588
4859
  const allQuestions = getTotalQuestions();
4589
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
4590
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4860
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
4861
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4591
4862
  "footer",
4592
4863
  {
4593
4864
  ref,
@@ -4596,17 +4867,17 @@ var QuizFooter = (0, import_react11.forwardRef)(
4596
4867
  className
4597
4868
  ),
4598
4869
  ...props,
4599
- children: variant === "default" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
4600
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-row items-center gap-1", children: [
4601
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4870
+ children: variant === "default" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
4871
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-row items-center gap-1", children: [
4872
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4602
4873
  IconButton_default,
4603
4874
  {
4604
- icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_phosphor_react8.SquaresFour, { size: 24, className: "text-text-950" }),
4875
+ icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_phosphor_react9.SquaresFour, { size: 24, className: "text-text-950" }),
4605
4876
  size: "md",
4606
4877
  onClick: () => setModalNavigateOpen(true)
4607
4878
  }
4608
4879
  ),
4609
- isFirstQuestion ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4880
+ isFirstQuestion ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4610
4881
  Button_default,
4611
4882
  {
4612
4883
  variant: "outline",
@@ -4617,13 +4888,13 @@ var QuizFooter = (0, import_react11.forwardRef)(
4617
4888
  },
4618
4889
  children: "Pular"
4619
4890
  }
4620
- ) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4891
+ ) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4621
4892
  Button_default,
4622
4893
  {
4623
4894
  size: "medium",
4624
4895
  variant: "link",
4625
4896
  action: "primary",
4626
- iconLeft: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_phosphor_react8.CaretLeft, { size: 18 }),
4897
+ iconLeft: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_phosphor_react9.CaretLeft, { size: 18 }),
4627
4898
  onClick: () => {
4628
4899
  goToPreviousQuestion();
4629
4900
  },
@@ -4631,7 +4902,7 @@ var QuizFooter = (0, import_react11.forwardRef)(
4631
4902
  }
4632
4903
  )
4633
4904
  ] }),
4634
- !isFirstQuestion && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4905
+ !isFirstQuestion && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4635
4906
  Button_default,
4636
4907
  {
4637
4908
  size: "small",
@@ -4644,7 +4915,7 @@ var QuizFooter = (0, import_react11.forwardRef)(
4644
4915
  children: "Pular"
4645
4916
  }
4646
4917
  ),
4647
- isLastQuestion ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4918
+ isLastQuestion ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4648
4919
  Button_default,
4649
4920
  {
4650
4921
  size: "medium",
@@ -4660,13 +4931,13 @@ var QuizFooter = (0, import_react11.forwardRef)(
4660
4931
  },
4661
4932
  children: "Finalizar"
4662
4933
  }
4663
- ) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4934
+ ) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4664
4935
  Button_default,
4665
4936
  {
4666
4937
  size: "medium",
4667
4938
  variant: "link",
4668
4939
  action: "primary",
4669
- iconRight: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_phosphor_react8.CaretRight, { size: 18 }),
4940
+ iconRight: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_phosphor_react9.CaretRight, { size: 18 }),
4670
4941
  disabled: !currentAnswer && !isCurrentQuestionSkipped,
4671
4942
  onClick: () => {
4672
4943
  goToNextQuestion();
@@ -4674,10 +4945,10 @@ var QuizFooter = (0, import_react11.forwardRef)(
4674
4945
  children: "Avan\xE7ar"
4675
4946
  }
4676
4947
  )
4677
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex flex-row items-center justify-end w-full", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Button_default, { variant: "solid", action: "primary", size: "medium", children: "Ver Resolu\xE7\xE3o" }) })
4948
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex flex-row items-center justify-end w-full", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button_default, { variant: "solid", action: "primary", size: "medium", children: "Ver Resolu\xE7\xE3o" }) })
4678
4949
  }
4679
4950
  ),
4680
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4951
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4681
4952
  AlertDialog,
4682
4953
  {
4683
4954
  isOpen: alertDialogOpen,
@@ -4691,7 +4962,7 @@ var QuizFooter = (0, import_react11.forwardRef)(
4691
4962
  }
4692
4963
  }
4693
4964
  ),
4694
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4965
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4695
4966
  Modal_default,
4696
4967
  {
4697
4968
  isOpen: modalResultOpen,
@@ -4701,8 +4972,8 @@ var QuizFooter = (0, import_react11.forwardRef)(
4701
4972
  closeOnEscape: false,
4702
4973
  hideCloseButton: true,
4703
4974
  size: "md",
4704
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
4705
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4975
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
4976
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4706
4977
  "img",
4707
4978
  {
4708
4979
  src: simulated_result_default,
@@ -4710,9 +4981,9 @@ var QuizFooter = (0, import_react11.forwardRef)(
4710
4981
  className: "w-[282px] h-auto object-cover"
4711
4982
  }
4712
4983
  ),
4713
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-col gap-2 text-center", children: [
4714
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h2", { className: "text-text-950 font-bold text-lg", children: "Voc\xEA concluiu o simulado!" }),
4715
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("p", { className: "text-text-500 font-sm", children: [
4984
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col gap-2 text-center", children: [
4985
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h2", { className: "text-text-950 font-bold text-lg", children: "Voc\xEA concluiu o simulado!" }),
4986
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { className: "text-text-500 font-sm", children: [
4716
4987
  "Voc\xEA acertou",
4717
4988
  " ",
4718
4989
  (() => {
@@ -4734,8 +5005,8 @@ var QuizFooter = (0, import_react11.forwardRef)(
4734
5005
  " quest\xF5es."
4735
5006
  ] })
4736
5007
  ] }),
4737
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: [
4738
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5008
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: [
5009
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4739
5010
  Button_default,
4740
5011
  {
4741
5012
  variant: "outline",
@@ -4745,31 +5016,31 @@ var QuizFooter = (0, import_react11.forwardRef)(
4745
5016
  children: "Ir para simulados"
4746
5017
  }
4747
5018
  ),
4748
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Button_default, { className: "w-full", onClick: onDetailResult, children: "Detalhar resultado" })
5019
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button_default, { className: "w-full", onClick: onDetailResult, children: "Detalhar resultado" })
4749
5020
  ] })
4750
5021
  ] })
4751
5022
  }
4752
5023
  ),
4753
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5024
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4754
5025
  Modal_default,
4755
5026
  {
4756
5027
  isOpen: modalNavigateOpen,
4757
5028
  onClose: () => setModalNavigateOpen(false),
4758
5029
  title: "Quest\xF5es",
4759
5030
  size: "lg",
4760
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-col w-full h-full", children: [
4761
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-row justify-between items-center py-6 pt-6 pb-4 border-b border-border-200", children: [
4762
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-text-950 font-bold text-lg", children: "Filtrar por" }),
4763
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "max-w-[266px]", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Select_default, { value: filterType, onValueChange: setFilterType, children: [
4764
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectTrigger, { variant: "rounded", className: "max-w-[266px]", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectValue, { placeholder: "Selecione uma op\xE7\xE3o" }) }),
4765
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(SelectContent, { children: [
4766
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectItem, { value: "all", children: "Todas" }),
4767
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectItem, { value: "unanswered", children: "Em branco" }),
4768
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectItem, { value: "answered", children: "Respondidas" })
5031
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col w-full h-full", children: [
5032
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-row justify-between items-center py-6 pt-6 pb-4 border-b border-border-200", children: [
5033
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-text-950 font-bold text-lg", children: "Filtrar por" }),
5034
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "max-w-[266px]", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Select_default, { value: filterType, onValueChange: setFilterType, children: [
5035
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectTrigger, { variant: "rounded", className: "max-w-[266px]", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectValue, { placeholder: "Selecione uma op\xE7\xE3o" }) }),
5036
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(SelectContent, { children: [
5037
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectItem, { value: "all", children: "Todas" }),
5038
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectItem, { value: "unanswered", children: "Em branco" }),
5039
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectItem, { value: "answered", children: "Respondidas" })
4769
5040
  ] })
4770
5041
  ] }) })
4771
5042
  ] }),
4772
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex flex-col gap-2 not-lg:h-[calc(100vh-200px)] lg:max-h-[687px] overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5043
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex flex-col gap-2 not-lg:h-[calc(100vh-200px)] lg:max-h-[687px] overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4773
5044
  QuizQuestionList,
4774
5045
  {
4775
5046
  filterType,
@@ -4782,25 +5053,25 @@ var QuizFooter = (0, import_react11.forwardRef)(
4782
5053
  ] });
4783
5054
  }
4784
5055
  );
4785
- var QuizResultHeaderTitle = (0, import_react11.forwardRef)(({ className, ...props }, ref) => {
5056
+ var QuizResultHeaderTitle = (0, import_react12.forwardRef)(({ className, ...props }, ref) => {
4786
5057
  const { bySimulated } = useQuizStore();
4787
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
5058
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
4788
5059
  "div",
4789
5060
  {
4790
5061
  ref,
4791
5062
  className: cn("flex flex-row pt-4 justify-between", className),
4792
5063
  ...props,
4793
5064
  children: [
4794
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: "Resultado" }),
4795
- bySimulated && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Badge_default, { variant: "solid", action: "info", children: bySimulated.category })
5065
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: "Resultado" }),
5066
+ bySimulated && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Badge_default, { variant: "solid", action: "info", children: bySimulated.category })
4796
5067
  ]
4797
5068
  }
4798
5069
  );
4799
5070
  });
4800
- var QuizResultTitle = (0, import_react11.forwardRef)(({ className, ...props }, ref) => {
5071
+ var QuizResultTitle = (0, import_react12.forwardRef)(({ className, ...props }, ref) => {
4801
5072
  const { getQuizTitle } = useQuizStore();
4802
5073
  const quizTitle = getQuizTitle();
4803
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5074
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4804
5075
  "p",
4805
5076
  {
4806
5077
  className: cn("pt-6 pb-4 text-text-950 font-bold text-lg", className),
@@ -4810,7 +5081,7 @@ var QuizResultTitle = (0, import_react11.forwardRef)(({ className, ...props }, r
4810
5081
  }
4811
5082
  );
4812
5083
  });
4813
- var QuizResultPerformance = (0, import_react11.forwardRef)(
5084
+ var QuizResultPerformance = (0, import_react12.forwardRef)(
4814
5085
  ({ ...props }, ref) => {
4815
5086
  const {
4816
5087
  getTotalQuestions,
@@ -4858,15 +5129,15 @@ var QuizResultPerformance = (0, import_react11.forwardRef)(
4858
5129
  });
4859
5130
  }
4860
5131
  const percentage = totalQuestions > 0 ? Math.round(correctAnswers / totalQuestions * 100) : 0;
4861
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
5132
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
4862
5133
  "div",
4863
5134
  {
4864
5135
  className: "flex flex-row gap-6 p-6 rounded-xl bg-background justify-between",
4865
5136
  ref,
4866
5137
  ...props,
4867
5138
  children: [
4868
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "relative", children: [
4869
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5139
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "relative", children: [
5140
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4870
5141
  ProgressCircle_default,
4871
5142
  {
4872
5143
  size: "medium",
@@ -4876,21 +5147,21 @@ var QuizResultPerformance = (0, import_react11.forwardRef)(
4876
5147
  label: ""
4877
5148
  }
4878
5149
  ),
4879
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
4880
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center gap-1 mb-1", children: [
4881
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_phosphor_react8.Clock, { size: 12, weight: "regular", className: "text-text-800" }),
4882
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-2xs font-medium text-text-800", children: formatTime(timeElapsed) })
5150
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
5151
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center gap-1 mb-1", children: [
5152
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_phosphor_react9.Clock, { size: 12, weight: "regular", className: "text-text-800" }),
5153
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-2xs font-medium text-text-800", children: formatTime(timeElapsed) })
4883
5154
  ] }),
4884
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "text-2xl font-medium text-text-800 leading-7", children: [
5155
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "text-2xl font-medium text-text-800 leading-7", children: [
4885
5156
  correctAnswers,
4886
5157
  " de ",
4887
5158
  totalQuestions
4888
5159
  ] }),
4889
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "text-2xs font-medium text-text-600 mt-1", children: "Corretas" })
5160
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "text-2xs font-medium text-text-600 mt-1", children: "Corretas" })
4890
5161
  ] })
4891
5162
  ] }),
4892
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-col gap-4 w-full", children: [
4893
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5163
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col gap-4 w-full", children: [
5164
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4894
5165
  ProgressBar_default,
4895
5166
  {
4896
5167
  className: "w-full",
@@ -4904,7 +5175,7 @@ var QuizResultPerformance = (0, import_react11.forwardRef)(
4904
5175
  percentageClassName: "text-xs font-medium leading-[14px] text-right"
4905
5176
  }
4906
5177
  ),
4907
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5178
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4908
5179
  ProgressBar_default,
4909
5180
  {
4910
5181
  className: "w-full",
@@ -4918,7 +5189,7 @@ var QuizResultPerformance = (0, import_react11.forwardRef)(
4918
5189
  percentageClassName: "text-xs font-medium leading-[14px] text-right"
4919
5190
  }
4920
5191
  ),
4921
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5192
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4922
5193
  ProgressBar_default,
4923
5194
  {
4924
5195
  className: "w-full",
@@ -4938,7 +5209,7 @@ var QuizResultPerformance = (0, import_react11.forwardRef)(
4938
5209
  );
4939
5210
  }
4940
5211
  );
4941
- var QuizListResult = (0, import_react11.forwardRef)(({ className, onSubjectClick, ...props }, ref) => {
5212
+ var QuizListResult = (0, import_react12.forwardRef)(({ className, onSubjectClick, ...props }, ref) => {
4942
5213
  const {
4943
5214
  getQuestionsGroupedBySubject,
4944
5215
  isQuestionAnswered,
@@ -4969,9 +5240,9 @@ var QuizListResult = (0, import_react11.forwardRef)(({ className, onSubjectClick
4969
5240
  };
4970
5241
  }
4971
5242
  );
4972
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("section", { ref, className, ...props, children: [
4973
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Mat\xE9rias" }),
4974
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { className: "flex flex-col gap-2", children: subjectsStats.map((subject) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5243
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("section", { ref, className, ...props, children: [
5244
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Mat\xE9rias" }),
5245
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ul", { className: "flex flex-col gap-2", children: subjectsStats.map((subject) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4975
5246
  CardResults,
4976
5247
  {
4977
5248
  onClick: () => onSubjectClick?.(subject.subject),
@@ -4979,7 +5250,7 @@ var QuizListResult = (0, import_react11.forwardRef)(({ className, onSubjectClick
4979
5250
  header: subject.subject,
4980
5251
  correct_answers: subject.correct,
4981
5252
  incorrect_answers: subject.incorrect,
4982
- icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_phosphor_react8.Book, { size: 20 }),
5253
+ icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_phosphor_react9.Book, { size: 20 }),
4983
5254
  direction: "row"
4984
5255
  }
4985
5256
  ) }, subject.subject)) })
@@ -4992,11 +5263,11 @@ var QuizListResultByMateria = ({
4992
5263
  const { getQuestionsGroupedBySubject, getUserAnswerByQuestionId } = useQuizStore();
4993
5264
  const groupedQuestions = getQuestionsGroupedBySubject();
4994
5265
  const answeredQuestions = groupedQuestions[subject] || [];
4995
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "w-full max-w-[1000px] flex flex-col mx-auto h-full relative not-lg:px-6", children: [
4996
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex flex-row pt-4 justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: subject }) }),
4997
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("section", { className: "flex flex-col ", children: [
4998
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Resultado das quest\xF5es" }),
4999
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { className: "flex flex-col gap-2 pt-4", children: answeredQuestions.map((question) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5266
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "w-full max-w-[1000px] flex flex-col mx-auto h-full relative not-lg:px-6", children: [
5267
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex flex-row pt-4 justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: subject }) }),
5268
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("section", { className: "flex flex-col ", children: [
5269
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Resultado das quest\xF5es" }),
5270
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ul", { className: "flex flex-col gap-2 pt-4", children: answeredQuestions.map((question) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5000
5271
  CardStatus,
5001
5272
  {
5002
5273
  className: "max-w-full",
@@ -5019,6 +5290,7 @@ var QuizListResultByMateria = ({
5019
5290
  Quiz,
5020
5291
  QuizAlternative,
5021
5292
  QuizContent,
5293
+ QuizDissertative,
5022
5294
  QuizFooter,
5023
5295
  QuizHeader,
5024
5296
  QuizHeaderResult,