PageSourceSearch

https://www.adaptedmind.com/_next/static/chunks/pages/game-1b90f7a90fc71711.js

js adaptedmind.com collected 2026-10-01 12:07:43 UTC 296,376 bytes, 27 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5910],{1440:e=>{e.exports={container:"ImmersiveBigPet_container__4gSMt",hidden:"ImmersiveBigPet_hidden__qZFQx",initial:"ImmersiveBigPet_initial__w2Xsr",out:"ImmersiveBigPet_out__VbTj1",animateOutImmersiveBigPet:"ImmersiveBigPet_animateOutImmersiveBigPet__fq0nX",slide_left:"ImmersiveBigPet_slide_left__42uvH",animateInImmersiveBigPet:"ImmersiveBigPet_animateInImmersiveBigPet__kayus"}},3390:e=>{e.exports={button:"ReplayButton_button__3Ade4",image:"ReplayButton_image__T3Hgk"}},4226:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var a=n(55729);let s=()=>{let[e,t]=(0,a.useState)({height:0,width:0});return(0,a.useEffect)(()=>{function e(){t({height:window.innerHeight,width:window.innerWidth})}return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}},[]),{height:e.height,width:e.width}}},5573:(e,t,n)=>{"use strict";n.d(t,{C:()=>s});var a=n(36427);let s=({code:e,componentName:t,youtubeVideoID:n})=>{let s=(e=>{switch(e){case 2:return"Invalid YouTube video configuration.";case 5:return"The YouTube player could not play this video.";case 100:return"This YouTube video is no longer available.";case 101:case 150:case 152:case 153:return"This YouTube video is blocked from playing in the embedded player.";default:return`Unknown YouTube player error (${e??"no code"}).`}})(e),r=Error(`YouTube failed to load: ${s}`);a.A.error(r,{componentName:t,youtubeErrorCode:e??null,youtubeVideoID:n}),window.newrelic?.noticeError(r,{componentName:t,youtubeErrorCode:e??-1,youtubeVideoID:n})}},6334:(e,t,n)=>{"use strict";n.d(t,{p:()=>s});var a=n(55729);let s=()=>{let[e,t]=(0,a.useState)(0);return{clearPosition:()=>{t(0)},clickPosX:e,setPositionX:e=>{"number"==typeof e?t(e):t(e.clientX)}}}},6764:e=>{e.exports={container:"Tile_container__oqkU_",showPowerLevels:"Tile_showPowerLevels__2O3u4",blue:"Tile_blue__wK3fs",yellow:"Tile_yellow__KRrw7",gray:"Tile_gray__9qgW6",darkBlue:"Tile_darkBlue__ZFMRH"}},7284:e=>{e.exports={profileButtonContainer:"ProfileMenu_profileButtonContainer__meX2E",profileButton:"ProfileMenu_profileButton__Jp1y9",profileText:"ProfileMenu_profileText__rf4iS",monsterIconSharedStyles:"ProfileMenu_monsterIconSharedStyles__LsC0D",profileMonsterIconDropShadow:"ProfileMenu_profileMonsterIconDropShadow__t4EgN",profileMonsterIcon:"ProfileMenu_profileMonsterIcon__fv00l",profileMonsterIconInner:"ProfileMenu_profileMonsterIconInner__C38Uu",profileDropdown:"ProfileMenu_profileDropdown__4dzhX",dropdownContent:"ProfileMenu_dropdownContent__OdrKL",listContainer:"ProfileMenu_listContainer__i0pqe",listContainerMaxHeight:"ProfileMenu_listContainerMaxHeight__z3phK",listItem:"ProfileMenu_listItem__h9AYI",listItemIcon:"ProfileMenu_listItemIcon__YvM0t",listItemMonsterIcon:"ProfileMenu_listItemMonsterIcon__QtRlZ",listItemMonsterIconInner:"ProfileMenu_listItemMonsterIconInner__ynVZD",listItemIconImage:"ProfileMenu_listItemIconImage__Be9Bd",listItemText:"ProfileMenu_listItemText__4fe0p",menuDivider:"ProfileMenu_menuDivider__9ROh7"}},8986:e=>{e.exports={container:"ParentsOnlyModal_container__sKpKA",modal:"ParentsOnlyModal_modal__M3lJx",panel:"ParentsOnlyModal_panel__sNuHi",closeButton:"ParentsOnlyModal_closeButton__PVZJQ",headerBand:"ParentsOnlyModal_headerBand__P_5y0",titlePlate:"ParentsOnlyModal_titlePlate__vxf55",body:"ParentsOnlyModal_body__9UAiI",subtitle:"ParentsOnlyModal_subtitle__RNj2u",digitEntry:"ParentsOnlyModal_digitEntry__eSTi8",digitBox:"ParentsOnlyModal_digitBox__fDuaV",filledDigitBox:"ParentsOnlyModal_filledDigitBox__kayTt",activeDigitBox:"ParentsOnlyModal_activeDigitBox__7iOoZ",footer:"ParentsOnlyModal_footer__eunWN",error:"ParentsOnlyModal_error__U7_dh",hiddenInput:"ParentsOnlyModal_hiddenInput__y6TG2"}},10507:e=>{e.exports={storeButtonContainer:"SubjectRightColumn_storeButtonContainer__ZfyD9",gemScoreboard:"SubjectRightColumn_gemScoreboard__g9bev",incentiveBtnsContainer:"SubjectRightColumn_incentiveBtnsContainer__l4LjQ",cta:"SubjectRightColumn_cta__LrX9B",transparent:"SubjectRightColumn_transparent__vQLx4",petDoor:"SubjectRightColumn_petDoor__h_d2x",petGameCta:"SubjectRightColumn_petGameCta__Ytm4z"}},10569:e=>{e.exports={replayButtonContainer:"VideoProblemExplanation_replayButtonContainer__s4Yl7",container:"VideoProblemExplanation_container__oi8pO",displayNone:"VideoProblemExplanation_displayNone__Tko9y"}},11129:e=>{e.exports={textProblemContainer:"SubjectMath_textProblemContainer__19d8i"}}
1,11439:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(6029),s=n(22577),r=n(12683),i=n.n(r);let l=({justPurchasedItemID:e,offsetX:t,offsetY:n,opaqueShadow:r,studentMonster:l,width:o})=>{if(!l)return null;let c="https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/imagesprodold/makernew",{body:d,color:u,eyes:_,headpart:m,mouth:p,pattern:v}={body:l.body_monster_part.prefix_url,color:l.color_monster_part.prefix_url,eyes:l.eyes_monster_part.prefix_url,headpart:l.headpart_monster_part.prefix_url,mouth:l.mouth_monster_part.prefix_url,pattern:l.pattern_monster_part.prefix_url},h=(l?.student_monster_items?.filter(e=>e.monster_item.subject_id===s.pN.MATH&&"outfit"===e.monster_item.type&&e.is_shown&&e.metadata.position>0&&e.metadata.position<5)??[].sort((e,t)=>e.metadata.position===t.metadata.position?e.monster_item.cost-t.monster_item.cost:e.metadata.position-t.metadata.position)).map(t=>(0,a.jsx)("div",{className:`${i().studentMonsterOutfit} ${e===t.id?i().outfitJustPurchased:""}`,children:(0,a.jsx)("img",{className:i().studentMonsterOutfitImage,src:`https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/plato/incentives/outfits/outfit_${t.monster_item.legacy_id}_m_${l.body_monster_part.legacy_number}.png`})},t.id)),b={alignItems:"center",aspectRatio:"38/47",display:"flex",justifyContent:"center",position:"absolute",width:o};return t&&(b.left=t),n&&(b.top=n),(0,a.jsx)("div",{className:i().monsterParts,children:(0,a.jsxs)("div",{style:b,children:[(0,a.jsx)("img",{className:`${i().shadowImg} ${r?i().opaqueShadow:""}`,src:"https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/mathflow/images/pmemberang/monster-maker/part/1-shadow.png"}),(0,a.jsx)("img",{className:i().partImgStyle,src:`${c}/${d}_${u}.png`}),(0,a.jsx)("img",{className:i().partImgStyle,src:`${c}/${d}_${v}.png`}),(0,a.jsx)("img",{className:i().partImgStyle,src:`${c}/${p}.png`}),(0,a.jsx)("img",{className:i().partImgStyle,src:`${c}/${_}.png`}),(0,a.jsx)("img",{className:i().partImgStyle,src:`${c}/${m}.png`}),h]})})}},12357:e=>{e.exports={key:"Key_key__zn1xQ",keyContainer:"Key_keyContainer__X5HBC",keyValue:"Key_keyValue__wpCrj"}},12635:e=>{e.exports={container:"VocabularyModal_container___ojlQ",vocabColumn:"VocabularyModal_vocabColumn__Q51XS",definitionColumn:"VocabularyModal_definitionColumn__a2tSJ",definitionContentContainer:"VocabularyModal_definitionContentContainer__8nOnd",definitionSection:"VocabularyModal_definitionSection__X1NUR",word:"VocabularyModal_word__vt4b_",vocabTab:"VocabularyModal_vocabTab__OTrDd",unlocked:"VocabularyModal_unlocked__vW5xx",curSelected:"VocabularyModal_curSelected__6tl2V",largeAudioButton:"VocabularyModal_largeAudioButton__eheL_",smallAudioButton:"VocabularyModal_smallAudioButton__BtS7s",subheader:"VocabularyModal_subheader__PAcfQ",content:"VocabularyModal_content___1r2z"}},12683:e=>{e.exports={studentMonsterOutfit:"StudentMonsterV2_studentMonsterOutfit__ekHjt",studentMonsterOutfitImage:"StudentMonsterV2_studentMonsterOutfitImage__gh5CI",outfitPosition:"StudentMonsterV2_outfitPosition__eDBA2",monsterParts:"StudentMonsterV2_monsterParts__WYSNq",outfitJustPurchased:"StudentMonsterV2_outfitJustPurchased__gQsD1",expandBounce:"StudentMonsterV2_expandBounce__8qHuR",partImgStyle:"StudentMonsterV2_partImgStyle__afyyq",shadowImg:"StudentMonsterV2_shadowImg__HvlId",opaqueShadow:"StudentMonsterV2_opaqueShadow__TmFAB"}},14712:e=>{e.exports={container:"AnimationLayer_container__5QppM",layer:"AnimationLayer_layer__FC74o"}},15496:e=>{e.exports={closeButton:"CloseButton_closeButton__0_D5V",x:"CloseButton_x__0T08J"}},15966:e=>{e.exports={container:"PositioningControls_container__ZwiAi",controls:"PositioningControls_controls__YP6L5",section:"PositioningControls_section__ComlE",label:"PositioningControls_label__3PU1N",dpad:"PositioningControls_dpad__2NE38",dpadMiddle:"PositioningControls_dpadMiddle__OVKL2",dpadButton:"PositioningControls_dpadButton__LU_ap",scaleButtons:"PositioningControls_scaleButtons__267_y",scaleButton:"PositioningControls_scaleButton__GMxme",values:"PositioningControls_values__nyARb",valueRow:"PositioningControls_valueRow__sbDE7",valueName:"PositioningControls_valueName__VIr7B",valueNumber:"PositioningControls_valueNumber___Cd2w",copyButton:"PositioningControls_copyButton__5DlP_",levelInput:"PositioningControls_levelInput__Yp3L4"}},16220:e=>{e.exports={pointer:"TutorialPointer_pointer__fuUSP",fadeIn:"TutorialPointer_fadeIn__L0I91",bounce:"TutorialPointer_bounce__c6Y4p",fadesOut:"TutorialPointer_fadesOut__GODRU",fadeOut:"TutorialPointer_fadeOut__eMayb"}},16280:e=>{e.exports={container:"PetDoor_container__GyLJx",image:"PetDoor_image__9ja9y",petCount:"PetDoor_petCount__WuDjn",petDoorAnimate:"PetDoor_petDoorAnimate__d_uJV",hidden:"PetDoor_hidden__QPD_r"}},16505:e=>{e.exports={outerWrapper:"VideoProblemTitleBox_outerWrapper__Y2H0h",o
1paque:"VideoProblemTitleBox_opaque__YBkvy",container:"VideoProblemTitleBox_container__osnCe",title:"VideoProblemTitleBox_title__brnBw",buttonPosition:"VideoProblemTitleBox_buttonPosition__4vB3O",placeholder:"VideoProblemTitleBox_placeholder__PcSmX",audioButtonContainer:"VideoProblemTitleBox_audioButtonContainer__pxFWE",pauseIcon:"VideoProblemTitleBox_pauseIcon__zwmpo"}},16644:e=>{e.exports={header:"Header_header__fqNg9",title:"Header_title__rSw0R",subtitle:"Header_subtitle__vxw16"}},17482:e=>{e.exports={powerLevelTileContainer:"PowerLevelTile_powerLevelTileContainer__kUaQu",power:"PowerLevelTile_power__44y7x",powerNumber:"PowerLevelTile_powerNumber__WnuhD",tutorialPointer:"PowerLevelTile_tutorialPointer__nfmIH",lockIcon:"PowerLevelTile_lockIcon__ayFig"}},21323:e=>{e.exports={container:"VideoChoiceOptions_container__jg0Tf",videoChoice:"VideoChoiceOptions_videoChoice__pybJ_"}},23512:e=>{e.exports={container:"FeedbackModal_container__Z16Zt",modal:"FeedbackModal_modal__5oXNi",title:"FeedbackModal_title__RlzBi",buttons:"FeedbackModal_buttons__ljY6F",button:"FeedbackModal_button__HHrU5",narry:"FeedbackModal_narry__OoqaY",closeButton:"FeedbackModal_closeButton__wJF47"}},24432:e=>{e.exports={handIndicator:"Gem_handIndicator__rmlVB",gemOuter:"Gem_gemOuter__Q1ksr",gem:"Gem_gem__p3JBu",gemInner:"Gem_gemInner__fWEq5",gemScale:"Gem_gemScale__2SFD8",onProgressBar:"Gem_onProgressBar___7_n4",gemBounce:"Gem_gemBounce__GL5Tl",gemOpacity:"Gem_gemOpacity__TsCLt",offProgressBar:"Gem_offProgressBar__LiO1W",gemOffProgressBarBounce:"Gem_gemOffProgressBarBounce__pRlyg",gemOffProgressBarOpacity:"Gem_gemOffProgressBarOpacity__59OSc",gemImage:"Gem_gemImage__EFeu1"}},24476:e=>{e.exports={blur:"Scrim_blur__Bbhum",blurVisible:"Scrim_blurVisible__GJcJ2",blurIn:"Scrim_blurIn__ceAOy",blurOut:"Scrim_blurOut__yUTvN"}},25616:e=>{e.exports={mapGameContainerMinHeight:"AllPetsOverlay_mapGameContainerMinHeight__fGRB_",allPetsPetsOuterContainer:"AllPetsOverlay_allPetsPetsOuterContainer__5nHNm",headerContainer:"AllPetsOverlay_headerContainer__MVvhB",allPetsPetInnerContainer:"AllPetsOverlay_allPetsPetInnerContainer__Hr6_9",allPetsPet:"AllPetsOverlay_allPetsPet__dcVG0",allPetsQuestionMark:"AllPetsOverlay_allPetsQuestionMark__0BH8k",allPetsPetNameText:"AllPetsOverlay_allPetsPetNameText__asQRh",allPetsPetPowerNumber:"AllPetsOverlay_allPetsPetPowerNumber__UhTFy",allPetsPetNameWoodPlack:"AllPetsOverlay_allPetsPetNameWoodPlack__r1LAh",allPetsPetQuestionMark:"AllPetsOverlay_allPetsPetQuestionMark__B7uD0",allPetsPetPowerIcon:"AllPetsOverlay_allPetsPetPowerIcon__dt5cK",allPetsPetPluse:"AllPetsOverlay_allPetsPetPluse__YMkgH",funExpand:"AllPetsOverlay_funExpand__t_MUe",primaryText:"AllPetsOverlay_primaryText__dKnAK",blueStripedHeader:"AllPetsOverlay_blueStripedHeader__D6NAs",closeButtonContainer:"AllPetsOverlay_closeButtonContainer__f4Paz",nonResponsiveHeadlineTopBlueStripedHeaderText:"AllPetsOverlay_nonResponsiveHeadlineTopBlueStripedHeaderText__EEh52",nonResponsiveHeadlineTopBlueStripedHeaderTwoRowsTop:"AllPetsOverlay_nonResponsiveHeadlineTopBlueStripedHeaderTwoRowsTop__3kLZS",nonResponsiveHeadlineTopBlueStripedHeaderTwoRowsBottom:"AllPetsOverlay_nonResponsiveHeadlineTopBlueStripedHeaderTwoRowsBottom__zliAQ",modal:"AllPetsOverlay_modal__UoOrP",modalCloseImage:"AllPetsOverlay_modalCloseImage__RDQnm",clickExpand:"AllPetsOverlay_clickExpand__p5k0H"}},26644:e=>{e.exports={container:"BookPartReviewOverlay_container__BoXZV",closeButtonContainer:"BookPartReviewOverlay_closeButtonContainer__8qyNA",column:"BookPartReviewOverlay_column__NmdBU",bookPageContainer:"BookPartReviewOverlay_bookPageContainer__hPAVA",leftColumn:"BookPartReviewOverlay_leftColumn__DOIOX",rightColumn:"BookPartReviewOverlay_rightColumn__NDKDn"}},27138:e=>{e.exports={container:"MultipleChoiceQuiz_container__18SLQ",innerContainer:"MultipleChoiceQuiz_innerContainer__C5ZKT",questionText:"MultipleChoiceQuiz_questionText__o0r2W",options:"MultipleChoiceQuiz_options__Tn8T6",questionContainer:"MultipleChoiceQuiz_questionContainer__EgYPq",audioButton:"MultipleChoiceQuiz_audioButton__Ld6Fm"}},28123:(e,t,n)=>{"use strict";n.d(t,{q:()=>s});var a=n(55729);let s=()=>{(0,a.useEffect)(()=>{let e=e=>{e.persisted&&window.location.reload()};return window.addEventListener("pageshow",e),()=>{window.removeEventListener("pageshow",e)}},[])}},28881:e=>{e.exports={rightButtonsColumn:"IncentivesRightNav_rightButtonsColumn__4pkMi",outfitRoomButtonContainer:"IncentivesRightNav_outfitRoomButtonContainer__h4BWf",primaryCTAContainer:"IncentivesRightNav_primaryCTAContainer__PZLAD"}},30948:e=>{e.exports={videoContainer:"YouTubeReactPlayer_videoContainer__knzRj",playButton:"YouTubeReactPlayer_playButton__Vg4m9",transparent:"YouTubeReactPlayer_transparent__0Z1gV",y
1outubePlayer:"YouTubeReactPlayer_youtubePlayer__QWGDV"}},31278:e=>{e.exports={audioContainer:"PetPartButton_audioContainer__EraZm",buttonImage:"PetPartButton_buttonImage__uhJzQ"}},31987:e=>{e.exports={readingBookButton:"ReadingBookButton_readingBookButton__ew0v6",readingBookIcon:"ReadingBookButton_readingBookIcon__KqhGL"}},31992:e=>{e.exports={containerWardrobeOuterPadding:"WardrobeBox_containerWardrobeOuterPadding__cbxkY",wardrobe:"WardrobeBox_wardrobe__JD2Ul",wardrobeBox:"WardrobeBox_wardrobeBox__HZ_mP",wardrobeBoxLeft:"WardrobeBox_wardrobeBoxLeft__qKZFr",wardrobeBoxLeftActive:"WardrobeBox_wardrobeBoxLeftActive__RkHvH",wardrobeBoxLeftInactive:"WardrobeBox_wardrobeBoxLeftInactive__jAqfV",wardrobeBoxRight:"WardrobeBox_wardrobeBoxRight__0x5oY",wardrobeBoxRightActive:"WardrobeBox_wardrobeBoxRightActive__d73Ay",wardrobeBoxRightInactive:"WardrobeBox_wardrobeBoxRightInactive__guBx_",showItem:"WardrobeBox_showItem__4LTpG",showItemImg:"WardrobeBox_showItemImg__OLAPy"}},32787:e=>{e.exports={backspaceContainer:"BackspaceKey_backspaceContainer__iLWqJ",eraserIcon:"BackspaceKey_eraserIcon__9GD86",backspaceKey:"BackspaceKey_backspaceKey__ll5PP"}},33856:e=>{e.exports={container:"MultiChoiceOption_container__FSkCo",selected:"MultiChoiceOption_selected__R6cBQ",incorrect:"MultiChoiceOption_incorrect__Apcrb",correct:"MultiChoiceOption_correct__Gdi9S",letterContainer:"MultiChoiceOption_letterContainer__seqjp",audioButton:"MultiChoiceOption_audioButton__Ke3IJ",textContainer:"MultiChoiceOption_textContainer__MGUBJ"}},34179:e=>{e.exports={videoContainer:"SubjectSocialStudies_videoContainer__2zlBX"}},36484:e=>{e.exports={container:"GemScoreboardRight_container__pPUys",pill:"GemScoreboardRight_pill__SwLOG",gemCount:"GemScoreboardRight_gemCount__spMC9",gem:"GemScoreboardRight_gem__mI3KZ"}},36880:e=>{e.exports={container:"PregameSequence_container__lHSoS"}},37060:e=>{e.exports={outerGrid:"TimeLimitReachedModal_outerGrid__lRwcz",leftColumn:"TimeLimitReachedModal_leftColumn__mkt0D",rightColumn:"TimeLimitReachedModal_rightColumn__gTeyv",centerColumn:"TimeLimitReachedModal_centerColumn__QYUTU",profileMenuContainer:"TimeLimitReachedModal_profileMenuContainer__ieP0k",loading:"TimeLimitReachedModal_loading__G68zC",error:"TimeLimitReachedModal_error__dsEBa",modalContainer:"TimeLimitReachedModal_modalContainer__LuPfb",modal:"TimeLimitReachedModal_modal__iRRR5",primaryText:"TimeLimitReachedModal_primaryText__YzhLI",secondaryText:"TimeLimitReachedModal_secondaryText__zHHj6",addMoreTimeButton:"TimeLimitReachedModal_addMoreTimeButton__iyxP9"}},39236:e=>{e.exports={backgroundImage:"SelectStudent_backgroundImage__8Txsz",SelectStudent:"SelectStudent_SelectStudent__s3gvU",carousel:"SelectStudent_carousel__jhWIw",slide:"SelectStudent_slide__2QU_a",nonCarouselContainer:"SelectStudent_nonCarouselContainer__ix9UU",card:"SelectStudent_card__zzWt8",cardThumbnail:"SelectStudent_cardThumbnail__kS0kW",cardTitleSection:"SelectStudent_cardTitleSection__J3Gbo",cardTitle:"SelectStudent_cardTitle__LytZM",additionalCTAsSection:"SelectStudent_additionalCTAsSection__kAYgp",additionalCTA:"SelectStudent_additionalCTA__883FA",additionalCTAIcon:"SelectStudent_additionalCTAIcon__ML4Nv"}},40404:e=>{e.exports={container:"SelectSubjectLesson_container__hpgNw",header:"SelectSubjectLesson_header__padds",tabContainer:"SelectSubjectLesson_tabContainer__FwWw_",tab:"SelectSubjectLesson_tab__vze23",tabActive:"SelectSubjectLesson_tabActive__Afllp",tabIcon:"SelectSubjectLesson_tabIcon__9hCKw",tabLabel:"SelectSubjectLesson_tabLabel__0CPVi",gridContainer:"SelectSubjectLesson_gridContainer__Uq2Wq",loadingState:"SelectSubjectLesson_loadingState__X_DU3",backgroundMap:"SelectSubjectLesson_backgroundMap__6007G"}},41230:e=>{e.exports={container:"CircleButton_container__NV1EP",primary:"CircleButton_primary__SMmjI",secondary:"CircleButton_secondary__fy9bJ",active:"CircleButton_active__oNdB4",tertiary:"CircleButton_tertiary__7qSpU",explanation:"CircleButton_explanation__kXZZ9",icon:"CircleButton_icon__vEWV2"}},41597:e=>{e.exports={videoContainer:"SubjectSuperSkills_videoContainer__7Z3kv",stateActions:"SubjectSuperSkills_stateActions__3U4ls",stateAction:"SubjectSuperSkills_stateAction__AX0xf",stateActionAudio:"SubjectSuperSkills_stateActionAudio__h2tTL"}},43559:e=>{e.exports={container:"SelectableImageAnswers_container__Ytal1"}},45338:e=>{e.exports={flexContainer:"PetPartsGrid_flexContainer__r4JPE",showPowerLevels:"PetPartsGrid_showPowerLevels__FijEF",flexRow:"PetPartsGrid_flexRow__IvU_r",lockedSquare:"PetPartsGrid_lockedSquare__XsLYC",lockIconImage:"PetPartsGrid_lockIconImage__2QE5r"}},46008:e=>{e.exports={container:"AudioButton_container__MMn7f",audioBtn:"AudioButton_audio
1Btn__1JgC0"}},46259:e=>{e.exports={incorrectExplanationCount:"IncorrectStaticContainer_incorrectExplanationCount__q8CnQ",incorrectExplanationCountElement:"IncorrectStaticContainer_incorrectExplanationCountElement__VsPBP",incorrectElementText:"IncorrectStaticContainer_incorrectElementText__jHmAX",incorrectElementTextWhite:"IncorrectStaticContainer_incorrectElementTextWhite__jRgo1",incorrectElementTextBlack:"IncorrectStaticContainer_incorrectElementTextBlack__KJYrT",firstExplanationArrow:"IncorrectStaticContainer_firstExplanationArrow__HffR3","arrow-bobbing-down-math":"IncorrectStaticContainer_arrow-bobbing-down-math__mNM7w"}},46500:e=>{e.exports={container:"ComplimentText_container__i7B_B",compliment:"ComplimentText_compliment__7Twwp","compliment-show":"ComplimentText_compliment-show__6z_Me"}},48012:(e,t,n)=>{"use strict";n.d(t,{F:()=>s});var a=n(55729);let s=(e,t)=>{switch(e.question_type){case"BLNK":case"VIDEO_BLNK":return t.answer_data?.join(",")||"";case"M":case"VIDEO_M":{let n=e.answers.find(e=>e.id===t.answer_id);if(!n)return"";if(!n.image_url)return n.answer_text;return a.createElement("img",{alt:n.answer_text||"Answer image",src:n.image_url,style:{height:"93%",objectFit:"contain",width:"100%"}})}case"VIDEO_TEXT_INSIDE":case"VIDEO_TEXT_OUTSIDE":return[...e.answers].sort((e,t)=>e.order-t.order).map(e=>t.multiple_answers?.[e.id]||"").join(",");default:return""}}},48022:e=>{e.exports={container:"Game_container__nUpI5",debugPanel:"Game_debugPanel__G7Ws2"}},49239:e=>{e.exports={section:"SubjectGrids_section__L22Rs",sectionTitle:"SubjectGrids_sectionTitle__GQ78X",grid:"SubjectGrids_grid__TuWEC",gridRow:"SubjectGrids_gridRow__loVPn",cardWrapperFull:"SubjectGrids_cardWrapperFull__2qOm_",cardWrapperLarge:"SubjectGrids_cardWrapperLarge__vB_mU",cardWrapperSmall:"SubjectGrids_cardWrapperSmall__Y7r2O",card:"SubjectGrids_card__F_YsA",cardImageWrapper:"SubjectGrids_cardImageWrapper__03a9t",cardImage:"SubjectGrids_cardImage___14H8",readingBookPartCardImage:"SubjectGrids_readingBookPartCardImage__wCU21",cardTitle:"SubjectGrids_cardTitle__BWKke",statusIconWrapper:"SubjectGrids_statusIconWrapper__uNEAS",statusIconBase:"SubjectGrids_statusIconBase__8if6t",pretestTooltip:"SubjectGrids_pretestTooltip__ny7PI",upNextCard:"SubjectGrids_upNextCard__7tGQi",smartPracticeSection:"SubjectGrids_smartPracticeSection__UeqXc",cardFull:"SubjectGrids_cardFull__KQhpS",cardFullImage:"SubjectGrids_cardFullImage__J5Ha6",cardFullContent:"SubjectGrids_cardFullContent__Cx_T6",cardFullInnerBox:"SubjectGrids_cardFullInnerBox__QAOUS",cardFullTitle:"SubjectGrids_cardFullTitle__8caVd",cardFullDescription:"SubjectGrids_cardFullDescription__qYICg",cardFullButton:"SubjectGrids_cardFullButton__YHwh6",scrollContainer:"SubjectGrids_scrollContainer__5ak73",skillGroup:"SubjectGrids_skillGroup__5p0ua",skillGroupTitle:"SubjectGrids_skillGroupTitle__2_fkA",topPicksFeatured:"SubjectGrids_topPicksFeatured__y0dqS",topPicksGrid:"SubjectGrids_topPicksGrid__Vd64n",emptyState:"SubjectGrids_emptyState__VYnGe",progressBarContainer:"SubjectGrids_progressBarContainer__KRoYL",progressBarSocket:"SubjectGrids_progressBarSocket__iVW7M",progressBarFiller:"SubjectGrids_progressBarFiller__yP2_T",progressBarDivider:"SubjectGrids_progressBarDivider__ZKzG7"}},51352:e=>{e.exports={container:"LearningContainer_container__1k7et",explanation:"LearningContainer_explanation__FSxaI",innerContainer:"LearningContainer_innerContainer___P2LV",auto:"LearningContainer_auto__PmBOB"}},52479:e=>{e.exports={container:"TextInsideInputs_container__0p9m8",input:"TextInsideInputs_input__uJd3_"}},53222:e=>{e.exports={container:"PetPowerUpButton_container___3af2",isDisabled:"PetPowerUpButton_isDisabled__lPdAv",gemContainer:"PetPowerUpButton_gemContainer__0griC",costBubble:"PetPowerUpButton_costBubble___o8t7",gem:"PetPowerUpButton_gem___qLEA",tutorialPointer:"PetPowerUpButton_tutorialPointer__Bmp_g",withTutorial:"PetPowerUpButton_withTutorial__unQ0I"}},54012:e=>{e.exports={container:"RiveRunningMonsters_container___yykt",riveContainer:"RiveRunningMonsters_riveContainer__JlH3H",riveWrapper:"RiveRunningMonsters_riveWrapper__qd0ez","slide-through":"RiveRunningMonsters_slide-through___2Ma9",riveCanvas:"RiveRunningMonsters_riveCanvas__iHMA_",monsterOverlay:"RiveRunningMonsters_monsterOverlay__y3ilT",petOverlay:"RiveRunningMonsters_petOverlay__UzDUd","synced-animation":"RiveRunningMonsters_synced-animation__x30Au","synced-pet-animation":"RiveRunningMonsters_synced-pet-animation__yrsZG"}}
1,55012:(e,t,n)=>{"use strict";n.d(t,{p:()=>r});var a=n(55729),s=n(4226);let r=(e=2)=>{let{width:t}=(0,s.l)(),[n,r]=(0,a.useState)(0),[i,l]=(0,a.useState)(0),[o,c]=(0,a.useState)(0);return(0,a.useEffect)(()=>{t&&(r(t*e),console.log("what is this "))},[t,e]),{mapPosition:i,mapPositionRelative:o,setMapPosition:a=>{let s=n-t;l(n=>{let r=a-t/2,i=n+r<0?0:Math.min(n+r,s);return c(i/(t*e)*100),i})}}}},55251:e=>{e.exports={stateContainer:"Episode11CustomSelection_stateContainer__XXeK6",episode11CustomButton:"Episode11CustomSelection_episode11CustomButton__GgqmG",episode11CustomButton1:"Episode11CustomSelection_episode11CustomButton1__4Lt0Q",episode11CustomButton2:"Episode11CustomSelection_episode11CustomButton2__vVIjp",episode11CustomButton3:"Episode11CustomSelection_episode11CustomButton3__aF7uZ",episode11CustomButton4:"Episode11CustomSelection_episode11CustomButton4__1z9SM",episode11CustomButton5:"Episode11CustomSelection_episode11CustomButton5__0scFQ",episode11CheckButton:"Episode11CustomSelection_episode11CheckButton__qdj4Y"}},55702:e=>{e.exports={container:"MathLearnOverlay_container__hijZW",closeButtonContainer:"MathLearnOverlay_closeButtonContainer__hRVRx",column:"MathLearnOverlay_column__4oeKi",learningContentContainer:"MathLearnOverlay_learningContentContainer__f8gnR",leftColumn:"MathLearnOverlay_leftColumn__lAmWV",videoExplanation:"MathLearnOverlay_videoExplanation__cRqsd",videoOverlay:"MathLearnOverlay_videoOverlay__lgylO",show:"MathLearnOverlay_show__CzIkZ",videoPlayButton:"MathLearnOverlay_videoPlayButton__98hxC"}},56356:e=>{e.exports={gem:"EarnedGemsAnimation_gem__R_xas",moveGem:"EarnedGemsAnimation_moveGem__9dQP1",gemCount:"EarnedGemsAnimation_gemCount__FzKc_",moveGemsToAdd:"EarnedGemsAnimation_moveGemsToAdd__WQo7H"}},58103:e=>{e.exports={learningContainer:"SubjectReadingBookPart_learningContainer__b8lYq"}},59420:e=>{e.exports={container:"PetCustomizer_container__MKyRj",topRow:"PetCustomizer_topRow___apyD",gemScoreboardRightContainer:"PetCustomizer_gemScoreboardRightContainer___yL9z",petDoorContainer:"PetCustomizer_petDoorContainer__ZxDjr",powerLevelText:"PetCustomizer_powerLevelText__BU_FC",pet:"PetCustomizer_pet__AFOUO",ctaContainer:"PetCustomizer_ctaContainer__q1GN7",checkmarkTutorialPointer:"PetCustomizer_checkmarkTutorialPointer__jen8y",petGridContainerRow:"PetCustomizer_petGridContainerRow___XEUE",petGridContainer:"PetCustomizer_petGridContainer__VI4SH",withPowerUps:"PetCustomizer_withPowerUps__o4110",withMaxPowerUp:"PetCustomizer_withMaxPowerUp__KWPEB",withTutorial:"PetCustomizer_withTutorial__GuyLm",withPetDoor:"PetCustomizer_withPetDoor__8uR1g"}},59428:e=>{e.exports={wrapper:"LeftCTA_wrapper___58cs",button:"LeftCTA_button__zXsCz",icon:"LeftCTA_icon__uGFyl"}},59684:e=>{e.exports={container:"Keyboard_container__ttVSN",keyGrid:"Keyboard_keyGrid__gdEf0",numericKeyGrid:"Keyboard_numericKeyGrid__PL9QH",symbolsKeyGrid:"Keyboard_symbolsKeyGrid__OM6R1",alphaKeyGrid:"Keyboard_alphaKeyGrid__T1bME",numericSymbolsKeyGrid:"Keyboard_numericSymbolsKeyGrid__ELw_O",animateInKeyboard:"Keyboard_animateInKeyboard__YL64Z"}},61200:e=>{e.exports={overlay:"Overlay_overlay__Ldho1"}},61604:e=>{e.exports={incentivesPanelContainer:"IncentivesPanels_incentivesPanelContainer__CU5IC",monsterAndPurchaseOutfitAnimationContainer:"IncentivesPanels_monsterAndPurchaseOutfitAnimationContainer__2Xcfm",topRow:"IncentivesPanels_topRow__zR89C",gemScoreboardRightContainer:"IncentivesPanels_gemScoreboardRightContainer__n0Ta_",bottomRow:"IncentivesPanels_bottomRow__RaGnZ",withStore:"IncentivesPanels_withStore__TS_kA",monster:"IncentivesPanels_monster__cKGX7",defaultButton:"IncentivesPanels_defaultButton__RKkBc",monsterPurchasedOutfitAnimation:"IncentivesPanels_monsterPurchasedOutfitAnimation__URYQm",fadeOut:"IncentivesPanels_fadeOut__JDtBt",monsterPurchasedOutfitAnimationSparkles1:"IncentivesPanels_monsterPurchasedOutfitAnimationSparkles1__qdfOy",monsterPurchasedOutfitAnimationSparkles2:"IncentivesPanels_monsterPurchasedOutfitAnimationSparkles2__yuNgJ",wardrobePlatformImg:"IncentivesPanels_wardrobePlatformImg__xsQ6i",hidden:"IncentivesPanels_hidden__J1KbU"}},62392:e=>{e.exports={studentMonsterOnMap:"MapMonster_studentMonsterOnMap__M4dtg",animateStudentMonsterOnMap:"MapMonster_animateStudentMonsterOnMap__capyq",studentMonsterOffMap:"MapMonster_studentMonsterOffMap__Aoiax",animateStudentMonsterOffMap:"MapMonster_animateStudentMonsterOffMap__u_Hze"}},63084:(e,t,n)=>{"use strict";n.d(t,{f:()=>r});var a=n(55729),s=n(4226);let r=(e=2)=>{let{width:t}=(0,s.l)(),[n,r]=(0,a.useState)(0),[i,l]=(0,a.useState)(0);return(0,a.useEffect)(()=>{t&&r(t*e)},[t,e]),{monsterPosition:i,setMonsterPosition:(e,t)=>{let a=n-(t??0);l(()=>e>a?a:e)}}}},63291:e=>{e.exports={tabsContent:"ExplanationTabsContent_tabsContent__SU77j",contentVideo:"ExplanationTabsContent_contentVideo__3M6TE",show:"ExplanationTabsContent_show__MyUb4",videoExplanation:"ExplanationTabsContent_videoExplanation__wqWfB",videoOverlay:"ExplanationTabsContent_videoOverlay__Zobq_",videoPlayButton:"ExplanationTabsContent_videoPlayButton__2qesm",contentText:"ExplanationTabsContent_contentText__5epd_",correctAnswer:"ExplanationTabsContent_correctAnswer__7Yhfl"}},63525:e=>{e.exports={closeButtonContainer:"SubjectLeftColumn_closeButtonContainer__ijzGe",cta:"SubjectLeftColumn_cta__9hR24",transparent:"SubjectLeftColumn_transparent__8L_OJ",additionalButtonsContainer:"SubjectLeftColumn_additionalButtonsContainer__nWSjY"}},63830:e=>{e.exports={header:"ModalHeader_header__8PTvU",powerLevelIcon:"ModalHeader_powerLevelIcon__uF0J5",subHeader:"ModalHeader_subHeader__RLzm1",maxLevelText:"ModalHeader_maxLevelText__xVMGh"}},64724:e=>{e.exports={scrollbar:"CustomScrollbar_scrollbar__xbgvU",scrollbarPadded:"CustomScrollbar_scrollbarPadded__Nmxzh",button:"CustomScrollbar_button__sEU2n",upButton:"CustomScrollbar_upButton__VRhi_",hidden:"CustomScrollbar_hidden__DE5Of"}},66529:e=>{e.exports={gridContainer:"SubjectLayout_gridContainer__B54LG",hiddenGrid:"SubjectLayout_hiddenGrid__mORJZ",centerColumnGrid:"SubjectLayout_centerColumnGrid__VmeKT",noKeyboard:"SubjectLayout_noKeyboard__2LMgG",rightColumn:"SubjectLayout_right
1Column__NknDL",leftColumn:"SubjectLayout_leftColumn__H9tAs",alignBottom:"SubjectLayout_alignBottom__OfIWp",keyboard:"SubjectLayout_keyboard___RbdD",progressBar:"SubjectLayout_progressBar__J1U9o",learningArea:"SubjectLayout_learningArea__wOuMJ",transparent:"SubjectLayout_transparent__9S3lC"}},68777:e=>{e.exports={containerShelfOuterPadding:"PanelStore_containerShelfOuterPadding__sZP4e",containerShelf:"PanelStore_containerShelf__YhAuN",itemsWrapper:"PanelStore_itemsWrapper__nq5T8",itemContainer:"PanelStore_itemContainer__Sq7CX",itemPlaque:"PanelStore_itemPlaque___jOpt",itemPlaqueText:"PanelStore_itemPlaqueText__eOGZf",itemImage:"PanelStore_itemImage__VW2zV",itemImageLocked:"PanelStore_itemImageLocked__BBO0t",lockedLevelContainer:"PanelStore_lockedLevelContainer__F3k3_",levelLockedText:"PanelStore_levelLockedText__rNkzC",ownedIndicator:"PanelStore_ownedIndicator__AqdKn",purchaseContainer:"PanelStore_purchaseContainer__ceouk",cantAffordIt:"PanelStore_cantAffordIt__s_gv7",purchaseContainerImage:"PanelStore_purchaseContainerImage__RVsYd",purchaseContainerText:"PanelStore_purchaseContainerText__r7B1m",paginatorButtons:"PanelStore_paginatorButtons__4FovY",paginatorButtonsUp:"PanelStore_paginatorButtonsUp__C8Kfc",paginatorButtonsDown:"PanelStore_paginatorButtonsDown__VM0nk",paginatorButtonDisabled:"PanelStore_paginatorButtonDisabled__i4c_7"}},69352:e=>{e.exports={container:"ProgressBarMonsterIcon_container__tzOaw",background:"ProgressBarMonsterIcon_background__Ux4ep",foreground:"ProgressBarMonsterIcon_foreground__XGdwZ",monsterOuter:"ProgressBarMonsterIcon_monsterOuter__wOjHU",monster:"ProgressBarMonsterIcon_monster__Ri_1I"}},69602:e=>{e.exports={wrapper:"PrimaryCTA_wrapper__kC7c9",short:"PrimaryCTA_short__zxNJw",button:"PrimaryCTA_button__f0rpG",secondary:"PrimaryCTA_secondary__HvRvT",icon:"PrimaryCTA_icon__dcei3",claim:"PrimaryCTA_claim__ih91J",handIndicator:"PrimaryCTA_handIndicator__Rd_Ji"}},69968:(e,t,n)=>{"use strict";n.d(t,{X:()=>s});var a=n(55729);let s=()=>{let e=(0,a.useRef)(null),[t,n]=(0,a.useState)({});return(0,a.useLayoutEffect)(()=>{e.current&&n(e.current.getBoundingClientRect().toJSON())},[e]),{dimensions:t,ref:e}}},72825:e=>{e.exports={container:"LevelMap_container__z2blf",studentMonster:"LevelMap_studentMonster__435DF",mapElement:"LevelMap_mapElement__qbJA_",button:"LevelMap_button__j0NSF",number:"LevelMap_number__mW31U",egg:"LevelMap_egg__WOG0H",studentMonsterContainer:"LevelMap_studentMonsterContainer__cfuU2","level-2":"LevelMap_level-2__E4I0B","level-3":"LevelMap_level-3___cLci",spiral:"LevelMap_spiral__jvH62","spiral-animation":"LevelMap_spiral-animation__gC5dn",glow:"LevelMap_glow__ILXdK","map-2-start":"LevelMap_map-2-start___tyEH","map-3-start":"LevelMap_map-3-start__fV1Lt","map-4-start":"LevelMap_map-4-start__nEoA1","level-1":"LevelMap_level-1__bx3Dk","level-4":"LevelMap_level-4__xCPXE","level-5":"LevelMap_level-5__rUAGq","level-6":"LevelMap_level-6__lKUVv","level-7":"LevelMap_level-7__fwTJo","level-8":"LevelMap_level-8__TK3mH","level-9":"LevelMap_level-9__Hwpzs","level-10":"LevelMap_level-10__Wm0L8","level-11":"LevelMap_level-11__pt4lC","level-12":"LevelMap_level-12__kbJ9L","level-13":"LevelMap_level-13__KICnV","level-14":"LevelMap_level-14__03eRw","level-15":"LevelMap_level-15__Ik7KU","level-16":"LevelMap_level-16__xDRRy","level-17":"LevelMap_level-17__G_XD_","level-18":"LevelMap_level-18__TzQ48","level-19":"LevelMap_level-19__o6uTk","level-20":"LevelMap_level-20__a1Kzo","level-21":"LevelMap_level-21__GrWww","level-22":"LevelMap_level-22__eCZeY","level-23":"LevelMap_level-23__b7046","level-24":"LevelMap_level-24__nYttJ","level-25":"LevelMap_level-25__LXy0C","level-26":"LevelMap_level-26__1uwAJ","level-27":"LevelMap_level-27__iI1sr","level-28":"LevelMap_level-28__famjb","level-29":"LevelMap_level-29__CPjx5","level-30":"LevelMap_level-30__DKPsl","level-31":"LevelMap_level-31__USuIq","level-32":"LevelMap_level-32__BkfRu","level-33":"LevelMap_level-33__2Zow6","level-34":"LevelMap_level-34__uoRpn","level-35":"LevelMap_level-35__hScJz","level-36":"LevelMap_level-36__WFp_f",maxLevel:"LevelMap_maxLevel__f84ZX"}},72948:e=>{e.exports={mask:"PetHatchingMask_mask__5ohjJ",fadeOut:"PetHatchingMask_fadeOut__cen_W"}},74578:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/game",function(){return n(76704)}])},76028:e=>{e.exports={buttonContainer:"CarouselButton_buttonContainer__SJorm",arrowIcon:"CarouselButton_arrowIcon___iEW5",baseImg:"CarouselButton_baseImg__ILrKo",previous:"CarouselButton_previous__HOX9E",next:"CarouselButton_next__fG1Qo"}},76583:e=>{e.exports={container:"Tabs_container__mKhxM"}}
1,76704:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__N_SSP:()=>lD,default:()=>lG});var a,s,r,i,l,o,c,d,u,_,m,p,v,h,b,x,g=n(6029),f=n(75155),j=n(4384),y=n(22577),C=n(79895),N=n(95875),P=n(93251),S=n(27736),E=n(49830),I=n(75353),w=n(56204),T=n(81278),k=n(55729);let M=()=>{let e,t=(0,f.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)("div",{style:{backgroundColor:"#9eedf3",bottom:0,left:0,position:"fixed",right:0,top:0,zIndex:-1}}),t[0]=e):e=t[0],e};var O=n(86633);let A=()=>{let e=(0,j.r8)(L),t=(0,j.r8)(R),n=(0,j.r8)(B),a=(0,j.r8)($),{data:s}=(0,O.lr)(),r=s?.level_state;return e!==y.jNk.LEVEL||t!==y.aGi.LEARNING_ACTIVITY_OVERLAY||"practice"!==r||n||a};function L(e){return e.unifiedProduct.game.gameState}function R(e){return e.unifiedProduct.level.overlay}function B(e){return e.unifiedProduct.animationQueue.length>0}function $(e){return e.unifiedProduct.level.isExitModalOpen}let D=()=>{let e,t=(0,f.c)(2),n=(0,j.r8)(G),{data:a}=(0,O.l1)(),s=a?.question,{data:r}=(0,O.lr)(),i=r?.subject_id;t[0]!==a?(e=a&&(0,C.W5)(a),t[0]=a,t[1]=e):e=t[1];let l=e,o=!A(),c=(0,j.r8)(q);return!!(i===y.pN.MATH&&o&&!l&&(n||s?.question_type!=="M")&&c!==y.AqZ.NONE)};function G(e){return e.unifiedProduct.ui.mathButtonsEnabled}function q(e){return e.unifiedProduct.ui.actionButtonVariant}let V=()=>{let{data:e}=(0,O.lr)(),{data:t}=(0,O.YL)(),n=(0,k.useRef)({incentive:t?.incentive,level:t?.level_number,level_state:e?.level_state,subject_content_id:e?.subject_content_id,subject_content_type_id:e?.subject_content_type_id,subject_id:e?.subject_id});return n.current.incentive=t?.incentive,n.current.level=t?.level_number,n.current.level_state=e?.level_state,n.current.subject_content_id=e?.subject_content_id,n.current.subject_content_type_id=e?.subject_content_type_id,n.current.subject_id=e?.subject_id,(0,k.useCallback)(()=>n.current,[])};var U=n(15024);let F=e=>{let t=Object.values(e??{}).find(e=>e.experiment.key===O.PA);return t?.experiment_bucket?.name==="B"},K=()=>{let e,t,n,a,s=(0,f.c)(12),{data:r,isError:i,isLoading:l,refetch:o}=(0,O.Pt)(),c=void 0!==r||i||!l;s[0]!==c||s[1]!==r?(t=(({hasResolved:e,isEnabled:t})=>e?t?"enabled":"disabled":"loading")({hasResolved:c,isEnabled:e=F(r)}),s[0]=c,s[1]=r,s[2]=e,s[3]=t):(e=s[2],t=s[3]);let d=t;s[4]!==e||s[5]!==o||s[6]!==d?(n=async()=>{if("loading"!==d)return e;let{data:t}=await o();return F(t)},s[4]=e,s[5]=o,s[6]=d,s[7]=n):n=s[7];let u=n;return s[8]!==e||s[9]!==u||s[10]!==d?(a={isEnabled:e,resolveIsEnabled:u,status:d},s[8]=e,s[9]=u,s[10]=d,s[11]=a):a=s[11],a},H=e=>"egg"===e?"egg_hatching":"chest"===e?"chest":null,z=(e,t)=>H(e?.incentive)??(t?"pet_customizer":"store"),W=new Set(["chest","egg_hatching"]),X=(e,t,{incentive:n,isPetGameExperimentEnabled:a})=>a&&"store"===t&&(W.has(e)||"celebrate_progress"===e&&"none"===n)?"pet_customizer":t,Y=e=>{if(!e?.progress_bar)return 0;let{math_goal:t,total_gameplay_gems:n}=e.progress_bar;return 0===t||0===n?5:Math.round(n/t)},Q=()=>{let{mutateAsync:e}=(0,O.oL)(),{mutate:t}=(0,O.nM)(),n=(0,j.r8)(e=>e.unifiedProduct.actions.setLevelOverlay),a=(0,j.r8)(e=>e.unifiedProduct.actions.setMathPreviousContext),s=(0,j.r8)(e=>e.unifiedProduct.actions.enqueueAnimation),{data:r}=(0,O.YL)(),{data:i}=(0,O.l1)(),{data:l}=(0,O.lr)(),o=i?.question,c=o?.id,d=i&&(0,C.OC)(i),u=D(),{resolveIsEnabled:_}=K(),{isEnabled:m}=(0,U.f)(),p=V();return{submitMathAnswer:(0,k.useCallback)(async(v=!1,h)=>{if(!u&&!h&&!v)return;let b=h??(v?{i_dont_know:!0}:(e=>{if("u"<typeof document)return{};switch(e){case"BLNK":{let e=document.querySelectorAll('input[data-answer-type="BLNK"]'),t=document.querySelectorAll('input[data-answer-type="DROPDOWN"]'),n=[];for(let t of e)n.push(t.value);for(let e of t)n.push(e.value);return{answer_data:n}}case"M":{let e=document.querySelector("[data-m-selected-answer-id]");return{answer_id:Number.parseInt(e?.dataset.mSelectedAnswerId,10)}}case"VIDEO_BLNK":{let t=document.querySelector(`input[data-answer-type="${e}"]`);return{answer_data:[t?.value]}}case"VIDEO_M":{let e=document.querySelector("[data-video-m-selected-answer-id]");return{answer_id:Number.parseInt(e?.dataset.videoMSelectedAnswerId,10)}}case"VIDEO_SELECTION":case"VIDEO_SELECTION_ONE_OPTION":{let e=document.querySelectorAll("[data-vi
1deo-selection-selected-answer-id]"),t={};for(let n of e)t[n?.dataset.videoSelectionSelectedAnswerId]=!0;return{answers_selection:t}}case"VIDEO_TEXT_INSIDE":case"VIDEO_TEXT_OUTSIDE":{let t=document.querySelectorAll(`[data-answer-type="${e}"]`);if(0===t.length)return{multiple_answers:{}};let n={};for(let e of t)n[e?.name]=e?.value;return{multiple_answers:n}}default:return console.error("Invalid question type for extractMathAnswerData",e),{}}})(o?.question_type)),{response:x}=await e(b),g=x.student_game_progress;(0,w.X8)("Answered Question",{answer_data:b,grade:i.math_activity_lesson.math_lesson.grade,incentive:r?.incentive,is_pretest:d,learning_mode:i?.learning_mode,level:r?.level_number,progress:g.progress,question_id:c,question_type:o?.question_type,subject_id:y.NvZ.MATH,was_correct:x.is_previous_question_answered_correctly});let f=(0,C._z)(r?.progress_bar?.milestones.length??0,r?.progress_bar?.math_goal??0).get(g.progress),j=x.is_previous_question_answered_correctly?Y(r):0;if(j>0&&(0,w.X8)("Earned Gems",{incentive:r?.incentive,level:r?.level_number,num_gems:j,source:"Math Problem",subject_id:y.NvZ.MATH}),f>0&&l?.progress<g.progress){s({gems:j,milestoneNumber:f,source:"Math Problem",type:"milestone"}),(0,w.X8)("Math Milestone Reached",{level:r?.level_number,milestone_number:f,subject:y.NvZ.MATH});return}if(g.progress>=r?.progress_bar?.math_goal){t({level_state:await _()?z(r,m):"celebrate_progress"}),(0,w.X8)("Level_Practice_completed",p());return}return x.is_previous_question_answered_correctly?void s({gems:Y(r),source:"Math Problem",type:"correct"}):b.i_dont_know?void s({type:"idk"}):d?void s({type:"incorrect"}):(a({answerData:b,mathLesson:i.math_activity_lesson.math_lesson,question:o}),n(y.aGi.EXPLANATION),x)},[u,o,e,i?.math_activity_lesson?.math_lesson,i?.learning_mode,r,d,c,l?.progress,a,n,t,s,p,_,m])}};var Z=n(16381),J=n(32988),ee=n.n(J);let et=e=>{if(!e?.progress_bar)return 0;let{milestones:t,total_gameplay_gems:n}=e.progress_bar;return Math.round(n/t.length)};var en=n(94668),ea=n.n(en);let es=()=>{let e=(0,j.r8)(e=>e.unifiedProduct.actions.setGameState),{invalidateQuery:t}=(0,O.dT)(),n=(0,I.Q)(),{mutateAsync:a}=(0,O.nM)(),{data:s}=(0,O.lr)(),[r,i]=(0,k.useState)(!1),{data:l}=(0,O.YL)(),[o,c]=(0,k.useState)(null),[d,u]=(0,k.useState)(""),[_,m]=(0,k.useState)(null),[p,v]=(0,k.useState)(""),h=(0,j.r8)(e=>e.unifiedProduct.actions.setForcedQuestion),{data:b}=(0,O.l1)(),{submitMathAnswer:x}=Q(),{mutate:f}=(0,O.jx)(),N=(0,j.r8)(e=>e.unifiedProduct.game.gameState),[P,S]=(0,k.useState)(!1),E=(0,j.r8)(e=>e.unifiedProduct.actions.setLevelOverlay),[w,T]=(0,k.useState)(1),M=(0,j.r8)(e=>e.unifiedProduct.actions.setProgressBar),A=(0,k.useCallback)((e,t)=>{switch(e){case y.pN.MATH:return+!!Number.parseInt(t,10);case y.pN.READING:return t.startsWith("-")?3:2;case y.pN.SCIENCE:return 4;case y.pN.SOCIAL_STUDIES:return 5;case y.pN.SUPER_SKILLS:return 6}},[]),L=(0,k.useCallback)(async()=>{if(!d||!o)return void alert("Please specify both subject and subject content ID");try{await a({latest_milestone_reached:0,level:w,level_state:"intro",milestones_collected:[],progress:0,subject_content_id:Math.abs(Number.parseInt(d||"0",10)),subject_content_type_id:A(o,d),subject_id:o??y.pN.MATH})}catch(e){e instanceof Error&&alert(e.message)}E(y.aGi.LEARNING_ACTIVITY_OVERLAY),M({animation:"instant",hasQuizIcon:!1,percentage:0,steps:0})},[a,w,d,o,A,E,M]);(0,k.useEffect)(()=>{T(s?.level??1),c(s?.subject_id??null),u(`${s?.subject_content_type_id===3?"-":""}${s?.subject_content_id}`)},[s]);let R=r||!b||!(0,C.OC)(b)||"practice"!==s.level_state,B=Object.values(y.jNk),$=async()=>{let e=(0,Z.Cj)(b?.question);await x(!1,e)},{mutate:D}=(0,O.JA)(),G=!!b&&(0,C.W5)(b),q=!!b&&(0,C.OC)(b);if(!n)return null;let V={[y.pN.MATH]:"just put 0",[y.pN.READING]:"book_part_id or negative video_lesson_id",[y.pN.SCIENCE]:"TBD",[y.pN.SOCIAL_STUDIES]:"topic_id",[y.pN.SUPER_SKILLS]:"superskills_video_id"};return(0,g.jsxs)("div",{className:ee()(ea().controlPanel,P&&ea().controlPanelHidden),children:[(0,g.jsx)("button",{onClick:()=>{S(!P)},type:"button",children:P?"Show":"Hide"}),P?null:(0,g.jsxs)(k.Fragment,{children:[(0,g.jsxs)("div",{className:ea().controlGroup,children:[(0,g.jsx)("div",{className:ea().controlGroupLabel,children:"Game State"}),(0,g.jsx)("div",{children:B.map(t=>(0,g.jsx)("button",{className:N===t?ea().selected:void 0,onClick:()=>{e(t)},type:"button",children:t},`gameState-${t}`))})]}),(0,g.jsxs)("div",{className:ea().controlGroup,children:[(0,g.jsx)("div",{className:ea().controlGroupLabel,children:"Level"}),(0,g.jsxs)("div",{className:ea().forceQuestionInputs,children:[(0,g.jsx)("select",{className:ea().forceQuestionSelect,onChange:e=>{let t=Number(e.target.value);u(""),c(t)},value:o??"",children:Object.entries(y.pN).filter(([e])=>Number.isNaN(Number(e))).map(([e,t])=>(0,g.jsx)("option",{value:t,children:e},e))}),(0,g.jsx)("input",{className:ea().forceQuestionInput,onChange:e=>{let{value:t}=e.target;u(t)},placeholder:V[o],type:"text",value:d})]}),(0,g.jsxs)("div",{className:ea().levelInputContainer,children:[(0,g.jsx)("input",{onChange:e=>{T(Number(e.target.value))},type:"number",value:w}),(0,g.jsx)("button",{onClick:L,type:"button",children:"Update Level"})]}),(0,g.jsx)("div",{className:ea().levelStateButtons,children:["intro","practice","collect_remaining_milestone_gems","celebrate_progress","egg_hatching","chest","pet_customizer","store"].map(t=>(0,g.jsx)("button",{className:s?.level_state===t?ea().selected:void 0,onClick:()=>{N!==y.jNk.LEVEL&&e(y.jNk.LEVEL),a({level_state:t})},type:"button",children:t},t))})]}),(0,g.jsxs)("div",{className:ea().statsGroup,children:[(0,g.jsxs)("div",{className:ea().statsGroupItem,children:["Incentive: ",l?.incentive]}),(0,g.jsxs)("div",{className:ea().statsGroupItem,children:["Subject: ",y.pN[s?.subject_id]]}),s?.subject_id===y.pN.SUPER_SKILLS&&(0,g.jsxs)("div",{className:ea().statsGroupItem,children:["Gems per Super Skills Milestone:"," ",et(l)]}),s?.subject_id===y.pN.MATH&&(0,g.jsxs)(k.Fragment,{children:[(0,g.jsxs)("div",{className:ea().statsGroupItem,children:["Math Progress Goal: ",l?.progress_bar?.math_goal]}),(0,g.jsxs)("div",{className:ea().statsGroupItem,children:["Gems per Math Question:"," ",Y(l)]})]})]}),s?.subject_id===y.pN.MATH?(0,g.jsxs)(k.Fragment,{children:[(0,g.jsxs)("div",{className:ea().controlGroup,children:[(0,g.jsx)("div",{className:ea().controlGroupLabel,children:"Math"}),(0,g.jsxs)("div",{children:[q?(0,g.jsx)("button",{disabled:R,onClick:()=>{f(),i(!0)},type:"button",children:"Complete Pretest"}):null,(0,g.jsx)("button",{onClick:$,type:"button",children:"Force Correct"}),(0,g.jsx)("button",{onClick:()=>{x(!0)},type:"button",children:"IDK"}),G?(0,g.jsx)("button",{onClick:()=>{D(b?.math_activity_lesson?.math_lesson?.id??0)},type:"button",children:"Complete Lesson Intro"}):null]})]}),(0,g.jsxs)("div",{className:ea().controlGroup,children:[(0,g.jsx)("div",{className:ea().controlGroupLabel,children:"Force Question"}),(0,g.jsxs)("div",{className:ea().forceQuestionControls,children:[(0,g.jsxs)("div",{className:ea().forceQuestionInputs,children:[(0,g.jsxs)("select",{className:ea().forceQuestionSelect,onChange:e=>{m(e.target.value),v("")},value:_??"",children:[(0,g.jsx)("option",{value:"",children:"Type: Default"}),Object.entries(y.vuP).map(([e,t])=>(0,g.jsx)("option",{value:t,children:t},e))]}),(0,g.jsx)("input",{className:ea().forceQuestionInput,onChange:e=>{v(e.target.value),e.target.value&&m(null)},placeholder:"Question ID",type:"text",value:p})]}),(0,g.jsxs)("div",{className:ea().forceQuestionButtons,children:[(0,g.jsx)("button",{className:ee()(ea().forceQuestionActionButton,ea().revertButton),onClick:()=>{m(null),v(""),h({problemType:null,questionId:null}),t(O.lH.students.mathActivity(s?.student_id,s?.subject_content_id))},title:"Revert to defaults",type:"button",children:"Reset"}),(0,g.jsx)("button",{className:ee()(ea().forceQuestionActionButton,ea().saveButton),onClick:()=>{h({problemType:_??null,questionId:p?Number.parseInt(p,10):null}),t(O.lH.students.mathActivity(s?.student_id,s?.subject_content_id))},title:"Save changes",type:"button",children:"Save Changes"})]})]})]}),(0,g.jsxs)("div",{className:ea().statsGroup,children:[(0,g.jsxs)("div",{className:ea().statsGroupItem,children:["Learning Mode: ",b?.learning_mode]}),(0,g.jsxs)("div",{className:ea().statsGroupItem,children:["Progress: ",s?.progress]})]})]}):null]})]})};var er=n(77526),ei=n(36484),el=n.n(ei);let eo=`${C.ID.images}/up-gem.webp`,ec=()=>{let e,t,n,a,s=(0,f.c)(7),{data:r}=(0,O.KR)(),i=r?.gems??0;return s[0]!==i?(e=(0,C.Fq)(i),s[0]=i,s[1]=e):e=s[1],s[2]!==e?(t=(0,g.jsx)("div",{className:el().pill,children:(0,g.jsx)("span",{className:el().gemCount,children:e})}),s[2]=e,s[3]=t):t=s[3],s[4]===Symbol.for("react.memo_cache_sentinel")?(n=(0,g.jsx)("img",{alt:"gem",className:el().gem,src:eo}),s[4]=n):n=s[4],s[5]!==t?(a=(0,g.jsxs)("div",{className:el().container,children:[t,n]}),s[5]=t,s[6]=a):a=s[6],a};var ed=n(24476),eu=n.n(ed);let e_=e=>{let t,n,a,s,r,i=(0,f.c)(14),{animateIn:l,onAnimationEnd:o}=e,[c,d]=(0,k.useState)(l),[u,_]=(0,k.useState)(!1);i[0]!==l||i[1]!==c?(t=()=>{l!==c&&_(!0)},n=[l,c],i[0]=l,i[1]=c,i[2]=t,i[3]=n):(t=i[2],n=i[3]),(0,k.useEffect)(t,n),i[4]!==l||i[5]!==o?(a=()=>{_(!1),d(l),o&&o(l?"in":"out")},i[4]=l,i[5]=o,i[6]=a):a=i[6];let m=a;return i[7]!==l||i[8]!==u||i[9]!==c?(s=c||u?c&&!u?`${eu().blur} ${eu().blurVisible}`:`${eu().blur} ${l?eu().blurIn:eu().blurOut}`:eu().blur,i[7]=l,i[8]=u,i[9]=c,i[10]=s):s=i[10],i[11]!==m||i[12]!==s?(r=(0,g.jsx)("div",{className:s,onAnimationEnd:m}),i[11]=m,i[12]=s,i[13]=r):r=i[13],r};var em=n(56760),ep=n(46500),ev=n.n(ep);let eh=e=>{let t,n=(0,f.c)(4),{gems:a,onAnimationEnd:s,text:r}=e;if(!r&&a<=0)return null;let i=a>0?` +${a}`:"";return n[0]!==s||n[1]!==i||n[2]!==r?(t=(0,g.jsxs)("div",{className:ev().compliment,onAnimationEnd:s,children:[r,i]}),n[0]=s,n[1]=i,n[2]=r,n[3]=t):t=n[3],t};var eb=n(56356),ex=n.n(eb);let eg=e=>{let t,n,a=(0,f.c)(3),{onAnimationEnd:s}=e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)("img",{src:"https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/mathflow/images/pmemberang/map-ocean/gem_pink.png"}),a[0]=t):t=a[0],a[1]!==s?(n=(0,g.jsx)("div",{className:ex().gem,onAnimationEnd:s,children:t}),a[1]=s,a[2]=n):n=a[2],n};var ef=n(31655),ej=n(36427);let ey=e=>{let t,n,a,s,r,i,l,o,c,d,u,_,m,p,v,h=(0,f.c)(34),{audioUrl:b,milestoneNumber:x,onComplete:j,onStart:y,riveUrl:C,stateMachine:N}=e,P=(0,k.useRef)(!1),S=(0,k.useRef)(!1),E=(0,k.useRef)(null),I=(0,k.useRef)(j),w=(0,k.useRef)(y),T=`${C}:${x}`;h[0]!==T||h[1]!==b||h[2]!==x||h[3]!==C||h[4]!==N?(t={animationId:T,audioUrl:b,milestoneNumber:x,src:C,stateMachine:N},h[0]=T,h[1]=b,h[2]=x,h[3]=C,h[4]=N,h[5]=t):t=h[5];let M=t;h[6]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{P.current||(P.current=!0,I.current())},h[6]=n):n=h[6];let O=n;h[7]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{S.current||(S.current=!0,w.current())},h[7]=a):a=h[7];let A=a;h[8]!==j||h[9]!==y?(s=()=>{I.current=j,w.current=y},r=[j,y],h[8]=j,h[9]=y,h[10]=s,h[11]=r):(s=h[10],r=h[11]),(0,k.useEffect)(s,r),h[12]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{P.current=!1,S.current=!1,E.current=null},h[12]=i):i=h[12],h[13]!==T?(l=[T],h[13]=T,h[14]=l):l=h[14],(0,k.useEffect)(i,l),h[15]!==M?(o=()=>{ej.A.error("[RiveMilestone] Failed to load Rive animation",M),O()},h[15]=M,h[16]=o):o=h[16],h[17]!==C||h[18]!==N||h[19]!==o?(c={autoBind:!0,onLoadError:o,src:C,stateMachines:N},h[17]=C,h[18]=N,h[19]=o,h[20]=c):c=h[20];let{rive:L,RiveComponent:R}
1=(0,ef.useRive)(c),B=L?.viewModelInstance,{setValue:$}=(0,ef.useViewModelInstanceNumber)("milestone",B);return h[21]===Symbol.for("react.memo_cache_sentinel")?(d={onTrigger:A},h[21]=d):d=h[21],(0,ef.useViewModelInstanceTrigger)("animationStart",B,d),h[22]===Symbol.for("react.memo_cache_sentinel")?(u={onTrigger:O},h[22]=u):u=h[22],(0,ef.useViewModelInstanceTrigger)("animationComplete",B,u),h[23]!==b||h[24]!==M||h[25]!==x||h[26]!==L||h[27]!==$||h[28]!==B?(_=()=>{if(L&&B&&E.current!==x){E.current=x;try{$(x),L.play(),Z.xj.playForeground(b)}catch(e){ej.A.error("[RiveMilestone] Failed to start animation",{audioUrl:b,error:e,milestoneNumber:x,...M}),O()}}},m=[O,M,b,x,L,B,$],h[23]=b,h[24]=M,h[25]=x,h[26]=L,h[27]=$,h[28]=B,h[29]=_,h[30]=m):(_=h[29],m=h[30]),(0,k.useEffect)(_,m),h[31]===Symbol.for("react.memo_cache_sentinel")?(p={height:"100%",width:"100%"},h[31]=p):p=h[31],h[32]!==R?(v=(0,g.jsx)(R,{style:p}),h[32]=R,h[33]=v):v=h[33],v},eC=e=>{let t,n=(0,f.c)(8),{audioUrl:a,milestoneNumber:s,onComplete:r,onStart:i,riveUrl:l,stateMachine:o}=e,c=`${l}:${s}`;return n[0]!==a||n[1]!==s||n[2]!==r||n[3]!==i||n[4]!==l||n[5]!==o||n[6]!==c?(t=(0,g.jsx)(ey,{audioUrl:a,milestoneNumber:s,onComplete:r,onStart:i,riveUrl:l,stateMachine:o},c),n[0]=a,n[1]=s,n[2]=r,n[3]=i,n[4]=l,n[5]=o,n[6]=c,n[7]=t):t=n[7],t};var eN=n(9922),eP=n.n(eN);let eS=()=>{let e,t=(0,f.c)(3),{data:n}=(0,O.LH)(),{data:a}=(0,O.Ox)(),s=n?.latestEarnedStudentPet;return s?(t[0]!==s||t[1]!==a?((e=eP()(s)).pet=a?.find(t=>t.id===e.pet_id),t[0]=s,t[1]=a,t[2]=e):e=t[2],e):null};var eE=n(11439);let eI=e=>{let t,n,a=(0,f.c)(8),{justPurchasedItemID:s,offsetX:r,offsetY:i,width:l}=e,{data:o}=(0,O.$s)();a[0]!==o?(t=o??(0,C.vA)(),a[0]=o,a[1]=t):t=a[1];let c=l??"100%";return a[2]!==s||a[3]!==r||a[4]!==i||a[5]!==t||a[6]!==c?(n=(0,g.jsx)(eE.A,{justPurchasedItemID:s,offsetX:r,offsetY:i,opaqueShadow:!0,studentMonster:t,width:c}),a[2]=s,a[3]=r,a[4]=i,a[5]=t,a[6]=c,a[7]=n):n=a[7],n};var ew=n(27639),eT=n(83778),ek=n.n(eT);let eM=e=>{let t,n,a=(0,f.c)(16),{studentPet:s}=e;a[0]!==s.pet_id||a[1]!==s.pet_part_1||a[2]!==s.pet_part_10||a[3]!==s.pet_part_2||a[4]!==s.pet_part_3||a[5]!==s.pet_part_4||a[6]!==s.pet_part_5||a[7]!==s.pet_part_6||a[8]!==s.pet_part_7||a[9]!==s.pet_part_8||a[10]!==s.pet_part_9||a[11]!==s.pet_part_primary_color.name||a[12]!==s.pet_part_secondary_color.name?(t=[s.pet_part_1,s.pet_part_2,s.pet_part_3,s.pet_part_4,s.pet_part_5,s.pet_part_6,s.pet_part_7,s.pet_part_8,s.pet_part_9,s.pet_part_10].map(e=>{if(e){var t,n,a;let r,i,l,o=e.behind_body?ek().studentPetCustomPartBehind:ek().studentPetCustomPart;return(0,g.jsx)("div",{className:`map-game-element ${ek().studentPetCustomPart} ${o}`,children:(0,g.jsx)(ew.i,{alt:"",className:"map-game-element-img",placeholder:"",src:`https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/images/game-app-images/pets/pet_${s.pet_id}_custom/pet_${(t=s.pet_part_primary_color.name,n=s.pet_part_secondary_color.name,a=s.pet_id,r=e.base_color,i="","p"===r?i=`_pcolor${t}`:"s"===r&&(i=`_scolor${n}`),l=e.student_pet_number-1,`${a}_part${l}value${e.name}${i}`)}.png`})},e.id)}}),a[0]=s.pet_id,a[1]=s.pet_part_1,a[2]=s.pet_part_10,a[3]=s.pet_part_2,a[4]=s.pet_part_3,a[5]=s.pet_part_4,a[6]=s.pet_part_5,a[7]=s.pet_part_6,a[8]=s.pet_part_7,a[9]=s.pet_part_8,a[10]=s.pet_part_9,a[11]=s.pet_part_primary_color.name,a[12]=s.pet_part_secondary_color.name,a[13]=t):t=a[13];let r=t;return a[14]!==r?(n=(0,g.jsx)(k.Fragment,{children:r}),a[14]=r,a[15]=n):n=a[15],n};var eO=n(54012),eA=n.n(eO);let eL="https://assets.adaptedmind.com/mobile/v2/rive/running-monsters-v6.riv",eR=new ef.Layout({fit:ef.Fit.Cover}),eB=e=>{let t,n,a,s,r,i,l,o,c,d,u,_,m,p=(0,f.c)(31),{onAnimationEnd:v,onAnimationStart:h}=e,b=(0,k.useRef)(!1),x=(0,k.useRef)(!1),j=eS(),y=!!j;p[0]!==v?(t=()=>{x.current||(x.current=!0,v())},p[0]=v,p[1]=t):t=p[1];let C=t;p[2]!==C?(n={artboard:"MainArtboard",autoBind:!0,layout:eR,onLoadError:()=>{ej.A.error("[RiveRunningMonsters] Failed to load Rive animation",{src:eL}),C()},src:eL,stateMachines:"MainStateMachine"},p[2]=C,p[3]=n):n=p[3];let{rive:N,RiveComponent:P}
1=(0,ef.useRive)(n),S=N?.viewModelInstance;p[4]!==h?(a=()=>{b.current||(b.current=!0,h())},p[4]=h,p[5]=a):a=p[5];let E=a;p[6]!==E?(s={onTrigger:E},p[6]=E,p[7]=s):s=p[7],(0,ef.useViewModelInstanceTrigger)("animationStart",S,s),p[8]!==v||p[9]!==N?(r=()=>{x.current||(x.current=!0,N?.pause(),v())},p[8]=v,p[9]=N,p[10]=r):r=p[10];let I=r;return p[11]!==I||p[12]!==N||p[13]!==y||p[14]!==S?(i=()=>{if(N&&S)try{let e=S.boolean("munchkinVisibility");e&&(e.value=!y),N.play()}catch(e){ej.A.error("[RiveRunningMonsters] Failed to set visibility values",{error:e}),I()}},l=[I,N,y,S],p[11]=I,p[12]=N,p[13]=y,p[14]=S,p[15]=i,p[16]=l):(i=p[15],l=p[16]),(0,k.useEffect)(i,l),p[17]!==I||p[18]!==N?(o=()=>{if(!N)return;let e=globalThis.setTimeout(()=>{I()},3500);return()=>{globalThis.clearTimeout(e)}},c=[I,N],p[17]=I,p[18]=N,p[19]=o,p[20]=c):(o=p[19],c=p[20]),(0,k.useEffect)(o,c),p[21]!==P?(d=(0,g.jsx)(P,{className:eA().riveCanvas}),p[21]=P,p[22]=d):d=p[22],p[23]!==y||p[24]!==j?(u=y?(0,g.jsx)("div",{className:eA().petOverlay,children:(0,g.jsx)(eM,{studentPet:j})}):null,p[23]=y,p[24]=j,p[25]=u):u=p[25],p[26]===Symbol.for("react.memo_cache_sentinel")?(_=(0,g.jsx)("div",{className:eA().monsterOverlay,children:(0,g.jsx)(eI,{})}),p[26]=_):_=p[26],p[27]!==I||p[28]!==d||p[29]!==u?(m=(0,g.jsx)("div",{className:eA().container,children:(0,g.jsx)("div",{className:eA().riveContainer,children:(0,g.jsxs)("div",{className:eA().riveWrapper,onAnimationEnd:I,children:[d,u,_]})})}),p[27]=I,p[28]=d,p[29]=u,p[30]=m):m=p[30],m};var e$=n(14712),eD=n.n(e$);let eG=new Set,eq={activeAnimation:null,completedSteps:new Set};function eV(e){return e.unifiedProduct.animationQueue}function eU(e){return e.unifiedProduct.actions.clearAnimationQueue}function eF(e){return e.unifiedProduct.actions.dequeueAnimation}let eK=e=>{let t,n=(0,f.c)(35),{children:a}=e,{activeAnimation:s,activeCompliment:r,activeRiveMilestoneConfig:i,handleGemAnimationEnd:l,handleMilestoneAnimationStart:o,handleRunningMonstersAnimationStart:c,markStepComplete:d,shouldRenderCompliment:u,shouldRenderGem:_,shouldRenderRiveMilestone:m,shouldRenderRiveRunningMonsters:p,shouldRenderScrim:v}=(()=>{let e,t,n,a,s,r,i,l,o,c,d,u,_,m,p,v,h,b,x,g,y,N,P,S=(0,f.c)(74),{mutate:E}=(0,O.Ec)(),{data:I,isFetched:T,isPlaceholderData:M}=(0,O.YL)(),A=(0,j.r8)(eV),L=(0,j.r8)(eU),R=(0,j.r8)(eF),[B,$]=(0,k.useState)(eq),D=(0,k.useRef)(null),G=V(),q=A[0]??null;S[0]!==q?(e=(0,C.AO)(q),S[0]=q,S[1]=e):e=S[1];let U=e,F=q?.type==="milestone"&&null!==U;S[2]!==q||S[3]!==M||S[4]!==I?(t=(({activeAnimation:e,isPlaceholderData:t,levelConfig:n})=>{if(t)return{activeRiveMilestoneConfig:null};let a=(0,C.AO)(e),s=(0,C.DX)(a,n),r=null===s?null:1===a||2===a||3===a?a:null;return{activeRiveMilestoneConfig:null!==r&&s?.rive?{audioUrl:s.rive.audio_url,milestoneNumber:r,riveUrl:s.rive.rive_url,stateMachine:s.rive.state_machine}:null}})({activeAnimation:q,isPlaceholderData:M,levelConfig:I}),S[2]=q,S[3]=M,S[4]=I,S[5]=t):t=S[5];let{activeRiveMilestoneConfig:K}=t;S[6]!==q||S[7]!==K||S[8]!==T||S[9]!==M?(n=(({activeAnimation:e,activeRiveMilestoneConfig:t,isFetched:n,isPlaceholderData:a})=>{let s=(0,C.AO)(e);return null!==s&&(!(n&&!a&&null!==s)||null!==t)})({activeAnimation:q,activeRiveMilestoneConfig:K,isFetched:T,isPlaceholderData:M}),S[6]=q,S[7]=K,S[8]=T,S[9]=M,S[10]=n):n=S[10];let H=n,z=B.activeAnimation===q?B.completedSteps:eG,[W,X]=(0,k.useState)(null);S[11]!==q||S[12]!==H||S[13]!==z||S[14]!==W?(a=(0,C.B9)({activeAnimation:q,canShowMilestone:H,completedSteps:z,delayedAnimation:W}),S[11]=q,S[12]=H,S[13]=z,S[14]=W,S[15]=a):a=S[15];let{pendingSteps:Y,renderableSteps:Q,shouldDelayNonMilestoneSteps:J}=a,ee=null!==q,et=Y.size>0;S[16]!==q||S[17]!==F||S[18]!==Q?(s=(0,C.Vz)(q)>0&&Q.has("gem")&&!F,S[16]=q,S[17]=F,S[18]=Q,S[19]=s):s=S[19];let en=s,ea=q?.type??null;S[20]!==ea?(r=(0,C.M5)(ea),S[20]=ea,S[21]=r):r=S[21];let es=r,er=es.text,ei=es.audio;S[22]!==ei||S[23]!==F||S[24]!==Y?(i=!F&&!Y.has("milestone")&&ei,S[22]=ei,S[23]=F,S[24]=Y,S[25]=i):i=S[25];let el=i;S[26]!==q||S[27]!==J?(l=()=>{if(!q||!J)return;let e=setTimeout(()=>{X(q)},C.aI);return()=>{clearTimeout(e)}},o=[q,J],S[26]=q,S[27]=J,S[28]=l,S[29]=o):(l=S[28],o=S[29]),(0,k.useEffect)(l,o),S[30]!==en?(c=()=>{en&&Z.xj.playForeground("https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/mathflow/audio/mathv2/soundEffects/bubbling.mp3")},S[30]=en,S[31]=c):c=S[31],S[32]!==q||S[33]!==en?(d=[q,en],S[32]=q,S[33]=en,S[34]=d):d=S[34],(0,k.useEffect)(c,d),S[35]!==ei||S[36]!==el?(u=()=>{D.current&&(clearTimeout(D.current),D.current=null),el&&ei&&(D.current=setTimeout(()=>{Z.xj.playForeground(ei),D.current=null},1e3))},_=[ei,el],S[35]=ei,S[36]=el,S[37]=u,S[38]=_):(u=S[37],_=S[38]),(0,k.useEffect)(u,_),S[39]!==R||S[40]!==ee||S[41]!==et?(m=()=>{ee&&!et&&R()},p=[R,ee,et],S[39]=R,S[40]=ee,S[41]=et,S[42]=m,S[43]=p):(m=S[42],p=S[43]),(0,k.useEffect)(m,p),S[44]!==q?(v=e=>{$(t=>{if(!q)return t;if(t.activeAnimation!==q)return{activeAnimation:q,completedSteps:new Set([e])};if(t.completedSteps.has(e))return t;let n=new Set(t.completedSteps);return n.add(e),{activeAnimation:t.activeAnimation,completedSteps:n}})},S[44]=q,S[45]=v):v=S[45];let eo=v;S[46]!==q||S[47]!==eo||S[48]!==E?(h=()=>{let e=(0,C.Vz)(q);e>0&&E({gems:e}),eo("gem")},S[46]=q,S[47]=eo,S[48]=E,S[49]=h):h=S[49];let ec=h;S[50]!==G||S[51]!==U?(b=()=>{(0,w.X8)("Milestone_Animation_playing",{...G(),animation_style:"rive",milestone_number:U})},S[50]=G,S[51]=U,S[52]=b):b=S[52];let ed=b;S[53]!==G?(x=()=>{(0,w.X8)("RunningMonsters_Animation_playing",{...G(),animation_style:"rive"})},S[53]=G,S[54]=x):x=S[54];let eu=x,{data:e_}=(0,O.lr)(),em=e_?.level_state||"intro";S[55]!==L?(g=()=>()=>{D.current&&clearTimeout(D.current),L()},S[55]=L,S[56]=g):g=S[56],S[57]!==L||S[58]!==em?(y=[L,em],S[57]=L,S[58]=em,S[59]=y):y=S[59],(0,k.useEffect)(g,y),S[60]!==K||S[61]!==ee||S[62]!==Q?(N=(({activeRiveMilestoneConfig:e,hasActiveAnimation:t,renderableSteps:n})=>{let a=t&&n.has("compliment"),s=t&&n.has("gem"),r=t&&n.has("milestone")&&null!==e,i=t&&n.has("running_monsters");return{shouldRenderCompliment:a,shouldRenderGem:s,shouldRenderRiveMilestone:r,shouldRenderRiveRunningMonsters:i,shouldRenderScrim:r||i}})({activeRiveMilestoneConfig:K,hasActiveAnimation:ee,renderableSteps:Q}),S[60]=K,S[61]=ee,S[62]=Q,S[63]=N):N=S[63];let ep=N;return S[64]!==q||S[65]!==er||S[66]!==K||S[67]!==ec||S[68]!==ed||S[69]!==eu||S[70]!==eo||S[71]!==U||S[72]!==ep?(P={activeAnimation:q,activeCompliment:er,activeRiveMilestoneConfig:K,handleGemAnimationEnd:ec,handleMilestoneAnimationStart:ed,handleRunningMonstersAnimationStart:eu,markStepComplete:eo,milestoneNumber:U,...ep},S[64]=q,S[65]=er,S[66]=K,S[67]=ec,S[68]=ed,S[69]=eu,S[70]=eo,S[71]=U,S[72]=ep,S[73]=P):P=S[73],P})();if(n[0]!==s||n[1]!==r||n[2]!==i||n[3]!==a||n[4]!==l||n[5]!==o||n[6]!==c||n[7]!==d||n[8]!==u||n[9]!==_||n[10]!==m||n[11]!==p||n[12]!==v){let e,h,b,x,f,j="u"<typeof document?null:d
1ocument.querySelector("[data-gem-portal-target]");n[14]!==v?(e=(0,g.jsx)(e_,{animateIn:v}),n[14]=v,n[15]=e):e=n[15],n[16]!==i||n[17]!==o||n[18]!==d||n[19]!==m?(h=m?(0,g.jsx)(eC,{audioUrl:i.audioUrl,milestoneNumber:i.milestoneNumber,onComplete:()=>{d("milestone")},onStart:o,riveUrl:i.riveUrl,stateMachine:i.stateMachine}):null,n[16]=i,n[17]=o,n[18]=d,n[19]=m,n[20]=h):h=n[20],n[21]!==c||n[22]!==d||n[23]!==p?(b=p?(0,g.jsx)(eB,{onAnimationEnd:()=>{d("running_monsters")},onAnimationStart:c}):null,n[21]=c,n[22]=d,n[23]=p,n[24]=b):b=n[24],n[25]!==s||n[26]!==r||n[27]!==d||n[28]!==u?(x=u?(0,g.jsx)(eh,{gems:(0,C.Vz)(s),onAnimationEnd:()=>{d("compliment")},text:r}):null,n[25]=s,n[26]=r,n[27]=d,n[28]=u,n[29]=x):x=n[29],n[30]!==a||n[31]!==h||n[32]!==b||n[33]!==x?(f=(0,g.jsxs)("div",{className:eD().layer,children:[a,h,b,x]}),n[30]=a,n[31]=h,n[32]=b,n[33]=x,n[34]=f):f=n[34],t=(0,g.jsxs)("div",{className:eD().container,children:[e,f,_&&j?(0,em.createPortal)((0,g.jsx)(eg,{onAnimationEnd:l}),j):null]}),n[0]=s,n[1]=r,n[2]=i,n[3]=a,n[4]=l,n[5]=o,n[6]=c,n[7]=d,n[8]=u,n[9]=_,n[10]=m,n[11]=p,n[12]=v,n[13]=t}else t=n[13];return t};var eH=n(87833),ez=n(51599),eW=n(15496),eX=n.n(eW);let eY=e=>{let t,n,a=(0,f.c)(3),{handleClick:s}=e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)("span",{className:eX().x,children:"X"}),a[0]=t):t=a[0],a[1]!==s?(n=(0,g.jsx)(ez.O,{className:eX().closeButton,onClick:s,children:t}),a[1]=s,a[2]=n):n=a[2],n};var eQ=n(82168),eZ=n.n(eQ);let eJ=()=>{let e,t,n,a,s,r,i,l,o,c,d,u,_=(0,f.c)(24),m=(0,j.r8)(e0),p=(0,j.r8)(e1);return _[0]!==m?(e=()=>{m(!1),(0,w.X8)("Exit Modal Closed",{clicked_on:"background"})},_[0]=m,_[1]=e):e=_[1],_[2]!==m?(t=(0,g.jsx)("div",{className:eZ().closeButton,children:(0,g.jsx)(eY,{handleClick:()=>{m(!1),(0,w.X8)("Exit Modal Closed",{clicked_on:"close_button"})}})}),_[2]=m,_[3]=t):t=_[3],_[4]===Symbol.for("react.memo_cache_sentinel")?(n=(0,g.jsx)("div",{className:eZ().title,children:"Leave?"}),_[4]=n):n=_[4],_[5]===Symbol.for("react.memo_cache_sentinel")?(a=(0,g.jsxs)("div",{className:eZ().subtitle,children:["Are you sure you want to leave?",(0,g.jsx)("br",{}),"You may lose your progress for this level."]}),_[5]=a):a=_[5],_[6]!==m?(s=()=>{m(!1),(0,w.X8)("Exit Modal Closed",{clicked_on:"stay_button"})},_[6]=m,_[7]=s):s=_[7],_[8]===Symbol.for("react.memo_cache_sentinel")?(r=(0,g.jsx)("span",{className:eZ().primaryButtonText,children:"Stay"}),_[8]=r):r=_[8],_[9]!==s?(i=(0,g.jsx)(E.Ot,{className:eZ().primaryButton,onClick:s,children:r}),_[9]=s,_[10]=i):i=_[10],_[11]!==p||_[12]!==m?(l=()=>{m(!1),p(y.jNk.MAP),(0,w.X8)("Exit Modal Confirmed",{clicked_on:"leave_button"})},_[11]=p,_[12]=m,_[13]=l):l=_[13],_[14]===Symbol.for("react.memo_cache_sentinel")?(o=(0,g.jsx)("span",{className:eZ().secondaryButtonText,children:"Leave"}),_[14]=o):o=_[14],_[15]!==l?(c=(0,g.jsx)(E.Ot,{className:eZ().secondaryButton,onClick:l,children:o}),_[15]=l,_[16]=c):c=_[16],_[17]!==t||_[18]!==i||_[19]!==c?(d=(0,g.jsxs)("div",{className:eZ().modal,children:[t,n,a,i,c]}),_[17]=t,_[18]=i,_[19]=c,_[20]=d):d=_[20],_[21]!==e||_[22]!==d?(u=(0,g.jsx)(eH.default,{alignItems:"center",fadeBackground:!0,isOpen:!0,onClickOverlay:e,children:d}),_[21]=e,_[22]=d,_[23]=u):u=_[23],u};function e0(e){return e.unifiedProduct.actions.setIsExitModalOpen}function e1(e){return e.unifiedProduct.actions.setGameState}var e2=n(1440),e3=n.n(e2);let e4=e=>{let t,n,a=(0,f.c)(5),{position:s,studentPet:r}=e,i=`${e3().container} ${e3()[s]}`;return a[0]!==r?(t=(0,g.jsx)(eM,{studentPet:r}),a[0]=r,a[1]=t):t=a[1],a[2]!==i||a[3]!==t?(n=(0,g.jsx)("div",{className:i,children:t}),a[2]=i,a[3]=t,a[4]=n):n=a[4],n};var e5=n(98519),e8=n(6369),e6=n(16644),e7=n.n(e6);let e9=e=>{let t,n,a,s=(0,f.c)(7),{subtitle:r,title:i}=e;return s[0]!==i?(t=(0,g.jsx)("div",{className:e7().title,children:i}),s[0]=i,s[1]=t):t=s[1],s[2]!==r?(n=r?(0,g.jsx)("div",{className:e7().subtitle,children:r}):null,s[2]=r,s[3]=n):n=s[3],s[4]!==t||s[5]!==n?(a=(0,g.jsxs)("div",{className:e7().header,children:[t,n]}),s[4]=t,s[5]=n,s[6]=a):a=s[6],a};var te=n(25616),tt=n.n(te);let tn=()=>{let e,t,n,a,s,r,i,l,o,c,d,u=(0,f.c)(33),{isEnabled:_}=(0,U.f)(),{data:m}=(0,O.lr)(),{data:p}=(0,O.LH)(),v=p?.studentPets,{data:h}=(0,O.Ox)(),b=(0,j.r8)(ta),x=(0,j.r8)(ts)===y.aGi.ALL_PETS_OVERLAY,C=v?.length??0,N=(0,j.r8)(tr),P=V();u[0]!==P||u[1]!==x?(e=()=>{x&&(0,w.X8)("PetInventory_viewed",P())},t=[P,x],u[0]=P,u[1]=x,u[2]=e,u[3]=t):(e=u[2],t=u[3]),(0,k.useEffect)(e,t),u[4]!==m?.level_state||u[5]!==_||u[6]!==N?(n=()=>{N(_&&m?.level_state==="pet_customizer"?y.aGi.PET_CUSTOMIZER_MODAL:y.aGi.LEARNING_ACTIVITY_OVERLAY)},u[4]=m?.level_state,u[5]=_,u[6]=N,u[7]=n):n=u[7];let S=n;u[8]!==P||u[9]!==h||u[10]!==N||u[11]!==b||u[12]!==v?(a=v?.map(e=>{let t=h?.find(t=>
1t.id===e.pet_id);return t?(0,g.jsxs)("div",{className:`${tt().allPetsPetInnerContainer} clickable ${tt().allPetsPetPluse}`,onClick:()=>{b(e.id),N(y.aGi.PET_CUSTOMIZER_MODAL),(0,w.X8)("PetCustomizer_viewed",P())},children:[(0,g.jsx)(ew.i,{alt:"",className:"map-game-element-img",placeholder:e8.qF.environmentImages[t.environment].imagePlaceholderUrl,src:e8.qF.environmentImages[t.environment].imageUrl}),(0,g.jsx)(ew.i,{alt:"",className:`map-game-element ${tt().allPetsPetNameWoodPlack}`,placeholder:e8.qF.allPetsContainerWood.imagePlaceholderUrl,src:e8.qF.allPetsContainerWood.imageUrl}),(0,g.jsx)("div",{className:`map-game-element ${tt().primaryText} ${tt().allPetsPetNameText}`,children:t.name}),(0,g.jsxs)("div",{className:`map-game-element ${tt().allPetsPetPowerIcon}`,children:[(0,g.jsx)(ew.i,{alt:"",className:"map-game-element-img",placeholder:e8.qF.ribbonLightblue3.imagePlaceholderUrl,src:e8.qF.ribbonLightblue3.imageUrl}),(0,g.jsx)("div",{className:`map-game-element ${tt().primaryText} ${tt().allPetsPetPowerNumber}`,children:e.power_level})]}),(0,g.jsx)("div",{className:`map-game-element ${tt().allPetsPet}`,children:(0,g.jsx)(eM,{studentPet:e})})]},e.id):null}),u[8]=P,u[9]=h,u[10]=N,u[11]=b,u[12]=v,u[13]=a):a=u[13];let E=a;u[14]!==h||u[15]!==v?(s=((e,t)=>{if(!e)return t??[];if(!t)return[];let n=new Set(e.map(e=>e.pet_id));return t.filter(e=>!n.has(e.id))})(v,h)?.map(ti),u[14]=h,u[15]=v,u[16]=s):s=u[16];let I=s;u[17]!==E||u[18]!==I?(r=(0,g.jsxs)("div",{className:`map-game-element ${tt().allPetsPetsOuterContainer}`,children:[E,I]}),u[17]=E,u[18]=I,u[19]=r):r=u[19],u[20]!==S?(i=(0,g.jsx)("div",{className:tt().closeButtonContainer,children:(0,g.jsx)(eY,{handleClick:S})}),u[20]=S,u[21]=i):i=u[21];let T=`~${C}~`;return u[22]!==T?(l=(0,g.jsx)("div",{className:tt().headerContainer,children:(0,g.jsx)(e9,{subtitle:T,title:"Pets"})}),u[22]=T,u[23]=l):l=u[23],u[24]!==i||u[25]!==l?(o=(0,g.jsxs)("div",{className:tt().blueStripedHeader,children:[i,l]}),u[24]=i,u[25]=l,u[26]=o):o=u[26],u[27]!==r||u[28]!==o?(c=(0,g.jsx)("div",{className:tt().modal,children:(0,g.jsxs)("div",{className:`map-game-container ${tt().mapGameContainerMinHeight}`,children:[r,o]})}),u[27]=r,u[28]=o,u[29]=c):c=u[29],u[30]!==x||u[31]!==c?(d=(0,g.jsx)(eH.default,{fadeBackground:!0,isOpen:x,children:c}),u[30]=x,u[31]=c,u[32]=d):d=u[32],d};function ta(e){return e.unifiedProduct.actions.setSelectedStudentPetId}function ts(e){return e.unifiedProduct.level.overlay}function tr(e){return e.unifiedProduct.actions.setLevelOverlay}function ti(e){return(0,g.jsx)(k.Fragment,{children:(0,g.jsxs)("div",{className:tt().allPetsPetInnerContainer,children:[(0,g.jsx)(ew.i,{alt:"",className:"map-game-element-img",placeholder:e8.qF.environmentImages[e.environment].imagePlaceholderUrl,src:e8.qF.environmentImages[e.environment].imageUrl}),(0,g.jsx)(ew.i,{alt:"",className:`map-game-element ${tt().allPetsPetNameWoodPlack}`,placeholder:e8.qF.allPetsContainerWood.imagePlaceholderUrl,src:e8.qF.allPetsContainerWood.imageUrl}),(0,g.jsx)("div",{className:`map-game-element ${tt().primaryText} ${tt().allPetsPetNameText}`,children:e.name}),(0,g.jsx)("div",{className:`map-game-element ${tt().allPetsQuestionMark}`,children:(0,g.jsx)(ew.i,{alt:"",className:"map-game-element-img",placeholder:e8.qF.blueQuestionMark.imagePlaceholderUrl,src:e8.qF.blueQuestionMark.imageUrl})})]},e.id)},e.id)}var tl=n(59428),to=n.n(tl);let tc=e=>{let t,n,a,s=(0,f.c)(5),{onClick:r}=e;return s[0]!==r?(t=(0,g.jsx)("button",{className:to().button,onClick:r,type:"button"}),s[0]=r,s[1]=t):t=s[1],s[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,g.jsx)("img",{alt:"arrow",className:to().icon,src:"https://assets.adaptedmind.com/up/base-assets/right-arrow.svg"}),s[2]=n):n=s[2],s[3]!==t?(a=(0,g.jsx)("div",{className:to().wrapper,children:(0,g.jsxs)(E.Ot,{children:[t,n]})}),s[3]=t,s[4]=a):a=s[4],a};var td=n(16220),tu=n.n(td);let t_=e=>{let t,n,a=(0,f.c)(7),{bounceDistance:s,className:r,fadeOutDelayMs:i,rotation:l,visible:o}=e,c=void 0===s?"22px":s;if(!o)return null;let d=`${i??0}ms`,u=`${void 0===l?0:l}deg`;a[0]!==c||a[1]!==d||a[2]!==u?(t={"--tutorial-pointer-bounce-distance":c,"--tutorial-pointer-fade-out-delay":d,"--tutorial-pointer-rotation":u},a[0]=c,a[1]=d,a[2]=u,a[3]=t):t=a[3];let _=t,m=`${tu().pointer} ${void 0===i?"":tu().fadesOut} ${r??""}`;return a[4]!==_||a[5]!==m?(n=(0,g.jsx)("img",{alt:"","aria-hidden":"true",className:m,draggable:!1,src:"https://assets.adaptedmind.com/up/base-assets/hand-indicator.png",style:_}
1),a[4]=_,a[5]=m,a[6]=n):n=a[6],n};var tm=n(69602),tp=n.n(tm);let tv=e=>{let t,n,a,s,r,i,l,o=(0,f.c)(23),{isEnabled:c,isVisible:d,onClick:u,showTutorialHandIndicator:_,variant:m}=e,p=void 0!==_&&_,v=d?"visible":"hidden";o[0]!==v?(t={visibility:v},o[0]=v,o[1]=t):t=o[1];let h=t;if(m===y.AqZ.NONE)return null;o[2]!==m?(n=(e=>{switch(e){case y.AqZ.CHECKMARK:case y.AqZ.INCORRECT_END:case y.AqZ.PRETEST_CHECKMARK:return{alt:"Checkmark enabled",source:"https://assets.adaptedmind.com/up/base-assets/checkmark-enabled.svg"};case y.AqZ.CLAIM:return{alt:"Claim",source:"https://assets.adaptedmind.com/up/base-assets/claim.svg"};case y.AqZ.NONE:return console.error("PrimaryCTAVariant.NONE is not a valid variant"),{alt:"None",source:""};case y.AqZ.RIGHT_ARROW:return{alt:"Right arrow",source:"https://assets.adaptedmind.com/up/base-assets/right-arrow.svg"};case y.AqZ.WATCH_TO_CLAIM:return{alt:"Watch to claim",source:"https://assets.adaptedmind.com/up/base-assets/watch-to-claim.svg"};default:return(0,C.Oc)(e)}})(m),o[2]=m,o[3]=n):n=o[3];let{alt:b,source:x}=n,j=m!==y.AqZ.CLAIM&&m!==y.AqZ.WATCH_TO_CLAIM?tp().short:"",N=`${tp().wrapper} ${j} ${tp()[m]}`;o[4]!==p?(a=(0,g.jsx)(t_,{bounceDistance:"2.4vw",className:tp().handIndicator,rotation:45,visible:p}),o[4]=p,o[5]=a):a=o[5];let P=`${tp().button} ${c?tp().enabled:tp().disabled} ${tp()[m]}`,S=!c,I=c?"submit":"button";return o[6]!==u||o[7]!==h||o[8]!==P||o[9]!==S||o[10]!==I?(s=(0,g.jsx)("button",{className:P,disabled:S,onClick:u,style:h,type:I}),o[6]=u,o[7]=h,o[8]=P,o[9]=S,o[10]=I,o[11]=s):s=o[11],o[12]!==b||o[13]!==x?(r=(0,g.jsx)("img",{alt:b,className:tp().icon,src:x}),o[12]=b,o[13]=x,o[14]=r):r=o[14],o[15]!==c||o[16]!==s||o[17]!==r?(i=(0,g.jsxs)(E.Ot,{enabled:c,children:[s,r]}),o[15]=c,o[16]=s,o[17]=r,o[18]=i):i=o[18],o[19]!==i||o[20]!==N||o[21]!==a?(l=(0,g.jsxs)("div",{className:N,children:[a,i]}),o[19]=i,o[20]=N,o[21]=a,o[22]=l):l=o[22],l};var th=n(28947),tb=n(67749),tx=n(64724),tg=n.n(tx);let tf=e=>{let t,n,a,s,r,i,l,o,c,d,u,_,m,p,v=(0,f.c)(37),{children:h,height:b,onClick:x,width:j}=e,{startScrolling:C,stopScrolling:N}=(0,th.U)(),[P,S]=(0,k.useState)(y.mqT.TOP),E=(0,k.useRef)(null),[I,w]=(0,k.useState)(!1),T=(0,k.useRef)(null);v[0]!==C?(t=e=>{if(E.current){let{viewport:t}=E.current.osInstance().elements();C(t,e)}},v[0]=C,v[1]=t):t=v[1];let M=t;v[2]!==N?(n=()=>{N()},v[2]=N,v[3]=n):n=v[3];let O=n;v[4]===Symbol.for("react.memo_cache_sentinel")?(a=e=>{e.state().overflowAmount.y>0?w(!0):w(!1),T.current||(T.current=document.querySelector(".os-scrollbar-vertical .os-scrollbar-handle"))},v[4]=a):a=v[4];let A=a;v[5]!==b||v[6]!==j?(s={height:b,position:"relative"},j&&(s.width=j),v[5]=b,v[6]=j,v[7]=s):s=v[7];let L=`${tg().scrollbar} ${I?tg().scrollbarPadded:""}`;v[8]===Symbol.for("react.memo_cache_sentinel")?(r={initialized:A,scroll:(e,t)=>{let{clientHeight:n,scrollHeight:a,scrollTop:s}=t.currentTarget,r=Math.max(Math.min(a-(n+10),40),0);s<=r?S(y.mqT.TOP):s+n>=a-r?S(y.mqT.BOTTOM):S(y.mqT.OFFSET)},updated:A},v[8]=r):r=v[8],v[9]===Symbol.for("react.memo_cache_sentinel")?(i={scrollbars:{theme:"os-theme-unified"}},v[9]=i):i=v[9],v[10]!==h||v[11]!==x||v[12]!==L?(l=(0,g.jsx)(tb.r,{className:L,defer:!0,events:r,onClick:x,options:i,ref:E,children:h}),v[10]=h,v[11]=x,v[12]=L,v[13]=l):l=v[13];let R=`${tg().button} ${tg().upButton} ${(P===y.mqT.TOP||!I)&&tg().hidden}`;v[14]!==M?(o=()=>{M(y.YA3.UP)},v[14]=M,v[15]=o):o=v[15],v[16]!==M?(c=()=>{M(y.YA3.UP)},v[16]=M,v[17]=c):c=v[17],v[18]!==O||v[19]!==c||v[20]!==R||v[21]!==o?(d=(0,g.jsx)("img",{className:R,draggable:!1,onContextMenu:tj,onMouseDown:o,onMouseLeave:O,onMouseUp:O,onTouchEnd:O,onTouchStart:c,src:"https://assets.adaptedmind.com/up/base-assets/scroll-up-button.svg"}),v[18]=O,v[19]=c,v[20]=R,v[21]=o,v[22]=d):d=v[22];let B=`${tg().button} ${(P===y.mqT.BOTTOM||!I)&&tg().hidden}`;return v[23]!==M?(u=()=>{M(y.YA3.DOWN)},v[23]=M,v[24]=u):u=v[24],v[25]!==M?(_=()=>{M(y.YA3.DOWN)},v[25]=M,v[26]=_):_=v[26],v[27]!==O||v[28]!==B||v[29]!==u||v[30]!==_?(m=(0,g.jsx)("img",{className:B,draggable:!1,onContextMenu:ty,onMouseDown:u,onMouseLeave:O,onMouseUp:O,onTouchEnd:O,onTouchStart:_,src:"https://assets.adaptedmind.com/up/base-assets/scroll-down-button-v2.svg"}),v[27]=O,v[28]=B,v[29]=u,v[30]=_,v[31]=m):m=v[31],v[32]!==s||v[33]!==d||v[34]!==m||v[35]!==l?(p=(0,g.jsxs)("div",{style:s,children:[l,d,m]}),v[32]=s,v[33]=d,v[34]=m,v[35]=l,v[36]=p):p=v[36],p};function tj(e){e.preventDefault()}function ty(e){e.preventDefault()}
1var tC=n(93207),tN=n.n(tC);let tP=e=>{let t,n=(0,f.c)(4),{bookPageIndex:a}=e,{layoutType:s,pages:r}=(()=>{let e,t=(0,f.c)(3),{data:n}=(0,O.Hj)(),a=n?.book_pages,s=n?.book.layout_type;return t[0]!==s||t[1]!==a?(e={layoutType:s,pages:a},t[0]=s,t[1]=a,t[2]=e):e=t[2],e})();return!r||r?.length===0||a>=r.length?null:(n[0]!==a||n[1]!==s||n[2]!==r?(t=(()=>{switch(s){case y.sXo.ONE_PAGE_PICTURE:return(0,g.jsx)("div",{className:tN().bookPageImgContainer,children:r.map((e,t)=>(0,g.jsx)("img",{alt:"Book Page",className:`${tN().bookPageImg} ${a===t?tN().hasOpacity:""}`,src:e.image_url},e.id))});case y.sXo.TEXT:return(0,g.jsx)(tf,{height:"100%",width:"100%",children:(0,g.jsx)("div",{className:tN().textBook,dangerouslySetInnerHTML:{__html:r[a].content}})});case y.sXo.TWO_PAGE_PICTURE:return(0,g.jsxs)("div",{className:tN().twoPageContainer,children:[(0,g.jsx)("div",{className:tN().bookPageImgContainer,children:r.map((e,t)=>t%2==1?null:(0,g.jsx)("img",{alt:"Book Page",className:`${tN().bookPageImg} ${tN().leftPage} ${2*a===t?tN().hasOpacity:""}`,src:e.image_url},e.id))}),(0,g.jsx)("div",{className:tN().bookPageImgContainer,children:r.map((e,t)=>t%2==0?null:(0,g.jsx)("img",{alt:"Book Page",className:`${tN().bookPageImg} ${tN().rightPage} ${2*a+1===t?tN().hasOpacity:""}`,src:e.image_url},e.id))})]});default:return null}})(),n[0]=a,n[1]=s,n[2]=r,n[3]=t):t=n[3],t)};var tS=n(26644),tE=n.n(tS);function tI(e){return e.unifiedProduct.actions.setBookPartReviewOverlayIndex}function tw(e){return e.unifiedProduct.reading.bookPartReviewOverlayIndex}function tT(e){return e.unifiedProduct.actions.setLevelOverlay}let tk=()=>{let e,t,n,a,s,r,i,l,o,c=(0,f.c)(21),{bookPartReviewOverlayIndex:d,clickLeftCTA:u,clickRightCTA:_,handleCloseClicked:m,readingBookPartActivity:p,showLeftCTA:v,showRightCTA:h}=(()=>{let e,t,n,a,s,r=(0,f.c)(20),{data:i}=(0,O.Hj)(),l=(0,j.r8)(tI),o=(0,j.r8)(tw),c=(0,j.r8)(tT);r[0]!==i.book.layout_type||r[1]!==i.book_pages?.length?(e=i?.book_pages?.length??0,i.book.layout_type===y.sXo.TWO_PAGE_PICTURE&&(e=Math.ceil(e/2)),r[0]=i.book.layout_type,r[1]=i.book_pages?.length,r[2]=e):e=r[2],r[3]!==c?(t=()=>{c(y.aGi.LEARNING_ACTIVITY_OVERLAY)},r[3]=c,r[4]=t):t=r[4];let d=t,u=o<e-1,_=o>0;r[5]!==o||r[6]!==e||r[7]!==l?(n=()=>{l(Math.min(o+1,e-1))},r[5]=o,r[6]=e,r[7]=l,r[8]=n):n=r[8];let m=n;r[9]!==o||r[10]!==l?(a=()=>{l(Math.max(o-1,0))},r[9]=o,r[10]=l,r[11]=a):a=r[11];let p=a;return r[12]!==o||r[13]!==p||r[14]!==m||r[15]!==d||r[16]!==i||r[17]!==_||r[18]!==u?(s={bookPartReviewOverlayIndex:o,clickLeftCTA:p,clickRightCTA:m,handleCloseClicked:d,readingBookPartActivity:i,showLeftCTA:_,showRightCTA:u},r[12]=o,r[13]=p,r[14]=m,r[15]=d,r[16]=i,r[17]=_,r[18]=u,r[19]=s):s=r[19],s})();return p?(c[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)(e_,{animateIn:!0}),c[0]=e):e=c[0],c[1]!==m?(t=(0,g.jsx)("div",{className:tE().closeButtonContainer,children:(0,g.jsx)(eY,{handleClick:m})}),c[1]=m,c[2]=t):t=c[2],c[3]!==u||c[4]!==v?(n=v?(0,g.jsx)(tc,{onClick:u}):null,c[3]=u,c[4]=v,c[5]=n):n=c[5],c[6]!==t||c[7]!==n?(a=(0,g.jsxs)("div",{className:`${tE().column} ${tE().leftColumn}`,children:[t,n]}),c[6]=t,c[7]=n,c[8]=a):a=c[8],c[9]===Symbol.for("react.memo_cache_sentinel")?(s=(0,g.jsx)(e9,{title:"Review the book"}),c[9]=s):s=c[9],c[10]!==d?(r=(0,g.jsxs)("div",{className:tE().column,children:[s,(0,g.jsx)("div",{className:tE().bookPageContainer,children:(0,g.jsx)(tP,{bookPageIndex:d})})]}),c[10]=d,c[11]=r):r=c[11],c[12]!==_||c[13]!==h?(i=h?(0,g.jsx)(tv,{isEnabled:!0,isVisible:!0,onClick:_,variant:y.AqZ.RIGHT_ARROW}):null,c[12]=_,c[13]=h,c[14]=i):i=c[14],c[15]!==i?(l=(0,g.jsx)("div",{className:`${tE().column} ${tE().rightColumn}`,children:i}),c[15]=i,c[16]=l):l=c[16],c[17]!==a||c[18]!==r||c[19]!==l?(o=(0,g.jsxs)(k.Fragment,{children:[e,(0,g.jsxs)("div",{className:tE().container,children:[a,r,l]})]}),c[17]=a,c[18]=r,c[19]=l,c[20]=o):o=c[20],o):null};var tM=n(77962),tO=n.n(tM);let tA=e=>{let t,n=(0,f.c)(3),{label:a,onClick:s}=e;return n[0]!==a||n[1]!==s?(t=(0,g.jsx)(E.Ot,{children:(0,g.jsx)("button",{className:tO().container,onClick:s,children:a})}),n[0]=a,n[1]=s,n[2]=t):t=n[2],t};var tL=n(96144),tR=n.n(tL);let tB=e=>{let t,n,a,s,r,i,l=(0,f.c)(20),{handleClickButton:o,primaryButtonsEnabled:c,primaryVariant:d,secondaryVariant:u}=e;l[0]!==o||l[1]!==d?(t=()=>{o(y.vpu.SECONDARY,d)},l[0]=o,l[1]=d,l[2]=t):t=l[2];let _=t;l[3]!==o||l[4]!==d?(n=()=>{o(y.vpu.PRIMARY,d)},l[3]=o,l[4]=d,l[5]=n):n=l[5];let m=n;return d===y.AqZ.NONE?null:(l[6]!==_||l[7]!==u?(a=u===y.wsu.I_DONT_KNOW?(0,g.jsx)("div",{className:tR().secondaryCTA,children:(0,g.jsx)(tA,{label:(0,g.jsxs)(k.Fragment,{children:["I Don't",(0,g.jsx)("br",{}),"Know"]}),onClick:_})}):null,l[6]=_,l[7]=u,l[8]=a):a=l[8],l[9]!==_||l[10]!==u?(s=u===y.wsu.SKIP?(0,g.jsx)("div",{className:tR().secondaryCTA,children:(0,g.jsx)(tA,{label:(0,g.jsx)(k.Fragment,{children:"Skip"}),onClick:_})}):null,l[9]=_,l[10]=u,l[11]=s):s=l[11],l[12]!==m||l[13]!==c||l[14]!==d?(r=(0,g.jsx)(tv,{isEnabled:c,isVisible:!0,onClick:m,variant:d}),l[12]=m,l[13]=c,l[14]=d,l[15]=r):r=l[15],l[16]!==a||l[17]!==s||l[18]!==r?(i=(0,g.jsxs)("div",{className:tR().container,children:[a,s,r]}),l[16]=a,l[17]=s,l[18]=r,l[19]=i):i=l[19],i)};var t$=n(53558),tD=n(63291),tG=n.n(tD);let tq=e=>{switch(e.question_type){case"BLNK":case"VIDEO_BLNK":return e.answers[0].answer_data.answer_array.join(",");case"M":case"VIDEO_M":{let t=e.answers.find(e=>e.correct);if(!t)return"";if(!t.image_url)return t.answer_text;return k.createElement("img",{alt:t.answer_text||"Answer image",src:t.image_url,style:{height:"93%",objectFit:"contain",width:"100%"}})}case"VIDEO_TEXT_INSIDE":case"VIDEO_TEXT_OUTSIDE":if(!e.answers||0===e.answers.length)return"";return[...e.answers].sort((e,t)=>
1e.order-t.order).map(e=>e.answer_text||"").join(",");default:return""}};var tV=n(48012);let tU=e=>{let t,n,a,s,r,i,l,o,c,d,u=(0,f.c)(31),{onVideoEnd:_,tabSelected:m}=e;u[0]!==_?(t={onVideoEnd:_},u[0]=_,u[1]=t):t=u[1];let{correctAnswers:p,handleOnClick:v,handleOnEnd:h,handleOnPause:b,handleOnPlay:x,isVideoPaused:C,question:N,userAnswers:P,videoElement:S}=(({onVideoEnd:e})=>{let t=(0,j.r8)(e=>e.unifiedProduct.math.previousContext),[n,a]=(0,k.useState)(!0),s=(0,k.useRef)(null),{answerData:r,question:i}=t,l=(0,k.useCallback)(()=>{(0,w.X8)("Explanation Video Ended",{is_video_question:!1,question_id:i?.id}),a(!0),e()},[e,i?.id]),o=(0,k.useCallback)(()=>{a(!0)},[]),c=(0,k.useCallback)(()=>{a(!1)},[]),d=(0,k.useCallback)(()=>{(0,w.X8)("Explanation Video Played",{is_video_question:!1,question_id:i?.id}),s?.current&&null!==s.current&&s.current.play()},[i.id]),u=tq(i),_=(0,tV.F)(i,r);return{correctAnswers:u.toString(),handleOnClick:d,handleOnEnd:l,handleOnPause:o,handleOnPlay:c,isVideoPaused:n,question:i,userAnswers:_.toString(),videoElement:s}})(t);u[2]!==v||u[3]!==h||u[4]!==b||u[5]!==x||u[6]!==C||u[7]!==N?.explanation_video_url||u[8]!==m||u[9]!==S?(n=m===y.DxF.VIDEO&&N?.explanation_video_url?(0,g.jsxs)("div",{className:`${tG().contentVideo} ${m===y.DxF.VIDEO?tG().show:""}`,children:[(0,g.jsxs)("video",{className:tG().videoExplanation,controls:!0,onEnded:h,onPause:b,onPlay:x,ref:S,children:[(0,g.jsx)("source",{src:N?.explanation_video_url,type:"video/mp4"}),"Your browser does not support the video tag."]},N?.explanation_video_url),(0,g.jsx)("div",{className:`${tG().videoOverlay} ${C?tG().show:null}`,children:(0,g.jsx)(E.c_,{animation:"funExpand",audioEvent:"hover",backgroundClickable:!0,image:e8.uz.general.images.videoPlayButton,imageClassName:tG().videoPlayButton,onClick:v})})]}):null,u[2]=v,u[3]=h,u[4]=b,u[5]=x,u[6]=C,u[7]=N?.explanation_video_url,u[8]=m,u[9]=S,u[10]=n):n=u[10];let I=`${tG().contentText} ${m===y.DxF.TEXT?tG().show:null}`;u[11]===Symbol.for("react.memo_cache_sentinel")?(a=(0,g.jsx)("h3",{children:"Problem"}),u[11]=a):a=u[11],u[12]!==p?(s=(0,g.jsxs)("p",{className:tG().correctAnswer,children:["Correct answer:"," ",(0,g.jsx)(E.tE,{engine:y.E7d.DEFAULT,inline:!0,text:p})]}),u[12]=p,u[13]=s):s=u[13];let T=N?.question_text||"";return u[14]!==P?(r=[P],u[14]=P,u[15]=r):r=u[15],u[16]!==T||u[17]!==r?(i=(0,g.jsx)(E.tE,{engine:y.E7d.DEFAULT,readonly:!0,styleType:y.KYW.EXPLANATION_TABS,text:T,userAnswers:r}),u[16]=T,u[17]=r,u[18]=i):i=u[18],u[19]!==N?.explanation_text?(l=!!N?.explanation_text&&(0,g.jsxs)(k.Fragment,{children:[(0,g.jsx)("h3",{children:"Explanation"}),(0,g.jsx)(t$.u,{text:N?.explanation_text})]}),u[19]=N?.explanation_text,u[20]=l):l=u[20],u[21]!==s||u[22]!==i||u[23]!==l?(o=(0,g.jsxs)(tf,{height:"100%",width:"100%",children:[a,s,i,l]}),u[21]=s,u[22]=i,u[23]=l,u[24]=o):o=u[24],u[25]!==o||u[26]!==I?(c=(0,g.jsx)("div",{className:I,children:o}),u[25]=o,u[26]=I,u[27]=c):c=u[27],u[28]!==c||u[29]!==n?(d=(0,g.jsxs)("div",{className:tG().tabsContent,children:[n,c]}),u[28]=c,u[29]=n,u[30]=d):d=u[30],d};var tF=n(90739),tK=n.n(tF);function tH(e){return e.unifiedProduct.math.previousContext}let tz=()=>{let e,t,n,a,s,r,i,l,o=(0,f.c)(16),{displayableCorrectAnswer:c,displayableUserAnswer:d,opaque:u}=(()=>{let e,t,n,a,s=(0,f.c)(11),{answerData:r,question:i}=(0,j.r8)(tH);s[0]!==i?(e=tq(i),s[0]=i,s[1]=e):e=s[1];let l=e;s[2]!==r||s[3]!==i?(t=(0,tV.F)(i,r),s[2]=r,s[3]=i,s[4]=t):t=s[4];let o=t;s[5]!==i.question_type?(n=(0,C.V2)(i.question_type),s[5]=i.question_type,s[6]=n):n=s[6];let c=n;return s[7]!==l||s[8]!==o||s[9]!==c?(a={displayableCorrectAnswer:l,displayableUserAnswer:o,opaque:c},s[7]=l,s[8]=o,s[9]=c,s[10]=a):a=s[10],a})(),_=`${tK().incorrectContainer} ${"generic"===u?tK().opaque:""}`;o[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)("div",{className:`${tK().answerBox} ${tK().centered}`,children:(0,g.jsx)("span",{className:tK().answerContent,children:"Incorrect"})}),o[0]=e):e=o[0],o[1]!==_?(t=(0,g.jsx)("div",{className:_,children:e}),o[1]=_,o[2]=t):t=o[2];let m=`${tK().incorrectContainer} ${"specific"===u?tK().opaque:""}`;return o[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,g.jsx)("img",{alt:"Incorrect",className:tK().glyph,src:"https://am-maxcdn-vod2.s3.amazonaws.com/vod/adaptedmind.adaptedmind/plato/up/question-ui/incorrect-glyph.png"}),o[3]=n):n=o[3],o[4]!==d?(a=(0,g.jsxs)("div",{className:tK().answerBox,children:[n,(0,g.jsx)("span",{className:tK().answerContent,children:d})]}),o[4]=d,o[5]=a):a=o[5],o[6]===Symbol.for("react.memo_cache_sentinel")?(s=(0,g.jsx)("img",{alt:"Correct",className:tK().glyph,src:"https://am-maxcdn-vod2.s3.amazonaws.com/vod/adaptedmind.adaptedmind/plato/up/question-ui/correct-glyph.png"}),o[6]=s):s=o[6],o[7]!==c?(r=(0,g.jsxs)("div",{className:tK().answerBox,children:[s,(0,g.jsx)("span",{className:tK().answerContent,children:c})]}),o[7]=c,o[8]=r):r=o[8],o[9]!==m||o[10]!==a||o[11]!==r?(i=(0,g.jsxs)("div",{className:m,children:[a,r]}),o[9]=m,o[10]=a,o[11]=r,o[12]=i):i=o[12],o[13]!==t||o[14]!==i?(l=(0,g.jsxs)("div",{className:tK().container,children:[t,i]}),o[13]=t,o[14]=i,o[15]=l):l=o[15],l};var tW=n(41230),tX=n.n(tW);(a=u||(u={})).TEXT_EXPLANATION="textExplanation",a.VIDEO_EXPLANATION="videoExplanation";let tY={textExplanation:"text-explanation",videoExplanation:"video-explanation"},tQ={textExplanation:"explanation",videoExplanation:"explanation"},tZ=e=>{let t,n,a,s=(0,f.c)(9),{isActive:r,onClick:i,variant:l}=e,o=`${tX().container} ${tX()[tQ[l]]} ${r?tX().active:""}`,c=`https://assets.adaptedmind.com/up/base-assets/button-icons/${tY[l]}${r?"-active":""}.svg`;return s[0]!==c?(t=(0,g.jsx)("img",{className:tX().icon,src:c}),s[0]=c,s[1]=t):t=s[1],s[2]!==i||s[3]!==o||s[4]!==t?(n=(0,g.jsx)("div",{className:o,onClick:i,children:t}),s[2]=i,s[3]=o,s[4]=t,s[5]=n):n=s[5],s[6]!==i||s[7]!==n?(a=(0,g.jsx)(E.Ot,{onClick:i,children:n}),s[6]=i,s[7]=n,s[8]=a):a=s[8],a};var tJ=n(76583),t0=n.n(tJ);let t1=e=>{let t,n,a,s,r=(0,f.c)(12),{hasVideo:i,onTabChange:l,selectedTab:o}=e;r[0]!==i||r[1]!==l||r[2]!==o?(t=i?(0,g.jsx)(tZ,{isActive:o===y.DxF.VIDEO,onClick:()=>{l(y.DxF.VIDEO)},variant:u.VIDEO_EXPLANATION}):null,r[0]=i,r[1]=l,r[2]=o,r[3]=t):t=r[3];let c=o===y.DxF.TEXT;return r[4]!==l?(n=()=>{l(y.DxF.TEXT)},r[4]=l,r[5]=n):n=r[5],r[6]!==c||r[7]!==n?(a=(0,g.jsx)(tZ,{isActive:c,onClick:n,variant:u.TEXT_EXPLANATION}),r[6]=c,r[7]=n,r[8]=a):a=r[8],r[9]!==t||r[10]!==a?(s=(0,g.jsxs)("div",{className:t0().container,children:[t,a]}),r[9]=t,r[10]=a,r[11]=s):s=r[11],s};var t2=n(20781),t3=n(4103),t4=n(46259),t5=n.n(t4);function t8(e){return e.unifiedProduct.math.previousContext}let t6=e=>{let t,n,a=(0,f.c)(10),{onComplete:s}=e;a[0]!==s?(t={onComplete:s},a[0]=s,a[1]=t):t=a[1];
1let{elemColor:r,elemType:i,handleClickElement:l,incorrectClickAnswers:o,order:c,showArrow:d,tagID:u}=(e=>{let t,n,a,s,r,i,l=(0,f.c)(18),{onComplete:o}=e,{mathLesson:c,question:d}=(0,j.r8)(t8),[u,_]=(0,k.useState)(0),m=Number(d?.answers?.[0]?.answer_data.answer_array?.[0]);l[0]===Symbol.for("react.memo_cache_sentinel")?(t={},l[0]=t):t=l[0];let[p,v]=(0,k.useState)(t);if(l[1]!==d)n=d?.question_video_metadata?.length?{elemColor:d.question_video_metadata[0].explanation_num_color,elemType:d.question_video_metadata[0].explanation_elem_type,explanationType:d.question_video_metadata[0].explanation_type}:{elemColor:"",elemType:"",explanationType:""},l[1]=d,l[2]=n;else n=l[2];let{elemColor:h,elemType:b}=n,x=0===u;l[3]!==m?(a=()=>{let e={};for(let t=0;t<m;t+=1)e[t]=0;v(e),_(0)},s=[m],l[3]=m,l[4]=a,l[5]=s):(a=l[4],s=l[5]),(0,k.useEffect)(a,s),l[6]!==m||l[7]!==u||l[8]!==o?(r=e=>{let t=u+1;_(t),v(n=>({...n,[e]:t})),t===m&&setTimeout(()=>{o()},1e3)},l[6]=m,l[7]=u,l[8]=o,l[9]=r):r=l[9];let g=r,y=c?.legacy_tag_id;return l[10]!==h||l[11]!==b||l[12]!==g||l[13]!==p||l[14]!==d.order||l[15]!==x||l[16]!==y?(i={elemColor:h,elemType:b,handleClickElement:g,incorrectClickAnswers:p,order:d.order,showArrow:x,tagID:y},l[10]=h,l[11]=b,l[12]=g,l[13]=p,l[14]=d.order,l[15]=x,l[16]=y,l[17]=i):i=l[17],i})(t);if(a[2]!==r||a[3]!==i||a[4]!==l||a[5]!==o||a[6]!==c||a[7]!==d||a[8]!==u){let e=Object.keys(o).map(e=>{let t=Number.parseInt(e,10),n=o[t],a="custom"===i?`https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/mathflow/images/curriculum/tagId-1/math-curr-problem-incorrect-count-element-tagid-${u}-problemid-${c}-elemid-${t}.png`:`https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/mathflow/images/curriculum/tagId-1/math-curr-problem-incorrect-count-element-tagid-${u}-problemid-${c}.png`;return(0,g.jsx)("div",{className:`${t5().incorrectExplanationCountElement} math-curr-problem-incorrect-count-element-tagid-${u}-problemid-${c}-elemid-${t}`,children:0===n?(0,g.jsxs)("div",{className:`math-curr-problem-incorrect-count-element-tagid-${u}-problemid-${c}-elemid-${t}-img`,children:[d&&0===t?(0,g.jsx)("div",{className:t5().firstExplanationArrow,children:(0,g.jsx)("img",{src:"https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/reading/arrow-gold-right.png"})}):null,(0,g.jsx)(t3.c,{animation:"funExpand",audioEvent:"hover",image:a,onClick:()=>{l(t)}})]}):(0,g.jsx)("div",{className:`${t5().incorrectElementText} ${"white"===r?t5().textWhite:t5().textBlack} math-curr-problem-incorrect-count-element-tagid-${u}-problemid-${c}-elemid-${t}-num ${n>=10?`math-curr-problem-incorrect-count-element-tagid-${u}-problemid-${c}-elemid-${t}-num-small`:""}`,children:n})},t)});n=(0,g.jsx)(k.Fragment,{children:e}),a[2]=r,a[3]=i,a[4]=l,a[5]=o,a[6]=c,a[7]=d,a[8]=u,a[9]=n}else n=a[9];return n};var t7=n(3390),t9=n.n(t7);let ne=e=>{let t,n,a=(0,f.c)(3),{onClick:s}=e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)("img",{className:t9().image,src:"https://assets.adaptedmind.com/up/base-assets/replay-button.svg"}),a[0]=t):t=a[0],a[1]!==s?(n=(0,g.jsx)("button",{className:t9().button,onClick:s,children:t}),a[1]=s,a[2]=n):n=a[2],n};var nt=n(10569),nn=n.n(nt);let na=e=>{let t,n,a,s,r,i,l,o,c,d,u,_=(0,f.c)(31),{onExplanationEnd:m,onReplay:p,question:v,showReplayButton:h,videoID:b}=e,x=(0,k.useRef)(0);_[0]!==v.video_states?(t=v.video_states?.find(ns),_[0]=v.video_states,_[1]=t):t=_[1];let[j,y]=(0,k.useState)(t);_[2]!==v.id?(n=()=>{x.current!==v.id&&(x.current=v.id,(0,w.X8)("Explanation Video Played",{is_video_question:!0,question_id:v.id}))},a=[v.id],_[2]=v.id,_[3]=n,_[4]=a):(n=_[3],a=_[4]),(0,k.useEffect)(n,a),_[5]!==v.video_states?(s=e=>{let t=v.video_states.find(t=>t.state===e);t&&y(t)},_[5]=v.video_states,_[6]=s):s=_[6];let C=s;_[7]!==m||_[8]!==v.id?(r=()=>{(0,w.X8)("Explanation Video Ended",{is_video_question:!0,question_id:v.id}),m()},_[7]=m,_[8]=v.id,_[9]=r):r=_[9];let N=r;_[10]!==p||_[11]!==C?(i=()=>{C("incorrectIntro"),p()},_[10]=p,_[11]=C,_[12]=i):i=_[12];let P=i;_[13]!==N||_[14]!==C?(l=(e,t)=>{t?.data?.next_state&&(C(t.data.next_state),["correctEnd","end","incorrectEnd"].includes(t.data.next_state)&&N())},_[13]=N,_[14]=C,_[15]=l):l=_[15];let S=l;_[16]!==C?(o=()=>{C("incorrectOutro")},_[16]=C,_[17]=o):o=_[17];let E=o,I="incorrectStatic"===j.state;return _[18]!==E||_[19]!==I?(c=I?(0,g.jsx)(t6,{onComplete:E}):null,_[18]=E,_[19]=I,_[20]=c):c=_[20],_[21]!==P||_[22]!==h?(d=h?(0,g.jsx)("div",{className:nn().replayButtonContainer,children:(0,g.jsx)(ne,{onClick:P})}):null,_[21]=P,_[22]=h,_[23]=d):d=_[23],_[24]!==S||_[25]!==N||_[26]!==d||_[27]!==c||_[28]!==b||_[29]!==j?(u=(0,g.jsx)("div",{className:nn().container,children:(0,g.jsxs)(t2.p,{aspectRatio:1.7777777777777777,cuePointSystem:"vtt",id:b,objectFit:"contain",onCuePoint:S,onEnd:N,videoState:j,children:[c,d]},"videoPlayer")}),_[24]=S,_[25]=N,_[26]=d,_[27]=c,_[28]=b,_[29]=j,_[30]=u):u=_[30],u};function ns(e){return"incorrectIntro"===e.state}var nr=n(82820),ni=n.n(nr);function nl(e){return e.unifiedProduct.actions.setLevelOverlay}function no(e){return e.unifiedProduct.math.previousContext}let nc=()=>{let e,t,n,a,s,r,i,l,o,c=(0,f.c)(30),{actionButtonVariant:d,handleClickButton:u,hasVideoExplanation:_,isVideoQuestion:m,onExplanationEnd:p,onReplay:v,onTextProblemVideoEnd:h,question:b,selectedTab:
1x,setSelectedTab:N,showReplayButton:P,videoID:S}=(()=>{let e,t,n,a,s,r,i,l,o,c,d=(0,f.c)(29),u=(0,j.r8)(nl),{mutate:_}=(0,O.Ec)(),{question:m}=(0,j.r8)(no),p=!!m?.explanation_video_url,[v,h]=(0,k.useState)(p?y.DxF.VIDEO:y.DxF.TEXT);if(d[0]!==m)e=m?m.video_type===y.Nuv.ADAPTEDMIND_VIDEO&&m.video?.source===y.$bz.VIMEO?Number.parseInt(m.video.provider_id,10):Number.parseInt(m.video_id,10):0,d[0]=m,d[1]=e;else e=d[1];let b=e,x=m?.question_type;d[2]!==x?(t=(0,C.ij)(x),d[2]=x,d[3]=t):t=d[3];let g=t,N=g?y.AqZ.NONE:p?y.AqZ.WATCH_TO_CLAIM:y.AqZ.CHECKMARK,[P,S]=(0,k.useState)(N);d[4]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{S(y.AqZ.CLAIM)},d[4]=n):n=d[4];let E=n;d[5]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{S(y.AqZ.NONE)},d[5]=a):a=d[5];let I=a;d[6]===Symbol.for("react.memo_cache_sentinel")?(s=()=>{S(y.AqZ.CLAIM)},d[6]=s):s=d[6];let T=s;d[7]!==_||d[8]!==u?(r=e=>{e&&_({gems:10}),u(y.aGi.LEARNING_ACTIVITY_OVERLAY)},d[7]=_,d[8]=u,d[9]=r):r=d[9];let M=r;d[10]!==M?(i=(e,t)=>{switch(e===y.vpu.SECONDARY&&M(!1),t){case y.AqZ.CHECKMARK:M(!1);break;case y.AqZ.CLAIM:M(!0)}},d[10]=M,d[11]=i):i=d[11];let A=i;d[12]!==p||d[13]!==g||d[14]!==m?.id?(l=()=>{g||(0,w.X8)("Math Text Explanation Overlay Opened",{has_video:p,question_id:m?.id})},d[12]=p,d[13]=g,d[14]=m?.id,d[15]=l):l=d[15];let L=m?.id;d[16]!==p||d[17]!==g||d[18]!==L?(o=[L,p,g],d[16]=p,d[17]=g,d[18]=L,d[19]=o):o=d[19],(0,k.useEffect)(l,o);let R=P===y.AqZ.CLAIM;return d[20]!==P||d[21]!==A||d[22]!==p||d[23]!==g||d[24]!==m||d[25]!==v||d[26]!==R||d[27]!==b?(c={actionButtonVariant:P,handleClickButton:A,hasVideoExplanation:p,isVideoQuestion:g,onExplanationEnd:E,onReplay:I,onTextProblemVideoEnd:T,question:m,selectedTab:v,setSelectedTab:h,showReplayButton:R,videoID:b},d[20]=P,d[21]=A,d[22]=p,d[23]=g,d[24]=m,d[25]=v,d[26]=R,d[27]=b,d[28]=c):c=d[28],c})();if(!b)return null;c[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)(e_,{animateIn:!0}),c[0]=e):e=c[0],c[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)("div",{}),c[1]=t):t=c[1],c[2]!==_||c[3]!==m||c[4]!==x||c[5]!==N?(n=m?null:(0,g.jsx)(t1,{hasVideo:_,onTabChange:N,selectedTab:x}),c[2]=_,c[3]=m,c[4]=x,c[5]=N,c[6]=n):n=c[6],c[7]!==m||c[8]!==p||c[9]!==v||c[10]!==h||c[11]!==b||c[12]!==x||c[13]!==P||c[14]!==S?(a=m?(0,g.jsx)(na,{onExplanationEnd:p,onReplay:v,question:b,showReplayButton:P,videoID:S}):(0,g.jsx)(tU,{onVideoEnd:h,tabSelected:x}),c[7]=m,c[8]=p,c[9]=v,c[10]=h,c[11]=b,c[12]=x,c[13]=P,c[14]=S,c[15]=a):a=c[15],c[16]!==n||c[17]!==a?(s=(0,g.jsxs)("div",{className:ni().learningContentContainer,children:[n,a]}),c[16]=n,c[17]=a,c[18]=s):s=c[18],c[19]===Symbol.for("react.memo_cache_sentinel")?(r=(0,g.jsx)(tz,{}),c[19]=r):r=c[19],c[20]!==s?(i=(0,g.jsxs)("div",{className:ni().centerColumn,children:[s,r]}),c[20]=s,c[21]=i):i=c[21];let E=d!==y.AqZ.WATCH_TO_CLAIM,I=d===y.AqZ.WATCH_TO_CLAIM?y.wsu.SKIP:y.wsu.NONE;return c[22]!==d||c[23]!==u||c[24]!==E||c[25]!==I?(l=(0,g.jsx)("div",{className:ni().rightColumn,children:(0,g.jsx)("div",{className:ni().ctasContainer,children:(0,g.jsx)(tB,{handleClickButton:u,primaryButtonsEnabled:E,primaryVariant:d,secondaryVariant:I})})}),c[22]=d,c[23]=u,c[24]=E,c[25]=I,c[26]=l):l=c[26],c[27]!==i||c[28]!==l?
1(o=(0,g.jsxs)(k.Fragment,{children:[e,(0,g.jsxs)("div",{className:ni().outerGrid,children:[t,i,l]})]}),c[27]=i,c[28]=l,c[29]=o):o=c[29],o};var nd=n(98099),nu=n.n(nd);function n_(e){return e.unifiedProduct.level.overlay}function nm(e){return e.unifiedProduct.actions.setLevelOverlay}let np=e=>{let t,n,a,s,r,i=(0,f.c)(20),{variant:l}=e,{handleClick:o,iconType:c}=(e=>{let t,n,a,s=(0,f.c)(14),{data:r}=(0,O.$s)(),{data:i}=(0,O.lr)(),l=(0,j.r8)(n_),o=(0,j.r8)(nm),c=V();s[0]!==l||s[1]!==r?.student_monster_items||s[2]!==e?(t=()=>e!==y.aGi.INCENTIVES_OUTFIT_ROOM||r?.student_monster_items?e===l?"selected":"unselected":"locked",s[0]=l,s[1]=r?.student_monster_items,s[2]=e,s[3]=t):t=s[3];let d=t;s[4]!==i?.level_state||s[5]!==d||s[6]!==c||s[7]!==l||s[8]!==o||s[9]!==e?(n=()=>{if("locked"===d()||e===l)return;o(e);let t=i?.level_state;t&&(0,w.X8)("store"===t?"Level_MonsterStoreCloset_viewed":"MonsterStoreCloset_viewed",c())},s[4]=i?.level_state,s[5]=d,s[6]=c,s[7]=l,s[8]=o,s[9]=e,s[10]=n):n=s[10];let u=n,_=d();return s[11]!==u||s[12]!==_?(a={handleClick:u,iconType:_},s[11]=u,s[12]=_,s[13]=a):a=s[13],a})(l),d=l===y.aGi.INCENTIVES_OUTFIT_ROOM?nu().outfitRoom:nu().store,u=nu()[c];i[0]!==d||i[1]!==u?(t=ee()(d,nu().wrapper,u),i[0]=d,i[1]=u,i[2]=t):t=i[2];let _="locked"!==c,m="locked"===c?"":nu().hidden;i[3]!==m?(n=(0,g.jsx)("img",{alt:"Lock Icon",className:m,src:"https://assets.adaptedmind.com/up/base-assets/lock_icon.svg"}),i[3]=m,i[4]=n):n=i[4];let p=`${l} Selected Icon`,v="selected"===c?"":nu().hidden,h=l===y.aGi.INCENTIVES_OUTFIT_ROOM?"https://assets.adaptedmind.com/up/base-assets/button-icons/incentive-buttons/shirt-icon-dark-red.svg":"https://assets.adaptedmind.com/up/base-assets/button-icons/incentive-buttons/shop-icon-dark-red.svg";i[5]!==p||i[6]!==v||i[7]!==h?(a=(0,g.jsx)("img",{alt:p,className:v,src:h}),i[5]=p,i[6]=v,i[7]=h,i[8]=a):a=i[8];let b=`${l} Unselected Icon`,x="unselected"===c?"":nu().hidden,C=l===y.aGi.INCENTIVES_OUTFIT_ROOM?"https://assets.adaptedmind.com/up/base-assets/button-icons/incentive-buttons/shirt-icon-white.svg":"https://assets.adaptedmind.com/up/base-assets/button-icons/incentive-buttons/shop-icon-white.svg";return i[9]!==b||i[10]!==x||i[11]!==C?(s=(0,g.jsx)("img",{alt:b,className:x,src:C}),i[9]=b,i[10]=x,i[11]=C,i[12]=s):s=i[12],i[13]!==o||i[14]!==a||i[15]!==s||i[16]!==t||i[17]!==_||i[18]!==n?(r=(0,g.jsxs)(E.Ot,{className:t,enabled:_,onClick:o,children:[n,a,s]}),i[13]=o,i[14]=a,i[15]=s,i[16]=t,i[17]=_,i[18]=n,i[19]=r):r=i[19],r};var nv=n(28881),nh=n.n(nv);function nb(e){return e.unifiedProduct.actions.setLevelOverlay}let nx=()=>{let e,t,n,a=(0,f.c)(4),{onClose:s}=(()=>{let e,t=(0,f.c)(5),n=(0,j.r8)(nb),a=(()=>{let{mutateAsync:e}=(0,O.qm)(),{refetch:t}=(0,O.lr)(),{data:n}=(0,O.YL)(),a=(0,j.r8)(e=>e.unifiedProduct.actions.setGameState),s=(0,j.r8)(e=>e.unifiedProduct.actions.setProgressBar);return async()=>{let r;try{let{data:a}=await t(),{response:s}=await e();r=s.level,(0,w.X8)("Level Reached",{level:r,previous_incentive:n?.incentive,previous_subject_content_id:a?.subject_content_id,previous_subject_content_type_id:a?.subject_content_type_id,previous_subject_id:a?.subject_id})}catch(e){ej.A.error("Error completing level:",e)}a(y.jNk.MAP),s({animation:"instant",hasQuizIcon:!1,percentage:0,steps:0})}})(),{data:s}=(0,O.lr)(),r=V();return t[0]!==a||t[1]!==s?.level_state||t[2]!==r||t[3]!==n?(e={onClose:()=>{s?.level_state==="store"&&((0,w.X8)("Level_MonsterStoreCloset_submitted",r()),a()),n(y.aGi.LEARNING_ACTIVITY_OVERLAY)}},t[0]=a,t[1]=s?.level_state,t[2]=r,t[3]=n,t[4]=e):e=t[4],e})();return a[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)("div",{className:nh().outfitRoomButtonContainer,children:(0,g.jsx)(np,{variant:y.aGi.INCENTIVES_OUTFIT_ROOM})}),t=(0,g.jsx)(np,{variant:y.aGi.INCENTIVES_STORE}),a[0]=e,a[1]=t):(e=a[0],t=a[1]),a[2]!==s?(n=(0,g.jsxs)("div",{className:nh().rightButtonsColumn,children:[e,t,(0,g.jsx)("div",{className:nh().primaryCTAContainer,children:(0,g.jsx)(tv,{isEnabled:!0,isVisible:!0,onClick:s,variant:y.AqZ.CHECKMARK})})]}),a[2]=s,a[3]=n):n=a[3],n};var ng=n(31992),nf=n.n(ng);let nj=e=>{let t,n,a,s,r,i=(0,f.c)(16),{className:l,position:o}=e;i[0]!==o?(t={position:o},i[0]=o,i[1]=t):t=i[1];let{handleLeftArrowClick:c,handleRightArrowClick:d,isArrowActive:u,selectedItem:_}=(({position:e})=>{let t=(0,j.r8)(j.M7)??0,{invalidateQuery:n}=(0,O.dT)(),{mutate:a,mutateAsync:s}=(0,O.mF)(),{data:r}=(0,O.lr)(),i=(0,k.useRef)([]),{data:l}=(0,O.$s)(),o=l?.student_monster_items.filter(e=>e.monster_item.subject_id===y.pN.MATH),[c,d]=(0,k.useState)(-1);
1if(0===i.current.length&&o){let t=o.filter(t=>t.metadata.position===e);(t=structuredClone(t)).sort((e,t)=>e.monster_item.unlock_level===t.monster_item.unlock_level?e.monster_item.cost-t.monster_item.cost:e.monster_item.unlock_level-t.monster_item.unlock_level),t.push({id:0}),i.current=t,d(i.current.findIndex((e,t)=>e.is_shown||t===i.current.length-1))}let u=i.current.length>1,_=async e=>{if(-1===c)return;(0,w.X8)(y.CxP.STORE_CLOSET_ITEM_SELECTION_CLICKED,{action:e,level:r.level});let l="next"===e?c+1:c-1;l>=i.current.length&&(l=0),l<0&&(l=i.current.length-1),d(l);try{if(0===i.current[l].id)a({itemId:i.current[c].id,metadata:i.current[c].metadata,show:!1});else{let{response:e}=await s({itemId:i.current[l].id,metadata:i.current[l].metadata,show:!0}),t=e.student_monster_item.metadata.position;for(let n of e.student_monster.student_monster_items)n.id!==e.student_monster_item.id&&n.is_shown&&n.metadata.position===t&&a({itemId:n.id,metadata:n.metadata,show:!1})}}catch(e){ej.A.error("Error updating shown monster item",e),n(O.lH.students.monster(t)),n(O.lH.students.monsterItems(t))}},m={id:i.current[c]?.id??0,imageUrl:i.current[c]?.monster_item?.image_url??""};return i.current[c]?.monster_item?.image_url,{handleLeftArrowClick:()=>{_("previous")},handleRightArrowClick:()=>{_("next")},isArrowActive:u,selectedItem:m}})(t),m=`${l} ${nf().wardrobeBox} box-${o}`;return i[2]!==c||i[3]!==u?(n=(0,g.jsx)(t3.g,{active:u,activeButtonClassname:nf().wardrobeBoxLeftActive,className:nf().wardrobeBoxLeft,handleClick:c,image:"https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/plato/incentives/outfit-room/button-arrow-left.png",inactiveButtonClassName:nf().wardrobeBoxLeftInactive}),i[2]=c,i[3]=u,i[4]=n):n=i[4],i[5]!==d||i[6]!==u?(a=(0,g.jsx)(t3.g,{active:u,activeButtonClassname:nf().wardrobeBoxRightActive,className:nf().wardrobeBoxRight,handleClick:d,image:"https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/plato/incentives/outfit-room/button-arrow-right.png",inactiveButtonClassName:nf().wardrobeBoxRightInactive}),i[5]=d,i[6]=u,i[7]=a):a=i[7],i[8]!==_.id||i[9]!==_.imageUrl?(s=_.id>0?(0,g.jsx)("div",{className:nf().showItem,children:(0,g.jsx)("img",{alt:`Monster outfit item ${_.id}`,className:nf().showItemImg,src:_.imageUrl})}):null,i[8]=_.id,i[9]=_.imageUrl,i[10]=s):s=i[10],i[11]!==m||i[12]!==n||i[13]!==a||i[14]!==s?(r=(0,g.jsxs)("div",{className:m,children:[n,a,s]}),i[11]=m,i[12]=n,i[13]=a,i[14]=s,i[15]=r):r=i[15],r};var ny=n(85681),nC=n.n(ny);let nN=()=>{let e,t=(0,f.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)("div",{className:nC().containerWardrobeOuterPadding,children:(0,g.jsxs)("div",{className:nC().wardrobe,children:[(0,g.jsx)(nj,{position:1}),(0,g.jsx)(nj,{position:2}),(0,g.jsx)(nj,{position:3}),(0,g.jsx)(nj,{position:4})]})}),t[0]=e):e=t[0],e};var nP=n(68777),nS=n.n(nP);function nE(e){return e-1}function nI(e){return e+1}function nw(e){return e.subject_id===y.pN.MATH&&"house"!==e.type}function nT(e,t){return e.unlock_level===t.unlock_level?e.cost-t.cost:e.unlock_level-t.unlock_level}let nk=e=>{let t,n,a,s,r,i,l,o=(0,f.c)(25),{setMostRecentPurchasedItemId:c}=e;o[0]!==c?(t={setMostRecentPurchasedItemId:c},o[0]=c,o[1]=t):t=o[1];let{canGoDown:d,canGoUp:u,currentLevel:_,gems:m,goDown:p,goUp:v,handleItemPurchased:h,items:b}=(e=>{let t,n,a,s,r,i,l=(0,f.c)(19),{setMostRecentPurchasedItemId:o}=e,{mutateAsync:c}=(0,O.Vf)(),{data:d}=(0,O.Vh)(),{data:u}=(0,O.KR)(),_=u?.gems??0;l[0]!==o?(t=()=>()=>{o(0)},n=[o],l[0]=o,l[1]=t,l[2]=n):(t=l[1],n=l[2]),(0,k.useEffect)(t,n);let{data:m}=(0,O.lr)(),{level:p}=m,[v,h]=(0,k.useState)(1);l[3]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{h(nE)},l[3]=a):a=l[3];let b=a;l[4]===Symbol.for("react.memo_cache_sentinel")?(s=()=>{h(nI)},l[4]=s):s=l[4];let x=s,g=v>1,j=[...void 0===d?[]:d].filter(nw).sort(nT),y=Math.floor(j.length/9);0!=j.length%9&&(y+=1);let C=v<y,N=(v-1)*9,P=j.slice(N,N+9);l[5]!==p||l[6]!==c||l[7]!==o?(r=e=>async()=>{await c(e),o(e),(0,w.X8)("monster item purchased",{currentLevel:p})},l[5]=p,l[6]=c,l[7]=o,l[8]=r):r=l[8];let S=r;return l[9]!==C||l[10]!==g||l[11]!==p||l[12]!==_||l[13]!==x||l[14]!==b||l[15]!==S||l[16]!==P||l[17]!==j?(i={canGoDown:C,canGoUp:g,currentLevel:p,gems:_,goDown:x,goUp:b,handleItemPurchased:S,items:P,itemsToShow:j}
1,l[9]=C,l[10]=g,l[11]=p,l[12]=_,l[13]=x,l[14]=b,l[15]=S,l[16]=P,l[17]=j,l[18]=i):i=l[18],i})(t);if(o[2]!==_||o[3]!==m||o[4]!==h||o[5]!==b){let e;o[7]!==_||o[8]!==m||o[9]!==h?(e=e=>{let t=e.student_monster_items&&e.student_monster_items.length>0,n=e.cost>m;return(0,g.jsxs)("div",{className:nS().itemContainer,children:[(0,g.jsx)("div",{className:nS().itemPlaque,children:(0,g.jsx)("div",{className:nS().itemPlaqueText,children:e.name})}),t||_>=e.unlock_level?(0,g.jsx)("img",{alt:e.name,className:nS().itemImage,src:e.image_url}):(0,g.jsx)("img",{alt:"Locked item",className:nS().itemImageLocked,src:"https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/plato/incentives/store/blue_question_mark.png"}),!t&&_<e.unlock_level?(0,g.jsx)("div",{className:nS().lockedLevelContainer,children:(0,g.jsx)("div",{className:nS().levelLockedText,children:`Level ${e.unlock_level}`})}):null,t||n||!(_>=e.unlock_level)?null:(0,g.jsx)(t3.c,{animation:"funExpand",audioEvent:"hover",className:`${nS().purchaseContainer} ${n?nS().cantAffordIt:""}`,image:"https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/plato/incentives/store/button_buy_pink_gem.png",imageClassName:nS().purchaseContainerImage,label:e.cost.toString(),labelClassName:nS().purchaseContainerText,onClick:h(e.id)}),!t&&n&&_>=e.unlock_level?(0,g.jsxs)("div",{className:`${nS().purchaseContainer} ${nS().cantAffordIt}`,children:[(0,g.jsx)("img",{alt:"Buy button",className:nS().purchaseContainerImage,src:"https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/plato/incentives/store/button_buy_pink_gem.png"}),(0,g.jsx)("span",{className:nS().purchaseContainerText,children:e.cost})]}):null,t?(0,g.jsx)("div",{className:nS().ownedIndicator}):null]},e.id)},o[7]=_,o[8]=m,o[9]=h,o[10]=e):e=o[10],n=b.map(e),o[2]=_,o[3]=m,o[4]=h,o[5]=b,o[6]=n}else n=o[6];let x=n;return o[11]!==x?(a=(0,g.jsx)("div",{className:nS().itemsWrapper,children:x}),o[11]=x,o[12]=a):a=o[12],o[13]!==u||o[14]!==v?(s=u?(0,g.jsx)(t3.c,{animation:"funExpand",audioEvent:"hover",className:nS().paginatorButtonsUp,image:"https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/plato/incentives/store/button-arrow-up.png",onClick:v}):(0,g.jsx)("img",{alt:"Up arrow",className:`${nS().paginatorButtonsUp} ${nS().paginatorButtonDisabled}`,src:"https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/plato/incentives/store/button-arrow-up.png"}),o[13]=u,o[14]=v,o[15]=s):s=o[15],o[16]!==d||o[17]!==p?(r=d?(0,g.jsx)(t3.c,{animation:"funExpand",audioEvent:"hover",className:nS().paginatorButtonsDown,image:"https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/plato/incentives/store/button-arrow-down.png",onClick:p}):(0,g.jsx)("img",{alt:"Down arrow",className:`${nS().paginatorButtonsDown} ${nS().paginatorButtonDisabled}`,src:"https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/plato/incentives/store/button-arrow-down.png"}),o[16]=d,o[17]=p,o[18]=r):r=o[18],o[19]!==s||o[20]!==r?(i=(0,g.jsxs)("div",{className:nS().paginatorButtons,children:[s,r]}),o[19]=s,o[20]=r,o[21]=i):i=o[21],o[22]!==a||o[23]!==i?(l=(0,g.jsx)("div",{className:nS().containerShelfOuterPadding,children:(0,g.jsxs)("div",{className:nS().containerShelf,children:[a,i]})}),o[22]=a,o[23]=i,o[24]=l):l=o[24],l};var nM=n(61604),nO=n.n(nM);function nA(e){return e.unifiedProduct.level.overlay}let nL=()=>{let e,t,n,a,s,r,i,l,o,c,d,u,_,m,p=(0,f.c)(31),{isOpen:v,isStore:h,mostRecentPurchasedItemId:b,setMostRecentPurchasedItemId:x,title:C}=(()=>{let e,t=(0,f.c)(5),n=(0,j.r8)(nA),[a,s]=(0,k.useState)(0),r=n===y.aGi.INCENTIVES_STORE,i=n===y.aGi.INCENTIVES_OUTFIT_ROOM,l=r||i;return t[0]!==i||t[1]!==l||t[2]!==r||t[3]!==a?(e={isCloset:i,isOpen:l,isStore:r,mostRecentPurchasedItemId:a,setMostRecentPurchasedItemId:s,title:"Customize Your Monster"},t[0]=i,t[1]=l,t[2]=r,t[3]=a,t[4]=e):e=t[4],e})();if(!v)return null;p[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)("div",{}),p[0]=e):e=p[0],p[1]!==C?(t=(0,g.jsx)(e9,{title:C}),p[1]=C,p[2]=t):t=p[2],p[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,g.jsx)("div",{className:nO().gemScoreboardRightContainer,children:(0,g.jsx)(ec,{})}),p[3]=n):n=p[3],p[4]!==t?(a=(0,g.jsxs)("div",{className:nO().topRow,children:[e,t,n]}),p[4]=t,p[5]=a):a=p[5];let N=`${nO().bottomRow} ${h?nO().withStore:""}`;p[6]!==h||p[7]!==x?(s=h?(0,g.jsx)(nk,{setMostRecentPurchasedItemId:x}):(0,g.jsx)(nN,{}),p[6]=h,p[7]=x,p[8]=s):s=p[8];let P=b||void 0;p[9]!==P?(r=(0,g.jsx)("div",{className:nO().monster,children:(0,g.jsx)(eI,{justPurchasedItemID:P})}),p[9]=P,p[10]=r):r=p[10];let S=`${h?nO().hidden:""} ${nO().wardrobePlatformImg}`;return p[11]!==S?(i=(0,g.jsx)("img",{alt:"Wardrobe Platform",className:S,src:"https://assets.adaptedmind.com/unified-super-skills/incentives-assets/wardrobe-platform.svg"}),p[11]=S,p[12]=i):i=p[12],p[13]!==h||p[14]!==b?(l=h&&0!==b?(0,g.jsxs)(k.Fragment,{children:[(0,g.jsx)("img",{alt:"",className:nO().monsterPurchasedOutfitAnimation,src:`https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/plato/incentives/store/SmokeEffectAroundMonster_450x400px.gif?${b}`},`aa_${b}`),(0,g.jsx)("img",{alt:"",className:nO().monsterPurchasedOutfitAnimationSparkles1,src:`https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/plato/incentives/store/sparkle0001.gif?${b}`},`ab_${b}`),(0,g.jsx)("img",{alt:"",className:nO().monsterPurchasedOutfitAnimationSparkles2,src:`https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/plato/incentives/store/sparkle0001.gif?${b}`},`ac_${b}`)]}):null,p[13]=h,p[14]=b,p[15]=l):l=p[15],p[16]!==l||p[17]!==r||p[18]!==i?(o=(0,g.jsxs)("div",{className:nO().monsterAndPurchaseOutfitAnimationContainer,children:[r,i,l]}),p[16]=l,p[17]=r,p[18]=i,p[19]=o):o=p[19],p[20]===Symbol.for("react.memo_cache_sentinel")?(c=(0,g.jsx)(nx,{}),p[20]=c):c=p[20],p[21]!==o||p[22]!==N||p[23]!==s?(d=(0,g.jsxs)("div",{className:N,children:[s,o,c]}),p[21]=o,p[22]=N,p[23]=s,p[24]=d):d=p[24],p[25]!==d||p[26]!==a?(u=(0,g.jsxs)("div",{className:nO().incentivesPanelContainer,children:[a,d]}),p[25]=d,p[26]=a,p[27]=u):u=p[27],p[28]===Symbol.for("react.memo_cache_sentinel")?(_=(0,g.jsx)(e_,{animateIn:!0}),p[28]=_):_=p[28],p[29]!==u?(m=(0,g.jsxs)(k.Fragment,{children:[u,_]}),p[29]=u,p[30]=m):m=p[30],m};var nR=n(57363),nB=n(55702),n$=n.n(nB);let nD=()=>{let e,t,n,a,s,r,i,l,o,c=(0,f.c)(22),{handleExit:d,handleOnEnd:u,handleOnPause:_,handleOnPlay:m,handlePlayClick:p,isPlaying:v,videoUrl:h}=(()=>{let e=(0,j.r8)(e=>e.unifiedProduct.actions.setLevelOverlay),{data:t}=(0,O.l1)(),n=t?.math_activity_lesson.math_lesson.video_url,a=(0,k.useCallback)(()=>{e(y.aGi.LEARNING_ACTIVITY_OVERLAY),(0,w.X8)("Learn Overlay Closed",{lesson_id:t?.math_activity_lesson.math_lesson.id,question_id:t?.question.id})},[e,t?.math_activity_lesson.math_lesson.id,t?.question.id]),[s,r]=(0,k.useState)(!1),i=(0,k.useCallback)(()=>{(0,w.X8)("Learn Overlay Video Completed",{lesson_id:t?.math_activity_lesson.math_lesson.id,question_id:t?.question.id}),r(!1)},[t?.math_activity_lesson.math_lesson.id,t?.question.id]),l=(0,k.useCallback)(()=>{r(!1)},[]);return{handleExit:a,handleOnEnd:i,handleOnPause:l,handleOnPlay:(0,k.useCallback)(()=>{r(!0)},[]),handlePlayClick:(0,k.useCallback)(()=>{(0,w.X8)("Learn Overlay Video Played",{lesson_id:t?.math_activity_lesson.math_lesson.id,question_id:t?.question.id}),r(!0)},[t?.math_activity_lesson.math_lesson.id,t?.question.id]),isPlaying:s,videoUrl:n}})();c[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)(e_,{animateIn:!0}),c[0]=e):e=c[0],c[1]!==d?(t=(0,g.jsx)("div",{className:`${n$().column} ${n$().leftColumn}`,children:(0,g.jsx)("div",{className:n$().closeButtonContainer,children:(0,g.jsx)(eY,{handleClick:d})})}),c[1]=d,c[2]=t):t=c[2],c[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,g.jsx)(e9,{title:"Learn the Skill"}),c[3]=n):n=c[3],c[4]!==u||c[5]!==_||c[6]!==m||c[7]!==v||c[8]!==h?(a=(0,g.jsx)(nR.A,{className:n$().videoExplanation,controls:!0,height:"100%",onEnded:u,onPause:_,onPlay:m,playing:v,src:h,width:"100%"},h),c[4]=u,c[5]=_,c[6]=m,c[7]=v,c[8]=h,c[9]=a):a=c[9];let b=`${n$().videoOverlay} ${v?"":n$().show}`;return c[10]!==p?(s=(0,g.jsx)(E.c_,{animation:"funExpand",audioEvent:"hover",backgroundClickable:!0,image:e8.uz.general.images.videoPlayButton,imageClassName:n$().videoPlayButton,onClick:p}),c[10]=p,c[11]=s):s=c[11],c[12]!==b||c[13]!==s?(r=(0,g.jsx)("div",{className:b,children:s}),c[12]=b,c[13]=s,c[14]=r):r=c[14],c[15]!==a||c[16]!==r?(i=(0,g.jsxs)("div",{className:n$().column,children:[n,(0,g.jsxs)("div",{className:n$().learningContentContainer,children:[a,r]})]}),c[15]=a,c[16]=r,c[17]=i):i=c[17],c[18]===Symbol.for("react.memo_cache_sentinel")?(l=(0,g.jsx)("div",{}),c[18]=l):l=c[18],c[19]!==t||c[20]!==i?(o=(0,g.jsxs)(k.Fragment,{children:[e,(0,g.jsxs)("div",{className:n$().container,children:[t,i,l]})]}),c[19]=t,c[20]=i,c[21]=o):o=c[21],o};var nG=n(16280),nq=n.n(nG);function nV(e){return e.unifiedProduct.actions.setLevelOverlay}let nU=e=>{let t,n,a,s,r=(0,f.c)(8),{onClick:i}=e,{handleClick:l,petCount:o,renderPetDoor:c}=(()=>{let e,t,n=(0,f.c)(9),{isEnabled:a}=(0,U.f)(),{data:s}=(0,O.lr)(),r=s?.level,i=s?.level_state,{data:l}=(0,O.LH)(),o=l?.studentPets,c=(0,j.r8)(nV),d=o?.length??0;n[0]!==r||n[1]!==i||n[2]!==d||n[3]!==c?(e=()=>{(0,w.X8)("Level_PetDoor_Clicked",{level_number:r,level_state:i,pet_count:d}),c(y.aGi.ALL_PETS_OVERLAY)},n[0]=r,n[1]=i,n[2]=d,n[3]=c,n[4]=e):e=n[4];let u=e,_=a?d>1:s?.level_state==="practice"&&s.level>1&&d>0;return n[5]!==u||n[6]!==d||n[7]!==_?(t={handleClick:u,petCount:d,renderPetDoor:_},n[5]=u,n[6]=d,n[7]=_,n[8]=t):t=n[8],t})();if(!c)return null;let d=i??l;r[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)(ew.i,{alt:"",className:nq().image,placeholder:"https://am-maxcdn-vod2.s3.amazonaws.com/vod/adaptedmind.adaptedmind/plato/up/hud/pet-door-closed.svg",src:"https://am-maxcdn-vod2.s3.amazonaws.com/vod/adaptedmind.adaptedmind/plato/up/hud/pet-door-closed.svg"}),r[0]=t):t=r[0],r[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,g.jsx)("br",{}),r[1]=n):n=r[1];let u=o>1?" Pets":" Pet";return r[2]!==o||r[3]!==u?(a=(0,g.jsxs)("div",{className:nq().petCount,children:[o,n,u]}),r[2]=o,r[3]=u,r[4]=a):a=r[4],r[5]!==d||r[6]!==a?(s=(0,g.jsx)("div",{className:nq().container,children:(0,g.jsxs)(E.Ot,{onClick:d,children:[t,a]})}),r[5]=d,r[6]=a,r[7]=s):s=r[7],s};var nF=n(53222),nK=n.n(nF);let nH=e=>{let t,n,a,s,r=(0,f.c)(11),{cost:i,onClick:l,showTutorialPointer:o}=e,c=void 0!==o&&o,{data:d}=(0,O.KR)(),u=i<=(d?.gems??0),_=`${nK().container} ${c?nK().withTutorial:""} ${u?"":nK().isDisabled}`;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)("img",{alt:"gem",className:nK().gem,src:"https://assets.adaptedmind.com/up/base-assets/gem-v2.svg"}),r[0]=t):t=r[0],r[1]!==i?(n=(0,g.jsxs)("div",{className:nK().gemContainer,children:[t,(0,g.jsx)("div",{className:nK().costBubble,children:i})]}),r[1]=i,r[2]=n):n=r[2],r[3]!==c?(a=(0,g.jsx)(t_,{bounceDistance:"1vw",className:nK().tutorialPointer,rotation:180,visible:c}),r[3]=c,r[4]=a):a=r[4],r[5]!==u||r[6]!==l||r[7]!==_||r[8]!==n||r[9]!==a?(s=(0,g.jsxs)(ez.O,{className:_,enabled:u,onClick:l,children:[n,"Power Up",a]}),r[5]=u,r[6]=l,r[7]=_,r[8]=n,r[9]=a,r[10]=s):s=r[10],s};var nz=n(63830),nW=n.n(nz);let nX=e=>{let t,n=(0,f.c)(5),{cost:a,onStudentPetUpgrade:s,powerLevel:r,showPowerUpTutorial:i}=e,l=void 0!==i&&i;return n[0]!==a||n[1]!==s||n[2]!==r||n[3]!==l?(t=r<5?(0,g.jsxs)(k.Fragment,{children:[(0,g.jsxs)("div",{className:nW().header,children:[(0,g.jsx)("img",{alt:"",className:nW().powerLevelIcon,src:`https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/mathflow/images/pmemberang/customize-pet-overlay/stamp-power-${r}.png`}),(0,g.jsx)(nH,{cost:a||0,onClick:s,showTutorialPointer:l})]}),(0,g.jsx)("div",{className:nW().subHeader,children:"Power up your pet to customize!"})]}):(0,g.jsxs)("div",{className:nW().header,children:[(0,g.jsx)("img",{alt:"",className:nW().powerLevelIcon,src:`https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/mathflow/images/pmemberang/customize-pet-overlay/stamp-power-${r}.png`}),(0,g.jsx)("div",{className:nW().maxLevelText,children:"This pet has reached the highest level possible!"})]}),n[0]=a,n[1]=s,n[2]=r,n[3]=l,n[4]=t):t=n[4],t};var nY=n(6764),nQ=n.n(nY);(s=_||(_={})).BLUE="blue",s.DARK_BLUE="darkBlue",s.Gray="gray",s.YELLOW="yellow";let nZ=e=>{let t,n=(0,f.c)(3),{children:a,color:s,showPowerLevels:r}=e,i=`${nQ().container} ${void 0===r||r?nQ().showPowerLevels:""} ${nQ()[s]}`;return n[0]!==a||n[1]!==i?(t=(0,g.jsx)("span",{className:i,children:a}),n[0]=a,n[1]=i,n[2]=t):t=n[2],t};var nJ=n(31278),n0=n.n(nJ);let n1=e=>{let t,n,a,s=(0,f.c)(10),{isColorButton:r,isSelected:i,onClickHandler:l,showPowerLevels:o,url:c}=e,d=void 0===o||o,u=`map-game-element ${n0().paintIcon} ${n0().petPart}`,m=`map-game-element map-game-element-img ${n0().petPart}`,p=i?_.YELLOW:_.BLUE,v=`${n0().buttonImage} ${r?u:m}`;return s[0]!==v||s[1]!==c?(t=(0,g.jsx)("img",{alt:"Pet Part",className:v,src:c}),s[0]=v,s[1]=c,s[2]=t):t=s[2],s[3]!==l||s[4]!==t?(n=(0,g.jsx)(ez.O,{className:n0().audioContainer,onClick:l,children:t}),s[3]=l,s[4]=t,s[5]=n):n=s[5],s[6]!==d||s[7]!==p||s[8]!==n?(a=(0,g.jsx)(nZ,{color:p,showPowerLevels:d,children:n}),s[6]=d,s[7]=p,s[8]=n,s[9]=a):a=s[9],a};var n2=n(17482),n3=n.n(n2);let n4=e=>{let t,n,a,s,r=(0,f.c)(9),{isReached:i,level:l,showTutorialPointer:o}=e,c=void 0!==o&&o,d=i?_.DARK_BLUE:_.Gray;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)("span",{className:n3().power,children:"Power"}),r[0]=t):t=r[0],r[1]!==l?(n=(0,g.jsxs)("span",{className:n3().powerLevelTileContainer,children:[t,(0,g.jsx)("span",{className:n3().powerNumber,children:l})]}),r[1]=l,r[2]=n):n=r[2],r[3]!==c?(a=(0,g.jsx)(t_,{bounceDistance:"1vw",className:n3().tutorialPointer,visible:c}),r[3]=c,r[4]=a):a=r[4],r[5]!==d||r[6]!==n||r[7]!==a?(s=(0,g.jsxs)(nZ,{color:d,children:[n,a]}),r[5]=d,r[6]=n,r[7]=a,r[8]=s):s=r[8],s};var n5=n(45338),n8=n.n(n5);(r=m||(m={})).PRIMARY="primarycolor",r.SECONDARY="secondarycolor";let n6=e=>{let t,n,a,s,r=(0,f.c)(14),{onSelectPetPart:i,petCustomizerStudentPet:l,powerLevelTutorialRow:o,setPetCustomizerStudentPet:c,showPowerLevels:d}=e,{data:u}=(0,O.lr)(),_=u?.level,m=l.pet?.pet_parts,p=n7,v=n9;r[0]!==_||r[1]!==i||r[2]!==c?(t=(e,t)=>
1{let n=v(t);(0,w.X8)("Level_PetCustomizer_PartSquare_Clicked",{level_number:_,part_id:t.id,part_type:t.type,power_level:e.power_level,student_pet_id:e.id}),c({...e,[n]:t}),i?.(t)},r[0]=_,r[1]=i,r[2]=c,r[3]=t):t=r[3];let h=t;if(!m)return null;let b=ae;r[4]!==h||r[5]!==l||r[6]!==m||r[7]!==o||r[8]!==d?(n=()=>{let e={1:[],2:[],3:[],4:[],5:[]};for(let[t,n]of[...m].sort(at).entries()){if(!n?.id){console.error(`Missing pet part at index ${t}`,n);continue}let a="base"===n.type,s=n.in_customizer;if(a||!s)continue;let r=n.power_level_unlock;if(!(r<=l.power_level)){e[r].push(b(String(t)));continue}let i=v(n);if(!l[i]){console.error(`Student pet part not found for ${i}`);continue}let o=n.id===l[v(n)].id;if(!n?.id)return void console.error("Missing pet part:",n);e[n.power_level_unlock].push((0,g.jsx)(n1,{isColorButton:p(n),isSelected:o,onClickHandler:()=>{h(l,n)},showPowerLevels:d,url:n.image_url},n.id))}return(0,g.jsx)("div",{className:`${n8().flexContainer} ${d?n8().showPowerLevels:""}`,children:Object.keys(e).map(t=>(0,g.jsxs)("div",{className:n8().flexRow,children:[d?(0,g.jsx)(n4,{isReached:Number.parseInt(t,10)<=l.power_level,level:t,showTutorialPointer:Number.parseInt(t,10)===o}):null,e[t]]},t))})},r[4]=h,r[5]=l,r[6]=m,r[7]=o,r[8]=d,r[9]=n):n=r[9];let x=n;return r[10]!==x?(a=x(),r[10]=x,r[11]=a):a=r[11],r[12]!==a?(s=(0,g.jsx)(k.Fragment,{children:a}),r[12]=a,r[13]=s):s=r[13],s};function n7(e){return e.type===m.PRIMARY||e.type===m.SECONDARY}function n9(e){switch(e.type){case m.PRIMARY:return"pet_part_primary_color";case m.SECONDARY:return"pet_part_secondary_color";default:return`pet_part_${e.student_pet_number}`}}function ae(e){return(0,g.jsx)(nZ,{color:_.Gray,children:(0,g.jsx)("div",{className:n8().lockedSquare,children:(0,g.jsx)("img",{alt:"lock icon",className:n8().lockIconImage,src:"https://assets.adaptedmind.com/up/base-assets/lock_icon.svg"})})})}function at(e,t){return e.student_pet_number-t.student_pet_number}var an=n(59420),aa=n.n(an);function as(e){return e.unifiedProduct.pets.selectedStudentPetId}var ar=n(42625);let ai={checkmark:"https://assets.adaptedmind.com/up/pet-game/PetGameTutorial_VO_03.mp3",powerThreeRow:"https://assets.adaptedmind.com/up/pet-game/PetGameTutorial_VO_02.mp3",powerUp:"https://assets.adaptedmind.com/up/pet-game/PetGameTutorial_VO_01.mp3"},al=()=>{let e,t,n,a,s,r,i,l,o,c,d,u,_,m,p,v,h=(0,f.c)(48),{gameProgress:b,handleClose:x,handleOpenAllPets:C,handleSelectPetPart:N,isOpen:P,isPetGameExperimentEnabled:S,onStudentPetUpgrade:E,petCustomizerStudentPet:I,powerLevel:T,setPetCustomizerStudentPet:M,showPowerLevels:A,tutorial:L}=(()=>{let{isEnabled:e,isLoading:t}=(0,U.f)(),n=eS(),a=(0,j.r8)(e=>e.unifiedProduct.actions.setLevelOverlay),{mutate:s}=(0,O.qV)(),{mutateAsync:r}=(0,O.NW)(),i=(0,j.r8)(e=>e.unifiedProduct.level.overlay===y.aGi.PET_CUSTOMIZER_MODAL),{data:l}=(0,O.lr)(),{data:o}=(0,O.LH)(),{mutate:c}=(0,O.nM)(),d=V(),u=(()=>{let e,t,n=(0,f.c)(5),a=(0,j.r8)(as),{data:s}=(0,O.LH)(),{data:r}=(0,O.Ox)();if(!a)return null;if(n[0]!==r||n[1]!==a||n[2]!==s?.studentPets){t=Symbol.for("react.early_return_sentinel");e:{if(!(e=eP()(s?.studentPets.find(e=>e.id===a)))){t=null;break e}e.pet=r?.find(t=>t.id===e.pet_id)}n[0]=r,n[1]=a,n[2]=s?.studentPets,n[3]=e,n[4]=t}else e=n[3],t=n[4];return t!==Symbol.for("react.early_return_sentinel")?t:e})(),_=(()=>{let e,t,n=(0,f.c)(4),{data:a}=(0,O.LH)(),{data:s}=(0,O.Ox)();if(n[0]!==s||n[1]!==a?.studentPets){t=Symbol.for("react.early_return_sentinel");e:{if(!(e=eP()((e=>{let t=null,n=-1/0;for(let a of e){let e=Date.parse(a.updated_at),s=Number.isNaN(e)?-1/0:e;(!t||s>n||s===n&&a.id>t.id)&&(t=a,n=s)}return t})(a?.studentPets??[])))){t=null;break e}e.pet=s?.find(t=>t.id===e.pet_id)}n[0]=s,n[1]=a?.studentPets,n[2]=e,n[3]=t}else e=n[2],t=n[3];return t!==Symbol.for("react.early_return_sentinel")?t:e})(),[m,p]=(0,k.useState)(null),[v,h]=(0,k.useState)(null),b=e&&l?.level===1&&l?.level_state==="pet_customizer"&&o?.studentPets.length===1;(0,k.useEffect)(()=>{if(t||null!==m||!l?.level_state)return;let a=(({allPetsSelectedStudentPet:e,isPetGameExperimentEnabled:t,isPostPracticeCustomizer:n,latestEarnedStudentPet:a,mostRecentlyUpdatedStudentPet:s})=>t?e??s:n?a:e)({allPetsSelectedStudentPet:u,isPetGameExperimentEnabled:e,isPostPracticeCustomizer:"pet_customizer"===l.level_state,latestEarnedStudentPet:n,mostRecentlyUpdatedStudentPet:_});a&&(p(a),b&&2===a.power_level&&h("powerUp"))},[b,e,t,n,u,_,m,p,l.level_state]),(0,k.useEffect)(()=>
1{if(!i||null===v)return;let e=ai[v];return console.log(`[PetTutorial] play VO for step "${v}"`,e),ar.x.playForeground(e),()=>{console.log(`[PetTutorial] stop VO for step "${v}"`,e),ar.x.stopSound(e)}},[i,v]);let x=m?.power_level,g=l?.level>1||b,C=async()=>{if(m?.id)try{let e=await r(m.id);if((0,w.X8)("Level_PetCustomizer_PowerLevelUpgrade_Clicked",{level_number:l?.level,outcome:e.outcome,power_level:"success"===e.outcome?m.power_level+1:m.power_level,student_pet_id:m.id}),"notEnoughGems"===e.outcome)return;e.response.student_pet.power_level>=3&&h(e=>"powerUp"===e?"powerThreeRow":e),p(t=>t?{...t,power_level:e.response.student_pet.power_level}:t)}catch(e){ej.A.error(e)}};return{gameProgress:l,handleClose:()=>{h(null),s({studentPet:m}),l?.level_state==="pet_customizer"?(c({level_state:"store"}),(0,w.X8)("Level_PetCustomizer_clicked",d())):a(y.aGi.ALL_PETS_OVERLAY)},handleOpenAllPets:()=>{s({studentPet:m},{onSuccess:()=>{a(y.aGi.ALL_PETS_OVERLAY)}})},handleSelectPetPart:e=>{"powerThreeRow"===v&&3===e.power_level_unlock&&h("checkmark")},isOpen:i,isPetGameExperimentEnabled:e,onStudentPetUpgrade:C,petCustomizerStudentPet:m,powerLevel:x,setPetCustomizerStudentPet:p,showPowerLevels:g,tutorial:v}})();if(!P||!b||!I)return null;let R=aa().petGridContainer;5===T&&A?R=`${R} ${aa().withMaxPowerUp}`:A&&(R=`${R} ${aa().withPowerUps}`);let B="powerThreeRow"===L?3:void 0;void 0!==B&&(R=`${R} ${aa().withTutorial}`),h[0]!==P?(e=(0,g.jsx)(e_,{animateIn:P}),h[0]=P,h[1]=e):e=h[1],h[2]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)("div",{}),h[2]=t):t=h[2];let $=`Customize ${I?.name}`;h[3]!==$?(n=(0,g.jsx)(e9,{title:$}),h[3]=$,h[4]=n):n=h[4];let D=`${aa().gemScoreboardRightContainer} ${S?aa().withPetDoor:""}`;h[5]===Symbol.for("react.memo_cache_sentinel")?(a=(0,g.jsx)(ec,{}),h[5]=a):a=h[5],h[6]!==C||h[7]!==S?(s=S?(0,g.jsx)("div",{className:aa().petDoorContainer,children:(0,g.jsx)(nU,{onClick:C})}):null,h[6]=C,h[7]=S,h[8]=s):s=h[8],h[9]!==D||h[10]!==s?(r=(0,g.jsxs)("div",{className:D,children:[a,s]}),h[9]=D,h[10]=s,h[11]=r):r=h[11],h[12]!==n||h[13]!==r?(i=(0,g.jsxs)("div",{className:aa().topRow,children:[t,n,r]}),h[12]=n,h[13]=r,h[14]=i):i=h[14],h[15]!==E||h[16]!==I?.pet||h[17]!==T||h[18]!==A||h[19]!==L?(l=A?(0,g.jsx)(nX,{cost:I?.pet?.[`level_cost_${T+1}`],onStudentPetUpgrade:E,powerLevel:T,showPowerUpTutorial:"powerUp"===L}):null,h[15]=E,h[16]=I?.pet,h[17]=T,h[18]=A,h[19]=L,h[20]=l):l=h[20],h[21]!==N||h[22]!==I||h[23]!==B||h[24]!==M||h[25]!==A?(o=(0,g.jsx)(n6,{onSelectPetPart:N,petCustomizerStudentPet:I,powerLevelTutorialRow:B,setPetCustomizerStudentPet:M,showPowerLevels:A}),h[21]=N,h[22]=I,h[23]=B,h[24]=M,h[25]=A,h[26]=o):o=h[26],h[27]!==R||h[28]!==o||h[29]!==l?(c=(0,g.jsx)("div",{className:aa().petGridContainerRow,children:(0,g.jsxs)("div",{className:R,children:[l,o]})}),h[27]=R,h[28]=o,h[29]=l,h[30]=c):c=h[30],h[31]!==I?(d=(0,g.jsx)("div",{className:aa().pet,children:(0,g.jsx)(eM,{studentPet:I})}),h[31]=I,h[32]=d):d=h[32],h[33]!==x?(u=(0,g.jsx)(tB,{handleClickButton:x,primaryButtonsEnabled:!0,primaryVariant:y.AqZ.CHECKMARK,secondaryVariant:y.wsu.NONE}),h[33]=x,h[34]=u):u=h[34];let G="checkmark"===L;return h[35]!==G?(_=(0,g.jsx)(t_,{bounceDistance:"1vw",className:aa().checkmarkTutorialPointer,visible:G}),h[35]=G,h[36]=_):_=h[36],h[37]!==u||h[38]!==_?(m=(0,g.jsxs)("div",{className:aa().ctaContainer,children:[u,_]}),h[37]=u,h[38]=_,h[39]=m):m=h[39],h[40]!==c||h[41]!==d||h[42]!==m||h[43]!==i?(p=(0,g.jsxs)("div",{className:aa().container,children:[i,c,d,m]}),h[40]=c,h[41]=d,h[42]=m,h[43]=i,h[44]=p):p=h[44],h[45]!==e||h[46]!==p?(v=(0,g.jsxs)(k.Fragment,{children:[e,p]}),h[45]=e,h[46]=p,h[47]=v):v=h[47],v};var ao=n(61200),ac=n.n(ao);let ad=()=>{let e,t,n=(0,f.c)(10),a=(0,j.r8)(au);switch(a){case y.aGi.ALL_PETS_OVERLAY:{let t;n[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)(tn,{}),n[0]=t):t=n[0],e=t;break}case y.aGi.BOOK_PART_REVIEW:{let t;n[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)(tk,{}),n[1]=t):t=n[1],e=t;break}case y.aGi.EXPLANATION:{let t;n[2]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)(nc,{}),n[2]=t):t=n[2],e=t;break}case y.aGi.INCENTIVES_OUTFIT_ROOM:case y.aGi.INCENTIVES_STORE:{let t;n[3]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)(nL,{}),n[3]=t):t=n[3],e=t;break}case y.aGi.LEARNING_ACTIVITY_OVERLAY:e=null;break;case y.aGi.MATH_LEARN_OVERLAY:{let t;n[4]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)(nD,{}),n[4]=t):t=n[4],e=t;break}case y.aGi.PET_CUSTOMIZER_MODAL:{let t;n[5]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)(al,{}),n[5]=t):t=n[5],e=t;break}default:{let t;n[6]!==a?(t=(0,C.Oc)(a),n[6]=a,n[7]=t):t=n[7],e=t}}let s=e;return n[8]!==s?(t=(0,g.jsx)("div",{className:ac().overlay,children:s}),n[8]=s,n[9]=t):t=n[9],t};function au(e){return e.unifiedProduct.level.overlay}var a_=n(72948),am=n.n(a_);let ap=e=>{let t,n=(0,f.c)(2),{onAnimatedOut:a}=e;return n[0]!==a?(t=(0,g.jsx)("div",{className:am().mask,onAnimationEnd:a}),n[0]=a,n[1]=t):t=n[1],t},av=function(e,t){return t===y.pN.MATH&&!["default_device","no_keyboard",null,void 0].includes(e)};var ah=n(32787),ab=n.n(ah);let ax=e=>{let t,n,a,s,r=(0,f.c)(6),{onPress:i}=e;r[0]!==i?(t=e=>{e.preventDefault(),i("backspace")},r[0]=i,r[1]=t):t=r[1];let l=t;return r[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,g.jsx)("img",{alt:"eraser icon",className:ab().eraserIcon,src:"https://assets.adaptedmind.com/up/base-assets/button-icons/keys/eraser_key_icon.svg"}),a=(0,g.jsx)("img",{alt:"backspace",className:ab().backspaceKey,src:"https://assets.adaptedmind.com/up/base-assets/button-icons/keys/long_eraser_key_base.svg"}),r[2]=n,r[3]=a):(n=r[2],a=r[3]),r[4]!==l?(s=(0,g.jsxs)(ez.O,{className:ab().backspaceContainer,onClick:l,children:[n,a]}),r[4]=l,r[5]=s):s=r[5],s};var ag=n(12357),af=n.n(ag);let aj=e=>{let t,n,a,s,r,i=(0,f.c)(14),{onPress:l,value:o}=e;i[0]!==l||i[1]!==o?(t=e=>{e.preventDefault(),l(o)},i[0]=l,i[1]=o,i[2]=t):t=i[2];let c=t,d="backspace"===o;i[3]!==d||i[4]!==o?(n=d?(0,g.jsx)("img",{alt:"eraser icon",className:af().keyValue,
1src:"https://assets.adaptedmind.com/up/base-assets/button-icons/keys/eraser_key_icon.svg"}):o.toUpperCase(),i[3]=d,i[4]=o,i[5]=n):n=i[5],i[6]!==n?(a=(0,g.jsx)("span",{className:af().keyValue,children:n}),i[6]=n,i[7]=a):a=i[7];let u=d?"https://assets.adaptedmind.com/up/base-assets/button-icons/keys/short_eraser_key_base.svg":"https://assets.adaptedmind.com/up/base-assets/button-icons/keys/key_base.svg";return i[8]!==u?(s=(0,g.jsx)("img",{alt:"key container",className:af().key,src:u}),i[8]=u,i[9]=s):s=i[9],i[10]!==c||i[11]!==a||i[12]!==s?(r=(0,g.jsxs)(ez.O,{className:af().keyContainer,onClick:c,children:[a,s]}),i[10]=c,i[11]=a,i[12]=s,i[13]=r):r=i[13],r},ay="https://assets.adaptedmind.com/up/base-assets/button-icons/keys",aC=[{value:"a"},{value:"b"},{value:"c"},{value:"d"},{value:"e"},{value:"f"},{value:"g"},{value:"h"},{value:"i"},{value:"j"},{value:"k"},{value:"l"},{value:"m"}],aN=[{value:"n"},{value:"o"},{value:"p"},{value:"q"},{value:"r"},{value:"s"},{value:"t"},{value:"u"},{value:"v"},{value:"w"},{value:"x"},{value:"y"},{value:"z"}],aP=[{value:"0"},{value:"1"},{value:"2"},{value:"3"},{value:"4"},{value:"5"},{value:"6"},{value:"7"},{value:"8"},{value:"9"},{value:"backspace"}],aS=[{value:"+"},{value:"-"},{value:"x"},{value:"/"},{value:"="},{value:"<"},{value:">"},{value:"%"},{value:":"},{value:"^"},{value:"$"}],aE=[{source:`${ay}/NumKey_period.svg
2  `,value:"."},{source:`${ay}/NumKey_0.svg
3  `,value:"0"},{source:`${ay}/NumKey_1.svg
4  `,value:"1"},{source:`${ay}/NumKey_2.svg
5  `,value:"2"},{source:`${ay}/NumKey_3.svg
6  `,value:"3"},{source:`${ay}/NumKey_4.svg
7  `,value:"4"},{source:`${ay}/NumKey_5.svg
8  `,value:"5"},{source:`${ay}/NumKey_6.svg
9  `,value:"6"},{source:`${ay}/NumKey_7.svg
10  `,value:"7"},{source:`${ay}/NumKey_8.svg
11  `,value:"8"},{source:`${ay}/NumKey_9.svg
12  `,value:"9"}],aI=[{value:"+"},{value:"-"},{value:"x"},{value:"/"},{value:"="},{value:"<"},{value:">"},{value:"%"},{value:"."},{value:"$"},{value:":"},{value:"^"},{value:"backspace"}];var aw=n(59684),aT=n.n(aw);let ak=e=>{let t,n,a,s,r=(0,f.c)(9),{onPress:i}=e;return r[0]!==i?(t=aC.map(e=>(0,g.jsx)(aj,{onPress:i,value:e.value},e.value)),r[0]=i,r[1]=t):t=r[1],r[2]!==i?(n=(0,g.jsx)(ax,{onPress:i}),a=aN.map(e=>(0,g.jsx)(aj,{onPress:i,value:e.value},e.value)),r[2]=i,r[3]=n,r[4]=a):(n=r[3],a=r[4]),r[5]!==t||r[6]!==n||r[7]!==a?(s=(0,g.jsxs)("div",{className:`${aT().keyGrid} ${aT().alphaKeyGrid}`,children:[t,n,a]}),r[5]=t,r[6]=n,r[7]=a,r[8]=s):s=r[8],s},aM=e=>{let t,n,a=(0,f.c)(4),{onPress:s}=e;return a[0]!==s?(t=aP.map(e=>(0,g.jsx)(aj,{onPress:s,value:e.value},e.value)),a[0]=s,a[1]=t):t=a[1],a[2]!==t?(n=(0,g.jsx)("div",{className:`${aT().keyGrid} ${aT().numericKeyGrid}`,children:t}),a[2]=t,a[3]=n):n=a[3],n},aO=e=>{let t,n,a,s,r=(0,f.c)(9),{onPress:i}=e;return r[0]!==i?(t=aS.map(e=>(0,g.jsx)(aj,{onPress:i,value:e.value},e.value)),r[0]=i,r[1]=t):t=r[1],r[2]!==i?(n=(0,g.jsx)(ax,{onPress:i}),a=aE.map(e=>(0,g.jsx)(aj,{onPress:i,value:e.value},e.value)),r[2]=i,r[3]=n,r[4]=a):(n=r[3],a=r[4]),r[5]!==t||r[6]!==n||r[7]!==a?(s=(0,g.jsxs)("div",{className:`${aT().keyGrid} ${aT().numericSymbolsKeyGrid}`,children:[t,n,a]}),r[5]=t,r[6]=n,r[7]=a,r[8]=s):s=r[8],s},aA=e=>{let t,n,a=(0,f.c)(4),{onPress:s}=e;return a[0]!==s?(t=aI.map(e=>(0,g.jsx)(aj,{onPress:s,value:e.value},e.value)),a[0]=s,a[1]=t):t=a[1],a[2]!==t?(n=(0,g.jsx)("div",{className:`${aT().keyGrid} ${aT().symbolsKeyGrid}`,children:t}),a[2]=t,a[3]=n):n=a[3],n},aL=e=>{let t=(0,f.c)(8),{onPress:n,type:a}=e;switch(a){case"letters":{let e;return t[0]!==n?(e=(0,g.jsx)(ak,{onPress:n}),t[0]=n,t[1]=e):e=t[1],e}case"numbers":{let e;return t[2]!==n?(e=(0,g.jsx)(aM,{onPress:n}),t[2]=n,t[3]=e):e=t[3],e}case"numbers_symbols":{let e;return t[4]!==n?(e=(0,g.jsx)(aO,{onPress:n}),t[4]=n,t[5]=e):e=t[5],e}case"symbols":{let e;return t[6]!==n?(e=(0,g.jsx)(aA,{onPress:n}),t[6]=n,t[7]=e):e=t[7],e}default:return null}},aR=({animateIn:e,type:t})=>{let[n,a]=(0,k.useState)(),s=(0,k.useCallback)(e=>{(0,w.X8)("Custom Keyboard Pressed",{focusedInput:!!n,key:e});let t=n;if(t&&!document.body.contains(t)&&(t=null,a(null)),!t){for(let e of document.querySelectorAll("input, textarea"))if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){t=e,a(e);break}if(!t)return}t.focus();let s=t.selectionStart??0,r=t.selectionEnd??0,{value:i}=t;if("backspace"===e)s===r&&s>0?(t.value=i.slice(0,s-1)+i.slice(r),t.setSelectionRange(s-1,s-1)):(t.value=i.slice(0,s)+i.slice(r),t.setSelectionRange(s,s));else{t.value=i.slice(0,s)+e+i.slice(r);let n=s+e.length;t.setSelectionRange(n,n)}let l=new InputEvent("input",{bubbles:!0,composed:!0,data:e,inputType:"backspace"===e?"deleteContentBackward":"insertText"});t.dispatchEvent(l)},[n]);(0,k.useEffect)(()=>{let e=e=>{let{target:t}=e;(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&a(t)};return document.addEventListener("focusin",e),()=>{document.removeEventListener("focusin",e)}},[]);let{data:r}=(0,O.lr)();return av(t,r?.subject_id??-1)?(0,g.jsx)("div",{className:`${aT().container} ${e?aT().animateInKeyboard:""}`,children:(0,g.jsx)(aL,{onPress:s,type:t})}):null};var aB=n(51352),a$=n.n(aB);let aD=e=>{let t,n,a=(0,f.c)(6),{children:s,isExplanation:r,isInnerContainerOverflowAuto:i}=e,l=`${a$().container} ${r?a$().explanation:""}`,o=`${a$().innerContainer} ${i?a$().auto:null}`;return a[0]!==s||a[1]!==o?(t=(0,g.jsx)("div",{className:o,children:s}),a[0]=s,a[1]=o,a[2]=t):t=a[2],a[3]!==l||a[4]!==t?(n=(0,g.jsx)("div",{className:l,children:t}),a[3]=l,a[4]=t,a[5]=n):n=a[5],n}
12,aG=(e,t,n)=>{let a=t?85:100;if(!n)return Array.from({length:e},(t,n)=>a/(e+1)*(n+1));let s=a/n;return[...(0,C._z)(e,n).keys()].map(e=>e*s)};var aq=n(24432),aV=n.n(aq);function aU(e){return e.user.actions.seenGemMilestoneHandIndicator}(i=p||(p={})).ANIMATING_OUT="animating_out",i.HIDDEN="hidden",i.VISIBLE="visible",(l=v||(v={})).OFF_PROGRESS_BAR="offProgressBar",l.ON_PROGRESS_BAR="onProgressBar";let aF=e=>{let t,n,a,s=(0,f.c)(9),{handleAnimatedOut:r,milestoneNumber:i,showClickedEffect:l,wrapperClass:o}=e;s[0]!==r||s[1]!==i||s[2]!==l?(t=l?(0,g.jsx)(E.gk,{handleEnded:()=>{r(i)},play:!0,src:"https://assets.adaptedmind.com/up/base-assets/milestone-clicked-effect",styleType:y.HYi.FILL_HEIGHT},`milestone-clicked-effect-${i}`):(0,g.jsx)("img",{alt:"milestone gem",className:aV().gemImage,src:"https://assets.adaptedmind.com/up/base-assets/collect-milestone-icon.svg"}),s[0]=r,s[1]=i,s[2]=l,s[3]=t):t=s[3];let c=t,d=`${aV().gem} ${o}`;return s[4]!==c?(n=(0,g.jsx)("div",{className:aV().gemInner,children:c}),s[4]=c,s[5]=n):n=s[5],s[6]!==d||s[7]!==n?(a=(0,g.jsx)("div",{className:d,children:n}),s[6]=d,s[7]=n,s[8]=a):a=s[8],a},aK=e=>{let t,n,a,s,r,i,l=(0,f.c)(23),{handleAnimatedOut:o,handleClick:c,leftPosition:d,milestoneNumber:u,state:_}=e,{isShowingHandIndicator:m,position:h}=(e=>{let t,n,a,s,r=(0,f.c)(11),i=(0,j.r8)(j.M7);r[0]!==i?(t=e=>void 0!==i&&!e.user.gemHandSeenStudentIds[i],r[0]=i,r[1]=t):t=r[1];let l=(0,j.r8)(t),o=(0,j.r8)(aU),[c,d]=(0,k.useState)(v.OFF_PROGRESS_BAR);r[2]!==c||r[3]!==o||r[4]!==i||r[5]!==l?(n=()=>{if(c===v.ON_PROGRESS_BAR)return;let e=setTimeout(()=>{d(v.ON_PROGRESS_BAR),l&&void 0!==i&&o(i)},4700);return()=>{clearTimeout(e)}},a=[c,l,o,i],r[2]=c,r[3]=o,r[4]=i,r[5]=l,r[6]=n,r[7]=a):(n=r[6],a=r[7]),(0,k.useEffect)(n,a);let u=l&&1===e&&c===v.OFF_PROGRESS_BAR;return r[8]!==u||r[9]!==c?(s={isShowingHandIndicator:u,position:c},r[8]=u,r[9]=c,r[10]=s):s=r[10],s})(u);if(_===p.HIDDEN)return null;let b=_===p.VISIBLE;l[0]!==c||l[1]!==u?(t=()=>{c(u)},l[0]=c,l[1]=u,l[2]=t):t=l[2],l[3]!==d?(n={left:d},l[3]=d,l[4]=n):n=l[4],l[5]!==o||l[6]!==m||l[7]!==u||l[8]!==h||l[9]!==_?(a="offProgressBar"===h&&(0,g.jsxs)(k.Fragment,{children:[(0,g.jsx)(t_,{className:aV().handIndicator,fadeOutDelayMs:4e3,visible:m}),(0,g.jsx)(aF,{handleAnimatedOut:o,milestoneNumber:u,showClickedEffect:_===p.ANIMATING_OUT,wrapperClass:aV().offProgressBar})]}),l[5]=o,l[6]=m,l[7]=u,l[8]=h,l[9]=_,l[10]=a):a=l[10];let x=_===p.ANIMATING_OUT;return l[11]!==o||l[12]!==u||l[13]!==x?(s=(0,g.jsx)(aF,{handleAnimatedOut:o,milestoneNumber:u,showClickedEffect:x,wrapperClass:aV().onProgressBar}),l[11]=o,l[12]=u,l[13]=x,l[14]=s):s=l[14],l[15]!==n||l[16]!==a||l[17]!==s?(r=(0,g.jsxs)("div",{className:aV().gemOuter,style:n,children:[a,s]}),l[15]=n,l[16]=a,l[17]=s,l[18]=r):r=l[18],l[19]!==b||l[20]!==t||l[21]!==r?(i=(0,g.jsx)(ez.O,{enabled:b,onClick:t,children:r}),l[19]=b,l[20]=t,l[21]=r,l[22]=i):i=l[22],i};var aH=n(69352),az=n.n(aH);let aW=e=>{let t,n,a,s=(0,f.c)(5),{backgroundURL:r}=e;return s[0]!==r?(t=(0,g.jsx)("img",{className:az().background,src:r}),s[0]=r,s[1]=t):t=s[1],s[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,g.jsx)("div",{className:az().monsterOuter,children:(0,g.jsx)("div",{className:az().monster,children:(0,g.jsx)(eI,{offsetX:"-10%",width:"120%"})})}),s[2]=n):n=s[2],s[3]!==t?(a=(0,g.jsxs)("div",{className:az().container,children:[t,n]}),s[3]=t,s[4]=a):a=s[4],a};var aX=n(83656),aY=n.n(aX);(o=h||(h={})).INSTANT="instant",o.SMOOTH="smooth";let aQ=e=>{let t,n,a,s,r,i,l,o,c,d,u,_=(0,f.c)(41),{gemStates:m,handleClickGem:v,handleGemAnimatedOut:b,milestoneCount:x,positionUpdateBehavior:j,progressGoal:y,progressPercentage:C,showQuizIcon:N}=e,P=void 0===j?h.SMOOTH:j,{containerReference:S,containerWidth:E,finalMilestoneSrc:I,vesselSrc:w}=(()=>{let e,t,n,a,s=(0,f.c)(8),{data:r}=(0,O.YL)(),[i,l]=(0,k.useState)(0),o=r?.progress_bar;s[0]!==o?(e=o||{},s[0]=o,s[1]=e):e=s[1];let{final_milestone_icon_url:c,vessel_url:d}=e,u=(0,k.useRef)(null);return s[2]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{if(!u.current)return;let e=new ResizeObserver(e=>{let[t]=e;l(t.contentRect.width-30)});return e.observe(u.current),()=>{e.disconnect()}},n=[],s[2]=t,s[3]=n):(t=s[2],n=s[3]),(0,k.useEffect)(t,n),s[4]!==i||s[5]!==c||s[6]!==d?(a={containerReference:u,containerWidth:i,finalMilestoneSrc:c,vesselSrc:d},s[4]=i,s[5]=c,s[6]=d,s[7]=a):a=s[7],a})();_[0]!==x||_[1]!==y||_[2]!==N?(t=aG(x,N,y),_[0]=x,_[1]=y,_[2]=N,_[3]=t):t=_[3];let T=t,M=`${aY().currentProgressOverlay} ${P===h.SMOOTH?aY().smoothTransition:aY().instantTransition}`,A=`calc(${C}% - ${C/100*30}px + (2 * 0.21vw))`;if(_[4]!==A?(n={width:A},_[4]=A,_[5]=n):n=_[5],_[6]===Symbol.for("react.memo_cache_sentinel")?(a=(0,g.jsx)("div",{className:aY().currentProgressOverlayInner}),_[6]=a):a=_[6],_[7]!==M||_[8]!==n?(s=(0,g.jsx)("div",{className:M,style:n,children:a}),_[7]=M,_[8]=n,_[9]=s):s=_[9],_[10]!==m||_[11]!==v||_[12]!==b||_[13]!==T||_[14]!==C){let e;_[16]!==m||_[17]!==v||_[18]!==b||_[19]!==C?(e=(e,t)=>{let n=C>e,a=`calc(${e}% - ${e/100*30}px)`,s=m?.[t];return(0,g.jsxs)(k.Fragment,{children:[(0,g.jsx)("div",{className:`${aY().milestoneIcon} ${n?aY().filledMilestone:""}`,style:{left:a},children:(0,g.jsx)("div",{className:aY().innerMilestone})}),s&&s!==p.HIDDEN?(0,g.jsx)(aK,{handleAnimatedOut:b,handleClick:v,leftPosition:a,milestoneNumber:t+1,state:s}):null]},`milestone-${t}`)},_[16]=m,_[17]=v,_[18]=b,_[19]=C,_[20]=e):e=_[20],r=T.map(e),_[10]=m,_[11]=v,_[12]=b,_[13]=T,_[14]=C,_[15]=r}else r=_[15];_[21]!==C||_[22]!==N?(i=N?(0,g.jsx)("img",{className:aY().quizIcon,src:`https://assets.adaptedmind.com/up/base-assets/question-marks-${C>85?"filled":"empty"}-v2.svg`,style:{left:"85%"}}):null,_[21]=C,_[22]=N,_[23]=i):i=_[23],_[24]!==I?(l=(0,g.jsx)("img",{className:aY().maxProgressIcon,src:I}),_[24]=I,_[25]=l):l=_[25];let L=`${aY().monster} ${P===h.SMOOTH?aY().smoothTransition:aY().instantTransition}`,R=`translate(calc(${C/100*E}px - 50%), -50%)`;return _[26]!==R?(o={transform:R},_[26]=R,_[27]=o):o=_[27],_[28]!==w?(c=(0,g.jsx)(aW,{backgroundURL:w}),_[28]=w,_[29]=c):c=_[29],_[30]!==L||_[31]!==o||_[32]!==c?(d=(0,g.jsx)("div",{className:L,style:o,children:c}),_[30]=L,_[31]=o,_[32]=c,_[33]=d):d=_[33],_[34]!==S||_[35]!==l||_[36]!==d||_[37]!==s||_[38]!==r||_[39]!==i?(u=(0,g.jsxs)("div",{className:aY().container,ref:S,
12children:[s,r,i,l,d]}),_[34]=S,_[35]=l,_[36]=d,_[37]=s,_[38]=r,_[39]=i,_[40]=u):u=_[40],u},aZ=()=>{let e,t=(0,f.c)(2),n=(()=>{let e,t,n=(0,f.c)(7),{data:a}=(0,O.lr)(),{data:s}=(0,O.YL)(),r=s?.progress_bar;n[0]!==r?(e=r||{},n[0]=r,n[1]=e):e=n[1];let{final_milestone_icon_url:i,math_goal:l,milestones:o}=e,c=l?Math.max(0,Math.min((a?.progress??0)/l,1)):0,d=o?.length??0,u=100*c;return n[2]!==i||n[3]!==l||n[4]!==d||n[5]!==u?(t={finalMilestoneSrc:i,milestoneCount:d,progressGoal:l,progressPercentage:u,showQuizIcon:!1,smoothAnimation:!0},n[2]=i,n[3]=l,n[4]=d,n[5]=u,n[6]=t):t=n[6],t})();return t[0]!==n?(e=(0,g.jsx)(aQ,{...n}),t[0]=n,t[1]=e):e=t[1],e};var aJ=n(66529),a0=n.n(aJ);let a1=e=>{let t,n,a,s,r,i,l,o,c,d=(0,f.c)(26),{isKeyboardVisible:u,keyboard:_,learningContent:m,leftColumn:p,progressBar:v,rightColumn:h}=e,b=(0,j.r8)(a2),x=A(),y=u?"":a0().noKeyboardContainer,C=b?a0().hiddenGrid:"";d[0]!==y||d[1]!==C?(t=[a0().gridContainer,y,C].filter(Boolean),d[0]=y,d[1]=C,d[2]=t):t=d[2];let N=t.join(" "),P=u?"":a0().noKeyboard;d[3]!==P?(n=[a0().centerColumnGrid,P].filter(Boolean),d[3]=P,d[4]=n):n=d[4];let S=n.join(" ");d[5]!==p?(a=(0,g.jsx)("div",{className:a0().leftColumn,children:p}),d[5]=p,d[6]=a):a=d[6],d[7]!==v?(s=(0,g.jsx)("div",{className:a0().progressBar,children:v}),d[7]=v,d[8]=s):s=d[8];let E=`${a0().learningArea} ${x?a0().transparent:""}`;return d[9]!==m||d[10]!==E?(r=(0,g.jsx)("div",{className:E,children:m}),d[9]=m,d[10]=E,d[11]=r):r=d[11],d[12]!==_?(i=(0,g.jsx)("div",{className:a0().alignBottom,children:(0,g.jsx)("div",{className:a0().keyboard,children:_})}),d[12]=_,d[13]=i):i=d[13],d[14]!==S||d[15]!==i||d[16]!==s||d[17]!==r?(l=(0,g.jsxs)("div",{className:S,children:[s,r,i]}),d[14]=S,d[15]=i,d[16]=s,d[17]=r,d[18]=l):l=d[18],d[19]!==h?(o=(0,g.jsx)("div",{className:a0().rightColumn,children:h}),d[19]=h,d[20]=o):o=d[20],d[21]!==N||d[22]!==l||d[23]!==o||d[24]!==a?(c=(0,g.jsxs)("div",{className:N,children:[a,l,o]}),d[21]=N,d[22]=l,d[23]=o,d[24]=a,d[25]=c):c=d[25],c};function a2(e){return e.unifiedProduct.level.overlay!==y.aGi.LEARNING_ACTIVITY_OVERLAY}var a3=n(63525),a4=n.n(a3);let a5=e=>{let t,n,a,s,r,i=(0,f.c)(15),{additionalButtonsSection:l,cta:o}=e,c=(0,j.r8)(a8),d=A(),u=`${a4().closeButtonContainer} ${d?a4().transparent:""}`;return i[0]!==c?(t=(0,g.jsx)(eY,{handleClick:()=>{c(!0),(0,w.X8)("Open Exit Modal Button Clicked")}}),i[0]=c,i[1]=t):t=i[1],i[2]!==u||i[3]!==t?(n=(0,g.jsx)("div",{className:u,children:t}),i[2]=u,i[3]=t,i[4]=n):n=i[4],i[5]!==l||i[6]!==d?(a=d?null:(0,g.jsx)("div",{className:a4().additionalButtonsContainer,children:l}),i[5]=l,i[6]=d,i[7]=a):a=i[7],i[8]!==o||i[9]!==d?(s=o?(0,g.jsx)("div",{className:`${a4().cta} ${d?a4().transparent:""}`,children:o}):null,i[8]=o,i[9]=d,i[10]=s):s=i[10],i[11]!==n||i[12]!==a||i[13]!==s?(r=(0,g.jsxs)(k.Fragment,{children:[n,a,s]}),i[11]=n,i[12]=a,i[13]=s,i[14]=r):r=i[14],r};function a8(e){return e.unifiedProduct.actions.setIsExitModalOpen}var a6=n(10507),a7=n.n(a6);let a9=e=>{let t,n,a,s,r=(0,f.c)(12),{cta:i}=e,{isEnabled:l}=(0,U.f)(),{data:o}=(0,O.lr)(),c=A();return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)("div",{className:a7().gemScoreboard,children:(0,g.jsx)(ec,{})}
12),r[0]=t):t=r[0],r[1]!==o?.level||r[2]!==c||r[3]!==l?(n=l?null:(0,g.jsxs)("div",{className:`${a7().incentiveBtnsContainer} ${c?a7().transparent:""}`,children:[(0,g.jsx)("div",{className:a7().petDoor,children:(0,g.jsx)(nU,{})}),(o?.level??0)>1?(0,g.jsx)("div",{className:a7().storeButtonContainer,children:(0,g.jsx)(np,{variant:y.aGi.INCENTIVES_STORE})}):null]}),r[1]=o?.level,r[2]=c,r[3]=l,r[4]=n):n=r[4],r[5]!==i||r[6]!==c||r[7]!==l?(a=i?(0,g.jsx)("div",{className:`${a7().cta} ${l?a7().petGameCta:""} ${c?a7().transparent:""}`,children:i}):null,r[5]=i,r[6]=c,r[7]=l,r[8]=a):a=r[8],r[9]!==n||r[10]!==a?(s=(0,g.jsxs)(k.Fragment,{children:[t,n,a]}),r[9]=n,r[10]=a,r[11]=s):s=r[11],s};var se=n(85055),st=n.n(se);let sn=()=>{let e,t,n,a=(0,f.c)(7),s=(0,j.r8)(sa),{data:r}=(0,O.l1)();return a[0]!==r?.math_activity_lesson.math_lesson.id||a[1]!==r?.question||a[2]!==s?(e=()=>{s(y.aGi.MATH_LEARN_OVERLAY),(0,w.X8)("Learn Overlay Button Clicked",{lesson_id:r?.math_activity_lesson.math_lesson.id,question_id:r?.question.id})},a[0]=r?.math_activity_lesson.math_lesson.id,a[1]=r?.question,a[2]=s,a[3]=e):e=a[3],a[4]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)("img",{alt:"learn icon",className:st().learnIcon,src:"https://assets.adaptedmind.com/up/base-assets/button-icons/learn-icon.png"}),a[4]=t):t=a[4],a[5]!==e?(n=(0,g.jsx)(E.Ot,{className:st().learnOverlayButton,onClick:e,children:t}),a[5]=e,a[6]=n):n=a[6],n};function sa(e){return e.unifiedProduct.actions.setLevelOverlay}var ss=n(22390),sr=n(91022),si=n(46008),sl=n.n(si);let so=e=>{let t,n,a,s,r=(0,f.c)(8),{audioUrl:i,onClick:l}=e;r[0]!==l?(t=(e,t)=>{e.stopPropagation(),t&&ar.x.playForeground(t),l?.()},r[0]=l,r[1]=t):t=r[1];let o=t;return r[2]!==i||r[3]!==o?(n=e=>{o(e,i)},r[2]=i,r[3]=o,r[4]=n):n=r[4],r[5]===Symbol.for("react.memo_cache_sentinel")?(a=(0,g.jsx)("img",{alt:"Play audio",className:sl().audioBtn,src:"https://assets.adaptedmind.com/up/base-assets/button-icons/speaker_icon.svg"}),r[5]=a):a=r[5],r[6]!==n?(s=(0,g.jsx)(ez.O,{className:sl().container,onClick:n,useDefaults:!0,children:a}),r[6]=n,r[7]=s):s=r[7],s};var sc=n(87029),sd=n.n(sc);let su=e=>{let t,n,a,s,r,i,l,o,c,d=(0,f.c)(23),{answer:u,handleClick:_,selectedAnswerID:m}=e;if(d[0]!==u||d[1]!==_){let e;a=({1:"A",2:"B",3:"C",4:"D"})[String(u.order)],o=u.answer_text??"",d[10]!==u.id||d[11]!==_?(e=()=>{_(u.id)},d[10]=u.id,d[11]=_,d[12]=e):e=d[12],n=e,t=ss.W,r=`https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/plato/math/questions/multi-choice-${a.toLowerCase()}-active.png`,i=u.id,l=u.audio_url,s=a.toLowerCase(),d[0]=u,d[1]=_,d[2]=t,d[3]=n,d[4]=a,d[5]=s,d[6]=r,d[7]=i,d[8]=l,d[9]=o}else t=d[2],n=d[3],a=d[4],s=d[5],r=d[6],i=d[7],l=d[8],o=d[9];let p=`https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/plato/math/questions/multi-choice-${s}.png`,v=u.id===m;return d[13]!==t||d[14]!==n||d[15]!==a||d[16]!==r||d[17]!==i||d[18]!==l||d[19]!==p||d[20]!==v||d[21]!==o?(c=(0,g.jsx)(t,{activeLetterImageUrl:r,answerId:i,audioURL:l,defaultLetterImageUrl:p,isActive:v,letter:a,onClick:n,text:o}),d[13]=t,d[14]=n,d[15]=a,d[16]=r,d[17]=i,d[18]=l,d[19]=p,d[20]=v,d[21]=o,d[22]=c):c=d[22],c},s_=()=>{let e,t,n,a,s,r,i,l,o,c,d,u,_,m,p,v,h,b,x=(0,f.c)(48),N=(0,k.useRef)(!1),{data:P}=(0,O.l1)(),S=P?.question,E=S.question_type===y.vuP.MULTIPLE_CHOICE,[I,w]=(0,k.useState)(null),T=y.E7d.UNIFIED_PRODUCT,[M,A]=(0,k.useState)(0),L=(0,j.r8)(sp);x[0]!==P?(e=P&&(0,C.OC)(P),x[0]=P,x[1]=e):e=x[1];let R=e;x[2]!==L?(t=e=>{A(e),L({enabled:!0})},x[2]=L,x[3]=t):t=x[3];let B=t;x[4]!==L||x[5]!==R?(n=()=>{N.current||(N.current=!0,L({enabled:!1,variant:R?y.AqZ.PRETEST_CHECKMARK:y.AqZ.CHECKMARK}))},a=[L,R],x[4]=L,x[5]=R,x[6]=n,x[7]=a):(n=x[6],a=x[7]),(0,k.useEffect)(n,a),x[8]!==B||x[9]!==M||x[10]!==S?(s=()=>S.question_type!==y.vuP.MULTIPLE_CHOICE?null:[...S.answers].sort((e,t)=>e.order-t.order).map(e=>(0,g.jsx)(su,{answer:e,handleClick:B,selectedAnswerID:M},e.id)),x[8]=B,x[9]=M,x[10]=S,x[11]=s):s=x[11];let $=s;x[12]===Symbol.for("react.memo_cache_sentinel")?(r=e=>{w(e)},x[12]=r):r=x[12];let D=r;x[13]!==E?(i=()=>{if(E)return;let e=document.querySelector(".blank-input");e&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{e.focus()})})},x[13]=E,x[14]=i):i=x[14];let G=i;x[15]!==S.keyboard_type?(l=av(S.keyboard_type,y.pN.MATH),x[15]=S.keyboard_type,x[16]=l):l=x[16];let q=l;return x[17]!==R?(o=R?(0,g.jsx)("p",{className:sd().pretestText,children:"Pretest"}):null,x[17]=R,x[18]=o):o=x[18],x[19]!==q||x[20]!==S.instruction_audio_url||x[21]!==S.instruction_text?(c=S.instruction_text?(0,g.jsx)("div",{className:sd().explanationWrapper,children:(0,g.jsxs)("p",{className:sd().explanationText,children:[S.instruction_audio_url?(0,g.jsx)("div",{className:sd().audioButtonWrapper,children:(0,g.jsx)(so,{audioUrl:S.instruction_audio_url})}):null,(0,g.jsx)(sr.t,{engine:T,inline:!0,isCustomKeyboardQuestion:q,text:S.instruction_text})]})}):null,x[19]=q,x[20]=S.instruction_audio_url,x[21]=S.instruction_text,x[22]=c):c=x[22],x[23]!==S.audio_url?(d=S.audio_url?(0,g.jsx)("div",{className:sd().audioButtonWrapper,children:(0,g.jsx)(so,{audioUrl:S.audio_url})}):null,x[23]=S.audio_url,x[24]=d):d=x[24],x[25]!==G||x[26]!==q||x[27]!==E||x[28]!==S.question_text?(u=(0,g.jsx)(sr.t,{engine:T,isCustomKeyboardQuestion:q,onParsedObject:D,onQuestionTextRendered:G,readonly:E,styleType:y.KYW.PROBLEM_HTML_WRAPPER,text:S.question_text}),x[25]=G,x[26]=q,x[27]=E,x[28]=S.question_text,x[29]=u):u=x[29],x[30]!==d||x[31]!==u?(_=(0,g.jsxs)("div",{className:sd().problemText,children:[d,u]}),x[30]=d,x[31]=u,x[32]=_):_=x[32],x[33]!==I?(m=I?.hasTooltip?(0,g.jsx)("div",{className:sd().tooltip,dangerouslySetInnerHTML:{__html:I.tooltipMessage}}):null,x[33]=I,x[34]=m):m=x[34],x[35]!==_||x[36]!==m?(p=(0,g.jsxs)("div",{className:sd().problemWrapper,children:[_,m]}),x[35]=_,x[36]=m,x[37]=p):p=x[37],x[38]!==$?(v=$(),x[38]=$,x[39]=v):v=x[39],x[40]!==M||x[41]!==v?(h=(0,g.jsx)("div",{className:sd().answerWrapper,"data-m-selected-answer-id":M,children:v}),x[40]=M,x[41]=v,x[42]=h):h=x[42],x[43]!==p||x[44]!==h||x[45]!==o||x[46]!==c?(b=(0,g.jsx)(tf,{height:"100%",width:"100%",children:(0,g.jsxs)("div",{className:sd().problem,children:[o,c,p,h]})}),x[43]=p,x[44]=h,x[45]=o,x[46]=c,x[47]=b):b=x[47],b};s_.displayName="TextProblemInner";let sm=()=>{let e,t=(0,f.c)(1),{data:n}=(0,O.l1)();return n?.question?(t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)(s_,{}),t[0]=e):e=t[0],e):null};function sp(e){return e.unifiedProduct.actions.handleActionButtonChange}var sv=n(98785),sh=n.n(sv);let sb=e=>{let t,n,a,s,r,i,l,o=(0,f.c)(26),{answer:c,handleClick:d,isSelected:u}=e,_=`${100*(0,C.CJ)(c.answer_data.left)}%`,m=`${100*(0,C.CJ)(c.answer_data.top)}%`,p=`${100*(0,C.CJ)(c.answer_data.width)}%`,v=`${100*(0,C.CJ)(c.answer_data.height)}%`,h=u?c.answer_data.selected_image:c.answer_data.unselected_image,b=u?"none":"funExpand";o[0]!==c.id||o[1]!==d?(t=()=>{d(c.id)},o[0]=c.id,o[1]=d,o[2]=t):t=o[2];let x=t;
12o[3]!==c.id||o[4]!==u?(n=u?{"data-video-selection-selected-answer-id":c.id}:{},o[3]=c.id,o[4]=u,o[5]=n):n=o[5];let j=n;o[6]!==c.id?(a={"data-video-selection-answer-id":c.id},o[6]=c.id,o[7]=a):a=o[7];let y=`${c.id}-${u}`;return o[8]!==v||o[9]!==_||o[10]!==m||o[11]!==p?(s={height:v,left:_,top:m,width:p},o[8]=v,o[9]=_,o[10]=m,o[11]=p,o[12]=s):s=o[12],o[13]!==b||o[14]!==h||o[15]!==x||o[16]!==a||o[17]!==y||o[18]!==s?(r=(0,g.jsx)(t3.c,{animation:b,attributes:a,audioEvent:"hover",className:sh().container,image:h,onClick:x,style:s},y),o[13]=b,o[14]=h,o[15]=x,o[16]=a,o[17]=y,o[18]=s,o[19]=r):r=o[19],o[20]!==j||o[21]!==u?(i=u?(0,g.jsx)("span",{...j}):null,o[20]=j,o[21]=u,o[22]=i):i=o[22],o[23]!==r||o[24]!==i?(l=(0,g.jsxs)(k.Fragment,{children:[r,i]}),o[23]=r,o[24]=i,o[25]=l):l=o[25],l};var sx=n(43559),sg=n.n(sx);let sf=e=>{let t,n,a,s,r=(0,f.c)(13),{answers:i,isMultipleSelectionQuestion:l}=e;r[0]===Symbol.for("react.memo_cache_sentinel")?(t={},r[0]=t):t=r[0];let[o,c]=(0,k.useState)(t);r[1]!==l||r[2]!==o?(n=e=>{let t={...o};if(t?.[e]){t[e]=!1,c(t);return}l?c(t={...t,[e]:!t?.[e]}):c(t={[e]:!0})},r[1]=l,r[2]=o,r[3]=n):n=r[3];let d=n;if(r[4]!==i||r[5]!==d||r[6]!==o){let e;r[8]!==d||r[9]!==o?(e=e=>(0,g.jsx)(sb,{answer:e,handleClick:d,isSelected:o?.[e.id]},e.id),r[8]=d,r[9]=o,r[10]=e):e=r[10],a=i.map(e),r[4]=i,r[5]=d,r[6]=o,r[7]=a}else a=r[7];let u=a;return r[11]!==u?(s=(0,g.jsx)("div",{className:sg().container,children:u}),r[11]=u,r[12]=s):s=r[12],s};var sj=n(52479),sy=n.n(sj);let sC=e=>{let t,n,a,s,r=(0,f.c)(10),{answers:i,containerHeight:l,containerWidth:o,focusFirstInput:c}=e,d=(0,k.useRef)(null),u=(0,k.useRef)(!1);return r[0]!==c?(t=()=>{let e=u.current;u.current=c,c&&!e&&d.current&&d.current.focus()},n=[c],r[0]=c,r[1]=t,r[2]=n):(t=r[1],n=r[2]),(0,k.useEffect)(t,n),r[3]!==i||r[4]!==l||r[5]!==o||r[6]!==c?(a=i.map((e,t)=>{let n=`${100*(0,C.CJ)(e.answer_data.left)}%`,a=`${100*(0,C.CJ)(e.answer_data.top)}%`,s=`${100*(0,C.CJ)(e.answer_data.width)}%`,r=(0,C.CJ)(e.answer_data.width),i=`${100*(0,C.CJ)(e.answer_data.height)}%`,u=(0,C.CJ)(e.answer_data.height),_=r*o,m=u*l,p=_/m,v=Math.min(_,m),h=1.3;r<.07&&(h=2),p>1.5&&(h=1.7),p<.9&&(v=m,h=1.5);let b=v/h;return(0,g.jsx)("input",{className:`${sy().input} video-problem-input`,"data-answer-id":e.id,"data-answer-type":"VIDEO_TEXT_INSIDE",inputMode:"none",name:`${e.id}`,readOnly:!c,ref:0===t?d:null,style:{fontSize:`${b}px`,height:i,left:n,lineHeight:i,textAlign:"center",top:a,width:s},tabIndex:e.order},`${e.id}`)}),r[3]=i,r[4]=l,r[5]=o,r[6]=c,r[7]=a):a=r[7],r[8]!==a?(s=(0,g.jsx)("div",{className:sy().container,children:a}),r[8]=a,r[9]=s):s=r[9],s};var sN=n(21323),sP=n.n(sN);let sS=e=>{let t,n,a,s,r=(0,f.c)(14),{handleClickAnswer:i}=e,{data:l}=(0,O.l1)(),o=l?.question,c=l?.math_activity_lesson?.math_lesson,[d,u]=(0,k.useState)(null),_=(0,k.useRef)(null);if(r[0]!==i||r[1]!==d?(t=()=>{d&&d!==_.current&&(i(d),_.current=d)},n=[i,d],r[0]=i,r[1]=d,r[2]=t,r[3]=n):(t=r[2],n=r[3]),(0,k.useEffect)(t,n),!o)return null;if(r[4]!==c?.legacy_tag_id||r[5]!==o.answers||r[6]!==o.order){let e;r[8]!==c?.legacy_tag_id||r[9]!==o.order?(e=(e,t)=>(0,g.jsx)(t3.c,{animation:"funExpand",attributes:{"data-video-m-answer-id":e.id},audioEvent:"hover",className:sP().videoChoice,image:`https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/mathflow/images/curriculum/tagId-${c?.legacy_tag_id}/tagId${c?.legacy_tag_id}-problem${o.order}-mc-elem${e.order}.png`,onClick:()=>{u(e.id)},style:{left:e.answer_data.left,top:e.answer_data.top,width:e.answer_data.width}},t),r[8]=c?.legacy_tag_id,r[9]=o.order,r[10]=e):e=r[10],a=o.answers.map(e),r[4]=c?.legacy_tag_id,r[5]=o.answers,r[6]=o.order,r[7]=a}else a=r[7];return r[11]!==d||r[12]!==a?(s=(0,g.jsx)("div",{className:sP().container,"data-video-m-selected-answer-id":d,children:a}),r[11]=d,r[12]=a,r[13]=s):s=r[13],s};var sE=n(16505),sI=n.n(sE);let sw=e=>{let t,n,a,s,r,i,l,o,c,d=(0,f.c)(22),{audioURL:u,opaque:_,title:m}=e,[p,v]=(0,k.useState)(!1),[h,b]=(0,k.useState)(!1);d[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{v(!0),b(!0)},d[0]=t):t=d[0];let x=t;d[1]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{v(!1),b(!1)},d[1]=n):n=d[1];let j=n,y=`${sI().outerWrapper} ${_?sI().opaque:""}`;d[2]!==u||d[3]!==h?(a=h?null:(0,g.jsx)(so,{audioUrl:u,onClick:x}),d[2]=u,d[3]=h,d[4]=a):a=d[4],d[5]!==h?(s=h?(0,g.jsx)(eY,{handleClick:j}):null,d[5]=h,d[6]=s):s=d[6],d[7]!==a||d[8]!==s?(r=(0,g.jsx)("div",{className:sI().buttonPosition,children:(0,g.jsxs)("div",{className:sI().audioButtonContainer,children:[a,s]})}),d[7]=a,d[8]=s,d[9]=r):r=d[9];let C=`${sI().container} ${p?sI().opaque:""}`;if(d[10]!==m)i=m.length<31?"":m.length<41?sI().smaller:sI().smallest,d[10]=m,d[11]=i;else i=d[11];let N=`${sI().title} ${i}`;return d[12]!==N||d[13]!==m?(l=(0,g.jsx)("div",{className:N,children:m}),d[12]=N,d[13]=m,d[14]=l):l=d[14],d[15]!==l||d[16]!==C?(o=(0,g.jsx)("div",{className:C,children:l}),d[15]=l,d[16]=C,d[17]=o):o=d[17],d[18]!==o||d[19]!==y||d[20]!==r?(c=(0,g.jsxs)("div",{className:y,children:[r,o]}),d[18]=o,d[19]=y,d[20]=r,d[21]=c):c=d[21],c},sT=(e,t,n)=>{if(n&&e===y.ezC.PLAY){if(t&&n.playing)return void n.pause();t||n.playing||n.play()}};var sk=n(79103),sM=n.n(sk);let sO=e=>{let t,n,a,s,r,i,l,o,c,d,u,_,m,p,v=(0,f.c)(50),{videoID:h}=e,{allowAnswerInput:b,containerDimensions:x,handleClickChoice:N,handleCuepoint:P,handleEndFlow:S,handleVideoLoaded:E,isMultipleSelectionQuestion:I,isTextOutsideQuestion:w,isVideoBlankQuestion:T,mathLesson:M,opaqueTextInput:L,question:R,renderChoiceOptions:B,renderSelectableImageAnswers:$,renderTextInsideInputs:D,titleAudio:G,titleText:q,videoState:V}=(()=>{let{data:e}=(0,O.l1)(),t=e?.question,n=e?.math_activity_lesson?.math_lesson,{mutate:a}=(0,O.JA)(),s=A(),{submitMathAnswer:r}=Q(),i=e&&(0,C.OC)(e),l=e&&(0,C.W5)(e),o="VIDEO_TEXT_OUTSIDE"===t.question_type,c="VIDEO_TEXT_INSIDE"===t.question_type,d="VIDEO_BLNK"===t.question_type,u="VIDEO_M"===t.question_type,_=["VIDEO_SELECTION","VIDEO_SELECTION_ONE_OPTION"].includes(t.question_type),m="VIDEO_SELECTION"===t.question_type,[p,v]=(0,k.useState)(()=>l?{current_time:0,state:"videoIntro",video_action:y.ezC.PLAY}:t.video_states.find(e=>e.initial)||{current_time:0,state:"practiceIntro",video_action:y.ezC.PLAY}),h="practiceStatic"===p.state,[b,x]=(0,k.useState)({height:0,width:0}),g=(0,k.useRef)(null),f=(0,j.r8)(e=>e.unifiedProduct.actions.handleActionButtonChange),N=(0,k.useRef)(p);N.current=p;let P=(0,k.useCallback)(e=>{let n=t.video_states.find(t=>t.state===e);n&&(v(n),N.current=n)},[t.video_states]),S=(0,k.useCallback)(()=>{l?a(e?.math_activity_lesson?.math_lesson?.id):r()},[l,r,e?.math_activity_lesson?.math_lesson?.id,a]);sT(p?.video_action,s,g.current),(0,k.useEffect)(()=>{let e=()=>{let e=document.querySelector(`.${sM().container}`);e&&x({height:e.clientHeight,width:e.clientWidth}
12)};return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}},[]);let E=(0,k.useCallback)((e,t)=>{if(t?.data?.next_state)switch(t.data.next_state){case"correctEnd":case"end":S();break;case"practiceStatic":u||f({enabled:!1,variant:i?y.AqZ.PRETEST_CHECKMARK:y.AqZ.CHECKMARK}),P("practiceStatic");break;default:P(t?.data?.next_state)}},[f,S,u,i,P]),I=(0,k.useCallback)(e=>{r(!1,{answer_id:e})},[r]),w=u&&h,T=l?e?.math_activity_lesson?.math_lesson?.video_title||"":t.question_text,M=l?null:t.audio_url;return{allowAnswerInput:h,containerDimensions:b,handleClickChoice:I,handleCuepoint:E,handleEndFlow:S,handleVideoLoaded:e=>{g.current=e},isAnySelectionQuestion:_,isChoiceQuestion:u,isMultipleSelectionQuestion:m,isTextOutsideQuestion:o,isVideoBlankQuestion:d,mathLesson:n,opaqueTextInput:(o||d)&&h,question:t,renderChoiceOptions:w,renderSelectableImageAnswers:_&&h,renderTextInsideInputs:c&&h,titleAudio:M,titleText:T,videoState:p}})(),U=(0,k.useRef)(null),F=(0,k.useRef)(null),K=(0,k.useRef)(!1);if(v[0]!==L?(t=()=>{let e=K.current;if(K.current=L,!L||e)return;let t=F.current??U.current;t?.focus()},n=[L],v[0]=L,v[1]=t,v[2]=n):(t=v[1],n=v[2]),(0,k.useEffect)(t,n),!R||!M)return null;v[3]!==b||v[4]!==T?(a=T?(0,g.jsx)("input",{className:sM().answerInput,"data-answer-type":"VIDEO_BLNK",inputMode:"none",placeholder:" ",readOnly:!b,ref:U,type:"text"}):null,v[3]=b,v[4]=T,v[5]=a):a=v[5];let H=a;v[6]!==b||v[7]!==w||v[8]!==R.answers?(s=w?R.answers.map((e,t)=>(0,g.jsx)("input",{className:sM().answerInput,"data-answer-id":e.id,"data-answer-type":"VIDEO_TEXT_OUTSIDE",inputMode:"none",name:e.id.toString(),placeholder:" ",readOnly:!b,ref:0===t?F:null,type:"text"},e.id)):null,v[6]=b,v[7]=w,v[8]=R.answers,v[9]=s):s=v[9];let z=s;v[10]!==b||v[11]!==G||v[12]!==q?(r=(0,g.jsx)(sw,{audioURL:G,opaque:b,title:q}),v[10]=b,v[11]=G,v[12]=q,v[13]=r):r=v[13];let W=B?"":sM().displayNone;v[14]!==N?(i=(0,g.jsx)(sS,{handleClickAnswer:N}),v[14]=N,v[15]=i):i=v[15],v[16]!==W||v[17]!==i?(l=(0,g.jsx)("div",{className:W,children:i}),v[16]=W,v[17]=i,v[18]=l):l=v[18];let X=D?"":sM().displayNone;v[19]!==x.height||v[20]!==x.width||v[21]!==R.answers||v[22]!==D?(o=(0,g.jsx)(sC,{answers:R.answers,c
12ontainerHeight:x.height,containerWidth:x.width,focusFirstInput:D}),v[19]=x.height,v[20]=x.width,v[21]=R.answers,v[22]=D,v[23]=o):o=v[23],v[24]!==o||v[25]!==X?(c=(0,g.jsx)("div",{className:X,children:o}),v[24]=o,v[25]=X,v[26]=c):c=v[26];let Y=$?"":sM().displayNone;return v[27]!==I||v[28]!==R.answers?(d=(0,g.jsx)(sf,{answers:R.answers,isMultipleSelectionQuestion:I}),v[27]=I,v[28]=R.answers,v[29]=d):d=v[29],v[30]!==Y||v[31]!==d?(u=(0,g.jsx)("div",{className:Y,children:d}),v[30]=Y,v[31]=d,v[32]=u):u=v[32],v[33]!==P||v[34]!==S||v[35]!==E||v[36]!==c||v[37]!==u||v[38]!==r||v[39]!==l||v[40]!==h||v[41]!==V?(_=(0,g.jsxs)(t2.p,{aspectRatio:1.7777777777777777,cuePointSystem:"vtt",id:h,objectFit:"contain",onCuePoint:P,onEnd:S,onLoaded:E,videoState:V,children:[r,l,c,u]},"videoPlayer"),v[33]=P,v[34]=S,v[35]=E,v[36]=c,v[37]=u,v[38]=r,v[39]=l,v[40]=h,v[41]=V,v[42]=_):_=v[42],v[43]!==L||v[44]!==z||v[45]!==H?(m=z||H?(0,g.jsxs)("div",{className:`${sM().answerInputContainer} ${L?sM().opaque:""}`,children:[z,H]}):null,v[43]=L,v[44]=z,v[45]=H,v[46]=m):m=v[46],v[47]!==_||v[48]!==m?(p=(0,g.jsxs)("div",{className:sM().container,children:[_,m]}),v[47]=_,v[48]=m,v[49]=p):p=v[49],p};var sA=n(11129),sL=n.n(sA),sR=n(47131);function sB(){globalThis.testQuestionData=void 0}function s$(e){return e.unifiedProduct.animationQueue.length>0}function sD(e){return e.unifiedProduct.level.overlay}let sG=()=>{let e,t,n,a,s,r,i,l,o,c,d,u,_,m,p=(0,f.c)(39),{submitMathAnswer:v}=Q(),{data:h}=(0,O.l1)(),b=(0,j.r8)(sq),x=(0,j.r8)(sV),N=D(),P=A();p[0]!==h?(e=h&&(0,C.W5)(h),p[0]=h,p[1]=e):e=p[1];let S=e,E=!P&&!S&&b!==y.AqZ.NONE;p[2]!==P||p[3]!==h?(t=!P&&(0,C.Mt)(h),p[2]=P,p[3]=h,p[4]=t):t=p[4];let I=t,{isVideoQuestion:w,questionId:M,renderQuestion:L,videoID:R}=(()=>{let e,t,n,a,s,r=(0,f.c)(13),{data:i}=(0,O.l1)(),{data:l}=(0,O.lr)(),o=i?.question;r[0]!==i?.question||r[1]!==o?(e=i?.question&&(0,C.ij)(o.question_type),r[0]=i?.question,r[1]=o,r[2]=e):e=r[2];let c=e;r[3]!==i?(t=(e=>{if(e){var t;return(0,C.W5)(e)?(0,C.Gz)(e?.math_activity_lesson.math_lesson):(t=e?.question).video_type===y.Nuv.ADAPTEDMIND_VIDEO&&t.video?.source===y.$bz.VIMEO?Number.parseInt(t.video.provider_id,10):Number.parseInt(t.video_id,10)}})(i),r[3]=i,r[4]=t):t=r[4];let d=t;r[5]!==o?(n=()=>(globalThis.testQuestionData=()=>(0,sR.f)(o),sB),a=[o],r[5]=o,r[6]=n,r[7]=a):(n=r[6],a=r[7]),(0,k.useEffect)(n,a);let u=(0,j.r8)(s$),_=(0,j.r8)(sD),m=void 0!==o&&!u&&l?.level_state==="practice"&&_!==y.aGi.EXPLANATION,p=o?.id;return r[8]!==c||r[9]!==m||r[10]!==p||r[11]!==d?(s={isVideoQuestion:c,questionId:p,renderQuestion:m,videoID:d},r[8]=c,r[9]=m,r[10]=p,r[11]=d,r[12]=s):s=r[12],s})(),B=S?y.AqZ.NONE:b,{query:$}=(0,T.useRouter)(),G="string"==typeof $.keyboard?$.keyboard:h?.question?.keyboard_type;p[5]!==x||p[6]!==v?(n=e=>{switch(x({variant:y.AqZ.NONE}),e){case y.vpu.PRIMARY:v();break;case y.vpu.SECONDARY:v(!0)}},p[5]=x,p[6]=v,p[7]=n):n=p[7];let q=n;p[8]!==v?(a=()=>{let e=e=>{"Enter"===e.key&&(e.preventDefault(),v())};return globalThis.addEventListener("keydown",e),()=>{globalThis.removeEventListener("keydown",e)}},s=[v],p[8]=v,p[9]=a,p[10]=s):(a=p[9],s=p[10]),(0,k.useEffect)(a,s),p[11]!==w||p[12]!==M||p[13]!==L||p[14]!==R?(r=L?(0,g.jsx)(k.Fragment,{children:w&&R?(0,g.jsx)(aD,{isInnerContainerOverflowAuto:!1,children:(0,g.jsx)(sO,{videoID:R},R)}):(0,g.jsx)("div",{className:sL().textProblemContainer,children:(0,g.jsx)(sm,{})})},M):null,p[11]=w,p[12]=M,p[13]=L,p[14]=R,p[15]=r):r=p[15];let V=r,U=B===y.AqZ.PRETEST_CHECKMARK?y.wsu.I_DONT_KNOW:y.wsu.NONE;p[16]!==B||p[17]!==q||p[18]!==N||p[19]!==U?(i=(0,g.jsx)(tB,{handleClickButton:q,primaryButtonsEnabled:N,primaryVariant:B,secondaryVariant:U}),p[16]=B,p[17]=q,p[18]=N,p[19]=U,p[20]=i):i=p[20];let F=i;return p[21]!==G?(l=(e=>{switch(e){case"default_device":case"no_keyboard":case null:case void 0:return!1;default:return!0}})(G),p[21]=G,p[22]=l):l=p[22],p[23]!==E||p[24]!==G?(o=(0,g.jsx)(aR,{animateIn:E,type:G}),p[23]=E,p[24]=G,p[25]=o):o=p[25],p[26]!==I?(c=I?(0,g.jsx)(sn,{}):null,p[26]=I,p[27]=c):c=p[27],p[28]!==c?(d=(0,g.jsx)(a5,{additionalButtonsSection:c}),p[28]=c,p[29]=d):d=p[29],p[30]===Symbol.for("react.memo_cache_sentinel")?(u=(0,g.jsx)(aZ,{}),p[30]=u):u=p[30],p[31]!==F?(_=(0,g.jsx)(a9,{cta:F}),p[31]=F,p[32]=_):_=p[32],p[33]!==V||p[34]!==d||p[35]!==_||p[36]!==l||p[37]!==o?(m=(0,g.jsx)(a1,{isKeyboardVisible:l,keyboard:o,learningContent:V,leftColumn:d,progressBar:u,rightColumn:_}),p[33]=V,p[34]=d,p[35]=_,p[36]=l,p[37]=o,p[38]=m):m=p[38],m};function sq(e){return e.unifiedProduct.ui.actionButtonVariant}function sV(e){return e.unifiedProduct.actions.handleActionButtonChange}var sU=n(33856),sF=n.n(sU);let sK={0:"A",1:"B",2:"C",3:"D",4:"E",5:"F",6:"G",7:"H",8:"I",9:"J",10:"K",11:"L",12:"M",13:"N",14:"O",15:"P",16:"Q",17:"R",18:"S",19:"T",20:"U",21:"V",22:"W",23:"X",24:"Y",25:"Z"},sH=e=>{let t,n,a,s,r,i=(0,f.c)(17),{answerId:l,audioURL:o,enabled:c,handleClick:d,index:u,isCorrect:_,state:m,text:p}=e,v=sK[u],h=`${sF().container} ${sF()[m]}`;return i[0]!==l||i[1]!==d?(t=()=>{d(l??0)}
12,i[0]=l,i[1]=d,i[2]=t):t=i[2],i[3]!==v?(n=(0,g.jsx)("div",{className:sF().letterContainer,children:v}),i[3]=v,i[4]=n):n=i[4],i[5]!==_||i[6]!==p?(a=(0,g.jsx)("div",{className:sF().textContainer,"data-is-correct":_,children:p}),i[5]=_,i[6]=p,i[7]=a):a=i[7],i[8]!==o?(s=o?(0,g.jsx)("div",{className:sF().audioButton,children:(0,g.jsx)(so,{audioUrl:o})}):null,i[8]=o,i[9]=s):s=i[9],i[10]!==c||i[11]!==h||i[12]!==t||i[13]!==n||i[14]!==a||i[15]!==s?(r=(0,g.jsxs)(ez.O,{className:h,enabled:c,onClick:t,children:[n,a,s]}),i[10]=c,i[11]=h,i[12]=t,i[13]=n,i[14]=a,i[15]=s,i[16]=r):r=i[16],r};var sz=n(27138),sW=n.n(sz);let sX=e=>{let t,n,a,s,r,i,l,o,c,d,u,_,m,p=(0,f.c)(34),{mode:v,question:h}=e,b=(0,j.r8)(sY),x=(0,j.r8)(sQ),C=(0,j.r8)(sZ);p[0]!==x||p[1]!==b?(t=e=>{x(e),b(y.uQ3.READY_TO_SUBMIT)},p[0]=x,p[1]=b,p[2]=t):t=p[2];let N=t;p[3]!==v||p[4]!==C?(n=(e,t)=>v!==y.uQ3.PROVIDE_FEEDBACK?C===e?"selected":"unselected":t?"correct":C===e?"incorrect":"unselected",p[3]=v,p[4]=C,p[5]=n):n=p[5];let P=n,S=V(),E=[...h.answers].sort(sJ);p[6]!==S?(a=()=>{(0,w.X8)("Level_PracticeQuiz_viewed",S())},s=[S],p[6]=S,p[7]=a,p[8]=s):(a=p[7],s=p[8]),(0,k.useEffect)(a,s);let I=sW(),T=sW();p[9]===Symbol.for("react.memo_cache_sentinel")?(r=(0,g.jsx)("div",{}),p[9]=r):r=p[9],p[10]!==h.question_text?(i=(0,g.jsx)("div",{className:sW().questionText,children:h.question_text}),p[10]=h.question_text,p[11]=i):i=p[11],p[12]!==h.audio_url?(l=h.audio_url?(0,g.jsx)("div",{className:sW().audioButton,children:(0,g.jsx)(so,{audioUrl:h.audio_url})}):(0,g.jsx)("div",{}),p[12]=h.audio_url,p[13]=l):l=p[13],p[14]!==i||p[15]!==l?(o=(0,g.jsxs)("div",{className:sW().questionContainer,children:[r,i,l]}),p[14]=i,p[15]=l,p[16]=o):o=p[16];let M=sW();p[17]!==P||p[18]!==N||p[19]!==v?(c=(e,t)=>(0,g.jsx)(sH,{answerId:e.id,audioURL:e.audio_url,enabled:v!==y.uQ3.PROVIDE_FEEDBACK,handleClick:N,index:t,isCorrect:e.correct,state:P(e.id,e.correct),text:e.answer_text},e.id),p[17]=P,p[18]=N,p[19]=v,p[20]=c):c=p[20];let O=E.map(c);return p[21]!==M.options||p[22]!==O?(d=(0,g.jsx)("div",{className:M.options,children:O}),p[21]=M.options,p[22]=O,p[23]=d):d=p[23],p[24]!==o||p[25]!==d||p[26]!==T.innerContainer?(u=(0,g.jsxs)("div",{className:T.innerContainer,children:[o,d]}),p[24]=o,p[25]=d,p[26]=T.innerContainer,p[27]=u):u=p[27],p[28]!==tf||p[29]!==u?(_=(0,g.jsx)(tf,{height:"100%",width:"100%",children:u}),p[28]=tf,p[29]=u,p[30]=_):_=p[30],p[31]!==_||p[32]!==I.container?(m=(0,g.jsx)("div",{className:I.container,children:_}),p[31]=_,p[32]=I.container,p[33]=m):m=p[33],m};function sY(e){return e.unifiedProduct.actions.switchQuizMode}function sQ(e){return e.unifiedProduct.actions.setQuizSelectedAnswerId}function sZ(e){return e.unifiedProduct.quiz.selectedAnswerId}function sJ(e,t){return e.order-t.order}let s0=e=>{let t,n=(0,f.c)(4),{handleClickButton:a}=e,s=(0,j.r8)(s1),r=s!==y.uQ3.AWAITING_INPUT,i=s===y.uQ3.PROVIDE_FEEDBACK?y.AqZ.RIGHT_ARROW:y.AqZ.CHECKMARK;return n[0]!==a||n[1]!==r||n[2]!==i?(t=(0,g.jsx)(tB,{handleClickButton:a,primaryButtonsEnabled:r,primaryVariant:i,secondaryVariant:y.wsu.NONE}),n[0]=a,n[1]=r,n[2]=i,n[3]=t):t=n[3],t};function s1(e){return e.unifiedProduct.quiz.mode}function s2(e,t){return e.order-t.order}let s3={[y.OMU.READING]:"Reading",[y.OMU.SCIENCE]:"Science",[y.OMU.SOCIAL_STUDIES]:"Social Studies",[y.OMU.SUPER_SKILLS]:"Super Skills"},s4=e=>{let t,n,a,s,r,i,l,o,c,d,u,_,m,v,h,b,x,g,N=(0,f.c)(79),{positionUpdateBehavior:P,progressRatio:S,showQuizIcon:E,subject:I}=e;if(N[0]!==I)t={gemClickEventSource:`${s3[I]} Milestone Gem Click`,mutateMilestoneReachedEventName:`${s3[I]} Milestone Reached`,uncollectedGemEventSource:`${s3[I]} Uncollected Milestone Gem`},N[0]=I,N[1]=t;else t=N[1];let{gemClickEventSource:T,mutateMilestoneReachedEventName:M,uncollectedGemEventSource:A}=t,{mutate:L}=(0,O.gP)(),R=(0,k.useRef)(!1),B=(0,j.r8)(s5),{data:$}=(0,O.lr)(),D=$?.level_state==="collect_remaining_milestone_gems",G=(0,j.r8)(s8),{data:q}=(0,O.YL)(),{isEnabled:F,status:H}=K(),{isEnabled:W}=(0,U.f)(),X=(()=>{let e,t,n=(0,f.c)(4),{data:a}=(0,O.lr)(),{data:s}=(0,O.YL)();if(n[0]!==a?.milestones_collected||n[1]!==s?.progress_bar?.milestones){t=Symbol.for("react.early_return_sentinel");e:{if(!(e=s?.progress_bar?.milestones.filter(e=>!a?.milestones_collected.includes(e.order)))||0===e.length){t=null;break e}e.sort(s2)}n[0]=a?.milestones_collected,n[1]=s?.progress_bar?.milestones,n[2]=e,n[3]=t}else e=n[2],t=n[3];return t!==Symbol.for("react.early_return_sentinel")?t:e[0].order})(),{mutate:Y}=(0,O.N9)(),Q=q?.progress_bar;N[2]!==Q?(n=Q||{},N[2]=Q,N[3]=n):n=N[3];let{milestones:Z}=n,J=100*Math.max(0,Math.min(S,1));N[4]===Symbol.for("react.memo_cache_sentinel")?(a=[],N[4]=a):a=N[4];let[ee,en]=(0,k.useState)(a);Z?.length;let ea=Z?.length??0;N[5]!==E||N[6]!==ea?(s=aG(ea,E),N[5]=E,N[6]=ea,N[7]=s):s=N[7];let es=s,er=V();N[8]!==Z?(r=()=>{en(()=>Z?.map(s6)??[])},i=[Z,en],N[8]=Z,N[9]=r,N[10]=i):(r=N[9],i=N[10]),(0,k.useEffect)(r,i);let{mutate:ei}=(0,O.nM)();N[11]!==er||N[12]!==W||N[13]!==F||N[14]!==q||N[15]!==L||N[16]!==ei||N[17]!==X||N[18]!==H||N[19]!==I?(l=async()=>
12{if("loading"!==H){if(R.current||I===y.OMU.MATH||(L(),R.current=!0),(0,w.X8)("Level_Practice_completed",er()),await (0,C.yy)(1e3),!X)return void ei({level_state:F?z(q,W):"celebrate_progress"});ei({level_state:"collect_remaining_milestone_gems"})}},N[11]=er,N[12]=W,N[13]=F,N[14]=q,N[15]=L,N[16]=ei,N[17]=X,N[18]=H,N[19]=I,N[20]=l):l=N[20];let el=l;N[21]!==$?.milestones_collected?(o=()=>{$?.milestones_collected&&$?.milestones_collected?.length!==0&&en(e=>{let t=eP()(e);for(let[e,n]of t.entries())n===p.VISIBLE&&$?.milestones_collected.includes(e+1)&&(t[e]=p.ANIMATING_OUT);return t})},N[21]=$?.milestones_collected,N[22]=o):o=N[22];let eo=$?.milestones_collected;N[23]!==eo?(c=[eo],N[23]=eo,N[24]=c):c=N[24],(0,k.useEffect)(o,c),N[25]!==B||N[26]!==$?.subject_id||N[27]!==q||N[28]!==Y?(d=e=>{let{animateGemOnly:t,eventSource:n,milestone:a}=e;Y({milestoneNumber:a});let s=et(q);t?B({gems:s,milestoneNumber:null,source:n,type:"collectRemainingMilestones"}):B({gems:s,milestoneNumber:a,source:n,type:"milestone"}),s&&(0,w.X8)("Earned Gems",{incentive:q?.incentive,level:q?.level_number,milestone_number:a,num_gems:s,source:n,subject_id:$?.subject_id})},N[25]=B,N[26]=$?.subject_id,N[27]=q,N[28]=Y,N[29]=d):d=N[29],$?.subject_id;let ec=d;N[30]===Symbol.for("react.memo_cache_sentinel")?(u=e=>{en(t=>{let n=[...t];return n[e-1]=p.HIDDEN,n})},N[30]=u):u=N[30];let ed=u;N[31]!==T||N[32]!==ec||N[33]!==D?(_=e=>{ec({animateGemOnly:D,eventSource:T,milestone:e})},N[31]=T,N[32]=ec,N[33]=D,N[34]=_):_=N[34];let eu=_;N[35]!==$?.milestones_collected||N[36]!==ee||N[37]!==el||N[38]!==D||N[39]!==q?.level_number||N[40]!==es||N[41]!==M||N[42]!==S||N[43]!==I?(m=()=>{if(!D&&S>=1)return void el();let e=[];for(let[t,n]of ee.entries()){let a=es[t]/100<=S,s=$?.milestones_collected?.includes(t+1);a&&n===p.HIDDEN&&!s&&((0,w.X8)(M,{level:q?.level_number,milestone_number:t+1,subject:I}),e.push(t))}0!==e.length&&en(t=>{let n=eP()(t);for(let t of e)n[t]=p.VISIBLE;return n})},N[35]=$?.milestones_collected,N[36]=ee,N[37]=el,N[38]=D,N[39]=q?.level_number,N[40]=es,N[41]=M,N[42]=S,N[43]=I,N[44]=m):m=N[44];let e_=$?.milestones_collected,em=q?.level_number;N[45]!==ee||N[46]!==er||N[47]!==el||N[48]!==D||N[49]!==es||N[50]!==Z||N[51]!==M||N[52]!==S||N[53]!==E||N[54]!==I||N[55]!==e_||N[56]!==em?(v=[ee,Z,e_,em,D,el,S,I,M,E,es,er],N[45]=ee,N[46]=er,N[47]=el,N[48]=D,N[49]=es,N[50]=Z,N[51]=M,N[52]=S,N[53]=E,N[54]=I,N[55]=e_,N[56]=em,N[57]=v):v=N[57],(0,k.useEffect)(m,v),N[58]===Symbol.for("react.memo_cache_sentinel")?(h=new Set,N[58]=h):h=N[58];let ep=(0,k.useRef)(h);N[59]!==er||N[60]!==ec||N[61]!==G||N[62]!==D||N[63]!==W||N[64]!==F||N[65]!==q||N[66]!==ei||N[67]!==X||N[68]!==H||N[69]!==A?(b=()=>{if(D&&!G&&"loading"!==H){if(!X){(0,w.X8)("Level_CollectRemainingMilestones_completed",er()),ei({level_state:F?z(q,W):"celebrate_progress"});return}ep.current.has(X)||(ep.current.add(X),ec({animateGemOnly:!0,eventSource:A,milestone:X}))}},x=[D,X,G,ec,er,F,W,q,ei,H,A],N[59]=er,N[60]=ec,N[61]=G,N[62]=D,N[63]=W,N[64]=F,N[65]=q,N[66]=ei,N[67]=X,N[68]=H,N[69]=A,N[70]=b,N[71]=x):(b=N[70],x=N[71]),(0,k.useEffect)(b,x);let ev=Z?.length??0;return N[72]!==ee||N[73]!==eu||N[74]!==P||N[75]!==J||N[76]!==E||N[77]!==ev?(g={gemStates:ee,handleClickGem:eu,handleGemAnimatedOut:ed,milestoneCount:ev,positionUpdateBehavior:P,progressPercentage:J,showQuizIcon:E},N[72]=ee,N[73]=eu,N[74]=P,N[75]=J,N[76]=E,N[77]=ev,N[78]=g):g=N[78],g};function s5(e){return e.unifiedProduct.actions.enqueueAnimation}function s8(e){return e.unifiedProduct.animationQueue.length>0}function s6(){return p.HIDDEN}let s7=e=>{let t,n,a=(0,f.c)(5),{progressGoal:s,progressRatio:r}=e;a[0]!==s||a[1]!==r?(t={progressGoal:s,progressRatio:r},a[0]=s,a[1]=r,a[2]=t):t=a[2];let i=(e=>{let t,n,a=(0,f.c)(5),{progressGoal:s,progressRatio:r}=e;a[0]!==r?(t={positionUpdateBehavior:h.SMOOTH,progressRatio:r,showQuizIcon:!0,subject:y.OMU.READING},a[0]=r,a[1]=t):t=a[1];let i=s4(t);return a[2]!==s||a[3]!==i?(n={...i,progressGoal:s},a[2]=s,a[3]=i,a[4]=n):n=a[4],n})(t);return a[3]!==i?(n=(0,g.jsx)(aQ,{...i}),a[3]=i,a[4]=n):n=a[4],n};var s9=n(31987),re=n.n(s9);let rt=()=>{let e,t,n,a=(0,f.c)(5),s=(0,j.r8)(rn);return a[0]!==s?(e=()=>{s(y.aGi.BOOK_PART_REVIEW)},a[0]=s,a[1]=e):e=a[1],a[2]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)("img",{alt:"reading book icon",className:re().readingBookIcon,src:"https://assets.adaptedmind.com/up/base-assets/button-icons/reading-book-icon.svg"}),a[2]=t):t=a[2],a[3]!==e?(n=(0,g.jsx)(E.Ot,{className:re().readingBookButton,onClick:e,children:t}),a[3]=e,a[4]=n):n=a[4],n};function rn(e){return e.unifiedProduct.actions.setLevelOverlay}var ra=n(12635),rs=n.n(ra);let rr=({onWordClick:e,vocabIndex:t,vocabProgress:n})=>{let{data:a}=(0,O.Hj)(),{mutate:s}=(0,O.Pp)(),r=(0,k.useRef)(new Set);if(!a)return null;let i=a.vocabs[t];return r.current.has(i.id)||(s({book_id:a.book.id,status:"read",vocab_id:i.id}),r.current.add(i.id)),(0,g.jsxs)("div",{className:rs().container,children:[(0,g.jsx)("div",{className:rs().vocabColumn,children:a.vocabs.map((a,s)=>{let r=t===s,i=n>=s&&!r;return(0,g.jsx)(E.Ot,{className:`${rs().vocabTab} ${i?rs().unlocked:""} ${r?rs().curSelected:""} `,enabled:i,onClick:()=>{e(s)},children:a.word},a.id)})}),(0,g.jsx)("div",{className:rs().definitionColumn,children:(0,g.jsx)(tf,{height:"100%",width:"100%",children:(0,g.jsxs)("div",{className:rs().definitionContentContainer,children:[(0,g.jsxs)("div",{className:`${rs().word} ${rs().definitionSection}`,children:[(0,g.jsx)("div",{className:rs().largeAudioButton,children:(0,g.jsx)(so,{audioUrl:i.audio_url})}),a.vocabs[t].word]}),(0,g.jsxs)("div",{className:rs().definitionSection,children:[(0,g.jsx)("div",{className:rs().smallAudioButton,children:(0,g.jsx)(so,{audioUrl:i.definition_audio_url})}),(0,g.jsxs)("div",{children:[(0,g.jsx)("div",{className:rs().subheader,children:"definition:"}),(0,g.jsx)("div",{className:rs().content,children:i.definition})]})]}),(0,g.jsxs)("div",{className:rs().definitionSection,children:[(0,g.jsx)("div",{className:rs().smallAudioButton,children:(0,g.jsx)(so,{audioUrl:i.sentence_audio_url})}),(0,g.jsxs)("div",{children:[(0,g.jsx)("div",{className:rs().subheader,children:"sentence:"}),(0,g.jsx)("div",{className:rs().content,children:i.sentence})]})]})]})})})]})};var ri=n(58103),rl=n.n(ri);function ro(e,t){let{newIndex:n,pageCount:a,questionCount:s,vocabCount:r}=t.payload,{mode:i,vocabAndPagesSeen:l}=e;switch(i){case y.Msh.BOOK_PAGES:if(n<a)return{indexWithinMode:Math.max(n,0),mode:y.Msh.BOOK_PAGES,vocabAndPagesSeen:Math.max(l,r+n)};return{indexWithinMode:0,mode:y.Msh.QUIZ,vocabAndPagesSeen:r+a};case y.Msh.QUIZ:if(n<s)return{...e,indexWithinMode:n};return{...e,indexWithinMode:0,mode:y.Msh.DONE};case y.Msh.VOCAB:if(n<r)return{indexWithinMode:Math.max(n,0),mode:y.Msh.VOCAB,vocabAndPagesSeen:Math.max(l,n)};return{indexWithinMode:0,mode:y.Msh.BOOK_PAGES,vocabAndPagesSeen:r};default:return e}}let rc={indexWithinMode:0,mode:y.Msh.VOCAB,vocabAndPagesSeen:0},rd=()=>{let e,t,n,a,s,r,i,l,o=(0,f.c)(31),{handleQuizCTAClicked:c,indexWithinMode:d,mode:u,progressGoal:_,progressRatio:m,quizMode:p,readingBookPartActivity:v,readingBookPartActivityUpdate:h,renderLearningContent:b,vocabAndPagesSeen:x}=(()=>{let[e,t]=(0,k.useReducer)(ro,rc),{data:n}=(0,O.Hj)(),a=(0,j.r8)(e=>e.unifiedProduct.quiz.mode),{mutate:s}=(0,O.Uq)(),r=(0,j.r8)(e=>e.unifiedProduct.actions.setBookPartReviewOverlayIndex),i=(0,k.useRef)(!0);i.current&&(r(0),i.current=!1);let l=(0,k.useRef)({curMode:a,hasAlreadyClicked:!1});l.current.curMode!==a&&(l.current.curMode=a,l.current.hasAlreadyClicked=!1);let o=(0,j.r8)(e=>e.unifiedProduct.quiz.selectedAnswerId),c=(0,j.r8)(e=>e.unifiedProduct.actions.enqueueAnimation),d=(0,j.r8)(e=>e.unifiedProduct.actions.switchQuizMode),{data:u}=(0,O.YL)(),_=A(),m=(0,k.useRef)(!1);a!==y.uQ3.READY_TO_SUBMIT&&(m.current=!1);let p=n?.vocabs?.length??0,v=n?.book_pages?.length??0;n?.book?.layout_type===y.sXo.TWO_PAGE_PICTURE&&(v=Math.ceil(v/2));let h=p+v,b=e=>
12{t({payload:{newIndex:e,pageCount:v,questionCount:n?.questions?.length??0,vocabCount:p}})},{indexWithinMode:x,mode:g,vocabAndPagesSeen:f}=e,C=g===y.Msh.DONE?1:f/h*85/100;return{handleQuizCTAClicked:()=>{if(!0!==l.current.hasAlreadyClicked)switch(l.current.hasAlreadyClicked=!0,a){case y.uQ3.PROVIDE_FEEDBACK:b(x+1),d(y.uQ3.AWAITING_INPUT);break;case y.uQ3.READY_TO_SUBMIT:{let e=n?.questions[x]?.answers?.find(e=>e.id===o)?.correct??!1;if(s({answerId:o,questionId:n?.questions[x]?.id}),e){c({gems:10,source:"Reading Question Answer",type:"correct"}),(0,w.X8)("Earned Gems",{incentive:u?.incentive,level:u?.level_number,num_gems:10,source:"Reading Question Answer",subject_id:y.pN.READING}),d(y.uQ3.AWAITING_INPUT),b(x+1);break}c({type:"incorrect"}),d(y.uQ3.PROVIDE_FEEDBACK)}}},indexWithinMode:x,mode:g,progressGoal:h,progressRatio:C,quizMode:a,readingBookPartActivity:n,readingBookPartActivityUpdate:b,renderLearningContent:g!==y.Msh.DONE&&!_,vocabAndPagesSeen:f}})();if(!v)return null;o[0]!==d||o[1]!==u||o[2]!==h?(e=()=>{switch(u){case y.Msh.BOOK_PAGES:return(0,g.jsx)(a5,{cta:0===d?null:(0,g.jsx)(tc,{onClick:()=>{h(d-1)}})});case y.Msh.QUIZ:return(0,g.jsx)(a5,{additionalButtonsSection:(0,g.jsx)(rt,{})});default:return(0,g.jsx)(a5,{})}},o[0]=d,o[1]=u,o[2]=h,o[3]=e):e=o[3];let C=e;o[4]!==c||o[5]!==d||o[6]!==u||o[7]!==h?(t=()=>{switch(u){case y.Msh.BOOK_PAGES:case y.Msh.VOCAB:return(0,g.jsx)(a9,{cta:(0,g.jsx)(tB,{handleClickButton:()=>{h(d+1)},primaryButtonsEnabled:!0,primaryVariant:y.AqZ.RIGHT_ARROW,secondaryVariant:y.wsu.NONE})});case y.Msh.QUIZ:return(0,g.jsx)(a9,{cta:(0,g.jsx)(s0,{handleClickButton:c})});default:return(0,g.jsx)(a9,{})}},o[4]=c,o[5]=d,o[6]=u,o[7]=h,o[8]=t):t=o[8];let N=t;o[9]!==d||o[10]!==u||o[11]!==p||o[12]!==v||o[13]!==h||o[14]!==b||o[15]!==x?(n=()=>{let e=null;switch(u){case y.Msh.BOOK_PAGES:e=(0,g.jsx)(tP,{bookPageIndex:d});break;case y.Msh.QUIZ:e=(0,g.jsx)(sX,{mode:p,question:v.questions[d]});break;case y.Msh.VOCAB:e=(0,g.jsx)(rr,{onWordClick:h,vocabIndex:d,vocabProgress:x})}return b?(0,g.jsx)("div",{className:rl().learningContainer,children:e}):null},o[9]=d,o[10]=u,o[11]=p,o[12]=v,o[13]=h,o[14]=b,o[15]=x,o[16]=n):n=o[16];let P=n;return o[17]!==P?(a=P(),o[17]=P,o[18]=a):a=o[18],o[19]!==C?(s=C(),o[19]=C,o[20]=s):s=o[20],o[21]!==_||o[22]!==m?(r=(0,g.jsx)(s7,{progressGoal:_,progressRatio:m}),o[21]=_,o[22]=m,o[23]=r):r=o[23],o[24]!==N?(i=N(),o[24]=N,o[25]=i):i=o[25],o[26]!==a||o[27]!==s||o[28]!==r||o[29]!==i?(l=(0,g.jsx)(a1,{isKeyboardVisible:!1,learningContent:a,leftColumn:s,progressBar:r,rightColumn:i}),o[26]=a,o[27]=s,o[28]=r,o[29]=i,o[30]=l):l=o[30],l};var ru=n(39616);let r_=({lastPublishedAtReference:e,lastValueReference:t,publish:n,shouldPublishImmediately:a=!1,value:s})=>{if(s===t.current)return;let r=globalThis.performance?.now()??Date.now();(a||!(r-e.current<250))&&(e.current=r,t.current=s,n(s))},rm=e=>{let t,n,a=(0,f.c)(4),{progressRatio:s}=e;a[0]!==s?(t={positionUpdateBehavior:h.INSTANT,progressRatio:s,showQuizIcon:!1,subject:y.OMU.READING},a[0]=s,a[1]=t):t=a[1];let r=s4(t);return a[2]!==r?(n=(0,g.jsx)(aQ,{...r}),a[2]=r,a[3]=n):n=a[3],n};var rp=n(5573),rv=n(30948),rh=n.n(rv);let rb=e=>{let t,n,a,s,r,i,l,o=(0,f.c)(33),{additionalDebugButtons:c,end:d,onEnded:u,onTimeUpdate:_,start:m,youtubeVideoID:p}=e,{isLevelPracticePaused:v,onVideoError:h,onVideoPaused:b,onVideoPlay:x,onVideoStarted:j,playbackRate:y,playerReference:C,setPlaybackRate:N,shouldBePlaying:P,shouldShowManualPlayButton:S,source:I}=(e=>{let t,n,a,s,r,i,l,o=(0,f.c)(19),[c,d]=(0,k.useState)(1),u=(0,k.useRef)(null),_=A(),[m,p]=(0,k.useState)(!1),[v,h]=(0,k.useState)(!1),b=`https://www.youtube-nocookie.com/watch?v=${e}`;o[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{h(!1),p(!1)},o[0]=t):t=o[0],o[1]!==b?(n=[b],o[1]=b,o[2]=n):n=o[2],(0,k.useEffect)(t,n);let x=!m&&!_,g=(!v||m)&&!_;o[3]!==m?(a=()=>{h(!0),m&&p(!1)},o[3]=m,o[4]=a):a=o[4];let j=a;o[5]!==_?(s=()=>{_||p(!0)},o[5]=_,o[6]=s):s=o[6];let y=s;o[7]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{p(!1)},o[7]=r):r=o[7];let C=r;o[8]!==e?(i=t=>{(0,rp.C)({code:t.currentTarget.error?.code,componentName:"YouTubeReactPlayer",youtubeVideoID:e})},o[8]=e,o[9]=i):i=o[9];let N=i;return o[10]!==_||o[11]!==N||o[12]!==y||o[13]!==j||o[14]!==c||o[15]!==x||o[16]!==g||o[17]!==b?(l={isLevelPracticePaused:_,onVideoError:N,onVideoPaused:y,onVideoPlay:C,onVideoStarted:j,playbackRate:c,playerReference:u,setPlaybackRate:d,shouldBePlaying:x,shouldShowManualPlayButton:g,source:b},o[10]=_,o[11]=N,o[12]=y,o[13]=j,o[14]=c,o[15]=x,o[16]=g,o[17]=b,o[18]=l):l=o[18],l})(p);if(!p)return null;let w=`${rh().videoContainer} ${v?rh().transparent:""}`;return o[0]!==d||o[1]!==m?(t={youtube:{disablekb:1,end:d,fs:0,iv_load_policy:3,rel:0,start:m}},o[0]=d,o[1]=m,o[2]=t):t=o[2],o[3]!==u||o[4]!==_||o[5]!==h||o[6]!==b||o[7]!==x||o[8]!==j||o[9]!==y||o[10]!==C||o[11]!==P||o[12]!==I||o[13]!==t?(n=(0,g.jsx)(nR.A,{className:rh().youtubePlayer,config:t,controls:!1,height:"100%",onEnded:u,onError:h,onPause:b,onPlay:x,onPlaying:j,onT
12imeUpdate:_,playbackRate:y,playing:P,playsInline:!0,ref:C,src:I,width:"100%"}),o[3]=u,o[4]=_,o[5]=h,o[6]=b,o[7]=x,o[8]=j,o[9]=y,o[10]=C,o[11]=P,o[12]=I,o[13]=t,o[14]=n):n=o[14],o[15]!==v||o[16]!==C||o[17]!==S?(a=S?(0,g.jsx)(E.c_,{animation:"funExpand",audioEvent:"hover",className:rh().playButton,"data-testid":"video-error-play-button",image:"https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/images/playbutton2.png",onClick:()=>{v||C.current?.play()}}):null,o[15]=v,o[16]=C,o[17]=S,o[18]=a):a=o[18],o[19]!==N?(s=(0,g.jsx)(ru.U,{bottom:"250px",left:"0",onClick:()=>{N(.5)},title:".5x"}),o[19]=N,o[20]=s):s=o[20],o[21]!==N?(r=(0,g.jsx)(ru.U,{bottom:"250px",left:"40px",onClick:()=>{N(1)},title:"1x"}),o[21]=N,o[22]=r):r=o[22],o[23]!==N?(i=(0,g.jsx)(ru.U,{bottom:"250px",left:"80px",onClick:()=>{N(5)},title:"5x"}),o[23]=N,o[24]=i):i=o[24],o[25]!==c||o[26]!==w||o[27]!==n||o[28]!==a||o[29]!==s||o[30]!==r||o[31]!==i?(l=(0,g.jsxs)("div",{className:w,children:[n,a,s,r,i,c]}),o[25]=c,o[26]=w,o[27]=n,o[28]=a,o[29]=s,o[30]=r,o[31]=i,o[32]=l):l=o[32],l},rx=()=>{let e,t,n,a,s,r,i,l,o=(0,f.c)(19),[c,d]=(0,k.useState)(0),{data:u}=(0,O.os)(),_=(u?.segment_end??0)>0?u?.segment_end-(u?.segment_start??0):void 0,m=u?.segment_start??0;o[0]===Symbol.for("react.memo_cache_sentinel")?(e=[...C.bT],o[0]=e):e=o[0];let p=(0,k.useRef)(e),v=(0,k.useRef)(0),h=(0,k.useRef)(-1/0);o[1]!==_||o[2]!==m||o[3]!==u?.id?(t=e=>{let t=e.currentTarget,{currentTime:n}=t,a=_||t.duration,s=n>=m?n-m:n;if(Number.isNaN(a)||Number.isNaN(s)||a<=0)return;let r=Math.min(s/a,1);r_({lastPublishedAtReference:h,lastValueReference:v,publish:d,shouldPublishImmediately:r>=1,value:r}),(0,C.jv)({checkpointsReference:p.current,eventName:"Reading Progress Checkpoint Reached",fireEvent:w.X8,payload:{seconds:s,videoLessonId:u?.id},ratio:r})},o[1]=_,o[2]=m,o[3]=u?.id,o[4]=t):t=o[4],u?.id;let b=t;o[5]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{v.current=1,d(1)},o[5]=n):n=o[5];let x=n;return u?(o[6]!==b||o[7]!==u?.segment_end||o[8]!==u?.segment_start||o[9]!==u?.youtube||o[10]!==c?(a=c<1?(0,g.jsx)(rb,{additionalDebugButtons:(0,g.jsx)(ru.U,{bottom:"220px",left:"0",onClick:x,title:"skip to end"}),end:u?.segment_end,onEnded:x,onTimeUpdate:b,start:u?.segment_start,youtubeVideoID:u?.youtube}):null,o[6]=b,o[7]=u?.segment_end,o[8]=u?.segment_start,o[9]=u?.youtube,o[10]=c,o[11]=a):a=o[11],o[12]===Symbol.for("react.memo_cache_sentinel")?(s=(0,g.jsx)(a5,{}),o[12]=s):s=o[12],o[13]!==c?(r=(0,g.jsx)(rm,{progressRatio:c}),o[13]=c,o[14]=r):r=o[14],o[15]===Symbol.for("react.memo_cache_sentinel")?(i=(0,g.jsx)(a9,{}),o[15]=i):i=o[15],o[16]!==a||o[17]!==r?(l=(0,g.jsx)(a1,{isKeyboardVisible:!1,learningContent:a,leftColumn:s,progressBar:r,rightColumn:i}),o[16]=a,o[17]=r,o[18]=l):l=o[18],l):null},rg=e=>{let t,n,a=(0,f.c)(4),{progressRatio:s}=e;a[0]!==s?(t={progressRatio:s},a[0]=s,a[1]=t):t=a[1];let r=(e=>{let t,n=(0,f.c)(3),{progressRatio:a}=e,s=1===a?h.SMOOTH:h.INSTANT;return n[0]!==s||n[1]!==a?(t={positionUpdateBehavior:s,progressRatio:a,showQuizIcon:!0,subject:y.OMU.SCIENCE},n[0]=s,n[1]=a,n[2]=t):t=n[2],s4(t)})(t);return a[2]!==r?(n=(0,g.jsx)(aQ,{...r}),a[2]=r,a[3]=n):n=a[3],n},rf=()=>{let e,t,n,a,s,r,i,l,o,c,d,u,_,m=(0,f.c)(37),[p,v]=(0,k.useState)(0),[h,b]=(0,k.useState)(!1),{data:x}=(0,O.YL)(),N=(0,j.r8)(rj),{data:P}=(0,O.IO)(),S=(0,j.r8)(ry),E=(0,j.r8)(rC),I=(0,j.r8)(rN),{mutate:T}=(0,O.Uq)();m[0]===Symbol.for("react.memo_cache_sentinel")?(e=[...C.bT],m[0]=e):e=m[0];let M=(0,k.useRef)(e),A=(0,k.useRef)(0),L=(0,k.useRef)(-1/0);m[1]!==I?(t=()=>(I(y.uQ3.AWAITING_INPUT),()=>{I(y.uQ3.AWAITING_INPUT)}),n=[I],m[1]=I,m[2]=t,m[3]=n):(t=m[2],n=m[3]),(0,k.useEffect)(t,n);let R=h?1:.85*p,B=p>=1&&!1===h;m[4]!==P?.video_lesson?.id?(a=e=>{let{currentTime:t,duration:n}=e.currentTarget;if(Number.isNaN(n)||Number.isNaN(t)||n<=0)return;let a=Math.min(t/n,1);r_({lastPublishedAtReference:L,lastValueReference:A,publish:v,shouldPublishImmediately:a>=1,value:a}),(0,C.jv)({checkpointsReference:M.current,eventName:"Science Progress Checkpoint Reached",fireEvent:w.X8,payload:{seconds:t,videoLessonId:P?.video_lesson?.id},ratio:a})},m[4]=P?.video_lesson?.id,m[5]=a):a=m[5],P?.video_lesson?.id;let $=a;m[6]===Symbol.for("react.memo_cache_sentinel")?(s=()=>{A.current=1,v(1)},m[6]=s):s=m[6];let D=s;
12m[7]!==N||m[8]!==x?.incentive||m[9]!==x?.level_number||m[10]!==T||m[11]!==S||m[12]!==E||m[13]!==P?.question||m[14]!==I?(r=async()=>{switch(S){case y.uQ3.PROVIDE_FEEDBACK:b(!0);break;case y.uQ3.READY_TO_SUBMIT:{let e=P?.question?.answers?.find(e=>e.id===E)?.correct;T({answerId:E,questionId:P?.question.id}),e?(N({gems:10,source:"Science Question Answer",type:"correct"}),b(!0),(0,w.X8)("Earned Gems",{incentive:x?.incentive,level:x?.level_number,num_gems:10,source:"Science Question Answer",subject_id:y.pN.SCIENCE})):(I(y.uQ3.PROVIDE_FEEDBACK),N({type:"incorrect"}))}}},m[7]=N,m[8]=x?.incentive,m[9]=x?.level_number,m[10]=T,m[11]=S,m[12]=E,m[13]=P?.question,m[14]=I,m[15]=r):r=m[15];let G=r;if(!P)return null;m[16]!==B||m[17]!==h||m[18]!==$||m[19]!==S||m[20]!==P?.question||m[21]!==P?.video_lesson?.youtube?(i=()=>h?null:B?(0,g.jsx)(sX,{mode:S,question:P?.question}):(0,g.jsx)(rb,{additionalDebugButtons:(0,g.jsx)(ru.U,{bottom:"220px",left:"0",onClick:D,title:"quiz"}),onEnded:D,onTimeUpdate:$,youtubeVideoID:P?.video_lesson?.youtube}),m[16]=B,m[17]=h,m[18]=$,m[19]=S,m[20]=P?.question,m[21]=P?.video_lesson?.youtube,m[22]=i):i=m[22];let q=i;return m[23]!==q?(l=q(),m[23]=q,m[24]=l):l=m[24],m[25]===Symbol.for("react.memo_cache_sentinel")?(o=(0,g.jsx)(a5,{}),m[25]=o):o=m[25],m[26]!==R?(c=(0,g.jsx)(rg,{progressRatio:R}),m[26]=R,m[27]=c):c=m[27],m[28]!==G||m[29]!==B?(d=B?(0,g.jsx)(s0,{handleClickButton:G}):null,m[28]=G,m[29]=B,m[30]=d):d=m[30],m[31]!==d?(u=(0,g.jsx)(a9,{cta:d}),m[31]=d,m[32]=u):u=m[32],m[33]!==u||m[34]!==l||m[35]!==c?(_=(0,g.jsx)(a1,{isKeyboardVisible:!1,learningContent:l,leftColumn:o,progressBar:c,rightColumn:u}),m[33]=u,m[34]=l,m[35]=c,m[36]=_):_=m[36],_};function rj(e){return e.unifiedProduct.actions.enqueueAnimation}function ry(e){return e.unifiedProduct.quiz.mode}function rC(e){return e.unifiedProduct.quiz.selectedAnswerId}function rN(e){return e.unifiedProduct.actions.switchQuizMode}function rP(e){return e.unifiedProduct.progressBar.percentage}function rS(e){return 100===e.unifiedProduct.progressBar.percentage}let rE=()=>{let e,t,n,a,s,r,i,l=(0,f.c)(2),o=(n=(0,f.c)(3),a=(0,j.r8)(rP),s=(0,j.r8)(rS),r=a/100,i=s?h.SMOOTH:h.INSTANT,n[0]!==i||n[1]!==r?(t={positionUpdateBehavior:i,progressRatio:r,showQuizIcon:!0,subject:y.OMU.SOCIAL_STUDIES},n[0]=i,n[1]=r,n[2]=t):t=n[2],s4(t));return l[0]!==o?(e=(0,g.jsx)(aQ,{...o}),l[0]=o,l[1]=e):e=l[1],e};var rI=n(34179),rw=n.n(rI);n(6334),n(69968),n(54785),n(55012),n(63084);var rT=n(84643);function rk(e){return e.unifiedProduct.actions.enqueueAnimation}function rM(e){return e.unifiedProduct.actions.setSocialStudiesVideoState}function rO(e){return e.unifiedProduct.actions.switchQuizMode}n(28123),n(4226);let rA=()=>{let e,t,n,a,s,r,i,l,o,c,d,u,_,m=(0,f.c)(37),{handleClickPrimaryCta:p,handleSpeedChange:v,handleStartQuiz:h,handleTimeUpdate:b,isEpisodeCompleted:x,isQuizTime:N,loading:P,onCuePoint:S,onEnd:E,onLoaded:I,question:T,quizMode:M,videoId:L,videoState:R}=(()=>{let e=(0,k.useRef)(null),t=(0,j.r8)(e=>e.unifiedProduct.quiz.mode),n=(0,j.r8)(e=>e.unifiedProduct.actions.setProgressBarPercentage),a=(0,j.r8)(e=>100===e.unifiedProduct.progressBar.percentage),s=(0,j.r8)(e=>e.unifiedProduct.socialStudies.videoState),r=(0,j.r8)(e=>e.unifiedProduct.actions.setSocialStudiesVideoState),i=(0,j.r8)(e=>e.unifiedProduct.actions.switchQuizMode),{data:l}=(0,O.$V)(),o=l?.video_lesson.video_states??[],c=o.find(e=>e.state===y.w1v.VIDEO_QUIZ_TIME),d=l?.question??null,u=s?o.find(e=>e.state===s):o.find(e=>e.initial),_=A();sT(u?.video_action,_,e.current);let m=(0,k.useRef)([...C.bT]),p=(0,k.useRef)(null),v=(0,k.useRef)(-1/0),h=(0,k.useCallback)(e=>{let t=100===j.r8.getState().unifiedProduct.progressBar.percentage;n(100*(0,C.li)(l?.video_lesson,e,t))},[l?.video_lesson,n]),b=(0,k.useCallback)(e=>{if(!Number.isFinite(e.seconds)||(r_({lastPublishedAtReference:v,lastValueReference:p,publish:h,value:e.seconds}),!c?.current_time))return;let t=e.seconds/c.current_time;(0,C.jv)({checkpointsReference:m.current,eventName:"Social Studies Progress Checkpoint Reached",fireEvent:w.X8,payload:{seconds:e.seconds,topic:l?.topic.name},ratio:t})},[c?.current_time,l?.topic.name,h]),x=()=>{r(y.w1v.VIDEO_QUIZ_TIME),c?.current_time&&h(c.current_time),i(y.uQ3.AWAITING_INPUT)},g=(0,j.r8)(e=>e.unifiedProduct.quiz.selectedAnswerId),N=(0,j.r8)(e=>e.unifiedProduct.actions.setSocialStudiesVideoState),P=(()=>{let e,t,n,a=(0,f.c)(11),{data:s}=(0,O.YL)(),{mutate:r}=(0,O.Uq)(),i=(0,j.r8)(rk),l=(0,j.r8)(rM),o=(0,j.r8)(rO),c=A(),d=(0,rT.S)(c),u=(0,k.useRef)(null);return a[0]!==c||a[1]!==d||a[2]!==l?(e=()=>{d&&!c&&u.current&&(l(u?.current),u.current=null)},t=[d,l,c],a[0]=c,a[1]=d,a[2]=l,a[3]=e,a[4]=t):(e=a[3],t=a[4]),(0,k.useEffect)(e,t),a[5]!==i||a[6]!==s?.incentive||a[7]!==s?.level_number||a[8]!==r||a[9]!==o?(n=e=>{let{answerId:t,question:n}=e;if(r({answerId:t,questionId:n.id}),n.answers.find(e=>e.id===t)?.correct){i({gems:10,source:"Social Studies Question Answer",type:"correct"}),u.current=y.w1v.VIDEO_CORRECT_CELEBRATION,(0,w.X8)("Earned Gems",{incentive:s?.incentive,level:s?.level_number,num_gems:10,source:"Social Studies Question Answer",subject_id:y.pN.SOCIAL_STUDIES});return}i({type:"incorrect"}),o(y.uQ3.PROVIDE_FEEDBACK)},a[5]=i,a[6]=s?.incentive,a[7]=s?.level_number,a[8]=r,a[9]=o,a[10]=n):n=a[10],n})(),S=!l;return{handleClickPrimaryCta:()=>
12{if(t===y.uQ3.PROVIDE_FEEDBACK){i(y.uQ3.AWAITING_INPUT),N(y.w1v.VIDEO_INCORRECT_INSTRUCTION);return}P({answerId:g,question:l?.question})},handleSpeedChange:t=>{!e.current||globalThis.confirm("Warning: If speed is changed, player may miss cue points UNTIL YOU REFRESH OR START A NEW EPISODE. Please do not report this as a bug.")&&(e.current.player.playbackRate=t)},handleStartQuiz:x,handleTimeUpdate:b,isEpisodeCompleted:a,isQuizTime:u?.state===y.w1v.VIDEO_QUIZ_TIME,loading:S,onCuePoint:(t,a)=>{switch(a.data.state){case y.w1v.VIDEO_CHECK_TIME:x();break;case y.w1v.VIDEO_CORRECT_CELEBRATION:case y.w1v.VIDEO_INCORRECT_INSTRUCTION:e.current?.player.pause(),n(100),r(null);break;case y.w1v.VIDEO_INTRO:r(y.w1v.VIDEO_CHECK_TIME);case y.w1v.VIDEO_QUIZ_TIME:}},onEnd:()=>{n(100),r(null),e.current?.player.pause()},onLoaded:(t,n)=>{e.current=t},opaque:!_,question:d,quizMode:t,videoId:l?.video_lesson.vimeo_id,videoState:u}})();if(P)return null;m[0]===Symbol.for("react.memo_cache_sentinel")?(e={height:"100%",width:"100%"},m[0]=e):e=m[0];let B=x?null:R;m[1]!==b||m[2]!==S||m[3]!==E||m[4]!==I||m[5]!==B||m[6]!==L?(t=(0,g.jsx)("div",{className:rw().videoContainer,children:(0,g.jsx)(er.p,{id:L,onCuePoint:S,onEnd:E,onLoaded:I,onTimeUpdate:b,style:e,videoState:B})}),m[1]=b,m[2]=S,m[3]=E,m[4]=I,m[5]=B,m[6]=L,m[7]=t):t=m[7],m[8]!==T||m[9]!==M||m[10]!==R?.state?(n=R?.state===y.w1v.VIDEO_QUIZ_TIME&&T?(0,g.jsx)(sX,{mode:M,question:T}):null,m[8]=T,m[9]=M,m[10]=R?.state,m[11]=n):n=m[11],m[12]!==v?(a=(0,g.jsx)(ru.U,{bottom:"250px",left:"0",onClick:()=>{v(.5)},title:".5x"}),m[12]=v,m[13]=a):a=m[13],m[14]!==v?(s=(0,g.jsx)(ru.U,{bottom:"250px",left:"40px",onClick:()=>{v(1)},title:"1x"}),m[14]=v,m[15]=s):s=m[15],m[16]!==v?(r=(0,g.jsx)(ru.U,{bottom:"250px",left:"80px",onClick:()=>{v(5)},title:"5x"}),m[16]=v,m[17]=r):r=m[17],m[18]!==h?(i=(0,g.jsx)(ru.U,{bottom:"220px",left:"0",onClick:h,title:"quiz"}),m[18]=h,m[19]=i):i=m[19],m[20]!==t||m[21]!==n||m[22]!==a||m[23]!==s||m[24]!==r||m[25]!==i?(l=(0,g.jsxs)(k.Fragment,{children:[t,n,a,s,r,i]}),m[20]=t,m[21]=n,m[22]=a,m[23]=s,m[24]=r,m[25]=i,m[26]=l):l=m[26];let $=l;return m[27]===Symbol.for("react.memo_cache_sentinel")?(c=(0,g.jsx)(a5,{}),o=(0,g.jsx)(rE,{}),m[27]=o,m[28]=c):(o=m[27],c=m[28]),m[29]!==p||m[30]!==N?(d=N?(0,g.jsx)(s0,{handleClickButton:p}):null,m[29]=p,m[30]=N,m[31]=d):d=m[31],m[32]!==d?(u=(0,g.jsx)(a9,{cta:d}),m[32]=d,m[33]=u):u=m[33],m[34]!==$||m[35]!==u?(_=(0,g.jsx)(a1,{isKeyboardVisible:!1,learningContent:$,leftColumn:c,progressBar:o,rightColumn:u}),m[34]=$,m[35]=u,m[36]=_):_=m[36],_};function rL(e){return e.unifiedProduct.progressBar.percentage}function rR(e){return 100===e.unifiedProduct.progressBar.percentage}let rB=()=>{let e,t=(0,f.c)(2),n=(()=>{let e,t=(0,f.c)(4),{data:n}=(0,O.g$)(),a=n?.super_skills_video,s=(0,j.r8)(rL),r=(0,j.r8)(rR),i=s/100,l=a?.season===1,o=r?h.SMOOTH:h.INSTANT;return t[0]!==o||t[1]!==i||t[2]!==l?(e={positionUpdateBehavior:o,progressRatio:i,showQuizIcon:l,subject:y.OMU.SUPER_SKILLS},t[0]=o,t[1]=i,t[2]=l,t[3]=e):e=t[3],s4(e)})();return t[0]!==n?(e=(0,g.jsx)(aQ,{...n}),t[0]=n,t[1]=e):e=t[1],e};var r$=n(55251),rD=n.n(r$);let rG=()=>{},rq=e=>{let t,n,a,s,r,i=(0,f.c)(17),{enableButtons:l,isSelected:o,number:c,onSelect:d,show:u}=e,_=`${rD().episode11CustomButton} ${l?"enableButtons":""} ${rD()[`episode11CustomButton${c}`]} ${u?"show":""}`;i[0]!==l||i[1]!==c||i[2]!==d?(t=()=>{l&&d(c)},n=e=>{l&&("Enter"===e.key||" "===e.key)&&d(c)},i[0]=l,i[1]=c,i[2]=d,i[3]=t,i[4]=n):(t=i[3],n=i[4]);let m=l?0:-1,p=`Selection button ${c}`,v=o?`https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/superskills/superskills-select-button-selected-${c}.png`:`https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/superskills/superskills-select-button-unselected-${c}.png`;return i[5]!==p||i[6]!==v?(a=(0,g.jsx)("div",{children:(0,g.jsx)("img",{alt:p,src:v})}),i[5]=p,i[6]=v,i[7]=a):a=i[7],i[8]!==_||i[9]!==t||i[10]!==n||i[11]!==m||i[12]!==a?(s=(0,g.jsx)("div",{className:_,onClick:t,onKeyDown:n,role:"button",tabIndex:m,children:a}),i[8]=_,i[9]=t,i[10]=n,i[11]=m,i[12]=a,i[13]=s):s=i[13],i[14]!==l||i[15]!==s?(r=(0,g.jsx)(ez.O,{enabled:l,children:s}),i[14]=l,i[15]=s,i[16]=r):r=i[16],r},rV=({className:e,enableButtons:t,onAnswer:n=rG,state:a})=>{let[s,r]=(0,k.useState)({}),i=e=>!!s[e],l=e=>{let t=!0;i(e)&&(t=!1),r(n=>({...n,[e]:t}))};return(0,g.jsxs)("div",{className:`${rD().stateContainer} ${"9"===a&&!t?"hide":"show"} ${e||""}`,children:[(0,g.jsx)(rq,{enableButtons:t,isSelected:i(1),number:1,onSelect:l,show:"selectIntro1"===a||"selectIntro2"===a||"selectIntro3"===a||"selectIntro4"===a||"selectIntro5"===a||"9"===a}),(0,g.jsx)(rq,{enableButtons:t,isSelected:i(2),number:2,onSelect:l,show:"selectIntro2"===a||"selectIntro3"===a||"selectIntro4"===a||"selectIntro5"===a||"9"===a}),(0,g.jsx)(rq,{enableButtons:t,isSelected:i(3),number:3,onSelect:l,show:"selectIntro3"===a||"selectIntro4"===a||"selectIntro5"===a||"9"===a}),(0,g.jsx)(rq,{enableButtons:t,isSelected:i(4),number:4,onSelect:l,show:"selectIntro4"===a||"selectIntro5"===a||"9"===a}),(0,g.jsx)(rq,{enableButtons:t,isSelected:i(5),number:5,onSelect:l,show:"selectIntro5"===a||"9"===a}),t?(0,g.jsx)(ez.O,{children:(0,g.jsx)("div",{className:rD().episode11CheckButton,onClick:()=>{let e=!0;for(let t=1;t<=5;t+=1)e&&=i(t);n(e)}})}):null]})};var rU=n(41597),rF=n.n(rU);let rK=(e,t)=>"string"==typeof e&&e.includes("vw")?`${Number(e.replace("vw",""))/100*(t??0)}px`:e,rH=(e,t)=>({height:rK(e.height,t),left:rK(e.left,t),top:rK(e.top,t),width:rK(e.width,t)}),rz=()=>{let e,t,n,a,s,r,i,l,o,c,d,u,_,m,p=(0,f.c)(46),{containerReference:v,containerWidth:h,currentStateData:b,episodeNumber:x,handleAnswerEpisode11:N,handleJumpQuiz:P,handleSpeedChange:S,handleTimeUpdate:E,handleVideoPlay:I,isPausedState:T,loading:M,onCuePoint:L,onEnd:R,onLoaded:B,onPlayerDestroyed:$,renderEpisode11SelectQuestion:D,renderStandardAnswers:G,state:q,submitAnswer:V,videoID:U}=(()=>{let{data:e}=(0,O.g$)(),t=e?.super_skills_video,n=e?.super_skills_video.episode_number,a=e?.super_skills_video.season,s=(0,k.useRef)(null),r=(0,k.useRef)(!1),i=(0,j.r8)(e=>e.unifiedProduct.actions.enqueueAnimation),{mutate:l}=(0,O.Uq)(),o=(0,j.r8)(e=>e.unifiedProduct.actions.setProgressBarPercentage),[c,d]=(0,k.useState)(""),u=(0,k.useRef)(null),[_,m]=(0,k.useState)(0),p=A();(0,k.useEffect)(()=>{let e=u.current;if(!e)return;m(e.clientWidth);let t=new ResizeObserver(e=>{for(let t of e)m(t.contentRect.width)});return t.observe(e),()=>{t.disconnect()}},[e]);let v=(0,k.useRef)(null),h=A(),b=(0,rT.S)(h),{data:x}=(0,O.YL)(),g=(0,k.useCallback)(e=>
12{if(e.video_states&&e.video_states[0]){l({answerId:e.id,questionId:e.question_id});let t={...e.video_states[0]},n=10*(1===(a??1));if(n){v.current=t,i({gems:n,source:"Super Skills Question Answer",type:"correct"}),(0,w.X8)("Earned Gems",{incentive:x?.incentive,level:x?.level_number,num_gems:n,source:"Super Skills Question Answer",subject_id:y.pN.SUPER_SKILLS});return}d(t.state),s.current?.setState(t)}},[l,a,i,x?.incentive,x?.level_number]);(0,k.useEffect)(()=>{b&&!h&&v.current&&(d(v?.current?.state),s.current?.setState(v.current),v.current=null)},[b,h]);let f=(0,k.useCallback)(()=>{(0,w.X8)("Super Skills Video Played",{episode:n,state:c})},[n,c]),N=(0,k.useRef)([...C.bT]),P=(0,k.useRef)(null),S=(0,k.useRef)(-1/0),E=(0,k.useCallback)(e=>{let n=100===j.r8.getState().unifiedProduct.progressBar.percentage;o(100*(0,C.Im)(t,e,n))},[t,o]),I=(0,k.useCallback)(e=>{if(!Number.isFinite(e.seconds)||(r_({lastPublishedAtReference:S,lastValueReference:P,publish:E,value:e.seconds}),!t?.season_one_quiz_time))return;let a=e.seconds/t?.season_one_quiz_time;(0,C.jv)({checkpointsReference:N.current,eventName:"Super Skills Progress Checkpoint Reached",fireEvent:w.X8,payload:{episode:n,seconds:e.seconds},ratio:a})},[t?.season_one_quiz_time,n,E]),T=(0,k.useCallback)(e=>t?.video_states?.find(t=>t.state===e),[t?.video_states]),M=Number.parseInt(t?.video_id,10),L=t?.video_states?.find(e=>e.initial)?.state??"",R=T(c),B=R?.video_action===y.ezC.PAUSE;sT(R?.video_action,p,s.current);let $=(0,k.useCallback)((e,t)=>{let n=T(e);if(!n)return void console.error("State",e,"doesnt exist");let a={...n,is_initial:t};s.current?.setState(a);let r=n.current_time;"number"==typeof r&&Number.isFinite(r)&&E(r),d(e)},[T,E]),D=(0,k.useCallback)(async()=>{r.current||(r.current=!0,s.current?.pause(),(0,w.X8)("Super Skills Episode Completed",{episode:n,subject:y.NvZ.SUPER_SKILLS}),o(100))},[n,o]);(0,k.useLayoutEffect)(()=>{c===y.ASY.PLAYER_CREATED&&$(L,!0),R?.video_action===y.ezC.PAUSE&&c===y.ASY.FIRST_PAUSE&&(0,w.X8)("Super Skills First Quiz Reached",{episode:n,state:c}),R?.video_action!==y.ezC.END||r.current||D()},[n,D,L,$,c,R]);let G=(0,k.useCallback)(e=>{R.question&&g(e?R.question.answers[0]:R.question.answers[1])},[R,g]),q=(0,k.useCallback)((e,t)=>{t?.data?.next_state&&$(t?.data?.next_state,!1)},[$]),V=(0,k.useCallback)(()=>{D()},[D]),U=(0,k.useCallback)(e=>{s.current=e,r.current=!1,s.current.pause(),d(y.ASY.PLAYER_CREATED)},[d]),F=(0,k.useCallback)(()=>{s.current=null,d("")},[d]),K=11===n&&y.BBj.includes(c),H=B&&!K&&R?.question;return{containerReference:u,containerWidth:_,currentStateData:R,episodeNumber:n,handleAnswerEpisode11:G,handleJumpQuiz:e=>{let n=t?.video_states.filter(e=>e.question_id).sort((t,n)=>"previous"===e?n.current_time-t.current_time:t.current_time-n.current_time).find(t=>"previous"===e?t.current_time<(R?.current_time??0):t.current_time>(R?.current_time??0));n&&$(n.state,!1)},handleSpeedChange:e=>{!s.current||globalThis.confirm("Warning: If speed is changed, player may miss cue points UNTIL YOU REFRESH OR START A NEW EPISODE. Please do not report this as a bug.")&&(s.current.player.playbackRate=e)},handleTimeUpdate:I,handleVideoPlay:f,isPausedState:B,loading:!e,onCuePoint:q,onEnd:V,onLoaded:U,onPlayerDestroyed:F,renderEpisode11SelectQuestion:K,renderStandardAnswers:H,state:c,submitAnswer:g,videoHandleEndedDone:r,videoID:M}})();if(M)return null;p[0]===Symbol.for("react.memo_cache_sentinel")?(e={height:"100%",width:"100%"},p[0]=e):e=p[0],p[1]!==E||p[2]!==I||p[3]!==L||p[4]!==R||p[5]!==B||p[6]!==$||p[7]!==U?(t=(0,g.jsx)(er.p,{fireEvent:w.X8,id:U,onCuePoint:L,onEnd:R,onLoaded:B,onPlay:I,onPlayerDestroyed:$,onTimeUpdate:E,style:e}),p[1]=E,p[2]=I,p[3]=L,p[4]=R,p[5]=B,p[6]=$,p[7]=U,p[8]=t):t=p[8],p[9]!==h||p[10]!==b||p[11]!==x||p[12]!==G||p[13]!==q||p[14]!==V?(n=G?(0,g.jsx)("div",{className:rF().stateActions,children:b.question.answers.map((e,t)=>{let n=e.answer_data.top?rH(e.answer_data,h):rH({height:"2vw",left:"0vw",top:`${10*t}vw`,width:"10vw"},h),a=e.answer_data.audio_position?rH(e.answer_data.audio_position,h):{},s=e.audio_url&&""!==e.audio_url;return(0,g.jsx)(ez.O,{onClick:()=>{V(e),"7"===q&&1===x&&(0,w.X8)("Super Skills Final Quiz Answered",{answer:e,episode_number:x,state:q})},children:(0,g.jsx)("div",{className:rF().stateAction,style:n,children:s?(0,g.jsx)(ez.O,{className:rF().stateActionAudio,onClick:t=>{t.stopPropagation(),Z.xj.playForeground(e.audio_url)},style:a}):null},e.id)},e.id)})}):null,p[9]=h,p[10]=b,p[11]=x,p[12]=G,p[13]=q,p[14]=V,p[15]=n):n=p[15],p[16]!==N||p[17]!==T||p[18]!==D||p[19]!==q?(a=D?(0,g.jsx)(rV,{enableButtons:T,onAnswer:N,state:q}):null,p[16]=N,p[17]=T,p[18]=D,p[19]=q,p[20]=a):a=p[20],p[21]!==S?(s=(0,g.jsx)(ru.U,{bottom:"250px",left:"0",onClick:()=>{S(.5)},title:".5x"}),p[21]=S,p[22]=s):s=p[22],p[23]!==S?(r=(0,g.jsx)(ru.U,{bottom:"250px",left:"40px",onClick:()=>{S(1)},title:"1x"}),p[23]=S,p[24]=r):r=p[24],p[25]!==S?(i=(0,g.jsx)(ru.U,{bottom:"250px",left:"80px",onClick:()=>{S(5)},title:"5x"}),p[25]=S,p[26]=i):i=p[26],p[27]!==P?(l=(0,g.jsx)(ru.U,{bottom:"220px",left:"0",onClick:()=>{P("previous")},title:"Previous"}),p[27]=P,p[28]=l):l=p[28],p[29]!==P?(o=(0,g.jsx)(ru.U,{bottom:"220px",left:"70px",onClick:()=>{P("next")},title:"Next"}),p[29]=P,p[30]=o):o=p[30],p[31]!==v||p[32]!==t||p[33]!==n||p[34]!==a||p[35]!==s||p[36]!==r||p[37]!==i||p[38]!==l||p[39]!==o?(c=(0,g.jsxs)("div",{className:rF().videoContainer,ref:v,children:[t,n,a,s,r,i,l,o]}),p[31]=v,p[32]=t,p[33]=n,p[34]=a,p[35]=s,p[36]=r,p[37]=i,p[38]=l,p[39]=o,p[40]=c):c=p[40];let F=c;return p[41]===Symbol.for("react.memo_cache_sentinel")?(d=(0,g.jsx)(a5,{}),u=(0,g.jsx)(rB,{}),_=(0,g.jsx)(a9,{}),p[41]=d,p[42]=u,p[43]=_):(d=p[41],u=p[42],_=p[43]),p[44]!==F?(m=(0,g.jsx)(a1,{isKeyboardVisible:!1,learningContent:F,leftColumn:d,progressBar:u,rightColumn:_}),p[44]=F,p[45]=m):m=p[45],m},rW=()=>{let e=(0,f.c)(8),{data:t}=(0,O.lr)();if(!["collect_remaining_milestone_gems","practice"].includes(t?.level_state)||!t?.subject_id)return null;switch(t.subject_id){case y.pN.MATH:{let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)(sG,{}),e[0]=t):t=e[0],t}case y.pN.READING:{let n;if(t?.subject_content_type_id===3){let t;return e[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)(rx,{}),e[1]=t):t=e[1],t}return e[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,g.jsx)(rd,{}),e[2]=n):n=e[2],n}case y.pN.SCIENCE:{let t;return e[3]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)(rf,{}),e[3]=t):t=e[3],t}case y.pN.SOCIAL_STUDIES:{let t;return e[4]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)(rA,{}),e[4]=t):t=e[4],t}case y.pN.SUPER_SKILLS:{let t;return e[5]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)(rz,{}),e[5]=t):t=e[5],t}default:{let n,a=t?.subject_id;return e[6]!==a?(n=(0,C.Oc)(a),e[6]=a,e[7]=n):n=e[7],n}}};var rX=n(91432),rY=n.n(rX);function rQ(e){return e.unifiedProduct.animationQueue.length>0}let rZ={bottom:"13%",left:"13%",width:"17.26%"}
12,rJ=7/4,r0={bottom:12.5,left:11.9,right:11.9,top:12.5},r1={celebrate_progress:"Level_CelebrateVideo",chest:"Level_Chest",collect_remaining_milestone_gems:"Level_CollectRemainingMilestones",egg_hatching:"Level_EggHatch",intro:"Level_IntroVideo",pet_customizer:"Level_PetCustomizer",practice:"Level_Practice",store:"Level_MonsterStoreCloset"},r2=()=>{let e,t,n,a,s,r,i,l,o,c,d,u,_,m,p,v,h,b,x,N,P=(0,f.c)(64),{assetAspectRatio:S,bleedPercentages:I,handleAnimatedOutPetHatchingMask:T,handleCuePoint:M,handleOnEnd:A,handleOnLoaded:L,handleOnPlay:R,isExitModalOpen:B,isLoading:$,isUiDisabled:D,levelConfig:G,levelState:q,overlayIs:F,petPosition:W,renderPetHatchingMask:Y,shouldUseStaticBackground:Q,staticBackgroundSource:J,studentMonster:ee,studentPet:et}=(()=>{let{isEnabled:e,isLoading:t}=(0,U.f)(),n=(0,k.useRef)(null),a=(0,k.useRef)(!1),s=(0,k.useRef)(null),[r,i]=(0,k.useState)(!1),l=(0,k.useRef)(null),o=(0,j.r8)(rQ),{data:c}=(0,O.lr)(),d=c?.level_state||"intro",u=(0,k.useRef)(d);u.current=d;let{mutate:_}=(0,O.nM)(),{mutateAsync:m}=(0,O.lV)(),p=eS(),{data:v}=(0,O.YL)(),{isEnabled:h,status:b}=K(),x=v?.static_background_image?.src??"https://assets.adaptedmind.com/up/levels/bg-ocean.webp",g=h&&!!x,[f,N]=(0,k.useState)("idle"),[P,S]=(0,k.useState)(!1),E=(0,j.r8)(e=>e.unifiedProduct.animationQueue.length>0),I=(0,k.useRef)(new Set),T=v?.audio?.intro,[M,A]=(0,k.useState)(!1),L=V(),R=(0,k.useMemo)(()=>v?.background_video_data?.cue_points??[],[v]),B=(0,j.r8)(e=>e.unifiedProduct.level.overlay),$=(0,j.r8)(e=>e.unifiedProduct.actions.setLevelOverlay),D=(0,j.r8)(e=>e.unifiedProduct.actions.setSelectedStudentPetId),[G,q]=(0,k.useState)(y.erm.HIDDEN),F=(0,j.r8)(e=>e.unifiedProduct.actions.enqueueAnimation),{isLoading:W}=(0,O.lr)(),Y=W||"loading"===b||t,[Q,J]=(0,k.useState)({bottom:null,direction:y.AMV.OUT,left:null,width:"0%"}),ee=(0,k.useCallback)((e=rZ)=>{J(t=>({bottom:e.bottom,direction:y.AMV.IN,left:e.left,width:e.width??t.width}))},[]),et=(0,k.useCallback)(()=>{J(e=>({...e,direction:y.AMV.OUT,left:null}))},[]),en=(0,k.useCallback)(e=>{l.current&&(clearTimeout(l.current),l.current=null),ee(e.position),e.delay_before_exit_seconds>0&&(l.current=setTimeout(()=>{et(),l.current=null},1e3*e.delay_before_exit_seconds))},[ee,et]),ea=(0,k.useCallback)(e=>{q(e),g||e!==y.erm.INITIAL||A(!0)},[g]),es=(0,k.useCallback)(e=>{let t=H(e);t&&_({level_state:t})},[_]),er=(0,k.useCallback)(t=>{for(let a of t)switch(a.action){case"add_gems":F({gems:a.gems,milestoneNumber:null,source:"Add Gems",type:"milestone"}),(0,w.X8)("Earned Gems",{incentive:v?.incentive,level:v?.level_number,num_gems:a.gems,source:"Add Gems",subject_id:c?.subject_id});break;case"animate_monster":en(a);break;case"jump_to_time":if(g)break;if(!a.time){ej.A.error("No time provided for jump_to_time action");break}if(!n.current){ej.A.error("No player available for jump_to_time action");break}n.current.addCurrentTimeAndPlay(a.time);break;case"pet_position":ea(a.position);break;case"play_incentive":es(v?.incentive);break;case"set_level_state":_({level_state:X(u.current,a.state,{incentive:v?.incentive,isPetGameExperimentEnabled:e})});break;default:(0,C.Oc)(a)}},[en,ea,es,v?.incentive,v?.level_number,c?.subject_id,_,F,g,e]),ei=(0,k.useCallback)(e=>{N("running"),"egg_hatching"===e&&(q(y.erm.HIDDEN),S(!1),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{q(y.erm.INITIAL),S(!0),s.current=null},5900));let t=10*(v?.incentive==="chest");F({gems:t,milestoneNumber:C.Ms,source:"Add Gems",type:"milestone"}),(0,w.X8)("Earned Gems",{incentive:v?.incentive,level:v?.level_number,num_gems:t,source:"Add Gems",subject_id:c?.subject_id})},[F,c?.subject_id,v]),el=(0,k.useCallback)(()=>{if(g)return void _({level_state:z(v,e)});let t=((e,t)=>{let n=e?.background_video_data.segment_start_times.celebrate_progress;if(n&&n.time>0)return{segmentStart:n.time,type:"play_segment"};let a=H(e?.incentive);return a?{nextLevelState:a,type:"set_level_state"}:{nextLevelState:t?"pet_customizer":"store",type:"set_level_state"}})(v,e);if("play_segment"===t.type){n.current?.addCurrentTimeAndPlay(t.segmentStart),v?.audio?.outro&&Z.xj.playForeground(v?.audio.outro);let e=v?.background_video_data.segment_start_times.celebrate_progress;e?.actions&&er(e.actions);return}_({level_state:t.nextLevelState})},[v,_,er,g,e]),eo=(0,k.useCallback)(()=>
12{if(g)return void ei("chest");let e=v?.background_video_data.segment_start_times.chest,t=e?.time??0;n.current?.addCurrentTimeAndPlay(t),e?.actions&&er(e.actions)},[v,er,g,ei]),ec=(0,k.useCallback)(async()=>{let{response:e}=await m(c?.level===1);if((0,w.X8)("Earned Pet",{level:v?.level_number,pet_id:e.pet_id,subject_id:c?.subject_id}),g)return void ei("egg_hatching");let t=v?.background_video_data.segment_start_times.egg_hatching,a=t?.time??0;n.current?.addCurrentTimeAndPlay(a),t?.actions&&er(t.actions)},[v,c?.level,m,c?.subject_id,er,g,ei]),ed=(0,k.useCallback)(()=>{g?_({level_state:"practice"}):!a.current&&n.current&&(a.current=!0,T&&Z.xj.playForeground(T),n.current.addCurrentTimeAndPlay(0))},[T,_,g]),eu=(0,k.useCallback)(()=>{if(e&&D(null),g){q(y.erm.HIDDEN),$(y.aGi.PET_CUSTOMIZER_MODAL);return}n.current?.pause(),q(y.erm.HIDDEN),$(y.aGi.PET_CUSTOMIZER_MODAL);let t=v?.background_video_data.segment_start_times.pet_customizer;t?.actions&&er(t.actions)},[$,D,v,er,g,e]),e_=(0,k.useCallback)(()=>{let e=v?.background_video_data.segment_start_times.practice;if(!e)return;let t=e.time;g||"number"!=typeof t||(n.current?.setCurrentTime(t),n.current?.pause()),e?.actions&&er(e.actions)},[v,er,g]),em=(0,k.useCallback)(()=>{n.current?.pause(),v?.level_number===1&&Z.xj.playForeground("https://assets.adaptedmind.com/up/base-assets/bunch-of-gems.mp3"),$(y.aGi.INCENTIVES_STORE)},[v,$]),ep=(0,k.useMemo)(()=>({celebrate_progress:el,chest:eo,collect_remaining_milestone_gems:()=>{},egg_hatching:ec,intro:ed,pet_customizer:eu,practice:e_,store:em}),[el,eo,ec,ed,eu,e_,em]);(0,k.useLayoutEffect)(()=>{"egg_hatching"===d&&q(y.erm.HIDDEN)},[d]),(0,k.useEffect)(()=>{I.current.clear(),a.current=!1},[v?.background_video_data.id]),(0,k.useEffect)(()=>{"chest"!==d&&"egg_hatching"!==d&&(N("idle"),S(!1))},[d]),(0,k.useEffect)(()=>{"egg_hatching"!==d&&"pet_customizer"!==d&&s.current&&(clearTimeout(s.current),s.current=null)},[d]);let ev=(0,k.useCallback)(e=>{for(let t of(n.current=e,R))e.addCuePoint(t.cue_point,t);i(!0)},[R]),eh=(0,k.useCallback)(()=>{(0,w.X8)(`${r1[u.current]??"UnknownState"}_playing`,{...L(),video_id:v?.background_video_data.id})},[L,v?.background_video_data.id]),eb=(0,k.useCallback)((e,t)=>{er(t.data.actions)},[er]),ex=(0,k.useCallback)(()=>{$(y.aGi.LEARNING_ACTIVITY_OVERLAY),q(y.erm.OUT),"pet_customizer"===d&&((0,w.X8)("Pet Customizer clicked",{level:v?.level_number}),_({level_state:"store"}))},[$,d,v?.level_number,_]),eg=(0,k.useCallback)(()=>{$(y.aGi.LEARNING_ACTIVITY_OVERLAY)},[$]),ef=(0,k.useCallback)(()=>{$(y.aGi.PET_CUSTOMIZER_MODAL)},[$]);(0,k.useEffect)(()=>{g&&"running"===f&&!E&&("egg_hatching"!==d||P)&&(N("idle"),_({level_state:e||"egg_hatching"===d?"pet_customizer":"store"}))},[E,P,d,_,g,e,f]),(0,k.useEffect)(()=>{t||"loading"===b||!g&&!r||I.current.has(d)||(g&&("intro"===d||"celebrate_progress"===d)||(0,w.X8)(`${r1[d]??"Level_UnknownState"}_viewed`,{...L(),video_id:g?void 0:v?.background_video_data?.id}),ep[d](),I.current.add(d))},[d,v,r,_,ep,L,g,b,t]);let ey=(0,j.r8)(e=>e.unifiedProduct.level.isExitModalOpen);return(0,k.useEffect)(()=>()=>{l.current&&clearTimeout(l.current),s.current&&clearTimeout(s.current)},[]),(0,k.useEffect)(()=>{let e=1,t=setInterval(()=>{(0,w.X8)("Level_Minute_viewed",{...L(),minute:e}),e+=1},6e4);return()=>{clearInterval(t)}},[L]),{assetAspectRatio:rJ,bleedPercentages:r0,handleAnimatedOutPetHatchingMask:()=>{A(!1)},handleClosePetCustomizerOverlay:ex,handleClosePetInventory:eg,handleCuePoint:eb,handleOnEnd:()=>{_({level_state:X(u.current,"store",{incentive:v?.incentive,isPetGameExperimentEnabled:e})})},handleOnLoaded:ev,handleOnPlay:eh,handleOpenPetCustomizer:ef,isExitModalOpen:ey,isLoading:Y,isUiDisabled:o,levelConfig:v,levelState:d,overlayIs:(...e)=>e.includes(B),petPosition:G,renderPetHatchingMask:!g&&M,shouldUseStaticBackground:g,staticBackgroundSource:x,studentMonster:Q,studentPet:p}})();if(!G)return null;P[0]!==M||P[1]!==A||P[2]!==L||P[3]!==R||P[4]!==G?.background_video_data||P[5]!==Q||P[6]!==J?(e=Q?(0,g.jsx)("img",{alt:"",className:rY().staticBackgroundImage,src:J??void 0}):(0,g.jsx)(er.p,{cuePointSystem:"vtt",id:G?.background_video_data.id,onCuePoint:M,onEnd:A,onLoaded:L,onPlay:R,style:{border:"none",height:"100%",width:"100%"}},G?.background_video_data.id.toString()),P[0]=M,P[1]=A,P[2]=L,P[3]=R,P[4]=G?.background_video_data,P[5]=Q,P[6]=J,P[7]=e):e
12=P[7];let en=e,ea=`${rY().studentMonster} ${ee.direction===y.AMV.IN?rY().animateIn:rY().animateOut}`;P[8]!==ee.bottom||P[9]!==ee.left||P[10]!==ee.width?(t={bottom:ee.bottom,left:ee.left,width:ee.width},P[8]=ee.bottom,P[9]=ee.left,P[10]=ee.width,P[11]=t):t=P[11],P[12]===Symbol.for("react.memo_cache_sentinel")?(n=(0,g.jsx)(eI,{}),P[12]=n):n=P[12],P[13]!==ea||P[14]!==t?(a=(0,g.jsx)("div",{className:ea,style:t,children:n}),P[13]=ea,P[14]=t,P[15]=a):a=P[15],P[16]!==q||P[17]!==F?(s=F(y.aGi.PET_CUSTOMIZER_MODAL)&&"egg_hatching"===q,P[16]=q,P[17]=F,P[18]=s):s=P[18],P[19]!==s?(r=(0,g.jsx)(e_,{animateIn:s}),P[19]=s,P[20]=r):r=P[20],P[21]!==q||P[22]!==W||P[23]!==Q||P[24]!==et?(i=et&&("pet_customizer"===q||!Q&&"egg_hatching"===q)?(0,g.jsx)(e4,{position:W,studentPet:et}):null,P[21]=q,P[22]=W,P[23]=Q,P[24]=et,P[25]=i):i=P[25],P[26]!==T||P[27]!==Y?(l=Y?(0,g.jsx)(ap,{onAnimatedOut:T}):null,P[26]=T,P[27]=Y,P[28]=l):l=P[28],P[29]!==q||P[30]!==W||P[31]!==Q||P[32]!==et?(o=Q&&et&&"egg_hatching"===q?(0,g.jsx)(e4,{position:W,studentPet:et}):null,P[29]=q,P[30]=W,P[31]=Q,P[32]=et,P[33]=o):o=P[33],P[34]!==o?(c=(0,g.jsx)(eK,{children:o}),P[34]=o,P[35]=c):c=P[35],P[36]!==c||P[37]!==a||P[38]!==r||P[39]!==i||P[40]!==l?(d=(0,g.jsxs)(k.Fragment,{children:[a,r,i,l,c]}),P[36]=c,P[37]=a,P[38]=r,P[39]=i,P[40]=l,P[41]=d):d=P[41];let es=d;P[42]===Symbol.for("react.memo_cache_sentinel")?(u=(0,g.jsx)(rW,{}),_=(0,g.jsx)(ad,{}),P[42]=u,P[43]=_):(u=P[42],_=P[43]),P[44]!==B?(m=B?(0,g.jsx)(eJ,{}):null,P[44]=B,P[45]=m):m=P[45],P[46]!==q?(p="chest"===q?(0,g.jsx)("div",{className:rY().gemScoreboardContainer,children:(0,g.jsx)(ec,{})}):null,P[46]=q,P[47]=p):p=P[47],P[48]===Symbol.for("react.memo_cache_sentinel")?(v=(0,g.jsx)("div",{className:rY().gemPortalTarget,"data-gem-portal-target":!0}),P[48]=v):v=P[48],P[49]!==m||P[50]!==p?(h=(0,g.jsxs)(k.Fragment,{children:[u,_,m,p,v]}),P[49]=m,P[50]=p,P[51]=h):h=P[51];let ei=h;if($){let e;return P[52]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)(E.kt,{}),P[52]=e):e=P[52],e}return P[53]!==S||P[54]!==en||P[55]!==es||P[56]!==I||P[57]!==ei?(b=(0,g.jsx)(e5.m,{assetAspectRatio:S,backgroundContent:en,backgroundRelativeContent:es,bleedPercentages:I,uiContent:ei}),P[53]=S,P[54]=en,P[55]=es,P[56]=I,P[57]=ei,P[58]=b):b=P[58],P[59]!==D?(x=D?(0,g.jsx)("div",{className:rY().uiDisabled}):null,P[59]=D,P[60]=x):x=P[60],P[61]!==b||P[62]!==x?(N=(0,g.jsxs)("div",{className:rY().container,children:[b,x]}),P[61]=b,P[62]=x,P[63]=N):N=P[63],N};var r3=n(23512),r4=n.n(r3);function r5(e){console.error("Failed to submit component feedback via FeedbackUpsert mutation",e)}let r8=e=>{let t,n,a,s,r,i,l,o,c,d,u=(0,f.c)(22),{onClose:_}=e;u[0]!==_?(t={onClose:_},u[0]=_,u[1]=t):t=u[1];let{buttonVariantsArray:m,handleButtonClick:p,handleClose:v}=(e=>{let t,n,a,s,r,i,l,o,c=(0,f.c)(17),{onClose:d}=e,{mutateAsync:u}=(0,O.DU)(),_=V();c[0]===Symbol.for("react.memo_cache_sentinel")?(t={happy:5,neutral:3,unhappy:1},c[0]=t):t=c[0];let m=t;c[1]===Symbol.for("react.memo_cache_sentinel")?(n=Object.keys(m).reverse(),c[1]=n):n=c[1];let p=n;c[2]!==_?(a=_(),c[2]=_,c[3]=a):a=c[3];let{level:v}=a;c[4]!==d||c[5]!==v?(s=e=>{(0,w.X8)("FeedbackModal_clicked",{precedes_level:v,submission:e}),d()},c[4]=d,c[5]=v,c[6]=s):s=c[6];let h=s;c[7]!==u||c[8]!==d||c[9]!==v?(r=e=>{(0,w.X8)("FeedbackModal_clicked",{precedes_level:v,submission:e}),u({source:"POPUP",stars:m[e]}).catch(r5),d()},c[7]=u,c[8]=d,c[9]=v,c[10]=r):r=c[10];let b=r;return c[11]!==v?(i=()=>{(0,w.X8)("FeedbackModal_viewed",{precedes_level:v}),Z.xj.playForeground("https://assets.adaptedmind.com/up/base-assets/_temp/hows-adaptedmind-going.mp3")},l=[v],c[11]=v,c[12]=i,c[13]=l):(i=c[12],l=c[13]),(0,k.useEffect)(i,l),c[14]!==b||c[15]!==h?(o={buttonVariantsArray:p,handleButtonClick:b,handleClose:h},c[14]=b,c[15]=h,c[16]=o):o=c[16],o})(t);if(u[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,g.jsx)(e_,{animateIn:!0}),u[2]=n):n=u[2],u[3]!==v?(a=()=>{v("background")},u[3]=v,u[4]=a):a=u[4],u[5]!==v?(s=(0,g.jsx)("div",{className:r4().closeButton,children:(0,g.jsx)(eY,{handleClick:()=>{v("x")}})}),u[5]=v,u[6]=s):s=u[6],u[7]===Symbol.for("react.memo_cache_sentinel")?(r=(0,g.jsxs)("div",{className:r4().title,children:["How's AdaptedMind",(0,g.jsx)("br",{}),"going?"]}),u[7]=r):r=u[7],u[8]!==m||u[9]!==p){let e;u[11]!==p?(e=e=>(0,g.jsx)(E.Ot,{className:r4().button,onClick:()=>{p(e)},children:(0,g.jsx)("img",{alt:`${e} feedback`,src:`https://assets.adaptedmind.com/up/base-assets/_temp/feedback-${e}.svg`})}
12,e),u[11]=p,u[12]=e):e=u[12],i=m.map(e),u[8]=m,u[9]=p,u[10]=i}else i=u[10];return u[13]!==i?(l=(0,g.jsx)("div",{className:r4().buttons,children:i}),u[13]=i,u[14]=l):l=u[14],u[15]===Symbol.for("react.memo_cache_sentinel")?(o=(0,g.jsx)("img",{alt:"Friendly monster",className:r4().narry,src:"https://assets.adaptedmind.com/up/base-assets/_temp/narry.svg"}),u[15]=o):o=u[15],u[16]!==s||u[17]!==l?(c=(0,g.jsxs)("div",{className:r4().modal,onClick:r6,children:[s,r,l,o]}),u[16]=s,u[17]=l,u[18]=c):c=u[18],u[19]!==a||u[20]!==c?(d=(0,g.jsxs)(k.Fragment,{children:[n,(0,g.jsx)("div",{className:r4().container,onClick:a,children:c})]}),u[19]=a,u[20]=c,u[21]=d):d=u[21],d};function r6(e){e.stopPropagation()}var r7=n(8986),r9=n.n(r7);let ie=18,it=1900,ia=e=>e.replaceAll(/\D/gu,"").slice(0,4),is=["thousands","hundreds","tens","ones"],ir={},ii=e=>{let t,n,a,s,r,i,l,o,c,d,u,_,m,p,v,h,b,x,j,y,C,N,P=(0,f.c)(65),{eventMetadata:S,initialValue:E,maximumYear:I,minimumAge:T,minimumYear:M,onClose:O,onSubmit:A}=e,L=void 0===S?ir:S,R=(0,k.useId)(),B=(0,k.useId)();P[0]!==L||P[1]!==O?(t=()=>{(0,w.X8)("TimeLimitParentGate_exited",L),O()},P[0]=L,P[1]=O,P[2]=t):t=P[2];let $=t;P[3]!==L?(n=e=>{(0,w.X8)("TimeLimitParentGate_blocked",{...L,reason:e})},P[3]=L,P[4]=n):n=P[4],P[5]!==L?(a=()=>{(0,w.X8)("TimeLimitParentGate_passed",L)},P[5]=L,P[6]=a):a=P[6],P[7]!==L?(s=()=>{(0,w.X8)("TimeLimitParentGate_submitted",L)},P[7]=L,P[8]=s):s=P[8],P[9]!==$||P[10]!==E||P[11]!==I||P[12]!==T||P[13]!==M||P[14]!==A||P[15]!==n||P[16]!==a||P[17]!==s?(r={initialValue:E,maximumYear:I,minimumAge:T,minimumYear:M,onBlocked:n,onClose:$,onPassed:a,onSubmit:A,onSubmitAttempt:s},P[9]=$,P[10]=E,P[11]=I,P[12]=T,P[13]=M,P[14]=A,P[15]=n,P[16]=a,P[17]=s,P[18]=r):r=P[18];let{activeDigitIndex:D,birthYearInput:G,digits:q,errorMessage:V,focusInput:U,handleClose:F,handleDigitsKeyDown:K,handleInputChange:H,handleInputKeyDown:z,inputReference:W,isSubmitting:X}=(({initialValue:e="",maximumYear:t=new Date().getFullYear(),minimumAge:n=ie,minimumYear:a=it,onBlocked:s,onClose:r,onPassed:i,onSubmit:l,onSubmitAttempt:o})=>{let c=(0,k.useRef)(null),[d,u]=(0,k.useState)(()=>ia(e)),[_,m]=(0,k.useState)(""),[p,v]=(0,k.useState)(!1),h=t-n,b=Array.from({length:4},(e,t)=>d[t]??""),x=d.length>=b.length?b.length-1:d.length,g=()=>{c.current?.focus()},f=()=>{r()},j=async e=>{if(e.length!==b.length||p)return;o?.();let r=Number.parseInt(e,10);if(Number.isNaN(r)||r<a||r>t){m("Enter a valid year."),s?.("invalid_year");return}if(r>h){m(`You must be at least ${n} years old.`),s?.("underage");return}try{v(!0),m(""),i?.(r),await l(r)}catch(e){console.error("Failed to submit the parent gate birth year.",e),m("Something went wrong. Please try again.")}finally{v(!1)}},y=async e=>{let t=ia(e.target.value);u(t),m(""),t.length===b.length&&await j(t)},C=async e=>{"Escape"===e.key?f():"Enter"===e.key&&(e.preventDefault(),await j(d))};return(0,k.useEffect)(()=>{g()},[]),(0,k.useEffect)(()=>{let e=e=>{"Escape"===e.key&&r()};return globalThis.addEventListener("keydown",e),()=>{globalThis.removeEventListener("keydown",e)}},[r]),{activeDigitIndex:x,birthYearInput:d,digits:b,errorMessage:_,focusInput:g,handleClose:f,handleDigitsKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),g())},handleInputChange:y,handleInputKeyDown:C,inputReference:c,isSubmitting:p}})(r);return P[19]!==L?(i=()=>{(0,w.X8)("TimeLimitParentGate_viewed",L)},l=[L],P[19]=L,P[20]=i,P[21]=l):(i=P[20],l=P[21]),(0,k.useEffect)(i,l),P[22]===Symbol.for("react.memo_cache_sentinel")?(o=(0,g.jsx)(e_,{animateIn:!0}),P[22]=o):o=P[22],P[23]!==H?(c=e=>{H(e)},P[23]=H,P[24]=c):c=P[24],P[25]!==z?(d=e=>{z(e)},P[25]=z,P[26]=d):d=P[26],P[27]!==G||P[28]!==W||P[29]!==X||P[30]!==c||P[31]!==d?(u=(0,g.jsx)("input",{"aria-label":"Year of birth",autoComplete:"bday-year",className:r9().hiddenInput,disabled:X,inputMode:"numeric",maxLength:4,onChange:c,onKeyDown:d,pattern:"[0-9]*",ref:W,type:"text",value:G}),P[27]=G,P[28]=W,P[29]=X,P[30]=c,P[31]=d,P[32]=u):u=P[32],P[33]!==F?(_=(0,g.jsx)("div",{className:r9().closeButton,children:(0,g.jsx)(eY,{handleClick:F})}),P[33]=F,P[34]=_):_=P[34],P[35]!==R?(m=(0,g.jsx)("div",{className:r9().headerBand,children:(0,g.jsx)("div",{className:r9().titlePlate,id:R,children:"Parents Only"})}),P[35]=R,P[36]=m):m=P[36],P[37]!==B?(p=(0,g.jsx)("p",{className:r9().subtitle,id:B,children:"Please enter your year of birth."}),P[37]=B,P[38]=p):p=P[38],P[39]!==D||P[40]!==q?(v=is.map((e,t)=>{let n=q[t],a=[r9().digitBox,n?r9().filledDigitBox:"",D===t?r9().activeDigitBox:""].filter(
12Boolean).join(" ");return(0,g.jsx)("div",{className:a,children:n},e)}),P[39]=D,P[40]=q,P[41]=v):v=P[41],P[42]!==U||P[43]!==K||P[44]!==v?(h=(0,g.jsx)("div",{"aria-label":"Enter your year of birth",className:r9().digitEntry,onClick:U,onKeyDown:K,role:"button",tabIndex:0,children:v}),P[42]=U,P[43]=K,P[44]=v,P[45]=h):h=P[45],P[46]!==V?(b=V?(0,g.jsx)("p",{className:r9().error,children:V}):null,P[46]=V,P[47]=b):b=P[47],P[48]===Symbol.for("react.memo_cache_sentinel")?(x=(0,g.jsx)("div",{className:r9().footer,children:"This information is not stored and is only used to verify your age."}),P[48]=x):x=P[48],P[49]!==p||P[50]!==h||P[51]!==b?(j=(0,g.jsxs)("div",{className:r9().body,children:[p,h,b,x]}),P[49]=p,P[50]=h,P[51]=b,P[52]=j):j=P[52],P[53]!==u||P[54]!==_||P[55]!==m||P[56]!==j?(y=(0,g.jsxs)("div",{className:r9().panel,children:[u,_,m,j]}),P[53]=u,P[54]=_,P[55]=m,P[56]=j,P[57]=y):y=P[57],P[58]!==B||P[59]!==y||P[60]!==R?(C=(0,g.jsx)("div",{"aria-describedby":B,"aria-labelledby":R,"aria-modal":"true",className:r9().modal,onClick:il,role:"dialog",children:y}),P[58]=B,P[59]=y,P[60]=R,P[61]=C):C=P[61],P[62]!==F||P[63]!==C?(N=(0,g.jsxs)(k.Fragment,{children:[o,(0,g.jsx)("div",{className:r9().container,onClick:F,children:C})]}),P[62]=F,P[63]=C,P[64]=N):N=P[64],N};function il(e){e.stopPropagation()}var io=n(95460),ic=n.n(io);let id=({onClose:e,onSuccess:t,source:n})=>{let[a,s]=(0,k.useState)(!1),[r,i]=(0,k.useState)(20),[l,o]=(0,k.useState)(!1),c=(0,k.useRef)(null),d=(0,k.useRef)(!1),u=(0,k.useRef)(!1),{data:_}=(0,O.WG)(),{data:m}=(0,O.CU)(),{isPending:p,mutateAsync:v}=(0,O.$d)(),h=(0,j.r8)(j.M7),b=(0,k.useMemo)(()=>_?.find(e=>e.id===h)?.first_name??"Your child",[h,_]),x=m?.current_display_time_limit??0,f=m?.current_time_limit??0,y=m?.default_time_limit??0,N=x+r,P=m?.minutes_used??0,S=(0,k.useMemo)(()=>({minutes_used:P,previous_display_time_limit:x,source:n,time_limit:f}),[f,x,P,n]),I=async()=>{if(!p)try{let{response:e,studentId:a}=await v({minutes:r,update_default_time_limit:l});d.current=!0,(0,w.X8)("TimeLimit_updated",{current_display_time_limit:e.current_display_time_limit,current_time_limit:e.current_time_limit,default_time_limit:l?e.default_time_limit+r:e.default_time_limit,minutes_added:r,minutes_used:e.minutes_used,previous_default_time_limit:y,previous_display_time_limit:x,previous_time_limit:f,source:n,student_id:a,type:l?"default":"one_time"}),t()}catch(e){console.error("Failed to extend time limit:",e)}},T=()=>{d.current||(0,w.X8)("TimeLimitExtendModal_exited",S),e()};(0,k.useEffect)(()=>{let e=e=>{c.current&&!c.current.contains(e.target)&&s(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,k.useEffect)(()=>{m&&!u.current&&((0,w.X8)("TimeLimitExtendModal_viewed",S),u.current=!0)},[S,m]);let M=(0,k.useMemo)(()=>0===r?"unlimited":`${N} min`,[r,N]),A=(0,k.useMemo)(()=>0===r&&l?"Set daily limit: unlimited":0!==r||l?l?`Set daily limit: ${N} min`:`Add ${r} min today`:"Remove today's limit",[r,l,N]);return m?(0,g.jsxs)(k.Fragment,{children:[(0,g.jsx)(e_,{animateIn:!0}),(0,g.jsx)("div",{className:ic().container,onClick:T,children:(0,g.jsxs)("div",{className:ic().modal,onClick:e=>{e.stopPropagation()},children:[(0,g.jsxs)("div",{className:ic().headerRow,children:[(0,g.jsx)("div",{className:ic().closeButton,children:(0,g.jsx)(eY,{handleClick:T})}),(0,g.jsx)("div",{className:ic().titlePanel,children:(0,g.jsx)("h2",{className:ic().title,children:"Add More Time?"})})]}),(0,g.jsxs)("div",{className:ic().contentPanel,children:[(0,g.jsxs)("p",{className:ic().description,children:[b," has reached their daily time limit of"," ",x," minutes. You can choose to extend their time for today below."]}),(0,g.jsxs)("div",{className:ic().controls,children:[(0,g.jsxs)("div",{className:ic().dropdownWrapper,ref:c,children:[(0,g.jsxs)(E.Ot,{className:ic().dropdown,onClick:()=>{s(e=>!e)},children:[(0,g.jsx)("span",{className:ic().dropdownValue,children:C.Hm.find(e=>e.value===r)?.raw_label}),(0,g.jsx)("span",{className:ic().dropdownIcon,children:(0,g.jsx)("span",{className:ic().dropdownChevron})})]}),a?(0,g.jsx)("div",{className:ic().dropdownMenuContainer,children:(0,g.jsx)("div",{className:ic().dropdownMenu,children:C.Hm.map(e=>(0,g.jsx)(E.Ot,{className:`${ic().dropdownOption} ${r===e.value?ic().dropdownOptionSelected:""}`,onClick:()=>{i(e.value),s(!1)},children:e.raw_label},e.value))})}):null]}),(0,g.jsxs)(E.Ot,{className:ic().checkboxRow,onClick:()=>{o(e=>!e)},children:[(0,g.jsx)("span",{className:`${ic().checkbox} ${l?ic().checkboxChecked:""}`,children:l?(0,g.jsx)("span",{className:ic().checkboxCheckmark}):null}),(0,g.jsxs)("span",{className:ic().checkboxLabel,children:["Make ",M,"\xa0your child's new daily limit"]})]})]}),(0,g.jsx)("div",{className:ic().footerPanel,children:(0,g.jsx)(E.Ot,{children:(0,g.jsx)("button",{className:ic().ctaButton,disabled:p,onClick:I,type:"button",children:p?"Updating...":A})})})]})]})})]}):(0,g.jsx)(E.kt,{})},iu=()=>{let e,t=(0,f.c)(6),{data:n}=(0,O.GN)(),{mutateAsync:a}=(0,O.jG)(),s=(0,j.r8)(i_),r=(0,j.r8)(im),i=(0,j.r8)(ip);return t[0]!==a||t[1]!==s||t[2]!==r||t[3]!==i||t[4]!==n?(e=e=>
12{let t=n?.find(t=>t.id===e);if(!t)return void ej.A.error(`Student with ID ${e} not found`);(0,Z.i7)(t.id),i(t.id),(0,w.xH)(t.id);let l=Intl.DateTimeFormat().resolvedOptions().timeZone;(l&&a({timezone:l}),s(),null!==t.student_monster)?r(y.jNk.MAP):r(y.jNk.PREGAME_SEQUENCE)},t[0]=a,t[1]=s,t[2]=r,t[3]=i,t[4]=n,t[5]=e):e=t[5],e};function i_(e){return e.unifiedProduct.actions.reset}function im(e){return e.unifiedProduct.actions.setGameState}function ip(e){return e.session.actions.setStudentId}var iv=n(7284),ih=n.n(iv);let ib=e=>{globalThis.location.replace(e)},ix=e=>{let t,n,a,s,r,i,l=(0,f.c)(27),{showGreeting:o}=e,c=void 0===o||o,[d,u]=(0,k.useState)(!1),_=(0,k.useRef)(null),{data:m,isLoading:p}=(0,O.GN)(),v=iu(),h=(0,j.r8)(j.M7);l[0]!==h||l[1]!==m?(t=m?.find(e=>e.id===h),l[0]=h,l[1]=m,l[2]=t):t=l[2];let b=t;l[3]!==d?(n=()=>{(0,w.X8)(`Profile menu ${d?"closed":"opened"}`,{source:"current_student_button"}),u(ig)},l[3]=d,l[4]=n):n=l[4];let x=n;l[5]!==v?(a=async e=>{(0,w.X8)("Profile menu: student selected",{selected_student_id:e,source:"profile_menu"}),u(!1),v(e)},l[5]=v,l[6]=a):a=l[6];let y=a;if(l[7]!==d?(s=()=>{let e=e=>{!_.current||!d||_.current.contains(e.target)&&!_.current.isSameNode(e.target)||(u(!1),(0,w.X8)("Profile menu closed",{source:"profile_menu_background_click"}))};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},r=[d],l[7]=d,l[8]=s,l[9]=r):(s=l[8],r=l[9]),(0,k.useEffect)(s,r),p||!m||!b)return null;if(l[10]!==b.first_name||l[11]!==x||l[12]!==y||l[13]!==d||l[14]!==h||l[15]!==c||l[16]!==m){let e,t,n,a;l[18]!==h?(e=e=>e.id!==h,l[18]=h,l[19]=e):e=l[19];let s=m.filter(e),r=b.first_name;l[20]!==r||l[21]!==c?(t=c?(0,g.jsxs)("span",{className:ih().profileText,children:["Hi, ",r]}):null,l[20]=r,l[21]=c,l[22]=t):t=l[22],l[23]===Symbol.for("react.memo_cache_sentinel")?(n=(0,g.jsx)("div",{className:ih().profileMonsterIconDropShadow,children:(0,g.jsx)("div",{className:`${ih().monsterIconSharedStyles} ${ih().profileMonsterIcon}`,children:(0,g.jsx)("div",{className:ih().profileMonsterIconInner,children:(0,g.jsx)(eI,{offsetX:"-5.5%",offsetY:"-5%",width:"111%"})})})}),l[23]=n):n=l[23],l[24]!==x||l[25]!==t?(a=(0,g.jsxs)(E.Ot,{className:ih().profileButton,onClick:x,children:[t,n]}),l[24]=x,l[25]=t,l[26]=a):a=l[26],i=(0,g.jsxs)("div",{className:ih().profileButtonContainer,ref:_,children:[a,d?(0,g.jsx)("div",{className:ih().profileDropdown,children:(0,g.jsxs)("div",{className:ih().dropdownContent,children:[(0,g.jsxs)("div",{className:`${ih().listContainer} ${m.length>4?ih().listContainerMaxHeight:""}`,children:[s.map(e=>(0,g.jsxs)(E.Ot,{className:ih().listItem,onClick:()=>{y(e.id)},children:[(0,g.jsx)("div",{className:`${ih().monsterIconSharedStyles} ${ih().listItemMonsterIcon}`,children:(0,g.jsx)("div",{className:ih().listItemMonsterIconInner,children:(0,g.jsx)(eE.A,{offsetX:"-5.5%",offsetY:"-5%",opaqueShadow:!1,studentMonster:e.student_monster??(0,C.vA)(),width:"111%"})})}),(0,g.jsx)("span",{className:ih().listItemText,children:e.first_name})]},e.id)),(0,g.jsxs)(E.Ot,{className:ih().listItem,onClick:ij,children:[(0,g.jsx)("div",{className:ih().listItemIcon,children:(0,g.jsx)("img",{alt:"Add student",className:ih().listItemIconImage,src:"https://assets.adaptedmind.com/up/base-assets/button-icons/add-student-blue-icon-v2.svg"})}),(0,g.jsx)("span",{className:ih().listItemText,children:"Add student"})]})]}),(0,g.jsx)("div",{className:ih().menuDivider}),(0,g.jsxs)(E.Ot,{className:ih().listItem,onClick:iy,children:[(0,g.jsx)("div",{className:ih().listItemIcon,children:(0,g.jsx)("img",{alt:"Settings",className:ih().listItemIconImage,src:"https://assets.adaptedmind.com/up/base-assets/button-icons/settings-blue-icon-v2.svg"})}),(0,g.jsx)("span",{className:ih().listItemText,children:"Settings"})]}),(0,g.jsxs)(E.Ot,{className:ih().listItem,onClick:iC,children:[(0,g.jsx)("div",{className:ih().listItemIcon,children:(0,g.jsx)("img",{alt:"Progress",className:ih().listItemIconImage,src:"https://assets.adaptedmind.com/up/base-assets/button-icons/progress-blue-icon-v2.svg"})}),(0,g.jsx)("span",{className:ih().listItemText,children:"Progress"})]}),(0,g.jsxs)(E.Ot,{className:ih().listItem,onClick:iN,children:[(0,g.jsx)("div",{className:ih().listItemIcon,children:(0,g.jsx)("img",{alt:"Parent Account",className:ih().listItemIconImage,src:"https://assets.adaptedmind.com/up/base-assets/button-icons/parent-account-blue-icon-square.svg"})}),(0,g.jsx)("span",{className:ih().listItemText,children:"Parent Account"})]})]})}):null]}),l[10]=b.first_name,l[11]=x,l[12]=y,l[13]=d,l[14]=h,l[15]=c,l[16]=m,l[17]=i}else i=l[17];return i};function ig(e){return!e}function ij(){(0,w.X8)("Profile menu: add student button clicked",{source:"profile_menu"}),ib("/my-account?modal=add-student")}function iy(){(0,w.X8)("Profile menu: settings button clicked",{source:"profile_menu"}),ib("/my-account")}function iC(){(0,w.X8)("Profile menu: progress button clicked",{source:"profile_menu"}),ib("/performance-panel/lessons?amsource=profile-menu")}function iN(){(0,w.X8)("Profile menu: parent account button clicked",{source:"profile_menu"}),ib("/my-account")}var iP=n(37060),iS=n.n(iP);let iE=({minutes_used:e,onAddTime:t,source:n="modal",time_limit:a})=>{let s=(0,k.useRef)({minutes_used:e,source:n,time_limit:a});return s.current={minutes_used:e,source:n,time_limit:a},(0,k.useEffect)(()=>{Z.xj.playForeground("https://assets.adaptedmind.com/up/base-assets/time-limit-no-fx.mp3"),(0,w.X8)("TimeLimitReachedModal_viewed",{...s.current})},[]),(0,g.jsxs)(k.Fragment,{children:[(0,g.jsx)(e_,{animateIn:!0}),(0,g.jsxs)("div",{className:iS().outerGrid,children:[(0,g.jsx)("div",{className:iS().leftColumn}),(0,g.jsxs)("div",{className:iS().centerColumn,children:[(0,g.jsx)(e9,{title:"Time's Up For Today!"}),(0,g.jsx)("div",{className:iS().modalContainer,children:(0,g.jsxs)("div",{className:iS().modal,children:[(0,g.jsx)("div",{className:iS().primaryText,children:"Great job! \uD83C\uDF89 You've completed your daily time limit—come back tomorrow for more!"}),(0,g.jsxs)("div",{className:iS().secondaryText,children:["Want to keep going? Ask your parent"," ",(0,g.jsx)("button",{className:iS().addMoreTimeButton,onClick:()=>{(0,w.X8)("TimeLimitReachedModal_AddTime_clicked",{minutes_used:e,source:n,time_limit:a}),t()},type:"button",children:"to add more time"}),"."]})]})})]}),(0,g.jsx)("div",{className:iS().rightColumn,children:(0,g.jsx)(ix,{showGreeting:!1})})]})]})};var iI=n(15966),iw=n.n(iI);let iT=e=>{let t,n,a,s,r,i,l,o,c,d,u,_,m,p,v,h,b,x,j,y,N,P,S,E,I,w,T,M,O,A,L,R,B,$,D,G,q,V,U,F,K,H,z,W,X,Y=(0,f.c)(83),{onLevelChange:Q,targetRef
12:Z}=e,[J,ee]=(0,k.useState)(19.7),[et,en]=(0,k.useState)(40),[ea,es]=(0,k.useState)(1),[er,ei]=(0,k.useState)(1),[el,eo]=(0,k.useState)(!1);Y[0]===Symbol.for("react.memo_cache_sentinel")?(t={x:0,y:0},Y[0]=t):t=Y[0];let[ec,ed]=(0,k.useState)(t),eu=(0,k.useRef)(null);Y[1]===Symbol.for("react.memo_cache_sentinel")?(n={x:0,y:0},Y[1]=n):n=Y[1];let[e_,em]=(0,k.useState)(n),[ep,ev]=(0,k.useState)(!1);Y[2]===Symbol.for("react.memo_cache_sentinel")?(a={x:0,y:0},Y[2]=a):a=Y[2];let[eh,eb]=(0,k.useState)(a),ex=(0,k.useRef)(null);Y[3]!==et||Y[4]!==el||Y[5]!==J||Y[6]!==er||Y[7]!==ea||Y[8]!==Z?(s=()=>{let e=Z.current;if(!e)return;let t=`
13      position: absolute;
14      left: ${J}%;
15      bottom: ${et}%;
16      transform: scale(${ea});
17      transform-origin: center;
18      cursor: ${el?"grabbing":"move"};
19      transition: none !important;
20    `;e.setAttribute("style",t);let n=e.querySelector("span");if(n&&n.classList.contains(n.className.split(" ").find(ik)||"number"))n.textContent=String(er);else for(let t of e.querySelectorAll("span"))if(t.textContent&&/^\d+$/u.test(t.textContent.trim())){t.textContent=String(er);break}},r=[Z,J,et,ea,el,er],Y[3]=et,Y[4]=el,Y[5]=J,Y[6]=er,Y[7]=ea,Y[8]=Z,Y[9]=s,Y[10]=r):(s=Y[9],r=Y[10]),(0,k.useEffect)(s,r),Y[11]!==er||Y[12]!==Q?(i=()=>{Q?.(er)},l=[er,Q],Y[11]=er,Y[12]=Q,Y[13]=i,Y[14]=l):(i=Y[13],l=Y[14]),(0,k.useEffect)(i,l),Y[15]!==et||Y[16]!==J||Y[17]!==er||Y[18]!==ea?(o=()=>{let e=`.levelButton.level-${er} {
21  left: ${J.toFixed(2)}%;
22  bottom: ${et.toFixed(2)}%;
23  width: 3.4%;
24  font-size: 2.4vw;
25  padding-bottom: 0.5vw;
26  transform: scale(${ea.toFixed(2)});
27}`;navigator.clipboard.writeText(e)},Y[15]=et,Y[16]=J,Y[17]=er,Y[18]=ea,Y[19]=o):o=Y[19];let eg=o;Y[20]===Symbol.for("react.memo_cache_sentinel")?(c=e=>{let t=e.target;"BUTTON"===t.tagName||"INPUT"===t.tagName||t.closest("button")||t.closest("input")||(ev(!0),eb({x:e.clientX,y:e.clientY}),e.preventDefault())},Y[20]=c):c=Y[20];let ef=c;Y[21]!==Z?(d=e=>{if(e.target.closest(`.${iw().controls}`))return;let t=Z.current;t&&t.contains(e.target)&&(eo(!0),ed({x:e.clientX,y:e.clientY}),e.preventDefault())},Y[21]=Z,Y[22]=d):d=Y[22];let ej=d;Y[23]!==eh||Y[24]!==ec||Y[25]!==el||Y[26]!==ep||Y[27]!==Z?(u=e=>{if(ep){let t=e.clientX-eh.x,n=e.clientY-eh.y;em(e=>({x:e.x+t,y:e.y+n})),eb({x:e.clientX,y:e.clientY});return}if(!el)return;let t=Z.current;if(!t)return;let n=t.offsetParent;if(!n)return;let a=n.getBoundingClientRect(),s=e.clientX-ec.x,r=e.clientY-ec.y,i=s/a.width*100,l=-(100*(r/a.height));ee(e=>(0,C.qE)(e+i,0,100)),en(e=>(0,C.qE)(e+l,0,100)),ed({x:e.clientX,y:e.clientY})},Y[23]=eh,Y[24]=ec,Y[25]=el,Y[26]=ep,Y[27]=Z,Y[28]=u):u=Y[28];let ey=u;Y[29]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{eo(!1),ev(!1)},Y[29]=_):_=Y[29];
27let eC=_;Y[30]!==ej||Y[31]!==ey?(m=()=>(document.addEventListener("mousedown",ej),document.addEventListener("mousemove",ey),document.addEventListener("mouseup",eC),()=>{document.removeEventListener("mousedown",ej),document.removeEventListener("mousemove",ey),document.removeEventListener("mouseup",eC)}),p=[ej,ey,eC],Y[30]=ej,Y[31]=ey,Y[32]=m,Y[33]=p):(m=Y[32],p=Y[33]),(0,k.useEffect)(m,p),Y[34]===Symbol.for("react.memo_cache_sentinel")?(v=e=>{ee(t=>(0,C.qE)(t+e,0,100))},Y[34]=v):v=Y[34];let eN=v;Y[35]===Symbol.for("react.memo_cache_sentinel")?(h=e=>{en(t=>(0,C.qE)(t+e,0,100))},Y[35]=h):h=Y[35];let eP=h;Y[36]===Symbol.for("react.memo_cache_sentinel")?(b=e=>{es(t=>(0,C.qE)(t+e,.1,5))},Y[36]=b):b=Y[36];let eS=b;Y[37]===Symbol.for("react.memo_cache_sentinel")?(x=()=>{eP(.01)},Y[37]=x):x=Y[37];let eE=x;Y[38]===Symbol.for("react.memo_cache_sentinel")?(j=()=>{eP(-.01)},Y[38]=j):j=Y[38];let eI=j;Y[39]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{eN(-.01)},Y[39]=y):y=Y[39];let ew=y;Y[40]===Symbol.for("react.memo_cache_sentinel")?(N=()=>{eN(.01)},Y[40]=N):N=Y[40];let eT=N;Y[41]===Symbol.for("react.memo_cache_sentinel")?(P=()=>{eS(-.01)},Y[41]=P):P=Y[41];let ek=P;Y[42]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{eS(.01)},Y[42]=S):S=Y[42];let eM=S,eO=ep?"grabbing":"move",eA=`translate(${e_.x}px, ${e_.y}px)`;return Y[43]!==eO||Y[44]!==eA?(E={cursor:eO,transform:eA},Y[43]=eO,Y[44]=eA,Y[45]=E):E=Y[45],Y[46]===Symbol.for("react.memo_cache_sentinel")?(I=(0,g.jsx)("div",{className:iw().label,children:"Position (0.01% per click)"}),Y[46]=I):I=Y[46],Y[47]===Symbol.for("react.memo_cache_sentinel")?(w=(0,g.jsx)("button",{className:iw().dpadButton,onClick:eE,type:"button",children:"↑"}),Y[47]=w):w=Y[47],Y[48]===Symbol.for("react.memo_cache_sentinel")?(T=(0,g.jsxs)("div",{className:iw().section,children:[I,(0,g.jsxs)("div",{className:iw().dpad,children:[w,(0,g.jsxs)("div",{className:iw().dpadMiddle,children:[(0,g.jsx)("button",{className:iw().dpadButton,onClick:ew,type:"button",children:"←"}),(0,g.jsx)("button",{className:iw().dpadButton,onClick:eT,type:"button",children:"→"})]}),(0,g.jsx)("button",{className:iw().dpadButton,onClick:eI,type:"button",children:"↓"})]})]}),Y[48]=T):T=Y[48],Y[49]===Symbol.for("react.memo_cache_sentinel")?(M=(0,g.jsx)("div",{className:iw().label,children:"Scale (0.01 per click)"}),Y[49]=M):M=Y[49],Y[50]===Symbol.for("react.memo_cache_sentinel")?(O=(0,g.jsxs)("div",{className:iw().section,children:[M,(0,g.jsxs)("div",{className:iw().scaleButtons,children:[(0,g.jsx)("button",{className:iw().scaleButton,onClick:ek,type:"button",children:"←"}),(0,g.jsx)("button",{className:iw().scaleButton,onClick:eM,type:"button",children:"→"})]})]}),Y[50]=O):O=Y[50],Y[51]===Symbol.for("react.memo_cache_sentinel")?(A=(0,g.jsx)("div",{className:iw().label,children:"Level"}),Y[51]=A):A=Y[51],Y[52]===Symbol.for("react.memo_cache_sentinel")?(L=e=>{let t=Number.parseInt(e.target.value,10);Number.isNaN(t)||ei(t)},Y[52]=L):L=Y[52],Y[53]!==er?(R=(0,g.jsxs)("div",{className:iw().section,children:[A,(0,g.jsx)("input",{className:iw().levelInput,max:"99",min:"1",onChange:L,type:"number",value:er})]}),Y[53]=er,Y[54]=R):R=Y[54],Y[55]===Symbol.for("react.memo_cache_sentinel")?(B=(0,g.jsx)("span",{className:iw().valueName,children:"left:"}),Y[55]=B):B=Y[55],Y[56]!==J?($=J.toFixed(2),Y[56]=J,Y[57]=$):$=Y[57],Y[58]!==$?(D=(0,g.jsxs)("div",{className:iw().valueRow,children:[B,(0,g.jsxs)("span",{className:iw().valueNumber,children:[$,"%"]})]}),Y[58]=$,Y[59]=D):D=Y[59],Y[60]===Symbol.for("react.memo_cache_sentinel")?(G=(0,g.jsx)("span",{className:iw().valueName,children:"bottom:"}),Y[60]=G):G=Y[60],Y[61]!==et?(q=et.toFixed(2),Y[61]=et,Y[62]=q):q=Y[62],Y[63]!==q?(V=(0,g.jsxs)("div",{className:iw().valueRow,children:[G,(0,g.jsxs)("span",{className:iw().valueNumber,children:[q,"%"]})]}),Y[63]=q,Y[64]=V):V=Y[64],Y[65]===Symbol.for("react.memo_cache_sentinel")?(U=(0,g.jsx)("span",{className:iw().valueName,children:"scale:"}),Y[65]=U):U=Y[65],Y[66]!==ea?(F=ea.toFixed(2),Y[66]=ea,Y[67]=F):F=Y[67],Y[68]!==F?(K=(0,g.jsxs)("div",{className:iw().valueRow,children:[U,(0,g.jsx)("span",{className:iw().valueNumber,children:F})]}),Y[68]=F,Y[69]=K):K=Y[69],Y[70]!==D||Y[71]!==V||Y[72]!==K?(H=(0,g.jsxs)("div",{className:iw().values,children:[D,V,K]}
27),Y[70]=D,Y[71]=V,Y[72]=K,Y[73]=H):H=Y[73],Y[74]!==eg?(z=(0,g.jsx)("button",{className:iw().copyButton,onClick:eg,type:"button",children:"Copy CSS"}),Y[74]=eg,Y[75]=z):z=Y[75],Y[76]!==H||Y[77]!==z?(W=(0,g.jsxs)("div",{className:iw().section,children:[H,z]}),Y[76]=H,Y[77]=z,Y[78]=W):W=Y[78],Y[79]!==E||Y[80]!==R||Y[81]!==W?(X=(0,g.jsx)("div",{className:iw().container,ref:eu,children:(0,g.jsxs)("div",{className:iw().controls,onMouseDown:ef,ref:ex,style:E,children:[T,O,R,W]})}),Y[79]=E,Y[80]=R,Y[81]=W,Y[82]=X):X=Y[82],X};function ik(e){return e.includes("number")}var iM=n(72825),iO=n.n(iM);let iA={1:{assetAspectRatio:6883/2880,bleedPercentages:{bottom:12.5,left:8.71,right:35.49,top:12.5},maxLevel:16,minLevel:1,moveMap:[7,11],order:1,url:"https://assets.adaptedmind.com/mobile/v1/rive/map/map1-2.webp"},2:{assetAspectRatio:1.75,bleedPercentages:{bottom:12.5,left:11.9,right:11.9,top:12.5},maxLevel:21,minLevel:17,order:2,url:"https://assets.adaptedmind.com/mobile/v1/rive/map/map2-2.webp"},3:{assetAspectRatio:7676/2880,bleedPercentages:{bottom:12.5,left:7.81,right:42.14,top:12.5},maxLevel:31,minLevel:22,moveMap:[29,31],order:3,url:"https://assets.adaptedmind.com/mobile/v1/rive/map/map3-2.webp"},4:{assetAspectRatio:1.75,bleedPercentages:{bottom:12.5,left:11.9,right:11.9,top:12.5},maxLevel:36,minLevel:32,order:4,url:"https://assets.adaptedmind.com/mobile/v1/rive/map/map4-2.webp"}};(c=b||(b={})).FEEDBACK="feedback",c.NONE="none",c.PARENTS_ONLY="parents_only",c.TIME_LIMIT_EXTEND="time_limit_extend",c.TIME_LIMIT_REACHED="time_limit_reached";let iL=()=>{let e,t,n,a,s,r,i,l,o,c,d,u,_,m,p,v,h,x,C=(0,f.c)(67),N=(0,k.useRef)(null),{data:P}=(0,O.lr)(),{data:S}=(0,O.YL)(),{data:E}=(0,O.pW)(),{data:I,isLoading:M}=(0,O.Db)(),A=(0,j.r8)(iR),L=(I?.length??0)===0;C[0]!==P?.level?(e=()=>{P?.level&&(0,w.X8)("Map_viewed",{level:P?.level??0,map_type:"coded"})},C[0]=P?.level,C[1]=e):e=C[1];let R=P?.level;C[2]!==R?(t=[R],C[2]=R,C[3]=t):t=C[3],(0,k.useEffect)(e,t);let{query:B}=(0,T.useRouter)(),$="true"===B.dbg_map,D=P?.level??1,{data:G,isLoading:q}=(0,O.CU)();if(C[4]!==D||C[5]!==B.map){e:{let e;if(Number.isInteger(Number(B.map))){n=iA[Number(B.map)];break e}for(let t of(C[7]===Symbol.for("react.memo_cache_sentinel")?(e=Object.values(iA),C[7]=e):e=C[7],e))if(D>=t.minLevel&&D<=t.maxLevel){n=t;break e}n=iA[Math.max(...Object.keys(iA).map(Number))]}C[4]=D,C[5]=B.map,C[6]=n}else n=C[6];let V=n,U=D===V.minLevel,[F,K]=(0,k.useState)(Math.max((D??1)-1,1));t:{if(F===D||!U){a=iO()[`level-${F}`]??iO().maxLevel;break t}a=iO()[`map-${V.order}-start`]}let H=a,[z,W]=(0,k.useState)(b.NONE);C[8]===Symbol.for("react.memo_cache_sentinel")?(s=[],C[8]=s):s=C[8];let[X,Y]=(0,k.useState)(s),[Q,Z]=(0,k.useState)(!1),J=3===D&&L,et=!!G?.reached_time_limit,en=!M&&!q,ea=G?.current_display_time_limit??0,es=G?.minutes_used??0,er="string"==typeof B.source?B.source:"modal";C[9]!==ea||C[10]!==es||C[11]!==er?(r={minutes_used:es,source:er,time_limit:ea},C[9]=ea,C[10]=es,C[11]=er,C[12]=r):r=C[12];let ei=r;C[13]!==X||C[14]!==A?(i=e=>{let t=X.indexOf(e),n=X[t+1];if(!n){W(b.NONE),A(y.jNk.SELECT_SUBJECT_LESSON);return}W(n)},C[13]=X,C[14]=A,C[15]=i):i=C[15];let el=i;C[16]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{W(b.NONE),Y([]),Z(!1)},C[16]=l):l=C[16],C[17]!==D?(o=[D],C[17]=D,C[18]=o):o=C[18],(0,k.useEffect)(l,o),C[19]!==D?(c=()=>{let e=setTimeout(()=>{K(D)},1e3);return()=>{clearTimeout(e)}},d=[D],C[19]=D,C[20]=c,C[21]=d):(c=C[20],d=C[21]),(0,k.useEffect)(c,d),C[22]!==Q||C[23]!==en||C[24]!==A||C[25]!==J||C[26]!==et?(u=()=>{if(!en||Q)return;let e=[...J?[b.FEEDBACK]:[],...et?[b.TIME_LIMIT_REACHED]:[]],t=setTimeout(()=>{(Z(!0),0===e.length)?A(y.jNk.SELECT_SUBJECT_LESSON):(Y(e),W(e[0]))},3e3);return()=>{clearTimeout(t)}},_=[Q,en,J,et,A],C[22]=Q,C[23]=en,C[24]=A,C[25]=J,C[26]=et,C[27]=u,C[28]=_):(u=C[27],_=C[28]),(0,k.useEffect)(u,_);n:{let e;if(!V||$){let e;C[29]===Symbol.for("react.memo_cache_sentinel")?(e={bottom:0,left:0,right:0,top:0},C[29]=e):e=C[29],m=e;break n}C[30]!==D||C[31]!==V?(e=function(e,t){let{bleedPercentages:n,moveMap:a}=t;if(!a||0===a.length)return n;let{bottom:s,left:r,right:i,top:l}=n,[o,c]=a;if(e<o)return n;if(e>=o&&e<c){let e=(r+i)/2;return{bottom:s,left:e,right:e,top:l}}return{bottom:s,left:i,right:r,top:l}}(D,V),C[30]=D,C[31]=V,C[32]=e):e=C[32],m=e}let eo=m;C[33]!==$||C[34]!==S?.incentive||C[35]!==E||C[36]!==D||C[37]!==V.maxLevel||C[38]!==V.minLevel||
27C[39]!==H?(S?.incentive,p=(()=>{let e=[];for(let t=V.minLevel;t<=V.maxLevel;t+=1){let n=E?.find(e=>e.level_number===t&&"egg"===e.incentive);e.push((0,g.jsxs)("div",{className:ee()(iO().mapElement,iO()[`level-${t}`]),ref:N,children:[t===D?(0,g.jsxs)(k.Fragment,{children:[(0,g.jsx)("div",{className:iO().spiral}),(0,g.jsx)("img",{alt:"Glow",className:iO().glow,src:"https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/plato/math/maps/1/glow-animation.gif"})]}):null,(0,g.jsx)("img",{alt:"Button",className:iO().button,src:`https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/plato/math/maps/1/button-${t<=D?"green":"blue"}.png`}),n&&t>=D?(0,g.jsx)("img",{alt:"Egg",className:iO().egg,src:"https://assets.adaptedmind.com/up/base-assets/map-egg.svg"}):(0,g.jsx)("span",{className:iO().number,children:t})]},t))}let t=S?.incentive==="egg",n=!iO()[`level-${D}`],a=(0,g.jsxs)("div",{className:ee()(iO().mapElement,H,iO().studentMonsterContainer),ref:N,children:[n&&t?(0,g.jsx)("img",{alt:"Egg",className:iO().egg,src:"https://assets.adaptedmind.com/up/base-assets/map-egg.svg"}):null,$?(0,g.jsx)("img",{alt:"Debug map overlay button",className:iO().button,src:"https://assets.adaptedmind.com/vod/adaptedmind.adaptedmind/plato/math/maps/1/button-green.png",style:{opacity:.5}}):null,(0,g.jsx)("div",{className:iO().studentMonster,children:(0,g.jsx)(eI,{})})]});return $?(0,g.jsxs)(k.Fragment,{children:[e,a,(0,g.jsx)(iT,{targetRef
27:N})]}):(0,g.jsxs)(k.Fragment,{children:[e,a]})})(),C[33]=$,C[34]=S?.incentive,C[35]=E,C[36]=D,C[37]=V.maxLevel,C[38]=V.minLevel,C[39]=H,C[40]=p):p=C[40];let ec=p;a:{let e,t,n,a,s;if(!S){v=null;break a}C[41]!==el||C[42]!==z?(e=z===b.FEEDBACK?(0,g.jsx)(r8,{onClose:()=>{el(b.FEEDBACK)}}):null,C[41]=el,C[42]=z,C[43]=e):e=C[43],C[44]!==z||C[45]!==ei?(t=z===b.TIME_LIMIT_REACHED?(0,g.jsx)(iE,{minutes_used:ei.minutes_used,onAddTime:()=>{W(b.PARENTS_ONLY)},source:ei.source,time_limit:ei.time_limit}):null,C[44]=z,C[45]=ei,C[46]=t):t=C[46],C[47]!==z||C[48]!==ei?(n=z===b.PARENTS_ONLY?(0,g.jsx)(ii,{eventMetadata:ei,onClose:()=>{W(b.TIME_LIMIT_REACHED)},onSubmit:()=>{W(b.TIME_LIMIT_EXTEND)}}):null,C[47]=z,C[48]=ei,C[49]=n):n=C[49],C[50]!==z||C[51]!==A||C[52]!==er?(a=z===b.TIME_LIMIT_EXTEND?(0,g.jsx)(id,{onClose:()=>{W(b.TIME_LIMIT_REACHED)},onSuccess:()=>{W(b.NONE),A(y.jNk.SELECT_SUBJECT_LESSON)},source:er}):null,C[50]=z,C[51]=A,C[52]=er,C[53]=a):a=C[53],C[54]!==e||C[55]!==t||C[56]!==n||C[57]!==a?(s=(0,g.jsxs)(k.Fragment,{children:[e,t,n,a]}),C[54]=e,C[55]=t,C[56]=n,C[57]=a,C[58]=s):s=C[58],v=s}let ed=v,eu=V?.assetAspectRatio;return C[59]!==V.url?(h=V?.url?(0,g.jsx)("img",{alt:"Map",src:V.url}):null,C[59]=V.url,C[60]=h):h=C[60],C[61]!==ec||C[62]!==eo||C[63]!==eu||C[64]!==h||C[65]!==ed?(x=(0,g.jsx)("div",{className:iO().container,children:(0,g.jsx)(e5.m,{assetAspectRatio:eu,backgroundContent:h,backgroundRelativeContent:ec,bleedPercentages:eo,uiContent:ed})}),C[61]=ec,C[62]=eo,C[63]=eu,C[64]=h,C[65]=ed,C[66]=x):x=C[66],x};function iR(e){return e.unifiedProduct.actions.setGameState}var iB=n(88727),i$=n.n(iB);let iD=e=>{let t,n,a=(0,f.c)(6),{active:s,onClick:r,shape:i,src:l}=e,o=`${i$().container} ${s?i$().active:""} ${"rectangle"===i?i$().rectangle:""}`;return a[0]!==l?(t=(0,g.jsx)("img",{alt:"Tile",className:i$().image,src:l}),a[0]=l,a[1]=t):t=a[1],a[2]!==r||a[3]!==o||a[4]!==t?(n=(0,g.jsx)(E.Ot,{className:o,onClick:r,children:t}),a[2]=r,a[3]=o,a[4]=t,a[5]=n):n=a[5],n};var iG=n(96956),iq=n.n(iG);let iV=e=>{let t,n,a,s,r,i,l,o=(0,f.c)(18),{onDone:c}=e,{currentMonster:d,handleClickMonsterPart:u,isLoading:_,monsterPartsMap:m,onSaveMonster:p,showTutorialHandIndicator:v}=(()=>{let{isPending:e,mutate:t}=(0,O.Bs)(),n=(0,j.r8)(e=>e.unifiedProduct.monsterMaker.studentMonster),a=(0,j.r8)(e=>e.unifiedProduct.actions.setStudentMonster),{data:s,isLoading:r}=(0,O.Oo)(),[i,l]=(0,k.useState)(!1),o=(0,k.useCallback)((e,t)=>{(0,w.X8)("MonsterMaker_Part_selected",{id:t,type:e}),l(!0);let s=C.NZ[e].find(e=>e.id===t);a({...n,[`${e}_monster_part_id`]:t,[`${e}_monster_part`]:s})},[n,a]),c=(0,k.useCallback)(()=>{(0,w.X8)("MonsterMaker_clicked"),t(n)},[n,t]);return(0,k.useEffect)(()=>{(0,w.X8)("MonsterMaker_viewed")},[]),{currentMonster:n,handleClickMonsterPart:o,isLoading:r||e,monsterPartsMap:s,onSaveMonster:c,showTutorialHandIndicator:i}})();o[0]!==d||o[1]!==u||o[2]!==m?(t=(0,C.Kw)(C.NZ).map(e=>m?.[e]?C.NZ[e].map(t=>{let n=d[`${e}_monster_part_id`]===t.id;return(0,g.jsx)(iD,{active:n,onClick:()=>{u(e,t.id)},shape:"body"===e?"square":"rectangle",src:t.preview_url},`${e}-${t.id}`)}):null).filter(Boolean),o[0]=d,o[1]=u,o[2]=m,o[3]=t):t=o[3];let h=t;o[4]!==c||o[5]!==p?(n=()=>{p(),c()},o[4]=c,o[5]=p,o[6]=n):n=o[6];let b=n;o[7]===Symbol.for("react.memo_cache_sentinel")?(a=(0,g.jsx)("div",{className:iq().leftColumn}),o[7]=a):a=o[7],o[8]===Symbol.for("react.memo_cache_sentinel")?(s=(0,g.jsx)(e9,{title:"Make Your Monster"}),o[8]=s):s=o[8],o[9]!==h?(r=(0,g.jsxs)("div",{className:iq().centerColumn,children:[s,(0,g.jsx)("div",{className:iq().content,children:(0,g.jsx)("div",{className:iq().tiles,children:h})})]}),o[9]=h,o[10]=r):r=o[10];let x=!_;return o[11]!==b||o[12]!==v||o[13]!==x?(i=(0,g.jsx)("div",{className:iq().rightColumn,children:(0,g.jsx)(tv,{isEnabled:x,isVisible:!0,onClick:b,showTutorialHandIndicator:v,variant:y.AqZ.CHECKMARK})}),o[11]=b,o[12]=v,o[13]=x,o[14]=i):i=o[14],o[15]!==r||o[16]!==i?(l=(0,g.jsx)(eH.default,{isOpen:!0,children:(0,g.jsxs)("div",{className:iq().outerGrid,children:[a,r,i]})}),o[15]=r,o[16]=i,o[17]=l):l=o[17],l};var iU=n(83714),iF=n.n(iU);let iK=e=>{let t,n,a,s=(0,f.c)(7),{animateIn:r}=e,i=(0,j.r8)(iH);s[0]!==i?(t=i??(0,C.vA)(),s[0]=i,s[1]=t):t=s[1];let l=t,o=`${iF().studentMonster} ${r?iF().studentMonsterIn:""}`;return s[2]!==l?(n=(0,g.jsx)(eE.A,{opaqueShadow:!0,studentMonster:l,width:"100%"}),s[2]=l,s[3]=n):n=s[3],s[4]!==o||s[5]!==n?(a=(0,g.jsx)("div",{className:o,children:n}),s[4]=o,s[5]=n,s[6]=a):a=s[6],a};function iH(e){return e.unifiedProduct.monsterMaker.studentMonster}var iz=n(62392),iW=n.n(iz);let iX=e=>{let t,n,a=(0,f.c)(3),{animateOut:s}=e,{data:r}=(0,O.$s)();if(!r)return null;let i=`${iW().studentMonsterOnMap} ${s?iW().studentMonsterOffMap:""}`;return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)(eI,{}),a[0]=t):t=a[0],a[1]!==i?(n=(0,g.jsx)("div",{className:i,children:t}),a[1]=i,a[2]=n):n=a[2],n};(d=x||(x={})).INITIAL="initial",d.MAKE_YOUR_OWN_MONSTER="make_your_own_monster",d.MONSTER_MAKER_JUMP_LEFT="monster_maker_jump_left",d.MONSTER_MAKER_MODAL="monster_maker_modal",d.MONSTER_MAKER_OUTRO="monster_maker_outro",d.MONSTER_MOVING_TO_LEVEL_ONE="monster_moving_to_level_one",d.PREGAME_END="pregame_end",d.WELCOME_TO_ADAPTED_MIND="welcome_to_adapted_mind";let iY=[{initial:!0,state:x.INITIAL,video_action:y.ezC.PAUSE},{current_time:.3,next_cue_point:3.56,next_state:x.MAKE_YOUR_OWN_MONSTER,state:x.WELCOME_TO_ADAPTED_MIND,video_action:y.ezC.PLAY},{next_cue_point:6.027,next_state:x.MONSTER_MAKER_MODAL,state:x.MAKE_YOUR_OWN_MONSTER,video_action:y.ezC.PLAY},{next_state:x.MONSTER_MAKER_OUTRO,state:x.MONSTER_MAKER_MODAL,video_action:y.ezC.PAUSE},{current_time:9.1,next_cue_point:15.1,next_state:x.MONSTER_MAKER_JUMP_LEFT,state:x.MONSTER_MAKER_OUTRO,video_action:y.ezC.PLAY},{next_cue_point:16.5,next_state:x.MONSTER_MOVING_TO_LEVEL_ONE,state:x.MONSTER_MAKER_JUMP_LEFT,video_action:y.ezC.PLAY},{current_time:17.05,next_cue_point:24.25,next_state:x.PREGAME_END,state:x.MONSTER_MOVING_TO_LEVEL_ONE,video_action:y.ezC.PLAY},{state:x.PREGAME_END,video_action:y.ezC.PAUSE}];var iQ=n(36880),iZ=n.n(iQ);function iJ(e){return e.unifiedProduct.actions.setGameState}function i0(e){return e.state===x.INITIAL}function i1(e,t){(0,w.X8)(e,{...t,video_id:0x253734dc2})}
27let i2=7/4,i3={bottom:12.5,left:11.9,right:11.9,top:12.5},i4=()=>{let e,t,n,a,s,r,i,l,o=(0,f.c)(24),{handleClickMonsterMakerDone:c,handleCuePoint:d,handleVideoEvent:u,handleVideoLoaded:_,handleVideoPlaying:m,pregameStateIs:p,pregameVideoId:v,pregameVideoState:h}=(()=>{let e,t,n,a,s,r,i,l,o=(0,f.c)(16),c=(0,j.r8)(iJ),{data:d}=(0,O.lr)(),u=(0,k.useRef)(null),{data:_}=(0,O.$s)();o[0]===Symbol.for("react.memo_cache_sentinel")?(e=iY.find(i0),o[0]=e):e=o[0];let[m,p]=(0,k.useState)(e);o[1]===Symbol.for("react.memo_cache_sentinel")?(t=async e=>{p(iY.find(t=>t.state===e))},o[1]=t):t=o[1];let v=t;o[2]!==m?(n=(...e)=>e.includes(m.state),o[2]=m,o[3]=n):n=o[3];let h=n,b=(0,k.useRef)(!1);o[4]!==d?.level||o[5]!==c?(a=(e,t)=>{t.data.next_state===x.PREGAME_END?c(y.jNk.SELECT_SUBJECT_LESSON):(t.data.next_state===x.MONSTER_MOVING_TO_LEVEL_ONE&&(0,w.X8)("Map_viewed",{level:d?.level??0,map_type:"video"}),v(t.data.next_state))},o[4]=d?.level,o[5]=c,o[6]=a):a=o[6],d?.level;let g=a;o[7]!==_?.id?(s=e=>{(u.current=e,_?.id>0)?v(x.MONSTER_MOVING_TO_LEVEL_ONE):v(x.WELCOME_TO_ADAPTED_MIND)},o[7]=_?.id,o[8]=s):s=o[8];let C=s;o[9]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{b.current||(b.current=!0,(0,w.X8)("PregameSequence_Video_playing",{video_id:0x253734dc2}))},o[9]=r):r=o[9];let N=r;o[10]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{v(x.MONSTER_MAKER_OUTRO)},o[10]=i):i=o[10];let P=i;return o[11]!==g||o[12]!==C||o[13]!==h||o[14]!==m?(l={handleClickMonsterMakerDone:P,handleCuePoint:g,handleVideoEvent:i1,handleVideoLoaded:C,handleVideoPlaying:N,pregameStateIs:h,pregameVideoId:0x253734dc2,pregameVideoState:m},o[11]=g,o[12]=C,o[13]=h,o[14]=m,o[15]=l):l=o[15],l})();o[0]===Symbol.for("react.memo_cache_sentinel")?(e={border:"none",height:"100%",width:"100%"},o[0]=e):e=o[0],o[1]!==d||o[2]!==u||o[3]!==_||o[4]!==m||o[5]!==v||o[6]!==h?(t=(0,g.jsx)(er.p,{cuePointSystem:"vtt",fireEvent:u,id:v,onCuePoint:d,onLoaded:_,onPlay:m,style:e,videoState:h}),o[1]=d,o[2]=u,o[3]=_,o[4]=m,o[5]=v,o[6]=h,o[7]=t):t=o[7];let b=t;o[8]!==p?(n=p(x.MONSTER_MOVING_TO_LEVEL_ONE,x.PREGAME_END)?(0,g.jsx)(iX,{animateOut:!1}):null,o[8]=p,o[9]=n):n=o[9],o[10]!==p?(a=p(x.MAKE_YOUR_OWN_MONSTER,x.MONSTER_MAKER_MODAL,x.MONSTER_MAKER_OUTRO),o[10]=p,o[11]=a):a=o[11],o[12]!==a?(s=(0,g.jsx)(iK,{animateIn:a}),o[12]=a,o[13]=s):s=o[13],o[14]!==n||o[15]!==s?(r=(0,g.jsxs)(k.Fragment,{children:[n,s]}),o[14]=n,o[15]=s,o[16]=r):r=o[16];let C=r;o[17]!==c||o[18]!==p?(i=p(x.MONSTER_MAKER_MODAL)?(0,g.jsx)(iV,{onDone:c}):null,o[17]=c,o[18]=p,o[19]=i):i=o[19];let N=i;return o[20]!==b||o[21]!==C||o[22]!==N?(l=(0,g.jsx)("div",{className:iZ().container,children:(0,g.jsx)(e5.m,{assetAspectRatio:i2,backgroundContent:b,backgroundRelativeContent:C,bleedPercentages:i3,uiContent:N})}),o[20]=b,o[21]=C,o[22]=N,o[23]=l):l=o[23],l};var i5=n(76028),i8=n.n(i5);let i6=e=>{let t,n,a,s=(0,f.c)(9),{direction:r,onClick:i}=e,l=`${i8().buttonContainer} ${"next"===r?i8().next:i8().previous}`,o=`https://assets.adaptedmind.com/up/base-assets/button-icons/carousel/arrow-${"next"===r?"right":"left"}-white-icon.svg`;s[0]!==o?(t=(0,g.jsx)("img",{alt:"icon of carousel button",className:i8().arrowIcon,src:o}),s[0]=o,s[1]=t):t=s[1];let c=`https://assets.adaptedmind.com/up/base-assets/button-icons/carousel/carousel-btn-${"next"===r?"right":"left"}-base.svg`;return s[2]!==c?(n=(0,g.jsx)("img",{alt:"base of carousel button",className:i8().baseImg,src:c}),s[2]=c,s[3]=n):n=s[3],s[4]!==i||s[5]!==l||s[6]!==t||s[7]!==n?(a=(0,g.jsxs)(E.Ot,{className:l,onClick:i,children:[t,n]}),s[4]=i,s[5]=l,s[6]=t,s[7]=n,s[8]=a):a=s[8],a};var i7=n(8332);n(70185),n(29137);var i9=n(39236),le=n.n(i9),lt=n(73732);let ln=(0,g.jsx)("img",{alt:"Select Student Screen Background",className:le().backgroundImage,src:"https://assets.adaptedmind.com/up/base-assets/select-student-background.webp"}),la={dots:!1,infinite:!0,nextArrow:(0,g.jsx)(i6,{direction:"next"}),prevArrow:(0,g.jsx)(i6,{direction:"previous"}),slidesToScroll:1,slidesToShow:3,speed:500},ls=()=>{let e,t,n,a,s,r,i,l=(0,f.c)(14),{assetAspectRatio:o,bleedPercentages:c,handleSelectStudent:d,studentsWithMonsters:u}=(()=>{let e,t,n,a,s,r,i=(0,f.c)(16),{data:l}=(0,O.GN)(),o=iu(),c=(0,T.useRouter)();i[0]!==c.query?(e=(0,lt.i4)(c.query,"product"),i[0]=c.query,i[1]=e):e=i[1];let d=e,u="string"==typeof c.query.email_id?c.query.email_id:void 0,_="string"==typeof c.query.template_alias?c.query.template_alias:void 0;i[2]!==o||i[3]!==c?(t=e=>{(0,w.X8)("SelectStudent_clicked",{selected_student_id:e}),o(e),c.push({pathname:"/game",query:{...c.query,view:"play"}},void 0,{shallow:!0})},i[2]=o,i[3]=c,i[4]=t):t=i[4];let m=t;i[5]===Symbol.for("react.memo_cache_sentinel")?(n={bottom:12.5,left:11.9,right:11.9,to
27p:12.5},i[5]=n):n=i[5];let p=n;return i[6]!==d||i[7]!==u||i[8]!==c.isReady||i[9]!==l||i[10]!==_?(a=()=>{l&&c.isReady&&(0,w.X8)("SelectStudent_viewed",{...void 0===u?{}:{email_id:u},source:d,student_count:l?.length,template_alias:_})},s=[d,c.isReady,l,_,u],i[6]=d,i[7]=u,i[8]=c.isReady,i[9]=l,i[10]=_,i[11]=a,i[12]=s):(a=i[11],s=i[12]),(0,k.useEffect)(a,s),i[13]!==m||i[14]!==l?(r={assetAspectRatio:1.75,bleedPercentages:p,handleSelectStudent:m,studentsWithMonsters:l},i[13]=m,i[14]=l,i[15]=r):r=i[15],r})();if(void 0===u)return null;l[0]!==d||l[1]!==u?(e=u?.map(e=>(0,g.jsx)("div",{className:le().slide,children:(0,g.jsxs)(E.Ot,{className:le().card,onClick:()=>{d(e.id)},children:[(0,g.jsx)("div",{className:le().cardThumbnail,children:(0,g.jsx)(eE.A,{opaqueShadow:!0,studentMonster:e?.student_monster??(0,C.vA)(),width:"100%"})}),(0,g.jsx)("div",{className:le().cardTitleSection,children:(0,g.jsx)("div",{className:le().cardTitle,children:e.first_name})})]})},e.id))||[],l[0]=d,l[1]=u,l[2]=e):e=l[2];let _=e;l[3]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)(e9,{title:"Who's Learning?"}),l[3]=t):t=l[3],l[4]!==_?(n=_.length>3?(0,g.jsx)(i7.A,{className:le().carousel,...la,children:_}):(0,g.jsx)("div",{className:le().nonCarouselContainer,children:_}),l[4]=_,l[5]=n):n=l[5],l[6]===Symbol.for("react.memo_cache_sentinel")?(a=(0,g.jsxs)(E.Ot,{className:le().additionalCTA,onClick:lr,children:[(0,g.jsx)("img",{alt:"parent-account icon",className:le().additionalCTAIcon,src:"https://assets.adaptedmind.com/up/base-assets/button-icons/parent-account-white-icon-v2.svg"}),(0,g.jsx)("div",{className:le().additionalCTAText,children:"Parent Account"})]}),l[6]=a):a=l[6],l[7]===Symbol.for("react.memo_cache_sentinel")?(s=(0,g.jsxs)("div",{className:le().additionalCTAsSection,children:[a,(0,g.jsxs)(E.Ot,{className:le().additionalCTA,onClick:li,children:[(0,g.jsx)("img",{alt:"add student icon",className:le().additionalCTAIcon,src:"https://assets.adaptedmind.com/up/base-assets/button-icons/add-student-white-icon-v2.svg"}),(0,g.jsx)("div",{className:le().additionalCTAText,children:"Add Student"})]})]}),l[7]=s):s=l[7],l[8]!==n?(r=(0,g.jsxs)("div",{className:le().SelectStudent,children:[t,n,s]}),l[8]=n,l[9]=r):r=l[9];let m=r;return l[10]!==o||l[11]!==c||l[12]!==m?(i=(0,g.jsx)("div",{children:(0,g.jsx)(e5.m,{assetAspectRatio:o,backgroundContent:ln,bleedPercentages:c,uiContent:m})}),l[10]=o,l[11]=c,l[12]=m,l[13]=i):i=l[13],i};function lr(){globalThis.location.assign("/my-account")}function li(){globalThis.location.assign("/my-account?modal=add-student")}var ll=n(40404),lo=n.n(ll),lc=n(49239),ld=n.n(lc);let lu=e=>{let t,n,a,s,r,i=(0,f.c)(14),{completed:l,total:o}=e,c=`Progress Bar Steps ${l}/${o}`;i[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)("div",{className:ld().progressBarSocket}),i[0]=t):t=i[0];let d=`${Math.floor(l)/o*100}%`;return i[1]!==d?(n=(0,g.jsx)("div",{className:ld().progressBarFiller,style:{width:d}}),i[1]=d,i[2]=n):n=i[2],i[3]!==o?(a=Array.from({length:o-1},l_),i[3]=o,i[4]=a):a=i[4],i[5]!==a||i[6]!==o?(s=a.map(e=>(0,g.jsx)("div",{className:ld().progressBarDivider,style:{left:`${(e+1)/o*100}%`}},e)),i[5]=a,i[6]=o,i[7]=s):s=i[7],i[8]!==l||i[9]!==c||i[10]!==n||i[11]!==s||i[12]!==o?(r=(0,g.jsxs)("div",{"aria-label":c,"aria-valuemax":o,"aria-valuemin":0,"aria-valuenow":l,className:ld().progressBarContainer,role:"progressbar",children:[t,n,s]}),i[8]=l,i[9]=c,i[10]=n,i[11]=s,i[12]=o,i[13]=r):r=i[13],r};function l_(e,t){return t}let lm={full:1280,large:800,small:500},lp=(e,t)=>e.thumbnail_url.length>0?e.thumbnail_url:"small"===t||"large"===t&&e.subject_id===y.pN.MATH?"https://assets.adaptedmind.com/up/pickn/math_smart_practice_card_img.webp":e.subject_id===y.pN.MATH?"https://assets.adaptedmind.com/up/pickn/math_card_hero.webp":`https://placehold.co/500x300/png?text=${encodeURIComponent(e.title)}`,lv=e=>{let t,n,a,s,r,i,l,o,c,d,u,_,m,p,v=(0,f.c)(67),{card:h,onClick:b,position:x,size:j}=e,N=void 0===j?"small":j;if(v[0]!==h||v[1]!==N)t=(0,C.mE)(lp(h,N),{format:"auto",width:lm[N]}),v[0]=h,v[1]=N,v[2]=t;else t=v[2];let P=t;if(v[3]!==h||v[4]!==N)n=(0,C.S3)(lp(h,N),{format:"auto",width:lm[N]}),v[3]=h,v[4]=N,v[5]=n;else n=v[5];let S=n;v[6]===Symbol.for("react.memo_cache_sentinel")?(a={full:ld().cardWrapperFull,large:ld().cardWrapperLarge,small:ld().cardWrapperSmall},v[6]=a):a=v[6];let I=a[N];v[7]!==h?(s=(e=>{if(e.completed)return"https://assets.adaptedmind.com/up/pickn/checkmark.svg";if(1===e.subject_id){if(e.math_lesson_status===y.BYY.IN_PROGRESS)return"https://assets.adaptedmind.com/up/pickn/half-star.svg";if(e.math_lesson_status===y.BYY.MASTERED)return"https://assets.adaptedmind.com/up/pickn/star.svg"}return null})(h),v[7]=h,v[8]=s):s=v[8];let T=s,M=h.math_lesson_status===y.BYY.MASTERED&&"pretest"===h.math_mastery_algo,O=(0,k.useRef)(!1);v[9]!==h||v[10]!==b||v[11]!==x?(r=()=>{b({card:h,position_in_grid:x,subject_content_id:h.subject_content_id,subject_content_type_id:h.subject_content_type_id,subject_id:h.subject_id})}
27,v[9]=h,v[10]=b,v[11]=x,v[12]=r):r=v[12];let A=r;v[13]!==M?(i=()=>{M&&!O.current&&(O.current=!0,(0,w.X8)("Tooltip shown"))},v[13]=M,v[14]=i):i=v[14];let L=i;v[15]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{O.current=!1},v[15]=l):l=v[15];let R=l;v[16]!==h.subject_content_id||v[17]!==h.subject_content_type_id||v[18]!==h.subject_id?(o={"data-subject-content-id":h.subject_content_id,"data-subject-content-type-id":h.subject_content_type_id,"data-subject-id":h.subject_id},v[16]=h.subject_content_id,v[17]=h.subject_content_type_id,v[18]=h.subject_id,v[19]=o):o=v[19];let B=o;if("full"===N&&h.subject_id===y.pN.MATH){let e,t,n,a,s,r,i,l;return v[20]!==h.title||v[21]!==S||v[22]!==P?(e=(0,g.jsx)("img",{alt:h.title,className:ld().cardFullImage,draggable:!1,src:P,srcSet:S}),v[20]=h.title,v[21]=S,v[22]=P,v[23]=e):e=v[23],v[24]!==h.title?(t=(0,g.jsx)("div",{className:ld().cardFullTitle,children:h.title}),v[24]=h.title,v[25]=t):t=v[25],v[26]!==h.description?(n=(0,g.jsx)("div",{className:ld().cardFullDescription,children:h.description}),v[26]=h.description,v[27]=n):n=v[27],v[28]!==t||v[29]!==n?(a=(0,g.jsxs)("div",{className:ld().cardFullInnerBox,children:[t,n]}),v[28]=t,v[29]=n,v[30]=a):a=v[30],v[31]===Symbol.for("react.memo_cache_sentinel")?(s=(0,g.jsx)("div",{className:ld().cardFullButton,children:"Play Now!"}),v[31]=s):s=v[31],v[32]!==a?(r=(0,g.jsxs)("div",{className:ld().cardFull
27Content,children:[a,s]}),v[32]=a,v[33]=r):r=v[33],v[34]!==e||v[35]!==r?(i=(0,g.jsxs)("div",{className:ld().cardFull,children:[e,r]}),v[34]=e,v[35]=r,v[36]=i):i=v[36],v[37]!==B||v[38]!==A||v[39]!==i||v[40]!==I?(l=(0,g.jsx)(E.Ot,{children:(0,g.jsx)("button",{className:I,...B,onClick:A,type:"button",children:i})}),v[37]=B,v[38]=A,v[39]=i,v[40]=I,v[41]=l):l=v[41],l}let $=`${ld().cardImage} ${h.subject_content_type_id===y.ehN.READING_BOOK_PARTS?ld().readingBookPartCardImage:""}`;return v[42]!==h.title||v[43]!==$||v[44]!==S||v[45]!==P?(c=(0,g.jsx)("div",{className:ld().cardImageWrapper,children:(0,g.jsx)("img",{alt:h.title,className:$,draggable:!1,src:P,srcSet:S})}),v[42]=h.title,v[43]=$,v[44]=S,v[45]=P,v[46]=c):c=v[46],v[47]!==L||v[48]!==M||v[49]!==T?(d=T?(0,g.jsxs)("div",{className:ld().statusIconWrapper,onMouseEnter:L,onMouseLeave:R,children:[(0,g.jsx)("img",{alt:"completion icon",className:ld().statusIconBase,draggable:!1,src:T}),M?(0,g.jsx)("div",{className:ld().pretestTooltip,children:"pretest"}):null]}):null,v[47]=L,v[48]=M,v[49]=T,v[50]=d):d=v[50],v[51]!==h.completed_topics||v[52]!==h.subject_id||v[53]!==h.total_topics?(u=h.subject_id===y.pN.READING&&(h.total_topics??0)>0&&(h.completed_topics??0)>0&&(h.completed_topics??0)<(h.total_topics??0)?(0,g.jsx)(lu,{completed:h.completed_topics??0,total:h.total_topics??0}):null,v[51]=h.completed_topics,v[52]=h.subject_id,v[53]=h.total_topics,v[54]=u):u=v[54],v[55]!==h.title?(_=(0,g.jsx)("div",{className:ld().cardTitle,children:(0,g.jsx)("span",{children:h.title})}),v[55]=h.title,v[56]=_):_=v[56],v[57]!==c||v[58]!==d||v[59]!==u||v[60]!==_?(m=(0,g.jsxs)("div",{className:ld().card,children:[c,d,u,_]}),v[57]=c,v[58]=d,v[59]=u,v[60]=_,v[61]=m):m=v[61],v[62]!==B||v[63]!==A||v[64]!==m||v[65]!==I?(p=(0,g.jsx)(E.Ot,{children:(0,g.jsx)("button",{className:I,...B,onClick:A,type:"button",children:m})}),v[62]=B,v[63]=A,v[64]=m,v[65]=I,v[66]=p):p=v[66],p},lh=e=>{let t,n,a,s,r,i=(0,f.c)(20),{data:l,onClick:o}=e,[c]=l.top_picks;i[0]!==l.skills||i[1]!==c?(t=(e,t)=>{let n=+!!c;for(let t=0;t<e;t+=1)n+=l.skills[t].cards.length;return(0,C.fe)(t,n)},i[0]=l.skills,i[1]=c,i[2]=t):t=i[2];let d=t;if(i[3]!==o||i[4]!==c?(n=void 0!==c&&(0,g.jsx)("div",{className:ld().smartPracticeSection,children:(0,g.jsx)(lv,{card:c,onClick:o,position:(0,C.fe)(0),size:"full"})}),i[3]=o,i[4]=c,i[5]=n):n=i[5],i[6]!==l.skills||i[7]!==d||i[8]!==o){let e;i[10]!==d||i[11]!==o?(e=(e,t)=>(0,g.jsxs)("div",{className:ld().skillGroup,children:[(0,g.jsx)("div",{className:ld().skillGroupTitle,children:e.container_name}),(0,g.jsx)("div",{className:ld().gridRow,children:e.cards.map((e,n)=>(0,g.jsx)(lv,{card:e,onClick:o,position:d(t,n),size:"small"},`${e.subject_id}-${e.subject_content_type_id}-${e.subject_content_id}`))})]},e.container_name),i[10]=d,i[11]=o,i[12]=e):e=i[12],a=l.skills.map(e),i[6]=l.skills,i[7]=d,i[8]=o,i[9]=a}else a=i[9];return i[13]!==l.skills.length||i[14]!==l.top_picks.length?(s=0===l.skills.length&&l.top_picks.length<=1&&(0,g.jsx)("div",{className:ld().emptyState,children:"No math content available"}),i[13]=l.skills.length,i[14]=l.top_picks.length,i[15]=s):s=i[15],i[16]!==n||i[17]!==a||i[18]!==s?(r=(0,g.jsxs)("div",{className:ld().scrollContainer,children:[n,a,s]}),i[16]=n,i[17]=a,i[18]=s,i[19]=r):r=i[19],r},lb=e=>{let t,n,a,s=(0,f.c)(13),{data:r,onClick:i}=e,l="early_reading"===r.type;if(s[0]!==r.current_level||s[1]!==r.easier||s[2]!==r.harder||s[3]!==r.phonics_videos||s[4]!==r.up_next||s[5]!==l){t=[];let e=0,n=(n,a)=>{a&&a.length>0&&(t.push({cards:a,startPosition:e,title:n}),e+=a.length)};n("Up Next",r.up_next),l&&n("Phonics Videos",r.phonics_videos),n("Current Level",r.current_level),n("Easier",r.easier),n("Harder",r.harder),s[0]=r.current_level,s[1]=r.easier,s[2]=r.harder,s[3]=r.phonics_videos,s[4]=r.up_next,s[5]=l,s[6]=t}else t=s[6];let o=t;s[7]!==i?(n=e=>(0,g.jsxs)("div",{className:ld().section,children:[(0,g.jsx)("div",{className:ld().sectionTitle,children:e.title}),(0,g.jsx)("div",{className:ld().gridRow,children:e.cards.map((t,n)=>(0,g.jsx)(lv,{card:t,onClick:i,position:(0,C.fe)(n,e.startPosition),size:"small"},`${t.subject_id}-${t.subject_content_type_id}-${t.subject_content_id}`))})]},e.title),s[7]=i,s[8]=n):n=s[8];let c=n;if(0===o.length){let e;return s[9]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)("div",{className:ld().scrollContainer,children:(0,g.jsx)("div",{className:ld().emptyState,children:"No reading content available"})}),s[9]=e):e=s[9],e}return s[10]!==c||s[11]!==o?(a=(0,g.jsx)("div",{className:ld().scrollContainer,children:o.map(e=>c(e))}),s[10]=c,s[11]=o,s[12]=a):a=s[12],a},lx=e=>{let t,n,a=(0,f.c)(8),{data:s,onClick:r}=e;if(a[0]!==s.initial_worlds||a[1]!==s.more_watch||a[2]!==s.up_next){t=[];let e=0,n=(n,a)=>{a.length>0&&(t.push({cards:a,startPosition:e,title:n}),e+=a.length)};
27n("Up Next",s.up_next),n("Initial Worlds",s.initial_worlds),n("More to Watch",s.more_watch),a[0]=s.initial_worlds,a[1]=s.more_watch,a[2]=s.up_next,a[3]=t}else t=a[3];let i=t;if(0===i.length){let e;return a[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)("div",{className:ld().scrollContainer,children:(0,g.jsx)("div",{className:ld().emptyState,children:"No science content available"})}),a[4]=e):e=a[4],e}return a[5]!==r||a[6]!==i?(n=(0,g.jsx)("div",{className:ld().scrollContainer,children:i.map(e=>(0,g.jsxs)("div",{className:ld().section,children:[(0,g.jsx)("div",{className:ld().sectionTitle,children:e.title}),(0,g.jsx)("div",{className:ld().gridRow,children:e.cards.map((t,n)=>(0,g.jsx)(lv,{card:t,onClick:r,position:(0,C.fe)(n,e.startPosition),size:"small"},`${t.subject_id}-${t.subject_content_type_id}-${t.subject_content_id}`))})]},e.title))}),a[5]=r,a[6]=i,a[7]=n):n=a[7],n},lg=e=>{let t,n,a,s,r,i=(0,f.c)(20),{data:l,onClick:o}=e;i[0]!==l.series||i[1]!==l.up_next?.length?(t=(e,t)=>{let n=l.up_next?.length??0;for(let t=0;t<e;t+=1)n+=l.series[t].cards.length;return(0,C.fe)(t,n)},i[0]=l.series,i[1]=l.up_next?.length,i[2]=t):t=i[2];let c=t;if(i[3]!==l.up_next||i[4]!==o?(n=(l.up_next?.length??0)>0&&(0,g.jsxs)("div",{className:ld().section,children:[(0,g.jsx)("div",{className:ld().sectionTitle,children:"Up Next"}),(0,g.jsx)("div",{className:ld().gridRow,children:l.up_next?.map((e,t)=>(0,g.jsx)(lv,{card:e,onClick:o,position:(0,C.fe)(t),size:"small"},`${e.subject_id}-${e.subject_content_type_id}-${e.subject_content_id}`))})]}),i[3]=l.up_next,i[4]=o,i[5]=n):n=i[5],i[6]!==l.series||i[7]!==c||i[8]!==o){let e;i[10]!==c||i[11]!==o?(e=(e,t)=>(0,g.jsxs)("div",{className:ld().skillGroup,children:[(0,g.jsx)("div",{className:ld().skillGroupTitle,children:e.container_name}),(0,g.jsx)("div",{className:ld().gridRow,children:e.cards.map((e,n)=>(0,g.jsx)(lv,{card:e,onClick:o,position:c(t,n),size:"small"},`${e.subject_id}-${e.subject_content_type_id}-${e.subject_content_id}`))})]},e.container_name),i[10]=c,i[11]=o,i[12]=e):e=i[12],a=l.series.map(e),i[6]=l.series,i[7]=c,i[8]=o,i[9]=a}else a=i[9];return i[13]!==l.series.length||i[14]!==l.up_next?(s=(!l.up_next||0===l.up_next.length)&&0===l.series.length&&(0,g.jsx)("div",{className:ld().emptyState,children:"No Social Studies content available"}),i[13]=l.series.length,i[14]=l.up_next,i[15]=s):s=i[15],i[16]!==n||i[17]!==a||i[18]!==s?(r=(0,g.jsxs)("div",{className:ld().scrollContainer,children:[n,a,s]}),i[16]=n,i[17]=a,i[18]=s,i[19]=r):r=i[19],r},lf=e=>{let t,n,a,s,r,i=(0,f.c)(20),{data:l,onClick:o}=e;i[0]!==l.series||i[1]!==l.up_next?.length?(t=(e,t)=>{let n=l.up_next?.length??0;for(let t=0;t<e;t+=1)n+=l.series[t].cards.length;return(0,C.fe)(t,n)},i[0]=l.series,i[1]=l.up_next?.length,i[2]=t):t=i[2];let c=t;if(i[3]!==l.up_next||i[4]!==o?(n=(l.up_next?.length??0)>0&&(0,g.jsxs)("div",{className:ld().section,children:[(0,g.jsx)("div",{className:ld().sectionTitle,children:"Up Next"}),(0,g.jsx)("div",{className:ld().gridRow,children:l.up_next?.map((e,t)=>(0,g.jsx)(lv,{card:e,onClick:o,position:(0,C.fe)(t),size:"small"},`${e.subject_id}-${e.subject_content_type_id}-${e.subject_content_id}`))})]}),i[3]=l.up_next,i[4]=o,i[5]=n):n=i[5],i[6]!==l.series||i[7]!==c||i[8]!==o){let e;i[10]!==c||i[11]!==o?(e=(e,t)=>(0,g.jsxs)("div",{className:ld().skillGroup,children:[(0,g.jsx)("div",{className:ld().skillGroupTitle,children:e.container_name}),(0,g.jsx)("div",{className:ld().gridRow,children:e.cards.map((e,n)=>(0,g.jsx)(lv,{card:e,onClick:o,position:c(t,n),size:"small"},`${e.subject_id}-${e.subject_content_type_id}-${e.subject_content_id}`))})]},e.container_name),i[10]=c,i[11]=o,i[12]=e):e=i[12],a=l.series.map(e),i[6]=l.series,i[7]=c,i[8]=o,i[9]=a}else a=i[9];return i[13]!==l.series.length||i[14]!==l.up_next?(s=(!l.up_next||0===l.up_next.length)&&0===l.series.length&&(0,g.jsx)("div",{className:ld().emptyState,children:"No Superskills content available"}),i[13]=l.series.length,i[14]=l.up_next,i[15]=s):s=i[15],i[16]!==n||i[17]!==a||i[18]!==s?(r=(0,g.jsxs)("div",{className:ld().scrollContainer,children:[n,a,s]}),i[16]=n,i[17]=a,i[18]=s,i[19]=r):r=i[19],r},lj=e=>{let t,n=(0,f.c)(6),{cards:a,onClick:s}=e;if(0===a.length){let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)("div",{className:ld().emptyState,children:"No top picks available"}),n[0]=e):e=n[0],e}if(n[1]!==a||n[2]!==s){let e,r=a.slice(0,2),i=a.slice(2);n[4]!==s?(e=(e,t)=>(0,g.jsx)(lv,{card:e,onClick:s,position:(0,C.fe)(t),size:"large"},`${e.subject_id}-${e.subject_content_type_id}-${e.subject_content_id}`),n[4]=s,n[5]=e):e=n[5],t=(0,g.jsxs)("div",{className:ld().scrollContainer,children:[(0,g.jsx)("div",{className:ld().topPicksFeatured,children:r.map(e)}),i.length>0&&(0,g.jsx)("div",{className:ld().topPicksGrid,children:i.map((e,t)=>(0,g.jsx)(lv,{card:e,onClick:s,position:(0,C.fe)(t,r.length),size:"small"},`${e.subject_id}-${e.subject_content_type_id}-${e.subject_content_id}`))})]}),n[1]=a,n[2]=s,n[3]=t}else t=n[3];return t},ly=e=>{let t=(0,f.c)(20),{data:n,onClick:a,tabId:s}=e;switch(s){case"math":{let e;return t[0]!==n.math||t[1]!==a?(e=(0,g.jsx)(lh,{data:n.math,onClick:a}),t[0]=n.math,t[1]=a,t[2]=e):e=t[2],e}case"reading":{let e;return t[3]!==n.reading||t[4]!==a?(e=(0,g.jsx)(lb,{data:n.reading,onClick:a}
27),t[3]=n.reading,t[4]=a,t[5]=e):e=t[5],e}case"science":{let e;return t[6]!==n.science||t[7]!==a?(e=(0,g.jsx)(lx,{data:n.science,onClick:a}),t[6]=n.science,t[7]=a,t[8]=e):e=t[8],e}case"social_studies":{let e;return t[9]!==n.social_studies||t[10]!==a?(e=(0,g.jsx)(lg,{data:n.social_studies,onClick:a}),t[9]=n.social_studies,t[10]=a,t[11]=e):e=t[11],e}case"super_skills":{let e;return t[12]!==n.super_skills||t[13]!==a?(e=(0,g.jsx)(lf,{data:n.super_skills,onClick:a}),t[12]=n.super_skills,t[13]=a,t[14]=e):e=t[14],e}case"top_picks":{let e;return t[15]!==n.top_picks||t[16]!==a?(e=(0,g.jsx)(lj,{cards:n.top_picks,onClick:a}),t[15]=n.top_picks,t[16]=a,t[17]=e):e=t[17],e}default:{let e;return t[18]!==s?(e=(0,C.Oc)(s),t[18]=s,t[19]=e):e=t[19],e}}},lC={math:"https://assets.adaptedmind.com/up/pickn/tab_icon_math.webp",reading:"https://assets.adaptedmind.com/up/pickn/tab_icon_reading.webp",science:"https://assets.adaptedmind.com/up/pickn/tab_icon_science.webp",social_studies:"https://assets.adaptedmind.com/up/pickn/tab_icon_social_studies.webp",super_skills:"https://assets.adaptedmind.com/up/pickn/tab_icon_super_skills.webp",top_picks:"https://assets.adaptedmind.com/up/pickn/tab_icon_top_picks.webp"},lN={1:{maxLevel:16,minLevel:1,url:"https://assets.adaptedmind.com/up/_temp/Map-1-Ext-Blur.webp"},2:{maxLevel:21,minLevel:17,url:"https://assets.adaptedmind.com/up/_temp/Map-2-Ext-Blur.webp"},3:{maxLevel:31,minLevel:22,url:"https://assets.adaptedmind.com/up/_temp/Map-3-Ext-Blur.webp"},4:{maxLevel:36,minLevel:32,url:"https://assets.adaptedmind.com/up/_temp/Map-4-Ext-Blur.webp"}},lP=()=>{let e,t,n,a,s,r,i,l,o,c,d,u,_,m,p,v,h,b,x,C,N=(0,f.c)(49),[P,S]=(0,k.useState)("top_picks");N[0]===Symbol.for("react.memo_cache_sentinel")?(e={columns:3,isEnabled:!0},N[0]=e):e=N[0];let{data:I,isLoading:T}=(0,O.b1)(e),M=(0,k.useRef)(null),{mutateAsync:A}=(0,O.n$)(),L=(0,j.r8)(lS),{data:R}=(0,O.lr)(),B=(0,j.r8)(lE),$=R?.level??1;N[1]!==P||N[2]!==I?(t=(0,O.VP)(I,P),N[1]=P,N[2]=I,N[3]=t):t=N[3];let D=t;N[4]!==$||N[5]!==D||N[6]!==P?(n=()=>{0!==D&&(0,w.X8)("SelectSubject_viewed",{level:$,num_options_shown:D,tab:P})},a=[$,D,P],N[4]=$,N[5]=D,N[6]=P,N[7]=n,N[8]=a):(n=N[7],a=N[8]),(0,k.useEffect)(n,a),N[9]===Symbol.for("react.memo_cache_sentinel")?(s=()=>{M.current&&(M.current.scrollTop=0)},N[9]=s):s=N[9],N[10]!==P?(r=[P],N[10]=P,N[11]=r):r=N[11],(0,k.useEffect)(s,r),N[12]===Symbol.for("react.memo_cache_sentinel")?(i=e=>()=>{S(e)},N[12]=i):i=N[12];let G=i,q=V();N[13]!==q||N[14]!==A||N[15]!==D||N[16]!==B||N[17]!==P||N[18]!==L?(l=async e=>{await A({subject_content_id:e.subject_content_id,subject_content_type_id:e.subject_content_type_id,subject_id:e.subject_id}),(0,w.X8)("SelectSubject_clicked",{...q(),activity_title:e.card.title,num_options_shown:D,position_in_grid:e.position_in_grid,subject_content_id:e.subject_content_id,subject_content_type_id:e.subject_content_type_id,subject_id:e.subject_id,tab:P}),B(),L(y.jNk.LEVEL)},N[13]=q,N[14]=A,N[15]=D,N[16]=B,N[17]=P,N[18]=L,N[19]=l):l=N[19];let U=l;N[20]!==T||N[21]!==U||N[22]!==P||N[23]!==I?(o=()=>T?(0,g.jsx)("div",{className:lo().loadingState,children:"Loading..."}):I?.data?(0,g.jsx)(ly,{data:I.data,onClick:U,tabId:P}):(0,g.jsx)("div",{className:lo().loadingState,children:"No data available"}),N[20]=T,N[21]=U,N[22]=P,N[23]=I,N[24]=o):o=N[24];let F=o;if(N[25]!==$){e:{let e;if(0===$){c=lN[1];break e}for(let t of(N[27]===Symbol.for("react.memo_cache_sentinel")?(e=Object.values(lN),N[27]=e):e=N[27],e))if($>=t.minLevel&&$<=t.maxLevel){c=t;break e}c=lN[Math.max(...Object.keys(lN).map(Number))]}N[25]=$,N[26]=c}
27else c=N[26];let K=c;N[28]!==K.url?(d=(0,g.jsx)("link",{as:"image",href:K.url,rel:"preload"}),N[28]=K.url,N[29]=d):d=N[29];let H=`url(${K.url})`;return N[30]!==H?(u=(0,g.jsx)("div",{className:lo().backgroundMap,style:{backgroundImage:H}}),N[30]=H,N[31]=u):u=N[31],N[32]===Symbol.for("react.memo_cache_sentinel")?(_=(0,g.jsx)("div",{}),N[32]=_):_=N[32],N[33]!==P?(m=y.QVO.map(e=>(0,g.jsx)(E.Ot,{children:(0,g.jsxs)("button",{className:`${lo().tab} ${P===e.id?lo().tabActive:""}`,onClick:G(e.id),type:"button",children:[(0,g.jsx)("img",{alt:"","aria-hidden":"true",className:lo().tabIcon,src:lC[e.id]}),(0,g.jsx)("div",{className:lo().tabLabel,children:e.name})]})},e.id)),N[33]=P,N[34]=m):m=N[34],N[35]!==m?(p=(0,g.jsx)("div",{className:lo().tabContainer,children:m}),N[35]=m,N[36]=p):p=N[36],N[37]===Symbol.for("react.memo_cache_sentinel")?(v=(0,g.jsx)(ix,{}),N[37]=v):v=N[37],N[38]!==p?(h=(0,g.jsxs)("div",{className:lo().header,children:[_,p,v]}),N[38]=p,N[39]=h):h=N[39],N[40]!==F?(b=(0,g.jsx)("div",{className:lo().gridContainer,ref:M,children:F()}),N[40]=F,N[41]=b):b=N[41],N[42]!==h||N[43]!==b?(x=(0,g.jsx)(eH.default,{isOpen:!0,children:(0,g.jsxs)("div",{className:lo().container,children:[h,b]})}),N[42]=h,N[43]=b,N[44]=x):x=N[44],N[45]!==d||N[46]!==u||N[47]!==x?(C=(0,g.jsxs)(k.Fragment,{children:[d,u,x]}),N[45]=d,N[46]=u,N[47]=x,N[48]=C):C=N[48],C};function lS(e){return e.unifiedProduct.actions.setGameState}function lE(e){return e.unifiedProduct.actions.reset}var lI=n(48022),lw=n.n(lI),lT=n(1884);function lk(e){return e.user.parent?.id}function lM(e){return e.unifiedProduct.game.gameState}let lO=new Map,lA=e=>{let t=new Set;for(let n of e?.progress_bar.milestones??[])n.rive&&(t.add(n.rive.rive_url),t.add(n.rive.audio_url));return[...t]};function lL(e){return e.unifiedProduct.game.gameState}function lR(){(0,w.X8)("Loaded")}let lB=e=>{let t,n,a,s,r,i,l=(0,f.c)(10),{error:o,parent:c,student:d,userConfigs:u}=e,[_,m]=(0,k.useState)(!1);l[0]===Symbol.for("react.memo_cache_sentinel")?(t=new N.E,l[0]=t):t=l[0];let p=t;l[1]!==c||l[2]!==d||l[3]!==u?(n={isProduction:!0,parent:c,student:d,userConfigs:u},l[1]=c,l[2]=d,l[3]=u,l[4]=n):n=l[4];let v=n;if(l[5]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{m(!0)},s=[],l[5]=a,l[6]=s):(a=l[5],s=l[6]),(0,k.useEffect)(a,s),o)throw Error(JSON.stringify(o));return _?(l[7]===Symbol.for("react.memo_cache_sentinel")?(r=(0,g.jsxs)(P.Ht,{client:p,children:[(0,g.jsx)(l$,{}),(0,g.jsx)(S.E,{initialIsOpen:!1})]}),l[7]=r):r=l[7],l[8]!==v?(i=(0,g.jsx)(j.l,{initialState:v,storage:localStorage,children:r}),l[8]=v,l[9]=i):i=l[9],i):null},l$=()=>{let e,t,n,a,s,r,i,l=(0,f.c)(23),{error:o,gameState:c,isLoadingStudentContent:d,studentId:u}=(()=>{let e,t,n,a,s,r=(0,f.c)(14),i=(0,j.r8)(j.M7),{data:l,error:o,isLoading:c}=(0,O.lr)(),{data:d,error:u,isLoading:_}=(0,O.YL)(),{data:m}=(0,O.$s)(),p=(0,j.r8)(lL),v=(0,k.useRef)(p);(()=>{let e,t,n=(0,f.c)(14),{mutate:a}=(0,O.OJ)(),s=(0,k.useRef)(null),r=(0,k.useRef)(null),i=(0,k.useRef)(null),l=(0,k.useRef)(null),o=(0,k.useRef)(null),c=(0,k.useRef)(!0),d=(0,T.useRouter)(),u=(0,j.r8)(j.M7),_=(0,j.r8)(lk),m=(0,j.r8)(lM),{data:p}=(0,O.lr)();n[0]!==p?.subject_id||n[1]!==m||n[2]!==a||n[3]!==_||n[4]!==d.asPath||n[5]!==u?(e=()=>{let e=()=>{s.current&&(clearInterval(s.current),s.current=null)},t=()=>{r.current&&(clearTimeout(r.current),r.current=null)},n=()=>{i.current&&(clearTimeout(i.current),i.current=null)},v=()=>({page_path:d.asPath,parent_id:_,student_id:u}),h=a=>{a&&!c.current&&_&&(l.current=globalThis.Date.now(),o.current=a,(0,w.X8)("DailyUsageTracking_idle_started",{...v(),idle_reason:a})),c.current=!0,e(),t(),n()},b=()=>{i.current||(f(),i.current=globalThis.setTimeout(()=>{i.current=null},500))},x=()=>{if(lT.S||!_||c.current)return;let e={...(0,w.VK)(),parent_id:_,student_id:u};e.category=d.asPath.includes("view=play")?(0,C.Qm)({isNonLearning:m===y.jNk.SELECT_SUBJECT_LESSON||m===y.jNk.PREGAME_SEQUENCE||m===y.jNk.MAP,subjectId:p?.subject_id}):y.M56.GAMEPLAY_NONLEARNING,a(e)},g=()=>{t(),r.current=globalThis.setTimeout(()=>{h("inactivity_timeout")},6e5)},f=()=>{if(lT.S||!_)return;let e="function"!=typeof globalThis.document.hasFocus||globalThis.document.hasFocus();globalThis.document.hidden||!e?h(globalThis.document.hidden?"visibility_hidden":"blur"):(c.current&&(c.current=!1,l.current&&((0,w.X8)("DailyUsageTracking_idle_ended",{...v(),idle_duration_ms:globalThis.Date.now()-l.current,idle_reason:o.current}),l.current=null,o.current=null),x(),s.current=globalThis.setInterval(x,6e4)),g())},j=()=>{globalThis.document.hidden?h("visibility_hidden"):f()},N=()=>{h("blur")},P=()=>{h("pagehide")};return f(),globalThis.document.addEventListener("visibilitychange",j),globalThis.addEventListener("focus",f),globalThis.addEventListener("blur",N),globalThis.addEventListener("keydown",b),globalThis.addEventListener("pointerdown",b),globalThis.addEventListener("scroll",b,{passive:!0}),globalThis.addEventListener("pagehide",P),()=>{globalThis.document.removeEventListener("visibilitychange",j),globalThis.removeEventListener("focus",f),globalThis.removeEventListener("blur",N),globalThis.removeEventListener("keydown",b),globalThis.removeEventListener("pointerdown",b),globalThis.removeEventListener("scroll",b),globalThis.removeEventListener("pagehide",P),e(),t(),n(),c.current=!0}},n[0]=p?.subject_id,n[1]=m,n[2]=a,n[3]=_,n[4]=d.asPath,n[5]=u,n[6]=e):e=n[6],n[7]!==p||n[8]!==m||n[9]!==a||n[10]!==_||n[11]!==d.asPath||n[12]!==u?(t=[u,_,m,p,a,d.asPath],n[7]=p,n[8]=m,n[9]=a,n[10]=_,n[11]=d.asPath,n[12]=u,n[13]=t):t=n[13],(0,k.useEffect)(e,t)})(),r[0]===Symbol.for("react.memo_cache_sentinel")?(e=[],r[0]=e):e=r[0],(0,k.useEffect)(lR,e);let h=c||_||!l||!d,b=!h&&p===y.jNk.LEVEL&&l?.level_state==="practice";r[1]!==d||r[2]!==b?(t={enabled:b,levelConfig:d}
27,r[1]=d,r[2]=b,r[3]=t):t=r[3],(e=>{let t,n,a,s=(0,f.c)(7),{enabled:r,levelConfig:i}=e,l=(0,k.useRef)(null);s[0]!==i?(t=lA(i).sort((e,t)=>e.localeCompare(t)).join("|"),s[0]=i,s[1]=t):t=s[1];let o=t;s[2]!==r||s[3]!==i||s[4]!==o?(n=()=>{if(!r||!o||l.current===o)return;let e=!1,t=()=>{if(!e&&l.current!==o){let e;l.current=o,0!==(e=lA(i)).length&&Promise.allSettled(e.map(e=>(e=>{let t=lO.get(e);if(t)return t;let n=(async()=>{try{let t=await fetch(e);t.ok||ej.A.warn("[RiveMilestonePreload] Failed to preload asset",{responseStatus:t.status,url:e})}catch(t){ej.A.warn("[RiveMilestonePreload] Failed to preload asset",{error:t,url:e})}})();return lO.set(e,n),n})(e)))}};if("function"==typeof globalThis.requestIdleCallback){let n=globalThis.requestIdleCallback(t);return()=>{e=!0,"function"==typeof globalThis.cancelIdleCallback&&globalThis.cancelIdleCallback(n)}}let n=globalThis.setTimeout(t,300);return()=>{e=!0,globalThis.clearTimeout(n)}},a=[r,i,o],s[2]=r,s[3]=i,s[4]=o,s[5]=n,s[6]=a):(n=s[5],a=s[6]),(0,k.useEffect)(n,a)})(t);let{mutate:x}=(0,O.Bs)();r[4]!==p||r[5]!==x||r[6]!==m?(n=()=>{v?.current!==p&&(v.current=p,m||p!==y.jNk.LEVEL||x((0,C.vA)()))},a=[p,x,m],r[4]=p,r[5]=x,r[6]=m,r[7]=n,r[8]=a):(n=r[7],a=r[8]),(0,k.useEffect)(n,a);let g=o||u;return r[9]!==p||r[10]!==h||r[11]!==i||r[12]!==g?(s={error:g,gameState:p,isLoadingStudentContent:h,studentId:i},r[9]=p,r[10]=h,r[11]=i,r[12]=g,r[13]=s):s=r[13],s})(),_=(0,T.useRouter)();l[0]!==_.asPath?(e=_.asPath.includes("view=play"),l[0]=_.asPath,l[1]=e):e=l[1];let m=!e,p=(0,I.Q)();if(l[2]!==o?(t=()=>{o&&(0,w.X8)("Game Query Error",{error_message:o.message})},n=[o],l[2]=o,l[3]=t,l[4]=n):(t=l[3],n=l[4]),(0,k.useEffect)(t,n),o){let e,t=o?.message;return l[5]!==t?(e=(0,g.jsxs)("div",{children:["Error: ",t]}),l[5]=t,l[6]=e):e=l[6],e}if(m){let e;return l[7]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)(ls,{}),l[7]=e):e=l[7],e}if(d){let e;return l[8]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)(E.kt,{}),l[8]=e):e=l[8],e}switch(c){case y.jNk.LEVEL:{let e;l[9]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)(r2,{}),l[9]=e):e=l[9],a=e;break}case y.jNk.MAP:{let e;l[10]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)(iL,{}),l[10]=e):e=l[10],a=e;break}case y.jNk.PREGAME_SEQUENCE:{let e;l[11]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)(i4,{}),l[11]=e):e=l[11],a=e;break}case y.jNk.SELECT_SUBJECT_LESSON:{let e;l[12]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)(lP,{}),l[12]=e):e=l[12],a=e;break}default:{let e;l[13]!==c?(e=(0,C.Oc)(c),l[13]=c,l[14]=e):e=l[14],a=e}}let v=a;l[15]===Symbol.for("react.memo_cache_sentinel")?(s=(0,g.jsx)(M,{}),l[15]=s):s=l[15];let h=u??"no-student";return l[16]!==p||l[17]!==m?(r=p&&!m?(0,g.jsx)("div",{className:lw().debugPanel,children:(0,g.jsx)(es,{})}):null,l[16]=p,l[17]=m,l[18]=r):r=l[18],l[19]!==v||l[20]!==h||l[21]!==r?(i=(0,g.jsxs)(k.Fragment,{children:[s,(0,g.jsx)("div",{className:lw().container,children:(0,g.jsxs)(k.Fragment,{children:[v,r]},h)})]}),l[19]=v,l[20]=h,l[21]=r,l[22]=i):i=l[22],i};var lD=!0;let lG=({error:e,parent:t,student:n,userConfigs:a})=>(0,g.jsx)(lB,{error:e,parent:t,student:n,userConfigs:a})},77962:e=>{e.exports={container:"SecondaryCTA_container___2QG2"}},79103:e=>{e.exports={container:"VideoProblem_container__SwkIg",answerInputContainer:"VideoProblem_answerInputContainer__Y_s3m",opaque:"VideoProblem_opaque__65MMU",answerInput:"VideoProblem_answerInput__n8pMX",choiceAnswerText:"VideoProblem_choiceAnswerText__vi8Nx",choiceAnswerImg:"VideoProblem_choiceAnswerImg__fLrUM",replayButton:"VideoProblem_replayButton__yHtYX",displayNone:"VideoProblem_displayNone__6DiFc"}},82168:e=>{e.exports={modal:"ExitModal_modal__I4hd_",title:"ExitModal_title__2mGDO",subtitle:"ExitModal_subtitle__ncyhL",primaryButton:"ExitModal_primaryButton__qw0WT",primaryButtonText:"ExitModal_primaryButtonText__pvm87",secondaryButton:"ExitModal_secondaryButton__Pu3In",secondaryButtonText:"ExitModal_secondaryButtonText__QEfCR",closeButton:"ExitModal_closeButton__cQN3E"}},82820:e=>{e.exports={outerGrid:"ExplanationOverlay_outerGrid__73X5W",centerColumn:"ExplanationOverlay_centerColumn__uYZi_",learningContentContainer:"ExplanationOverlay_learningContentContainer__axJJ8",displayNone:"ExplanationOverlay_displayNone__5Kmyt",rightColumn:"ExplanationOverlay_rightColumn__2Evl2",ctasContainer:"ExplanationOverlay_ctasContainer__tJOr7"}},83656:e=>{e.exports={container:"BaseProgressBar_container__7Ks8y",opaque:"BaseProgressBar_opaque__pAm84",currentProgressOverlay:"BaseProgressBar_currentProgressOverlay__h3Uyc",currentProgressOverlayInner:"BaseProgressBar_currentProgressOverlayInner__69hc5",milestoneIcon:"BaseProgressBar_milestoneIcon__k2pw_",innerMilestone:"BaseProgressBar_innerMilestone__MWrIb",filledMilestone:"BaseProgressBar_filledMilestone__s_6E6",maxProgressIcon:"BaseProgressBar_maxProgressIcon___qrKX",quizIcon:"BaseProgressBar_quizIcon__bNW_x",progressTrack:"BaseProgressBar_progressTrack__A3VUb",monster:"BaseProgressBar_monster__2rBLZ",smoothTransition:"BaseProgressBar_smoothTransition__mNbg0"}},83714:e=>{e.exports={studentMonster:"LeftMonster_studentMonster__AIUcU",studentMonsterIn:"LeftMonster_studentMonsterIn__Mj7SR"}},83778:e=>{e.exports={studentPetCustomPart:"StudentPet_studentPetCustomPart__N69Nk",studentPetCustomPartBehind:"StudentPet_studentPetCustomPartBehind__t337I",studentPetRive:"StudentPet_studentPetRive__5CoAx"}}
27,84643:(e,t,n)=>{"use strict";n.d(t,{S:()=>s});var a=n(55729);function s(e){let t=(0,a.useRef)(null);return(0,a.useEffect)(()=>{t.current=e},[e]),t.current}},85055:e=>{e.exports={learnOverlayButton:"LearnOverlayButton_learnOverlayButton__8YQhp",learnIcon:"LearnOverlayButton_learnIcon__ilyKs"}},85681:e=>{e.exports={containerWardrobeOuterPadding:"PanelOutfitsRoom_containerWardrobeOuterPadding__0fogP",wardrobe:"PanelOutfitsRoom_wardrobe__f65ZS",wardrobeBox:"PanelOutfitsRoom_wardrobeBox__YraJ8",wardrobeBoxLeft:"PanelOutfitsRoom_wardrobeBoxLeft__l2g__",wardrobeBoxLeftActive:"PanelOutfitsRoom_wardrobeBoxLeftActive__gSRwJ",wardrobeBoxLeftInactive:"PanelOutfitsRoom_wardrobeBoxLeftInactive__7DzdW",wardrobeBoxRight:"PanelOutfitsRoom_wardrobeBoxRight__uiV3h",wardrobeBoxRightActive:"PanelOutfitsRoom_wardrobeBoxRightActive__tCudS",wardrobeBoxRightInactive:"PanelOutfitsRoom_wardrobeBoxRightInactive__YrKO6",showItem:"PanelOutfitsRoom_showItem__Sk9ow",showItemImg:"PanelOutfitsRoom_showItemImg__Ts4yj"}},87029:e=>{e.exports={problem:"TextProblem_problem__ZiZT2",showProblem:"TextProblem_showProblem__vhM0X",pretestText:"TextProblem_pretestText__XcrhA",problemWrapper:"TextProblem_problemWrapper__G7PxW",problemAudioWrapper:"TextProblem_problemAudioWrapper__pFO3q",explanationText:"TextProblem_explanationText__japue",problemText:"TextProblem_problemText__HZyWr",answerWrapper:"TextProblem_answerWrapper__qFwO2",tooltip:"TextProblem_tooltip__lDPQB",audioButtonWrapper:"TextProblem_audioButtonWrapper__NS_Cq"}},88727:e=>{e.exports={container:"Tile_container__OhZyK",active:"Tile_active__WIO4r",image:"Tile_image__aTcT_",rectangle:"Tile_rectangle__7Q1GA"}},90739:e=>{e.exports={container:"IncorrectAnswerContainer_container__nKwIu",incorrectContainer:"IncorrectAnswerContainer_incorrectContainer__2N7uH",opaque:"IncorrectAnswerContainer_opaque__nwjC6",answerBox:"IncorrectAnswerContainer_answerBox__7KyBp",centered:"IncorrectAnswerContainer_centered__Be8lq",glyph:"IncorrectAnswerContainer_glyph__bb5V4",answerContent:"IncorrectAnswerContainer_answerContent__QE1JI"}},91432:e=>{e.exports={container:"Level_container__nbSzF",studentMonster:"Level_studentMonster__iNVRT",animateOut:"Level_animateOut__4alFO",staticBackgroundImage:"Level_staticBackgroundImage__JpylY",leftMiddle:"Level_leftMiddle__KGU95",milestoneOverlay:"Level_milestoneOverlay__eHY6H",uiDisabled:"Level_uiDisabled__u0aGJ",gemScoreboardContainer:"Level_gemScoreboardContainer__0RLLD",gemPortalTarget:"Level_gemPortalTarget__zsj4b"}},93207:e=>{e.exports={bookPageImg:"ReadingBookPage_bookPageImg__KG5bn",leftPage:"ReadingBookPage_leftPage__yD0Yh",rightPage:"ReadingBookPage_rightPage__U45D_",hasOpacity:"ReadingBookPage_hasOpacity__bEC6z",twoPageContainer:"ReadingBookPage_twoPageContainer__vIH72",bookPageImgContainer:"ReadingBookPage_bookPageImgContainer__u_UOo",textBook:"ReadingBookPage_textBook__cIioA"}},94668:e=>{e.exports={controlPanel:"DebugPanel_controlPanel__hmqVH",controlGroup:"DebugPanel_controlGroup__6aJUl",controlGroupLabel:"DebugPanel_controlGroupLabel__4aIGP",controlPanelHidden:"DebugPanel_controlPanelHidden__mgPuk",selected:"DebugPanel_selected__bi8KQ",levelInputContainer:"DebugPanel_levelInputContainer__v6xun",statsGroup:"DebugPanel_statsGroup___dh2a",statsGroupItem:"DebugPanel_statsGroupItem__tbbvD",levelStateButtons:"DebugPanel_levelStateButtons__jcLDJ",forceQuestionControls:"DebugPanel_forceQuestionControls__5KkRE",forceQuestionInputs:"DebugPanel_forceQuestionInputs__Icfwi",forceQuestionButtons:"DebugPanel_forceQuestionButtons__NquzT",forceQuestionSelect:"DebugPanel_forceQuestionSelect__ENrwi",forceQuestionInput:"DebugPanel_forceQuestionInput__zhfII",forceQuestionActionButton:"DebugPanel_forceQuestionActionButton__1r7kM"}},95460:e=>{e.exports={container:"TimeLimitExtendModal_container__XzTWT",modal:"TimeLimitExtendModal_modal__8Jg9b",headerRow:"TimeLimitExtendModal_headerRow__ZstqJ",closeButton:"TimeLimitExtendModal_closeButton___K_88",titlePanel:"TimeLimitExtendModal_titlePanel__k_GFC",title:"TimeLimitExtendModal_title__pkfmV",contentPanel:"TimeLimitExtendModal_contentPanel__ReMjb",description:"TimeLimitExtendModal_description__IizKq",controls:"TimeLimitExtendModal_controls__RyNd8",dropdownWrapper:"TimeLimitExtendModal_dropdownWrapper__tfmsk",dropdown:"TimeLimitExtendModal_dropdown__kdnsD",dropdownValue:"TimeLimitExtendModal_dropdownValue__cgq3F",dropdownIcon:"TimeLimitExtendModal_dropdownIcon__yoLjh",dropdownChevron:"TimeLimitExtendModal_dropdownChevron__Jvzbj",dropdownMenuContainer:"TimeLimitExtendModal_dropdownMenuContainer__khDgh",dropdownMenu:"TimeLimitExtendModal_dropdownMenu__VLlKS",dropdownOption:"TimeLimitExtendModal_dropdownOption__piflW",dropdownOptionSelected:"TimeLimitExtendModal_dropdownOptionSelected__aa9EL",checkboxRow:"TimeLimitExtendModal_checkboxRow__To1Yw",checkbox:"TimeLimitExtendModal_checkbox__hIJ4k",checkboxChecked:"TimeLimitExtendModal_checkboxChecked__sZRGN",checkboxCheckmark:"TimeLimitExtendModal_checkboxCheckmark__ZZfvz",checkboxLabel:"TimeLimitExtendModal_checkboxLabel__YBwEX",footerPanel:"TimeLimitExtendModal_footerPanel__eUyPm",ctaButton:"TimeLimitExtendModal_ctaButton__tBwWC"}},96144:e=>{e.exports={container:"CTAs_container__JGGAT",secondaryCTA:"CTAs_secondaryCTA__WENih"}},96956:e=>{e.exports={outerGrid:"MonsterMakerModal_outerGrid__DB2yP",leftColumn:"MonsterMakerModal_leftColumn__RKBTi",rightColumn:"MonsterMakerModal_rightColumn__HuqF_",centerColumn:"MonsterMakerModal_centerColumn__mytSW",loading:"MonsterMakerModal_loading__HF0eR",error:"MonsterMakerModal_error__Ygzbt",content:"MonsterMakerModal_content__QFcKc",tiles:"MonsterMakerModal_tiles__VKYiW",actions:"MonsterMakerModal_actions__wDKJb",doneButton:"MonsterMakerModal_doneButton__s_dUB"}},98099:e=>{e.exports={wrapper:"IncentivesButton_wrapper__CLkD_",unselected:"IncentivesButton_unselected__r5jbi",selected:"IncentivesButton_selected__kk_jf",locked:"IncentivesButton_locked__ReZvH",store:"IncentivesButton_store__U0ryB",outfitRoom:"IncentivesButton_outfitRoom__8AtlW",hidden:"IncentivesButton_hidden__LtjQW"}},98785:e=>{e.exports={container:"SelectableImageAnswer_container___VJJ3"}}},e=>{e.O(0,[3771,6343,194,9683,7586,3452,3484,7749,8286,9594,7034,5280,6751,6451,4731,7526,220,9883,9430,1664,8618,1529,2831,3479,2454,6593,636,8792],()=>e(e.s=74578)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.