@ihabdevteam/core 0.368.0 → 0.369.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 +18 -0
- package/dist/components.cjs.js +2 -2
- package/dist/hooks.cjs.js +1 -1
- package/dist/i18n.cjs.js +1 -1
- package/dist/ihabdevteam-core.cjs.js +2 -2
- package/dist/ihabdevteam-core.d.ts +1 -1
- package/dist/packages/core/src/components/Table.js +11 -4
- 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/components.cjs.js
CHANGED
|
@@ -819,7 +819,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
819
819
|
\uC2E0\uB8B0\uB97C \uC313\uACE0
|
|
820
820
|
\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"},gg={timeHM:"{{h}}\uC2DC {{m}}\uBD84",timeH:"{{h}}\uC2DC"},bg={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"},yg={clearAriaLabel:"\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"},vg={ariaLabel:"\uC120\uD0DD \uD0ED"},xg={ariaLabel:"\uD0ED"},_g={dragPrompt:"\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC",browseButton:"\uD30C\uC77C \uC120\uD0DD",removeAriaLabel:"{{name}} \uC81C\uAC70"},wg={ariaLabel:"\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0"},Bg={relativeDay:{today:"\uC624\uB298",yesterday:"\uC5B4\uC81C",daysAgo:"{{n}}\uC77C \uC804"}},kg={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"},Ag={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"}},Ng={steps:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"},Eg={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"},Dg={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"},Sg={viewWords:"\uB0B1\uB9D0"},jg={ariaLabel:"\uBC30\uB108",dotAriaLabel:"{{count}}\uAC1C \uC911 {{index}}\uBC88\uC9F8 \uBC30\uB108"},Tg={chooseDate:"\uB0A0\uC9DC \uC120\uD0DD",selectYear:"\uC5F0 \uC120\uD0DD",selectMonth:"\uC6D4 \uC120\uD0DD"},Mg={previewRegion:"\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30 \u2014 \uC88C\uC6B0\uB85C \uAD74\uB824 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"},Lg={description:"\uC124\uBA85",textbox:"\uBCF8\uBB38",training:"\uD6C8\uB828 \uC548\uB0B4",menu:"\uBA54\uB274"},$g={place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"}},Rg={clearSelection:"\uC120\uD0DD \uD574\uC81C"},Pg={showResult:"{{type}} \uACB0\uACFC\uBCF4\uAE30"},Ig={selected:"\uC120\uD0DD\uB428",remove:"\uC81C\uAC70",exclude:"\uC81C\uC678",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"},Fg={loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"},Og={state:{active:"\uC18C\uB9AC \uB098\uB294 \uC911",played:"\uB4E4\uC74C",correct:"\uC815\uB2F5",wrong:"\uC624\uB2F5"}},zg={ariaLabel:"\uC774\uB3D9 \uACBD\uB85C"},Wg={empty:"\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},Hg={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"},Vg={common:Hf,calendar:Vf,passCard:qf,rating:Uf,colorPicker:Gf,dropdown:Kf,accordion:Yf,header:Zf,nav:Xf,settings:Jf,usage:Qf,account:eg,training:tg,customers:ng,payment:ag,coupons:rg,visits:og,trainingType:sg,myWordTable:lg,keyWords:ig,wordTable:ug,wordSearch:cg,wordPrint:dg,topic:pg,device:mg,manager:hg,wordPairs:Cg,footer:fg,date:gg,wordData:bg,textField:yg,segmentedControl:vg,tabs:xg,fileUpload:_g,avatar:wg,myHomework:Bg,trainingStatus:kg,store:Ag,progress:Ng,trainingMiss:Eg,table:Dg,wordScore:Sg,topBanner:jg,datePicker:Tg,report:Mg,tooltip:Lg,phonemeProfile:$g,bulkBar:Rg,debug:Pg,badge:Ig,loader:Fg,soundCompass:Og,breadcrumb:zg,board:Wg,promoBannerBg:Hg},qg={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."},Ug={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"]},Gg={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"}},Kg={starLabel:"Select star {{n}}",valueLabel:"{{value}} out of {{max}}",groupLabel:"Rating"},Yg={selected:"selected"},Zg={placeholder:"Select"},Xg={collapse:"Collapse",expand:"Expand"},Jg={biArea:"BI area",biSymbol:"BI symbol",logoMalgwi:"Malgwi logo",logoManager:"Malgwi Manager logo",menuOpen:"Open menu",utilMenu:"Utility menu",menuClose:"Close menu"},Qg={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"},eb={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"}}}},tb={couponButton:"Enter Coupon"},nb={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."}}},ab={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"}},rb={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"}},ob={plan:{recommendedFor:"Recommended for",features:"Key Features",freePrice:"Free",contact:"Contact Us",tierFallback:"Plan",openPromo:"Launch offer"},products:{mgrEnterprise:{tier:{price:"Contact us"}}}},sb={input:{label:"Coupon code",placeholder:"Enter coupon code"},applyButton:"Apply"},lb={showN:"Show {{n}}"},ib={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."}},ub={newBadge:"Newly created",publishedBadge:"Published",sharedBadge:"Shared"},cb={title:"Key Words",empty:"No key words available."},db={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"}},pb={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"},mb={clearAllSelection:"Clear All Selections",divLine:"Contrast Line",removePair:"Remove pair",removeWord:"Remove word"},hb={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"}},Cb={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"}},fb={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}}"}},gb={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."]},bb={lead:`IHAB builds trust
|
|
821
821
|
through sound
|
|
822
|
-
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"},yb={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},vb={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"},xb={clearAriaLabel:"Clear input"},_b={ariaLabel:"Select tab"},wb={ariaLabel:"Tabs"},Bb={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},kb={ariaLabel:"User avatar"},Ab={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"}},Nb={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"},Eb={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"}},Db={steps:"Step {{current}} of {{total}}"},Sb={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"},jb={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},Tb={viewWords:"Words"},Mb={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},Lb={chooseDate:"Choose a date",selectYear:"Select year",selectMonth:"Select month"},$b={previewRegion:"Report preview \u2014 scrollable sideways"},Rb={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},Pb={place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},Ib={clearSelection:"Clear selection"},Fb={showResult:"Show {{type}} result"},Ob={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},zb={loading:"Loading"},Wb={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},Hb={ariaLabel:"Breadcrumb"},Vb={empty:"No items yet."},qb={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"},Ub={common:qg,calendar:Ug,passCard:Gg,rating:Kg,colorPicker:Yg,dropdown:Zg,accordion:Xg,header:Jg,nav:Qg,settings:eb,usage:tb,account:nb,training:ab,customers:rb,payment:ob,coupons:sb,visits:lb,trainingType:ib,myWordTable:ub,keyWords:cb,wordTable:db,wordSearch:pb,wordPrint:mb,topic:hb,device:Cb,manager:fb,wordPairs:gb,footer:bb,date:yb,wordData:vb,textField:xb,segmentedControl:_b,tabs:wb,fileUpload:Bb,avatar:kb,myHomework:Ab,trainingStatus:Nb,store:Eb,progress:Db,trainingMiss:Sb,table:jb,wordScore:Tb,topBanner:Mb,datePicker:Lb,report:$b,tooltip:Rb,phonemeProfile:Pb,bulkBar:Ib,debug:Fb,badge:Ob,loader:zb,soundCompass:Wb,breadcrumb:Hb,board:Vb,promoBannerBg:qb};const Gb="0.368.0",Kb=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],mo="ko",Yb="ihab_display_language";function Gl(){if(typeof window>"u")return mo;try{const e=localStorage.getItem(Yb);if(e&&Kb.some(t=>t.code===e))return e}catch{}return mo}function Kl(e){try{document.documentElement.lang=e}catch{}}Vt.on("languageChanged",Kl),Kl(Gl()),Vt.use(_e.initReactI18next).init({resources:{ko:{translation:Vg},en:{translation:Ub}},lng:Gl(),fallbackLng:mo,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const Zb=new Map;try{Vt.store?.on?.("added",()=>Zb.clear())}catch{}let or=null,Yl=null,Zl=null;function Xb(){const e=Rl();if(e&&e.entries.length>0){const t=uf();if(or&&Yl===e&&Zl===t)return or;const a=new Set,r=[];for(const l of e.entries)!l.word||a.has(l.word)||(a.add(l.word),r.push({w:l.word,s:l.syllables,p:t?.[l.word]?[...t[l.word].cho??[],...t[l.word].jung??[],...t[l.word].jong??[]]:[],pron:l.pronunciation||l.word,grade:l.grade}));return or=r,Yl=e,Zl=t,or}return[]}new Proxy([],{get(e,t){const a=Xb(),r=a[t];return typeof r=="function"?r.bind(a):r}});function Jb(e){if(e.includes("\\")&&e.includes("("))return!0;if(!/url\s*\(/i.test(e))return!1;const t=e.replace(/url\(\s*(['"]?)#[^)'"]*\1\s*\)/gi,"");return/url\s*\(/i.test(t)}function Qb(e){if(typeof window>"u")return"";const t=(a,r)=>{typeof r.attrValue=="string"&&Jb(r.attrValue)&&(r.keepAttr=!1)};oa.addHook("uponSanitizeAttribute",t);try{return oa.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use","style"],FORBID_ATTR:["xlink:href","href"]})}finally{oa.removeHook("uponSanitizeAttribute",t)}}function ey(e){const[t,a]=o.useState(null),[r,l]=o.useState(null),[s,i]=o.useState(null),[u,c]=o.useState(null),[d,m]=o.useState(null);return o.useEffect(()=>{if(!e||typeof e!="string"||!e.endsWith(".svg")){a(null),l(null),i(null),c(null);return}const p=e.split("/").pop();let C=e;p&&(e.startsWith("/")?C=Xr(e):/^(Logo|Symbol)/i.test(p)?C=Xr(`logo/${p}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),C=e)),i(null),c(null),a(e),l(C)},[e]),o.useEffect(()=>{if(!r)return;let p=!1;async function C(){try{let b=await fetch(r);b.ok||(b=await fetch(r));const x=b.headers.get("content-type")||"";if(p)return;if(x.includes("svg")){i("mask");return}if(x.startsWith("image/")){i("img");return}const f=await fetch(r);if(!f.ok)throw new Error("not ok");const h=await f.text();if(p)return;if(/^\s*<svg[\s>]/i.test(h)){const _=Qb(h);if(!_){i("none");return}c(_),i("inline");return}i("none")}catch{p||i("none")}}return C(),()=>{p=!0}},[r]),o.useEffect(()=>{let p=!1,C=null;return s==="mask"&&r&&fetch(r).then(b=>{if(!b.ok)throw new Error("fetch failed");return b.blob()}).then(b=>{p||(C=URL.createObjectURL(b),m(C))}).catch(()=>{p||i("img")}),()=>{p=!0,C&&URL.revokeObjectURL(C),m(null)}},[s,r]),t===e?{iconToUse:r,mode:s,svgText:u,blobUrl:d}:{iconToUse:null,mode:null,svgText:null,blobUrl:null}}function tt(e){const{icon:t,label:a,className:r,imgClassName:l,maskClassName:s,svgClassName:i,wrapperStyle:u,size:c}=e||{},d=r??"iconRenderer-icon",m=l??"iconRenderer-icon-image",p=s??"iconRenderer-icon-mask",C=i??"iconRenderer-icon-svg",b=typeof t=="string"?t:null,x=H1(b),{iconToUse:f,mode:h,svgText:_,blobUrl:g}=ey(b),k=(A,E={})=>n.jsx("span",{className:d,style:u,...E,children:A}),v=typeof c=="number"?{width:c,height:c,objectFit:"contain"}:null,B=(A,E={})=>n.jsx("img",{src:A,alt:typeof a=="string"?a:typeof a=="number"?String(a):"",className:m,...E,style:v?{...E.style,...v}:E.style});if(!t)return null;if(typeof t!="string")return k(t);if(t==="none")return k(n.jsx("span",{className:C,dangerouslySetInnerHTML:{__html:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true"></svg>'}}),{"aria-hidden":"true"});if(x)try{return k(o.createElement(x,{className:C,size:typeof c=="number"?c:20}),{"aria-hidden":"true"})}catch{}if(f&&f.endsWith(".svg")){if(h==="mask"){const A={"--icon-url":g?`url(${g})`:`url(${f})`,...typeof c=="number"?{"--icon-size":`${c}px`}:null};return k(n.jsx("span",{className:p,style:A}),{"aria-hidden":"true"})}return h==="img"?k(B(f,{onError:A=>{A.currentTarget.onerror=null,A.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):h==="inline"?k(n.jsx("span",{className:C,dangerouslySetInnerHTML:_?{__html:_}:void 0}),{"aria-hidden":"true"}):k(null,{"aria-hidden":"true"})}if(t.startsWith("/")||t.includes("/assets/")||t.match(/\.(png|jpg|jpeg|webp|gif)$/i))return B(Xr(t),{style:u,onError:A=>{A.currentTarget.onerror=null,A.currentTarget.style.display="none"}});const y=typeof c=="number"?c:20,w=`<svg width="${y}" height="${y}" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect x="3" y="3" width="18" height="18" rx="2" ry="2" style="fill:none;stroke:currentColor;stroke-width:2"/></svg>`;return k(n.jsx("span",{className:C,dangerouslySetInnerHTML:{__html:w}}),{"aria-hidden":"true"})}function Xl(e){const[t,a]=o.useState(!1),r=o.useRef(!1),l=o.useRef(!0);o.useEffect(()=>(l.current=!0,()=>{l.current=!1}),[]);const s=o.useCallback(()=>{if(!e||r.current)return;const i=e();if(i&&typeof i.then=="function"){r.current=!0,a(!0);const u=()=>{r.current=!1,l.current&&a(!1)};i.then(u,u)}},[e]);return{pending:t,press:s}}function ty({icon:e,title:t,message:a,action:r,className:l}){const{pending:s,press:i}=Xl(r?.onClick);return n.jsxs("div",{className:we("empty-state",l),children:[e&&n.jsx(tt,{icon:e,size:48,className:"empty-state__icon"}),t&&n.jsx("p",{className:"empty-state__title h4",children:t}),a&&n.jsx("p",{className:"empty-state__message body-3",children:a}),r&&n.jsxs("button",{type:"button",className:"empty-state__action button button40 button40--bar button--variant-main button--align-center button--shape-rounded",onClick:i,disabled:s,"aria-busy":s||void 0,children:[r.icon&&n.jsx(tt,{icon:r.icon,className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:r.label})]})]})}function ny({message:e,hint:t,icon:a="triangle-alert",onRetry:r,retryLabel:l,className:s}){const{t:i}=_e.useTranslation(),{pending:u,press:c}=Xl(r);return n.jsxs("div",{className:we("empty-state","error-state",s),role:"alert",children:[n.jsx(tt,{icon:a,size:48,className:"empty-state__icon error-state__icon"}),n.jsx("p",{className:"empty-state__message body-3",children:e??i("common.errorState.message",{defaultValue:"\uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."})}),t&&n.jsx("p",{className:"error-state__hint caption-1",children:t}),r&&n.jsxs("button",{type:"button",className:"empty-state__action button button40 button40--bar button--variant-main button--align-center button--shape-rounded",onClick:c,disabled:u,"aria-busy":u||void 0,children:[n.jsx(tt,{icon:"rotate-cw",className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:l??i("common.errorState.retry",{defaultValue:"\uB2E4\uC2DC \uC2DC\uB3C4"})})]})]})}function ay({icon:e,title:t,description:a,cta:r,tone:l="main",disabled:s=!1,onClick:i,className:u=""}){const c=o.useId(),d=`${c}-title`,m=`${c}-desc`,p=`${c}-cta`,C=()=>{s||i?.()};return n.jsx("section",{role:"button",tabIndex:s?-1:0,"aria-disabled":s||void 0,"aria-labelledby":d,"aria-describedby":`${m} ${p}`,onClick:C,onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),C())},className:we("action-card",`action-card--${l}`,s&&"action-card--disabled",u),children:n.jsxs("div",{className:"action-card__body",children:[n.jsx("span",{"aria-hidden":!0,className:"action-card__chip",children:n.jsx(tt,{icon:e,size:34})}),n.jsxs("div",{className:"action-card__text",children:[n.jsx("h2",{id:d,className:"action-card__title",children:t}),n.jsx("p",{id:m,className:"action-card__desc",children:a})]}),n.jsxs("div",{className:"action-card__cta",children:[n.jsx("span",{id:p,children:r}),n.jsx("span",{"aria-hidden":!0,className:"action-card__arrow",children:n.jsx(tt,{icon:"arrow-right",size:18})})]})]})})}function ry({as:e="div",className:t="",children:a,storage:r,...l}){r&&SC({resolveUrl:r.resolveUrl,download:r.download??(()=>Promise.reject(new Error("[ihabdevteam-core] CoreScope: download resolver\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."))),exists:r.exists,resolvePath:r.resolvePath,noiseBaseUrl:r.noiseBaseUrl,noiseFileGain:r.noiseFileGain});const s=we("ihabdevteam-core-scope",t);return n.jsx(e,{className:s,...l,children:a})}function oy(e){if(e.closest('[aria-hidden="true"], [hidden], [inert]'))return!1;for(let t=e;t;t=t.parentElement){const a=window.getComputedStyle(t);if(a.display==="none"||a.visibility==="hidden"||a.visibility==="collapse")return!1}return!0}function ho(e,t=!0){o.useEffect(()=>{if(!t)return;const a=e.current;if(!a)return;const r=l=>{if(l.key!=="Tab")return;const s=Array.from(a.querySelectorAll(_n)).filter(oy);if(!s.length){l.preventDefault();return}const i=s[0],u=s[s.length-1],c=document.activeElement,d=c===a;l.shiftKey&&(c===i||d)?(l.preventDefault(),u.focus()):!l.shiftKey&&c===u&&(l.preventDefault(),i.focus())};return a.addEventListener("keydown",r),()=>a.removeEventListener("keydown",r)},[e,t])}const _n='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',Co=new WeakMap;function fo(e,t){e&&Co.set(e,t)}function go(e){let t=e;for(let a=0;t&&!t.isConnected&&a<10;a++){let r=t;for(;r&&!Co.has(r);)r=r.parentElement;if(!r)return t;t=Co.get(r)??null}return t}function Jl(e){return!(!e||!e.isConnected||e===document.body||typeof e.focus!="function"||e.disabled||e instanceof HTMLInputElement&&e.type==="hidden"||e.closest('[inert],[aria-hidden="true"],[hidden]'))}function sr(e,t,a){const r=e?.isConnected?e:a?.isConnected?a:null;if(Jl(t)&&!(e&&e.contains(t)))return t.focus(),t;if(!r)return null;const l=Array.from(document.querySelectorAll(_n)).filter(c=>!(e&&e.contains(c))&&Jl(c));let s=null,i=null;for(const c of l)r.compareDocumentPosition(c)&Node.DOCUMENT_POSITION_PRECEDING?s=c:i||(i=c);const u=s??i;return u?.focus(),u}function sy({title:e="",lines:t=[],notices:a=null,children:r,variant:l="default",dismissible:s=!1,className:i=""}){const{t:u}=_e.useTranslation(),[c,d]=o.useState(!1),m=o.useRef(null),p=o.useCallback(()=>{const f=m.current;f&&f.contains(document.activeElement)&&sr(f),d(!0)},[]);if(c)return null;const C=`notice-box notice-box--${l} body-2 ${i}`.trim(),b=s&&n.jsx("button",{type:"button",className:"notice-box__dismiss",onClick:p,"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"});if(a&&Array.isArray(a)&&a.length)return n.jsxs("div",{className:C,role:"note",children:[a.map((f,h)=>n.jsxs("div",{className:"notice-box__inner",children:[f.title?n.jsx("span",{className:"notice-box__title body-3",children:f.title}):null,n.jsx("div",{className:"notice-box__body",children:f.lines&&f.lines.length?n.jsx("div",{children:f.lines.map((_,g)=>n.jsx("span",{className:"notice-box__line body-3",children:_},g))}):f.children??null})]},h)),b]});const x=e||t.length?n.jsxs("div",{className:"notice-box__inner",children:[e?n.jsx("span",{className:"notice-box__title body-1",children:e}):null,n.jsx("div",{className:"notice-box__body",children:t.length?n.jsx("ul",{children:t.map((f,h)=>n.jsx("li",{className:"notice-box__line",children:f},h))}):r})]}):n.jsx("div",{className:"notice-box__inner",children:r});return n.jsxs("div",{ref:m,className:C,role:"note",children:[x,b]})}const ua=[];let lr=!1;function Ql(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const t=ua[ua.length-1];t&&(e.stopPropagation(),t())}function Gn(e){return ua.push(e),!lr&&typeof document<"u"&&(document.addEventListener("keydown",Ql),lr=!0),()=>{const t=ua.lastIndexOf(e);t>=0&&ua.splice(t,1),ua.length===0&&lr&&typeof document<"u"&&(document.removeEventListener("keydown",Ql),lr=!1)}}const ei=o.createContext(null);function ly(e){return/max-width:\s*7[0-9][0-9]px/.test(e)}const ti=e=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches;function iy(e){const t=o.useCallback(a=>{if(typeof window>"u"||!window.matchMedia)return()=>{};const r=window.matchMedia(e);return r.addEventListener?r.addEventListener("change",a):r.addListener&&r.addListener(a),()=>{r.removeEventListener?r.removeEventListener("change",a):r.removeListener&&r.removeListener(a)}},[e]);return js.useSyncExternalStore(t,()=>ti(e),()=>!1)}function uy(e){const[t,a]=o.useState(ti(e));return o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const r=window.matchMedia(e),l=i=>a(i.matches),s=r;return s.addEventListener?s.addEventListener("change",l):s.addListener&&s.addListener(l),a(r.matches),()=>{s.removeEventListener?s.removeEventListener("change",l):s.removeListener&&s.removeListener(l)}},[e]),t}const cy=typeof js.useSyncExternalStore=="function"?iy:uy;function Cn(e){const t=o.useContext(ei),a=cy(e);return t&&typeof t.mobile=="boolean"&&ly(e)?t.mobile:a}const dy="(prefers-reduced-motion: reduce)";function bo(){return Cn(dy)}function vn(e){const{anchorRect:t,anchorEl:a,offset:r=20,edgeMargin:l=20,onClose:s,closeOnOutsideClick:i=!0,className:u="",role:c="dialog",ariaLabel:d="",children:m,backdrop:p=!1,isMobilePopup:C=!1,useBorder:b=!0,header:x,focusOnOpen:f}=e||{},h=o.useRef(null),[_,g]=o.useState({position:"fixed",left:0,top:-9999}),[k,v]=o.useState(!1),[B,y]=o.useState("bottom"),[w,A]=o.useState(!1),[E,D]=o.useState(!1),N=!t&&!a,F=o.useRef(null),R=o.useCallback((P=!1,V=!1)=>{if(E&&C)return;const W=a?a.getBoundingClientRect():t,G=V&&F.current?F.current:W;if(!G||!h.current)return;const S=h.current,{offsetWidth:M,offsetHeight:I}=S,Z=window.innerWidth,le=window.innerHeight,oe=Z-G.right,de=G.left,re=G.top,z=le-G.bottom;let ne=0,H=0,U="top";if(re>=I+r)U="top",H=G.top-r-I,ne=G.left+G.width/2-M/2;else if(z>=I+r)U="bottom",H=G.bottom+r,ne=G.left+G.width/2-M/2;else if(oe>=M+r)U="right",ne=G.right+r,H=G.top+G.height/2-I/2;else if(de>=M+r)U="left",ne=G.left-r-M,H=G.top+G.height/2-I/2;else{const me=Math.max(re,z,oe,de);me===re?(U="top",H=G.top-r-I,ne=G.left+G.width/2-M/2):me===z?(U="bottom",H=G.bottom+r,ne=G.left+G.width/2-M/2):me===oe?(U="right",ne=G.right+r,H=G.top+G.height/2-I/2):(U="left",ne=G.left-r-M,H=G.top+G.height/2-I/2)}const pe=Number.isFinite(Number(l))?Number(l):8;ne=Math.min(Math.max(ne,pe),Z-M-pe),H=Math.min(Math.max(H,pe),le-I-pe);const Ee=Math.round(ne),ge=Math.round(H);P&&h.current?(h.current.style.left=`${Ee}px`,h.current.style.top=`${ge}px`,h.current.dataset.placement=U):(y(U||B),g({position:"fixed",left:Ee,top:ge}),A(!0))},[E,C,a,t,r,l,B]);o.useEffect(()=>()=>{F.current=null},[a,t]),o.useLayoutEffect(()=>{if(N)return;if(E&&C){g({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),A(!0);return}F.current===null&&(F.current=a?a.getBoundingClientRect():t??null),R(!1,!0);const P=requestAnimationFrame(()=>R(!1,!0));return()=>cancelAnimationFrame(P)},[t,a,r,m,l,N,E,C,R]),o.useEffect(()=>{if(N||E&&C||!h.current||typeof ResizeObserver>"u")return;const P=new ResizeObserver(()=>{t&&R()});return P.observe(h.current),()=>P.disconnect()},[t,m,l,N,E,C,R]),o.useEffect(()=>{if(N||E&&C)return;let P=null;const V=()=>{if(a&&(F.current=a.getBoundingClientRect()),typeof requestAnimationFrame>"u"){R(!0);return}P===null&&(P=requestAnimationFrame(()=>{P=null,R(!0)}))},W=G=>{if(!a&&s){const S=G.target;if(S&&h.current&&h.current.contains(S))return;try{if(S&&S.closest&&S.closest("[data-tooltip-ignore]"))return}catch{}J.current(!0);return}V()};return window.addEventListener("resize",V),document.addEventListener("scroll",W,{passive:!0,capture:!0}),()=>{P!==null&&cancelAnimationFrame(P),window.removeEventListener("resize",V),document.removeEventListener("scroll",W,{capture:!0})}},[t,a,s,r,m,l,N,E,C,R]),o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const P=window.matchMedia("(max-width: 768px)"),V=()=>D(!!P.matches);V();try{P.addEventListener?P.addEventListener("change",V):P.addListener(V)}catch{try{P.addListener(V)}catch{}}return()=>{try{P.removeEventListener?P.removeEventListener("change",V):P.removeListener(V)}catch{}}},[]);const K=o.useRef(!1),L=o.useRef(null),$=bo(),T=o.useCallback((P=!1)=>{if(s&&!(k||K.current)){if(K.current=!0,P){v(!0);try{s&&s()}catch{K.current=!1,v(!1)}return}v(!0),L.current=setTimeout(()=>{L.current=null;try{s&&s()}catch{K.current=!1,v(!1)}},$?0:200)}},[k,s,v,$]);o.useEffect(()=>()=>{L.current&&clearTimeout(L.current)},[]),o.useEffect(()=>{if(N)return;const P=G=>{const S=h.current;if(!S)return;const M=G.target;if(M&&!S.contains(M)){try{if(M.closest&&M.closest("[data-tooltip-ignore]"))return}catch{}i&&T(!0)}},V=G=>{const S=h.current;if(!S)return;const M=G.target;if(M&&!S.contains(M)){try{if(M.closest&&M.closest("[data-tooltip-ignore]"))return}catch{}i&&T(!0)}},W=G=>{if(G.key==="Tab"){const S=h.current;if(!S)return;const M=S.querySelectorAll(_n);if(!M||M.length===0)return;const I=M[0],Z=M[M.length-1],le=document.activeElement;G.shiftKey?le===I&&(G.preventDefault(),Z.focus()):le===Z&&(G.preventDefault(),I.focus())}};return document.addEventListener("pointerdown",P,!0),document.addEventListener("click",V,!0),document.addEventListener("keydown",W),()=>{document.removeEventListener("pointerdown",P,!0),document.removeEventListener("click",V,!0),document.removeEventListener("keydown",W)}},[s,i,T,N]);const J=o.useRef(T);o.useEffect(()=>{J.current=T});const q=!!s;o.useEffect(()=>{if(!(N||!q))return Gn(()=>J.current())},[N,q]),o.useEffect(()=>{const P=()=>{T(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",P),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",P)}},[T]);const O=o.useRef(null);o.useEffect(()=>{if(N||f===!1||!w)return;const P=h.current;if(!P)return;const V=P.querySelector(_n);if(V)return O.current=document.activeElement,V.focus({preventScroll:!0}),()=>{const W=O.current;O.current=null,W&&document.contains(W)&&W.focus({preventScroll:!0})}},[N,f,w]),o.useEffect(()=>{c==="dialog"&&!d&&Rt("tooltip-no-name",'[ihab/Tooltip] \uC774\uB984 \uC5C6\uB294 role="dialog" \uC785\uB2C8\uB2E4 \u2014 ariaLabel \uC744 \uC8FC\uC138\uC694. \uB0AD\uB3C5\uAE30\uAC00 "\uB300\uD654\uC0C1\uC790" \uB77C\uACE0\uB9CC \uC77D\uC2B5\uB2C8\uB2E4.')},[c,d]);const Q=n.jsxs("div",{ref:h,className:`tooltip-content ${N?"tooltip-content--inline":""} ${b?"tooltip-content--bordered":""} ${k?"is-closing":""} ${u} ${E&&C?"is-mobile":""}`,role:c,"aria-label":d||void 0,style:N?{}:{..._,visibility:w?"visible":"hidden"},tabIndex:-1,"data-placement":B,"data-left":N?"":_.left,"data-top":N?"":_.top,"data-anchor-left":t?Math.round(t.left):"","data-anchor-top":t?Math.round(t.top):"","data-anchor-width":t?Math.round(t.width):"","data-anchor-height":t?Math.round(t.height):"",children:[x!=null&&n.jsx("div",{className:"tooltip-content__header h5",children:x}),m]});if(N||typeof document>"u")return Q;if(p||E&&C){const P=n.jsxs("div",{className:"tooltip-portal",children:[n.jsx("div",{className:"tooltip-backdrop",onClick:()=>{i&&T(!0)}}),Q]});return cn.createPortal(P,document.body)}return cn.createPortal(Q,document.body)}function Dn(e){const{anchorRect:t,text:a,offset:r=8,onClose:l,className:s="",ariaLabel:i}=e||{};return a?n.jsx(vn,{anchorRect:t,offset:r,onClose:l,closeOnOutsideClick:!1,className:`tooltip-info ${s}`,ariaLabel:i||a,children:n.jsx("div",{className:"tooltip-info__content body-3",children:a})}):null}function Kn(e){const{t}=_e.useTranslation(),{anchorRect:a,title:r,items:l,activeIndex:s=-1,showIndex:i=!0,onClose:u,offset:c=12,closeOnOutsideClick:d=!0}=e||{},m=(Array.isArray(l)?l:l?[l]:[]).map(p=>typeof p=="string"?{text:p}:p);return!m.length&&!r?null:n.jsx(vn,{anchorRect:a,offset:c,onClose:u,closeOnOutsideClick:d,useBorder:!1,className:"tooltip-description",ariaLabel:r||t("tooltip.description","\uC124\uBA85"),children:n.jsxs("div",{className:"tooltip-description__box",children:[r&&n.jsx("span",{className:"tooltip-description__title body-2",children:r}),n.jsx("ol",{className:"tooltip-description__items",children:m.map((p,C)=>n.jsxs("li",{className:`tooltip-description__item body-3${C===s?" tooltip-description__item--active":""}`,children:[i&&m.length>1&&n.jsxs("span",{className:"tooltip-description__index button-1",children:[C+1,"."]}),p.color&&n.jsx("span",{className:"tooltip-description__dot",style:{background:p.color},"aria-hidden":"true"}),n.jsx("span",{children:p.text})]},C))})]})})}function $a(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),t}let yo=0,ni=!1;function ai(){ni||typeof document>"u"||(ni=!0,document.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(yo=Date.now())},!0),document.addEventListener("touchstart",()=>{yo=Date.now()},{capture:!0,passive:!0}))}ai();function ca(e){return!!e&&e.pointerType==="touch"}function da(e=1e3){return ai(),Date.now()-yo<e}function vo(e,t,a,{enabled:r=!0,fallbackOnParent:l=!1}={}){const s=$a(e),i=$a(t),u=o.useRef(null),c=o.useRef(0);o.useEffect(()=>{if(!r||typeof document>"u")return;const m=p=>{const C=p,b=p.target,x=a.current,f=!!(b&&x&&x.contains(b));if(C.pointerType!=="touch"){f&&(u.current=null);return}if(f){u.current=s.current;return}u.current=null,s.current&&!(b&&b.closest?.(".tooltip-content"))&&i.current(!1,x)};return document.addEventListener("pointerdown",m,!0),()=>document.removeEventListener("pointerdown",m,!0)},[r,a,s,i]);const d=o.useCallback(m=>{const p=u.current;return p===null?!1:(u.current=null,c.current=Date.now(),i.current(!p,m??a.current),!0)},[a,i]);return o.useEffect(()=>{if(!r||!l)return;const m=a.current,p=m?.parentElement;if(!m||!p)return;let C=null;const b=h=>{const _=h.changedTouches?.[0];if(!_)return!1;const g=m.getBoundingClientRect();return _.clientX>=g.left&&_.clientX<=g.right&&_.clientY>=g.top&&_.clientY<=g.bottom},x=h=>{C=b(h)?s.current:null},f=h=>{const _=C;C=null,!(_===null||Date.now()-c.current<700||!b(h))&&(u.current=null,c.current=Date.now(),i.current(!_,m))};return p.addEventListener("touchstart",x,{passive:!0}),p.addEventListener("touchend",f),()=>{p.removeEventListener("touchstart",x),p.removeEventListener("touchend",f)}},[r,l,a,s,i]),{touchPress:d}}function py(e,t){const{size:a=48,type:r,htmlType:l,href:s,target:i,rel:u,icon:c,rightIcon:d,label:m,count:p,subLabel:C,children:b,ariaLabel:x,variant:f="default",align:h="center",nowrap:_=!1,selected:g,toggleable:k=!1,ariaExpanded:v,ariaControls:B,disabled:y=!1,useLabel:w=!0,useBorder:A=!0,useBG:E=!0,useDisabledCovered:D=!1,useDisabledInvisible:N=!1,useDisabledFilled:F=!1,width:R,minWidth:K,onClick:L,onDisabledClick:$,showTooltipInfo:T=!1,tooltipInfoText:J=null,tooltipDescription:q=null,tooltipOnly:O=!1,iconSize:Q="medium",iconColor:P,shape:V="rounded",color:W,className:G,...S}=e,M=typeof a=="string"&&isNaN(Number(a))?a.toLowerCase():String(Number(a)||48),I=M.match(/^\d+$/)?`button${M}`:`button-${M}`,Z=Number(a),le=!isNaN(Z)&&Z<40?"button-2":"button-1",oe=m??b,de=y||!!S.disabled,re=de?D?"disabled-covered":N?"disabled-invisibled":F?"disabled-filled":"disabled":f,z=re?`button--variant-${re}`:"",ne=h?`button--align-${h}`:"",H=_?"button--nowrap":"",U=V?`button--shape-${V}`:"",pe=typeof P=="string"&&P.startsWith("--")?`var(${P})`:P,Ee={...R?{width:typeof R=="number"?`${R}px`:R}:{},...K?{minWidth:typeof K=="number"?`${K}px`:K}:{},...A?{}:{"--button-border":de?"0":"1px solid transparent"},...pe?{"--button-icon-color":pe}:{},...W?{"--color-main":W}:{}},ge=w===!1?"":oe,me=Array.isArray(ge)?ge.length>0:!!ge,ie=!!d,be=r??(me||c||ie?"bar":"dot"),he=`${I}--${be}`,ue=o.useRef(null);o.useEffect(()=>{!Pn||l!==void 0||ue.current?.closest("form")&&Rt(`button-in-form:${typeof oe=="string"?oe:""}`,'[ihab/Button] <form> \uC548\uC778\uB370 htmlType \uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 \uC774 \uB2E8\uCD94\uB294 type="button" \uC774\uB77C \uD3FC\uC744 \uBCF4\uB0B4\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uBCF4\uB0B4\uB294 \uB2E8\uCD94\uBA74 htmlType="submit" \uC744 \uC8FC\uC138\uC694. \uD3FC\uC5D0 \uBCF4\uB0B4\uB294 \uB2E8\uCD94\uAC00 \uD558\uB098\uB3C4 \uC5C6\uC73C\uBA74 **Enter \uB85C\uB3C4 \uC548 \uBCF4\uB0B4\uC9D1\uB2C8\uB2E4**(\uCE78\uC774 \uB458 \uC774\uC0C1\uC77C \uB54C).'+(typeof oe=="string"&&oe?` \uB2E8\uCD94: ${oe}`:""))},[l,oe]);const Me=o.useRef(t);Me.current=t;const qe=o.useCallback(Re=>{ue.current=Re;const ot=Me.current;typeof ot=="function"?ot(Re):ot&&(ot.current=Re)},[]),je=o.useRef(de),[Ve,Oe]=o.useState(!!g),[dt,rt]=o.useState(!1),[nt,pt]=o.useState(null),Ne=o.useCallback(()=>rt(!1),[]),[Ue,ke]=o.useState(!1),He=o.useId();o.useEffect(()=>{typeof g=="boolean"&&Oe(g)},[g]),o.useEffect(()=>{if(je.current&&!de&&ue.current){const Re=ue.current;let ot=!1;try{ot=Re.matches(":focus:not(:focus-visible)")}catch{ot=!1}ot&&Re.blur(),Re.style.pointerEvents="none";const Et=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ue.current&&(ue.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(Et)}je.current=de},[de]);const Be=typeof g=="boolean"?!!g:Ve,Se=typeof v=="boolean"?void 0:k||typeof g=="boolean"?Be?"true":"false":S["aria-pressed"],Le=we("button",I,he,z,ne,H,U,Be?"is-selected":null,E?null:"button--no-bg",O?"button--tooltip-only":null,G),Ze=`button__icon button__icon--${Q}`,xt=Array.isArray(C)?C:C!==void 0?[C]:[],et=()=>{if(Array.isArray(ge))return ge.map((ot,Et)=>{const Je=xt[Et];return n.jsxs("span",{className:`button__label-text${Je!==void 0?" button__label-text--has-sub":""}`,children:[ot,Je!==void 0&&n.jsx("span",{className:"button__sub-label-text caption-1",children:Je})]},Et)});const Re=C!==void 0;return n.jsxs("span",{className:`button__label-text${Re?" button__label-text--has-sub":""}`,children:[ge,p!=null&&n.jsx("span",{className:"button__count",children:p}),Re&&n.jsx("span",{className:"button__sub-label-text caption-1",children:C})]})},Xe=Re=>{typeof g!="boolean"&&!k&&Oe(!1),Re.currentTarget.blur()},At=Re=>{de||(typeof S.onMouseLeave=="function"&&S.onMouseLeave(Re),Xe(Re))},gt=Re=>{if(O&&mt&&st.touchPress(Re.currentTarget),de){mt&&st.touchPress(Re.currentTarget),Re.preventDefault(),$?.(Re);return}typeof g!="boolean"&&k&&Oe(ot=>!ot),L?.(Re)},_t=o.useCallback(()=>{(T||q)&&(rt(!0),pt(ue.current?.getBoundingClientRect()??null))},[T,q]),Nt=o.useCallback(()=>{(T||q)&&(rt(!1),pt(null))},[T,q]),mt=!!(T||q),st=vo(dt,Re=>{Re?_t():Nt()},ue,{enabled:mt&&(de||O),fallbackOnParent:mt&&de}),Pe={...S};delete Pe.disabled,delete Pe.className,delete Pe.faded,delete Pe.useFaded,delete Pe.loading,delete Pe.onMouseLeave,delete Pe.onPointerEnter,delete Pe.onPointerLeave,delete Pe.onPointerUp,delete Pe.onFocus,delete Pe.onBlur,de&&(Object.keys(Pe).forEach(Re=>{/^on[A-Z]/.test(Re)&&typeof Pe[Re]=="function"&&delete Pe[Re]}),Pe["aria-disabled"]="true");const bt=(typeof T=="string"?T:null)??(typeof J=="string"?J:null)??(typeof x=="string"?x:null)??(typeof oe=="string"?oe:null)??void 0,wt=typeof x=="string"?x:typeof oe=="string"?oe:bt,lt=q?[q.title,...q.items??[]].filter(Boolean).join(". "):T&&bt&&bt!==wt?bt:"",jt=[typeof S["aria-describedby"]=="string"?S["aria-describedby"]:void 0,lt?He:null].filter(Boolean).join(" ")||void 0,Ge=(Re,ot)=>n.jsx(tt,{icon:Re,label:ot??wt,className:Ze,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),yt=()=>be==="dot"?n.jsxs(n.Fragment,{children:[Ge(c),me&&n.jsx("span",{className:`button__label ${le}`,children:et()})]}):h==="center"&&c?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"button__center-group",children:[n.jsx("span",{className:"button__left",children:Ge(c)}),me&&n.jsx("span",{className:`button__label ${le}`,children:et()})]}),ie&&n.jsx("span",{className:"button__right",children:Ge(d)})]}):n.jsxs(n.Fragment,{children:[c&&n.jsx("span",{className:"button__left",children:Ge(c,x??oe)}),me&&n.jsx("span",{className:`button__label ${le}`,children:et()}),ie&&n.jsx("span",{className:"button__right",children:Ge(d)})]}),$t=!!s&&!de;return n.jsxs(n.Fragment,{children:[n.jsxs($t?"a":"button",{...Pe,ref:qe,...$t?{href:s,target:i,rel:u??(i==="_blank"?"noreferrer":void 0)}:{type:l??"button",disabled:de&&!$&&!Ue},className:Le,"aria-pressed":Se,"aria-expanded":typeof v=="boolean"?v:S["aria-expanded"],"aria-controls":B??S["aria-controls"],"aria-label":wt,"aria-disabled":de&&($t||$||Ue)?!0:void 0,"aria-describedby":jt,style:Ee,onClick:gt,onMouseLeave:At,onPointerEnter:Re=>{ca(Re)||_t(),!de&&typeof S.onPointerEnter=="function"&&S.onPointerEnter(Re)},onPointerLeave:Re=>{ca(Re)||Nt(),!de&&typeof S.onPointerLeave=="function"&&S.onPointerLeave(Re)},onPointerUp:Re=>{de&&mt&&st.touchPress(Re.currentTarget),!de&&typeof S.onPointerUp=="function"&&S.onPointerUp(Re)},onFocus:Re=>{ke(!0),da()||_t(),!de&&typeof S.onFocus=="function"&&S.onFocus(Re)},onBlur:Re=>{ke(!1),de||Xe(Re),Nt(),!de&&typeof S.onBlur=="function"&&S.onBlur(Re)},children:[yt(),lt?n.jsx("span",{id:He,hidden:!0,"aria-label":lt}):null]}),dt&&q?n.jsx(Kn,{anchorRect:nt,title:q.title,items:q.items,onClose:Ne}):dt&&bt?n.jsx(Dn,{anchorRect:nt,text:bt,onClose:Ne}):null]})}const fe=o.forwardRef(py);fe.displayName="Button";function Mt(e,t,a){const r=o.useRef(null);return o.useLayoutEffect(()=>{const l=r.current?.parentElement??null;return t(l,e),()=>a(l)},[e,t,a]),r}const Ra={title:"--promo-banner-bg-title",description:"--promo-banner-bg-description"},xo=new WeakMap;function _o(e){if(e)return xo.get(e)}function Qt(e,t){e&&(e.style.setProperty(Ra.title,t.title),e.style.setProperty(Ra.description,t.description),xo.set(e,t))}function en(e){e&&(e.style.removeProperty(Ra.title),e.style.removeProperty(Ra.description),xo.delete(e))}const ri={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"default"};function oi(){const e=Mt(ri,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-main","aria-hidden":"true"})}const si={title:"var(--color-main)",description:"var(--color-gray)",actionVariant:"main"};function li(){const e=Mt(si,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft","aria-hidden":"true"})}const ii={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function ui(){const e=Mt(ii,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-sub","aria-hidden":"true"})}const ci={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function di(){const e=Mt(ci,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-deep","aria-hidden":"true"})}const pi={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function mi(){const e=Mt(pi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft-sub","aria-hidden":"true"})}const hi={title:"var(--color-black)",description:"var(--color-darkGray)",actionVariant:"main"};function Ci(){const e=Mt(hi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-warm","aria-hidden":"true"})}const fi={title:"var(--color-white)",description:"var(--color-lightGray)",actionVariant:"main"};function gi(){const e=Mt(fi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dark","aria-hidden":"true"})}const bi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function yi(){const e=Mt(bi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-radial","aria-hidden":"true"})}const vi={title:"var(--color-darkMain)",description:"var(--color-gray)",actionVariant:"main"};function xi(){const e=Mt(vi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-diagonal","aria-hidden":"true"})}const _i={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function wi(){const e=Mt(_i,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dots","aria-hidden":"true"})}const Bi={title:"var(--color-black)",description:"var(--color-gray)",actionVariant:"main"};function ki(){const e=Mt(Bi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-outline","aria-hidden":"true",children:n.jsx("span",{className:"promo-banner-bg-outline__dot"})})}const Ai={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Ni(){const e=Mt(Ai,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-success","aria-hidden":"true"})}const Ei={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"sub"};function Di(){const e=Mt(Ei,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-naver","aria-hidden":"true"})}const Si={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"transparent-white"};function ji(){const e=Mt(Si,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-instagram","aria-hidden":"true"})}const ln=(e,t,a)=>({key:e,get label(){return Vt.t(`promoBannerBg.${e}`,t)},textTone:a}),my=[ln("main","\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),ln("soft","\uC18C\uD504\uD2B8","dark"),ln("sub","\uC11C\uBE0C \uCEEC\uB7EC","light"),ln("deep","\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),ln("softSub","\uC18C\uD504\uD2B8 \uC11C\uBE0C","dark"),ln("warm","\uC6DC(\uAC15\uC870)","dark"),ln("dark","\uB2E4\uD06C","light"),ln("radial","\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),ln("diagonal","\uB300\uAC01\uC120 \uD328\uD134","dark"),ln("dots","\uB3C4\uD2B8 \uD328\uD134","dark"),ln("outline","\uC544\uC6C3\uB77C\uC778","dark"),ln("success","\uC131\uACF5/\uC644\uB8CC","light"),ln("naver","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4","light"),ln("instagram","\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4","light")],Ti={main:oi,soft:li,sub:ui,deep:di,softSub:mi,warm:Ci,dark:gi,radial:yi,diagonal:xi,dots:wi,outline:ki,success:Ni,naver:Di,instagram:ji};function Mi({storageKey:e="fontScale",baseFont:t=20,minScale:a=.8,maxScale:r=1.4,step:l=.1,lineHeightRatio:s=1.4}={}){const i=k=>Math.max(a,Math.min(r,Number(k))),u=k=>{try{const v=localStorage.getItem(k),B=v?Number(v):1;return Number.isFinite(B)?i(B):i(1)}catch{return i(1)}},[c,d]=o.useState(()=>u(e)),[m,p]=o.useState(e);m!==e&&(p(e),d(u(e))),o.useEffect(()=>{try{localStorage.setItem(e,String(c))}catch{}},[e,c]);const C=k=>{d(typeof k=="function"?v=>i(k(v)):i(k))},b=()=>C(k=>+(k+l).toFixed(6)),x=()=>C(k=>+(k-l).toFixed(6)),f=c<r-Number.EPSILON,h=c>a+Number.EPSILON,_=Math.round(t*c),g=Math.round(_*s);return{scale:c,setScale:C,increase:b,decrease:x,canIncrease:f,canDecrease:h,fontSize:_,lineHeight:g}}function Li(e,t){const a=$a(t);o.useEffect(()=>{const r=()=>a.current();try{window.addEventListener(e,r)}catch{}return()=>{try{window.removeEventListener(e,r)}catch{}}},[e,a])}const wo=" \xB7 ",$i=(()=>{if(typeof document>"u")return"";const e=document.title;return e.includes(wo)?e.split(wo).pop()??e:e})(),hy=o.createContext(!1),Yn=[];let Ri=null;function Cy(e){const t=o.useContext(hy);o.useEffect(()=>{if(t||typeof e!="string"||!e)return;Yn.length===0&&(Ri=document.title);const a={text:$i?`${e}${wo}${$i}`:e};return Yn.push(a),document.title=a.text,()=>{const r=Yn.lastIndexOf(a);r>=0&&Yn.splice(r,1),document.title=Yn.length?Yn[Yn.length-1].text:Ri??document.title}},[e,t])}const Bo=[{value:"10",label:"10\uAC1C\uC529 \uBCF4\uAE30"},{value:"25",label:"25\uAC1C\uC529 \uBCF4\uAE30"},{value:"50",label:"50\uAC1C\uC529 \uBCF4\uAE30"},{value:"100",label:"100\uAC1C\uC529 \uBCF4\uAE30"}],fy=(()=>{let e=null;return()=>(e||(e=new Intl.Collator("ko")),e)})();function mn(e,t){return fy().compare(e,t)}const ir=new Map;function gy(e){const t=ir.get(e);if(t)return t;const a=[],r=/-?\d+(?:\.\d+)?/g;let l=0;for(let s=r.exec(e);s;s=r.exec(e)){let i=s.index,u=s[0];u[0]==="-"&&i>0&&!/\s/.test(e[i-1])&&(i+=1,u=u.slice(1)),i>l&&a.push(e.slice(l,i)),a.push(Number(u)),l=s.index+s[0].length}return l<e.length&&a.push(e.slice(l)),ir.size>5e3&&ir.clear(),ir.set(e,a),a}function by(e){if(!/^[\d\s-]+$/.test(e))return null;const t=e.replace(/\D/g,"");return t.length<9||t.length>11?null:t[0]==="0"||t[0]==="1"&&e!==t?t:null}function yy(e,t){const a=d=>d==null||typeof d=="number"&&Number.isNaN(d)?"":String(d).trim(),r=a(e),l=a(t);if(r===l)return 0;const s=(d,m)=>{if(typeof d=="number"&&!Number.isNaN(d))return[d];const p=by(m);return p!==null?[p]:gy(m)},i=s(e,r),u=s(t,l),c=Math.min(i.length,u.length);for(let d=0;d<c;d++){const m=i[d],p=u[d];if(typeof m=="number"&&typeof p=="number"){if(m!==p)return m-p;continue}if(typeof m=="number")return-1;if(typeof p=="number")return 1;const C=mn(m,p);if(C!==0)return C}return i.length!==u.length?i.length-u.length:mn(r,l)}const Pi=e=>e==null||typeof e=="number"&&Number.isNaN(e)||typeof e=="string"&&e.trim()==="";function ur(e,t,a){const r=Pi(e),l=Pi(t);if(r||l)return r===l?0:r?1:-1;const s=yy(e,t);return a?s:-s}function vy(e,t,a){const{t:r}=_e.useTranslation(),[l,s]=o.useState(()=>{const x=a?.initialPageSize;return x&&Bo.some(f=>f.value===x)?x:"25"}),[i,u]=o.useState(1),[c,d]=o.useState(t);Object.is(c,t)||(d(t),i!==1&&u(1));const m=o.useMemo(()=>Bo.map(x=>({...x,label:r("visits.showN",{n:x.value})})),[r]),p=o.useCallback(x=>{Bo.some(f=>f.value===x)&&(s(x),u(1))},[]),C=Math.max(1,Math.ceil(e.length/Number(l))),b=Math.min(Math.max(1,Number.isFinite(i)?Math.floor(i):1),C);return i!==b&&u(b),{pageRows:o.useMemo(()=>e.slice((b-1)*Number(l),b*Number(l)),[e,b,l]),pageSizeProps:{options:m,value:l,onChange:p},paginationProps:{page:b,total:C,onChange:u},setPage:u}}function xy(e){const[t,a]=o.useState(()=>e?.defaultKey!=null?{key:e.defaultKey,asc:e.defaultAsc??!0}:null),r=o.useRef(t),l=o.useRef(e?.onSortChange);l.current=e?.onSortChange;const s=o.useCallback(c=>{const d=r.current,m=d?.key===c?{key:c,asc:!d.asc}:{key:c,asc:!0};r.current=m,a(m),l.current?.(m)},[]),i=o.useCallback((c,d)=>({label:c,sortDir:t?.key===d?t.asc?"asc":"desc":null,onClick:()=>s(d)}),[t,s]),u=o.useCallback((c,d)=>{if(!t)return c;const{key:m,asc:p}=t;return[...c].sort((C,b)=>ur(d(C,m),d(b,m),p))},[t]);return{sort:t,field:i,sortRows:u}}const xn="\uC804\uCCB4";Object.fromEntries(Object.entries(QC).map(([e,{nucleus:t}])=>[e,t]));const _y={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"})},wy={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"})},By={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 ky(e,t){if("place"in t)return _y[t.place](e);const a=wy[t.vowel](e);return t.glide?`${a} \xB7 ${By[t.glide](e)}`:a}const Ay=(e,{defaultValue:t})=>t,Ii=(e,t)=>({jamos:e,phonetic:t,tooltip:ky(Ay,t)}),Sn=(e,t)=>t.map(a=>Ii([a],{place:e})),qt=(e,t,a)=>Ii([...e],a?{vowel:t,glide:a}:{vowel:t}),ko={cho:[Sn("labial",["\u3142","\u3143","\u314D","\u3141"]),Sn("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),Sn("alveolar",["\u3145","\u3146"]),Sn("palatal",["\u3148","\u3149","\u314A"]),Sn("velar",["\u3131","\u3132","\u314B"]),Sn("glottal",["\u314E"])],jung:[[qt("\u3163","frontHigh"),qt("\u315F","frontHigh","w"),qt("\u3162","frontHigh","velar")],[qt("\u3161","backHighUnrounded")],[qt("\u315C","backHighRounded"),qt("\u3160","backHighRounded","j")],[qt("\u3154\u3150","frontMid"),qt("\u3156\u3152","frontMid","j"),qt("\u3159\u315A\u315E","frontMid","w")],[qt("\u3153","backMidUnrounded"),qt("\u3155","backMidUnrounded","j"),qt("\u315D","backMidUnrounded","w")],[qt("\u3157","backMidRounded"),qt("\u315B","backMidRounded","j")],[qt("\u314F","low"),qt("\u3151","low","j"),qt("\u3158","low","w")]],jong:[Sn("labial",["\u3142","\u3141"]),Sn("alveolar",["\u3137","\u3134","\u3139"]),Sn("velar",["\u3131","\u3147"])]},Ny=e=>e===Ey?[]:Array.from(e),Ey="__NO_CODA__",Ao=e=>e.map(t=>t.map(({jamos:a,phonetic:r,tooltip:l})=>({v:a.join(""),phonetic:r,tooltip:l}))),Fi={cho:Ao(ko.cho),jung:Ao(ko.jung),jong:Ao(ko.jong)};Fi.jung.flat().forEach(({v:e})=>{for(const t of Ny(e));}),new Set(Fi.cho.flat().map(e=>e.v));function Dy(e,t=!0){const a=$a(e);o.useEffect(()=>{if(t)return Gn(()=>{a.current?.()})},[t,a])}function Pa(){const[e,t]=o.useState(null),a=o.useCallback(s=>t(s.getBoundingClientRect()),[]),r=o.useCallback(()=>t(null),[]),l=o.useCallback(s=>{const i=s.getBoundingClientRect();t(u=>u?null:i)},[]);return{anchorRect:e,isOpen:e!=null,openAt:a,close:r,toggleAt:l}}function Sy(e){const[t,a]=o.useState(null),[r,l]=o.useState(null),s=o.useRef(null);o.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]);const i=o.useCallback((c,d)=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{a(c),l(d)},e)},[e]),u=o.useCallback(()=>{s.current&&clearTimeout(s.current),a(null),l(null)},[]);return{payload:t,anchorRect:r,openAfterDelay:i,close:u}}function Oi(e="warning"){const[t,a]=o.useState(""),[r,l]=o.useState(e),[s,i]=o.useState(0),u=o.useCallback((p,C)=>{l(C),a(p),i(b=>b+1)},[]),c=o.useCallback(p=>u(p,"warning"),[u]),d=o.useCallback(p=>u(p,"normal"),[u]),m=o.useCallback(()=>a(""),[]);return{toastMessage:t,toastType:r,toastKey:s,showToast:u,showWarning:c,showNormal:d,clearToast:m}}function Ia(e){let t=0;if(e&&typeof window<"u"&&typeof window.getComputedStyle=="function")for(let a=e;a&&a!==document.body&&a!==document.documentElement;a=a.parentElement){const r=parseInt(window.getComputedStyle(a).zIndex,10);!Number.isNaN(r)&&r>t&&(t=r)}return t>0?`max(var(--z-menu, 1500), ${t+1})`:"var(--z-menu, 1500)"}function Fa({computeStyle:e,onScroll:t="close",onResize:a="close",ignoreOutsideClickSelector:r}){const[l,s]=o.useState(!1),[i,u]=o.useState({position:"fixed"}),c=o.useRef(null),d=o.useRef(null),m=o.useCallback(()=>{c.current&&u(e(c.current.getBoundingClientRect(),c.current))},[e]);o.useLayoutEffect(()=>{l&&m()},[l,m]),o.useEffect(()=>{if(!l)return;let b=d.current?.offsetHeight??0;b>0&&m();let x=0,f=null;typeof ResizeObserver<"u"&&d.current&&(f=new ResizeObserver(()=>{const w=d.current?.offsetHeight??0;if(w!==b){if(b=w,++x>4){f?.disconnect(),f=null;return}m()}}),f.observe(d.current));const h=w=>{const A=w.target;r&&A.closest?.(r)||c.current?.contains(A)||d.current?.contains(A)||s(!1)};document.addEventListener("mousedown",h),document.addEventListener("pointerdown",h);let _=null;const g=()=>{if(typeof requestAnimationFrame>"u"){m();return}_===null&&(_=requestAnimationFrame(()=>{_=null,m()}))},k=w=>{d.current?.contains(w.target)||(t==="reposition"?g():t==="close"&&s(!1))};t!=="ignore"&&window.addEventListener("scroll",k,!0);const v=()=>{a==="reposition"?g():a==="close"&&s(!1)};let B=null;const y=()=>{v(),B&&clearTimeout(B),B=setTimeout(()=>{B=null,a==="reposition"&&m()},250)};return a!=="ignore"&&(window.addEventListener("resize",v),window.addEventListener("orientationchange",y)),()=>{_!==null&&cancelAnimationFrame(_),f?.disconnect(),document.removeEventListener("mousedown",h),document.removeEventListener("pointerdown",h),t!=="ignore"&&window.removeEventListener("scroll",k,!0),a!=="ignore"&&(window.removeEventListener("resize",v),window.removeEventListener("orientationchange",y)),B&&clearTimeout(B)}},[l,m,t,a,r]),o.useEffect(()=>{if(l)return Gn(()=>s(!1))},[l]);const p=o.useCallback(()=>s(b=>!b),[]),C=o.useCallback(()=>s(!1),[]);return{open:l,setOpen:s,toggle:p,close:C,style:i,triggerRef:c,menuRef:d}}function jy(e,{mode:t="playback",autoStart:a=!1,onPlaySpeaker:r,onComplete:l,playMs:s=1100,feedbackMs:i=1500}={}){const[u,c]=o.useState([]),[d,m]=o.useState(0),[p,C]=o.useState("idle"),[b,x]=o.useState(null),[f,h]=o.useState([]),[_,g]=o.useState(null),[k,v]=o.useState(0),B=o.useRef(0),y=o.useCallback(P=>{B.current=typeof P=="function"?P(B.current):P,v(B.current)},[]),w=o.useRef(r),A=o.useRef(l);o.useEffect(()=>{w.current=r,A.current=l},[r,l]);const E=o.useRef([]),D=()=>{E.current.forEach(clearTimeout),E.current=[]},N=(P,V)=>{E.current.push(setTimeout(V,P))};o.useEffect(()=>()=>D(),[]);const F=u[d]?.id??null,R=o.useRef(null),K=o.useCallback(()=>{D(),C("playing"),h([]),g(null),y(0);let P=0;e.forEach((V,W)=>{N(P,()=>{m(W),x(V.id),w.current?.(V)}),N(P+1e3,()=>{x(null),h(G=>[...G,V.id])}),P+=1300}),N(P,()=>{C("done"),A.current?.({score:0,total:e.length})})},[e,y]),L=o.useCallback((P,V)=>{if(V>=P.length){C("done"),A.current?.({score:B.current,total:P.length});return}R.current=null,m(V),g(null),C("playing"),x(P[V].id),w.current?.(P[V]),N(s,()=>{x(null),C("waiting")})},[s]),$=o.useCallback(()=>{D();const P=Ta(e);c(P),y(0),h([]),L(P,0)},[e,L,y]),T=o.useCallback(()=>{t==="playback"?(c(e),K()):$()},[t,e,K,$]),J=o.useCallback(()=>{D(),C("idle"),x(null),h([]),g(null),m(0),y(0),c([])},[y]),q=JSON.stringify(e.map(P=>[P.id,P.label,P.angleDeg,P.deg,P.row,P.shortcut]));o.useEffect(()=>(a?T():J(),()=>D()),[t,q,a]);const O=o.useCallback(P=>{p!=="waiting"||t==="playback"||R.current===d||(R.current=d,g(P),P===u[d]?.id&&y(V=>V+1),t==="exam"?(C("playing"),N(400,()=>L(u,d+1))):(C("feedback"),N(i,()=>L(u,d+1))))},[p,t,u,d,L,i,y]),Q=t==="playback"?e.length:u.length;return{bind:{activeSpeakerId:b,playedIds:f,selectedId:_,answerId:F,showFeedback:p==="feedback",clickable:p==="waiting",onSelectSpeaker:O},index:d,total:Q,score:k,phase:p,done:p==="done",start:T,reset:J}}const No=new Map,Eo=new Map,Ty=()=>()=>{},My=()=>!0,Ly=()=>!1;function zi(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 a=Uint8Array.from(atob(t[2]),r=>r.charCodeAt(0));return new TextDecoder("utf-8").decode(a)}catch{return null}}function $y(e){if(typeof window>"u")return"";const t=(a,r)=>{const l=r.attrName.toLowerCase(),s=r.attrValue.trim();(l==="href"||l==="xlink:href")&&!s.startsWith("#")&&(r.keepAttr=!1),(l==="style"||s.includes("\\")&&s.includes("("))&&(r.keepAttr=!1);const i=s.replace(/url\s*\(\s*(['"]?)#[^)\s'"]+\1\s*\)/gi,"");/url\s*\(/i.test(i)&&(r.keepAttr=!1)};oa.addHook("uponSanitizeAttribute",t);try{return oa.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","style","foreignObject"]})}finally{oa.removeHook("uponSanitizeAttribute",t)}}function Ry(e,t){const a=new Set;for(const i of e.matchAll(/url\(\s*(['"]?)#([^)\s"']+)\1\s*\)/g))a.add(i[2]);for(const i of e.matchAll(/(?:xlink:)?href="#([^"]+)"/g))a.add(i[1]);const r=new Set([...e.matchAll(/id="([^"]*)"/g)].map(i=>i[1])),l=[...a].filter(i=>r.has(i));if(l.length===0)return e;let s=e;for(const i of l){const u=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=`${t}-${i}`;s=s.replace(new RegExp(`id="${u}"`,"g"),`id="${c}"`).replace(new RegExp(`url\\(\\s*(['"]?)#${u}\\1\\s*\\)`,"g"),(d,m)=>`url(${m}#${c}${m})`).replace(new RegExp(`((?:xlink:)?href)="#${u}"`,"g"),`$1="#${c}"`)}return s}function Py(e){const t=Eo.get(e);if(t)return t;const a=fetch(e).then(r=>r.ok?r.text():null).then(r=>(r!=null&&No.set(e,r),r)).catch(()=>null).finally(()=>{Eo.delete(e)});return Eo.set(e,a),a}function Iy(e,t=!0){const a=o.useSyncExternalStore(Ty,My,Ly)&&t&&e?zi(e)??No.get(e)??null:null,[r,l]=o.useState({src:e,enabled:t,svg:a});return o.useEffect(()=>{if(!t||!e){l({src:e,enabled:t,svg:null});return}const s=zi(e)??No.get(e)??null;if(s!==null){l({src:e,enabled:t,svg:s});return}let i=!0;return Py(e).then(u=>{i&&l({src:e,enabled:t,svg:u})}),()=>{i=!1}},[e,t]),r.src===e&&r.enabled===t?r.svg:a}function Fy({title:e,description:t,actionLabel:a,onAction:r,bg:l,color:s,size:i="medium",actionVariant:u,titleColor:c,descriptionColor:d,className:m=""}){const p=l??s??"main",C=o.useRef(null),[b,x]=o.useState("main"),f=Cn("(max-width: 767px)"),h=o.useRef({title:!1,description:!1});o.useLayoutEffect(()=>{const k=C.current;if(!k)return;const v=_o(k),B=(y,w,A)=>{if(A!==void 0)k.style.setProperty(w,A),h.current[y]=!0;else if(h.current[y]){const E=v?.[y];E?k.style.setProperty(w,E):k.style.removeProperty(w),h.current[y]=!1}};B("title","--promo-banner-bg-title",c),B("description","--promo-banner-bg-description",d)},[c,d,p]),o.useLayoutEffect(()=>{const k=C.current;if(!k)return;const v=_o(k);x(v?.actionVariant??"main")},[p]);const _=we("promo-banner",`promo-banner--${i}`,m),g=Ti[p];return n.jsxs("div",{ref:C,className:_,role:"note",children:[n.jsx(g,{}),n.jsxs("div",{className:"promo-banner__text",children:[n.jsx("span",{className:`promo-banner__title ${i==="small"?"body-2":"h2"}`,children:e}),t&&n.jsx("span",{className:"promo-banner__description body-3",children:t})]}),a&&r&&n.jsx(fe,{htmlType:"button",size:40,variant:u??b,shape:"pill",useBorder:!0,onClick:r,ariaLabel:a,...f?{type:"dot",icon:"arrow-right"}:{rightIcon:"arrow-right",label:a,minWidth:140}})]})}function Oy({children:e,interval:t=5e3,dotTone:a,className:r="","aria-label":l}){const{t:s}=_e.useTranslation(),i=l??s("topBanner.ariaLabel","\uBC30\uB108"),u=o.Children.toArray(e),c=u.length,[d,m]=o.useState(0),[p,C]=o.useState(!1),[b,x]=o.useState(!1),[f,h]=o.useState(!1),_=o.useRef(null),g=o.useRef(null),k=o.useRef(null),v=bo(),B=p||b||f,y=c>0?Math.min(d,c-1):0;o.useEffect(()=>{if(c<2||t<=0||B||v)return;const A=window.setInterval(()=>m(E=>(Math.min(E,c-1)+1)%c),t);return()=>window.clearInterval(A)},[c,t,B,v]);const w=A=>{g.current!=null&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{g.current=null,h(!1)},A)};return o.useEffect(()=>()=>{g.current!=null&&window.clearTimeout(g.current)},[]),o.useEffect(()=>{if(!f)return;const A=E=>{E.pointerType==="touch"&&(k.current&&k.current.contains(E.target)||(g.current!=null&&(window.clearTimeout(g.current),g.current=null),h(!1)))};return document.addEventListener("pointerdown",A,!0),()=>document.removeEventListener("pointerdown",A,!0)},[f]),c===0?null:n.jsxs("section",{ref:k,className:we("top-banner",r),"aria-label":i,"aria-roledescription":"carousel",onPointerEnter:A=>{_.current=A.pointerType},onPointerDown:A=>{_.current=A.pointerType,A.pointerType==="touch"&&(g.current!=null&&(window.clearTimeout(g.current),g.current=null),h(!0))},onPointerUp:A=>{A.pointerType==="touch"&&w(5e3)},onPointerCancel:A=>{A.pointerType==="touch"&&w(5e3)},onMouseEnter:()=>{_.current!=="touch"&&C(!0)},onMouseLeave:()=>C(!1),onFocus:A=>{let E=!0;try{E=A.target.matches(":focus-visible")}catch{E=!0}x(E)},onBlur:A=>{A.currentTarget.contains(A.relatedTarget)||x(!1)},children:[n.jsx("div",{className:"top-banner__viewport",children:n.jsx("div",{className:"top-banner__track",style:{transform:`translateX(-${y*100}%)`},children:u.map((A,E)=>n.jsx("div",{className:"top-banner__slide","aria-hidden":E!==y,...E!==y?{inert:!0}:{},children:A},E))})}),c>1&&n.jsx("div",{className:`top-banner__dots${(a?.[y]??"light")==="dark"?" top-banner__dots--dark":""}`,children:u.map((A,E)=>n.jsx("button",{type:"button",className:`top-banner__dot${E===y?" top-banner__dot--active":""}`,"aria-label":s("topBanner.dotAriaLabel",{count:c,index:E+1,defaultValue:`${c}\uAC1C \uC911 ${E+1}\uBC88\uC9F8 \uBC30\uB108`}),"aria-current":E===y,onClick:()=>m(E)},E))})]})}function zy({title:e,body:t,open:a=!1,onToggle:r,avatar:l,titleClassName:s="body-2",bodyClassName:i="body-2",className:u=""}){const{t:c}=_e.useTranslation();return n.jsxs("div",{className:`accordion-item ${a?"accordion-item--open":""} ${u}`.trim(),role:"listitem",children:[n.jsxs("div",{className:"accordion-item__header",role:"button",tabIndex:0,"aria-expanded":a,"data-accordion-header":!0,onClick:r,onKeyDown:d=>{if(d.key==="Enter"||d.key===" ")d.preventDefault(),r?.();else if(d.key==="ArrowDown"||d.key==="ArrowUp"){d.preventDefault();const m=d.currentTarget.closest('[role="list"]');if(!m)return;const p=Array.from(m.querySelectorAll("[data-accordion-header]")),C=p.indexOf(d.currentTarget);(d.key==="ArrowDown"?p[C+1]:p[C-1])?.focus()}},children:[l&&n.jsx("div",{className:"accordion-item__avatar",children:l}),n.jsx("div",{className:`accordion-item__title ${s}`,children:e}),n.jsx("div",{className:"accordion-item__chevron",children:n.jsx(tt,{icon:a?"chevron-up":"chevron-down",label:a?c("accordion.collapse","\uC811\uAE30"):c("accordion.expand","\uD3BC\uCE58\uAE30"),className:"accordion-item__chevron-icon",imgClassName:"accordion-item__chevron-image"})})]}),a&&n.jsx("div",{className:`accordion-item__body ${i}`,children:typeof t=="string"?n.jsx("p",{children:t}):t})]})}function Wy({items:e=[],defaultOpenIndex:t=0,size:a=72,className:r="",bodyClassName:l}){const[s,i]=o.useState({index:t}),u=(c,d)=>s.id!=null&&c.id!=null?c.id===s.id:s.id==null&&d===s.index;return n.jsx("div",{className:`accordion-group accordion-group--s${a} ${r}`.trim(),role:"list",children:e.map((c,d)=>n.jsx(zy,{title:c.title,body:c.body,avatar:c.avatar,open:u(c,d),onToggle:()=>i(u(c,d)?{index:-1}:{index:d,id:c.id}),bodyClassName:l},c.id??d))})}function Hy(){return n.jsx("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n.jsx("polyline",{points:"2,6 5,9 10,3"})})}function Vy(){return n.jsxs("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round","aria-hidden":"true",children:[n.jsx("line",{x1:"3",y1:"3",x2:"9",y2:"9"}),n.jsx("line",{x1:"9",y1:"3",x2:"3",y2:"9"})]})}function qy(){return n.jsx("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round","aria-hidden":"true",children:n.jsx("line",{x1:"2.5",y1:"6",x2:"9.5",y2:"6"})})}function Lt(e){const{t}=_e.useTranslation(),{type:a="bar",size:r,className:l="","aria-label":s,"aria-hidden":i}=e;if(a==="dot"){const{icon:B,number:y,position:w="top-right",onClick:A,animate:E=!1}=e,D=B??"check",N=y!==void 0?"number":D,F=typeof r=="number"?r:32,R=we("circle-badge",`circle-badge--${N}`,`circle-badge--${w}`,`circle-badge--${F}`,E?"circle-badge--animate":"",A?"circle-badge--clickable":"",l),K=y!==void 0?t("badge.nthSelected",{n:y,defaultValue:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"}):{check:t("badge.selected","\uC120\uD0DD\uB428"),remove:t("badge.remove","\uC81C\uAC70"),minus:t("badge.exclude","\uC81C\uC678")}[D];return n.jsxs("span",{className:R,onClick:A,onKeyDown:A?L=>{L.key!=="Enter"&&L.key!==" "||(L.preventDefault(),L.currentTarget.click())}:void 0,"aria-label":i?void 0:s??K,"aria-hidden":i||void 0,role:A?"button":i?void 0:"img",tabIndex:A?0:void 0,children:[y!==void 0&&y,y===void 0&&D==="check"&&n.jsx(Hy,{}),y===void 0&&D==="remove"&&n.jsx(Vy,{}),y===void 0&&D==="minus"&&n.jsx(qy,{})]})}const{label:u,children:c,variant:d="default",fill:m="filled",minWidth:p,iconLeft:C,iconRight:b,color:x}=e,f=typeof r=="number"?"medium":r??"medium",h={small:"caption-2b",medium:"body-3b",large:"body-2b"}[f]??"body-2b",_={small:12,medium:14,large:16}[f]??14,g=we("badge",`badge--${d}`,`badge--${f}`,m!=="filled"?`badge--${m}`:"",h,l),k=x?.startsWith("--")?`var(${x})`:x,v=p!==void 0||k?{...p!==void 0?{minWidth:typeof p=="number"?`${p}px`:p}:{},...k?{"--badge-color":k}:{}}:void 0;return n.jsxs("span",{className:g,style:v,"aria-label":i?void 0:s,role:s&&!i?"img":void 0,"aria-hidden":i||void 0,children:[C&&n.jsx(tt,{icon:C,size:_,className:"badge__icon"}),u??c,b&&n.jsx(tt,{icon:b,size:_,className:"badge__icon"})]})}function Oa({columns:e=[],onClose:t,className:a="",size:r="medium"}){const{t:l}=_e.useTranslation(),s=r==="small"?40:48,[i,u]=o.useState([]),c=o.useMemo(()=>{const h=[{title:null,columns:e}];let _=e;for(const g of i){const k=_?.[g.ci]?.items?.[g.ii];if(!k||!Array.isArray(k.children)||!k.children.length)break;_=[{title:null,items:k.children}],h.push({title:k.label||null,columns:_})}return h},[e,i]),d=c[c.length-1],m=c.length-1,p=o.useCallback(()=>u(h=>h.slice(0,Math.max(0,Math.min(h.length,m)-1))),[m]),C=o.useRef(null),b=o.useRef(null),x=c.length;o.useEffect(()=>{b.current||(b.current=document.activeElement);let h=0,_=0;const g=()=>{const k=C.current?.querySelector("button:not([disabled])");if(k&&k.offsetParent){k.focus({preventScroll:!0});return}_++<20&&(h=requestAnimationFrame(g))};return h=requestAnimationFrame(g),()=>cancelAnimationFrame(h)},[x]),o.useEffect(()=>()=>{b.current?.focus?.({preventScroll:!0})},[]);const f=o.useCallback((h,_,g)=>{if(h){if(Array.isArray(h.children)&&h.children.length){u(k=>[...k.slice(0,m),{ci:_,ii:g}]);return}try{typeof h.onClick=="function"&&h.onClick()}catch{}try{h&&h.closeOnSelect&&typeof t=="function"&&t()}catch{}}},[t,m]);return n.jsxs("div",{className:`tooltip-menu tooltip-menu--${r} ${a}`,children:[(c.length>1||d.title)&&n.jsxs("div",{className:"tooltip-menu__header",children:[c.length>1?n.jsx(fe,{htmlType:"button",size:s,type:"dot",icon:"chevron-left",ariaLabel:l("common.back","\uB4A4\uB85C"),onClick:p,variant:"transparent-gray",useBorder:!1}):null,n.jsx("div",{className:"tooltip-menu__title button-1",children:d.title})]}),n.jsx("div",{className:"tooltip-menu__columns",ref:C,children:d.columns&&d.columns.map((h,_)=>n.jsxs("div",{className:"tooltip-menu__column",children:[h.title?n.jsx("div",{className:"tooltip-menu__column-title body-3",children:h.title}):null,n.jsx("div",{className:"tooltip-menu__items",children:(h.items||[]).map((g,k)=>n.jsxs(o.Fragment,{children:[g.separatorBefore&&k>0&&n.jsx("div",{className:"tooltip-menu__separator",role:"separator"}),n.jsx(fe,{htmlType:"button",className:"tooltip-menu__item",size:s,type:g.label?"bar":"dot",icon:g.selected?"check":g.icon||"none",rightIcon:Array.isArray(g.children)&&g.children.length?"chevron-right":g.badgeCount?n.jsx(Lt,{type:"dot",position:"inline",number:Math.min(g.badgeCount,99),size:24,"aria-hidden":!0}):void 0,label:g.label,ariaLabel:g.label&&g.badgeCount&&g.badgeCount>0?l("nav.badgeLabel",{label:g.label,count:g.badgeCount,defaultValue:"{{label}}, {{count}}\uAC1C"}):g.label,onClick:()=>f(g,_,k),selected:g.selected,disabled:g.disabled,showTooltipInfo:g.tooltip||!1,useBorder:!1,align:"left"})]},k))})]},_))})]})}const Wi=".content-area";function Do(e,t="Nav"){try{const a=typeof e=="string"?document.querySelector(e):e?.current??document.querySelector(Wi);if(a){a.scrollTop=0;return}const r=document.scrollingElement??document.documentElement;r&&r.scrollHeight<=r.clientHeight&&Rt("nav-scroll-container",`[${t}] \uBCF8\uBB38\uC744 \uB9E8 \uC704\uB85C \uB418\uB3CC\uB9B4 \uD1B5\uC744 \uBABB \uCC3E\uC558\uB2E4(\uAE30\uBCF8 ${Wi}) \u2014 \uCC3D\uB3C4 \uAD6C\uB97C \uC218 \uC5C6\uC5B4 \uC544\uBB34 \uC77C\uB3C4 \uD558\uC9C0 \uC54A\uB294\uB2E4. scrollContainer \uB85C \uD1B5\uC744 \uC54C\uB824 \uC900\uB2E4.`),window.scrollTo({top:0})}catch{}}const So=52,cr=10,Hi=e=>e&&e>0?e:0;function Vi({items:e=[],activeKey:t,onChange:a,appMode:r,onAppModeChange:l,moreItems:s=[],scrollContainer:i}){const{t:u}=_e.useTranslation(),c=r==="manager"?"malgwi":"manager",d=r==="manager"?"arrow-left":"arrow-right",m=r==="manager"?u("nav.modeLabelMalgwi","\uB9D0\uADC0"):u("nav.modeLabelManager","\uB9D0\uADC0 \uB9E4\uB2C8\uC800"),p=o.useRef(null),[C,b]=o.useState(0),x=e.length;o.useEffect(()=>{const P=p.current;if(!P)return;const V=()=>{const S=typeof getComputedStyle=="function"?getComputedStyle(P):null,M=P.clientWidth-(parseFloat(S?.paddingLeft??"")||0)-(parseFloat(S?.paddingRight??"")||0),I=P.querySelector(".bottom-nav__left"),Z=I?.nextElementSibling,le=(I?.offsetWidth??0)+(I&&Z?.classList.contains("bottom-nav__divider")?Z.offsetWidth:0);b(Math.max(0,M-le))};if(V(),typeof ResizeObserver>"u")return;const W=new ResizeObserver(V);W.observe(P);const G=P.querySelector(".bottom-nav__left");return G&&W.observe(G),()=>W.disconnect()},[l]);const f=So+1,h=P=>Math.max(0,Math.floor((P+cr)/(So+cr))),_=x*(So+cr)-cr<=C,g=C<=0||s.length===0&&_?x:Math.min(x,h(C-f)),k=C>0&&g<x,v=k?g:x,B=e.slice(0,v),y=e.slice(v),w=k||s.length>0,A=o.useCallback((P,V)=>({position:"fixed",bottom:window.innerHeight-P.top+8,right:window.innerWidth-P.right,zIndex:Ia(V)}),[]),E=o.useId(),{open:D,toggle:N,close:F,style:R,triggerRef:K,menuRef:L}=Fa({computeStyle:A,onScroll:"ignore",onResize:"reposition"}),$=o.useCallback((P,V)=>V>0?u("nav.badgeLabel",{label:P,count:V,defaultValue:"{{label}}, {{count}}\uAC1C"}):P,[u]),T=o.useCallback((P,V)=>V>0?u("nav.badgeInsideLabel",{label:P,count:V,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):P,[u]),J=o.useCallback(()=>l?.(c),[l,c]),q=o.useMemo(()=>y.find(P=>!!P.key&&P.key===t)??s.find(P=>P.selected||P.key&&P.key===t),[y,t,s]),O=o.useMemo(()=>[{items:[...y.map(P=>({label:P.label,icon:P.icon,badgeCount:P.badgeCount,selected:!!P.key&&P.key===t,closeOnSelect:!0,disabled:P.state==="disabled",onClick:()=>{P.state!=="disabled"&&(P.key&&a&&(a(P.key),Do(i,"BottomNav")),F())}})),...s.map(P=>({label:P.label,icon:P.icon,badgeCount:P.badgeCount,selected:P.selected??(!!P.key&&P.key===t),closeOnSelect:!0,onClick:()=>{P.onClick?.(),F()}}))]}],[y,s,t,a,F]),Q=[...y,...s].reduce((P,V)=>P+Hi(V.badgeCount),0);return n.jsxs("nav",{className:"bottom-nav",ref:p,"aria-label":u("nav.bottomNav","\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158"),children:[l&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__left",children:n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:d,ariaLabel:m,className:"bottom-nav-item",onClick:J})}),n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"})]}),n.jsx("div",{className:"bottom-nav__items",children:B.map((P,V)=>{const W=Hi(P.badgeCount);return n.jsxs("span",{className:"bottom-nav__slot",children:[n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:P.icon,ariaLabel:$(P.label,W),selected:!!P.key&&P.key===t,disabled:P.state==="disabled",className:"bottom-nav-item",onClick:()=>{P.key&&(a?.(P.key),Do(i,"BottomNav"))}}),W>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Lt,{type:"dot",position:"top-right",number:Math.min(W,99),size:24})})]},P.key??`__slot-${V}`)})}),w&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"}),n.jsx("div",{className:"bottom-nav__right",children:n.jsxs("div",{ref:K,className:"bottom-nav__slot",children:[n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:q?.icon??"ellipsis",ariaLabel:T(q?.label??u("nav.more","\uB354\uBCF4\uAE30"),Q),selected:!!q,className:"bottom-nav-item",onClick:N,"aria-expanded":D,"aria-controls":D?E:void 0}),Q>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Lt,{type:"dot",position:"top-right",number:Math.min(Q,99),size:24})}),D&&cn.createPortal(n.jsx("div",{id:E,role:"group","aria-label":u("nav.moreMenu","\uB354\uBCF4\uAE30 \uBA54\uB274"),className:"tooltip-content",style:R,ref:L,children:n.jsx(Oa,{columns:O,onClose:F})}),document.body)]})})]})]})}function qi(e){if(typeof e!="string")return!1;let t="";for(const r of e){const l=r.charCodeAt(0);l<=32||l>=127&&l<=159||(t+=r)}if(!t)return!1;const a=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(t);return a?["http","https","mailto","tel"].includes(a[1].toLowerCase()):!0}function Ui(e,t,a){return a&&a>0?e("nav.badgeLabel",{label:t,count:a,defaultValue:"{{label}}, {{count}}\uAC1C"}):t}function Uy(e){const{t}=_e.useTranslation(),{activeKey:a,unreadCount:r,onDebug:l,onNotification:s,onSetting:i,onHelp:u,onFeedback:c,onAccount:d}=e||{},m="default";return l||s||i||u||c||d?n.jsxs("div",{className:"side-nav__footer",children:[l&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"terminal",ariaLabel:t("nav.debug","\uB514\uBC84\uADF8"),onClick:l,selected:a==="debug"}),s&&n.jsxs("span",{className:"side-nav__notification-wrap",children:[n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"bell",ariaLabel:Ui(t,t("nav.notifications","\uC54C\uB9BC"),r),onClick:s,selected:a==="notifications"}),!!r&&r>0&&n.jsx(Lt,{type:"dot",number:Math.min(r,99),size:24,"aria-hidden":!0})]}),i&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"settings",ariaLabel:t("nav.settings","\uC124\uC815"),onClick:i,selected:a==="settings"}),u&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"message-circle-question-mark",ariaLabel:t("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:u,selected:a==="help"}),c&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"bug",ariaLabel:t("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:c,selected:a==="feedback"}),d&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"user-round",ariaLabel:t("nav.account","\uACC4\uC815"),onClick:d,selected:a==="account"})]}):null}function Gi(e){const{t}=_e.useTranslation(),{item:a,itemKey:r,label:l,icon:s,active:i,onClick:u,style:c,state:d,labelStyle:m}=e||{},p=a?.key??r??"",C=a?.label??l??"",b=a?.icon??s??"",x=a?.badge??0,f=n.jsx("span",{className:"side-nav__icon-wrap",children:n.jsx(tt,{icon:b,label:typeof C=="string"?C:void 0,className:"side-nav__icon",maskClassName:"side-nav__icon-image",imgClassName:void 0,svgClassName:void 0})}),h=d==="disabled",_=`side-nav__item ${i?"active":""} ${d||""} ${h?"disabled":""} ${a?.child?"side-nav__item--child":""}`,g=o.useCallback(k=>{if(h)return;const v=k.detail>0;if(v)try{k.currentTarget.blur()}catch{}u?.(p,k.currentTarget,v)},[h,p,u]);return n.jsxs("button",{type:"button",className:_,onClick:g,"aria-label":typeof C=="string"?Ui(t,C,x):void 0,"aria-current":i?"page":void 0,style:c,"aria-disabled":h,children:[f,n.jsx("span",{className:"side-nav__label button-1 f",style:m,children:C}),x>0&&n.jsx(Lt,{type:"dot",position:"inline",number:Math.min(x,99),size:24,"aria-hidden":!0}),d==="loading"&&n.jsx("span",{className:"side-nav__spinner",role:"img","aria-label":t("loader.loading","\uBD88\uB7EC\uC624\uB294 \uC911\u2026")})]})}function Ki(e){const{t}=_e.useTranslation(),{items:a=[],activeKey:r,onChange:l,unreadCount:s,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:m,onFeedback:p,appMode:C,onAppModeChange:b,scrollContainer:x}=e||{},f=C==="manager",h=o.useCallback(()=>b?.(f?"malgwi":"manager"),[b,f]),_=o.useRef(null),[g,k]=o.useState(null);o.useEffect(()=>{const A=_.current;if(!A)return;let E=null;const D=()=>{const{scrollHeight:R,clientHeight:K,scrollTop:L}=A;if(R<=K+1){k(O=>O===null?O:null);return}const $=Math.max(24,K/R*K),T=K-$,J=R-K,q={top:Math.round(L/J*T),height:Math.round($)};k(O=>O&&O.top===q.top&&O.height===q.height?O:q)},N=()=>{if(typeof requestAnimationFrame>"u"){D();return}E===null&&(E=requestAnimationFrame(()=>{E=null,D()}))};D(),A.addEventListener("scroll",N,{passive:!0});const F=typeof ResizeObserver<"u"?new ResizeObserver(N):null;F?.observe(A);for(const R of Array.from(A.children))F?.observe(R);return()=>{E!==null&&cancelAnimationFrame(E),A.removeEventListener("scroll",N),F?.disconnect()}},[a]);const v=o.useRef(null),B=o.useCallback(A=>{const E=_.current;E&&(A.preventDefault(),v.current={y:A.clientY,top:E.scrollTop},A.currentTarget.setPointerCapture(A.pointerId))},[]),y=o.useCallback(A=>{const E=_.current,D=v.current;!E||!D||(E.scrollTop=D.top+(A.clientY-D.y)*(E.scrollHeight/E.clientHeight))},[]),w=o.useCallback(A=>{v.current=null,A.currentTarget.hasPointerCapture(A.pointerId)&&A.currentTarget.releasePointerCapture(A.pointerId)},[]);return n.jsxs("nav",{ref:_,"aria-label":t("nav.mainMenu","\uBA54\uC778 \uBA54\uB274"),className:"side-nav__menu",children:[g&&n.jsx("div",{className:"side-nav__scroll","aria-hidden":"true",children:n.jsx("div",{className:"side-nav__scroll-thumb",style:{top:g.top,height:g.height},onPointerDown:B,onPointerMove:y,onPointerUp:w,onPointerCancel:w})}),n.jsxs("div",{className:"side-nav__menu-list",children:[(a||[]).filter(A=>!A.section&&(A.key||A.label)).map((A,E)=>n.jsxs(o.Fragment,{children:[A.divider&&n.jsx("div",{className:"side-nav__separator"}),n.jsx(Gi,{item:A,active:!!A.key&&A.key===r,state:A.disabled?"disabled":void 0,onClick:(D,N,F)=>{if(A.disabled)return;if(A.href){if(qi(A.href)&&window.open(A.href,"_blank","noopener,noreferrer"),F)try{N?.blur()}catch{}return}if(l?.(A.key),Do(x,"SideNav"),!F)return;try{N?.blur()}catch{}if(typeof window<"u"&&window.matchMedia){if(!window.matchMedia("(min-width: 768px) and (max-width: 1023px)").matches)return}else return;const R=document.querySelector(".header");if(R){const K=typeof R.matches=="function";if(!(window.matchMedia("(hover: hover)").matches&&K&&R.matches(":hover"))){R.classList.add("header--force-collapsed");const L=()=>{R.classList.remove("header--force-collapsed"),R.removeEventListener("mouseenter",L)};R.addEventListener("mouseenter",L)}}}})]},A.key??`side-nav__item-${E}`)),b&&n.jsx("div",{className:"side-nav__separator side-nav__separator--short"}),b&&n.jsx(Gi,{item:{key:"__mode-switch__",label:f?t("nav.goToMalgwi","\uB9D0\uADC0\uB85C \uC774\uB3D9"):t("nav.goToManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800\uB85C \uC774\uB3D9"),icon:f?"arrow-left":"arrow-right"},onClick:h})]}),n.jsx(Uy,{activeKey:r,unreadCount:s,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:m,onFeedback:p})]})}var dr='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEar_ko" xmlns="http://www.w3.org/2000/svg" width="583.33" height="240" viewBox="0 0 583.33 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z"/></g><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',jo='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEarManager_ko" xmlns="http://www.w3.org/2000/svg" width="1035.43" height="240" viewBox="0 0 1035.43 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z"/><path d="M644.64,52.32v131.48h-58.24V52.32h58.24ZM634.45,173.81V62.32h-38.25v111.49h38.25ZM713.65,193.61h-10.19v-75.16h-28.64v72.66h-10V46.94h10v61.32h28.64v-62.28h10.19v147.63Z"/><path d="M819.46,171.6c6.6-1.35,12.08-3.11,16.44-5.29v10.19c-4.23,2.31-9.64,4.1-16.24,5.38-6.6,1.28-13.3,1.92-20.09,1.92h-57.28V51.36h10.57v122.25h46.71c6.66,0,13.29-.67,19.89-2.02ZM851.47,193.8V45.98h10.57v147.63l-10.57.19Z"/><path d="M935.66,113.64l48.44,62.28-8.27,6.34-43.06-56.13c-4.36,16.66-10.38,29.92-18.07,39.79-7.69,9.87-16.72,15.83-27.1,17.88v-10.76c8.71-2.05,16.21-8.07,22.49-18.07,6.28-10,11.05-22.97,14.32-38.92,3.27-15.95,5.03-33.86,5.29-53.73h-39.21v-10h88.61v10h-39.02c-.13,18.84-1.6,35.95-4.42,51.32ZM1015.43,193.61h-10.38v-79.39h-37.87v-10.19h37.87v-58.05h10.38v147.63Z"/></g><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',Gy='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_SpeechEar" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>';function Yi({appMode:e}){const{t}=_e.useTranslation(),a=e==="manager",r=a?jo:dr,l=Gy;return n.jsxs("div",{className:"brand-identity__root","aria-label":t("header.biArea","BI \uC601\uC5ED"),children:[n.jsx("img",{src:l,alt:t("header.biSymbol","BI \uC2EC\uBCFC"),className:"brand-identity__image brand-identity__image--symbol"}),n.jsx("img",{src:r,alt:a?t("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):t("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0"),className:"brand-identity__image brand-identity__image--logo"})]})}function Zi({activeKey:e,onChange:t,items:a,malgwiItems:r,managerItems:l,unreadCount:s,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:m,onFeedback:p,appMode:C,onAppModeChange:b,scrollContainer:x}){const{t:f}=_e.useTranslation(),h=Cn("(max-width: 767px)"),_=o.useMemo(()=>(a??[]).filter(R=>!R.section&&(R.key||R.label)).map(R=>({key:R.key,label:typeof R.label=="string"?R.label:void 0,icon:R.icon,state:R.disabled?"disabled":void 0,badgeCount:R.badge})),[a]),g=o.useCallback(R=>{const K=a?.find(L=>L.key===R);if(!K?.disabled){if(K?.href){qi(K.href)&&window.open(K.href,"_blank","noopener,noreferrer");return}t?.(R)}},[a,t]),k=o.useMemo(()=>{const R=[];return i&&R.push({key:"debug",icon:"terminal",label:f("nav.debug","\uB514\uBC84\uADF8"),onClick:i}),u&&R.push({key:"notifications",icon:"bell",label:f("nav.notifications","\uC54C\uB9BC"),badgeCount:s,onClick:u}),d&&R.push({key:"settings",icon:"settings",label:f("nav.settings","\uC124\uC815"),onClick:d}),m&&R.push({key:"help",icon:"message-circle-question-mark",label:f("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:m}),p&&R.push({key:"feedback",icon:"bug",label:f("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:p}),c&&R.push({key:"account",icon:"user-round",label:f("nav.account","\uACC4\uC815"),onClick:c}),R},[f,i,u,d,m,p,c,s]),v=o.useCallback((R,K)=>({position:"fixed",top:R.bottom+8,right:Math.max(8,window.innerWidth-R.right),zIndex:Ia(K)}),[]),B=o.useId(),{open:y,toggle:w,close:A,style:E,triggerRef:D,menuRef:N}=Fa({computeStyle:v,onScroll:"ignore",onResize:"reposition"}),F=o.useMemo(()=>[{items:k.map(R=>({label:R.label,icon:R.icon,badgeCount:R.badgeCount,selected:R.selected??(!!R.key&&R.key===e),closeOnSelect:!0,onClick:()=>{R.onClick?.(),A()}}))}],[k,e,A]);return n.jsxs("aside",{className:`header${C==="manager"?" header--manager":""}`,children:[n.jsxs("div",{className:"header__bi",children:[n.jsx(Yi,{appMode:C}),n.jsxs("div",{className:"header__menu-button",ref:D,children:[n.jsx(fe,{htmlType:"button",size:48,type:"dot",shape:"pill",variant:"default",useBorder:!1,icon:"menu",ariaLabel:u&&s&&s>0?f("nav.badgeInsideLabel",{label:f("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),count:s,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):f("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),onClick:w,"aria-expanded":y,"aria-controls":y?B:void 0}),!!u&&!!s&&s>0&&n.jsx(Lt,{type:"dot",number:Math.min(s,99),size:24,"aria-hidden":!0}),y&&cn.createPortal(n.jsx("div",{id:B,role:"group","aria-label":f("header.utilMenu","\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274"),className:"tooltip-content",style:E,ref:N,children:n.jsx(Oa,{columns:F,onClose:A})}),document.body)]})]}),n.jsx(Ki,{scrollContainer:x,items:a,activeKey:e??void 0,onChange:t,unreadCount:s,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:m,onFeedback:p,appMode:C,onAppModeChange:b}),h&&n.jsx(Vi,{items:_,activeKey:e??void 0,onChange:g,scrollContainer:x,appMode:C,onAppModeChange:b})]})}const Ky=Zi,Yy=()=>Vt.t("passCard.planSuffix","\uC774\uC6A9\uAD8C");function Xi(e){if(!(e==null||e==="")){if(typeof e=="string"&&/^\s*\d[\d,]*\s*$/.test(e)){const t=Number(e.replace(/[,\s]/g,""));if(Number.isFinite(t))return ia(`${t.toLocaleString("ko-KR")}\uC6D0`)}return ia(typeof e=="number"?`${e.toLocaleString("ko-KR")}\uC6D0`:e)}}function Zy(e){const t=`${e.code??""} ${e.name??""}`.toLowerCase();return/manager|매니저/.test(t)?"manager":"speechear"}function Xy(e){if(e.durationDays&&e.durationDays>0){const s=e.durationDays;return s%365===0?`${s/365}\uB144`:`${s}\uC77C`}const t=(e.code??"").match(/(\d+)(d|y)\b/i);if(t)return t[2].toLowerCase()==="y"?`${t[1]}\uB144`:`${t[1]}\uC77C`;const a=e.name??"",r=a.match(/(\d+\s*(?:년|개월|주|일))\s*(?:이용권)?\s*$/);if(r)return r[1].replace(/\s+/g,"");const l=a.match(/(\d+)\s*-?\s*(day|year)s?\b/i);return l?l[2].toLowerCase()==="year"?`${l[1]}\uB144`:`${l[1]}\uC77C`:a||Yy()}function Jy(e){const t=(e??"").match(/(\d+)(d|y)\b/i);if(!t)return null;const a=Number(t[1]);return t[2].toLowerCase()==="y"?a*365:a}function Ji(e){return{type:e.type??Zy(e),plan:Xy(e),label:e.label,price:Xi(e.price),originalPrice:Xi(e.originalPrice),discountLabel:e.discountLabel}}var Qy='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEar_ko_mono" xmlns="http://www.w3.org/2000/svg" width="583.33" height="240" viewBox="0 0 583.33 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z" fill="%23fff"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z" fill="%23fff"/></g><g id="symbol"><g opacity=".5"><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23fff"/></g><path d="M140,30h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84-3.88-7.1-6.08-15.25-6.08-23.92v-80c0-16.57,13.43-30,30-30h80c8.66,0,16.81,2.21,23.92,6.08-8.48-15.54-24.97-26.08-43.92-26.08Z" fill="%23fff"/><path d="M183.92,56.08c3.88,7.1,6.08,15.25,6.08,23.92v80c0,16.57-13.43,30-30,30h-80c-8.66,0-16.81-2.21-23.92-6.08,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%23fff"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',e2='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEarManager_ko_mono" xmlns="http://www.w3.org/2000/svg" width="1035.43" height="240" viewBox="0 0 1035.43 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z" fill="%23fff"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z" fill="%23fff"/><path d="M644.64,52.32v131.48h-58.24V52.32h58.24ZM634.45,173.81V62.32h-38.25v111.49h38.25ZM713.65,193.61h-10.19v-75.16h-28.64v72.66h-10V46.94h10v61.32h28.64v-62.28h10.19v147.63Z" fill="%23fff"/><path d="M819.46,171.6c6.6-1.35,12.08-3.11,16.44-5.29v10.19c-4.23,2.31-9.64,4.1-16.24,5.38-6.6,1.28-13.3,1.92-20.09,1.92h-57.28V51.36h10.57v122.25h46.71c6.66,0,13.29-.67,19.89-2.02ZM851.47,193.8V45.98h10.57v147.63l-10.57.19Z" fill="%23fff"/><path d="M935.66,113.64l48.44,62.28-8.27,6.34-43.06-56.13c-4.36,16.66-10.38,29.92-18.07,39.79-7.69,9.87-16.72,15.83-27.1,17.88v-10.76c8.71-2.05,16.21-8.07,22.49-18.07,6.28-10,11.05-22.97,14.32-38.92,3.27-15.95,5.03-33.86,5.29-53.73h-39.21v-10h88.61v10h-39.02c-.13,18.84-1.6,35.95-4.42,51.32ZM1015.43,193.61h-10.38v-79.39h-37.87v-10.19h37.87v-58.05h10.38v147.63Z" fill="%23fff"/></g><g id="symbol"><g opacity=".5"><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23fff"/></g><path d="M140,30h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84-3.88-7.1-6.08-15.25-6.08-23.92v-80c0-16.57,13.43-30,30-30h80c8.66,0,16.81,2.21,23.92,6.08-8.48-15.54-24.97-26.08-43.92-26.08Z" fill="%23fff"/><path d="M183.92,56.08c3.88,7.1,6.08,15.25,6.08,23.92v80c0,16.57-13.43,30-30,30h-80c-8.66,0-16.81-2.21-23.92-6.08,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%23fff"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',Qi='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_IHAB_mono" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="%23fff"/></svg>';const Zn={text:"--pass-card-text",sub:"--pass-card-sub",copyright:"--pass-card-copyright"},To=new WeakMap;function t2(e){if(e)return To.get(e)}function jn(e,t){e&&(e.style.setProperty(Zn.text,t.text),e.style.setProperty(Zn.sub,t.sub),t.copyrightColor&&e.style.setProperty(Zn.copyright,t.copyrightColor),To.set(e,t))}function Tn(e){e&&(e.style.removeProperty(Zn.text),e.style.removeProperty(Zn.sub),e.style.removeProperty(Zn.copyright),To.delete(e))}const eu={text:"var(--color-pureBlack)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function tu(e={}){const t=Mt(eu,jn,Tn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-two-circle","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-two-circle__c1"}),n.jsx("div",{className:"pass-card-bg-two-circle__c3"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-two-circle__symbol",style:{"--symbol-url":`url("${Qi}")`}})]})}const nu="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71Z",pa=240;var za='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_IHAB" xmlns="http://www.w3.org/2000/svg" width="240" height="240" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 240 240"><defs><linearGradient id="linear-gradient" x1="62.99" y1="62.99" x2="190.71" y2="190.71" gradientUnits="userSpaceOnUse"><stop offset=".2" stop-color="%23499cdf"/><stop offset=".8" stop-color="%234dcdc0"/></linearGradient></defs><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="url(%23linear-gradient)"/></svg>';const n2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"},a2=100,r2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function au(e={}){const t=Mt(n2,jn,Tn),a="var(--color-main)",r=270,l=170;return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-sound-move","aria-hidden":"true",children:[n.jsx("svg",{className:"pass-card-bg-sound-move__svg",viewBox:"0 0 300 189",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:r2.map(({scale:s,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${l}) scale(${s*a2/pa}) translate(${-pa/2} ${-pa/2})`,opacity:i,children:n.jsx("path",{d:nu,fill:"none",stroke:a,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})},u))}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-move__symbol",style:{"--symbol-url":`url("${za}")`}})]})}const o2={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",logoColor:"_mono",copyrightColor:"#ffffff"},s2=100,l2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function i2(e={}){const t=Mt(o2,jn,Tn),a="#ffffff",r=270,l=170;return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-sound-move-v1","aria-hidden":"true",children:[n.jsx("svg",{className:"pass-card-bg-sound-move-v1__svg",viewBox:"0 0 300 189",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:l2.map(({scale:s,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${l}) scale(${s*s2/pa}) translate(${-pa/2} ${-pa/2})`,opacity:i,children:n.jsx("path",{d:nu,fill:"none",stroke:a,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})},u))}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-move-v1__symbol",style:{"--symbol-url":`url("${Qi}")`}})]})}const u2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function c2(e={}){const t=Mt(u2,jn,Tn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-talk","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-talk__shape pass-card-bg-talk__shape--left"}),n.jsx("div",{className:"pass-card-bg-talk__shape pass-card-bg-talk__shape--right"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-talk__symbol",style:{"--symbol-url":`url("${za}")`}})]})}const d2={Logo_SpeechEar_ko:{"":dr,_mono:Qy},Logo_SpeechEarManager_ko:{"":jo,_mono:e2}};function p2(e,t){if(e)return d2[e]?.[t??""]??void 0}const m2={speechear:dr,manager:jo},h2={speechear:"Logo_SpeechEar_ko",manager:"Logo_SpeechEarManager_ko"},ru=10;function C2(e){return e<=0?0:e>=86400?Math.floor(e/86400)*86400:e>=3600?Math.floor(e/3600)*3600:e>=60?Math.floor(e/60)*60:Math.floor(e)}function ou(e,t){if(e<=0)return t("passCard.remainingSecond",{n:0});const a=Math.floor(e/86400);if(a>0)return t("passCard.remainingDay",{n:a});const r=Math.floor(e/3600);if(r>0)return t("passCard.remainingHour",{n:r});const l=Math.floor(e/60);return l>0?t("passCard.remainingMinute",{n:l}):t("passCard.remainingSecond",{n:Math.floor(e)})}function f2(e,t,a){if(e==="manager"){const r=/년/.test(t)||/yr|year/i.test(t)||/1년|365/.test(t),l=a==="\uC624\uD508\uD2B9\uAC00"||a===Vt.t("passCard.specialLabel");return r?n.jsx(c2,{}):l?n.jsx(i2,{}):n.jsx(au,{})}return n.jsx(tu,{})}function su({ariaLabel:e,product:t,showPrice:a=!1,plan:r,type:l,endDate:s,remainingSeconds:i,endInclusive:u=!1,state:c="active",bg:d,bgOnly:m=!1,textColor:p,subColor:C,copyrightColor:b,logoSrc:x,label:f,price:h,originalPrice:_,discountLabel:g,onUse:k,onRefund:v,onDelete:B}){const{t:y}=_e.useTranslation(),w=t?Ji(t):void 0,A=l??w?.type??"speechear",E=r??w?.plan??y("passCard.planSuffix","\uC774\uC6A9\uAD8C"),D=f??w?.label,N=h??(a?w?.price:void 0),F=_??(a?w?.originalPrice:void 0),R=g??w?.discountLabel,K=o.useMemo(()=>{if(N)return null;const H=t?.durationDays??Jy(t?.code);if(!H||H<=0)return i!=null?{percent:null,remainingLabel:ou(i,y)}:null;const U=H*86400;let pe;if(i!=null)pe=i;else if((c==="active"||c==="expired")&&s){const me=new Date(s).getTime();if(Number.isNaN(me))return null;const ie=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(s)),be=/^(\d{4})-(\d{2})-(\d{2})/.exec(La()),he=Math.round(ie&&be?(Date.UTC(+ie[1],+ie[2]-1,+ie[3])-Date.UTC(+be[1],+be[2]-1,+be[3]))/864e5:(me-Date.now())/864e5);pe=Math.max(0,u?he+1:he)*86400}else c==="expired"?pe=0:pe=U;const Ee=C2(pe),ge=Math.max(0,Math.min(100,Math.floor(Math.min(Ee,U)/U*100)));return c==="pending"&&ge>=100?null:{percent:ge,remainingLabel:c==="expired"?y("passCard.expired","\uB9CC\uB8CC\uB428"):ou(pe,y)}},[N,c,s,i,u,t?.durationDays,t?.code,y]),L=o.useRef(null),[$,T]=o.useState({}),[J,q]=o.useState(null),O=!!(k||v||B),Q=o.useRef(!1),P=o.useRef(void 0),[V,W]=o.useState(x);o.useLayoutEffect(()=>{W(x)},[x]),o.useLayoutEffect(()=>{const H=L.current;H&&(p!==void 0&&H.style.setProperty("--pass-card-text",p),C!==void 0&&H.style.setProperty("--pass-card-sub",C),b!==void 0&&H.style.setProperty("--pass-card-copyright",b))},[p,C,b]),o.useLayoutEffect(()=>{const H=L.current;if(!H)return;const U=t2(H);if(!x){const pe=h2[A],Ee=c==="expired"?"_mono":U?.logoColor??"",ge=p2(pe,Ee);W(ge)}},[d,x,A,c]);const G=H=>{const U=L.current;if(!U)return null;const{left:pe,top:Ee,width:ge,height:me}=U.getBoundingClientRect(),ie=(H.clientX-pe)/ge-.5;return{rotateX:-((H.clientY-Ee)/me-.5)*ru,rotateY:ie*ru}},S=(H,U)=>{const pe=U*-.7,Ee=H*.7+10,ge=20+(Math.abs(H)+Math.abs(U))*.4;return`${pe}px ${Ee}px ${ge}px rgba(0, 0, 0, 0.18)`},M=o.useCallback(H=>{if(da())return;Q.current=!0,clearTimeout(P.current),P.current=setTimeout(()=>{Q.current=!1},200);const U=G(H);U&&T({transform:`perspective(800px) rotateX(${U.rotateX}deg) rotateY(${U.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:S(U.rotateX,U.rotateY),transition:"transform 0.25s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.25s cubic-bezier(0.23, 1, 0.32, 1)"})},[]),I=o.useCallback(H=>{if(da())return;const U=G(H);if(!U)return;const pe=Q.current?"transform 0.2s ease, box-shadow 0.2s ease":"none";T({transform:`perspective(800px) rotateX(${U.rotateX}deg) rotateY(${U.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:S(U.rotateX,U.rotateY),transition:pe})},[]),Z=o.useCallback(()=>{clearTimeout(P.current),Q.current=!1,T({transform:"perspective(800px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)",boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.08)",transition:"transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1)"})},[]),le=o.useCallback(()=>q(null),[]),oe=o.useMemo(()=>{const H=y("passCard.planSuffix","\uC774\uC6A9\uAD8C"),U=E.replace("\uC774\uC6A9\uAD8C","").replace(H==="\uC774\uC6A9\uAD8C"?"":H,"").trim(),pe=U.match(/^(.*?)(일|년)$/);return pe?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"h0 pass-card__plan-number",children:pe[1]}),n.jsx("span",{className:"h5b pass-card__plan-unit",children:pe[2]==="\uB144"?y("passCard.unitYear","\uB144"):y("passCard.unitDay","\uC77C")})]}):n.jsx("span",{className:"h0",children:U})},[E,y]),de=o.useMemo(()=>{const H=ia(N);if(!H)return null;const U=H.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!U)return n.jsx("span",{className:"h1",children:H});const[,pe,Ee,ge]=U;return n.jsxs(n.Fragment,{children:[pe&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:pe}),n.jsx("span",{className:"h1 pass-card__price-amount",children:Ee}),ge.trim()&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:ge.trim()})]})},[N]),re=o.useCallback(()=>{O&&q(H=>{if(H)return null;const U=L.current?.getBoundingClientRect();if(!U)return null;const pe=50;return{left:U.left,right:U.right,width:U.width,height:U.height,x:U.x,y:U.y+pe,top:U.top+pe,bottom:U.bottom+pe}})},[O]),z=o.useCallback(H=>{O&&(H.key==="Enter"||H.key===" ")&&(H.preventDefault(),re())},[O,re]),ne=[{items:[...k?[{label:y("passCard.menu.use","\uC0AC\uC6A9\uD558\uAE30"),icon:"play",onClick:()=>{k(),q(null)},closeOnSelect:!0}]:[],...v?[{label:y("passCard.menu.refund","\uD658\uBD88\uD558\uAE30"),icon:"rotate-ccw",onClick:()=>{v(),q(null)},closeOnSelect:!0}]:[],...B?[{label:y("passCard.menu.delete","\uC0AD\uC81C\uD558\uAE30"),icon:"trash-2",onClick:()=>{B(),q(null)},closeOnSelect:!0}]:[]]}];return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card-frame",children:n.jsxs("div",{ref:L,className:`pass-card pass-card--${c}${O?" pass-card--clickable":""}`,style:$,onMouseEnter:M,onMouseMove:I,onMouseLeave:Z,onPointerUp:H=>{H.pointerType==="touch"&&Z()},onPointerCancel:H=>{H.pointerType==="touch"&&Z()},onClick:re,onKeyDown:O?z:void 0,role:O?"button":void 0,tabIndex:O?0:void 0,"aria-label":e,"aria-haspopup":O?"menu":void 0,"aria-expanded":O?!!J:void 0,children:[d??f2(A,E,D),!m&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card__top",children:n.jsxs("div",{className:"pass-card__top-left",children:[n.jsx("img",{src:V??m2[A],className:"pass-card__logo",alt:A==="manager"?y("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):y("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0")}),n.jsxs("div",{className:"pass-card__plan",children:[n.jsx("div",{children:oe}),n.jsx("span",{className:"h5b pass-card__plan-suffix",children:D?y("passCard.labeledPlan",{label:D}):y("passCard.planSuffix","\uC774\uC6A9\uAD8C")})]})]})}),N?n.jsxs("div",{className:"pass-card__price-area",children:[R&&n.jsx("span",{className:"pass-card__discount body-3",children:R}),n.jsxs("div",{className:"pass-card__price",children:[F&&n.jsx("span",{className:"pass-card__price-original body-3",children:ia(F)}),de]})]}):K?n.jsxs("div",{className:"pass-card__usage",children:[n.jsx("span",{className:"h5b pass-card__usage-remaining",children:K.remainingLabel}),K.percent!=null&&n.jsxs("span",{className:"pass-card__usage-percent",children:[n.jsx("span",{className:"h1 pass-card__usage-value",children:K.percent}),n.jsx("span",{className:"h5b pass-card__usage-symbol",children:"%"})]})]}):n.jsx("div",{className:"pass-card__copyright caption-2","aria-hidden":"true",children:"\xA9 IHAB Corp. All rights reserved."})]})]})}),J&&n.jsx(vn,{anchorRect:J,onClose:le,ariaLabel:y("tooltip.menu","\uBA54\uB274"),children:n.jsx(Oa,{columns:ne,onClose:le,size:"small"})})]})}const g2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function b2(e={}){const t=`passcard-sound-line-grad-${o.useId()}`,a=Mt(g2,jn,Tn);return n.jsxs("div",{ref:a,className:"pass-card-bg pass-card-bg-sound-line","aria-hidden":"true",children:[n.jsxs("svg",{className:"pass-card-bg-sound-line__svg",viewBox:"0 0 500 300",preserveAspectRatio:"xMidYMid slice",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("defs",{children:n.jsxs("linearGradient",{id:t,x1:"0",y1:"0",x2:"1",y2:"0",children:[n.jsx("stop",{offset:"20%",stopColor:"var(--color-main)"}),n.jsx("stop",{offset:"80%",stopColor:"var(--color-sub)"})]})}),n.jsx("g",{transform:"translate(25, 45)",children:n.jsx("path",{d:"M -30 150 C 40 80, 100 220, 160 150 S 280 80, 340 150 S 460 220, 510 150",fill:"none",stroke:`url(#${t})`,strokeWidth:"50",strokeLinecap:"round"})})]}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-line__symbol",style:{"--symbol-url":`url("${za}")`}})]})}const y2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function v2(e={}){const t=Mt(y2,jn,Tn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-talk-v1","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-talk-v1__shape pass-card-bg-talk-v1__shape--left"}),n.jsx("div",{className:"pass-card-bg-talk-v1__shape pass-card-bg-talk-v1__shape--right"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-talk-v1__symbol",style:{"--symbol-url":`url("${za}")`}})]})}function x2(e,t){if(e){if(t==="manager_pro")return n.jsx(v2,{});if(t==="manager_standard")return n.jsx(b2,{});if(t==="manager_lite")return n.jsx(au,{})}}function _2(e){const t=ia(e);if(!t)return null;const a=t.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!a)return t;const[,r,l,s]=a;return n.jsxs(n.Fragment,{children:[r&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:r}),l,s.trim()&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:s.trim()})]})}function w2(e){const{t}=_e.useTranslation(),a=t("payment.plan.tierFallback",{defaultValue:"\uC774\uC6A9\uAD8C"}),r=t("payment.plan.openPromo",{defaultValue:"\uC624\uD508 \uD2B9\uAC00"}),{plan:l,onSelect:s,period:i="monthly",ownedCodes:u}=e||{},c=v=>!!v&&!!u?.includes(v),d=v=>v.onceOnly??/오픈\s*특가/.test(v.label??""),m=(l.tiers||[]).some(v=>d(v)&&c(v.code)),p=v=>{const B=v.prices?v.prices[i]:v.price;return B?(l.tiers||[]).some(y=>!!y.badge&&y.originals?.[i]===B):!1},C=l.colorToken?`var(--color-${l.colorToken})`:"var(--color-gray)",b=t("payment.plan.freePrice","\uBB34\uB8CC"),x=t("payment.products.mgrEnterprise.tier.price","\uBB38\uC758"),f=v=>v.prices?v.prices[i]:v.price,h=(l.tiers||[]).length>0&&(l.tiers||[]).every(v=>{const B=f(v);return B==="\uBB34\uB8CC"||B===b||B==="0\uC6D0"||typeof B=="string"&&/\d/.test(B)&&!/[1-9]/.test(B)}),_=(l.tiers||[]).length>0&&(l.tiers||[]).every(v=>{const B=f(v);return B==="\uBB38\uC758"||B===x}),g=l.group==="org",k=g?"manager":"speechear";return n.jsxs("div",{className:"payment-plan__card",style:{borderColor:C,"--plan-color":C},children:[l.cardBadge&&n.jsx("div",{className:"payment-plan__card-badge",children:n.jsx(Lt,{label:l.cardBadge,variant:"main",size:"medium",fill:"soft"})}),n.jsxs("div",{className:"payment-plan__title",children:[n.jsx("p",{className:"payment-plan__quote body-3b",style:{color:C},children:l.quote||"\xA0"}),n.jsx("h3",{className:"payment-plan__title-heading h1",children:l.tier??l.title}),n.jsx("p",{className:"payment-plan__subtitle body-3",children:l.subtitle})]}),n.jsxs("div",{className:"payment-plan__box",children:[n.jsx("span",{className:"payment-plan__box-title body-3b",children:t("payment.plan.recommendedFor","\uC774\uB7F0 \uBD84\uAED8 \uCD94\uCC9C\uD569\uB2C8\uB2E4.")}),n.jsx("ul",{className:"payment-plan__feature-list",children:(l.recommendedFor||[]).map((v,B)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(tt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:C}}),v]},B))})]}),n.jsxs("div",{className:"payment-plan__box",children:[n.jsx("span",{className:"payment-plan__box-title body-3b",children:t("payment.plan.features","\uD575\uC2EC \uAE30\uB2A5")}),n.jsx("ul",{className:"payment-plan__feature-list",children:(l.features||[]).map((v,B)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(tt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:C}}),v]},B))})]}),n.jsx("div",{className:"payment-plan__card-pricing",children:h?null:_?n.jsx(fe,{htmlType:"button",className:"payment-plan__contact-button",label:t("payment.plan.contact",{defaultValue:"\uBB38\uC758\uD558\uAE30"}),variant:"main",size:56,onClick:()=>l.tiers?.[0]&&s?.({...l.tiers[0],productId:l.id,productTitle:l.title})}):n.jsx(n.Fragment,{children:n.jsx("div",{className:"payment-plan__pricing-list",children:(l.tiers||[]).map(v=>{const B=v.label||a,y=d(v),w=y||v.openPromo===!0,A=B.replace(/^오픈\s*특가\s*/,"")||a,E=v.prices?v.prices[i]:v.price,D=v.badge?w?`${r}
|
|
822
|
+
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"},yb={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},vb={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"},xb={clearAriaLabel:"Clear input"},_b={ariaLabel:"Select tab"},wb={ariaLabel:"Tabs"},Bb={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},kb={ariaLabel:"User avatar"},Ab={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"}},Nb={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"},Eb={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"}},Db={steps:"Step {{current}} of {{total}}"},Sb={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"},jb={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},Tb={viewWords:"Words"},Mb={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},Lb={chooseDate:"Choose a date",selectYear:"Select year",selectMonth:"Select month"},$b={previewRegion:"Report preview \u2014 scrollable sideways"},Rb={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},Pb={place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},Ib={clearSelection:"Clear selection"},Fb={showResult:"Show {{type}} result"},Ob={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},zb={loading:"Loading"},Wb={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},Hb={ariaLabel:"Breadcrumb"},Vb={empty:"No items yet."},qb={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"},Ub={common:qg,calendar:Ug,passCard:Gg,rating:Kg,colorPicker:Yg,dropdown:Zg,accordion:Xg,header:Jg,nav:Qg,settings:eb,usage:tb,account:nb,training:ab,customers:rb,payment:ob,coupons:sb,visits:lb,trainingType:ib,myWordTable:ub,keyWords:cb,wordTable:db,wordSearch:pb,wordPrint:mb,topic:hb,device:Cb,manager:fb,wordPairs:gb,footer:bb,date:yb,wordData:vb,textField:xb,segmentedControl:_b,tabs:wb,fileUpload:Bb,avatar:kb,myHomework:Ab,trainingStatus:Nb,store:Eb,progress:Db,trainingMiss:Sb,table:jb,wordScore:Tb,topBanner:Mb,datePicker:Lb,report:$b,tooltip:Rb,phonemeProfile:Pb,bulkBar:Ib,debug:Fb,badge:Ob,loader:zb,soundCompass:Wb,breadcrumb:Hb,board:Vb,promoBannerBg:qb};const Gb="0.369.0",Kb=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],mo="ko",Yb="ihab_display_language";function Gl(){if(typeof window>"u")return mo;try{const e=localStorage.getItem(Yb);if(e&&Kb.some(t=>t.code===e))return e}catch{}return mo}function Kl(e){try{document.documentElement.lang=e}catch{}}Vt.on("languageChanged",Kl),Kl(Gl()),Vt.use(_e.initReactI18next).init({resources:{ko:{translation:Vg},en:{translation:Ub}},lng:Gl(),fallbackLng:mo,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const Zb=new Map;try{Vt.store?.on?.("added",()=>Zb.clear())}catch{}let or=null,Yl=null,Zl=null;function Xb(){const e=Rl();if(e&&e.entries.length>0){const t=uf();if(or&&Yl===e&&Zl===t)return or;const a=new Set,r=[];for(const l of e.entries)!l.word||a.has(l.word)||(a.add(l.word),r.push({w:l.word,s:l.syllables,p:t?.[l.word]?[...t[l.word].cho??[],...t[l.word].jung??[],...t[l.word].jong??[]]:[],pron:l.pronunciation||l.word,grade:l.grade}));return or=r,Yl=e,Zl=t,or}return[]}new Proxy([],{get(e,t){const a=Xb(),r=a[t];return typeof r=="function"?r.bind(a):r}});function Jb(e){if(e.includes("\\")&&e.includes("("))return!0;if(!/url\s*\(/i.test(e))return!1;const t=e.replace(/url\(\s*(['"]?)#[^)'"]*\1\s*\)/gi,"");return/url\s*\(/i.test(t)}function Qb(e){if(typeof window>"u")return"";const t=(a,r)=>{typeof r.attrValue=="string"&&Jb(r.attrValue)&&(r.keepAttr=!1)};oa.addHook("uponSanitizeAttribute",t);try{return oa.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use","style"],FORBID_ATTR:["xlink:href","href"]})}finally{oa.removeHook("uponSanitizeAttribute",t)}}function ey(e){const[t,a]=o.useState(null),[r,l]=o.useState(null),[s,i]=o.useState(null),[u,c]=o.useState(null),[d,m]=o.useState(null);return o.useEffect(()=>{if(!e||typeof e!="string"||!e.endsWith(".svg")){a(null),l(null),i(null),c(null);return}const p=e.split("/").pop();let C=e;p&&(e.startsWith("/")?C=Xr(e):/^(Logo|Symbol)/i.test(p)?C=Xr(`logo/${p}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),C=e)),i(null),c(null),a(e),l(C)},[e]),o.useEffect(()=>{if(!r)return;let p=!1;async function C(){try{let b=await fetch(r);b.ok||(b=await fetch(r));const x=b.headers.get("content-type")||"";if(p)return;if(x.includes("svg")){i("mask");return}if(x.startsWith("image/")){i("img");return}const f=await fetch(r);if(!f.ok)throw new Error("not ok");const h=await f.text();if(p)return;if(/^\s*<svg[\s>]/i.test(h)){const _=Qb(h);if(!_){i("none");return}c(_),i("inline");return}i("none")}catch{p||i("none")}}return C(),()=>{p=!0}},[r]),o.useEffect(()=>{let p=!1,C=null;return s==="mask"&&r&&fetch(r).then(b=>{if(!b.ok)throw new Error("fetch failed");return b.blob()}).then(b=>{p||(C=URL.createObjectURL(b),m(C))}).catch(()=>{p||i("img")}),()=>{p=!0,C&&URL.revokeObjectURL(C),m(null)}},[s,r]),t===e?{iconToUse:r,mode:s,svgText:u,blobUrl:d}:{iconToUse:null,mode:null,svgText:null,blobUrl:null}}function tt(e){const{icon:t,label:a,className:r,imgClassName:l,maskClassName:s,svgClassName:i,wrapperStyle:u,size:c}=e||{},d=r??"iconRenderer-icon",m=l??"iconRenderer-icon-image",p=s??"iconRenderer-icon-mask",C=i??"iconRenderer-icon-svg",b=typeof t=="string"?t:null,x=H1(b),{iconToUse:f,mode:h,svgText:_,blobUrl:g}=ey(b),k=(A,E={})=>n.jsx("span",{className:d,style:u,...E,children:A}),v=typeof c=="number"?{width:c,height:c,objectFit:"contain"}:null,B=(A,E={})=>n.jsx("img",{src:A,alt:typeof a=="string"?a:typeof a=="number"?String(a):"",className:m,...E,style:v?{...E.style,...v}:E.style});if(!t)return null;if(typeof t!="string")return k(t);if(t==="none")return k(n.jsx("span",{className:C,dangerouslySetInnerHTML:{__html:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true"></svg>'}}),{"aria-hidden":"true"});if(x)try{return k(o.createElement(x,{className:C,size:typeof c=="number"?c:20}),{"aria-hidden":"true"})}catch{}if(f&&f.endsWith(".svg")){if(h==="mask"){const A={"--icon-url":g?`url(${g})`:`url(${f})`,...typeof c=="number"?{"--icon-size":`${c}px`}:null};return k(n.jsx("span",{className:p,style:A}),{"aria-hidden":"true"})}return h==="img"?k(B(f,{onError:A=>{A.currentTarget.onerror=null,A.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):h==="inline"?k(n.jsx("span",{className:C,dangerouslySetInnerHTML:_?{__html:_}:void 0}),{"aria-hidden":"true"}):k(null,{"aria-hidden":"true"})}if(t.startsWith("/")||t.includes("/assets/")||t.match(/\.(png|jpg|jpeg|webp|gif)$/i))return B(Xr(t),{style:u,onError:A=>{A.currentTarget.onerror=null,A.currentTarget.style.display="none"}});const y=typeof c=="number"?c:20,w=`<svg width="${y}" height="${y}" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect x="3" y="3" width="18" height="18" rx="2" ry="2" style="fill:none;stroke:currentColor;stroke-width:2"/></svg>`;return k(n.jsx("span",{className:C,dangerouslySetInnerHTML:{__html:w}}),{"aria-hidden":"true"})}function Xl(e){const[t,a]=o.useState(!1),r=o.useRef(!1),l=o.useRef(!0);o.useEffect(()=>(l.current=!0,()=>{l.current=!1}),[]);const s=o.useCallback(()=>{if(!e||r.current)return;const i=e();if(i&&typeof i.then=="function"){r.current=!0,a(!0);const u=()=>{r.current=!1,l.current&&a(!1)};i.then(u,u)}},[e]);return{pending:t,press:s}}function ty({icon:e,title:t,message:a,action:r,className:l}){const{pending:s,press:i}=Xl(r?.onClick);return n.jsxs("div",{className:we("empty-state",l),children:[e&&n.jsx(tt,{icon:e,size:48,className:"empty-state__icon"}),t&&n.jsx("p",{className:"empty-state__title h4",children:t}),a&&n.jsx("p",{className:"empty-state__message body-3",children:a}),r&&n.jsxs("button",{type:"button",className:"empty-state__action button button40 button40--bar button--variant-main button--align-center button--shape-rounded",onClick:i,disabled:s,"aria-busy":s||void 0,children:[r.icon&&n.jsx(tt,{icon:r.icon,className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:r.label})]})]})}function ny({message:e,hint:t,icon:a="triangle-alert",onRetry:r,retryLabel:l,className:s}){const{t:i}=_e.useTranslation(),{pending:u,press:c}=Xl(r);return n.jsxs("div",{className:we("empty-state","error-state",s),role:"alert",children:[n.jsx(tt,{icon:a,size:48,className:"empty-state__icon error-state__icon"}),n.jsx("p",{className:"empty-state__message body-3",children:e??i("common.errorState.message",{defaultValue:"\uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."})}),t&&n.jsx("p",{className:"error-state__hint caption-1",children:t}),r&&n.jsxs("button",{type:"button",className:"empty-state__action button button40 button40--bar button--variant-main button--align-center button--shape-rounded",onClick:c,disabled:u,"aria-busy":u||void 0,children:[n.jsx(tt,{icon:"rotate-cw",className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:l??i("common.errorState.retry",{defaultValue:"\uB2E4\uC2DC \uC2DC\uB3C4"})})]})]})}function ay({icon:e,title:t,description:a,cta:r,tone:l="main",disabled:s=!1,onClick:i,className:u=""}){const c=o.useId(),d=`${c}-title`,m=`${c}-desc`,p=`${c}-cta`,C=()=>{s||i?.()};return n.jsx("section",{role:"button",tabIndex:s?-1:0,"aria-disabled":s||void 0,"aria-labelledby":d,"aria-describedby":`${m} ${p}`,onClick:C,onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),C())},className:we("action-card",`action-card--${l}`,s&&"action-card--disabled",u),children:n.jsxs("div",{className:"action-card__body",children:[n.jsx("span",{"aria-hidden":!0,className:"action-card__chip",children:n.jsx(tt,{icon:e,size:34})}),n.jsxs("div",{className:"action-card__text",children:[n.jsx("h2",{id:d,className:"action-card__title",children:t}),n.jsx("p",{id:m,className:"action-card__desc",children:a})]}),n.jsxs("div",{className:"action-card__cta",children:[n.jsx("span",{id:p,children:r}),n.jsx("span",{"aria-hidden":!0,className:"action-card__arrow",children:n.jsx(tt,{icon:"arrow-right",size:18})})]})]})})}function ry({as:e="div",className:t="",children:a,storage:r,...l}){r&&SC({resolveUrl:r.resolveUrl,download:r.download??(()=>Promise.reject(new Error("[ihabdevteam-core] CoreScope: download resolver\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."))),exists:r.exists,resolvePath:r.resolvePath,noiseBaseUrl:r.noiseBaseUrl,noiseFileGain:r.noiseFileGain});const s=we("ihabdevteam-core-scope",t);return n.jsx(e,{className:s,...l,children:a})}function oy(e){if(e.closest('[aria-hidden="true"], [hidden], [inert]'))return!1;for(let t=e;t;t=t.parentElement){const a=window.getComputedStyle(t);if(a.display==="none"||a.visibility==="hidden"||a.visibility==="collapse")return!1}return!0}function ho(e,t=!0){o.useEffect(()=>{if(!t)return;const a=e.current;if(!a)return;const r=l=>{if(l.key!=="Tab")return;const s=Array.from(a.querySelectorAll(_n)).filter(oy);if(!s.length){l.preventDefault();return}const i=s[0],u=s[s.length-1],c=document.activeElement,d=c===a;l.shiftKey&&(c===i||d)?(l.preventDefault(),u.focus()):!l.shiftKey&&c===u&&(l.preventDefault(),i.focus())};return a.addEventListener("keydown",r),()=>a.removeEventListener("keydown",r)},[e,t])}const _n='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',Co=new WeakMap;function fo(e,t){e&&Co.set(e,t)}function go(e){let t=e;for(let a=0;t&&!t.isConnected&&a<10;a++){let r=t;for(;r&&!Co.has(r);)r=r.parentElement;if(!r)return t;t=Co.get(r)??null}return t}function Jl(e){return!(!e||!e.isConnected||e===document.body||typeof e.focus!="function"||e.disabled||e instanceof HTMLInputElement&&e.type==="hidden"||e.closest('[inert],[aria-hidden="true"],[hidden]'))}function sr(e,t,a){const r=e?.isConnected?e:a?.isConnected?a:null;if(Jl(t)&&!(e&&e.contains(t)))return t.focus(),t;if(!r)return null;const l=Array.from(document.querySelectorAll(_n)).filter(c=>!(e&&e.contains(c))&&Jl(c));let s=null,i=null;for(const c of l)r.compareDocumentPosition(c)&Node.DOCUMENT_POSITION_PRECEDING?s=c:i||(i=c);const u=s??i;return u?.focus(),u}function sy({title:e="",lines:t=[],notices:a=null,children:r,variant:l="default",dismissible:s=!1,className:i=""}){const{t:u}=_e.useTranslation(),[c,d]=o.useState(!1),m=o.useRef(null),p=o.useCallback(()=>{const f=m.current;f&&f.contains(document.activeElement)&&sr(f),d(!0)},[]);if(c)return null;const C=`notice-box notice-box--${l} body-2 ${i}`.trim(),b=s&&n.jsx("button",{type:"button",className:"notice-box__dismiss",onClick:p,"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"});if(a&&Array.isArray(a)&&a.length)return n.jsxs("div",{className:C,role:"note",children:[a.map((f,h)=>n.jsxs("div",{className:"notice-box__inner",children:[f.title?n.jsx("span",{className:"notice-box__title body-3",children:f.title}):null,n.jsx("div",{className:"notice-box__body",children:f.lines&&f.lines.length?n.jsx("div",{children:f.lines.map((_,g)=>n.jsx("span",{className:"notice-box__line body-3",children:_},g))}):f.children??null})]},h)),b]});const x=e||t.length?n.jsxs("div",{className:"notice-box__inner",children:[e?n.jsx("span",{className:"notice-box__title body-1",children:e}):null,n.jsx("div",{className:"notice-box__body",children:t.length?n.jsx("ul",{children:t.map((f,h)=>n.jsx("li",{className:"notice-box__line",children:f},h))}):r})]}):n.jsx("div",{className:"notice-box__inner",children:r});return n.jsxs("div",{ref:m,className:C,role:"note",children:[x,b]})}const ua=[];let lr=!1;function Ql(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const t=ua[ua.length-1];t&&(e.stopPropagation(),t())}function Gn(e){return ua.push(e),!lr&&typeof document<"u"&&(document.addEventListener("keydown",Ql),lr=!0),()=>{const t=ua.lastIndexOf(e);t>=0&&ua.splice(t,1),ua.length===0&&lr&&typeof document<"u"&&(document.removeEventListener("keydown",Ql),lr=!1)}}const ei=o.createContext(null);function ly(e){return/max-width:\s*7[0-9][0-9]px/.test(e)}const ti=e=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches;function iy(e){const t=o.useCallback(a=>{if(typeof window>"u"||!window.matchMedia)return()=>{};const r=window.matchMedia(e);return r.addEventListener?r.addEventListener("change",a):r.addListener&&r.addListener(a),()=>{r.removeEventListener?r.removeEventListener("change",a):r.removeListener&&r.removeListener(a)}},[e]);return js.useSyncExternalStore(t,()=>ti(e),()=>!1)}function uy(e){const[t,a]=o.useState(ti(e));return o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const r=window.matchMedia(e),l=i=>a(i.matches),s=r;return s.addEventListener?s.addEventListener("change",l):s.addListener&&s.addListener(l),a(r.matches),()=>{s.removeEventListener?s.removeEventListener("change",l):s.removeListener&&s.removeListener(l)}},[e]),t}const cy=typeof js.useSyncExternalStore=="function"?iy:uy;function Cn(e){const t=o.useContext(ei),a=cy(e);return t&&typeof t.mobile=="boolean"&&ly(e)?t.mobile:a}const dy="(prefers-reduced-motion: reduce)";function bo(){return Cn(dy)}function vn(e){const{anchorRect:t,anchorEl:a,offset:r=20,edgeMargin:l=20,onClose:s,closeOnOutsideClick:i=!0,className:u="",role:c="dialog",ariaLabel:d="",children:m,backdrop:p=!1,isMobilePopup:C=!1,useBorder:b=!0,header:x,focusOnOpen:f}=e||{},h=o.useRef(null),[_,g]=o.useState({position:"fixed",left:0,top:-9999}),[k,v]=o.useState(!1),[B,y]=o.useState("bottom"),[w,A]=o.useState(!1),[E,D]=o.useState(!1),N=!t&&!a,F=o.useRef(null),R=o.useCallback((P=!1,V=!1)=>{if(E&&C)return;const W=a?a.getBoundingClientRect():t,G=V&&F.current?F.current:W;if(!G||!h.current)return;const S=h.current,{offsetWidth:M,offsetHeight:I}=S,Z=window.innerWidth,le=window.innerHeight,oe=Z-G.right,de=G.left,re=G.top,z=le-G.bottom;let ne=0,H=0,U="top";if(re>=I+r)U="top",H=G.top-r-I,ne=G.left+G.width/2-M/2;else if(z>=I+r)U="bottom",H=G.bottom+r,ne=G.left+G.width/2-M/2;else if(oe>=M+r)U="right",ne=G.right+r,H=G.top+G.height/2-I/2;else if(de>=M+r)U="left",ne=G.left-r-M,H=G.top+G.height/2-I/2;else{const me=Math.max(re,z,oe,de);me===re?(U="top",H=G.top-r-I,ne=G.left+G.width/2-M/2):me===z?(U="bottom",H=G.bottom+r,ne=G.left+G.width/2-M/2):me===oe?(U="right",ne=G.right+r,H=G.top+G.height/2-I/2):(U="left",ne=G.left-r-M,H=G.top+G.height/2-I/2)}const pe=Number.isFinite(Number(l))?Number(l):8;ne=Math.min(Math.max(ne,pe),Z-M-pe),H=Math.min(Math.max(H,pe),le-I-pe);const Ee=Math.round(ne),ge=Math.round(H);P&&h.current?(h.current.style.left=`${Ee}px`,h.current.style.top=`${ge}px`,h.current.dataset.placement=U):(y(U||B),g({position:"fixed",left:Ee,top:ge}),A(!0))},[E,C,a,t,r,l,B]);o.useEffect(()=>()=>{F.current=null},[a,t]),o.useLayoutEffect(()=>{if(N)return;if(E&&C){g({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),A(!0);return}F.current===null&&(F.current=a?a.getBoundingClientRect():t??null),R(!1,!0);const P=requestAnimationFrame(()=>R(!1,!0));return()=>cancelAnimationFrame(P)},[t,a,r,m,l,N,E,C,R]),o.useEffect(()=>{if(N||E&&C||!h.current||typeof ResizeObserver>"u")return;const P=new ResizeObserver(()=>{t&&R()});return P.observe(h.current),()=>P.disconnect()},[t,m,l,N,E,C,R]),o.useEffect(()=>{if(N||E&&C)return;let P=null;const V=()=>{if(a&&(F.current=a.getBoundingClientRect()),typeof requestAnimationFrame>"u"){R(!0);return}P===null&&(P=requestAnimationFrame(()=>{P=null,R(!0)}))},W=G=>{if(!a&&s){const S=G.target;if(S&&h.current&&h.current.contains(S))return;try{if(S&&S.closest&&S.closest("[data-tooltip-ignore]"))return}catch{}J.current(!0);return}V()};return window.addEventListener("resize",V),document.addEventListener("scroll",W,{passive:!0,capture:!0}),()=>{P!==null&&cancelAnimationFrame(P),window.removeEventListener("resize",V),document.removeEventListener("scroll",W,{capture:!0})}},[t,a,s,r,m,l,N,E,C,R]),o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const P=window.matchMedia("(max-width: 768px)"),V=()=>D(!!P.matches);V();try{P.addEventListener?P.addEventListener("change",V):P.addListener(V)}catch{try{P.addListener(V)}catch{}}return()=>{try{P.removeEventListener?P.removeEventListener("change",V):P.removeListener(V)}catch{}}},[]);const K=o.useRef(!1),L=o.useRef(null),$=bo(),T=o.useCallback((P=!1)=>{if(s&&!(k||K.current)){if(K.current=!0,P){v(!0);try{s&&s()}catch{K.current=!1,v(!1)}return}v(!0),L.current=setTimeout(()=>{L.current=null;try{s&&s()}catch{K.current=!1,v(!1)}},$?0:200)}},[k,s,v,$]);o.useEffect(()=>()=>{L.current&&clearTimeout(L.current)},[]),o.useEffect(()=>{if(N)return;const P=G=>{const S=h.current;if(!S)return;const M=G.target;if(M&&!S.contains(M)){try{if(M.closest&&M.closest("[data-tooltip-ignore]"))return}catch{}i&&T(!0)}},V=G=>{const S=h.current;if(!S)return;const M=G.target;if(M&&!S.contains(M)){try{if(M.closest&&M.closest("[data-tooltip-ignore]"))return}catch{}i&&T(!0)}},W=G=>{if(G.key==="Tab"){const S=h.current;if(!S)return;const M=S.querySelectorAll(_n);if(!M||M.length===0)return;const I=M[0],Z=M[M.length-1],le=document.activeElement;G.shiftKey?le===I&&(G.preventDefault(),Z.focus()):le===Z&&(G.preventDefault(),I.focus())}};return document.addEventListener("pointerdown",P,!0),document.addEventListener("click",V,!0),document.addEventListener("keydown",W),()=>{document.removeEventListener("pointerdown",P,!0),document.removeEventListener("click",V,!0),document.removeEventListener("keydown",W)}},[s,i,T,N]);const J=o.useRef(T);o.useEffect(()=>{J.current=T});const q=!!s;o.useEffect(()=>{if(!(N||!q))return Gn(()=>J.current())},[N,q]),o.useEffect(()=>{const P=()=>{T(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",P),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",P)}},[T]);const O=o.useRef(null);o.useEffect(()=>{if(N||f===!1||!w)return;const P=h.current;if(!P)return;const V=P.querySelector(_n);if(V)return O.current=document.activeElement,V.focus({preventScroll:!0}),()=>{const W=O.current;O.current=null,W&&document.contains(W)&&W.focus({preventScroll:!0})}},[N,f,w]),o.useEffect(()=>{c==="dialog"&&!d&&Rt("tooltip-no-name",'[ihab/Tooltip] \uC774\uB984 \uC5C6\uB294 role="dialog" \uC785\uB2C8\uB2E4 \u2014 ariaLabel \uC744 \uC8FC\uC138\uC694. \uB0AD\uB3C5\uAE30\uAC00 "\uB300\uD654\uC0C1\uC790" \uB77C\uACE0\uB9CC \uC77D\uC2B5\uB2C8\uB2E4.')},[c,d]);const Q=n.jsxs("div",{ref:h,className:`tooltip-content ${N?"tooltip-content--inline":""} ${b?"tooltip-content--bordered":""} ${k?"is-closing":""} ${u} ${E&&C?"is-mobile":""}`,role:c,"aria-label":d||void 0,style:N?{}:{..._,visibility:w?"visible":"hidden"},tabIndex:-1,"data-placement":B,"data-left":N?"":_.left,"data-top":N?"":_.top,"data-anchor-left":t?Math.round(t.left):"","data-anchor-top":t?Math.round(t.top):"","data-anchor-width":t?Math.round(t.width):"","data-anchor-height":t?Math.round(t.height):"",children:[x!=null&&n.jsx("div",{className:"tooltip-content__header h5",children:x}),m]});if(N||typeof document>"u")return Q;if(p||E&&C){const P=n.jsxs("div",{className:"tooltip-portal",children:[n.jsx("div",{className:"tooltip-backdrop",onClick:()=>{i&&T(!0)}}),Q]});return cn.createPortal(P,document.body)}return cn.createPortal(Q,document.body)}function Dn(e){const{anchorRect:t,text:a,offset:r=8,onClose:l,className:s="",ariaLabel:i}=e||{};return a?n.jsx(vn,{anchorRect:t,offset:r,onClose:l,closeOnOutsideClick:!1,className:`tooltip-info ${s}`,ariaLabel:i||a,children:n.jsx("div",{className:"tooltip-info__content body-3",children:a})}):null}function Kn(e){const{t}=_e.useTranslation(),{anchorRect:a,title:r,items:l,activeIndex:s=-1,showIndex:i=!0,onClose:u,offset:c=12,closeOnOutsideClick:d=!0}=e||{},m=(Array.isArray(l)?l:l?[l]:[]).map(p=>typeof p=="string"?{text:p}:p);return!m.length&&!r?null:n.jsx(vn,{anchorRect:a,offset:c,onClose:u,closeOnOutsideClick:d,useBorder:!1,className:"tooltip-description",ariaLabel:r||t("tooltip.description","\uC124\uBA85"),children:n.jsxs("div",{className:"tooltip-description__box",children:[r&&n.jsx("span",{className:"tooltip-description__title body-2",children:r}),n.jsx("ol",{className:"tooltip-description__items",children:m.map((p,C)=>n.jsxs("li",{className:`tooltip-description__item body-3${C===s?" tooltip-description__item--active":""}`,children:[i&&m.length>1&&n.jsxs("span",{className:"tooltip-description__index button-1",children:[C+1,"."]}),p.color&&n.jsx("span",{className:"tooltip-description__dot",style:{background:p.color},"aria-hidden":"true"}),n.jsx("span",{children:p.text})]},C))})]})})}function $a(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),t}let yo=0,ni=!1;function ai(){ni||typeof document>"u"||(ni=!0,document.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(yo=Date.now())},!0),document.addEventListener("touchstart",()=>{yo=Date.now()},{capture:!0,passive:!0}))}ai();function ca(e){return!!e&&e.pointerType==="touch"}function da(e=1e3){return ai(),Date.now()-yo<e}function vo(e,t,a,{enabled:r=!0,fallbackOnParent:l=!1}={}){const s=$a(e),i=$a(t),u=o.useRef(null),c=o.useRef(0);o.useEffect(()=>{if(!r||typeof document>"u")return;const m=p=>{const C=p,b=p.target,x=a.current,f=!!(b&&x&&x.contains(b));if(C.pointerType!=="touch"){f&&(u.current=null);return}if(f){u.current=s.current;return}u.current=null,s.current&&!(b&&b.closest?.(".tooltip-content"))&&i.current(!1,x)};return document.addEventListener("pointerdown",m,!0),()=>document.removeEventListener("pointerdown",m,!0)},[r,a,s,i]);const d=o.useCallback(m=>{const p=u.current;return p===null?!1:(u.current=null,c.current=Date.now(),i.current(!p,m??a.current),!0)},[a,i]);return o.useEffect(()=>{if(!r||!l)return;const m=a.current,p=m?.parentElement;if(!m||!p)return;let C=null;const b=h=>{const _=h.changedTouches?.[0];if(!_)return!1;const g=m.getBoundingClientRect();return _.clientX>=g.left&&_.clientX<=g.right&&_.clientY>=g.top&&_.clientY<=g.bottom},x=h=>{C=b(h)?s.current:null},f=h=>{const _=C;C=null,!(_===null||Date.now()-c.current<700||!b(h))&&(u.current=null,c.current=Date.now(),i.current(!_,m))};return p.addEventListener("touchstart",x,{passive:!0}),p.addEventListener("touchend",f),()=>{p.removeEventListener("touchstart",x),p.removeEventListener("touchend",f)}},[r,l,a,s,i]),{touchPress:d}}function py(e,t){const{size:a=48,type:r,htmlType:l,href:s,target:i,rel:u,icon:c,rightIcon:d,label:m,count:p,subLabel:C,children:b,ariaLabel:x,variant:f="default",align:h="center",nowrap:_=!1,selected:g,toggleable:k=!1,ariaExpanded:v,ariaControls:B,disabled:y=!1,useLabel:w=!0,useBorder:A=!0,useBG:E=!0,useDisabledCovered:D=!1,useDisabledInvisible:N=!1,useDisabledFilled:F=!1,width:R,minWidth:K,onClick:L,onDisabledClick:$,showTooltipInfo:T=!1,tooltipInfoText:J=null,tooltipDescription:q=null,tooltipOnly:O=!1,iconSize:Q="medium",iconColor:P,shape:V="rounded",color:W,className:G,...S}=e,M=typeof a=="string"&&isNaN(Number(a))?a.toLowerCase():String(Number(a)||48),I=M.match(/^\d+$/)?`button${M}`:`button-${M}`,Z=Number(a),le=!isNaN(Z)&&Z<40?"button-2":"button-1",oe=m??b,de=y||!!S.disabled,re=de?D?"disabled-covered":N?"disabled-invisibled":F?"disabled-filled":"disabled":f,z=re?`button--variant-${re}`:"",ne=h?`button--align-${h}`:"",H=_?"button--nowrap":"",U=V?`button--shape-${V}`:"",pe=typeof P=="string"&&P.startsWith("--")?`var(${P})`:P,Ee={...R?{width:typeof R=="number"?`${R}px`:R}:{},...K?{minWidth:typeof K=="number"?`${K}px`:K}:{},...A?{}:{"--button-border":de?"0":"1px solid transparent"},...pe?{"--button-icon-color":pe}:{},...W?{"--color-main":W}:{}},ge=w===!1?"":oe,me=Array.isArray(ge)?ge.length>0:!!ge,ie=!!d,be=r??(me||c||ie?"bar":"dot"),he=`${I}--${be}`,ue=o.useRef(null);o.useEffect(()=>{!Pn||l!==void 0||ue.current?.closest("form")&&Rt(`button-in-form:${typeof oe=="string"?oe:""}`,'[ihab/Button] <form> \uC548\uC778\uB370 htmlType \uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 \uC774 \uB2E8\uCD94\uB294 type="button" \uC774\uB77C \uD3FC\uC744 \uBCF4\uB0B4\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uBCF4\uB0B4\uB294 \uB2E8\uCD94\uBA74 htmlType="submit" \uC744 \uC8FC\uC138\uC694. \uD3FC\uC5D0 \uBCF4\uB0B4\uB294 \uB2E8\uCD94\uAC00 \uD558\uB098\uB3C4 \uC5C6\uC73C\uBA74 **Enter \uB85C\uB3C4 \uC548 \uBCF4\uB0B4\uC9D1\uB2C8\uB2E4**(\uCE78\uC774 \uB458 \uC774\uC0C1\uC77C \uB54C).'+(typeof oe=="string"&&oe?` \uB2E8\uCD94: ${oe}`:""))},[l,oe]);const Me=o.useRef(t);Me.current=t;const qe=o.useCallback(Re=>{ue.current=Re;const ot=Me.current;typeof ot=="function"?ot(Re):ot&&(ot.current=Re)},[]),je=o.useRef(de),[Ve,Oe]=o.useState(!!g),[dt,rt]=o.useState(!1),[nt,pt]=o.useState(null),Ne=o.useCallback(()=>rt(!1),[]),[Ue,ke]=o.useState(!1),He=o.useId();o.useEffect(()=>{typeof g=="boolean"&&Oe(g)},[g]),o.useEffect(()=>{if(je.current&&!de&&ue.current){const Re=ue.current;let ot=!1;try{ot=Re.matches(":focus:not(:focus-visible)")}catch{ot=!1}ot&&Re.blur(),Re.style.pointerEvents="none";const Et=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ue.current&&(ue.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(Et)}je.current=de},[de]);const Be=typeof g=="boolean"?!!g:Ve,Se=typeof v=="boolean"?void 0:k||typeof g=="boolean"?Be?"true":"false":S["aria-pressed"],Le=we("button",I,he,z,ne,H,U,Be?"is-selected":null,E?null:"button--no-bg",O?"button--tooltip-only":null,G),Ze=`button__icon button__icon--${Q}`,xt=Array.isArray(C)?C:C!==void 0?[C]:[],et=()=>{if(Array.isArray(ge))return ge.map((ot,Et)=>{const Je=xt[Et];return n.jsxs("span",{className:`button__label-text${Je!==void 0?" button__label-text--has-sub":""}`,children:[ot,Je!==void 0&&n.jsx("span",{className:"button__sub-label-text caption-1",children:Je})]},Et)});const Re=C!==void 0;return n.jsxs("span",{className:`button__label-text${Re?" button__label-text--has-sub":""}`,children:[ge,p!=null&&n.jsx("span",{className:"button__count",children:p}),Re&&n.jsx("span",{className:"button__sub-label-text caption-1",children:C})]})},Xe=Re=>{typeof g!="boolean"&&!k&&Oe(!1),Re.currentTarget.blur()},At=Re=>{de||(typeof S.onMouseLeave=="function"&&S.onMouseLeave(Re),Xe(Re))},gt=Re=>{if(O&&mt&&st.touchPress(Re.currentTarget),de){mt&&st.touchPress(Re.currentTarget),Re.preventDefault(),$?.(Re);return}typeof g!="boolean"&&k&&Oe(ot=>!ot),L?.(Re)},_t=o.useCallback(()=>{(T||q)&&(rt(!0),pt(ue.current?.getBoundingClientRect()??null))},[T,q]),Nt=o.useCallback(()=>{(T||q)&&(rt(!1),pt(null))},[T,q]),mt=!!(T||q),st=vo(dt,Re=>{Re?_t():Nt()},ue,{enabled:mt&&(de||O),fallbackOnParent:mt&&de}),Pe={...S};delete Pe.disabled,delete Pe.className,delete Pe.faded,delete Pe.useFaded,delete Pe.loading,delete Pe.onMouseLeave,delete Pe.onPointerEnter,delete Pe.onPointerLeave,delete Pe.onPointerUp,delete Pe.onFocus,delete Pe.onBlur,de&&(Object.keys(Pe).forEach(Re=>{/^on[A-Z]/.test(Re)&&typeof Pe[Re]=="function"&&delete Pe[Re]}),Pe["aria-disabled"]="true");const bt=(typeof T=="string"?T:null)??(typeof J=="string"?J:null)??(typeof x=="string"?x:null)??(typeof oe=="string"?oe:null)??void 0,wt=typeof x=="string"?x:typeof oe=="string"?oe:bt,lt=q?[q.title,...q.items??[]].filter(Boolean).join(". "):T&&bt&&bt!==wt?bt:"",jt=[typeof S["aria-describedby"]=="string"?S["aria-describedby"]:void 0,lt?He:null].filter(Boolean).join(" ")||void 0,Ge=(Re,ot)=>n.jsx(tt,{icon:Re,label:ot??wt,className:Ze,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),yt=()=>be==="dot"?n.jsxs(n.Fragment,{children:[Ge(c),me&&n.jsx("span",{className:`button__label ${le}`,children:et()})]}):h==="center"&&c?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"button__center-group",children:[n.jsx("span",{className:"button__left",children:Ge(c)}),me&&n.jsx("span",{className:`button__label ${le}`,children:et()})]}),ie&&n.jsx("span",{className:"button__right",children:Ge(d)})]}):n.jsxs(n.Fragment,{children:[c&&n.jsx("span",{className:"button__left",children:Ge(c,x??oe)}),me&&n.jsx("span",{className:`button__label ${le}`,children:et()}),ie&&n.jsx("span",{className:"button__right",children:Ge(d)})]}),$t=!!s&&!de;return n.jsxs(n.Fragment,{children:[n.jsxs($t?"a":"button",{...Pe,ref:qe,...$t?{href:s,target:i,rel:u??(i==="_blank"?"noreferrer":void 0)}:{type:l??"button",disabled:de&&!$&&!Ue},className:Le,"aria-pressed":Se,"aria-expanded":typeof v=="boolean"?v:S["aria-expanded"],"aria-controls":B??S["aria-controls"],"aria-label":wt,"aria-disabled":de&&($t||$||Ue)?!0:void 0,"aria-describedby":jt,style:Ee,onClick:gt,onMouseLeave:At,onPointerEnter:Re=>{ca(Re)||_t(),!de&&typeof S.onPointerEnter=="function"&&S.onPointerEnter(Re)},onPointerLeave:Re=>{ca(Re)||Nt(),!de&&typeof S.onPointerLeave=="function"&&S.onPointerLeave(Re)},onPointerUp:Re=>{de&&mt&&st.touchPress(Re.currentTarget),!de&&typeof S.onPointerUp=="function"&&S.onPointerUp(Re)},onFocus:Re=>{ke(!0),da()||_t(),!de&&typeof S.onFocus=="function"&&S.onFocus(Re)},onBlur:Re=>{ke(!1),de||Xe(Re),Nt(),!de&&typeof S.onBlur=="function"&&S.onBlur(Re)},children:[yt(),lt?n.jsx("span",{id:He,hidden:!0,"aria-label":lt}):null]}),dt&&q?n.jsx(Kn,{anchorRect:nt,title:q.title,items:q.items,onClose:Ne}):dt&&bt?n.jsx(Dn,{anchorRect:nt,text:bt,onClose:Ne}):null]})}const fe=o.forwardRef(py);fe.displayName="Button";function Mt(e,t,a){const r=o.useRef(null);return o.useLayoutEffect(()=>{const l=r.current?.parentElement??null;return t(l,e),()=>a(l)},[e,t,a]),r}const Ra={title:"--promo-banner-bg-title",description:"--promo-banner-bg-description"},xo=new WeakMap;function _o(e){if(e)return xo.get(e)}function Qt(e,t){e&&(e.style.setProperty(Ra.title,t.title),e.style.setProperty(Ra.description,t.description),xo.set(e,t))}function en(e){e&&(e.style.removeProperty(Ra.title),e.style.removeProperty(Ra.description),xo.delete(e))}const ri={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"default"};function oi(){const e=Mt(ri,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-main","aria-hidden":"true"})}const si={title:"var(--color-main)",description:"var(--color-gray)",actionVariant:"main"};function li(){const e=Mt(si,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft","aria-hidden":"true"})}const ii={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function ui(){const e=Mt(ii,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-sub","aria-hidden":"true"})}const ci={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function di(){const e=Mt(ci,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-deep","aria-hidden":"true"})}const pi={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function mi(){const e=Mt(pi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft-sub","aria-hidden":"true"})}const hi={title:"var(--color-black)",description:"var(--color-darkGray)",actionVariant:"main"};function Ci(){const e=Mt(hi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-warm","aria-hidden":"true"})}const fi={title:"var(--color-white)",description:"var(--color-lightGray)",actionVariant:"main"};function gi(){const e=Mt(fi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dark","aria-hidden":"true"})}const bi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function yi(){const e=Mt(bi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-radial","aria-hidden":"true"})}const vi={title:"var(--color-darkMain)",description:"var(--color-gray)",actionVariant:"main"};function xi(){const e=Mt(vi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-diagonal","aria-hidden":"true"})}const _i={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function wi(){const e=Mt(_i,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dots","aria-hidden":"true"})}const Bi={title:"var(--color-black)",description:"var(--color-gray)",actionVariant:"main"};function ki(){const e=Mt(Bi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-outline","aria-hidden":"true",children:n.jsx("span",{className:"promo-banner-bg-outline__dot"})})}const Ai={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Ni(){const e=Mt(Ai,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-success","aria-hidden":"true"})}const Ei={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"sub"};function Di(){const e=Mt(Ei,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-naver","aria-hidden":"true"})}const Si={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"transparent-white"};function ji(){const e=Mt(Si,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-instagram","aria-hidden":"true"})}const ln=(e,t,a)=>({key:e,get label(){return Vt.t(`promoBannerBg.${e}`,t)},textTone:a}),my=[ln("main","\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),ln("soft","\uC18C\uD504\uD2B8","dark"),ln("sub","\uC11C\uBE0C \uCEEC\uB7EC","light"),ln("deep","\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),ln("softSub","\uC18C\uD504\uD2B8 \uC11C\uBE0C","dark"),ln("warm","\uC6DC(\uAC15\uC870)","dark"),ln("dark","\uB2E4\uD06C","light"),ln("radial","\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),ln("diagonal","\uB300\uAC01\uC120 \uD328\uD134","dark"),ln("dots","\uB3C4\uD2B8 \uD328\uD134","dark"),ln("outline","\uC544\uC6C3\uB77C\uC778","dark"),ln("success","\uC131\uACF5/\uC644\uB8CC","light"),ln("naver","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4","light"),ln("instagram","\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4","light")],Ti={main:oi,soft:li,sub:ui,deep:di,softSub:mi,warm:Ci,dark:gi,radial:yi,diagonal:xi,dots:wi,outline:ki,success:Ni,naver:Di,instagram:ji};function Mi({storageKey:e="fontScale",baseFont:t=20,minScale:a=.8,maxScale:r=1.4,step:l=.1,lineHeightRatio:s=1.4}={}){const i=k=>Math.max(a,Math.min(r,Number(k))),u=k=>{try{const v=localStorage.getItem(k),B=v?Number(v):1;return Number.isFinite(B)?i(B):i(1)}catch{return i(1)}},[c,d]=o.useState(()=>u(e)),[m,p]=o.useState(e);m!==e&&(p(e),d(u(e))),o.useEffect(()=>{try{localStorage.setItem(e,String(c))}catch{}},[e,c]);const C=k=>{d(typeof k=="function"?v=>i(k(v)):i(k))},b=()=>C(k=>+(k+l).toFixed(6)),x=()=>C(k=>+(k-l).toFixed(6)),f=c<r-Number.EPSILON,h=c>a+Number.EPSILON,_=Math.round(t*c),g=Math.round(_*s);return{scale:c,setScale:C,increase:b,decrease:x,canIncrease:f,canDecrease:h,fontSize:_,lineHeight:g}}function Li(e,t){const a=$a(t);o.useEffect(()=>{const r=()=>a.current();try{window.addEventListener(e,r)}catch{}return()=>{try{window.removeEventListener(e,r)}catch{}}},[e,a])}const wo=" \xB7 ",$i=(()=>{if(typeof document>"u")return"";const e=document.title;return e.includes(wo)?e.split(wo).pop()??e:e})(),hy=o.createContext(!1),Yn=[];let Ri=null;function Cy(e){const t=o.useContext(hy);o.useEffect(()=>{if(t||typeof e!="string"||!e)return;Yn.length===0&&(Ri=document.title);const a={text:$i?`${e}${wo}${$i}`:e};return Yn.push(a),document.title=a.text,()=>{const r=Yn.lastIndexOf(a);r>=0&&Yn.splice(r,1),document.title=Yn.length?Yn[Yn.length-1].text:Ri??document.title}},[e,t])}const Bo=[{value:"10",label:"10\uAC1C\uC529 \uBCF4\uAE30"},{value:"25",label:"25\uAC1C\uC529 \uBCF4\uAE30"},{value:"50",label:"50\uAC1C\uC529 \uBCF4\uAE30"},{value:"100",label:"100\uAC1C\uC529 \uBCF4\uAE30"}],fy=(()=>{let e=null;return()=>(e||(e=new Intl.Collator("ko")),e)})();function mn(e,t){return fy().compare(e,t)}const ir=new Map;function gy(e){const t=ir.get(e);if(t)return t;const a=[],r=/-?\d+(?:\.\d+)?/g;let l=0;for(let s=r.exec(e);s;s=r.exec(e)){let i=s.index,u=s[0];u[0]==="-"&&i>0&&!/\s/.test(e[i-1])&&(i+=1,u=u.slice(1)),i>l&&a.push(e.slice(l,i)),a.push(Number(u)),l=s.index+s[0].length}return l<e.length&&a.push(e.slice(l)),ir.size>5e3&&ir.clear(),ir.set(e,a),a}function by(e){if(!/^[\d\s-]+$/.test(e))return null;const t=e.replace(/\D/g,"");return t.length<9||t.length>11?null:t[0]==="0"||t[0]==="1"&&e!==t?t:null}function yy(e,t){const a=d=>d==null||typeof d=="number"&&Number.isNaN(d)?"":String(d).trim(),r=a(e),l=a(t);if(r===l)return 0;const s=(d,m)=>{if(typeof d=="number"&&!Number.isNaN(d))return[d];const p=by(m);return p!==null?[p]:gy(m)},i=s(e,r),u=s(t,l),c=Math.min(i.length,u.length);for(let d=0;d<c;d++){const m=i[d],p=u[d];if(typeof m=="number"&&typeof p=="number"){if(m!==p)return m-p;continue}if(typeof m=="number")return-1;if(typeof p=="number")return 1;const C=mn(m,p);if(C!==0)return C}return i.length!==u.length?i.length-u.length:mn(r,l)}const Pi=e=>e==null||typeof e=="number"&&Number.isNaN(e)||typeof e=="string"&&e.trim()==="";function ur(e,t,a){const r=Pi(e),l=Pi(t);if(r||l)return r===l?0:r?1:-1;const s=yy(e,t);return a?s:-s}function vy(e,t,a){const{t:r}=_e.useTranslation(),[l,s]=o.useState(()=>{const x=a?.initialPageSize;return x&&Bo.some(f=>f.value===x)?x:"25"}),[i,u]=o.useState(1),[c,d]=o.useState(t);Object.is(c,t)||(d(t),i!==1&&u(1));const m=o.useMemo(()=>Bo.map(x=>({...x,label:r("visits.showN",{n:x.value})})),[r]),p=o.useCallback(x=>{Bo.some(f=>f.value===x)&&(s(x),u(1))},[]),C=Math.max(1,Math.ceil(e.length/Number(l))),b=Math.min(Math.max(1,Number.isFinite(i)?Math.floor(i):1),C);return i!==b&&u(b),{pageRows:o.useMemo(()=>e.slice((b-1)*Number(l),b*Number(l)),[e,b,l]),pageSizeProps:{options:m,value:l,onChange:p},paginationProps:{page:b,total:C,onChange:u},setPage:u}}function xy(e){const[t,a]=o.useState(()=>e?.defaultKey!=null?{key:e.defaultKey,asc:e.defaultAsc??!0}:null),r=o.useRef(t),l=o.useRef(e?.onSortChange);l.current=e?.onSortChange;const s=o.useCallback(c=>{const d=r.current,m=d?.key===c?{key:c,asc:!d.asc}:{key:c,asc:!0};r.current=m,a(m),l.current?.(m)},[]),i=o.useCallback((c,d)=>({label:c,sortDir:t?.key===d?t.asc?"asc":"desc":null,onClick:()=>s(d)}),[t,s]),u=o.useCallback((c,d)=>{if(!t)return c;const{key:m,asc:p}=t;return[...c].sort((C,b)=>ur(d(C,m),d(b,m),p))},[t]);return{sort:t,field:i,sortRows:u}}const xn="\uC804\uCCB4";Object.fromEntries(Object.entries(QC).map(([e,{nucleus:t}])=>[e,t]));const _y={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"})},wy={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"})},By={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 ky(e,t){if("place"in t)return _y[t.place](e);const a=wy[t.vowel](e);return t.glide?`${a} \xB7 ${By[t.glide](e)}`:a}const Ay=(e,{defaultValue:t})=>t,Ii=(e,t)=>({jamos:e,phonetic:t,tooltip:ky(Ay,t)}),Sn=(e,t)=>t.map(a=>Ii([a],{place:e})),qt=(e,t,a)=>Ii([...e],a?{vowel:t,glide:a}:{vowel:t}),ko={cho:[Sn("labial",["\u3142","\u3143","\u314D","\u3141"]),Sn("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),Sn("alveolar",["\u3145","\u3146"]),Sn("palatal",["\u3148","\u3149","\u314A"]),Sn("velar",["\u3131","\u3132","\u314B"]),Sn("glottal",["\u314E"])],jung:[[qt("\u3163","frontHigh"),qt("\u315F","frontHigh","w"),qt("\u3162","frontHigh","velar")],[qt("\u3161","backHighUnrounded")],[qt("\u315C","backHighRounded"),qt("\u3160","backHighRounded","j")],[qt("\u3154\u3150","frontMid"),qt("\u3156\u3152","frontMid","j"),qt("\u3159\u315A\u315E","frontMid","w")],[qt("\u3153","backMidUnrounded"),qt("\u3155","backMidUnrounded","j"),qt("\u315D","backMidUnrounded","w")],[qt("\u3157","backMidRounded"),qt("\u315B","backMidRounded","j")],[qt("\u314F","low"),qt("\u3151","low","j"),qt("\u3158","low","w")]],jong:[Sn("labial",["\u3142","\u3141"]),Sn("alveolar",["\u3137","\u3134","\u3139"]),Sn("velar",["\u3131","\u3147"])]},Ny=e=>e===Ey?[]:Array.from(e),Ey="__NO_CODA__",Ao=e=>e.map(t=>t.map(({jamos:a,phonetic:r,tooltip:l})=>({v:a.join(""),phonetic:r,tooltip:l}))),Fi={cho:Ao(ko.cho),jung:Ao(ko.jung),jong:Ao(ko.jong)};Fi.jung.flat().forEach(({v:e})=>{for(const t of Ny(e));}),new Set(Fi.cho.flat().map(e=>e.v));function Dy(e,t=!0){const a=$a(e);o.useEffect(()=>{if(t)return Gn(()=>{a.current?.()})},[t,a])}function Pa(){const[e,t]=o.useState(null),a=o.useCallback(s=>t(s.getBoundingClientRect()),[]),r=o.useCallback(()=>t(null),[]),l=o.useCallback(s=>{const i=s.getBoundingClientRect();t(u=>u?null:i)},[]);return{anchorRect:e,isOpen:e!=null,openAt:a,close:r,toggleAt:l}}function Sy(e){const[t,a]=o.useState(null),[r,l]=o.useState(null),s=o.useRef(null);o.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]);const i=o.useCallback((c,d)=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{a(c),l(d)},e)},[e]),u=o.useCallback(()=>{s.current&&clearTimeout(s.current),a(null),l(null)},[]);return{payload:t,anchorRect:r,openAfterDelay:i,close:u}}function Oi(e="warning"){const[t,a]=o.useState(""),[r,l]=o.useState(e),[s,i]=o.useState(0),u=o.useCallback((p,C)=>{l(C),a(p),i(b=>b+1)},[]),c=o.useCallback(p=>u(p,"warning"),[u]),d=o.useCallback(p=>u(p,"normal"),[u]),m=o.useCallback(()=>a(""),[]);return{toastMessage:t,toastType:r,toastKey:s,showToast:u,showWarning:c,showNormal:d,clearToast:m}}function Ia(e){let t=0;if(e&&typeof window<"u"&&typeof window.getComputedStyle=="function")for(let a=e;a&&a!==document.body&&a!==document.documentElement;a=a.parentElement){const r=parseInt(window.getComputedStyle(a).zIndex,10);!Number.isNaN(r)&&r>t&&(t=r)}return t>0?`max(var(--z-menu, 1500), ${t+1})`:"var(--z-menu, 1500)"}function Fa({computeStyle:e,onScroll:t="close",onResize:a="close",ignoreOutsideClickSelector:r}){const[l,s]=o.useState(!1),[i,u]=o.useState({position:"fixed"}),c=o.useRef(null),d=o.useRef(null),m=o.useCallback(()=>{c.current&&u(e(c.current.getBoundingClientRect(),c.current))},[e]);o.useLayoutEffect(()=>{l&&m()},[l,m]),o.useEffect(()=>{if(!l)return;let b=d.current?.offsetHeight??0;b>0&&m();let x=0,f=null;typeof ResizeObserver<"u"&&d.current&&(f=new ResizeObserver(()=>{const w=d.current?.offsetHeight??0;if(w!==b){if(b=w,++x>4){f?.disconnect(),f=null;return}m()}}),f.observe(d.current));const h=w=>{const A=w.target;r&&A.closest?.(r)||c.current?.contains(A)||d.current?.contains(A)||s(!1)};document.addEventListener("mousedown",h),document.addEventListener("pointerdown",h);let _=null;const g=()=>{if(typeof requestAnimationFrame>"u"){m();return}_===null&&(_=requestAnimationFrame(()=>{_=null,m()}))},k=w=>{d.current?.contains(w.target)||(t==="reposition"?g():t==="close"&&s(!1))};t!=="ignore"&&window.addEventListener("scroll",k,!0);const v=()=>{a==="reposition"?g():a==="close"&&s(!1)};let B=null;const y=()=>{v(),B&&clearTimeout(B),B=setTimeout(()=>{B=null,a==="reposition"&&m()},250)};return a!=="ignore"&&(window.addEventListener("resize",v),window.addEventListener("orientationchange",y)),()=>{_!==null&&cancelAnimationFrame(_),f?.disconnect(),document.removeEventListener("mousedown",h),document.removeEventListener("pointerdown",h),t!=="ignore"&&window.removeEventListener("scroll",k,!0),a!=="ignore"&&(window.removeEventListener("resize",v),window.removeEventListener("orientationchange",y)),B&&clearTimeout(B)}},[l,m,t,a,r]),o.useEffect(()=>{if(l)return Gn(()=>s(!1))},[l]);const p=o.useCallback(()=>s(b=>!b),[]),C=o.useCallback(()=>s(!1),[]);return{open:l,setOpen:s,toggle:p,close:C,style:i,triggerRef:c,menuRef:d}}function jy(e,{mode:t="playback",autoStart:a=!1,onPlaySpeaker:r,onComplete:l,playMs:s=1100,feedbackMs:i=1500}={}){const[u,c]=o.useState([]),[d,m]=o.useState(0),[p,C]=o.useState("idle"),[b,x]=o.useState(null),[f,h]=o.useState([]),[_,g]=o.useState(null),[k,v]=o.useState(0),B=o.useRef(0),y=o.useCallback(P=>{B.current=typeof P=="function"?P(B.current):P,v(B.current)},[]),w=o.useRef(r),A=o.useRef(l);o.useEffect(()=>{w.current=r,A.current=l},[r,l]);const E=o.useRef([]),D=()=>{E.current.forEach(clearTimeout),E.current=[]},N=(P,V)=>{E.current.push(setTimeout(V,P))};o.useEffect(()=>()=>D(),[]);const F=u[d]?.id??null,R=o.useRef(null),K=o.useCallback(()=>{D(),C("playing"),h([]),g(null),y(0);let P=0;e.forEach((V,W)=>{N(P,()=>{m(W),x(V.id),w.current?.(V)}),N(P+1e3,()=>{x(null),h(G=>[...G,V.id])}),P+=1300}),N(P,()=>{C("done"),A.current?.({score:0,total:e.length})})},[e,y]),L=o.useCallback((P,V)=>{if(V>=P.length){C("done"),A.current?.({score:B.current,total:P.length});return}R.current=null,m(V),g(null),C("playing"),x(P[V].id),w.current?.(P[V]),N(s,()=>{x(null),C("waiting")})},[s]),$=o.useCallback(()=>{D();const P=Ta(e);c(P),y(0),h([]),L(P,0)},[e,L,y]),T=o.useCallback(()=>{t==="playback"?(c(e),K()):$()},[t,e,K,$]),J=o.useCallback(()=>{D(),C("idle"),x(null),h([]),g(null),m(0),y(0),c([])},[y]),q=JSON.stringify(e.map(P=>[P.id,P.label,P.angleDeg,P.deg,P.row,P.shortcut]));o.useEffect(()=>(a?T():J(),()=>D()),[t,q,a]);const O=o.useCallback(P=>{p!=="waiting"||t==="playback"||R.current===d||(R.current=d,g(P),P===u[d]?.id&&y(V=>V+1),t==="exam"?(C("playing"),N(400,()=>L(u,d+1))):(C("feedback"),N(i,()=>L(u,d+1))))},[p,t,u,d,L,i,y]),Q=t==="playback"?e.length:u.length;return{bind:{activeSpeakerId:b,playedIds:f,selectedId:_,answerId:F,showFeedback:p==="feedback",clickable:p==="waiting",onSelectSpeaker:O},index:d,total:Q,score:k,phase:p,done:p==="done",start:T,reset:J}}const No=new Map,Eo=new Map,Ty=()=>()=>{},My=()=>!0,Ly=()=>!1;function zi(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 a=Uint8Array.from(atob(t[2]),r=>r.charCodeAt(0));return new TextDecoder("utf-8").decode(a)}catch{return null}}function $y(e){if(typeof window>"u")return"";const t=(a,r)=>{const l=r.attrName.toLowerCase(),s=r.attrValue.trim();(l==="href"||l==="xlink:href")&&!s.startsWith("#")&&(r.keepAttr=!1),(l==="style"||s.includes("\\")&&s.includes("("))&&(r.keepAttr=!1);const i=s.replace(/url\s*\(\s*(['"]?)#[^)\s'"]+\1\s*\)/gi,"");/url\s*\(/i.test(i)&&(r.keepAttr=!1)};oa.addHook("uponSanitizeAttribute",t);try{return oa.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","style","foreignObject"]})}finally{oa.removeHook("uponSanitizeAttribute",t)}}function Ry(e,t){const a=new Set;for(const i of e.matchAll(/url\(\s*(['"]?)#([^)\s"']+)\1\s*\)/g))a.add(i[2]);for(const i of e.matchAll(/(?:xlink:)?href="#([^"]+)"/g))a.add(i[1]);const r=new Set([...e.matchAll(/id="([^"]*)"/g)].map(i=>i[1])),l=[...a].filter(i=>r.has(i));if(l.length===0)return e;let s=e;for(const i of l){const u=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=`${t}-${i}`;s=s.replace(new RegExp(`id="${u}"`,"g"),`id="${c}"`).replace(new RegExp(`url\\(\\s*(['"]?)#${u}\\1\\s*\\)`,"g"),(d,m)=>`url(${m}#${c}${m})`).replace(new RegExp(`((?:xlink:)?href)="#${u}"`,"g"),`$1="#${c}"`)}return s}function Py(e){const t=Eo.get(e);if(t)return t;const a=fetch(e).then(r=>r.ok?r.text():null).then(r=>(r!=null&&No.set(e,r),r)).catch(()=>null).finally(()=>{Eo.delete(e)});return Eo.set(e,a),a}function Iy(e,t=!0){const a=o.useSyncExternalStore(Ty,My,Ly)&&t&&e?zi(e)??No.get(e)??null:null,[r,l]=o.useState({src:e,enabled:t,svg:a});return o.useEffect(()=>{if(!t||!e){l({src:e,enabled:t,svg:null});return}const s=zi(e)??No.get(e)??null;if(s!==null){l({src:e,enabled:t,svg:s});return}let i=!0;return Py(e).then(u=>{i&&l({src:e,enabled:t,svg:u})}),()=>{i=!1}},[e,t]),r.src===e&&r.enabled===t?r.svg:a}function Fy({title:e,description:t,actionLabel:a,onAction:r,bg:l,color:s,size:i="medium",actionVariant:u,titleColor:c,descriptionColor:d,className:m=""}){const p=l??s??"main",C=o.useRef(null),[b,x]=o.useState("main"),f=Cn("(max-width: 767px)"),h=o.useRef({title:!1,description:!1});o.useLayoutEffect(()=>{const k=C.current;if(!k)return;const v=_o(k),B=(y,w,A)=>{if(A!==void 0)k.style.setProperty(w,A),h.current[y]=!0;else if(h.current[y]){const E=v?.[y];E?k.style.setProperty(w,E):k.style.removeProperty(w),h.current[y]=!1}};B("title","--promo-banner-bg-title",c),B("description","--promo-banner-bg-description",d)},[c,d,p]),o.useLayoutEffect(()=>{const k=C.current;if(!k)return;const v=_o(k);x(v?.actionVariant??"main")},[p]);const _=we("promo-banner",`promo-banner--${i}`,m),g=Ti[p];return n.jsxs("div",{ref:C,className:_,role:"note",children:[n.jsx(g,{}),n.jsxs("div",{className:"promo-banner__text",children:[n.jsx("span",{className:`promo-banner__title ${i==="small"?"body-2":"h2"}`,children:e}),t&&n.jsx("span",{className:"promo-banner__description body-3",children:t})]}),a&&r&&n.jsx(fe,{htmlType:"button",size:40,variant:u??b,shape:"pill",useBorder:!0,onClick:r,ariaLabel:a,...f?{type:"dot",icon:"arrow-right"}:{rightIcon:"arrow-right",label:a,minWidth:140}})]})}function Oy({children:e,interval:t=5e3,dotTone:a,className:r="","aria-label":l}){const{t:s}=_e.useTranslation(),i=l??s("topBanner.ariaLabel","\uBC30\uB108"),u=o.Children.toArray(e),c=u.length,[d,m]=o.useState(0),[p,C]=o.useState(!1),[b,x]=o.useState(!1),[f,h]=o.useState(!1),_=o.useRef(null),g=o.useRef(null),k=o.useRef(null),v=bo(),B=p||b||f,y=c>0?Math.min(d,c-1):0;o.useEffect(()=>{if(c<2||t<=0||B||v)return;const A=window.setInterval(()=>m(E=>(Math.min(E,c-1)+1)%c),t);return()=>window.clearInterval(A)},[c,t,B,v]);const w=A=>{g.current!=null&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{g.current=null,h(!1)},A)};return o.useEffect(()=>()=>{g.current!=null&&window.clearTimeout(g.current)},[]),o.useEffect(()=>{if(!f)return;const A=E=>{E.pointerType==="touch"&&(k.current&&k.current.contains(E.target)||(g.current!=null&&(window.clearTimeout(g.current),g.current=null),h(!1)))};return document.addEventListener("pointerdown",A,!0),()=>document.removeEventListener("pointerdown",A,!0)},[f]),c===0?null:n.jsxs("section",{ref:k,className:we("top-banner",r),"aria-label":i,"aria-roledescription":"carousel",onPointerEnter:A=>{_.current=A.pointerType},onPointerDown:A=>{_.current=A.pointerType,A.pointerType==="touch"&&(g.current!=null&&(window.clearTimeout(g.current),g.current=null),h(!0))},onPointerUp:A=>{A.pointerType==="touch"&&w(5e3)},onPointerCancel:A=>{A.pointerType==="touch"&&w(5e3)},onMouseEnter:()=>{_.current!=="touch"&&C(!0)},onMouseLeave:()=>C(!1),onFocus:A=>{let E=!0;try{E=A.target.matches(":focus-visible")}catch{E=!0}x(E)},onBlur:A=>{A.currentTarget.contains(A.relatedTarget)||x(!1)},children:[n.jsx("div",{className:"top-banner__viewport",children:n.jsx("div",{className:"top-banner__track",style:{transform:`translateX(-${y*100}%)`},children:u.map((A,E)=>n.jsx("div",{className:"top-banner__slide","aria-hidden":E!==y,...E!==y?{inert:!0}:{},children:A},E))})}),c>1&&n.jsx("div",{className:`top-banner__dots${(a?.[y]??"light")==="dark"?" top-banner__dots--dark":""}`,children:u.map((A,E)=>n.jsx("button",{type:"button",className:`top-banner__dot${E===y?" top-banner__dot--active":""}`,"aria-label":s("topBanner.dotAriaLabel",{count:c,index:E+1,defaultValue:`${c}\uAC1C \uC911 ${E+1}\uBC88\uC9F8 \uBC30\uB108`}),"aria-current":E===y,onClick:()=>m(E)},E))})]})}function zy({title:e,body:t,open:a=!1,onToggle:r,avatar:l,titleClassName:s="body-2",bodyClassName:i="body-2",className:u=""}){const{t:c}=_e.useTranslation();return n.jsxs("div",{className:`accordion-item ${a?"accordion-item--open":""} ${u}`.trim(),role:"listitem",children:[n.jsxs("div",{className:"accordion-item__header",role:"button",tabIndex:0,"aria-expanded":a,"data-accordion-header":!0,onClick:r,onKeyDown:d=>{if(d.key==="Enter"||d.key===" ")d.preventDefault(),r?.();else if(d.key==="ArrowDown"||d.key==="ArrowUp"){d.preventDefault();const m=d.currentTarget.closest('[role="list"]');if(!m)return;const p=Array.from(m.querySelectorAll("[data-accordion-header]")),C=p.indexOf(d.currentTarget);(d.key==="ArrowDown"?p[C+1]:p[C-1])?.focus()}},children:[l&&n.jsx("div",{className:"accordion-item__avatar",children:l}),n.jsx("div",{className:`accordion-item__title ${s}`,children:e}),n.jsx("div",{className:"accordion-item__chevron",children:n.jsx(tt,{icon:a?"chevron-up":"chevron-down",label:a?c("accordion.collapse","\uC811\uAE30"):c("accordion.expand","\uD3BC\uCE58\uAE30"),className:"accordion-item__chevron-icon",imgClassName:"accordion-item__chevron-image"})})]}),a&&n.jsx("div",{className:`accordion-item__body ${i}`,children:typeof t=="string"?n.jsx("p",{children:t}):t})]})}function Wy({items:e=[],defaultOpenIndex:t=0,size:a=72,className:r="",bodyClassName:l}){const[s,i]=o.useState({index:t}),u=(c,d)=>s.id!=null&&c.id!=null?c.id===s.id:s.id==null&&d===s.index;return n.jsx("div",{className:`accordion-group accordion-group--s${a} ${r}`.trim(),role:"list",children:e.map((c,d)=>n.jsx(zy,{title:c.title,body:c.body,avatar:c.avatar,open:u(c,d),onToggle:()=>i(u(c,d)?{index:-1}:{index:d,id:c.id}),bodyClassName:l},c.id??d))})}function Hy(){return n.jsx("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n.jsx("polyline",{points:"2,6 5,9 10,3"})})}function Vy(){return n.jsxs("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round","aria-hidden":"true",children:[n.jsx("line",{x1:"3",y1:"3",x2:"9",y2:"9"}),n.jsx("line",{x1:"9",y1:"3",x2:"3",y2:"9"})]})}function qy(){return n.jsx("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round","aria-hidden":"true",children:n.jsx("line",{x1:"2.5",y1:"6",x2:"9.5",y2:"6"})})}function Lt(e){const{t}=_e.useTranslation(),{type:a="bar",size:r,className:l="","aria-label":s,"aria-hidden":i}=e;if(a==="dot"){const{icon:B,number:y,position:w="top-right",onClick:A,animate:E=!1}=e,D=B??"check",N=y!==void 0?"number":D,F=typeof r=="number"?r:32,R=we("circle-badge",`circle-badge--${N}`,`circle-badge--${w}`,`circle-badge--${F}`,E?"circle-badge--animate":"",A?"circle-badge--clickable":"",l),K=y!==void 0?t("badge.nthSelected",{n:y,defaultValue:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"}):{check:t("badge.selected","\uC120\uD0DD\uB428"),remove:t("badge.remove","\uC81C\uAC70"),minus:t("badge.exclude","\uC81C\uC678")}[D];return n.jsxs("span",{className:R,onClick:A,onKeyDown:A?L=>{L.key!=="Enter"&&L.key!==" "||(L.preventDefault(),L.currentTarget.click())}:void 0,"aria-label":i?void 0:s??K,"aria-hidden":i||void 0,role:A?"button":i?void 0:"img",tabIndex:A?0:void 0,children:[y!==void 0&&y,y===void 0&&D==="check"&&n.jsx(Hy,{}),y===void 0&&D==="remove"&&n.jsx(Vy,{}),y===void 0&&D==="minus"&&n.jsx(qy,{})]})}const{label:u,children:c,variant:d="default",fill:m="filled",minWidth:p,iconLeft:C,iconRight:b,color:x}=e,f=typeof r=="number"?"medium":r??"medium",h={small:"caption-2b",medium:"body-3b",large:"body-2b"}[f]??"body-2b",_={small:12,medium:14,large:16}[f]??14,g=we("badge",`badge--${d}`,`badge--${f}`,m!=="filled"?`badge--${m}`:"",h,l),k=x?.startsWith("--")?`var(${x})`:x,v=p!==void 0||k?{...p!==void 0?{minWidth:typeof p=="number"?`${p}px`:p}:{},...k?{"--badge-color":k}:{}}:void 0;return n.jsxs("span",{className:g,style:v,"aria-label":i?void 0:s,role:s&&!i?"img":void 0,"aria-hidden":i||void 0,children:[C&&n.jsx(tt,{icon:C,size:_,className:"badge__icon"}),u??c,b&&n.jsx(tt,{icon:b,size:_,className:"badge__icon"})]})}function Oa({columns:e=[],onClose:t,className:a="",size:r="medium"}){const{t:l}=_e.useTranslation(),s=r==="small"?40:48,[i,u]=o.useState([]),c=o.useMemo(()=>{const h=[{title:null,columns:e}];let _=e;for(const g of i){const k=_?.[g.ci]?.items?.[g.ii];if(!k||!Array.isArray(k.children)||!k.children.length)break;_=[{title:null,items:k.children}],h.push({title:k.label||null,columns:_})}return h},[e,i]),d=c[c.length-1],m=c.length-1,p=o.useCallback(()=>u(h=>h.slice(0,Math.max(0,Math.min(h.length,m)-1))),[m]),C=o.useRef(null),b=o.useRef(null),x=c.length;o.useEffect(()=>{b.current||(b.current=document.activeElement);let h=0,_=0;const g=()=>{const k=C.current?.querySelector("button:not([disabled])");if(k&&k.offsetParent){k.focus({preventScroll:!0});return}_++<20&&(h=requestAnimationFrame(g))};return h=requestAnimationFrame(g),()=>cancelAnimationFrame(h)},[x]),o.useEffect(()=>()=>{b.current?.focus?.({preventScroll:!0})},[]);const f=o.useCallback((h,_,g)=>{if(h){if(Array.isArray(h.children)&&h.children.length){u(k=>[...k.slice(0,m),{ci:_,ii:g}]);return}try{typeof h.onClick=="function"&&h.onClick()}catch{}try{h&&h.closeOnSelect&&typeof t=="function"&&t()}catch{}}},[t,m]);return n.jsxs("div",{className:`tooltip-menu tooltip-menu--${r} ${a}`,children:[(c.length>1||d.title)&&n.jsxs("div",{className:"tooltip-menu__header",children:[c.length>1?n.jsx(fe,{htmlType:"button",size:s,type:"dot",icon:"chevron-left",ariaLabel:l("common.back","\uB4A4\uB85C"),onClick:p,variant:"transparent-gray",useBorder:!1}):null,n.jsx("div",{className:"tooltip-menu__title button-1",children:d.title})]}),n.jsx("div",{className:"tooltip-menu__columns",ref:C,children:d.columns&&d.columns.map((h,_)=>n.jsxs("div",{className:"tooltip-menu__column",children:[h.title?n.jsx("div",{className:"tooltip-menu__column-title body-3",children:h.title}):null,n.jsx("div",{className:"tooltip-menu__items",children:(h.items||[]).map((g,k)=>n.jsxs(o.Fragment,{children:[g.separatorBefore&&k>0&&n.jsx("div",{className:"tooltip-menu__separator",role:"separator"}),n.jsx(fe,{htmlType:"button",className:"tooltip-menu__item",size:s,type:g.label?"bar":"dot",icon:g.selected?"check":g.icon||"none",rightIcon:Array.isArray(g.children)&&g.children.length?"chevron-right":g.badgeCount?n.jsx(Lt,{type:"dot",position:"inline",number:Math.min(g.badgeCount,99),size:24,"aria-hidden":!0}):void 0,label:g.label,ariaLabel:g.label&&g.badgeCount&&g.badgeCount>0?l("nav.badgeLabel",{label:g.label,count:g.badgeCount,defaultValue:"{{label}}, {{count}}\uAC1C"}):g.label,onClick:()=>f(g,_,k),selected:g.selected,disabled:g.disabled,showTooltipInfo:g.tooltip||!1,useBorder:!1,align:"left"})]},k))})]},_))})]})}const Wi=".content-area";function Do(e,t="Nav"){try{const a=typeof e=="string"?document.querySelector(e):e?.current??document.querySelector(Wi);if(a){a.scrollTop=0;return}const r=document.scrollingElement??document.documentElement;r&&r.scrollHeight<=r.clientHeight&&Rt("nav-scroll-container",`[${t}] \uBCF8\uBB38\uC744 \uB9E8 \uC704\uB85C \uB418\uB3CC\uB9B4 \uD1B5\uC744 \uBABB \uCC3E\uC558\uB2E4(\uAE30\uBCF8 ${Wi}) \u2014 \uCC3D\uB3C4 \uAD6C\uB97C \uC218 \uC5C6\uC5B4 \uC544\uBB34 \uC77C\uB3C4 \uD558\uC9C0 \uC54A\uB294\uB2E4. scrollContainer \uB85C \uD1B5\uC744 \uC54C\uB824 \uC900\uB2E4.`),window.scrollTo({top:0})}catch{}}const So=52,cr=10,Hi=e=>e&&e>0?e:0;function Vi({items:e=[],activeKey:t,onChange:a,appMode:r,onAppModeChange:l,moreItems:s=[],scrollContainer:i}){const{t:u}=_e.useTranslation(),c=r==="manager"?"malgwi":"manager",d=r==="manager"?"arrow-left":"arrow-right",m=r==="manager"?u("nav.modeLabelMalgwi","\uB9D0\uADC0"):u("nav.modeLabelManager","\uB9D0\uADC0 \uB9E4\uB2C8\uC800"),p=o.useRef(null),[C,b]=o.useState(0),x=e.length;o.useEffect(()=>{const P=p.current;if(!P)return;const V=()=>{const S=typeof getComputedStyle=="function"?getComputedStyle(P):null,M=P.clientWidth-(parseFloat(S?.paddingLeft??"")||0)-(parseFloat(S?.paddingRight??"")||0),I=P.querySelector(".bottom-nav__left"),Z=I?.nextElementSibling,le=(I?.offsetWidth??0)+(I&&Z?.classList.contains("bottom-nav__divider")?Z.offsetWidth:0);b(Math.max(0,M-le))};if(V(),typeof ResizeObserver>"u")return;const W=new ResizeObserver(V);W.observe(P);const G=P.querySelector(".bottom-nav__left");return G&&W.observe(G),()=>W.disconnect()},[l]);const f=So+1,h=P=>Math.max(0,Math.floor((P+cr)/(So+cr))),_=x*(So+cr)-cr<=C,g=C<=0||s.length===0&&_?x:Math.min(x,h(C-f)),k=C>0&&g<x,v=k?g:x,B=e.slice(0,v),y=e.slice(v),w=k||s.length>0,A=o.useCallback((P,V)=>({position:"fixed",bottom:window.innerHeight-P.top+8,right:window.innerWidth-P.right,zIndex:Ia(V)}),[]),E=o.useId(),{open:D,toggle:N,close:F,style:R,triggerRef:K,menuRef:L}=Fa({computeStyle:A,onScroll:"ignore",onResize:"reposition"}),$=o.useCallback((P,V)=>V>0?u("nav.badgeLabel",{label:P,count:V,defaultValue:"{{label}}, {{count}}\uAC1C"}):P,[u]),T=o.useCallback((P,V)=>V>0?u("nav.badgeInsideLabel",{label:P,count:V,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):P,[u]),J=o.useCallback(()=>l?.(c),[l,c]),q=o.useMemo(()=>y.find(P=>!!P.key&&P.key===t)??s.find(P=>P.selected||P.key&&P.key===t),[y,t,s]),O=o.useMemo(()=>[{items:[...y.map(P=>({label:P.label,icon:P.icon,badgeCount:P.badgeCount,selected:!!P.key&&P.key===t,closeOnSelect:!0,disabled:P.state==="disabled",onClick:()=>{P.state!=="disabled"&&(P.key&&a&&(a(P.key),Do(i,"BottomNav")),F())}})),...s.map(P=>({label:P.label,icon:P.icon,badgeCount:P.badgeCount,selected:P.selected??(!!P.key&&P.key===t),closeOnSelect:!0,onClick:()=>{P.onClick?.(),F()}}))]}],[y,s,t,a,F]),Q=[...y,...s].reduce((P,V)=>P+Hi(V.badgeCount),0);return n.jsxs("nav",{className:"bottom-nav",ref:p,"aria-label":u("nav.bottomNav","\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158"),children:[l&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__left",children:n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:d,ariaLabel:m,className:"bottom-nav-item",onClick:J})}),n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"})]}),n.jsx("div",{className:"bottom-nav__items",children:B.map((P,V)=>{const W=Hi(P.badgeCount);return n.jsxs("span",{className:"bottom-nav__slot",children:[n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:P.icon,ariaLabel:$(P.label,W),selected:!!P.key&&P.key===t,disabled:P.state==="disabled",className:"bottom-nav-item",onClick:()=>{P.key&&(a?.(P.key),Do(i,"BottomNav"))}}),W>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Lt,{type:"dot",position:"top-right",number:Math.min(W,99),size:24})})]},P.key??`__slot-${V}`)})}),w&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"}),n.jsx("div",{className:"bottom-nav__right",children:n.jsxs("div",{ref:K,className:"bottom-nav__slot",children:[n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:q?.icon??"ellipsis",ariaLabel:T(q?.label??u("nav.more","\uB354\uBCF4\uAE30"),Q),selected:!!q,className:"bottom-nav-item",onClick:N,"aria-expanded":D,"aria-controls":D?E:void 0}),Q>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Lt,{type:"dot",position:"top-right",number:Math.min(Q,99),size:24})}),D&&cn.createPortal(n.jsx("div",{id:E,role:"group","aria-label":u("nav.moreMenu","\uB354\uBCF4\uAE30 \uBA54\uB274"),className:"tooltip-content",style:R,ref:L,children:n.jsx(Oa,{columns:O,onClose:F})}),document.body)]})})]})]})}function qi(e){if(typeof e!="string")return!1;let t="";for(const r of e){const l=r.charCodeAt(0);l<=32||l>=127&&l<=159||(t+=r)}if(!t)return!1;const a=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(t);return a?["http","https","mailto","tel"].includes(a[1].toLowerCase()):!0}function Ui(e,t,a){return a&&a>0?e("nav.badgeLabel",{label:t,count:a,defaultValue:"{{label}}, {{count}}\uAC1C"}):t}function Uy(e){const{t}=_e.useTranslation(),{activeKey:a,unreadCount:r,onDebug:l,onNotification:s,onSetting:i,onHelp:u,onFeedback:c,onAccount:d}=e||{},m="default";return l||s||i||u||c||d?n.jsxs("div",{className:"side-nav__footer",children:[l&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"terminal",ariaLabel:t("nav.debug","\uB514\uBC84\uADF8"),onClick:l,selected:a==="debug"}),s&&n.jsxs("span",{className:"side-nav__notification-wrap",children:[n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"bell",ariaLabel:Ui(t,t("nav.notifications","\uC54C\uB9BC"),r),onClick:s,selected:a==="notifications"}),!!r&&r>0&&n.jsx(Lt,{type:"dot",number:Math.min(r,99),size:24,"aria-hidden":!0})]}),i&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"settings",ariaLabel:t("nav.settings","\uC124\uC815"),onClick:i,selected:a==="settings"}),u&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"message-circle-question-mark",ariaLabel:t("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:u,selected:a==="help"}),c&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"bug",ariaLabel:t("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:c,selected:a==="feedback"}),d&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"user-round",ariaLabel:t("nav.account","\uACC4\uC815"),onClick:d,selected:a==="account"})]}):null}function Gi(e){const{t}=_e.useTranslation(),{item:a,itemKey:r,label:l,icon:s,active:i,onClick:u,style:c,state:d,labelStyle:m}=e||{},p=a?.key??r??"",C=a?.label??l??"",b=a?.icon??s??"",x=a?.badge??0,f=n.jsx("span",{className:"side-nav__icon-wrap",children:n.jsx(tt,{icon:b,label:typeof C=="string"?C:void 0,className:"side-nav__icon",maskClassName:"side-nav__icon-image",imgClassName:void 0,svgClassName:void 0})}),h=d==="disabled",_=`side-nav__item ${i?"active":""} ${d||""} ${h?"disabled":""} ${a?.child?"side-nav__item--child":""}`,g=o.useCallback(k=>{if(h)return;const v=k.detail>0;if(v)try{k.currentTarget.blur()}catch{}u?.(p,k.currentTarget,v)},[h,p,u]);return n.jsxs("button",{type:"button",className:_,onClick:g,"aria-label":typeof C=="string"?Ui(t,C,x):void 0,"aria-current":i?"page":void 0,style:c,"aria-disabled":h,children:[f,n.jsx("span",{className:"side-nav__label button-1 f",style:m,children:C}),x>0&&n.jsx(Lt,{type:"dot",position:"inline",number:Math.min(x,99),size:24,"aria-hidden":!0}),d==="loading"&&n.jsx("span",{className:"side-nav__spinner",role:"img","aria-label":t("loader.loading","\uBD88\uB7EC\uC624\uB294 \uC911\u2026")})]})}function Ki(e){const{t}=_e.useTranslation(),{items:a=[],activeKey:r,onChange:l,unreadCount:s,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:m,onFeedback:p,appMode:C,onAppModeChange:b,scrollContainer:x}=e||{},f=C==="manager",h=o.useCallback(()=>b?.(f?"malgwi":"manager"),[b,f]),_=o.useRef(null),[g,k]=o.useState(null);o.useEffect(()=>{const A=_.current;if(!A)return;let E=null;const D=()=>{const{scrollHeight:R,clientHeight:K,scrollTop:L}=A;if(R<=K+1){k(O=>O===null?O:null);return}const $=Math.max(24,K/R*K),T=K-$,J=R-K,q={top:Math.round(L/J*T),height:Math.round($)};k(O=>O&&O.top===q.top&&O.height===q.height?O:q)},N=()=>{if(typeof requestAnimationFrame>"u"){D();return}E===null&&(E=requestAnimationFrame(()=>{E=null,D()}))};D(),A.addEventListener("scroll",N,{passive:!0});const F=typeof ResizeObserver<"u"?new ResizeObserver(N):null;F?.observe(A);for(const R of Array.from(A.children))F?.observe(R);return()=>{E!==null&&cancelAnimationFrame(E),A.removeEventListener("scroll",N),F?.disconnect()}},[a]);const v=o.useRef(null),B=o.useCallback(A=>{const E=_.current;E&&(A.preventDefault(),v.current={y:A.clientY,top:E.scrollTop},A.currentTarget.setPointerCapture(A.pointerId))},[]),y=o.useCallback(A=>{const E=_.current,D=v.current;!E||!D||(E.scrollTop=D.top+(A.clientY-D.y)*(E.scrollHeight/E.clientHeight))},[]),w=o.useCallback(A=>{v.current=null,A.currentTarget.hasPointerCapture(A.pointerId)&&A.currentTarget.releasePointerCapture(A.pointerId)},[]);return n.jsxs("nav",{ref:_,"aria-label":t("nav.mainMenu","\uBA54\uC778 \uBA54\uB274"),className:"side-nav__menu",children:[g&&n.jsx("div",{className:"side-nav__scroll","aria-hidden":"true",children:n.jsx("div",{className:"side-nav__scroll-thumb",style:{top:g.top,height:g.height},onPointerDown:B,onPointerMove:y,onPointerUp:w,onPointerCancel:w})}),n.jsxs("div",{className:"side-nav__menu-list",children:[(a||[]).filter(A=>!A.section&&(A.key||A.label)).map((A,E)=>n.jsxs(o.Fragment,{children:[A.divider&&n.jsx("div",{className:"side-nav__separator"}),n.jsx(Gi,{item:A,active:!!A.key&&A.key===r,state:A.disabled?"disabled":void 0,onClick:(D,N,F)=>{if(A.disabled)return;if(A.href){if(qi(A.href)&&window.open(A.href,"_blank","noopener,noreferrer"),F)try{N?.blur()}catch{}return}if(l?.(A.key),Do(x,"SideNav"),!F)return;try{N?.blur()}catch{}if(typeof window<"u"&&window.matchMedia){if(!window.matchMedia("(min-width: 768px) and (max-width: 1023px)").matches)return}else return;const R=document.querySelector(".header");if(R){const K=typeof R.matches=="function";if(!(window.matchMedia("(hover: hover)").matches&&K&&R.matches(":hover"))){R.classList.add("header--force-collapsed");const L=()=>{R.classList.remove("header--force-collapsed"),R.removeEventListener("mouseenter",L)};R.addEventListener("mouseenter",L)}}}})]},A.key??`side-nav__item-${E}`)),b&&n.jsx("div",{className:"side-nav__separator side-nav__separator--short"}),b&&n.jsx(Gi,{item:{key:"__mode-switch__",label:f?t("nav.goToMalgwi","\uB9D0\uADC0\uB85C \uC774\uB3D9"):t("nav.goToManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800\uB85C \uC774\uB3D9"),icon:f?"arrow-left":"arrow-right"},onClick:h})]}),n.jsx(Uy,{activeKey:r,unreadCount:s,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:m,onFeedback:p})]})}var dr='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEar_ko" xmlns="http://www.w3.org/2000/svg" width="583.33" height="240" viewBox="0 0 583.33 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z"/></g><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',jo='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEarManager_ko" xmlns="http://www.w3.org/2000/svg" width="1035.43" height="240" viewBox="0 0 1035.43 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z"/><path d="M644.64,52.32v131.48h-58.24V52.32h58.24ZM634.45,173.81V62.32h-38.25v111.49h38.25ZM713.65,193.61h-10.19v-75.16h-28.64v72.66h-10V46.94h10v61.32h28.64v-62.28h10.19v147.63Z"/><path d="M819.46,171.6c6.6-1.35,12.08-3.11,16.44-5.29v10.19c-4.23,2.31-9.64,4.1-16.24,5.38-6.6,1.28-13.3,1.92-20.09,1.92h-57.28V51.36h10.57v122.25h46.71c6.66,0,13.29-.67,19.89-2.02ZM851.47,193.8V45.98h10.57v147.63l-10.57.19Z"/><path d="M935.66,113.64l48.44,62.28-8.27,6.34-43.06-56.13c-4.36,16.66-10.38,29.92-18.07,39.79-7.69,9.87-16.72,15.83-27.1,17.88v-10.76c8.71-2.05,16.21-8.07,22.49-18.07,6.28-10,11.05-22.97,14.32-38.92,3.27-15.95,5.03-33.86,5.29-53.73h-39.21v-10h88.61v10h-39.02c-.13,18.84-1.6,35.95-4.42,51.32ZM1015.43,193.61h-10.38v-79.39h-37.87v-10.19h37.87v-58.05h10.38v147.63Z"/></g><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',Gy='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_SpeechEar" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>';function Yi({appMode:e}){const{t}=_e.useTranslation(),a=e==="manager",r=a?jo:dr,l=Gy;return n.jsxs("div",{className:"brand-identity__root","aria-label":t("header.biArea","BI \uC601\uC5ED"),children:[n.jsx("img",{src:l,alt:t("header.biSymbol","BI \uC2EC\uBCFC"),className:"brand-identity__image brand-identity__image--symbol"}),n.jsx("img",{src:r,alt:a?t("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):t("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0"),className:"brand-identity__image brand-identity__image--logo"})]})}function Zi({activeKey:e,onChange:t,items:a,malgwiItems:r,managerItems:l,unreadCount:s,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:m,onFeedback:p,appMode:C,onAppModeChange:b,scrollContainer:x}){const{t:f}=_e.useTranslation(),h=Cn("(max-width: 767px)"),_=o.useMemo(()=>(a??[]).filter(R=>!R.section&&(R.key||R.label)).map(R=>({key:R.key,label:typeof R.label=="string"?R.label:void 0,icon:R.icon,state:R.disabled?"disabled":void 0,badgeCount:R.badge})),[a]),g=o.useCallback(R=>{const K=a?.find(L=>L.key===R);if(!K?.disabled){if(K?.href){qi(K.href)&&window.open(K.href,"_blank","noopener,noreferrer");return}t?.(R)}},[a,t]),k=o.useMemo(()=>{const R=[];return i&&R.push({key:"debug",icon:"terminal",label:f("nav.debug","\uB514\uBC84\uADF8"),onClick:i}),u&&R.push({key:"notifications",icon:"bell",label:f("nav.notifications","\uC54C\uB9BC"),badgeCount:s,onClick:u}),d&&R.push({key:"settings",icon:"settings",label:f("nav.settings","\uC124\uC815"),onClick:d}),m&&R.push({key:"help",icon:"message-circle-question-mark",label:f("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:m}),p&&R.push({key:"feedback",icon:"bug",label:f("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:p}),c&&R.push({key:"account",icon:"user-round",label:f("nav.account","\uACC4\uC815"),onClick:c}),R},[f,i,u,d,m,p,c,s]),v=o.useCallback((R,K)=>({position:"fixed",top:R.bottom+8,right:Math.max(8,window.innerWidth-R.right),zIndex:Ia(K)}),[]),B=o.useId(),{open:y,toggle:w,close:A,style:E,triggerRef:D,menuRef:N}=Fa({computeStyle:v,onScroll:"ignore",onResize:"reposition"}),F=o.useMemo(()=>[{items:k.map(R=>({label:R.label,icon:R.icon,badgeCount:R.badgeCount,selected:R.selected??(!!R.key&&R.key===e),closeOnSelect:!0,onClick:()=>{R.onClick?.(),A()}}))}],[k,e,A]);return n.jsxs("aside",{className:`header${C==="manager"?" header--manager":""}`,children:[n.jsxs("div",{className:"header__bi",children:[n.jsx(Yi,{appMode:C}),n.jsxs("div",{className:"header__menu-button",ref:D,children:[n.jsx(fe,{htmlType:"button",size:48,type:"dot",shape:"pill",variant:"default",useBorder:!1,icon:"menu",ariaLabel:u&&s&&s>0?f("nav.badgeInsideLabel",{label:f("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),count:s,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):f("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),onClick:w,"aria-expanded":y,"aria-controls":y?B:void 0}),!!u&&!!s&&s>0&&n.jsx(Lt,{type:"dot",number:Math.min(s,99),size:24,"aria-hidden":!0}),y&&cn.createPortal(n.jsx("div",{id:B,role:"group","aria-label":f("header.utilMenu","\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274"),className:"tooltip-content",style:E,ref:N,children:n.jsx(Oa,{columns:F,onClose:A})}),document.body)]})]}),n.jsx(Ki,{scrollContainer:x,items:a,activeKey:e??void 0,onChange:t,unreadCount:s,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:m,onFeedback:p,appMode:C,onAppModeChange:b}),h&&n.jsx(Vi,{items:_,activeKey:e??void 0,onChange:g,scrollContainer:x,appMode:C,onAppModeChange:b})]})}const Ky=Zi,Yy=()=>Vt.t("passCard.planSuffix","\uC774\uC6A9\uAD8C");function Xi(e){if(!(e==null||e==="")){if(typeof e=="string"&&/^\s*\d[\d,]*\s*$/.test(e)){const t=Number(e.replace(/[,\s]/g,""));if(Number.isFinite(t))return ia(`${t.toLocaleString("ko-KR")}\uC6D0`)}return ia(typeof e=="number"?`${e.toLocaleString("ko-KR")}\uC6D0`:e)}}function Zy(e){const t=`${e.code??""} ${e.name??""}`.toLowerCase();return/manager|매니저/.test(t)?"manager":"speechear"}function Xy(e){if(e.durationDays&&e.durationDays>0){const s=e.durationDays;return s%365===0?`${s/365}\uB144`:`${s}\uC77C`}const t=(e.code??"").match(/(\d+)(d|y)\b/i);if(t)return t[2].toLowerCase()==="y"?`${t[1]}\uB144`:`${t[1]}\uC77C`;const a=e.name??"",r=a.match(/(\d+\s*(?:년|개월|주|일))\s*(?:이용권)?\s*$/);if(r)return r[1].replace(/\s+/g,"");const l=a.match(/(\d+)\s*-?\s*(day|year)s?\b/i);return l?l[2].toLowerCase()==="year"?`${l[1]}\uB144`:`${l[1]}\uC77C`:a||Yy()}function Jy(e){const t=(e??"").match(/(\d+)(d|y)\b/i);if(!t)return null;const a=Number(t[1]);return t[2].toLowerCase()==="y"?a*365:a}function Ji(e){return{type:e.type??Zy(e),plan:Xy(e),label:e.label,price:Xi(e.price),originalPrice:Xi(e.originalPrice),discountLabel:e.discountLabel}}var Qy='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEar_ko_mono" xmlns="http://www.w3.org/2000/svg" width="583.33" height="240" viewBox="0 0 583.33 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z" fill="%23fff"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z" fill="%23fff"/></g><g id="symbol"><g opacity=".5"><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23fff"/></g><path d="M140,30h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84-3.88-7.1-6.08-15.25-6.08-23.92v-80c0-16.57,13.43-30,30-30h80c8.66,0,16.81,2.21,23.92,6.08-8.48-15.54-24.97-26.08-43.92-26.08Z" fill="%23fff"/><path d="M183.92,56.08c3.88,7.1,6.08,15.25,6.08,23.92v80c0,16.57-13.43,30-30,30h-80c-8.66,0-16.81-2.21-23.92-6.08,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%23fff"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',e2='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEarManager_ko_mono" xmlns="http://www.w3.org/2000/svg" width="1035.43" height="240" viewBox="0 0 1035.43 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z" fill="%23fff"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z" fill="%23fff"/><path d="M644.64,52.32v131.48h-58.24V52.32h58.24ZM634.45,173.81V62.32h-38.25v111.49h38.25ZM713.65,193.61h-10.19v-75.16h-28.64v72.66h-10V46.94h10v61.32h28.64v-62.28h10.19v147.63Z" fill="%23fff"/><path d="M819.46,171.6c6.6-1.35,12.08-3.11,16.44-5.29v10.19c-4.23,2.31-9.64,4.1-16.24,5.38-6.6,1.28-13.3,1.92-20.09,1.92h-57.28V51.36h10.57v122.25h46.71c6.66,0,13.29-.67,19.89-2.02ZM851.47,193.8V45.98h10.57v147.63l-10.57.19Z" fill="%23fff"/><path d="M935.66,113.64l48.44,62.28-8.27,6.34-43.06-56.13c-4.36,16.66-10.38,29.92-18.07,39.79-7.69,9.87-16.72,15.83-27.1,17.88v-10.76c8.71-2.05,16.21-8.07,22.49-18.07,6.28-10,11.05-22.97,14.32-38.92,3.27-15.95,5.03-33.86,5.29-53.73h-39.21v-10h88.61v10h-39.02c-.13,18.84-1.6,35.95-4.42,51.32ZM1015.43,193.61h-10.38v-79.39h-37.87v-10.19h37.87v-58.05h10.38v147.63Z" fill="%23fff"/></g><g id="symbol"><g opacity=".5"><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23fff"/></g><path d="M140,30h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84-3.88-7.1-6.08-15.25-6.08-23.92v-80c0-16.57,13.43-30,30-30h80c8.66,0,16.81,2.21,23.92,6.08-8.48-15.54-24.97-26.08-43.92-26.08Z" fill="%23fff"/><path d="M183.92,56.08c3.88,7.1,6.08,15.25,6.08,23.92v80c0,16.57-13.43,30-30,30h-80c-8.66,0-16.81-2.21-23.92-6.08,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%23fff"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',Qi='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_IHAB_mono" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="%23fff"/></svg>';const Zn={text:"--pass-card-text",sub:"--pass-card-sub",copyright:"--pass-card-copyright"},To=new WeakMap;function t2(e){if(e)return To.get(e)}function jn(e,t){e&&(e.style.setProperty(Zn.text,t.text),e.style.setProperty(Zn.sub,t.sub),t.copyrightColor&&e.style.setProperty(Zn.copyright,t.copyrightColor),To.set(e,t))}function Tn(e){e&&(e.style.removeProperty(Zn.text),e.style.removeProperty(Zn.sub),e.style.removeProperty(Zn.copyright),To.delete(e))}const eu={text:"var(--color-pureBlack)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function tu(e={}){const t=Mt(eu,jn,Tn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-two-circle","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-two-circle__c1"}),n.jsx("div",{className:"pass-card-bg-two-circle__c3"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-two-circle__symbol",style:{"--symbol-url":`url("${Qi}")`}})]})}const nu="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71Z",pa=240;var za='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_IHAB" xmlns="http://www.w3.org/2000/svg" width="240" height="240" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 240 240"><defs><linearGradient id="linear-gradient" x1="62.99" y1="62.99" x2="190.71" y2="190.71" gradientUnits="userSpaceOnUse"><stop offset=".2" stop-color="%23499cdf"/><stop offset=".8" stop-color="%234dcdc0"/></linearGradient></defs><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="url(%23linear-gradient)"/></svg>';const n2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"},a2=100,r2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function au(e={}){const t=Mt(n2,jn,Tn),a="var(--color-main)",r=270,l=170;return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-sound-move","aria-hidden":"true",children:[n.jsx("svg",{className:"pass-card-bg-sound-move__svg",viewBox:"0 0 300 189",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:r2.map(({scale:s,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${l}) scale(${s*a2/pa}) translate(${-pa/2} ${-pa/2})`,opacity:i,children:n.jsx("path",{d:nu,fill:"none",stroke:a,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})},u))}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-move__symbol",style:{"--symbol-url":`url("${za}")`}})]})}const o2={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",logoColor:"_mono",copyrightColor:"#ffffff"},s2=100,l2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function i2(e={}){const t=Mt(o2,jn,Tn),a="#ffffff",r=270,l=170;return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-sound-move-v1","aria-hidden":"true",children:[n.jsx("svg",{className:"pass-card-bg-sound-move-v1__svg",viewBox:"0 0 300 189",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:l2.map(({scale:s,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${l}) scale(${s*s2/pa}) translate(${-pa/2} ${-pa/2})`,opacity:i,children:n.jsx("path",{d:nu,fill:"none",stroke:a,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})},u))}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-move-v1__symbol",style:{"--symbol-url":`url("${Qi}")`}})]})}const u2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function c2(e={}){const t=Mt(u2,jn,Tn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-talk","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-talk__shape pass-card-bg-talk__shape--left"}),n.jsx("div",{className:"pass-card-bg-talk__shape pass-card-bg-talk__shape--right"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-talk__symbol",style:{"--symbol-url":`url("${za}")`}})]})}const d2={Logo_SpeechEar_ko:{"":dr,_mono:Qy},Logo_SpeechEarManager_ko:{"":jo,_mono:e2}};function p2(e,t){if(e)return d2[e]?.[t??""]??void 0}const m2={speechear:dr,manager:jo},h2={speechear:"Logo_SpeechEar_ko",manager:"Logo_SpeechEarManager_ko"},ru=10;function C2(e){return e<=0?0:e>=86400?Math.floor(e/86400)*86400:e>=3600?Math.floor(e/3600)*3600:e>=60?Math.floor(e/60)*60:Math.floor(e)}function ou(e,t){if(e<=0)return t("passCard.remainingSecond",{n:0});const a=Math.floor(e/86400);if(a>0)return t("passCard.remainingDay",{n:a});const r=Math.floor(e/3600);if(r>0)return t("passCard.remainingHour",{n:r});const l=Math.floor(e/60);return l>0?t("passCard.remainingMinute",{n:l}):t("passCard.remainingSecond",{n:Math.floor(e)})}function f2(e,t,a){if(e==="manager"){const r=/년/.test(t)||/yr|year/i.test(t)||/1년|365/.test(t),l=a==="\uC624\uD508\uD2B9\uAC00"||a===Vt.t("passCard.specialLabel");return r?n.jsx(c2,{}):l?n.jsx(i2,{}):n.jsx(au,{})}return n.jsx(tu,{})}function su({ariaLabel:e,product:t,showPrice:a=!1,plan:r,type:l,endDate:s,remainingSeconds:i,endInclusive:u=!1,state:c="active",bg:d,bgOnly:m=!1,textColor:p,subColor:C,copyrightColor:b,logoSrc:x,label:f,price:h,originalPrice:_,discountLabel:g,onUse:k,onRefund:v,onDelete:B}){const{t:y}=_e.useTranslation(),w=t?Ji(t):void 0,A=l??w?.type??"speechear",E=r??w?.plan??y("passCard.planSuffix","\uC774\uC6A9\uAD8C"),D=f??w?.label,N=h??(a?w?.price:void 0),F=_??(a?w?.originalPrice:void 0),R=g??w?.discountLabel,K=o.useMemo(()=>{if(N)return null;const H=t?.durationDays??Jy(t?.code);if(!H||H<=0)return i!=null?{percent:null,remainingLabel:ou(i,y)}:null;const U=H*86400;let pe;if(i!=null)pe=i;else if((c==="active"||c==="expired")&&s){const me=new Date(s).getTime();if(Number.isNaN(me))return null;const ie=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(s)),be=/^(\d{4})-(\d{2})-(\d{2})/.exec(La()),he=Math.round(ie&&be?(Date.UTC(+ie[1],+ie[2]-1,+ie[3])-Date.UTC(+be[1],+be[2]-1,+be[3]))/864e5:(me-Date.now())/864e5);pe=Math.max(0,u?he+1:he)*86400}else c==="expired"?pe=0:pe=U;const Ee=C2(pe),ge=Math.max(0,Math.min(100,Math.floor(Math.min(Ee,U)/U*100)));return c==="pending"&&ge>=100?null:{percent:ge,remainingLabel:c==="expired"?y("passCard.expired","\uB9CC\uB8CC\uB428"):ou(pe,y)}},[N,c,s,i,u,t?.durationDays,t?.code,y]),L=o.useRef(null),[$,T]=o.useState({}),[J,q]=o.useState(null),O=!!(k||v||B),Q=o.useRef(!1),P=o.useRef(void 0),[V,W]=o.useState(x);o.useLayoutEffect(()=>{W(x)},[x]),o.useLayoutEffect(()=>{const H=L.current;H&&(p!==void 0&&H.style.setProperty("--pass-card-text",p),C!==void 0&&H.style.setProperty("--pass-card-sub",C),b!==void 0&&H.style.setProperty("--pass-card-copyright",b))},[p,C,b]),o.useLayoutEffect(()=>{const H=L.current;if(!H)return;const U=t2(H);if(!x){const pe=h2[A],Ee=c==="expired"?"_mono":U?.logoColor??"",ge=p2(pe,Ee);W(ge)}},[d,x,A,c]);const G=H=>{const U=L.current;if(!U)return null;const{left:pe,top:Ee,width:ge,height:me}=U.getBoundingClientRect(),ie=(H.clientX-pe)/ge-.5;return{rotateX:-((H.clientY-Ee)/me-.5)*ru,rotateY:ie*ru}},S=(H,U)=>{const pe=U*-.7,Ee=H*.7+10,ge=20+(Math.abs(H)+Math.abs(U))*.4;return`${pe}px ${Ee}px ${ge}px rgba(0, 0, 0, 0.18)`},M=o.useCallback(H=>{if(da())return;Q.current=!0,clearTimeout(P.current),P.current=setTimeout(()=>{Q.current=!1},200);const U=G(H);U&&T({transform:`perspective(800px) rotateX(${U.rotateX}deg) rotateY(${U.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:S(U.rotateX,U.rotateY),transition:"transform 0.25s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.25s cubic-bezier(0.23, 1, 0.32, 1)"})},[]),I=o.useCallback(H=>{if(da())return;const U=G(H);if(!U)return;const pe=Q.current?"transform 0.2s ease, box-shadow 0.2s ease":"none";T({transform:`perspective(800px) rotateX(${U.rotateX}deg) rotateY(${U.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:S(U.rotateX,U.rotateY),transition:pe})},[]),Z=o.useCallback(()=>{clearTimeout(P.current),Q.current=!1,T({transform:"perspective(800px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)",boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.08)",transition:"transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1)"})},[]),le=o.useCallback(()=>q(null),[]),oe=o.useMemo(()=>{const H=y("passCard.planSuffix","\uC774\uC6A9\uAD8C"),U=E.replace("\uC774\uC6A9\uAD8C","").replace(H==="\uC774\uC6A9\uAD8C"?"":H,"").trim(),pe=U.match(/^(.*?)(일|년)$/);return pe?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"h0 pass-card__plan-number",children:pe[1]}),n.jsx("span",{className:"h5b pass-card__plan-unit",children:pe[2]==="\uB144"?y("passCard.unitYear","\uB144"):y("passCard.unitDay","\uC77C")})]}):n.jsx("span",{className:"h0",children:U})},[E,y]),de=o.useMemo(()=>{const H=ia(N);if(!H)return null;const U=H.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!U)return n.jsx("span",{className:"h1",children:H});const[,pe,Ee,ge]=U;return n.jsxs(n.Fragment,{children:[pe&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:pe}),n.jsx("span",{className:"h1 pass-card__price-amount",children:Ee}),ge.trim()&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:ge.trim()})]})},[N]),re=o.useCallback(()=>{O&&q(H=>{if(H)return null;const U=L.current?.getBoundingClientRect();if(!U)return null;const pe=50;return{left:U.left,right:U.right,width:U.width,height:U.height,x:U.x,y:U.y+pe,top:U.top+pe,bottom:U.bottom+pe}})},[O]),z=o.useCallback(H=>{O&&(H.key==="Enter"||H.key===" ")&&(H.preventDefault(),re())},[O,re]),ne=[{items:[...k?[{label:y("passCard.menu.use","\uC0AC\uC6A9\uD558\uAE30"),icon:"play",onClick:()=>{k(),q(null)},closeOnSelect:!0}]:[],...v?[{label:y("passCard.menu.refund","\uD658\uBD88\uD558\uAE30"),icon:"rotate-ccw",onClick:()=>{v(),q(null)},closeOnSelect:!0}]:[],...B?[{label:y("passCard.menu.delete","\uC0AD\uC81C\uD558\uAE30"),icon:"trash-2",onClick:()=>{B(),q(null)},closeOnSelect:!0}]:[]]}];return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card-frame",children:n.jsxs("div",{ref:L,className:`pass-card pass-card--${c}${O?" pass-card--clickable":""}`,style:$,onMouseEnter:M,onMouseMove:I,onMouseLeave:Z,onPointerUp:H=>{H.pointerType==="touch"&&Z()},onPointerCancel:H=>{H.pointerType==="touch"&&Z()},onClick:re,onKeyDown:O?z:void 0,role:O?"button":void 0,tabIndex:O?0:void 0,"aria-label":e,"aria-haspopup":O?"menu":void 0,"aria-expanded":O?!!J:void 0,children:[d??f2(A,E,D),!m&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card__top",children:n.jsxs("div",{className:"pass-card__top-left",children:[n.jsx("img",{src:V??m2[A],className:"pass-card__logo",alt:A==="manager"?y("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):y("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0")}),n.jsxs("div",{className:"pass-card__plan",children:[n.jsx("div",{children:oe}),n.jsx("span",{className:"h5b pass-card__plan-suffix",children:D?y("passCard.labeledPlan",{label:D}):y("passCard.planSuffix","\uC774\uC6A9\uAD8C")})]})]})}),N?n.jsxs("div",{className:"pass-card__price-area",children:[R&&n.jsx("span",{className:"pass-card__discount body-3",children:R}),n.jsxs("div",{className:"pass-card__price",children:[F&&n.jsx("span",{className:"pass-card__price-original body-3",children:ia(F)}),de]})]}):K?n.jsxs("div",{className:"pass-card__usage",children:[n.jsx("span",{className:"h5b pass-card__usage-remaining",children:K.remainingLabel}),K.percent!=null&&n.jsxs("span",{className:"pass-card__usage-percent",children:[n.jsx("span",{className:"h1 pass-card__usage-value",children:K.percent}),n.jsx("span",{className:"h5b pass-card__usage-symbol",children:"%"})]})]}):n.jsx("div",{className:"pass-card__copyright caption-2","aria-hidden":"true",children:"\xA9 IHAB Corp. All rights reserved."})]})]})}),J&&n.jsx(vn,{anchorRect:J,onClose:le,ariaLabel:y("tooltip.menu","\uBA54\uB274"),children:n.jsx(Oa,{columns:ne,onClose:le,size:"small"})})]})}const g2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function b2(e={}){const t=`passcard-sound-line-grad-${o.useId()}`,a=Mt(g2,jn,Tn);return n.jsxs("div",{ref:a,className:"pass-card-bg pass-card-bg-sound-line","aria-hidden":"true",children:[n.jsxs("svg",{className:"pass-card-bg-sound-line__svg",viewBox:"0 0 500 300",preserveAspectRatio:"xMidYMid slice",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("defs",{children:n.jsxs("linearGradient",{id:t,x1:"0",y1:"0",x2:"1",y2:"0",children:[n.jsx("stop",{offset:"20%",stopColor:"var(--color-main)"}),n.jsx("stop",{offset:"80%",stopColor:"var(--color-sub)"})]})}),n.jsx("g",{transform:"translate(25, 45)",children:n.jsx("path",{d:"M -30 150 C 40 80, 100 220, 160 150 S 280 80, 340 150 S 460 220, 510 150",fill:"none",stroke:`url(#${t})`,strokeWidth:"50",strokeLinecap:"round"})})]}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-line__symbol",style:{"--symbol-url":`url("${za}")`}})]})}const y2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function v2(e={}){const t=Mt(y2,jn,Tn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-talk-v1","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-talk-v1__shape pass-card-bg-talk-v1__shape--left"}),n.jsx("div",{className:"pass-card-bg-talk-v1__shape pass-card-bg-talk-v1__shape--right"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-talk-v1__symbol",style:{"--symbol-url":`url("${za}")`}})]})}function x2(e,t){if(e){if(t==="manager_pro")return n.jsx(v2,{});if(t==="manager_standard")return n.jsx(b2,{});if(t==="manager_lite")return n.jsx(au,{})}}function _2(e){const t=ia(e);if(!t)return null;const a=t.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!a)return t;const[,r,l,s]=a;return n.jsxs(n.Fragment,{children:[r&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:r}),l,s.trim()&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:s.trim()})]})}function w2(e){const{t}=_e.useTranslation(),a=t("payment.plan.tierFallback",{defaultValue:"\uC774\uC6A9\uAD8C"}),r=t("payment.plan.openPromo",{defaultValue:"\uC624\uD508 \uD2B9\uAC00"}),{plan:l,onSelect:s,period:i="monthly",ownedCodes:u}=e||{},c=v=>!!v&&!!u?.includes(v),d=v=>v.onceOnly??/오픈\s*특가/.test(v.label??""),m=(l.tiers||[]).some(v=>d(v)&&c(v.code)),p=v=>{const B=v.prices?v.prices[i]:v.price;return B?(l.tiers||[]).some(y=>!!y.badge&&y.originals?.[i]===B):!1},C=l.colorToken?`var(--color-${l.colorToken})`:"var(--color-gray)",b=t("payment.plan.freePrice","\uBB34\uB8CC"),x=t("payment.products.mgrEnterprise.tier.price","\uBB38\uC758"),f=v=>v.prices?v.prices[i]:v.price,h=(l.tiers||[]).length>0&&(l.tiers||[]).every(v=>{const B=f(v);return B==="\uBB34\uB8CC"||B===b||B==="0\uC6D0"||typeof B=="string"&&/\d/.test(B)&&!/[1-9]/.test(B)}),_=(l.tiers||[]).length>0&&(l.tiers||[]).every(v=>{const B=f(v);return B==="\uBB38\uC758"||B===x}),g=l.group==="org",k=g?"manager":"speechear";return n.jsxs("div",{className:"payment-plan__card",style:{borderColor:C,"--plan-color":C},children:[l.cardBadge&&n.jsx("div",{className:"payment-plan__card-badge",children:n.jsx(Lt,{label:l.cardBadge,variant:"main",size:"medium",fill:"soft"})}),n.jsxs("div",{className:"payment-plan__title",children:[n.jsx("p",{className:"payment-plan__quote body-3b",style:{color:C},children:l.quote||"\xA0"}),n.jsx("h3",{className:"payment-plan__title-heading h1",children:l.tier??l.title}),n.jsx("p",{className:"payment-plan__subtitle body-3",children:l.subtitle})]}),n.jsxs("div",{className:"payment-plan__box",children:[n.jsx("span",{className:"payment-plan__box-title body-3b",children:t("payment.plan.recommendedFor","\uC774\uB7F0 \uBD84\uAED8 \uCD94\uCC9C\uD569\uB2C8\uB2E4.")}),n.jsx("ul",{className:"payment-plan__feature-list",children:(l.recommendedFor||[]).map((v,B)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(tt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:C}}),v]},B))})]}),n.jsxs("div",{className:"payment-plan__box",children:[n.jsx("span",{className:"payment-plan__box-title body-3b",children:t("payment.plan.features","\uD575\uC2EC \uAE30\uB2A5")}),n.jsx("ul",{className:"payment-plan__feature-list",children:(l.features||[]).map((v,B)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(tt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:C}}),v]},B))})]}),n.jsx("div",{className:"payment-plan__card-pricing",children:h?null:_?n.jsx(fe,{htmlType:"button",className:"payment-plan__contact-button",label:t("payment.plan.contact",{defaultValue:"\uBB38\uC758\uD558\uAE30"}),variant:"main",size:56,onClick:()=>l.tiers?.[0]&&s?.({...l.tiers[0],productId:l.id,productTitle:l.title})}):n.jsx(n.Fragment,{children:n.jsx("div",{className:"payment-plan__pricing-list",children:(l.tiers||[]).map(v=>{const B=v.label||a,y=d(v),w=y||v.openPromo===!0,A=B.replace(/^오픈\s*특가\s*/,"")||a,E=v.prices?v.prices[i]:v.price,D=v.badge?w?`${r}
|
|
823
823
|
${v.badge}`:v.badge:void 0;if(y&&c(v.code))return null;if(!v.badge&&!m)return p(v)?null:n.jsxs("div",{className:`payment-plan__pricing-row payment-plan__pricing-row--static${v.highlight?" payment-plan__pricing-row--highlight":""}`,children:[n.jsx("div",{className:"payment-plan__pricing-row-title",children:n.jsx("div",{className:"payment-plan__pricing-row-label h5b",children:v.label})}),n.jsx("div",{className:"payment-plan__pricing-row-price",children:n.jsx("span",{className:"payment-plan__pricing-current h1",children:_2(E)})})]},v.id);const N=l.tier??(g?l.title:void 0),F=n.jsx(su,{showPrice:!0,product:{type:k,code:v.code,name:A,label:N,price:E,originalPrice:v.originals?.[i]??void 0,discountLabel:D},bg:x2(g,l.id)}),R=()=>s?.({...v,productId:l.id,productTitle:l.title,preview:F});return n.jsx("div",{className:"payment-plan__pricing-card",onClick:R,onKeyDown:s?K=>{K.target===K.currentTarget&&(K.key==="Enter"||K.key===" ")&&(K.preventDefault(),R())}:void 0,role:s?"button":void 0,tabIndex:s?0:void 0,children:F},v.id)})})})})]})}function B2({variant:e="default"}){return n.jsxs("div",{className:`pass-card-bg pass-card-bg--${e}`,"aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--1"}),n.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--2"}),n.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--3"})]})}var Mo='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_IHAB_en" xmlns="http://www.w3.org/2000/svg" width="765.08" height="240" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 765.08 240"><defs><linearGradient id="linear-gradient" x1="62.99" y1="62.99" x2="190.71" y2="190.71" gradientUnits="userSpaceOnUse"><stop offset=".2" stop-color="%23499cdf"/><stop offset=".8" stop-color="%234dcdc0"/></linearGradient></defs><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="url(%23linear-gradient)"/><g id="text"><path d="M316.21,190.6h-36.74V50.61h36.74v139.99Z"/><path d="M335.16,50.61h36.74v55.11h51.63v-55.11h36.93v139.99h-36.93v-55.11h-51.63v55.11h-36.74V50.61Z"/><path d="M473.99,190.6l46.6-139.99h50.08l46.41,139.99h-39.64l-8.31-27.46h-46.99l-8.31,27.46h-39.83ZM560.62,135.3l-14.5-46.99h-1.16l-14.31,46.99h29.97Z"/><path d="M631,50.61h59.94c31.9,0,48.73,13.73,48.73,35.19,0,15.47-11.02,27.26-26.88,30.55v1.35c17.6.58,32.29,13.54,32.29,33.45,0,22.82-18.56,39.45-49.11,39.45h-64.97V50.61ZM701.77,93.53c0-8.89-6.96-13.92-17.02-13.92h-17.02v27.84h16.44c10.25,0,17.6-5.03,17.6-13.92ZM706.22,146.51c0-10.25-7.35-16.05-19.14-16.05h-19.34v30.55h18.76c13.15,0,19.72-5.03,19.72-14.5Z"/></g></svg>';const lu={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#c9c9c9"};function k2(){const e=Mt(lu,jn,Tn);return n.jsx("div",{ref:e,className:"pass-card-bg pass-card-bg-ihab","aria-hidden":"true",children:n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-ihab__symbol-top",style:{"--symbol-url":`url("${Mo}")`}})})}const iu={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEarManager_ko",logoColor:"_mono",copyrightColor:"#ffffff"};function A2(e={}){const t=Mt(iu,jn,Tn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-left-color-grid","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-left-color-grid__bar"}),n.jsx("div",{className:"pass-card-bg-left-color-grid__grid"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-left-color-grid__symbol",style:{"--symbol-url":`url("${za}")`}})]})}function uu({keys:e,anchor:t="top-right",scale:a,className:r=""}){const l=Array.isArray(e)?e:[e];return n.jsx("span",{className:we("shortcut-badge",`shortcut-badge--${t}`,r),style:a===void 0?void 0:{"--shortcut-badge-scale":String(a)},children:l.map((s,i)=>n.jsxs("span",{className:"shortcut-badge__group",children:[i>0&&n.jsx("span",{className:"shortcut-badge__plus",children:"+"}),n.jsx("kbd",{className:"shortcut-badge__key",children:s})]},`${s}-${i}`))})}const Wa=(e,t,a)=>e+(t-e)*a;function N2({speakers:e,size:t=300,viewT:a=0,activeSpeakerId:r=null,playedIds:l,selectedId:s=null,answerId:i=null,showFeedback:u=!1,pulseSelected:c=!1,pulseSelectedDuration:d,pulseScale:m,clickable:p=!1,onSelectSpeaker:C,buttonSize:b=40,showIcon:x=!0,onCenterClick:f,centerLabel:h,centerDisabled:_=!1,centerAttention:g=!1,shortcutAnchor:k="top-right",shortcutScale:v,scaleShortcut:B=!1}){const{t:y}=_e.useTranslation(),w=Math.max(0,Math.min(1,a)),A=t/2,E=110/300,D=.18,N=H=>t*(E+(H-1)*D),F=H=>{const U=N(H.row??1),pe=H.angleDeg*Math.PI/180;return{x:A+U*Math.cos(pe),y:A+U*Math.sin(pe)}},R=Math.max(...e.map(H=>H.row??1),1),K=t*.08,L=t*.1,$=t*.24,T=t-2*K,J=t-L-$,q=t-$/2,O=o.useMemo(()=>[...new Set(e.map(H=>H.deg))].sort((H,U)=>H-U),[e]),Q=O.length,P=Math.max(68,Q>1?T/(Q-1):0),V=o.useMemo(()=>new Map(O.map((H,U)=>[H,U])),[O]),W=H=>{const U=V.get(H.deg)??0,pe=A+(U-(Q-1)/2)*P,Ee=R>1?Math.min(68,J/(R-1)):0,ge=Ee*(R-1),me=L+(J-ge)/2,ie=R===1?L+J*.4:me+(R-(H.row??1))*Ee;return{x:pe,y:ie}},G=H=>{const U=F(H),pe=W(H);return{x:Wa(U.x,pe.x,w),y:Wa(U.y,pe.y,w)}},S={x:A,y:Wa(A,q,w)},M=Math.round(b*1.2),I=Math.round(Math.max(16,Math.min(80,b*.7))),Z=[],le=new Map;for(const H of e){const U=H.row??1;le.has(U)||le.set(U,[]),le.get(U).push(H)}for(const[H,U]of le.entries()){if(U.length<2)continue;const pe=[...U].sort((Oe,dt)=>Oe.deg-dt.deg),Ee=pe.map(Oe=>G(Oe)),ge=pe.map(Oe=>Oe.deg),me=ge[ge.length-1]-ge[0],ie=me/(ge.length-1),be=360-me,he=pe.length>=3&&ie>0&&be<=ie*1.5,ue=Math.round(N(H)*1e3)/1e3,Me=(Oe,dt,rt,nt)=>{const pt=(dt.angleDeg-Oe.angleDeg+540)%360-180;if(pt===0)return`L ${nt.x} ${nt.y}`;if(w===0)return`A ${ue} ${ue} 0 0 ${pt>0?1:0} ${nt.x} ${nt.y}`;const Ne=(Oe.angleDeg+pt/2)*Math.PI/180,Ue={x:A+ue*Math.cos(Ne),y:A+ue*Math.sin(Ne)},ke={x:(rt.x+nt.x)/2,y:(rt.y+nt.y)/2},He={x:Wa(Ue.x,ke.x,w),y:Wa(Ue.y,ke.y,w)},Be={x:2*He.x-ke.x,y:2*He.y-ke.y};return`Q ${Be.x} ${Be.y} ${nt.x} ${nt.y}`},qe=he?[...pe,pe[0]]:pe,je=he?[...Ee,Ee[0]]:Ee;let Ve=`M ${je[0].x} ${je[0].y}`;for(let Oe=1;Oe<je.length;Oe++)Ve+=" "+Me(qe[Oe-1],qe[Oe],je[Oe-1],je[Oe]);Z.push({key:`arc-${H}`,d:Ve})}const oe=o.useMemo(()=>new Set(l??[]),[l]),de=H=>({idle:"",active:y("soundCompass.state.active","\uC18C\uB9AC \uB098\uB294 \uC911"),played:y("soundCompass.state.played","\uB4E4\uC74C"),correct:y("soundCompass.state.correct","\uC815\uB2F5"),wrong:y("soundCompass.state.wrong","\uC624\uB2F5")})[H],re=H=>{if(r===H.id)return"active";if(u){if(H.id===i)return"correct";if(H.id===s&&s!==i)return"wrong"}return oe.has(H.id)?"played":"idle"},z=H=>r===H.id?"loop":u?H.id===i?"loop":null:c&&H.id===s?"once":null,ne=(H,U)=>{switch(H){case"played":case"correct":return n.jsx(Rs,{size:U});case"wrong":return n.jsx(Us,{size:U});default:return n.jsx(qs,{size:U})}};return n.jsx("div",{className:"sound-compass",children:n.jsxs("div",{className:"sound-compass__compass-wrap",style:{width:t,height:t},children:[n.jsxs("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,className:"sound-compass__svg",children:[w===0&&e.map(H=>{const{x:U,y:pe}=G(H);return n.jsx("line",{x1:S.x,y1:S.y,x2:U,y2:pe,stroke:"#dde3ec",strokeWidth:"1"},H.id)}),Z.map(H=>n.jsx("path",{d:H.d,fill:"none",stroke:"#dde3ec",strokeWidth:"1"},H.key))]}),g&&!_&&n.jsx("div",{className:"sound-compass__pulse sound-compass__pulse--active sound-compass__pulse--center",style:{width:M,height:M,left:S.x-M/2,top:S.y-M/2}}),f?n.jsx("button",{type:"button",className:`sound-compass__center sound-compass__center--button${_?" sound-compass__center--disabled":""}`,style:{width:M,height:M,left:S.x,top:S.y},"aria-label":h,"aria-disabled":_||void 0,tabIndex:_?-1:0,onClick:_?void 0:f,children:n.jsx(Ir,{size:I,color:"currentColor",strokeWidth:1.5})}):n.jsx("div",{className:"sound-compass__center",style:{width:M,height:M,left:S.x,top:S.y},children:n.jsx(Ir,{size:I,color:"currentColor",strokeWidth:1.5})}),e.map((H,U)=>{const{x:pe,y:Ee}=G(H),ge=re(H),me=z(H),ie={...v!==void 0||B?{"--shortcut-badge-scale":String(v??Math.max(.75,Math.min(3,b/56)))}:null,pointerEvents:p?"auto":"none",cursor:p?"pointer":"default",zIndex:ge!=="idle"?10:1},be=b,he=Math.round(Math.max(10,Math.min(56,be*.38))),ue=Math.round(Math.max(7,Math.min(18,be*.2))),Me=Math.round(Math.max(10,Math.min(56,be*.4))),qe=x==="answered"&&(ge==="played"||ge==="correct"||ge==="wrong"),je=x===!0||qe,Ve=!qe;return n.jsxs("div",{className:"sound-compass__speaker-pos",style:{...ie,left:pe-be/2,top:Ee-be/2},children:[me&&n.jsx("div",{className:`sound-compass__pulse sound-compass__pulse--${ge}`+(me==="once"?" sound-compass__pulse--once":""),style:{width:be,height:be,...me==="once"&&d!==void 0?{"--sc-pulse-duration-once":`${d}ms`}:null,...m!==void 0?{"--sc-pulse-scale":String(m)}:null}}),n.jsxs("button",{type:"button",tabIndex:p?0:-1,"aria-disabled":p?void 0:!0,onClick:p?()=>C?.(H.id):void 0,className:`sound-compass__speaker-btn sound-compass__speaker-btn--${ge}`,style:{width:be,height:be},"aria-label":de(ge)?`${H.label}, ${de(ge)}`:H.label,"aria-pressed":s!=null?H.id===s:void 0,children:[je&&ne(ge,he),Ve&&n.jsx("span",{className:"sound-compass__speaker-number",style:{fontSize:x===!0?ue:Me},children:U+1})]}),H.shortcut&&n.jsx(uu,{keys:H.shortcut,anchor:k,className:"sound-compass__speaker-shortcut"})]},H.id)})]})})}function E2({children:e,position:t="top-left",size:a=24,className:r=""}){return n.jsx("span",{className:we("circle-badge","circle-badge--number",`circle-badge--${a}`,`circle-badge--${t}`,r),children:e})}function D2({orientation:e="horizontal",label:t,className:a=""}){const r=we("divider",`divider--${e}`,t&&e==="horizontal"?"divider--labeled":"",a);return e==="vertical"?n.jsx("div",{className:r,role:"separator","aria-orientation":"vertical"}):t?n.jsxs("div",{className:r,role:"separator","aria-orientation":"horizontal",children:[n.jsx("span",{className:"divider__line"}),n.jsx("span",{className:"divider__label caption-1",children:t}),n.jsx("span",{className:"divider__line"})]}):n.jsx("div",{className:r,role:"separator","aria-orientation":"horizontal"})}function cu({checked:e,onChange:t,name:a,value:r,disabled:l=!1,label:s,className:i=""}){const u=o.useId();return n.jsxs("label",{className:`radio${l?" radio--disabled":""} ${i}`.trim(),htmlFor:u,children:[n.jsx("input",{id:u,type:"radio",name:a,value:r,checked:e,disabled:l,onChange:c=>t?.(c.target.checked)}),n.jsx("span",{className:"radio__dot"}),s&&n.jsx("span",{className:"radio__label body-2",children:s})]})}function S2({options:e,value:t,onChange:a,name:r,disabled:l=!1,direction:s="vertical",className:i="",ariaLabel:u}){const c=o.useId(),d=r??`radio-group-${c}`;return n.jsx("div",{className:`radio-group radio-group--${s} ${i}`.trim(),role:"radiogroup","aria-label":u,children:e.map(m=>n.jsx(cu,{name:d,value:m.value,checked:t===m.value,disabled:l||m.disabled,label:m.label,onChange:p=>{p&&a?.(m.value)}},m.value))})}const j2={info:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle"};function T2({tone:e="info",title:t,message:a,children:r,dismissible:l=!1,onDismiss:s,live:i,className:u=""}){const{t:c}=_e.useTranslation(),[d,m]=o.useState(!1),p=o.useRef(null),C=o.useCallback(()=>{const g=p.current;g&&g.contains(document.activeElement)&&sr(g),m(!0),s?.()},[s]);if(d)return null;const b=we("alert",`alert--${e}`,u),x=i??(e==="danger"||e==="warning"?"assertive":"polite"),f=x==="assertive"?"alert":x==="polite"?"status":void 0,h=!!t,_=!!(a||r);return n.jsxs("div",{ref:p,className:b,role:f,children:[n.jsxs("div",{className:"alert__body",children:[n.jsxs("div",{className:"alert__header",children:[n.jsx(tt,{icon:j2[e],size:20,className:"alert__icon"}),h&&n.jsx("span",{className:"alert__title body-2",children:t}),!h&&_&&n.jsx("div",{className:"alert__message body-3",children:a||r})]}),h&&_&&n.jsx("div",{className:"alert__message alert__message--indented body-3",children:a||r})]}),l&&n.jsx("button",{type:"button",className:"alert__dismiss",onClick:C,"aria-label":c("common.close","\uB2EB\uAE30"),children:"\xD7"})]})}const M2={ready:"search",guide:"info",error:"circle-alert"};function L2(e,t){const a=t.filter(Boolean);if(a.length===0)return e;const r=[];let l=0,s=0;for(const i of a){const u=e.indexOf(i,l);u<0||(u>l&&r.push(e.slice(l,u)),r.push(n.jsx("strong",{className:"search-summary__em body-2",children:i},s++)),l=u+i.length)}return l<e.length&&r.push(e.slice(l)),r}function $2({status:e="guide",label:t,children:a,emphasis:r,icon:l,className:s=""}){const i=l===!1?null:l??M2[e],u=we("search-summary",`search-summary--${e}`,s),c=t??a,d=typeof c=="string"&&r&&r.length>0?L2(c,r):c;return n.jsxs("div",{className:u,role:"status","aria-live":"polite",children:[i!=null&&n.jsx(tt,{icon:i,size:18,className:"search-summary__icon"}),n.jsx("span",{className:"search-summary__text body-2",children:d})]})}function Ha({title:e,items:t}){const{t:a}=_e.useTranslation(),{anchorRect:r,openAt:l,close:s}=Pa(),i=o.useRef(null),u=vo(!!r,(c,d)=>{c&&d?l(i.current?.querySelector("button")??d):s()},i);return n.jsxs("span",{ref:i,style:{display:"contents"},children:[n.jsx(fe,{htmlType:"button",size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!r,ariaLabel:a("common.info","\uC124\uBA85"),onPointerEnter:c=>{ca(c)||l(c.currentTarget)},onPointerLeave:c=>{ca(c)||s()},onClick:c=>{u.touchPress(c.currentTarget)},onFocus:c=>{da()||l(c.currentTarget)},onBlur:s}),r&&n.jsx(Kn,{title:e,items:t,showIndex:t.length>1,anchorRect:r,onClose:s})]})}function R2({items:e=[],value:t,onChange:a,className:r="",size:l=40}){const s=o.useId(),{t:i}=_e.useTranslation(),u=o.useRef(null),c=e.find(f=>!f.disabled)?.key,d=e.some(f=>f.key===t)?t:c??e[0]?.key,m=e.find(f=>f.key===d&&!f.disabled)?.key??c,p=()=>Array.from(u.current?.querySelectorAll('[role="tab"]:not(:disabled)')??[]),C=(f,h=p())=>{if(h.length===0)return;const _=(f%h.length+h.length)%h.length;h[_]?.focus(),h[_]?.click()},b=f=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(f.key))return;f.preventDefault();const h=p(),_=h.indexOf(f.currentTarget);f.key==="ArrowRight"||f.key==="ArrowDown"?C(_+1,h):f.key==="ArrowLeft"||f.key==="ArrowUp"?C(_-1,h):f.key==="Home"?C(0,h):C(h.length-1,h)},x=e.find(f=>f.key===d);return n.jsxs("div",{className:`tabs ${r}`.trim(),children:[n.jsx("div",{ref:u,className:`tabs__list tabs__list--${l}`,role:"tablist","aria-label":i("tabs.ariaLabel","\uD0ED"),children:e.map(f=>n.jsx("button",{id:`tabs__tab-${s}-${f.key}`,type:"button",role:"tab","aria-selected":f.key===d,"aria-controls":`tabs__panel-${s}-${f.key}`,disabled:f.disabled,tabIndex:f.key===m?0:-1,className:`tabs__tab body-2${f.key===d?" tabs__tab--active":""}`,onClick:()=>{f.key!==t&&a?.(f.key)},onKeyDown:b,children:f.label},f.key))}),x&&n.jsx("div",{id:`tabs__panel-${s}-${x.key}`,role:"tabpanel","aria-labelledby":`tabs__tab-${s}-${x.key}`,tabIndex:0,className:"tabs__panel",children:x.panel},x.key)]})}const P2={xs:12,sm:16,md:20,lg:28,xl:36};function I2(e){const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"":t.length===1?[...t[0]].slice(0,2).join("").toUpperCase():([...t[0]][0]+[...t[t.length-1]][0]).toUpperCase()}function F2({src:e,name:t,size:a="md",shape:r="circle",className:l=""}){const{t:s}=_e.useTranslation(),[i,u]=o.useState(null),c=!!e&&i===e,d=t?I2(t):"",m=!!e&&!c,p=!m&&!!d,C=t||s("avatar.ariaLabel","\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0");return n.jsxs("span",{className:`avatar avatar--${a} avatar--${r} ${l}`.trim(),role:"img","aria-label":C,children:[m&&n.jsx("img",{className:"avatar__image",src:e,alt:C,onError:()=>u(e??null)}),!m&&p&&n.jsx("span",{className:"avatar__initials","aria-hidden":"true",children:d}),!m&&!p&&n.jsx(tt,{icon:"user-round",size:P2[a],className:"avatar__icon"})]})}function O2(e,t){if(!t)return!0;const a=t.split(",").map(s=>s.trim()).filter(Boolean);if(a.length===0)return!0;const r=e.name.toLowerCase(),l=e.type.toLowerCase();return a.some(s=>{const i=s.toLowerCase();return i.startsWith(".")?r.endsWith(i):i.endsWith("/*")?l.startsWith(i.slice(0,-1)):l===i})}function z2({onFilesSelected:e,accept:t,multiple:a=!1,disabled:r=!1,showFileList:l=!0,files:s,onRemove:i,className:u=""}){const{t:c}=_e.useTranslation(),d=o.useRef(null),[m,p]=o.useState(!1),[C,b]=o.useState([]),x=s??C,f=y=>{if(!y||y.length===0)return;const w=Array.from(y).filter(E=>O2(E,t));if(w.length===0)return;const A=a?w:w.slice(0,1);if(s===void 0){const E=a?[...x,...A]:A;b(E),e?.(E)}else e?.(A)},h=y=>{y.preventDefault(),!r&&p(!0)},_=y=>{y.preventDefault(),p(!1)},g=y=>{y.preventDefault(),p(!1),!r&&f(y.dataTransfer.files)},k=y=>{const w=y.target;try{f(w.files)}finally{w.value=""}},v=()=>{r||d.current?.click()},B=y=>{if(!r&&(i?.(y),s===void 0)){const w=x.filter((A,E)=>E!==y);b(w),i||e?.(w)}};return n.jsxs("div",{className:`file-upload ${u}`.trim(),children:[n.jsxs("div",{className:we("file-upload__dropzone",m&&"file-upload__dropzone--dragging",r&&"file-upload__dropzone--disabled"),role:"button",tabIndex:r?-1:0,"aria-disabled":r,onClick:v,onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),v())},onDragOver:h,onDragLeave:_,onDrop:g,children:[n.jsx(tt,{icon:"upload",size:24,className:"file-upload__icon"}),n.jsx("span",{className:"file-upload__prompt body-2",children:c("fileUpload.dragPrompt","\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC")}),n.jsx("button",{type:"button",className:"file-upload__browse-button body-3",disabled:r,onClick:y=>{y.stopPropagation(),v()},children:c("fileUpload.browseButton","\uD30C\uC77C \uC120\uD0DD")}),n.jsx("input",{ref:d,type:"file",className:"file-upload__input",accept:t,multiple:a,disabled:r,onChange:k,tabIndex:-1})]}),l&&x.length>0&&n.jsx("ul",{className:"file-upload__list",children:x.map((y,w)=>n.jsxs("li",{className:"file-upload__list-item body-3",children:[n.jsx("span",{className:"file-upload__file-name body-3",children:y.name}),n.jsx("button",{type:"button",className:"file-upload__remove-button","aria-label":c("fileUpload.removeAriaLabel",{name:y.name}),disabled:r,onClick:()=>B(w),children:n.jsx(tt,{icon:"x",size:14})})]},`${y.name}-${w}`))})]})}function W2({items:e,className:t=""}){const{t:a}=_e.useTranslation();return n.jsx("nav",{className:`breadcrumb ${t}`.trim(),"aria-label":a("breadcrumb.ariaLabel","\uC774\uB3D9 \uACBD\uB85C"),children:n.jsx("ol",{className:"breadcrumb__list",children:e.map((r,l)=>{const s=l===e.length-1;return n.jsxs("li",{className:"breadcrumb__item",children:[s?n.jsx("span",{className:"breadcrumb__current body-3","aria-current":"page",children:r.label}):r.href?n.jsx("a",{className:"breadcrumb__link body-3",href:r.href,target:r.target,rel:r.rel??(r.target==="_blank"?"noopener noreferrer":void 0),onClick:r.onClick,children:r.label}):r.onClick?n.jsx("button",{type:"button",className:"breadcrumb__link body-3",onClick:r.onClick,children:r.label}):n.jsx("span",{className:"breadcrumb__text body-3",children:r.label}),!s&&n.jsx(tt,{icon:"chevron-right",size:14,className:"breadcrumb__separator"})]},l)})})})}const H2={small:14,medium:20,large:28};function V2({value:e,onChange:t,max:a=5,readOnly:r=!1,size:l="medium",ariaLabel:s,className:i=""}){const{t:u}=_e.useTranslation(),c=r||!t,[d,m]=o.useState(null),p=c?e:Number.isFinite(e)?Math.round(e):0,C=d??p,b=H2[l],x=y=>{y!==e&&t?.(y)},f=y=>{c||x(y)},h=y=>{c||da()||m(y)},_=o.useRef(null),g=y=>{const w=Math.min(a,Math.max(1,y));x(w),Array.from(_.current?.querySelectorAll("[data-star]")??[]).find(A=>A.dataset.star===String(w))?.focus()},k=y=>{if(!c){switch(y.key){case"ArrowRight":case"ArrowUp":g((p||0)+1);break;case"ArrowLeft":case"ArrowDown":g((p||1)-1);break;case"Home":g(1);break;case"End":g(a);break;default:return}y.preventDefault()}},v=p>=1&&p<=a?Math.round(p):1,B=()=>{c||m(null)};return n.jsx("div",{className:`rating rating--${l}${c?" rating--readOnly":""} ${i}`.trim(),ref:_,onKeyDown:k,role:c?"img":"radiogroup","aria-label":c?u("rating.valueLabel",{value:e,max:a}):s??u("rating.groupLabel","\uBCC4\uC810"),onMouseLeave:B,onPointerUp:y=>{y.pointerType==="touch"&&B()},onPointerCancel:y=>{y.pointerType==="touch"&&B()},children:Array.from({length:a},(y,w)=>{const A=w+1,E=Math.max(0,Math.min(1,C-w)),D=E>0&&E<1,N=n.jsxs("span",{className:"rating__star-wrap",children:[n.jsx(tt,{icon:"star",size:b,className:"rating__star rating__star--empty"}),E>0&&n.jsx("span",{className:`rating__star-fill${D?" rating__star-fill--half":""}`,style:D?{width:`${E*100}%`}:void 0,children:n.jsx(tt,{icon:"star",size:b,className:"rating__star rating__star--filled"})})]});return c?n.jsx("span",{className:"rating__item","aria-hidden":"true",children:N},A):n.jsx("button",{type:"button",className:"rating__item rating__item--interactive",role:"radio","aria-checked":p===A,"aria-label":u("rating.starLabel",{n:A}),"data-star":A,tabIndex:A===v?0:-1,onClick:()=>f(A),onMouseEnter:()=>h(A),children:N},A)})})}const q2=20,U2=["#499cdf","#4dcdc0","#2fae9e","#e6b94e","#d9534f","#e06b68","#bfc7d1"];function G2({value:e,onChange:t,palette:a=U2,size:r=40,className:l="",ariaLabel:s}){const{t:i}=_e.useTranslation();return n.jsx("div",{className:`color-picker ${l}`.trim(),role:"group","aria-label":s,children:a.map(u=>{const c=e?.toLowerCase()===u.toLowerCase();return n.jsx("button",{type:"button",className:`color-picker__swatch color-picker__swatch--${r}`,style:{backgroundColor:u},onClick:()=>t(u),"aria-pressed":c,"aria-label":c?`${u} ${i("colorPicker.selected","\uC120\uD0DD\uB428")}`:u,children:c&&n.jsx(tt,{icon:"check",size:q2,className:"color-picker__check"})},u)})})}function du({icon:e,label:t,tooltip:a,wrapperStyle:r,color:l,bgColor:s,useHover:i=!0,iconSize:u="medium"}){const{t:c}=_e.useTranslation(),d=u==="small",m=we("category-icon",d?"category-icon--small":""),p=d?16:20,C=o.useRef(null),[b,x]=o.useState(!1),f=o.useMemo(()=>{const A=r&&typeof r=="object"?{...r}:{};return!l&&!s?A:{...A,...l?{color:l,"--t-item-fg":l}:{},...s?{"--t-item-bg":s}:{}}},[r,l,s]),h=a||t,_=i&&!!h,[g,k]=o.useState(null);o.useLayoutEffect(()=>{b&&k(C.current?.getBoundingClientRect()??null)},[b]),o.useEffect(()=>{if(!i&&b)try{x(!1)}catch{}},[i,b]),o.useEffect(()=>{if(!b)return;const A=E=>{const D=C.current;if(!D)return;const N=E.target;N&&!D.contains(N)&&x(!1)};return document.addEventListener("pointerdown",A,!0),()=>document.removeEventListener("pointerdown",A,!0)},[b]);const v=o.useCallback(()=>{i&&x(!0)},[i]),B=o.useCallback(()=>{i&&x(!1)},[i]),y=o.useCallback(()=>x(!1),[]),w=o.useCallback(A=>{if(A.key==="Escape"){x(!1);return}(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),x(E=>!E))},[]);return n.jsxs("span",{ref:C,className:we("category-icon__wrap",_&&"category-icon__wrap--interactive"),onPointerEnter:v,onPointerLeave:B,onFocus:v,onBlur:B,onKeyDown:w,role:"button",tabIndex:0,"aria-label":typeof h=="string"?c("common.descriptionFor",{name:h,defaultValue:`${h} \uC124\uBA85`}):void 0,"aria-haspopup":!!h,"aria-expanded":b,"data-tooltip-ignore":!0,children:[n.jsx(tt,{icon:e,label:t,className:m,imgClassName:"category-icon__image",maskClassName:"category-icon__mask",svgClassName:"category-icon__svg",wrapperStyle:f,size:p}),b&&h&&n.jsx(Dn,{anchorRect:g,text:typeof h=="string"?h:void 0,offset:8,onClose:y,className:"category-icon__tooltip",ariaLabel:typeof h=="string"?h:void 0})]})}let zn=null;function pr(e){if(zn&&zn!==e)try{zn()}catch{}return zn=e,()=>{zn===e&&(zn=null)}}function mr(e){if(zn===e){zn=null;try{e()}catch{}}}function hr(e,t){let a=()=>{};const r=new Promise(u=>{a=u});if(typeof e!="string"||e.trim()===""){Rt("one-shot-empty-url","[core] playOneShot \uC5D0 \uBE48 \uC8FC\uC18C\uAC00 \uC654\uB2E4 \u2014 \uC548 \uD2BC\uB2E4. \uBD80\uB974\uB294 \uCABD\uC774 \uC8FC\uC18C\uB97C \uC5BB\uAE30 \uC804\uC5D0 \uBD88\uB800\uB2E4.",new Error("playOneShot(empty)").stack),a(!1);try{t?.(!1)}catch{}return{el:{},stop:()=>{},done:r}}let l=!1;const s=u=>{if(!l){l=!0;try{t?.(u)}catch{}a(u)}};let i;try{i=new Audio(e)}catch{return s(!1),{el:{},stop:()=>{},done:r}}i.onended=()=>s(!0),i.onerror=()=>s(!1);try{i.play().catch(()=>s(!1))}catch{s(!1)}return{el:i,stop:()=>{try{i.pause()}catch{}s(!1)},done:r}}function K2(e,t){if(!e)return{previewCodes:[],previewBucket:null};const a=e,r=i=>i.map(u=>u?.contextCode||u?.context_code).filter(Boolean).map(String);if(t==="LISTEN_IN_NOISE"){const i=a.sentences||a.items||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}if(t==="SHORT_STORY"){const i=a.items||a.sentences||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"SHORT_S"}}if(t==="LONG_STORY"){const i=a.items||a.sentences||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LONG"}}if(t==="ORDERING_SENTENCE"){const i=a.sentences||a.items||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}const l=a.sentences||a.items||[],s=r(Array.isArray(l)?l:[]);return s.length===0&&(a.contextCode||a.context_code)&&s.push(String(a.contextCode||a.context_code)),{previewCodes:s,previewBucket:null}}function Y2(e,t){const[a,r]=o.useState(!1),[l,s]=o.useState(-1),[i,u]=o.useState({key:"",urls:[]}),c=o.useRef(null),d=o.useRef(!1),m=o.useRef(null),p=o.useRef(null),[C,b]=o.useState(!1),x=o.useRef([]),{previewCodes:f,previewBucket:h}=K2(e,t),_=`${f.join(",")}|${h??""}`,g=o.useMemo(()=>i.key===_?i.urls:[],[i,_]);o.useEffect(()=>{if(!f.length)return;let v=!1;return(async()=>{const B=[],y=[];for(const w of f)try{const A=yl(w,h);if(!A){B.push("");continue}let E=null;try{E=await vl(A)}catch{}if(!E)try{const D=await xl(A);D&&(E=URL.createObjectURL(D),y.push(E))}catch{}B.push(E??"")}catch{B.push("")}v?y.forEach(w=>{try{URL.revokeObjectURL(w)}catch{}}):(x.current.forEach(w=>{try{URL.revokeObjectURL(w)}catch{}}),x.current=y,u({key:_,urls:B}))})(),()=>{v=!0}},[f.join(","),h]),o.useEffect(()=>()=>{x.current.forEach(v=>{try{URL.revokeObjectURL(v)}catch{}}),x.current=[]},[]);const k=o.useCallback(async v=>{if(v.stopPropagation(),v.preventDefault(),d.current){m.current&&mr(m.current),d.current=!1;try{c.current?.pause()}catch{}r(!1),s(-1);return}if(!g.filter(Boolean).length)return;let B=null;const y=()=>{d.current=!1,B?.stop()};m.current=y;const w=pr(y);d.current=!0,r(!0);for(let A=0;A<g.length&&d.current;A++){const E=g[A];if(E&&(s(A),B=hr(E),c.current=B.el,!await B.done))break}w(),m.current===y&&(m.current=null,d.current=!1,r(!1),s(-1))},[g]);return o.useEffect(()=>()=>{m.current&&mr(m.current),d.current=!1;try{c.current?.pause()}catch{}c.current=null},[]),{playing:a,playingIndex:l,previewUrls:g,previewHover:C,setPreviewHover:b,previewBtnRef:p,handlePreview:k}}const Z2=e=>{if(!e)return[];const t=typeof e.context=="string"&&e.context.trim()||typeof e.sentence=="string"&&e.sentence.trim()||typeof e.text=="string"&&e.text.trim()||"";if(t)return[String(t)];const a=e.sentences||e.items||e.questions||[];return Array.isArray(a)&&a.length>0?a.map(r=>{if(typeof r=="string")return r;if(r&&typeof r=="object"){const l=r;return l.sentence||l.text||l.context||l.question||l.title||""}return""}).filter(r=>typeof r=="string"&&r.trim().length>0).map(r=>r.trim()):[]};function Lo(e){const{index:t,type:a,trainingData:r,ariaLabel:l,depth:s,renderPopup:i,completed:u,completedIds:c,selectedIds:d,tooltipText:m,useDescriptionTooltip:p=!1,onRemove:C,hideCheckBadge:b=!1,showTypeLabel:x=!1,onComplete:f,onSelect:h,onMore:_,countLabelOverride:g,size:k="square"}=e||{},{t:v}=_e.useTranslation(),[B,y]=o.useState(!1),w=o.useRef(null),[A,E]=o.useState(!1);o.useEffect(()=>{w.current?.matches(":hover")&&E(!0)},[]);const{playing:D,playingIndex:N,previewUrls:F,previewHover:R,setPreviewHover:K,previewBtnRef:L,handlePreview:$}=Y2(r,a?.key),T=o.useCallback(()=>{h?h():y(!0)},[h]),J=o.useCallback(()=>y(!1),[]),q=o.useCallback(()=>E(!0),[]),O=o.useCallback(()=>E(!1),[]),Q=o.useCallback(()=>K(!0),[K]),P=o.useCallback(()=>K(!1),[K]),[V,W]=o.useState(null);o.useLayoutEffect(()=>{R&&W(L.current?.getBoundingClientRect()??null)},[R,L]);const[G,S]=o.useState(null);o.useLayoutEffect(()=>{A&&!B&&p&&S(w.current?.getBoundingClientRect()??null)},[A,B,p]);const M=o.useCallback(ke=>{ke.target===ke.currentTarget&&(ke.key==="Enter"||ke.key===" ")&&(ke.preventDefault(),T())},[T]),I=r||null,Z=o.useMemo(()=>{if(!p)return null;const ke=m?(Array.isArray(m)?m:[m]).filter(Boolean):null,He=ke&&ke.length>0?ke:Z2(I);return He&&He.length>0?He:null},[p,m,I]),le=o.useCallback(ke=>{ke.stopPropagation(),C?.()},[C]),oe=o.useCallback(ke=>ke.stopPropagation(),[]),de=o.useCallback(ke=>{typeof f=="function"&&f(ke)},[f]),re=u||(c&&r?.id!=null?c.has(String(r.id)):!1),z=!re&&(d!=null&&r?.id!=null?d.has(String(r.id)):!1);Li("speechear.popup.close",J);const ne=ql(),H=`${a?.label||""} ${t+1}`,U=I?.title||I?.name||H;let pe=a?.icon,Ee,ge="",me="";try{const ke=I?.category_0||I?.category_main_code||I?.category_main,He=I?.category_1||I?.category_sub_code||I?.category_sub,Be=ne.find(Se=>Se.key===ke);Be?.icon&&(pe=Be.icon),!Ee&&Be?.color&&(Ee={"--t-item-fg":Be.color}),!Ee&&I?.iconColor&&(Ee={"--t-item-fg":I.iconColor}),ge=Be?v(`topic.${Be.key}`,{defaultValue:Be.label||""}):"";try{const Se=Be?.subs?.find(Le=>Le.key===He);me=Se?v(`topic.sub.${Se.key}`,{defaultValue:Se.label||""}):""}catch{}}catch{}const ie=me?`${ge} / ${me}`:ge||a?.label||U,be=ke=>v("training.countQuestions",{n:ke,count:ke}),he=ke=>v("training.countSentences",{n:ke,count:ke});let ue="";try{if(I)if(a?.key==="LISTEN_IN_NOISE"){let ke=0;Array.isArray(I.items)&&I.items.length>0?ke=I.items.length:Array.isArray(I.sentences)&&I.sentences.length>0?ke=I.sentences.length:I.sentences&&(ke=1),ue=he(ke)}else if(a?.key==="SHORT_STORY"){let ke=1;Array.isArray(r?.items)?ke=r.items.length:Array.isArray(r?.raw&&r.raw?.items)?ke=r.raw.items.length:Array.isArray(I?.questions)?ke=I.questions.length:Array.isArray(I?.sentences)&&(ke=I.sentences.length),ue=be(ke)}else if(a?.key==="LONG_STORY"){let ke=1;if(Array.isArray(I.items)&&I.items.length>0){const He=I.items.reduce((Be,Se)=>{const Le=Se.questionItems;return Array.isArray(Le)?Be+Le.length:Array.isArray(Se.questions)?Be+Se.questions.length:Be},0);ke=He>0?He:I.items.length}else Array.isArray(I.questions)&&I.questions.length>0?ke=I.questions.length:Array.isArray(I.sentences)&&I.sentences.length>0&&(ke=I.sentences.length);ue=be(ke)}else if(a?.key==="ORDERING_SENTENCE"){let ke=1;Array.isArray(I.items)&&I.items.length>0?ke=I.items.length:Array.isArray(I.sentences)&&I.sentences.length>0&&(ke=I.sentences.length),ue=he(ke)}else Array.isArray(I.items)&&(ue=I.items.length>0?be(I.items.length):"")}catch{}const Me=k==="row",qe=k==="list"||Me,je=k==="compact",Ve=k==="small",Oe=Ve&&a?.key?$f().find(ke=>ke.key===a.key):void 0,dt=Oe?Ul[Oe.key]:void 0,rt=Oe?dt?v(`trainingType.${dt}.title`,{defaultValue:Oe.label}):Oe.label??"":"",nt=x&&a?.label&&a.label!==String(U)?String(a.label):Ve&&rt&&rt!==String(U)?rt:"",pt=!!nt,Ne=g!==void 0?g:ue,Ue=[nt,typeof U=="string"?U:"",Ne].map(ke=>String(ke??"").trim()).filter(Boolean).join(" ");return n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:w,className:`training-block-button${qe?" training-block-button--list":""}${Me?" training-block-button--row":""}${je?" training-block-button--compact":""}${Ve?" training-block-button--small":""}${re?" training-block-button--completed":""}${z?" training-block-button--selected":""}${pt&&!Ve?" training-block-button--withType":""}${Ve&&!pt?" training-block-button--no-type-label":""}`,onClick:T,onPointerEnter:q,onPointerLeave:O,role:"button",tabIndex:0,onKeyDown:M,"aria-label":typeof l=="string"?l:Ue||void 0,title:!p&&m&&(Array.isArray(m)?m.filter(Boolean).join(`
|
|
824
824
|
`):m)||void 0,children:[n.jsxs("div",{className:"training-block-button__left",children:[x&&a?.label&&a.label!==String(U)&&n.jsx("span",{className:"training-block-button__type-label caption-1",children:a.label}),Ve&&rt&&rt!==String(U)&&n.jsx("span",{className:"training-block-button__type-label caption-2",children:rt}),n.jsx(du,{icon:pe,label:U,tooltip:ie,wrapperStyle:Ee,iconSize:Ve||je?"small":"medium"}),!b&&(re||z)&&!(C&&A)&&n.jsx(Lt,{className:C?"training-block-button__check--removable":void 0,type:"dot",icon:"check",position:"top-left",size:"medium","aria-label":re?v("training.completed","\uD6C8\uB828 \uC644\uB8CC"):v("training.selected","\uC120\uD0DD\uB428")}),C&&n.jsx(Lt,{className:`training-block-button__remove${A?" is-hover":""}`,type:"dot",icon:"remove",position:"top-left",size:"medium","aria-label":v("common.remove","\uC81C\uAC70"),onClick:le}),n.jsx("div",{className:`training-block-button__title ${je?"body-3":Ve?"body-3b":"h3"}`,children:String(U)}),n.jsxs("div",{className:"training-block-button__description",children:[Ne?n.jsx("div",{className:`training-block-button__count ${Ve?"caption-2":"caption-1"}`,children:Ne}):null,n.jsx("div",{className:"training-block-button__chevron",children:n.jsx(tt,{icon:"chevron-right",label:v("training.next","\uB2E4\uC74C"),className:"training-block-button__chevron-icon",imgClassName:"training-block-button__chevron-icon-image",maskClassName:"training-block-button__chevron-icon-mask",svgClassName:"training-block-button__chevron-icon-svg",size:Ve?12:20})})]}),(qe&&!Me||Ve)&&F.length>0&&n.jsx("div",{ref:L,className:"training-block-button__preview","data-tooltip-ignore":!0,onClick:oe,onPointerEnter:Q,onPointerLeave:P,children:n.jsx(fe,{htmlType:"button",size:Ve?28:32,type:"dot",icon:D?"pause":"play",variant:Ve?"transparent-lightGray":"default",useBorder:!1,selected:D,ariaLabel:String(U).trim()?D?v("training.stopFor",{name:U,defaultValue:`${U} \uC815\uC9C0`}):v("training.previewFor",{name:U,defaultValue:`${U} \uBBF8\uB9AC \uB4E3\uAE30`}):D?v("training.stop","\uC815\uC9C0"):v("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),onClick:$})})]}),_&&n.jsx("div",{className:"training-block-button__more","data-tooltip-ignore":!0,onClick:ke=>{ke.stopPropagation(),_(ke)},children:n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"more-horizontal",variant:"transparent-lightGray",useBorder:!1,ariaLabel:String(U).trim()?v("common.moreFor",{name:U}):v("common.more","\uB354\uBCF4\uAE30")})})]}),R&&n.jsx(Dn,{anchorRect:V,text:D?v("training.stop","\uC815\uC9C0"):v("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),offset:8,onClose:P}),A&&!B&&p&&(Z?n.jsx(Kn,{anchorRect:G,items:Z,activeIndex:N,onClose:O}):I?.subTitle?n.jsx(Dn,{anchorRect:G,text:I.subTitle,offset:8,onClose:O}):null),B&&i&&i({trainingData:I,typeKey:a?.key??"",onClose:J,onComplete:de,popupTitle:String(U),popupSubTitle:a?.subTitle,depth:s!=null?String(s):void 0,popupIcon:pe,popupIconTooltip:String(ie),popupWrapperStyle:Ee})]})}const pu=200;function X2(e){return e.itemId?(Of()[e.trainingType]??[]).find(t=>t?.id!=null&&String(t.id)===String(e.itemId))??null:null}function mu({plan:e,groups:t,anchorRect:a,offset:r=12,onClose:l}){const{t:s}=_e.useTranslation(),i=o.useMemo(()=>t?t.map((c,d)=>({key:c.key??c.type?.key??String(d),label:c.label,type:c.type,data:c.items??[]})).filter(c=>c.data.length>0):Wf(s).map(c=>{const d=(e?.items??[]).filter(m=>m.trainingType===c.key);return{key:c.key,label:c.label,type:c,pickedCount:d.length,data:d.map(X2).filter(m=>m!=null)}}).filter(c=>c.pickedCount>0),[t,e?.items,s]);if(i.length===0)return null;const u=n.jsx("div",{className:"tooltip-training__box",children:n.jsx("div",{className:"tooltip-training__groups",children:i.flatMap(({key:c,label:d,type:m,data:p},C)=>[C>0?n.jsx("div",{className:"tooltip-training__divider"},`div-${c}`):null,n.jsxs("div",{className:"tooltip-training__section",children:[n.jsx("div",{className:"tooltip-training__section-header",children:n.jsx("span",{className:"tooltip-training__type-label body-3b",children:d})}),n.jsx("div",{className:"tooltip-training__items",children:p.map((b,x)=>n.jsx(Lo,{index:x,type:m,trainingData:b,size:"compact",hideCheckBadge:!0},String(b.id??x)))})]},c)])})});return a?n.jsx(vn,{anchorRect:a,offset:r,onClose:l,closeOnOutsideClick:!1,className:"tooltip-training",ariaLabel:s("tooltip.training","\uD6C8\uB828 \uC548\uB0B4"),children:u}):u}const J2=200;function Q2({icon:e,count:t,title:a,plan:r,tooltip:l=!0,hoverAccent:s=!1,className:i="",onClick:u,onMouseEnter:c,onMouseLeave:d}){const m=!!u||!!c||l&&!!r,p=we("count-tile",m&&"count-tile--interactive",m&&s&&"count-tile--accent",u&&"count-tile--clickable",i),C=o.useRef(null),[b,x]=o.useState(null),f=o.useRef(null),h=o.useRef(null),_=!!(b&&r&&l),g=o.useCallback(()=>{f.current&&(clearTimeout(f.current),f.current=null),h.current&&(clearTimeout(h.current),h.current=null)},[]),k=o.useCallback(()=>{g(),x(null)},[g]),v=o.useCallback(()=>{!l||!r||(g(),f.current=setTimeout(()=>{f.current=null,x(C.current?.getBoundingClientRect()??null)},pu))},[l,r,g]),B=o.useCallback(()=>{f.current&&(clearTimeout(f.current),f.current=null),!h.current&&(h.current=setTimeout(()=>{h.current=null,x(null)},J2))},[]);return o.useEffect(()=>()=>{g()},[g]),o.useEffect(()=>{(!l||!r)&&k()},[l,r,k]),o.useEffect(()=>{if(!_)return;const y=A=>A instanceof Element&&(C.current?.contains(A)||!!A.closest(".tooltip-training")),w=A=>{y(A.target)?g():B()};return document.addEventListener("pointerover",w,!0),()=>document.removeEventListener("pointerover",w,!0)},[_,g,B]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:C,className:p,onClick:u?y=>{k(),u(y)}:void 0,onKeyDown:u?y=>{y.key!=="Enter"&&y.key!==" "||(y.preventDefault(),y.currentTarget.click())}:void 0,onPointerEnter:y=>{y.pointerType==="touch"||y.pointerType==="pen"?k():v()},onMouseEnter:c,onMouseLeave:y=>{B(),d?.(y)},role:u?"button":"img",tabIndex:u?0:void 0,"aria-label":`${a} ${t}`,children:[n.jsx(tt,{icon:e,size:20,className:"count-tile__icon"}),n.jsx("span",{className:"count-tile__count h5","aria-hidden":"true",children:t})]}),b&&r&&n.jsx(mu,{plan:r,anchorRect:b,onClose:k})]})}let Va=0,hu="",$o="",qa=0;function Cu(){return fu(!1)}function ev(){return fu(!0)}function fu(e){const t=typeof document<"u";Va===0&&t&&(hu=document.body.style.overflow,document.body.style.overflow="hidden"),e&&t&&(qa===0&&($o=document.body.style.paddingRight),qa++,document.body.style.paddingRight="0px"),Va++;let a=!1;return()=>{a||(a=!0,Va=Math.max(0,Va-1),e&&t&&(qa=Math.max(0,qa-1),qa===0&&($o?document.body.style.paddingRight=$o:document.body.style.removeProperty("padding-right"))),Va===0&&t&&(document.body.style.overflow=hu))}}function tv(){return n.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round","aria-hidden":!0,children:n.jsx("path",{d:"M6 6l12 12M18 6 6 18"})})}function nv({open:e,onClose:t,ariaLabel:a,title:r,children:l,size:s="md",closeOnBackdrop:i=!0,closeOnEscape:u=!0,showClose:c=!0,className:d,contentClassName:m}){const{t:p}=_e.useTranslation(),C=o.useId(),b=o.useRef(null),x=o.useCallback(()=>t(),[t]);o.useEffect(()=>{if(!e)return;const g=document.activeElement,k=Cu(),v=b.current;return fo(v,g),v?.focus(),()=>{k();const B=document.activeElement;(!B||B===document.body||v&&v.contains(B))&&go(g)?.focus?.()}},[e]);const f=o.useRef(x),h=o.useRef(u);o.useEffect(()=>{f.current=x,h.current=u}),o.useEffect(()=>{if(e)return Gn(()=>{h.current&&f.current()})},[e]);const _=o.useRef(!1);return ho(b,e),!e||typeof document>"u"?null:cn.createPortal(n.jsx("div",{className:we("dialog",d),onPointerDown:i?g=>{_.current=g.target===g.currentTarget}:void 0,onMouseDown:g=>{g.target===g.currentTarget&&g.preventDefault()},onClick:i?g=>{const k=_.current;_.current=!1,k&&g.target===g.currentTarget&&x()}:void 0,children:n.jsxs("div",{ref:b,role:"dialog","aria-modal":"true","aria-label":r?void 0:a,"aria-labelledby":r?C:void 0,tabIndex:-1,className:we("dialog__surface",`dialog__surface--${s}`,m),onClick:g=>g.stopPropagation(),children:[r?n.jsx("div",{className:"dialog__header",children:n.jsx("h2",{id:C,className:"dialog__title h4b",children:r})}):null,c?n.jsx("button",{type:"button",className:"dialog__close","aria-label":p("common.close","\uB2EB\uAE30"),onClick:x,children:n.jsx(tv,{})}):null,n.jsx("div",{className:"dialog__body",children:l})]})}),document.body)}function av({columns:e,rows:t,rowKey:a,title:r,toolbar:l,empty:s,loading:i,caption:u,className:c=""}){const{t:d}=_e.useTranslation(),m=!i&&t.length===0;return n.jsxs("div",{className:we("board",c),children:[r||l?n.jsxs("div",{className:"board__head",children:[r?n.jsx("h2",{className:"board__title",children:r}):n.jsx("span",{}),l?n.jsx("div",{className:"board__toolbar",children:l}):null]}):null,n.jsxs("table",{className:"board__table",children:[u?n.jsx("caption",{className:"board__caption",children:u}):null,n.jsx("thead",{children:n.jsx("tr",{children:e.map(p=>n.jsx("th",{scope:"col",className:we("board__th",`board__cell--${p.headerAlign??p.align??"left"}`),style:p.width?{width:p.width}:void 0,children:p.header},p.key))})}),n.jsx("tbody",{children:i?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:i})}):m?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:s??d("board.empty","\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):t.map((p,C)=>n.jsx("tr",{className:"board__row",children:e.map(b=>n.jsx("td",{className:we("board__td",`board__cell--${b.align??"left"}`),children:b.render(p,C)},b.key))},a(p,C)))})]})]})}function rv({name:e,role:t,photo:a,media:r,credentials:l,size:s=190,className:i=""}){return n.jsxs("div",{className:we("person-card",i),children:[n.jsx("div",{className:"person-card__photo",style:{width:s,height:s},children:r??(a?n.jsx("img",{src:a,alt:t?`${e} ${t}`:e}):null)}),n.jsx("h3",{className:"person-card__name",children:e}),t?n.jsx("p",{className:"person-card__role",children:t}):null,l?.length?n.jsx("ul",{className:"person-card__credentials",children:l.map(u=>n.jsx("li",{children:u},u))}):null]})}function ov({groups:e,className:t=""}){return n.jsx("div",{className:we("timeline",t),children:e.map(a=>n.jsxs("section",{className:"timeline__group",children:[n.jsx("h3",{className:"timeline__title",children:a.title}),n.jsx("ul",{className:"timeline__rows",children:a.entries.map((r,l)=>n.jsxs("li",{className:"timeline__row",children:[r.label?n.jsx("span",{className:"timeline__label",children:r.label}):null,n.jsx("div",{className:"timeline__items",children:r.items.map((s,i)=>n.jsx("p",{children:s},i))})]},`${r.label??""}-${l}`))})]},a.title))})}function sv({title:e,kind:t,body:a,badge:r,badgeSrc:l,footer:s,width:i,className:u=""}){const c=r??(l?n.jsx("img",{src:l,alt:""}):null);return n.jsxs("div",{className:we("publication-card",u),style:i?{width:i,flexShrink:0}:void 0,children:[c?n.jsx("div",{className:"publication-card__badge","aria-hidden":"true",children:c}):null,n.jsx("h3",{className:"publication-card__title",children:e}),t?n.jsx("p",{className:"publication-card__kind",children:t}):null,n.jsx("p",{className:"publication-card__body",children:a}),s?n.jsx("div",{className:"publication-card__footer",children:s}):null]})}function lv({logo:e,alt:t,onDone:a,durationMs:r=3e3}){const l=$a(a);return o.useEffect(()=>{const s=setTimeout(()=>l.current?.(),r);return()=>clearTimeout(s)},[r,l]),n.jsx("div",{className:"splash-logo",style:{"--splash-logo-duration":`${r}ms`},"aria-hidden":"true",children:n.jsx("img",{src:e,alt:t,className:"splash-logo__image"})})}function iv({eyebrow:e,eyebrowIndex:t,title:a,description:r,level:l=2,tone:s="dark",className:i=""}){const u=l===1?"h1":"h2";return n.jsxs("div",{className:we("section-header",`section-header--${s}`,i),children:[e?n.jsxs("p",{className:"section-header__eyebrow",children:[t?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"section-header__index",children:t}),n.jsx("span",{"aria-hidden":!0,className:"section-header__rule"})]}):null,e]}):null,a?n.jsx(u,{className:"section-header__title",children:a}):null,r?n.jsx("div",{className:"section-header__description",children:r}):null]})}function uv({items:e,className:t=""}){return n.jsx("ul",{className:we("company-meta",t),children:e.map((a,r)=>n.jsxs("li",{className:"company-meta__item",children:[r>0?n.jsx("span",{"aria-hidden":!0,className:"company-meta__divider",children:"|"}):null,a]},a))})}function gu(e){return typeof e=="string"?e:e.label}function bu({value:e,onChange:t,suggestions:a,openOnFocus:r=!1,filterSuggestions:l,onSelectSuggestion:s,autoActiveFirst:i=!1}){const u=o.useId(),[c,d]=o.useState(!1),[m,p]=o.useState(-1),C=o.useRef(null),b=o.useMemo(()=>{if(!a.length)return[];const N=e??"";return l===!1?a:N?typeof l=="function"?l(a,N):a.filter(F=>gu(F).toLowerCase().includes(N.toLowerCase())):r?a:[]},[a,e,r,l]),[x,f]=o.useState(!1),h=o.useRef([]),_=x&&b.length===0?h.current:b;o.useEffect(()=>{_.length&&(h.current=_)},[_]);const g=o.useCallback(()=>f(!0),[]),k=o.useCallback(()=>f(!1),[]),v=i?0:-1;o.useEffect(()=>{c||p(v)},[c,v]),o.useEffect(()=>()=>{C.current&&clearTimeout(C.current)},[]);const B=m<_.length?m:v<_.length?v:-1,y=o.useCallback(N=>{s?s(N):t?.(gu(N)),d(!1)},[t,s]),w=o.useCallback(()=>d(!0),[]),A=o.useCallback(()=>{d(!0),p(v)},[v]),E=o.useCallback(()=>{C.current=setTimeout(()=>d(!1),120)},[]),D=o.useCallback(N=>{N.nativeEvent.isComposing||N.keyCode===229||(N.key==="ArrowDown"?(N.preventDefault(),d(!0),p(F=>Math.min(_.length-1,(F<_.length?F:v)+1))):N.key==="ArrowUp"?(N.preventDefault(),p(F=>Math.max(v,(F<_.length?F:_.length)-1))):N.key==="Enter"?B>=0&&y(_[B]):N.key==="Escape"&&c&&(N.preventDefault(),d(!1)))},[_,B,c,y,v]);return{listId:u,open:c,activeIdx:B,filtered:_,handleFocus:w,handleBlur:E,handleInput:A,handleKeyDown:D,handleSelect:y,handleCompositionStart:g,handleCompositionEnd:k}}const Ro=typeof window<"u"?o.useLayoutEffect:o.useEffect;function Xn(e){const{value:t,defaultValue:a,name:r,inputRef:l,onChange:s,label:i,ariaLabel:u,ariaDescribedBy:c,required:d,placeholder:m,ghostText:p,ghostHint:C,type:b="text",disabled:x=!1,readOnly:f=!1,error:h,helperText:_,maxLength:g,size:k=40,variant:v="input",fullWidth:B=!1,newline:y=!1,multiline:w=!1,rows:A=3,leftIcon:E,rightIcon:D,clearable:N=!1,list:F,showCount:R=!0,className:K="",onFocus:L,onBlur:$,onKeyDown:T,onEnter:J,inputMode:q,autoComplete:O,autoFocus:Q,suggestions:P,filterSuggestions:V,onSelectSuggestion:W,autoActiveFirst:G,openOnFocus:S=!1}=e,M=f||x?void 0:P,{t:I}=_e.useTranslation(),Z=o.useId();!i&&!u&&Rt(`TextField:unnamed:${Z}`,"[ihab/TextField] \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 label \uC774\uB098 ariaLabel \uC911 \uD558\uB098\uB97C \uC8FC\uC138\uC694. placeholder \uB294 \uC774\uB984\uC744 \uB300\uC2E0\uD558\uC9C0 \uBABB\uD569\uB2C8\uB2E4.");const le=`tf-${Z}`,oe=`tf-helper-${Z}`,de=o.useRef(null),re=bu({value:t??"",onChange:s,suggestions:M??[],openOnFocus:S,filterSuggestions:V,onSelectSuggestion:W,autoActiveFirst:G}),z=!!M&&re.open&&re.filtered.length>0,ne=o.useRef(null),[H,U]=o.useState(null),pe=o.useCallback(()=>{const Ne=ne.current;if(!Ne||typeof window>"u")return;const Ue=Ne.getBoundingClientRect(),ke=230,He=window.innerHeight-Ue.bottom<ke+8&&Ue.top>ke+8;U({position:"fixed",left:Ue.left,width:Ue.width,...He?{bottom:window.innerHeight-Ue.top+8}:{top:Ue.bottom+8},zIndex:Ia(Ne)})},[]);Ro(()=>{if(!z)return;pe();let Ne=null;const Ue=()=>{if(typeof requestAnimationFrame>"u"){pe();return}Ne===null&&(Ne=requestAnimationFrame(()=>{Ne=null,pe()}))},ke=He=>{const Be=He.target;Be&&Be.nodeType===1&&Be.closest?.(".text-field__suggestions")||Ue()};return window.addEventListener("scroll",ke,!0),window.addEventListener("resize",Ue),()=>{Ne!==null&&cancelAnimationFrame(Ne),window.removeEventListener("scroll",ke,!0),window.removeEventListener("resize",Ue)}},[z,pe]);const Ee=o.useCallback(Ne=>{de.current=Ne,typeof l=="function"?l(Ne):l&&(l.current=Ne)},[l]),ge=p?`${p}${C??I("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)")}`:m,me=t!==void 0,ie=me&&b==="password",[be,he]=o.useState((a??"").length),ue=me?(t??"").length:be,Me=o.useRef(t);Ro(()=>{Me.current=t}),o.useEffect(()=>{const Ne=de.current;if(!ie||!Ne)return;const Ue=t??"";Ne.value!==Ue&&(Ne.value=Ue)},[ie,t]),o.useEffect(()=>{if(!y||!de.current)return;const Ne=de.current;Ne.style.height="",Ne.scrollHeight>Ne.clientHeight&&(Ne.style.height=`${Ne.scrollHeight}px`)},[t,be,y]);const qe=g!=null&&ue>g,je=k===32?16:20,Ve=we("text-field",`text-field--s${k}`,v==="display"?"text-field--display":"",B?"text-field--full-width":"",x?"text-field--disabled":"",f?"text-field--readonly":"",h?"text-field--error":"",E?"text-field--has-left-icon":"",D||N?"text-field--has-right-icon":"",K),Oe={id:le,...ie?{}:me?{value:t}:{defaultValue:a},ref:Ee,placeholder:ge,name:r,disabled:x,readOnly:f,autoFocus:Q,maxLength:g,list:F,inputMode:q,autoComplete:O,"aria-label":!i&&u?u:void 0,"aria-required":d,"aria-invalid":!!h,"aria-describedby":[_||h?oe:null,c].filter(Boolean).join(" ")||void 0,role:M?"combobox":void 0,"aria-autocomplete":M?"list":void 0,"aria-haspopup":M?"listbox":void 0,"aria-expanded":M?z:void 0,"aria-controls":z?re.listId:void 0,"aria-activedescendant":z&&re.activeIdx>=0?`${re.listId}-option-${re.activeIdx}`:void 0,onChange:Ne=>{const Ue=Ne.target;me||he(Ue.value.length),s?.(Ue.value),M&&re.handleInput(),ie&&queueMicrotask(()=>{const ke=Me.current??"";Ue.value!==ke&&(Ue.value=ke)})},onCompositionStart:M?re.handleCompositionStart:void 0,onCompositionEnd:M?re.handleCompositionEnd:void 0,onFocus:(Ne=>{L?.(Ne),M&&re.handleFocus()}),onBlur:(Ne=>{$?.(Ne),M&&re.handleBlur()}),onKeyDown:(Ne=>{const Ue=(Ne.key==="Tab"&&!Ne.shiftKey||Ne.key===" ")&&!Ne.nativeEvent.isComposing;if(p&&Ue&&!f&&!x&&!(Ne.currentTarget.value??"").trim()){Ne.preventDefault();const ke=Ne.currentTarget;me||(ke.value=p,he(p.length)),s?.(p);return}M&&Ne.key==="Enter"&&!Ne.nativeEvent.isComposing&&re.activeIdx>=0?Ne.preventDefault():J&&Ne.key==="Enter"&&!Ne.nativeEvent.isComposing&&(Ne.preventDefault(),J()),T?.(Ne),M&&re.handleKeyDown(Ne)})},dt=N&&!x&&!f&&ue>0,rt=()=>y?n.jsx("textarea",{...Oe,className:"text-field__input text-field__input--auto body-2",rows:1}):w?n.jsx("textarea",{...Oe,className:"text-field__input text-field__input--textarea body-2",rows:A}):n.jsx("input",{...Oe,type:b,className:"text-field__input body-2"}),nt=v==="display"&&!y&&!w&&!!ge,pt=()=>n.jsxs(n.Fragment,{children:[rt(),nt&&n.jsx("span",{className:"text-field__placeholder","aria-hidden":"true",children:ge})]});return n.jsxs("div",{ref:ne,className:Ve,children:[i&&n.jsxs("label",{htmlFor:le,className:"text-field__label caption-1",children:[i,d&&n.jsx("span",{className:"text-field__required",children:"*"})]}),n.jsxs("div",{className:"text-field__wrap",children:[E&&n.jsx("span",{className:"text-field__icon text-field__icon--left",children:n.jsx(tt,{icon:E,label:"",className:"",svgClassName:"text-field__icon-svg",size:je})}),pt(),g!=null&&R&&n.jsxs("span",{className:`text-field__count caption-2${qe?" text-field__count--over":""}`,children:[ue,"/",g]}),dt&&n.jsx(fe,{size:24,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"text-field__clear",ariaLabel:I("textField.clearAriaLabel","\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"),htmlType:"button",onMouseDown:Ne=>{Ne.preventDefault()},onClick:()=>{!me&&de.current&&(de.current.value="",he(0)),s?.("")},tabIndex:-1}),D&&!dt&&n.jsx("span",{className:"text-field__icon text-field__icon--right",children:n.jsx(tt,{icon:D,label:"",className:"",svgClassName:"text-field__icon-svg",size:je})})]}),!!M&&n.jsx("span",{className:"text-field__status",role:"status","aria-live":"polite",children:re.open&&(t??"").length>0&&re.filtered.length===0?I("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"):""}),z&&(typeof document>"u"?null:cn.createPortal(n.jsx("ul",{id:re.listId,className:"text-field__suggestions",role:"listbox",style:H??{position:"fixed",visibility:"hidden"},"data-tooltip-ignore":!0,children:re.filtered.map((Ne,Ue)=>n.jsx("li",{id:`${re.listId}-option-${Ue}`,role:"option","aria-selected":Ue===re.activeIdx,className:`text-field__suggestion body-2${Ue===re.activeIdx?" is-active":""}`,onMouseDown:ke=>ke.preventDefault(),onClick:()=>{re.handleSelect(Ne),de.current?.focus()},children:typeof Ne=="string"?Ne:n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-field__suggestion-label",children:Ne.label}),Ne.hint&&n.jsx("span",{className:"text-field__suggestion-hint caption-1",children:Ne.hint})]})},typeof Ne=="string"?`${Ne}-${Ue}`:Ne.id))}),document.body)),(_||h)&&n.jsx("div",{className:"text-field__footer",children:n.jsx("span",{id:oe,className:"text-field__helper caption-1",role:h?"alert":void 0,children:h||_})})]})}function fn({options:e,value:t,onChange:a,placeholder:r,disabled:l=!1,block:s=!1,size:i=48,error:u=!1,className:c="",ariaLabel:d,ariaDescribedBy:m}){const{t:p}=_e.useTranslation(),C=r??p("dropdown.placeholder","\uC120\uD0DD"),b=o.useId(),x=o.useId(),f=o.useRef(null),h=o.useCallback((L,$)=>{const T=window.innerHeight-L.bottom<260&&L.top>260;return{position:"fixed",left:L.left,minWidth:L.width,...T?{bottom:window.innerHeight-L.top+6}:{top:L.bottom+6},zIndex:Ia($)}},[]),{open:_,setOpen:g,toggle:k,style:v,triggerRef:B,menuRef:y}=Fa({computeStyle:h}),[w,A]=o.useState(-1),E=o.useCallback(()=>A(-1),[]),D=e.find(L=>L.value===t);o.useEffect(()=>{if(_){const L=e.findIndex($=>$.value===t);A(L>=0?L:e.length?0:-1),requestAnimationFrame(()=>{const $=y.current;if(!$)return;const T=$.querySelectorAll(".dropdown__option")[L];T&&($.scrollTop=Math.max(0,T.offsetTop-$.clientHeight/2+T.clientHeight/2))})}},[_]),o.useEffect(()=>{_&&A(L=>{if(L>=0&&L<e.length)return L;const $=e.findIndex(T=>T.value===t);return $>=0?$:e.length?0:-1})},[_,e.length]);const N=o.useCallback(()=>{l||k()},[l,k]),F=o.useCallback(L=>{L.disabled||l||(L.value!==t&&a?.(L.value),g(!1))},[a,g,l,t]);o.useEffect(()=>{l&&g(!1)},[l,g]);const R=o.useCallback(L=>{if(!l){if(!_){(L.key==="Enter"||L.key===" "||L.key==="ArrowDown")&&(L.preventDefault(),g(!0));return}if(L.key==="Escape"){L.preventDefault(),g(!1);return}L.key==="ArrowDown"?(L.preventDefault(),A($=>{let T=$+1;for(;T<e.length&&e[T].disabled;)T++;return T<e.length?T:$})):L.key==="ArrowUp"?(L.preventDefault(),A($=>{let T=$-1;for(;T>=0&&e[T].disabled;)T--;return T>=0?T:$})):(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),e[w]?F(e[w]):g(!1))}},[l,_,e,w,F,g]),K=_?n.jsx("div",{ref:y,id:b,className:"dropdown__menu","data-tooltip-ignore":!0,role:"listbox",style:v,onMouseLeave:E,onMouseDown:L=>L.preventDefault(),children:e.map((L,$)=>n.jsxs("button",{id:`${b}-option-${$}`,type:"button",role:"option","aria-selected":L.value===t,className:we("dropdown__option body-2",L.value===t?"dropdown__option--active":"",$===w?"dropdown__option--active":"",L.disabled?"dropdown__option--disabled":""),onMouseDown:T=>T.preventDefault(),onClick:()=>F(L),onMouseEnter:()=>A($),disabled:L.disabled,children:[n.jsx("span",{className:"dropdown__option-check",children:L.value===t&&n.jsx("svg",{viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"2 7 5.5 10.5 12 3.5"})})}),L.label]},L.value))}):null;return n.jsxs("div",{ref:f,className:we("dropdown",`dropdown--s${i}`,_?"dropdown--open":"",s?"dropdown--block":"",u?"dropdown--error":"",c),onKeyDown:R,children:[n.jsxs("button",{ref:B,type:"button",className:"dropdown__trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":_,"aria-controls":_?b:void 0,"aria-activedescendant":_&&w>=0?`${b}-option-${w}`:void 0,"aria-label":d,"aria-describedby":[d&&D?x:"",m??""].filter(Boolean).join(" ")||void 0,"aria-invalid":u||void 0,disabled:l,onClick:N,onBlur:L=>{_&&!y.current?.contains(L.relatedTarget)&&g(!1)},children:[n.jsx("span",{id:x,className:`dropdown__trigger-label body-2${D?"":" dropdown__trigger-label--placeholder"}`,children:D?D.label:C}),n.jsx("svg",{className:"dropdown__chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"4 6 8 10 12 6"})})]}),typeof document<"u"&&cn.createPortal(K,f.current?.closest(".ihabdevteam-core-scope")??document.body)]})}function Cr({page:e,totalPages:t,onChange:a,prevLabel:r,nextLabel:l,className:s=""}){const{t:i}=_e.useTranslation(),u=r??i("common.prevPage","\uC774\uC804 \uD398\uC774\uC9C0"),c=l??i("common.nextPage","\uB2E4\uC74C \uD398\uC774\uC9C0"),d=Math.max(1,t),m=()=>a(Math.max(1,Math.min(d,e-1))),p=()=>a(Math.min(d,e+1));return n.jsxs("div",{className:we("pagination",s),children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-left",ariaLabel:u,disabled:e<=1,onClick:m}),n.jsxs("span",{className:"pagination__info body-3","aria-live":"polite","aria-atomic":"true",children:[Math.min(Math.max(1,e),d)," / ",d]}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-right",ariaLabel:c,disabled:e>=t,onClick:p})]})}const Ua=new Map;function wn(e){const{t}=_e.useTranslation(),{options:a=[],value:r=a.find(v=>!v.disabled)?.key??a[0]?.key,onChange:l=v=>{},className:s="",size:i=40,shape:u="pill",useBG:c=!0,fullWidth:d=!1,minButtonWidth:m,ariaLabel:p}=e||{},C=o.useRef(null),b=a.filter(v=>!v.disabled),x=o.useId(),f=a.map(v=>v.key).join("\xB7");o.useEffect(()=>{if(!(!Pn||p!=null&&p!=="")){if(Ua.set(x,f||"(\uBCF4\uAE30 \uC5C6\uC74C)"),Ua.size>1){const v=[...Ua.values()].sort();Rt(`segmented-control-unnamed:${v.join("|")}`,`[ihab/SegmentedControl] \uC774\uB984 \uC5C6\uB294 \uB77C\uB514\uC624\uADF8\uB8F9\uC774 \uD55C \uD654\uBA74\uC5D0 ${Ua.size} \uAC1C \uC11C \uC788\uC2B5\uB2C8\uB2E4 \u2014 \uB0AD\uB3C5\uAE30\uB294 \uBAA8\uB450 "\uC120\uD0DD \uD0ED" \uC73C\uB85C \uC77D\uC5B4 \uC5B4\uB290 \uAC83\uC774 \uBB34\uC5C7\uC778\uC9C0 \uAC00\uB9B4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. ariaLabel \uC744 \uC8FC\uC138\uC694. \uC9C0\uAE08 \uC120 \uAC83(\uBCF4\uAE30 \uC774\uB984\uC73C\uB85C \uC801\uC74C): ${v.join(" / ")}`)}return()=>{Ua.delete(x)}}},[p,f,x]);const h=v=>{if(!b.length)return;const B=Math.max(0,b.findIndex(w=>w.key===r)),y=v==="first"?b[0]:v==="last"?b[b.length-1]:b[(B+v+b.length)%b.length];y&&(l(y.key),Array.from(C.current?.querySelectorAll("[data-segkey]")??[]).find(w=>w.dataset.segkey===y.key)?.focus())},_=v=>{switch(v.key){case"ArrowRight":case"ArrowDown":h(1);break;case"ArrowLeft":case"ArrowUp":h(-1);break;case"Home":h("first");break;case"End":h("last");break;default:return}v.preventDefault()},g=v=>{const B=y=>typeof y=="string"||typeof y=="number";if(!(!B(v.label)||v.count==null||v.count===!1||!B(v.count)))return`${v.label}, ${v.count}`},k=b.some(v=>v.key===r)?r:b[0]?.key;return n.jsx("div",{ref:C,onKeyDown:_,className:we("segmented-control",`segmented-control--${u}`,`segmented-control--${i}`,d&&"segmented-control--full",!c&&"segmented-control--no-bg",m!=null&&"segmented-control--min",s),style:m!=null?{"--segmented-min-button-w":`${m}px`}:void 0,role:"radiogroup","aria-label":p??t("segmentedControl.ariaLabel","\uC120\uD0DD \uD0ED"),children:a.map(v=>n.jsx(fe,{htmlType:"button",role:"radio","aria-checked":v.key===r,"data-segkey":v.key,tabIndex:v.key===k?0:-1,label:v.label,count:v.count,ariaLabel:g(v),disabled:v.disabled,className:v.key===r?"is-selected":"",onClick:()=>{v.disabled||l(v.key)},size:i,shape:u,useBorder:!1,useBG:!1},v.key))})}function Po({count:e,search:t,segment:a,filters:r,pageSize:l,pagination:s,actions:i,className:u}){const{t:c}=_e.useTranslation(),d=e!=null&&n.jsxs("p",{className:"toolbar__count body-1",role:"status","aria-atomic":"true",children:[e.prefix??c("common.totalPrefix","\uCD1D "),n.jsx("span",{className:"toolbar__count-highlight",children:e.value}),e.unit,e.suffix]}),m=!!(t||r?.length||l||s||i);return n.jsxs("div",{className:we("toolbar",u),children:[n.jsxs("div",{className:"toolbar__row",children:[d,a&&(Array.isArray(a)?a:[a]).map((p,C)=>n.jsx(wn,{size:40,...p},p.ariaLabel??C))]}),m&&n.jsx("div",{className:"toolbar__row",children:n.jsxs("div",{className:"toolbar__row-end",children:[t&&n.jsx(Xn,{className:"toolbar__search",size:40,value:t.value,onChange:t.onChange,placeholder:t.placeholder??c("common.search","\uAC80\uC0C9"),ariaLabel:t.placeholder??c("common.search","\uAC80\uC0C9"),autoFocus:t.autoFocus,clearable:!0}),r?.map((p,C)=>n.jsx(fn,{size:40,options:p.options,value:p.value,onChange:p.onChange,ariaLabel:p.ariaLabel},C)),(l||s)&&n.jsxs("div",{className:"toolbar__pager",children:[l&&n.jsx(fn,{size:40,options:l.options,value:l.value,onChange:l.onChange,ariaLabel:l.ariaLabel??c("common.pageSizeSelect","\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218")}),s&&n.jsx(Cr,{page:s.page,totalPages:s.total,onChange:s.onChange,prevLabel:s.prevLabel,nextLabel:s.nextLabel})]}),i]})})]})}function yu(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(yu).join(""):""}function cv(e){let t=e.replace(/\r\n/g,`
|
|
825
825
|
`).replace(/\r/g,`
|
|
@@ -827,7 +827,7 @@ ${v.badge}`:v.badge:void 0;if(y&&c(v.code))return null;if(!v.badge&&!m)return p(
|
|
|
827
827
|
`).map(s=>s.replace(/\t/g," ")),r=a.filter(s=>s.trim().length>0),l=r.length>0?Math.min(...r.map(s=>s.match(/^ */)?.[0].length??0)):0;return a.map(s=>s.slice(l)).join(`
|
|
828
828
|
`)}const dv=new Set(["pnpm","npm","yarn","node","git","curl","docker","cat","ls","cd","rm","mv","cp","echo","export"]),pv=/^(?:const|let|var|function|return|if|else|for|while|switch|case|break|import|from|export|class|new|try|catch|finally|throw|await|async|null|true|false|this|typeof|instanceof)\b/;function mv(e,t){let a=e;const r=[],l=/^(?:sh|bash|zsh|shell|console)$/.test(t.toLowerCase()),s=(i,u)=>r.push({type:i,content:u});for(;a.length>0;){const i=a.match(/^\s+/);if(i){s("whitespace",i[0]),a=a.slice(i[0].length);continue}if(!l&&a.startsWith("//")){const x=a.indexOf(`
|
|
829
829
|
`),f=x===-1?a:a.slice(0,x);s("comment",f),a=a.slice(f.length);continue}if(l&&a.startsWith("#")){const x=a.indexOf(`
|
|
830
|
-
`),f=x===-1?a:a.slice(0,x);s("comment",f),a=a.slice(f.length);continue}const u=a.match(/^\/\*[\s\S]*?\*\//);if(u){s("comment",u[0]),a=a.slice(u[0].length);continue}const c=a.match(/^(`(?:\\.|[^`])*`|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')/);if(c){s("string",c[0]),a=a.slice(c[0].length);continue}const d=a.match(/^\d+(?:\.\d+)?/);if(d){s("number",d[0]),a=a.slice(d[0].length);continue}const m=a.match(pv);if(m){s("keyword",m[0]),a=a.slice(m[0].length);continue}const p=a.match(/^[A-Za-z_$][A-Za-z0-9_$-]*/);if(p){const x=p[0];s(l&&dv.has(x)?"command":"identifier",x),a=a.slice(x.length);continue}const C=a.match(/^[=+\-*/%<>!&|^~?:]+/);if(C){s("operator",C[0]),a=a.slice(C[0].length);continue}const b=a.match(/^[()[\]{};.,]/);if(b){s("punctuation",b[0]),a=a.slice(1);continue}s("other",a[0]),a=a.slice(1)}return r}function hv({children:e,language:t="bash",title:a="",showCopy:r=!0,size:l="default",className:s=""}){const{t:i}=_e.useTranslation(),[u,c]=o.useState(!1),d=cv(yu(e)),m=o.useRef(null);o.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const p=async()=>{try{if(!await Tf(d))return;c(!0),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>c(!1),2e3)}catch{}},C=mv(d,t),b=l==="small"?"caption-1":"body-3";return n.jsxs("div",{className:we("code-box",l==="small"?"code-box--small":"",s),children:[(a||r)&&n.jsxs("div",{className:"code-box__header",role:"toolbar","aria-label":i("common.codeBlock","\uCF54\uB4DC \uBE14\uB85D"),children:[n.jsx("div",{className:"code-box__title caption-1",children:a}),r&&n.jsx(fe,{htmlType:"button",className:"code-box__copy",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:u?"check":"copy",onClick:p,ariaLabel:u?i("common.copied","\uBCF5\uC0AC\uB428"):i("common.copyCode","\uCF54\uB4DC \uBCF5\uC0AC")})]}),n.jsx("pre",{className:"code-box__inner","data-lang":t,children:n.jsx("code",{children:C.map((x,f)=>n.jsx("span",{className:`code-token ${x.type} ${b}`,children:x.content},f))})})]})}const Cv={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function Ga(e){const{t}=_e.useTranslation(),{variant:a="spinner",size:r=24,progress:l=null,label:s}=e||{},i=s||t("loader.loading","Loading");if(a==="bar"){const c=l==null||!Number.isFinite(Number(l)),d=c?0:Math.max(0,Math.min(100,Number(l)));return n.jsx("div",{className:`loader-bar${c?" loader-bar--indeterminate":""}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":c?void 0:d,"aria-label":i,children:n.jsx("div",{className:"loader-bar__inner",style:c?void 0:{width:`${d}%`}})})}const u=typeof r=="number"?`${r}px`:r;return n.jsxs("div",{className:"loader-spinner",style:{width:u,height:u},role:"status","aria-label":i,children:[n.jsx("span",{style:Cv,children:i}),n.jsxs("svg",{className:"loader-spinner__svg",viewBox:"0 0 50 50",width:r,height:r,children:[n.jsx("circle",{className:"loader-spinner__bg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4"}),n.jsx("circle",{className:"loader-spinner__fg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4",strokeLinecap:"round"})]})]})}function vu({checked:e,onChange:t,disabled:a=!1,label:r,ariaLabel:l,labelPosition:s="right",className:i="",id:u}){const c=r&&n.jsx("span",{className:"toggle__label body-3",children:r});return n.jsxs("label",{className:`toggle${a?" toggle--disabled":""} ${i}`.trim(),children:[s==="left"&&c,n.jsx("input",{id:u,type:"checkbox",role:"switch",checked:e,disabled:a,onChange:d=>t?.(d.target.checked),"aria-label":!r&&l?l:void 0}),n.jsx("span",{className:"toggle__slider"}),s==="right"&&c]})}function xu({checked:e=!1,onChange:t,disabled:a,indeterminate:r,label:l,size:s="medium",className:i,title:u,ariaLabel:c}){const d=o.useRef(null),m=o.useId(),p=o.useRef(!!r);return p.current=!!r,o.useEffect(()=>{d.current&&(d.current.indeterminate=!!r)}),n.jsxs("label",{className:we("checkbox",s==="small"&&"checkbox--small",s==="large"&&"checkbox--large",a&&"checkbox--disabled",i),htmlFor:m,title:u,children:[n.jsx("input",{ref:d,id:m,type:"checkbox",className:"checkbox__input",checked:e,onChange:C=>{t?.(C.target.checked),d.current&&(d.current.indeterminate=p.current)},disabled:a,"aria-label":!l&&c?c:void 0}),n.jsx("span",{className:"checkbox__box"}),l&&n.jsx("span",{className:"checkbox__label body-3",children:l})]})}function fv({count:e,actions:t,onClear:a,clearLabel:r,visible:l,content:s,max:i}){const{t:u}=_e.useTranslation(),c=l!==void 0?l:e>0,d=r??u("bulkBar.clearSelection","\uC120\uD0DD \uD574\uC81C"),m=o.useRef(null),p=o.useRef(null),C=o.useRef(null),b=o.useRef(c);o.useLayoutEffect(()=>{const g=p.current,k=b.current;if(b.current=c,c&&!k){const v=typeof document<"u"?document.activeElement:null;C.current=v&&v!==document.body&&!g?.contains(v)?v:null}else!c&&k&&g&&g.contains(document.activeElement)&&sr(g,C.current)},[c]);const[x,f]=o.useState(!1),h=o.useRef(!1),_=o.useRef(null);return o.useEffect(()=>{const g=m.current;if(!g)return;const k=E=>{h.current=E,f(E)},v=()=>{const E=g.firstElementChild??g,D=Array.from(E.children);if(D.length<2){k(!1);return}const N=D[0].offsetTop,F=D.some(T=>T.offsetTop!==N);if(!h.current){_.current=g.clientWidth,F&&k(!0);return}if(F)return;const R=D[0],K=D[D.length-1],L=K.offsetLeft+K.offsetWidth-R.offsetLeft,$=_.current;($==null||L<=$)&&k(!1)};if(v(),typeof ResizeObserver>"u")return;const B=new ResizeObserver(v);B.observe(g);const y=g.parentElement;let w=y?.clientWidth??0;const A=new ResizeObserver(()=>{const E=y?.clientWidth??0;E!==w&&(w=E,_.current=null,v())});return y&&A.observe(y),()=>{B.disconnect(),A.disconnect()}},[s,e]),n.jsxs("div",{ref:p,className:`bulk-bar ${c?"bulk-bar--visible":""}`,inert:!c||void 0,"aria-hidden":c?void 0:!0,children:[n.jsx("span",{ref:m,className:"bulk-bar__count body-2",role:"status",children:s??n.jsx("b",{children:u("common.selectedCount",{count:e})})}),i!==void 0&&n.jsx(Lt,{size:"small",fill:"soft",variant:"main",label:`${e} / ${i}`,"aria-label":u("common.selectedOfMax",{count:e,max:i,defaultValue:`\uCD5C\uB300 ${i}\uAC1C \uC911 ${e}\uAC1C`})}),n.jsxs("div",{className:`bulk-bar__actions${x?" bulk-bar__actions--stacked":""}`,children:[n.jsx(fe,{htmlType:"button",size:40,label:d,onClick:a}),t.map((g,k)=>n.jsx(fe,{htmlType:"button",size:40,variant:g.variant??"default",icon:g.icon,label:g.label,onClick:g.onClick},k))]})]})}const gv=[{key:"edit",icon:"edit-2",closeFirst:!0},{key:"duplicate",icon:"copy",closeFirst:!1},{key:"publish",icon:"book-marked",closeFirst:!1},{key:"copyLink",icon:"link",closeFirst:!1},{key:"remove",icon:"trash-2",closeFirst:!0}];function bv(e){const{onClose:t,className:a}=e;return n.jsx("div",{className:we("item-actions",a),children:gv.map(({key:r,icon:l,closeFirst:s})=>{const i=e[r];if(!i)return null;const u=r==="publish"?i.published?i.unpublish:i.publish:i;return n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:l,ariaLabel:u.label,showTooltipInfo:u.label,onClick:()=>{s&&t(),u.onClick()}},r)})})}function _u(e,t){const a=()=>{if(e){const[f,h]=e.split("-");return{y:+f,m:+h-1}}const[b,x]=lo(t).split("-");return{y:+b,m:+x-1}},[r,l]=o.useState(()=>a().y),[s,i]=o.useState(()=>a().m),u=o.useRef(e);o.useEffect(()=>{if(e===u.current)return;u.current=e;const b=a();l(b.y),i(b.m)},[e]);const c=o.useRef({y:r,m:s});o.useEffect(()=>{c.current={y:r,m:s}},[r,s]);const d=o.useCallback(b=>{const x=c.current.y*12+c.current.m+b,f=Math.floor(x/12),h=x-f*12;c.current={y:f,m:h},l(f),i(h)},[]),m=o.useCallback(()=>d(-1),[d]),p=o.useCallback(()=>d(1),[d]),C=o.useCallback((b,x)=>{c.current={y:b,m:x},l(b),i(x)},[]);return{viewY:r,viewM:s,prevMonth:m,nextMonth:p,setViewYM:C}}function fr(e,t){return new Date(e,t+1,0).getDate()}function yv(e,t){return new Date(e,t,1).getDay()}function Ka(e,t,a){return`${e}-${String(t+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`}function vv(e){if(!e)return"";const[t,a,r]=e.split("-");return`${t}. ${a}. ${r}.`}function xv(e){const t=e.replace(/\D/g,"");if(t.length!==8)return null;const a=+t.slice(0,4),r=+t.slice(4,6),l=+t.slice(6,8);if(r<1||r>12||l<1||l>31)return null;const s=new Date(a,r-1,l);return s.getFullYear()!==a||s.getMonth()!==r-1||s.getDate()!==l?null:Ka(a,r-1,l)}const _v=1900;function wv(e,t,a,r,l){const s=r?+r.split("-")[0]:Math.min(_v,e),i=l?+l.split("-")[0]:Math.max(t+10,e),u=[];for(let c=s;c<=i;c++)u.push({value:String(c),label:a(c)});return u}function wu(e,t,a,r){const l=[];for(let s=1;s<=12;s++){const i=`${e}-${String(s).padStart(2,"0")}`;a&&i<a.slice(0,7)||r&&i>r.slice(0,7)||l.push({value:String(s),label:t(e,s)})}return l}function Bv({value:e,onChange:t,size:a=48,min:r,max:l,disabled:s,placeholder:i,className:u,today:c}){const{t:d,i18n:m}=_e.useTranslation(),p=i??d("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),C=o.useMemo(()=>d("calendar.dow",{returnObjects:!0}),[d]),b=lo(c),{viewY:x,viewM:f,prevMonth:h,nextMonth:_,setViewYM:g}=_u(e,c),k=o.useId(),v=o.useCallback((z,ne)=>{const H=window.innerHeight,U=window.innerWidth,pe=typeof document<"u"?document.getElementById(k):null,Ee=Math.max(pe?.offsetHeight||0,pe?.scrollHeight||0)||300,ge=Math.max(z.width,pe?.offsetWidth||0,260),me=H-z.bottom,ie=z.top,be=me<Ee&&ie>me,he=8,ue=(Me,qe)=>Math.min(Math.max(he,Me),Math.max(he,qe));return{position:"fixed",left:ue(z.left,U-ge-he),width:z.width,minWidth:260,...be?{top:"auto",bottom:ue(H-z.top+6,H-Ee-he)}:{bottom:"auto",top:ue(z.bottom+6,H-Ee-he)},zIndex:Ia(ne)}},[k]),{open:B,setOpen:y,toggle:w,style:A,triggerRef:E,menuRef:D}=Fa({computeStyle:v,onScroll:"reposition",onResize:"reposition",ignoreOutsideClickSelector:".dropdown__menu"});o.useEffect(()=>{if(!B)return;const z=D.current;return(z?.querySelector(".date-picker__day--selected:not(:disabled)")??z?.querySelector(".date-picker__day--today:not(:disabled)")??z?.querySelector(".date-picker__day:not(:disabled)")??z?.querySelector(_n)??z)?.focus?.(),()=>{const ne=document.activeElement;(!ne||ne===document.body)&&E.current?.focus?.()}},[B,D,E]);const[N,F]=o.useState(1),R=o.useRef(null),K=o.useRef(null);o.useEffect(()=>{if(!B)return;const z=e&&e.slice(0,7)===`${x}-${String(f+1).padStart(2,"0")}`?+e.slice(8):b.slice(0,7)===`${x}-${String(f+1).padStart(2,"0")}`?+b.slice(8):1;F(z)},[B]),o.useEffect(()=>{if(K.current==null)return;const z=K.current;K.current=null,R.current?.querySelector(`[data-day="${z}"]`)?.focus()}),o.useEffect(()=>{F(z=>Math.min(z,fr(x,f)))},[x,f]);const L=o.useCallback(z=>{let ne=Ka(z.getFullYear(),z.getMonth(),z.getDate());r&&ne<r&&(ne=r),l&&ne>l&&(ne=l);const[H,U,pe]=ne.split("-").map(Number);(H!==x||U-1!==f)&&g(H,U-1),F(pe),K.current=pe},[r,l,x,f,g]),$=o.useCallback(z=>{const ne=new Date(x,f,N),H=pe=>{ne.setDate(ne.getDate()+pe),L(ne)},U=pe=>{const Ee=ne.getFullYear()*12+ne.getMonth()+pe,ge=Math.floor(Ee/12),me=Ee-ge*12;L(new Date(ge,me,Math.min(ne.getDate(),fr(ge,me))))};switch(z.key){case"ArrowLeft":H(-1);break;case"ArrowRight":H(1);break;case"ArrowUp":H(-7);break;case"ArrowDown":H(7);break;case"Home":H(-ne.getDay());break;case"End":H(6-ne.getDay());break;case"PageUp":z.shiftKey?U(-12):U(-1);break;case"PageDown":z.shiftKey?U(12):U(1);break;default:return}z.preventDefault()},[x,f,N,L]),T=o.useCallback(z=>{s||(t(Ka(x,f,z)),y(!1))},[x,f,t,y,s]);o.useEffect(()=>{s&&y(!1)},[s,y]);const J=z=>{const ne=Ka(x,f,z);return!!(r&&ne<r||l&&ne>l)},q=(()=>{const z=fr(x,f);if(N>=1&&N<=z&&!J(N))return N;for(let ne=1;ne<=z;ne++)if(!J(ne))return ne;return-1})(),O=[];for(let z=0;z<yv(x,f);z++)O.push(null);for(let z=1;z<=fr(x,f);z++)O.push(z);const Q=a===64?20:a===40?16:18,P=Ol(m.language),V=z=>new Intl.DateTimeFormat(P,{year:"numeric"}).format(new Date(z,0,1)),W=(z,ne)=>new Intl.DateTimeFormat(P,{month:"long"}).format(new Date(z,ne-1,1)),G=wv(x,+b.slice(0,4),V,r,l),S=wu(x,W,r,l),M=z=>{const ne=wu(z,W,r,l);if(ne.length===0)return;const H=ne.some(U=>+U.value===f+1);g(z,H?f:+ne[0].value-1)},[I,Z]=o.useState(null);o.useEffect(()=>{Z(null)},[e]);const le=o.useCallback(z=>{Z(z);const ne=xv(z);if(!ne||r&&ne<r||l&&ne>l)return;t(ne);const[H,U]=ne.split("-");g(+H,+U-1)},[r,l,t,g]),oe=o.useCallback(()=>{Z(null)},[]),de=o.useCallback(z=>{z.key==="Enter"?(z.preventDefault(),oe(),y(!1)):z.key==="Escape"?(oe(),y(!1)):z.key==="ArrowDown"&&!B&&(z.preventDefault(),y(!0))},[oe,y,B]),re=B?cn.createPortal(n.jsxs("div",{ref:D,id:k,className:"date-picker__dropdown",style:A,"data-tooltip-ignore":!0,role:"dialog","aria-label":d("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),tabIndex:-1,children:[n.jsxs("div",{className:"date-picker__nav",children:[n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:h,"aria-label":d("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(Ps,{size:16,strokeWidth:2})}),n.jsxs("div",{className:"date-picker__nav-ym",children:[n.jsx(fn,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectYear","\uC5F0 \uC120\uD0DD"),options:G,value:String(x),onChange:z=>M(+z),size:40}),n.jsx(fn,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectMonth","\uC6D4 \uC120\uD0DD"),options:S,value:String(f+1),onChange:z=>g(x,+z-1),size:40})]}),n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:_,"aria-label":d("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(Is,{size:16,strokeWidth:2})})]}),n.jsxs("div",{className:"date-picker__grid",ref:R,onKeyDown:$,children:[C.map(z=>n.jsx("div",{className:"date-picker__dow caption-1",children:z},z)),O.map((z,ne)=>{if(z===null)return n.jsx("div",{},`e${ne}`);const H=Ka(x,f,z),U=H===e,pe=H===b,Ee=J(z),ge=ne%7;return n.jsx("button",{type:"button",disabled:Ee,"data-day":z,tabIndex:z===q?0:-1,"aria-current":pe?"date":void 0,onClick:()=>!Ee&&T(z),className:we("date-picker__day caption-1",U&&"date-picker__day--selected",pe&&!U&&"date-picker__day--today",Ee&&"date-picker__day--disabled",ge===0&&"date-picker__day--sun",ge===6&&"date-picker__day--sat"),children:z},z)})]})]}),document.body):null;return n.jsxs("div",{className:we("date-picker",`date-picker--s${a}`,B&&"date-picker--open",u),children:[n.jsxs("div",{className:"date-picker__field",children:[n.jsx("input",{ref:E,type:"text",className:"date-picker__trigger body-2",value:I??vv(e),placeholder:p,onChange:z=>le(z.target.value),onClick:()=>!s&&!B&&w(),onKeyDown:de,onBlur:oe,disabled:s,"aria-haspopup":"dialog","aria-expanded":B,inputMode:"numeric",autoComplete:"off"}),n.jsx("button",{type:"button",className:"date-picker__icon-btn",onClick:()=>!s&&w(),disabled:s,tabIndex:-1,"aria-label":p,"aria-haspopup":"dialog","aria-expanded":B,children:n.jsx(Gs,{size:Q,className:"date-picker__icon",strokeWidth:1.5})})]}),re]})}function kv({items:e,className:t,ariaLabel:a="\uC54C\uB9BC \uAE00",titleLevel:r=4,targetBytes:l}){const s=r?`h${r}`:"div";return n.jsx("div",{className:`notify-text-preview${t?` ${t}`:""}`,role:"group","aria-label":a,children:e.map(i=>{const u=l===void 0?Sl(i.sms):Sl(i.sms,l),c=u.type==="LMS";return n.jsxs("section",{className:"notify-text-preview__item",children:[n.jsxs("header",{className:"notify-text-preview__head",children:[n.jsx(s,{className:"notify-text-preview__name h5b",children:i.name}),i.meta&&Object.keys(i.meta).length>0?n.jsx("dl",{className:"notify-text-preview__meta caption-1",children:Object.entries(i.meta).map(([d,m])=>n.jsxs("div",{className:"notify-text-preview__meta-row",children:[n.jsx("dt",{children:d}),n.jsx("dd",{children:m})]},d))}):null]}),n.jsxs("div",{className:"notify-text-preview__body",children:[n.jsxs("div",{className:"notify-text-preview__col",children:[n.jsxs("div",{className:"notify-text-preview__col-head caption-1",children:[n.jsx("span",{children:"\uBB38\uC790"}),n.jsxs("span",{className:`notify-text-preview__bytes${c?" is-over":u.overTarget?" is-over-target":""}`,title:u.over?`${u.limit}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uBCF4\uB0BC \uB54C \uC798\uB9B0\uB2E4`:c?`${El}\uBC14\uC774\uD2B8\uB97C \uB118\uC5B4 \uC7A5\uBB38\uC774\uB2E4 \u2014 \uD55C \uD1B5 \uAC12\uC774 \uB2E8\uBB38\uC758 \uB450 \uBC30 \uBC18\uC774\uB2E4`:u.overTarget?`\uACA8\uB204\uB294 ${u.target}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uD55C \uAE00\uC790\uB9CC \uB298\uC5B4\uB3C4 ${El}\uC744 \uB118\uC5B4 \uC7A5\uBB38\uC774 \uB41C\uB2E4`:void 0,children:[u.bytes,u.target!==null?` / \uBAA9\uD45C ${u.target}`:"","\uBC14\uC774\uD2B8 \xB7 ",c?"\uC7A5\uBB38":"\uB2E8\uBB38",u.over?" \xB7 \uD55C\uACC4 \uB118\uC74C":c?" \xB7 \uAC12\uC774 \uB450 \uBC30 \uBC18":u.overTarget?" \xB7 \uBAA9\uD45C \uB118\uC74C":""]})]}),n.jsx("pre",{className:"notify-text-preview__text",children:i.sms})]}),i.ata?n.jsxs("div",{className:"notify-text-preview__col",children:[n.jsx("div",{className:"notify-text-preview__col-head caption-1",children:n.jsx("span",{children:"\uC54C\uB9BC\uD1A1"})}),n.jsx("pre",{className:"notify-text-preview__text",children:i.ata})]}):null]})]},i.name)})})}function Av({src:e,alt:t,className:a,style:r,tone:l,textColor:s}){const i=!l&&!!s,u=Iy(e,i),c="bl"+o.useId().replace(/[^a-zA-Z0-9]/g,"");return l?n.jsx("span",{className:we("brand-logo","brand-logo--tone",a),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...r,"--brand-logo-src":`url("${e}")`,"--brand-logo-tone":l},children:n.jsx("img",{src:e,alt:"","aria-hidden":"true",className:"brand-logo__sizer",draggable:!1})}):i&&u?n.jsx("span",{className:we("brand-logo","brand-logo--inline",a),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...r,"--brand-logo-text-color":s},dangerouslySetInnerHTML:{__html:Ry($y(u),c)}}):n.jsx("img",{src:e,alt:t,className:we("brand-logo",a),style:r,draggable:!1})}function Bu({children:e,className:t}){const a=o.useRef(null),[r,l]=o.useState(null);return o.useEffect(()=>{l(a.current?.parentElement??null)},[]),o.useEffect(()=>{const s=a.current;if(!s||!r)return;const i=()=>{const c=typeof window<"u"&&window.getComputedStyle(s).position==="absolute"?Math.ceil(s.getBoundingClientRect().width):0;c>0?r.style.setProperty("--section-head-float-w",`${c}px`):r.style.removeProperty("--section-head-float-w")};if(i(),typeof ResizeObserver>"u")return()=>{r.style.removeProperty("--section-head-float-w")};const u=new ResizeObserver(()=>i());return u.observe(s),u.observe(r),()=>{u.disconnect(),r.style.removeProperty("--section-head-float-w")}},[r,e]),n.jsx("div",{ref:a,className:we("section-head-float",t),children:e})}function Io({items:e,className:t}){return n.jsx("div",{className:t?`manager-bar-chart-legend ${t}`:"manager-bar-chart-legend",children:e.map((a,r)=>n.jsxs("span",{className:"manager-bar-chart-legend-item",children:[n.jsx("span",{className:"manager-bar-chart-legend-dot",style:{background:a.color}}),a.label]},r))})}function Ya({label:e,children:t}){return e?n.jsxs("div",{className:"barchart-total barchart-total--stacked",children:[n.jsx("span",{className:"barchart-total__label body-3",children:e}),n.jsx("span",{className:"barchart-total__value",children:t})]}):n.jsx("div",{className:"barchart-total",children:t})}function Fo({title:e,titleClassName:t="h3",titleLevel:a=3,icon:r,disc:l,headRight:s,headFloat:i,headSegment:u,headMenuItems:c,collapseBelow:d=420,onClick:m,ariaLabel:p,tooltip:C,totalNum:b,totalUnit:x,totalLabel:f,subRow:h,subRowAlign:_="start",className:g,inGrid:k=!1,children:v}){const{t:B}=_e.useTranslation(),y=o.useRef(null),{anchorRect:w,openAt:A,close:E}=Pa(),D=o.useCallback(()=>{C&&y.current&&A(y.current)},[C,A]),[N,F]=o.useState(!1);Ro(()=>{const S=y.current;if(!S||!u)return;const M=Z=>F(Z>0&&Z<d);if(M(S.clientWidth),typeof ResizeObserver>"u")return;const I=new ResizeObserver(Z=>M(Z[0].contentRect.width));return I.observe(S),()=>I.disconnect()},[u,d]);const[R,K]=o.useState(null),L=o.useCallback(()=>K(null),[]),$=o.useCallback(S=>{const M=S.currentTarget.getBoundingClientRect();K(I=>I?null:{left:M.left,right:M.right,top:M.top,bottom:M.bottom,width:M.width,height:M.height,x:M.x,y:M.y})},[]),T=!!u&&N;o.useEffect(()=>{T||K(null)},[T]);const J=u?[...u.options.map(S=>({label:S.label,icon:S.icon,selected:S.key===u.value,disabled:S.disabled,onClick:()=>u.onChange(S.key),closeOnSelect:!0})),...(c??[]).map((S,M)=>M===0?{...S,separatorBefore:!0}:S)]:[],q=o.useCallback(S=>{if(!m)return;const M=S.target;M&&typeof M.closest=="function"&&M.closest('button, a, input, select, textarea, [role="radiogroup"]')||m()},[m]),O=o.useCallback(S=>{m&&S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),m())},[m]),Q=typeof s=="function"?s({collapsed:T}):s,P=b!=null||f?n.jsxs(Ya,{label:f,children:[b!=null&&n.jsx("span",{className:"barchart-total__num h0",children:b}),x&&n.jsx("span",{className:"barchart-total__unit h5",children:x})]}):null,V=Q||u?n.jsxs("div",{className:"manager-section__head-right",children:[u&&(T?n.jsx(fe,{htmlType:"button",size:32,type:"dot",icon:"ellipsis",ariaLabel:u.ariaLabel??B("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:u.ariaLabel??B("common.more","\uB354\uBCF4\uAE30"),"aria-haspopup":"menu","aria-expanded":!!R,onClick:$}):n.jsx(wn,{size:32,ariaLabel:u.ariaLabel,options:u.options.map(S=>({key:S.key,label:S.label,disabled:S.disabled})),value:u.value,onChange:u.onChange})),Q]}):null,W=o.useId(),G=a?`h${a}`:"div";return n.jsxs("section",{ref:y,className:["manager-section",k&&"manager-section--grid",m&&"manager-section--clickable",g].filter(Boolean).join(" "),onClick:m?q:void 0,onKeyDown:m?O:void 0,onPointerEnter:C?D:void 0,onPointerLeave:C?E:void 0,onFocus:C?D:void 0,onBlur:C?E:void 0,role:m?"button":void 0,tabIndex:m?0:void 0,"aria-label":m?p??(typeof e=="string"?e:void 0):void 0,"aria-labelledby":!m&&e!=null?W:void 0,children:[C&&w&&n.jsx(Dn,{anchorRect:{left:w.left,top:w.top+21,right:w.right,bottom:w.bottom,width:w.width,height:w.height},text:C}),i&&n.jsx(Bu,{children:i}),n.jsxs("div",{className:"manager-section__head",children:[n.jsxs("div",{className:"manager-section__title-row",children:[r&&n.jsx(tt,{icon:r,label:typeof e=="string"?e:void 0,className:"manager-section__icon"}),n.jsx(G,{id:W,className:["manager-section__title",t].filter(Boolean).join(" "),children:e})]}),V,l&&n.jsx("div",{className:"manager-section__disc body-3",children:l})]}),(P||h)&&n.jsxs("div",{className:["barchart-sub-row",_!=="start"&&`barchart-sub-row--${_}`].filter(Boolean).join(" "),children:[P,h]}),v,R&&n.jsx(vn,{anchorRect:R,onClose:L,ariaLabel:u?.ariaLabel??B("tooltip.menu","\uBA54\uB274"),children:n.jsx(Oa,{columns:[{items:J}],onClose:L,size:"small"})})]})}const Za=(e,t)=>`${e}-${String(t).padStart(2,"0")}`,Oo=e=>Za(e.getFullYear(),e.getMonth()+1);function ma(e){const t=/^(\d{4})-(\d{2})$/.exec(e);if(!t)return null;const a=Number(t[2]);return a>=1&&a<=12?{year:Number(t[1]),month1:a}:null}const zo=(e,t)=>`${e}#${t}`;function Bn(e,t){const a=new Date(e,t,1).getDay();return 1+(8-(a===0?7:a))%7}function Nv(){const e=la();let t=e.getFullYear(),a=e.getMonth(),r=e.getDate();if(r<Bn(t,a)){const i=new Date(t,a,0);t=i.getFullYear(),a=i.getMonth(),r=i.getDate()}const l=Math.floor((r-Bn(t,a))/7),s=Za(t,a+1);return{monthKey:s,value:zo(s,l)}}function Ev(e){const t=la(),a=Oo(t),r=(c,d)=>Za(c,d+1),l=new Map;l.set(a,[]);for(const c of e){if(isNaN(c.date.getTime()))continue;const d=r(c.date.getFullYear(),c.date.getMonth());l.has(d)||l.set(d,[]),l.get(d).push(c)}for(const[c,d]of[...l.entries()]){const m=ma(c);if(!m)continue;const p=m.year,C=m.month1-1,b=Bn(p,C);if(!(c===a&&t.getDate()<b)&&!d.some(h=>h.date.getDate()<b))continue;const x=new Date(p,C,0),f=r(x.getFullYear(),x.getMonth());l.has(f)||l.set(f,[])}const s=new Map;for(const[c,d]of l){const m=ma(c);if(!m)continue;const p=m.year,C=m.month1-1,b=new Date(p,C+1,0).getDate(),x=d.reduce((v,B)=>Math.max(v,B.parts?.length??0,B.partsB?.length??0),0),f=d.some(v=>v.partsB),h=new Array(b+1).fill(0),_=new Array(b+1).fill(0),g=Array.from({length:b+1},()=>new Array(x).fill(0)),k=Array.from({length:b+1},()=>new Array(x).fill(0));for(const v of d){const B=v.date.getDate();if(h[B]+=v.a,_[B]+=v.b,v.parts)for(let y=0;y<x;y++)g[B][y]+=v.parts[y]??0;if(v.partsB)for(let y=0;y<x;y++)k[B][y]+=v.partsB[y]??0}s.set(c,{year:p,month:C,daysInMonth:b,partsLen:x,hasPartsB:f,dayA:h,dayB:_,dayParts:g,dayPartsB:k})}const i=(c,d,m)=>new Date(c,d,m).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),u={};for(const[c,d]of s){const{year:m,month:p,daysInMonth:C,dayA:b,dayB:x,dayParts:f,dayPartsB:h}=d,_=m===t.getFullYear()&&p===t.getMonth(),g=t.getDate(),k=s.get(r(p===11?m+1:m,(p+1)%12)),v=d.partsLen,B=[];for(let w=1;w<=C;w++){const A=_&&w>g;B.push({label:String(w),...A&&b[w]===0&&x[w]===0?{future:!0}:{},a:A&&b[w]===0&&x[w]===0?-1:b[w],b:x[w],...v?{parts:f[w]}:{},...v&&d.hasPartsB?{partsB:h[w]}:{}})}const y=[];for(let w=Bn(m,p);w<=C;w+=7){const A=Math.max(0,w+6-C),E=A&&k?Math.max(v,k.partsLen):v,D=d.hasPartsB||!!(A&&k?.hasPartsB);let N=0,F=0;const R=new Array(E).fill(0),K=new Array(E).fill(0);for(let $=w;$<=Math.min(w+6,C);$++){N+=b[$],F+=x[$];for(let T=0;T<v;T++)R[T]+=f[$][T],K[T]+=h[$][T]}if(A&&k)for(let $=1;$<=A&&!i(k.year,k.month,$);$++){N+=k.dayA[$],F+=k.dayB[$];for(let T=0;T<k.partsLen;T++)R[T]+=k.dayParts[$][T],K[T]+=k.dayPartsB[$][T]}const L=A?`${(p+1)%12+1}/${A}`:`${w+6}`;y.push({label:`${y.length+1}\uC8FC`,sublabel:`[${w}\uC77C~${L}\uC77C]`,a:N,b:F,...E?{parts:R}:{},...E&&D?{partsB:K}:{}})}u[c]={weekly:y,daily:B}}return u}function ku(){const e=la(),t=e.getFullYear(),a=e.getMonth()+1,r=[];for(let l=2024;l<=t;l++){const s=l===t?a:12;for(let i=1;i<=s;i++)r.push({value:Za(l,i),year:l,month:i})}return r.reverse()}ku();function Dv(){return ku()}function Au(e,t){const a=e("calendar.weekOrdinal",{returnObjects:!0,defaultValue:[]}),r=Array.isArray(a)&&typeof a[t]=="string"?a[t]:null;return e("calendar.weekLabel",{ord:r??String(t+1)})}function Nu(e){const{t,i18n:a}=_e.useTranslation(),[r,l]=o.useState("week"),s=o.useMemo(()=>Dv().filter(E=>E.value in e),[e]),i=o.useMemo(()=>{const E=[];for(const D of s){const N=new Date(D.year,D.month,0).getDate(),F=Bn(D.year,D.month-1),R=Math.ceil((N-F+1)/7);for(let K=R-1;K>=0;K--)E.push({value:zo(D.value,K),monthKey:D.value,year:D.year,month:D.month,week:K})}return E},[s]),u=o.useCallback(E=>`${so(t,a.language,E.year,E.month)} ${Au(t,E.week)}`,[t]),c=o.useMemo(()=>s.map(E=>({value:E.value,label:so(t,a.language,E.year,E.month)})),[t,a.language,s]),d=o.useMemo(()=>i.map(E=>({value:E.value,label:u(E)})),[i,u]),m=o.useMemo(()=>Nv(),[e]),p=o.useMemo(()=>s.find(E=>E.value===m.monthKey)?.value??s[0]?.value??"",[s,m]),C=o.useMemo(()=>i.find(E=>E.value===m.value)?.value??i[0]?.value??"",[i,m]),[b,x]=o.useState(""),[f,h]=o.useState("");o.useEffect(()=>{s.find(E=>E.value===b)||x(p)},[s,b,p]),o.useEffect(()=>{i.find(E=>E.value===f)||h(C)},[i,f,C]);const _=r==="month"?c:d,g=r==="month"?b:f,k=r==="month"?x:h,v=o.useMemo(()=>{const E=t("calendar.dow",{returnObjects:!0});return Array.isArray(E)?E:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]},[t]),B=_.findIndex(E=>E.value===g),y=o.useCallback(()=>{const E=_.findIndex(D=>D.value===g);E<_.length-1&&k(_[E+1].value)},[_,g,k]),w=o.useCallback(()=>{const E=_.findIndex(D=>D.value===g);E>0&&k(_[E-1].value)},[_,g,k]),A=o.useMemo(()=>[{key:"week",label:t("manager.chart.periodWeek","\uC8FC")},{key:"month",label:t("manager.chart.periodMonth","\uC6D4")}],[t]);return{period:r,setPeriod:l,range:g,setRange:k,activeOptions:_,activeIdx:B,handlePrev:y,handleNext:w,periodOptions:A,monthRange:b,weekRange:f,weekRanges:i,DOW:v}}const kt=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function Mn(e,t=!0){return e.future===!0||t&&e.a===-1}function Sv({data:e,colorA:t,colorB:a,labelA:r,labelB:l,barWidth:s=10,barGap:i=1,height:u=140,maxOverride:c,tightMax:d,seriesColors:m,seriesLabels:p,rateLabels:C,grouped:b=!1,baseline:x,focusableBars:f=!1}){const h=!a,_=!!(m&&m.length>0),g=x,k=o.useMemo(()=>_?Math.max(0,...e.filter(O=>!Mn(O,g==null)).map(O=>b?Math.max(0,...(O.parts??[]).map(kt)):(O.parts??[]).reduce((Q,P)=>Q+Math.max(0,kt(P)),0))):Math.max(0,...e.filter(O=>!Mn(O,g==null)).flatMap(O=>h?[kt(O.a)]:[kt(O.a),kt(O.b)])),[e,h,_,b]),v=o.useMemo(()=>{if(g==null)return 0;const O=e.filter(Q=>!Mn(Q,g==null)).flatMap(Q=>_?(Q.parts??[]).map(kt):h?[kt(Q.a)]:[kt(Q.a),kt(Q.b)]);return Math.max(0,...O.map(Q=>Math.abs(Q-g)))},[e,g,_,h]),B=o.useMemo(()=>{const O=g!=null?v:k;return c??(d?O>0?O:10:Math.ceil(O/10)*10||10)},[k,v,g,c,d]),y=u,w=_?b?Math.max(1,m.length):1:h?1:2,A={"--bar-width":`${o.useMemo(()=>{const O=Math.max(1,e.length);return Math.max(2,Math.min(s,Math.round(120/(O*w)+6)))},[e.length,w,s])}px`},E={"--bar-group-gap":`${Math.max(0,i)}px`},D=o.useMemo(()=>{const O=Math.round(B/2);return g!=null?[g+B,...O!==B?[g+O]:[],g,...O!==B?[g-O]:[],g-B]:O!==B?[B,O,0]:[B,0]},[B,g]),N=O=>g!=null?1-(O-(g-B))/(2*B):1-O/B,[F,R]=o.useState(null),K=o.useCallback(()=>R(null),[]),L=o.useCallback((O,Q)=>{const P=[O.label,O.sublabel].filter(Boolean).join(" ");let V;if(_&&b&&O.rawPartsB)V=(p??[]).map((W,G)=>{const S=O.rawPartsB[G]??0;return{text:S>0?`${W}: ${Q[G]??0}% (${O.rawParts?.[G]??0}/${S})`:`${W}: -`,color:(m??[])[G]}});else if(_&&b)V=(p??[]).map((W,G)=>({text:`${W}: ${J(Q[G]??0)}`,color:(m??[])[G]}));else if(_){const W=(p??[]).map((S,M)=>({text:`${S}: ${Q[M]??0}`,color:(m??[])[M]})),G=W.filter((S,M)=>(Q[M]??0)>0);V=G.length?G:W}else C&&!h?V=[{text:`${r} ${kt(O.a)}%`,color:t},{text:`${l} ${kt(O.b)}%`,color:a}]:C&&O.rawB!==void 0?V=[{text:`${C.total} ${O.rawB}`},{text:`${C.done} ${O.rawA??0}`,color:t}]:h?V=[{text:`${r}: ${kt(O.a)}`,color:t}]:V=[{text:`${r}: ${kt(O.a)}`,color:t},{text:`${l}: ${kt(O.b)}`,color:a}];return{title:P,items:V}},[_,b,p,m,C,h,r,l,t,a,g]),$=o.useCallback((O,Q,P)=>{const V=O.getBoundingClientRect(),{title:W,items:G}=L(Q,P);R({rect:{left:V.left,top:V.top,right:V.right,bottom:V.bottom,width:V.width,height:V.height},title:W,items:G})},[L]),T=o.useCallback((O,Q)=>{const{title:P,items:V}=L(O,Q);return[P,...V.map(W=>W.text)].filter(Boolean).join(", ")},[L]),J=O=>g!=null&&O>g?`+${O}`:`${O}`,q=F!=null;return o.useEffect(()=>{if(!q)return;const O=()=>R(null),Q=P=>{const V=P.target;V&&typeof V.closest=="function"&&V.closest(".manager-bar-chart-col")||R(null)};return window.addEventListener("scroll",O,!0),document.addEventListener("pointerdown",Q,!0),()=>{window.removeEventListener("scroll",O,!0),document.removeEventListener("pointerdown",Q,!0)}},[q]),n.jsxs("div",{className:"manager-bar-chart-wrap",style:E,children:[n.jsx("div",{className:"manager-bar-chart-inner",children:n.jsx("div",{className:"manager-bar-chart-scroll",children:n.jsxs("div",{className:"manager-bar-chart-area",children:[n.jsxs("div",{className:"manager-bar-chart-plot",style:{height:y},children:[D.slice(0,-1).map((O,Q)=>n.jsx("div",{className:`manager-bar-chart-gridline${g!=null&&O===g?" manager-bar-chart-gridline--baseline":""}`,style:{top:N(O)*y},children:n.jsx("span",{className:"manager-bar-chart-gridline__label caption-1",children:O})},Q)),e.map((O,Q)=>{const P=Mn(O,g==null),V=y/2,W=I=>g!=null?Math.min(V,Math.abs(kt(I)-g)/B*V):Math.min(y,Math.max(0,kt(I)/B*y)),G=P?0:W(O.a),S=P?0:W(O.b),M=(O.parts??[]).map(kt);return n.jsx("div",{className:`manager-bar-chart-col${b&&_?" manager-bar-chart-col--group":""}`,style:{cursor:P?"default":"pointer"},tabIndex:f&&!P?0:void 0,role:f&&!P?"img":void 0,"aria-label":f&&!P?T(O,M):void 0,onMouseEnter:P?void 0:I=>$(I.currentTarget,O,M),onFocus:P||!f?void 0:I=>$(I.currentTarget,O,M),onBlur:f?K:void 0,onMouseLeave:K,children:!P&&(_&&b?(m??[]).map((I,Z)=>{const le=M[Z]??0;if(g==null)return n.jsx("div",{className:"manager-bar-chart-bar",style:{...A,height:W(le),background:I}},Z);const oe=kt(le)<g;return n.jsxs("div",{className:"manager-bar-chart-slot",style:A,children:[n.jsx("div",{className:"manager-bar-chart-slot__half manager-bar-chart-slot__half--up",children:!oe&&n.jsx("div",{className:"manager-bar-chart-bar manager-bar-chart-bar--full",style:{height:W(le),background:I}})}),n.jsx("div",{className:"manager-bar-chart-slot__half manager-bar-chart-slot__half--down",children:oe&&n.jsx("div",{className:"manager-bar-chart-bar manager-bar-chart-bar--full manager-bar-chart-bar--down",style:{height:W(le),background:I}})})]},Z)}):_?n.jsx("div",{className:"manager-bar-chart-stack",style:A,children:(()=>{const I=M.reduce((le,oe,de)=>oe>0?de:le,-1);let Z=y;return M.map((le,oe)=>{if(le<=0)return null;const de=Math.min(Z,le/B*y);return Z-=de,n.jsx("div",{className:"manager-bar-chart-stack-segment",style:{height:de,background:(m??[])[oe],borderRadius:oe===I?"6px 6px 0 0":void 0}},oe)})})()}):g!=null?n.jsx(n.Fragment,{children:[{v:kt(O.a),c:t},...h?[]:[{v:kt(O.b),c:a}]].map(({v:I,c:Z},le)=>n.jsxs("div",{className:"manager-bar-chart-slot",style:A,children:[n.jsx("div",{className:"manager-bar-chart-slot__half manager-bar-chart-slot__half--up",children:I>=g&&n.jsx("div",{className:"manager-bar-chart-bar manager-bar-chart-bar--full",style:{height:W(I),background:Z}})}),n.jsx("div",{className:"manager-bar-chart-slot__half manager-bar-chart-slot__half--down",children:I<g&&n.jsx("div",{className:"manager-bar-chart-bar manager-bar-chart-bar--full manager-bar-chart-bar--down",style:{height:W(I),background:Z}})})]},le))}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"manager-bar-chart-bar",style:{...A,height:G,background:t}}),!h&&n.jsx("div",{className:"manager-bar-chart-bar",style:{...A,height:S,background:a}})]}))},Q)})]}),n.jsx("div",{className:"manager-bar-chart-x-axis",children:e.map((O,Q)=>{const P=Mn(O,g==null);return n.jsxs("span",{className:`manager-bar-chart-x-axis__label${P?" manager-bar-chart-x-axis__label--future":""}`,children:[n.jsxs("span",{className:"caption-1 manager-bar-chart-x-axis__main",children:[O.isToday&&n.jsx("span",{className:"manager-bar-chart-x-axis__today-dot",style:{background:t}}),O.label]}),O.sublabel&&n.jsx("span",{className:"caption-1",children:O.sublabel})]},Q)})})]})})}),F&&n.jsx(Kn,{anchorRect:F.rect,title:F.title,items:F.items,showIndex:!1,closeOnOutsideClick:!1})]})}function Eu({control:e}){const{t}=_e.useTranslation(),{activeOptions:a,activeIdx:r,range:l,setRange:s,handlePrev:i,handleNext:u,periodOptions:c,period:d,setPeriod:m}=e,p=d==="week"?t("calendar.prevWeek","\uC774\uC804 \uC8FC"):t("calendar.prevMonth","\uC774\uC804 \uB2EC"),C=d==="week"?t("calendar.nextWeek","\uB2E4\uC74C \uC8FC"):t("calendar.nextMonth","\uB2E4\uC74C \uB2EC");return n.jsxs("div",{className:"manager-section-controls",children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",icon:"chevron-left",ariaLabel:p,showTooltipInfo:p,disabled:r===a.length-1,onClick:i}),n.jsx(fn,{value:l,onChange:s,options:a,size:40,className:"month-dropdown",ariaLabel:t("calendar.rangeSelect","\uAE30\uAC04 \uC120\uD0DD")}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",icon:"chevron-right",ariaLabel:C,showTooltipInfo:C,disabled:r<=0,onClick:u}),n.jsx(wn,{ariaLabel:t("calendar.periodSelect","\uAE30\uAC04 \uB2E8\uC704"),options:c,value:d,onChange:b=>m(b),size:40})]})}function Wo(e,t,a,r=!0){const l=new Date(a.getFullYear(),a.getMonth(),a.getDate());return Array.from({length:7},(s,i)=>{const u=new Date(t);u.setDate(t.getDate()+i);const c=(e[Oo(u)]?.daily??[])[u.getDate()-1],d=c!=null&&Mn(c,r)||u>l;return{dt:u,entry:c,isFuture:d}})}function jv(e,t,a,r=!0){const{period:l,monthRange:s,weekRange:i,weekRanges:u,DOW:c}=t,d=la(),m=d.getFullYear(),p=d.getMonth()+1,C=d.getDate();if(l==="month"){const f=e[s]??{weekly:[],daily:[]},h=ma(s),_=h?h.year:null,g=h?h.month1:null,k=_&&g?Bn(_,g-1):1;return f.weekly.map((v,B)=>{const y=B+1;let w=v.label,A=!1,E=!1;if(_&&g){const D=k+B*7,N=new Date(_,g-1,D+6),F=N.getMonth()+1,R=N.getDate(),K=F===g?`${R}`:`${F}/${R}`;w=a("manager.chart.weekRange",{start:D,end:K});const L=new Date(m,p-1,C).getTime();A=L>=new Date(_,g-1,D).getTime()&&L<=N.getTime(),E=_>m||_===m&&(g>p||g===p&&D>C)}return{...v,label:w,sublabel:Au(a,y-1),isToday:A,future:v.future===!0||E||void 0,a:E?-1:v.a,b:E?0:v.b}})}const b=u.find(f=>f.value===i);if(!b)return[];const x=new Date(b.year,b.month-1,Bn(b.year,b.month-1)+b.week*7);return Wo(e,x,d,r).map(({dt:f,entry:h,isFuture:_})=>{const g=f.getMonth()+1,k=f.getDate(),v=f.getFullYear();return{label:g===b.month&&v===b.year?`${k}`:`${g}/${k}`,sublabel:c[f.getDay()]??"",future:_||void 0,a:_?-1:h&&h.a>0?h.a:0,b:_?0:h&&h.b>0?h.b:0,isToday:v===m&&g===p&&k===C,...h?.parts?{parts:_?h.parts.map(()=>0):h.parts}:{},...h?.partsB?{partsB:_?h.partsB.map(()=>0):h.partsB}:{}}})}const Tv={small:{height:100,barWidth:16},medium:{height:140,barWidth:20},large:{height:180,barWidth:24}};function Mv({focusableBars:e,size:t="medium",barWidth:a,titleKey:r,titleLevel:l,data:s,colorA:i,colorB:u,labelAKey:c,labelBKey:d,showTotal:m=!1,totalUnitKey:p,totalLabelKey:C,control:b,hideControls:x=!1,rate:f=!1,rateAgg:h="dayMean",tightMax:_=!1,avgMode:g=!1,totalFormat:k,series:v,seriesMode:B="stack",loading:y=!1,onDetail:w,headExtra:A,headSegment:E,icon:D,disc:N,onClick:F,cardAriaLabel:R,cardTooltip:K,detailSize:L=32,barGap:$,baseline:T,className:J,inGrid:q=!1}){const{t:O}=_e.useTranslation(),Q=Tv[t],P=Nu(s),V=b??P,W=o.useMemo(()=>jv(s,V,O,T==null),[s,V,O,T]),G=B==="group"&&!!v&&v.length>0;$!=null&&!G&&Rt("bar-chart-bargap-without-group","[BarChart] barGap \uC740 seriesMode='group' + series \uC5D0\uC11C\uB9CC \uC4F0\uC778\uB2E4 \u2014 \uADF8 \uBC16\uC5D0\uC11C\uB294 \uC544\uBB34 \uC77C\uB3C4 \uD558\uC9C0 \uC54A\uB294\uB2E4.");const S=o.useMemo(()=>{if(!f)return W;const re=V.period==="month"?ma(V.monthRange):null,z=la(),ne=v?.length??0,H=U=>{const pe=[],Ee=[],ge=[];for(let me=0;me<ne;me++){let ie=0,be=0,he=0;for(const ue of U){const Me=kt(ue.a[me]),qe=kt(ue.b[me]);qe<=0||(ie+=Me,be+=qe,he+=Me/qe*100)}pe.push(h==="weighted"?be>0?Math.round(ie/be*100):0:U.length?Math.round(he/U.length):0),Ee.push(ie),ge.push(be)}return{pct:pe,ra:Ee,rb:ge}};return W.map((U,pe)=>{let Ee=U.a===-1?-1:U.b>0?Math.round(U.a/U.b*100):0;if(re&&!Mn(U)){const me=re.year,ie=re.month1-1,be=Wo(s,new Date(me,ie,Bn(me,ie)+pe*7),z).filter(he=>!he.isFuture);if(h==="weighted"){let he=0,ue=0;for(const{entry:Me}of be)Me&&Me.b>0&&(he+=Me.a,ue+=Me.b);Ee=ue>0?Math.round(he/ue*100):0}else Ee=be.length?Math.round(be.reduce((he,{entry:ue})=>he+(ue&&ue.b>0?ue.a/ue.b*100:0),0)/be.length):0}let ge=null;if(G&&!Mn(U)){let me;if(re){const be=re.year,he=re.month1-1;me=Wo(s,new Date(be,he,Bn(be,he)+pe*7),z).filter(ue=>!ue.isFuture).map(({entry:ue})=>({a:ue?.parts??[],b:ue?.partsB??[]}))}else me=[{a:U.parts??[],b:U.partsB??[]}];const ie=H(me);ge={parts:ie.pct,rawParts:ie.ra,rawPartsB:ie.rb}}return{...U,a:Ee,b:U.a===-1?0:d&&U.parts&&U.parts[1]>0?Math.round(U.parts[0]/U.parts[1]*100):0,rawA:U.a===-1?-1:U.a,rawB:U.b,...ge??{}}})},[W,f,h,d,V.period,V.monthRange,s,G,v?.length]),M=o.useMemo(()=>{if(f||g){const z=(V.period==="week"?W:s[V.monthRange]?.daily??[]).filter(H=>H.a!==-1);if(z.length===0)return 0;if(f&&h==="weighted"){let H=0,U=0;for(const pe of z)pe.b>0&&(H+=pe.a,U+=pe.b);return U>0?Math.round(H/U*100):0}const ne=f?z.reduce((H,U)=>H+(U.b>0?U.a/U.b*100:0),0):z.reduce((H,U)=>H+(U.a>0?U.a:0),0);return Math.round(ne/z.length)}const re=V.period==="month"?s[V.monthRange]?.daily??[]:S;return T!=null?re.reduce((z,ne)=>z+(Mn(ne,!1)?0:kt(ne.a)+(d?kt(ne.b):0)),0):re.reduce((z,ne)=>z+(ne.a>0?ne.a:0)+(d&&ne.b>0?ne.b:0),0)},[S,W,f,h,g,T,d,V.period,V.monthRange,s]),I=v&&v.length>0?v.map(re=>({color:re.color,label:re.label})):[{color:i,label:O(c)},...d?[{color:u,label:O(d)}]:[]],Z=t==="small",le=[Z?"manager-section--compact":t==="large"?"manager-section--full":void 0,J].filter(Boolean).join(" ")||void 0,oe=r?O(r):"",de=oe?O("trainingStatus.detailFor",{name:oe,defaultValue:"{{name}} \uC0C1\uC138\uBCF4\uAE30"}):O("trainingStatus.detail","\uC0C1\uC138\uBCF4\uAE30");return n.jsx(Fo,{className:le,inGrid:q,icon:D,disc:N,onClick:F,ariaLabel:R,tooltip:K,headSegment:E,headMenuItems:w?[{label:de,icon:"list",onClick:w,closeOnSelect:!0}]:void 0,title:O(r),titleLevel:l,titleClassName:Z?"h5 chart-section-title--small":void 0,headRight:Z?A??void 0:({collapsed:re})=>n.jsxs(n.Fragment,{children:[!x&&n.jsx(Eu,{control:V}),A,w&&!re&&n.jsx("span",{className:"manager-bar-chart-detail-btn",children:n.jsx(fe,{htmlType:"button",size:L,type:"dot",icon:"list",ariaLabel:de,showTooltipInfo:de,onClick:w})})]}),subRow:n.jsxs(n.Fragment,{children:[m?f||g||C&&k?n.jsx(Ya,{label:Z?void 0:`${O(V.period==="week"?"manager.chart.weeklyPrefix":"manager.chart.monthlyPrefix")} ${O(C??c)}`,children:k?(k(M).match(/([+-]?\d[\d.,]*|[^\d]+)/g)??[]).map((re,z)=>/\d/.test(re)?n.jsx("span",{className:"barchart-total__num h0",children:re},z):n.jsx("span",{className:"barchart-total__unit h5",children:re},z)):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"barchart-total__num h0",children:M}),p&&n.jsx("span",{className:"barchart-total__unit h5",children:O(p)})]})}):n.jsxs(Ya,{children:[n.jsx("span",{className:"barchart-total__num h0",children:M}),n.jsx("span",{className:"barchart-total__unit h5",children:O(c)}),p&&n.jsx("span",{className:"barchart-total__unit h5",children:O(p)})]}):n.jsx("span",{}),n.jsx(Io,{items:I,className:"caption-1"})]}),children:y?n.jsx("div",{className:"manager-bar-chart-wrap manager-bar-chart-loading","aria-busy":"true",children:n.jsx("div",{className:"manager-bar-chart-inner",children:n.jsxs("div",{className:"manager-bar-chart-area manager-bar-chart-area--loading",children:[n.jsx("div",{className:"manager-bar-chart-plot manager-bar-chart-plot--loading",style:{height:Q.height},children:n.jsx(Ga,{size:32})}),n.jsx("div",{className:"manager-bar-chart-x-axis","aria-hidden":"true",children:n.jsxs("span",{className:"manager-bar-chart-x-axis__label",children:[n.jsx("span",{className:"caption-1 manager-bar-chart-x-axis__main",children:"\xA0"}),S.some(re=>!!re.sublabel)&&n.jsx("span",{className:"caption-1",children:"\xA0"})]})})]})})}):n.jsx(Sv,{focusableBars:e,data:S,colorA:i,colorB:d?u:void 0,labelA:O(c),labelB:d?O(d):void 0,barWidth:a??Q.barWidth,barGap:$,baseline:T,height:Q.height,maxOverride:f?100:void 0,tightMax:_,seriesColors:v?.map(re=>re.color),seriesLabels:v?.map(re=>re.label),rateLabels:f?{total:O("trainingStatus.today.tooltipTotal","\uC804\uCCB4"),done:O("trainingStatus.today.tooltipDone","\uC644\uB8CC")}:void 0,grouped:G})})}const Du=120,Lv={left:38,right:16,top:26,bottom:24};function $v({points:e=[],range:t,ticks:a=[],axisTitle:r,color:l,height:s=156,fallbackWidth:i=320,insets:u,overlay:c,ariaLabel:d,className:m}){const[p,C]=o.useState(null),[b,x]=o.useState(null);o.useEffect(()=>{if(!b)return;const T=q=>C(Math.round(q)||null);if(T(b.getBoundingClientRect().width),typeof ResizeObserver>"u")return;const J=new ResizeObserver(([q])=>T(q.contentRect.width));return J.observe(b),()=>{J.disconnect()}},[b]);const{payload:f,anchorRect:h,openAfterDelay:_,close:g}=Sy(Du),k=o.useCallback((T,J)=>{T&&_(T,J.getBoundingClientRect())},[_]),v=p??i,B=s,{left:y,right:w,top:A,bottom:E}={...Lv,...u},[D,N]=t,F=T=>N===D?y:y+(v-y-w)*(T-D)/(N-D),R=T=>A+(B-A-E)*(100-T)/100,K={x:F,y:R,plot:{left:y,right:v-w,top:A,bottom:B-E,width:Math.max(0,v-y-w),height:Math.max(0,B-A-E)}},L=e.filter(T=>!T.hollow),$=l??"var(--color-main)";return n.jsxs(n.Fragment,{children:[n.jsxs("svg",{ref:x,className:we("line-chart",m),viewBox:`0 0 ${v} ${B}`,role:"img","aria-label":d??e.map(T=>T.description).filter(Boolean).join(", "),children:[r&&n.jsx("text",{className:"line-chart__axis-title",x:0,y:12,children:r}),[0,100].map(T=>n.jsxs("g",{children:[n.jsx("line",{className:"line-chart__grid",x1:y,x2:v-w,y1:R(T),y2:R(T)}),n.jsxs("text",{className:"line-chart__tick",x:y-6,y:R(T)+4,textAnchor:"end",children:[T,"%"]})]},T)),c?.(K),a.map(T=>n.jsx("text",{className:"line-chart__tick",x:F(T.x),y:B-5,textAnchor:"middle",children:T.label},T.x)),L.length>1&&n.jsx("polyline",{className:"line-chart__line",fill:"none",stroke:$,points:L.map(T=>`${F(T.x)},${R(T.pct)}`).join(" ")}),e.map(T=>n.jsxs("g",{className:"line-chart__dot",onPointerEnter:J=>k(T.description,J.currentTarget),onPointerLeave:g,children:[n.jsx("circle",{className:"line-chart__dot-hit",cx:F(T.x),cy:R(T.pct),r:12}),n.jsx("circle",{className:we("line-chart__dot-main",T.hollow&&"is-hollow"),cx:F(T.x),cy:R(T.pct),r:4,stroke:$,fill:T.hollow?void 0:$})]},T.x))]}),f!=null&&n.jsx(vn,{anchorRect:h,offset:10,closeOnOutsideClick:!1,className:"line-chart__tip",role:"tooltip",ariaLabel:f,children:f})]})}function Rv({icon:e,iconSize:t=56,title:a,titleClass:r="h2",description:l,tipGroups:s,start:i,className:u}){return n.jsxs("div",{className:we("game-intro",u),children:[e!=null&&n.jsx("span",{className:"game-intro__icon","aria-hidden":"true",style:{"--game-intro-icon":`${t}px`},children:e}),n.jsx("h2",{className:we("game-intro__title",r),children:a}),l!=null&&n.jsx("p",{className:"game-intro__description body-3",children:l}),s?.map((c,d)=>n.jsxs("div",{className:"game-intro__tips",children:[c.title!=null&&n.jsx("span",{className:"game-intro__tips-title body-3",children:c.title}),c.tips.map((m,p)=>n.jsxs("span",{className:"game-intro__tip body-3",children:[m.icon!=null&&n.jsx("span",{"aria-hidden":"true",children:m.icon}),n.jsx("span",{children:m.text})]},p))]},d)),i&&n.jsx(fe,{htmlType:"button",className:i.className,variant:"main",color:i.color,size:48,width:"100%",disabled:i.disabled,onClick:i.onClick,children:i.label})]})}const Su=(e,t,a)=>{const r=new Date(Date.UTC(e,t,a));return`${r.getUTCFullYear()}-${String(r.getUTCMonth()+1).padStart(2,"0")}-${String(r.getUTCDate()).padStart(2,"0")}`},ju=(e,t,a,r)=>({from:zl(e,t,a),to:new Date(zl(e,t,a+r).getTime()-1),fromYmd:Su(e,t,a),toYmd:Su(e,t,a+r-1)});function Pv(e,t=0){if(e.period==="month"){const l=ma(e.monthRange),s=la(),i=l?l.year:s.getFullYear(),u=(l?l.month1:s.getMonth()+1)-1+t,c=new Date(Date.UTC(i,u+1,0)).getUTCDate();return ju(i,u,1,c)}const a=e.weekRanges.find(l=>l.value===e.weekRange);if(!a){const l=new Date,s=La();return{from:l,to:l,fromYmd:s,toYmd:s}}const r=Bn(a.year,a.month-1);return ju(a.year,a.month-1,r+(a.week+t)*7,7)}const Ho={small:{diameter:96,strokeWidth:16},medium:{diameter:120,strokeWidth:18},large:{diameter:160,strokeWidth:22}};function Tu(e){return!Number.isFinite(e)||e<=0?0:e>=1?100:Math.min(99,Math.max(1,Math.round(e*100)))}function Mu({done:e,total:t,segments:a,color:r="var(--color-main)",size:l="medium",strokeWidth:s,label:i="%",hideCenter:u=!1,hideLabel:c=!1}){const d=typeof l=="number"?l:Ho[l].diameter,m=s??(typeof l=="number"?12:Ho[l].strokeWidth),p=d/2,C=(d-m)/2,b=2*Math.PI*C;if(a&&a.length>0){const _=a.reduce((g,k)=>{const v=g.length>0?g[g.length-1].acc:0,B=Number.isFinite(k.ratio)?k.ratio:0,y=Math.max(0,Math.min(B,1-v));return g.push({color:k.color,rotate:-90+v*360,dash:b*y,acc:v+y}),g},[]);return n.jsx("div",{className:"ring-chart",style:{width:d,height:d},children:n.jsxs("svg",{width:d,height:d,viewBox:`0 0 ${d} ${d}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:p,cy:p,r:C,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:m}),_.map((g,k)=>g.dash>0&&n.jsx("circle",{cx:p,cy:p,r:C,fill:"none",stroke:g.color,strokeWidth:m,strokeDasharray:`${g.dash} ${b}`,strokeLinecap:"round",transform:`rotate(${g.rotate} ${p} ${p})`},k))]})})}const x=(t??0)>0?Math.min((e??0)/t,1):0,f=b*x,h=b-f;return n.jsxs("div",{className:"ring-chart",style:{width:d,height:d},children:[n.jsxs("svg",{width:d,height:d,viewBox:`0 0 ${d} ${d}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:p,cy:p,r:C,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:m}),x>0&&n.jsx("circle",{cx:p,cy:p,r:C,fill:"none",stroke:r,strokeWidth:m,strokeDasharray:`${f} ${h}`,strokeLinecap:x<.02||x>.98?"butt":"round",transform:`rotate(-90 ${p} ${p})`})]}),!u&&n.jsxs("div",{className:`ring-chart__center${c?"":` ${d<=96?"ring-chart__center--small":l==="medium"?"ring-chart__center--medium":"ring-chart__center--large"}`}`,children:[n.jsx("span",{className:`ring-chart__pct ${d<=96?"h2":"h1"}`,children:Tu(x)}),!c&&n.jsx("span",{className:`ring-chart__label ${d<=96?"caption-2":"caption-1"}${d<=96||l==="medium"?" ring-chart__label--tight":""}`,children:i})]})]})}function Iv({titleKey:e,titleLevel:t,headRight:a,icon:r,showTotal:l,totalLabelKey:s,legend:i,loading:u,className:c,inGrid:d=!1,onClick:m,ariaLabel:p,tooltip:C,...b}){const{t:x}=_e.useTranslation();if(!e)return n.jsx(Mu,{...b});const f=(b.total??0)>0?Tu(Math.min((b.done??0)/b.total,1)):0,h=b.size==="small",_=typeof b.size=="number"?b.size:Ho[b.size??"medium"].diameter,g=b.size==="large",k=[c,h?"manager-section--compact":g?"manager-section--full":""].filter(Boolean).join(" ")||void 0,v=r&&n.jsx("span",{className:"chart-section-icon",children:n.jsx(tt,{icon:r,className:"chart-section-icon-inner"})});return n.jsx(Fo,{className:k,inGrid:d,onClick:m,ariaLabel:p,tooltip:C,title:x(e),titleLevel:t,titleClassName:h?"h5 chart-section-title--small":void 0,headRight:v||(h?void 0:a),subRow:(l||i)&&n.jsxs(n.Fragment,{children:[l?n.jsxs(Ya,{label:!h&&s?x(s):void 0,children:[n.jsx("span",{className:"barchart-total__num h0",children:f}),n.jsx("span",{className:"barchart-total__unit h5",children:"%"})]}):n.jsx("span",{}),i&&n.jsx(Io,{items:i})]}),children:u?n.jsx("div",{className:"ring-chart-section-body ring-chart-section-body--offset",children:n.jsx("div",{className:"ring-chart ring-chart--loading",style:{width:_,height:_},"aria-busy":"true",children:n.jsx(Ga,{size:32})})}):n.jsx("div",{className:"ring-chart-section-body ring-chart-section-body--offset",children:n.jsx(Mu,{...b,hideCenter:b.hideCenter??h})})})}function Fv({label:e,value:t,change:a,changeType:r,icon:l,tooltip:s,onClick:i,children:u}){const c=o.useRef(null),{anchorRect:d,openAt:m,close:p}=Pa(),C=o.useCallback(()=>{s&&c.current&&m(c.current)},[s,m]),b=r??(a===void 0?void 0:a>0?"up":a<0?"down":"neutral"),x=a===void 0?void 0:a>0?`+${a}`:`${a}`,f=o.useCallback(h=>{i&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),i())},[i]);return n.jsxs("div",{ref:c,className:`manager-stat-card${i?" manager-stat-card--clickable":""}`,onClick:i,onKeyDown:i?f:void 0,onPointerEnter:C,onPointerLeave:p,onFocus:C,onBlur:p,role:i?"button":void 0,tabIndex:i?0:void 0,"aria-label":i?[e,t,x].filter(h=>h!==void 0&&h!=="").join(" "):void 0,children:[s&&d&&n.jsx(Dn,{anchorRect:{left:d.left,top:d.top+21,right:d.right,bottom:d.bottom,width:d.width,height:d.height},text:s}),n.jsxs("div",{className:"manager-stat-card__label-row",children:[n.jsx("span",{className:"manager-stat-card__label h5",children:e}),l&&n.jsx("span",{className:"manager-stat-card__icon",children:n.jsx(tt,{icon:l,className:"manager-stat-card__icon-inner"})})]}),n.jsxs("div",{className:"manager-stat-card__content",children:[n.jsxs("div",{className:"manager-stat-card__left",children:[n.jsx("div",{className:"manager-stat-card__value h2",children:t}),x&&n.jsx("div",{className:`manager-stat-card__change manager-stat-card__change--${b??"neutral"} caption-1`,children:x})]}),u&&n.jsx("div",{className:"manager-stat-card__body",children:u})]})]})}function Lu({value:e,onChange:t,min:a=0,max:r=100,step:l=1,orientation:s="horizontal",size:i=24,disabled:u=!1,ariaLabel:c,length:d,className:m,label:p,formatValue:C,labelPos:b,labelAlign:x="right",showMinMax:f=!1,minLabel:h,maxLabel:_,showBgTick:g=!1,showFillTick:k=!1,tickStep:v,tickShape:B="dot"}){t&&!c&&Rt("Slider:unnamed","[ihab/Slider] \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 ariaLabel \uC744 \uC8FC\uC138\uC694. label prop \uC740 \uAC12 \uD45C\uAE30 \uBC29\uC2DD\uC774\uC9C0 \uC774\uB984\uC774 \uC544\uB2D9\uB2C8\uB2E4.");const y=Math.min(r,Math.max(a,e)),w=r>a?(y-a)/(r-a):0,A=s==="vertical",E=!t,D=W=>t?.(Number(W.target.value)),N=typeof d=="number"?`${d}px`:d,F={"--slider-ratio":String(w),"--slider-thumb":`${i}px`,...N?A?{height:N}:{width:N}:{}},R=v??l,K=(g||k)&&R>0&&r>a?Math.floor((r-a)/R+1e-6):0;if(K>0&&K<=100){const W=B!=="dash",G=le=>W?`radial-gradient(circle, ${le} 0.5px, transparent 1px)`:A?`linear-gradient(to bottom, transparent calc(50% - 2px), ${le} calc(50% - 2px), ${le} calc(50% + 2px), transparent calc(50% + 2px))`:`linear-gradient(to right, transparent calc(50% - 2px), ${le} calc(50% - 2px), ${le} calc(50% + 2px), transparent calc(50% + 2px))`,S=W?"2px":"4px",M=[],I=[],Z=[];for(let le=0;le<=K;le++){const oe=le*R/(r-a);if(oe>1+1e-6)break;const de=`${((A?1-oe:oe)*100).toFixed(4)}%`,re=oe<=w+1e-6;if(re?!k:!g)continue;const z=re?"var(--slider-tick-color-on-fill, var(--color-deepWhite))":"var(--slider-tick-color, var(--color-lightGray))";M.push(G(z)),I.push(A?`${S} var(--slider-thumb)`:`var(--slider-thumb) ${S}`),Z.push(A?`center ${de}`:`${de} center`)}M.push(A?"linear-gradient(to top, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))":"linear-gradient(to right, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))"),I.push("100% 100%"),Z.push("0 0"),F.backgroundImage=M.join(", "),F.backgroundSize=I.join(", "),F.backgroundPosition=Z.join(", "),F.backgroundRepeat="no-repeat"}const L=C?C(y):p==="percent"?`${Math.round(r>a?(y-a)/(r-a)*100:0)}%`:p==="count"?`${y} / ${r}`:y===a&&h?h:y===r&&_?_:void 0,$=n.jsx("input",{type:"range",className:we("slider",`slider--${s}`,E&&"slider--static",!p&&!f&&m),min:a,max:r,step:l,value:y,disabled:u,readOnly:E,tabIndex:E?-1:void 0,"aria-label":c,"aria-valuetext":L,"aria-orientation":s,onChange:D,style:F});if(!p&&!f)return $;const T=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:h??a}),J=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:_??r}),q=f?n.jsxs("div",{className:we("slider-track-group",`slider-track-group--${s}`,!p&&m),children:[A?J:T,$,A?T:J]}):$;if(!p)return q;const O=b??(A?"bottom":"right"),Q=`${Math.round(r>a?(y-a)/(r-a)*100:0)}%`,P=C?C(y):p==="percent"?Q:p==="count"?`${y} / ${r}`:String(y),V=n.jsx("span",{className:"slider-wrap__value body-3b",children:P});return n.jsxs("div",{className:we("slider-wrap",`slider-wrap--${s}`,`slider-wrap--label-${O}`,`slider-wrap--align-${x}`,m),children:[q,V]})}const Ov=.86,zv=250,Vo=(e,t,a,r)=>Math.round(Math.min(r,Math.max(a,e-t))),qo=(e,t,a,r)=>{const l=Vo(e,t,a,r);return`${l<0?"-":"+"}${Math.abs(l)} dB`};function Uo({analyser:e,audioElement:t,orientation:a="horizontal",length:r,label:l,labelPos:s,labelAlign:i="right",floorDb:u=-60,refDb:c=-35,displayMin:d=-5,displayMax:m=25,className:p,ariaLabel:C}){const b=o.useRef(null),x=o.useRef(null),f=o.useRef(null),h=o.useRef(null),[_,g]=o.useState(null);o.useEffect(()=>{const y=$=>{const T=qo($,c,d,m);f.current&&(f.current.textContent=T);const J=b.current;J&&(J.setAttribute("aria-valuenow",String(Vo($,c,d,m))),J.setAttribute("aria-valuetext",T))},w=e??PC(t)??(_&&_.el===t?_.node:null),A=x.current;if(!w||!A){A?.style.setProperty("--meter-level","0"),y(u);let $=!1;return!e&&t&&er(t).then(T=>{!$&&T&&g({el:t,node:T})}),()=>{$=!0}}to();const E=new Float32Array(w.fftSize);let D=0,N=0,F=0,R=0,K=null;const L=$=>{const T=IC(w,E);D=T>D?T:D*Ov;const J=D>1e-5?20*Math.log10(D):-1/0,q=Math.max(u,J),O=q-c,Q=Math.min(1,Math.max(0,(O-d)/(m-d)));if(A.style.setProperty("--meter-level",Q.toFixed(3)),N+=q,F+=1,$-R>=zv){const P=N/F;K=K==null?P:K*.6+P*.4,y(K),N=0,F=0,R=$}h.current=requestAnimationFrame(L)};return h.current=requestAnimationFrame(L),()=>{h.current!=null&&cancelAnimationFrame(h.current),h.current=null}},[e,t,_,u,c,d,m]);const k=typeof r=="number"?`${r}px`:r,v=n.jsx("div",{className:"audio-meter__track",style:k?a==="vertical"?{height:k}:{width:k}:{},children:n.jsx("div",{ref:x,className:"audio-meter__fill"})}),B=s??(a==="vertical"?"bottom":"right");return n.jsxs("div",{ref:b,className:we("audio-meter",`audio-meter--${a}`,l&&`audio-meter--label-${B}`,l&&`audio-meter--align-${i}`,p),role:"meter","aria-label":C,"aria-valuemin":d,"aria-valuemax":m,"aria-valuenow":Vo(u,c,d,m),"aria-valuetext":qo(u,c,d,m),children:[v,l&&n.jsx("span",{ref:f,className:"audio-meter__value caption-2",children:qo(u,c,d,m)})]})}const $u=260;function Ru({message:e,position:t,duration:a,onClose:r}){const[l,s]=o.useState(!1),[i,u]=o.useState(!1),c=o.useRef(i),d=o.useRef(l);o.useEffect(()=>{c.current=i},[i]),o.useEffect(()=>{d.current=l},[l]);const m=o.useRef(null),p=o.useRef(""),C=o.useRef(r);o.useEffect(()=>{C.current=r});const b=a,x=o.useRef(null),f=o.useRef(0),h=o.useRef(0),_=o.useRef(!1),g=o.useRef(null),k=o.useRef(null),v=o.useRef(null),B=o.useRef(null),y=o.useRef(()=>{});y.current=E=>{E<0||(f.current=Date.now(),h.current=E,x.current=setTimeout(()=>{x.current=null,s(!1),g.current=setTimeout(()=>{u(!1);try{C.current()}catch{}},$u)},E))};const w=o.useCallback(()=>{_.current||!x.current||(_.current=!0,clearTimeout(x.current),x.current=null,h.current=Math.max(0,h.current-(Date.now()-f.current)))},[]),A=o.useCallback(()=>{_.current&&(_.current=!1,y.current(h.current))},[]);return o.useEffect(()=>{if(e!==p.current&&(x.current&&(clearTimeout(x.current),x.current=null),g.current&&(clearTimeout(g.current),g.current=null)),e){if(d.current)return b>0&&!x.current&&(_.current?h.current=b:y.current(b)),p.current=e,()=>{x.current&&(clearTimeout(x.current),x.current=null),g.current&&(clearTimeout(g.current),g.current=null)};const E=()=>{const D=m.current;if(D)try{D.classList.remove("is-visible"),D.style.transition="none",t==="top"?D.style.transform="translateX(-50%) translateY(-16px)":D.style.transform="translateX(-50%) translateY(16px)",D.style.opacity="0",D.offsetWidth,D.style.transition="",D.classList.add("is-visible"),B.current&&clearTimeout(B.current),B.current=setTimeout(()=>{B.current=null;try{D.style.opacity="",D.style.transform="",D.style.transition=""}catch{}},60)}catch{}};c.current?(E(),s(!0)):(u(!0),k.current=requestAnimationFrame(()=>{v.current=requestAnimationFrame(()=>{E(),s(!0)})})),b>0&&(_.current=!1,y.current(b))}else s(!1),g.current=setTimeout(()=>u(!1),$u);return p.current=e,()=>{x.current&&clearTimeout(x.current),g.current&&clearTimeout(g.current),k.current&&cancelAnimationFrame(k.current),v.current&&cancelAnimationFrame(v.current),B.current&&clearTimeout(B.current),x.current=null,g.current=null,k.current=null,v.current=null,B.current=null}},[e,b,t]),{mounted:i,showing:l,popupRef:m,pause:w,resume:A}}function ha({message:e="",position:t="top",type:a="normal",onClose:r=()=>{},duration:l=2e3}){const{mounted:s,showing:i,popupRef:u,pause:c,resume:d}=Ru({message:e,position:t,duration:l,onClose:r}),m=o.useRef(null),[p,C]=o.useState(!1);if(o.useEffect(()=>{i?C(!0):s||C(!1)},[i,s]),!s)return null;const b=a==="notice"||a==="warning"?a:"normal",x=n.jsx("div",{ref:u,className:`toast toast--${t} ${i?"is-visible":""}`,role:"status","aria-live":"polite",onPointerEnter:f=>{m.current=f.pointerType},onMouseEnter:()=>{m.current!=="touch"&&c()},onMouseLeave:d,onFocusCapture:c,onBlurCapture:d,children:n.jsx("div",{className:`toast__inner toast__inner--${b} body-2`,"aria-hidden":p||i?void 0:!0,children:n.jsx("span",{className:"toast__text",children:e})})});return typeof document<"u"?cn.createPortal(x,document.body):x}const Wv=24;function Hv({value:e,max:t=100,size:a=8,color:r,trackColor:l,label:s,formatValue:i,labelPos:u,labelAlign:c="right",ariaLabel:d,className:m}){const p=Number.isFinite(t)&&t>0?t:1,C=Math.max(0,Math.min(Number.isFinite(e)?e:0,p)),b=C/p*100,x=Number.isFinite(t)&&t>0?t:0,f=u??(a>=Wv?"inside":"bottom"),h=f==="center"?"inside":f,_=h==="inside"&&(c==="left"?b>=15:c==="center"?b>=50:b>=85),g={};return r&&(g["--progress-bar-fill"]=r),l&&(g["--progress-bar-track"]=l),n.jsxs("div",{className:we("progress-bar",`progress-bar--${a}`,`progress-bar--label-${h}`,s&&`progress-bar--align-${c}`,s&&_&&"progress-bar--label-on-fill",m),style:g,children:[n.jsx("div",{className:"progress-bar__track",role:"progressbar","aria-valuenow":C,"aria-valuemin":0,"aria-valuemax":x,"aria-valuetext":s?i?i(C):s==="percent"?void 0:s==="raw"?String(C):`${C} / ${x}`:void 0,"aria-label":d,children:n.jsx("div",{className:"progress-bar__fill",style:{width:`${b}%`}})}),s&&n.jsx("span",{className:"progress-bar__label caption-1b",children:i?i(C):s==="percent"?`${Math.round(b)}%`:s==="raw"?String(C):`${C} / ${x}`})]})}const Pu={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},Vv="rgba(255, 255, 255, 0.16)";function Iu({max:e,index:t,inactiveBg:a,inactiveColor:r,transparent:l,variant:s="numbered",announce:i=!1,ariaLabel:u}){const{t:c}=_e.useTranslation(),d=Cn("(max-width: 767px)");if(!Number.isInteger(e)||e<=0)return null;const m=Number.isInteger(t)?Math.max(0,Math.min(t,e-1)):0,p=u??c("progress.steps",{current:m+1,total:e,defaultValue:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"}),C={};if(a&&(C["--pi-inactive-bg"]=a),r&&(C["--pi-inactive-color"]=r),l&&(a||(C["--pi-inactive-bg"]=Vv),r||(C["--pi-inactive-color"]="var(--color-white)")),s==="dot")return n.jsxs("div",{className:"progress-indicator progress-indicator--dot",style:C,role:i?"status":"img","aria-label":i?void 0:p,children:[i&&n.jsx("span",{style:Pu,children:p}),Array.from({length:e}).map((x,f)=>n.jsx("span",{"aria-hidden":"true",className:`progress-indicator-dot--dot${f<m?" done":f===m?" active":""}`},f))]});const b=i?n.jsx("span",{role:"status",style:Pu,children:p}):null;return d?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"progress-indicator progress-indicator--mobile",style:C,role:"list","aria-label":p,children:n.jsxs("span",{role:"listitem",className:"progress-indicator-dot active body-3",children:[m+1," / ",e]})}),b]}):n.jsxs(n.Fragment,{children:[b,n.jsx("div",{className:"progress-indicator",style:C,role:"list","aria-label":p,children:Array.from({length:e}).map((x,f)=>n.jsx("span",{role:"listitem","aria-current":f===m?"step":void 0,className:`progress-indicator-dot ${f<m?" done":f===m?" active":""} body-3`,children:f+1},f))})]})}function qv(e){if(!e)return[];const t=[];let a=0,r="";for(const l of e.trim()){if(l==="("?a++:l===")"&&a--,/\s/.test(l)&&a===0){r&&(t.push(r),r="");continue}r+=l}return r&&t.push(r),t}function Uv({children:e,className:t,style:a,rowLabel:r,onRowClick:l}){return n.jsx("div",{role:"cell",className:t?`table-cell ${t}`:"table-cell",style:a,children:r&&l?n.jsx("button",{type:"button",className:"table-cell__row-button","aria-label":r,children:e}):e})}function Go({variant:e="default",children:t,className:a,draggable:r,onClick:l,onMouseEnter:s,onMouseLeave:i,onDragStart:u,onDragEnd:c,expandedContent:d,colSpan:m,describedBy:p,rowHasButton:C}){const b=o.useCallback(x=>{l&&x.target===x.currentTarget&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),l())},[l]);return e==="loading"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--loading",children:n.jsx("div",{role:"cell","aria-colspan":m,className:"table-row__full-cell",children:n.jsx(Ga,{size:28})})})}):e==="empty"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--empty body-3",children:n.jsx("div",{role:"cell","aria-colspan":m,className:"table-row__full-cell",children:t})})}):n.jsxs("div",{role:"presentation",className:"table-row-wrap",children:[n.jsx("div",{className:a?`table-row ${a}`:"table-row",draggable:r,onClick:l,onKeyDown:l?b:void 0,onMouseEnter:s,onMouseLeave:i,onDragStart:u,onDragEnd:c,role:"row",tabIndex:l&&!C?0:void 0,"aria-describedby":l&&!C?p:void 0,children:t}),d&&n.jsx("div",{role:"row",className:"table-row-expand",children:n.jsx("div",{role:"cell","aria-colspan":m,className:"table-row-expand__cell",children:d})})]})}function Gv({dir:e}){return n.jsx(e==="asc"?Ys:Ks,{className:"table-field__sort-arrow",size:16,strokeWidth:2})}function Kv({children:e,onClick:t,className:a,sortDir:r,ariaSort:l,onResizeStart:s}){const i=n.jsxs(n.Fragment,{children:[e,r&&n.jsx(Gv,{dir:r})]});return n.jsxs("div",{onClick:t,role:"columnheader","aria-sort":l,className:we("table-field body-3",a,r?"table-field--sorted":"",s?"table-field--resizable":""),children:[t?n.jsx("button",{type:"button",className:"table-field__button",children:i}):i,s&&n.jsx("span",{className:"table-field__resizer",onPointerDown:s,onClick:u=>u.stopPropagation(),"aria-hidden":"true"})]})}function Fu(e){return e&&e!=="left"?`table-col--${e}`:void 0}function Ko({fields:e=[],sort:t,sortable:a=!0,headerGroups:r,items:l=[],renderRow:s,onRowClick:i,isRowClickable:u,onRowMouseEnter:c,onRowMouseLeave:d,onRowDragStart:m,onRowDragEnd:p,draggingId:C,gridTemplateColumns:b,mobileGridTemplateColumns:x,resizable:f=!0,resizeMode:h="grow",resizeStorageKey:_,size:g="small",title:k,icon:v,count:B,collapsed:y=!1,onToggleCollapse:w,headerActions:A,empty:E,loading:D,dragOver:N=!1,onDragOver:F,onDragLeave:R,onDrop:K,renderExpandedRow:L,expandedId:$}){const{t:T}=_e.useTranslation(),J=o.useId(),q=`table-title-${J}`,O=`table-row-hint-${J}`,[Q,P]=o.useState(null),V=o.useCallback((ae,ve)=>{const ze=e[ve];if(!ze)return;if(ze.sortValue)return ze.sortValue(ae);if(ze.sortKey)return ae[ze.sortKey];const Qe=s(ae)[ve]?.content;return typeof Qe=="string"||typeof Qe=="number"?Qe:void 0},[e,s]),W=!t&&a&&!e.some(ae=>ae.sortDir!==void 0||ae.onClick),G=o.useCallback(ae=>{const ve=e[ae];if(!ve||ve.sortable===!1)return!1;if(ve.sortValue||ve.sortKey)return!0;const ze=l[0];return ze!==void 0&&V(ze,ae)!==void 0},[e,l,V]),S=o.useMemo(()=>t?e.map(ae=>{if(!ae.sortKey||ae.sortDir!==void 0)return ae;const ve=t.field(String(ae.label??""),ae.sortKey);return{...ae,sortDir:ve.sortDir,onClick:ae.onClick??ve.onClick}}):W?e.map((ae,ve)=>G(ve)?{...ae,sortDir:Q?.index===ve?Q.asc?"asc":"desc":null,onClick:()=>P(ze=>ze?.index===ve?{index:ve,asc:!ze.asc}:{index:ve,asc:!0})}:ae):e,[e,t,W,Q,G]),M=o.useMemo(()=>{if(!W||!Q)return l;const{index:ae,asc:ve}=Q;return[...l].sort((ze,Qe)=>ur(V(ze,ae),V(Qe,ae),ve))},[l,W,Q,V]),I=Cn("(max-width: 767px)"),Z=x&&I?x:null,le=f&&!I,oe=o.useRef(le);oe.current=le;const de=48,re=40,z=o.useRef(()=>de),ne=_?`table-cols:${_}`:null,H=o.useRef(null),U=o.useRef(null),pe=o.useRef(null),Ee=o.useRef(null),[ge,me]=o.useState(!1),[ie,be]=o.useState(0),he=o.useCallback(()=>{const ae=pe.current;if(!ae)return;const ve=Ee.current,ze=H.current;if(ve&&ze){ve.style.minWidth="";const Qe=ze.scrollWidth,ht=oe.current?re:0;ve.style.minWidth=Qe>ae.clientWidth+1?`${Qe+ht}px`:""}me(ae.scrollWidth>ae.clientWidth+1),be(ae.clientWidth)},[]),ue=o.useCallback((ae,ve)=>{const ze=ae.current;ze&&U.current&&U.current.unobserve(ze),ae.current=ve,ve?(!U.current&&typeof ResizeObserver<"u"&&(U.current=new ResizeObserver(()=>he())),U.current?.observe(ve)):!pe.current&&!Ee.current&&(U.current?.disconnect(),U.current=null),he()},[he]),Me=o.useCallback(ae=>ue(pe,ae),[ue]),qe=o.useCallback(ae=>ue(Ee,ae),[ue]);o.useEffect(()=>{he()}),o.useEffect(()=>{if(typeof window>"u")return;const ae=typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>he()):null;return window.addEventListener("resize",he),()=>{ae!=null&&cancelAnimationFrame(ae),window.removeEventListener("resize",he)}},[he]);const je=o.useRef(()=>!1),Ve=o.useRef([]),Oe=o.useRef(null),dt=ae=>{if(!ae||typeof window>"u")return null;try{const ve=JSON.parse(window.localStorage.getItem(ae)??"null");return Array.isArray(ve)&&ve.length>0&&ve.every(ze=>typeof ze=="number"&&Number.isFinite(ze)&&ze>0)?ve:null}catch{return null}},[rt,nt]=o.useState(()=>dt(ne)),[pt,Ne]=o.useState(ne),[Ue,ke]=o.useState(()=>dt(ne)!==null);if(pt!==ne){Ne(ne);const ae=dt(ne);nt(ae),ke(ae!==null)}const He=o.useRef(rt);o.useEffect(()=>{He.current=rt},[rt]);const Be=o.useCallback(ae=>{const ve=Oe.current;if(!ve)return;const ze=He.current;if(ze){const Qe=[...ze],ht=()=>de;if(ve.next!=null&&ve.startWNext!=null){const it=ae.clientX-ve.startX,It=Math.max(ht()-ve.startW,Math.min(ve.startWNext-ht(),it));Qe[ve.index]=ve.startW+It,Qe[ve.next]=ve.startWNext-It}else Qe[ve.index]=Math.max(ht(),ve.startW+(ae.clientX-ve.startX));He.current=Qe,nt(Qe)}},[]),Se=o.useCallback(()=>{if(Oe.current=null,window.removeEventListener("pointermove",Be),window.removeEventListener("pointerup",Se),window.removeEventListener("pointercancel",Se),document.body.style.cursor="",document.body.style.userSelect="",ne&&He.current)try{window.localStorage.setItem(ne,JSON.stringify(He.current))}catch{}},[Be,ne]),Le=o.useCallback((ae,ve)=>{ve.preventDefault(),ve.stopPropagation();const ze=H.current;if(!ze)return;const Qe=Array.from(ze.children).map(it=>it.getBoundingClientRect().width),ht=h==="fit"?S.findIndex((it,It)=>It>ae&&it.resizable!==!1):-1;Oe.current=ht>=0?{index:ae,startX:ve.clientX,startW:Qe[ae],next:ht,startWNext:Qe[ht]}:{index:ae,startX:ve.clientX,startW:Qe[ae]},He.current=Qe,nt(Qe),ke(!0),window.addEventListener("pointermove",Be),window.addEventListener("pointerup",Se),window.addEventListener("pointercancel",Se),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[Be,Se,h,S]),Ze=o.useCallback(()=>{const ae=H.current,ve=ae?.closest(".table-wrap");if(!ae||!ve)return null;const ze=ve.style.getPropertyValue("--table-grid-cols");ve.style.setProperty("--table-grid-cols",S.map((Bt,ut)=>je.current(ut)?Ve.current[ut]:"max-content").join(" "));const Qe=Array.from(ve.querySelectorAll(".table-row")).filter(Bt=>!Bt.classList.contains("table-row--loading")&&!Bt.classList.contains("table-row--empty")),ht=S.map((Bt,ut)=>{let Ct=ae.children[ut]?.getBoundingClientRect().width??0;for(const Yt of Qe){const gn=Yt.children[ut];gn&&(Ct=Math.max(Ct,gn.getBoundingClientRect().width))}const Tt=je.current(ut)?parseFloat(Ve.current[ut]):NaN;return Number.isFinite(Tt)?Tt:Math.max(z.current(ut),Math.ceil(Ct))}),it=window.getComputedStyle(ae),It=ae.clientWidth-(parseFloat(it.paddingLeft)||0)-(parseFloat(it.paddingRight)||0);ze?ve.style.setProperty("--table-grid-cols",ze):ve.style.removeProperty("--table-grid-cols");let Gt=ht;const An=ht.reduce((Bt,ut,Ct)=>Bt+(je.current(Ct)?ut:0),0),Wt=ht.reduce((Bt,ut,Ct)=>Bt+(je.current(Ct)?0:ut),0),Kt=It-An;if(It>0&&Wt>0&&Kt>0){const Bt=Kt/Wt;Gt=ht.map((Ct,Tt)=>je.current(Tt)?Ct:Math.max(z.current(Tt),Math.round(Ct*Bt)));const ut=Math.round(Kt-Gt.reduce((Ct,Tt,Yt)=>Ct+(je.current(Yt)?0:Tt),0));if(ut!==0){let Ct=-1;Gt.forEach((Tt,Yt)=>{!je.current(Yt)&&(Ct<0||Tt>Gt[Ct])&&(Ct=Yt)}),Ct>=0&&(Gt[Ct]=Math.max(z.current(Ct),Gt[Ct]+ut))}}return Gt},[S,h]),xt=(ae,ve)=>ae!==null&&ae.length===ve.length&&ae.every((ze,Qe)=>ze===ve[Qe]),et=o.useRef(Ze);o.useEffect(()=>{et.current=Ze});const[Xe,At]=o.useState(0),gt=M.length>0,_t=`${ne??""}|${Xe}|${S.length}|${ie}`,Nt=!Ue&&le&&ne!==null&&!D?`${_t}|${gt?1:0}`:null,mt=o.useRef(null);o.useEffect(()=>{if(Nt===null||!gt||mt.current===_t)return;const ae=et.current();ae&&(mt.current=_t,nt(ve=>xt(ve,ae)?ve:ae))},[Nt]);const st=o.useCallback(()=>{if(ne)try{window.localStorage.removeItem(ne)}catch{}ke(!1);const ae=et.current();nt(ae),He.current=ae,At(ve=>ve+1)},[ne]);o.useEffect(()=>()=>{Oe.current&&(window.removeEventListener("pointermove",Be),window.removeEventListener("pointerup",Se),window.removeEventListener("pointercancel",Se),document.body.style.cursor="",document.body.style.userSelect="")},[Be,Se]);const Pe=S.length>0&&S.every(ae=>ae.width!=null)?S.map(ae=>typeof ae.width=="number"?`${ae.width}px`:String(ae.width)).join(" "):null;S.some(ae=>ae.width!=null)&&!Pe&&Rt(`table-field-width:${S.map(ae=>ae.width==null?"-":"w").join("")}`,"[ihabdevteam-core] Table \uC758 fields \uC911 \uC77C\uBD80\uC5D0\uB9CC width \uAC00 \uC788\uC2B5\uB2C8\uB2E4. **\uBAA8\uB4E0 \uC5F4\uC5D0 \uC801\uC5B4\uC57C** \uC4F0\uC785\uB2C8\uB2E4 \u2014 \uC9C0\uAE08\uC740 gridTemplateColumns \uB97C \uC501\uB2C8\uB2E4. \uD55C \uC5F4\uB9CC \uACE0\uC815\uD558\uACE0 \uC2F6\uC73C\uBA74 \uB098\uBA38\uC9C0\uC5D0 `minmax(0, 1fr)` \uCC98\uB7FC \uC801\uC5B4 \uC8FC\uC138\uC694."),Pe&&b&&Rt("table-field-width-conflict","[ihabdevteam-core] Table \uC5D0 fields[].width \uC640 gridTemplateColumns \uAC00 \uB458 \uB2E4 \uC788\uC2B5\uB2C8\uB2E4. gridTemplateColumns \uAC00 \uC774\uAE41\uB2C8\uB2E4 \u2014 \uD55C\uCABD\uB9CC \uB450\uC138\uC694.");const bt=b??Pe??void 0,wt=qv(bt),lt=wt.filter(ae=>/\b(auto|min-content|max-content)\b|fit-content\(/.test(ae));lt.length>0&&Rt(`table-content-track:${b}`,`[ihabdevteam-core] Table \uC758 gridTemplateColumns \uC5D0 \uB0B4\uC6A9\uC73C\uB85C \uD06C\uAE30\uAC00 \uC815\uD574\uC9C0\uB294 \uD2B8\uB799(${lt.join(", ")})\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uBA38\uB9AC\uC640 \uBAB8\uD1B5\uC740 \uC11C\uB85C \uB2E4\uB978 \uACA9\uC790\uB77C \uADF8 \uD2B8\uB799\uC774 \uAC01\uC790 \uB2E4\uB974\uAC8C \uD480\uB824 \uC5F4\uC774 \uC5B4\uAE0B\uB0A9\uB2C8\uB2E4. px \uC774\uB098 fr \uC744 \uC4F0\uC138\uC694. (\uBC1B\uC740 \uAC12: ${b})`);const jt=S.findIndex(ae=>!!ae.sortDir);S.filter(ae=>!!ae.sortDir).length>1&&Rt("table-multi-sort","[ihabdevteam-core] Table \uC758 fields \uC5D0 sortDir \uC774 \uB458 \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4. aria-sort \uB294 \uD45C \uD558\uB098\uC5D0 \uD55C \uCE78\uB9CC \uAC00\uC9C8 \uC218 \uC788\uC5B4 \uCCAB \uCE78\uB9CC \uBC29\uD5A5\uC73C\uB85C \uC54C\uB9AC\uACE0 \uB098\uBA38\uC9C0\uB294 none \uC73C\uB85C \uB461\uB2C8\uB2E4.");const Ge=ae=>ae===jt?S[ae].sortDir==="asc"?"ascending":"descending":S[ae].onClick?"none":void 0,yt=ae=>/^\d+(\.\d+)?px$/.test(wt[ae]??""),$t=ae=>{const ve=wt[ae]??"",ze=/^minmax\(\s*(\d+(?:\.\d+)?)px\s*,/.exec(ve)??/^(\d+(?:\.\d+)?)px$/.exec(ve);return ze?parseFloat(ze[1]):de};je.current=yt,z.current=$t,Ve.current=wt;const Re=ae=>h==="fit"&&!yt(ae)?"fr":"px",ot=rt&&rt.length===S.length&&!I,Et=Z??(ot?S.map((ae,ve)=>ae.resizable===!1&&wt[ve]?wt[ve]:`${rt[ve]}${Re(ve)}`).join(" "):bt),Je=Et?{"--table-grid-cols":Et}:void 0,Dt=k!==void 0;return n.jsxs("div",{ref:Me,className:`table-wrap table-wrap--${g}${le?" table-wrap--resizable":""}${N?" table-wrap--dragover":""}${y?" table-wrap--collapsed":""}`,style:Je,onDragOver:F,onDragLeave:R,onDrop:K,tabIndex:ge?0:void 0,role:ge?"region":void 0,"aria-label":ge?typeof k=="string"?k:T("table.scrollRegion","\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C"):void 0,children:[!!i&&n.jsx("span",{id:O,className:"table-row-hint",children:T("table.rowActionHint","\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4")}),n.jsxs("div",{ref:qe,role:"table","aria-labelledby":Dt&&typeof k=="string"?q:void 0,className:"table body-2",children:[Dt&&n.jsxs("div",{className:we("table-header",w&&"table-header--clickable"),onClick:w,role:"caption",children:[w&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:y?"chevron-right":"chevron-down",ariaLabel:y?T("common.expand","\uD3BC\uCE58\uAE30"):T("common.collapse","\uC811\uAE30"),ariaExpanded:!y,className:"table-header__chevron"}),v&&n.jsx(tt,{icon:v,label:typeof k=="string"?k:void 0,className:"table-header__icon"}),n.jsx("span",{id:q,className:"table-header__title h5b",children:k}),B!==void 0&&n.jsx("span",{className:"table-header__count body-3b",children:B}),A&&n.jsx("span",{className:"table-header__actions",onClick:ae=>ae.stopPropagation(),children:A})]}),!y&&n.jsxs(n.Fragment,{children:[r&&r.length>0&&n.jsx("div",{role:"row",className:"table-fields table-fields--groups",children:r.map((ae,ve)=>n.jsx("div",{role:"columnheader","aria-colspan":ae.span,className:we("table-field body-3",ae.className),style:{gridColumn:`span ${ae.span}`},children:ae.label},ve))}),n.jsxs("div",{role:"presentation",className:we("table-fields-strip",le&&"table-fields-strip--resizable"),children:[n.jsx("div",{role:"row",className:"table-fields",ref:H,children:S.map((ae,ve)=>n.jsx(Kv,{onClick:ae.onClick,className:we(ae.className,Fu(ae.align)),sortDir:ae.sortDir,ariaSort:Ge(ve),onResizeStart:le&&ve<S.length-1&&ae.resizable!==!1&&(h!=="fit"||S.some((ze,Qe)=>Qe>ve&&ze.resizable!==!1))?ze=>Le(ve,ze):void 0,children:ae.label},ve))}),le&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"chevrons-left-right-ellipsis",ariaLabel:T("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),showTooltipInfo:T("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),className:"table-fields__reset",onClick:st})]}),n.jsx("div",{role:"rowgroup",className:"table-body",children:D?n.jsx(Go,{variant:"loading",colSpan:S.length||void 0}):M.length===0&&E?n.jsx(Go,{variant:"empty",colSpan:S.length||void 0,children:E}):M.map((ae,ve)=>{const ze=C!=null&&ae.id===C,Qe=!!i&&(u?u(ae):!0),ht=$!=null&&ae.id!=null&&($ instanceof Set?$.has(ae.id)||[...$].some(it=>String(it)===String(ae.id)):String(ae.id)===String($));return n.jsx(Go,{className:`${Qe?" table-row--clickable":""}${m?" table-row--draggable":""}${ze?" table-row--dragging":""}`.trim(),draggable:!!m,onClick:Qe?()=>i(ae):void 0,colSpan:S.length||void 0,rowHasButton:s(ae).some(it=>!!it.rowLabel),describedBy:O,onMouseEnter:c?it=>c(ae,it):void 0,onMouseLeave:d?it=>d(ae,it):void 0,onDragStart:m?it=>m(ae,it):void 0,onDragEnd:p?it=>p(ae,it):void 0,expandedContent:ht&&L?L(ae):void 0,children:s(ae).map((it,It)=>n.jsx(Uv,{className:we(it.className,Fu(S[It]?.align)),style:it.style,rowLabel:Qe?it.rowLabel:void 0,onRowClick:Qe?()=>i(ae):void 0,children:it.content},It))},ae.id!=null?`${typeof ae.id}:${ae.id}`:`__idx:${ve}`)})})]})]})]})}const Yv={hearingAid:"hearingAid",cochlearImplant:"cochlearImplant",other:"other",\uBCF4\uCCAD\uAE30:"hearingAid",\uC778\uACF5\uC640\uC6B0:"cochlearImplant",\uAE30\uD0C0:"other"};function Ou(e){return e?Yv[e]??null:null}function zu(e){switch(Ou(e)){case"hearingAid":return"main";case"cochlearImplant":return"sub";default:return"default"}}function Wu(e,t){const a=Ou(e);return a?t(`device.type.${a}`,{defaultValue:e??""}):e??""}const Ca=e=>e==null?"":String(e).trim();function Yo(e,t,a,r){const l=Ca(e),s=Ca(t),i=Ca(a);if(r&&l&&s&&i){const c=`${l.padStart(4,"0")}-${s.padStart(2,"0")}-${i.padStart(2,"0")}`,d=new Date(c);if(!Number.isNaN(d.getTime())&&d.toISOString().slice(0,10)===c){const m=Fl(c,r);if(m)return m}}const u=[l,s,i];for(;u.length>0&&u[u.length-1]==="";)u.pop();return u.join(".")}function Zv(e,t,a){const r=Ca(e);return r?`${r}-${Ca(t).padStart(2,"0")}-${Ca(a).padStart(2,"0")}`:""}function Hu(e,t){return t!=="wornAt"?String(e[t]??""):Zv(e.wornYear,e.wornMonth,e.wornDay)}function Xv({rows:e,loading:t,onSelect:a,onDelete:r,onWear:l,onRelease:s,onAdd:i}){const{t:u,i18n:c}=_e.useTranslation(),d=h=>h==="left"?u("device.direction.left","\uC88C"):u("device.direction.right","\uC6B0"),{sort:m,field:p}=xy(),C=o.useMemo(()=>{if(!m)return e;const{key:h,asc:_}=m;return[...e].sort((g,k)=>{if(h==="worn"){const v=Number(k.worn)-Number(g.worn);return _?v:-v}return ur(Hu(g,h),Hu(k,h),_)})},[e,m]),{pageRows:b,pageSizeProps:x,paginationProps:f}=vy(C,m);return n.jsxs("div",{className:"dlp-side-table",children:[n.jsx(Po,{count:{value:e.length,unit:u("customers.device.unit","\uAC1C")},pageSize:x,pagination:f,actions:i&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",variant:"main",icon:"plus",label:u("customers.device.addButton","\uAE30\uAE30 \uCD94\uAC00"),onClick:i})}),n.jsx(Ko,{loading:t,resizable:!0,resizeMode:"fit",resizeStorageKey:"customer-device-history-v2",fields:[{...p(u("customers.device.wearingNow","\uCC29\uC6A9"),"worn"),resizable:!1},p(u("device.direction.label","\uBC29\uD5A5"),"side"),p(u("device.deviceType","\uC885\uB958"),"device"),p(u("device.brand","\uBE0C\uB79C\uB4DC"),"brand"),p(u("device.fitType","\uCC29\uC6A9\uD615\uD0DC"),"fitType"),p(u("device.productName","\uC81C\uD488\uBA85"),"productName"),p(u("device.wornDate","\uCC29\uC6A9\uC77C"),"wornAt"),...r?[{label:"",resizable:!1}]:[]],items:b.map((h,_)=>({id:h.id??`${h.side}-${_}`,row:h})),gridTemplateColumns:`56px 110px 110px minmax(120px, 1fr) 100px minmax(120px, 1fr) 110px${r?" 80px":""}`,renderRow:({row:h})=>[{content:n.jsx("span",{className:"dlp-worn-check",onClick:_=>_.stopPropagation(),children:n.jsx(xu,{checked:h.worn,disabled:h.worn?!s:!l,ariaLabel:h.worn?u("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"):u("customers.device.wear","\uCC29\uC6A9"),onChange:_=>{_?l?.(h):s?.(h)}})})},{content:n.jsx("span",{children:d(h.side)})},{content:h.device?n.jsx(Lt,{size:"small",variant:zu(h.device),fill:"soft",label:Wu(h.device,u)}):n.jsx("span",{})},{content:n.jsx("span",{children:h.brand})},{content:n.jsx("span",{children:h.fitType||"-"})},{content:n.jsx("span",{children:h.productName||"-"})},{content:n.jsx("span",{className:"dlp-date",children:Yo(h.wornYear,h.wornMonth,h.wornDay,c.language)||"-"})},...r?[{content:n.jsx("span",{className:"dlp-row-actions",children:n.jsx(fe,{htmlType:"button",size:28,type:"bar",variant:"transparent-gray",label:u("common.delete","\uC0AD\uC81C"),onClick:_=>{_?.stopPropagation(),r(h)}})})}]:[]],onRowClick:({row:h})=>a(h),empty:u("customers.device.historyEmpty","\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})]})}function Vu(e,t){return e?{role:t?.role??"button",tabIndex:0,...t?.selected===void 0?{}:{"aria-selected":t.selected},onKeyDown:a=>{a.target===a.currentTarget&&(a.key!=="Enter"&&a.key!==" "||(a.preventDefault(),e(a)))}}:{}}function Jv(e,t){return new Date(e,t+1,0).getDate()}function Qv(e,t){return new Date(e,t,1).getDay()}function e4({visits:e=[],onVisitClick:t,onVisitMove:a,onDayClick:r,today:l}){const{t:s,i18n:i}=_e.useTranslation(),u=o.useMemo(()=>s("calendar.dow",{returnObjects:!0}),[s]),c=lo(l),[d,m]=o.useState(()=>Number(c.slice(0,4))),[p,C]=o.useState(()=>Number(c.slice(5,7))-1),[b,x]=o.useState(null),f=o.useRef(null),h=o.useMemo(()=>{const y={};return e.forEach(w=>{y[w.date]||(y[w.date]=[]),y[w.date].push(w)}),y},[e]),_=o.useMemo(()=>{const y=Jv(d,p),w=Qv(d,p),A=[];for(let E=0;E<w;E++)A.push(null);for(let E=1;E<=y;E++)A.push(E);for(;A.length<35;)A.push(null);return A},[d,p]),g=o.useCallback(()=>{p===0?(m(y=>y-1),C(11)):C(y=>y-1)},[p]),k=o.useCallback(()=>{p===11?(m(y=>y+1),C(0)):C(y=>y+1)},[p]),v=y=>`${d}-${String(p+1).padStart(2,"0")}-${String(y).padStart(2,"0")}`,B=y=>v(y)===c;return n.jsxs("div",{children:[n.jsxs("div",{className:"calendar-nav",children:[n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:g,"aria-label":s("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(tt,{icon:"chevron-left",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsx("span",{className:"calendar-nav__title h5","aria-live":"polite",children:so(s,i.language,d,p+1)}),n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:k,"aria-label":s("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(tt,{icon:"chevron-right",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsxs("div",{className:"calendar-nav__legend",children:[n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--main"}),n.jsx("span",{className:"caption-1",children:s("calendar.legend.visited","\uBC29\uBB38")}),n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--sub"}),n.jsx("span",{className:"caption-1",children:s("calendar.legend.scheduled","\uC608\uC57D")}),n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--disabled"}),n.jsx("span",{className:"caption-1",children:s("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]})]}),n.jsxs("div",{className:"calendar-grid",children:[u.map(y=>n.jsx("div",{className:"calendar-day-header body-3",children:y},y)),_.map((y,w)=>{if(y===null)return n.jsx("div",{className:"calendar-cell empty"},`empty-${w}`);const A=y,E=v(A),D=h[E]??[],N=Fl(E,i.language),F=b===E;return n.jsxs("div",{className:`calendar-cell${B(A)?" today":""}${F?" drag-over":""}${r?" calendar-cell--clickable":""}`,role:r?"button":void 0,tabIndex:r?0:void 0,"aria-label":r?s("calendar.addOnDate",{date:E}):void 0,"aria-current":B(A)?"date":void 0,onClick:r?()=>r(E):void 0,onKeyDown:r?R=>{R.target===R.currentTarget&&(R.key!=="Enter"&&R.key!==" "||(R.preventDefault(),r(E)))}:void 0,onDragOver:a?R=>{R.preventDefault(),x(E)}:void 0,onDragLeave:a?R=>{R.currentTarget.contains(R.relatedTarget)||x(null)}:void 0,onDrop:a?R=>{R.preventDefault(),f.current!=null&&(a(f.current,E),f.current=null),x(null)}:void 0,children:[n.jsx("div",{className:"calendar-cell__number body-3",children:A}),D.length>0&&(()=>{const R=[{key:"visited",label:s("calendar.legend.visited","\uBC29\uBB38"),count:D.filter(L=>(L.status??"visited")==="visited").length},{key:"scheduled",label:s("calendar.legend.scheduled","\uC608\uC57D"),count:D.filter(L=>L.status==="scheduled").length},{key:"noVisit",label:s("calendar.legend.noVisit","\uBBF8\uBC29\uBB38"),count:D.filter(L=>L.status==="noVisit").length}].filter(L=>L.count>0),K=R.length===1&&R[0].key==="visited"?s("calendar.visitCount",{count:D.length,defaultValue:"\uBC29\uBB38 {{count}}\uAC74"}):R.map(L=>s("calendar.statusCount",{label:L.label,count:L.count,defaultValue:"{{label}} {{count}}\uAC74"})).join(" \xB7 ");return n.jsxs("span",{className:"calendar-cell__visit-count caption-1","aria-label":`${N} ${K}`,children:[R.map(L=>n.jsx("span",{className:`calendar-cell__visit-dot calendar-cell__visit-dot--${L.key}`,"aria-hidden":"true"},L.key)),D.length]})})(),n.jsx("div",{className:"calendar-cell__badges",children:D.map((R,K)=>n.jsxs("div",{draggable:!!a,className:`calendar-visit-badge${R.status==="noVisit"?" calendar-visit-badge--no-visit":R.status==="scheduled"?" calendar-visit-badge--scheduled":""}${t?" calendar-visit-badge--clickable":""}${a?" calendar-visit-badge--draggable":""}`,onDragStart:a?L=>{f.current=R.id,L.dataTransfer.effectAllowed="move"}:void 0,onDragEnd:a?()=>{f.current=null,x(null)}:void 0,onClick:t?L=>{L.stopPropagation(),t(R)}:void 0,...Vu(t?()=>t(R):void 0),"aria-label":[N,R.time?Vl(R.time,s):null,R.customer,s(R.status==="noVisit"?"calendar.legend.noVisit":R.status==="scheduled"?"calendar.legend.scheduled":"calendar.legend.visited")].filter(Boolean).join(" "),children:[R.time&&n.jsx("span",{className:"calendar-visit-badge__time body-3",children:Vl(R.time,s)}),n.jsx("span",{className:"calendar-visit-badge__name body-3",children:R.customer}),R.status==="noVisit"&&n.jsx("span",{className:"calendar-visit-badge__no-visit caption-1",children:s("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]},R.id??K))})]},A)})]})]})}const t4={page:"h3",pagePopup:"h4",popup:"h5"};function fa({type:e="page",title:t,headingLevel:a=2,icon:r,action:l,disc:s,children:i,inGrid:u=!1,className:c,style:d}){const m=t4[e],p=t||s||l||r,C=a?`h${a}`:"div";return n.jsxs("div",{className:we("section",`section--${e}`,u&&"section--in-grid",c),style:d,children:[p&&n.jsxs("div",{className:"section__header",children:[n.jsxs("div",{className:"section__title-row",children:[r&&n.jsx(tt,{icon:r,label:typeof t=="string"?t:void 0,className:"section__icon"}),n.jsxs("div",{className:"section__title-group",children:[t&&n.jsx(C,{className:`section__title ${m}`,children:t}),s&&n.jsx("div",{className:"section__disc body-3",children:s})]})]}),l&&n.jsx("div",{className:"section__action",children:l})]}),i]})}let Zo=null,qu=!1;function Uu(){if(qu||typeof document>"u")return;qu=!0,document.addEventListener("keydown",t=>{t.metaKey||t.ctrlKey||t.altKey||(Zo="keyboard")},!0);const e=()=>{Zo="pointer"};document.addEventListener("pointerdown",e,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,{capture:!0,passive:!0})}Uu();function gr(){return Uu(),Zo==="keyboard"}const br=20;function n4(e){const{t}=_e.useTranslation(),{type:a,trainingDatas:r,depth:l,renderPopup:s,completedIds:i,selectedIds:u,onItemComplete:c,size:d,useDescriptionTooltip:m,onRemove:p,onMore:C,sectionType:b="page"}=e||{},[,x]=o.useState(0),f=typeof r<"u"?Array.isArray(r)?r:[]:[],h=f.length,[_,g]=o.useState(Math.min(h,br)),k=o.useMemo(()=>Array.isArray(l)?[...l,a?.label].filter(Boolean).join(" \xB7 "):[l||"",a?.label].filter(Boolean).join(" \xB7 "),[l,a?.label]);o.useEffect(()=>{g(Math.min(h,br))},[h]),Li("speechear.data.updated",()=>x(w=>w+1));const v=o.useRef(null),B=o.useRef(null);function y(){const w=document.activeElement;B.current=gr()&&w&&w.closest?.(".training-block__more")?_:null,g(A=>Math.min(h,A+br))}return o.useEffect(()=>{const w=B.current;if(w==null)return;B.current=null;const A=document.activeElement;A&&A!==document.body||v.current?.querySelectorAll(".training-block-button")[w]?.focus()},[_]),n.jsxs(fa,{type:b,title:a?.label,icon:a?.icon,disc:a?.desc,className:"training-block",children:[n.jsx("div",{className:"training-list",ref:v,children:(f||[]).slice(0,_).map((w,A)=>{const E=w;return n.jsx(Lo,{index:A,type:a,trainingData:E,depth:k,renderPopup:s,completedIds:i,selectedIds:u,size:d,useDescriptionTooltip:m,onRemove:typeof p=="function"&&u!=null&&E?.id!=null&&u.has(String(E.id))?()=>p(E):void 0,onComplete:typeof c=="function"&&E?.id!=null?()=>c(String(E.id)):void 0,onMore:typeof C=="function"?D=>C(E,D):void 0},E?.id!=null?`${a?.key||"t"}-${String(E.id)}`:`${a?.key||"t"}-${A}`)})}),h>br&&_<h&&n.jsx("div",{className:"training-block__more",children:n.jsx(fe,{htmlType:"button",size:48,type:"bar",icon:"plus",onClick:y,ariaLabel:t("common.loadMore","\uB354\uBCF4\uAE30"),label:t("common.loadMore","\uB354\uBCF4\uAE30"),variant:"main"})})]})}function a4(e){let t=0;const a=r=>{Array.isArray(r)?r.forEach(a):r!=null&&r!==!1&&r!==!0&&r!==""&&t++};return a(e),t}function r4({gap:e=10,count:t,className:a,children:r}){const l=o.useRef(null),[s,i]=o.useState({width:0,card:0}),u=t??a4(r);o.useLayoutEffect(()=>{const C=l.current;if(!C)return;const b=()=>{const f=C.style.maxWidth;C.style.maxWidth="none";const h=C.clientWidth;C.style.maxWidth=f;const _=C.firstElementChild?.offsetWidth??0;i(g=>g.width===h&&g.card===_?g:{width:h,card:_})};if(b(),typeof ResizeObserver>"u")return;const x=new ResizeObserver(b);return x.observe(C),()=>x.disconnect()},[u,e]);const c=s.card>0?s.card:0,d=c>0?cf(s.width,c,e):0,m=d>0?df(u,d):0,p={"--block-grid-gap":`${e}px`,...m>0?{"--block-grid-cols":m,"--block-grid-card":`${c}px`}:{}};return n.jsx("div",{ref:l,className:we("training-block-grid",m>0&&"training-block-grid--measured",a),style:p,"data-cols":m>0?m:void 0,children:r})}function Xo(e){const t=o.useRef(null),a=o.useRef(e);a.current=e;const[r,l]=o.useState({url:e,loading:!!e,failed:!1}),s=r.url===e?r:{loading:!!e,failed:!1};o.useEffect(()=>{const c=t.current;l({url:e,failed:!1,loading:!!e&&!(c?.complete&&c.naturalWidth>0)})},[e]);const i=o.useCallback(()=>{a.current===e&&l({url:e,loading:!1,failed:!1})},[e]),u=o.useCallback(()=>{a.current===e&&l({url:e,loading:!1,failed:!0})},[e]);return{imgRef:t,loading:s.loading,failed:s.failed,hasImage:!!e&&!s.failed,onLoad:i,onError:u}}var o4='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_SpeechEar_mono" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><g id="symbol"><g opacity=".3"><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23fff"/></g><path d="M140,30h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84-3.88-7.1-6.08-15.25-6.08-23.92v-80c0-16.57,13.43-30,30-30h80c8.66,0,16.81,2.21,23.92,6.08-8.48-15.54-24.97-26.08-43.92-26.08Z" fill="%23fff"/><path d="M183.92,56.08c3.88,7.1,6.08,15.25,6.08,23.92v80c0,16.57-13.43,30-30,30h-80c-8.66,0-16.81-2.21-23.92-6.08,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%23fff"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>';const s4=o4,Jo=o.forwardRef(function({item:e,disabled:t=!1,onPlayDone:a,selectable:r=!1,selected:l=!1,onSelect:s,flipDelay:i=0,hideLabel:u=!1,hideAudio:c=!1,orderRank:d=null},m){const{t:p}=_e.useTranslation(),C=e.word||e.title||"",b=t||!C,x=e.audio??e.sound??e.audioKey,f=e.subLabel||e.pronunciation||"",h=e.colloquialLabel||"",[_,g]=o.useState({label:C,subLabel:f,colloquialLabel:h,homonum:e.homonum});C&&(_.label!==C||_.subLabel!==f||_.colloquialLabel!==h||!Object.is(_.homonum,e.homonum))&&g({label:C,subLabel:f,colloquialLabel:h,homonum:e.homonum});const k=o.useRef(null),v=Cn("(max-width: 767px)"),[B,y]=o.useState(!1),w=`${typeof x=="string"?x:x?.src??""}\0${C}`,[A,E]=o.useState({for:"",url:""}),D=A.for===w?A.url:"",N=Rl(),F=e.textOnly??(!e.image&&!!_.label&&!!N&&N.entries.length>0&&!N.byWord.has(_.label)),R=F?"":sa()?.(_.label,_.homonum)??e.image??"",{imgRef:K,loading:L,hasImage:$,onLoad:T,onError:J}=Xo(R);o.useEffect(()=>{let M=!1;return(async()=>{if(x){if(typeof x=="string"){if(x.startsWith("http")||x.includes("/")){E({for:w,url:x});return}}else if(typeof x=="object"&&!Array.isArray(x)){const Z=x.src;if(Z){E({for:w,url:Z});return}}}const I=Na();if(I&&C)try{const Z=await Promise.resolve(I(C));!M&&Z&&E({for:w,url:Z})}catch{}})(),()=>{M=!0}},[x,C,w]);const q=o.useRef(!0),O=o.useRef(null);o.useEffect(()=>(q.current=!0,()=>{q.current=!1,O.current&&mr(O.current),O.current=null;try{k.current?.pause()}catch{}k.current=null}),[]);const Q=o.useCallback(()=>new Promise(M=>{if(typeof window<"u"&&window.speechSynthesis&&C){y(!0),window.speechSynthesis.cancel();const I=new SpeechSynthesisUtterance(C);I.lang="ko-KR",I.onend=()=>{y(!1);try{a?.()}catch{}M()},I.onerror=()=>{y(!1),M()},window.speechSynthesis.speak(I)}else M()}),[C,a]),P=o.useCallback(M=>{const I=hr(M,Z=>{if(y(!1),Z)try{a?.()}catch{}});return k.current=I.el,I.done},[a]),V=o.useCallback(async()=>{if(t||!q.current)return;const M=()=>{O.current===M&&(O.current=null);try{k.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}y(!1)},I=pr(M);O.current=M;try{window.speechSynthesis?.cancel()}catch{}try{if(D&&(y(!0),await P(D)))return;const Z=Jr();if(Z&&C)try{const le=await Promise.resolve(Z(C));if(!q.current||O.current!==M||le&&(y(!0),await P(le)))return}catch{}if(!q.current||O.current!==M)return;await Q()}finally{I(),O.current===M&&(O.current=null)}},[t,D,C,P,Q]);o.useImperativeHandle(m,()=>({play:()=>V()}),[V]);const W=M=>M.stopPropagation(),G=o.useCallback(M=>{if(M.stopPropagation(),!t){if(B){try{k.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}y(!1);return}V()}},[t,B,V]),S=we("training-word-card",t?"training-word-card--disabled":"",b?"training-word-card--flipped":"",r?"training-word-card--selectable":"",l?"training-word-card--selected":"");return n.jsx("div",{className:S,onClick:r&&!t?s:void 0,role:r?"button":void 0,"aria-pressed":r?l:void 0,tabIndex:r&&!t?0:void 0,"aria-disabled":r&&t?!0:void 0,onKeyDown:r&&!t?M=>{M.target===M.currentTarget&&(M.key==="Enter"||M.key===" "||M.key==="Spacebar")&&(M.preventDefault(),s?.())}:void 0,children:n.jsxs("div",{className:"training-word-card__flipper",style:{transitionDelay:b?"0ms":`${i}ms`},children:[n.jsxs("div",{className:"training-word-card__front",children:[l&&n.jsx("div",{className:"training-word-card__selected-badge",onClick:W,children:n.jsx(Lt,{type:"dot",size:40,position:"inline",animate:!0,icon:d!=null?void 0:"check",number:d??void 0,"aria-label":d!=null?p("training.nthSelected",{n:d}):p("training.selected","\uC120\uD0DD\uB428")})}),n.jsx("div",{className:"training-word-card__image-wrap",children:F?n.jsx("div",{className:"training-word-card__text-face",children:_.label}):$?n.jsxs(n.Fragment,{children:[L&&n.jsx("div",{className:"training-word-card__spinner"}),n.jsx("img",{ref:K,className:"training-word-card__image",src:R,alt:_.label||p("common.image","\uC774\uBBF8\uC9C0"),style:{opacity:L?0:1},onLoad:T,onError:J})]}):n.jsx("div",{className:"training-word-card__placeholder"})}),!u&&n.jsxs("div",{className:"training-word-card__body",children:[!F&&n.jsx("div",{className:"training-word-card__word",children:_.label}),_.subLabel&&n.jsxs("div",{className:"training-word-card__pronunciation",children:["[",_.subLabel,"]"]}),_.colloquialLabel&&n.jsxs("div",{className:"training-word-card__colloquial caption-1",children:["[",_.colloquialLabel,"]"]})]}),!c&&n.jsx("div",{className:"training-word-card__bottom",onClick:r?W:void 0,children:n.jsx(fe,{htmlType:"button",size:v?40:48,type:v?"dot":"bar",icon:B?"pause":"play",label:v?void 0:p("training.playSound","\uC18C\uB9AC \uB4E3\uAE30"),selected:B,onClick:G,disabled:t,ariaLabel:p("training.playSound","\uC18C\uB9AC \uB4E3\uAE30")})})]}),n.jsx("div",{className:"training-word-card__back","aria-hidden":"true",children:n.jsx("span",{className:"training-word-card__disabled-symbol",style:{"--disabled-symbol-src":`url("${s4}")`}})})]})})}),l4=260;function Wn(e){const{t}=_e.useTranslation(),{title:a,subtitle:r,headerActions:l,headerSegment:s,children:i,buttons:u,footer:c,footerStart:d,footerEnd:m,footerNote:p,footerNoteDivider:C=!1,footerClassName:b="",footerLayout:x="center",onClose:f,closeDisabled:h=!1,beforeClose:_,closeOnBackdrop:g=!0,className:k="",ariaLabel:v,useTitle:B=!0,inline:y=!1,size:w,layer:A="modal",height:E,fillBody:D=!1,resetScrollKey:N}=e||{},[F,R]=o.useState(!1),K=o.useRef(!1),L=o.useRef(null),$=o.useId(),T=o.useRef(null);o.useEffect(()=>{},[y,a,v,k]),o.useEffect(()=>{N!==void 0&&T.current&&(T.current.scrollTop=0)},[N]);const[J,q]=o.useState(!1);o.useEffect(()=>{const z=T.current;if(!z)return;const ne=()=>q(z.scrollHeight>z.clientHeight+1);if(ne(),typeof ResizeObserver>"u")return;const H=new ResizeObserver(ne);H.observe(z);const U=z.firstElementChild;return U&&H.observe(U),()=>H.disconnect()},[i,N]),o.useEffect(()=>{if(!y)return Cu()},[y]);const O=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(y)return;const z=O.current,ne=L.current;return fo(ne,z),ne&&!ne.contains(document.activeElement)&&(ne.querySelector(_n)??ne).focus(),()=>{const H=document.activeElement;(!H||H===document.body||ne&&ne.contains(H))&&go(z)?.focus?.()}},[y]),ho(L,!y);const Q=o.useRef(!0),P=bo(),V=o.useRef(null);o.useEffect(()=>(Q.current=!0,()=>{Q.current=!1,V.current&&(clearTimeout(V.current),V.current=null)}),[]);const W=o.useCallback(()=>{!Q.current||!K.current||(K.current=!1,R(!1))},[]),G=o.useCallback((z,ne=!1)=>{if(ne&&!Q.current||K.current)return;K.current=!0,R(!0);const H=setTimeout(()=>{V.current===H&&(V.current=null);let U;try{U=z?z():void 0}catch{W();return}U&&typeof U.then=="function"&&U.then(()=>{setTimeout(W,120)},W)},P?0:l4);ne&&(V.current=H)},[W,P]),S=o.useCallback(()=>{h||_&&_()===!1||G(f,!0)},[G,f,h,_]),M=o.useRef(S);o.useEffect(()=>{M.current=S});const I=!y&&!!f;o.useEffect(()=>{if(I)return Gn(()=>M.current())},[I]);const Z=I&&g,le=o.useRef(!1),oe=z=>{le.current=z.target===z.currentTarget},de=z=>{const ne=le.current;le.current=!1,ne&&z.target===z.currentTarget&&S()},re=n.jsx("div",{className:`popup ${y?"popup--inline":""} ${A==="belowPagePopup"?"popup--below-page-popup":""} ${F?"popup--closing":""} ${k}`,onPointerDown:Z?oe:void 0,onClick:Z?de:void 0,onMouseDown:y?void 0:z=>{z.target===z.currentTarget&&z.preventDefault()},children:n.jsxs("div",{ref:L,className:`popup-panel${w?` popup-panel--${w}`:""}${E!=null?" popup-panel--has-height":""}${D?" popup-panel--fill-body":""}`,style:E!=null?{"--popup-height":typeof E=="number"?`${E}px`:E}:void 0,tabIndex:-1,role:y?void 0:"dialog","aria-modal":y?void 0:!0,"aria-labelledby":!y&&B&&a?$:void 0,"aria-label":!y&&!(B&&a)?v??(typeof a=="string"?a:void 0):void 0,children:[!B&&(l||f)?n.jsxs("div",{className:"popup-close-float",children:[l,f&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:S,disabled:h,ariaLabel:t("common.close","\uB2EB\uAE30")})]}):a||l||f?n.jsxs("div",{className:`popup-header${r?" popup-header--with-subtitle":""}`,children:[n.jsxs("div",{className:"popup-header-main",children:[a?n.jsx("h2",{id:$,className:"popup-title popup-title--left h2",children:a}):n.jsx("span",{id:$,className:"popup-title popup-title--left h2"}),r&&n.jsx("span",{className:"popup-subtitle body-3",children:r})]}),s&&n.jsx("div",{className:"popup-header-segment",children:n.jsx(wn,{size:40,ariaLabel:s.ariaLabel,options:s.options.map(z=>({key:z.key,label:z.label,disabled:z.disabled})),value:s.value,onChange:s.onChange})}),n.jsxs("div",{className:"popup-header-actions",children:[l,f&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:S,disabled:h,ariaLabel:t("common.close","\uB2EB\uAE30")})]})]}):null,n.jsx("div",{className:"popup-content",ref:T,tabIndex:J?0:void 0,children:n.jsx("div",{className:"popup-content__inner",children:typeof i=="function"?i({animateThen:G,closeWithAnimation:S}):i})}),p!=null&&p!==!1&&n.jsx("div",{className:`popup-footer-note caption-1${C?" popup-footer-note--divider":""}`,role:"note",children:p}),d||m?n.jsxs("div",{className:`popup-footer popup-footer--bar${b?` ${b}`:""}`,children:[n.jsx("div",{className:"popup-footer__start",children:typeof d=="function"?d({animateThen:G,closeWithAnimation:S}):d}),n.jsx("div",{className:"popup-footer__end",children:typeof m=="function"?m({animateThen:G,closeWithAnimation:S}):m})]}):u?.length?n.jsx("div",{className:`popup-footer popup-footer--buttons${x!=="center"?` popup-footer--${x}`:""}`,children:u.map((z,ne)=>n.jsx(fe,{htmlType:"button",size:48,variant:z.variant??"default",label:z.label,disabled:z.disabled,onClick:()=>z.onClick?.({animateThen:G,closeWithAnimation:S})},ne))}):c?n.jsx("div",{className:`popup-footer${x!=="center"?` popup-footer--${x}`:""}${b?` ${b}`:""}`,children:typeof c=="function"?c({animateThen:G,closeWithAnimation:S}):c}):null]})});return y||typeof document>"u"?re:cn.createPortal(re,document.body)}function yr(e){return String(e)}const vr=["o","triangle","x"];function Gu(e,t){return e===t?null:t}const Ku={o:"circle",triangle:"triangle",x:"x"},Yu={o:"main",triangle:"warn",x:"danger"};function i4(e){let t=0,a=0,r=0;for(const s of Object.values(e))s==="o"?t++:s==="triangle"?a++:s==="x"&&r++;const l=t+a+r;return{marked:l,o:t,triangle:a,x:r,rate:l===0?null:(t+a*.5)/l}}function Qo(e){const t={};for(const[a,r]of Object.entries(e))(r==="o"||r==="triangle"||r==="x")&&(t[a]=r);return t}function Zu(e){const t=[];let a=0;for(const r of e)t.push(a),a+=r;return t}function u4(e,t){return!t&&e>0}const ga={landscape:{width:1123,height:794,printSize:"A4 landscape",printW:"297mm",printH:"210mm"},portrait:{width:794,height:1123,printSize:"A4 portrait",printW:"210mm",printH:"297mm"}};function c4(e="landscape"){Rt("print-word-table-deprecated","[printWordTable] @deprecated \u2014 WordTablePopup renderButtons \uC758 print(\uB610\uB294 useWordTablePrint().print)\uB97C \uC4F0\uC138\uC694. \uC804\uC5ED \uC778\uC1C4\uB294 \uD654\uBA74\uC758 \uBAA8\uB4E0 \uB2E8\uC5B4\uD45C\uB97C \uD568\uAED8 \uCC0D\uC2B5\uB2C8\uB2E4.");const{printSize:t,printW:a,printH:r}=ga[e],l=document.createElement("style");l.textContent=`@page { size: ${t}; margin: 0; } .word-table { width: ${a} !important; height: ${r} !important; }`,document.head.appendChild(l);const s=()=>{document.head.removeChild(l),window.removeEventListener("afterprint",s)};window.addEventListener("afterprint",s),window.print()}function Xu(e,t){if(e.length===0)return[[]];const a=Math.max(1,Math.floor(t)),r=[];for(let l=0;l<e.length;l+=a)r.push(e.slice(l,l+a));return r}const d4={landscape:{1:{cols:1,rows:1},2:{cols:2,rows:1},3:{cols:3,rows:1},4:{cols:2,rows:2},5:{cols:3,rows:2},6:{cols:3,rows:2},7:{cols:4,rows:2},8:{cols:4,rows:2},9:{cols:5,rows:2},10:{cols:5,rows:2},11:{cols:4,rows:3},12:{cols:4,rows:3}},portrait:{1:{cols:1,rows:1},2:{cols:1,rows:2},3:{cols:1,rows:3},4:{cols:1,rows:4},5:{cols:1,rows:5},6:{cols:2,rows:3},7:{cols:2,rows:4},8:{cols:2,rows:4},9:{cols:2,rows:5},10:{cols:2,rows:5},11:{cols:3,rows:4},12:{cols:3,rows:4}}};function p4(e,t){const a=d4[e][t];if(a)return a;const r=Math.max(1,Math.ceil(t)),l=Math.max(1,Math.ceil(Math.sqrt(r*.707)));let s,i;return e==="landscape"?(i=l,s=Math.ceil(r/i)):(s=l,i=Math.ceil(r/s)),(e==="landscape"?s<i:i<s)&&([s,i]=[i,s]),{cols:s,rows:i}}const m4={show:"word-table-block__content--cut-show",dashed:"",corner:"word-table-block__content--cut-corner",hide:""},Ju={\uBA85:"\uBA85\uC0AC",\uB3D9:"\uB3D9\uC0AC",\uD615:"\uD615\uC6A9\uC0AC",\uBD80:"\uBD80\uC0AC",\uC218:"\uC218\uC0AC",\uAD00:"\uAD00\uD615\uC0AC",\uAC10:"\uAC10\uD0C4\uC0AC",\uC870:"\uC870\uC0AC",\uC811:"\uC811\uC0AC",\uC758:"\uC758\uC874\uBA85\uC0AC",\uB300:"\uB300\uBA85\uC0AC",\uBCF4\uB3D9:"\uBCF4\uC870\uB3D9\uC0AC",\uBCF4\uD615:"\uBCF4\uC870\uD615\uC6A9\uC0AC"},Qu={\uACE0\uC720:"\uACE0\uC720\uC5B4",\uD55C\uC790:"\uD55C\uC790\uC5B4",\uC678\uB798:"\uC678\uB798\uC5B4",\uD63C\uC885:"\uD63C\uC885\uC5B4"},es={\uBA85:"noun",\uB3D9:"verb",\uD615:"adjective",\uBD80:"adverb",\uC218:"numeral",\uAD00:"determiner",\uAC10:"interjection",\uC870:"particle",\uC811:"affix",\uC758:"dependentNoun",\uB300:"pronoun",\uBCF4\uB3D9:"auxVerb",\uBCF4\uD615:"auxAdjective"},ts={\uACE0\uC720:"native",\uD55C\uC790:"sino",\uC678\uB798:"foreign",\uD63C\uC885:"mixed"};function ec(e){return Object.fromEntries(Object.entries(Ju).map(([t,a])=>[t,es[t]?e(`wordTable.pos.${es[t]}`,{defaultValue:a}):a]))}function tc(e){return Object.fromEntries(Object.entries(Qu).map(([t,a])=>[t,ts[t]?e(`wordSearch.filter.type.${ts[t]}`,{defaultValue:a}):a]))}const h4={pos:es,wordType:ts};function ns(e,t){return e?e.split("/").map(a=>t[a]??a).join("/"):""}function nc(e,t,a,r){if(r!=="dashed")return{};const l=e%t,s=Math.floor(e/t),i=l<t-1,u=s<a-1;if(!i&&!u)return{};const c="#ddd",d=b=>`repeating-linear-gradient(to ${b}, ${c} 0, ${c} 5px, transparent 5px, transparent 10px)`,m=[],p=[],C=[];return i&&(m.push(d("bottom")),p.push("1px 100%"),C.push("right center")),u&&(m.push(d("right")),p.push("100% 1px"),C.push("center bottom")),{backgroundImage:m.join(", "),backgroundSize:p.join(", "),backgroundPosition:C.join(", "),backgroundRepeat:"no-repeat",printColorAdjust:"exact",WebkitPrintColorAdjust:"exact"}}const C4=280,f4=240,g4=280,b4=400,y4=120,v4=280;function ac(e,t){const a=o.useRef(null),[r,l]=o.useState(1),[s,i]=o.useState(0),u=o.useCallback((c,d)=>{if(!(c>0))return;const m=c/e,p=t&&d>0?d/t:1/0,C=Math.min(1,m,p);l(C),i(Math.max(0,(c-e*C)/2))},[e,t]);return o.useEffect(()=>{const c=a.current;if(!c)return;const d=t?c.parentElement??c:c;if(u(d.clientWidth,d.clientHeight),typeof ResizeObserver>"u")return;const m=new ResizeObserver(([p])=>u(p.contentRect.width,p.contentRect.height));return m.observe(d),()=>m.disconnect()},[u,t]),{scalerRef:a,scale:r,offset:s}}const x4=24,_4={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},w4=400,rc=8;function oc({label:e,subLabel:t,colloquialLabel:a,homonum:r,showWord:l=!0,showImage:s=!0,showPronunciation:i=!0,showColloquial:u=!0,buttonSize:c=40,wordInfo:d,outerScale:m=1}){const{t:p}=_e.useTranslation(),C=o.useRef(null),b=o.useRef(null),x=o.useRef(null),[f,h]=o.useState(1),[_,g]=o.useState(!1),[k,v]=o.useState({for:"",url:""}),[B,y]=o.useState(null),w=t&&t.length>0?t:$C()?.(e,r)??"",A=sa()?.(e,r)??"",{imgRef:E,loading:D,failed:N,onLoad:F,onError:R}=Xo(A),K=o.useCallback(()=>y(b.current?.getBoundingClientRect()??null),[]),L=o.useCallback(()=>y(null),[]),$=vo(!!B,M=>{M?K():L()},b),T=o.useMemo(()=>{if(!d)return null;const M=[];return d.grade&&M.push(p("wordTable.info.grade",{n:d.grade,defaultValue:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09"})),d.syllables&&M.push(p("wordTable.info.syllables",{n:d.syllables,defaultValue:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808"})),d.pos&&M.push(p("wordTable.info.pos",{v:ns(d.pos,ec(p)),defaultValue:"\uD488\uC0AC: {{v}}"})),d.wordType&&M.push(p("wordTable.info.wordType",{v:ns(d.wordType,tc(p)),defaultValue:"\uC720\uD615: {{v}}"})),M.length?M:null},[d,p]),J=w||e,q=k.for===J?k.url:"";o.useEffect(()=>{const M=Na(),I=w||e;if(!M||!I)return;let Z=!1;return Promise.resolve(M(I)).then(le=>{!Z&&le&&v({for:I,url:le})}),()=>{Z=!0}},[w,e]);const O=o.useRef(null),Q=o.useRef(null);o.useEffect(()=>()=>{x.current?.pause(),Q.current?.()},[]);const P=o.useCallback(M=>{if(M.stopPropagation(),_){O.current?.();return}if(!q)return;g(!0);const I=hr(q,()=>{g(!1),Q.current?.()});x.current=I.el,O.current=I.stop,Q.current=pr(I.stop)},[_,q]),V=s&&!!A&&!N,W=V&&l?C4:V?g4:f4,G=V&&l?b4:V?v4:y4;o.useEffect(()=>{const M=C.current;if(!M||typeof ResizeObserver>"u")return;const I=new ResizeObserver(([Z])=>{const{width:le,height:oe}=Z.contentRect;h(Math.min(le/W,oe/G))});return I.observe(M),()=>I.disconnect()},[W,G]);const S=c*m<x4;return n.jsxs("div",{ref:C,className:we("word-table-cell",S&&"word-table-cell--tap-too-small",V?"word-table-cell--with-image":""),"data-ref-w":W,"data-ref-h":G,children:[n.jsxs("div",{className:"word-table-cell__inner",style:{transform:`scale(${f})`},children:[V&&n.jsxs("div",{className:"word-table-cell__image-wrap",children:[D&&n.jsx("div",{className:"word-table-cell__spinner"}),n.jsx("img",{ref:E,className:"word-table-cell__image",src:A,alt:e,draggable:!1,style:{opacity:D?0:1},onLoad:F,onError:R})]}),l&&n.jsx("span",{className:"word-table-cell__word h0",children:e}),i&&w&&n.jsxs("span",{className:"word-table-cell__sub h3",children:["[",w,"]"]}),u&&a&&n.jsxs("span",{className:"word-table-cell__colloquial h5",children:["[",a,"]"]})]}),n.jsxs("div",{className:"word-table-cell__play-button","data-audio-src":q,children:[n.jsx("span",{"data-play-state":"play",style:{display:_?"none":void 0},children:n.jsx(fe,{htmlType:"button",size:c,type:"dot",icon:"play",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:p("common.play","\uC7AC\uC0DD"),ariaLabel:e?p("common.playFor",{name:e,defaultValue:`${e} \uC7AC\uC0DD`}):p("common.play","\uC7AC\uC0DD"),onClick:P})}),n.jsx("span",{"data-play-state":"pause",style:{display:_?void 0:"none"},children:n.jsx(fe,{htmlType:"button",size:c,type:"dot",icon:"pause",useBorder:!1,selected:!0,showTooltipInfo:p("common.pause","\uBA48\uCDA4"),ariaLabel:e?p("common.pauseFor",{name:e,defaultValue:`${e} \uBA48\uCDA4`}):p("common.pause","\uBA48\uCDA4"),onClick:P})})]}),d&&n.jsxs("div",{ref:b,className:"word-table-cell__info-button",onPointerEnter:M=>{ca(M)||K()},onPointerLeave:M=>{ca(M)||L()},onFocus:()=>{da()||K()},onBlur:L,children:[n.jsx(fe,{htmlType:"button",size:c,type:"dot",icon:"info",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:!1,ariaLabel:p("wordTable.wordInfo","{{word}} \uB0B1\uB9D0 \uC815\uBCF4",{word:e}),onClick:M=>{M.stopPropagation(),$.touchPress()}}),B&&T&&n.jsx(Kn,{anchorRect:B,items:T,showIndex:!1})]})]})}function ba({title:e,titleIcon:t,disc:a,className:r,orientation:l="landscape",contentTypes:s=["image","word","standardPron"],cutLine:i="show",showOutline:u=!0,showDivLine:c=!0,items:d,editCells:m,count:p,activeCell:C=null,onActivateCell:b,onRemoveCell:x,onRemoveItem:f,onReorder:h,renderCellAction:_,showFillerAdd:g=!1,contentRef:k,buttonSize:v=40,brand:B,code:y,pageNumber:w,pageNumberPosition:A="right",fitHeight:E=!1,scoring:D=!1,marks:N,onMarkClick:F,scoreIndexOffset:R=0}){const K=o.useCallback((Be,Se)=>{F?.(R+Be,Se)},[F,R]),L=(Be,Se)=>{const Le=N?.[yr(R+Be)]??null;return n.jsx("div",{className:we("word-table-cell__score",Le?"word-table-cell__score--marked":""),style:Ue>1?{transform:`translateX(-50%) scale(${Ue})`,transformOrigin:"bottom center"}:void 0,children:vr.map(Ze=>n.jsx("span",{className:we("word-table-cell__score-slot",Le===Ze?"word-table-cell__score-slot--on":""),children:n.jsx(fe,{htmlType:"button",size:v,type:"dot",shape:"pill",icon:Ku[Ze],variant:Le===Ze?Yu[Ze]:"default",selected:Le===Ze,useBorder:!1,...Ne?{}:{tabIndex:-1,role:"img"},showTooltipInfo:$(`wordTable.scoring.markName.${Ze}`,{defaultValue:Ze}),ariaLabel:$(`wordTable.scoring.${Ze}`,{word:Se,defaultValue:`${Se} ${Ze}`}),onClick:Ne?xt=>{xt.stopPropagation(),K(Be,Ze)}:void 0})},Ze))})},{t:$}=_e.useTranslation(),T=m!==void 0,J=e!=null||!!t||!!a,q=Cn("(max-width: 767px)"),O=o.useRef(null),[Q,P]=o.useState(null),V=d?.length??0,[W,G]=o.useState(null),[S,M]=o.useState(""),I=o.useRef(null),Z=o.useRef(null),le=o.useRef(null),oe=o.useRef(null),de=o.useCallback(Be=>{Z.current=Be,typeof k=="function"?k(Be):k&&(k.current=Be)},[k]),re=o.useCallback((Be,Se)=>{I.current=Se,h?.(Be,Se),M($("wordTable.reorder.moved",{n:Se+1,total:V,defaultValue:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40"}))},[h,$,V]);o.useEffect(()=>{const Be=I.current;Be!=null&&(I.current=null,Z.current?.querySelectorAll(".word-table-block__card:not(.word-table-block__card--filler)")?.[Be]?.querySelector(".word-table-block__card-handle button")?.focus())}),o.useEffect(()=>()=>{oe.current?.()},[]);const z=o.useCallback((Be,Se)=>{if(!h||!Be.altKey||Be.ctrlKey||Be.metaKey)return;const Le=Be.key==="ArrowRight";if(!Le&&Be.key!=="ArrowLeft")return;Be.preventDefault();const Ze=Se+(Le?1:-1);Ze<0||Ze>=V||re(Se,Ze)},[h,V,re]),ne=o.useCallback((Be,Se)=>{if(!h||Be.pointerType==="mouse")return;const Le=Be.target.closest?.("button");if(Le&&!Le.closest(".word-table-block__card-handle"))return;oe.current?.();const Ze={x:Be.clientX,y:Be.clientY};let xt=!1;const et=Pe=>{xt&&Pe.cancelable&&Pe.preventDefault()};let Xe=null,At=null;const gt=()=>{const Pe=At;if(!Pe)return;const bt=document.elementFromPoint?.(Pe.x,Pe.y)?.closest?.("[data-wordtable-cell]"),wt=bt?Number(bt.dataset.wordtableCell):NaN,lt=Number.isInteger(wt)?wt:null;le.current=lt,P(jt=>jt===lt?jt:lt)},_t=Pe=>{if(!xt){(Math.abs(Pe.clientX-Ze.x)>rc||Math.abs(Pe.clientY-Ze.y)>rc)&&st();return}if(At={x:Pe.clientX,y:Pe.clientY},typeof requestAnimationFrame>"u"){gt();return}Xe===null&&(Xe=requestAnimationFrame(()=>{Xe=null,gt()}))},Nt=()=>{Xe!==null&&(cancelAnimationFrame(Xe),Xe=null,gt());const Pe=le.current,bt=xt;st(),bt&&Pe!=null&&Pe!==Se&&re(Se,Pe)},mt=setTimeout(()=>{xt=!0,G(Se),le.current=Se,P(Se),window.addEventListener("touchmove",et,{passive:!1})},w4);function st(){clearTimeout(mt),window.removeEventListener("pointermove",_t),window.removeEventListener("pointerup",Nt),window.removeEventListener("pointercancel",Nt),window.removeEventListener("touchmove",et),xt=!1,Xe!==null&&(cancelAnimationFrame(Xe),Xe=null),le.current=null,oe.current=null,G(null),P(null)}oe.current=st,window.addEventListener("pointermove",_t),window.addEventListener("pointerup",Nt),window.addEventListener("pointercancel",Nt)},[h,re]),{width:H,height:U}=ga[l],pe=typeof E=="number"?E:E&&typeof E=="object"?q?E.narrow:E.wide:null,{scalerRef:Ee,scale:ge,offset:me}=ac(H,E?U:void 0),ie=T?m?.length??0:d?.length??0,be=Math.max(p??ie,1),{cols:he,rows:ue}=p4(l,be),Me={word:s.length===0||s.includes("word"),image:s.length===0||s.includes("image"),pron:s.length===0||s.includes("standardPron"),colloq:s.length===0||s.includes("colloquialPron")},qe=T?(m??[]).some(Be=>Be!==null&&Be.length>1):(d??[]).some(Be=>(Be.words??[]).length>1),je=!!B?.show,Ve=!!B?.show&&B?.top!==!1,Oe=!!B?.show&&B?.bottom!==!1,dt=B?.copyright??"\xA9 IHAB, Inc. All rights reserved.",rt=we("word-table-block__content",m4[i],u&&"word-table-block__content--outline",c&&qe&&"word-table-block__content--div-line",!je&&w&&A!=="none"&&"word-table-block__content--page-number",Ve&&"word-table-block__content--brand-top",Oe&&"word-table-block__content--brand-bottom"),nt={transform:`scale(${1/ge})`,transformOrigin:"center center"},pt=v*vr.length+4*(vr.length-1),Ne=!!F,Ue=Ne?Math.max(1,Math.min(1/ge,H/he/pt)):1,ke=n.jsxs("div",{ref:Ee,className:"word-table__scaler",style:{height:U*ge},children:[n.jsx("div",{className:we("word-table",D&&!Ne&&"word-table--score-readonly",!J&&r),style:{width:H,height:U,transform:`scale(${ge})`,transformOrigin:"top left",marginLeft:me},children:n.jsxs("div",{ref:de,className:rt,style:{gridTemplateColumns:`repeat(${he}, 1fr)`,gridTemplateRows:`repeat(${ue}, 1fr)`},children:[T?n.jsx(n.Fragment,{children:(m??[]).map((Be,Se)=>n.jsx("div",{className:we("word-table-block__edit-cell",Be?"word-table-block__edit-cell--filled":"word-table-block__edit-cell--empty",C===Se?"word-table-block__edit-cell--active":""),style:nc(Se,he,ue,i),children:Be?n.jsxs(n.Fragment,{children:[Be.map((Le,Ze)=>n.jsxs(o.Fragment,{children:[Ze>0&&n.jsx("div",{className:"word-table-block__pair-divider"}),n.jsx(oc,{outerScale:ge,label:Le.word,subLabel:Le.pronunciation,colloquialLabel:Le.colloquialPronunciation,homonum:Le.homonum,showWord:Me.word,showImage:Me.image,showPronunciation:Me.pron,showColloquial:Me.colloq,buttonSize:v})]},Ze)),D&&L(Se,Be.map(Le=>Le.word).join(" / ")),x&&n.jsx("div",{className:"word-table-block__card-close",children:n.jsx(fe,{htmlType:"button",size:v,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:Be.length>1?$("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):$("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:Be.length>1?$("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):$("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),onClick:()=>x(Se)})})]}):b&&n.jsx("div",{style:nt,children:n.jsx(fe,{htmlType:"button",size:"48",type:"bar",icon:"plus",label:$("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>b(Se)})})},Se))}):n.jsxs(n.Fragment,{children:[(d??[]).map((Be,Se)=>n.jsxs("div",{"data-wordtable-cell":h?Se:void 0,className:`word-table-block__card${h?" word-table-block__card--draggable":""}${Q===Se?" word-table-block__card--drag-over":""}${W===Se?" word-table-block__card--dragging":""}`,style:nc(Se,he,ue,i),draggable:!!h,onPointerDown:h?Le=>ne(Le,Se):void 0,onKeyDown:h?Le=>z(Le,Se):void 0,onDragStart:h?()=>{O.current=Se}:void 0,onDragOver:h?Le=>{Le.preventDefault(),P(Se)}:void 0,onDragLeave:h?()=>P(null):void 0,onDrop:h?Le=>{Le.preventDefault(),O.current!==null&&O.current!==Se&&h(O.current,Se),O.current=null,P(null)}:void 0,onDragEnd:h?()=>{O.current=null,P(null)}:void 0,children:[(Be.words??[]).map((Le,Ze)=>n.jsxs(o.Fragment,{children:[Ze>0&&n.jsx("div",{className:"word-table-block__pair-divider"}),n.jsx(oc,{outerScale:ge,label:Le.label,subLabel:Le.subLabel,colloquialLabel:Le.colloquialLabel,homonum:Le.homonum,showWord:Me.word,showImage:Me.image,showPronunciation:Me.pron,showColloquial:Me.colloq,buttonSize:v,wordInfo:Le.grade||Le.syllables!=null||Le.pos||Le.wordType?{grade:Le.grade,syllables:Le.syllables,pos:Le.pos,wordType:Le.wordType}:void 0})]},Ze)),D&&L(Se,(Be.words??[]).map(Le=>Le.label).join(" / ")),h&&n.jsx("div",{className:"word-table-block__card-handle",children:n.jsx(fe,{htmlType:"button",size:v,type:"dot",icon:"grip-vertical",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:$("wordTable.reorder.hint","Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"),ariaLabel:$("wordTable.reorder.handle",{word:(Be.words??[]).map(Le=>Le.label).join(" / "),defaultValue:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)"})})}),(_||f)&&n.jsxs("div",{className:"word-table-block__card-actions",children:[_?.(Se,Be),f&&n.jsx("div",{className:"word-table-block__card-close",children:n.jsx(fe,{htmlType:"button",size:v,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(Be.words??[]).length>1?$("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):$("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:(Be.words??[]).length>1?$("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):$("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),onClick:()=>f(Be.id)})})]})]},Be.id)),Array.from({length:Math.max(0,he*ue-(d?.length??0))}).map((Be,Se)=>{const Le=(d?.length??0)+Se<be;return n.jsx("div",{className:"word-table-block__card word-table-block__card--filler",children:g&&b&&Le&&n.jsx("div",{style:nt,children:n.jsx(fe,{htmlType:"button",size:v,type:"bar",icon:"plus",label:$("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>b((d?.length??0)+Se)})})},`filler-${Se}`)})]}),Ve&&n.jsx(n.Fragment,{children:n.jsxs("div",{className:"word-table__band word-table__band--top",children:[n.jsx("img",{className:"word-table__brand-logo",src:B?.topLogo?.src??dr,alt:B?.topLogo?.alt??"\uB9D0\uADC0"}),(()=>{const Be=[B?.title&&n.jsx("span",{className:"word-table__paper-title",children:B.title},"t"),B?.owner&&n.jsx("span",{className:"word-table__owner",children:B.owner},"o"),y&&n.jsx("span",{className:"word-table__code",children:y},"c")].filter(Boolean);return Be.length===0?null:n.jsx("span",{className:"word-table__ident",children:Be.map((Se,Le)=>n.jsxs(o.Fragment,{children:[Le>0&&n.jsx("span",{className:"word-table__ident-dot","aria-hidden":"true",children:"\xB7"}),Se]},Le))})})()]})}),Oe&&n.jsx(n.Fragment,{children:n.jsxs("div",{className:"word-table__band word-table__band--bottom",children:[n.jsxs("span",{className:"word-table__brand-by",children:[B?.bottomLogo?n.jsx("img",{className:"word-table__brand-logo--ihab word-table__brand-logo--given",src:B.bottomLogo.src,alt:B.bottomLogo.alt}):n.jsx("span",{className:"word-table__brand-logo--ihab",role:"img","aria-label":"IHAB"}),n.jsx("span",{className:"word-table__copyright",children:dt})]}),n.jsxs("span",{className:"word-table__band-end",children:[B?.link&&n.jsx("span",{className:"word-table__link",children:B.link}),w&&A!=="none"&&n.jsx("span",{className:"word-table__page-count",children:$("wordTable.filter.pageIndicator",{current:w.current,total:w.total})})]})]})}),!je&&w&&A!=="none"&&n.jsx("span",{className:`word-table__page-number body-3 word-table__page-number--${A}`,children:$("wordTable.filter.pageIndicator",{current:w.current,total:w.total})})]})}),h&&n.jsx("span",{role:"status",style:_4,children:S})]}),He=pe==null?ke:n.jsx("div",{className:"word-table__frame",style:{height:pe},children:ke});return J?n.jsx(fa,{type:"page",icon:t,title:e,disc:a,className:we("word-table-block",r),children:He}):He}function B4(e,t,a){const r=[];for(const l of e??[]){if(l.type==="note"||l.type==="input")continue;const s=l.displayLabel??l.label,i=k4(l,t?.[l.label],a);i!==null&&r.push(`${s} ${i}`)}return r.join(" \xB7 ")}function k4(e,t,a){const r=(Array.isArray(t)?t:t===void 0?[]:[t]).filter(l=>l!==xn);return r.length===0?e.allOption?e.allLabel??a:null:r.map(l=>A4(e,l)).join(", ")}function A4(e,t){const a=[...e.items??[],...(e.groups??[]).flat()];for(const r of a)if(r!=null){if(typeof r=="string"){if(r===t)return r;continue}if(r.value===t)return r.displayLabel??r.labels?.join(" ")??r.value}return t}function Ln({title:e,titleLevel:t=2,headerAction:a,headerSummary:r,collapsible:l=!1,defaultCollapsed:s=!1,collapsed:i,onCollapsedChange:u,footer:c,sections:d,selected:m={},onSelect:p,align:C,sectionAlign:b,className:x}){const f=(C??(b==="vertical"?"newline":"inline"))==="inline",{t:h}=_e.useTranslation(),[_,g]=o.useState(s),k=i??_,v=()=>{const N=!k;g(N),u?.(N)},B=N=>{if(!l)return;const F=N.target;!F||typeof F.closest!="function"||F.closest(".filter-panel__collapse-toggle")||F.closest('button, a, input, select, textarea, label, [role="radiogroup"], [role="button"], [role="menu"]')||v()},y=o.useMemo(()=>r!==void 0||!k?"":B4(d,m,h("common.all","\uC804\uCCB4")),[r,k,d,m,h]),w=r??(y?n.jsx("span",{className:"filter-panel__header-summary body-3",children:y}):null),A=e||a||r||l,E=o.useId(),D=t?`h${t}`:"span";return n.jsxs("div",{className:we("filter-panel",l?"filter-panel--collapsible":"",k?"filter-panel--collapsed":"",x),role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?E:void 0,children:[A&&n.jsxs("div",{className:"filter-panel__header",onClick:l?B:void 0,children:[n.jsx("div",{className:"filter-panel__title-row",children:e&&n.jsx(D,{id:E,className:"filter-panel__title h4",children:e})}),n.jsxs("div",{className:"filter-panel__header-actions",children:[k?w:a,l&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:k?"chevron-down":"chevron-up",className:"filter-panel__collapse-toggle",ariaLabel:k?h("common.expand","\uD3BC\uCE58\uAE30"):h("common.collapse","\uC811\uAE30"),showTooltipInfo:k?h("common.expand","\uD3BC\uCE58\uAE30"):h("common.collapse","\uC811\uAE30"),"aria-expanded":!k,onClick:v})]})]}),!k&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:we("filter-panel__sections",f?"filter-panel__sections--row":""),children:d.map(N=>{const F=m[N.label],R=F===void 0||(Array.isArray(F)?F.length===0:!1),K=(N.items??[]).filter($=>$!=null);N.allOption&&K.some($=>(typeof $=="string"?$:$.value)===xn)&&Rt(`filter-panel-all-value:${N.label}`,`[FilterPanel] '${N.label}' \uC808\uC5D0 allOption \uACFC \uAC12 '${xn}' \uC778 \uBCF4\uAE30\uAC00 \uD568\uAED8 \uC788\uB2E4 \u2014 \uB450 \uC120\uD0DD\uC774 \uAD6C\uBCC4\uB418\uC9C0 \uC54A\uB294\uB2E4. \uBCF4\uAE30 \uAC12\uC744 \uBC14\uAFD4\uB77C.`);const L=$=>{const T=typeof $=="string"?$:$.value,J=typeof $!="string"&&!!$.disabled,q=typeof $!="string"?$.labels:void 0,O=typeof $!="string"?$.displayLabel:void 0,Q=typeof $!="string"?$.tooltip:void 0,P=typeof $!="string"?$.descriptionTooltip:void 0,V=typeof $!="string"?$.shape:void 0,W=Array.isArray(F)?F.includes(T):F===T;return n.jsx(fe,{htmlType:"button",size:"keyboard",label:q??O??T,type:N.itemType??(q?"bar":T.length===1?"dot":void 0),selected:W,disabled:J,shape:V,showTooltipInfo:!!Q,tooltipInfoText:Q,tooltipDescription:P,onClick:()=>p?.(T,N.label)},T)};return n.jsxs(o.Fragment,{children:[N.groupLabel&&n.jsxs("div",{className:"filter-panel__group-label-row",children:[n.jsx("div",{className:"filter-panel__group-label body-2",children:N.groupLabel}),N.groupAction]}),n.jsxs("div",{className:we("filter-panel__section",N.layout==="row"?"filter-panel__section--row":"",N.block?"filter-panel__section--block":""),children:[n.jsxs("div",{className:"filter-panel__section-label-row",children:[n.jsx("span",{className:"filter-panel__section-label body-3",children:N.displayLabel??N.label}),N.labelAction??(N.labelInfo?n.jsx(Ha,{...N.labelInfo}):null)]}),N.type==="note"?n.jsx("div",{className:"filter-panel__note body-3",children:N.content}):N.type==="input"?n.jsx(Xn,{className:"filter-panel__textfield",placeholder:N.placeholder,ariaLabel:N.displayLabel??N.label,value:m[N.label]??"",onChange:$=>p?.($,N.label),error:N.error}):!N.multiple&&N.display==="segmented"?n.jsx(wn,{ariaLabel:N.displayLabel??N.label,options:[...N.allOption?[{key:xn,label:N.allLabel??h("common.all","\uC804\uCCB4"),disabled:N.allOptionDisabled}]:[],...K.map($=>{const T=typeof $=="string"?$:$.value,J=typeof $!="string"?$.displayLabel:void 0,q=typeof $!="string"?$.disabled:void 0;return{key:T,label:J??T,disabled:q}})],value:R&&N.allOption?xn:m[N.label]??"",onChange:$=>p?.($,N.label),size:32}):!N.multiple&&N.display==="dropdown"?n.jsx(fn,{className:"filter-panel__dropdown",ariaLabel:typeof N.label=="string"?N.label:void 0,size:40,options:[...N.allOption?[{value:xn,label:N.allLabel??h("common.all","\uC804\uCCB4"),disabled:N.allOptionDisabled}]:[],...K.map($=>{const T=typeof $=="string"?$:$.value,J=typeof $!="string"?$.displayLabel:void 0,q=typeof $!="string"?$.disabled:void 0;return{value:T,label:J??T,disabled:q}})],value:R&&N.allOption?xn:m[N.label],onChange:$=>p?.($,N.label)}):n.jsxs("div",{className:N.groups?"filter-panel__item-groups":"filter-panel__items",children:[N.allOption&&!N.groups&&n.jsx(fe,{htmlType:"button",size:"keyboard",label:N.allLabel??h("common.all","\uC804\uCCB4"),selected:R,disabled:N.allOptionDisabled,onClick:()=>p?.(xn,N.label)}),N.groups?N.groups.map(($,T)=>n.jsxs("div",{className:"filter-panel__item-group",children:[T===0&&N.allOption&&n.jsx(fe,{htmlType:"button",size:"keyboard",label:N.allLabel??h("common.all","\uC804\uCCB4"),selected:R,disabled:N.allOptionDisabled,onClick:()=>p?.(xn,N.label)}),$.filter(J=>J!=null).map(L)]},T)):K.map(L)]})]})]},N.label)})}),c!=null&&c!==!1&&n.jsx("div",{className:"filter-panel__footer body-3",children:c})]})]})}const N4=[1,2,3,4,5,6,7,8,9,10,11,12],sc=[8,4,2,1],hn="show",kn="hide";function lc(e,t){return{label:e("wordTable.filter.composition","\uAD6C\uC131"),items:[{value:"image",disabled:!t.hasImage,displayLabel:e("wordTable.filter.image","\uC774\uBBF8\uC9C0")},{value:"word",displayLabel:e("wordTable.filter.word","\uB2E8\uC5B4")},{value:"standardPron",displayLabel:e("wordTable.filter.standardPron","\uD45C\uC900 \uBC1C\uC74C")},{value:"colloquialPron",disabled:!t.hasColloquial,displayLabel:e("wordTable.filter.colloquialPron","\uAD6C\uC5B4\uCCB4 \uBC1C\uC74C")}],multiple:!0,allOption:!0}}function ic(e){return{label:e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5"),items:[{value:"landscape",displayLabel:e("wordTable.filter.landscape","\uAC00\uB85C")},{value:"portrait",displayLabel:e("wordTable.filter.portrait","\uC138\uB85C")}],display:"segmented"}}function uc(e){return{label:e("wordTable.filter.border","\uC678\uACFD\uC120"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:kn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function cc(e){return{label:e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:kn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function dc(e){return{label:e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:kn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function pc(e){return{label:e("wordTable.filter.cutLine","\uC808\uCDE8\uC120"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:"dashed",displayLabel:e("wordTable.filter.dotted","\uC810\uC120")},{value:"corner",displayLabel:e("wordTable.filter.corner","\uCF54\uB108")},{value:kn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function mc(e){return{label:e("wordPrint.divLine","\uB300\uB9BD\uC120"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:kn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function hc(e,t){return{label:e(t.hasPairs?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord"),items:[t.itemCount,...sc.filter(a=>a<t.itemCount)].map(a=>({value:`${a}\uAC1C`,displayLabel:e("wordTable.filter.itemsPerPageOption",{count:a})})),display:"segmented"}}function Cc(e,t){return e===t||!sc.includes(e)?Number.POSITIVE_INFINITY:e}function E4(e){return{label:e("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638"),items:[{value:"left",displayLabel:e("wordTable.filter.pageNumberLeft","\uC67C\uCABD")},{value:"center",displayLabel:e("wordTable.filter.pageNumberCenter","\uC911\uC559")},{value:"right",displayLabel:e("wordTable.filter.pageNumberRight","\uC624\uB978\uCABD")},{value:kn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function fc(e){return e==="left"||e==="center"||e==="right"?e:"none"}function gc(e,t){return{[e("wordTable.filter.composition","\uAD6C\uC131")]:t.contentTypes,[e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")]:t.orientation,[e("wordTable.filter.border","\uC678\uACFD\uC120")]:t.showOutline?hn:kn,[e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")]:t.cutLine,[e("wordPrint.divLine","\uB300\uB9BD\uC120")]:t.showDivLine?hn:kn,...t.showTopInfo!=null?{[e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")]:t.showTopInfo?hn:kn}:{},...t.showBottomInfo!=null?{[e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")]:t.showBottomInfo?hn:kn}:{}}}function bc(e,t,a,r){return a===e("wordTable.filter.composition","\uAD6C\uC131")?t===xn?(r.setContentTypes(()=>[]),!0):(r.setContentTypes(l=>l.includes(t)?l.filter(s=>s!==t):[...l,t]),!0):a===e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")?(r.setOrientation(t==="landscape"?"landscape":"portrait"),!0):a===e("wordTable.filter.border","\uC678\uACFD\uC120")?(r.setShowOutline(t===hn),!0):a===e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")?(r.setCutLine(t),!0):a===e("wordPrint.divLine","\uB300\uB9BD\uC120")?(r.setShowDivLine(t===hn),!0):a===e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")?(r.setShowTopInfo?.(t===hn),!0):a===e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")?(r.setShowBottomInfo?.(t===hn),!0):!1}function D4(e){return"sections"in e}function as(e){const{t}=_e.useTranslation(),{title:a,className:r,collapsible:l,defaultCollapsed:s,collapsed:i,onCollapsedChange:u,headerSummary:c}=e,d={collapsible:l,defaultCollapsed:s,collapsed:i,onCollapsedChange:u,headerSummary:c};if(D4(e))return n.jsx(Ln,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:e.sections,selected:e.selected,onSelect:e.onSelect,...d,align:"inline"});const{hasImage:m,hasColloquial:p,contentTypes:C,orientation:b,showOutline:x,cutLine:f,showDivLine:h,setters:_,showCutLine:g=!1,showDivLine2:k=!1,middleSections:v=[],extraSelected:B={},onExtraSelect:y,showPaperBands:w=!1,showTopInfo:A=!0,showBottomInfo:E=!0}=e,D=[lc(t,{hasImage:m,hasColloquial:p}),ic(t),...v,uc(t),...g?[pc(t)]:[],...k?[mc(t)]:[],...w?[cc(t),dc(t)]:[]],N={...gc(t,{contentTypes:C,orientation:b,showOutline:x,cutLine:f,showDivLine:h,showTopInfo:A,showBottomInfo:E}),...B},F=(R,K)=>{bc(t,R,K,_)||y?.(R,K)};return n.jsx(Ln,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:D,selected:N,onSelect:F,...d,sectionAlign:"horizontal"})}function rs(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function S4(e){return rs(e).replace(/"/g,""").replace(/'/g,"'")}function os(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()}let xr=null,ya=null;function j4(e,t,a,r="",l=""){if(e.length===0||ya&&ya.iframe.isConnected&&Date.now()-ya.at<1e4)return;const s=r?os(r):"";xr?.();let i=null;if(s){const d=document.title;document.title=s,i=()=>{document.title=d,window.removeEventListener("afterprint",i),xr===i&&(xr=null)},xr=i,window.addEventListener("afterprint",i)}const u=document.createElement("iframe");u.style.cssText="position:fixed;left:-10000px;top:0;width:1200px;height:900px;border:0;",document.body.appendChild(u);const c=u.contentDocument;if(!c){u.remove();return}ya={iframe:u,at:Date.now()},c.open(),c.write(ss(e,t,a,!0,s,l)),c.close(),u.contentWindow?.addEventListener("afterprint",()=>{i?.(),setTimeout(()=>{u.remove(),ya?.iframe===u&&(ya=null)},0)})}function ss(e,t,a,r=!1,l="",s=""){l=l?os(l):"";const i=Array.from(document.styleSheets).flatMap(p=>{try{return Array.from(p.cssRules).map(C=>C.cssText)}catch{return[]}}).join(`
|
|
830
|
+
`),f=x===-1?a:a.slice(0,x);s("comment",f),a=a.slice(f.length);continue}const u=a.match(/^\/\*[\s\S]*?\*\//);if(u){s("comment",u[0]),a=a.slice(u[0].length);continue}const c=a.match(/^(`(?:\\.|[^`])*`|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')/);if(c){s("string",c[0]),a=a.slice(c[0].length);continue}const d=a.match(/^\d+(?:\.\d+)?/);if(d){s("number",d[0]),a=a.slice(d[0].length);continue}const m=a.match(pv);if(m){s("keyword",m[0]),a=a.slice(m[0].length);continue}const p=a.match(/^[A-Za-z_$][A-Za-z0-9_$-]*/);if(p){const x=p[0];s(l&&dv.has(x)?"command":"identifier",x),a=a.slice(x.length);continue}const C=a.match(/^[=+\-*/%<>!&|^~?:]+/);if(C){s("operator",C[0]),a=a.slice(C[0].length);continue}const b=a.match(/^[()[\]{};.,]/);if(b){s("punctuation",b[0]),a=a.slice(1);continue}s("other",a[0]),a=a.slice(1)}return r}function hv({children:e,language:t="bash",title:a="",showCopy:r=!0,size:l="default",className:s=""}){const{t:i}=_e.useTranslation(),[u,c]=o.useState(!1),d=cv(yu(e)),m=o.useRef(null);o.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const p=async()=>{try{if(!await Tf(d))return;c(!0),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>c(!1),2e3)}catch{}},C=mv(d,t),b=l==="small"?"caption-1":"body-3";return n.jsxs("div",{className:we("code-box",l==="small"?"code-box--small":"",s),children:[(a||r)&&n.jsxs("div",{className:"code-box__header",role:"toolbar","aria-label":i("common.codeBlock","\uCF54\uB4DC \uBE14\uB85D"),children:[n.jsx("div",{className:"code-box__title caption-1",children:a}),r&&n.jsx(fe,{htmlType:"button",className:"code-box__copy",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:u?"check":"copy",onClick:p,ariaLabel:u?i("common.copied","\uBCF5\uC0AC\uB428"):i("common.copyCode","\uCF54\uB4DC \uBCF5\uC0AC")})]}),n.jsx("pre",{className:"code-box__inner","data-lang":t,children:n.jsx("code",{children:C.map((x,f)=>n.jsx("span",{className:`code-token ${x.type} ${b}`,children:x.content},f))})})]})}const Cv={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function Ga(e){const{t}=_e.useTranslation(),{variant:a="spinner",size:r=24,progress:l=null,label:s}=e||{},i=s||t("loader.loading","Loading");if(a==="bar"){const c=l==null||!Number.isFinite(Number(l)),d=c?0:Math.max(0,Math.min(100,Number(l)));return n.jsx("div",{className:`loader-bar${c?" loader-bar--indeterminate":""}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":c?void 0:d,"aria-label":i,children:n.jsx("div",{className:"loader-bar__inner",style:c?void 0:{width:`${d}%`}})})}const u=typeof r=="number"?`${r}px`:r;return n.jsxs("div",{className:"loader-spinner",style:{width:u,height:u},role:"status","aria-label":i,children:[n.jsx("span",{style:Cv,children:i}),n.jsxs("svg",{className:"loader-spinner__svg",viewBox:"0 0 50 50",width:r,height:r,children:[n.jsx("circle",{className:"loader-spinner__bg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4"}),n.jsx("circle",{className:"loader-spinner__fg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4",strokeLinecap:"round"})]})]})}function vu({checked:e,onChange:t,disabled:a=!1,label:r,ariaLabel:l,labelPosition:s="right",className:i="",id:u}){const c=r&&n.jsx("span",{className:"toggle__label body-3",children:r});return n.jsxs("label",{className:`toggle${a?" toggle--disabled":""} ${i}`.trim(),children:[s==="left"&&c,n.jsx("input",{id:u,type:"checkbox",role:"switch",checked:e,disabled:a,onChange:d=>t?.(d.target.checked),"aria-label":!r&&l?l:void 0}),n.jsx("span",{className:"toggle__slider"}),s==="right"&&c]})}function xu({checked:e=!1,onChange:t,disabled:a,indeterminate:r,label:l,size:s="medium",className:i,title:u,ariaLabel:c}){const d=o.useRef(null),m=o.useId(),p=o.useRef(!!r);return p.current=!!r,o.useEffect(()=>{d.current&&(d.current.indeterminate=!!r)}),n.jsxs("label",{className:we("checkbox",s==="small"&&"checkbox--small",s==="large"&&"checkbox--large",a&&"checkbox--disabled",i),htmlFor:m,title:u,children:[n.jsx("input",{ref:d,id:m,type:"checkbox",className:"checkbox__input",checked:e,onChange:C=>{t?.(C.target.checked),d.current&&(d.current.indeterminate=p.current)},disabled:a,"aria-label":!l&&c?c:void 0}),n.jsx("span",{className:"checkbox__box"}),l&&n.jsx("span",{className:"checkbox__label body-3",children:l})]})}function fv({count:e,actions:t,onClear:a,clearLabel:r,visible:l,content:s,max:i}){const{t:u}=_e.useTranslation(),c=l!==void 0?l:e>0,d=r??u("bulkBar.clearSelection","\uC120\uD0DD \uD574\uC81C"),m=o.useRef(null),p=o.useRef(null),C=o.useRef(null),b=o.useRef(c);o.useLayoutEffect(()=>{const g=p.current,k=b.current;if(b.current=c,c&&!k){const v=typeof document<"u"?document.activeElement:null;C.current=v&&v!==document.body&&!g?.contains(v)?v:null}else!c&&k&&g&&g.contains(document.activeElement)&&sr(g,C.current)},[c]);const[x,f]=o.useState(!1),h=o.useRef(!1),_=o.useRef(null);return o.useEffect(()=>{const g=m.current;if(!g)return;const k=E=>{h.current=E,f(E)},v=()=>{const E=g.firstElementChild??g,D=Array.from(E.children);if(D.length<2){k(!1);return}const N=D[0].offsetTop,F=D.some(T=>T.offsetTop!==N);if(!h.current){_.current=g.clientWidth,F&&k(!0);return}if(F)return;const R=D[0],K=D[D.length-1],L=K.offsetLeft+K.offsetWidth-R.offsetLeft,$=_.current;($==null||L<=$)&&k(!1)};if(v(),typeof ResizeObserver>"u")return;const B=new ResizeObserver(v);B.observe(g);const y=g.parentElement;let w=y?.clientWidth??0;const A=new ResizeObserver(()=>{const E=y?.clientWidth??0;E!==w&&(w=E,_.current=null,v())});return y&&A.observe(y),()=>{B.disconnect(),A.disconnect()}},[s,e]),n.jsxs("div",{ref:p,className:`bulk-bar ${c?"bulk-bar--visible":""}`,inert:!c||void 0,"aria-hidden":c?void 0:!0,children:[n.jsx("span",{ref:m,className:"bulk-bar__count body-2",role:"status",children:s??n.jsx("b",{children:u("common.selectedCount",{count:e})})}),i!==void 0&&n.jsx(Lt,{size:"small",fill:"soft",variant:"main",label:`${e} / ${i}`,"aria-label":u("common.selectedOfMax",{count:e,max:i,defaultValue:`\uCD5C\uB300 ${i}\uAC1C \uC911 ${e}\uAC1C`})}),n.jsxs("div",{className:`bulk-bar__actions${x?" bulk-bar__actions--stacked":""}`,children:[n.jsx(fe,{htmlType:"button",size:40,label:d,onClick:a}),t.map((g,k)=>n.jsx(fe,{htmlType:"button",size:40,variant:g.variant??"default",icon:g.icon,label:g.label,onClick:g.onClick},k))]})]})}const gv=[{key:"edit",icon:"edit-2",closeFirst:!0},{key:"duplicate",icon:"copy",closeFirst:!1},{key:"publish",icon:"book-marked",closeFirst:!1},{key:"copyLink",icon:"link",closeFirst:!1},{key:"remove",icon:"trash-2",closeFirst:!0}];function bv(e){const{onClose:t,className:a}=e;return n.jsx("div",{className:we("item-actions",a),children:gv.map(({key:r,icon:l,closeFirst:s})=>{const i=e[r];if(!i)return null;const u=r==="publish"?i.published?i.unpublish:i.publish:i;return n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:l,ariaLabel:u.label,showTooltipInfo:u.label,onClick:()=>{s&&t(),u.onClick()}},r)})})}function _u(e,t){const a=()=>{if(e){const[f,h]=e.split("-");return{y:+f,m:+h-1}}const[b,x]=lo(t).split("-");return{y:+b,m:+x-1}},[r,l]=o.useState(()=>a().y),[s,i]=o.useState(()=>a().m),u=o.useRef(e);o.useEffect(()=>{if(e===u.current)return;u.current=e;const b=a();l(b.y),i(b.m)},[e]);const c=o.useRef({y:r,m:s});o.useEffect(()=>{c.current={y:r,m:s}},[r,s]);const d=o.useCallback(b=>{const x=c.current.y*12+c.current.m+b,f=Math.floor(x/12),h=x-f*12;c.current={y:f,m:h},l(f),i(h)},[]),m=o.useCallback(()=>d(-1),[d]),p=o.useCallback(()=>d(1),[d]),C=o.useCallback((b,x)=>{c.current={y:b,m:x},l(b),i(x)},[]);return{viewY:r,viewM:s,prevMonth:m,nextMonth:p,setViewYM:C}}function fr(e,t){return new Date(e,t+1,0).getDate()}function yv(e,t){return new Date(e,t,1).getDay()}function Ka(e,t,a){return`${e}-${String(t+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`}function vv(e){if(!e)return"";const[t,a,r]=e.split("-");return`${t}. ${a}. ${r}.`}function xv(e){const t=e.replace(/\D/g,"");if(t.length!==8)return null;const a=+t.slice(0,4),r=+t.slice(4,6),l=+t.slice(6,8);if(r<1||r>12||l<1||l>31)return null;const s=new Date(a,r-1,l);return s.getFullYear()!==a||s.getMonth()!==r-1||s.getDate()!==l?null:Ka(a,r-1,l)}const _v=1900;function wv(e,t,a,r,l){const s=r?+r.split("-")[0]:Math.min(_v,e),i=l?+l.split("-")[0]:Math.max(t+10,e),u=[];for(let c=s;c<=i;c++)u.push({value:String(c),label:a(c)});return u}function wu(e,t,a,r){const l=[];for(let s=1;s<=12;s++){const i=`${e}-${String(s).padStart(2,"0")}`;a&&i<a.slice(0,7)||r&&i>r.slice(0,7)||l.push({value:String(s),label:t(e,s)})}return l}function Bv({value:e,onChange:t,size:a=48,min:r,max:l,disabled:s,placeholder:i,className:u,today:c}){const{t:d,i18n:m}=_e.useTranslation(),p=i??d("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),C=o.useMemo(()=>d("calendar.dow",{returnObjects:!0}),[d]),b=lo(c),{viewY:x,viewM:f,prevMonth:h,nextMonth:_,setViewYM:g}=_u(e,c),k=o.useId(),v=o.useCallback((z,ne)=>{const H=window.innerHeight,U=window.innerWidth,pe=typeof document<"u"?document.getElementById(k):null,Ee=Math.max(pe?.offsetHeight||0,pe?.scrollHeight||0)||300,ge=Math.max(z.width,pe?.offsetWidth||0,260),me=H-z.bottom,ie=z.top,be=me<Ee&&ie>me,he=8,ue=(Me,qe)=>Math.min(Math.max(he,Me),Math.max(he,qe));return{position:"fixed",left:ue(z.left,U-ge-he),width:z.width,minWidth:260,...be?{top:"auto",bottom:ue(H-z.top+6,H-Ee-he)}:{bottom:"auto",top:ue(z.bottom+6,H-Ee-he)},zIndex:Ia(ne)}},[k]),{open:B,setOpen:y,toggle:w,style:A,triggerRef:E,menuRef:D}=Fa({computeStyle:v,onScroll:"reposition",onResize:"reposition",ignoreOutsideClickSelector:".dropdown__menu"});o.useEffect(()=>{if(!B)return;const z=D.current;return(z?.querySelector(".date-picker__day--selected:not(:disabled)")??z?.querySelector(".date-picker__day--today:not(:disabled)")??z?.querySelector(".date-picker__day:not(:disabled)")??z?.querySelector(_n)??z)?.focus?.(),()=>{const ne=document.activeElement;(!ne||ne===document.body)&&E.current?.focus?.()}},[B,D,E]);const[N,F]=o.useState(1),R=o.useRef(null),K=o.useRef(null);o.useEffect(()=>{if(!B)return;const z=e&&e.slice(0,7)===`${x}-${String(f+1).padStart(2,"0")}`?+e.slice(8):b.slice(0,7)===`${x}-${String(f+1).padStart(2,"0")}`?+b.slice(8):1;F(z)},[B]),o.useEffect(()=>{if(K.current==null)return;const z=K.current;K.current=null,R.current?.querySelector(`[data-day="${z}"]`)?.focus()}),o.useEffect(()=>{F(z=>Math.min(z,fr(x,f)))},[x,f]);const L=o.useCallback(z=>{let ne=Ka(z.getFullYear(),z.getMonth(),z.getDate());r&&ne<r&&(ne=r),l&&ne>l&&(ne=l);const[H,U,pe]=ne.split("-").map(Number);(H!==x||U-1!==f)&&g(H,U-1),F(pe),K.current=pe},[r,l,x,f,g]),$=o.useCallback(z=>{const ne=new Date(x,f,N),H=pe=>{ne.setDate(ne.getDate()+pe),L(ne)},U=pe=>{const Ee=ne.getFullYear()*12+ne.getMonth()+pe,ge=Math.floor(Ee/12),me=Ee-ge*12;L(new Date(ge,me,Math.min(ne.getDate(),fr(ge,me))))};switch(z.key){case"ArrowLeft":H(-1);break;case"ArrowRight":H(1);break;case"ArrowUp":H(-7);break;case"ArrowDown":H(7);break;case"Home":H(-ne.getDay());break;case"End":H(6-ne.getDay());break;case"PageUp":z.shiftKey?U(-12):U(-1);break;case"PageDown":z.shiftKey?U(12):U(1);break;default:return}z.preventDefault()},[x,f,N,L]),T=o.useCallback(z=>{s||(t(Ka(x,f,z)),y(!1))},[x,f,t,y,s]);o.useEffect(()=>{s&&y(!1)},[s,y]);const J=z=>{const ne=Ka(x,f,z);return!!(r&&ne<r||l&&ne>l)},q=(()=>{const z=fr(x,f);if(N>=1&&N<=z&&!J(N))return N;for(let ne=1;ne<=z;ne++)if(!J(ne))return ne;return-1})(),O=[];for(let z=0;z<yv(x,f);z++)O.push(null);for(let z=1;z<=fr(x,f);z++)O.push(z);const Q=a===64?20:a===40?16:18,P=Ol(m.language),V=z=>new Intl.DateTimeFormat(P,{year:"numeric"}).format(new Date(z,0,1)),W=(z,ne)=>new Intl.DateTimeFormat(P,{month:"long"}).format(new Date(z,ne-1,1)),G=wv(x,+b.slice(0,4),V,r,l),S=wu(x,W,r,l),M=z=>{const ne=wu(z,W,r,l);if(ne.length===0)return;const H=ne.some(U=>+U.value===f+1);g(z,H?f:+ne[0].value-1)},[I,Z]=o.useState(null);o.useEffect(()=>{Z(null)},[e]);const le=o.useCallback(z=>{Z(z);const ne=xv(z);if(!ne||r&&ne<r||l&&ne>l)return;t(ne);const[H,U]=ne.split("-");g(+H,+U-1)},[r,l,t,g]),oe=o.useCallback(()=>{Z(null)},[]),de=o.useCallback(z=>{z.key==="Enter"?(z.preventDefault(),oe(),y(!1)):z.key==="Escape"?(oe(),y(!1)):z.key==="ArrowDown"&&!B&&(z.preventDefault(),y(!0))},[oe,y,B]),re=B?cn.createPortal(n.jsxs("div",{ref:D,id:k,className:"date-picker__dropdown",style:A,"data-tooltip-ignore":!0,role:"dialog","aria-label":d("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),tabIndex:-1,children:[n.jsxs("div",{className:"date-picker__nav",children:[n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:h,"aria-label":d("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(Ps,{size:16,strokeWidth:2})}),n.jsxs("div",{className:"date-picker__nav-ym",children:[n.jsx(fn,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectYear","\uC5F0 \uC120\uD0DD"),options:G,value:String(x),onChange:z=>M(+z),size:40}),n.jsx(fn,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectMonth","\uC6D4 \uC120\uD0DD"),options:S,value:String(f+1),onChange:z=>g(x,+z-1),size:40})]}),n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:_,"aria-label":d("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(Is,{size:16,strokeWidth:2})})]}),n.jsxs("div",{className:"date-picker__grid",ref:R,onKeyDown:$,children:[C.map(z=>n.jsx("div",{className:"date-picker__dow caption-1",children:z},z)),O.map((z,ne)=>{if(z===null)return n.jsx("div",{},`e${ne}`);const H=Ka(x,f,z),U=H===e,pe=H===b,Ee=J(z),ge=ne%7;return n.jsx("button",{type:"button",disabled:Ee,"data-day":z,tabIndex:z===q?0:-1,"aria-current":pe?"date":void 0,onClick:()=>!Ee&&T(z),className:we("date-picker__day caption-1",U&&"date-picker__day--selected",pe&&!U&&"date-picker__day--today",Ee&&"date-picker__day--disabled",ge===0&&"date-picker__day--sun",ge===6&&"date-picker__day--sat"),children:z},z)})]})]}),document.body):null;return n.jsxs("div",{className:we("date-picker",`date-picker--s${a}`,B&&"date-picker--open",u),children:[n.jsxs("div",{className:"date-picker__field",children:[n.jsx("input",{ref:E,type:"text",className:"date-picker__trigger body-2",value:I??vv(e),placeholder:p,onChange:z=>le(z.target.value),onClick:()=>!s&&!B&&w(),onKeyDown:de,onBlur:oe,disabled:s,"aria-haspopup":"dialog","aria-expanded":B,inputMode:"numeric",autoComplete:"off"}),n.jsx("button",{type:"button",className:"date-picker__icon-btn",onClick:()=>!s&&w(),disabled:s,tabIndex:-1,"aria-label":p,"aria-haspopup":"dialog","aria-expanded":B,children:n.jsx(Gs,{size:Q,className:"date-picker__icon",strokeWidth:1.5})})]}),re]})}function kv({items:e,className:t,ariaLabel:a="\uC54C\uB9BC \uAE00",titleLevel:r=4,targetBytes:l}){const s=r?`h${r}`:"div";return n.jsx("div",{className:`notify-text-preview${t?` ${t}`:""}`,role:"group","aria-label":a,children:e.map(i=>{const u=l===void 0?Sl(i.sms):Sl(i.sms,l),c=u.type==="LMS";return n.jsxs("section",{className:"notify-text-preview__item",children:[n.jsxs("header",{className:"notify-text-preview__head",children:[n.jsx(s,{className:"notify-text-preview__name h5b",children:i.name}),i.meta&&Object.keys(i.meta).length>0?n.jsx("dl",{className:"notify-text-preview__meta caption-1",children:Object.entries(i.meta).map(([d,m])=>n.jsxs("div",{className:"notify-text-preview__meta-row",children:[n.jsx("dt",{children:d}),n.jsx("dd",{children:m})]},d))}):null]}),n.jsxs("div",{className:"notify-text-preview__body",children:[n.jsxs("div",{className:"notify-text-preview__col",children:[n.jsxs("div",{className:"notify-text-preview__col-head caption-1",children:[n.jsx("span",{children:"\uBB38\uC790"}),n.jsxs("span",{className:`notify-text-preview__bytes${c?" is-over":u.overTarget?" is-over-target":""}`,title:u.over?`${u.limit}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uBCF4\uB0BC \uB54C \uC798\uB9B0\uB2E4`:c?`${El}\uBC14\uC774\uD2B8\uB97C \uB118\uC5B4 \uC7A5\uBB38\uC774\uB2E4 \u2014 \uD55C \uD1B5 \uAC12\uC774 \uB2E8\uBB38\uC758 \uB450 \uBC30 \uBC18\uC774\uB2E4`:u.overTarget?`\uACA8\uB204\uB294 ${u.target}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uD55C \uAE00\uC790\uB9CC \uB298\uC5B4\uB3C4 ${El}\uC744 \uB118\uC5B4 \uC7A5\uBB38\uC774 \uB41C\uB2E4`:void 0,children:[u.bytes,u.target!==null?` / \uBAA9\uD45C ${u.target}`:"","\uBC14\uC774\uD2B8 \xB7 ",c?"\uC7A5\uBB38":"\uB2E8\uBB38",u.over?" \xB7 \uD55C\uACC4 \uB118\uC74C":c?" \xB7 \uAC12\uC774 \uB450 \uBC30 \uBC18":u.overTarget?" \xB7 \uBAA9\uD45C \uB118\uC74C":""]})]}),n.jsx("pre",{className:"notify-text-preview__text",children:i.sms})]}),i.ata?n.jsxs("div",{className:"notify-text-preview__col",children:[n.jsx("div",{className:"notify-text-preview__col-head caption-1",children:n.jsx("span",{children:"\uC54C\uB9BC\uD1A1"})}),n.jsx("pre",{className:"notify-text-preview__text",children:i.ata})]}):null]})]},i.name)})})}function Av({src:e,alt:t,className:a,style:r,tone:l,textColor:s}){const i=!l&&!!s,u=Iy(e,i),c="bl"+o.useId().replace(/[^a-zA-Z0-9]/g,"");return l?n.jsx("span",{className:we("brand-logo","brand-logo--tone",a),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...r,"--brand-logo-src":`url("${e}")`,"--brand-logo-tone":l},children:n.jsx("img",{src:e,alt:"","aria-hidden":"true",className:"brand-logo__sizer",draggable:!1})}):i&&u?n.jsx("span",{className:we("brand-logo","brand-logo--inline",a),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...r,"--brand-logo-text-color":s},dangerouslySetInnerHTML:{__html:Ry($y(u),c)}}):n.jsx("img",{src:e,alt:t,className:we("brand-logo",a),style:r,draggable:!1})}function Bu({children:e,className:t}){const a=o.useRef(null),[r,l]=o.useState(null);return o.useEffect(()=>{l(a.current?.parentElement??null)},[]),o.useEffect(()=>{const s=a.current;if(!s||!r)return;const i=()=>{const c=typeof window<"u"&&window.getComputedStyle(s).position==="absolute"?Math.ceil(s.getBoundingClientRect().width):0;c>0?r.style.setProperty("--section-head-float-w",`${c}px`):r.style.removeProperty("--section-head-float-w")};if(i(),typeof ResizeObserver>"u")return()=>{r.style.removeProperty("--section-head-float-w")};const u=new ResizeObserver(()=>i());return u.observe(s),u.observe(r),()=>{u.disconnect(),r.style.removeProperty("--section-head-float-w")}},[r,e]),n.jsx("div",{ref:a,className:we("section-head-float",t),children:e})}function Io({items:e,className:t}){return n.jsx("div",{className:t?`manager-bar-chart-legend ${t}`:"manager-bar-chart-legend",children:e.map((a,r)=>n.jsxs("span",{className:"manager-bar-chart-legend-item",children:[n.jsx("span",{className:"manager-bar-chart-legend-dot",style:{background:a.color}}),a.label]},r))})}function Ya({label:e,children:t}){return e?n.jsxs("div",{className:"barchart-total barchart-total--stacked",children:[n.jsx("span",{className:"barchart-total__label body-3",children:e}),n.jsx("span",{className:"barchart-total__value",children:t})]}):n.jsx("div",{className:"barchart-total",children:t})}function Fo({title:e,titleClassName:t="h3",titleLevel:a=3,icon:r,disc:l,headRight:s,headFloat:i,headSegment:u,headMenuItems:c,collapseBelow:d=420,onClick:m,ariaLabel:p,tooltip:C,totalNum:b,totalUnit:x,totalLabel:f,subRow:h,subRowAlign:_="start",className:g,inGrid:k=!1,children:v}){const{t:B}=_e.useTranslation(),y=o.useRef(null),{anchorRect:w,openAt:A,close:E}=Pa(),D=o.useCallback(()=>{C&&y.current&&A(y.current)},[C,A]),[N,F]=o.useState(!1);Ro(()=>{const S=y.current;if(!S||!u)return;const M=Z=>F(Z>0&&Z<d);if(M(S.clientWidth),typeof ResizeObserver>"u")return;const I=new ResizeObserver(Z=>M(Z[0].contentRect.width));return I.observe(S),()=>I.disconnect()},[u,d]);const[R,K]=o.useState(null),L=o.useCallback(()=>K(null),[]),$=o.useCallback(S=>{const M=S.currentTarget.getBoundingClientRect();K(I=>I?null:{left:M.left,right:M.right,top:M.top,bottom:M.bottom,width:M.width,height:M.height,x:M.x,y:M.y})},[]),T=!!u&&N;o.useEffect(()=>{T||K(null)},[T]);const J=u?[...u.options.map(S=>({label:S.label,icon:S.icon,selected:S.key===u.value,disabled:S.disabled,onClick:()=>u.onChange(S.key),closeOnSelect:!0})),...(c??[]).map((S,M)=>M===0?{...S,separatorBefore:!0}:S)]:[],q=o.useCallback(S=>{if(!m)return;const M=S.target;M&&typeof M.closest=="function"&&M.closest('button, a, input, select, textarea, [role="radiogroup"]')||m()},[m]),O=o.useCallback(S=>{m&&S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),m())},[m]),Q=typeof s=="function"?s({collapsed:T}):s,P=b!=null||f?n.jsxs(Ya,{label:f,children:[b!=null&&n.jsx("span",{className:"barchart-total__num h0",children:b}),x&&n.jsx("span",{className:"barchart-total__unit h5",children:x})]}):null,V=Q||u?n.jsxs("div",{className:"manager-section__head-right",children:[u&&(T?n.jsx(fe,{htmlType:"button",size:32,type:"dot",icon:"ellipsis",ariaLabel:u.ariaLabel??B("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:u.ariaLabel??B("common.more","\uB354\uBCF4\uAE30"),"aria-haspopup":"menu","aria-expanded":!!R,onClick:$}):n.jsx(wn,{size:32,ariaLabel:u.ariaLabel,options:u.options.map(S=>({key:S.key,label:S.label,disabled:S.disabled})),value:u.value,onChange:u.onChange})),Q]}):null,W=o.useId(),G=a?`h${a}`:"div";return n.jsxs("section",{ref:y,className:["manager-section",k&&"manager-section--grid",m&&"manager-section--clickable",g].filter(Boolean).join(" "),onClick:m?q:void 0,onKeyDown:m?O:void 0,onPointerEnter:C?D:void 0,onPointerLeave:C?E:void 0,onFocus:C?D:void 0,onBlur:C?E:void 0,role:m?"button":void 0,tabIndex:m?0:void 0,"aria-label":m?p??(typeof e=="string"?e:void 0):void 0,"aria-labelledby":!m&&e!=null?W:void 0,children:[C&&w&&n.jsx(Dn,{anchorRect:{left:w.left,top:w.top+21,right:w.right,bottom:w.bottom,width:w.width,height:w.height},text:C}),i&&n.jsx(Bu,{children:i}),n.jsxs("div",{className:"manager-section__head",children:[n.jsxs("div",{className:"manager-section__title-row",children:[r&&n.jsx(tt,{icon:r,label:typeof e=="string"?e:void 0,className:"manager-section__icon"}),n.jsx(G,{id:W,className:["manager-section__title",t].filter(Boolean).join(" "),children:e})]}),V,l&&n.jsx("div",{className:"manager-section__disc body-3",children:l})]}),(P||h)&&n.jsxs("div",{className:["barchart-sub-row",_!=="start"&&`barchart-sub-row--${_}`].filter(Boolean).join(" "),children:[P,h]}),v,R&&n.jsx(vn,{anchorRect:R,onClose:L,ariaLabel:u?.ariaLabel??B("tooltip.menu","\uBA54\uB274"),children:n.jsx(Oa,{columns:[{items:J}],onClose:L,size:"small"})})]})}const Za=(e,t)=>`${e}-${String(t).padStart(2,"0")}`,Oo=e=>Za(e.getFullYear(),e.getMonth()+1);function ma(e){const t=/^(\d{4})-(\d{2})$/.exec(e);if(!t)return null;const a=Number(t[2]);return a>=1&&a<=12?{year:Number(t[1]),month1:a}:null}const zo=(e,t)=>`${e}#${t}`;function Bn(e,t){const a=new Date(e,t,1).getDay();return 1+(8-(a===0?7:a))%7}function Nv(){const e=la();let t=e.getFullYear(),a=e.getMonth(),r=e.getDate();if(r<Bn(t,a)){const i=new Date(t,a,0);t=i.getFullYear(),a=i.getMonth(),r=i.getDate()}const l=Math.floor((r-Bn(t,a))/7),s=Za(t,a+1);return{monthKey:s,value:zo(s,l)}}function Ev(e){const t=la(),a=Oo(t),r=(c,d)=>Za(c,d+1),l=new Map;l.set(a,[]);for(const c of e){if(isNaN(c.date.getTime()))continue;const d=r(c.date.getFullYear(),c.date.getMonth());l.has(d)||l.set(d,[]),l.get(d).push(c)}for(const[c,d]of[...l.entries()]){const m=ma(c);if(!m)continue;const p=m.year,C=m.month1-1,b=Bn(p,C);if(!(c===a&&t.getDate()<b)&&!d.some(h=>h.date.getDate()<b))continue;const x=new Date(p,C,0),f=r(x.getFullYear(),x.getMonth());l.has(f)||l.set(f,[])}const s=new Map;for(const[c,d]of l){const m=ma(c);if(!m)continue;const p=m.year,C=m.month1-1,b=new Date(p,C+1,0).getDate(),x=d.reduce((v,B)=>Math.max(v,B.parts?.length??0,B.partsB?.length??0),0),f=d.some(v=>v.partsB),h=new Array(b+1).fill(0),_=new Array(b+1).fill(0),g=Array.from({length:b+1},()=>new Array(x).fill(0)),k=Array.from({length:b+1},()=>new Array(x).fill(0));for(const v of d){const B=v.date.getDate();if(h[B]+=v.a,_[B]+=v.b,v.parts)for(let y=0;y<x;y++)g[B][y]+=v.parts[y]??0;if(v.partsB)for(let y=0;y<x;y++)k[B][y]+=v.partsB[y]??0}s.set(c,{year:p,month:C,daysInMonth:b,partsLen:x,hasPartsB:f,dayA:h,dayB:_,dayParts:g,dayPartsB:k})}const i=(c,d,m)=>new Date(c,d,m).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),u={};for(const[c,d]of s){const{year:m,month:p,daysInMonth:C,dayA:b,dayB:x,dayParts:f,dayPartsB:h}=d,_=m===t.getFullYear()&&p===t.getMonth(),g=t.getDate(),k=s.get(r(p===11?m+1:m,(p+1)%12)),v=d.partsLen,B=[];for(let w=1;w<=C;w++){const A=_&&w>g;B.push({label:String(w),...A&&b[w]===0&&x[w]===0?{future:!0}:{},a:A&&b[w]===0&&x[w]===0?-1:b[w],b:x[w],...v?{parts:f[w]}:{},...v&&d.hasPartsB?{partsB:h[w]}:{}})}const y=[];for(let w=Bn(m,p);w<=C;w+=7){const A=Math.max(0,w+6-C),E=A&&k?Math.max(v,k.partsLen):v,D=d.hasPartsB||!!(A&&k?.hasPartsB);let N=0,F=0;const R=new Array(E).fill(0),K=new Array(E).fill(0);for(let $=w;$<=Math.min(w+6,C);$++){N+=b[$],F+=x[$];for(let T=0;T<v;T++)R[T]+=f[$][T],K[T]+=h[$][T]}if(A&&k)for(let $=1;$<=A&&!i(k.year,k.month,$);$++){N+=k.dayA[$],F+=k.dayB[$];for(let T=0;T<k.partsLen;T++)R[T]+=k.dayParts[$][T],K[T]+=k.dayPartsB[$][T]}const L=A?`${(p+1)%12+1}/${A}`:`${w+6}`;y.push({label:`${y.length+1}\uC8FC`,sublabel:`[${w}\uC77C~${L}\uC77C]`,a:N,b:F,...E?{parts:R}:{},...E&&D?{partsB:K}:{}})}u[c]={weekly:y,daily:B}}return u}function ku(){const e=la(),t=e.getFullYear(),a=e.getMonth()+1,r=[];for(let l=2024;l<=t;l++){const s=l===t?a:12;for(let i=1;i<=s;i++)r.push({value:Za(l,i),year:l,month:i})}return r.reverse()}ku();function Dv(){return ku()}function Au(e,t){const a=e("calendar.weekOrdinal",{returnObjects:!0,defaultValue:[]}),r=Array.isArray(a)&&typeof a[t]=="string"?a[t]:null;return e("calendar.weekLabel",{ord:r??String(t+1)})}function Nu(e){const{t,i18n:a}=_e.useTranslation(),[r,l]=o.useState("week"),s=o.useMemo(()=>Dv().filter(E=>E.value in e),[e]),i=o.useMemo(()=>{const E=[];for(const D of s){const N=new Date(D.year,D.month,0).getDate(),F=Bn(D.year,D.month-1),R=Math.ceil((N-F+1)/7);for(let K=R-1;K>=0;K--)E.push({value:zo(D.value,K),monthKey:D.value,year:D.year,month:D.month,week:K})}return E},[s]),u=o.useCallback(E=>`${so(t,a.language,E.year,E.month)} ${Au(t,E.week)}`,[t]),c=o.useMemo(()=>s.map(E=>({value:E.value,label:so(t,a.language,E.year,E.month)})),[t,a.language,s]),d=o.useMemo(()=>i.map(E=>({value:E.value,label:u(E)})),[i,u]),m=o.useMemo(()=>Nv(),[e]),p=o.useMemo(()=>s.find(E=>E.value===m.monthKey)?.value??s[0]?.value??"",[s,m]),C=o.useMemo(()=>i.find(E=>E.value===m.value)?.value??i[0]?.value??"",[i,m]),[b,x]=o.useState(""),[f,h]=o.useState("");o.useEffect(()=>{s.find(E=>E.value===b)||x(p)},[s,b,p]),o.useEffect(()=>{i.find(E=>E.value===f)||h(C)},[i,f,C]);const _=r==="month"?c:d,g=r==="month"?b:f,k=r==="month"?x:h,v=o.useMemo(()=>{const E=t("calendar.dow",{returnObjects:!0});return Array.isArray(E)?E:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]},[t]),B=_.findIndex(E=>E.value===g),y=o.useCallback(()=>{const E=_.findIndex(D=>D.value===g);E<_.length-1&&k(_[E+1].value)},[_,g,k]),w=o.useCallback(()=>{const E=_.findIndex(D=>D.value===g);E>0&&k(_[E-1].value)},[_,g,k]),A=o.useMemo(()=>[{key:"week",label:t("manager.chart.periodWeek","\uC8FC")},{key:"month",label:t("manager.chart.periodMonth","\uC6D4")}],[t]);return{period:r,setPeriod:l,range:g,setRange:k,activeOptions:_,activeIdx:B,handlePrev:y,handleNext:w,periodOptions:A,monthRange:b,weekRange:f,weekRanges:i,DOW:v}}const kt=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function Mn(e,t=!0){return e.future===!0||t&&e.a===-1}function Sv({data:e,colorA:t,colorB:a,labelA:r,labelB:l,barWidth:s=10,barGap:i=1,height:u=140,maxOverride:c,tightMax:d,seriesColors:m,seriesLabels:p,rateLabels:C,grouped:b=!1,baseline:x,focusableBars:f=!1}){const h=!a,_=!!(m&&m.length>0),g=x,k=o.useMemo(()=>_?Math.max(0,...e.filter(O=>!Mn(O,g==null)).map(O=>b?Math.max(0,...(O.parts??[]).map(kt)):(O.parts??[]).reduce((Q,P)=>Q+Math.max(0,kt(P)),0))):Math.max(0,...e.filter(O=>!Mn(O,g==null)).flatMap(O=>h?[kt(O.a)]:[kt(O.a),kt(O.b)])),[e,h,_,b]),v=o.useMemo(()=>{if(g==null)return 0;const O=e.filter(Q=>!Mn(Q,g==null)).flatMap(Q=>_?(Q.parts??[]).map(kt):h?[kt(Q.a)]:[kt(Q.a),kt(Q.b)]);return Math.max(0,...O.map(Q=>Math.abs(Q-g)))},[e,g,_,h]),B=o.useMemo(()=>{const O=g!=null?v:k;return c??(d?O>0?O:10:Math.ceil(O/10)*10||10)},[k,v,g,c,d]),y=u,w=_?b?Math.max(1,m.length):1:h?1:2,A={"--bar-width":`${o.useMemo(()=>{const O=Math.max(1,e.length);return Math.max(2,Math.min(s,Math.round(120/(O*w)+6)))},[e.length,w,s])}px`},E={"--bar-group-gap":`${Math.max(0,i)}px`},D=o.useMemo(()=>{const O=Math.round(B/2);return g!=null?[g+B,...O!==B?[g+O]:[],g,...O!==B?[g-O]:[],g-B]:O!==B?[B,O,0]:[B,0]},[B,g]),N=O=>g!=null?1-(O-(g-B))/(2*B):1-O/B,[F,R]=o.useState(null),K=o.useCallback(()=>R(null),[]),L=o.useCallback((O,Q)=>{const P=[O.label,O.sublabel].filter(Boolean).join(" ");let V;if(_&&b&&O.rawPartsB)V=(p??[]).map((W,G)=>{const S=O.rawPartsB[G]??0;return{text:S>0?`${W}: ${Q[G]??0}% (${O.rawParts?.[G]??0}/${S})`:`${W}: -`,color:(m??[])[G]}});else if(_&&b)V=(p??[]).map((W,G)=>({text:`${W}: ${J(Q[G]??0)}`,color:(m??[])[G]}));else if(_){const W=(p??[]).map((S,M)=>({text:`${S}: ${Q[M]??0}`,color:(m??[])[M]})),G=W.filter((S,M)=>(Q[M]??0)>0);V=G.length?G:W}else C&&!h?V=[{text:`${r} ${kt(O.a)}%`,color:t},{text:`${l} ${kt(O.b)}%`,color:a}]:C&&O.rawB!==void 0?V=[{text:`${C.total} ${O.rawB}`},{text:`${C.done} ${O.rawA??0}`,color:t}]:h?V=[{text:`${r}: ${kt(O.a)}`,color:t}]:V=[{text:`${r}: ${kt(O.a)}`,color:t},{text:`${l}: ${kt(O.b)}`,color:a}];return{title:P,items:V}},[_,b,p,m,C,h,r,l,t,a,g]),$=o.useCallback((O,Q,P)=>{const V=O.getBoundingClientRect(),{title:W,items:G}=L(Q,P);R({rect:{left:V.left,top:V.top,right:V.right,bottom:V.bottom,width:V.width,height:V.height},title:W,items:G})},[L]),T=o.useCallback((O,Q)=>{const{title:P,items:V}=L(O,Q);return[P,...V.map(W=>W.text)].filter(Boolean).join(", ")},[L]),J=O=>g!=null&&O>g?`+${O}`:`${O}`,q=F!=null;return o.useEffect(()=>{if(!q)return;const O=()=>R(null),Q=P=>{const V=P.target;V&&typeof V.closest=="function"&&V.closest(".manager-bar-chart-col")||R(null)};return window.addEventListener("scroll",O,!0),document.addEventListener("pointerdown",Q,!0),()=>{window.removeEventListener("scroll",O,!0),document.removeEventListener("pointerdown",Q,!0)}},[q]),n.jsxs("div",{className:"manager-bar-chart-wrap",style:E,children:[n.jsx("div",{className:"manager-bar-chart-inner",children:n.jsx("div",{className:"manager-bar-chart-scroll",children:n.jsxs("div",{className:"manager-bar-chart-area",children:[n.jsxs("div",{className:"manager-bar-chart-plot",style:{height:y},children:[D.slice(0,-1).map((O,Q)=>n.jsx("div",{className:`manager-bar-chart-gridline${g!=null&&O===g?" manager-bar-chart-gridline--baseline":""}`,style:{top:N(O)*y},children:n.jsx("span",{className:"manager-bar-chart-gridline__label caption-1",children:O})},Q)),e.map((O,Q)=>{const P=Mn(O,g==null),V=y/2,W=I=>g!=null?Math.min(V,Math.abs(kt(I)-g)/B*V):Math.min(y,Math.max(0,kt(I)/B*y)),G=P?0:W(O.a),S=P?0:W(O.b),M=(O.parts??[]).map(kt);return n.jsx("div",{className:`manager-bar-chart-col${b&&_?" manager-bar-chart-col--group":""}`,style:{cursor:P?"default":"pointer"},tabIndex:f&&!P?0:void 0,role:f&&!P?"img":void 0,"aria-label":f&&!P?T(O,M):void 0,onMouseEnter:P?void 0:I=>$(I.currentTarget,O,M),onFocus:P||!f?void 0:I=>$(I.currentTarget,O,M),onBlur:f?K:void 0,onMouseLeave:K,children:!P&&(_&&b?(m??[]).map((I,Z)=>{const le=M[Z]??0;if(g==null)return n.jsx("div",{className:"manager-bar-chart-bar",style:{...A,height:W(le),background:I}},Z);const oe=kt(le)<g;return n.jsxs("div",{className:"manager-bar-chart-slot",style:A,children:[n.jsx("div",{className:"manager-bar-chart-slot__half manager-bar-chart-slot__half--up",children:!oe&&n.jsx("div",{className:"manager-bar-chart-bar manager-bar-chart-bar--full",style:{height:W(le),background:I}})}),n.jsx("div",{className:"manager-bar-chart-slot__half manager-bar-chart-slot__half--down",children:oe&&n.jsx("div",{className:"manager-bar-chart-bar manager-bar-chart-bar--full manager-bar-chart-bar--down",style:{height:W(le),background:I}})})]},Z)}):_?n.jsx("div",{className:"manager-bar-chart-stack",style:A,children:(()=>{const I=M.reduce((le,oe,de)=>oe>0?de:le,-1);let Z=y;return M.map((le,oe)=>{if(le<=0)return null;const de=Math.min(Z,le/B*y);return Z-=de,n.jsx("div",{className:"manager-bar-chart-stack-segment",style:{height:de,background:(m??[])[oe],borderRadius:oe===I?"6px 6px 0 0":void 0}},oe)})})()}):g!=null?n.jsx(n.Fragment,{children:[{v:kt(O.a),c:t},...h?[]:[{v:kt(O.b),c:a}]].map(({v:I,c:Z},le)=>n.jsxs("div",{className:"manager-bar-chart-slot",style:A,children:[n.jsx("div",{className:"manager-bar-chart-slot__half manager-bar-chart-slot__half--up",children:I>=g&&n.jsx("div",{className:"manager-bar-chart-bar manager-bar-chart-bar--full",style:{height:W(I),background:Z}})}),n.jsx("div",{className:"manager-bar-chart-slot__half manager-bar-chart-slot__half--down",children:I<g&&n.jsx("div",{className:"manager-bar-chart-bar manager-bar-chart-bar--full manager-bar-chart-bar--down",style:{height:W(I),background:Z}})})]},le))}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"manager-bar-chart-bar",style:{...A,height:G,background:t}}),!h&&n.jsx("div",{className:"manager-bar-chart-bar",style:{...A,height:S,background:a}})]}))},Q)})]}),n.jsx("div",{className:"manager-bar-chart-x-axis",children:e.map((O,Q)=>{const P=Mn(O,g==null);return n.jsxs("span",{className:`manager-bar-chart-x-axis__label${P?" manager-bar-chart-x-axis__label--future":""}`,children:[n.jsxs("span",{className:"caption-1 manager-bar-chart-x-axis__main",children:[O.isToday&&n.jsx("span",{className:"manager-bar-chart-x-axis__today-dot",style:{background:t}}),O.label]}),O.sublabel&&n.jsx("span",{className:"caption-1",children:O.sublabel})]},Q)})})]})})}),F&&n.jsx(Kn,{anchorRect:F.rect,title:F.title,items:F.items,showIndex:!1,closeOnOutsideClick:!1})]})}function Eu({control:e}){const{t}=_e.useTranslation(),{activeOptions:a,activeIdx:r,range:l,setRange:s,handlePrev:i,handleNext:u,periodOptions:c,period:d,setPeriod:m}=e,p=d==="week"?t("calendar.prevWeek","\uC774\uC804 \uC8FC"):t("calendar.prevMonth","\uC774\uC804 \uB2EC"),C=d==="week"?t("calendar.nextWeek","\uB2E4\uC74C \uC8FC"):t("calendar.nextMonth","\uB2E4\uC74C \uB2EC");return n.jsxs("div",{className:"manager-section-controls",children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",icon:"chevron-left",ariaLabel:p,showTooltipInfo:p,disabled:r===a.length-1,onClick:i}),n.jsx(fn,{value:l,onChange:s,options:a,size:40,className:"month-dropdown",ariaLabel:t("calendar.rangeSelect","\uAE30\uAC04 \uC120\uD0DD")}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",icon:"chevron-right",ariaLabel:C,showTooltipInfo:C,disabled:r<=0,onClick:u}),n.jsx(wn,{ariaLabel:t("calendar.periodSelect","\uAE30\uAC04 \uB2E8\uC704"),options:c,value:d,onChange:b=>m(b),size:40})]})}function Wo(e,t,a,r=!0){const l=new Date(a.getFullYear(),a.getMonth(),a.getDate());return Array.from({length:7},(s,i)=>{const u=new Date(t);u.setDate(t.getDate()+i);const c=(e[Oo(u)]?.daily??[])[u.getDate()-1],d=c!=null&&Mn(c,r)||u>l;return{dt:u,entry:c,isFuture:d}})}function jv(e,t,a,r=!0){const{period:l,monthRange:s,weekRange:i,weekRanges:u,DOW:c}=t,d=la(),m=d.getFullYear(),p=d.getMonth()+1,C=d.getDate();if(l==="month"){const f=e[s]??{weekly:[],daily:[]},h=ma(s),_=h?h.year:null,g=h?h.month1:null,k=_&&g?Bn(_,g-1):1;return f.weekly.map((v,B)=>{const y=B+1;let w=v.label,A=!1,E=!1;if(_&&g){const D=k+B*7,N=new Date(_,g-1,D+6),F=N.getMonth()+1,R=N.getDate(),K=F===g?`${R}`:`${F}/${R}`;w=a("manager.chart.weekRange",{start:D,end:K});const L=new Date(m,p-1,C).getTime();A=L>=new Date(_,g-1,D).getTime()&&L<=N.getTime(),E=_>m||_===m&&(g>p||g===p&&D>C)}return{...v,label:w,sublabel:Au(a,y-1),isToday:A,future:v.future===!0||E||void 0,a:E?-1:v.a,b:E?0:v.b}})}const b=u.find(f=>f.value===i);if(!b)return[];const x=new Date(b.year,b.month-1,Bn(b.year,b.month-1)+b.week*7);return Wo(e,x,d,r).map(({dt:f,entry:h,isFuture:_})=>{const g=f.getMonth()+1,k=f.getDate(),v=f.getFullYear();return{label:g===b.month&&v===b.year?`${k}`:`${g}/${k}`,sublabel:c[f.getDay()]??"",future:_||void 0,a:_?-1:h&&h.a>0?h.a:0,b:_?0:h&&h.b>0?h.b:0,isToday:v===m&&g===p&&k===C,...h?.parts?{parts:_?h.parts.map(()=>0):h.parts}:{},...h?.partsB?{partsB:_?h.partsB.map(()=>0):h.partsB}:{}}})}const Tv={small:{height:100,barWidth:16},medium:{height:140,barWidth:20},large:{height:180,barWidth:24}};function Mv({focusableBars:e,size:t="medium",barWidth:a,titleKey:r,titleLevel:l,data:s,colorA:i,colorB:u,labelAKey:c,labelBKey:d,showTotal:m=!1,totalUnitKey:p,totalLabelKey:C,control:b,hideControls:x=!1,rate:f=!1,rateAgg:h="dayMean",tightMax:_=!1,avgMode:g=!1,totalFormat:k,series:v,seriesMode:B="stack",loading:y=!1,onDetail:w,headExtra:A,headSegment:E,icon:D,disc:N,onClick:F,cardAriaLabel:R,cardTooltip:K,detailSize:L=32,barGap:$,baseline:T,className:J,inGrid:q=!1}){const{t:O}=_e.useTranslation(),Q=Tv[t],P=Nu(s),V=b??P,W=o.useMemo(()=>jv(s,V,O,T==null),[s,V,O,T]),G=B==="group"&&!!v&&v.length>0;$!=null&&!G&&Rt("bar-chart-bargap-without-group","[BarChart] barGap \uC740 seriesMode='group' + series \uC5D0\uC11C\uB9CC \uC4F0\uC778\uB2E4 \u2014 \uADF8 \uBC16\uC5D0\uC11C\uB294 \uC544\uBB34 \uC77C\uB3C4 \uD558\uC9C0 \uC54A\uB294\uB2E4.");const S=o.useMemo(()=>{if(!f)return W;const re=V.period==="month"?ma(V.monthRange):null,z=la(),ne=v?.length??0,H=U=>{const pe=[],Ee=[],ge=[];for(let me=0;me<ne;me++){let ie=0,be=0,he=0;for(const ue of U){const Me=kt(ue.a[me]),qe=kt(ue.b[me]);qe<=0||(ie+=Me,be+=qe,he+=Me/qe*100)}pe.push(h==="weighted"?be>0?Math.round(ie/be*100):0:U.length?Math.round(he/U.length):0),Ee.push(ie),ge.push(be)}return{pct:pe,ra:Ee,rb:ge}};return W.map((U,pe)=>{let Ee=U.a===-1?-1:U.b>0?Math.round(U.a/U.b*100):0;if(re&&!Mn(U)){const me=re.year,ie=re.month1-1,be=Wo(s,new Date(me,ie,Bn(me,ie)+pe*7),z).filter(he=>!he.isFuture);if(h==="weighted"){let he=0,ue=0;for(const{entry:Me}of be)Me&&Me.b>0&&(he+=Me.a,ue+=Me.b);Ee=ue>0?Math.round(he/ue*100):0}else Ee=be.length?Math.round(be.reduce((he,{entry:ue})=>he+(ue&&ue.b>0?ue.a/ue.b*100:0),0)/be.length):0}let ge=null;if(G&&!Mn(U)){let me;if(re){const be=re.year,he=re.month1-1;me=Wo(s,new Date(be,he,Bn(be,he)+pe*7),z).filter(ue=>!ue.isFuture).map(({entry:ue})=>({a:ue?.parts??[],b:ue?.partsB??[]}))}else me=[{a:U.parts??[],b:U.partsB??[]}];const ie=H(me);ge={parts:ie.pct,rawParts:ie.ra,rawPartsB:ie.rb}}return{...U,a:Ee,b:U.a===-1?0:d&&U.parts&&U.parts[1]>0?Math.round(U.parts[0]/U.parts[1]*100):0,rawA:U.a===-1?-1:U.a,rawB:U.b,...ge??{}}})},[W,f,h,d,V.period,V.monthRange,s,G,v?.length]),M=o.useMemo(()=>{if(f||g){const z=(V.period==="week"?W:s[V.monthRange]?.daily??[]).filter(H=>H.a!==-1);if(z.length===0)return 0;if(f&&h==="weighted"){let H=0,U=0;for(const pe of z)pe.b>0&&(H+=pe.a,U+=pe.b);return U>0?Math.round(H/U*100):0}const ne=f?z.reduce((H,U)=>H+(U.b>0?U.a/U.b*100:0),0):z.reduce((H,U)=>H+(U.a>0?U.a:0),0);return Math.round(ne/z.length)}const re=V.period==="month"?s[V.monthRange]?.daily??[]:S;return T!=null?re.reduce((z,ne)=>z+(Mn(ne,!1)?0:kt(ne.a)+(d?kt(ne.b):0)),0):re.reduce((z,ne)=>z+(ne.a>0?ne.a:0)+(d&&ne.b>0?ne.b:0),0)},[S,W,f,h,g,T,d,V.period,V.monthRange,s]),I=v&&v.length>0?v.map(re=>({color:re.color,label:re.label})):[{color:i,label:O(c)},...d?[{color:u,label:O(d)}]:[]],Z=t==="small",le=[Z?"manager-section--compact":t==="large"?"manager-section--full":void 0,J].filter(Boolean).join(" ")||void 0,oe=r?O(r):"",de=oe?O("trainingStatus.detailFor",{name:oe,defaultValue:"{{name}} \uC0C1\uC138\uBCF4\uAE30"}):O("trainingStatus.detail","\uC0C1\uC138\uBCF4\uAE30");return n.jsx(Fo,{className:le,inGrid:q,icon:D,disc:N,onClick:F,ariaLabel:R,tooltip:K,headSegment:E,headMenuItems:w?[{label:de,icon:"list",onClick:w,closeOnSelect:!0}]:void 0,title:O(r),titleLevel:l,titleClassName:Z?"h5 chart-section-title--small":void 0,headRight:Z?A??void 0:({collapsed:re})=>n.jsxs(n.Fragment,{children:[!x&&n.jsx(Eu,{control:V}),A,w&&!re&&n.jsx("span",{className:"manager-bar-chart-detail-btn",children:n.jsx(fe,{htmlType:"button",size:L,type:"dot",icon:"list",ariaLabel:de,showTooltipInfo:de,onClick:w})})]}),subRow:n.jsxs(n.Fragment,{children:[m?f||g||C&&k?n.jsx(Ya,{label:Z?void 0:`${O(V.period==="week"?"manager.chart.weeklyPrefix":"manager.chart.monthlyPrefix")} ${O(C??c)}`,children:k?(k(M).match(/([+-]?\d[\d.,]*|[^\d]+)/g)??[]).map((re,z)=>/\d/.test(re)?n.jsx("span",{className:"barchart-total__num h0",children:re},z):n.jsx("span",{className:"barchart-total__unit h5",children:re},z)):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"barchart-total__num h0",children:M}),p&&n.jsx("span",{className:"barchart-total__unit h5",children:O(p)})]})}):n.jsxs(Ya,{children:[n.jsx("span",{className:"barchart-total__num h0",children:M}),n.jsx("span",{className:"barchart-total__unit h5",children:O(c)}),p&&n.jsx("span",{className:"barchart-total__unit h5",children:O(p)})]}):n.jsx("span",{}),n.jsx(Io,{items:I,className:"caption-1"})]}),children:y?n.jsx("div",{className:"manager-bar-chart-wrap manager-bar-chart-loading","aria-busy":"true",children:n.jsx("div",{className:"manager-bar-chart-inner",children:n.jsxs("div",{className:"manager-bar-chart-area manager-bar-chart-area--loading",children:[n.jsx("div",{className:"manager-bar-chart-plot manager-bar-chart-plot--loading",style:{height:Q.height},children:n.jsx(Ga,{size:32})}),n.jsx("div",{className:"manager-bar-chart-x-axis","aria-hidden":"true",children:n.jsxs("span",{className:"manager-bar-chart-x-axis__label",children:[n.jsx("span",{className:"caption-1 manager-bar-chart-x-axis__main",children:"\xA0"}),S.some(re=>!!re.sublabel)&&n.jsx("span",{className:"caption-1",children:"\xA0"})]})})]})})}):n.jsx(Sv,{focusableBars:e,data:S,colorA:i,colorB:d?u:void 0,labelA:O(c),labelB:d?O(d):void 0,barWidth:a??Q.barWidth,barGap:$,baseline:T,height:Q.height,maxOverride:f?100:void 0,tightMax:_,seriesColors:v?.map(re=>re.color),seriesLabels:v?.map(re=>re.label),rateLabels:f?{total:O("trainingStatus.today.tooltipTotal","\uC804\uCCB4"),done:O("trainingStatus.today.tooltipDone","\uC644\uB8CC")}:void 0,grouped:G})})}const Du=120,Lv={left:38,right:16,top:26,bottom:24};function $v({points:e=[],range:t,ticks:a=[],axisTitle:r,color:l,height:s=156,fallbackWidth:i=320,insets:u,overlay:c,ariaLabel:d,className:m}){const[p,C]=o.useState(null),[b,x]=o.useState(null);o.useEffect(()=>{if(!b)return;const T=q=>C(Math.round(q)||null);if(T(b.getBoundingClientRect().width),typeof ResizeObserver>"u")return;const J=new ResizeObserver(([q])=>T(q.contentRect.width));return J.observe(b),()=>{J.disconnect()}},[b]);const{payload:f,anchorRect:h,openAfterDelay:_,close:g}=Sy(Du),k=o.useCallback((T,J)=>{T&&_(T,J.getBoundingClientRect())},[_]),v=p??i,B=s,{left:y,right:w,top:A,bottom:E}={...Lv,...u},[D,N]=t,F=T=>N===D?y:y+(v-y-w)*(T-D)/(N-D),R=T=>A+(B-A-E)*(100-T)/100,K={x:F,y:R,plot:{left:y,right:v-w,top:A,bottom:B-E,width:Math.max(0,v-y-w),height:Math.max(0,B-A-E)}},L=e.filter(T=>!T.hollow),$=l??"var(--color-main)";return n.jsxs(n.Fragment,{children:[n.jsxs("svg",{ref:x,className:we("line-chart",m),viewBox:`0 0 ${v} ${B}`,role:"img","aria-label":d??e.map(T=>T.description).filter(Boolean).join(", "),children:[r&&n.jsx("text",{className:"line-chart__axis-title",x:0,y:12,children:r}),[0,100].map(T=>n.jsxs("g",{children:[n.jsx("line",{className:"line-chart__grid",x1:y,x2:v-w,y1:R(T),y2:R(T)}),n.jsxs("text",{className:"line-chart__tick",x:y-6,y:R(T)+4,textAnchor:"end",children:[T,"%"]})]},T)),c?.(K),a.map(T=>n.jsx("text",{className:"line-chart__tick",x:F(T.x),y:B-5,textAnchor:"middle",children:T.label},T.x)),L.length>1&&n.jsx("polyline",{className:"line-chart__line",fill:"none",stroke:$,points:L.map(T=>`${F(T.x)},${R(T.pct)}`).join(" ")}),e.map(T=>n.jsxs("g",{className:"line-chart__dot",onPointerEnter:J=>k(T.description,J.currentTarget),onPointerLeave:g,children:[n.jsx("circle",{className:"line-chart__dot-hit",cx:F(T.x),cy:R(T.pct),r:12}),n.jsx("circle",{className:we("line-chart__dot-main",T.hollow&&"is-hollow"),cx:F(T.x),cy:R(T.pct),r:4,stroke:$,fill:T.hollow?void 0:$})]},T.x))]}),f!=null&&n.jsx(vn,{anchorRect:h,offset:10,closeOnOutsideClick:!1,className:"line-chart__tip",role:"tooltip",ariaLabel:f,children:f})]})}function Rv({icon:e,iconSize:t=56,title:a,titleClass:r="h2",description:l,tipGroups:s,start:i,className:u}){return n.jsxs("div",{className:we("game-intro",u),children:[e!=null&&n.jsx("span",{className:"game-intro__icon","aria-hidden":"true",style:{"--game-intro-icon":`${t}px`},children:e}),n.jsx("h2",{className:we("game-intro__title",r),children:a}),l!=null&&n.jsx("p",{className:"game-intro__description body-3",children:l}),s?.map((c,d)=>n.jsxs("div",{className:"game-intro__tips",children:[c.title!=null&&n.jsx("span",{className:"game-intro__tips-title body-3",children:c.title}),c.tips.map((m,p)=>n.jsxs("span",{className:"game-intro__tip body-3",children:[m.icon!=null&&n.jsx("span",{"aria-hidden":"true",children:m.icon}),n.jsx("span",{children:m.text})]},p))]},d)),i&&n.jsx(fe,{htmlType:"button",className:i.className,variant:"main",color:i.color,size:48,width:"100%",disabled:i.disabled,onClick:i.onClick,children:i.label})]})}const Su=(e,t,a)=>{const r=new Date(Date.UTC(e,t,a));return`${r.getUTCFullYear()}-${String(r.getUTCMonth()+1).padStart(2,"0")}-${String(r.getUTCDate()).padStart(2,"0")}`},ju=(e,t,a,r)=>({from:zl(e,t,a),to:new Date(zl(e,t,a+r).getTime()-1),fromYmd:Su(e,t,a),toYmd:Su(e,t,a+r-1)});function Pv(e,t=0){if(e.period==="month"){const l=ma(e.monthRange),s=la(),i=l?l.year:s.getFullYear(),u=(l?l.month1:s.getMonth()+1)-1+t,c=new Date(Date.UTC(i,u+1,0)).getUTCDate();return ju(i,u,1,c)}const a=e.weekRanges.find(l=>l.value===e.weekRange);if(!a){const l=new Date,s=La();return{from:l,to:l,fromYmd:s,toYmd:s}}const r=Bn(a.year,a.month-1);return ju(a.year,a.month-1,r+(a.week+t)*7,7)}const Ho={small:{diameter:96,strokeWidth:16},medium:{diameter:120,strokeWidth:18},large:{diameter:160,strokeWidth:22}};function Tu(e){return!Number.isFinite(e)||e<=0?0:e>=1?100:Math.min(99,Math.max(1,Math.round(e*100)))}function Mu({done:e,total:t,segments:a,color:r="var(--color-main)",size:l="medium",strokeWidth:s,label:i="%",hideCenter:u=!1,hideLabel:c=!1}){const d=typeof l=="number"?l:Ho[l].diameter,m=s??(typeof l=="number"?12:Ho[l].strokeWidth),p=d/2,C=(d-m)/2,b=2*Math.PI*C;if(a&&a.length>0){const _=a.reduce((g,k)=>{const v=g.length>0?g[g.length-1].acc:0,B=Number.isFinite(k.ratio)?k.ratio:0,y=Math.max(0,Math.min(B,1-v));return g.push({color:k.color,rotate:-90+v*360,dash:b*y,acc:v+y}),g},[]);return n.jsx("div",{className:"ring-chart",style:{width:d,height:d},children:n.jsxs("svg",{width:d,height:d,viewBox:`0 0 ${d} ${d}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:p,cy:p,r:C,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:m}),_.map((g,k)=>g.dash>0&&n.jsx("circle",{cx:p,cy:p,r:C,fill:"none",stroke:g.color,strokeWidth:m,strokeDasharray:`${g.dash} ${b}`,strokeLinecap:"round",transform:`rotate(${g.rotate} ${p} ${p})`},k))]})})}const x=(t??0)>0?Math.min((e??0)/t,1):0,f=b*x,h=b-f;return n.jsxs("div",{className:"ring-chart",style:{width:d,height:d},children:[n.jsxs("svg",{width:d,height:d,viewBox:`0 0 ${d} ${d}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:p,cy:p,r:C,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:m}),x>0&&n.jsx("circle",{cx:p,cy:p,r:C,fill:"none",stroke:r,strokeWidth:m,strokeDasharray:`${f} ${h}`,strokeLinecap:x<.02||x>.98?"butt":"round",transform:`rotate(-90 ${p} ${p})`})]}),!u&&n.jsxs("div",{className:`ring-chart__center${c?"":` ${d<=96?"ring-chart__center--small":l==="medium"?"ring-chart__center--medium":"ring-chart__center--large"}`}`,children:[n.jsx("span",{className:`ring-chart__pct ${d<=96?"h2":"h1"}`,children:Tu(x)}),!c&&n.jsx("span",{className:`ring-chart__label ${d<=96?"caption-2":"caption-1"}${d<=96||l==="medium"?" ring-chart__label--tight":""}`,children:i})]})]})}function Iv({titleKey:e,titleLevel:t,headRight:a,icon:r,showTotal:l,totalLabelKey:s,legend:i,loading:u,className:c,inGrid:d=!1,onClick:m,ariaLabel:p,tooltip:C,...b}){const{t:x}=_e.useTranslation();if(!e)return n.jsx(Mu,{...b});const f=(b.total??0)>0?Tu(Math.min((b.done??0)/b.total,1)):0,h=b.size==="small",_=typeof b.size=="number"?b.size:Ho[b.size??"medium"].diameter,g=b.size==="large",k=[c,h?"manager-section--compact":g?"manager-section--full":""].filter(Boolean).join(" ")||void 0,v=r&&n.jsx("span",{className:"chart-section-icon",children:n.jsx(tt,{icon:r,className:"chart-section-icon-inner"})});return n.jsx(Fo,{className:k,inGrid:d,onClick:m,ariaLabel:p,tooltip:C,title:x(e),titleLevel:t,titleClassName:h?"h5 chart-section-title--small":void 0,headRight:v||(h?void 0:a),subRow:(l||i)&&n.jsxs(n.Fragment,{children:[l?n.jsxs(Ya,{label:!h&&s?x(s):void 0,children:[n.jsx("span",{className:"barchart-total__num h0",children:f}),n.jsx("span",{className:"barchart-total__unit h5",children:"%"})]}):n.jsx("span",{}),i&&n.jsx(Io,{items:i})]}),children:u?n.jsx("div",{className:"ring-chart-section-body ring-chart-section-body--offset",children:n.jsx("div",{className:"ring-chart ring-chart--loading",style:{width:_,height:_},"aria-busy":"true",children:n.jsx(Ga,{size:32})})}):n.jsx("div",{className:"ring-chart-section-body ring-chart-section-body--offset",children:n.jsx(Mu,{...b,hideCenter:b.hideCenter??h})})})}function Fv({label:e,value:t,change:a,changeType:r,icon:l,tooltip:s,onClick:i,children:u}){const c=o.useRef(null),{anchorRect:d,openAt:m,close:p}=Pa(),C=o.useCallback(()=>{s&&c.current&&m(c.current)},[s,m]),b=r??(a===void 0?void 0:a>0?"up":a<0?"down":"neutral"),x=a===void 0?void 0:a>0?`+${a}`:`${a}`,f=o.useCallback(h=>{i&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),i())},[i]);return n.jsxs("div",{ref:c,className:`manager-stat-card${i?" manager-stat-card--clickable":""}`,onClick:i,onKeyDown:i?f:void 0,onPointerEnter:C,onPointerLeave:p,onFocus:C,onBlur:p,role:i?"button":void 0,tabIndex:i?0:void 0,"aria-label":i?[e,t,x].filter(h=>h!==void 0&&h!=="").join(" "):void 0,children:[s&&d&&n.jsx(Dn,{anchorRect:{left:d.left,top:d.top+21,right:d.right,bottom:d.bottom,width:d.width,height:d.height},text:s}),n.jsxs("div",{className:"manager-stat-card__label-row",children:[n.jsx("span",{className:"manager-stat-card__label h5",children:e}),l&&n.jsx("span",{className:"manager-stat-card__icon",children:n.jsx(tt,{icon:l,className:"manager-stat-card__icon-inner"})})]}),n.jsxs("div",{className:"manager-stat-card__content",children:[n.jsxs("div",{className:"manager-stat-card__left",children:[n.jsx("div",{className:"manager-stat-card__value h2",children:t}),x&&n.jsx("div",{className:`manager-stat-card__change manager-stat-card__change--${b??"neutral"} caption-1`,children:x})]}),u&&n.jsx("div",{className:"manager-stat-card__body",children:u})]})]})}function Lu({value:e,onChange:t,min:a=0,max:r=100,step:l=1,orientation:s="horizontal",size:i=24,disabled:u=!1,ariaLabel:c,length:d,className:m,label:p,formatValue:C,labelPos:b,labelAlign:x="right",showMinMax:f=!1,minLabel:h,maxLabel:_,showBgTick:g=!1,showFillTick:k=!1,tickStep:v,tickShape:B="dot"}){t&&!c&&Rt("Slider:unnamed","[ihab/Slider] \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 ariaLabel \uC744 \uC8FC\uC138\uC694. label prop \uC740 \uAC12 \uD45C\uAE30 \uBC29\uC2DD\uC774\uC9C0 \uC774\uB984\uC774 \uC544\uB2D9\uB2C8\uB2E4.");const y=Math.min(r,Math.max(a,e)),w=r>a?(y-a)/(r-a):0,A=s==="vertical",E=!t,D=W=>t?.(Number(W.target.value)),N=typeof d=="number"?`${d}px`:d,F={"--slider-ratio":String(w),"--slider-thumb":`${i}px`,...N?A?{height:N}:{width:N}:{}},R=v??l,K=(g||k)&&R>0&&r>a?Math.floor((r-a)/R+1e-6):0;if(K>0&&K<=100){const W=B!=="dash",G=le=>W?`radial-gradient(circle, ${le} 0.5px, transparent 1px)`:A?`linear-gradient(to bottom, transparent calc(50% - 2px), ${le} calc(50% - 2px), ${le} calc(50% + 2px), transparent calc(50% + 2px))`:`linear-gradient(to right, transparent calc(50% - 2px), ${le} calc(50% - 2px), ${le} calc(50% + 2px), transparent calc(50% + 2px))`,S=W?"2px":"4px",M=[],I=[],Z=[];for(let le=0;le<=K;le++){const oe=le*R/(r-a);if(oe>1+1e-6)break;const de=`${((A?1-oe:oe)*100).toFixed(4)}%`,re=oe<=w+1e-6;if(re?!k:!g)continue;const z=re?"var(--slider-tick-color-on-fill, var(--color-deepWhite))":"var(--slider-tick-color, var(--color-lightGray))";M.push(G(z)),I.push(A?`${S} var(--slider-thumb)`:`var(--slider-thumb) ${S}`),Z.push(A?`center ${de}`:`${de} center`)}M.push(A?"linear-gradient(to top, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))":"linear-gradient(to right, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))"),I.push("100% 100%"),Z.push("0 0"),F.backgroundImage=M.join(", "),F.backgroundSize=I.join(", "),F.backgroundPosition=Z.join(", "),F.backgroundRepeat="no-repeat"}const L=C?C(y):p==="percent"?`${Math.round(r>a?(y-a)/(r-a)*100:0)}%`:p==="count"?`${y} / ${r}`:y===a&&h?h:y===r&&_?_:void 0,$=n.jsx("input",{type:"range",className:we("slider",`slider--${s}`,E&&"slider--static",!p&&!f&&m),min:a,max:r,step:l,value:y,disabled:u,readOnly:E,tabIndex:E?-1:void 0,"aria-label":c,"aria-valuetext":L,"aria-orientation":s,onChange:D,style:F});if(!p&&!f)return $;const T=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:h??a}),J=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:_??r}),q=f?n.jsxs("div",{className:we("slider-track-group",`slider-track-group--${s}`,!p&&m),children:[A?J:T,$,A?T:J]}):$;if(!p)return q;const O=b??(A?"bottom":"right"),Q=`${Math.round(r>a?(y-a)/(r-a)*100:0)}%`,P=C?C(y):p==="percent"?Q:p==="count"?`${y} / ${r}`:String(y),V=n.jsx("span",{className:"slider-wrap__value body-3b",children:P});return n.jsxs("div",{className:we("slider-wrap",`slider-wrap--${s}`,`slider-wrap--label-${O}`,`slider-wrap--align-${x}`,m),children:[q,V]})}const Ov=.86,zv=250,Vo=(e,t,a,r)=>Math.round(Math.min(r,Math.max(a,e-t))),qo=(e,t,a,r)=>{const l=Vo(e,t,a,r);return`${l<0?"-":"+"}${Math.abs(l)} dB`};function Uo({analyser:e,audioElement:t,orientation:a="horizontal",length:r,label:l,labelPos:s,labelAlign:i="right",floorDb:u=-60,refDb:c=-35,displayMin:d=-5,displayMax:m=25,className:p,ariaLabel:C}){const b=o.useRef(null),x=o.useRef(null),f=o.useRef(null),h=o.useRef(null),[_,g]=o.useState(null);o.useEffect(()=>{const y=$=>{const T=qo($,c,d,m);f.current&&(f.current.textContent=T);const J=b.current;J&&(J.setAttribute("aria-valuenow",String(Vo($,c,d,m))),J.setAttribute("aria-valuetext",T))},w=e??PC(t)??(_&&_.el===t?_.node:null),A=x.current;if(!w||!A){A?.style.setProperty("--meter-level","0"),y(u);let $=!1;return!e&&t&&er(t).then(T=>{!$&&T&&g({el:t,node:T})}),()=>{$=!0}}to();const E=new Float32Array(w.fftSize);let D=0,N=0,F=0,R=0,K=null;const L=$=>{const T=IC(w,E);D=T>D?T:D*Ov;const J=D>1e-5?20*Math.log10(D):-1/0,q=Math.max(u,J),O=q-c,Q=Math.min(1,Math.max(0,(O-d)/(m-d)));if(A.style.setProperty("--meter-level",Q.toFixed(3)),N+=q,F+=1,$-R>=zv){const P=N/F;K=K==null?P:K*.6+P*.4,y(K),N=0,F=0,R=$}h.current=requestAnimationFrame(L)};return h.current=requestAnimationFrame(L),()=>{h.current!=null&&cancelAnimationFrame(h.current),h.current=null}},[e,t,_,u,c,d,m]);const k=typeof r=="number"?`${r}px`:r,v=n.jsx("div",{className:"audio-meter__track",style:k?a==="vertical"?{height:k}:{width:k}:{},children:n.jsx("div",{ref:x,className:"audio-meter__fill"})}),B=s??(a==="vertical"?"bottom":"right");return n.jsxs("div",{ref:b,className:we("audio-meter",`audio-meter--${a}`,l&&`audio-meter--label-${B}`,l&&`audio-meter--align-${i}`,p),role:"meter","aria-label":C,"aria-valuemin":d,"aria-valuemax":m,"aria-valuenow":Vo(u,c,d,m),"aria-valuetext":qo(u,c,d,m),children:[v,l&&n.jsx("span",{ref:f,className:"audio-meter__value caption-2",children:qo(u,c,d,m)})]})}const $u=260;function Ru({message:e,position:t,duration:a,onClose:r}){const[l,s]=o.useState(!1),[i,u]=o.useState(!1),c=o.useRef(i),d=o.useRef(l);o.useEffect(()=>{c.current=i},[i]),o.useEffect(()=>{d.current=l},[l]);const m=o.useRef(null),p=o.useRef(""),C=o.useRef(r);o.useEffect(()=>{C.current=r});const b=a,x=o.useRef(null),f=o.useRef(0),h=o.useRef(0),_=o.useRef(!1),g=o.useRef(null),k=o.useRef(null),v=o.useRef(null),B=o.useRef(null),y=o.useRef(()=>{});y.current=E=>{E<0||(f.current=Date.now(),h.current=E,x.current=setTimeout(()=>{x.current=null,s(!1),g.current=setTimeout(()=>{u(!1);try{C.current()}catch{}},$u)},E))};const w=o.useCallback(()=>{_.current||!x.current||(_.current=!0,clearTimeout(x.current),x.current=null,h.current=Math.max(0,h.current-(Date.now()-f.current)))},[]),A=o.useCallback(()=>{_.current&&(_.current=!1,y.current(h.current))},[]);return o.useEffect(()=>{if(e!==p.current&&(x.current&&(clearTimeout(x.current),x.current=null),g.current&&(clearTimeout(g.current),g.current=null)),e){if(d.current)return b>0&&!x.current&&(_.current?h.current=b:y.current(b)),p.current=e,()=>{x.current&&(clearTimeout(x.current),x.current=null),g.current&&(clearTimeout(g.current),g.current=null)};const E=()=>{const D=m.current;if(D)try{D.classList.remove("is-visible"),D.style.transition="none",t==="top"?D.style.transform="translateX(-50%) translateY(-16px)":D.style.transform="translateX(-50%) translateY(16px)",D.style.opacity="0",D.offsetWidth,D.style.transition="",D.classList.add("is-visible"),B.current&&clearTimeout(B.current),B.current=setTimeout(()=>{B.current=null;try{D.style.opacity="",D.style.transform="",D.style.transition=""}catch{}},60)}catch{}};c.current?(E(),s(!0)):(u(!0),k.current=requestAnimationFrame(()=>{v.current=requestAnimationFrame(()=>{E(),s(!0)})})),b>0&&(_.current=!1,y.current(b))}else s(!1),g.current=setTimeout(()=>u(!1),$u);return p.current=e,()=>{x.current&&clearTimeout(x.current),g.current&&clearTimeout(g.current),k.current&&cancelAnimationFrame(k.current),v.current&&cancelAnimationFrame(v.current),B.current&&clearTimeout(B.current),x.current=null,g.current=null,k.current=null,v.current=null,B.current=null}},[e,b,t]),{mounted:i,showing:l,popupRef:m,pause:w,resume:A}}function ha({message:e="",position:t="top",type:a="normal",onClose:r=()=>{},duration:l=2e3}){const{mounted:s,showing:i,popupRef:u,pause:c,resume:d}=Ru({message:e,position:t,duration:l,onClose:r}),m=o.useRef(null),[p,C]=o.useState(!1);if(o.useEffect(()=>{i?C(!0):s||C(!1)},[i,s]),!s)return null;const b=a==="notice"||a==="warning"?a:"normal",x=n.jsx("div",{ref:u,className:`toast toast--${t} ${i?"is-visible":""}`,role:"status","aria-live":"polite",onPointerEnter:f=>{m.current=f.pointerType},onMouseEnter:()=>{m.current!=="touch"&&c()},onMouseLeave:d,onFocusCapture:c,onBlurCapture:d,children:n.jsx("div",{className:`toast__inner toast__inner--${b} body-2`,"aria-hidden":p||i?void 0:!0,children:n.jsx("span",{className:"toast__text",children:e})})});return typeof document<"u"?cn.createPortal(x,document.body):x}const Wv=24;function Hv({value:e,max:t=100,size:a=8,color:r,trackColor:l,label:s,formatValue:i,labelPos:u,labelAlign:c="right",ariaLabel:d,className:m}){const p=Number.isFinite(t)&&t>0?t:1,C=Math.max(0,Math.min(Number.isFinite(e)?e:0,p)),b=C/p*100,x=Number.isFinite(t)&&t>0?t:0,f=u??(a>=Wv?"inside":"bottom"),h=f==="center"?"inside":f,_=h==="inside"&&(c==="left"?b>=15:c==="center"?b>=50:b>=85),g={};return r&&(g["--progress-bar-fill"]=r),l&&(g["--progress-bar-track"]=l),n.jsxs("div",{className:we("progress-bar",`progress-bar--${a}`,`progress-bar--label-${h}`,s&&`progress-bar--align-${c}`,s&&_&&"progress-bar--label-on-fill",m),style:g,children:[n.jsx("div",{className:"progress-bar__track",role:"progressbar","aria-valuenow":C,"aria-valuemin":0,"aria-valuemax":x,"aria-valuetext":s?i?i(C):s==="percent"?void 0:s==="raw"?String(C):`${C} / ${x}`:void 0,"aria-label":d,children:n.jsx("div",{className:"progress-bar__fill",style:{width:`${b}%`}})}),s&&n.jsx("span",{className:"progress-bar__label caption-1b",children:i?i(C):s==="percent"?`${Math.round(b)}%`:s==="raw"?String(C):`${C} / ${x}`})]})}const Pu={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},Vv="rgba(255, 255, 255, 0.16)";function Iu({max:e,index:t,inactiveBg:a,inactiveColor:r,transparent:l,variant:s="numbered",announce:i=!1,ariaLabel:u}){const{t:c}=_e.useTranslation(),d=Cn("(max-width: 767px)");if(!Number.isInteger(e)||e<=0)return null;const m=Number.isInteger(t)?Math.max(0,Math.min(t,e-1)):0,p=u??c("progress.steps",{current:m+1,total:e,defaultValue:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"}),C={};if(a&&(C["--pi-inactive-bg"]=a),r&&(C["--pi-inactive-color"]=r),l&&(a||(C["--pi-inactive-bg"]=Vv),r||(C["--pi-inactive-color"]="var(--color-white)")),s==="dot")return n.jsxs("div",{className:"progress-indicator progress-indicator--dot",style:C,role:i?"status":"img","aria-label":i?void 0:p,children:[i&&n.jsx("span",{style:Pu,children:p}),Array.from({length:e}).map((x,f)=>n.jsx("span",{"aria-hidden":"true",className:`progress-indicator-dot--dot${f<m?" done":f===m?" active":""}`},f))]});const b=i?n.jsx("span",{role:"status",style:Pu,children:p}):null;return d?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"progress-indicator progress-indicator--mobile",style:C,role:"list","aria-label":p,children:n.jsxs("span",{role:"listitem",className:"progress-indicator-dot active body-3",children:[m+1," / ",e]})}),b]}):n.jsxs(n.Fragment,{children:[b,n.jsx("div",{className:"progress-indicator",style:C,role:"list","aria-label":p,children:Array.from({length:e}).map((x,f)=>n.jsx("span",{role:"listitem","aria-current":f===m?"step":void 0,className:`progress-indicator-dot ${f<m?" done":f===m?" active":""} body-3`,children:f+1},f))})]})}function qv(e){if(!e)return[];const t=[];let a=0,r="";for(const l of e.trim()){if(l==="("?a++:l===")"&&a--,/\s/.test(l)&&a===0){r&&(t.push(r),r="");continue}r+=l}return r&&t.push(r),t}function Uv({children:e,className:t,style:a,rowLabel:r,onRowClick:l}){return n.jsx("div",{role:"cell",className:t?`table-cell ${t}`:"table-cell",style:a,children:r&&l?n.jsx("button",{type:"button",className:"table-cell__row-button","aria-label":r,children:e}):e})}function Go({variant:e="default",children:t,className:a,draggable:r,onClick:l,onMouseEnter:s,onMouseLeave:i,onDragStart:u,onDragEnd:c,expandedContent:d,colSpan:m,describedBy:p,rowHasButton:C}){const b=o.useCallback(x=>{l&&x.target===x.currentTarget&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),l())},[l]);return e==="loading"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--loading",children:n.jsx("div",{role:"cell","aria-colspan":m,className:"table-row__full-cell",children:n.jsx(Ga,{size:28})})})}):e==="empty"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--empty body-3",children:n.jsx("div",{role:"cell","aria-colspan":m,className:"table-row__full-cell",children:t})})}):n.jsxs("div",{role:"presentation",className:"table-row-wrap",children:[n.jsx("div",{className:a?`table-row ${a}`:"table-row",draggable:r,onClick:l,onKeyDown:l?b:void 0,onMouseEnter:s,onMouseLeave:i,onDragStart:u,onDragEnd:c,role:"row",tabIndex:l&&!C?0:void 0,"aria-describedby":l&&!C?p:void 0,children:t}),d&&n.jsx("div",{role:"row",className:"table-row-expand",children:n.jsx("div",{role:"cell","aria-colspan":m,className:"table-row-expand__cell",children:d})})]})}function Gv({dir:e}){return n.jsx(e==="asc"?Ys:Ks,{className:"table-field__sort-arrow",size:16,strokeWidth:2})}function Kv({children:e,onClick:t,className:a,sortDir:r,ariaSort:l,onResizeStart:s}){const i=n.jsxs(n.Fragment,{children:[e,r&&n.jsx(Gv,{dir:r})]});return n.jsxs("div",{onClick:t,role:"columnheader","aria-sort":l,className:we("table-field body-3",a,r?"table-field--sorted":"",s?"table-field--resizable":""),children:[t?n.jsx("button",{type:"button",className:"table-field__button",children:i}):i,s&&n.jsx("span",{className:"table-field__resizer",onPointerDown:s,onClick:u=>u.stopPropagation(),"aria-hidden":"true"})]})}function Fu(e){return e&&e!=="left"?`table-col--${e}`:void 0}function Ko({fields:e=[],sort:t,sortable:a=!0,headerGroups:r,items:l=[],renderRow:s,onRowClick:i,isRowClickable:u,onRowMouseEnter:c,onRowMouseLeave:d,onRowDragStart:m,onRowDragEnd:p,draggingId:C,gridTemplateColumns:b,mobileGridTemplateColumns:x,resizable:f=!0,resizeMode:h="grow",resizeStorageKey:_,size:g="small",title:k,icon:v,count:B,collapsed:y=!1,onToggleCollapse:w,headerActions:A,empty:E,loading:D,dragOver:N=!1,onDragOver:F,onDragLeave:R,onDrop:K,renderExpandedRow:L,expandedId:$}){const{t:T}=_e.useTranslation(),J=o.useId(),q=`table-title-${J}`,O=`table-row-hint-${J}`,[Q,P]=o.useState(null),V=o.useCallback((ae,ve)=>{const ze=e[ve];if(!ze)return;if(ze.sortValue)return ze.sortValue(ae);if(ze.sortKey)return ae[ze.sortKey];const Qe=s(ae)[ve]?.content;return typeof Qe=="string"||typeof Qe=="number"?Qe:void 0},[e,s]),W=!t&&a&&!e.some(ae=>ae.sortDir!==void 0||ae.onClick),G=o.useCallback(ae=>{const ve=e[ae];if(!ve||ve.sortable===!1)return!1;if(ve.sortValue||ve.sortKey)return!0;const ze=l[0];return ze!==void 0&&V(ze,ae)!==void 0},[e,l,V]),S=o.useMemo(()=>t?e.map(ae=>{if(!ae.sortKey||ae.sortDir!==void 0)return ae;const ve=t.field(String(ae.label??""),ae.sortKey);return{...ae,sortDir:ve.sortDir,onClick:ae.onClick??ve.onClick}}):W?e.map((ae,ve)=>G(ve)?{...ae,sortDir:Q?.index===ve?Q.asc?"asc":"desc":null,onClick:()=>P(ze=>ze?.index===ve?{index:ve,asc:!ze.asc}:{index:ve,asc:!0})}:ae):e,[e,t,W,Q,G]),M=o.useMemo(()=>{if(!W||!Q)return l;const{index:ae,asc:ve}=Q;return[...l].sort((ze,Qe)=>ur(V(ze,ae),V(Qe,ae),ve))},[l,W,Q,V]),I=Cn("(max-width: 767px)"),Z=x&&I?x:null,le=f&&!I,oe=o.useRef(le);oe.current=le;const de=48,re=40,z=o.useRef(()=>de),ne=_?`table-cols:${_}`:null,H=o.useRef(null),U=o.useRef(null),pe=o.useRef(null),Ee=o.useRef(null),[ge,me]=o.useState(!1),[ie,be]=o.useState(0),he=o.useCallback(()=>{const ae=pe.current;if(!ae)return;const ve=Ee.current,ze=H.current;if(ve&&(ve.style.minWidth="",ze)){const Qe=ze.scrollWidth,ht=oe.current?re:0;ve.style.minWidth=Qe>ae.clientWidth+1?`${Qe+ht}px`:""}me(ae.scrollWidth>ae.clientWidth+1),be(ae.clientWidth)},[]),ue=o.useCallback((ae,ve)=>{const ze=ae.current;ze&&U.current&&U.current.unobserve(ze),ae.current=ve,ve?(!U.current&&typeof ResizeObserver<"u"&&(U.current=new ResizeObserver(()=>he())),U.current?.observe(ve)):!pe.current&&!Ee.current&&(U.current?.disconnect(),U.current=null),he()},[he]),Me=o.useCallback(ae=>ue(pe,ae),[ue]),qe=o.useCallback(ae=>ue(Ee,ae),[ue]);o.useEffect(()=>{he()}),o.useEffect(()=>{if(typeof window>"u")return;const ae=typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>he()):null;return window.addEventListener("resize",he),()=>{ae!=null&&cancelAnimationFrame(ae),window.removeEventListener("resize",he)}},[he]);const je=o.useRef(()=>!1),Ve=o.useRef([]),Oe=o.useRef(null),dt=ae=>{if(!ae||typeof window>"u")return null;try{const ve=JSON.parse(window.localStorage.getItem(ae)??"null");return Array.isArray(ve)&&ve.length>0&&ve.every(ze=>typeof ze=="number"&&Number.isFinite(ze)&&ze>0)?ve:null}catch{return null}},[rt,nt]=o.useState(()=>dt(ne)),[pt,Ne]=o.useState(ne),[Ue,ke]=o.useState(()=>dt(ne)!==null);if(pt!==ne){Ne(ne);const ae=dt(ne);nt(ae),ke(ae!==null)}const He=o.useRef(rt);o.useEffect(()=>{He.current=rt},[rt]);const Be=o.useCallback(ae=>{const ve=Oe.current;if(!ve)return;const ze=He.current;if(ze){const Qe=[...ze],ht=()=>de;if(ve.next!=null&&ve.startWNext!=null){const it=ae.clientX-ve.startX,It=Math.max(ht()-ve.startW,Math.min(ve.startWNext-ht(),it));Qe[ve.index]=ve.startW+It,Qe[ve.next]=ve.startWNext-It}else Qe[ve.index]=Math.max(ht(),ve.startW+(ae.clientX-ve.startX));He.current=Qe,nt(Qe)}},[]),Se=o.useCallback(()=>{if(Oe.current=null,window.removeEventListener("pointermove",Be),window.removeEventListener("pointerup",Se),window.removeEventListener("pointercancel",Se),document.body.style.cursor="",document.body.style.userSelect="",ne&&He.current)try{window.localStorage.setItem(ne,JSON.stringify(He.current))}catch{}},[Be,ne]),Le=o.useCallback((ae,ve)=>{ve.preventDefault(),ve.stopPropagation();const ze=H.current;if(!ze)return;const Qe=Array.from(ze.children).map(it=>it.getBoundingClientRect().width),ht=h==="fit"?S.findIndex((it,It)=>It>ae&&it.resizable!==!1):-1;Oe.current=ht>=0?{index:ae,startX:ve.clientX,startW:Qe[ae],next:ht,startWNext:Qe[ht]}:{index:ae,startX:ve.clientX,startW:Qe[ae]},He.current=Qe,nt(Qe),ke(!0),window.addEventListener("pointermove",Be),window.addEventListener("pointerup",Se),window.addEventListener("pointercancel",Se),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[Be,Se,h,S]),Ze=o.useCallback(()=>{const ae=H.current,ve=ae?.closest(".table-wrap");if(!ae||!ve)return null;const ze=ve.style.getPropertyValue("--table-grid-cols");ve.style.setProperty("--table-grid-cols",S.map((Bt,ut)=>je.current(ut)?Ve.current[ut]:"max-content").join(" "));const Qe=Array.from(ve.querySelectorAll(".table-row")).filter(Bt=>!Bt.classList.contains("table-row--loading")&&!Bt.classList.contains("table-row--empty")),ht=S.map((Bt,ut)=>{let Ct=ae.children[ut]?.getBoundingClientRect().width??0;for(const Yt of Qe){const gn=Yt.children[ut];gn&&(Ct=Math.max(Ct,gn.getBoundingClientRect().width))}const Tt=je.current(ut)?parseFloat(Ve.current[ut]):NaN;return Number.isFinite(Tt)?Tt:Math.max(z.current(ut),Math.ceil(Ct))}),it=window.getComputedStyle(ae),It=ae.clientWidth-(parseFloat(it.paddingLeft)||0)-(parseFloat(it.paddingRight)||0);ze?ve.style.setProperty("--table-grid-cols",ze):ve.style.removeProperty("--table-grid-cols");let Gt=ht;const An=ht.reduce((Bt,ut,Ct)=>Bt+(je.current(Ct)?ut:0),0),Wt=ht.reduce((Bt,ut,Ct)=>Bt+(je.current(Ct)?0:ut),0),Kt=It-An;if(It>0&&Wt>0&&Kt>0){const Bt=Kt/Wt;Gt=ht.map((Ct,Tt)=>je.current(Tt)?Ct:Math.max(z.current(Tt),Math.round(Ct*Bt)));const ut=Math.round(Kt-Gt.reduce((Ct,Tt,Yt)=>Ct+(je.current(Yt)?0:Tt),0));if(ut!==0){let Ct=-1;Gt.forEach((Tt,Yt)=>{!je.current(Yt)&&(Ct<0||Tt>Gt[Ct])&&(Ct=Yt)}),Ct>=0&&(Gt[Ct]=Math.max(z.current(Ct),Gt[Ct]+ut))}}return Gt},[S,h]),xt=(ae,ve)=>ae!==null&&ae.length===ve.length&&ae.every((ze,Qe)=>ze===ve[Qe]),et=o.useRef(Ze);o.useEffect(()=>{et.current=Ze});const[Xe,At]=o.useState(0),gt=M.length>0,_t=`${ne??""}|${Xe}|${S.length}|${ie}`,Nt=!Ue&&le&&ne!==null&&!D?`${_t}|${gt?1:0}`:null,mt=o.useRef(null);o.useEffect(()=>{if(Nt===null||!gt||mt.current===_t)return;const ae=et.current();ae&&(mt.current=_t,nt(ve=>xt(ve,ae)?ve:ae))},[Nt]);const st=o.useCallback(()=>{if(ne)try{window.localStorage.removeItem(ne)}catch{}ke(!1);const ae=et.current();nt(ae),He.current=ae,At(ve=>ve+1)},[ne]);o.useEffect(()=>()=>{Oe.current&&(window.removeEventListener("pointermove",Be),window.removeEventListener("pointerup",Se),window.removeEventListener("pointercancel",Se),document.body.style.cursor="",document.body.style.userSelect="")},[Be,Se]);const Pe=S.length>0&&S.every(ae=>ae.width!=null)?S.map(ae=>typeof ae.width=="number"?`${ae.width}px`:String(ae.width)).join(" "):null;S.some(ae=>ae.width!=null)&&!Pe&&Rt(`table-field-width:${S.map(ae=>ae.width==null?"-":"w").join("")}`,"[ihabdevteam-core] Table \uC758 fields \uC911 \uC77C\uBD80\uC5D0\uB9CC width \uAC00 \uC788\uC2B5\uB2C8\uB2E4. **\uBAA8\uB4E0 \uC5F4\uC5D0 \uC801\uC5B4\uC57C** \uC4F0\uC785\uB2C8\uB2E4 \u2014 \uC9C0\uAE08\uC740 gridTemplateColumns \uB97C \uC501\uB2C8\uB2E4. \uD55C \uC5F4\uB9CC \uACE0\uC815\uD558\uACE0 \uC2F6\uC73C\uBA74 \uB098\uBA38\uC9C0\uC5D0 `minmax(0, 1fr)` \uCC98\uB7FC \uC801\uC5B4 \uC8FC\uC138\uC694."),Pe&&b&&Rt("table-field-width-conflict","[ihabdevteam-core] Table \uC5D0 fields[].width \uC640 gridTemplateColumns \uAC00 \uB458 \uB2E4 \uC788\uC2B5\uB2C8\uB2E4. gridTemplateColumns \uAC00 \uC774\uAE41\uB2C8\uB2E4 \u2014 \uD55C\uCABD\uB9CC \uB450\uC138\uC694.");const bt=b??Pe??void 0,wt=qv(bt),lt=wt.filter(ae=>/\b(auto|min-content|max-content)\b|fit-content\(/.test(ae));lt.length>0&&Rt(`table-content-track:${b}`,`[ihabdevteam-core] Table \uC758 gridTemplateColumns \uC5D0 \uB0B4\uC6A9\uC73C\uB85C \uD06C\uAE30\uAC00 \uC815\uD574\uC9C0\uB294 \uD2B8\uB799(${lt.join(", ")})\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uBA38\uB9AC\uC640 \uBAB8\uD1B5\uC740 \uC11C\uB85C \uB2E4\uB978 \uACA9\uC790\uB77C \uADF8 \uD2B8\uB799\uC774 \uAC01\uC790 \uB2E4\uB974\uAC8C \uD480\uB824 \uC5F4\uC774 \uC5B4\uAE0B\uB0A9\uB2C8\uB2E4. px \uC774\uB098 fr \uC744 \uC4F0\uC138\uC694. (\uBC1B\uC740 \uAC12: ${b})`);const jt=S.findIndex(ae=>!!ae.sortDir);S.filter(ae=>!!ae.sortDir).length>1&&Rt("table-multi-sort","[ihabdevteam-core] Table \uC758 fields \uC5D0 sortDir \uC774 \uB458 \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4. aria-sort \uB294 \uD45C \uD558\uB098\uC5D0 \uD55C \uCE78\uB9CC \uAC00\uC9C8 \uC218 \uC788\uC5B4 \uCCAB \uCE78\uB9CC \uBC29\uD5A5\uC73C\uB85C \uC54C\uB9AC\uACE0 \uB098\uBA38\uC9C0\uB294 none \uC73C\uB85C \uB461\uB2C8\uB2E4.");const Ge=ae=>ae===jt?S[ae].sortDir==="asc"?"ascending":"descending":S[ae].onClick?"none":void 0,yt=ae=>/^\d+(\.\d+)?px$/.test(wt[ae]??""),$t=ae=>{const ve=wt[ae]??"",ze=/^minmax\(\s*(\d+(?:\.\d+)?)px\s*,/.exec(ve)??/^(\d+(?:\.\d+)?)px$/.exec(ve);return ze?parseFloat(ze[1]):de};je.current=yt,z.current=$t,Ve.current=wt;const Re=ae=>h==="fit"&&!yt(ae)?"fr":"px",ot=rt&&rt.length===S.length&&!I,Et=Z??(ot?S.map((ae,ve)=>ae.resizable===!1&&wt[ve]?wt[ve]:`${rt[ve]}${Re(ve)}`).join(" "):bt),Je=Et?{"--table-grid-cols":Et}:void 0,Dt=k!==void 0;return n.jsxs("div",{ref:Me,className:`table-wrap table-wrap--${g}${le?" table-wrap--resizable":""}${N?" table-wrap--dragover":""}${y?" table-wrap--collapsed":""}`,style:Je,onDragOver:F,onDragLeave:R,onDrop:K,tabIndex:ge?0:void 0,role:ge?"region":void 0,"aria-label":ge?typeof k=="string"?k:T("table.scrollRegion","\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C"):void 0,children:[!!i&&n.jsx("span",{id:O,className:"table-row-hint",children:T("table.rowActionHint","\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4")}),n.jsxs("div",{ref:qe,role:"table","aria-labelledby":Dt&&typeof k=="string"?q:void 0,className:"table body-2",children:[Dt&&n.jsxs("div",{className:we("table-header",w&&"table-header--clickable"),onClick:w,role:"caption",children:[w&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:y?"chevron-right":"chevron-down",ariaLabel:y?T("common.expand","\uD3BC\uCE58\uAE30"):T("common.collapse","\uC811\uAE30"),ariaExpanded:!y,className:"table-header__chevron"}),v&&n.jsx(tt,{icon:v,label:typeof k=="string"?k:void 0,className:"table-header__icon"}),n.jsx("span",{id:q,className:"table-header__title h5b",children:k}),B!==void 0&&n.jsx("span",{className:"table-header__count body-3b",children:B}),A&&n.jsx("span",{className:"table-header__actions",onClick:ae=>ae.stopPropagation(),children:A})]}),!y&&n.jsxs(n.Fragment,{children:[r&&r.length>0&&n.jsx("div",{role:"row",className:"table-fields table-fields--groups",children:r.map((ae,ve)=>n.jsx("div",{role:"columnheader","aria-colspan":ae.span,className:we("table-field body-3",ae.className),style:{gridColumn:`span ${ae.span}`},children:ae.label},ve))}),n.jsxs("div",{role:"presentation",className:we("table-fields-strip",le&&"table-fields-strip--resizable"),children:[n.jsx("div",{role:"row",className:"table-fields",ref:H,children:S.map((ae,ve)=>n.jsx(Kv,{onClick:ae.onClick,className:we(ae.className,Fu(ae.align)),sortDir:ae.sortDir,ariaSort:Ge(ve),onResizeStart:le&&ve<S.length-1&&ae.resizable!==!1&&(h!=="fit"||S.some((ze,Qe)=>Qe>ve&&ze.resizable!==!1))?ze=>Le(ve,ze):void 0,children:ae.label},ve))}),le&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"chevrons-left-right-ellipsis",ariaLabel:T("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),showTooltipInfo:T("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),className:"table-fields__reset",onClick:st})]}),n.jsx("div",{role:"rowgroup",className:"table-body",children:D?n.jsx(Go,{variant:"loading",colSpan:S.length||void 0}):M.length===0&&E?n.jsx(Go,{variant:"empty",colSpan:S.length||void 0,children:E}):M.map((ae,ve)=>{const ze=C!=null&&ae.id===C,Qe=!!i&&(u?u(ae):!0),ht=$!=null&&ae.id!=null&&($ instanceof Set?$.has(ae.id)||[...$].some(it=>String(it)===String(ae.id)):String(ae.id)===String($));return n.jsx(Go,{className:`${Qe?" table-row--clickable":""}${m?" table-row--draggable":""}${ze?" table-row--dragging":""}`.trim(),draggable:!!m,onClick:Qe?()=>i(ae):void 0,colSpan:S.length||void 0,rowHasButton:s(ae).some(it=>!!it.rowLabel),describedBy:O,onMouseEnter:c?it=>c(ae,it):void 0,onMouseLeave:d?it=>d(ae,it):void 0,onDragStart:m?it=>m(ae,it):void 0,onDragEnd:p?it=>p(ae,it):void 0,expandedContent:ht&&L?L(ae):void 0,children:s(ae).map((it,It)=>n.jsx(Uv,{className:we(it.className,Fu(S[It]?.align)),style:it.style,rowLabel:Qe?it.rowLabel:void 0,onRowClick:Qe?()=>i(ae):void 0,children:it.content},It))},ae.id!=null?`${typeof ae.id}:${ae.id}`:`__idx:${ve}`)})})]})]})]})}const Yv={hearingAid:"hearingAid",cochlearImplant:"cochlearImplant",other:"other",\uBCF4\uCCAD\uAE30:"hearingAid",\uC778\uACF5\uC640\uC6B0:"cochlearImplant",\uAE30\uD0C0:"other"};function Ou(e){return e?Yv[e]??null:null}function zu(e){switch(Ou(e)){case"hearingAid":return"main";case"cochlearImplant":return"sub";default:return"default"}}function Wu(e,t){const a=Ou(e);return a?t(`device.type.${a}`,{defaultValue:e??""}):e??""}const Ca=e=>e==null?"":String(e).trim();function Yo(e,t,a,r){const l=Ca(e),s=Ca(t),i=Ca(a);if(r&&l&&s&&i){const c=`${l.padStart(4,"0")}-${s.padStart(2,"0")}-${i.padStart(2,"0")}`,d=new Date(c);if(!Number.isNaN(d.getTime())&&d.toISOString().slice(0,10)===c){const m=Fl(c,r);if(m)return m}}const u=[l,s,i];for(;u.length>0&&u[u.length-1]==="";)u.pop();return u.join(".")}function Zv(e,t,a){const r=Ca(e);return r?`${r}-${Ca(t).padStart(2,"0")}-${Ca(a).padStart(2,"0")}`:""}function Hu(e,t){return t!=="wornAt"?String(e[t]??""):Zv(e.wornYear,e.wornMonth,e.wornDay)}function Xv({rows:e,loading:t,onSelect:a,onDelete:r,onWear:l,onRelease:s,onAdd:i}){const{t:u,i18n:c}=_e.useTranslation(),d=h=>h==="left"?u("device.direction.left","\uC88C"):u("device.direction.right","\uC6B0"),{sort:m,field:p}=xy(),C=o.useMemo(()=>{if(!m)return e;const{key:h,asc:_}=m;return[...e].sort((g,k)=>{if(h==="worn"){const v=Number(k.worn)-Number(g.worn);return _?v:-v}return ur(Hu(g,h),Hu(k,h),_)})},[e,m]),{pageRows:b,pageSizeProps:x,paginationProps:f}=vy(C,m);return n.jsxs("div",{className:"dlp-side-table",children:[n.jsx(Po,{count:{value:e.length,unit:u("customers.device.unit","\uAC1C")},pageSize:x,pagination:f,actions:i&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",variant:"main",icon:"plus",label:u("customers.device.addButton","\uAE30\uAE30 \uCD94\uAC00"),onClick:i})}),n.jsx(Ko,{loading:t,resizable:!0,resizeMode:"fit",resizeStorageKey:"customer-device-history-v2",fields:[{...p(u("customers.device.wearingNow","\uCC29\uC6A9"),"worn"),resizable:!1},p(u("device.direction.label","\uBC29\uD5A5"),"side"),p(u("device.deviceType","\uC885\uB958"),"device"),p(u("device.brand","\uBE0C\uB79C\uB4DC"),"brand"),p(u("device.fitType","\uCC29\uC6A9\uD615\uD0DC"),"fitType"),p(u("device.productName","\uC81C\uD488\uBA85"),"productName"),p(u("device.wornDate","\uCC29\uC6A9\uC77C"),"wornAt"),...r?[{label:"",resizable:!1}]:[]],items:b.map((h,_)=>({id:h.id??`${h.side}-${_}`,row:h})),gridTemplateColumns:`56px 110px 110px minmax(120px, 1fr) 100px minmax(120px, 1fr) 110px${r?" 80px":""}`,renderRow:({row:h})=>[{content:n.jsx("span",{className:"dlp-worn-check",onClick:_=>_.stopPropagation(),children:n.jsx(xu,{checked:h.worn,disabled:h.worn?!s:!l,ariaLabel:h.worn?u("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"):u("customers.device.wear","\uCC29\uC6A9"),onChange:_=>{_?l?.(h):s?.(h)}})})},{content:n.jsx("span",{children:d(h.side)})},{content:h.device?n.jsx(Lt,{size:"small",variant:zu(h.device),fill:"soft",label:Wu(h.device,u)}):n.jsx("span",{})},{content:n.jsx("span",{children:h.brand})},{content:n.jsx("span",{children:h.fitType||"-"})},{content:n.jsx("span",{children:h.productName||"-"})},{content:n.jsx("span",{className:"dlp-date",children:Yo(h.wornYear,h.wornMonth,h.wornDay,c.language)||"-"})},...r?[{content:n.jsx("span",{className:"dlp-row-actions",children:n.jsx(fe,{htmlType:"button",size:28,type:"bar",variant:"transparent-gray",label:u("common.delete","\uC0AD\uC81C"),onClick:_=>{_?.stopPropagation(),r(h)}})})}]:[]],onRowClick:({row:h})=>a(h),empty:u("customers.device.historyEmpty","\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})]})}function Vu(e,t){return e?{role:t?.role??"button",tabIndex:0,...t?.selected===void 0?{}:{"aria-selected":t.selected},onKeyDown:a=>{a.target===a.currentTarget&&(a.key!=="Enter"&&a.key!==" "||(a.preventDefault(),e(a)))}}:{}}function Jv(e,t){return new Date(e,t+1,0).getDate()}function Qv(e,t){return new Date(e,t,1).getDay()}function e4({visits:e=[],onVisitClick:t,onVisitMove:a,onDayClick:r,today:l}){const{t:s,i18n:i}=_e.useTranslation(),u=o.useMemo(()=>s("calendar.dow",{returnObjects:!0}),[s]),c=lo(l),[d,m]=o.useState(()=>Number(c.slice(0,4))),[p,C]=o.useState(()=>Number(c.slice(5,7))-1),[b,x]=o.useState(null),f=o.useRef(null),h=o.useMemo(()=>{const y={};return e.forEach(w=>{y[w.date]||(y[w.date]=[]),y[w.date].push(w)}),y},[e]),_=o.useMemo(()=>{const y=Jv(d,p),w=Qv(d,p),A=[];for(let E=0;E<w;E++)A.push(null);for(let E=1;E<=y;E++)A.push(E);for(;A.length<35;)A.push(null);return A},[d,p]),g=o.useCallback(()=>{p===0?(m(y=>y-1),C(11)):C(y=>y-1)},[p]),k=o.useCallback(()=>{p===11?(m(y=>y+1),C(0)):C(y=>y+1)},[p]),v=y=>`${d}-${String(p+1).padStart(2,"0")}-${String(y).padStart(2,"0")}`,B=y=>v(y)===c;return n.jsxs("div",{children:[n.jsxs("div",{className:"calendar-nav",children:[n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:g,"aria-label":s("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(tt,{icon:"chevron-left",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsx("span",{className:"calendar-nav__title h5","aria-live":"polite",children:so(s,i.language,d,p+1)}),n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:k,"aria-label":s("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(tt,{icon:"chevron-right",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsxs("div",{className:"calendar-nav__legend",children:[n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--main"}),n.jsx("span",{className:"caption-1",children:s("calendar.legend.visited","\uBC29\uBB38")}),n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--sub"}),n.jsx("span",{className:"caption-1",children:s("calendar.legend.scheduled","\uC608\uC57D")}),n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--disabled"}),n.jsx("span",{className:"caption-1",children:s("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]})]}),n.jsxs("div",{className:"calendar-grid",children:[u.map(y=>n.jsx("div",{className:"calendar-day-header body-3",children:y},y)),_.map((y,w)=>{if(y===null)return n.jsx("div",{className:"calendar-cell empty"},`empty-${w}`);const A=y,E=v(A),D=h[E]??[],N=Fl(E,i.language),F=b===E;return n.jsxs("div",{className:`calendar-cell${B(A)?" today":""}${F?" drag-over":""}${r?" calendar-cell--clickable":""}`,role:r?"button":void 0,tabIndex:r?0:void 0,"aria-label":r?s("calendar.addOnDate",{date:E}):void 0,"aria-current":B(A)?"date":void 0,onClick:r?()=>r(E):void 0,onKeyDown:r?R=>{R.target===R.currentTarget&&(R.key!=="Enter"&&R.key!==" "||(R.preventDefault(),r(E)))}:void 0,onDragOver:a?R=>{R.preventDefault(),x(E)}:void 0,onDragLeave:a?R=>{R.currentTarget.contains(R.relatedTarget)||x(null)}:void 0,onDrop:a?R=>{R.preventDefault(),f.current!=null&&(a(f.current,E),f.current=null),x(null)}:void 0,children:[n.jsx("div",{className:"calendar-cell__number body-3",children:A}),D.length>0&&(()=>{const R=[{key:"visited",label:s("calendar.legend.visited","\uBC29\uBB38"),count:D.filter(L=>(L.status??"visited")==="visited").length},{key:"scheduled",label:s("calendar.legend.scheduled","\uC608\uC57D"),count:D.filter(L=>L.status==="scheduled").length},{key:"noVisit",label:s("calendar.legend.noVisit","\uBBF8\uBC29\uBB38"),count:D.filter(L=>L.status==="noVisit").length}].filter(L=>L.count>0),K=R.length===1&&R[0].key==="visited"?s("calendar.visitCount",{count:D.length,defaultValue:"\uBC29\uBB38 {{count}}\uAC74"}):R.map(L=>s("calendar.statusCount",{label:L.label,count:L.count,defaultValue:"{{label}} {{count}}\uAC74"})).join(" \xB7 ");return n.jsxs("span",{className:"calendar-cell__visit-count caption-1","aria-label":`${N} ${K}`,children:[R.map(L=>n.jsx("span",{className:`calendar-cell__visit-dot calendar-cell__visit-dot--${L.key}`,"aria-hidden":"true"},L.key)),D.length]})})(),n.jsx("div",{className:"calendar-cell__badges",children:D.map((R,K)=>n.jsxs("div",{draggable:!!a,className:`calendar-visit-badge${R.status==="noVisit"?" calendar-visit-badge--no-visit":R.status==="scheduled"?" calendar-visit-badge--scheduled":""}${t?" calendar-visit-badge--clickable":""}${a?" calendar-visit-badge--draggable":""}`,onDragStart:a?L=>{f.current=R.id,L.dataTransfer.effectAllowed="move"}:void 0,onDragEnd:a?()=>{f.current=null,x(null)}:void 0,onClick:t?L=>{L.stopPropagation(),t(R)}:void 0,...Vu(t?()=>t(R):void 0),"aria-label":[N,R.time?Vl(R.time,s):null,R.customer,s(R.status==="noVisit"?"calendar.legend.noVisit":R.status==="scheduled"?"calendar.legend.scheduled":"calendar.legend.visited")].filter(Boolean).join(" "),children:[R.time&&n.jsx("span",{className:"calendar-visit-badge__time body-3",children:Vl(R.time,s)}),n.jsx("span",{className:"calendar-visit-badge__name body-3",children:R.customer}),R.status==="noVisit"&&n.jsx("span",{className:"calendar-visit-badge__no-visit caption-1",children:s("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]},R.id??K))})]},A)})]})]})}const t4={page:"h3",pagePopup:"h4",popup:"h5"};function fa({type:e="page",title:t,headingLevel:a=2,icon:r,action:l,disc:s,children:i,inGrid:u=!1,className:c,style:d}){const m=t4[e],p=t||s||l||r,C=a?`h${a}`:"div";return n.jsxs("div",{className:we("section",`section--${e}`,u&&"section--in-grid",c),style:d,children:[p&&n.jsxs("div",{className:"section__header",children:[n.jsxs("div",{className:"section__title-row",children:[r&&n.jsx(tt,{icon:r,label:typeof t=="string"?t:void 0,className:"section__icon"}),n.jsxs("div",{className:"section__title-group",children:[t&&n.jsx(C,{className:`section__title ${m}`,children:t}),s&&n.jsx("div",{className:"section__disc body-3",children:s})]})]}),l&&n.jsx("div",{className:"section__action",children:l})]}),i]})}let Zo=null,qu=!1;function Uu(){if(qu||typeof document>"u")return;qu=!0,document.addEventListener("keydown",t=>{t.metaKey||t.ctrlKey||t.altKey||(Zo="keyboard")},!0);const e=()=>{Zo="pointer"};document.addEventListener("pointerdown",e,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,{capture:!0,passive:!0})}Uu();function gr(){return Uu(),Zo==="keyboard"}const br=20;function n4(e){const{t}=_e.useTranslation(),{type:a,trainingDatas:r,depth:l,renderPopup:s,completedIds:i,selectedIds:u,onItemComplete:c,size:d,useDescriptionTooltip:m,onRemove:p,onMore:C,sectionType:b="page"}=e||{},[,x]=o.useState(0),f=typeof r<"u"?Array.isArray(r)?r:[]:[],h=f.length,[_,g]=o.useState(Math.min(h,br)),k=o.useMemo(()=>Array.isArray(l)?[...l,a?.label].filter(Boolean).join(" \xB7 "):[l||"",a?.label].filter(Boolean).join(" \xB7 "),[l,a?.label]);o.useEffect(()=>{g(Math.min(h,br))},[h]),Li("speechear.data.updated",()=>x(w=>w+1));const v=o.useRef(null),B=o.useRef(null);function y(){const w=document.activeElement;B.current=gr()&&w&&w.closest?.(".training-block__more")?_:null,g(A=>Math.min(h,A+br))}return o.useEffect(()=>{const w=B.current;if(w==null)return;B.current=null;const A=document.activeElement;A&&A!==document.body||v.current?.querySelectorAll(".training-block-button")[w]?.focus()},[_]),n.jsxs(fa,{type:b,title:a?.label,icon:a?.icon,disc:a?.desc,className:"training-block",children:[n.jsx("div",{className:"training-list",ref:v,children:(f||[]).slice(0,_).map((w,A)=>{const E=w;return n.jsx(Lo,{index:A,type:a,trainingData:E,depth:k,renderPopup:s,completedIds:i,selectedIds:u,size:d,useDescriptionTooltip:m,onRemove:typeof p=="function"&&u!=null&&E?.id!=null&&u.has(String(E.id))?()=>p(E):void 0,onComplete:typeof c=="function"&&E?.id!=null?()=>c(String(E.id)):void 0,onMore:typeof C=="function"?D=>C(E,D):void 0},E?.id!=null?`${a?.key||"t"}-${String(E.id)}`:`${a?.key||"t"}-${A}`)})}),h>br&&_<h&&n.jsx("div",{className:"training-block__more",children:n.jsx(fe,{htmlType:"button",size:48,type:"bar",icon:"plus",onClick:y,ariaLabel:t("common.loadMore","\uB354\uBCF4\uAE30"),label:t("common.loadMore","\uB354\uBCF4\uAE30"),variant:"main"})})]})}function a4(e){let t=0;const a=r=>{Array.isArray(r)?r.forEach(a):r!=null&&r!==!1&&r!==!0&&r!==""&&t++};return a(e),t}function r4({gap:e=10,count:t,className:a,children:r}){const l=o.useRef(null),[s,i]=o.useState({width:0,card:0}),u=t??a4(r);o.useLayoutEffect(()=>{const C=l.current;if(!C)return;const b=()=>{const f=C.style.maxWidth;C.style.maxWidth="none";const h=C.clientWidth;C.style.maxWidth=f;const _=C.firstElementChild?.offsetWidth??0;i(g=>g.width===h&&g.card===_?g:{width:h,card:_})};if(b(),typeof ResizeObserver>"u")return;const x=new ResizeObserver(b);return x.observe(C),()=>x.disconnect()},[u,e]);const c=s.card>0?s.card:0,d=c>0?cf(s.width,c,e):0,m=d>0?df(u,d):0,p={"--block-grid-gap":`${e}px`,...m>0?{"--block-grid-cols":m,"--block-grid-card":`${c}px`}:{}};return n.jsx("div",{ref:l,className:we("training-block-grid",m>0&&"training-block-grid--measured",a),style:p,"data-cols":m>0?m:void 0,children:r})}function Xo(e){const t=o.useRef(null),a=o.useRef(e);a.current=e;const[r,l]=o.useState({url:e,loading:!!e,failed:!1}),s=r.url===e?r:{loading:!!e,failed:!1};o.useEffect(()=>{const c=t.current;l({url:e,failed:!1,loading:!!e&&!(c?.complete&&c.naturalWidth>0)})},[e]);const i=o.useCallback(()=>{a.current===e&&l({url:e,loading:!1,failed:!1})},[e]),u=o.useCallback(()=>{a.current===e&&l({url:e,loading:!1,failed:!0})},[e]);return{imgRef:t,loading:s.loading,failed:s.failed,hasImage:!!e&&!s.failed,onLoad:i,onError:u}}var o4='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_SpeechEar_mono" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><g id="symbol"><g opacity=".3"><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23fff"/></g><path d="M140,30h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84-3.88-7.1-6.08-15.25-6.08-23.92v-80c0-16.57,13.43-30,30-30h80c8.66,0,16.81,2.21,23.92,6.08-8.48-15.54-24.97-26.08-43.92-26.08Z" fill="%23fff"/><path d="M183.92,56.08c3.88,7.1,6.08,15.25,6.08,23.92v80c0,16.57-13.43,30-30,30h-80c-8.66,0-16.81-2.21-23.92-6.08,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%23fff"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>';const s4=o4,Jo=o.forwardRef(function({item:e,disabled:t=!1,onPlayDone:a,selectable:r=!1,selected:l=!1,onSelect:s,flipDelay:i=0,hideLabel:u=!1,hideAudio:c=!1,orderRank:d=null},m){const{t:p}=_e.useTranslation(),C=e.word||e.title||"",b=t||!C,x=e.audio??e.sound??e.audioKey,f=e.subLabel||e.pronunciation||"",h=e.colloquialLabel||"",[_,g]=o.useState({label:C,subLabel:f,colloquialLabel:h,homonum:e.homonum});C&&(_.label!==C||_.subLabel!==f||_.colloquialLabel!==h||!Object.is(_.homonum,e.homonum))&&g({label:C,subLabel:f,colloquialLabel:h,homonum:e.homonum});const k=o.useRef(null),v=Cn("(max-width: 767px)"),[B,y]=o.useState(!1),w=`${typeof x=="string"?x:x?.src??""}\0${C}`,[A,E]=o.useState({for:"",url:""}),D=A.for===w?A.url:"",N=Rl(),F=e.textOnly??(!e.image&&!!_.label&&!!N&&N.entries.length>0&&!N.byWord.has(_.label)),R=F?"":sa()?.(_.label,_.homonum)??e.image??"",{imgRef:K,loading:L,hasImage:$,onLoad:T,onError:J}=Xo(R);o.useEffect(()=>{let M=!1;return(async()=>{if(x){if(typeof x=="string"){if(x.startsWith("http")||x.includes("/")){E({for:w,url:x});return}}else if(typeof x=="object"&&!Array.isArray(x)){const Z=x.src;if(Z){E({for:w,url:Z});return}}}const I=Na();if(I&&C)try{const Z=await Promise.resolve(I(C));!M&&Z&&E({for:w,url:Z})}catch{}})(),()=>{M=!0}},[x,C,w]);const q=o.useRef(!0),O=o.useRef(null);o.useEffect(()=>(q.current=!0,()=>{q.current=!1,O.current&&mr(O.current),O.current=null;try{k.current?.pause()}catch{}k.current=null}),[]);const Q=o.useCallback(()=>new Promise(M=>{if(typeof window<"u"&&window.speechSynthesis&&C){y(!0),window.speechSynthesis.cancel();const I=new SpeechSynthesisUtterance(C);I.lang="ko-KR",I.onend=()=>{y(!1);try{a?.()}catch{}M()},I.onerror=()=>{y(!1),M()},window.speechSynthesis.speak(I)}else M()}),[C,a]),P=o.useCallback(M=>{const I=hr(M,Z=>{if(y(!1),Z)try{a?.()}catch{}});return k.current=I.el,I.done},[a]),V=o.useCallback(async()=>{if(t||!q.current)return;const M=()=>{O.current===M&&(O.current=null);try{k.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}y(!1)},I=pr(M);O.current=M;try{window.speechSynthesis?.cancel()}catch{}try{if(D&&(y(!0),await P(D)))return;const Z=Jr();if(Z&&C)try{const le=await Promise.resolve(Z(C));if(!q.current||O.current!==M||le&&(y(!0),await P(le)))return}catch{}if(!q.current||O.current!==M)return;await Q()}finally{I(),O.current===M&&(O.current=null)}},[t,D,C,P,Q]);o.useImperativeHandle(m,()=>({play:()=>V()}),[V]);const W=M=>M.stopPropagation(),G=o.useCallback(M=>{if(M.stopPropagation(),!t){if(B){try{k.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}y(!1);return}V()}},[t,B,V]),S=we("training-word-card",t?"training-word-card--disabled":"",b?"training-word-card--flipped":"",r?"training-word-card--selectable":"",l?"training-word-card--selected":"");return n.jsx("div",{className:S,onClick:r&&!t?s:void 0,role:r?"button":void 0,"aria-pressed":r?l:void 0,tabIndex:r&&!t?0:void 0,"aria-disabled":r&&t?!0:void 0,onKeyDown:r&&!t?M=>{M.target===M.currentTarget&&(M.key==="Enter"||M.key===" "||M.key==="Spacebar")&&(M.preventDefault(),s?.())}:void 0,children:n.jsxs("div",{className:"training-word-card__flipper",style:{transitionDelay:b?"0ms":`${i}ms`},children:[n.jsxs("div",{className:"training-word-card__front",children:[l&&n.jsx("div",{className:"training-word-card__selected-badge",onClick:W,children:n.jsx(Lt,{type:"dot",size:40,position:"inline",animate:!0,icon:d!=null?void 0:"check",number:d??void 0,"aria-label":d!=null?p("training.nthSelected",{n:d}):p("training.selected","\uC120\uD0DD\uB428")})}),n.jsx("div",{className:"training-word-card__image-wrap",children:F?n.jsx("div",{className:"training-word-card__text-face",children:_.label}):$?n.jsxs(n.Fragment,{children:[L&&n.jsx("div",{className:"training-word-card__spinner"}),n.jsx("img",{ref:K,className:"training-word-card__image",src:R,alt:_.label||p("common.image","\uC774\uBBF8\uC9C0"),style:{opacity:L?0:1},onLoad:T,onError:J})]}):n.jsx("div",{className:"training-word-card__placeholder"})}),!u&&n.jsxs("div",{className:"training-word-card__body",children:[!F&&n.jsx("div",{className:"training-word-card__word",children:_.label}),_.subLabel&&n.jsxs("div",{className:"training-word-card__pronunciation",children:["[",_.subLabel,"]"]}),_.colloquialLabel&&n.jsxs("div",{className:"training-word-card__colloquial caption-1",children:["[",_.colloquialLabel,"]"]})]}),!c&&n.jsx("div",{className:"training-word-card__bottom",onClick:r?W:void 0,children:n.jsx(fe,{htmlType:"button",size:v?40:48,type:v?"dot":"bar",icon:B?"pause":"play",label:v?void 0:p("training.playSound","\uC18C\uB9AC \uB4E3\uAE30"),selected:B,onClick:G,disabled:t,ariaLabel:p("training.playSound","\uC18C\uB9AC \uB4E3\uAE30")})})]}),n.jsx("div",{className:"training-word-card__back","aria-hidden":"true",children:n.jsx("span",{className:"training-word-card__disabled-symbol",style:{"--disabled-symbol-src":`url("${s4}")`}})})]})})}),l4=260;function Wn(e){const{t}=_e.useTranslation(),{title:a,subtitle:r,headerActions:l,headerSegment:s,children:i,buttons:u,footer:c,footerStart:d,footerEnd:m,footerNote:p,footerNoteDivider:C=!1,footerClassName:b="",footerLayout:x="center",onClose:f,closeDisabled:h=!1,beforeClose:_,closeOnBackdrop:g=!0,className:k="",ariaLabel:v,useTitle:B=!0,inline:y=!1,size:w,layer:A="modal",height:E,fillBody:D=!1,resetScrollKey:N}=e||{},[F,R]=o.useState(!1),K=o.useRef(!1),L=o.useRef(null),$=o.useId(),T=o.useRef(null);o.useEffect(()=>{},[y,a,v,k]),o.useEffect(()=>{N!==void 0&&T.current&&(T.current.scrollTop=0)},[N]);const[J,q]=o.useState(!1);o.useEffect(()=>{const z=T.current;if(!z)return;const ne=()=>q(z.scrollHeight>z.clientHeight+1);if(ne(),typeof ResizeObserver>"u")return;const H=new ResizeObserver(ne);H.observe(z);const U=z.firstElementChild;return U&&H.observe(U),()=>H.disconnect()},[i,N]),o.useEffect(()=>{if(!y)return Cu()},[y]);const O=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(y)return;const z=O.current,ne=L.current;return fo(ne,z),ne&&!ne.contains(document.activeElement)&&(ne.querySelector(_n)??ne).focus(),()=>{const H=document.activeElement;(!H||H===document.body||ne&&ne.contains(H))&&go(z)?.focus?.()}},[y]),ho(L,!y);const Q=o.useRef(!0),P=bo(),V=o.useRef(null);o.useEffect(()=>(Q.current=!0,()=>{Q.current=!1,V.current&&(clearTimeout(V.current),V.current=null)}),[]);const W=o.useCallback(()=>{!Q.current||!K.current||(K.current=!1,R(!1))},[]),G=o.useCallback((z,ne=!1)=>{if(ne&&!Q.current||K.current)return;K.current=!0,R(!0);const H=setTimeout(()=>{V.current===H&&(V.current=null);let U;try{U=z?z():void 0}catch{W();return}U&&typeof U.then=="function"&&U.then(()=>{setTimeout(W,120)},W)},P?0:l4);ne&&(V.current=H)},[W,P]),S=o.useCallback(()=>{h||_&&_()===!1||G(f,!0)},[G,f,h,_]),M=o.useRef(S);o.useEffect(()=>{M.current=S});const I=!y&&!!f;o.useEffect(()=>{if(I)return Gn(()=>M.current())},[I]);const Z=I&&g,le=o.useRef(!1),oe=z=>{le.current=z.target===z.currentTarget},de=z=>{const ne=le.current;le.current=!1,ne&&z.target===z.currentTarget&&S()},re=n.jsx("div",{className:`popup ${y?"popup--inline":""} ${A==="belowPagePopup"?"popup--below-page-popup":""} ${F?"popup--closing":""} ${k}`,onPointerDown:Z?oe:void 0,onClick:Z?de:void 0,onMouseDown:y?void 0:z=>{z.target===z.currentTarget&&z.preventDefault()},children:n.jsxs("div",{ref:L,className:`popup-panel${w?` popup-panel--${w}`:""}${E!=null?" popup-panel--has-height":""}${D?" popup-panel--fill-body":""}`,style:E!=null?{"--popup-height":typeof E=="number"?`${E}px`:E}:void 0,tabIndex:-1,role:y?void 0:"dialog","aria-modal":y?void 0:!0,"aria-labelledby":!y&&B&&a?$:void 0,"aria-label":!y&&!(B&&a)?v??(typeof a=="string"?a:void 0):void 0,children:[!B&&(l||f)?n.jsxs("div",{className:"popup-close-float",children:[l,f&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:S,disabled:h,ariaLabel:t("common.close","\uB2EB\uAE30")})]}):a||l||f?n.jsxs("div",{className:`popup-header${r?" popup-header--with-subtitle":""}`,children:[n.jsxs("div",{className:"popup-header-main",children:[a?n.jsx("h2",{id:$,className:"popup-title popup-title--left h2",children:a}):n.jsx("span",{id:$,className:"popup-title popup-title--left h2"}),r&&n.jsx("span",{className:"popup-subtitle body-3",children:r})]}),s&&n.jsx("div",{className:"popup-header-segment",children:n.jsx(wn,{size:40,ariaLabel:s.ariaLabel,options:s.options.map(z=>({key:z.key,label:z.label,disabled:z.disabled})),value:s.value,onChange:s.onChange})}),n.jsxs("div",{className:"popup-header-actions",children:[l,f&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:S,disabled:h,ariaLabel:t("common.close","\uB2EB\uAE30")})]})]}):null,n.jsx("div",{className:"popup-content",ref:T,tabIndex:J?0:void 0,children:n.jsx("div",{className:"popup-content__inner",children:typeof i=="function"?i({animateThen:G,closeWithAnimation:S}):i})}),p!=null&&p!==!1&&n.jsx("div",{className:`popup-footer-note caption-1${C?" popup-footer-note--divider":""}`,role:"note",children:p}),d||m?n.jsxs("div",{className:`popup-footer popup-footer--bar${b?` ${b}`:""}`,children:[n.jsx("div",{className:"popup-footer__start",children:typeof d=="function"?d({animateThen:G,closeWithAnimation:S}):d}),n.jsx("div",{className:"popup-footer__end",children:typeof m=="function"?m({animateThen:G,closeWithAnimation:S}):m})]}):u?.length?n.jsx("div",{className:`popup-footer popup-footer--buttons${x!=="center"?` popup-footer--${x}`:""}`,children:u.map((z,ne)=>n.jsx(fe,{htmlType:"button",size:48,variant:z.variant??"default",label:z.label,disabled:z.disabled,onClick:()=>z.onClick?.({animateThen:G,closeWithAnimation:S})},ne))}):c?n.jsx("div",{className:`popup-footer${x!=="center"?` popup-footer--${x}`:""}${b?` ${b}`:""}`,children:typeof c=="function"?c({animateThen:G,closeWithAnimation:S}):c}):null]})});return y||typeof document>"u"?re:cn.createPortal(re,document.body)}function yr(e){return String(e)}const vr=["o","triangle","x"];function Gu(e,t){return e===t?null:t}const Ku={o:"circle",triangle:"triangle",x:"x"},Yu={o:"main",triangle:"warn",x:"danger"};function i4(e){let t=0,a=0,r=0;for(const s of Object.values(e))s==="o"?t++:s==="triangle"?a++:s==="x"&&r++;const l=t+a+r;return{marked:l,o:t,triangle:a,x:r,rate:l===0?null:(t+a*.5)/l}}function Qo(e){const t={};for(const[a,r]of Object.entries(e))(r==="o"||r==="triangle"||r==="x")&&(t[a]=r);return t}function Zu(e){const t=[];let a=0;for(const r of e)t.push(a),a+=r;return t}function u4(e,t){return!t&&e>0}const ga={landscape:{width:1123,height:794,printSize:"A4 landscape",printW:"297mm",printH:"210mm"},portrait:{width:794,height:1123,printSize:"A4 portrait",printW:"210mm",printH:"297mm"}};function c4(e="landscape"){Rt("print-word-table-deprecated","[printWordTable] @deprecated \u2014 WordTablePopup renderButtons \uC758 print(\uB610\uB294 useWordTablePrint().print)\uB97C \uC4F0\uC138\uC694. \uC804\uC5ED \uC778\uC1C4\uB294 \uD654\uBA74\uC758 \uBAA8\uB4E0 \uB2E8\uC5B4\uD45C\uB97C \uD568\uAED8 \uCC0D\uC2B5\uB2C8\uB2E4.");const{printSize:t,printW:a,printH:r}=ga[e],l=document.createElement("style");l.textContent=`@page { size: ${t}; margin: 0; } .word-table { width: ${a} !important; height: ${r} !important; }`,document.head.appendChild(l);const s=()=>{document.head.removeChild(l),window.removeEventListener("afterprint",s)};window.addEventListener("afterprint",s),window.print()}function Xu(e,t){if(e.length===0)return[[]];const a=Math.max(1,Math.floor(t)),r=[];for(let l=0;l<e.length;l+=a)r.push(e.slice(l,l+a));return r}const d4={landscape:{1:{cols:1,rows:1},2:{cols:2,rows:1},3:{cols:3,rows:1},4:{cols:2,rows:2},5:{cols:3,rows:2},6:{cols:3,rows:2},7:{cols:4,rows:2},8:{cols:4,rows:2},9:{cols:5,rows:2},10:{cols:5,rows:2},11:{cols:4,rows:3},12:{cols:4,rows:3}},portrait:{1:{cols:1,rows:1},2:{cols:1,rows:2},3:{cols:1,rows:3},4:{cols:1,rows:4},5:{cols:1,rows:5},6:{cols:2,rows:3},7:{cols:2,rows:4},8:{cols:2,rows:4},9:{cols:2,rows:5},10:{cols:2,rows:5},11:{cols:3,rows:4},12:{cols:3,rows:4}}};function p4(e,t){const a=d4[e][t];if(a)return a;const r=Math.max(1,Math.ceil(t)),l=Math.max(1,Math.ceil(Math.sqrt(r*.707)));let s,i;return e==="landscape"?(i=l,s=Math.ceil(r/i)):(s=l,i=Math.ceil(r/s)),(e==="landscape"?s<i:i<s)&&([s,i]=[i,s]),{cols:s,rows:i}}const m4={show:"word-table-block__content--cut-show",dashed:"",corner:"word-table-block__content--cut-corner",hide:""},Ju={\uBA85:"\uBA85\uC0AC",\uB3D9:"\uB3D9\uC0AC",\uD615:"\uD615\uC6A9\uC0AC",\uBD80:"\uBD80\uC0AC",\uC218:"\uC218\uC0AC",\uAD00:"\uAD00\uD615\uC0AC",\uAC10:"\uAC10\uD0C4\uC0AC",\uC870:"\uC870\uC0AC",\uC811:"\uC811\uC0AC",\uC758:"\uC758\uC874\uBA85\uC0AC",\uB300:"\uB300\uBA85\uC0AC",\uBCF4\uB3D9:"\uBCF4\uC870\uB3D9\uC0AC",\uBCF4\uD615:"\uBCF4\uC870\uD615\uC6A9\uC0AC"},Qu={\uACE0\uC720:"\uACE0\uC720\uC5B4",\uD55C\uC790:"\uD55C\uC790\uC5B4",\uC678\uB798:"\uC678\uB798\uC5B4",\uD63C\uC885:"\uD63C\uC885\uC5B4"},es={\uBA85:"noun",\uB3D9:"verb",\uD615:"adjective",\uBD80:"adverb",\uC218:"numeral",\uAD00:"determiner",\uAC10:"interjection",\uC870:"particle",\uC811:"affix",\uC758:"dependentNoun",\uB300:"pronoun",\uBCF4\uB3D9:"auxVerb",\uBCF4\uD615:"auxAdjective"},ts={\uACE0\uC720:"native",\uD55C\uC790:"sino",\uC678\uB798:"foreign",\uD63C\uC885:"mixed"};function ec(e){return Object.fromEntries(Object.entries(Ju).map(([t,a])=>[t,es[t]?e(`wordTable.pos.${es[t]}`,{defaultValue:a}):a]))}function tc(e){return Object.fromEntries(Object.entries(Qu).map(([t,a])=>[t,ts[t]?e(`wordSearch.filter.type.${ts[t]}`,{defaultValue:a}):a]))}const h4={pos:es,wordType:ts};function ns(e,t){return e?e.split("/").map(a=>t[a]??a).join("/"):""}function nc(e,t,a,r){if(r!=="dashed")return{};const l=e%t,s=Math.floor(e/t),i=l<t-1,u=s<a-1;if(!i&&!u)return{};const c="#ddd",d=b=>`repeating-linear-gradient(to ${b}, ${c} 0, ${c} 5px, transparent 5px, transparent 10px)`,m=[],p=[],C=[];return i&&(m.push(d("bottom")),p.push("1px 100%"),C.push("right center")),u&&(m.push(d("right")),p.push("100% 1px"),C.push("center bottom")),{backgroundImage:m.join(", "),backgroundSize:p.join(", "),backgroundPosition:C.join(", "),backgroundRepeat:"no-repeat",printColorAdjust:"exact",WebkitPrintColorAdjust:"exact"}}const C4=280,f4=240,g4=280,b4=400,y4=120,v4=280;function ac(e,t){const a=o.useRef(null),[r,l]=o.useState(1),[s,i]=o.useState(0),u=o.useCallback((c,d)=>{if(!(c>0))return;const m=c/e,p=t&&d>0?d/t:1/0,C=Math.min(1,m,p);l(C),i(Math.max(0,(c-e*C)/2))},[e,t]);return o.useEffect(()=>{const c=a.current;if(!c)return;const d=t?c.parentElement??c:c;if(u(d.clientWidth,d.clientHeight),typeof ResizeObserver>"u")return;const m=new ResizeObserver(([p])=>u(p.contentRect.width,p.contentRect.height));return m.observe(d),()=>m.disconnect()},[u,t]),{scalerRef:a,scale:r,offset:s}}const x4=24,_4={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},w4=400,rc=8;function oc({label:e,subLabel:t,colloquialLabel:a,homonum:r,showWord:l=!0,showImage:s=!0,showPronunciation:i=!0,showColloquial:u=!0,buttonSize:c=40,wordInfo:d,outerScale:m=1}){const{t:p}=_e.useTranslation(),C=o.useRef(null),b=o.useRef(null),x=o.useRef(null),[f,h]=o.useState(1),[_,g]=o.useState(!1),[k,v]=o.useState({for:"",url:""}),[B,y]=o.useState(null),w=t&&t.length>0?t:$C()?.(e,r)??"",A=sa()?.(e,r)??"",{imgRef:E,loading:D,failed:N,onLoad:F,onError:R}=Xo(A),K=o.useCallback(()=>y(b.current?.getBoundingClientRect()??null),[]),L=o.useCallback(()=>y(null),[]),$=vo(!!B,M=>{M?K():L()},b),T=o.useMemo(()=>{if(!d)return null;const M=[];return d.grade&&M.push(p("wordTable.info.grade",{n:d.grade,defaultValue:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09"})),d.syllables&&M.push(p("wordTable.info.syllables",{n:d.syllables,defaultValue:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808"})),d.pos&&M.push(p("wordTable.info.pos",{v:ns(d.pos,ec(p)),defaultValue:"\uD488\uC0AC: {{v}}"})),d.wordType&&M.push(p("wordTable.info.wordType",{v:ns(d.wordType,tc(p)),defaultValue:"\uC720\uD615: {{v}}"})),M.length?M:null},[d,p]),J=w||e,q=k.for===J?k.url:"";o.useEffect(()=>{const M=Na(),I=w||e;if(!M||!I)return;let Z=!1;return Promise.resolve(M(I)).then(le=>{!Z&&le&&v({for:I,url:le})}),()=>{Z=!0}},[w,e]);const O=o.useRef(null),Q=o.useRef(null);o.useEffect(()=>()=>{x.current?.pause(),Q.current?.()},[]);const P=o.useCallback(M=>{if(M.stopPropagation(),_){O.current?.();return}if(!q)return;g(!0);const I=hr(q,()=>{g(!1),Q.current?.()});x.current=I.el,O.current=I.stop,Q.current=pr(I.stop)},[_,q]),V=s&&!!A&&!N,W=V&&l?C4:V?g4:f4,G=V&&l?b4:V?v4:y4;o.useEffect(()=>{const M=C.current;if(!M||typeof ResizeObserver>"u")return;const I=new ResizeObserver(([Z])=>{const{width:le,height:oe}=Z.contentRect;h(Math.min(le/W,oe/G))});return I.observe(M),()=>I.disconnect()},[W,G]);const S=c*m<x4;return n.jsxs("div",{ref:C,className:we("word-table-cell",S&&"word-table-cell--tap-too-small",V?"word-table-cell--with-image":""),"data-ref-w":W,"data-ref-h":G,children:[n.jsxs("div",{className:"word-table-cell__inner",style:{transform:`scale(${f})`},children:[V&&n.jsxs("div",{className:"word-table-cell__image-wrap",children:[D&&n.jsx("div",{className:"word-table-cell__spinner"}),n.jsx("img",{ref:E,className:"word-table-cell__image",src:A,alt:e,draggable:!1,style:{opacity:D?0:1},onLoad:F,onError:R})]}),l&&n.jsx("span",{className:"word-table-cell__word h0",children:e}),i&&w&&n.jsxs("span",{className:"word-table-cell__sub h3",children:["[",w,"]"]}),u&&a&&n.jsxs("span",{className:"word-table-cell__colloquial h5",children:["[",a,"]"]})]}),n.jsxs("div",{className:"word-table-cell__play-button","data-audio-src":q,children:[n.jsx("span",{"data-play-state":"play",style:{display:_?"none":void 0},children:n.jsx(fe,{htmlType:"button",size:c,type:"dot",icon:"play",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:p("common.play","\uC7AC\uC0DD"),ariaLabel:e?p("common.playFor",{name:e,defaultValue:`${e} \uC7AC\uC0DD`}):p("common.play","\uC7AC\uC0DD"),onClick:P})}),n.jsx("span",{"data-play-state":"pause",style:{display:_?void 0:"none"},children:n.jsx(fe,{htmlType:"button",size:c,type:"dot",icon:"pause",useBorder:!1,selected:!0,showTooltipInfo:p("common.pause","\uBA48\uCDA4"),ariaLabel:e?p("common.pauseFor",{name:e,defaultValue:`${e} \uBA48\uCDA4`}):p("common.pause","\uBA48\uCDA4"),onClick:P})})]}),d&&n.jsxs("div",{ref:b,className:"word-table-cell__info-button",onPointerEnter:M=>{ca(M)||K()},onPointerLeave:M=>{ca(M)||L()},onFocus:()=>{da()||K()},onBlur:L,children:[n.jsx(fe,{htmlType:"button",size:c,type:"dot",icon:"info",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:!1,ariaLabel:p("wordTable.wordInfo","{{word}} \uB0B1\uB9D0 \uC815\uBCF4",{word:e}),onClick:M=>{M.stopPropagation(),$.touchPress()}}),B&&T&&n.jsx(Kn,{anchorRect:B,items:T,showIndex:!1})]})]})}function ba({title:e,titleIcon:t,disc:a,className:r,orientation:l="landscape",contentTypes:s=["image","word","standardPron"],cutLine:i="show",showOutline:u=!0,showDivLine:c=!0,items:d,editCells:m,count:p,activeCell:C=null,onActivateCell:b,onRemoveCell:x,onRemoveItem:f,onReorder:h,renderCellAction:_,showFillerAdd:g=!1,contentRef:k,buttonSize:v=40,brand:B,code:y,pageNumber:w,pageNumberPosition:A="right",fitHeight:E=!1,scoring:D=!1,marks:N,onMarkClick:F,scoreIndexOffset:R=0}){const K=o.useCallback((Be,Se)=>{F?.(R+Be,Se)},[F,R]),L=(Be,Se)=>{const Le=N?.[yr(R+Be)]??null;return n.jsx("div",{className:we("word-table-cell__score",Le?"word-table-cell__score--marked":""),style:Ue>1?{transform:`translateX(-50%) scale(${Ue})`,transformOrigin:"bottom center"}:void 0,children:vr.map(Ze=>n.jsx("span",{className:we("word-table-cell__score-slot",Le===Ze?"word-table-cell__score-slot--on":""),children:n.jsx(fe,{htmlType:"button",size:v,type:"dot",shape:"pill",icon:Ku[Ze],variant:Le===Ze?Yu[Ze]:"default",selected:Le===Ze,useBorder:!1,...Ne?{}:{tabIndex:-1,role:"img"},showTooltipInfo:$(`wordTable.scoring.markName.${Ze}`,{defaultValue:Ze}),ariaLabel:$(`wordTable.scoring.${Ze}`,{word:Se,defaultValue:`${Se} ${Ze}`}),onClick:Ne?xt=>{xt.stopPropagation(),K(Be,Ze)}:void 0})},Ze))})},{t:$}=_e.useTranslation(),T=m!==void 0,J=e!=null||!!t||!!a,q=Cn("(max-width: 767px)"),O=o.useRef(null),[Q,P]=o.useState(null),V=d?.length??0,[W,G]=o.useState(null),[S,M]=o.useState(""),I=o.useRef(null),Z=o.useRef(null),le=o.useRef(null),oe=o.useRef(null),de=o.useCallback(Be=>{Z.current=Be,typeof k=="function"?k(Be):k&&(k.current=Be)},[k]),re=o.useCallback((Be,Se)=>{I.current=Se,h?.(Be,Se),M($("wordTable.reorder.moved",{n:Se+1,total:V,defaultValue:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40"}))},[h,$,V]);o.useEffect(()=>{const Be=I.current;Be!=null&&(I.current=null,Z.current?.querySelectorAll(".word-table-block__card:not(.word-table-block__card--filler)")?.[Be]?.querySelector(".word-table-block__card-handle button")?.focus())}),o.useEffect(()=>()=>{oe.current?.()},[]);const z=o.useCallback((Be,Se)=>{if(!h||!Be.altKey||Be.ctrlKey||Be.metaKey)return;const Le=Be.key==="ArrowRight";if(!Le&&Be.key!=="ArrowLeft")return;Be.preventDefault();const Ze=Se+(Le?1:-1);Ze<0||Ze>=V||re(Se,Ze)},[h,V,re]),ne=o.useCallback((Be,Se)=>{if(!h||Be.pointerType==="mouse")return;const Le=Be.target.closest?.("button");if(Le&&!Le.closest(".word-table-block__card-handle"))return;oe.current?.();const Ze={x:Be.clientX,y:Be.clientY};let xt=!1;const et=Pe=>{xt&&Pe.cancelable&&Pe.preventDefault()};let Xe=null,At=null;const gt=()=>{const Pe=At;if(!Pe)return;const bt=document.elementFromPoint?.(Pe.x,Pe.y)?.closest?.("[data-wordtable-cell]"),wt=bt?Number(bt.dataset.wordtableCell):NaN,lt=Number.isInteger(wt)?wt:null;le.current=lt,P(jt=>jt===lt?jt:lt)},_t=Pe=>{if(!xt){(Math.abs(Pe.clientX-Ze.x)>rc||Math.abs(Pe.clientY-Ze.y)>rc)&&st();return}if(At={x:Pe.clientX,y:Pe.clientY},typeof requestAnimationFrame>"u"){gt();return}Xe===null&&(Xe=requestAnimationFrame(()=>{Xe=null,gt()}))},Nt=()=>{Xe!==null&&(cancelAnimationFrame(Xe),Xe=null,gt());const Pe=le.current,bt=xt;st(),bt&&Pe!=null&&Pe!==Se&&re(Se,Pe)},mt=setTimeout(()=>{xt=!0,G(Se),le.current=Se,P(Se),window.addEventListener("touchmove",et,{passive:!1})},w4);function st(){clearTimeout(mt),window.removeEventListener("pointermove",_t),window.removeEventListener("pointerup",Nt),window.removeEventListener("pointercancel",Nt),window.removeEventListener("touchmove",et),xt=!1,Xe!==null&&(cancelAnimationFrame(Xe),Xe=null),le.current=null,oe.current=null,G(null),P(null)}oe.current=st,window.addEventListener("pointermove",_t),window.addEventListener("pointerup",Nt),window.addEventListener("pointercancel",Nt)},[h,re]),{width:H,height:U}=ga[l],pe=typeof E=="number"?E:E&&typeof E=="object"?q?E.narrow:E.wide:null,{scalerRef:Ee,scale:ge,offset:me}=ac(H,E?U:void 0),ie=T?m?.length??0:d?.length??0,be=Math.max(p??ie,1),{cols:he,rows:ue}=p4(l,be),Me={word:s.length===0||s.includes("word"),image:s.length===0||s.includes("image"),pron:s.length===0||s.includes("standardPron"),colloq:s.length===0||s.includes("colloquialPron")},qe=T?(m??[]).some(Be=>Be!==null&&Be.length>1):(d??[]).some(Be=>(Be.words??[]).length>1),je=!!B?.show,Ve=!!B?.show&&B?.top!==!1,Oe=!!B?.show&&B?.bottom!==!1,dt=B?.copyright??"\xA9 IHAB, Inc. All rights reserved.",rt=we("word-table-block__content",m4[i],u&&"word-table-block__content--outline",c&&qe&&"word-table-block__content--div-line",!je&&w&&A!=="none"&&"word-table-block__content--page-number",Ve&&"word-table-block__content--brand-top",Oe&&"word-table-block__content--brand-bottom"),nt={transform:`scale(${1/ge})`,transformOrigin:"center center"},pt=v*vr.length+4*(vr.length-1),Ne=!!F,Ue=Ne?Math.max(1,Math.min(1/ge,H/he/pt)):1,ke=n.jsxs("div",{ref:Ee,className:"word-table__scaler",style:{height:U*ge},children:[n.jsx("div",{className:we("word-table",D&&!Ne&&"word-table--score-readonly",!J&&r),style:{width:H,height:U,transform:`scale(${ge})`,transformOrigin:"top left",marginLeft:me},children:n.jsxs("div",{ref:de,className:rt,style:{gridTemplateColumns:`repeat(${he}, 1fr)`,gridTemplateRows:`repeat(${ue}, 1fr)`},children:[T?n.jsx(n.Fragment,{children:(m??[]).map((Be,Se)=>n.jsx("div",{className:we("word-table-block__edit-cell",Be?"word-table-block__edit-cell--filled":"word-table-block__edit-cell--empty",C===Se?"word-table-block__edit-cell--active":""),style:nc(Se,he,ue,i),children:Be?n.jsxs(n.Fragment,{children:[Be.map((Le,Ze)=>n.jsxs(o.Fragment,{children:[Ze>0&&n.jsx("div",{className:"word-table-block__pair-divider"}),n.jsx(oc,{outerScale:ge,label:Le.word,subLabel:Le.pronunciation,colloquialLabel:Le.colloquialPronunciation,homonum:Le.homonum,showWord:Me.word,showImage:Me.image,showPronunciation:Me.pron,showColloquial:Me.colloq,buttonSize:v})]},Ze)),D&&L(Se,Be.map(Le=>Le.word).join(" / ")),x&&n.jsx("div",{className:"word-table-block__card-close",children:n.jsx(fe,{htmlType:"button",size:v,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:Be.length>1?$("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):$("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:Be.length>1?$("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):$("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),onClick:()=>x(Se)})})]}):b&&n.jsx("div",{style:nt,children:n.jsx(fe,{htmlType:"button",size:"48",type:"bar",icon:"plus",label:$("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>b(Se)})})},Se))}):n.jsxs(n.Fragment,{children:[(d??[]).map((Be,Se)=>n.jsxs("div",{"data-wordtable-cell":h?Se:void 0,className:`word-table-block__card${h?" word-table-block__card--draggable":""}${Q===Se?" word-table-block__card--drag-over":""}${W===Se?" word-table-block__card--dragging":""}`,style:nc(Se,he,ue,i),draggable:!!h,onPointerDown:h?Le=>ne(Le,Se):void 0,onKeyDown:h?Le=>z(Le,Se):void 0,onDragStart:h?()=>{O.current=Se}:void 0,onDragOver:h?Le=>{Le.preventDefault(),P(Se)}:void 0,onDragLeave:h?()=>P(null):void 0,onDrop:h?Le=>{Le.preventDefault(),O.current!==null&&O.current!==Se&&h(O.current,Se),O.current=null,P(null)}:void 0,onDragEnd:h?()=>{O.current=null,P(null)}:void 0,children:[(Be.words??[]).map((Le,Ze)=>n.jsxs(o.Fragment,{children:[Ze>0&&n.jsx("div",{className:"word-table-block__pair-divider"}),n.jsx(oc,{outerScale:ge,label:Le.label,subLabel:Le.subLabel,colloquialLabel:Le.colloquialLabel,homonum:Le.homonum,showWord:Me.word,showImage:Me.image,showPronunciation:Me.pron,showColloquial:Me.colloq,buttonSize:v,wordInfo:Le.grade||Le.syllables!=null||Le.pos||Le.wordType?{grade:Le.grade,syllables:Le.syllables,pos:Le.pos,wordType:Le.wordType}:void 0})]},Ze)),D&&L(Se,(Be.words??[]).map(Le=>Le.label).join(" / ")),h&&n.jsx("div",{className:"word-table-block__card-handle",children:n.jsx(fe,{htmlType:"button",size:v,type:"dot",icon:"grip-vertical",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:$("wordTable.reorder.hint","Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"),ariaLabel:$("wordTable.reorder.handle",{word:(Be.words??[]).map(Le=>Le.label).join(" / "),defaultValue:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)"})})}),(_||f)&&n.jsxs("div",{className:"word-table-block__card-actions",children:[_?.(Se,Be),f&&n.jsx("div",{className:"word-table-block__card-close",children:n.jsx(fe,{htmlType:"button",size:v,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(Be.words??[]).length>1?$("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):$("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:(Be.words??[]).length>1?$("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):$("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),onClick:()=>f(Be.id)})})]})]},Be.id)),Array.from({length:Math.max(0,he*ue-(d?.length??0))}).map((Be,Se)=>{const Le=(d?.length??0)+Se<be;return n.jsx("div",{className:"word-table-block__card word-table-block__card--filler",children:g&&b&&Le&&n.jsx("div",{style:nt,children:n.jsx(fe,{htmlType:"button",size:v,type:"bar",icon:"plus",label:$("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>b((d?.length??0)+Se)})})},`filler-${Se}`)})]}),Ve&&n.jsx(n.Fragment,{children:n.jsxs("div",{className:"word-table__band word-table__band--top",children:[n.jsx("img",{className:"word-table__brand-logo",src:B?.topLogo?.src??dr,alt:B?.topLogo?.alt??"\uB9D0\uADC0"}),(()=>{const Be=[B?.title&&n.jsx("span",{className:"word-table__paper-title",children:B.title},"t"),B?.owner&&n.jsx("span",{className:"word-table__owner",children:B.owner},"o"),y&&n.jsx("span",{className:"word-table__code",children:y},"c")].filter(Boolean);return Be.length===0?null:n.jsx("span",{className:"word-table__ident",children:Be.map((Se,Le)=>n.jsxs(o.Fragment,{children:[Le>0&&n.jsx("span",{className:"word-table__ident-dot","aria-hidden":"true",children:"\xB7"}),Se]},Le))})})()]})}),Oe&&n.jsx(n.Fragment,{children:n.jsxs("div",{className:"word-table__band word-table__band--bottom",children:[n.jsxs("span",{className:"word-table__brand-by",children:[B?.bottomLogo?n.jsx("img",{className:"word-table__brand-logo--ihab word-table__brand-logo--given",src:B.bottomLogo.src,alt:B.bottomLogo.alt}):n.jsx("span",{className:"word-table__brand-logo--ihab",role:"img","aria-label":"IHAB"}),n.jsx("span",{className:"word-table__copyright",children:dt})]}),n.jsxs("span",{className:"word-table__band-end",children:[B?.link&&n.jsx("span",{className:"word-table__link",children:B.link}),w&&A!=="none"&&n.jsx("span",{className:"word-table__page-count",children:$("wordTable.filter.pageIndicator",{current:w.current,total:w.total})})]})]})}),!je&&w&&A!=="none"&&n.jsx("span",{className:`word-table__page-number body-3 word-table__page-number--${A}`,children:$("wordTable.filter.pageIndicator",{current:w.current,total:w.total})})]})}),h&&n.jsx("span",{role:"status",style:_4,children:S})]}),He=pe==null?ke:n.jsx("div",{className:"word-table__frame",style:{height:pe},children:ke});return J?n.jsx(fa,{type:"page",icon:t,title:e,disc:a,className:we("word-table-block",r),children:He}):He}function B4(e,t,a){const r=[];for(const l of e??[]){if(l.type==="note"||l.type==="input")continue;const s=l.displayLabel??l.label,i=k4(l,t?.[l.label],a);i!==null&&r.push(`${s} ${i}`)}return r.join(" \xB7 ")}function k4(e,t,a){const r=(Array.isArray(t)?t:t===void 0?[]:[t]).filter(l=>l!==xn);return r.length===0?e.allOption?e.allLabel??a:null:r.map(l=>A4(e,l)).join(", ")}function A4(e,t){const a=[...e.items??[],...(e.groups??[]).flat()];for(const r of a)if(r!=null){if(typeof r=="string"){if(r===t)return r;continue}if(r.value===t)return r.displayLabel??r.labels?.join(" ")??r.value}return t}function Ln({title:e,titleLevel:t=2,headerAction:a,headerSummary:r,collapsible:l=!1,defaultCollapsed:s=!1,collapsed:i,onCollapsedChange:u,footer:c,sections:d,selected:m={},onSelect:p,align:C,sectionAlign:b,className:x}){const f=(C??(b==="vertical"?"newline":"inline"))==="inline",{t:h}=_e.useTranslation(),[_,g]=o.useState(s),k=i??_,v=()=>{const N=!k;g(N),u?.(N)},B=N=>{if(!l)return;const F=N.target;!F||typeof F.closest!="function"||F.closest(".filter-panel__collapse-toggle")||F.closest('button, a, input, select, textarea, label, [role="radiogroup"], [role="button"], [role="menu"]')||v()},y=o.useMemo(()=>r!==void 0||!k?"":B4(d,m,h("common.all","\uC804\uCCB4")),[r,k,d,m,h]),w=r??(y?n.jsx("span",{className:"filter-panel__header-summary body-3",children:y}):null),A=e||a||r||l,E=o.useId(),D=t?`h${t}`:"span";return n.jsxs("div",{className:we("filter-panel",l?"filter-panel--collapsible":"",k?"filter-panel--collapsed":"",x),role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?E:void 0,children:[A&&n.jsxs("div",{className:"filter-panel__header",onClick:l?B:void 0,children:[n.jsx("div",{className:"filter-panel__title-row",children:e&&n.jsx(D,{id:E,className:"filter-panel__title h4",children:e})}),n.jsxs("div",{className:"filter-panel__header-actions",children:[k?w:a,l&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:k?"chevron-down":"chevron-up",className:"filter-panel__collapse-toggle",ariaLabel:k?h("common.expand","\uD3BC\uCE58\uAE30"):h("common.collapse","\uC811\uAE30"),showTooltipInfo:k?h("common.expand","\uD3BC\uCE58\uAE30"):h("common.collapse","\uC811\uAE30"),"aria-expanded":!k,onClick:v})]})]}),!k&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:we("filter-panel__sections",f?"filter-panel__sections--row":""),children:d.map(N=>{const F=m[N.label],R=F===void 0||(Array.isArray(F)?F.length===0:!1),K=(N.items??[]).filter($=>$!=null);N.allOption&&K.some($=>(typeof $=="string"?$:$.value)===xn)&&Rt(`filter-panel-all-value:${N.label}`,`[FilterPanel] '${N.label}' \uC808\uC5D0 allOption \uACFC \uAC12 '${xn}' \uC778 \uBCF4\uAE30\uAC00 \uD568\uAED8 \uC788\uB2E4 \u2014 \uB450 \uC120\uD0DD\uC774 \uAD6C\uBCC4\uB418\uC9C0 \uC54A\uB294\uB2E4. \uBCF4\uAE30 \uAC12\uC744 \uBC14\uAFD4\uB77C.`);const L=$=>{const T=typeof $=="string"?$:$.value,J=typeof $!="string"&&!!$.disabled,q=typeof $!="string"?$.labels:void 0,O=typeof $!="string"?$.displayLabel:void 0,Q=typeof $!="string"?$.tooltip:void 0,P=typeof $!="string"?$.descriptionTooltip:void 0,V=typeof $!="string"?$.shape:void 0,W=Array.isArray(F)?F.includes(T):F===T;return n.jsx(fe,{htmlType:"button",size:"keyboard",label:q??O??T,type:N.itemType??(q?"bar":T.length===1?"dot":void 0),selected:W,disabled:J,shape:V,showTooltipInfo:!!Q,tooltipInfoText:Q,tooltipDescription:P,onClick:()=>p?.(T,N.label)},T)};return n.jsxs(o.Fragment,{children:[N.groupLabel&&n.jsxs("div",{className:"filter-panel__group-label-row",children:[n.jsx("div",{className:"filter-panel__group-label body-2",children:N.groupLabel}),N.groupAction]}),n.jsxs("div",{className:we("filter-panel__section",N.layout==="row"?"filter-panel__section--row":"",N.block?"filter-panel__section--block":""),children:[n.jsxs("div",{className:"filter-panel__section-label-row",children:[n.jsx("span",{className:"filter-panel__section-label body-3",children:N.displayLabel??N.label}),N.labelAction??(N.labelInfo?n.jsx(Ha,{...N.labelInfo}):null)]}),N.type==="note"?n.jsx("div",{className:"filter-panel__note body-3",children:N.content}):N.type==="input"?n.jsx(Xn,{className:"filter-panel__textfield",placeholder:N.placeholder,ariaLabel:N.displayLabel??N.label,value:m[N.label]??"",onChange:$=>p?.($,N.label),error:N.error}):!N.multiple&&N.display==="segmented"?n.jsx(wn,{ariaLabel:N.displayLabel??N.label,options:[...N.allOption?[{key:xn,label:N.allLabel??h("common.all","\uC804\uCCB4"),disabled:N.allOptionDisabled}]:[],...K.map($=>{const T=typeof $=="string"?$:$.value,J=typeof $!="string"?$.displayLabel:void 0,q=typeof $!="string"?$.disabled:void 0;return{key:T,label:J??T,disabled:q}})],value:R&&N.allOption?xn:m[N.label]??"",onChange:$=>p?.($,N.label),size:32}):!N.multiple&&N.display==="dropdown"?n.jsx(fn,{className:"filter-panel__dropdown",ariaLabel:typeof N.label=="string"?N.label:void 0,size:40,options:[...N.allOption?[{value:xn,label:N.allLabel??h("common.all","\uC804\uCCB4"),disabled:N.allOptionDisabled}]:[],...K.map($=>{const T=typeof $=="string"?$:$.value,J=typeof $!="string"?$.displayLabel:void 0,q=typeof $!="string"?$.disabled:void 0;return{value:T,label:J??T,disabled:q}})],value:R&&N.allOption?xn:m[N.label],onChange:$=>p?.($,N.label)}):n.jsxs("div",{className:N.groups?"filter-panel__item-groups":"filter-panel__items",children:[N.allOption&&!N.groups&&n.jsx(fe,{htmlType:"button",size:"keyboard",label:N.allLabel??h("common.all","\uC804\uCCB4"),selected:R,disabled:N.allOptionDisabled,onClick:()=>p?.(xn,N.label)}),N.groups?N.groups.map(($,T)=>n.jsxs("div",{className:"filter-panel__item-group",children:[T===0&&N.allOption&&n.jsx(fe,{htmlType:"button",size:"keyboard",label:N.allLabel??h("common.all","\uC804\uCCB4"),selected:R,disabled:N.allOptionDisabled,onClick:()=>p?.(xn,N.label)}),$.filter(J=>J!=null).map(L)]},T)):K.map(L)]})]})]},N.label)})}),c!=null&&c!==!1&&n.jsx("div",{className:"filter-panel__footer body-3",children:c})]})]})}const N4=[1,2,3,4,5,6,7,8,9,10,11,12],sc=[8,4,2,1],hn="show",kn="hide";function lc(e,t){return{label:e("wordTable.filter.composition","\uAD6C\uC131"),items:[{value:"image",disabled:!t.hasImage,displayLabel:e("wordTable.filter.image","\uC774\uBBF8\uC9C0")},{value:"word",displayLabel:e("wordTable.filter.word","\uB2E8\uC5B4")},{value:"standardPron",displayLabel:e("wordTable.filter.standardPron","\uD45C\uC900 \uBC1C\uC74C")},{value:"colloquialPron",disabled:!t.hasColloquial,displayLabel:e("wordTable.filter.colloquialPron","\uAD6C\uC5B4\uCCB4 \uBC1C\uC74C")}],multiple:!0,allOption:!0}}function ic(e){return{label:e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5"),items:[{value:"landscape",displayLabel:e("wordTable.filter.landscape","\uAC00\uB85C")},{value:"portrait",displayLabel:e("wordTable.filter.portrait","\uC138\uB85C")}],display:"segmented"}}function uc(e){return{label:e("wordTable.filter.border","\uC678\uACFD\uC120"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:kn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function cc(e){return{label:e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:kn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function dc(e){return{label:e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:kn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function pc(e){return{label:e("wordTable.filter.cutLine","\uC808\uCDE8\uC120"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:"dashed",displayLabel:e("wordTable.filter.dotted","\uC810\uC120")},{value:"corner",displayLabel:e("wordTable.filter.corner","\uCF54\uB108")},{value:kn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function mc(e){return{label:e("wordPrint.divLine","\uB300\uB9BD\uC120"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:kn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function hc(e,t){return{label:e(t.hasPairs?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord"),items:[t.itemCount,...sc.filter(a=>a<t.itemCount)].map(a=>({value:`${a}\uAC1C`,displayLabel:e("wordTable.filter.itemsPerPageOption",{count:a})})),display:"segmented"}}function Cc(e,t){return e===t||!sc.includes(e)?Number.POSITIVE_INFINITY:e}function E4(e){return{label:e("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638"),items:[{value:"left",displayLabel:e("wordTable.filter.pageNumberLeft","\uC67C\uCABD")},{value:"center",displayLabel:e("wordTable.filter.pageNumberCenter","\uC911\uC559")},{value:"right",displayLabel:e("wordTable.filter.pageNumberRight","\uC624\uB978\uCABD")},{value:kn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function fc(e){return e==="left"||e==="center"||e==="right"?e:"none"}function gc(e,t){return{[e("wordTable.filter.composition","\uAD6C\uC131")]:t.contentTypes,[e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")]:t.orientation,[e("wordTable.filter.border","\uC678\uACFD\uC120")]:t.showOutline?hn:kn,[e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")]:t.cutLine,[e("wordPrint.divLine","\uB300\uB9BD\uC120")]:t.showDivLine?hn:kn,...t.showTopInfo!=null?{[e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")]:t.showTopInfo?hn:kn}:{},...t.showBottomInfo!=null?{[e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")]:t.showBottomInfo?hn:kn}:{}}}function bc(e,t,a,r){return a===e("wordTable.filter.composition","\uAD6C\uC131")?t===xn?(r.setContentTypes(()=>[]),!0):(r.setContentTypes(l=>l.includes(t)?l.filter(s=>s!==t):[...l,t]),!0):a===e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")?(r.setOrientation(t==="landscape"?"landscape":"portrait"),!0):a===e("wordTable.filter.border","\uC678\uACFD\uC120")?(r.setShowOutline(t===hn),!0):a===e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")?(r.setCutLine(t),!0):a===e("wordPrint.divLine","\uB300\uB9BD\uC120")?(r.setShowDivLine(t===hn),!0):a===e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")?(r.setShowTopInfo?.(t===hn),!0):a===e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")?(r.setShowBottomInfo?.(t===hn),!0):!1}function D4(e){return"sections"in e}function as(e){const{t}=_e.useTranslation(),{title:a,className:r,collapsible:l,defaultCollapsed:s,collapsed:i,onCollapsedChange:u,headerSummary:c}=e,d={collapsible:l,defaultCollapsed:s,collapsed:i,onCollapsedChange:u,headerSummary:c};if(D4(e))return n.jsx(Ln,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:e.sections,selected:e.selected,onSelect:e.onSelect,...d,align:"inline"});const{hasImage:m,hasColloquial:p,contentTypes:C,orientation:b,showOutline:x,cutLine:f,showDivLine:h,setters:_,showCutLine:g=!1,showDivLine2:k=!1,middleSections:v=[],extraSelected:B={},onExtraSelect:y,showPaperBands:w=!1,showTopInfo:A=!0,showBottomInfo:E=!0}=e,D=[lc(t,{hasImage:m,hasColloquial:p}),ic(t),...v,uc(t),...g?[pc(t)]:[],...k?[mc(t)]:[],...w?[cc(t),dc(t)]:[]],N={...gc(t,{contentTypes:C,orientation:b,showOutline:x,cutLine:f,showDivLine:h,showTopInfo:A,showBottomInfo:E}),...B},F=(R,K)=>{bc(t,R,K,_)||y?.(R,K)};return n.jsx(Ln,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:D,selected:N,onSelect:F,...d,sectionAlign:"horizontal"})}function rs(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function S4(e){return rs(e).replace(/"/g,""").replace(/'/g,"'")}function os(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()}let xr=null,ya=null;function j4(e,t,a,r="",l=""){if(e.length===0||ya&&ya.iframe.isConnected&&Date.now()-ya.at<1e4)return;const s=r?os(r):"";xr?.();let i=null;if(s){const d=document.title;document.title=s,i=()=>{document.title=d,window.removeEventListener("afterprint",i),xr===i&&(xr=null)},xr=i,window.addEventListener("afterprint",i)}const u=document.createElement("iframe");u.style.cssText="position:fixed;left:-10000px;top:0;width:1200px;height:900px;border:0;",document.body.appendChild(u);const c=u.contentDocument;if(!c){u.remove();return}ya={iframe:u,at:Date.now()},c.open(),c.write(ss(e,t,a,!0,s,l)),c.close(),u.contentWindow?.addEventListener("afterprint",()=>{i?.(),setTimeout(()=>{u.remove(),ya?.iframe===u&&(ya=null)},0)})}function ss(e,t,a,r=!1,l="",s=""){l=l?os(l):"";const i=Array.from(document.styleSheets).flatMap(p=>{try{return Array.from(p.cssRules).map(C=>C.cssText)}catch{return[]}}).join(`
|
|
831
831
|
`),u="light",c=(()=>{try{return document.documentElement.lang||""}catch{return""}})(),d=s?`<div class="paper-head">${rs(s)}</div>`:"",m=e.map(p=>{const C=p.cloneNode(!0);return C.querySelectorAll('[data-play-state="play"]').forEach(b=>b.style.display=""),C.querySelectorAll('[data-play-state="pause"]').forEach(b=>b.style.display="none"),C.querySelectorAll(".word-table-cell__score-slot:not(.word-table-cell__score-slot--on)").forEach(b=>b.remove()),C.querySelectorAll(".word-table-cell__spinner").forEach(b=>b.remove()),C.querySelectorAll("img").forEach(b=>{b.style.opacity==="0"&&(b.setAttribute("onload","this.style.opacity=''"),b.setAttribute("onerror","this.style.visibility='hidden'"))}),`<div class="paper-wrap">${d}${C.outerHTML}</div>`}).join(`
|
|
832
832
|
`);return`<!DOCTYPE html>
|
|
833
833
|
<html${c?` lang="${S4(c)}"`:""} data-theme="${u}">
|