@cuemath/leap 3.2.17-j1 → 3.2.17-mb
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/illustrations/illustrations.js +0 -5
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/lottie/lottie.js +1 -11
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/auth/account-selector/account-selector.js +25 -26
- package/dist/features/auth/account-selector/account-selector.js.map +1 -1
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +14 -20
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
- package/dist/features/auth/comps/resend-otp/resend-otp.js +47 -54
- package/dist/features/auth/comps/resend-otp/resend-otp.js.map +1 -1
- package/dist/features/auth/comps/tabs/tab-tem/tab-item.js +17 -29
- package/dist/features/auth/comps/tabs/tab-tem/tab-item.js.map +1 -1
- package/dist/features/auth/comps/tabs/tabs-styled.js +10 -22
- package/dist/features/auth/comps/tabs/tabs-styled.js.map +1 -1
- package/dist/features/auth/comps/tabs/tabs.js +5 -5
- package/dist/features/auth/comps/tabs/tabs.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-item/user-item.js +31 -30
- package/dist/features/auth/comps/user-list/user-item/user-item.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-list.js +34 -35
- package/dist/features/auth/comps/user-list/user-list.js.map +1 -1
- package/dist/features/auth/forgot-password/forgot-password-styled.js +15 -14
- package/dist/features/auth/forgot-password/forgot-password-styled.js.map +1 -1
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js +7 -6
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js.map +1 -1
- package/dist/features/auth/login/login-styled.js +9 -8
- package/dist/features/auth/login/login-styled.js.map +1 -1
- package/dist/features/chapters-v2/utils/node-card-utils.js +7 -7
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js +4 -4
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js +85 -85
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +98 -121
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js +28 -29
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js +42 -43
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +1 -1
- package/dist/features/circle-games/games/tutorial/tutorial.js +35 -43
- package/dist/features/circle-games/games/tutorial/tutorial.js.map +1 -1
- package/dist/features/circle-games/sign-up/comp/grade-input/grade-input-styled.js +2 -2
- package/dist/features/circle-games/sign-up/comp/grade-input/grade-input-styled.js.map +1 -1
- package/dist/features/circle-games/sign-up/comp/grade-input/grade-input.js +1 -1
- package/dist/features/circle-games/sign-up/comp/grade-input/grade-input.js.map +1 -1
- package/dist/features/circle-games/sign-up/comp/username-input/username-input.js +24 -26
- package/dist/features/circle-games/sign-up/comp/username-input/username-input.js.map +1 -1
- package/dist/features/circle-games/sign-up/constants.js +1 -3
- package/dist/features/circle-games/sign-up/constants.js.map +1 -1
- package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js +42 -42
- package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js.map +1 -1
- package/dist/features/hooks/use-viewport/use-viewport.js +22 -0
- package/dist/features/hooks/use-viewport/use-viewport.js.map +1 -0
- package/dist/features/journey/comps/coachmark/coachmark.js +27 -29
- package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
- package/dist/features/journey/journey-id/journey-id-student.js +2 -2
- package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
- package/dist/features/journey/use-journey/journey-context-provider.js +72 -73
- package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
- package/dist/features/journey/use-journey/journey-styled.js +4 -6
- package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
- package/dist/features/stickers/sticker-data.js +234 -0
- package/dist/features/stickers/sticker-data.js.map +1 -0
- package/dist/features/{ui/sticker-grid/sticker-grid-styles.js → stickers/sticker-selector/sticker-selector-styles.js} +4 -3
- package/dist/features/stickers/sticker-selector/sticker-selector-styles.js.map +1 -0
- package/dist/features/stickers/sticker-selector/sticker-selector.js +25 -0
- package/dist/features/stickers/sticker-selector/sticker-selector.js.map +1 -0
- package/dist/features/stickers/sticker-selector/sticker.js +57 -0
- package/dist/features/stickers/sticker-selector/sticker.js.map +1 -0
- package/dist/features/{ui/stickers/stickers-effects.js → stickers/stickers-effects/effects.js} +6 -6
- package/dist/features/stickers/stickers-effects/effects.js.map +1 -0
- package/dist/features/{ui/stickers/stickers-styled.js → stickers/stickers-effects/stickers-effects-styled.js} +2 -2
- package/dist/features/stickers/stickers-effects/stickers-effects-styled.js.map +1 -0
- package/dist/features/{ui/stickers/stickers-utils.js → stickers/stickers-effects/stickers-effects-utils.js} +6 -6
- package/dist/features/stickers/stickers-effects/stickers-effects-utils.js.map +1 -0
- package/dist/features/stickers/stickers-effects/stickers-effects.js +39 -0
- package/dist/features/stickers/stickers-effects/stickers-effects.js.map +1 -0
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js +60 -12
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +77 -72
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
- package/dist/features/ui/error/error.js +27 -65
- package/dist/features/ui/error/error.js.map +1 -1
- package/dist/features/ui/image/image.js +1 -1
- package/dist/features/ui/image/image.js.map +1 -1
- package/dist/features/ui/lottie-animation/lottie-animation.js +29 -25
- package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
- package/dist/features/ui/modals/modal-styled.js +58 -34
- package/dist/features/ui/modals/modal-styled.js.map +1 -1
- package/dist/features/ui/modals/modal.js +14 -40
- package/dist/features/ui/modals/modal.js.map +1 -1
- package/dist/features/ui/nudge/nudge-styled.js +7 -14
- package/dist/features/ui/nudge/nudge-styled.js.map +1 -1
- package/dist/features/ui/nudge/nudge.js +12 -13
- package/dist/features/ui/nudge/nudge.js.map +1 -1
- package/dist/features/ui/streak-icon/streak-icon-styled.js +13 -13
- package/dist/features/ui/streak-icon/streak-icon-styled.js.map +1 -1
- package/dist/features/ui/streak-icon/streak-icon.js +15 -17
- package/dist/features/ui/streak-icon/streak-icon.js.map +1 -1
- package/dist/features/ui/text/text.js +36 -40
- package/dist/features/ui/text/text.js.map +1 -1
- package/dist/features/ui/theme/button.js +78 -78
- package/dist/features/ui/theme/button.js.map +1 -1
- package/dist/features/ui/theme/constants.js +2 -4
- package/dist/features/ui/theme/constants.js.map +1 -1
- package/dist/features/ui/theme/get-device.js +3 -3
- package/dist/features/ui/theme/get-device.js.map +1 -1
- package/dist/features/worksheet/worksheet/constants.js +13 -12
- package/dist/features/worksheet/worksheet/constants.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +24 -24
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +260 -246
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-styled.js +28 -37
- package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet.js +164 -166
- package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
- package/dist/index.d.ts +55 -184
- package/dist/index.js +541 -579
- package/dist/index.js.map +1 -1
- package/dist/node_modules/query-string/base.js +1 -1
- package/dist/node_modules/query-string/node_modules/decode-uri-component/index.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +5 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +2 -3
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +10 -6
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +9 -12
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +8 -0
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
- package/dist/static/nudge-tap.5cb30093.json +1057 -0
- package/package.json +1 -1
- package/dist/assets/line-icons/icons/after-noon.js +0 -34
- package/dist/assets/line-icons/icons/after-noon.js.map +0 -1
- package/dist/assets/line-icons/icons/apple-icon-white.js +0 -42
- package/dist/assets/line-icons/icons/apple-icon-white.js.map +0 -1
- package/dist/assets/line-icons/icons/cue-board-filled.js +0 -33
- package/dist/assets/line-icons/icons/cue-board-filled.js.map +0 -1
- package/dist/assets/line-icons/icons/cue-board.js +0 -23
- package/dist/assets/line-icons/icons/cue-board.js.map +0 -1
- package/dist/assets/line-icons/icons/evening.js +0 -35
- package/dist/assets/line-icons/icons/evening.js.map +0 -1
- package/dist/assets/line-icons/icons/hint-fill.js +0 -35
- package/dist/assets/line-icons/icons/hint-fill.js.map +0 -1
- package/dist/assets/line-icons/icons/morning.js +0 -35
- package/dist/assets/line-icons/icons/morning.js.map +0 -1
- package/dist/assets/line-icons/icons/screen-grab-filled.js +0 -35
- package/dist/assets/line-icons/icons/screen-grab-filled.js.map +0 -1
- package/dist/assets/line-icons/icons/screen-grab.js +0 -23
- package/dist/assets/line-icons/icons/screen-grab.js.map +0 -1
- package/dist/assets/line-icons/icons/sticker-filled.js +0 -64
- package/dist/assets/line-icons/icons/sticker-filled.js.map +0 -1
- package/dist/assets/line-icons/icons/sticker.js +0 -46
- package/dist/assets/line-icons/icons/sticker.js.map +0 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js +0 -9
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js.map +0 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js +0 -52
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js.map +0 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js +0 -95
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js.map +0 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text-styled.js +0 -10
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text-styled.js.map +0 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text.js +0 -17
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text.js.map +0 -1
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js +0 -12
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js.map +0 -1
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js +0 -34
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js.map +0 -1
- package/dist/features/auth/comps/otp-input/otp-input-styled.js +0 -22
- package/dist/features/auth/comps/otp-input/otp-input-styled.js.map +0 -1
- package/dist/features/auth/comps/otp-input/otp-input.js +0 -51
- package/dist/features/auth/comps/otp-input/otp-input.js.map +0 -1
- package/dist/features/auth/comps/pill-button/pill-button-styled.js +0 -44
- package/dist/features/auth/comps/pill-button/pill-button-styled.js.map +0 -1
- package/dist/features/auth/comps/pill-button/pill-button.js +0 -75
- package/dist/features/auth/comps/pill-button/pill-button.js.map +0 -1
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js +0 -17
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js.map +0 -1
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js +0 -67
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js.map +0 -1
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-constants.js +0 -19
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-constants.js.map +0 -1
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-styled.js +0 -32
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-styled.js.map +0 -1
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide.js +0 -44
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide.js.map +0 -1
- package/dist/features/auth/pla-signup/signup-header/signup-header.js +0 -54
- package/dist/features/auth/pla-signup/signup-header/signup-header.js.map +0 -1
- package/dist/features/auth/pla-signup/signup-options/signup-options.js +0 -83
- package/dist/features/auth/pla-signup/signup-options/signup-options.js.map +0 -1
- package/dist/features/puzzles/app/puzzle-app-styled.js +0 -81
- package/dist/features/puzzles/app/puzzle-app-styled.js.map +0 -1
- package/dist/features/puzzles/app/puzzle-app-view.js +0 -120
- package/dist/features/puzzles/app/puzzle-app-view.js.map +0 -1
- package/dist/features/puzzles/app/puzzle-app.js +0 -62
- package/dist/features/puzzles/app/puzzle-app.js.map +0 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js +0 -6
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js.map +0 -1
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js +0 -63
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js.map +0 -1
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js +0 -21
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js.map +0 -1
- package/dist/features/ui/drawer/drawer-styled.js +0 -34
- package/dist/features/ui/drawer/drawer-styled.js.map +0 -1
- package/dist/features/ui/drawer/drawer.js +0 -42
- package/dist/features/ui/drawer/drawer.js.map +0 -1
- package/dist/features/ui/sticker-grid/sticker-grid-styles.js.map +0 -1
- package/dist/features/ui/sticker-grid/sticker-grid.js +0 -24
- package/dist/features/ui/sticker-grid/sticker-grid.js.map +0 -1
- package/dist/features/ui/sticker-grid/sticker.js +0 -57
- package/dist/features/ui/sticker-grid/sticker.js.map +0 -1
- package/dist/features/ui/stickers/constants.js +0 -6
- package/dist/features/ui/stickers/constants.js.map +0 -1
- package/dist/features/ui/stickers/stickers-effects.js.map +0 -1
- package/dist/features/ui/stickers/stickers-styled.js.map +0 -1
- package/dist/features/ui/stickers/stickers-utils.js.map +0 -1
- package/dist/features/ui/stickers/stickers.js +0 -40
- package/dist/features/ui/stickers/stickers.js.map +0 -1
- package/dist/node_modules/decode-uri-component/index.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -7
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
- package/dist/static/animated-avatar.1ad58b1d.json +0 -1
- package/dist/static/animated-avatar.69b07505.json +0 -1
- package/dist/static/animated-avatar.9c560b46.json +0 -1
- package/dist/static/calendar-purple.1a840b41.svg +0 -1
- package/dist/static/flying-disk.c7f6ed39.json +0 -1
- package/dist/static/graduation-cap.3be3340a.json +0 -1
- package/dist/static/handshake.287e7dfb.svg +0 -1
- package/dist/static/light-bulb.c6db0b23.json +0 -1
- package/dist/static/money.332aacf1.svg +0 -1
- package/dist/static/muscle.9bcfb8a7.json +0 -1
- package/dist/static/nudge-tap.0591aef4.json +0 -1
- package/dist/static/parent-avatar.822c7b9b.svg +0 -1
- package/dist/static/pencil.23df9da0.json +0 -1
- package/dist/static/plus-sign.de6af957.json +0 -1
- package/dist/static/racing-car.2cbf864e.json +0 -1
- package/dist/static/rocket.0a3ccab0.json +0 -1
- package/dist/static/shovel.abeec04c.json +0 -1
- package/dist/static/trustpilot.bd3d79e1.svg +0 -1
- /package/dist/node_modules/{decode-uri-component → query-string/node_modules/decode-uri-component}/index.js +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"worksheet-question.js","sources":["../../../../../src/features/worksheet/worksheet/worksheet-question/worksheet-question.tsx"],"sourcesContent":["import type { IWorksheetQuestionProps } from './worksheet-question-types';\n\nimport {\n memo,\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n type FC,\n} from 'react';\n\nimport { IMAGES } from '../../../../assets/images/images';\nimport CueCanvas from '../../../cue-canvas/cue-canvas';\nimport Pointer from '../../../pointer-sync/pointer';\nimport FlexView from '../../../ui/layout/flex-view';\nimport EVENTS from '../../constants/events';\nimport { QUESTIONS_GAP } from '../constants';\nimport {\n getPaperColorByQuestion,\n isConceptIntroWidget,\n scrollToQuestion,\n} from '../worksheet-helpers';\nimport QuestionHeader from './header/header';\nimport LearnosityQuestion from './learnosity-question';\nimport QuestionBackdrop from './question-backdrop/question-backdrop';\nimport SubjectiveQuestionReview from './subjective-review';\nimport AdvancedPracticeIntro from './system-intros/advanced-practice-intro';\nimport BasicPracticeIntro from './system-intros/basic-practice-intro';\nimport ExitTicketIntro from './system-intros/exit-ticket-intro';\nimport RegularPracticeIntro from './system-intros/regular-practice-intro';\nimport * as Styled from './worksheet-question-styled';\n\nconst WorksheetQuestion: FC<IWorksheetQuestionProps> = memo(\n ({\n userType,\n signedRequest,\n worksheetCompleted,\n question,\n response,\n nextQuestionId,\n isActive,\n isHidden,\n canRender,\n loggerRef,\n appended,\n maxQuestionWidth,\n behavior,\n layout,\n actionbarHeight,\n learnosity,\n intersectionObserver,\n background = 'paper',\n onMediaStateChange,\n onMarkForReview,\n userId,\n onPublishStrokes,\n onReceiveStrokes,\n isScribblingEnabled,\n initialStrokesData,\n isCanvasEnabled,\n onPublishMouseMove,\n onSubscribeMouseMove,\n setActiveQuestionId,\n canResolveDoubt,\n onResolveDoubt,\n studentId,\n responses,\n subjectiveProps,\n }) => {\n const paperColor = useMemo(\n () => (background === 'paper' ? getPaperColorByQuestion(question) : undefined),\n [background, question],\n );\n const [questionHeight, setQuestionHeight] = useState<number | undefined>();\n const [canvasHeight, setCanvasHeight] = useState<number | undefined>();\n const {\n validation,\n review,\n maximumAttempts,\n canExceedAttempts,\n teacherValidationEnabled,\n solutionHidden,\n } = behavior;\n const { minQuestionHeight, topOffset, questionsScrollable, renderQuestionHeader } = layout;\n const {\n type: questionType,\n response_id: responseId,\n stimulus_review,\n item_type,\n instructor_stimulus,\n metadata: { hints: hintsAvailable, solution, widget_reference },\n item_reference,\n question_number,\n item_number,\n item_display_number,\n } = question;\n const hasStimulusReview = !!stimulus_review;\n const isLessonOverview = item_type === 'overview';\n const isConceptIntro = isConceptIntroWidget(instructor_stimulus);\n const isSystemIntro = instructor_stimulus === 'SystemIntro';\n const isIntro = isConceptIntro || isSystemIntro;\n const responseEdited = response?.responseEdited;\n const wrapperClasses = useMemo(() => {\n const classes = [];\n\n if (responseEdited && userType === 'TEACHER') {\n classes.push('attempting');\n }\n\n if (!appended) {\n classes.push('hidden');\n }\n\n if (questionType === 'hotspot') {\n classes.push('correct-answers-hidden');\n }\n\n if (appended && teacherValidationEnabled && questionType === 'clozetext') {\n if (!isConceptIntro || userType === 'STUDENT') {\n classes.push('response-hidden');\n } else {\n classes.push('response-code-hidden');\n }\n }\n\n if (isLessonOverview) {\n classes.push('lesson-overview');\n }\n\n if (isConceptIntro) {\n classes.push('concept-intro');\n }\n\n if (isSystemIntro) {\n classes.push('system-intro');\n }\n\n return classes.join(' ');\n }, [\n appended,\n isConceptIntro,\n isLessonOverview,\n isSystemIntro,\n questionType,\n responseEdited,\n teacherValidationEnabled,\n userType,\n ]);\n const overflowDetectedRef = useRef<Record<string, boolean>>({});\n\n const hintsUsed = response?.hintsUsed ?? 0;\n const [validatedByTeacherOnMount] = useState(response?.validatedByTeacher ?? false);\n\n const questionRef = useRef<HTMLDivElement>(null);\n const pointerContainerRef = useRef<HTMLDivElement>(null);\n const hints = useMemo(() => hintsAvailable?.slice(0, hintsUsed), [hintsAvailable, hintsUsed]);\n const validateResponse = useMemo(() => {\n if (userType === 'TEACHER') return true;\n\n if (worksheetCompleted) return true;\n\n if (!response) return false;\n\n if (!response.response) return false;\n\n if (response.responseEdited) return false;\n\n return validation;\n }, [response, userType, validation, worksheetCompleted]);\n\n const showCorrectAnswers = useMemo(() => {\n if (userType === 'TEACHER') return true;\n\n if (review) {\n const { attemptsHistory } = response ?? {};\n const maximumAttemptsReached = (attemptsHistory?.length ?? 0) >= maximumAttempts;\n\n return maximumAttemptsReached && !canExceedAttempts;\n }\n\n return false;\n }, [canExceedAttempts, maximumAttempts, response, review, userType]);\n\n const showSolution = useMemo(\n () => solution && worksheetCompleted && !solutionHidden,\n [solutionHidden, solution, worksheetCompleted],\n );\n\n const [dropZoneDimensions, setDropZoneDimensions] = useState({\n width: 0,\n height: 0,\n });\n\n const onUpdateHeight = useCallback((height: number) => {\n setCanvasHeight(height);\n }, []);\n\n useEffect(() => {\n if (questionRef.current) {\n intersectionObserver.observe(questionRef.current);\n }\n }, [intersectionObserver]);\n\n useEffect(() => {\n if (\n appended &&\n (question.type === 'clozeassociation' ||\n question.type === 'association' ||\n question.type === 'clozeformula')\n ) {\n const draggableElements = document.querySelectorAll(\n `.widget-${question.response_id} .lrn_draggable`,\n );\n\n let minWidth = 0;\n let minHeight = 0;\n\n draggableElements.forEach(draggableElement => {\n minWidth = Math.max(minWidth, draggableElement.clientWidth + 33);\n minHeight = Math.max(minHeight, draggableElement.clientHeight + 1);\n });\n\n setDropZoneDimensions({\n width: question.type !== 'association' ? minWidth : 0,\n height: minHeight,\n });\n }\n }, [appended, question.response_id, question.type]);\n\n useEffect(() => {\n if (appended && validateResponse) {\n const learnosityQuestion = learnosity.question(responseId);\n\n if (learnosityQuestion) {\n learnosityQuestion.validate({\n showCorrectAnswers,\n });\n }\n }\n }, [appended, learnosity, responseId, review, showCorrectAnswers, userType, validateResponse]);\n\n useEffect(() => {\n const $questionEl = pointerContainerRef.current;\n\n if (\n appended &&\n $questionEl &&\n loggerRef.current &&\n overflowDetectedRef.current[responseId] === undefined &&\n !isConceptIntro &&\n !isSystemIntro\n ) {\n const parentWidth = $questionEl.clientWidth;\n const nestedElements = $questionEl.querySelectorAll('*');\n\n for (let i = 0; i < nestedElements.length; i++) {\n const element = nestedElements[i];\n\n if (element?.closest('.resize-sensor')) {\n continue;\n }\n\n const elementWidth = element?.clientWidth ?? 0;\n\n if (elementWidth > parentWidth) {\n overflowDetectedRef.current[responseId] = true;\n loggerRef.current(EVENTS.WORKSHEET_V3_GREATER_WIDTH_ELEMENT, {\n item_reference,\n widget_reference,\n question_type: questionType,\n question_number,\n responseId,\n item_number,\n item_display_number,\n });\n break;\n }\n }\n\n overflowDetectedRef.current[responseId] = false;\n }\n }, [\n appended,\n isConceptIntro,\n isSystemIntro,\n item_display_number,\n item_number,\n item_reference,\n loggerRef,\n questionType,\n question_number,\n responseId,\n widget_reference,\n ]);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => {\n const $questionEl = questionRef.current;\n const height = $questionEl?.clientHeight;\n\n if (appended && height && height > 0) {\n setQuestionHeight(qHeight => {\n if (!qHeight) {\n return Math.ceil(height);\n }\n\n const newQuestionHeight = Math.ceil(height);\n\n if (Math.abs(newQuestionHeight - qHeight) > 4) {\n return newQuestionHeight;\n }\n\n return qHeight;\n });\n }\n\n if (hintsUsed || hasStimulusReview || (solution && worksheetCompleted)) {\n learnosity.renderMath('mathjax');\n }\n });\n\n useLayoutEffect(() => {\n if (!questionsScrollable && !isHidden) {\n scrollToQuestion(responseId);\n }\n }, [isHidden, questionsScrollable, responseId, topOffset]);\n\n useEffect(() => {\n if (\n teacherValidationEnabled &&\n nextQuestionId &&\n !validatedByTeacherOnMount &&\n response?.validatedByTeacher\n ) {\n const timer = setTimeout(() => {\n if (questionsScrollable) {\n scrollToQuestion(nextQuestionId);\n } else {\n setActiveQuestionId(nextQuestionId);\n }\n }, 1000);\n\n return () => {\n clearTimeout(timer);\n };\n }\n }, [\n nextQuestionId,\n teacherValidationEnabled,\n validatedByTeacherOnMount,\n questionsScrollable,\n setActiveQuestionId,\n response?.validatedByTeacher,\n ]);\n\n return (\n <Styled.QuestionContainerWrapper\n data-response-id={responseId}\n className={`widget-${responseId}`}\n ref={questionRef}\n $topOffset={topOffset}\n $flexDirection={stimulus_review ? 'row' : 'column'}\n $alignItems={stimulus_review ? 'flex-start' : 'center'}\n $hidden={isHidden}\n $marginBottom={QUESTIONS_GAP}\n >\n {stimulus_review && (\n <Styled.StimulusReview\n dangerouslySetInnerHTML={{\n __html: stimulus_review,\n }}\n />\n )}\n <Styled.QuestionContainer\n ref={pointerContainerRef}\n $width={stimulus_review ? '50%' : `${maxQuestionWidth}px`}\n $minHeight={\n questionHeight ? Math.max(questionHeight - 72, canvasHeight ?? 0) : minQuestionHeight\n }\n $isActive={isActive}\n $paperColor={paperColor}\n $opacity={isActive ? 1 : 0.2}\n >\n {isActive && !!onPublishMouseMove && !!onSubscribeMouseMove && isCanvasEnabled && (\n <Pointer\n containerRef={pointerContainerRef}\n onPublish={onPublishMouseMove}\n onSubscribe={onSubscribeMouseMove}\n responseId={responseId}\n />\n )}\n <Styled.QuestionWrapper\n className={wrapperClasses}\n $dropzoneMinWidth={dropZoneDimensions.width}\n $dropzoneMinHeight={dropZoneDimensions.height}\n >\n {renderQuestionHeader && !(isLessonOverview || isConceptIntro || isSystemIntro) && (\n <QuestionHeader\n userType={userType}\n question={question}\n response={response}\n behavior={behavior}\n layout={layout}\n paperColor={paperColor}\n onMarkForReview={onMarkForReview}\n actionbarHeight={actionbarHeight}\n canResolveDoubt={canResolveDoubt}\n onResolveDoubt={onResolveDoubt}\n worksheetCompleted={worksheetCompleted}\n />\n )}\n {isLessonOverview && (\n <Styled.LessonOverviewBanner src={IMAGES.LESSON_OVERVIEW_BANNER} />\n )}\n {isConceptIntro && paperColor && <QuestionBackdrop paperColor={paperColor} />}\n {isSystemIntro ? (\n <>\n {item_type === 'practice-basic' && <BasicPracticeIntro />}\n {item_type === 'practice-regular' && <RegularPracticeIntro />}\n {item_type === 'exit-ticket' && <ExitTicketIntro />}\n {item_type?.startsWith('advanced-') && <AdvancedPracticeIntro />}\n </>\n ) : undefined}\n <LearnosityQuestion\n signedRequest={signedRequest}\n appended={appended}\n question={question}\n response={response?.response}\n canRender={canRender || isActive}\n learnosity={learnosity}\n canForceAppend={userType === 'TEACHER'}\n isConceptIntro={isConceptIntro}\n simState={response?.simState}\n onMediaStateChange={onMediaStateChange}\n />\n\n {!isIntro &&\n isCanvasEnabled &&\n onPublishStrokes &&\n onReceiveStrokes &&\n questionHeight !== undefined && (\n <Styled.CueCanvasWrapper $canScribble={isScribblingEnabled}>\n <CueCanvas\n canRender={canRender}\n canScribble={isScribblingEnabled && isActive}\n appended={appended}\n canvasId={responseId}\n width={maxQuestionWidth}\n height={Math.max(questionHeight, canvasHeight ?? 0)}\n onUpdateHeight={onUpdateHeight}\n onPublish={onPublishStrokes}\n onSubscribe={onReceiveStrokes}\n userId={userId}\n initialData={initialStrokesData?.[responseId]}\n userType={userType}\n />\n </Styled.CueCanvasWrapper>\n )}\n {!isIntro && hints && hints.length > 0 && (\n <FlexView\n $background=\"BLUE_1\"\n $gutterX={1}\n $gapX={0.5}\n $borderRadiusX={0}\n $borderColor=\"BLUE_2\"\n >\n {hints.map((hint, index) => (\n <Styled.Hint\n key={hint}\n dangerouslySetInnerHTML={{\n __html: `<span style=\"color: #DA5107; font-weight: 600;\">Hint${\n (hintsAvailable?.length ?? 0) > 1 ? ` ${index + 1}` : ''\n }:</span> ${hint}`,\n }}\n />\n ))}\n </FlexView>\n )}\n {showSolution && (\n <FlexView\n $background=\"YELLOW_1\"\n $gutterX={1}\n $gapX={0.875}\n $borderRadiusX={0}\n $borderColor=\"YELLOW_2\"\n >\n <Styled.Solution\n dangerouslySetInnerHTML={{\n __html: `<div style=\"color: #DA5107; font-weight: 600;\">Solution:</div>${solution}`,\n }}\n />\n </FlexView>\n )}\n {!!subjectiveProps && (\n <SubjectiveQuestionReview\n responses={responses}\n response={response}\n nextQuestionId={nextQuestionId}\n responseId={responseId}\n studentId={studentId}\n userType={userType}\n {...subjectiveProps}\n />\n )}\n </Styled.QuestionWrapper>\n </Styled.QuestionContainer>\n </Styled.QuestionContainerWrapper>\n );\n },\n);\n\nexport default WorksheetQuestion;\n"],"names":["WorksheetQuestion","memo","userType","signedRequest","worksheetCompleted","question","response","nextQuestionId","isActive","isHidden","canRender","loggerRef","appended","maxQuestionWidth","behavior","layout","actionbarHeight","learnosity","intersectionObserver","background","onMediaStateChange","onMarkForReview","userId","onPublishStrokes","onReceiveStrokes","isScribblingEnabled","initialStrokesData","isCanvasEnabled","onPublishMouseMove","onSubscribeMouseMove","setActiveQuestionId","canResolveDoubt","onResolveDoubt","studentId","responses","subjectiveProps","paperColor","useMemo","getPaperColorByQuestion","questionHeight","setQuestionHeight","useState","canvasHeight","setCanvasHeight","validation","review","maximumAttempts","canExceedAttempts","teacherValidationEnabled","solutionHidden","minQuestionHeight","topOffset","questionsScrollable","renderQuestionHeader","questionType","responseId","stimulus_review","item_type","instructor_stimulus","hintsAvailable","solution","widget_reference","item_reference","question_number","item_number","item_display_number","hasStimulusReview","isLessonOverview","isConceptIntro","isConceptIntroWidget","isSystemIntro","isIntro","responseEdited","wrapperClasses","classes","overflowDetectedRef","useRef","hintsUsed","validatedByTeacherOnMount","questionRef","pointerContainerRef","hints","validateResponse","showCorrectAnswers","attemptsHistory","showSolution","dropZoneDimensions","setDropZoneDimensions","onUpdateHeight","useCallback","height","useEffect","draggableElements","minWidth","minHeight","draggableElement","learnosityQuestion","$questionEl","parentWidth","nestedElements","i","element","EVENTS","qHeight","newQuestionHeight","useLayoutEffect","scrollToQuestion","timer","jsxs","Styled.QuestionContainerWrapper","QUESTIONS_GAP","jsx","Styled.StimulusReview","Styled.QuestionContainer","Pointer","Styled.QuestionWrapper","QuestionHeader","Styled.LessonOverviewBanner","IMAGES","QuestionBackdrop","Fragment","BasicPracticeIntro","RegularPracticeIntro","ExitTicketIntro","AdvancedPracticeIntro","LearnosityQuestion","Styled.CueCanvasWrapper","CueCanvas","FlexView","hint","index","Styled.Hint","Styled.Solution","SubjectiveQuestionReview"],"mappings":";;;;;;;;;;;;;;;;;;AAkCA,MAAMA,KAAiDC;AAAA,EACrD,CAAC;AAAA,IACC,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,oBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,QAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,iBAAAC;AAAA,EAAA,MACI;AACJ,UAAMC,IAAaC;AAAA,MACjB,MAAOlB,MAAe,UAAUmB,GAAwBjC,CAAQ,IAAI;AAAA,MACpE,CAACc,GAAYd,CAAQ;AAAA,IAAA,GAEjB,CAACkC,GAAgBC,EAAiB,IAAIC,EAA6B,GACnE,CAACC,IAAcC,EAAe,IAAIF,EAA6B,GAC/D;AAAA,MACJ,YAAAG;AAAA,MACA,QAAAC;AAAA,MACA,iBAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,0BAAAC;AAAA,MACA,gBAAAC;AAAA,IACE,IAAAnC,GACE,EAAE,mBAAAoC,IAAmB,WAAAC,IA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ACC,GAAGiC;AAAA,wBAAA;AAAA,sBACN;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBAEJ;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
|
1
|
+
{"version":3,"file":"worksheet-question.js","sources":["../../../../../src/features/worksheet/worksheet/worksheet-question/worksheet-question.tsx"],"sourcesContent":["import type { IWorksheetQuestionProps } from './worksheet-question-types';\n\nimport {\n memo,\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n type FC,\n} from 'react';\n\nimport { IMAGES } from '../../../../assets/images/images';\nimport CueCanvas from '../../../cue-canvas/cue-canvas';\nimport Pointer from '../../../pointer-sync/pointer';\nimport FlexView from '../../../ui/layout/flex-view';\nimport EVENTS from '../../constants/events';\nimport { LEARNOSITY_KEYBOARD_HEIGHT, QUESTIONS_GAP } from '../constants';\nimport {\n getPaperColorByQuestion,\n isConceptIntroWidget,\n scrollToQuestion,\n} from '../worksheet-helpers';\nimport QuestionHeader from './header/header';\nimport LearnosityQuestion from './learnosity-question';\nimport QuestionBackdrop from './question-backdrop/question-backdrop';\nimport SubjectiveQuestionReview from './subjective-review';\nimport AdvancedPracticeIntro from './system-intros/advanced-practice-intro';\nimport BasicPracticeIntro from './system-intros/basic-practice-intro';\nimport ExitTicketIntro from './system-intros/exit-ticket-intro';\nimport RegularPracticeIntro from './system-intros/regular-practice-intro';\nimport * as Styled from './worksheet-question-styled';\n\nconst WorksheetQuestion: FC<IWorksheetQuestionProps> = memo(\n ({\n userType,\n signedRequest,\n worksheetCompleted,\n question,\n response,\n nextQuestionId,\n isActive,\n isHidden,\n canRender,\n loggerRef,\n appended,\n maxQuestionWidth,\n behavior,\n layout,\n actionbarHeight,\n learnosity,\n intersectionObserver,\n background = 'paper',\n onMediaStateChange,\n onMarkForReview,\n userId,\n onPublishStrokes,\n onReceiveStrokes,\n isScribblingEnabled,\n initialStrokesData,\n isCanvasEnabled,\n onPublishMouseMove,\n onSubscribeMouseMove,\n setActiveQuestionId,\n canResolveDoubt,\n onResolveDoubt,\n studentId,\n responses,\n subjectiveProps,\n }) => {\n const paperColor = useMemo(\n () => (background === 'paper' ? getPaperColorByQuestion(question) : undefined),\n [background, question],\n );\n const [questionHeight, setQuestionHeight] = useState<number | undefined>();\n const [canvasHeight, setCanvasHeight] = useState<number | undefined>();\n const {\n validation,\n review,\n maximumAttempts,\n canExceedAttempts,\n teacherValidationEnabled,\n solutionHidden,\n } = behavior;\n const { minQuestionHeight, topOffset, questionsScrollable, renderQuestionHeader } = layout;\n const {\n type: questionType,\n response_id: responseId,\n stimulus_review,\n item_type,\n instructor_stimulus,\n metadata: { hints: hintsAvailable, solution, widget_reference },\n item_reference,\n question_number,\n item_number,\n item_display_number,\n } = question;\n const hasStimulusReview = !!stimulus_review;\n const isLessonOverview = item_type === 'overview';\n const isConceptIntro = isConceptIntroWidget(instructor_stimulus);\n const isSystemIntro = instructor_stimulus === 'SystemIntro';\n const isIntro = isConceptIntro || isSystemIntro;\n const responseEdited = response?.responseEdited;\n const wrapperClasses = useMemo(() => {\n const classes = [];\n\n if (responseEdited && userType === 'TEACHER') {\n classes.push('attempting');\n }\n\n if (!appended) {\n classes.push('hidden');\n }\n\n if (questionType === 'hotspot') {\n classes.push('correct-answers-hidden');\n }\n\n if (appended && teacherValidationEnabled && questionType === 'clozetext') {\n if (!isConceptIntro || userType === 'STUDENT') {\n classes.push('response-hidden');\n } else {\n classes.push('response-code-hidden');\n }\n }\n\n if (isLessonOverview) {\n classes.push('lesson-overview');\n }\n\n if (isConceptIntro) {\n classes.push('concept-intro');\n }\n\n if (isSystemIntro) {\n classes.push('system-intro');\n }\n\n return classes.join(' ');\n }, [\n appended,\n isConceptIntro,\n isLessonOverview,\n isSystemIntro,\n questionType,\n responseEdited,\n teacherValidationEnabled,\n userType,\n ]);\n const overflowDetectedRef = useRef<Record<string, boolean>>({});\n\n const hintsUsed = response?.hintsUsed ?? 0;\n const [validatedByTeacherOnMount] = useState(response?.validatedByTeacher ?? false);\n\n const questionRef = useRef<HTMLDivElement>(null);\n const pointerContainerRef = useRef<HTMLDivElement>(null);\n const hints = useMemo(() => hintsAvailable?.slice(0, hintsUsed), [hintsAvailable, hintsUsed]);\n const validateResponse = useMemo(() => {\n if (userType === 'TEACHER') return true;\n\n if (worksheetCompleted) return true;\n\n if (!response) return false;\n\n if (!response.response) return false;\n\n if (response.responseEdited) return false;\n\n return validation;\n }, [response, userType, validation, worksheetCompleted]);\n\n const showCorrectAnswers = useMemo(() => {\n if (userType === 'TEACHER') return true;\n\n if (review) {\n const { attemptsHistory } = response ?? {};\n const maximumAttemptsReached = (attemptsHistory?.length ?? 0) >= maximumAttempts;\n\n return maximumAttemptsReached && !canExceedAttempts;\n }\n\n return false;\n }, [canExceedAttempts, maximumAttempts, response, review, userType]);\n\n const showSolution = useMemo(\n () => solution && worksheetCompleted && !solutionHidden,\n [solutionHidden, solution, worksheetCompleted],\n );\n\n const [dropZoneDimensions, setDropZoneDimensions] = useState({\n width: 0,\n height: 0,\n });\n\n const onUpdateHeight = useCallback((height: number) => {\n setCanvasHeight(height);\n }, []);\n\n useEffect(() => {\n if (questionRef.current) {\n intersectionObserver.observe(questionRef.current);\n }\n }, [intersectionObserver]);\n\n useEffect(() => {\n if (\n appended &&\n (question.type === 'clozeassociation' ||\n question.type === 'association' ||\n question.type === 'clozeformula')\n ) {\n const draggableElements = document.querySelectorAll(\n `.widget-${question.response_id} .lrn_draggable`,\n );\n\n let minWidth = 0;\n let minHeight = 0;\n\n draggableElements.forEach(draggableElement => {\n minWidth = Math.max(minWidth, draggableElement.clientWidth + 33);\n minHeight = Math.max(minHeight, draggableElement.clientHeight + 1);\n });\n\n setDropZoneDimensions({\n width: question.type !== 'association' ? minWidth : 0,\n height: minHeight,\n });\n }\n }, [appended, question.response_id, question.type]);\n\n useEffect(() => {\n if (appended && validateResponse) {\n const learnosityQuestion = learnosity.question(responseId);\n\n if (learnosityQuestion) {\n learnosityQuestion.validate({\n showCorrectAnswers,\n });\n }\n }\n }, [appended, learnosity, responseId, review, showCorrectAnswers, userType, validateResponse]);\n\n useEffect(() => {\n const $questionEl = pointerContainerRef.current;\n\n if (\n appended &&\n $questionEl &&\n loggerRef.current &&\n overflowDetectedRef.current[responseId] === undefined &&\n !isConceptIntro &&\n !isSystemIntro\n ) {\n const parentWidth = $questionEl.clientWidth;\n const nestedElements = $questionEl.querySelectorAll('*');\n\n for (let i = 0; i < nestedElements.length; i++) {\n const element = nestedElements[i];\n\n if (element?.closest('.resize-sensor')) {\n continue;\n }\n\n const elementWidth = element?.clientWidth ?? 0;\n\n if (elementWidth > parentWidth) {\n overflowDetectedRef.current[responseId] = true;\n loggerRef.current(EVENTS.WORKSHEET_V3_GREATER_WIDTH_ELEMENT, {\n item_reference,\n widget_reference,\n question_type: questionType,\n question_number,\n responseId,\n item_number,\n item_display_number,\n });\n break;\n }\n }\n\n overflowDetectedRef.current[responseId] = false;\n }\n }, [\n appended,\n isConceptIntro,\n isSystemIntro,\n item_display_number,\n item_number,\n item_reference,\n loggerRef,\n questionType,\n question_number,\n responseId,\n widget_reference,\n ]);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => {\n const $questionEl = questionRef.current;\n\n const getExtraSpaceNeedForFloatingKeyboard = (questionEl: HTMLDivElement) => {\n const $responseWrapper = questionEl.querySelector('.lrn_response_wrapper');\n\n if (isIntro || !$responseWrapper) {\n return 0;\n }\n\n const questionBottom = questionEl.getBoundingClientRect().bottom;\n const responseWrapperBottom = $responseWrapper.getBoundingClientRect().bottom;\n const spaceFromResponseToBottom = Math.abs(questionBottom - responseWrapperBottom);\n\n if (spaceFromResponseToBottom < LEARNOSITY_KEYBOARD_HEIGHT) {\n return LEARNOSITY_KEYBOARD_HEIGHT - spaceFromResponseToBottom;\n }\n\n return 0;\n };\n\n if (appended && $questionEl) {\n setQuestionHeight(qHeight => {\n const hasFloatingKeyboard = question.ui_style?.type === 'floating-keyboard';\n const v3CodeHidden = teacherValidationEnabled && questionType === 'clozetext';\n const hasKeyboard = hasFloatingKeyboard && !v3CodeHidden;\n const height = $questionEl.clientHeight;\n\n if (height === 0) {\n return qHeight;\n }\n\n // If the question has a floating keyboard, we need to add the height of the keyboard to the question height\n if (!qHeight) {\n return Math.ceil(\n height + (hasKeyboard ? getExtraSpaceNeedForFloatingKeyboard($questionEl) : 0),\n );\n }\n\n const newQuestionHeight = Math.ceil(\n height + (hasKeyboard ? getExtraSpaceNeedForFloatingKeyboard($questionEl) : 0),\n );\n\n if (Math.abs(newQuestionHeight - qHeight) > 4) {\n return newQuestionHeight;\n }\n\n return qHeight;\n });\n }\n\n //Dirty fix to render mathjax\n if (hintsUsed || hasStimulusReview || (solution && worksheetCompleted)) {\n learnosity.renderMath('mathjax');\n }\n });\n\n useLayoutEffect(() => {\n if (!questionsScrollable && !isHidden) {\n scrollToQuestion(responseId);\n }\n }, [isHidden, questionsScrollable, responseId, topOffset]);\n\n useEffect(() => {\n if (\n teacherValidationEnabled &&\n nextQuestionId &&\n !validatedByTeacherOnMount &&\n response?.validatedByTeacher\n ) {\n const timer = setTimeout(() => {\n if (questionsScrollable) {\n scrollToQuestion(nextQuestionId);\n } else {\n setActiveQuestionId(nextQuestionId);\n }\n }, 1000);\n\n return () => {\n clearTimeout(timer);\n };\n }\n }, [\n nextQuestionId,\n teacherValidationEnabled,\n validatedByTeacherOnMount,\n questionsScrollable,\n setActiveQuestionId,\n response?.validatedByTeacher,\n ]);\n\n return (\n <Styled.QuestionContainerWrapper\n data-response-id={responseId}\n className={`widget-${responseId}`}\n ref={questionRef}\n $topOffset={topOffset}\n $flexDirection={stimulus_review ? 'row' : 'column'}\n $alignItems={stimulus_review ? 'flex-start' : 'center'}\n $hidden={isHidden}\n $marginBottom={QUESTIONS_GAP}\n >\n {stimulus_review && (\n <Styled.StimulusReview\n dangerouslySetInnerHTML={{\n __html: stimulus_review,\n }}\n />\n )}\n <Styled.QuestionContainer\n ref={pointerContainerRef}\n $width={stimulus_review ? '50%' : `${maxQuestionWidth}px`}\n $minHeight={\n questionHeight ? Math.max(questionHeight - 72, canvasHeight ?? 0) : minQuestionHeight\n }\n $isActive={isActive}\n $paperColor={paperColor}\n $opacity={isActive ? 1 : 0.2}\n >\n {isActive && !!onPublishMouseMove && !!onSubscribeMouseMove && isCanvasEnabled && (\n <Pointer\n containerRef={pointerContainerRef}\n onPublish={onPublishMouseMove}\n onSubscribe={onSubscribeMouseMove}\n responseId={responseId}\n />\n )}\n <Styled.QuestionWrapper\n className={wrapperClasses}\n $dropzoneMinWidth={dropZoneDimensions.width}\n $dropzoneMinHeight={dropZoneDimensions.height}\n >\n {renderQuestionHeader && !(isLessonOverview || isConceptIntro || isSystemIntro) && (\n <QuestionHeader\n userType={userType}\n question={question}\n response={response}\n behavior={behavior}\n layout={layout}\n paperColor={paperColor}\n onMarkForReview={onMarkForReview}\n actionbarHeight={actionbarHeight}\n canResolveDoubt={canResolveDoubt}\n onResolveDoubt={onResolveDoubt}\n worksheetCompleted={worksheetCompleted}\n />\n )}\n {isLessonOverview && (\n <Styled.LessonOverviewBanner src={IMAGES.LESSON_OVERVIEW_BANNER} />\n )}\n {isConceptIntro && paperColor && <QuestionBackdrop paperColor={paperColor} />}\n {isSystemIntro ? (\n <>\n {item_type === 'practice-basic' && <BasicPracticeIntro />}\n {item_type === 'practice-regular' && <RegularPracticeIntro />}\n {item_type === 'exit-ticket' && <ExitTicketIntro />}\n {item_type?.startsWith('advanced-') && <AdvancedPracticeIntro />}\n </>\n ) : undefined}\n <LearnosityQuestion\n signedRequest={signedRequest}\n appended={appended}\n question={question}\n response={response?.response}\n canRender={canRender || isActive}\n learnosity={learnosity}\n canForceAppend={userType === 'TEACHER'}\n isConceptIntro={isConceptIntro}\n simState={response?.simState}\n onMediaStateChange={onMediaStateChange}\n />\n\n {!isIntro &&\n isCanvasEnabled &&\n onPublishStrokes &&\n onReceiveStrokes &&\n questionHeight !== undefined && (\n <Styled.CueCanvasWrapper $canScribble={isScribblingEnabled}>\n <CueCanvas\n canRender={canRender}\n canScribble={isScribblingEnabled && isActive}\n appended={appended}\n canvasId={responseId}\n width={maxQuestionWidth}\n height={Math.max(questionHeight, canvasHeight ?? 0)}\n onUpdateHeight={onUpdateHeight}\n onPublish={onPublishStrokes}\n onSubscribe={onReceiveStrokes}\n userId={userId}\n initialData={initialStrokesData?.[responseId]}\n userType={userType}\n />\n </Styled.CueCanvasWrapper>\n )}\n {!isIntro && hints && hints.length > 0 && (\n <FlexView\n $background=\"BLUE_1\"\n $gutterX={1}\n $gapX={0.5}\n $borderRadiusX={0}\n $borderColor=\"BLUE_2\"\n >\n {hints.map((hint, index) => (\n <Styled.Hint\n key={hint}\n dangerouslySetInnerHTML={{\n __html: `<span style=\"color: #DA5107; font-weight: 600;\">Hint${\n (hintsAvailable?.length ?? 0) > 1 ? ` ${index + 1}` : ''\n }:</span> ${hint}`,\n }}\n />\n ))}\n </FlexView>\n )}\n {showSolution && (\n <FlexView\n $background=\"YELLOW_1\"\n $gutterX={1}\n $gapX={0.875}\n $borderRadiusX={0}\n $borderColor=\"YELLOW_2\"\n >\n <Styled.Solution\n dangerouslySetInnerHTML={{\n __html: `<div style=\"color: #DA5107; font-weight: 600;\">Solution:</div>${solution}`,\n }}\n />\n </FlexView>\n )}\n {!!subjectiveProps && (\n <SubjectiveQuestionReview\n responses={responses}\n response={response}\n nextQuestionId={nextQuestionId}\n responseId={responseId}\n studentId={studentId}\n userType={userType}\n {...subjectiveProps}\n />\n )}\n </Styled.QuestionWrapper>\n </Styled.QuestionContainer>\n </Styled.QuestionContainerWrapper>\n );\n },\n);\n\nexport default WorksheetQuestion;\n"],"names":["WorksheetQuestion","memo","userType","signedRequest","worksheetCompleted","question","response","nextQuestionId","isActive","isHidden","canRender","loggerRef","appended","maxQuestionWidth","behavior","layout","actionbarHeight","learnosity","intersectionObserver","background","onMediaStateChange","onMarkForReview","userId","onPublishStrokes","onReceiveStrokes","isScribblingEnabled","initialStrokesData","isCanvasEnabled","onPublishMouseMove","onSubscribeMouseMove","setActiveQuestionId","canResolveDoubt","onResolveDoubt","studentId","responses","subjectiveProps","paperColor","useMemo","getPaperColorByQuestion","questionHeight","setQuestionHeight","useState","canvasHeight","setCanvasHeight","validation","review","maximumAttempts","canExceedAttempts","teacherValidationEnabled","solutionHidden","minQuestionHeight","topOffset","questionsScrollable","renderQuestionHeader","questionType","responseId","stimulus_review","item_type","instructor_stimulus","hintsAvailable","solution","widget_reference","item_reference","question_number","item_number","item_display_number","hasStimulusReview","isLessonOverview","isConceptIntro","isConceptIntroWidget","isSystemIntro","isIntro","responseEdited","wrapperClasses","classes","overflowDetectedRef","useRef","hintsUsed","validatedByTeacherOnMount","questionRef","pointerContainerRef","hints","validateResponse","showCorrectAnswers","attemptsHistory","showSolution","dropZoneDimensions","setDropZoneDimensions","onUpdateHeight","useCallback","height","useEffect","draggableElements","minWidth","minHeight","draggableElement","learnosityQuestion","$questionEl","parentWidth","nestedElements","i","element","EVENTS","getExtraSpaceNeedForFloatingKeyboard","questionEl","$responseWrapper","questionBottom","responseWrapperBottom","spaceFromResponseToBottom","LEARNOSITY_KEYBOARD_HEIGHT","qHeight","hasKeyboard","_a","newQuestionHeight","useLayoutEffect","scrollToQuestion","timer","jsxs","Styled.QuestionContainerWrapper","QUESTIONS_GAP","jsx","Styled.StimulusReview","Styled.QuestionContainer","Pointer","Styled.QuestionWrapper","QuestionHeader","Styled.LessonOverviewBanner","IMAGES","QuestionBackdrop","Fragment","BasicPracticeIntro","RegularPracticeIntro","ExitTicketIntro","AdvancedPracticeIntro","LearnosityQuestion","Styled.CueCanvasWrapper","CueCanvas","FlexView","hint","index","Styled.Hint","Styled.Solution","SubjectiveQuestionReview"],"mappings":";;;;;;;;;;;;;;;;;;AAkCA,MAAMA,KAAiDC;AAAA,EACrD,CAAC;AAAA,IACC,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,UAAAC;AAAA,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;AAAA,0BACF;AAAA,wBAAA;AAAA,sBACF;AAAA,sBAED,CAAC,CAACzB,MACD,gBAAAqF;AAAA,wBAACsB;AAAA,wBAAA;AAAA,0BACC,WAAA5G;AAAA,0BACA,UAAA5B;AAAA,0BACA,gBAAAC;AAAA,0BACA,YAAAgD;AAAA,0BACA,WAAAtB;AAAA,0BACA,UAAA/B;AAAA,0BACC,GAAGiC;AAAA,wBAAA;AAAA,sBACN;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBAEJ;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import t
|
1
|
+
import t from "styled-components";
|
2
2
|
import i from "../../ui/layout/flex-view.js";
|
3
|
-
import { QUESTIONS_GAP as
|
4
|
-
const
|
3
|
+
import { QUESTIONS_GAP as d, WORKSHEET_CONTAINER_BORDER_RADIUS as n, TOP_NAVIGATION_HEIGHT as c, ACTION_BAR_HEIGHT as p, SIDEBAR_WIDTH as l } from "./constants.js";
|
4
|
+
const $ = t(i)(({ $topOffset: o }) => `
|
5
5
|
position: sticky;
|
6
6
|
top: ${o}px;
|
7
7
|
z-index: 1;
|
8
|
-
`),
|
8
|
+
`), g = t.div(({ theme: o }) => {
|
9
9
|
const { colors: r } = o;
|
10
10
|
return `
|
11
11
|
width: 16px;
|
@@ -13,18 +13,18 @@ const g = t(i)(({ $topOffset: o }) => `
|
|
13
13
|
border-radius: 32px;
|
14
14
|
border: 0.667px solid ${r.BLACK_T_87}
|
15
15
|
`;
|
16
|
-
}),
|
16
|
+
}), u = t(i)`
|
17
17
|
position: relative;
|
18
|
-
`,
|
18
|
+
`, E = t(i)(
|
19
19
|
({ $isCardView: o, theme: r }) => `
|
20
20
|
${o ? `
|
21
21
|
border-left: 1px solid ${r.colors.GREY_2};
|
22
22
|
border-right: 1px solid ${r.colors.GREY_2};
|
23
23
|
` : ""}
|
24
|
-
padding-top: ${
|
24
|
+
padding-top: ${d}px;
|
25
25
|
z-index: 0;
|
26
26
|
`
|
27
|
-
),
|
27
|
+
), _ = t(i)(
|
28
28
|
({ theme: o, $topOffset: r }) => `
|
29
29
|
position: sticky;
|
30
30
|
top: ${r}px;
|
@@ -33,16 +33,16 @@ const g = t(i)(({ $topOffset: o }) => `
|
|
33
33
|
justify-content: flex-end;
|
34
34
|
background-color: ${o.colors.WHITE};
|
35
35
|
`
|
36
|
-
),
|
36
|
+
), I = t(i)`
|
37
37
|
border: 1px solid ${({ theme: o }) => o.colors.GREY_2};
|
38
38
|
border-top: 0px;
|
39
39
|
border-radius: ${n}px ${n}px 0 0;
|
40
40
|
overflow: hidden;
|
41
|
-
`,
|
42
|
-
({ theme: { colors: o }, $height: r, $isCardView: e, $marginTop:
|
41
|
+
`, f = t(i)(
|
42
|
+
({ theme: { colors: o }, $height: r, $isCardView: e, $marginTop: s }) => `
|
43
43
|
position: sticky;
|
44
44
|
top: calc(100% - ${r}px);
|
45
|
-
margin-top: -${
|
45
|
+
margin-top: -${s}px;
|
46
46
|
z-index: 1;
|
47
47
|
${e ? `
|
48
48
|
border-left: 1px solid ${o.GREY_2};
|
@@ -71,7 +71,7 @@ const g = t(i)(({ $topOffset: o }) => `
|
|
71
71
|
top: ${e + c}px;
|
72
72
|
z-index: 2;
|
73
73
|
min-height: ${r}${typeof r == "number" ? "px" : ""};
|
74
|
-
padding-bottom: ${
|
74
|
+
padding-bottom: ${p / 2}px;
|
75
75
|
background-color: ${o.colors.WHITE_70};
|
76
76
|
border-left: 1px solid ${o.colors.GREY_2};
|
77
77
|
border-right: 1px solid ${o.colors.GREY_2};
|
@@ -86,14 +86,14 @@ const g = t(i)(({ $topOffset: o }) => `
|
|
86
86
|
), W = t(i)`
|
87
87
|
position: absolute;
|
88
88
|
width: 100%;
|
89
|
-
bottom: ${
|
89
|
+
bottom: ${p}px;
|
90
90
|
left: 0;
|
91
|
-
`,
|
91
|
+
`, h = t(i)(({ theme: o }) => `
|
92
92
|
position: sticky;
|
93
93
|
top: 0;
|
94
94
|
left: 0;
|
95
95
|
z-index: ${o.zIndex.DESMOS_CALCULATOR};
|
96
|
-
`),
|
96
|
+
`), k = t(i)(
|
97
97
|
({ theme: o, $active: r }) => `
|
98
98
|
width: 36px;
|
99
99
|
height: 36px;
|
@@ -110,35 +110,26 @@ const g = t(i)(({ $topOffset: o }) => `
|
|
110
110
|
stroke: ${r ? o.colors.WHITE : o.colors.BLACK};
|
111
111
|
}
|
112
112
|
`
|
113
|
-
),
|
113
|
+
), A = t(i)`
|
114
114
|
position: absolute;
|
115
115
|
bottom: 8px;
|
116
|
-
right: -${
|
116
|
+
right: -${l}px;
|
117
117
|
align-items: center;
|
118
118
|
z-index: 1;
|
119
|
-
`, G = d`
|
120
|
-
div[role="dialog"][aria-label="Math Response Modal"] {
|
121
|
-
width: 405px !important; /* Set the desired width */
|
122
|
-
}
|
123
|
-
|
124
|
-
button.lds-flexible-container__trigger--resize {
|
125
|
-
visibility: hidden !important; /* Hide the resize button */
|
126
|
-
}
|
127
119
|
`;
|
128
120
|
export {
|
129
|
-
|
121
|
+
f as ActionbarContainer,
|
130
122
|
R as ActionbarWrapper,
|
131
123
|
T as BlockerWrapper,
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
y as StudentWorksheetSideBar,
|
124
|
+
h as DesmosCalcWrapper,
|
125
|
+
k as IconContainer,
|
126
|
+
_ as NavigationContainer,
|
127
|
+
I as NavigationWrapper,
|
128
|
+
g as NudgeBannerIcon,
|
129
|
+
$ as NudgeBannerWrapper,
|
130
|
+
E as QuestionsWrapper,
|
131
|
+
A as StudentWorksheetSideBar,
|
141
132
|
W as SummaryWrapper,
|
142
|
-
|
133
|
+
u as WorksheetContainer
|
143
134
|
};
|
144
135
|
//# sourceMappingURL=worksheet-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"worksheet-styled.js","sources":["../../../../src/features/worksheet/worksheet/worksheet-styled.tsx"],"sourcesContent":["import styled
|
1
|
+
{"version":3,"file":"worksheet-styled.js","sources":["../../../../src/features/worksheet/worksheet/worksheet-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../ui/layout/flex-view';\nimport {\n ACTION_BAR_HEIGHT,\n QUESTIONS_GAP,\n SIDEBAR_WIDTH,\n TOP_NAVIGATION_HEIGHT,\n WORKSHEET_CONTAINER_BORDER_RADIUS,\n} from './constants';\n\nconst NudgeBannerWrapper = styled(FlexView)<{ $topOffset: number }>(({ $topOffset }) => {\n return `\n position: sticky;\n top: ${$topOffset}px;\n z-index: 1;\n `;\n});\n\nconst NudgeBannerIcon = styled.div(({ theme }) => {\n const { colors } = theme;\n\n return `\n width: 16px;\n height: 16px;\n border-radius: 32px;\n border: 0.667px solid ${colors.BLACK_T_87}\n `;\n});\n\nconst WorksheetContainer = styled(FlexView)`\n position: relative;\n`;\n\ninterface IQuestionsWrapperProps {\n $actionbarHeight: number;\n $isCardView: boolean;\n}\n\nconst QuestionsWrapper = styled(FlexView)<IQuestionsWrapperProps>(\n ({ $isCardView, theme }) => `\n ${\n $isCardView\n ? `\n border-left: 1px solid ${theme.colors.GREY_2};\n border-right: 1px solid ${theme.colors.GREY_2};\n `\n : ''\n }\n padding-top: ${QUESTIONS_GAP}px;\n z-index: 0;\n`,\n);\n\nconst NavigationContainer = styled(FlexView)<{ $topOffset: number }>(\n ({ theme, $topOffset }) => `\n position: sticky;\n top: ${$topOffset}px;\n width: 100%;\n z-index: 1;\n justify-content: flex-end;\n background-color: ${theme.colors.WHITE};\n`,\n);\n\nconst NavigationWrapper = styled(FlexView)`\n border: 1px solid ${({ theme }) => theme.colors.GREY_2};\n border-top: 0px;\n border-radius: ${WORKSHEET_CONTAINER_BORDER_RADIUS}px ${WORKSHEET_CONTAINER_BORDER_RADIUS}px 0 0;\n overflow: hidden;\n`;\n\nconst ActionbarContainer = styled(FlexView)<{ $isCardView: boolean; $marginTop: string | number }>(\n ({ theme: { colors }, $height, $isCardView, $marginTop }) => `\n position: sticky;\n top: calc(100% - ${$height}px);\n margin-top: -${$marginTop}px;\n z-index: 1;\n ${\n $isCardView\n ? `\n border-left: 1px solid ${colors.GREY_2};\n border-right: 1px solid ${colors.GREY_2};\n `\n : ''\n }\n `,\n);\n\nconst ActionbarWrapper = styled(FlexView)<{ $isCardView: boolean }>(\n ({ theme: { colors }, $isCardView }) => `\n align-items: center;\n justify-content: center;\n align-self: center;\n background-color: ${colors.WHITE};\n border-top: 1px solid ${colors.GREY_2};\n ${\n $isCardView\n ? `\n border-left: 1px solid ${colors.GREY_2};\n border-right: 1px solid ${colors.GREY_2};\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n `\n : ''\n }\n `,\n);\n\ninterface IBlockerWrapperProps {\n $minHeight: number | string;\n $topOffset: number;\n}\n\nconst BlockerWrapper = styled(FlexView)<IBlockerWrapperProps>(\n ({ theme, $minHeight, $topOffset }) => `\n box-sizing: content-box;\n position: sticky;\n width: calc(100% - 2px);\n top: ${$topOffset + TOP_NAVIGATION_HEIGHT}px;\n z-index: 2;\n min-height: ${$minHeight}${typeof $minHeight === 'number' ? 'px' : ''};\n padding-bottom: ${ACTION_BAR_HEIGHT / 2}px;\n background-color: ${theme.colors.WHITE_70};\n border-left: 1px solid ${theme.colors.GREY_2};\n border-right: 1px solid ${theme.colors.GREY_2};\n backdrop-filter: blur(7px);\n align-items: center;\n justify-content: center;\n\n & * {\n box-sizing: border-box;\n }\n`,\n);\n\nconst SummaryWrapper = styled(FlexView)`\n position: absolute;\n width: 100%;\n bottom: ${ACTION_BAR_HEIGHT}px;\n left: 0;\n`;\n\nconst DesmosCalcWrapper = styled(FlexView)(({ theme }) => {\n return `\n position: sticky;\n top: 0;\n left: 0;\n z-index: ${theme.zIndex.DESMOS_CALCULATOR};\n `;\n});\n\nconst IconContainer = styled(FlexView)<{ $active: boolean }>(\n ({ theme, $active }) => `\n width: 36px;\n height: 36px;\n border-radius: 50%;\n &:hover {\n cursor: pointer;\n background-color: ${theme.colors.BLACK};\n svg path {\n stroke: ${theme.colors.WHITE};\n }\n }\n background-color: ${$active ? theme.colors.BLACK : theme.colors.WHITE};\n svg path {\n stroke: ${$active ? theme.colors.WHITE : theme.colors.BLACK};\n }\n`,\n);\n\nconst StudentWorksheetSideBar = styled(FlexView)`\n position: absolute;\n bottom: 8px;\n right: -${SIDEBAR_WIDTH}px;\n align-items: center;\n z-index: 1;\n`;\n\nexport {\n NudgeBannerWrapper,\n NudgeBannerIcon,\n WorksheetContainer,\n QuestionsWrapper,\n NavigationContainer,\n ActionbarContainer,\n NavigationWrapper,\n ActionbarWrapper,\n BlockerWrapper,\n SummaryWrapper,\n IconContainer,\n DesmosCalcWrapper,\n StudentWorksheetSideBar,\n};\n"],"names":["NudgeBannerWrapper","styled","FlexView","$topOffset","NudgeBannerIcon","theme","colors","WorksheetContainer","QuestionsWrapper","$isCardView","QUESTIONS_GAP","NavigationContainer","NavigationWrapper","WORKSHEET_CONTAINER_BORDER_RADIUS","ActionbarContainer","$height","$marginTop","ActionbarWrapper","BlockerWrapper","$minHeight","TOP_NAVIGATION_HEIGHT","ACTION_BAR_HEIGHT","SummaryWrapper","DesmosCalcWrapper","IconContainer","$active","StudentWorksheetSideBar","SIDEBAR_WIDTH"],"mappings":";;;AAWA,MAAMA,IAAqBC,EAAOC,CAAQ,EAA0B,CAAC,EAAE,YAAAC,QAC9D;AAAA;AAAA,WAEEA,CAAU;AAAA;AAAA,GAGpB,GAEKC,IAAkBH,EAAO,IAAI,CAAC,EAAE,OAAAI,QAAY;AAC1C,QAAA,EAAE,QAAAC,EAAW,IAAAD;AAEZ,SAAA;AAAA;AAAA;AAAA;AAAA,4BAImBC,EAAO,UAAU;AAAA;AAE7C,CAAC,GAEKC,IAAqBN,EAAOC,CAAQ;AAAA;AAAA,GASpCM,IAAmBP,EAAOC,CAAQ;AAAA,EACtC,CAAC,EAAE,aAAAO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