@ihabdevteam/core 0.357.0 → 0.358.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/components.cjs.js +1 -1
- package/dist/hooks.cjs.js +1 -1
- package/dist/i18n.cjs.js +1 -1
- package/dist/ihabdevteam-core.cjs.js +1 -1
- package/dist/ihabdevteam-core.d.ts +19 -4
- package/dist/packages/core/src/utils/smsBytes.d.ts +18 -3
- package/dist/packages/core/src/utils/smsBytes.js +18 -3
- package/dist/packages/core/src/version.d.ts +1 -1
- package/dist/packages/core/src/version.js +1 -1
- package/dist/utils.cjs.js +1 -1
- package/package.json +1 -1
package/dist/hooks.cjs.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
\uC2E0\uB8B0\uB97C \uC313\uACE0
|
|
3
3
|
\uD68C\uBCF5\uC744 \uB3D5\uC2B5\uB2C8\uB2E4.`,site:{title:"\uC0AC\uC774\uD2B8",malgwi:"\uB9D0\uADC0",soundDirection:"\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C",vrSoundDirection:"VR\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C",hearingTest:"\uCCAD\uB825\uD14C\uC2A4\uD2B8 \uD504\uB85C"},sns:{title:"SNS",naverBlog:"\uB124\uC774\uBC84 \uBE14\uB85C\uADF8"},policy:{title:"\uC815\uCC45",terms:"\uC774\uC6A9\uC57D\uAD00",privacy:"\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68"},ceo:"\uB300\uD45C",address:"\uC8FC\uC18C",bizNo:"\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638",support:"\uACE0\uAC1D\uC13C\uD130",ceoName:"\uD55C\uC9C0\uD61C",addressValue:"\uAC15\uC6D0\uB3C4 \uCD98\uCC9C\uC2DC \uC2DC\uCCAD\uAE38 32 \uD574\uCC2C\uBE4C\uB529 3\uCE35 302\uD638",bizNoValue:"526-81-02926"},Ul={timeHM:"{{h}}\uC2DC {{m}}\uBD84",timeH:"{{h}}\uC2DC"},zl={phaseWordDownload:"\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC",phaseImageCheck:"\uC774\uBBF8\uC9C0 \uD655\uC778",phasePairAnalysis:"\uB2E8\uC5B4\uC30D \uBD84\uC11D",downloadingCount:"{{n}}\uAC1C \uB2E4\uC6B4\uB85C\uB4DC \uC911",checkingPage:"{{page}}\uD398\uC774\uC9C0 \uBAA9\uB85D \uD655\uC778 \uC911",imageCount:"{{done}} / {{total}}\uAC1C"},Kl={clearAriaLabel:"\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"},ql={ariaLabel:"\uC120\uD0DD \uD0ED"},Jl={ariaLabel:"\uD0ED"},Xl={dragPrompt:"\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC",browseButton:"\uD30C\uC77C \uC120\uD0DD",removeAriaLabel:"{{name}} \uC81C\uAC70"},Ql={ariaLabel:"\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0"},Zl={relativeDay:{today:"\uC624\uB298",yesterday:"\uC5B4\uC81C",daysAgo:"{{n}}\uC77C \uC804"}},ei={weekly:{title:"\uC8FC\uAC04 \uD6C8\uB828 \uD604\uD669",daily:"\uC624\uB298\uC758 \uB4E3\uAE30"},homework:{title:"\uC219\uC81C \uC9C4\uD589\uD604\uD669",totalRate:"\uC804\uCCB4 \uC644\uB8CC\uC728",done:"\uC644\uB8CC"},today:{tooltipTotal:"\uC804\uCCB4",tooltipDone:"\uC644\uB8CC"},visit:{title:"\uBC29\uBB38 \uC5F0\uB3D9 \uAE30\uB85D"},detail:"\uC0C1\uC138\uBCF4\uAE30",detailFor:"{{name}} \uC0C1\uC138\uBCF4\uAE30"},ti={time:{justNow:"\uBC29\uAE08 \uC804",minutesAgo:"{{n}}\uBD84 \uC804",hoursAgo:"{{n}}\uC2DC\uAC04 \uC804",daysAgo:"{{n}}\uC77C \uC804",weeksAgo:"{{n}}\uC8FC \uC804",monthsAgo:"{{n}}\uAC1C\uC6D4 \uC804",yearsAgo:"{{n}}\uB144 \uC804"}},ni={steps:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"},oi={skippedOnly:"\uC61B \uAE30\uB85D {{n}}\uAC74\uC740 \uBB34\uC5C7\uC744 \uD47C \uAC83\uC778\uC9C0 \uC548 \uB0A8\uC544 \uC788\uC5B4 \uC148\uC5D0\uC11C \uBE90\uC2B5\uB2C8\uB2E4.",runs:"{{count}}\uD310"},ri={resetColumns:"\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654",scrollRegion:"\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C",rowActionHint:"\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4"},ui={viewWords:"\uB0B1\uB9D0"},ai={ariaLabel:"\uBC30\uB108",dotAriaLabel:"{{count}}\uAC1C \uC911 {{index}}\uBC88\uC9F8 \uBC30\uB108"},li={chooseDate:"\uB0A0\uC9DC \uC120\uD0DD",selectYear:"\uC5F0 \uC120\uD0DD",selectMonth:"\uC6D4 \uC120\uD0DD"},ii={previewRegion:"\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30 \u2014 \uC88C\uC6B0\uB85C \uAD74\uB824 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"},si={description:"\uC124\uBA85",textbox:"\uBCF8\uBB38",training:"\uD6C8\uB828 \uC548\uB0B4",menu:"\uBA54\uB274"},ci={place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"}},di={clearSelection:"\uC120\uD0DD \uD574\uC81C"},fi={showResult:"{{type}} \uACB0\uACFC\uBCF4\uAE30"},pi={selected:"\uC120\uD0DD\uB428",remove:"\uC81C\uAC70",exclude:"\uC81C\uC678",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"},Ci={loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"},mi={state:{active:"\uC18C\uB9AC \uB098\uB294 \uC911",played:"\uB4E4\uC74C",correct:"\uC815\uB2F5",wrong:"\uC624\uB2F5"}},gi={ariaLabel:"\uC774\uB3D9 \uACBD\uB85C"},hi={empty:"\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},yi={main:"\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8",soft:"\uC18C\uD504\uD2B8",sub:"\uC11C\uBE0C \uCEEC\uB7EC",deep:"\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8",softSub:"\uC18C\uD504\uD2B8 \uC11C\uBE0C",warm:"\uC6DC(\uAC15\uC870)",dark:"\uB2E4\uD06C",radial:"\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8",diagonal:"\uB300\uAC01\uC120 \uD328\uD134",dots:"\uB3C4\uD2B8 \uD328\uD134",outline:"\uC544\uC6C3\uB77C\uC778",success:"\uC131\uACF5/\uC644\uB8CC",naver:"\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4",instagram:"\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4"},Si={common:yl,calendar:Sl,passCard:bl,rating:wl,colorPicker:El,dropdown:Al,accordion:_l,header:Tl,nav:Dl,settings:Nl,usage:Ol,account:vl,training:Bl,customers:Ll,payment:Rl,coupons:Ml,visits:Il,trainingType:Pl,myWordTable:kl,keyWords:xl,wordTable:Fl,wordSearch:jl,wordPrint:Hl,topic:$l,device:Gl,manager:Wl,wordPairs:Vl,footer:Yl,date:Ul,wordData:zl,textField:Kl,segmentedControl:ql,tabs:Jl,fileUpload:Xl,avatar:Ql,myHomework:Zl,trainingStatus:ei,store:ti,progress:ni,trainingMiss:oi,table:ri,wordScore:ui,topBanner:ai,datePicker:li,report:ii,tooltip:si,phonemeProfile:ci,bulkBar:di,debug:fi,badge:pi,loader:Ci,soundCompass:mi,breadcrumb:gi,board:hi,promoBannerBg:yi},bi={statusFilter:"Filter by status",pageSizeSelect:"Items per page",selectedCount_one:"{{count}} selected",selectedCount_other:"{{count}} selected",moreFor:"More options for {{name}}",collapseFor:"Collapse {{name}}",expandFor:"Expand {{name}}",sortFor:"Sort {{name}}",cancel:"Cancel",info:"Info",errorState:{message:"Couldn't load this.",retry:"Try again"},save:"Save",confirm:"Confirm",discardConfirm:{title:"Discard your changes?",body:"If you do not save, everything you have entered will be lost.",confirm:"Discard"},close:"Close",back:"Back",emptyTrainingName:"Training name is empty.",remove:"Remove",image:"Image",delete:"Delete",reset:"Reset",update:"Update",download:"Download",likeCount_one:"{{count}} like",likeCount_other:"{{count}} likes",selectedOfMax:"{{count}} of {{max}}",downloadCount_one:"{{count}} download",downloadCount_other:"{{count}} downloads",descriptionFor:"About {{name}}",search:"Search",empty:"No data.",yes:"Yes",no:"No",all:"All",none:"None",days_one:"{{count}} day",days_other:"{{count}} days",loadMore:"Load More",retry:"Try Again",prevPage:"Previous page",nextPage:"Next page",play:"Play",playFor:"Play {{name}}",pauseFor:"Pause {{name}}",pause:"Pause",playPause:"Play / Pause",replay:"Replay",subscription:"Subscription",done:"Done",failed:"Failed",continue:"Continue",notification:"Notice",emptyList:"No items",noMatches:"No matching items",menu:"Menu",resetSelection:"Reset Selection",pageSizeLabel:"Show {{n}}",totalCountPrefix:"Total: ",totalCountSuffix:"",expand:"Expand",collapse:"Collapse",popup:"Popup",more:"More",codeBlock:"Code block",totalPrefix:"",copyCode:"Copy code",copied:"Copied",col:{problem:"Question"},phonetics:{place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"},vowel:{frontHigh:"Front high vowel",backHighUnrounded:"Back high unrounded vowel",backHighRounded:"Back high rounded vowel",frontMid:"Front mid vowel",backMidUnrounded:"Back mid unrounded vowel",backMidRounded:"Back mid rounded vowel",low:"Low vowel"},glide:{j:"j-glide",w:"w-glide",velar:"\u0270-glide"}},unknownError:"Unknown error",networkError:"The network connection is unstable. Check your connection and try again."},wi={rangeSelect:"Select period",dow:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekLabel:"Week {{ord}}",prevMonth:"Previous month",addOnDate:"Add a visit on {{date}}",nextMonth:"Next month",prevWeek:"Previous week",nextWeek:"Next week",legend:{visited:"Visited",scheduled:"Scheduled",noVisit:"No Show"},periodSelect:"Period unit",visitCount_one:"{{count}} visit",visitCount_other:"{{count}} visits",statusCount:"{{count}} {{label}}",weekOrdinal:["1","2","3","4","5","6","7"]},Ei={planSuffix:"Plan",labeledPlan:"{{label}} Plan",couponCode:"Pass Code",specialLabel:"Open Special",unitDay:"d",unitYear:"yr",remainingDay:"{{n}}d left",remainingHour:"{{n}}h left",remainingMinute:"{{n}}m left",remainingSecond:"{{n}}s left",expired:"Expired",menu:{use:"Activate",refund:"Refund",delete:"Delete"}},Ai={starLabel:"Select star {{n}}",valueLabel:"{{value}} out of {{max}}",groupLabel:"Rating"},_i={selected:"selected"},Ti={placeholder:"Select"},Di={collapse:"Collapse",expand:"Expand"},Ni={biArea:"BI area",biSymbol:"BI symbol",logoMalgwi:"Malgwi logo",logoManager:"Malgwi Manager logo",menuOpen:"Open menu",utilMenu:"Utility menu",menuClose:"Close menu"},Oi={mainMenu:"Main menu",bottomNav:"Bottom navigation",goToManager:"Go to Malgwi Manager",goToMalgwi:"Go to Malgwi",modeLabelManager:"Malgwi Manager",modeLabelMalgwi:"Malgwi",training:"Training",settings:"Settings",notifications:"Notifications",account:"Account",help:"Help",feedback:"Report a bug",debug:"Debug",coupons:"Coupons",topic:"By Topic",trainingType:"By Training Type",wordPairs:"Word Pairs",wordSearch:"Word Search",wordTable:"Word Table Creator",company:"Company Info",more:"More",moreMenu:"More menu",badgeLabel:"{{label}}, {{count}}",badgeInsideLabel_one:"{{label}}, {{count}} notification inside",badgeInsideLabel_other:"{{label}}, {{count}} notifications inside"},vi={cache:{cleared:"Cache cleared successfully.",group:{wordData:{label:"Word Data",sub:"Word list and version info"},pairIndex:{label:"Pair Index",sub:"Onset\xB7vowel\xB7coda minimal pair analysis cache"},imageCache:{label:"Image Cache",sub:"Word image existence check results"}}}},Bi={couponButton:"Enter Coupon"},Li={security:{password:{currentRequired:"Enter your current password.",newRequired:"Enter a new password.",mismatch:"The new passwords do not match.",changed:"Your password has been changed."}}},Ri={settings:"Settings",filter:{random:"Random",trainOnset:"Onset",trainVowel:"Vowel",trainCoda:"Coda",phonemeGroup:"Training phonemes",noLimit:"Any",codaExclude:"Exclude",gradeLabel:"Grade",excludeImageInfo:"Only words with images: keeps only results with a registered word image.",sameStructureInfo:"Only same phoneme structure: keeps only pairs where the correct and wrong answers share the same syllable structure (length, batchim, etc.).",selectSection:"Select",excludeImage:"Only words with images",sameStructure:"Only same phoneme structure"},noQuestions:"No questions available.",countQuestions_one:"{{n}} question",countQuestions_other:"{{n}} questions",countSentences_one:"{{n}} sentence",countSentences_other:"{{n}} sentences",nextQuestion:"Next",noiseRatioTitle:"Noise Ratio",noiseRatioValue:"{{ratio}}\xD7",noiseTypeTitle:"Noise Type",playVolumeTitle:"Volume",playSpeedTitle:"Speed",meter:{sentence:"Playback",noise:"Noise",toggle:"Show Audio Meter"},viewResult:"View Results",problemNotice:"Problem {{n}}.",trainingSettingsTitle:"Training Settings",sentencePreview:"Sentence Preview",notHeard:"Didn't hear it.",heardWell:"Heard it well.",confirmTitle:"Check the sentence and select whether you heard it.",noSoundWaveform:"Waveform is not shown for sound-comparison questions.",noise:{level:{none:"None",weak:"Weak",medium:"Medium",strong:"Strong",veryStrong:"Very Strong"},type:{none:"None",default:"Default",street:"Street",buzz:"Buzzing",restaurant:"Restaurant"}},listenTitle:"Please listen to the sentence.",listenButton:"Listen",playSound:"Play Sound",playAll:"Play All",selectInOrder:"Select the cards in the order you heard.",stop:"Stop",preview:"Preview",previewFor:"Preview {{name}}",stopFor:"Stop {{name}}",next:"Next",completed:"Completed",selected:"Selected",nthSelected:"Selection {{n}}",fontSizeMin:"Font size is at the minimum.",fontSizeMax:"Font size is at the maximum.",fontSizeDecrease:"Decrease font size",fontSizeIncrease:"Increase font size",toggleBackground:"Toggle background",cardInstructions:"Look at the word card, listen to the sound, and check it.",noCards:"No cards.",audioFetchError:"Failed to load the sound source.",ttsUnavailable:"Speech playback isn't available on this device.",selectConfirm:"Look at the question and select the answer.",orderListDefault:"Arrange the sentences in the order you heard.",result:{pendingDone:"Results are still being calculated, so you can't finish yet.",eyebrow:"Training Complete",title:"You've finished all the training!",scoreAria:"{{correct}} / {{total}} questions",elapsed:"Time Elapsed",tableAriaLabel:"Per-question judgement",colJudge:"Judgement",colAnswerSelected:"Answer \xB7 Selected",colAnswer:"Answer",colSelected:"Selected",heardWell:"Heard well",notHeard:"Didn't hear",notJudged:"Not judged",replay:"Replay",replaySound:"Replay item {{no}}",replaySoundStop:"Stop item {{no}}",done:"Done",noContent:"(No content)"},up:"Move up",down:"Move down",prev:"Previous",listenLabel:"Listen",sourcePlay:"Play source {{n}}",listen:"Listen",audioStatus:{synthesizing:"Preparing the sound\u2026",preparing:"Preparing sound\u2026"}},Mi={totalCount:" customers",loadError:"Failed to load list",device:{title:"Hearing Devices",addButton:"Add device",historyEmpty:"No device history registered",wearing:" in use",notRegistered:"Not registered",unit:"",wearingNow:"In use",wear:"Wear",unwear:"Remove",wornSince:"Since {{date}}",historyTitle:"Hearing device history"},schedule:{registerTitle:" Register Schedule"},visitHistory:{empty:"No visit history yet",popupTitle:" Visit History",registerTitle:" Register Visit"},moreItems:"more",viewAll:"View All",duration:{minSec:"{{m}}m {{s}}s",min:"{{m}}m",sec:"{{s}}s"}},Ii={plan:{recommendedFor:"Recommended for",features:"Key Features",freePrice:"Free",contact:"Contact Us",tierFallback:"Plan",openPromo:"Launch offer"},products:{mgrEnterprise:{tier:{price:"Contact us"}}}},Pi={input:{label:"Coupon code",placeholder:"Enter coupon code"},applyButton:"Apply"},ki={showN:"Show {{n}}"},xi={title:"Training by Type",subtitle:"Select the training type you want",listenInNoise:{title:"Sentence Listening in Noise",desc:"Train sentence comprehension in various noise environments."},shortStory:{title:"Short Story Listening",desc:"Listen to short stories and understand the content."},longStory:{title:"Long Story Listening",desc:"Focus on listening to long stories and grasp the content."},orderingSentence:{title:"Sentence Ordering",desc:"Arrange heard sentences in the correct order."},SAME_SOUND_PICK:{label:"Listen & Pick Same Sound",sub:"Pick the word card that matches what you heard."},SAME_OR_DIFF:{label:"Same or Different?",sub:"Decide whether the two sounds are the same or different."},HEAR_AND_PICK_SAME:{label:"Hear & Match Word",sub:"Pick the word card that matches the sound you heard."},HEAR_AND_PICK_INCLUDED:{label:"Find Word Containing Sound",sub:"Pick the word card that contains the syllable you heard."},STARTS_WITH_SAME_SOUND:{label:"Find Word Starting with Same Sound",sub:"Pick a word that starts with the same sound as what you heard."},LISTEN_AND_REMEMBER_ORDER:{label:"Listen & Recall Order",sub:"Select the cards in the order you heard the three words."},MERGE_2_SYLLABLES:{label:"Combine 2 Syllables",sub:"What word do two syllables make?"},MERGE_3_SYLLABLES:{label:"Combine 3 Syllables",sub:"What word do three syllables make?"},MERGE_2_PHONEMES:{label:"Combine 2 Phonemes",sub:"What sound do two phonemes make?"},MERGE_3_PHONEMES:{label:"Combine 3 Phonemes",sub:"What sound do three phonemes make?"},DROP_1_FROM_2SYLL:{label:"Drop 1 Syllable from 2-Syllable",sub:"What sound remains when you remove a syllable from a 2-syllable word?"},DROP_1_FROM_3SYLL:{label:"Drop 1 Syllable from 3-Syllable",sub:"What sound remains when you remove a syllable from a 3-syllable word?"},DROP_PART_FROM_COMPOUND:{label:"Drop Part of Compound Word",sub:"What word remains when you remove part of a compound word?"},DROP_FINAL_CONSONANT_FROM_1SYLL:{label:"Drop Final Consonant",sub:"What sound remains when you remove the final consonant?"},REMOVE_CONSONANT_AND_IDENTIFY_PHONEME:{label:"Drop Consonant",sub:"What sound remains when you remove the consonant?"},CHANGE_1_SYLL_IN_2SYLL:{label:"Change 1 Syllable (2-Syllable)",sub:"Change one syllable in a 2-syllable word to make a new word."},CHANGE_1_SYLL_IN_3SYLL:{label:"Change 1 Syllable (3-Syllable)",sub:"Change one syllable in a 3-syllable word to make a new word."},CHANGE_1_PHONEME_IN_1SYLL:{label:"Change 1 Phoneme (1-Syllable)",sub:"Change one phoneme in a 1-syllable word to make a new sound."},CHANGE_1_PHONEME_IN_2SYLL:{label:"Change 1 Phoneme (2-Syllable)",sub:"Change one phoneme in a 2-syllable word to make a new word."}},Fi={newBadge:"Newly created",publishedBadge:"Published",sharedBadge:"Shared"},ji={title:"Key Words",empty:"No key words available."},Hi={defaultName:"Word Table",title:"Word Table Builder",subtitle:"Set columns and add words to build a table.",filterTitle:"Table Settings",filter:{composition:"Composition",image:"Image",word:"Word",standardPron:"Standard Pronunciation",colloquialPron:"Colloquial Pronunciation",paperOrientation:"Paper Orientation",landscape:"Landscape",portrait:"Portrait",columns:"Columns",column:"{{count}} col",itemsPerPageWord:"Words per page",itemsPerPagePair:"Pairs per page",itemsPerPageOption:"{{count}}",pageIndicator:"{{current}} / {{total}}",pageNumber:"Page Number",pageNumberLeft:"Left",pageNumberCenter:"Center",pageNumberRight:"Right",border:"Border",topInfo:"Header",bottomInfo:"Footer",cutLine:"Cut Line",show:"Show",hide:"Hide",dotted:"Dotted",corner:"Corner"},addWord:"Add",wordInfo:"Info for {{word}}",emptyItems:"Please add at least one word.",load:"Load",openNewWindow:"Open in New Window",saveButton:"Save",saveAsNewButton:"Save as New",print:"Print",popupBlocked:"Popup was blocked. Please allow popups in your browser settings.",printFileNameSingle:"Word Table",printFileNamePair:"Contrast Pair Table",save:{title:"Save Word Table",nameLabel:"Name",desc:"Enter a name for the word table.",placeholder:"Enter a title for this word table.",descriptionLabel:"Description",descriptionPlaceholder:"Enter a description for this word table.",duplicateName:"This name is already in use.",nameRequired:"Please enter a table name.",autoFillHint:" (Press Tab or Space to autofill)",copyName:"{{name}} (copy)"},loadTable:{title:"Load Saved Word Table",empty:"No saved word tables.",loadButton:"Load",itemCount_one:"{{count}} word",itemCount_other:"{{count}} words",deleteAriaLabel:"Delete {{name}}",viewLabel:"View as",sortLabel:"Sort by",sort:{newest:"Newest",oldest:"Oldest",name:"Name",count:"Word Count"},view:{grid:"Grid View",list:"List View"}},publisherFilter:"Show only tables by {{name}}",groupDeleteMessage:"Word tables in this group will be moved to 'No Group'.",groupNamePlaceholder:"Group name",scoring:{o:"{{word}} correct",triangle:"{{word}} partial",x:"{{word}} incorrect",markName:{o:"Correct",triangle:"Partial",x:"Incorrect"},button:"Score",pickTitle:"Who are you scoring?",pickSubtitle:"Choose the customer who trained with \u201C{{name}}\u201D.",pickSearch:"Search by name or phone",pickEmpty:"No customers registered.",pickNoMatch:"No matching customer.",pickAgain:"Choose another",scoringFor:"Scoring {{name}}",none:"Tap \u25CB \xB7 \u25B3 \xB7 \u2715 under a cell to mark it. With a mouse they appear when you hover the cell; with a keyboard, when focus reaches it.",tally:"{{marked}} scored \xB7 \u25CB {{o}} \xB7 \u25B3 {{triangle}} \xB7 \u2715 {{x}} \xB7 {{rate}}%",save:"Save score",saved_one:"Saved {{count}} mark for {{name}}.",saved_other:"Saved {{count}} marks for {{name}}.",reviewTitle:"Create a review table?",reviewMessage_one:"Builds a new table from the {{count}} cell {{name}} got wrong or partial. Correct ones are left out.",reviewMessage_other:"Builds a new table from the {{count}} cells {{name}} got wrong or partial. Correct ones are left out.",reviewConfirm:"Create review table",reviewDescription:"Cells marked wrong or partial in \u201C{{name}}\u201D \u2014 {{count}} of them.",reviewCreated_one:"Created \u201C{{name}}\u201D \u2014 {{count}} cell.",reviewCreated_other:"Created \u201C{{name}}\u201D \u2014 {{count}} cells.",discardTitle:"Discard this scoring?",discardMessage_one:"You marked {{count}} cell but have not saved. Leaving discards it.",discardMessage_other:"You marked {{count}} cells but have not saved. Leaving discards them.",discardConfirm:"Discard and leave"},info:{grade:"Grade: {{n}}",syllables:"Syllables: {{n}}",pos:"Part of speech: {{v}}",wordType:"Type: {{v}}"},pos:{noun:"Noun",verb:"Verb",adjective:"Adjective",adverb:"Adverb",numeral:"Numeral",determiner:"Determiner",interjection:"Interjection",particle:"Particle",affix:"Affix",dependentNoun:"Dependent noun",pronoun:"Pronoun",auxVerb:"Auxiliary verb",auxAdjective:"Auxiliary adjective"},reorder:{moved:"Moved to position {{n}} of {{total}}",handle:"Reorder {{word}} (Alt + arrow keys)",hint:"Alt + \u2190 \u2192 to reorder"}},$i={filterTitle:"Word Search Settings",filter:{positionAny:"Any",positionHead:"Start",positionMid:"Middle",positionTail:"End",difficulty:"Grade",grade:"Grade {{n}}",gradeNone:"None",syllables:"Syllables",syllable:"{{n}} Syll.",syllable5plus:"5+ Syllables",partOfSpeech:"Part of Speech",pos:{noun:"Noun/Numeral",verb:"Verb/Adjective",modifier:"Adverb/Determiner"},wordType:"Word Type",field:"Semantic Category",type:{native:"Native Korean",sino:"Sino-Korean",foreign:"Loanword",mixed:"Hybrid"},exclude:"Exclude",excludeNoImage:"No Image"},searchButton:"Search",resultUnit:"words",remaining:"{{count}} remaining",resultDisc:"Select {{unit}}. Up to {{max}} items. ({{selected}}/{{max}})",resultTitlePrefix:"",resultTitleSuffix:" {{unit}} found.",emptyResult:"No results found.",groupCount:"{{count}}",sort:{aria:"Sort",match:"Best Match",ganada:"A\u2013Z \u2191",ganadaDesc:"A\u2013Z \u2193",syllable:"Syllables \u2191",syllableDesc:"Syllables \u2193",grade:"Grade \u2191",gradeDesc:"Grade \u2193",original:"Original order"},pageSize:"Show {{count}}",pageSizeAria:"Page size"},Gi={clearAllSelection:"Clear All Selections",divLine:"Contrast Line",removePair:"Remove pair",removeWord:"Remove word"},Wi={title:"By Topic",subtitle:"Select a topic to start listening training",noiseTitle:"Sentence Listening in Noise",shortStoryTitle:"Short Story Listening",FOOD:"Food",HLTH:"Health",WETH:"Weather",PRSN:"People",KRCT:"Korean Culture",STRY:"Stories",LOCA:"Locations",SOAR:"Society & Arts",NTSC:"Nature & Science",SPRT:"Sports",sub:{TRKRFD:"Traditional Korean Food",MDKRFD:"Modern Korean Food",WRLDFD:"World Cuisine",MTRFRT:"Ingredients & Fruits",GEFDKL:"Food Facts",HTETHB:"Healthy Eating",DISILL:"Diseases",EXCISE:"Exercise",GEHTKL:"Health Facts",GESSKL:"Seasons",SNWRAN:"Snow & Rain",WTHFCT:"Weather Forecast",GEWTKL:"Weather Facts",JODYPS:"Joseon Dynasty",MDKRPS:"Modern Korea",THKDPS:"Three Kingdoms",WRLART:"World Artists",WRLPSN:"World Figures",KRLANG:"Korean Language",TRPLCT:"Traditional Games",HERITG:"Heritage",EVTFES:"Events & Festivals",GECTKL:"General Knowledge",FRYTAL:"Fairy Tales",AMZING:"Amazing Stories",DAYSTR:"Everyday Stories",KRLDMK:"Korean Landmarks",SELNMK:"Seoul Landmarks",WRDTRB:"World Travel",NAVIGT:"Navigation",KRSOCI:"Korea",ECONEW:"Economy & News",GENART:"Arts",GELFKL:"Life Tips",ANIMAL:"Animals",PLANTS:"Plants",ETHPLT:"Earth",TOLELC:"Tools & Electronics",GESCKL:"Science Facts",INVDSP:"Individual Sports",MARART:"Martial Arts",TEAMSP:"Team Sports",FOOTBL:"Soccer",GESPKL:"Sports Facts"}},Vi={direction:{left:"L",right:"R",label:"Side"},wornDate:"Date Worn",deviceType:"Device Type",brand:"Brand",fitType:"Fit Type",productName:"Product Name",addNew:"Add New Device",selectFromList:"Select from List",removeDevice:"Remove",type:{hearingAid:"Hearing Aid",cochlearImplant:"Cochlear Implant",other:"Other"}},Yi={stat:{totalCustomers:"Total Customers",monthlyVisits:"This Month's Visits"},chart:{visitDetail:"Visit Details",trainingDetail:"Training Details",weekly:"Weekly",periodMonth:"Month",periodWeek:"Week",weeklyPrefix:"Weekly",monthlyPrefix:"Monthly",visit:"Visits",reservation:"Reservations",trainingDone:"Completed",trainingInProgress:"In Progress",weekRange:"{{start}}\u2013{{end}}",week:"W{{n}}"}},Ui={phonemeSelect:{vs:"vs"},caution:"Caution",mode:{include:"Phoneme Include",pick:"Phoneme Contrast",contrast:"Specify Contrast",infoTitle:"Contrast Mode",infoInclude:"Include \u2014 finds words containing all selected phonemes, plus their minimal pair.",infoPick:"Contrast \u2014 matches only if the selected phoneme is the actual point of difference in the pair.",infoContrast:"Specify Contrast \u2014 directly choose phonemes for the base word and the contrasting word to find pairs."},count:"{{n}}",countLabel:"Number of phonemes",input:{char:"Choose Letters",pron:"Choose Sound",infoTitle:"Input mode",infoChar:"Choose Letters \u2014 finds words by the selected phonemes (spelling), then finds their standard-pronunciation contrast pairs.",infoPron:"Choose Sound \u2014 finds standard-pronunciation contrast pairs directly from the selected phonemes."},phonemeN:"Syllable {{n}}",phonemeSingleLabel:"Syllable",phonemeContrastSingleLabel:"Contrast Syllable",ordinals:["First","Second","Third","Fourth"],phonemeOrdinalLabel:"{{ordinal}} Syllable",phonemeContrastOrdinalLabel:"Contrast {{ordinal}} Syllable",composition:"Answer Word Composition",syllableCount:"Syllables",syllableN:"{{n}} syll.",syllableNPlus:"{{n}}+ syll.",onset:"Onset",vowel:"Vowel",coda:"Coda",filter:{searchOptionsTitle:"Contrast Settings",searchModeLabel:"Contrast Mode",countLabel:"Input Syllable Count",inputModeLabel:"Input mode",phonemeOrder:"Input Syllable Position",phonemeOrderInfo:["Match: the pair must differ at exactly the same position (syllable).","Any: the differing position doesn't matter."],orderAny:"Any",orderMatch:"Match",difficultyInfo:["Level 1 \u2014 everyday vocabulary acquired before school age and used for life","Level 2 \u2014 difficulty of grades 1\u20132","Level 3 \u2014 difficulty of grades 3\u20134","Level 4 \u2014 difficulty of grades 5\u20136","No level \u2014 frequent everyday words outside the national standard list, plus coinages and loanwords"],selectLabel:"Select",onlyHasImage:"Only words with images",onlySameStructure:"Only same phoneme structure"},confirmMessage:"The word table with {{count}} selected {{unit}} will be lost.",resetOptions:"Reset Options",phonemeContrast:"Contrast Syllable {{n}}",infoNotes:["The preview character is an example of the selected phoneme combination. The actual search covers all words containing the phoneme.","Initial consonant '\u3147' cannot be selected. \u3147 at the start of a word is effectively silent.","If only onset and coda are selected, the vowel is automatically displayed as '\u314F'.","Increasing the phoneme count searches for minimal pairs between each phoneme."]},zi={lead:`IHAB builds trust
|
|
4
4
|
through sound
|
|
5
|
-
and aids recovery.`,site:{title:"Site",malgwi:"Malgwi",soundDirection:"Sound Direction System",vrSoundDirection:"VR Sound Direction System",hearingTest:"Hearing Test Pro"},sns:{title:"SNS",naverBlog:"Naver Blog"},policy:{title:"Policy",terms:"Terms of Service",privacy:"Privacy Policy"},ceo:"CEO",address:"Address",bizNo:"Business no.",support:"Support",ceoName:"Ji-hye Han",addressValue:"302, 3F, Haechan Bldg, 32 Sicheong-gil, Chuncheon, Gangwon, Korea",bizNoValue:"526-81-02926"},Ki={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},qi={phaseWordDownload:"Download Word Data",phaseImageCheck:"Check Images",phasePairAnalysis:"Analyze Word Pairs",downloadingCount_one:"Downloading {{n}} word",downloadingCount_other:"Downloading {{n}} words",checkingPage:"Checking page {{page}} list",imageCount:"{{done}} / {{total}} items"},Ji={clearAriaLabel:"Clear input"},Xi={ariaLabel:"Select tab"},Qi={ariaLabel:"Tabs"},Zi={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},es={ariaLabel:"User avatar"},ts={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"}},ns={weekly:{title:"Weekly Training",daily:"Daily Listening"},homework:{title:"Homework Progress",totalRate:"Overall rate",done:"Done"},today:{tooltipTotal:"Total",tooltipDone:"Done"},visit:{title:"Linked Visit Records"},detail:"Details",detailFor:"{{name}} details"},os={time:{justNow:"just now",minutesAgo:"{{n}}m ago",hoursAgo:"{{n}}h ago",daysAgo:"{{n}}d ago",weeksAgo:"{{n}}w ago",monthsAgo:"{{n}}mo ago",yearsAgo:"{{n}}y ago"}},rs={steps:"Step {{current}} of {{total}}"},us={skippedOnly_one:"{{n}} older record was excluded \u2014 it does not say what was answered.",skippedOnly_other:"{{n}} older records were excluded \u2014 they do not say what was answered.",runs_one:"{{count}} run",runs_other:"{{count}} runs"},as={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},ls={viewWords:"Words"},is={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},ss={chooseDate:"Choose a date",selectYear:"Select year",selectMonth:"Select month"},cs={previewRegion:"Report preview \u2014 scrollable sideways"},ds={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},fs={place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},ps={clearSelection:"Clear selection"},Cs={showResult:"Show {{type}} result"},ms={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},gs={loading:"Loading"},hs={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},ys={ariaLabel:"Breadcrumb"},Ss={empty:"No items yet."},bs={main:"Main gradient",soft:"Soft",sub:"Sub color",deep:"Deep gradient",softSub:"Soft sub",warm:"Warm (accent)",dark:"Dark",radial:"Radial gradient",diagonal:"Diagonal pattern",dots:"Dot pattern",outline:"Outline",success:"Success / done",naver:"Naver blog notice",instagram:"Instagram notice"},ws={common:bi,calendar:wi,passCard:Ei,rating:Ai,colorPicker:_i,dropdown:Ti,accordion:Di,header:Ni,nav:Oi,settings:vi,usage:Bi,account:Li,training:Ri,customers:Mi,payment:Ii,coupons:Pi,visits:ki,trainingType:xi,myWordTable:Fi,keyWords:ji,wordTable:Hi,wordSearch:$i,wordPrint:Gi,topic:Wi,device:Vi,manager:Yi,wordPairs:Ui,footer:zi,date:Ki,wordData:qi,textField:Ji,segmentedControl:Xi,tabs:Qi,fileUpload:Zi,avatar:es,myHomework:ts,trainingStatus:ns,store:os,progress:rs,trainingMiss:us,table:as,wordScore:ls,topBanner:is,datePicker:ss,report:cs,tooltip:ds,phonemeProfile:fs,bulkBar:ps,debug:Cs,badge:ms,loader:gs,soundCompass:hs,breadcrumb:ys,board:Ss,promoBannerBg:bs};const Es="0.357.0",As=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],uo="ko",_s="ihab_display_language";function Fr(){if(typeof window>"u")return uo;try{const e=localStorage.getItem(_s);if(e&&As.some(t=>t.code===e))return e}catch{}return uo}function jr(e){try{document.documentElement.lang=e}catch{}}Le.on("languageChanged",jr),jr(Fr()),Le.use(We.initReactI18next).init({resources:{ko:{translation:Si},en:{translation:ws}},lng:Fr(),fallbackLng:uo,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const Hr=new Set(["field"]),ao="none";function Ts(e){return e==null||String(e).trim()===""}function Ds(e){return typeof e=="string"&&io.includes(e)}function lo(e,t){if(!e)return!0;const n=e instanceof Set?e:new Set(e);return n.size===0?!0:Ts(t)?n.has(ao):n.has(String(t))}const zt=["grade","syllables","pos","wordType","field"],io=["1","2","3","4","none"],Ns=["1","2","3","4","5+"],Os=["noun","verb","modifier"],vs=["native","sino","foreign","mixed"],Bs={grade:io,syllables:Ns,pos:Os,wordType:vs,field:[]},Ls={noun:["\uBA85","\uC218"],verb:["\uB3D9","\uD615"],modifier:["\uBD80","\uAD00"]},Rs={native:"\uACE0\uC720",sino:"\uD55C\uC790",foreign:"\uC678\uB798",mixed:"\uD63C\uC885"},Ms={grade:["\uB09C\uC774\uB3C4 \uB4F1\uAE09"]},Is={pos:{noun:["\uCCB4\uC5B8(\uBA85\uC0AC,\uC218\uC0AC)"],verb:["\uC6A9\uC5B8(\uB3D9\uC0AC,\uD615\uC6A9\uC0AC)"],modifier:["\uC218\uC2DD\uC5B8(\uBD80\uC0AC,\uAD00\uD615\uC0AC)"]}},so=new Map;try{Le.store?.on?.("added",()=>so.clear())}catch{}function Kt(e){const t=so.get(e);if(t)return t;const n=Le.getFixedT(e),o={section:{grade:n("wordSearch.filter.difficulty","\uB4F1\uAE09"),syllables:n("wordSearch.filter.syllables","\uC74C\uC808 \uC218"),pos:n("wordSearch.filter.partOfSpeech","\uD488\uC0AC"),wordType:n("wordSearch.filter.wordType","\uC720\uD615"),field:n("wordSearch.filter.field","\uC758\uBBF8\uBC94\uC8FC")},value:{grade:{...Object.fromEntries(io.filter(r=>r!==ao).map(r=>[r,n("wordSearch.filter.grade",{n:Number(r),defaultValue:`${r}\uB4F1\uAE09`})])),[ao]:n("wordSearch.filter.gradeNone","\uC5C6\uC74C")},syllables:{...Object.fromEntries(["1","2","3","4"].map(r=>[r,n("wordSearch.filter.syllable",{n:Number(r),defaultValue:`${r}\uC74C\uC808`})])),"5+":n("wordSearch.filter.syllable5plus","5\uC74C\uC808 \uC774\uC0C1")},pos:{noun:n("wordSearch.filter.pos.noun","\uCCB4\uC5B8(\uBA85\uC0AC, \uC218\uC0AC)"),verb:n("wordSearch.filter.pos.verb","\uC6A9\uC5B8(\uB3D9\uC0AC, \uD615\uC6A9\uC0AC)"),modifier:n("wordSearch.filter.pos.modifier","\uC218\uC2DD\uC5B8(\uBD80\uC0AC, \uAD00\uD615\uC0AC)")},wordType:{native:n("wordSearch.filter.type.native","\uACE0\uC720\uC5B4"),sino:n("wordSearch.filter.type.sino","\uD55C\uC790\uC5B4"),foreign:n("wordSearch.filter.type.foreign","\uC678\uB798\uC5B4"),mixed:n("wordSearch.filter.type.mixed","\uD63C\uC885\uC5B4")},field:{}}};return so.set(e,o),o}const co=()=>Array.from(new Set([Le.language,"ko","en"].filter(e=>!!e)));function qt(e){if(zt.includes(e))return e;for(const t of co()){const n=Kt(t);for(const o of zt)if(n.section[o]===e)return o}for(const t of zt)if(Ms[t]?.includes(e))return t;return null}function st(e,t){if(Hr.has(e)||Bs[e].includes(t))return t;for(const n of co()){const o=Kt(n).value[e];for(const[r,u]of Object.entries(o))if(u===t)return r}for(const[n,o]of Object.entries(Is[e]??{}))if(o.includes(t))return n;if(e==="grade"||e==="syllables"){const n=parseInt(t.replace(/\D/g,""),10);if(Number.isFinite(n)&&n>=1)return e==="grade"?n<=4?String(n):null:n>=5?"5+":String(n)}return null}function Ps(e,t,n=Le.language){return Kt(n).value[e][t]??t}const ks=e=>Array.isArray(e)?e.filter(t=>typeof t=="string"):typeof e=="string"&&e?[e]:[];function fo(e){const t={};for(const[n,o]of Object.entries(e??{})){const r=qt(n);if(r)for(const u of ks(o)){const a=st(r,u);if(!a)continue;const i=t[r]??(t[r]=[]);i.includes(a)||i.push(a)}}return t}function po(e,t=Le.language){const n=Kt(t||"ko"),o={};for(const r of zt){const u=(e?.[r]??[]).map(a=>n.value[r][a]??(Hr.has(r)?a:void 0)).filter(a=>!!a);u.length&&(o[n.section[r]]=u)}return o}function xs(e,t=Le.language){const n={};for(const[o,r]of Object.entries(e??{}))qt(o)||(n[o]=r);return{...n,...po(fo(e),t)}}function Fs(e){for(const t of co()){const n=Kt(t);if(zt.some(o=>n.section[o]===e))return t}return Le.language||"ko"}let vn=null,$r=null,Gr=null;function js(){const e=Dn();if(e&&e.entries.length>0){const t=Ht();if(vn&&$r===e&&Gr===t)return vn;const n=new Set,o=[];for(const r of e.entries)!r.word||n.has(r.word)||(n.add(r.word),o.push({w:r.word,s:r.syllables,p:t?.[r.word]?[...t[r.word].cho??[],...t[r.word].jung??[],...t[r.word].jong??[]]:[],pron:r.pronunciation||r.word,grade:r.grade}));return vn=o,$r=e,Gr=t,vn}return[]}const Ye=new Proxy([],{get(e,t){const n=js(),o=n[t];return typeof o=="function"?o.bind(n):o}});function Co(e){return e.length?e[Math.floor(Math.random()*e.length)]:void 0}function Re(e,t){if(t>=e.length)return X(e);if(t===0)return[];const n=e.slice();for(let o=0;o<t;o++){const r=o+Math.floor(Math.random()*(n.length-o)),u=n[o];n[o]=n[r],n[r]=u}return n.slice(0,t)}let mo=null,Wr=null;function tt(){const e=Dn();if(mo&&Wr===e)return mo;const t=new Map;for(const n of Ye)n.w&&t.set(n.w,n.pron);return mo=t,Wr=e,t}function de(e){return tt().get(e)||e}function Bn(e,t,n=new Set){const o=[];for(const r of X(e)){if(o.length>=t)break;const u=de(r);n.has(u)||(n.add(u),o.push(r))}return o}let Hs=0;function me(e){return`${e}-rt-${++Hs}`}function Et(e){const t=Or();if(!t||t.total===0){const r=new Set;for(const u of e)r.add(u);return r}const n=_n(),o=new Set;for(const r of e)n.has(r)&&o.add(r);return o}const Ln=new Map;let Vr=null,Yr=null,Ur=null;function Jt(e){return e==null?"":Array.isArray(e)?e.slice().sort().join(","):e}function go(e){const t=Array.isArray(e.choseong)&&e.choseong.length===0?"[]":Jt(e.choseong),n=e.composition,o=n?.syllable==null?"":Array.isArray(n.syllable)?n.syllable.slice().sort().join(","):String(n.syllable),r=n?`${Jt(n.cho)}/${Jt(n.jung)}/${Jt(n.jong)}/${n.jongNone?"N":""}/${o}`:"",u=Jt(e.grade);return`${e.difficulty??""}|${t}|${r}|${e.excludeNoImage?"1":"0"}|${e.count??""}|x${e.contrastCount??1}|${e.fullCount?"F":""}|s${e.sameStructureOnly===!1?"0":"1"}|v${e.phonemeView==="pron"?"p":"c"}|g${u}|t${e.targetSyllable??""}|c${e.choicesPerItem??""}`}const ho=new Map;function $s(e){return go({...e,count:void 0,choicesPerItem:void 0,fullCount:!1})}async function _e(e){const t=Dn(),n=Ht(),o=e.excludeNoImage?_n():null;(t!==Vr||n!==Yr||e.excludeNoImage&&o!==Ur)&&(Ln.clear(),ho.clear(),Vr=t,Yr=n,Ur=o);const r=go(e);return Ln.has(r)||Ln.set(r,Gs(e)),Ln.get(r)}function zr(e){if(!e)return null;const t=a=>a==null?null:Array.isArray(a)?a.length?a:null:[a],n=t(e.cho),o=t(e.jung),r=!!e.jongNone,u=r?null:t(e.jong);return n||o||u||r?r&&!n&&!o&&!u?a=>Ba(a):a=>Ra(a,{cho:n,jung:o,jong:u,jongNone:r}):null}function Kr(e){const t=e.grade&&e.grade.length>0?new Set(e.grade):null,n=e.composition??null,o=n?.syllable!=null?new Set(Array.isArray(n.syllable)?n.syllable:[n.syllable]):null,r=n?[zr(n),o?a=>o.has(Ft(a)):null].filter(a=>a!=null):[];if(!t&&r.length===0)return null;const u=e.phonemeView==="pron";return a=>{if(!lo(t,a.grade))return!1;if(r.length===0)return!0;const i=u?de(a.w):a.w;return r.every(s=>s(i))}}async function Gs(e){const{difficulty:t=null,choseong:n=null,composition:o=null,targetSyllable:r=null,excludeNoImage:u=!1}=e,a=e.grade&&e.grade.length>0?new Set(e.grade):null,i=e.sameStructureOnly??!0,s=e.phonemeView==="pron"?"pron":"char",d=Math.max(1,e.contrastCount??1),m=t==="cho"||t==="jung"||t==="jong",f=m&&d>=2,g=t==="count",C=n?new Set(Array.isArray(n)?n:[n]):null,h=o?.syllable!=null?new Set(Array.isArray(o.syllable)?o.syllable:[o.syllable]):null,w=o?[zr(o),h?L=>h.has(Ft(L)):null].filter(L=>L!=null):[],S=t==="random"||t===null,y=S||g,b=S||f||g;let _=Ye.filter(L=>!L.w||!lo(a,L.grade)?!1:b?!0:Array.isArray(L.p)&&L.p.length>0);C&&(_=_.filter(L=>{for(const H of C)if(Oa(L.w,H))return!0;return!1})),w.length>0&&(_=_.filter(L=>{const H=s==="pron"?de(L.w):L.w;return w.every(j=>j(H))})),r&&(_=_.filter(L=>L.w[0]===r));let D;if(u){const L=new Set;for(const H of _)if(L.add(H.w),Array.isArray(H.p))for(const j of H.p)L.add(j);if(y)for(const H of Ye)H.w&&L.add(H.w);D=Et(L)}else{const L=new Set;for(const H of _)if(L.add(H.w),Array.isArray(H.p))for(const j of H.p)L.add(j);if(y)for(const H of Ye)H.w&&L.add(H.w);D=L}let B=null;if(f){const L=new Set;for(const H of Ye)H.w&&L.add(H.w);B=u?Et(L):L}const M=_.filter(L=>D.has(L.w)),O=600,R=Array.from(D),x=R.length>O?Re(R,O):R,v=g&&o!=null&&(ce(o.cho)||ce(o.jung)||ce(o.jong)),z=2500,Z=new Map;if(g&&!v&&d>=2){for(const L of R){const H=Ft(L),j=Z.get(H);j?j.push(L):Z.set(H,[L])}for(const[L,H]of Z)H.length>z&&Z.set(L,Re(H,z))}const V=Da();let F=null;if(v){const L=$s(e),H=u?_n():null,j=ho.get(L);F=j&&j.imageOkSet===H?j.map:al(o,R,V,i,s,de),ho.set(L,{imageOkSet:H,map:F})}const k=500,K=1500,pe=e.fullCount?M:t==="random"?M.length>k?Re(M,k):M:M.length>K?Re(M,K):M,re=Ht(),ve=[];for(const L of pe){let H;const j=de(L.w);if(f)H=Ia(L.w,t,d,B,24).filter(J=>de(J)!==j);else if(g)v?H=(F.get(L.w)??[]).filter(J=>de(J)!==j):d<=1?H=kr(L.w,re,{okSet:D,pronOf:de,decompOf:V,sameStructureOnly:!1}):H=(Z.get(Ft(L.w))??[]).filter(J=>{if(J===L.w||de(J)===j)return!1;const W=Pa(j,de(J));return d>=5?W>=5:W===d});else if(S){const J=W=>W!==L.w&&W.length===L.w.length&&de(W)!==j;if(e.fullCount){const W=Math.max(1,(e.choicesPerItem??3)-1),he=[],$e=new Set;for(const ot of x){if(!J(ot))continue;const qe=de(ot);if(!$e.has(qe)&&($e.add(qe),he.push(ot),he.length>=W))break}H=he}else H=x.filter(J)}else{const J=t;H=kr(L.w,re,{kind:J,okSet:D,pronOf:de,decompOf:V,sameStructureOnly:!1}),H.length===0&&(H=(x.length>30?Re(x,30):x).filter(W=>W!==L.w&&Na(L.w,W)===t&&de(W)!==j))}if(i&&H.length>0&&(m||g&&!v)){const J=V(de(L.w));H=H.filter(W=>!oo(J,V(de(W))))}H.length!==0&&ve.push({word:L,usable:H})}return ve}async function qr(e,t){const{choicesPerItem:n=3,count:o=10}=t,r=n-1,u=(await _e(t)).filter(i=>i.usable.length>=r),a=[];for(const i of X(u)){if(a.length>=o)break;const s=Bn(i.usable,r);if(s.length<r)continue;const d=X([i.word.w,...s]);a.push({id:me(e+"-item"),index:a.length+1,word:i.word.w,syllables:i.word.s,choices:d,answerIndex:d.indexOf(i.word.w)})}return a}async function Ws(e){const{choicesPerItem:t=3,count:n=10}=e,o=t-1,r=await _e({...e,difficulty:null});if(r.length<t)return[];const u=e.composition??null,a=[],i=X([...r]);for(const s of i){if(a.length>=n)break;const d=s.word.w,m=[...s.word.pron||d],f=u&&On(u)?m.filter(S=>{const y=te(S);return!!y&&it(y,u)}):[],g=Co(f.length?f:m);if(!g)continue;const C=r.filter(S=>S.word.w!==d&&S.word.s===s.word.s&&!(S.word.pron||S.word.w).includes(g)&&S.word.pron!==s.word.pron);if(C.length<o)continue;const h=Bn(C.map(S=>S.word.w),o);if(h.length<o)continue;const w=X([d,...h]);a.push({id:me("HPI-item"),index:a.length+1,targetSyllable:g,word:d,choices:w,answerIndex:w.indexOf(d)})}return a}async function Vs(e){const{count:t=10}=e,n=(await _e(e)).filter(u=>u.usable.length>=1);if(!n.length)return[];const o=n.length>=t?Re(n,t):X(Array.from({length:t},(u,a)=>n[a%n.length])),r=X(Array.from({length:t},(u,a)=>a<Math.ceil(t/2)));return o.map((u,a)=>{const i=r[a];let s;if(i)s=[u.word.w,u.word.w];else{const d=Co(u.usable);s=Math.random()<.5?[u.word.w,d]:[d,u.word.w]}return{id:me("SOD-item"),index:a+1,word:u.word.w,pair:s,same:i}})}async function Ys(e){const{choicesPerItem:t=3,count:n=10}=e,o=t-1,r=await _e({...e,difficulty:null});if(r.length<t+1)return[];const u=r.map(g=>g.word.w),a=new Map(r.map(g=>[g.word.w,g.word.pron])),i=g=>(a.get(g)||g)[0]??"",s={};for(const g of r){const C=i(g.word.w);C&&(s[C]||(s[C]=[]),s[C].push(g.word.w))}const d=Object.entries(s).filter(([,g])=>new Set(g.map(C=>a.get(C)||C)).size>=2).map(([g])=>g);if(d.length===0)return[];const m=[],f=X([...d]);for(let g=0;m.length<n&&g<n*4;g++){const C=f[g%f.length],h=s[C];if(h.length<2)continue;const w=X([...h]),S=w[0],y=a.get(S)||S,b=w.find(O=>O!==S&&(a.get(O)||O)!==y);if(!S||!b)continue;const _=a.get(b)||b,D=u.filter(O=>i(O)!==C&&O!==S&&O!==b&&O.length===b.length&&(a.get(O)||O)!==_);if(D.length<o)continue;const B=Bn(D,o);if(B.length<o)continue;const M=X([b,...B]);m.push({id:me("SWS-item"),index:m.length+1,sourceWord:S,targetSyllable:C,word:b,choices:M,answerIndex:M.indexOf(b)})}return m}function Jr(e,t,n){const o=tt(),r=s=>o.get(s)||s,u=(s,d)=>{const m=[...s],f=[...d];if(m.length!==f.length)return-1;let g=-1;for(let C=0;C<m.length;C++)if(m[C]!==f[C]){if(g>=0)return-1;g=C}return g},a=e.map(s=>({e:s,swaps:s.usable.filter(d=>!!d&&u(s.word.w,d)>=0&&r(d)!==r(s.word.w))})).filter(s=>s.swaps.length>0),i=[];for(const{e:s,swaps:d}of X(a)){if(i.length>=t)break;const m=Co(d)??"",f=[...s.word.w],g=[...m],C=u(s.word.w,m),h=Bn(s.usable.filter(w=>w&&w!==m),2,new Set([r(m),r(s.word.w)]));h.length<2||i.push({id:me(n),index:i.length+1,word:s.word.w,original:s.word.w,changed:m,changedFrom:C>=0?f[C]:"",changedTo:C>=0?g[C]:"",distractors:h})}return i}async function Xr(e,t,n){const{count:o=10}=t,r=tt(),u=Ye.filter(h=>h.w&&h.s===e),a=t.excludeNoImage?Et(u.map(h=>h.w)):null,i=a?u.filter(h=>a.has(h.w)):u,s=new Set(i.map(h=>h.w)),d=gl(s),m=t.phonemeView??"char",f=t.composition??null,g=Kr(t),C=[];for(const h of X(i)){if(C.length>=o)break;if(g&&!g(h))continue;const w=hl(h.w,f,r,m,d,null,null);if(!w)continue;const S=w.distractors[0],y=[...h.w],b=[...S],_=y.findIndex((D,B)=>D!==b[B]);C.push({id:me(n),index:C.length+1,word:h.w,original:h.w,changed:S,changedFrom:_>=0?y[_]:"",changedTo:_>=0?b[_]:"",distractors:w.distractors.slice(1)})}return C}async function Us(e){return Xr(2,e,"CS2-item")}async function zs(e){return Xr(3,e,"CS3-item")}async function Ks(e){const t=(await _e({...e,difficulty:"count",contrastCount:1})).filter(n=>n.word.s===1&&n.usable.length>=1);return Jr(t,e.count??10,"CP1-item")}async function qs(e){const t=e.difficulty&&e.difficulty!=="random"?e.difficulty:"count",n=(await _e({...e,difficulty:t,contrastCount:1})).filter(o=>o.word.s===2&&o.usable.length>=1);return Jr(n,e.count??10,"CP2-item")}async function Js(e){const{count:t=10}=e,n=(await _e({...e})).filter(o=>o.word.s===2);return Re(n,t).map((o,r)=>({id:me("M2S-item"),index:r+1,word:o.word.w,answer:o.word.w,parts:[...o.word.w]}))}async function Xs(e){const{count:t=10}=e,n=(await _e({...e})).filter(o=>o.word.s===3);return Re(n,t).map((o,r)=>({id:me("M3S-item"),index:r+1,word:o.word.w,answer:o.word.w,parts:[...o.word.w]}))}function yo(e){const t=Ye.map(n=>n.w);return e.excludeNoImage?Et(t):new Set(t)}async function Qs(e){const{count:t=10}=e,n=(await _e({...e})).filter(i=>i.word.s===2),o=tt(),r=yo(e),u=e.phonemeView??"char",a=[];for(const i of X(n)){if(a.length>=t)break;const s=dl(i.word.w,e.composition??null,o,u,r);if(!s)continue;const[d,...m]=s.distractors,f=[...i.word.w],g=f[0]===d?f[1]:f[0];a.push({id:me("D2-item"),index:a.length+1,original:i.word.w,word:i.word.w,dropped:g,missingResult:d,distractors:m})}return a}async function Zs(e){const{count:t=10}=e,n=(await _e({...e})).filter(i=>i.word.s===3),o=tt(),r=yo(e),u=e.phonemeView??"char",a=[];for(const i of X(n)){if(a.length>=t)break;const s=fl(i.word.w,e.composition??null,o,u,r);if(!s)continue;const[d,...m]=s.distractors,f=[...i.word.w];let g="";for(let C=0;C<f.length;C++)if(f.filter((h,w)=>w!==C).join("")===d){g=f[C];break}a.push({id:me("D3-item"),index:a.length+1,original:i.word.w,word:i.word.w,dropped:g,missingResult:d,distractors:m})}return a}async function ec(e){const{count:t=10}=e,n=(await _e({...e})).filter(i=>i.word.s>=3),o=tt(),r=yo(e),u=e.phonemeView??"char",a=[];for(const i of X(n)){if(a.length>=t)break;const s=pl(i.word.w,e.composition??null,o,u,r);if(!s)continue;const[d,...m]=s.distractors,f=i.word.w,g=s.dropped??(f.startsWith(d)?f.slice(d.length):f.endsWith(d)?f.slice(0,f.length-d.length):"");a.push({id:me("DPC-item"),index:a.length+1,original:f,word:f,dropped:g,missingResult:d,distractors:m})}return a}async function tc(e){const{count:t=10}=e,n=(await _e({...e})).map(o=>o.word.w);return n.length<3?[]:Array.from({length:t},(o,r)=>{const u=Re(n,3);return{id:me("LRO-item"),index:r+1,sequence:u,choices:X(u)}})}function Rn(e,t,n){const o=Ye.filter(i=>i.w&&i.s===e),r=t.excludeNoImage?Et(o.map(i=>i.w)):null,u=Kr(t),a=[];for(const i of o)if(!(r&&!r.has(i.w))&&!(u&&!u(i))){if(n){const s=te(i.w);if(!s||!n(s))continue}a.push(i)}return a}function nc(e){const t=Rn(1,e,Nn.MERGE_2_PHONEMES.syllable);return Re(t,e.count??10).map((n,o)=>{const r=te(n.w);return{id:me("M2P-item"),index:o+1,parts:[Ce[r.cho],Ae[r.jung]],answer:n.w,word:n.w}})}function oc(e){const t=Rn(1,e,Nn.MERGE_3_PHONEMES.syllable);return Re(t,e.count??10).map((n,o)=>{const r=te(n.w);return{id:me("M3P-item"),index:o+1,parts:[Ce[r.cho],Ae[r.jung],Oe[r.jong]],answer:n.w,word:n.w}})}function rc(e){const t=Nn.DROP_FINAL_CONSONANT_FROM_1SYLL,n=Rn(t.syllables,e,t.syllable),o=tt(),r=[];for(const u of X(n)){if(r.length>=(e.count??10))break;const a=Cl(u.w,null,o);if(!a)continue;const[i,...s]=a.distractors;r.push({id:me("DFC-item"),index:r.length+1,original:u.w,word:u.w,result:i,distractors:s})}return r}function uc(e){const t=Nn.REMOVE_CONSONANT_AND_IDENTIFY_PHONEME,n=Rn(t.syllables,e,t.syllable),o=tt(),r=[];for(const u of X(n)){if(r.length>=(e.count??10))break;const a=ml(u.w,null,o);if(!a)continue;const i=te(o.get(u.w)||u.w);if(!i)continue;const[s,...d]=a.distractors;r.push({id:me("RCP-item"),index:r.length+1,base:u.w,word:u.w,missingConsonant:Ce[i.cho],remaining:s,distractors:d})}return r}const Mn=new Map;let Qr=null,Zr=null,eu=null,So=0;async function tu(e,t={}){const n=Dn(),o=Ht(),r=t.excludeNoImage?_n():null;(n!==Qr||o!==Zr||t.excludeNoImage&&r!==eu)&&(Mn.clear(),So++,Qr=n,Zr=o,eu=r);const u=`${e}:${go(t)}`;if(Mn.has(u))return Mn.get(u);const a=So,i=await lc(e,t);return a===So&&Mn.set(u,i),i}const ac={SAME_SOUND_PICK:e=>qr("SSP",e),HEAR_AND_PICK_SAME:e=>qr("HPS",e),HEAR_AND_PICK_INCLUDED:e=>Ws(e),SAME_OR_DIFF:e=>Vs(e),STARTS_WITH_SAME_SOUND:e=>Ys(e),LISTEN_AND_REMEMBER_ORDER:e=>tc(e),MERGE_2_SYLLABLES:e=>Js(e),MERGE_3_SYLLABLES:e=>Xs(e),MERGE_2_PHONEMES:e=>nc(e),MERGE_3_PHONEMES:e=>oc(e),DROP_1_FROM_2SYLL:e=>Qs(e),DROP_1_FROM_3SYLL:e=>Zs(e),DROP_PART_FROM_COMPOUND:e=>ec(e),DROP_FINAL_CONSONANT_FROM_1SYLL:e=>rc(e),REMOVE_CONSONANT_AND_IDENTIFY_PHONEME:e=>uc(e),CHANGE_1_SYLL_IN_2SYLL:e=>Us(e),CHANGE_1_SYLL_IN_3SYLL:e=>zs(e),CHANGE_1_PHONEME_IN_1SYLL:e=>Ks(e),CHANGE_1_PHONEME_IN_2SYLL:e=>qs(e)};async function lc(e,t={}){const n=ac[e];return n?await n(t):[]}async function ic(e){const t=["random","count"],n=Object.keys(eo);let o=0;for(const r of t)for(const u of n){const a=eo[u];tu(u,{difficulty:a.difficulty?r:null,contrastCount:1,composition:null,count:5,excludeNoImage:e,sameStructureOnly:!0,phonemeView:"char",grade:null}).catch(()=>{}),++o%6===0&&await new Promise(i=>setTimeout(i,0))}}async function sc(e){const t=await _e({...e,fullCount:!0}),n=e.choicesPerItem!=null?Math.max(1,e.choicesPerItem-1):1;return t.filter(o=>new Set(o.usable.map(r=>de(r))).size>=n).length}async function cc(e={}){const t=[];for(const i of Ye)i.w&&t.push(i.w);const n=e.excludeNoImage?Et(t):t,o=new Set,r=new Set,u=new Set,a=new Set;for(const i of n){a.add(Ft(i));for(const s of i){const d=te(s);if(d&&(Ce[d.cho]!=="\u3147"&&o.add(Ce[d.cho]),r.add(Ae[d.jung]),d.jong>0)){u.add(Oe[d.jong]);const m=An[d.jong];m&&m.forEach(f=>u.add(f))}}}return{cho:o,jung:r,jong:u,syllable:a}}const Fe="\uC804\uCCB4";function nu(){const{t:e}=We.useTranslation();return c.useMemo(()=>({difficulty:e("wordSearch.filter.difficulty","\uB4F1\uAE09"),syllables:e("wordSearch.filter.syllables","\uC74C\uC808 \uC218"),syllable5plus:e("wordSearch.filter.syllable5plus","5\uC74C\uC808 \uC774\uC0C1"),partOfSpeech:e("wordSearch.filter.partOfSpeech","\uD488\uC0AC"),wordType:e("wordSearch.filter.wordType","\uC720\uD615"),posMap:{[e("wordSearch.filter.pos.noun","\uCCB4\uC5B8(\uBA85\uC0AC, \uC218\uC0AC)")]:["\uBA85","\uC218"],[e("wordSearch.filter.pos.verb","\uC6A9\uC5B8(\uB3D9\uC0AC, \uD615\uC6A9\uC0AC)")]:["\uB3D9","\uD615"],[e("wordSearch.filter.pos.modifier","\uC218\uC2DD\uC5B8(\uBD80\uC0AC, \uAD00\uD615\uC0AC)")]:["\uBD80","\uAD00"]},typeMap:{[e("wordSearch.filter.type.native","\uACE0\uC720\uC5B4")]:"\uACE0\uC720",[e("wordSearch.filter.type.sino","\uD55C\uC790\uC5B4")]:"\uD55C\uC790",[e("wordSearch.filter.type.foreign","\uC678\uB798\uC5B4")]:"\uC678\uB798",[e("wordSearch.filter.type.mixed","\uD63C\uC885\uC5B4")]:"\uD63C\uC885"}}),[e])}function ou(e,t,n){return{label:t.difficulty,items:[...[1,2,3,4].map(o=>e("wordSearch.filter.grade",{n:o})),e("wordSearch.filter.gradeNone","\uC5C6\uC74C")],multiple:!0,allOption:!0,allLabel:n?.allLabel,labelAction:n?.labelAction,labelInfo:n?.labelInfo}}function ru(e){return{label:e.partOfSpeech,items:Object.keys(e.posMap),multiple:!0,allOption:!0}}function uu(e){return{label:e.wordType,items:Object.keys(e.typeMap),multiple:!0,allOption:!0}}function dc(e,t){return{label:t.syllables,items:[e("wordSearch.filter.syllable",{n:1}),e("wordSearch.filter.syllable",{n:2}),e("wordSearch.filter.syllable",{n:3}),e("wordSearch.filter.syllable",{n:4}),t.syllable5plus],multiple:!0,allOption:!0}}function fc(e,t){const n=[e("wordPairs.filter.onlyHasImage","\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC")];return t?.includeStructure&&n.push(e("wordPairs.filter.onlySameStructure","\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC")),{label:e("wordPairs.filter.selectLabel","\uC120\uD0DD"),items:n,multiple:!0,labelAction:t?.labelAction,labelInfo:t?.labelInfo}}function pc(e,t){const{label:n,headValue:o,midValue:r,tailValue:u,includeMid:a=!0,headDisabled:i,midDisabled:s,tailDisabled:d,allOptionDisabled:m,groupLabel:f,labelAction:g}=t;return{label:n,...f?{groupLabel:f}:{},...g?{labelAction:g}:{},allOption:!0,allLabel:e("wordSearch.filter.positionAny",{defaultValue:"\uBB34\uAD00"}),...m?{allOptionDisabled:m}:{},items:[{value:o,displayLabel:e("wordSearch.filter.positionHead",{defaultValue:"\uC5B4\uB450"}),disabled:i},...a?[{value:r,displayLabel:e("wordSearch.filter.positionMid",{defaultValue:"\uC5B4\uC911"}),disabled:s}]:[],{value:u,displayLabel:e("wordSearch.filter.positionTail",{defaultValue:"\uC5B4\uB9D0"}),disabled:d}]}}function Cc(e,t,n){const o=qt(n),r=o&&t!==Fe?st(o,t):null;if(o&&(t===Fe||r)){const i={},s={};for(const[C,h]of Object.entries(e))(qt(C)===o?s:i)[C]=h;if(t===Fe)return i;const d=fo(s)[o]??[],m=d.includes(r)?d.filter(C=>C!==r):[...d,r];if(m.length===0)return i;const f=po({[o]:m},Fs(n)),g=Object.values(f)[0]??[];return{...i,[n]:g}}if(t===Fe){const{[n]:i,...s}=e;return s}const u=e[n]??[],a=u.includes(t)?u.filter(i=>i!==t):[...u,t];if(a.length===0){const{[n]:i,...s}=e;return s}return{...e,[n]:a}}Object.fromEntries(Object.entries(Zn).map(([e,{nucleus:t}])=>[e,t]));const mc={\uACE0\uC720\uC5B4:"\uACE0\uC720",\uD55C\uC790\uC5B4:"\uD55C\uC790",\uC678\uB798\uC5B4:"\uC678\uB798",\uD63C\uC885\uC5B4:"\uD63C\uC885"},gc={"\uCCB4\uC5B8(\uBA85\uC0AC,\uC218\uC0AC)":["\uBA85","\uC218"],"\uC6A9\uC5B8(\uB3D9\uC0AC,\uD615\uC6A9\uC0AC)":["\uB3D9","\uD615"],"\uC218\uC2DD\uC5B8(\uBD80\uC0AC,\uAD00\uD615\uC0AC)":["\uBD80","\uAD00"]},hc={difficulty:"\uB09C\uC774\uB3C4 \uB4F1\uAE09",syllables:"\uC74C\uC808 \uC218",syllable5plus:"5\uC74C\uC808 \uC774\uC0C1",partOfSpeech:"\uD488\uC0AC",wordType:"\uC720\uD615",field:"\uC758\uBBF8\uBC94\uC8FC",posMap:gc,typeMap:mc},au=new WeakMap;function yc(e,t){const n=au.get(e);if(n&&n.keys===t)return n.value;const o={grades:[],syls:[],poses:[],types:[],fields:[]},r={grade:o.grades,syllables:o.syls,pos:o.poses,wordType:o.types,field:o.fields};for(const[u,a]of Object.entries(e??{})){const i=u===t.difficulty?"grade":u===t.syllables?"syllables":u===t.partOfSpeech?"pos":u===t.wordType?"wordType":u===t.field?"field":qt(u);if(i)for(const s of Array.isArray(a)?a:typeof a=="string"?[a]:[])r[i].includes(s)||r[i].push(s)}return au.set(e,{keys:t,value:o}),o}function Sc(e,t,n=hc){const{grades:o,syls:r,poses:u,types:a}=yc(t,n);if(o.length){const i=o.map(s=>st("grade",s)??s.replace(/\D/g,"")).filter(s=>s!=="");if(i.length===0||!lo(i,e.grade))return!1}if(r.length){const i=e.syllables??0;if(!r.some(s=>{const d=s===n.syllable5plus?"5+":st("syllables",s);return d==="5+"?i>=5:i===parseInt(d??s)}))return!1}return!(u.length&&!u.flatMap(i=>n.posMap[i]??Ls[st("pos",i)??""]??[i]).some(i=>(e.pos??"").includes(i))||a.length&&!a.some(i=>e.wordType===(n.typeMap[i]??Rs[st("wordType",i)??""])))}const bc={labial:e=>e("common.phonetics.place.labial",{defaultValue:"\uC591\uC21C\uC74C"}),alveolar:e=>e("common.phonetics.place.alveolar",{defaultValue:"\uCE58\uC870\uC74C"}),palatal:e=>e("common.phonetics.place.palatal",{defaultValue:"\uACBD\uAD6C\uAC1C\uC74C"}),velar:e=>e("common.phonetics.place.velar",{defaultValue:"\uC5F0\uAD6C\uAC1C\uC74C"}),glottal:e=>e("common.phonetics.place.glottal",{defaultValue:"\uC131\uBB38\uC74C"})},wc={frontHigh:e=>e("common.phonetics.vowel.frontHigh",{defaultValue:"\uC804\uC124 \uACE0\uBAA8\uC74C"}),backHighUnrounded:e=>e("common.phonetics.vowel.backHighUnrounded",{defaultValue:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uD3C9\uC21C"}),backHighRounded:e=>e("common.phonetics.vowel.backHighRounded",{defaultValue:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C"}),frontMid:e=>e("common.phonetics.vowel.frontMid",{defaultValue:"\uC804\uC124 \uC911\uBAA8\uC74C"}),backMidUnrounded:e=>e("common.phonetics.vowel.backMidUnrounded",{defaultValue:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C"}),backMidRounded:e=>e("common.phonetics.vowel.backMidRounded",{defaultValue:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C"}),low:e=>e("common.phonetics.vowel.low",{defaultValue:"\uC800\uBAA8\uC74C"})},Ec={j:e=>e("common.phonetics.glide.j",{defaultValue:"j\uD65C\uC74C"}),w:e=>e("common.phonetics.glide.w",{defaultValue:"w\uD65C\uC74C"}),velar:e=>e("common.phonetics.glide.velar",{defaultValue:"\u0270\uD65C\uC74C"})};function lu(e,t){if("place"in t)return bc[t.place](e);const n=wc[t.vowel](e);return t.glide?`${n} \xB7 ${Ec[t.glide](e)}`:n}const Ac=(e,{defaultValue:t})=>t,iu=(e,t)=>({jamos:e,phonetic:t,tooltip:lu(Ac,t)}),Ue=(e,t)=>t.map(n=>iu([n],{place:e})),fe=(e,t,n)=>iu([...e],n?{vowel:t,glide:n}:{vowel:t}),bo={cho:[Ue("labial",["\u3142","\u3143","\u314D","\u3141"]),Ue("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),Ue("alveolar",["\u3145","\u3146"]),Ue("palatal",["\u3148","\u3149","\u314A"]),Ue("velar",["\u3131","\u3132","\u314B"]),Ue("glottal",["\u314E"])],jung:[[fe("\u3163","frontHigh"),fe("\u315F","frontHigh","w"),fe("\u3162","frontHigh","velar")],[fe("\u3161","backHighUnrounded")],[fe("\u315C","backHighRounded"),fe("\u3160","backHighRounded","j")],[fe("\u3154\u3150","frontMid"),fe("\u3156\u3152","frontMid","j"),fe("\u3159\u315A\u315E","frontMid","w")],[fe("\u3153","backMidUnrounded"),fe("\u3155","backMidUnrounded","j"),fe("\u315D","backMidUnrounded","w")],[fe("\u3157","backMidRounded"),fe("\u315B","backMidRounded","j")],[fe("\u314F","low"),fe("\u3151","low","j"),fe("\u3158","low","w")]],jong:[Ue("labial",["\u3142","\u3141"]),Ue("alveolar",["\u3137","\u3134","\u3139"]),Ue("velar",["\u3131","\u3147"])]},_c=[...Ce],Tc=[...Ae],Dc=Oe.filter(e=>e!==""),ze=e=>e===je?[]:Array.from(e),je="__NO_CODA__",su=[1,2,3,4],He=5,Nc=12,cu="SYL_",wo=e=>`${cu}${e}`,Oc=e=>Number(e.slice(cu.length));function Eo(e){return e>=He?Array.from({length:Nc-He+1},(t,n)=>He+n):[e]}const du={cho:_c,jung:Tc,jong:Dc},Ao=e=>e.map(t=>t.map(({jamos:n,phonetic:o,tooltip:r})=>({v:n.join(""),phonetic:o,tooltip:r}))),_o={cho:Ao(bo.cho),jung:Ao(bo.jung),jong:Ao(bo.jong)},fu={};_o.jung.flat().forEach(({v:e})=>{for(const t of ze(e))fu[t]=e});const vc=new Set(_o.cho.flat().map(e=>e.v));function pu(e,t){return e==="cho"?vc.has(t)?t:null:e==="jung"?fu[t]??t:xt(t)}function Cu(e,t,n){if(e==="jung"){const o=ze(t);return n&&o.includes(n)?n:o[0]??t}return e==="jong"&&n&&xt(n)===t?n:t}function mu(e,t,n,o){const r=(u,a)=>a?u==="jong"&&a===je?je:t==="pron"?pu(u,a):Cu(u,a,u==="jung"?n:u==="jong"?o:null):null;return{...e,cho:r("cho",e.cho),jung:r("jung",e.jung),jong:r("jong",e.jong)}}const To={cho:null,jung:null,jong:null,syllable:null},Do=e=>Array.isArray(e)?e.filter(Ds):[],Bc="wt_filter",gu=e=>`wt_filter_${e}`,No=["noun","verb","modifier"],Oo=["native","sino","foreign","mixed"];function hu(e,t,n,o,r){if(!Array.isArray(e))return[];const u=[];for(const a of e){if(typeof a!="string")continue;const i=t.includes(a)?a:t.find(s=>r.some(d=>o(d,n(s))===a));i&&!u.includes(i)&&u.push(i)}return u}function yu(e){try{const t=localStorage.getItem(gu(e))??localStorage.getItem(Bc);if(t)return JSON.parse(t)}catch{}return null}function Su(e){const t=e?.phonemeView;return t==="pron"?"pron":t==="direct"?"direct":"char"}function Lc(e){const t=e;return t?.composition?{cho:t.composition.cho??null,jung:t.composition.jung??null,jong:t.composition.jong??null,syllable:t.composition.syllable??null}:t?.choseong?{...To,cho:t.choseong}:To}const bu=["1\uB4F1\uAE09 : \uD559\uB839\uC804\uAE30\uC5D0 \uC2B5\uB4DD\uD558\uC5EC \uD3C9\uC0DD\uC5D0 \uAC78\uCCD0 \uC77C\uC0C1 \uC5B8\uC5B4\uC0DD\uD65C\uC744 \uD558\uB294 \uB370 \uC0AC\uC6A9\uB418\uB294 \uC5B4\uD718","2\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 1-2\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","3\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 3-4\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","4\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 5-6\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","\uB4F1\uAE09\uC5C6\uC74C : \uAD6D\uB9BD\uAD6D\uC5B4\uC6D0 \uD45C\uC900 \uC5B4\uD718 \uC678 \uACE0\uBE48\uB3C4 \uC0DD\uD65C \uC5B4\uD718, \uC2E0\uC870\uC5B4 \uBC0F \uC678\uB798\uC5B4"];function wu(e){const t=e("wordPairs.filter.difficultyInfo",{returnObjects:!0,defaultValue:bu});return Array.isArray(t)&&t.length>0&&t.every(n=>typeof n=="string")?t:bu}function Rc(e,t,n){const{t:o,i18n:r}=We.useTranslation(),[u]=c.useState(()=>n?.resetOnMount?null:yu(e)),[a,i]=c.useState(Su(u)),[s,d]=c.useState(()=>Lc(u)),m=c.useCallback(()=>t.requireSyllable?{cho:"\u3131",jung:"\u314F",jong:je,syllable:t.fixedSyllable??null}:{cho:null,jung:null,jong:t.fixedNoCoda?je:null,syllable:t.fixedSyllable??null},[t.requireSyllable,t.fixedSyllable,t.fixedNoCoda]);c.useEffect(()=>{!t.requireSyllable&&t.fixedSyllable==null&&!t.fixedNoCoda||d(E=>E.cho||E.jung||E.syllable!=null||E.jong?E:m())},[]);const f=c.useMemo(()=>ce(s.cho)||ce(s.jung)||ce(s.jong)?"count":"random",[s.cho,s.jung,s.jong]),g=c.useRef(a==="char"?s.jung:null),C=c.useRef(a==="char"?s.jong:null);c.useEffect(()=>{a==="char"&&(g.current=s.jung,C.current=s.jong)},[a,s.jung,s.jong]);const[h,w]=c.useState(n?.resetOnMount?!!n?.defaultImageOnly:u?.excludeNoImage??!0),[S,y]=c.useState(n?.resetOnMount?!1:u?.sameStructureOnly??!0),[b,_]=c.useState(Do(u?.gradeFilter)),D=Array.from(new Set([r.language,"ko","en"].filter(Boolean))),B=(E,$)=>r.getFixedT(E)($),M=E=>hu(E,No,$=>`wordSearch.filter.pos.${$}`,B,D),O=E=>hu(E,Oo,$=>`wordSearch.filter.type.${$}`,B,D),[R,x]=c.useState(()=>M(u?.posFilter)),[v,z]=c.useState(()=>O(u?.wordTypeFilter)),Z=c.useRef(n?.resetKey);c.useEffect(()=>{Z.current!==n?.resetKey&&(Z.current=n?.resetKey,d(m()),w(!!n?.defaultImageOnly),y(!1),_([]),x([]),z([]))},[n?.resetKey]);const V=nu(),F=c.useMemo(()=>Object.keys(V.posMap),[V]),k=c.useMemo(()=>Object.keys(V.typeMap),[V]),K=c.useMemo(()=>R.map(E=>F[No.indexOf(E)]).filter(Boolean),[R,F]),pe=c.useMemo(()=>v.map(E=>k[Oo.indexOf(E)]).filter(Boolean),[v,k]),[re,ve]=c.useState({cho:new Set,jung:new Set,jong:new Set,syllable:new Set}),[L,H]=c.useState(!1),[j,J]=c.useState(null),W=1,he=Math.max(1,[s.cho,s.jung,s.jong].filter(Boolean).length),[$e,ot]=c.useState(e);c.useEffect(()=>{if($e!==e){if(!n?.resetOnMount){const E=yu(e);d(E?.composition??m()),w(E?.excludeNoImage??!0),y(E?.sameStructureOnly??!0),i(Su(E)),_(Do(E?.gradeFilter)),x(M(E?.posFilter)),z(O(E?.wordTypeFilter))}ot(e)}},[e,$e,n?.resetOnMount]),c.useEffect(()=>{if(!n?.resetOnMount&&$e===e)try{localStorage.setItem(gu(e),JSON.stringify({contrastCount:he,composition:s,excludeNoImage:h,sameStructureOnly:S,phonemeView:a,gradeFilter:b,posFilter:R,wordTypeFilter:v}))}catch{}},[n?.resetOnMount,e,$e,he,s,h,S,a,b,R,v]);const[qe,Dt]=c.useState(0);Xn("wordpool:update",()=>Dt(E=>E+1)),Xn(Ar,()=>Dt(E=>E+1));const dn=c.useRef(r.language);c.useEffect(()=>{dn.current!==r.language&&(dn.current=r.language,Dt(E=>E+1))},[r.language]),c.useEffect(()=>{if(!t.choseong)return;let E=!1;return cc({difficulty:f,excludeNoImage:h}).then($=>{E||(ve($),H($.cho.size+$.jung.size+$.jong.size>0))}).catch(()=>{E||(ve({cho:new Set,jung:new Set,jong:new Set,syllable:new Set}),H(!1))}),()=>{E=!0}},[t.choseong,f,h,qe]),c.useEffect(()=>{let E=!1;const $=s,P=$.cho?ze($.cho):null,Y=$.jung?ze($.jung):null,Q=$.jong===je,Pe=Q?null:$.jong?ze($.jong):null,Be=$.syllable!=null?Eo($.syllable):null,Ge=!!(P||Y||Pe||Q||Be);return sc({difficulty:t.difficulty?f:null,contrastCount:t.difficulty?he:1,composition:t.choseong&&Ge?{cho:P,jung:Y,jong:Pe,jongNone:Q,syllable:Be}:null,excludeNoImage:h,sameStructureOnly:S,phonemeView:a==="pron"?"pron":"char",grade:b.length>0?b:null}).then(Xe=>{E||J(Xe)}).catch(()=>{E||J(null)}),()=>{E=!0}},[t.choseong,t.difficulty,f,he,s,a,h,S,qe,b]),c.useEffect(()=>{L&&d(E=>{const $={...E};let P=!1;return["cho","jung","jong"].forEach(Y=>{const Q=E[Y];!Q||Q===je||ze(Q).some(Pe=>re[Y].has(Pe))||($[Y]=null,P=!0)}),E.syllable!=null&&t.fixedSyllable==null&&(E.syllable>=He?[...re.syllable].some(Y=>Y>=He)||($.syllable=null,P=!0):(!re.syllable.has(E.syllable)||E.syllable<W)&&($.syllable=null,P=!0)),P?$:E})},[re,L,W,t.fixedSyllable]);const Nt=c.useMemo(()=>{const E=$=>{const P=new Set;for(const Y of du[$])re[$].has(Y)&&P.add(Y);return P};return{cho:E("cho"),jung:E("jung"),jong:E("jong")}},[re]),Ot=c.useMemo(()=>({exact:new Set(su.filter(E=>re.syllable.has(E))),min:[...re.syllable].some(E=>E>=He)}),[re]),U=c.useMemo(()=>({composition:o("wordPairs.composition","\uC815\uB2F5 \uB2E8\uC5B4 \uAD6C\uC131"),syllableCount:o("wordPairs.syllableCount","\uC74C\uC808 \uC218"),onset:o("wordPairs.onset","\uCD08\uC131"),vowel:o("wordPairs.vowel","\uBAA8\uC74C"),coda:o("wordPairs.coda","\uC885\uC131"),phonemeGroup:o("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),trainOnset:o("training.filter.trainOnset",{defaultValue:"\uCD08\uC131"}),trainVowel:o("training.filter.trainVowel",{defaultValue:"\uBAA8\uC74C"}),trainCoda:o("training.filter.trainCoda",{defaultValue:"\uC885\uC131"}),random:o("training.filter.random","\uBB34\uC791\uC704"),exclude:o("wordSearch.filter.exclude","\uC81C\uC678"),selectLabel:o("training.filter.selectSection",{defaultValue:"\uC120\uD0DD"}),none:o("common.none","\uC5C6\uC74C"),noImage:o("wordSearch.filter.excludeNoImage","\uC774\uBBF8\uC9C0 \uC5C6\uC74C"),excludeImage:o("training.filter.excludeImage",{defaultValue:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC"}),sameStructure:o("training.filter.sameStructure",{defaultValue:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC"}),noLimit:o("training.filter.noLimit",{defaultValue:"\uBB34\uAD00"}),codaExclude:o("training.filter.codaExclude",{defaultValue:"\uC81C\uC678"}),gradeLabel:o("training.filter.gradeLabel",{defaultValue:"\uB09C\uC774\uB3C4 \uB4F1\uAE09"})}),[o]),ne=c.useMemo(()=>({[U.trainOnset]:"cho",[U.trainVowel]:"jung",[U.trainCoda]:"jong"}),[U]),Je=c.useCallback((E,$)=>({title:$,items:E}),[]),ee=c.useMemo(()=>[o("training.filter.excludeImageInfo",{defaultValue:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC: \uB2E8\uC5B4 \uC911\uC5D0 \uC774\uBBF8\uC9C0\uAC00 \uC788\uB294 \uB2E8\uC5B4\uB9CC \uACB0\uACFC\uC5D0 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4."}),o("training.filter.sameStructureInfo",{defaultValue:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC: \uC815\uB2F5\uACFC \uC624\uB2F5\uC758 \uC74C\uC808 \uAD6C\uC870(\uAE00\uC790 \uC218\xB7\uBC1B\uCE68 \uC720\uBB34 \uB4F1)\uAC00 \uAC19\uC740 \uACB0\uACFC\uB9CC \uB0A8\uACA8\uC694."})],[o]),vt=c.useMemo(()=>{const E=[];if(t.choseong){const $={value:je,displayLabel:U.codaExclude},P=t.fixedNoCoda===!0,Y=(Q,Pe)=>{const Be=P&&Q==="jong",Ge={label:Pe,groupLabel:U.phonemeGroup,allOption:!t.requireSyllable,allLabel:U.noLimit,allOptionDisabled:Be};if(a==="pron"){const Ee=_o[Q].map(ft=>ft.map(({v:Qe,phonetic:Cn})=>{const pt=ze(Qe),Lt=lu(o,Cn),Ct=Be||!pt.some(Rt=>re[Q].has(Rt));return pt.length>1?{value:Qe,labels:pt,tooltip:Lt,disabled:Ct}:{value:Qe,tooltip:Lt,disabled:Ct}}));return Q==="jong"&&!t.requireCoda&&Ee.unshift([$]),{...Ge,groups:Ee}}const Xe=du[Q].map(Ee=>!Be&&Nt[Q].has(Ee)?Ee:{value:Ee,disabled:!0});return{...Ge,items:Q==="jong"&&!t.requireCoda?[$,...Xe]:Xe}};E.push(Y("cho",U.trainOnset)),E.push(Y("jung",U.trainVowel)),E.push(Y("jong",U.trainCoda))}if(E.push({...ou(o,V,{labelInfo:Je(wu(o))}),label:U.gradeLabel}),t.partOfSpeech&&E.push(ru(V)),t.wordType&&E.push(uu(V)),t.choseong||t.fixedSyllable!=null){const $=t.fixedSyllable;E.push({label:U.syllableCount,items:[...su.map(P=>({value:wo(P),displayLabel:o("wordPairs.syllableN",{n:P,defaultValue:"{{n}}\uC74C\uC808"}),disabled:$!=null?P!==$:!Ot.exact.has(P)||P<W})),{value:wo(He),displayLabel:o("wordPairs.syllableNPlus",{n:He,defaultValue:"{{n}}\uC74C\uC808 \uC774\uC0C1"}),disabled:$!=null?He!==$:!Ot.min}],allOption:!0,allOptionDisabled:$!=null})}return t.choseong?E.push({label:U.exclude,displayLabel:U.selectLabel,multiple:!0,items:[U.excludeImage,U.sameStructure],labelInfo:Je(ee)}):E.push({label:U.exclude,displayLabel:U.selectLabel,multiple:!0,items:[U.excludeImage],labelInfo:Je([ee[0]])}),E},[t.choseong,t.partOfSpeech,t.wordType,t.requireSyllable,t.fixedSyllable,t.fixedNoCoda,t.requireCoda,W,Nt,re,a,Ot,U,o,Je,ee,V]),Ne={...(t.choseong||t.fixedSyllable!=null)&&s.syllable!=null?{[U.syllableCount]:wo(s.syllable)}:{},...t.choseong&&s.cho?{[U.trainOnset]:s.cho}:{},...t.choseong&&s.jung?{[U.trainVowel]:s.jung}:{},...t.choseong&&s.jong?{[U.trainCoda]:s.jong}:{},[U.exclude]:[...h?[U.excludeImage]:[],...S?[U.sameStructure]:[]],[U.gradeLabel]:b.map(E=>Ps("grade",E)),...t.partOfSpeech?{[V.partOfSpeech]:K}:{},...t.wordType?{[V.wordType]:pe}:{}},rt=c.useCallback((E,$)=>{if($===U.exclude)E===U.excludeImage?w(P=>!P):E===U.sameStructure&&y(P=>!P);else if($===U.syllableCount)d(P=>{if(!E||E===Fe)return{...P,syllable:null};const Y=Oc(E);return{...P,syllable:P.syllable===Y?null:Y}});else if($===U.gradeLabel){if(!E||E===Fe){_([]);return}const P=st("grade",E);if(P==null)return;_(Y=>Y.includes(P)?Y.filter(Q=>Q!==P):[...Y,P])}else if($===V.partOfSpeech){if(!E||E===Fe){x([]);return}const P=No[F.indexOf(E)]??M([E])[0];if(!P)return;x(Y=>Y.includes(P)?Y.filter(Q=>Q!==P):[...Y,P])}else if($===V.wordType){if(!E||E===Fe){z([]);return}const P=Oo[k.indexOf(E)]??O([E])[0];if(!P)return;z(Y=>Y.includes(P)?Y.filter(Q=>Q!==P):[...Y,P])}else{const P=ne[$];if(!P)return;d(Y=>t.requireSyllable?E&&E!==Fe?{...Y,[P]:E}:Y:!E||E===Fe||Y[P]===E?{...Y,[P]:null}:{...Y,[P]:E})}},[U,ne,V,F,k,t.requireSyllable]),fn=c.useCallback(E=>!t.partOfSpeech&&!t.wordType?!0:Sc(E,{...t.partOfSpeech?{[V.partOfSpeech]:K}:{},...t.wordType?{[V.wordType]:pe}:{}},V),[t.partOfSpeech,t.wordType,K,pe,V]),Ie=c.useCallback(E=>{E!==a&&(E!=="direct"&&a!=="direct"&&d($=>mu($,E,g.current,C.current)),i(E))},[a]),pn=c.useCallback(()=>({composition:s,contrastCount:he,excludeNoImage:h,sameStructureOnly:S,phonemeView:a,gradeFilter:b,posFilter:R,wordTypeFilter:v}),[s,he,h,S,a,b,R,v]),Bt=c.useCallback(E=>{d(E.composition),w(E.excludeNoImage),y(E.sameStructureOnly??!0),i(E.phonemeView),_(Do(E.gradeFilter)),Array.isArray(E.posFilter)&&x(M(E.posFilter)),Array.isArray(E.wordTypeFilter)&&z(O(E.wordTypeFilter))},[]);return{difficulty:f,contrastCount:he,composition:s,choseong:s.cho,excludeNoImage:h,sameStructureOnly:S,gradeFilter:b,posFilter:K,wordTypeFilter:pe,matchesWordAttributes:fn,poolVersion:qe,filterSections:vt,filterSelected:Ne,handleFilterSelect:rt,phonemeView:a,setPhonemeView:Ie,phonemeGroupLabel:U.phonemeGroup,wordCount:j,getFilterSnapshot:pn,restoreFilterSnapshot:Bt}}function Mc(e){const t=i=>i?ze(i):null,n=t(e.cho),o=t(e.jung),r=e.jong===je,u=r?null:t(e.jong),a=e.syllable!=null?Eo(e.syllable):null;return!n&&!o&&!u&&!r&&!a?null:{cho:n,jung:o,jong:u,jongNone:r,syllable:a}}function Ic(e,t,n,o,r,u,a=!0,i="char",s=[]){const[d,m]=c.useState({}),[f,g]=c.useState(!1),{cho:C=null,jung:h=null,jong:w=null,syllable:S=null}=o??{},y=s.length>0?s.slice().sort().join(","):"",b=e.map(D=>D.key).join("|");c.useEffect(()=>{u>0&&ic(r).catch(()=>{})},[u,r]),c.useEffect(()=>{let D=!1;return g(!0),(async()=>{const B=Mc({cho:C,jung:h,jong:w,syllable:S}),M=`${C??""}_${h??""}_${w??""}_${S??""}_${y}`,O={};await Promise.all(e.map(async R=>{const x=eo[R.key];try{const v=await tu(R.key,{difficulty:x.difficulty?t:null,contrastCount:x.difficulty?n:1,composition:x.choseong?B:null,count:5,excludeNoImage:r,sameStructureOnly:a,phonemeView:i,grade:s.length>0?s:null});v&&v.length>0?O[R.key]={id:`wt-${R.key}-${t}-${M}-${Date.now()}`,name:R.label,training_type:R.key,category_main_code:"WORD",iconColor:R.color,subTitle:R.subTitle,items:v,itemCount:v.length}:O[R.key]={id:`wt-${R.key}-empty`,name:R.label,training_type:R.key,category_main_code:"WORD",iconColor:R.color,subTitle:R.subTitle,items:[],itemCount:0,__empty:!0}}catch{O[R.key]=null}})),D||(m(O),g(!1))})(),()=>{D=!0}},[t,n,C,h,w,S,r,a,i,u,y,b]);const _=JSON.stringify(e.map(D=>[D.key,D.label,D.color,D.subTitle]));return{perTypeData:c.useMemo(()=>{const D={};for(const[B,M]of Object.entries(d)){const O=e.find(R=>R.key===B);D[B]=M&&O?{...M,name:O.label,iconColor:O.color,subTitle:O.subTitle}:M}return D},[d,_]),generating:f}}const Xt=[],Qt=[],Zt=[],en=[],In={LISTEN_IN_NOISE:[],SHORT_STORY:[],LONG_STORY:[],ORDERING_SENTENCE:[]},Pn={LISTEN_IN_NOISE:[],SHORT_STORY:[],LONG_STORY:[],ORDERING_SENTENCE:[]},Pc={LISTEN_IN_NOISE:3,SHORT_STORY:2,LONG_STORY:1,ORDERING_SENTENCE:2};let vo=null,Eu=null,Ke=null;function kc({counts:e,forceRefresh:t}={}){const n=Object.assign({},Pc,e||{}),o=Pt(),r=kt(new Date(`${o}T00:00:00+09:00`).getTime()-864e5),u=JSON.stringify(n);if(!t&&Eu===o&&vo===u&&Ke)return Object.assign(In,Ke.today),Object.assign(Pn,Ke.yesterday?.selection||{LISTEN_IN_NOISE:[],SHORT_STORY:[],LONG_STORY:[],ORDERING_SENTENCE:[]}),{today:In,yesterday:Pn};const a={LISTEN_IN_NOISE:Ve(Xt,Math.max(0,Number(n.LISTEN_IN_NOISE)||0)),SHORT_STORY:Ve(Qt,Math.max(0,Number(n.SHORT_STORY)||0)),LONG_STORY:Ve(Zt,Math.max(0,Number(n.LONG_STORY)||0)),ORDERING_SENTENCE:Ve(en,Math.max(0,Number(n.ORDERING_SENTENCE)||0))};let i=null;return Ke&&vo===u&&Ke.yesterday&&Ke.yesterday.date===r&&(i=Ke.yesterday.selection),i||(i={LISTEN_IN_NOISE:Ve(Xt,Math.max(0,Number(n.LISTEN_IN_NOISE)||0)),SHORT_STORY:Ve(Qt,Math.max(0,Number(n.SHORT_STORY)||0)),LONG_STORY:Ve(Zt,Math.max(0,Number(n.LONG_STORY)||0)),ORDERING_SENTENCE:Ve(en,Math.max(0,Number(n.ORDERING_SENTENCE)||0))}),Object.assign(In,a),Object.assign(Pn,i),Eu=o,vo=u,Ke={today:a,yesterday:{date:r,countsKey:u,selection:i}},{today:In,yesterday:Pn}}let Bo=!1,tn=null;async function xc(){try{const e={url:typeof document>"u"?require("url").pathToFileURL(__filename).href:Jn&&Jn.tagName.toUpperCase()==="SCRIPT"&&Jn.src||new URL("hooks.cjs.js",document.baseURI).href}&&void 0||"/",t=await fetch(`${e}data/allTrainingData.json`);return t.ok?await t.json():null}catch{return null}}async function Fc(){if(!Bo)return tn||(tn=(async()=>{const e=await xc();if(!e){tn=null;try{window.dispatchEvent(new Event("speechear.data.error"))}catch{}return}const t={noise:[],short:[],long:[],order:[]};try{if(typeof e!="object"||Array.isArray(e))throw new Error("Invalid training data map");for(const n of Object.keys(e)){const o=e[n];if(!Array.isArray(o))throw new Error("Invalid training data group");for(const r of o){if(!r||typeof r!="object")continue;const u=r,a=String(u.training_type||n),i=String(u.category_main_code||u.category_main||u.category_0||""),s=String(u.category_sub_code||u.category_sub||u.category_1||""),d=Object.assign({},u,{training_type:a,category_0:i,category_1:s});a==="LISTEN_IN_NOISE"?t.noise.push(d):a==="SHORT_STORY"?t.short.push(d):a==="LONG_STORY"?t.long.push(d):a==="ORDERING_SENTENCE"&&t.order.push(d)}}}catch{tn=null;try{window.dispatchEvent(new Event("speechear.data.error"))}catch{}return}Xt.push(...t.noise),Qt.push(...t.short),Zt.push(...t.long),en.push(...t.order),Bo=!0,Ke=null;try{kc()}catch{}try{window.dispatchEvent(new Event("speechear.data.updated"))}catch{}})(),tn)}async function jc(e=3e3){const t=Fc();let n;try{await Promise.race([t,new Promise(o=>{n=setTimeout(o,e)})])}finally{n!==void 0&&clearTimeout(n)}return Bo}function Au(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function Hc(e){let t=e>>>0;return()=>{t|=0,t=t+1831565813|0;let n=Math.imul(t^t>>>15,1|t);return n=n+Math.imul(n^n>>>7,61|n)^n,((n^n>>>14)>>>0)/4294967296}}const $c=Ve,Gc=e=>{const[t,n,o]=e.split("-").map(Number);return Math.round(Date.UTC(t,(n||1)-1,o||1)/864e5)},Wc=(e,t)=>{const n=e??{};return String(n.id??n.name??t)};function kn(e,t,n,o,r){if(!e.length||t<=0)return[];const u=Hc(Au(`${n}|${o}|${r}`)),a=Gc(o)&1,i=e.filter((d,m)=>(Au(`${n}|${r}|${Wc(d,m)}`)>>>7&1)===a),s=i.length>=t&&e.length-i.length>=t;return $c(s?i:e,t,u)}function Lo(e,t,n){const o=r=>Math.max(0,e[r]||0);return{LISTEN_IN_NOISE:kn(Xt,o("LISTEN_IN_NOISE"),t,n,"LISTEN_IN_NOISE"),SHORT_STORY:kn(Qt,o("SHORT_STORY"),t,n,"SHORT_STORY"),LONG_STORY:kn(Zt,o("LONG_STORY"),t,n,"LONG_STORY"),ORDERING_SENTENCE:kn(en,o("ORDERING_SENTENCE"),t,n,"ORDERING_SENTENCE")}}function Ro(e){return e?!!(e.LISTEN_IN_NOISE?.length||e.SHORT_STORY?.length||e.LONG_STORY?.length||e.ORDERING_SENTENCE?.length):!1}const Vc={LISTEN_IN_NOISE:3,SHORT_STORY:2,LONG_STORY:1,ORDERING_SENTENCE:2};function Mo(e=!1,t=Vc,n){const o=Date.now(),r=kt(o),u=kt(o-864e5),a=n??"";return Xt.length>0||Qt.length>0||Zt.length>0||en.length>0?{today:Lo(t,a,r),yesterday:Lo(t,a,u)}:{today:Lo(t,a,r),yesterday:null}}function Yc(e){const t=c.useRef({LISTEN_IN_NOISE:[],SHORT_STORY:[],LONG_STORY:[],ORDERING_SENTENCE:[]}),n=c.useRef(null),[o,r]=c.useState(!1),[u,a]=c.useState(!1),[i,s]=c.useState(0),[d,m]=c.useState(!1),[f,g]=c.useState(()=>Pt()),C=JSON.stringify([e??"",f]),h=c.useRef(null),w=c.useRef(C);c.useEffect(()=>{const y=()=>{const _=Date.now(),D=new Date(_+9*36e5),B=Date.UTC(D.getUTCFullYear(),D.getUTCMonth(),D.getUTCDate()+1)-9*36e5;return Math.max(1e3,B-_+1e3)};let b=setTimeout(function _(){g(Pt()),b=setTimeout(_,y())},y());return()=>clearTimeout(b)},[]),c.useEffect(()=>{w.current=C,h.current=null,r(!1),m(!1);let y=!1,b=!1,_=!1,D,B=0,M=null,O=0;const R=40,x=()=>{D!==void 0&&(clearInterval(D),D=void 0)};let v=!1;try{const k=new URLSearchParams(window.location.search),K=k.get("forceRefresh")||k.get("force");v=K==="1"||K==="true"}catch{}const z=k=>{b||(_=!0,h.current=C,t.current=k.today,n.current=k.yesterday,r(!0),m(!0),s(K=>K+1),y=!0,x())},Z=async()=>{if(y)return;if(!v){const K=Mo(!1,void 0,e);if(Ro(K.today)){z(K);return}}if(M){++B>=R&&V();return}if(B>=O){O=B+8,M=jc(3e3).catch(()=>!1);try{await M}finally{M=null}if(y)return}const k=Mo(v,void 0,e);if(Ro(k.today)){z(k);return}++B>=R&&V()};function V(){r(!0),m(!1),y=!0,x()}const F=()=>{if(b||_)return;const k=Mo(v,void 0,e);Ro(k.today)&&z(k)};try{window.addEventListener("speechear.data.updated",F)}catch{}return D=setInterval(Z,250),Z(),()=>{y=!0,b=!0,x();try{window.removeEventListener("speechear.data.updated",F)}catch{}}},[e,f]);const S=c.useCallback(y=>{if(h.current!==C)return;const b=u?n.current:t.current,_=u?t.current:n.current;return b?.[y]?.length?b[y]:_?.[y]?.length?_[y]:void 0},[u,i,C]);return{loaded:w.current===C&&o,hasData:w.current===C&&d,showYesterday:u,setShowYesterday:a,getTrainingPerType:S}}const At=[];let xn=!1;function _u(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const t=At[At.length-1];t&&(e.stopPropagation(),t())}function Tu(e){return At.push(e),!xn&&typeof document<"u"&&(document.addEventListener("keydown",_u),xn=!0),()=>{const t=At.lastIndexOf(e);t>=0&&At.splice(t,1),At.length===0&&xn&&typeof document<"u"&&(document.removeEventListener("keydown",_u),xn=!1)}}function Uc(e,t=!0){const n=gr(e);c.useEffect(()=>{if(t)return Tu(()=>{n.current?.()})},[t,n])}const Io=(e,t)=>`${e}:${t??1}`,nn=new Map,Po=new Set,ko=new Map,Fn=6e4;function zc(e,t){const[n,o]=c.useState(0),[r,u]=c.useState(0),a=JSON.stringify(Array.from(new Set(e.map(i=>Io(i.word,i.homonum)))).sort());return c.useEffect(()=>{const i=JSON.parse(a),s=Date.now(),d=i.filter(w=>!nn.has(w)&&!Po.has(w)&&!(s-(ko.get(w)??-1/0)<Fn));let m=!1,f=null,g=1/0;const C=(w=Fn)=>{if(m)return;const S=Date.now()+w;S>=g||(f!==null&&clearTimeout(f),g=S,f=setTimeout(()=>u(y=>y+1),w))};for(const w of i){if(nn.has(w)||Po.has(w))continue;const S=ko.get(w);S!=null&&s-S<Fn&&C(Math.max(0,Fn-(s-S)))}if(d.length===0)return()=>{m=!0,f!==null&&clearTimeout(f)};const h=Array.from(new Set(d.map(w=>w.slice(0,w.lastIndexOf(":")))));return Promise.resolve().then(()=>t(h)).then(w=>{for(const S of w)S.Meaning&&nn.set(Io(S.Word,S.Homonum??void 0),S.Meaning);if(w.length>0)for(const S of d)nn.has(S)||Po.add(S);else{const S=Date.now();for(const y of d)ko.set(y,S);C()}m||w.length===0||o(S=>S+1)}).catch(()=>{C()}),()=>{m=!0,f!==null&&clearTimeout(f)}},[a,t,r]),c.useMemo(()=>{const i=JSON.parse(a),s=new Map;for(const d of i){const m=nn.get(d);m!=null&&s.set(d,m)}return s},[a,n])}function Kc(){const[e,t]=c.useState(null),n=c.useCallback(u=>t(u.getBoundingClientRect()),[]),o=c.useCallback(()=>t(null),[]),r=c.useCallback(u=>{const a=u.getBoundingClientRect();t(i=>i?null:a)},[]);return{anchorRect:e,isOpen:e!=null,openAt:n,close:o,toggleAt:r}}function qc(e){const[t,n]=c.useState(null),[o,r]=c.useState(null),u=c.useRef(null);c.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]);const a=c.useCallback((s,d)=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{n(s),r(d)},e)},[e]),i=c.useCallback(()=>{u.current&&clearTimeout(u.current),n(null),r(null)},[]);return{payload:t,anchorRect:o,openAfterDelay:a,close:i}}function Jc(e,t,n){const o=Number.isFinite(t)&&t>=1?Math.floor(t):1,r=Math.max(1,Math.ceil(e.length/o)),u=Number.isFinite(n)?Math.min(Math.max(1,Math.floor(n)),r):1;return{pageItems:c.useMemo(()=>e.slice((u-1)*o,u*o),[e,u,o]),totalPages:r,curPage:u}}function Du(e,t){const[n,o]=c.useState(e);n!==e&&(o(e),t(1))}function Xc(e={}){const{defaultPageSize:t="25",resetOn:n}=e,[o,r]=c.useState(""),[u,a]=c.useState(t),[i,s]=c.useState(1),d=g=>{const C=Number(g);return Number.isFinite(C)&&C>=1?Math.floor(C):null},m=d(t)??25,f=d(u)??m;return Du(JSON.stringify([o,u,...n??[]]),s),{query:o,setQuery:r,pageSize:u,setPageSize:a,perPage:f,page:i,setPage:s}}function Qc(e="warning"){const[t,n]=c.useState(""),[o,r]=c.useState(e),[u,a]=c.useState(0),i=c.useCallback((f,g)=>{r(g),n(f),a(C=>C+1)},[]),s=c.useCallback(f=>i(f,"warning"),[i]),d=c.useCallback(f=>i(f,"normal"),[i]),m=c.useCallback(()=>n(""),[]);return{toastMessage:t,toastType:o,toastKey:u,showToast:i,showWarning:s,showNormal:d,clearToast:m}}const Zc=[{key:"LISTEN_IN_NOISE",label:"\uC18C\uC74C \uD558 \uBB38\uC7A5 \uB4E3\uAE30",icon:"audio-lines",desc:"\uB2E4\uC591\uD55C \uC18C\uC74C \uD658\uACBD\uC5D0\uC11C \uBB38\uC7A5 \uCCAD\uB825\uC744 \uD6C8\uB828\uD569\uB2C8\uB2E4."},{key:"SHORT_STORY",label:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square",desc:"\uC9E7\uC740 \uC774\uC57C\uAE30\uB97C \uB4E3\uACE0 \uAE30\uC5B5\uD558\uC5EC \uBB38\uC81C\uB97C \uD480\uC5B4\uBD05\uB2C8\uB2E4."},{key:"LONG_STORY",label:"\uAE34 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square-text",desc:"\uAE34 \uC774\uC57C\uAE30\uB97C \uB4E3\uACE0 \uAE30\uC5B5\uD558\uC5EC \uB2E4\uC218\uC758 \uBB38\uC81C\uB97C \uD480\uC5B4\uBD05\uB2C8\uB2E4."},{key:"ORDERING_SENTENCE",label:"\uBB38\uC7A5 \uC21C\uC11C\uD654 \uD558\uAE30",icon:"align-start-vertical",desc:"\uC5EC\uB7EC\uAC1C\uC758 \uC9E7\uC740 \uBB38\uC7A5\uC744 \uB4E3\uACE0 \uAE30\uC5B5\uD558\uC5EC \uADF8 \uC21C\uC11C\uC5D0 \uB9DE\uAC8C \uBC30\uC5F4\uD569\uB2C8\uB2E4."}],ed={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function td(e){return Zc.map(t=>{const n=ed[t.key];return n?{...t,label:e(`trainingType.${n}.title`),desc:e(`trainingType.${n}.desc`)}:t})}const on={blue:"#60A5FA",green:"#4ADE80",amber:"#FBBF24",purple:"#A78BFA",pink:"#F472B6"},rn=on.blue,jn=on.green,un=on.amber,Hn=on.purple,nd=on.pink,od=[{key:"discrimination",label:"\uBCC0\uBCC4\uD6C8\uB828",disc:"\uB450 \uC18C\uB9AC\uAC00 \uAC19\uC740\uC9C0 \uB2E4\uB978\uC9C0, \uB610\uB294 \uD2B9\uC815 \uC18C\uB9AC\uB97C \uAD6C\uBCC4\uD558\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"ear",types:[{key:"SAME_SOUND_PICK",label:"\uAC19\uC740 \uC18C\uB9AC \uACE0\uB974\uAE30",icon:"volume-2",color:rn,subTitle:"\uB4E4\uC740 \uC18C\uB9AC\uC640 \uAC19\uC740 \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},{key:"SAME_OR_DIFF",label:"\uAC19\uC740\uC9C0 \uB2E4\uB978\uC9C0 \uB9DE\uD788\uAE30",icon:"diff",color:rn,subTitle:"\uB450 \uC18C\uB9AC\uAC00 \uAC19\uC740\uC9C0, \uB2E4\uB978\uC9C0 \uAD6C\uBD84\uD558\uC138\uC694."},{key:"HEAR_AND_PICK_SAME",label:"\uC77C\uCE58\uD558\uB294 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",icon:"headphones",color:rn,subTitle:"\uB4E4\uC740 \uC18C\uB9AC\uC758 \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},{key:"HEAR_AND_PICK_INCLUDED",label:"\uD55C \uC74C\uC808 \uD3EC\uD568 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",icon:"scan-search",color:rn,subTitle:"\uB4E4\uC740 \uC74C\uC808\uC774 \uD3EC\uD568\uB41C \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},{key:"STARTS_WITH_SAME_SOUND",label:"\uCCAB \uC74C\uC808\uC774 \uAC19\uC740 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",icon:"play-circle",color:rn,subTitle:"\uB4E4\uC740 \uB2E8\uC5B4\uC640 \uAC19\uC740 \uC18C\uB9AC\uB85C \uC2DC\uC791\uD558\uB294 \uB2E8\uC5B4\uB97C \uACE0\uB974\uC138\uC694."}]},{key:"synthesis",label:"\uD569\uC131\uD6C8\uB828",disc:"\uB450 \uAC1C \uC774\uC0C1\uC758 \uC74C\uC808\uC774\uB098 \uC74C\uC18C\uB97C \uD569\uCCD0 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"git-merge",types:[{key:"MERGE_2_SYLLABLES",label:"\uC74C\uC808 2\uAC1C \uD569\uCE58\uAE30",icon:"link-2",color:jn,subTitle:"\uB450 \uC74C\uC808\uC744 \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},{key:"MERGE_3_SYLLABLES",label:"\uC74C\uC808 3\uAC1C \uD569\uCE58\uAE30",icon:"git-merge",color:jn,subTitle:"\uC138 \uC74C\uC808\uC744 \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},{key:"MERGE_2_PHONEMES",label:"\uC74C\uC18C 2\uAC1C \uD569\uCE58\uAE30",icon:"combine",color:jn,subTitle:"\uB450 \uC74C\uC18C\uB97C \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},{key:"MERGE_3_PHONEMES",label:"\uC74C\uC18C 3\uAC1C \uD569\uCE58\uAE30",icon:"braces",color:jn,subTitle:"\uC138 \uC74C\uC18C\uB97C \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"}]},{key:"deletion",label:"\uD0C8\uB77D\uD6C8\uB828",disc:"\uB2E8\uC5B4\uC5D0\uC11C \uC74C\uC808\uC774\uB098 \uC74C\uC18C\uB97C \uC81C\uAC70\uD588\uC744 \uB54C \uB0A8\uB294 \uC18C\uB9AC\uB97C \uC778\uC2DD\uD558\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"scissors",types:[{key:"DROP_1_FROM_2SYLL",label:"2\uC74C\uC808\uC5D0\uC11C 1\uC74C\uC808 \uD0C8\uB77D",icon:"scissors",color:un,subTitle:"2\uC74C\uC808 \uB2E8\uC5B4\uC5D0\uC11C \uD55C \uC74C\uC808\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},{key:"DROP_1_FROM_3SYLL",label:"3\uC74C\uC808\uC5D0\uC11C 1\uC74C\uC808 \uD0C8\uB77D",icon:"minus-circle",color:un,subTitle:"3\uC74C\uC808 \uB2E8\uC5B4\uC5D0\uC11C \uD55C \uC74C\uC808\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},{key:"DROP_PART_FROM_COMPOUND",label:"\uD569\uC131\uC5B4\uC5D0\uC11C \uBD80\uBD84\uD0C8\uB77D",icon:"unlink",color:un,subTitle:"\uD569\uC131\uC5B4\uC758 \uC77C\uBD80\uB97C \uBE7C\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},{key:"DROP_FINAL_CONSONANT_FROM_1SYLL",label:"1\uC74C\uC808\uC5D0\uC11C \uBC1B\uCE68 \uD0C8\uB77D",icon:"eraser",color:un,subTitle:"\uBC1B\uCE68\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},{key:"REMOVE_CONSONANT_AND_IDENTIFY_PHONEME",label:"1\uC74C\uC808\uC5D0\uC11C \uC790\uC74C \uD0C8\uB77D",icon:"audio-lines",color:un,subTitle:"\uC790\uC74C\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB0A8\uC744\uAE4C\uC694?"}]},{key:"substitution",label:"\uB300\uCE58\uD6C8\uB828",disc:"\uB2E8\uC5B4\uC758 \uC77C\uBD80 \uC74C\uC808\uC774\uB098 \uC74C\uC18C\uB97C \uBC14\uAFB8\uC5B4 \uC0C8\uB85C\uC6B4 \uC18C\uB9AC\uB97C \uB9CC\uB4DC\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"replace",types:[{key:"CHANGE_1_SYLL_IN_2SYLL",label:"2\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uBC14\uAFB8\uAE30",icon:"replace",color:Hn,subTitle:"2\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC808\uC744 \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."},{key:"CHANGE_1_SYLL_IN_3SYLL",label:"3\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uBC14\uAFB8\uAE30",icon:"shuffle",color:Hn,subTitle:"3\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC808\uC744 \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."},{key:"CHANGE_1_PHONEME_IN_1SYLL",label:"1\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC18C \uBC14\uAFB8\uAE30",icon:"arrow-right-left",color:Hn,subTitle:"1\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC18C\uB97C \uBC14\uAFD4 \uC0C8 \uC18C\uB9AC\uB97C \uB9CC\uB4DC\uC138\uC694."},{key:"CHANGE_1_PHONEME_IN_2SYLL",label:"2\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC18C \uBC14\uAFB8\uAE30",icon:"flip-horizontal",color:Hn,subTitle:"2\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC18C\uB97C \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."}]},{key:"attention",label:"\uCCAD\uAC01\uC801\uC8FC\uC758\uB825\uD6C8\uB828",disc:"\uC5EC\uB7EC \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uC21C\uC11C\uB97C \uAE30\uC5B5\uD558\uB294 \uC8FC\uC758\uB825\uACFC \uB2E8\uAE30 \uAE30\uC5B5 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"list-ordered",types:[{key:"LISTEN_AND_REMEMBER_ORDER",label:"\uB4E3\uACE0 \uC21C\uC11C\uB300\uB85C \uAE30\uC5B5\uD558\uAE30",icon:"list-ordered",color:nd,subTitle:"\uC138 \uB2E8\uC5B4\uB97C \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694."}]}];function rd(){const{t:e}=We.useTranslation();return c.useMemo(()=>{const t=Object.fromEntries(td(e).map(o=>[o.key,o.label])),n={...t};return od.flatMap(o=>o.types).forEach(o=>{n[o.key]=e(`trainingType.${o.key}.label`,{defaultValue:o.label})}),{sentence:t,all:n}},[e])}function ud({computeStyle:e,onScroll:t="close",onResize:n="close",ignoreOutsideClickSelector:o}){const[r,u]=c.useState(!1),[a,i]=c.useState({position:"fixed"}),s=c.useRef(null),d=c.useRef(null),m=c.useCallback(()=>{s.current&&i(e(s.current.getBoundingClientRect(),s.current))},[e]);c.useLayoutEffect(()=>{r&&m()},[r,m]),c.useEffect(()=>{if(!r)return;let C=d.current?.offsetHeight??0;C>0&&m();let h=0,w=null;typeof ResizeObserver<"u"&&d.current&&(w=new ResizeObserver(()=>{const O=d.current?.offsetHeight??0;if(O!==C){if(C=O,++h>4){w?.disconnect(),w=null;return}m()}}),w.observe(d.current));const S=O=>{const R=O.target;o&&R.closest?.(o)||s.current?.contains(R)||d.current?.contains(R)||u(!1)};document.addEventListener("mousedown",S),document.addEventListener("pointerdown",S);let y=null;const b=()=>{if(typeof requestAnimationFrame>"u"){m();return}y===null&&(y=requestAnimationFrame(()=>{y=null,m()}))},_=O=>{d.current?.contains(O.target)||(t==="reposition"?b():t==="close"&&u(!1))};t!=="ignore"&&window.addEventListener("scroll",_,!0);const D=()=>{n==="reposition"?b():n==="close"&&u(!1)};let B=null;const M=()=>{D(),B&&clearTimeout(B),B=setTimeout(()=>{B=null,n==="reposition"&&m()},250)};return n!=="ignore"&&(window.addEventListener("resize",D),window.addEventListener("orientationchange",M)),()=>{y!==null&&cancelAnimationFrame(y),w?.disconnect(),document.removeEventListener("mousedown",S),document.removeEventListener("pointerdown",S),t!=="ignore"&&window.removeEventListener("scroll",_,!0),n!=="ignore"&&(window.removeEventListener("resize",D),window.removeEventListener("orientationchange",M)),B&&clearTimeout(B)}},[r,m,t,n,o]),c.useEffect(()=>{if(r)return Tu(()=>u(!1))},[r]);const f=c.useCallback(()=>u(C=>!C),[]),g=c.useCallback(()=>u(!1),[]);return{open:r,setOpen:u,toggle:f,close:g,style:a,triggerRef:s,menuRef:d}}function ad(e,{mode:t="playback",autoStart:n=!1,onPlaySpeaker:o,onComplete:r,playMs:u=1100,feedbackMs:a=1500}={}){const[i,s]=c.useState([]),[d,m]=c.useState(0),[f,g]=c.useState("idle"),[C,h]=c.useState(null),[w,S]=c.useState([]),[y,b]=c.useState(null),[_,D]=c.useState(0),B=c.useRef(0),M=c.useCallback(j=>{B.current=typeof j=="function"?j(B.current):j,D(B.current)},[]),O=c.useRef(o),R=c.useRef(r);c.useEffect(()=>{O.current=o,R.current=r},[o,r]);const x=c.useRef([]),v=()=>{x.current.forEach(clearTimeout),x.current=[]},z=(j,J)=>{x.current.push(setTimeout(J,j))};c.useEffect(()=>()=>v(),[]);const Z=i[d]?.id??null,V=c.useRef(null),F=c.useCallback(()=>{v(),g("playing"),S([]),b(null),M(0);let j=0;e.forEach((J,W)=>{z(j,()=>{m(W),h(J.id),O.current?.(J)}),z(j+1e3,()=>{h(null),S(he=>[...he,J.id])}),j+=1300}),z(j,()=>{g("done"),R.current?.({score:0,total:e.length})})},[e,M]),k=c.useCallback((j,J)=>{if(J>=j.length){g("done"),R.current?.({score:B.current,total:j.length});return}V.current=null,m(J),b(null),g("playing"),h(j[J].id),O.current?.(j[J]),z(u,()=>{h(null),g("waiting")})},[u]),K=c.useCallback(()=>{v();const j=X(e);s(j),M(0),S([]),k(j,0)},[e,k,M]),pe=c.useCallback(()=>{t==="playback"?(s(e),F()):K()},[t,e,F,K]),re=c.useCallback(()=>{v(),g("idle"),h(null),S([]),b(null),m(0),M(0),s([])},[M]),ve=JSON.stringify(e.map(j=>[j.id,j.label,j.angleDeg,j.deg,j.row,j.shortcut]));c.useEffect(()=>(n?pe():re(),()=>v()),[t,ve,n]);const L=c.useCallback(j=>{f!=="waiting"||t==="playback"||V.current===d||(V.current=d,b(j),j===i[d]?.id&&M(J=>J+1),t==="exam"?(g("playing"),z(400,()=>k(i,d+1))):(g("feedback"),z(a,()=>k(i,d+1))))},[f,t,i,d,k,a,M]),H=t==="playback"?e.length:i.length;return{bind:{activeSpeakerId:C,playedIds:w,selectedId:y,answerId:Z,showFeedback:f==="feedback",clickable:f==="waiting",onSelectSpeaker:L},index:d,total:H,score:_,phase:f,done:f==="done",start:pe,reset:re}}/*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */function Nu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function ld(e){if(Array.isArray(e))return e}function id(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o,r,u,a,i=[],s=!0,d=!1;try{if(u=(n=n.call(e)).next,t!==0)for(;!(s=(o=u.call(n)).done)&&(i.push(o.value),i.length!==t);s=!0);}catch(m){d=!0,r=m}finally{try{if(!s&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw r}}return i}}function sd(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
5
|
+
and aids recovery.`,site:{title:"Site",malgwi:"Malgwi",soundDirection:"Sound Direction System",vrSoundDirection:"VR Sound Direction System",hearingTest:"Hearing Test Pro"},sns:{title:"SNS",naverBlog:"Naver Blog"},policy:{title:"Policy",terms:"Terms of Service",privacy:"Privacy Policy"},ceo:"CEO",address:"Address",bizNo:"Business no.",support:"Support",ceoName:"Ji-hye Han",addressValue:"302, 3F, Haechan Bldg, 32 Sicheong-gil, Chuncheon, Gangwon, Korea",bizNoValue:"526-81-02926"},Ki={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},qi={phaseWordDownload:"Download Word Data",phaseImageCheck:"Check Images",phasePairAnalysis:"Analyze Word Pairs",downloadingCount_one:"Downloading {{n}} word",downloadingCount_other:"Downloading {{n}} words",checkingPage:"Checking page {{page}} list",imageCount:"{{done}} / {{total}} items"},Ji={clearAriaLabel:"Clear input"},Xi={ariaLabel:"Select tab"},Qi={ariaLabel:"Tabs"},Zi={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},es={ariaLabel:"User avatar"},ts={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"}},ns={weekly:{title:"Weekly Training",daily:"Daily Listening"},homework:{title:"Homework Progress",totalRate:"Overall rate",done:"Done"},today:{tooltipTotal:"Total",tooltipDone:"Done"},visit:{title:"Linked Visit Records"},detail:"Details",detailFor:"{{name}} details"},os={time:{justNow:"just now",minutesAgo:"{{n}}m ago",hoursAgo:"{{n}}h ago",daysAgo:"{{n}}d ago",weeksAgo:"{{n}}w ago",monthsAgo:"{{n}}mo ago",yearsAgo:"{{n}}y ago"}},rs={steps:"Step {{current}} of {{total}}"},us={skippedOnly_one:"{{n}} older record was excluded \u2014 it does not say what was answered.",skippedOnly_other:"{{n}} older records were excluded \u2014 they do not say what was answered.",runs_one:"{{count}} run",runs_other:"{{count}} runs"},as={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},ls={viewWords:"Words"},is={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},ss={chooseDate:"Choose a date",selectYear:"Select year",selectMonth:"Select month"},cs={previewRegion:"Report preview \u2014 scrollable sideways"},ds={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},fs={place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},ps={clearSelection:"Clear selection"},Cs={showResult:"Show {{type}} result"},ms={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},gs={loading:"Loading"},hs={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},ys={ariaLabel:"Breadcrumb"},Ss={empty:"No items yet."},bs={main:"Main gradient",soft:"Soft",sub:"Sub color",deep:"Deep gradient",softSub:"Soft sub",warm:"Warm (accent)",dark:"Dark",radial:"Radial gradient",diagonal:"Diagonal pattern",dots:"Dot pattern",outline:"Outline",success:"Success / done",naver:"Naver blog notice",instagram:"Instagram notice"},ws={common:bi,calendar:wi,passCard:Ei,rating:Ai,colorPicker:_i,dropdown:Ti,accordion:Di,header:Ni,nav:Oi,settings:vi,usage:Bi,account:Li,training:Ri,customers:Mi,payment:Ii,coupons:Pi,visits:ki,trainingType:xi,myWordTable:Fi,keyWords:ji,wordTable:Hi,wordSearch:$i,wordPrint:Gi,topic:Wi,device:Vi,manager:Yi,wordPairs:Ui,footer:zi,date:Ki,wordData:qi,textField:Ji,segmentedControl:Xi,tabs:Qi,fileUpload:Zi,avatar:es,myHomework:ts,trainingStatus:ns,store:os,progress:rs,trainingMiss:us,table:as,wordScore:ls,topBanner:is,datePicker:ss,report:cs,tooltip:ds,phonemeProfile:fs,bulkBar:ps,debug:Cs,badge:ms,loader:gs,soundCompass:hs,breadcrumb:ys,board:Ss,promoBannerBg:bs};const Es="0.358.0",As=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],uo="ko",_s="ihab_display_language";function Fr(){if(typeof window>"u")return uo;try{const e=localStorage.getItem(_s);if(e&&As.some(t=>t.code===e))return e}catch{}return uo}function jr(e){try{document.documentElement.lang=e}catch{}}Le.on("languageChanged",jr),jr(Fr()),Le.use(We.initReactI18next).init({resources:{ko:{translation:Si},en:{translation:ws}},lng:Fr(),fallbackLng:uo,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const Hr=new Set(["field"]),ao="none";function Ts(e){return e==null||String(e).trim()===""}function Ds(e){return typeof e=="string"&&io.includes(e)}function lo(e,t){if(!e)return!0;const n=e instanceof Set?e:new Set(e);return n.size===0?!0:Ts(t)?n.has(ao):n.has(String(t))}const zt=["grade","syllables","pos","wordType","field"],io=["1","2","3","4","none"],Ns=["1","2","3","4","5+"],Os=["noun","verb","modifier"],vs=["native","sino","foreign","mixed"],Bs={grade:io,syllables:Ns,pos:Os,wordType:vs,field:[]},Ls={noun:["\uBA85","\uC218"],verb:["\uB3D9","\uD615"],modifier:["\uBD80","\uAD00"]},Rs={native:"\uACE0\uC720",sino:"\uD55C\uC790",foreign:"\uC678\uB798",mixed:"\uD63C\uC885"},Ms={grade:["\uB09C\uC774\uB3C4 \uB4F1\uAE09"]},Is={pos:{noun:["\uCCB4\uC5B8(\uBA85\uC0AC,\uC218\uC0AC)"],verb:["\uC6A9\uC5B8(\uB3D9\uC0AC,\uD615\uC6A9\uC0AC)"],modifier:["\uC218\uC2DD\uC5B8(\uBD80\uC0AC,\uAD00\uD615\uC0AC)"]}},so=new Map;try{Le.store?.on?.("added",()=>so.clear())}catch{}function Kt(e){const t=so.get(e);if(t)return t;const n=Le.getFixedT(e),o={section:{grade:n("wordSearch.filter.difficulty","\uB4F1\uAE09"),syllables:n("wordSearch.filter.syllables","\uC74C\uC808 \uC218"),pos:n("wordSearch.filter.partOfSpeech","\uD488\uC0AC"),wordType:n("wordSearch.filter.wordType","\uC720\uD615"),field:n("wordSearch.filter.field","\uC758\uBBF8\uBC94\uC8FC")},value:{grade:{...Object.fromEntries(io.filter(r=>r!==ao).map(r=>[r,n("wordSearch.filter.grade",{n:Number(r),defaultValue:`${r}\uB4F1\uAE09`})])),[ao]:n("wordSearch.filter.gradeNone","\uC5C6\uC74C")},syllables:{...Object.fromEntries(["1","2","3","4"].map(r=>[r,n("wordSearch.filter.syllable",{n:Number(r),defaultValue:`${r}\uC74C\uC808`})])),"5+":n("wordSearch.filter.syllable5plus","5\uC74C\uC808 \uC774\uC0C1")},pos:{noun:n("wordSearch.filter.pos.noun","\uCCB4\uC5B8(\uBA85\uC0AC, \uC218\uC0AC)"),verb:n("wordSearch.filter.pos.verb","\uC6A9\uC5B8(\uB3D9\uC0AC, \uD615\uC6A9\uC0AC)"),modifier:n("wordSearch.filter.pos.modifier","\uC218\uC2DD\uC5B8(\uBD80\uC0AC, \uAD00\uD615\uC0AC)")},wordType:{native:n("wordSearch.filter.type.native","\uACE0\uC720\uC5B4"),sino:n("wordSearch.filter.type.sino","\uD55C\uC790\uC5B4"),foreign:n("wordSearch.filter.type.foreign","\uC678\uB798\uC5B4"),mixed:n("wordSearch.filter.type.mixed","\uD63C\uC885\uC5B4")},field:{}}};return so.set(e,o),o}const co=()=>Array.from(new Set([Le.language,"ko","en"].filter(e=>!!e)));function qt(e){if(zt.includes(e))return e;for(const t of co()){const n=Kt(t);for(const o of zt)if(n.section[o]===e)return o}for(const t of zt)if(Ms[t]?.includes(e))return t;return null}function st(e,t){if(Hr.has(e)||Bs[e].includes(t))return t;for(const n of co()){const o=Kt(n).value[e];for(const[r,u]of Object.entries(o))if(u===t)return r}for(const[n,o]of Object.entries(Is[e]??{}))if(o.includes(t))return n;if(e==="grade"||e==="syllables"){const n=parseInt(t.replace(/\D/g,""),10);if(Number.isFinite(n)&&n>=1)return e==="grade"?n<=4?String(n):null:n>=5?"5+":String(n)}return null}function Ps(e,t,n=Le.language){return Kt(n).value[e][t]??t}const ks=e=>Array.isArray(e)?e.filter(t=>typeof t=="string"):typeof e=="string"&&e?[e]:[];function fo(e){const t={};for(const[n,o]of Object.entries(e??{})){const r=qt(n);if(r)for(const u of ks(o)){const a=st(r,u);if(!a)continue;const i=t[r]??(t[r]=[]);i.includes(a)||i.push(a)}}return t}function po(e,t=Le.language){const n=Kt(t||"ko"),o={};for(const r of zt){const u=(e?.[r]??[]).map(a=>n.value[r][a]??(Hr.has(r)?a:void 0)).filter(a=>!!a);u.length&&(o[n.section[r]]=u)}return o}function xs(e,t=Le.language){const n={};for(const[o,r]of Object.entries(e??{}))qt(o)||(n[o]=r);return{...n,...po(fo(e),t)}}function Fs(e){for(const t of co()){const n=Kt(t);if(zt.some(o=>n.section[o]===e))return t}return Le.language||"ko"}let vn=null,$r=null,Gr=null;function js(){const e=Dn();if(e&&e.entries.length>0){const t=Ht();if(vn&&$r===e&&Gr===t)return vn;const n=new Set,o=[];for(const r of e.entries)!r.word||n.has(r.word)||(n.add(r.word),o.push({w:r.word,s:r.syllables,p:t?.[r.word]?[...t[r.word].cho??[],...t[r.word].jung??[],...t[r.word].jong??[]]:[],pron:r.pronunciation||r.word,grade:r.grade}));return vn=o,$r=e,Gr=t,vn}return[]}const Ye=new Proxy([],{get(e,t){const n=js(),o=n[t];return typeof o=="function"?o.bind(n):o}});function Co(e){return e.length?e[Math.floor(Math.random()*e.length)]:void 0}function Re(e,t){if(t>=e.length)return X(e);if(t===0)return[];const n=e.slice();for(let o=0;o<t;o++){const r=o+Math.floor(Math.random()*(n.length-o)),u=n[o];n[o]=n[r],n[r]=u}return n.slice(0,t)}let mo=null,Wr=null;function tt(){const e=Dn();if(mo&&Wr===e)return mo;const t=new Map;for(const n of Ye)n.w&&t.set(n.w,n.pron);return mo=t,Wr=e,t}function de(e){return tt().get(e)||e}function Bn(e,t,n=new Set){const o=[];for(const r of X(e)){if(o.length>=t)break;const u=de(r);n.has(u)||(n.add(u),o.push(r))}return o}let Hs=0;function me(e){return`${e}-rt-${++Hs}`}function Et(e){const t=Or();if(!t||t.total===0){const r=new Set;for(const u of e)r.add(u);return r}const n=_n(),o=new Set;for(const r of e)n.has(r)&&o.add(r);return o}const Ln=new Map;let Vr=null,Yr=null,Ur=null;function Jt(e){return e==null?"":Array.isArray(e)?e.slice().sort().join(","):e}function go(e){const t=Array.isArray(e.choseong)&&e.choseong.length===0?"[]":Jt(e.choseong),n=e.composition,o=n?.syllable==null?"":Array.isArray(n.syllable)?n.syllable.slice().sort().join(","):String(n.syllable),r=n?`${Jt(n.cho)}/${Jt(n.jung)}/${Jt(n.jong)}/${n.jongNone?"N":""}/${o}`:"",u=Jt(e.grade);return`${e.difficulty??""}|${t}|${r}|${e.excludeNoImage?"1":"0"}|${e.count??""}|x${e.contrastCount??1}|${e.fullCount?"F":""}|s${e.sameStructureOnly===!1?"0":"1"}|v${e.phonemeView==="pron"?"p":"c"}|g${u}|t${e.targetSyllable??""}|c${e.choicesPerItem??""}`}const ho=new Map;function $s(e){return go({...e,count:void 0,choicesPerItem:void 0,fullCount:!1})}async function _e(e){const t=Dn(),n=Ht(),o=e.excludeNoImage?_n():null;(t!==Vr||n!==Yr||e.excludeNoImage&&o!==Ur)&&(Ln.clear(),ho.clear(),Vr=t,Yr=n,Ur=o);const r=go(e);return Ln.has(r)||Ln.set(r,Gs(e)),Ln.get(r)}function zr(e){if(!e)return null;const t=a=>a==null?null:Array.isArray(a)?a.length?a:null:[a],n=t(e.cho),o=t(e.jung),r=!!e.jongNone,u=r?null:t(e.jong);return n||o||u||r?r&&!n&&!o&&!u?a=>Ba(a):a=>Ra(a,{cho:n,jung:o,jong:u,jongNone:r}):null}function Kr(e){const t=e.grade&&e.grade.length>0?new Set(e.grade):null,n=e.composition??null,o=n?.syllable!=null?new Set(Array.isArray(n.syllable)?n.syllable:[n.syllable]):null,r=n?[zr(n),o?a=>o.has(Ft(a)):null].filter(a=>a!=null):[];if(!t&&r.length===0)return null;const u=e.phonemeView==="pron";return a=>{if(!lo(t,a.grade))return!1;if(r.length===0)return!0;const i=u?de(a.w):a.w;return r.every(s=>s(i))}}async function Gs(e){const{difficulty:t=null,choseong:n=null,composition:o=null,targetSyllable:r=null,excludeNoImage:u=!1}=e,a=e.grade&&e.grade.length>0?new Set(e.grade):null,i=e.sameStructureOnly??!0,s=e.phonemeView==="pron"?"pron":"char",d=Math.max(1,e.contrastCount??1),m=t==="cho"||t==="jung"||t==="jong",f=m&&d>=2,g=t==="count",C=n?new Set(Array.isArray(n)?n:[n]):null,h=o?.syllable!=null?new Set(Array.isArray(o.syllable)?o.syllable:[o.syllable]):null,w=o?[zr(o),h?L=>h.has(Ft(L)):null].filter(L=>L!=null):[],S=t==="random"||t===null,y=S||g,b=S||f||g;let _=Ye.filter(L=>!L.w||!lo(a,L.grade)?!1:b?!0:Array.isArray(L.p)&&L.p.length>0);C&&(_=_.filter(L=>{for(const H of C)if(Oa(L.w,H))return!0;return!1})),w.length>0&&(_=_.filter(L=>{const H=s==="pron"?de(L.w):L.w;return w.every(j=>j(H))})),r&&(_=_.filter(L=>L.w[0]===r));let D;if(u){const L=new Set;for(const H of _)if(L.add(H.w),Array.isArray(H.p))for(const j of H.p)L.add(j);if(y)for(const H of Ye)H.w&&L.add(H.w);D=Et(L)}else{const L=new Set;for(const H of _)if(L.add(H.w),Array.isArray(H.p))for(const j of H.p)L.add(j);if(y)for(const H of Ye)H.w&&L.add(H.w);D=L}let B=null;if(f){const L=new Set;for(const H of Ye)H.w&&L.add(H.w);B=u?Et(L):L}const M=_.filter(L=>D.has(L.w)),O=600,R=Array.from(D),x=R.length>O?Re(R,O):R,v=g&&o!=null&&(ce(o.cho)||ce(o.jung)||ce(o.jong)),z=2500,Z=new Map;if(g&&!v&&d>=2){for(const L of R){const H=Ft(L),j=Z.get(H);j?j.push(L):Z.set(H,[L])}for(const[L,H]of Z)H.length>z&&Z.set(L,Re(H,z))}const V=Da();let F=null;if(v){const L=$s(e),H=u?_n():null,j=ho.get(L);F=j&&j.imageOkSet===H?j.map:al(o,R,V,i,s,de),ho.set(L,{imageOkSet:H,map:F})}const k=500,K=1500,pe=e.fullCount?M:t==="random"?M.length>k?Re(M,k):M:M.length>K?Re(M,K):M,re=Ht(),ve=[];for(const L of pe){let H;const j=de(L.w);if(f)H=Ia(L.w,t,d,B,24).filter(J=>de(J)!==j);else if(g)v?H=(F.get(L.w)??[]).filter(J=>de(J)!==j):d<=1?H=kr(L.w,re,{okSet:D,pronOf:de,decompOf:V,sameStructureOnly:!1}):H=(Z.get(Ft(L.w))??[]).filter(J=>{if(J===L.w||de(J)===j)return!1;const W=Pa(j,de(J));return d>=5?W>=5:W===d});else if(S){const J=W=>W!==L.w&&W.length===L.w.length&&de(W)!==j;if(e.fullCount){const W=Math.max(1,(e.choicesPerItem??3)-1),he=[],$e=new Set;for(const ot of x){if(!J(ot))continue;const qe=de(ot);if(!$e.has(qe)&&($e.add(qe),he.push(ot),he.length>=W))break}H=he}else H=x.filter(J)}else{const J=t;H=kr(L.w,re,{kind:J,okSet:D,pronOf:de,decompOf:V,sameStructureOnly:!1}),H.length===0&&(H=(x.length>30?Re(x,30):x).filter(W=>W!==L.w&&Na(L.w,W)===t&&de(W)!==j))}if(i&&H.length>0&&(m||g&&!v)){const J=V(de(L.w));H=H.filter(W=>!oo(J,V(de(W))))}H.length!==0&&ve.push({word:L,usable:H})}return ve}async function qr(e,t){const{choicesPerItem:n=3,count:o=10}=t,r=n-1,u=(await _e(t)).filter(i=>i.usable.length>=r),a=[];for(const i of X(u)){if(a.length>=o)break;const s=Bn(i.usable,r);if(s.length<r)continue;const d=X([i.word.w,...s]);a.push({id:me(e+"-item"),index:a.length+1,word:i.word.w,syllables:i.word.s,choices:d,answerIndex:d.indexOf(i.word.w)})}return a}async function Ws(e){const{choicesPerItem:t=3,count:n=10}=e,o=t-1,r=await _e({...e,difficulty:null});if(r.length<t)return[];const u=e.composition??null,a=[],i=X([...r]);for(const s of i){if(a.length>=n)break;const d=s.word.w,m=[...s.word.pron||d],f=u&&On(u)?m.filter(S=>{const y=te(S);return!!y&&it(y,u)}):[],g=Co(f.length?f:m);if(!g)continue;const C=r.filter(S=>S.word.w!==d&&S.word.s===s.word.s&&!(S.word.pron||S.word.w).includes(g)&&S.word.pron!==s.word.pron);if(C.length<o)continue;const h=Bn(C.map(S=>S.word.w),o);if(h.length<o)continue;const w=X([d,...h]);a.push({id:me("HPI-item"),index:a.length+1,targetSyllable:g,word:d,choices:w,answerIndex:w.indexOf(d)})}return a}async function Vs(e){const{count:t=10}=e,n=(await _e(e)).filter(u=>u.usable.length>=1);if(!n.length)return[];const o=n.length>=t?Re(n,t):X(Array.from({length:t},(u,a)=>n[a%n.length])),r=X(Array.from({length:t},(u,a)=>a<Math.ceil(t/2)));return o.map((u,a)=>{const i=r[a];let s;if(i)s=[u.word.w,u.word.w];else{const d=Co(u.usable);s=Math.random()<.5?[u.word.w,d]:[d,u.word.w]}return{id:me("SOD-item"),index:a+1,word:u.word.w,pair:s,same:i}})}async function Ys(e){const{choicesPerItem:t=3,count:n=10}=e,o=t-1,r=await _e({...e,difficulty:null});if(r.length<t+1)return[];const u=r.map(g=>g.word.w),a=new Map(r.map(g=>[g.word.w,g.word.pron])),i=g=>(a.get(g)||g)[0]??"",s={};for(const g of r){const C=i(g.word.w);C&&(s[C]||(s[C]=[]),s[C].push(g.word.w))}const d=Object.entries(s).filter(([,g])=>new Set(g.map(C=>a.get(C)||C)).size>=2).map(([g])=>g);if(d.length===0)return[];const m=[],f=X([...d]);for(let g=0;m.length<n&&g<n*4;g++){const C=f[g%f.length],h=s[C];if(h.length<2)continue;const w=X([...h]),S=w[0],y=a.get(S)||S,b=w.find(O=>O!==S&&(a.get(O)||O)!==y);if(!S||!b)continue;const _=a.get(b)||b,D=u.filter(O=>i(O)!==C&&O!==S&&O!==b&&O.length===b.length&&(a.get(O)||O)!==_);if(D.length<o)continue;const B=Bn(D,o);if(B.length<o)continue;const M=X([b,...B]);m.push({id:me("SWS-item"),index:m.length+1,sourceWord:S,targetSyllable:C,word:b,choices:M,answerIndex:M.indexOf(b)})}return m}function Jr(e,t,n){const o=tt(),r=s=>o.get(s)||s,u=(s,d)=>{const m=[...s],f=[...d];if(m.length!==f.length)return-1;let g=-1;for(let C=0;C<m.length;C++)if(m[C]!==f[C]){if(g>=0)return-1;g=C}return g},a=e.map(s=>({e:s,swaps:s.usable.filter(d=>!!d&&u(s.word.w,d)>=0&&r(d)!==r(s.word.w))})).filter(s=>s.swaps.length>0),i=[];for(const{e:s,swaps:d}of X(a)){if(i.length>=t)break;const m=Co(d)??"",f=[...s.word.w],g=[...m],C=u(s.word.w,m),h=Bn(s.usable.filter(w=>w&&w!==m),2,new Set([r(m),r(s.word.w)]));h.length<2||i.push({id:me(n),index:i.length+1,word:s.word.w,original:s.word.w,changed:m,changedFrom:C>=0?f[C]:"",changedTo:C>=0?g[C]:"",distractors:h})}return i}async function Xr(e,t,n){const{count:o=10}=t,r=tt(),u=Ye.filter(h=>h.w&&h.s===e),a=t.excludeNoImage?Et(u.map(h=>h.w)):null,i=a?u.filter(h=>a.has(h.w)):u,s=new Set(i.map(h=>h.w)),d=gl(s),m=t.phonemeView??"char",f=t.composition??null,g=Kr(t),C=[];for(const h of X(i)){if(C.length>=o)break;if(g&&!g(h))continue;const w=hl(h.w,f,r,m,d,null,null);if(!w)continue;const S=w.distractors[0],y=[...h.w],b=[...S],_=y.findIndex((D,B)=>D!==b[B]);C.push({id:me(n),index:C.length+1,word:h.w,original:h.w,changed:S,changedFrom:_>=0?y[_]:"",changedTo:_>=0?b[_]:"",distractors:w.distractors.slice(1)})}return C}async function Us(e){return Xr(2,e,"CS2-item")}async function zs(e){return Xr(3,e,"CS3-item")}async function Ks(e){const t=(await _e({...e,difficulty:"count",contrastCount:1})).filter(n=>n.word.s===1&&n.usable.length>=1);return Jr(t,e.count??10,"CP1-item")}async function qs(e){const t=e.difficulty&&e.difficulty!=="random"?e.difficulty:"count",n=(await _e({...e,difficulty:t,contrastCount:1})).filter(o=>o.word.s===2&&o.usable.length>=1);return Jr(n,e.count??10,"CP2-item")}async function Js(e){const{count:t=10}=e,n=(await _e({...e})).filter(o=>o.word.s===2);return Re(n,t).map((o,r)=>({id:me("M2S-item"),index:r+1,word:o.word.w,answer:o.word.w,parts:[...o.word.w]}))}async function Xs(e){const{count:t=10}=e,n=(await _e({...e})).filter(o=>o.word.s===3);return Re(n,t).map((o,r)=>({id:me("M3S-item"),index:r+1,word:o.word.w,answer:o.word.w,parts:[...o.word.w]}))}function yo(e){const t=Ye.map(n=>n.w);return e.excludeNoImage?Et(t):new Set(t)}async function Qs(e){const{count:t=10}=e,n=(await _e({...e})).filter(i=>i.word.s===2),o=tt(),r=yo(e),u=e.phonemeView??"char",a=[];for(const i of X(n)){if(a.length>=t)break;const s=dl(i.word.w,e.composition??null,o,u,r);if(!s)continue;const[d,...m]=s.distractors,f=[...i.word.w],g=f[0]===d?f[1]:f[0];a.push({id:me("D2-item"),index:a.length+1,original:i.word.w,word:i.word.w,dropped:g,missingResult:d,distractors:m})}return a}async function Zs(e){const{count:t=10}=e,n=(await _e({...e})).filter(i=>i.word.s===3),o=tt(),r=yo(e),u=e.phonemeView??"char",a=[];for(const i of X(n)){if(a.length>=t)break;const s=fl(i.word.w,e.composition??null,o,u,r);if(!s)continue;const[d,...m]=s.distractors,f=[...i.word.w];let g="";for(let C=0;C<f.length;C++)if(f.filter((h,w)=>w!==C).join("")===d){g=f[C];break}a.push({id:me("D3-item"),index:a.length+1,original:i.word.w,word:i.word.w,dropped:g,missingResult:d,distractors:m})}return a}async function ec(e){const{count:t=10}=e,n=(await _e({...e})).filter(i=>i.word.s>=3),o=tt(),r=yo(e),u=e.phonemeView??"char",a=[];for(const i of X(n)){if(a.length>=t)break;const s=pl(i.word.w,e.composition??null,o,u,r);if(!s)continue;const[d,...m]=s.distractors,f=i.word.w,g=s.dropped??(f.startsWith(d)?f.slice(d.length):f.endsWith(d)?f.slice(0,f.length-d.length):"");a.push({id:me("DPC-item"),index:a.length+1,original:f,word:f,dropped:g,missingResult:d,distractors:m})}return a}async function tc(e){const{count:t=10}=e,n=(await _e({...e})).map(o=>o.word.w);return n.length<3?[]:Array.from({length:t},(o,r)=>{const u=Re(n,3);return{id:me("LRO-item"),index:r+1,sequence:u,choices:X(u)}})}function Rn(e,t,n){const o=Ye.filter(i=>i.w&&i.s===e),r=t.excludeNoImage?Et(o.map(i=>i.w)):null,u=Kr(t),a=[];for(const i of o)if(!(r&&!r.has(i.w))&&!(u&&!u(i))){if(n){const s=te(i.w);if(!s||!n(s))continue}a.push(i)}return a}function nc(e){const t=Rn(1,e,Nn.MERGE_2_PHONEMES.syllable);return Re(t,e.count??10).map((n,o)=>{const r=te(n.w);return{id:me("M2P-item"),index:o+1,parts:[Ce[r.cho],Ae[r.jung]],answer:n.w,word:n.w}})}function oc(e){const t=Rn(1,e,Nn.MERGE_3_PHONEMES.syllable);return Re(t,e.count??10).map((n,o)=>{const r=te(n.w);return{id:me("M3P-item"),index:o+1,parts:[Ce[r.cho],Ae[r.jung],Oe[r.jong]],answer:n.w,word:n.w}})}function rc(e){const t=Nn.DROP_FINAL_CONSONANT_FROM_1SYLL,n=Rn(t.syllables,e,t.syllable),o=tt(),r=[];for(const u of X(n)){if(r.length>=(e.count??10))break;const a=Cl(u.w,null,o);if(!a)continue;const[i,...s]=a.distractors;r.push({id:me("DFC-item"),index:r.length+1,original:u.w,word:u.w,result:i,distractors:s})}return r}function uc(e){const t=Nn.REMOVE_CONSONANT_AND_IDENTIFY_PHONEME,n=Rn(t.syllables,e,t.syllable),o=tt(),r=[];for(const u of X(n)){if(r.length>=(e.count??10))break;const a=ml(u.w,null,o);if(!a)continue;const i=te(o.get(u.w)||u.w);if(!i)continue;const[s,...d]=a.distractors;r.push({id:me("RCP-item"),index:r.length+1,base:u.w,word:u.w,missingConsonant:Ce[i.cho],remaining:s,distractors:d})}return r}const Mn=new Map;let Qr=null,Zr=null,eu=null,So=0;async function tu(e,t={}){const n=Dn(),o=Ht(),r=t.excludeNoImage?_n():null;(n!==Qr||o!==Zr||t.excludeNoImage&&r!==eu)&&(Mn.clear(),So++,Qr=n,Zr=o,eu=r);const u=`${e}:${go(t)}`;if(Mn.has(u))return Mn.get(u);const a=So,i=await lc(e,t);return a===So&&Mn.set(u,i),i}const ac={SAME_SOUND_PICK:e=>qr("SSP",e),HEAR_AND_PICK_SAME:e=>qr("HPS",e),HEAR_AND_PICK_INCLUDED:e=>Ws(e),SAME_OR_DIFF:e=>Vs(e),STARTS_WITH_SAME_SOUND:e=>Ys(e),LISTEN_AND_REMEMBER_ORDER:e=>tc(e),MERGE_2_SYLLABLES:e=>Js(e),MERGE_3_SYLLABLES:e=>Xs(e),MERGE_2_PHONEMES:e=>nc(e),MERGE_3_PHONEMES:e=>oc(e),DROP_1_FROM_2SYLL:e=>Qs(e),DROP_1_FROM_3SYLL:e=>Zs(e),DROP_PART_FROM_COMPOUND:e=>ec(e),DROP_FINAL_CONSONANT_FROM_1SYLL:e=>rc(e),REMOVE_CONSONANT_AND_IDENTIFY_PHONEME:e=>uc(e),CHANGE_1_SYLL_IN_2SYLL:e=>Us(e),CHANGE_1_SYLL_IN_3SYLL:e=>zs(e),CHANGE_1_PHONEME_IN_1SYLL:e=>Ks(e),CHANGE_1_PHONEME_IN_2SYLL:e=>qs(e)};async function lc(e,t={}){const n=ac[e];return n?await n(t):[]}async function ic(e){const t=["random","count"],n=Object.keys(eo);let o=0;for(const r of t)for(const u of n){const a=eo[u];tu(u,{difficulty:a.difficulty?r:null,contrastCount:1,composition:null,count:5,excludeNoImage:e,sameStructureOnly:!0,phonemeView:"char",grade:null}).catch(()=>{}),++o%6===0&&await new Promise(i=>setTimeout(i,0))}}async function sc(e){const t=await _e({...e,fullCount:!0}),n=e.choicesPerItem!=null?Math.max(1,e.choicesPerItem-1):1;return t.filter(o=>new Set(o.usable.map(r=>de(r))).size>=n).length}async function cc(e={}){const t=[];for(const i of Ye)i.w&&t.push(i.w);const n=e.excludeNoImage?Et(t):t,o=new Set,r=new Set,u=new Set,a=new Set;for(const i of n){a.add(Ft(i));for(const s of i){const d=te(s);if(d&&(Ce[d.cho]!=="\u3147"&&o.add(Ce[d.cho]),r.add(Ae[d.jung]),d.jong>0)){u.add(Oe[d.jong]);const m=An[d.jong];m&&m.forEach(f=>u.add(f))}}}return{cho:o,jung:r,jong:u,syllable:a}}const Fe="\uC804\uCCB4";function nu(){const{t:e}=We.useTranslation();return c.useMemo(()=>({difficulty:e("wordSearch.filter.difficulty","\uB4F1\uAE09"),syllables:e("wordSearch.filter.syllables","\uC74C\uC808 \uC218"),syllable5plus:e("wordSearch.filter.syllable5plus","5\uC74C\uC808 \uC774\uC0C1"),partOfSpeech:e("wordSearch.filter.partOfSpeech","\uD488\uC0AC"),wordType:e("wordSearch.filter.wordType","\uC720\uD615"),posMap:{[e("wordSearch.filter.pos.noun","\uCCB4\uC5B8(\uBA85\uC0AC, \uC218\uC0AC)")]:["\uBA85","\uC218"],[e("wordSearch.filter.pos.verb","\uC6A9\uC5B8(\uB3D9\uC0AC, \uD615\uC6A9\uC0AC)")]:["\uB3D9","\uD615"],[e("wordSearch.filter.pos.modifier","\uC218\uC2DD\uC5B8(\uBD80\uC0AC, \uAD00\uD615\uC0AC)")]:["\uBD80","\uAD00"]},typeMap:{[e("wordSearch.filter.type.native","\uACE0\uC720\uC5B4")]:"\uACE0\uC720",[e("wordSearch.filter.type.sino","\uD55C\uC790\uC5B4")]:"\uD55C\uC790",[e("wordSearch.filter.type.foreign","\uC678\uB798\uC5B4")]:"\uC678\uB798",[e("wordSearch.filter.type.mixed","\uD63C\uC885\uC5B4")]:"\uD63C\uC885"}}),[e])}function ou(e,t,n){return{label:t.difficulty,items:[...[1,2,3,4].map(o=>e("wordSearch.filter.grade",{n:o})),e("wordSearch.filter.gradeNone","\uC5C6\uC74C")],multiple:!0,allOption:!0,allLabel:n?.allLabel,labelAction:n?.labelAction,labelInfo:n?.labelInfo}}function ru(e){return{label:e.partOfSpeech,items:Object.keys(e.posMap),multiple:!0,allOption:!0}}function uu(e){return{label:e.wordType,items:Object.keys(e.typeMap),multiple:!0,allOption:!0}}function dc(e,t){return{label:t.syllables,items:[e("wordSearch.filter.syllable",{n:1}),e("wordSearch.filter.syllable",{n:2}),e("wordSearch.filter.syllable",{n:3}),e("wordSearch.filter.syllable",{n:4}),t.syllable5plus],multiple:!0,allOption:!0}}function fc(e,t){const n=[e("wordPairs.filter.onlyHasImage","\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC")];return t?.includeStructure&&n.push(e("wordPairs.filter.onlySameStructure","\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC")),{label:e("wordPairs.filter.selectLabel","\uC120\uD0DD"),items:n,multiple:!0,labelAction:t?.labelAction,labelInfo:t?.labelInfo}}function pc(e,t){const{label:n,headValue:o,midValue:r,tailValue:u,includeMid:a=!0,headDisabled:i,midDisabled:s,tailDisabled:d,allOptionDisabled:m,groupLabel:f,labelAction:g}=t;return{label:n,...f?{groupLabel:f}:{},...g?{labelAction:g}:{},allOption:!0,allLabel:e("wordSearch.filter.positionAny",{defaultValue:"\uBB34\uAD00"}),...m?{allOptionDisabled:m}:{},items:[{value:o,displayLabel:e("wordSearch.filter.positionHead",{defaultValue:"\uC5B4\uB450"}),disabled:i},...a?[{value:r,displayLabel:e("wordSearch.filter.positionMid",{defaultValue:"\uC5B4\uC911"}),disabled:s}]:[],{value:u,displayLabel:e("wordSearch.filter.positionTail",{defaultValue:"\uC5B4\uB9D0"}),disabled:d}]}}function Cc(e,t,n){const o=qt(n),r=o&&t!==Fe?st(o,t):null;if(o&&(t===Fe||r)){const i={},s={};for(const[C,h]of Object.entries(e))(qt(C)===o?s:i)[C]=h;if(t===Fe)return i;const d=fo(s)[o]??[],m=d.includes(r)?d.filter(C=>C!==r):[...d,r];if(m.length===0)return i;const f=po({[o]:m},Fs(n)),g=Object.values(f)[0]??[];return{...i,[n]:g}}if(t===Fe){const{[n]:i,...s}=e;return s}const u=e[n]??[],a=u.includes(t)?u.filter(i=>i!==t):[...u,t];if(a.length===0){const{[n]:i,...s}=e;return s}return{...e,[n]:a}}Object.fromEntries(Object.entries(Zn).map(([e,{nucleus:t}])=>[e,t]));const mc={\uACE0\uC720\uC5B4:"\uACE0\uC720",\uD55C\uC790\uC5B4:"\uD55C\uC790",\uC678\uB798\uC5B4:"\uC678\uB798",\uD63C\uC885\uC5B4:"\uD63C\uC885"},gc={"\uCCB4\uC5B8(\uBA85\uC0AC,\uC218\uC0AC)":["\uBA85","\uC218"],"\uC6A9\uC5B8(\uB3D9\uC0AC,\uD615\uC6A9\uC0AC)":["\uB3D9","\uD615"],"\uC218\uC2DD\uC5B8(\uBD80\uC0AC,\uAD00\uD615\uC0AC)":["\uBD80","\uAD00"]},hc={difficulty:"\uB09C\uC774\uB3C4 \uB4F1\uAE09",syllables:"\uC74C\uC808 \uC218",syllable5plus:"5\uC74C\uC808 \uC774\uC0C1",partOfSpeech:"\uD488\uC0AC",wordType:"\uC720\uD615",field:"\uC758\uBBF8\uBC94\uC8FC",posMap:gc,typeMap:mc},au=new WeakMap;function yc(e,t){const n=au.get(e);if(n&&n.keys===t)return n.value;const o={grades:[],syls:[],poses:[],types:[],fields:[]},r={grade:o.grades,syllables:o.syls,pos:o.poses,wordType:o.types,field:o.fields};for(const[u,a]of Object.entries(e??{})){const i=u===t.difficulty?"grade":u===t.syllables?"syllables":u===t.partOfSpeech?"pos":u===t.wordType?"wordType":u===t.field?"field":qt(u);if(i)for(const s of Array.isArray(a)?a:typeof a=="string"?[a]:[])r[i].includes(s)||r[i].push(s)}return au.set(e,{keys:t,value:o}),o}function Sc(e,t,n=hc){const{grades:o,syls:r,poses:u,types:a}=yc(t,n);if(o.length){const i=o.map(s=>st("grade",s)??s.replace(/\D/g,"")).filter(s=>s!=="");if(i.length===0||!lo(i,e.grade))return!1}if(r.length){const i=e.syllables??0;if(!r.some(s=>{const d=s===n.syllable5plus?"5+":st("syllables",s);return d==="5+"?i>=5:i===parseInt(d??s)}))return!1}return!(u.length&&!u.flatMap(i=>n.posMap[i]??Ls[st("pos",i)??""]??[i]).some(i=>(e.pos??"").includes(i))||a.length&&!a.some(i=>e.wordType===(n.typeMap[i]??Rs[st("wordType",i)??""])))}const bc={labial:e=>e("common.phonetics.place.labial",{defaultValue:"\uC591\uC21C\uC74C"}),alveolar:e=>e("common.phonetics.place.alveolar",{defaultValue:"\uCE58\uC870\uC74C"}),palatal:e=>e("common.phonetics.place.palatal",{defaultValue:"\uACBD\uAD6C\uAC1C\uC74C"}),velar:e=>e("common.phonetics.place.velar",{defaultValue:"\uC5F0\uAD6C\uAC1C\uC74C"}),glottal:e=>e("common.phonetics.place.glottal",{defaultValue:"\uC131\uBB38\uC74C"})},wc={frontHigh:e=>e("common.phonetics.vowel.frontHigh",{defaultValue:"\uC804\uC124 \uACE0\uBAA8\uC74C"}),backHighUnrounded:e=>e("common.phonetics.vowel.backHighUnrounded",{defaultValue:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uD3C9\uC21C"}),backHighRounded:e=>e("common.phonetics.vowel.backHighRounded",{defaultValue:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C"}),frontMid:e=>e("common.phonetics.vowel.frontMid",{defaultValue:"\uC804\uC124 \uC911\uBAA8\uC74C"}),backMidUnrounded:e=>e("common.phonetics.vowel.backMidUnrounded",{defaultValue:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C"}),backMidRounded:e=>e("common.phonetics.vowel.backMidRounded",{defaultValue:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C"}),low:e=>e("common.phonetics.vowel.low",{defaultValue:"\uC800\uBAA8\uC74C"})},Ec={j:e=>e("common.phonetics.glide.j",{defaultValue:"j\uD65C\uC74C"}),w:e=>e("common.phonetics.glide.w",{defaultValue:"w\uD65C\uC74C"}),velar:e=>e("common.phonetics.glide.velar",{defaultValue:"\u0270\uD65C\uC74C"})};function lu(e,t){if("place"in t)return bc[t.place](e);const n=wc[t.vowel](e);return t.glide?`${n} \xB7 ${Ec[t.glide](e)}`:n}const Ac=(e,{defaultValue:t})=>t,iu=(e,t)=>({jamos:e,phonetic:t,tooltip:lu(Ac,t)}),Ue=(e,t)=>t.map(n=>iu([n],{place:e})),fe=(e,t,n)=>iu([...e],n?{vowel:t,glide:n}:{vowel:t}),bo={cho:[Ue("labial",["\u3142","\u3143","\u314D","\u3141"]),Ue("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),Ue("alveolar",["\u3145","\u3146"]),Ue("palatal",["\u3148","\u3149","\u314A"]),Ue("velar",["\u3131","\u3132","\u314B"]),Ue("glottal",["\u314E"])],jung:[[fe("\u3163","frontHigh"),fe("\u315F","frontHigh","w"),fe("\u3162","frontHigh","velar")],[fe("\u3161","backHighUnrounded")],[fe("\u315C","backHighRounded"),fe("\u3160","backHighRounded","j")],[fe("\u3154\u3150","frontMid"),fe("\u3156\u3152","frontMid","j"),fe("\u3159\u315A\u315E","frontMid","w")],[fe("\u3153","backMidUnrounded"),fe("\u3155","backMidUnrounded","j"),fe("\u315D","backMidUnrounded","w")],[fe("\u3157","backMidRounded"),fe("\u315B","backMidRounded","j")],[fe("\u314F","low"),fe("\u3151","low","j"),fe("\u3158","low","w")]],jong:[Ue("labial",["\u3142","\u3141"]),Ue("alveolar",["\u3137","\u3134","\u3139"]),Ue("velar",["\u3131","\u3147"])]},_c=[...Ce],Tc=[...Ae],Dc=Oe.filter(e=>e!==""),ze=e=>e===je?[]:Array.from(e),je="__NO_CODA__",su=[1,2,3,4],He=5,Nc=12,cu="SYL_",wo=e=>`${cu}${e}`,Oc=e=>Number(e.slice(cu.length));function Eo(e){return e>=He?Array.from({length:Nc-He+1},(t,n)=>He+n):[e]}const du={cho:_c,jung:Tc,jong:Dc},Ao=e=>e.map(t=>t.map(({jamos:n,phonetic:o,tooltip:r})=>({v:n.join(""),phonetic:o,tooltip:r}))),_o={cho:Ao(bo.cho),jung:Ao(bo.jung),jong:Ao(bo.jong)},fu={};_o.jung.flat().forEach(({v:e})=>{for(const t of ze(e))fu[t]=e});const vc=new Set(_o.cho.flat().map(e=>e.v));function pu(e,t){return e==="cho"?vc.has(t)?t:null:e==="jung"?fu[t]??t:xt(t)}function Cu(e,t,n){if(e==="jung"){const o=ze(t);return n&&o.includes(n)?n:o[0]??t}return e==="jong"&&n&&xt(n)===t?n:t}function mu(e,t,n,o){const r=(u,a)=>a?u==="jong"&&a===je?je:t==="pron"?pu(u,a):Cu(u,a,u==="jung"?n:u==="jong"?o:null):null;return{...e,cho:r("cho",e.cho),jung:r("jung",e.jung),jong:r("jong",e.jong)}}const To={cho:null,jung:null,jong:null,syllable:null},Do=e=>Array.isArray(e)?e.filter(Ds):[],Bc="wt_filter",gu=e=>`wt_filter_${e}`,No=["noun","verb","modifier"],Oo=["native","sino","foreign","mixed"];function hu(e,t,n,o,r){if(!Array.isArray(e))return[];const u=[];for(const a of e){if(typeof a!="string")continue;const i=t.includes(a)?a:t.find(s=>r.some(d=>o(d,n(s))===a));i&&!u.includes(i)&&u.push(i)}return u}function yu(e){try{const t=localStorage.getItem(gu(e))??localStorage.getItem(Bc);if(t)return JSON.parse(t)}catch{}return null}function Su(e){const t=e?.phonemeView;return t==="pron"?"pron":t==="direct"?"direct":"char"}function Lc(e){const t=e;return t?.composition?{cho:t.composition.cho??null,jung:t.composition.jung??null,jong:t.composition.jong??null,syllable:t.composition.syllable??null}:t?.choseong?{...To,cho:t.choseong}:To}const bu=["1\uB4F1\uAE09 : \uD559\uB839\uC804\uAE30\uC5D0 \uC2B5\uB4DD\uD558\uC5EC \uD3C9\uC0DD\uC5D0 \uAC78\uCCD0 \uC77C\uC0C1 \uC5B8\uC5B4\uC0DD\uD65C\uC744 \uD558\uB294 \uB370 \uC0AC\uC6A9\uB418\uB294 \uC5B4\uD718","2\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 1-2\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","3\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 3-4\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","4\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 5-6\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","\uB4F1\uAE09\uC5C6\uC74C : \uAD6D\uB9BD\uAD6D\uC5B4\uC6D0 \uD45C\uC900 \uC5B4\uD718 \uC678 \uACE0\uBE48\uB3C4 \uC0DD\uD65C \uC5B4\uD718, \uC2E0\uC870\uC5B4 \uBC0F \uC678\uB798\uC5B4"];function wu(e){const t=e("wordPairs.filter.difficultyInfo",{returnObjects:!0,defaultValue:bu});return Array.isArray(t)&&t.length>0&&t.every(n=>typeof n=="string")?t:bu}function Rc(e,t,n){const{t:o,i18n:r}=We.useTranslation(),[u]=c.useState(()=>n?.resetOnMount?null:yu(e)),[a,i]=c.useState(Su(u)),[s,d]=c.useState(()=>Lc(u)),m=c.useCallback(()=>t.requireSyllable?{cho:"\u3131",jung:"\u314F",jong:je,syllable:t.fixedSyllable??null}:{cho:null,jung:null,jong:t.fixedNoCoda?je:null,syllable:t.fixedSyllable??null},[t.requireSyllable,t.fixedSyllable,t.fixedNoCoda]);c.useEffect(()=>{!t.requireSyllable&&t.fixedSyllable==null&&!t.fixedNoCoda||d(E=>E.cho||E.jung||E.syllable!=null||E.jong?E:m())},[]);const f=c.useMemo(()=>ce(s.cho)||ce(s.jung)||ce(s.jong)?"count":"random",[s.cho,s.jung,s.jong]),g=c.useRef(a==="char"?s.jung:null),C=c.useRef(a==="char"?s.jong:null);c.useEffect(()=>{a==="char"&&(g.current=s.jung,C.current=s.jong)},[a,s.jung,s.jong]);const[h,w]=c.useState(n?.resetOnMount?!!n?.defaultImageOnly:u?.excludeNoImage??!0),[S,y]=c.useState(n?.resetOnMount?!1:u?.sameStructureOnly??!0),[b,_]=c.useState(Do(u?.gradeFilter)),D=Array.from(new Set([r.language,"ko","en"].filter(Boolean))),B=(E,$)=>r.getFixedT(E)($),M=E=>hu(E,No,$=>`wordSearch.filter.pos.${$}`,B,D),O=E=>hu(E,Oo,$=>`wordSearch.filter.type.${$}`,B,D),[R,x]=c.useState(()=>M(u?.posFilter)),[v,z]=c.useState(()=>O(u?.wordTypeFilter)),Z=c.useRef(n?.resetKey);c.useEffect(()=>{Z.current!==n?.resetKey&&(Z.current=n?.resetKey,d(m()),w(!!n?.defaultImageOnly),y(!1),_([]),x([]),z([]))},[n?.resetKey]);const V=nu(),F=c.useMemo(()=>Object.keys(V.posMap),[V]),k=c.useMemo(()=>Object.keys(V.typeMap),[V]),K=c.useMemo(()=>R.map(E=>F[No.indexOf(E)]).filter(Boolean),[R,F]),pe=c.useMemo(()=>v.map(E=>k[Oo.indexOf(E)]).filter(Boolean),[v,k]),[re,ve]=c.useState({cho:new Set,jung:new Set,jong:new Set,syllable:new Set}),[L,H]=c.useState(!1),[j,J]=c.useState(null),W=1,he=Math.max(1,[s.cho,s.jung,s.jong].filter(Boolean).length),[$e,ot]=c.useState(e);c.useEffect(()=>{if($e!==e){if(!n?.resetOnMount){const E=yu(e);d(E?.composition??m()),w(E?.excludeNoImage??!0),y(E?.sameStructureOnly??!0),i(Su(E)),_(Do(E?.gradeFilter)),x(M(E?.posFilter)),z(O(E?.wordTypeFilter))}ot(e)}},[e,$e,n?.resetOnMount]),c.useEffect(()=>{if(!n?.resetOnMount&&$e===e)try{localStorage.setItem(gu(e),JSON.stringify({contrastCount:he,composition:s,excludeNoImage:h,sameStructureOnly:S,phonemeView:a,gradeFilter:b,posFilter:R,wordTypeFilter:v}))}catch{}},[n?.resetOnMount,e,$e,he,s,h,S,a,b,R,v]);const[qe,Dt]=c.useState(0);Xn("wordpool:update",()=>Dt(E=>E+1)),Xn(Ar,()=>Dt(E=>E+1));const dn=c.useRef(r.language);c.useEffect(()=>{dn.current!==r.language&&(dn.current=r.language,Dt(E=>E+1))},[r.language]),c.useEffect(()=>{if(!t.choseong)return;let E=!1;return cc({difficulty:f,excludeNoImage:h}).then($=>{E||(ve($),H($.cho.size+$.jung.size+$.jong.size>0))}).catch(()=>{E||(ve({cho:new Set,jung:new Set,jong:new Set,syllable:new Set}),H(!1))}),()=>{E=!0}},[t.choseong,f,h,qe]),c.useEffect(()=>{let E=!1;const $=s,P=$.cho?ze($.cho):null,Y=$.jung?ze($.jung):null,Q=$.jong===je,Pe=Q?null:$.jong?ze($.jong):null,Be=$.syllable!=null?Eo($.syllable):null,Ge=!!(P||Y||Pe||Q||Be);return sc({difficulty:t.difficulty?f:null,contrastCount:t.difficulty?he:1,composition:t.choseong&&Ge?{cho:P,jung:Y,jong:Pe,jongNone:Q,syllable:Be}:null,excludeNoImage:h,sameStructureOnly:S,phonemeView:a==="pron"?"pron":"char",grade:b.length>0?b:null}).then(Xe=>{E||J(Xe)}).catch(()=>{E||J(null)}),()=>{E=!0}},[t.choseong,t.difficulty,f,he,s,a,h,S,qe,b]),c.useEffect(()=>{L&&d(E=>{const $={...E};let P=!1;return["cho","jung","jong"].forEach(Y=>{const Q=E[Y];!Q||Q===je||ze(Q).some(Pe=>re[Y].has(Pe))||($[Y]=null,P=!0)}),E.syllable!=null&&t.fixedSyllable==null&&(E.syllable>=He?[...re.syllable].some(Y=>Y>=He)||($.syllable=null,P=!0):(!re.syllable.has(E.syllable)||E.syllable<W)&&($.syllable=null,P=!0)),P?$:E})},[re,L,W,t.fixedSyllable]);const Nt=c.useMemo(()=>{const E=$=>{const P=new Set;for(const Y of du[$])re[$].has(Y)&&P.add(Y);return P};return{cho:E("cho"),jung:E("jung"),jong:E("jong")}},[re]),Ot=c.useMemo(()=>({exact:new Set(su.filter(E=>re.syllable.has(E))),min:[...re.syllable].some(E=>E>=He)}),[re]),U=c.useMemo(()=>({composition:o("wordPairs.composition","\uC815\uB2F5 \uB2E8\uC5B4 \uAD6C\uC131"),syllableCount:o("wordPairs.syllableCount","\uC74C\uC808 \uC218"),onset:o("wordPairs.onset","\uCD08\uC131"),vowel:o("wordPairs.vowel","\uBAA8\uC74C"),coda:o("wordPairs.coda","\uC885\uC131"),phonemeGroup:o("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),trainOnset:o("training.filter.trainOnset",{defaultValue:"\uCD08\uC131"}),trainVowel:o("training.filter.trainVowel",{defaultValue:"\uBAA8\uC74C"}),trainCoda:o("training.filter.trainCoda",{defaultValue:"\uC885\uC131"}),random:o("training.filter.random","\uBB34\uC791\uC704"),exclude:o("wordSearch.filter.exclude","\uC81C\uC678"),selectLabel:o("training.filter.selectSection",{defaultValue:"\uC120\uD0DD"}),none:o("common.none","\uC5C6\uC74C"),noImage:o("wordSearch.filter.excludeNoImage","\uC774\uBBF8\uC9C0 \uC5C6\uC74C"),excludeImage:o("training.filter.excludeImage",{defaultValue:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC"}),sameStructure:o("training.filter.sameStructure",{defaultValue:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC"}),noLimit:o("training.filter.noLimit",{defaultValue:"\uBB34\uAD00"}),codaExclude:o("training.filter.codaExclude",{defaultValue:"\uC81C\uC678"}),gradeLabel:o("training.filter.gradeLabel",{defaultValue:"\uB09C\uC774\uB3C4 \uB4F1\uAE09"})}),[o]),ne=c.useMemo(()=>({[U.trainOnset]:"cho",[U.trainVowel]:"jung",[U.trainCoda]:"jong"}),[U]),Je=c.useCallback((E,$)=>({title:$,items:E}),[]),ee=c.useMemo(()=>[o("training.filter.excludeImageInfo",{defaultValue:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC: \uB2E8\uC5B4 \uC911\uC5D0 \uC774\uBBF8\uC9C0\uAC00 \uC788\uB294 \uB2E8\uC5B4\uB9CC \uACB0\uACFC\uC5D0 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4."}),o("training.filter.sameStructureInfo",{defaultValue:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC: \uC815\uB2F5\uACFC \uC624\uB2F5\uC758 \uC74C\uC808 \uAD6C\uC870(\uAE00\uC790 \uC218\xB7\uBC1B\uCE68 \uC720\uBB34 \uB4F1)\uAC00 \uAC19\uC740 \uACB0\uACFC\uB9CC \uB0A8\uACA8\uC694."})],[o]),vt=c.useMemo(()=>{const E=[];if(t.choseong){const $={value:je,displayLabel:U.codaExclude},P=t.fixedNoCoda===!0,Y=(Q,Pe)=>{const Be=P&&Q==="jong",Ge={label:Pe,groupLabel:U.phonemeGroup,allOption:!t.requireSyllable,allLabel:U.noLimit,allOptionDisabled:Be};if(a==="pron"){const Ee=_o[Q].map(ft=>ft.map(({v:Qe,phonetic:Cn})=>{const pt=ze(Qe),Lt=lu(o,Cn),Ct=Be||!pt.some(Rt=>re[Q].has(Rt));return pt.length>1?{value:Qe,labels:pt,tooltip:Lt,disabled:Ct}:{value:Qe,tooltip:Lt,disabled:Ct}}));return Q==="jong"&&!t.requireCoda&&Ee.unshift([$]),{...Ge,groups:Ee}}const Xe=du[Q].map(Ee=>!Be&&Nt[Q].has(Ee)?Ee:{value:Ee,disabled:!0});return{...Ge,items:Q==="jong"&&!t.requireCoda?[$,...Xe]:Xe}};E.push(Y("cho",U.trainOnset)),E.push(Y("jung",U.trainVowel)),E.push(Y("jong",U.trainCoda))}if(E.push({...ou(o,V,{labelInfo:Je(wu(o))}),label:U.gradeLabel}),t.partOfSpeech&&E.push(ru(V)),t.wordType&&E.push(uu(V)),t.choseong||t.fixedSyllable!=null){const $=t.fixedSyllable;E.push({label:U.syllableCount,items:[...su.map(P=>({value:wo(P),displayLabel:o("wordPairs.syllableN",{n:P,defaultValue:"{{n}}\uC74C\uC808"}),disabled:$!=null?P!==$:!Ot.exact.has(P)||P<W})),{value:wo(He),displayLabel:o("wordPairs.syllableNPlus",{n:He,defaultValue:"{{n}}\uC74C\uC808 \uC774\uC0C1"}),disabled:$!=null?He!==$:!Ot.min}],allOption:!0,allOptionDisabled:$!=null})}return t.choseong?E.push({label:U.exclude,displayLabel:U.selectLabel,multiple:!0,items:[U.excludeImage,U.sameStructure],labelInfo:Je(ee)}):E.push({label:U.exclude,displayLabel:U.selectLabel,multiple:!0,items:[U.excludeImage],labelInfo:Je([ee[0]])}),E},[t.choseong,t.partOfSpeech,t.wordType,t.requireSyllable,t.fixedSyllable,t.fixedNoCoda,t.requireCoda,W,Nt,re,a,Ot,U,o,Je,ee,V]),Ne={...(t.choseong||t.fixedSyllable!=null)&&s.syllable!=null?{[U.syllableCount]:wo(s.syllable)}:{},...t.choseong&&s.cho?{[U.trainOnset]:s.cho}:{},...t.choseong&&s.jung?{[U.trainVowel]:s.jung}:{},...t.choseong&&s.jong?{[U.trainCoda]:s.jong}:{},[U.exclude]:[...h?[U.excludeImage]:[],...S?[U.sameStructure]:[]],[U.gradeLabel]:b.map(E=>Ps("grade",E)),...t.partOfSpeech?{[V.partOfSpeech]:K}:{},...t.wordType?{[V.wordType]:pe}:{}},rt=c.useCallback((E,$)=>{if($===U.exclude)E===U.excludeImage?w(P=>!P):E===U.sameStructure&&y(P=>!P);else if($===U.syllableCount)d(P=>{if(!E||E===Fe)return{...P,syllable:null};const Y=Oc(E);return{...P,syllable:P.syllable===Y?null:Y}});else if($===U.gradeLabel){if(!E||E===Fe){_([]);return}const P=st("grade",E);if(P==null)return;_(Y=>Y.includes(P)?Y.filter(Q=>Q!==P):[...Y,P])}else if($===V.partOfSpeech){if(!E||E===Fe){x([]);return}const P=No[F.indexOf(E)]??M([E])[0];if(!P)return;x(Y=>Y.includes(P)?Y.filter(Q=>Q!==P):[...Y,P])}else if($===V.wordType){if(!E||E===Fe){z([]);return}const P=Oo[k.indexOf(E)]??O([E])[0];if(!P)return;z(Y=>Y.includes(P)?Y.filter(Q=>Q!==P):[...Y,P])}else{const P=ne[$];if(!P)return;d(Y=>t.requireSyllable?E&&E!==Fe?{...Y,[P]:E}:Y:!E||E===Fe||Y[P]===E?{...Y,[P]:null}:{...Y,[P]:E})}},[U,ne,V,F,k,t.requireSyllable]),fn=c.useCallback(E=>!t.partOfSpeech&&!t.wordType?!0:Sc(E,{...t.partOfSpeech?{[V.partOfSpeech]:K}:{},...t.wordType?{[V.wordType]:pe}:{}},V),[t.partOfSpeech,t.wordType,K,pe,V]),Ie=c.useCallback(E=>{E!==a&&(E!=="direct"&&a!=="direct"&&d($=>mu($,E,g.current,C.current)),i(E))},[a]),pn=c.useCallback(()=>({composition:s,contrastCount:he,excludeNoImage:h,sameStructureOnly:S,phonemeView:a,gradeFilter:b,posFilter:R,wordTypeFilter:v}),[s,he,h,S,a,b,R,v]),Bt=c.useCallback(E=>{d(E.composition),w(E.excludeNoImage),y(E.sameStructureOnly??!0),i(E.phonemeView),_(Do(E.gradeFilter)),Array.isArray(E.posFilter)&&x(M(E.posFilter)),Array.isArray(E.wordTypeFilter)&&z(O(E.wordTypeFilter))},[]);return{difficulty:f,contrastCount:he,composition:s,choseong:s.cho,excludeNoImage:h,sameStructureOnly:S,gradeFilter:b,posFilter:K,wordTypeFilter:pe,matchesWordAttributes:fn,poolVersion:qe,filterSections:vt,filterSelected:Ne,handleFilterSelect:rt,phonemeView:a,setPhonemeView:Ie,phonemeGroupLabel:U.phonemeGroup,wordCount:j,getFilterSnapshot:pn,restoreFilterSnapshot:Bt}}function Mc(e){const t=i=>i?ze(i):null,n=t(e.cho),o=t(e.jung),r=e.jong===je,u=r?null:t(e.jong),a=e.syllable!=null?Eo(e.syllable):null;return!n&&!o&&!u&&!r&&!a?null:{cho:n,jung:o,jong:u,jongNone:r,syllable:a}}function Ic(e,t,n,o,r,u,a=!0,i="char",s=[]){const[d,m]=c.useState({}),[f,g]=c.useState(!1),{cho:C=null,jung:h=null,jong:w=null,syllable:S=null}=o??{},y=s.length>0?s.slice().sort().join(","):"",b=e.map(D=>D.key).join("|");c.useEffect(()=>{u>0&&ic(r).catch(()=>{})},[u,r]),c.useEffect(()=>{let D=!1;return g(!0),(async()=>{const B=Mc({cho:C,jung:h,jong:w,syllable:S}),M=`${C??""}_${h??""}_${w??""}_${S??""}_${y}`,O={};await Promise.all(e.map(async R=>{const x=eo[R.key];try{const v=await tu(R.key,{difficulty:x.difficulty?t:null,contrastCount:x.difficulty?n:1,composition:x.choseong?B:null,count:5,excludeNoImage:r,sameStructureOnly:a,phonemeView:i,grade:s.length>0?s:null});v&&v.length>0?O[R.key]={id:`wt-${R.key}-${t}-${M}-${Date.now()}`,name:R.label,training_type:R.key,category_main_code:"WORD",iconColor:R.color,subTitle:R.subTitle,items:v,itemCount:v.length}:O[R.key]={id:`wt-${R.key}-empty`,name:R.label,training_type:R.key,category_main_code:"WORD",iconColor:R.color,subTitle:R.subTitle,items:[],itemCount:0,__empty:!0}}catch{O[R.key]=null}})),D||(m(O),g(!1))})(),()=>{D=!0}},[t,n,C,h,w,S,r,a,i,u,y,b]);const _=JSON.stringify(e.map(D=>[D.key,D.label,D.color,D.subTitle]));return{perTypeData:c.useMemo(()=>{const D={};for(const[B,M]of Object.entries(d)){const O=e.find(R=>R.key===B);D[B]=M&&O?{...M,name:O.label,iconColor:O.color,subTitle:O.subTitle}:M}return D},[d,_]),generating:f}}const Xt=[],Qt=[],Zt=[],en=[],In={LISTEN_IN_NOISE:[],SHORT_STORY:[],LONG_STORY:[],ORDERING_SENTENCE:[]},Pn={LISTEN_IN_NOISE:[],SHORT_STORY:[],LONG_STORY:[],ORDERING_SENTENCE:[]},Pc={LISTEN_IN_NOISE:3,SHORT_STORY:2,LONG_STORY:1,ORDERING_SENTENCE:2};let vo=null,Eu=null,Ke=null;function kc({counts:e,forceRefresh:t}={}){const n=Object.assign({},Pc,e||{}),o=Pt(),r=kt(new Date(`${o}T00:00:00+09:00`).getTime()-864e5),u=JSON.stringify(n);if(!t&&Eu===o&&vo===u&&Ke)return Object.assign(In,Ke.today),Object.assign(Pn,Ke.yesterday?.selection||{LISTEN_IN_NOISE:[],SHORT_STORY:[],LONG_STORY:[],ORDERING_SENTENCE:[]}),{today:In,yesterday:Pn};const a={LISTEN_IN_NOISE:Ve(Xt,Math.max(0,Number(n.LISTEN_IN_NOISE)||0)),SHORT_STORY:Ve(Qt,Math.max(0,Number(n.SHORT_STORY)||0)),LONG_STORY:Ve(Zt,Math.max(0,Number(n.LONG_STORY)||0)),ORDERING_SENTENCE:Ve(en,Math.max(0,Number(n.ORDERING_SENTENCE)||0))};let i=null;return Ke&&vo===u&&Ke.yesterday&&Ke.yesterday.date===r&&(i=Ke.yesterday.selection),i||(i={LISTEN_IN_NOISE:Ve(Xt,Math.max(0,Number(n.LISTEN_IN_NOISE)||0)),SHORT_STORY:Ve(Qt,Math.max(0,Number(n.SHORT_STORY)||0)),LONG_STORY:Ve(Zt,Math.max(0,Number(n.LONG_STORY)||0)),ORDERING_SENTENCE:Ve(en,Math.max(0,Number(n.ORDERING_SENTENCE)||0))}),Object.assign(In,a),Object.assign(Pn,i),Eu=o,vo=u,Ke={today:a,yesterday:{date:r,countsKey:u,selection:i}},{today:In,yesterday:Pn}}let Bo=!1,tn=null;async function xc(){try{const e={url:typeof document>"u"?require("url").pathToFileURL(__filename).href:Jn&&Jn.tagName.toUpperCase()==="SCRIPT"&&Jn.src||new URL("hooks.cjs.js",document.baseURI).href}&&void 0||"/",t=await fetch(`${e}data/allTrainingData.json`);return t.ok?await t.json():null}catch{return null}}async function Fc(){if(!Bo)return tn||(tn=(async()=>{const e=await xc();if(!e){tn=null;try{window.dispatchEvent(new Event("speechear.data.error"))}catch{}return}const t={noise:[],short:[],long:[],order:[]};try{if(typeof e!="object"||Array.isArray(e))throw new Error("Invalid training data map");for(const n of Object.keys(e)){const o=e[n];if(!Array.isArray(o))throw new Error("Invalid training data group");for(const r of o){if(!r||typeof r!="object")continue;const u=r,a=String(u.training_type||n),i=String(u.category_main_code||u.category_main||u.category_0||""),s=String(u.category_sub_code||u.category_sub||u.category_1||""),d=Object.assign({},u,{training_type:a,category_0:i,category_1:s});a==="LISTEN_IN_NOISE"?t.noise.push(d):a==="SHORT_STORY"?t.short.push(d):a==="LONG_STORY"?t.long.push(d):a==="ORDERING_SENTENCE"&&t.order.push(d)}}}catch{tn=null;try{window.dispatchEvent(new Event("speechear.data.error"))}catch{}return}Xt.push(...t.noise),Qt.push(...t.short),Zt.push(...t.long),en.push(...t.order),Bo=!0,Ke=null;try{kc()}catch{}try{window.dispatchEvent(new Event("speechear.data.updated"))}catch{}})(),tn)}async function jc(e=3e3){const t=Fc();let n;try{await Promise.race([t,new Promise(o=>{n=setTimeout(o,e)})])}finally{n!==void 0&&clearTimeout(n)}return Bo}function Au(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function Hc(e){let t=e>>>0;return()=>{t|=0,t=t+1831565813|0;let n=Math.imul(t^t>>>15,1|t);return n=n+Math.imul(n^n>>>7,61|n)^n,((n^n>>>14)>>>0)/4294967296}}const $c=Ve,Gc=e=>{const[t,n,o]=e.split("-").map(Number);return Math.round(Date.UTC(t,(n||1)-1,o||1)/864e5)},Wc=(e,t)=>{const n=e??{};return String(n.id??n.name??t)};function kn(e,t,n,o,r){if(!e.length||t<=0)return[];const u=Hc(Au(`${n}|${o}|${r}`)),a=Gc(o)&1,i=e.filter((d,m)=>(Au(`${n}|${r}|${Wc(d,m)}`)>>>7&1)===a),s=i.length>=t&&e.length-i.length>=t;return $c(s?i:e,t,u)}function Lo(e,t,n){const o=r=>Math.max(0,e[r]||0);return{LISTEN_IN_NOISE:kn(Xt,o("LISTEN_IN_NOISE"),t,n,"LISTEN_IN_NOISE"),SHORT_STORY:kn(Qt,o("SHORT_STORY"),t,n,"SHORT_STORY"),LONG_STORY:kn(Zt,o("LONG_STORY"),t,n,"LONG_STORY"),ORDERING_SENTENCE:kn(en,o("ORDERING_SENTENCE"),t,n,"ORDERING_SENTENCE")}}function Ro(e){return e?!!(e.LISTEN_IN_NOISE?.length||e.SHORT_STORY?.length||e.LONG_STORY?.length||e.ORDERING_SENTENCE?.length):!1}const Vc={LISTEN_IN_NOISE:3,SHORT_STORY:2,LONG_STORY:1,ORDERING_SENTENCE:2};function Mo(e=!1,t=Vc,n){const o=Date.now(),r=kt(o),u=kt(o-864e5),a=n??"";return Xt.length>0||Qt.length>0||Zt.length>0||en.length>0?{today:Lo(t,a,r),yesterday:Lo(t,a,u)}:{today:Lo(t,a,r),yesterday:null}}function Yc(e){const t=c.useRef({LISTEN_IN_NOISE:[],SHORT_STORY:[],LONG_STORY:[],ORDERING_SENTENCE:[]}),n=c.useRef(null),[o,r]=c.useState(!1),[u,a]=c.useState(!1),[i,s]=c.useState(0),[d,m]=c.useState(!1),[f,g]=c.useState(()=>Pt()),C=JSON.stringify([e??"",f]),h=c.useRef(null),w=c.useRef(C);c.useEffect(()=>{const y=()=>{const _=Date.now(),D=new Date(_+9*36e5),B=Date.UTC(D.getUTCFullYear(),D.getUTCMonth(),D.getUTCDate()+1)-9*36e5;return Math.max(1e3,B-_+1e3)};let b=setTimeout(function _(){g(Pt()),b=setTimeout(_,y())},y());return()=>clearTimeout(b)},[]),c.useEffect(()=>{w.current=C,h.current=null,r(!1),m(!1);let y=!1,b=!1,_=!1,D,B=0,M=null,O=0;const R=40,x=()=>{D!==void 0&&(clearInterval(D),D=void 0)};let v=!1;try{const k=new URLSearchParams(window.location.search),K=k.get("forceRefresh")||k.get("force");v=K==="1"||K==="true"}catch{}const z=k=>{b||(_=!0,h.current=C,t.current=k.today,n.current=k.yesterday,r(!0),m(!0),s(K=>K+1),y=!0,x())},Z=async()=>{if(y)return;if(!v){const K=Mo(!1,void 0,e);if(Ro(K.today)){z(K);return}}if(M){++B>=R&&V();return}if(B>=O){O=B+8,M=jc(3e3).catch(()=>!1);try{await M}finally{M=null}if(y)return}const k=Mo(v,void 0,e);if(Ro(k.today)){z(k);return}++B>=R&&V()};function V(){r(!0),m(!1),y=!0,x()}const F=()=>{if(b||_)return;const k=Mo(v,void 0,e);Ro(k.today)&&z(k)};try{window.addEventListener("speechear.data.updated",F)}catch{}return D=setInterval(Z,250),Z(),()=>{y=!0,b=!0,x();try{window.removeEventListener("speechear.data.updated",F)}catch{}}},[e,f]);const S=c.useCallback(y=>{if(h.current!==C)return;const b=u?n.current:t.current,_=u?t.current:n.current;return b?.[y]?.length?b[y]:_?.[y]?.length?_[y]:void 0},[u,i,C]);return{loaded:w.current===C&&o,hasData:w.current===C&&d,showYesterday:u,setShowYesterday:a,getTrainingPerType:S}}const At=[];let xn=!1;function _u(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const t=At[At.length-1];t&&(e.stopPropagation(),t())}function Tu(e){return At.push(e),!xn&&typeof document<"u"&&(document.addEventListener("keydown",_u),xn=!0),()=>{const t=At.lastIndexOf(e);t>=0&&At.splice(t,1),At.length===0&&xn&&typeof document<"u"&&(document.removeEventListener("keydown",_u),xn=!1)}}function Uc(e,t=!0){const n=gr(e);c.useEffect(()=>{if(t)return Tu(()=>{n.current?.()})},[t,n])}const Io=(e,t)=>`${e}:${t??1}`,nn=new Map,Po=new Set,ko=new Map,Fn=6e4;function zc(e,t){const[n,o]=c.useState(0),[r,u]=c.useState(0),a=JSON.stringify(Array.from(new Set(e.map(i=>Io(i.word,i.homonum)))).sort());return c.useEffect(()=>{const i=JSON.parse(a),s=Date.now(),d=i.filter(w=>!nn.has(w)&&!Po.has(w)&&!(s-(ko.get(w)??-1/0)<Fn));let m=!1,f=null,g=1/0;const C=(w=Fn)=>{if(m)return;const S=Date.now()+w;S>=g||(f!==null&&clearTimeout(f),g=S,f=setTimeout(()=>u(y=>y+1),w))};for(const w of i){if(nn.has(w)||Po.has(w))continue;const S=ko.get(w);S!=null&&s-S<Fn&&C(Math.max(0,Fn-(s-S)))}if(d.length===0)return()=>{m=!0,f!==null&&clearTimeout(f)};const h=Array.from(new Set(d.map(w=>w.slice(0,w.lastIndexOf(":")))));return Promise.resolve().then(()=>t(h)).then(w=>{for(const S of w)S.Meaning&&nn.set(Io(S.Word,S.Homonum??void 0),S.Meaning);if(w.length>0)for(const S of d)nn.has(S)||Po.add(S);else{const S=Date.now();for(const y of d)ko.set(y,S);C()}m||w.length===0||o(S=>S+1)}).catch(()=>{C()}),()=>{m=!0,f!==null&&clearTimeout(f)}},[a,t,r]),c.useMemo(()=>{const i=JSON.parse(a),s=new Map;for(const d of i){const m=nn.get(d);m!=null&&s.set(d,m)}return s},[a,n])}function Kc(){const[e,t]=c.useState(null),n=c.useCallback(u=>t(u.getBoundingClientRect()),[]),o=c.useCallback(()=>t(null),[]),r=c.useCallback(u=>{const a=u.getBoundingClientRect();t(i=>i?null:a)},[]);return{anchorRect:e,isOpen:e!=null,openAt:n,close:o,toggleAt:r}}function qc(e){const[t,n]=c.useState(null),[o,r]=c.useState(null),u=c.useRef(null);c.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]);const a=c.useCallback((s,d)=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{n(s),r(d)},e)},[e]),i=c.useCallback(()=>{u.current&&clearTimeout(u.current),n(null),r(null)},[]);return{payload:t,anchorRect:o,openAfterDelay:a,close:i}}function Jc(e,t,n){const o=Number.isFinite(t)&&t>=1?Math.floor(t):1,r=Math.max(1,Math.ceil(e.length/o)),u=Number.isFinite(n)?Math.min(Math.max(1,Math.floor(n)),r):1;return{pageItems:c.useMemo(()=>e.slice((u-1)*o,u*o),[e,u,o]),totalPages:r,curPage:u}}function Du(e,t){const[n,o]=c.useState(e);n!==e&&(o(e),t(1))}function Xc(e={}){const{defaultPageSize:t="25",resetOn:n}=e,[o,r]=c.useState(""),[u,a]=c.useState(t),[i,s]=c.useState(1),d=g=>{const C=Number(g);return Number.isFinite(C)&&C>=1?Math.floor(C):null},m=d(t)??25,f=d(u)??m;return Du(JSON.stringify([o,u,...n??[]]),s),{query:o,setQuery:r,pageSize:u,setPageSize:a,perPage:f,page:i,setPage:s}}function Qc(e="warning"){const[t,n]=c.useState(""),[o,r]=c.useState(e),[u,a]=c.useState(0),i=c.useCallback((f,g)=>{r(g),n(f),a(C=>C+1)},[]),s=c.useCallback(f=>i(f,"warning"),[i]),d=c.useCallback(f=>i(f,"normal"),[i]),m=c.useCallback(()=>n(""),[]);return{toastMessage:t,toastType:o,toastKey:u,showToast:i,showWarning:s,showNormal:d,clearToast:m}}const Zc=[{key:"LISTEN_IN_NOISE",label:"\uC18C\uC74C \uD558 \uBB38\uC7A5 \uB4E3\uAE30",icon:"audio-lines",desc:"\uB2E4\uC591\uD55C \uC18C\uC74C \uD658\uACBD\uC5D0\uC11C \uBB38\uC7A5 \uCCAD\uB825\uC744 \uD6C8\uB828\uD569\uB2C8\uB2E4."},{key:"SHORT_STORY",label:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square",desc:"\uC9E7\uC740 \uC774\uC57C\uAE30\uB97C \uB4E3\uACE0 \uAE30\uC5B5\uD558\uC5EC \uBB38\uC81C\uB97C \uD480\uC5B4\uBD05\uB2C8\uB2E4."},{key:"LONG_STORY",label:"\uAE34 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square-text",desc:"\uAE34 \uC774\uC57C\uAE30\uB97C \uB4E3\uACE0 \uAE30\uC5B5\uD558\uC5EC \uB2E4\uC218\uC758 \uBB38\uC81C\uB97C \uD480\uC5B4\uBD05\uB2C8\uB2E4."},{key:"ORDERING_SENTENCE",label:"\uBB38\uC7A5 \uC21C\uC11C\uD654 \uD558\uAE30",icon:"align-start-vertical",desc:"\uC5EC\uB7EC\uAC1C\uC758 \uC9E7\uC740 \uBB38\uC7A5\uC744 \uB4E3\uACE0 \uAE30\uC5B5\uD558\uC5EC \uADF8 \uC21C\uC11C\uC5D0 \uB9DE\uAC8C \uBC30\uC5F4\uD569\uB2C8\uB2E4."}],ed={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function td(e){return Zc.map(t=>{const n=ed[t.key];return n?{...t,label:e(`trainingType.${n}.title`),desc:e(`trainingType.${n}.desc`)}:t})}const on={blue:"#60A5FA",green:"#4ADE80",amber:"#FBBF24",purple:"#A78BFA",pink:"#F472B6"},rn=on.blue,jn=on.green,un=on.amber,Hn=on.purple,nd=on.pink,od=[{key:"discrimination",label:"\uBCC0\uBCC4\uD6C8\uB828",disc:"\uB450 \uC18C\uB9AC\uAC00 \uAC19\uC740\uC9C0 \uB2E4\uB978\uC9C0, \uB610\uB294 \uD2B9\uC815 \uC18C\uB9AC\uB97C \uAD6C\uBCC4\uD558\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"ear",types:[{key:"SAME_SOUND_PICK",label:"\uAC19\uC740 \uC18C\uB9AC \uACE0\uB974\uAE30",icon:"volume-2",color:rn,subTitle:"\uB4E4\uC740 \uC18C\uB9AC\uC640 \uAC19\uC740 \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},{key:"SAME_OR_DIFF",label:"\uAC19\uC740\uC9C0 \uB2E4\uB978\uC9C0 \uB9DE\uD788\uAE30",icon:"diff",color:rn,subTitle:"\uB450 \uC18C\uB9AC\uAC00 \uAC19\uC740\uC9C0, \uB2E4\uB978\uC9C0 \uAD6C\uBD84\uD558\uC138\uC694."},{key:"HEAR_AND_PICK_SAME",label:"\uC77C\uCE58\uD558\uB294 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",icon:"headphones",color:rn,subTitle:"\uB4E4\uC740 \uC18C\uB9AC\uC758 \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},{key:"HEAR_AND_PICK_INCLUDED",label:"\uD55C \uC74C\uC808 \uD3EC\uD568 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",icon:"scan-search",color:rn,subTitle:"\uB4E4\uC740 \uC74C\uC808\uC774 \uD3EC\uD568\uB41C \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},{key:"STARTS_WITH_SAME_SOUND",label:"\uCCAB \uC74C\uC808\uC774 \uAC19\uC740 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",icon:"play-circle",color:rn,subTitle:"\uB4E4\uC740 \uB2E8\uC5B4\uC640 \uAC19\uC740 \uC18C\uB9AC\uB85C \uC2DC\uC791\uD558\uB294 \uB2E8\uC5B4\uB97C \uACE0\uB974\uC138\uC694."}]},{key:"synthesis",label:"\uD569\uC131\uD6C8\uB828",disc:"\uB450 \uAC1C \uC774\uC0C1\uC758 \uC74C\uC808\uC774\uB098 \uC74C\uC18C\uB97C \uD569\uCCD0 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"git-merge",types:[{key:"MERGE_2_SYLLABLES",label:"\uC74C\uC808 2\uAC1C \uD569\uCE58\uAE30",icon:"link-2",color:jn,subTitle:"\uB450 \uC74C\uC808\uC744 \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},{key:"MERGE_3_SYLLABLES",label:"\uC74C\uC808 3\uAC1C \uD569\uCE58\uAE30",icon:"git-merge",color:jn,subTitle:"\uC138 \uC74C\uC808\uC744 \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},{key:"MERGE_2_PHONEMES",label:"\uC74C\uC18C 2\uAC1C \uD569\uCE58\uAE30",icon:"combine",color:jn,subTitle:"\uB450 \uC74C\uC18C\uB97C \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},{key:"MERGE_3_PHONEMES",label:"\uC74C\uC18C 3\uAC1C \uD569\uCE58\uAE30",icon:"braces",color:jn,subTitle:"\uC138 \uC74C\uC18C\uB97C \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"}]},{key:"deletion",label:"\uD0C8\uB77D\uD6C8\uB828",disc:"\uB2E8\uC5B4\uC5D0\uC11C \uC74C\uC808\uC774\uB098 \uC74C\uC18C\uB97C \uC81C\uAC70\uD588\uC744 \uB54C \uB0A8\uB294 \uC18C\uB9AC\uB97C \uC778\uC2DD\uD558\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"scissors",types:[{key:"DROP_1_FROM_2SYLL",label:"2\uC74C\uC808\uC5D0\uC11C 1\uC74C\uC808 \uD0C8\uB77D",icon:"scissors",color:un,subTitle:"2\uC74C\uC808 \uB2E8\uC5B4\uC5D0\uC11C \uD55C \uC74C\uC808\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},{key:"DROP_1_FROM_3SYLL",label:"3\uC74C\uC808\uC5D0\uC11C 1\uC74C\uC808 \uD0C8\uB77D",icon:"minus-circle",color:un,subTitle:"3\uC74C\uC808 \uB2E8\uC5B4\uC5D0\uC11C \uD55C \uC74C\uC808\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},{key:"DROP_PART_FROM_COMPOUND",label:"\uD569\uC131\uC5B4\uC5D0\uC11C \uBD80\uBD84\uD0C8\uB77D",icon:"unlink",color:un,subTitle:"\uD569\uC131\uC5B4\uC758 \uC77C\uBD80\uB97C \uBE7C\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},{key:"DROP_FINAL_CONSONANT_FROM_1SYLL",label:"1\uC74C\uC808\uC5D0\uC11C \uBC1B\uCE68 \uD0C8\uB77D",icon:"eraser",color:un,subTitle:"\uBC1B\uCE68\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},{key:"REMOVE_CONSONANT_AND_IDENTIFY_PHONEME",label:"1\uC74C\uC808\uC5D0\uC11C \uC790\uC74C \uD0C8\uB77D",icon:"audio-lines",color:un,subTitle:"\uC790\uC74C\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB0A8\uC744\uAE4C\uC694?"}]},{key:"substitution",label:"\uB300\uCE58\uD6C8\uB828",disc:"\uB2E8\uC5B4\uC758 \uC77C\uBD80 \uC74C\uC808\uC774\uB098 \uC74C\uC18C\uB97C \uBC14\uAFB8\uC5B4 \uC0C8\uB85C\uC6B4 \uC18C\uB9AC\uB97C \uB9CC\uB4DC\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"replace",types:[{key:"CHANGE_1_SYLL_IN_2SYLL",label:"2\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uBC14\uAFB8\uAE30",icon:"replace",color:Hn,subTitle:"2\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC808\uC744 \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."},{key:"CHANGE_1_SYLL_IN_3SYLL",label:"3\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uBC14\uAFB8\uAE30",icon:"shuffle",color:Hn,subTitle:"3\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC808\uC744 \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."},{key:"CHANGE_1_PHONEME_IN_1SYLL",label:"1\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC18C \uBC14\uAFB8\uAE30",icon:"arrow-right-left",color:Hn,subTitle:"1\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC18C\uB97C \uBC14\uAFD4 \uC0C8 \uC18C\uB9AC\uB97C \uB9CC\uB4DC\uC138\uC694."},{key:"CHANGE_1_PHONEME_IN_2SYLL",label:"2\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC18C \uBC14\uAFB8\uAE30",icon:"flip-horizontal",color:Hn,subTitle:"2\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC18C\uB97C \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."}]},{key:"attention",label:"\uCCAD\uAC01\uC801\uC8FC\uC758\uB825\uD6C8\uB828",disc:"\uC5EC\uB7EC \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uC21C\uC11C\uB97C \uAE30\uC5B5\uD558\uB294 \uC8FC\uC758\uB825\uACFC \uB2E8\uAE30 \uAE30\uC5B5 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"list-ordered",types:[{key:"LISTEN_AND_REMEMBER_ORDER",label:"\uB4E3\uACE0 \uC21C\uC11C\uB300\uB85C \uAE30\uC5B5\uD558\uAE30",icon:"list-ordered",color:nd,subTitle:"\uC138 \uB2E8\uC5B4\uB97C \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694."}]}];function rd(){const{t:e}=We.useTranslation();return c.useMemo(()=>{const t=Object.fromEntries(td(e).map(o=>[o.key,o.label])),n={...t};return od.flatMap(o=>o.types).forEach(o=>{n[o.key]=e(`trainingType.${o.key}.label`,{defaultValue:o.label})}),{sentence:t,all:n}},[e])}function ud({computeStyle:e,onScroll:t="close",onResize:n="close",ignoreOutsideClickSelector:o}){const[r,u]=c.useState(!1),[a,i]=c.useState({position:"fixed"}),s=c.useRef(null),d=c.useRef(null),m=c.useCallback(()=>{s.current&&i(e(s.current.getBoundingClientRect(),s.current))},[e]);c.useLayoutEffect(()=>{r&&m()},[r,m]),c.useEffect(()=>{if(!r)return;let C=d.current?.offsetHeight??0;C>0&&m();let h=0,w=null;typeof ResizeObserver<"u"&&d.current&&(w=new ResizeObserver(()=>{const O=d.current?.offsetHeight??0;if(O!==C){if(C=O,++h>4){w?.disconnect(),w=null;return}m()}}),w.observe(d.current));const S=O=>{const R=O.target;o&&R.closest?.(o)||s.current?.contains(R)||d.current?.contains(R)||u(!1)};document.addEventListener("mousedown",S),document.addEventListener("pointerdown",S);let y=null;const b=()=>{if(typeof requestAnimationFrame>"u"){m();return}y===null&&(y=requestAnimationFrame(()=>{y=null,m()}))},_=O=>{d.current?.contains(O.target)||(t==="reposition"?b():t==="close"&&u(!1))};t!=="ignore"&&window.addEventListener("scroll",_,!0);const D=()=>{n==="reposition"?b():n==="close"&&u(!1)};let B=null;const M=()=>{D(),B&&clearTimeout(B),B=setTimeout(()=>{B=null,n==="reposition"&&m()},250)};return n!=="ignore"&&(window.addEventListener("resize",D),window.addEventListener("orientationchange",M)),()=>{y!==null&&cancelAnimationFrame(y),w?.disconnect(),document.removeEventListener("mousedown",S),document.removeEventListener("pointerdown",S),t!=="ignore"&&window.removeEventListener("scroll",_,!0),n!=="ignore"&&(window.removeEventListener("resize",D),window.removeEventListener("orientationchange",M)),B&&clearTimeout(B)}},[r,m,t,n,o]),c.useEffect(()=>{if(r)return Tu(()=>u(!1))},[r]);const f=c.useCallback(()=>u(C=>!C),[]),g=c.useCallback(()=>u(!1),[]);return{open:r,setOpen:u,toggle:f,close:g,style:a,triggerRef:s,menuRef:d}}function ad(e,{mode:t="playback",autoStart:n=!1,onPlaySpeaker:o,onComplete:r,playMs:u=1100,feedbackMs:a=1500}={}){const[i,s]=c.useState([]),[d,m]=c.useState(0),[f,g]=c.useState("idle"),[C,h]=c.useState(null),[w,S]=c.useState([]),[y,b]=c.useState(null),[_,D]=c.useState(0),B=c.useRef(0),M=c.useCallback(j=>{B.current=typeof j=="function"?j(B.current):j,D(B.current)},[]),O=c.useRef(o),R=c.useRef(r);c.useEffect(()=>{O.current=o,R.current=r},[o,r]);const x=c.useRef([]),v=()=>{x.current.forEach(clearTimeout),x.current=[]},z=(j,J)=>{x.current.push(setTimeout(J,j))};c.useEffect(()=>()=>v(),[]);const Z=i[d]?.id??null,V=c.useRef(null),F=c.useCallback(()=>{v(),g("playing"),S([]),b(null),M(0);let j=0;e.forEach((J,W)=>{z(j,()=>{m(W),h(J.id),O.current?.(J)}),z(j+1e3,()=>{h(null),S(he=>[...he,J.id])}),j+=1300}),z(j,()=>{g("done"),R.current?.({score:0,total:e.length})})},[e,M]),k=c.useCallback((j,J)=>{if(J>=j.length){g("done"),R.current?.({score:B.current,total:j.length});return}V.current=null,m(J),b(null),g("playing"),h(j[J].id),O.current?.(j[J]),z(u,()=>{h(null),g("waiting")})},[u]),K=c.useCallback(()=>{v();const j=X(e);s(j),M(0),S([]),k(j,0)},[e,k,M]),pe=c.useCallback(()=>{t==="playback"?(s(e),F()):K()},[t,e,F,K]),re=c.useCallback(()=>{v(),g("idle"),h(null),S([]),b(null),m(0),M(0),s([])},[M]),ve=JSON.stringify(e.map(j=>[j.id,j.label,j.angleDeg,j.deg,j.row,j.shortcut]));c.useEffect(()=>(n?pe():re(),()=>v()),[t,ve,n]);const L=c.useCallback(j=>{f!=="waiting"||t==="playback"||V.current===d||(V.current=d,b(j),j===i[d]?.id&&M(J=>J+1),t==="exam"?(g("playing"),z(400,()=>k(i,d+1))):(g("feedback"),z(a,()=>k(i,d+1))))},[f,t,i,d,k,a,M]),H=t==="playback"?e.length:i.length;return{bind:{activeSpeakerId:C,playedIds:w,selectedId:y,answerId:Z,showFeedback:f==="feedback",clickable:f==="waiting",onSelectSpeaker:L},index:d,total:H,score:_,phase:f,done:f==="done",start:pe,reset:re}}/*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */function Nu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function ld(e){if(Array.isArray(e))return e}function id(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o,r,u,a,i=[],s=!0,d=!1;try{if(u=(n=n.call(e)).next,t!==0)for(;!(s=(o=u.call(n)).done)&&(i.push(o.value),i.length!==t);s=!0);}catch(m){d=!0,r=m}finally{try{if(!s&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw r}}return i}}function sd(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
6
6
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cd(e,t){return ld(e)||id(e,t)||dd(e,t)||sd()}function dd(e,t){if(e){if(typeof e=="string")return Nu(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nu(e,t):void 0}}const Ou=Object.entries,vu=Object.setPrototypeOf,fd=Object.isFrozen,pd=Object.getPrototypeOf,Cd=Object.getOwnPropertyDescriptor;let ie=Object.freeze,se=Object.seal,_t=Object.create,Bu=typeof Reflect<"u"&&Reflect,xo=Bu.apply,Fo=Bu.construct;ie||(ie=function(t){return t}),se||(se=function(t){return t}),xo||(xo=function(t,n){for(var o=arguments.length,r=new Array(o>2?o-2:0),u=2;u<o;u++)r[u-2]=arguments[u];return t.apply(n,r)}),Fo||(Fo=function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return new t(...o)});const ct=le(Array.prototype.forEach),md=le(Array.prototype.lastIndexOf),Lu=le(Array.prototype.pop),an=le(Array.prototype.push),gd=le(Array.prototype.splice),Tt=Array.isArray,ln=le(String.prototype.toLowerCase),jo=le(String.prototype.toString),Ru=le(String.prototype.match),sn=le(String.prototype.replace),Mu=le(String.prototype.indexOf),hd=le(String.prototype.trim),yd=le(Number.prototype.toString),Sd=le(Boolean.prototype.toString),Iu=typeof BigInt>"u"?null:le(BigInt.prototype.toString),Pu=typeof Symbol>"u"?null:le(Symbol.prototype.toString),we=le(Object.prototype.hasOwnProperty),cn=le(Object.prototype.toString),ge=le(RegExp.prototype.test),dt=bd(TypeError);function le(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return xo(e,t,o)}}function bd(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Fo(e,n)}}function q(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ln;if(vu&&vu(e,null),!Tt(t))return e;let o=t.length;for(;o--;){let r=t[o];if(typeof r=="string"){const u=n(r);u!==r&&(fd(t)||(t[o]=u),r=u)}e[r]=!0}return e}function wd(e){for(let t=0;t<e.length;t++)we(e,t)||(e[t]=null);return e}function Te(e){const t=_t(null);for(const o of Ou(e)){var n=cd(o,2);const r=n[0],u=n[1];we(e,r)&&(Tt(u)?t[r]=wd(u):u&&typeof u=="object"&&u.constructor===Object?t[r]=Te(u):t[r]=u)}return t}function Ed(e){switch(typeof e){case"string":return e;case"number":return yd(e);case"boolean":return Sd(e);case"bigint":return Iu?Iu(e):"0";case"symbol":return Pu?Pu(e):"Symbol()";case"undefined":return cn(e);case"function":case"object":{if(e===null)return cn(e);const t=e,n=Me(t,"toString");if(typeof n=="function"){const o=n(t);return typeof o=="string"?o:cn(o)}return cn(e)}default:return cn(e)}}function Me(e,t){for(;e!==null;){const o=Cd(e,t);if(o){if(o.get)return le(o.get);if(typeof o.value=="function")return le(o.value)}e=pd(e)}function n(){return null}return n}function Ad(e){try{return ge(e,""),!0}catch{return!1}}const ku=ie(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ho=ie(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),$o=ie(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),_d=ie(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Go=ie(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Td=ie(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),xu=ie(["#text"]),Fu=ie(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Wo=ie(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ju=ie(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),$n=ie(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Dd=se(/{{[\w\W]*|^[\w\W]*}}/g),Nd=se(/<%[\w\W]*|^[\w\W]*%>/g),Od=se(/\${[\w\W]*/g),vd=se(/^data-[\-\w.\u00B7-\uFFFF]+$/),Bd=se(/^aria-[\-\w]+$/),Hu=se(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ld=se(/^(?:\w+script|data):/i),Rd=se(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Md=se(/^html$/i),Id=se(/^[a-z][.\w]*(-[.\w]+)+$/i),$u=se(/<[/\w!]/g),Gu=se(/<[/\w]/g),Pd=se(/<\/no(script|embed|frames)/i),kd=se(/\/>/i),De={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Wu=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],xd=ie(q({},Wu)),Fd=(function(){const e={};return ct(Wu,t=>{e[t]=se(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),ie(e)})(),jd=function(){return typeof window>"u"?null:window},Hd=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let o=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(o=n.getAttribute(r));const u="dompurify"+(o?"#"+o:"");try{return t.createPolicy(u,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+u+" could not be created."),null}},Vu=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},nt=function(t,n,o,r){return we(t,n)&&Tt(t[n])?q(r.base?Te(r.base):{},t[n],r.transform):o},Vo=function(t,n,o){const r=we(t,n)?t[n]:void 0;return r&&typeof r=="object"?Te(r):o()};function Yu(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:jd();const t=T=>Yu(T);if(t.version="3.4.14",t.removed=[],!e||!e.document||e.document.nodeType!==De.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const o=n,r=o.currentScript;e.DocumentFragment;const u=e.HTMLTemplateElement,a=e.Node,i=e.Element,s=e.NodeFilter,d=e.NamedNodeMap;d===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const m=e.DOMParser,f=e.trustedTypes,g=i.prototype,C=Me(g,"cloneNode"),h=Me(g,"remove"),w=Me(g,"nextSibling"),S=Me(g,"childNodes"),y=Me(g,"parentNode"),b=Me(g,"shadowRoot"),_=Me(g,"attributes"),D=a&&a.prototype?Me(a.prototype,"nodeType"):null,B=a&&a.prototype?Me(a.prototype,"nodeName"):null,M=a&&a.prototype?Me(a.prototype,"ownerDocument"):null,O=function(l){return D?D(l):l.nodeType},R=function(l){return B?B(l):l.nodeName};if(typeof u=="function"){const T=n.createElement("template");T.content&&T.content.ownerDocument&&(n=T.content.ownerDocument)}let x,v="",z,Z=!1,V=0;const F=function(){if(V>0)throw dt('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},k=function(l){F(),V++;try{return x.createHTML(l)}finally{V--}},K=function(l){F(),V++;try{return x.createScriptURL(l)}finally{V--}},pe=function(){return Z||(z=Hd(f,r),Z=!0),z},re=n,ve=re.implementation,L=re.createNodeIterator,H=re.createDocumentFragment,j=re.getElementsByTagName,J=o.importNode;let W=Vu();t.isSupported=typeof Ou=="function"&&typeof y=="function"&&ve&&ve.createHTMLDocument!==void 0;const he=Dd,$e=Nd,ot=Od,qe=vd,Dt=Bd,dn=Ld,Nt=Rd,Ot=Id;let U=Hu,ne=null;const Je=q({},[...ku,...Ho,...$o,...Go,...xu]);let ee=null;const vt=q({},[...Fu,...Wo,...ju,...$n]);let Ne=Object.seal(_t(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),rt=null,fn=null;const Ie=Object.seal(_t(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let pn=!0,Bt=!0,E=!1,$=!0,P=!1,Y=!0,Q=!1,Pe=!1,Be=null,Ge=null,Xe=!1,Ee=!1,ft=!1,Qe=!1,Cn=!0,pt=!1;const Lt="user-content-";let Ct=!0,Rt=!1,mt={},gt=null;const zo=q({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Ko=null;const qo=q({},["audio","video","img","source","image","track"]);let Jo=null;const Xo=q({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),mn="http://www.w3.org/1998/Math/MathML",gn="http://www.w3.org/2000/svg",ke="http://www.w3.org/1999/xhtml";let ht=ke,Gn=!1,Wn=null;const zu=q({},[mn,gn,ke],jo),Qo=ie(["mi","mo","mn","ms","mtext"]);let Vn=q({},Qo);const Zo=ie(["annotation-xml"]);let Yn=q({},Zo);const Ku=q({},["title","style","font","a","script"]);let Mt=null;const qu=["application/xhtml+xml","text/html"],Ju="text/html";let ae=null,yt=null;const Xu=n.createElement("form"),er=function(l){return l instanceof RegExp||l instanceof Function},Un=function(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(yt&&yt===l)return;(!l||typeof l!="object")&&(l={}),l=Te(l),Mt=qu.indexOf(l.PARSER_MEDIA_TYPE)===-1?Ju:l.PARSER_MEDIA_TYPE,ae=Mt==="application/xhtml+xml"?jo:ln,ne=nt(l,"ALLOWED_TAGS",Je,{transform:ae}),ee=nt(l,"ALLOWED_ATTR",vt,{transform:ae}),Wn=nt(l,"ALLOWED_NAMESPACES",zu,{transform:jo}),Jo=nt(l,"ADD_URI_SAFE_ATTR",Xo,{transform:ae,base:Xo}),Ko=nt(l,"ADD_DATA_URI_TAGS",qo,{transform:ae,base:qo}),gt=nt(l,"FORBID_CONTENTS",zo,{transform:ae}),rt=nt(l,"FORBID_TAGS",Te({}),{transform:ae}),fn=nt(l,"FORBID_ATTR",Te({}),{transform:ae}),mt=we(l,"USE_PROFILES")?l.USE_PROFILES&&typeof l.USE_PROFILES=="object"?Te(l.USE_PROFILES):l.USE_PROFILES:!1,pn=l.ALLOW_ARIA_ATTR!==!1,Bt=l.ALLOW_DATA_ATTR!==!1,E=l.ALLOW_UNKNOWN_PROTOCOLS||!1,$=l.ALLOW_SELF_CLOSE_IN_ATTR!==!1,P=l.SAFE_FOR_TEMPLATES||!1,Y=l.SAFE_FOR_XML!==!1,Q=l.WHOLE_DOCUMENT||!1,Ee=l.RETURN_DOM||!1,ft=l.RETURN_DOM_FRAGMENT||!1,Qe=l.RETURN_TRUSTED_TYPE||!1,Xe=l.FORCE_BODY||!1,Cn=l.SANITIZE_DOM!==!1,pt=l.SANITIZE_NAMED_PROPS||!1,Ct=l.KEEP_CONTENT!==!1,Rt=l.IN_PLACE||!1,U=Ad(l.ALLOWED_URI_REGEXP)?l.ALLOWED_URI_REGEXP:Hu,ht=typeof l.NAMESPACE=="string"?l.NAMESPACE:ke,Vn=Vo(l,"MATHML_TEXT_INTEGRATION_POINTS",()=>q({},Qo)),Yn=Vo(l,"HTML_INTEGRATION_POINTS",()=>q({},Zo));const p=Vo(l,"CUSTOM_ELEMENT_HANDLING",()=>_t(null));if(Ne=_t(null),we(p,"tagNameCheck")&&er(p.tagNameCheck)&&(Ne.tagNameCheck=p.tagNameCheck),we(p,"attributeNameCheck")&&er(p.attributeNameCheck)&&(Ne.attributeNameCheck=p.attributeNameCheck),we(p,"allowCustomizedBuiltInElements")&&typeof p.allowCustomizedBuiltInElements=="boolean"&&(Ne.allowCustomizedBuiltInElements=p.allowCustomizedBuiltInElements),se(Ne),P&&(Bt=!1),ft&&(Ee=!0),mt&&(ne=q({},xu),ee=_t(null),mt.html===!0&&(q(ne,ku),q(ee,Fu)),mt.svg===!0&&(q(ne,Ho),q(ee,Wo),q(ee,$n)),mt.svgFilters===!0&&(q(ne,$o),q(ee,Wo),q(ee,$n)),mt.mathMl===!0&&(q(ne,Go),q(ee,ju),q(ee,$n))),Ie.tagCheck=null,Ie.attributeCheck=null,we(l,"ADD_TAGS")&&(typeof l.ADD_TAGS=="function"?Ie.tagCheck=l.ADD_TAGS:Tt(l.ADD_TAGS)&&(ne===Je&&(ne=Te(ne)),q(ne,l.ADD_TAGS,ae))),we(l,"ADD_ATTR")&&(typeof l.ADD_ATTR=="function"?Ie.attributeCheck=l.ADD_ATTR:Tt(l.ADD_ATTR)&&(ee===vt&&(ee=Te(ee)),q(ee,l.ADD_ATTR,ae))),we(l,"ADD_FORBID_CONTENTS")&&Tt(l.ADD_FORBID_CONTENTS)&&(gt===zo&&(gt=Te(gt)),q(gt,l.ADD_FORBID_CONTENTS,ae)),Ct&&(ne["#text"]=!0),Q&&q(ne,["html","head","body"]),ne.table&&(q(ne,["tbody"]),delete rt.tbody),l.TRUSTED_TYPES_POLICY){if(typeof l.TRUSTED_TYPES_POLICY.createHTML!="function")throw dt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof l.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw dt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const A=x;x=l.TRUSTED_TYPES_POLICY;try{v=k("")}catch(N){throw x=A,N}}else l.TRUSTED_TYPES_POLICY===null?(x=void 0,v=""):(x===void 0&&(x=pe()),x&&typeof v=="string"&&(v=k("")));ie&&ie(l),yt=l},tr=q({},[...Ho,...$o,..._d]),nr=q({},[...Go,...Td]),Qu=function(l,p,A){return p.namespaceURI===ke?l==="svg":p.namespaceURI===mn?l==="svg"&&(A==="annotation-xml"||Vn[A]):!!tr[l]},Zu=function(l,p,A){return p.namespaceURI===ke?l==="math":p.namespaceURI===gn?l==="math"&&Yn[A]:!!nr[l]},ea=function(l,p,A){return p.namespaceURI===gn&&!Yn[A]||p.namespaceURI===mn&&!Vn[A]?!1:!nr[l]&&(Ku[l]||!tr[l])},ta=function(l){let p=y(l);(!p||!p.tagName)&&(p={namespaceURI:ht,tagName:"template"});const A=ln(l.tagName),N=ln(p.tagName);return Wn[l.namespaceURI]?l.namespaceURI===gn?Qu(A,p,N):l.namespaceURI===mn?Zu(A,p,N):l.namespaceURI===ke?ea(A,p,N):!!(Mt==="application/xhtml+xml"&&Wn[l.namespaceURI]):!1},Ze=function(l){an(t.removed,{element:l});try{y(l).removeChild(l)}catch{if(h(l),!y(l))throw dt("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},or=function(l,p,A){try{l.removeAttributeNode(p)}catch{try{l.removeAttribute(A)}catch{}}},hn=function(l){yn(l);const p=S(l);if(p){const N=[];ct(p,I=>{an(N,I)}),ct(N,I=>{try{h(I)}catch{}})}const A=_(l);if(A)for(let N=A.length-1;N>=0;--N){const I=A[N],G=I&&I.name;typeof G=="string"&&or(l,I,G)}},ut=function(l,p,A){if(!A)try{A=p.getAttributeNode(l)}catch{A=null}an(t.removed,{attribute:A||null,from:p});try{A?p.removeAttributeNode(A):p.removeAttribute(l)}catch{try{p.removeAttribute(l)}catch{}}if(l==="is")if(Ee||ft)try{Ze(p)}catch{}else try{p.setAttribute(l,"")}catch{}},na=function(l){const p=_(l);if(p)for(let A=p.length-1;A>=0;--A){const N=p[A],I=N&&N.name;typeof I!="string"||ee[ae(I)]||or(l,N,I)}},yn=function(l){const p=[l];for(;p.length>0;){const A=p.pop();O(A)===De.element&&na(A);const I=S(A);if(I)for(let G=I.length-1;G>=0;--G)p.push(I[G])}},rr=function(l,p){return Y?l==="patchsrc"?!0:l==="for"&&p!=="label"&&p!=="output":!1},oa=function(l){if(!Y)return;const p=[l];for(;p.length>0;){const A=p.pop(),N=O(A);if(N===De.processingInstruction||N===De.comment&&ge(Gu,A.data)){try{h(A)}catch{}continue}if(N===De.element){const G=A,oe=ae(R(A));try{G.hasAttribute&&G.hasAttribute("patchsrc")&&G.removeAttribute("patchsrc"),G.hasAttribute&&G.hasAttribute("for")&&rr("for",oe)&&G.removeAttribute("for")}catch{}}const I=S(A);if(I)for(let G=I.length-1;G>=0;--G)p.push(I[G])}},ur=function(l){let p=null,A=null;if(Xe)l="<remove></remove>"+l;else{const G=Ru(l,/^[\r\n\t ]+/);A=G&&G[0]}Mt==="application/xhtml+xml"&&ht===ke&&(l='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+l+"</body></html>");const N=x?k(l):l;if(ht===ke)try{p=new m().parseFromString(N,Mt)}catch{}if(!p||!p.documentElement){p=ve.createDocument(ht,"template",null);try{p.documentElement.innerHTML=Gn?v:N}catch{}}const I=p.body||p.documentElement;return l&&A&&I.insertBefore(n.createTextNode(A),I.childNodes[0]||null),ht===ke?j.call(p,Q?"html":"body")[0]:Q?p.documentElement:I},ar=function(l){const p=M?M(l):l.ownerDocument;return L.call(p||l,l,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT|s.SHOW_PROCESSING_INSTRUCTION|s.SHOW_CDATA_SECTION,null)},Sn=function(l){return l=sn(l,he," "),l=sn(l,$e," "),l=sn(l,ot," "),l},zn=function(l){var p;l.normalize();const A=M?M(l):l.ownerDocument,N=L.call(A||l,l,s.SHOW_TEXT|s.SHOW_COMMENT|s.SHOW_CDATA_SECTION|s.SHOW_PROCESSING_INSTRUCTION,null);let I=N.nextNode();for(;I;)I.data=Sn(I.data),I=N.nextNode();const G=(p=l.querySelectorAll)===null||p===void 0?void 0:p.call(l,"template");G&&ct(G,oe=>{St(oe.content)&&zn(oe.content)})},bn=function(l){const p=B?B(l):null;return typeof p!="string"||ae(p)!=="form"?!1:typeof l.nodeName!="string"||typeof l.textContent!="string"||typeof l.removeChild!="function"||l.attributes!==_(l)||typeof l.removeAttribute!="function"||typeof l.setAttribute!="function"||typeof l.namespaceURI!="string"||typeof l.insertBefore!="function"||typeof l.hasChildNodes!="function"||l.nodeType!==D(l)||l.childNodes!==S(l)},St=function(l){if(!D||typeof l!="object"||l===null)return!1;try{return D(l)===De.documentFragment}catch{return!1}},It=function(l){if(!D||typeof l!="object"||l===null)return!1;try{return typeof D(l)=="number"}catch{return!1}};function xe(T,l,p){T.length!==0&&ct(T,A=>{A.call(t,l,p,yt)})}const ra=function(l,p){return!!(Y&&l.hasChildNodes()&&!It(l.firstElementChild)&&ge($u,l.textContent)&&ge($u,l.innerHTML)||Y&&l.namespaceURI===ke&&xd[p]&&(It(l.firstElementChild)||typeof l.textContent=="string"&&ge(Fd[p],l.textContent))||l.nodeType===De.processingInstruction||Y&&l.nodeType===De.comment&&ge(Gu,l.data))},wn=function(l,p){if(l instanceof RegExp)return ge(l,p);if(l instanceof Function){for(var A=arguments.length,N=new Array(A>2?A-2:0),I=2;I<A;I++)N[I-2]=arguments[I];return!!l(p,...N)}return!1},ua=function(l,p,A){if(!rt[p]&&dr(p)&&wn(Ne.tagNameCheck,p))return!1;if(Ct&&!gt[p]){const N=y(l),I=S(l);if(I&&N){const G=I.length;for(let oe=G-1;oe>=0;--oe){const ue=l===A?C(I[oe],!0):I[oe];N.insertBefore(ue,w(l))}}}return Ze(l),!0},lr=function(l,p,A,N){return l.length===0?p:p===A||p===N?Te(p):p},ir=function(l,p){return l===p||y(l)!==null?!1:(Rt&&yn(l),!0)},sr=function(l,p){if(xe(W.beforeSanitizeElements,l,null),ir(l,p))return!0;if(bn(l))return Ze(l),!0;const A=ae(R(l));if(ne=lr(W.uponSanitizeElement,ne,Je,Be),xe(W.uponSanitizeElement,l,{tagName:A,allowedTags:ne}),ir(l,p))return!0;if(ra(l,A))return Ze(l),!0;if(rt[A]||!(Ie.tagCheck instanceof Function&&Ie.tagCheck(A))&&!ne[A]){const I=ua(l,A,p);return I===!1&&xe(W.afterSanitizeElements,l,null),I}if(O(l)===De.element&&!ta(l)||(A==="noscript"||A==="noembed"||A==="noframes")&&ge(Pd,l.innerHTML))return Ze(l),!0;if(P&&l.nodeType===De.text){const I=Sn(l.textContent);l.textContent!==I&&(an(t.removed,{element:l.cloneNode()}),l.textContent=I)}return xe(W.afterSanitizeElements,l,null),!1},cr=function(l,p,A){if(fn[p]||rr(p,l)||Cn&&(p==="id"||p==="name")&&(A in n||A in Xu))return!1;const N=ee[p]||Ie.attributeCheck instanceof Function&&Ie.attributeCheck(p,l);return Bt&&ge(qe,p)||pn&&ge(Dt,p)?!0:N?Jo[p]||ge(U,sn(A,Nt,""))||(p==="src"||p==="xlink:href"||p==="href")&&l!=="script"&&Mu(A,"data:")===0&&Ko[l]||E&&!ge(dn,sn(A,Nt,""))?!0:!A:dr(l)&&wn(Ne.tagNameCheck,l)&&wn(Ne.attributeNameCheck,p,l)||p==="is"&&Ne.allowCustomizedBuiltInElements&&wn(Ne.tagNameCheck,A)},aa=q({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),dr=function(l){return!aa[ln(l)]&&ge(Ot,l)},la=function(l,p,A,N){if(x&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!A)switch(f.getAttributeType(l,p)){case"TrustedHTML":return k(N);case"TrustedScriptURL":return K(N)}return N},ia=function(l,p,A,N){try{A?l.setAttributeNS(A,p,N):l.setAttribute(p,N),bn(l)?Ze(l):Lu(t.removed)}catch{ut(p,l)}},fr=function(l){xe(W.beforeSanitizeAttributes,l,null);const p=l.attributes;if(!p||bn(l))return;ee=lr(W.uponSanitizeAttribute,ee,vt,Ge);const A={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ee,forceKeepAttr:void 0};let N=p.length;const I=ae(l.nodeName);for(;N--;){const G=p[N],oe=G.name,ue=G.namespaceURI,Se=G.value,be=ae(oe),qn=Se;let ye=oe==="value"?qn:hd(qn);if(A.attrName=be,A.attrValue=ye,A.keepAttr=!0,A.forceKeepAttr=void 0,xe(W.uponSanitizeAttribute,l,A),ye=A.attrValue,pt&&(be==="id"||be==="name")&&Mu(ye,Lt)!==0&&(ut(oe,l,G),ye=Lt+ye),Y&&ge(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ye)){ut(oe,l,G);continue}if(be==="attributename"&&Ru(ye,"href")){ut(oe,l,G);continue}if(!A.forceKeepAttr){if(!A.keepAttr){ut(oe,l,G);continue}if(!$&&ge(kd,ye)){ut(oe,l,G);continue}if(P&&(ye=Sn(ye)),!cr(I,be,ye)){ut(oe,l,G);continue}ye=la(I,be,ue,ye),ye!==qn&&ia(l,oe,ue,ye)}}xe(W.afterSanitizeAttributes,l,null)},En=function(l){let p=null;const A=ar(l);for(xe(W.beforeSanitizeShadowDOM,l,null);p=A.nextNode();)if(xe(W.uponSanitizeShadowNode,p,null),sr(p,l),fr(p),St(p.content)&&En(p.content),O(p)===De.element){const N=b(p);St(N)&&(Kn(N),En(N))}xe(W.afterSanitizeShadowDOM,l,null)},Kn=function(l){const p=[{node:l,shadow:null}];for(;p.length>0;){const A=p.pop();if(A.shadow){En(A.shadow);continue}const N=A.node,G=O(N)===De.element,oe=S(N);if(oe)for(let ue=oe.length-1;ue>=0;--ue)p.push({node:oe[ue],shadow:null});if(G){const ue=B?B(N):null;if(typeof ue=="string"&&ae(ue)==="template"){const Se=N.content;St(Se)&&p.push({node:Se,shadow:null})}}if(G){const ue=b(N);St(ue)&&p.push({node:null,shadow:ue},{node:ue,shadow:null})}}};return t.sanitize=function(T){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=null,A=null,N=null,I=null;if(Gn=!T,Gn&&(T="<!-->"),typeof T!="string"&&!It(T)&&(T=Ed(T),typeof T!="string"))throw dt("dirty is not a string, aborting");if(!t.isSupported)return T;Pe?(ne=Be,ee=Ge):Un(l),(W.uponSanitizeElement.length>0||W.uponSanitizeAttribute.length>0)&&(ne=Te(ne)),W.uponSanitizeAttribute.length>0&&(ee=Te(ee)),t.removed=[];const G=Rt&&typeof T!="string"&&It(T);if(G){oa(T);const Se=R(T);if(typeof Se=="string"){const be=ae(Se);if(!ne[be]||rt[be])throw hn(T),dt("root node is forbidden and cannot be sanitized in-place")}if(bn(T))throw hn(T),dt("root node is clobbered and cannot be sanitized in-place");try{Kn(T)}catch(be){throw hn(T),be}}else if(It(T))p=ur("<!---->"),A=p.ownerDocument.importNode(T,!0),A.nodeType===De.element&&A.nodeName==="BODY"||A.nodeName==="HTML"?p=A:p.appendChild(A),Kn(A);else{if(!Ee&&!P&&!Q&&T.indexOf("<")===-1)return x&&Qe?k(T):T;if(p=ur(T),!p)return Ee?null:Qe?v:""}p&&Xe&&Ze(p.firstChild);const oe=G?T:p;try{const Se=ar(oe);for(;N=Se.nextNode();)sr(N,oe),fr(N),St(N.content)&&En(N.content)}catch(Se){throw G&&(hn(T),ct(t.removed,be=>{be.element&&yn(be.element)})),Se}if(G)return ct(t.removed,Se=>{Se.element&&yn(Se.element)}),P&&zn(T),T;if(Ee){if(P&&zn(p),ft)for(I=H.call(p.ownerDocument);p.firstChild;)I.appendChild(p.firstChild);else I=p;return(ee.shadowroot||ee.shadowrootmode)&&(I=J.call(o,I,!0)),I}let ue=Q?p.outerHTML:p.innerHTML;return Q&&ne["!doctype"]&&p.ownerDocument&&p.ownerDocument.doctype&&p.ownerDocument.doctype.name&&ge(Md,p.ownerDocument.doctype.name)&&(ue="<!DOCTYPE "+p.ownerDocument.doctype.name+`>
|
|
7
7
|
`+ue),P&&(ue=Sn(ue)),x&&Qe?k(ue):ue},t.setConfig=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Un(T),Pe=!0,Be=ne,Ge=ee},t.clearConfig=function(){yt=null,Pe=!1,Be=null,Ge=null,x=z,v=""},t.isValidAttribute=function(T,l,p){yt||Un({});const A=ae(T),N=ae(l);return cr(A,N,p)},t.addHook=function(T,l){typeof l=="function"&&we(W,T)&&an(W[T],l)},t.removeHook=function(T,l){if(we(W,T)){if(l!==void 0){const p=md(W[T],l);return p===-1?void 0:gd(W[T],p,1)[0]}return Lu(W[T])}},t.removeHooks=function(T){we(W,T)&&(W[T]=[])},t.removeAllHooks=function(){W=Vu()},t}Yu();const Yo=new Map,Uo=new Map,$d=()=>()=>{},Gd=()=>!0,Wd=()=>!1;function Uu(e){const t=/^data:image\/svg\+xml(;base64)?,([\s\S]*)$/.exec(e);if(!t)return null;try{if(!t[1])return decodeURIComponent(t[2]);const n=Uint8Array.from(atob(t[2]),o=>o.charCodeAt(0));return new TextDecoder("utf-8").decode(n)}catch{return null}}function Vd(e){const t=Uo.get(e);if(t)return t;const n=fetch(e).then(o=>o.ok?o.text():null).then(o=>(o!=null&&Yo.set(e,o),o)).catch(()=>null).finally(()=>{Uo.delete(e)});return Uo.set(e,n),n}function Yd(e,t=!0){const n=c.useSyncExternalStore($d,Gd,Wd)&&t&&e?Uu(e)??Yo.get(e)??null:null,[o,r]=c.useState({src:e,enabled:t,svg:n});return c.useEffect(()=>{if(!t||!e){r({src:e,enabled:t,svg:null});return}const u=Uu(e)??Yo.get(e)??null;if(u!==null){r({src:e,enabled:t,svg:u});return}let a=!0;return Vd(e).then(i=>{a&&r({src:e,enabled:t,svg:i})}),()=>{a=!1}},[e,t]),o.src===e&&o.enabled===t?o.svg:n}exports.CACHE_GROUPS=vr,exports.CORE_VERSION=Es,exports.DocumentTitleSuppressContext=yr,exports.EMPTY_COMPOSITION=To,exports.MediaQueryOverrideContext=Cr,exports.NO_CODA=je,exports.SYLLABLE_MIN=He,exports.VAP_PAGE_SIZE_OPTIONS=wt,exports.buildGradeSection=ou,exports.buildPartOfSpeechSection=ru,exports.buildPositionSection=pc,exports.buildSelectSection=fc,exports.buildSyllableSection=dc,exports.buildWordTypeSection=uu,exports.charToPronValue=pu,exports.convertComposition=mu,exports.fmtBytes=Ga,exports.gradeDescriptions=wu,exports.lsBytes=Br,exports.meaningKey=Io,exports.normalizeWordAttributeFilter=xs,exports.pronToCharValue=Cu,exports.syllableToFilter=Eo,exports.toWordAttributeFilterCodes=fo,exports.today=Wt,exports.toggleAttributeFilter=Cc,exports.useAnchoredMenu=ud,exports.useCacheManagement=Wa,exports.useDailyTrainingSelection=Yc,exports.useDelayedHoverAnchor=qc,exports.useDeviceManagement=ol,exports.useDocumentTitle=ga,exports.useEscToClose=Uc,exports.useFontScale=ca,exports.useHoverAnchor=Kc,exports.useInlineSvg=Yd,exports.useListControls=Xc,exports.useMediaQuery=ma,exports.usePageResetOnChange=Du,exports.usePagedList=Jc,exports.usePasswordChange=Aa,exports.useRelativeDay=ba,exports.useSoundCompassExam=ad,exports.useTablePaging=tl,exports.useTableSort=nl,exports.useToastState=Qc,exports.useTrainingTypeLabels=rd,exports.useVisitAllPanel=qa,exports.useVisitHistory=Ua,exports.useVisitSchedule=Ka,exports.useWindowEvent=Xn,exports.useWordAttributeFilterKeys=nu,exports.useWordDataStats=Va,exports.useWordMeanings=zc,exports.useWordTrainingDataGeneration=Ic,exports.useWordTrainingFilter=Rc,exports.valueToJamos=ze,exports.wordAttributeFilterFromCodes=po;
|